Skip to contentSkip to conversation

ARM: mxs: remove board files

PATCH New Shawn Guo 3 participants 12 messages Aug 6, 2012 – Aug 8, 2012

Subsystems (5)
lore
Share & tools
lore

Shawn Guo

author
#0 lore raw

cover ARM: mxs: remove board files

The first two patches hack out the board oddness in DT boot for TX28 and MX28EVK, so that they do not block the whole progress of coverting mxs platform over to DT.

The rest of the series removes board files and the codes only used in non-DT boot, and make mxs a DT-only platform.

Shawn Guo (6):
ARM: mxs: tx28: reset fec phy for device tree boot
ARM: mxs: use auxdata to pass flexcan_switch function hook
ARM: mxs: remove board files
ARM: mxs: remove non-DT core functions
ARM: mxs: remove platform device codes
ARM: mxs: remove iomux driver

 arch/arm/boot/dts/imx28-tx28.dts                  |   21 +-
 arch/arm/configs/mxs_defconfig                    |    6 -
 arch/arm/mach-mxs/Kconfig                         |   89 ----
 arch/arm/mach-mxs/Makefile                        |   11 +-
 arch/arm/mach-mxs/devices-mx23.h                  |   43 --
 arch/arm/mach-mxs/devices-mx28.h                  |   63 ---
 arch/arm/mach-mxs/devices.c                       |   87 ----
 arch/arm/mach-mxs/devices/Kconfig                 |   33 --
 arch/arm/mach-mxs/devices/Makefile                |   12 -
 arch/arm/mach-mxs/devices/platform-auart.c        |   65 ---
 arch/arm/mach-mxs/devices/platform-dma.c          |   31 --
 arch/arm/mach-mxs/devices/platform-fec.c          |   52 --
 arch/arm/mach-mxs/devices/platform-flexcan.c      |   51 --
 arch/arm/mach-mxs/devices/platform-gpio-mxs.c     |   33 --
 arch/arm/mach-mxs/devices/platform-gpmi-nand.c    |   81 ---
 arch/arm/mach-mxs/devices/platform-mxs-i2c.c      |   52 --
 arch/arm/mach-mxs/devices/platform-mxs-mmc.c      |   76 ---
 arch/arm/mach-mxs/devices/platform-mxs-pwm.c      |   22 -
 arch/arm/mach-mxs/devices/platform-mxs-saif.c     |   61 ---
 arch/arm/mach-mxs/devices/platform-mxsfb.c        |   47 --
 arch/arm/mach-mxs/devices/platform-rtc-stmp3xxx.c |   51 --
 arch/arm/mach-mxs/include/mach/common.h           |    9 -
 arch/arm/mach-mxs/include/mach/devices-common.h   |  114 -----
 arch/arm/mach-mxs/include/mach/iomux-mx23.h       |  355 --------------
 arch/arm/mach-mxs/include/mach/iomux-mx28.h       |  537 ---------------------
 arch/arm/mach-mxs/include/mach/iomux.h            |  168 -------
 arch/arm/mach-mxs/iomux.c                         |  101 ----
 arch/arm/mach-mxs/mach-apx4devkit.c               |  273 -----------
 arch/arm/mach-mxs/mach-m28evk.c                   |  366 --------------
 arch/arm/mach-mxs/mach-mx23evk.c                  |  190 --------
 arch/arm/mach-mxs/mach-mx28evk.c                  |  477 ------------------
 arch/arm/mach-mxs/mach-mxs.c                      |  126 +++++-
 arch/arm/mach-mxs/mach-stmp378x_devb.c            |  123 -----
 arch/arm/mach-mxs/mach-tx28.c                     |  184 -------
 arch/arm/mach-mxs/mm.c                            |   39 --
 arch/arm/mach-mxs/module-tx28.c                   |  160 ------
 arch/arm/mach-mxs/module-tx28.h                   |   10 -
 37 files changed, 146 insertions(+), 4073 deletions(-)
 delete mode 100644 arch/arm/mach-mxs/devices-mx23.h
 delete mode 100644 arch/arm/mach-mxs/devices-mx28.h
 delete mode 100644 arch/arm/mach-mxs/devices.c
 delete mode 100644 arch/arm/mach-mxs/devices/Kconfig
 delete mode 100644 arch/arm/mach-mxs/devices/Makefile
 delete mode 100644 arch/arm/mach-mxs/devices/platform-auart.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-dma.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-fec.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-flexcan.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-gpio-mxs.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-gpmi-nand.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-mxs-i2c.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-mxs-mmc.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-mxs-pwm.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-mxs-saif.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-mxsfb.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-rtc-stmp3xxx.c
 delete mode 100644 arch/arm/mach-mxs/include/mach/devices-common.h
 delete mode 100644 arch/arm/mach-mxs/include/mach/iomux-mx23.h
 delete mode 100644 arch/arm/mach-mxs/include/mach/iomux-mx28.h
 delete mode 100644 arch/arm/mach-mxs/include/mach/iomux.h
 delete mode 100644 arch/arm/mach-mxs/iomux.c
 delete mode 100644 arch/arm/mach-mxs/mach-apx4devkit.c
 delete mode 100644 arch/arm/mach-mxs/mach-m28evk.c
 delete mode 100644 arch/arm/mach-mxs/mach-mx23evk.c
 delete mode 100644 arch/arm/mach-mxs/mach-mx28evk.c
 delete mode 100644 arch/arm/mach-mxs/mach-stmp378x_devb.c
 delete mode 100644 arch/arm/mach-mxs/mach-tx28.c
 delete mode 100644 arch/arm/mach-mxs/module-tx28.c
 delete mode 100644 arch/arm/mach-mxs/module-tx28.h
