diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-02-13 20:31:48 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-02-13 20:31:48 +0100 |
commit | d4b0698608db00fe3d75dc2c204617a5d7eae3cb (patch) | |
tree | 430b1160ee451ee0e9dc82720442b632cc798cbb /arch/arm | |
parent | 2a17e75a976d11c1712972d29813094b8020ac35 (diff) | |
parent | 15b64fd520c20c51f4fe1388c149b661c4fb7073 (diff) | |
download | barebox-d4b0698608db00fe3d75dc2c204617a5d7eae3cb.tar.gz barebox-d4b0698608db00fe3d75dc2c204617a5d7eae3cb.tar.xz |
Merge branch 'for-next/mmc-esdhc'
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 | 5 | ||||
-rw-r--r-- | arch/arm/mach-imx/include/mach/esdhc.h | 48 |
9 files changed, 26 insertions, 88 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..4754b92a6f 100644 --- a/arch/arm/mach-imx/include/mach/devices.h +++ b/arch/arm/mach-imx/include/mach/devices.h @@ -6,7 +6,7 @@ #include <mach/imx-nand.h> #include <mach/imxfb.h> #include <mach/imx-ipu-fb.h> -#include <mach/esdhc.h> +#include <platform_data/mmc-esdhc-imx.h> #include <usb/chipidea-imx.h> struct device_d *imx_add_fec_imx27(void *base, struct fec_platform_data *pdata); @@ -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); diff --git a/arch/arm/mach-imx/include/mach/esdhc.h b/arch/arm/mach-imx/include/mach/esdhc.h deleted file mode 100644 index fb7380a182..0000000000 --- a/arch/arm/mach-imx/include/mach/esdhc.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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 - -enum wp_types { - ESDHC_WP_NONE, /* no WP, neither controller nor gpio */ - ESDHC_WP_CONTROLLER, /* mmc controller internal WP */ - ESDHC_WP_GPIO, /* external gpio pin for WP */ -}; - -enum cd_types { - ESDHC_CD_NONE, /* no CD, neither controller nor gpio */ - ESDHC_CD_CONTROLLER, /* mmc controller internal CD */ - ESDHC_CD_GPIO, /* external gpio pin for CD */ - ESDHC_CD_PERMANENT, /* no CD, card permanently wired to host */ -}; - -/** - * struct esdhc_platform_data - platform data for esdhc on i.MX - * - * ESDHC_WP(CD)_CONTROLLER type is not available on i.MX25/35. - * - * @wp_gpio: gpio for write_protect - * @cd_gpio: gpio for card_detect interrupt - * @wp_type: type of write_protect method (see wp_types enum above) - * @cd_type: type of card_detect method (see cd_types enum above) - * @caps: supported bus width capabilities (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA) - */ - -struct esdhc_platform_data { - unsigned int wp_gpio; - unsigned int cd_gpio; - enum wp_types wp_type; - enum cd_types cd_type; - unsigned caps; - char *devname; - unsigned dsr_val; - int use_dsr; -}; -#endif /* __ASM_ARCH_IMX_ESDHC_H */ |