aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-01-11 15:09:44 -0500
committerOlof Johansson <olof@lixom.net>2013-01-11 15:10:47 -0500
commit61301332484966cb4e92041221bb185b6cd4d4ed (patch)
tree04f4ceeba38c147724015fe4987cf1ca418a2712
parent9931faca02c604c22335f5a935a501bb2ace6e20 (diff)
parentad1bb1b4e01c5ecbe32133ce6921d0e76cb76dcf (diff)
Merge tag 'omap-for-v3.9/multiplatform-enable-signed-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/multiplatform
From Tony Lindgren: The last dependency for enabling multiplatform support for omap2+ is now finally gone with commit 62e4d357 (ARM: 7609/1: disable errata work-arounds which access secure registers) that was preventing booting omap4. Note that make uImage will no longer work properly because of unspecified load address, so uImage needs to be created manually with: $ mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 \ -n "Linux" -d zImage-omap2plus uImage-omap2plus You can also boot minimal vexpress configuration using qemu with: $ qemu-system-arm -machine vexpress-a9 -m 1024 -net nic -net user -serial stdio \ -append "console=ttyAMA0,115200n8 rw root=/dev/mmcblk0p2 rootwait" \ -kernel zImage-omap2plus -initrd initrd.img -sd rootfs.img Please note that some custom defconfigs now need to be updated to include the following options: CONFIG_ARCH_MULTIPLATFORM=y CONFIG_ARCH_MULTI_V7=y CONFIG_ARCH_OMAP2PLUS=y And possibly also: CONFIG_ARCH_MULTI_V6=y Updating is needed at least for RMK's minimal allnoconfig files. And if you need DEBUG_LL for earlyprintk, you now have to select the debug port manually with Kconfig. * tag 'omap-for-v3.9/multiplatform-enable-signed-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: 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 Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r--arch/arm/Kconfig13
-rw-r--r--arch/arm/Kconfig.debug56
-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/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.c2
-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.h176
-rw-r--r--arch/arm/mach-omap2/mcbsp.c3
-rw-r--r--arch/arm/mach-omap2/omap-iommu.c2
-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.c2
-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/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
-rw-r--r--drivers/crypto/omap-sham.c3
-rw-r--r--drivers/dma/omap-dma.c20
-rw-r--r--drivers/media/rc/Kconfig2
-rw-r--r--drivers/staging/tidspbridge/Kconfig2
51 files changed, 314 insertions, 370 deletions
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
937 help 937 help
938 Support for TI's DaVinci platform. 938 Support for TI's DaVinci platform.
939 939
940config ARCH_OMAP 940config ARCH_OMAP1
941 bool "TI OMAP" 941 bool "TI OMAP1"
942 depends on MMU 942 depends on MMU
943 select ARCH_HAS_CPUFREQ 943 select ARCH_HAS_CPUFREQ
944 select ARCH_HAS_HOLES_MEMORYMODEL 944 select ARCH_HAS_HOLES_MEMORYMODEL
945 select ARCH_OMAP
945 select ARCH_REQUIRE_GPIOLIB 946 select ARCH_REQUIRE_GPIOLIB
947 select CLKDEV_LOOKUP
946 select CLKSRC_MMIO 948 select CLKSRC_MMIO
947 select GENERIC_CLOCKEVENTS 949 select GENERIC_CLOCKEVENTS
950 select GENERIC_IRQ_CHIP
948 select HAVE_CLK 951 select HAVE_CLK
952 select HAVE_IDE
953 select IRQ_DOMAIN
954 select NEED_MACH_IO_H if PCCARD
955 select NEED_MACH_MEMORY_H
949 help 956 help
950 Support for TI's OMAP platform (OMAP1/2/3/4). 957 Support for older TI OMAP1 (omap7xx, omap15xx or omap16xx)
951 958
952config ARCH_VT8500_SINGLE 959config ARCH_VT8500_SINGLE
953 bool "VIA/WonderMedia 85xx" 960 bool "VIA/WonderMedia 85xx"
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 661030d6bc6c..8cccce36b067 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"
@@ -461,6 +468,54 @@ config DEBUG_IMX6Q_UART_PORT
461 468
462choice 469choice
463 prompt "Low-level debug console UART" 470 prompt "Low-level debug console UART"
471 depends on DEBUG_OMAP2PLUS_UART
472
473 config DEBUG_OMAP2UART1
474 bool "OMAP2/3/4 UART1 (omap2/3 sdp boards and some omap3 boards)"
475 help
476 This covers at least h4, 2430sdp, 3430sdp, 3630sdp,
477 omap3 torpedo and 3530 lv som.
478
479 config DEBUG_OMAP2UART2
480 bool "OMAP2/3/4 UART2"
481
482 config DEBUG_OMAP2UART3
483 bool "OMAP2 UART3 (n8x0)"
484
485 config DEBUG_OMAP3UART3
486 bool "OMAP3 UART3 (most omap3 boards)"
487 help
488 This covers at least cm_t3x, beagle, crane, devkit8000,
489 igep00x0, ldp, n900, n9(50), pandora, overo, touchbook,
490 and 3517evm.
491
492 config DEBUG_OMAP4UART3
493 bool "OMAP4/5 UART3 (omap4 blaze, panda, omap5 sevm)"
494
495 config DEBUG_OMAP3UART4
496 bool "OMAP36XX UART4"
497
498 config DEBUG_OMAP4UART4
499 bool "OMAP4/5 UART4"
500
501 config DEBUG_TI81XXUART1
502 bool "TI81XX UART1 (ti8148evm)"
503
504 config DEBUG_TI81XXUART2
505 bool "TI81XX UART2"
506
507 config DEBUG_TI81XXUART3
508 bool "TI81XX UART3 (ti8168evm)"
509
510 config DEBUG_AM33XXUART1
511 bool "AM33XX UART1"
512
513 config DEBUG_ZOOM_UART
514 bool "Zoom2/3 UART"
515endchoice
516
517choice
518 prompt "Low-level debug console UART"
464 depends on DEBUG_LL && DEBUG_TEGRA_UART 519 depends on DEBUG_LL && DEBUG_TEGRA_UART
465 520
466 config TEGRA_DEBUG_UART_AUTO_ODMDATA 521 config TEGRA_DEBUG_UART_AUTO_ODMDATA
@@ -501,6 +556,7 @@ config DEBUG_LL_INCLUDE
501 DEBUG_IMX6Q_UART 556 DEBUG_IMX6Q_UART
502 default "debug/highbank.S" if DEBUG_HIGHBANK_UART 557 default "debug/highbank.S" if DEBUG_HIGHBANK_UART
503 default "debug/mvebu.S" if DEBUG_MVEBU_UART 558 default "debug/mvebu.S" if DEBUG_MVEBU_UART
559 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
504 default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART 560 default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART
505 default "debug/socfpga.S" if DEBUG_SOCFPGA_UART 561 default "debug/socfpga.S" if DEBUG_SOCFPGA_UART
506 default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1 562 default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1
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-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 22c483d5dfa8..5c68009a9795 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -494,7 +494,7 @@ static int __init beagle_opp_init(void)
494 } 494 }
495 return 0; 495 return 0;
496} 496}
497device_initcall(beagle_opp_init); 497omap_device_initcall(beagle_opp_init);
498 498
499static void __init omap3_beagle_init(void) 499static void __init omap3_beagle_init(void)
500{ 500{
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 5e304d0719a2..7709e8d4efcb 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -68,7 +68,7 @@ static int __init omap3_l3_init(void)
68 68
69 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0; 69 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
70} 70}
71postcore_initcall(omap3_l3_init); 71omap_postcore_initcall(omap3_l3_init);
72 72
73static int __init omap4_l3_init(void) 73static int __init omap4_l3_init(void)
74{ 74{
@@ -103,7 +103,7 @@ static int __init omap4_l3_init(void)
103 103
104 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0; 104 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
105} 105}
106postcore_initcall(omap4_l3_init); 106omap_postcore_initcall(omap4_l3_init);
107 107
108#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) 108#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
109 109
@@ -734,4 +734,4 @@ static int __init omap2_init_devices(void)
734 734
735 return 0; 735 return 0;
736} 736}
737arch_initcall(omap2_init_devices); 737omap_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 4c7566c7e24a..ab8a0e64c5f7 100644
--- a/arch/arm/mach-omap2/drm.c
+++ b/arch/arm/mach-omap2/drm.c
@@ -62,6 +62,6 @@ static int __init omap_init_drm(void)
62 62
63} 63}
64 64
65arch_initcall(omap_init_drm); 65omap_arch_initcall(omap_init_drm);
66 66
67#endif 67#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 8033cb747c86..972a6fc466ca 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1205,7 +1205,7 @@ static __exit void gpmc_exit(void)
1205 1205
1206} 1206}
1207 1207
1208postcore_initcall(gpmc_init); 1208omap_postcore_initcall(gpmc_init);
1209module_exit(gpmc_exit); 1209module_exit(gpmc_exit);
1210 1210
1211static int __init omap_gpmc_init(void) 1211static int __init omap_gpmc_init(void)
@@ -1225,7 +1225,7 @@ static int __init omap_gpmc_init(void)
1225 1225
1226 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0; 1226 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
1227} 1227}
1228postcore_initcall(omap_gpmc_init); 1228omap_postcore_initcall(omap_gpmc_init);
1229 1229
1230static irqreturn_t gpmc_handle_irq(int irq, void *dev) 1230static irqreturn_t gpmc_handle_irq(int irq, void *dev)
1231{ 1231{
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..ce1b5b6fc22c 100644
--- a/arch/arm/mach-omap2/hwspinlock.c
+++ b/arch/arm/mach-omap2/hwspinlock.c
@@ -57,4 +57,4 @@ static int __init hwspinlocks_init(void)
57 return retval; 57 return retval;
58} 58}
59/* early board code might need to reserve specific hwspinlock instances */ 59/* early board code might need to reserve specific hwspinlock instances */
60postcore_initcall(hwspinlocks_init); 60omap_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 8e3546d3e041..000000000000
--- a/arch/arm/mach-omap2/include/mach/uncompress.h
+++ /dev/null
@@ -1,176 +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}
172
173/*
174 * nothing to do
175 */
176#define arch_decomp_wdog()
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..dd8ce6d2f4eb 100644
--- a/arch/arm/mach-omap2/omap-iommu.c
+++ b/arch/arm/mach-omap2/omap-iommu.c
@@ -61,7 +61,7 @@ static int __init omap_iommu_init(void)
61 return omap_hwmod_for_each_by_class("mmu", omap_iommu_dev_init, NULL); 61 return omap_hwmod_for_each_by_class("mmu", omap_iommu_dev_init, NULL);
62} 62}
63/* must be ready before omap3isp is probed */ 63/* must be ready before omap3isp is probed */
64subsys_initcall(omap_iommu_init); 64omap_subsys_initcall(omap_iommu_init);
65 65
66static void __exit omap_iommu_exit(void) 66static void __exit omap_iommu_exit(void)
67{ 67{
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 6897ae21bb82..ec11e49e08e5 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -225,7 +225,7 @@ static int __init omap_l2_cache_init(void)
225 225
226 return 0; 226 return 0;
227} 227}
228early_initcall(omap_l2_cache_init); 228omap_early_initcall(omap_l2_cache_init);
229#endif 229#endif
230 230
231void __iomem *omap4_get_sar_ram_base(void) 231void __iomem *omap4_get_sar_ram_base(void)
@@ -253,7 +253,7 @@ static int __init omap4_sar_ram_init(void)
253 253
254 return 0; 254 return 0;
255} 255}
256early_initcall(omap4_sar_ram_init); 256omap_early_initcall(omap4_sar_ram_init);
257 257
258static struct of_device_id irq_match[] __initdata = { 258static struct of_device_id irq_match[] __initdata = {
259 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, 259 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
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..80f3acb266dc 100644
--- a/arch/arm/mach-omap2/smartreflex-class3.c
+++ b/arch/arm/mach-omap2/smartreflex-class3.c
@@ -58,4 +58,4 @@ static int __init sr_class3_init(void)
58 pr_info("SmartReflex Class3 initialized\n"); 58 pr_info("SmartReflex Class3 initialized\n");
59 return sr_register_class(&class3_data); 59 return sr_register_class(&class3_data);
60} 60}
61late_initcall(sr_class3_init); 61omap_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 691aa674665a..5b304beeeb12 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -742,7 +742,7 @@ static int __init omap2_dm_timer_init(void)
742 742
743 return 0; 743 return 0;
744} 744}
745arch_initcall(omap2_dm_timer_init); 745omap_arch_initcall(omap2_dm_timer_init);
746 746
747/** 747/**
748 * omap2_override_clocksource - clocksource override with user configuration 748 * 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/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;
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 @@
38#include <crypto/internal/hash.h> 38#include <crypto/internal/hash.h>
39 39
40#include <linux/omap-dma.h> 40#include <linux/omap-dma.h>
41
42#ifdef CONFIG_ARCH_OMAP1
41#include <mach/irqs.h> 43#include <mach/irqs.h>
44#endif
42 45
43#define SHA_REG_DIGEST(x) (0x00 + ((x) * 0x04)) 46#define SHA_REG_DIGEST(x) (0x00 + ((x) * 0x04))
44#define SHA_REG_DIN(x) (0x1C + ((x) * 0x04)) 47#define SHA_REG_DIN(x) (0x1C + ((x) * 0x04))
diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
index 5a31264f2bd1..c4b4fd2acc42 100644
--- a/drivers/dma/omap-dma.c
+++ b/drivers/dma/omap-dma.c
@@ -661,32 +661,14 @@ bool omap_dma_filter_fn(struct dma_chan *chan, void *param)
661} 661}
662EXPORT_SYMBOL_GPL(omap_dma_filter_fn); 662EXPORT_SYMBOL_GPL(omap_dma_filter_fn);
663 663
664static struct platform_device *pdev;
665
666static const struct platform_device_info omap_dma_dev_info = {
667 .name = "omap-dma-engine",
668 .id = -1,
669 .dma_mask = DMA_BIT_MASK(32),
670};
671
672static int omap_dma_init(void) 664static int omap_dma_init(void)
673{ 665{
674 int rc = platform_driver_register(&omap_dma_driver); 666 return platform_driver_register(&omap_dma_driver);
675
676 if (rc == 0) {
677 pdev = platform_device_register_full(&omap_dma_dev_info);
678 if (IS_ERR(pdev)) {
679 platform_driver_unregister(&omap_dma_driver);
680 rc = PTR_ERR(pdev);
681 }
682 }
683 return rc;
684} 667}
685subsys_initcall(omap_dma_init); 668subsys_initcall(omap_dma_init);
686 669
687static void __exit omap_dma_exit(void) 670static void __exit omap_dma_exit(void)
688{ 671{
689 platform_device_unregister(pdev);
690 platform_driver_unregister(&omap_dma_driver); 672 platform_driver_unregister(&omap_dma_driver);
691} 673}
692module_exit(omap_dma_exit); 674module_exit(omap_dma_exit);
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
291 291
292config IR_RX51 292config IR_RX51
293 tristate "Nokia N900 IR transmitter diode" 293 tristate "Nokia N900 IR transmitter diode"
294 depends on OMAP_DM_TIMER && LIRC 294 depends on OMAP_DM_TIMER && LIRC && !ARCH_MULTIPLATFORM
295 ---help--- 295 ---help---
296 Say Y or M here if you want to enable support for the IR 296 Say Y or M here if you want to enable support for the IR
297 transmitter diode built in the Nokia N900 (RX51) device. 297 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 @@
4 4
5menuconfig TIDSPBRIDGE 5menuconfig TIDSPBRIDGE
6 tristate "DSP Bridge driver" 6 tristate "DSP Bridge driver"
7 depends on ARCH_OMAP3 7 depends on ARCH_OMAP3 && !ARCH_MULTIPLATFORM
8 select OMAP_MBOX_FWK 8 select OMAP_MBOX_FWK
9 help 9 help
10 DSP/BIOS Bridge is designed for platforms that contain a GPP and 10 DSP/BIOS Bridge is designed for platforms that contain a GPP and