From a6cf912c6047077a6eb860ed8dbfa342376ee395 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Fri, 11 Jan 2013 11:24:19 -0800 Subject: ARM: OMAP: Fix i2c cmdline initcall for multiplatform We only want this initcall to run when the kernel is booted on omap SoCs. Fix the issue by initializing the the initcall from separately for omap1 and omap2+. This fixes the issue for omap2+ multiplatform configs as we are using omap_subsys_initcall there. Tested-by: Ezequiel Garcia Signed-off-by: Tony Lindgren --- arch/arm/plat-omap/i2c.c | 3 +-- arch/arm/plat-omap/include/plat/i2c.h | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'arch/arm/plat-omap') diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c index f9df624d108c..58213d9714cd 100644 --- a/arch/arm/plat-omap/i2c.c +++ b/arch/arm/plat-omap/i2c.c @@ -68,7 +68,7 @@ __setup("i2c_bus=", omap_i2c_bus_setup); * Register busses defined in command line but that are not registered with * omap_register_i2c_bus from board initialization code. */ -static int __init omap_register_i2c_bus_cmdline(void) +int __init omap_register_i2c_bus_cmdline(void) { int i, err = 0; @@ -83,7 +83,6 @@ static int __init omap_register_i2c_bus_cmdline(void) out: return err; } -subsys_initcall(omap_register_i2c_bus_cmdline); /** * omap_register_i2c_bus - register I2C bus with device descriptors diff --git a/arch/arm/plat-omap/include/plat/i2c.h b/arch/arm/plat-omap/include/plat/i2c.h index 7a9028cb5a75..810629d79668 100644 --- a/arch/arm/plat-omap/include/plat/i2c.h +++ b/arch/arm/plat-omap/include/plat/i2c.h @@ -32,6 +32,7 @@ int omap_i2c_add_bus(struct omap_i2c_bus_platform_data *i2c_pdata, extern int omap_register_i2c_bus(int bus_id, u32 clkrate, struct i2c_board_info const *info, unsigned len); +extern int omap_register_i2c_bus_cmdline(void); #else static inline int omap_register_i2c_bus(int bus_id, u32 clkrate, struct i2c_board_info const *info, @@ -39,6 +40,11 @@ static inline int omap_register_i2c_bus(int bus_id, u32 clkrate, { return 0; } + +static inline int omap_register_i2c_bus_cmdline(void) +{ + return 0; +} #endif struct omap_hwmod; -- cgit v1.2.3 From a62a6e98c370ccca37d353a5f763b532411a4c14 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Fri, 11 Jan 2013 11:24:20 -0800 Subject: ARM: OMAP2+: Disable code that currently does not work with multiplaform MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We still need to fix up few places for multiplatform support, but that can proceed separately. Fix the issue by making the problem drivers depends !ARCH_MULTIPLATFORM for now. The remaining pieces that are not multiplatform compatible for omap2+ SoCs are: 1. Some drivers are using custom omap_dm_timer calls There are two drivers that are directly usign omap hardware timers for PWM and DSP clocking: drivers/media/rc/ir-rx51.c and drivers/staging/tidspbridge/core/dsp-clock.c. These can be fixed for multiplatform by allowing a minimal set of hardware timers to be accessed, and for some functionality by using the hrtimer framework. 2. Hardware OMAP4_ERRATA_I688 needs to be fixed up This can't be enabled for multiplatform configurations in it's current form. It may be possible to fix it up to do instruction replacement early on during init. Luckily it looks like this errata does not seem to get hit with mainline kernel code alone at least currently. 3. Legacy header needed for omap-sham.c Looks like it still needs mach/irqs.h for omap1 that does not exist for multiplatform systems. Just ifdef it for now. 4. Mailbox is waiting to get moved to drivers Disable it for now to avoid adding a dependency to the mailbox patches. Cc: Timo Kokkonen Cc: Sean Young Cc: "Víctor Manuel Jáquez Leal" Cc: Laurent Pinchart Cc: Mauro Carvalho Chehab Cc: Omar Ramirez Luna Cc: Herbert Xu Cc: Greg Kroah-Hartman Cc: Santosh Shilimkar Tested-by: Ezequiel Garcia [tony@atomide.com: updated to disable mailbox] Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/Kconfig | 2 +- arch/arm/plat-omap/Kconfig | 2 +- drivers/crypto/omap-sham.c | 3 +++ drivers/media/rc/Kconfig | 2 +- drivers/staging/tidspbridge/Kconfig | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) (limited to 'arch/arm/plat-omap') diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 41b581fd0213..492d76466833 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -397,7 +397,7 @@ config OMAP3_SDRC_AC_TIMING config OMAP4_ERRATA_I688 bool "OMAP4 errata: Async Bridge Corruption" - depends on ARCH_OMAP4 + depends on ARCH_OMAP4 && !ARCH_MULTIPLATFORM select ARCH_HAS_BARRIERS help If a data is stalled inside asynchronous bridge because of back diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index 665870dce3c8..03f12525913e 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig @@ -118,7 +118,7 @@ config OMAP_MUX_WARNINGS config OMAP_MBOX_FWK tristate "Mailbox framework support" - depends on ARCH_OMAP + depends on ARCH_OMAP && !ARCH_MULTIPLATFORM help Say Y here if you want to use OMAP Mailbox framework support for DSP, IVA1.0 and IVA2 in OMAP1/2/3. diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index 90d34adc2a66..9e6947bc296f 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -38,7 +38,10 @@ #include #include + +#ifdef CONFIG_ARCH_OMAP1 #include +#endif #define SHA_REG_DIGEST(x) (0x00 + ((x) * 0x04)) #define SHA_REG_DIN(x) (0x1C + ((x) * 0x04)) diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig index 79ba242fe263..19f3563c61da 100644 --- a/drivers/media/rc/Kconfig +++ b/drivers/media/rc/Kconfig @@ -291,7 +291,7 @@ config IR_TTUSBIR config IR_RX51 tristate "Nokia N900 IR transmitter diode" - depends on OMAP_DM_TIMER && LIRC + depends on OMAP_DM_TIMER && LIRC && !ARCH_MULTIPLATFORM ---help--- Say Y or M here if you want to enable support for the IR transmitter diode built in the Nokia N900 (RX51) device. diff --git a/drivers/staging/tidspbridge/Kconfig b/drivers/staging/tidspbridge/Kconfig index 0dd479f5638d..60848f198b48 100644 --- a/drivers/staging/tidspbridge/Kconfig +++ b/drivers/staging/tidspbridge/Kconfig @@ -4,7 +4,7 @@ menuconfig TIDSPBRIDGE tristate "DSP Bridge driver" - depends on ARCH_OMAP3 + depends on ARCH_OMAP3 && !ARCH_MULTIPLATFORM select OMAP_MBOX_FWK help DSP/BIOS Bridge is designed for platforms that contain a GPP and -- cgit v1.2.3 From a069486162a59513053cf772515217ca61727704 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Fri, 11 Jan 2013 11:24:20 -0800 Subject: ARM: OMAP2+: Enable ARCH_MULTIPLATFORM support Flip on multiplatform support for omap2+. No changes to omap2plus_defconfig needed, but please note that you may need to update your custom config files to make sure you have: CONFIG_ARCH_MULTIPLATFORM=y CONFIG_ARCH_MULTI_V7=y CONFIG_ARCH_OMAP2PLUS=y And may need CONFIG_ARCH_MULTI_V6=y if booting omap2 boards. Cc: Russell King Tested-by: Ezequiel Garcia Signed-off-by: Tony Lindgren --- arch/arm/Kconfig | 13 ++++++++++--- arch/arm/configs/omap2plus_defconfig | 2 +- arch/arm/mach-omap2/Kconfig | 23 +++++++++++++++++++++++ arch/arm/mach-omap2/Makefile | 3 +++ arch/arm/plat-omap/Kconfig | 30 ------------------------------ arch/arm/plat-omap/Makefile | 2 ++ 6 files changed, 39 insertions(+), 34 deletions(-) (limited to 'arch/arm/plat-omap') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 67874b82a4ed..a1f8868becc6 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -937,17 +937,24 @@ config ARCH_DAVINCI help Support for TI's DaVinci platform. -config ARCH_OMAP - bool "TI OMAP" +config ARCH_OMAP1 + bool "TI OMAP1" depends on MMU select ARCH_HAS_CPUFREQ select ARCH_HAS_HOLES_MEMORYMODEL + select ARCH_OMAP select ARCH_REQUIRE_GPIOLIB + select CLKDEV_LOOKUP select CLKSRC_MMIO select GENERIC_CLOCKEVENTS + select GENERIC_IRQ_CHIP select HAVE_CLK + select HAVE_IDE + select IRQ_DOMAIN + select NEED_MACH_IO_H if PCCARD + select NEED_MACH_MEMORY_H help - Support for TI's OMAP platform (OMAP1/2/3/4). + Support for older TI OMAP1 (omap7xx, omap15xx or omap16xx) config ARCH_VT8500_SINGLE bool "VIA/WonderMedia 85xx" diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index 82ce8d738fa1..db0574514003 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig @@ -20,7 +20,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_MODVERSIONS=y CONFIG_MODULE_SRCVERSION_ALL=y # CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_OMAP=y +CONFIG_ARCH_OMAP2PLUS=y CONFIG_OMAP_RESET_CLOCKS=y CONFIG_OMAP_MUX_DEBUG=y CONFIG_ARM_THUMBEE=y diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 492d76466833..c3c033f283a9 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -1,3 +1,26 @@ +config ARCH_OMAP + bool + +config ARCH_OMAP2PLUS + bool "TI OMAP2/3/4/5 SoCs with device tree support" if (ARCH_MULTI_V6 || ARCH_MULTI_V7) + select ARCH_HAS_CPUFREQ + select ARCH_HAS_HOLES_MEMORYMODEL + select ARCH_OMAP + select ARCH_REQUIRE_GPIOLIB + select CLKDEV_LOOKUP + select CLKSRC_MMIO + select GENERIC_CLOCKEVENTS + select GENERIC_IRQ_CHIP + select HAVE_CLK + select OMAP_DM_TIMER + select PINCTRL + select PROC_DEVICETREE if PROC_FS + select SPARSE_IRQ + select USE_OF + help + Systems based on OMAP2, OMAP3, OMAP4 or OMAP5 + + if ARCH_OMAP2PLUS menu "TI OMAP2/3/4 Specific Features" diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 947cafe65aef..65fb6fb38caf 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -2,6 +2,9 @@ # Makefile for the linux kernel. # +ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ + -I$(srctree)/arch/arm/plat-omap/include + # Common support obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \ common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \ diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index 03f12525913e..67c859cf16bc 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig @@ -5,36 +5,6 @@ menu "TI OMAP Common Features" config ARCH_OMAP_OTG bool -choice - prompt "OMAP System Type" - default ARCH_OMAP2PLUS - -config ARCH_OMAP1 - bool "TI OMAP1" - select CLKDEV_LOOKUP - select CLKSRC_MMIO - select GENERIC_IRQ_CHIP - select HAVE_IDE - select IRQ_DOMAIN - select NEED_MACH_IO_H if PCCARD - select NEED_MACH_MEMORY_H - help - "Systems based on omap7xx, omap15xx or omap16xx" - -config ARCH_OMAP2PLUS - bool "TI OMAP2/3/4" - select CLKDEV_LOOKUP - select GENERIC_IRQ_CHIP - select OMAP_DM_TIMER - select PINCTRL - select PROC_DEVICETREE if PROC_FS - select SPARSE_IRQ - select USE_OF - help - "Systems based on OMAP2, OMAP3, OMAP4 or OMAP5" - -endchoice - comment "OMAP Feature Selections" config OMAP_DEBUG_DEVICES diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile index a14a78a2f149..31199417b56a 100644 --- a/arch/arm/plat-omap/Makefile +++ b/arch/arm/plat-omap/Makefile @@ -2,6 +2,8 @@ # Makefile for the linux kernel. # +ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-omap/include + # Common support obj-y := sram.o dma.o counter_32k.o obj-m := -- cgit v1.2.3