Merge branch 'fixes' into next/soc
authorOlof Johansson <olof@lixom.net>
Mon, 31 Dec 2018 19:54:03 +0000 (11:54 -0800)
committerOlof Johansson <olof@lixom.net>
Mon, 31 Dec 2018 19:54:03 +0000 (11:54 -0800)
Merge in fixes here, since the last batch didn't make it in before the
release of 4.20, and we might as well group them with this set of
patches.

* fixes: (822 commits)
  arm64: dts: renesas: draak: Fix CVBS input
  ARM: dts: Fix OMAP4430 SDP Ethernet startup
  ARM: dts: am335x-pdu001: Fix polarity of card detection input
  ARM: OMAP1: ams-delta: Fix audio permanently muted
  ARM: dts: omap5: Fix dual-role mode on Super-Speed port
  arm64: dts: rockchip: fix rk3399-rockpro64 regulator gpios
  ARM: dts: imx7d-nitrogen7: Fix the description of the Wifi clock
  ARM: imx: update the cpu power up timing setting on i.mx6sx
  Revert "arm64: dts: marvell: add CPU Idle power state support on Armada 7K/8K"
  ARM: dts: imx7d-pico: Describe the Wifi clock
  ARM: dts: realview: Fix some more duplicate regulator nodes
  MAINTAINERS: update entry for MMP platform
  ARM: mmp/mmp2: fix cpu_is_mmp2() on mmp2-dt
  MAINTAINERS: mediatek: Update SoC entry
  ARM: dts: bcm2837: Fix polarity of wifi reset GPIOs
  + Linux 4.20-rc5

Signed-off-by: Olof Johansson <olof@lixom.net>
73 files changed:
Documentation/devicetree/bindings/arm/sunxi.txt
Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
MAINTAINERS
arch/arm/Kconfig.debug
arch/arm/include/debug/brcmstb.S
arch/arm/include/debug/stm32.S [new file with mode: 0644]
arch/arm/mach-bcm/Kconfig
arch/arm/mach-bcm/board_bcm2835.c
arch/arm/mach-bcm/platsmp.c
arch/arm/mach-bcm/platsmp.h
arch/arm/mach-davinci/board-da830-evm.c
arch/arm/mach-davinci/board-da850-evm.c
arch/arm/mach-davinci/board-dm365-evm.c
arch/arm/mach-davinci/board-dm644x-evm.c
arch/arm/mach-davinci/board-dm646x-evm.c
arch/arm/mach-davinci/board-mityomapl138.c
arch/arm/mach-exynos/common.h
arch/arm/mach-exynos/platsmp.c
arch/arm/mach-exynos/suspend.c
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/Makefile
arch/arm/mach-imx/common.h
arch/arm/mach-imx/cpu.c
arch/arm/mach-imx/mach-imx7ulp.c [new file with mode: 0644]
arch/arm/mach-imx/mxc.h
arch/arm/mach-imx/pm-imx7ulp.c [new file with mode: 0644]
arch/arm/mach-ks8695/board-acs5k.c
arch/arm/mach-meson/Kconfig
arch/arm/mach-mmp/aspenite.c
arch/arm/mach-mmp/common.h
arch/arm/mach-mmp/devices.c
arch/arm/mach-mmp/mmp2-dt.c
arch/arm/mach-mmp/mmp2.c
arch/arm/mach-mmp/pxa168.c
arch/arm/mach-mmp/pxa910.c
arch/arm/mach-mmp/pxa910.h
arch/arm/mach-mmp/time.c
arch/arm/mach-mmp/ttc_dkb.c
arch/arm/mach-omap1/Makefile
arch/arm/mach-omap1/ams-delta-fiq-handler.S
arch/arm/mach-omap1/ams-delta-fiq.c
arch/arm/mach-omap1/board-ams-delta.c
arch/arm/mach-omap1/board-ams-delta.h [moved from arch/arm/mach-omap1/include/mach/board-ams-delta.h with 66% similarity]
arch/arm/mach-omap1/board-palmte.c
arch/arm/mach-omap1/clock.c
arch/arm/mach-omap1/devices.c
arch/arm/mach-omap1/id.c
arch/arm/mach-omap1/include/mach/usb.h
arch/arm/mach-omap1/pm.c
arch/arm/mach-omap2/id.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/pm33xx-core.c
arch/arm/mach-omap2/timer.c
arch/arm/mach-pxa/cm-x300.c
arch/arm/mach-pxa/littleton.c
arch/arm/mach-pxa/zeus.c
arch/arm/mach-s5pv210/common.h
arch/arm/mach-s5pv210/pm.c
arch/arm/mach-shmobile/Kconfig
arch/arm/mach-shmobile/Makefile
arch/arm/mach-shmobile/pm-rmobile.h [deleted file]
arch/arm/mach-shmobile/smp-sh73a0.c
arch/arm/mach-socfpga/Kconfig
arch/arm/mach-socfpga/core.h
arch/arm/mach-socfpga/socfpga.c
arch/arm/mach-sunxi/Kconfig
arch/arm/mach-sunxi/sunxi.c
arch/arm/mach-tegra/irq.c
arch/arm/plat-samsung/Kconfig
arch/arm64/Kconfig.platforms
drivers/soc/renesas/Kconfig
drivers/soc/renesas/Makefile
drivers/soc/renesas/rmobile-sysc.c [moved from arch/arm/mach-shmobile/pm-rmobile.c with 93% similarity]

index e4beec3d9ad35710f6a44dec6f227dcf4b9f1622..f9ddc05d32f033e18509066e6c2220a205a99da6 100644 (file)
@@ -18,4 +18,5 @@ using one of the following compatible strings:
   allwinner,sun8i-v3s
   allwinner,sun9i-a80
   allwinner,sun50i-a64
+  allwinner,suniv-f1c100s
   nextthing,gr8
index ed11ce0ac8362d687bdfcc9041194deb5f4ee265..46055254e8dd339589818c571692cf530d64fc7a 100644 (file)
@@ -6,6 +6,7 @@ Required properties:
        "allwinner,sun4i-a10-wdt"
        "allwinner,sun6i-a31-wdt"
        "allwinner,sun50i-a64-wdt","allwinner,sun6i-a31-wdt"
+       "allwinner,suniv-f1c100s-wdt", "allwinner,sun4i-a10-wdt"
 - reg : Specifies base physical address and size of the registers.
 
 Optional properties:
index f063443a3e3a9c53939f5b71886f2ef05d8cbcad..924c9643cf3875b00a0a4e738bd5242526280928 100644 (file)
@@ -1297,7 +1297,6 @@ F:        include/dt-bindings/clock/gxbb*
 F:     Documentation/devicetree/bindings/clock/amlogic*
 
 ARM/Amlogic Meson SoC support
-M:     Carlo Caione <carlo@caione.org>
 M:     Kevin Hilman <khilman@baylibre.com>
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 L:     linux-amlogic@lists.infradead.org
@@ -1308,6 +1307,7 @@ F:        arch/arm/boot/dts/meson*
 F:     arch/arm64/boot/dts/amlogic/
 F:     drivers/pinctrl/meson/
 F:     drivers/mmc/host/meson*
+F:     drivers/soc/amlogic/
 N:     meson
 
 ARM/Annapurna Labs ALPINE ARCHITECTURE
index d6a49f59ecd924909d232a5e5d5d31b138d05df9..6d6e0330930b52f7369a46536473fa7174fad2d9 100644 (file)
@@ -1087,14 +1087,21 @@ choice
                  Say Y here if you want kernel low-level debugging support
                  on SOCFPGA(Cyclone 5 and Arria 5) based platforms.
 
-       config DEBUG_SOCFPGA_UART1
+       config DEBUG_SOCFPGA_ARRIA10_UART1
                depends on ARCH_SOCFPGA
-               bool "Use SOCFPGA UART1 for low-level debug"
+               bool "Use SOCFPGA Arria10 UART1 for low-level debug"
                select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on SOCFPGA(Arria 10) based platforms.
 
+       config DEBUG_SOCFPGA_CYCLONE5_UART1
+               depends on ARCH_SOCFPGA
+               bool "Use SOCFPGA Cyclone 5 UART1 for low-level debug"
+               select DEBUG_UART_8250
+               help
+                 Say Y here if you want kernel low-level debugging support
+                 on SOCFPGA(Cyclone 5 and Arria 5) based platforms.
 
        config DEBUG_SUN9I_UART0
                bool "Kernel low-level debugging messages via sun9i UART0"
@@ -1192,6 +1199,28 @@ choice
 
                  If unsure, say N.
 
+       config STM32F4_DEBUG_UART
+               bool "Use STM32F4 UART for low-level debug"
+               depends on ARCH_STM32
+               select DEBUG_STM32_UART
+               help
+                 Say Y here if you want kernel low-level debugging support
+                 on STM32F4 based platforms, which default UART is wired on
+                 USART1.
+
+                 If unsure, say N.
+
+       config STM32F7_DEBUG_UART
+               bool "Use STM32F7 UART for low-level debug"
+               depends on ARCH_STM32
+               select DEBUG_STM32_UART
+               help
+                 Say Y here if you want kernel low-level debugging support
+                 on STM32F7 based platforms, which default UART is wired on
+                 USART1.
+
+                 If unsure, say N.
+
        config TEGRA_DEBUG_UART_AUTO_ODMDATA
                bool "Kernel low-level debugging messages via Tegra UART via ODMDATA"
                depends on ARCH_TEGRA
@@ -1440,21 +1469,21 @@ config DEBUG_OMAP2PLUS_UART
        depends on ARCH_OMAP2PLUS
 
 config DEBUG_IMX_UART_PORT
-       int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \
-                                               DEBUG_IMX25_UART || \
-                                               DEBUG_IMX21_IMX27_UART || \
-                                               DEBUG_IMX31_UART || \
-                                               DEBUG_IMX35_UART || \
-                                               DEBUG_IMX50_UART || \
-                                               DEBUG_IMX51_UART || \
-                                               DEBUG_IMX53_UART || \
-                                               DEBUG_IMX6Q_UART || \
-                                               DEBUG_IMX6SL_UART || \
-                                               DEBUG_IMX6SX_UART || \
-                                               DEBUG_IMX6UL_UART || \
-                                               DEBUG_IMX7D_UART
+       int "i.MX Debug UART Port Selection"
+       depends on DEBUG_IMX1_UART || \
+                  DEBUG_IMX25_UART || \
+                  DEBUG_IMX21_IMX27_UART || \
+                  DEBUG_IMX31_UART || \
+                  DEBUG_IMX35_UART || \
+                  DEBUG_IMX50_UART || \
+                  DEBUG_IMX51_UART || \
+                  DEBUG_IMX53_UART || \
+                  DEBUG_IMX6Q_UART || \
+                  DEBUG_IMX6SL_UART || \
+                  DEBUG_IMX6SX_UART || \
+                  DEBUG_IMX6UL_UART || \
+                  DEBUG_IMX7D_UART
        default 1
-       depends on ARCH_MXC
        help
          Choose UART port on which kernel low-level debug messages
          should be output.
@@ -1476,6 +1505,10 @@ config DEBUG_STI_UART
        bool
        depends on ARCH_STI
 
+config DEBUG_STM32_UART
+       bool
+       depends on ARCH_STM32
+
 config DEBUG_SIRFSOC_UART
        bool
        depends on ARCH_SIRF
@@ -1525,6 +1558,7 @@ config DEBUG_LL_INCLUDE
        default "debug/s5pv210.S" if DEBUG_S5PV210_UART
        default "debug/sirf.S" if DEBUG_SIRFSOC_UART
        default "debug/sti.S" if DEBUG_STI_UART
+       default "debug/stm32.S" if DEBUG_STM32_UART
        default "debug/tegra.S" if DEBUG_TEGRA_UART
        default "debug/ux500.S" if DEBUG_UX500_UART
        default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT
@@ -1655,7 +1689,8 @@ config DEBUG_UART_PHYS
        default 0xfe800000 if ARCH_IOP32X
        default 0xff690000 if DEBUG_RK32_UART2
        default 0xffc02000 if DEBUG_SOCFPGA_UART0
-       default 0xffc02100 if DEBUG_SOCFPGA_UART1
+       default 0xffc02100 if DEBUG_SOCFPGA_ARRIA10_UART1
+       default 0xffc03000 if DEBUG_SOCFPGA_CYCLONE5_UART1
        default 0xffd82340 if ARCH_IOP13XX
        default 0xffe40000 if DEBUG_RCAR_GEN1_SCIF0
        default 0xffe42000 if DEBUG_RCAR_GEN1_SCIF2
@@ -1762,7 +1797,8 @@ config DEBUG_UART_VIRT
        default 0xfeb30c00 if DEBUG_KEYSTONE_UART0
        default 0xfeb31000 if DEBUG_KEYSTONE_UART1
        default 0xfec02000 if DEBUG_SOCFPGA_UART0
-       default 0xfec02100 if DEBUG_SOCFPGA_UART1
+       default 0xfec02100 if DEBUG_SOCFPGA_ARRIA10_UART1
+       default 0xfec03000 if DEBUG_SOCFPGA_CYCLONE5_UART1
        default 0xfec12000 if (DEBUG_MVEBU_UART0 || DEBUG_MVEBU_UART0_ALTERNATE) && ARCH_MVEBU
        default 0xfec12100 if DEBUG_MVEBU_UART1_ALTERNATE
        default 0xfec10000 if DEBUG_SIRFATLAS7_UART0
