U6/U6715 ARM architecture files
Subsystems (2)
PATCH 1/1 U6/U6715 ARM architecture files
Signed-off-by Philippe Langlais <[email protected]>
--- arch/arm/Kconfig | 11 + arch/arm/Makefile | 2 + arch/arm/mach-u67xx/Kconfig | 12 + arch/arm/mach-u67xx/Makefile | 11 + arch/arm/mach-u67xx/Makefile.boot | 4 + arch/arm/mach-u67xx/board_u67xx_wavex.c | 47 +++ arch/arm/mach-u67xx/devices.c | 28 ++ arch/arm/plat-u6xxx/Kconfig | 22 ++ arch/arm/plat-u6xxx/Makefile | 8 + arch/arm/plat-u6xxx/include/mach/cpu.h | 36 ++ arch/arm/plat-u6xxx/include/mach/debug-macro.S | 38 ++ arch/arm/plat-u6xxx/include/mach/entry-macro.S | 32 ++ arch/arm/plat-u6xxx/include/mach/hardware.h | 41 +++ arch/arm/plat-u6xxx/include/mach/io.h | 30 ++ arch/arm/plat-u6xxx/include/mach/irqs.h | 102 ++++++ arch/arm/plat-u6xxx/include/mach/memory.h | 17 + arch/arm/plat-u6xxx/include/mach/regs-u6.h | 121 +++++++ arch/arm/plat-u6xxx/include/mach/system.h | 42 +++ arch/arm/plat-u6xxx/include/mach/timer.h | 16 + arch/arm/plat-u6xxx/include/mach/timex.h | 23 ++ arch/arm/plat-u6xxx/include/mach/uncompress.h | 47 +++ arch/arm/plat-u6xxx/include/mach/vmalloc.h | 10 + arch/arm/plat-u6xxx/io.c | 34 ++ arch/arm/plat-u6xxx/irq.c | 254 ++++++++++++++ arch/arm/plat-u6xxx/timer.c | 442 ++++++++++++++++++++++++ 25 files changed, 1430 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-u67xx/Kconfig create mode 100644 arch/arm/mach-u67xx/Makefile create mode 100644 arch/arm/mach-u67xx/Makefile.boot create mode 100644 arch/arm/mach-u67xx/board_u67xx_wavex.c create mode 100644 arch/arm/mach-u67xx/devices.c create mode 100644 arch/arm/plat-u6xxx/Kconfig create mode 100644 arch/arm/plat-u6xxx/Makefile create mode 100644 arch/arm/plat-u6xxx/include/mach/cpu.h create mode 100644 arch/arm/plat-u6xxx/include/mach/debug-macro.S create mode 100644 arch/arm/plat-u6xxx/include/mach/entry-macro.S create mode 100644 arch/arm/plat-u6xxx/include/mach/hardware.h create mode 100644 arch/arm/plat-u6xxx/include/mach/io.h create mode 100644 arch/arm/plat-u6xxx/include/mach/irqs.h create mode 100644 arch/arm/plat-u6xxx/include/mach/memory.h create mode 100644 arch/arm/plat-u6xxx/include/mach/regs-u6.h create mode 100644 arch/arm/plat-u6xxx/include/mach/system.h create mode 100644 arch/arm/plat-u6xxx/include/mach/timer.h create mode 100644 arch/arm/plat-u6xxx/include/mach/timex.h create mode 100644 arch/arm/plat-u6xxx/include/mach/uncompress.h create mode 100644 arch/arm/plat-u6xxx/include/mach/vmalloc.h create mode 100644 arch/arm/plat-u6xxx/io.c create mode 100644 arch/arm/plat-u6xxx/irq.c create mode 100644 arch/arm/plat-u6xxx/timer.c
arch/arm/Kconfig +11 -0
@@ -739,6 +739,14 @@ config ARCH_U300 help Support for ST-Ericsson U300 series mobile platforms. +config PLAT_U6XXX + bool "ST-Ericsson U6XXX Series" + select CPU_ARM926T + select GENERIC_GPIO + select ARCH_REQUIRE_GPIOLIB + help + Support for ST-Ericsson's U6XXX architecture + config ARCH_U8500 bool "ST-Ericsson U8500 Series" select CPU_V7
@@ -910,6 +918,9 @@ source "arch/arm/mach-tegra/Kconfig" source "arch/arm/mach-u300/Kconfig" +source "arch/arm/plat-u6xxx/Kconfig" +source "arch/arm/mach-u67xx/Kconfig" + source "arch/arm/mach-ux500/Kconfig" source "arch/arm/mach-versatile/Kconfig"
arch/arm/Makefile +2 -0
@@ -176,6 +176,7 @@ machine-$(CONFIG_ARCH_STMP378X) := stmp378x machine-$(CONFIG_ARCH_STMP37XX) := stmp37xx machine-$(CONFIG_ARCH_TEGRA) := tegra machine-$(CONFIG_ARCH_U300) := u300 +machine-$(CONFIG_ARCH_U67XX) := u67xx machine-$(CONFIG_ARCH_U8500) := ux500 machine-$(CONFIG_ARCH_VERSATILE) := versatile machine-$(CONFIG_ARCH_VEXPRESS) := vexpress
@@ -200,6 +201,7 @@ plat-$(CONFIG_PLAT_PXA) := pxa plat-$(CONFIG_PLAT_S3C24XX) := s3c24xx samsung plat-$(CONFIG_PLAT_S5P) := s5p samsung plat-$(CONFIG_PLAT_SPEAR) := spear +plat-$(CONFIG_PLAT_U6XXX) := u6xxx plat-$(CONFIG_PLAT_VERSATILE) := versatile ifeq ($(CONFIG_ARCH_EBSA110),y)
arch/arm/mach-u67xx/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +comment "U67XX Board Type" + depends on ARCH_U67XX + +choice + depends on ARCH_U67XX + prompt "Choose the U67XX Board type" + default MACH_U67XX_WAVEC_2GB + help + Choose the ST-Ericsson Reference Design Board +config MACH_U67XX_WAVEC_2GB + bool "U67XX WaveC Board with 2Gb Micron combo" +endchoice
arch/arm/mach-u67xx/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +# +## Makefile for the linux kernel, hardware dependent part of ST-Ericsson U67xx +# +# +## Object file lists. + +# Common support +obj-y := devices.o + +# Specific board support +obj-$(CONFIG_MACH_U67XX_WAVEC_2GB) += board_u67xx_wavex.o
arch/arm/mach-u67xx/Makefile.boot new file +4 -0
@@ -0,0 +1,4 @@ + zreladdr-y := 0x20008000 +params_phys-y := 0x20000100 +initrd_phys-y := 0x26000000 +
arch/arm/mach-u67xx/board_u67xx_wavex.c new file +47 -0
47 lines not on this page · raw message
arch/arm/mach-u67xx/devices.c new file +28 -0
@@ -0,0 +1,28 @@ +/* +* linux/arch/arm/mach-u67xx/devices.c +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Philippe Langlais <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +* +* Device specification for the U67XX +*/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/device.h> +#include <linux/platform_device.h> + +/* list of devices */ +static struct platform_device *platform_devs[]__initdata = { +}; + +/* register generic devices */ + +static int __init u67xx_devices_init (void ) +{ +platform_add_devices (platform_devs,ARRAY_SIZE (platform_devs)); +return 0 ; +} + +arch_initcall (u67xx_devices_init);
arch/arm/plat-u6xxx/Kconfig new file +22 -0
@@ -0,0 +1,22 @@ +if PLAT_U6XXX + +menu "STE U6XXX Implementations" + +choice + prompt "U67XX System Type" + default ARCH_U67XX + +config ARCH_U67XX + bool "U67XX" + select GENERIC_TIME + select GENERIC_CLOCKEVENTS + select U6_MTU_TIMER +endchoice + +endmenu + +config U6_MTU_TIMER + bool + default y + +endif
arch/arm/plat-u6xxx/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# +# Makefile for the linux kernel hardware independant part of STE U6XXX. +# + +# Common support +obj-y := io.o irq.o + +obj-$(CONFIG_U6_MTU_TIMER) += timer.o
arch/arm/plat-u6xxx/include/mach/cpu.h new file +36 -0
@@ -0,0 +1,36 @@ +/* +* linux/arch/arm/plat-u6xxx/include/mach/cpu.h +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Philippe Langlais <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +* U6 cpu type detection +*/ + +#ifndef __ASM_PLAT_CPU_H +#define __ASM_PLAT_CPU_H + +/* +* Macros to group U6xxx into cpu classes. +* These can be used in most places. +* cpu_is_u67xx(): True for U67XX +*/ + +#define GET_U6XXX_CLASS ((readl(SCON_SYSVER_REG)&0x0F00)>>8) +#define GET_U6XXX_SUBCLASS ((readl(SCON_SYSVER_REG)&0x0FF0)>>4) + +#define cpu_is_u67xx () 0 +#define cpu_is_u67xx_v2 () 0 +#define cpu_is_u67xx_v3 () 0 + +#if defined(CONFIG_ARCH_U67XX ) +# undef cpu_is_u67xx +# undef cpu_is_u67xx_v2 +# undef cpu_is_u67xx_v3 +# define cpu_is_u67xx () (GET_U6XXX_CLASS == 0x6) +# define cpu_is_u67xx_v2 () (GET_U6XXX_SUBCLASS == 0x62) +# define cpu_is_u67xx_v3 () (GET_U6XXX_SUBCLASS == 0x63) +#endif + +#endif /* __ASM_PLAT_CPU_H */ +
arch/arm/plat-u6xxx/include/mach/debug-macro.S new file +38 -0
@@ -0,0 +1,38 @@ +/* linux/arch/arm/plat-u6xxx/include/mach/debug-macro.S + * + * Debugging macro include header + * + * Copyright (C) 2010 ST-Ericsson + * + * 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 <mach/hardware.h> + + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + ldreq \rx, = UART1_BASE @ physical base address + ldrne \rx, = IO_ADDRESS(UART1_BASE) @ virtual base + .endm + + .macro senduart,rd,rx + strb \rd, [\rx] + .endm + + .macro waituart,rd,rx +1001: + ldr \rd, [\rx, #20] + tst \rd, #1 << 5 @ LSR_THRE - 0 when full + beq 1001b + .endm + + .macro busyuart,rd,rx +1001: + ldr \rd, [\rx, #20] + tst \rd, #1 << 6 @ LSR_TEMT - 0 when busy + beq 1001b + .endm
arch/arm/plat-u6xxx/include/mach/entry-macro.S new file +32 -0
@@ -0,0 +1,32 @@ +/* + * linux/arch/arm/plat-u6xxx/include/mach/entry-macro.S + * + * Low-level IRQ helper macros for U6-based platforms + * Copyright (C) ST-Ericsson SA 2010 + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ +#include <mach/hardware.h> +#include <mach/irqs.h> + + .macro arch_ret_to_user, tmp1, tmp2 + .endm + + .macro disable_fiq + .endm + + .macro get_irqnr_preamble, base, tmp + ldr \base, =IO_ADDRESS(INTC_BASE) + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + ldr \irqnr, [\base, #INTC_VECTOR_IRQ_OFFSET] @ load intc vector reg + mov \irqnr, \irqnr, lsr #3 @ Bits[0..2] are reserved + ands \irqnr, \irqnr, #0x00FF @ mask Bits[11..31] + .endm + + .macro irq_prio_table + .endm +
arch/arm/plat-u6xxx/include/mach/hardware.h new file +41 -0
41 lines not on this page · raw message
arch/arm/plat-u6xxx/include/mach/io.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* linux/arch/arm/plat-u6xxx/include/mach/io.h +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Philippe Langlais <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +* +* Dummy IO map & IO definitions +*/ +#ifndef __ASM_ARM_ARCH_IO_H +#define __ASM_ARM_ARCH_IO_H + +#define IO_SPACE_LIMIT 0xffffffff + +#define __io (a) __typesafe_io(a) +#define __mem_pci (a) (a) + +/* +* I/O mapping +*/ +#ifdef __ASSEMBLER__ +#define IOMEM (x) (x) +#else +#define IOMEM (x) ((void __force __iomem *)(x)) +#endif +#define U6_IO_ADDRESS (pa) IOMEM(IO_ADDRESS(pa)) + +void u6xxx_map_io (void ); + +#endif /* __ASM_ARM_ARCH_IO_H */
arch/arm/plat-u6xxx/include/mach/irqs.h new file +102 -0
102 lines not on this page · raw message
arch/arm/plat-u6xxx/include/mach/memory.h new file +17 -0
@@ -0,0 +1,17 @@ +/* +* linux/arch/arm/plat-u6xxx/include/mach/memory.h +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Philippe Langlais <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +*/ + +#ifndef __ASM_ARCH_MEMORY_H +#define __ASM_ARCH_MEMORY_H + +/* +* Physical DRAM offset. +*/ +#define PHYS_OFFSET UL(0x20000000) + +#endif
arch/arm/plat-u6xxx/include/mach/regs-u6.h new file +121 -0
121 lines not on this page · raw message
arch/arm/plat-u6xxx/include/mach/system.h new file +42 -0
42 lines not on this page · raw message
arch/arm/plat-u6xxx/include/mach/timer.h new file +16 -0
@@ -0,0 +1,16 @@ +/* +* linux/arch/arm/plat-u6xxx/include/mach/timer.h +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Philippe Langlais <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +*/ + +#ifndef __PLAT_TIMER_H +#define __PLAT_TIMER_H + +struct sys_timer ; + +extern struct sys_timer u6_timer; + +#endif
arch/arm/plat-u6xxx/include/mach/timex.h new file +23 -0
@@ -0,0 +1,23 @@ +/* +* linux/arch/arm/plat-u6xxx/include/mach/timex.h +* +* Integrator architecture timex specifications +* +* Copyright (C) 1999 ARM Limited +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#define CLOCK_TICK_RATE (50000000 / 16)
arch/arm/plat-u6xxx/include/mach/uncompress.h new file +47 -0
47 lines not on this page · raw message
arch/arm/plat-u6xxx/include/mach/vmalloc.h new file +10 -0
@@ -0,0 +1,10 @@ +/* +* linux/arch/arm/plat-u6/include/mach/vmalloc.h +* Copyright (C) ST-Ericsson SA 2010 +* Author: Philippe Langlais <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +* +* Virtual memory allocations +* End must be above the I/O registers and on an even 2MiB boundary. +*/ +#define VMALLOC_END 0xe8000000UL
arch/arm/plat-u6xxx/io.c new file +34 -0
@@ -0,0 +1,34 @@ +/* +* linux/arch/arm/plat-u6xxx/io.c +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Philippe Langlais <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +*/ + +#include <linux/sched.h> +#include <linux/mm.h> +#include <linux/init.h> +#include <linux/io.h> + +#include <mach/hardware.h> +#include <asm/pgtable.h> +#include <asm/page.h> + +#include <asm/mach/map.h> + + +static struct map_desc u6xxx_io_desc[]__initdata = { + { + .virtual =IO_BASE_VIRT ,/* only peripherals */ + .pfn =__phys_to_pfn (IO_BASE_PHYS ), + .length =IO_SIZE , + .type =MT_DEVICE , + } +}; + +void __init u6xxx_map_io (void ) +{ +iotable_init (u6xxx_io_desc,ARRAY_SIZE (u6xxx_io_desc)); +} +
arch/arm/plat-u6xxx/irq.c new file +254 -0
254 lines not on this page · raw message
arch/arm/plat-u6xxx/timer.c new file +442 -0
442 lines not on this page · raw message
Signature · 4 lines
1.7.1 --------------090409010500080700020308--