ARM: spear multiplatform support
cover ARM: spear multiplatform support
This is a series I did some time ago but forgot to send out earlier. I'd like to get this into v3.9, so please give this a test if you can.
Arnd Bergmann (13):
ARM: spear13xx: make mach/dma.h local
ARM: spear: unify mach/generic.h and mach/irqs.h
ARM: spear: move identical headers to plat-spear/include/mach
ARM: spear: make spear3xx/6xx mach/spear.h files identical
ARM: spear: merge Kconfig files
ARM: spear: move spear.h and misc_regs.h into plat-spear
ARM: spear: move all files to mach-spear
ARM: spear: move generic.h and pl080.h into private dir
ARM: spear: make clock driver independent of headers
ARM: spear: rename duplicate pl080_plat_data
ARM: spear: use multiplatform configuration options.
ARM: spear: adapt defconfig files for multiplatform
ARM: spear: fix build error in restart.c
arch/arm/Kconfig | 12 +--
arch/arm/Makefile | 5 +-
arch/arm/configs/spear3xx_defconfig | 2 +
arch/arm/configs/spear6xx_defconfig | 1 +
arch/arm/mach-spear/Kconfig | 102 +++++++++++++++++++++
arch/arm/mach-spear/Makefile | 24 +++++
.../{mach-spear13xx => mach-spear}/Makefile.boot | 0
.../include/mach => mach-spear}/generic.h | 30 +++---
arch/arm/{mach-spear13xx => mach-spear}/headsmp.S | 0
arch/arm/{mach-spear13xx => mach-spear}/hotplug.c | 0
.../plat => mach-spear/include/mach}/debug-macro.S | 0
.../include/mach/irqs.h | 22 +++--
.../include/mach/misc_regs.h | 2 +-
arch/arm/mach-spear/include/mach/spear.h | 95 +++++++++++++++++++
.../plat => mach-spear/include/mach}/timex.h | 0
.../plat => mach-spear/include/mach}/uncompress.h | 0
arch/arm/{plat-spear => mach-spear}/pl080.c | 0
.../include/plat => mach-spear}/pl080.h | 0
arch/arm/{mach-spear13xx => mach-spear}/platsmp.c | 2 +-
arch/arm/{plat-spear => mach-spear}/restart.c | 5 +-
.../arm/{mach-spear13xx => mach-spear}/spear1310.c | 4 +-
.../arm/{mach-spear13xx => mach-spear}/spear1340.c | 5 +-
.../mach/dma.h => mach-spear/spear13xx-dma.h} | 0
.../arm/{mach-spear13xx => mach-spear}/spear13xx.c | 9 +-
arch/arm/{mach-spear3xx => mach-spear}/spear300.c | 4 +-
arch/arm/{mach-spear3xx => mach-spear}/spear310.c | 4 +-
arch/arm/{mach-spear3xx => mach-spear}/spear320.c | 7 +-
arch/arm/{mach-spear3xx => mach-spear}/spear3xx.c | 17 ++--
arch/arm/{mach-spear6xx => mach-spear}/spear6xx.c | 25 ++---
arch/arm/{plat-spear => mach-spear}/time.c | 2 +-
arch/arm/mach-spear13xx/Kconfig | 20 ----
arch/arm/mach-spear13xx/Makefile | 10 --
arch/arm/mach-spear13xx/include/mach/debug-macro.S | 14 ---
arch/arm/mach-spear13xx/include/mach/hardware.h | 1 -
arch/arm/mach-spear13xx/include/mach/irqs.h | 20 ----
arch/arm/mach-spear13xx/include/mach/spear.h | 54 -----------
arch/arm/mach-spear13xx/include/mach/timex.h | 19 ----
arch/arm/mach-spear13xx/include/mach/uncompress.h | 19 ----
arch/arm/mach-spear3xx/Kconfig | 26 ------
arch/arm/mach-spear3xx/Makefile | 15 ---
arch/arm/mach-spear3xx/Makefile.boot | 3 -
arch/arm/mach-spear3xx/include/mach/debug-macro.S | 14 ---
arch/arm/mach-spear3xx/include/mach/generic.h | 37 --------
arch/arm/mach-spear3xx/include/mach/hardware.h | 1 -
arch/arm/mach-spear3xx/include/mach/irqs.h | 19 ----
arch/arm/mach-spear3xx/include/mach/spear.h | 60 ------------
arch/arm/mach-spear3xx/include/mach/timex.h | 19 ----
arch/arm/mach-spear3xx/include/mach/uncompress.h | 19 ----
arch/arm/mach-spear6xx/Kconfig | 10 --
arch/arm/mach-spear6xx/Makefile | 6 --
arch/arm/mach-spear6xx/Makefile.boot | 3 -
arch/arm/mach-spear6xx/include/mach/debug-macro.S | 14 ---
arch/arm/mach-spear6xx/include/mach/generic.h | 23 -----
arch/arm/mach-spear6xx/include/mach/hardware.h | 1 -
arch/arm/mach-spear6xx/include/mach/misc_regs.h | 22 -----
arch/arm/mach-spear6xx/include/mach/spear.h | 46 ----------
arch/arm/mach-spear6xx/include/mach/timex.h | 19 ----
arch/arm/mach-spear6xx/include/mach/uncompress.h | 19 ----
arch/arm/plat-spear/Kconfig | 46 ----------
arch/arm/plat-spear/Makefile | 9 --
drivers/clk/spear/spear1310_clock.c | 64 +++++++------
drivers/clk/spear/spear1340_clock.c | 63 +++++++------
drivers/clk/spear/spear3xx_clock.c | 60 +++++++-----
drivers/clk/spear/spear6xx_clock.c | 31 +++----
64 files changed, 420 insertions(+), 765 deletions(-)
create mode 100644 arch/arm/mach-spear/Kconfig
create mode 100644 arch/arm/mach-spear/Makefile
rename arch/arm/{mach-spear13xx => mach-spear}/Makefile.boot (100%)
rename arch/arm/{mach-spear13xx/include/mach => mach-spear}/generic.h (58%)
rename arch/arm/{mach-spear13xx => mach-spear}/headsmp.S (100%)
rename arch/arm/{mach-spear13xx => mach-spear}/hotplug.c (100%)
rename arch/arm/{plat-spear/include/plat => mach-spear/include/mach}/debug-macro.S (100%)
rename arch/arm/{mach-spear6xx => mach-spear}/include/mach/irqs.h (51%)
rename arch/arm/{mach-spear3xx => mach-spear}/include/mach/misc_regs.h (90%)
create mode 100644 arch/arm/mach-spear/include/mach/spear.h
rename arch/arm/{plat-spear/include/plat => mach-spear/include/mach}/timex.h (100%)
rename arch/arm/{plat-spear/include/plat => mach-spear/include/mach}/uncompress.h (100%)
rename arch/arm/{plat-spear => mach-spear}/pl080.c (100%)
rename arch/arm/{plat-spear/include/plat => mach-spear}/pl080.h (100%)
rename arch/arm/{mach-spear13xx => mach-spear}/platsmp.c (99%)
rename arch/arm/{plat-spear => mach-spear}/restart.c (90%)
rename arch/arm/{mach-spear13xx => mach-spear}/spear1310.c (95%)
rename arch/arm/{mach-spear13xx => mach-spear}/spear1340.c (99%)
rename arch/arm/{mach-spear13xx/include/mach/dma.h => mach-spear/spear13xx-dma.h} (100%)
rename arch/arm/{mach-spear13xx => mach-spear}/spear13xx.c (97%)
rename arch/arm/{mach-spear3xx => mach-spear}/spear300.c (98%)
rename arch/arm/{mach-spear3xx => mach-spear}/spear310.c (98%)
rename arch/arm/{mach-spear3xx => mach-spear}/spear320.c (97%)
rename arch/arm/{mach-spear3xx => mach-spear}/spear3xx.c (90%)
rename arch/arm/{mach-spear6xx => mach-spear}/spear6xx.c (94%)
rename arch/arm/{plat-spear => mach-spear}/time.c (99%)
delete mode 100644 arch/arm/mach-spear13xx/Kconfig
delete mode 100644 arch/arm/mach-spear13xx/Makefile
delete mode 100644 arch/arm/mach-spear13xx/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-spear13xx/include/mach/hardware.h
delete mode 100644 arch/arm/mach-spear13xx/include/mach/irqs.h
delete mode 100644 arch/arm/mach-spear13xx/include/mach/spear.h
delete mode 100644 arch/arm/mach-spear13xx/include/mach/timex.h
delete mode 100644 arch/arm/mach-spear13xx/include/mach/uncompress.h
delete mode 100644 arch/arm/mach-spear3xx/Kconfig
delete mode 100644 arch/arm/mach-spear3xx/Makefile
delete mode 100644 arch/arm/mach-spear3xx/Makefile.boot
delete mode 100644 arch/arm/mach-spear3xx/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-spear3xx/include/mach/generic.h
delete mode 100644 arch/arm/mach-spear3xx/include/mach/hardware.h
delete mode 100644 arch/arm/mach-spear3xx/include/mach/irqs.h
delete mode 100644 arch/arm/mach-spear3xx/include/mach/spear.h
delete mode 100644 arch/arm/mach-spear3xx/include/mach/timex.h
delete mode 100644 arch/arm/mach-spear3xx/include/mach/uncompress.h
delete mode 100644 arch/arm/mach-spear6xx/Kconfig
delete mode 100644 arch/arm/mach-spear6xx/Makefile
delete mode 100644 arch/arm/mach-spear6xx/Makefile.boot
delete mode 100644 arch/arm/mach-spear6xx/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-spear6xx/include/mach/generic.h
delete mode 100644 arch/arm/mach-spear6xx/include/mach/hardware.h
delete mode 100644 arch/arm/mach-spear6xx/include/mach/misc_regs.h
delete mode 100644 arch/arm/mach-spear6xx/include/mach/spear.h
delete mode 100644 arch/arm/mach-spear6xx/include/mach/timex.h
delete mode 100644 arch/arm/mach-spear6xx/include/mach/uncompress.h
delete mode 100644 arch/arm/plat-spear/Kconfig
delete mode 100644 arch/arm/plat-spear/MakefileSignature · 1 line
1.8.0
PATCH 1/13 ARM: spear13xx: make mach/dma.h local
There is no reason for this header file to be globally visible, so let's just move it into the mach directory.
---
arch/arm/mach-spear13xx/spear1340.c | 3 ++-
arch/arm/mach-spear13xx/{include/mach/dma.h => spear13xx-dma.h} | 0
arch/arm/mach-spear13xx/spear13xx.c | 3 ++-
3 files changed, 4 insertions(+), 2 deletions(-)
rename arch/arm/mach-spear13xx/{include/mach/dma.h => spear13xx-dma.h} (100%)arch/arm/mach-spear13xx/spear1340.c +2 -1
@@ -20,10 +20,11 @@#include <linux/of_platform.h> #include <asm/hardware/gic.h> #include <asm/mach/arch.h> -#include <mach/dma.h> #include <mach/generic.h> #include <mach/spear.h> +#include "spear13xx-dma.h" +/* Base addresses */ #define SPEAR1340_SATA_BASE UL(0xB1000000)#define SPEAR1340_UART1_BASE UL(0xB4100000)
arch/arm/mach-spear13xx/spear13xx-dma.h renamed from arch/arm/mach-spear13xx/include/mach/dma.h +0 -0
arch/arm/mach-spear13xx/spear13xx.c +2 -1
@@ -22,10 +22,11 @@#include <asm/hardware/gic.h> #include <asm/mach/map.h> #include <asm/smp_twd.h> -#include <mach/dma.h> #include <mach/generic.h> #include <mach/spear.h> +#include "spear13xx-dma.h" +/* common dw_dma filter routine to be used by peripherals */ bool dw_dma_filter (struct dma_chan *chan,void *slave) {
Signature · 1 line
1.8.0
PATCH 2/13 ARM: spear: unify mach/generic.h and mach/irqs.h
In reply to Arnd BergmannThese are indeed easy to combine, as there are no conflicting definitions in generic.h, and irqs.h will be obsolete once we enable SPARSE_IRQ.
--- arch/arm/mach-spear13xx/include/mach/generic.h | 21 +++++++---- arch/arm/mach-spear13xx/include/mach/irqs.h | 23 +++++++++--- arch/arm/mach-spear3xx/include/mach/generic.h | 42 ++++++++++++++++------ arch/arm/mach-spear3xx/include/mach/irqs.h | 24 ++++++++++--- arch/arm/mach-spear3xx/spear320.c | 1 + arch/arm/mach-spear3xx/spear3xx.c | 2 ++ arch/arm/mach-spear6xx/include/mach/generic.h | 48 ++++++++++++++++++++++---- arch/arm/mach-spear6xx/include/mach/irqs.h | 22 ++++++++---- 8 files changed, 146 insertions(+), 37 deletions(-)
arch/arm/mach-spear13xx/include/mach/generic.h +14 -7
@@ -1,9 +1,8 @@/* -* arch/arm/mach-spear13xx/include/mach/generic.h +* spear machine family generic header file * -* spear13xx machine family generic header file -* -* Copyright (C) 2012 ST Microelectronics +* Copyright (C) 2009-2012 ST Microelectronics +* Rajeev Kumar <[email protected]> * Viresh Kumar <[email protected]> * * This file is licensed under the terms of the GNU General Public
@@ -15,23 +14,31 @@#define __MACH_GENERIC_H#include <linux/dmaengine.h> +#include <linux/amba/pl08x.h> +#include <linux/init.h> #include <asm/mach/time.h> -/* Add spear13xx structure declarations here */ extern struct sys_timer spear13xx_timer; +extern struct sys_timer spear3xx_timer;extern struct pl022_ssp_controller pl022_plat_data; +extern struct pl08x_platform_data pl080_plat_data;extern struct dw_dma_platform_data dmac_plat_data;extern struct dw_dma_slave cf_dma_priv;extern struct dw_dma_slave nand_read_dma_priv;extern struct dw_dma_slave nand_write_dma_priv; +bool dw_dma_filter (struct dma_chan *chan,void *slave); -/* Add spear13xx family function declarations here */ void __init spear_setup_of_timer (void ); +void __init spear3xx_clk_init (void ); +void __init spear3xx_map_io (void ); +void __init spear3xx_dt_init_irq (void ); +void __init spear6xx_clk_init (void );void __init spear13xx_map_io (void );void __init spear13xx_dt_init_irq (void );void __init spear13xx_l2x0_init (void ); -bool dw_dma_filter (struct dma_chan *chan,void *slave); +void spear_restart (char ,const char *); +void spear13xx_secondary_startup (void );void __cpuinit spear13xx_cpu_die (unsigned int cpu);
arch/arm/mach-spear13xx/include/mach/irqs.h +19 -4
@@ -1,9 +1,8 @@/* -* arch/arm/mach-spear13xx/include/mach/irqs.h +* IRQ helper macros for spear machine family * -* IRQ helper macros for spear13xx machine family -* -* Copyright (C) 2012 ST Microelectronics +* Copyright (C) 2009-2012 ST Microelectronics +* Rajeev Kumar <[email protected]> * Viresh Kumar <[email protected]> * * This file is licensed under the terms of the GNU General Public
@@ -14,7 +13,23 @@#ifndef __MACH_IRQS_H#define __MACH_IRQS_H +#ifdef CONFIG_ARCH_SPEAR3XX +#define NR_IRQS 256 +#endif + +#ifdef CONFIG_ARCH_SPEAR6XX +/* IRQ definitions */ +/* VIC 1 */ +#define IRQ_VIC_END 64 + +/* GPIO pins virtual irqs */ +#define VIRTUAL_IRQS 24 +#define NR_IRQS (IRQ_VIC_END + VIRTUAL_IRQS) +#endif + +#ifdef CONFIG_ARCH_SPEAR13XX #define IRQ_GIC_END 160#define NR_IRQS IRQ_GIC_END +#endif #endif /* __MACH_IRQS_H */
arch/arm/mach-spear3xx/include/mach/generic.h +32 -10
66 lines not on this page · raw message
arch/arm/mach-spear3xx/include/mach/irqs.h +20 -4
@@ -1,9 +1,8 @@/* -* arch/arm/mach-spear3xx/include/mach/irqs.h +* IRQ helper macros for spear machine family * -* IRQ helper macros for SPEAr3xx machine family -* -* Copyright (C) 2009 ST Microelectronics +* Copyright (C) 2009-2012 ST Microelectronics +* Rajeev Kumar <[email protected]> * Viresh Kumar <[email protected]> * * This file is licensed under the terms of the GNU General Public
@@ -14,6 +13,23 @@#ifndef __MACH_IRQS_H#define __MACH_IRQS_H +#ifdef CONFIG_ARCH_SPEAR3XX #define NR_IRQS 256 +#endif + +#ifdef CONFIG_ARCH_SPEAR6XX +/* IRQ definitions */ +/* VIC 1 */ +#define IRQ_VIC_END 64 + +/* GPIO pins virtual irqs */ +#define VIRTUAL_IRQS 24 +#define NR_IRQS (IRQ_VIC_END + VIRTUAL_IRQS) +#endif + +#ifdef CONFIG_ARCH_SPEAR13XX +#define IRQ_GIC_END 160 +#define NR_IRQS IRQ_GIC_END +#endif #endif /* __MACH_IRQS_H */
arch/arm/mach-spear3xx/spear320.c +1 -0
@@ -19,6 +19,7 @@#include <linux/of_platform.h> #include <asm/hardware/vic.h> #include <asm/mach/arch.h> +#include <asm/mach/map.h> #include <mach/generic.h> #include <mach/spear.h>
arch/arm/mach-spear3xx/spear3xx.c +2 -0
@@ -17,9 +17,11 @@#include <linux/amba/pl08x.h> #include <linux/irqchip/spear-shirq.h> #include <linux/of_irq.h> +#include <linux/clk.h> #include <linux/io.h> #include <asm/hardware/pl080.h> #include <asm/hardware/vic.h> +#include <asm/mach/map.h> #include <plat/pl080.h> #include <mach/generic.h> #include <mach/spear.h>
arch/arm/mach-spear6xx/include/mach/generic.h +42 -6
62 lines not on this page · raw message
arch/arm/mach-spear6xx/include/mach/irqs.h +16 -6
@@ -1,10 +1,9 @@/* -* arch/arm/mach-spear6xx/include/mach/irqs.h +* IRQ helper macros for spear machine family * -* IRQ helper macros for SPEAr6xx machine family -* -* Copyright (C) 2009 ST Microelectronics -* Rajeev Kumar<[email protected]> +* Copyright (C) 2009-2012 ST Microelectronics +* Rajeev Kumar <[email protected]> +* Viresh Kumar <[email protected]> * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any
@@ -14,6 +13,11 @@#ifndef __MACH_IRQS_H#define __MACH_IRQS_H +#ifdef CONFIG_ARCH_SPEAR3XX +#define NR_IRQS 256 +#endif + +#ifdef CONFIG_ARCH_SPEAR6XX /* IRQ definitions */ /* VIC 1 */ #define IRQ_VIC_END 64
@@ -21,5 +25,11 @@/* GPIO pins virtual irqs */ #define VIRTUAL_IRQS 24#define NR_IRQS (IRQ_VIC_END + VIRTUAL_IRQS) +#endif + +#ifdef CONFIG_ARCH_SPEAR13XX +#define IRQ_GIC_END 160 +#define NR_IRQS IRQ_GIC_END +#endif -#endif /* __MACH_IRQS_H */ +#endif /* __MACH_IRQS_H */
Signature · 1 line
1.8.0
PATCH 3/13 ARM: spear: move identical headers to plat-spear/include/mach
In reply to Arnd BergmannAs an intermediate step towards unification of the three spear platforms, this gets rid of the mach/* header files that are obviously not platform specific.
---
arch/arm/mach-spear13xx/include/mach/debug-macro.S | 14 -----
arch/arm/mach-spear13xx/include/mach/timex.h | 19 -------
arch/arm/mach-spear13xx/include/mach/uncompress.h | 19 -------
arch/arm/mach-spear3xx/include/mach/debug-macro.S | 14 -----
arch/arm/mach-spear3xx/include/mach/generic.h | 59 ----------------------
arch/arm/mach-spear3xx/include/mach/hardware.h | 1 -
arch/arm/mach-spear3xx/include/mach/irqs.h | 35 -------------
arch/arm/mach-spear3xx/include/mach/timex.h | 19 -------
arch/arm/mach-spear3xx/include/mach/uncompress.h | 19 -------
arch/arm/mach-spear6xx/include/mach/debug-macro.S | 14 -----
arch/arm/mach-spear6xx/include/mach/generic.h | 59 ----------------------
arch/arm/mach-spear6xx/include/mach/hardware.h | 1 -
arch/arm/mach-spear6xx/include/mach/irqs.h | 35 -------------
arch/arm/mach-spear6xx/include/mach/timex.h | 19 -------
arch/arm/mach-spear6xx/include/mach/uncompress.h | 19 -------
.../include/{plat => mach}/debug-macro.S | 0
.../include/mach/generic.h | 0
.../include/mach/hardware.h | 0
.../include/mach/irqs.h | 0
arch/arm/plat-spear/include/{plat => mach}/timex.h | 0
.../plat-spear/include/{plat => mach}/uncompress.h | 0
21 files changed, 346 deletions(-)
delete mode 100644 arch/arm/mach-spear13xx/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-spear13xx/include/mach/timex.h
delete mode 100644 arch/arm/mach-spear13xx/include/mach/uncompress.h
delete mode 100644 arch/arm/mach-spear3xx/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-spear3xx/include/mach/generic.h
delete mode 100644 arch/arm/mach-spear3xx/include/mach/hardware.h
delete mode 100644 arch/arm/mach-spear3xx/include/mach/irqs.h
delete mode 100644 arch/arm/mach-spear3xx/include/mach/timex.h
delete mode 100644 arch/arm/mach-spear3xx/include/mach/uncompress.h
delete mode 100644 arch/arm/mach-spear6xx/include/mach/debug-macro.S
delete mode 100644 arch/arm/mach-spear6xx/include/mach/generic.h
delete mode 100644 arch/arm/mach-spear6xx/include/mach/hardware.h
delete mode 100644 arch/arm/mach-spear6xx/include/mach/irqs.h
delete mode 100644 arch/arm/mach-spear6xx/include/mach/timex.h
delete mode 100644 arch/arm/mach-spear6xx/include/mach/uncompress.h
rename arch/arm/plat-spear/include/{plat => mach}/debug-macro.S (100%)
rename arch/arm/{mach-spear13xx => plat-spear}/include/mach/generic.h (100%)
rename arch/arm/{mach-spear13xx => plat-spear}/include/mach/hardware.h (100%)
rename arch/arm/{mach-spear13xx => plat-spear}/include/mach/irqs.h (100%)
rename arch/arm/plat-spear/include/{plat => mach}/timex.h (100%)
rename arch/arm/plat-spear/include/{plat => mach}/uncompress.h (100%)arch/arm/mach-spear13xx/include/mach/debug-macro.S deleted +0 -14
@@ -1,14 +0,0 @@ -/* - * arch/arm/mach-spear13xx/include/mach/debug-macro.S - * - * Debugging macro include header spear13xx machine family - * - * Copyright (C) 2012 ST Microelectronics - * Viresh Kumar <[email protected]> - * - * 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 <plat/debug-macro.S>
arch/arm/mach-spear13xx/include/mach/timex.h deleted +0 -19
@@ -1,19 +0,0 @@ -/* -* arch/arm/mach-spear3xx/include/mach/timex.h -* -* SPEAr3XX machine family specific timex definitions -* -* Copyright (C) 2012 ST Microelectronics -* Viresh Kumar <[email protected]> -* -* 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. -*/ - -#ifndef __MACH_TIMEX_H -#define __MACH_TIMEX_H - -#include <plat/timex.h> - -#endif /* __MACH_TIMEX_H */
arch/arm/mach-spear13xx/include/mach/uncompress.h deleted +0 -19
@@ -1,19 +0,0 @@ -/* -* arch/arm/mach-spear13xx/include/mach/uncompress.h -* -* Serial port stubs for kernel decompress status messages -* -* Copyright (C) 2012 ST Microelectronics -* Viresh Kumar <[email protected]> -* -* 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. -*/ - -#ifndef __MACH_UNCOMPRESS_H -#define __MACH_UNCOMPRESS_H - -#include <plat/uncompress.h> - -#endif /* __MACH_UNCOMPRESS_H */
arch/arm/mach-spear3xx/include/mach/debug-macro.S deleted +0 -14
@@ -1,14 +0,0 @@ -/* - * arch/arm/mach-spear3xx/include/mach/debug-macro.S - * - * Debugging macro include header spear3xx machine family - * - * Copyright (C) 2009 ST Microelectronics - * Viresh Kumar<[email protected]> - * - * 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 <plat/debug-macro.S>
arch/arm/mach-spear3xx/include/mach/generic.h deleted +0 -59
59 lines not on this page · raw message
arch/arm/mach-spear3xx/include/mach/hardware.h deleted +0 -1
@@ -1 +0,0 @@ -/* empty */
arch/arm/mach-spear3xx/include/mach/irqs.h deleted +0 -35
@@ -1,35 +0,0 @@ -/* -* IRQ helper macros for spear machine family -* -* Copyright (C) 2009-2012 ST Microelectronics -* Rajeev Kumar <[email protected]> -* Viresh Kumar <[email protected]> -* -* 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. -*/ - -#ifndef __MACH_IRQS_H -#define __MACH_IRQS_H - -#ifdef CONFIG_ARCH_SPEAR3XX -#define NR_IRQS 256 -#endif - -#ifdef CONFIG_ARCH_SPEAR6XX -/* IRQ definitions */ -/* VIC 1 */ -#define IRQ_VIC_END 64 - -/* GPIO pins virtual irqs */ -#define VIRTUAL_IRQS 24 -#define NR_IRQS (IRQ_VIC_END + VIRTUAL_IRQS) -#endif - -#ifdef CONFIG_ARCH_SPEAR13XX -#define IRQ_GIC_END 160 -#define NR_IRQS IRQ_GIC_END -#endif - -#endif /* __MACH_IRQS_H */
arch/arm/mach-spear3xx/include/mach/timex.h deleted +0 -19
@@ -1,19 +0,0 @@ -/* -* arch/arm/mach-spear3xx/include/mach/timex.h -* -* SPEAr3XX machine family specific timex definitions -* -* Copyright (C) 2009 ST Microelectronics -* Viresh Kumar <[email protected]> -* -* 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. -*/ - -#ifndef __MACH_TIMEX_H -#define __MACH_TIMEX_H - -#include <plat/timex.h> - -#endif /* __MACH_TIMEX_H */
arch/arm/mach-spear3xx/include/mach/uncompress.h deleted +0 -19
@@ -1,19 +0,0 @@ -/* -* arch/arm/mach-spear3xx/include/mach/uncompress.h -* -* Serial port stubs for kernel decompress status messages -* -* Copyright (C) 2009 ST Microelectronics -* Viresh Kumar <[email protected]> -* -* 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. -*/ - -#ifndef __MACH_UNCOMPRESS_H -#define __MACH_UNCOMPRESS_H - -#include <plat/uncompress.h> - -#endif /* __MACH_UNCOMPRESS_H */
arch/arm/mach-spear6xx/include/mach/debug-macro.S deleted +0 -14
@@ -1,14 +0,0 @@ -/* - * arch/arm/mach-spear6xx/include/mach/debug-macro.S - * - * Debugging macro include header for SPEAr6xx machine family - * - * Copyright (C) 2009 ST Microelectronics - * Rajeev Kumar<[email protected]> - * - * 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 <plat/debug-macro.S>
arch/arm/mach-spear6xx/include/mach/generic.h deleted +0 -59
59 lines not on this page · raw message
arch/arm/mach-spear6xx/include/mach/hardware.h deleted +0 -1
@@ -1 +0,0 @@ -/* empty */
arch/arm/mach-spear6xx/include/mach/irqs.h deleted +0 -35
@@ -1,35 +0,0 @@ -/* -* IRQ helper macros for spear machine family -* -* Copyright (C) 2009-2012 ST Microelectronics -* Rajeev Kumar <[email protected]> -* Viresh Kumar <[email protected]> -* -* 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. -*/ - -#ifndef __MACH_IRQS_H -#define __MACH_IRQS_H - -#ifdef CONFIG_ARCH_SPEAR3XX -#define NR_IRQS 256 -#endif - -#ifdef CONFIG_ARCH_SPEAR6XX -/* IRQ definitions */ -/* VIC 1 */ -#define IRQ_VIC_END 64 - -/* GPIO pins virtual irqs */ -#define VIRTUAL_IRQS 24 -#define NR_IRQS (IRQ_VIC_END + VIRTUAL_IRQS) -#endif - -#ifdef CONFIG_ARCH_SPEAR13XX -#define IRQ_GIC_END 160 -#define NR_IRQS IRQ_GIC_END -#endif - -#endif /* __MACH_IRQS_H */
arch/arm/mach-spear6xx/include/mach/timex.h deleted +0 -19
@@ -1,19 +0,0 @@ -/* -* arch/arm/mach-spear6xx/include/mach/timex.h -* -* SPEAr6XX machine family specific timex definitions -* -* Copyright (C) 2009 ST Microelectronics -* Rajeev Kumar<[email protected]> -* -* 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. -*/ - -#ifndef __MACH_TIMEX_H -#define __MACH_TIMEX_H - -#include <plat/timex.h> - -#endif /* __MACH_TIMEX_H */
arch/arm/mach-spear6xx/include/mach/uncompress.h deleted +0 -19
@@ -1,19 +0,0 @@ -/* -* arch/arm/mach-spear6xx/include/mach/uncompress.h -* -* Serial port stubs for kernel decompress status messages -* -* Copyright (C) 2009 ST Microelectronics -* Rajeev Kumar<[email protected]> -* -* 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. -*/ - -#ifndef __MACH_UNCOMPRESS_H -#define __MACH_UNCOMPRESS_H - -#include <plat/uncompress.h> - -#endif /* __MACH_UNCOMPRESS_H */
arch/arm/plat-spear/include/mach/debug-macro.S renamed from arch/arm/plat-spear/include/plat/debug-macro.S +0 -0
arch/arm/plat-spear/include/mach/generic.h renamed from arch/arm/mach-spear13xx/include/mach/generic.h +0 -0
arch/arm/plat-spear/include/mach/hardware.h renamed from arch/arm/mach-spear13xx/include/mach/hardware.h +0 -0
arch/arm/plat-spear/include/mach/irqs.h renamed from arch/arm/mach-spear13xx/include/mach/irqs.h +0 -0
arch/arm/plat-spear/include/mach/timex.h renamed from arch/arm/plat-spear/include/plat/timex.h +0 -0
arch/arm/plat-spear/include/mach/uncompress.h renamed from arch/arm/plat-spear/include/plat/uncompress.h +0 -0
Signature · 1 line
1.8.0
PATCH 4/13 ARM: spear: make spear3xx/6xx mach/spear.h files identical
In reply to Arnd BergmannThe two files are almost identical already basically just differ in the identifier names. By changing the identifiers to be the same, we are able to merge the two as a preparation to building a combined kernel.
--- arch/arm/mach-spear3xx/include/mach/misc_regs.h | 2 +- arch/arm/mach-spear3xx/include/mach/spear.h | 47 ++++++++++--------- arch/arm/mach-spear3xx/spear300.c | 2 +- arch/arm/mach-spear3xx/spear310.c | 2 +- arch/arm/mach-spear3xx/spear320.c | 2 +- arch/arm/mach-spear3xx/spear3xx.c | 8 ++-- arch/arm/mach-spear6xx/include/mach/misc_regs.h | 2 +- arch/arm/mach-spear6xx/include/mach/spear.h | 61 +++++++++++++++---------- arch/arm/mach-spear6xx/spear6xx.c | 12 ++--- 9 files changed, 75 insertions(+), 63 deletions(-)
arch/arm/mach-spear3xx/include/mach/misc_regs.h +1 -1
@@ -16,7 +16,7 @@#include <mach/spear.h> -#define MISC_BASE IOMEM(VA_SPEAR3XX_ICM3_MISC_REG_BASE) +#define MISC_BASE IOMEM(VA_SPEAR_ICM3_MISC_REG_BASE)#define DMA_CHN_CFG (MISC_BASE + 0x0A0)#endif /* __MACH_MISC_REGS_H */
arch/arm/mach-spear3xx/include/mach/spear.h +23 -24
74 lines not on this page · raw message
arch/arm/mach-spear3xx/spear300.c +1 -1
@@ -185,7 +185,7 @@ struct pl08x_channel_data spear300_dma_info[] = {static struct of_dev_auxdata spear300_auxdata_lookup[]__initdata = {OF_DEV_AUXDATA ("arm,pl022" ,SPEAR3XX_ICM1_SSP_BASE ,NULL , &pl022_plat_data), -OF_DEV_AUXDATA ("arm,pl080" ,SPEAR3XX_ICM3_DMA_BASE ,NULL , +OF_DEV_AUXDATA ("arm,pl080" ,SPEAR_ICM3_DMA_BASE ,NULL , &pl080_plat_data), {} };
arch/arm/mach-spear3xx/spear310.c +1 -1
@@ -217,7 +217,7 @@ static struct amba_pl011_data spear310_uart_data[] = {static struct of_dev_auxdata spear310_auxdata_lookup[]__initdata = {OF_DEV_AUXDATA ("arm,pl022" ,SPEAR3XX_ICM1_SSP_BASE ,NULL , &pl022_plat_data), -OF_DEV_AUXDATA ("arm,pl080" ,SPEAR3XX_ICM3_DMA_BASE ,NULL , +OF_DEV_AUXDATA ("arm,pl080" ,SPEAR_ICM3_DMA_BASE ,NULL , &pl080_plat_data),OF_DEV_AUXDATA ("arm,pl011" ,SPEAR310_UART1_BASE ,NULL , &spear310_uart_data[0 ]),
arch/arm/mach-spear3xx/spear320.c +1 -1
@@ -223,7 +223,7 @@ static struct amba_pl011_data spear320_uart_data[] = {static struct of_dev_auxdata spear320_auxdata_lookup[]__initdata = {OF_DEV_AUXDATA ("arm,pl022" ,SPEAR3XX_ICM1_SSP_BASE ,NULL , &pl022_plat_data), -OF_DEV_AUXDATA ("arm,pl080" ,SPEAR3XX_ICM3_DMA_BASE ,NULL , +OF_DEV_AUXDATA ("arm,pl080" ,SPEAR_ICM3_DMA_BASE ,NULL , &pl080_plat_data),OF_DEV_AUXDATA ("arm,pl022" ,SPEAR320_SSP0_BASE ,NULL , &spear320_ssp_data[0 ]),
arch/arm/mach-spear3xx/spear3xx.c +4 -4
@@ -71,13 +71,13 @@ struct pl08x_platform_data pl080_plat_data = {*/ struct map_desc spear3xx_io_desc[]__initdata = { { - .virtual =VA_SPEAR3XX_ICM1_2_BASE , - .pfn =__phys_to_pfn (SPEAR3XX_ICM1_2_BASE ), + .virtual =VA_SPEAR_ICM1_2_BASE , + .pfn =__phys_to_pfn (SPEAR_ICM1_2_BASE ), .length =SZ_16M , .type =MT_DEVICE }, { - .virtual =VA_SPEAR3XX_ICM3_SMI_CTRL_BASE , - .pfn =__phys_to_pfn (SPEAR3XX_ICM3_SMI_CTRL_BASE ), + .virtual =VA_SPEAR_ICM3_SMI_CTRL_BASE , + .pfn =__phys_to_pfn (SPEAR_ICM3_SMI_CTRL_BASE ), .length =SZ_16M , .type =MT_DEVICE },
arch/arm/mach-spear6xx/include/mach/misc_regs.h +1 -1
@@ -16,7 +16,7 @@#include <mach/spear.h> -#define MISC_BASE IOMEM(VA_SPEAR6XX_ICM3_MISC_REG_BASE) +#define MISC_BASE IOMEM(VA_SPEAR_ICM3_MISC_REG_BASE)#define DMA_CHN_CFG (MISC_BASE + 0x0A0)#endif /* __MACH_MISC_REGS_H */
arch/arm/mach-spear6xx/include/mach/spear.h +37 -24
83 lines not on this page · raw message
arch/arm/mach-spear6xx/spear6xx.c +6 -6
@@ -352,17 +352,17 @@ struct pl08x_platform_data pl080_plat_data = {struct map_desc spear6xx_io_desc[]__initdata = { { .virtual =VA_SPEAR6XX_ML_CPU_BASE , - .pfn =__phys_to_pfn (SPEAR6XX_ML_CPU_BASE ), + .pfn =__phys_to_pfn (SPEAR_ICM3_ML1_2_BASE ), .length =2 *SZ_16M , .type =MT_DEVICE }, { - .virtual =VA_SPEAR6XX_ICM1_BASE , - .pfn =__phys_to_pfn (SPEAR6XX_ICM1_BASE ), + .virtual =VA_SPEAR_ICM1_2_BASE , + .pfn =__phys_to_pfn (SPEAR_ICM1_2_BASE ), .length =SZ_16M , .type =MT_DEVICE }, { - .virtual =VA_SPEAR6XX_ICM3_SMI_CTRL_BASE , - .pfn =__phys_to_pfn (SPEAR6XX_ICM3_SMI_CTRL_BASE ), + .virtual =VA_SPEAR_ICM3_SMI_CTRL_BASE , + .pfn =__phys_to_pfn (SPEAR_ICM3_SMI_CTRL_BASE ), .length =SZ_16M , .type =MT_DEVICE },
@@ -409,7 +409,7 @@ struct sys_timer spear6xx_timer = {/* Add auxdata to pass platform data */ struct of_dev_auxdata spear6xx_auxdata_lookup[]__initdata = { -OF_DEV_AUXDATA ("arm,pl080" ,SPEAR6XX_ICM3_DMA_BASE ,NULL , +OF_DEV_AUXDATA ("arm,pl080" ,SPEAR_ICM3_DMA_BASE ,NULL , &pl080_plat_data), {} };
Signature · 1 line
1.8.0
PATCH 5/13 ARM: spear: merge Kconfig files
In reply to Arnd BergmannAs a preparation to merging the spear platforms into one directory, this merges the four Kconfig files into one.
--- arch/arm/mach-spear13xx/Kconfig | 20 ---------------- arch/arm/mach-spear3xx/Kconfig | 26 --------------------- arch/arm/mach-spear6xx/Kconfig | 10 -------- arch/arm/plat-spear/Kconfig | 51 +++++++++++++++++++++++++++++++++++++---- 4 files changed, 47 insertions(+), 60 deletions(-) delete mode 100644 arch/arm/mach-spear13xx/Kconfig delete mode 100644 arch/arm/mach-spear3xx/Kconfig delete mode 100644 arch/arm/mach-spear6xx/Kconfig
arch/arm/mach-spear13xx/Kconfig deleted +0 -20
@@ -1,20 +0,0 @@ -# -# SPEAr13XX Machine configuration file -# - -if ARCH_SPEAR13XX - -menu "SPEAr13xx Implementations" -config MACH_SPEAR1310 - bool "SPEAr1310 Machine support with Device Tree" - select PINCTRL_SPEAR1310 - help - Supports ST SPEAr1310 machine configured via the device-tree - -config MACH_SPEAR1340 - bool "SPEAr1340 Machine support with Device Tree" - select PINCTRL_SPEAR1340 - help - Supports ST SPEAr1340 machine configured via the device-tree -endmenu -endif #ARCH_SPEAR13XX
arch/arm/mach-spear3xx/Kconfig deleted +0 -26
@@ -1,26 +0,0 @@ -# -# SPEAr3XX Machine configuration file -# - -if ARCH_SPEAR3XX - -menu "SPEAr3xx Implementations" -config MACH_SPEAR300 - bool "SPEAr300 Machine support with Device Tree" - select PINCTRL_SPEAR300 - help - Supports ST SPEAr300 machine configured via the device-tree - -config MACH_SPEAR310 - bool "SPEAr310 Machine support with Device Tree" - select PINCTRL_SPEAR310 - help - Supports ST SPEAr310 machine configured via the device-tree - -config MACH_SPEAR320 - bool "SPEAr320 Machine support with Device Tree" - select PINCTRL_SPEAR320 - help - Supports ST SPEAr320 machine configured via the device-tree -endmenu -endif #ARCH_SPEAR3XX
arch/arm/mach-spear6xx/Kconfig deleted +0 -10
@@ -1,10 +0,0 @@ -# -# SPEAr6XX Machine configuration file -# - -config MACH_SPEAR600 - def_bool y - depends on ARCH_SPEAR6XX - select USE_OF - help - Supports ST SPEAr600 boards configured via the device-tree
arch/arm/plat-spear/Kconfig +47 -4
56 lines not on this page · raw message
Signature · 1 line
1.8.0
PATCH 6/13 ARM: spear: move spear.h and misc_regs.h into plat-spear
In reply to Arnd BergmannThe spear13xx version of spear.h is completely different from the newly combined spear3xx/spear6xx version, but we can never build ARMv5 and ARMv7 platforms together, so there is no harm in putting all the contents into a single file and adding appropriate ifdefs.
---
arch/arm/mach-spear13xx/include/mach/spear.h | 54 --------------------
arch/arm/mach-spear3xx/include/mach/spear.h | 59 ----------------------
arch/arm/mach-spear6xx/include/mach/misc_regs.h | 22 --------
.../include/mach/misc_regs.h | 0
.../include/mach/spear.h | 42 +++++++++++++++
5 files changed, 42 insertions(+), 135 deletions(-)
delete mode 100644 arch/arm/mach-spear13xx/include/mach/spear.h
delete mode 100644 arch/arm/mach-spear3xx/include/mach/spear.h
delete mode 100644 arch/arm/mach-spear6xx/include/mach/misc_regs.h
rename arch/arm/{mach-spear3xx => plat-spear}/include/mach/misc_regs.h (100%)
rename arch/arm/{mach-spear6xx => plat-spear}/include/mach/spear.h (62%)arch/arm/mach-spear13xx/include/mach/spear.h deleted +0 -54
@@ -1,54 +0,0 @@ -/* -* arch/arm/mach-spear13xx/include/mach/spear.h -* -* spear13xx Machine family specific definition -* -* Copyright (C) 2012 ST Microelectronics -* Viresh Kumar <[email protected]> -* -* 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. -*/ - -#ifndef __MACH_SPEAR13XX_H -#define __MACH_SPEAR13XX_H - -#include <asm/memory.h> - -#define PERIP_GRP2_BASE UL(0xB3000000) -#define VA_PERIP_GRP2_BASE IOMEM(0xFE000000) -#define MCIF_SDHCI_BASE UL(0xB3000000) -#define SYSRAM0_BASE UL(0xB3800000) -#define VA_SYSRAM0_BASE IOMEM(0xFE800000) -#define SYS_LOCATION (VA_SYSRAM0_BASE + 0x600) - -#define PERIP_GRP1_BASE UL(0xE0000000) -#define VA_PERIP_GRP1_BASE IOMEM(0xFD000000) -#define UART_BASE UL(0xE0000000) -#define VA_UART_BASE IOMEM(0xFD000000) -#define SSP_BASE UL(0xE0100000) -#define MISC_BASE UL(0xE0700000) -#define VA_MISC_BASE IOMEM(0xFD700000) - -#define A9SM_AND_MPMC_BASE UL(0xEC000000) -#define VA_A9SM_AND_MPMC_BASE IOMEM(0xFC000000) - -/* A9SM peripheral offsets */ -#define A9SM_PERIP_BASE UL(0xEC800000) -#define VA_A9SM_PERIP_BASE IOMEM(0xFC800000) -#define VA_SCU_BASE (VA_A9SM_PERIP_BASE + 0x00) - -#define L2CC_BASE UL(0xED000000) -#define VA_L2CC_BASE IOMEM(UL(0xFB000000)) - -/* others */ -#define DMAC0_BASE UL(0xEA800000) -#define DMAC1_BASE UL(0xEB000000) -#define MCIF_CF_BASE UL(0xB2800000) - -/* Debug uart for linux, will be used for debug and uncompress messages */ -#define SPEAR_DBG_UART_BASE UART_BASE -#define VA_SPEAR_DBG_UART_BASE VA_UART_BASE - -#endif /* __MACH_SPEAR13XX_H */
arch/arm/mach-spear3xx/include/mach/spear.h deleted +0 -59
59 lines not on this page · raw message
arch/arm/mach-spear6xx/include/mach/misc_regs.h deleted +0 -22
@@ -1,22 +0,0 @@ -/* -* arch/arm/mach-spear6xx/include/mach/misc_regs.h -* -* Miscellaneous registers definitions for SPEAr6xx machine family -* -* Copyright (C) 2009 ST Microelectronics -* Viresh Kumar <[email protected]> -* -* 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. -*/ - -#ifndef __MACH_MISC_REGS_H -#define __MACH_MISC_REGS_H - -#include <mach/spear.h> - -#define MISC_BASE IOMEM(VA_SPEAR_ICM3_MISC_REG_BASE) -#define DMA_CHN_CFG (MISC_BASE + 0x0A0) - -#endif /* __MACH_MISC_REGS_H */
arch/arm/plat-spear/include/mach/misc_regs.h renamed from arch/arm/mach-spear3xx/include/mach/misc_regs.h +0 -0
arch/arm/plat-spear/include/mach/spear.h renamed from arch/arm/mach-spear6xx/include/mach/spear.h +42 -0
53 lines not on this page · raw message
Signature · 1 line
1.8.0
PATCH 7/13 ARM: spear: move all files to mach-spear
In reply to Arnd BergmannThere are no conflicting files between the three mach-spear* directories and plat-spear any more, so we can now move all file to a common mach-spear directory.
---
arch/arm/Kconfig | 2 +-
arch/arm/Makefile | 5 +----
arch/arm/{plat-spear => mach-spear}/Kconfig | 0
arch/arm/mach-spear/Makefile | 22 ++++++++++++++++++++++
.../{mach-spear13xx => mach-spear}/Makefile.boot | 0
arch/arm/{mach-spear13xx => mach-spear}/headsmp.S | 0
arch/arm/{mach-spear13xx => mach-spear}/hotplug.c | 0
.../include/mach/debug-macro.S | 0
.../include/mach/generic.h | 0
.../include/mach/hardware.h | 0
.../{plat-spear => mach-spear}/include/mach/irqs.h | 0
.../include/mach/misc_regs.h | 0
.../include/mach/spear.h | 0
.../include/mach/timex.h | 0
.../include/mach/uncompress.h | 0
.../include/plat/pl080.h | 0
arch/arm/{plat-spear => mach-spear}/pl080.c | 0
arch/arm/{mach-spear13xx => mach-spear}/platsmp.c | 0
arch/arm/{plat-spear => mach-spear}/restart.c | 0
.../arm/{mach-spear13xx => mach-spear}/spear1310.c | 0
.../arm/{mach-spear13xx => mach-spear}/spear1340.c | 0
.../{mach-spear13xx => mach-spear}/spear13xx-dma.h | 0
.../arm/{mach-spear13xx => mach-spear}/spear13xx.c | 0
arch/arm/{mach-spear3xx => mach-spear}/spear300.c | 0
arch/arm/{mach-spear3xx => mach-spear}/spear310.c | 0
arch/arm/{mach-spear3xx => mach-spear}/spear320.c | 0
arch/arm/{mach-spear3xx => mach-spear}/spear3xx.c | 0
arch/arm/{mach-spear6xx => mach-spear}/spear6xx.c | 0
arch/arm/{plat-spear => mach-spear}/time.c | 0
arch/arm/mach-spear13xx/Makefile | 10 ----------
arch/arm/mach-spear3xx/Makefile | 15 ---------------
arch/arm/mach-spear3xx/Makefile.boot | 3 ---
arch/arm/mach-spear6xx/Makefile | 6 ------
arch/arm/mach-spear6xx/Makefile.boot | 3 ---
arch/arm/plat-spear/Makefile | 9 ---------
35 files changed, 24 insertions(+), 51 deletions(-)
rename arch/arm/{plat-spear => mach-spear}/Kconfig (100%)
create mode 100644 arch/arm/mach-spear/Makefile
rename arch/arm/{mach-spear13xx => mach-spear}/Makefile.boot (100%)
rename arch/arm/{mach-spear13xx => mach-spear}/headsmp.S (100%)
rename arch/arm/{mach-spear13xx => mach-spear}/hotplug.c (100%)
rename arch/arm/{plat-spear => mach-spear}/include/mach/debug-macro.S (100%)
rename arch/arm/{plat-spear => mach-spear}/include/mach/generic.h (100%)
rename arch/arm/{plat-spear => mach-spear}/include/mach/hardware.h (100%)
rename arch/arm/{plat-spear => mach-spear}/include/mach/irqs.h (100%)
rename arch/arm/{plat-spear => mach-spear}/include/mach/misc_regs.h (100%)
rename arch/arm/{plat-spear => mach-spear}/include/mach/spear.h (100%)
rename arch/arm/{plat-spear => mach-spear}/include/mach/timex.h (100%)
rename arch/arm/{plat-spear => mach-spear}/include/mach/uncompress.h (100%)
rename arch/arm/{plat-spear => mach-spear}/include/plat/pl080.h (100%)
rename arch/arm/{plat-spear => mach-spear}/pl080.c (100%)
rename arch/arm/{mach-spear13xx => mach-spear}/platsmp.c (100%)
rename arch/arm/{plat-spear => mach-spear}/restart.c (100%)
rename arch/arm/{mach-spear13xx => mach-spear}/spear1310.c (100%)
rename arch/arm/{mach-spear13xx => mach-spear}/spear1340.c (100%)
rename arch/arm/{mach-spear13xx => mach-spear}/spear13xx-dma.h (100%)
rename arch/arm/{mach-spear13xx => mach-spear}/spear13xx.c (100%)
rename arch/arm/{mach-spear3xx => mach-spear}/spear300.c (100%)
rename arch/arm/{mach-spear3xx => mach-spear}/spear310.c (100%)
rename arch/arm/{mach-spear3xx => mach-spear}/spear320.c (100%)
rename arch/arm/{mach-spear3xx => mach-spear}/spear3xx.c (100%)
rename arch/arm/{mach-spear6xx => mach-spear}/spear6xx.c (100%)
rename arch/arm/{plat-spear => mach-spear}/time.c (100%)
delete mode 100644 arch/arm/mach-spear13xx/Makefile
delete mode 100644 arch/arm/mach-spear3xx/Makefile
delete mode 100644 arch/arm/mach-spear3xx/Makefile.boot
delete mode 100644 arch/arm/mach-spear6xx/Makefile
delete mode 100644 arch/arm/mach-spear6xx/Makefile.boot
delete mode 100644 arch/arm/plat-spear/Makefilearch/arm/Kconfig +1 -1
@@ -1090,7 +1090,7 @@ source "arch/arm/plat-s3c24xx/Kconfig" source "arch/arm/mach-socfpga/Kconfig" -source "arch/arm/plat-spear/Kconfig" +source "arch/arm/mach-spear/Kconfig" source "arch/arm/mach-s3c24xx/Kconfig" if ARCH_S3C24XX
arch/arm/Makefile +1 -4
@@ -191,9 +191,7 @@ machine-$(CONFIG_ARCH_VT8500) += vt8500 machine-$(CONFIG_ARCH_W90X900) += w90x900 machine-$(CONFIG_FOOTBRIDGE) += footbridge machine-$(CONFIG_ARCH_SOCFPGA) += socfpga -machine-$(CONFIG_ARCH_SPEAR13XX) += spear13xx -machine-$(CONFIG_ARCH_SPEAR3XX) += spear3xx -machine-$(CONFIG_MACH_SPEAR600) += spear6xx +machine-$(CONFIG_PLAT_SPEAR) += spear machine-$(CONFIG_ARCH_ZYNQ) += zynq machine-$(CONFIG_ARCH_SUNXI) += sunxi
@@ -206,7 +204,6 @@ plat-$(CONFIG_PLAT_ORION) += orion plat-$(CONFIG_PLAT_PXA) += pxa plat-$(CONFIG_PLAT_S3C24XX) += s3c24xx samsung plat-$(CONFIG_PLAT_S5P) += samsung -plat-$(CONFIG_PLAT_SPEAR) += spear plat-$(CONFIG_PLAT_VERSATILE) += versatile ifeq ($(CONFIG_ARCH_EBSA110),y)
arch/arm/mach-spear/Kconfig renamed from arch/arm/plat-spear/Kconfig +0 -0
arch/arm/mach-spear/Makefile new file +22 -0
@@ -0,0 +1,22 @@ +# +# SPEAr Platform specific Makefile +# + +# Common support +obj-y := restart.o time.o + +obj-$(CONFIG_SMP) += headsmp.o platsmp.o +obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o + +obj-$(CONFIG_ARCH_SPEAR13XX) += spear13xx.o +obj-$(CONFIG_MACH_SPEAR1310) += spear1310.o +obj-$(CONFIG_MACH_SPEAR1340) += spear1340.o + +obj-$(CONFIG_ARCH_SPEAR3XX) += spear3xx.o +obj-$(CONFIG_ARCH_SPEAR3XX) += pl080.o +obj-$(CONFIG_MACH_SPEAR300) += spear300.o +obj-$(CONFIG_MACH_SPEAR310) += spear310.o +obj-$(CONFIG_MACH_SPEAR320) += spear320.o + +obj-$(CONFIG_ARCH_SPEAR6XX) += spear6xx.o +obj-$(CONFIG_ARCH_SPEAR6XX) += pl080.o
arch/arm/mach-spear/Makefile.boot renamed from arch/arm/mach-spear13xx/Makefile.boot +0 -0
arch/arm/mach-spear/headsmp.S renamed from arch/arm/mach-spear13xx/headsmp.S +0 -0
arch/arm/mach-spear/hotplug.c renamed from arch/arm/mach-spear13xx/hotplug.c +0 -0
arch/arm/mach-spear/include/mach/debug-macro.S renamed from arch/arm/plat-spear/include/mach/debug-macro.S +0 -0
arch/arm/mach-spear/include/mach/generic.h renamed from arch/arm/plat-spear/include/mach/generic.h +0 -0
arch/arm/mach-spear/include/mach/hardware.h renamed from arch/arm/plat-spear/include/mach/hardware.h +0 -0
arch/arm/mach-spear/include/mach/irqs.h renamed from arch/arm/plat-spear/include/mach/irqs.h +0 -0
arch/arm/mach-spear/include/mach/misc_regs.h renamed from arch/arm/plat-spear/include/mach/misc_regs.h +0 -0
arch/arm/mach-spear/include/mach/spear.h renamed from arch/arm/plat-spear/include/mach/spear.h +0 -0
arch/arm/mach-spear/include/mach/timex.h renamed from arch/arm/plat-spear/include/mach/timex.h +0 -0
arch/arm/mach-spear/include/mach/uncompress.h renamed from arch/arm/plat-spear/include/mach/uncompress.h +0 -0
arch/arm/mach-spear/include/plat/pl080.h renamed from arch/arm/plat-spear/include/plat/pl080.h +0 -0
arch/arm/mach-spear/pl080.c renamed from arch/arm/plat-spear/pl080.c +0 -0
arch/arm/mach-spear/platsmp.c renamed from arch/arm/mach-spear13xx/platsmp.c +0 -0
arch/arm/mach-spear/restart.c renamed from arch/arm/plat-spear/restart.c +0 -0
arch/arm/mach-spear/spear1310.c renamed from arch/arm/mach-spear13xx/spear1310.c +0 -0
arch/arm/mach-spear/spear1340.c renamed from arch/arm/mach-spear13xx/spear1340.c +0 -0
arch/arm/mach-spear/spear13xx-dma.h renamed from arch/arm/mach-spear13xx/spear13xx-dma.h +0 -0
arch/arm/mach-spear/spear13xx.c renamed from arch/arm/mach-spear13xx/spear13xx.c +0 -0
arch/arm/mach-spear/spear300.c renamed from arch/arm/mach-spear3xx/spear300.c +0 -0
arch/arm/mach-spear/spear310.c renamed from arch/arm/mach-spear3xx/spear310.c +0 -0
arch/arm/mach-spear/spear320.c renamed from arch/arm/mach-spear3xx/spear320.c +0 -0
arch/arm/mach-spear/spear3xx.c renamed from arch/arm/mach-spear3xx/spear3xx.c +0 -0
arch/arm/mach-spear/spear6xx.c renamed from arch/arm/mach-spear6xx/spear6xx.c +0 -0
arch/arm/mach-spear/time.c renamed from arch/arm/plat-spear/time.c +0 -0
arch/arm/mach-spear13xx/Makefile deleted +0 -10
@@ -1,10 +0,0 @@ -# -# Makefile for SPEAr13XX machine series -# - -obj-$(CONFIG_SMP) += headsmp.o platsmp.o -obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o - -obj-$(CONFIG_ARCH_SPEAR13XX) += spear13xx.o -obj-$(CONFIG_MACH_SPEAR1310) += spear1310.o -obj-$(CONFIG_MACH_SPEAR1340) += spear1340.o
arch/arm/mach-spear3xx/Makefile deleted +0 -15
@@ -1,15 +0,0 @@ -# -# Makefile for SPEAr3XX machine series -# - -# common files -obj-$(CONFIG_ARCH_SPEAR3XX) += spear3xx.o - -# spear300 specific files -obj-$(CONFIG_MACH_SPEAR300) += spear300.o - -# spear310 specific files -obj-$(CONFIG_MACH_SPEAR310) += spear310.o - -# spear320 specific files -obj-$(CONFIG_MACH_SPEAR320) += spear320.o
arch/arm/mach-spear3xx/Makefile.boot deleted +0 -3
@@ -1,3 +0,0 @@ -zreladdr-y += 0x00008000 -params_phys-y := 0x00000100 -initrd_phys-y := 0x00800000
arch/arm/mach-spear6xx/Makefile deleted +0 -6
@@ -1,6 +0,0 @@ -# -# Makefile for SPEAr6XX machine series -# - -# common files -obj-y += spear6xx.o
arch/arm/mach-spear6xx/Makefile.boot deleted +0 -3
@@ -1,3 +0,0 @@ -zreladdr-y += 0x00008000 -params_phys-y := 0x00000100 -initrd_phys-y := 0x00800000
arch/arm/plat-spear/Makefile deleted +0 -9
@@ -1,9 +0,0 @@ -# -# SPEAr Platform specific Makefile -# - -# Common support -obj-y := restart.o time.o - -obj-$(CONFIG_ARCH_SPEAR3XX) += pl080.o -obj-$(CONFIG_ARCH_SPEAR6XX) += pl080.o
Signature · 1 line
1.8.0
PATCH 8/13 ARM: spear: move generic.h and pl080.h into private dir
In reply to Arnd BergmannNo file outside of mach-spear includes these files any more, so they don't have to be globally visible now.
---
arch/arm/mach-spear/{include/mach => }/generic.h | 0
arch/arm/mach-spear/include/mach/hardware.h | 1 -
arch/arm/mach-spear/{include/plat => }/pl080.h | 0
arch/arm/mach-spear/platsmp.c | 2 +-
arch/arm/mach-spear/restart.c | 2 +-
arch/arm/mach-spear/spear1310.c | 2 +-
arch/arm/mach-spear/spear1340.c | 2 +-
arch/arm/mach-spear/spear13xx.c | 2 +-
arch/arm/mach-spear/spear300.c | 2 +-
arch/arm/mach-spear/spear310.c | 2 +-
arch/arm/mach-spear/spear320.c | 2 +-
arch/arm/mach-spear/spear3xx.c | 4 ++--
arch/arm/mach-spear/spear6xx.c | 4 ++--
arch/arm/mach-spear/time.c | 2 +-
14 files changed, 13 insertions(+), 14 deletions(-)
rename arch/arm/mach-spear/{include/mach => }/generic.h (100%)
delete mode 100644 arch/arm/mach-spear/include/mach/hardware.h
rename arch/arm/mach-spear/{include/plat => }/pl080.h (100%)arch/arm/mach-spear/generic.h renamed from arch/arm/mach-spear/include/mach/generic.h +0 -0
arch/arm/mach-spear/include/mach/hardware.h deleted +0 -1
@@ -1 +0,0 @@ -/* empty */
arch/arm/mach-spear/pl080.h renamed from arch/arm/mach-spear/include/plat/pl080.h +0 -0
arch/arm/mach-spear/platsmp.c +1 -1
@@ -19,7 +19,7 @@#include <asm/hardware/gic.h> #include <asm/smp_scu.h> #include <mach/spear.h> -#include <mach/generic.h> +#include "generic.h" static DEFINE_SPINLOCK (boot_lock);
arch/arm/mach-spear/restart.c +1 -1
@@ -14,7 +14,7 @@#include <asm/system_misc.h> #include <asm/hardware/sp810.h> #include <mach/spear.h> -#include <mach/generic.h> +#include "generic.h" #define SPEAR13XX_SYS_SW_RES (VA_MISC_BASE + 0x204)void spear_restart (char mode,const char *cmd)
arch/arm/mach-spear/spear1310.c +1 -1
@@ -19,7 +19,7 @@#include <asm/hardware/gic.h> #include <asm/mach/arch.h> #include <asm/mach/map.h> -#include <mach/generic.h> +#include "generic.h" #include <mach/spear.h> /* Base addresses */
arch/arm/mach-spear/spear1340.c +1 -1
@@ -20,7 +20,7 @@#include <linux/of_platform.h> #include <asm/hardware/gic.h> #include <asm/mach/arch.h> -#include <mach/generic.h> +#include "generic.h" #include <mach/spear.h> #include "spear13xx-dma.h"
arch/arm/mach-spear/spear13xx.c +1 -1
@@ -22,7 +22,7 @@#include <asm/hardware/gic.h> #include <asm/mach/map.h> #include <asm/smp_twd.h> -#include <mach/generic.h> +#include "generic.h" #include <mach/spear.h> #include "spear13xx-dma.h"
arch/arm/mach-spear/spear300.c +1 -1
@@ -17,7 +17,7 @@#include <linux/of_platform.h> #include <asm/hardware/vic.h> #include <asm/mach/arch.h> -#include <mach/generic.h> +#include "generic.h" #include <mach/spear.h> /* DMAC platform data's slave info */
arch/arm/mach-spear/spear310.c +1 -1
@@ -18,7 +18,7 @@#include <linux/of_platform.h> #include <asm/hardware/vic.h> #include <asm/mach/arch.h> -#include <mach/generic.h> +#include "generic.h" #include <mach/spear.h> #define SPEAR310_UART1_BASE UL(0xB2000000)
arch/arm/mach-spear/spear320.c +1 -1
@@ -20,7 +20,7 @@#include <asm/hardware/vic.h> #include <asm/mach/arch.h> #include <asm/mach/map.h> -#include <mach/generic.h> +#include "generic.h" #include <mach/spear.h> #define SPEAR320_UART1_BASE UL(0xA3000000)
arch/arm/mach-spear/spear3xx.c +2 -2
@@ -22,8 +22,8 @@#include <asm/hardware/pl080.h> #include <asm/hardware/vic.h> #include <asm/mach/map.h> -#include <plat/pl080.h> -#include <mach/generic.h> +#include "pl080.h" +#include "generic.h" #include <mach/spear.h> /* ssp device registration */
arch/arm/mach-spear/spear6xx.c +2 -2
@@ -25,8 +25,8 @@#include <asm/mach/arch.h> #include <asm/mach/time.h> #include <asm/mach/map.h> -#include <plat/pl080.h> -#include <mach/generic.h> +#include "pl080.h" +#include "generic.h" #include <mach/spear.h> /* dmac device registration */
arch/arm/mach-spear/time.c +1 -1
@@ -23,7 +23,7 @@#include <linux/time.h> #include <linux/irq.h> #include <asm/mach/time.h> -#include <mach/generic.h> +#include "generic.h" /* * We would use TIMER0 and TIMER1 as clockevent and clocksource.
Signature · 1 line
1.8.0
PATCH 9/13 ARM: spear: make clock driver independent of headers
In reply to Arnd BergmannDevice drivers should not access MMIO registers through hardcoded platform specific address constants. Instead, we can pass the MMIO token to the spear clock driver in the initialization routine to contain that knowledge in the platform code itself.
Ideally, the clock driver would use of_iomap() or similar to get the address, and that can be used later, but for now, this is the minimal change.
--- arch/arm/mach-spear/generic.h | 13 +++--- arch/arm/mach-spear/include/mach/misc_regs.h | 2 +- arch/arm/mach-spear/include/mach/spear.h | 28 +++++------- arch/arm/mach-spear/spear1310.c | 2 - arch/arm/mach-spear/spear13xx.c | 4 +- arch/arm/mach-spear/spear320.c | 2 +- arch/arm/mach-spear/spear3xx.c | 7 +-- arch/arm/mach-spear/spear6xx.c | 9 ++-- drivers/clk/spear/spear1310_clock.c | 64 ++++++++++++++-------------- drivers/clk/spear/spear1340_clock.c | 63 ++++++++++++++------------- drivers/clk/spear/spear3xx_clock.c | 60 +++++++++++++++----------- drivers/clk/spear/spear6xx_clock.c | 31 +++++++------- 12 files changed, 143 insertions(+), 142 deletions(-)
arch/arm/mach-spear/generic.h +7 -6
@@ -29,10 +29,11 @@ extern struct dw_dma_slave nand_write_dma_priv;bool dw_dma_filter (struct dma_chan *chan,void *slave);void __init spear_setup_of_timer (void ); -void __init spear3xx_clk_init (void ); +void __init spear3xx_clk_init (void __iomem *misc_base, +void __iomem *soc_config_base);void __init spear3xx_map_io (void );void __init spear3xx_dt_init_irq (void ); -void __init spear6xx_clk_init (void ); +void __init spear6xx_clk_init (void __iomem *misc_base);void __init spear13xx_map_io (void );void __init spear13xx_dt_init_irq (void );void __init spear13xx_l2x0_init (void );
@@ -45,15 +46,15 @@ void __cpuinit spear13xx_cpu_die(unsigned int cpu);extern struct smp_operations spear13xx_smp_ops;#ifdef CONFIG_MACH_SPEAR1310 -void __init spear1310_clk_init (void ); +void __init spear1310_clk_init (void __iomem *misc_base,void __iomem *ras_base);#else -static inline void spear1310_clk_init (void ) {} +static inline void spear1310_clk_init (void __iomem *misc_base,void __iomem *ras_base) {}#endif #ifdef CONFIG_MACH_SPEAR1340 -void __init spear1340_clk_init (void ); +void __init spear1340_clk_init (void __iomem *misc_base);#else -static inline void spear1340_clk_init (void ) {} +static inline void spear1340_clk_init (void __iomem *misc_base) {}#endif #endif /* __MACH_GENERIC_H */
arch/arm/mach-spear/include/mach/misc_regs.h +1 -1
@@ -16,7 +16,7 @@#include <mach/spear.h> -#define MISC_BASE IOMEM(VA_SPEAR_ICM3_MISC_REG_BASE) +#define MISC_BASE (VA_SPEAR_ICM3_MISC_REG_BASE)#define DMA_CHN_CFG (MISC_BASE + 0x0A0)#endif /* __MACH_MISC_REGS_H */
arch/arm/mach-spear/include/mach/spear.h +11 -17
@@ -19,23 +19,23 @@/* ICM1 - Low speed connection */ #define SPEAR_ICM1_2_BASE UL(0xD0000000) -#define VA_SPEAR_ICM1_2_BASE UL(0xFD000000) +#define VA_SPEAR_ICM1_2_BASE IOMEM(0xFD000000)#define SPEAR_ICM1_UART_BASE UL(0xD0000000) -#define VA_SPEAR_ICM1_UART_BASE (VA_SPEAR_ICM1_2_BASE | SPEAR_ICM1_UART_BASE) +#define VA_SPEAR_ICM1_UART_BASE (VA_SPEAR_ICM1_2_BASE - SPEAR_ICM1_2_BASE + SPEAR_ICM1_UART_BASE)#define SPEAR3XX_ICM1_SSP_BASE UL(0xD0100000)/* ML-1, 2 - Multi Layer CPU Subsystem */ #define SPEAR_ICM3_ML1_2_BASE UL(0xF0000000) -#define VA_SPEAR6XX_ML_CPU_BASE UL(0xF0000000) +#define VA_SPEAR6XX_ML_CPU_BASE IOMEM(0xF0000000)/* ICM3 - Basic Subsystem */ #define SPEAR_ICM3_SMI_CTRL_BASE UL(0xFC000000) -#define VA_SPEAR_ICM3_SMI_CTRL_BASE UL(0xFC000000) +#define VA_SPEAR_ICM3_SMI_CTRL_BASE IOMEM(0xFC000000)#define SPEAR_ICM3_DMA_BASE UL(0xFC400000)#define SPEAR_ICM3_SYS_CTRL_BASE UL(0xFCA00000) -#define VA_SPEAR_ICM3_SYS_CTRL_BASE (VA_SPEAR_ICM3_SMI_CTRL_BASE | SPEAR_ICM3_SYS_CTRL_BASE) +#define VA_SPEAR_ICM3_SYS_CTRL_BASE (VA_SPEAR_ICM3_SMI_CTRL_BASE - SPEAR_ICM3_SMI_CTRL_BASE + SPEAR_ICM3_SYS_CTRL_BASE)#define SPEAR_ICM3_MISC_REG_BASE UL(0xFCA80000) -#define VA_SPEAR_ICM3_MISC_REG_BASE (VA_SPEAR_ICM3_SMI_CTRL_BASE | SPEAR_ICM3_MISC_REG_BASE) +#define VA_SPEAR_ICM3_MISC_REG_BASE (VA_SPEAR_ICM3_SMI_CTRL_BASE - SPEAR_ICM3_SMI_CTRL_BASE + SPEAR_ICM3_MISC_REG_BASE)/* Debug uart for linux, will be used for debug and uncompress messages */ #define SPEAR_DBG_UART_BASE SPEAR_ICM1_UART_BASE
@@ -44,20 +44,11 @@/* Sysctl base for spear platform */ #define SPEAR_SYS_CTRL_BASE SPEAR_ICM3_SYS_CTRL_BASE#define VA_SPEAR_SYS_CTRL_BASE VA_SPEAR_ICM3_SYS_CTRL_BASE +#endif /* SPEAR3xx || SPEAR6XX */ /* SPEAr320 Macros */ #define SPEAR320_SOC_CONFIG_BASE UL(0xB3000000) -#define VA_SPEAR320_SOC_CONFIG_BASE UL(0xFE000000) -#define SPEAR320_CONTROL_REG IOMEM(VA_SPEAR320_SOC_CONFIG_BASE) -#define SPEAR320_EXT_CTRL_REG IOMEM(VA_SPEAR320_SOC_CONFIG_BASE + 0x0018) -#define SPEAR320_UARTX_PCLK_MASK 0x1 -#define SPEAR320_UART2_PCLK_SHIFT 8 -#define SPEAR320_UART3_PCLK_SHIFT 9 -#define SPEAR320_UART4_PCLK_SHIFT 10 -#define SPEAR320_UART5_PCLK_SHIFT 11 -#define SPEAR320_UART6_PCLK_SHIFT 12 -#define SPEAR320_RS485_PCLK_SHIFT 13 -#endif /* SPEAR3xx || SPEAR6XX */ +#define VA_SPEAR320_SOC_CONFIG_BASE IOMEM(0xFE000000)#ifdef CONFIG_ARCH_SPEAR13XX
@@ -79,6 +70,9 @@#define A9SM_AND_MPMC_BASE UL(0xEC000000)#define VA_A9SM_AND_MPMC_BASE IOMEM(0xFC000000) +#define SPEAR1310_RAS_BASE UL(0xD8400000) +#define VA_SPEAR1310_RAS_BASE IOMEM(UL(0xFA400000)) +/* A9SM peripheral offsets */ #define A9SM_PERIP_BASE UL(0xEC800000)#define VA_A9SM_PERIP_BASE IOMEM(0xFC800000)
arch/arm/mach-spear/spear1310.c +0 -2
@@ -30,8 +30,6 @@#define SPEAR1310_RAS_GRP1_BASE UL(0xD8000000)#define VA_SPEAR1310_RAS_GRP1_BASE UL(0xFA000000) -#define SPEAR1310_RAS_BASE UL(0xD8400000) -#define VA_SPEAR1310_RAS_BASE IOMEM(UL(0xFA400000))static struct arasan_cf_pdata cf_pdata = { .cf_if_clk =CF_IF_CLK_166M ,
arch/arm/mach-spear/spear13xx.c +2 -2
@@ -147,9 +147,9 @@ void __init spear13xx_map_io(void)static void __init spear13xx_clk_init (void ) {if (of_machine_is_compatible ("st,spear1310" )) -spear1310_clk_init (); +spear1310_clk_init (VA_MISC_BASE ,VA_SPEAR1310_RAS_BASE );else if (of_machine_is_compatible ("st,spear1340" )) -spear1340_clk_init (); +spear1340_clk_init (VA_MISC_BASE );else pr_err ("%s: Unknown machine\n" , __func__); }
arch/arm/mach-spear/spear320.c +1 -1
@@ -254,7 +254,7 @@ static const char * const spear320_dt_board_compat[] = {struct map_desc spear320_io_desc[]__initdata = { { - .virtual =VA_SPEAR320_SOC_CONFIG_BASE , + .virtual = (unsigned long )VA_SPEAR320_SOC_CONFIG_BASE , .pfn =__phys_to_pfn (SPEAR320_SOC_CONFIG_BASE ), .length =SZ_16M , .type =MT_DEVICE
arch/arm/mach-spear/spear3xx.c +4 -3
@@ -25,6 +25,7 @@#include "pl080.h" #include "generic.h" #include <mach/spear.h> +#include <mach/misc_regs.h> /* ssp device registration */ struct pl022_ssp_controller pl022_plat_data = {
@@ -71,12 +72,12 @@ struct pl08x_platform_data pl080_plat_data = {*/ struct map_desc spear3xx_io_desc[]__initdata = { { - .virtual =VA_SPEAR_ICM1_2_BASE , + .virtual = (unsigned long )VA_SPEAR_ICM1_2_BASE , .pfn =__phys_to_pfn (SPEAR_ICM1_2_BASE ), .length =SZ_16M , .type =MT_DEVICE }, { - .virtual =VA_SPEAR_ICM3_SMI_CTRL_BASE , + .virtual = (unsigned long )VA_SPEAR_ICM3_SMI_CTRL_BASE , .pfn =__phys_to_pfn (SPEAR_ICM3_SMI_CTRL_BASE ), .length =SZ_16M , .type =MT_DEVICE
@@ -94,7 +95,7 @@ static void __init spear3xx_timer_init(void)char pclk_name[] ="pll3_clk" ;struct clk *gpt_clk, *pclk; -spear3xx_clk_init (); +spear3xx_clk_init (MISC_BASE ,VA_SPEAR320_SOC_CONFIG_BASE );/* get the system timer clock */ gpt_clk =clk_get_sys ("gpt0" ,NULL );
arch/arm/mach-spear/spear6xx.c +5 -4
@@ -28,6 +28,7 @@#include "pl080.h" #include "generic.h" #include <mach/spear.h> +#include <mach/misc_regs.h> /* dmac device registration */ static struct pl08x_channel_data spear600_dma_info[] = {
@@ -351,17 +352,17 @@ struct pl08x_platform_data pl080_plat_data = {*/ struct map_desc spear6xx_io_desc[]__initdata = { { - .virtual =VA_SPEAR6XX_ML_CPU_BASE , + .virtual = (unsigned long )VA_SPEAR6XX_ML_CPU_BASE , .pfn =__phys_to_pfn (SPEAR_ICM3_ML1_2_BASE ), .length =2 *SZ_16M , .type =MT_DEVICE }, { - .virtual =VA_SPEAR_ICM1_2_BASE , + .virtual = (unsigned long )VA_SPEAR_ICM1_2_BASE , .pfn =__phys_to_pfn (SPEAR_ICM1_2_BASE ), .length =SZ_16M , .type =MT_DEVICE }, { - .virtual =VA_SPEAR_ICM3_SMI_CTRL_BASE , + .virtual = (unsigned long )VA_SPEAR_ICM3_SMI_CTRL_BASE , .pfn =__phys_to_pfn (SPEAR_ICM3_SMI_CTRL_BASE ), .length =SZ_16M , .type =MT_DEVICE
@@ -379,7 +380,7 @@ static void __init spear6xx_timer_init(void)char pclk_name[] ="pll3_clk" ;struct clk *gpt_clk, *pclk; -spear6xx_clk_init (); +spear6xx_clk_init (MISC_BASE );/* get the system timer clock */ gpt_clk =clk_get_sys ("gpt0" ,NULL );
drivers/clk/spear/spear1310_clock.c +31 -33
133 lines not on this page · raw message
drivers/clk/spear/spear1340_clock.c +31 -32
119 lines not on this page · raw message
drivers/clk/spear/spear3xx_clock.c +35 -25
122 lines not on this page · raw message
drivers/clk/spear/spear6xx_clock.c +15 -16
@@ -13,28 +13,27 @@#include <linux/clkdev.h> #include <linux/io.h> #include <linux/spinlock_types.h> -#include <mach/misc_regs.h> #include "clk.h" static DEFINE_SPINLOCK (_lock); -#define PLL1_CTR (MISC_BASE + 0x008) -#define PLL1_FRQ (MISC_BASE + 0x00C) -#define PLL2_CTR (MISC_BASE + 0x014) -#define PLL2_FRQ (MISC_BASE + 0x018) -#define PLL_CLK_CFG (MISC_BASE + 0x020) +#define PLL1_CTR (misc_base + 0x008) +#define PLL1_FRQ (misc_base + 0x00C) +#define PLL2_CTR (misc_base + 0x014) +#define PLL2_FRQ (misc_base + 0x018) +#define PLL_CLK_CFG (misc_base + 0x020)/* PLL_CLK_CFG register masks */ #define MCTR_CLK_SHIFT 28#define MCTR_CLK_MASK 3 -#define CORE_CLK_CFG (MISC_BASE + 0x024) +#define CORE_CLK_CFG (misc_base + 0x024)/* CORE CLK CFG register masks */ #define HCLK_RATIO_SHIFT 10#define HCLK_RATIO_MASK 2#define PCLK_RATIO_SHIFT 8#define PCLK_RATIO_MASK 2 -#define PERIP_CLK_CFG (MISC_BASE + 0x028) +#define PERIP_CLK_CFG (misc_base + 0x028)/* PERIP_CLK_CFG register masks */ #define CLCD_CLK_SHIFT 2#define CLCD_CLK_MASK 2
@@ -48,7 +47,7 @@ static DEFINE_SPINLOCK(_lock);#define GPT3_CLK_SHIFT 12#define GPT_CLK_MASK 1 -#define PERIP1_CLK_ENB (MISC_BASE + 0x02C) +#define PERIP1_CLK_ENB (misc_base + 0x02C)/* PERIP1_CLK_ENB register masks */ #define UART0_CLK_ENB 3#define UART1_CLK_ENB 4
@@ -74,13 +73,13 @@ static DEFINE_SPINLOCK(_lock);#define USBH0_CLK_ENB 25#define USBH1_CLK_ENB 26 -#define PRSC0_CLK_CFG (MISC_BASE + 0x044) -#define PRSC1_CLK_CFG (MISC_BASE + 0x048) -#define PRSC2_CLK_CFG (MISC_BASE + 0x04C) +#define PRSC0_CLK_CFG (misc_base + 0x044) +#define PRSC1_CLK_CFG (misc_base + 0x048) +#define PRSC2_CLK_CFG (misc_base + 0x04C) -#define CLCD_CLK_SYNT (MISC_BASE + 0x05C) -#define FIRDA_CLK_SYNT (MISC_BASE + 0x060) -#define UART_CLK_SYNT (MISC_BASE + 0x064) +#define CLCD_CLK_SYNT (misc_base + 0x05C) +#define FIRDA_CLK_SYNT (misc_base + 0x060) +#define UART_CLK_SYNT (misc_base + 0x064)/* vco rate configuration table, in ascending order of rates */ static struct pll_rate_tbl pll_rtbl[] = {
@@ -115,7 +114,7 @@ static struct gpt_rate_tbl gpt_rtbl[] = { {.mscale = 1, .nscale = 0}, /* 83 MHz */ }; -void __init spear6xx_clk_init (void ) +void __init spear6xx_clk_init (void __iomem *misc_base) {struct clk *clk, *clk1;
Signature · 1 line
1.8.0
PATCH 9/13 ARM: spear: make clock driver independent of headers
Quoting Arnd Bergmann (2013-01-25 15:35:52)
Quoted 10 lines
Device drivers should not access MMIO registers through hardcoded platform specific address constants. Instead, we can pass the MMIO token to the spear clock driver in the initialization routine to contain that knowledge in the platform code itself.
Ideally, the clock driver would use
of_iomap()or similar to get the address, and that can be used later, but for now, this is the minimal change.Signed-off-by Arnd Bergmann <[email protected]>
Hi Arnd,
This change appears good to me (but needs testing).
Regards,
Mike
PATCH 10/13 ARM: spear: rename duplicate pl080_plat_data
In reply to Arnd BergmannBoth spear3xx and spear6xx have a global symbol named pl080_plat_data. Eventually, both should be removed, but for now, we can rename one to pl080_plat_data and declare it static, since that one does not actually need to be visible outside of spear6xx.c.
--- arch/arm/mach-spear/spear6xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-spear/spear6xx.c +2 -2
@@ -323,7 +323,7 @@ static struct pl08x_channel_data spear600_dma_info[] = { }, }; -struct pl08x_platform_data pl080_plat_data = { +static struct pl08x_platform_data spear6xx_pl080_plat_data = { .memcpy_channel = { .bus_id ="memcpy" , .cctl_memcpy =
@@ -411,7 +411,7 @@ struct sys_timer spear6xx_timer = {/* Add auxdata to pass platform data */ struct of_dev_auxdata spear6xx_auxdata_lookup[]__initdata = {OF_DEV_AUXDATA ("arm,pl080" ,SPEAR_ICM3_DMA_BASE ,NULL , - &pl080_plat_data), + &spear6xx_pl080_plat_data), {} };
Signature · 1 line
1.8.0
PATCH 11/13 ARM: spear: use multiplatform configuration options.
In reply to Arnd BergmannThe spear platform is now multiplatform capable in principle, and everything still builds when enabled. This slightly rearranges the Kconfig options for spear to enable both single- and multiplatform support. As a side-effect, even building the single spear kernel can now enable spear3xx and spear6xx simultaneously, although not together with spear13xx, because they are a different archicture version (v7 instead of v5).
--- arch/arm/Kconfig | 10 +------ arch/arm/mach-spear/Kconfig | 67 ++++++++++++++++++++++++++------------------ arch/arm/mach-spear/Makefile | 2 ++ 3 files changed, 43 insertions(+), 36 deletions(-)
arch/arm/Kconfig +1 -9
@@ -909,16 +909,8 @@ config ARCH_NOMADIK help Support for the Nomadik platform by ST-Ericsson -config PLAT_SPEAR +config PLAT_SPEAR_SINGLE bool "ST SPEAr" - select ARCH_HAS_CPUFREQ - select ARCH_REQUIRE_GPIOLIB - select ARM_AMBA - select CLKDEV_LOOKUP - select CLKSRC_MMIO - select COMMON_CLK - select GENERIC_CLOCKEVENTS - select HAVE_CLK help Support for ST's SPEAr platform (SPEAr3xx, SPEAr6xx and SPEAr13xx).
arch/arm/mach-spear/Kconfig +40 -27
107 lines not on this page · raw message
arch/arm/mach-spear/Makefile +2 -0
@@ -2,6 +2,8 @@ # SPEAr Platform specific Makefile # +ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include + # Common support obj-y := restart.o time.o
Signature · 1 line
1.8.0
PATCH 12/13 ARM: spear: adapt defconfig files for multiplatform
In reply to Arnd BergmannA few options have changed slightly, so we have to make the respective changes here, too.
--- arch/arm/configs/spear3xx_defconfig | 2 ++ arch/arm/configs/spear6xx_defconfig | 1 + 2 files changed, 3 insertions(+)
arch/arm/configs/spear3xx_defconfig +2 -0
@@ -6,7 +6,9 @@ CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODVERSIONS=y CONFIG_PARTITION_ADVANCED=y +# CONFIG_ARCH_MULTI_V7 is not set CONFIG_PLAT_SPEAR=y +CONFIG_ARCH_SPEAR3XX=y CONFIG_MACH_SPEAR300=y CONFIG_MACH_SPEAR310=y CONFIG_MACH_SPEAR320=y
arch/arm/configs/spear6xx_defconfig +1 -0
@@ -6,6 +6,7 @@ CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODVERSIONS=y CONFIG_PARTITION_ADVANCED=y +# CONFIG_ARCH_MULTI_V7 is not set CONFIG_PLAT_SPEAR=y CONFIG_ARCH_SPEAR6XX=y CONFIG_BINFMT_MISC=y
Signature · 1 line
1.8.0
PATCH 13/13 ARM: spear: fix build error in restart.c
In reply to Arnd BergmannWe can now enable mach-spear without selecting any of the machines in a multiplatform configuration.
Doing so causes a build error that is trivial to fix by making both the spear13xx and the spear3xx/6xx portion of this file conditional rather than alternatives.
--- arch/arm/mach-spear/restart.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-spear/restart.c +2 -1
@@ -26,7 +26,8 @@ void spear_restart(char mode, const char *cmd)/* hardware reset, Use on-chip reset capability */ #ifdef CONFIG_ARCH_SPEAR13XX writel_relaxed (0x01 ,SPEAR13XX_SYS_SW_RES ); -#else +#endif +#if defined(CONFIG_ARCH_SPEAR3XX ) || defined(CONFIG_ARCH_SPEAR6XX )sysctl_soft_reset ((void __iomem *)VA_SPEAR_SYS_CTRL_BASE );#endif }
Signature · 1 line
1.8.0
cover ARM: spear multiplatform support
In reply to Arnd BergmannQuoted 3 lines · Arnd Bergmann
This is a series I did some time ago but forgot to send out earlier. I'd like to get this into v3.9, so please give this a test if you can.
I should mention that the patches are also available in the arm-soc tree in the spear/multiplatform branch.
Arnd
cover ARM: spear multiplatform support
In reply to Arnd BergmannQuoted 3 lines · Arnd Bergmann
This is a series I did some time ago but forgot to send out earlier. I'd like to get this into v3.9, so please give this a test if you can.
Wow!! Awesome work Arnd.
cover ARM: spear multiplatform support
In reply to Arnd BergmannHello Arnd,
Quoted 3 lines · Arnd Bergmann
This is a series I did some time ago but forgot to send out earlier. I'd like to get this into v3.9, so please give this a test if you can.
Me and bhavna tried to test this patch set on spear1340 and spear320-hmi. We applied your patch set on the latest kernel v3.8-rc5 and in both case (1340 and 320-hmi) we observe that the kernel load address is changed form 0x8000 to 0xfffffff2.
---------------------------------------------------------------
Legacy Image at E6080000:
Image Name: Linux-3.8.0-rc5-00013-g35c416f
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2144560 Bytes = 2 MiB Load Address: fffffff2
Entry Point: fffffff2
Verifying Checksum ... OK
---------------------------------------------------------------
Previously it was like:
---------------------------------------------------------------
Legacy Image at E6080000:
Image Name: Linux-3.5.0-lsp-3.3.1-spear13xx
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3060704 Bytes = 2.9 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... O---------------------------------------------------------------
And thats why it is giving following crash:
---------------------------------------------------------------
u-boot> bootm 0xe6080000 - 0xe6070000
## Booting kernel from Legacy Image at e6080000 ...
Image Name: Linux-3.8.0-rc5-00013-g35c416f
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2144560 Bytes = 2 MiB Load Address: fffffff2
Entry Point: fffffff2
Verifying Checksum ... OK
## Flattened Device Tree blob at e6070000
Booting using the fdt blob at 0xe6070000
Loading Kernel Image ... data abort
pc : [<3ff94608>] lr : [<3ff69ef4>]
sp : 3fe65aa8 ip : 00000000 fp : 00000000
r10: e6080040 r9 : e628b970 r8 : 3fe65f58
r7 : e6080000 r6 : 00000000 r5 : 3fe65b10 r4 : 00000000
r3 : fffffff2 r2 : 0000000d r1 : e6080040 r0 : fffffff2
Flags: nzCv IRQs off FIQs off Mode SVC_32
Resetting CPU ..
---------------------------------------------------------------
Regards
Vipul Samar
cover ARM: spear multiplatform support
Quoted 11 lines · vipul kumar samar
Hello Arnd,
Quoted 3 lines · Arnd Bergmann
This is a series I did some time ago but forgot to send out earlier. I'd like to get this into v3.9, so please give this a test if you can.
Me and bhavna tried to test this patch set on spear1340 and spear320-hmi. We applied your patch set on the latest kernel v3.8-rc5 and in both case (1340 and 320-hmi) we observe that the kernel load address is changed form
0x8000to0xfffffff2.
Hi Vipul and Bhavna,
Thanks for testing out the patches. I forgot about the loadaddress, which indeed does not get set for multiplatform kernels, because the kernel does not know the correct address when it depends on the platform you are booting on.
The recommended solution for this is to boot a normal 'vmlinux' or 'zImage' file rather than a uImage file. If you u-boot version is too old for that and you cannot update, you can manually call 'mkimage' to create a uImage file with the correct load address.
Arnd