On 03/17/2011 03:22 PM, Grant Likely wrote:
[cc'ing linux-mmc to continue this discussion]
On Wed, Mar 16, 2011 at 10:39:16PM +0800, Shawn Guo wrote:
On Tue, Mar 15, 2011 at 01:59:26PM -0600, Grant Likely wrote:
On Mon, Mar 14, 2011 at 10:25:57PM +0800, Shawn Guo wrote:
Signed-off-by: Shawn Guoshawn.guo@linaro.org
dt support can be added directly to sdchi-pltfm.c drivers now. There is no longer any need to use sdhci-of-core.c any more. For an example, see the patch titled "of/tegra: add sdhci device tree handling" in my devicetree/test branch.
I mentioned this a little bit in the cover letter of the patch set as below.
"This patch set is to support sdhci-esdhc-imx as an OF device. As there is already powerpc based esdhc OF support, it chose to add OF support for imx esdhc driver in a different way from what sdhci-tegra did."
I should read your descriptions more carefully. :-)
The tegra approach you made was one of the two options I had, and I happened to love the another more, as it consolidates the eSDHC OF driver for Freescale MPCxxx and i.MX family.
Heh, I don't dispute the value of merging code. However, with this approach it means that DT and non-DT imx platforms will be using different drivers for the same device. Given the choices, I'd rather see the imx driver used in both DT and non-DT situations instead of sharing code with the powerpc version. I've learnt the hard way that it is just too painful having two drivers for the same hardware; particularly when the only difference is the method used to probe them.
Actually, what I'd *really* rather see is the powerpc code migrated over to sdhci_pltfm.c, and then have the imx compatible value added to it. I'll make sure to get some help from the Freescale powerpc folks to test any patch you produce to that end.
Based on past experience, there will be differences between imx and ppc h/w even though it is the "same" block.
Rob