Skip to contentSkip to conversation

: U8500 Makefile.boot

PATCH New srinidhi kasagar 2 participants 5 messages Oct 11, 2009 – Oct 17, 2009

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v3 4/7 : U8500 Makefile.boot

From: srinidhi kasagar <[email protected]>

The Makefile.boot for the U8500 platform.

---
 .../{mach-footbridge => mach-ux500}/Makefile.boot  |    0
 1 files changed, 0 insertions(+), 0 deletions(-)
 copy arch/arm/{mach-footbridge => mach-ux500}/Makefile.boot (100%)
arch/arm/mach-ux500/Makefile.boot renamed from arch/arm/mach-footbridge/Makefile.boot +0 -0
similarity index 100%
copy from arch/arm/mach-footbridge/Makefile.boot
copy to arch/arm/mach-ux500/Makefile.boot
Signature · 1 line
1.6.3.GIT
#1 lore raw

PATCH v3 5/7 : U8500 integrate to ARM architecture

From: srinidhi kasagar <[email protected]>

This hooks the U8500 support into the ARM kbuild
system. This integration also enables SMP and its
helper funtions for u8500 platform

---
 arch/arm/Kconfig  |   19 +++++++++++++++----
 arch/arm/Makefile |    1 +
 2 files changed, 16 insertions(+), 4 deletions(-)
arch/arm/Kconfig +15 -4
index 1c4119c..459f1ce 100644
@@ -702,6 +702,15 @@ config ARCH_BCMRING
 	help
 	  Support for Broadcom's BCMRing platform.
 
+config ARCH_U8500
+	bool "ST-Ericsson U8500 Series"
+	select ARM_AMBA
+	select GENERIC_TIME
+	select GENERIC_CLOCKEVENTS
+	select COMMON_CLKDEV
+	help
+	  Include support for ST-Ericsson's Cortex-A9 Platform.
+
 endchoice
 
 source "arch/arm/mach-clps711x/Kconfig"
@@ -800,6 +809,8 @@ source "arch/arm/mach-msm/Kconfig"
 
 source "arch/arm/mach-u300/Kconfig"
 
+source "arch/arm/mach-ux500/Kconfig"
+
 source "arch/arm/mach-w90x900/Kconfig"
 
 source "arch/arm/mach-bcmring/Kconfig"
@@ -955,10 +966,10 @@ source "kernel/time/Kconfig"
 config SMP
 	bool "Symmetric Multi-Processing (EXPERIMENTAL)"
 	depends on EXPERIMENTAL && (REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP ||\
-		 MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4)
+		 MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || ARCH_U8500)
 	depends on GENERIC_CLOCKEVENTS
 	select USE_GENERIC_SMP_HELPERS
-	select HAVE_ARM_SCU if (ARCH_REALVIEW || ARCH_OMAP4)
+	select HAVE_ARM_SCU if (ARCH_REALVIEW || ARCH_OMAP4 || ARCH_U8500)
 	help
 	  This enables support for systems with more than one CPU. If you have
 	  a system with only one CPU, like most personal computers, say N. If
@@ -1027,9 +1038,9 @@ config HOTPLUG_CPU
 config LOCAL_TIMERS
 	bool "Use local timer interrupts"
 	depends on SMP && (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || \
-		REALVIEW_EB_A9MP || MACH_REALVIEW_PBX || ARCH_OMAP4)
+		REALVIEW_EB_A9MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || ARCH_U8500)
 	default y
-	select HAVE_ARM_TWD if (ARCH_REALVIEW || ARCH_OMAP4)
+	select HAVE_ARM_TWD if (ARCH_REALVIEW || ARCH_OMAP4 || ARCH_U8500)
 	help
 	  Enable support for local timers on SMP platforms, rather then the
 	  legacy IPI broadcast method.  Local timers allows the system
arch/arm/Makefile +1 -0
index a73caaf..aef2404 100644
@@ -166,6 +166,7 @@ machine-$(CONFIG_ARCH_SHARK)		:= shark
 machine-$(CONFIG_ARCH_STMP378X)		:= stmp378x
 machine-$(CONFIG_ARCH_STMP37XX)		:= stmp37xx
 machine-$(CONFIG_ARCH_U300)		:= u300
+machine-$(CONFIG_ARCH_U8500)		:= ux500
 machine-$(CONFIG_ARCH_VERSATILE)	:= versatile
 machine-$(CONFIG_ARCH_W90X900)		:= w90x900
 machine-$(CONFIG_FOOTBRIDGE)		:= footbridge
Signature · 1 line
1.6.3.GIT
#2 lore raw

PATCH v3 5/7 : U8500 integrate to ARM architecture

Quoted 43 lines · srinidhi kasagar

From: srinidhi kasagar <[email protected]>

This hooks the U8500 support into the ARM kbuild
system. This integration also enables SMP and its
helper funtions for u8500 platform

