mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Make Chumby work again with its SD card
@ 2013-04-23 10:09 Juergen Beisert
  2013-04-23 10:09 ` [PATCH 1/2] MXS/Chumby: fix MCI device registration Juergen Beisert
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Juergen Beisert @ 2013-04-23 10:09 UTC (permalink / raw)
  To: barebox

Due to a missing resource size the Chumby isn't able to work with its SD card
anymore. Instead it hangs forever. By using the generic block reset routine I
was able to discover the cause. The following two patches makes the Chumby
work again. At least the resource size patch should be applied to the current
master.

jbe


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] MXS/Chumby: fix MCI device registration
  2013-04-23 10:09 Make Chumby work again with its SD card Juergen Beisert
@ 2013-04-23 10:09 ` Juergen Beisert
  2013-04-23 10:09 ` [PATCH 2/2] MXS/MCI: simplify reset of the MCI device block Juergen Beisert
  2013-04-24  5:58 ` Make Chumby work again with its SD card Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Juergen Beisert @ 2013-04-23 10:09 UTC (permalink / raw)
  To: barebox

Due to some changes in the framework a resource size of zero does not map
anything at all and it does it silently.

Defining the resource size for the MCI interface make it work again on the
Chumby.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
---
 arch/arm/boards/chumby_falconwing/falconwing.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boards/chumby_falconwing/falconwing.c b/arch/arm/boards/chumby_falconwing/falconwing.c
index fd5bc4c..720fe32 100644
--- a/arch/arm/boards/chumby_falconwing/falconwing.c
+++ b/arch/arm/boards/chumby_falconwing/falconwing.c
@@ -293,7 +293,7 @@ static int falconwing_devices_init(void)
 	imx_set_ioclk(480000000); /* enable IOCLK to run at the PLL frequency */
 	/* run the SSP unit clock at 100,000 kHz */
 	imx_set_sspclk(0, 100000000, 1);
-	add_generic_device("mxs_mci", 0, NULL, IMX_SSP1_BASE, 0,
+	add_generic_device("mxs_mci", 0, NULL, IMX_SSP1_BASE, 0x2000,
 			   IORESOURCE_MEM, &mci_pdata);
 	add_generic_device("stmfb", 0, NULL, IMX_FB_BASE, 4096,
 			   IORESOURCE_MEM, &fb_mode);
-- 
1.8.2.rc2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] MXS/MCI: simplify reset of the MCI device block
  2013-04-23 10:09 Make Chumby work again with its SD card Juergen Beisert
  2013-04-23 10:09 ` [PATCH 1/2] MXS/Chumby: fix MCI device registration Juergen Beisert
@ 2013-04-23 10:09 ` Juergen Beisert
  2013-04-24  5:58 ` Make Chumby work again with its SD card Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Juergen Beisert @ 2013-04-23 10:09 UTC (permalink / raw)
  To: barebox

Since a generic block reset function is a available, also the MCI driver
should make use of it.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
---
 drivers/mci/mxs.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/drivers/mci/mxs.c b/drivers/mci/mxs.c
index 3657b3e..93f5a41 100644
--- a/drivers/mci/mxs.c
+++ b/drivers/mci/mxs.c
@@ -446,19 +446,6 @@ static unsigned mxs_mci_setup_clock_speed(struct mxs_mci_host *mxs_mci, unsigned
 	return ssp / div / rate;
 }
 
-/**
- * Reset the MCI engine (the hard way)
- * @param hw_dev Host interface instance
- *
- * This will reset everything in all registers of this unit! (FIXME)
- */
-static void mxs_mci_reset(struct mxs_mci_host *mxs_mci)
-{
-	writel(SSP_CTRL0_SFTRST, mxs_mci->regs + HW_SSP_CTRL0 + 8);
-	while (readl(mxs_mci->regs + HW_SSP_CTRL0) & SSP_CTRL0_SFTRST)
-		;
-}
-
 /* ------------------------- MCI API -------------------------------------- */
 
 /**
@@ -475,7 +462,7 @@ static int mxs_mci_initialize(struct mci_host *host, struct device_d *mci_dev)
 	writel(SSP_CTRL0_CLKGATE, mxs_mci->regs + HW_SSP_CTRL0 + 8);
 
 	/* reset the unit */
-	mxs_mci_reset(mxs_mci);
+	mxs_reset_block(mxs_mci->regs + HW_SSP_CTRL0, 0);
 
 	/* restore the last settings */
 	mxs_mci_setup_timeout(mxs_mci, 0xffff);
-- 
1.8.2.rc2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Make Chumby work again with its SD card
  2013-04-23 10:09 Make Chumby work again with its SD card Juergen Beisert
  2013-04-23 10:09 ` [PATCH 1/2] MXS/Chumby: fix MCI device registration Juergen Beisert
  2013-04-23 10:09 ` [PATCH 2/2] MXS/MCI: simplify reset of the MCI device block Juergen Beisert
@ 2013-04-24  5:58 ` Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2013-04-24  5:58 UTC (permalink / raw)
  To: Juergen Beisert; +Cc: barebox

On Tue, Apr 23, 2013 at 12:09:10PM +0200, Juergen Beisert wrote:
> Due to a missing resource size the Chumby isn't able to work with its SD card
> anymore. Instead it hangs forever. By using the generic block reset routine I
> was able to discover the cause. The following two patches makes the Chumby
> work again. At least the resource size patch should be applied to the current
> master.

Applied, first to master, second one to -next.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-24  5:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-23 10:09 Make Chumby work again with its SD card Juergen Beisert
2013-04-23 10:09 ` [PATCH 1/2] MXS/Chumby: fix MCI device registration Juergen Beisert
2013-04-23 10:09 ` [PATCH 2/2] MXS/MCI: simplify reset of the MCI device block Juergen Beisert
2013-04-24  5:58 ` Make Chumby work again with its SD card Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox