aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-3630sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c2
-rw-r--r--arch/arm/mach-omap2/board-apollon.c2
-rw-r--r--arch/arm/mach-omap2/board-h4.c2
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c2
-rw-r--r--arch/arm/mach-omap2/board-igep0030.c2
-rw-r--r--arch/arm/mach-omap2/board-ldp.c2
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c28
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3logic.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c2
-rw-r--r--arch/arm/mach-omap2/board-overo.c2
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c28
-rw-r--r--arch/arm/mach-omap2/board-rx51.c2
-rw-r--r--arch/arm/mach-omap2/board-zoom.c2
-rw-r--r--arch/arm/mach-omap2/include/mach/entry-macro.S44
-rw-r--r--arch/arm/mach-omap2/io.c62
-rw-r--r--arch/arm/mach-omap2/mux.h2
23 files changed, 97 insertions, 103 deletions
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 0f14001c1641..c00f26aca0d6 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -217,8 +217,6 @@ static struct omap_usb_config sdp2430_usb_config __initdata = {
217static struct omap_board_mux board_mux[] __initdata = { 217static struct omap_board_mux board_mux[] __initdata = {
218 { .reg_offset = OMAP_MUX_TERMINATOR }, 218 { .reg_offset = OMAP_MUX_TERMINATOR },
219}; 219};
220#else
221#define board_mux NULL
222#endif 220#endif
223 221
224static void __init omap_2430sdp_init(void) 222static void __init omap_2430sdp_init(void)
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 5cb23f3d4fc0..869fb133c207 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -662,8 +662,6 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
662static struct omap_board_mux board_mux[] __initdata = { 662static struct omap_board_mux board_mux[] __initdata = {
663 { .reg_offset = OMAP_MUX_TERMINATOR }, 663 { .reg_offset = OMAP_MUX_TERMINATOR },
664}; 664};
665#else
666#define board_mux NULL
667#endif 665#endif
668 666
669/* 667/*
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index b23f401aa6b6..a8d35ba7781e 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -82,8 +82,6 @@ static void __init omap_sdp_init_irq(void)
82static struct omap_board_mux board_mux[] __initdata = { 82static struct omap_board_mux board_mux[] __initdata = {
83 { .reg_offset = OMAP_MUX_TERMINATOR }, 83 { .reg_offset = OMAP_MUX_TERMINATOR },
84}; 84};
85#else
86#define board_mux NULL
87#endif 85#endif
88 86
89/* 87/*
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index df6900e8ad5a..86867138f1e4 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -441,8 +441,6 @@ static struct omap_board_mux board_mux[] __initdata = {
441 OMAP3_MUX(SAD2D_MCAD23, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), 441 OMAP3_MUX(SAD2D_MCAD23, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
442 { .reg_offset = OMAP_MUX_TERMINATOR }, 442 { .reg_offset = OMAP_MUX_TERMINATOR },
443}; 443};
444#else
445#define board_mux NULL
446#endif 444#endif
447 445
448 446
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index f51f4f1e07f7..4e91f453ea90 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -312,8 +312,6 @@ static void __init apollon_usb_init(void)
312static struct omap_board_mux board_mux[] __initdata = { 312static struct omap_board_mux board_mux[] __initdata = {
313 { .reg_offset = OMAP_MUX_TERMINATOR }, 313 { .reg_offset = OMAP_MUX_TERMINATOR },
314}; 314};
315#else
316#define board_mux NULL
317#endif 315#endif
318 316
319static void __init omap_apollon_init(void) 317static void __init omap_apollon_init(void)
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 68e6f4c8e00a..9ec77a4a6b88 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -320,8 +320,6 @@ static struct i2c_board_info __initdata h4_i2c_board_info[] = {
320static struct omap_board_mux board_mux[] __initdata = { 320static struct omap_board_mux board_mux[] __initdata = {
321 { .reg_offset = OMAP_MUX_TERMINATOR }, 321 { .reg_offset = OMAP_MUX_TERMINATOR },
322}; 322};
323#else
324#define board_mux NULL
325#endif 323#endif
326 324
327static void __init omap_h4_init(void) 325static void __init omap_h4_init(void)
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 3bda186fe677..59b95f2389dd 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -563,8 +563,6 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
563static struct omap_board_mux board_mux[] __initdata = { 563static struct omap_board_mux board_mux[] __initdata = {
564 { .reg_offset = OMAP_MUX_TERMINATOR }, 564 { .reg_offset = OMAP_MUX_TERMINATOR },
565}; 565};
566#else
567#define board_mux NULL
568#endif 566#endif
569 567
570#if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE) 568#if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)
diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c
index c7c57cdf83d6..886f193a8415 100644
--- a/arch/arm/mach-omap2/board-igep0030.c
+++ b/arch/arm/mach-omap2/board-igep0030.c
@@ -365,8 +365,6 @@ void __init igep3_wifi_bt_init(void) {}
365static struct omap_board_mux board_mux[] __initdata = { 365static struct omap_board_mux board_mux[] __initdata = {
366 { .reg_offset = OMAP_MUX_TERMINATOR }, 366 { .reg_offset = OMAP_MUX_TERMINATOR },
367}; 367};
368#else
369#define board_mux NULL
370#endif 368#endif
371 369
372static void __init igep3_init(void) 370static void __init igep3_init(void)
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index d97e3caed7c0..7455b0aadf86 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -379,8 +379,6 @@ static struct platform_device *ldp_devices[] __initdata = {
379static struct omap_board_mux board_mux[] __initdata = { 379static struct omap_board_mux board_mux[] __initdata = {
380 { .reg_offset = OMAP_MUX_TERMINATOR }, 380 { .reg_offset = OMAP_MUX_TERMINATOR },
381}; 381};
382#else
383#define board_mux NULL
384#endif 382#endif
385 383
386static struct omap_musb_board_data musb_board_data = { 384static struct omap_musb_board_data musb_board_data = {
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index d8a489338e0c..d4ce96316e3b 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -184,23 +184,15 @@ static struct mtd_partition onenand_partitions[] = {
184 }, 184 },
185}; 185};
186 186
187static struct omap_onenand_platform_data board_onenand_data = { 187static struct omap_onenand_platform_data board_onenand_data[] = {
188 .cs = 0, 188 {
189 .gpio_irq = 26, 189 .cs = 0,
190 .parts = onenand_partitions, 190 .gpio_irq = 26,
191 .nr_parts = ARRAY_SIZE(onenand_partitions), 191 .parts = onenand_partitions,
192 .flags = ONENAND_SYNC_READ, 192 .nr_parts = ARRAY_SIZE(onenand_partitions),
193 .flags = ONENAND_SYNC_READ,
194 }
193}; 195};
194
195static void __init n8x0_onenand_init(void)
196{
197 gpmc_onenand_init(&board_onenand_data);
198}
199
200#else
201
202static void __init n8x0_onenand_init(void) {}
203
204#endif 196#endif
205 197
206#if defined(CONFIG_MENELAUS) && \ 198#if defined(CONFIG_MENELAUS) && \
@@ -652,8 +644,6 @@ static struct omap_board_mux board_mux[] __initdata = {
652 OMAP2420_MUX(EAC_AC_DOUT, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT), 644 OMAP2420_MUX(EAC_AC_DOUT, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
653 { .reg_offset = OMAP_MUX_TERMINATOR }, 645 { .reg_offset = OMAP_MUX_TERMINATOR },
654}; 646};
655#else
656#define board_mux NULL
657#endif 647#endif
658 648
659static void __init n8x0_init_machine(void) 649static void __init n8x0_init_machine(void)
@@ -670,7 +660,7 @@ static void __init n8x0_init_machine(void)
670 ARRAY_SIZE(n810_i2c_board_info_2)); 660 ARRAY_SIZE(n810_i2c_board_info_2));
671 661
672 omap_serial_init(); 662 omap_serial_init();
673 n8x0_onenand_init(); 663 gpmc_onenand_init(board_onenand_data);
674 n8x0_mmc_init(); 664 n8x0_mmc_init();
675 n8x0_usb_init(); 665 n8x0_usb_init();
676} 666}
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index a4131bef50fb..f1a8edefa42f 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -547,8 +547,6 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
547static struct omap_board_mux board_mux[] __initdata = { 547static struct omap_board_mux board_mux[] __initdata = {
548 { .reg_offset = OMAP_MUX_TERMINATOR }, 548 { .reg_offset = OMAP_MUX_TERMINATOR },
549}; 549};
550#else
551#define board_mux NULL
552#endif 550#endif
553 551
554static struct omap_musb_board_data musb_board_data = { 552static struct omap_musb_board_data musb_board_data = {
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 5ca02202d608..21ffc5c587a1 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -653,8 +653,6 @@ static struct omap_board_mux board_mux[] __initdata = {
653 OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW), 653 OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW),
654 { .reg_offset = OMAP_MUX_TERMINATOR }, 654 { .reg_offset = OMAP_MUX_TERMINATOR },
655}; 655};
656#else
657#define board_mux NULL
658#endif 656#endif
659 657
660static struct omap_musb_board_data musb_board_data = { 658static struct omap_musb_board_data musb_board_data = {
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index 263294044c7e..cfd618d3bda8 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -205,8 +205,6 @@ static void __init omap3logic_init_irq(void)
205static struct omap_board_mux board_mux[] __initdata = { 205static struct omap_board_mux board_mux[] __initdata = {
206 { .reg_offset = OMAP_MUX_TERMINATOR }, 206 { .reg_offset = OMAP_MUX_TERMINATOR },
207}; 207};
208#else
209#define board_mux NULL
210#endif 208#endif
211 209
212static void __init omap3logic_init(void) 210static void __init omap3logic_init(void)
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 1031d7cadb3a..de8df58b8f1d 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -710,8 +710,6 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
710static struct omap_board_mux board_mux[] __initdata = { 710static struct omap_board_mux board_mux[] __initdata = {
711 { .reg_offset = OMAP_MUX_TERMINATOR }, 711 { .reg_offset = OMAP_MUX_TERMINATOR },
712}; 712};
713#else
714#define board_mux NULL
715#endif 713#endif
716 714
717static struct omap_musb_board_data musb_board_data = { 715static struct omap_musb_board_data musb_board_data = {
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index ea13e2aeeec5..1af344b872bc 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -615,8 +615,6 @@ static struct omap_board_mux board_mux[] __initdata = {
615 OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE), 615 OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE),
616 {.reg_offset = OMAP_MUX_TERMINATOR}, 616 {.reg_offset = OMAP_MUX_TERMINATOR},
617}; 617};
618#else
619#define board_mux NULL
620#endif 618#endif
621 619
622static struct omap_musb_board_data musb_board_data = { 620static struct omap_musb_board_data musb_board_data = {
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 2339964058cc..baa72c507d4c 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -413,8 +413,6 @@ static struct omap_board_config_kernel omap3_touchbook_config[] __initdata = {
413static struct omap_board_mux board_mux[] __initdata = { 413static struct omap_board_mux board_mux[] __initdata = {
414 { .reg_offset = OMAP_MUX_TERMINATOR }, 414 { .reg_offset = OMAP_MUX_TERMINATOR },
415}; 415};
416#else
417#define board_mux NULL
418#endif 416#endif
419 417
420static void __init omap3_touchbook_init_irq(void) 418static void __init omap3_touchbook_init_irq(void)
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 805b78393393..b75bdcd47117 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -437,8 +437,6 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
437static struct omap_board_mux board_mux[] __initdata = { 437static struct omap_board_mux board_mux[] __initdata = {
438 { .reg_offset = OMAP_MUX_TERMINATOR }, 438 { .reg_offset = OMAP_MUX_TERMINATOR },
439}; 439};
440#else
441#define board_mux NULL
442#endif 440#endif
443 441
444static struct omap_musb_board_data musb_board_data = { 442static struct omap_musb_board_data musb_board_data = {
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 3fda20d73233..126b724a5e2d 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -817,25 +817,15 @@ static struct mtd_partition onenand_partitions[] = {
817 }, 817 },
818}; 818};
819 819
820static struct omap_onenand_platform_data board_onenand_data = { 820static struct omap_onenand_platform_data board_onenand_data[] = {
821 .cs = 0, 821 {
822 .gpio_irq = 65, 822 .cs = 0,
823 .parts = onenand_partitions, 823 .gpio_irq = 65,
824 .nr_parts = ARRAY_SIZE(onenand_partitions), 824 .parts = onenand_partitions,
825 .flags = ONENAND_SYNC_READWRITE, 825 .nr_parts = ARRAY_SIZE(onenand_partitions),
826 .flags = ONENAND_SYNC_READWRITE,
827 }
826}; 828};
827
828static void __init board_onenand_init(void)
829{
830 gpmc_onenand_init(&board_onenand_data);
831}
832
833#else
834
835static inline void board_onenand_init(void)
836{
837}
838
839#endif 829#endif
840 830
841#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 831#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
@@ -918,7 +908,7 @@ error:
918void __init rx51_peripherals_init(void) 908void __init rx51_peripherals_init(void)
919{ 909{
920 rx51_i2c_init(); 910 rx51_i2c_init();
921 board_onenand_init(); 911 gpmc_onenand_init(board_onenand_data);
922 board_smc91x_init(); 912 board_smc91x_init();
923 rx51_add_gpio_keys(); 913 rx51_add_gpio_keys();
924 rx51_init_wl1251(); 914 rx51_init_wl1251();
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 1c3b0795c6e2..6635142d7d07 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -116,8 +116,6 @@ extern void __init rx51_peripherals_init(void);
116static struct omap_board_mux board_mux[] __initdata = { 116static struct omap_board_mux board_mux[] __initdata = {
117 { .reg_offset = OMAP_MUX_TERMINATOR }, 117 { .reg_offset = OMAP_MUX_TERMINATOR },
118}; 118};
119#else
120#define board_mux NULL
121#endif 119#endif
122 120
123static struct omap_musb_board_data musb_board_data = { 121static struct omap_musb_board_data musb_board_data = {
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c
index abd864a50b4e..0dff9deaa896 100644
--- a/arch/arm/mach-omap2/board-zoom.c
+++ b/arch/arm/mach-omap2/board-zoom.c
@@ -62,8 +62,6 @@ static struct omap_board_mux board_mux[] __initdata = {
62 OMAP3_MUX(ETK_D6, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP), 62 OMAP3_MUX(ETK_D6, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
63 { .reg_offset = OMAP_MUX_TERMINATOR }, 63 { .reg_offset = OMAP_MUX_TERMINATOR },
64}; 64};
65#else
66#define board_mux NULL
67#endif 65#endif
68 66
69static struct mtd_partition zoom_nand_partitions[] = { 67static struct mtd_partition zoom_nand_partitions[] = {
diff --git a/arch/arm/mach-omap2/include/mach/entry-macro.S b/arch/arm/mach-omap2/include/mach/entry-macro.S
index 06e64e1fc28a..60329411a636 100644
--- a/arch/arm/mach-omap2/include/mach/entry-macro.S
+++ b/arch/arm/mach-omap2/include/mach/entry-macro.S
@@ -38,41 +38,27 @@
38 */ 38 */
39 39
40#ifdef MULTI_OMAP2 40#ifdef MULTI_OMAP2
41
42/*
43 * We use __glue to avoid errors with multiple definitions of
44 * .globl omap_irq_base as it's included from entry-armv.S but not
45 * from entry-common.S.
46 */
47#ifdef __glue
41 .pushsection .data 48 .pushsection .data
42omap_irq_base: .word 0 49 .globl omap_irq_base
50omap_irq_base:
51 .word 0
43 .popsection 52 .popsection
53#endif
44 54
45 /* Configure the interrupt base on the first interrupt */ 55 /*
56 * Configure the interrupt base on the first interrupt.
57 * See also omap_irq_base_init for setting omap_irq_base.
58 */
46 .macro get_irqnr_preamble, base, tmp 59 .macro get_irqnr_preamble, base, tmp
479:
48 ldr \base, =omap_irq_base @ irq base address 60 ldr \base, =omap_irq_base @ irq base address
49 ldr \base, [\base, #0] @ irq base value 61 ldr \base, [\base, #0] @ irq base value
50 cmp \base, #0 @ already configured?
51 bne 9997f @ nothing to do
52
53 mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision
54 and \tmp, \tmp, #0x000f0000 @ only check architecture
55 cmp \tmp, #0x00070000 @ is v6?
56 beq 2400f @ found v6 so it's omap24xx
57 mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision
58 and \tmp, \tmp, #0x000000f0 @ check cortex 8 or 9
59 cmp \tmp, #0x00000080 @ cortex A-8?
60 beq 3400f @ found A-8 so it's omap34xx
61 cmp \tmp, #0x00000090 @ cortex A-9?
62 beq 4400f @ found A-9 so it's omap44xx
632400: ldr \base, =OMAP2_IRQ_BASE
64 ldr \tmp, =omap_irq_base
65 str \base, [\tmp, #0]
66 b 9b
673400: ldr \base, =OMAP3_IRQ_BASE
68 ldr \tmp, =omap_irq_base
69 str \base, [\tmp, #0]
70 b 9b
714400: ldr \base, =OMAP4_IRQ_BASE
72 ldr \tmp, =omap_irq_base
73 str \base, [\tmp, #0]
74 b 9b
759997:
76 .endm 62 .endm
77 63
78 /* Check the pending interrupts. Note that base already set */ 64 /* Check the pending interrupts. Note that base already set */
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 40562ddd3ee4..9804385533e5 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -46,6 +46,7 @@
46#include "clockdomains.h" 46#include "clockdomains.h"
47 47
48#include <plat/omap_hwmod.h> 48#include <plat/omap_hwmod.h>
49#include <plat/multi.h>
49 50
50/* 51/*
51 * The machine specific code may provide the extra mapping besides the 52 * The machine specific code may provide the extra mapping besides the
@@ -311,6 +312,25 @@ static int __init _omap2_init_reprogram_sdrc(void)
311 return v; 312 return v;
312} 313}
313 314
315/*
316 * Initialize asm_irq_base for entry-macro.S
317 */
318static inline void omap_irq_base_init(void)
319{
320 extern void __iomem *omap_irq_base;
321
322#ifdef MULTI_OMAP2
323 if (cpu_is_omap242x())
324 omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE);
325 else if (cpu_is_omap34xx())
326 omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE);
327 else if (cpu_is_omap44xx())
328 omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE);
329 else
330 pr_err("Could not initialize omap_irq_base\n");
331#endif
332}
333
314void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, 334void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
315 struct omap_sdrc_params *sdrc_cs1) 335 struct omap_sdrc_params *sdrc_cs1)
316{ 336{
@@ -352,4 +372,46 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
352 _omap2_init_reprogram_sdrc(); 372 _omap2_init_reprogram_sdrc();
353 } 373 }
354 gpmc_init(); 374 gpmc_init();
375
376 omap_irq_base_init();
377}
378
379/*
380 * NOTE: Please use ioremap + __raw_read/write where possible instead of these
381 */
382
383u8 omap_readb(u32 pa)
384{
385 return __raw_readb(OMAP2_L4_IO_ADDRESS(pa));
386}
387EXPORT_SYMBOL(omap_readb);
388
389u16 omap_readw(u32 pa)
390{
391 return __raw_readw(OMAP2_L4_IO_ADDRESS(pa));
392}
393EXPORT_SYMBOL(omap_readw);
394
395u32 omap_readl(u32 pa)
396{
397 return __raw_readl(OMAP2_L4_IO_ADDRESS(pa));
398}
399EXPORT_SYMBOL(omap_readl);
400
401void omap_writeb(u8 v, u32 pa)
402{
403 __raw_writeb(v, OMAP2_L4_IO_ADDRESS(pa));
404}
405EXPORT_SYMBOL(omap_writeb);
406
407void omap_writew(u16 v, u32 pa)
408{
409 __raw_writew(v, OMAP2_L4_IO_ADDRESS(pa));
410}
411EXPORT_SYMBOL(omap_writew);
412
413void omap_writel(u32 v, u32 pa)
414{
415 __raw_writel(v, OMAP2_L4_IO_ADDRESS(pa));
355} 416}
417EXPORT_SYMBOL(omap_writel);
diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h
index 79076d61d399..f5f7f4938057 100644
--- a/arch/arm/mach-omap2/mux.h
+++ b/arch/arm/mach-omap2/mux.h
@@ -172,6 +172,8 @@ static inline int omap_mux_init_signal(char *muxname, int val)
172 return 0; 172 return 0;
173} 173}
174 174
175static struct omap_board_mux *board_mux __initdata __maybe_unused;
176
175#endif 177#endif
176 178
177/** 179/**