blob: 2d4abb0288b9d3af7036c59f6c1d01b858dbd660 [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001// SPDX-License-Identifier: GPL-2.0-only
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 * linux/arch/arm/mach-nspire/nspire.c
4 *
5 * Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00006 */
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>
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000015
16#include <asm/mach/arch.h>
17#include <asm/mach-types.h>
18#include <asm/mach/map.h>
19
20#include "mmio.h"
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000021
22static 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
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000030static 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
39DT_MACHINE_START(NSPIRE, "TI-NSPIRE")
40 .dt_compat = nspire_dt_match,
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000041 .restart = nspire_restart,
42MACHINE_END