aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-picoxcell/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-picoxcell/common.c')
-rw-r--r--arch/arm/mach-picoxcell/common.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/arch/arm/mach-picoxcell/common.c b/arch/arm/mach-picoxcell/common.c
index 34d08347be5f..febee47bc116 100644
--- a/arch/arm/mach-picoxcell/common.c
+++ b/arch/arm/mach-picoxcell/common.c
@@ -11,16 +11,30 @@
11#include <linux/irqdomain.h> 11#include <linux/irqdomain.h>
12#include <linux/of.h> 12#include <linux/of.h>
13#include <linux/of_address.h> 13#include <linux/of_address.h>
14#include <linux/of_irq.h>
14#include <linux/of_platform.h> 15#include <linux/of_platform.h>
15 16
16#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
17#include <asm/hardware/vic.h> 18#include <asm/hardware/vic.h>
19#include <asm/mach/map.h>
18 20
19#include <mach/map.h> 21#include <mach/map.h>
20#include <mach/picoxcell_soc.h> 22#include <mach/picoxcell_soc.h>
21 23
22#include "common.h" 24#include "common.h"
23 25
26static struct map_desc io_map __initdata = {
27 .virtual = PHYS_TO_IO(PICOXCELL_PERIPH_BASE),
28 .pfn = __phys_to_pfn(PICOXCELL_PERIPH_BASE),
29 .length = PICOXCELL_PERIPH_LENGTH,
30 .type = MT_DEVICE,
31};
32
33static void __init picoxcell_map_io(void)
34{
35 iotable_init(&io_map, 1);
36}
37
24static void __init picoxcell_init_machine(void) 38static void __init picoxcell_init_machine(void)
25{ 39{
26 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 40 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
@@ -33,22 +47,20 @@ static const char *picoxcell_dt_match[] = {
33}; 47};
34 48
35static const struct of_device_id vic_of_match[] __initconst = { 49static const struct of_device_id vic_of_match[] __initconst = {
36 { .compatible = "arm,pl192-vic" }, 50 { .compatible = "arm,pl192-vic", .data = vic_of_init, },
37 { /* Sentinel */ } 51 { /* Sentinel */ }
38}; 52};
39 53
40static void __init picoxcell_init_irq(void) 54static void __init picoxcell_init_irq(void)
41{ 55{
42 vic_init(IO_ADDRESS(PICOXCELL_VIC0_BASE), 0, ~0, 0); 56 of_irq_init(vic_of_match);
43 vic_init(IO_ADDRESS(PICOXCELL_VIC1_BASE), 32, ~0, 0);
44 irq_domain_generate_simple(vic_of_match, PICOXCELL_VIC0_BASE, 0);
45 irq_domain_generate_simple(vic_of_match, PICOXCELL_VIC1_BASE, 32);
46} 57}
47 58
48DT_MACHINE_START(PICOXCELL, "Picochip picoXcell") 59DT_MACHINE_START(PICOXCELL, "Picochip picoXcell")
49 .map_io = picoxcell_map_io, 60 .map_io = picoxcell_map_io,
50 .nr_irqs = ARCH_NR_IRQS, 61 .nr_irqs = NR_IRQS_LEGACY,
51 .init_irq = picoxcell_init_irq, 62 .init_irq = picoxcell_init_irq,
63 .handle_irq = vic_handle_irq,
52 .timer = &picoxcell_timer, 64 .timer = &picoxcell_timer,
53 .init_machine = picoxcell_init_machine, 65 .init_machine = picoxcell_init_machine,
54 .dt_compat = picoxcell_dt_match, 66 .dt_compat = picoxcell_dt_match,