Index: firmware/target/arm/as3525/sansa-clipplus/lcd-clip-plus.c =================================================================== --- firmware/target/arm/as3525/sansa-clipplus/lcd-clip-plus.c (revision 27563) +++ firmware/target/arm/as3525/sansa-clipplus/lcd-clip-plus.c (working copy) @@ -71,6 +71,9 @@ void lcd_enable_power(bool onoff) { - (void) onoff; + if (onoff) + CGU_PERI |= CGU_SSP_CLOCK_ENABLE; + else + CGU_PERI &= ~CGU_SSP_CLOCK_ENABLE; } Index: firmware/target/arm/as3525/sansa-clipv2/lcd-clipv2.c =================================================================== --- firmware/target/arm/as3525/sansa-clipv2/lcd-clipv2.c (revision 27563) +++ firmware/target/arm/as3525/sansa-clipv2/lcd-clipv2.c (working copy) @@ -87,6 +87,9 @@ void lcd_enable_power(bool onoff) { - (void) onoff; + if (onoff) + CGU_DBOP |= 1<<3; + else + CGU_DBOP &= ~(1<<3); } Index: firmware/target/arm/as3525/sansa-clip/lcd-clip.c =================================================================== --- firmware/target/arm/as3525/sansa-clip/lcd-clip.c (revision 27563) +++ firmware/target/arm/as3525/sansa-clip/lcd-clip.c (working copy) @@ -29,18 +29,23 @@ #define LCD_DELAY 1 -int lcd_hw_init(void) +static void dbop_init(void) { /* DBOP initialisation, do what OF does */ CGU_DBOP = (1<<3) | AS3525_DBOP_DIV; - GPIOB_AFSEL = 0x08; /* DBOP on pin 3 */ - GPIOC_AFSEL = 0x0f; /* DBOP on pins 3:0 */ - DBOP_CTRL = 0x51008; DBOP_TIMPOL_01 = 0x6E167; DBOP_TIMPOL_23 = 0xA167E06F; +} +int lcd_hw_init(void) +{ + dbop_init(); + + GPIOB_AFSEL = 0x08; /* DBOP on pin 3 */ + GPIOC_AFSEL = 0x0f; /* DBOP on pins 3:0 */ + GPIOA_DIR |= 0x33; /* pins 5:4 and 1:0 out */ GPIOB_DIR |= 0x40; /* pin 6 out */ @@ -95,5 +100,9 @@ void lcd_enable_power(bool onoff) { ascodec_write(AS3514_DCDC15, onoff ? 1 : 0); + if (onoff) + dbop_init(); + else + CGU_DBOP &= ~(1<<3); }