diff options
author | Cyril Chemparathy <cyril@ti.com> | 2010-05-07 17:06:37 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2010-05-13 13:05:28 -0400 |
commit | bd808947040ba53b2b0e52dde598a9414fb27bba (patch) | |
tree | 868535ab01e9a7a754d255c77b2ab839f8b4f3ca /arch/arm | |
parent | e4c822c7e98cdda78b10a696b030fc20b22dcab4 (diff) |
Davinci: aintc/cpintc - use ioremap()
This patch implements the following:
- interrupt initialization uses ioremap() instead of passing a virtual address
via davinci_soc_info.
- machine definitions directly point to cp_intc_init() or davinci_irq_init()
- davinci_intc_type and davinci_intc_base now get initialized in controller
specific init functions instead of davinci_common_init()
- minor fix in davinci_irq_init() to use intc_irq_num instead of
DAVINCI_N_AINTC_IRQ
Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-davinci/board-da830-evm.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-da850-evm.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-dm355-evm.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-dm355-leopard.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-dm365-evm.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-dm644x-evm.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-dm646x-evm.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-neuros-osd2.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-sffsdr.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-davinci/common.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/cp_intc.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-davinci/da830.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/da850.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm355.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm365.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm644x.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm646x.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/common.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/cp_intc.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-davinci/irq.c | 7 |
20 files changed, 36 insertions, 80 deletions
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index 8f079d2f1af9..212d97084bd7 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c | |||
@@ -561,14 +561,6 @@ static int __init da830_evm_console_init(void) | |||
561 | console_initcall(da830_evm_console_init); | 561 | console_initcall(da830_evm_console_init); |
562 | #endif | 562 | #endif |
563 | 563 | ||
564 | static __init void da830_evm_irq_init(void) | ||
565 | { | ||
566 | struct davinci_soc_info *soc_info = &davinci_soc_info; | ||
567 | |||
568 | cp_intc_init((void __iomem *)DA8XX_CP_INTC_VIRT, DA830_N_CP_INTC_IRQ, | ||
569 | soc_info->intc_irq_prios, NULL); | ||
570 | } | ||
571 | |||
572 | static void __init da830_evm_map_io(void) | 564 | static void __init da830_evm_map_io(void) |
573 | { | 565 | { |
574 | da830_init(); | 566 | da830_init(); |
@@ -579,7 +571,7 @@ MACHINE_START(DAVINCI_DA830_EVM, "DaVinci DA830/OMAP-L137 EVM") | |||
579 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, | 571 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, |
580 | .boot_params = (DA8XX_DDR_BASE + 0x100), | 572 | .boot_params = (DA8XX_DDR_BASE + 0x100), |
581 | .map_io = da830_evm_map_io, | 573 | .map_io = da830_evm_map_io, |
582 | .init_irq = da830_evm_irq_init, | 574 | .init_irq = cp_intc_init, |
583 | .timer = &davinci_timer, | 575 | .timer = &davinci_timer, |
584 | .init_machine = da830_evm_init, | 576 | .init_machine = da830_evm_init, |
585 | MACHINE_END | 577 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 6c137e0492ff..abd04932917b 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -736,14 +736,6 @@ static int __init da850_evm_console_init(void) | |||
736 | console_initcall(da850_evm_console_init); | 736 | console_initcall(da850_evm_console_init); |
737 | #endif | 737 | #endif |
738 | 738 | ||
739 | static __init void da850_evm_irq_init(void) | ||
740 | { | ||
741 | struct davinci_soc_info *soc_info = &davinci_soc_info; | ||
742 | |||
743 | cp_intc_init((void __iomem *)DA8XX_CP_INTC_VIRT, DA850_N_CP_INTC_IRQ, | ||
744 | soc_info->intc_irq_prios, NULL); | ||
745 | } | ||
746 | |||
747 | static void __init da850_evm_map_io(void) | 739 | static void __init da850_evm_map_io(void) |
748 | { | 740 | { |
749 | da850_init(); | 741 | da850_init(); |
@@ -754,7 +746,7 @@ MACHINE_START(DAVINCI_DA850_EVM, "DaVinci DA850/OMAP-L138 EVM") | |||
754 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, | 746 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, |
755 | .boot_params = (DA8XX_DDR_BASE + 0x100), | 747 | .boot_params = (DA8XX_DDR_BASE + 0x100), |
756 | .map_io = da850_evm_map_io, | 748 | .map_io = da850_evm_map_io, |
757 | .init_irq = da850_evm_irq_init, | 749 | .init_irq = cp_intc_init, |
758 | .timer = &davinci_timer, | 750 | .timer = &davinci_timer, |
759 | .init_machine = da850_evm_init, | 751 | .init_machine = da850_evm_init, |
760 | MACHINE_END | 752 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index a0ad7d9f5c85..a3191015efee 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c | |||
@@ -350,17 +350,12 @@ static __init void dm355_evm_init(void) | |||
350 | dm355_init_asp1(ASP1_TX_EVT_EN | ASP1_RX_EVT_EN, &dm355_evm_snd_data); | 350 | dm355_init_asp1(ASP1_TX_EVT_EN | ASP1_RX_EVT_EN, &dm355_evm_snd_data); |
351 | } | 351 | } |
352 | 352 | ||
353 | static __init void dm355_evm_irq_init(void) | ||
354 | { | ||
355 | davinci_irq_init(); | ||
356 | } | ||
357 | |||
358 | MACHINE_START(DAVINCI_DM355_EVM, "DaVinci DM355 EVM") | 353 | MACHINE_START(DAVINCI_DM355_EVM, "DaVinci DM355 EVM") |
359 | .phys_io = IO_PHYS, | 354 | .phys_io = IO_PHYS, |
360 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, | 355 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, |
361 | .boot_params = (0x80000100), | 356 | .boot_params = (0x80000100), |
362 | .map_io = dm355_evm_map_io, | 357 | .map_io = dm355_evm_map_io, |
363 | .init_irq = dm355_evm_irq_init, | 358 | .init_irq = davinci_irq_init, |
364 | .timer = &davinci_timer, | 359 | .timer = &davinci_timer, |
365 | .init_machine = dm355_evm_init, | 360 | .init_machine = dm355_evm_init, |
366 | MACHINE_END | 361 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c index c3d5a70a7f38..f1d8132cf0c3 100644 --- a/arch/arm/mach-davinci/board-dm355-leopard.c +++ b/arch/arm/mach-davinci/board-dm355-leopard.c | |||
@@ -269,17 +269,12 @@ static __init void dm355_leopard_init(void) | |||
269 | ARRAY_SIZE(dm355_leopard_spi_info)); | 269 | ARRAY_SIZE(dm355_leopard_spi_info)); |
270 | } | 270 | } |
271 | 271 | ||
272 | static __init void dm355_leopard_irq_init(void) | ||
273 | { | ||
274 | davinci_irq_init(); | ||
275 | } | ||
276 | |||
277 | MACHINE_START(DM355_LEOPARD, "DaVinci DM355 leopard") | 272 | MACHINE_START(DM355_LEOPARD, "DaVinci DM355 leopard") |
278 | .phys_io = IO_PHYS, | 273 | .phys_io = IO_PHYS, |
279 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, | 274 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, |
280 | .boot_params = (0x80000100), | 275 | .boot_params = (0x80000100), |
281 | .map_io = dm355_leopard_map_io, | 276 | .map_io = dm355_leopard_map_io, |
282 | .init_irq = dm355_leopard_irq_init, | 277 | .init_irq = davinci_irq_init, |
283 | .timer = &davinci_timer, | 278 | .timer = &davinci_timer, |
284 | .init_machine = dm355_leopard_init, | 279 | .init_machine = dm355_leopard_init, |
285 | MACHINE_END | 280 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index b98b35c9e0e2..98814e6a5987 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c | |||
@@ -608,17 +608,12 @@ static __init void dm365_evm_init(void) | |||
608 | ARRAY_SIZE(dm365_evm_spi_info)); | 608 | ARRAY_SIZE(dm365_evm_spi_info)); |
609 | } | 609 | } |
610 | 610 | ||
611 | static __init void dm365_evm_irq_init(void) | ||
612 | { | ||
613 | davinci_irq_init(); | ||
614 | } | ||
615 | |||
616 | MACHINE_START(DAVINCI_DM365_EVM, "DaVinci DM365 EVM") | 611 | MACHINE_START(DAVINCI_DM365_EVM, "DaVinci DM365 EVM") |
617 | .phys_io = IO_PHYS, | 612 | .phys_io = IO_PHYS, |
618 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, | 613 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, |
619 | .boot_params = (0x80000100), | 614 | .boot_params = (0x80000100), |
620 | .map_io = dm365_evm_map_io, | 615 | .map_io = dm365_evm_map_io, |
621 | .init_irq = dm365_evm_irq_init, | 616 | .init_irq = davinci_irq_init, |
622 | .timer = &davinci_timer, | 617 | .timer = &davinci_timer, |
623 | .init_machine = dm365_evm_init, | 618 | .init_machine = dm365_evm_init, |
624 | MACHINE_END | 619 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 73c0b04a75ff..34c8b418cd72 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
@@ -704,18 +704,13 @@ static __init void davinci_evm_init(void) | |||
704 | 704 | ||
705 | } | 705 | } |
706 | 706 | ||
707 | static __init void davinci_evm_irq_init(void) | ||
708 | { | ||
709 | davinci_irq_init(); | ||
710 | } | ||
711 | |||
712 | MACHINE_START(DAVINCI_EVM, "DaVinci DM644x EVM") | 707 | MACHINE_START(DAVINCI_EVM, "DaVinci DM644x EVM") |
713 | /* Maintainer: MontaVista Software <source@mvista.com> */ | 708 | /* Maintainer: MontaVista Software <source@mvista.com> */ |
714 | .phys_io = IO_PHYS, | 709 | .phys_io = IO_PHYS, |
715 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, | 710 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, |
716 | .boot_params = (DAVINCI_DDR_BASE + 0x100), | 711 | .boot_params = (DAVINCI_DDR_BASE + 0x100), |
717 | .map_io = davinci_evm_map_io, | 712 | .map_io = davinci_evm_map_io, |
718 | .init_irq = davinci_evm_irq_init, | 713 | .init_irq = davinci_irq_init, |
719 | .timer = &davinci_timer, | 714 | .timer = &davinci_timer, |
720 | .init_machine = davinci_evm_init, | 715 | .init_machine = davinci_evm_init, |
721 | MACHINE_END | 716 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index e2ac06fac02a..6d8889342c9f 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c | |||
@@ -739,11 +739,6 @@ static __init void evm_init(void) | |||
739 | soc_info->emac_pdata->mdio_max_freq = DM646X_EVM_MDIO_FREQUENCY; | 739 | soc_info->emac_pdata->mdio_max_freq = DM646X_EVM_MDIO_FREQUENCY; |
740 | } | 740 | } |
741 | 741 | ||
742 | static __init void davinci_dm646x_evm_irq_init(void) | ||
743 | { | ||
744 | davinci_irq_init(); | ||
745 | } | ||
746 | |||
747 | #define DM646X_EVM_REF_FREQ 27000000 | 742 | #define DM646X_EVM_REF_FREQ 27000000 |
748 | #define DM6467T_EVM_REF_FREQ 33000000 | 743 | #define DM6467T_EVM_REF_FREQ 33000000 |
749 | 744 | ||
@@ -760,7 +755,7 @@ MACHINE_START(DAVINCI_DM6467_EVM, "DaVinci DM646x EVM") | |||
760 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, | 755 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, |
761 | .boot_params = (0x80000100), | 756 | .boot_params = (0x80000100), |
762 | .map_io = davinci_map_io, | 757 | .map_io = davinci_map_io, |
763 | .init_irq = davinci_dm646x_evm_irq_init, | 758 | .init_irq = davinci_irq_init, |
764 | .timer = &davinci_timer, | 759 | .timer = &davinci_timer, |
765 | .init_machine = evm_init, | 760 | .init_machine = evm_init, |
766 | MACHINE_END | 761 | MACHINE_END |
@@ -770,7 +765,7 @@ MACHINE_START(DAVINCI_DM6467TEVM, "DaVinci DM6467T EVM") | |||
770 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, | 765 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, |
771 | .boot_params = (0x80000100), | 766 | .boot_params = (0x80000100), |
772 | .map_io = davinci_map_io, | 767 | .map_io = davinci_map_io, |
773 | .init_irq = davinci_dm646x_evm_irq_init, | 768 | .init_irq = davinci_irq_init, |
774 | .timer = &davinci_timer, | 769 | .timer = &davinci_timer, |
775 | .init_machine = evm_init, | 770 | .init_machine = evm_init, |
776 | MACHINE_END | 771 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c index 875770cdea0a..4c30e929bbf9 100644 --- a/arch/arm/mach-davinci/board-neuros-osd2.c +++ b/arch/arm/mach-davinci/board-neuros-osd2.c | |||
@@ -273,18 +273,13 @@ static __init void davinci_ntosd2_init(void) | |||
273 | davinci_setup_mmc(0, &davinci_ntosd2_mmc_config); | 273 | davinci_setup_mmc(0, &davinci_ntosd2_mmc_config); |
274 | } | 274 | } |
275 | 275 | ||
276 | static __init void davinci_ntosd2_irq_init(void) | ||
277 | { | ||
278 | davinci_irq_init(); | ||
279 | } | ||
280 | |||
281 | MACHINE_START(NEUROS_OSD2, "Neuros OSD2") | 276 | MACHINE_START(NEUROS_OSD2, "Neuros OSD2") |
282 | /* Maintainer: Neuros Technologies <neuros@groups.google.com> */ | 277 | /* Maintainer: Neuros Technologies <neuros@groups.google.com> */ |
283 | .phys_io = IO_PHYS, | 278 | .phys_io = IO_PHYS, |
284 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, | 279 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, |
285 | .boot_params = (DAVINCI_DDR_BASE + 0x100), | 280 | .boot_params = (DAVINCI_DDR_BASE + 0x100), |
286 | .map_io = davinci_ntosd2_map_io, | 281 | .map_io = davinci_ntosd2_map_io, |
287 | .init_irq = davinci_ntosd2_irq_init, | 282 | .init_irq = davinci_irq_init, |
288 | .timer = &davinci_timer, | 283 | .timer = &davinci_timer, |
289 | .init_machine = davinci_ntosd2_init, | 284 | .init_machine = davinci_ntosd2_init, |
290 | MACHINE_END | 285 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-sffsdr.c b/arch/arm/mach-davinci/board-sffsdr.c index 1ed0662cc0e4..23e664a1a802 100644 --- a/arch/arm/mach-davinci/board-sffsdr.c +++ b/arch/arm/mach-davinci/board-sffsdr.c | |||
@@ -152,18 +152,13 @@ static __init void davinci_sffsdr_init(void) | |||
152 | davinci_cfg_reg(DM644X_VLYNQWD); | 152 | davinci_cfg_reg(DM644X_VLYNQWD); |
153 | } | 153 | } |
154 | 154 | ||
155 | static __init void davinci_sffsdr_irq_init(void) | ||
156 | { | ||
157 | davinci_irq_init(); | ||
158 | } | ||
159 | |||
160 | MACHINE_START(SFFSDR, "Lyrtech SFFSDR") | 155 | MACHINE_START(SFFSDR, "Lyrtech SFFSDR") |
161 | /* Maintainer: Hugo Villeneuve hugo.villeneuve@lyrtech.com */ | 156 | /* Maintainer: Hugo Villeneuve hugo.villeneuve@lyrtech.com */ |
162 | .phys_io = IO_PHYS, | 157 | .phys_io = IO_PHYS, |
163 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, | 158 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, |
164 | .boot_params = (DAVINCI_DDR_BASE + 0x100), | 159 | .boot_params = (DAVINCI_DDR_BASE + 0x100), |
165 | .map_io = davinci_sffsdr_map_io, | 160 | .map_io = davinci_sffsdr_map_io, |
166 | .init_irq = davinci_sffsdr_irq_init, | 161 | .init_irq = davinci_irq_init, |
167 | .timer = &davinci_timer, | 162 | .timer = &davinci_timer, |
168 | .init_machine = davinci_sffsdr_init, | 163 | .init_machine = davinci_sffsdr_init, |
169 | MACHINE_END | 164 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/common.c b/arch/arm/mach-davinci/common.c index 65e073df5bc9..1d2557394235 100644 --- a/arch/arm/mach-davinci/common.c +++ b/arch/arm/mach-davinci/common.c | |||
@@ -112,8 +112,6 @@ void __init davinci_common_init(struct davinci_soc_info *soc_info) | |||
112 | goto err; | 112 | goto err; |
113 | } | 113 | } |
114 | 114 | ||
115 | davinci_intc_base = davinci_soc_info.intc_base; | ||
116 | davinci_intc_type = davinci_soc_info.intc_type; | ||
117 | return; | 115 | return; |
118 | 116 | ||
119 | err: | 117 | err: |
diff --git a/arch/arm/mach-davinci/cp_intc.c b/arch/arm/mach-davinci/cp_intc.c index 2a8d26ee4bbf..bb4c40ecb803 100644 --- a/arch/arm/mach-davinci/cp_intc.c +++ b/arch/arm/mach-davinci/cp_intc.c | |||
@@ -13,18 +13,17 @@ | |||
13 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | 15 | ||
16 | #include <mach/common.h> | ||
16 | #include <mach/cp_intc.h> | 17 | #include <mach/cp_intc.h> |
17 | 18 | ||
18 | static void __iomem *cp_intc_base; | ||
19 | |||
20 | static inline unsigned int cp_intc_read(unsigned offset) | 19 | static inline unsigned int cp_intc_read(unsigned offset) |
21 | { | 20 | { |
22 | return __raw_readl(cp_intc_base + offset); | 21 | return __raw_readl(davinci_intc_base + offset); |
23 | } | 22 | } |
24 | 23 | ||
25 | static inline void cp_intc_write(unsigned long value, unsigned offset) | 24 | static inline void cp_intc_write(unsigned long value, unsigned offset) |
26 | { | 25 | { |
27 | __raw_writel(value, cp_intc_base + offset); | 26 | __raw_writel(value, davinci_intc_base + offset); |
28 | } | 27 | } |
29 | 28 | ||
30 | static void cp_intc_ack_irq(unsigned int irq) | 29 | static void cp_intc_ack_irq(unsigned int irq) |
@@ -100,13 +99,18 @@ static struct irq_chip cp_intc_irq_chip = { | |||
100 | .set_wake = cp_intc_set_wake, | 99 | .set_wake = cp_intc_set_wake, |
101 | }; | 100 | }; |
102 | 101 | ||
103 | void __init cp_intc_init(void __iomem *base, unsigned short num_irq, | 102 | void __init cp_intc_init(void) |
104 | u8 *irq_prio, u32 *host_map) | ||
105 | { | 103 | { |
104 | unsigned long num_irq = davinci_soc_info.intc_irq_num; | ||
105 | u8 *irq_prio = davinci_soc_info.intc_irq_prios; | ||
106 | u32 *host_map = davinci_soc_info.intc_host_map; | ||
106 | unsigned num_reg = BITS_TO_LONGS(num_irq); | 107 | unsigned num_reg = BITS_TO_LONGS(num_irq); |
107 | int i; | 108 | int i; |
108 | 109 | ||
109 | cp_intc_base = base; | 110 | davinci_intc_type = DAVINCI_INTC_TYPE_CP_INTC; |
111 | davinci_intc_base = ioremap(davinci_soc_info.intc_base, SZ_8K); | ||
112 | if (WARN_ON(!davinci_intc_base)) | ||
113 | return; | ||
110 | 114 | ||
111 | cp_intc_write(0, CP_INTC_GLOBAL_ENABLE); | 115 | cp_intc_write(0, CP_INTC_GLOBAL_ENABLE); |
112 | 116 | ||
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c index 47a7f490cf6a..2c84f0702088 100644 --- a/arch/arm/mach-davinci/da830.c +++ b/arch/arm/mach-davinci/da830.c | |||
@@ -1193,7 +1193,7 @@ static struct davinci_soc_info davinci_soc_info_da830 = { | |||
1193 | .psc_bases_num = ARRAY_SIZE(da830_psc_bases), | 1193 | .psc_bases_num = ARRAY_SIZE(da830_psc_bases), |
1194 | .pinmux_pins = da830_pins, | 1194 | .pinmux_pins = da830_pins, |
1195 | .pinmux_pins_num = ARRAY_SIZE(da830_pins), | 1195 | .pinmux_pins_num = ARRAY_SIZE(da830_pins), |
1196 | .intc_base = (void __iomem *)DA8XX_CP_INTC_VIRT, | 1196 | .intc_base = DA8XX_CP_INTC_BASE, |
1197 | .intc_type = DAVINCI_INTC_TYPE_CP_INTC, | 1197 | .intc_type = DAVINCI_INTC_TYPE_CP_INTC, |
1198 | .intc_irq_prios = da830_default_priorities, | 1198 | .intc_irq_prios = da830_default_priorities, |
1199 | .intc_irq_num = DA830_N_CP_INTC_IRQ, | 1199 | .intc_irq_num = DA830_N_CP_INTC_IRQ, |
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 2a430bbbd393..6f5ea2aa1c4a 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
@@ -1078,7 +1078,7 @@ static struct davinci_soc_info davinci_soc_info_da850 = { | |||
1078 | .psc_bases_num = ARRAY_SIZE(da850_psc_bases), | 1078 | .psc_bases_num = ARRAY_SIZE(da850_psc_bases), |
1079 | .pinmux_pins = da850_pins, | 1079 | .pinmux_pins = da850_pins, |
1080 | .pinmux_pins_num = ARRAY_SIZE(da850_pins), | 1080 | .pinmux_pins_num = ARRAY_SIZE(da850_pins), |
1081 | .intc_base = (void __iomem *)DA8XX_CP_INTC_VIRT, | 1081 | .intc_base = DA8XX_CP_INTC_BASE, |
1082 | .intc_type = DAVINCI_INTC_TYPE_CP_INTC, | 1082 | .intc_type = DAVINCI_INTC_TYPE_CP_INTC, |
1083 | .intc_irq_prios = da850_default_priorities, | 1083 | .intc_irq_prios = da850_default_priorities, |
1084 | .intc_irq_num = DA850_N_CP_INTC_IRQ, | 1084 | .intc_irq_num = DA850_N_CP_INTC_IRQ, |
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index 70a18275c5da..5ab39f6360f9 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c | |||
@@ -847,7 +847,7 @@ static struct davinci_soc_info davinci_soc_info_dm355 = { | |||
847 | .pinmux_base = IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE), | 847 | .pinmux_base = IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE), |
848 | .pinmux_pins = dm355_pins, | 848 | .pinmux_pins = dm355_pins, |
849 | .pinmux_pins_num = ARRAY_SIZE(dm355_pins), | 849 | .pinmux_pins_num = ARRAY_SIZE(dm355_pins), |
850 | .intc_base = IO_ADDRESS(DAVINCI_ARM_INTC_BASE), | 850 | .intc_base = DAVINCI_ARM_INTC_BASE, |
851 | .intc_type = DAVINCI_INTC_TYPE_AINTC, | 851 | .intc_type = DAVINCI_INTC_TYPE_AINTC, |
852 | .intc_irq_prios = dm355_default_priorities, | 852 | .intc_irq_prios = dm355_default_priorities, |
853 | .intc_irq_num = DAVINCI_N_AINTC_IRQ, | 853 | .intc_irq_num = DAVINCI_N_AINTC_IRQ, |
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index 451a4efb7ddf..be340ed1b707 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
@@ -1052,7 +1052,7 @@ static struct davinci_soc_info davinci_soc_info_dm365 = { | |||
1052 | .pinmux_base = IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE), | 1052 | .pinmux_base = IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE), |
1053 | .pinmux_pins = dm365_pins, | 1053 | .pinmux_pins = dm365_pins, |
1054 | .pinmux_pins_num = ARRAY_SIZE(dm365_pins), | 1054 | .pinmux_pins_num = ARRAY_SIZE(dm365_pins), |
1055 | .intc_base = IO_ADDRESS(DAVINCI_ARM_INTC_BASE), | 1055 | .intc_base = DAVINCI_ARM_INTC_BASE, |
1056 | .intc_type = DAVINCI_INTC_TYPE_AINTC, | 1056 | .intc_type = DAVINCI_INTC_TYPE_AINTC, |
1057 | .intc_irq_prios = dm365_default_priorities, | 1057 | .intc_irq_prios = dm365_default_priorities, |
1058 | .intc_irq_num = DAVINCI_N_AINTC_IRQ, | 1058 | .intc_irq_num = DAVINCI_N_AINTC_IRQ, |
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index ee654de38f34..d3aa1f7d0ab8 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
@@ -738,7 +738,7 @@ static struct davinci_soc_info davinci_soc_info_dm644x = { | |||
738 | .pinmux_base = IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE), | 738 | .pinmux_base = IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE), |
739 | .pinmux_pins = dm644x_pins, | 739 | .pinmux_pins = dm644x_pins, |
740 | .pinmux_pins_num = ARRAY_SIZE(dm644x_pins), | 740 | .pinmux_pins_num = ARRAY_SIZE(dm644x_pins), |
741 | .intc_base = IO_ADDRESS(DAVINCI_ARM_INTC_BASE), | 741 | .intc_base = DAVINCI_ARM_INTC_BASE, |
742 | .intc_type = DAVINCI_INTC_TYPE_AINTC, | 742 | .intc_type = DAVINCI_INTC_TYPE_AINTC, |
743 | .intc_irq_prios = dm644x_default_priorities, | 743 | .intc_irq_prios = dm644x_default_priorities, |
744 | .intc_irq_num = DAVINCI_N_AINTC_IRQ, | 744 | .intc_irq_num = DAVINCI_N_AINTC_IRQ, |
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index 4c98ef003c47..e0153b30f446 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c | |||
@@ -822,7 +822,7 @@ static struct davinci_soc_info davinci_soc_info_dm646x = { | |||
822 | .pinmux_base = IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE), | 822 | .pinmux_base = IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE), |
823 | .pinmux_pins = dm646x_pins, | 823 | .pinmux_pins = dm646x_pins, |
824 | .pinmux_pins_num = ARRAY_SIZE(dm646x_pins), | 824 | .pinmux_pins_num = ARRAY_SIZE(dm646x_pins), |
825 | .intc_base = IO_ADDRESS(DAVINCI_ARM_INTC_BASE), | 825 | .intc_base = DAVINCI_ARM_INTC_BASE, |
826 | .intc_type = DAVINCI_INTC_TYPE_AINTC, | 826 | .intc_type = DAVINCI_INTC_TYPE_AINTC, |
827 | .intc_irq_prios = dm646x_default_priorities, | 827 | .intc_irq_prios = dm646x_default_priorities, |
828 | .intc_irq_num = DAVINCI_N_AINTC_IRQ, | 828 | .intc_irq_num = DAVINCI_N_AINTC_IRQ, |
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h index 4c8dfcb4d930..005f6242e0ba 100644 --- a/arch/arm/mach-davinci/include/mach/common.h +++ b/arch/arm/mach-davinci/include/mach/common.h | |||
@@ -54,10 +54,11 @@ struct davinci_soc_info { | |||
54 | void __iomem *pinmux_base; | 54 | void __iomem *pinmux_base; |
55 | const struct mux_config *pinmux_pins; | 55 | const struct mux_config *pinmux_pins; |
56 | unsigned long pinmux_pins_num; | 56 | unsigned long pinmux_pins_num; |
57 | void __iomem *intc_base; | 57 | u32 intc_base; |
58 | int intc_type; | 58 | int intc_type; |
59 | u8 *intc_irq_prios; | 59 | u8 *intc_irq_prios; |
60 | unsigned long intc_irq_num; | 60 | unsigned long intc_irq_num; |
61 | u32 *intc_host_map; | ||
61 | struct davinci_timer_info *timer_info; | 62 | struct davinci_timer_info *timer_info; |
62 | int gpio_type; | 63 | int gpio_type; |
63 | u32 gpio_base; | 64 | u32 gpio_base; |
diff --git a/arch/arm/mach-davinci/include/mach/cp_intc.h b/arch/arm/mach-davinci/include/mach/cp_intc.h index 121b114df755..4e8190eed673 100644 --- a/arch/arm/mach-davinci/include/mach/cp_intc.h +++ b/arch/arm/mach-davinci/include/mach/cp_intc.h | |||
@@ -51,7 +51,6 @@ | |||
51 | #define CP_INTC_HOST_PRIO_VECTOR(n) (0x1600 + (n << 2)) | 51 | #define CP_INTC_HOST_PRIO_VECTOR(n) (0x1600 + (n << 2)) |
52 | #define CP_INTC_VECTOR_ADDR(n) (0x2000 + (n << 2)) | 52 | #define CP_INTC_VECTOR_ADDR(n) (0x2000 + (n << 2)) |
53 | 53 | ||
54 | void __init cp_intc_init(void __iomem *base, unsigned short num_irq, | 54 | void __init cp_intc_init(void); |
55 | u8 *irq_prio, u32 *host_map); | ||
56 | 55 | ||
57 | #endif /* __ASM_HARDWARE_CP_INTC_H */ | 56 | #endif /* __ASM_HARDWARE_CP_INTC_H */ |
diff --git a/arch/arm/mach-davinci/irq.c b/arch/arm/mach-davinci/irq.c index af92ffee8471..784ddf3c5ad4 100644 --- a/arch/arm/mach-davinci/irq.c +++ b/arch/arm/mach-davinci/irq.c | |||
@@ -116,6 +116,11 @@ void __init davinci_irq_init(void) | |||
116 | unsigned i; | 116 | unsigned i; |
117 | const u8 *davinci_def_priorities = davinci_soc_info.intc_irq_prios; | 117 | const u8 *davinci_def_priorities = davinci_soc_info.intc_irq_prios; |
118 | 118 | ||
119 | davinci_intc_type = DAVINCI_INTC_TYPE_AINTC; | ||
120 | davinci_intc_base = ioremap(davinci_soc_info.intc_base, SZ_4K); | ||
121 | if (WARN_ON(!davinci_intc_base)) | ||
122 | return; | ||
123 | |||
119 | /* Clear all interrupt requests */ | 124 | /* Clear all interrupt requests */ |
120 | davinci_irq_writel(~0x0, FIQ_REG0_OFFSET); | 125 | davinci_irq_writel(~0x0, FIQ_REG0_OFFSET); |
121 | davinci_irq_writel(~0x0, FIQ_REG1_OFFSET); | 126 | davinci_irq_writel(~0x0, FIQ_REG1_OFFSET); |
@@ -148,7 +153,7 @@ void __init davinci_irq_init(void) | |||
148 | } | 153 | } |
149 | 154 | ||
150 | /* set up genirq dispatch for ARM INTC */ | 155 | /* set up genirq dispatch for ARM INTC */ |
151 | for (i = 0; i < DAVINCI_N_AINTC_IRQ; i++) { | 156 | for (i = 0; i < davinci_soc_info.intc_irq_num; i++) { |
152 | set_irq_chip(i, &davinci_irq_chip_0); | 157 | set_irq_chip(i, &davinci_irq_chip_0); |
153 | set_irq_flags(i, IRQF_VALID | IRQF_PROBE); | 158 | set_irq_flags(i, IRQF_VALID | IRQF_PROBE); |
154 | if (i != IRQ_TINT1_TINT34) | 159 | if (i != IRQ_TINT1_TINT34) |