Loading arch/arm/plat-mxc/devices/Kconfig +3 −0 Original line number Diff line number Diff line config IMX_HAVE_PLATFORM_ESDHC bool config IMX_HAVE_PLATFORM_FLEXCAN select HAVE_CAN_FLEXCAN bool Loading arch/arm/plat-mxc/devices/Makefile +1 −0 Original line number Diff line number Diff line obj-$(CONFIG_IMX_HAVE_PLATFORM_ESDHC) += platform-esdhc.o obj-$(CONFIG_IMX_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o Loading arch/arm/plat-mxc/devices/platform-esdhc.c 0 → 100644 +31 −0 Original line number Diff line number Diff line /* * Copyright (C) 2010 Pengutronix, Wolfram Sang <w.sang@pengutronix.de> * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2 as published by the * Free Software Foundation. */ #include <mach/devices-common.h> #include <mach/esdhc.h> struct platform_device *__init imx_add_esdhc(int id, resource_size_t iobase, resource_size_t iosize, resource_size_t irq, const struct esdhc_platform_data *pdata) { struct resource res[] = { { .start = iobase, .end = iobase + iosize - 1, .flags = IORESOURCE_MEM, }, { .start = irq, .end = irq, .flags = IORESOURCE_IRQ, }, }; return imx_add_platform_device("sdhci-esdhc-imx", id, res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); } arch/arm/plat-mxc/include/mach/devices-common.h +6 −0 Original line number Diff line number Diff line Loading @@ -97,3 +97,9 @@ struct imx_spi_imx_data { struct platform_device *__init imx_add_spi_imx( const struct imx_spi_imx_data *data, const struct spi_imx_master *pdata); #include <mach/esdhc.h> struct platform_device *__init imx_add_esdhc(int id, resource_size_t iobase, resource_size_t iosize, resource_size_t irq, const struct esdhc_platform_data *pdata); arch/arm/plat-mxc/include/mach/esdhc.h 0 → 100644 +16 −0 Original line number Diff line number Diff line /* * Copyright 2010 Wolfram Sang <w.sang@pengutronix.de> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. */ #ifndef __ASM_ARCH_IMX_ESDHC_H #define __ASM_ARCH_IMX_ESDHC_H struct esdhc_platform_data { unsigned int wp_gpio; /* write protect pin */ }; #endif /* __ASM_ARCH_IMX_ESDHC_H */ Loading
arch/arm/plat-mxc/devices/Kconfig +3 −0 Original line number Diff line number Diff line config IMX_HAVE_PLATFORM_ESDHC bool config IMX_HAVE_PLATFORM_FLEXCAN select HAVE_CAN_FLEXCAN bool Loading
arch/arm/plat-mxc/devices/Makefile +1 −0 Original line number Diff line number Diff line obj-$(CONFIG_IMX_HAVE_PLATFORM_ESDHC) += platform-esdhc.o obj-$(CONFIG_IMX_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o Loading
arch/arm/plat-mxc/devices/platform-esdhc.c 0 → 100644 +31 −0 Original line number Diff line number Diff line /* * Copyright (C) 2010 Pengutronix, Wolfram Sang <w.sang@pengutronix.de> * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2 as published by the * Free Software Foundation. */ #include <mach/devices-common.h> #include <mach/esdhc.h> struct platform_device *__init imx_add_esdhc(int id, resource_size_t iobase, resource_size_t iosize, resource_size_t irq, const struct esdhc_platform_data *pdata) { struct resource res[] = { { .start = iobase, .end = iobase + iosize - 1, .flags = IORESOURCE_MEM, }, { .start = irq, .end = irq, .flags = IORESOURCE_IRQ, }, }; return imx_add_platform_device("sdhci-esdhc-imx", id, res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); }
arch/arm/plat-mxc/include/mach/devices-common.h +6 −0 Original line number Diff line number Diff line Loading @@ -97,3 +97,9 @@ struct imx_spi_imx_data { struct platform_device *__init imx_add_spi_imx( const struct imx_spi_imx_data *data, const struct spi_imx_master *pdata); #include <mach/esdhc.h> struct platform_device *__init imx_add_esdhc(int id, resource_size_t iobase, resource_size_t iosize, resource_size_t irq, const struct esdhc_platform_data *pdata);
arch/arm/plat-mxc/include/mach/esdhc.h 0 → 100644 +16 −0 Original line number Diff line number Diff line /* * Copyright 2010 Wolfram Sang <w.sang@pengutronix.de> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. */ #ifndef __ASM_ARCH_IMX_ESDHC_H #define __ASM_ARCH_IMX_ESDHC_H struct esdhc_platform_data { unsigned int wp_gpio; /* write protect pin */ }; #endif /* __ASM_ARCH_IMX_ESDHC_H */