[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.2-159-ge06d8d1
Brought to you by:
sszy
|
From: Gwenhael Goavec-M. <gwe...@us...> - 2013-02-09 14:09:26
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via e06d8d1e8d3b998d8b036729236bc7bd33996acf (commit)
via ec20987f293bc0a560cbdff5ef138dee67cf736c (commit)
via 68d2b086b744aafeeb794476a4d66bc62026b917 (commit)
via fd3a664d24d46f458f50a757798974f649de275d (commit)
via 6512dde16c281ca33c6561a943d7301c941f6d22 (commit)
via 1697a93d4517bc8d37b62746587f9d89417800c2 (commit)
from b574fa628d6f331818bf663cd9ce2e9cc8c22bba (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e06d8d1e8d3b998d8b036729236bc7bd33996acf
Author: Gwenhael Goavec-Merou <gw...@tr...>
Date: Sat Feb 9 15:07:29 2013 +0100
[LINUX][3.7] apf27 config: select pwm-imx by default
commit ec20987f293bc0a560cbdff5ef138dee67cf736c
Author: Gwenhael Goavec-Merou <gw...@tr...>
Date: Sat Feb 9 15:07:01 2013 +0100
[LINUX][3.7] apf27: add pwm support
commit 68d2b086b744aafeeb794476a4d66bc62026b917
Author: Gwenhael Goavec-Merou <gw...@tr...>
Date: Sat Feb 9 15:06:29 2013 +0100
[LINUX][3.7] imx27: pwm: rename ipg clock and add per clock
commit fd3a664d24d46f458f50a757798974f649de275d
Author: Gwenhael Goavec-Merou <gw...@tr...>
Date: Sat Feb 9 15:05:20 2013 +0100
[LINUX][3.7] imx27: pwm: adds the mandatory macro to select this peripheral
commit 6512dde16c281ca33c6561a943d7301c941f6d22
Author: Gwenhael Goavec-Merou <gw...@tr...>
Date: Sat Feb 9 14:59:16 2013 +0100
[LINUX][3.7] imx: update platform mxc-pwm to register driver with device id instead of driver name
commit 1697a93d4517bc8d37b62746587f9d89417800c2
Author: Gwenhael Goavec-Merou <gw...@tr...>
Date: Sat Feb 9 14:57:21 2013 +0100
[LINUX][3.7] imx: allows to use pwm-imx without device tree
-----------------------------------------------------------------------
Summary of changes:
.../device/armadeus/apf27/apf27-linux-3.7.config | 2 +
.../3.7/0201-armadeus-add_apf27dev_baseboard.patch | 57 +++++++++-------
...madeus-imx-allow_using_imx-pwm_without_DT.patch | 72 +++++++++++++++++++
...b-armadeus-imx-pwm-update_platform_device.patch | 74 ++++++++++++++++++++
...deus-imx27-pwm-add_macro_for_registration.patch | 17 +++++
...x27-clk-rename_pwm_driver_and_add_per_clk.patch | 20 +++++
6 files changed, 217 insertions(+), 25 deletions(-)
create mode 100644 patches/linux/3.7/0207a-armadeus-imx-allow_using_imx-pwm_without_DT.patch
create mode 100644 patches/linux/3.7/0207b-armadeus-imx-pwm-update_platform_device.patch
create mode 100644 patches/linux/3.7/0207c-armadeus-imx27-pwm-add_macro_for_registration.patch
create mode 100644 patches/linux/3.7/0207d-armadeus-imx27-clk-rename_pwm_driver_and_add_per_clk.patch
diff --git a/buildroot/target/device/armadeus/apf27/apf27-linux-3.7.config b/buildroot/target/device/armadeus/apf27/apf27-linux-3.7.config
index fca5c1e..00c7b9d 100644
--- a/buildroot/target/device/armadeus/apf27/apf27-linux-3.7.config
+++ b/buildroot/target/device/armadeus/apf27/apf27-linux-3.7.config
@@ -203,6 +203,8 @@ CONFIG_IMX_SDMA=y
CONFIG_IMX_DMA=y
# CONFIG_IOMMU_SUPPORT is not set
CONFIG_IIO=m
+CONFIG_PWM=y
+CONFIG_PWM_IMX=y
CONFIG_ARMADEUS_DRIVERS=y
CONFIG_ARMADEUS_FPGA_DRIVERS=y
CONFIG_ARMADEUS_FPGA_LOADER_DRIVER=m
diff --git a/patches/linux/3.7/0201-armadeus-add_apf27dev_baseboard.patch b/patches/linux/3.7/0201-armadeus-add_apf27dev_baseboard.patch
index fbec6e4..21d47c0 100644
--- a/patches/linux/3.7/0201-armadeus-add_apf27dev_baseboard.patch
+++ b/patches/linux/3.7/0201-armadeus-add_apf27dev_baseboard.patch
@@ -8,11 +8,11 @@ Signed-off-by: Eric Jarrige <eri...@ar...>
Signed-off-by: Jeremie Scheer <jer...@ar...>
Signed-off-by: Kevin Joly <jol...@gm...>
-Index: linux-3.7.1/arch/arm/mach-imx/apf27-dev.c
+Index: linux-3.7.6/arch/arm/mach-imx/apf27-dev.c
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-3.7.1/arch/arm/mach-imx/apf27-dev.c 2013-01-02 17:57:45.000000000 +0100
-@@ -0,0 +1,1025 @@
+--- /dev/null
++++ linux-3.7.6/arch/arm/mach-imx/apf27-dev.c
+@@ -0,0 +1,1032 @@
+ /*
+ * apf27-dev.c
+ * Support for AFP27 module's development baseboard
@@ -77,7 +77,6 @@ Index: linux-3.7.1/arch/arm/mach-imx/apf27-dev.c
+#endif
+#include <linux/can/platform/mcp251x.h>
+#if 0
-+#include "../../../drivers/armadeus/pwm/pwm.h"
+#include <mach/imx_dam.h>
+#include <mach/imx_sound.h>
+#include <mach/imx-alsa.h>
@@ -135,8 +134,8 @@ Index: linux-3.7.1/arch/arm/mach-imx/apf27-dev.c
+#ifdef CONFIG_SOC_CAMERA_OV96XX_MODULE
+#define CONFIG_SOC_CAMERA_OV96XX 1
+#endif
-+#ifdef CONFIG_ARMADEUS_PWM_DRIVER_MODULE
-+#define CONFIG_PWM
++#ifdef CONFIG_PWM_IMX_MODULE
++#define CONFIG_PWM_IMX 1
+#endif
+
+#define TSC2101_INT 17
@@ -241,6 +240,9 @@ Index: linux-3.7.1/arch/arm/mach-imx/apf27-dev.c
+ TSC2101_INT_GPIO | GPIO_IN | GPIO_GPIO,
+ USER_LED | GPIO_GPIO | GPIO_OUT,
+ USER_BUTTON | GPIO_GPIO | GPIO_IN,
++#ifdef CONFIG_PWM_IMX
++ PE5_PF_PWMO,
++#endif
+};
+
+
@@ -1018,6 +1020,11 @@ Index: linux-3.7.1/arch/arm/mach-imx/apf27-dev.c
+ ARRAY_SIZE(apf27dev_spi_board_info));
+
+ platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
++
++#ifdef CONFIG_PWM_IMX
++ imx27_add_mxc_pwm();
++#endif
++
+#if 0
+#ifdef CONFIG_SPI_TSC2102
+ /* Due to an hardware "bug", force TSC2101 ChipSelect at startup
@@ -1038,10 +1045,10 @@ Index: linux-3.7.1/arch/arm/mach-imx/apf27-dev.c
+#endif
+}
+
-Index: linux-3.7.1/arch/arm/mach-imx/apf27-lcd.c
+Index: linux-3.7.6/arch/arm/mach-imx/apf27-lcd.c
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-3.7.1/arch/arm/mach-imx/apf27-lcd.c 2013-01-02 17:21:07.000000000 +0100
+--- /dev/null
++++ linux-3.7.6/arch/arm/mach-imx/apf27-lcd.c
@@ -0,0 +1,157 @@
+/*
+ * apf27-lcd.c
@@ -1200,10 +1207,10 @@ Index: linux-3.7.1/arch/arm/mach-imx/apf27-lcd.c
+}
+
+#endif
-Index: linux-3.7.1/arch/arm/mach-imx/apf27-dev-ext-apw.c
+Index: linux-3.7.6/arch/arm/mach-imx/apf27-dev-ext-apw.c
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-3.7.1/arch/arm/mach-imx/apf27-dev-ext-apw.c 2013-01-02 17:21:07.000000000 +0100
+--- /dev/null
++++ linux-3.7.6/arch/arm/mach-imx/apf27-dev-ext-apw.c
@@ -0,0 +1,175 @@
+ /*
+ * apf27-dev-ext-apw.c
@@ -1380,10 +1387,10 @@ Index: linux-3.7.1/arch/arm/mach-imx/apf27-dev-ext-apw.c
+ printk("done\n");
+}
+
-Index: linux-3.7.1/arch/arm/mach-imx/mach-apf27.c
+Index: linux-3.7.6/arch/arm/mach-imx/mach-apf27.c
===================================================================
---- linux-3.7.1.orig/arch/arm/mach-imx/mach-apf27.c 2013-01-02 17:21:07.000000000 +0100
-+++ linux-3.7.1/arch/arm/mach-imx/mach-apf27.c 2013-01-02 17:21:07.000000000 +0100
+--- linux-3.7.6.orig/arch/arm/mach-imx/mach-apf27.c
++++ linux-3.7.6/arch/arm/mach-imx/mach-apf27.c
@@ -43,6 +43,7 @@
#include "devices-imx27.h"
@@ -1392,7 +1399,7 @@ Index: linux-3.7.1/arch/arm/mach-imx/mach-apf27.c
static const int apf27_pins[] __initconst = {
/* UART1 */
-@@ -270,6 +271,10 @@
+@@ -270,6 +271,10 @@ static void __init apf27_init(void)
i2c_register_board_info(1, apf27_i2c_devices_bus1,
ARRAY_SIZE(apf27_i2c_devices_bus1));
imx27_add_imx_i2c(1, &apf27_i2c_1_data);
@@ -1403,11 +1410,11 @@ Index: linux-3.7.1/arch/arm/mach-imx/mach-apf27.c
}
static void __init apf27_timer_init(void)
-Index: linux-3.7.1/arch/arm/mach-imx/Kconfig
+Index: linux-3.7.6/arch/arm/mach-imx/Kconfig
===================================================================
---- linux-3.7.1.orig/arch/arm/mach-imx/Kconfig 2013-01-02 17:21:07.000000000 +0100
-+++ linux-3.7.1/arch/arm/mach-imx/Kconfig 2013-01-02 17:21:07.000000000 +0100
-@@ -430,6 +430,103 @@
+--- linux-3.7.6.orig/arch/arm/mach-imx/Kconfig
++++ linux-3.7.6/arch/arm/mach-imx/Kconfig
+@@ -430,6 +430,103 @@ config MACH_APF27
Include support for APF27 platform. This includes specific
configurations for the module and its peripherals.
@@ -1511,11 +1518,11 @@ Index: linux-3.7.1/arch/arm/mach-imx/Kconfig
endif
if ARCH_IMX_V6_V7
-Index: linux-3.7.1/arch/arm/mach-imx/Makefile
+Index: linux-3.7.6/arch/arm/mach-imx/Makefile
===================================================================
---- linux-3.7.1.orig/arch/arm/mach-imx/Makefile 2013-01-02 17:21:07.000000000 +0100
-+++ linux-3.7.1/arch/arm/mach-imx/Makefile 2013-01-02 17:21:07.000000000 +0100
-@@ -46,6 +46,9 @@
+--- linux-3.7.6.orig/arch/arm/mach-imx/Makefile
++++ linux-3.7.6/arch/arm/mach-imx/Makefile
+@@ -46,6 +46,9 @@ obj-$(CONFIG_MACH_MXT_TD60) += mach-mxt_
obj-$(CONFIG_MACH_IMX27IPCAM) += mach-imx27ipcam.o
obj-$(CONFIG_MACH_IMX27_DT) += imx27-dt.o
obj-$(CONFIG_MACH_APF27) += mach-apf27.o
diff --git a/patches/linux/3.7/0207a-armadeus-imx-allow_using_imx-pwm_without_DT.patch b/patches/linux/3.7/0207a-armadeus-imx-allow_using_imx-pwm_without_DT.patch
new file mode 100644
index 0000000..087e1b4
--- /dev/null
+++ b/patches/linux/3.7/0207a-armadeus-imx-allow_using_imx-pwm_without_DT.patch
@@ -0,0 +1,72 @@
+pwm-imx driver is only working with device tree. This patch adds support for
+platforms without device tree.
+
+Signed-off-by: Gwenhael Goavec-Merou <gwe...@ar...>
+---
+
+Index: linux-3.7.6/arch/arm/plat-mxc/include/mach/devices-common.h
+===================================================================
+--- linux-3.7.6.orig/arch/arm/plat-mxc/include/mach/devices-common.h
++++ linux-3.7.6/arch/arm/plat-mxc/include/mach/devices-common.h
+@@ -281,6 +281,7 @@ struct platform_device *__init imx_add_p
+
+ struct imx_mxc_pwm_data {
+ int id;
++ const char *devid;
+ resource_size_t iobase;
+ resource_size_t iosize;
+ resource_size_t irq;
+Index: linux-3.7.6/drivers/pwm/pwm-imx.c
+===================================================================
+--- linux-3.7.6.orig/drivers/pwm/pwm-imx.c
++++ linux-3.7.6/drivers/pwm/pwm-imx.c
+@@ -231,6 +231,19 @@ static const struct of_device_id imx_pwm
+ };
+ MODULE_DEVICE_TABLE(of, imx_pwm_dt_ids);
+
++static struct platform_device_id imx_pwm_devtype[] = {
++ {
++ .name = "imx1-pwm",
++ .driver_data = &imx_pwm_data_v1,
++ }, {
++ .name = "imx27-pwm",
++ .driver_data = &imx_pwm_data_v2,
++ }, {
++ /* sentinel */
++ }
++};
++MODULE_DEVICE_TABLE(platform, imx_pwm_devtype);
++
+ static int __devinit imx_pwm_probe(struct platform_device *pdev)
+ {
+ const struct of_device_id *of_id =
+@@ -240,8 +253,6 @@ static int __devinit imx_pwm_probe(struc
+ struct resource *r;
+ int ret = 0;
+
+- if (!of_id)
+- return -ENODEV;
+
+ imx = devm_kzalloc(&pdev->dev, sizeof(*imx), GFP_KERNEL);
+ if (imx == NULL) {
+@@ -278,7 +289,11 @@ static int __devinit imx_pwm_probe(struc
+ if (imx->mmio_base == NULL)
+ return -EADDRNOTAVAIL;
+
+- data = of_id->data;
++ if (of_id)
++ data = of_id->data;
++ else
++ data = pdev->id_entry->driver_data;
++
+ imx->config = data->config;
+ imx->set_enable = data->set_enable;
+
+@@ -308,6 +323,7 @@ static struct platform_driver imx_pwm_dr
+ },
+ .probe = imx_pwm_probe,
+ .remove = __devexit_p(imx_pwm_remove),
++ .id_table = imx_pwm_devtype,
+ };
+
+ module_platform_driver(imx_pwm_driver);
diff --git a/patches/linux/3.7/0207b-armadeus-imx-pwm-update_platform_device.patch b/patches/linux/3.7/0207b-armadeus-imx-pwm-update_platform_device.patch
new file mode 100644
index 0000000..0acf20e
--- /dev/null
+++ b/patches/linux/3.7/0207b-armadeus-imx-pwm-update_platform_device.patch
@@ -0,0 +1,74 @@
+pwm-imx platform device must now be registered with dev-id (imx1-pwm or
+imx27-pwm) to match driver compatible list.
+
+Signed-off-by: Gwenhael Goavec-Merou <gwe...@ar...>
+---
+
+Index: linux-3.7.6/arch/arm/plat-mxc/devices/platform-mxc_pwm.c
+===================================================================
+--- linux-3.7.6.orig/arch/arm/plat-mxc/devices/platform-mxc_pwm.c
++++ linux-3.7.6/arch/arm/plat-mxc/devices/platform-mxc_pwm.c
+@@ -9,9 +9,10 @@
+ #include <mach/hardware.h>
+ #include <mach/devices-common.h>
+
+-#define imx_mxc_pwm_data_entry_single(soc, _id, _hwid, _size) \
++#define imx_mxc_pwm_data_entry_single(soc, _devid, _id, _hwid, _size) \
+ { \
+ .id = _id, \
++ .devid = _devid, \
+ .iobase = soc ## _PWM ## _hwid ## _BASE_ADDR, \
+ .iosize = _size, \
+ .irq = soc ## _INT_PWM ## _hwid, \
+@@ -21,31 +22,31 @@
+
+ #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);
++ imx_mxc_pwm_data_entry_single(MX21, "imx1-pwm", 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),
++#define imx25_mxc_pwm_data_entry(_devid, _id, _hwid) \
++ imx_mxc_pwm_data_entry(MX25, _devid_, _id, _hwid, SZ_16K)
++ imx25_mxc_pwm_data_entry("imx27-pwm", 0, 1),
++ imx25_mxc_pwm_data_entry("imx27-pwm", 1, 2),
++ imx25_mxc_pwm_data_entry("imx27-pwm", 2, 3),
++ imx25_mxc_pwm_data_entry("imx27-pwm", 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);
++ imx_mxc_pwm_data_entry_single(MX27, "imx27-pwm", 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),
++#define imx51_mxc_pwm_data_entry(_devid, _id, _hwid) \
++ imx_mxc_pwm_data_entry(MX51, _devid, _id, _hwid, SZ_16K)
++ imx51_mxc_pwm_data_entry("imx27-pwm", 0, 1),
++ imx51_mxc_pwm_data_entry("imx27-pwm", 1, 2),
+ };
+ #endif /* ifdef CONFIG_SOC_IMX51 */
+
+@@ -64,6 +65,6 @@ struct platform_device *__init imx_add_m
+ },
+ };
+
+- return imx_add_platform_device("mxc_pwm", data->id,
++ return imx_add_platform_device(data->devid, data->id,
+ res, ARRAY_SIZE(res), NULL, 0);
+ }
diff --git a/patches/linux/3.7/0207c-armadeus-imx27-pwm-add_macro_for_registration.patch b/patches/linux/3.7/0207c-armadeus-imx27-pwm-add_macro_for_registration.patch
new file mode 100644
index 0000000..b3633af
--- /dev/null
+++ b/patches/linux/3.7/0207c-armadeus-imx27-pwm-add_macro_for_registration.patch
@@ -0,0 +1,17 @@
+The platform function for the registration of imx27 pwm is missing.
+
+Signed-off-by: Gwenhael Goavec-Merou <gwe...@ar...>
+---
+
+Index: linux-3.7.6/arch/arm/mach-imx/devices-imx27.h
+===================================================================
+--- linux-3.7.6.orig/arch/arm/mach-imx/devices-imx27.h
++++ linux-3.7.6/arch/arm/mach-imx/devices-imx27.h
+@@ -86,3 +86,7 @@ extern const struct imx_spi_imx_data imx
+ extern const struct imx_pata_imx_data imx27_pata_imx_data;
+ #define imx27_add_pata_imx() \
+ imx_add_pata_imx(&imx27_pata_imx_data)
++
++extern struct imx_mxc_pwm_data imx27_mxc_pwm_data;
++#define imx27_add_mxc_pwm() \
++ imx_add_mxc_pwm(&imx27_mxc_pwm_data)
diff --git a/patches/linux/3.7/0207d-armadeus-imx27-clk-rename_pwm_driver_and_add_per_clk.patch b/patches/linux/3.7/0207d-armadeus-imx27-clk-rename_pwm_driver_and_add_per_clk.patch
new file mode 100644
index 0000000..f198789
--- /dev/null
+++ b/patches/linux/3.7/0207d-armadeus-imx27-clk-rename_pwm_driver_and_add_per_clk.patch
@@ -0,0 +1,20 @@
+pwm-imx driver needs two clock: ipg and per. The first clock must be renamed
+according to the driver and the second must be added.
+
+Signed-off-by: Gwenhael Goavec-Merou <gwe...@ar...>
+---
+
+Index: linux-3.7.6/arch/arm/mach-imx/clk-imx27.c
+===================================================================
+--- linux-3.7.6.orig/arch/arm/mach-imx/clk-imx27.c
++++ linux-3.7.6/arch/arm/mach-imx/clk-imx27.c
+@@ -222,7 +222,8 @@ int __init mx27_clocks_init(unsigned lon
+ 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[pwm_ipg_gate], "ipg", "imx27-pwm.0");
++ clk_register_clkdev(clk[per1_gate], "per", "imx27-pwm.0");
+ clk_register_clkdev(clk[per2_gate], "per", "mxc-mmc.0");
+ clk_register_clkdev(clk[sdhc1_ipg_gate], "ipg", "mxc-mmc.0");
+ clk_register_clkdev(clk[per2_gate], "per", "mxc-mmc.1");
hooks/post-receive
--
armadeus
|