xref: /openbmc/linux/arch/arm/mach-nspire/nspire.c (revision 6279eb3d)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  *	linux/arch/arm/mach-nspire/nspire.c
4  *
5  *	Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
6  */
7 #include <linux/init.h>
8 #include <linux/of_irq.h>
9 #include <linux/of_address.h>
10 #include <linux/of_platform.h>
11 #include <linux/irqchip.h>
12 #include <linux/irqchip/arm-vic.h>
13 #include <linux/clkdev.h>
14 #include <linux/amba/bus.h>
15 
16 #include <asm/mach/arch.h>
17 #include <asm/mach-types.h>
18 #include <asm/mach/map.h>
19 
20 #include "mmio.h"
21 
22 static const char *const nspire_dt_match[] __initconst = {
23 	"ti,nspire",
24 	"ti,nspire-cx",
25 	"ti,nspire-tp",
26 	"ti,nspire-clp",
27 	NULL,
28 };
29 
30 static void nspire_restart(enum reboot_mode mode, const char *cmd)
31 {
32 	void __iomem *base = ioremap(NSPIRE_MISC_PHYS_BASE, SZ_4K);
33 	if (!base)
34 		return;
35 
36 	writel(2, base + NSPIRE_MISC_HWRESET);
37 }
38 
39 DT_MACHINE_START(NSPIRE, "TI-NSPIRE")
40 	.dt_compat	= nspire_dt_match,
41 	.restart	= nspire_restart,
42 MACHINE_END
43