Permalink
Browse files

[MACH] ZYNQ - Apply a FULL peripheral reset on SDIO controller before…

… probe.
  • Loading branch information...
jameswalmsley committed Jun 3, 2013
1 parent 4ec3309 commit 18a55f3963d473b212e7f9783918bc0cfa0349c9
Showing with 12 additions and 0 deletions.
  1. +12 −0 arch/arm/mach/zynq/sdio.c
@@ -113,10 +113,22 @@ static BT_HANDLE zynq_sdhci_probe(const BT_INTEGRATED_DEVICE *pDevice, BT_ERROR
switch(pResource->ulStart) {
case 0:
bEnabled = (ZYNQ_SLCR->SDIO_CLK_CTRL & ZYNQ_SLCR_CLK_CTRL_CLKACT_0);
if(bEnabled) { // Attempt to reset the device!
ZYNQ_SLCR->SLCR_UNLOCK = 0xDF0D;
ZYNQ_SLCR->SDIO_RST_CTRL |= 0x11;
ZYNQ_SLCR->SDIO_RST_CTRL &= ~0x11;
ZYNQ_SLCR->SLCR_LOCK = 0x767B;
}
break;

case 1:
bEnabled = (ZYNQ_SLCR->SDIO_CLK_CTRL & ZYNQ_SLCR_CLK_CTRL_CLKACT_0);
if(bEnabled) {
ZYNQ_SLCR->SLCR_UNLOCK = 0xDF0D;
ZYNQ_SLCR->SDIO_RST_CTRL |= 0x22;
ZYNQ_SLCR->SDIO_RST_CTRL &= ~0x22;
ZYNQ_SLCR->SLCR_LOCK = 0x767B;
}
break;

default:

0 comments on commit 18a55f3

Please sign in to comment.