@@ -1811,9 +1847,9 @@ config DEBUG_UART_8250_WORD
        depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
        depends on DEBUG_UART_8250_SHIFT >= 2
        default y if DEBUG_PICOXCELL_UART || \
-               DEBUG_SOCFPGA_UART0 || DEBUG_SOCFPGA_UART1 || \
-               DEBUG_KEYSTONE_UART0 || DEBUG_KEYSTONE_UART1 || \
-               DEBUG_ALPINE_UART0 || \
+               DEBUG_SOCFPGA_UART0 || DEBUG_SOCFPGA_ARRIA10_UART1 || \
+               DEBUG_SOCFPGA_CYCLONE5_UART1 || DEBUG_KEYSTONE_UART0 || \
+               DEBUG_KEYSTONE_UART1 || DEBUG_ALPINE_UART0 || \
                DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \
                DEBUG_DAVINCI_DA8XX_UART2 || DEBUG_BCM_IPROC_UART3 || \
                DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2
index 0f580caa81e51abcf51216577ee96ece658d3b7e..bf8702ee8f86dff04e7f7d905b64c155c03ec912 100644 (file)
@@ -26,8 +26,9 @@
 
 #define UARTA_3390             REG_PHYS_ADDR(0x40a900)
 #define UARTA_7250             REG_PHYS_ADDR(0x40b400)
-#define UARTA_7260             REG_PHYS_ADDR(0x40c000)
-#define UARTA_7268             UARTA_7260
+#define UARTA_7255             REG_PHYS_ADDR(0x40c000)
+#define UARTA_7260             UARTA_7255
+#define UARTA_7268             UARTA_7255
 #define UARTA_7271             UARTA_7268
 #define UARTA_7278             REG_PHYS_ADDR_V7(0x40c000)
 #define UARTA_7364             REG_PHYS_ADDR(0x40b000)
@@ -82,15 +83,16 @@ ARM_BE8(    rev     \rv, \rv )
                /* Chip specific detection starts here */
 20:            checkuart(\rp, \rv, 0x33900000, 3390)
 21:            checkuart(\rp, \rv, 0x72500000, 7250)
-22:            checkuart(\rp, \rv, 0x72600000, 7260)
-23:            checkuart(\rp, \rv, 0x72680000, 7268)
-24:            checkuart(\rp, \rv, 0x72710000, 7271)
-25:            checkuart(\rp, \rv, 0x73640000, 7364)
-26:            checkuart(\rp, \rv, 0x73660000, 7366)
-27:            checkuart(\rp, \rv, 0x07437100, 74371)
-28:            checkuart(\rp, \rv, 0x74390000, 7439)
-29:            checkuart(\rp, \rv, 0x74450000, 7445)
-30:            checkuart(\rp, \rv, 0x72780000, 7278)
+22:            checkuart(\rp, \rv, 0x72550000, 7255)
+23:            checkuart(\rp, \rv, 0x72600000, 7260)
+24:            checkuart(\rp, \rv, 0x72680000, 7268)
+25:            checkuart(\rp, \rv, 0x72710000, 7271)
+26:            checkuart(\rp, \rv, 0x72780000, 7278)
+27:            checkuart(\rp, \rv, 0x73640000, 7364)
+28:            checkuart(\rp, \rv, 0x73660000, 7366)
+29:            checkuart(\rp, \rv, 0x07437100, 74371)
+30:            checkuart(\rp, \rv, 0x74390000, 7439)
+31:            checkuart(\rp, \rv, 0x74450000, 7445)
 
                /* No valid UART found */
 90:            mov     \rp, #0
