SPEAr DT support updates
Subsystems (4)
cover SPEAr DT support updates
Hello,
This patchset updates DT support for SPEAr3xx and 6xx. It has following changes:
- updates DT support Mainly for SPEAr3xx family
- updates dma support for SPEAr6xx
- updates defconfig
It has dependency on following patchsets:
- ehci & ohci: http://www.spinics.net/lists/linux-usb/msg60362.html
- rtc: http://lkml.org/lkml/2012/3/26/96
- keyboard: Link not yet available:
subject: Input: spear-keyboard: add device tree bindings
- SPEAr patches: http://comments.gmane.org/gmane.linux.ports.arm.kernel/158865
Viresh Kumar (5):
SPEAr6xx: Add compilation support for dtbs using 'make dtbs'
SPEAr3xx: Replace printk() with pr_*()
ARM: SPEAr3xx: Add device-tree support to SPEAr3xx architecture
SPEAr: Add PL080 DMA support for 3xx and 6xx
SPEAr: Update defconfigs
Documentation/arm/SPEAr/overview.txt | 13 +- Documentation/devicetree/bindings/arm/spear.txt | 18 ++ arch/arm/Makefile | 6 +- arch/arm/boot/dts/spear300-evb.dts | 181 +++++++++++ arch/arm/boot/dts/spear300.dtsi | 74 +++++ arch/arm/boot/dts/spear310-evb.dts | 102 +++++++ arch/arm/boot/dts/spear310.dtsi | 75 +++++ arch/arm/boot/dts/spear320-evb.dts | 110 +++++++ arch/arm/boot/dts/spear320.dtsi | 92 ++++++ arch/arm/boot/dts/spear3xx.dtsi | 151 +++++++++ arch/arm/boot/dts/spear600-evb.dts | 4 + arch/arm/boot/dts/spear600.dtsi | 8 + arch/arm/configs/spear3xx_defconfig | 52 +++- arch/arm/configs/spear6xx_defconfig | 41 ++- arch/arm/mach-spear3xx/Kconfig | 40 +-- arch/arm/mach-spear3xx/Makefile | 19 +- arch/arm/mach-spear3xx/Makefile.boot | 4 + arch/arm/mach-spear3xx/clock.c | 93 +++--- arch/arm/mach-spear3xx/include/mach/generic.h | 48 ++- arch/arm/mach-spear3xx/include/mach/irqs.h | 6 +- arch/arm/mach-spear3xx/include/mach/spear300.h | 4 +- arch/arm/mach-spear3xx/include/mach/spear310.h | 4 +- arch/arm/mach-spear3xx/include/mach/spear320.h | 4 +- arch/arm/mach-spear3xx/spear300.c | 253 +++++++++++++-- arch/arm/mach-spear3xx/spear300_evb.c | 75 ----- arch/arm/mach-spear3xx/spear310.c | 293 ++++++++++++++++-- arch/arm/mach-spear3xx/spear310_evb.c | 81 ----- arch/arm/mach-spear3xx/spear320.c | 293 ++++++++++++++++-- arch/arm/mach-spear3xx/spear320_evb.c | 79 ----- arch/arm/mach-spear3xx/spear3xx.c | 131 ++++++-- arch/arm/mach-spear6xx/Makefile.boot | 2 + arch/arm/mach-spear6xx/clock.c | 2 +- arch/arm/mach-spear6xx/spear6xx.c | 372 ++++++++++++++++++++++- arch/arm/plat-spear/Kconfig | 5 +- arch/arm/plat-spear/Makefile | 4 +- arch/arm/plat-spear/include/plat/pl080.h | 21 ++ arch/arm/plat-spear/pl080.c | 79 +++++ 37 files changed, 2371 insertions(+), 468 deletions(-) create mode 100644 arch/arm/boot/dts/spear300-evb.dts create mode 100644 arch/arm/boot/dts/spear300.dtsi create mode 100644 arch/arm/boot/dts/spear310-evb.dts create mode 100644 arch/arm/boot/dts/spear310.dtsi create mode 100644 arch/arm/boot/dts/spear320-evb.dts create mode 100644 arch/arm/boot/dts/spear320.dtsi create mode 100644 arch/arm/boot/dts/spear3xx.dtsi delete mode 100644 arch/arm/mach-spear3xx/spear300_evb.c delete mode 100644 arch/arm/mach-spear3xx/spear310_evb.c delete mode 100644 arch/arm/mach-spear3xx/spear320_evb.c create mode 100644 arch/arm/plat-spear/include/plat/pl080.h create mode 100644 arch/arm/plat-spear/pl080.c
Signature · 1 line
1.7.10.rc2.10.gb47606
PATCH 1/5 SPEAr6xx: Add compilation support for dtbs using 'make dtbs'
'make dtbs' compiles all dtbs for a family. For this we need to add entries for all board dtb's in Makefile.boot file. This patch does it.
--- arch/arm/mach-spear6xx/Makefile.boot | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-spear6xx/Makefile.boot +2 -0
@@ -1,3 +1,5 @@ zreladdr-y += 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000 + +dtb-$(CONFIG_BOARD_SPEAR600_DT) += spear600-evb.dtb
Signature · 1 line
1.7.10.rc2.10.gb47606
PATCH 2/5 SPEAr3xx: Replace printk() with pr_*()
In reply to Viresh KumarFor better print logs/messages, it is advisable to use pr_*() routines instead of directly calling printks. This patch removes direct calling of printks for spear3xx.
--- arch/arm/mach-spear3xx/spear300.c | 8 +++++--- arch/arm/mach-spear3xx/spear310.c | 13 +++++++------ arch/arm/mach-spear3xx/spear320.c | 11 ++++++----- arch/arm/mach-spear3xx/spear3xx.c | 2 ++ 4 files changed, 20 insertions(+), 14 deletions(-)
arch/arm/mach-spear3xx/spear300.c +5 -3
@@ -11,6 +11,8 @@* warranty of any kind, whether express or implied. */ +#define pr_fmt (fmt) "SPEAr300: " fmt +#include <linux/types.h> #include <linux/amba/pl061.h> #include <linux/ptrace.h>
@@ -447,7 +449,7 @@ void __init spear300_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs,if (shirq_ras1.regs.base) { ret =spear_shirq_register (&shirq_ras1);if (ret) -printk (KERN_ERR "Error registering Shared IRQ\n" ); +pr_err ("Error registering Shared IRQ\n" ); }/* pmx initialization */
@@ -459,8 +461,8 @@ void __init spear300_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs,if (pmx_driver.base) { ret =pmx_register (&pmx_driver);if (ret) -printk (KERN_ERR "padmux: registration failed. err no" -": %d\n" , ret); +pr_err ("padmux: registration failed. err no: %d\n" , + ret);/* Free Mapping, device selection already done */ iounmap (pmx_driver.base); }
arch/arm/mach-spear3xx/spear310.c +7 -6
@@ -11,6 +11,8 @@* warranty of any kind, whether express or implied. */ +#define pr_fmt (fmt) "SPEAr310: " fmt +#include <linux/ptrace.h> #include <asm/irq.h> #include <plat/shirq.h>
@@ -274,25 +276,25 @@ void __init spear310_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, shirq_ras1.regs.base = base; ret =spear_shirq_register (&shirq_ras1);if (ret) -printk (KERN_ERR "Error registering Shared IRQ 1\n" ); +pr_err ("Error registering Shared IRQ 1\n" );/* shirq 2 */ shirq_ras2.regs.base = base; ret =spear_shirq_register (&shirq_ras2);if (ret) -printk (KERN_ERR "Error registering Shared IRQ 2\n" ); +pr_err ("Error registering Shared IRQ 2\n" );/* shirq 3 */ shirq_ras3.regs.base = base; ret =spear_shirq_register (&shirq_ras3);if (ret) -printk (KERN_ERR "Error registering Shared IRQ 3\n" ); +pr_err ("Error registering Shared IRQ 3\n" );/* shirq 4 */ shirq_intrcomm_ras.regs.base = base; ret =spear_shirq_register (&shirq_intrcomm_ras);if (ret) -printk (KERN_ERR "Error registering Shared IRQ 4\n" ); +pr_err ("Error registering Shared IRQ 4\n" ); }/* pmx initialization */
@@ -303,6 +305,5 @@ void __init spear310_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, ret =pmx_register (&pmx_driver);if (ret) -printk (KERN_ERR "padmux: registration failed. err no: %d\n" , - ret); +pr_err ("padmux: registration failed. err no: %d\n" , ret); }
arch/arm/mach-spear3xx/spear320.c +6 -5
@@ -11,6 +11,8 @@* warranty of any kind, whether express or implied. */ +#define pr_fmt (fmt) "SPEAr320: " fmt +#include <linux/ptrace.h> #include <asm/irq.h> #include <plat/shirq.h>
@@ -527,19 +529,19 @@ void __init spear320_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, shirq_ras1.regs.base = base; ret =spear_shirq_register (&shirq_ras1);if (ret) -printk (KERN_ERR "Error registering Shared IRQ 1\n" ); +pr_err ("Error registering Shared IRQ 1\n" );/* shirq 3 */ shirq_ras3.regs.base = base; ret =spear_shirq_register (&shirq_ras3);if (ret) -printk (KERN_ERR "Error registering Shared IRQ 3\n" ); +pr_err ("Error registering Shared IRQ 3\n" );/* shirq 4 */ shirq_intrcomm_ras.regs.base = base; ret =spear_shirq_register (&shirq_intrcomm_ras);if (ret) -printk (KERN_ERR "Error registering Shared IRQ 4\n" ); +pr_err ("Error registering Shared IRQ 4\n" ); }/* pmx initialization */
@@ -550,6 +552,5 @@ void __init spear320_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, ret =pmx_register (&pmx_driver);if (ret) -printk (KERN_ERR "padmux: registration failed. err no: %d\n" , - ret); +pr_err ("padmux: registration failed. err no: %d\n" , ret); }
arch/arm/mach-spear3xx/spear3xx.c +2 -0
@@ -11,6 +11,8 @@* warranty of any kind, whether express or implied. */ +#define pr_fmt (fmt) "SPEAr3xx: " fmt +#include <linux/types.h> #include <linux/amba/pl061.h> #include <linux/ptrace.h>
Signature · 1 line
1.7.10.rc2.10.gb47606
PATCH 3/5 ARM: SPEAr3xx: Add device-tree support to SPEAr3xx architecture
In reply to Viresh KumarThis patch adds a generic target for SPEAr3xx machines that can be configured via the device-tree. Currently the following devices are supported via the devicetree:
- VIC interrupts
- PL011 UART
- PL061 GPIO
- PL110 CLCD
- SP805 WDT
- Synopsys DW I2C
- Synopsys DW ethernet
- ST FSMC-NAND
- ST SPEAR-SMI
- ST SPEAR-KEYBOARD
- ST SPEAR-RTC
- ARASAN SDHCI-SPEAR
- SPEAR-EHCI
- SPEAR-OHCI
Other peripheral devices will follow in later patches.
--- Documentation/arm/SPEAr/overview.txt | 13 +- Documentation/devicetree/bindings/arm/spear.txt | 18 +++ arch/arm/Makefile | 6 +- arch/arm/boot/dts/spear300-evb.dts | 177 +++++++++++++++++++++++ arch/arm/boot/dts/spear300.dtsi | 74 ++++++++++ arch/arm/boot/dts/spear310-evb.dts | 98 +++++++++++++ arch/arm/boot/dts/spear310.dtsi | 75 ++++++++++ arch/arm/boot/dts/spear320-evb.dts | 106 ++++++++++++++ arch/arm/boot/dts/spear320.dtsi | 92 ++++++++++++ arch/arm/boot/dts/spear3xx.dtsi | 143 ++++++++++++++++++ arch/arm/mach-spear3xx/Kconfig | 40 ++--- arch/arm/mach-spear3xx/Makefile | 19 +-- arch/arm/mach-spear3xx/Makefile.boot | 4 + arch/arm/mach-spear3xx/clock.c | 91 ++++++------ arch/arm/mach-spear3xx/include/mach/generic.h | 46 +++--- arch/arm/mach-spear3xx/include/mach/irqs.h | 6 +- arch/arm/mach-spear3xx/include/mach/spear300.h | 4 +- arch/arm/mach-spear3xx/include/mach/spear310.h | 4 +- arch/arm/mach-spear3xx/include/mach/spear320.h | 4 +- arch/arm/mach-spear3xx/spear300.c | 55 +++++-- arch/arm/mach-spear3xx/spear300_evb.c | 75 ---------- arch/arm/mach-spear3xx/spear310.c | 90 ++++++++++-- arch/arm/mach-spear3xx/spear310_evb.c | 81 ----------- arch/arm/mach-spear3xx/spear320.c | 92 ++++++++++-- arch/arm/mach-spear3xx/spear320_evb.c | 79 ---------- arch/arm/mach-spear3xx/spear3xx.c | 108 +++++++++++--- arch/arm/plat-spear/Kconfig | 5 +- arch/arm/plat-spear/Makefile | 2 +- 28 files changed, 1176 insertions(+), 431 deletions(-) create mode 100644 arch/arm/boot/dts/spear300-evb.dts create mode 100644 arch/arm/boot/dts/spear300.dtsi create mode 100644 arch/arm/boot/dts/spear310-evb.dts create mode 100644 arch/arm/boot/dts/spear310.dtsi create mode 100644 arch/arm/boot/dts/spear320-evb.dts create mode 100644 arch/arm/boot/dts/spear320.dtsi create mode 100644 arch/arm/boot/dts/spear3xx.dtsi delete mode 100644 arch/arm/mach-spear3xx/spear300_evb.c delete mode 100644 arch/arm/mach-spear3xx/spear310_evb.c delete mode 100644 arch/arm/mach-spear3xx/spear320_evb.c
Documentation/arm/SPEAr/overview.txt +7 -6
@@ -17,14 +17,14 @@ Introduction SPEAr (Platform) - SPEAr3XX (3XX SOC series, based on ARM9) - SPEAr300 (SOC) - - SPEAr300_EVB (Evaluation Board) + - SPEAr300 Evaluation Board - SPEAr310 (SOC) - - SPEAr310_EVB (Evaluation Board) + - SPEAr310 Evaluation Board - SPEAr320 (SOC) - - SPEAr320_EVB (Evaluation Board) + - SPEAr320 Evaluation Board - SPEAr6XX (6XX SOC series, based on ARM9) - SPEAr600 (SOC) - - SPEAr600_EVB (Evaluation Board) + - SPEAr600 Evaluation Board - SPEAr13XX (13XX SOC series, based on ARM CORTEXA9) - SPEAr1300 (SOC)
@@ -51,10 +51,11 @@ Introduction Common file for machines of spear3xx family is mach-spear3xx/spear3xx.c and for spear6xx is mach-spear6xx/spear6xx.c. mach-spear* also contain soc/machine specific files, like spear300.c, spear310.c, spear320.c and spear600.c. - mach-spear* also contains board specific files for each machine type. + mach-spear* doesn't contains board specific files as they fully support + Flattened Device Tree. Document Author --------------- - Viresh Kumar, (c) 2010 ST Microelectronics + Viresh Kumar <[email protected]>, (c) 2010-2012 ST Microelectronics
Documentation/devicetree/bindings/arm/spear.txt +18 -0
@@ -6,3 +6,21 @@ Boards with the ST SPEAr600 SoC shall have the following properties: Required root node property: compatible = "st,spear600"; + +Boards with the ST SPEAr300 SoC shall have the following properties: + +Required root node property: + +compatible = "st,spear300"; + +Boards with the ST SPEAr310 SoC shall have the following properties: + +Required root node property: + +compatible = "st,spear310"; + +Boards with the ST SPEAr320 SoC shall have the following properties: + +Required root node property: + +compatible = "st,spear320";
arch/arm/Makefile +3 -3
@@ -192,9 +192,9 @@ machine-$(CONFIG_ARCH_VEXPRESS) := vexpress machine-$(CONFIG_ARCH_VT8500) := vt8500 machine-$(CONFIG_ARCH_W90X900) := w90x900 machine-$(CONFIG_FOOTBRIDGE) := footbridge -machine-$(CONFIG_MACH_SPEAR300) := spear3xx -machine-$(CONFIG_MACH_SPEAR310) := spear3xx -machine-$(CONFIG_MACH_SPEAR320) := spear3xx +machine-$(CONFIG_MACH_SPEAR300_DT) := spear3xx +machine-$(CONFIG_MACH_SPEAR310_DT) := spear3xx +machine-$(CONFIG_MACH_SPEAR320_DT) := spear3xx machine-$(CONFIG_MACH_SPEAR600) := spear6xx machine-$(CONFIG_ARCH_ZYNQ) := zynq
arch/arm/boot/dts/spear300-evb.dts new file +177 -0
177 lines not on this page · raw message
arch/arm/boot/dts/spear300.dtsi new file +74 -0
74 lines not on this page · raw message
arch/arm/boot/dts/spear310-evb.dts new file +98 -0
98 lines not on this page · raw message
arch/arm/boot/dts/spear310.dtsi new file +75 -0
75 lines not on this page · raw message
arch/arm/boot/dts/spear320-evb.dts new file +106 -0
106 lines not on this page · raw message
arch/arm/boot/dts/spear320.dtsi new file +92 -0
92 lines not on this page · raw message
arch/arm/boot/dts/spear3xx.dtsi new file +143 -0
143 lines not on this page · raw message
arch/arm/mach-spear3xx/Kconfig +10 -30
@@ -2,42 +2,22 @@ # SPEAr3XX Machine configuration file # -if ARCH_SPEAR3XX +if ARCH_SPEAR3XX_DT menu "SPEAr3xx Implementations" -config BOARD_SPEAR300_EVB - bool "SPEAr300 Evaluation Board" - select MACH_SPEAR300 +config MACH_SPEAR300_DT + bool "SPEAr300 Machine support with Device Tree" help - Supports ST SPEAr300 Evaluation Board + Supports ST SPEAr300 machine configured via the device-tree -config BOARD_SPEAR310_EVB - bool "SPEAr310 Evaluation Board" - select MACH_SPEAR310 +config MACH_SPEAR310_DT + bool "SPEAr310 Machine support with Device Tree" help - Supports ST SPEAr310 Evaluation Board + Supports ST SPEAr310 machine configured via the device-tree -config BOARD_SPEAR320_EVB - bool "SPEAr320 Evaluation Board" - select MACH_SPEAR320 +config MACH_SPEAR320_DT + bool "SPEAr320 Machine support with Device Tree" help - Supports ST SPEAr320 Evaluation Board - + Supports ST SPEAr320 machine configured via the device-tree endmenu - -config MACH_SPEAR300 - bool "SPEAr300" - help - Supports ST SPEAr300 Machine - -config MACH_SPEAR310 - bool "SPEAr310" - help - Supports ST SPEAr310 Machine - -config MACH_SPEAR320 - bool "SPEAr320" - help - Supports ST SPEAr320 Machine - endif #ARCH_SPEAR3XX
arch/arm/mach-spear3xx/Makefile +4 -15
@@ -3,24 +3,13 @@ # # common files -obj-y += spear3xx.o clock.o +obj-$(CONFIG_ARCH_SPEAR3XX_DT) += spear3xx.o clock.o # spear300 specific files -obj-$(CONFIG_MACH_SPEAR300) += spear300.o - -# spear300 boards files -obj-$(CONFIG_BOARD_SPEAR300_EVB) += spear300_evb.o - +obj-$(CONFIG_MACH_SPEAR300_DT) += spear300.o # spear310 specific files -obj-$(CONFIG_MACH_SPEAR310) += spear310.o - -# spear310 boards files -obj-$(CONFIG_BOARD_SPEAR310_EVB) += spear310_evb.o - +obj-$(CONFIG_MACH_SPEAR310_DT) += spear310.o # spear320 specific files -obj-$(CONFIG_MACH_SPEAR320) += spear320.o - -# spear320 boards files -obj-$(CONFIG_BOARD_SPEAR320_EVB) += spear320_evb.o +obj-$(CONFIG_MACH_SPEAR320_DT) += spear320.o
arch/arm/mach-spear3xx/Makefile.boot +4 -0
@@ -1,3 +1,7 @@ zreladdr-y += 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000 + +dtb-$(CONFIG_MACH_SPEAR300_DT) += spear300-evb.dtb +dtb-$(CONFIG_MACH_SPEAR310_DT) += spear310-evb.dtb +dtb-$(CONFIG_MACH_SPEAR320_DT) += spear320-evb.dtb
arch/arm/mach-spear3xx/clock.c +46 -45
195 lines not on this page · raw message
arch/arm/mach-spear3xx/include/mach/generic.h +20 -26
100 lines not on this page · raw message
arch/arm/mach-spear3xx/include/mach/irqs.h +3 -3
@@ -129,9 +129,9 @@* Use the lowest number for the GPIO virtual IRQs base on which subarchs * we have compiled in */ -#if defined(CONFIG_MACH_SPEAR310 ) +#if defined(CONFIG_MACH_SPEAR310_DT )#define SPEAR3XX_GPIO_INT_BASE (SPEAR3XX_VIRQ_START + 18) -#elif defined(CONFIG_MACH_SPEAR320 ) +#elif defined(CONFIG_MACH_SPEAR320_DT )#define SPEAR3XX_GPIO_INT_BASE (SPEAR3XX_VIRQ_START + 17)#else #define SPEAR3XX_GPIO_INT_BASE (SPEAR3XX_VIRQ_START + 9)
@@ -140,7 +140,7 @@#define SPEAR300_GPIO1_INT_BASE (SPEAR3XX_GPIO_INT_BASE + 8)#define SPEAR3XX_PLGPIO_COUNT 102 -#if defined(CONFIG_MACH_SPEAR310 ) || defined(CONFIG_MACH_SPEAR320 ) +#if defined(CONFIG_MACH_SPEAR310_DT ) || defined(CONFIG_MACH_SPEAR320_DT )#define SPEAR3XX_PLGPIO_INT_BASE (SPEAR3XX_GPIO_INT_BASE + 8)#define SPEAR3XX_GPIO_INT_END (SPEAR3XX_PLGPIO_INT_BASE + \ SPEAR3XX_PLGPIO_COUNT)
arch/arm/mach-spear3xx/include/mach/spear300.h +2 -2
@@ -11,7 +11,7 @@* warranty of any kind, whether express or implied. */ -#ifdef CONFIG_MACH_SPEAR300 +#ifdef CONFIG_MACH_SPEAR300_DT #ifndef __MACH_SPEAR300_H#define __MACH_SPEAR300_H
@@ -51,4 +51,4 @@#endif /* __MACH_SPEAR300_H */ -#endif /* CONFIG_MACH_SPEAR300 */ +#endif /* CONFIG_MACH_SPEAR300_DT */
arch/arm/mach-spear3xx/include/mach/spear310.h +2 -2
@@ -11,7 +11,7 @@* warranty of any kind, whether express or implied. */ -#ifdef CONFIG_MACH_SPEAR310 +#ifdef CONFIG_MACH_SPEAR310_DT #ifndef __MACH_SPEAR310_H#define __MACH_SPEAR310_H
@@ -55,4 +55,4 @@#endif /* __MACH_SPEAR310_H */ -#endif /* CONFIG_MACH_SPEAR310 */ +#endif /* CONFIG_MACH_SPEAR310_DT */
arch/arm/mach-spear3xx/include/mach/spear320.h +2 -2
@@ -11,7 +11,7 @@* warranty of any kind, whether express or implied. */ -#ifdef CONFIG_MACH_SPEAR320 +#ifdef CONFIG_MACH_SPEAR320_DT #ifndef __MACH_SPEAR320_H#define __MACH_SPEAR320_H
@@ -64,4 +64,4 @@#endif /* __MACH_SPEAR320_H */ -#endif /* CONFIG_MACH_SPEAR320 */ +#endif /* CONFIG_MACH_SPEAR300_DT */
arch/arm/mach-spear3xx/spear300.c +40 -15
92 lines not on this page · raw message
arch/arm/mach-spear3xx/spear300_evb.c deleted +0 -75
75 lines not on this page · raw message
arch/arm/mach-spear3xx/spear310.c +78 -12
122 lines not on this page · raw message
arch/arm/mach-spear3xx/spear310_evb.c deleted +0 -81
81 lines not on this page · raw message
arch/arm/mach-spear3xx/spear320.c +80 -12
124 lines not on this page · raw message
arch/arm/mach-spear3xx/spear320_evb.c deleted +0 -79
79 lines not on this page · raw message
arch/arm/mach-spear3xx/spear3xx.c +88 -20
151 lines not on this page · raw message
arch/arm/plat-spear/Kconfig +3 -2
@@ -8,10 +8,11 @@ choice prompt "ST SPEAr Family" default ARCH_SPEAR3XX -config ARCH_SPEAR3XX - bool "SPEAr3XX" +config ARCH_SPEAR3XX_DT + bool "ST SPEAr3xx with Device Tree" select ARM_VIC select CPU_ARM926T + select USE_OF help Supports for ARM's SPEAR3XX family
arch/arm/plat-spear/Makefile +1 -1
@@ -5,4 +5,4 @@ # Common support obj-y := clock.o restart.o time.o -obj-$(CONFIG_ARCH_SPEAR3XX) += shirq.o padmux.o +obj-$(CONFIG_ARCH_SPEAR3XX_DT) += shirq.o padmux.o
Signature · 1 line
1.7.10.rc2.10.gb47606
PATCH 4/5 SPEAr: Add PL080 DMA support for 3xx and 6xx
In reply to Viresh KumarBoth SPEAr3xx and SPEAr6xx families have one instance of ARM PL080 DMA controller. This patch adds in support for that.
--- arch/arm/boot/dts/spear300-evb.dts | 4 + arch/arm/boot/dts/spear310-evb.dts | 4 + arch/arm/boot/dts/spear320-evb.dts | 4 + arch/arm/boot/dts/spear3xx.dtsi | 8 + arch/arm/boot/dts/spear600-evb.dts | 4 + arch/arm/boot/dts/spear600.dtsi | 8 + arch/arm/mach-spear3xx/clock.c | 2 +- arch/arm/mach-spear3xx/include/mach/generic.h | 2 + arch/arm/mach-spear3xx/spear300.c | 190 +++++++++++++ arch/arm/mach-spear3xx/spear310.c | 190 +++++++++++++ arch/arm/mach-spear3xx/spear320.c | 190 +++++++++++++ arch/arm/mach-spear3xx/spear3xx.c | 21 ++ arch/arm/mach-spear6xx/clock.c | 2 +- arch/arm/mach-spear6xx/spear6xx.c | 372 ++++++++++++++++++++++++- arch/arm/plat-spear/Makefile | 2 +- arch/arm/plat-spear/include/plat/pl080.h | 21 ++ arch/arm/plat-spear/pl080.c | 79 ++++++ 17 files changed, 1099 insertions(+), 4 deletions(-) create mode 100644 arch/arm/plat-spear/include/plat/pl080.h create mode 100644 arch/arm/plat-spear/pl080.c
arch/arm/boot/dts/spear300-evb.dts +4 -0
@@ -29,6 +29,10 @@ status = "okay"; }; + dma at fc400000 { + status = "okay"; + }; + fsmc: flash at 94000000 { status = "okay"; };
arch/arm/boot/dts/spear310-evb.dts +4 -0
@@ -25,6 +25,10 @@ }; ahb { + dma at fc400000 { + status = "okay"; + }; + fsmc: flash at 44000000 { status = "okay"; };
arch/arm/boot/dts/spear320-evb.dts +4 -0
@@ -29,6 +29,10 @@ status = "okay"; }; + dma at fc400000 { + status = "okay"; + }; + fsmc: flash at 4c000000 { status = "okay"; };
arch/arm/boot/dts/spear3xx.dtsi +8 -0
@@ -38,6 +38,14 @@ #interrupt-cells = <1>; }; + dma at fc400000 { + compatible = "arm,pl080", "arm,primecell"; + reg = <0xfc400000 0x1000>; + interrupt-parent = <&vic>; + interrupts = <8>; + status = "disabled"; + }; + gmac: eth at e0800000 { compatible = "st,spear600-gmac"; reg = <0xe0800000 0x8000>;
arch/arm/boot/dts/spear600-evb.dts +4 -0
@@ -24,6 +24,10 @@ }; ahb { + dma at fc400000 { + status = "okay"; + }; + gmac: ethernet at e0800000 { phy-mode = "gmii"; status = "okay";
arch/arm/boot/dts/spear600.dtsi +8 -0
@@ -45,6 +45,14 @@ #interrupt-cells = <1>; }; + dma at fc400000 { + compatible = "arm,pl080", "arm,primecell"; + reg = <0xfc400000 0x1000>; + interrupt-parent = <&vic1>; + interrupts = <10>; + status = "disabled"; + }; + gmac: ethernet at e0800000 { compatible = "st,spear600-gmac"; reg = <0xe0800000 0x8000>;
arch/arm/mach-spear3xx/clock.c +1 -1
@@ -683,7 +683,7 @@ static struct clk_lookup spear_clk_lookups[] = {/* clock derived from ahb clk */ CLKDEV_INIT (NULL ,"apb_clk" , &apb_clk),CLKDEV_INIT ("d0180000.i2c" ,NULL , &i2c_clk), -CLKDEV_INIT ("dma" ,NULL , &dma_clk), +CLKDEV_INIT ("fc400000.dma" ,NULL , &dma_clk),CLKDEV_INIT ("jpeg" ,NULL , &jpeg_clk),CLKDEV_INIT ("e080000.eth" ,NULL , &gmac_clk), CLKDEV_INIT("fc000000.flash", NULL, &smi_clk),
arch/arm/mach-spear3xx/include/mach/generic.h +2 -0
@@ -14,6 +14,7 @@#ifndef __MACH_GENERIC_H#define __MACH_GENERIC_H +#include <linux/amba/pl08x.h> #include <linux/init.h> #include <linux/of_platform.h> #include <linux/platform_device.h>
@@ -33,6 +34,7 @@/* Add spear3xx family device structure declarations here */ extern struct sys_timer spear3xx_timer; +extern struct pl08x_platform_data pl080_plat_data;/* Add spear3xx family function declarations here */ void __init spear3xx_clk_init (void );
arch/arm/mach-spear3xx/spear300.c +190 -0
208 lines not on this page · raw message
arch/arm/mach-spear3xx/spear310.c +190 -0
208 lines not on this page · raw message
arch/arm/mach-spear3xx/spear320.c +190 -0
208 lines not on this page · raw message
arch/arm/mach-spear3xx/spear3xx.c +21 -0
@@ -15,6 +15,7 @@#include <linux/amba/pl022.h> #include <linux/amba/pl061.h> +#include <linux/amba/pl08x.h> #include <linux/of.h> #include <linux/of_address.h> #include <linux/of_irq.h>
@@ -22,9 +23,11 @@#include <linux/types.h> #include <linux/ptrace.h> #include <linux/io.h> +#include <asm/hardware/pl080.h> #include <asm/hardware/vic.h> #include <asm/irq.h> #include <asm/mach/arch.h> +#include <plat/pl080.h> #include <mach/generic.h> #include <mach/hardware.h>
@@ -53,6 +56,22 @@ static struct pl061_platform_data pl061_plat_data = { .irq_base = SPEAR3XX_GPIO_INT_BASE, }; +/* dmac device registration */ +struct pl08x_platform_data pl080_plat_data = { + .memcpy_channel = { + .bus_id ="memcpy" , + .cctl = (PL080_BSIZE_16 <<PL080_CONTROL_SB_SIZE_SHIFT | \ +PL080_BSIZE_16 <<PL080_CONTROL_DB_SIZE_SHIFT | \ +PL080_WIDTH_32BIT <<PL080_CONTROL_SWIDTH_SHIFT | \ +PL080_WIDTH_32BIT <<PL080_CONTROL_DWIDTH_SHIFT | \ +PL080_CONTROL_PROT_BUFF |PL080_CONTROL_PROT_CACHE | \ +PL080_CONTROL_PROT_SYS ), + }, + .lli_buses =PL08X_AHB1 , + .mem_buses =PL08X_AHB1 , + .get_signal = pl080_get_signal, + .put_signal = pl080_put_signal, +};/* Add auxdata to pass platform data */ struct of_dev_auxdata spear3xx_auxdata_lookup[]__initdata = {
@@ -60,6 +79,8 @@ struct of_dev_auxdata spear3xx_auxdata_lookup[] __initdata = { &pl022_plat_data),OF_DEV_AUXDATA ("arm,pl061" ,SPEAR3XX_ICM3_GPIO_BASE ,NULL , &pl061_plat_data), +OF_DEV_AUXDATA ("arm,pl080" ,SPEAR3XX_ICM3_DMA_BASE ,NULL , + &pl080_plat_data), {} };
arch/arm/mach-spear6xx/clock.c +1 -1
@@ -657,7 +657,7 @@ static struct clk_lookup spear_clk_lookups[] = {/* clock derived from ahb clk */ CLKDEV_INIT (NULL ,"apb_clk" , &apb_clk),CLKDEV_INIT ("d0200000.i2c" ,NULL , &i2c_clk), -CLKDEV_INIT ("dma" ,NULL , &dma_clk), +CLKDEV_INIT ("fc400000.dma" ,NULL , &dma_clk),CLKDEV_INIT ("jpeg" ,NULL , &jpeg_clk),CLKDEV_INIT ("gmac" ,NULL , &gmac_clk), CLKDEV_INIT("fc000000.flash", NULL, &smi_clk),
arch/arm/mach-spear6xx/spear6xx.c +371 -1
395 lines not on this page · raw message
arch/arm/plat-spear/Makefile +1 -1
@@ -3,6 +3,6 @@ # # Common support -obj-y := clock.o restart.o time.o +obj-y := clock.o restart.o time.o pl080.o obj-$(CONFIG_ARCH_SPEAR3XX_DT) += shirq.o padmux.o
arch/arm/plat-spear/include/plat/pl080.h new file +21 -0
@@ -0,0 +1,21 @@ +/* +* arch/arm/plat-spear/include/plat/pl080.h +* +* DMAC pl080 definitions for SPEAr platform +* +* 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 __PLAT_PL080_H +#define __PLAT_PL080_H + +struct pl08x_dma_chan ; +int pl080_get_signal (struct pl08x_dma_chan *ch); +void pl080_put_signal (struct pl08x_dma_chan *ch); + +#endif /* __PLAT_PL080_H */
arch/arm/plat-spear/pl080.c new file +79 -0
79 lines not on this page · raw message
Signature · 1 line
1.7.10.rc2.10.gb47606
PATCH 5/5 SPEAr: Update defconfigs
In reply to Viresh KumarRecently device tree support is added for SPEAr3xx & SPEAr6xx and we must upgrade defconfig for that to get compiled. This patches does it.
There are few more rearrangements done in defconfig automatically, when i run make savedefconfig.
--- arch/arm/configs/spear3xx_defconfig | 52 +++++++++++++++++++++++++++-------- arch/arm/configs/spear6xx_defconfig | 41 +++++++++++++++++++++------ 2 files changed, 74 insertions(+), 19 deletions(-)
arch/arm/configs/spear3xx_defconfig +41 -11
@@ -2,33 +2,67 @@ CONFIG_EXPERIMENTAL=y CONFIG_SYSVIPC=y CONFIG_BSD_PROCESS_ACCT=y CONFIG_BLK_DEV_INITRD=y -CONFIG_KALLSYMS_EXTRA_PASS=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODVERSIONS=y +CONFIG_PARTITION_ADVANCED=y CONFIG_PLAT_SPEAR=y -CONFIG_BOARD_SPEAR300_EVB=y -CONFIG_BOARD_SPEAR310_EVB=y -CONFIG_BOARD_SPEAR320_EVB=y +CONFIG_MACH_SPEAR300_DT=y +CONFIG_MACH_SPEAR310_DT=y +CONFIG_MACH_SPEAR320_DT=y CONFIG_BINFMT_MISC=y +CONFIG_NET=y CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_MTD=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_FSMC=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=16384 +CONFIG_NETDEVICES=y +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +CONFIG_STMMAC_ETH=y +# CONFIG_WLAN is not set CONFIG_INPUT_FF_MEMLESS=y # CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_SPEAR=y # CONFIG_INPUT_MOUSE is not set +# CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_AMBA_PL011=y CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -# CONFIG_LEGACY_PTYS is not set # CONFIG_HW_RANDOM is not set CONFIG_RAW_DRIVER=y CONFIG_MAX_RAW_DEVS=8192 +CONFIG_I2C=y +CONFIG_I2C_DESIGNWARE_PLATFORM=y +CONFIG_SPI=y +CONFIG_SPI_PL022=y CONFIG_GPIO_SYSFS=y CONFIG_GPIO_PL061=y # CONFIG_HWMON is not set +CONFIG_WATCHDOG=y +CONFIG_ARM_SP805_WATCHDOG=y +CONFIG_FB=y +CONFIG_FB_ARMCLCD=y # CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set +CONFIG_USB=y +# CONFIG_USB_DEVICE_CLASS is not set +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_OHCI_HCD=y +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_SPEAR=y +CONFIG_RTC_CLASS=y +CONFIG_DMADEVICES=y +CONFIG_AMBA_PL08X=y +CONFIG_DMATEST=m CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_SECURITY=y
@@ -39,8 +73,6 @@ CONFIG_MSDOS_FS=m CONFIG_VFAT_FS=m CONFIG_FAT_DEFAULT_IOCHARSET="ascii" CONFIG_TMPFS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS=y CONFIG_NLS_DEFAULT="utf8" CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ASCII=m
@@ -48,6 +80,4 @@ CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_FS=y CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y CONFIG_DEBUG_INFO=y -# CONFIG_CRC32 is not set
arch/arm/configs/spear6xx_defconfig +33 -8
76 lines not on this page · raw message
Signature · 1 line
1.7.10.rc2.10.gb47606