From fccc2b3675371e4077d7aa7f23d116e97dcdcd07 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Thu, 18 Feb 2016 14:21:54 +0100 Subject: soc: versatile: dynamically detect RealView HBI numbers We cannot pile all numbers on this list, just print the three hex digits representing the board ID so we can handle all the new RealView boards. Cc: Arnd Bergmann Signed-off-by: Linus Walleij --- drivers/soc/versatile/soc-realview.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/soc/versatile/soc-realview.c b/drivers/soc/versatile/soc-realview.c index c337764de867..282e371378ce 100644 --- a/drivers/soc/versatile/soc-realview.c +++ b/drivers/soc/versatile/soc-realview.c @@ -31,18 +31,6 @@ static const struct of_device_id realview_soc_of_match[] = { static u32 realview_coreid; -static const char *realview_board_str(u32 id) -{ - switch ((id >> 16) & 0xfff) { - case 0x0147: - return "HBI-0147"; - case 0x0159: - return "HBI-0159"; - default: - return "Unknown"; - } -} - static const char *realview_arch_str(u32 id) { switch ((id >> 8) & 0xf) { @@ -69,7 +57,7 @@ static ssize_t realview_get_board(struct device *dev, struct device_attribute *attr, char *buf) { - return sprintf(buf, "%s\n", realview_board_str(realview_coreid)); + return sprintf(buf, "HBI-%03x\n", ((realview_coreid >> 16) & 0xfff)); } static struct device_attribute realview_board_attr = @@ -133,8 +121,9 @@ static int realview_soc_probe(struct platform_device *pdev) device_create_file(soc_device_to_device(soc_dev), &realview_arch_attr); device_create_file(soc_device_to_device(soc_dev), &realview_build_attr); - dev_info(&pdev->dev, "RealView Syscon Core ID: 0x%08x\n", - realview_coreid); + dev_info(&pdev->dev, "RealView Syscon Core ID: 0x%08x, HBI-%03x\n", + realview_coreid, + ((realview_coreid >> 16) & 0xfff)); /* FIXME: add attributes for SoC to sysfs */ return 0; } -- cgit From 7fbbe38aa11816ef15844238e8eb3164b887d265 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 23 Feb 2016 14:35:58 +0100 Subject: ARM: realview: hide unused 'pmu_device' object The pmu_device is only accessed when CACHE_L2X0 is enabled, and we get a warning otherwise: mach-realview/realview_pbx.c:274:31: error: 'pmu_device' defined but not used [-Werror=unused-variable] This adds another #ifdef for it. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij --- arch/arm/mach-realview/realview_pbx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index b9f0757787ac..be1cec5fe3ad 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c @@ -248,6 +248,7 @@ static struct resource realview_pbx_isp1761_resources[] = { }, }; +#ifdef CONFIG_CACHE_L2X0 static struct resource pmu_resources[] = { [0] = { .start = IRQ_PBX_PMU_CPU0, @@ -277,6 +278,7 @@ static struct platform_device pmu_device = { .num_resources = ARRAY_SIZE(pmu_resources), .resource = pmu_resources, }; +#endif static void __init gic_init_irq(void) { -- cgit From 26d5192953d88d6231d173281848a1c61f9e5d34 Mon Sep 17 00:00:00 2001 From: Peter Griffin Date: Thu, 17 Mar 2016 13:43:11 +0000 Subject: ARM: rockchip: Fix use of plain integer as NULL pointer This fixes the following sparse build warning: mach-rockchip/platsmp.c:68:43: Using plain integer as NULL pointer Signed-off-by: Peter Griffin Acked-by: Lee Jones Signed-off-by: Heiko Stuebner --- arch/arm/mach-rockchip/platsmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c index d42a07e33482..4d827a069d49 100644 --- a/arch/arm/mach-rockchip/platsmp.c +++ b/arch/arm/mach-rockchip/platsmp.c @@ -65,7 +65,7 @@ static struct reset_control *rockchip_get_core_reset(int cpu) if (dev) np = dev->of_node; else - np = of_get_cpu_node(cpu, 0); + np = of_get_cpu_node(cpu, NULL); return of_reset_control_get(np, NULL); } -- cgit From 371a13d41599dd86e74625d542a6dc345ed1f312 Mon Sep 17 00:00:00 2001 From: Petr Kulhavy Date: Wed, 24 Feb 2016 16:41:49 +0100 Subject: ARM: DaVinci USB: removed deprecated properties from MUSB config The following properties of the musb_hdrc_config structure are deprecated and no longer required/used by the MUSB driver: .dyn_fifo .soft_con .dma .dma_channels .eps_bits Signed-off-by: Petr Kulhavy Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/usb.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c index b0a6b522575f..6ed5a54ae74d 100644 --- a/arch/arm/mach-davinci/usb.c +++ b/arch/arm/mach-davinci/usb.c @@ -19,27 +19,11 @@ #define DA8XX_USB1_BASE 0x01e25000 #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) -static struct musb_hdrc_eps_bits musb_eps[] = { - { "ep1_tx", 8, }, - { "ep1_rx", 8, }, - { "ep2_tx", 8, }, - { "ep2_rx", 8, }, - { "ep3_tx", 5, }, - { "ep3_rx", 5, }, - { "ep4_tx", 5, }, - { "ep4_rx", 5, }, -}; - static struct musb_hdrc_config musb_config = { .multipoint = true, - .dyn_fifo = true, - .soft_con = true, - .dma = true, .num_eps = 5, - .dma_channels = 8, .ram_bits = 10, - .eps_bits = musb_eps, }; static struct musb_hdrc_platform_data usb_data = { -- cgit From 2f44a8d141bcfc866d7f3672563a7da735dacce6 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Mon, 29 Feb 2016 16:33:24 -0600 Subject: ARM: davinci: simplify call to of populate Take advantage of of_platoform_default_populate convience function. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/da8xx-dt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index c4b5808ca7c1..358ab34c4f94 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -54,9 +54,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { static void __init da850_init_machine(void) { - of_platform_populate(NULL, of_default_bus_match_table, - da850_auxdata_lookup, NULL); - + of_platform_default_populate(NULL, da850_auxdata_lookup, NULL); } static const char *const da850_boards_compat[] __initconst = { -- cgit From 9fb69a27e938ca1079c16c213f5e8c8d90d6e2f3 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Mon, 29 Feb 2016 16:33:25 -0600 Subject: ARM: davinci: remove unused DA8XX_NUM_UARTS DA8X_NUM_UARTS not used in the code anywhere and should be determined by DT anyway. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/da8xx-dt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index 358ab34c4f94..08880e70bc03 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -18,8 +18,6 @@ #include "cp_intc.h" #include -#define DA8XX_NUM_UARTS 3 - static const struct of_device_id const da8xx_irq_match[] __initconst = { { .compatible = "ti,cp-intc", .data = cp_intc_of_init, }, { } -- cgit From 9a7f2fc8408fdc0e3b417f670c17ed70d5d1c114 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Mon, 29 Feb 2016 16:33:26 -0600 Subject: ARM: davinci: use IRQCHIP_DECLARE for cp_intc Remove boilerplate code by using IRQCHIP_DECLARE macro. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/cp_intc.c | 3 +++ arch/arm/mach-davinci/da8xx-dt.c | 11 ----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-davinci/cp_intc.c b/arch/arm/mach-davinci/cp_intc.c index 1a68d2477de6..94085d21018e 100644 --- a/arch/arm/mach-davinci/cp_intc.c +++ b/arch/arm/mach-davinci/cp_intc.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -210,3 +211,5 @@ void __init cp_intc_init(void) { cp_intc_of_init(NULL, NULL); } + +IRQCHIP_DECLARE(cp_intc, "ti,cp-intc", cp_intc_of_init); diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index 08880e70bc03..fac6d43e7fdb 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -18,16 +18,6 @@ #include "cp_intc.h" #include -static const struct of_device_id const da8xx_irq_match[] __initconst = { - { .compatible = "ti,cp-intc", .data = cp_intc_of_init, }, - { } -}; - -static void __init da8xx_init_irq(void) -{ - of_irq_init(da8xx_irq_match); -} - static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("ti,davinci-i2c", 0x01c22000, "i2c_davinci.1", NULL), OF_DEV_AUXDATA("ti,davinci-wdt", 0x01c21000, "davinci-wdt", NULL), @@ -64,7 +54,6 @@ static const char *const da850_boards_compat[] __initconst = { DT_MACHINE_START(DA850_DT, "Generic DA850/OMAP-L138/AM18x") .map_io = da850_init, - .init_irq = da8xx_init_irq, .init_time = davinci_timer_init, .init_machine = da850_init_machine, .dt_compat = da850_boards_compat, -- cgit From fc5cf80ac4e0b2727c7af1a70bca277b82771cf3 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Fri, 15 Apr 2016 08:45:32 -0700 Subject: of/platform: Allow secondary compatible match in of_dev_lookup We currently try to match of_dev_auxdata based on compatible, IO address, and device name. But in some cases we have multiple instances of drivers that can use the same auxdata. Let's add an additional secondary lookup for generic compatible match for auxdata if no device specific match is found. This does not change the existing matching, and still allows adding device specific auxdata. This simplifies things as specifying the IO address and device name is prone errors as it requires maintaining an in kernel database for each SoC. To specify a generic match, all that is needed is to add a OF_DEV_AUXDATA entry with no device instance specified: OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata), As the auxdata is already initialized only for the booted SoC, there's not much of a chance of getting things wrong. Let's also fix two checkpatch warnings while at it to add a space before parenthesis in the for loop, and remove a comparison to NULL by using !auxdata->compatible. Acked-by: Rob Herring Signed-off-by: Tony Lindgren --- drivers/of/platform.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 8d103e4968be..16e8daffac06 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -297,19 +297,37 @@ static struct amba_device *of_amba_device_create(struct device_node *node, static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *lookup, struct device_node *np) { + const struct of_dev_auxdata *auxdata; struct resource res; + int compatible = 0; if (!lookup) return NULL; - for(; lookup->compatible != NULL; lookup++) { - if (!of_device_is_compatible(np, lookup->compatible)) + auxdata = lookup; + for (; auxdata->compatible; auxdata++) { + if (!of_device_is_compatible(np, auxdata->compatible)) continue; + compatible++; if (!of_address_to_resource(np, 0, &res)) - if (res.start != lookup->phys_addr) + if (res.start != auxdata->phys_addr) continue; - pr_debug("%s: devname=%s\n", np->full_name, lookup->name); - return lookup; + pr_debug("%s: devname=%s\n", np->full_name, auxdata->name); + return auxdata; + } + + if (!compatible) + return NULL; + + /* Try compatible match if no phys_addr and name are specified */ + auxdata = lookup; + for (; auxdata->compatible; auxdata++) { + if (!of_device_is_compatible(np, auxdata->compatible)) + continue; + if (!auxdata->phys_addr && !auxdata->name) { + pr_debug("%s: compatible match\n", np->full_name); + return auxdata; + } } return NULL; -- cgit From d4f414e559caf36d811213e56b56e9b6957caab1 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Fri, 15 Apr 2016 08:45:33 -0700 Subject: ARM: OMAP2+: Simplify auxdata by using the generic match We can now just use the compatible if there's no need to have device instance specific auxdata. Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/pdata-quirks.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index a935d28443da..6ae132aadf6a 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -492,9 +492,6 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("tlv320aic3x", 0x18, "2-0018", &n810_aic33_data), #endif #ifdef CONFIG_ARCH_OMAP3 - OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002030, "48002030.pinmux", &pcs_pdata), - OF_DEV_AUXDATA("ti,omap3-padconf", 0x480025a0, "480025a0.pinmux", &pcs_pdata), - OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002a00, "48002a00.pinmux", &pcs_pdata), OF_DEV_AUXDATA("ti,omap2-iommu", 0x5d000000, "5d000000.mmu", &omap3_iommu_pdata), /* Only on am3517 */ @@ -506,19 +503,7 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("ti,am3352-wkup-m3", 0x44d00000, "44d00000.wkup_m3", &wkup_m3_data), #endif -#ifdef CONFIG_ARCH_OMAP4 - OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a100040, "4a100040.pinmux", &pcs_pdata), - OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a31e040, "4a31e040.pinmux", &pcs_pdata), -#endif -#ifdef CONFIG_SOC_OMAP5 - OF_DEV_AUXDATA("ti,omap5-padconf", 0x4a002840, "4a002840.pinmux", &pcs_pdata), - OF_DEV_AUXDATA("ti,omap5-padconf", 0x4ae0c840, "4ae0c840.pinmux", &pcs_pdata), -#endif -#ifdef CONFIG_SOC_DRA7XX - OF_DEV_AUXDATA("ti,dra7-padconf", 0x4a003400, "4a003400.pinmux", &pcs_pdata), -#endif #ifdef CONFIG_SOC_AM43XX - OF_DEV_AUXDATA("ti,am437-padconf", 0x44e10800, "44e10800.pinmux", &pcs_pdata), OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3", &wkup_m3_data), #endif @@ -531,6 +516,8 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("ti,omap4-iommu", 0x55082000, "55082000.mmu", &omap4_iommu_pdata), #endif + /* Common auxdata */ + OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata), { /* sentinel */ }, }; -- cgit From 3b9d78a4f3886f84db0a58dc986fbabb937799c6 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 25 Apr 2016 15:13:10 +0200 Subject: ARM: debug: remove extraneous DEBUG_HI3716_UART option DEBUG_HI3716_UART was supposed to be renamed to DEBUG_HIX5HD2_UART, but accidentally both got left in place, which results in a build error when CONFIG_DEBUG_UART_PHYS is not set as it should be. This removes the old symbol. Signed-off-by: Arnd Bergmann Fixes: 12aae3097454 ("ARM: debug: Rename Hi3716 to HIX5HD2") Acked-by: Wei Xu --- arch/arm/Kconfig.debug | 8 -------- 1 file changed, 8 deletions(-) diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 1098e91d6d3f..19a3dcf5eb2e 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -268,14 +268,6 @@ choice Say Y here if you want kernel low-level debugging support on HI3620 UART. - config DEBUG_HI3716_UART - bool "Hisilicon Hi3716 Debug UART" - depends on ARCH_HI3xxx - select DEBUG_UART_PL01X - help - Say Y here if you want kernel low-level debugging support - on HI3716 UART. - config DEBUG_HIGHBANK_UART bool "Kernel low-level debugging messages via Highbank UART" depends on ARCH_HIGHBANK -- cgit From 8453c5cafd32c4d6bd13ec4a62d4b639f4edb222 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Thu, 28 Apr 2016 08:21:03 -0700 Subject: ARM: OMAP2+: Add more functions to pwm pdata for ir-rx51 Before we start removing omap3 legacy booting support, let's make n900 DT booting behave the same way for ir-rx51 as the legacy booting does. For now, we need to pass pdata to the ir-rx51 driver. This means that the n900 tree can move to using DT based booting without having to carry all the legacy platform data with it when it gets dropped from the mainline tree. Note that the ir-rx51 driver is currently disabled because of the dependency to !ARCH_MULTIPLATFORM. This will get sorted out later with the help of drivers/pwm/pwm-omap-dmtimer.c. But first we need to add chained IRQ support to dmtimer code to avoid introducing new custom frameworks. So let's just pass the necessary dmtimer functions to ir-rx51 so we can get it working in the following patch. Cc: Neil Armstrong Tested-by: Ivaylo Dimitrov Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-rx51-peripherals.c | 35 ++++++++++++++++++++++++-- arch/arm/mach-omap2/pdata-quirks.c | 33 +++++++++++++++++++++++- include/linux/platform_data/media/ir-rx51.h | 1 + include/linux/platform_data/pwm_omap_dmtimer.h | 21 ++++++++++++++++ 4 files changed, 87 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index da174c0d603b..9a7073949d1d 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -30,6 +30,8 @@ #include #include +#include + #include #include "common.h" @@ -47,9 +49,8 @@ #include