diff --git a/arch/arm/include/debug/stm32.S b/arch/arm/include/debug/stm32.S
new file mode 100644 (file)
index 0000000..1abb32f
--- /dev/null
@@ -0,0 +1,41 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) STMicroelectronics SA 2017 - All Rights Reserved
+ * Author:   Gerald Baeza <gerald.baeza@st.com> for STMicroelectronics.
+ */
+
+#define STM32_UART_BASE                        0x40011000      /* USART1 */
+
+#ifdef CONFIG_STM32F4_DEBUG_UART
+#define STM32_USART_SR_OFF             0x00
+#define STM32_USART_TDR_OFF            0x04
+#endif
+
+#ifdef CONFIG_STM32F7_DEBUG_UART
+#define STM32_USART_SR_OFF             0x1C
+#define STM32_USART_TDR_OFF            0x28
+#endif
+
+#define STM32_USART_TC                 (1 << 6)        /* Tx complete       */
+#define STM32_USART_TXE                        (1 << 7)        /* Tx data reg empty */
+
+.macro addruart, rp, rv, tmp
+       ldr     \rp,      =STM32_UART_BASE      @ physical base
+       ldr     \rv,      =STM32_UART_BASE      @ virt base /* NoMMU */
+.endm
+
+.macro  senduart,rd,rx
+       strb    \rd, [\rx, #STM32_USART_TDR_OFF]
+.endm
+
+.macro  waituart,rd,rx
+1001:  ldr     \rd, [\rx, #(STM32_USART_SR_OFF)]       @ Read Status Register
+       tst     \rd, #STM32_USART_TXE                   @ TXE = 1 = tx empty
+       beq     1001b
+.endm
+
+.macro  busyuart,rd,rx
+1001:  ldr     \rd, [\rx, #(STM32_USART_SR_OFF)]       @ Read Status Register
+       tst     \rd, #STM32_USART_TC                    @ TC = 1 = tx complete
+       beq     1001b
+.endm
index 25aac6ee2ab18cdd0189c27bac759efc02f2d1c5..005f4e98dfb7eceaf464ef8f37757931af3ad5bb 100644 (file)
@@ -189,6 +189,7 @@ config ARCH_BCM_63XX
        bool "Broadcom BCM63xx DSL SoC"
        depends on ARCH_MULTI_V7
        depends on MMU
+       select ARCH_HAS_RESET_CONTROLLER
        select ARM_ERRATA_754322
        select ARM_ERRATA_764369 if SMP
        select ARM_GIC
index 8cff865ace04bf1c900676ebdacce9342d0f5036..bfc556f7672039808154d672c64e10bc2f62fec8 100644 (file)
@@ -1,15 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2010 Broadcom
- *
- * 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.
  */
 
 #include <linux/init.h>
index 7d954830eb57644e36d80b3ab17cb1778d208337..47f8053d02402fac003ebabf02427b7a62f7b4a3 100644 (file)
@@ -1,15 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2014-2015 Broadcom Corporation
  * Copyright 2014 Linaro Limited
- *
- * 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 version 2.
- *
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
- * kind, whether express or implied; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
  */
 
 #include <linux/cpumask.h>
index b8b8b3fa350d4d49911270d1f1fb983db587d0ef..e65bffad1d234e8366abff463a723b66b0178e4c 100644 (file)
@@ -1,10 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2017 Stefan Wahren <stefan.wahren@i2se.com>
- *
- * 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 version 2.
- *
  */
 
 extern const struct smp_operations bcm2836_smp_ops;
index 7d8ab36ff83d95f0adee2df7babada977dfafb56..e52ec1619b705c643043c6814983cb4d0050c162 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/platform_data/usb-davinci.h>
 #include <linux/platform_data/ti-aemif.h>
 #include <linux/regulator/machine.h>
+#include <linux/nvmem-provider.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -435,6 +436,27 @@ static inline void da830_evm_init_lcdc(int mux_mode)
 static inline void da830_evm_init_lcdc(int mux_mode) { }
 #endif
 
+static struct nvmem_cell_info da830_evm_nvmem_cells[] = {
+       {
+               .name           = "macaddr",
+               .offset         = 0x7f00,
+               .bytes          = ETH_ALEN,
+       }
+};
+
+static struct nvmem_cell_table da830_evm_nvmem_cell_table = {
+       .nvmem_name     = "1-00500",
+       .cells          = da830_evm_nvmem_cells,
+       .ncells         = ARRAY_SIZE(da830_evm_nvmem_cells),
+};
+
+static struct nvmem_cell_lookup da830_evm_nvmem_cell_lookup = {
+       .nvmem_name     = "1-00500",
+       .cell_name      = "macaddr",
+       .dev_id         = "davinci_emac.1",
+       .con_id         = "mac-address",
+};
+
 static struct at24_platform_data da830_evm_i2c_eeprom_info = {
        .byte_len       = SZ_256K / 8,
        .page_size      = 64,
@@ -620,6 +642,10 @@ static __init void da830_evm_init(void)
                        __func__, ret);
 
        davinci_serial_init(da8xx_serial_device);
+
+       nvmem_add_cell_table(&da830_evm_nvmem_cell_table);
+       nvmem_add_cell_lookups(&da830_evm_nvmem_cell_lookup, 1);
+
        i2c_register_board_info(1, da830_evm_i2c_devices,
                        ARRAY_SIZE(da830_evm_i2c_devices));
 
index e1a949b47306d2eaf93a14b76e0ac720373e1c10..6a29baf0a2895f31acfa4e386541b87e797060e4 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/kernel.h>
 #include <linux/leds.h>
 #include <linux/i2c.h>
-#include <linux/platform_data/at24.h>
 #include <linux/platform_data/pca953x.h>
 #include <linux/input.h>
 #include <linux/input/tps6507x-ts.h>
@@ -28,6 +27,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/rawnand.h>
 #include <linux/mtd/partitions.h>
+#include <linux/nvmem-provider.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
 #include <linux/platform_data/gpio-davinci.h>
@@ -100,6 +100,31 @@ static struct mtd_partition da850evm_spiflash_part[] = {
        },
 };
 
+static struct nvmem_cell_info da850evm_nvmem_cells[] = {
+       {
+               .name           = "macaddr",
+               .offset         = 0x0,
+               .bytes          = ETH_ALEN,
+       }
+};
+
+static struct nvmem_cell_table da850evm_nvmem_cell_table = {
+       /*
+        * The nvmem name differs from the partition name because of the
+        * internal works of the nvmem framework.
+        */
+       .nvmem_name     = "MAC-Address0",
+       .cells          = da850evm_nvmem_cells,
+       .ncells         = ARRAY_SIZE(da850evm_nvmem_cells),
+};
+
+static struct nvmem_cell_lookup da850evm_nvmem_cell_lookup = {
+       .nvmem_name     = "MAC-Address0",
+       .cell_name      = "macaddr",
+       .dev_id         = "davinci_emac.1",
+       .con_id         = "mac-address",
+};
+
 static struct flash_platform_data da850evm_spiflash_data = {
        .name           = "m25p80",
        .parts          = da850evm_spiflash_part,
@@ -1395,6 +1420,9 @@ static __init void da850_evm_init(void)
 
        davinci_serial_init(da8xx_serial_device);
 
+       nvmem_add_cell_table(&da850evm_nvmem_cell_table);
+       nvmem_add_cell_lookups(&da850evm_nvmem_cell_lookup, 1);
+
        i2c_register_board_info(1, da850_evm_i2c_devices,
                        ARRAY_SIZE(da850_evm_i2c_devices));
 
index 8143756ff38b022be3011fc6c901d9097edcf02b..8703fc18dd3b59045e45805f280a7740441b8979 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/slab.h>
 #include <linux/mtd/rawnand.h>
+#include <linux/nvmem-provider.h>
 #include <linux/input.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/eeprom.h>
@@ -203,6 +204,27 @@ static struct platform_device davinci_aemif_device = {
        .num_resources          = ARRAY_SIZE(davinci_aemif_resources),
 };
 
+static struct nvmem_cell_info davinci_nvmem_cells[] = {
+       {
+               .name           = "macaddr",
+               .offset         = 0x7f00,
+               .bytes          = ETH_ALEN,
+       }
+};
+
+static struct nvmem_cell_table davinci_nvmem_cell_table = {
+       .nvmem_name     = "1-00500",
+       .cells          = davinci_nvmem_cells,
+       .ncells         = ARRAY_SIZE(davinci_nvmem_cells),
+};
+
+static struct nvmem_cell_lookup davinci_nvmem_cell_lookup = {
+       .nvmem_name     = "1-00500",
+       .cell_name      = "macaddr",
+       .dev_id         = "davinci_emac.1",
+       .con_id         = "mac-address",
+};
+
 static struct at24_platform_data eeprom_info = {
        .byte_len       = (256*1024) / 8,
        .page_size      = 64,
@@ -781,6 +803,9 @@ static __init void dm365_evm_init(void)
        if (ret)
                pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
 
+       nvmem_add_cell_table(&davinci_nvmem_cell_table);
+       nvmem_add_cell_lookups(&davinci_nvmem_cell_lookup, 1);
+
        evm_init_i2c();
        davinci_serial_init(dm365_serial_device);
 
index e4a8f9225d1667f7ab733bdf93e423ea9df1426c..e1428115067f91916eb11c6c466aa3962a1ca454 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/mtd/rawnand.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
+#include <linux/nvmem-provider.h>
 #include <linux/phy.h>
 #include <linux/clk.h>
 #include <linux/videodev2.h>
@@ -510,6 +511,27 @@ static struct pcf857x_platform_data pcf_data_u35 = {
  *  - ... newer boards may have more
  */
 
+static struct nvmem_cell_info dm644evm_nvmem_cells[] = {
+       {
+               .name           = "macaddr",
+               .offset         = 0x7f00,
+               .bytes          = ETH_ALEN,
+       }
+};
+
+static struct nvmem_cell_table dm644evm_nvmem_cell_table = {
+       .nvmem_name     = "1-00500",
+       .cells          = dm644evm_nvmem_cells,
+       .ncells         = ARRAY_SIZE(dm644evm_nvmem_cells),
+};
+
+static struct nvmem_cell_lookup dm644evm_nvmem_cell_lookup = {
+       .nvmem_name     = "1-00500",
+       .cell_name      = "macaddr",
+       .dev_id         = "davinci_emac.1",
+       .con_id         = "mac-address",
+};
+
 static struct at24_platform_data eeprom_info = {
        .byte_len       = (256*1024) / 8,
        .page_size      = 64,
@@ -842,6 +864,8 @@ static __init void davinci_evm_init(void)
        platform_add_devices(davinci_evm_devices,
                             ARRAY_SIZE(davinci_evm_devices));
 #ifdef CONFIG_I2C
+       nvmem_add_cell_table(&dm644evm_nvmem_cell_table);
+       nvmem_add_cell_lookups(&dm644evm_nvmem_cell_lookup, 1);
        evm_init_i2c();
        davinci_setup_mmc(0, &dm6446evm_mmc_config);
 #endif
index 3e5ee09ee717ea339428501b2d06b94909de315c..8d5be6dd201999ff0f3c12429668c9274705013d 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/rawnand.h>
 #include <linux/mtd/partitions.h>
+#include <linux/nvmem-provider.h>
 #include <linux/clk.h>
 #include <linux/export.h>
 #include <linux/platform_data/gpio-davinci.h>
@@ -342,6 +343,27 @@ static struct pcf857x_platform_data pcf_data = {
  *  - ... newer boards may have more
  */
 
+static struct nvmem_cell_info dm646x_evm_nvmem_cells[] = {
+       {
+               .name           = "macaddr",
+               .offset         = 0x7f00,
+               .bytes          = ETH_ALEN,
+       }
+};
+
+static struct nvmem_cell_table dm646x_evm_nvmem_cell_table = {
+       .nvmem_name     = "1-00500",
+       .cells          = dm646x_evm_nvmem_cells,
+       .ncells         = ARRAY_SIZE(dm646x_evm_nvmem_cells),
+};
+
+static struct nvmem_cell_lookup dm646x_evm_nvmem_cell_lookup = {
+       .nvmem_name     = "1-00500",
+       .cell_name      = "macaddr",
+       .dev_id         = "davinci_emac.1",
+       .con_id         = "mac-address",
+};
+
 static struct at24_platform_data eeprom_info = {
        .byte_len       = (256*1024) / 8,
        .page_size      = 64,
@@ -815,6 +837,8 @@ static __init void evm_init(void)
                pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
 
 #ifdef CONFIG_I2C
+       nvmem_add_cell_table(&dm646x_evm_nvmem_cell_table);
+       nvmem_add_cell_lookups(&dm646x_evm_nvmem_cell_lookup, 1);
        evm_init_i2c();
 #endif
 
index 2933e0c87cfacfe04d8da175d20b5374bf0cb648..8df16e81b69ea19f3d878dc789d065e74c0b2e5a 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/console.h>
 #include <linux/platform_device.h>
 #include <linux/mtd/partitions.h>
+#include <linux/nvmem-provider.h>
 #include <linux/regulator/machine.h>
 #include <linux/i2c.h>
 #include <linux/platform_data/at24.h>
@@ -161,6 +162,31 @@ bad_config:
        mityomapl138_cpufreq_init(partnum);
 }
 
+/*
+ * We don't define a cell for factory config as it will be accessed from the
+ * board file using the nvmem notifier chain.
+ */
+static struct nvmem_cell_info mityomapl138_nvmem_cells[] = {
+       {
+               .name           = "macaddr",
+               .offset         = 0x64,
+               .bytes          = ETH_ALEN,
+       }
+};
+
+static struct nvmem_cell_table mityomapl138_nvmem_cell_table = {
+       .nvmem_name     = "1-00500",
+       .cells          = mityomapl138_nvmem_cells,
+       .ncells         = ARRAY_SIZE(mityomapl138_nvmem_cells),
+};
+
+static struct nvmem_cell_lookup mityomapl138_nvmem_cell_lookup = {
+       .nvmem_name     = "1-00500",
+       .cell_name      = "macaddr",
+       .dev_id         = "davinci_emac.1",
+       .con_id         = "mac-address",
+};
+
 static struct at24_platform_data mityomapl138_fd_chip = {
        .byte_len       = 256,
        .page_size      = 8,
@@ -543,6 +569,9 @@ static void __init mityomapl138_init(void)
 
        davinci_serial_init(da8xx_serial_device);
 
+       nvmem_add_cell_table(&mityomapl138_nvmem_cell_table);
+       nvmem_add_cell_lookups(&mityomapl138_nvmem_cell_lookup, 1);
+
        ret = da8xx_register_i2c(0, &mityomap_i2c_0_pdata);
        if (ret)
                pr_warn("i2c0 registration failed: %d\n", ret);
index f96730cce6e82c48e9f2d2c0b2be58bd55ff93ee..1b8699e940989b5e9f45e26650da0811f0a2e812 100644 (file)
@@ -114,8 +114,6 @@ bool __init exynos_secure_firmware_available(void);
 void exynos_set_boot_flag(unsigned int cpu, unsigned int mode);
 void exynos_clear_boot_flag(unsigned int cpu, unsigned int mode);
 
-extern u32 exynos_get_eint_wake_mask(void);
-
 #ifdef CONFIG_PM_SLEEP
 extern void __init exynos_pm_init(void);
 #else
index 6a1e682371b32c400041fb2aa0db1698a19a63d3..c39ffd2e2fe697b9f3ffe5539f7b925f2081fa47 100644 (file)
@@ -397,38 +397,12 @@ fail:
 
 static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
 {
-       int i;
-
        exynos_sysram_init();
 
        exynos_set_delayed_reset_assertion(true);
 
        if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
                exynos_scu_enable();
-
-       /*
-        * Write the address of secondary startup into the
-        * system-wide flags register. The boot monitor waits
-        * until it receives a soft interrupt, and then the
-        * secondary CPU branches to this address.
-        *
-        * Try using firmware operation first and fall back to
-        * boot register if it fails.
-        */
-       for (i = 1; i < max_cpus; ++i) {
-               unsigned long boot_addr;
-               u32 mpidr;
-               u32 core_id;
-               int ret;
-
-               mpidr = cpu_logical_map(i);
-               core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
-               boot_addr = __pa_symbol(exynos4_secondary_startup);
-
-               ret = exynos_set_boot_addr(core_id, boot_addr);
-               if (ret)
-                       break;
-       }
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
index bb8e3985acdb30f5f568a340f1ceaf3c39e43bb7..0850505ac78b2c52c42c6eed6b4d2e8b8ee841db 100644 (file)
@@ -30,8 +30,6 @@
 #include <asm/smp_scu.h>
 #include <asm/suspend.h>
 
-#include <plat/pm-common.h>
-
 #include "common.h"
 
 #define REG_TABLE_END (-1U)
@@ -93,6 +91,11 @@ static const struct exynos_wkup_irq exynos5250_wkup_irq[] = {
        { /* sentinel */ },
 };
 
+static u32 exynos_read_eint_wakeup_mask(void)
+{
+       return pmu_raw_readl(EXYNOS_EINT_WAKEUP_MASK);
+}
+
 static int exynos_irq_set_wake(struct irq_data *data, unsigned int state)
 {
        const struct exynos_wkup_irq *wkup_irq;
@@ -277,8 +280,10 @@ static int exynos5420_cpu_suspend(unsigned long arg)
 
 static void exynos_pm_set_wakeup_mask(void)
 {
-       /* Set wake-up mask registers */
-       pmu_raw_writel(exynos_get_eint_wake_mask(), EXYNOS_EINT_WAKEUP_MASK);
+       /*
+        * Set wake-up mask registers
+        * EXYNOS_EINT_WAKEUP_MASK is set by pinctrl driver in late suspend.
+        */
        pmu_raw_writel(exynos_irqwake_intmask & ~(1 << 31), S5P_WAKEUP_MASK);
 }
 
@@ -488,27 +493,24 @@ early_wakeup:
 
 static int exynos_suspend_enter(suspend_state_t state)
 {
+       u32 eint_wakeup_mask = exynos_read_eint_wakeup_mask();
        int ret;
 
-       s3c_pm_debug_init();
-
-       S3C_PMDBG("%s: suspending the system...\n", __func__);
+       pr_debug("%s: suspending the system...\n", __func__);
 
-       S3C_PMDBG("%s: wakeup masks: %08x,%08x\n", __func__,
-                       exynos_irqwake_intmask, exynos_get_eint_wake_mask());
+       pr_debug("%s: wakeup masks: %08x,%08x\n", __func__,
+                 exynos_irqwake_intmask, eint_wakeup_mask);
 
        if (exynos_irqwake_intmask == -1U
-           && exynos_get_eint_wake_mask() == -1U) {
+           && eint_wakeup_mask == EXYNOS_EINT_WAKEUP_MASK_DISABLED) {
                pr_err("%s: No wake-up sources!\n", __func__);
                pr_err("%s: Aborting sleep\n", __func__);
                return -EINVAL;
        }
 
-       s3c_pm_save_uarts();
        if (pm_data->pm_prepare)
                pm_data->pm_prepare();
        flush_cache_all();
-       s3c_pm_check_store();
 
        ret = call_firmware_op(suspend);
        if (ret == -ENOSYS)
@@ -518,14 +520,11 @@ static int exynos_suspend_enter(suspend_state_t state)
 
        if (pm_data->pm_resume_prepare)
                pm_data->pm_resume_prepare();
-       s3c_pm_restore_uarts();
 
-       S3C_PMDBG("%s: wakeup stat: %08x\n", __func__,
+       pr_debug("%s: wakeup stat: %08x\n", __func__,
                        pmu_raw_readl(S5P_WAKEUP_STAT));
 
-       s3c_pm_check_restore();
-
-       S3C_PMDBG("%s: resuming the system...\n", __func__);
+       pr_debug("%s: resuming the system...\n", __func__);
 
        return 0;
 }
@@ -548,8 +547,6 @@ static int exynos_suspend_prepare(void)
                return ret;
        }
 
-       s3c_pm_check_prepare();
-
        return 0;
 }
 
@@ -557,8 +554,6 @@ static void exynos_suspend_finish(void)
 {
        int ret;
 
-       s3c_pm_check_cleanup();
-
        ret = regulator_suspend_finish();
        if (ret)
                pr_warn("Failed to resume regulators from suspend (%d)\n", ret);
index abc337111eff2e59c63dd898313b45092ba53a7f..9b8d4d6aa76362a3ddb91749cb4af559b887529b 100644 (file)
@@ -558,6 +558,15 @@ config SOC_IMX7D
        help
                This enables support for Freescale i.MX7 Dual processor.
 
+config SOC_IMX7ULP
+       bool "i.MX7ULP support"
+       select CLKSRC_IMX_TPM
+       select PINCTRL_IMX7ULP
+       select SOC_IMX7D_CA7 if ARCH_MULTI_V7
+       select SOC_IMX7D_CM4 if ARM_SINGLE_ARMV7M
+       help
+         This enables support for Freescale i.MX7 Ultra Low Power processor.
+
 config SOC_VF610
        bool "Vybrid Family VF610 support"
        select ARM_GIC if ARCH_MULTI_V7
index bae179af21f6dc211ea656264d6aa10192de84f6..8af2f7e91d13c667806d16a021ac10866078e4f9 100644 (file)
@@ -83,6 +83,7 @@ obj-$(CONFIG_SOC_IMX6SX) += mach-imx6sx.o
 obj-$(CONFIG_SOC_IMX6UL) += mach-imx6ul.o
 obj-$(CONFIG_SOC_IMX7D_CA7) += mach-imx7d.o
 obj-$(CONFIG_SOC_IMX7D_CM4) += mach-imx7d-cm4.o
+obj-$(CONFIG_SOC_IMX7ULP) += mach-imx7ulp.o pm-imx7ulp.o
 
 ifeq ($(CONFIG_SUSPEND),y)
 AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a
index 423dd76bb6b812e408f106e2367386820b13a8a4..bc915e5b4d56d8e8ed69c941081c226c3530185f 100644 (file)
@@ -120,6 +120,7 @@ void imx6dl_pm_init(void);
 void imx6sl_pm_init(void);
 void imx6sx_pm_init(void);
 void imx6ul_pm_init(void);
+void imx7ulp_pm_init(void);
 
 #ifdef CONFIG_PM
 void imx51_pm_init(void);
index c73593e0912161a906c57568ff93e42fc75ca270..0b137eeffb61628a851f075c7c1fb2e4789ef4f0 100644 (file)
@@ -145,6 +145,9 @@ struct device * __init imx_soc_device_init(void)
        case MXC_CPU_IMX7D:
                soc_id = "i.MX7D";
                break;
+       case MXC_CPU_IMX7ULP:
+               soc_id = "i.MX7ULP";
+               break;
        default:
                soc_id = "Unknown";
        }
diff --git a/arch/arm/mach-imx/mach-imx7ulp.c b/arch/arm/mach-imx/mach-imx7ulp.c
new file mode 100644 (file)
index 0000000..33937eb
--- /dev/null
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2016 Freescale Semiconductor, Inc.
+ * Copyright 2017-2018 NXP
+ *   Author: Dong Aisheng <aisheng.dong@nxp.com>
+ */
+
+#include <linux/irqchip.h>
+#include <linux/of_platform.h>
+#include <asm/mach/arch.h>
+
+#include "common.h"
+#include "hardware.h"
+
+static void __init imx7ulp_init_machine(void)
+{
+       imx7ulp_pm_init();
+
+       mxc_set_cpu_type(MXC_CPU_IMX7ULP);
+       of_platform_default_populate(NULL, NULL, imx_soc_device_init());
+}
+
+static const char *const imx7ulp_dt_compat[] __initconst = {
+       "fsl,imx7ulp",
+       NULL,
+};
+
+DT_MACHINE_START(IMX7ulp, "Freescale i.MX7ULP (Device Tree)")
+       .init_machine   = imx7ulp_init_machine,
+       .dt_compat      = imx7ulp_dt_compat,
+MACHINE_END
index b130a53ff62a8bc8389e967661b5912d8e0ff61d..8e72d4e080aff20a60a92a081717e5e4eae1a950 100644 (file)
@@ -44,6 +44,7 @@
 #define MXC_CPU_IMX6ULZ                0x6b
 #define MXC_CPU_IMX6SLL                0x67
 #define MXC_CPU_IMX7D          0x72
+#define MXC_CPU_IMX7ULP                0xff
 
 #define IMX_DDR_TYPE_LPDDR2            1
 
diff --git a/arch/arm/mach-imx/pm-imx7ulp.c b/arch/arm/mach-imx/pm-imx7ulp.c
new file mode 100644 (file)
index 0000000..cf6a380
--- /dev/null
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2016 Freescale Semiconductor, Inc.
+ * Copyright 2017-2018 NXP
+ *   Author: Dong Aisheng <aisheng.dong@nxp.com>
+ */
+
+#include <linux/io.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+
+#define SMC_PMCTRL             0x10
+#define BP_PMCTRL_PSTOPO        16
+#define PSTOPO_PSTOP3          0x3
+
+void __init imx7ulp_pm_init(void)
+{
+       struct device_node *np;
+       void __iomem *smc1_base;
+
+       np = of_find_compatible_node(NULL, NULL, "fsl,imx7ulp-smc1");
+       smc1_base = of_iomap(np, 0);
+       WARN_ON(!smc1_base);
+
+       /* Partial Stop mode 3 with system/bus clock enabled */
+       writel_relaxed(PSTOPO_PSTOP3 << BP_PMCTRL_PSTOPO,
+                      smc1_base + SMC_PMCTRL);
+       iounmap(smc1_base);
+}
index ef835d82cdb95ecb7f43d36a80f1dc7c9870a5b6..5783062224c393254c82ee45807e90c486ed95bb 100644 (file)
@@ -100,7 +100,7 @@ static struct i2c_board_info acs5k_i2c_devs[] __initdata = {
        },
 };
 
-static void acs5k_i2c_init(void)
+static void __init acs5k_i2c_init(void)
 {
        /* The gpio interface */
        gpiod_add_lookup_table(&acs5k_i2c_gpiod_table);
index d51cfda953d4564d372dac3955aedc9b3cefef29..b168316971836c525d46721bedeb916ddb3ffa2e 100644 (file)
@@ -4,12 +4,14 @@ menuconfig ARCH_MESON
        select GPIOLIB
        select GENERIC_IRQ_CHIP
        select ARM_GIC
+       select ARM_GLOBAL_TIMER
        select CACHE_L2X0
        select PINCTRL
        select PINCTRL_MESON
        select COMMON_CLK
        select COMMON_CLK_AMLOGIC
        select HAVE_ARM_SCU if SMP
+       select HAVE_ARM_TWD if SMP
 
 if ARCH_MESON
 
index 6c2ebf01893afeb9e5ab76a2e7a57026db684b4f..75b2d7db643e7ad47f6deca37f6002b8b2eb2054 100644 (file)
@@ -29,6 +29,7 @@
 #include "addr-map.h"
 #include "mfp-pxa168.h"
 #include "pxa168.h"
+#include "pxa910.h"
 #include "irqs.h"
 #include "common.h"
 
@@ -256,9 +257,15 @@ static void __init common_init(void)
        /* off-chip devices */
        platform_device_register(&smc91x_device);
 
+#if IS_ENABLED(CONFIG_USB_SUPPORT)
+#if IS_ENABLED(CONFIG_PHY_PXA_USB)
+       platform_device_register(&pxa168_device_usb_phy);
+#endif
+
 #if IS_ENABLED(CONFIG_USB_EHCI_MV)
        pxa168_add_usb_host(&pxa168_sph_pdata);
 #endif
+#endif
 }
 
 MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform")
index 7e284d9c429fbf738fdbb6d67ec73d6e08f253d3..483b8b6d3005a07f3588a1ac087cb8b4b95052d9 100644 (file)
@@ -2,7 +2,7 @@
 #include <linux/reboot.h>
 #define ARRAY_AND_SIZE(x)      (x), ARRAY_SIZE(x)
 
-extern void timer_init(int irq);
+extern void mmp_timer_init(int irq, unsigned long rate);
 
 extern void __init mmp_map_io(void);
 extern void mmp_restart(enum reboot_mode, const char *);
index 0fca63c80e1a72f83f055334edb2430ca13666d1..822b8be042b9ce5a8ff3d7aedb9c6a8318e9c95a 100644 (file)
@@ -240,6 +240,27 @@ void pxa_usb_phy_deinit(void __iomem *phy_reg)
 #if IS_ENABLED(CONFIG_USB_SUPPORT)
 static u64 __maybe_unused usb_dma_mask = ~(u32)0;
 
+#if IS_ENABLED(CONFIG_PHY_PXA_USB)
+struct resource pxa168_usb_phy_resources[] = {
+       [0] = {
+               .start  = PXA168_U2O_PHYBASE,
+               .end    = PXA168_U2O_PHYBASE + USB_PHY_RANGE,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+struct platform_device pxa168_device_usb_phy = {
+       .name           = "pxa-usb-phy",
+       .id             = -1,
+       .resource       = pxa168_usb_phy_resources,
+       .num_resources  = ARRAY_SIZE(pxa168_usb_phy_resources),
+       .dev            =  {
+               .dma_mask       = &usb_dma_mask,
+               .coherent_dma_mask = 0xffffffff,
+       }
+};
+#endif /* CONFIG_PHY_PXA_USB */
+
 #if IS_ENABLED(CONFIG_USB_MV_UDC)
 struct resource pxa168_u2o_resources[] = {
        /* regbase */
index 0341359b24a43d5b5e64c234e0f68596cf962955..50c5e8b5be3dc5d22028ec1beb5a387e1aeb985c 100644 (file)
@@ -26,8 +26,8 @@ static void __init mmp_init_time(void)
 #ifdef CONFIG_CACHE_TAUROS2
        tauros2_init(0);
 #endif
-       mmp_dt_init_timer();
        of_clk_init(NULL);
+       mmp_dt_init_timer();
 }
 
 static const char *const mmp2_dt_board_compat[] __initconst = {
index afba5460cdaf657b8b6f77a52b52afd70e44ecf7..726c1a642deac5bdbf91aa73b2e6416fc770cb52 100644 (file)
@@ -134,7 +134,7 @@ void __init mmp2_timer_init(void)
        clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1);
        __raw_writel(clk_rst, APBC_TIMERS);
 
-       timer_init(IRQ_MMP2_TIMER1);
+       mmp_timer_init(IRQ_MMP2_TIMER1, 6500000);
 }
 
 /* on-chip devices */
index 0f5f16fb8c66e569b8f3c8df596d6e95ef372713..cdcf65ace3f903a3a715d51e6b49c6cf3e8e426c 100644 (file)
@@ -79,7 +79,7 @@ void __init pxa168_timer_init(void)
        /* 3.25MHz, bus/functional clock enabled, release reset */
        __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
 
-       timer_init(IRQ_PXA168_TIMER1);
+       mmp_timer_init(IRQ_PXA168_TIMER1, 3250000);
 }
 
 void pxa168_clear_keypad_wakeup(void)
index 1ccbba9ac4953dfb7adff4dafe4a47dd3ea5e3b1..d30a7d12bc988626dcb476692c087a8fa8f7c575 100644 (file)
@@ -116,7 +116,7 @@ void __init pxa910_timer_init(void)
        __raw_writel(APBC_APBCLK | APBC_RST, APBC_TIMERS);
        __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
 
-       timer_init(IRQ_PXA910_AP1_TIMER1);
+       mmp_timer_init(IRQ_PXA910_AP1_TIMER1, 3250000);
 }
 
 /* on-chip devices */
index 42009c349eae8733a88b24b1bb0935e790dc3b77..2dfe38e4acc13ab5afd2647fac52ccbdf96e9cb6 100644 (file)
@@ -22,6 +22,7 @@ extern struct pxa_device_desc pxa910_device_pwm2;
 extern struct pxa_device_desc pxa910_device_pwm3;
 extern struct pxa_device_desc pxa910_device_pwm4;
 extern struct pxa_device_desc pxa910_device_nand;
+extern struct platform_device pxa168_device_usb_phy;
 extern struct platform_device pxa168_device_u2o;
 extern struct platform_device pxa168_device_u2ootg;
 extern struct platform_device pxa168_device_u2oehci;
index 96ad1db0b04bef7c59a191ffec822a5e84ae7686..f9c295154b9462e80e67d0ec66abe9d001e876a3 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/kernel.h>
 #include <linux/interrupt.h>
 #include <linux/clockchips.h>
+#include <linux/clk.h>
 
 #include <linux/io.h>
 #include <linux/irq.h>
 #include "cputype.h"
 #include "clock.h"
 
-#ifdef CONFIG_CPU_MMP2
-#define MMP_CLOCK_FREQ         6500000
-#else
-#define MMP_CLOCK_FREQ         3250000
-#endif
-
 #define TIMERS_VIRT_BASE       TIMERS1_VIRT_BASE
 
 #define MAX_DELTA              (0xfffffffe)
@@ -189,19 +184,18 @@ static struct irqaction timer_irq = {
        .dev_id         = &ckevt,
 };
 
-void __init timer_init(int irq)
+void __init mmp_timer_init(int irq, unsigned long rate)
 {
        timer_config();
 
-       sched_clock_register(mmp_read_sched_clock, 32, MMP_CLOCK_FREQ);
+       sched_clock_register(mmp_read_sched_clock, 32, rate);
 
        ckevt.cpumask = cpumask_of(0);
 
        setup_irq(irq, &timer_irq);
 
-       clocksource_register_hz(&cksrc, MMP_CLOCK_FREQ);
-       clockevents_config_and_register(&ckevt, MMP_CLOCK_FREQ,
-                                       MIN_DELTA, MAX_DELTA);
+       clocksource_register_hz(&cksrc, rate);
+       clockevents_config_and_register(&ckevt, rate, MIN_DELTA, MAX_DELTA);
 }
 
 #ifdef CONFIG_OF
@@ -213,7 +207,9 @@ static const struct of_device_id mmp_timer_dt_ids[] = {
 void __init mmp_dt_init_timer(void)
 {
        struct device_node *np;
+       struct clk *clk;
        int irq, ret;
+       unsigned long rate;
 
        np = of_find_matching_node(NULL, mmp_timer_dt_ids);
        if (!np) {
@@ -221,6 +217,18 @@ void __init mmp_dt_init_timer(void)
                goto out;
        }
 
+       clk = of_clk_get(np, 0);
+       if (!IS_ERR(clk)) {
+               ret = clk_prepare_enable(clk);
+               if (ret)
+                       goto out;
+               rate = clk_get_rate(clk) / 2;
+       } else if (cpu_is_pj4()) {
+               rate = 6500000;
+       } else {
+               rate = 3250000;
+       }
+
        irq = irq_of_parse_and_map(np, 0);
        if (!irq) {
                ret = -EINVAL;
@@ -231,7 +239,7 @@ void __init mmp_dt_init_timer(void)
                ret = -ENOMEM;
                goto out;
        }
-       timer_init(irq);
+       mmp_timer_init(irq, rate);
        return;
 out:
        pr_err("Failed to get timer from device tree with error:%d\n", ret);
index c7897fb2b6dadd82c20536ccc5147cee20431597..09b53ace08acc955fcdbc7e880bd95989dd974de 100644 (file)
@@ -282,6 +282,11 @@ static void __init ttc_dkb_init(void)
                                 sizeof(struct pxa_gpio_platform_data));
        platform_add_devices(ARRAY_AND_SIZE(ttc_dkb_devices));
 
+#if IS_ENABLED(CONFIG_USB_SUPPORT)
+#if IS_ENABLED(CONFIG_PHY_PXA_USB)
+       platform_device_register(&pxa168_device_usb_phy);
+#endif
+
 #if IS_ENABLED(CONFIG_USB_MV_UDC)
        pxa168_device_u2o.dev.platform_data = &ttc_usb_pdata;
        platform_device_register(&pxa168_device_u2o);
@@ -296,6 +301,7 @@ static void __init ttc_dkb_init(void)
        pxa168_device_u2ootg.dev.platform_data = &ttc_usb_pdata;
        platform_device_register(&pxa168_device_u2ootg);
 #endif
+#endif
 
 #if IS_ENABLED(CONFIG_MMP_DISP)
        add_disp();
index e8ccf51c6f292959c4f373d7a802c19ddf278c09..ec0235899de20e63eb4d351775a1675817aafb6a 100644 (file)
@@ -25,7 +25,7 @@ obj-y                                 += $(i2c-omap-m) $(i2c-omap-y)
 
 led-y := leds.o
 
-usb-fs-$(CONFIG_USB)                   := usb.o
+usb-fs-$(CONFIG_USB_SUPPORT)           := usb.o
 obj-y                                  += $(usb-fs-m) $(usb-fs-y)
 
 # Specific board support
index e3faa0274b564b3b36bbf6b0599545bbd91436a7..7c9fb7fe0070418fb67cf39ed3ee74e2c64dc6be 100644 (file)
@@ -18,9 +18,9 @@
 #include <linux/platform_data/gpio-omap.h>
 
 #include <asm/assembler.h>
-#include <mach/board-ams-delta.h>
 
 #include "ams-delta-fiq.h"
+#include "board-ams-delta.h"
 #include "iomap.h"
 #include "soc.h"
 
index b0dc7ddf5877d70eeda21df28b331acdf99a4cdb..14c3d3f5255ecbc79f901fae3a58e4866ed89274 100644 (file)
 #include <linux/platform_data/ams-delta-fiq.h>
 #include <linux/platform_device.h>
 
-#include <mach/board-ams-delta.h>
-
 #include <asm/fiq.h>
 
 #include "ams-delta-fiq.h"
+#include "board-ams-delta.h"
 
 static struct fiq_handler fh = {
        .name   = "ams-delta-fiq"
index 55bf73710a59d013551b8194ad7117ead3dae484..d624bade266e2974ffec6a3a4034c4c7c59e2cc9 100644 (file)
@@ -36,7 +36,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/board-ams-delta.h>
 #include <linux/platform_data/keypad-omap.h>
 #include <mach/mux.h>
 
@@ -45,6 +44,7 @@
 #include <mach/usb.h>
 
 #include "ams-delta-fiq.h"
+#include "board-ams-delta.h"
 #include "iomap.h"
 #include "common.h"
 
@@ -167,7 +167,6 @@ static struct omap_usb_config ams_delta_usb_config __initdata = {
        .pins[0]        = 2,
 };
 
-#define LATCH1_GPIO_BASE       232
 #define LATCH1_NGPIO           8
 
 static struct resource latch1_resources[] = {
@@ -183,7 +182,6 @@ static struct resource latch1_resources[] = {
 
 static struct bgpio_pdata latch1_pdata = {
        .label  = LATCH1_LABEL,
-       .base   = LATCH1_GPIO_BASE,
        .ngpio  = LATCH1_NGPIO,
 };
 
@@ -206,11 +204,13 @@ static struct platform_device latch1_gpio_device = {
 #define LATCH1_PIN_DOCKIT1             6
 #define LATCH1_PIN_DOCKIT2             7
 
+#define LATCH2_NGPIO                   16
+
 static struct resource latch2_resources[] = {
        [0] = {
                .name   = "dat",
                .start  = LATCH2_PHYS,
-               .end    = LATCH2_PHYS + (AMS_DELTA_LATCH2_NGPIO - 1) / 8,
+               .end    = LATCH2_PHYS + (LATCH2_NGPIO - 1) / 8,
                .flags  = IORESOURCE_MEM,
        },
 };
@@ -219,8 +219,7 @@ static struct resource latch2_resources[] = {
 
 static struct bgpio_pdata latch2_pdata = {
        .label  = LATCH2_LABEL,
-       .base   = AMS_DELTA_LATCH2_GPIO_BASE,
-       .ngpio  = AMS_DELTA_LATCH2_NGPIO,
+       .ngpio  = LATCH2_NGPIO,
 };
 
 static struct platform_device latch2_gpio_device = {
@@ -371,15 +370,9 @@ static struct gpiod_lookup_table ams_delta_lcd_gpio_table = {
        },
 };
 
-/*
- * Dynamically allocated GPIO numbers must be obtained fromm GPIO device
- * before they can be put in the gpio_led table.  Before that happens,
- * initialize the table with invalid GPIO numbers, not 0.
- */
 static struct gpio_led gpio_leds[] __initdata = {
        [LATCH1_PIN_LED_CAMERA] = {
                .name            = "camera",
-               .gpio            = -EINVAL,
                .default_state   = LEDS_GPIO_DEFSTATE_OFF,
 #ifdef CONFIG_LEDS_TRIGGERS
                .default_trigger = "ams_delta_camera",
@@ -387,27 +380,22 @@ static struct gpio_led gpio_leds[] __initdata = {
        },
        [LATCH1_PIN_LED_ADVERT] = {
                .name            = "advert",
-               .gpio            = -EINVAL,
                .default_state   = LEDS_GPIO_DEFSTATE_OFF,
        },
        [LATCH1_PIN_LED_MAIL] = {
                .name            = "email",
-               .gpio            = -EINVAL,
                .default_state   = LEDS_GPIO_DEFSTATE_OFF,
        },
        [LATCH1_PIN_LED_HANDSFREE] = {
                .name            = "handsfree",
-               .gpio            = -EINVAL,
                .default_state   = LEDS_GPIO_DEFSTATE_OFF,
        },
        [LATCH1_PIN_LED_VOICEMAIL] = {
                .name            = "voicemail",
-               .gpio            = -EINVAL,
                .default_state   = LEDS_GPIO_DEFSTATE_OFF,
        },
        [LATCH1_PIN_LED_VOICE] = {
                .name            = "voice",
-               .gpio            = -EINVAL,
                .default_state   = LEDS_GPIO_DEFSTATE_OFF,
        },
 };
@@ -417,6 +405,24 @@ static const struct gpio_led_platform_data leds_pdata __initconst = {
        .num_leds       = ARRAY_SIZE(gpio_leds),
 };
 
+static struct gpiod_lookup_table leds_gpio_table = {
+       .table = {
+               GPIO_LOOKUP_IDX(LATCH1_LABEL, LATCH1_PIN_LED_CAMERA, NULL,
+                               LATCH1_PIN_LED_CAMERA, 0),
+               GPIO_LOOKUP_IDX(LATCH1_LABEL, LATCH1_PIN_LED_ADVERT, NULL,
+                               LATCH1_PIN_LED_ADVERT, 0),
+               GPIO_LOOKUP_IDX(LATCH1_LABEL, LATCH1_PIN_LED_MAIL, NULL,
+                               LATCH1_PIN_LED_MAIL, 0),
+               GPIO_LOOKUP_IDX(LATCH1_LABEL, LATCH1_PIN_LED_HANDSFREE, NULL,
+                               LATCH1_PIN_LED_HANDSFREE, 0),
+               GPIO_LOOKUP_IDX(LATCH1_LABEL, LATCH1_PIN_LED_VOICEMAIL, NULL,
+                               LATCH1_PIN_LED_VOICEMAIL, 0),
+               GPIO_LOOKUP_IDX(LATCH1_LABEL, LATCH1_PIN_LED_VOICE, NULL,
+                               LATCH1_PIN_LED_VOICE, 0),
+               { },
+       },
+};
+
 static struct i2c_board_info ams_delta_camera_board_info[] = {
        {
                I2C_BOARD_INFO("ov6650", 0x60),
@@ -679,6 +685,8 @@ static void __init ams_delta_latch2_init(void)
 
 static void __init ams_delta_init(void)
 {
+       struct platform_device *leds_pdev;
+
        /* mux pins for uarts */
        omap_cfg_reg(UART1_TX);
        omap_cfg_reg(UART1_RTS);
@@ -742,6 +750,12 @@ static void __init ams_delta_init(void)
        gpiod_add_lookup_tables(ams_delta_gpio_tables,
                                ARRAY_SIZE(ams_delta_gpio_tables));
 
+       leds_pdev = gpio_led_register_device(PLATFORM_DEVID_NONE, &leds_pdata);
+       if (!IS_ERR(leds_pdev)) {
+               leds_gpio_table.dev_id = dev_name(&leds_pdev->dev);
+               gpiod_add_lookup_table(&leds_gpio_table);
+       }
+
        omap_writew(omap_readw(ARM_RSTCT1) | 0x0004, ARM_RSTCT1);
 
        omapfb_set_lcd_config(&ams_delta_lcd_config);
@@ -798,64 +812,6 @@ static struct platform_device ams_delta_modem_device = {
        },
 };
 
-/*
- * leds-gpio driver doesn't make use of GPIO lookup tables,
- * it has to be provided with GPIO numbers over platform data
- * if GPIO descriptor info can't be obtained from device tree.
- * We could either define GPIO lookup tables and use them on behalf
- * of the leds-gpio device, or we can use GPIO driver level methods
- * for identification of GPIO numbers as long as we don't support
- * device tree.  Let's do the latter.
- */
-static void __init ams_delta_led_init(struct gpio_chip *chip)
-{
-       struct gpio_desc *gpiod;
-       int i;
-
-       for (i = LATCH1_PIN_LED_CAMERA; i < LATCH1_PIN_DOCKIT1; i++) {
-               gpiod = gpiochip_request_own_desc(chip, i, NULL);
-               if (IS_ERR(gpiod)) {
-                       pr_warn("%s: %s GPIO %d request failed (%ld)\n",
-                               __func__, LATCH1_LABEL, i, PTR_ERR(gpiod));
-                       continue;
-               }
-
-               /* Assign GPIO numbers to LED device. */
-               gpio_leds[i].gpio = desc_to_gpio(gpiod);
-
-               gpiochip_free_own_desc(gpiod);
-       }
-
-       gpio_led_register_device(PLATFORM_DEVID_NONE, &leds_pdata);
-}
-
-/*
- * The purpose of this function is to take care of assignment of GPIO numbers
- * to platform devices which depend on GPIO lines provided by Amstrad Delta
- * latch1 and/or latch2 GPIO devices but don't use GPIO lookup tables.
- * The function may be called as soon as latch1/latch2 GPIO devices are
- * initilized.  Since basic-mmio-gpio driver is not registered before
- * device_initcall, this may happen at erliest during device_initcall_sync.
- * Dependent devices shouldn't be registered before that, their
- * registration may be performed from within this function or later.
- */
-static int __init ams_delta_gpio_init(void)
-{
-       struct gpio_chip *chip;
-
-       if (!machine_is_ams_delta())
-               return -ENODEV;
-
-       chip = gpiochip_find(LATCH1_LABEL, gpiochip_match_by_label);
-       if (!chip)
-               pr_err("%s: latch1 GPIO chip not found\n", __func__);
-       else
-               ams_delta_led_init(chip);
-
-       return 0;
-}
-device_initcall_sync(ams_delta_gpio_init);
-
 static int __init modem_nreset_init(void)
 {
        int err;
similarity index 66%
rename from arch/arm/mach-omap1/include/mach/board-ams-delta.h
rename to arch/arm/mach-omap1/board-ams-delta.h
index 3b2d8019238a01b92c779f71fc6591d4b2a559eb..b5c4a373b90528be13e183bfeeef74440ae046ac 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * arch/arm/plat-omap/include/mach/board-ams-delta.h
+ * arch/arm/mach-omap1/board-ams-delta.h
  *
  * Copyright (C) 2006 Jonathan McDowell <noodles@earth.li>
  *
 
 #if defined (CONFIG_MACH_AMS_DELTA)
 
-#define AMD_DELTA_LATCH2_SCARD_RSTIN   0x0400
-#define AMD_DELTA_LATCH2_SCARD_CMDVCC  0x0800
-#define AMS_DELTA_LATCH2_MODEM_CODEC   0x2000
-
 #define AMS_DELTA_GPIO_PIN_KEYBRD_DATA 0
 #define AMS_DELTA_GPIO_PIN_KEYBRD_CLK  1
 #define AMS_DELTA_GPIO_PIN_MODEM_IRQ   2
 #define AMS_DELTA_GPIO_PIN_CONFIG      11
 #define AMS_DELTA_GPIO_PIN_NAND_RB     12
 
-#define AMS_DELTA_GPIO_PIN_LCD_VBLEN           240
-#define AMS_DELTA_GPIO_PIN_LCD_NDISP           241
-#define AMS_DELTA_GPIO_PIN_NAND_NCE            242
-#define AMS_DELTA_GPIO_PIN_NAND_NRE            243
-#define AMS_DELTA_GPIO_PIN_NAND_NWP            244
-#define AMS_DELTA_GPIO_PIN_NAND_NWE            245
-#define AMS_DELTA_GPIO_PIN_NAND_ALE            246
-#define AMS_DELTA_GPIO_PIN_NAND_CLE            247
-#define AMS_DELTA_GPIO_PIN_KEYBRD_PWR          248
-#define AMS_DELTA_GPIO_PIN_KEYBRD_DATAOUT      249
-#define AMS_DELTA_GPIO_PIN_SCARD_RSTIN         250
-#define AMS_DELTA_GPIO_PIN_SCARD_CMDVCC                251
-#define AMS_DELTA_GPIO_PIN_MODEM_NRESET                252
-#define AMS_DELTA_GPIO_PIN_MODEM_CODEC         253
-
-#define AMS_DELTA_LATCH2_GPIO_BASE     AMS_DELTA_GPIO_PIN_LCD_VBLEN
-#define AMS_DELTA_LATCH2_NGPIO         16
-
 #endif /* CONFIG_MACH_AMS_DELTA */
 
 #endif /* __ASM_ARCH_OMAP_AMS_DELTA_H */
index 2dc5deb1980308c45a5b4aebcdea97004fc0b713..d4d8a32e57ebc0aa66c6e15805a6322a81e30116 100644 (file)
@@ -43,6 +43,7 @@
 #include <mach/hardware.h>
 #include <mach/usb.h>
 
+#include "mmc.h"
 #include "common.h"
 
 #define PALMTE_USBDETECT_GPIO  0
@@ -208,6 +209,33 @@ static void __init palmte_misc_gpio_setup(void)
        gpio_direction_input(PALMTE_USB_OR_DC_GPIO);
 }
 
+#if IS_ENABLED(CONFIG_MMC_OMAP)
+
+static struct omap_mmc_platform_data _palmte_mmc_config = {
+       .nr_slots                       = 1,
+       .slots[0]                       = {
+               .ocr_mask               = MMC_VDD_32_33|MMC_VDD_33_34,
+               .name                   = "mmcblk",
+       },
+};
+
+static struct omap_mmc_platform_data *palmte_mmc_config[OMAP15XX_NR_MMC] = {
+       [0] = &_palmte_mmc_config,
+};
+
+static void palmte_mmc_init(void)
+{
+       omap1_init_mmc(palmte_mmc_config, OMAP15XX_NR_MMC);
+}
+
+#else /* CONFIG_MMC_OMAP */
+
+static void palmte_mmc_init(void)
+{
+}
+
+#endif /* CONFIG_MMC_OMAP */
+
 static void __init omap_palmte_init(void)
 {
        /* mux pins for uarts */
@@ -228,6 +256,7 @@ static void __init omap_palmte_init(void)
        omap_register_i2c_bus(1, 100, NULL, 0);
 
        omapfb_set_lcd_config(&palmte_lcd_config);
+       palmte_mmc_init();
 }
 
 MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
index fa512413a47172212483ebec6811bc5547aa729b..c8c6fe88b2d6415c640426be74b8d63294589c32 100644 (file)
@@ -968,7 +968,7 @@ late_initcall(omap_clk_enable_autoidle_all);
 
 static struct dentry *clk_debugfs_root;
 
-static int clk_dbg_show_summary(struct seq_file *s, void *unused)
+static int debug_clock_show(struct seq_file *s, void *unused)
 {
        struct clk *c;
        struct clk *pa;
@@ -988,17 +988,7 @@ static int clk_dbg_show_summary(struct seq_file *s, void *unused)
        return 0;
 }
 
-static int clk_dbg_open(struct inode *inode, struct file *file)
-{
-       return single_open(file, clk_dbg_show_summary, inode->i_private);
-}
-
-static const struct file_operations debug_clock_fops = {
-       .open           = clk_dbg_open,
-       .read           = seq_read,
-       .llseek         = seq_lseek,
-       .release        = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(debug_clock);
 
 static int clk_debugfs_register_one(struct clk *c)
 {
index baaf902b7016539e0eb07da47750b95119a2fdf8..e1243b5d554fa6b5fa8170483ebdab5531a6ca63 100644 (file)
@@ -244,6 +244,9 @@ struct platform_device omap_spi2 = {
 
 static void omap_init_spi100k(void)
 {
+       if (!cpu_is_omap7xx())
+               return;
+
        omap_spi1.dev.platform_data = ioremap(OMAP7XX_SPI1_BASE, 0x7ff);
        if (omap_spi1.dev.platform_data)
                platform_device_register(&omap_spi1);
index 52de382fc8047148f272dd57d7dd01354ec33801..7e49dfda3d2f4491645abfbd9af4830c132d7dca 100644 (file)
@@ -200,10 +200,10 @@ void __init omap_check_revision(void)
                printk(KERN_INFO "Unknown OMAP cpu type: 0x%02x\n", cpu_type);
        }
 
-       printk(KERN_INFO "OMAP%04x", omap_revision >> 16);
+       pr_info("OMAP%04x", omap_revision >> 16);
        if ((omap_revision >> 8) & 0xff)
-               printk(KERN_INFO "%x", (omap_revision >> 8) & 0xff);
-       printk(KERN_INFO " revision %i handled as %02xxx id: %08x%08x\n",
+               pr_cont("%x", (omap_revision >> 8) & 0xff);
+       pr_cont(" revision %i handled as %02xxx id: %08x%08x\n",
               die_rev, omap_revision & 0xff, system_serial_low,
               system_serial_high);
 }
index 77867778d4ec700844fefe14146303a9f35f17fb..5429d86c7190d805ea003729837997751a772eaa 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <linux/platform_data/usb-omap1.h>
 
-#if IS_ENABLED(CONFIG_USB)
+#if IS_ENABLED(CONFIG_USB_SUPPORT)
 void omap1_usb_init(struct omap_usb_config *pdata);
 #else
 static inline void omap1_usb_init(struct omap_usb_config *pdata)
index 3e1de14805e48af6e9aa92e1c2e9b57014570b7b..998075d3ef8666e55e3915ef140f82969b2dbff4 100644 (file)
@@ -532,18 +532,7 @@ static int omap_pm_debug_show(struct seq_file *m, void *v)
        return 0;
 }
 
-static int omap_pm_debug_open(struct inode *inode, struct file *file)
-{
-       return single_open(file, omap_pm_debug_show,
-                               &inode->i_private);
-}
-
-static const struct file_operations omap_pm_debug_fops = {
-       .open           = omap_pm_debug_open,
-       .read           = seq_read,
-       .llseek         = seq_lseek,
-       .release        = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(omap_pm_debug);
 
 static void omap_pm_init_debugfs(void)
 {
index 68ba5f472f6badd30ccc1408361ce5ff20c54a3a..859c71c4e93244c050979916f83eca19f754a2a1 100644 (file)
@@ -199,8 +199,8 @@ void __init omap2xxx_check_revision(void)
 
        pr_info("%s", soc_name);
        if ((omap_rev() >> 8) & 0x0f)
-               pr_info("%s", soc_rev);
-       pr_info("\n");
+               pr_cont("%s", soc_rev);
+       pr_cont("\n");
 }
 
 #define OMAP3_SHOW_FEATURE(feat)               \
index 083dcd9942ce5c8643f0f56a8731f722fa514f63..921c9aaee63f590bc352ad14f16e3c3206fb6832 100644 (file)
@@ -2413,7 +2413,7 @@ static int __init _init(struct omap_hwmod *oh, void *data)
  * a stub; implementing this properly requires iclk autoidle usecounting in
  * the clock code.   No return value.
  */
-static void __init _setup_iclk_autoidle(struct omap_hwmod *oh)
+static void _setup_iclk_autoidle(struct omap_hwmod *oh)
 {
        struct omap_hwmod_ocp_if *os;
 
@@ -2444,7 +2444,7 @@ static void __init _setup_iclk_autoidle(struct omap_hwmod *oh)
  * reset.  Returns 0 upon success or a negative error code upon
  * failure.
  */
-static int __init _setup_reset(struct omap_hwmod *oh)
+static int _setup_reset(struct omap_hwmod *oh)
 {
        int r;
 
@@ -2505,7 +2505,7 @@ static int __init _setup_reset(struct omap_hwmod *oh)
  *
  * No return value.
  */
-static void __init _setup_postsetup(struct omap_hwmod *oh)
+static void _setup_postsetup(struct omap_hwmod *oh)
 {
        u8 postsetup_state;
 
index f4971e4a86b26893578badccb6c0828a4c8821ab..724cf5774a6cb403bdd06fa63f5d5acf388a4d89 100644 (file)
@@ -28,7 +28,7 @@ static struct clockdomain *gfx_l4ls_clkdm;
 static void __iomem *scu_base;
 static struct omap_hwmod *rtc_oh;
 
-static int __init am43xx_map_scu(void)
+static int am43xx_map_scu(void)
 {
        scu_base = ioremap(scu_a9_get_base(), SZ_256);
 
index 98ed5ac073bc1fcaac2a4394b6f01a677d461118..07bea84c5d6e4f2a42c3ca5667b47b967b32867f 100644 (file)
@@ -44,7 +44,6 @@
 #include <linux/sched_clock.h>
 
 #include <asm/mach/time.h>
-#include <asm/smp_twd.h>
 
 #include "omap_hwmod.h"
 #include "omap_device.h"
index c5c0ab8ac9f91991a0cf6791ebb065cd7e055395..024c1fbcc55aee5816526b5574528e6c9532a3aa 100644 (file)
@@ -558,7 +558,7 @@ static struct pxa3xx_u2d_platform_data cm_x300_u2d_platform_data = {
        .exit           = cm_x300_u2d_exit,
 };
 
-static void cm_x300_init_u2d(void)
+static void __init cm_x300_init_u2d(void)
 {
        pxa3xx_set_u2d_info(&cm_x300_u2d_platform_data);
 }
index 9e132b3e48c68ef767ef7055b8d37cddc9d6453c..9960ea158829b88b2bf572b4979f27bc0f53f5ac 100644 (file)
@@ -184,7 +184,7 @@ static struct pxafb_mach_info littleton_lcd_info = {
        .lcd_conn               = LCD_COLOR_TFT_16BPP,
 };
 
-static void littleton_init_lcd(void)
+static void __init littleton_init_lcd(void)
 {
        pxa_set_fb_info(NULL, &littleton_lcd_info);
 }
index d53ea12fc76662cad69d5184472f9cfad3e5bf07..54a32f0433a2e8531bfc5d3a16099db3a7cf7041 100644 (file)
@@ -576,7 +576,7 @@ static struct pxaohci_platform_data zeus_ohci_platform_data = {
        .flags          = ENABLE_PORT_ALL | POWER_SENSE_LOW,
 };
 
-static void zeus_register_ohci(void)
+static void __init zeus_register_ohci(void)
 {
        /* Port 2 is shared between host and client interface. */
        UP2OCR = UP2OCR_HXOE | UP2OCR_HXS | UP2OCR_DMPDE | UP2OCR_DPPDE;
index 0a188134deaed9c5f420f24b2d34223216ef906e..cb36058bc35ed0a9dee5fa3354c7ff46e6e65279 100644 (file)
@@ -10,7 +10,6 @@
 #define __ARCH_ARM_MACH_S5PV210_COMMON_H
 
 #ifdef CONFIG_PM_SLEEP
-u32 exynos_get_eint_wake_mask(void);
 void s5pv210_cpu_resume(void);
 void s5pv210_pm_init(void);
 #else
index f491249ab65857660b444d004cb2664623e16770..b336df0c57f393ef72045e2dcfc5fb82ddffbe09 100644 (file)
@@ -32,6 +32,11 @@ static struct sleep_save s5pv210_core_save[] = {
  */
 static u32 s5pv210_irqwake_intmask = 0xffffffff;
 
+static u32 s5pv210_read_eint_wakeup_mask(void)
+{
+       return __raw_readl(S5P_EINT_WAKEUP_MASK);
+}
+
 /*
  * Suspend helpers.
  */
@@ -59,8 +64,10 @@ static void s5pv210_pm_prepare(void)
 {
        unsigned int tmp;
 
-       /* Set wake-up mask registers */
-       __raw_writel(exynos_get_eint_wake_mask(), S5P_EINT_WAKEUP_MASK);
+       /*
+        * Set wake-up mask registers
+        * S5P_EINT_WAKEUP_MASK is set by pinctrl driver in late suspend.
+        */
        __raw_writel(s5pv210_irqwake_intmask, S5P_WAKEUP_MASK);
 
        /* ensure at least INFORM0 has the resume address */
@@ -89,6 +96,7 @@ static void s5pv210_pm_prepare(void)
  */
 static int s5pv210_suspend_enter(suspend_state_t state)
 {
+       u32 eint_wakeup_mask = s5pv210_read_eint_wakeup_mask();
        int ret;
 
        s3c_pm_debug_init();
@@ -96,10 +104,10 @@ static int s5pv210_suspend_enter(suspend_state_t state)
        S3C_PMDBG("%s: suspending the system...\n", __func__);
 
        S3C_PMDBG("%s: wakeup masks: %08x,%08x\n", __func__,
-                       s5pv210_irqwake_intmask, exynos_get_eint_wake_mask());
+                       s5pv210_irqwake_intmask, eint_wakeup_mask);
 
        if (s5pv210_irqwake_intmask == -1U
-           && exynos_get_eint_wake_mask() == -1U) {
+           && eint_wakeup_mask == -1U) {
                pr_err("%s: No wake-up sources!\n", __func__);
                pr_err("%s: Aborting sleep\n", __func__);
                return -EINVAL;
index b100c26a858f9015b5b001c7a6c52acd227d94aa..3683d6f109730ee796687d0b66c063cba8253108 100644 (file)
 # SPDX-License-Identifier: GPL-2.0
-config PM_RMOBILE
-       bool
-       select PM
-       select PM_GENERIC_DOMAINS
-
-config ARCH_RCAR_GEN1
-       bool
-       select PM
-       select PM_GENERIC_DOMAINS
-       select RENESAS_INTC_IRQPIN
-       select SYS_SUPPORTS_SH_TMU
-
-config ARCH_RCAR_GEN2
-       bool
-       select HAVE_ARM_ARCH_TIMER
-       select PM
-       select PM_GENERIC_DOMAINS
-       select RENESAS_IRQC
-       select SYS_SUPPORTS_SH_CMT
-
-config ARCH_RMOBILE
-       bool
-       select PM_RMOBILE
-       select SYS_SUPPORTS_SH_CMT
-       select SYS_SUPPORTS_SH_TMU
-
 menuconfig ARCH_RENESAS
        bool "Renesas ARM SoCs"
        depends on ARCH_MULTI_V7 && MMU
        select ARM_GIC
        select GPIOLIB
-       select HAVE_ARM_SCU if SMP
-       select HAVE_ARM_TWD if SMP
        select NO_IOPORT_MAP
        select PINCTRL
        select SOC_BUS
        select ZONE_DMA if ARM_LPAE
-
-if ARCH_RENESAS
-
-#comment "Renesas ARM SoCs System Type"
-
-config ARCH_EMEV2
-       bool "Emma Mobile EV2"
-       select SYS_SUPPORTS_EM_STI
-
-config ARCH_R7S72100
-       bool "RZ/A1H (R7S72100)"
-       select PM
-       select PM_GENERIC_DOMAINS
-       select SYS_SUPPORTS_SH_MTU2
-       select RENESAS_OSTM
-
-config ARCH_R7S9210
-       bool "RZ/A2 (R7S9210)"
-       select PM
-       select PM_GENERIC_DOMAINS
-       select RENESAS_OSTM
-
-config ARCH_R8A73A4
-       bool "R-Mobile APE6 (R8A73A40)"
-       select ARCH_RMOBILE
-       select ARM_ERRATA_798181 if SMP
-       select HAVE_ARM_ARCH_TIMER
-       select RENESAS_IRQC
-
-config ARCH_R8A7740
-       bool "R-Mobile A1 (R8A77400)"
-       select ARCH_RMOBILE
-       select RENESAS_INTC_IRQPIN
-
-config ARCH_R8A7743
-       bool "RZ/G1M (R8A77430)"
-       select ARCH_RCAR_GEN2
-       select ARM_ERRATA_798181 if SMP
-
-config ARCH_R8A7744
-       bool "RZ/G1N (R8A77440)"
-       select ARCH_RCAR_GEN2
-       select ARM_ERRATA_798181 if SMP
-
-config ARCH_R8A7745
-       bool "RZ/G1E (R8A77450)"
-       select ARCH_RCAR_GEN2
-
-config ARCH_R8A77470
-       bool "RZ/G1C (R8A77470)"
-       select ARCH_RCAR_GEN2
-
-config ARCH_R8A7778
-       bool "R-Car M1A (R8A77781)"
-       select ARCH_RCAR_GEN1
-
-config ARCH_R8A7779
-       bool "R-Car H1 (R8A77790)"
-       select ARCH_RCAR_GEN1
-
-config ARCH_R8A7790
-       bool "R-Car H2 (R8A77900)"
-       select ARCH_RCAR_GEN2
-       select ARM_ERRATA_798181 if SMP
-       select I2C
-
-config ARCH_R8A7791
-       bool "R-Car M2-W (R8A77910)"
-       select ARCH_RCAR_GEN2
-       select ARM_ERRATA_798181 if SMP
-       select I2C
-
-config ARCH_R8A7792
-       bool "R-Car V2H (R8A77920)"
-       select ARCH_RCAR_GEN2
-       select ARM_ERRATA_798181 if SMP
-
-config ARCH_R8A7793
-       bool "R-Car M2-N (R8A7793)"
-       select ARCH_RCAR_GEN2
-       select ARM_ERRATA_798181 if SMP
-       select I2C
-
-config ARCH_R8A7794
-       bool "R-Car E2 (R8A77940)"
-       select ARCH_RCAR_GEN2
-
-config ARCH_R9A06G032
-       bool "RZ/N1D (R9A06G032)"
-       select ARCH_RZN1
-
-config ARCH_RZN1
-       bool "RZ/N1 (R9A06G0xx) Family"
-       select ARM_AMBA
-       select CPU_V7
-
-config ARCH_SH73A0
-       bool "SH-Mobile AG5 (R8A73A00)"
-       select ARCH_RMOBILE
-       select RENESAS_INTC_IRQPIN
-endif
index 5591646cb9bbfd33def30a3f91529acb99c7ed1b..f7bf17b7abaef7a9e0624107146ee05cfd1125a0 100644 (file)
@@ -35,7 +35,6 @@ smp-$(CONFIG_ARCH_EMEV2)      += smp-emev2.o headsmp-scu.o platsmp-scu.o
 
 # PM objects
 obj-$(CONFIG_SUSPEND)          += suspend.o
-obj-$(CONFIG_PM_RMOBILE)       += pm-rmobile.o
 obj-$(CONFIG_ARCH_RCAR_GEN2)   += pm-rcar-gen2.o
 
 # Framework support
diff --git a/arch/arm/mach-shmobile/pm-rmobile.h b/arch/arm/mach-shmobile/pm-rmobile.h
deleted file mode 100644 (file)
index 69f8392..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0
- *
- * Copyright (C) 2012 Renesas Solutions Corp.
- *
- * Kuninori Morimoto <morimoto.kuninori@renesas.com>
- */
-#ifndef PM_RMOBILE_H
-#define PM_RMOBILE_H
-
-#include <linux/pm_domain.h>
-
-struct rmobile_pm_domain {
-       struct generic_pm_domain genpd;
-       struct dev_power_governor *gov;
-       int (*suspend)(void);
-       void (*resume)(void);
-       void __iomem *base;
-       unsigned int bit_shift;
-       bool no_debug;
-};
-
-#endif /* PM_RMOBILE_H */
index 9bc543faba96af6e272c137c99b5464da12bf975..0403aa8629ddc10adf2727668a37f7d1c72ca6c0 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/delay.h>
 
 #include <asm/smp_plat.h>
-#include <asm/smp_twd.h>
 
 #include "common.h"
 #include "sh73a0.h"
index 4adb901dd5ebdd99f2a2b747c1bc237e123a87de..a04660918d71203668b8cba14822833cc9c7ba8f 100644 (file)
@@ -11,6 +11,13 @@ menuconfig ARCH_SOCFPGA
        select HAVE_ARM_TWD if SMP
        select MFD_SYSCON
        select PCI_DOMAINS if PCI
+       select ARM_ERRATA_754322
+       select ARM_ERRATA_764369 if SMP
+       select ARM_ERRATA_775420
+       select PL310_ERRATA_588369
+       select PL310_ERRATA_727915
+       select PL310_ERRATA_753970 if PL310
+       select PL310_ERRATA_769419
 
 if ARCH_SOCFPGA
 config SOCFPGA_SUSPEND
index 65e1817d8afe6667b004ce81199c6da971d27c99..92cae0a9213f17214c29d319e11d120a33d0467a 100644 (file)
@@ -34,8 +34,6 @@
 
 #define RSTMGR_MPUMODRST_CPU1          0x2     /* CPU1 Reset */
 
-extern void socfpga_init_clocks(void);
-extern void socfpga_sysmgr_init(void);
 void socfpga_init_l2_ecc(void);
 void socfpga_init_ocram_ecc(void);
 void socfpga_init_arria10_l2_ecc(void);
index dde14f7bf2c32610b5d3808d38beb53ba9e1b2fa..5fb6f79059a882f6629a4dc7287f71026334ebfe 100644 (file)
@@ -32,7 +32,7 @@ void __iomem *rst_manager_base_addr;
 void __iomem *sdr_ctl_base_addr;
 unsigned long socfpga_cpu1start_addr;
 
-void __init socfpga_sysmgr_init(void)
+static void __init socfpga_sysmgr_init(void)
 {
        struct device_node *np;
 
index d9c8ecf88ec6635a1d3add0a6ac9c9cf77ff2e7f..7fa6a3d7efd4eb43a95932d7cae3ce7382e57325 100644 (file)
@@ -1,6 +1,6 @@
 menuconfig ARCH_SUNXI
        bool "Allwinner SoCs"
-       depends on ARCH_MULTI_V7
+       depends on ARCH_MULTI_V5 || ARCH_MULTI_V7
        select ARCH_HAS_RESET_CONTROLLER
        select CLKSRC_MMIO
        select GENERIC_IRQ_CHIP
@@ -9,9 +9,13 @@ menuconfig ARCH_SUNXI
        select PM_OPP
        select SUN4I_TIMER
        select RESET_CONTROLLER
+       help
+         Support for Allwinner ARM-based family of processors
 
 if ARCH_SUNXI
 
+if ARCH_MULTI_V7
+
 config MACH_SUN4I
        bool "Allwinner A10 (sun4i) SoCs support"
        default ARCH_SUNXI
@@ -56,3 +60,16 @@ config ARCH_SUNXI_MC_SMP
        select ARM_CPU_SUSPEND
 
 endif
+
+if ARCH_MULTI_V5
+
+config MACH_SUNIV
+       bool "Allwinner ARMv5 F-series (suniv) SoCs support"
+       default ARCH_SUNXI
+       help
+         Support for Allwinner suniv ARMv5 SoCs.
+         (F1C100A, F1C100s, F1C200s, F1C500, F1C600)
+
+endif
+
+endif
index de4b0e932f22e27278b494ad1a4207e143f80f9e..8a7f301839c2d9e59156be125f79076d7e531645 100644 (file)
@@ -101,3 +101,12 @@ static const char * const sun9i_board_dt_compat[] = {
 DT_MACHINE_START(SUN9I_DT, "Allwinner sun9i Family")
        .dt_compat      = sun9i_board_dt_compat,
 MACHINE_END
+
+static const char * const suniv_board_dt_compat[] = {
+       "allwinner,suniv-f1c100s",
+       NULL,
+};
+
+DT_MACHINE_START(SUNIV_DT, "Allwinner suniv Family")
+       .dt_compat      = suniv_board_dt_compat,
+MACHINE_END
index a69b22d37eedef2c6fbab7e0cea90409800589eb..a186ab663b0bbd07c1080a9a094eab062e6715cc 100644 (file)
@@ -72,7 +72,7 @@ static const struct of_device_id tegra114_dt_gic_match[] __initconst = {
        { }
 };
 
-static void tegra114_gic_cpu_pm_registration(void)
+static void __init tegra114_gic_cpu_pm_registration(void)
 {
        struct device_node *dn;
 
@@ -85,7 +85,7 @@ static void tegra114_gic_cpu_pm_registration(void)
        cpu_pm_register_notifier(&tegra_gic_notifier_block);
 }
 #else
-static void tegra114_gic_cpu_pm_registration(void) { }
+static void __init tegra114_gic_cpu_pm_registration(void) { }
 #endif
 
 static const struct of_device_id tegra_ictlr_match[] __initconst = {
index 377ff9cda667a11135fef4f12d84d160a3b08aaa..53da57fba39c663ec5d60d586efea3bcb0c8ba6e 100644 (file)
@@ -239,6 +239,7 @@ comment "Power management"
 config SAMSUNG_PM_DEBUG
        bool "Samsung PM Suspend debug"
        depends on PM && DEBUG_KERNEL
+       depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
        depends on DEBUG_EXYNOS_UART || DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
        help
          Say Y here if you want verbose debugging from the PM Suspend and
index 51bc479334a43f5dbc7686a25d5e261c83e742dd..28f052185eb6e6b37865d5bb52bad6f6547620a3 100644 (file)
@@ -157,70 +157,12 @@ config ARCH_REALTEK
 
 config ARCH_RENESAS
        bool "Renesas SoC Platforms"
+       select GPIOLIB
        select PINCTRL
-       select PM
-       select PM_GENERIC_DOMAINS
-       select RENESAS_IRQC
        select SOC_BUS
-       select SYS_SUPPORTS_SH_CMT
-       select SYS_SUPPORTS_SH_TMU
        help
          This enables support for the ARMv8 based Renesas SoCs.
 
-config ARCH_R8A774A1
-       bool "Renesas RZ/G2M SoC Platform"
-       depends on ARCH_RENESAS
-       help
-         This enables support for the Renesas RZ/G2M SoC.
-
-config ARCH_R8A774C0
-       bool "Renesas RZ/G2E SoC Platform"
-       depends on ARCH_RENESAS
-       help
-         This enables support for the Renesas RZ/G2E SoC.
-
-config ARCH_R8A7795
-       bool "Renesas R-Car H3 SoC Platform"
-       depends on ARCH_RENESAS
-       help
-         This enables support for the Renesas R-Car H3 SoC.
-
-config ARCH_R8A7796
-       bool "Renesas R-Car M3-W SoC Platform"
-       depends on ARCH_RENESAS
-       help
-         This enables support for the Renesas R-Car M3-W SoC.
-
-config ARCH_R8A77965
-       bool "Renesas R-Car M3-N SoC Platform"
-       depends on ARCH_RENESAS
-       help
-         This enables support for the Renesas R-Car M3-N SoC.
-
-config ARCH_R8A77970
-       bool "Renesas R-Car V3M SoC Platform"
-       depends on ARCH_RENESAS
-       help
-         This enables support for the Renesas R-Car V3M SoC.
-
-config ARCH_R8A77980
-       bool "Renesas R-Car V3H SoC Platform"
-       depends on ARCH_RENESAS
-       help
-         This enables support for the Renesas R-Car V3H SoC.
-
-config ARCH_R8A77990
-       bool "Renesas R-Car E3 SoC Platform"
-       depends on ARCH_RENESAS
-       help
-         This enables support for the Renesas R-Car E3 SoC.
-
-config ARCH_R8A77995
-       bool "Renesas R-Car D3 SoC Platform"
-       depends on ARCH_RENESAS
-       help
-         This enables support for the Renesas R-Car D3 SoC.
-
 config ARCH_ROCKCHIP
        bool "Rockchip Platforms"
        select ARCH_HAS_RESET_CONTROLLER
index 407f02c80e8b721ce5ed15dd9fcbb59b527d436a..4d8012e1205c5a7fb068b5c80804e7b6f386f505 100644 (file)
@@ -3,30 +3,226 @@ config SOC_RENESAS
        bool "Renesas SoC driver support" if COMPILE_TEST && !ARCH_RENESAS
        default y if ARCH_RENESAS
        select SOC_BUS
-       select RST_RCAR if ARCH_RCAR_GEN1 || ARCH_RCAR_GEN2 || \
-                          ARCH_R8A774A1 || ARCH_R8A774C0 || ARCH_R8A7795 || \
-                          ARCH_R8A7796 || ARCH_R8A77965 || ARCH_R8A77970 || \
-                          ARCH_R8A77980 || ARCH_R8A77990 || ARCH_R8A77995
-       select SYSC_R8A7743 if ARCH_R8A7743 || ARCH_R8A7744
-       select SYSC_R8A7745 if ARCH_R8A7745
-       select SYSC_R8A77470 if ARCH_R8A77470
-       select SYSC_R8A774A1 if ARCH_R8A774A1
-       select SYSC_R8A774C0 if ARCH_R8A774C0
-       select SYSC_R8A7779 if ARCH_R8A7779
-       select SYSC_R8A7790 if ARCH_R8A7790
-       select SYSC_R8A7791 if ARCH_R8A7791 || ARCH_R8A7793
-       select SYSC_R8A7792 if ARCH_R8A7792
-       select SYSC_R8A7794 if ARCH_R8A7794
-       select SYSC_R8A7795 if ARCH_R8A7795
-       select SYSC_R8A7796 if ARCH_R8A7796
-       select SYSC_R8A77965 if ARCH_R8A77965
-       select SYSC_R8A77970 if ARCH_R8A77970
-       select SYSC_R8A77980 if ARCH_R8A77980
-       select SYSC_R8A77990 if ARCH_R8A77990
-       select SYSC_R8A77995 if ARCH_R8A77995
 
 if SOC_RENESAS
 
+config ARCH_RCAR_GEN1
+       bool
+       select PM
+       select PM_GENERIC_DOMAINS
+       select RENESAS_INTC_IRQPIN
+       select RST_RCAR
+       select SYS_SUPPORTS_SH_TMU
+
+config ARCH_RCAR_GEN2
+       bool
+       select HAVE_ARM_ARCH_TIMER
+       select PM
+       select PM_GENERIC_DOMAINS
+       select RENESAS_IRQC
+       select RST_RCAR
+       select SYS_SUPPORTS_SH_CMT
+
+config ARCH_RCAR_GEN3
+       bool
+       select PM
+       select PM_GENERIC_DOMAINS
+       select RENESAS_IRQC
+       select RST_RCAR
+       select SYS_SUPPORTS_SH_CMT
+       select SYS_SUPPORTS_SH_TMU
+
+config ARCH_RMOBILE
+       bool
+       select PM
+       select PM_GENERIC_DOMAINS
+       select SYS_SUPPORTS_SH_CMT
+       select SYS_SUPPORTS_SH_TMU
+       select SYSC_RMOBILE
+
+config ARCH_RZN1
+       bool
+       select ARM_AMBA
+
+if ARM
+
+#comment "Renesas ARM SoCs System Type"
+
+config ARCH_EMEV2
+       bool "Emma Mobile EV2"
+       select HAVE_ARM_SCU if SMP
+       select SYS_SUPPORTS_EM_STI
+
+config ARCH_R7S72100
+       bool "RZ/A1H (R7S72100)"
+       select PM
+       select PM_GENERIC_DOMAINS
+       select SYS_SUPPORTS_SH_MTU2
+       select RENESAS_OSTM
+
+config ARCH_R7S9210
+       bool "RZ/A2 (R7S9210)"
+       select PM
+       select PM_GENERIC_DOMAINS
+       select RENESAS_OSTM
+
+config ARCH_R8A73A4
+       bool "R-Mobile APE6 (R8A73A40)"
+       select ARCH_RMOBILE
+       select ARM_ERRATA_798181 if SMP
+       select HAVE_ARM_ARCH_TIMER
+       select RENESAS_IRQC
+
+config ARCH_R8A7740
+       bool "R-Mobile A1 (R8A77400)"
+       select ARCH_RMOBILE
+       select RENESAS_INTC_IRQPIN
+
+config ARCH_R8A7743
+       bool "RZ/G1M (R8A77430)"
+       select ARCH_RCAR_GEN2
+       select ARM_ERRATA_798181 if SMP
+       select SYSC_R8A7743
+
+config ARCH_R8A7744
+       bool "RZ/G1N (R8A77440)"
+       select ARCH_RCAR_GEN2
+       select ARM_ERRATA_798181 if SMP
+       select SYSC_R8A7743
+
+config ARCH_R8A7745
+       bool "RZ/G1E (R8A77450)"
+       select ARCH_RCAR_GEN2
+       select SYSC_R8A7745
+
+config ARCH_R8A77470
+       bool "RZ/G1C (R8A77470)"
+       select ARCH_RCAR_GEN2
+       select SYSC_R8A77470
+
+config ARCH_R8A7778
+       bool "R-Car M1A (R8A77781)"
+       select ARCH_RCAR_GEN1
+
+config ARCH_R8A7779
+       bool "R-Car H1 (R8A77790)"
+       select ARCH_RCAR_GEN1
+       select HAVE_ARM_SCU if SMP
+       select HAVE_ARM_TWD if SMP
+       select SYSC_R8A7779
+
+config ARCH_R8A7790
+       bool "R-Car H2 (R8A77900)"
+       select ARCH_RCAR_GEN2
+       select ARM_ERRATA_798181 if SMP
+       select I2C
+       select SYSC_R8A7790
+
+config ARCH_R8A7791
+       bool "R-Car M2-W (R8A77910)"
+       select ARCH_RCAR_GEN2
+       select ARM_ERRATA_798181 if SMP
+       select I2C
+       select SYSC_R8A7791
+
+config ARCH_R8A7792
+       bool "R-Car V2H (R8A77920)"
+       select ARCH_RCAR_GEN2
+       select ARM_ERRATA_798181 if SMP
+       select SYSC_R8A7792
+
+config ARCH_R8A7793
+       bool "R-Car M2-N (R8A7793)"
+       select ARCH_RCAR_GEN2
+       select ARM_ERRATA_798181 if SMP
+       select I2C
+       select SYSC_R8A7791
+
+config ARCH_R8A7794
+       bool "R-Car E2 (R8A77940)"
+       select ARCH_RCAR_GEN2
+       select SYSC_R8A7794
+
+config ARCH_R9A06G032
+       bool "RZ/N1D (R9A06G032)"
+       select ARCH_RZN1
+
+config ARCH_SH73A0
+       bool "SH-Mobile AG5 (R8A73A00)"
+       select ARCH_RMOBILE
+       select HAVE_ARM_SCU if SMP
+       select HAVE_ARM_TWD if SMP
+       select RENESAS_INTC_IRQPIN
+
+endif # ARM
+
+if ARM64
+
+config ARCH_R8A774A1
+       bool "Renesas RZ/G2M SoC Platform"
+       select ARCH_RCAR_GEN3
+       select SYSC_R8A774A1
+       help
+         This enables support for the Renesas RZ/G2M SoC.
+
+config ARCH_R8A774C0
+       bool "Renesas RZ/G2E SoC Platform"
+       select ARCH_RCAR_GEN3
+       select SYSC_R8A774C0
+       help
+         This enables support for the Renesas RZ/G2E SoC.
+
+config ARCH_R8A7795
+       bool "Renesas R-Car H3 SoC Platform"
+       select ARCH_RCAR_GEN3
+       select SYSC_R8A7795
+       help
+         This enables support for the Renesas R-Car H3 SoC.
+
+config ARCH_R8A7796
+       bool "Renesas R-Car M3-W SoC Platform"
+       select ARCH_RCAR_GEN3
+       select SYSC_R8A7796
+       help
+         This enables support for the Renesas R-Car M3-W SoC.
+
+config ARCH_R8A77965
+       bool "Renesas R-Car M3-N SoC Platform"
+       select ARCH_RCAR_GEN3
+       select SYSC_R8A77965
+       help
+         This enables support for the Renesas R-Car M3-N SoC.
+
+config ARCH_R8A77970
+       bool "Renesas R-Car V3M SoC Platform"
+       select ARCH_RCAR_GEN3
+       select SYSC_R8A77970
+       help
+         This enables support for the Renesas R-Car V3M SoC.
+
+config ARCH_R8A77980
+       bool "Renesas R-Car V3H SoC Platform"
+       select ARCH_RCAR_GEN3
+       select SYSC_R8A77980
+       help
+         This enables support for the Renesas R-Car V3H SoC.
+
+config ARCH_R8A77990
+       bool "Renesas R-Car E3 SoC Platform"
+       select ARCH_RCAR_GEN3
+       select SYSC_R8A77990
+       help
+         This enables support for the Renesas R-Car E3 SoC.
+
+config ARCH_R8A77995
+       bool "Renesas R-Car D3 SoC Platform"
+       select ARCH_RCAR_GEN3
+       select SYSC_R8A77995
+       help
+         This enables support for the Renesas R-Car D3 SoC.
+
+endif # ARM64
+
 # SoC
 config SYSC_R8A7743
        bool "RZ/G1M System Controller support" if COMPILE_TEST
@@ -103,4 +299,7 @@ config RST_RCAR
 config SYSC_RCAR
        bool "R-Car System Controller support" if COMPILE_TEST
 
+config SYSC_RMOBILE
+       bool "R-Mobile System Controller support" if COMPILE_TEST
+
 endif # SOC_RENESAS
index 3bdd7dbc38a9c7a3a9407454ff00d81bc1ad90d4..00764d5a60b33dfe6d998d9304a58ea5b3ca664d 100644 (file)
@@ -27,3 +27,4 @@ endif
 # Family
 obj-$(CONFIG_RST_RCAR)         += rcar-rst.o
 obj-$(CONFIG_SYSC_RCAR)                += rcar-sysc.o
+obj-$(CONFIG_SYSC_RMOBILE)     += rmobile-sysc.o
similarity index 93%
rename from arch/arm/mach-shmobile/pm-rmobile.c
rename to drivers/soc/renesas/rmobile-sysc.c
index c6a11b5ec6dbc704d867cbcee5c1fce26ef69b57..421ae1c887d824d099235cbc2d0974b673d99736 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/pm.h>
 #include <linux/pm_clock.h>
+#include <linux/pm_domain.h>
 #include <linux/slab.h>
 
 #include <asm/io.h>
 
-#include "pm-rmobile.h"
-
 /* SYSC */
 #define SPDCR          0x08    /* SYS Power Down Control Register */
 #define SWUCR          0x14    /* SYS Wakeup Control Register */
 #define PSTR_RETRIES   100
 #define PSTR_DELAY_US  10
 
+struct rmobile_pm_domain {
+       struct generic_pm_domain genpd;
+       struct dev_power_governor *gov;
+       int (*suspend)(void);
+       void __iomem *base;
+       unsigned int bit_shift;
+};
+
 static inline
 struct rmobile_pm_domain *to_rmobile_pd(struct generic_pm_domain *d)
 {
@@ -65,16 +72,13 @@ static int rmobile_pd_power_down(struct generic_pm_domain *genpd)
                }
        }
 
-       if (!rmobile_pd->no_debug)
-               pr_debug("%s: Power off, 0x%08x -> PSTR = 0x%08x\n",
-                        genpd->name, mask,
-                        __raw_readl(rmobile_pd->base + PSTR));
+       pr_debug("%s: Power off, 0x%08x -> PSTR = 0x%08x\n", genpd->name, mask,
+                __raw_readl(rmobile_pd->base + PSTR));
 
        return 0;
 }
 
-static int __rmobile_pd_power_up(struct rmobile_pm_domain *rmobile_pd,
-                                bool do_resume)
+static int __rmobile_pd_power_up(struct rmobile_pm_domain *rmobile_pd)
 {
        unsigned int mask;
        unsigned int retry_count;
@@ -85,7 +89,7 @@ static int __rmobile_pd_power_up(struct rmobile_pm_domain *rmobile_pd,
 
        mask = BIT(rmobile_pd->bit_shift);
        if (__raw_readl(rmobile_pd->base + PSTR) & mask)
-               goto out;
+               return ret;
 
        __raw_writel(mask, rmobile_pd->base + SWUCR);
 
@@ -100,21 +104,16 @@ static int __rmobile_pd_power_up(struct rmobile_pm_domain *rmobile_pd,
        if (!retry_count)
                ret = -EIO;
 
-       if (!rmobile_pd->no_debug)
-               pr_debug("%s: Power on, 0x%08x -> PSTR = 0x%08x\n",
-                        rmobile_pd->genpd.name, mask,
-                        __raw_readl(rmobile_pd->base + PSTR));
-
-out:
-       if (ret == 0 && rmobile_pd->resume && do_resume)
-               rmobile_pd->resume();
+       pr_debug("%s: Power on, 0x%08x -> PSTR = 0x%08x\n",
+                rmobile_pd->genpd.name, mask,
+                __raw_readl(rmobile_pd->base + PSTR));
 
        return ret;
 }
 
 static int rmobile_pd_power_up(struct generic_pm_domain *genpd)
 {
-       return __rmobile_pd_power_up(to_rmobile_pd(genpd), true);
+       return __rmobile_pd_power_up(to_rmobile_pd(genpd));
 }
 
 static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd)
@@ -127,7 +126,7 @@ static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd)
        genpd->power_on                 = rmobile_pd_power_up;
        genpd->attach_dev               = cpg_mstp_attach_dev;
        genpd->detach_dev               = cpg_mstp_detach_dev;
-       __rmobile_pd_power_up(rmobile_pd, false);
+       __rmobile_pd_power_up(rmobile_pd);
        pm_genpd_init(genpd, gov ? : &simple_qos_governor, false);
 }