Signature · 1 line
1.7.5.4
author
#1 lore raw

PATCH 1/6 ARM: mxs: tx28: reset fec phy for device tree boot

For non-DT boot, function tx28_add_fec0 configures all ENET0 pins into gpio mode for resetting fec phy, and then reconfigures those pins into ENET function after that.

For DT boot, all the pin configuration is done by pinctrl subsystem. Ideally, when gpio_requst gets called, GPIO subsystem should call pinctrl to configure pins into gpio mode automatically, and have pins freed up from pinctrl subsystem when gpio_free is called. But right now, this cooperation between gpio and pinctrl hasn't been available. As the result, we have to explicitly call pinctrl_get_select and pinctrl_put for device tree boot.

---
 arch/arm/boot/dts/imx28-tx28.dts |   21 +++++++++-
 arch/arm/mach-mxs/mach-mxs.c     |   82 +++++++++++++++++++++++++++++++++++++-
 2 files changed, 101 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx28-tx28.dts +20 -1
index 62bf767..a56ae05 100644
@@ -34,6 +34,24 @@
 					fsl,voltage = <1>;
 					fsl,pull-up = <0>;
 				};
+
+				mac0_pins_gpio: mac0-gpio-mode at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						0x4003 /* MX28_PAD_ENET0_MDC__GPIO_4_0 */
+						0x4013 /* MX28_PAD_ENET0_MDIO__GPIO_4_1 */
+						0x4023 /* MX28_PAD_ENET0_RX_EN__GPIO_4_2 */
+						0x4033 /* MX28_PAD_ENET0_RXD0__GPIO_4_3 */
+						0x4043 /* MX28_PAD_ENET0_RXD1__GPIO_4_4 */
+						0x4063 /* MX28_PAD_ENET0_TX_EN__GPIO_4_6 */
+						0x4073 /* MX28_PAD_ENET0_TXD0__GPIO_4_7 */
+						0x4083 /* MX28_PAD_ENET0_TXD1__GPIO_4_8 */
+						0x4103 /* MX28_PAD_ENET_CLK__GPIO_4_16 */
+					>;
+					fsl,drive-strength = <0>;
+					fsl,voltage = <1>;
+					fsl,pull-up = <0>;
+				};
 			};
 		};
 
@@ -72,8 +90,9 @@
 	ahb at 80080000 {
 		mac0: ethernet at 800f0000 {
 			phy-mode = "rmii";
-			pinctrl-names = "default";
+			pinctrl-names = "default", "gpio_mode";
 			pinctrl-0 = <&mac0_pins_a>;
+			pinctrl-1 = <&mac0_pins_gpio>;
 			status = "okay";
 		};
 	};
arch/arm/mach-mxs/mach-mxs.c +81 -1

111 lines not on this page · raw message

Signature · 1 line
1.7.5.4
#2 lore raw

PATCH 1/6 ARM: mxs: tx28: reset fec phy for device tree boot

Quoted 6 lines · Shawn Guo

For non-DT boot, function tx28_add_fec0 configures all ENET0 pins into gpio mode for resetting fec phy, and then reconfigures those pins into ENET function after that.

For DT boot, all the pin configuration is done by pinctrl subsystem. Ideally, when gpio_requst gets called, GPIO subsystem should call

^ typo

Quoted 181 lines

pinctrl to configure pins into gpio mode automatically, and have pins freed up from pinctrl subsystem when gpio_free is called. But right now, this cooperation between gpio and pinctrl hasn't been available. As the result, we have to explicitly call pinctrl_get_select and pinctrl_put for device tree boot.

---
 arch/arm/boot/dts/imx28-tx28.dts |   21 +++++++++-
 arch/arm/mach-mxs/mach-mxs.c     |   82 +++++++++++++++++++++++++++++++++++++-
 2 files changed, 101 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx28-tx28.dts +20 -1
index 62bf767..a56ae05 100644
@@ -34,6 +34,24 @@
                                        fsl,voltage = <1>;
                                        fsl,pull-up = <0>;
                                };
+
+                               mac0_pins_gpio: mac0-gpio-mode at 0 {
+                                       reg = <0>;
+                                       fsl,pinmux-ids = <
+                                               0x4003 /* MX28_PAD_ENET0_MDC__GPIO_4_0 */
+                                               0x4013 /* MX28_PAD_ENET0_MDIO__GPIO_4_1 */
+                                               0x4023 /* MX28_PAD_ENET0_RX_EN__GPIO_4_2 */
+                                               0x4033 /* MX28_PAD_ENET0_RXD0__GPIO_4_3 */
+                                               0x4043 /* MX28_PAD_ENET0_RXD1__GPIO_4_4 */
+                                               0x4063 /* MX28_PAD_ENET0_TX_EN__GPIO_4_6 */
+                                               0x4073 /* MX28_PAD_ENET0_TXD0__GPIO_4_7 */
+                                               0x4083 /* MX28_PAD_ENET0_TXD1__GPIO_4_8 */
+                                               0x4103 /* MX28_PAD_ENET_CLK__GPIO_4_16 */
+                                       >;
+                                       fsl,drive-strength = <0>;
+                                       fsl,voltage = <1>;
+                                       fsl,pull-up = <0>;
+                               };
                        };
                };
 
