2019-06-04 15:11:33 +07:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
2013-06-11 15:40:17 +07:00
|
|
|
/*
|
|
|
|
* linux/arch/arm/mach-nspire/nspire.c
|
|
|
|
*
|
|
|
|
* Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
|
|
|
|
*/
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/of_irq.h>
|
|
|
|
#include <linux/of_address.h>
|
|
|
|
#include <linux/of_platform.h>
|
|
|
|
#include <linux/irqchip.h>
|
|
|
|
#include <linux/irqchip/arm-vic.h>
|
|
|
|
#include <linux/clkdev.h>
|
|
|
|
#include <linux/amba/bus.h>
|
|
|
|
|
|
|
|
#include <asm/mach/arch.h>
|
|
|
|
#include <asm/mach-types.h>
|
|
|
|
#include <asm/mach/map.h>
|
|
|
|
|
|
|
|
#include "mmio.h"
|
|
|
|
|
2015-02-19 03:01:45 +07:00
|
|
|
static const char *const nspire_dt_match[] __initconst = {
|
2013-06-11 15:40:17 +07:00
|
|
|
"ti,nspire",
|
|
|
|
"ti,nspire-cx",
|
|
|
|
"ti,nspire-tp",
|
|
|
|
"ti,nspire-clp",
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2014-03-21 01:25:11 +07:00
|
|
|
static void nspire_restart(enum reboot_mode mode, const char *cmd)
|
2013-06-11 15:40:17 +07:00
|
|
|
{
|
|
|
|
void __iomem *base = ioremap(NSPIRE_MISC_PHYS_BASE, SZ_4K);
|
|
|
|
if (!base)
|
|
|
|
return;
|
|
|
|
|
|
|
|
writel(2, base + NSPIRE_MISC_HWRESET);
|
|
|
|
}
|
|
|
|
|
|
|
|
DT_MACHINE_START(NSPIRE, "TI-NSPIRE")
|
|
|
|
.dt_compat = nspire_dt_match,
|
|
|
|
.restart = nspire_restart,
|
|
|
|
MACHINE_END
|