diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-01-30 14:55:50 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-02-06 08:46:39 +0100 |
commit | c98b43f5a081bdb849c4bca6565c3189e5f0466c (patch) | |
tree | 8d6b663715821cf799a68f1043a414c791530e68 /arch/arm | |
parent | 1ebee1e97ad43b4419e42d778d82059933405668 (diff) | |
download | barebox-c98b43f5a081bdb849c4bca6565c3189e5f0466c.tar.gz barebox-c98b43f5a081bdb849c4bca6565c3189e5f0466c.tar.xz |
mci: imx-esdhc: use dev_id
Avoid using cpu_is_* macros and use a dev_id instead. This will make it
easier to integrate the driver into another architecture.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-imx/devices.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-imx/include/mach/devices-imx25.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/include/mach/devices-imx35.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/include/mach/devices-imx50.h | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/include/mach/devices-imx51.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/include/mach/devices-imx53.h | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/include/mach/devices-imx6.h | 20 | ||||
-rw-r--r-- | arch/arm/mach-imx/include/mach/devices.h | 3 |
8 files changed, 25 insertions, 39 deletions
diff --git a/arch/arm/mach-imx/devices.c b/arch/arm/mach-imx/devices.c index 11444ef1a6..a0609e282a 100644 --- a/arch/arm/mach-imx/devices.c +++ b/arch/arm/mach-imx/devices.c @@ -68,9 +68,14 @@ struct device_d *imx_add_mmc(void *base, int id, void *pdata) return imx_add_device("imx-mmc", id, base, 0x1000, pdata); } -struct device_d *imx_add_esdhc(void *base, int id, struct esdhc_platform_data *pdata) +struct device_d *imx_add_esdhc_imx25(void *base, int id, struct esdhc_platform_data *pdata) { - return imx_add_device("imx-esdhc", id, base, 0x1000, pdata); + return imx_add_device("imx25-esdhc", id, base, 0x1000, pdata); +} + +struct device_d *imx_add_esdhc_imx5(void *base, int id, struct esdhc_platform_data *pdata) +{ + return imx_add_device("imx5-esdhc", id, base, 0x1000, pdata); } struct device_d *imx_add_kpp(void *base, struct matrix_keymap_data *pdata) diff --git a/arch/arm/mach-imx/include/mach/devices-imx25.h b/arch/arm/mach-imx/include/mach/devices-imx25.h index eea8a60d78..7779a02be1 100644 --- a/arch/arm/mach-imx/include/mach/devices-imx25.h +++ b/arch/arm/mach-imx/include/mach/devices-imx25.h @@ -74,10 +74,10 @@ static inline struct device_d *imx25_add_fec(struct fec_platform_data *pdata) static inline struct device_d *imx25_add_mmc0(struct esdhc_platform_data *pdata) { - return imx_add_esdhc((void *)MX25_ESDHC1_BASE_ADDR, 0, pdata); + return imx_add_esdhc_imx25((void *)MX25_ESDHC1_BASE_ADDR, 0, pdata); } static inline struct device_d *imx25_add_mmc1(struct esdhc_platform_data *pdata) { - return imx_add_esdhc((void *)MX25_ESDHC2_BASE_ADDR, 1, pdata); + return imx_add_esdhc_imx25((void *)MX25_ESDHC2_BASE_ADDR, 1, pdata); } diff --git a/arch/arm/mach-imx/include/mach/devices-imx35.h b/arch/arm/mach-imx/include/mach/devices-imx35.h index 3e53167901..922bb589c6 100644 --- a/arch/arm/mach-imx/include/mach/devices-imx35.h +++ b/arch/arm/mach-imx/include/mach/devices-imx35.h @@ -59,15 +59,15 @@ static inline struct device_d *imx35_add_fec(struct fec_platform_data *pdata) static inline struct device_d *imx35_add_mmc0(struct esdhc_platform_data *pdata) { - return imx_add_esdhc((void *)MX35_ESDHC1_BASE_ADDR, 0, pdata); + return imx_add_esdhc_imx25((void *)MX35_ESDHC1_BASE_ADDR, 0, pdata); } static inline struct device_d *imx35_add_mmc1(struct esdhc_platform_data *pdata) { - return imx_add_esdhc((void *)MX35_ESDHC2_BASE_ADDR, 1, pdata); + return imx_add_esdhc_imx25((void *)MX35_ESDHC2_BASE_ADDR, 1, pdata); } static inline struct device_d *imx35_add_mmc2(struct esdhc_platform_data *pdata) { - return imx_add_esdhc((void *)MX35_ESDHC3_BASE_ADDR, 2, pdata); + return imx_add_esdhc_imx25((void *)MX35_ESDHC3_BASE_ADDR, 2, pdata); } diff --git a/arch/arm/mach-imx/include/mach/devices-imx50.h b/arch/arm/mach-imx/include/mach/devices-imx50.h index 9e0eaa8cbb..7e5141a107 100644 --- a/arch/arm/mach-imx/include/mach/devices-imx50.h +++ b/arch/arm/mach-imx/include/mach/devices-imx50.h @@ -59,22 +59,22 @@ static inline struct device_d *imx50_add_fec(struct fec_platform_data *pdata) static inline struct device_d *imx50_add_mmc0(struct esdhc_platform_data *pdata) { - return imx_add_esdhc((void *)MX50_ESDHC1_BASE_ADDR, 0, pdata); + return imx5_add_esdhc((void *)MX50_ESDHC1_BASE_ADDR, 0, pdata); } static inline struct device_d *imx50_add_mmc1(struct esdhc_platform_data *pdata) { - return imx_add_esdhc((void *)MX50_ESDHC2_BASE_ADDR, 1, pdata); + return imx5_add_esdhc((void *)MX50_ESDHC2_BASE_ADDR, 1, pdata); } static inline struct device_d *imx50_add_mmc2(struct esdhc_platform_data *pdata) { - return imx_add_esdhc((void *)MX50_ESDHC3_BASE_ADDR, 2, pdata); + return imx5_add_esdhc((void *)MX50_ESDHC3_BASE_ADDR, 2, pdata); } static inline struct device_d *imx50_add_mmc3(struct esdhc_platform_data *pdata) { - return imx_add_esdhc((void *)MX50_ESDHC4_BASE_ADDR, 3, pdata); + return imx5_add_esdhc((void *)MX50_ESDHC4_BASE_ADDR, 3, pdata); } static inline struct device_d *imx50_add_kpp(struct matrix_keymap_data *pdata) diff --git a/arch/arm/mach-imx/include/mach/devices-imx51.h b/arch/arm/mach-imx/include/mach/devices-imx51.h index 66fe643f82..5a968a3000 100644 --- a/arch/arm/mach-imx/include/mach/devices-imx51.h +++ b/arch/arm/mach-imx/include/mach/devices-imx51.h @@ -50,17 +50,17 @@ static inline struct device_d *imx51_add_fec(struct fec_platform_data *pdata) static inline struct device_d *imx51_add_mmc0(struct esdhc_platform_data *pdata) { - return imx_add_esdhc((void *)MX51_MMC_SDHC1_BASE_ADDR, 0, pdata); + return imx_add_esdhc_imx5((void *)MX51_MMC_SDHC1_BASE_ADDR, 0, pdata); } static inline struct device_d *imx51_add_mmc1(struct esdhc_platform_data *pdata) { - return imx_add_esdhc((void *)MX51_MMC_SDHC2_BASE_ADDR, 1, pdata); + return imx_add_esdhc_imx5((void *)MX51_MMC_SDHC2_BASE_ADDR, 1, pdata); } static inline struct device_d *imx51_add_mmc2(struct esdhc_platform_data *pdata) { - return imx_add_esdhc((void *)MX51_MMC_SDHC3_BASE_ADDR, 2, pdata); + return imx_add_esdhc_imx5((void *)MX51_MMC_SDHC3_BASE_ADDR, 2, pdata); } static inline struct device_d *imx51_add_nand(struct imx_nand_platform_data *pdata) diff --git a/arch/arm/mach-imx/include/mach/devices-imx53.h b/arch/arm/mach-imx/include/mach/devices-imx53.h index 27200a26d0..e5c257a40b 100644 --- a/arch/arm/mach-imx/include/mach/devices-imx53.h +++ b/arch/arm/mach-imx/include/mach/devices-imx53.h @@ -59,22 +59,22 @@ static inline struct device_d *imx53_add_fec(struct fec_platform_data *pdata) static inline struct device_d *imx53_add_mmc0(struct esdhc_platform_data *pdata) { - return imx_add_esdhc((void *)MX53_ESDHC1_BASE_ADDR, 0, pdata); + return imx_add_esdhc_imx5((void *)MX53_ESDHC1_BASE_ADDR, 0, pdata); } static inline struct device_d *imx53_add_mmc1(struct esdhc_platform_data *pdata) { - return imx_add_esdhc((void *)MX53_ESDHC2_BASE_ADDR, 1, pdata); + return imx_add_esdhc_imx5((void *)MX53_ESDHC2_BASE_ADDR, 1, pdata); } static inline struct device_d *imx53_add_mmc2(struct esdhc_platform_data *pdata) { - return imx_add_esdhc((void *)MX53_ESDHC3_BASE_ADDR, 2, pdata); + return imx_add_esdhc_imx5((void *)MX53_ESDHC3_BASE_ADDR, 2, pdata); } static inline struct device_d *imx53_add_mmc3(struct esdhc_platform_data *pdata) { - return imx_add_esdhc((void *)MX53_ESDHC4_BASE_ADDR, 3, pdata); + return imx_add_esdhc_imx5((void *)MX53_ESDHC4_BASE_ADDR, 3, pdata); } static inline struct device_d *imx53_add_nand(struct imx_nand_platform_data *pdata) diff --git a/arch/arm/mach-imx/include/mach/devices-imx6.h b/arch/arm/mach-imx/include/mach/devices-imx6.h index 3a1bfb6a86..9471f57909 100644 --- a/arch/arm/mach-imx/include/mach/devices-imx6.h +++ b/arch/arm/mach-imx/include/mach/devices-imx6.h @@ -21,26 +21,6 @@ static inline struct device_d *imx6_add_uart3(void) return imx_add_uart_imx21((void *)MX6_UART4_BASE_ADDR, 3); } -static inline struct device_d *imx6_add_mmc0(struct esdhc_platform_data *pdata) -{ - return imx_add_esdhc((void *)MX6_USDHC1_BASE_ADDR, 0, pdata); -} - -static inline struct device_d *imx6_add_mmc1(struct esdhc_platform_data *pdata) -{ - return imx_add_esdhc((void *)MX6_USDHC2_BASE_ADDR, 1, pdata); -} - -static inline struct device_d *imx6_add_mmc2(struct esdhc_platform_data *pdata) -{ - return imx_add_esdhc((void *)MX6_USDHC3_BASE_ADDR, 2, pdata); -} - -static inline struct device_d *imx6_add_mmc3(struct esdhc_platform_data *pdata) -{ - return imx_add_esdhc((void *)MX6_USDHC4_BASE_ADDR, 3, pdata); -} - static inline struct device_d *imx6_add_fec(struct fec_platform_data *pdata) { return imx_add_fec_imx6((void *)MX6_ENET_BASE_ADDR, pdata); diff --git a/arch/arm/mach-imx/include/mach/devices.h b/arch/arm/mach-imx/include/mach/devices.h index 6a045dd070..b0e1fd1f3c 100644 --- a/arch/arm/mach-imx/include/mach/devices.h +++ b/arch/arm/mach-imx/include/mach/devices.h @@ -21,7 +21,8 @@ struct device_d *imx_add_nand(void *base, struct imx_nand_platform_data *pdata); struct device_d *imx_add_fb(void *base, struct imx_fb_platform_data *pdata); struct device_d *imx_add_ipufb(void *base, struct imx_ipu_fb_platform_data *pdata); struct device_d *imx_add_mmc(void *base, int id, void *pdata); -struct device_d *imx_add_esdhc(void *base, int id, struct esdhc_platform_data *pdata); +struct device_d *imx_add_esdhc_imx25(void *base, int id, struct esdhc_platform_data *pdata); +struct device_d *imx_add_esdhc_imx5(void *base, int id, struct esdhc_platform_data *pdata); struct device_d *imx_add_kpp(void *base, struct matrix_keymap_data *pdata); struct device_d *imx_add_pata(void *base); struct device_d *imx_add_usb(void *base, int id, struct imxusb_platformdata *pdata); |