ARM i.MX: remove PWM platform support
authorSascha Hauer <s.hauer@pengutronix.de>
Thu, 16 Jan 2014 15:39:42 +0000 (16:39 +0100)
committerShawn Guo <shawn.guo@linaro.org>
Wed, 5 Mar 2014 02:35:09 +0000 (10:35 +0800)
As the i.MX pwm driver is devicetree only, remove the platform
support for this device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
arch/arm/mach-imx/clk-imx21.c
arch/arm/mach-imx/clk-imx25.c
arch/arm/mach-imx/clk-imx27.c
arch/arm/mach-imx/clk-imx51-imx53.c
arch/arm/mach-imx/devices-imx25.h
arch/arm/mach-imx/devices-imx51.h
arch/arm/mach-imx/devices/Kconfig
arch/arm/mach-imx/devices/Makefile
arch/arm/mach-imx/devices/devices-common.h
arch/arm/mach-imx/devices/platform-mxc_pwm.c [deleted file]

index d7ed66091a2ab60f0ef372ebf7ee57af8a4e4e6e..bdc2e4630a082b4a8c376884616ea1b1dafedf94 100644 (file)
@@ -149,7 +149,6 @@ int __init mx21_clocks_init(unsigned long lref, unsigned long href)
        clk_register_clkdev(clk[per1], "per", "imx-gpt.1");
        clk_register_clkdev(clk[gpt3_ipg_gate], "ipg", "imx-gpt.2");
        clk_register_clkdev(clk[per1], "per", "imx-gpt.2");
-       clk_register_clkdev(clk[pwm_ipg_gate], "pwm", "mxc_pwm.0");
        clk_register_clkdev(clk[per2], "per", "imx21-cspi.0");
        clk_register_clkdev(clk[cspi1_ipg_gate], "ipg", "imx21-cspi.0");
        clk_register_clkdev(clk[per2], "per", "imx21-cspi.1");
index 69858c78f40d07ff5a4ef7a2ae724b09813a19f5..dc36e6c2f1da5b83e57e41612a7caca3afce8879 100644 (file)
@@ -265,14 +265,6 @@ int __init mx25_clocks_init(void)
        clk_register_clkdev(clk[cspi1_ipg], NULL, "imx35-cspi.0");
        clk_register_clkdev(clk[cspi2_ipg], NULL, "imx35-cspi.1");
        clk_register_clkdev(clk[cspi3_ipg], NULL, "imx35-cspi.2");
-       clk_register_clkdev(clk[pwm1_ipg], "ipg", "mxc_pwm.0");
-       clk_register_clkdev(clk[per10], "per", "mxc_pwm.0");
-       clk_register_clkdev(clk[pwm1_ipg], "ipg", "mxc_pwm.1");
-       clk_register_clkdev(clk[per10], "per", "mxc_pwm.1");
-       clk_register_clkdev(clk[pwm1_ipg], "ipg", "mxc_pwm.2");
-       clk_register_clkdev(clk[per10], "per", "mxc_pwm.2");
-       clk_register_clkdev(clk[pwm1_ipg], "ipg", "mxc_pwm.3");
-       clk_register_clkdev(clk[per10], "per", "mxc_pwm.3");
        clk_register_clkdev(clk[kpp_ipg], NULL, "imx-keypad");
        clk_register_clkdev(clk[tsc_ipg], NULL, "mx25-adc");
        clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx21-i2c.0");
index c6b40f3867863c7de1a52e5a1ab72acdc23f758f..d2da8908b26859370f797b746515f501bee89ad1 100644 (file)
@@ -231,7 +231,6 @@ int __init mx27_clocks_init(unsigned long fref)
        clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.4");
        clk_register_clkdev(clk[gpt6_ipg_gate], "ipg", "imx-gpt.5");
        clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.5");
-       clk_register_clkdev(clk[pwm_ipg_gate], NULL, "mxc_pwm.0");
        clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.0");
        clk_register_clkdev(clk[sdhc1_ipg_gate], "ipg", "imx21-mmc.0");
        clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.1");
index 19fca1fdc6feb76f0e86805ec7d5c980b716c515..568ef0a4de84b8892c0ee5b84fd339a5fecbf67a 100644 (file)
@@ -266,8 +266,6 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
        clk_register_clkdev(clk[IMX5_CLK_ECSPI2_PER_GATE], "per", "imx51-ecspi.1");
        clk_register_clkdev(clk[IMX5_CLK_ECSPI2_IPG_GATE], "ipg", "imx51-ecspi.1");
        clk_register_clkdev(clk[IMX5_CLK_CSPI_IPG_GATE], NULL, "imx35-cspi.2");
-       clk_register_clkdev(clk[IMX5_CLK_PWM1_IPG_GATE], "pwm", "mxc_pwm.0");
-       clk_register_clkdev(clk[IMX5_CLK_PWM2_IPG_GATE], "pwm", "mxc_pwm.1");
        clk_register_clkdev(clk[IMX5_CLK_I2C1_GATE], NULL, "imx21-i2c.0");
        clk_register_clkdev(clk[IMX5_CLK_I2C2_GATE], NULL, "imx21-i2c.1");
        clk_register_clkdev(clk[IMX5_CLK_USBOH3_PER_GATE], "per", "mxc-ehci.0");
index 769563fdeaa00a7a096bcbc2ad96bcb219ea6337..61a114cddc3966110cdecd368c76f4be4f48a3e2 100644 (file)
@@ -83,7 +83,3 @@ extern const struct imx_spi_imx_data imx25_cspi_data[];
 #define imx25_add_spi_imx0(pdata)      imx25_add_spi_imx(0, pdata)
 #define imx25_add_spi_imx1(pdata)      imx25_add_spi_imx(1, pdata)
 #define imx25_add_spi_imx2(pdata)      imx25_add_spi_imx(2, pdata)
