ARM: mach-shmobile: Initial AG5 and AG5EVM support
Magnus Damm
maintainerPATCH 1/1 ARM: mach-shmobile: Initial AG5 and AG5EVM support
From: Magnus Damm <[email protected]>
This patch adds initial support for Renesas SH-Mobile AG5.
At this point the AG5 CPU support is limited to the ARM core, SCIF serial and a CMT timer together with L2 cache and the GIC. The AG5EVM board also supports Ethernet.
Future patches will add support for GPIO, INTCS, CPGA and platform data / driver updates for devices such as IIC, LCDC, FSI, KEYSC, CEU and SDHI among others.
The code in entry-macro.S will be cleaned up when the ARM IRQ demux code improvements have been merged.
Depends on the AG5EVM mach-type recently registered but not yet present in arch/arm/tools/mach-types.
As the AG5EVM board comes with 512MiB memory it is recommended to turn on HIGHMEM.
Many thanks to Yoshii-san for initial bring up.
---
Based on the rmobile/core topic branch in the sh git tree.
arch/arm/mach-shmobile/Kconfig | 12 + arch/arm/mach-shmobile/Makefile | 2 arch/arm/mach-shmobile/board-ag5evm.c | 159 ++++++++++++++ arch/arm/mach-shmobile/clock-sh73a0.c | 101 +++++++++ arch/arm/mach-shmobile/include/mach/common.h | 4 arch/arm/mach-shmobile/include/mach/entry-macro.S | 78 +++++++ arch/arm/mach-shmobile/include/mach/irqs.h | 3 arch/arm/mach-shmobile/include/mach/sh73a0.h | 6 arch/arm/mach-shmobile/setup-sh73a0.c | 234 +++++++++++++++++++++ arch/arm/mm/Kconfig | 2 drivers/serial/sh-sci.h | 7 11 files changed, 607 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/Kconfig +12 -0
@@ -20,6 +20,12 @@ config ARCH_SH7372 select SH_CLK_CPG select ARCH_WANT_OPTIONAL_GPIOLIB +config ARCH_SH73A0 + bool "SH-Mobile AG5 (R8A73A00)" + select CPU_V7 + select SH_CLK_CPG + select ARM_GIC + comment "SH-Mobile Board Type" config MACH_G3EVM
@@ -51,6 +57,10 @@ config AP4EVB_WVGA endchoice +config MACH_AG5EVM + bool "AG5EVM board" + depends on ARCH_SH73A0 + comment "SH-Mobile System Configuration" menu "Memory configuration"
@@ -60,6 +70,7 @@ config MEMORY_START default "0x50000000" if MACH_G3EVM default "0x40000000" if MACH_G4EVM default "0x40000000" if MACH_AP4EVB + default "0x40000000" if MACH_AG5EVM default "0x00000000" ---help--- Tweak this only when porting to a new machine which does not
@@ -71,6 +82,7 @@ config MEMORY_SIZE default "0x08000000" if MACH_G3EVM default "0x08000000" if MACH_G4EVM default "0x10000000" if MACH_AP4EVB + default "0x20000000" if MACH_AG5EVM default "0x04000000" help This sets the default memory size assumed by your kernel. It can
arch/arm/mach-shmobile/Makefile +2 -0
@@ -9,6 +9,7 @@ obj-y := timer.o console.o clock.o pm obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o obj-$(CONFIG_ARCH_SH7377) += setup-sh7377.o clock-sh7377.o intc-sh7377.o obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7372.o intc-sh7372.o +obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o clock-sh73a0.o # Pinmux setup pfc-$(CONFIG_ARCH_SH7367) := pfc-sh7367.o
@@ -20,3 +21,4 @@ obj-$(CONFIG_GENERIC_GPIO) += $(pfc-y) obj-$(CONFIG_MACH_G3EVM) += board-g3evm.o obj-$(CONFIG_MACH_G4EVM) += board-g4evm.o obj-$(CONFIG_MACH_AP4EVB) += board-ap4evb.o +obj-$(CONFIG_MACH_AG5EVM) += board-ag5evm.o
arch/arm/mach-shmobile/board-ag5evm.c new file +159 -0
159 lines not on this page · raw message
arch/arm/mach-shmobile/clock-sh73a0.c new file +101 -0
101 lines not on this page · raw message
arch/arm/mach-shmobile/include/mach/common.h +4 -0
@@ -30,4 +30,8 @@ extern void sh7372_pinmux_init(void);extern struct clk sh7372_extal1_clk;extern struct clk sh7372_extal2_clk; +extern void sh73a0_add_early_devices (void ); +extern void sh73a0_add_standard_devices (void ); +extern void sh73a0_clock_init (void ); +#endif /* __ARCH_MACH_COMMON_H */
arch/arm/mach-shmobile/include/mach/entry-macro.S +78 -0
87 lines not on this page · raw message
arch/arm/mach-shmobile/include/mach/irqs.h +3 -0
@@ -3,6 +3,9 @@#define NR_IRQS 512 +/* GIC */ +#define gic_spi (nr) ((nr) + 32) +/* INTCA */ #define evt2irq (evt) (((evt) >> 5) - 16)#define irq2evt (irq) (((irq) + 16) << 5)
arch/arm/mach-shmobile/include/mach/sh73a0.h new file +6 -0
@@ -0,0 +1,6 @@ +#ifndef __ASM_SH73A0_H__ +#define __ASM_SH73A0_H__ + +/* This will soon be replaced by pinmux enums */ + +#endif /* __ASM_SH73A0_H__ */
arch/arm/mach-shmobile/setup-sh73a0.c new file +234 -0
234 lines not on this page · raw message
arch/arm/mm/Kconfig +1 -1
@@ -772,7 +772,7 @@ config CACHE_L2X0 depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || \ REALVIEW_EB_A9MP || ARCH_MX35 || ARCH_MX31 || MACH_REALVIEW_PBX || \ ARCH_NOMADIK || ARCH_OMAP4 || ARCH_S5PV310 || ARCH_TEGRA || \ - ARCH_U8500 || ARCH_VEXPRESS_CA9X4 + ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || ARCH_SHMOBILE default y select OUTER_CACHE select OUTER_CACHE_SYNC
drivers/serial/sh-sci.h +7 -0
@@ -31,6 +31,7 @@# define SCSCR_INIT (port) (port->mapbase == SCIF2) ? 0xF3 : 0xF0#elif defined(CONFIG_CPU_SUBTYPE_SH7720 ) || \ defined(CONFIG_CPU_SUBTYPE_SH7721 ) || \ + defined(CONFIG_ARCH_SH73A0 ) || \ defined(CONFIG_ARCH_SH7367 ) || \ defined(CONFIG_ARCH_SH7377 ) || \ defined(CONFIG_ARCH_SH7372 )
@@ -244,6 +245,7 @@#if defined(CONFIG_CPU_SUBTYPE_SH7705 ) || \ defined(CONFIG_CPU_SUBTYPE_SH7720 ) || \ defined(CONFIG_CPU_SUBTYPE_SH7721 ) || \ + defined(CONFIG_ARCH_SH73A0 ) || \ defined(CONFIG_ARCH_SH7367 ) || \ defined(CONFIG_ARCH_SH7377 ) || \ defined(CONFIG_ARCH_SH7372 )
@@ -280,6 +282,7 @@#if defined(CONFIG_CPU_SUBTYPE_SH7705 ) || \ defined(CONFIG_CPU_SUBTYPE_SH7720 ) || \ defined(CONFIG_CPU_SUBTYPE_SH7721 ) || \ + defined(CONFIG_ARCH_SH73A0 ) || \ defined(CONFIG_ARCH_SH7367 ) || \ defined(CONFIG_ARCH_SH7377 ) || \ defined(CONFIG_ARCH_SH7372 )
@@ -378,6 +381,7 @@ }#if defined(CONFIG_CPU_SH3 ) || \ + defined(CONFIG_ARCH_SH73A0 ) || \ defined(CONFIG_ARCH_SH7367 ) || \ defined(CONFIG_ARCH_SH7377 ) || \ defined(CONFIG_ARCH_SH7372 )
@@ -391,6 +395,7 @@#elif defined(CONFIG_CPU_SUBTYPE_SH7705 ) || \ defined(CONFIG_CPU_SUBTYPE_SH7720 ) || \ defined(CONFIG_CPU_SUBTYPE_SH7721 ) || \ + defined(CONFIG_ARCH_SH73A0 ) || \ defined(CONFIG_ARCH_SH7367 ) || \ defined(CONFIG_ARCH_SH7377 )#define SCIF_FNS (name, scif_offset, scif_size) \
@@ -433,6 +438,7 @@#if defined(CONFIG_CPU_SUBTYPE_SH7705 ) || \ defined(CONFIG_CPU_SUBTYPE_SH7720 ) || \ defined(CONFIG_CPU_SUBTYPE_SH7721 ) || \ + defined(CONFIG_ARCH_SH73A0 ) || \ defined(CONFIG_ARCH_SH7367 ) || \ defined(CONFIG_ARCH_SH7377 )
@@ -632,6 +638,7 @@ static inline int sci_rxd_in(struct uart#elif defined(CONFIG_CPU_SUBTYPE_SH7705 ) || \ defined(CONFIG_CPU_SUBTYPE_SH7720 ) || \ defined(CONFIG_CPU_SUBTYPE_SH7721 ) || \ + defined(CONFIG_ARCH_SH73A0 ) || \ defined(CONFIG_ARCH_SH7367 ) || \ defined(CONFIG_ARCH_SH7377 ) || \ defined(CONFIG_ARCH_SH7372 )
PATCH 1/1 ARM: mach-shmobile: Initial AG5 and AG5EVM support
Quoted 10 lines · Magnus Damm
This patch adds initial support for Renesas SH-Mobile AG5.
At this point the AG5 CPU support is limited to the ARM core, SCIF serial and a CMT timer together with L2 cache and the GIC. The AG5EVM board also supports Ethernet.
Future patches will add support for GPIO, INTCS, CPGA and platform data / driver updates for devices such as IIC, LCDC, FSI, KEYSC, CEU and SDHI among others.
Looks pretty harmless at first glance.
Quoted 3 lines
The code in
entry-macro.Swill be cleaned up when the ARM IRQ demux code improvements have been merged.
The current code is way too ugly to live, I'll split out as per MSM and some of the others, which should make it pretty easy to layer on top of when your demux changes are merged.
Quoted 3 lines
As the AG5EVM board comes with 512MiB memory it is recommended to turn on HIGHMEM.
You're also missing a defconfig. Preferably with HIGHMEM enabled.