Merge branch 'for-linus-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
[deliverable/linux.git] / arch / arm / mach-nspire / nspire.c
CommitLineData
9851ca57
DT
1/*
2 * linux/arch/arm/mach-nspire/nspire.c
3 *
4 * Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2, as
8 * published by the Free Software Foundation.
9 *
10 */
11#include <linux/init.h>
12#include <linux/of_irq.h>
13#include <linux/of_address.h>
14#include <linux/of_platform.h>
15#include <linux/irqchip.h>
16#include <linux/irqchip/arm-vic.h>
9851ca57
DT
17#include <linux/clkdev.h>
18#include <linux/amba/bus.h>
19#include <linux/amba/clcd.h>
9851ca57
DT
20
21#include <asm/mach/arch.h>
22#include <asm/mach-types.h>
23#include <asm/mach/map.h>
24
9851ca57
DT
25#include "mmio.h"
26#include "clcd.h"
27
543c5040 28static const char *const nspire_dt_match[] __initconst = {
9851ca57
DT
29 "ti,nspire",
30 "ti,nspire-cx",
31 "ti,nspire-tp",
32 "ti,nspire-clp",
33 NULL,
34};
35
36static void __init nspire_map_io(void)
37{
38 debug_ll_io_init();
39}
40
41static struct clcd_board nspire_clcd_data = {
42 .name = "LCD",
43 .caps = CLCD_CAP_5551 | CLCD_CAP_565,
44 .check = clcdfb_check,
45 .decode = clcdfb_decode,
46 .setup = nspire_clcd_setup,
47 .mmap = nspire_clcd_mmap,
48 .remove = nspire_clcd_remove,
49};
50
51
52static struct of_dev_auxdata nspire_auxdata[] __initdata = {
53 OF_DEV_AUXDATA("arm,pl111", NSPIRE_LCD_PHYS_BASE,
54 NULL, &nspire_clcd_data),
55 { }
56};
57
58static void __init nspire_init(void)
59{
435ebcbc 60 of_platform_default_populate(NULL, nspire_auxdata, NULL);
9851ca57
DT
61}
62
27addb96 63static void nspire_restart(enum reboot_mode mode, const char *cmd)
9851ca57
DT
64{
65 void __iomem *base = ioremap(NSPIRE_MISC_PHYS_BASE, SZ_4K);
66 if (!base)
67 return;
68
69 writel(2, base + NSPIRE_MISC_HWRESET);
70}
71
72DT_MACHINE_START(NSPIRE, "TI-NSPIRE")
73 .dt_compat = nspire_dt_match,
74 .map_io = nspire_map_io,
9851ca57
DT
75 .init_machine = nspire_init,
76 .restart = nspire_restart,
77MACHINE_END
This page took 0.142719 seconds and 5 git commands to generate.