From 668468b161745df666b75fbfb76d14155b0f9df6 Mon Sep 17 00:00:00 2001 From: Suman Anna Date: Wed, 17 Apr 2013 16:31:03 -0500 Subject: ARM: OMAP2+: control: add OMAP5 support for dsp boot programming Support for OMAP5 is added to the omap_dsp_ctrl_write_boot_addr() to enable the DSP boot. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c index 2adb268..31e0dfe 100644 --- a/arch/arm/mach-omap2/control.c +++ b/arch/arm/mach-omap2/control.c @@ -249,6 +249,7 @@ void omap_ctrl_write_dsp_boot_addr(u32 bootaddr) u32 offset = cpu_is_omap243x() ? OMAP243X_CONTROL_IVA2_BOOTADDR : cpu_is_omap34xx() ? OMAP343X_CONTROL_IVA2_BOOTADDR : cpu_is_omap44xx() ? OMAP4_CTRL_MODULE_CORE_DSP_BOOTADDR : + soc_is_omap54xx() ? OMAP4_CTRL_MODULE_CORE_DSP_BOOTADDR : 0; if (!offset) { -- cgit v0.10.2 From 911492de45ccefc2bff4b8e0fb412287ca6fe9d9 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 21 May 2013 12:33:26 +0200 Subject: arm: mvebu: fix length of SATA registers area in .dtsi The length of the registers area for the Marvell 370/XP SATA controller was incorrect in the .dtsi: 0x2400 while it should have been 0x5000. Until now, this problem wasn't noticed because there was a large static mapping for all I/Os set up by ->map_io(). But since we're going to get rid of this static mapping, we need to ensure that the register areas are properly sized. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi index 550eb77..c62444a 100644 --- a/arch/arm/boot/dts/armada-370-xp.dtsi +++ b/arch/arm/boot/dts/armada-370-xp.dtsi @@ -80,7 +80,7 @@ sata@a0000 { compatible = "marvell,orion-sata"; - reg = <0xa0000 0x2400>; + reg = <0xa0000 0x5000>; interrupts = <55>; clocks = <&gateclk 15>, <&gateclk 30>; clock-names = "0", "1"; -- cgit v0.10.2 From cf8088c5cac6ce20d914b9131533844b9291a054 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 21 May 2013 12:33:27 +0200 Subject: arm: mvebu: fix length of Ethernet registers area in .dtsi The length of the registers area for the Marvell 370/XP Ethernet controller was incorrect in the .dtsi: 0x2400 while it should have been 0x4000. Until now, this problem wasn't noticed because there was a large static mapping for all I/Os set up by ->map_io(). But since we're going to get rid of this static mapping, we need to ensure that the register areas are properly sized. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi index c62444a..52a1f5e 100644 --- a/arch/arm/boot/dts/armada-370-xp.dtsi +++ b/arch/arm/boot/dts/armada-370-xp.dtsi @@ -96,7 +96,7 @@ ethernet@70000 { compatible = "marvell,armada-370-neta"; - reg = <0x70000 0x2500>; + reg = <0x70000 0x4000>; interrupts = <8>; clocks = <&gateclk 4>; status = "disabled"; @@ -104,7 +104,7 @@ ethernet@74000 { compatible = "marvell,armada-370-neta"; - reg = <0x74000 0x2500>; + reg = <0x74000 0x4000>; interrupts = <10>; clocks = <&gateclk 3>; status = "disabled"; diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi index 6ab56bd..488ca5e 100644 --- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi @@ -107,7 +107,7 @@ ethernet@34000 { compatible = "marvell,armada-370-neta"; - reg = <0x34000 0x2500>; + reg = <0x34000 0x4000>; interrupts = <14>; clocks = <&gateclk 1>; status = "disabled"; diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi index 5b902f9..1ee8540 100644 --- a/arch/arm/boot/dts/armada-xp.dtsi +++ b/arch/arm/boot/dts/armada-xp.dtsi @@ -88,7 +88,7 @@ ethernet@30000 { compatible = "marvell,armada-370-neta"; - reg = <0x30000 0x2500>; + reg = <0x30000 0x4000>; interrupts = <12>; clocks = <&gateclk 2>; status = "disabled"; -- cgit v0.10.2 From ad8c373c9aa31d5fc56eb882ba0523d2d6d1e2f6 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Sun, 26 May 2013 14:54:34 +0800 Subject: arch: arm: mach-msm: using strlcpy instead of strncpy For NULL terminated string, need always be sure of ended by zero. Or the next 'ptr' in 'for' looping may cause issue. Signed-off-by: Chen Gang Signed-off-by: David Brown diff --git a/arch/arm/mach-msm/clock-debug.c b/arch/arm/mach-msm/clock-debug.c index 4886404..b0fbdf1 100644 --- a/arch/arm/mach-msm/clock-debug.c +++ b/arch/arm/mach-msm/clock-debug.c @@ -104,7 +104,7 @@ int __init clock_debug_add(struct clk *clock) if (!debugfs_base) return -ENOMEM; - strncpy(temp, clock->dbg_name, ARRAY_SIZE(temp)-1); + strlcpy(temp, clock->dbg_name, ARRAY_SIZE(temp)); for (ptr = temp; *ptr; ptr++) *ptr = tolower(*ptr); -- cgit v0.10.2 From 28ba472bd3a272f12c6ec1175a9408322f8bf2ee Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Mon, 20 May 2013 17:50:37 -0700 Subject: ARM: dts: msm: Fix bad register addresses Some bad copy/paste got in as well as too many zeroes. Fix everything up so that the registers after the @ sign are consistent with the first reg property. Signed-off-by: Stephen Boyd Signed-off-by: David Brown diff --git a/arch/arm/boot/dts/msm8660-surf.dts b/arch/arm/boot/dts/msm8660-surf.dts index 9bf49b3..d347082 100644 --- a/arch/arm/boot/dts/msm8660-surf.dts +++ b/arch/arm/boot/dts/msm8660-surf.dts @@ -15,7 +15,7 @@ < 0x02081000 0x1000 >; }; - timer@2000004 { + timer@2000000 { compatible = "qcom,scss-timer", "qcom,msm-timer"; interrupts = <1 0 0x301>, <1 1 0x301>, @@ -26,7 +26,7 @@ cpu-offset = <0x40000>; }; - serial@19c400000 { + serial@19c40000 { compatible = "qcom,msm-hsuart", "qcom,msm-uart"; reg = <0x19c40000 0x1000>, <0x19c00000 0x1000>; diff --git a/arch/arm/boot/dts/msm8960-cdp.dts b/arch/arm/boot/dts/msm8960-cdp.dts index 2e4d87a..7c9ef9b 100644 --- a/arch/arm/boot/dts/msm8960-cdp.dts +++ b/arch/arm/boot/dts/msm8960-cdp.dts @@ -26,7 +26,7 @@ cpu-offset = <0x80000>; }; - serial@19c400000 { + serial@16440000 { compatible = "qcom,msm-hsuart", "qcom,msm-uart"; reg = <0x16440000 0x1000>, <0x16400000 0x1000>; -- cgit v0.10.2 From 28b27d88eeec1b221cd4faa6b5144f57372f0cbe Mon Sep 17 00:00:00 2001 From: Syam Sidhardhan Date: Tue, 5 Mar 2013 10:57:41 +0800 Subject: ARM: prima2: Replace include linux/module.h with linux/export.h include is the right to go here. Signed-off-by: Syam Sidhardhan Signed-off-by: Barry Song diff --git a/arch/arm/mach-prima2/pm.c b/arch/arm/mach-prima2/pm.c index 9936c18..f7e347e 100644 --- a/arch/arm/mach-prima2/pm.c +++ b/arch/arm/mach-prima2/pm.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include -- cgit v0.10.2 From 5a0ec569e8c725874ef2a894d795fc9a462865d8 Mon Sep 17 00:00:00 2001 From: Barry Song Date: Tue, 5 Mar 2013 11:00:43 +0800 Subject: ARM: prima2: fix a checkpatch issue WARNING: please, no spaces at the start of a line 42: FILE: common.c:42: + "sirf,prima2",$ WARNING: please, no spaces at the start of a line 43: FILE: common.c:43: + NULL$ Signed-off-by: Barry Song diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c index 4f94cd8..e95ebef 100644 --- a/arch/arm/mach-prima2/common.c +++ b/arch/arm/mach-prima2/common.c @@ -66,8 +66,8 @@ MACHINE_END #ifdef CONFIG_ARCH_PRIMA2 static const char *prima2_dt_match[] __initdata = { - "sirf,prima2", - NULL + "sirf,prima2", + NULL }; DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") -- cgit v0.10.2 From 3cc3b617dc39dad1e566ccfc4500154cb7c51aa3 Mon Sep 17 00:00:00 2001 From: Barry Song Date: Thu, 16 May 2013 11:26:10 +0800 Subject: arm: prima2: use of_platform_populate instead of of_platform_bus_probe use of_platform_populate to populate platform devices, it is suitable for creating devices which are children of the root node, then makes things like pcm work. this patch removes sirfsoc_mach_init() function and lets arm core do of_platform_populate: static int __init customize_machine(void) { /* * customizes platform devices, or adds new ones * On DT based machines, we fall back to populating the * machine from the device tree, if no callback is provided, * otherwise we would always need an init_machine callback. */ if (machine_desc->init_machine) machine_desc->init_machine(); else of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); return 0; } Signed-off-by: Barry Song Signed-off-by: Rongjun Ying diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c index e95ebef..e588c21 100644 --- a/arch/arm/mach-prima2/common.c +++ b/arch/arm/mach-prima2/common.c @@ -17,16 +17,6 @@ #include #include "common.h" -static struct of_device_id sirfsoc_of_bus_ids[] __initdata = { - { .compatible = "simple-bus", }, - {}, -}; - -void __init sirfsoc_mach_init(void) -{ - of_platform_bus_probe(NULL, sirfsoc_of_bus_ids, NULL); -} - void __init sirfsoc_init_late(void) { sirfsoc_pm_init(); @@ -57,7 +47,6 @@ DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)") .map_io = sirfsoc_map_io, .init_irq = irqchip_init, .init_time = sirfsoc_init_time, - .init_machine = sirfsoc_mach_init, .init_late = sirfsoc_init_late, .dt_compat = atlas6_dt_match, .restart = sirfsoc_restart, @@ -77,7 +66,6 @@ DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") .init_irq = irqchip_init, .init_time = sirfsoc_init_time, .dma_zone_size = SZ_256M, - .init_machine = sirfsoc_mach_init, .init_late = sirfsoc_init_late, .dt_compat = prima2_dt_match, .restart = sirfsoc_restart, @@ -96,7 +84,6 @@ DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)") .map_io = sirfsoc_map_io, .init_irq = irqchip_init, .init_time = sirfsoc_init_time, - .init_machine = sirfsoc_mach_init, .init_late = sirfsoc_init_late, .dt_compat = marco_dt_match, .restart = sirfsoc_restart, -- cgit v0.10.2 From dfaf820a13ec160f06556e08dab423818ba87f14 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Mon, 6 May 2013 17:03:32 +0800 Subject: irqchip: renesas-irqc: Fix irqc_probe error handling The code in goto err3 path is wrong because it will call fee_irq() with k == 0, which means it does free_irq(p->irq[-1].requested_irq, &p->irq[-1]); Signed-off-by: Axel Lin Signed-off-by: Simon Horman diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c index 927bff3..2f404ba 100644 --- a/drivers/irqchip/irq-renesas-irqc.c +++ b/drivers/irqchip/irq-renesas-irqc.c @@ -248,8 +248,8 @@ static int irqc_probe(struct platform_device *pdev) return 0; err3: - for (; k >= 0; k--) - free_irq(p->irq[k - 1].requested_irq, &p->irq[k - 1]); + while (--k >= 0) + free_irq(p->irq[k].requested_irq, &p->irq[k]); irq_domain_remove(p->irq_domain); err2: -- cgit v0.10.2 From 0d7c1210992ff05ee8de5d2c790defded3856f29 Mon Sep 17 00:00:00 2001 From: Bastian Hecht Date: Wed, 8 May 2013 15:20:04 +0200 Subject: irqchip: Add irqchip_init dummy function We add an empty irqchip_init dummy function for cases in which CONFIG_IRQCHIP is not used. In these cases irqchip.c is not compiled, but a funtion call may still be present in architecture code, that in runtime doesn't get hit. E.g. this is needed in the arch/arm/mach-shmobile/intc-r8a7740.c interrupt setup code where OF use and non OF us is both handled in one file. Signed-off-by: Bastian Hecht [horms+renesas@verge.net.au: Make non-CONFIG_IRQCHIP version static inline and remove trailing ';'.] Signed-off-by: Simon Horman diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h index e0006f1..14d7913 100644 --- a/include/linux/irqchip.h +++ b/include/linux/irqchip.h @@ -11,6 +11,10 @@ #ifndef _LINUX_IRQCHIP_H #define _LINUX_IRQCHIP_H +#ifdef CONFIG_IRQCHIP void irqchip_init(void); +#else +static inline void irqchip_init(void) {} +#endif #endif -- cgit v0.10.2 From 1738ddbe5bbf145c34d8d0d10661ffbdf9b23f2b Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 31 May 2013 10:37:52 +0300 Subject: ARM: OMAP: fix dsi regulator names board-cm-t35.c and board-ldp.c contain regulator supply entries for vdds_dsi. However, the given device name is wrong. This patch fixes the device name from omapdss_dsi1 to omapdss_dsi.0. Note that as far as I know, DSI driver is not used on these boards, so this should not have caused any problems. The DSI block can be used to generate clock for DPI, though, but that's not enabled for omap3 boards currently. Signed-off-by: Tomi Valkeinen Signed-off-by: Tony Lindgren diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index ee6218c..ce00968 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c @@ -293,7 +293,7 @@ static struct regulator_consumer_supply cm_t35_vsim_supply[] = { static struct regulator_consumer_supply cm_t35_vio_supplies[] = { REGULATOR_SUPPLY("vcc", "spi1.0"), REGULATOR_SUPPLY("vdds_dsi", "omapdss"), - REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), + REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"), }; /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index d0d17bc..3dbc881 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c @@ -272,7 +272,7 @@ static struct regulator_init_data ldp_vaux1 = { static struct regulator_consumer_supply ldp_vpll2_supplies[] = { REGULATOR_SUPPLY("vdds_dsi", "omapdss"), - REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), + REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"), }; static struct regulator_init_data ldp_vpll2 = { -- cgit v0.10.2 From 1f92a1a4ca3551dde4a2facd5171b3bd2e4d708a Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 31 May 2013 10:37:53 +0300 Subject: ARM: OMAP: add vdds_dsi supply for omapdss_dpi.0 DPI driver gets currently the vdds_dsi regulator via omapdss device. This is not correct, and we'll change the DPI driver to get the regulator directly via omapdss_dpi.0 device. This patch changes the relevant board files to add vdds_dsi supply for omapdss_dpi.0 device. Note that the vdds_dsi supply for omapdss device is still left there, as the current display driver uses it. When both the board files and the display driver has been changed, we can remove the unused supply. Signed-off-by: Tomi Valkeinen Signed-off-by: Tony Lindgren diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index ce00968..d4622ed 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c @@ -293,6 +293,7 @@ static struct regulator_consumer_supply cm_t35_vsim_supply[] = { static struct regulator_consumer_supply cm_t35_vio_supplies[] = { REGULATOR_SUPPLY("vcc", "spi1.0"), REGULATOR_SUPPLY("vdds_dsi", "omapdss"), + REGULATOR_SUPPLY("vdds_dsi", "omapdss_dpi.0"), REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"), }; diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 5764205..f1d91ba 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c @@ -222,6 +222,7 @@ static struct twl4030_gpio_platform_data devkit8000_gpio_data = { static struct regulator_consumer_supply devkit8000_vpll1_supplies[] = { REGULATOR_SUPPLY("vdds_dsi", "omapdss"), + REGULATOR_SUPPLY("vdds_dsi", "omapdss_dpi.0"), REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"), }; diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index 3dbc881..62e4f70 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c @@ -272,6 +272,7 @@ static struct regulator_init_data ldp_vaux1 = { static struct regulator_consumer_supply ldp_vpll2_supplies[] = { REGULATOR_SUPPLY("vdds_dsi", "omapdss"), + REGULATOR_SUPPLY("vdds_dsi", "omapdss_dpi.0"), REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"), }; diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 28133d5..b1547a0 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c @@ -343,6 +343,7 @@ static struct regulator_consumer_supply pandora_vmmc3_supply[] = { static struct regulator_consumer_supply pandora_vdds_supplies[] = { REGULATOR_SUPPLY("vdds_sdi", "omapdss"), REGULATOR_SUPPLY("vdds_dsi", "omapdss"), + REGULATOR_SUPPLY("vdds_dsi", "omapdss_dpi.0"), REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"), }; diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c index 51e138c..c05898f 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c @@ -140,6 +140,7 @@ static struct regulator_init_data omap3_vdac_idata = { static struct regulator_consumer_supply omap3_vpll2_supplies[] = { REGULATOR_SUPPLY("vdds_dsi", "omapdss"), + REGULATOR_SUPPLY("vdds_dsi", "omapdss_dpi.0"), REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"), }; -- cgit v0.10.2 From 3d85f548d3c84a13dc54cc9c79249c5fdae2ad36 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 31 May 2013 10:37:54 +0300 Subject: ARM: OMAP: add vdds_sdi supply for omapdss_sdi.0 SDI driver gets currently the vdds_sdi regulator via omapdss device. This is not correct, and we'll change the SDI driver to get the regulator directly via omapdss_sdi.0 device. This patch changes the rx51 board file to add vdds_dsi supply for omapdss_sdi.0 device. Note that the vdds_sdi supply for omapdss device is still left there, as the current display driver uses it. When both the board files and the display driver has been changed, we can remove the unused supply. Signed-off-by: Tomi Valkeinen Signed-off-by: Tony Lindgren diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 18ca61e..9c2dd10 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -553,6 +553,7 @@ static struct regulator_consumer_supply rx51_vio_supplies[] = { static struct regulator_consumer_supply rx51_vaux1_consumers[] = { REGULATOR_SUPPLY("vdds_sdi", "omapdss"), + REGULATOR_SUPPLY("vdds_sdi", "omapdss_sdi.0"), /* Si4713 supply */ REGULATOR_SUPPLY("vdd", "2-0063"), /* lis3lv02d */ -- cgit v0.10.2 From 5fe0a1268428c08b7c0352a60f9b94be9377b6ca Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Tue, 11 Jun 2013 10:31:58 +0200 Subject: ARM: OMAP2+: devices: Do not print error when McPDM hwmod lookup fails It means that the SoC does not have McPDM IP. Reported-by: Paul Walmsley Signed-off-by: Peter Ujfalusi Signed-off-by: Tony Lindgren diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 4269fc1..b82538d 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -374,10 +374,8 @@ static void __init omap_init_mcpdm(void) struct platform_device *pdev; oh = omap_hwmod_lookup("mcpdm"); - if (!oh) { - printk(KERN_ERR "Could not look up mcpdm hw_mod\n"); + if (!oh) return; - } pdev = omap_device_build("omap-mcpdm", -1, oh, NULL, 0); WARN(IS_ERR(pdev), "Can't build omap_device for omap-mcpdm.\n"); -- cgit v0.10.2 From 6d931cf8ba60eeceb957c180edecaa5f8aabf026 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Tue, 11 Jun 2013 10:31:59 +0200 Subject: ARM: OMAP2+: devices: Do not print error when DMIC hwmod lookup fails It means that the SoC does not have DMIC IP. Reported-by: Paul Walmsley Signed-off-by: Peter Ujfalusi Signed-off-by: Tony Lindgren diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index b82538d..8f268b4 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -393,10 +393,8 @@ static void __init omap_init_dmic(void) struct platform_device *pdev; oh = omap_hwmod_lookup("dmic"); - if (!oh) { - pr_err("Could not look up dmic hw_mod\n"); + if (!oh) return; - } pdev = omap_device_build("omap-dmic", -1, oh, NULL, 0); WARN(IS_ERR(pdev), "Can't build omap_device for omap-dmic.\n"); -- cgit v0.10.2 From 7252db5fef96b309f323abdfe574c6bf56115481 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Tue, 11 Jun 2013 10:32:00 +0200 Subject: ARM: OMAP2+: devices: Do not print error when dss_hdmi hwmod lookup fails The dss_hdmi hwmod is used to create the HDMI audio device for OMAP4+ When we boot the kernel we can silently ignore the failure since the IP does not exist on them. Reported-by: Paul Walmsley Signed-off-by: Peter Ujfalusi Signed-off-by: Tony Lindgren diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 8f268b4..daa0ff6 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -417,10 +417,8 @@ static void __init omap_init_hdmi_audio(void) struct platform_device *pdev; oh = omap_hwmod_lookup("dss_hdmi"); - if (!oh) { - printk(KERN_ERR "Could not look up dss_hdmi hw_mod\n"); + if (!oh) return; - } pdev = omap_device_build("omap-hdmi-audio-dai", -1, oh, NULL, 0); WARN(IS_ERR(pdev), -- cgit v0.10.2 From 415ab3283c8179adba6ed8316e1a52b93431a8a6 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 6 Jun 2013 15:24:38 +0200 Subject: arm/omap: use const char properly The itention was probably to make both pointers const but as it is now, it is just const used twice. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Tony Lindgren diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 1272c41..54e4c16 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -601,7 +601,7 @@ void __init omap2_set_globals_tap(u32 class, void __iomem *tap) #ifdef CONFIG_SOC_BUS -static const char const *omap_types[] = { +static const char * const omap_types[] = { [OMAP2_DEVICE_TYPE_TEST] = "TST", [OMAP2_DEVICE_TYPE_EMU] = "EMU", [OMAP2_DEVICE_TYPE_SEC] = "HS", -- cgit v0.10.2 From 82702ea11ddfe0e43382e1fa5b66d807d8114916 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Fri, 7 Jun 2013 14:55:04 -0700 Subject: ARM: OMAP2+: Fix serial init for device tree based booting We don't want to call omap_serial_early_init() for device tree based booting as the ports are initialized based on the .dts entries. Reviewed-by: Kevin Hilman Signed-off-by: Tony Lindgren diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index f660156..a7cf8d7 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c @@ -176,6 +176,9 @@ static char *cmdline_find_option(char *str) static int __init omap_serial_early_init(void) { + if (of_have_populated_dt()) + return -ENODEV; + do { char oh_name[MAX_UART_HWMOD_NAME_LEN]; struct omap_hwmod *oh; -- cgit v0.10.2 From e41a5f88b374f7b1d87a72740d186be20cae4aa8 Mon Sep 17 00:00:00 2001 From: Roger Quadros Date: Fri, 24 May 2013 16:06:58 +0300 Subject: ARM: OMAP2+: omap-usb-host: Fix memory leaks Fix memory leaks in the error path. Also, use platform_device_register_full() to allocate the platform devices and set platform data. Signed-off-by: Roger Quadros Signed-off-by: Tony Lindgren diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c index aa27d7f..609b330 100644 --- a/arch/arm/mach-omap2/usb-host.c +++ b/arch/arm/mach-omap2/usb-host.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "soc.h" #include "omap_device.h" @@ -560,7 +561,8 @@ static int usbhs_add_regulator(char *name, char *dev_id, char *dev_supply, struct regulator_init_data *reg_data; struct fixed_voltage_config *config; struct platform_device *pdev; - int ret; + struct platform_device_info pdevinfo; + int ret = -ENOMEM; supplies = kzalloc(sizeof(*supplies), GFP_KERNEL); if (!supplies) @@ -571,7 +573,7 @@ static int usbhs_add_regulator(char *name, char *dev_id, char *dev_supply, reg_data = kzalloc(sizeof(*reg_data), GFP_KERNEL); if (!reg_data) - return -ENOMEM; + goto err_data; reg_data->constraints.valid_ops_mask = REGULATOR_CHANGE_STATUS; reg_data->consumer_supplies = supplies; @@ -580,39 +582,53 @@ static int usbhs_add_regulator(char *name, char *dev_id, char *dev_supply, config = kmemdup(&hsusb_reg_config, sizeof(hsusb_reg_config), GFP_KERNEL); if (!config) - return -ENOMEM; + goto err_config; + + config->supply_name = kstrdup(name, GFP_KERNEL); + if (!config->supply_name) + goto err_supplyname; - config->supply_name = name; config->gpio = gpio; config->enable_high = polarity; config->init_data = reg_data; /* create a regulator device */ - pdev = kzalloc(sizeof(*pdev), GFP_KERNEL); - if (!pdev) - return -ENOMEM; + memset(&pdevinfo, 0, sizeof(pdevinfo)); + pdevinfo.name = reg_name; + pdevinfo.id = PLATFORM_DEVID_AUTO; + pdevinfo.data = config; + pdevinfo.size_data = sizeof(*config); - pdev->id = PLATFORM_DEVID_AUTO; - pdev->name = reg_name; - pdev->dev.platform_data = config; + pdev = platform_device_register_full(&pdevinfo); + if (IS_ERR(pdev)) { + ret = PTR_ERR(pdev); + pr_err("%s: Failed registering regulator %s for %s : %d\n", + __func__, name, dev_id, ret); + goto err_register; + } - ret = platform_device_register(pdev); - if (ret) - pr_err("%s: Failed registering regulator %s for %s\n", - __func__, name, dev_id); + return 0; +err_register: + kfree(config->supply_name); +err_supplyname: + kfree(config); +err_config: + kfree(reg_data); +err_data: + kfree(supplies); return ret; } +#define MAX_STR 20 + int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys) { - char *rail_name; - int i, len; + char rail_name[MAX_STR]; + int i; struct platform_device *pdev; char *phy_id; - - /* the phy_id will be something like "nop_usb_xceiv.1" */ - len = strlen(nop_name) + 3; /* 3 -> ".1" and NULL terminator */ + struct platform_device_info pdevinfo; for (i = 0; i < num_phys; i++) { @@ -627,25 +643,26 @@ int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys) !gpio_is_valid(phy->vcc_gpio)) continue; - /* create a NOP PHY device */ - pdev = kzalloc(sizeof(*pdev), GFP_KERNEL); - if (!pdev) - return -ENOMEM; - - pdev->id = phy->port; - pdev->name = nop_name; - pdev->dev.platform_data = phy->platform_data; - - phy_id = kmalloc(len, GFP_KERNEL); - if (!phy_id) + phy_id = kmalloc(MAX_STR, GFP_KERNEL); + if (!phy_id) { + pr_err("%s: kmalloc() failed\n", __func__); return -ENOMEM; + } - scnprintf(phy_id, len, "nop_usb_xceiv.%d\n", - pdev->id); - - if (platform_device_register(pdev)) { - pr_err("%s: Failed to register device %s\n", - __func__, phy_id); + /* create a NOP PHY device */ + memset(&pdevinfo, 0, sizeof(pdevinfo)); + pdevinfo.name = nop_name; + pdevinfo.id = phy->port; + pdevinfo.data = phy->platform_data; + pdevinfo.size_data = sizeof(struct nop_usb_xceiv_platform_data); + + scnprintf(phy_id, MAX_STR, "nop_usb_xceiv.%d", + phy->port); + pdev = platform_device_register_full(&pdevinfo); + if (IS_ERR(pdev)) { + pr_err("%s: Failed to register device %s : %ld\n", + __func__, phy_id, PTR_ERR(pdev)); + kfree(phy_id); continue; } @@ -653,26 +670,15 @@ int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys) /* Do we need RESET regulator ? */ if (gpio_is_valid(phy->reset_gpio)) { - - rail_name = kmalloc(13, GFP_KERNEL); - if (!rail_name) - return -ENOMEM; - - scnprintf(rail_name, 13, "hsusb%d_reset", phy->port); - + scnprintf(rail_name, MAX_STR, + "hsusb%d_reset", phy->port); usbhs_add_regulator(rail_name, phy_id, "reset", phy->reset_gpio, 1); } /* Do we need VCC regulator ? */ if (gpio_is_valid(phy->vcc_gpio)) { - - rail_name = kmalloc(13, GFP_KERNEL); - if (!rail_name) - return -ENOMEM; - - scnprintf(rail_name, 13, "hsusb%d_vcc", phy->port); - + scnprintf(rail_name, MAX_STR, "hsusb%d_vcc", phy->port); usbhs_add_regulator(rail_name, phy_id, "vcc", phy->vcc_gpio, phy->vcc_polarity); } -- cgit v0.10.2 From 0421b519d5231fab08a0dd94757178dc5932bd3f Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Mon, 3 Jun 2013 12:39:43 -0700 Subject: mfd: ssbi: Add MODULE_DEVICE_TABLE This allows the ssbi module to be autoloaded on boot. Cc: David Brown Signed-off-by: Stephen Boyd Signed-off-by: David Brown diff --git a/drivers/ssbi/ssbi.c b/drivers/ssbi/ssbi.c index f32da02..e561d3b 100644 --- a/drivers/ssbi/ssbi.c +++ b/drivers/ssbi/ssbi.c @@ -350,6 +350,7 @@ static struct of_device_id ssbi_match_table[] = { { .compatible = "qcom,ssbi" }, {} }; +MODULE_DEVICE_TABLE(of, ssbi_match_table); static struct platform_driver ssbi_driver = { .probe = ssbi_probe, -- cgit v0.10.2 From 7ba655fc965b073292349fa49fb9d16d701185bc Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Tue, 4 Jun 2013 12:20:00 -0700 Subject: gpio: msm-v1: Remove errant __devinit to fix compile Commit 7bce696 (gpio: Make gpio-msm-v1 into a platform driver, 2013-03-04) was based on an older kernel where __devinit still existed. Remove the erroneous __devinit marking. Cc: David Brown Signed-off-by: Stephen Boyd Signed-off-by: David Brown diff --git a/drivers/gpio/gpio-msm-v1.c b/drivers/gpio/gpio-msm-v1.c index c798585..fb2cc90 100644 --- a/drivers/gpio/gpio-msm-v1.c +++ b/drivers/gpio/gpio-msm-v1.c @@ -630,7 +630,7 @@ static struct irq_chip msm_gpio_irq_chip = { .irq_set_type = msm_gpio_irq_set_type, }; -static int __devinit gpio_msm_v1_probe(struct platform_device *pdev) +static int gpio_msm_v1_probe(struct platform_device *pdev) { int i, j = 0; const struct platform_device_id *dev_id = platform_get_device_id(pdev); -- cgit v0.10.2 From e57a9a4b97231c2ed4c03c7b6f692b632d538993 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Mon, 6 May 2013 19:18:32 -0400 Subject: ARM: davinci: remove stale SFFSDR maintainer name The maintainer entry for SFFSDR board contained in the board file is stale (not working). Remove it. Signed-off-by: Hugo Villeneuve Signed-off-by: Sekhar Nori diff --git a/arch/arm/mach-davinci/board-sffsdr.c b/arch/arm/mach-davinci/board-sffsdr.c index 739be7e..513eee1 100644 --- a/arch/arm/mach-davinci/board-sffsdr.c +++ b/arch/arm/mach-davinci/board-sffsdr.c @@ -151,7 +151,6 @@ static __init void davinci_sffsdr_init(void) } MACHINE_START(SFFSDR, "Lyrtech SFFSDR") - /* Maintainer: Hugo Villeneuve hugo.villeneuve@lyrtech.com */ .atag_offset = 0x100, .map_io = davinci_sffsdr_map_io, .init_irq = davinci_irq_init, -- cgit v0.10.2 From 85529d14d58a89eacec468b1873bf4fe171247b3 Mon Sep 17 00:00:00 2001 From: Barry Song Date: Mon, 17 Jun 2013 09:44:26 +0800 Subject: MAINTAINERS: ARM: SIRF: add the source code tree path I got an account "baohua" from kernel.org and I'll use this tree to maintain CSR SoCs stuff: git://git.kernel.org/pub/scm/linux/kernel/git/baohua/linux.git Signed-off-by: Barry Song Signed-off-by: Olof Johansson diff --git a/MAINTAINERS b/MAINTAINERS index 250dc97..c6f6b7d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -797,6 +797,7 @@ F: arch/arm/mach-gemini/ ARM/CSR SIRFPRIMA2 MACHINE SUPPORT M: Barry Song L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) +T: git git://git.kernel.org/pub/scm/linux/kernel/git/baohua/linux.git S: Maintained F: arch/arm/mach-prima2/ F: drivers/dma/sirf-dma.c -- cgit v0.10.2 From 33d43cdddbaa6d0071618d0d233817c460714634 Mon Sep 17 00:00:00 2001 From: Doug Anderson Date: Tue, 18 Jun 2013 07:02:23 +0900 Subject: MAINTAINERS: Add exynos filename match to ARM/S5P EXYNOS ARM ARCHITECTURES This will help direct patches related to exynos to the linux-samsung-soc mailing list for discussion. Suggested by Joe Perches. Signed-off-by: Doug Anderson Signed-off-by: Kukjin Kim diff --git a/MAINTAINERS b/MAINTAINERS index 250dc97..529f156 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1135,6 +1135,7 @@ L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers) S: Maintained F: arch/arm/mach-s5p*/ F: arch/arm/mach-exynos*/ +N: exynos ARM/SAMSUNG MOBILE MACHINE SUPPORT M: Kyungmin Park -- cgit v0.10.2 From 0580ed363789c8fc9844df6904f471ca6e82fa07 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Wed, 5 Jun 2013 09:50:43 +0000 Subject: ARM: at91: Fix link breakage when !CONFIG_PHYLIB Fixes: arch/arm/mach-at91/built-in.o: In function `ksz9021rn_phy_fixup': :(.text+0x1174): undefined reference to `mdiobus_write' :(.text+0x1188): undefined reference to `mdiobus_write' :(.text+0x119c): undefined reference to `mdiobus_write' :(.text+0x11b0): undefined reference to `mdiobus_write' arch/arm/mach-at91/built-in.o: In function `sama5_dt_device_init': :(.init.text+0x1e34): undefined reference to `phy_register_fixup_for_uid' when CONFIG_PHYLIB is not selected. Signed-off-by: Alexandre Belloni Acked-by: Arnd Bergmann Signed-off-by: Nicolas Ferre diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 0280238..699b71e 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -163,6 +163,7 @@ config MACH_SAMA5_DT bool "Atmel SAMA5 Evaluation Kits with device-tree support" depends on SOC_SAMA5 select USE_OF + select PHYLIB if NETDEVICES help Select this if you want to experiment device-tree with an Atmel Evaluation Kit. diff --git a/arch/arm/mach-at91/board-dt-sama5.c b/arch/arm/mach-at91/board-dt-sama5.c index 705305e..ad95f6a 100644 --- a/arch/arm/mach-at91/board-dt-sama5.c +++ b/arch/arm/mach-at91/board-dt-sama5.c @@ -62,7 +62,8 @@ static int ksz9021rn_phy_fixup(struct phy_device *phy) static void __init sama5_dt_device_init(void) { - if (of_machine_is_compatible("atmel,sama5d3xcm")) + if (of_machine_is_compatible("atmel,sama5d3xcm") && + IS_ENABLED(CONFIG_PHYLIB)) phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK, ksz9021rn_phy_fixup); -- cgit v0.10.2 From 133e00116b5bc76110bcc41ded369489209b641f Mon Sep 17 00:00:00 2001 From: Wenyou Yang Date: Sat, 8 Jun 2013 02:17:43 +0000 Subject: ARM: at91: Change the internal SRAM memory type MT_MEMORY_NONCACHED Because MT_DEVICE is not executable in armv7, we change the internal SRAM memory type to MT_MEMORY_NONCACHED. As it seems that caching this internal SRAM memory is not necessary, we chose the this memory type. Signed-off-by: Wenyou Yang Signed-off-by: Nicolas Ferre diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index e2f4bdd..942dc00 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c @@ -80,7 +80,7 @@ void __init at91_init_sram(int bank, unsigned long base, unsigned int length) desc->pfn = __phys_to_pfn(base); desc->length = length; - desc->type = MT_DEVICE; + desc->type = MT_MEMORY_NONCACHED; pr_info("AT91: sram at 0x%lx of 0x%x mapped at 0x%lx\n", base, length, desc->virtual); -- cgit v0.10.2 From 22e8099f4f6621b8d165e238cdef2a1cf655e159 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 23 Apr 2013 15:39:50 +0200 Subject: hwrng: bcm2835: fix MODULE_LICENSE tag The MODULE_LICENSE macro invocation must use either "GPL" or "GPL v2", but not "GPLv2" in order to be detected by the module loader. This fixes the allmodconfig build error: FATAL: modpost: GPL-incompatible module bcm2835-rng.ko uses GPL-only symbol 'platform_driver_unregister' Signed-off-by: Arnd Bergmann Acked-by: Lubomir Rintel Cc: Dom Cobley Cc: Stephen Warren Cc: Matt Mackall Cc: linux-rpi-kernel@lists.infradead.org Cc: Herbert Xu diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c index eb7f147..43577ca 100644 --- a/drivers/char/hw_random/bcm2835-rng.c +++ b/drivers/char/hw_random/bcm2835-rng.c @@ -110,4 +110,4 @@ module_platform_driver(bcm2835_rng_driver); MODULE_AUTHOR("Lubomir Rintel "); MODULE_DESCRIPTION("BCM2835 Random Number Generator (RNG) driver"); -MODULE_LICENSE("GPLv2"); +MODULE_LICENSE("GPL v2"); -- cgit v0.10.2 From b497ceb964a80ebada3b9b3cea4261409039e25a Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 14 Mar 2013 15:21:36 +0100 Subject: [SCSI] nsp32: use mdelay instead of large udelay constants ARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those. Signed-off-by: Arnd Bergmann Acked-by: GOTO Masanori Cc: YOKOTA Hiroshi Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c index 1e3879d..0665f9c 100644 --- a/drivers/scsi/nsp32.c +++ b/drivers/scsi/nsp32.c @@ -2899,7 +2899,7 @@ static void nsp32_do_bus_reset(nsp32_hw_data *data) * reset SCSI bus */ nsp32_write1(base, SCSI_BUS_CONTROL, BUSCTL_RST); - udelay(RESET_HOLD_TIME); + mdelay(RESET_HOLD_TIME / 1000); nsp32_write1(base, SCSI_BUS_CONTROL, 0); for(i = 0; i < 5; i++) { intrdat = nsp32_read2(base, IRQ_STATUS); /* dummy read */ -- cgit v0.10.2 From 930d800bded771b26d9944c47810829130ff7c8c Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 23 Apr 2013 15:47:50 +0200 Subject: mtd: omap2: allow bulding as a module The omap2 nand device driver calls into the the elm code, which can be a loadable module, and in that case it cannot be built-in itself. I can see no reason why the omap2 driver cannot also be a module, so let's make the option "tristate" in Kconfig to fix this allmodconfig build error: ERROR: "elm_config" [drivers/mtd/nand/omap2.ko] undefined! ERROR: "elm_decode_bch_error_page" [drivers/mtd/nand/omap2.ko] undefined! Signed-off-by: Arnd Bergmann Acked-by: Tony Lindgren Cc: David Woodhouse Cc: Artem Bityutskiy Cc: Afzal Mohammed Cc: Russell King Cc: linux-mtd@lists.infradead.org diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index a60f6c1..50543f1 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -95,7 +95,7 @@ config MTD_NAND_OMAP2 config MTD_NAND_OMAP_BCH depends on MTD_NAND && MTD_NAND_OMAP2 && ARCH_OMAP3 - bool "Enable support for hardware BCH error correction" + tristate "Enable support for hardware BCH error correction" default n select BCH select BCH_CONST_PARAMS -- cgit v0.10.2 From a857c6e7d5fda19c39674a61d9f360bc43a7dcf6 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 8 Jan 2013 19:09:14 +0000 Subject: X.509: do not emit any informational output When building a kernel using 'make -s', I expect to see an empty output, except for build warnings and errors. The build_OID_registry code always prints one line when run, which is not helpful to most people building the kernels, and which makes it harder to automatically check for build warnings. Let's just remove the one line output. Signed-off-by: Arnd Bergmann Cc: David Howells Cc: Rusty Russell diff --git a/lib/build_OID_registry b/lib/build_OID_registry index dfbdaab..5d982721 100755 --- a/lib/build_OID_registry +++ b/lib/build_OID_registry @@ -50,8 +50,6 @@ my @indices = (); my @lengths = (); my $total_length = 0; -print "Compiling ", $#names + 1, " OIDs\n"; - for (my $i = 0; $i <= $#names; $i++) { my $name = $names[$i]; my $oid = $oids[$i]; -- cgit v0.10.2 From 9682bcdef1a9a0af940c30250ede697e7e70ef28 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 23 Apr 2013 16:04:14 +0200 Subject: clocksource: kona: adapt to CLOCKSOURCE_OF_DECLARE change The CLOCKSOURCE_OF_DECLARE functions now take a device_node pointer as their argument, as of the clksrc/cleanup branch in arm-soc. This patch adapts the bcm_kona_timer driver to the new interface. Signed-off-by: Arnd Bergmann Acked-by: Christian Daudt Cc: John Stultz diff --git a/drivers/clocksource/bcm_kona_timer.c b/drivers/clocksource/bcm_kona_timer.c index 350f493..ba3d859 100644 --- a/drivers/clocksource/bcm_kona_timer.c +++ b/drivers/clocksource/bcm_kona_timer.c @@ -103,16 +103,10 @@ static const struct of_device_id bcm_timer_ids[] __initconst = { {}, }; -static void __init kona_timers_init(void) +static void __init kona_timers_init(struct device_node *node) { - struct device_node *node; u32 freq; - node = of_find_matching_node(NULL, bcm_timer_ids); - - if (!node) - panic("No timer"); - if (!of_property_read_u32(node, "clock-frequency", &freq)) arch_timer_rate = freq; else @@ -199,13 +193,12 @@ static struct irqaction kona_timer_irq = { .handler = kona_timer_interrupt, }; -static void __init kona_timer_init(void) +static void __init kona_timer_init(struct device_node *node) { - kona_timers_init(); + kona_timers_init(node); kona_timer_clockevents_init(); setup_irq(timers.tmr_irq, &kona_timer_irq); kona_timer_set_next_event((arch_timer_rate / HZ), NULL); } -CLOCKSOURCE_OF_DECLARE(bcm_kona, "bcm,kona-timer", - kona_timer_init); +CLOCKSOURCE_OF_DECLARE(bcm_kona, "bcm,kona-timer", kona_timer_init); -- cgit v0.10.2 From c5dece37c53f5b9e1dee434a994e2d0ff457a267 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 10 Jun 2013 18:07:14 +0200 Subject: ARM: sirf: use CONFIG_SIRF rather than CONFIG_PRIMA2 where necessary I got a build error today that made me realize that it is not possible to build a kernel for a SiRF platform without enabling CONFIG_PRIMA2, since a lot of common code depends on CONFIG_PRIMA2. This fixes all occurences that appear like common SiRF code. Signed-off-by: Arnd Bergmann Acked-by: Wolfram Sang Acked-by: Mark Brown Acked-by: Greg Kroah-Hartman Acked-by: Barry Song Acked-by: Mike Turquette diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 1ba358b..7ea1517 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -168,7 +168,7 @@ machine-$(CONFIG_ARCH_OMAP1) += omap1 machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2 machine-$(CONFIG_ARCH_ORION5X) += orion5x machine-$(CONFIG_ARCH_PICOXCELL) += picoxcell -machine-$(CONFIG_ARCH_PRIMA2) += prima2 +machine-$(CONFIG_ARCH_SIRF) += prima2 machine-$(CONFIG_ARCH_PXA) += pxa machine-$(CONFIG_ARCH_REALVIEW) += realview machine-$(CONFIG_ARCH_RPC) += rpc diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index 137d3e7..f0e4699 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile @@ -18,7 +18,7 @@ obj-$(CONFIG_ARCH_SOCFPGA) += socfpga/ obj-$(CONFIG_PLAT_SPEAR) += spear/ obj-$(CONFIG_ARCH_U300) += clk-u300.o obj-$(CONFIG_COMMON_CLK_VERSATILE) += versatile/ -obj-$(CONFIG_ARCH_PRIMA2) += clk-prima2.o +obj-$(CONFIG_ARCH_SIRF) += clk-prima2.o obj-$(CONFIG_PLAT_ORION) += mvebu/ ifeq ($(CONFIG_COMMON_CLK), y) obj-$(CONFIG_ARCH_MMP) += mmp/ diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 631736e..73e2e7d 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -685,7 +685,7 @@ config I2C_SIMTEC config I2C_SIRF tristate "CSR SiRFprimaII I2C interface" - depends on ARCH_PRIMA2 + depends on ARCH_SIRF help If you say yes to this option, support will be included for the CSR SiRFprimaII I2C interface. diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 92a9345..10f99f4 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -404,7 +404,7 @@ config SPI_SH_HSPI config SPI_SIRF tristate "CSR SiRFprimaII SPI controller" - depends on ARCH_PRIMA2 + depends on ARCH_SIRF select SPI_BITBANG help SPI driver for CSR SiRFprimaII SoCs diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index 7e7006f..80155a1 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -251,7 +251,7 @@ config SERIAL_SAMSUNG_CONSOLE config SERIAL_SIRFSOC tristate "SiRF SoC Platform Serial port support" - depends on ARCH_PRIMA2 + depends on ARCH_SIRF select SERIAL_CORE help Support for the on-chip UART on the CSR SiRFprimaII series, -- cgit v0.10.2 From 546c830c90beb7d3e398007715fd1b631c6c060a Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 1 Jun 2013 16:40:11 +0200 Subject: ARM: at91: fix at91_extern_irq usage for non-dt boards Since 4b68520dc0ec96153bc0d87bca5ffba508edfcf ARM: at91: add AIC5 support we allocate the at91_extern_irq. This patch makes it static and stores the non-dt extern irq in the soc structure. It is then possible to use a at91_get_extern_irq() function to get the value for outside of the irq driver. It is useful for passing its value to at91_aic_init(). Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Acked-by: Ludovic Desroches [nicolas.ferre@atmel.com: rework commit message] Signed-off-by: Nicolas Ferre diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index d193a40..9eb5743 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c @@ -332,10 +332,6 @@ static void __init at91rm9200_initialize(void) { arm_pm_idle = at91rm9200_idle; arm_pm_restart = at91rm9200_restart; - at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1) - | (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3) - | (1 << AT91RM9200_ID_IRQ4) | (1 << AT91RM9200_ID_IRQ5) - | (1 << AT91RM9200_ID_IRQ6); /* Initialize GPIO subsystem */ at91_gpio_init(at91rm9200_gpio, @@ -388,6 +384,10 @@ static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = { AT91_SOC_START(at91rm9200) .map_io = at91rm9200_map_io, .default_irq_priority = at91rm9200_default_irq_priority, + .extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1) + | (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3) + | (1 << AT91RM9200_ID_IRQ4) | (1 << AT91RM9200_ID_IRQ5) + | (1 << AT91RM9200_ID_IRQ6), .ioremap_registers = at91rm9200_ioremap_registers, .register_clocks = at91rm9200_register_clocks, .init = at91rm9200_initialize, diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index a8ce245..5de6074 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c @@ -348,8 +348,6 @@ static void __init at91sam9260_initialize(void) { arm_pm_idle = at91sam9_idle; arm_pm_restart = at91sam9_alt_restart; - at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1) - | (1 << AT91SAM9260_ID_IRQ2); /* Register GPIO subsystem */ at91_gpio_init(at91sam9260_gpio, 3); @@ -400,6 +398,8 @@ static unsigned int at91sam9260_default_irq_priority[NR_AIC_IRQS] __initdata = { AT91_SOC_START(at91sam9260) .map_io = at91sam9260_map_io, .default_irq_priority = at91sam9260_default_irq_priority, + .extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1) + | (1 << AT91SAM9260_ID_IRQ2), .ioremap_registers = at91sam9260_ioremap_registers, .register_clocks = at91sam9260_register_clocks, .init = at91sam9260_initialize, diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index 25efb5a..0e07932 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c @@ -290,8 +290,6 @@ static void __init at91sam9261_initialize(void) { arm_pm_idle = at91sam9_idle; arm_pm_restart = at91sam9_alt_restart; - at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) - | (1 << AT91SAM9261_ID_IRQ2); /* Register GPIO subsystem */ at91_gpio_init(at91sam9261_gpio, 3); @@ -342,6 +340,8 @@ static unsigned int at91sam9261_default_irq_priority[NR_AIC_IRQS] __initdata = { AT91_SOC_START(at91sam9261) .map_io = at91sam9261_map_io, .default_irq_priority = at91sam9261_default_irq_priority, + .extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) + | (1 << AT91SAM9261_ID_IRQ2), .ioremap_registers = at91sam9261_ioremap_registers, .register_clocks = at91sam9261_register_clocks, .init = at91sam9261_initialize, diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index f44ffd2..6ce7d18 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c @@ -327,7 +327,6 @@ static void __init at91sam9263_initialize(void) { arm_pm_idle = at91sam9_idle; arm_pm_restart = at91sam9_alt_restart; - at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1); /* Register GPIO subsystem */ at91_gpio_init(at91sam9263_gpio, 5); @@ -378,6 +377,7 @@ static unsigned int at91sam9263_default_irq_priority[NR_AIC_IRQS] __initdata = { AT91_SOC_START(at91sam9263) .map_io = at91sam9263_map_io, .default_irq_priority = at91sam9263_default_irq_priority, + .extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1), .ioremap_registers = at91sam9263_ioremap_registers, .register_clocks = at91sam9263_register_clocks, .init = at91sam9263_initialize, diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index 8b7fce0..fda5026 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c @@ -374,7 +374,6 @@ static void __init at91sam9g45_initialize(void) { arm_pm_idle = at91sam9_idle; arm_pm_restart = at91sam9g45_restart; - at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0); /* Register GPIO subsystem */ at91_gpio_init(at91sam9g45_gpio, 5); @@ -425,6 +424,7 @@ static unsigned int at91sam9g45_default_irq_priority[NR_AIC_IRQS] __initdata = { AT91_SOC_START(at91sam9g45) .map_io = at91sam9g45_map_io, .default_irq_priority = at91sam9g45_default_irq_priority, + .extern_irq = (1 << AT91SAM9G45_ID_IRQ0), .ioremap_registers = at91sam9g45_ioremap_registers, .register_clocks = at91sam9g45_register_clocks, .init = at91sam9g45_initialize, diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index f77fae5..d4ec0d9 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c @@ -293,7 +293,6 @@ static void __init at91sam9rl_initialize(void) { arm_pm_idle = at91sam9_idle; arm_pm_restart = at91sam9_alt_restart; - at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0); /* Register GPIO subsystem */ at91_gpio_init(at91sam9rl_gpio, 4); @@ -344,6 +343,7 @@ static unsigned int at91sam9rl_default_irq_priority[NR_AIC_IRQS] __initdata = { AT91_SOC_START(at91sam9rl) .map_io = at91sam9rl_map_io, .default_irq_priority = at91sam9rl_default_irq_priority, + .extern_irq = (1 << AT91SAM9RL_ID_IRQ0), .ioremap_registers = at91sam9rl_ioremap_registers, .register_clocks = at91sam9rl_register_clocks, .init = at91sam9rl_initialize, diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c index 19ca793..bad94b8 100644 --- a/arch/arm/mach-at91/at91x40.c +++ b/arch/arm/mach-at91/at91x40.c @@ -55,8 +55,6 @@ static void at91x40_idle(void) void __init at91x40_initialize(unsigned long main_clock) { arm_pm_idle = at91x40_idle; - at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1) - | (1 << AT91X40_ID_IRQ2); } /* @@ -86,9 +84,10 @@ static unsigned int at91x40_default_irq_priority[NR_AIC_IRQS] __initdata = { void __init at91x40_init_interrupts(unsigned int priority[NR_AIC_IRQS]) { + u32 extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1) + | (1 << AT91X40_ID_IRQ2); if (!priority) priority = at91x40_default_irq_priority; - at91_aic_init(priority, at91_extern_irq); + at91_aic_init(priority, extern_irq); } - diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index 78ab065..f6de36a 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h @@ -85,4 +85,4 @@ extern void __init at91_gpio_irq_setup(void); extern int __init at91_gpio_of_irq_setup(struct device_node *node, struct device_node *parent); -extern int at91_extern_irq; +extern u32 at91_get_extern_irq(void); diff --git a/arch/arm/mach-at91/irq.c b/arch/arm/mach-at91/irq.c index e0ca591..3d192c5 100644 --- a/arch/arm/mach-at91/irq.c +++ b/arch/arm/mach-at91/irq.c @@ -232,7 +232,14 @@ static void __maybe_unused at91_aic5_eoi(struct irq_data *d) at91_aic_write(AT91_AIC5_EOICR, 0); } -unsigned long *at91_extern_irq; +static unsigned long *at91_extern_irq; + +u32 at91_get_extern_irq(void) +{ + if (!at91_extern_irq) + return 0; + return *at91_extern_irq; +} #define is_extern_irq(hwirq) test_bit(hwirq, at91_extern_irq) diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 530db30..15afb5d 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c @@ -212,7 +212,7 @@ static int at91_pm_enter(suspend_state_t state) (at91_pmc_read(AT91_PMC_PCSR) | (1 << AT91_ID_FIQ) | (1 << AT91_ID_SYS) - | (at91_extern_irq)) + | (at91_get_extern_irq())) & at91_aic_read(AT91_AIC_IMR), state); diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 942dc00..b17fbcf 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c @@ -48,7 +48,7 @@ void __init at91_init_irq_default(void) void __init at91_init_interrupts(unsigned int *priority) { /* Initialize the AIC interrupt controller */ - at91_aic_init(priority, at91_extern_irq); + at91_aic_init(priority, at91_boot_soc.extern_irq); /* Enable GPIO interrupts */ at91_gpio_irq_setup(); diff --git a/arch/arm/mach-at91/soc.h b/arch/arm/mach-at91/soc.h index 43a225f..a1e1482 100644 --- a/arch/arm/mach-at91/soc.h +++ b/arch/arm/mach-at91/soc.h @@ -6,6 +6,7 @@ struct at91_init_soc { int builtin; + u32 extern_irq; unsigned int *default_irq_priority; void (*map_io)(void); void (*ioremap_registers)(void); -- cgit v0.10.2 From a008dad702a55b27720760ab0f8a129dde49fb6e Mon Sep 17 00:00:00 2001 From: Daniel Lezcano Date: Fri, 21 Jun 2013 14:36:59 +0200 Subject: ARM: at91: cpuidle: Fix target_residency The following commit: commit 7e348b9012522fa0efd854d20d210d5e57fcedd1 Author: Robert Lee Date: Tue Mar 20 15:22:43 2012 -0500 ARM: at91: Consolidate time keeping and irq enable Enable core cpuidle timekeeping and irq enabling and remove that handling from this code. introduced an additional zero to the state1 (suspend) target residency. With a periodic tick, the cpu never enters the state1 with both 10000 and 100000. With a tickless system, it enters to state1 much more often with the initial value, roughly x7 more. Fix it by setting the value to 10ms again. Signed-off-by: Daniel Lezcano [nicola.ferre@atmel.com: add precisions given by Daniel to commit message] Signed-off-by: Nicolas Ferre diff --git a/arch/arm/mach-at91/cpuidle.c b/arch/arm/mach-at91/cpuidle.c index 69f9e3b..4ec6a6d 100644 --- a/arch/arm/mach-at91/cpuidle.c +++ b/arch/arm/mach-at91/cpuidle.c @@ -51,7 +51,7 @@ static struct cpuidle_driver at91_idle_driver = { .states[1] = { .enter = at91_enter_idle, .exit_latency = 10, - .target_residency = 100000, + .target_residency = 10000, .flags = CPUIDLE_FLAG_TIME_VALID, .name = "RAM_SR", .desc = "WFI and DDR Self Refresh", -- cgit v0.10.2 From cdd8e498c92abd63878a5c1380217fb870ab1872 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Sat, 22 Jun 2013 13:52:27 -0300 Subject: ARM: mvebu: fix length of ethernet registers in mv78260 dtsi The length of the registers area for the Marvell 370/XP Ethernet controller was incorrect in the .dtsi: 0x2500, while it should have been 0x4000. This problem wasn't noticed because there used to be a static mapping for all the MMIO register region set up by ->map_io(). The register length was fixed in all the other device tree files, except from the armada-xp-mv78260.dtsi, in the following commit: commit cf8088c5cac6ce20d914b9131533844b9291a054 Author: Thomas Petazzoni Date: Tue May 21 12:33:27 2013 +0200 arm: mvebu: fix length of Ethernet registers area in .dtsi This commit fixes a kernel panic in mvneta_probe(), when the kernel tries to access the unmapped registers: [ 163.639092] mvneta d0070000.ethernet eth0: mac: 6e:3c:4f:87:17:2e [ 163.646962] mvneta d0074000.ethernet eth1: mac: 6a:04:4e:6f:f5:ef [ 163.654853] mvneta d0030000.ethernet eth2: mac: 2a:99:19:19:fc:4c [ 163.661258] Unable to handle kernel paging request at virtual address f011bcf0 [ 163.668523] pgd = c0004000 [ 163.671237] [f011bcf0] *pgd=2f006811, *pte=00000000, *ppte=00000000 [ 163.677565] Internal error: Oops: 807 [#1] SMP ARM [ 163.682370] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.0-rc6-01850-gba0682e #11 [ 163.690046] task: ef04c000 ti: ef03e000 task.ti: ef03e000 [ 163.695467] PC is at mvneta_probe+0x34c/0xabc [...] Signed-off-by: Ezequiel Garcia Acked-by: Thomas Petazzoni Signed-off-by: Jason Cooper diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi index f4029f0..2d9335d 100644 --- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi @@ -92,7 +92,7 @@ ethernet@34000 { compatible = "marvell,armada-370-neta"; - reg = <0x34000 0x2500>; + reg = <0x34000 0x4000>; interrupts = <14>; clocks = <&gateclk 1>; status = "disabled"; -- cgit v0.10.2 From 6eed846fc2dea75e945141f6ea806823fb66a278 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 30 Apr 2013 23:00:47 +0200 Subject: cpuidle: calxeda: select ARM_CPU_SUSPEND Like other ARM specific drivers, this one requires ARM_CPU_SUSPEND, as shown by this linker error: drivers/built-in.o: In function `calxeda_pwrdown_idle': drivers/cpuidle/cpuidle-calxeda.c:84: undefined reference to `cpu_suspend' drivers/cpuidle/cpuidle-calxeda.c:86: undefined reference to `cpu_resume' Signed-off-by: Arnd Bergmann Acked-by: Rafael J. Wysocki Acked-by: Rob Herring Acked-by: Daniel Lezcano Cc: linux-pm@vger.kernel.org diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig index c4cc27e..e21cdfa 100644 --- a/drivers/cpuidle/Kconfig +++ b/drivers/cpuidle/Kconfig @@ -36,6 +36,7 @@ if CPU_IDLE config CPU_IDLE_CALXEDA bool "CPU Idle Driver for Calxeda processors" depends on ARCH_HIGHBANK + select ARM_CPU_SUSPEND help Select this to enable cpuidle on Calxeda processors. -- cgit v0.10.2 From 7a9caf59f60e55a8caf96f856713bd0ef0cc25a7 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 3 Jun 2013 16:00:22 +0200 Subject: ARM: mxs: stub out mxs_pm_init for !CONFIG_PM When building a kernel without CONFIG_PM, we get a link error from referencing mxs_pm_init in the machine descriptor. This defines a macro to NULL for that case. Signed-off-by: Arnd Bergmann Acked-by: Shawn Guo diff --git a/arch/arm/mach-mxs/pm.h b/arch/arm/mach-mxs/pm.h index f57e7cd..09d77b0 100644 --- a/arch/arm/mach-mxs/pm.h +++ b/arch/arm/mach-mxs/pm.h @@ -9,6 +9,10 @@ #ifndef __ARCH_MXS_PM_H #define __ARCH_MXS_PM_H +#ifdef CONFIG_PM void mxs_pm_init(void); +#else +#define mxs_pm_init NULL +#endif #endif -- cgit v0.10.2 From ab1824636dac89b48f75dba57650d24a4e38b48c Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 3 Jun 2013 15:57:31 +0200 Subject: ARM: mxs: don't select HAVE_PWM The HAVE_PWM symbol is only for legacy platforms that provide the PWM API without using the generic framework. MXS actually uses that framework, and selecting the symbol anyway might cause build errors like drivers/built-in.o: In function `pwm_beeper_resume': :(.text+0x1f4fc0): undefined reference to `pwm_config' :(.text+0x1f4fc8): undefined reference to `pwm_enable' drivers/built-in.o: In function `pwm_beeper_suspend': :(.text+0x1f4ffc): undefined reference to `pwm_disable' when CONFIG_PWM is disabled. Signed-off-by: Arnd Bergmann Cc: Shawn Guo diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index 4dc2fbb..3a66635 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig @@ -3,7 +3,6 @@ config SOC_IMX23 select ARM_AMBA select ARM_CPU_SUSPEND if PM select CPU_ARM926T - select HAVE_PWM select PINCTRL_IMX23 config SOC_IMX28 @@ -12,7 +11,6 @@ config SOC_IMX28 select ARM_CPU_SUSPEND if PM select CPU_ARM926T select HAVE_CAN_FLEXCAN if CAN - select HAVE_PWM select PINCTRL_IMX28 config ARCH_MXS -- cgit v0.10.2 From 1d54e0895bb413d6151a01fdb6d58d93d888198a Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Fri, 21 Jun 2013 16:39:07 -0600 Subject: ARM: tegra: fix section mismatch in tegra_pmc_parse_dt tegra_pmc_parse_dt() references __initconst data. Fix it to be __init. This matches its only usage; a call from tegra_pmc_init() which is already __init. This fixes: WARNING: vmlinux.o(.text.unlikely+0x580): Section mismatch in reference from the function tegra_pmc_parse_dt() to the (unknown reference) .init.rodata:(unknown) Signed-off-by: Stephen Warren Signed-off-by: Olof Johansson diff --git a/arch/arm/mach-tegra/pmc.c b/arch/arm/mach-tegra/pmc.c index 32360e5..eb3fa4a 100644 --- a/arch/arm/mach-tegra/pmc.c +++ b/arch/arm/mach-tegra/pmc.c @@ -234,7 +234,7 @@ static const struct of_device_id matches[] __initconst = { { } }; -static void tegra_pmc_parse_dt(void) +static void __init tegra_pmc_parse_dt(void) { struct device_node *np; u32 prop; -- cgit v0.10.2 From ed4a2af5fcfe0d324aaceffdaa9ea2f08f7ef2c6 Mon Sep 17 00:00:00 2001 From: Nicolas Ferre Date: Mon, 24 Jun 2013 10:20:55 +0200 Subject: ARM: at91/PMC: sama5d3 family doesn't have a PLLB Signed-off-by: Nicolas Ferre Acked-by: Ludovic Desroches diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index da84188..085a79d 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91/clock.c @@ -75,7 +75,8 @@ EXPORT_SYMBOL_GPL(at91_pmc_base); #define cpu_has_pllb() (!(cpu_is_at91sam9rl() \ || cpu_is_at91sam9g45() \ || cpu_is_at91sam9x5() \ - || cpu_is_at91sam9n12())) + || cpu_is_at91sam9n12() \ + || cpu_is_sama5d3())) #define cpu_has_upll() (cpu_is_at91sam9g45() \ || cpu_is_at91sam9x5() \ -- cgit v0.10.2 From 7319ee0495b7a0c7aee69beb580cd293d5e21ef4 Mon Sep 17 00:00:00 2001 From: Nicolas Ferre Date: Mon, 24 Jun 2013 10:21:40 +0200 Subject: ARM: at91/PMC: at91sam9n12 family has a PLLB Signed-off-by: Nicolas Ferre Acked-by: Bo Shen diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index 085a79d..978de42 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91/clock.c @@ -75,7 +75,6 @@ EXPORT_SYMBOL_GPL(at91_pmc_base); #define cpu_has_pllb() (!(cpu_is_at91sam9rl() \ || cpu_is_at91sam9g45() \ || cpu_is_at91sam9x5() \ - || cpu_is_at91sam9n12() \ || cpu_is_sama5d3())) #define cpu_has_upll() (cpu_is_at91sam9g45() \ -- cgit v0.10.2 From d04e5b694e996e7cbbe3748924a259a647c3456d Mon Sep 17 00:00:00 2001 From: Nicolas Ferre Date: Mon, 24 Jun 2013 18:07:34 +0200 Subject: ARM: at91/PMC: fix at91sam9n12 USB FS init at91sam9n12 has Full-speed only USB. So we should add it to the list in at91_pllb_usbfs_clock_init() function. Moreover, at91sam9n12 has an unusual PMC in the sense that it has a PLLB but also has a USB clock register. Signed-off-by: Nicolas Ferre Tested-by: Bo Shen diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index 978de42..661111f 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91/clock.c @@ -489,7 +489,7 @@ static int at91_clk_show(struct seq_file *s, void *unused) seq_printf(s, "UCKR = %8x\n", uckr); } seq_printf(s, "MCKR = %8x\n", at91_pmc_read(AT91_PMC_MCKR)); - if (cpu_has_upll()) + if (cpu_has_upll() || cpu_is_at91sam9n12()) seq_printf(s, "USB = %8x\n", at91_pmc_read(AT91_PMC_USB)); seq_printf(s, "SR = %8x\n", sr); @@ -614,6 +614,8 @@ static u32 __init at91_usb_rate(struct clk *pll, u32 freq, u32 reg) { if (pll == &pllb && (reg & AT91_PMC_USB96M)) return freq / 2; + else if (pll == &utmi_clk || cpu_is_at91sam9n12()) + return freq / (1 + ((reg & AT91_PMC_OHCIUSBDIV) >> 8)); else return freq; } @@ -683,6 +685,8 @@ static struct clk *const standard_pmc_clocks[] __initconst = { /* PLLB generated USB full speed clock init */ static void __init at91_pllb_usbfs_clock_init(unsigned long main_clock) { + unsigned int reg; + /* * USB clock init: choose 48 MHz PLLB value, * disable 48MHz clock during usb peripheral suspend. @@ -691,22 +695,35 @@ static void __init at91_pllb_usbfs_clock_init(unsigned long main_clock) */ uhpck.parent = &pllb; - at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) | AT91_PMC_USB96M; + reg = at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2); pllb.rate_hz = at91_pll_rate(&pllb, main_clock, at91_pllb_usb_init); if (cpu_is_at91rm9200()) { + reg = at91_pllb_usb_init |= AT91_PMC_USB96M; uhpck.pmc_mask = AT91RM9200_PMC_UHP; udpck.pmc_mask = AT91RM9200_PMC_UDP; at91_pmc_write(AT91_PMC_SCER, AT91RM9200_PMC_MCKUDP); } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || cpu_is_at91sam9263() || cpu_is_at91sam9g20() || cpu_is_at91sam9g10()) { + reg = at91_pllb_usb_init |= AT91_PMC_USB96M; + uhpck.pmc_mask = AT91SAM926x_PMC_UHP; + udpck.pmc_mask = AT91SAM926x_PMC_UDP; + } else if (cpu_is_at91sam9n12()) { + /* Divider for USB clock is in USB clock register for 9n12 */ + reg = AT91_PMC_USBS_PLLB; + + /* For PLLB output 96M, set usb divider 2 (USBDIV + 1) */ + reg |= AT91_PMC_OHCIUSBDIV_2; + at91_pmc_write(AT91_PMC_USB, reg); + + /* Still setup masks */ uhpck.pmc_mask = AT91SAM926x_PMC_UHP; udpck.pmc_mask = AT91SAM926x_PMC_UDP; } at91_pmc_write(AT91_CKGR_PLLBR, 0); - udpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init); - uhpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init); + udpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, reg); + uhpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, reg); } /* UPLL generated USB full speed clock init */ diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h b/arch/arm/mach-at91/include/mach/at91_pmc.h index 2bd7f51..c604cc6 100644 --- a/arch/arm/mach-at91/include/mach/at91_pmc.h +++ b/arch/arm/mach-at91/include/mach/at91_pmc.h @@ -130,7 +130,10 @@ extern void __iomem *at91_pmc_base; #define AT91_PMC_USBS (0x1 << 0) /* USB OHCI Input clock selection */ #define AT91_PMC_USBS_PLLA (0 << 0) #define AT91_PMC_USBS_UPLL (1 << 0) +#define AT91_PMC_USBS_PLLB (1 << 0) /* [AT91SAMN12 only] */ #define AT91_PMC_OHCIUSBDIV (0xF << 8) /* Divider for USB OHCI Clock */ +#define AT91_PMC_OHCIUSBDIV_1 (0x0 << 8) +#define AT91_PMC_OHCIUSBDIV_2 (0x1 << 8) #define AT91_PMC_SMD 0x3c /* Soft Modem Clock Register [some SAM9 only] */ #define AT91_PMC_SMDS (0x1 << 0) /* SMD input clock selection */ -- cgit v0.10.2 From bd2da9ca138e446824a7542b381aed442fef4caa Mon Sep 17 00:00:00 2001 From: Nicolas Ferre Date: Mon, 24 Jun 2013 18:09:25 +0200 Subject: ARM: at91/PMC: use at91_usb_rate() for UTMI PLL We are using this function, now that we have introduced the support for UTMI clock for computing the USB host rate. Signed-off-by: Nicolas Ferre Tested-by: Bo Shen diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index 661111f..6b2630a 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91/clock.c @@ -742,8 +742,7 @@ static void __init at91_upll_usbfs_clock_init(unsigned long main_clock) /* Now set uhpck values */ uhpck.parent = &utmi_clk; uhpck.pmc_mask = AT91SAM926x_PMC_UHP; - uhpck.rate_hz = utmi_clk.rate_hz; - uhpck.rate_hz /= 1 + ((at91_pmc_read(AT91_PMC_USB) & AT91_PMC_OHCIUSBDIV) >> 8); + uhpck.rate_hz = at91_usb_rate(&utmi_clk, utmi_clk.rate_hz, usbr); } static int __init at91_pmc_init(unsigned long main_clock) -- cgit v0.10.2