summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/ata_mmc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/drivers/ata_mmc.c b/firmware/drivers/ata_mmc.c
index 159b007f64..c114743d27 100644
--- a/firmware/drivers/ata_mmc.c
+++ b/firmware/drivers/ata_mmc.c
@@ -585,6 +585,7 @@ int ata_soft_reset(void)
585void ata_enable(bool on) 585void ata_enable(bool on)
586{ 586{
587 PBCR1 &= ~0x0CF0; /* PB13, PB11 and PB10 become GPIOs, if not modified below */ 587 PBCR1 &= ~0x0CF0; /* PB13, PB11 and PB10 become GPIOs, if not modified below */
588 PACR2 &= ~0x4000; /* use PA7 (bridge reset) as GPIO */
588 if (on) 589 if (on)
589 { 590 {
590 PBCR1 |= 0x08A0; /* as SCK1, TxD1, RxD1 */ 591 PBCR1 |= 0x08A0; /* as SCK1, TxD1, RxD1 */
@@ -607,6 +608,8 @@ int ata_init(void)
607 led(false); 608 led(false);
608 609
609 /* Port setup */ 610 /* Port setup */
611 PACR1 &= ~0x0F00; /* GPIO function for PA12, /IRQ1 for PA13 */
612 PACR1 |= 0x0400;
610 PADR |= 0x0680; /* set all the selects + reset high (=inactive) */ 613 PADR |= 0x0680; /* set all the selects + reset high (=inactive) */
611 PAIOR |= 0x1680; /* make outputs for them and the PA12 clock gate */ 614 PAIOR |= 0x1680; /* make outputs for them and the PA12 clock gate */
612 615
@@ -638,3 +641,4 @@ int ata_init(void)
638} 641}
639 642
640#endif /* #ifdef HAVE_MMC */ 643#endif /* #ifdef HAVE_MMC */
644