blob: d34b3335801e5d9302b37c561b139a3eef780217 [file] [log] [blame]
Jamie Ilesaf756552011-07-25 17:36:42 +01001/*
2 * Copyright (c) 2011 Picochip Ltd., Jamie Iles
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * All enquiries to support@picochip.com
9 */
10#include <linux/irq.h>
11#include <linux/irqdomain.h>
12#include <linux/of.h>
13#include <linux/of_address.h>
Jamie Ilesc05012c2011-11-03 17:29:03 +000014#include <linux/of_irq.h>
Jamie Ilesaf756552011-07-25 17:36:42 +010015#include <linux/of_platform.h>
16
17#include <asm/mach/arch.h>
18#include <asm/hardware/vic.h>
19
20#include <mach/map.h>
21#include <mach/picoxcell_soc.h>
22
23#include "common.h"
24
25static void __init picoxcell_init_machine(void)
26{
27 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
28}
29
30static const char *picoxcell_dt_match[] = {
31 "picochip,pc3x2",
32 "picochip,pc3x3",
33 NULL
34};
35
36static const struct of_device_id vic_of_match[] __initconst = {
Jamie Ilesc05012c2011-11-03 17:29:03 +000037 { .compatible = "arm,pl192-vic", .data = vic_of_init, },
Jamie Ilesaf756552011-07-25 17:36:42 +010038 { /* Sentinel */ }
39};
40
41static void __init picoxcell_init_irq(void)
42{
Jamie Ilesc05012c2011-11-03 17:29:03 +000043 of_irq_init(vic_of_match);
Jamie Ilesaf756552011-07-25 17:36:42 +010044}
45
46DT_MACHINE_START(PICOXCELL, "Picochip picoXcell")
47 .map_io = picoxcell_map_io,
Jamie Iles98e27a52011-12-12 20:17:37 +000048 .nr_irqs = NR_IRQS_LEGACY,
Jamie Ilesaf756552011-07-25 17:36:42 +010049 .init_irq = picoxcell_init_irq,
Jamie Ilesc05012c2011-11-03 17:29:03 +000050 .handle_irq = vic_handle_irq,
Jamie Ilesaf756552011-07-25 17:36:42 +010051 .timer = &picoxcell_timer,
52 .init_machine = picoxcell_init_machine,
53 .dt_compat = picoxcell_dt_match,
54MACHINE_END