---
 arch/arm/Kconfig  |   19 +++++++++++++++----
 arch/arm/Makefile |    1 +
 2 files changed, 16 insertions(+), 4 deletions(-)
arch/arm/Kconfig +11 -0
index 1c4119c..459f1ce 100644
@@ -702,6 +702,15 @@ config ARCH_BCMRING
 	help
 	  Support for Broadcom's BCMRing platform.
 
+config ARCH_U8500
+	bool "ST-Ericsson U8500 Series"
+	select ARM_AMBA
+	select GENERIC_TIME
+	select GENERIC_CLOCKEVENTS
+	select COMMON_CLKDEV
+	help
+	  Include support for ST-Ericsson's Cortex-A9 Platform.
+
 endchoice
 
 source "arch/arm/mach-clps711x/Kconfig"
@@ -800,6 +809,8 @@ source "arch/arm/mach-msm/Kconfig"
 
 source "arch/arm/mach-u300/Kconfig"
 
+source "arch/arm/mach-ux500/Kconfig"
+
 source "arch/arm/mach-w90x900/Kconfig"
 
 source "arch/arm/mach-bcmring/Kconfig"

arch/arm/Kconfig source "kernel/time/Kconfig" · line 969

Quoted 5 lines
arch/arm/Kconfig +1 -1
@@ -955,10 +966,10 @@ source "kernel/time/Kconfig"
 config SMP
 	bool "Symmetric Multi-Processing (EXPERIMENTAL)"
 	depends on EXPERIMENTAL && (REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP ||\
-		 MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4)
+		 MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || ARCH_U8500)

I think it time to stop this and specify at arch or mach level the capability to use SMP with
config HAS_SMP
bool

arch/arm/Kconfig config HOTPLUG_CPU · line 1041

Quoted 5 lines
arch/arm/Kconfig +1 -1
 config LOCAL_TIMERS
 	bool "Use local timer interrupts"
 	depends on SMP && (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || \
-		REALVIEW_EB_A9MP || MACH_REALVIEW_PBX || ARCH_OMAP4)
+		REALVIEW_EB_A9MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || ARCH_U8500)

same idea here

Best Regards,
J.

#3 lore raw

PATCH v3 6/7 : adds AB4500 as pl022 device

From: srinidhi kasagar <[email protected]>

This adds AB4500 device support for the
mop500 board. AB4500 connects to U8500
on the SSP/SPI bus.

---
 arch/arm/mach-ux500/board-mop500.c |   67 ++++++++++++++++++++++++++++++++++++
 1 files changed, 67 insertions(+), 0 deletions(-)
arch/arm/mach-ux500/board-mop500.c +67 -0
index fc02e9a..db5aa9e 100644
@@ -14,6 +14,8 @@
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/amba/bus.h>
+#include <linux/amba/pl022.h>
+#include <linux/spi/spi.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -43,10 +45,72 @@ static struct amba_device uart2_device = {
 	.irq = {IRQ_UART2, NO_IRQ},
 };
 
+static void ab4500_spi_cs_control(u32 command)
+{
+	/* set the FRM signal, which is CS  - TODO */
+}
+
+struct pl022_config_chip ab4500_chip_info = {
+	.lbm = LOOPBACK_DISABLED,
+	.com_mode = INTERRUPT_TRANSFER,
+	.iface = SSP_INTERFACE_MOTOROLA_SPI,
+	/* we can act as master only */
+	.hierarchy = SSP_MASTER,
+	.slave_tx_disable = 0,
+	.endian_rx = SSP_RX_MSB,
+	.endian_tx = SSP_TX_MSB,
+	.data_size = SSP_DATA_BITS_24,
+	.rx_lev_trig = SSP_RX_1_OR_MORE_ELEM,
+	.tx_lev_trig = SSP_TX_1_OR_MORE_EMPTY_LOC,
+	.clk_phase = SSP_CLK_SECOND_EDGE,
+	.clk_pol = SSP_CLK_POL_IDLE_HIGH,
+	.cs_control = ab4500_spi_cs_control,
+};
+
+static struct spi_board_info u8500_spi_devices[] = {
+	{
+	.modalias = "ab4500",
+	.platform_data = NULL,
+	.controller_data = &ab4500_chip_info,
+	.max_speed_hz = 12000000,
+	.bus_num = 0,
+	.chip_select = 0,
+	.mode = SPI_MODE_0,
+	.irq = AB4500_IRQ,
+	},
+};
+
+static struct pl022_ssp_controller ssp0_platform_data = {
+	.bus_id = 0,
+	/* pl022 not yet supports dma */
+	.enable_dma = 0,
+	/* on this platform, gpio 31,142,144,214 &
+	 * 224 are connected as chip selects
+	 */
+	.num_chipselect = 5,
+};
+
+static struct amba_device pl022_device = {
+	.dev = {
+		.coherent_dma_mask = ~0,
+		.init_name = "pl022",
+		.platform_data = &ssp0_platform_data,
+	},
+	.res = {
+		.start = U8500_SSP0_BASE,
+		.end   = U8500_SSP0_BASE + SZ_4K - 1,
+		.flags = IORESOURCE_MEM,
+	},
+	.irq = {IRQ_SSP0, NO_IRQ },
+	/* ST-Ericsson modified id */
+	.periphid = 0x01080022,
+};
+
 static struct amba_device *amba_devs[] __initdata = {
 	&uart0_device,
 	&uart1_device,
 	&uart2_device,
+	&pl022_device,
 };
 
 /* add any platform devices here - TODO */
