Skip to contentSkip to conversation

Updating SPEAr Support

PATCH Superseded Viresh Kumar 6 participants 102 messages Jan 20, 2011 – Mar 1, 2011 Page 2 of 2

Subsystems (4)

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#90 lore raw

PATCH v5 61/63 ST SPEAr: Adding devices & clocks

In reply to Viresh Kumar
---
 arch/arm/mach-spear13xx/clock.c                  |   39 ++++++++++
 arch/arm/mach-spear13xx/include/mach/generic.h   |    6 ++
 arch/arm/mach-spear13xx/include/mach/irqs.h      |   10 +-
 arch/arm/mach-spear13xx/include/mach/spear1310.h |   33 ++++++++
 arch/arm/mach-spear13xx/spear1310.c              |   87 ++++++++++++++++++++++
 arch/arm/mach-spear13xx/spear1310_evb.c          |    8 ++
 arch/arm/mach-spear3xx/spear310_evb.c            |    5 +
 arch/arm/mach-spear3xx/spear320_evb.c            |    6 ++
 8 files changed, 189 insertions(+), 5 deletions(-)
arch/arm/mach-spear13xx/clock.c +39 -0
index 766e766..8495e88 100644
@@ -1025,6 +1025,40 @@ static struct clk gmac_phy4_clk = {
 	.recalc = &follow_parent,
 };
 
+/* uart1 clock */
+static struct clk uart1_clk = {
+	.flags = ALWAYS_ENABLED,
+	.pclk = &ras_pclk_clk,
+	.recalc = &follow_parent,
+};
+
+/* uart2 clock */
+static struct clk uart2_clk = {
+	.flags = ALWAYS_ENABLED,
+	.pclk = &ras_pclk_clk,
+	.recalc = &follow_parent,
+};
+
+/* uart3 clock */
+static struct clk uart3_clk = {
+	.flags = ALWAYS_ENABLED,
+	.pclk = &ras_pclk_clk,
+	.recalc = &follow_parent,
+};
+
+/* uart4 clock */
+static struct clk uart4_clk = {
+	.flags = ALWAYS_ENABLED,
+	.pclk = &ras_pclk_clk,
+	.recalc = &follow_parent,
+};
+
+/* uart5 clock */
+static struct clk uart5_clk = {
+	.flags = ALWAYS_ENABLED,
+	.pclk = &ras_pclk_clk,
+	.recalc = &follow_parent,
+};
 #endif
 
 static struct clk dummy_apb_pclk;
@@ -1138,6 +1172,11 @@ static struct clk_lookup spear1310_clk_lookups[] = {
 	{.dev_id = "stmmacphy.2",	.clk = &gmac_phy2_clk},
 	{.dev_id = "stmmacphy.3",	.clk = &gmac_phy3_clk},
 	{.dev_id = "stmmacphy.4",	.clk = &gmac_phy4_clk},
+	{.dev_id = "uart1",		.clk = &uart1_clk},
+	{.dev_id = "uart2",		.clk = &uart2_clk},
+	{.dev_id = "uart3",		.clk = &uart3_clk},
+	{.dev_id = "uart4",		.clk = &uart4_clk},
+	{.dev_id = "uart5",		.clk = &uart5_clk},
 };
 #endif
 
arch/arm/mach-spear13xx/include/mach/generic.h +6 -0
index 768759a..70a4d64 100644
@@ -256,8 +256,14 @@ void __init spear1300_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs,
 /* spear1310 declarations */
 #ifdef CONFIG_MACH_SPEAR1310
 /* Add spear1310 machine device structure declarations here */
+extern struct amba_device spear1310_uart1_device;
+extern struct amba_device spear1310_uart2_device;
+extern struct amba_device spear1310_uart3_device;
+extern struct amba_device spear1310_uart4_device;
+extern struct amba_device spear1310_uart5_device;
 extern struct platform_device spear1310_can0_device;
 extern struct platform_device spear1310_can1_device;
+extern struct platform_device spear1310_i2c1_device;
 
 /* Add spear1310 machine function declarations here */
 void __init spear1310_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs,
arch/arm/mach-spear13xx/include/mach/irqs.h +5 -5
index 1ca70a6..59bf61a 100644
@@ -97,11 +97,11 @@
 #define IRQ_CCAN1		(IRQ_SHPI_START + 83)
 #define IRQ_TDM0		(IRQ_SHPI_START + 84)
 #define IRQ_TDM1		(IRQ_SHPI_START + 85)
-#define IRQ_UART0		(IRQ_SHPI_START + 86)
-#define IRQ_UART1		(IRQ_SHPI_START + 87)
-#define IRQ_UART2		(IRQ_SHPI_START + 88)
-#define IRQ_UART3		(IRQ_SHPI_START + 89)
-#define IRQ_UART4		(IRQ_SHPI_START + 90)
+#define IRQ_UART1		(IRQ_SHPI_START + 86)
+#define IRQ_UART2		(IRQ_SHPI_START + 87)
+#define IRQ_UART3		(IRQ_SHPI_START + 88)
+#define IRQ_UART4		(IRQ_SHPI_START + 89)
+#define IRQ_UART5		(IRQ_SHPI_START + 90)
 #define IRQ_I2C_CNTR		(IRQ_SHPI_START + 91)
 #define IRQ_GMAC0_SBD		(IRQ_SHPI_START + 92)
 #define IRQ_GMAC0_PMT		(IRQ_SHPI_START + 93)
arch/arm/mach-spear13xx/include/mach/spear1310.h +33 -0
index e57c99a..34f0a27 100644
@@ -16,9 +16,32 @@
 #ifndef __MACH_SPEAR1310_H
 #define __MACH_SPEAR1310_H
 
+#define SPEAR1310_TDM_E1_0_BASE		UL(0x6C200000)
+#define SPEAR1310_TDM_E1_1_BASE		UL(0x6C300000)
+#define SPEAR1310_RS485_0_BASE		UL(0x6C400000)
+#define SPEAR1310_RS485_1_BASE		UL(0x6C500000)
+#define SPEAR1310_GETH1_BASE		UL(0x6D000000)
+#define SPEAR1310_GETH2_BASE		UL(0x6D100000)
+#define SPEAR1310_GETH3_BASE		UL(0x6D200000)
+#define SPEAR1310_GETH4_BASE		UL(0x6D300000)
+#define SPEAR1310_UART1_BASE		UL(0x6D400000)
+#define SPEAR1310_UART2_BASE		UL(0x6D500000)
+#define SPEAR1310_UART3_BASE		UL(0x6D600000)
+#define SPEAR1310_UART4_BASE		UL(0x6D700000)
+#define SPEAR1310_UART5_BASE		UL(0x6D800000)
+#define SPEAR1310_I2C1_BASE		UL(0x6D900000)
 #define SPEAR1310_CAN0_BASE		UL(0x6DA00000)
 #define SPEAR1310_CAN1_BASE		UL(0x6DB00000)
 #define SPEAR1310_RAS_BASE		UL(0x6C800000)
+#define SPEAR1310_GETH1_BASE		UL(0x6D000000)
+#define SPEAR1310_GETH2_BASE		UL(0x6D100000)
+#define SPEAR1310_GETH3_BASE		UL(0x6D200000)
+#define SPEAR1310_GETH4_BASE		UL(0x6D300000)
+#define SPEAR1310_FSMC1_CS0_BASE	UL(0x70000000)
+#define SPEAR1310_FSMC1_CS1_BASE	UL(0x74000000)
+#define SPEAR1310_FSMC1_CS2_BASE	UL(0x78000000)
+#define SPEAR1310_FSMC1_CS3_BASE	UL(0x7C000000)
+#define SPEAR1310_FSMC1_BASE		UL(0x6FF00000)
 
 /* RAS Area Control Register */
 #define SPEAR1310_RAS_CTRL_REG0		(SPEAR1310_RAS_BASE + 0x0)
@@ -26,6 +49,16 @@
 #define SPEAR1310_PHY_CLK_MASK		0xF
 #define SPEAR1310_PHY_CLK_SHIFT		0
 
+#define RAS_FSMC_MODE_MASK		0x3
+#define RAS_FSMC_MODE_NOR		0
+#define RAS_FSMC_MODE_NAND		1
+#define RAS_FSMC_MODE_SRAM		2
+#define RAS_FSMC_WIDTH_MASK		0x30
+#define RAS_FSMC_WIDTH_8		0x00
+#define RAS_FSMC_WIDTH_16		0x10
+#define RAS_FSMC_WIDTH_32		0x20
+#define RAS_FSMC_CS_SPLIT		0x40
+
 #endif /* __MACH_SPEAR1310_H */
 
 #endif /* CONFIG_MACH_SPEAR1310 */
arch/arm/mach-spear13xx/spear1310.c +87 -0

105 lines not on this page · raw message

