[Armadeus-commitlog] SF.net SVN: armadeus:[1214] trunk/buildroot/target/device/armadeus/linux/ kern
Brought to you by:
sszy
|
From: <th...@us...> - 2009-04-12 14:36:15
|
Revision: 1214
http://armadeus.svn.sourceforge.net/armadeus/?rev=1214&view=rev
Author: thom25
Date: 2009-04-12 14:36:13 +0000 (Sun, 12 Apr 2009)
Log Message:
-----------
[LINUX] add pwm support to apf27
[LINUX] fix some pengu files related to the pwm
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/321-apf27-armadeus-pengu_pwm_fix.patch
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch 2009-04-10 21:13:39 UTC (rev 1213)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch 2009-04-12 14:36:13 UTC (rev 1214)
@@ -5,7 +5,7 @@
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.27.13/arch/arm/mach-mx2/apf27.c 2009-04-08 15:48:50.000000000 +0200
-@@ -0,0 +1,1482 @@
+@@ -0,0 +1,1513 @@
+ /*
+ * apf27.c
+ *
@@ -64,6 +64,7 @@
+#include <linux/spi/max1027.h>
+#include <linux/spi/tsc2102.h>
+#include "../../../drivers/net/can/mcp251x.h"
++#include "../../../drivers/armadeus/pwm/pwm.h"
+#include <media/ad9889.h>
+#if defined(CONFIG_SND) || defined (CONFIG_SND_MODULE)
+#include <mach/imx_dam.h>
@@ -101,8 +102,33 @@
+#ifdef CONFIG_VIDEO_OV96xx_MODULE
+#define CONFIG_VIDEO_OV96xx 1
+#endif
++#ifdef CONFIG_ARMADEUS_PWM_DRIVER_MODULE
++#define CONFIG_PWM
++#endif
+
++#ifdef CONFIG_PWM
++static int mxc_pwm0_pins[] = {
++ PE5_PF_PWM0
++};
+
++static int apf27_pwm_0_init(void)
++{
++ return mxc_gpio_setup_multiple(mxc_pwm0_pins, ARRAY_SIZE(mxc_pwm0_pins), "PWM0");
++}
++
++static int apf27_pwm_0_exit(void)
++{
++ mxc_gpio_release_multiple(mxc_pwm0_pins, ARRAY_SIZE(mxc_pwm0_pins));
++ return 0;
++}
++
++static struct imx_pwm_platform_data apf27_pwm_0_data = {
++ .init = apf27_pwm_0_init,
++ .exit = apf27_pwm_0_exit,
++};
++#endif
++
++
+/*
+ * APF27 has a Micron 128MiB 1,8V NAND flash, 16 bits width
+ */
@@ -156,6 +182,7 @@
+ .init = apf27_i2c_1_init,
+ .exit = apf27_i2c_1_exit,
+};
++
+static struct i2c_board_info apf27_i2c_devices_bus0[] = {
+ [0] = {
+ .type = "ds1374",
@@ -1426,6 +1453,10 @@
+ mxc_register_device(&mxc_uart_device2, &uart_pdata[1]);
+ /*mxc_register_device(&mxc_uart_device2, &uart_pdata[2]);*/
+ mxc_register_device(&mxc_nand_device, &apf27_nand_board_info);
++
++#ifdef CONFIG_PWM
++ mxc_register_device(&imx_pwm_device0, &apf27_pwm_0_data);
++#endif
+#ifdef CONFIG_WATCHDOG
+ mxc_register_device(&mxc_wdt, NULL);
+#endif
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/321-apf27-armadeus-pengu_pwm_fix.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/321-apf27-armadeus-pengu_pwm_fix.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/321-apf27-armadeus-pengu_pwm_fix.patch 2009-04-12 14:36:13 UTC (rev 1214)
@@ -0,0 +1,82 @@
+Fix pwm clock
+Add pwm pin configuration
+Add pwm ressource
+
+Signed-off-by: Nicolas Colombain <nic...@ar...>
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: linux-2.6.27.13/arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h
+===================================================================
+--- linux-2.6.27.13.orig/arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h 2009-04-12 16:10:13.000000000 +0200
++++ linux-2.6.27.13/arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h 2009-04-12 16:05:57.000000000 +0200
+@@ -372,8 +372,6 @@ extern void mxc_gpio_release_multiple(co
+ #define PD23_PF_CSPI2_MISO (GPIO_PORTD | GPIO_IN | GPIO_PF | 23)
+ #define PD24_PF_CSPI2_MOSI (GPIO_PORTD | GPIO_OUT | GPIO_PF | 24)
+
+-
+-
+ #define PD25_PF_CSPI1_RDY (GPIO_PORTD | GPIO_OUT | GPIO_PF | 25)
+ #define PD26_PF_CSPI1_SS2 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 26)
+ #define PD26_AF_USBH2_DATA5 (GPIO_PORTD | GPIO_AF | 26)
+@@ -388,6 +386,7 @@ extern void mxc_gpio_release_multiple(co
+ #define PE2_PF_USBOTG_DIR (GPIO_PORTE | GPIO_OUT | GPIO_PF | 2)
+ #define PE3_PF_UART2_CTS (GPIO_PORTE | GPIO_OUT | GPIO_PF | 3)
+ #define PE4_PF_UART2_RTS (GPIO_PORTE | GPIO_IN | GPIO_PF | 4)
++#define PE5_PF_PWM0 (GPIO_PORTE | GPIO_OUT | GPIO_PF | 5)
+ #define PE6_PF_UART2_TXD (GPIO_PORTE | GPIO_OUT | GPIO_PF | 6)
+ #define PE7_PF_UART2_RXD (GPIO_PORTE | GPIO_IN | GPIO_PF | 7)
+ #define PE8_PF_UART3_TXD (GPIO_PORTE | GPIO_OUT | GPIO_PF | 8)
+Index: linux-2.6.27.13/arch/arm/mach-mx2/devices.c
+===================================================================
+--- linux-2.6.27.13.orig/arch/arm/mach-mx2/devices.c 2009-04-12 16:10:13.000000000 +0200
++++ linux-2.6.27.13/arch/arm/mach-mx2/devices.c 2009-04-12 16:04:25.000000000 +0200
+@@ -637,6 +637,25 @@ struct platform_device mxc_ehci2 = {
+ .resource = mxc_ehci2_resources,
+ };
+
++static struct resource pwm_resources[] = {
++ [0] = {
++ .start = (PWM_BASE_ADDR),
++ .end = (PWM_BASE_ADDR + 0x14),
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = (MXC_INT_PWM),
++ .end = (MXC_INT_PWM),
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++struct platform_device imx_pwm_device0 = {
++ .name = "imx-pwm", // Should be the same as the driver name
++ .id = 0,
++ .num_resources = ARRAY_SIZE(pwm_resources),
++ .resource = pwm_resources,
++};
+
+ /* GPIO port description */
+ static struct mxc_gpio_port imx_gpio_ports[] = {
+Index: linux-2.6.27.13/arch/arm/mach-mx2/devices.h
+===================================================================
+--- linux-2.6.27.13.orig/arch/arm/mach-mx2/devices.h 2009-04-12 16:10:13.000000000 +0200
++++ linux-2.6.27.13/arch/arm/mach-mx2/devices.h 2009-04-12 16:05:02.000000000 +0200
+@@ -29,3 +29,4 @@ extern struct platform_device mxc_dam_de
+ extern struct platform_device mxc_otg;
+ extern struct platform_device mxc_ehci1;
+ extern struct platform_device mxc_ehci2;
++extern struct platform_device imx_pwm_device0;
+Index: linux-2.6.27.13/arch/arm/mach-mx2/clock_imx27.c
+===================================================================
+--- linux-2.6.27.13.orig/arch/arm/mach-mx2/clock_imx27.c 2009-04-12 16:10:12.000000000 +0200
++++ linux-2.6.27.13/arch/arm/mach-mx2/clock_imx27.c 2009-04-12 16:06:29.000000000 +0200
+@@ -921,7 +921,7 @@ static struct clk pwm_clk[] = {
+ .parent = &per_clk[0],
+ .secondary = &pwm_clk[1],
+ }, {
+- .name = "pwm_clk",
++ .name = "pwm_ipg_clk",
+ .parent = &ipg_clk,
+ .enable = _clk_enable,
+ .enable_reg = CCM_PCCR0,
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|