@@ -64,6 +128,9 @@ static void __init u8500_init_machine(void)
 	/* Register the platform devices */
 	platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));
 
+	spi_register_board_info(u8500_spi_devices,
+			ARRAY_SIZE(u8500_spi_devices));
+
 	u8500_init_devices();
 }
 
Signature · 1 line
1.6.3.GIT
#4 lore raw

PATCH v3 6/7 : adds AB4500 as pl022 device

Quoted 45 lines · srinidhi kasagar

From: srinidhi kasagar <[email protected]>

This adds AB4500 device support for the
mop500 board. AB4500 connects to U8500
on the SSP/SPI bus.

---
 arch/arm/mach-ux500/board-mop500.c |   67 ++++++++++++++++++++++++++++++++++++
 1 files changed, 67 insertions(+), 0 deletions(-)
arch/arm/mach-ux500/board-mop500.c +18 -0
index fc02e9a..db5aa9e 100644
@@ -14,6 +14,8 @@
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/amba/bus.h>
+#include <linux/amba/pl022.h>
+#include <linux/spi/spi.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -43,10 +45,72 @@ static struct amba_device uart2_device = {
 	.irq = {IRQ_UART2, NO_IRQ},
 };
 
+static void ab4500_spi_cs_control(u32 command)
+{
+	/* set the FRM signal, which is CS  - TODO */
+}
+
+struct pl022_config_chip ab4500_chip_info = {
+	.lbm = LOOPBACK_DISABLED,
+	.com_mode = INTERRUPT_TRANSFER,
+	.iface = SSP_INTERFACE_MOTOROLA_SPI,
+	/* we can act as master only */
+	.hierarchy = SSP_MASTER,
+	.slave_tx_disable = 0,
+	.endian_rx = SSP_RX_MSB,
+	.endian_tx = SSP_TX_MSB,
+	.data_size = SSP_DATA_BITS_24,
+	.rx_lev_trig = SSP_RX_1_OR_MORE_ELEM,

arch/arm/mach-ux500/board-mop500.c static struct amba_device uart2_device = { · line 73

Quoted 10 lines
arch/arm/mach-ux500/board-mop500.c +10 -0
+	.tx_lev_trig = SSP_TX_1_OR_MORE_EMPTY_LOC,
+	.clk_phase = SSP_CLK_SECOND_EDGE,
+	.clk_pol = SSP_CLK_POL_IDLE_HIGH,
+	.cs_control = ab4500_spi_cs_control,
+};
+
+static struct spi_board_info u8500_spi_devices[] = {
+	{
+	.modalias = "ab4500",
+	.platform_data = NULL,

no need

arch/arm/mach-ux500/board-mop500.c static struct amba_device uart2_device = { · line 79

Quoted 6 lines
arch/arm/mach-ux500/board-mop500.c +6 -0
+	.controller_data = &ab4500_chip_info,
+	.max_speed_hz = 12000000,
+	.bus_num = 0,
+	.chip_select = 0,
+	.mode = SPI_MODE_0,
+	.irq = AB4500_IRQ,

it will be nice to ident it with one \t more

Quoted 17 lines
arch/arm/mach-ux500/board-mop500.c +17 -0
+	},
+};
+
+static struct pl022_ssp_controller ssp0_platform_data = {
+	.bus_id = 0,
+	/* pl022 not yet supports dma */
+	.enable_dma = 0,
+	/* on this platform, gpio 31,142,144,214 &
+	 * 224 are connected as chip selects
+	 */
+	.num_chipselect = 5,
+};
+
+static struct amba_device pl022_device = {
+	.dev = {
+		.coherent_dma_mask = ~0,
+		.init_name = "pl022",

arch/arm/mach-ux500/board-mop500.c static struct amba_device uart2_device = { · line 106

Quoted 10 lines
arch/arm/mach-ux500/board-mop500.c +10 -0
+		.platform_data = &ssp0_platform_data,
+	},
+	.res = {
+		.start = U8500_SSP0_BASE,
+		.end   = U8500_SSP0_BASE + SZ_4K - 1,
+		.flags = IORESOURCE_MEM,
+	},
+	.irq = {IRQ_SSP0, NO_IRQ },
+	/* ST-Ericsson modified id */
+	.periphid = 0x01080022,

it will be better to have a define here

Best Regards,
J.