diff options
Diffstat (limited to 'target/linux/omap24xx/patches-3.1/300-cbus-platform.patch')
-rw-r--r-- | target/linux/omap24xx/patches-3.1/300-cbus-platform.patch | 94 |
1 files changed, 52 insertions, 42 deletions
diff --git a/target/linux/omap24xx/patches-3.1/300-cbus-platform.patch b/target/linux/omap24xx/patches-3.1/300-cbus-platform.patch index 7049b4d486..dc381049da 100644 --- a/target/linux/omap24xx/patches-3.1/300-cbus-platform.patch +++ b/target/linux/omap24xx/patches-3.1/300-cbus-platform.patch @@ -1,8 +1,8 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c =================================================================== ---- linux-3.1.orig/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 00:48:29.505056863 +0200 -+++ linux-3.1/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 00:48:47.357044479 +0200 -@@ -15,8 +15,10 @@ +--- linux-3.1.orig/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 19:31:54.096705150 +0100 ++++ linux-3.1/arch/arm/mach-omap2/board-n8x0.c 2011-10-30 19:34:46.537525210 +0100 +@@ -15,8 +15,11 @@ #include <linux/delay.h> #include <linux/gpio.h> #include <linux/init.h> @@ -10,18 +10,11 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c #include <linux/io.h> #include <linux/stddef.h> +#include <linux/platform_device.h> ++#include <linux/platform_data/cbus.h> #include <linux/i2c.h> #include <linux/spi/spi.h> #include <linux/usb/musb.h> -@@ -33,6 +35,7 @@ - #include <plat/onenand.h> - #include <plat/mmc.h> - #include <plat/serial.h> -+#include <plat/cbus.h> - - #include "mux.h" - -@@ -193,6 +196,114 @@ static struct omap_onenand_platform_data +@@ -193,6 +196,110 @@ static struct omap_onenand_platform_data }; #endif @@ -49,8 +42,6 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c +}; + +static struct cbus_retu_platform_data n8x0_retu_data = { -+ .irq_base = CBUS_RETU_IRQ_BASE, -+ .irq_end = CBUS_RETU_IRQ_END, + .devid = CBUS_RETU_DEVICE_ID, +}; + @@ -61,6 +52,7 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c + .num_resources = ARRAY_SIZE(retu_resource), + .dev = { + .platform_data = &n8x0_retu_data, ++ .parent = &n8x0_cbus_device.dev, + }, +}; + @@ -76,11 +68,9 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c + .id = -1, + .resource = tahvo_resource, + .num_resources = ARRAY_SIZE(tahvo_resource), -+}; -+ -+static struct platform_device tahvo_usb_device = { -+ .name = "tahvo-usb", -+ .id = -1, ++ .dev = { ++ .parent = &n8x0_cbus_device.dev, ++ }, +}; + +static void __init n8x0_cbus_init(void) @@ -124,7 +114,6 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c + + tahvo_resource[0].start = gpio_to_irq(111); + platform_device_register(&tahvo_device); -+ platform_device_register(&tahvo_usb_device); +} + +#else @@ -136,7 +125,7 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c #if defined(CONFIG_MENELAUS) && \ (defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)) -@@ -679,6 +790,8 @@ static inline void board_serial_init(voi +@@ -679,6 +786,8 @@ static inline void board_serial_init(voi static void __init n8x0_init_machine(void) { omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC); @@ -145,25 +134,46 @@ Index: linux-3.1/arch/arm/mach-omap2/board-n8x0.c /* FIXME: add n810 spi devices */ spi_register_board_info(n800_spi_board_info, ARRAY_SIZE(n800_spi_board_info)); -Index: linux-3.1/arch/arm/plat-omap/include/plat/irqs.h +Index: linux-3.1/include/linux/platform_data/cbus.h =================================================================== ---- linux-3.1.orig/arch/arm/plat-omap/include/plat/irqs.h 2011-10-30 00:48:29.517056855 +0200 -+++ linux-3.1/arch/arm/plat-omap/include/plat/irqs.h 2011-10-30 00:48:47.357044479 +0200 -@@ -428,8 +428,16 @@ - #define OMAP_GPMC_NR_IRQS 8 - #define OMAP_GPMC_IRQ_END (OMAP_GPMC_IRQ_BASE + OMAP_GPMC_NR_IRQS) - -+/* CBUS */ -+#define CBUS_RETU_IRQ_BASE OMAP_GPMC_IRQ_END -+#ifdef CONFIG_CBUS_RETU -+#define CBUS_RETU_NR_IRQS 16 -+#else -+#define CBUS_RETU_NR_IRQS 0 -+#endif -+#define CBUS_RETU_IRQ_END (CBUS_RETU_IRQ_BASE + CBUS_RETU_NR_IRQS) - --#define NR_IRQS OMAP_GPMC_IRQ_END -+#define NR_IRQS CBUS_RETU_IRQ_END - - #define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32)) - +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-3.1/include/linux/platform_data/cbus.h 2011-10-30 19:31:55.452679772 +0100 +@@ -0,0 +1,38 @@ ++/* ++ * cbus.h - CBUS platform_data definition ++ * ++ * Copyright (C) 2004 - 2009 Nokia Corporation ++ * ++ * Written by Felipe Balbi <felipe.balbi@nokia.com> ++ * ++ * This file is subject to the terms and conditions of the GNU General ++ * Public License. See the file "COPYING" in the main directory of this ++ * archive for more details. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ */ ++ ++#ifndef __INCLUDE_LINUX_CBUS_H ++#define __INCLUDE_LINUX_CBUS_H ++ ++#define CBUS_RETU_DEVICE_ID 0x01 ++#define CBUS_TAHVO_DEVICE_ID 0x02 ++ ++struct cbus_host_platform_data { ++ int dat_gpio; ++ int clk_gpio; ++ int sel_gpio; ++}; ++ ++struct cbus_retu_platform_data { ++ int devid; ++}; ++ ++#endif /* __INCLUDE_LINUX_CBUS_H */ |