Skip to contentSkip to conversation

ARM: add initial support for Picochip picoXcell SoC

PATCH Superseded Jamie Iles 1 participant 5 messages Feb 18, 2011

Subsystems (2)

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

Jamie Iles

author
#0 lore raw

v5 cover ARM: add initial support for Picochip picoXcell SoC

Hi,

This patch series adds support for the Picochip picoXcell series of femtocell SoC's. There are currently two device families - PC3X2 and PC3X3. Both include an ARM1176JZ-S, 100Mb Ethernet controller, 2xDMA controllers, eFuses, crypto offload engines and Picochip's array processor the picoArray.

I've reduced this patch series down pretty much to the bare minimum to boot on all device families with serial access but not much more. Hopefully this will make this series a little easier to review and we can add the GPIO, muxing, clock gating and PM etc once these have been merged.

Any feedback would be much appreciated!

Jamie

Note: we also need this patch for the CONFIG_DEBUG_LL:

- debug-8250: add a 32 bit mode:
http://marc.info/?l=linux-arm-kernel&m=129044061221371&w=2

Jamie Iles (4):
picoxcell: add support for picoXcell
picoxcell: add support for the system timers
picoxcell: add common SoC devices
picoxcell: add support for the PC7302 development board

 arch/arm/Kconfig                                   |   13 ++
 arch/arm/Makefile                                  |    1 +
 arch/arm/mach-picoxcell/Kconfig                    |   12 +
 arch/arm/mach-picoxcell/Makefile                   |    4 +
 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/devices.c                  |  122 +++++++++++
 arch/arm/mach-picoxcell/include/mach/debug-macro.S |   18 ++
 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           |  106 ++++++++++
 arch/arm/mach-picoxcell/picoxcell_core.h           |   25 +++
 arch/arm/mach-picoxcell/soc.h                      |   32 +++
 arch/arm/mach-picoxcell/time.c                     |  222 ++++++++++++++++++++
 29 files changed, 1448 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/devices.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
 create mode 100644 arch/arm/mach-picoxcell/time.c
Signature · 1 line
1.7.4
author
#1 lore raw

PATCH v5 1/4 picoxcell: add support for picoXcell

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.

1. http://www.picochip.com

---
 arch/arm/Kconfig                                   |   13 ++
 arch/arm/Makefile                                  |    1 +
 arch/arm/mach-picoxcell/Kconfig                    |    4 +
 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 |   18 +++
 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, 980 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
index 08799af..d6f4714 100644
@@ -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
@@ -954,6 +965,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
index 9a0f6a3..6403eef 100644
@@ -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 +4 -0
new file mode 100644
index 0000000..3daba53
@@ -0,0 +1,4 @@
+menu "PICOXCELL platform type"
+	depends on ARCH_PICOXCELL
+
+endmenu
arch/arm/mach-picoxcell/Makefile new file +1 -0
new file mode 100644
index 0000000..6afe388
@@ -0,0 +1 @@
+obj-y				:= picoxcell_core.o io.o axi2cfg.o
arch/arm/mach-picoxcell/Makefile.boot new file +3 -0
new file mode 100644
index 0000000..67039c3
@@ -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
new file mode 100644
index 0000000..6bb4014
@@ -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 +18 -0
new file mode 100644
index 0000000..5cbab63
@@ -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 version 2 as
+ * published by the Free Software Foundation.
+ *
+*/
+
+		.macro	addruart, rp, rv
+		mov	\rv, #0x00230000
+		orr	\rp, \rv, #0x80000000
+		orr	\rv, \rv, #0xFE000000
+		.endm
+
+#define UART_SHIFT 2
+#define DEBUG_8250_ACCESS_32
+#include <asm/hardware/debug-8250.S>
arch/arm/mach-picoxcell/include/mach/entry-macro.S new file +19 -0
new file mode 100644
index 0000000..4dcda96
@@ -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
new file mode 100644
index 0000000..7c203d3
@@ -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
new file mode 100644
index 0000000..cb11040
@@ -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(p, s, t)	picoxcell_ioremap(p, s, t)
+#define __arch_iounmap(v)	picoxcell_iounmap(v)
+
+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
new file mode 100644
index 0000000..c0f6077
@@ -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
new file mode 100644
index 0000000..8d67c42
@@ -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
new file mode 100644
index 0000000..97697c0
@@ -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
new file mode 100644
index 0000000..bf0fee6
@@ -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
new file mode 100644
index 0000000..09a7f75
@@ -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
new file mode 100644
index 0000000..299c512
@@ -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
new file mode 100644
index 0000000..1422216
@@ -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
author
#2 lore raw

PATCH v5 2/4 picoxcell: add support for the system timers

In reply to Jamie Iles

The 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
index 6afe388..493ec0e 100644
@@ -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
index a0db3fd..a54d981 100644
@@ -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
index 299c512..50cf842 100644
@@ -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
author
#3 lore raw

PATCH v5 3/4 picoxcell: add common SoC devices

In reply to Jamie Iles

Add 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
index 493ec0e..3cace37 100644
@@ -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
author
#4 lore raw

PATCH v5 4/4 picoxcell: add support for the PC7302 development board

In reply to Jamie Iles

The 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        |    8 +++
 arch/arm/mach-picoxcell/Makefile       |    1 +
 arch/arm/mach-picoxcell/board_pc7302.c |  109 ++++++++++++++++++++++++++++++++
 3 files changed, 118 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-picoxcell/board_pc7302.c
arch/arm/mach-picoxcell/Kconfig +8 -0
index 3daba53..0c1f78d 100644
@@ -1,4 +1,12 @@
 menu "PICOXCELL platform type"
 	depends on ARCH_PICOXCELL
 
+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.
+
 endmenu
arch/arm/mach-picoxcell/Makefile +1 -0
index 3cace37..fc4e735 100644
@@ -1,3 +1,4 @@
 obj-y				:= picoxcell_core.o io.o axi2cfg.o \
 				   time.o \
 				   devices.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