summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/sansa-clip
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/sansa-clip')
-rw-r--r--firmware/target/arm/as3525/sansa-clip/lcd-clip.c15
-rw-r--r--firmware/target/arm/as3525/sansa-clip/lcd-clip.h29
2 files changed, 11 insertions, 33 deletions
diff --git a/firmware/target/arm/as3525/sansa-clip/lcd-clip.c b/firmware/target/arm/as3525/sansa-clip/lcd-clip.c
index 775988cc0e..21d8902739 100644
--- a/firmware/target/arm/as3525/sansa-clip/lcd-clip.c
+++ b/firmware/target/arm/as3525/sansa-clip/lcd-clip.c
@@ -25,8 +25,11 @@
25#include "lcd-clip.h" 25#include "lcd-clip.h"
26#include "system.h" 26#include "system.h"
27#include "cpu.h" 27#include "cpu.h"
28#include "ascodec.h"
28 29
29void lcd_hw_init(int *offset) 30#define LCD_DELAY 1
31
32int lcd_hw_init(void)
30{ 33{
31/* DBOP initialisation, do what OF does */ 34/* DBOP initialisation, do what OF does */
32 CGU_DBOP = (1<<3) | AS3525_DBOP_DIV; 35 CGU_DBOP = (1<<3) | AS3525_DBOP_DIV;
@@ -46,11 +49,9 @@ void lcd_hw_init(int *offset)
46 GPIOA_PIN(4) = 0; 49 GPIOA_PIN(4) = 0;
47 GPIOB_PIN(6) = (1<<6); 50 GPIOB_PIN(6) = (1<<6);
48 51
49 *offset = 2; 52 return 0;
50} 53}
51 54
52#define LCD_DELAY 1
53
54void lcd_write_command(int byte) 55void lcd_write_command(int byte)
55{ 56{
56 volatile int i = 0; 57 volatile int i = 0;
@@ -90,3 +91,9 @@ void lcd_write_data(const fb_data* p_bytes, int count)
90 /* While push fifo is not empty */ 91 /* While push fifo is not empty */
91 while ((DBOP_STAT & (1<<10)) == 0); 92 while ((DBOP_STAT & (1<<10)) == 0);
92} 93}
94
95void lcd_enable_power(bool onoff)
96{
97 ascodec_write(AS3514_DCDC15, onoff ? 1 : 0);
98}
99
diff --git a/firmware/target/arm/as3525/sansa-clip/lcd-clip.h b/firmware/target/arm/as3525/sansa-clip/lcd-clip.h
deleted file mode 100644
index 3d4fe60311..0000000000
--- a/firmware/target/arm/as3525/sansa-clip/lcd-clip.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2008-2009 Rafaël Carré
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#include "config.h"
23#include "ascodec.h"
24
25void lcd_hw_init(int *offset) INIT_ATTR;
26static inline void lcd_enable_power(bool onoff)
27{
28 ascodec_write(AS3514_DCDC15, onoff ? 1 : 0);
29}