ARM: add initial support for Picochip picoXcell SoC
Subsystems (2)
v6 cover ARM: add initial support for Picochip picoXcell SoC
Hi,
I've respun this patch series to move the DEBUG_LL 32-bit helpers into debug-macro.S like mach-davinci does and include the basic clk stuff so that we can build with drivers that want CLK support.
This patch series takes us to a login console over serial on both PC3X2 and PC3X3 devices on the PC7302 board booted with NOR flash. I plan on adding support for the next generation of soc, PM, cpufreq etc at a later date once these patches are merged but figured it would be good to start with a nice stable base.
Any feedback would be very much appreciated!
Thanks,
Jamie Iles (5):
picoxcell: support for Picochip picoXcell SoC
picoxcell: support for the common system timers
picoxcell: common SoC peripheral support
picoxcell: basic clk infrastructure
picoxcell: support for the PC7302 development board
arch/arm/Kconfig | 14 ++ arch/arm/Makefile | 1 + arch/arm/mach-picoxcell/Kconfig | 13 ++ arch/arm/mach-picoxcell/Makefile | 5 + arch/arm/mach-picoxcell/Makefile.boot | 3 + arch/arm/mach-picoxcell/axi2cfg.c | 36 ++++ arch/arm/mach-picoxcell/board_pc7302.c | 109 ++++++++++ arch/arm/mach-picoxcell/clk.c | 83 ++++++++ arch/arm/mach-picoxcell/devices.c | 122 +++++++++++ arch/arm/mach-picoxcell/include/mach/clkdev.h | 70 ++++++ arch/arm/mach-picoxcell/include/mach/debug-macro.S | 39 ++++ arch/arm/mach-picoxcell/include/mach/entry-macro.S | 19 ++ arch/arm/mach-picoxcell/include/mach/hardware.h | 29 +++ arch/arm/mach-picoxcell/include/mach/io.h | 38 ++++ arch/arm/mach-picoxcell/include/mach/irqs.h | 89 ++++++++ arch/arm/mach-picoxcell/include/mach/memory.h | 27 +++ .../include/mach/picoxcell/axi2cfg.h | 122 +++++++++++ .../mach-picoxcell/include/mach/picoxcell/gpio.h | 48 +++++ .../include/mach/picoxcell/picoxcell.h | 62 ++++++ .../mach-picoxcell/include/mach/picoxcell/timer.h | 37 ++++ .../mach-picoxcell/include/mach/picoxcell/wdog.h | 43 ++++ arch/arm/mach-picoxcell/include/mach/platform.h | 27 +++ arch/arm/mach-picoxcell/include/mach/system.h | 51 +++++ arch/arm/mach-picoxcell/include/mach/timex.h | 26 +++ arch/arm/mach-picoxcell/include/mach/uncompress.h | 60 ++++++ arch/arm/mach-picoxcell/include/mach/vmalloc.h | 18 ++ arch/arm/mach-picoxcell/io.c | 49 +++++ arch/arm/mach-picoxcell/picoxcell_core.c | 107 ++++++++++ arch/arm/mach-picoxcell/picoxcell_core.h | 25 +++ arch/arm/mach-picoxcell/soc.h | 32 +++ arch/arm/mach-picoxcell/time.c | 222 ++++++++++++++++++++ 31 files changed, 1626 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-picoxcell/Kconfig create mode 100644 arch/arm/mach-picoxcell/Makefile create mode 100644 arch/arm/mach-picoxcell/Makefile.boot create mode 100644 arch/arm/mach-picoxcell/axi2cfg.c create mode 100644 arch/arm/mach-picoxcell/board_pc7302.c create mode 100644 arch/arm/mach-picoxcell/clk.c create mode 100644 arch/arm/mach-picoxcell/devices.c create mode 100644 arch/arm/mach-picoxcell/include/mach/clkdev.h create mode 100644 arch/arm/mach-picoxcell/include/mach/debug-macro.S create mode 100644 arch/arm/mach-picoxcell/include/mach/entry-macro.S create mode 100644 arch/arm/mach-picoxcell/include/mach/hardware.h create mode 100644 arch/arm/mach-picoxcell/include/mach/io.h create mode 100644 arch/arm/mach-picoxcell/include/mach/irqs.h create mode 100644 arch/arm/mach-picoxcell/include/mach/memory.h create mode 100644 arch/arm/mach-picoxcell/include/mach/picoxcell/axi2cfg.h create mode 100644 arch/arm/mach-picoxcell/include/mach/picoxcell/gpio.h create mode 100644 arch/arm/mach-picoxcell/include/mach/picoxcell/picoxcell.h create mode 100644 arch/arm/mach-picoxcell/include/mach/picoxcell/timer.h create mode 100644 arch/arm/mach-picoxcell/include/mach/picoxcell/wdog.h create mode 100644 arch/arm/mach-picoxcell/include/mach/platform.h create mode 100644 arch/arm/mach-picoxcell/include/mach/system.h create mode 100644 arch/arm/mach-picoxcell/include/mach/timex.h create mode 100644 arch/arm/mach-picoxcell/include/mach/uncompress.h create mode 100644 arch/arm/mach-picoxcell/include/mach/vmalloc.h create mode 100644 arch/arm/mach-picoxcell/io.c create mode 100644 arch/arm/mach-picoxcell/picoxcell_core.c create mode 100644 arch/arm/mach-picoxcell/picoxcell_core.h create mode 100644 arch/arm/mach-picoxcell/soc.h create mode 100644 arch/arm/mach-picoxcell/time.c
Signature · 1 line
1.7.4
PATCH v6 1/5 picoxcell: support for Picochip picoXcell SoC
picoXcell is a family of femtocell SoC devices from Picochip [1] with an ARM subsystem. The devices have an ARM1176JZ-S core and a DSP processor array. Currently there are two sub families - PC3X2 and PC3X3. The latter includes extra power and performance control along with extra peripherals.
This initial patch adds the hardware definitions and a framework for adding device variants.
v2:
- Define VMALLOC_END as a fixed address rather than relative to PAGE_OFFSET
- Reduce the number of static IO mappings
- Put the picoXcell entry in the correct place in arch/arm/Kconfig
v3:
- Incorporate feedback from RMK
- Refactor static IO mappings into io.c and include arch specific ioremap and iounmap to reuse static mappings.
- Tell Linux about the TCMs and the onchip SRAM.
- Switch to __raw_ io accessors where possible. Note the AXI2CFG requires a strongly ordered protocol so retains ordered accessors.
v4:
- Remove redundant __init declarations and add a cpu_relax() to the AXI2CFG read polling
- Allow soc variants to register variant specific devices
v5:
- Remove all of the sysdev and AXI2Cfg configuration stuff to reduce it to the bare minimum to boot on all devices.
v6:
- Move the 32-bit UART accesses for DEBUG_LL into the machine debug-macros.S and remove the hardcoded addresses.
--- arch/arm/Kconfig | 13 ++ arch/arm/Makefile | 1 + arch/arm/mach-picoxcell/Kconfig | 2 + arch/arm/mach-picoxcell/Makefile | 1 + arch/arm/mach-picoxcell/Makefile.boot | 3 + arch/arm/mach-picoxcell/axi2cfg.c | 36 ++++++ arch/arm/mach-picoxcell/include/mach/debug-macro.S | 39 ++++++ arch/arm/mach-picoxcell/include/mach/entry-macro.S | 19 +++ arch/arm/mach-picoxcell/include/mach/hardware.h | 29 +++++ arch/arm/mach-picoxcell/include/mach/io.h | 38 ++++++ arch/arm/mach-picoxcell/include/mach/irqs.h | 89 ++++++++++++++ arch/arm/mach-picoxcell/include/mach/memory.h | 27 +++++ .../include/mach/picoxcell/axi2cfg.h | 122 ++++++++++++++++++++ .../mach-picoxcell/include/mach/picoxcell/gpio.h | 48 ++++++++ .../include/mach/picoxcell/picoxcell.h | 62 ++++++++++ .../mach-picoxcell/include/mach/picoxcell/timer.h | 37 ++++++ .../mach-picoxcell/include/mach/picoxcell/wdog.h | 43 +++++++ arch/arm/mach-picoxcell/include/mach/platform.h | 27 +++++ arch/arm/mach-picoxcell/include/mach/system.h | 51 ++++++++ arch/arm/mach-picoxcell/include/mach/timex.h | 26 ++++ arch/arm/mach-picoxcell/include/mach/uncompress.h | 60 ++++++++++ arch/arm/mach-picoxcell/include/mach/vmalloc.h | 18 +++ arch/arm/mach-picoxcell/io.c | 49 ++++++++ arch/arm/mach-picoxcell/picoxcell_core.c | 105 +++++++++++++++++ arch/arm/mach-picoxcell/picoxcell_core.h | 22 ++++ arch/arm/mach-picoxcell/soc.h | 32 +++++ 26 files changed, 999 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-picoxcell/Kconfig create mode 100644 arch/arm/mach-picoxcell/Makefile create mode 100644 arch/arm/mach-picoxcell/Makefile.boot create mode 100644 arch/arm/mach-picoxcell/axi2cfg.c create mode 100644 arch/arm/mach-picoxcell/include/mach/debug-macro.S create mode 100644 arch/arm/mach-picoxcell/include/mach/entry-macro.S create mode 100644 arch/arm/mach-picoxcell/include/mach/hardware.h create mode 100644 arch/arm/mach-picoxcell/include/mach/io.h create mode 100644 arch/arm/mach-picoxcell/include/mach/irqs.h create mode 100644 arch/arm/mach-picoxcell/include/mach/memory.h create mode 100644 arch/arm/mach-picoxcell/include/mach/picoxcell/axi2cfg.h create mode 100644 arch/arm/mach-picoxcell/include/mach/picoxcell/gpio.h create mode 100644 arch/arm/mach-picoxcell/include/mach/picoxcell/picoxcell.h create mode 100644 arch/arm/mach-picoxcell/include/mach/picoxcell/timer.h create mode 100644 arch/arm/mach-picoxcell/include/mach/picoxcell/wdog.h create mode 100644 arch/arm/mach-picoxcell/include/mach/platform.h create mode 100644 arch/arm/mach-picoxcell/include/mach/system.h create mode 100644 arch/arm/mach-picoxcell/include/mach/timex.h create mode 100644 arch/arm/mach-picoxcell/include/mach/uncompress.h create mode 100644 arch/arm/mach-picoxcell/include/mach/vmalloc.h create mode 100644 arch/arm/mach-picoxcell/io.c create mode 100644 arch/arm/mach-picoxcell/picoxcell_core.c create mode 100644 arch/arm/mach-picoxcell/picoxcell_core.h create mode 100644 arch/arm/mach-picoxcell/soc.h
arch/arm/Kconfig +13 -0
@@ -605,6 +605,17 @@ config ARCH_PNX4008 help This enables support for Philips PNX4008 mobile platform. +config ARCH_PICOXCELL + bool "Picochip picoXcell" + select ARM_VIC + select GENERIC_CLOCKEVENTS + select HAVE_SCHED_CLOCK + select CPU_V6K + select HAVE_TCM + help + This enables support for systems based on the Picochip picoXcell + family of Femtocell devices. + config ARCH_PXA bool "PXA2xx/PXA3xx-based" depends on MMU
@@ -955,6 +966,8 @@ source "arch/arm/mach-omap2/Kconfig" source "arch/arm/mach-orion5x/Kconfig" +source "arch/arm/mach-picoxcell/Kconfig" + source "arch/arm/mach-pxa/Kconfig" source "arch/arm/plat-pxa/Kconfig"
arch/arm/Makefile +1 -0
@@ -166,6 +166,7 @@ machine-$(CONFIG_ARCH_OMAP2) := omap2 machine-$(CONFIG_ARCH_OMAP3) := omap2 machine-$(CONFIG_ARCH_OMAP4) := omap2 machine-$(CONFIG_ARCH_ORION5X) := orion5x +machine-$(CONFIG_ARCH_PICOXCELL) := picoxcell machine-$(CONFIG_ARCH_PNX4008) := pnx4008 machine-$(CONFIG_ARCH_PXA) := pxa machine-$(CONFIG_ARCH_REALVIEW) := realview
arch/arm/mach-picoxcell/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +if ARCH_PICOXCELL +endif
arch/arm/mach-picoxcell/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-y := picoxcell_core.o io.o axi2cfg.o
arch/arm/mach-picoxcell/Makefile.boot new file +3 -0
@@ -0,0 +1,3 @@ + zreladdr-y := 0x00008000 +params_phys-y := 0x00000100 +initrd_phys-y := 0x00800000
arch/arm/mach-picoxcell/axi2cfg.c new file +36 -0
@@ -0,0 +1,36 @@ +/* +* Copyright (c) 2010 Picochip Ltd., Jamie Iles +* +* 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. +* +* All enquiries to support at picochip.com +* +* This file implements functions for using the axi2cfg to configure and debug +* picoArray systems providing configuration bus access over the axi2cfg. +*/ +#include <linux/errno.h> +#include <linux/io.h> +#include <linux/module.h> +#include <linux/spinlock.h> + +#include <mach/hardware.h> + +static void __iomem *axi2cfg; + +unsigned long axi2cfg_readl (unsigned long offs) +{ +return readl (axi2cfg + offs); +} + +void axi2cfg_writel (unsigned long val,unsigned long offs) +{ +writel (val, axi2cfg + offs); +} + +void __init axi2cfg_init (void ) +{ + axi2cfg =ioremap (PICOXCELL_AXI2CFG_BASE ,0x300 ); +BUG_ON (!axi2cfg); +}
arch/arm/mach-picoxcell/include/mach/debug-macro.S new file +39 -0
@@ -0,0 +1,39 @@ +/* + * Copyright (c) 2010 Picochip Ltd., Jamie Iles + * + * 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. + * + * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit + * accesses to the 8250. + */ +#include <linux/serial_reg.h> +#include <mach/hardware.h> +#include <mach/io.h> + +#define UART_SHIFT 2 + + .macro addruart, rp, rv + ldr \rv, =PHYS_TO_IO(PICOXCELL_UART1_BASE) + ldr \rp, =PICOXCELL_UART1_BASE + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #UART_TX << UART_SHIFT] + .endm + + .macro busyuart,rd,rx +1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] + and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE + teq \rd, #UART_LSR_TEMT | UART_LSR_THRE + bne 1002b + .endm + + .macro waituart,rd,rx +#ifdef FLOW_CONTROL +1001: ldr \rd, [\rx, #UART_MSR << UART_SHIFT] + tst \rd, #UART_MSR_CTS + beq 1001b +#endif + .endm
arch/arm/mach-picoxcell/include/mach/entry-macro.S new file +19 -0
@@ -0,0 +1,19 @@ +/* + * entry-macro.S + * + * Copyright (c) 2010 Picochip Ltd., Jamie Iles + * + * Low-level IRQ helper macros for picoXcell platforms + * + * 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/io.h> +#include <mach/irqs.h> + +#define VA_VIC0 IO_ADDRESS(PICOXCELL_VIC0_BASE) +#define VA_VIC1 IO_ADDRESS(PICOXCELL_VIC1_BASE) + +#include <asm/entry-macro-vic2.S>
arch/arm/mach-picoxcell/include/mach/hardware.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* Copyright (c) 2010 Picochip Ltd., Jamie Iles +* +* This file contains the hardware definitions of the picoXcell SoC devices. +* +* 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 +*/ +#ifndef __ASM_ARCH_HARDWARE_H +#define __ASM_ARCH_HARDWARE_H + +#include <mach/picoxcell/axi2cfg.h> +#include <mach/picoxcell/gpio.h> +#include <mach/picoxcell/picoxcell.h> +#include <mach/picoxcell/timer.h> +#include <mach/picoxcell/wdog.h> + +#endif
arch/arm/mach-picoxcell/include/mach/io.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* Copyright (c) 2010 Picochip Ltd., Jamie Iles +* +* 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 +*/ +#ifndef __ASM_ARM_ARCH_IO_H +#define __ASM_ARM_ARCH_IO_H + +#define PHYS_TO_IO (x) (((x) & 0x00ffffff) | 0xfe000000) + +#ifdef __ASSEMBLY__ +# define IO_ADDRESS (x) PHYS_TO_IO((x)) +#else /* __ASSEMBLY__ */ +# define IO_ADDRESS (x) (void __iomem __force *)(PHYS_TO_IO((x))) +# define IO_SPACE_LIMIT 0xffffffff +# define __io (a) __typesafe_io(a) +# define __mem_pci (a) (a) +# define __arch_ioremap picoxcell_ioremap +# define __arch_iounmap picoxcell_iounmap + +void __iomem *picoxcell_ioremap (unsigned long phys,size_t size, +unsigned int type); +void picoxcell_iounmap (volatile void __iomem *addr); +#endif /* __ASSEMBLY__ */ + +#endif /* __ASM_ARM_ARCH_IO_H */
arch/arm/mach-picoxcell/include/mach/irqs.h new file +89 -0
89 lines not on this page · raw message
arch/arm/mach-picoxcell/include/mach/memory.h new file +27 -0
@@ -0,0 +1,27 @@ +/* +* Copyright (c) 2010 Picochip Ltd., Jamie Iles +* +* 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 +*/ +#ifndef __ASM_ARCH_MEMORY_H +#define __ASM_ARCH_MEMORY_H + +/* +* Physical DRAM offset. +*/ +#define PLAT_PHYS_OFFSET UL(0x00000000) + +#endif +
arch/arm/mach-picoxcell/include/mach/picoxcell/axi2cfg.h new file +122 -0
122 lines not on this page · raw message
arch/arm/mach-picoxcell/include/mach/picoxcell/gpio.h new file +48 -0
48 lines not on this page · raw message
arch/arm/mach-picoxcell/include/mach/picoxcell/picoxcell.h new file +62 -0
62 lines not on this page · raw message
arch/arm/mach-picoxcell/include/mach/picoxcell/timer.h new file +37 -0
@@ -0,0 +1,37 @@ +/* +* Copyright (c) 2010 Picochip Ltd., Jamie Iles +* +* 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 +*/ +#ifndef PICOXCELL_TIMER_H +#define PICOXCELL_TIMER_H + +/* The spacing between individual timers. */ +#define TIMER_SPACING 0x14 + +#define TIMER_LOAD_COUNT_REG_OFFSET 0x00 +#define TIMER_CONTROL_REG_OFFSET 0x08 +#define TIMER_EOI_REG_OFFSET 0x0c + +#define TIMERS_EOI_REG_OFFSET 0xa4 + +#define TIMER_ENABLE 0x00000001 +#define TIMER_MODE 0x00000002 +#define TIMER_INTERRUPT_MASK 0x00000004 + +#define RTCLK_CCV_REG_OFFSET 0x00 +#define RTCLK_SET_REG_OFFSET 0x08 + +#endif /* PICOXCELL_TIMER_H */
arch/arm/mach-picoxcell/include/mach/picoxcell/wdog.h new file +43 -0
43 lines not on this page · raw message
arch/arm/mach-picoxcell/include/mach/platform.h new file +27 -0
@@ -0,0 +1,27 @@ +/* +* Copyright (c) 2010 Picochip Ltd., Jamie Iles +* +* 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 +*/ +#ifndef __ARCH_PICOXCELL_PLATFORM_H +#define __ARCH_PICOXCELL_PLATFORM_H + +/* Physical address of the Flash in the ARM sub-system memory map */ +#define PICOXCELL_FLASH_BASE 0x40000000 + +/* The clock frequency for the UARTs */ +#define PICOXCELL_BASE_BAUD 3686400/* 3.6864 MHz */ + +#endif /* __ARCH_PICOXCELL_PLATFORM_H */
arch/arm/mach-picoxcell/include/mach/system.h new file +51 -0
51 lines not on this page · raw message
arch/arm/mach-picoxcell/include/mach/timex.h new file +26 -0
@@ -0,0 +1,26 @@ +/* +* Copyright (c) 2010 Picochip Ltd., Jamie Iles +* +* 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 +*/ +#ifndef __TIMEX_H__ +#define __TIMEX_H__ + +#include <mach/platform.h> + +#define CLOCK_TICK_RATE 200000000/* 200MHz */ + +#endif /* __TIMEX_H__ */ +
arch/arm/mach-picoxcell/include/mach/uncompress.h new file +60 -0
60 lines not on this page · raw message
arch/arm/mach-picoxcell/include/mach/vmalloc.h new file +18 -0
@@ -0,0 +1,18 @@ +/* +* Copyright (c) 2010 Picochip Ltd., Jamie Iles +* +* 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 VMALLOC_END 0xFE000000UL
arch/arm/mach-picoxcell/io.c new file +49 -0
49 lines not on this page · raw message
arch/arm/mach-picoxcell/picoxcell_core.c new file +105 -0
105 lines not on this page · raw message
arch/arm/mach-picoxcell/picoxcell_core.h new file +22 -0
@@ -0,0 +1,22 @@ +/* +* linux/arch/arm/mach-picoxcell/picoxcell_core.h +* +* Copyright (c) 2010 Picochip Ltd., Jamie Iles +* +* 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. +* +* All enquiries to support at picochip.com +*/ +#ifndef __ASM_ARCH_PICOXCELL_CORE_H__ +#define __ASM_ARCH_PICOXCELL_CORE_H__ + +struct picoxcell_soc ; + +extern void picoxcell_init_early (void ); +extern void picoxcell_core_init (void ); +extern void picoxcell_init_irq (void ); +extern void picoxcell_map_io (void ); + +#endif /* __ASM_ARCH_PICOXCELL_CORE_H__ */
arch/arm/mach-picoxcell/soc.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* Copyright (c) 2010 Picochip Ltd., Jamie Iles +* +* 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. +* +* All enquiries to support at picochip.com +*/ +#ifndef __PICOXCELL_SOC_H__ +#define __PICOXCELL_SOC_H__ + +enum timer_type { +TIMER_TYPE_RTC , +TIMER_TYPE_TIMER , +}; + +struct picoxcell_timer { +const char *name; +enum timer_type type; +unsigned long base; +int irq; +}; + +struct picoxcell_soc { +const struct picoxcell_timer *timers; +int nr_timers; +}; + +extern struct picoxcell_soc *picoxcell_get_soc (void ); + +#endif /* __PICOXCELL_SOC_H__ */
Signature · 1 line
1.7.4
PATCH v6 2/5 picoxcell: support for the common system timers
In reply to Jamie IlesThe picoXcell devices have 4 timers capable of generating interrupts when they reach a predefined value and restarting and a freerunning RTC. Use one of the interrupt capable timers as the clockevent_device and the RTC for the clocksource and sched_clock().
v2:
- use clocksource_register_hz() and clockevents_calc_mult_shift() rather than specifying .mult and .shift.
v3:
- Incorporate feedback from RMK.
- Don't emulate oneshot mode in the timers, let the generic clockevents layer do it.
- Provide a better sched_clock() based on plat-nomadik's.
- Convert to __raw_ io accessors.
v4:
- Use the fixed_sched_clock helpers for sched_clock() implementation as provided by RMK and remove redunant use of __init.
--- arch/arm/mach-picoxcell/Makefile | 3 +- arch/arm/mach-picoxcell/picoxcell_core.c | 1 + arch/arm/mach-picoxcell/picoxcell_core.h | 3 + arch/arm/mach-picoxcell/time.c | 222 ++++++++++++++++++++++++++++++ 4 files changed, 228 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-picoxcell/time.c
arch/arm/mach-picoxcell/Makefile +2 -1
@@ -1 +1,2 @@ -obj-y := picoxcell_core.o io.o axi2cfg.o +obj-y := picoxcell_core.o io.o axi2cfg.o \ + time.o
arch/arm/mach-picoxcell/picoxcell_core.c +1 -0
@@ -97,6 +97,7 @@ static void report_chipinfo(void)void __init picoxcell_init_early (void ) {axi2cfg_init (); +picoxcell_sched_clock_init (); }void __init picoxcell_core_init (void )
arch/arm/mach-picoxcell/picoxcell_core.h +3 -0
@@ -13,10 +13,13 @@#define __ASM_ARCH_PICOXCELL_CORE_H__struct picoxcell_soc ; +struct sys_timer ;extern void picoxcell_init_early (void );extern void picoxcell_core_init (void );extern void picoxcell_init_irq (void );extern void picoxcell_map_io (void ); +extern struct sys_timer picoxcell_sys_timer; +extern void picoxcell_sched_clock_init (void );#endif /* __ASM_ARCH_PICOXCELL_CORE_H__ */
arch/arm/mach-picoxcell/time.c new file +222 -0
222 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v6 3/5 picoxcell: common SoC peripheral support
In reply to Jamie IlesAdd the devices common to all picoXcell variants (UART and PMU). Other peripherals such as DMA, SPI, fuses and EMAC will be added later with driver support.
v3:
- move device registration to an arch_initcall
- mark common_devices with __initdata
v2: - split the UARTs into two separate platform devices and use
PLAT8250_* as the IDs
--- arch/arm/mach-picoxcell/Makefile | 3 +- arch/arm/mach-picoxcell/devices.c | 122 +++++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-picoxcell/devices.c
arch/arm/mach-picoxcell/Makefile +2 -1
@@ -1,2 +1,3 @@ obj-y := picoxcell_core.o io.o axi2cfg.o \ - time.o + time.o \ + devices.o
arch/arm/mach-picoxcell/devices.c new file +122 -0
122 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v6 4/5 picoxcell: basic clk infrastructure
In reply to Jamie IlesThe different picoXcell device variants have different numbers of clocks and different capabilities (PC3X2 doesn't have any gateable or controllable clocks). Add the infrastructure necessary for device variants to provide their own clock implementation.
--- arch/arm/Kconfig | 1 + arch/arm/mach-picoxcell/Makefile | 3 +- arch/arm/mach-picoxcell/clk.c | 83 +++++++++++++++++++++++++ arch/arm/mach-picoxcell/include/mach/clkdev.h | 70 +++++++++++++++++++++ arch/arm/mach-picoxcell/picoxcell_core.c | 1 + 5 files changed, 157 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-picoxcell/clk.c create mode 100644 arch/arm/mach-picoxcell/include/mach/clkdev.h
arch/arm/Kconfig +1 -0
@@ -612,6 +612,7 @@ config ARCH_PICOXCELL select HAVE_SCHED_CLOCK select CPU_V6K select HAVE_TCM + select CLKDEV_LOOKUP help This enables support for systems based on the Picochip picoXcell family of Femtocell devices.
arch/arm/mach-picoxcell/Makefile +2 -1
@@ -1,3 +1,4 @@ obj-y := picoxcell_core.o io.o axi2cfg.o \ time.o \ - devices.o + devices.o \ + clk.o
arch/arm/mach-picoxcell/clk.c new file +83 -0
83 lines not on this page · raw message
arch/arm/mach-picoxcell/include/mach/clkdev.h new file +70 -0
70 lines not on this page · raw message
arch/arm/mach-picoxcell/picoxcell_core.c +1 -0
@@ -14,6 +14,7 @@#include <asm/hardware/vic.h> #include <asm/mach-types.h> +#include <mach/clkdev.h> #include <mach/hardware.h> #include "picoxcell_core.h"
Signature · 1 line
1.7.4
PATCH v6 5/5 picoxcell: support for the PC7302 development board
In reply to Jamie IlesThe PC7302 development board is capable of taking both PC3X2 and PC3X3 devices and features NOR flash, NAND flash, SPI NOR flash a serial console, 100Mb Ethernet and a number of picoArray peripherals.
This patch provides initial support for running on the PC7302 board.
v4:
- reduce to the bare minimum for NOR flash booting.
v3:
- remove redundant __init declarations.
v2:
- multiplex the NAND CLE pin by pad name.
- convert to __raw_ io accessors.
--- arch/arm/mach-picoxcell/Kconfig | 11 +++ arch/arm/mach-picoxcell/Makefile | 1 + arch/arm/mach-picoxcell/board_pc7302.c | 109 ++++++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-picoxcell/board_pc7302.c
arch/arm/mach-picoxcell/Kconfig +11 -0
@@ -1,2 +1,13 @@ if ARCH_PICOXCELL + +comment "Picochip picoXcell board selection" + +config BOARD_PC7302 + bool "Support PC7302 Board" + default y + help + Include support for the picoChip PC7302 platform. This platform is + can take any of the PC3X2 or PC3X3 devices and includes SPI NOR + flash, parallel NOR flash and NAND flash. + endif
arch/arm/mach-picoxcell/Makefile +1 -0
@@ -2,3 +2,4 @@ obj-y := picoxcell_core.o io.o axi2cfg.o \ time.o \ devices.o \ clk.o +obj-$(CONFIG_BOARD_PC7302) += board_pc7302.o
arch/arm/mach-picoxcell/board_pc7302.c new file +109 -0
109 lines not on this page · raw message
Signature · 1 line
1.7.4
Hi Russell,
Quoted 14 lines · Jamie Iles
I've respun this patch series to move the
DEBUG_LL32-bit helpers intodebug-macro.Slike mach-davinci does and include the basic clk stuff so that we can build with drivers that want CLK support.This patch series takes us to a login console over serial on both PC3X2 and PC3X3 devices on the PC7302 board booted with NOR flash. I plan on adding support for the next generation of soc, PM, cpufreq etc at a later date once these patches are merged but figured it would be good to start with a nice stable base.
Any feedback would be very much appreciated!
Thanks,
Quoted 7 lines
Jamie Iles (5):
picoxcell: support for Picochip picoXcell SoC
picoxcell: support for the common system timers
picoxcell: common SoC peripheral support
picoxcell: basic clk infrastructure
picoxcell: support for the PC7302 development board
I was wondering if there was anything I could do to help move this series along a bit. Whilst I haven't had much direct feedback to these patches I have tried to take on board any feedback to other machine patches where relevant.
How about adding a tree to linux-next?
Jamie