diff options
Diffstat (limited to 'arch/arm/mach-spear')
-rw-r--r-- | arch/arm/mach-spear/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-spear/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-spear/generic.h | 8 | ||||
-rw-r--r-- | arch/arm/mach-spear/include/mach/irqs.h | 35 | ||||
-rw-r--r-- | arch/arm/mach-spear/include/mach/uncompress.h | 42 | ||||
-rw-r--r-- | arch/arm/mach-spear/misc_regs.h (renamed from arch/arm/mach-spear/include/mach/misc_regs.h) | 9 | ||||
-rw-r--r-- | arch/arm/mach-spear/pl080.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-spear/pl080.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-spear/platsmp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-spear/restart.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-spear/spear.h (renamed from arch/arm/mach-spear/include/mach/spear.h) | 5 | ||||
-rw-r--r-- | arch/arm/mach-spear/spear1310.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-spear/spear1340.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-spear/spear13xx.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-spear/spear300.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-spear/spear310.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-spear/spear320.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-spear/spear3xx.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-spear/spear6xx.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-spear/time.c | 13 |
20 files changed, 43 insertions, 166 deletions
diff --git a/arch/arm/mach-spear/Kconfig b/arch/arm/mach-spear/Kconfig index 20e284563a80..1add7ee49b63 100644 --- a/arch/arm/mach-spear/Kconfig +++ b/arch/arm/mach-spear/Kconfig @@ -5,7 +5,7 @@ menuconfig PLAT_SPEAR bool "ST SPEAr Family" - depends on ARCH_MULTI_V7 || ARCH_MULTI_V5 + depends on ARCH_MULTI_V7 || (ARCH_MULTI_V5 && CPU_LITTLE_ENDIAN) select ARM_AMBA select CLKSRC_MMIO select GPIOLIB diff --git a/arch/arm/mach-spear/Makefile b/arch/arm/mach-spear/Makefile index 176b14f83089..c6101a843601 100644 --- a/arch/arm/mach-spear/Makefile +++ b/arch/arm/mach-spear/Makefile @@ -3,8 +3,6 @@ # SPEAr Platform specific Makefile # -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include - # Common support obj-y := restart.o time.o diff --git a/arch/arm/mach-spear/generic.h b/arch/arm/mach-spear/generic.h index 8ec2b92dca19..9e36920d4cfd 100644 --- a/arch/arm/mach-spear/generic.h +++ b/arch/arm/mach-spear/generic.h @@ -1,13 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * spear machine family generic header file * * Copyright (C) 2009-2012 ST Microelectronics * Rajeev Kumar <rajeev-dlh.kumar@st.com> * Viresh Kumar <vireshk@kernel.org> - * - * 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_GENERIC_H @@ -28,11 +25,8 @@ extern struct pl022_ssp_controller pl022_plat_data; extern struct pl08x_platform_data pl080_plat_data; void __init spear_setup_of_timer(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 __iomem *misc_base); void __init spear13xx_map_io(void); void __init spear13xx_l2x0_init(void); diff --git a/arch/arm/mach-spear/include/mach/irqs.h b/arch/arm/mach-spear/include/mach/irqs.h deleted file mode 100644 index 7058720c5278..000000000000 --- a/arch/arm/mach-spear/include/mach/irqs.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * IRQ helper macros for spear machine family - * - * Copyright (C) 2009-2012 ST Microelectronics - * Rajeev Kumar <rajeev-dlh.kumar@st.com> - * Viresh Kumar <vireshk@kernel.org> - * - * 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 */ diff --git a/arch/arm/mach-spear/include/mach/uncompress.h b/arch/arm/mach-spear/include/mach/uncompress.h deleted file mode 100644 index 8439b9c12edb..000000000000 --- a/arch/arm/mach-spear/include/mach/uncompress.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * arch/arm/plat-spear/include/plat/uncompress.h - * - * Serial port stubs for kernel decompress status messages - * - * Copyright (C) 2009 ST Microelectronics - * Viresh Kumar <vireshk@kernel.org> - * - * 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 <linux/io.h> -#include <linux/amba/serial.h> -#include <mach/spear.h> - -#ifndef __PLAT_UNCOMPRESS_H -#define __PLAT_UNCOMPRESS_H -/* - * This does not append a newline - */ -static inline void putc(int c) -{ - void __iomem *base = (void __iomem *)SPEAR_DBG_UART_BASE; - - while (readl_relaxed(base + UART01x_FR) & UART01x_FR_TXFF) - barrier(); - - writel_relaxed(c, base + UART01x_DR); -} - -static inline void flush(void) -{ -} - -/* - * nothing to do - */ -#define arch_decomp_setup() - -#endif /* __PLAT_UNCOMPRESS_H */ diff --git a/arch/arm/mach-spear/include/mach/misc_regs.h b/arch/arm/mach-spear/misc_regs.h index cfaf7c665b58..72aa801a3a89 100644 --- a/arch/arm/mach-spear/include/mach/misc_regs.h +++ b/arch/arm/mach-spear/misc_regs.h @@ -1,20 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * arch/arm/mach-spear3xx/include/mach/misc_regs.h - * * Miscellaneous registers definitions for SPEAr3xx machine family * * Copyright (C) 2009 ST Microelectronics * Viresh Kumar <vireshk@kernel.org> - * - * 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> +#include "spear.h" #define MISC_BASE (VA_SPEAR_ICM3_MISC_REG_BASE) #define DMA_CHN_CFG (MISC_BASE + 0x0A0) diff --git a/arch/arm/mach-spear/pl080.c b/arch/arm/mach-spear/pl080.c index b4529f3e0ee9..d6b8627d2544 100644 --- a/arch/arm/mach-spear/pl080.c +++ b/arch/arm/mach-spear/pl080.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * arch/arm/plat-spear/pl080.c * @@ -5,10 +6,6 @@ * * Copyright (C) 2012 ST Microelectronics * Viresh Kumar <vireshk@kernel.org> - * - * 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 <linux/amba/pl08x.h> @@ -17,8 +14,8 @@ #include <linux/err.h> #include <linux/io.h> #include <linux/spinlock_types.h> -#include <mach/spear.h> -#include <mach/misc_regs.h> +#include "spear.h" +#include "misc_regs.h" static spinlock_t lock = __SPIN_LOCK_UNLOCKED(x); diff --git a/arch/arm/mach-spear/pl080.h b/arch/arm/mach-spear/pl080.h index 608dec6725ae..3732d940dbfb 100644 --- a/arch/arm/mach-spear/pl080.h +++ b/arch/arm/mach-spear/pl080.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * arch/arm/plat-spear/include/plat/pl080.h * @@ -5,10 +6,6 @@ * * Copyright (C) 2012 ST Microelectronics * Viresh Kumar <vireshk@kernel.org> - * - * 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 __PLAT_PL080_H diff --git a/arch/arm/mach-spear/platsmp.c b/arch/arm/mach-spear/platsmp.c index e33a85c28c95..97fbda998df9 100644 --- a/arch/arm/mach-spear/platsmp.c +++ b/arch/arm/mach-spear/platsmp.c @@ -14,7 +14,7 @@ #include <linux/smp.h> #include <asm/cacheflush.h> #include <asm/smp_scu.h> -#include <mach/spear.h> +#include "spear.h" #include "generic.h" /* XXX spear_pen_release is cargo culted code - DO NOT COPY XXX */ diff --git a/arch/arm/mach-spear/restart.c b/arch/arm/mach-spear/restart.c index b4342155a783..76fb16cc8132 100644 --- a/arch/arm/mach-spear/restart.c +++ b/arch/arm/mach-spear/restart.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * arch/arm/plat-spear/restart.c * @@ -5,16 +6,12 @@ * * Copyright (C) 2009 ST Microelectronics * Viresh Kumar <vireshk@kernel.org> - * - * 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 <linux/io.h> #include <linux/amba/sp810.h> #include <linux/reboot.h> #include <asm/system_misc.h> -#include <mach/spear.h> +#include "spear.h" #include "generic.h" #define SPEAR13XX_SYS_SW_RES (VA_MISC_BASE + 0x204) diff --git a/arch/arm/mach-spear/include/mach/spear.h b/arch/arm/mach-spear/spear.h index 5ed841ccf8a3..432efd407c76 100644 --- a/arch/arm/mach-spear/include/mach/spear.h +++ b/arch/arm/mach-spear/spear.h @@ -1,13 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * SPEAr3xx/6xx Machine family specific definition * * Copyright (C) 2009,2012 ST Microelectronics * Rajeev Kumar<rajeev-dlh.kumar@st.com> * Viresh Kumar <vireshk@kernel.org> - * - * 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_SPEAR_H diff --git a/arch/arm/mach-spear/spear1310.c b/arch/arm/mach-spear/spear1310.c index a7d4f136836f..89d388388e02 100644 --- a/arch/arm/mach-spear/spear1310.c +++ b/arch/arm/mach-spear/spear1310.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * arch/arm/mach-spear13xx/spear1310.c * @@ -5,10 +6,6 @@ * * Copyright (C) 2012 ST Microelectronics * Viresh Kumar <vireshk@kernel.org> - * - * 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. */ #define pr_fmt(fmt) "SPEAr1310: " fmt @@ -18,7 +15,7 @@ #include <asm/mach/arch.h> #include <asm/mach/map.h> #include "generic.h" -#include <mach/spear.h> +#include "spear.h" /* Base addresses */ #define SPEAR1310_RAS_GRP1_BASE UL(0xD8000000) diff --git a/arch/arm/mach-spear/spear1340.c b/arch/arm/mach-spear/spear1340.c index a212af90c0bc..a391f154eff9 100644 --- a/arch/arm/mach-spear/spear1340.c +++ b/arch/arm/mach-spear/spear1340.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * arch/arm/mach-spear13xx/spear1340.c * @@ -5,10 +6,6 @@ * * Copyright (C) 2012 ST Microelectronics * Viresh Kumar <vireshk@kernel.org> - * - * 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. */ #define pr_fmt(fmt) "SPEAr1340: " fmt diff --git a/arch/arm/mach-spear/spear13xx.c b/arch/arm/mach-spear/spear13xx.c index 74d1ca2a529a..ac5b76bbeab5 100644 --- a/arch/arm/mach-spear/spear13xx.c +++ b/arch/arm/mach-spear/spear13xx.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * arch/arm/mach-spear13xx/spear13xx.c * @@ -5,10 +6,6 @@ * * Copyright (C) 2012 ST Microelectronics * Viresh Kumar <vireshk@kernel.org> - * - * 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. */ #define pr_fmt(fmt) "SPEAr13xx: " fmt @@ -21,7 +18,7 @@ #include <linux/of.h> #include <asm/hardware/cache-l2x0.h> #include <asm/mach/map.h> -#include <mach/spear.h> +#include "spear.h" #include "generic.h" void __init spear13xx_l2x0_init(void) @@ -29,7 +26,7 @@ void __init spear13xx_l2x0_init(void) /* * 512KB (64KB/way), 8-way associativity, parity supported * - * FIXME: 9th bit, of Auxillary Controller register must be set + * FIXME: 9th bit, of Auxiliary Controller register must be set * for some spear13xx devices for stable L2 operation. * * Enable Early BRESP, L2 prefetch for Instruction and Data, diff --git a/arch/arm/mach-spear/spear300.c b/arch/arm/mach-spear/spear300.c index 325b89579be1..1d6b6e10fcf6 100644 --- a/arch/arm/mach-spear/spear300.c +++ b/arch/arm/mach-spear/spear300.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * arch/arm/mach-spear3xx/spear300.c * @@ -5,10 +6,6 @@ * * Copyright (C) 2009-2012 ST Microelectronics * Viresh Kumar <vireshk@kernel.org> - * - * 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. */ #define pr_fmt(fmt) "SPEAr300: " fmt @@ -17,7 +14,7 @@ #include <linux/of_platform.h> #include <asm/mach/arch.h> #include "generic.h" -#include <mach/spear.h> +#include "spear.h" /* DMAC platform data's slave info */ struct pl08x_channel_data spear300_dma_info[] = { diff --git a/arch/arm/mach-spear/spear310.c b/arch/arm/mach-spear/spear310.c index 59e173dc85cf..da4643b9f3bb 100644 --- a/arch/arm/mach-spear/spear310.c +++ b/arch/arm/mach-spear/spear310.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * arch/arm/mach-spear3xx/spear310.c * @@ -5,10 +6,6 @@ * * Copyright (C) 2009-2012 ST Microelectronics * Viresh Kumar <vireshk@kernel.org> - * - * 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. */ #define pr_fmt(fmt) "SPEAr310: " fmt @@ -18,7 +15,7 @@ #include <linux/of_platform.h> #include <asm/mach/arch.h> #include "generic.h" -#include <mach/spear.h> +#include "spear.h" #define SPEAR310_UART1_BASE UL(0xB2000000) #define SPEAR310_UART2_BASE UL(0xB2080000) diff --git a/arch/arm/mach-spear/spear320.c b/arch/arm/mach-spear/spear320.c index 926d5a243238..12aa82b987ac 100644 --- a/arch/arm/mach-spear/spear320.c +++ b/arch/arm/mach-spear/spear320.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * arch/arm/mach-spear3xx/spear320.c * @@ -5,10 +6,6 @@ * * Copyright (C) 2009-2012 ST Microelectronics * Viresh Kumar <vireshk@kernel.org> - * - * 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. */ #define pr_fmt(fmt) "SPEAr320: " fmt @@ -20,7 +17,7 @@ #include <asm/mach/arch.h> #include <asm/mach/map.h> #include "generic.h" -#include <mach/spear.h> +#include "spear.h" #define SPEAR320_UART1_BASE UL(0xA3000000) #define SPEAR320_UART2_BASE UL(0xA4000000) diff --git a/arch/arm/mach-spear/spear3xx.c b/arch/arm/mach-spear/spear3xx.c index f83321d5e353..7ef9670d3029 100644 --- a/arch/arm/mach-spear/spear3xx.c +++ b/arch/arm/mach-spear/spear3xx.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * arch/arm/mach-spear3xx/spear3xx.c * @@ -5,10 +6,6 @@ * * Copyright (C) 2009-2012 ST Microelectronics * Viresh Kumar <vireshk@kernel.org> - * - * 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. */ #define pr_fmt(fmt) "SPEAr3xx: " fmt @@ -16,12 +13,13 @@ #include <linux/amba/pl022.h> #include <linux/amba/pl080.h> #include <linux/clk.h> +#include <linux/clk/spear.h> #include <linux/io.h> #include <asm/mach/map.h> #include "pl080.h" #include "generic.h" -#include <mach/spear.h> -#include <mach/misc_regs.h> +#include "spear.h" +#include "misc_regs.h" /* ssp device registration */ struct pl022_ssp_controller pl022_plat_data = { diff --git a/arch/arm/mach-spear/spear6xx.c b/arch/arm/mach-spear/spear6xx.c index c5fc110134ba..f0a1e704cceb 100644 --- a/arch/arm/mach-spear/spear6xx.c +++ b/arch/arm/mach-spear/spear6xx.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * arch/arm/mach-spear6xx/spear6xx.c * @@ -7,14 +8,11 @@ * Rajeev Kumar<rajeev-dlh.kumar@st.com> * * Copyright 2012 Stefan Roese <sr@denx.de> - * - * 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 <linux/amba/pl08x.h> #include <linux/clk.h> +#include <linux/clk/spear.h> #include <linux/err.h> #include <linux/of.h> #include <linux/of_address.h> @@ -25,8 +23,8 @@ #include <asm/mach/map.h> #include "pl080.h" #include "generic.h" -#include <mach/spear.h> -#include <mach/misc_regs.h> +#include "spear.h" +#include "misc_regs.h" /* dmac device registration */ static struct pl08x_channel_data spear600_dma_info[] = { @@ -342,7 +340,7 @@ static struct pl08x_platform_data spear6xx_pl080_plat_data = { * 0xD0000000 0xFD000000 * 0xFC000000 0xFC000000 */ -struct map_desc spear6xx_io_desc[] __initdata = { +static struct map_desc spear6xx_io_desc[] __initdata = { { .virtual = (unsigned long)VA_SPEAR6XX_ML_CPU_BASE, .pfn = __phys_to_pfn(SPEAR_ICM3_ML1_2_BASE), @@ -362,12 +360,12 @@ struct map_desc spear6xx_io_desc[] __initdata = { }; /* This will create static memory mapping for selected devices */ -void __init spear6xx_map_io(void) +static void __init spear6xx_map_io(void) { iotable_init(spear6xx_io_desc, ARRAY_SIZE(spear6xx_io_desc)); } -void __init spear6xx_timer_init(void) +static void __init spear6xx_timer_init(void) { char pclk_name[] = "pll3_clk"; struct clk *gpt_clk, *pclk; @@ -397,7 +395,7 @@ void __init spear6xx_timer_init(void) } /* Add auxdata to pass platform data */ -struct of_dev_auxdata spear6xx_auxdata_lookup[] __initdata = { +static struct of_dev_auxdata spear6xx_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("arm,pl080", SPEAR_ICM3_DMA_BASE, NULL, &spear6xx_pl080_plat_data), {} diff --git a/arch/arm/mach-spear/time.c b/arch/arm/mach-spear/time.c index d1fdb6066f7b..e979e2197f8e 100644 --- a/arch/arm/mach-spear/time.c +++ b/arch/arm/mach-spear/time.c @@ -1,12 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * arch/arm/plat-spear/time.c * * Copyright (C) 2010 ST Microelectronics * Shiraz Hashim<shiraz.linux.kernel@gmail.com> - * - * 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 <linux/clk.h> @@ -218,13 +215,13 @@ void __init spear_setup_of_timer(void) irq = irq_of_parse_and_map(np, 0); if (!irq) { pr_err("%s: No irq passed for timer via DT\n", __func__); - return; + goto err_put_np; } gpt_base = of_iomap(np, 0); if (!gpt_base) { pr_err("%s: of iomap failed\n", __func__); - return; + goto err_put_np; } gpt_clk = clk_get_sys("gpt0", NULL); @@ -239,6 +236,8 @@ void __init spear_setup_of_timer(void) goto err_prepare_enable_clk; } + of_node_put(np); + spear_clockevent_init(irq); spear_clocksource_init(); @@ -248,4 +247,6 @@ err_prepare_enable_clk: clk_put(gpt_clk); err_iomap: iounmap(gpt_base); +err_put_np: + of_node_put(np); } |