
On Thu, Feb 19, 2009 at 9:45 AM, Anton Vorontsov avorontsov@ru.mvista.com wrote:
This patch implements fdt_fixup_esdhc() function that is used to fixup the device tree.
The function adds status = "disabled" propery if esdhc pins muxed away, otherwise it fixups clock-frequency for esdhc nodes.
Signed-off-by: Anton Vorontsov avorontsov@ru.mvista.com
drivers/mmc/fsl_esdhc.c | 22 ++++++++++++++++++++++ include/fsl_esdhc.h | 8 ++++++++ 2 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index 0ba45cd..fe8bd86 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -33,6 +33,8 @@ #include <malloc.h> #include <mmc.h> #include <fsl_esdhc.h> +#include <fsl_can_use.h> +#include <fdt_support.h> #include <asm/io.h>
@@ -346,3 +348,23 @@ int fsl_esdhc_mmc_init(bd_t *bis) { return esdhc_initialize(bis); }
+#ifdef CONFIG_MPC85xx +#define ESDHC_COMPATIBLE "fsl,mpc8536-esdhc" +#else +#define ESDHC_COMPATIBLE "fsl,mpc8379-esdhc" +#endif
Isn't there a more global means of doing this? I don't like having the 8536/8379 in the driver, itself. Actually, there is. Move these to the config file. But there should be a compatible property that works for all esdhc devices.
Andy