mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
ARM: hi3xxx: add board support with device tree
Add board support with device tree for Hisilicon Hi3620 SoC platform. Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> [khilman: fix checkpatch errors] [khilman: fold in patch which selects GPIO in Kconfig] Signed-off-by: Kevin Hilman <khilman@linaro.org>
This commit is contained in:
parent
6ce4eac1f6
commit
2c7268c70f
6 changed files with 87 additions and 0 deletions
|
@ -0,0 +1,6 @@
|
||||||
|
Hisilicon Platforms Device Tree Bindings
|
||||||
|
----------------------------------------------------
|
||||||
|
|
||||||
|
Hi4511 Board
|
||||||
|
Required root node properties:
|
||||||
|
- compatible = "hisilicon,hi3620-hi4511";
|
|
@ -925,6 +925,8 @@ source "arch/arm/mach-footbridge/Kconfig"
|
||||||
|
|
||||||
source "arch/arm/mach-gemini/Kconfig"
|
source "arch/arm/mach-gemini/Kconfig"
|
||||||
|
|
||||||
|
source "arch/arm/mach-hi3xxx/Kconfig"
|
||||||
|
|
||||||
source "arch/arm/mach-highbank/Kconfig"
|
source "arch/arm/mach-highbank/Kconfig"
|
||||||
|
|
||||||
source "arch/arm/mach-integrator/Kconfig"
|
source "arch/arm/mach-integrator/Kconfig"
|
||||||
|
|
|
@ -156,6 +156,7 @@ machine-$(CONFIG_ARCH_EBSA110) += ebsa110
|
||||||
machine-$(CONFIG_ARCH_EP93XX) += ep93xx
|
machine-$(CONFIG_ARCH_EP93XX) += ep93xx
|
||||||
machine-$(CONFIG_ARCH_EXYNOS) += exynos
|
machine-$(CONFIG_ARCH_EXYNOS) += exynos
|
||||||
machine-$(CONFIG_ARCH_GEMINI) += gemini
|
machine-$(CONFIG_ARCH_GEMINI) += gemini
|
||||||
|
machine-$(CONFIG_ARCH_HI3xxx) += hi3xxx
|
||||||
machine-$(CONFIG_ARCH_HIGHBANK) += highbank
|
machine-$(CONFIG_ARCH_HIGHBANK) += highbank
|
||||||
machine-$(CONFIG_ARCH_INTEGRATOR) += integrator
|
machine-$(CONFIG_ARCH_INTEGRATOR) += integrator
|
||||||
machine-$(CONFIG_ARCH_IOP13XX) += iop13xx
|
machine-$(CONFIG_ARCH_IOP13XX) += iop13xx
|
||||||
|
|
13
arch/arm/mach-hi3xxx/Kconfig
Normal file
13
arch/arm/mach-hi3xxx/Kconfig
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
config ARCH_HI3xxx
|
||||||
|
bool "Hisilicon Hi36xx/Hi37xx family" if ARCH_MULTI_V7
|
||||||
|
select ARM_AMBA
|
||||||
|
select ARM_GIC
|
||||||
|
select ARM_TIMER_SP804
|
||||||
|
select ARCH_WANT_OPTIONAL_GPIOLIB
|
||||||
|
select CACHE_L2X0
|
||||||
|
select CLKSRC_OF
|
||||||
|
select GENERIC_CLOCKEVENTS
|
||||||
|
select PINCTRL
|
||||||
|
select PINCTRL_SINGLE
|
||||||
|
help
|
||||||
|
Support for Hisilicon Hi36xx/Hi37xx processor family
|
5
arch/arm/mach-hi3xxx/Makefile
Normal file
5
arch/arm/mach-hi3xxx/Makefile
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#
|
||||||
|
# Makefile for Hisilicon Hi36xx/Hi37xx processors line
|
||||||
|
#
|
||||||
|
|
||||||
|
obj-y += hi3xxx.o
|
60
arch/arm/mach-hi3xxx/hi3xxx.c
Normal file
60
arch/arm/mach-hi3xxx/hi3xxx.c
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
5/*
|
||||||
|
* (Hisilicon's Hi36xx/Hi37xx SoC based) flattened device tree enabled machine
|
||||||
|
*
|
||||||
|
* Copyright (c) 2012-2013 Hisilicon Ltd.
|
||||||
|
* Copyright (c) 2012-2013 Linaro Ltd.
|
||||||
|
*
|
||||||
|
* Author: Haojian Zhuang <haojian.zhuang@linaro.org>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/clk-provider.h>
|
||||||
|
#include <linux/clocksource.h>
|
||||||
|
#include <linux/irqchip.h>
|
||||||
|
#include <linux/of_platform.h>
|
||||||
|
|
||||||
|
#include <asm/mach/arch.h>
|
||||||
|
#include <asm/mach/map.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This table is only for optimization. Since ioremap() could always share
|
||||||
|
* the same mapping if it's defined as static IO mapping.
|
||||||
|
*
|
||||||
|
* Without this table, system could also work. The cost is some virtual address
|
||||||
|
* spaces wasted since ioremap() may be called multi times for the same
|
||||||
|
* IO space.
|
||||||
|
*/
|
||||||
|
static struct map_desc hi3620_io_desc[] __initdata = {
|
||||||
|
{
|
||||||
|
.pfn = __phys_to_pfn(0xfc802000),
|
||||||
|
.virtual = 0xfe802000,
|
||||||
|
.length = 0x1000,
|
||||||
|
.type = MT_DEVICE,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static void __init hi3620_map_io(void)
|
||||||
|
{
|
||||||
|
debug_ll_io_init();
|
||||||
|
iotable_init(hi3620_io_desc, ARRAY_SIZE(hi3620_io_desc));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __init hi3xxx_timer_init(void)
|
||||||
|
{
|
||||||
|
of_clk_init(NULL);
|
||||||
|
clocksource_of_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
static const char *hi3xxx_compat[] __initconst = {
|
||||||
|
"hisilicon,hi3620-hi4511",
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
DT_MACHINE_START(HI3620, "Hisilicon Hi3620 (Flattened Device Tree)")
|
||||||
|
.map_io = hi3620_map_io,
|
||||||
|
.init_time = hi3xxx_timer_init,
|
||||||
|
.dt_compat = hi3xxx_compat,
|
||||||
|
MACHINE_END
|
Loading…
Reference in a new issue