Resend of mach-omap2 sparse IRQ and hardware.h cleanup
Subsystems (28)
Tony Lindgren
maintainercover Resend of mach-omap2 sparse IRQ and hardware.h cleanup
Hi all,
Here's a resend of the changes needed to make sparse IRQ work for mach-omap2, and to make hardware.h local. I noticed several places where make randconfig was failing that I fixed, and also split up the patches a bit more.
I also dropped the dependency to Arnd's "ARM: omap: move platform_data definitions" as that has not yet been posted for review, and has only been applied into a test branch.
Merging with Arnd's patch will cause trivial merge conflicts in several places, but that should not be too bad actually; I've left out extra moving of includes from this series where to the core omap code where there should not be any merge conflicts.
These are based on v3.6-rc5 and the following patches:
- Igor's series "ARM: OMAP: cleanup plat/board.h file"
- Afzal's series "Prepare for GPMC driver conversion (w.r.t MTD)"
- Patch "ARM: OMAP4: Fix array size for irq_target_cpu"
The earlier patches were posted at [1] and [2] below.
Regards,
Tony
[1] http://www.spinics.net/lists/arm-kernel/msg191845.html
[2] http://www.spinics.net/lists/arm-kernel/msg192065.html
---
Tony Lindgren (17):
ARM: OMAP1: Move define of OMAP_LCD_DMA to dma.h
ARM: OMAP1: Define OMAP1_INT_I2C locally
ARM: OMAP2+: Make INTCPS_NR_IRQS local for mach-omap2/irq.c
ARM: OMAP2+: Remove unused nand_irq for GPMC
ARM: OMAP2+: Remove hardcoded twl4030 gpio_base, irq_base and irq_end
ARM: OMAP: Move gpio.h to include/linux/platform_data
Input: omap-keypad: Remove dependencies to mach includes
W1: OMAP HDQ1W: Remove dependencies to mach/hardware.h serial/8250: Limit the omap workarounds to omap1
staging: tidspbridge: Prepare for irqs.h removal
ARM: OMAP2+: Prepare for irqs.h removal
ARM: OMAP2+: Remove hardcoded IRQs and enable SPARSE_IRQ
ARM: OMAP1: Move plat/irqs.h to mach/irqs.h
ARM: OMAP: Remove unused old gpio-switch.h
ARM: OMAP: Split plat/hardware.h, use local soc.h for omap2+
ARM: OMAP2+ Move SoC specific headers to be local to mach-omap2
ARM: OMAP1: Move SoC specific headers from plat to mach for omap1
arch/arm/mach-omap1/ams-delta-fiq-handler.S | 1
arch/arm/mach-omap1/board-ams-delta.c | 1
arch/arm/mach-omap1/board-htcherald.c | 2
arch/arm/mach-omap1/board-osk.c | 1
arch/arm/mach-omap1/devices.c | 2
arch/arm/mach-omap1/dma.c | 3
arch/arm/mach-omap1/gpio15xx.c | 1
arch/arm/mach-omap1/gpio16xx.c | 1
arch/arm/mach-omap1/gpio7xx.c | 1
arch/arm/mach-omap1/include/mach/ams-delta-fiq.h | 2
arch/arm/mach-omap1/include/mach/gpio.h | 2
arch/arm/mach-omap1/include/mach/hardware.h | 285 ++++++++++++-
arch/arm/mach-omap1/include/mach/irqs.h | 267 ++++++++++++
arch/arm/mach-omap1/include/mach/omap1510.h | 3
arch/arm/mach-omap1/include/mach/omap16xx.h | 3
arch/arm/mach-omap1/include/mach/omap7xx.h | 3
arch/arm/mach-omap1/leds-h2p2-debug.c | 1
arch/arm/mach-omap1/leds.c | 1
arch/arm/mach-omap2/am33xx.h | 0
arch/arm/mach-omap2/board-2430sdp.c | 5
arch/arm/mach-omap2/board-3430sdp.c | 4
arch/arm/mach-omap2/board-4430sdp.c | 5
arch/arm/mach-omap2/board-am3517crane.c | 1
arch/arm/mach-omap2/board-am3517evm.c | 5
arch/arm/mach-omap2/board-apollon.c | 1
arch/arm/mach-omap2/board-cm-t35.c | 4
arch/arm/mach-omap2/board-cm-t3517.c | 3
arch/arm/mach-omap2/board-devkit8000.c | 6
arch/arm/mach-omap2/board-flash.c | 4
arch/arm/mach-omap2/board-generic.c | 1
arch/arm/mach-omap2/board-h4.c | 3
arch/arm/mach-omap2/board-igep0020.c | 4
arch/arm/mach-omap2/board-ldp.c | 6
arch/arm/mach-omap2/board-n8x0.c | 4
arch/arm/mach-omap2/board-omap3beagle.c | 4
arch/arm/mach-omap2/board-omap3evm.c | 4
arch/arm/mach-omap2/board-omap3logic.c | 17 -
arch/arm/mach-omap2/board-omap3pandora.c | 4
arch/arm/mach-omap2/board-omap3stalker.c | 9
arch/arm/mach-omap2/board-omap3touchbook.c | 4
arch/arm/mach-omap2/board-omap4panda.c | 5
arch/arm/mach-omap2/board-overo.c | 5
arch/arm/mach-omap2/board-rm680.c | 6
arch/arm/mach-omap2/board-rx51-peripherals.c | 5
arch/arm/mach-omap2/board-rx51.c | 1
arch/arm/mach-omap2/board-ti8168evm.c | 2
arch/arm/mach-omap2/board-zoom-debugboard.c | 3
arch/arm/mach-omap2/board-zoom-display.c | 2
arch/arm/mach-omap2/board-zoom-peripherals.c | 6
arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | 2
arch/arm/mach-omap2/clkt_dpll.c | 2
arch/arm/mach-omap2/clock.c | 8
arch/arm/mach-omap2/clock2420_data.c | 2
arch/arm/mach-omap2/clock2430.c | 2
arch/arm/mach-omap2/clock2430_data.c | 2
arch/arm/mach-omap2/clock2xxx.c | 2
arch/arm/mach-omap2/clock33xx_data.c | 2
arch/arm/mach-omap2/clock3xxx.c | 2
arch/arm/mach-omap2/clock3xxx_data.c | 2
arch/arm/mach-omap2/clock44xx_data.c | 2
arch/arm/mach-omap2/cm2xxx_3xxx.c | 3
arch/arm/mach-omap2/common-board-devices.c | 1
arch/arm/mach-omap2/common.c | 2
arch/arm/mach-omap2/common.h | 9
arch/arm/mach-omap2/control.c | 2
arch/arm/mach-omap2/control.h | 2
arch/arm/mach-omap2/cpuidle34xx.c | 1
arch/arm/mach-omap2/devices.c | 18 -
arch/arm/mach-omap2/dpll3xxx.c | 2
arch/arm/mach-omap2/dpll44xx.c | 2
arch/arm/mach-omap2/emu.c | 3
arch/arm/mach-omap2/gpio.c | 1
arch/arm/mach-omap2/gpmc-nand.c | 3
arch/arm/mach-omap2/gpmc-onenand.c | 3
arch/arm/mach-omap2/gpmc-smc91x.c | 2
arch/arm/mach-omap2/gpmc.c | 11
arch/arm/mach-omap2/hsmmc.c | 2
arch/arm/mach-omap2/i2c.c | 1
arch/arm/mach-omap2/id.c | 2
arch/arm/mach-omap2/include/mach/gpio.h | 2
arch/arm/mach-omap2/include/mach/hardware.h | 2
arch/arm/mach-omap2/include/mach/irqs.h | 2
arch/arm/mach-omap2/io.c | 1
arch/arm/mach-omap2/irq.c | 5
arch/arm/mach-omap2/mailbox.c | 4
arch/arm/mach-omap2/mcbsp.c | 2
arch/arm/mach-omap2/msdi.c | 1
arch/arm/mach-omap2/omap-iommu.c | 12 -
arch/arm/mach-omap2/omap-mpuss-lowpower.c | 3
arch/arm/mach-omap2/omap-smp.c | 2
arch/arm/mach-omap2/omap-wakeupgen.c | 1
arch/arm/mach-omap2/omap24xx.h | 2
arch/arm/mach-omap2/omap34xx.h | 2
arch/arm/mach-omap2/omap4-common.c | 9
arch/arm/mach-omap2/omap44xx.h | 2
arch/arm/mach-omap2/omap54xx.h | 0
arch/arm/mach-omap2/omap_hwmod.c | 8
arch/arm/mach-omap2/omap_hwmod_2420_data.c | 25 -
arch/arm/mach-omap2/omap_hwmod_2430_data.c | 73 ++-
.../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c | 108 ++---
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 8
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 152 +++----
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 3
arch/arm/mach-omap2/omap_hwmod_common_data.h | 1
arch/arm/mach-omap2/omap_l3_noc.c | 5
arch/arm/mach-omap2/omap_phy_internal.c | 2
arch/arm/mach-omap2/opp2420_data.c | 2
arch/arm/mach-omap2/opp2430_data.c | 2
arch/arm/mach-omap2/opp3xxx_data.c | 2
arch/arm/mach-omap2/opp4xxx_data.c | 3
arch/arm/mach-omap2/pm24xx.c | 3
arch/arm/mach-omap2/pm34xx.c | 2
arch/arm/mach-omap2/powerdomain.c | 6
arch/arm/mach-omap2/powerdomains3xxx_data.c | 4
arch/arm/mach-omap2/prcm.c | 1
arch/arm/mach-omap2/prm2xxx_3xxx.c | 7
arch/arm/mach-omap2/prm44xx.c | 5
arch/arm/mach-omap2/prm_common.c | 1
arch/arm/mach-omap2/sdrc2xxx.c | 2
arch/arm/mach-omap2/serial.c | 1
arch/arm/mach-omap2/sleep24xx.S | 3
arch/arm/mach-omap2/sleep34xx.S | 2
arch/arm/mach-omap2/sleep44xx.S | 2
arch/arm/mach-omap2/soc.h | 7
arch/arm/mach-omap2/sram242x.S | 3
arch/arm/mach-omap2/sram243x.S | 3
arch/arm/mach-omap2/sram34xx.S | 3
arch/arm/mach-omap2/ti81xx.h | 0
arch/arm/mach-omap2/timer.c | 9
arch/arm/mach-omap2/twl-common.c | 3
arch/arm/mach-omap2/twl-common.h | 6
arch/arm/mach-omap2/usb-host.c | 2
arch/arm/mach-omap2/usb-musb.c | 7
arch/arm/mach-omap2/vc.c | 3
arch/arm/mach-omap2/voltagedomains3xxx_data.c | 3
arch/arm/plat-omap/Kconfig | 1
arch/arm/plat-omap/Makefile | 3
arch/arm/plat-omap/counter_32k.c | 2
arch/arm/plat-omap/debug-leds.c | 1
arch/arm/plat-omap/devices.c | 91 ----
arch/arm/plat-omap/dma.c | 3
arch/arm/plat-omap/i2c.c | 3
arch/arm/plat-omap/include/plat/cpu.h | 3
arch/arm/plat-omap/include/plat/dma.h | 2
arch/arm/plat-omap/include/plat/gpio-switch.h | 54 --
arch/arm/plat-omap/include/plat/hardware.h | 293 -------------
arch/arm/plat-omap/include/plat/irqs-44xx.h | 144 ------
arch/arm/plat-omap/include/plat/irqs.h | 453 --------------------
arch/arm/plat-omap/include/plat/nand.h | 1
arch/arm/plat-omap/include/plat/omap4-keypad.h | 2
drivers/dma/omap-dma.c | 2
drivers/gpio/gpio-omap.c | 15 -
drivers/gpio/gpio-twl4030.c | 15 -
drivers/input/keyboard/omap-keypad.c | 34 +-
drivers/media/video/omap/omap_vout.c | 1
drivers/media/video/omap3isp/isp.c | 2
drivers/mfd/twl-core.c | 2
drivers/mtd/nand/ams-delta.c | 8
drivers/mtd/onenand/omap2.c | 1
drivers/power/avs/smartreflex.c | 2
drivers/spi/spi-omap-uwire.c | 3
drivers/staging/tidspbridge/core/dsp-clock.c | 2
drivers/staging/tidspbridge/core/tiomap3430.c | 4
drivers/staging/tidspbridge/core/wdt.c | 3
drivers/tty/serial/8250/8250.c | 4
drivers/video/omap2/dss/dispc.c | 1
drivers/video/omap2/omapfb/omapfb-main.c | 1
drivers/w1/masters/omap_hdq.c | 3
drivers/watchdog/omap_wdt.c | 5
include/linux/i2c/twl.h | 3
include/linux/mfd/twl6040.h | 1
include/linux/platform_data/gpio-omap.h | 15 -
sound/soc/omap/mcbsp.c | 2
sound/soc/omap/omap-abe-twl6040.c | 4
sound/soc/omap/omap-mcbsp.c | 1
sound/soc/omap/omap-mcpdm.c | 2
sound/soc/omap/omap-pcm.c | 1
sound/soc/omap/sdp3430.c | 1
178 files changed, 1003 insertions(+), 1536 deletions(-)
rename arch/arm/{plat-omap/include/plat/omap1510.h => mach-omap1/include/mach/omap1510.h} (97%)
rename arch/arm/{plat-omap/include/plat/omap16xx.h => mach-omap1/include/mach/omap16xx.h} (99%)
rename arch/arm/{plat-omap/include/plat/omap7xx.h => mach-omap1/include/mach/omap7xx.h} (98%)
rename arch/arm/{plat-omap/include/plat/am33xx.h => mach-omap2/am33xx.h} (100%)
rename arch/arm/{plat-omap/include/plat/omap24xx.h => mach-omap2/omap24xx.h} (98%)
rename arch/arm/{plat-omap/include/plat/omap34xx.h => mach-omap2/omap34xx.h} (98%)
rename arch/arm/{plat-omap/include/plat/omap44xx.h => mach-omap2/omap44xx.h} (97%)
rename arch/arm/{plat-omap/include/plat/omap54xx.h => mach-omap2/omap54xx.h} (100%)
create mode 100644 arch/arm/mach-omap2/soc.h
rename arch/arm/{plat-omap/include/plat/ti81xx.h => mach-omap2/ti81xx.h} (100%)
delete mode 100644 arch/arm/plat-omap/devices.c
delete mode 100644 arch/arm/plat-omap/include/plat/gpio-switch.h
delete mode 100644 arch/arm/plat-omap/include/plat/hardware.h
delete mode 100644 arch/arm/plat-omap/include/plat/irqs-44xx.h
delete mode 100644 arch/arm/plat-omap/include/plat/irqs.h
rename arch/arm/plat-omap/include/plat/gpio.h => include/linux/platform_data/gpio-omap.h (94%)Signature · 1 line
Signature
Tony Lindgren
maintainerPATCH 1/17 ARM: OMAP1: Move define of OMAP_LCD_DMA to dma.h
This is needed to start removing hardcoded IRQs on omap2+.
--- arch/arm/plat-omap/include/plat/dma.h | 2 ++ arch/arm/plat-omap/include/plat/irqs.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arm/plat-omap/include/plat/dma.h +2 -0
@@ -31,6 +31,8 @@/* Move omap4 specific defines to dma-44xx.h */ #include "dma-44xx.h" +#define INT_DMA_LCD 25 +/* DMA channels for omap1 */ #define OMAP_DMA_NO_DEVICE 0#define OMAP_DMA_MCSI1_TX 1
arch/arm/plat-omap/include/plat/irqs.h +0 -1
@@ -53,7 +53,6 @@#define INT_DMA_CH3 22#define INT_DMA_CH4 23#define INT_DMA_CH5 24 -#define INT_DMA_LCD 25#define INT_TIMER1 26#define INT_WD_TIMER 27#define INT_BRIDGE_PUB 28
Tony Lindgren
maintainerPATCH 2/17 ARM: OMAP1: Define OMAP1_INT_I2C locally
In reply to Tony LindgrenThis is needed to start removing hardcoded IRQs for omap2+.
--- arch/arm/plat-omap/i2c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/plat-omap/i2c.c +2 -1
@@ -39,6 +39,7 @@#define OMAP_I2C_SIZE 0x3f#define OMAP1_I2C_BASE 0xfffb3800 +#define OMAP1_INT_I2C (32 + 4)static const char name[] ="omap_i2c" ;
@@ -105,7 +106,7 @@ static inline int omap1_i2c_add_bus(int bus_id) res = pdev->resource; res[0 ].start =OMAP1_I2C_BASE ; res[0 ].end = res[0 ].start +OMAP_I2C_SIZE ; - res[1 ].start =INT_I2C ; + res[1 ].start =OMAP1_INT_I2C ; pdata = &i2c_pdata[bus_id -1 ];/* all OMAP1 have IP version 1 register set */
Tony Lindgren
maintainerPATCH 3/17 ARM: OMAP2+: Make INTCPS_NR_IRQS local for mach-omap2/irq.c
In reply to Tony LindgrenMake INTCPS_NR_IRQS local for mach-omap2/irq.c
--- arch/arm/mach-omap2/irq.c | 2 ++ arch/arm/plat-omap/include/plat/irqs.h | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/irq.c +2 -0
@@ -49,6 +49,8 @@#define OMAP3_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE)#define INTCPS_SIR_IRQ_OFFSET 0x0040/* omap2/3 active interrupt offset */ #define ACTIVEIRQ_MASK 0x7f/* omap2/3 active interrupt bits */ +#define INTCPS_NR_MIR_REGS 3 +#define INTCPS_NR_IRQS 96/* * OMAP2 has a number of different interrupt controllers, each interrupt
arch/arm/plat-omap/include/plat/irqs.h +0 -3
@@ -440,9 +440,6 @@#define OMAP_IRQ_BIT (irq) (1 << ((irq) % 32)) -#define INTCPS_NR_MIR_REGS 3 -#define INTCPS_NR_IRQS 96 -#include <mach/hardware.h> #ifdef CONFIG_FIQ
Tony Lindgren
maintainerPATCH 4/17 ARM: OMAP2+: Remove unused nand_irq for GPMC
In reply to Tony LindgrenThis is no longer needed and assumes a fixed IRQ number that won't work with SPARSE_IRQ.
--- arch/arm/mach-omap2/board-flash.c | 1 - arch/arm/plat-omap/include/plat/nand.h | 1 - 2 files changed, 2 deletions(-)
arch/arm/mach-omap2/board-flash.c +0 -1
@@ -140,7 +140,6 @@ __init board_nand_init(struct mtd_partition *nand_parts, board_nand_data.devsize = nand_type; board_nand_data.ecc_opt =OMAP_ECC_HAMMING_CODE_DEFAULT ; - board_nand_data.gpmc_irq =OMAP_GPMC_IRQ_BASE + cs; gpmc_nand_init(&board_nand_data); }#endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */
arch/arm/plat-omap/include/plat/nand.h +0 -1
@@ -24,7 +24,6 @@ struct omap_nand_platform_data {struct gpmc_timings *gpmc_t;int nr_parts;bool dev_ready; -int gpmc_irq;enum nand_io xfer_type;int devsize;enum omap_ecc ecc_opt;
Tony Lindgren
maintainerPATCH 5/17 ARM: OMAP2+: Remove hardcoded twl4030 gpio_base, irq_base and irq_end
In reply to Tony LindgrenWe can't use hardcoded interrupts for SPARSE_IRQ, and can replace the hardcoded gpio_base with twl_gpiochip.base after it's been allocated.
--- arch/arm/mach-omap2/board-2430sdp.c | 3 --- arch/arm/mach-omap2/board-3430sdp.c | 3 --- arch/arm/mach-omap2/board-4430sdp.c | 1 - arch/arm/mach-omap2/board-cm-t35.c | 3 --- arch/arm/mach-omap2/board-devkit8000.c | 3 --- arch/arm/mach-omap2/board-igep0020.c | 3 --- arch/arm/mach-omap2/board-ldp.c | 3 --- arch/arm/mach-omap2/board-omap3beagle.c | 3 --- arch/arm/mach-omap2/board-omap3evm.c | 3 --- arch/arm/mach-omap2/board-omap3logic.c | 3 --- arch/arm/mach-omap2/board-omap3pandora.c | 3 --- arch/arm/mach-omap2/board-omap3stalker.c | 3 --- arch/arm/mach-omap2/board-omap3touchbook.c | 3 --- arch/arm/mach-omap2/board-omap4panda.c | 1 - arch/arm/mach-omap2/board-overo.c | 3 --- arch/arm/mach-omap2/board-rm680.c | 3 --- arch/arm/mach-omap2/board-rx51-peripherals.c | 3 --- arch/arm/mach-omap2/board-zoom-peripherals.c | 3 --- drivers/gpio/gpio-twl4030.c | 15 ++++++++++----- include/linux/i2c/twl.h | 3 --- include/linux/mfd/twl6040.h | 1 - 21 files changed, 10 insertions(+), 59 deletions(-)
arch/arm/mach-omap2/board-2430sdp.c +0 -3
@@ -211,9 +211,6 @@ static struct regulator_init_data sdp2430_vmmc1 = { };static struct twl4030_gpio_platform_data sdp2430_gpio_data = { - .gpio_base =OMAP_MAX_GPIO_LINES , - .irq_base =TWL4030_GPIO_IRQ_BASE , - .irq_end =TWL4030_GPIO_IRQ_END , };static struct twl4030_platform_data sdp2430_twldata = {
arch/arm/mach-omap2/board-3430sdp.c +0 -3
@@ -229,9 +229,6 @@ static int sdp3430_twl_gpio_setup(struct device *dev, }static struct twl4030_gpio_platform_data sdp3430_gpio_data = { - .gpio_base =OMAP_MAX_GPIO_LINES , - .irq_base =TWL4030_GPIO_IRQ_BASE , - .irq_end =TWL4030_GPIO_IRQ_END , .pulldowns =BIT (2 ) |BIT (6 ) |BIT (8 ) |BIT (13 ) |BIT (16 ) |BIT (17 ), .setup = sdp3430_twl_gpio_setup,
arch/arm/mach-omap2/board-4430sdp.c +0 -1
@@ -543,7 +543,6 @@ static struct twl6040_platform_data twl6040_data = { .codec = &twl6040_codec, .vibra = &twl6040_vibra, .audpwron_gpio = 127, - .irq_base = TWL6040_CODEC_IRQ_BASE, };static struct twl4030_platform_data sdp4430_twldata = {
arch/arm/mach-omap2/board-cm-t35.c +0 -3
@@ -469,9 +469,6 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio, }static struct twl4030_gpio_platform_data cm_t35_gpio_data = { - .gpio_base =OMAP_MAX_GPIO_LINES , - .irq_base =TWL4030_GPIO_IRQ_BASE , - .irq_end =TWL4030_GPIO_IRQ_END , .setup = cm_t35_twl_gpio_setup, };
arch/arm/mach-omap2/board-devkit8000.c +0 -3
@@ -235,9 +235,6 @@ static int devkit8000_twl_gpio_setup(struct device *dev, }static struct twl4030_gpio_platform_data devkit8000_gpio_data = { - .gpio_base =OMAP_MAX_GPIO_LINES , - .irq_base =TWL4030_GPIO_IRQ_BASE , - .irq_end =TWL4030_GPIO_IRQ_END , .use_leds = true, .pulldowns =BIT (1 ) |BIT (2 ) |BIT (6 ) |BIT (8 ) |BIT (13 ) |BIT (15 ) |BIT (16 ) |BIT (17 ),
arch/arm/mach-omap2/board-igep0020.c +0 -3
@@ -424,9 +424,6 @@ static int igep_twl_gpio_setup(struct device *dev, };static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = { - .gpio_base =OMAP_MAX_GPIO_LINES , - .irq_base =TWL4030_GPIO_IRQ_BASE , - .irq_end =TWL4030_GPIO_IRQ_END , .use_leds = true, .setup = igep_twl_gpio_setup, };
arch/arm/mach-omap2/board-ldp.c +0 -3
@@ -274,9 +274,6 @@ static int ldp_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio) }static struct twl4030_gpio_platform_data ldp_gpio_data = { - .gpio_base =OMAP_MAX_GPIO_LINES , - .irq_base =TWL4030_GPIO_IRQ_BASE , - .irq_end =TWL4030_GPIO_IRQ_END , .setup = ldp_twl_gpio_setup, };
arch/arm/mach-omap2/board-omap3beagle.c +0 -3
@@ -296,9 +296,6 @@ static int beagle_twl_gpio_setup(struct device *dev, }static struct twl4030_gpio_platform_data beagle_gpio_data = { - .gpio_base =OMAP_MAX_GPIO_LINES , - .irq_base =TWL4030_GPIO_IRQ_BASE , - .irq_end =TWL4030_GPIO_IRQ_END , .use_leds = true, .pullups =BIT (1 ), .pulldowns =BIT (2 ) |BIT (6 ) |BIT (7 ) |BIT (8 ) |BIT (13 )
arch/arm/mach-omap2/board-omap3evm.c +0 -3
@@ -388,9 +388,6 @@ static int omap3evm_twl_gpio_setup(struct device *dev, }static struct twl4030_gpio_platform_data omap3evm_gpio_data = { - .gpio_base =OMAP_MAX_GPIO_LINES , - .irq_base =TWL4030_GPIO_IRQ_BASE , - .irq_end =TWL4030_GPIO_IRQ_END , .use_leds = true, .setup = omap3evm_twl_gpio_setup, };
arch/arm/mach-omap2/board-omap3logic.c +0 -3
@@ -77,9 +77,6 @@ static struct regulator_init_data omap3logic_vmmc1 = { };static struct twl4030_gpio_platform_data omap3logic_gpio_data = { - .gpio_base =OMAP_MAX_GPIO_LINES , - .irq_base =TWL4030_GPIO_IRQ_BASE , - .irq_end =TWL4030_GPIO_IRQ_END , .use_leds = true, .pullups =BIT (1 ), .pulldowns =BIT (2 ) |BIT (6 ) |BIT (7 ) |BIT (8 )
arch/arm/mach-omap2/board-omap3pandora.c +0 -3
@@ -320,9 +320,6 @@ static int omap3pandora_twl_gpio_setup(struct device *dev, }static struct twl4030_gpio_platform_data omap3pandora_gpio_data = { - .gpio_base =OMAP_MAX_GPIO_LINES , - .irq_base =TWL4030_GPIO_IRQ_BASE , - .irq_end =TWL4030_GPIO_IRQ_END , .setup = omap3pandora_twl_gpio_setup, };
arch/arm/mach-omap2/board-omap3stalker.c +0 -3
@@ -278,9 +278,6 @@ omap3stalker_twl_gpio_setup(struct device *dev, }static struct twl4030_gpio_platform_data omap3stalker_gpio_data = { - .gpio_base =OMAP_MAX_GPIO_LINES , - .irq_base =TWL4030_GPIO_IRQ_BASE , - .irq_end =TWL4030_GPIO_IRQ_END , .use_leds = true, .setup = omap3stalker_twl_gpio_setup, };
arch/arm/mach-omap2/board-omap3touchbook.c +0 -3
@@ -138,9 +138,6 @@ static int touchbook_twl_gpio_setup(struct device *dev, }static struct twl4030_gpio_platform_data touchbook_gpio_data = { - .gpio_base =OMAP_MAX_GPIO_LINES , - .irq_base =TWL4030_GPIO_IRQ_BASE , - .irq_end =TWL4030_GPIO_IRQ_END , .use_leds = true, .pullups =BIT (1 ), .pulldowns =BIT (2 ) |BIT (6 ) |BIT (7 ) |BIT (8 ) |BIT (13 )
arch/arm/mach-omap2/board-omap4panda.c +0 -1
@@ -262,7 +262,6 @@ static struct twl6040_codec_data twl6040_codec = {static struct twl6040_platform_data twl6040_data = { .codec = &twl6040_codec, .audpwron_gpio =127 , - .irq_base =TWL6040_CODEC_IRQ_BASE , };/* Panda board uses the common PMIC configuration */
arch/arm/mach-omap2/board-overo.c +0 -3
@@ -398,9 +398,6 @@ static int overo_twl_gpio_setup(struct device *dev, }static struct twl4030_gpio_platform_data overo_gpio_data = { - .gpio_base =OMAP_MAX_GPIO_LINES , - .irq_base =TWL4030_GPIO_IRQ_BASE , - .irq_end =TWL4030_GPIO_IRQ_END , .use_leds = true, .setup = overo_twl_gpio_setup, };
arch/arm/mach-omap2/board-rm680.c +0 -3
@@ -72,9 +72,6 @@ static struct platform_device *rm680_peripherals_devices[] __initdata = {/* TWL */ static struct twl4030_gpio_platform_data rm680_gpio_data = { - .gpio_base =OMAP_MAX_GPIO_LINES , - .irq_base =TWL4030_GPIO_IRQ_BASE , - .irq_end =TWL4030_GPIO_IRQ_END , .pullups =BIT (0 ), .pulldowns =BIT (1 ) |BIT (2 ) |BIT (8 ) |BIT (15 ), };
arch/arm/mach-omap2/board-rx51-peripherals.c +0 -3
@@ -773,9 +773,6 @@ static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n) }static struct twl4030_gpio_platform_data rx51_gpio_data = { - .gpio_base =OMAP_MAX_GPIO_LINES , - .irq_base =TWL4030_GPIO_IRQ_BASE , - .irq_end =TWL4030_GPIO_IRQ_END , .pulldowns =BIT (0 ) |BIT (1 ) |BIT (2 ) |BIT (3 ) |BIT (4 ) |BIT (5 ) |BIT (8 ) |BIT (9 ) |BIT (10 ) |BIT (11 )
arch/arm/mach-omap2/board-zoom-peripherals.c +0 -3
@@ -251,9 +251,6 @@ static void zoom2_set_hs_extmute(int mute) }static struct twl4030_gpio_platform_data zoom_gpio_data = { - .gpio_base =OMAP_MAX_GPIO_LINES , - .irq_base =TWL4030_GPIO_IRQ_BASE , - .irq_end =TWL4030_GPIO_IRQ_END , .setup = zoom_twl_gpio_setup, };
drivers/gpio/gpio-twl4030.c +10 -5
@@ -51,6 +51,7 @@static struct gpio_chip twl_gpiochip; +static int twl4030_gpio_base;static int twl4030_gpio_irq_base;/* genirq interfaces are not available to modules */
@@ -428,8 +429,6 @@ no_irqs: twl_gpiochip.dev = &pdev->dev;if (pdata) { - twl_gpiochip.base = pdata->gpio_base; -/* * NOTE: boards may waste power if they don't set pullups * and pulldowns correctly ... default for non-ULPI pins is
@@ -461,15 +460,21 @@ no_irqs:dev_err (&pdev->dev,"could not register gpiochip, %d\n" , ret); twl_gpiochip.ngpio =0 ;gpio_twl4030_remove (pdev); - }else if (pdata && pdata->setup) { + goto out; + } + + twl4030_gpio_base = twl_gpiochip.base; + +if (pdata && pdata->setup) {int status; status = pdata->setup (&pdev->dev, - pdata->gpio_base,TWL4030_GPIO_MAX ); + twl4030_gpio_base,TWL4030_GPIO_MAX );if (status)dev_dbg (&pdev->dev,"setup --> %d\n" , status); } +out:return ret; }
@@ -481,7 +486,7 @@ static int gpio_twl4030_remove(struct platform_device *pdev)if (pdata && pdata->teardown) { status = pdata->teardown (&pdev->dev, - pdata->gpio_base,TWL4030_GPIO_MAX ); + twl4030_gpio_base,TWL4030_GPIO_MAX );if (status) {dev_dbg (&pdev->dev,"teardown --> %d\n" , status);return status;
include/linux/i2c/twl.h +0 -3
@@ -561,9 +561,6 @@ struct twl4030_bci_platform_data {/* TWL4030_GPIO_MAX (18) GPIOs, with interrupts */ struct twl4030_gpio_platform_data { -int gpio_base; -unsigned irq_base, irq_end; -/* package the two LED signals as output-only GPIOs? */ bool use_leds;
include/linux/mfd/twl6040.h +0 -1
@@ -194,7 +194,6 @@ struct twl6040_vibra_data {struct twl6040_platform_data {int audpwron_gpio;/* audio power-on gpio */ -unsigned int irq_base;struct twl6040_codec_data *codec;struct twl6040_vibra_data *vibra;
PATCH 5/17 ARM: OMAP2+: Remove hardcoded twl4030 gpio_base, irq_base and irq_end
Hi,
Quoted 3 lines · Tony Lindgren
We can't use hardcoded interrupts for
SPARSE_IRQ, and can replace the hardcodedgpio_basewith twl_gpiochip.base after it's been allocated.
not related to $SUBJECT, but ideally we would also have SPARSE_GPIO kinda thing to avoid this sort of issues. I have tried starting that work, but ran out of steam/time...
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120911/1409262a/attachment.sig>
Tony Lindgren
maintainerPATCH 6/17 ARM: OMAP: Move gpio.h to include/linux/platform_data
In reply to Tony LindgrenThis way we can remove includes of plat/gpio.h which won't work with the single zImage support.
Note that we also remove the cpu_class_is_omap2() check in gpio-omap.c as the drivers should not call it as we need to make it local to arch/arm/mach-omap2 for single zImage support.
While at it, arrange the related includes in the standard way.
--- arch/arm/mach-omap1/board-ams-delta.c | 1 + arch/arm/mach-omap1/board-osk.c | 1 + arch/arm/mach-omap1/gpio15xx.c | 1 + arch/arm/mach-omap1/gpio16xx.c | 1 + arch/arm/mach-omap1/gpio7xx.c | 1 + arch/arm/mach-omap1/include/mach/gpio.h | 2 -- arch/arm/mach-omap1/leds-h2p2-debug.c | 1 + arch/arm/mach-omap1/leds.c | 1 + arch/arm/mach-omap2/board-am3517evm.c | 1 + arch/arm/mach-omap2/board-cm-t35.c | 1 + arch/arm/mach-omap2/board-zoom-display.c | 2 ++ arch/arm/mach-omap2/board-zoom-peripherals.c | 1 + arch/arm/mach-omap2/gpio.c | 1 + arch/arm/mach-omap2/hsmmc.c | 2 ++ arch/arm/mach-omap2/include/mach/gpio.h | 2 -- arch/arm/mach-omap2/msdi.c | 1 + arch/arm/mach-omap2/omap_hwmod_2420_data.c | 1 - arch/arm/mach-omap2/omap_hwmod_2430_data.c | 1 - arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 2 +- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 2 +- arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 2 +- arch/arm/mach-omap2/pm24xx.c | 1 + arch/arm/mach-omap2/pm34xx.c | 2 ++ arch/arm/plat-omap/debug-leds.c | 1 + drivers/gpio/gpio-omap.c | 15 ++++++++------- drivers/mtd/nand/ams-delta.c | 8 ++++++-- include/linux/platform_data/gpio-omap.h | 15 ++------------- sound/soc/omap/sdp3430.c | 1 + 28 files changed, 40 insertions(+), 31 deletions(-) rename arch/arm/plat-omap/include/plat/gpio.h => include/linux/platform_data/gpio-omap.h (94%)
arch/arm/mach-omap1/board-ams-delta.c +1 -0
@@ -26,6 +26,7 @@#include <linux/export.h> #include <linux/omapfb.h> #include <linux/io.h> +#include <linux/platform_data/gpio-omap.h> #include <media/soc_camera.h>
arch/arm/mach-omap1/board-osk.c +1 -0
@@ -39,6 +39,7 @@#include <linux/mtd/partitions.h> #include <linux/mtd/physmap.h> #include <linux/i2c/tps65010.h> +#include <linux/platform_data/gpio-omap.h> #include <linux/platform_data/omap1_bl.h> #include <asm/mach-types.h>
arch/arm/mach-omap1/gpio15xx.c +1 -0
@@ -17,6 +17,7 @@*/ #include <linux/gpio.h> +#include <linux/platform_data/gpio-omap.h> #define OMAP1_MPUIO_VBASE OMAP1_MPUIO_BASE#define OMAP1510_GPIO_BASE 0xFFFCE000
arch/arm/mach-omap1/gpio16xx.c +1 -0
@@ -17,6 +17,7 @@*/ #include <linux/gpio.h> +#include <linux/platform_data/gpio-omap.h> #define OMAP1610_GPIO1_BASE 0xfffbe400#define OMAP1610_GPIO2_BASE 0xfffbec00
arch/arm/mach-omap1/gpio7xx.c +1 -0
@@ -17,6 +17,7 @@*/ #include <linux/gpio.h> +#include <linux/platform_data/gpio-omap.h> #define OMAP7XX_GPIO1_BASE 0xfffbc000#define OMAP7XX_GPIO2_BASE 0xfffbc800
arch/arm/mach-omap1/include/mach/gpio.h +0 -2
@@ -1,5 +1,3 @@/* * arch/arm/mach-omap1/include/mach/gpio.h */ - -#include <plat/gpio.h>
arch/arm/mach-omap1/leds-h2p2-debug.c +1 -0
@@ -14,6 +14,7 @@#include <linux/kernel_stat.h> #include <linux/sched.h> #include <linux/io.h> +#include <linux/platform_data/gpio-omap.h> #include <mach/hardware.h> #include <asm/leds.h>
arch/arm/mach-omap1/leds.c +1 -0
@@ -6,6 +6,7 @@#include <linux/gpio.h> #include <linux/kernel.h> #include <linux/init.h> +#include <linux/platform_data/gpio-omap.h> #include <asm/leds.h> #include <asm/mach-types.h>
arch/arm/mach-omap2/board-am3517evm.c +1 -0
@@ -25,6 +25,7 @@#include <linux/can/platform/ti_hecc.h> #include <linux/davinci_emac.h> #include <linux/mmc/host.h> +#include <linux/platform_data/gpio-omap.h> #include <mach/hardware.h> #include <mach/am35xx.h>
arch/arm/mach-omap2/board-cm-t35.c +1 -0
@@ -23,6 +23,7 @@#include <linux/input/matrix_keypad.h> #include <linux/delay.h> #include <linux/gpio.h> +#include <linux/platform_data/gpio-omap.h> #include <linux/i2c/at24.h> #include <linux/i2c/twl.h>
arch/arm/mach-omap2/board-zoom-display.c +2 -0
@@ -18,6 +18,8 @@#include <video/omapdss.h> #include <mach/board-zoom.h> +#include <plat/cpu.h> +#define LCD_PANEL_RESET_GPIO_PROD 96#define LCD_PANEL_RESET_GPIO_PILOT 55#define LCD_PANEL_QVGA_GPIO 56
arch/arm/mach-omap2/board-zoom-peripherals.c +1 -0
@@ -19,6 +19,7 @@#include <linux/regulator/fixed.h> #include <linux/wl12xx.h> #include <linux/mmc/host.h> +#include <linux/platform_data/gpio-omap.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
arch/arm/mach-omap2/gpio.c +1 -0
@@ -21,6 +21,7 @@#include <linux/slab.h> #include <linux/interrupt.h> #include <linux/of.h> +#include <linux/platform_data/gpio-omap.h> #include <plat/omap_hwmod.h> #include <plat/omap_device.h>
arch/arm/mach-omap2/hsmmc.c +2 -0
@@ -15,6 +15,8 @@#include <linux/delay.h> #include <linux/gpio.h> #include <mach/hardware.h> +#include <linux/platform_data/gpio-omap.h> +#include <plat/mmc.h> #include <plat/omap-pm.h> #include <plat/mux.h>
arch/arm/mach-omap2/include/mach/gpio.h +0 -2
@@ -1,5 +1,3 @@/* * arch/arm/mach-omap2/include/mach/gpio.h */ - -#include <plat/gpio.h>
arch/arm/mach-omap2/msdi.c +1 -0
@@ -23,6 +23,7 @@#include <linux/kernel.h> #include <linux/err.h> +#include <linux/platform_data/gpio-omap.h> #include <plat/omap_hwmod.h> #include <plat/omap_device.h>
arch/arm/mach-omap2/omap_hwmod_2420_data.c +0 -1
@@ -18,7 +18,6 @@#include <plat/dma.h> #include <plat/serial.h> #include <plat/i2c.h> -#include <plat/gpio.h> #include <plat/mcspi.h> #include <plat/dmtimer.h> #include <plat/l3_2xxx.h>
arch/arm/mach-omap2/omap_hwmod_2430_data.c +0 -1
@@ -18,7 +18,6 @@#include <plat/dma.h> #include <plat/serial.h> #include <plat/i2c.h> -#include <plat/gpio.h> #include <plat/mcbsp.h> #include <plat/mcspi.h> #include <plat/dmtimer.h>
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +1 -1
@@ -10,7 +10,7 @@*/ #include <plat/omap_hwmod.h> #include <plat/serial.h> -#include <plat/gpio.h> +#include <linux/platform_data/gpio-omap.h> #include <plat/dma.h> #include <plat/dmtimer.h> #include <plat/mcspi.h>
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +1 -1
@@ -15,6 +15,7 @@* XXX these should be marked initdata for multi-OMAP kernels */ #include <linux/power/smartreflex.h> +#include <linux/platform_data/gpio-omap.h> #include <plat/omap_hwmod.h> #include <mach/irqs.h>
@@ -24,7 +25,6 @@#include <plat/l3_3xxx.h> #include <plat/l4_3xxx.h> #include <plat/i2c.h> -#include <plat/gpio.h> #include <plat/mmc.h> #include <plat/mcbsp.h> #include <plat/mcspi.h>
arch/arm/mach-omap2/omap_hwmod_44xx_data.c +1 -1
@@ -19,12 +19,12 @@*/ #include <linux/io.h> +#include <linux/platform_data/gpio-omap.h> #include <linux/power/smartreflex.h> #include <plat/omap_hwmod.h> #include <plat/cpu.h> #include <plat/i2c.h> -#include <plat/gpio.h> #include <plat/dma.h> #include <plat/mcspi.h> #include <plat/mcbsp.h>
arch/arm/mach-omap2/pm24xx.c +1 -0
@@ -29,6 +29,7 @@#include <linux/irq.h> #include <linux/time.h> #include <linux/gpio.h> +#include <linux/platform_data/gpio-omap.h> #include <asm/mach/time.h> #include <asm/mach/irq.h>
arch/arm/mach-omap2/pm34xx.c +2 -0
@@ -28,6 +28,8 @@#include <linux/clk.h> #include <linux/delay.h> #include <linux/slab.h> +#include <linux/platform_data/gpio-omap.h> +#include <trace/events/power.h> #include <asm/suspend.h>
arch/arm/plat-omap/debug-leds.c +1 -0
@@ -12,6 +12,7 @@#include <linux/platform_device.h> #include <linux/leds.h> #include <linux/io.h> +#include <linux/platform_data/gpio-omap.h> #include <mach/hardware.h> #include <asm/leds.h>
drivers/gpio/gpio-omap.c +8 -7
@@ -25,11 +25,9 @@#include <linux/of.h> #include <linux/of_device.h> #include <linux/irqdomain.h> +#include <linux/gpio.h> +#include <linux/platform_data/gpio-omap.h> -#include <mach/hardware.h> -#include <asm/irq.h> -#include <mach/irqs.h> -#include <asm/gpio.h> #include <asm/mach/irq.h> #define OFF_MODE 1
@@ -385,13 +383,16 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio,static int gpio_irq_type (struct irq_data *d,unsigned type) {struct gpio_bank *bank =irq_data_get_irq_chip_data (d); -unsigned gpio; +unsigned gpio =0 ;int retval;unsigned long flags; -if (!cpu_class_is_omap2 () && d->irq >IH_MPUIO_BASE ) +#ifdef CONFIG_ARCH_OMAP1 +if (d->irq >IH_MPUIO_BASE ) gpio =OMAP_MPUIO (d->irq -IH_MPUIO_BASE ); -else +#endif + +if (!gpio) gpio =irq_to_gpio (bank, d->irq);if (type & ~IRQ_TYPE_SENSE_MASK )
drivers/mtd/nand/ams-delta.c +6 -2
@@ -23,12 +23,16 @@#include <linux/mtd/mtd.h> #include <linux/mtd/nand.h> #include <linux/mtd/partitions.h> +#include <linux/gpio.h> +#include <linux/platform_data/gpio-omap.h> +#include <asm/io.h> -#include <mach/hardware.h> #include <asm/sizes.h> -#include <linux/gpio.h> +#include <plat/board-ams-delta.h> +#include <mach/hardware.h> +/* * MTD structure for E3 (Delta) */
include/linux/platform_data/gpio-omap.h renamed from arch/arm/plat-omap/include/plat/gpio.h +2 -13
@@ -1,6 +1,4 @@/* -* arch/arm/plat-omap/include/mach/gpio.h -* * OMAP GPIO handling defines and functions * * Copyright (C) 2003-2005 Nokia Corporation
@@ -155,6 +153,8 @@#define OMAP4_GPIO_CLEARDATAOUT 0x0190#define OMAP4_GPIO_SETDATAOUT 0x0194 +#define OMAP_MAX_GPIO_LINES 192 +#define OMAP_MPUIO (nr) (OMAP_MAX_GPIO_LINES + (nr))#define OMAP_GPIO_IS_MPUIO (nr) ((nr) >= OMAP_MAX_GPIO_LINES)
@@ -213,16 +213,5 @@ extern void omap2_gpio_prepare_for_idle(int off_mode);extern void omap2_gpio_resume_after_idle (void );extern void omap_set_gpio_debounce (int gpio,int enable);extern void omap_set_gpio_debounce_time (int gpio,int enable); -/*-------------------------------------------------------------------------*/ - -/* -* Wrappers for "new style" GPIO calls, using the new infrastructure -* which lets us plug in FPGA, I2C, and other implementations. -* -* The original OMAP-specific calls should eventually be removed. -*/ - -#include <linux/errno.h> -#include <asm-generic/gpio.h> #endif
sound/soc/omap/sdp3430.c +1 -0
@@ -34,6 +34,7 @@#include <mach/hardware.h> #include <mach/gpio.h> #include <plat/mcbsp.h> +#include <linux/platform_data/gpio-omap.h> /* Register descriptions for twl4030 codec part */ #include <linux/mfd/twl4030-audio.h>
Tony Lindgren
maintainerPATCH 7/17 Input: omap-keypad: Remove dependencies to mach includes
In reply to Tony LindgrenWe can't build CONFIG_ARCH_OMAP1 set with ARCH_OMAP2PLUS because of different compiler flags needed, so we can define omap_kp_24xx() instead of using cpu_is_omap24xx(). This way we can remove depency to plat and mach headers which is needed for ARM common zImage support.
Also remove INT_KEYBOARD by using omap_kp->irq.
Note that this patch depends on an earlier patch "ARM: OMAP: Move gpio.h to include/linux/platform_data".
--- drivers/input/keyboard/omap-keypad.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-)
drivers/input/keyboard/omap-keypad.c +18 -16
@@ -35,16 +35,19 @@#include <linux/mutex.h> #include <linux/errno.h> #include <linux/slab.h> -#include <asm/gpio.h> +#include <linux/gpio.h> +#include <linux/platform_data/gpio-omap.h> #include <plat/keypad.h> -#include <plat/menelaus.h> -#include <asm/irq.h> -#include <mach/hardware.h> -#include <asm/io.h> -#include <plat/mux.h> #undef NEW_BOARD_LEARNING_MODE +#ifdef CONFIG_ARCH_OMAP1 +#define omap_kp_24xx () 0 +#else +#define omap_kp_24xx () 1 +#endif + +static struct omap_kp *omap_kp;static void omap_kp_tasklet (unsigned long );static void omap_kp_timer (unsigned long );
@@ -99,7 +102,7 @@ static irqreturn_t omap_kp_interrupt(int irq, void *dev_id)struct omap_kp *omap_kp = dev_id;/* disable keyboard interrupt and schedule for handling */ -if (cpu_is_omap24xx ()) { +if (omap_kp_24xx ()) {int i;for (i =0 ; i < omap_kp->rows; i++) {
@@ -134,7 +137,7 @@ static void omap_kp_scan_keypad(struct omap_kp *omap_kp, unsigned char *state)int col =0 ;/* read the keypad status */ -if (cpu_is_omap24xx ()) { +if (omap_kp_24xx ()) {/* read the keypad status */ for (col =0 ; col < omap_kp->cols; col++) {set_col_gpio_val (omap_kp, ~(1 << col));
@@ -222,7 +225,7 @@ static void omap_kp_tasklet(unsigned long data)mod_timer (&omap_kp_data->timer, jiffies + delay); }else {/* enable interrupts */ -if (cpu_is_omap24xx ()) { +if (omap_kp_24xx ()) {int i;for (i =0 ; i < omap_kp_data->rows; i++)enable_irq (gpio_to_irq (row_gpios[i]));
@@ -253,9 +256,9 @@ static ssize_t omap_kp_enable_store(struct device *dev, struct device_attributemutex_lock (&kp_enable_mutex);if (state != kp_enable) {if (state) -enable_irq (INT_KEYBOARD ); +enable_irq (omap_kp->irq);else -disable_irq (INT_KEYBOARD ); +disable_irq (omap_kp->irq); kp_enable = state; }mutex_unlock (&kp_enable_mutex);
@@ -286,7 +289,6 @@ static int omap_kp_resume(struct platform_device *dev)static int __devinit omap_kp_probe (struct platform_device *pdev) { -struct omap_kp *omap_kp;struct input_dev *input_dev;struct omap_kp_platform_data *pdata = pdev->dev.platform_data;int i, col_idx, row_idx, irq_idx, ret;
@@ -314,7 +316,7 @@ static int __devinit omap_kp_probe(struct platform_device *pdev) omap_kp->input = input_dev;/* Disable the interrupt for the MPUIO keyboard */ -if (!cpu_is_omap24xx ()) +if (!omap_kp_24xx ())omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT );if (pdata->delay)
@@ -328,7 +330,7 @@ static int __devinit omap_kp_probe(struct platform_device *pdev) omap_kp->rows = pdata->rows; omap_kp->cols = pdata->cols; -if (cpu_is_omap24xx ()) { +if (omap_kp_24xx ()) {/* Cols: outputs */ for (col_idx =0 ; col_idx < omap_kp->cols; col_idx++) {if (gpio_request (col_gpios[col_idx],"omap_kp_col" ) <0 ) {
@@ -394,7 +396,7 @@ static int __devinit omap_kp_probe(struct platform_device *pdev)/* scan current status and enable interrupt */ omap_kp_scan_keypad (omap_kp, keypad_state); -if (!cpu_is_omap24xx ()) { +if (!omap_kp_24xx ()) { omap_kp->irq =platform_get_irq (pdev,0 );if (omap_kp->irq >=0 ) { if (request_irq(omap_kp->irq, omap_kp_interrupt, 0,
@@ -439,7 +441,7 @@ static int __devexit omap_kp_remove(struct platform_device *pdev)/* disable keypad interrupt handling */ tasklet_disable (&kp_tasklet); -if (cpu_is_omap24xx ()) { +if (omap_kp_24xx ()) {int i;for (i =0 ; i < omap_kp->cols; i++)gpio_free (col_gpios[i]);
PATCH 7/17 Input: omap-keypad: Remove dependencies to mach includes
Hi,
Quoted 33 lines · Tony Lindgren
We can't build
CONFIG_ARCH_OMAP1set withARCH_OMAP2PLUSbecause of different compiler flags needed, so we can defineomap_kp_24xx()instead of usingcpu_is_omap24xx(). This way we can remove depency to plat and mach headers which is needed for ARM common zImage support.Also remove
INT_KEYBOARDby usingomap_kp->irq.Note that this patch depends on an earlier patch "ARM: OMAP: Move
gpio.htoinclude/linux/platform_data".Cc Dmitry Torokhov <[email protected]>Cc linux-input at vger.kernel.orgSigned-off-by Tony Lindgren <[email protected]>--- drivers/input/keyboard/omap-keypad.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-)drivers/input/keyboard/omap-keypad.c +2
-4@@ -35,16 +35,19 @@#include <linux/mutex.h> #include <linux/errno.h> #include <linux/slab.h> -#include <asm/gpio.h> +#include <linux/gpio.h> +#include <linux/platform_data/gpio-omap.h> #include <plat/keypad.h> -#include <plat/menelaus.h> -#include <asm/irq.h> -#include <mach/hardware.h>
drivers/input/keyboard/omap-keypad.c line 48
Quoted 10 lines
drivers/input/keyboard/omap-keypad.c +5
-2-#include <asm/io.h> -#include <plat/mux.h> #undef NEW_BOARD_LEARNING_MODE +#ifdef CONFIG_ARCH_OMAP1 +#define omap_kp_24xx () 0 +#else +#define omap_kp_24xx () 1 +#endif
I would rather use revision detection or different driver names (if revision register is broken).
drivers/input/keyboard/omap-keypad.c line 50
Quoted 1 line
drivers/input/keyboard/omap-keypad.c +1
-0+static struct omap_kp *omap_kp;
please don't. This will prevent multiple instances of this driver. Even though I don't think we will ever have an omap with multiple keypad instances, it's still not a good practice IMHO.
Also, this ends up being "hidden" (if you have a better work let me know) in most functions since they either pass omap_kp as argument or define a local omap_kp variable.
Sourav, is the revision register on this IP working fine across multiple OMAPs ?
Quoted 31 lines
drivers/input/keyboard/omap-keypad.c +3
-3static void omap_kp_tasklet (unsigned long );static void omap_kp_timer (unsigned long );@@ -99,7 +102,7 @@ static irqreturn_t omap_kp_interrupt(int irq, void *dev_id)struct omap_kp *omap_kp = dev_id;/* disable keyboard interrupt and schedule for handling */ -if (cpu_is_omap24xx ()) { +if (omap_kp_24xx ()) {int i;for (i =0 ; i < omap_kp->rows; i++) {@@ -134,7 +137,7 @@ static void omap_kp_scan_keypad(struct omap_kp *omap_kp, unsigned char *state)int col =0 ;/* read the keypad status */ -if (cpu_is_omap24xx ()) { +if (omap_kp_24xx ()) {/* read the keypad status */ for (col =0 ; col < omap_kp->cols; col++) {set_col_gpio_val (omap_kp, ~(1 << col));@@ -222,7 +225,7 @@ static void omap_kp_tasklet(unsigned long data)mod_timer (&omap_kp_data->timer, jiffies + delay); }else {/* enable interrupts */ -if (cpu_is_omap24xx ()) { +if (omap_kp_24xx ()) {int i;for (i =0 ; i < omap_kp_data->rows; i++)enable_irq (gpio_to_irq (row_gpios[i]));
drivers/input/keyboard/omap-keypad.c static ssize_t omap_kp_enable_store(struct device *dev, struct device_attribute · line 261
Quoted 8 lines
drivers/input/keyboard/omap-keypad.c +2
-2@@ -253,9 +256,9 @@ static ssize_t omap_kp_enable_store(struct device *dev, struct device_attributemutex_lock (&kp_enable_mutex);if (state != kp_enable) {if (state) -enable_irq (INT_KEYBOARD ); +enable_irq (omap_kp->irq);else -disable_irq (INT_KEYBOARD ); +disable_irq (omap_kp->irq);
GREAT!! :-)
drivers/input/keyboard/omap-keypad.c static int omap_kp_resume(struct platform_device *dev) · line 289
Quoted 8 lines
drivers/input/keyboard/omap-keypad.c +0
-1kp_enable = state; }mutex_unlock (&kp_enable_mutex);@@ -286,7 +289,6 @@ static int omap_kp_resume(struct platform_device *dev)static int __devinit omap_kp_probe (struct platform_device *pdev) { -struct omap_kp *omap_kp;
???? I don't see the point for that global omap_kp, actually ...
Quoted 44 lines
drivers/input/keyboard/omap-keypad.c +4
-5struct input_dev *input_dev;struct omap_kp_platform_data *pdata = pdev->dev.platform_data;int i, col_idx, row_idx, irq_idx, ret;@@ -314,7 +316,7 @@ static int __devinit omap_kp_probe(struct platform_device *pdev) omap_kp->input = input_dev;/* Disable the interrupt for the MPUIO keyboard */ -if (!cpu_is_omap24xx ()) +if (!omap_kp_24xx ())omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT );if (pdata->delay)@@ -328,7 +330,7 @@ static int __devinit omap_kp_probe(struct platform_device *pdev) omap_kp->rows = pdata->rows; omap_kp->cols = pdata->cols; -if (cpu_is_omap24xx ()) { +if (omap_kp_24xx ()) {/* Cols: outputs */ for (col_idx =0 ; col_idx < omap_kp->cols; col_idx++) {if (gpio_request (col_gpios[col_idx],"omap_kp_col" ) <0 ) {@@ -394,7 +396,7 @@ static int __devinit omap_kp_probe(struct platform_device *pdev)/* scan current status and enable interrupt */ omap_kp_scan_keypad (omap_kp, keypad_state); -if (!cpu_is_omap24xx ()) { +if (!omap_kp_24xx ()) { omap_kp->irq =platform_get_irq (pdev,0 );if (omap_kp->irq >=0 ) { if (request_irq(omap_kp->irq, omap_kp_interrupt, 0,@@ -439,7 +441,7 @@ static int __devexit omap_kp_remove(struct platform_device *pdev)/* disable keypad interrupt handling */ tasklet_disable (&kp_tasklet); -if (cpu_is_omap24xx ()) { +if (omap_kp_24xx ()) {int i;for (i =0 ; i < omap_kp->cols; i++)gpio_free (col_gpios[i]); --To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120911/206586f7/attachment-0001.sig>
Tony Lindgren
maintainerPATCH 7/17 Input: omap-keypad: Remove dependencies to mach includes
Quoted 10 lines · Felipe Balbi
drivers/input/keyboard/omap-keypad.c line 48
Quoted 7 lines
drivers/input/keyboard/omap-keypad.c +5
-0+#ifdef CONFIG_ARCH_OMAP1 +#define omap_kp_24xx () 0 +#else +#define omap_kp_24xx () 1 +#endif I would rather use revision detection or different driver names (if revision register is broken).
Hmm actually looks like we can actually remove all the omap2+ support as we no longer have any users for this one. I think I already converted the last one to matrix-keypad a while back.
Quoted 9 lines
Quoted 1 line
+static struct
omap_kp*omap_kp;please don't. This will prevent multiple instances of this driver. Even though I don't think we will ever have an omap with multiple keypad instances, it's still not a good practice IMHO.
Also, this ends up being "hidden" (if you have a better work let me know) in most functions since they either pass
omap_kpas argument or define a localomap_kpvariable.
Yeah good point, I'll update that and remove the omap2+ support for this driver.
Quoted 2 lines
Sourav, is the revision register on this IP working fine across multiple OMAPs ?
Sounds like no need for that, as we're no longer using this for omap2+..
Quoted 11 lines
drivers/input/keyboard/omap-keypad.c static ssize_t omap_kp_enable_store(struct device *dev, struct device_attribute · line 261
Quoted 9 lines
drivers/input/keyboard/omap-keypad.c +2
-2@@ -253,9 +256,9 @@ static ssize_t omap_kp_enable_store(struct device *dev, struct device_attributemutex_lock (&kp_enable_mutex);if (state != kp_enable) {if (state) -enable_irq (INT_KEYBOARD ); +enable_irq (omap_kp->irq);else -disable_irq (INT_KEYBOARD ); +disable_irq (omap_kp->irq);GREAT!! :-)
Heh yeah that nice way to do it :)
Quoted 5 lines
drivers/input/keyboard/omap-keypad.c static int omap_kp_resume(struct platform_device *dev) · line 289
Quoted 3 lines
drivers/input/keyboard/omap-keypad.c +0
-1static int __devinit omap_kp_probe (struct platform_device *pdev) { -struct omap_kp *omap_kp;???? I don't see the point for that global
omap_kp, actually ...
Yes you're right. Will send an updated one tomorrow.
Regards,
Tony
Tony Lindgren
maintainerPATCH 7/17 Input: omap-keypad: Remove dependencies to mach includes
Quoted 9 lines · Tony Lindgren
Quoted 5 lines · Felipe Balbi
Review
Quoted 3 lines
static int
__devinitomap_kp_probe(struct platform_device *pdev){(quoted diff) +0
-1- struct omap_kp *omap_kp;???? I don't see the point for that global
omap_kp, actually ...Yes you're right. Will send an updated one tomorrow.
Here's the updated patch that just removes all omap2+ code, and does not use the global omap_kp.
Regards,
Tony
From: Tony Lindgren <[email protected]>
Date: Fri, 7 Sep 2012 13:27:58 -0700
Subject: [PATCH] Input: omap-keypad: Remove dependencies to mach includes
Remove support for omap2+ as it's no longer needed since it's using matrix-keypad. This way we can remove depency to plat and mach headers which is needed for ARM common zImage support.
Also remove INT_KEYBOARD by using omap_kp->irq.
Note that this patch depends on an earlier patch "ARM: OMAP: Move gpio.h to include/linux/platform_data".
drivers/input/keyboard/Kconfig +1 -1
@@ -533,7 +533,7 @@ config KEYBOARD_DAVINCI config KEYBOARD_OMAP tristate "TI OMAP keypad support" - depends on (ARCH_OMAP1 || ARCH_OMAP2) + depends on ARCH_OMAP1 select INPUT_MATRIXKMAP help Say Y here if you want to use the OMAP keypad.
drivers/input/keyboard/omap-keypad.c +34 -120
235 lines not on this page · raw message
PATCH 7/17 Input: omap-keypad: Remove dependencies to mach includes
Hi,
Quoted 28 lines · Tony Lindgren
Quoted 9 lines · Tony Lindgren
Quoted 5 lines · Felipe Balbi
Review
Quoted 3 lines
static int
__devinitomap_kp_probe(struct platform_device *pdev){(quoted diff) +0
-1- struct omap_kp *omap_kp;???? I don't see the point for that global
omap_kp, actually ...Yes you're right. Will send an updated one tomorrow.
Here's the updated patch that just removes all omap2+ code, and does not use the global
omap_kp.Regards,
Tony
From: Tony Lindgren <[email protected]>
Date: Fri, 7 Sep 2012 13:27:58 -0700
Subject: [PATCH] Input: omap-keypad: Remove dependencies to mach includesRemove support for omap2+ as it's no longer needed since it's using matrix-keypad. This way we can remove depency to plat and mach headers which is needed for ARM common zImage support.
Quoted 8 lines
Also remove
INT_KEYBOARDby usingomap_kp->irq.Note that this patch depends on an earlier patch "ARM: OMAP: Move
gpio.htoinclude/linux/platform_data".Cc Dmitry Torokhov <[email protected]>Cc linux-input at vger.kernel.orgSigned-off-by Tony Lindgren <[email protected]>
This looks ok to me from a code standpoint. Sourav how does this look to you ?
FWIW:
Quoted 263 lines
drivers/input/keyboard/Kconfig +1
-1@@ -533,7 +533,7 @@ config KEYBOARD_DAVINCI config KEYBOARD_OMAP tristate "TI OMAP keypad support" - depends on (ARCH_OMAP1 || ARCH_OMAP2) + depends on ARCH_OMAP1 select INPUT_MATRIXKMAP help Say Y here if you want to use the OMAP keypad.drivers/input/keyboard/omap-keypad.c +34
-120@@ -35,13 +35,9 @@#include <linux/mutex.h> #include <linux/errno.h> #include <linux/slab.h> -#include <asm/gpio.h> +#include <linux/gpio.h> +#include <linux/platform_data/gpio-omap.h> #include <plat/keypad.h> -#include <plat/menelaus.h> -#include <asm/irq.h> -#include <mach/hardware.h> -#include <asm/io.h> -#include <plat/mux.h> #undef NEW_BOARD_LEARNING_MODE@@ -96,28 +92,8 @@ static u8 get_row_gpio_val(struct omap_kp *omap_kp)static irqreturn_t omap_kp_interrupt (int irq,void *dev_id) { -struct omap_kp *omap_kp = dev_id; -/* disable keyboard interrupt and schedule for handling */ -if (cpu_is_omap24xx ()) { -int i; - -for (i =0 ; i < omap_kp->rows; i++) { -int gpio_irq =gpio_to_irq (row_gpios[i]); -/* -* The interrupt which we're currently handling should -* be disabled _nosync() to avoid deadlocks waiting -* for this handler to complete. All others should -* be disabled the regular way for SMP safety. -*/ -if (gpio_irq == irq) -disable_irq_nosync (gpio_irq); -else -disable_irq (gpio_irq); - } - }else -/* disable keyboard interrupt and schedule for handling */ -omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT );tasklet_schedule (&kp_tasklet);@@ -133,33 +109,22 @@ static void omap_kp_scan_keypad(struct omap_kp *omap_kp, unsigned char *state) {int col =0 ; -/* read the keypad status */ -if (cpu_is_omap24xx ()) { -/* read the keypad status */ -for (col =0 ; col < omap_kp->cols; col++) { -set_col_gpio_val (omap_kp, ~(1 << col)); - state[col] = ~(get_row_gpio_val (omap_kp)) &0xff ; - } -set_col_gpio_val (omap_kp,0 ); - - }else { -/* disable keyboard interrupt and schedule for handling */ -omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +/* disable keyboard interrupt and schedule for handling */ +omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); -/* read the keypad status */ -omap_writew (0xff ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); -for (col =0 ; col < omap_kp->cols; col++) { -omap_writew (~(1 << col) &0xff , -OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); +/* read the keypad status */ +omap_writew (0xff ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); +for (col =0 ; col < omap_kp->cols; col++) { +omap_writew (~(1 << col) &0xff , +OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); -udelay (omap_kp->delay); +udelay (omap_kp->delay); - state[col] = ~omap_readw (OMAP1_MPUIO_BASE + -OMAP_MPUIO_KBR_LATCH ) &0xff ; - } -omap_writew (0x00 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); -udelay (2 ); + state[col] = ~omap_readw (OMAP1_MPUIO_BASE + +OMAP_MPUIO_KBR_LATCH ) &0xff ; } +omap_writew (0x00 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); +udelay (2 ); }static void omap_kp_tasklet (unsigned long data)@@ -222,14 +187,8 @@ static void omap_kp_tasklet(unsigned long data)mod_timer (&omap_kp_data->timer, jiffies + delay); }else {/* enable interrupts */ -if (cpu_is_omap24xx ()) { -int i; -for (i =0 ; i < omap_kp_data->rows; i++) -enable_irq (gpio_to_irq (row_gpios[i])); - }else { -omap_writew (0 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); - kp_cur_group =-1 ; - } +omap_writew (0 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); + kp_cur_group =-1 ; } }@@ -242,6 +201,7 @@ static ssize_t omap_kp_enable_show(struct device *dev,static ssize_t omap_kp_enable_store (struct device *dev,struct device_attribute *attr,const char *buf,size_t count) { +struct omap_kp *omap_kp =dev_get_drvdata (dev);int state;if (sscanf (buf,"%u" , &state) !=1 )@@ -253,9 +213,9 @@ static ssize_t omap_kp_enable_store(struct device *dev, struct device_attributemutex_lock (&kp_enable_mutex);if (state != kp_enable) {if (state) -enable_irq (INT_KEYBOARD ); +enable_irq (omap_kp->irq);else -disable_irq (INT_KEYBOARD ); +disable_irq (omap_kp->irq); kp_enable = state; }mutex_unlock (&kp_enable_mutex);@@ -289,7 +249,7 @@ static int __devinit omap_kp_probe(struct platform_device *pdev)struct omap_kp *omap_kp;struct input_dev *input_dev;struct omap_kp_platform_data *pdata = pdev->dev.platform_data; -int i, col_idx, row_idx, irq_idx, ret; +int i, col_idx, row_idx, ret;unsigned int row_shift, keycodemax;if (!pdata->rows || !pdata->cols || !pdata->keymap_data) {@@ -314,8 +274,7 @@ static int __devinit omap_kp_probe(struct platform_device *pdev) omap_kp->input = input_dev;/* Disable the interrupt for the MPUIO keyboard */ -if (!cpu_is_omap24xx ()) -omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT );if (pdata->delay) omap_kp->delay = pdata->delay;@@ -328,31 +287,8 @@ static int __devinit omap_kp_probe(struct platform_device *pdev) omap_kp->rows = pdata->rows; omap_kp->cols = pdata->cols; -if (cpu_is_omap24xx ()) { -/* Cols: outputs */ -for (col_idx =0 ; col_idx < omap_kp->cols; col_idx++) { -if (gpio_request (col_gpios[col_idx],"omap_kp_col" ) <0 ) { -printk (KERN_ERR "Failed to request" -"GPIO%d for keypad\n" , - col_gpios[col_idx]); - goto err1; - } -gpio_direction_output (col_gpios[col_idx],0 ); - } -/* Rows: inputs */ -for (row_idx =0 ; row_idx < omap_kp->rows; row_idx++) { -if (gpio_request (row_gpios[row_idx],"omap_kp_row" ) <0 ) { -printk (KERN_ERR "Failed to request" -"GPIO%d for keypad\n" , - row_gpios[row_idx]); - goto err2; - } -gpio_direction_input (row_gpios[row_idx]); - } - }else { - col_idx =0 ; - row_idx =0 ; - } + col_idx =0 ; + row_idx =0 ;setup_timer (&omap_kp->timer, omap_kp_timer, (unsigned long )omap_kp);@@ -394,27 +330,16 @@ static int __devinit omap_kp_probe(struct platform_device *pdev)/* scan current status and enable interrupt */ omap_kp_scan_keypad (omap_kp, keypad_state); -if (!cpu_is_omap24xx ()) { - omap_kp->irq =platform_get_irq (pdev,0 ); -if (omap_kp->irq >=0 ) { -if (request_irq (omap_kp->irq, omap_kp_interrupt,0 , -"omap-keypad" , omap_kp) <0 ) - goto err4; - } -omap_writew (0 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); - }else { -for (irq_idx =0 ; irq_idx < omap_kp->rows; irq_idx++) { -if (request_irq (gpio_to_irq (row_gpios[irq_idx]), - omap_kp_interrupt, -IRQF_TRIGGER_FALLING , -"omap-keypad" , omap_kp) <0 ) - goto err5; - } + omap_kp->irq =platform_get_irq (pdev,0 ); +if (omap_kp->irq >=0 ) { +if (request_irq (omap_kp->irq, omap_kp_interrupt,0 , +"omap-keypad" , omap_kp) <0 ) + goto err4; } +omap_writew (0 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +return 0 ; -err5: -for (i = irq_idx -1 ; i >=0 ; i--) -free_irq (row_gpios[i], omap_kp); + err4:input_unregister_device (omap_kp->input); input_dev =NULL ;@@ -423,7 +348,6 @@ err3: err2:for (i = row_idx -1 ; i >=0 ; i--)gpio_free (row_gpios[i]); -err1:for (i = col_idx -1 ; i >=0 ; i--)gpio_free (col_gpios[i]);@@ -439,18 +363,8 @@ static int __devexit omap_kp_remove(struct platform_device *pdev)/* disable keypad interrupt handling */ tasklet_disable (&kp_tasklet); -if (cpu_is_omap24xx ()) { -int i; -for (i =0 ; i < omap_kp->cols; i++) -gpio_free (col_gpios[i]); -for (i =0 ; i < omap_kp->rows; i++) { -gpio_free (row_gpios[i]); -free_irq (gpio_to_irq (row_gpios[i]), omap_kp); - } - }else { -omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); -free_irq (omap_kp->irq, omap_kp); - } +omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +free_irq (omap_kp->irq, omap_kp);del_timer_sync (&omap_kp->timer);tasklet_kill (&kp_tasklet);
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120911/fbb7f955/attachment.sig>
PATCH 7/17 Input: omap-keypad: Remove dependencies to mach includes
Hi,
Quoted 36 lines · Felipe Balbi
Hi,
Quoted 33 lines · Tony Lindgren
Quoted 9 lines · Tony Lindgren
Quoted 5 lines · Felipe Balbi
Quoted 3 lines
static int
__devinitomap_kp_probe(struct platform_device *pdev){
- structomap_kp*omap_kp;???? I don't see the point for that global
omap_kp, actually ...Yes you're right. Will send an updated one tomorrow.
Here's the updated patch that just removes all omap2+ code, and does not use the global
omap_kp.Regards,
Tony
From: Tony Lindgren <[email protected]>
Date: Fri, 7 Sep 2012 13:27:58 -0700
Subject: [PATCH] Input: omap-keypad: Remove dependencies to mach includesRemove support for omap2+ as it's no longer needed since it's using matrix-keypad. This way we can remove depency to plat and mach headers which is needed for ARM common zImage support.
Also remove
INT_KEYBOARDby usingomap_kp->irq.Note that this patch depends on an earlier patch "ARM: OMAP: Move
gpio.htoinclude/linux/platform_data".
Quoted 7 lines
Quoted 3 lines
Cc Dmitry Torokhov <[email protected]>Cc linux-input at vger.kernel.orgSigned-off-by Tony Lindgren <[email protected]>This looks ok to me from a code standpoint. Sourav how does this look to you ?
The patch looks good to me. Makes perfect sense to remove the omap2+ code from the driver.
Quoted 270 lines
FWIW:
Reviewed-by Felipe Balbi <[email protected]>Quoted 253 lines
drivers/input/keyboard/Kconfig +1
-1@@ -533,7 +533,7 @@ config KEYBOARD_DAVINCI config KEYBOARD_OMAP tristate "TI OMAP keypad support" - depends on (ARCH_OMAP1 || ARCH_OMAP2) + depends on ARCH_OMAP1 select INPUT_MATRIXKMAP help Say Y here if you want to use the OMAP keypad.drivers/input/keyboard/omap-keypad.c +32
-115@@ -35,13 +35,9 @@#include <linux/mutex.h> #include <linux/errno.h> #include <linux/slab.h> -#include <asm/gpio.h> +#include <linux/gpio.h> +#include <linux/platform_data/gpio-omap.h> #include <plat/keypad.h> -#include <plat/menelaus.h> -#include <asm/irq.h> -#include <mach/hardware.h> -#include <asm/io.h> -#include <plat/mux.h> #undef NEW_BOARD_LEARNING_MODE@@ -96,28 +92,8 @@ static u8 get_row_gpio_val(struct omap_kp *omap_kp)static irqreturn_t omap_kp_interrupt (int irq,void *dev_id) { -struct omap_kp *omap_kp = dev_id; -/* disable keyboard interrupt and schedule for handling */ -if (cpu_is_omap24xx ()) { -int i; - -for (i =0 ; i < omap_kp->rows; i++) { -int gpio_irq =gpio_to_irq (row_gpios[i]); -/* -* The interrupt which we're currently handling should -* be disabled _nosync() to avoid deadlocks waiting -* for this handler to complete. All others should -* be disabled the regular way for SMP safety. -*/ -if (gpio_irq == irq) -disable_irq_nosync (gpio_irq); -else -disable_irq (gpio_irq); - } - }else -/* disable keyboard interrupt and schedule for handling */ -omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT );tasklet_schedule (&kp_tasklet);@@ -133,33 +109,22 @@ static void omap_kp_scan_keypad(struct omap_kp *omap_kp, unsigned char *state) {int col =0 ; -/* read the keypad status */ -if (cpu_is_omap24xx ()) { -/* read the keypad status */ -for (col =0 ; col < omap_kp->cols; col++) { -set_col_gpio_val (omap_kp, ~(1 << col)); - state[col] = ~(get_row_gpio_val (omap_kp)) &0xff ; - } -set_col_gpio_val (omap_kp,0 ); - - }else { -/* disable keyboard interrupt and schedule for handling */ -omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +/* disable keyboard interrupt and schedule for handling */ +omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); -/* read the keypad status */ -omap_writew (0xff ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); -for (col =0 ; col < omap_kp->cols; col++) { -omap_writew (~(1 << col) &0xff , -OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); +/* read the keypad status */ +omap_writew (0xff ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); +for (col =0 ; col < omap_kp->cols; col++) { +omap_writew (~(1 << col) &0xff , +OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); -udelay (omap_kp->delay); +udelay (omap_kp->delay); - state[col] = ~omap_readw (OMAP1_MPUIO_BASE + -OMAP_MPUIO_KBR_LATCH ) &0xff ; - } -omap_writew (0x00 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); -udelay (2 ); + state[col] = ~omap_readw (OMAP1_MPUIO_BASE + +OMAP_MPUIO_KBR_LATCH ) &0xff ; } +omap_writew (0x00 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); +udelay (2 ); }static void omap_kp_tasklet (unsigned long data)@@ -222,14 +187,8 @@ static void omap_kp_tasklet(unsigned long data)mod_timer (&omap_kp_data->timer, jiffies + delay); }else {/* enable interrupts */ -if (cpu_is_omap24xx ()) { -int i; -for (i =0 ; i < omap_kp_data->rows; i++) -enable_irq (gpio_to_irq (row_gpios[i])); - }else { -omap_writew (0 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); - kp_cur_group =-1 ; - } +omap_writew (0 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); + kp_cur_group =-1 ; } }@@ -242,6 +201,7 @@ static ssize_t omap_kp_enable_show(struct device *dev,static ssize_t omap_kp_enable_store (struct device *dev,struct device_attribute *attr,const char *buf,size_t count) { +struct omap_kp *omap_kp =dev_get_drvdata (dev);int state;if (sscanf (buf,"%u" , &state) !=1 )@@ -253,9 +213,9 @@ static ssize_t omap_kp_enable_store(struct device *dev, struct device_attributemutex_lock (&kp_enable_mutex);if (state != kp_enable) {if (state) -enable_irq (INT_KEYBOARD ); +enable_irq (omap_kp->irq);else -disable_irq (INT_KEYBOARD ); +disable_irq (omap_kp->irq); kp_enable = state; }mutex_unlock (&kp_enable_mutex);@@ -289,7 +249,7 @@ static int __devinit omap_kp_probe(struct platform_device *pdev)struct omap_kp *omap_kp;struct input_dev *input_dev;struct omap_kp_platform_data *pdata = pdev->dev.platform_data; -int i, col_idx, row_idx, irq_idx, ret; +int i, col_idx, row_idx, ret;unsigned int row_shift, keycodemax;if (!pdata->rows || !pdata->cols || !pdata->keymap_data) {@@ -314,8 +274,7 @@ static int __devinit omap_kp_probe(struct platform_device *pdev) omap_kp->input = input_dev;/* Disable the interrupt for the MPUIO keyboard */ -if (!cpu_is_omap24xx ()) -omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT );if (pdata->delay) omap_kp->delay = pdata->delay;@@ -328,31 +287,8 @@ static int __devinit omap_kp_probe(struct platform_device *pdev) omap_kp->rows = pdata->rows; omap_kp->cols = pdata->cols; -if (cpu_is_omap24xx ()) { -/* Cols: outputs */ -for (col_idx =0 ; col_idx < omap_kp->cols; col_idx++) { -if (gpio_request (col_gpios[col_idx],"omap_kp_col" ) <0 ) { -printk (KERN_ERR "Failed to request" -"GPIO%d for keypad\n" , - col_gpios[col_idx]); - goto err1; - } -gpio_direction_output (col_gpios[col_idx],0 ); - } -/* Rows: inputs */ -for (row_idx =0 ; row_idx < omap_kp->rows; row_idx++) { -if (gpio_request (row_gpios[row_idx],"omap_kp_row" ) <0 ) { -printk (KERN_ERR "Failed to request" -"GPIO%d for keypad\n" , - row_gpios[row_idx]); - goto err2; - } -gpio_direction_input (row_gpios[row_idx]); - } - }else { - col_idx =0 ; - row_idx =0 ; - } + col_idx =0 ; + row_idx =0 ;setup_timer (&omap_kp->timer, omap_kp_timer, (unsigned long )omap_kp);@@ -394,27 +330,16 @@ static int __devinit omap_kp_probe(struct platform_device *pdev)/* scan current status and enable interrupt */ omap_kp_scan_keypad (omap_kp, keypad_state); -if (!cpu_is_omap24xx ()) { - omap_kp->irq =platform_get_irq (pdev,0 ); -if (omap_kp->irq >=0 ) { -if (request_irq (omap_kp->irq, omap_kp_interrupt,0 , -"omap-keypad" , omap_kp) <0 ) - goto err4; - } -omap_writew (0 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); - }else { -for (irq_idx =0 ; irq_idx < omap_kp->rows; irq_idx++) { -if (request_irq (gpio_to_irq (row_gpios[irq_idx]), - omap_kp_interrupt, -IRQF_TRIGGER_FALLING , -"omap-keypad" , omap_kp) <0 ) - goto err5; - } + omap_kp->irq =platform_get_irq (pdev,0 ); +if (omap_kp->irq >=0 ) { +if (request_irq (omap_kp->irq, omap_kp_interrupt,0 , +"omap-keypad" , omap_kp) <0 ) + goto err4; } +omap_writew (0 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +return 0 ; -err5: -for (i = irq_idx -1 ; i >=0 ; i--) -free_irq (row_gpios[i], omap_kp); + err4:input_unregister_device (omap_kp->input); input_dev =NULL ;@@ -423,7 +348,6 @@ err3: err2:for (i = row_idx -1 ; i >=0 ; i--)gpio_free (row_gpios[i]); -err1:for (i = col_idx -1 ; i >=0 ; i--)gpio_free (col_gpios[i]);@@ -439,18 +363,8 @@ static int __devexit omap_kp_remove(struct platform_device *pdev)/* disable keypad interrupt handling */ tasklet_disable (&kp_tasklet); -if (cpu_is_omap24xx ()) { -int i; -for (i =0 ; i < omap_kp->cols; i++) -gpio_free (col_gpios[i]); -for (i =0 ; i < omap_kp->rows; i++) { -gpio_free (row_gpios[i]); -free_irq (gpio_to_irq (row_gpios[i]), omap_kp);drivers/input/keyboard/omap-keypad.c static int __devexit omap_kp_remove(struct platform_device *pdev) · line 370
Quoted 10 lines
drivers/input/keyboard/omap-keypad.c +2
-5- } - }else { -omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); -free_irq (omap_kp->irq, omap_kp); - } +omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +free_irq (omap_kp->irq, omap_kp);del_timer_sync (&omap_kp->timer);tasklet_kill (&kp_tasklet);--
balbi
PATCH 7/17 Input: omap-keypad: Remove dependencies to mach includes
In reply to Tony LindgrenHi,
Quoted 287 lines · Tony Lindgren
Quoted 9 lines · Tony Lindgren
Quoted 5 lines · Felipe Balbi
Quoted 3 lines
static int
__devinitomap_kp_probe(struct platform_device *pdev){
- structomap_kp*omap_kp;???? I don't see the point for that global
omap_kp, actually ...Yes you're right. Will send an updated one tomorrow.
Here's the updated patch that just removes all omap2+ code, and does not use the global
omap_kp.Regards,
Tony
From: Tony Lindgren <[email protected]>
Date: Fri, 7 Sep 2012 13:27:58 -0700
Subject: [PATCH] Input: omap-keypad: Remove dependencies to mach includesRemove support for omap2+ as it's no longer needed since it's using matrix-keypad. This way we can remove depency to plat and mach headers which is needed for ARM common zImage support.
Also remove
INT_KEYBOARDby usingomap_kp->irq.Note that this patch depends on an earlier patch "ARM: OMAP: Move
gpio.htoinclude/linux/platform_data".Cc Dmitry Torokhov <[email protected]>Cc linux-input at vger.kernel.orgSigned-off-by Tony Lindgren <[email protected]>drivers/input/keyboard/Kconfig +1
-1@@ -533,7 +533,7 @@ config KEYBOARD_DAVINCI config KEYBOARD_OMAP tristate "TI OMAP keypad support" - depends on (ARCH_OMAP1 || ARCH_OMAP2) + depends on ARCH_OMAP1 select INPUT_MATRIXKMAP help Say Y here if you want to use the OMAP keypad.drivers/input/keyboard/omap-keypad.c +32
-113@@ -35,13 +35,9 @@#include <linux/mutex.h> #include <linux/errno.h> #include <linux/slab.h> -#include <asm/gpio.h> +#include <linux/gpio.h> +#include <linux/platform_data/gpio-omap.h> #include <plat/keypad.h> -#include <plat/menelaus.h> -#include <asm/irq.h> -#include <mach/hardware.h> -#include <asm/io.h> -#include <plat/mux.h> #undef NEW_BOARD_LEARNING_MODE@@ -96,28 +92,8 @@ static u8 get_row_gpio_val(struct omap_kp *omap_kp)static irqreturn_t omap_kp_interrupt (int irq,void *dev_id) { -struct omap_kp *omap_kp = dev_id; -/* disable keyboard interrupt and schedule for handling */ -if (cpu_is_omap24xx ()) { -int i; - -for (i =0 ; i < omap_kp->rows; i++) { -int gpio_irq =gpio_to_irq (row_gpios[i]); -/* -* The interrupt which we're currently handling should -* be disabled _nosync() to avoid deadlocks waiting -* for this handler to complete. All others should -* be disabled the regular way for SMP safety. -*/ -if (gpio_irq == irq) -disable_irq_nosync (gpio_irq); -else -disable_irq (gpio_irq); - } - }else -/* disable keyboard interrupt and schedule for handling */ -omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT );tasklet_schedule (&kp_tasklet);@@ -133,33 +109,22 @@ static void omap_kp_scan_keypad(struct omap_kp *omap_kp, unsigned char *state) {int col =0 ; -/* read the keypad status */ -if (cpu_is_omap24xx ()) { -/* read the keypad status */ -for (col =0 ; col < omap_kp->cols; col++) { -set_col_gpio_val (omap_kp, ~(1 << col)); - state[col] = ~(get_row_gpio_val (omap_kp)) &0xff ; - } -set_col_gpio_val (omap_kp,0 ); - - }else { -/* disable keyboard interrupt and schedule for handling */ -omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +/* disable keyboard interrupt and schedule for handling */ +omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); -/* read the keypad status */ -omap_writew (0xff ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); -for (col =0 ; col < omap_kp->cols; col++) { -omap_writew (~(1 << col) &0xff , -OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); +/* read the keypad status */ +omap_writew (0xff ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); +for (col =0 ; col < omap_kp->cols; col++) { +omap_writew (~(1 << col) &0xff , +OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); -udelay (omap_kp->delay); +udelay (omap_kp->delay); - state[col] = ~omap_readw (OMAP1_MPUIO_BASE + -OMAP_MPUIO_KBR_LATCH ) &0xff ; - } -omap_writew (0x00 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); -udelay (2 ); + state[col] = ~omap_readw (OMAP1_MPUIO_BASE + +OMAP_MPUIO_KBR_LATCH ) &0xff ; } +omap_writew (0x00 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC ); +udelay (2 ); }static void omap_kp_tasklet (unsigned long data)@@ -222,14 +187,8 @@ static void omap_kp_tasklet(unsigned long data)mod_timer (&omap_kp_data->timer, jiffies + delay); }else {/* enable interrupts */ -if (cpu_is_omap24xx ()) { -int i; -for (i =0 ; i < omap_kp_data->rows; i++) -enable_irq (gpio_to_irq (row_gpios[i])); - }else { -omap_writew (0 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); - kp_cur_group =-1 ; - } +omap_writew (0 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); + kp_cur_group =-1 ; } }@@ -242,6 +201,7 @@ static ssize_t omap_kp_enable_show(struct device *dev,static ssize_t omap_kp_enable_store (struct device *dev,struct device_attribute *attr,const char *buf,size_t count) { +struct omap_kp *omap_kp =dev_get_drvdata (dev);int state;if (sscanf (buf,"%u" , &state) !=1 )@@ -253,9 +213,9 @@ static ssize_t omap_kp_enable_store(struct device *dev, struct device_attributemutex_lock (&kp_enable_mutex);if (state != kp_enable) {if (state) -enable_irq (INT_KEYBOARD ); +enable_irq (omap_kp->irq);else -disable_irq (INT_KEYBOARD ); +disable_irq (omap_kp->irq); kp_enable = state; }mutex_unlock (&kp_enable_mutex);@@ -289,7 +249,7 @@ static int __devinit omap_kp_probe(struct platform_device *pdev)struct omap_kp *omap_kp;struct input_dev *input_dev;struct omap_kp_platform_data *pdata = pdev->dev.platform_data; -int i, col_idx, row_idx, irq_idx, ret; +int i, col_idx, row_idx, ret;unsigned int row_shift, keycodemax;if (!pdata->rows || !pdata->cols || !pdata->keymap_data) {@@ -314,8 +274,7 @@ static int __devinit omap_kp_probe(struct platform_device *pdev) omap_kp->input = input_dev;/* Disable the interrupt for the MPUIO keyboard */ -if (!cpu_is_omap24xx ()) -omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT );if (pdata->delay) omap_kp->delay = pdata->delay;@@ -328,31 +287,8 @@ static int __devinit omap_kp_probe(struct platform_device *pdev) omap_kp->rows = pdata->rows; omap_kp->cols = pdata->cols; -if (cpu_is_omap24xx ()) { -/* Cols: outputs */ -for (col_idx =0 ; col_idx < omap_kp->cols; col_idx++) { -if (gpio_request (col_gpios[col_idx],"omap_kp_col" ) <0 ) { -printk (KERN_ERR "Failed to request" -"GPIO%d for keypad\n" , - col_gpios[col_idx]); - goto err1; - } -gpio_direction_output (col_gpios[col_idx],0 ); - } -/* Rows: inputs */ -for (row_idx =0 ; row_idx < omap_kp->rows; row_idx++) { -if (gpio_request (row_gpios[row_idx],"omap_kp_row" ) <0 ) { -printk (KERN_ERR "Failed to request" -"GPIO%d for keypad\n" , - row_gpios[row_idx]); - goto err2; - } -gpio_direction_input (row_gpios[row_idx]); - } - }else { - col_idx =0 ; - row_idx =0 ; - } + col_idx =0 ; + row_idx =0 ;setup_timer (&omap_kp->timer, omap_kp_timer, (unsigned long )omap_kp);@@ -394,27 +330,16 @@ static int __devinit omap_kp_probe(struct platform_device *pdev)/* scan current status and enable interrupt */ omap_kp_scan_keypad (omap_kp, keypad_state); -if (!cpu_is_omap24xx ()) { - omap_kp->irq =platform_get_irq (pdev,0 ); -if (omap_kp->irq >=0 ) { -if (request_irq (omap_kp->irq, omap_kp_interrupt,0 , -"omap-keypad" , omap_kp) <0 ) - goto err4; - } -omap_writew (0 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); - }else { -for (irq_idx =0 ; irq_idx < omap_kp->rows; irq_idx++) { -if (request_irq (gpio_to_irq (row_gpios[irq_idx]), - omap_kp_interrupt, -IRQF_TRIGGER_FALLING , -"omap-keypad" , omap_kp) <0 ) - goto err5; - } + omap_kp->irq =platform_get_irq (pdev,0 ); +if (omap_kp->irq >=0 ) { +if (request_irq (omap_kp->irq, omap_kp_interrupt,0 , +"omap-keypad" , omap_kp) <0 ) + goto err4; } +omap_writew (0 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +return 0 ; -err5: -for (i = irq_idx -1 ; i >=0 ; i--) -free_irq (row_gpios[i], omap_kp); + err4:input_unregister_device (omap_kp->input); input_dev =NULL ;@@ -423,7 +348,6 @@ err3: err2:for (i = row_idx -1 ; i >=0 ; i--)gpio_free (row_gpios[i]); -err1:for (i = col_idx -1 ; i >=0 ; i--)gpio_free (col_gpios[i]);@@ -439,18 +363,8 @@ static int __devexit omap_kp_remove(struct platform_device *pdev)/* disable keypad interrupt handling */ tasklet_disable (&kp_tasklet); -if (cpu_is_omap24xx ()) { -int i; -for (i =0 ; i < omap_kp->cols; i++) -gpio_free (col_gpios[i]); -for (i =0 ; i < omap_kp->rows; i++) {
drivers/input/keyboard/omap-keypad.c static int __devexit omap_kp_remove(struct platform_device *pdev) · line 368
Quoted 10 lines
drivers/input/keyboard/omap-keypad.c +2
-7-gpio_free (row_gpios[i]); -free_irq (gpio_to_irq (row_gpios[i]), omap_kp); - } - }else { -omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); -free_irq (omap_kp->irq, omap_kp); - } +omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +free_irq (omap_kp->irq, omap_kp);
FWIW,
Quoted 2 lines
drivers/input/keyboard/omap-keypad.c +0
-0del_timer_sync (&omap_kp->timer);tasklet_kill (&kp_tasklet);
Tony Lindgren
maintainerPATCH 8/17 W1: OMAP HDQ1W: Remove dependencies to mach/hardware.h
In reply to Tony LindgrenNo need for hardcoded IRQ here.
We can't include mach headers for ARM common zImage support.
--- drivers/w1/masters/omap_hdq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/w1/masters/omap_hdq.c +1 -2
@@ -19,7 +19,6 @@#include <linux/pm_runtime.h> #include <asm/irq.h> -#include <mach/hardware.h> #include "../w1.h" #include "../w1_int.h"
@@ -644,7 +643,7 @@ static int omap_hdq_remove(struct platform_device *pdev)/* remove module dependency */ pm_runtime_disable (&pdev->dev); -free_irq (INT_24XX_HDQ_IRQ , hdq_data); +free_irq (platform_get_irq (pdev,0 ), hdq_data);platform_set_drvdata (pdev,NULL );iounmap (hdq_data->hdq_base);kfree (hdq_data);
Tony Lindgren
maintainerPATCH 9/17 serial/8250: Limit the omap workarounds to omap1
In reply to Tony LindgrenThese workarounds do not apply for CONFIG_ARCH_OMAP2PLUS at all, so let's make it just CONFIG_ARCH_OMAP1.
This is needed to for ARM common zImage changes for omap2+ to avoid including plat and mach headers.
--- drivers/tty/serial/8250/8250.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/8250/8250.c +2 -2
@@ -2336,7 +2336,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios,serial_port_out (port,UART_EFR , efr); } -#ifdef CONFIG_ARCH_OMAP +#ifdef CONFIG_ARCH_OMAP1 /* Workaround to enable 115200 baud on OMAP1510 internal ports */ if (cpu_is_omap1510 () &&is_omap_port (up)) {if (baud ==115200 ) {
@@ -2426,7 +2426,7 @@ static unsigned int serial8250_port_size(struct uart_8250_port *pt) {if (pt->port.iotype ==UPIO_AU )return 0x1000 ; -#ifdef CONFIG_ARCH_OMAP +#ifdef CONFIG_ARCH_OMAP1 if (is_omap_port (pt))return 0x16 << pt->port.regshift;#endif
PATCH 9/17 serial/8250: Limit the omap workarounds to omap1
Quoted 29 lines · On Mon, 10 Sep 2012 22:31:04 -0700 Tony Lindgren <[email protected]> wrote:
These workarounds do not apply for
CONFIG_ARCH_OMAP2PLUSat all, so let's make it justCONFIG_ARCH_OMAP1.This is needed to for ARM common zImage changes for omap2+ to avoid including plat and mach headers.
Cc Alan Cox <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Tony Lindgren <[email protected]>--- drivers/tty/serial/8250/8250.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)(quoted diff) +0
-0b/drivers/tty/serial/8250/8250.c index 8123f78..5b3f2fe 100644
drivers/tty/serial/8250/8250.c +1
-1@@ -2336,7 +2336,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, serial_port_out(port, UART_EFR, efr); } -#ifdef CONFIG_ARCH_OMAP +#ifdef CONFIG_ARCH_OMAP1 /* Workaround to enable 115200 baud on OMAP1510 internal ports */ if (cpu_is_omap1510 () &&is_omap_port (up)) {if (baud ==115200 ) {
drivers/tty/serial/8250/8250.c static unsigned int serial8250_port_size(struct · line 2432
Quoted 8 lines
drivers/tty/serial/8250/8250.c +1
-1@@ -2426,7 +2426,7 @@ static unsigned int serial8250_port_size(struct uart_8250_port *pt) {if (pt->port.iotype ==UPIO_AU )return 0x1000 ; -#ifdef CONFIG_ARCH_OMAP +#ifdef CONFIG_ARCH_OMAP1 if (is_omap_port (pt))return 0x16 << pt->port.regshift;#endif
Even better would be if for other cases is_omap_port and friends returned 0...
Tony Lindgren
maintainerPATCH 9/17 serial/8250: Limit the omap workarounds to omap1
Quoted 34 lines · Alan Cox
Quoted 31 lines · On Mon, 10 Sep 2012 22:31:04 -0700 Tony Lindgren <[email protected]> wrote:
These workarounds do not apply for
CONFIG_ARCH_OMAP2PLUSat all, so let's make it justCONFIG_ARCH_OMAP1.This is needed to for ARM common zImage changes for omap2+ to avoid including plat and mach headers.
Cc Alan Cox <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc linux-serial at vger.kernel.orgSigned-off-by Tony Lindgren <[email protected]>--- drivers/tty/serial/8250/8250.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)(quoted diff) +0
-0b/drivers/tty/serial/8250/8250.c index 8123f78..5b3f2fe 100644
drivers/tty/serial/8250/8250.c +1
-1@@ -2336,7 +2336,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, serial_port_out(port, UART_EFR, efr); } -#ifdef CONFIG_ARCH_OMAP +#ifdef CONFIG_ARCH_OMAP1 /* Workaround to enable 115200 baud on OMAP1510 internal ports */ if (cpu_is_omap1510 () &&is_omap_port (up)) {if (baud ==115200 ) {@@ -2426,7 +2426,7 @@ static unsigned int serial8250_port_size(struct uart_8250_port *pt) {if (pt->port.iotype ==UPIO_AU )return 0x1000 ;
Quoted 8 lines
drivers/tty/serial/8250/8250.c static unsigned int serial8250_port_size(struct uart_8250_port *pt) · line 2432
Quoted 6 lines
drivers/tty/serial/8250/8250.c +1
-1-#ifdef CONFIG_ARCH_OMAP +#ifdef CONFIG_ARCH_OMAP1 if (is_omap_port (pt))return 0x16 << pt->port.regshift;#endif Acked-by Alan Cox <[email protected]>
Thanks.
Quoted 2 lines
Even better would be if for other cases
is_omap_portand friends returned 0...
Yes it seems that those macros could be moved from plat-omap/serial.h to live in drivers/tty/serial/8250/8250.h? Or do you have some better place in mind?
Regards,
Tony
PATCH 9/17 serial/8250: Limit the omap workarounds to omap1
Quoted 6 lines
Quoted 2 lines
Even better would be if for other cases
is_omap_portand friends returned 0...Yes it seems that those macros could be moved from
plat-omap/serial.hto live indrivers/tty/serial/8250/8250.h? Or do you have some better place in mind?
I've not looked at it enough to decide if it's doable or not. I'm happy either way - both patches are progress the right way!
Tony Lindgren
maintainerPATCH 9/17 serial/8250: Limit the omap workarounds to omap1
Quoted 9 lines · Alan Cox
Quoted 6 lines
Quoted 2 lines
Even better would be if for other cases
is_omap_portand friends returned 0...Yes it seems that those macros could be moved from
plat-omap/serial.hto live indrivers/tty/serial/8250/8250.h? Or do you have some better place in mind?I've not looked at it enough to decide if it's doable or not. I'm happy either way - both patches are progress the right way!
FYI, I'll send something along these lines as a separate patch as "[PATCH] tty/serial/8250: Make omap hardware workarounds local to 8250.h"
Regards,
Tony
Tony Lindgren
maintainerPATCH 10/17 staging: tidspbridge: Prepare for irqs.h removal
In reply to Tony LindgrenLet's define some things locally to avoid breaking build when irqs.h is removed.
This is needed for the ARM common zImage support.
--- drivers/staging/tidspbridge/core/dsp-clock.c | 2 ++ drivers/staging/tidspbridge/core/tiomap3430.c | 4 ++-- drivers/staging/tidspbridge/core/wdt.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-)
drivers/staging/tidspbridge/core/dsp-clock.c +2 -0
@@ -16,6 +16,8 @@* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +#define L4_34XX_BASE 0x48000000 +#include <linux/types.h> /* ----------------------------------- Host OS */
drivers/staging/tidspbridge/core/tiomap3430.c +2 -2
@@ -415,10 +415,10 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,/* Assert RST1 i.e only the RST only for DSP megacell */ if (!status) {/* -* XXX: ioremapping MUST be removed once ctrl +* XXX: OMAP343X_CTRL_BASE ioremapping MUST be removed once ctrl * function is made available. */ -void __iomem *ctrl =ioremap (OMAP343X_CTRL_BASE ,SZ_4K ); +void __iomem *ctrl =ioremap (0x48002000 ,SZ_4K );if (!ctrl)return -ENOMEM ;
drivers/staging/tidspbridge/core/wdt.c +2 -1
@@ -25,7 +25,8 @@#include <dspbridge/host_os.h> -#define OMAP34XX_WDT3_BASE (L4_PER_34XX_BASE + 0x30000) +#define OMAP34XX_WDT3_BASE (0x49000000 + 0x30000) +#define INT_34XX_WDT3_IRQ 36static struct dsp_wdt_setting dsp_wdt;
Tony Lindgren
maintainerPATCH 11/17 ARM: OMAP2+: Prepare for irqs.h removal
In reply to Tony LindgrenAs the interrupts should only be defined in the platform_data, and eventually coming from device tree, there's no need to define them in header files.
Let's remove the hardcoded references to irqs.h and fix up the includes so we don't rely on headers included in irqs.h. Note that we're defining OMAP_INTC_START as 0 to the interrupts. This will be needed when we enable SPARSE_IRQ. For some drivers we need to add #include <plat/cpu.h> for now until these drivers are fixed to remove cpu_is_omapxxxx() usage.
While at it, sort som of the includes the standard way, and add the trailing commas where they are missing in the related data structures.
Note that for drivers/staging/tidspbridge we just define things locally.
--- arch/arm/mach-omap2/board-2430sdp.c | 2 arch/arm/mach-omap2/board-4430sdp.c | 2 arch/arm/mach-omap2/board-am3517evm.c | 3 arch/arm/mach-omap2/board-cm-t3517.c | 4 - arch/arm/mach-omap2/board-flash.c | 2 arch/arm/mach-omap2/board-igep0020.c | 2 arch/arm/mach-omap2/board-n8x0.c | 3 arch/arm/mach-omap2/board-omap4panda.c | 2 arch/arm/mach-omap2/board-rm680.c | 3 arch/arm/mach-omap2/board-rx51-peripherals.c | 2 arch/arm/mach-omap2/board-ti8168evm.c | 1 arch/arm/mach-omap2/board-zoom-debugboard.c | 1 arch/arm/mach-omap2/board-zoom-peripherals.c | 3 arch/arm/mach-omap2/common-board-devices.c | 1 arch/arm/mach-omap2/common.h | 2 arch/arm/mach-omap2/cpuidle34xx.c | 1 arch/arm/mach-omap2/devices.c | 17 +- arch/arm/mach-omap2/gpmc-smc91x.c | 1 arch/arm/mach-omap2/gpmc.c | 11 + arch/arm/mach-omap2/io.c | 2 arch/arm/mach-omap2/mailbox.c | 3 arch/arm/mach-omap2/mcbsp.c | 1 arch/arm/mach-omap2/omap-iommu.c | 12 +- arch/arm/mach-omap2/omap-wakeupgen.c | 1 arch/arm/mach-omap2/omap4-common.c | 7 - arch/arm/mach-omap2/omap_hwmod_2420_data.c | 23 +-- arch/arm/mach-omap2/omap_hwmod_2430_data.c | 71 +++++----- .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c | 108 +++++++------- arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 6 - arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 149 ++++++++++---------- arch/arm/mach-omap2/omap_hwmod_common_data.h | 1 arch/arm/mach-omap2/omap_l3_noc.c | 6 + arch/arm/mach-omap2/omap_phy_internal.c | 2 arch/arm/mach-omap2/pm24xx.c | 2 arch/arm/mach-omap2/prcm.c | 1 arch/arm/mach-omap2/prm2xxx_3xxx.c | 3 arch/arm/mach-omap2/prm44xx.c | 4 - arch/arm/mach-omap2/prm_common.c | 1 arch/arm/mach-omap2/serial.c | 1 arch/arm/mach-omap2/soc.h | 1 arch/arm/mach-omap2/timer.c | 10 + arch/arm/mach-omap2/twl-common.c | 3 arch/arm/mach-omap2/twl-common.h | 6 - arch/arm/mach-omap2/usb-host.c | 1 arch/arm/mach-omap2/usb-musb.c | 1 arch/arm/plat-omap/include/plat/omap44xx.h | 1 drivers/dma/omap-dma.c | 2 drivers/mfd/twl-core.c | 2 drivers/mtd/onenand/omap2.c | 1 drivers/video/omap2/dss/dispc.c | 1 drivers/video/omap2/omapfb/omapfb-main.c | 1 sound/soc/omap/mcbsp.c | 2 sound/soc/omap/omap-mcbsp.c | 1 sound/soc/omap/omap-pcm.c | 1 54 files changed, 263 insertions(+), 238 deletions(-) create mode 100644 arch/arm/mach-omap2/soc.h
arch/arm/mach-omap2/board-2430sdp.c +1 -1
@@ -231,7 +231,7 @@ static int __init omap2430_i2c_init(void) sdp2430_i2c1_boardinfo[0 ].irq =gpio_to_irq (78 );omap_register_i2c_bus (1 ,100 , sdp2430_i2c1_boardinfo,ARRAY_SIZE (sdp2430_i2c1_boardinfo)); -omap_pmic_init (2 ,100 ,"twl4030" ,INT_24XX_SYS_NIRQ , +omap_pmic_init (2 ,100 ,"twl4030" ,7 +OMAP_INTC_START , &sdp2430_twldata);return 0 ; }
arch/arm/mach-omap2/board-4430sdp.c +1 -1
@@ -579,7 +579,7 @@ static int __init omap4_i2c_init(void)TWL_COMMON_REGULATOR_V1V8 | TWL_COMMON_REGULATOR_V2V1);omap4_pmic_init ("twl6030" , &sdp4430_twldata, - &twl6040_data,OMAP44XX_IRQ_SYS_2N ); + &twl6040_data,119 +OMAP44XX_IRQ_GIC_START );omap_register_i2c_bus (2 ,400 ,NULL ,0 );omap_register_i2c_bus (3 ,400 , sdp4430_i2c_3_boardinfo,ARRAY_SIZE (sdp4430_i2c_3_boardinfo));
arch/arm/mach-omap2/board-am3517evm.c +1 -2
@@ -296,8 +296,7 @@ static struct resource am3517_hecc_resources[] = { .flags = IORESOURCE_MEM, }, { - .start = INT_35XX_HECC0_IRQ, - .end = INT_35XX_HECC0_IRQ, + .start = 24 + OMAP_INTC_START, .flags = IORESOURCE_IRQ, }, };
arch/arm/mach-omap2/board-cm-t3517.c +2 -2
@@ -42,6 +42,7 @@#include <plat/usb.h> #include <plat/nand.h> #include <plat/gpmc.h> +#include <plat/serial.h> #include <mach/am35xx.h>
@@ -89,8 +90,7 @@ static struct resource cm_t3517_hecc_resources[] = { .flags = IORESOURCE_MEM, }, { - .start = INT_35XX_HECC0_IRQ, - .end = INT_35XX_HECC0_IRQ, + .start = 24 + OMAP_INTC_START, .flags = IORESOURCE_IRQ, }, };
arch/arm/mach-omap2/board-flash.c +1 -1
@@ -16,8 +16,8 @@#include <linux/platform_device.h> #include <linux/mtd/physmap.h> #include <linux/io.h> -#include <plat/irqs.h> +#include <plat/cpu.h> #include <plat/gpmc.h> #include <plat/nand.h> #include <plat/onenand.h>
arch/arm/mach-omap2/board-igep0020.c +2 -0
@@ -32,6 +32,8 @@#include "common.h" #include <plat/gpmc.h> #include <plat/usb.h> +#include <plat/serial.h> +#include <video/omapdss.h> #include <video/omap-panel-tfp410.h> #include <plat/onenand.h>
arch/arm/mach-omap2/board-n8x0.c +1 -2
@@ -27,7 +27,6 @@#include "common.h" #include <plat/menelaus.h> -#include <mach/irqs.h> #include <plat/mcspi.h> #include <plat/onenand.h> #include <plat/mmc.h>
@@ -599,7 +598,7 @@ static struct menelaus_platform_data n8x0_menelaus_platform_data __initdata = {static struct i2c_board_info __initdata n8x0_i2c_board_info_1[]__initdata = { {I2C_BOARD_INFO ("menelaus" ,0x72 ), - .irq =INT_24XX_SYS_NIRQ , + .irq =7 +OMAP_INTC_START , .platform_data = &n8x0_menelaus_platform_data, }, };
arch/arm/mach-omap2/board-omap4panda.c +1 -1
@@ -292,7 +292,7 @@ static int __init omap4_panda_i2c_init(void)TWL_COMMON_REGULATOR_V1V8 | TWL_COMMON_REGULATOR_V2V1);omap4_pmic_init ("twl6030" , &omap4_panda_twldata, - &twl6040_data,OMAP44XX_IRQ_SYS_2N ); + &twl6040_data,119 +OMAP44XX_IRQ_GIC_START );omap_register_i2c_bus (2 ,400 ,NULL ,0 );/* * Bus 3 is attached to the DVI port where devices like the pico DLP
arch/arm/mach-omap2/board-rm680.c +2 -1
@@ -27,6 +27,7 @@#include <plat/gpmc.h> #include "common.h" #include <plat/onenand.h> +#include <plat/serial.h> #include "mux.h" #include "hsmmc.h"
@@ -84,7 +85,7 @@ static struct twl4030_platform_data rm680_twl_data = {static void __init rm680_i2c_init (void ) {omap3_pmic_get_config (&rm680_twl_data,TWL_COMMON_PDATA_USB ,0 ); -omap_pmic_init (1 ,2900 ,"twl5031" ,INT_34XX_SYS_NIRQ , &rm680_twl_data); +omap_pmic_init (1 ,2900 ,"twl5031" ,7 +OMAP_INTC_START , &rm680_twl_data);omap_register_i2c_bus (2 ,400 ,NULL ,0 );omap_register_i2c_bus (3 ,400 ,NULL ,0 ); }
arch/arm/mach-omap2/board-rx51-peripherals.c +1 -1
@@ -1047,7 +1047,7 @@ static int __init rx51_i2c_init(void) rx51_twldata.vdac->constraints.apply_uV = true; rx51_twldata.vdac->constraints.name ="VDAC" ; -omap_pmic_init (1 ,2200 ,"twl5030" ,INT_34XX_SYS_NIRQ , &rx51_twldata); +omap_pmic_init (1 ,2200 ,"twl5030" ,7 +OMAP_INTC_START , &rx51_twldata);omap_register_i2c_bus (2 ,100 , rx51_peripherals_i2c_board_info_2,ARRAY_SIZE (rx51_peripherals_i2c_board_info_2));#if defined(CONFIG_SENSORS_LIS3_I2C ) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE )
arch/arm/mach-omap2/board-ti8168evm.c +0 -1
@@ -20,7 +20,6 @@#include <asm/mach/arch.h> #include <asm/mach/map.h> -#include <plat/irqs.h> #include "common.h" #include <plat/usb.h>
arch/arm/mach-omap2/board-zoom-debugboard.c +1 -0
@@ -19,6 +19,7 @@#include <plat/gpmc.h> #include <plat/gpmc-smsc911x.h> +#include <plat/serial.h> #include <mach/board-zoom.h>
arch/arm/mach-omap2/board-zoom-peripherals.c +2 -1
@@ -27,6 +27,7 @@#include "common.h" #include <plat/usb.h> +#include <plat/serial.h> #include <mach/board-zoom.h>
@@ -279,7 +280,7 @@ static int __init omap_i2c_init(void) codec_data->hs_extmute =1 ; codec_data->set_hs_extmute = zoom2_set_hs_extmute; } -omap_pmic_init (1 ,2400 ,"twl5030" ,INT_34XX_SYS_NIRQ , &zoom_twldata); +omap_pmic_init (1 ,2400 ,"twl5030" ,7 +OMAP_INTC_START , &zoom_twldata);omap_register_i2c_bus (2 ,400 ,NULL ,0 );omap_register_i2c_bus (3 ,400 ,NULL ,0 );return 0 ;
arch/arm/mach-omap2/common-board-devices.c +1 -0
@@ -27,6 +27,7 @@#include <plat/mcspi.h> #include <plat/nand.h> +#include "common.h" #include "common-board-devices.h" #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
arch/arm/mach-omap2/common.h +2 -0
@@ -31,6 +31,8 @@#include <plat/common.h> #include <asm/proc-fns.h> +#define OMAP_INTC_START 0 +#ifdef CONFIG_SOC_OMAP2420 extern void omap242x_map_common_io (void );#else
arch/arm/mach-omap2/cpuidle34xx.c +0 -1
@@ -28,7 +28,6 @@#include <linux/cpu_pm.h> #include <plat/prcm.h> -#include <plat/irqs.h> #include "powerdomain.h" #include "clockdomain.h"
arch/arm/mach-omap2/devices.c +8 -9
@@ -20,7 +20,6 @@#include <linux/platform_data/omap4-keypad.h> #include <mach/hardware.h> -#include <mach/irqs.h> #include <asm/mach-types.h> #include <asm/mach/map.h> #include <asm/pmu.h>
@@ -31,6 +30,8 @@#include <plat/omap_device.h> #include <plat/omap4-keypad.h> +#include "soc.h" +#include "common.h" #include "mux.h" #include "control.h" #include "devices.h"
@@ -111,7 +112,7 @@ static struct resource omap2cam_resources[] = { .flags = IORESOURCE_MEM, }, { - .start = INT_24XX_CAM_IRQ, + .start = 24 + OMAP_INTC_START, .flags = IORESOURCE_IRQ, } };
@@ -200,7 +201,7 @@ static struct resource omap3isp_resources[] = { .flags = IORESOURCE_MEM, }, { - .start = INT_34XX_CAM_IRQ, + .start = 24 + OMAP_INTC_START, .flags = IORESOURCE_IRQ, } };
@@ -434,14 +435,12 @@ static inline void omap_init_mcspi(void) {}#endif static struct resource omap2_pmu_resource = { - .start =3 , - .end =3 , + .start =3 +OMAP_INTC_START , .flags =IORESOURCE_IRQ , };static struct resource omap3_pmu_resource = { - .start =INT_34XX_BENCH_MPU_EMUL , - .end =INT_34XX_BENCH_MPU_EMUL , + .start =3 +OMAP_INTC_START , .flags =IORESOURCE_IRQ , };
@@ -474,7 +473,7 @@ static struct resource omap2_sham_resources[] = { .flags = IORESOURCE_MEM, }, { - .start = INT_24XX_SHA1MD5, + .start = 51 + OMAP_INTC_START, .flags = IORESOURCE_IRQ, } };
@@ -492,7 +491,7 @@ static struct resource omap3_sham_resources[] = { .flags = IORESOURCE_MEM, }, { - .start = INT_34XX_SHA1MD52_IRQ, + .start = 49 + OMAP_INTC_START, .flags = IORESOURCE_IRQ, }, {
arch/arm/mach-omap2/gpmc-smc91x.c +1 -0
@@ -17,6 +17,7 @@#include <linux/io.h> #include <linux/smc91x.h> +#include <plat/cpu.h> #include <plat/gpmc.h> #include <plat/gpmc-smc91x.h>
arch/arm/mach-omap2/gpmc.c +8 -3
@@ -28,8 +28,13 @@#include <asm/mach-types.h> #include <plat/gpmc.h> +#include <plat/cpu.h> #include <plat/sdrc.h> +#include <mach/hardware.h> + +#include "common.h" +/* GPMC register offsets */ #define GPMC_REVISION 0x00#define GPMC_SYSCONFIG 0x10
@@ -846,16 +851,16 @@ static int __init gpmc_init(void) l =OMAP2420_GPMC_BASE ; else l =OMAP34XX_GPMC_BASE ; - gpmc_irq =INT_34XX_GPMC_IRQ ; + gpmc_irq =20 +OMAP_INTC_START ; }else if (cpu_is_omap34xx ()) { ck ="gpmc_fck" ; l =OMAP34XX_GPMC_BASE ; - gpmc_irq =INT_34XX_GPMC_IRQ ; + gpmc_irq =20 +OMAP_INTC_START ; }else if (cpu_is_omap44xx () ||soc_is_omap54xx ()) {/* Base address and irq number are same for OMAP4/5 */ ck ="gpmc_ck" ; l =OMAP44XX_GPMC_BASE ; - gpmc_irq =OMAP44XX_IRQ_GPMC ; + gpmc_irq =20 +OMAP44XX_IRQ_GIC_START ; }if (WARN_ON (!ck))
arch/arm/mach-omap2/io.c +2 -0
@@ -33,6 +33,8 @@#include <plat/multi.h> #include <plat/dma.h> +#include <mach/hardware.h> +#include "iomap.h" #include "voltage.h" #include "powerdomain.h"
arch/arm/mach-omap2/mailbox.c +2 -1
@@ -16,8 +16,9 @@#include <linux/platform_device.h> #include <linux/io.h> #include <linux/pm_runtime.h> + +#include <plat/cpu.h> #include <plat/mailbox.h> -#include <mach/irqs.h> #define MAILBOX_REVISION 0x000#define MAILBOX_MESSAGE (m) (0x040 + 4 * (m))
arch/arm/mach-omap2/mcbsp.c +0 -1
@@ -18,7 +18,6 @@#include <linux/platform_device.h> #include <linux/slab.h> -#include <mach/irqs.h> #include <plat/dma.h> #include <plat/cpu.h> #include <plat/mcbsp.h>
arch/arm/mach-omap2/omap-iommu.c +7 -5
@@ -14,7 +14,9 @@#include <linux/platform_device.h> #include <plat/iommu.h> -#include <plat/irqs.h> + +#include "soc.h" +#include "common.h" struct iommu_device {resource_size_t base;
@@ -29,7 +31,7 @@ static int num_iommu_devices;static struct iommu_device omap3_devices[] = { { .base =0x480bd400 , - .irq =24 , + .irq =24 +OMAP_INTC_START , .pdata = { .name ="isp" , .nr_tlb_entries =8 ,
@@ -41,7 +43,7 @@ static struct iommu_device omap3_devices[] = { #if defined(CONFIG_OMAP_IOMMU_IVA2) { .base = 0x5d000000, - .irq = 28, + .irq = 28 + OMAP_INTC_START, .pdata = { .name = "iva2", .nr_tlb_entries = 32,
@@ -64,7 +66,7 @@ static struct platform_device *omap3_iommu_pdev[NR_OMAP3_IOMMU_DEVICES];static struct iommu_device omap4_devices[] = { { .base =OMAP4_MMU1_BASE , - .irq =OMAP44XX_IRQ_DUCATI_MMU , + .irq =100 +OMAP44XX_IRQ_GIC_START , .pdata = { .name ="ducati" , .nr_tlb_entries =32 ,
@@ -75,7 +77,7 @@ static struct iommu_device omap4_devices[] = { }, { .base = OMAP4_MMU2_BASE, - .irq = OMAP44XX_IRQ_TESLA_MMU, + .irq = 28 + OMAP44XX_IRQ_GIC_START, .pdata = { .name = "tesla", .nr_tlb_entries = 32,
arch/arm/mach-omap2/omap-wakeupgen.c +1 -0
@@ -27,6 +27,7 @@#include <asm/hardware/gic.h> +#include <mach/hardware.h> #include <mach/omap-wakeupgen.h> #include <mach/omap-secure.h>
arch/arm/mach-omap2/omap4-common.c +3 -4
@@ -16,15 +16,15 @@#include <linux/io.h> #include <linux/platform_device.h> #include <linux/memblock.h> +#include <linux/of_irq.h> +#include <linux/of_platform.h> +#include <linux/export.h> #include <asm/hardware/gic.h> #include <asm/hardware/cache-l2x0.h> #include <asm/mach/map.h> #include <asm/memblock.h> -#include <linux/of_irq.h> -#include <linux/of_platform.h> -#include <plat/irqs.h> #include <plat/sram.h> #include <plat/omap-secure.h> #include <plat/mmc.h>
@@ -35,7 +35,6 @@#include "common.h" #include "hsmmc.h" #include "omap4-sar-layout.h" -#include <linux/export.h> #ifdef CONFIG_CACHE_L2X0 static void __iomem *l2cache_base;
arch/arm/mach-omap2/omap_hwmod_2420_data.c +11 -12
@@ -13,7 +13,6 @@* XXX these should be marked initdata for multi-OMAP kernels */ #include <plat/omap_hwmod.h> -#include <mach/irqs.h> #include <plat/cpu.h> #include <plat/dma.h> #include <plat/serial.h>
@@ -161,9 +160,9 @@ static struct omap_hwmod omap2420_dma_system_hwmod = {/* mailbox */ static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = { - { .name ="dsp" , .irq =26 }, - { .name ="iva" , .irq =34 }, - { .irq =-1 } + { .name ="dsp" , .irq =26 +OMAP_INTC_START , }, + { .name ="iva" , .irq =34 +OMAP_INTC_START , }, + { .irq =-1 }, };static struct omap_hwmod omap2420_mailbox_hwmod = {
@@ -198,9 +197,9 @@ static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {/* mcbsp1 */ static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = { - { .name ="tx" , .irq =59 }, - { .name ="rx" , .irq =60 }, - { .irq =-1 } + { .name ="tx" , .irq =59 +OMAP_INTC_START , }, + { .name ="rx" , .irq =60 +OMAP_INTC_START , }, + { .irq =-1 }, };static struct omap_hwmod omap2420_mcbsp1_hwmod = {
@@ -224,9 +223,9 @@ static struct omap_hwmod omap2420_mcbsp1_hwmod = {/* mcbsp2 */ static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = { - { .name ="tx" , .irq =62 }, - { .name ="rx" , .irq =63 }, - { .irq =-1 } + { .name ="tx" , .irq =62 +OMAP_INTC_START , }, + { .name ="rx" , .irq =63 +OMAP_INTC_START , }, + { .irq =-1 }, };static struct omap_hwmod omap2420_mcbsp2_hwmod = {
@@ -264,8 +263,8 @@ static struct omap_hwmod_class omap2420_msdi_hwmod_class = {/* msdi1 */ static struct omap_hwmod_irq_info omap2420_msdi1_irqs[] = { - { .irq =83 }, - { .irq =-1 } + { .irq =83 +OMAP_INTC_START , }, + { .irq =-1 }, };static struct omap_hwmod_dma_info omap2420_msdi1_sdma_reqs[] = {
arch/arm/mach-omap2/omap_hwmod_2430_data.c +36 -35
149 lines not on this page · raw message
arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c +53 -55
194 lines not on this page · raw message
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +2 -4
@@ -15,16 +15,14 @@#include <plat/dmtimer.h> #include <plat/mcspi.h> -#include <mach/irqs.h> -#include "omap_hwmod_common_data.h" #include "cm-regbits-24xx.h" #include "prm-regbits-24xx.h" #include "wd_timer.h" struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = { - { .irq =48 , }, - { .irq =-1 } + { .irq =48 +OMAP_INTC_START , }, + { .irq =-1 }, };struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[] = {
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +75 -74
333 lines not on this page · raw message
arch/arm/mach-omap2/omap_hwmod_common_data.h +1 -0
@@ -16,6 +16,7 @@#include <plat/omap_hwmod.h> +#include "common.h" #include "display.h" /* Common address space across OMAP2xxx */
arch/arm/mach-omap2/omap_l3_noc.c +4 -2
@@ -28,6 +28,8 @@#include <linux/kernel.h> #include <linux/slab.h> +#include <plat/hardware.h> +#include "omap_l3_noc.h" /*
@@ -190,7 +192,7 @@ static int __devinit omap4_l3_probe(struct platform_device *pdev) IRQF_DISABLED, "l3-dbg-irq", l3);if (ret) {pr_crit ("L3: request_irq failed to register for 0x%x\n" , -OMAP44XX_IRQ_L3_DBG ); +9 +OMAP44XX_IRQ_GIC_START ); goto err3; }
@@ -200,7 +202,7 @@ static int __devinit omap4_l3_probe(struct platform_device *pdev) IRQF_DISABLED, "l3-app-irq", l3);if (ret) {pr_crit ("L3: request_irq failed to register for 0x%x\n" , -OMAP44XX_IRQ_L3_APP ); +10 +OMAP44XX_IRQ_GIC_START ); goto err4; }
arch/arm/mach-omap2/omap_phy_internal.c +2 -0
@@ -28,7 +28,9 @@#include <linux/err.h> #include <linux/usb.h> +#include <plat/hardware.h> #include <plat/usb.h> +#include "control.h" /* OMAP control module register for UTMI PHY */
arch/arm/mach-omap2/pm24xx.c +0 -2
@@ -40,8 +40,6 @@#include <plat/sram.h> #include <plat/dma.h> -#include <mach/irqs.h> -#include "common.h" #include "prm2xxx_3xxx.h" #include "prm-regbits-24xx.h"
arch/arm/mach-omap2/prcm.c +0 -1
@@ -27,7 +27,6 @@#include "common.h" #include <plat/prcm.h> -#include <plat/irqs.h> #include "clock.h" #include "clock2xxx.h"
arch/arm/mach-omap2/prm2xxx_3xxx.c +1 -2
@@ -20,7 +20,6 @@#include "common.h" #include <plat/cpu.h> #include <plat/prcm.h> -#include <plat/irqs.h> #include "vp.h"
@@ -40,7 +39,7 @@ static struct omap_prcm_irq_setup omap3_prcm_irq_setup = { .nr_regs = 1, .irqs = omap3_prcm_irqs, .nr_irqs = ARRAY_SIZE(omap3_prcm_irqs), - .irq = INT_34XX_PRCM_MPU_IRQ, + .irq = 11 + OMAP_INTC_START, .read_pending_irqs = &omap3xxx_prm_read_pending_irqs, .ocp_barrier = &omap3xxx_prm_ocp_barrier, .save_and_clear_irqen = &omap3xxx_prm_save_and_clear_irqen,
arch/arm/mach-omap2/prm44xx.c +2 -2
@@ -18,8 +18,8 @@#include <linux/io.h> #include <plat/cpu.h> -#include <plat/irqs.h> #include <plat/prcm.h> +#include <plat/hardware.h> #include "iomap.h" #include "common.h"
@@ -40,7 +40,7 @@ static struct omap_prcm_irq_setup omap4_prcm_irq_setup = { .nr_regs = 2, .irqs = omap4_prcm_irqs, .nr_irqs = ARRAY_SIZE(omap4_prcm_irqs), - .irq = OMAP44XX_IRQ_PRCM, + .irq = 11 + OMAP44XX_IRQ_GIC_START, .read_pending_irqs = &omap44xx_prm_read_pending_irqs, .ocp_barrier = &omap44xx_prm_ocp_barrier, .save_and_clear_irqen = &omap44xx_prm_save_and_clear_irqen,
arch/arm/mach-omap2/prm_common.c +0 -1
@@ -26,7 +26,6 @@#include <plat/common.h> #include <plat/prcm.h> -#include <plat/irqs.h> #include "prm2xxx_3xxx.h" #include "prm44xx.h"
arch/arm/mach-omap2/serial.c +1 -0
@@ -33,6 +33,7 @@#include <plat/omap_hwmod.h> #include <plat/omap_device.h> #include <plat/omap-pm.h> +#include <plat/serial.h> #include "prm2xxx_3xxx.h" #include "pm.h"
arch/arm/mach-omap2/soc.h new file +1 -0
@@ -0,0 +1 @@ +#include <plat/cpu.h>
arch/arm/mach-omap2/timer.c +6 -4
@@ -38,14 +38,17 @@#include <linux/slab.h> #include <asm/mach/time.h> -#include <plat/dmtimer.h> #include <asm/smp_twd.h> #include <asm/sched_clock.h> -#include "common.h" +#include <plat/omap_hwmod.h> #include <plat/omap_device.h> +#include <plat/dmtimer.h> #include <plat/omap-pm.h> +#include <mach/hardware.h> + +#include "common.h" #include "powerdomain.h" /* Parent clocks, eventually these will come from the clock framework */
@@ -373,8 +376,7 @@ OMAP_SYS_TIMER(3_am33xx)#ifdef CONFIG_ARCH_OMAP4 #ifdef CONFIG_LOCAL_TIMERS static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, - OMAP44XX_LOCAL_TWD_BASE, - OMAP44XX_IRQ_LOCALTIMER); + OMAP44XX_LOCAL_TWD_BASE, 29 + OMAP_INTC_START);#endif static void __init omap4_timer_init (void )
arch/arm/mach-omap2/twl-common.c +2 -1
@@ -26,6 +26,7 @@#include <linux/regulator/machine.h> #include <linux/regulator/fixed.h> +#include <plat/hardware.h> #include <plat/i2c.h> #include <plat/usb.h>
@@ -84,7 +85,7 @@ void __init omap4_pmic_init(const char *pmic_type,omap_mux_init_signal ("sys_nirq1" ,OMAP_PIN_INPUT_PULLUP |OMAP_PIN_OFF_WAKEUPENABLE );strncpy (omap4_i2c1_board_info[0 ].type, pmic_type,sizeof (omap4_i2c1_board_info[0 ].type)); - omap4_i2c1_board_info[0 ].irq =OMAP44XX_IRQ_SYS_1N ; + omap4_i2c1_board_info[0 ].irq =7 +OMAP44XX_IRQ_GIC_START ; omap4_i2c1_board_info[0 ].platform_data = pmic_data;/* TWL6040 audio IC part */
arch/arm/mach-omap2/twl-common.h +3 -3
@@ -1,7 +1,7 @@#ifndef __OMAP_PMIC_COMMON__#define __OMAP_PMIC_COMMON__ -#include <plat/irqs.h> +#include "common.h" #define TWL_COMMON_PDATA_USB (1 << 0)#define TWL_COMMON_PDATA_BCI (1 << 1)
@@ -40,13 +40,13 @@ void omap_pmic_late_init(void);static inline void omap2_pmic_init (const char *pmic_type,struct twl4030_platform_data *pmic_data) { -omap_pmic_init (2 ,2600 , pmic_type,INT_24XX_SYS_NIRQ , pmic_data); +omap_pmic_init (2 ,2600 , pmic_type,7 +OMAP_INTC_START , pmic_data); }static inline void omap3_pmic_init (const char *pmic_type,struct twl4030_platform_data *pmic_data) { -omap_pmic_init (1 ,2600 , pmic_type,INT_34XX_SYS_NIRQ , pmic_data); +omap_pmic_init (1 ,2600 , pmic_type,7 +OMAP_INTC_START , pmic_data); } void omap4_pmic_init(const char *pmic_type,
arch/arm/mach-omap2/usb-host.c +0 -1
@@ -26,7 +26,6 @@#include <asm/io.h> #include <mach/hardware.h> -#include <mach/irqs.h> #include <plat/usb.h> #include <plat/omap_device.h>
arch/arm/mach-omap2/usb-musb.c +0 -1
@@ -27,7 +27,6 @@#include <linux/usb/musb.h> #include <mach/hardware.h> -#include <mach/irqs.h> #include <mach/am35xx.h> #include <plat/usb.h> #include <plat/omap_device.h>
arch/arm/plat-omap/include/plat/omap44xx.h +1 -0
@@ -39,6 +39,7 @@#define IRQ_SIR_IRQ 0x0040#define OMAP44XX_GIC_DIST_BASE 0x48241000#define OMAP44XX_GIC_CPU_BASE 0x48240100 +#define OMAP44XX_IRQ_GIC_START 32#define OMAP44XX_SCU_BASE 0x48240000#define OMAP44XX_LOCAL_TWD_BASE 0x48240600#define OMAP44XX_L2CACHE_BASE 0x48242000
drivers/dma/omap-dma.c +2 -0
@@ -18,6 +18,8 @@#include <linux/spinlock.h> #include "virt-dma.h" + +#include <plat/cpu.h> #include <plat/dma.h> struct omap_dmadev {
drivers/mfd/twl-core.c +2 -0
@@ -46,6 +46,8 @@#include <linux/i2c.h> #include <linux/i2c/twl.h> +#include <plat/cpu.h> +#include "twl-core.h" /*
drivers/mtd/onenand/omap2.c +1 -0
@@ -43,6 +43,7 @@#include <asm/gpio.h> #include <plat/dma.h> +#include <plat/cpu.h> #define DRIVER_NAME "omap2-onenand"
drivers/video/omap2/dss/dispc.c +1 -0
@@ -37,6 +37,7 @@#include <linux/platform_device.h> #include <linux/pm_runtime.h> +#include <plat/cpu.h> #include <plat/clock.h> #include <video/omapdss.h>
drivers/video/omap2/omapfb/omapfb-main.c +1 -0
@@ -31,6 +31,7 @@#include <linux/omapfb.h> #include <video/omapdss.h> +#include <plat/cpu.h> #include <plat/vram.h> #include <plat/vrfb.h>
sound/soc/omap/mcbsp.c +2 -0
@@ -27,6 +27,8 @@#include <plat/mcbsp.h> +#include <plat/cpu.h> +#include "mcbsp.h" static void omap_mcbsp_write (struct omap_mcbsp *mcbsp,u16 reg,u32 val)
sound/soc/omap/omap-mcbsp.c +1 -0
@@ -32,6 +32,7 @@#include <sound/initval.h> #include <sound/soc.h> +#include <plat/cpu.h> #include <plat/dma.h> #include <plat/mcbsp.h> #include "mcbsp.h"
sound/soc/omap/omap-pcm.c +1 -0
@@ -30,6 +30,7 @@#include <sound/pcm_params.h> #include <sound/soc.h> +#include <plat/cpu.h> #include <plat/dma.h> #include "omap-pcm.h"
Tony Lindgren
maintainerPATCH 12/17 ARM: OMAP2+: Remove hardcoded IRQs and enable SPARSE_IRQ
In reply to Tony LindgrenRemove hardcoded IRQs in irqs.h and related files as these are no longer needed.
--- arch/arm/mach-omap2/common.h | 3 arch/arm/mach-omap2/include/mach/irqs.h | 2 arch/arm/plat-omap/Kconfig | 1 arch/arm/plat-omap/include/plat/irqs-44xx.h | 144 --------------------- arch/arm/plat-omap/include/plat/irqs.h | 183 --------------------------- drivers/media/video/omap/omap_vout.c | 1 drivers/media/video/omap3isp/isp.c | 2 drivers/power/avs/smartreflex.c | 2 drivers/staging/tidspbridge/core/wdt.c | 2 9 files changed, 10 insertions(+), 330 deletions(-) delete mode 100644 arch/arm/plat-omap/include/plat/irqs-44xx.h
arch/arm/mach-omap2/common.h +2 -1
@@ -26,12 +26,13 @@#define __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H#ifndef __ASSEMBLER__ +#include <linux/irq.h> #include <linux/delay.h> #include <linux/i2c/twl.h> #include <plat/common.h> #include <asm/proc-fns.h> -#define OMAP_INTC_START 0 +#define OMAP_INTC_START NR_IRQS#ifdef CONFIG_SOC_OMAP2420 extern void omap242x_map_common_io (void );
arch/arm/mach-omap2/include/mach/irqs.h +0 -2
@@ -1,5 +1,3 @@/* * arch/arm/mach-omap2/include/mach/irqs.h */ - -#include <plat/irqs.h>
arch/arm/plat-omap/Kconfig +1 -0
@@ -25,6 +25,7 @@ config ARCH_OMAP2PLUS bool "TI OMAP2/3/4" select CLKDEV_LOOKUP select GENERIC_IRQ_CHIP + select SPARSE_IRQ select OMAP_DM_TIMER select USE_OF select PROC_DEVICETREE if PROC_FS
arch/arm/plat-omap/include/plat/irqs-44xx.h deleted +0 -144
144 lines not on this page · raw message
arch/arm/plat-omap/include/plat/irqs.h +1 -182
201 lines not on this page · raw message
drivers/media/video/omap/omap_vout.c +1 -0
@@ -44,6 +44,7 @@#include <media/v4l2-device.h> #include <media/v4l2-ioctl.h> +#include <plat/cpu.h> #include <plat/dma.h> #include <plat/vrfb.h> #include <video/omapdss.h>
drivers/media/video/omap3isp/isp.c +2 -0
@@ -70,6 +70,8 @@#include <media/v4l2-common.h> #include <media/v4l2-device.h> +#include <plat/cpu.h> +#include "isp.h" #include "ispreg.h" #include "ispccdc.h"
drivers/power/avs/smartreflex.c +2 -0
@@ -27,6 +27,8 @@#include <linux/pm_runtime.h> #include <linux/power/smartreflex.h> +#include <plat/cpu.h> +#define SMARTREFLEX_NAME_LEN 16#define NVALUE_NAME_LEN 40#define SR_DISABLE_TIMEOUT 200
drivers/staging/tidspbridge/core/wdt.c +1 -1
@@ -26,7 +26,7 @@#define OMAP34XX_WDT3_BASE (0x49000000 + 0x30000) -#define INT_34XX_WDT3_IRQ 36 +#define INT_34XX_WDT3_IRQ (36 + NR_IRQS)static struct dsp_wdt_setting dsp_wdt;
PATCH 12/17 ARM: OMAP2+: Remove hardcoded IRQs and enable SPARSE_IRQ
Quoted 4 lines · Tony Lindgren
Remove hardcoded IRQs in
irqs.hand related files as these are no longer needed.Signed-off-by Tony Lindgren <[email protected]>
Finally, great work Tony :-)
FWIW: Reviewed-by: Felipe Balbi <[email protected]>
Quoted 468 lines
--- arch/arm/mach-omap2/common.h | 3 arch/arm/mach-omap2/include/mach/irqs.h | 2 arch/arm/plat-omap/Kconfig | 1 arch/arm/plat-omap/include/plat/irqs-44xx.h | 144 --------------------- arch/arm/plat-omap/include/plat/irqs.h | 183 --------------------------- drivers/media/video/omap/omap_vout.c | 1 drivers/media/video/omap3isp/isp.c | 2 drivers/power/avs/smartreflex.c | 2 drivers/staging/tidspbridge/core/wdt.c | 2 9 files changed, 10 insertions(+), 330 deletions(-) delete mode 100644 arch/arm/plat-omap/include/plat/irqs-44xx.harch/arm/mach-omap2/common.h +2
-1@@ -26,12 +26,13 @@#define __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H#ifndef __ASSEMBLER__ +#include <linux/irq.h> #include <linux/delay.h> #include <linux/i2c/twl.h> #include <plat/common.h> #include <asm/proc-fns.h> -#define OMAP_INTC_START 0 +#define OMAP_INTC_START NR_IRQS#ifdef CONFIG_SOC_OMAP2420 extern void omap242x_map_common_io (void );arch/arm/mach-omap2/include/mach/irqs.h +0
-2@@ -1,5 +1,3 @@/* * arch/arm/mach-omap2/include/mach/irqs.h */ - -#include <plat/irqs.h> arch/arm/plat-omap/Kconfig +1
-0@@ -25,6 +25,7 @@ config ARCH_OMAP2PLUS bool "TI OMAP2/3/4" select CLKDEV_LOOKUP select GENERIC_IRQ_CHIP + select SPARSE_IRQ select OMAP_DM_TIMER select USE_OF select PROC_DEVICETREE if PROC_FSarch/arm/plat-omap/include/plat/irqs-44xx.h deleted +0
-144@@ -1,144 +0,0 @@ -/* -* OMAP4 Interrupt lines definitions -* -* Copyright (C) 2009-2010 Texas Instruments, Inc. -* -* Santosh Shilimkar (santosh.shilimkar at ti.com) -* Benoit Cousson (b-cousson at ti.com) -* -* This file is automatically generated from the OMAP hardware databases. -* We respectfully ask that any modifications to this file be coordinated -* with the public linux-omap at vger.kernel.org mailing list and the -* authors above to ensure that the autogeneration scripts are kept -* up-to-date with the file contents. -* -* 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. -*/ - -#ifndef __ARCH_ARM_MACH_OMAP2_OMAP44XX_IRQS_H -#define __ARCH_ARM_MACH_OMAP2_OMAP44XX_IRQS_H - -/* OMAP44XX IRQs numbers definitions */ -#define OMAP44XX_IRQ_LOCALTIMER 29 -#define OMAP44XX_IRQ_LOCALWDT 30 - -#define OMAP44XX_IRQ_GIC_START 32 - -#define OMAP44XX_IRQ_PL310 (0 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_CTI0 (1 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_CTI1 (2 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_ELM (4 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SYS_1N (7 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SECURITY_EVENTS (8 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_L3_DBG (9 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_L3_APP (10 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_PRCM (11 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SDMA_0 (12 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SDMA_1 (13 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SDMA_2 (14 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SDMA_3 (15 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_MCBSP4 (16 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_MCBSP1 (17 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SR_MCU (18 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SR_CORE (19 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPMC (20 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GFX (21 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_MCBSP2 (22 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_MCBSP3 (23 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_ISS_5 (24 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_DSS_DISPC (25 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_MAIL_U0 (26 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_C2C_SSCM_0 (27 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_TESLA_MMU (28 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPIO1 (29 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPIO2 (30 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPIO3 (31 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPIO4 (32 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPIO5 (33 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPIO6 (34 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_USIM (35 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_WDT3 (36 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPT1 (37 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPT2 (38 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPT3 (39 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPT4 (40 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPT5 (41 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPT6 (42 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPT7 (43 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPT8 (44 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPT9 (45 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPT10 (46 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPT11 (47 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SPI4 (48 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SHA1_S (49 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_FPKA_SINTREQUEST_S (50 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SHA1_P (51 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_RNG (52 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_DSS_DSI1 (53 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_I2C1 (56 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_I2C2 (57 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_HDQ (58 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_MMC5 (59 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_I2C3 (61 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_I2C4 (62 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_AES2_S (63 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_AES2_P (64 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SPI1 (65 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SPI2 (66 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_HSI_P1 (67 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_HSI_P2 (68 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_FDIF_3 (69 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_UART4 (70 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_HSI_DMA (71 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_UART1 (72 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_UART2 (73 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_UART3 (74 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_PBIAS (75 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_OHCI (76 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_EHCI (77 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_TLL (78 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_AES1_S (79 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_WDT2 (80 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_DES_S (81 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_DES_P (82 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_MMC1 (83 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_DSS_DSI2 (84 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_AES1_P (85 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_MMC2 (86 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_MPU_ICR (87 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_C2C_SSCM_1 (88 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_FSUSB (89 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_FSUSB_SMI (90 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SPI3 (91 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_HS_USB_MC_N (92 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_HS_USB_DMA_N (93 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_MMC3 (94 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_GPT12 (95 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_MMC4 (96 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SLIMBUS1 (97 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SLIMBUS2 (98 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_ABE (99 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_DUCATI_MMU (100 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_DSS_HDMI (101 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SR_IVA (102 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_IVA_HD_POSYNCITRPEND_1 (103 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_IVA_HD_POSYNCITRPEND_0 (104 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_IVA_HD_POMBINTRPEND_0 (107 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_MCASP1_AR (108 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_MCASP1_AX (109 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_EMIF4_1 (110 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_EMIF4_2 (111 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_MCPDM (112 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_DMM (113 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_DMIC (114 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_CDMA_0 (115 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_CDMA_1 (116 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_CDMA_2 (117 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_CDMA_3 (118 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_SYS_2N (119 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_KBD_CTL (120 + OMAP44XX_IRQ_GIC_START) -#define OMAP44XX_IRQ_UNIPRO1 (124 + OMAP44XX_IRQ_GIC_START) - -#endif arch/arm/plat-omap/include/plat/irqs.h +1
-182@@ -28,9 +28,6 @@#ifndef __ASM_ARCH_OMAP15XX_IRQS_H#define __ASM_ARCH_OMAP15XX_IRQS_H -/* All OMAP4 specific defines are moved to irqs-44xx.h */ -#include "irqs-44xx.h" -/* * IRQ numbers for interrupt handler 1 * @@ -242,125 +239,6 @@#define INT_7XX_DMA_CH15 (62 + IH2_BASE)#define INT_7XX_NAND (63 + IH2_BASE) -#define INT_24XX_SYS_NIRQ 7 -#define INT_24XX_SDMA_IRQ0 12 -#define INT_24XX_SDMA_IRQ1 13 -#define INT_24XX_SDMA_IRQ2 14 -#define INT_24XX_SDMA_IRQ3 15 -#define INT_24XX_CAM_IRQ 24 -#define INT_24XX_DSS_IRQ 25 -#define INT_24XX_MAIL_U0_MPU 26 -#define INT_24XX_DSP_UMA 27 -#define INT_24XX_DSP_MMU 28 -#define INT_24XX_GPIO_BANK1 29 -#define INT_24XX_GPIO_BANK2 30 -#define INT_24XX_GPIO_BANK3 31 -#define INT_24XX_GPIO_BANK4 32 -#define INT_24XX_GPIO_BANK5 33 -#define INT_24XX_MAIL_U3_MPU 34 -#define INT_24XX_GPTIMER1 37 -#define INT_24XX_GPTIMER2 38 -#define INT_24XX_GPTIMER3 39 -#define INT_24XX_GPTIMER4 40 -#define INT_24XX_GPTIMER5 41 -#define INT_24XX_GPTIMER6 42 -#define INT_24XX_GPTIMER7 43 -#define INT_24XX_GPTIMER8 44 -#define INT_24XX_GPTIMER9 45 -#define INT_24XX_GPTIMER10 46 -#define INT_24XX_GPTIMER11 47 -#define INT_24XX_GPTIMER12 48 -#define INT_24XX_SHA1MD5 51 -#define INT_24XX_MCBSP4_IRQ_TX 54 -#define INT_24XX_MCBSP4_IRQ_RX 55 -#define INT_24XX_I2C1_IRQ 56 -#define INT_24XX_I2C2_IRQ 57 -#define INT_24XX_HDQ_IRQ 58 -#define INT_24XX_MCBSP1_IRQ_TX 59 -#define INT_24XX_MCBSP1_IRQ_RX 60 -#define INT_24XX_MCBSP2_IRQ_TX 62 -#define INT_24XX_MCBSP2_IRQ_RX 63 -#define INT_24XX_SPI1_IRQ 65 -#define INT_24XX_SPI2_IRQ 66 -#define INT_24XX_UART1_IRQ 72 -#define INT_24XX_UART2_IRQ 73 -#define INT_24XX_UART3_IRQ 74 -#define INT_24XX_USB_IRQ_GEN 75 -#define INT_24XX_USB_IRQ_NISO 76 -#define INT_24XX_USB_IRQ_ISO 77 -#define INT_24XX_USB_IRQ_HGEN 78 -#define INT_24XX_USB_IRQ_HSOF 79 -#define INT_24XX_USB_IRQ_OTG 80 -#define INT_24XX_MCBSP5_IRQ_TX 81 -#define INT_24XX_MCBSP5_IRQ_RX 82 -#define INT_24XX_MMC_IRQ 83 -#define INT_24XX_MMC2_IRQ 86 -#define INT_24XX_MCBSP3_IRQ_TX 89 -#define INT_24XX_MCBSP3_IRQ_RX 90 -#define INT_24XX_SPI3_IRQ 91 - -#define INT_243X_MCBSP2_IRQ 16 -#define INT_243X_MCBSP3_IRQ 17 -#define INT_243X_MCBSP4_IRQ 18 -#define INT_243X_MCBSP5_IRQ 19 -#define INT_243X_MCBSP1_IRQ 64 -#define INT_243X_HS_USB_MC 92 -#define INT_243X_HS_USB_DMA 93 -#define INT_243X_CARKIT_IRQ 94 - -#define INT_34XX_BENCH_MPU_EMUL 3 -#define INT_34XX_ST_MCBSP2_IRQ 4 -#define INT_34XX_ST_MCBSP3_IRQ 5 -#define INT_34XX_SSM_ABORT_IRQ 6 -#define INT_34XX_SYS_NIRQ 7 -#define INT_34XX_D2D_FW_IRQ 8 -#define INT_34XX_L3_DBG_IRQ 9 -#define INT_34XX_L3_APP_IRQ 10 -#define INT_34XX_PRCM_MPU_IRQ 11 -#define INT_34XX_MCBSP1_IRQ 16 -#define INT_34XX_MCBSP2_IRQ 17 -#define INT_34XX_GPMC_IRQ 20 -#define INT_34XX_MCBSP3_IRQ 22 -#define INT_34XX_MCBSP4_IRQ 23 -#define INT_34XX_CAM_IRQ 24 -#define INT_34XX_MCBSP5_IRQ 27 -#define INT_34XX_GPIO_BANK1 29 -#define INT_34XX_GPIO_BANK2 30 -#define INT_34XX_GPIO_BANK3 31 -#define INT_34XX_GPIO_BANK4 32 -#define INT_34XX_GPIO_BANK5 33 -#define INT_34XX_GPIO_BANK6 34 -#define INT_34XX_USIM_IRQ 35 -#define INT_34XX_WDT3_IRQ 36 -#define INT_34XX_SPI4_IRQ 48 -#define INT_34XX_SHA1MD52_IRQ 49 -#define INT_34XX_FPKA_READY_IRQ 50 -#define INT_34XX_SHA1MD51_IRQ 51 -#define INT_34XX_RNG_IRQ 52 -#define INT_34XX_I2C3_IRQ 61 -#define INT_34XX_FPKA_ERROR_IRQ 64 -#define INT_34XX_PBIAS_IRQ 75 -#define INT_34XX_OHCI_IRQ 76 -#define INT_34XX_EHCI_IRQ 77 -#define INT_34XX_TLL_IRQ 78 -#define INT_34XX_PARTHASH_IRQ 79 -#define INT_34XX_MMC3_IRQ 94 -#define INT_34XX_GPT12_IRQ 95 - -#define INT_36XX_UART4_IRQ 80 - -#define INT_35XX_HECC0_IRQ 24 -#define INT_35XX_HECC1_IRQ 28 -#define INT_35XX_EMAC_C0_RXTHRESH_IRQ 67 -#define INT_35XX_EMAC_C0_RX_PULSE_IRQ 68 -#define INT_35XX_EMAC_C0_TX_PULSE_IRQ 69 -#define INT_35XX_EMAC_C0_MISC_PULSE_IRQ 70 -#define INT_35XX_USBOTG_IRQ 71 -#define INT_35XX_UART4_IRQ 84 -#define INT_35XX_CCDC_VD0_IRQ 88 -#define INT_35XX_CCDC_VD1_IRQ 92 -#define INT_35XX_CCDC_VD2_IRQ 93 -/* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730/850) and * 16 MPUIO lines */ #define OMAP_MAX_GPIO_LINES 192@@ -377,66 +255,7 @@#endif #define OMAP_FPGA_IRQ_END (OMAP_FPGA_IRQ_BASE + OMAP_FPGA_NR_IRQS) -/* External TWL4030 can handle interrupts on 2430 and 34xx boards */ -#define TWL4030_IRQ_BASE (OMAP_FPGA_IRQ_END) -#ifdef CONFIG_TWL4030_CORE -#define TWL4030_BASE_NR_IRQS 8 -#define TWL4030_PWR_NR_IRQS 8 -#else -#define TWL4030_BASE_NR_IRQS 0 -#define TWL4030_PWR_NR_IRQS 0 -#endif -#define TWL4030_IRQ_END (TWL4030_IRQ_BASE + TWL4030_BASE_NR_IRQS) -#define TWL4030_PWR_IRQ_BASE TWL4030_IRQ_END -#define TWL4030_PWR_IRQ_END (TWL4030_PWR_IRQ_BASE + TWL4030_PWR_NR_IRQS) - -/* External TWL4030 gpio interrupts are optional */ -#define TWL4030_GPIO_IRQ_BASE TWL4030_PWR_IRQ_END -#ifdef CONFIG_GPIO_TWL4030 -#define TWL4030_GPIO_NR_IRQS 18 -#else -#define TWL4030_GPIO_NR_IRQS 0 -#endif -#define TWL4030_GPIO_IRQ_END (TWL4030_GPIO_IRQ_BASE + TWL4030_GPIO_NR_IRQS) - -#define TWL6030_IRQ_BASE (OMAP_FPGA_IRQ_END) -#ifdef CONFIG_TWL4030_CORE -#define TWL6030_BASE_NR_IRQS 20 -#else -#define TWL6030_BASE_NR_IRQS 0 -#endif -#define TWL6030_IRQ_END (TWL6030_IRQ_BASE + TWL6030_BASE_NR_IRQS) - -#define TWL6040_CODEC_IRQ_BASE TWL6030_IRQ_END -#ifdef CONFIG_TWL6040_CODEC -#define TWL6040_CODEC_NR_IRQS 6 -#else -#define TWL6040_CODEC_NR_IRQS 0 -#endif -#define TWL6040_CODEC_IRQ_END (TWL6040_CODEC_IRQ_BASE + TWL6040_CODEC_NR_IRQS) - -/* Total number of interrupts depends on the enabled blocks above */ -#if (TWL4030_GPIO_IRQ_END >TWL6040_CODEC_IRQ_END ) -#define TWL_IRQ_END TWL4030_GPIO_IRQ_END -#else -#define TWL_IRQ_END TWL6040_CODEC_IRQ_END -#endif - -/* GPMC related */ -#define OMAP_GPMC_IRQ_BASE (TWL_IRQ_END) -#define OMAP_GPMC_NR_IRQS 8 -#define OMAP_GPMC_IRQ_END (OMAP_GPMC_IRQ_BASE + OMAP_GPMC_NR_IRQS) - -/* PRCM IRQ handler */ -#ifdef CONFIG_ARCH_OMAP2PLUS -#define OMAP_PRCM_IRQ_BASE (OMAP_GPMC_IRQ_END) -#define OMAP_PRCM_NR_IRQS 64 -#define OMAP_PRCM_IRQ_END (OMAP_PRCM_IRQ_BASE + OMAP_PRCM_NR_IRQS) -#else -#define OMAP_PRCM_IRQ_END OMAP_GPMC_IRQ_END -#endif - -#define NR_IRQS OMAP_PRCM_IRQ_END +#define NR_IRQS OMAP_FPGA_IRQ_END#define OMAP_IRQ_BIT (irq) (1 << ((irq) % 32))drivers/media/video/omap/omap_vout.c +1
-0@@ -44,6 +44,7 @@#include <media/v4l2-device.h> #include <media/v4l2-ioctl.h> +#include <plat/cpu.h> #include <plat/dma.h> #include <plat/vrfb.h> #include <video/omapdss.h> drivers/media/video/omap3isp/isp.c +2
-0@@ -70,6 +70,8 @@#include <media/v4l2-common.h> #include <media/v4l2-device.h> +#include <plat/cpu.h> +#include "isp.h" #include "ispreg.h" #include "ispccdc.h" drivers/power/avs/smartreflex.c +2
-0@@ -27,6 +27,8 @@#include <linux/pm_runtime.h> #include <linux/power/smartreflex.h> +#include <plat/cpu.h> +#define SMARTREFLEX_NAME_LEN 16#define NVALUE_NAME_LEN 40#define SR_DISABLE_TIMEOUT 200drivers/staging/tidspbridge/core/wdt.c +1
-2@@ -26,7 +26,7 @@#define OMAP34XX_WDT3_BASE (0x49000000 + 0x30000) -#define INT_34XX_WDT3_IRQ 36 +#define INT_34XX_WDT3_IRQ (36 + NR_IRQS)static struct dsp_wdt_setting dsp_wdt; --To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120911/5336cd21/attachment.sig>
Tony Lindgren
maintainerPATCH 13/17 ARM: OMAP1: Move plat/irqs.h to mach/irqs.h
In reply to Tony LindgrenThis is now omap1 specific files.
--- arch/arm/mach-omap1/ams-delta-fiq-handler.S | 1 arch/arm/mach-omap1/dma.c | 3 arch/arm/mach-omap1/include/mach/ams-delta-fiq.h | 2 arch/arm/mach-omap1/include/mach/irqs.h | 267 ++++++++++++++++++++++ arch/arm/plat-omap/include/plat/irqs.h | 268 ---------------------- 5 files changed, 268 insertions(+), 273 deletions(-) delete mode 100644 arch/arm/plat-omap/include/plat/irqs.h
arch/arm/mach-omap1/ams-delta-fiq-handler.S +1 -0
@@ -18,6 +18,7 @@ #include <plat/board-ams-delta.h> +#include <mach/irqs.h> #include <mach/ams-delta-fiq.h> #include "iomap.h"
arch/arm/mach-omap1/dma.c +2 -1
@@ -27,7 +27,8 @@#include <plat/dma.h> #include <plat/tc.h> -#include <plat/irqs.h> + +#include <mach/irqs.h> #define OMAP1_DMA_BASE (0xfffed800)#define OMAP1_LOGICAL_DMA_CH_COUNT 17
arch/arm/mach-omap1/include/mach/ams-delta-fiq.h +0 -2
@@ -14,8 +14,6 @@#ifndef __AMS_DELTA_FIQ_H#define __AMS_DELTA_FIQ_H -#include <plat/irqs.h> -/* * Interrupt number used for passing control from FIQ to IRQ. * IRQ12, described as reserved, has been selected.
arch/arm/mach-omap1/include/mach/irqs.h +265 -2
270 lines not on this page · raw message
arch/arm/plat-omap/include/plat/irqs.h deleted +0 -268
268 lines not on this page · raw message
Tony Lindgren
maintainerPATCH 14/17 ARM: OMAP: Remove unused old gpio-switch.h
In reply to Tony LindgrenThis is no longer used anywhere.
--- arch/arm/plat-omap/include/plat/gpio-switch.h | 54 ------------------------- 1 file changed, 54 deletions(-) delete mode 100644 arch/arm/plat-omap/include/plat/gpio-switch.h
arch/arm/plat-omap/include/plat/gpio-switch.h deleted +0 -54
@@ -1,54 +0,0 @@ -/* -* GPIO switch definitions -* -* Copyright (C) 2006 Nokia Corporation -* -* 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. -*/ - -#ifndef __ASM_ARCH_OMAP_GPIO_SWITCH_H -#define __ASM_ARCH_OMAP_GPIO_SWITCH_H - -#include <linux/types.h> - -/* Cover: -* high -> closed -* low -> open -* Connection: -* high -> connected -* low -> disconnected -* Activity: -* high -> active -* low -> inactive -* -*/ -#define OMAP_GPIO_SWITCH_TYPE_COVER 0x0000 -#define OMAP_GPIO_SWITCH_TYPE_CONNECTION 0x0001 -#define OMAP_GPIO_SWITCH_TYPE_ACTIVITY 0x0002 -#define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001 -#define OMAP_GPIO_SWITCH_FLAG_OUTPUT 0x0002 - -struct omap_gpio_switch { -const char *name; -s16 gpio; -unsigned flags:4 ; -unsigned type:4 ; - -/* Time in ms to debounce when transitioning from -* inactive state to active state. */ -u16 debounce_rising; -/* Same for transition from active to inactive state. */ -u16 debounce_falling; - -/* notify board-specific code about state changes */ -void (* notify)(void *data,int state); -void *notify_data; -}; - -/* Call at init time only */ -extern void omap_register_gpio_switches (const struct omap_gpio_switch *tbl, -int count); - -#endif
Tony Lindgren
maintainerPATCH 15/17 ARM: OMAP: Split plat/hardware.h, use local soc.h for omap2+
In reply to Tony LindgrenAs the plat and mach includes need to disappear for single zImage work, we need to remove plat/hardware.h.
Do this by splitting plat/hardware.h into omap1 and omap2+ specific files.
The old plat/hardware.h already has omap1 only defines, so it gets moved to mach/hardware.h for omap1. For omap2+, we use the local soc.h that for now just includes the related SoC headers to keep this patch more readable.
Note that the local soc.h still includes plat/cpu.h that can be dealt with in later patches. Let's also include plat/serial.h from common.h for all the board-*.c files. This allows making the include files local later on without patching these files again.
Note that only minimal changes are done in this patch for the drivers/watchdog/omap_wdt.c driver to keep things compiling. Further patches are needed to eventually remove cpu_is_omap usage in the drivers.
Also only minimal changes are done to sound/soc/omap/* to remove the unneeded includes and to define OMAP44XX_MCPDM_L3_BASE locally so there's no need to include omap44xx.h.
While at it, also sort some of the includes in the standard way.
--- arch/arm/mach-omap1/include/mach/hardware.h | 285 +++++++++++++++++++++++ arch/arm/mach-omap2/board-3430sdp.c | 1 arch/arm/mach-omap2/board-4430sdp.c | 2 arch/arm/mach-omap2/board-am3517crane.c | 1 arch/arm/mach-omap2/board-am3517evm.c | 1 arch/arm/mach-omap2/board-apollon.c | 1 arch/arm/mach-omap2/board-cm-t3517.c | 1 arch/arm/mach-omap2/board-devkit8000.c | 3 arch/arm/mach-omap2/board-flash.c | 1 arch/arm/mach-omap2/board-generic.c | 1 arch/arm/mach-omap2/board-h4.c | 3 arch/arm/mach-omap2/board-igep0020.c | 1 arch/arm/mach-omap2/board-ldp.c | 3 arch/arm/mach-omap2/board-n8x0.c | 1 arch/arm/mach-omap2/board-omap3beagle.c | 1 arch/arm/mach-omap2/board-omap3evm.c | 1 arch/arm/mach-omap2/board-omap3logic.c | 14 - arch/arm/mach-omap2/board-omap3pandora.c | 1 arch/arm/mach-omap2/board-omap3stalker.c | 6 arch/arm/mach-omap2/board-omap3touchbook.c | 1 arch/arm/mach-omap2/board-omap4panda.c | 2 arch/arm/mach-omap2/board-overo.c | 2 arch/arm/mach-omap2/board-rx51.c | 1 arch/arm/mach-omap2/board-ti8168evm.c | 1 arch/arm/mach-omap2/board-zoom-debugboard.c | 4 arch/arm/mach-omap2/board-zoom-display.c | 2 arch/arm/mach-omap2/board-zoom-peripherals.c | 1 arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | 2 arch/arm/mach-omap2/clkt_dpll.c | 2 arch/arm/mach-omap2/clock.c | 8 - arch/arm/mach-omap2/clock2420_data.c | 2 arch/arm/mach-omap2/clock2430.c | 2 arch/arm/mach-omap2/clock2430_data.c | 2 arch/arm/mach-omap2/clock2xxx.c | 2 arch/arm/mach-omap2/clock3xxx.c | 2 arch/arm/mach-omap2/clock3xxx_data.c | 2 arch/arm/mach-omap2/clock44xx_data.c | 2 arch/arm/mach-omap2/cm2xxx_3xxx.c | 3 arch/arm/mach-omap2/common.c | 2 arch/arm/mach-omap2/common.h | 6 arch/arm/mach-omap2/control.c | 2 arch/arm/mach-omap2/devices.c | 1 arch/arm/mach-omap2/dpll3xxx.c | 2 arch/arm/mach-omap2/dpll44xx.c | 2 arch/arm/mach-omap2/emu.c | 3 arch/arm/mach-omap2/gpmc-nand.c | 3 arch/arm/mach-omap2/gpmc-onenand.c | 3 arch/arm/mach-omap2/gpmc-smc91x.c | 3 arch/arm/mach-omap2/gpmc.c | 4 arch/arm/mach-omap2/i2c.c | 1 arch/arm/mach-omap2/id.c | 2 arch/arm/mach-omap2/include/mach/hardware.h | 2 arch/arm/mach-omap2/io.c | 3 arch/arm/mach-omap2/irq.c | 3 arch/arm/mach-omap2/mailbox.c | 3 arch/arm/mach-omap2/mcbsp.c | 1 arch/arm/mach-omap2/omap-smp.c | 2 arch/arm/mach-omap2/omap-wakeupgen.c | 2 arch/arm/mach-omap2/omap4-common.c | 2 arch/arm/mach-omap2/omap_hwmod.c | 8 - arch/arm/mach-omap2/omap_hwmod_2420_data.c | 1 arch/arm/mach-omap2/omap_hwmod_2430_data.c | 5 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 3 arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 1 arch/arm/mach-omap2/omap_l3_noc.c | 3 arch/arm/mach-omap2/omap_phy_internal.c | 2 arch/arm/mach-omap2/opp2420_data.c | 2 arch/arm/mach-omap2/opp2430_data.c | 2 arch/arm/mach-omap2/opp3xxx_data.c | 2 arch/arm/mach-omap2/opp4xxx_data.c | 3 arch/arm/mach-omap2/powerdomain.c | 6 arch/arm/mach-omap2/powerdomains3xxx_data.c | 4 arch/arm/mach-omap2/prm2xxx_3xxx.c | 4 arch/arm/mach-omap2/prm44xx.c | 3 arch/arm/mach-omap2/sdrc2xxx.c | 2 arch/arm/mach-omap2/sleep34xx.S | 2 arch/arm/mach-omap2/soc.h | 6 arch/arm/mach-omap2/sram242x.S | 3 arch/arm/mach-omap2/sram243x.S | 3 arch/arm/mach-omap2/sram34xx.S | 3 arch/arm/mach-omap2/timer.c | 3 arch/arm/mach-omap2/twl-common.c | 2 arch/arm/mach-omap2/usb-host.c | 1 arch/arm/mach-omap2/usb-musb.c | 6 arch/arm/mach-omap2/vc.c | 3 arch/arm/mach-omap2/voltagedomains3xxx_data.c | 3 arch/arm/plat-omap/counter_32k.c | 2 arch/arm/plat-omap/dma.c | 3 arch/arm/plat-omap/include/plat/cpu.h | 3 arch/arm/plat-omap/include/plat/hardware.h | 293 ------------------------ arch/arm/plat-omap/include/plat/omap4-keypad.h | 2 arch/arm/plat-omap/include/plat/omap44xx.h | 1 drivers/watchdog/omap_wdt.c | 5 sound/soc/omap/omap-abe-twl6040.c | 4 sound/soc/omap/omap-mcpdm.c | 2 95 files changed, 391 insertions(+), 433 deletions(-) delete mode 100644 arch/arm/plat-omap/include/plat/hardware.h
arch/arm/mach-omap1/include/mach/hardware.h +281 -4
@@ -1,11 +1,46 @@/* * arch/arm/mach-omap1/include/mach/hardware.h +* +* Hardware definitions for TI OMAP processors and boards +* +* NOTE: Please put device driver specific defines into a separate header +* file for each driver. +* +* Copyright (C) 2001 RidgeRun, Inc. +* Author: RidgeRun, Inc. Greg Lonnon <[email protected]> +* +* Reorganized for Linux-2.6 by Tony Lindgren <[email protected]> +* and Dirk Behme <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at your +* option) any later version. +* +* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN +* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* 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., +* 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef __MACH_HARDWARE_H -#define __MACH_HARDWARE_H +#ifndef __ASM_ARCH_OMAP_HARDWARE_H +#define __ASM_ARCH_OMAP_HARDWARE_H +#include <asm/sizes.h> #ifndef __ASSEMBLER__ +#include <asm/types.h> +#include <plat/cpu.h> +/* * NOTE: Please use ioremap + __raw_read/write where possible instead of these */
@@ -35,7 +70,249 @@ static inline u32 omap_cs3_phys(void) ? 0 : OMAP_CS3_PHYS; } +#endif /* ifndef __ASSEMBLER__ */ + +#include <plat/serial.h> + +/* +* --------------------------------------------------------------------------- +* Common definitions for all OMAP processors +* NOTE: Put all processor or board specific parts to the special header +* files. +* --------------------------------------------------------------------------- +*/ + +/* +* ---------------------------------------------------------------------------- +* Timers +* ---------------------------------------------------------------------------- +*/ +#define OMAP_MPU_TIMER1_BASE (0xfffec500) +#define OMAP_MPU_TIMER2_BASE (0xfffec600) +#define OMAP_MPU_TIMER3_BASE (0xfffec700) +#define MPU_TIMER_FREE (1 << 6) +#define MPU_TIMER_CLOCK_ENABLE (1 << 5) +#define MPU_TIMER_AR (1 << 1) +#define MPU_TIMER_ST (1 << 0) + +/* +* ---------------------------------------------------------------------------- +* Clocks +* ---------------------------------------------------------------------------- +*/ +#define CLKGEN_REG_BASE (0xfffece00) +#define ARM_CKCTL (CLKGEN_REG_BASE + 0x0) +#define ARM_IDLECT1 (CLKGEN_REG_BASE + 0x4) +#define ARM_IDLECT2 (CLKGEN_REG_BASE + 0x8) +#define ARM_EWUPCT (CLKGEN_REG_BASE + 0xC) +#define ARM_RSTCT1 (CLKGEN_REG_BASE + 0x10) +#define ARM_RSTCT2 (CLKGEN_REG_BASE + 0x14) +#define ARM_SYSST (CLKGEN_REG_BASE + 0x18) +#define ARM_IDLECT3 (CLKGEN_REG_BASE + 0x24) + +#define CK_RATEF 1 +#define CK_IDLEF 2 +#define CK_ENABLEF 4 +#define CK_SELECTF 8 +#define SETARM_IDLE_SHIFT + +/* DPLL control registers */ +#define DPLL_CTL (0xfffecf00) + +/* DSP clock control. Must use __raw_readw() and __raw_writew() with these */ +#define DSP_CONFIG_REG_BASE IOMEM(0xe1008000) +#define DSP_CKCTL (DSP_CONFIG_REG_BASE + 0x0) +#define DSP_IDLECT1 (DSP_CONFIG_REG_BASE + 0x4) +#define DSP_IDLECT2 (DSP_CONFIG_REG_BASE + 0x8) +#define DSP_RSTCT2 (DSP_CONFIG_REG_BASE + 0x14) + +/* +* --------------------------------------------------------------------------- +* UPLD +* --------------------------------------------------------------------------- +*/ +#define ULPD_REG_BASE (0xfffe0800) +#define ULPD_IT_STATUS (ULPD_REG_BASE + 0x14) +#define ULPD_SETUP_ANALOG_CELL_3 (ULPD_REG_BASE + 0x24) +#define ULPD_CLOCK_CTRL (ULPD_REG_BASE + 0x30) +# define DIS_USB_PVCI_CLK (1 << 5)/* no USB/FAC synch */ +# define USB_MCLK_EN (1 << 4)/* enable W4_USB_CLKO */ +#define ULPD_SOFT_REQ (ULPD_REG_BASE + 0x34) +# define SOFT_UDC_REQ (1 << 4) +# define SOFT_USB_CLK_REQ (1 << 3) +# define SOFT_DPLL_REQ (1 << 0) +#define ULPD_DPLL_CTRL (ULPD_REG_BASE + 0x3c) +#define ULPD_STATUS_REQ (ULPD_REG_BASE + 0x40) +#define ULPD_APLL_CTRL (ULPD_REG_BASE + 0x4c) +#define ULPD_POWER_CTRL (ULPD_REG_BASE + 0x50) +#define ULPD_SOFT_DISABLE_REQ_REG (ULPD_REG_BASE + 0x68) +# define DIS_MMC2_DPLL_REQ (1 << 11) +# define DIS_MMC1_DPLL_REQ (1 << 10) +# define DIS_UART3_DPLL_REQ (1 << 9) +# define DIS_UART2_DPLL_REQ (1 << 8) +# define DIS_UART1_DPLL_REQ (1 << 7) +# define DIS_USB_HOST_DPLL_REQ (1 << 6) +#define ULPD_SDW_CLK_DIV_CTRL_SEL (ULPD_REG_BASE + 0x74) +#define ULPD_CAM_CLK_CTRL (ULPD_REG_BASE + 0x7c) + +/* +* --------------------------------------------------------------------------- +* Watchdog timer +* --------------------------------------------------------------------------- +*/ + +/* Watchdog timer within the OMAP3.2 gigacell */ +#define OMAP_MPU_WATCHDOG_BASE (0xfffec800) +#define OMAP_WDT_TIMER (OMAP_MPU_WATCHDOG_BASE + 0x0) +#define OMAP_WDT_LOAD_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4) +#define OMAP_WDT_READ_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4) +#define OMAP_WDT_TIMER_MODE (OMAP_MPU_WATCHDOG_BASE + 0x8) + +/* +* --------------------------------------------------------------------------- +* Interrupts +* --------------------------------------------------------------------------- +*/ +#ifdef CONFIG_ARCH_OMAP1 + +/* +* XXX: These probably want to be moved to arch/arm/mach-omap/omap1/irq.c +* or something similar.. -- PFM. +*/ + +#define OMAP_IH1_BASE 0xfffecb00 +#define OMAP_IH2_BASE 0xfffe0000 + +#define OMAP_IH1_ITR (OMAP_IH1_BASE + 0x00) +#define OMAP_IH1_MIR (OMAP_IH1_BASE + 0x04) +#define OMAP_IH1_SIR_IRQ (OMAP_IH1_BASE + 0x10) +#define OMAP_IH1_SIR_FIQ (OMAP_IH1_BASE + 0x14) +#define OMAP_IH1_CONTROL (OMAP_IH1_BASE + 0x18) +#define OMAP_IH1_ILR0 (OMAP_IH1_BASE + 0x1c) +#define OMAP_IH1_ISR (OMAP_IH1_BASE + 0x9c) + +#define OMAP_IH2_ITR (OMAP_IH2_BASE + 0x00) +#define OMAP_IH2_MIR (OMAP_IH2_BASE + 0x04) +#define OMAP_IH2_SIR_IRQ (OMAP_IH2_BASE + 0x10) +#define OMAP_IH2_SIR_FIQ (OMAP_IH2_BASE + 0x14) +#define OMAP_IH2_CONTROL (OMAP_IH2_BASE + 0x18) +#define OMAP_IH2_ILR0 (OMAP_IH2_BASE + 0x1c) +#define OMAP_IH2_ISR (OMAP_IH2_BASE + 0x9c) + +#define IRQ_ITR_REG_OFFSET 0x00 +#define IRQ_MIR_REG_OFFSET 0x04 +#define IRQ_SIR_IRQ_REG_OFFSET 0x10 +#define IRQ_SIR_FIQ_REG_OFFSET 0x14 +#define IRQ_CONTROL_REG_OFFSET 0x18 +#define IRQ_ISR_REG_OFFSET 0x9c +#define IRQ_ILR0_REG_OFFSET 0x1c +#define IRQ_GMR_REG_OFFSET 0xa0 +#endif -#endif -#include <plat/hardware.h> +/* +* ---------------------------------------------------------------------------- +* System control registers +* ---------------------------------------------------------------------------- +*/ +#define MOD_CONF_CTRL_0 0xfffe1080 +#define MOD_CONF_CTRL_1 0xfffe1110 + +/* +* ---------------------------------------------------------------------------- +* Pin multiplexing registers +* ---------------------------------------------------------------------------- +*/ +#define FUNC_MUX_CTRL_0 0xfffe1000 +#define FUNC_MUX_CTRL_1 0xfffe1004 +#define FUNC_MUX_CTRL_2 0xfffe1008 +#define COMP_MODE_CTRL_0 0xfffe100c +#define FUNC_MUX_CTRL_3 0xfffe1010 +#define FUNC_MUX_CTRL_4 0xfffe1014 +#define FUNC_MUX_CTRL_5 0xfffe1018 +#define FUNC_MUX_CTRL_6 0xfffe101C +#define FUNC_MUX_CTRL_7 0xfffe1020 +#define FUNC_MUX_CTRL_8 0xfffe1024 +#define FUNC_MUX_CTRL_9 0xfffe1028 +#define FUNC_MUX_CTRL_A 0xfffe102C +#define FUNC_MUX_CTRL_B 0xfffe1030 +#define FUNC_MUX_CTRL_C 0xfffe1034 +#define FUNC_MUX_CTRL_D 0xfffe1038 +#define PULL_DWN_CTRL_0 0xfffe1040 +#define PULL_DWN_CTRL_1 0xfffe1044 +#define PULL_DWN_CTRL_2 0xfffe1048 +#define PULL_DWN_CTRL_3 0xfffe104c +#define PULL_DWN_CTRL_4 0xfffe10ac + +/* OMAP-1610 specific multiplexing registers */ +#define FUNC_MUX_CTRL_E 0xfffe1090 +#define FUNC_MUX_CTRL_F 0xfffe1094 +#define FUNC_MUX_CTRL_10 0xfffe1098 +#define FUNC_MUX_CTRL_11 0xfffe109c +#define FUNC_MUX_CTRL_12 0xfffe10a0 +#define PU_PD_SEL_0 0xfffe10b4 +#define PU_PD_SEL_1 0xfffe10b8 +#define PU_PD_SEL_2 0xfffe10bc +#define PU_PD_SEL_3 0xfffe10c0 +#define PU_PD_SEL_4 0xfffe10c4 + +/* Timer32K for 1610 and 1710*/ +#define OMAP_TIMER32K_BASE 0xFFFBC400 + +/* +* --------------------------------------------------------------------------- +* TIPB bus interface +* --------------------------------------------------------------------------- +*/ +#define TIPB_PUBLIC_CNTL_BASE 0xfffed300 +#define MPU_PUBLIC_TIPB_CNTL (TIPB_PUBLIC_CNTL_BASE + 0x8) +#define TIPB_PRIVATE_CNTL_BASE 0xfffeca00 +#define MPU_PRIVATE_TIPB_CNTL (TIPB_PRIVATE_CNTL_BASE + 0x8) + +/* +* ---------------------------------------------------------------------------- +* MPUI interface +* ---------------------------------------------------------------------------- +*/ +#define MPUI_BASE (0xfffec900) +#define MPUI_CTRL (MPUI_BASE + 0x0) +#define MPUI_DEBUG_ADDR (MPUI_BASE + 0x4) +#define MPUI_DEBUG_DATA (MPUI_BASE + 0x8) +#define MPUI_DEBUG_FLAG (MPUI_BASE + 0xc) +#define MPUI_STATUS_REG (MPUI_BASE + 0x10) +#define MPUI_DSP_STATUS (MPUI_BASE + 0x14) +#define MPUI_DSP_BOOT_CONFIG (MPUI_BASE + 0x18) +#define MPUI_DSP_API_CONFIG (MPUI_BASE + 0x1c) + +/* +* ---------------------------------------------------------------------------- +* LED Pulse Generator +* ---------------------------------------------------------------------------- +*/ +#define OMAP_LPG1_BASE 0xfffbd000 +#define OMAP_LPG2_BASE 0xfffbd800 +#define OMAP_LPG1_LCR (OMAP_LPG1_BASE + 0x00) +#define OMAP_LPG1_PMR (OMAP_LPG1_BASE + 0x04) +#define OMAP_LPG2_LCR (OMAP_LPG2_BASE + 0x00) +#define OMAP_LPG2_PMR (OMAP_LPG2_BASE + 0x04) + +/* +* ---------------------------------------------------------------------------- +* Pulse-Width Light +* ---------------------------------------------------------------------------- +*/ +#define OMAP_PWL_BASE 0xfffb5800 +#define OMAP_PWL_ENABLE (OMAP_PWL_BASE + 0x00) +#define OMAP_PWL_CLK_ENABLE (OMAP_PWL_BASE + 0x04) + +/* +* --------------------------------------------------------------------------- +* Processor specific defines +* --------------------------------------------------------------------------- +*/ + +#include <plat/omap7xx.h> +#include <plat/omap1510.h> +#include <plat/omap16xx.h> + +#endif /* __ASM_ARCH_OMAP_HARDWARE_H */
arch/arm/mach-omap2/board-3430sdp.c +0 -1
@@ -25,7 +25,6 @@#include <linux/gpio.h> #include <linux/mmc/host.h> -#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/map.h>
arch/arm/mach-omap2/board-4430sdp.c +1 -1
@@ -28,7 +28,6 @@#include <linux/leds_pwm.h> #include <linux/platform_data/omap4-keypad.h> -#include <mach/hardware.h> #include <asm/hardware/gic.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
@@ -44,6 +43,7 @@#include <linux/wl12xx.h> #include <linux/platform_data/omap-abe-twl6040.h> +#include "soc.h" #include "mux.h" #include "hsmmc.h" #include "control.h"
arch/arm/mach-omap2/board-am3517crane.c +0 -1
@@ -21,7 +21,6 @@#include <linux/init.h> #include <linux/gpio.h> -#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/map.h>
arch/arm/mach-omap2/board-am3517evm.c +0 -1
@@ -27,7 +27,6 @@#include <linux/mmc/host.h> #include <linux/platform_data/gpio-omap.h> -#include <mach/hardware.h> #include <mach/am35xx.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
arch/arm/mach-omap2/board-apollon.c +0 -1
@@ -29,7 +29,6 @@#include <linux/smc91x.h> #include <linux/gpio.h> -#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/flash.h>
arch/arm/mach-omap2/board-cm-t3517.c +0 -1
@@ -42,7 +42,6 @@#include <plat/usb.h> #include <plat/nand.h> #include <plat/gpmc.h> -#include <plat/serial.h> #include <mach/am35xx.h>
arch/arm/mach-omap2/board-devkit8000.c +0 -3
@@ -32,8 +32,6 @@#include <linux/regulator/machine.h> #include <linux/i2c/twl.h> - -#include <mach/hardware.h> #include <mach/id.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
@@ -55,7 +53,6 @@#include <linux/interrupt.h> #include "sdram-micron-mt46h32m32lf-6.h" -#include "mux.h" #include "hsmmc.h" #include "common-board-devices.h"
arch/arm/mach-omap2/board-flash.c +1 -0
@@ -23,6 +23,7 @@#include <plat/onenand.h> #include <plat/tc.h> +#include "common.h" #include "board-flash.h" #define REG_FPGA_REV 0x10
arch/arm/mach-omap2/board-generic.c +0 -1
@@ -16,7 +16,6 @@#include <linux/of_platform.h> #include <linux/irqdomain.h> -#include <mach/hardware.h> #include <asm/hardware/gic.h> #include <asm/mach/arch.h>
arch/arm/mach-omap2/board-h4.c +1 -2
@@ -27,12 +27,10 @@#include <linux/io.h> #include <linux/input/matrix_keypad.h> -#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/map.h> -#include "common.h" #include <plat/menelaus.h> #include <plat/dma.h> #include <plat/gpmc.h>
@@ -41,6 +39,7 @@#include <video/omapdss.h> #include <video/omap-panel-generic-dpi.h> +#include "common.h" #include "mux.h" #include "control.h"
arch/arm/mach-omap2/board-igep0020.c +0 -1
@@ -32,7 +32,6 @@#include "common.h" #include <plat/gpmc.h> #include <plat/usb.h> -#include <plat/serial.h> #include <video/omapdss.h> #include <video/omap-panel-tfp410.h>
arch/arm/mach-omap2/board-ldp.c +0 -3
@@ -29,7 +29,6 @@#include <linux/smsc911x.h> #include <linux/mmc/host.h> -#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/map.h>
@@ -38,8 +37,6 @@#include "common.h" #include <plat/gpmc.h> #include <mach/board-zoom.h> - -#include <asm/delay.h> #include <plat/usb.h> #include <plat/gpmc-smsc911x.h>
arch/arm/mach-omap2/board-n8x0.c +0 -1
@@ -30,7 +30,6 @@#include <plat/mcspi.h> #include <plat/onenand.h> #include <plat/mmc.h> -#include <plat/serial.h> #include "mux.h"
arch/arm/mach-omap2/board-omap3beagle.c +0 -1
@@ -33,7 +33,6 @@#include <linux/regulator/machine.h> #include <linux/i2c/twl.h> -#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/map.h>
arch/arm/mach-omap2/board-omap3evm.c +0 -1
@@ -40,7 +40,6 @@#include <linux/mmc/host.h> #include <linux/export.h> -#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/map.h>
arch/arm/mach-omap2/board-omap3logic.c +6 -8
@@ -30,23 +30,21 @@#include <linux/i2c/twl.h> #include <linux/mmc/host.h> -#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/map.h> -#include "mux.h" -#include "hsmmc.h" -#include "control.h" -#include "common-board-devices.h" - -#include <plat/mux.h> -#include "common.h" #include <plat/gpmc-smsc911x.h> #include <plat/gpmc.h> #include <plat/sdrc.h> #include <plat/usb.h> +#include "common.h" +#include "mux.h" +#include "hsmmc.h" +#include "control.h" +#include "common-board-devices.h" +#define OMAP3LOGIC_SMSC911X_CS 1#define OMAP3530_LV_SOM_MMC_GPIO_CD 110
arch/arm/mach-omap2/board-omap3pandora.c +0 -1
@@ -41,7 +41,6 @@#include <asm/mach/map.h> #include "common.h" -#include <mach/hardware.h> #include <plat/mcspi.h> #include <plat/usb.h> #include <video/omapdss.h>
arch/arm/mach-omap2/board-omap3stalker.c +5 -1
@@ -28,8 +28,12 @@#include <linux/regulator/machine.h> #include <linux/i2c/twl.h> #include <linux/mmc/host.h> +#include <linux/input/matrix_keypad.h> +#include <linux/spi/spi.h> +#include <linux/interrupt.h> +#include <linux/smsc911x.h> +#include <linux/i2c/at24.h> -#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/map.h>
arch/arm/mach-omap2/board-omap3touchbook.c +0 -1
@@ -37,7 +37,6 @@#include <linux/regulator/machine.h> #include <linux/i2c/twl.h> -#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/map.h>
arch/arm/mach-omap2/board-omap4panda.c +1 -1
@@ -32,7 +32,6 @@#include <linux/wl12xx.h> #include <linux/platform_data/omap-abe-twl6040.h> -#include <mach/hardware.h> #include <asm/hardware/gic.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
@@ -44,6 +43,7 @@#include <plat/mmc.h> #include <video/omap-panel-tfp410.h> +#include "soc.h" #include "hsmmc.h" #include "control.h" #include "mux.h"
arch/arm/mach-omap2/board-overo.c +0 -2
@@ -47,10 +47,8 @@#include <video/omap-panel-generic-dpi.h> #include <video/omap-panel-tfp410.h> #include <plat/gpmc.h> -#include <mach/hardware.h> #include <plat/nand.h> #include <plat/mcspi.h> -#include <plat/mux.h> #include <plat/usb.h> #include "mux.h"
arch/arm/mach-omap2/board-rx51.c +0 -1
@@ -18,7 +18,6 @@#include <linux/gpio.h> #include <linux/leds.h> -#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/map.h>
arch/arm/mach-omap2/board-ti8168evm.c +0 -1
@@ -15,7 +15,6 @@#include <linux/kernel.h> #include <linux/init.h> -#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/map.h>
arch/arm/mach-omap2/board-zoom-debugboard.c +3 -1
@@ -19,10 +19,12 @@#include <plat/gpmc.h> #include <plat/gpmc-smsc911x.h> -#include <plat/serial.h> #include <mach/board-zoom.h> +#include "soc.h" +#include "common.h" +#define ZOOM_SMSC911X_CS 7#define ZOOM_SMSC911X_GPIO 158#define ZOOM_QUADUART_CS 3
arch/arm/mach-omap2/board-zoom-display.c +1 -1
@@ -18,7 +18,7 @@#include <video/omapdss.h> #include <mach/board-zoom.h> -#include <plat/cpu.h> +#include "common.h" #define LCD_PANEL_RESET_GPIO_PROD 96#define LCD_PANEL_RESET_GPIO_PILOT 55
arch/arm/mach-omap2/board-zoom-peripherals.c +0 -1
@@ -27,7 +27,6 @@#include "common.h" #include <plat/usb.h> -#include <plat/serial.h> #include <mach/board-zoom.h>
arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c +1 -1
@@ -33,11 +33,11 @@#include <linux/cpufreq.h> #include <linux/slab.h> -#include <plat/cpu.h> #include <plat/clock.h> #include <plat/sram.h> #include <plat/sdrc.h> +#include "soc.h" #include "clock.h" #include "clock2xxx.h" #include "opp2xxx.h"
arch/arm/mach-omap2/clkt_dpll.c +1 -1
@@ -22,8 +22,8 @@#include <asm/div64.h> #include <plat/clock.h> -#include <plat/cpu.h> +#include "soc.h" #include "clock.h" #include "cm-regbits-24xx.h" #include "cm-regbits-34xx.h"
arch/arm/mach-omap2/clock.c +5 -3
@@ -22,14 +22,16 @@#include <linux/clk.h> #include <linux/io.h> #include <linux/bitops.h> -#include <trace/events/power.h> #include <asm/cpu.h> +#include <plat/clock.h> -#include "clockdomain.h" -#include <plat/cpu.h> #include <plat/prcm.h> +#include <trace/events/power.h> + +#include "soc.h" +#include "clockdomain.h" #include "clock.h" #include "cm2xxx_3xxx.h" #include "cm-regbits-24xx.h"
arch/arm/mach-omap2/clock2420_data.c +1 -1
@@ -18,9 +18,9 @@#include <linux/clk.h> #include <linux/list.h> -#include <plat/hardware.h> #include <plat/clkdev_omap.h> +#include "soc.h" #include "iomap.h" #include "clock.h" #include "clock2xxx.h"
arch/arm/mach-omap2/clock2430.c +1 -1
@@ -21,9 +21,9 @@#include <linux/clk.h> #include <linux/io.h> -#include <plat/hardware.h> #include <plat/clock.h> +#include "soc.h" #include "iomap.h" #include "clock.h" #include "clock2xxx.h"
arch/arm/mach-omap2/clock2430_data.c +1 -1
@@ -17,9 +17,9 @@#include <linux/clk.h> #include <linux/list.h> -#include <plat/hardware.h> #include <plat/clkdev_omap.h> +#include "soc.h" #include "iomap.h" #include "clock.h" #include "clock2xxx.h"
arch/arm/mach-omap2/clock2xxx.c +1 -1
@@ -22,9 +22,9 @@#include <linux/clk.h> #include <linux/io.h> -#include <plat/cpu.h> #include <plat/clock.h> +#include "soc.h" #include "clock.h" #include "clock2xxx.h" #include "cm.h"
arch/arm/mach-omap2/clock3xxx.c +1 -1
@@ -21,9 +21,9 @@#include <linux/clk.h> #include <linux/io.h> -#include <plat/hardware.h> #include <plat/clock.h> +#include "soc.h" #include "clock.h" #include "clock3xxx.h" #include "prm2xxx_3xxx.h"
arch/arm/mach-omap2/clock3xxx_data.c +1 -1
@@ -21,9 +21,9 @@#include <linux/list.h> #include <linux/io.h> -#include <plat/hardware.h> #include <plat/clkdev_omap.h> +#include "soc.h" #include "iomap.h" #include "clock.h" #include "clock3xxx.h"
arch/arm/mach-omap2/clock44xx_data.c +1 -1
@@ -28,9 +28,9 @@#include <linux/clk.h> #include <linux/io.h> -#include <plat/hardware.h> #include <plat/clkdev_omap.h> +#include "soc.h" #include "iomap.h" #include "clock.h" #include "clock44xx.h"
arch/arm/mach-omap2/cm2xxx_3xxx.c +1 -2
@@ -18,8 +18,7 @@#include <linux/err.h> #include <linux/io.h> -#include <plat/hardware.h> - +#include "soc.h" #include "iomap.h" #include "common.h" #include "cm.h"
arch/arm/mach-omap2/common.c +1 -1
@@ -17,10 +17,10 @@#include <linux/clk.h> #include <linux/io.h> -#include <plat/hardware.h> #include <plat/mux.h> #include <plat/clock.h> +#include "soc.h" #include "iomap.h" #include "common.h" #include "sdrc.h"
arch/arm/mach-omap2/common.h +5 -1
@@ -29,9 +29,13 @@#include <linux/irq.h> #include <linux/delay.h> #include <linux/i2c/twl.h> -#include <plat/common.h> +#include <asm/proc-fns.h> +#include <plat/cpu.h> +#include <plat/serial.h> +#include <plat/common.h> +#define OMAP_INTC_START NR_IRQS#ifdef CONFIG_SOC_OMAP2420
arch/arm/mach-omap2/control.c +1 -1
@@ -15,9 +15,9 @@#include <linux/kernel.h> #include <linux/io.h> -#include <plat/hardware.h> #include <plat/sdrc.h> +#include "soc.h" #include "iomap.h" #include "common.h" #include "cm-regbits-34xx.h"
arch/arm/mach-omap2/devices.c +0 -1
@@ -19,7 +19,6 @@#include <linux/of.h> #include <linux/platform_data/omap4-keypad.h> -#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/mach/map.h> #include <asm/pmu.h>
arch/arm/mach-omap2/dpll3xxx.c +1 -1
@@ -28,9 +28,9 @@#include <linux/bitops.h> #include <linux/clkdev.h> -#include <plat/cpu.h> #include <plat/clock.h> +#include "soc.h" #include "clock.h" #include "cm2xxx_3xxx.h" #include "cm-regbits-34xx.h"
arch/arm/mach-omap2/dpll44xx.c +1 -1
@@ -15,9 +15,9 @@#include <linux/io.h> #include <linux/bitops.h> -#include <plat/cpu.h> #include <plat/clock.h> +#include "soc.h" #include "clock.h" #include "clock44xx.h" #include "cm-regbits-44xx.h"
arch/arm/mach-omap2/emu.c +1 -2
@@ -21,8 +21,7 @@#include <linux/clk.h> #include <linux/err.h> -#include <mach/hardware.h> - +#include "soc.h" #include "iomap.h" MODULE_LICENSE ("GPL" );
arch/arm/mach-omap2/gpmc-nand.c +2 -1
@@ -16,10 +16,11 @@#include <asm/mach/flash.h> -#include <plat/cpu.h> #include <plat/nand.h> #include <plat/gpmc.h> +#include "soc.h" +static struct resource gpmc_nand_resource[] = { { .flags =IORESOURCE_MEM ,
arch/arm/mach-omap2/gpmc-onenand.c +2 -1
@@ -18,10 +18,11 @@#include <asm/mach/flash.h> -#include <plat/cpu.h> #include <plat/onenand.h> #include <plat/gpmc.h> +#include "soc.h" +#define ONENAND_IO_SIZE SZ_128Kstatic struct omap_onenand_platform_data *gpmc_onenand_data;
arch/arm/mach-omap2/gpmc-smc91x.c +2 -1
@@ -17,10 +17,11 @@#include <linux/io.h> #include <linux/smc91x.h> -#include <plat/cpu.h> #include <plat/gpmc.h> #include <plat/gpmc-smc91x.h> +#include "soc.h" +static struct omap_smc91x_platform_data *gpmc_cfg;static struct resource gpmc_smc91x_resources[] = {
arch/arm/mach-omap2/gpmc.c +2 -2
@@ -29,10 +29,10 @@#include <plat/gpmc.h> #include <plat/cpu.h> +#include <plat/gpmc.h> #include <plat/sdrc.h> -#include <mach/hardware.h> - +#include "soc.h" #include "common.h" /* GPMC register offsets */
arch/arm/mach-omap2/i2c.c +0 -1
@@ -19,7 +19,6 @@* */ -#include <plat/cpu.h> #include <plat/i2c.h> #include "common.h" #include <plat/omap_hwmod.h>
arch/arm/mach-omap2/id.c +1 -1
@@ -22,10 +22,10 @@#include <asm/cputype.h> #include "common.h" -#include <plat/cpu.h> #include <mach/id.h> +#include "soc.h" #include "control.h" static unsigned int omap_revision;
arch/arm/mach-omap2/include/mach/hardware.h +0 -2
@@ -1,5 +1,3 @@/* * arch/arm/mach-omap2/include/mach/hardware.h */ - -#include <plat/hardware.h>
arch/arm/mach-omap2/io.c +1 -2
@@ -33,8 +33,7 @@#include <plat/multi.h> #include <plat/dma.h> -#include <mach/hardware.h> - +#include "soc.h" #include "iomap.h" #include "voltage.h" #include "powerdomain.h"
arch/arm/mach-omap2/irq.c +1 -2
@@ -23,8 +23,7 @@#include <linux/of_address.h> #include <linux/of_irq.h> -#include <mach/hardware.h> - +#include "soc.h" #include "iomap.h" #include "common.h"
arch/arm/mach-omap2/mailbox.c +2 -1
@@ -17,9 +17,10 @@#include <linux/io.h> #include <linux/pm_runtime.h> -#include <plat/cpu.h> #include <plat/mailbox.h> +#include "soc.h" +#define MAILBOX_REVISION 0x000#define MAILBOX_MESSAGE (m) (0x040 + 4 * (m))#define MAILBOX_FIFOSTATUS (m) (0x080 + 4 * (m))
arch/arm/mach-omap2/mcbsp.c +0 -1
@@ -19,7 +19,6 @@#include <linux/slab.h> #include <plat/dma.h> -#include <plat/cpu.h> #include <plat/mcbsp.h> #include <plat/omap_device.h> #include <linux/pm_runtime.h>
arch/arm/mach-omap2/omap-smp.c +1 -1
@@ -24,11 +24,11 @@#include <asm/hardware/gic.h> #include <asm/smp_scu.h> -#include <mach/hardware.h> #include <mach/omap-secure.h> #include <mach/omap-wakeupgen.h> #include <asm/cputype.h> +#include "soc.h" #include "iomap.h" #include "common.h" #include "clockdomain.h"
arch/arm/mach-omap2/omap-wakeupgen.c +1 -1
@@ -27,10 +27,10 @@#include <asm/hardware/gic.h> -#include <mach/hardware.h> #include <mach/omap-wakeupgen.h> #include <mach/omap-secure.h> +#include "soc.h" #include "omap4-sar-layout.h" #include "common.h"
arch/arm/mach-omap2/omap4-common.c +1 -1
@@ -29,9 +29,9 @@#include <plat/omap-secure.h> #include <plat/mmc.h> -#include <mach/hardware.h> #include <mach/omap-wakeupgen.h> +#include "soc.h" #include "common.h" #include "hsmmc.h" #include "omap4-sar-layout.h"
arch/arm/mach-omap2/omap_hwmod.c +4 -4
@@ -139,14 +139,14 @@#include <linux/slab.h> #include <linux/bootmem.h> -#include "common.h" -#include <plat/cpu.h> -#include "clockdomain.h" -#include "powerdomain.h" #include <plat/clock.h> #include <plat/omap_hwmod.h> #include <plat/prcm.h> +#include "soc.h" +#include "common.h" +#include "clockdomain.h" +#include "powerdomain.h" #include "cm2xxx_3xxx.h" #include "cminst44xx.h" #include "prm2xxx_3xxx.h"
arch/arm/mach-omap2/omap_hwmod_2420_data.c +0 -1
@@ -13,7 +13,6 @@* XXX these should be marked initdata for multi-OMAP kernels */ #include <plat/omap_hwmod.h> -#include <plat/cpu.h> #include <plat/dma.h> #include <plat/serial.h> #include <plat/i2c.h>
arch/arm/mach-omap2/omap_hwmod_2430_data.c +1 -4
@@ -13,7 +13,6 @@* XXX these should be marked initdata for multi-OMAP kernels */ #include <plat/omap_hwmod.h> -#include <plat/cpu.h> #include <plat/dma.h> #include <plat/serial.h> #include <plat/i2c.h>
@@ -23,10 +22,8 @@#include <plat/mmc.h> #include <plat/l3_2xxx.h> -#include <plat/hardware.h> - +#include "soc.h" #include "omap_hwmod_common_data.h" -#include "prm-regbits-24xx.h" #include "cm-regbits-24xx.h" #include "wd_timer.h"
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +1 -2
@@ -18,7 +18,6 @@#include <linux/platform_data/gpio-omap.h> #include <plat/omap_hwmod.h> -#include <plat/cpu.h> #include <plat/dma.h> #include <plat/serial.h> #include <plat/l3_3xxx.h>
@@ -29,9 +28,9 @@#include <plat/mcspi.h> #include <plat/dmtimer.h> -#include <mach/hardware.h> #include <mach/am35xx.h> +#include "soc.h" #include "omap_hwmod_common_data.h" #include "prm-regbits-34xx.h" #include "cm-regbits-34xx.h"
arch/arm/mach-omap2/omap_hwmod_44xx_data.c +0 -1
@@ -23,7 +23,6 @@#include <linux/power/smartreflex.h> #include <plat/omap_hwmod.h> -#include <plat/cpu.h> #include <plat/i2c.h> #include <plat/dma.h> #include <plat/mcspi.h>
arch/arm/mach-omap2/omap_l3_noc.c +1 -2
@@ -28,8 +28,7 @@#include <linux/kernel.h> #include <linux/slab.h> -#include <plat/hardware.h> - +#include "soc.h" #include "omap_l3_noc.h" /*
arch/arm/mach-omap2/omap_phy_internal.c +1 -1
@@ -28,9 +28,9 @@#include <linux/err.h> #include <linux/usb.h> -#include <plat/hardware.h> #include <plat/usb.h> +#include "soc.h" #include "control.h" /* OMAP control module register for UTMI PHY */
arch/arm/mach-omap2/opp2420_data.c +1 -1
@@ -28,7 +28,7 @@* http://repository.maemo.org/pool/diablo/free/k/kernel-source-diablo/ */ -#include <plat/hardware.h> +#include <linux/kernel.h> #include "opp2xxx.h" #include "sdrc.h"
arch/arm/mach-omap2/opp2430_data.c +1 -1
@@ -26,7 +26,7 @@* This is technically part of the OMAP2xxx clock code. */ -#include <plat/hardware.h> +#include <linux/kernel.h> #include "opp2xxx.h" #include "sdrc.h"
arch/arm/mach-omap2/opp3xxx_data.c +0 -2
@@ -19,8 +19,6 @@*/ #include <linux/module.h> -#include <plat/cpu.h> -#include "control.h" #include "omap_opp_data.h" #include "pm.h"
arch/arm/mach-omap2/opp4xxx_data.c +1 -2
@@ -20,8 +20,7 @@*/ #include <linux/module.h> -#include <plat/cpu.h> - +#include "soc.h" #include "control.h" #include "omap_opp_data.h" #include "pm.h"
arch/arm/mach-omap2/powerdomain.c +4 -2
@@ -28,11 +28,13 @@#include "prm44xx.h" #include <asm/cpu.h> -#include <plat/cpu.h> + +#include <plat/prcm.h> +#include "powerdomain.h" #include "clockdomain.h" -#include <plat/prcm.h> +#include "soc.h" #include "pm.h" #define PWRDM_TRACE_STATES_FLAG (1<<31)
arch/arm/mach-omap2/powerdomains3xxx_data.c +1 -3
@@ -15,11 +15,9 @@#include <linux/init.h> #include <linux/bug.h> -#include <plat/cpu.h> - +#include "soc.h" #include "powerdomain.h" #include "powerdomains2xxx_3xxx_data.h" -#include "prcm-common.h" #include "prm2xxx_3xxx.h" #include "prm-regbits-34xx.h"
arch/arm/mach-omap2/prm2xxx_3xxx.c +2 -2
@@ -17,10 +17,10 @@#include <linux/io.h> #include <linux/irq.h> -#include "common.h" -#include <plat/cpu.h> #include <plat/prcm.h> +#include "soc.h" +#include "common.h" #include "vp.h" #include "prm2xxx_3xxx.h"
arch/arm/mach-omap2/prm44xx.c +1 -2
@@ -17,10 +17,9 @@#include <linux/err.h> #include <linux/io.h> -#include <plat/cpu.h> #include <plat/prcm.h> -#include <plat/hardware.h> +#include "soc.h" #include "iomap.h" #include "common.h" #include "vp.h"
arch/arm/mach-omap2/sdrc2xxx.c +1 -1
@@ -24,11 +24,11 @@#include <linux/clk.h> #include <linux/io.h> -#include <plat/hardware.h> #include <plat/clock.h> #include <plat/sram.h> #include <plat/sdrc.h> +#include "soc.h" #include "iomap.h" #include "common.h" #include "prm2xxx_3xxx.h"
arch/arm/mach-omap2/sleep34xx.S +1 -1
@@ -26,7 +26,7 @@ #include <asm/assembler.h> -#include <plat/hardware.h> +#include <plat/omap34xx.h> #include <plat/sram.h> #include "iomap.h"
arch/arm/mach-omap2/soc.h +6 -0
@@ -1 +1,7 @@#include <plat/cpu.h> +#include <plat/omap24xx.h> +#include <plat/omap34xx.h> +#include <plat/omap44xx.h> +#include <plat/ti81xx.h> +#include <plat/am33xx.h> +#include <plat/omap54xx.h>
arch/arm/mach-omap2/sram242x.S +1 -2
@@ -32,8 +32,7 @@ #include <asm/assembler.h> -#include <mach/hardware.h> - +#include "soc.h" #include "iomap.h" #include "prm2xxx_3xxx.h" #include "cm2xxx_3xxx.h"
arch/arm/mach-omap2/sram243x.S +1 -2
@@ -32,8 +32,7 @@ #include <asm/assembler.h> -#include <mach/hardware.h> - +#include "soc.h" #include "iomap.h" #include "prm2xxx_3xxx.h" #include "cm2xxx_3xxx.h"
arch/arm/mach-omap2/sram34xx.S +1 -2
@@ -29,8 +29,7 @@ #include <asm/assembler.h> -#include <mach/hardware.h> - +#include "soc.h" #include "iomap.h" #include "sdrc.h" #include "cm2xxx_3xxx.h"
arch/arm/mach-omap2/timer.c +1 -2
@@ -46,8 +46,7 @@#include <plat/dmtimer.h> #include <plat/omap-pm.h> -#include <mach/hardware.h> - +#include "soc.h" #include "common.h" #include "powerdomain.h"
arch/arm/mach-omap2/twl-common.c +1 -1
@@ -26,10 +26,10 @@#include <linux/regulator/machine.h> #include <linux/regulator/fixed.h> -#include <plat/hardware.h> #include <plat/i2c.h> #include <plat/usb.h> +#include "soc.h" #include "twl-common.h" #include "pm.h" #include "voltage.h"
arch/arm/mach-omap2/usb-host.c +0 -1
@@ -25,7 +25,6 @@#include <asm/io.h> -#include <mach/hardware.h> #include <plat/usb.h> #include <plat/omap_device.h>
arch/arm/mach-omap2/usb-musb.c +3 -3
@@ -23,13 +23,13 @@#include <linux/clk.h> #include <linux/dma-mapping.h> #include <linux/io.h> -#include <linux/usb/musb.h> -#include <mach/hardware.h> -#include <mach/am35xx.h> #include <plat/usb.h> #include <plat/omap_device.h> + +#include <mach/am35xx.h> +#include "mux.h" static struct musb_hdrc_config musb_config = {
arch/arm/mach-omap2/vc.c +1 -2
@@ -12,8 +12,7 @@#include <linux/init.h> #include <linux/bug.h> -#include <plat/cpu.h> - +#include "soc.h" #include "voltage.h" #include "vc.h" #include "prm-regbits-34xx.h"
arch/arm/mach-omap2/voltagedomains3xxx_data.c +1 -2
@@ -18,9 +18,8 @@#include <linux/err.h> #include <linux/init.h> +#include "soc.h" #include "common.h" -#include <plat/cpu.h> -#include "prm-regbits-34xx.h" #include "omap_opp_data.h" #include "voltage.h"
arch/arm/plat-omap/counter_32k.c +0 -2
@@ -22,9 +22,7 @@#include <asm/mach/time.h> #include <asm/sched_clock.h> -#include <plat/hardware.h> #include <plat/common.h> -#include <plat/clock.h> /* OMAP2_32KSYNCNT_CR_OFF: offset of 32ksync counter register */
arch/arm/plat-omap/dma.c +1 -2
@@ -36,9 +36,8 @@#include <linux/slab.h> #include <linux/delay.h> -#include <mach/hardware.h> +#include <plat/cpu.h> #include <plat/dma.h> -#include <plat/tc.h> /*
arch/arm/plat-omap/include/plat/cpu.h +3 -0
@@ -30,6 +30,8 @@#ifndef __ASM_ARCH_OMAP_CPU_H#define __ASM_ARCH_OMAP_CPU_H +#ifndef __ASSEMBLY__ +#include <linux/bitops.h> #include <plat/multi.h>
@@ -493,4 +495,5 @@ OMAP4_HAS_FEATURE(mpu_1ghz, MPU_1GHZ) OMAP4_HAS_FEATURE(mpu_1_2ghz, MPU_1_2GHZ) OMAP4_HAS_FEATURE(mpu_1_5ghz, MPU_1_5GHZ) +#endif /* __ASSEMBLY__ */ #endif
arch/arm/plat-omap/include/plat/hardware.h deleted +0 -293
293 lines not on this page · raw message
arch/arm/plat-omap/include/plat/omap4-keypad.h +2 -0
@@ -1,6 +1,8 @@#ifndef ARCH_ARM_PLAT_OMAP4_KEYPAD_H #define ARCH_ARM_PLAT_OMAP4_KEYPAD_H +struct omap_board_data ; +extern int omap4_keyboard_init (struct omap4_keypad_platform_data *,struct omap_board_data *);#endif
arch/arm/plat-omap/include/plat/omap44xx.h +0 -1
@@ -45,7 +45,6 @@#define OMAP44XX_L2CACHE_BASE 0x48242000#define OMAP44XX_WKUPGEN_BASE 0x48281000#define OMAP44XX_MCPDM_BASE 0x40132000 -#define OMAP44XX_MCPDM_L3_BASE 0x49032000#define OMAP44XX_SAR_RAM_BASE 0x4a326000#define OMAP44XX_MAILBOX_BASE (L4_44XX_BASE + 0xF4000)
drivers/watchdog/omap_wdt.c +5 -0
@@ -46,6 +46,7 @@#include <linux/slab.h> #include <linux/pm_runtime.h> #include <mach/hardware.h> +#include <plat/cpu.h> #include <plat/prcm.h> #include "omap_wdt.h"
@@ -218,12 +219,16 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd,case WDIOC_GETSTATUS :return put_user (0 , (int __user *)arg);case WDIOC_GETBOOTSTATUS : +#ifdef CONFIG_ARCH_OMAP1 if (cpu_is_omap16xx ())return put_user (__raw_readw (ARM_SYSST ), (int __user *)arg); +#endif +#ifdef CONFIG_ARCH_OMAP2PLUS if (cpu_is_omap24xx ())return put_user (omap_prcm_get_reset_sources (), (int __user *)arg); +#endif return put_user (0 , (int __user *)arg);case WDIOC_KEEPALIVE :spin_lock (&wdt_lock);
sound/soc/omap/omap-abe-twl6040.c +0 -4
@@ -31,10 +31,6 @@#include <sound/soc.h> #include <sound/jack.h> -#include <asm/mach-types.h> -#include <plat/hardware.h> -#include <plat/mux.h> -#include "omap-dmic.h" #include "omap-mcpdm.h" #include "omap-pcm.h"
sound/soc/omap/omap-mcpdm.c +2 -0
@@ -45,6 +45,8 @@#include "omap-mcpdm.h" #include "omap-pcm.h" +#define OMAP44XX_MCPDM_L3_BASE 0x49032000 +struct omap_mcpdm {struct device *dev;unsigned long phys_base;
Re: [PATCH 15/17] ARM: OMAP: Split plat/hardware.h, use local soc.h for omap2+
Hi Tony,
Quoted 19 lines
As the plat and mach includes need to disappear for single zImage work, we need to remove
plat/hardware.h.Do this by splitting
plat/hardware.hinto omap1 and omap2+ specific files.The old
plat/hardware.halready has omap1 only defines, so it gets moved tomach/hardware.hfor omap1. For omap2+, we use the localsoc.hthat for now just includes the related SoC headers to keep this patch more readable.Note that the local
soc.hstill includesplat/cpu.hthat can be dealt with in later patches. Let's also includeplat/serial.hfromcommon.hfor all the board-*.c files. This allows making the include files local later on without patching these files again.Note that only minimal changes are done in this patch for the
drivers/watchdog/omap_wdt.cdriver to keep things compiling. Further patches are needed to eventually removecpu_is_omapusage in the drivers.
Quoted 8 lines
Also only minimal changes are done to
sound/soc/omap/*to remove the unneeded includes and to defineOMAP44XX_MCPDM_L3_BASElocally so there's no need to includeomap44xx.h.While at it, also sort some of the includes in the standard way.
Cc Wim Van Sebroeck <[email protected]>
Acked-by for the watchdog part.
Kind regards,
Wim.
Tony Lindgren
maintainerPATCH 16/17 ARM: OMAP2+ Move SoC specific headers to be local to mach-omap2
In reply to Tony LindgrenThese can now be moved to be local headers in mach-omap2.
Note that this patch removes arch/arm/plat-omap/devices.c as it will get removed anyways with Paul Walmsley's patch "ARM: OMAP: split OMAP1, OMAP2+ RNG device registration".
---
arch/arm/mach-omap2/am33xx.h | 0
arch/arm/mach-omap2/clock33xx_data.c | 2 -
arch/arm/mach-omap2/control.h | 2 -
arch/arm/mach-omap2/omap-mpuss-lowpower.c | 3 -
arch/arm/mach-omap2/omap24xx.h | 2 -
arch/arm/mach-omap2/omap34xx.h | 2 -
arch/arm/mach-omap2/omap44xx.h | 0
arch/arm/mach-omap2/omap54xx.h | 0
arch/arm/mach-omap2/sleep24xx.S | 3 -
arch/arm/mach-omap2/sleep34xx.S | 2 -
arch/arm/mach-omap2/sleep44xx.S | 2 -
arch/arm/mach-omap2/soc.h | 12 ++--
arch/arm/mach-omap2/ti81xx.h | 0
arch/arm/plat-omap/Makefile | 3 -
arch/arm/plat-omap/devices.c | 91 ----------------------------
15 files changed, 13 insertions(+), 111 deletions(-)
rename arch/arm/{plat-omap/include/plat/am33xx.h => mach-omap2/am33xx.h} (100%)
rename arch/arm/{plat-omap/include/plat/omap24xx.h => mach-omap2/omap24xx.h} (98%)
rename arch/arm/{plat-omap/include/plat/omap34xx.h => mach-omap2/omap34xx.h} (98%)
rename arch/arm/{plat-omap/include/plat/omap44xx.h => mach-omap2/omap44xx.h} (100%)
rename arch/arm/{plat-omap/include/plat/omap54xx.h => mach-omap2/omap54xx.h} (100%)
rename arch/arm/{plat-omap/include/plat/ti81xx.h => mach-omap2/ti81xx.h} (100%)
delete mode 100644 arch/arm/plat-omap/devices.carch/arm/mach-omap2/am33xx.h renamed from arch/arm/plat-omap/include/plat/am33xx.h +0 -0
arch/arm/mach-omap2/clock33xx_data.c +1 -1
@@ -18,8 +18,8 @@#include <linux/list.h> #include <linux/clk.h> #include <plat/clkdev_omap.h> -#include <plat/am33xx.h> +#include "am33xx.h" #include "iomap.h" #include "control.h" #include "clock.h"
arch/arm/mach-omap2/control.h +1 -1
@@ -21,7 +21,7 @@#include <mach/ctrl_module_pad_core_44xx.h> #include <mach/ctrl_module_pad_wkup_44xx.h> -#include <plat/am33xx.h> +#include "am33xx.h" #ifndef __ASSEMBLY__#define OMAP242X_CTRL_REGADDR (reg) \
arch/arm/mach-omap2/omap-mpuss-lowpower.c +1 -2
@@ -50,9 +50,8 @@#include <asm/suspend.h> #include <asm/hardware/cache-l2x0.h> -#include <plat/omap44xx.h> -#include "common.h" +#include "omap44xx.h" #include "omap4-sar-layout.h" #include "pm.h" #include "prcm_mpu44xx.h"
arch/arm/mach-omap2/omap24xx.h renamed from arch/arm/plat-omap/include/plat/omap24xx.h +0 -2
@@ -1,6 +1,4 @@/* -* arch/arm/plat-omap/include/mach/omap24xx.h -* * This file contains the processor specific definitions * of the TI OMAP24XX. *
arch/arm/mach-omap2/omap34xx.h renamed from arch/arm/plat-omap/include/plat/omap34xx.h +0 -2
@@ -1,6 +1,4 @@/* -* arch/arm/plat-omap/include/mach/omap34xx.h -* * This file contains the processor specific definitions of the TI OMAP34XX. * * Copyright (C) 2007 Texas Instruments.
arch/arm/mach-omap2/omap44xx.h renamed from arch/arm/plat-omap/include/plat/omap44xx.h +0 -0
arch/arm/mach-omap2/omap54xx.h renamed from arch/arm/plat-omap/include/plat/omap54xx.h +0 -0
arch/arm/mach-omap2/sleep24xx.S +1 -2
@@ -28,8 +28,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> -#include <plat/omap24xx.h> - +#include "omap24xx.h" #include "sdrc.h" /* First address of reserved address space? apparently valid for OMAP2 & 3 */
arch/arm/mach-omap2/sleep34xx.S +1 -1
@@ -26,9 +26,9 @@ #include <asm/assembler.h> -#include <plat/omap34xx.h> #include <plat/sram.h> +#include "omap34xx.h" #include "iomap.h" #include "cm2xxx_3xxx.h" #include "prm2xxx_3xxx.h"
arch/arm/mach-omap2/sleep44xx.S +1 -1
@@ -14,10 +14,10 @@ #include <asm/memory.h> #include <asm/hardware/cache-l2x0.h> -#include <plat/omap44xx.h> #include <mach/omap-secure.h> #include "common.h" +#include "omap44xx.h" #include "omap4-sar-layout.h" #if defined(CONFIG_SMP) && defined(CONFIG_PM)
arch/arm/mach-omap2/soc.h +6 -6
@@ -1,7 +1,7 @@#include <plat/cpu.h> -#include <plat/omap24xx.h> -#include <plat/omap34xx.h> -#include <plat/omap44xx.h> -#include <plat/ti81xx.h> -#include <plat/am33xx.h> -#include <plat/omap54xx.h> +#include "omap24xx.h" +#include "omap34xx.h" +#include "omap44xx.h" +#include "ti81xx.h" +#include "am33xx.h" +#include "omap54xx.h"
arch/arm/mach-omap2/ti81xx.h renamed from arch/arm/plat-omap/include/plat/ti81xx.h +0 -0
arch/arm/plat-omap/Makefile +1 -2
@@ -3,8 +3,7 @@ # # Common support -obj-y := common.o sram.o clock.o devices.o dma.o mux.o \ - fb.o counter_32k.o +obj-y := common.o sram.o clock.o dma.o mux.o fb.o counter_32k.o obj-m := obj-n := obj- :=
arch/arm/plat-omap/devices.c deleted +0 -91
91 lines not on this page · raw message
Tony Lindgren
maintainerPATCH 17/17 ARM: OMAP1: Move SoC specific headers from plat to mach for omap1
In reply to Tony LindgrenThere's no need to have these in plat-omap any longer. Note that these could eventually be made local to mach-omap1 instead of being in mach.
But to do that, at least various driver access using omap7xxx.h registers needs to be fixed first.
---
arch/arm/mach-omap1/board-htcherald.c | 2 +-
arch/arm/mach-omap1/devices.c | 2 +-
arch/arm/mach-omap1/include/mach/hardware.h | 6 +++---
arch/arm/mach-omap1/include/mach/omap1510.h | 3 +--
arch/arm/mach-omap1/include/mach/omap16xx.h | 3 +--
arch/arm/mach-omap1/include/mach/omap7xx.h | 3 +--
drivers/spi/spi-omap-uwire.c | 3 ++-
7 files changed, 10 insertions(+), 12 deletions(-)
rename arch/arm/{plat-omap/include/plat/omap1510.h => mach-omap1/include/mach/omap1510.h} (97%)
rename arch/arm/{plat-omap/include/plat/omap16xx.h => mach-omap1/include/mach/omap16xx.h} (99%)
rename arch/arm/{plat-omap/include/plat/omap7xx.h => mach-omap1/include/mach/omap7xx.h} (98%)arch/arm/mach-omap1/board-htcherald.c +1 -1
@@ -41,7 +41,7 @@#include <asm/mach-types.h> #include <asm/mach/arch.h> -#include <plat/omap7xx.h> +#include <mach/omap7xx.h> #include <plat/keypad.h> #include <plat/mmc.h>
arch/arm/mach-omap1/devices.c +1 -1
@@ -23,8 +23,8 @@#include <plat/mux.h> #include <plat/dma.h> #include <plat/mmc.h> -#include <plat/omap7xx.h> +#include <mach/omap7xx.h> #include <mach/camera.h> #include <mach/hardware.h>
arch/arm/mach-omap1/include/mach/hardware.h +3 -3
@@ -311,8 +311,8 @@ static inline u32 omap_cs3_phys(void)* --------------------------------------------------------------------------- */ -#include <plat/omap7xx.h> -#include <plat/omap1510.h> -#include <plat/omap16xx.h> +#include "omap7xx.h" +#include "omap1510.h" +#include "omap16xx.h" #endif /* __ASM_ARCH_OMAP_HARDWARE_H */
arch/arm/mach-omap1/include/mach/omap1510.h renamed from arch/arm/plat-omap/include/plat/omap1510.h +1 -2
@@ -1,5 +1,4 @@ -/* arch/arm/plat-omap/include/mach/omap1510.h -* +/* * Hardware definitions for TI OMAP1510 processor. * * Cleanup for Linux-2.6 by Dirk Behme <[email protected]>
arch/arm/mach-omap1/include/mach/omap16xx.h renamed from arch/arm/plat-omap/include/plat/omap16xx.h +1 -2
@@ -1,5 +1,4 @@ -/* arch/arm/plat-omap/include/mach/omap16xx.h -* +/* * Hardware definitions for TI OMAP1610/5912/1710 processors. * * Cleanup for Linux-2.6 by Dirk Behme <[email protected]>
arch/arm/mach-omap1/include/mach/omap7xx.h renamed from arch/arm/plat-omap/include/plat/omap7xx.h +1 -2
@@ -1,5 +1,4 @@ -/* arch/arm/plat-omap/include/mach/omap7xx.h -* +/* * Hardware definitions for TI OMAP7XX processor. * * Cleanup for Linux-2.6 by Dirk Behme <[email protected]>
drivers/spi/spi-omap-uwire.c +2 -1
@@ -53,7 +53,8 @@#include <asm/mach-types.h> #include <plat/mux.h> -#include <plat/omap7xx.h> /* OMAP7XX_IO_CONF registers */ + +#include <mach/omap7xx.h> /* OMAP7XX_IO_CONF registers */ /* FIXME address is now a platform device resource,