-
-extern struct imx_mxc_pwm_data imx25_mxc_pwm_data[];
-#define imx25_add_mxc_pwm(id)  \
-       imx_add_mxc_pwm(&imx25_mxc_pwm_data[id])
index deee5baee88cf636627acb1c923b029e9d58b032..26389f35a2b28f162ecba27d7e5d7a66d9b6687d 100644 (file)
@@ -57,10 +57,6 @@ extern const struct imx_imx2_wdt_data imx51_imx2_wdt_data[];
 #define imx51_add_imx2_wdt(id) \
        imx_add_imx2_wdt(&imx51_imx2_wdt_data[id])
 
-extern const struct imx_mxc_pwm_data imx51_mxc_pwm_data[];
-#define imx51_add_mxc_pwm(id)  \
-       imx_add_mxc_pwm(&imx51_mxc_pwm_data[id])
-
 extern const struct imx_imx_keypad_data imx51_imx_keypad_data;
 #define imx51_add_imx_keypad(pdata)    \
        imx_add_imx_keypad(&imx51_imx_keypad_data, pdata)
index 68c74fb0373c63a1f47b97630cf90f70b2e59ee1..2d260a5a307c752a264d8a9a4be75d98cb31b2ea 100644 (file)
@@ -67,9 +67,6 @@ config IMX_HAVE_PLATFORM_MXC_MMC
 config IMX_HAVE_PLATFORM_MXC_NAND
        bool
 
-config IMX_HAVE_PLATFORM_MXC_PWM
-       bool
-
 config IMX_HAVE_PLATFORM_MXC_RNGA
        bool
        select ARCH_HAS_RNGA
index 67416fb1dc69251719e028fa6c6a00b0a9d40df1..1cbc14cd80d1614e32c571ed87adda726cf14c18 100644 (file)
@@ -23,7 +23,6 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_CAMERA) += platform-mx2-camera.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_EHCI) += platform-mxc-ehci.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_MMC) += platform-mxc-mmc.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_NAND) += platform-mxc_nand.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_PWM) += platform-mxc_pwm.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_RNGA) += platform-mxc_rnga.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_RTC) += platform-mxc_rtc.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1) += platform-mxc_w1.o
index c13b76b9f6b38b995422279d05f4f4eaa5eb31ec..61352a80bb59325e062915fbaef737322a8f1aed 100644 (file)
@@ -290,15 +290,6 @@ struct imx_pata_imx_data {
 struct platform_device *__init imx_add_pata_imx(
                const struct imx_pata_imx_data *data);
 
-struct imx_mxc_pwm_data {
-       int id;
-       resource_size_t iobase;
-       resource_size_t iosize;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_mxc_pwm(
-               const struct imx_mxc_pwm_data *data);
-
 /* mxc_rtc */
 struct imx_mxc_rtc_data {
        const char *devid;
diff --git a/arch/arm/mach-imx/devices/platform-mxc_pwm.c b/arch/arm/mach-imx/devices/platform-mxc_pwm.c
deleted file mode 100644 (file)
index dcd2897..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2009-2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@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 "../hardware.h"
-#include "devices-common.h"
-
-#define imx_mxc_pwm_data_entry_single(soc, _id, _hwid, _size)          \
-       {                                                               \
-               .id = _id,                                              \
-               .iobase = soc ## _PWM ## _hwid ## _BASE_ADDR,           \
-               .iosize = _size,                                        \
-               .irq = soc ## _INT_PWM ## _hwid,                        \
-       }
-#define imx_mxc_pwm_data_entry(soc, _id, _hwid, _size)                 \
-       [_id] = imx_mxc_pwm_data_entry_single(soc, _id, _hwid, _size)
-
-#ifdef CONFIG_SOC_IMX21
-const struct imx_mxc_pwm_data imx21_mxc_pwm_data __initconst =
-       imx_mxc_pwm_data_entry_single(MX21, 0, , SZ_4K);
-#endif /* ifdef CONFIG_SOC_IMX21 */
-
-#ifdef CONFIG_SOC_IMX25
-const struct imx_mxc_pwm_data imx25_mxc_pwm_data[] __initconst = {
-#define imx25_mxc_pwm_data_entry(_id, _hwid)                           \
-       imx_mxc_pwm_data_entry(MX25, _id, _hwid, SZ_16K)
-       imx25_mxc_pwm_data_entry(0, 1),
-       imx25_mxc_pwm_data_entry(1, 2),
-       imx25_mxc_pwm_data_entry(2, 3),
-       imx25_mxc_pwm_data_entry(3, 4),
-};
-#endif /* ifdef CONFIG_SOC_IMX25 */
-
-#ifdef CONFIG_SOC_IMX27
-const struct imx_mxc_pwm_data imx27_mxc_pwm_data __initconst =
-       imx_mxc_pwm_data_entry_single(MX27, 0, , SZ_4K);
-#endif /* ifdef CONFIG_SOC_IMX27 */
-
-#ifdef CONFIG_SOC_IMX51
-const struct imx_mxc_pwm_data imx51_mxc_pwm_data[] __initconst = {
-#define imx51_mxc_pwm_data_entry(_id, _hwid)                           \
-       imx_mxc_pwm_data_entry(MX51, _id, _hwid, SZ_16K)
-       imx51_mxc_pwm_data_entry(0, 1),
-       imx51_mxc_pwm_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-struct platform_device *__init imx_add_mxc_pwm(
-               const struct imx_mxc_pwm_data *data)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       return imx_add_platform_device("mxc_pwm", data->id,
-                       res, ARRAY_SIZE(res), NULL, 0);
-}