add the GPMI-NAND support for imx23/imx28
Subsystems (5)
v8 cover add the GPMI-NAND support for imx23/imx28
The patch set is based on tag v3.1-rc2 of linus's tree. and it can be git-am to Artem's tree:
http://git.infradead.org/users/dedekind/l2-mtd-2.6.git
The general-purpose media interface(GPMI) controller is a flexible interface to up to several NAND flashs.
The Bose Ray-Choudhury Hocquenghem(BCH) module is a hardware ECC accelerator.
With the help of BCH, the GPMI controller can choose to do the hardware ECC or not.
v7 --> v8:
[0] add header file to fix compiling error.
v6 --> v7:
[0] rename RES_SIZE to GPMI_NAND_RES_SIZE.
[1] move gpmi-nand.h to include/linux/mtd/ directory.
[2] remove comment for new pad control.
[3] others
v5 --> v6:
[0] rename `gpmi-nfc` to `gpmi-nand`.
[1] remove ->exit() in structure gpmi_nand_platform_data{}.
[2] drop the macros for the resource's definition of gpmi-nand.
[3] add a new pad control `MXS_PAD_CTRL_12MA`.
[4] others.v4 --> v5:
[0] split out the mach code and the machine code.
v3 --> v4:
merge the GPMI-NFC device code to the new branch.
Huang Shijie (4):
ARM: mxs: add GPMI-NAND support for imx23/imx28
ARM: mxs: add new a pad control
ARM: mxs/mx23evk: add GPMI-NAND device
ARM: mxs/mx28evk: add GPMI-NAND device
arch/arm/mach-mxs/Kconfig | 2 + arch/arm/mach-mxs/clock-mx23.c | 1 + arch/arm/mach-mxs/clock-mx28.c | 1 + arch/arm/mach-mxs/devices-mx23.h | 4 + arch/arm/mach-mxs/devices-mx28.h | 4 + arch/arm/mach-mxs/devices/Kconfig | 3 + arch/arm/mach-mxs/devices/Makefile | 1 + arch/arm/mach-mxs/devices/platform-gpmi-nand.c | 109 +++++++++++++++++++++++ arch/arm/mach-mxs/include/mach/devices-common.h | 10 ++ arch/arm/mach-mxs/include/mach/iomux.h | 1 + arch/arm/mach-mxs/mach-mx23evk.c | 36 ++++++++ arch/arm/mach-mxs/mach-mx28evk.c | 36 ++++++++ include/linux/mtd/gpmi-nand.h | 68 ++++++++++++++ 13 files changed, 276 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-mxs/devices/platform-gpmi-nand.c create mode 100644 include/linux/mtd/gpmi-nand.h
PATCH v8 1/4 ARM: mxs: add GPMI-NAND support for imx23/imx28
add GPMI-NAND support for imx23 and imx28.
--- arch/arm/mach-mxs/clock-mx23.c | 1 + arch/arm/mach-mxs/clock-mx28.c | 1 + arch/arm/mach-mxs/devices-mx23.h | 4 + arch/arm/mach-mxs/devices-mx28.h | 4 + arch/arm/mach-mxs/devices/Kconfig | 3 + arch/arm/mach-mxs/devices/Makefile | 1 + arch/arm/mach-mxs/devices/platform-gpmi-nand.c | 109 +++++++++++++++++++++++ arch/arm/mach-mxs/include/mach/devices-common.h | 10 ++ include/linux/mtd/gpmi-nand.h | 68 ++++++++++++++ 9 files changed, 201 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-mxs/devices/platform-gpmi-nand.c create mode 100644 include/linux/mtd/gpmi-nand.h
arch/arm/mach-mxs/clock-mx23.c +1 -0
@@ -456,6 +456,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("mxs-pwm.3", NULL, pwm_clk) _REGISTER_CLOCK("mxs-pwm.4", NULL, pwm_clk) _REGISTER_CLOCK("imx23-fb", NULL, lcdif_clk) + _REGISTER_CLOCK("imx23-gpmi-nand", NULL, gpmi_clk) };static int clk_misc_init (void )
arch/arm/mach-mxs/clock-mx28.c +1 -0
@@ -614,6 +614,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("duart", NULL, uart_clk) _REGISTER_CLOCK("imx28-fec.0", NULL, fec_clk) _REGISTER_CLOCK("imx28-fec.1", NULL, fec_clk) + _REGISTER_CLOCK("imx28-gpmi-nand", NULL, gpmi_clk) _REGISTER_CLOCK("mxs-auart.0", NULL, uart_clk) _REGISTER_CLOCK("mxs-auart.1", NULL, uart_clk)_REGISTER_CLOCK ("mxs-auart.2" ,NULL , uart_clk)
arch/arm/mach-mxs/devices-mx23.h +4 -0
@@ -21,6 +21,10 @@ extern const struct mxs_auart_data mx23_auart_data[] __initconst;#define mx23_add_auart0 () mx23_add_auart(0)#define mx23_add_auart1 () mx23_add_auart(1) +extern const struct mxs_gpmi_nand_data mx23_gpmi_nand_data__initconst ; +#define mx23_add_gpmi_nand (pdata) \ + mxs_add_gpmi_nand(pdata, &mx23_gpmi_nand_data) +extern const struct mxs_mxs_mmc_data mx23_mxs_mmc_data[]__initconst ;#define mx23_add_mxs_mmc (id, pdata) \ mxs_add_mxs_mmc(&mx23_mxs_mmc_data[id], pdata)
arch/arm/mach-mxs/devices-mx28.h +4 -0
@@ -34,6 +34,10 @@ extern const struct mxs_flexcan_data mx28_flexcan_data[] __initconst;#define mx28_add_flexcan0 (pdata) mx28_add_flexcan(0, pdata)#define mx28_add_flexcan1 (pdata) mx28_add_flexcan(1, pdata) +extern const struct mxs_gpmi_nand_data mx28_gpmi_nand_data__initconst ; +#define mx28_add_gpmi_nand (pdata) \ + mxs_add_gpmi_nand(pdata, &mx28_gpmi_nand_data) +extern const struct mxs_mxs_i2c_data mx28_mxs_i2c_data[]__initconst ;#define mx28_add_mxs_i2c (id) mxs_add_mxs_i2c(&mx28_mxs_i2c_data[id])
arch/arm/mach-mxs/devices/Kconfig +3 -0
@@ -12,6 +12,9 @@ config MXS_HAVE_PLATFORM_FLEXCAN select HAVE_CAN_FLEXCAN if CAN bool +config MXS_HAVE_PLATFORM_GPMI_NAND + bool + config MXS_HAVE_PLATFORM_MXS_I2C bool
arch/arm/mach-mxs/devices/Makefile +1 -0
@@ -3,6 +3,7 @@ obj-$(CONFIG_MXS_HAVE_PLATFORM_AUART) += platform-auart.o obj-y += platform-dma.o obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o obj-$(CONFIG_MXS_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o +obj-$(CONFIG_MXS_HAVE_PLATFORM_GPMI_NAND) += platform-gpmi-nand.o obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_I2C) += platform-mxs-i2c.o obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_MMC) += platform-mxs-mmc.o obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_PWM) += platform-mxs-pwm.o
arch/arm/mach-mxs/devices/platform-gpmi-nand.c new file +109 -0
109 lines not on this page · raw message
arch/arm/mach-mxs/include/mach/devices-common.h +10 -0
@@ -66,6 +66,16 @@ struct platform_device *__init mxs_add_flexcan(const struct mxs_flexcan_data *data, const struct flexcan_platform_data *pdata); +/* gpmi-nand */ +#include <linux/mtd/gpmi-nand.h> +struct mxs_gpmi_nand_data { +const char *devid; +const struct resource res[GPMI_NAND_RES_SIZE ]; +}; +struct platform_device *__init +mxs_add_gpmi_nand (const struct gpmi_nand_platform_data *pdata, +const struct mxs_gpmi_nand_data *data); +/* i2c */ struct mxs_mxs_i2c_data {int id;
include/linux/mtd/gpmi-nand.h new file +68 -0
68 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH v8 2/4 ARM: mxs: add new a pad control
In reply to Huang Shijieadd a new pad control which is used in some rare cases, such as gpmi-nand device.
--- arch/arm/mach-mxs/include/mach/iomux.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-mxs/include/mach/iomux.h +1 -0
@@ -93,6 +93,7 @@ typedef u32 iomux_cfg_t;/* generic pad control used in most cases */ #define MXS_PAD_CTRL (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL) +#define MXS_PAD_CTRL_12MA (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL)#define MXS_IOMUX_PAD (_bank, _pin, _muxsel, _ma, _vol, _pull) \ (((iomux_cfg_t)(_bank) << MXS_PAD_BANK_SHIFT) | \
Signature · 1 line
1.7.0.4
PATCH v8 3/4 ARM: mxs/mx23evk: add GPMI-NAND device
In reply to Huang Shijieadd the GPMI-NAND device for mx23evk board.
--- arch/arm/mach-mxs/Kconfig | 1 + arch/arm/mach-mxs/mach-mx23evk.c | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 0 deletions(-)
arch/arm/mach-mxs/Kconfig +1 -0
@@ -32,6 +32,7 @@ config MACH_MX23EVK select SOC_IMX23 select MXS_HAVE_AMBA_DUART select MXS_HAVE_PLATFORM_AUART + select MXS_HAVE_PLATFORM_GPMI_NAND select MXS_HAVE_PLATFORM_MXS_MMC select MXS_HAVE_PLATFORM_MXSFB help
arch/arm/mach-mxs/mach-mx23evk.c +36 -0
@@ -107,6 +107,41 @@ static const iomux_cfg_t mx23evk_pads[] __initconst = { (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), }; +/* gpmi-nand */ +static iomux_cfg_t mx23evk_gpmi_nand_pads[] = { +MX23_PAD_GPMI_D00__GPMI_D00 |MXS_PAD_CTRL , +MX23_PAD_GPMI_D01__GPMI_D01 |MXS_PAD_CTRL , +MX23_PAD_GPMI_D02__GPMI_D02 |MXS_PAD_CTRL , +MX23_PAD_GPMI_D03__GPMI_D03 |MXS_PAD_CTRL , +MX23_PAD_GPMI_D04__GPMI_D04 |MXS_PAD_CTRL , +MX23_PAD_GPMI_D05__GPMI_D05 |MXS_PAD_CTRL , +MX23_PAD_GPMI_D06__GPMI_D06 |MXS_PAD_CTRL , +MX23_PAD_GPMI_D07__GPMI_D07 |MXS_PAD_CTRL , +MX23_PAD_GPMI_CLE__GPMI_CLE |MXS_PAD_CTRL , +MX23_PAD_GPMI_ALE__GPMI_ALE |MXS_PAD_CTRL , +MX23_PAD_GPMI_WPN__GPMI_WPN |MXS_PAD_CTRL_12MA , +MX23_PAD_GPMI_WRN__GPMI_WRN |MXS_PAD_CTRL_12MA , +MX23_PAD_GPMI_RDN__GPMI_RDN |MXS_PAD_CTRL_12MA , +MX23_PAD_GPMI_RDY0__GPMI_RDY0 |MXS_PAD_CTRL , +MX23_PAD_GPMI_RDY1__GPMI_RDY1 |MXS_PAD_CTRL , +MX23_PAD_GPMI_CE0N__GPMI_CE0N |MXS_PAD_CTRL , +MX23_PAD_GPMI_CE1N__GPMI_CE1N |MXS_PAD_CTRL , +}; + +static int mx23evk_gpmi_nand_platform_init (void ) +{ +return mxs_iomux_setup_multiple_pads (mx23evk_gpmi_nand_pads, +ARRAY_SIZE (mx23evk_gpmi_nand_pads)); +} + +static const +struct gpmi_nand_platform_data mx23evk_gpmi_nand_data__initconst = { + .platform_init = mx23evk_gpmi_nand_platform_init, + .min_prop_delay_in_ns =5 , + .max_prop_delay_in_ns =9 , + .max_chip_count =1 , +}; +/* mxsfb (lcdif) */ static struct fb_videomode mx23evk_video_modes[] = { {
@@ -166,6 +201,7 @@ static void __init mx23evk_init(void)else gpio_set_value (MX23EVK_BL_ENABLE ,1 ); +mx23_add_gpmi_nand (&mx23evk_gpmi_nand_data);mx23_add_mxsfb (&mx23evk_mxsfb_pdata); }
Signature · 1 line
1.7.0.4
PATCH v8 4/4 ARM: mxs/mx28evk: add GPMI-NAND device
In reply to Huang Shijieadd GPMI-NAND device for mx28evk board.
--- arch/arm/mach-mxs/Kconfig | 1 + arch/arm/mach-mxs/mach-mx28evk.c | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 0 deletions(-)
arch/arm/mach-mxs/Kconfig +1 -0
@@ -47,6 +47,7 @@ config MACH_MX28EVK select MXS_HAVE_PLATFORM_AUART select MXS_HAVE_PLATFORM_FEC select MXS_HAVE_PLATFORM_FLEXCAN + select MXS_HAVE_PLATFORM_GPMI_NAND select MXS_HAVE_PLATFORM_MXS_MMC select MXS_HAVE_PLATFORM_MXSFB select MXS_OCOTP
arch/arm/mach-mxs/mach-mx28evk.c +36 -0
@@ -314,6 +314,41 @@ static const struct flexcan_platform_data } }; +/* gpmi-nand */ +static iomux_cfg_t mx28evk_gpmi_nand_pads[] = { +MX28_PAD_GPMI_D00__GPMI_D0 |MXS_PAD_CTRL , +MX28_PAD_GPMI_D01__GPMI_D1 |MXS_PAD_CTRL , +MX28_PAD_GPMI_D02__GPMI_D2 |MXS_PAD_CTRL , +MX28_PAD_GPMI_D03__GPMI_D3 |MXS_PAD_CTRL , +MX28_PAD_GPMI_D04__GPMI_D4 |MXS_PAD_CTRL , +MX28_PAD_GPMI_D05__GPMI_D5 |MXS_PAD_CTRL , +MX28_PAD_GPMI_D06__GPMI_D6 |MXS_PAD_CTRL , +MX28_PAD_GPMI_D07__GPMI_D7 |MXS_PAD_CTRL , +MX28_PAD_GPMI_ALE__GPMI_ALE |MXS_PAD_CTRL , +MX28_PAD_GPMI_CLE__GPMI_CLE |MXS_PAD_CTRL , +MX28_PAD_GPMI_CE0N__GPMI_CE0N |MXS_PAD_CTRL , +MX28_PAD_GPMI_CE1N__GPMI_CE1N |MXS_PAD_CTRL , +MX28_PAD_GPMI_RDY0__GPMI_READY0 |MXS_PAD_CTRL , +MX28_PAD_GPMI_RDY1__GPMI_READY1 |MXS_PAD_CTRL , +MX28_PAD_GPMI_RDN__GPMI_RDN |MXS_PAD_CTRL_12MA , +MX28_PAD_GPMI_WRN__GPMI_WRN |MXS_PAD_CTRL_12MA , +MX28_PAD_GPMI_RESETN__GPMI_RESETN |MXS_PAD_CTRL_12MA , +}; + +static int mx28evk_gpmi_nand_platform_init (void ) +{ +return mxs_iomux_setup_multiple_pads (mx28evk_gpmi_nand_pads, +ARRAY_SIZE (mx28evk_gpmi_nand_pads)); +} + +static const struct gpmi_nand_platform_data +mx28evk_gpmi_nand_data__initconst = { + .platform_init = mx28evk_gpmi_nand_platform_init, + .min_prop_delay_in_ns =5 , + .max_prop_delay_in_ns =9 , + .max_chip_count =1 , +}; +/* mxsfb (lcdif) */ static struct fb_videomode mx28evk_video_modes[] = { {
@@ -390,6 +425,7 @@ static void __init mx28evk_init(void)else gpio_set_value (MX28EVK_BL_ENABLE ,1 ); +mx28_add_gpmi_nand (&mx28evk_gpmi_nand_data);mx28_add_mxsfb (&mx28evk_mxsfb_pdata);/* power on mmc slot by writing 0 to the gpio */
Signature · 1 line
1.7.0.4
Fabio Estevam
reviewerPATCH v8 4/4 ARM: mxs/mx28evk: add GPMI-NAND device
Hi Shawn,
Quoted 3 lines · Huang Shijie
add GPMI-NAND device for mx28evk board.
Signed-off-by Huang Shijie <[email protected]>
Can this one be applied now?
Fabio Estevam
reviewerPATCH v8 4/4 ARM: mxs/mx28evk: add GPMI-NAND device
Quoted 8 lines · Fabio Estevam
Hi Shawn,
Quoted 3 lines · Huang Shijie
add GPMI-NAND device for mx28evk board.
Signed-off-by Huang Shijie <[email protected]>Can this one be applied now?
Adding Shawn.
PATCH v8 4/4 ARM: mxs/mx28evk: add GPMI-NAND device
In reply to Fabio EstevamQuoted 9 lines · Fabio Estevam
Hi Shawn,
Quoted 3 lines · Huang Shijie
add GPMI-NAND device for mx28evk board.
Signed-off-by Huang Shijie <[email protected]>Can this one be applied now?
No.
1) The pin confliction between gpmi and lcdif remains.
2) I intend to freeze the board file updates, as we are on the way to device tree.
So instead of patching board file, please contribute to device tree conversion.
Signature · 2 lines
Regards, Shawn
Fabio Estevam
reviewerPATCH v8 4/4 ARM: mxs/mx28evk: add GPMI-NAND device
Quoted 8 lines · Shawn Guo
No.
1) The pin confliction between gpmi and lcdif remains.
2) I intend to freeze the board file updates, as we are on the way to ? device tree.So instead of patching board file, please contribute to device tree conversion.
I don't see mx28 dts support in mainline yet.
Does it mean my spi patches will not be accepted as well?
PATCH v8 4/4 ARM: mxs/mx28evk: add GPMI-NAND device
Quoted 4 lines · Fabio Estevam
Quoted 2 lines · Shawn Guo
No.
Quoted 9 lines
Quoted 6 lines
1) The pin confliction between gpmi and lcdif remains.
2) I intend to freeze the board file updates, as we are on the way to device tree.So instead of patching board file, please contribute to device tree conversion.
I don't see mx28 dts support in mainline yet.
I will be soon on arm-soc and in turn linux-next.
Quoted 1 line
Does it mean my spi patches will not be accepted as well?
Yes and sorry.
Signature · 2 lines
Regards, Shawn
Fabio Estevam
reviewerPATCH v8 4/4 ARM: mxs/mx28evk: add GPMI-NAND device
Quoted 3 lines · Shawn Guo
Quoted 2 lines
I don't see mx28 dts support in mainline yet.
I will be soon on arm-soc and in turn linux-next.
I will be glad to help on the conversion of mxs into dt.
However, I think it is a bit early to block acceptance of non-DT code for mxs especially because there is no mx28 nor mx28evk in mainline yet.
PATCH v8 4/4 ARM: mxs/mx28evk: add GPMI-NAND device
On Thu, Apr 05, 2012 at 01:12:03PM -0300, Fabio Estevam wrote:
...
Quoted 3 lines
However, I think it is a bit early to block acceptance of non-DT code for mxs especially because there is no mx28 nor mx28evk in mainline yet.
I have to do that to motivate people to add DT support for the drivers they submit from the beginning.
Also I do not see much point to keep patching board files which are to be removed.
Signature · 2 lines
Regards, Shawn
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v8 4/4 ARM: mxs/mx28evk: add GPMI-NAND device
Quoted 5 lines · Subodh Nijsure
Hello Shawn,
You also have to consider that folks who are using MX28 based design might be just now shifting from freescale provided 2.6.35 SDK to the latest 3.4-rcX train on their own (my case). To make them wait for 3.5 to get all the iMX driver seems like hard thing to do.
I'm pretty sure that even 3.5 will not have all the imx28 drivers support. Also freezing board file update does not block anyone adding new driver support in any way. I do not understand what your argument is.
Please note, the gpmi nand mx28evk board patch was not accept because it has pin confliction issue to be resolved.
Signature · 2 lines
Regards, Shawn
Fabio Estevam
reviewerPATCH v8 4/4 ARM: mxs/mx28evk: add GPMI-NAND device
In reply to Shawn GuoQuoted 2 lines · Shawn Guo
I have to do that to motivate people to add DT support for the drivers they submit from the beginning.
Understand your point for new drivers.
If you take the GPMI driver for example: it has been available for a long time and there is no board using it in mainline.
So how can people easily test it and find bugs with this driver? Patching their own trees themselves? Sam Gandhi did extensive tests on NAND and found some DMA issues with it.
If we could have mx28evk supporting GPMI driver today it would estimulate people to use it and more issues can be found and fixed.
Waiting for DT support to be in place is just blocking the progress for mx28.
Please note that right now there is no dt support for mx28 in mainline.
If what blocks this patch "ARM: mxs/mx28evk: add GPMI-NAND device" to be accepted is the pin mux conflict, that would be easy to fix and Huang could do a v5 if you agree.
Quoted 2 lines
Also I do not see much point to keep patching board files which are to be removed.
I understand your point, but again, right now there is no dt support, so the only mechanism we have to register driver is via board files for mx28.
So it would be nice if you could still accept patches for mx28 while mx28 dt does not show up in mainline.
PATCH v8 4/4 ARM: mxs/mx28evk: add GPMI-NAND device
Quoted 5 lines · Fabio Estevam
Quoted 2 lines · Shawn Guo
I have to do that to motivate people to add DT support for the drivers they submit from the beginning.
Quoted 9 lines
Understand your point for new drivers.
If you take the GPMI driver for example: it has been available for a long time and there is no board using it in mainline.
So how can people easily test it and find bugs with this driver? Patching their own trees themselves? Sam Gandhi did extensive tests on NAND and found some DMA issues with it.
Look, people can still test and find issue with no board in mainline using it.
Quoted 5 lines
If we could have mx28evk supporting GPMI driver today it would estimulate people to use it and more issues can be found and fixed.
Waiting for DT support to be in place is just blocking the progress for mx28.
Please tell me what are exactly being blocked there.
Quoted 2 lines
Please note that right now there is no dt support for mx28 in mainline.
There are still no spi-mxs driver in mainline, why are you sending me spi board file patches?
Quoted 4 lines
If what blocks this patch "ARM: mxs/mx28evk: add GPMI-NAND device" to be accepted is the pin mux conflict, that would be easy to fix and Huang could do a v5 if you agree.
We had the discussion and agreed that migrating to pinctrl subsystem is the right solution. I will be more than happy to accept if someone send me mxs pinctrl support rather than any "easy" fix.
Quoted 9 lines
Quoted 2 lines
Also I do not see much point to keep patching board files which are to be removed.
I understand your point, but again, right now there is no dt support, so the only mechanism we have to register driver is via board files for mx28.
So it would be nice if you could still accept patches for mx28 while mx28 dt does not show up in mainline.
I could accept your spi board file patch when spi-mxs driver hit mainline while mx28 dt does not.
Signature · 2 lines
Regards, Shawn
Fabio Estevam
reviewerPATCH v8 4/4 ARM: mxs/mx28evk: add GPMI-NAND device
Quoted 2 lines · Shawn Guo
Look, people can still test and find issue with no board in mainline using it.
Sure they can, then you need to assume that everyone who uses the kernel is a kernel developer, which is not the case.
Please think on a user's perspective too, where people want just to get the kernel from kernel.org and use it without doing any hacks to it.
Quoted 6 lines
Quoted 5 lines
If we could have mx28evk supporting GPMI driver today it would estimulate people to use it and more issues can be found and fixed.
Waiting for DT support to be in place is just blocking the progress for mx28.
Please tell me what are exactly being blocked there.
The whole point of this discussion started when you stated the reasons for not applying this patch of the thread:
"1) The pin confliction between gpmi and lcdif remains.
2) I intend to freeze the board file updates, as we are on the way to device tree."
1) is easily understood and can be fixed
2) is what we have been discussing.
So not accepting patches to mx28 board files while mx28 dt is not in place will at least block: GPMI and SPI for mx28.
Quoted 4 lines
Quoted 1 line
Please note that right now there is no dt support for mx28 in mainline.
There are still no spi-mxs driver in mainline, why are you sending me spi board file patches?
I have it locally and I was ready to submit it till I read this thread. I haven't made the mxs spi driver dt aware.
Since there is no dt support for mx28 yet, I cannot submit it now, so this will have to wait.
It is like the "chicken-and-egg problem".
Quoted 2 lines
I could accept your spi board file patch when spi-mxs driver hit mainline while mx28 dt does not.
Excellent, that's good news and we come to an agreement :-) Thanks!
PATCH v8 4/4 ARM: mxs/mx28evk: add GPMI-NAND device
Quoted 1 line · Fabio Estevam
On Fri, Apr 6, 2012 at 3:53 AM, Shawn Guo <[email protected]> wrote:
...
Quoted 4 lines
Quoted 2 lines
I could accept your spi board file patch when spi-mxs driver hit mainline while mx28 dt does not.
Excellent, that's good news and we come to an agreement :-) Thanks!
I'm pretty sure that imx28 dt patch from Dong Aisheng will hit mainline with v3.5-rc1, which could be the earliest time for spi-mxs to hit mainline. In that case, I do not have any reason to take your board file patch from there, so what's point of the while argument?
Signature · 2 lines
Regards, Shawn
Fabio Estevam
reviewerPATCH v8 4/4 ARM: mxs/mx28evk: add GPMI-NAND device
Quoted 4 lines · Shawn Guo
I'm pretty sure that imx28 dt patch from Dong Aisheng will hit mainline with v3.5-rc1, which could be the earliest time for spi-mxs to hit mainline. ?In that case, I do not have any reason to take your board file patch from there, so what's point of the while argument?
Ok, will submit the mxs spi driver (non-dt aware) next week when I come back to the office.
You can drop all of the arch mxs spi patches I sent you
PATCH v8 4/4 ARM: mxs/mx28evk: add GPMI-NAND device
In reply to Fabio EstevamDear Fabio Estevam,
Quoted 13 lines · Shawn Guo
Quoted 2 lines
I have to do that to motivate people to add DT support for the drivers they submit from the beginning.
Understand your point for new drivers.
If you take the GPMI driver for example: it has been available for a long time and there is no board using it in mainline.
So how can people easily test it and find bugs with this driver? Patching their own trees themselves? Sam Gandhi did extensive tests on NAND and found some DMA issues with it.
Quoted 5 lines
If we could have mx28evk supporting GPMI driver today it would estimulate people to use it and more issues can be found and fixed.
Waiting for DT support to be in place is just blocking the progress for mx28.
Sadly, I have to agree. I'm not against DT, but blocking it now is bogus.
Quoted 9 lines
Please note that right now there is no dt support for mx28 in mainline.
If what blocks this patch "ARM: mxs/mx28evk: add GPMI-NAND device" to be accepted is the pin mux conflict, that would be easy to fix and Huang could do a v5 if you agree.
Quoted 2 lines
Also I do not see much point to keep patching board files which are to be removed.
Quoted 7 lines
I understand your point, but again, right now there is no dt support, so the only mechanism we have to register driver is via board files for mx28.
So it would be nice if you could still accept patches for mx28 while mx28 dt does not show up in mainline.
Agreed
Best regards,
Marek Vasut
v8 cover add the GPMI-NAND support for imx23/imx28
In reply to Huang ShijieQuoted 11 lines · Huang Shijie
The patch set is based on tag v3.1-rc2 of linus's tree. and it can be git-am to Artem's tree:
http://git.infradead.org/users/dedekind/l2-mtd-2.6.gitThe general-purpose media interface(GPMI) controller is a flexible interface to up to several NAND flashs.
The Bose Ray-Choudhury Hocquenghem(BCH) module is a hardware ECC accelerator.
With the help of BCH, the GPMI controller can choose to do the hardware ECC or not.
I thought that this series will go in via an imx sub-tree. If you want it to go via the mtd tree, we'd need blessing from the imx subtree maintainer, I think.
Signature · 2 lines
Best Regards, Artem Bityutskiy
v8 cover add the GPMI-NAND support for imx23/imx28
Hi Sascha:
Quoted 8 lines · Huang Shijie
Quoted 7 lines
The patch set is based on tag v3.1-rc2 of linus's tree. and it can be git-am to Artem's tree:
http://git.infradead.org/users/dedekind/l2-mtd-2.6.gitThe general-purpose media interface(GPMI) controller is a flexible interface to up to several NAND flashs.
Quoted 8 lines
Quoted 4 lines
The Bose Ray-Choudhury Hocquenghem(BCH) module is a hardware ECC accelerator.
With the help of BCH, the GPMI controller can choose to do the hardware ECC or not.
I thought that this series will go in via an imx sub-tree. If you want it to go via the mtd tree, we'd need blessing from the imx subtree maintainer, I think.
Could you accept this patch set? or I have to make some further changes about it.
Thanks.
Huang Shijie
v8 cover add the GPMI-NAND support for imx23/imx28
Quoted 36 lines · Huang Shijie
Hi Sascha:
Quoted 14 lines · Huang Shijie
Quoted 12 lines
The patch set is based on tag v3.1-rc2 of linus's tree. and it can be git-am to Artem's tree:
? ? ? ?http://git.infradead.org/users/dedekind/l2-mtd-2.6.gitThe general-purpose media interface(GPMI) controller is a flexible interface
to up to several NAND flashs.The Bose Ray-Choudhury Hocquenghem(BCH) module is a hardware ECC accelerator.
Quoted 8 lines
Quoted 3 lines
With the help of BCH, the GPMI controller can choose to do the hardware ECC or
not.I thought that this series will go in via an imx sub-tree. If you want it to go via the mtd tree, we'd need blessing from the imx subtree maintainer, I think.
Could you accept this patch set? or I have to make some further changes about it.
Thanks.
Huang Shijie
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
v8 cover add the GPMI-NAND support for imx23/imx28
In reply to Huang ShijieHi Sascha:
Is this patch set ok now?
thanks
Huang Shijie
Quoted 57 lines
The patch set is based on tag v3.1-rc2 of linus's tree. and it can be git-am to Artem's tree:
http://git.infradead.org/users/dedekind/l2-mtd-2.6.gitThe general-purpose media interface(GPMI) controller is a flexible interface to up to several NAND flashs.
The Bose Ray-Choudhury Hocquenghem(BCH) module is a hardware ECC accelerator.
With the help of BCH, the GPMI controller can choose to do the hardware ECC or not.
v7 --> v8:
[0] add header file to fix compiling error.v6 --> v7:
[0] renameRES_SIZEtoGPMI_NAND_RES_SIZE.
[1] movegpmi-nand.htoinclude/linux/mtd/directory.
[2] remove comment for new pad control.
[3] othersv5 --> v6:
[0] rename `gpmi-nfc` to `gpmi-nand`. [1] remove ->exit() in structure gpmi_nand_platform_data{}. [2] drop the macros for the resource's definition of gpmi-nand. [3] add a new pad control `MXS_PAD_CTRL_12MA`. [4] others.v4 --> v5:
[0] split out the mach code and the machine code.v3 --> v4:
merge the GPMI-NFC device code to the new branch.Huang Shijie (4):
ARM: mxs: add GPMI-NAND support for imx23/imx28
ARM: mxs: add new a pad control
ARM: mxs/mx23evk: add GPMI-NAND device
ARM: mxs/mx28evk: add GPMI-NAND devicearch/arm/mach-mxs/Kconfig | 2 + arch/arm/mach-mxs/clock-mx23.c | 1 + arch/arm/mach-mxs/clock-mx28.c | 1 + arch/arm/mach-mxs/devices-mx23.h | 4 + arch/arm/mach-mxs/devices-mx28.h | 4 + arch/arm/mach-mxs/devices/Kconfig | 3 + arch/arm/mach-mxs/devices/Makefile | 1 + arch/arm/mach-mxs/devices/platform-gpmi-nand.c | 109 +++++++++++++++++++++++ arch/arm/mach-mxs/include/mach/devices-common.h | 10 ++ arch/arm/mach-mxs/include/mach/iomux.h | 1 + arch/arm/mach-mxs/mach-mx23evk.c | 36 ++++++++ arch/arm/mach-mxs/mach-mx28evk.c | 36 ++++++++ include/linux/mtd/gpmi-nand.h | 68 ++++++++++++++ 13 files changed, 276 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-mxs/devices/platform-gpmi-nand.c create mode 100644 include/linux/mtd/gpmi-nand.h