Skip to content

Commit

Permalink
Merge branch 'spear/multiplatform' into spear/dma
Browse files Browse the repository at this point in the history
The actual SPEAr conversion to the DMA binding depends on
driver patches and the multiplatform work.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann committed Mar 12, 2013
2 parents 787b0c1 + bcf3e72 commit 1ef865b
Show file tree
Hide file tree
Showing 65 changed files with 431 additions and 766 deletions.
12 changes: 2 additions & 10 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -933,16 +933,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).

Expand Down Expand Up @@ -1104,7 +1096,7 @@ source "arch/arm/plat-samsung/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"

Expand Down
5 changes: 1 addition & 4 deletions arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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_VIRT) += virt
machine-$(CONFIG_ARCH_ZYNQ) += zynq
machine-$(CONFIG_ARCH_SUNXI) += sunxi
Expand All @@ -207,7 +205,6 @@ plat-$(CONFIG_PLAT_ORION) += orion
plat-$(CONFIG_PLAT_PXA) += pxa
plat-$(CONFIG_PLAT_S3C24XX) += samsung
plat-$(CONFIG_PLAT_S5P) += samsung
plat-$(CONFIG_PLAT_SPEAR) += spear
plat-$(CONFIG_PLAT_VERSATILE) += versatile

ifeq ($(CONFIG_ARCH_EBSA110),y)
Expand Down
9 changes: 9 additions & 0 deletions arch/arm/configs/multi_v7_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ CONFIG_ARCH_SUNXI=y
# CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA is not set
CONFIG_ARCH_ZYNQ=y
CONFIG_ARM_ERRATA_754322=y
CONFIG_PLAT_SPEAR=y
CONFIG_ARCH_SPEAR13XX=y
CONFIG_MACH_SPEAR1310=y
CONFIG_MACH_SPEAR1340=y
CONFIG_SMP=y
CONFIG_ARM_ARCH_TIMER=y
CONFIG_AEABI=y
Expand All @@ -23,6 +27,7 @@ CONFIG_BLK_DEV_SD=y
CONFIG_ATA=y
CONFIG_SATA_HIGHBANK=y
CONFIG_SATA_MV=y
CONFIG_SATA_AHCI_PLATFORM=y
CONFIG_NETDEVICES=y
CONFIG_NET_CALXEDA_XGMAC=y
CONFIG_SMSC911X=y
Expand All @@ -31,6 +36,7 @@ CONFIG_SERIO_AMBAKMI=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_DW=y
CONFIG_KEYBOARD_SPEAR=y
CONFIG_SERIAL_AMBA_PL011=y
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
CONFIG_SERIAL_OF_PLATFORM=y
Expand All @@ -40,6 +46,7 @@ CONFIG_I2C=y
CONFIG_I2C_DESIGNWARE_PLATFORM=y
CONFIG_SPI=y
CONFIG_SPI_PL022=y
CONFIG_GPIO_PL061=y
CONFIG_FB=y
CONFIG_FB_ARMCLCD=y
CONFIG_FRAMEBUFFER_CONSOLE=y
Expand All @@ -50,6 +57,7 @@ CONFIG_MMC=y
CONFIG_MMC_ARMMMCI=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SDHCI_SPEAR=y
CONFIG_EDAC=y
CONFIG_EDAC_MM_EDAC=y
CONFIG_EDAC_HIGHBANK_MC=y
Expand All @@ -58,3 +66,4 @@ CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_PL031=y
CONFIG_DMADEVICES=y
CONFIG_PL330_DMA=y
CONFIG_DW_DMAC=y
2 changes: 2 additions & 0 deletions arch/arm/configs/spear3xx_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions arch/arm/configs/spear6xx_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
103 changes: 103 additions & 0 deletions arch/arm/mach-spear/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
#
# SPEAr Platform configuration file
#

menuconfig PLAT_SPEAR
bool "ST SPEAr Family" if ARCH_MULTI_V7 || ARCH_MULTI_V5
default PLAT_SPEAR_SINGLE
select ARCH_REQUIRE_GPIOLIB
select ARM_AMBA
select CLKDEV_LOOKUP
select CLKSRC_MMIO
select COMMON_CLK
select GENERIC_CLOCKEVENTS
select HAVE_CLK

if PLAT_SPEAR

config ARCH_SPEAR13XX
bool "ST SPEAr13xx"
depends on ARCH_MULTI_V7 || PLAT_SPEAR_SINGLE
select ARCH_HAVE_CPUFREQ
select ARM_GIC
select CPU_V7
select GPIO_SPEAR_SPICS
select HAVE_SMP
select MIGHT_HAVE_CACHE_L2X0
select PINCTRL
select USE_OF
help
Supports for ARM's SPEAR13XX family

if ARCH_SPEAR13XX

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

endif #ARCH_SPEAR13XX

config ARCH_SPEAR3XX
bool "ST SPEAr3xx"
depends on ARCH_MULTI_V5 || PLAT_SPEAR_SINGLE
depends on !ARCH_SPEAR13XX
select ARM_VIC
select CPU_ARM926T
select PINCTRL
select USE_OF
help
Supports for ARM's SPEAR3XX family

if ARCH_SPEAR3XX

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

endif

config ARCH_SPEAR6XX
bool "ST SPEAr6XX"
depends on ARCH_MULTI_V5 || PLAT_SPEAR_SINGLE
depends on !ARCH_SPEAR13XX
select ARM_VIC
select CPU_ARM926T
help
Supports for ARM's SPEAR6XX family

config MACH_SPEAR600
def_bool y
depends on ARCH_SPEAR6XX
select USE_OF
help
Supports ST SPEAr600 boards configured via the device-treesource "arch/arm/mach-spear6xx/Kconfig"

config ARCH_SPEAR_AUTO
def_bool PLAT_SPEAR_SINGLE
depends on !ARCH_SPEAR13XX && !ARCH_SPEAR6XX
select ARCH_SPEAR3XX

endif

24 changes: 24 additions & 0 deletions arch/arm/mach-spear/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# SPEAr Platform specific Makefile
#

ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include

# 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
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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 <rajeev-dlh.kumar@st.com>
* Viresh Kumar <viresh.linux@gmail.com>
*
* This file is licensed under the terms of the GNU General Public
Expand All @@ -15,37 +14,46 @@
#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 void spear13xx_timer_init(void);
extern void spear3xx_timer_init(void);
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 __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);
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);

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 */
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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<rajeev-dlh.kumar@st.com>
* Copyright (C) 2009-2012 ST Microelectronics
* Rajeev Kumar <rajeev-dlh.kumar@st.com>
* Viresh Kumar <viresh.linux@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
Expand All @@ -14,12 +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 */
#endif /* __MACH_IRQS_H */
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <mach/spear.h>

#define MISC_BASE IOMEM(VA_SPEAR3XX_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 */
Loading

0 comments on commit 1ef865b

Please sign in to comment.