Message ID | 1253696892-15262-3-git-send-email-B22826@freescale.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Kumar Gala |
Headers | show |
On Wed, Sep 23, 2009 at 05:08:09PM +0800, Gao Guanhua wrote: > The SDHC can not work on DMA mode because of the hardware bug, > so we set a broken dma flag and use PIO mode. This patch applies > to Rev1.0. Signed-off-by line is missing (in all patches). > --- > arch/powerpc/boot/dts/p2020ds.dts | 1 + > drivers/mmc/host/sdhci-of.c | 3 +++ > 2 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/arch/powerpc/boot/dts/p2020ds.dts b/arch/powerpc/boot/dts/p2020ds.dts > index be449ba..574ad4f 100644 > --- a/arch/powerpc/boot/dts/p2020ds.dts > +++ b/arch/powerpc/boot/dts/p2020ds.dts > @@ -459,6 +459,7 @@ > reg = <0x2e000 0x1000>; > interrupts = <72 0x2>; > interrupt-parent = <&mpic>; > + fsl,sdhci-dma-broken; You might want to update Documentation/powerpc/dts-bindings/fsl/esdhc.txt > clock-frequency = <0>; > }; > > diff --git a/drivers/mmc/host/sdhci-of.c b/drivers/mmc/host/sdhci-of.c > index 01ab916..5879483 100644 > --- a/drivers/mmc/host/sdhci-of.c > +++ b/drivers/mmc/host/sdhci-of.c > @@ -270,6 +270,9 @@ static int __devinit sdhci_of_probe(struct of_device *ofdev, > if (sdhci_of_wp_inverted(np)) > host->quirks |= SDHCI_QUIRK_INVERTED_WRITE_PROTECT; > > + if (of_get_property(np, "fsl,sdhci-dma-broken", NULL)) > + host->quirks |= SDHCI_QUIRK_BROKEN_DMA; > + > clk = of_get_property(np, "clock-frequency", &size); > if (clk && size == sizeof(*clk) && *clk) > of_host->clock = *clk; > -- > 1.6.4 Thanks,
Thanks, I will add them. > -----Original Message----- > From: Anton Vorontsov [mailto:avorontsov@ru.mvista.com] > Sent: Wednesday, September 23, 2009 7:55 PM > To: Gao Guanhua-B22826 > Cc: sdhci-devel@lists.ossman.eu; linuxppc-dev@ozlabs.org > Subject: Re: [PATCH 3/6] P2020DS: Fixup sdhc to use PIO mode > > On Wed, Sep 23, 2009 at 05:08:09PM +0800, Gao Guanhua wrote: > > The SDHC can not work on DMA mode because of the hardware > bug, so we > > set a broken dma flag and use PIO mode. This patch applies > to Rev1.0. > > Signed-off-by line is missing (in all patches). > > > --- > > arch/powerpc/boot/dts/p2020ds.dts | 1 + > > drivers/mmc/host/sdhci-of.c | 3 +++ > > 2 files changed, 4 insertions(+), 0 deletions(-) > > > > diff --git a/arch/powerpc/boot/dts/p2020ds.dts > > b/arch/powerpc/boot/dts/p2020ds.dts > > index be449ba..574ad4f 100644 > > --- a/arch/powerpc/boot/dts/p2020ds.dts > > +++ b/arch/powerpc/boot/dts/p2020ds.dts > > @@ -459,6 +459,7 @@ > > reg = <0x2e000 0x1000>; > > interrupts = <72 0x2>; > > interrupt-parent = <&mpic>; > > + fsl,sdhci-dma-broken; > > You might want to update > Documentation/powerpc/dts-bindings/fsl/esdhc.txt > > > clock-frequency = <0>; > > }; > > > > diff --git a/drivers/mmc/host/sdhci-of.c > b/drivers/mmc/host/sdhci-of.c > > index 01ab916..5879483 100644 > > --- a/drivers/mmc/host/sdhci-of.c > > +++ b/drivers/mmc/host/sdhci-of.c > > @@ -270,6 +270,9 @@ static int __devinit > sdhci_of_probe(struct of_device *ofdev, > > if (sdhci_of_wp_inverted(np)) > > host->quirks |= SDHCI_QUIRK_INVERTED_WRITE_PROTECT; > > > > + if (of_get_property(np, "fsl,sdhci-dma-broken", NULL)) > > + host->quirks |= SDHCI_QUIRK_BROKEN_DMA; > > + > > clk = of_get_property(np, "clock-frequency", &size); > > if (clk && size == sizeof(*clk) && *clk) > > of_host->clock = *clk; > > -- > > 1.6.4 > > Thanks, > > -- > Anton Vorontsov > email: cbouatmailru@gmail.com > irc://irc.freenode.net/bd2 > >
On Sep 24, 2009, at 3:28 AM, Gao Guanhua-B22826 wrote: > Thanks, I will add them. > >> -----Original Message----- >> From: Anton Vorontsov [mailto:avorontsov@ru.mvista.com] >> Sent: Wednesday, September 23, 2009 7:55 PM >> To: Gao Guanhua-B22826 >> Cc: sdhci-devel@lists.ossman.eu; linuxppc-dev@ozlabs.org >> Subject: Re: [PATCH 3/6] P2020DS: Fixup sdhc to use PIO mode >> >> On Wed, Sep 23, 2009 at 05:08:09PM +0800, Gao Guanhua wrote: >>> The SDHC can not work on DMA mode because of the hardware >> bug, so we >>> set a broken dma flag and use PIO mode. This patch applies >> to Rev1.0. >> >> Signed-off-by line is missing (in all patches). > Any plan to update & repost these patches? - k
I will update the patch next week. Regards, --gaoguanhua > -----Original Message----- > From: Kumar Gala [mailto:galak@kernel.crashing.org] > Sent: Thursday, November 05, 2009 9:52 PM > To: Gao Guanhua-B22826 > Cc: avorontsov@ru.mvista.com; linuxppc-dev@ozlabs.org; > sdhci-devel@lists.ossman.eu > Subject: Re: [PATCH 3/6] P2020DS: Fixup sdhc to use PIO mode > > > On Sep 24, 2009, at 3:28 AM, Gao Guanhua-B22826 wrote: > > > Thanks, I will add them. > > > >> -----Original Message----- > >> From: Anton Vorontsov [mailto:avorontsov@ru.mvista.com] > >> Sent: Wednesday, September 23, 2009 7:55 PM > >> To: Gao Guanhua-B22826 > >> Cc: sdhci-devel@lists.ossman.eu; linuxppc-dev@ozlabs.org > >> Subject: Re: [PATCH 3/6] P2020DS: Fixup sdhc to use PIO mode > >> > >> On Wed, Sep 23, 2009 at 05:08:09PM +0800, Gao Guanhua wrote: > >>> The SDHC can not work on DMA mode because of the hardware > >> bug, so we > >>> set a broken dma flag and use PIO mode. This patch applies > >> to Rev1.0. > >> > >> Signed-off-by line is missing (in all patches). > > > > Any plan to update & repost these patches? > > - k > >
Hi, Kumar, I tried to update the patch based on the latest kernel tree (2.6.32-rc6), there are some problems: 1) the P2020DS board has supported SDHC using DMA, and the latest kernel tree has included the related code, it doesn't need most of the patches I posted before. 2) I compiled the image, but the SDHC can not work, it reports error -110. I adjusted the timeout to the max value, but anther error occurred. > -----Original Message----- > From: Kumar Gala [mailto:galak@kernel.crashing.org] > Sent: Thursday, November 05, 2009 9:52 PM > To: Gao Guanhua-B22826 > Cc: avorontsov@ru.mvista.com; linuxppc-dev@ozlabs.org; > sdhci-devel@lists.ossman.eu > Subject: Re: [PATCH 3/6] P2020DS: Fixup sdhc to use PIO mode > > > On Sep 24, 2009, at 3:28 AM, Gao Guanhua-B22826 wrote: > > > Thanks, I will add them. > > > >> -----Original Message----- > >> From: Anton Vorontsov [mailto:avorontsov@ru.mvista.com] > >> Sent: Wednesday, September 23, 2009 7:55 PM > >> To: Gao Guanhua-B22826 > >> Cc: sdhci-devel@lists.ossman.eu; linuxppc-dev@ozlabs.org > >> Subject: Re: [PATCH 3/6] P2020DS: Fixup sdhc to use PIO mode > >> > >> On Wed, Sep 23, 2009 at 05:08:09PM +0800, Gao Guanhua wrote: > >>> The SDHC can not work on DMA mode because of the hardware > >> bug, so we > >>> set a broken dma flag and use PIO mode. This patch applies > >> to Rev1.0. > >> > >> Signed-off-by line is missing (in all patches). > > > > Any plan to update & repost these patches? > > - k > >
diff --git a/arch/powerpc/boot/dts/p2020ds.dts b/arch/powerpc/boot/dts/p2020ds.dts index be449ba..574ad4f 100644 --- a/arch/powerpc/boot/dts/p2020ds.dts +++ b/arch/powerpc/boot/dts/p2020ds.dts @@ -459,6 +459,7 @@ reg = <0x2e000 0x1000>; interrupts = <72 0x2>; interrupt-parent = <&mpic>; + fsl,sdhci-dma-broken; clock-frequency = <0>; }; diff --git a/drivers/mmc/host/sdhci-of.c b/drivers/mmc/host/sdhci-of.c index 01ab916..5879483 100644 --- a/drivers/mmc/host/sdhci-of.c +++ b/drivers/mmc/host/sdhci-of.c @@ -270,6 +270,9 @@ static int __devinit sdhci_of_probe(struct of_device *ofdev, if (sdhci_of_wp_inverted(np)) host->quirks |= SDHCI_QUIRK_INVERTED_WRITE_PROTECT; + if (of_get_property(np, "fsl,sdhci-dma-broken", NULL)) + host->quirks |= SDHCI_QUIRK_BROKEN_DMA; + clk = of_get_property(np, "clock-frequency", &size); if (clk && size == sizeof(*clk) && *clk) of_host->clock = *clk;