SPEAr3xx & SPEAr6xx: Single Image solution and padmux updates
Subsystems (2)
v6 cover SPEAr3xx & SPEAr6xx: Single Image solution and padmux updates
This patchset contains following updates for SPEAr3xx & SPEAr6xx:
- Pad multiplexing updates
- Single Image solution
Note: These patches were earlier sent as part of a larger patchset:
"Updating SPEAr Support"
Now it is divided into smaller patchsets. In order to apply these patches cleanly following order of patchsets must be maintained.
- SPEAr3xx & SPEAr6xx Fixes
- SPEAr3xx & SPEAr6xx: Single Image solution and padmux updates
- Adding SPEAr13xx support
- Adding devices support for all spear machines
- Clock Framework & CPU Freq Updates
Ryan Mallon (5):
ST SPEAr3xx: Make local shirq structures static
ST SPEAR3xx: Rename register/irq defines to remove naming conflicts ST SPEAr3xx: Rework pmx_dev code to remove conflicts
ST SPEAr3xx: Rework KConfig to allow all boards to be compiled in ST SPEAr3xx: Replace defconfigs with single unified defconfig
Vipin Kumar (1):
ST SPEAr: Pad multiplexing handling modified
Viresh Kumar (5):
ST SPEAr clock: Define common clk_init routine in plat/clock.c ST SPEAr Clock: Updating for single image solution ST SPEAr3xx: Appending spear3** with global device structures ST SPEAr6xx: Rework Kconfig for single image solution ST SPEAR6xx: renaming spear600_defconfig as spear6xx_defconfig
arch/arm/configs/spear310_defconfig | 52 --
arch/arm/configs/spear320_defconfig | 52 --
.../{spear300_defconfig => spear3xx_defconfig} | 4 +-
.../{spear600_defconfig => spear6xx_defconfig} | 2 +-
arch/arm/mach-spear3xx/Kconfig | 30 +-
arch/arm/mach-spear3xx/Kconfig300 | 17 -
arch/arm/mach-spear3xx/Kconfig310 | 17 -
arch/arm/mach-spear3xx/Kconfig320 | 17 -
arch/arm/mach-spear3xx/clock.c | 74 ++-
arch/arm/mach-spear3xx/include/mach/generic.h | 215 ++++----
arch/arm/mach-spear3xx/include/mach/irqs.h | 206 ++++----
arch/arm/mach-spear3xx/include/mach/spear300.h | 27 +-
arch/arm/mach-spear3xx/include/mach/spear310.h | 44 +-
arch/arm/mach-spear3xx/include/mach/spear320.h | 48 +-
arch/arm/mach-spear3xx/spear300.c | 449 ++++++++++-----
arch/arm/mach-spear3xx/spear300_evb.c | 32 +-
arch/arm/mach-spear3xx/spear310.c | 247 +++++----
arch/arm/mach-spear3xx/spear310_evb.c | 45 +-
arch/arm/mach-spear3xx/spear320.c | 579 +++++++++++++-------
arch/arm/mach-spear3xx/spear320_evb.c | 40 +-
arch/arm/mach-spear3xx/spear3xx.c | 513 +++++++++++++-----
arch/arm/mach-spear6xx/Kconfig | 15 +-
arch/arm/mach-spear6xx/Kconfig600 | 17 -
arch/arm/mach-spear6xx/clock.c | 4 +-
arch/arm/mach-spear6xx/include/mach/generic.h | 2 +-
arch/arm/mach-spear6xx/spear6xx.c | 2 +-
arch/arm/plat-spear/clock.c | 5 +
arch/arm/plat-spear/include/plat/clock.h | 1 +
arch/arm/plat-spear/include/plat/padmux.h | 34 +-
arch/arm/plat-spear/padmux.c | 54 +-
30 files changed, 1698 insertions(+), 1146 deletions(-)
delete mode 100644 arch/arm/configs/spear310_defconfig
delete mode 100644 arch/arm/configs/spear320_defconfig
rename arch/arm/configs/{spear300_defconfig => spear3xx_defconfig} (93%)
rename arch/arm/configs/{spear600_defconfig => spear6xx_defconfig} (97%)
delete mode 100644 arch/arm/mach-spear3xx/Kconfig300
delete mode 100644 arch/arm/mach-spear3xx/Kconfig310
delete mode 100644 arch/arm/mach-spear3xx/Kconfig320
delete mode 100644 arch/arm/mach-spear6xx/Kconfig600Signature · 1 line
1.7.2.2
PATCH v6 1/11 ST SPEAr: Pad multiplexing handling modified
From: Vipin Kumar <[email protected]>
Until now, the platform code assumed 1 32 bit register to be used for pad multiplexing. This assumption is not true for SPEAr13xx devices, so the generic implementation of pad multiplexing adopts a new concepts of multiple multiplexing registers in different address range.
--- arch/arm/mach-spear3xx/include/mach/generic.h | 10 + arch/arm/mach-spear3xx/include/mach/spear300.h | 1 - arch/arm/mach-spear3xx/spear300.c | 315 +++++++++++++----- arch/arm/mach-spear3xx/spear310.c | 117 +++++-- arch/arm/mach-spear3xx/spear320.c | 373 ++++++++++++++++----- arch/arm/mach-spear3xx/spear3xx.c | 441 +++++++++++++++++++----- arch/arm/plat-spear/include/plat/padmux.h | 34 ++- arch/arm/plat-spear/padmux.c | 54 ++-- 8 files changed, 1016 insertions(+), 329 deletions(-)
arch/arm/mach-spear3xx/include/mach/generic.h +10 -0
@@ -41,6 +41,7 @@ void __init spear_setup_timer(void);void __init spear3xx_map_io (void );void __init spear3xx_init_irq (void );void __init spear3xx_init (void ); +void spear3xx_pmx_init_addr (struct pmx_driver *driver,unsigned int addr);/* pad mux declarations */ #define PMX_FIRDA_MASK (1 << 14)
@@ -133,6 +134,10 @@ extern struct pmx_dev pmx_telecom_sdhci_4bit;extern struct pmx_dev pmx_telecom_sdhci_8bit;extern struct pmx_dev pmx_gpio1; +/* pad multiplexing support */ +#define SPEAR300_PAD_MUX_CONFIG_REG 0x99000000 +#define SPEAR300_MODE_CONFIG_REG 0x99000004 +/* Add spear300 machine function declarations here */ void __init spear300_init (void );
@@ -151,6 +156,7 @@ extern struct pmx_dev pmx_uart3_4_5;extern struct pmx_dev pmx_fsmc;extern struct pmx_dev pmx_rs485_0_1;extern struct pmx_dev pmx_tdm0; +#define SPEAR310_PAD_MUX_CONFIG_REG 0xB4000008/* Add spear310 machine function declarations here */ void __init spear310_init (void );
@@ -191,6 +197,10 @@ extern struct pmx_dev pmx_smii0;extern struct pmx_dev pmx_smii1;extern struct pmx_dev pmx_i2c1; +/* pad multiplexing support */ +#define SPEAR320_PAD_MUX_CONFIG_REG 0xB300000C +#define SPEAR320_MODE_CONFIG_REG 0xB3000010 +/* Add spear320 machine function declarations here */ void __init spear320_init (void );
arch/arm/mach-spear3xx/include/mach/spear300.h +0 -1
@@ -45,7 +45,6 @@#define SPEAR300_NOR_2_BASE UL(0x92000000)#define SPEAR300_NOR_3_BASE UL(0x93000000)#define SPEAR300_FSMC_BASE UL(0x94000000) -#define SPEAR300_SOC_CONFIG_BASE UL(0x99000000)#define SPEAR300_KEYBOARD_BASE UL(0xA0000000)#define SPEAR300_GPIO_BASE UL(0xA9000000)
arch/arm/mach-spear3xx/spear300.c +232 -83
574 lines not on this page · raw message
arch/arm/mach-spear3xx/spear310.c +85 -32
213 lines not on this page · raw message
arch/arm/mach-spear3xx/spear320.c +288 -85
643 lines not on this page · raw message
arch/arm/mach-spear3xx/spear3xx.c +349 -92
749 lines not on this page · raw message
arch/arm/plat-spear/include/plat/padmux.h +22 -12
@@ -19,35 +19,51 @@/* * struct pmx_reg: configuration structure for mode reg and mux reg * -* offset: offset of mode reg +* address: physical address of mode reg * mask: mask of mode reg */ struct pmx_reg { -u32 offset; +u32 address;u32 mask; };/* +* struct pmx_mux_reg: configuration structure every group of modes of a device +* +* address: physical address of multiplexing register +* mask: mask for supported mode +* value: value to be written +*/ +struct pmx_mux_reg { +u32 address; +u32 mask; +u32 value; +}; + +/* * struct pmx_dev_mode: configuration structure every group of modes of a device * * ids: all modes for this configuration -* mask: mask for supported mode +* mux_regs: array of mux registers, masks and values to enable the device in +* this group of modes +* mux_reg_cnt: count of mux_regs elements */ struct pmx_dev_mode {u32 ids; -u32 mask; +struct pmx_mux_reg *mux_regs; +u8 mux_reg_cnt; };/* * struct pmx_mode: mode definition structure * * name: mode name -* mask: mode mask +* value: mode value */ struct pmx_mode {char *name;u32 id; -u32 mask; +u32 value; };/*
@@ -57,14 +73,12 @@ struct pmx_mode {* modes: device configuration array for different modes supported * mode_count: size of modes array * is_active: is peripheral active/enabled -* enb_on_reset: if 1, mask bits to be cleared in reg otherwise to be set in reg */ struct pmx_dev {char *name;struct pmx_dev_mode *modes;u8 mode_count;bool is_active; -bool enb_on_reset; };/*
@@ -73,17 +87,13 @@ struct pmx_dev {* mode: mode to be set * devs: array of pointer to pmx devices * devs_count: ARRAY_SIZE of devs -* base: base address of soc config registers * mode_reg: structure of mode config register -* mux_reg: structure of device mux config register */ struct pmx_driver {struct pmx_mode *mode;struct pmx_dev **devs;u8 devs_count; -u32 *base;struct pmx_reg mode_reg; -struct pmx_reg mux_reg; };/* pmx functions */
arch/arm/plat-spear/padmux.c +30 -24
114 lines not on this page · raw message
Signature · 1 line
1.7.2.2
PATCH v6 2/11 ST SPEAr clock: Define common clk_init routine in plat/clock.c
In reply to Viresh KumarDefine common clk_init routine in plat/clock.c for calling recalc_root_clocks. This routine will be used for any common code across all machine families. Whereas family specific spear*xx_clk_init routines will be used for family specific code.
--- arch/arm/mach-spear3xx/clock.c | 4 ++-- arch/arm/mach-spear3xx/include/mach/generic.h | 2 +- arch/arm/mach-spear3xx/spear3xx.c | 2 +- arch/arm/mach-spear6xx/clock.c | 4 ++-- arch/arm/mach-spear6xx/include/mach/generic.h | 2 +- arch/arm/mach-spear6xx/spear6xx.c | 2 +- arch/arm/plat-spear/clock.c | 5 +++++ arch/arm/plat-spear/include/plat/clock.h | 1 + 8 files changed, 14 insertions(+), 8 deletions(-)
arch/arm/mach-spear3xx/clock.c +2 -2
@@ -732,12 +732,12 @@ static struct clk_lookup spear_clk_lookups[] = {#endif }; -void __init clk_init (void ) +void __init spear3xx_clk_init (void ) {int i;for (i =0 ; i <ARRAY_SIZE (spear_clk_lookups); i++)clk_register (&spear_clk_lookups[i]); -recalc_root_clocks (); +clk_init (); }
arch/arm/mach-spear3xx/include/mach/generic.h +1 -1
@@ -36,7 +36,7 @@ extern struct amba_device uart_device;extern struct sys_timer spear3xx_timer;/* Add spear3xx family function declarations here */ -void __init clk_init (void ); +void __init spear3xx_clk_init (void );void __init spear_setup_timer (void );void __init spear3xx_map_io (void );void __init spear3xx_init_irq (void );
arch/arm/mach-spear3xx/spear3xx.c +1 -1
@@ -97,7 +97,7 @@ void __init spear3xx_map_io(void)iotable_init (spear3xx_io_desc,ARRAY_SIZE (spear3xx_io_desc));/* This will initialize clock framework */ -clk_init (); +spear3xx_clk_init (); }/* pad multiplexing support */
arch/arm/mach-spear6xx/clock.c +2 -2
@@ -671,12 +671,12 @@ static struct clk_lookup spear_clk_lookups[] = { { .dev_id = "gpio2", .clk = &gpio2_clk}, }; -void __init clk_init (void ) +void __init spear6xx_clk_init (void ) {int i;for (i =0 ; i <ARRAY_SIZE (spear_clk_lookups); i++)clk_register (&spear_clk_lookups[i]); -recalc_root_clocks (); +clk_init (); }
arch/arm/mach-spear6xx/include/mach/generic.h +1 -1
@@ -39,7 +39,7 @@ void __init spear6xx_map_io(void);void __init spear6xx_init_irq (void );void __init spear6xx_init (void );void __init spear600_init (void ); -void __init clk_init (void ); +void __init spear6xx_clk_init (void );/* Add spear600 machine device structure declarations here */
arch/arm/mach-spear6xx/spear6xx.c +1 -1
@@ -148,7 +148,7 @@ void __init spear6xx_map_io(void)iotable_init (spear6xx_io_desc,ARRAY_SIZE (spear6xx_io_desc));/* This will initialize clock framework */ -clk_init (); +spear6xx_clk_init (); }static void __init spear6xx_timer_init (void )
arch/arm/plat-spear/clock.c +5 -0
@@ -903,6 +903,11 @@ void recalc_root_clocks(void)spin_unlock_irqrestore (&clocks_lock, flags); } +void __init clk_init (void ) +{ +recalc_root_clocks (); +} +#ifdef CONFIG_DEBUG_FS /* * debugfs support to trace clock tree hierarchy and attributes
arch/arm/plat-spear/include/plat/clock.h +1 -0
@@ -224,6 +224,7 @@ struct clcd_rate_tbl { };/* platform specific clock functions */ +void __init clk_init (void );void clk_register (struct clk_lookup *cl);void recalc_root_clocks (void );
Signature · 1 line
1.7.2.2
PATCH v6 3/11 ST SPEAr Clock: Updating for single image solution
In reply to Viresh KumarThis patch creates different clk_lookup arrays for individual machines. These lookup arrays will be registered only if that specific machine is current machine.
--- arch/arm/mach-spear3xx/clock.c | 70 ++++++++++++++++++++++++--------------- 1 files changed, 43 insertions(+), 27 deletions(-)
arch/arm/mach-spear3xx/clock.c +43 -27
@@ -13,6 +13,7 @@#include <linux/init.h> #include <linux/kernel.h> +#include <asm/mach-types.h> #include <plat/clock.h> #include <mach/misc_regs.h>
@@ -688,56 +689,71 @@ static struct clk_lookup spear_clk_lookups[] = { { .dev_id = "adc", .clk = &adc_clk}, { .dev_id = "ssp-pl022.0", .clk = &ssp0_clk}, { .dev_id = "gpio", .clk = &gpio_clk}, -#if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320) - { .dev_id = "physmap-flash", .clk = &emi_clk}, -#endif -#if defined(CONFIG_MACH_SPEAR300) || defined(CONFIG_MACH_SPEAR310) || \ - defined(CONFIG_MACH_SPEAR320) - { .con_id = "fsmc", .clk = &fsmc_clk}, -#endif - -/* common clocks to spear310 and spear320 */ -#if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320) - { .dev_id = "uart1", .clk = &uart1_clk}, - { .dev_id = "uart2", .clk = &uart2_clk}, -#endif - - /* common clock to spear300 and spear320 */ -#if defined(CONFIG_MACH_SPEAR300) || defined(CONFIG_MACH_SPEAR320) - { .dev_id = "clcd", .clk = &clcd_clk}, - { .dev_id = "sdhci", .clk = &sdhci_clk}, -#endif /* CONFIG_MACH_SPEAR300 || CONFIG_MACH_SPEAR320 */ +}; - /* spear300 machine specific clock structures */ +/* array of all spear 300 clock lookups */ #ifdef CONFIG_MACH_SPEAR300 +static struct clk_lookup spear300_clk_lookups[] = { + { .dev_id ="clcd" , .clk = &clcd_clk}, + { .con_id ="fsmc" , .clk = &fsmc_clk}, { .dev_id ="gpio1" , .clk = &gpio1_clk}, { .dev_id ="keyboard" , .clk = &kbd_clk}, + { .dev_id ="sdhci" , .clk = &sdhci_clk}, +};#endif - /* spear310 machine specific clock structures */ +/* array of all spear 310 clock lookups */ #ifdef CONFIG_MACH_SPEAR310 +static struct clk_lookup spear310_clk_lookups[] = { + { .con_id ="fsmc" , .clk = &fsmc_clk}, + { .con_id ="emi" , .clk = &emi_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 - /* spear320 machine specific clock structures */ + +/* array of all spear 320 clock lookups */ #ifdef CONFIG_MACH_SPEAR320 +static struct clk_lookup spear320_clk_lookups[] = { + { .dev_id ="clcd" , .clk = &clcd_clk}, + { .con_id ="fsmc" , .clk = &fsmc_clk}, + { .dev_id ="i2c_designware.1" , .clk = &i2c1_clk}, + { .con_id ="emi" , .clk = &emi_clk}, + { .dev_id ="pwm" , .clk = &pwm_clk}, + { .dev_id ="sdhci" , .clk = &sdhci_clk}, { .dev_id ="c_can_platform.0" , .clk = &can0_clk}, { .dev_id ="c_can_platform.1" , .clk = &can1_clk}, - { .dev_id = "i2c_designware.1", .clk = &i2c1_clk}, { .dev_id ="ssp-pl022.1" , .clk = &ssp1_clk}, { .dev_id ="ssp-pl022.2" , .clk = &ssp2_clk}, - { .dev_id = "pwm", .clk = &pwm_clk}, -#endif + { .dev_id ="uart1" , .clk = &uart1_clk}, + { .dev_id ="uart2" , .clk = &uart2_clk}, }; +#endif void __init spear3xx_clk_init (void ) { - int i; +int i, cnt; +struct clk_lookup *lookups; + +if (machine_is_spear300 ()) { + cnt =ARRAY_SIZE (spear300_clk_lookups); + lookups = spear300_clk_lookups; + }else if (machine_is_spear310 ()) { + cnt =ARRAY_SIZE (spear310_clk_lookups); + lookups = spear310_clk_lookups; + }else { + cnt =ARRAY_SIZE (spear320_clk_lookups); + lookups = spear320_clk_lookups; + }for (i =0 ; i <ARRAY_SIZE (spear_clk_lookups); i++)clk_register (&spear_clk_lookups[i]); +for (i =0 ; i < cnt; i++) +clk_register (&lookups[i]); +clk_init (); }
Signature · 1 line
1.7.2.2
PATCH v6 4/11 ST SPEAr3xx: Make local shirq structures static
In reply to Viresh KumarFrom: Ryan Mallon <[email protected]>
Several structures in arch/arm/mach-spear3xx are not marked static like they should be. Fix this.
--- arch/arm/mach-spear3xx/spear300.c | 4 ++-- arch/arm/mach-spear3xx/spear310.c | 16 ++++++++-------- arch/arm/mach-spear3xx/spear320.c | 12 ++++++------ 3 files changed, 16 insertions(+), 16 deletions(-)
arch/arm/mach-spear3xx/spear300.c +2 -2
@@ -523,7 +523,7 @@ struct pmx_driver pmx_driver = { };/* spear3xx shared irq */ -struct shirq_dev_config shirq_ras1_config[] = { +static struct shirq_dev_config shirq_ras1_config[] = { { .virq =VIRQ_IT_PERS_S , .enb_mask =IT_PERS_S_IRQ_MASK ,
@@ -563,7 +563,7 @@ struct shirq_dev_config shirq_ras1_config[] = { }, }; -struct spear_shirq shirq_ras1 = { +static struct spear_shirq shirq_ras1 = { .irq =IRQ_GEN_RAS_1 , .dev_config = shirq_ras1_config, .dev_count =ARRAY_SIZE (shirq_ras1_config),
arch/arm/mach-spear3xx/spear310.c +8 -8
@@ -192,7 +192,7 @@ struct pmx_dev pmx_tdm0 = {struct pmx_driver pmx_driver;/* spear3xx shared irq */ -struct shirq_dev_config shirq_ras1_config[] = { +static struct shirq_dev_config shirq_ras1_config[] = { { .virq =VIRQ_SMII0 , .status_mask =SMII0_IRQ_MASK ,
@@ -220,7 +220,7 @@ struct shirq_dev_config shirq_ras1_config[] = { }, }; -struct spear_shirq shirq_ras1 = { +static struct spear_shirq shirq_ras1 = { .irq =IRQ_GEN_RAS_1 , .dev_config = shirq_ras1_config, .dev_count =ARRAY_SIZE (shirq_ras1_config),
@@ -232,7 +232,7 @@ struct spear_shirq shirq_ras1 = { }, }; -struct shirq_dev_config shirq_ras2_config[] = { +static struct shirq_dev_config shirq_ras2_config[] = { { .virq =VIRQ_UART1 , .status_mask =UART1_IRQ_MASK ,
@@ -251,7 +251,7 @@ struct shirq_dev_config shirq_ras2_config[] = { }, }; -struct spear_shirq shirq_ras2 = { +static struct spear_shirq shirq_ras2 = { .irq =IRQ_GEN_RAS_2 , .dev_config = shirq_ras2_config, .dev_count =ARRAY_SIZE (shirq_ras2_config),
@@ -263,14 +263,14 @@ struct spear_shirq shirq_ras2 = { }, }; -struct shirq_dev_config shirq_ras3_config[] = { +static struct shirq_dev_config shirq_ras3_config[] = { { .virq =VIRQ_EMI , .status_mask =EMI_IRQ_MASK , }, }; -struct spear_shirq shirq_ras3 = { +static struct spear_shirq shirq_ras3 = { .irq =IRQ_GEN_RAS_3 , .dev_config = shirq_ras3_config, .dev_count =ARRAY_SIZE (shirq_ras3_config),
@@ -282,7 +282,7 @@ struct spear_shirq shirq_ras3 = { }, }; -struct shirq_dev_config shirq_intrcomm_ras_config[] = { +static struct shirq_dev_config shirq_intrcomm_ras_config[] = { { .virq =VIRQ_TDM_HDLC , .status_mask =TDM_HDLC_IRQ_MASK ,
@@ -295,7 +295,7 @@ struct shirq_dev_config shirq_intrcomm_ras_config[] = { }, }; -struct spear_shirq shirq_intrcomm_ras = { +static struct spear_shirq shirq_intrcomm_ras = { .irq =IRQ_INTRCOMM_RAS_ARM , .dev_config = shirq_intrcomm_ras_config, .dev_count =ARRAY_SIZE (shirq_intrcomm_ras_config),
arch/arm/mach-spear3xx/spear320.c +6 -6
@@ -587,7 +587,7 @@ struct pmx_driver pmx_driver = { };/* spear3xx shared irq */ -struct shirq_dev_config shirq_ras1_config[] = { +static struct shirq_dev_config shirq_ras1_config[] = { { .virq =VIRQ_EMI , .status_mask =EMI_IRQ_MASK ,
@@ -603,7 +603,7 @@ struct shirq_dev_config shirq_ras1_config[] = { }, }; -struct spear_shirq shirq_ras1 = { +static struct spear_shirq shirq_ras1 = { .irq =IRQ_GEN_RAS_1 , .dev_config = shirq_ras1_config, .dev_count =ARRAY_SIZE (shirq_ras1_config),
@@ -616,7 +616,7 @@ struct spear_shirq shirq_ras1 = { }, }; -struct shirq_dev_config shirq_ras3_config[] = { +static struct shirq_dev_config shirq_ras3_config[] = { { .virq =VIRQ_PLGPIO , .enb_mask =GPIO_IRQ_MASK ,
@@ -635,7 +635,7 @@ struct shirq_dev_config shirq_ras3_config[] = { }, }; -struct spear_shirq shirq_ras3 = { +static struct spear_shirq shirq_ras3 = { .irq =IRQ_GEN_RAS_3 , .dev_config = shirq_ras3_config, .dev_count =ARRAY_SIZE (shirq_ras3_config),
@@ -649,7 +649,7 @@ struct spear_shirq shirq_ras3 = { }, }; -struct shirq_dev_config shirq_intrcomm_ras_config[] = { +static struct shirq_dev_config shirq_intrcomm_ras_config[] = { { .virq =VIRQ_CANU , .status_mask =CAN_U_IRQ_MASK ,
@@ -697,7 +697,7 @@ struct shirq_dev_config shirq_intrcomm_ras_config[] = { }, }; -struct spear_shirq shirq_intrcomm_ras = { +static struct spear_shirq shirq_intrcomm_ras = { .irq =IRQ_INTRCOMM_RAS_ARM , .dev_config = shirq_intrcomm_ras_config, .dev_count =ARRAY_SIZE (shirq_intrcomm_ras_config),
Signature · 1 line
1.7.2.2
PATCH v6 5/11 ST SPEAR3xx: Rename register/irq defines to remove naming conflicts
In reply to Viresh KumarFrom: Ryan Mallon <[email protected]>
Prefix register and irq defintions to remove naming conflicts between the three SPEAr3xx platforms.
--- arch/arm/mach-spear3xx/include/mach/generic.h | 4 +- arch/arm/mach-spear3xx/include/mach/irqs.h | 206 ++++++++++++------------ arch/arm/mach-spear3xx/include/mach/spear300.h | 26 ++-- arch/arm/mach-spear3xx/include/mach/spear310.h | 44 +++--- arch/arm/mach-spear3xx/include/mach/spear320.h | 48 +++--- arch/arm/mach-spear3xx/spear300.c | 66 ++++---- arch/arm/mach-spear3xx/spear310.c | 92 ++++++------ arch/arm/mach-spear3xx/spear320.c | 134 ++++++++-------- arch/arm/mach-spear3xx/spear3xx.c | 6 +- 9 files changed, 314 insertions(+), 312 deletions(-)
arch/arm/mach-spear3xx/include/mach/generic.h +2 -2
@@ -27,8 +27,8 @@* Following GPT channels will be used as clock source and clockevent */ #define SPEAR_GPT0_BASE SPEAR3XX_ML1_TMR_BASE -#define SPEAR_GPT0_CHAN0_IRQ IRQ_CPU_GPT1_1 -#define SPEAR_GPT0_CHAN1_IRQ IRQ_CPU_GPT1_2 +#define SPEAR_GPT0_CHAN0_IRQ SPEAR3XX_IRQ_CPU_GPT1_1 +#define SPEAR_GPT0_CHAN1_IRQ SPEAR3XX_IRQ_CPU_GPT1_2/* Add spear3xx family device structure declarations here */ extern struct amba_device gpio_device;
arch/arm/mach-spear3xx/include/mach/irqs.h +104 -102
242 lines not on this page · raw message
arch/arm/mach-spear3xx/include/mach/spear300.h +13 -13
@@ -20,19 +20,19 @@#define SPEAR300_TELECOM_BASE UL(0x50000000)/* Interrupt registers offsets and masks */ -#define INT_ENB_MASK_REG 0x54 -#define INT_STS_MASK_REG 0x58 -#define IT_PERS_S_IRQ_MASK (1 << 0) -#define IT_CHANGE_S_IRQ_MASK (1 << 1) -#define I2S_IRQ_MASK (1 << 2) -#define TDM_IRQ_MASK (1 << 3) -#define CAMERA_L_IRQ_MASK (1 << 4) -#define CAMERA_F_IRQ_MASK (1 << 5) -#define CAMERA_V_IRQ_MASK (1 << 6) -#define KEYBOARD_IRQ_MASK (1 << 7) -#define GPIO1_IRQ_MASK (1 << 8) - -#define SHIRQ_RAS1_MASK 0x1FF +#define SPEAR300_INT_ENB_MASK_REG 0x54 +#define SPEAR300_INT_STS_MASK_REG 0x58 +#define SPEAR300_IT_PERS_S_IRQ_MASK (1 << 0) +#define SPEAR300_IT_CHANGE_S_IRQ_MASK (1 << 1) +#define SPEAR300_I2S_IRQ_MASK (1 << 2) +#define SPEAR300_TDM_IRQ_MASK (1 << 3) +#define SPEAR300_CAMERA_L_IRQ_MASK (1 << 4) +#define SPEAR300_CAMERA_F_IRQ_MASK (1 << 5) +#define SPEAR300_CAMERA_V_IRQ_MASK (1 << 6) +#define SPEAR300_KEYBOARD_IRQ_MASK (1 << 7) +#define SPEAR300_GPIO1_IRQ_MASK (1 << 8) + +#define SPEAR300_SHIRQ_RAS1_MASK 0x1FF#define SPEAR300_CLCD_BASE UL(0x60000000)#define SPEAR300_SDHCI_BASE UL(0x70000000)
arch/arm/mach-spear3xx/include/mach/spear310.h +22 -22
51 lines not on this page · raw message
arch/arm/mach-spear3xx/include/mach/spear320.h +24 -24
55 lines not on this page · raw message
arch/arm/mach-spear3xx/spear300.c +33 -33
99 lines not on this page · raw message
arch/arm/mach-spear3xx/spear310.c +46 -46
161 lines not on this page · raw message
arch/arm/mach-spear3xx/spear320.c +67 -67
190 lines not on this page · raw message
arch/arm/mach-spear3xx/spear3xx.c +3 -3
@@ -25,7 +25,7 @@/* gpio device registration */ static struct pl061_platform_data gpio_plat_data = { .gpio_base =0 , - .irq_base =SPEAR_GPIO_INT_BASE , + .irq_base =SPEAR3XX_GPIO_INT_BASE , };struct amba_device gpio_device = {
@@ -38,7 +38,7 @@ struct amba_device gpio_device = { .end = SPEAR3XX_ICM3_GPIO_BASE + SZ_4K - 1, .flags = IORESOURCE_MEM, }, - .irq = {IRQ_BASIC_GPIO, NO_IRQ}, + .irq = {SPEAR3XX_IRQ_BASIC_GPIO, NO_IRQ}, };/* uart device registration */
@@ -51,7 +51,7 @@ struct amba_device uart_device = { .end = SPEAR3XX_ICM1_UART_BASE + SZ_4K - 1, .flags = IORESOURCE_MEM, }, - .irq = {IRQ_UART, NO_IRQ}, + .irq = {SPEAR3XX_IRQ_UART, NO_IRQ}, };/* Do spear3xx familiy common initialization part here */
Signature · 1 line
1.7.2.2
PATCH v6 6/11 ST SPEAr3xx: Rework pmx_dev code to remove conflicts
In reply to Viresh KumarFrom: Ryan Mallon <[email protected]>
Prefix the pmx_devs to remove naming conflicts between the three SPEAr3xx platforms. Also make pmx_driver static to each platform and rework the init code to pass the devices rather than export the pmx_driver structure.
--- arch/arm/mach-spear3xx/include/mach/generic.h | 193 +++++++++++++------------ arch/arm/mach-spear3xx/spear300.c | 66 +++++---- arch/arm/mach-spear3xx/spear300_evb.c | 26 ++-- arch/arm/mach-spear3xx/spear310.c | 28 ++-- arch/arm/mach-spear3xx/spear310_evb.c | 41 +++--- arch/arm/mach-spear3xx/spear320.c | 64 +++++---- arch/arm/mach-spear3xx/spear320_evb.c | 36 ++--- arch/arm/mach-spear3xx/spear3xx.c | 60 ++++---- 8 files changed, 257 insertions(+), 257 deletions(-)
arch/arm/mach-spear3xx/include/mach/generic.h +97 -96
@@ -61,85 +61,84 @@ void spear3xx_pmx_init_addr(struct pmx_driver *driver, unsigned int addr);#define PMX_TIMER_1_2_MASK (1 << 0)/* pad mux devices */ -extern struct pmx_dev pmx_firda; -extern struct pmx_dev pmx_i2c; -extern struct pmx_dev pmx_ssp_cs; -extern struct pmx_dev pmx_ssp; -extern struct pmx_dev pmx_mii; -extern struct pmx_dev pmx_gpio_pin0; -extern struct pmx_dev pmx_gpio_pin1; -extern struct pmx_dev pmx_gpio_pin2; -extern struct pmx_dev pmx_gpio_pin3; -extern struct pmx_dev pmx_gpio_pin4; -extern struct pmx_dev pmx_gpio_pin5; -extern struct pmx_dev pmx_uart0_modem; -extern struct pmx_dev pmx_uart0; -extern struct pmx_dev pmx_timer_3_4; -extern struct pmx_dev pmx_timer_1_2; +extern struct pmx_dev spear3xx_pmx_firda; +extern struct pmx_dev spear3xx_pmx_i2c; +extern struct pmx_dev spear3xx_pmx_ssp_cs; +extern struct pmx_dev spear3xx_pmx_ssp; +extern struct pmx_dev spear3xx_pmx_mii; +extern struct pmx_dev spear3xx_pmx_gpio_pin0; +extern struct pmx_dev spear3xx_pmx_gpio_pin1; +extern struct pmx_dev spear3xx_pmx_gpio_pin2; +extern struct pmx_dev spear3xx_pmx_gpio_pin3; +extern struct pmx_dev spear3xx_pmx_gpio_pin4; +extern struct pmx_dev spear3xx_pmx_gpio_pin5; +extern struct pmx_dev spear3xx_pmx_uart0_modem; +extern struct pmx_dev spear3xx_pmx_uart0; +extern struct pmx_dev spear3xx_pmx_timer_3_4; +extern struct pmx_dev spear3xx_pmx_timer_1_2;#if defined(CONFIG_MACH_SPEAR310 ) || defined(CONFIG_MACH_SPEAR320 )/* padmux plgpio devices */ -extern struct pmx_dev pmx_plgpio_0_1; -extern struct pmx_dev pmx_plgpio_2_3; -extern struct pmx_dev pmx_plgpio_4_5; -extern struct pmx_dev pmx_plgpio_6_9; -extern struct pmx_dev pmx_plgpio_10_27; -extern struct pmx_dev pmx_plgpio_28; -extern struct pmx_dev pmx_plgpio_29; -extern struct pmx_dev pmx_plgpio_30; -extern struct pmx_dev pmx_plgpio_31; -extern struct pmx_dev pmx_plgpio_32; -extern struct pmx_dev pmx_plgpio_33; -extern struct pmx_dev pmx_plgpio_34_36; -extern struct pmx_dev pmx_plgpio_37_42; -extern struct pmx_dev pmx_plgpio_43_44_47_48; -extern struct pmx_dev pmx_plgpio_45_46_49_50; +extern struct pmx_dev spear3xx_pmx_plgpio_0_1; +extern struct pmx_dev spear3xx_pmx_plgpio_2_3; +extern struct pmx_dev spear3xx_pmx_plgpio_4_5; +extern struct pmx_dev spear3xx_pmx_plgpio_6_9; +extern struct pmx_dev spear3xx_pmx_plgpio_10_27; +extern struct pmx_dev spear3xx_pmx_plgpio_28; +extern struct pmx_dev spear3xx_pmx_plgpio_29; +extern struct pmx_dev spear3xx_pmx_plgpio_30; +extern struct pmx_dev spear3xx_pmx_plgpio_31; +extern struct pmx_dev spear3xx_pmx_plgpio_32; +extern struct pmx_dev spear3xx_pmx_plgpio_33; +extern struct pmx_dev spear3xx_pmx_plgpio_34_36; +extern struct pmx_dev spear3xx_pmx_plgpio_37_42; +extern struct pmx_dev spear3xx_pmx_plgpio_43_44_47_48; +extern struct pmx_dev spear3xx_pmx_plgpio_45_46_49_50;#endif -extern struct pmx_driver pmx_driver; -/* spear300 declarations */ #ifdef CONFIG_MACH_SPEAR300 /* Add spear300 machine device structure declarations here */ extern struct amba_device gpio1_device;/* pad mux modes */ -extern struct pmx_mode nand_mode; -extern struct pmx_mode nor_mode; -extern struct pmx_mode photo_frame_mode; -extern struct pmx_mode lend_ip_phone_mode; -extern struct pmx_mode hend_ip_phone_mode; -extern struct pmx_mode lend_wifi_phone_mode; -extern struct pmx_mode hend_wifi_phone_mode; -extern struct pmx_mode ata_pabx_wi2s_mode; -extern struct pmx_mode ata_pabx_i2s_mode; -extern struct pmx_mode caml_lcdw_mode; -extern struct pmx_mode camu_lcd_mode; -extern struct pmx_mode camu_wlcd_mode; -extern struct pmx_mode caml_lcd_mode; +extern struct pmx_mode spear300_nand_mode; +extern struct pmx_mode spear300_nor_mode; +extern struct pmx_mode spear300_photo_frame_mode; +extern struct pmx_mode spear300_lend_ip_phone_mode; +extern struct pmx_mode spear300_hend_ip_phone_mode; +extern struct pmx_mode spear300_lend_wifi_phone_mode; +extern struct pmx_mode spear300_hend_wifi_phone_mode; +extern struct pmx_mode spear300_ata_pabx_wi2s_mode; +extern struct pmx_mode spear300_ata_pabx_i2s_mode; +extern struct pmx_mode spear300_caml_lcdw_mode; +extern struct pmx_mode spear300_camu_lcd_mode; +extern struct pmx_mode spear300_camu_wlcd_mode; +extern struct pmx_mode spear300_caml_lcd_mode;/* pad mux devices */ -extern struct pmx_dev pmx_fsmc_2_chips; -extern struct pmx_dev pmx_fsmc_4_chips; -extern struct pmx_dev pmx_keyboard; -extern struct pmx_dev pmx_clcd; -extern struct pmx_dev pmx_telecom_gpio; -extern struct pmx_dev pmx_telecom_tdm; -extern struct pmx_dev pmx_telecom_spi_cs_i2c_clk; -extern struct pmx_dev pmx_telecom_camera; -extern struct pmx_dev pmx_telecom_dac; -extern struct pmx_dev pmx_telecom_i2s; -extern struct pmx_dev pmx_telecom_boot_pins; -extern struct pmx_dev pmx_telecom_sdhci_4bit; -extern struct pmx_dev pmx_telecom_sdhci_8bit; -extern struct pmx_dev pmx_gpio1; +extern struct pmx_dev spear300_pmx_fsmc_2_chips; +extern struct pmx_dev spear300_pmx_fsmc_4_chips; +extern struct pmx_dev spear300_pmx_keyboard; +extern struct pmx_dev spear300_pmx_clcd; +extern struct pmx_dev spear300_pmx_telecom_gpio; +extern struct pmx_dev spear300_pmx_telecom_tdm; +extern struct pmx_dev spear300_pmx_telecom_spi_cs_i2c_clk; +extern struct pmx_dev spear300_pmx_telecom_camera; +extern struct pmx_dev spear300_pmx_telecom_dac; +extern struct pmx_dev spear300_pmx_telecom_i2s; +extern struct pmx_dev spear300_pmx_telecom_boot_pins; +extern struct pmx_dev spear300_pmx_telecom_sdhci_4bit; +extern struct pmx_dev spear300_pmx_telecom_sdhci_8bit; +extern struct pmx_dev spear300_pmx_gpio1;/* pad multiplexing support */ #define SPEAR300_PAD_MUX_CONFIG_REG 0x99000000#define SPEAR300_MODE_CONFIG_REG 0x99000004/* Add spear300 machine function declarations here */ -void __init spear300_init (void ); +void __init spear300_init (struct pmx_mode *pmx_mode,struct pmx_dev **pmx_devs, +u8 pmx_dev_count);#endif /* CONFIG_MACH_SPEAR300 */
@@ -148,18 +147,19 @@ void __init spear300_init(void);/* Add spear310 machine device structure declarations here */ /* pad mux devices */ -extern struct pmx_dev pmx_emi_cs_0_1_4_5; -extern struct pmx_dev pmx_emi_cs_2_3; -extern struct pmx_dev pmx_uart1; -extern struct pmx_dev pmx_uart2; -extern struct pmx_dev pmx_uart3_4_5; -extern struct pmx_dev pmx_fsmc; -extern struct pmx_dev pmx_rs485_0_1; -extern struct pmx_dev pmx_tdm0; +extern struct pmx_dev spear310_pmx_emi_cs_0_1_4_5; +extern struct pmx_dev spear310_pmx_emi_cs_2_3; +extern struct pmx_dev spear310_pmx_uart1; +extern struct pmx_dev spear310_pmx_uart2; +extern struct pmx_dev spear310_pmx_uart3_4_5; +extern struct pmx_dev spear310_pmx_fsmc; +extern struct pmx_dev spear310_pmx_rs485_0_1; +extern struct pmx_dev spear310_pmx_tdm0;#define SPEAR310_PAD_MUX_CONFIG_REG 0xB4000008/* Add spear310 machine function declarations here */ -void __init spear310_init (void ); +void __init spear310_init (struct pmx_mode *pmx_mode,struct pmx_dev **pmx_devs, +u8 pmx_dev_count);#endif /* CONFIG_MACH_SPEAR310 */
@@ -168,41 +168,42 @@ void __init spear310_init(void);/* Add spear320 machine device structure declarations here */ /* pad mux modes */ -extern struct pmx_mode auto_net_smii_mode; -extern struct pmx_mode auto_net_mii_mode; -extern struct pmx_mode auto_exp_mode; -extern struct pmx_mode small_printers_mode; +extern struct pmx_mode spear320_auto_net_smii_mode; +extern struct pmx_mode spear320_auto_net_mii_mode; +extern struct pmx_mode spear320_auto_exp_mode; +extern struct pmx_mode spear320_small_printers_mode;/* pad mux devices */ -extern struct pmx_dev pmx_clcd; -extern struct pmx_dev pmx_emi; -extern struct pmx_dev pmx_fsmc; -extern struct pmx_dev pmx_spp; -extern struct pmx_dev pmx_sdhci; -extern struct pmx_dev pmx_i2s; -extern struct pmx_dev pmx_uart1; -extern struct pmx_dev pmx_uart1_modem; -extern struct pmx_dev pmx_uart2; -extern struct pmx_dev pmx_touchscreen; -extern struct pmx_dev pmx_can; -extern struct pmx_dev pmx_sdhci_led; -extern struct pmx_dev pmx_pwm0; -extern struct pmx_dev pmx_pwm1; -extern struct pmx_dev pmx_pwm2; -extern struct pmx_dev pmx_pwm3; -extern struct pmx_dev pmx_ssp1; -extern struct pmx_dev pmx_ssp2; -extern struct pmx_dev pmx_mii1; -extern struct pmx_dev pmx_smii0; -extern struct pmx_dev pmx_smii1; -extern struct pmx_dev pmx_i2c1; +extern struct pmx_dev spear320_pmx_clcd; +extern struct pmx_dev spear320_pmx_emi; +extern struct pmx_dev spear320_pmx_fsmc; +extern struct pmx_dev spear320_pmx_spp; +extern struct pmx_dev spear320_pmx_sdhci; +extern struct pmx_dev spear320_pmx_i2s; +extern struct pmx_dev spear320_pmx_uart1; +extern struct pmx_dev spear320_pmx_uart1_modem; +extern struct pmx_dev spear320_pmx_uart2; +extern struct pmx_dev spear320_pmx_touchscreen; +extern struct pmx_dev spear320_pmx_can; +extern struct pmx_dev spear320_pmx_sdhci_led; +extern struct pmx_dev spear320_pmx_pwm0; +extern struct pmx_dev spear320_pmx_pwm1; +extern struct pmx_dev spear320_pmx_pwm2; +extern struct pmx_dev spear320_pmx_pwm3; +extern struct pmx_dev spear320_pmx_ssp1; +extern struct pmx_dev spear320_pmx_ssp2; +extern struct pmx_dev spear320_pmx_mii1; +extern struct pmx_dev spear320_pmx_smii0; +extern struct pmx_dev spear320_pmx_smii1; +extern struct pmx_dev spear320_pmx_i2c1;/* pad multiplexing support */ #define SPEAR320_PAD_MUX_CONFIG_REG 0xB300000C#define SPEAR320_MODE_CONFIG_REG 0xB3000010/* Add spear320 machine function declarations here */ -void __init spear320_init (void ); +void __init spear320_init (struct pmx_mode *pmx_mode,struct pmx_dev **pmx_devs, +u8 pmx_dev_count);#endif /* CONFIG_MACH_SPEAR320 */
arch/arm/mach-spear3xx/spear300.c +35 -31
236 lines not on this page · raw message
arch/arm/mach-spear3xx/spear300_evb.c +11 -15
@@ -19,17 +19,17 @@/* padmux devices to enable */ static struct pmx_dev *pmx_devs[] = {/* spear3xx specific devices */ - &pmx_i2c, - &pmx_ssp_cs, - &pmx_ssp, - &pmx_mii, - &pmx_uart0, + &spear3xx_pmx_i2c, + &spear3xx_pmx_ssp_cs, + &spear3xx_pmx_ssp, + &spear3xx_pmx_mii, + &spear3xx_pmx_uart0,/* spear300 specific devices */ - &pmx_fsmc_2_chips, - &pmx_clcd, - &pmx_telecom_sdhci_4bit, - &pmx_gpio1, + &spear300_pmx_fsmc_2_chips, + &spear300_pmx_clcd, + &spear300_pmx_telecom_sdhci_4bit, + &spear300_pmx_gpio1, };static struct amba_device *amba_devs[]__initdata = {
@@ -51,13 +51,9 @@ static void __init spear300_evb_init(void) {unsigned int i; -/* padmux initialization, must be done before spear300_init */ - pmx_driver.mode = &photo_frame_mode; - pmx_driver.devs = pmx_devs; - pmx_driver.devs_count =ARRAY_SIZE (pmx_devs); -/* call spear300 machine init function */ -spear300_init (); +spear300_init (&spear300_photo_frame_mode, pmx_devs, +ARRAY_SIZE (pmx_devs));/* Add Platform Devices */ platform_add_devices (plat_devs,ARRAY_SIZE (plat_devs));
arch/arm/mach-spear3xx/spear310.c +16 -12
@@ -35,7 +35,7 @@ static struct pmx_dev_mode pmx_emi_cs_0_1_4_5_modes[] = { }, }; -struct pmx_dev pmx_emi_cs_0_1_4_5 = { +struct pmx_dev spear310_pmx_emi_cs_0_1_4_5 = { .name ="emi_cs_0_1_4_5" , .modes = pmx_emi_cs_0_1_4_5_modes, .mode_count =ARRAY_SIZE (pmx_emi_cs_0_1_4_5_modes),
@@ -56,7 +56,7 @@ static struct pmx_dev_mode pmx_emi_cs_2_3_modes[] = { }, }; -struct pmx_dev pmx_emi_cs_2_3 = { +struct pmx_dev spear310_pmx_emi_cs_2_3 = { .name ="emi_cs_2_3" , .modes = pmx_emi_cs_2_3_modes, .mode_count =ARRAY_SIZE (pmx_emi_cs_2_3_modes),
@@ -77,7 +77,7 @@ static struct pmx_dev_mode pmx_uart1_modes[] = { }, }; -struct pmx_dev pmx_uart1 = { +struct pmx_dev spear310_pmx_uart1 = { .name ="uart1" , .modes = pmx_uart1_modes, .mode_count =ARRAY_SIZE (pmx_uart1_modes),
@@ -98,7 +98,7 @@ static struct pmx_dev_mode pmx_uart2_modes[] = { }, }; -struct pmx_dev pmx_uart2 = { +struct pmx_dev spear310_pmx_uart2 = { .name ="uart2" , .modes = pmx_uart2_modes, .mode_count =ARRAY_SIZE (pmx_uart2_modes),
@@ -119,7 +119,7 @@ static struct pmx_dev_mode pmx_uart3_4_5_modes[] = { }, }; -struct pmx_dev pmx_uart3_4_5 = { +struct pmx_dev spear310_pmx_uart3_4_5 = { .name ="uart3_4_5" , .modes = pmx_uart3_4_5_modes, .mode_count =ARRAY_SIZE (pmx_uart3_4_5_modes),
@@ -140,7 +140,7 @@ static struct pmx_dev_mode pmx_fsmc_modes[] = { }, }; -struct pmx_dev pmx_fsmc = { +struct pmx_dev spear310_pmx_fsmc = { .name ="fsmc" , .modes = pmx_fsmc_modes, .mode_count =ARRAY_SIZE (pmx_fsmc_modes),
@@ -161,7 +161,7 @@ static struct pmx_dev_mode pmx_rs485_0_1_modes[] = { }, }; -struct pmx_dev pmx_rs485_0_1 = { +struct pmx_dev spear310_pmx_rs485_0_1 = { .name ="rs485_0_1" , .modes = pmx_rs485_0_1_modes, .mode_count =ARRAY_SIZE (pmx_rs485_0_1_modes),
@@ -182,14 +182,14 @@ static struct pmx_dev_mode pmx_tdm0_modes[] = { }, }; -struct pmx_dev pmx_tdm0 = { +struct pmx_dev spear310_pmx_tdm0 = { .name ="tdm0" , .modes = pmx_tdm0_modes, .mode_count =ARRAY_SIZE (pmx_tdm0_modes), };/* pmx driver structure */ -struct pmx_driver pmx_driver; +static struct pmx_driver pmx_driver;/* spear3xx shared irq */ static struct shirq_dev_config shirq_ras1_config[] = {
@@ -310,7 +310,8 @@ static struct spear_shirq shirq_intrcomm_ras = {/* Add spear310 specific devices here */ /* spear310 routines */ -void __init spear310_init (void ) +void __init spear310_init (struct pmx_mode *pmx_mode,struct pmx_dev **pmx_devs, +u8 pmx_dev_count) {void __iomem *base;int ret =0 ;
@@ -346,10 +347,13 @@ void __init spear310_init(void)printk (KERN_ERR "Error registering Shared IRQ 4\n" ); } +/* pmx initialization */ + pmx_driver.mode = pmx_mode; + pmx_driver.devs = pmx_devs; + pmx_driver.devs_count = pmx_dev_count; +/* This fixes addresses of all pmx devices for spear310 */ spear3xx_pmx_init_addr (&pmx_driver,SPEAR310_PAD_MUX_CONFIG_REG ); - -/* pmx initialization */ ret =pmx_register (&pmx_driver);if (ret)pr_err ("padmux: registeration failed. err no: %d\n" , ret);
arch/arm/mach-spear3xx/spear310_evb.c +18 -23
56 lines not on this page · raw message
arch/arm/mach-spear3xx/spear320.c +34 -30
237 lines not on this page · raw message
arch/arm/mach-spear3xx/spear320_evb.c +16 -20
@@ -19,22 +19,22 @@/* padmux devices to enable */ static struct pmx_dev *pmx_devs[] = {/* spear3xx specific devices */ - &pmx_i2c, - &pmx_ssp, - &pmx_mii, - &pmx_uart0, + &spear3xx_pmx_i2c, + &spear3xx_pmx_ssp, + &spear3xx_pmx_mii, + &spear3xx_pmx_uart0,/* spear320 specific devices */ - &pmx_fsmc, - &pmx_sdhci, - &pmx_i2s, - &pmx_uart1, - &pmx_uart2, - &pmx_can, - &pmx_pwm0, - &pmx_pwm1, - &pmx_pwm2, - &pmx_mii1, + &spear320_pmx_fsmc, + &spear320_pmx_sdhci, + &spear320_pmx_i2s, + &spear320_pmx_uart1, + &spear320_pmx_uart2, + &spear320_pmx_can, + &spear320_pmx_pwm0, + &spear320_pmx_pwm1, + &spear320_pmx_pwm2, + &spear320_pmx_mii1, };static struct amba_device *amba_devs[]__initdata = {
@@ -55,13 +55,9 @@ static void __init spear320_evb_init(void) {unsigned int i; -/* padmux initialization, must be done before spear320_init */ - pmx_driver.mode = &auto_net_mii_mode; - pmx_driver.devs = pmx_devs; - pmx_driver.devs_count =ARRAY_SIZE (pmx_devs); -/* call spear320 machine init function */ -spear320_init (); +spear320_init (&spear320_auto_net_mii_mode, pmx_devs, +ARRAY_SIZE (pmx_devs));/* Add Platform Devices */ platform_add_devices (plat_devs,ARRAY_SIZE (plat_devs));
arch/arm/mach-spear3xx/spear3xx.c +30 -30
240 lines not on this page · raw message
Signature · 1 line
1.7.2.2
PATCH v6 7/11 ST SPEAr3xx: Appending spear3** with global device structures
In reply to Viresh Kumar--- arch/arm/mach-spear3xx/include/mach/generic.h | 6 +++--- arch/arm/mach-spear3xx/spear300.c | 2 +- arch/arm/mach-spear3xx/spear300_evb.c | 6 +++--- arch/arm/mach-spear3xx/spear310_evb.c | 4 ++-- arch/arm/mach-spear3xx/spear320_evb.c | 4 ++-- arch/arm/mach-spear3xx/spear3xx.c | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-)
arch/arm/mach-spear3xx/include/mach/generic.h +3 -3
@@ -31,8 +31,8 @@#define SPEAR_GPT0_CHAN1_IRQ SPEAR3XX_IRQ_CPU_GPT1_2/* Add spear3xx family device structure declarations here */ -extern struct amba_device gpio_device; -extern struct amba_device uart_device; +extern struct amba_device spear3xx_gpio_device; +extern struct amba_device spear3xx_uart_device;extern struct sys_timer spear3xx_timer;/* Add spear3xx family function declarations here */
@@ -99,7 +99,7 @@ extern struct pmx_dev spear3xx_pmx_plgpio_45_46_49_50;/* spear300 declarations */ #ifdef CONFIG_MACH_SPEAR300 /* Add spear300 machine device structure declarations here */ -extern struct amba_device gpio1_device; +extern struct amba_device spear300_gpio1_device;/* pad mux modes */ extern struct pmx_mode spear300_nand_mode;
arch/arm/mach-spear3xx/spear300.c +1 -1
@@ -582,7 +582,7 @@ static struct pl061_platform_data gpio1_plat_data = { .irq_base = SPEAR300_GPIO1_INT_BASE, }; -struct amba_device gpio1_device = { +struct amba_device spear300_gpio1_device = { .dev = { .init_name ="gpio1" , .platform_data = &gpio1_plat_data,
arch/arm/mach-spear3xx/spear300_evb.c +3 -3
@@ -34,11 +34,11 @@ static struct pmx_dev *pmx_devs[] = {static struct amba_device *amba_devs[]__initdata = {/* spear3xx specific devices */ - &gpio_device, - &uart_device, + &spear3xx_gpio_device, + &spear3xx_uart_device,/* spear300 specific devices */ - &gpio1_device, + &spear300_gpio1_device, };static struct platform_device *plat_devs[]__initdata = {
arch/arm/mach-spear3xx/spear310_evb.c +2 -2
@@ -42,8 +42,8 @@ static struct pmx_dev *pmx_devs[] = {static struct amba_device *amba_devs[]__initdata = {/* spear3xx specific devices */ - &gpio_device, - &uart_device, + &spear3xx_gpio_device, + &spear3xx_uart_device,/* spear310 specific devices */ };
arch/arm/mach-spear3xx/spear320_evb.c +2 -2
@@ -39,8 +39,8 @@ static struct pmx_dev *pmx_devs[] = {static struct amba_device *amba_devs[]__initdata = {/* spear3xx specific devices */ - &gpio_device, - &uart_device, + &spear3xx_gpio_device, + &spear3xx_uart_device,/* spear320 specific devices */ };
arch/arm/mach-spear3xx/spear3xx.c +2 -2
@@ -28,7 +28,7 @@ static struct pl061_platform_data gpio_plat_data = { .irq_base = SPEAR3XX_GPIO_INT_BASE, }; -struct amba_device gpio_device = { +struct amba_device spear3xx_gpio_device = { .dev = { .init_name ="gpio" , .platform_data = &gpio_plat_data,
@@ -42,7 +42,7 @@ struct amba_device gpio_device = { };/* uart device registration */ -struct amba_device uart_device = { +struct amba_device spear3xx_uart_device = { .dev = { .init_name ="uart" , },
Signature · 1 line
1.7.2.2
PATCH v6 8/11 ST SPEAr3xx: Rework KConfig to allow all boards to be compiled in
In reply to Viresh KumarFrom: Ryan Mallon <[email protected]>
Now that all three SPEAr3xx platforms can be built into one kernel, rework KConfig to allow this. Move everything into one KConfig file while we are here.
--- arch/arm/mach-spear3xx/Kconfig | 30 ++++++++++++++++++++---------- arch/arm/mach-spear3xx/Kconfig300 | 17 ----------------- arch/arm/mach-spear3xx/Kconfig310 | 17 ----------------- arch/arm/mach-spear3xx/Kconfig320 | 17 ----------------- 4 files changed, 20 insertions(+), 61 deletions(-) delete mode 100644 arch/arm/mach-spear3xx/Kconfig300 delete mode 100644 arch/arm/mach-spear3xx/Kconfig310 delete mode 100644 arch/arm/mach-spear3xx/Kconfig320
arch/arm/mach-spear3xx/Kconfig +20 -10
@@ -4,9 +4,26 @@ if ARCH_SPEAR3XX -choice - prompt "SPEAr3XX Family" - default MACH_SPEAR300 +menu "SPEAr3xx Implementations" +config BOARD_SPEAR300_EVB + bool "SPEAr300 Evaluation Board" + select MACH_SPEAR300 + help + Supports ST SPEAr300 Evaluation Board + +config BOARD_SPEAR310_EVB + bool "SPEAr310 Evaluation Board" + select MACH_SPEAR310 + help + Supports ST SPEAr310 Evaluation Board + +config BOARD_SPEAR320_EVB + bool "SPEAr320 Evaluation Board" + select MACH_SPEAR320 + help + Supports ST SPEAr320 Evaluation Board + +endmenu config MACH_SPEAR300 bool "SPEAr300"
@@ -23,11 +40,4 @@ config MACH_SPEAR320 help Supports ST SPEAr320 Machine -endchoice - -# Adding SPEAr3XX machine specific configuration files -source "arch/arm/mach-spear3xx/Kconfig300" -source "arch/arm/mach-spear3xx/Kconfig310" -source "arch/arm/mach-spear3xx/Kconfig320" - endif #ARCH_SPEAR3XX
arch/arm/mach-spear3xx/Kconfig300 deleted +0 -17
@@ -1,17 +0,0 @@ -# -# SPEAr300 machine configuration file -# - -if MACH_SPEAR300 - -choice - prompt "SPEAr300 Boards" - default BOARD_SPEAR300_EVB - -config BOARD_SPEAR300_EVB - bool "SPEAr300 Evaluation Board" - help - Supports ST SPEAr300 Evaluation Board -endchoice - -endif #MACH_SPEAR300
arch/arm/mach-spear3xx/Kconfig310 deleted +0 -17
@@ -1,17 +0,0 @@ -# -# SPEAr310 machine configuration file -# - -if MACH_SPEAR310 - -choice - prompt "SPEAr310 Boards" - default BOARD_SPEAR310_EVB - -config BOARD_SPEAR310_EVB - bool "SPEAr310 Evaluation Board" - help - Supports ST SPEAr310 Evaluation Board -endchoice - -endif #MACH_SPEAR310
arch/arm/mach-spear3xx/Kconfig320 deleted +0 -17
@@ -1,17 +0,0 @@ -# -# SPEAr320 machine configuration file -# - -if MACH_SPEAR320 - -choice - prompt "SPEAr320 Boards" - default BOARD_SPEAR320_EVB - -config BOARD_SPEAR320_EVB - bool "SPEAr320 Evaluation Board" - help - Supports ST SPEAr320 Evaluation Board -endchoice - -endif #MACH_SPEAR320
Signature · 1 line
1.7.2.2
PATCH v6 9/11 ST SPEAr3xx: Replace defconfigs with single unified defconfig
In reply to Viresh KumarFrom: Ryan Mallon <[email protected]>
We only need one defconfig for SPEAr3xx now since we can build all three boards into one kernel.
---
arch/arm/configs/spear310_defconfig | 52 --------------------
arch/arm/configs/spear320_defconfig | 52 --------------------
.../{spear300_defconfig => spear3xx_defconfig} | 4 +-
3 files changed, 3 insertions(+), 105 deletions(-)
delete mode 100644 arch/arm/configs/spear310_defconfig
delete mode 100644 arch/arm/configs/spear320_defconfig
rename arch/arm/configs/{spear300_defconfig => spear3xx_defconfig} (93%)arch/arm/configs/spear310_defconfig deleted +0 -52
@@ -1,52 +0,0 @@ -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_PLAT_SPEAR=y -CONFIG_MACH_SPEAR310=y -CONFIG_BINFMT_MISC=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_INPUT_FF_MEMLESS=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE 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_GPIO_SYSFS=y -CONFIG_GPIO_PL061=y -# CONFIG_HWMON is not set -# CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_AUTOFS4_FS=m -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 -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/spear320_defconfig deleted +0 -52
52 lines not on this page · raw message
arch/arm/configs/spear3xx_defconfig renamed from arch/arm/configs/spear300_defconfig +3 -1
@@ -7,6 +7,9 @@ CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODVERSIONS=y CONFIG_PLAT_SPEAR=y +CONFIG_BOARD_SPEAR300_EVB=y +CONFIG_BOARD_SPEAR310_EVB=y +CONFIG_BOARD_SPEAR320_EVB=y CONFIG_BINFMT_MISC=y CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_BLK_DEV_RAM=y
@@ -24,7 +27,6 @@ CONFIG_MAX_RAW_DEVS=8192 CONFIG_GPIO_SYSFS=y CONFIG_GPIO_PL061=y # CONFIG_HWMON is not set -# CONFIG_VGA_CONSOLE is not set # CONFIG_HID_SUPPORT is not set # CONFIG_USB_SUPPORT is not set CONFIG_EXT2_FS=y
Signature · 1 line
1.7.2.2
PATCH v6 10/11 ST SPEAr6xx: Rework Kconfig for single image solution
In reply to Viresh Kumar--- arch/arm/mach-spear6xx/Kconfig | 15 ++++++++------- arch/arm/mach-spear6xx/Kconfig600 | 17 ----------------- 2 files changed, 8 insertions(+), 24 deletions(-) delete mode 100644 arch/arm/mach-spear6xx/Kconfig600
arch/arm/mach-spear6xx/Kconfig +8 -7
@@ -4,17 +4,18 @@ if ARCH_SPEAR6XX -choice - prompt "SPEAr6XX Family" - default MACH_SPEAR600 +menu "SPEAr6xx Implementations" +config BOARD_SPEAR600_EVB + bool "SPEAr600 Evaluation Board" + select MACH_SPEAR600 + help + Supports ST SPEAr600 Evaluation Board + +endmenu config MACH_SPEAR600 bool "SPEAr600" help Supports ST SPEAr600 Machine -endchoice - -# Adding SPEAr6XX machine specific configuration files -source "arch/arm/mach-spear6xx/Kconfig600" endif #ARCH_SPEAR6XX
arch/arm/mach-spear6xx/Kconfig600 deleted +0 -17
@@ -1,17 +0,0 @@ -# -# SPEAr600 machine configuration file -# - -if MACH_SPEAR600 - -choice - prompt "SPEAr600 Boards" - default BOARD_SPEAR600_EVB - -config BOARD_SPEAR600_EVB - bool "SPEAr600 Evaluation Board" - help - Supports ST SPEAr600 Evaluation Board -endchoice - -endif #MACH_SPEAR600
Signature · 1 line
1.7.2.2
PATCH v6 11/11 ST SPEAR6xx: renaming spear600_defconfig as spear6xx_defconfig
In reply to Viresh Kumar---
.../{spear600_defconfig => spear6xx_defconfig} | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
rename arch/arm/configs/{spear600_defconfig => spear6xx_defconfig} (97%)arch/arm/configs/spear6xx_defconfig renamed from arch/arm/configs/spear600_defconfig +1 -1
@@ -8,6 +8,7 @@ CONFIG_MODULE_UNLOAD=y CONFIG_MODVERSIONS=y CONFIG_PLAT_SPEAR=y CONFIG_ARCH_SPEAR6XX=y +CONFIG_BOARD_SPEAR600_EVB=y CONFIG_BINFMT_MISC=y CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_BLK_DEV_RAM=y
@@ -22,7 +23,6 @@ CONFIG_MAX_RAW_DEVS=8192 CONFIG_GPIO_SYSFS=y CONFIG_GPIO_PL061=y # CONFIG_HWMON is not set -# CONFIG_VGA_CONSOLE is not set # CONFIG_HID_SUPPORT is not set # CONFIG_USB_SUPPORT is not set CONFIG_EXT2_FS=y
Signature · 1 line
1.7.2.2
v6 cover SPEAr3xx & SPEAr6xx: Single Image solution and padmux updates
In reply to Viresh KumarQuoted 25 lines · Viresh KUMAR
This patchset contains following updates for SPEAr3xx & SPEAr6xx:
- Pad multiplexing updates
- Single Image solutionNote: These patches were earlier sent as part of a larger patchset:
"Updating SPEAr Support"Now it is divided into smaller patchsets. In order to apply these patches cleanly following order of patchsets must be maintained.
- SPEAr3xx & SPEAr6xx Fixes
- SPEAr3xx & SPEAr6xx: Single Image solution and padmux updates
- Adding SPEAr13xx support
- Adding devices support for all spear machines
- Clock Framework & CPU Freq UpdatesRyan Mallon (5):
ST SPEAr3xx: Make local shirq structures static
ST SPEAR3xx: Rename register/irq defines to remove naming conflicts ST SPEAr3xx: Reworkpmx_devcode to remove conflicts
ST SPEAr3xx: Rework KConfig to allow all boards to be compiled in ST SPEAr3xx: Replace defconfigs with single unified defconfigVipin Kumar (1):
ST SPEAr: Pad multiplexing handling modified
Quoted 6 lines
Viresh Kumar (5):
ST SPEAr clock: Define commonclk_initroutine inplat/clock.cST SPEAr Clock: Updating for single image solution ST SPEAr3xx: Appending spear3** with global device structures ST SPEAr6xx: ReworkKconfigfor single image solution ST SPEAR6xx: renamingspear600_defconfigasspear6xx_defconfig
Russell,
Should i push this patch-set to tracker?
Signature · 1 line
viresh
v6 cover SPEAr3xx & SPEAr6xx: Single Image solution and padmux updates
Quoted 33 lines · viresh kumar
Quoted 25 lines · Viresh KUMAR
This patchset contains following updates for SPEAr3xx & SPEAr6xx:
- Pad multiplexing updates
- Single Image solutionNote: These patches were earlier sent as part of a larger patchset:
"Updating SPEAr Support"Now it is divided into smaller patchsets. In order to apply these patches cleanly following order of patchsets must be maintained.
- SPEAr3xx & SPEAr6xx Fixes
- SPEAr3xx & SPEAr6xx: Single Image solution and padmux updates
- Adding SPEAr13xx support
- Adding devices support for all spear machines
- Clock Framework & CPU Freq UpdatesRyan Mallon (5):
ST SPEAr3xx: Make local shirq structures static
ST SPEAR3xx: Rename register/irq defines to remove naming conflicts ST SPEAr3xx: Reworkpmx_devcode to remove conflicts
ST SPEAr3xx: Rework KConfig to allow all boards to be compiled in ST SPEAr3xx: Replace defconfigs with single unified defconfigVipin Kumar (1):
ST SPEAr: Pad multiplexing handling modifiedQuoted 6 lines
Viresh Kumar (5):
ST SPEAr clock: Define commonclk_initroutine inplat/clock.cST SPEAr Clock: Updating for single image solution ST SPEAr3xx: Appending spear3** with global device structures ST SPEAr6xx: ReworkKconfigfor single image solution ST SPEAR6xx: renamingspear600_defconfigasspear6xx_defconfig
Quoted 3 lines
Russell,
Should i push this patch-set to tracker?
I won't be incorporating it until after the merge window.