arch/arm/mach-spear13xx/spear1310_evb.c +8 -0
index ca200dd..08289fa 100644
@@ -57,6 +57,13 @@ static struct amba_device *amba_devs[] __initdata = {
 	&spear13xx_gpio_device[1],
 	&spear13xx_ssp_device,
 	&spear13xx_uart_device,
+
+	/* spear1310 specific devices */
+	&spear1310_uart1_device,
+	&spear1310_uart2_device,
+	&spear1310_uart3_device,
+	&spear1310_uart4_device,
+	&spear1310_uart5_device,
 };
 
 static struct platform_device *plat_devs[] __initdata = {
@@ -74,6 +81,7 @@ static struct platform_device *plat_devs[] __initdata = {
 	/* spear1310 specific devices */
 	&spear1310_can0_device,
 	&spear1310_can1_device,
+	&spear1310_i2c1_device,
 };
 
 /* keyboard specific platform data */
arch/arm/mach-spear3xx/spear310_evb.c +5 -0
index 180d50a..7ee6ede 100644
@@ -74,6 +74,11 @@ static struct amba_device *amba_devs[] __initdata = {
 	&spear3xx_wdt_device,
 
 	/* spear310 specific devices */
+	&spear310_uart1_device,
+	&spear310_uart2_device,
+	&spear310_uart3_device,
+	&spear310_uart4_device,
+	&spear310_uart5_device,
 };
 
 static struct platform_device *plat_devs[] __initdata = {
arch/arm/mach-spear3xx/spear320_evb.c +6 -0
index ce53778..a22d6ca 100644
@@ -67,11 +67,16 @@ static struct pmx_dev *pmx_devs[] = {
 static struct amba_device *amba_devs[] __initdata = {
 	/* spear3xx specific devices */
 	&spear3xx_gpio_device,
+	&spear3xx_ssp0_device,
 	&spear3xx_uart_device,
 	&spear3xx_wdt_device,
 
 	/* spear320 specific devices */
 	&spear320_clcd_device,
+	&spear320_ssp_device[0],
+	&spear320_ssp_device[1],
+	&spear320_uart1_device,
+	&spear320_uart2_device,
 };
 
 static struct platform_device *plat_devs[] __initdata = {
@@ -85,6 +90,7 @@ static struct platform_device *plat_devs[] __initdata = {
 	/* spear320 specific devices */
 	&spear320_can0_device,
 	&spear320_can1_device,
+	&spear320_emi_nor_device,
 	&spear320_i2c1_device,
 	&spear320_nand_device,
 	&spear320_plgpio_device,
Signature · 1 line
1.7.3.4
#91 lore raw

PATCH v5 62/63 ST SPEAr: Adding information in Documentation/ and MAINTAINERS

In reply to Viresh Kumar

From: Shiraz Hashim <[email protected]>

---
 Documentation/arm/SPEAr/overview.txt |   34 +++++++++++++++++++++++-----------
 MAINTAINERS                          |    6 ++++++
 2 files changed, 29 insertions(+), 11 deletions(-)
Documentation/arm/SPEAr/overview.txt +23 -11
index 253a35c..4e510061 100644
@@ -9,8 +9,9 @@ Introduction
 
   The ST Microelectronics SPEAr range of ARM9/CortexA9 System-on-Chip CPUs are
   supported by the 'spear' platform of ARM Linux. Currently SPEAr300,
-  SPEAr310, SPEAr320 and SPEAr600 SOCs are supported. Support for the SPEAr13XX
-  series is in progress.
+  SPEAr310, SPEAr320, SPEAr600, SPEAr1300 and SPEAr1310 SOCs are supported.
+  SPEAr3XX and SPEAr6XX are based on ARM9 whereas SPEAr13XX is based on latest
+  ARM Cortex A9 CPUs.
 
   Hierarchy in SPEAr is as follows:
 
@@ -27,16 +28,25 @@ Introduction
 			- SPEAr600_EVB (Evaluation Board)
 	- SPEAr13XX (13XX SOC series, based on ARM CORTEXA9)
 		- SPEAr1300 (SOC)
+			- SPEAr1300_EVB (Evaluation Board)
+		- SPEAr1310 (SOC)
+			- SPEAr1310_EVB (Evaluation Board)
 
   Configuration
   -------------
 
-  A generic configuration is provided for each machine, and can be used as the
+  A generic configuration is provided for each machine family, and can be used as the
   default by
-	make spear600_defconfig
-	make spear300_defconfig
-	make spear310_defconfig
-	make spear320_defconfig
+	#make ARCH=arm spear13xx_defconfig
+	#make ARCH=arm spear3xx_defconfig
+	#make ARCH=arm spear6xx_defconfig
+
+  Compilation
+  -----------
+
+  After applying default configuration, Linux kernel for SPEAr architecture
+  can be compiled as
+	#make ARCH=arm CROSS_COMPILE=arm-linux- uImage
 
   Layout
   ------
@@ -48,13 +58,15 @@ Introduction
   Each machine series have a directory with name arch/arm/mach-spear followed by
   series name. Like mach-spear3xx, mach-spear6xx and mach-spear13xx.
 
-  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
+  Common file for machines of spear3xx family is mach-spear3xx/spear3xx.c, for
+  spear6xx is mach-spear6xx/spear6xx.c and similarly for spear13xx is
+  mach-spear13xx/spear13xx.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.
+  Board specific files for each machine type is also contained in mach-spear*
+  folder.
 
 
   Document Author
   ---------------
 
-  Viresh Kumar, (c) 2010 ST Microelectronics
+  Viresh Kumar, Shiraz Hashim (c) 2010 ST Microelectronics
MAINTAINERS +6 -0
index 1af022e..a62e783 100644
@@ -5802,6 +5802,12 @@ W:	http://www.st.com/spear
 S:	Maintained
 F:	arch/arm/plat-spear/
 
+SPEAR13XX MACHINE SUPPORT
+M:	Shiraz Hashim <[email protected]>
+W:	http://www.st.com/spear
+S:	Maintained
+F:	arch/arm/mach-spear13xx/
+
 SPEAR3XX MACHINE SUPPORT
 M:	Viresh Kumar <[email protected]>
 W:	http://www.st.com/spear
Signature · 1 line
1.7.3.4
#92 lore raw

PATCH v5 63/63 ST SPEAr: Updating defconfigs

In reply to Viresh Kumar
---
 arch/arm/configs/spear13xx_defconfig |   78 ++++++++++++++++++++++++++++++---
 arch/arm/configs/spear3xx_defconfig  |   80 +++++++++++++++++++++++++++++++---
 arch/arm/configs/spear6xx_defconfig  |   72 ++++++++++++++++++++++++++++---
 3 files changed, 211 insertions(+), 19 deletions(-)
arch/arm/configs/spear13xx_defconfig +72 -6
index 9f3baf8..d764fee 100644
@@ -10,31 +10,94 @@ CONFIG_PLAT_SPEAR=y
 CONFIG_ARCH_SPEAR13XX=y
 CONFIG_BOARD_SPEAR1300_EVB=y
 CONFIG_BOARD_SPEAR1310_EVB=y
+CONFIG_PCI=y
+CONFIG_PCI_MSI=y
+CONFIG_PCIEPORTBUS=y
+# CONFIG_PCIEAER is not set
 CONFIG_SMP=y
 CONFIG_NR_CPUS=2
 CONFIG_AEABI=y
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+CONFIG_VFP=y
 CONFIG_BINFMT_MISC=y
+CONFIG_PM=y
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_NET_IPIP=y
+CONFIG_ARPD=y
+# CONFIG_IPV6 is not set
+# CONFIG_WIRELESS is not set
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_MTD=y
 CONFIG_MTD_CONCAT=y
 CONFIG_MTD_PARTITIONS=y
 CONFIG_MTD_CMDLINE_PARTS=y
 CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
+CONFIG_MTD_CFI=y
+CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_CFI_STAA=y
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_M25P80=y
+# CONFIG_M25PXX_USE_FAST_READ is not set
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_FSMC=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=16384
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_CHR_DEV_ST=y
+CONFIG_CHR_DEV_OSST=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_CHR_DEV_SG=y
+CONFIG_CHR_DEV_SCH=y
+CONFIG_NETDEVICES=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_INPUT_EVDEV=y
+CONFIG_INPUT_EVBUG=y
+# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_SPEAR=y
 # CONFIG_INPUT_MOUSE is not set
 CONFIG_SERIAL_AMBA_PL011=y
 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
 # CONFIG_LEGACY_PTYS is not set
 CONFIG_RAW_DRIVER=y
 CONFIG_MAX_RAW_DEVS=8192
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_DESIGNWARE=y
+CONFIG_SPI=y
+CONFIG_SPI_PL022=y
+CONFIG_SPI_SPIDEV=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_PL061=y
 # CONFIG_HWMON is not set
 # CONFIG_HID_SUPPORT is not set
-# CONFIG_USB_SUPPORT is not set
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_TEST=y
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_SPEAR=y
+CONFIG_RTC_CLASS=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT2_FS_XATTR=y
 CONFIG_EXT2_FS_SECURITY=y
@@ -42,16 +105,18 @@ CONFIG_EXT3_FS=y
 # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
 CONFIG_EXT3_FS_SECURITY=y
 CONFIG_AUTOFS4_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
 CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
 CONFIG_TMPFS=y
 CONFIG_JFFS2_FS=y
+CONFIG_NFS_FS=y
+CONFIG_ROOT_NFS=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
 CONFIG_PARTITION_ADVANCED=y
-CONFIG_NLS=y
 CONFIG_NLS_DEFAULT="utf8"
 CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_ASCII=m
+CONFIG_NLS_ASCII=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_FS=y
 CONFIG_DEBUG_KERNEL=y
@@ -59,3 +124,4 @@ CONFIG_DETECT_HUNG_TASK=y
 CONFIG_DEBUG_SPINLOCK=y
 CONFIG_DEBUG_SPINLOCK_SLEEP=y
 CONFIG_DEBUG_INFO=y
+# CONFIG_ARM_UNWIND is not set
arch/arm/configs/spear3xx_defconfig +73 -7

116 lines not on this page · raw message

arch/arm/configs/spear6xx_defconfig +66 -6

106 lines not on this page · raw message

Signature · 1 line
1.7.3.4
#63 lore raw

PATCH v5 39/63 SPEAr CPU freq: Adding support for CPU Freq framework

In reply to Viresh Kumar

Hi Viresh, Deepak,

Two minor nitpicks below but otherwise it looks nice to me!

Quoted 86 lines · Viresh Kumar
arch/arm/plat-spear/cpufreq.c new file +79 -0
new file mode 100644
index 0000000..c9c5dce
@@ -0,0 +1,166 @@
+/*
+ * arch/arm/plat-spear/cpufreq.c
+ *
+ * CPU Frequency Scaling for SPEAr platform
+ *
+ * Copyright (C) 2010 ST Microelectronics
+ * Deepak Sikri<[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 <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/cpufreq.h>
+#include <linux/delay.h>
+#include <linux/init.h>
+#include <linux/err.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <asm/system.h>
+#include <mach/hardware.h>
+
+#define CPU_CLK		"cpu_clk"
+
+#ifdef CONFIG_ARCH_SPEAR13XX
+#define MIN_CPU_FREQ	200000
+#define MAX_CPU_FREQ	500000
+
+static u32 spear_cpu_freq[] = {
+	200000, /* 200 MHZ */
+	250000, /* 250 MHZ */
+	332000, /* 332 MHZ */
+	400000, /* 400 MHZ */
+	500000, /* 500 MHZ */
+};
+#elif defined(CONFIG_ARCH_SPEAR6XX) || defined(CONFIG_ARCH_SPEAR3XX)
+#define MIN_CPU_FREQ	166000
+#define MAX_CPU_FREQ	332000
+
+static u32 spear_cpu_freq[] = {
+	166000, /* 166 MHZ */
+	266000, /* 266 MHZ */
+	332000, /* 333 MHZ */
+};
+#endif
+
+static struct
+	cpufreq_frequency_table spear_freq_tbl[ARRAY_SIZE(spear_cpu_freq) + 1];
+static struct clk *cpu_clk;
+
+int spear_cpufreq_verify(struct cpufreq_policy *policy)
+{
+	return cpufreq_frequency_table_verify(policy, spear_freq_tbl);
+}
+
+static unsigned int spear_cpufreq_get(unsigned int cpu)
+{
+	return cpu ? 0 : clk_get_rate(cpu_clk) / 1000;
+}
+
+static int spear_cpufreq_target(struct cpufreq_policy *policy,
+		unsigned int target_freq, unsigned int relation)
+{
+	struct cpufreq_freqs freqs;
+	int index, ret;
+	long newfreq;
+
+	if (policy->cpu != 0)
+		return -EINVAL;
+
+	if (cpufreq_frequency_table_target(policy, spear_freq_tbl,
+				target_freq, relation, &index))
+		return -EINVAL;
+
+	freqs.old = spear_cpufreq_get(0);

arch/arm/plat-spear/cpufreq.c line 89

Quoted 10 lines
arch/arm/plat-spear/cpufreq.c new file +10 -0
+	freqs.new = spear_cpu_freq[index];
+	freqs.cpu = policy->cpu;
+
+	if (freqs.old == target_freq)
+		return 0;
+
+	newfreq = clk_round_rate(cpu_clk, freqs.new * 1000);
+	if (newfreq < 0) {
+		pr_err("CPU Freq: clk_round_rate failed: %ld\n", newfreq);
+		freqs.new = freqs.old;

Nitpick, you don't need to assign freqs.new here as you return immediately after.

Quoted 6 lines
arch/arm/plat-spear/cpufreq.c new file +6 -0
+		return newfreq;
+	}
+
+	freqs.new = newfreq / 1000;
+
+	cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);

arch/arm/plat-spear/cpufreq.c line 105

Quoted 10 lines
arch/arm/plat-spear/cpufreq.c new file +10 -0
+
+	/* Get current rate after clk_set_rate, for both success and failure */
+	ret = clk_set_rate(cpu_clk, freqs.new * 1000);
+	if (ret) {
+		pr_err("CPU Freq: cpu clk_set_rate failed: %d\n", ret);
+		freqs.new = clk_get_rate(cpu_clk) / 1000;
+	}
+
+	cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
+	return 0;

Shouldn't this return 'ret' here in case clk_set_rate() failed?

Jamie

#64 lore raw

PATCH v5 39/63 SPEAr CPU freq: Adding support for CPU Freq framework

Quoted 16 lines · Jamie Iles
Quoted 4 lines

arch/arm/plat-spear/cpufreq.c line 89

Quoted 4 lines
arch/arm/plat-spear/cpufreq.c new file +4 -0
+	newfreq = clk_round_rate(cpu_clk, freqs.new * 1000);
+	if (newfreq < 0) {
+		pr_err("CPU Freq: clk_round_rate failed: %ld\n", newfreq);
+		freqs.new = freqs.old;

Nitpick, you don't need to assign freqs.new here as you return immediately after.

Quoted 9 lines
Quoted 9 lines
arch/arm/plat-spear/cpufreq.c new file +9 -0
+		return newfreq;
+	}
+
+	freqs.new = newfreq / 1000;
+
+	cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
+
+	/* Get current rate after clk_set_rate, for both success and failure */
+	ret = clk_set_rate(cpu_clk, freqs.new * 1000);
Quoted 8 lines
Quoted 7 lines

arch/arm/plat-spear/cpufreq.c line 105

Quoted 7 lines
arch/arm/plat-spear/cpufreq.c new file +7 -0
+	if (ret) {
+		pr_err("CPU Freq: cpu clk_set_rate failed: %d\n", ret);
+		freqs.new = clk_get_rate(cpu_clk) / 1000;
+	}
+
+	cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
+	return 0;

Shouldn't this return 'ret' here in case clk_set_rate() failed?

Will correct both of them.
I will resend this patch alone, instead of sending everything again.

Signature · 1 line
viresh
#93 lore raw

v5 cover Updating SPEAr Support

In reply to Viresh Kumar
Quoted 4 lines · Viresh Kumar

Following set of patches:
- updates SPEAr3xx, 6xx support
- Adds support for SPEAr13xx
- Removes Multiple defconfigs per machine family

Hi Viresh,

I haven't been through the full series, just the ones I feel I can sensibly review, but feel free to add a

to the patches I've commented on if it helps.

Jamie

#33 lore raw

PATCH v5 25/63 ST SPEAr: Adding machine support for nand

In reply to Viresh Kumar
Quoted 14 lines · Viresh Kumar

From: Vipin Kumar <[email protected]>

<snip>

arch/arm/mach-spear6xx/spear6xx.c +9 -0
+/* nand device registeration */
+static struct fsmc_nand_platform_data nand_platform_data;
+
+static struct resource nand_resources[] = {
+	{
+		.name = "nand_data",
+		.start = SPEAR6XX_ICM1_NAND_BASE,
+		.end = SPEAR6XX_ICM1_NAND_BASE + SZ_16 - 1,
+		.flags = IORESOURCE_MEM,

arch/arm/mach-spear6xx/spear6xx.c struct platform_device i2c_device = { · line 174

Quoted 10 lines
arch/arm/mach-spear6xx/spear6xx.c +10 -0
+	}, {
+		.name = "fsmc_regs",
+		.start = SPEAR6XX_ICM1_FSMC_BASE,
+		.end = SPEAR6XX_ICM1_FSMC_BASE + SZ_4K - 1,
+		.flags = IORESOURCE_MEM,
+	},
+};
+
+struct platform_device nand_device = {
+	.name = "nand",

fsmc-nand ?

Stanley.

Quoted 10 lines
arch/arm/mach-spear13xx/spear13xx.c +6 -0
+	.id = -1,
+	.resource = nand_resources,
+	.num_resources = ARRAY_SIZE(nand_resources),
+	.dev.platform_data = &nand_platform_data,
+};
+
 /* usb host device registeration */
 static struct resource ehci0_resources[] = {
 	[0] = {
#34 lore raw

PATCH v5 25/63 ST SPEAr: Adding machine support for nand

Quoted 5 lines · stanley.miao
Quoted 3 lines

Review

Quoted 3 lines
(quoted diff) +2 -0
+struct platform_device nand_device = {
+	.name = "nand",

fsmc-nand ?

Will correct this and resend.

thanks.
viresh

#94 lore raw

v5 cover Updating SPEAr Support

In reply to Viresh Kumar
Quoted 5 lines · Viresh KUMAR

Following set of patches:
- updates SPEAr3xx, 6xx support
- Adds support for SPEAr13xx
- Removes Multiple defconfigs per machine family

Quoted 14 lines

Changes since V4:
- Following patch is added
SPEAr: Defining IOMEM(x) and updating declaration of MISC_BASE
- variables referring to register now have type void __iomem *, instead of u32 *
- using linux/gpio.h instead of mach/gpio.h in *evb files.
- return value of clk_get(), and clk_get_sys are checked using IS_ERR().
- unused routines removed from headsmp.S
- spear13*_pcie_port_is_host routines are declared static
- platsmp.c updated according to review comments.
- Added clk_round_rate routine() and used it to check possible rate before calling cpufreq_notify_transition in cpufreq.c
- & removed before function names, while passing function pointer to other routines.

Russell,

Should I push these patches to tracker now ?

--
Viresh

#95 lore raw

v5 cover Updating SPEAr Support

Quoted 21 lines · viresh kumar
Quoted 5 lines · Viresh KUMAR

Following set of patches:
- updates SPEAr3xx, 6xx support
- Adds support for SPEAr13xx
- Removes Multiple defconfigs per machine family

Quoted 14 lines

Changes since V4:
- Following patch is added
SPEAr: Defining IOMEM(x) and updating declaration of MISC_BASE
- variables referring to register now have type void __iomem *, instead of u32 *
- using linux/gpio.h instead of mach/gpio.h in *evb files.
- return value of clk_get(), and clk_get_sys are checked using IS_ERR().
- unused routines removed from headsmp.S
- spear13*_pcie_port_is_host routines are declared static
- platsmp.c updated according to review comments.
- Added clk_round_rate routine() and used it to check possible rate before calling cpufreq_notify_transition in cpufreq.c
- & removed before function names, while passing function pointer to other routines.

Quoted 3 lines

Russell,

Should I push these patches to tracker now ?

I've not yet been through them. I only got part way through v4 before you posted v5.

#96 lore raw

v5 cover Updating SPEAr Support

Quoted 3 lines · Russell King - ARM Linux
Quoted 1 line
Quoted 1 line

Should I push these patches to tracker now ?

I've not yet been through them. I only got part way through v4 before you posted v5.

Russell,

Is there any further feedback on this patchset?

Signature · 1 line
viresh
#15 lore raw

PATCH v5 12/63 ST SPEAr: Adding support for CLCD on SPEAr3xx/6xx

In reply to Viresh Kumar
Quoted 18 lines · Viresh Kumar
drivers/video/Kconfig +6 -1
index d916ac0..bf6632d 100644
@@ -324,10 +324,22 @@ config FB_ARMCLCD
 
 choice
 
-	depends on FB_ARMCLCD && (ARCH_LH7A40X || ARCH_LH7952X)
+	depends on FB_ARMCLCD && (ARCH_LH7A40X || ARCH_LH7952X || ARCH_SPEAR6XX || MACH_SPEAR300 || MACH_SPEAR320)
 	prompt "LCD Panel"
 	default FB_ARMCLCD_SHARP_LQ035Q7DB02
 
+config FB_ARMCLCD_SHARP_LQ043T1DG01
+	bool "SHARP LQ043T1DG01 CLCD 4.2\" TFT(480x272)"
+	help
+	  This is an implementation of the Sharp LQ043T1DG01, a 4.2"
+	  color TFT panel. The native resolution is 480x272.

drivers/video/Kconfig config FB_ARMCLCD · line 345

Quoted 10 lines
drivers/video/Kconfig +7 -0
+
+config FB_ARMCLCD_SAMSUNG_LMS700
+	bool "SAMSUNG CLCD 7\" TFT(800x480)"
+	help
+	  This is an implementation of the Samsung LMS700, a 7"
+	  color TFT panel. The native resolution is 800x480.
+
 config FB_ARMCLCD_SHARP_LQ035Q7DB02_HRTFT
 	bool "LogicPD LCD 3.5\" QVGA w/HRTFT IC"
 	help

This choice stuff has gone with the removal of the lpd code from the kernel, and thus is unmergable. This kind of platform specific configuration has no business being in this file anyway.

#97 lore raw

v5 cover Updating SPEAr Support

In reply to viresh kumar
Quoted 8 lines · viresh kumar
Quoted 3 lines · Russell King - ARM Linux
Quoted 1 line
Quoted 1 line

Should I push these patches to tracker now ?

I've not yet been through them. I only got part way through v4 before you posted v5.

Russell,

Is there any further feedback on this patchset?

No idea, I've still not looked at them. I don't know when I'll be able to look at them.

#16 lore raw

PATCH v5 12/63 ST SPEAr: Adding support for CLCD on SPEAr3xx/6xx

In reply to Russell King - ARM Linux
Quoted 25 lines · Russell King - ARM Linux
Quoted 24 lines · Viresh Kumar
drivers/video/Kconfig +12 -1
index d916ac0..bf6632d 100644
@@ -324,10 +324,22 @@ config FB_ARMCLCD
 
 choice
 
-	depends on FB_ARMCLCD && (ARCH_LH7A40X || ARCH_LH7952X)
+	depends on FB_ARMCLCD && (ARCH_LH7A40X || ARCH_LH7952X || ARCH_SPEAR6XX || MACH_SPEAR300 || MACH_SPEAR320)
 	prompt "LCD Panel"
 	default FB_ARMCLCD_SHARP_LQ035Q7DB02
 
+config FB_ARMCLCD_SHARP_LQ043T1DG01
+	bool "SHARP LQ043T1DG01 CLCD 4.2\" TFT(480x272)"
+	help
+	  This is an implementation of the Sharp LQ043T1DG01, a 4.2"
+	  color TFT panel. The native resolution is 480x272.
+
+config FB_ARMCLCD_SAMSUNG_LMS700
+	bool "SAMSUNG CLCD 7\" TFT(800x480)"
+	help
+	  This is an implementation of the Samsung LMS700, a 7"
+	  color TFT panel. The native resolution is 800x480.
Quoted 8 lines

drivers/video/Kconfig config FB_ARMCLCD · line 345

Quoted 4 lines
drivers/video/Kconfig +1 -0
+
 config FB_ARMCLCD_SHARP_LQ035Q7DB02_HRTFT
 	bool "LogicPD LCD 3.5\" QVGA w/HRTFT IC"
 	help

This choice stuff has gone with the removal of the lpd code from the kernel, and thus is unmergable. This kind of platform specific configuration has no business being in this file anyway.

The other thing is that the handling of BGR/RGB has changed in the 'versatile' branch too, so you may want to delay this patch until later.

#17 lore raw

PATCH v5 12/63 ST SPEAr: Adding support for CLCD on SPEAr3xx/6xx

Quoted 6 lines · Russell King - ARM Linux
Quoted 3 lines
Quoted 3 lines

This choice stuff has gone with the removal of the lpd code from the kernel, and thus is unmergable. This kind of platform specific configuration has no business being in this file anyway.

The other thing is that the handling of BGR/RGB has changed in the 'versatile' branch too, so you may want to delay this patch until later.

Ok.

--
viresh

#99 lore raw

v5 cover Updating SPEAr Support

In reply to Viresh Kumar

I don't understand why people think that it's a good idea to post a patch series which adds new support and then has a whole series of patches which modify then modifies both new and old stuff.

It makes it a lot harder to apply, a lot harder to review, and all round is a bad idea.

The problem is that mixing it up in the way you've done means that it's impossible to apply the cleanup patches before the new support.

Another issue worth pointing out is that submission of patch series by email has to be done _carefully_ - which basically means slowly. The email system on this planet will randomly re-order messages - there is no guarantee that the order in which you send them is the order in which they're received at the remote end. If you want them to arrive in a certain order, you're out of luck.

You can help by not dumping 63 patches into the mail system within a few seconds or so, but leaving a greater period of time between each. The longer that period, the more likely they are to arrive in order - but it's something that will never be guaranteed.

As it is, I'm going to have to spend something like a few _hours_ over sorting out how to merge these Spear patches because they're all out of order and they're all interdependent.

That's another argument for not waiting until you have a huge patch set before sending stuff out - keep patch sets small and targetted to specific areas. For instance, with the Versatile updates which form a total of 21 individual patches, I split them up into one set of 10 patches which changed the way CLCD stuff was handled, and another separate set of 11 patches of platform specific stuff.

So, why aren't all the padmux changes together? Why aren't the clk API patches together?

And another thing: separate out the 'fixes' from the new developments. Things like the addition of UL to VMALLOC_END counts as a warning fix. Using readl_relaxed/writel_relaxed also counts as a fix as things in the decompressor break. As these are technically bug fixes, they go upstream faster than new work.

Bug fixes should _always_ be at the very start of any patch series, then cleanups, then new stuff.

In summary, I hate large patch sets. I tend to ignore large patch sets. I have very little motivation to review large patch sets. I have very little motivation to apply large patch sets. Don't create them in the first place. Spend time sorting the patches into smaller sets and things all round go much easier.

I'll work through what you've already submitted, but it will be a slow and erratic job.

#4 lore raw

PATCH v5 3/63 sp810 Fix: Switch to slow mode before sysctl_soft_reset

In reply to Viresh Kumar
Quoted 4 lines · Viresh Kumar

From: Shiraz Hashim <[email protected]>

Before resetting system from system controller, switching to slow mode is required.

This comment could do with some expansion about why it is required. Eg, this comment could become:

"sp810: switch to slow mode before reset

In sysctl_soft_reset(), switch to slow mode before resetting the system via the system controller. This is required by the SPEAr reference manual."

#67 lore raw

PATCH v5 41/63 ST SPEAr: replace readl, writel with readl_relaxed, writel_relaxed in uncompress.h

In reply to Viresh Kumar
Quoted 3 lines · Viresh Kumar

readl also calls outer cache maintainance operations which are not available during Linux uncompression. This patch replaces readl, writel with readl_relaxed and writel_relaxed.

Shouldn't this be near the start of the series?

Also, would:

"SPEAr: replace readl, writel with relaxed versions in uncompress.h

readl() and writel() calls the outer cache maintainance operations which are not available during Linux uncompression. This patch replaces readl() and writel() with readl_relaxed() and writel_relaxed() to avoid the link time errors."

be a better patch description?

#22 lore raw

PATCH v5 15/63 ST SPEAr: Correcting SOC Config base address for spear320

In reply to Viresh Kumar
Quoted 1 line · Viresh Kumar

This looks to me like another bug fix, and I'm treating it as such. It should be submitted separately from this patch set along with other bug fixes, and clearly labelled as such.

I've also changed the comments on this patch to:

"SPEAr: Correct SOC config base address for spear320

SPEAR320_SOC_CONFIG_BASE was wrong, causing the wrong registers to be accessed."

#85 lore raw

PATCH v5 57/63 ST SPEAr3xx: Updating plgpio and emi source to make it compliant with single image strategy

In reply to Viresh Kumar
Quoted 1 line · Viresh Kumar

Why aren't the plgpio bits of this in patch 16?

arch/arm/plat-spear/plgpio.c line 33

Quoted 2 lines
arch/arm/plat-spear/plgpio.c +2 -0
+static u32 plgpio_enb, plgpio_wdata, plgpio_dir, plgpio_rdata, plgpio_ie,
+	   plgpio_mis;

'int' or 'unsigned int' will do for these. There's no pressing need for these to be exactly 32-bit quantities.

Quoted 8 lines

static int __init plgpio_init(void)
{

arch/arm/plat-spear/plgpio.c +6 -0
+	if (machine_is_spear310()) {
+		plgpio_enb = SPEAR310_PLGPIO_ENB;
+		plgpio_wdata = SPEAR310_PLGPIO_WDATA;
+		plgpio_dir = SPEAR310_PLGPIO_DIR;
+		plgpio_rdata = SPEAR310_PLGPIO_IE;
+		plgpio_ie = SPEAR310_PLGPIO_RDATA;

arch/arm/plat-spear/plgpio.c static struct platform_driver plgpio_driver = { · line 465

Quoted 10 lines
arch/arm/plat-spear/plgpio.c +10 -0
+		plgpio_mis = SPEAR310_PLGPIO_MIS;
+	} else if (machine_is_spear320()) {
+		plgpio_enb = SPEAR320_PLGPIO_ENB;
+		plgpio_wdata = SPEAR320_PLGPIO_WDATA;
+		plgpio_dir = SPEAR320_PLGPIO_DIR;
+		plgpio_rdata = SPEAR320_PLGPIO_IE;
+		plgpio_ie = SPEAR320_PLGPIO_RDATA;
+		plgpio_mis = SPEAR320_PLGPIO_MIS;
+	} else {
+		return 0;

If it's not supported, then what about returning an error instead of zero?

Can you supersede this patch and patch 16 in the patch system with a single patch which adds PLGPIO support with no further updates.

You may also consider combining the EMI updates with the patch which creates EMI support in the first place, which I think is patch 36.

#56 lore raw

PATCH v5 36/63 ST SPEAr : EMI (Extrenal Memory Interface) controller driver

In reply to Viresh Kumar
Quoted 1 line · Viresh Kumar

From: Vipin Kumar <[email protected]>

Subject: [PATCH V5 36/63] ST SPEAr : EMI (Extrenal Memory Interface)
controller driver

"External"

Quoted 66 lines

2 SPEAr platform SoCs(spear310 and spear320) support an External Memory Interface controller. This controller is used to interface with Parallel NOR Flash devices.

This patch adds just the platform code needed for EMI (mainly EMI initialization). The driver being used is driver/mtd/maps/physmap.c

---
 arch/arm/mach-spear3xx/Makefile                |    4 +
 arch/arm/mach-spear3xx/emi.c                   |  101 ++++++++++++++++++++++++
 arch/arm/mach-spear3xx/include/mach/emi.h      |   64 +++++++++++++++
 arch/arm/mach-spear3xx/include/mach/generic.h  |    2 +
 arch/arm/mach-spear3xx/include/mach/spear310.h |    9 ++
 arch/arm/mach-spear3xx/include/mach/spear320.h |    6 ++
 arch/arm/mach-spear3xx/spear310.c              |    9 ++
 arch/arm/mach-spear3xx/spear310_evb.c          |   28 +++++++
 arch/arm/mach-spear3xx/spear320.c              |    9 ++
 arch/arm/mach-spear3xx/spear320_evb.c          |   27 ++++++
 10 files changed, 259 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-spear3xx/emi.c
 create mode 100644 arch/arm/mach-spear3xx/include/mach/emi.h
arch/arm/mach-spear3xx/Makefile +4 -0
index b248624..d38ae47 100644
@@ -24,3 +24,7 @@ obj-$(CONFIG_MACH_SPEAR320) += spear320.o
 
 # spear320 boards files
 obj-$(CONFIG_BOARD_SPEAR320_EVB) += spear320_evb.o
+
+# specific files
+obj-$(CONFIG_MACH_SPEAR310) += emi.o
+obj-$(CONFIG_MACH_SPEAR320) += emi.o
arch/arm/mach-spear3xx/emi.c new file +24 -0
new file mode 100644
index 0000000..7b62ff0
@@ -0,0 +1,101 @@
+/*
+ * arch/arm/mach-spear3xx/emi.c
+ *
+ * EMI (External Memory Interface) file
+ *
+ * Copyright (C) 2010 ST Microelectronics
+ * Vipin 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 <linux/clk.h>
+#include <linux/err.h>
+#include <linux/init.h>
+#include <linux/io.h>
+#include <mach/emi.h>
+
+int __init emi_init(struct platform_device *pdev, unsigned long base,
+		u32 bank, u32 width)
+{
+	void __iomem *emi_reg_base;
+	struct clk *clk;

arch/arm/mach-spear3xx/emi.c line 34

Quoted 10 lines
arch/arm/mach-spear3xx/emi.c new file +10 -0
+	int ret;
+
+	if (bank > (EMI_MAX_BANKS - 1))
+		return -EINVAL;
+
+	emi_reg_base = ioremap(base, EMI_REG_SIZE);
+	if (!emi_reg_base)
+		return -ENOMEM;
+
+	clk = clk_get(NULL, "emi");

What is the platform device pointer passed into this function? It seems unused - would using &pdev->dev here be appropriate? Possibly not as it seems to be the physmap device.

Quoted 57 lines
arch/arm/mach-spear3xx/emi.c new file +57 -0
+	if (IS_ERR(clk)) {
+		iounmap(emi_reg_base);
+		return PTR_ERR(clk);
+	}
+
+	ret = clk_enable(clk);
+	if (ret) {
+		iounmap(emi_reg_base);
+		return ret;
+	}
+
+	/*
+	 * Note: These are relaxed NOR device timings. Nor devices on spear
+	 * eval machines are working fine with these timings. Specific board
+	 * files can optimize these timings based on devices found on board.
+	 */
+	writel(0x10, emi_reg_base + (EMI_BANK_REG_SIZE * bank) + TAP_REG);
+	writel(0x05, emi_reg_base + (EMI_BANK_REG_SIZE * bank) + TSDP_REG);
+	writel(0x0a, emi_reg_base + (EMI_BANK_REG_SIZE * bank) + TDPW_REG);
+	writel(0x0a, emi_reg_base + (EMI_BANK_REG_SIZE * bank) + TDPR_REG);
+	writel(0x05, emi_reg_base + (EMI_BANK_REG_SIZE * bank) + TDCS_REG);
+
+	switch (width) {
+	case EMI_FLASH_WIDTH8:
+		width = EMI_CNTL_WIDTH8;
+		break;
+
+	case EMI_FLASH_WIDTH16:
+		width = EMI_CNTL_WIDTH16;
+		break;
+
+	case EMI_FLASH_WIDTH32:
+		width = EMI_CNTL_WIDTH32;
+		break;
+	default:
+		width = EMI_CNTL_WIDTH8;
+		break;
+	}
+	/* set the data width */
+	writel(width | EMI_CNTL_ENBBYTERW,
+		emi_reg_base + (EMI_BANK_REG_SIZE * bank) + CTRL_REG);
+
+	/* disable all the acks */
+	writel(0x3f, emi_reg_base + ack_reg);
+
+	iounmap(emi_reg_base);
+
+	return 0;
+}
+
+void __init
+emi_init_board_info(struct platform_device *pdev, struct resource *resources,
+		int res_num, struct mtd_partition *partitions,
+		unsigned int nr_partitions, unsigned int width)
+{
+	struct physmap_flash_data *emi_plat_data = dev_get_platdata(&pdev->dev);
+

arch/arm/mach-spear3xx/emi.c line 101

Quoted 10 lines
arch/arm/mach-spear3xx/emi.c new file +10 -0
+	pdev->resource = resources;
+	pdev->num_resources = res_num;
+
+	if (partitions) {
+		emi_plat_data->parts = partitions;
+		emi_plat_data->nr_parts = nr_partitions;
+	}
+
+	emi_plat_data->width = width;
+}

I don't see why this has to be code rather than in the platform specific files as static initializers. Also, you seem to be passing stuff like 'EMI_FLASH_WIDTH32' in for 'width', which seems very odd as this is the byte width. I don't see why you need #defined constants for this.

It's waiting someone who doesn't realise that it has a proper meaning to change it to an enum or something like that.

If you think the physmap flash API is lacking some definitions for this, please talk to the MTD people.

#5 lore raw

PATCH v5 3/63 sp810 Fix: Switch to slow mode before sysctl_soft_reset

In reply to Russell King - ARM Linux
Quoted 6 lines · Russell King - ARM Linux
Quoted 4 lines · Viresh Kumar

From: Shiraz Hashim <[email protected]>

Before resetting system from system controller, switching to slow mode is required.

Quoted 9 lines

This comment could do with some expansion about why it is required. Eg, this comment could become:

"sp810: switch to slow mode before reset

In sysctl_soft_reset(), switch to slow mode before resetting the system via the system controller. This is required by the SPEAr reference manual."

Yes. Will take care of such things next time.

--
viresh

#19 lore raw

PATCH v5 13/63 ST SPEAr: Updating Clock Support

In reply to Viresh Kumar
Quoted 2 lines · Viresh Kumar
 arch/arm/mach-spear13xx/clock.c                  |  621 +++++++++++++++++++-
 arch/arm/mach-spear13xx/include/mach/misc_regs.h |  101 ++--

As I said in the patch system, I think this should be a preparatory patch before adding spear13xx support. So I've committed this patch without the spear13xx changes. When I commit the spear13xx changes I'll fold them into that patch.

#68 lore raw

PATCH v5 41/63 ST SPEAr: replace readl, writel with readl_relaxed, writel_relaxed in uncompress.h

In reply to Russell King - ARM Linux
Quoted 9 lines · Russell King - ARM Linux
Quoted 5 lines · Viresh Kumar

readl also calls outer cache maintainance operations which are not available
during Linux uncompression. This patch replaces readl, writel with readl_relaxed
and writel_relaxed.

Shouldn't this be near the start of the series?

Yes.

Quoted 11 lines

Also, would:

"SPEAr: replace readl, writel with relaxed versions in uncompress.h

readl() and writel() calls the outer cache maintainance operations which are not available during Linux uncompression. This patch replaces readl() and writel() with readl_relaxed() and writel_relaxed() to avoid the link time errors."

be a better patch description?

Obviously. Will take care of such things next time we send a patch.

--
viresh

#23 lore raw

PATCH v5 15/63 ST SPEAr: Correcting SOC Config base address for spear320

In reply to Russell King - ARM Linux
Quoted 7 lines · Russell King - ARM Linux
Quoted 1 line · Viresh Kumar

This looks to me like another bug fix, and I'm treating it as such. It should be submitted separately from this patch set along with other bug fixes, and clearly labelled as such.

Yes it is a bug fix and should have been submitted separately.

Quoted 7 lines

I've also changed the comments on this patch to:

"SPEAr: Correct SOC config base address for spear320

SPEAR320_SOC_CONFIG_BASE was wrong, causing the wrong registers to be accessed."

Thanks for your help. Will take care of commit message next time.

--
viresh

#86 lore raw

PATCH v5 57/63 ST SPEAr3xx: Updating plgpio and emi source to make it compliant with single image strategy

In reply to Russell King - ARM Linux
Quoted 5 lines · Russell King - ARM Linux
Quoted 1 line · Viresh Kumar

Why aren't the plgpio bits of this in patch 16?

Because we made these changes after that single image solution. And yes we should
have done our homework on this cleanly and merged all this in patch 16 and emi's patch.

Quoted 6 lines

arch/arm/plat-spear/plgpio.c line 33

Quoted 2 lines
arch/arm/plat-spear/plgpio.c +2 -0
+static u32 plgpio_enb, plgpio_wdata, plgpio_dir, plgpio_rdata, plgpio_ie,
+	   plgpio_mis;

'int' or 'unsigned int' will do for these. There's no pressing need for these to be exactly 32-bit quantities.

Yes.

Quoted 13 lines
Quoted 13 lines

static int __init plgpio_init(void)
{

arch/arm/plat-spear/plgpio.c +11 -0
+	if (machine_is_spear310()) {
+		plgpio_enb = SPEAR310_PLGPIO_ENB;
+		plgpio_wdata = SPEAR310_PLGPIO_WDATA;
+		plgpio_dir = SPEAR310_PLGPIO_DIR;
+		plgpio_rdata = SPEAR310_PLGPIO_IE;
+		plgpio_ie = SPEAR310_PLGPIO_RDATA;
+		plgpio_mis = SPEAR310_PLGPIO_MIS;
+	} else if (machine_is_spear320()) {
+		plgpio_enb = SPEAR320_PLGPIO_ENB;
+		plgpio_wdata = SPEAR320_PLGPIO_WDATA;
+		plgpio_dir = SPEAR320_PLGPIO_DIR;
Quoted 9 lines

arch/arm/plat-spear/plgpio.c static struct platform_driver plgpio_driver = { · line 465

Quoted 5 lines
arch/arm/plat-spear/plgpio.c +5 -0
+		plgpio_rdata = SPEAR320_PLGPIO_IE;
+		plgpio_ie = SPEAR320_PLGPIO_RDATA;
+		plgpio_mis = SPEAR320_PLGPIO_MIS;
+	} else {
+		return 0;

If it's not supported, then what about returning an error instead of zero?

Yes. Error must be returned.

Quoted 6 lines

Can you supersede this patch and patch 16 in the patch system with a single patch which adds PLGPIO support with no further updates.

You may also consider combining the EMI updates with the patch which creates EMI support in the first place, which I think is patch 36.

Will do this for both plgpio and emi.

#100 lore raw

v5 cover Updating SPEAr Support

In reply to Russell King - ARM Linux
Quoted 10 lines · Russell King - ARM Linux

I don't understand why people think that it's a good idea to post a patch series which adds new support and then has a whole series of patches which modify then modifies both new and old stuff.

It makes it a lot harder to apply, a lot harder to review, and all round is a bad idea.

The problem is that mixing it up in the way you've done means that it's impossible to apply the cleanup patches before the new support.

Yes, understood it well now. This will not happen again.

Quoted 7 lines

Another issue worth pointing out is that submission of patch series by email has to be done _carefully_ - which basically means slowly. The email system on this planet will randomly re-order messages - there is no guarantee that the order in which you send them is the order in which they're received at the remote end. If you want them to arrive in a certain order, you're out of luck.

Quoted 5 lines

You can help by not dumping 63 patches into the mail system within a few seconds or so, but leaving a greater period of time between each. The longer that period, the more likely they are to arrive in order - but it's something that will never be guaranteed.

As that is never guaranteed, can we have some other way to work out this issue? I hope the issue is regarding the correct ordering of patches, as you don't see the
numbering of these in the patch tracker? Is there anything more to it?

If this is the case, then may be we can send cover-letter along with patch series
mentioning correct order of patches in it, and keeping you in cc of cover-letter alone, so that
cover-letter is not lost by tracker, as it only takes patches.

Quoted 7 lines

That's another argument for not waiting until you have a huge patch set before sending stuff out - keep patch sets small and targetted to specific areas. For instance, with the Versatile updates which form a total of 21 individual patches, I split them up into one set of 10 patches which changed the way CLCD stuff was handled, and another separate set of 11 patches of platform specific stuff.

Ok.

Quoted 3 lines

So, why aren't all the padmux changes together? Why aren't the clk API patches together?

We didn't thought you will be required to do rework on this. And thought you will apply
this patch series as it is. But now as we see, you need to put extra efforts due to our
mistakes, we will not repeat them.

Quoted 9 lines

And another thing: separate out the 'fixes' from the new developments. Things like the addition of UL to VMALLOC_END counts as a warning fix. Using readl_relaxed/writel_relaxed also counts as a fix as things in the decompressor break. As these are technically bug fixes, they go upstream faster than new work.

Bug fixes should _always_ be at the very start of any patch series, then cleanups, then new stuff.

Ok.

Quoted 9 lines

In summary, I hate large patch sets. I tend to ignore large patch sets. I have very little motivation to review large patch sets. I have very little motivation to apply large patch sets. Don't create them in the first place. Spend time sorting the patches into smaller sets and things all round go much easier.

I'll work through what you've already submitted, but it will be a slow and erratic job.

Sorry for that again!! And thanks for your effort and help.

--
viresh

#39 lore raw

PATCH v5 29/63 ST SPEAr: Changing resource size of amba devices to SZ_4K

In reply to Viresh Kumar

This is another patch which should be reorganized - move the CLCD bits into the CLCD patch and arrange for it to be applied early on in the series.

Quoted 89 lines · Viresh Kumar
---
 arch/arm/mach-spear3xx/spear300.c |    2 +-
 arch/arm/mach-spear3xx/spear320.c |    2 +-
 arch/arm/mach-spear3xx/spear3xx.c |    2 +-
 arch/arm/mach-spear6xx/spear6xx.c |    8 +++-----
 4 files changed, 6 insertions(+), 8 deletions(-)
arch/arm/mach-spear3xx/spear300.c +1 -1
index fceb71f..6989407 100644
@@ -382,7 +382,7 @@ struct amba_device clcd_device = {
 	},
 	.res = {
 		.start = SPEAR300_CLCD_BASE,
-		.end = SPEAR300_CLCD_BASE + SPEAR300_CLCD_SIZE - 1,
+		.end = SPEAR300_CLCD_BASE + SZ_4K - 1,
 		.flags = IORESOURCE_MEM,
 	},
 	.dma_mask = ~0,
arch/arm/mach-spear3xx/spear320.c +1 -1
index 6ab35db..ab4ad8e 100644
@@ -399,7 +399,7 @@ struct amba_device clcd_device = {
 	},
 	.res = {
 		.start = SPEAR320_CLCD_BASE,
-		.end = SPEAR320_CLCD_BASE + SPEAR320_CLCD_SIZE - 1,
+		.end = SPEAR320_CLCD_BASE + SZ_4K - 1,
 		.flags = IORESOURCE_MEM,
 	},
 	.dma_mask = ~0,
arch/arm/mach-spear3xx/spear3xx.c +1 -1
index 9d6d125..6be49b3 100644
@@ -79,7 +79,7 @@ struct amba_device uart_device = {
 	},
 	.res = {
 		.start = SPEAR3XX_ICM1_UART_BASE,
-		.end = SPEAR3XX_ICM1_UART_BASE + SPEAR3XX_ICM1_UART_SIZE - 1,
+		.end = SPEAR3XX_ICM1_UART_BASE + SZ_4K - 1,
 		.flags = IORESOURCE_MEM,
 	},
 	.irq = {IRQ_UART, NO_IRQ},
arch/arm/mach-spear6xx/spear6xx.c +3 -5
index f39538e..a948dd4 100644
@@ -35,7 +35,7 @@ struct amba_device clcd_device = {
 	},
 	.res = {
 		.start = SPEAR6XX_ICM3_CLCD_BASE,
-		.end = SPEAR6XX_ICM3_CLCD_BASE + SPEAR6XX_ICM3_CLCD_SIZE - 1,
+		.end = SPEAR6XX_ICM3_CLCD_BASE + SZ_4K - 1,
 		.flags = IORESOURCE_MEM,
 	},
 	.dma_mask = ~0,
@@ -117,8 +117,7 @@ struct amba_device uart_device[] = {
 		},
 		.res = {
 			.start = SPEAR6XX_ICM1_UART0_BASE,
-			.end = SPEAR6XX_ICM1_UART0_BASE +
-				SPEAR6XX_ICM1_UART0_SIZE - 1,
+			.end = SPEAR6XX_ICM1_UART0_BASE + SZ_4K - 1,
 			.flags = IORESOURCE_MEM,
 		},
 		.irq = {IRQ_UART_0, NO_IRQ},
@@ -128,8 +127,7 @@ struct amba_device uart_device[] = {
 		},
 		.res = {
 			.start = SPEAR6XX_ICM1_UART1_BASE,
-			.end = SPEAR6XX_ICM1_UART1_BASE +
-				SPEAR6XX_ICM1_UART1_SIZE - 1,
+			.end = SPEAR6XX_ICM1_UART1_BASE + SZ_4K - 1,
 			.flags = IORESOURCE_MEM,
 		},
 		.irq = {IRQ_UART_1, NO_IRQ},
Signature · 7 lines
1.7.3.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#42 lore raw

PATCH v5 30/63 ST SPEAr: Replacing SIZE macro's with actual required size

In reply to Viresh Kumar

Same comments as the other patch changing to SZ_* macros. Where possible fold these changes into the patch(es) which add the original definitions rather than having patches which add stuff and then separate patches which rework those patches.

Could you do that and provide reworked patches please? I'll publish the branch I've merged stuff onto thus far (but note that it's 'unstable'), but note that it won't contain the bits I've merged into the 'fixes' branch.

Quoted 154 lines · Viresh Kumar

From: Shiraz Hashim <[email protected]>

In arch specific files SIZE macro's were defined which were used for creating memory/io mappings for sepecific devices. These macro's are coming straight from h/w user manual and are much greated than required sizes. Replacing these macros by actual required size.

---
 arch/arm/mach-spear3xx/spear300.c |    9 +++------
 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/spear6xx.c |   10 +++++-----
 5 files changed, 14 insertions(+), 17 deletions(-)
arch/arm/mach-spear3xx/spear300.c +3 -6
index 6989407..30e893f 100644
@@ -604,8 +604,7 @@ struct spear_shirq shirq_ras1 = {
 void sdhci_i2s_mem_enable(u8 mask)
 {
 	u32 val;
-	void __iomem *base = ioremap(SPEAR300_SOC_CONFIG_BASE,
-			SPEAR300_SOC_CONFIG_SIZE);
+	void __iomem *base = ioremap(SPEAR300_SOC_CONFIG_BASE, SZ_4K);
 	if (!base) {
 		pr_debug("sdhci_i2s_enb: ioremap fail\n");
 		return;
@@ -628,8 +627,7 @@ void __init spear300_init(void)
 	spear3xx_init();
 
 	/* shared irq registration */
-	shirq_ras1.regs.base =
-		ioremap(SPEAR300_TELECOM_BASE, SPEAR300_TELECOM_REG_SIZE);
+	shirq_ras1.regs.base = ioremap(SPEAR300_TELECOM_BASE, SZ_4K);
 	if (shirq_ras1.regs.base) {
 		ret = spear_shirq_register(&shirq_ras1);
 		if (ret)
@@ -637,8 +635,7 @@ void __init spear300_init(void)
 	}
 
 	/* pmx initialization */
-	pmx_driver.base = ioremap(SPEAR300_SOC_CONFIG_BASE,
-			SPEAR300_SOC_CONFIG_SIZE);
+	pmx_driver.base = ioremap(SPEAR300_SOC_CONFIG_BASE, SZ_4K);
 	if (pmx_driver.base) {
 		ret = pmx_register(&pmx_driver);
 		if (ret)
arch/arm/mach-spear3xx/spear310.c +1 -1
index bb9ff7c..ffc1f63 100644
@@ -362,7 +362,7 @@ void __init spear310_init(void)
 	spear3xx_init();
 
 	/* shared irq registration */
-	base = ioremap(SPEAR310_SOC_CONFIG_BASE, SPEAR310_SOC_CONFIG_SIZE);
+	base = ioremap(SPEAR310_SOC_CONFIG_BASE, SZ_4K);
 	if (base) {
 		/* shirq 1 */
 		shirq_ras1.regs.base = base;
arch/arm/mach-spear3xx/spear320.c +1 -1
index ab4ad8e..ac4f80b 100644
@@ -694,7 +694,7 @@ void __init spear320_init(void)
 	spear3xx_init();
 
 	/* shared irq registration */
-	base = ioremap(SPEAR320_SOC_CONFIG_BASE, SPEAR320_SOC_CONFIG_SIZE);
+	base = ioremap(SPEAR320_SOC_CONFIG_BASE, SZ_4K);
 	if (base) {
 		/* shirq 1 */
 		shirq_ras1.regs.base = base;
arch/arm/mach-spear3xx/spear3xx.c +4 -4
index 6be49b3..0088b7c 100644
@@ -235,22 +235,22 @@ struct map_desc spear3xx_io_desc[] __initdata = {
 	{
 		.virtual	= VA_SPEAR3XX_ICM1_UART_BASE,
 		.pfn		= __phys_to_pfn(SPEAR3XX_ICM1_UART_BASE),
-		.length		= SPEAR3XX_ICM1_UART_SIZE,
+		.length		= SZ_4K,
 		.type		= MT_DEVICE
 	}, {
 		.virtual	= VA_SPEAR3XX_ML1_VIC_BASE,
 		.pfn		= __phys_to_pfn(SPEAR3XX_ML1_VIC_BASE),
-		.length		= SPEAR3XX_ML1_VIC_SIZE,
+		.length		= SZ_4K,
 		.type		= MT_DEVICE
 	}, {
 		.virtual	= VA_SPEAR3XX_ICM3_SYS_CTRL_BASE,
 		.pfn		= __phys_to_pfn(SPEAR3XX_ICM3_SYS_CTRL_BASE),
-		.length		= SPEAR3XX_ICM3_SYS_CTRL_SIZE,
+		.length		= SZ_4K,
 		.type		= MT_DEVICE
 	}, {
 		.virtual	= VA_SPEAR3XX_ICM3_MISC_REG_BASE,
 		.pfn		= __phys_to_pfn(SPEAR3XX_ICM3_MISC_REG_BASE),
-		.length		= SPEAR3XX_ICM3_MISC_REG_SIZE,
+		.length		= SZ_4K,
 		.type		= MT_DEVICE
 	},
 };
arch/arm/mach-spear6xx/spear6xx.c +5 -5
index a948dd4..f8be93a 100644
@@ -389,27 +389,27 @@ static struct map_desc spear6xx_io_desc[] __initdata = {
 	{
 		.virtual	= VA_SPEAR6XX_ICM1_UART0_BASE,
 		.pfn		= __phys_to_pfn(SPEAR6XX_ICM1_UART0_BASE),
-		.length		= SPEAR6XX_ICM1_UART0_SIZE,
+		.length		= SZ_4K,
 		.type		= MT_DEVICE
 	}, {
 		.virtual	= VA_SPEAR6XX_CPU_VIC_PRI_BASE,
 		.pfn		= __phys_to_pfn(SPEAR6XX_CPU_VIC_PRI_BASE),
-		.length		= SPEAR6XX_CPU_VIC_PRI_SIZE,
+		.length		= SZ_4K,
 		.type		= MT_DEVICE
 	}, {
 		.virtual	= VA_SPEAR6XX_CPU_VIC_SEC_BASE,
 		.pfn		= __phys_to_pfn(SPEAR6XX_CPU_VIC_SEC_BASE),
-		.length		= SPEAR6XX_CPU_VIC_SEC_SIZE,
+		.length		= SZ_4K,
 		.type		= MT_DEVICE
 	}, {
 		.virtual	= VA_SPEAR6XX_ICM3_SYS_CTRL_BASE,
 		.pfn		= __phys_to_pfn(SPEAR6XX_ICM3_SYS_CTRL_BASE),
-		.length		= SPEAR6XX_ICM3_MISC_REG_BASE,
+		.length		= SZ_4K,
 		.type		= MT_DEVICE
 	}, {
 		.virtual	= VA_SPEAR6XX_ICM3_MISC_REG_BASE,
 		.pfn		= __phys_to_pfn(SPEAR6XX_ICM3_MISC_REG_BASE),
-		.length		= SPEAR6XX_ICM3_MISC_REG_SIZE,
+		.length		= SZ_4K,
 		.type		= MT_DEVICE
 	},
 };
Signature · 7 lines
1.7.3.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#57 lore raw

PATCH v5 36/63 ST SPEAr : EMI (Extrenal Memory Interface) controller driver

In reply to Russell King - ARM Linux
Quoted 9 lines · Russell King - ARM Linux
Quoted 1 line · Viresh Kumar

From: Vipin Kumar <[email protected]>

Subject: [PATCH V5 36/63] ST SPEAr : EMI (Extrenal Memory Interface)
controller driver

"External"

Sorry!!

Quoted 6 lines

arch/arm/mach-spear3xx/emi.c line 34

Quoted 1 line
arch/arm/mach-spear3xx/emi.c new file +1 -0
+	clk = clk_get(NULL, "emi");

What is the platform device pointer passed into this function? It seems unused - would using &pdev->dev here be appropriate? Possibly not as it seems to be the physmap device.

Yes, the platform device pointer is unused
I would remove it....

Quoted 12 lines
Quoted 12 lines
arch/arm/mach-spear3xx/emi.c new file +12 -0
+void __init
+emi_init_board_info(struct platform_device *pdev, struct resource *resources,
+		int res_num, struct mtd_partition *partitions,
+		unsigned int nr_partitions, unsigned int width)
+{
+	struct physmap_flash_data *emi_plat_data = dev_get_platdata(&pdev->dev);
+
+	pdev->resource = resources;
+	pdev->num_resources = res_num;
+
+	if (partitions) {
+		emi_plat_data->parts = partitions;
Quoted 8 lines

arch/arm/mach-spear3xx/emi.c line 101

Quoted 5 lines
arch/arm/mach-spear3xx/emi.c new file +5 -0
+		emi_plat_data->nr_parts = nr_partitions;
+	}
+
+	emi_plat_data->width = width;
+}

I don't see why this has to be code rather than in the platform specific files as static initializers.

The device is instantiated in the machine file and above information comes from the board file. So we kept them this way.

Quoted 9 lines

Also, you seem to be passing stuff like
'EMI_FLASH_WIDTH32' in for 'width', which seems very odd as this is the byte width. I don't see why you need #defined constants for this.

It's waiting someone who doesn't realise that it has a proper meaning to change it to an enum or something like that.

If you think the physmap flash API is lacking some definitions for this, please talk to the MTD people.

Yes. We shouldn't have created new macro's for this. Will be removed.

vipin

#40 lore raw

PATCH v5 29/63 ST SPEAr: Changing resource size of amba devices to SZ_4K

In reply to Russell King - ARM Linux
Quoted 3 lines · Russell King - ARM Linux

This is another patch which should be reorganized - move the CLCD bits into the CLCD patch and arrange for it to be applied early on in the series.

Doesn't we need to drop CLCD patch for now?

Signature · 1 line
viresh
#43 lore raw

PATCH v5 30/63 ST SPEAr: Replacing SIZE macro's with actual required size

In reply to Russell King - ARM Linux
Quoted 5 lines · Russell King - ARM Linux

Same comments as the other patch changing to SZ_* macros. Where possible fold these changes into the patch(es) which add the original definitions rather than having patches which add stuff and then separate patches which rework those patches.

Ok.

Quoted 4 lines

Could you do that and provide reworked patches please? I'll publish the branch I've merged stuff onto thus far (but note that it's 'unstable'), but note that it won't contain the bits I've merged into the 'fixes' branch.

Ok. I will surely do that.

Just one question, should i send these patches to mailing list again or directly to tracker?

Signature · 1 line
viresh
#58 lore raw

PATCH v5 36/63 ST SPEAr : EMI (Extrenal Memory Interface) controller driver

In reply to Vipin Kumar
Quoted 21 lines · Vipin Kumar
Quoted 12 lines
Quoted 12 lines
arch/arm/mach-spear3xx/emi.c new file +12 -0
+void __init
+emi_init_board_info(struct platform_device *pdev, struct resource *resources,
+		int res_num, struct mtd_partition *partitions,
+		unsigned int nr_partitions, unsigned int width)
+{
+	struct physmap_flash_data *emi_plat_data = dev_get_platdata(&pdev->dev);
+
+	pdev->resource = resources;
+	pdev->num_resources = res_num;
+
+	if (partitions) {
+		emi_plat_data->parts = partitions;
Quoted 8 lines

arch/arm/mach-spear3xx/emi.c line 101

Quoted 5 lines
arch/arm/mach-spear3xx/emi.c new file +5 -0
+		emi_plat_data->nr_parts = nr_partitions;
+	}
+
+	emi_plat_data->width = width;
+}

I don't see why this has to be code rather than in the platform specific files as static initializers.

Quoted 2 lines

The device is instantiated in the machine file and above information comes from the board file. So we kept them this way.

Ok, but I don't see why this should be in the EMI code. Surely this should be along side the nor device, and called 'nor_init_board_info' or something similar?

#44 lore raw

PATCH v5 30/63 ST SPEAr: Replacing SIZE macro's with actual required size

In reply to viresh kumar
Quoted 14 lines · viresh kumar
Quoted 5 lines · Russell King - ARM Linux

Same comments as the other patch changing to SZ_* macros. Where possible fold these changes into the patch(es) which add the original definitions rather than having patches which add stuff and then separate patches which rework those patches.

Ok.

Quoted 4 lines

Could you do that and provide reworked patches please? I'll publish the branch I've merged stuff onto thus far (but note that it's 'unstable'), but note that it won't contain the bits I've merged into the 'fixes' branch.

Quoted 4 lines

Ok. I will surely do that.

Just one question, should i send these patches to mailing list again or directly to tracker?

If you can update the ones I've mentioned in the patch tracker that'd be great.

#59 lore raw

PATCH v5 36/63 ST SPEAr : EMI (Extrenal Memory Interface) controller driver

In reply to Russell King - ARM Linux
Quoted 22 lines · Russell King - ARM Linux
Quoted 21 lines · Vipin Kumar
Quoted 20 lines
Quoted 7 lines
arch/arm/mach-spear3xx/emi.c new file +7 -0
+void __init
+emi_init_board_info(struct platform_device *pdev, struct resource *resources,
+		int res_num, struct mtd_partition *partitions,
+		unsigned int nr_partitions, unsigned int width)
+{
+	struct physmap_flash_data *emi_plat_data = dev_get_platdata(&pdev->dev);
+

arch/arm/mach-spear3xx/emi.c line 101

Quoted 10 lines
arch/arm/mach-spear3xx/emi.c new file +10 -0
+	pdev->resource = resources;
+	pdev->num_resources = res_num;
+
+	if (partitions) {
+		emi_plat_data->parts = partitions;
+		emi_plat_data->nr_parts = nr_partitions;
+	}
+
+	emi_plat_data->width = width;
+}

I don't see why this has to be code rather than in the platform specific files as static initializers.

Quoted 8 lines
Quoted 2 lines

The device is instantiated in the machine file and above information comes from the board file. So we kept them this way.

Ok, but I don't see why this should be in the EMI code. Surely this should be along side the nor device, and called 'nor_init_board_info' or something similar?
.

Yes, you are right. I would change this and resend Thanks

Regards
Vipin

#45 lore raw

PATCH v5 30/63 ST SPEAr: Replacing SIZE macro's with actual required size

In reply to Russell King - ARM Linux
Quoted 2 lines · Russell King - ARM Linux

If you can update the ones I've mentioned in the patch tracker that'd be great.

Ok. I will do that.
You can decline all pending patches from your tracker, and i will resend them after rearranging.

Signature · 1 line
viresh
#46 lore raw

PATCH v5 30/63 ST SPEAr: Replacing SIZE macro's with actual required size

Quoted 7 lines · viresh kumar
Quoted 2 lines · Russell King - ARM Linux

If you can update the ones I've mentioned in the patch tracker that'd be great.

Ok. I will do that.
You can decline all pending patches from your tracker, and i will resend them after rearranging.

In which case, please only send the first 10, and make sure that they apply on top of my 'spear' branch.

Also note that there's some SPEAr patches queued in the 'fixes' branch which will be going upstream tonight.

#47 lore raw

PATCH v5 30/63 ST SPEAr: Replacing SIZE macro's with actual required size

Quoted 5 lines · Russell King - ARM Linux

In which case, please only send the first 10, and make sure that they apply on top of my 'spear' branch.

Also note that there's some SPEAr patches queued in the 'fixes' branch which will be going upstream tonight.

Russell,

I have taken care of above two steps, but i have some doubt.
I have made changes at few places:
- EMI driver: Changes according to your review comments.
- Removed CLCD patch, as you mentioned that earlier.
- fixed PLGPIO & EMI patch issue resolved, code has been put to individual patches and patch 57 removed completely.
- PATCH 29 & 30 are placed at the top and changes made other individual patches

So sending only first 10 patches looks a bit insufficient to me? Would be better to send all of them (leaving what you have already applied), so that they apply cleanly at your end.

Signature · 1 line
viresh
#48 lore raw

PATCH v5 30/63 ST SPEAr: Replacing SIZE macro's with actual required size

Quoted 17 lines · viresh kumar
Quoted 5 lines · Russell King - ARM Linux

In which case, please only send the first 10, and make sure that they apply on top of my 'spear' branch.

Also note that there's some SPEAr patches queued in the 'fixes' branch which will be going upstream tonight.

Russell,

I have taken care of above two steps, but i have some doubt.
I have made changes at few places:
- EMI driver: Changes according to your review comments.
- Removed CLCD patch, as you mentioned that earlier.
- fixed PLGPIO & EMI patch issue resolved, code has been put to individual patches and patch 57 removed completely.
- PATCH 29 & 30 are placed at the top and changes made other individual patches

Quoted 3 lines

So sending only first 10 patches looks a bit insufficient to me? Would be better to send all of them (leaving what you have already applied), so that they apply cleanly at your end.

I don't know, and I'm getting to the point of giving up with this SPEAr stuff. It's more trouble and time consuming than it's worth because of the size of the patch set. It's just *too* large to properly deal with.

#49 lore raw

PATCH v5 30/63 ST SPEAr: Replacing SIZE macro's with actual required size

Quoted 11 lines · Russell King - ARM Linux
Quoted 5 lines · viresh kumar

On 02/21/2011 05:23 PM, Russell King - ARM Linux wrote:
So sending only first 10 patches looks a bit insufficient to me? Would be better
to send all of them (leaving what you have already applied), so that they apply cleanly at your end.

I don't know, and I'm getting to the point of giving up with this SPEAr stuff. It's more trouble and time consuming than it's worth because of the size of the patch set. It's just *too* large to properly deal with.

Please don't do that now. I agree that it was too big to get reviewed and get added.
I will make it sure, that it doesn't happen again from our side. But now lots of effort
has already been put on it, by everybody in reviewing and preparing them.

Let me check, might be only few patches are required to be resent and others will
automatically apply over them.

--
viresh

#101 lore raw

v5 cover Updating SPEAr Support

In reply to Viresh Kumar
Quoted 4 lines · Viresh KUMAR

Following set of patches:
- updates SPEAr3xx, 6xx support
- Adds support for SPEAr13xx
- Removes Multiple defconfigs per machine family

Russell,

As suggested, i have broken down this large patchset to several patchsets. I will be sending them again to list for getting any further review comments.

I have broadly divided these into following patchsets.
- SPEAr3xx & SPEAr6xx Fixes (8)
- SPEAr3xx & SPEAr6xx: Single Image solution (10) and padmux updates (1)
- Adding SPEAr13xx support (10)
- Adding devices support for all spear machines (17)
- Clock Framework & CPU Freq Updates (3)

Signature · 1 line
viresh