diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/target/arm/as3525/ata_sd_as3525.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c index e04e439964..6270f4363b 100644 --- a/firmware/target/arm/as3525/ata_sd_as3525.c +++ b/firmware/target/arm/as3525/ata_sd_as3525.c | |||
@@ -498,11 +498,9 @@ static void init_pl180_controller(const int drive) | |||
498 | int sd_init(void) | 498 | int sd_init(void) |
499 | { | 499 | { |
500 | int ret; | 500 | int ret; |
501 | CGU_IDE = (1<<7) /* AHB interface enable */ | | 501 | CGU_IDE = (1<<6) /* enable non AHB interface*/ |
502 | (1<<6) /* interface enable */ | | 502 | | (AS3525_IDE_DIV << 2) |
503 | (AS3525_IDE_DIV << 2) | | 503 | | AS3525_CLK_PLLA; /* clock source = PLLA */ |
504 | AS3525_CLK_PLLA; /* clock source = PLLA */ | ||
505 | |||
506 | 504 | ||
507 | CGU_PERI |= CGU_NAF_CLOCK_ENABLE; | 505 | CGU_PERI |= CGU_NAF_CLOCK_ENABLE; |
508 | #ifdef HAVE_MULTIDRIVE | 506 | #ifdef HAVE_MULTIDRIVE |
@@ -831,8 +829,7 @@ void sd_enable(bool on) | |||
831 | { | 829 | { |
832 | /* Enable both NAF_CLOCK & IDE clk for internal SD */ | 830 | /* Enable both NAF_CLOCK & IDE clk for internal SD */ |
833 | CGU_PERI |= CGU_NAF_CLOCK_ENABLE; | 831 | CGU_PERI |= CGU_NAF_CLOCK_ENABLE; |
834 | CGU_IDE |= ((1<<7) /* IDE AHB interface enable */ | 832 | CGU_IDE |= (1<<6); /* enable non AHB interface*/ |
835 | | (1<<6)); /* IDE interface enable */ | ||
836 | #ifdef HAVE_MULTIDRIVE | 833 | #ifdef HAVE_MULTIDRIVE |
837 | /* Enable MCI clk for uSD */ | 834 | /* Enable MCI clk for uSD */ |
838 | CGU_PERI |= CGU_MCI_CLOCK_ENABLE; | 835 | CGU_PERI |= CGU_MCI_CLOCK_ENABLE; |
@@ -879,8 +876,7 @@ void sd_enable(bool on) | |||
879 | 876 | ||
880 | /* Disable both NAF_CLOCK & IDE clk for internal SD */ | 877 | /* Disable both NAF_CLOCK & IDE clk for internal SD */ |
881 | CGU_PERI &= ~CGU_NAF_CLOCK_ENABLE; | 878 | CGU_PERI &= ~CGU_NAF_CLOCK_ENABLE; |
882 | CGU_IDE &= ~((1<<7) /* IDE AHB interface disable */ | 879 | CGU_IDE &= ~(1<<6); /* disable non AHB interface*/ |
883 | | (1<<6)); /* IDE interface disable */ | ||
884 | } | 880 | } |
885 | } | 881 | } |
886 | 882 | ||