From 40b0754c1b7260782acf1778b052d192520ad910 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Sat, 21 May 2016 13:51:23 +0200 Subject: [PATCH 01/40] ARM: SAMSUNG: Fix typos Fix some language typos in comments. Signed-off-by: Andrea Gelmini Signed-off-by: Krzysztof Kozlowski --- arch/arm/mach-s3c24xx/include/mach/regs-gpio.h | 2 +- arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 2 +- arch/arm/mach-s3c24xx/mach-n30.c | 2 +- arch/arm/mach-s3c24xx/mach-osiris-dvs.c | 2 +- arch/arm/mach-s3c64xx/include/mach/map.h | 2 +- arch/arm/plat-samsung/include/plat/cpu-freq-core.h | 2 +- arch/arm/plat-samsung/include/plat/fb-s3c2410.h | 2 +- arch/arm/plat-samsung/include/plat/gpio-cfg.h | 2 +- arch/arm/plat-samsung/pm-check.c | 2 +- arch/arm/plat-samsung/watchdog-reset.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h index c6583cfa5835..0d622f3b57a5 100644 --- a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h +++ b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h @@ -520,7 +520,7 @@ #define S3C24XX_EXTINT1 S3C24XX_GPIOREG2(0x8C) #define S3C24XX_EXTINT2 S3C24XX_GPIOREG2(0x90) -/* interrupt filtering conrrol for EINT16..EINT23 */ +/* interrupt filtering control for EINT16..EINT23 */ #define S3C2410_EINFLT0 S3C2410_GPIOREG(0x94) #define S3C2410_EINFLT1 S3C2410_GPIOREG(0x98) #define S3C2410_EINFLT2 S3C2410_GPIOREG(0x9C) diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c index 4cd13ab6496b..65e5f9cb650f 100644 --- a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c +++ b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c @@ -423,7 +423,7 @@ void s3c2410_iotiming_set(struct s3c_cpufreq_config *cfg, * @timings: The IO timing information to fill out. * * Calculate the @timings timing information from the current frequency - * information in @cfg, and the new frequency configur + * information in @cfg, and the new frequency configuration * through all the IO banks, reading the state and then updating @iot * as necessary. * diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c index 171c1f11fd22..070a0d0714a5 100644 --- a/arch/arm/mach-s3c24xx/mach-n30.c +++ b/arch/arm/mach-s3c24xx/mach-n30.c @@ -522,7 +522,7 @@ static void __init n30_hwinit(void) * * The pull ups for H6/H7 are enabled on N30 but not on the * N35/PiN. I suppose is useful for a budget model of the N30 - * with no bluetooh. It doesn't hurt to have the pull ups + * with no bluetooth. It doesn't hurt to have the pull ups * enabled on the N35, so leave them enabled for all models. */ __raw_writel(0x0028aaaa, S3C2410_GPHCON); diff --git a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c index ce2db235dbaf..262ab0744748 100644 --- a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c +++ b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c @@ -143,7 +143,7 @@ static int osiris_dvs_remove(struct platform_device *pdev) return 0; } -/* the CONFIG_PM block is so small, it isn't worth actaully compiling it +/* the CONFIG_PM block is so small, it isn't worth actually compiling it * out if the configuration isn't set. */ static int osiris_dvs_suspend(struct device *dev) diff --git a/arch/arm/mach-s3c64xx/include/mach/map.h b/arch/arm/mach-s3c64xx/include/mach/map.h index f55ccb1ce893..d51873e8f63f 100644 --- a/arch/arm/mach-s3c64xx/include/mach/map.h +++ b/arch/arm/mach-s3c64xx/include/mach/map.h @@ -99,7 +99,7 @@ #define S3C64XX_PA_USB_HSPHY (0x7C100000) -/* compatibiltiy defines. */ +/* compatibility defines. */ #define S3C_PA_TIMER S3C64XX_PA_TIMER #define S3C_PA_HSMMC0 S3C64XX_PA_HSMMC0 #define S3C_PA_HSMMC1 S3C64XX_PA_HSMMC1 diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h b/arch/arm/plat-samsung/include/plat/cpu-freq-core.h index 317c52303288..37cf20e04aff 100644 --- a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h +++ b/arch/arm/plat-samsung/include/plat/cpu-freq-core.h @@ -39,7 +39,7 @@ struct s3c2410_iobank_timing { unsigned int tacs; unsigned int tcos; unsigned int tacc; - unsigned int tcoh; /* nCS hold afrer nOE/nWE */ + unsigned int tcoh; /* nCS hold after nOE/nWE */ unsigned int tcah; /* Address hold after nCS */ unsigned char nwait_en; /* nWait enabled for bank. */ }; diff --git a/arch/arm/plat-samsung/include/plat/fb-s3c2410.h b/arch/arm/plat-samsung/include/plat/fb-s3c2410.h index 4e5d9588b5ba..1f2972a74e9f 100644 --- a/arch/arm/plat-samsung/include/plat/fb-s3c2410.h +++ b/arch/arm/plat-samsung/include/plat/fb-s3c2410.h @@ -48,7 +48,7 @@ struct s3c2410fb_display { struct s3c2410fb_mach_info { - struct s3c2410fb_display *displays; /* attached diplays info */ + struct s3c2410fb_display *displays; /* attached displays info */ unsigned num_displays; /* number of defined displays */ unsigned default_display; diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg.h b/arch/arm/plat-samsung/include/plat/gpio-cfg.h index b5294eff18b5..21391faab068 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-cfg.h +++ b/arch/arm/plat-samsung/include/plat/gpio-cfg.h @@ -35,7 +35,7 @@ struct samsung_gpio_chip; * struct samsung_gpio_cfg GPIO configuration * @cfg_eint: Configuration setting when used for external interrupt source * @get_pull: Read the current pull configuration for the GPIO - * @set_pull: Set the current pull configuraiton for the GPIO + * @set_pull: Set the current pull configuration for the GPIO * @set_config: Set the current configuration for the GPIO * @get_config: Read the current configuration for the GPIO * diff --git a/arch/arm/plat-samsung/pm-check.c b/arch/arm/plat-samsung/pm-check.c index 70f2f699bed3..d63516374f7c 100644 --- a/arch/arm/plat-samsung/pm-check.c +++ b/arch/arm/plat-samsung/pm-check.c @@ -5,7 +5,7 @@ * http://armlinux.simtec.co.uk * Ben Dooks * - * S3C Power Mangament - suspend/resume memory corruptiuon check. + * S3C Power Mangament - suspend/resume memory corruption check. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/arch/arm/plat-samsung/watchdog-reset.c b/arch/arm/plat-samsung/watchdog-reset.c index 2ecb50bea044..307d8ad96a78 100644 --- a/arch/arm/plat-samsung/watchdog-reset.c +++ b/arch/arm/plat-samsung/watchdog-reset.c @@ -3,7 +3,7 @@ * Copyright (c) 2008 Simtec Electronics * Ben Dooks * - * Coyright (c) 2013 Tomasz Figa + * Copyright (c) 2013 Tomasz Figa * * Watchdog reset support for Samsung SoCs. * From da81593a5a0d93fcca45baa15d0628ba8405695b Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Wed, 1 Jun 2016 16:04:15 +0530 Subject: [PATCH 02/40] ARM: s3c24xx: Sort cpufreq tables Some later changes in cpufreq core require these tables to be sorted based on ascending order of their frequencies. There was only one offender. Fix it and add comments over the arrays. Signed-off-by: Viresh Kumar Signed-off-by: Krzysztof Kozlowski --- arch/arm/mach-s3c24xx/pll-s3c2410.c | 3 ++- arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c | 1 + arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-s3c24xx/pll-s3c2410.c b/arch/arm/mach-s3c24xx/pll-s3c2410.c index 5e37d368594b..7ee4924a543d 100644 --- a/arch/arm/mach-s3c24xx/pll-s3c2410.c +++ b/arch/arm/mach-s3c24xx/pll-s3c2410.c @@ -32,11 +32,12 @@ #include #include +/* This array should be sorted in ascending order of the frequencies */ static struct cpufreq_frequency_table pll_vals_12MHz[] = { { .frequency = 34000000, .driver_data = PLLVAL(82, 2, 3), }, { .frequency = 45000000, .driver_data = PLLVAL(82, 1, 3), }, - { .frequency = 51000000, .driver_data = PLLVAL(161, 3, 3), }, { .frequency = 48000000, .driver_data = PLLVAL(120, 2, 3), }, + { .frequency = 51000000, .driver_data = PLLVAL(161, 3, 3), }, { .frequency = 56000000, .driver_data = PLLVAL(142, 2, 3), }, { .frequency = 68000000, .driver_data = PLLVAL(82, 2, 2), }, { .frequency = 79000000, .driver_data = PLLVAL(71, 1, 2), }, diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c index b355fca6cc2e..a3fbfed75e28 100644 --- a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c +++ b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c @@ -20,6 +20,7 @@ #include #include +/* This array should be sorted in ascending order of the frequencies */ static struct cpufreq_frequency_table s3c2440_plls_12[] = { { .frequency = 75000000, .driver_data = PLLVAL(0x75, 3, 3), }, /* FVco 600.000000 */ { .frequency = 80000000, .driver_data = PLLVAL(0x98, 4, 3), }, /* FVco 640.000000 */ diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c index be9a248b5ce9..bcff89fd9871 100644 --- a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c +++ b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c @@ -20,6 +20,7 @@ #include #include +/* This array should be sorted in ascending order of the frequencies */ static struct cpufreq_frequency_table s3c2440_plls_169344[] = { { .frequency = 78019200, .driver_data = PLLVAL(121, 5, 3), }, /* FVco 624.153600 */ { .frequency = 84067200, .driver_data = PLLVAL(131, 5, 3), }, /* FVco 672.537600 */ From 0c2b4504b0ebff55b8aae2ed4816b1ef6b351c36 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Wed, 1 Jun 2016 20:37:46 +0900 Subject: [PATCH 03/40] ARM: uniphier: drop code for old DT binding Commit 307d40c56b0c ("ARM: uniphier: rework SMP code to support new System Bus binding") added a new DT binding for SMP code, but still kept old code for the backward compatibility. Linux 4.6 was out with both bindings supported, so it should not hurt to drop the old code now. Moreover, the mainline code are currently not used for any of our products, so this change has no impact on our customers in any way. Signed-off-by: Masahiro Yamada Signed-off-by: Olof Johansson --- arch/arm/mach-uniphier/platsmp.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-uniphier/platsmp.c b/arch/arm/mach-uniphier/platsmp.c index e802ca836ec7..9978c41128f6 100644 --- a/arch/arm/mach-uniphier/platsmp.c +++ b/arch/arm/mach-uniphier/platsmp.c @@ -101,21 +101,13 @@ static int __init uniphier_smp_prepare_trampoline(unsigned int max_cpus) np = of_find_compatible_node(NULL, NULL, "socionext,uniphier-smpctrl"); ret = of_address_to_resource(np, 0, &res); of_node_put(np); - if (!ret) { - rom_rsv2_phys = res.start + UNIPHIER_SMPCTRL_ROM_RSV2; - } else { - /* try old binding too */ - np = of_find_compatible_node(NULL, NULL, - "socionext,uniphier-system-bus-controller"); - ret = of_address_to_resource(np, 1, &res); - of_node_put(np); - if (ret) { - pr_err("failed to get resource of SMP control\n"); - return ret; - } - rom_rsv2_phys = res.start + 0x1000 + UNIPHIER_SMPCTRL_ROM_RSV2; + if (ret) { + pr_err("failed to get resource of SMP control\n"); + return ret; } + rom_rsv2_phys = res.start + UNIPHIER_SMPCTRL_ROM_RSV2; + ret = uniphier_smp_copy_trampoline(rom_rsv2_phys); if (ret) return ret; From 5c34a4e89c743339f78cafb2f2a826a010f0746a Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Thu, 2 Jun 2016 14:10:16 +0200 Subject: [PATCH 04/40] ARM: do away with ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This replaces: - "select ARCH_REQUIRE_GPIOLIB" with "select GPIOLIB" as this can now be selected directly. - "select ARCH_WANT_OPTIONAL_GPIOLIB" with no dependency: GPIOLIB is now selectable by everyone, so we need not declare our intent to select it. When ordering the symbols the following rationale was used: if the selects were in alphabetical order, I moved select GPIOLIB to be in alphabetical order, but if the selects were not maintained in alphabetical order, I just replaced "select ARCH_REQUIRE_GPIOLIB" with "select GPIOLIB". Cc: Michael Büsch Cc: arm@kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson --- arch/arm/Kconfig | 34 +++++++++++++++----------------- arch/arm/mach-at91/Kconfig | 2 +- arch/arm/mach-bcm/Kconfig | 7 +++---- arch/arm/mach-berlin/Kconfig | 2 +- arch/arm/mach-digicolor/Kconfig | 2 +- arch/arm/mach-exynos/Kconfig | 2 +- arch/arm/mach-imx/Kconfig | 2 +- arch/arm/mach-integrator/Kconfig | 4 ++-- arch/arm/mach-meson/Kconfig | 2 +- arch/arm/mach-mmp/Kconfig | 2 +- arch/arm/mach-moxart/Kconfig | 2 +- arch/arm/mach-mv78xx0/Kconfig | 2 +- arch/arm/mach-mvebu/Kconfig | 4 ++-- arch/arm/mach-mxs/Kconfig | 2 +- arch/arm/mach-nomadik/Kconfig | 2 +- arch/arm/mach-omap2/Kconfig | 2 +- arch/arm/mach-orion5x/Kconfig | 2 +- arch/arm/mach-oxnas/Kconfig | 2 +- arch/arm/mach-picoxcell/Kconfig | 2 +- arch/arm/mach-prima2/Kconfig | 2 +- arch/arm/mach-rockchip/Kconfig | 2 +- arch/arm/mach-s3c24xx/Kconfig | 2 +- arch/arm/mach-s3c64xx/Kconfig | 2 +- arch/arm/mach-s5pv210/Kconfig | 2 +- arch/arm/mach-shmobile/Kconfig | 2 +- arch/arm/mach-spear/Kconfig | 2 +- arch/arm/mach-sti/Kconfig | 2 +- arch/arm/mach-sunxi/Kconfig | 2 +- arch/arm/mach-tegra/Kconfig | 2 +- arch/arm/mach-u300/Kconfig | 2 +- arch/arm/mach-ux500/Kconfig | 2 +- arch/arm/mach-vexpress/Kconfig | 2 +- arch/arm/mach-vt8500/Kconfig | 2 +- 33 files changed, 52 insertions(+), 55 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 90542db1220d..a0af11b90236 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -327,7 +327,6 @@ choice config ARCH_MULTIPLATFORM bool "Allow multiple platforms to be selected" depends on MMU - select ARCH_WANT_OPTIONAL_GPIOLIB select ARM_HAS_SG_CHAIN select ARM_PATCH_PHYS_VIRT select AUTO_ZRELADDR @@ -342,7 +341,6 @@ config ARCH_MULTIPLATFORM config ARM_SINGLE_ARMV7M bool "ARMv7-M based platforms (Cortex-M0/M3/M4)" depends on !MMU - select ARCH_WANT_OPTIONAL_GPIOLIB select ARM_NVIC select AUTO_ZRELADDR select CLKSRC_OF @@ -356,12 +354,12 @@ config ARM_SINGLE_ARMV7M config ARCH_CLPS711X bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" - select ARCH_REQUIRE_GPIOLIB select AUTO_ZRELADDR select CLKSRC_MMIO select COMMON_CLK select CPU_ARM720T select GENERIC_CLOCKEVENTS + select GPIOLIB select MFD_SYSCON select SOC_BUS help @@ -369,10 +367,10 @@ config ARCH_CLPS711X config ARCH_GEMINI bool "Cortina Systems Gemini" - select ARCH_REQUIRE_GPIOLIB select CLKSRC_MMIO select CPU_FA526 select GENERIC_CLOCKEVENTS + select GPIOLIB help Support for the Cortina Systems Gemini family SoCs @@ -393,7 +391,6 @@ config ARCH_EBSA110 config ARCH_EP93XX bool "EP93xx-based" select ARCH_HAS_HOLES_MEMORYMODEL - select ARCH_REQUIRE_GPIOLIB select ARM_AMBA select ARM_PATCH_PHYS_VIRT select ARM_VIC @@ -402,6 +399,7 @@ config ARCH_EP93XX select CLKSRC_MMIO select CPU_ARM920T select GENERIC_CLOCKEVENTS + select GPIOLIB help This enables support for the Cirrus EP93xx series of CPUs. @@ -442,9 +440,9 @@ config ARCH_IOP13XX config ARCH_IOP32X bool "IOP32x-based" depends on MMU - select ARCH_REQUIRE_GPIOLIB select CPU_XSCALE select GPIO_IOP + select GPIOLIB select NEED_RET_TO_USER select PCI select PLAT_IOP @@ -455,9 +453,9 @@ config ARCH_IOP32X config ARCH_IOP33X bool "IOP33x-based" depends on MMU - select ARCH_REQUIRE_GPIOLIB select CPU_XSCALE select GPIO_IOP + select GPIOLIB select NEED_RET_TO_USER select PCI select PLAT_IOP @@ -468,12 +466,12 @@ config ARCH_IXP4XX bool "IXP4xx-based" depends on MMU select ARCH_HAS_DMA_SET_COHERENT_MASK - select ARCH_REQUIRE_GPIOLIB select ARCH_SUPPORTS_BIG_ENDIAN select CLKSRC_MMIO select CPU_XSCALE select DMABOUNCE if PCI select GENERIC_CLOCKEVENTS + select GPIOLIB select MIGHT_HAVE_PCI select NEED_MACH_IO_H select USB_EHCI_BIG_ENDIAN_DESC @@ -483,9 +481,9 @@ config ARCH_IXP4XX config ARCH_DOVE bool "Marvell Dove" - select ARCH_REQUIRE_GPIOLIB select CPU_PJ4 select GENERIC_CLOCKEVENTS + select GPIOLIB select MIGHT_HAVE_PCI select MULTI_IRQ_HANDLER select MVEBU_MBUS @@ -499,10 +497,10 @@ config ARCH_DOVE config ARCH_KS8695 bool "Micrel/Kendin KS8695" - select ARCH_REQUIRE_GPIOLIB select CLKSRC_MMIO select CPU_ARM922T select GENERIC_CLOCKEVENTS + select GPIOLIB select NEED_MACH_MEMORY_H help Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based @@ -510,11 +508,11 @@ config ARCH_KS8695 config ARCH_W90X900 bool "Nuvoton W90X900 CPU" - select ARCH_REQUIRE_GPIOLIB select CLKDEV_LOOKUP select CLKSRC_MMIO select CPU_ARM926T select GENERIC_CLOCKEVENTS + select GPIOLIB help Support for Nuvoton (Winbond logic dept.) ARM9 processor, At present, the w90x900 has been renamed nuc900, regarding @@ -526,13 +524,13 @@ config ARCH_W90X900 config ARCH_LPC32XX bool "NXP LPC32XX" - select ARCH_REQUIRE_GPIOLIB select ARM_AMBA select CLKDEV_LOOKUP select CLKSRC_LPC32XX select COMMON_CLK select CPU_ARM926T select GENERIC_CLOCKEVENTS + select GPIOLIB select MULTI_IRQ_HANDLER select SPARSE_IRQ select USE_OF @@ -543,7 +541,6 @@ config ARCH_PXA bool "PXA2xx/PXA3xx-based" depends on MMU select ARCH_MTD_XIP - select ARCH_REQUIRE_GPIOLIB select ARM_CPU_SUSPEND if PM select AUTO_ZRELADDR select COMMON_CLK @@ -554,6 +551,7 @@ config ARCH_PXA select CPU_XSCALE if !CPU_XSC3 select GENERIC_CLOCKEVENTS select GPIO_PXA + select GPIOLIB select HAVE_IDE select IRQ_DOMAIN select MULTI_IRQ_HANDLER @@ -584,7 +582,6 @@ config ARCH_RPC config ARCH_SA1100 bool "SA1100-based" select ARCH_MTD_XIP - select ARCH_REQUIRE_GPIOLIB select ARCH_SPARSEMEM_ENABLE select CLKDEV_LOOKUP select CLKSRC_MMIO @@ -593,6 +590,7 @@ config ARCH_SA1100 select CPU_FREQ select CPU_SA1100 select GENERIC_CLOCKEVENTS + select GPIOLIB select HAVE_IDE select IRQ_DOMAIN select ISA @@ -604,12 +602,12 @@ config ARCH_SA1100 config ARCH_S3C24XX bool "Samsung S3C24XX SoCs" - select ARCH_REQUIRE_GPIOLIB select ATAGS select CLKDEV_LOOKUP select CLKSRC_SAMSUNG_PWM select GENERIC_CLOCKEVENTS select GPIO_SAMSUNG + select GPIOLIB select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS @@ -625,12 +623,12 @@ config ARCH_S3C24XX config ARCH_DAVINCI bool "TI DaVinci" select ARCH_HAS_HOLES_MEMORYMODEL - select ARCH_REQUIRE_GPIOLIB select CLKDEV_LOOKUP select CPU_ARM926T select GENERIC_ALLOCATOR select GENERIC_CLOCKEVENTS select GENERIC_IRQ_CHIP + select GPIOLIB select HAVE_IDE select USE_OF select ZONE_DMA @@ -642,11 +640,11 @@ config ARCH_OMAP1 depends on MMU select ARCH_HAS_HOLES_MEMORYMODEL select ARCH_OMAP - select ARCH_REQUIRE_GPIOLIB select CLKDEV_LOOKUP select CLKSRC_MMIO select GENERIC_CLOCKEVENTS select GENERIC_IRQ_CHIP + select GPIOLIB select HAVE_IDE select IRQ_DOMAIN select MULTI_IRQ_HANDLER @@ -868,7 +866,7 @@ source "arch/arm/mach-zynq/Kconfig" config ARCH_EFM32 bool "Energy Micro efm32" depends on ARM_SINGLE_ARMV7M - select ARCH_REQUIRE_GPIOLIB + select GPIOLIB help Support for Energy Micro's (now Silicon Labs) efm32 Giant Gecko processors. diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 08047afdf38e..5204395efda8 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -1,8 +1,8 @@ menuconfig ARCH_AT91 bool "Atmel SoCs" depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V7 - select ARCH_REQUIRE_GPIOLIB select COMMON_CLK_AT91 + select GPIOLIB select PINCTRL select SOC_BUS diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig index 68ab6412392a..8e2ccd2ccf54 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig @@ -17,7 +17,7 @@ config ARCH_BCM_IPROC select ARM_GLOBAL_TIMER select COMMON_CLK_IPROC select CLKSRC_MMIO - select ARCH_REQUIRE_GPIOLIB + select GPIOLIB select ARM_AMBA select PINCTRL help @@ -80,7 +80,7 @@ comment "KONA architected SoCs" config ARCH_BCM_MOBILE bool - select ARCH_REQUIRE_GPIOLIB + select GPIOLIB select ARM_ERRATA_754322 select ARM_ERRATA_775420 select ARM_GIC @@ -137,7 +137,7 @@ comment "Other Architectures" config ARCH_BCM2835 bool "Broadcom BCM2835 family" depends on ARCH_MULTI_V6 || ARCH_MULTI_V7 - select ARCH_REQUIRE_GPIOLIB + select GPIOLIB select ARM_AMBA select ARM_ERRATA_411920 if ARCH_MULTI_V6 select ARM_TIMER_SP804 @@ -176,7 +176,6 @@ config ARCH_BRCMSTB select BRCMSTB_L2_IRQ select BCM7120_L2_IRQ select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE - select ARCH_WANT_OPTIONAL_GPIOLIB select SOC_BRCMSTB select SOC_BUS help diff --git a/arch/arm/mach-berlin/Kconfig b/arch/arm/mach-berlin/Kconfig index ffbfa0bd091b..63ab1d368625 100644 --- a/arch/arm/mach-berlin/Kconfig +++ b/arch/arm/mach-berlin/Kconfig @@ -2,11 +2,11 @@ menuconfig ARCH_BERLIN bool "Marvell Berlin SoCs" depends on ARCH_MULTI_V7 select ARCH_HAS_RESET_CONTROLLER - select ARCH_REQUIRE_GPIOLIB select ARM_GIC select DW_APB_ICTL select DW_APB_TIMER_OF select GENERIC_IRQ_CHIP + select GPIOLIB select MFD_SYSCON select PINCTRL diff --git a/arch/arm/mach-digicolor/Kconfig b/arch/arm/mach-digicolor/Kconfig index fc65b0f1db48..9d05c6c4181d 100644 --- a/arch/arm/mach-digicolor/Kconfig +++ b/arch/arm/mach-digicolor/Kconfig @@ -1,10 +1,10 @@ config ARCH_DIGICOLOR bool "Conexant Digicolor SoC Support" depends on ARCH_MULTI_V7 - select ARCH_REQUIRE_GPIOLIB select CLKSRC_MMIO select DIGICOLOR_TIMER select GENERIC_IRQ_CHIP + select GPIOLIB select MFD_SYSCON select PINCTRL select PINCTRL_DIGICOLOR diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index e65aa7d11b20..7f2d804fbddf 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -12,13 +12,13 @@ menuconfig ARCH_EXYNOS depends on ARCH_MULTI_V7 select ARCH_HAS_BANDGAP select ARCH_HAS_HOLES_MEMORYMODEL - select ARCH_REQUIRE_GPIOLIB select ARM_AMBA select ARM_GIC select COMMON_CLK_SAMSUNG select EXYNOS_THERMAL select EXYNOS_PMU select EXYNOS_SROM + select GPIOLIB select HAVE_ARM_SCU if SMP select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index dd905b9602a0..859e584f1f01 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -1,10 +1,10 @@ menuconfig ARCH_MXC bool "Freescale i.MX family" depends on ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 || ARM_SINGLE_ARMV7M - select ARCH_REQUIRE_GPIOLIB select ARCH_SUPPORTS_BIG_ENDIAN select CLKSRC_IMX_GPT select GENERIC_IRQ_CHIP + select GPIOLIB select PINCTRL select PM_OPP if PM select SOC_BUS diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig index b2a85ba13f08..bc764a89615e 100644 --- a/arch/arm/mach-integrator/Kconfig +++ b/arch/arm/mach-integrator/Kconfig @@ -32,9 +32,9 @@ config ARCH_INTEGRATOR_AP config INTEGRATOR_IMPD1 bool "Include support for Integrator/IM-PD1" depends on ARCH_INTEGRATOR_AP - select ARCH_REQUIRE_GPIOLIB select ARM_VIC - select GPIO_PL061 if GPIOLIB + select GPIO_PL061 + select GPIOLIB help The IM-PD1 is an add-on logic module for the Integrator which allows ARM(R) Ltd PrimeCells to be developed and evaluated. diff --git a/arch/arm/mach-meson/Kconfig b/arch/arm/mach-meson/Kconfig index 31bdd91098b6..fbce42d7390f 100644 --- a/arch/arm/mach-meson/Kconfig +++ b/arch/arm/mach-meson/Kconfig @@ -1,7 +1,7 @@ menuconfig ARCH_MESON bool "Amlogic Meson SoCs" depends on ARCH_MULTI_V7 - select ARCH_REQUIRE_GPIOLIB + select GPIOLIB select GENERIC_IRQ_CHIP select ARM_GIC select CACHE_L2X0 diff --git a/arch/arm/mach-mmp/Kconfig b/arch/arm/mach-mmp/Kconfig index 01c57d369462..94500bed56ab 100644 --- a/arch/arm/mach-mmp/Kconfig +++ b/arch/arm/mach-mmp/Kconfig @@ -1,8 +1,8 @@ menuconfig ARCH_MMP bool "Marvell PXA168/910/MMP2" depends on ARCH_MULTI_V5 || ARCH_MULTI_V7 - select ARCH_REQUIRE_GPIOLIB select GPIO_PXA + select GPIOLIB select PINCTRL select PLAT_PXA help diff --git a/arch/arm/mach-moxart/Kconfig b/arch/arm/mach-moxart/Kconfig index 180d9d216719..6eca2363b81a 100644 --- a/arch/arm/mach-moxart/Kconfig +++ b/arch/arm/mach-moxart/Kconfig @@ -5,7 +5,7 @@ menuconfig ARCH_MOXART select ARM_DMA_MEM_BUFFERABLE select CLKSRC_MMIO select GENERIC_IRQ_CHIP - select ARCH_REQUIRE_GPIOLIB + select GPIOLIB select PHYLIB if NETDEVICES help Say Y here if you want to run your kernel on hardware with a diff --git a/arch/arm/mach-mv78xx0/Kconfig b/arch/arm/mach-mv78xx0/Kconfig index c32f85559c65..81c0f08a2684 100644 --- a/arch/arm/mach-mv78xx0/Kconfig +++ b/arch/arm/mach-mv78xx0/Kconfig @@ -1,8 +1,8 @@ menuconfig ARCH_MV78XX0 bool "Marvell MV78xx0" depends on ARCH_MULTI_V5 - select ARCH_REQUIRE_GPIOLIB select CPU_FEROCEON + select GPIOLIB select MVEBU_MBUS select PCI select PLAT_ORION_LEGACY diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 348044ea650c..f9b6bd306cfe 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -8,7 +8,7 @@ menuconfig ARCH_MVEBU select SOC_BUS select MVEBU_MBUS select ZONE_DMA if ARM_LPAE - select ARCH_REQUIRE_GPIOLIB + select GPIOLIB select PCI_QUIRKS if PCI select OF_ADDRESS_PCI @@ -119,8 +119,8 @@ config MACH_DOVE config MACH_KIRKWOOD bool "Marvell Kirkwood boards" depends on ARCH_MULTI_V5 - select ARCH_REQUIRE_GPIOLIB select CPU_FEROCEON + select GPIOLIB select KIRKWOOD_CLK select MACH_MVEBU_ANY select ORION_IRQCHIP diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index 84794137b175..5d9e5fce7937 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig @@ -15,8 +15,8 @@ config SOC_IMX28 config ARCH_MXS bool "Freescale MXS (i.MX23, i.MX28) support" depends on ARCH_MULTI_V5 - select ARCH_REQUIRE_GPIOLIB select CLKSRC_MMIO + select GPIOLIB select PINCTRL select SOC_BUS select SOC_IMX23 diff --git a/arch/arm/mach-nomadik/Kconfig b/arch/arm/mach-nomadik/Kconfig index 3c61096c8627..b7e9801fdaa4 100644 --- a/arch/arm/mach-nomadik/Kconfig +++ b/arch/arm/mach-nomadik/Kconfig @@ -1,12 +1,12 @@ menuconfig ARCH_NOMADIK bool "ST-Ericsson Nomadik" depends on ARCH_MULTI_V5 - select ARCH_REQUIRE_GPIOLIB select ARM_AMBA select ARM_VIC select CLKSRC_NOMADIK_MTU select CLKSRC_NOMADIK_MTU_SCHED_CLOCK select CPU_ARM926T + select GPIOLIB select MIGHT_HAVE_CACHE_L2X0 select PINCTRL select PINCTRL_NOMADIK diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 0517f0c1581a..b5d3c4c75626 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -88,9 +88,9 @@ config ARCH_OMAP2PLUS select ARCH_HAS_BANDGAP select ARCH_HAS_HOLES_MEMORYMODEL select ARCH_OMAP - select ARCH_REQUIRE_GPIOLIB select CLKSRC_MMIO select GENERIC_IRQ_CHIP + select GPIOLIB select MACH_OMAP_GENERIC select MEMORY select MFD_SYSCON diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig index a2af15822fcb..89bb0fc796bd 100644 --- a/arch/arm/mach-orion5x/Kconfig +++ b/arch/arm/mach-orion5x/Kconfig @@ -1,9 +1,9 @@ menuconfig ARCH_ORION5X bool "Marvell Orion" depends on MMU && ARCH_MULTI_V5 - select ARCH_REQUIRE_GPIOLIB select CPU_FEROCEON select GENERIC_CLOCKEVENTS + select GPIOLIB select MVEBU_MBUS select PCI select PLAT_ORION_LEGACY diff --git a/arch/arm/mach-oxnas/Kconfig b/arch/arm/mach-oxnas/Kconfig index 4fff3c7666df..2dde0acf01fd 100644 --- a/arch/arm/mach-oxnas/Kconfig +++ b/arch/arm/mach-oxnas/Kconfig @@ -1,7 +1,7 @@ menuconfig ARCH_OXNAS bool "Oxford Semiconductor OXNAS Family SoCs" - select ARCH_REQUIRE_GPIOLIB select ARCH_HAS_RESET_CONTROLLER + select GPIOLIB select PINCTRL depends on ARCH_MULTI_V5 help diff --git a/arch/arm/mach-picoxcell/Kconfig b/arch/arm/mach-picoxcell/Kconfig index aef92ba0eacd..1c8f701526c9 100644 --- a/arch/arm/mach-picoxcell/Kconfig +++ b/arch/arm/mach-picoxcell/Kconfig @@ -1,8 +1,8 @@ config ARCH_PICOXCELL bool "Picochip PicoXcell" depends on ARCH_MULTI_V6 - select ARCH_REQUIRE_GPIOLIB select ARM_VIC select DW_APB_TIMER_OF + select GPIOLIB select HAVE_TCM select NO_IOPORT_MAP diff --git a/arch/arm/mach-prima2/Kconfig b/arch/arm/mach-prima2/Kconfig index 0cf4426183cf..3c4717c4b16b 100644 --- a/arch/arm/mach-prima2/Kconfig +++ b/arch/arm/mach-prima2/Kconfig @@ -3,8 +3,8 @@ menuconfig ARCH_SIRF depends on ARCH_MULTI_V7 select ARCH_HAS_RESET_CONTROLLER select RESET_CONTROLLER - select ARCH_REQUIRE_GPIOLIB select GENERIC_IRQ_CHIP + select GPIOLIB select NO_IOPORT_MAP select REGMAP select PINCTRL diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index cef42fd886d1..9ad84cd01ba0 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -4,10 +4,10 @@ config ARCH_ROCKCHIP select PINCTRL select PINCTRL_ROCKCHIP select ARCH_HAS_RESET_CONTROLLER - select ARCH_REQUIRE_GPIOLIB select ARM_AMBA select ARM_GIC select CACHE_L2X0 + select GPIOLIB select HAVE_ARM_ARCH_TIMER select HAVE_ARM_SCU if SMP select HAVE_ARM_TWD if SMP diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig index b91aee406c74..4b1690acb6a5 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig @@ -11,7 +11,7 @@ if ARCH_S3C24XX config PLAT_S3C24XX def_bool y - select ARCH_REQUIRE_GPIOLIB + select GPIOLIB select NO_IOPORT_MAP select S3C_DEV_NAND select IRQ_DOMAIN diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig index e5c1888fc67b..459214fa20b4 100644 --- a/arch/arm/mach-s3c64xx/Kconfig +++ b/arch/arm/mach-s3c64xx/Kconfig @@ -5,12 +5,12 @@ menuconfig ARCH_S3C64XX bool "Samsung S3C64XX" depends on ARCH_MULTI_V6 - select ARCH_REQUIRE_GPIOLIB select ARM_AMBA select ARM_VIC select CLKSRC_SAMSUNG_PWM select COMMON_CLK_SAMSUNG select GPIO_SAMSUNG if ATAGS + select GPIOLIB select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_TCM diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig index 13bc9820ff22..4cec11cf5e6f 100644 --- a/arch/arm/mach-s5pv210/Kconfig +++ b/arch/arm/mach-s5pv210/Kconfig @@ -11,10 +11,10 @@ config ARCH_S5PV210 bool "Samsung S5PV210/S5PC110" depends on ARCH_MULTI_V7 select ARCH_HAS_HOLES_MEMORYMODEL - select ARCH_REQUIRE_GPIOLIB select ARM_VIC select CLKSRC_SAMSUNG_PWM select COMMON_CLK_SAMSUNG + select GPIOLIB select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index fe4ccb52f921..108ae2b41819 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -41,7 +41,7 @@ menuconfig ARCH_RENESAS select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE select NO_IOPORT_MAP select PINCTRL - select ARCH_REQUIRE_GPIOLIB + select GPIOLIB select ZONE_DMA if ARM_LPAE if ARCH_RENESAS diff --git a/arch/arm/mach-spear/Kconfig b/arch/arm/mach-spear/Kconfig index ea9ea95630bd..b7260c2b510c 100644 --- a/arch/arm/mach-spear/Kconfig +++ b/arch/arm/mach-spear/Kconfig @@ -5,9 +5,9 @@ menuconfig PLAT_SPEAR bool "ST SPEAr Family" depends on ARCH_MULTI_V7 || ARCH_MULTI_V5 - select ARCH_REQUIRE_GPIOLIB select ARM_AMBA select CLKSRC_MMIO + select GPIOLIB if PLAT_SPEAR diff --git a/arch/arm/mach-sti/Kconfig b/arch/arm/mach-sti/Kconfig index 6f1af29f935d..119e1108b1f8 100644 --- a/arch/arm/mach-sti/Kconfig +++ b/arch/arm/mach-sti/Kconfig @@ -10,7 +10,7 @@ menuconfig ARCH_STI select MFD_SYSCON select ARCH_HAS_RESET_CONTROLLER select HAVE_ARM_SCU if SMP - select ARCH_REQUIRE_GPIOLIB + select GPIOLIB select ARM_ERRATA_754322 select ARM_ERRATA_764369 if SMP select ARM_ERRATA_775420 diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index c124d658b350..096ed216c6d5 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -1,10 +1,10 @@ menuconfig ARCH_SUNXI bool "Allwinner SoCs" depends on ARCH_MULTI_V7 - select ARCH_REQUIRE_GPIOLIB select ARCH_HAS_RESET_CONTROLLER select CLKSRC_MMIO select GENERIC_IRQ_CHIP + select GPIOLIB select PINCTRL select SUN4I_TIMER select RESET_CONTROLLER diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index 0fa8b84ed657..329f01c5b6f8 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -1,11 +1,11 @@ menuconfig ARCH_TEGRA bool "NVIDIA Tegra" depends on ARCH_MULTI_V7 - select ARCH_REQUIRE_GPIOLIB select ARCH_SUPPORTS_TRUSTED_FOUNDATIONS select ARM_AMBA select ARM_GIC select CLKSRC_MMIO + select GPIOLIB select HAVE_ARM_SCU if SMP select HAVE_ARM_TWD if SMP select PINCTRL diff --git a/arch/arm/mach-u300/Kconfig b/arch/arm/mach-u300/Kconfig index 301a98498453..56e0ef680b79 100644 --- a/arch/arm/mach-u300/Kconfig +++ b/arch/arm/mach-u300/Kconfig @@ -1,11 +1,11 @@ menuconfig ARCH_U300 bool "ST-Ericsson U300 Series" depends on ARCH_MULTI_V5 && MMU - select ARCH_REQUIRE_GPIOLIB select ARM_AMBA select ARM_VIC select CLKSRC_MMIO select CPU_ARM926T + select GPIOLIB select HAVE_TCM select PINCTRL select PINCTRL_COH901 diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index 3185081bdb2c..4740ac393297 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig @@ -3,13 +3,13 @@ menuconfig ARCH_U8500 depends on ARCH_MULTI_V7 && MMU select AB8500_CORE select ABX500_CORE - select ARCH_REQUIRE_GPIOLIB select ARM_AMBA select ARM_ERRATA_754322 select ARM_ERRATA_764369 if SMP select ARM_GIC select CACHE_L2X0 select CLKSRC_NOMADIK_MTU + select GPIOLIB select HAVE_ARM_SCU if SMP select HAVE_ARM_TWD if SMP select PINCTRL diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index 398a297b7e09..7c728ebc0b33 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig @@ -1,13 +1,13 @@ menuconfig ARCH_VEXPRESS bool "ARM Ltd. Versatile Express family" depends on ARCH_MULTI_V7 - select ARCH_REQUIRE_GPIOLIB select ARCH_SUPPORTS_BIG_ENDIAN select ARM_AMBA select ARM_GIC select ARM_GLOBAL_TIMER select ARM_TIMER_SP804 select COMMON_CLK_VERSATILE + select GPIOLIB select HAVE_ARM_SCU if SMP select HAVE_ARM_TWD if SMP select HAVE_PATA_PLATFORM diff --git a/arch/arm/mach-vt8500/Kconfig b/arch/arm/mach-vt8500/Kconfig index aaaa24fe4d71..c4f1dba7bd8a 100644 --- a/arch/arm/mach-vt8500/Kconfig +++ b/arch/arm/mach-vt8500/Kconfig @@ -1,6 +1,6 @@ config ARCH_VT8500 bool - select ARCH_REQUIRE_GPIOLIB + select GPIOLIB select CLKDEV_LOOKUP select VT8500_TIMER select PINCTRL From 5c753e0439a33840f1a9ca41fbee1bd40f60d7d8 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Thu, 28 Apr 2016 14:50:14 +0200 Subject: [PATCH 05/40] ARM: tegra: hotplug: Include missing common.h Some of the functions implemented are flagged as not having a prototype defined when building with W=1. Include the header to avoid these build warnings. Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/common.h | 22 ++++++++++++++++++++++ arch/arm/mach-tegra/hotplug.c | 1 + 2 files changed, 23 insertions(+) diff --git a/arch/arm/mach-tegra/common.h b/arch/arm/mach-tegra/common.h index 1f6fb808e236..4cc00e993b00 100644 --- a/arch/arm/mach-tegra/common.h +++ b/arch/arm/mach-tegra/common.h @@ -1,4 +1,26 @@ +/* + * Copyright (c) 2011, ARM Ltd. + * Copyright (c) 2013, NVIDIA Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef __MACH_TEGRA_COMMON_H +#define __MACH_TEGRA_COMMON_H + extern const struct smp_operations tegra_smp_ops; extern int tegra_cpu_kill(unsigned int cpu); extern void tegra_cpu_die(unsigned int cpu); + +#endif diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c index 1b129899a277..8ec707826072 100644 --- a/arch/arm/mach-tegra/hotplug.c +++ b/arch/arm/mach-tegra/hotplug.c @@ -17,6 +17,7 @@ #include +#include "common.h" #include "sleep.h" static void (*tegra_hotplug_shutdown)(void); From 755c47ed94a657d1bc04633349a2378dff05fa61 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Thu, 28 Apr 2016 14:52:45 +0200 Subject: [PATCH 06/40] ARM: tegra: cpuidle: Add missing cpuidle.h include Some of the functions implemented are flagged as not having a prototype defined when building with W=1. Include the header to avoid these build warnings and add a prototype as well as a dummy implementation for the tegra_cpuidle_pcie_irqs_in_use() function. Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/cpuidle-tegra114.c | 1 + arch/arm/mach-tegra/cpuidle-tegra20.c | 1 + arch/arm/mach-tegra/cpuidle-tegra30.c | 1 + arch/arm/mach-tegra/cpuidle.h | 2 ++ 4 files changed, 5 insertions(+) diff --git a/arch/arm/mach-tegra/cpuidle-tegra114.c b/arch/arm/mach-tegra/cpuidle-tegra114.c index 9157546fe68c..d3aa9be16621 100644 --- a/arch/arm/mach-tegra/cpuidle-tegra114.c +++ b/arch/arm/mach-tegra/cpuidle-tegra114.c @@ -26,6 +26,7 @@ #include #include +#include "cpuidle.h" #include "pm.h" #include "sleep.h" diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c b/arch/arm/mach-tegra/cpuidle-tegra20.c index 7469347b1749..afcee04f2616 100644 --- a/arch/arm/mach-tegra/cpuidle-tegra20.c +++ b/arch/arm/mach-tegra/cpuidle-tegra20.c @@ -30,6 +30,7 @@ #include #include +#include "cpuidle.h" #include "flowctrl.h" #include "iomap.h" #include "irq.h" diff --git a/arch/arm/mach-tegra/cpuidle-tegra30.c b/arch/arm/mach-tegra/cpuidle-tegra30.c index 4dbe1dae937c..c1417361e10e 100644 --- a/arch/arm/mach-tegra/cpuidle-tegra30.c +++ b/arch/arm/mach-tegra/cpuidle-tegra30.c @@ -30,6 +30,7 @@ #include #include +#include "cpuidle.h" #include "pm.h" #include "sleep.h" diff --git a/arch/arm/mach-tegra/cpuidle.h b/arch/arm/mach-tegra/cpuidle.h index c017dab60ffa..dd1624d4b294 100644 --- a/arch/arm/mach-tegra/cpuidle.h +++ b/arch/arm/mach-tegra/cpuidle.h @@ -23,8 +23,10 @@ void tegra20_cpuidle_pcie_irqs_in_use(void); int tegra30_cpuidle_init(void); int tegra114_cpuidle_init(void); void tegra_cpuidle_init(void); +void tegra_cpuidle_pcie_irqs_in_use(void); #else static inline void tegra_cpuidle_init(void) {} +static inline void tegra_cpuidle_pcie_irqs_in_use(void) {} #endif #endif From 4f71a888c5612c70e9000403e0c6440dc3088640 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Thu, 28 Apr 2016 14:54:27 +0200 Subject: [PATCH 07/40] ARM: tegra: irq: Add missing irq.h include Some of the functions implemented are flagged as not having a prototype defined when building with W=1. Include the header to avoid these build warnings. Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/irq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-tegra/irq.c b/arch/arm/mach-tegra/irq.c index 3b9098d27ea5..a69b22d37eed 100644 --- a/arch/arm/mach-tegra/irq.c +++ b/arch/arm/mach-tegra/irq.c @@ -29,6 +29,7 @@ #include "board.h" #include "iomap.h" +#include "irq.h" #define SGI_MASK 0xFFFF From fa45caf2ee319fc8cb6ba5c7e6ff8cb36efc0d1a Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Thu, 28 Apr 2016 14:55:15 +0200 Subject: [PATCH 08/40] ARM: tegra: pm: Add tegra_cpu_do_idle() prototype When building with W=1 this function is flagged as not having a prototype defined. Add the prototype to avoid a build warning. Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/pm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-tegra/pm.h b/arch/arm/mach-tegra/pm.h index 83bc87583446..717b48f22912 100644 --- a/arch/arm/mach-tegra/pm.h +++ b/arch/arm/mach-tegra/pm.h @@ -36,7 +36,7 @@ void tegra30_sleep_core_init(void); void tegra_clear_cpu_in_lp2(void); bool tegra_set_cpu_in_lp2(void); - +int tegra_cpu_do_idle(void); void tegra_idle_lp2_last(void); extern void (*tegra_tear_down_cpu)(void); From 27e583abdf24dc0e408252335edfacb1b5183b47 Mon Sep 17 00:00:00 2001 From: Alexander Shiyan Date: Wed, 1 Jun 2016 22:07:31 +0300 Subject: [PATCH 09/40] ARM: imx: Remove orphan header The header eukrea-baseboards.h is not used, remove it. Signed-off-by: Alexander Shiyan Signed-off-by: Shawn Guo --- arch/arm/mach-imx/eukrea-baseboards.h | 42 --------------------------- 1 file changed, 42 deletions(-) delete mode 100644 arch/arm/mach-imx/eukrea-baseboards.h diff --git a/arch/arm/mach-imx/eukrea-baseboards.h b/arch/arm/mach-imx/eukrea-baseboards.h deleted file mode 100644 index bb2c90d65914..000000000000 --- a/arch/arm/mach-imx/eukrea-baseboards.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2010 Eric Benard - eric@eukrea.com - * - * Based on board-pcm038.h which is : - * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -#ifndef __MACH_EUKREA_BASEBOARDS_H__ -#define __MACH_EUKREA_BASEBOARDS_H__ - -#ifndef __ASSEMBLY__ -/* - * This CPU module needs a baseboard to work. After basic initializing - * its own devices, it calls baseboard's init function. - * TODO: Add your own baseboard init function and call it from - * inside eukrea_cpuimx25_init() or eukrea_cpuimx35_init() - * - * This example here is for the development board. Refer - * mach-mx25/eukrea_mbimxsd-baseboard.c for cpuimx25 - * mach-mx3/eukrea_mbimxsd-baseboard.c for cpuimx35 - */ - -extern void eukrea_mbimxsd25_baseboard_init(void); -extern void eukrea_mbimxsd35_baseboard_init(void); - -#endif - -#endif /* __MACH_EUKREA_BASEBOARDS_H__ */ From ead812669980aad571fdcfeb239d47c405dd248b Mon Sep 17 00:00:00 2001 From: Alexander Shiyan Date: Wed, 1 Jun 2016 22:07:32 +0300 Subject: [PATCH 10/40] ARM: imx: Use IRQCHIP_DECLARE for TZIC Remove boilerplate code by using IRQCHIP_DECLARE macro. Signed-off-by: Alexander Shiyan Signed-off-by: Shawn Guo --- arch/arm/mach-imx/common.h | 1 - arch/arm/mach-imx/mach-imx50.c | 1 - arch/arm/mach-imx/mach-imx51.c | 1 - arch/arm/mach-imx/mach-imx53.c | 1 - arch/arm/mach-imx/tzic.c | 10 +++++----- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index 58a38464480d..60d9ae63f76e 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h @@ -32,7 +32,6 @@ void imx27_init_early(void); void imx31_init_early(void); void imx35_init_early(void); void mxc_init_irq(void __iomem *); -void tzic_init_irq(void); void mx1_init_irq(void); void mx21_init_irq(void); void mx27_init_irq(void); diff --git a/arch/arm/mach-imx/mach-imx50.c b/arch/arm/mach-imx/mach-imx50.c index ecf58b9e974b..4cab5f61260f 100644 --- a/arch/arm/mach-imx/mach-imx50.c +++ b/arch/arm/mach-imx/mach-imx50.c @@ -22,6 +22,5 @@ static const char * const imx50_dt_board_compat[] __initconst = { }; DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)") - .init_irq = tzic_init_irq, .dt_compat = imx50_dt_board_compat, MACHINE_END diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c index 10a82a4f1e58..7296c31849a8 100644 --- a/arch/arm/mach-imx/mach-imx51.c +++ b/arch/arm/mach-imx/mach-imx51.c @@ -69,7 +69,6 @@ static const char * const imx51_dt_board_compat[] __initconst = { DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)") .init_early = imx51_init_early, - .init_irq = tzic_init_irq, .init_machine = imx51_dt_init, .init_late = imx51_init_late, .dt_compat = imx51_dt_board_compat, diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c index 18b5c5c136db..d251cecd9bd2 100644 --- a/arch/arm/mach-imx/mach-imx53.c +++ b/arch/arm/mach-imx/mach-imx53.c @@ -49,7 +49,6 @@ static const char * const imx53_dt_board_compat[] __initconst = { DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)") .init_early = imx53_init_early, - .init_irq = tzic_init_irq, .init_machine = imx53_dt_init, .init_late = imx53_init_late, .dt_compat = imx53_dt_board_compat, diff --git a/arch/arm/mach-imx/tzic.c b/arch/arm/mach-imx/tzic.c index ae23d50f7861..a53fdc263a37 100644 --- a/arch/arm/mach-imx/tzic.c +++ b/arch/arm/mach-imx/tzic.c @@ -9,12 +9,11 @@ * http://www.gnu.org/copyleft/gpl.html */ -#include -#include #include #include #include #include +#include #include #include #include @@ -153,13 +152,11 @@ static void __exception_irq_entry tzic_handle_irq(struct pt_regs *regs) * interrupts. It registers the interrupt enable and disable functions * to the kernel for each interrupt source. */ -void __init tzic_init_irq(void) +static int __init tzic_init_dt(struct device_node *np, struct device_node *p) { - struct device_node *np; int irq_base; int i; - np = of_find_compatible_node(NULL, NULL, "fsl,tzic"); tzic_base = of_iomap(np, 0); WARN_ON(!tzic_base); @@ -199,7 +196,10 @@ void __init tzic_init_irq(void) #endif pr_info("TrustZone Interrupt Controller (TZIC) initialized\n"); + + return 0; } +IRQCHIP_DECLARE(tzic, "fsl,tzic", tzic_init_dt); /** * tzic_enable_wake() - enable wakeup interrupt From f66ce0daaefded02d84070a859176a2aa4d8e1a3 Mon Sep 17 00:00:00 2001 From: Sudeep Holla Date: Tue, 26 Apr 2016 14:11:55 +0100 Subject: [PATCH 11/40] ARM: vexpress/spc: remove unused variable perf_stat_reg The variable 'perf_stat_reg' in ve_spc_set_performance is assigned a value but that is never used. So let's remove the variable 'perf_stat_reg' Reported-by: David Binderman Cc: Liviu Dudau Cc: Lorenzo Pieralisi Signed-off-by: Sudeep Holla --- arch/arm/mach-vexpress/spc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-vexpress/spc.c index 5766ce2be32b..0d89257ddc0a 100644 --- a/arch/arm/mach-vexpress/spc.c +++ b/arch/arm/mach-vexpress/spc.c @@ -319,17 +319,15 @@ static int ve_spc_waitforcompletion(int req_type) static int ve_spc_set_performance(int cluster, u32 freq) { - u32 perf_cfg_reg, perf_stat_reg; + u32 perf_cfg_reg; int ret, perf, req_type; if (cluster_is_a15(cluster)) { req_type = CA15_DVFS; perf_cfg_reg = PERF_LVL_A15; - perf_stat_reg = PERF_REQ_A15; } else { req_type = CA7_DVFS; perf_cfg_reg = PERF_LVL_A7; - perf_stat_reg = PERF_REQ_A7; } perf = ve_spc_find_performance_index(cluster, freq); From b47a1b46fef0e95d35f0d7a6d3477912dbc17f32 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Wed, 8 Jun 2016 18:10:03 +0100 Subject: [PATCH 12/40] ARM: vexpress/hotplug: fix missing core.h include Fix the missing declaration of vexpress_cpu_die() by including core.h where it is defined. Fixes: arch/arm/mach-vexpress/hotplug.c:88:6: warning: symbol 'vexpress_cpu_die' was not declared. Should it be static? Cc: Liviu Dudau Cc: Lorenzo Pieralisi Signed-off-by: Ben Dooks Signed-off-by: Sudeep Holla --- arch/arm/mach-vexpress/hotplug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c index f2fafc10a91d..d8f1a05f5e87 100644 --- a/arch/arm/mach-vexpress/hotplug.c +++ b/arch/arm/mach-vexpress/hotplug.c @@ -15,6 +15,8 @@ #include #include +#include "core.h" + static inline void cpu_enter_lowpower(void) { unsigned int v; From 4091af6b5293522b14400b31667f8b6ce596ec0c Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Wed, 8 Jun 2016 18:16:10 +0100 Subject: [PATCH 13/40] ARM: versatile: fix missing include Fix two missing function declarations by including the file where they are defined. Fixes: arch/arm/plat-versatile/platsmp.c:35:6: warning: symbol 'versatile_secondary_init' was not declared. Should it be static? arch/arm/plat-versatile/platsmp.c:50:5: warning: symbol 'versatile_boot_secondary' was not declared. Should it be static? Cc: Liviu Dudau Cc: Lorenzo Pieralisi Signed-off-by: Ben Dooks Signed-off-by: Sudeep Holla --- arch/arm/plat-versatile/platsmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/plat-versatile/platsmp.c index 53feb90c840c..c2366510187a 100644 --- a/arch/arm/plat-versatile/platsmp.c +++ b/arch/arm/plat-versatile/platsmp.c @@ -18,6 +18,8 @@ #include #include +#include + /* * Write pen_release in a way that is guaranteed to be visible to all * observers, irrespective of whether they're taking part in coherency From e13de0a8d032dedc41a01659ea203b9cdece532b Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Wed, 8 Jun 2016 18:06:14 +0100 Subject: [PATCH 14/40] ARM: vexpress/spc: fix missing include of spc.h Fix missing function prototypes found in spc.h by including the file to remove the following warnings: arch/arm/mach-vexpress/spc.c:131:6: warning: symbol 've_spc_global_wakeup_irq' was not declared. Should it be static? arch/arm/mach-vexpress/spc.c:156:6: warning: symbol 've_spc_cpu_wakeup_irq' was not declared. Should it be static? arch/arm/mach-vexpress/spc.c:185:6: warning: symbol 've_spc_set_resume_addr' was not declared. Should it be static? arch/arm/mach-vexpress/spc.c:210:6: warning: symbol 've_spc_powerdown' was not declared. Should it be static? arch/arm/mach-vexpress/spc.c:240:5: warning: symbol 've_spc_cpu_in_wfi' was not declared. Should it be static? arch/arm/mach-vexpress/spc.c:450:12: warning: symbol 've_spc_init' was not declared. Should it be static? Cc: Liviu Dudau Cc: Lorenzo Pieralisi Signed-off-by: Ben Dooks Signed-off-by: Sudeep Holla --- arch/arm/mach-vexpress/spc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-vexpress/spc.c index 0d89257ddc0a..bc4ea5b241e7 100644 --- a/arch/arm/mach-vexpress/spc.c +++ b/arch/arm/mach-vexpress/spc.c @@ -31,6 +31,8 @@ #include +#include "spc.h" + #define SPCLOG "vexpress-spc: " #define PERF_LVL_A15 0x00 From 0a14d280e17ef3db75254439dfc83f1bc65fca6f Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Wed, 8 Jun 2016 19:26:31 +0100 Subject: [PATCH 15/40] power: vexpress: make dev_attr_active static The dev_attr_active is not exported or defined to be used outside the driver, so make it static to avoid the following warning: drivers/power/reset/vexpress-poweroff.c:77:1: warning: symbol 'dev_attr_active' was not declared. Should it be static? Cc: Liviu Dudau Cc: Lorenzo Pieralisi Signed-off-by: Ben Dooks Signed-off-by: Sudeep Holla --- drivers/power/reset/vexpress-poweroff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/power/reset/vexpress-poweroff.c b/drivers/power/reset/vexpress-poweroff.c index 6a9bf7089373..102f95a09460 100644 --- a/drivers/power/reset/vexpress-poweroff.c +++ b/drivers/power/reset/vexpress-poweroff.c @@ -74,8 +74,8 @@ static ssize_t vexpress_reset_active_store(struct device *dev, return err ? err : count; } -DEVICE_ATTR(active, S_IRUGO | S_IWUSR, vexpress_reset_active_show, - vexpress_reset_active_store); +static DEVICE_ATTR(active, S_IRUGO | S_IWUSR, vexpress_reset_active_show, + vexpress_reset_active_store); enum vexpress_reset_func { FUNC_RESET, FUNC_SHUTDOWN, FUNC_REBOOT }; From 53e2fd837b21efaffcc67b5e77da72bd58025c3d Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 7 Jun 2016 20:03:45 +0100 Subject: [PATCH 16/40] mvebu: fix missing includes in pmsu.c The file is missing definitions for some functions due to not including two header files. Fix the following warnings by including "pmsu.h" and in pmsu.c: arch/arm/mach-mvebu/pmsu.c:127:5: warning: symbol 'mvebu_setup_boot_addr_wa' was not declared. Should it be static? arch/arm/mach-mvebu/pmsu.c:267:5: warning: symbol 'armada_370_xp_pmsu_idle_enter' was not declared. Should it be static? arch/arm/mach-mvebu/pmsu.c:313:5: warning: symbol 'armada_38x_do_cpu_suspend' was not declared. Should it be static? arch/arm/mach-mvebu/pmsu.c:340:6: warning: symbol 'mvebu_v7_pmsu_idle_exit' was not declared. Should it be static? arch/arm/mach-mvebu/pmsu.c:570:5: warning: symbol 'mvebu_pmsu_dfs_request' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Gregory CLEMENT --- arch/arm/mach-mvebu/pmsu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c index b44442338e4e..f39bd51bce18 100644 --- a/arch/arm/mach-mvebu/pmsu.c +++ b/arch/arm/mach-mvebu/pmsu.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -38,7 +39,7 @@ #include #include #include "common.h" - +#include "pmsu.h" #define PMSU_BASE_OFFSET 0x100 #define PMSU_REG_SIZE 0x1000 From 43043a55b27f4a1f249f43a863402d645786c9bc Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 7 Jun 2016 20:03:46 +0100 Subject: [PATCH 17/40] mvebu: fix missing include of common.h in pm.c The mvebu_pm_suspend_init() is missing a definition, so include common.h which defines this function into pm.c to fix the following warning: arch/arm/mach-mvebu/pm.c:235:12: warning: symbol 'mvebu_pm_suspend_init' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Gregory CLEMENT --- arch/arm/mach-mvebu/pm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-mvebu/pm.c b/arch/arm/mach-mvebu/pm.c index 8d32bf762b86..2990c5269b18 100644 --- a/arch/arm/mach-mvebu/pm.c +++ b/arch/arm/mach-mvebu/pm.c @@ -23,6 +23,7 @@ #include #include "coherency.h" +#include "common.h" #include "pmsu.h" #define SDRAM_CONFIG_OFFS 0x0 From e9d50248d6d92957160bd2616a7e738a746b8231 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 7 Jun 2016 20:03:47 +0100 Subject: [PATCH 18/40] mvebu: fix missing include of common.h in cpu-reset.c The mvebu_cpu_reset_deassert() is missing the definition for it, so include common.h where it is defined to fix the warning: arch/arm/mach-mvebu/cpu-reset.c:25:5: warning: symbol 'mvebu_cpu_reset_deassert' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Gregory CLEMENT --- arch/arm/mach-mvebu/cpu-reset.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-mvebu/cpu-reset.c b/arch/arm/mach-mvebu/cpu-reset.c index 4a2cadd6b48e..f33a31c6aff8 100644 --- a/arch/arm/mach-mvebu/cpu-reset.c +++ b/arch/arm/mach-mvebu/cpu-reset.c @@ -16,6 +16,8 @@ #include #include +#include "common.h" + static void __iomem *cpu_reset_base; static size_t cpu_reset_size; From 6c5066f6e171d8bea3bbdd56de62b6c23a692672 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 7 Jun 2016 20:03:48 +0100 Subject: [PATCH 19/40] mvebu: make mvebu_armada375_smp_wa_init() static The mvebu_armada375_smp_wa_init() is not exported or declared anywhere, so make it static to fix the following warning: arch/arm/mach-mvebu/system-controller.c:130:6: warning: symbol 'mvebu_armada375_smp_wa_init' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Gregory CLEMENT --- arch/arm/mach-mvebu/system-controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-mvebu/system-controller.c b/arch/arm/mach-mvebu/system-controller.c index c6c132acd7a6..76cbc82a7407 100644 --- a/arch/arm/mach-mvebu/system-controller.c +++ b/arch/arm/mach-mvebu/system-controller.c @@ -127,7 +127,7 @@ int mvebu_system_controller_get_soc_id(u32 *dev, u32 *rev) } #if defined(CONFIG_SMP) && defined(CONFIG_MACH_MVEBU_V7) -void mvebu_armada375_smp_wa_init(void) +static void mvebu_armada375_smp_wa_init(void) { u32 dev, rev; phys_addr_t resume_addr_reg; From cb2bb5de64d1620e8fea432d014c29c7daf39e23 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 7 Jun 2016 20:03:49 +0100 Subject: [PATCH 20/40] mvebu: add definition for coherency_base Fix the warning that coherency_base is not defined by adding it to coherency.h (it is only used in the coherency_ll.S): arch/arm/mach-mvebu/coherency.c:41:14: warning: symbol 'coherency_base' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Gregory CLEMENT --- arch/arm/mach-mvebu/coherency.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-mvebu/coherency.h b/arch/arm/mach-mvebu/coherency.h index 54cb7607b526..6067f14263f7 100644 --- a/arch/arm/mach-mvebu/coherency.h +++ b/arch/arm/mach-mvebu/coherency.h @@ -14,6 +14,7 @@ #ifndef __MACH_370_XP_COHERENCY_H #define __MACH_370_XP_COHERENCY_H +extern void __iomem *coherency_base; /* for coherency_ll.S */ extern unsigned long coherency_phys_base; int set_cpu_coherent(void); From fc05c24db0a602b54571d114a087bd1b251bae60 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Thu, 9 Jun 2016 10:59:05 +0100 Subject: [PATCH 21/40] ARM: orion5x: make orion5x_legacy_handle_irq static The orion5x_legacy_handle_irq() is not used or declared outside of irq.c so make it static to avoid the following warning: arch/arm/mach-orion5x/irq.c:30:23: warning: symbol 'orion5x_legacy_handle_irq' was not declared. Should it be static? Signed-off-by: Ben Dooks Acked-by: Andrew Lunn Signed-off-by: Gregory CLEMENT --- arch/arm/mach-orion5x/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-orion5x/irq.c b/arch/arm/mach-orion5x/irq.c index de980ef9cda1..ac4af2283bef 100644 --- a/arch/arm/mach-orion5x/irq.c +++ b/arch/arm/mach-orion5x/irq.c @@ -26,7 +26,7 @@ static int __initdata gpio0_irqs[4] = { IRQ_ORION5X_GPIO_24_31, }; -asmlinkage void +static asmlinkage void __exception_irq_entry orion5x_legacy_handle_irq(struct pt_regs *regs) { u32 stat; From 15b10c6a60e28f2065389da7fc8af538ea727604 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Thu, 9 Jun 2016 12:52:25 +0100 Subject: [PATCH 22/40] ARM: Kirkwood: make kirkwood_disable_mbus_error_propagation() static The kirkwood_disable_mbus_error_propagation is not exported or declared elsewhere, so make it static to avoid the following warning: arch/arm/mach-mvebu/kirkwood.c:153:6: warning: symbol 'kirkwood_disable_mbus_error_propagation' was not declared. Should it be static? Signed-off-by: Ben Dooks Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT --- arch/arm/mach-mvebu/kirkwood.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c index f9d8e1ea7183..a3f4029b25d7 100644 --- a/arch/arm/mach-mvebu/kirkwood.c +++ b/arch/arm/mach-mvebu/kirkwood.c @@ -150,7 +150,7 @@ eth_fixup_skip: * causes mbus errors (which can occur for example for PCI aborts) to * throw CPU aborts, which we're not set up to deal with. */ -void kirkwood_disable_mbus_error_propagation(void) +static void kirkwood_disable_mbus_error_propagation(void) { void __iomem *cpu_config; From d705c1a66e151e587271265c29844817d5108375 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Thu, 9 Jun 2016 12:57:12 +0100 Subject: [PATCH 23/40] ARM: Kirkwood: fix kirkwood_pm_init() declaration/type The kirkwood-pm.c was missing the include of kirkwood-pm.h to define the kirkwood_pm_init() function. However once this is included, the types do not match. Fixup the include, and then the prototype to avoid the following warning: arch/arm/mach-mvebu/kirkwood-pm.c:69:12: warning: symbol 'kirkwood_pm_init' was not declared. Should it be static? Signed-off-by: Ben Dooks Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT --- arch/arm/mach-mvebu/kirkwood-pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-mvebu/kirkwood-pm.c b/arch/arm/mach-mvebu/kirkwood-pm.c index cbb816f2120c..1e1f879f16ce 100644 --- a/arch/arm/mach-mvebu/kirkwood-pm.c +++ b/arch/arm/mach-mvebu/kirkwood-pm.c @@ -18,6 +18,7 @@ #include #include #include "kirkwood.h" +#include "kirkwood-pm.h" static void __iomem *ddr_operation_base; static void __iomem *memory_pm_ctrl; @@ -66,11 +67,10 @@ static const struct platform_suspend_ops kirkwood_suspend_ops = { .valid = kirkwood_pm_valid_standby, }; -int __init kirkwood_pm_init(void) +void __init kirkwood_pm_init(void) { ddr_operation_base = ioremap(DDR_OPERATION_BASE, 4); memory_pm_ctrl = ioremap(MEMORY_PM_CTRL_PHYS, 4); suspend_set_ops(&kirkwood_suspend_ops); - return 0; } From c00e4c54d56cdce018e9b09614511e5ad17e2f8c Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Sat, 18 Jun 2016 18:09:27 -0700 Subject: [PATCH 24/40] ARM: i.MX: system.c: Convert goto to if statement Using goto here doesn't bring any advantages and only makes the code flow less clear. No functional changes. Acked-by: Arnd Bergmann Signed-off-by: Andrey Smirnov Signed-off-by: Shawn Guo --- arch/arm/mach-imx/system.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c index 105d1ce4ed9d..d9f8b0e1d96a 100644 --- a/arch/arm/mach-imx/system.c +++ b/arch/arm/mach-imx/system.c @@ -106,26 +106,24 @@ void __init imx_init_l2cache(void) goto out; } - if (readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN) - goto skip_if_enabled; + if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { + /* Configure the L2 PREFETCH and POWER registers */ + val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL); + val |= 0x70800000; + /* + * The L2 cache controller(PL310) version on the i.MX6D/Q is r3p1-50rel0 + * The L2 cache controller(PL310) version on the i.MX6DL/SOLO/SL is r3p2 + * But according to ARM PL310 errata: 752271 + * ID: 752271: Double linefill feature can cause data corruption + * Fault Status: Present in: r3p0, r3p1, r3p1-50rel0. Fixed in r3p2 + * Workaround: The only workaround to this erratum is to disable the + * double linefill feature. This is the default behavior. + */ + if (cpu_is_imx6q()) + val &= ~(1 << 30 | 1 << 23); + writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL); + } - /* Configure the L2 PREFETCH and POWER registers */ - val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL); - val |= 0x70800000; - /* - * The L2 cache controller(PL310) version on the i.MX6D/Q is r3p1-50rel0 - * The L2 cache controller(PL310) version on the i.MX6DL/SOLO/SL is r3p2 - * But according to ARM PL310 errata: 752271 - * ID: 752271: Double linefill feature can cause data corruption - * Fault Status: Present in: r3p0, r3p1, r3p1-50rel0. Fixed in r3p2 - * Workaround: The only workaround to this erratum is to disable the - * double linefill feature. This is the default behavior. - */ - if (cpu_is_imx6q()) - val &= ~(1 << 30 | 1 << 23); - writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL); - -skip_if_enabled: iounmap(l2x0_base); of_node_put(np); From cf30056384dfb2e3efc0cf0404979a24a1f5c194 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Sat, 18 Jun 2016 18:09:28 -0700 Subject: [PATCH 25/40] ARM: i.MX: system.c: Remove redundant errata 752271 code Applying a fix for ARM errata 752271 would already be taken care by a call to a 'fixup' hook as a part of l2x0_of_init() -> __l2c_init() call chain. Moreso the code in 'fixup' function would do that based on the PL310's revsion information, whereas removed code does so based on SoC version which does not work very well on i.MX6Q+ which identifies itself as i.MX6Q as well but is not affected by 752271. Acked-by: Arnd Bergmann Signed-off-by: Andrey Smirnov Signed-off-by: Shawn Guo --- arch/arm/mach-imx/system.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c index d9f8b0e1d96a..b1533768adb0 100644 --- a/arch/arm/mach-imx/system.c +++ b/arch/arm/mach-imx/system.c @@ -110,17 +110,6 @@ void __init imx_init_l2cache(void) /* Configure the L2 PREFETCH and POWER registers */ val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL); val |= 0x70800000; - /* - * The L2 cache controller(PL310) version on the i.MX6D/Q is r3p1-50rel0 - * The L2 cache controller(PL310) version on the i.MX6DL/SOLO/SL is r3p2 - * But according to ARM PL310 errata: 752271 - * ID: 752271: Double linefill feature can cause data corruption - * Fault Status: Present in: r3p0, r3p1, r3p1-50rel0. Fixed in r3p2 - * Workaround: The only workaround to this erratum is to disable the - * double linefill feature. This is the default behavior. - */ - if (cpu_is_imx6q()) - val &= ~(1 << 30 | 1 << 23); writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL); } From b829037136766abf34456e2406bab67d689b3538 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Sat, 18 Jun 2016 18:09:29 -0700 Subject: [PATCH 26/40] ARM: i.MX: system.c: Replace magic numbers Replace magic numbers used to form L310 Prefetch Control Register value. Acked-by: Arnd Bergmann Signed-off-by: Andrey Smirnov Signed-off-by: Shawn Guo --- arch/arm/mach-imx/system.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c index b1533768adb0..76d7ebe883d7 100644 --- a/arch/arm/mach-imx/system.c +++ b/arch/arm/mach-imx/system.c @@ -109,7 +109,10 @@ void __init imx_init_l2cache(void) if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { /* Configure the L2 PREFETCH and POWER registers */ val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL); - val |= 0x70800000; + val |= L310_PREFETCH_CTRL_DBL_LINEFILL | + L310_PREFETCH_CTRL_INSTR_PREFETCH | + L310_PREFETCH_CTRL_DATA_PREFETCH | + L310_PREFETCH_CTRL_DBL_LINEFILL_INCR; writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL); } From 1d9e94779956b765d316924cc39af2165ad631fb Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Sat, 18 Jun 2016 18:09:30 -0700 Subject: [PATCH 27/40] ARM: i.MX: system.c: Tweak prefetch settings for performance Update Prefetch Control Register settings to match that of Freescale's Linux tree. As the commit e3addf1b773964eac7f797e8538c69481be4279c states (author Nitin Garg): "... set Prefetch offset to 15, since it improves memcpy performance by 35%. Don't enable Incr double Linefill enable since it adversely affects memcpy performance by about 32MB/s and reads by 90MB/s. Tested with 4K to 16MB sized src and dst aligned buffer..." Those results are also corroborated by our own testing. Acked-by: Arnd Bergmann Tested-by: Chris Healy Signed-off-by: Andrey Smirnov Signed-off-by: Shawn Guo --- arch/arm/mach-imx/system.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c index 76d7ebe883d7..bf7ab779d5bf 100644 --- a/arch/arm/mach-imx/system.c +++ b/arch/arm/mach-imx/system.c @@ -111,8 +111,12 @@ void __init imx_init_l2cache(void) val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL); val |= L310_PREFETCH_CTRL_DBL_LINEFILL | L310_PREFETCH_CTRL_INSTR_PREFETCH | - L310_PREFETCH_CTRL_DATA_PREFETCH | - L310_PREFETCH_CTRL_DBL_LINEFILL_INCR; + L310_PREFETCH_CTRL_DATA_PREFETCH; + + /* Set perfetch offset to improve performance */ + val &= ~L310_PREFETCH_CTRL_OFFSET_MASK; + val |= 15; + writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL); } From 510aca642040cfb05e392218f6540ea35af51916 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Sat, 18 Jun 2016 18:09:31 -0700 Subject: [PATCH 28/40] ARM: i.MX: Do not explicitly call l2x0_of_init() There's no need to explicitly call l2x0_of_init() since it will be called as a part of init_IRQ() (see arch/arm/kernel/irq.c for details). This way we can simplify imx_init_l2cache() and ditch the call to it on i.MX35 (which does not claim compatibility with "arm,pl310-cache") alltogether. Acked-by: Arnd Bergmann Suggested-by: Arnd Bergmann Signed-off-by: Andrey Smirnov Signed-off-by: Shawn Guo --- arch/arm/mach-imx/imx35-dt.c | 10 +++------- arch/arm/mach-imx/mach-imx6q.c | 2 ++ arch/arm/mach-imx/mach-imx6sl.c | 2 ++ arch/arm/mach-imx/mach-imx6sx.c | 2 ++ arch/arm/mach-imx/system.c | 12 ++++-------- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-imx/imx35-dt.c b/arch/arm/mach-imx/imx35-dt.c index e9396037235d..99bb63dedb87 100644 --- a/arch/arm/mach-imx/imx35-dt.c +++ b/arch/arm/mach-imx/imx35-dt.c @@ -20,20 +20,16 @@ #include "common.h" #include "mx35.h" -static void __init imx35_irq_init(void) -{ - imx_init_l2cache(); - mx35_init_irq(); -} - static const char * const imx35_dt_board_compat[] __initconst = { "fsl,imx35", NULL }; DT_MACHINE_START(IMX35_DT, "Freescale i.MX35 (Device Tree Support)") + .l2c_aux_val = 0, + .l2c_aux_mask = ~0, .map_io = mx35_map_io, .init_early = imx35_init_early, - .init_irq = imx35_irq_init, + .init_irq = mx35_init_irq, .dt_compat = imx35_dt_board_compat, MACHINE_END diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index cb27d566d5ab..b31890f1e4a4 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -407,6 +407,8 @@ static const char * const imx6q_dt_compat[] __initconst = { }; DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad/DualLite (Device Tree)") + .l2c_aux_val = 0, + .l2c_aux_mask = ~0, .smp = smp_ops(imx_smp_ops), .map_io = imx6q_map_io, .init_irq = imx6q_init_irq, diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c index 300326373166..f9a9a362a88a 100644 --- a/arch/arm/mach-imx/mach-imx6sl.c +++ b/arch/arm/mach-imx/mach-imx6sl.c @@ -75,6 +75,8 @@ static const char * const imx6sl_dt_compat[] __initconst = { }; DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)") + .l2c_aux_val = 0, + .l2c_aux_mask = ~0, .init_irq = imx6sl_init_irq, .init_machine = imx6sl_init_machine, .init_late = imx6sl_init_late, diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c index 6a0b0614de29..07a3a340f151 100644 --- a/arch/arm/mach-imx/mach-imx6sx.c +++ b/arch/arm/mach-imx/mach-imx6sx.c @@ -103,6 +103,8 @@ static const char * const imx6sx_dt_compat[] __initconst = { }; DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)") + .l2c_aux_val = 0, + .l2c_aux_mask = ~0, .init_irq = imx6sx_init_irq, .init_machine = imx6sx_init_machine, .dt_compat = imx6sx_dt_compat, diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c index bf7ab779d5bf..e442ed7f7ff5 100644 --- a/arch/arm/mach-imx/system.c +++ b/arch/arm/mach-imx/system.c @@ -98,13 +98,11 @@ void __init imx_init_l2cache(void) np = of_find_compatible_node(NULL, NULL, "arm,pl310-cache"); if (!np) - goto out; + return; l2x0_base = of_iomap(np, 0); - if (!l2x0_base) { - of_node_put(np); - goto out; - } + if (!l2x0_base) + goto put_node; if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { /* Configure the L2 PREFETCH and POWER registers */ @@ -121,9 +119,7 @@ void __init imx_init_l2cache(void) } iounmap(l2x0_base); +put_node: of_node_put(np); - -out: - l2x0_of_init(0, ~0); } #endif From 6f98cb22e4089c3eb63ff86fac010291a0e30241 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 24 Jun 2016 12:49:56 +0200 Subject: [PATCH 29/40] ARM: imx: remove cpu_is_mx1 check There is only one call site for this, and it's easily replaced by initializing the reset value at boot time. Signed-off-by: Arnd Bergmann Signed-off-by: Shawn Guo --- arch/arm/mach-imx/common.h | 1 + arch/arm/mach-imx/mm-imx1.c | 2 +- arch/arm/mach-imx/system.c | 16 +++++++++------- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index 60d9ae63f76e..0a1d1f175b7a 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h @@ -54,6 +54,7 @@ struct platform_device *mxc_register_gpio(char *name, int id, void mxc_set_cpu_type(unsigned int type); void mxc_restart(enum reboot_mode, const char *); void mxc_arch_reset_init(void __iomem *); +void imx1_reset_init(void __iomem *); void imx_set_aips(void __iomem *); void imx_aips_allow_unprivileged_access(const char *compat); int mxc_device_init(void); diff --git a/arch/arm/mach-imx/mm-imx1.c b/arch/arm/mach-imx/mm-imx1.c index e065fedb3ad4..9a42f19be81e 100644 --- a/arch/arm/mach-imx/mm-imx1.c +++ b/arch/arm/mach-imx/mm-imx1.c @@ -50,7 +50,7 @@ void __init mx1_init_irq(void) void __init imx1_soc_init(void) { - mxc_arch_reset_init(MX1_IO_ADDRESS(MX1_WDT_BASE_ADDR)); + imx1_reset_init(MX1_IO_ADDRESS(MX1_WDT_BASE_ADDR)); mxc_device_init(); mxc_register_gpio("imx1-gpio", 0, MX1_GPIO1_BASE_ADDR, SZ_256, diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c index e442ed7f7ff5..c06af650e6b1 100644 --- a/arch/arm/mach-imx/system.c +++ b/arch/arm/mach-imx/system.c @@ -34,25 +34,19 @@ static void __iomem *wdog_base; static struct clk *wdog_clk; +static int wcr_enable = (1 << 2); /* * Reset the system. It is called by machine_restart(). */ void mxc_restart(enum reboot_mode mode, const char *cmd) { - unsigned int wcr_enable; - if (!wdog_base) goto reset_fallback; if (!IS_ERR(wdog_clk)) clk_enable(wdog_clk); - if (cpu_is_mx1()) - wcr_enable = (1 << 0); - else - wcr_enable = (1 << 2); - /* Assert SRS signal */ imx_writew(wcr_enable, wdog_base); /* @@ -89,6 +83,14 @@ void __init mxc_arch_reset_init(void __iomem *base) clk_prepare(wdog_clk); } +#ifdef CONFIG_SOC_IMX1 +void __init imx1_reset_init(void __iomem *base) +{ + wcr_enable = (1 << 0); + mxc_arch_reset_init(base); +} +#endif + #ifdef CONFIG_CACHE_L2X0 void __init imx_init_l2cache(void) { From c9ee94965dce7b66964c5f0b0db892055757d608 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 24 Jun 2016 12:49:57 +0200 Subject: [PATCH 30/40] ARM: imx: deconstruct mxc_rnga initialization The rnga platform device is initialized for all imx31 machines from its own initcall, but is never initialized anywhere else. This moves the platform device creation into both the imx31 dt and non-dt machine init sequences, which has basically the exact same effect as before, but makes it more obvious what is going on, while reducing the amount of code and removing the last user of cpu_is_mx31(). Signed-off-by: Arnd Bergmann Signed-off-by: Shawn Guo --- arch/arm/mach-imx/Kconfig | 4 -- arch/arm/mach-imx/devices/Kconfig | 4 -- arch/arm/mach-imx/devices/platform-mxc_rnga.c | 53 ------------------- arch/arm/mach-imx/imx31-dt.c | 12 +++++ arch/arm/mach-imx/mm-imx3.c | 6 +++ 5 files changed, 18 insertions(+), 61 deletions(-) delete mode 100644 arch/arm/mach-imx/devices/platform-mxc_rnga.c diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index dd905b9602a0..7816321d7a99 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -44,9 +44,6 @@ config MXC_USE_EPIT uses the same clocks as the GPT. Anyway, on some systems the GPT may be in use for other purposes. -config ARCH_HAS_RNGA - bool - config HAVE_IMX_ANATOP bool @@ -90,7 +87,6 @@ config SOC_IMX27 config SOC_IMX31 bool select CPU_V6 - select IMX_HAVE_PLATFORM_MXC_RNGA select MXC_AVIC select SMP_ON_UP if SMP diff --git a/arch/arm/mach-imx/devices/Kconfig b/arch/arm/mach-imx/devices/Kconfig index 3a552989248e..6ffe57267233 100644 --- a/arch/arm/mach-imx/devices/Kconfig +++ b/arch/arm/mach-imx/devices/Kconfig @@ -57,10 +57,6 @@ config IMX_HAVE_PLATFORM_MXC_MMC config IMX_HAVE_PLATFORM_MXC_NAND bool -config IMX_HAVE_PLATFORM_MXC_RNGA - bool - select ARCH_HAS_RNGA - config IMX_HAVE_PLATFORM_MXC_RTC bool diff --git a/arch/arm/mach-imx/devices/platform-mxc_rnga.c b/arch/arm/mach-imx/devices/platform-mxc_rnga.c deleted file mode 100644 index 851fbc8af7a9..000000000000 --- a/arch/arm/mach-imx/devices/platform-mxc_rnga.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2010 Pengutronix - * Uwe Kleine-Koenig - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License version 2 as published by the - * Free Software Foundation. - */ -#include "../hardware.h" -#include "devices-common.h" - -struct imx_mxc_rnga_data { - resource_size_t iobase; -}; - -#define imx_mxc_rnga_data_entry_single(soc) \ - { \ - .iobase = soc ## _RNGA_BASE_ADDR, \ - } - -#ifdef CONFIG_SOC_IMX31 -static const struct imx_mxc_rnga_data imx31_mxc_rnga_data __initconst = - imx_mxc_rnga_data_entry_single(MX31); -#endif /* ifdef CONFIG_SOC_IMX31 */ - -static struct platform_device *__init imx_add_mxc_rnga( - const struct imx_mxc_rnga_data *data) -{ - struct resource res[] = { - { - .start = data->iobase, - .end = data->iobase + SZ_16K - 1, - .flags = IORESOURCE_MEM, - }, - }; - return imx_add_platform_device("mxc_rnga", -1, - res, ARRAY_SIZE(res), NULL, 0); -} - -static int __init imxXX_add_mxc_rnga(void) -{ - struct platform_device *ret; - -#if defined(CONFIG_SOC_IMX31) - if (cpu_is_mx31()) - ret = imx_add_mxc_rnga(&imx31_mxc_rnga_data); - else -#endif /* if defined(CONFIG_SOC_IMX31) */ - ret = ERR_PTR(-ENODEV); - - return PTR_ERR_OR_ZERO(ret); -} -arch_initcall(imxXX_add_mxc_rnga); diff --git a/arch/arm/mach-imx/imx31-dt.c b/arch/arm/mach-imx/imx31-dt.c index 32100222a017..62e6b4fb5370 100644 --- a/arch/arm/mach-imx/imx31-dt.c +++ b/arch/arm/mach-imx/imx31-dt.c @@ -28,10 +28,22 @@ static void __init imx31_dt_timer_init(void) mx31_clocks_init_dt(); } +/* FIXME: replace with DT binding */ +static const struct resource imx31_rnga_res[] __initconst = { + DEFINE_RES_MEM(MX31_RNGA_BASE_ADDR, SZ_16K), +}; + +static void __init imx31_dt_mach_init(void) +{ + platform_device_register_simple("mxc_rnga", -1, imx31_rnga_res, + ARRAY_SIZE(imx31_rnga_res)); +} + DT_MACHINE_START(IMX31_DT, "Freescale i.MX31 (Device Tree Support)") .map_io = mx31_map_io, .init_early = imx31_init_early, .init_irq = mx31_init_irq, .init_time = imx31_dt_timer_init, + .init_machine = imx31_dt_mach_init, .dt_compat = imx31_dt_board_compat, MACHINE_END diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c index 0884ca90d15a..3b135cd4b043 100644 --- a/arch/arm/mach-imx/mm-imx3.c +++ b/arch/arm/mach-imx/mm-imx3.c @@ -167,6 +167,10 @@ static const struct resource imx31_audmux_res[] __initconst = { DEFINE_RES_MEM(MX31_AUDMUX_BASE_ADDR, SZ_16K), }; +static const struct resource imx31_rnga_res[] __initconst = { + DEFINE_RES_MEM(MX31_RNGA_BASE_ADDR, SZ_16K), +}; + void __init imx31_soc_init(void) { int to_version = mx31_revision() >> 4; @@ -195,6 +199,8 @@ void __init imx31_soc_init(void) platform_device_register_simple("imx31-audmux", 0, imx31_audmux_res, ARRAY_SIZE(imx31_audmux_res)); + platform_device_register_simple("mxc_rnga", -1, imx31_rnga_res, + ARRAY_SIZE(imx31_rnga_res)); } #endif /* ifdef CONFIG_SOC_IMX31 */ From c112d2adc32c90ff39ad39feba8c29dcb6008ff6 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 24 Jun 2016 12:49:58 +0200 Subject: [PATCH 31/40] ARM: imx: deconstruct mx3_idle The imx31 and imx35 idle functions are almost the same, but we currently have to check the cpu type every time. This can be simplified by moving the logic from mx3_cpu_lp_set() into two separate idle functions, removing the last user of cpu_is_mx35. Signed-off-by: Arnd Bergmann Signed-off-by: Shawn Guo --- arch/arm/mach-imx/Makefile | 4 ++-- arch/arm/mach-imx/mm-imx3.c | 26 +++++++++++++++++++++---- arch/arm/mach-imx/pm-imx3.c | 38 ------------------------------------- 3 files changed, 24 insertions(+), 44 deletions(-) delete mode 100644 arch/arm/mach-imx/pm-imx3.c diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 9fbe624a5ef9..9f5fffd62702 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -8,8 +8,8 @@ obj-$(CONFIG_SOC_IMX25) += cpu-imx25.o mach-imx25.o pm-imx25.o obj-$(CONFIG_SOC_IMX27) += cpu-imx27.o pm-imx27.o obj-$(CONFIG_SOC_IMX27) += mm-imx27.o ehci-imx27.o -obj-$(CONFIG_SOC_IMX31) += mm-imx3.o cpu-imx31.o iomux-imx31.o ehci-imx31.o pm-imx3.o -obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o ehci-imx35.o pm-imx3.o +obj-$(CONFIG_SOC_IMX31) += mm-imx3.o cpu-imx31.o iomux-imx31.o ehci-imx31.o +obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o ehci-imx35.o imx5-pm-$(CONFIG_PM) += pm-imx5.o obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o $(imx5-pm-y) diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c index 3b135cd4b043..7638a35b3b36 100644 --- a/arch/arm/mach-imx/mm-imx3.c +++ b/arch/arm/mach-imx/mm-imx3.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -38,8 +39,6 @@ static void imx3_idle(void) { unsigned long reg = 0; - mx3_cpu_lp_set(MX3_WAIT); - __asm__ __volatile__( /* disable I and D cache */ "mrc p15, 0, %0, c1, c0, 0\n" @@ -135,11 +134,20 @@ void __init mx31_map_io(void) iotable_init(mx31_io_desc, ARRAY_SIZE(mx31_io_desc)); } +static void imx31_idle(void) +{ + int reg = imx_readl(mx3_ccm_base + MXC_CCM_CCMR); + reg &= ~MXC_CCM_CCMR_LPM_MASK; + imx_writel(reg, mx3_ccm_base + MXC_CCM_CCMR); + + imx3_idle(); +} + void __init imx31_init_early(void) { mxc_set_cpu_type(MXC_CPU_MX31); arch_ioremap_caller = imx3_ioremap_caller; - arm_pm_idle = imx3_idle; + arm_pm_idle = imx31_idle; mx3_ccm_base = MX31_IO_ADDRESS(MX31_CCM_BASE_ADDR); } @@ -218,11 +226,21 @@ void __init mx35_map_io(void) iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc)); } +static void imx35_idle(void) +{ + int reg = imx_readl(mx3_ccm_base + MXC_CCM_CCMR); + reg &= ~MXC_CCM_CCMR_LPM_MASK; + reg |= MXC_CCM_CCMR_LPM_WAIT_MX35; + imx_writel(reg, mx3_ccm_base + MXC_CCM_CCMR); + + imx3_idle(); +} + void __init imx35_init_early(void) { mxc_set_cpu_type(MXC_CPU_MX35); mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR)); - arm_pm_idle = imx3_idle; + arm_pm_idle = imx35_idle; arch_ioremap_caller = imx3_ioremap_caller; mx3_ccm_base = MX35_IO_ADDRESS(MX35_CCM_BASE_ADDR); } diff --git a/arch/arm/mach-imx/pm-imx3.c b/arch/arm/mach-imx/pm-imx3.c deleted file mode 100644 index 94c0898751d8..000000000000 --- a/arch/arm/mach-imx/pm-imx3.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2012 Freescale Semiconductor, Inc. All Rights Reserved. - * - * The code contained herein is licensed under the GNU General Public - * License. You may obtain a copy of the GNU General Public License - * Version 2 or later at the following locations: - * - * http://www.opensource.org/licenses/gpl-license.html - * http://www.gnu.org/copyleft/gpl.html - */ -#include - -#include "common.h" -#include "crmregs-imx3.h" -#include "devices/devices-common.h" -#include "hardware.h" - -/* - * Set cpu low power mode before WFI instruction. This function is called - * mx3 because it can be used for mx31 and mx35. - * Currently only WAIT_MODE is supported. - */ -void mx3_cpu_lp_set(enum mx3_cpu_pwr_mode mode) -{ - int reg = imx_readl(mx3_ccm_base + MXC_CCM_CCMR); - reg &= ~MXC_CCM_CCMR_LPM_MASK; - - switch (mode) { - case MX3_WAIT: - if (cpu_is_mx35()) - reg |= MXC_CCM_CCMR_LPM_WAIT_MX35; - imx_writel(reg, mx3_ccm_base + MXC_CCM_CCMR); - break; - default: - pr_err("Unknown cpu power mode: %d\n", mode); - return; - } -} From 48e076dadd0a79047befa539487d8645ded0b7e7 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 28 Jun 2016 10:22:16 +0800 Subject: [PATCH 32/40] ARM: imx: rework mx27_pm_init() call mx27_pm_init() uses its own initcall, unlike all of the other functions like it. Replacing the initcall with a .init_late() callback makes imx27 more like the others and lets us remove the last caller of cpu_is_mx27(). Signed-off-by: Arnd Bergmann Signed-off-by: Shawn Guo --- arch/arm/mach-imx/common.h | 1 + arch/arm/mach-imx/imx27-dt.c | 1 + arch/arm/mach-imx/mm-imx27.c | 2 ++ arch/arm/mach-imx/pm-imx27.c | 8 +------- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index 0a1d1f175b7a..a8f469333027 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h @@ -67,6 +67,7 @@ void imx_gpc_set_arm_power_in_lpm(bool power_off); void imx_gpc_set_arm_power_up_timing(u32 sw2iso, u32 sw); void imx_gpc_set_arm_power_down_timing(u32 sw2iso, u32 sw); void imx25_pm_init(void); +void imx27_pm_init(void); enum mxc_cpu_pwr_mode { WAIT_CLOCKED, /* wfi only */ diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c index 530a728c2acc..a754b8a48f38 100644 --- a/arch/arm/mach-imx/imx27-dt.c +++ b/arch/arm/mach-imx/imx27-dt.c @@ -27,5 +27,6 @@ DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)") .map_io = mx27_map_io, .init_early = imx27_init_early, .init_irq = mx27_init_irq, + .init_late = imx27_pm_init, .dt_compat = imx27_dt_board_compat, MACHINE_END diff --git a/arch/arm/mach-imx/mm-imx27.c b/arch/arm/mach-imx/mm-imx27.c index 7d82a5a5b16b..862b9b7762c7 100644 --- a/arch/arm/mach-imx/mm-imx27.c +++ b/arch/arm/mach-imx/mm-imx27.c @@ -98,4 +98,6 @@ void __init imx27_soc_init(void) /* imx27 has the imx21 type audmux */ platform_device_register_simple("imx21-audmux", 0, imx27_audmux_res, ARRAY_SIZE(imx27_audmux_res)); + + imx27_pm_init(); } diff --git a/arch/arm/mach-imx/pm-imx27.c b/arch/arm/mach-imx/pm-imx27.c index 43096c8990d4..d943535566c8 100644 --- a/arch/arm/mach-imx/pm-imx27.c +++ b/arch/arm/mach-imx/pm-imx27.c @@ -37,13 +37,7 @@ static const struct platform_suspend_ops mx27_suspend_ops = { .valid = suspend_valid_only_mem, }; -static int __init mx27_pm_init(void) +void __init imx27_pm_init(void) { - if (!cpu_is_mx27()) - return 0; - suspend_set_ops(&mx27_suspend_ops); - return 0; } - -device_initcall(mx27_pm_init); From 505c19f8bcb310f6e125c8c58e401a7093c82f5a Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 24 Jun 2016 12:50:00 +0200 Subject: [PATCH 33/40] ARM: imx: remove last call to cpu_is_mx5* The check for cpu_is_mx51/cpu_is_mx53() in mx51_revision()/mx53_revision() is just a safety precaution, but there are only two callers of this are using it only on the correct CPUs, and none of the other respective functions have this extra check. Removing these lets us kill off the cpu_is_* functions. Signed-off-by: Arnd Bergmann Signed-off-by: Shawn Guo --- arch/arm/mach-imx/cpu-imx5.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/arch/arm/mach-imx/cpu-imx5.c b/arch/arm/mach-imx/cpu-imx5.c index 3403bac94a31..4f2d1c772f85 100644 --- a/arch/arm/mach-imx/cpu-imx5.c +++ b/arch/arm/mach-imx/cpu-imx5.c @@ -60,13 +60,9 @@ static int get_mx51_srev(void) /* * Returns: * the silicon revision of the cpu - * -EINVAL - not a mx51 */ int mx51_revision(void) { - if (!cpu_is_mx51()) - return -EINVAL; - if (mx5_cpu_rev == -1) mx5_cpu_rev = get_mx51_srev(); @@ -112,13 +108,9 @@ static int get_mx53_srev(void) /* * Returns: * the silicon revision of the cpu - * -EINVAL - not a mx53 */ int mx53_revision(void) { - if (!cpu_is_mx53()) - return -EINVAL; - if (mx5_cpu_rev == -1) mx5_cpu_rev = get_mx53_srev(); From 44af782227b3977b98be6967533b0d23add40eb4 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 24 Jun 2016 12:50:01 +0200 Subject: [PATCH 34/40] ARM: imx: remove cpu_is_mx*() The mxc_cpu_type and cpu_is_mx() logic is largely unused, and the few remaining users were easy to convert into simpler code. Now that they are gone, we can remove all those macros as well. The related cpu_is_imx6*() set of function unfortunately is harder to remove, so those are staying around for now. Signed-off-by: Arnd Bergmann Signed-off-by: Shawn Guo --- arch/arm/mach-imx/cpu.c | 2 - arch/arm/mach-imx/mxc.h | 101 ---------------------------------------- 2 files changed, 103 deletions(-) diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c index 6a96b7cf468f..b3347d32349f 100644 --- a/arch/arm/mach-imx/cpu.c +++ b/arch/arm/mach-imx/cpu.c @@ -10,8 +10,6 @@ #include "common.h" unsigned int __mxc_cpu_type; -EXPORT_SYMBOL(__mxc_cpu_type); - static unsigned int imx_soc_revision; void mxc_set_cpu_type(unsigned int type) diff --git a/arch/arm/mach-imx/mxc.h b/arch/arm/mach-imx/mxc.h index d32704256781..34f2ff62583c 100644 --- a/arch/arm/mach-imx/mxc.h +++ b/arch/arm/mach-imx/mxc.h @@ -45,105 +45,7 @@ #ifndef __ASSEMBLY__ extern unsigned int __mxc_cpu_type; -#endif -#ifdef CONFIG_SOC_IMX1 -# ifdef mxc_cpu_type -# undef mxc_cpu_type -# define mxc_cpu_type __mxc_cpu_type -# else -# define mxc_cpu_type MXC_CPU_MX1 -# endif -# define cpu_is_mx1() (mxc_cpu_type == MXC_CPU_MX1) -#else -# define cpu_is_mx1() (0) -#endif - -#ifdef CONFIG_SOC_IMX21 -# ifdef mxc_cpu_type -# undef mxc_cpu_type -# define mxc_cpu_type __mxc_cpu_type -# else -# define mxc_cpu_type MXC_CPU_MX21 -# endif -# define cpu_is_mx21() (mxc_cpu_type == MXC_CPU_MX21) -#else -# define cpu_is_mx21() (0) -#endif - -#ifdef CONFIG_SOC_IMX25 -# ifdef mxc_cpu_type -# undef mxc_cpu_type -# define mxc_cpu_type __mxc_cpu_type -# else -# define mxc_cpu_type MXC_CPU_MX25 -# endif -# define cpu_is_mx25() (mxc_cpu_type == MXC_CPU_MX25) -#else -# define cpu_is_mx25() (0) -#endif - -#ifdef CONFIG_SOC_IMX27 -# ifdef mxc_cpu_type -# undef mxc_cpu_type -# define mxc_cpu_type __mxc_cpu_type -# else -# define mxc_cpu_type MXC_CPU_MX27 -# endif -# define cpu_is_mx27() (mxc_cpu_type == MXC_CPU_MX27) -#else -# define cpu_is_mx27() (0) -#endif - -#ifdef CONFIG_SOC_IMX31 -# ifdef mxc_cpu_type -# undef mxc_cpu_type -# define mxc_cpu_type __mxc_cpu_type -# else -# define mxc_cpu_type MXC_CPU_MX31 -# endif -# define cpu_is_mx31() (mxc_cpu_type == MXC_CPU_MX31) -#else -# define cpu_is_mx31() (0) -#endif - -#ifdef CONFIG_SOC_IMX35 -# ifdef mxc_cpu_type -# undef mxc_cpu_type -# define mxc_cpu_type __mxc_cpu_type -# else -# define mxc_cpu_type MXC_CPU_MX35 -# endif -# define cpu_is_mx35() (mxc_cpu_type == MXC_CPU_MX35) -#else -# define cpu_is_mx35() (0) -#endif - -#ifdef CONFIG_SOC_IMX51 -# ifdef mxc_cpu_type -# undef mxc_cpu_type -# define mxc_cpu_type __mxc_cpu_type -# else -# define mxc_cpu_type MXC_CPU_MX51 -# endif -# define cpu_is_mx51() (mxc_cpu_type == MXC_CPU_MX51) -#else -# define cpu_is_mx51() (0) -#endif - -#ifdef CONFIG_SOC_IMX53 -# ifdef mxc_cpu_type -# undef mxc_cpu_type -# define mxc_cpu_type __mxc_cpu_type -# else -# define mxc_cpu_type MXC_CPU_MX53 -# endif -# define cpu_is_mx53() (mxc_cpu_type == MXC_CPU_MX53) -#else -# define cpu_is_mx53() (0) -#endif - -#ifndef __ASSEMBLY__ #ifdef CONFIG_SOC_IMX6SL static inline bool cpu_is_imx6sl(void) { @@ -190,9 +92,6 @@ int tzic_enable_wake(void); extern struct cpu_op *(*get_cpu_op)(int *op); #endif -#define cpu_is_mx3() (cpu_is_mx31() || cpu_is_mx35()) -#define cpu_is_mx2() (cpu_is_mx21() || cpu_is_mx27()) - #define imx_readl readl_relaxed #define imx_readw readw_relaxed #define imx_writel writel_relaxed From 6176d8efb8583ed40113287d63b46cf3aa8f67be Mon Sep 17 00:00:00 2001 From: Jungseung Lee Date: Thu, 7 Jul 2016 18:00:20 +0200 Subject: [PATCH 35/40] ARM: iop: Fix indentation Fix indentation in iop3xx_std_desc Signed-off-by: Jungseung Lee Signed-off-by: Arnd Bergmann --- arch/arm/plat-iop/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-iop/setup.c b/arch/arm/plat-iop/setup.c index 5b217f460f18..8151bde990e6 100644 --- a/arch/arm/plat-iop/setup.c +++ b/arch/arm/plat-iop/setup.c @@ -20,12 +20,12 @@ * the IOP3xx OCCDR must be mapped uncached and unbuffered. */ static struct map_desc iop3xx_std_desc[] __initdata = { - { /* mem mapped registers */ + { /* mem mapped registers */ .virtual = IOP3XX_PERIPHERAL_VIRT_BASE, .pfn = __phys_to_pfn(IOP3XX_PERIPHERAL_PHYS_BASE), .length = IOP3XX_PERIPHERAL_SIZE, .type = MT_UNCACHED, - }, + }, }; void __init iop3xx_map_io(void) From da35cbcafad3d46daa96a6f01022f11842e8e7b6 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Wed, 22 Jun 2016 14:39:41 +0200 Subject: [PATCH 36/40] ARM: tegra: Remove board_init_funcs array In a configuration that enables CONFIG_UBSAN_SANITIZE_ALL, I am getting a section mismatch warning for tegra20: WARNING: arch/arm/mach-tegra/built-in.o(.data+0x6e0): Section mismatch in reference from the variable board_init_funcs to the function .init.text:paz00_init() The array is no longer useful here since there is only one entry, so we can simply call the function directly after checking of_machine_is_compatible(). This fixes the section mismatch and is easier to read. Signed-off-by: Arnd Bergmann Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/tegra.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c index 2378fa560a21..42d7ee9658fa 100644 --- a/arch/arm/mach-tegra/tegra.c +++ b/arch/arm/mach-tegra/tegra.c @@ -118,32 +118,14 @@ out: of_platform_populate(NULL, of_default_bus_match_table, NULL, parent); } -static void __init paz00_init(void) -{ - if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC)) - tegra_paz00_wifikill_init(); -} - -static struct { - char *machine; - void (*init)(void); -} board_init_funcs[] = { - { "compal,paz00", paz00_init }, -}; - static void __init tegra_dt_init_late(void) { - int i; - tegra_init_suspend(); tegra_cpuidle_init(); - for (i = 0; i < ARRAY_SIZE(board_init_funcs); i++) { - if (of_machine_is_compatible(board_init_funcs[i].machine)) { - board_init_funcs[i].init(); - break; - } - } + if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && + of_machine_is_compatible("compal,paz00")) + tegra_paz00_wifikill_init(); } static const char * const tegra_dt_board_compat[] = { From fce7b5ae1273a27db341d5dfd51a8ca6ef4caa95 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 21 Jun 2016 16:16:18 +0100 Subject: [PATCH 37/40] bus: mvebu-mbus: fix __iomem on register pointers The save_cpu_target functions should take "u32 __iomem *", not a plain "u32 *" as it is passed to register access functions. Fix the following warnings by adding the annotation: drivers/bus/mvebu-mbus.c:739:17: warning: incorrect type in argument 2 (different address spaces) drivers/bus/mvebu-mbus.c:739:17: expected void volatile [noderef] *addr drivers/bus/mvebu-mbus.c:739:17: got unsigned int [usertype] * drivers/bus/mvebu-mbus.c:741:17: warning: incorrect type in argument 2 (different address spaces) drivers/bus/mvebu-mbus.c:741:17: expected void volatile [noderef] *addr drivers/bus/mvebu-mbus.c:741:17: got unsigned int [usertype] * drivers/bus/mvebu-mbus.c:742:17: warning: incorrect type in argument 2 (different address spaces) drivers/bus/mvebu-mbus.c:742:17: expected void volatile [noderef] *addr drivers/bus/mvebu-mbus.c:742:17: got unsigned int [usertype] * drivers/bus/mvebu-mbus.c:744:17: warning: incorrect type in argument 2 (different address spaces) drivers/bus/mvebu-mbus.c:744:17: expected void volatile [noderef] *addr drivers/bus/mvebu-mbus.c:744:17: got unsigned int [usertype] * drivers/bus/mvebu-mbus.c:790:17: warning: incorrect type in argument 2 (different address spaces) drivers/bus/mvebu-mbus.c:790:17: expected void volatile [noderef] *addr drivers/bus/mvebu-mbus.c:790:17: got unsigned int [usertype] * drivers/bus/mvebu-mbus.c:792:17: warning: incorrect type in argument 2 (different address spaces) drivers/bus/mvebu-mbus.c:792:17: expected void volatile [noderef] *addr drivers/bus/mvebu-mbus.c:792:17: got unsigned int [usertype] * Signed-off-by: Ben Dooks Acked-by: Arnd Bergmann Signed-off-by: Gregory CLEMENT --- drivers/bus/mvebu-mbus.c | 8 ++++---- include/linux/mbus.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c index ce54a0160faa..8cac3b8d5c68 100644 --- a/drivers/bus/mvebu-mbus.c +++ b/drivers/bus/mvebu-mbus.c @@ -117,7 +117,7 @@ struct mvebu_mbus_soc_data { unsigned int (*win_remap_offset)(const int win); void (*setup_cpu_target)(struct mvebu_mbus_state *s); int (*save_cpu_target)(struct mvebu_mbus_state *s, - u32 *store_addr); + u32 __iomem *store_addr); int (*show_cpu_target)(struct mvebu_mbus_state *s, struct seq_file *seq, void *v); }; @@ -728,7 +728,7 @@ mvebu_mbus_default_setup_cpu_target(struct mvebu_mbus_state *mbus) static int mvebu_mbus_default_save_cpu_target(struct mvebu_mbus_state *mbus, - u32 *store_addr) + u32 __iomem *store_addr) { int i; @@ -780,7 +780,7 @@ mvebu_mbus_dove_setup_cpu_target(struct mvebu_mbus_state *mbus) static int mvebu_mbus_dove_save_cpu_target(struct mvebu_mbus_state *mbus, - u32 *store_addr) + u32 __iomem *store_addr) { int i; @@ -796,7 +796,7 @@ mvebu_mbus_dove_save_cpu_target(struct mvebu_mbus_state *mbus, return 4; } -int mvebu_mbus_save_cpu_target(u32 *store_addr) +int mvebu_mbus_save_cpu_target(u32 __iomem *store_addr) { return mbus_state.soc->save_cpu_target(&mbus_state, store_addr); } diff --git a/include/linux/mbus.h b/include/linux/mbus.h index ea34a867caa0..d610232762e3 100644 --- a/include/linux/mbus.h +++ b/include/linux/mbus.h @@ -66,7 +66,7 @@ static inline const struct mbus_dram_target_info *mv_mbus_dram_info_nooverlap(vo } #endif -int mvebu_mbus_save_cpu_target(u32 *store_addr); +int mvebu_mbus_save_cpu_target(u32 __iomem *store_addr); void mvebu_mbus_get_pcie_mem_aperture(struct resource *res); void mvebu_mbus_get_pcie_io_aperture(struct resource *res); int mvebu_mbus_get_dram_win_info(phys_addr_t phyaddr, u8 *target, u8 *attr); From ac29abf38176ec149671b01d228e0a9dc38e4e60 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 21 Jun 2016 16:16:19 +0100 Subject: [PATCH 38/40] bus: mvebu-mbus: make mvebu_mbus_syscore_ops static Make mvebu_mbus_syscore_ops static as it does not get used or declared outside mvebu-mbus.c to fix the following sparse warning: linux/drivers/bus/mvebu-mbus.c:1092:20: warning: symbol 'mvebu_mbus_syscore_ops' was not declared. Should it be static? Signed-off-by: Ben Dooks Acked-by: Arnd Bergmann Signed-off-by: Gregory CLEMENT --- drivers/bus/mvebu-mbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c index 8cac3b8d5c68..c7f396903184 100644 --- a/drivers/bus/mvebu-mbus.c +++ b/drivers/bus/mvebu-mbus.c @@ -1089,7 +1089,7 @@ static void mvebu_mbus_resume(void) } } -struct syscore_ops mvebu_mbus_syscore_ops = { +static struct syscore_ops mvebu_mbus_syscore_ops = { .suspend = mvebu_mbus_suspend, .resume = mvebu_mbus_resume, }; From 979f97ddad4bd188b4f09dd6b46514bbd5117d0b Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 27 Jun 2016 13:02:50 +0200 Subject: [PATCH 39/40] ARM: s3c64xx: avoid warning about 'struct device_node' The change to simplify of_platform_populate() had an unintended side-effect of introducing a build warning on s3c64xx: In file included from arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c:18:0: arch/arm/mach-s3c64xx/common.h:27:30: error: 'struct device_node' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] This adds a forward-declaration for the structure name in the header to avoid the warning. Signed-off-by: Arnd Bergmann Fixes: 850bea2335e4 ("arm: Remove unnecessary of_platform_populate with default match table") Acked-by: Krzysztof Kozlowski --- arch/arm/mach-s3c64xx/common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-s3c64xx/common.h b/arch/arm/mach-s3c64xx/common.h index 9eb864412911..4f204668f00e 100644 --- a/arch/arm/mach-s3c64xx/common.h +++ b/arch/arm/mach-s3c64xx/common.h @@ -24,6 +24,7 @@ void s3c64xx_init_io(struct map_desc *mach_desc, int size); void s3c64xx_restart(enum reboot_mode mode, const char *cmd); +struct device_node; void s3c64xx_clk_init(struct device_node *np, unsigned long xtal_f, unsigned long xusbxti_f, bool is_s3c6400, void __iomem *reg_base); void s3c64xx_set_xtal_freq(unsigned long freq); From 17bd274e390f87db27acaabf7b9df7ceb04e6ef2 Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Sun, 17 Jul 2016 11:35:29 +0300 Subject: [PATCH 40/40] ARM: mps2: fix typo Signed-off-by: Baruch Siach Reviewed-by: Vladimir Murzin Signed-off-by: Arnd Bergmann --- arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a0af11b90236..1bf9a108e99b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -899,7 +899,7 @@ config MACH_STM32F429 default y config ARCH_MPS2 - bool "ARM MPS2 paltform" + bool "ARM MPS2 platform" depends on ARM_SINGLE_ARMV7M select ARM_AMBA select CLKSRC_MPS2