diff options
Diffstat (limited to 'firmware/target/arm/as3525/ata_sd_as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/ata_sd_as3525.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c index 9c64a9614d..77d1ec1504 100644 --- a/firmware/target/arm/as3525/ata_sd_as3525.c +++ b/firmware/target/arm/as3525/ata_sd_as3525.c | |||
@@ -285,25 +285,10 @@ static void init_pl180_controller(const int drive) | |||
285 | 285 | ||
286 | int sd_init(void) | 286 | int sd_init(void) |
287 | { | 287 | { |
288 | /* reset peripherals */ | 288 | CGU_IDE = (1<<7) /* AHB interface enable */ | |
289 | 289 | (1<<6) /* interface enable */ | | |
290 | CCU_SRC = | 290 | (2<<2) /* clock didiver = 2+1 */ | |
291 | #ifdef HAVE_MULTIVOLUME | 291 | 1 /* clock source = PLLA */; |
292 | CCU_SRC_SDMCI_EN | | ||
293 | #endif | ||
294 | CCU_SRC_NAF_EN | CCU_SRC_IDE_EN | CCU_SRC_IDE_AHB_EN | CCU_SRC_MST_EN; | ||
295 | |||
296 | CCU_SRL = CCU_SRL_MAGIC_NUMBER; | ||
297 | CCU_SRL = 0; | ||
298 | |||
299 | GPIOC_DIR &= ~(1<<1); | ||
300 | if(GPIOC_PIN(1)) | ||
301 | CCU_SPARE1 |= 4; /* sets bit 2 of undocumented register */ | ||
302 | else | ||
303 | CCU_SPARE1 &= ~4; /* or clear it */ | ||
304 | |||
305 | CGU_IDE = (1<<7)|(1<<6); /* enable, 24MHz clock */ | ||
306 | CGU_MEMSTICK = (1<<8); /* enable, 24MHz clock */ | ||
307 | 292 | ||
308 | CGU_PERI |= CGU_NAF_CLOCK_ENABLE; | 293 | CGU_PERI |= CGU_NAF_CLOCK_ENABLE; |
309 | #ifdef HAVE_MULTIVOLUME | 294 | #ifdef HAVE_MULTIVOLUME |