@@ -72,8 +90,9 @@
        ahb at 80080000 {
                mac0: ethernet at 800f0000 {
                        phy-mode = "rmii";
-                       pinctrl-names = "default";
+                       pinctrl-names = "default", "gpio_mode";
                        pinctrl-0 = <&mac0_pins_a>;
+                       pinctrl-1 = <&mac0_pins_gpio>;
                        status = "okay";
                };
        };
arch/arm/mach-mxs/mach-mxs.c +81 -2
index 02d1ab2..6ba37df 100644
@@ -12,8 +12,9 @@
 
 #include <linux/clk.h>
 #include <linux/clkdev.h>
+#include <linux/delay.h>
 #include <linux/err.h>
-#include <linux/init.h>
+#include <linux/gpio.h>
 #include <linux/init.h>
 #include <linux/irqdomain.h>
 #include <linux/micrel_phy.h>
@@ -21,10 +22,12 @@
 #include <linux/of_irq.h>
 #include <linux/of_platform.h>
 #include <linux/phy.h>
+#include <linux/pinctrl/consumer.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 #include <mach/common.h>
 #include <mach/digctl.h>
+#include <mach/mxs.h>
 
 static struct fb_videomode mx23evk_video_modes[] = {
        {
@@ -273,6 +276,80 @@ static void __init apx4devkit_init(void)
        mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT;
 }
 
+#define ENET0_MDC__GPIO_4_0    MXS_GPIO_NR(4, 0)
+#define ENET0_MDIO__GPIO_4_1   MXS_GPIO_NR(4, 1)
+#define ENET0_RX_EN__GPIO_4_2  MXS_GPIO_NR(4, 2)
+#define ENET0_RXD0__GPIO_4_3   MXS_GPIO_NR(4, 3)
+#define ENET0_RXD1__GPIO_4_4   MXS_GPIO_NR(4, 4)
+#define ENET0_TX_EN__GPIO_4_6  MXS_GPIO_NR(4, 6)
+#define ENET0_TXD0__GPIO_4_7   MXS_GPIO_NR(4, 7)
+#define ENET0_TXD1__GPIO_4_8   MXS_GPIO_NR(4, 8)
+#define ENET_CLK__GPIO_4_16    MXS_GPIO_NR(4, 16)
+
+#define TX28_FEC_PHY_POWER     MXS_GPIO_NR(3, 29)
+#define TX28_FEC_PHY_RESET     MXS_GPIO_NR(4, 13)
+#define TX28_FEC_nINT          MXS_GPIO_NR(4, 5)
+
+static const struct gpio tx28_gpios[] __initconst = {
+       { ENET0_MDC__GPIO_4_0, GPIOF_OUT_INIT_LOW, "GPIO_4_0" },
+       { ENET0_MDIO__GPIO_4_1, GPIOF_OUT_INIT_LOW, "GPIO_4_1" },
+       { ENET0_RX_EN__GPIO_4_2, GPIOF_OUT_INIT_LOW, "GPIO_4_2" },
+       { ENET0_RXD0__GPIO_4_3, GPIOF_OUT_INIT_LOW, "GPIO_4_3" },
+       { ENET0_RXD1__GPIO_4_4, GPIOF_OUT_INIT_LOW, "GPIO_4_4" },
+       { ENET0_TX_EN__GPIO_4_6, GPIOF_OUT_INIT_LOW, "GPIO_4_6" },
+       { ENET0_TXD0__GPIO_4_7, GPIOF_OUT_INIT_LOW, "GPIO_4_7" },
+       { ENET0_TXD1__GPIO_4_8, GPIOF_OUT_INIT_LOW, "GPIO_4_8" },
+       { ENET_CLK__GPIO_4_16, GPIOF_OUT_INIT_LOW, "GPIO_4_16" },
+       { TX28_FEC_PHY_POWER, GPIOF_OUT_INIT_LOW, "fec-phy-power" },
+       { TX28_FEC_PHY_RESET, GPIOF_OUT_INIT_LOW, "fec-phy-reset" },
+       { TX28_FEC_nINT, GPIOF_DIR_IN, "fec-int" },
+};
+
+static void __init tx28_post_init(void)
+{
+       struct device_node *np;
+       struct platform_device *pdev;
+       struct pinctrl *pctl;
+       int ret;
+
+       enable_clk_enet_out();
+
+       np = of_find_compatible_node(NULL, NULL, "fsl,imx28-fec");
+       pdev = of_find_device_by_node(np);
+       if (!pdev) {
+               pr_err("%s: failed to find fec device\n", __func__);
+               return;
+       }
+
+       pctl = pinctrl_get_select(&pdev->dev, "gpio_mode");
+       if (IS_ERR(pctl)) {
+               pr_err("%s: failed to get pinctrl state\n", __func__);
+               return;
+       }
+
+       ret = gpio_request_array(tx28_gpios, ARRAY_SIZE(tx28_gpios));
+       if (ret) {
+               pr_err("%s: failed to request gpios: %d\n", __func__, ret);
+               return;
+       }
+
+       /* Power up fec phy */
+       gpio_set_value(TX28_FEC_PHY_POWER, 1);
+       mdelay(26); /* 25ms according to data sheet */
+
+       /* Mode strap pins */
+       gpio_set_value(ENET0_RX_EN__GPIO_4_2, 1);
+       gpio_set_value(ENET0_RXD0__GPIO_4_3, 1);
+       gpio_set_value(ENET0_RXD1__GPIO_4_4, 1);
+
+       udelay(100); /* minimum assertion time for nRST */
+
+       /* Deasserting FEC PHY RESET */
+       gpio_set_value(TX28_FEC_PHY_RESET, 1);
+
+       pinctrl_put(pctl);
+}
+
 static void __init mxs_machine_init(void)
 {
        if (of_machine_is_compatible("fsl,imx28-evk"))
@@ -286,6 +363,9 @@ static void __init mxs_machine_init(void)
 
        of_platform_populate(NULL, of_default_bus_match_table,
                             mxs_auxdata_lookup, NULL);
+
+       if (of_machine_is_compatible("karo,tx28"))
+               tx28_post_init();
 }
 
 static const char *imx23_dt_compat[] __initdata = {
--

1.7.5.4

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
author
#3 lore raw

PATCH 1/6 ARM: mxs: tx28: reset fec phy for device tree boot

Quoted 10 lines · Otavio Salvador
Quoted 6 lines · Shawn Guo

For non-DT boot, function tx28_add_fec0 configures all ENET0 pins into gpio mode for resetting fec phy, and then reconfigures those pins into ENET function after that.

For DT boot, all the pin configuration is done by pinctrl subsystem. Ideally, when gpio_requst gets called, GPIO subsystem should call

^ typo

Fixed. Thanks, Otavio.

Signature · 2 lines
Regards,
Shawn
#4 lore raw

PATCH 1/6 ARM: mxs: tx28: reset fec phy for device tree boot

In reply to Shawn Guo
Quoted 21 lines · Shawn Guo
arch/arm/mach-mxs/mach-mxs.c +21 -0
+static void __init tx28_post_init(void)
+{
+       struct device_node *np;
+       struct platform_device *pdev;
+       struct pinctrl *pctl;
+       int ret;
+
+       enable_clk_enet_out();
+
+       np = of_find_compatible_node(NULL, NULL, "fsl,imx28-fec");
+       pdev = of_find_device_by_node(np);
+       if (!pdev) {
+               pr_err("%s: failed to find fec device\n", __func__);
+               return;
+       }
+
+       pctl = pinctrl_get_select(&pdev->dev, "gpio_mode");
+       if (IS_ERR(pctl)) {
+               pr_err("%s: failed to get pinctrl state\n", __func__);
+               return;
+       }

arch/arm/mach-mxs/mach-mxs.c static void __init apx4devkit_init(void) · line 338

Quoted 10 lines
arch/arm/mach-mxs/mach-mxs.c +10 -0
+
+       ret = gpio_request_array(tx28_gpios, ARRAY_SIZE(tx28_gpios));
+       if (ret) {
+               pr_err("%s: failed to request gpios: %d\n", __func__, ret);
+               return;
+       }
+
+       /* Power up fec phy */
+       gpio_set_value(TX28_FEC_PHY_POWER, 1);
+       mdelay(26); /* 25ms according to data sheet */

26 ms is a long time for a delay. I think you should use msleep here.

Arnd

author
#5 lore raw

PATCH 1/6 ARM: mxs: tx28: reset fec phy for device tree boot

Quoted 6 lines · Arnd Bergmann

arch/arm/mach-mxs/mach-mxs.c static void __init apx4devkit_init(void) · line 338

Quoted 3 lines
arch/arm/mach-mxs/mach-mxs.c +3 -0
+       /* Power up fec phy */
+       gpio_set_value(TX28_FEC_PHY_POWER, 1);
+       mdelay(26); /* 25ms according to data sheet */

26 ms is a long time for a delay. I think you should use msleep here.

I copied this from TX28 board file. But I just changed it per your comment. Thanks.

Signature · 2 lines
Regards,
Shawn
author
#6 lore raw

PATCH 2/6 ARM: mxs: use auxdata to pass flexcan_switch function hook

In reply to Shawn Guo

There are some efforts going on to have flexcan_switch function implemented in flexcan driver, so that this platform function hook can be saved for device tree boot. But due to the mx28evk board design oddness that two flexcan transceivers share one switch gpio, we have to come up a separate and generic gpio-switch driver to handle all these gpio switch use cases.

Before that happens, we choose to use auxdata to pass flexcan_switch function hook, so that the DT conversion is not blocked there.

---
 arch/arm/mach-mxs/mach-mxs.c |   44 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 44 insertions(+), 0 deletions(-)
arch/arm/mach-mxs/mach-mxs.c +44 -0
index 6ba37df..1bfff30 100644
@@ -12,6 +12,7 @@
 
 #include <linux/clk.h>
 #include <linux/clkdev.h>
+#include <linux/can/platform/flexcan.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/gpio.h>
@@ -103,9 +104,40 @@ static struct fb_videomode apx4devkit_video_modes[] = {
 
 static struct mxsfb_platform_data mxsfb_pdata __initdata;
 
+/*
+ * MX28EVK_FLEXCAN_SWITCH is shared between both flexcan controllers
+ */
+#define MX28EVK_FLEXCAN_SWITCH	MXS_GPIO_NR(2, 13)
+
+static int flexcan0_en, flexcan1_en;
+
+static void mx28evk_flexcan_switch(void)
+{
+	if (flexcan0_en || flexcan1_en)
+		gpio_set_value(MX28EVK_FLEXCAN_SWITCH, 1);
+	else
+		gpio_set_value(MX28EVK_FLEXCAN_SWITCH, 0);
+}
+
+static void mx28evk_flexcan0_switch(int enable)
+{
+	flexcan0_en = enable;
+	mx28evk_flexcan_switch();
+}
+
+static void mx28evk_flexcan1_switch(int enable)
+{
+	flexcan1_en = enable;
+	mx28evk_flexcan_switch();
+}
+
+static struct flexcan_platform_data flexcan_pdata[2];
+
 static struct of_dev_auxdata mxs_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("fsl,imx23-lcdif", 0x80030000, NULL, &mxsfb_pdata),
 	OF_DEV_AUXDATA("fsl,imx28-lcdif", 0x80030000, NULL, &mxsfb_pdata),
+	OF_DEV_AUXDATA("fsl,imx28-flexcan", 0x80032000, NULL, &flexcan_pdata[0]),
+	OF_DEV_AUXDATA("fsl,imx28-flexcan", 0x80034000, NULL, &flexcan_pdata[1]),
 	{ /* sentinel */ }
 };
 
@@ -245,6 +277,15 @@ static void __init imx28_evk_init(void)
 	mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0);
 }
 
+static void __init imx28_evk_post_init(void)
+{
+	if (!gpio_request_one(MX28EVK_FLEXCAN_SWITCH, GPIOF_DIR_OUT,
+			      "flexcan-switch")) {
+		flexcan_pdata[0].transceiver_switch = mx28evk_flexcan0_switch;
+		flexcan_pdata[1].transceiver_switch = mx28evk_flexcan1_switch;
+	}
+}
+
 static void __init m28evk_init(void)
 {
 	enable_clk_enet_out();
@@ -366,6 +407,9 @@ static void __init mxs_machine_init(void)
 
 	if (of_machine_is_compatible("karo,tx28"))
 		tx28_post_init();
+
+	if (of_machine_is_compatible("fsl,imx28-evk"))
+		imx28_evk_post_init();
 }
 
 static const char *imx23_dt_compat[] __initdata = {
Signature · 1 line
1.7.5.4
author
#7 lore raw

PATCH 3/6 ARM: mxs: remove board files

In reply to Shawn Guo

Since DT kernel provides the equivalent support with those board files, we can remove them now.

Cc Lothar Wa?mann <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Lauri Hintsala <[email protected]>
---
 arch/arm/configs/mxs_defconfig         |    6 -
 arch/arm/mach-mxs/Kconfig              |   87 ------
 arch/arm/mach-mxs/Makefile             |    7 -
 arch/arm/mach-mxs/mach-apx4devkit.c    |  273 ------------------
 arch/arm/mach-mxs/mach-m28evk.c        |  366 ------------------------
 arch/arm/mach-mxs/mach-mx23evk.c       |  190 -------------
 arch/arm/mach-mxs/mach-mx28evk.c       |  477 --------------------------------
 arch/arm/mach-mxs/mach-stmp378x_devb.c |  123 --------
 arch/arm/mach-mxs/mach-tx28.c          |  184 ------------
 arch/arm/mach-mxs/module-tx28.c        |  160 -----------
 arch/arm/mach-mxs/module-tx28.h        |   10 -
 11 files changed, 0 insertions(+), 1883 deletions(-)
 delete mode 100644 arch/arm/mach-mxs/mach-apx4devkit.c
 delete mode 100644 arch/arm/mach-mxs/mach-m28evk.c
 delete mode 100644 arch/arm/mach-mxs/mach-mx23evk.c
 delete mode 100644 arch/arm/mach-mxs/mach-mx28evk.c
 delete mode 100644 arch/arm/mach-mxs/mach-stmp378x_devb.c
 delete mode 100644 arch/arm/mach-mxs/mach-tx28.c
 delete mode 100644 arch/arm/mach-mxs/module-tx28.c
 delete mode 100644 arch/arm/mach-mxs/module-tx28.h
arch/arm/configs/mxs_defconfig +0 -6
index ccdb635..e5fc6c2 100644
@@ -23,12 +23,6 @@ CONFIG_BLK_DEV_INTEGRITY=y
 # CONFIG_IOSCHED_CFQ is not set
 CONFIG_ARCH_MXS=y
 CONFIG_MACH_MXS_DT=y
-CONFIG_MACH_MX23EVK=y
-CONFIG_MACH_MX28EVK=y
-CONFIG_MACH_STMP378X_DEVB=y
-CONFIG_MACH_TX28=y
-CONFIG_MACH_M28EVK=y
-CONFIG_MACH_APX4DEVKIT=y
 # CONFIG_ARM_THUMB is not set
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
arch/arm/mach-mxs/Kconfig +0 -87

91 lines not on this page · raw message

arch/arm/mach-mxs/Makefile +0 -7
index fed3695..a7ace24 100644
@@ -4,12 +4,5 @@ obj-y := devices.o icoll.o iomux.o ocotp.o system.o timer.o mm.o
 obj-$(CONFIG_PM) += pm.o
 
 obj-$(CONFIG_MACH_MXS_DT) += mach-mxs.o
-obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o
-obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o
-obj-$(CONFIG_MACH_MX28EVK) += mach-mx28evk.o
-obj-$(CONFIG_MACH_M28EVK)    += mach-m28evk.o
-obj-$(CONFIG_MACH_APX4DEVKIT) += mach-apx4devkit.o
-obj-$(CONFIG_MODULE_TX28) += module-tx28.o
-obj-$(CONFIG_MACH_TX28)    += mach-tx28.o
 
 obj-y += devices/
arch/arm/mach-mxs/mach-apx4devkit.c deleted +0 -273

273 lines not on this page · raw message

arch/arm/mach-mxs/mach-m28evk.c deleted +0 -366

366 lines not on this page · raw message

arch/arm/mach-mxs/mach-mx23evk.c deleted +0 -190

190 lines not on this page · raw message

arch/arm/mach-mxs/mach-mx28evk.c deleted +0 -477

477 lines not on this page · raw message

arch/arm/mach-mxs/mach-stmp378x_devb.c deleted +0 -123

123 lines not on this page · raw message

arch/arm/mach-mxs/mach-tx28.c deleted +0 -184

184 lines not on this page · raw message

arch/arm/mach-mxs/module-tx28.c deleted +0 -160

160 lines not on this page · raw message

arch/arm/mach-mxs/module-tx28.h deleted +0 -10
deleted file mode 100644
index 8ed4254..0000000
@@ -1,10 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- *   Uwe Kleine-Koenig <[email protected]>
- *
- * 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.
- */
-int __init tx28_add_fec0(void);
-int __init tx28_add_fec1(void);
Signature · 1 line
1.7.5.4
author
#8 lore raw

PATCH 4/6 ARM: mxs: remove non-DT core functions

In reply to Shawn Guo

With all board files removed, those core functions used for non-DT boot only can be removed now.

---
 arch/arm/mach-mxs/include/mach/common.h |    9 -------
 arch/arm/mach-mxs/mm.c                  |   39 -------------------------------
 2 files changed, 0 insertions(+), 48 deletions(-)
arch/arm/mach-mxs/include/mach/common.h +0 -9
index de6c7ba..4dec795 100644
@@ -17,21 +17,12 @@ extern void mxs_timer_init(int);
 extern void mxs_restart(char, const char *);
 extern int mxs_saif_clkmux_select(unsigned int clkmux);
 
-extern void mx23_soc_init(void);
 extern int mx23_clocks_init(void);
 extern void mx23_map_io(void);
-extern void mx23_init_irq(void);
 
-extern void mx28_soc_init(void);
 extern int mx28_clocks_init(void);
 extern void mx28_map_io(void);
-extern void mx28_init_irq(void);
 
 extern void icoll_init_irq(void);
 
-extern struct platform_device *mxs_add_dma(const char *devid,
-						resource_size_t base);
-extern struct platform_device *mxs_add_gpio(char *name, int id,
-					    resource_size_t iobase, int irq);
-
 #endif /* __MACH_MXS_COMMON_H__ */
arch/arm/mach-mxs/mm.c +0 -39
index dccb67a..a4294aa 100644
@@ -13,14 +13,11 @@
 
 #include <linux/mm.h>
 #include <linux/init.h>
-#include <linux/pinctrl/machine.h>
 
 #include <asm/mach/map.h>
 
 #include <mach/mx23.h>
 #include <mach/mx28.h>
-#include <mach/common.h>
-#include <mach/iomux.h>
 
 /*
  * Define the MX23 memory map.
@@ -48,43 +45,7 @@ void __init mx23_map_io(void)
 	iotable_init(mx23_io_desc, ARRAY_SIZE(mx23_io_desc));
 }
 
-void __init mx23_init_irq(void)
-{
-	icoll_init_irq();
-}
-
 void __init mx28_map_io(void)
 {
 	iotable_init(mx28_io_desc, ARRAY_SIZE(mx28_io_desc));
 }
-
-void __init mx28_init_irq(void)
-{
-	icoll_init_irq();
-}
-
-void __init mx23_soc_init(void)
-{
-	pinctrl_provide_dummies();
-
-	mxs_add_dma("imx23-dma-apbh", MX23_APBH_DMA_BASE_ADDR);
-	mxs_add_dma("imx23-dma-apbx", MX23_APBX_DMA_BASE_ADDR);
-
-	mxs_add_gpio("imx23-gpio", 0, MX23_PINCTRL_BASE_ADDR, MX23_INT_GPIO0);
-	mxs_add_gpio("imx23-gpio", 1, MX23_PINCTRL_BASE_ADDR, MX23_INT_GPIO1);
-	mxs_add_gpio("imx23-gpio", 2, MX23_PINCTRL_BASE_ADDR, MX23_INT_GPIO2);
-}
-
-void __init mx28_soc_init(void)
-{
-	pinctrl_provide_dummies();
-
-	mxs_add_dma("imx28-dma-apbh", MX23_APBH_DMA_BASE_ADDR);
-	mxs_add_dma("imx28-dma-apbx", MX23_APBX_DMA_BASE_ADDR);
-
-	mxs_add_gpio("imx28-gpio", 0, MX28_PINCTRL_BASE_ADDR, MX28_INT_GPIO0);
-	mxs_add_gpio("imx28-gpio", 1, MX28_PINCTRL_BASE_ADDR, MX28_INT_GPIO1);
-	mxs_add_gpio("imx28-gpio", 2, MX28_PINCTRL_BASE_ADDR, MX28_INT_GPIO2);
-	mxs_add_gpio("imx28-gpio", 3, MX28_PINCTRL_BASE_ADDR, MX28_INT_GPIO3);
-	mxs_add_gpio("imx28-gpio", 4, MX28_PINCTRL_BASE_ADDR, MX28_INT_GPIO4);
-}
Signature · 1 line
1.7.5.4
author
#9 lore raw

PATCH 5/6 ARM: mxs: remove platform device codes

In reply to Shawn Guo

With all the board files removed, there is no user for those platform device code. Remove them.

---
 arch/arm/mach-mxs/Kconfig                         |    2 -
 arch/arm/mach-mxs/Makefile                        |    4 +-
 arch/arm/mach-mxs/devices-mx23.h                  |   43 --------
 arch/arm/mach-mxs/devices-mx28.h                  |   63 -----------
 arch/arm/mach-mxs/devices.c                       |   87 ----------------
 arch/arm/mach-mxs/devices/Kconfig                 |   33 ------
 arch/arm/mach-mxs/devices/Makefile                |   12 --
 arch/arm/mach-mxs/devices/platform-auart.c        |   65 ------------
 arch/arm/mach-mxs/devices/platform-dma.c          |   31 ------
 arch/arm/mach-mxs/devices/platform-fec.c          |   52 ----------
 arch/arm/mach-mxs/devices/platform-flexcan.c      |   51 ---------
 arch/arm/mach-mxs/devices/platform-gpio-mxs.c     |   33 ------
 arch/arm/mach-mxs/devices/platform-gpmi-nand.c    |   81 ---------------
 arch/arm/mach-mxs/devices/platform-mxs-i2c.c      |   52 ----------
 arch/arm/mach-mxs/devices/platform-mxs-mmc.c      |   76 --------------
 arch/arm/mach-mxs/devices/platform-mxs-pwm.c      |   22 ----
 arch/arm/mach-mxs/devices/platform-mxs-saif.c     |   61 -----------
 arch/arm/mach-mxs/devices/platform-mxsfb.c        |   47 ---------
 arch/arm/mach-mxs/devices/platform-rtc-stmp3xxx.c |   51 ---------
 arch/arm/mach-mxs/include/mach/devices-common.h   |  114 ---------------------
 20 files changed, 1 insertions(+), 979 deletions(-)
 delete mode 100644 arch/arm/mach-mxs/devices-mx23.h
 delete mode 100644 arch/arm/mach-mxs/devices-mx28.h
 delete mode 100644 arch/arm/mach-mxs/devices.c
 delete mode 100644 arch/arm/mach-mxs/devices/Kconfig
 delete mode 100644 arch/arm/mach-mxs/devices/Makefile
 delete mode 100644 arch/arm/mach-mxs/devices/platform-auart.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-dma.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-fec.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-flexcan.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-gpio-mxs.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-gpmi-nand.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-mxs-i2c.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-mxs-mmc.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-mxs-pwm.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-mxs-saif.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-mxsfb.c
 delete mode 100644 arch/arm/mach-mxs/devices/platform-rtc-stmp3xxx.c
 delete mode 100644 arch/arm/mach-mxs/include/mach/devices-common.h
arch/arm/mach-mxs/Kconfig +0 -2
index 2e6cb6d..ecc4319 100644
@@ -1,7 +1,5 @@
 if ARCH_MXS
 
-source "arch/arm/mach-mxs/devices/Kconfig"
-
 config SOC_IMX23
 	bool
 	select ARM_AMBA
arch/arm/mach-mxs/Makefile +1 -3
index a7ace24..2480ce9 100644
@@ -1,8 +1,6 @@
 # Common support
-obj-y := devices.o icoll.o iomux.o ocotp.o system.o timer.o mm.o
+obj-y := icoll.o iomux.o ocotp.o system.o timer.o mm.o
 
 obj-$(CONFIG_PM) += pm.o
 
 obj-$(CONFIG_MACH_MXS_DT) += mach-mxs.o
-
-obj-y += devices/
arch/arm/mach-mxs/devices-mx23.h deleted +0 -43

43 lines not on this page · raw message

arch/arm/mach-mxs/devices-mx28.h deleted +0 -63

63 lines not on this page · raw message

arch/arm/mach-mxs/devices.c deleted +0 -87

87 lines not on this page · raw message

arch/arm/mach-mxs/devices/Kconfig deleted +0 -33
deleted file mode 100644
index 19659de..0000000
@@ -1,33 +0,0 @@
-config MXS_HAVE_AMBA_DUART
-	bool
-
-config MXS_HAVE_PLATFORM_AUART
-	bool
-
-config MXS_HAVE_PLATFORM_FEC
-	bool
-
-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
-
-config MXS_HAVE_PLATFORM_MXS_MMC
-	bool
-
-config MXS_HAVE_PLATFORM_MXS_PWM
-	bool
-
-config MXS_HAVE_PLATFORM_MXSFB
-	bool
-
-config MXS_HAVE_PLATFORM_MXS_SAIF
-	bool
-
-config MXS_HAVE_PLATFORM_RTC_STMP3XXX
-	bool
arch/arm/mach-mxs/devices/Makefile deleted +0 -12
deleted file mode 100644
index 5f72d97..0000000
@@ -1,12 +0,0 @@
-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
-obj-y += platform-gpio-mxs.o
-obj-$(CONFIG_MXS_HAVE_PLATFORM_MXSFB) += platform-mxsfb.o
-obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_SAIF) += platform-mxs-saif.o
-obj-$(CONFIG_MXS_HAVE_PLATFORM_RTC_STMP3XXX) += platform-rtc-stmp3xxx.o
arch/arm/mach-mxs/devices/platform-auart.c deleted +0 -65

65 lines not on this page · raw message

arch/arm/mach-mxs/devices/platform-dma.c deleted +0 -31
deleted file mode 100644
index 4682450..0000000
@@ -1,31 +0,0 @@
-/*
- * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
- *
- * 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 <linux/compiler.h>
-#include <linux/dma-mapping.h>
-#include <linux/err.h>
-#include <linux/init.h>
-
-#include <mach/mx23.h>
-#include <mach/mx28.h>
-#include <mach/devices-common.h>
-
-struct platform_device *__init mxs_add_dma(const char *devid,
-						resource_size_t base)
-{
-	struct resource res[] = {
-		{
-			.start = base,
-			.end = base + SZ_8K - 1,
-			.flags = IORESOURCE_MEM,
-		}
-	};
-
-	return mxs_add_platform_device_dmamask(devid, -1,
-				res, ARRAY_SIZE(res), NULL, 0,
-				DMA_BIT_MASK(32));
-}
arch/arm/mach-mxs/devices/platform-fec.c deleted +0 -52

52 lines not on this page · raw message

arch/arm/mach-mxs/devices/platform-flexcan.c deleted +0 -51

51 lines not on this page · raw message

arch/arm/mach-mxs/devices/platform-gpio-mxs.c deleted +0 -33
deleted file mode 100644
index cd99f19..0000000
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
- *
- * 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 <linux/compiler.h>
-#include <linux/err.h>
-#include <linux/init.h>
-
-#include <mach/mx23.h>
-#include <mach/mx28.h>
-#include <mach/devices-common.h>
-
-struct platform_device *__init mxs_add_gpio(
-	char *name, int id, resource_size_t iobase, int irq)
-{
-	struct resource res[] = {
-		{
-			.start = iobase,
-			.end = iobase + SZ_8K - 1,
-			.flags = IORESOURCE_MEM,
-		}, {
-			.start = irq,
-			.end = irq,
-			.flags = IORESOURCE_IRQ,
-		},
-	};
-
-	return platform_device_register_resndata(&mxs_apbh_bus,
-			name, id, res, ARRAY_SIZE(res), NULL, 0);
-}
arch/arm/mach-mxs/devices/platform-gpmi-nand.c deleted +0 -81

81 lines not on this page · raw message

arch/arm/mach-mxs/devices/platform-mxs-i2c.c deleted +0 -52

52 lines not on this page · raw message

arch/arm/mach-mxs/devices/platform-mxs-mmc.c deleted +0 -76

76 lines not on this page · raw message

arch/arm/mach-mxs/devices/platform-mxs-pwm.c deleted +0 -22
deleted file mode 100644
index 680f5a9..0000000
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Sascha Hauer <[email protected]>
- *
- * 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 <asm/sizes.h>
-#include <mach/devices-common.h>
-
-struct platform_device *__init mxs_add_mxs_pwm(resource_size_t iobase, int id)
-{
-	struct resource res = {
-		.flags = IORESOURCE_MEM,
-	};
-
-	res.start = iobase + 0x10 + 0x20 * id;
-	res.end = res.start + 0x1f;
-
-	return mxs_add_platform_device("mxs-pwm", id, &res, 1, NULL, 0);
-}
arch/arm/mach-mxs/devices/platform-mxs-saif.c deleted +0 -61

61 lines not on this page · raw message

arch/arm/mach-mxs/devices/platform-mxsfb.c deleted +0 -47

47 lines not on this page · raw message

arch/arm/mach-mxs/devices/platform-rtc-stmp3xxx.c deleted +0 -51

51 lines not on this page · raw message

arch/arm/mach-mxs/include/mach/devices-common.h deleted +0 -114

114 lines not on this page · raw message

Signature · 1 line
1.7.5.4
author
#10 lore raw

PATCH 6/6 ARM: mxs: remove iomux driver

In reply to Shawn Guo

With all board files removed, there is no user of iomux driver. Remove it.

---
 arch/arm/mach-mxs/Makefile                  |    2 +-
 arch/arm/mach-mxs/include/mach/iomux-mx23.h |  355 ------------------
 arch/arm/mach-mxs/include/mach/iomux-mx28.h |  537 ---------------------------
 arch/arm/mach-mxs/include/mach/iomux.h      |  168 ---------
 arch/arm/mach-mxs/iomux.c                   |  101 -----
 5 files changed, 1 insertions(+), 1162 deletions(-)
 delete mode 100644 arch/arm/mach-mxs/include/mach/iomux-mx23.h
 delete mode 100644 arch/arm/mach-mxs/include/mach/iomux-mx28.h
 delete mode 100644 arch/arm/mach-mxs/include/mach/iomux.h
 delete mode 100644 arch/arm/mach-mxs/iomux.c
arch/arm/mach-mxs/Makefile +1 -1
index 2480ce9..3d3c8a9 100644
@@ -1,5 +1,5 @@
 # Common support
-obj-y := icoll.o iomux.o ocotp.o system.o timer.o mm.o
+obj-y := icoll.o ocotp.o system.o timer.o mm.o
 
 obj-$(CONFIG_PM) += pm.o
 
arch/arm/mach-mxs/include/mach/iomux-mx23.h deleted +0 -355

355 lines not on this page · raw message

arch/arm/mach-mxs/include/mach/iomux-mx28.h deleted +0 -537

537 lines not on this page · raw message

arch/arm/mach-mxs/include/mach/iomux.h deleted +0 -168

168 lines not on this page · raw message

arch/arm/mach-mxs/iomux.c deleted +0 -101

101 lines not on this page · raw message

Signature · 1 line
1.7.5.4
#11 lore raw

cover ARM: mxs: remove board files

In reply to Shawn Guo
Quoted 7 lines · Shawn Guo

The first two patches hack out the board oddness in DT boot for TX28 and MX28EVK, so that they do not block the whole progress of coverting mxs platform over to DT.

The rest of the series removes board files and the codes only used in non-DT boot, and make mxs a DT-only platform.

So it has come to this ;-)

Great job Shawn and everyone else who was involved in this!

Arnd