2 * Copyright (C) ST-Ericsson SA 2010
4 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
5 * Author: Lee Jones <lee.jones@linaro.org> for ST-Ericsson
6 * License terms: GNU General Public License (GPL) version 2
9 #include <linux/platform_device.h>
11 #include <linux/mfd/dbx500-prcmu.h>
12 #include <linux/sys_soc.h>
13 #include <linux/err.h>
14 #include <linux/slab.h>
15 #include <linux/stat.h>
17 #include <linux/of_irq.h>
18 #include <linux/of_address.h>
19 #include <linux/irq.h>
20 #include <linux/irqchip.h>
21 #include <linux/irqchip/arm-gic.h>
22 #include <linux/platform_data/arm-ux500-pm.h>
24 #include <asm/mach/map.h>
28 #include "board-mop500.h"
29 #include "db8500-regs.h"
31 void ux500_restart(enum reboot_mode mode
, const char *cmd
)
36 prcmu_system_reset(0);
40 * FIXME: Should we set up the GPIO domain here?
42 * The problem is that we cannot put the interrupt resources into the platform
43 * device until the irqdomain has been added. Right now, we set the GIC interrupt
44 * domain from init_irq(), then load the gpio driver from
45 * core_initcall(nmk_gpio_init) and add the platform devices from
46 * arch_initcall(customize_machine).
48 * This feels fragile because it depends on the gpio device getting probed
49 * _before_ any device uses the gpio interrupts.
51 void __init
ux500_init_irq(void)
53 struct device_node
*np
;
57 np
= of_find_compatible_node(NULL
, NULL
, "stericsson,db8500-prcmu");
58 of_address_to_resource(np
, 0, &r
);
61 pr_err("could not find PRCMU base resource\n");
64 prcmu_early_init(r
.start
, r
.end
-r
.start
);
65 ux500_pm_init(r
.start
, r
.end
-r
.start
);