diff options
author | Michael Giacomelli <giac2000@hotmail.com> | 2009-01-18 18:49:36 +0000 |
---|---|---|
committer | Michael Giacomelli <giac2000@hotmail.com> | 2009-01-18 18:49:36 +0000 |
commit | 3db7893911dc756f3f0cf97712004ea9c0850379 (patch) | |
tree | 12ad93c09c26dc77e67d37bfdfc6ee25ccffd183 | |
parent | 72781630876fe4637d3ab24e12f12239c7216d53 (diff) | |
download | rockbox-3db7893911dc756f3f0cf97712004ea9c0850379.tar.gz rockbox-3db7893911dc756f3f0cf97712004ea9c0850379.zip |
Commit second part of FS#9663 by Thomas Martitz. Enable button light on fuze and e200v2.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19792 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/export/as3525.h | 1 | ||||
-rw-r--r-- | firmware/target/arm/as3525/ata_sd_as3525.c | 12 | ||||
-rw-r--r-- | firmware/target/arm/as3525/backlight-e200v2-fuze.c | 4 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sansa-fuze/button-fuze.c | 1 |
4 files changed, 14 insertions, 4 deletions
diff --git a/firmware/export/as3525.h b/firmware/export/as3525.h index 50b1fbe06b..70462c7e8e 100644 --- a/firmware/export/as3525.h +++ b/firmware/export/as3525.h | |||
@@ -273,6 +273,7 @@ interface */ | |||
273 | #define UART_LNSTATUS_REG (*(volatile unsigned long*)(UART0_BASE + 0x14)) /* Line status register */ | 273 | #define UART_LNSTATUS_REG (*(volatile unsigned long*)(UART0_BASE + 0x14)) /* Line status register */ |
274 | 274 | ||
275 | 275 | ||
276 | #define SD_MCI_POWER (*(volatile unsigned long*)(SD_MCI_BASE + 0x0)) | ||
276 | 277 | ||
277 | 278 | ||
278 | #define TIMER1_LOAD (*(volatile unsigned long*)(TIMER_BASE + 0x00)) /* 32-bit width */ | 279 | #define TIMER1_LOAD (*(volatile unsigned long*)(TIMER_BASE + 0x00)) /* 32-bit width */ |
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c index b68df4c930..44fe3e4314 100644 --- a/firmware/target/arm/as3525/ata_sd_as3525.c +++ b/firmware/target/arm/as3525/ata_sd_as3525.c | |||
@@ -476,10 +476,10 @@ static void init_pl180_controller(const int drive) | |||
476 | int sd_init(void) | 476 | int sd_init(void) |
477 | { | 477 | { |
478 | int ret; | 478 | int ret; |
479 | CGU_IDE = (1<<7) /* AHB interface enable */ | | 479 | CGU_IDE = (1<<7) /* AHB interface enable */ | |
480 | (1<<6) /* interface enable */ | | 480 | (1<<6) /* interface enable */ | |
481 | ((CLK_DIV(AS3525_PLLA_FREQ, AS3525_IDE_FREQ) - 1) << 2) | | 481 | ((CLK_DIV(AS3525_PLLA_FREQ, AS3525_IDE_FREQ) - 1) << 2) | |
482 | 1 /* clock source = PLLA */; | 482 | 1; /* clock source = PLLA */ |
483 | 483 | ||
484 | 484 | ||
485 | CGU_PERI |= CGU_NAF_CLOCK_ENABLE; | 485 | CGU_PERI |= CGU_NAF_CLOCK_ENABLE; |
@@ -741,6 +741,10 @@ void sd_enable(bool on) | |||
741 | CGU_PERI |= CGU_NAF_CLOCK_ENABLE; | 741 | CGU_PERI |= CGU_NAF_CLOCK_ENABLE; |
742 | #ifdef HAVE_MULTIVOLUME | 742 | #ifdef HAVE_MULTIVOLUME |
743 | CGU_PERI |= CGU_MCI_CLOCK_ENABLE; | 743 | CGU_PERI |= CGU_MCI_CLOCK_ENABLE; |
744 | /* Needed for buttonlight and MicroSD to work at the same time */ | ||
745 | /* Turn ROD control on, as the OF does */ | ||
746 | SD_MCI_POWER |= (1<<7); | ||
747 | CCU_IO |= (1<<2); | ||
744 | #endif | 748 | #endif |
745 | CGU_IDE |= (1<<7) /* AHB interface enable */ | | 749 | CGU_IDE |= (1<<7) /* AHB interface enable */ | |
746 | (1<<6) /* interface enable */; | 750 | (1<<6) /* interface enable */; |
@@ -751,6 +755,10 @@ void sd_enable(bool on) | |||
751 | CGU_PERI &= ~CGU_NAF_CLOCK_ENABLE; | 755 | CGU_PERI &= ~CGU_NAF_CLOCK_ENABLE; |
752 | #ifdef HAVE_MULTIVOLUME | 756 | #ifdef HAVE_MULTIVOLUME |
753 | CGU_PERI &= ~CGU_MCI_CLOCK_ENABLE; | 757 | CGU_PERI &= ~CGU_MCI_CLOCK_ENABLE; |
758 | /* Needed for buttonlight and MicroSD to work at the same time */ | ||
759 | /* Turn ROD control off, as the OF does */ | ||
760 | SD_MCI_POWER &= ~(1<<7); | ||
761 | CCU_IO &= ~(1<<2); | ||
754 | #endif | 762 | #endif |
755 | CGU_IDE &= ~((1<<7)|(1<<6)); | 763 | CGU_IDE &= ~((1<<7)|(1<<6)); |
756 | sd_enabled = false; | 764 | sd_enabled = false; |
diff --git a/firmware/target/arm/as3525/backlight-e200v2-fuze.c b/firmware/target/arm/as3525/backlight-e200v2-fuze.c index c642064591..c26d3919c3 100644 --- a/firmware/target/arm/as3525/backlight-e200v2-fuze.c +++ b/firmware/target/arm/as3525/backlight-e200v2-fuze.c | |||
@@ -57,12 +57,12 @@ void _backlight_off(void) | |||
57 | 57 | ||
58 | void _buttonlight_on(void) | 58 | void _buttonlight_on(void) |
59 | { | 59 | { |
60 | GPIOD_PIN(7) = (1<<7); | ||
61 | GPIOD_DIR |= (1<<7); | 60 | GPIOD_DIR |= (1<<7); |
61 | GPIOD_PIN(7) = (1<<7); | ||
62 | } | 62 | } |
63 | 63 | ||
64 | void _buttonlight_off(void) | 64 | void _buttonlight_off(void) |
65 | { | 65 | { |
66 | GPIOD_PIN(7) = 0; | 66 | GPIOD_PIN(7) = 0; |
67 | GPIOD_DIR |= (1<<7); | 67 | GPIOD_DIR &= ~(1<<7); |
68 | } | 68 | } |
diff --git a/firmware/target/arm/as3525/sansa-fuze/button-fuze.c b/firmware/target/arm/as3525/sansa-fuze/button-fuze.c index 2414900727..ff07965f90 100644 --- a/firmware/target/arm/as3525/sansa-fuze/button-fuze.c +++ b/firmware/target/arm/as3525/sansa-fuze/button-fuze.c | |||
@@ -108,6 +108,7 @@ static void get_wheel(void) | |||
108 | * the rockbox menus */ | 108 | * the rockbox menus */ |
109 | if (queue_empty(&button_queue) && ++counter >= 4) | 109 | if (queue_empty(&button_queue) && ++counter >= 4) |
110 | { | 110 | { |
111 | buttonlight_on(); | ||
111 | backlight_on(); | 112 | backlight_on(); |
112 | /* 1<<24 is rather arbitary, seems to work well */ | 113 | /* 1<<24 is rather arbitary, seems to work well */ |
113 | queue_post(&button_queue, btn, 1<<24); | 114 | queue_post(&button_queue, btn, 1<<24); |