aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 18:20:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 18:20:41 -0500
commit3298a3511f1e73255a8dc023efd909e569eea037 (patch)
tree2d8e9bdb9e398049e3876b99fbb4d51099a45cc3 /arch/arm
parent5ce7aba976ebdfbf467e3cbcd3a7536ebdec4b11 (diff)
parentacb7452369e4f8749dd32d48dbda98936035a87c (diff)
Merge tag 'multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC multiplatform support from Arnd Bergmann: "Converting more ARM platforms to multiplatform support. This time, OMAP gets converted, which is a major step since this is by far the largest platform in terms of code size. The same thing happens to the vt8500 platform." * tag 'multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: net: cwdavinci_cpdma: export symbols for cpsw remoteproc: omap: depend on OMAP_MBOX_FWK [media] davinci: do not include mach/hardware.h ARM: OMAP2+: Make sure files with omap initcalls include soc.h ARM: OMAP2+: Include soc.h to drm.c to fix compiling ARM: OMAP2+: Fix warning for hwspinlock omap_postcore_initcall ARM: multi_v7_defconfig: add ARCH_ZYNQ ARM: multi_v7_defconfig: remove unnecessary CONFIG_GPIOLIB arm: vt8500: Remove remaining mach includes arm: vt8500: Convert debug-macro.S to be multiplatform friendly arm: vt8500: Remove single platform Kconfig options ARM: OMAP2+: Remove now obsolete uncompress.h and debug-macro.S ARM: OMAP2+: Add minimal support for booting vexpress ARM: OMAP2+: Enable ARCH_MULTIPLATFORM support ARM: OMAP2+: Disable code that currently does not work with multiplaform ARM: OMAP2+: Add multiplatform debug_ll support ARM: OMAP: Fix dmaengine init for multiplatform ARM: OMAP: Fix i2c cmdline initcall for multiplatform ARM: OMAP2+: Use omap initcalls ARM: OMAP2+: Limit omap initcalls to omap only on multiplatform kernels
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig28
-rw-r--r--arch/arm/Kconfig.debug64
-rw-r--r--arch/arm/configs/multi_v7_defconfig2
-rw-r--r--arch/arm/configs/omap2plus_defconfig6
-rw-r--r--arch/arm/include/debug/omap2plus.S (renamed from arch/arm/mach-omap2/include/mach/debug-macro.S)137
-rw-r--r--arch/arm/include/debug/vt8500.S (renamed from arch/arm/mach-vt8500/include/mach/debug-macro.S)24
-rw-r--r--arch/arm/mach-omap1/dma.c18
-rw-r--r--arch/arm/mach-omap1/i2c.c6
-rw-r--r--arch/arm/mach-omap2/Kconfig25
-rw-r--r--arch/arm/mach-omap2/Makefile3
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c2
-rw-r--r--arch/arm/mach-omap2/board-rx51-video.c3
-rw-r--r--arch/arm/mach-omap2/clock2xxx.c2
-rw-r--r--arch/arm/mach-omap2/clock3xxx.c2
-rw-r--r--arch/arm/mach-omap2/devices.c6
-rw-r--r--arch/arm/mach-omap2/dma.c23
-rw-r--r--arch/arm/mach-omap2/drm.c2
-rw-r--r--arch/arm/mach-omap2/emu.c2
-rw-r--r--arch/arm/mach-omap2/fb.c4
-rw-r--r--arch/arm/mach-omap2/gpio.c5
-rw-r--r--arch/arm/mach-omap2/gpmc.c4
-rw-r--r--arch/arm/mach-omap2/hdq1w.c3
-rw-r--r--arch/arm/mach-omap2/hwspinlock.c3
-rw-r--r--arch/arm/mach-omap2/i2c.c5
-rw-r--r--arch/arm/mach-omap2/include/mach/serial.h37
-rw-r--r--arch/arm/mach-omap2/include/mach/uncompress.h171
-rw-r--r--arch/arm/mach-omap2/mcbsp.c3
-rw-r--r--arch/arm/mach-omap2/omap-iommu.c3
-rw-r--r--arch/arm/mach-omap2/omap2-restart.c3
-rw-r--r--arch/arm/mach-omap2/omap4-common.c4
-rw-r--r--arch/arm/mach-omap2/omap_device.c5
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c2
-rw-r--r--arch/arm/mach-omap2/omap_phy_internal.c2
-rw-r--r--arch/arm/mach-omap2/opp3xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/opp4xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/pm-debug.c2
-rw-r--r--arch/arm/mach-omap2/pm.c2
-rw-r--r--arch/arm/mach-omap2/pmu.c2
-rw-r--r--arch/arm/mach-omap2/prm3xxx.c2
-rw-r--r--arch/arm/mach-omap2/prm44xx.c2
-rw-r--r--arch/arm/mach-omap2/serial.c2
-rw-r--r--arch/arm/mach-omap2/smartreflex-class3.c3
-rw-r--r--arch/arm/mach-omap2/soc.h29
-rw-r--r--arch/arm/mach-omap2/timer.c2
-rw-r--r--arch/arm/mach-omap2/wd_timer.c2
-rw-r--r--arch/arm/mach-vt8500/Kconfig11
-rw-r--r--arch/arm/mach-vt8500/include/mach/timex.h26
-rw-r--r--arch/arm/mach-vt8500/include/mach/uncompress.h36
-rw-r--r--arch/arm/plat-omap/Kconfig32
-rw-r--r--arch/arm/plat-omap/Makefile2
-rw-r--r--arch/arm/plat-omap/i2c.c3
-rw-r--r--arch/arm/plat-omap/include/plat/i2c.h6
52 files changed, 343 insertions, 434 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 482ba91e73a7..bfd7c69c85a5 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -932,32 +932,24 @@ config ARCH_DAVINCI
932 help 932 help
933 Support for TI's DaVinci platform. 933 Support for TI's DaVinci platform.
934 934
935config ARCH_OMAP 935config ARCH_OMAP1
936 bool "TI OMAP" 936 bool "TI OMAP1"
937 depends on MMU 937 depends on MMU
938 select ARCH_HAS_CPUFREQ 938 select ARCH_HAS_CPUFREQ
939 select ARCH_HAS_HOLES_MEMORYMODEL 939 select ARCH_HAS_HOLES_MEMORYMODEL
940 select ARCH_REQUIRE_GPIOLIB 940 select ARCH_OMAP
941 select CLKSRC_MMIO
942 select GENERIC_CLOCKEVENTS
943 select HAVE_CLK
944 help
945 Support for TI's OMAP platform (OMAP1/2/3/4).
946
947config ARCH_VT8500_SINGLE
948 bool "VIA/WonderMedia 85xx"
949 select ARCH_HAS_CPUFREQ
950 select ARCH_REQUIRE_GPIOLIB 941 select ARCH_REQUIRE_GPIOLIB
951 select CLKDEV_LOOKUP 942 select CLKDEV_LOOKUP
952 select COMMON_CLK 943 select CLKSRC_MMIO
953 select CPU_ARM926T
954 select GENERIC_CLOCKEVENTS 944 select GENERIC_CLOCKEVENTS
945 select GENERIC_IRQ_CHIP
955 select HAVE_CLK 946 select HAVE_CLK
956 select MULTI_IRQ_HANDLER 947 select HAVE_IDE
957 select SPARSE_IRQ 948 select IRQ_DOMAIN
958 select USE_OF 949 select NEED_MACH_IO_H if PCCARD
950 select NEED_MACH_MEMORY_H
959 help 951 help
960 Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip. 952 Support for older TI OMAP1 (omap7xx, omap15xx or omap16xx)
961 953
962endchoice 954endchoice
963 955
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index ad375a51a7d2..5f0cdf28c227 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -291,6 +291,13 @@ choice
291 Say Y here if you want kernel low-level debugging support 291 Say Y here if you want kernel low-level debugging support
292 on MVEBU based platforms. 292 on MVEBU based platforms.
293 293
294 config DEBUG_OMAP2PLUS_UART
295 bool "Kernel low-level debugging messages via OMAP2PLUS UART"
296 depends on ARCH_OMAP2PLUS
297 help
298 Say Y here if you want kernel low-level debugging support
299 on OMAP2PLUS based platforms.
300
294 config DEBUG_PICOXCELL_UART 301 config DEBUG_PICOXCELL_UART
295 depends on ARCH_PICOXCELL 302 depends on ARCH_PICOXCELL
296 bool "Use PicoXcell UART for low-level debug" 303 bool "Use PicoXcell UART for low-level debug"
@@ -412,6 +419,13 @@ choice
412 of the tiles using the RS1 memory map, including all new A-class 419 of the tiles using the RS1 memory map, including all new A-class
413 core tiles, FPGA-based SMMs and software models. 420 core tiles, FPGA-based SMMs and software models.
414 421
422 config DEBUG_VT8500_UART0
423 bool "Use UART0 on VIA/Wondermedia SoCs"
424 depends on ARCH_VT8500
425 help
426 This option selects UART0 on VIA/Wondermedia System-on-a-chip
427 devices, including VT8500, WM8505, WM8650 and WM8850.
428
415 config DEBUG_LL_UART_NONE 429 config DEBUG_LL_UART_NONE
416 bool "No low-level debugging UART" 430 bool "No low-level debugging UART"
417 depends on !ARCH_MULTIPLATFORM 431 depends on !ARCH_MULTIPLATFORM
@@ -461,6 +475,54 @@ config DEBUG_IMX6Q_UART_PORT
461 475
462choice 476choice
463 prompt "Low-level debug console UART" 477 prompt "Low-level debug console UART"
478 depends on DEBUG_OMAP2PLUS_UART
479
480 config DEBUG_OMAP2UART1
481 bool "OMAP2/3/4 UART1 (omap2/3 sdp boards and some omap3 boards)"
482 help
483 This covers at least h4, 2430sdp, 3430sdp, 3630sdp,
484 omap3 torpedo and 3530 lv som.
485
486 config DEBUG_OMAP2UART2
487 bool "OMAP2/3/4 UART2"
488
489 config DEBUG_OMAP2UART3
490 bool "OMAP2 UART3 (n8x0)"
491
492 config DEBUG_OMAP3UART3
493 bool "OMAP3 UART3 (most omap3 boards)"
494 help
495 This covers at least cm_t3x, beagle, crane, devkit8000,
496 igep00x0, ldp, n900, n9(50), pandora, overo, touchbook,
497 and 3517evm.
498
499 config DEBUG_OMAP4UART3
500 bool "OMAP4/5 UART3 (omap4 blaze, panda, omap5 sevm)"
501
502 config DEBUG_OMAP3UART4
503 bool "OMAP36XX UART4"
504
505 config DEBUG_OMAP4UART4
506 bool "OMAP4/5 UART4"
507
508 config DEBUG_TI81XXUART1
509 bool "TI81XX UART1 (ti8148evm)"
510
511 config DEBUG_TI81XXUART2
512 bool "TI81XX UART2"
513
514 config DEBUG_TI81XXUART3
515 bool "TI81XX UART3 (ti8168evm)"
516
517 config DEBUG_AM33XXUART1
518 bool "AM33XX UART1"
519
520 config DEBUG_ZOOM_UART
521 bool "Zoom2/3 UART"
522endchoice
523
524choice
525 prompt "Low-level debug console UART"
464 depends on DEBUG_LL && DEBUG_TEGRA_UART 526 depends on DEBUG_LL && DEBUG_TEGRA_UART
465 527
466 config TEGRA_DEBUG_UART_AUTO_ODMDATA 528 config TEGRA_DEBUG_UART_AUTO_ODMDATA
@@ -501,11 +563,13 @@ config DEBUG_LL_INCLUDE
501 DEBUG_IMX6Q_UART 563 DEBUG_IMX6Q_UART
502 default "debug/highbank.S" if DEBUG_HIGHBANK_UART 564 default "debug/highbank.S" if DEBUG_HIGHBANK_UART
503 default "debug/mvebu.S" if DEBUG_MVEBU_UART 565 default "debug/mvebu.S" if DEBUG_MVEBU_UART
566 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
504 default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART 567 default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART
505 default "debug/socfpga.S" if DEBUG_SOCFPGA_UART 568 default "debug/socfpga.S" if DEBUG_SOCFPGA_UART
506 default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1 569 default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1
507 default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \ 570 default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \
508 DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 571 DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1
572 default "debug/vt8500.S" if DEBUG_VT8500_UART0
509 default "debug/tegra.S" if DEBUG_TEGRA_UART 573 default "debug/tegra.S" if DEBUG_TEGRA_UART
510 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 574 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1
511 default "mach/debug-macro.S" 575 default "mach/debug-macro.S"
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 2eeff1e64b6e..e31d442343c8 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -8,6 +8,7 @@ CONFIG_ARCH_HIGHBANK=y
8CONFIG_ARCH_SOCFPGA=y 8CONFIG_ARCH_SOCFPGA=y
9CONFIG_ARCH_SUNXI=y 9CONFIG_ARCH_SUNXI=y
10# CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA is not set 10# CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA is not set
11CONFIG_ARCH_ZYNQ=y
11CONFIG_ARM_ERRATA_754322=y 12CONFIG_ARM_ERRATA_754322=y
12CONFIG_SMP=y 13CONFIG_SMP=y
13CONFIG_ARM_ARCH_TIMER=y 14CONFIG_ARM_ARCH_TIMER=y
@@ -39,7 +40,6 @@ CONFIG_I2C=y
39CONFIG_I2C_DESIGNWARE_PLATFORM=y 40CONFIG_I2C_DESIGNWARE_PLATFORM=y
40CONFIG_SPI=y 41CONFIG_SPI=y
41CONFIG_SPI_PL022=y 42CONFIG_SPI_PL022=y
42CONFIG_GPIOLIB=y
43CONFIG_FB=y 43CONFIG_FB=y
44CONFIG_FB_ARMCLCD=y 44CONFIG_FB_ARMCLCD=y
45CONFIG_FRAMEBUFFER_CONSOLE=y 45CONFIG_FRAMEBUFFER_CONSOLE=y
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index 82ce8d738fa1..5be2e4be802c 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -20,9 +20,10 @@ CONFIG_MODULE_FORCE_UNLOAD=y
20CONFIG_MODVERSIONS=y 20CONFIG_MODVERSIONS=y
21CONFIG_MODULE_SRCVERSION_ALL=y 21CONFIG_MODULE_SRCVERSION_ALL=y
22# CONFIG_BLK_DEV_BSG is not set 22# CONFIG_BLK_DEV_BSG is not set
23CONFIG_ARCH_OMAP=y 23CONFIG_ARCH_OMAP2PLUS=y
24CONFIG_OMAP_RESET_CLOCKS=y 24CONFIG_OMAP_RESET_CLOCKS=y
25CONFIG_OMAP_MUX_DEBUG=y 25CONFIG_OMAP_MUX_DEBUG=y
26CONFIG_ARCH_VEXPRESS_CA9X4=y
26CONFIG_ARM_THUMBEE=y 27CONFIG_ARM_THUMBEE=y
27CONFIG_ARM_ERRATA_411920=y 28CONFIG_ARM_ERRATA_411920=y
28CONFIG_NO_HZ=y 29CONFIG_NO_HZ=y
@@ -121,6 +122,8 @@ CONFIG_SERIAL_8250_MANY_PORTS=y
121CONFIG_SERIAL_8250_SHARE_IRQ=y 122CONFIG_SERIAL_8250_SHARE_IRQ=y
122CONFIG_SERIAL_8250_DETECT_IRQ=y 123CONFIG_SERIAL_8250_DETECT_IRQ=y
123CONFIG_SERIAL_8250_RSA=y 124CONFIG_SERIAL_8250_RSA=y
125CONFIG_SERIAL_AMBA_PL011=y
126CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
124CONFIG_HW_RANDOM=y 127CONFIG_HW_RANDOM=y
125CONFIG_I2C_CHARDEV=y 128CONFIG_I2C_CHARDEV=y
126CONFIG_SPI=y 129CONFIG_SPI=y
@@ -194,6 +197,7 @@ CONFIG_USB_ZERO=m
194CONFIG_MMC=y 197CONFIG_MMC=y
195CONFIG_MMC_UNSAFE_RESUME=y 198CONFIG_MMC_UNSAFE_RESUME=y
196CONFIG_SDIO_UART=y 199CONFIG_SDIO_UART=y
200CONFIG_MMC_ARMMMCI=y
197CONFIG_MMC_OMAP=y 201CONFIG_MMC_OMAP=y
198CONFIG_MMC_OMAP_HS=y 202CONFIG_MMC_OMAP_HS=y
199CONFIG_RTC_CLASS=y 203CONFIG_RTC_CLASS=y
diff --git a/arch/arm/mach-omap2/include/mach/debug-macro.S b/arch/arm/include/debug/omap2plus.S
index cfaed13d0040..6d867aef18eb 100644
--- a/arch/arm/mach-omap2/include/mach/debug-macro.S
+++ b/arch/arm/include/debug/omap2plus.S
@@ -1,5 +1,4 @@
1/* arch/arm/mach-omap2/include/mach/debug-macro.S 1/*
2 *
3 * Debugging macro include header 2 * Debugging macro include header
4 * 3 *
5 * Copyright (C) 1994-1999 Russell King 4 * Copyright (C) 1994-1999 Russell King
@@ -13,7 +12,49 @@
13 12
14#include <linux/serial_reg.h> 13#include <linux/serial_reg.h>
15 14
16#include <mach/serial.h> 15/* OMAP2 serial ports */
16#define OMAP2_UART1_BASE 0x4806a000
17#define OMAP2_UART2_BASE 0x4806c000
18#define OMAP2_UART3_BASE 0x4806e000
19
20/* OMAP3 serial ports */
21#define OMAP3_UART1_BASE OMAP2_UART1_BASE
22#define OMAP3_UART2_BASE OMAP2_UART2_BASE
23#define OMAP3_UART3_BASE 0x49020000
24#define OMAP3_UART4_BASE 0x49042000 /* Only on 36xx */
25#define OMAP3_UART4_AM35XX_BASE 0x4809E000 /* Only on AM35xx */
26
27/* OMAP4 serial ports */
28#define OMAP4_UART1_BASE OMAP2_UART1_BASE
29#define OMAP4_UART2_BASE OMAP2_UART2_BASE
30#define OMAP4_UART3_BASE 0x48020000
31#define OMAP4_UART4_BASE 0x4806e000
32
33/* TI81XX serial ports */
34#define TI81XX_UART1_BASE 0x48020000
35#define TI81XX_UART2_BASE 0x48022000
36#define TI81XX_UART3_BASE 0x48024000
37
38/* AM3505/3517 UART4 */
39#define AM35XX_UART4_BASE 0x4809E000 /* Only on AM3505/3517 */
40
41/* AM33XX serial port */
42#define AM33XX_UART1_BASE 0x44E09000
43
44/* OMAP5 serial ports */
45#define OMAP5_UART1_BASE OMAP2_UART1_BASE
46#define OMAP5_UART2_BASE OMAP2_UART2_BASE
47#define OMAP5_UART3_BASE OMAP4_UART3_BASE
48#define OMAP5_UART4_BASE OMAP4_UART4_BASE
49#define OMAP5_UART5_BASE 0x48066000
50#define OMAP5_UART6_BASE 0x48068000
51
52/* External port on Zoom2/3 */
53#define ZOOM_UART_BASE 0x10000000
54#define ZOOM_UART_VIRT 0xfa400000
55
56#define OMAP_PORT_SHIFT 2
57#define ZOOM_PORT_SHIFT 1
17 58
18#define UART_OFFSET(addr) ((addr) & 0x00ffffff) 59#define UART_OFFSET(addr) ((addr) & 0x00ffffff)
19 60
@@ -23,12 +64,6 @@ omap_uart_virt: .word 0
23omap_uart_lsr: .word 0 64omap_uart_lsr: .word 0
24 .popsection 65 .popsection
25 66
26 /*
27 * Note that this code won't work if the bootloader passes
28 * a wrong machine ID number in r1. To debug, just hardcode
29 * the desired UART phys and virt addresses temporarily into
30 * the omap_uart_phys and omap_uart_virt above.
31 */
32 .macro addruart, rp, rv, tmp 67 .macro addruart, rp, rv, tmp
33 68
34 /* Use omap_uart_phys/virt if already configured */ 69 /* Use omap_uart_phys/virt if already configured */
@@ -43,74 +78,64 @@ omap_uart_lsr: .word 0
43 cmpne \rv, #0 78 cmpne \rv, #0
44 bne 100f @ already configured 79 bne 100f @ already configured
45 80
46 /* Check the debug UART configuration set in uncompress.h */
47 mov \rp, pc
48 ldr \rv, =OMAP_UART_INFO_OFS
49 and \rp, \rp, #0xff000000
50 ldr \rp, [\rp, \rv]
51
52 /* Select the UART to use based on the UART1 scratchpad value */
53 cmp \rp, #0 @ no port configured?
54 beq 21f @ if none, try to use UART1
55 cmp \rp, #OMAP2UART1 @ OMAP2/3/4UART1
56 beq 21f @ configure OMAP2/3/4UART1
57 cmp \rp, #OMAP2UART2 @ OMAP2/3/4UART2
58 beq 22f @ configure OMAP2/3/4UART2
59 cmp \rp, #OMAP2UART3 @ only on 24xx
60 beq 23f @ configure OMAP2UART3
61 cmp \rp, #OMAP3UART3 @ only on 34xx
62 beq 33f @ configure OMAP3UART3
63 cmp \rp, #OMAP4UART3 @ only on 44xx/54xx
64 beq 43f @ configure OMAP4/5UART3
65 cmp \rp, #OMAP3UART4 @ only on 36xx
66 beq 34f @ configure OMAP3UART4
67 cmp \rp, #OMAP4UART4 @ only on 44xx/54xx
68 beq 44f @ configure OMAP4/5UART4
69 cmp \rp, #TI81XXUART1 @ ti81Xx UART offsets different
70 beq 81f @ configure UART1
71 cmp \rp, #TI81XXUART2 @ ti81Xx UART offsets different
72 beq 82f @ configure UART2
73 cmp \rp, #TI81XXUART3 @ ti81Xx UART offsets different
74 beq 83f @ configure UART3
75 cmp \rp, #AM33XXUART1 @ AM33XX UART offsets different
76 beq 84f @ configure UART1
77 cmp \rp, #ZOOM_UART @ only on zoom2/3
78 beq 95f @ configure ZOOM_UART
79
80 /* Configure the UART offset from the phys/virt base */ 81 /* Configure the UART offset from the phys/virt base */
8121: mov \rp, #UART_OFFSET(OMAP2_UART1_BASE) @ omap2/3/4 82#ifdef CONFIG_DEBUG_OMAP2UART1
83 mov \rp, #UART_OFFSET(OMAP2_UART1_BASE) @ omap2/3/4
82 b 98f 84 b 98f
8322: mov \rp, #UART_OFFSET(OMAP2_UART2_BASE) @ omap2/3/4 85#endif
86#ifdef CONFIG_DEBUG_OMAP2UART2
87 mov \rp, #UART_OFFSET(OMAP2_UART2_BASE) @ omap2/3/4
84 b 98f 88 b 98f
8523: mov \rp, #UART_OFFSET(OMAP2_UART3_BASE) 89#endif
90#ifdef CONFIG_DEBUG_OMAP2UART3
91 mov \rp, #UART_OFFSET(OMAP2_UART3_BASE)
86 b 98f 92 b 98f
8733: mov \rp, #UART_OFFSET(OMAP3_UART1_BASE) 93#endif
94#ifdef CONFIG_DEBUG_OMAP3UART3
95 mov \rp, #UART_OFFSET(OMAP3_UART1_BASE)
88 add \rp, \rp, #0x00fb0000 96 add \rp, \rp, #0x00fb0000
89 add \rp, \rp, #0x00006000 @ OMAP3_UART3_BASE 97 add \rp, \rp, #0x00006000 @ OMAP3_UART3_BASE
90 b 98f 98 b 98f
9134: mov \rp, #UART_OFFSET(OMAP3_UART1_BASE) 99#endif
100#ifdef CONFIG_DEBUG_OMAP4UART3
101 mov \rp, #UART_OFFSET(OMAP4_UART3_BASE)
102 b 98f
103#endif
104#ifdef CONFIG_DEBUG_OMAP3UART4
105 mov \rp, #UART_OFFSET(OMAP3_UART1_BASE)
92 add \rp, \rp, #0x00fb0000 106 add \rp, \rp, #0x00fb0000
93 add \rp, \rp, #0x00028000 @ OMAP3_UART4_BASE 107 add \rp, \rp, #0x00028000 @ OMAP3_UART4_BASE
94 b 98f 108 b 98f
9543: mov \rp, #UART_OFFSET(OMAP4_UART3_BASE) 109#endif
96 b 98f 110#ifdef CONFIG_DEBUG_OMAP4UART4
9744: mov \rp, #UART_OFFSET(OMAP4_UART4_BASE) 111 mov \rp, #UART_OFFSET(OMAP4_UART4_BASE)
98 b 98f 112 b 98f
9981: mov \rp, #UART_OFFSET(TI81XX_UART1_BASE) 113#endif
114#ifdef CONFIG_DEBUG_TI81XXUART1
115 mov \rp, #UART_OFFSET(TI81XX_UART1_BASE)
100 b 98f 116 b 98f
10182: mov \rp, #UART_OFFSET(TI81XX_UART2_BASE) 117#endif
118#ifdef CONFIG_DEBUG_TI81XXUART2
119 mov \rp, #UART_OFFSET(TI81XX_UART2_BASE)
102 b 98f 120 b 98f
10383: mov \rp, #UART_OFFSET(TI81XX_UART3_BASE) 121#endif
122#ifdef CONFIG_DEBUG_TI81XXUART3
123 mov \rp, #UART_OFFSET(TI81XX_UART3_BASE)
104 b 98f 124 b 98f
10584: ldr \rp, =AM33XX_UART1_BASE 125#endif
126#ifdef CONFIG_DEBUG_AM33XXUART1
127 ldr \rp, =AM33XX_UART1_BASE
106 and \rp, \rp, #0x00ffffff 128 and \rp, \rp, #0x00ffffff
107 b 97f 129 b 97f
10895: ldr \rp, =ZOOM_UART_BASE 130#endif
131#ifdef CONFIG_DEBUG_ZOOM_UART
132 ldr \rp, =ZOOM_UART_BASE
109 str \rp, [\tmp, #0] @ omap_uart_phys 133 str \rp, [\tmp, #0] @ omap_uart_phys
110 ldr \rp, =ZOOM_UART_VIRT 134 ldr \rp, =ZOOM_UART_VIRT
111 str \rp, [\tmp, #4] @ omap_uart_virt 135 str \rp, [\tmp, #4] @ omap_uart_virt
112 mov \rp, #(UART_LSR << ZOOM_PORT_SHIFT) 136 mov \rp, #(UART_LSR << ZOOM_PORT_SHIFT)
113 str \rp, [\tmp, #8] @ omap_uart_lsr 137 str \rp, [\tmp, #8] @ omap_uart_lsr
138#endif
114 b 10b 139 b 10b
115 140
116 /* AM33XX: Store both phys and virt address for the uart */ 141 /* AM33XX: Store both phys and virt address for the uart */
diff --git a/arch/arm/mach-vt8500/include/mach/debug-macro.S b/arch/arm/include/debug/vt8500.S
index ca292f29d4a3..0e0ca0869da7 100644
--- a/arch/arm/mach-vt8500/include/mach/debug-macro.S
+++ b/arch/arm/include/debug/vt8500.S
@@ -1,20 +1,24 @@
1/* 1/*
2 * arch/arm/mach-vt8500/include/mach/debug-macro.S 2 * Debugging macro include header
3 * 3 *
4 * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> 4 * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com>
5 * 5 * Moved from arch/arm/mach-vt8500/include/mach/debug-macro.S
6 * Debugging macro include header 6 * Minor changes for readability.
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 * 11 */
12*/ 12
13#define DEBUG_LL_PHYS_BASE 0xD8000000
14#define DEBUG_LL_VIRT_BASE 0xF8000000
15#define DEBUG_LL_UART_OFFSET 0x00200000
13 16
17#if defined(CONFIG_DEBUG_VT8500_UART0)
14 .macro addruart, rp, rv, tmp 18 .macro addruart, rp, rv, tmp
15 mov \rp, #0x00200000 19 mov \rp, #DEBUG_LL_UART_OFFSET
16 orr \rv, \rp, #0xf8000000 20 orr \rv, \rp, #DEBUG_LL_VIRT_BASE
17 orr \rp, \rp, #0xd8000000 21 orr \rp, \rp, #DEBUG_LL_PHYS_BASE
18 .endm 22 .endm
19 23
20 .macro senduart,rd,rx 24 .macro senduart,rd,rx
@@ -29,3 +33,5 @@
29 33
30 .macro waituart,rd,rx 34 .macro waituart,rd,rx
31 .endm 35 .endm
36
37#endif
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
index e190611e4b46..1a4e887f028d 100644
--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -24,7 +24,7 @@
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/device.h> 25#include <linux/device.h>
26#include <linux/io.h> 26#include <linux/io.h>
27 27#include <linux/dma-mapping.h>
28#include <linux/omap-dma.h> 28#include <linux/omap-dma.h>
29#include <mach/tc.h> 29#include <mach/tc.h>
30 30
@@ -270,11 +270,17 @@ static u32 configure_dma_errata(void)
270 return errata; 270 return errata;
271} 271}
272 272
273static const struct platform_device_info omap_dma_dev_info = {
274 .name = "omap-dma-engine",
275 .id = -1,
276 .dma_mask = DMA_BIT_MASK(32),
277};
278
273static int __init omap1_system_dma_init(void) 279static int __init omap1_system_dma_init(void)
274{ 280{
275 struct omap_system_dma_plat_info *p; 281 struct omap_system_dma_plat_info *p;
276 struct omap_dma_dev_attr *d; 282 struct omap_dma_dev_attr *d;
277 struct platform_device *pdev; 283 struct platform_device *pdev, *dma_pdev;
278 int ret; 284 int ret;
279 285
280 pdev = platform_device_alloc("omap_dma_system", 0); 286 pdev = platform_device_alloc("omap_dma_system", 0);
@@ -380,8 +386,16 @@ static int __init omap1_system_dma_init(void)
380 dma_common_ch_start = CPC; 386 dma_common_ch_start = CPC;
381 dma_common_ch_end = COLOR; 387 dma_common_ch_end = COLOR;
382 388
389 dma_pdev = platform_device_register_full(&omap_dma_dev_info);
390 if (IS_ERR(dma_pdev)) {
391 ret = PTR_ERR(dma_pdev);
392 goto exit_release_pdev;
393 }
394
383 return ret; 395 return ret;
384 396
397exit_release_pdev:
398 platform_device_del(pdev);
385exit_release_chan: 399exit_release_chan:
386 kfree(d->chan); 400 kfree(d->chan);
387exit_release_d: 401exit_release_d:
diff --git a/arch/arm/mach-omap1/i2c.c b/arch/arm/mach-omap1/i2c.c
index faca808cb3d9..7f5761cffd2e 100644
--- a/arch/arm/mach-omap1/i2c.c
+++ b/arch/arm/mach-omap1/i2c.c
@@ -91,3 +91,9 @@ int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *pdata,
91 91
92 return platform_device_register(pdev); 92 return platform_device_register(pdev);
93} 93}
94
95static int __init omap_i2c_cmdline(void)
96{
97 return omap_register_i2c_bus_cmdline();
98}
99subsys_initcall(omap_i2c_cmdline);
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 41b581fd0213..c3c033f283a9 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -1,3 +1,26 @@
1config ARCH_OMAP
2 bool
3
4config ARCH_OMAP2PLUS
5 bool "TI OMAP2/3/4/5 SoCs with device tree support" if (ARCH_MULTI_V6 || ARCH_MULTI_V7)
6 select ARCH_HAS_CPUFREQ
7 select ARCH_HAS_HOLES_MEMORYMODEL
8 select ARCH_OMAP
9 select ARCH_REQUIRE_GPIOLIB
10 select CLKDEV_LOOKUP
11 select CLKSRC_MMIO
12 select GENERIC_CLOCKEVENTS
13 select GENERIC_IRQ_CHIP
14 select HAVE_CLK
15 select OMAP_DM_TIMER
16 select PINCTRL
17 select PROC_DEVICETREE if PROC_FS
18 select SPARSE_IRQ
19 select USE_OF
20 help
21 Systems based on OMAP2, OMAP3, OMAP4 or OMAP5
22
23
1if ARCH_OMAP2PLUS 24if ARCH_OMAP2PLUS
2 25
3menu "TI OMAP2/3/4 Specific Features" 26menu "TI OMAP2/3/4 Specific Features"
@@ -397,7 +420,7 @@ config OMAP3_SDRC_AC_TIMING
397 420
398config OMAP4_ERRATA_I688 421config OMAP4_ERRATA_I688
399 bool "OMAP4 errata: Async Bridge Corruption" 422 bool "OMAP4 errata: Async Bridge Corruption"
400 depends on ARCH_OMAP4 423 depends on ARCH_OMAP4 && !ARCH_MULTIPLATFORM
401 select ARCH_HAS_BARRIERS 424 select ARCH_HAS_BARRIERS
402 help 425 help
403 If a data is stalled inside asynchronous bridge because of back 426 If a data is stalled inside asynchronous bridge because of back
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 @@
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4 4
5ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
6 -I$(srctree)/arch/arm/plat-omap/include
7
5# Common support 8# Common support
6obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \ 9obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \
7 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \ 10 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index d07058b9c284..284500ddacdb 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -495,7 +495,7 @@ static int __init beagle_opp_init(void)
495 } 495 }
496 return 0; 496 return 0;
497} 497}
498device_initcall(beagle_opp_init); 498omap_device_initcall(beagle_opp_init);
499 499
500static void __init omap3_beagle_init(void) 500static void __init omap3_beagle_init(void)
501{ 501{
diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c
index 46f4fc982766..eb667261df08 100644
--- a/arch/arm/mach-omap2/board-rx51-video.c
+++ b/arch/arm/mach-omap2/board-rx51-video.c
@@ -18,6 +18,7 @@
18#include <video/omapdss.h> 18#include <video/omapdss.h>
19#include <linux/platform_data/spi-omap2-mcspi.h> 19#include <linux/platform_data/spi-omap2-mcspi.h>
20 20
21#include "soc.h"
21#include "board-rx51.h" 22#include "board-rx51.h"
22 23
23#include "mux.h" 24#include "mux.h"
@@ -85,5 +86,5 @@ static int __init rx51_video_init(void)
85 return 0; 86 return 0;
86} 87}
87 88
88subsys_initcall(rx51_video_init); 89omap_subsys_initcall(rx51_video_init);
89#endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */ 90#endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */
diff --git a/arch/arm/mach-omap2/clock2xxx.c b/arch/arm/mach-omap2/clock2xxx.c
index 1ff646908627..b870f6a9e283 100644
--- a/arch/arm/mach-omap2/clock2xxx.c
+++ b/arch/arm/mach-omap2/clock2xxx.c
@@ -52,6 +52,6 @@ static int __init omap2xxx_clk_arch_init(void)
52 return ret; 52 return ret;
53} 53}
54 54
55arch_initcall(omap2xxx_clk_arch_init); 55omap_arch_initcall(omap2xxx_clk_arch_init);
56 56
57 57
diff --git a/arch/arm/mach-omap2/clock3xxx.c b/arch/arm/mach-omap2/clock3xxx.c
index 4eacab8f1176..0b02b4161d71 100644
--- a/arch/arm/mach-omap2/clock3xxx.c
+++ b/arch/arm/mach-omap2/clock3xxx.c
@@ -94,6 +94,6 @@ static int __init omap3xxx_clk_arch_init(void)
94 return ret; 94 return ret;
95} 95}
96 96
97arch_initcall(omap3xxx_clk_arch_init); 97omap_arch_initcall(omap3xxx_clk_arch_init);
98 98
99 99
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index b6cc233214d7..342d69399ec7 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -69,7 +69,7 @@ static int __init omap3_l3_init(void)
69 69
70 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0; 70 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
71} 71}
72postcore_initcall(omap3_l3_init); 72omap_postcore_initcall(omap3_l3_init);
73 73
74static int __init omap4_l3_init(void) 74static int __init omap4_l3_init(void)
75{ 75{
@@ -104,7 +104,7 @@ static int __init omap4_l3_init(void)
104 104
105 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0; 105 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
106} 106}
107postcore_initcall(omap4_l3_init); 107omap_postcore_initcall(omap4_l3_init);
108 108
109#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) 109#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
110 110
@@ -779,4 +779,4 @@ static int __init omap2_init_devices(void)
779 779
780 return 0; 780 return 0;
781} 781}
782arch_initcall(omap2_init_devices); 782omap_arch_initcall(omap2_init_devices);
diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
index 612b98249873..5cd8d7668bec 100644
--- a/arch/arm/mach-omap2/dma.c
+++ b/arch/arm/mach-omap2/dma.c
@@ -27,7 +27,7 @@
27#include <linux/module.h> 27#include <linux/module.h>
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/device.h> 29#include <linux/device.h>
30 30#include <linux/dma-mapping.h>
31#include <linux/omap-dma.h> 31#include <linux/omap-dma.h>
32 32
33#include "soc.h" 33#include "soc.h"
@@ -288,9 +288,26 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
288 return 0; 288 return 0;
289} 289}
290 290
291static const struct platform_device_info omap_dma_dev_info = {
292 .name = "omap-dma-engine",
293 .id = -1,
294 .dma_mask = DMA_BIT_MASK(32),
295};
296
291static int __init omap2_system_dma_init(void) 297static int __init omap2_system_dma_init(void)
292{ 298{
293 return omap_hwmod_for_each_by_class("dma", 299 struct platform_device *pdev;
300 int res;
301
302 res = omap_hwmod_for_each_by_class("dma",
294 omap2_system_dma_init_dev, NULL); 303 omap2_system_dma_init_dev, NULL);
304 if (res)
305 return res;
306
307 pdev = platform_device_register_full(&omap_dma_dev_info);
308 if (IS_ERR(pdev))
309 return PTR_ERR(pdev);
310
311 return res;
295} 312}
296arch_initcall(omap2_system_dma_init); 313omap_arch_initcall(omap2_system_dma_init);
diff --git a/arch/arm/mach-omap2/drm.c b/arch/arm/mach-omap2/drm.c
index 2a2cfa88ddbf..231ed5f2bc81 100644
--- a/arch/arm/mach-omap2/drm.c
+++ b/arch/arm/mach-omap2/drm.c
@@ -63,6 +63,6 @@ static int __init omap_init_drm(void)
63 63
64} 64}
65 65
66arch_initcall(omap_init_drm); 66omap_arch_initcall(omap_init_drm);
67 67
68#endif 68#endif
diff --git a/arch/arm/mach-omap2/emu.c b/arch/arm/mach-omap2/emu.c
index b3566f68a559..cbeaca2d7695 100644
--- a/arch/arm/mach-omap2/emu.c
+++ b/arch/arm/mach-omap2/emu.c
@@ -47,4 +47,4 @@ static int __init emu_init(void)
47 return 0; 47 return 0;
48} 48}
49 49
50subsys_initcall(emu_init); 50omap_subsys_initcall(emu_init);
diff --git a/arch/arm/mach-omap2/fb.c b/arch/arm/mach-omap2/fb.c
index d9bd965f6d07..190ae493c6ef 100644
--- a/arch/arm/mach-omap2/fb.c
+++ b/arch/arm/mach-omap2/fb.c
@@ -89,7 +89,7 @@ static int __init omap_init_vrfb(void)
89 return 0; 89 return 0;
90} 90}
91 91
92arch_initcall(omap_init_vrfb); 92omap_arch_initcall(omap_init_vrfb);
93#endif 93#endif
94 94
95#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) 95#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
@@ -113,6 +113,6 @@ static int __init omap_init_fb(void)
113 return platform_device_register(&omap_fb_device); 113 return platform_device_register(&omap_fb_device);
114} 114}
115 115
116arch_initcall(omap_init_fb); 116omap_arch_initcall(omap_init_fb);
117 117
118#endif 118#endif
diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c
index 399acabc3d0b..40950f5af1f0 100644
--- a/arch/arm/mach-omap2/gpio.c
+++ b/arch/arm/mach-omap2/gpio.c
@@ -23,6 +23,7 @@
23#include <linux/of.h> 23#include <linux/of.h>
24#include <linux/platform_data/gpio-omap.h> 24#include <linux/platform_data/gpio-omap.h>
25 25
26#include "soc.h"
26#include "omap_hwmod.h" 27#include "omap_hwmod.h"
27#include "omap_device.h" 28#include "omap_device.h"
28#include "omap-pm.h" 29#include "omap-pm.h"
@@ -147,7 +148,7 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
147/* 148/*
148 * gpio_init needs to be done before 149 * gpio_init needs to be done before
149 * machine_init functions access gpio APIs. 150 * machine_init functions access gpio APIs.
150 * Hence gpio_init is a postcore_initcall. 151 * Hence gpio_init is a omap_postcore_initcall.
151 */ 152 */
152static int __init omap2_gpio_init(void) 153static int __init omap2_gpio_init(void)
153{ 154{
@@ -157,4 +158,4 @@ static int __init omap2_gpio_init(void)
157 158
158 return omap_hwmod_for_each_by_class("gpio", omap2_gpio_dev_init, NULL); 159 return omap_hwmod_for_each_by_class("gpio", omap2_gpio_dev_init, NULL);
159} 160}
160postcore_initcall(omap2_gpio_init); 161omap_postcore_initcall(omap2_gpio_init);
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 03d771349be6..7911e2824899 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1426,7 +1426,7 @@ static __exit void gpmc_exit(void)
1426 1426
1427} 1427}
1428 1428
1429postcore_initcall(gpmc_init); 1429omap_postcore_initcall(gpmc_init);
1430module_exit(gpmc_exit); 1430module_exit(gpmc_exit);
1431 1431
1432static int __init omap_gpmc_init(void) 1432static int __init omap_gpmc_init(void)
@@ -1453,7 +1453,7 @@ static int __init omap_gpmc_init(void)
1453 1453
1454 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0; 1454 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
1455} 1455}
1456postcore_initcall(omap_gpmc_init); 1456omap_postcore_initcall(omap_gpmc_init);
1457 1457
1458static irqreturn_t gpmc_handle_irq(int irq, void *dev) 1458static irqreturn_t gpmc_handle_irq(int irq, void *dev)
1459{ 1459{
diff --git a/arch/arm/mach-omap2/hdq1w.c b/arch/arm/mach-omap2/hdq1w.c
index ab7bf181a105..f6e0e7e68f9f 100644
--- a/arch/arm/mach-omap2/hdq1w.c
+++ b/arch/arm/mach-omap2/hdq1w.c
@@ -27,6 +27,7 @@
27#include <linux/err.h> 27#include <linux/err.h>
28#include <linux/platform_device.h> 28#include <linux/platform_device.h>
29 29
30#include "soc.h"
30#include "omap_hwmod.h" 31#include "omap_hwmod.h"
31#include "omap_device.h" 32#include "omap_device.h"
32#include "hdq1w.h" 33#include "hdq1w.h"
@@ -93,4 +94,4 @@ static int __init omap_init_hdq(void)
93 94
94 return 0; 95 return 0;
95} 96}
96arch_initcall(omap_init_hdq); 97omap_arch_initcall(omap_init_hdq);
diff --git a/arch/arm/mach-omap2/hwspinlock.c b/arch/arm/mach-omap2/hwspinlock.c
index 1df9b5feda16..bcb357e948b7 100644
--- a/arch/arm/mach-omap2/hwspinlock.c
+++ b/arch/arm/mach-omap2/hwspinlock.c
@@ -21,6 +21,7 @@
21#include <linux/err.h> 21#include <linux/err.h>
22#include <linux/hwspinlock.h> 22#include <linux/hwspinlock.h>
23 23
24#include "soc.h"
24#include "omap_hwmod.h" 25#include "omap_hwmod.h"
25#include "omap_device.h" 26#include "omap_device.h"
26 27
@@ -57,4 +58,4 @@ static int __init hwspinlocks_init(void)
57 return retval; 58 return retval;
58} 59}
59/* early board code might need to reserve specific hwspinlock instances */ 60/* early board code might need to reserve specific hwspinlock instances */
60postcore_initcall(hwspinlocks_init); 61omap_postcore_initcall(hwspinlocks_init);
diff --git a/arch/arm/mach-omap2/i2c.c b/arch/arm/mach-omap2/i2c.c
index b9074dde3b9c..8fd98576f4d3 100644
--- a/arch/arm/mach-omap2/i2c.c
+++ b/arch/arm/mach-omap2/i2c.c
@@ -185,3 +185,8 @@ int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *i2c_pdata,
185 return PTR_RET(pdev); 185 return PTR_RET(pdev);
186} 186}
187 187
188static int __init omap_i2c_cmdline(void)
189{
190 return omap_register_i2c_bus_cmdline();
191}
192omap_subsys_initcall(omap_i2c_cmdline);
diff --git a/arch/arm/mach-omap2/include/mach/serial.h b/arch/arm/mach-omap2/include/mach/serial.h
index 70eda00db7a4..7ca1fcff453b 100644
--- a/arch/arm/mach-omap2/include/mach/serial.h
+++ b/arch/arm/mach-omap2/include/mach/serial.h
@@ -8,20 +8,6 @@
8 * GNU General Public License for more details. 8 * GNU General Public License for more details.
9 */ 9 */
10 10
11/*
12 * Memory entry used for the DEBUG_LL UART configuration, relative to
13 * start of RAM. See also uncompress.h and debug-macro.S.
14 *
15 * Note that using a memory location for storing the UART configuration
16 * has at least two limitations:
17 *
18 * 1. Kernel uncompress code cannot overlap OMAP_UART_INFO as the
19 * uncompress code could then partially overwrite itself
20 * 2. We assume printascii is called at least once before paging_init,
21 * and addruart has a chance to read OMAP_UART_INFO
22 */
23#define OMAP_UART_INFO_OFS 0x3ffc
24
25/* OMAP2 serial ports */ 11/* OMAP2 serial ports */
26#define OMAP2_UART1_BASE 0x4806a000 12#define OMAP2_UART1_BASE 0x4806a000
27#define OMAP2_UART2_BASE 0x4806c000 13#define OMAP2_UART2_BASE 0x4806c000
@@ -68,29 +54,6 @@
68 54
69#define OMAP24XX_BASE_BAUD (48000000/16) 55#define OMAP24XX_BASE_BAUD (48000000/16)
70 56
71/*
72 * DEBUG_LL port encoding stored into the UART1 scratchpad register by
73 * decomp_setup in uncompress.h
74 */
75#define OMAP2UART1 21
76#define OMAP2UART2 22
77#define OMAP2UART3 23
78#define OMAP3UART1 OMAP2UART1
79#define OMAP3UART2 OMAP2UART2
80#define OMAP3UART3 33
81#define OMAP3UART4 34 /* Only on 36xx */
82#define OMAP4UART1 OMAP2UART1
83#define OMAP4UART2 OMAP2UART2
84#define OMAP4UART3 43
85#define OMAP4UART4 44
86#define TI81XXUART1 81
87#define TI81XXUART2 82
88#define TI81XXUART3 83
89#define AM33XXUART1 84
90#define OMAP5UART3 OMAP4UART3
91#define OMAP5UART4 OMAP4UART4
92#define ZOOM_UART 95 /* Only on zoom2/3 */
93
94#ifndef __ASSEMBLER__ 57#ifndef __ASSEMBLER__
95 58
96struct omap_board_data; 59struct omap_board_data;
diff --git a/arch/arm/mach-omap2/include/mach/uncompress.h b/arch/arm/mach-omap2/include/mach/uncompress.h
deleted file mode 100644
index 7b360acd19c9..000000000000
--- a/arch/arm/mach-omap2/include/mach/uncompress.h
+++ /dev/null
@@ -1,171 +0,0 @@
1/*
2 * arch/arm/plat-omap/include/mach/uncompress.h
3 *
4 * Serial port stubs for kernel decompress status messages
5 *
6 * Initially based on:
7 * linux-2.4.15-rmk1-dsplinux1.6/arch/arm/plat-omap/include/mach1510/uncompress.h
8 * Copyright (C) 2000 RidgeRun, Inc.
9 * Author: Greg Lonnon <glonnon@ridgerun.com>
10 *
11 * Rewritten by:
12 * Author: <source@mvista.com>
13 * 2004 (c) MontaVista Software, Inc.
14 *
15 * This file is licensed under the terms of the GNU General Public License
16 * version 2. This program is licensed "as is" without any warranty of any
17 * kind, whether express or implied.
18 */
19
20#include <linux/types.h>
21#include <linux/serial_reg.h>
22
23#include <asm/memory.h>
24#include <asm/mach-types.h>
25
26#include <mach/serial.h>
27
28#define MDR1_MODE_MASK 0x07
29
30volatile u8 *uart_base;
31int uart_shift;
32
33/*
34 * Store the DEBUG_LL uart number into memory.
35 * See also debug-macro.S, and serial.c for related code.
36 */
37static void set_omap_uart_info(unsigned char port)
38{
39 /*
40 * Get address of some.bss variable and round it down
41 * a la CONFIG_AUTO_ZRELADDR.
42 */
43 u32 ram_start = (u32)&uart_shift & 0xf8000000;
44 u32 *uart_info = (u32 *)(ram_start + OMAP_UART_INFO_OFS);
45 *uart_info = port;
46}
47
48static void putc(int c)
49{
50 if (!uart_base)
51 return;
52
53 /* Check for UART 16x mode */
54 if ((uart_base[UART_OMAP_MDR1 << uart_shift] & MDR1_MODE_MASK) != 0)
55 return;
56
57 while (!(uart_base[UART_LSR << uart_shift] & UART_LSR_THRE))
58 barrier();
59 uart_base[UART_TX << uart_shift] = c;
60}
61
62static inline void flush(void)
63{
64}
65
66/*
67 * Macros to configure UART1 and debug UART
68 */
69#define _DEBUG_LL_ENTRY(mach, dbg_uart, dbg_shft, dbg_id) \
70 if (machine_is_##mach()) { \
71 uart_base = (volatile u8 *)(dbg_uart); \
72 uart_shift = (dbg_shft); \
73 port = (dbg_id); \
74 set_omap_uart_info(port); \
75 break; \
76 }
77
78#define DEBUG_LL_OMAP2(p, mach) \
79 _DEBUG_LL_ENTRY(mach, OMAP2_UART##p##_BASE, OMAP_PORT_SHIFT, \
80 OMAP2UART##p)
81
82#define DEBUG_LL_OMAP3(p, mach) \
83 _DEBUG_LL_ENTRY(mach, OMAP3_UART##p##_BASE, OMAP_PORT_SHIFT, \
84 OMAP3UART##p)
85
86#define DEBUG_LL_OMAP4(p, mach) \
87 _DEBUG_LL_ENTRY(mach, OMAP4_UART##p##_BASE, OMAP_PORT_SHIFT, \
88 OMAP4UART##p)
89
90#define DEBUG_LL_OMAP5(p, mach) \
91 _DEBUG_LL_ENTRY(mach, OMAP5_UART##p##_BASE, OMAP_PORT_SHIFT, \
92 OMAP5UART##p)
93/* Zoom2/3 shift is different for UART1 and external port */
94#define DEBUG_LL_ZOOM(mach) \
95 _DEBUG_LL_ENTRY(mach, ZOOM_UART_BASE, ZOOM_PORT_SHIFT, ZOOM_UART)
96
97#define DEBUG_LL_TI81XX(p, mach) \
98 _DEBUG_LL_ENTRY(mach, TI81XX_UART##p##_BASE, OMAP_PORT_SHIFT, \
99 TI81XXUART##p)
100
101#define DEBUG_LL_AM33XX(p, mach) \
102 _DEBUG_LL_ENTRY(mach, AM33XX_UART##p##_BASE, OMAP_PORT_SHIFT, \
103 AM33XXUART##p)
104
105static inline void arch_decomp_setup(void)
106{
107 int port = 0;
108
109 /*
110 * Initialize the port based on the machine ID from the bootloader.
111 * Note that we're using macros here instead of switch statement
112 * as machine_is functions are optimized out for the boards that
113 * are not selected.
114 */
115 do {
116 /* omap2 based boards using UART1 */
117 DEBUG_LL_OMAP2(1, omap_2430sdp);
118 DEBUG_LL_OMAP2(1, omap_apollon);
119 DEBUG_LL_OMAP2(1, omap_h4);
120
121 /* omap2 based boards using UART3 */
122 DEBUG_LL_OMAP2(3, nokia_n800);
123 DEBUG_LL_OMAP2(3, nokia_n810);
124 DEBUG_LL_OMAP2(3, nokia_n810_wimax);
125
126 /* omap3 based boards using UART1 */
127 DEBUG_LL_OMAP2(1, omap3evm);
128 DEBUG_LL_OMAP3(1, omap_3430sdp);
129 DEBUG_LL_OMAP3(1, omap_3630sdp);
130 DEBUG_LL_OMAP3(1, omap3530_lv_som);
131 DEBUG_LL_OMAP3(1, omap3_torpedo);
132
133 /* omap3 based boards using UART3 */
134 DEBUG_LL_OMAP3(3, cm_t35);
135 DEBUG_LL_OMAP3(3, cm_t3517);
136 DEBUG_LL_OMAP3(3, cm_t3730);
137 DEBUG_LL_OMAP3(3, craneboard);
138 DEBUG_LL_OMAP3(3, devkit8000);
139 DEBUG_LL_OMAP3(3, igep0020);
140 DEBUG_LL_OMAP3(3, igep0030);
141 DEBUG_LL_OMAP3(3, nokia_rm680);
142 DEBUG_LL_OMAP3(3, nokia_rm696);
143 DEBUG_LL_OMAP3(3, nokia_rx51);
144 DEBUG_LL_OMAP3(3, omap3517evm);
145 DEBUG_LL_OMAP3(3, omap3_beagle);
146 DEBUG_LL_OMAP3(3, omap3_pandora);
147 DEBUG_LL_OMAP3(3, omap_ldp);
148 DEBUG_LL_OMAP3(3, overo);
149 DEBUG_LL_OMAP3(3, touchbook);
150
151 /* omap4 based boards using UART3 */
152 DEBUG_LL_OMAP4(3, omap_4430sdp);
153 DEBUG_LL_OMAP4(3, omap4_panda);
154
155 /* omap5 based boards using UART3 */
156 DEBUG_LL_OMAP5(3, omap5_sevm);
157
158 /* zoom2/3 external uart */
159 DEBUG_LL_ZOOM(omap_zoom2);
160 DEBUG_LL_ZOOM(omap_zoom3);
161
162 /* TI8168 base boards using UART3 */
163 DEBUG_LL_TI81XX(3, ti8168evm);
164
165 /* TI8148 base boards using UART1 */
166 DEBUG_LL_TI81XX(1, ti8148evm);
167
168 /* AM33XX base boards using UART1 */
169 DEBUG_LL_AM33XX(1, am335xevm);
170 } while (0);
171}
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index df49f2a49461..1c0968db43bf 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -23,6 +23,7 @@
23 23
24#include <linux/omap-dma.h> 24#include <linux/omap-dma.h>
25 25
26#include "soc.h"
26#include "omap_device.h" 27#include "omap_device.h"
27 28
28/* 29/*
@@ -118,4 +119,4 @@ static int __init omap2_mcbsp_init(void)
118 119
119 return 0; 120 return 0;
120} 121}
121arch_initcall(omap2_mcbsp_init); 122omap_arch_initcall(omap2_mcbsp_init);
diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c
index 6da4f7ae9d7f..c20423955bf7 100644
--- a/arch/arm/mach-omap2/omap-iommu.c
+++ b/arch/arm/mach-omap2/omap-iommu.c
@@ -16,6 +16,7 @@
16#include <linux/slab.h> 16#include <linux/slab.h>
17 17
18#include <linux/platform_data/iommu-omap.h> 18#include <linux/platform_data/iommu-omap.h>
19#include "soc.h"
19#include "omap_hwmod.h" 20#include "omap_hwmod.h"
20#include "omap_device.h" 21#include "omap_device.h"
21 22
@@ -61,7 +62,7 @@ static int __init omap_iommu_init(void)
61 return omap_hwmod_for_each_by_class("mmu", omap_iommu_dev_init, NULL); 62 return omap_hwmod_for_each_by_class("mmu", omap_iommu_dev_init, NULL);
62} 63}
63/* must be ready before omap3isp is probed */ 64/* must be ready before omap3isp is probed */
64subsys_initcall(omap_iommu_init); 65omap_subsys_initcall(omap_iommu_init);
65 66
66static void __exit omap_iommu_exit(void) 67static void __exit omap_iommu_exit(void)
67{ 68{
diff --git a/arch/arm/mach-omap2/omap2-restart.c b/arch/arm/mach-omap2/omap2-restart.c
index be6bc89ab1e8..719b716a4494 100644
--- a/arch/arm/mach-omap2/omap2-restart.c
+++ b/arch/arm/mach-omap2/omap2-restart.c
@@ -13,6 +13,7 @@
13#include <linux/clk.h> 13#include <linux/clk.h>
14#include <linux/io.h> 14#include <linux/io.h>
15 15
16#include "soc.h"
16#include "common.h" 17#include "common.h"
17#include "prm2xxx.h" 18#include "prm2xxx.h"
18 19
@@ -62,4 +63,4 @@ static int __init omap2xxx_common_look_up_clks_for_reset(void)
62 63
63 return 0; 64 return 0;
64} 65}
65core_initcall(omap2xxx_common_look_up_clks_for_reset); 66omap_core_initcall(omap2xxx_common_look_up_clks_for_reset);
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 547094883606..708bb115a27f 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -226,7 +226,7 @@ static int __init omap_l2_cache_init(void)
226 226
227 return 0; 227 return 0;
228} 228}
229early_initcall(omap_l2_cache_init); 229omap_early_initcall(omap_l2_cache_init);
230#endif 230#endif
231 231
232void __iomem *omap4_get_sar_ram_base(void) 232void __iomem *omap4_get_sar_ram_base(void)
@@ -254,7 +254,7 @@ static int __init omap4_sar_ram_init(void)
254 254
255 return 0; 255 return 0;
256} 256}
257early_initcall(omap4_sar_ram_init); 257omap_early_initcall(omap4_sar_ram_init);
258 258
259void __init omap_gic_of_init(void) 259void __init omap_gic_of_init(void)
260{ 260{
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index e065daa537c0..d109f06785da 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -89,6 +89,7 @@
89#include <linux/of.h> 89#include <linux/of.h>
90#include <linux/notifier.h> 90#include <linux/notifier.h>
91 91
92#include "soc.h"
92#include "omap_device.h" 93#include "omap_device.h"
93#include "omap_hwmod.h" 94#include "omap_hwmod.h"
94 95
@@ -1259,7 +1260,7 @@ static int __init omap_device_init(void)
1259 bus_register_notifier(&platform_bus_type, &platform_nb); 1260 bus_register_notifier(&platform_bus_type, &platform_nb);
1260 return 0; 1261 return 0;
1261} 1262}
1262core_initcall(omap_device_init); 1263omap_core_initcall(omap_device_init);
1263 1264
1264/** 1265/**
1265 * omap_device_late_idle - idle devices without drivers 1266 * omap_device_late_idle - idle devices without drivers
@@ -1297,4 +1298,4 @@ static int __init omap_device_late_init(void)
1297 bus_for_each_dev(&platform_bus_type, NULL, NULL, omap_device_late_idle); 1298 bus_for_each_dev(&platform_bus_type, NULL, NULL, omap_device_late_idle);
1298 return 0; 1299 return 0;
1299} 1300}
1300late_initcall(omap_device_late_init); 1301omap_late_initcall(omap_device_late_init);
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 4653efb87a27..6e70707cbb34 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3303,7 +3303,7 @@ static int __init omap_hwmod_setup_all(void)
3303 3303
3304 return 0; 3304 return 0;
3305} 3305}
3306core_initcall(omap_hwmod_setup_all); 3306omap_core_initcall(omap_hwmod_setup_all);
3307 3307
3308/** 3308/**
3309 * omap_hwmod_enable - enable an omap_hwmod 3309 * omap_hwmod_enable - enable an omap_hwmod
diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c
index e237602e10ea..eb8a25de67ed 100644
--- a/arch/arm/mach-omap2/omap_phy_internal.c
+++ b/arch/arm/mach-omap2/omap_phy_internal.c
@@ -63,7 +63,7 @@ static int __init omap4430_phy_power_down(void)
63 63
64 return 0; 64 return 0;
65} 65}
66early_initcall(omap4430_phy_power_down); 66omap_early_initcall(omap4430_phy_power_down);
67 67
68void am35x_musb_reset(void) 68void am35x_musb_reset(void)
69{ 69{
diff --git a/arch/arm/mach-omap2/opp3xxx_data.c b/arch/arm/mach-omap2/opp3xxx_data.c
index 62772e0e0d69..fc67add76444 100644
--- a/arch/arm/mach-omap2/opp3xxx_data.c
+++ b/arch/arm/mach-omap2/opp3xxx_data.c
@@ -168,4 +168,4 @@ int __init omap3_opp_init(void)
168 168
169 return r; 169 return r;
170} 170}
171device_initcall(omap3_opp_init); 171omap_device_initcall(omap3_opp_init);
diff --git a/arch/arm/mach-omap2/opp4xxx_data.c b/arch/arm/mach-omap2/opp4xxx_data.c
index d470b728e720..1ef7a3e5ce4a 100644
--- a/arch/arm/mach-omap2/opp4xxx_data.c
+++ b/arch/arm/mach-omap2/opp4xxx_data.c
@@ -177,4 +177,4 @@ int __init omap4_opp_init(void)
177 ARRAY_SIZE(omap446x_opp_def_list)); 177 ARRAY_SIZE(omap446x_opp_def_list));
178 return r; 178 return r;
179} 179}
180device_initcall(omap4_opp_init); 180omap_device_initcall(omap4_opp_init);
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index e2c291f52f92..e0ac8a31d4e0 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -279,6 +279,6 @@ static int __init pm_dbg_init(void)
279 279
280 return 0; 280 return 0;
281} 281}
282arch_initcall(pm_dbg_init); 282omap_arch_initcall(pm_dbg_init);
283 283
284#endif 284#endif
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index f4b3143a8b1d..9c65eddd97cc 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -336,7 +336,7 @@ static int __init omap2_common_pm_init(void)
336 336
337 return 0; 337 return 0;
338} 338}
339postcore_initcall(omap2_common_pm_init); 339omap_postcore_initcall(omap2_common_pm_init);
340 340
341int __init omap2_common_pm_late_init(void) 341int __init omap2_common_pm_late_init(void)
342{ 342{
diff --git a/arch/arm/mach-omap2/pmu.c b/arch/arm/mach-omap2/pmu.c
index eb78ae7a3464..75052b3bc943 100644
--- a/arch/arm/mach-omap2/pmu.c
+++ b/arch/arm/mach-omap2/pmu.c
@@ -89,4 +89,4 @@ static int __init omap_init_pmu(void)
89 89
90 return omap2_init_pmu(oh_num, oh_names); 90 return omap2_init_pmu(oh_num, oh_names);
91} 91}
92subsys_initcall(omap_init_pmu); 92omap_subsys_initcall(omap_init_pmu);
diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c
index e648bd55b072..7721990d2006 100644
--- a/arch/arm/mach-omap2/prm3xxx.c
+++ b/arch/arm/mach-omap2/prm3xxx.c
@@ -427,7 +427,7 @@ static int __init omap3xxx_prm_late_init(void)
427 427
428 return ret; 428 return ret;
429} 429}
430subsys_initcall(omap3xxx_prm_late_init); 430omap_subsys_initcall(omap3xxx_prm_late_init);
431 431
432static void __exit omap3xxx_prm_exit(void) 432static void __exit omap3xxx_prm_exit(void)
433{ 433{
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index c05a343d465d..d35f98aabf7a 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -665,7 +665,7 @@ static int __init omap44xx_prm_late_init(void)
665 665
666 return omap_prcm_register_chain_handler(&omap4_prcm_irq_setup); 666 return omap_prcm_register_chain_handler(&omap4_prcm_irq_setup);
667} 667}
668subsys_initcall(omap44xx_prm_late_init); 668omap_subsys_initcall(omap44xx_prm_late_init);
669 669
670static void __exit omap44xx_prm_exit(void) 670static void __exit omap44xx_prm_exit(void)
671{ 671{
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 04fdbc4c499b..24e9ad3cb993 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -254,7 +254,7 @@ static int __init omap_serial_early_init(void)
254 254
255 return 0; 255 return 0;
256} 256}
257core_initcall(omap_serial_early_init); 257omap_core_initcall(omap_serial_early_init);
258 258
259/** 259/**
260 * omap_serial_init_port() - initialize single serial port 260 * omap_serial_init_port() - initialize single serial port
diff --git a/arch/arm/mach-omap2/smartreflex-class3.c b/arch/arm/mach-omap2/smartreflex-class3.c
index 1da8f03c479e..aee3c8940a30 100644
--- a/arch/arm/mach-omap2/smartreflex-class3.c
+++ b/arch/arm/mach-omap2/smartreflex-class3.c
@@ -12,6 +12,7 @@
12 */ 12 */
13 13
14#include <linux/power/smartreflex.h> 14#include <linux/power/smartreflex.h>
15#include "soc.h"
15#include "voltage.h" 16#include "voltage.h"
16 17
17static int sr_class3_enable(struct omap_sr *sr) 18static int sr_class3_enable(struct omap_sr *sr)
@@ -58,4 +59,4 @@ static int __init sr_class3_init(void)
58 pr_info("SmartReflex Class3 initialized\n"); 59 pr_info("SmartReflex Class3 initialized\n");
59 return sr_register_class(&class3_data); 60 return sr_register_class(&class3_data);
60} 61}
61late_initcall(sr_class3_init); 62omap_late_initcall(sr_class3_init);
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index f31d90774de0..092aedd7ed13 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -42,6 +42,9 @@
42#undef MULTI_OMAP2 42#undef MULTI_OMAP2
43#undef OMAP_NAME 43#undef OMAP_NAME
44 44
45#ifdef CONFIG_ARCH_MULTIPLATFORM
46#define MULTI_OMAP2
47#endif
45#ifdef CONFIG_SOC_OMAP2420 48#ifdef CONFIG_SOC_OMAP2420
46# ifdef OMAP_NAME 49# ifdef OMAP_NAME
47# undef MULTI_OMAP2 50# undef MULTI_OMAP2
@@ -112,6 +115,11 @@ int omap_type(void);
112 */ 115 */
113unsigned int omap_rev(void); 116unsigned int omap_rev(void);
114 117
118static inline int soc_is_omap(void)
119{
120 return omap_rev() != 0;
121}
122
115/* 123/*
116 * Get the CPU revision for OMAP devices 124 * Get the CPU revision for OMAP devices
117 */ 125 */
@@ -465,5 +473,26 @@ static inline unsigned int omap4_has_ ##feat(void) \
465 473
466OMAP4_HAS_FEATURE(perf_silicon, PERF_SILICON) 474OMAP4_HAS_FEATURE(perf_silicon, PERF_SILICON)
467 475
476/*
477 * We need to make sure omap initcalls don't run when
478 * multiplatform kernels are booted on other SoCs.
479 */
480#define omap_initcall(level, fn) \
481static int __init __used __##fn(void) \
482{ \
483 if (!soc_is_omap()) \
484 return 0; \
485 return fn(); \
486} \
487level(__##fn);
488
489#define omap_early_initcall(fn) omap_initcall(early_initcall, fn)
490#define omap_core_initcall(fn) omap_initcall(core_initcall, fn)
491#define omap_postcore_initcall(fn) omap_initcall(postcore_initcall, fn)
492#define omap_arch_initcall(fn) omap_initcall(arch_initcall, fn)
493#define omap_subsys_initcall(fn) omap_initcall(subsys_initcall, fn)
494#define omap_device_initcall(fn) omap_initcall(device_initcall, fn)
495#define omap_late_initcall(fn) omap_initcall(late_initcall, fn)
496
468#endif /* __ASSEMBLY__ */ 497#endif /* __ASSEMBLY__ */
469 498
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 71729888ff03..72c2ca1e3f70 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -719,7 +719,7 @@ static int __init omap2_dm_timer_init(void)
719 719
720 return 0; 720 return 0;
721} 721}
722arch_initcall(omap2_dm_timer_init); 722omap_arch_initcall(omap2_dm_timer_init);
723 723
724/** 724/**
725 * omap2_override_clocksource - clocksource override with user configuration 725 * omap2_override_clocksource - clocksource override with user configuration
diff --git a/arch/arm/mach-omap2/wd_timer.c b/arch/arm/mach-omap2/wd_timer.c
index 7c2b4ed38f02..70240a54995c 100644
--- a/arch/arm/mach-omap2/wd_timer.c
+++ b/arch/arm/mach-omap2/wd_timer.c
@@ -130,4 +130,4 @@ static int __init omap_init_wdt(void)
130 dev_name, oh->name); 130 dev_name, oh->name);
131 return 0; 131 return 0;
132} 132}
133subsys_initcall(omap_init_wdt); 133omap_subsys_initcall(omap_init_wdt);
diff --git a/arch/arm/mach-vt8500/Kconfig b/arch/arm/mach-vt8500/Kconfig
index 9adcb9e76f54..7a602069bab9 100644
--- a/arch/arm/mach-vt8500/Kconfig
+++ b/arch/arm/mach-vt8500/Kconfig
@@ -1,13 +1,18 @@
1config ARCH_VT8500 1config ARCH_VT8500
2 bool "VIA/WonderMedia 85xx" if ARCH_MULTI_V5 2 bool
3 default ARCH_VT8500_SINGLE
4 select ARCH_HAS_CPUFREQ 3 select ARCH_HAS_CPUFREQ
5 select ARCH_REQUIRE_GPIOLIB 4 select ARCH_REQUIRE_GPIOLIB
6 select CLKDEV_LOOKUP 5 select CLKDEV_LOOKUP
7 select CLKSRC_OF 6 select CLKSRC_OF
8 select CPU_ARM926T
9 select GENERIC_CLOCKEVENTS 7 select GENERIC_CLOCKEVENTS
10 select HAVE_CLK 8 select HAVE_CLK
11 select VT8500_TIMER 9 select VT8500_TIMER
12 help 10 help
13 Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip. 11 Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip.
12
13config ARCH_WM8505
14 bool "VIA/Wondermedia 85xx and WM8650"
15 depends on ARCH_MULTI_V5
16 select ARCH_VT8500
17 select CPU_ARM926T
18 help
diff --git a/arch/arm/mach-vt8500/include/mach/timex.h b/arch/arm/mach-vt8500/include/mach/timex.h
deleted file mode 100644
index 8487e4c690b7..000000000000
--- a/arch/arm/mach-vt8500/include/mach/timex.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * arch/arm/mach-vt8500/include/mach/timex.h
3 *
4 * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef MACH_TIMEX_H
22#define MACH_TIMEX_H
23
24#define CLOCK_TICK_RATE (3000000)
25
26#endif /* MACH_TIMEX_H */
diff --git a/arch/arm/mach-vt8500/include/mach/uncompress.h b/arch/arm/mach-vt8500/include/mach/uncompress.h
deleted file mode 100644
index 5b4f19ecb4cc..000000000000
--- a/arch/arm/mach-vt8500/include/mach/uncompress.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/* arch/arm/mach-vt8500/include/mach/uncompress.h
2 *
3 * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com>
4 *
5 * Based on arch/arm/mach-dove/include/mach/uncompress.h
6 *
7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and
9 * may be copied, distributed, and modified under those terms.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 */
17
18#define UART0_PHYS 0xd8200000
19#define UART0_ADDR(x) *(volatile unsigned char *)(UART0_PHYS + x)
20
21static void putc(const char c)
22{
23 while (UART0_ADDR(0x1c) & 0x2)
24 /* Tx busy, wait and poll */;
25
26 UART0_ADDR(0) = c;
27}
28
29static void flush(void)
30{
31}
32
33/*
34 * nothing to do
35 */
36#define arch_decomp_setup()
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index 665870dce3c8..67c859cf16bc 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -5,36 +5,6 @@ menu "TI OMAP Common Features"
5config ARCH_OMAP_OTG 5config ARCH_OMAP_OTG
6 bool 6 bool
7 7
8choice
9 prompt "OMAP System Type"
10 default ARCH_OMAP2PLUS
11
12config ARCH_OMAP1
13 bool "TI OMAP1"
14 select CLKDEV_LOOKUP
15 select CLKSRC_MMIO
16 select GENERIC_IRQ_CHIP
17 select HAVE_IDE
18 select IRQ_DOMAIN
19 select NEED_MACH_IO_H if PCCARD
20 select NEED_MACH_MEMORY_H
21 help
22 "Systems based on omap7xx, omap15xx or omap16xx"
23
24config ARCH_OMAP2PLUS
25 bool "TI OMAP2/3/4"
26 select CLKDEV_LOOKUP
27 select GENERIC_IRQ_CHIP
28 select OMAP_DM_TIMER
29 select PINCTRL
30 select PROC_DEVICETREE if PROC_FS
31 select SPARSE_IRQ
32 select USE_OF
33 help
34 "Systems based on OMAP2, OMAP3, OMAP4 or OMAP5"
35
36endchoice
37
38comment "OMAP Feature Selections" 8comment "OMAP Feature Selections"
39 9
40config OMAP_DEBUG_DEVICES 10config OMAP_DEBUG_DEVICES
@@ -118,7 +88,7 @@ config OMAP_MUX_WARNINGS
118 88
119config OMAP_MBOX_FWK 89config OMAP_MBOX_FWK
120 tristate "Mailbox framework support" 90 tristate "Mailbox framework support"
121 depends on ARCH_OMAP 91 depends on ARCH_OMAP && !ARCH_MULTIPLATFORM
122 help 92 help
123 Say Y here if you want to use OMAP Mailbox framework support for 93 Say Y here if you want to use OMAP Mailbox framework support for
124 DSP, IVA1.0 and IVA2 in OMAP1/2/3. 94 DSP, IVA1.0 and IVA2 in OMAP1/2/3.
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 @@
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4 4
5ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-omap/include
6
5# Common support 7# Common support
6obj-y := sram.o dma.o counter_32k.o 8obj-y := sram.o dma.o counter_32k.o
7obj-m := 9obj-m :=
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);
68 * Register busses defined in command line but that are not registered with 68 * Register busses defined in command line but that are not registered with
69 * omap_register_i2c_bus from board initialization code. 69 * omap_register_i2c_bus from board initialization code.
70 */ 70 */
71static int __init omap_register_i2c_bus_cmdline(void) 71int __init omap_register_i2c_bus_cmdline(void)
72{ 72{
73 int i, err = 0; 73 int i, err = 0;
74 74
@@ -83,7 +83,6 @@ static int __init omap_register_i2c_bus_cmdline(void)
83out: 83out:
84 return err; 84 return err;
85} 85}
86subsys_initcall(omap_register_i2c_bus_cmdline);
87 86
88/** 87/**
89 * omap_register_i2c_bus - register I2C bus with device descriptors 88 * 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,
32extern int omap_register_i2c_bus(int bus_id, u32 clkrate, 32extern int omap_register_i2c_bus(int bus_id, u32 clkrate,
33 struct i2c_board_info const *info, 33 struct i2c_board_info const *info,
34 unsigned len); 34 unsigned len);
35extern int omap_register_i2c_bus_cmdline(void);
35#else 36#else
36static inline int omap_register_i2c_bus(int bus_id, u32 clkrate, 37static inline int omap_register_i2c_bus(int bus_id, u32 clkrate,
37 struct i2c_board_info const *info, 38 struct i2c_board_info const *info,
@@ -39,6 +40,11 @@ static inline int omap_register_i2c_bus(int bus_id, u32 clkrate,
39{ 40{
40 return 0; 41 return 0;
41} 42}
43
44static inline int omap_register_i2c_bus_cmdline(void)
45{
46 return 0;
47}
42#endif 48#endif
43 49
44struct omap_hwmod; 50struct omap_hwmod;