From 8e033878c9484cb61cc3284c3824e051369b7e4b Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 24 Aug 2009 12:06:08 +0200 Subject: [PATCH] Add missing irq defintions for gpio, build gpio module and select necessary symbols for gpio lib. --- .../arch/mips/include/asm/mach-jz4740/regs.h | 3 +++ .../linux/xburst/files-2.6.31/arch/mips/jz4740/Makefile | 2 +- target/linux/xburst/patches-2.6.31/001-core.patch | 9 ++++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/target/linux/xburst/files-2.6.31/arch/mips/include/asm/mach-jz4740/regs.h b/target/linux/xburst/files-2.6.31/arch/mips/include/asm/mach-jz4740/regs.h index 07528bc41..c2d04a378 100644 --- a/target/linux/xburst/files-2.6.31/arch/mips/include/asm/mach-jz4740/regs.h +++ b/target/linux/xburst/files-2.6.31/arch/mips/include/asm/mach-jz4740/regs.h @@ -96,6 +96,9 @@ #define IRQ_DMA_0 32 /* 32 to 37 for DMAC channel 0 to 5 */ #define IRQ_GPIO_0 48 /* 48 to 175 for GPIO pin 0 to 127 */ +#define JZ_IRQ_INTC_GPIO(x) (28 - x) +#define JZ_IRQ_GPIO(x) (48 + x) + #define NUM_DMA 6 #define NUM_GPIO 128 /************************************************************************* diff --git a/target/linux/xburst/files-2.6.31/arch/mips/jz4740/Makefile b/target/linux/xburst/files-2.6.31/arch/mips/jz4740/Makefile index ac4d3cd2d..02598762b 100644 --- a/target/linux/xburst/files-2.6.31/arch/mips/jz4740/Makefile +++ b/target/linux/xburst/files-2.6.31/arch/mips/jz4740/Makefile @@ -5,7 +5,7 @@ # Object file lists. obj-y += prom.o irq.o time.o reset.o setup.o dma.o \ - platform.o i2c.o + gpio.o platform.o i2c.o obj-$(CONFIG_PROC_FS) += proc.o diff --git a/target/linux/xburst/patches-2.6.31/001-core.patch b/target/linux/xburst/patches-2.6.31/001-core.patch index a958aaa98..7084ec582 100644 --- a/target/linux/xburst/patches-2.6.31/001-core.patch +++ b/target/linux/xburst/patches-2.6.31/001-core.patch @@ -26,7 +26,7 @@ diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 3ca0fe1..e8f8027 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -671,6 +671,29 @@ source "arch/mips/cavium-octeon/Kconfig" +@@ -671,6 +671,32 @@ source "arch/mips/cavium-octeon/Kconfig" endmenu @@ -41,6 +41,9 @@ index 3ca0fe1..e8f8027 100644 +config SOC_JZ4740 + bool + select JZSOC ++ select GENERIC_GPIO ++ select ARCH_REQUIRE_GPIOLIB ++ select SYS_HAS_EARLY_PRINTK + +config JZSOC + bool @@ -56,7 +59,7 @@ index 3ca0fe1..e8f8027 100644 config RWSEM_GENERIC_SPINLOCK bool default y -@@ -1893,6 +1916,14 @@ config NR_CPUS +@@ -1893,6 +1919,14 @@ config NR_CPUS source "kernel/time/Kconfig" @@ -71,7 +74,7 @@ index 3ca0fe1..e8f8027 100644 # # Timer Interrupt Frequency Configuration # -@@ -2164,6 +2195,23 @@ config BINFMT_ELF32 +@@ -2164,6 +2198,23 @@ config BINFMT_ELF32 endmenu