summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/as3525/sd-as3525v2.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/sd-as3525v2.c')
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c
index 945d6e5302..250dfca784 100644
--- a/firmware/target/arm/as3525/sd-as3525v2.c
+++ b/firmware/target/arm/as3525/sd-as3525v2.c
@@ -641,18 +641,20 @@ static void init_controller(void)
int sd_init(void)
{
int ret;
+
CGU_PERI |= CGU_MCI_CLOCK_ENABLE;
- CGU_IDE = (1<<7) /* AHB interface enable */ |
- (1<<6) /* interface enable */ |
- ((CLK_DIV(AS3525_PLLA_FREQ, AS3525_IDE_FREQ) - 1) << 2) |
- 1; /* clock source = PLLA */
+ CGU_IDE = (1<<7) /* AHB interface enable */
+ | (AS3525_IDE_DIV << 2)
+ | 1; /* clock source = PLLA */
- CGU_MEMSTICK = (1<<8) | (1<<7) |
- ((CLK_DIV(AS3525_PLLA_FREQ, AS3525_MS_FREQ) -1) << 2) | 1;
+ CGU_MEMSTICK = (1<<7) /* interface enable */
+ | (AS3525_MS_DIV << 2)
+ | 1; /* clock source = PLLA */
- *(volatile int*)(CGU_BASE+0x3C) = (1<<7) |
- (CLK_DIV(AS3525_PLLA_FREQ, 24000000) -1)<<2 | 1;
+ CGU_SDSLOT = (1<<7) /* interface enable */
+ | (AS3525_SDSLOT_DIV << 2)
+ | 1; /* clock source = PLLA */
wakeup_init(&transfer_completion_signal);