diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-11-02 02:46:17 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-11-02 02:46:17 +0100 |
commit | b8df0ea26ac17c9a073f235c7fdfbdd1851b59ea (patch) | |
tree | 5e57a2fdc5fa05155d7d8214ad054b16f6b1c3d8 /arch/arm/mach-picoxcell/common.c | |
parent | 884897e6a10a86de0e611a76f4bf3fd0068a672c (diff) | |
parent | 76780127914d5dc69a458eda5e471e65a5fd3dc9 (diff) |
Merge branch 'picoxcell/soc' into next/soc
Diffstat (limited to 'arch/arm/mach-picoxcell/common.c')
-rw-r--r-- | arch/arm/mach-picoxcell/common.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/arch/arm/mach-picoxcell/common.c b/arch/arm/mach-picoxcell/common.c new file mode 100644 index 00000000000..34d08347be5 --- /dev/null +++ b/arch/arm/mach-picoxcell/common.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2011 Picochip Ltd., Jamie Iles + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * All enquiries to support@picochip.com + */ +#include <linux/irq.h> +#include <linux/irqdomain.h> +#include <linux/of.h> +#include <linux/of_address.h> +#include <linux/of_platform.h> + +#include <asm/mach/arch.h> +#include <asm/hardware/vic.h> + +#include <mach/map.h> +#include <mach/picoxcell_soc.h> + +#include "common.h" + +static void __init picoxcell_init_machine(void) +{ + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); +} + +static const char *picoxcell_dt_match[] = { + "picochip,pc3x2", + "picochip,pc3x3", + NULL +}; + +static const struct of_device_id vic_of_match[] __initconst = { + { .compatible = "arm,pl192-vic" }, + { /* Sentinel */ } +}; + +static void __init picoxcell_init_irq(void) +{ + vic_init(IO_ADDRESS(PICOXCELL_VIC0_BASE), 0, ~0, 0); + vic_init(IO_ADDRESS(PICOXCELL_VIC1_BASE), 32, ~0, 0); + irq_domain_generate_simple(vic_of_match, PICOXCELL_VIC0_BASE, 0); + irq_domain_generate_simple(vic_of_match, PICOXCELL_VIC1_BASE, 32); +} + +DT_MACHINE_START(PICOXCELL, "Picochip picoXcell") + .map_io = picoxcell_map_io, + .nr_irqs = ARCH_NR_IRQS, + .init_irq = picoxcell_init_irq, + .timer = &picoxcell_timer, + .init_machine = picoxcell_init_machine, + .dt_compat = picoxcell_dt_match, +MACHINE_END |