ARM: pxa/mmp cleanups and warning fixes
Subsystems (6)
cover ARM: pxa/mmp cleanups and warning fixes
These are all fixes for harmless warnings, aside from the first patch, which is a cleanup. Please pick them up into the PXA tree (my preference), or provide an Ack so I can put them into arm-soc.
PATCH 1/9 ARM: pxa: define clock registers as __iomem
We should not dereference registers as pointers, so use readl/writel instead for these registers.
The clock registers are accessed in multiple files, so we have to change them all at once.
I stumbled over these registers while looking at something unrelated. There are in fact other registers with the same problem, but I did not try to address those at this point.
--- arch/arm/mach-pxa/gumstix.c | 6 ++--- arch/arm/mach-pxa/include/mach/pxa2xx-regs.h | 8 +++---- arch/arm/mach-pxa/include/mach/pxa3xx-regs.h | 2 +- arch/arm/mach-pxa/zeus.c | 2 +- drivers/clk/pxa/clk-pxa25x.c | 12 +++++----- drivers/clk/pxa/clk-pxa27x.c | 34 ++++++++++++++-------------- drivers/clk/pxa/clk-pxa3xx.c | 3 +-- drivers/cpufreq/pxa2xx-cpufreq.c | 2 +- 8 files changed, 34 insertions(+), 35 deletions(-)
arch/arm/mach-pxa/gumstix.c +3 -3
@@ -139,14 +139,14 @@ static void gumstix_setup_bt_clock(void) {int timeout =500 ; -if (!(OSCC &OSCC_OOK )) +if (!(readl (OSCC ) &OSCC_OOK ))pr_warn ("32kHz clock was not on. Bootloader may need to be updated\n" );else return ; -OSCC |=OSCC_OON ; +writel (readl (OSCC ) |OSCC_OON ,OSCC );do { -if (OSCC &OSCC_OOK ) +if (readl (OSCC ) &OSCC_OOK )break ;udelay (1 ); }while (--timeout);
arch/arm/mach-pxa/include/mach/pxa2xx-regs.h +4 -4
@@ -134,10 +134,10 @@/* * PXA2xx specific Core clock definitions */ -#define CCCR __REG(0x41300000)/* Core Clock Configuration Register */ -#define CCSR __REG(0x4130000C)/* Core Clock Status Register */ -#define CKEN __REG(0x41300004)/* Clock Enable Register */ -#define OSCC __REG(0x41300008)/* Oscillator Configuration Register */ +#define CCCR io_p2v(0x41300000)/* Core Clock Configuration Register */ +#define CCSR io_p2v(0x4130000C)/* Core Clock Status Register */ +#define CKEN io_p2v(0x41300004)/* Clock Enable Register */ +#define OSCC io_p2v(0x41300008)/* Oscillator Configuration Register */ #define CCCR_N_MASK 0x0380/* Run Mode Frequency to Turbo Mode Frequency Multiplier */ #define CCCR_M_MASK 0x0060/* Memory Frequency to Run Mode Frequency Multiplier */
arch/arm/mach-pxa/include/mach/pxa3xx-regs.h +1 -1
@@ -18,7 +18,7 @@/* * Oscillator Configuration Register (OSCC) */ -#define OSCC __REG(0x41350000)/* Oscillator Configuration Register */ +#define OSCC io_p2v(0x41350000)/* Oscillator Configuration Register */ #define OSCC_PEN (1 << 11)/* 13MHz POUT */
arch/arm/mach-pxa/zeus.c +1 -1
@@ -910,7 +910,7 @@ static void __init zeus_map_io(void)PMCR =PSPR =0 ;/* enable internal 32.768Khz oscillator (ignore OSCC_OOK) */ -OSCC |=OSCC_OON ; +writel (readl (OSCC ) |OSCC_OON ,OSCC );/* Some clock cycles later (from OSCC_ON), programme PCFR (OPDE...). * float chip selects and PCMCIA */
drivers/clk/pxa/clk-pxa25x.c +6 -6
@@ -84,7 +84,7 @@ unsigned int pxa25x_get_clk_frequency_khz(int info)static unsigned long clk_pxa25x_memory_get_rate (struct clk_hw *hw,unsigned long parent_rate) { -unsigned long cccr =CCCR ; +unsigned long cccr =readl (CCCR );unsigned int m = M_clk_mult[(cccr >>5 ) &0x03 ];return parent_rate / m;
@@ -99,7 +99,7 @@ PARENTS(pxa25x_osc3) = { "osc_3_6864mhz", "osc_3_6864mhz" };#define PXA25X_CKEN (dev_id, con_id, parents, mult, div, \ bit, is_lp, flags) \ PXA_CKEN(dev_id, con_id, bit, parents, mult, div, mult, div, \ - is_lp, &CKEN, CKEN_ ## bit, flags) + is_lp, CKEN, CKEN_ ## bit, flags)#define PXA25X_PBUS95_CKEN (dev_id, con_id, bit, mult_hp, div_hp, delay) \ PXA25X_CKEN(dev_id, con_id, pxa25x_pbus95_parents, mult_hp, \ div_hp, bit, NULL, 0)
@@ -112,10 +112,10 @@ PARENTS(pxa25x_osc3) = { "osc_3_6864mhz", "osc_3_6864mhz" };#define PXA25X_CKEN_1RATE (dev_id, con_id, bit, parents, delay) \ PXA_CKEN_1RATE(dev_id, con_id, bit, parents, \ - &CKEN, CKEN_ ## bit, 0) + CKEN, CKEN_ ## bit, 0)#define PXA25X_CKEN_1RATE_AO (dev_id, con_id, bit, parents, delay) \ PXA_CKEN_1RATE(dev_id, con_id, bit, parents, \ - &CKEN, CKEN_ ## bit, CLK_IGNORE_UNUSED) + CKEN, CKEN_ ## bit, CLK_IGNORE_UNUSED)static struct desc_clk_cken pxa25x_clocks[]__initdata = {PXA25X_PBUS95_CKEN ("pxa2xx-mci.0" ,NULL ,MMC ,1 ,5 ,0 ),
@@ -162,7 +162,7 @@ MUX_RO_RATE_RO_OPS(clk_pxa25x_core, "core");static unsigned long clk_pxa25x_run_get_rate (struct clk_hw *hw,unsigned long parent_rate) { -unsigned long cccr =CCCR ; +unsigned long cccr =readl (CCCR );unsigned int n2 = N2_clk_mult[(cccr >>7 ) &0x07 ];return (parent_rate / n2) *2 ;
@@ -173,7 +173,7 @@ RATE_RO_OPS(clk_pxa25x_run, "run");static unsigned long clk_pxa25x_cpll_get_rate (struct clk_hw *hw,unsigned long parent_rate) { -unsigned long clkcfg, cccr =CCCR ; +unsigned long clkcfg, cccr =readl (CCCR );unsigned int l, m, n2, t; asm("mrc\tp14, 0, %0, c6, c0, 0" :"=r" (clkcfg));
drivers/clk/pxa/clk-pxa27x.c +17 -17
@@ -85,7 +85,7 @@ unsigned int pxa27x_get_clk_frequency_khz(int info)bool pxa27x_is_ppll_disabled (void ) { -unsigned long ccsr =CCSR ; +unsigned long ccsr =readl (CCSR );return ccsr & (1 <<CCCR_PPDIS_BIT ); }
@@ -93,7 +93,7 @@ bool pxa27x_is_ppll_disabled(void)#define PXA27X_CKEN (dev_id, con_id, parents, mult_hp, div_hp, \ bit, is_lp, flags) \ PXA_CKEN(dev_id, con_id, bit, parents, 1, 1, mult_hp, div_hp, \ - is_lp, &CKEN, CKEN_ ## bit, flags) + is_lp, CKEN, CKEN_ ## bit, flags)#define PXA27X_PBUS_CKEN (dev_id, con_id, bit, mult_hp, div_hp, delay) \ PXA27X_CKEN(dev_id, con_id, pxa27x_pbus_parents, mult_hp, \ div_hp, bit, pxa27x_is_ppll_disabled, 0)
@@ -106,10 +106,10 @@ PARENTS(pxa27x_membus) = { "lcd_base", "lcd_base" };#define PXA27X_CKEN_1RATE (dev_id, con_id, bit, parents, delay) \ PXA_CKEN_1RATE(dev_id, con_id, bit, parents, \ - &CKEN, CKEN_ ## bit, 0) + CKEN, CKEN_ ## bit, 0)#define PXA27X_CKEN_1RATE_AO (dev_id, con_id, bit, parents, delay) \ PXA_CKEN_1RATE(dev_id, con_id, bit, parents, \ - &CKEN, CKEN_ ## bit, CLK_IGNORE_UNUSED) + CKEN, CKEN_ ## bit, CLK_IGNORE_UNUSED)static struct desc_clk_cken pxa27x_clocks[]__initdata = {PXA27X_PBUS_CKEN ("pxa2xx-uart.0" ,NULL ,FFUART ,2 ,42 ,1 ),
@@ -151,7 +151,7 @@ static unsigned long clk_pxa27x_cpll_get_rate(struct clk_hw *hw,unsigned long clkcfg;unsigned int t, ht;unsigned int l,L , n2,N ; -unsigned long ccsr =CCSR ; +unsigned long ccsr =readl (CCSR ); asm("mrc\tp14, 0, %0, c6, c0, 0" :"=r" (clkcfg)); t = clkcfg & (1 <<0 );
@@ -171,8 +171,8 @@ static unsigned long clk_pxa27x_lcd_base_get_rate(struct clk_hw *hw, unsigned long parent_rate) {unsigned int l, osc_forced; -unsigned long ccsr =CCSR ; -unsigned long cccr =CCCR ; +unsigned long ccsr =readl (CCSR ); +unsigned long cccr =readl (CCCR ); l = ccsr &CCSR_L_MASK ; osc_forced = ccsr & (1 <<CCCR_CPDIS_BIT );
@@ -193,7 +193,7 @@ static unsigned long clk_pxa27x_lcd_base_get_rate(struct clk_hw *hw,static u8 clk_pxa27x_lcd_base_get_parent (struct clk_hw *hw) {unsigned int osc_forced; -unsigned long ccsr =CCSR ; +unsigned long ccsr =readl (CCSR ); osc_forced = ccsr & (1 <<CCCR_CPDIS_BIT );if (osc_forced)
@@ -222,7 +222,7 @@ static unsigned long clk_pxa27x_core_get_rate(struct clk_hw *hw, {unsigned long clkcfg;unsigned int t, ht, b, osc_forced; -unsigned long ccsr =CCSR ; +unsigned long ccsr =readl (CCSR ); osc_forced = ccsr & (1 <<CCCR_CPDIS_BIT ); asm("mrc\tp14, 0, %0, c6, c0, 0" :"=r" (clkcfg));
@@ -242,7 +242,7 @@ static u8 clk_pxa27x_core_get_parent(struct clk_hw *hw) {unsigned long clkcfg;unsigned int t, ht, b, osc_forced; -unsigned long ccsr =CCSR ; +unsigned long ccsr =readl (CCSR ); osc_forced = ccsr & (1 <<CCCR_CPDIS_BIT );if (osc_forced)
@@ -263,7 +263,7 @@ MUX_RO_RATE_RO_OPS(clk_pxa27x_core, "core");static unsigned long clk_pxa27x_run_get_rate (struct clk_hw *hw,unsigned long parent_rate) { -unsigned long ccsr =CCSR ; +unsigned long ccsr =readl (CCSR );unsigned int n2 = (ccsr &CCSR_N2_MASK ) >>CCSR_N2_SHIFT ;return (parent_rate / n2) *2 ;
@@ -285,7 +285,7 @@ static unsigned long clk_pxa27x_system_bus_get_rate(struct clk_hw *hw, {unsigned long clkcfg;unsigned int b, osc_forced; -unsigned long ccsr =CCSR ; +unsigned long ccsr =readl (CCSR ); osc_forced = ccsr & (1 <<CCCR_CPDIS_BIT ); asm("mrc\tp14, 0, %0, c6, c0, 0" :"=r" (clkcfg));
@@ -302,7 +302,7 @@ static unsigned long clk_pxa27x_system_bus_get_rate(struct clk_hw *hw,static u8 clk_pxa27x_system_bus_get_parent (struct clk_hw *hw) {unsigned int osc_forced; -unsigned long ccsr =CCSR ; +unsigned long ccsr =readl (CCSR ); osc_forced = ccsr & (1 <<CCCR_CPDIS_BIT );if (osc_forced)
@@ -318,8 +318,8 @@ static unsigned long clk_pxa27x_memory_get_rate(struct clk_hw *hw, unsigned long parent_rate) {unsigned int a, l, osc_forced; -unsigned long cccr =CCCR ; -unsigned long ccsr =CCSR ; +unsigned long cccr =readl (CCCR ); +unsigned long ccsr =readl (CCSR ); osc_forced = ccsr & (1 <<CCCR_CPDIS_BIT ); a = cccr & (1 <<CCCR_A_BIT );
@@ -337,8 +337,8 @@ static unsigned long clk_pxa27x_memory_get_rate(struct clk_hw *hw,static u8 clk_pxa27x_memory_get_parent (struct clk_hw *hw) {unsigned int osc_forced, a; -unsigned long cccr =CCCR ; -unsigned long ccsr =CCSR ; +unsigned long cccr =readl (CCCR ); +unsigned long ccsr =readl (CCSR ); osc_forced = ccsr & (1 <<CCCR_CPDIS_BIT ); a = cccr & (1 <<CCCR_A_BIT );
drivers/clk/pxa/clk-pxa3xx.c +1 -2
@@ -334,8 +334,7 @@ static void __init pxa3xx_base_clocks_init(void)clk_register_clk_pxa3xx_system_bus ();clk_register_clk_pxa3xx_ac97 ();clk_register_clk_pxa3xx_smemc (); -clk_register_gate (NULL ,"CLK_POUT" ,"osc_13mhz" ,0 , - (void __iomem *)&OSCC ,11 ,0 ,NULL ); +clk_register_gate (NULL ,"CLK_POUT" ,"osc_13mhz" ,0 ,OSCC ,11 ,0 ,NULL );clkdev_pxa_register (CLK_OSTIMER ,"OSTIMER0" ,NULL ,clk_register_fixed_factor (NULL ,"os-timer0" ,"osc_13mhz" ,0 ,1 ,4 ));
drivers/cpufreq/pxa2xx-cpufreq.c +1 -1
@@ -319,7 +319,7 @@ static int pxa_set_target(struct cpufreq_policy *policy, unsigned int idx)local_irq_save (flags);/* Set new the CCCR and prepare CCLKCFG */ -CCCR = pxa_freq_settings[idx].cccr; +writel (pxa_freq_settings[idx].cccr,CCCR ); cclkcfg = pxa_freq_settings[idx].cclkcfg; asm volatile(" \n\
Signature · 1 line
2.7.0
Re: [PATCH 1/9] ARM: pxa: define clock registers as __iomem
Quoted 6 lines · Arnd Bergmann
We should not dereference registers as pointers, so use readl/writel instead for these registers.
The clock registers are accessed in multiple files, so we have to change them all at once.
Quoted 6 lines
I stumbled over these registers while looking at something unrelated. There are in fact other registers with the same problem, but I did not try to address those at this point.
Signed-off-by Arnd Bergmann <[email protected]>---
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH 2/9 ARM: pxa: mark spitz_card_pwr_ctrl as __maybe_unused
In reply to Arnd BergmannThis function is only used when CONFIG_PCMCIA is enabled, otherwise we get a harmless warning:
arch/arm/mach-pxa/spitz.c:204:13: warning: 'spitz_card_pwr_ctrl' defined but not used [-Wunused-function]
Marking it as __maybe_unused keeps the logic simple and avoids the warning on randconfig builds.
--- arch/arm/mach-pxa/spitz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-pxa/spitz.c +1 -1
@@ -201,7 +201,7 @@ static void __init spitz_scoop_init(void) }/* Power control is shared with between one of the CF slots and SD */ -static void spitz_card_pwr_ctrl (uint8_t enable,uint8_t new_cpr) +static void __maybe_unused spitz_card_pwr_ctrl (uint8_t enable,uint8_t new_cpr) {unsigned short cpr;unsigned long flags;
Signature · 1 line
2.7.0
PATCH 3/9 ARM: pxa: mark unused eseries code as __maybe_unused
In reply to Arnd BergmannTwo variables in eseries.c are used on multiple platforms, but are not referenced when those are all disabled:
eseries.c:60:31: warning: 'e7xx_gpio_vbus' defined but not used [-Wunused-variable] eseries.c:129:20: warning: 'eseries_register_clks' defined but not used [-Wunused-function]
Marking them __maybe_unused is the nicest way to ensure that we never get the warning or end up with missing symbols if we get it wrong.
--- arch/arm/mach-pxa/eseries.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-pxa/eseries.c +2 -2
@@ -57,7 +57,7 @@ struct gpio_vbus_mach_info e7xx_udc_info = { .gpio_pullup_inverted = 1 }; -static struct platform_device e7xx_gpio_vbus = { +static struct platform_device e7xx_gpio_vbus__maybe_unused = { .name ="gpio-vbus" , .id =-1 , .dev = {
@@ -126,7 +126,7 @@ struct resource eseries_tmio_resources[] = { };/* Some e-series hardware cannot control the 32K clock */ -static void __init eseries_register_clks (void ) +static void __init __maybe_unused eseries_register_clks (void ) {clk_register_fixed_rate (NULL ,"CLK_CK32K" ,NULL ,CLK_IS_ROOT ,32768 ); }
Signature · 1 line
2.7.0
PATCH 4/9 ARM: pxa: don't select GPIO_SYSFS for MIOA701
In reply to Arnd BergmannGPIO_SYSFS is a common kernel functionality, not something that a board specific Kconfig should have to worry about. In MIOA701, we get a warning about the select when CONFIG_SYSFS is disabled:
warning: (MACH_MIOA701) selects GPIO_SYSFS which has unmet direct dependencies (GPIOLIB && SYSFS)
This just removes the select and instead enables the symbol in the defconfig file.
--- arch/arm/configs/pxa_defconfig | 1 + arch/arm/mach-pxa/Kconfig | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
arch/arm/configs/pxa_defconfig +1 -0
@@ -378,6 +378,7 @@ CONFIG_GPIO_PALMAS=y CONFIG_GPIO_TPS6586X=y CONFIG_GPIO_TPS65910=y CONFIG_GPIO_MAX7301=m +CONFIG_GPIO_SYSFS=y CONFIG_POWER_SUPPLY_DEBUG=y CONFIG_PDA_POWER=m CONFIG_BATTERY_SBS=m
arch/arm/mach-pxa/Kconfig +0 -1
@@ -297,7 +297,6 @@ config MACH_MAGICIAN config MACH_MIOA701 bool "Mitac Mio A701 Support" - select GPIO_SYSFS select IWMMXT select PXA27x help
Signature · 1 line
2.7.0
PATCH 5/9 ARM: pxa: always select one of the two CPU types
In reply to Arnd BergmannWhen all boards are disabled on PXA, we cannot build a kernel because no CPU gets selected:
arch/arm/include/uapi/asm/swab.h:26:29: error: "__LINUX_ARM_ARCH__" is not defined [-Werror=undef]
This is a bit annoying for compile-testing, so I'm adding a line that ensures that at all times, at least one of CPU_XSCALE or CPU_XSC3 is set and we can at least continue building.
--- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -0
@@ -564,6 +564,7 @@ config ARCH_PXA select CLKSRC_PXA select CLKSRC_MMIO select CLKSRC_OF + select CPU_XSCALE if !CPU_XSC3 select GENERIC_CLOCKEVENTS select GPIO_PXA select HAVE_IDE
Signature · 1 line
2.7.0
PATCH 6/9 ARM: pxa: move extern declarations to pm.h
In reply to Arnd BergmannWhen CONFIG_IWMMXT is disabled, we get a warning in pxa3xx.c:
arch/arm/mach-pxa/pxa3xx.c: In function 'pxa3xx_cpu_pm_suspend':arch/arm/mach-pxa/pxa3xx.c:109:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
It turns out that there is an 'extern' declaration in the middle of a function.
For consistency, this moves the declaration and two others from the same file into pm.h.
--- arch/arm/mach-pxa/pm.h | 3 +++ arch/arm/mach-pxa/pxa3xx.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-pxa/pm.h +3 -0
@@ -29,6 +29,9 @@ extern int pxa_pm_enter(suspend_state_t state);extern int pxa_pm_prepare (void );extern void pxa_pm_finish (void ); +extern const char pm_enter_standby_start[], pm_enter_standby_end[]; +extern int pxa3xx_finish_suspend (unsigned long ); +/* NOTE: this is for PM debugging on Lubbock, it's really a big * ugly, but let's keep the crap minimum here, instead of direct * accessing the LUBBOCK CPLD registers in arch/arm/mach-pxa/pm.c
arch/arm/mach-pxa/pxa3xx.c +0 -3
@@ -68,7 +68,6 @@ static unsigned long wakeup_src;*/ static void pxa3xx_cpu_standby (unsigned int pwrmode) { -extern const char pm_enter_standby_start[], pm_enter_standby_end[];void (*fn)(unsigned int ) = (void __force *)(sram +0x8000 ); memcpy_toio(sram + 0x8000, pm_enter_standby_start,
@@ -106,8 +105,6 @@ static void pxa3xx_cpu_pm_suspend(void) asmvolatile ("mra %Q0, %R0, acc0" :"=r" (acc0));#endif -extern int pxa3xx_finish_suspend (unsigned long ); -/* resuming from D2 requires the HSIO2/BOOT/TPM clocks enabled */ CKENA |= (1 <<CKEN_BOOT ) | (1 <<CKEN_TPM );CKENB |=1 << (CKEN_HSIO2 &0x1f );
Signature · 1 line
2.7.0
PATCH 7/9 ARM: pxa: fix building without IWMMXT
In reply to Arnd BergmannWhen CONFIG_IWMMXT, the pxa3xx and pxa27x suspend/resume code emits some xscale specific instructions, which are rejected by the assembler, because gcc is built with -march=armv5 -mtune=xscale and passes that option to the assembler:
/tmp/cciHumzr.s:553: Error: selected processor does not support ARM mode mra r2,r3,acc0' /tmp/cciHumzr.s:605: Error: selected processor does not support ARM mode mar acc0,r2,r3' make[3]: *** [arch/arm/mach-pxa/pxa3xx.o] Error 1/tmp/cci5MUNu.s:326: Error: selected processor does not support ARM mode mra r2,r3,acc0' /tmp/cci5MUNu.s:367: Error: selected processor does not support ARM mode mar acc0,r2,r3' make[3]: *** [arch/arm/mach-pxa/pxa27x.o] Error 1
Overriding with -Wa,-march=xscale no longer works, so instead I'm adding an explict ".arch_extension" directive in all four inline assembly statements, which should work even if they end up in a different order in the assembly output.
--- arch/arm/mach-pxa/pxa27x.c | 6 ++++-- arch/arm/mach-pxa/pxa3xx.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-)
arch/arm/mach-pxa/pxa27x.c +4 -2
@@ -132,7 +132,8 @@ void pxa27x_cpu_pm_enter(suspend_state_t state)#ifndef CONFIG_IWMMXT u64 acc0; - asmvolatile ("mra %Q0, %R0, acc0" :"=r" (acc0)); + asmvolatile (".arch_extension xscale\n\t" +"mra %Q0, %R0, acc0" :"=r" (acc0));#endif /* ensure voltage-change sequencer not initiated, which hangs */
@@ -151,7 +152,8 @@ void pxa27x_cpu_pm_enter(suspend_state_t state)case PM_SUSPEND_MEM :cpu_suspend (pwrmode, pxa27x_finish_suspend);#ifndef CONFIG_IWMMXT - asmvolatile ("mar acc0, %Q0, %R0" :"=r" (acc0)); + asmvolatile (".arch_extension xscale\n\t" +"mar acc0, %Q0, %R0" :"=r" (acc0));#endif break ; }
arch/arm/mach-pxa/pxa3xx.c +4 -2
@@ -102,7 +102,8 @@ static void pxa3xx_cpu_pm_suspend(void)#ifndef CONFIG_IWMMXT u64 acc0; - asmvolatile ("mra %Q0, %R0, acc0" :"=r" (acc0)); + asmvolatile (".arch_extension xscale\n\t" +"mra %Q0, %R0, acc0" :"=r" (acc0));#endif /* resuming from D2 requires the HSIO2/BOOT/TPM clocks enabled */
@@ -130,7 +131,8 @@ static void pxa3xx_cpu_pm_suspend(void)AD3ER =0 ;#ifndef CONFIG_IWMMXT - asmvolatile ("mar acc0, %Q0, %R0" :"=r" (acc0)); + asmvolatile (".arch_extension xscale\n\t" +"mar acc0, %Q0, %R0" :"=r" (acc0));#endif }
Signature · 1 line
2.7.0
PATCH 8/9 ARM: pxa: don't select RFKILL if CONFIG_NET is disabled
In reply to Arnd BergmannBluetooth is only supported when network support is part of the kernel, so it is a bit pointless to build the tosa-bt support without networking. If we try anyway, we get a Kconfig warning:
warning: (TOSA_BT && H1940BT) selects RFKILL which has unmet direct dependencies (NET)
This adds a dependency on CONFIG_NET to avoid that case.
--- arch/arm/mach-pxa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-pxa/Kconfig +1 -1
@@ -528,7 +528,7 @@ config MACH_TOSA config TOSA_BT tristate "Control the state of built-in bluetooth chip on Sharp SL-6000" - depends on MACH_TOSA + depends on MACH_TOSA && NET select RFKILL help This is a simple driver that is able to control
Signature · 1 line
2.7.0
PATCH 9/9 ARM: mmp: mark usb_dma_mask as __maybe_unused
In reply to Arnd BergmannThis variable may be used by some devices that each have their on Kconfig symbol, or by none of them, and that causes a build warning:
arch/arm/mach-mmp/devices.c:241:12: error: 'usb_dma_mask' defined but not used [-Werror=unused-variable]
Marking it __maybe_unused avoids the warning.
--- arch/arm/mach-mmp/devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-mmp/devices.c +1 -1
@@ -238,7 +238,7 @@ void pxa_usb_phy_deinit(void __iomem *phy_reg)#endif #if IS_ENABLED (CONFIG_USB_SUPPORT ) -static u64 usb_dma_mask = ~(u32 )0 ; +static u64 __maybe_unused usb_dma_mask = ~(u32 )0 ;#if IS_ENABLED (CONFIG_USB_MV_UDC ) struct resource pxa168_u2o_resources[] = {
Signature · 1 line
2.7.0
Robert Jarzmik
maintainerRe: [PATCH 9/9] ARM: mmp: mark usb_dma_mask as __maybe_unused
Quoted 4 lines · Arnd Bergmann
This variable may be used by some devices that each have their on
Kconfigsymbol, or by none of them, and that causes a build warning:
Quoted 8 lines
arch/arm/mach-mmp/devices.c:241:12: error: 'usb_dma_mask' defined but not used [-Werror=unused-variable]Marking it
__maybe_unusedavoids the warning.Signed-off-by Arnd Bergmann <[email protected]>--- arch/arm/mach-mmp/devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Hi Haojian,
I still didn't get an ack on this one, do you want to carry it through your tree, or let Arnd carry it or let me carry it ?
Cheers.
--
Robert
[1] The patch
Quoted 13 lines
arch/arm/mach-mmp/devices.c +1
-1@@ -238,7 +238,7 @@ void pxa_usb_phy_deinit(void __iomem *phy_reg)#endif #if IS_ENABLED (CONFIG_USB_SUPPORT ) -static u64 usb_dma_mask = ~(u32 )0 ; +static u64 __maybe_unused usb_dma_mask = ~(u32 )0 ;#if IS_ENABLED (CONFIG_USB_MV_UDC ) struct resource pxa168_u2o_resources[] = {
Signature · 1 line
Robert
Robert Jarzmik
maintainercover ARM: pxa/mmp cleanups and warning fixes
In reply to Arnd BergmannQuoted 4 lines · Arnd Bergmann
These are all fixes for harmless warnings, aside from the first patch, which is a cleanup. Please pick them up into the PXA tree (my preference), or provide an Ack so I can put them into arm-soc.
Hi Arnd,
I'll pick them up, provided the acks (for clock tree for example). The pxa-for-4.6 will happen.
I'll just have a check on 1/9 to verify nobody hides in a corner a direct CKEN access, and try to understand more thoroughly 7/9, all the others look good to me.
As for the 9th patch, it's in the MMP tree. I can carry it if Haojian wishes, but I need his ack.
Cheers.
Signature · 1 line
Robert
cover ARM: pxa/mmp cleanups and warning fixes
Quoted 6 lines · On Friday 29 January 2016 16:25:30 Robert Jarzmik wrote:
Quoted 4 lines · Arnd Bergmann
These are all fixes for harmless warnings, aside from the first patch, which is a cleanup. Please pick them up into the PXA tree (my preference), or provide an Ack so I can put them into arm-soc.
Quoted 8 lines
Hi Arnd,
I'll pick them up, provided the acks (for clock tree for example). The pxa-for-4.6 will happen.
I'll just have a check on 1/9 to verify nobody hides in a corner a direct CKEN access, and try to understand more thoroughly 7/9, all the others look good to me.
Ok, sounds good. If you are unsure about it, you can also drop that one or do a broader version of it that does the other registers as well. I don't think it caused any compiler warnings, which is what I'm trying to handle right now.
Quoted 3 lines
As for the 9th patch, it's in the MMP tree. I can carry it if Haojian wishes, but I need his ack.
Makes sense.
Arnd
Robert Jarzmik
maintainercover ARM: pxa/mmp cleanups and warning fixes
Quoted 12 lines · Arnd Bergmann
Quoted 11 lines · On Friday 29 January 2016 16:25:30 Robert Jarzmik wrote:
Quoted 4 lines · Arnd Bergmann
These are all fixes for harmless warnings, aside from the first patch, which is a cleanup. Please pick them up into the PXA tree (my preference), or provide an Ack so I can put them into arm-soc.
Hi Arnd,
I'll pick them up, provided the acks (for clock tree for example). The pxa-for-4.6 will happen.
Quoted 8 lines
Quoted 3 lines
I'll just have a check on 1/9 to verify nobody hides in a corner a direct CKEN access, and try to understand more thoroughly 7/9, all the others look good to me.
Ok, sounds good. If you are unsure about it, you can also drop that one or do a broader version of it that does the other registers as well. I don't think it caused any compiler warnings, which is what I'm trying to handle right now.
You're right, I checked and it's good. tc-arm.c in gcc is a good lecture.
I'll queue 1/9 up to 8/9 in pxa/for-next, thanks.
Cheers.
Signature · 1 line
Robert