ARM: S5PV210: Add Samsung S5PV210 CPU support
Subsystems (3)
PATCH v5 1/8 ARM: S5PV210: Add Samsung S5PV210 CPU support
This patch adds support for Samsung S5PV210 CPU. This patch also adds an entry for S5PV210 cpu in plat-s5p cpu table.
Signed-off-by Thomas Abraham <[email protected]>
Signed-off-by Kukjin Kim <[email protected]>
--- arch/arm/mach-s5pv210/Kconfig | 40 +++++++ arch/arm/mach-s5pv210/Makefile | 18 +++ arch/arm/mach-s5pv210/Makefile.boot | 2 + arch/arm/mach-s5pv210/cpu.c | 126 +++++++++++++++++++++ arch/arm/mach-s5pv210/include/mach/debug-macro.S | 42 +++++++ arch/arm/mach-s5pv210/include/mach/entry-macro.S | 54 +++++++++ arch/arm/mach-s5pv210/include/mach/gpio.h | 129 ++++++++++++++++++++++ arch/arm/mach-s5pv210/include/mach/hardware.h | 18 +++ arch/arm/mach-s5pv210/include/mach/io.h | 26 +++++ arch/arm/mach-s5pv210/include/mach/map.h | 65 +++++++++++ arch/arm/mach-s5pv210/include/mach/memory.h | 23 ++++ arch/arm/mach-s5pv210/include/mach/system.h | 26 +++++ arch/arm/mach-s5pv210/include/mach/timex.h | 29 +++++ arch/arm/mach-s5pv210/include/mach/uncompress.h | 24 ++++ arch/arm/mach-s5pv210/include/mach/vmalloc.h | 22 ++++ arch/arm/mach-s5pv210/init.c | 44 ++++++++ arch/arm/plat-s5p/cpu.c | 10 ++ arch/arm/plat-s5p/include/plat/map-s5p.h | 1 + arch/arm/plat-s5p/include/plat/s5pv210.h | 33 ++++++ 19 files changed, 732 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s5pv210/Kconfig create mode 100644 arch/arm/mach-s5pv210/Makefile create mode 100644 arch/arm/mach-s5pv210/Makefile.boot create mode 100644 arch/arm/mach-s5pv210/cpu.c create mode 100644 arch/arm/mach-s5pv210/include/mach/debug-macro.S create mode 100644 arch/arm/mach-s5pv210/include/mach/entry-macro.S create mode 100644 arch/arm/mach-s5pv210/include/mach/gpio.h create mode 100644 arch/arm/mach-s5pv210/include/mach/hardware.h create mode 100644 arch/arm/mach-s5pv210/include/mach/io.h create mode 100644 arch/arm/mach-s5pv210/include/mach/map.h create mode 100644 arch/arm/mach-s5pv210/include/mach/memory.h create mode 100644 arch/arm/mach-s5pv210/include/mach/system.h create mode 100644 arch/arm/mach-s5pv210/include/mach/timex.h create mode 100644 arch/arm/mach-s5pv210/include/mach/uncompress.h create mode 100644 arch/arm/mach-s5pv210/include/mach/vmalloc.h create mode 100644 arch/arm/mach-s5pv210/init.c create mode 100644 arch/arm/plat-s5p/include/plat/s5pv210.h
arch/arm/mach-s5pv210/Kconfig new file +40 -0
@@ -0,0 +1,40 @@ +# arch/arm/mach-s5pv210/Kconfig +# +# Copyright (c) 2010 Samsung Electronics Co., Ltd. +# http://www.samsung.com/ +# +# Licensed under GPLv2 + +# Configuration options for the S5PV210/S5PC110 + +if ARCH_S5PV210 + +config CPU_S5PV210 + bool + select PLAT_S5P + help + Enable S5PV210 CPU support + +choice + prompt "Select machine type" + depends on ARCH_S5PV210 + default MACH_SMDKV210 + +config MACH_SMDKV210 + bool "SMDKV210" + select CPU_S5PV210 + select ARCH_SPARSEMEM_ENABLE + help + Machine support for Samsung SMDKV210 + +config MACH_SMDKC110 + bool "SMDKC110" + select CPU_S5PV210 + select ARCH_SPARSEMEM_ENABLE + help + Machine support for Samsung SMDKC110 + S5PC110(MCP) is one of package option of S5PV210 + +endchoice + +endif
arch/arm/mach-s5pv210/Makefile new file +18 -0
@@ -0,0 +1,18 @@ +# arch/arm/mach-s5pv210/Makefile +# +# Copyright (c) 2010 Samsung Electronics Co., Ltd. +# http://www.samsung.com/ +# +# Licensed under GPLv2 + +obj-y := +obj-m := +obj-n := +obj- := + +# Core support for S5PV210 system + +obj-$(CONFIG_CPU_S5PV210) += cpu.o init.o + +# machine support +
arch/arm/mach-s5pv210/Makefile.boot new file +2 -0
@@ -0,0 +1,2 @@ + zreladdr-y := 0x20008000 +params_phys-y := 0x20000100
arch/arm/mach-s5pv210/cpu.c new file +126 -0
126 lines not on this page · raw message
arch/arm/mach-s5pv210/include/mach/debug-macro.S new file +42 -0
42 lines not on this page · raw message
arch/arm/mach-s5pv210/include/mach/entry-macro.S new file +54 -0
54 lines not on this page · raw message
arch/arm/mach-s5pv210/include/mach/gpio.h new file +129 -0
129 lines not on this page · raw message
arch/arm/mach-s5pv210/include/mach/hardware.h new file +18 -0
@@ -0,0 +1,18 @@ +/* linux/arch/arm/mach-s5pv210/include/mach/hardware.h +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* http://www.samsung.com/ +* +* S5PV210 - Hardware support +* +* 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. +*/ + +#ifndef __ASM_ARCH_HARDWARE_H +#define __ASM_ARCH_HARDWARE_H __FILE__ + +/* currently nothing here, placeholder */ + +#endif /* __ASM_ARCH_HARDWARE_H */
arch/arm/mach-s5pv210/include/mach/io.h new file +26 -0
@@ -0,0 +1,26 @@ +/* linux/arch/arm/mach-s5pv210/include/mach/io.h +* +* Copyright 2008-2010 Ben Dooks <[email protected]> +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* http://www.samsung.com/ +* +* Based on arch/arm/mach-s5p6442/include/mach/io.h +* +* Default IO routines for S5PV210 +* +* 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. +*/ + +#ifndef __ASM_ARM_ARCH_IO_H +#define __ASM_ARM_ARCH_IO_H __FILE__ + +/* No current ISA/PCI bus support. */ +#define __io (a) __typesafe_io(a) +#define __mem_pci (a) (a) + +#define IO_SPACE_LIMIT (0xFFFFFFFF) + +#endif /* __ASM_ARM_ARCH_IO_H */
arch/arm/mach-s5pv210/include/mach/map.h new file +65 -0
65 lines not on this page · raw message
arch/arm/mach-s5pv210/include/mach/memory.h new file +23 -0
@@ -0,0 +1,23 @@ +/* linux/arch/arm/mach-s5pv210/include/mach/memory.h +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* http://www.samsung.com/ +* +* S5PV210 - Memory definitions +* +* 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. +*/ + +#ifndef __ASM_ARCH_MEMORY_H +#define __ASM_ARCH_MEMORY_H + +#define PHYS_OFFSET UL(0x20000000) +#define CONSISTENT_DMA_SIZE (SZ_8M + SZ_4M + SZ_2M) + +/* Maximum of 256MiB in one bank */ +#define MAX_PHYSMEM_BITS 32 +#define SECTION_SIZE_BITS 28 + +#endif /* __ASM_ARCH_MEMORY_H */
arch/arm/mach-s5pv210/include/mach/system.h new file +26 -0
@@ -0,0 +1,26 @@ +/* linux/arch/arm/mach-s5pv210/include/mach/system.h +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* http://www.samsung.com/ +* +* S5PV210 - system support header +* +* 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. +*/ + +#ifndef __ASM_ARCH_SYSTEM_H +#define __ASM_ARCH_SYSTEM_H __FILE__ + +static void arch_idle (void ) +{ +/* nothing here yet */ +} + +static void arch_reset (char mode,const char *cmd) +{ +/* nothing here yet */ +} + +#endif /* __ASM_ARCH_SYSTEM_H */
arch/arm/mach-s5pv210/include/mach/timex.h new file +29 -0
@@ -0,0 +1,29 @@ +/* linux/arch/arm/mach-s5pv210/include/mach/timex.h +* +* Copyright (c) 2003-2010 Simtec Electronics +* Ben Dooks <[email protected]> +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* http://www.samsung.com/ +* +* Based on arch/arm/mach-s5p6442/include/mach/timex.h +* +* S5PV210 - time parameters +* +* 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. +*/ + +#ifndef __ASM_ARCH_TIMEX_H +#define __ASM_ARCH_TIMEX_H __FILE__ + +/* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it +* a variable is useless. It seems as long as we make our timers an +* exact multiple of HZ, any value that makes a 1->1 correspondence +* for the time conversion functions to/from jiffies is acceptable. +*/ + +#define CLOCK_TICK_RATE 12000000 + +#endif /* __ASM_ARCH_TIMEX_H */
arch/arm/mach-s5pv210/include/mach/uncompress.h new file +24 -0
@@ -0,0 +1,24 @@ +/* linux/arch/arm/mach-s5pv210/include/mach/uncompress.h +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* http://www.samsung.com/ +* +* S5PV210 - uncompress code +* +* 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. +*/ + +#ifndef __ASM_ARCH_UNCOMPRESS_H +#define __ASM_ARCH_UNCOMPRESS_H + +#include <mach/map.h> +#include <plat/uncompress.h> + +static void arch_detect_cpu (void ) +{ +/* we do not need to do any cpu detection here at the moment. */ +} + +#endif /* __ASM_ARCH_UNCOMPRESS_H */
arch/arm/mach-s5pv210/include/mach/vmalloc.h new file +22 -0
@@ -0,0 +1,22 @@ +/* linux/arch/arm/mach-s5p6442/include/mach/vmalloc.h +* +* Copyright 2010 Ben Dooks <[email protected]> +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* http://www.samsung.com/ +* +* Based on arch/arm/mach-s5p6442/include/mach/vmalloc.h +* +* S5PV210 vmalloc definition +* +* 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. +*/ + +#ifndef __ASM_ARCH_VMALLOC_H +#define __ASM_ARCH_VMALLOC_H __FILE__ + +#define VMALLOC_END (0xE0000000) + +#endif /* __ASM_ARCH_VMALLOC_H */
arch/arm/mach-s5pv210/init.c new file +44 -0
44 lines not on this page · raw message
arch/arm/plat-s5p/cpu.c +10 -0
@@ -19,11 +19,13 @@#include <plat/cpu.h> #include <plat/s5p6440.h> #include <plat/s5p6442.h> +#include <plat/s5pv210.h> /* table of supported CPUs */ static const char name_s5p6440[] ="S5P6440" ;static const char name_s5p6442[] ="S5P6442" ; +static const char name_s5pv210[] ="S5PV210/S5PC110" ;static struct cpu_table cpu_ids[]__initdata = { {
@@ -42,6 +44,14 @@ static struct cpu_table cpu_ids[] __initdata = { .init_uarts = s5p6442_init_uarts, .init = s5p6442_init, .name = name_s5p6442, + }, { + .idcode = 0x43110000, + .idmask = 0xfffff000, + .map_io = s5pv210_map_io, + .init_clocks = s5pv210_init_clocks, + .init_uarts = s5pv210_init_uarts, + .init = s5pv210_init, + .name = name_s5pv210, }, };
arch/arm/plat-s5p/include/plat/map-s5p.h +1 -0
@@ -29,5 +29,6 @@#define VA_VIC0 VA_VIC(0)#define VA_VIC1 VA_VIC(1)#define VA_VIC2 VA_VIC(2) +#define VA_VIC3 VA_VIC(3)#endif /* __ASM_PLAT_MAP_S5P_H */
arch/arm/plat-s5p/include/plat/s5pv210.h new file +33 -0
@@ -0,0 +1,33 @@ +/* linux/arch/arm/plat-s5p/include/plat/s5pv210.h +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* http://www.samsung.com/ +* +* Header file for s5pv210 cpu support +* +* 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. +*/ + +/* Common init code for S5PV210 related SoCs */ + +extern void s5pv210_common_init_uarts (struct s3c2410_uartcfg *cfg,int no); +extern void s5pv210_register_clocks (void ); +extern void s5pv210_setup_clocks (void ); + +#ifdef CONFIG_CPU_S5PV210 + +extern int s5pv210_init (void ); +extern void s5pv210_init_irq (void ); +extern void s5pv210_map_io (void ); +extern void s5pv210_init_clocks (int xtal); + +#define s5pv210_init_uarts s5pv210_common_init_uarts + +#else +#define s5pv210_init_clocks NULL +#define s5pv210_init_uarts NULL +#define s5pv210_map_io NULL +#define s5pv210_init NULL +#endif
Signature · 1 line
1.6.2.5