]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'next/multiplatform' into for-next
authorOlof Johansson <olof@lixom.net>
Tue, 6 Nov 2012 16:03:46 +0000 (08:03 -0800)
committerOlof Johansson <olof@lixom.net>
Tue, 6 Nov 2012 19:04:13 +0000 (11:04 -0800)
By Linus Walleij (10) and others
via Linus Walleij (1) and Olof Johansson (1)
* next/multiplatform:
  ARM: plat-nomadik: convert platforms to SPARSE_IRQ
  mfd/db8500-prcmu: use the irq_domain_add_simple()
  mfd/ab8500-core: use irq_domain_add_simple()
  ARM: plat-nomadik: move MTU, kill plat-nomadik
  ARM: plat-nomadik: move DMA40 header to <linux/platform_data>
  ARM: plat-nomadik: use DIV_ROUND_CLOSEST()
  ARM: plat-nomadik: pass IRQ to timer driver
  clk/ux500: explicitly include register header
  pinctrl/nomadik: merge old pincfg header
  pinctrl/nomadik: move the platform data header
  ARM: plat-nomadik: move NMK_GPIO_PER_CHIP into gpio-nomadik.h
  ARM: plat-nomadik: Introduce new DB8540 GPIO registers

Add/add conflicts in arch/arm/mach-ux500/cpu-db8500.c.

Signed-off-by: Olof Johansson <olof@lixom.net>
43 files changed:
arch/arm/Kconfig
arch/arm/Makefile
arch/arm/arm-soc-for-next-contents.txt
arch/arm/mach-nomadik/Kconfig
arch/arm/mach-nomadik/board-nhk8815.c
arch/arm/mach-nomadik/cpu-8815.c
arch/arm/mach-nomadik/i2c-8815nhk.c
arch/arm/mach-nomadik/include/mach/irqs.h
arch/arm/mach-ux500/Kconfig
arch/arm/mach-ux500/board-mop500-audio.c
arch/arm/mach-ux500/board-mop500-pins.c
arch/arm/mach-ux500/board-mop500-sdi.c
arch/arm/mach-ux500/board-mop500.c
arch/arm/mach-ux500/cpu-db8500.c
arch/arm/mach-ux500/devices-common.c
arch/arm/mach-ux500/devices-db8500.c
arch/arm/mach-ux500/devices-db8500.h
arch/arm/mach-ux500/include/mach/irqs.h
arch/arm/mach-ux500/include/mach/msp.h
arch/arm/mach-ux500/timer.c
arch/arm/mach-ux500/usb.c
arch/arm/plat-nomadik/Kconfig [deleted file]
arch/arm/plat-nomadik/Makefile [deleted file]
arch/arm/plat-nomadik/include/plat/gpio-nomadik.h [deleted file]
drivers/char/hw_random/Kconfig
drivers/clk/ux500/u8500_clk.c
drivers/clocksource/Kconfig
drivers/clocksource/Makefile
drivers/clocksource/nomadik-mtu.c [moved from arch/arm/plat-nomadik/timer.c with 95% similarity]
drivers/crypto/ux500/cryp/cryp_core.c
drivers/dma/ste_dma40.c
drivers/dma/ste_dma40_ll.c
drivers/input/keyboard/Kconfig
drivers/mfd/ab8500-core.c
drivers/mfd/db8500-prcmu.c
drivers/mtd/nand/Kconfig
drivers/pinctrl/pinctrl-nomadik.c
drivers/pinctrl/pinctrl-nomadik.h
include/linux/platform_data/clocksource-nomadik-mtu.h [moved from arch/arm/plat-nomadik/include/plat/mtu.h with 71% similarity]
include/linux/platform_data/crypto-ux500.h
include/linux/platform_data/dma-ste-dma40.h [moved from arch/arm/plat-nomadik/include/plat/ste_dma40.h with 100% similarity]
include/linux/platform_data/pinctrl-nomadik.h [moved from arch/arm/plat-nomadik/include/plat/pincfg.h with 66% similarity]
sound/soc/ux500/ux500_pcm.c

index 606138b19270c495a1d98f2ea9079e6629e86b1a..ac00c9b8c1e75144e7ba74e6bd0ec8128242bac1 100644 (file)
@@ -872,6 +872,7 @@ config ARCH_U8500
        select GENERIC_CLOCKEVENTS
        select HAVE_SMP
        select MIGHT_HAVE_CACHE_L2X0
+       select SPARSE_IRQ
        help
          Support for ST-Ericsson's Ux500 architecture
 
@@ -886,6 +887,7 @@ config ARCH_NOMADIK
        select MIGHT_HAVE_CACHE_L2X0
        select PINCTRL
        select PINCTRL_STN8815
+       select SPARSE_IRQ
        help
          Support for the Nomadik platform by ST-Ericsson
 
@@ -1053,7 +1055,6 @@ source "arch/arm/mach-mxs/Kconfig"
 source "arch/arm/mach-netx/Kconfig"
 
 source "arch/arm/mach-nomadik/Kconfig"
-source "arch/arm/plat-nomadik/Kconfig"
 
 source "arch/arm/plat-omap/Kconfig"
 
index 97252d86a7014d47ff00cb896d594e0364d68132..090f1304fe03db78b8ebda3cf84d1b066dadfb7d 100644 (file)
@@ -199,7 +199,6 @@ machine-$(CONFIG_ARCH_ZYNQ)         += zynq
 plat-$(CONFIG_ARCH_OMAP)       += omap
 plat-$(CONFIG_ARCH_S3C64XX)    += samsung
 plat-$(CONFIG_PLAT_IOP)                += iop
-plat-$(CONFIG_PLAT_NOMADIK)    += nomadik
 plat-$(CONFIG_PLAT_ORION)      += orion
 plat-$(CONFIG_PLAT_PXA)                += pxa
 plat-$(CONFIG_PLAT_S3C24XX)    += s3c24xx samsung
index e49225b99f170c6821fd2c2b28ab7c322a708c3c..44a8e551397816910b5c6a626b2b6ddffe4a87e7 100644 (file)
@@ -27,6 +27,7 @@ omap/cleanup-prcm     git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-oma
 next/multiplatform:
 vt8500/multiplatform   git://server.prisktech.co.nz/git/linuxwmt.git/ tags/armsoc-for-3.8
 devel/debug_ll_init     patch <1350927774-14020-1-git-send-email-swarren@wwwdotorg.org>
+nomadik/plat-removal   git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git tags/kill-plat-sparse-irq
 
 next/soc:
 ux500/core             git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git ux500-core
index c744946ef0222e89623a038473497ad007f7b5ef..706dc5727bbe86ea110517cb0f3fb8e470ab6d3c 100644 (file)
@@ -4,7 +4,7 @@ menu "Nomadik boards"
 
 config MACH_NOMADIK_8815NHK
        bool "ST 8815 Nomadik Hardware Kit (evaluation board)"
-       select HAS_MTU
+       select CLKSRC_NOMADIK_MTU
        select NOMADIK_8815
 
 endmenu
index bfa1eab91f4142cecb3bdd1ce4c4ec1b8e9a9698..5ccdf53c5a9dcd0c3a6814d61b49d083e34a89eb 100644 (file)
 #include <linux/i2c.h>
 #include <linux/io.h>
 #include <linux/pinctrl/machine.h>
+#include <linux/platform_data/pinctrl-nomadik.h>
+#include <linux/platform_data/clocksource-nomadik-mtu.h>
+#include <linux/platform_data/mtd-nomadik-nand.h>
 #include <asm/hardware/vic.h>
 #include <asm/sizes.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
-#include <asm/mach/irq.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/time.h>
-
-#include <plat/gpio-nomadik.h>
-#include <plat/mtu.h>
-#include <plat/pincfg.h>
-
-#include <linux/platform_data/mtd-nomadik-nand.h>
 #include <mach/fsmc.h>
+#include <mach/irqs.h>
 
 #include "cpu-8815.h"
 
@@ -261,7 +258,7 @@ static void __init nomadik_timer_init(void)
        src_cr |= SRC_CR_INIT_VAL;
        writel(src_cr, io_p2v(NOMADIK_SRC_BASE));
 
-       nmdk_timer_init(io_p2v(NOMADIK_MTU0_BASE));
+       nmdk_timer_init(io_p2v(NOMADIK_MTU0_BASE), IRQ_MTU0);
 }
 
 static struct sys_timer nomadik_timer = {
index b617eaed0ce58695ac709b460ac29b8ac2d4b1d6..1273931303fb81599201ae0f70c1c71f503b9eda 100644 (file)
@@ -26,8 +26,8 @@
 #include <linux/irq.h>
 #include <linux/dma-mapping.h>
 #include <linux/platform_data/clk-nomadik.h>
+#include <linux/platform_data/pinctrl-nomadik.h>
 
-#include <plat/gpio-nomadik.h>
 #include <mach/hardware.h>
 #include <mach/irqs.h>
 #include <asm/mach/map.h>
index 6d14454d46094fc4bdd00c66cabff3a0abb800f9..0c2f6628299aa6bc2a7c95b567ff56344dd7df87 100644 (file)
@@ -4,8 +4,7 @@
 #include <linux/i2c-algo-bit.h>
 #include <linux/i2c-gpio.h>
 #include <linux/platform_device.h>
-#include <plat/gpio-nomadik.h>
-#include <plat/pincfg.h>
+#include <linux/platform_data/pinctrl-nomadik.h>
 
 /*
  * There are two busses in the 8815NHK.
index a118e615f8650a81b100348abbbae3bc30b7c0ea..b549d0571548ed8d3682e6946e2bce6f0e2fb4ed 100644 (file)
@@ -72,7 +72,7 @@
 #define NOMADIK_NR_GPIO                        128 /* last 4 not wired to pins */
 #define NOMADIK_GPIO_TO_IRQ(gpio)      ((gpio) + NOMADIK_GPIO_OFFSET)
 #define NOMADIK_IRQ_TO_GPIO(irq)       ((irq) - NOMADIK_GPIO_OFFSET)
-#define NR_IRQS                                NOMADIK_GPIO_TO_IRQ(NOMADIK_NR_GPIO)
+#define NOMADIK_NR_IRQS                        NOMADIK_GPIO_TO_IRQ(NOMADIK_NR_GPIO)
 
 /* Following two are used by entry_macro.S, to access our dual-vic */
 #define VIC_REG_IRQSR0         0
index e8c3f0d70ca66efa50d71bba32c462829148df4d..5dea90636d94f91e10820a41a502f23b796fc522 100644 (file)
@@ -7,8 +7,8 @@ config UX500_SOC_COMMON
        select ARM_ERRATA_764369 if SMP
        select ARM_GIC
        select CACHE_L2X0
+       select CLKSRC_NOMADIK_MTU
        select COMMON_CLK
-       select HAS_MTU
        select PINCTRL
        select PINCTRL_NOMADIK
        select PL310_ERRATA_753970 if CACHE_PL310
index 070629a95625a9b7f3a5bfd0921d419a779966fc..71a2ca7264765a72b1ba5529a0f539c3259fd585 100644 (file)
@@ -7,10 +7,8 @@
 #include <linux/platform_device.h>
 #include <linux/init.h>
 #include <linux/gpio.h>
-
-#include <plat/gpio-nomadik.h>
-#include <plat/pincfg.h>
-#include <plat/ste_dma40.h>
+#include <linux/platform_data/pinctrl-nomadik.h>
+#include <linux/platform_data/dma-ste-dma40.h>
 
 #include <mach/devices.h>
 #include <mach/hardware.h>
index a267c6d30e374f19c491244ad23fd93b07aa85d1..c34d4efd0d5c46987775b47c1393349760d60c27 100644 (file)
@@ -9,10 +9,9 @@
 #include <linux/bug.h>
 #include <linux/string.h>
 #include <linux/pinctrl/machine.h>
+#include <linux/platform_data/pinctrl-nomadik.h>
 
 #include <asm/mach-types.h>
-#include <plat/pincfg.h>
-#include <plat/gpio-nomadik.h>
 
 #include <mach/hardware.h>
 
index 9c8e4a9e83eeeb6245aef10421d6824e70fa7d9e..051b62c2710208537a3442a0ec03af57c11cc530 100644 (file)
@@ -11,9 +11,9 @@
 #include <linux/amba/mmci.h>
 #include <linux/mmc/host.h>
 #include <linux/platform_device.h>
+#include <linux/platform_data/dma-ste-dma40.h>
 
 #include <asm/mach-types.h>
-#include <plat/ste_dma40.h>
 #include <mach/devices.h>
 #include <mach/hardware.h>
 
index f0adf32e9ca00de57ff24c524c9861faec140ab8..68149e8af4b536c78606d9fa985552775c479e0b 100644 (file)
 #include <linux/delay.h>
 #include <linux/leds.h>
 #include <linux/pinctrl/consumer.h>
+#include <linux/platform_data/pinctrl-nomadik.h>
+#include <linux/platform_data/dma-ste-dma40.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/hardware/gic.h>
 
-#include <plat/ste_dma40.h>
-#include <plat/gpio-nomadik.h>
-
 #include <mach/hardware.h>
 #include <mach/setup.h>
 #include <mach/devices.h>
index 19bea7b6ddbe58510b8caeed218d7db7e363bca5..b097ba82c4d0d321f85378dedeae242cbbec85a5 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/io.h>
 #include <linux/mfd/abx500/ab8500.h>
 #include <linux/platform_data/usb-musb-ux500.h>
+#include <linux/platform_data/pinctrl-nomadik.h>
 #include <linux/random.h>
 #include <linux/mfd/dbx500-prcmu.h>
 #include <linux/of.h>
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
 #include <asm/hardware/gic.h>
-#include <plat/gpio-nomadik.h>
 #include <mach/hardware.h>
 #include <mach/setup.h>
 #include <mach/devices.h>
 #include <mach/db8500-regs.h>
+#include <mach/irqs.h>
 
 #include "devices-db8500.h"
 #include "ste-dma40-db8500.h"
index dfdd4a54668dfb4c85dfdb9a703f714b40a69bdc..16b5f71e6974d5cfee37dc7b64739946c3683f1d 100644 (file)
 #include <linux/irq.h>
 #include <linux/slab.h>
 #include <linux/platform_device.h>
-
-#include <plat/gpio-nomadik.h>
+#include <linux/platform_data/pinctrl-nomadik.h>
 
 #include <mach/hardware.h>
+#include <mach/irqs.h>
 
 #include "devices-common.h"
 
index 91754a8a0d49003c6abd723314ca046af0897a07..318d490208948bc1a8a78041f878837d07d9315c 100644 (file)
 #include <linux/gpio.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/pl022.h>
-
-#include <plat/ste_dma40.h>
+#include <linux/platform_data/dma-ste-dma40.h>
 
 #include <mach/hardware.h>
 #include <mach/setup.h>
+#include <mach/irqs.h>
 
 #include "ste-dma40-db8500.h"
 
index 3c8010f4fb3f355f75d313bddc5ddd54fc5f6e51..4b24c99926541d149d055fbd891588b1ccebdc91 100644 (file)
@@ -8,6 +8,7 @@
 #ifndef __DEVICES_DB8500_H
 #define __DEVICES_DB8500_H
 
+#include <mach/irqs.h>
 #include "devices-common.h"
 
 struct ske_keypad_platform_data;
index e8928548b6a36682031f7c88bc6c2928390f4ac8..fc77b4274c8ddb59b4f25c06515d886832cd344a 100644 (file)
@@ -46,6 +46,6 @@
 #include <mach/irqs-board-mop500.h>
 #endif
 
-#define NR_IRQS                        IRQ_BOARD_END
+#define UX500_NR_IRQS          IRQ_BOARD_END
 
 #endif /* ASM_ARCH_IRQS_H */
index 3cc7142eee02b77480ebf987c74a3b217e5915b7..9991aea3d577d7dff57481f823b25f521af34903 100644 (file)
@@ -8,7 +8,7 @@
 #ifndef __MSP_H
 #define __MSP_H
 
-#include <plat/ste_dma40.h>
+#include <linux/platform_data/dma-ste-dma40.h>
 
 enum msp_i2s_id {
        MSP_I2S_0 = 0,
index 6f39731951b051a49213eafd32ece237904f0638..875309acb02272cf76c405a72a319cf29dc16b6f 100644 (file)
@@ -9,11 +9,10 @@
 #include <linux/clksrc-dbx500-prcmu.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
+#include <linux/platform_data/clocksource-nomadik-mtu.h>
 
 #include <asm/smp_twd.h>
 
-#include <plat/mtu.h>
-
 #include <mach/setup.h>
 #include <mach/hardware.h>
 #include <mach/irqs.h>
@@ -96,7 +95,7 @@ dt_fail:
         *
         */
 
-       nmdk_timer_init(mtu_timer_base);
+       nmdk_timer_init(mtu_timer_base, IRQ_MTU0);
        clksrc_dbx500_prcmu_init(prcmu_timer_base);
        ux500_twd_init();
 }
index 145482e74418d74f2198e8a4c0711cc824f17c75..78ac65f62e875d33c38360d692943f679575326b 100644 (file)
@@ -7,10 +7,10 @@
 #include <linux/platform_device.h>
 #include <linux/usb/musb.h>
 #include <linux/dma-mapping.h>
+#include <linux/platform_data/usb-musb-ux500.h>
+#include <linux/platform_data/dma-ste-dma40.h>
 
-#include <plat/ste_dma40.h>
 #include <mach/hardware.h>
-#include <linux/platform_data/usb-musb-ux500.h>
 
 #define MUSB_DMA40_RX_CH { \
                .mode = STEDMA40_MODE_LOGICAL, \
diff --git a/arch/arm/plat-nomadik/Kconfig b/arch/arm/plat-nomadik/Kconfig
deleted file mode 100644 (file)
index 19f55ca..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# We keep common IP's here for Nomadik and other similar
-# familiy of processors from ST-Ericsson. At the moment we have
-# just MTU, others to follow soon.
-
-config PLAT_NOMADIK
-       bool
-       depends on ARCH_NOMADIK || ARCH_U8500
-       default y
-       select CLKSRC_MMIO
-       help
-         Common platform code for Nomadik and other ST-Ericsson
-         platforms.
-
-if PLAT_NOMADIK
-
-config HAS_MTU
-       bool
-       help
-         Support for Multi Timer Unit. MTU provides access
-         to multiple interrupt generating programmable
-         32-bit free running decrementing counters.
-
-config NOMADIK_MTU_SCHED_CLOCK
-       bool
-       depends on HAS_MTU
-       help
-         Use the Multi Timer Unit as the sched_clock.
-
-endif
diff --git a/arch/arm/plat-nomadik/Makefile b/arch/arm/plat-nomadik/Makefile
deleted file mode 100644 (file)
index 37c7cdd..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# arch/arm/plat-nomadik/Makefile
-# Copyright 2009 ST-Ericsson
-# Licensed under GPLv2
-
-obj-$(CONFIG_HAS_MTU)  += timer.o
diff --git a/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h b/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h
deleted file mode 100644 (file)
index c08a54d..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Structures and registers for GPIO access in the Nomadik SoC
- *
- * Copyright (C) 2008 STMicroelectronics
- *     Author: Prafulla WADASKAR <prafulla.wadaskar@st.com>
- * Copyright (C) 2009 Alessandro Rubini <rubini@unipv.it>
- *
- * 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.
- */
-
-#ifndef __PLAT_NOMADIK_GPIO
-#define __PLAT_NOMADIK_GPIO
-
-/*
- * "nmk_gpio" and "NMK_GPIO" stand for "Nomadik GPIO", leaving
- * the "gpio" namespace for generic and cross-machine functions
- */
-
-/* Register in the logic block */
-#define NMK_GPIO_DAT   0x00
-#define NMK_GPIO_DATS  0x04
-#define NMK_GPIO_DATC  0x08
-#define NMK_GPIO_PDIS  0x0c
-#define NMK_GPIO_DIR   0x10
-#define NMK_GPIO_DIRS  0x14
-#define NMK_GPIO_DIRC  0x18
-#define NMK_GPIO_SLPC  0x1c
-#define NMK_GPIO_AFSLA 0x20
-#define NMK_GPIO_AFSLB 0x24
-#define NMK_GPIO_LOWEMI        0x28
-
-#define NMK_GPIO_RIMSC 0x40
-#define NMK_GPIO_FIMSC 0x44
-#define NMK_GPIO_IS    0x48
-#define NMK_GPIO_IC    0x4c
-#define NMK_GPIO_RWIMSC        0x50
-#define NMK_GPIO_FWIMSC        0x54
-#define NMK_GPIO_WKS   0x58
-
-/* Alternate functions: function C is set in hw by setting both A and B */
-#define NMK_GPIO_ALT_GPIO      0
-#define NMK_GPIO_ALT_A 1
-#define NMK_GPIO_ALT_B 2
-#define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B)
-
-#define NMK_GPIO_ALT_CX_SHIFT 2
-#define NMK_GPIO_ALT_C1        ((1<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
-#define NMK_GPIO_ALT_C2        ((2<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
-#define NMK_GPIO_ALT_C3        ((3<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
-#define NMK_GPIO_ALT_C4        ((4<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
-
-/* Pull up/down values */
-enum nmk_gpio_pull {
-       NMK_GPIO_PULL_NONE,
-       NMK_GPIO_PULL_UP,
-       NMK_GPIO_PULL_DOWN,
-};
-
-/* Sleep mode */
-enum nmk_gpio_slpm {
-       NMK_GPIO_SLPM_INPUT,
-       NMK_GPIO_SLPM_WAKEUP_ENABLE = NMK_GPIO_SLPM_INPUT,
-       NMK_GPIO_SLPM_NOCHANGE,
-       NMK_GPIO_SLPM_WAKEUP_DISABLE = NMK_GPIO_SLPM_NOCHANGE,
-};
-
-extern int nmk_gpio_set_slpm(int gpio, enum nmk_gpio_slpm mode);
-extern int nmk_gpio_set_pull(int gpio, enum nmk_gpio_pull pull);
-#ifdef CONFIG_PINCTRL_NOMADIK
-extern int nmk_gpio_set_mode(int gpio, int gpio_mode);
-#else
-static inline int nmk_gpio_set_mode(int gpio, int gpio_mode)
-{
-       return -ENODEV;
-}
-#endif
-extern int nmk_gpio_get_mode(int gpio);
-
-extern void nmk_gpio_wakeups_suspend(void);
-extern void nmk_gpio_wakeups_resume(void);
-
-extern void nmk_gpio_clocks_enable(void);
-extern void nmk_gpio_clocks_disable(void);
-
-extern void nmk_gpio_read_pull(int gpio_bank, u32 *pull_up);
-
-/*
- * Platform data to register a block: only the initial gpio/irq number.
- */
-struct nmk_gpio_platform_data {
-       char *name;
-       int first_gpio;
-       int first_irq;
-       int num_gpio;
-       u32 (*get_secondary_status)(unsigned int bank);
-       void (*set_ioforce)(bool enable);
-       bool supports_sleepmode;
-};
-
-#endif /* __PLAT_NOMADIK_GPIO */
index fbd9b2b850ef1de0a84a57182ff79bdd38064896..5bc09eec9bbb7f3b809c8e34b7dfa231e5bd3639 100644 (file)
@@ -216,7 +216,7 @@ config HW_RANDOM_MXC_RNGA
 
 config HW_RANDOM_NOMADIK
        tristate "ST-Ericsson Nomadik Random Number Generator support"
-       depends on HW_RANDOM && PLAT_NOMADIK
+       depends on HW_RANDOM && ARCH_NOMADIK
        ---help---
          This driver provides kernel-side support for the Random Number
          Generator hardware found on ST-Ericsson SoCs (8815 and 8500).
index 7bebf1f62c65d6d752c47fb1d12ab649a39875d4..69ac405359eca3c10cd1b22ca5b91c12d34900c4 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/clk-provider.h>
 #include <linux/mfd/dbx500-prcmu.h>
 #include <linux/platform_data/clk-ux500.h>
-
+#include <mach/db8500-regs.h>
 #include "clk.h"
 
 void u8500_clk_init(void)
index 6a78073c3808b492aeb64dee35cfaeb34f901613..c9f67de8b7b4900dd8f0d9d797a405befc985ced 100644 (file)
@@ -22,6 +22,21 @@ config DW_APB_TIMER_OF
 config ARMADA_370_XP_TIMER
        bool
 
+config CLKSRC_NOMADIK_MTU
+       bool
+       depends on (ARCH_NOMADIK || ARCH_U8500)
+       select CLKSRC_MMIO
+       help
+         Support for Multi Timer Unit. MTU provides access
+         to multiple interrupt generating programmable
+         32-bit free running decrementing counters.
+
+config CLKSRC_NOMADIK_MTU_SCHED_CLOCK
+       bool
+       depends on CLKSRC_NOMADIK_MTU
+       help
+         Use the Multi Timer Unit as the sched_clock.
+
 config CLKSRC_DBX500_PRCMU
        bool "Clocksource PRCMU Timer"
        depends on UX500_SOC_DB8500
@@ -31,7 +46,7 @@ config CLKSRC_DBX500_PRCMU
 
 config CLKSRC_DBX500_PRCMU_SCHED_CLOCK
        bool "Clocksource PRCMU Timer sched_clock"
-       depends on (CLKSRC_DBX500_PRCMU && !NOMADIK_MTU_SCHED_CLOCK)
+       depends on (CLKSRC_DBX500_PRCMU && !CLKSRC_NOMADIK_MTU_SCHED_CLOCK)
        default y
        help
          Use the always on PRCMU Timer as sched_clock
index 603be366f762c7a528de14e36ba2043ef9bb1ca1..24fb888ee0a25356301da06822142763abd94dd1 100644 (file)
@@ -11,6 +11,7 @@ obj-$(CONFIG_CLKBLD_I8253)    += i8253.o
 obj-$(CONFIG_CLKSRC_MMIO)      += mmio.o
 obj-$(CONFIG_DW_APB_TIMER)     += dw_apb_timer.o
 obj-$(CONFIG_DW_APB_TIMER_OF)  += dw_apb_timer_of.o
+obj-$(CONFIG_CLKSRC_NOMADIK_MTU)       += nomadik-mtu.o
 obj-$(CONFIG_CLKSRC_DBX500_PRCMU)      += clksrc-dbx500-prcmu.o
 obj-$(CONFIG_ARMADA_370_XP_TIMER)      += time-armada-370-xp.o
 obj-$(CONFIG_ARCH_BCM2835)     += bcm2835_timer.o
similarity index 95%
rename from arch/arm/plat-nomadik/timer.c
rename to drivers/clocksource/nomadik-mtu.c
index 9222e5522a43e97236c86f55c28006c1bea3a8e2..23c780ba0d35ceb7faef3be0664cc1ce77089f83 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  linux/arch/arm/plat-nomadik/timer.c
- *
  * Copyright (C) 2008 STMicroelectronics
  * Copyright (C) 2010 Alessandro Rubini
  * Copyright (C) 2010 Linus Walleij for ST-Ericsson
 #include <linux/irq.h>
 #include <linux/io.h>
 #include <linux/clockchips.h>
+#include <linux/clocksource.h>
 #include <linux/clk.h>
 #include <linux/jiffies.h>
 #include <linux/err.h>
+#include <linux/platform_data/clocksource-nomadik-mtu.h>
 #include <asm/mach/time.h>
 #include <asm/sched_clock.h>
 
@@ -174,7 +174,7 @@ void nmdk_clksrc_reset(void)
               mtu_base + MTU_CR(0));
 }
 
-void __init nmdk_timer_init(void __iomem *base)
+void __init nmdk_timer_init(void __iomem *base, int irq)
 {
        unsigned long rate;
        struct clk *clk0;
@@ -201,7 +201,8 @@ void __init nmdk_timer_init(void __iomem *base)
                clk_prescale = MTU_CRn_PRESCALE_1;
        }
 
-       nmdk_cycle = (rate + HZ/2) / HZ;
+       /* Cycles for periodic mode */
+       nmdk_cycle = DIV_ROUND_CLOSEST(rate, HZ);
 
 
        /* Timer 0 is the free running clocksource */
@@ -217,7 +218,7 @@ void __init nmdk_timer_init(void __iomem *base)
 #endif
 
        /* Timer 1 is used for events, register irq and clockevents */
-       setup_irq(IRQ_MTU0, &nmdk_timer_irq);
+       setup_irq(irq, &nmdk_timer_irq);
        nmdk_clkevt.cpumask = cpumask_of(0);
        clockevents_config_and_register(&nmdk_clkevt, rate, 2, 0xffffffffU);
 }
index bc615cc5626674065e5439435c11fc80d08f7e17..8bc5fef07e7a797f7cdde6e8f3f15445afde4993 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
 #include <linux/semaphore.h>
+#include <linux/platform_data/dma-ste-dma40.h>
 
 #include <crypto/aes.h>
 #include <crypto/algapi.h>
@@ -30,8 +31,6 @@
 #include <crypto/des.h>
 #include <crypto/scatterwalk.h>
 
-#include <plat/ste_dma40.h>
-
 #include <linux/platform_data/crypto-ux500.h>
 #include <mach/hardware.h>
 
index ae55091c22728a4342af8b3f288ecb4b013628c2..23c5573e62ddd1d6b8aec8be10e9f47bcfaad39e 100644 (file)
@@ -19,8 +19,7 @@
 #include <linux/err.h>
 #include <linux/amba/bus.h>
 #include <linux/regulator/consumer.h>
-
-#include <plat/ste_dma40.h>
+#include <linux/platform_data/dma-ste-dma40.h>
 
 #include "dmaengine.h"
 #include "ste_dma40_ll.h"
index cad9e1daedff4ec30aa6e304c2527073674fe020..851ad56e84097b7e21e73ce5bf1a10f42d05f7bb 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #include <linux/kernel.h>
-#include <plat/ste_dma40.h>
+#include <linux/platform_data/dma-ste-dma40.h>
 
 #include "ste_dma40_ll.h"
 
index de0874054e9faebde97690fdb23986d268cbf95d..77629d33f03f2d087e7f9c1473fdaa2258a56877 100644 (file)
@@ -409,7 +409,7 @@ config KEYBOARD_NEWTON
 
 config KEYBOARD_NOMADIK
        tristate "ST-Ericsson Nomadik SKE keyboard"
-       depends on PLAT_NOMADIK
+       depends on (ARCH_NOMADIK || ARCH_U8500)
        select INPUT_MATRIXKMAP
        help
          Say Y here if you want to use a keypad provided on the SKE controller
index 1667c77b5cdef73d48923f4c7ce6ac614c39b681..547fff4901ea87ea42d01b57b571b003cb764325 100644 (file)
@@ -565,15 +565,10 @@ static int ab8500_irq_init(struct ab8500 *ab8500, struct device_node *np)
        else
                num_irqs = AB8500_NR_IRQS;
 
-       if (ab8500->irq_base) {
-               ab8500->domain = irq_domain_add_legacy(
-                       NULL, num_irqs, ab8500->irq_base,
-                       0, &ab8500_irq_ops, ab8500);
-       }
-       else {
-               ab8500->domain = irq_domain_add_linear(
-                       np, num_irqs, &ab8500_irq_ops, ab8500);
-       }
+       /* If ->irq_base is zero this will give a linear mapping */
+       ab8500->domain = irq_domain_add_simple(NULL,
+                       num_irqs, ab8500->irq_base,
+                       &ab8500_irq_ops, ab8500);
 
        if (!ab8500->domain) {
                dev_err(ab8500->dev, "Failed to create irqdomain\n");
index 3167bfdd13fa04011ffa231fde753c5cd4098d3a..e3b24c6cfe10be35df267802b0c49dd41285ec48 100644 (file)
@@ -2697,9 +2697,15 @@ static struct irq_domain_ops db8500_irq_ops = {
 
 static int db8500_irq_init(struct device_node *np)
 {
-       db8500_irq_domain = irq_domain_add_legacy(
-               np, NUM_PRCMU_WAKEUPS, IRQ_PRCMU_BASE,
-               0, &db8500_irq_ops, NULL);
+       int irq_base = -1;
+
+       /* In the device tree case, just take some IRQs */
+       if (!np)
+               irq_base = IRQ_PRCMU_BASE;
+
+       db8500_irq_domain = irq_domain_add_simple(
+               np, NUM_PRCMU_WAKEUPS, irq_base,
+               &db8500_irq_ops, NULL);
 
        if (!db8500_irq_domain) {
                pr_err("Failed to create irqdomain\n");
index 4883139460be90ba7385b059651f1a52bab608c5..e4f57482f0ae1347c25242c36509ced704e7bbc5 100644 (file)
@@ -559,7 +559,7 @@ config MTD_NAND_JZ4740
 
 config MTD_NAND_FSMC
        tristate "Support for NAND on ST Micros FSMC"
-       depends on PLAT_SPEAR || PLAT_NOMADIK || MACH_U300
+       depends on PLAT_SPEAR || ARCH_NOMADIK || ARCH_U8500 || MACH_U300
        help
          Enables support for NAND Flash chips on the ST Microelectronics
          Flexible Static Memory Controller (FSMC)
index cf82d9ce4deeccc8c19c6104103fee84854c945a..3ad23fb042b44b9b86277b407d68f7800bb99c96 100644 (file)
@@ -44,12 +44,9 @@ static inline u32 prcmu_read(unsigned int reg) {
 static inline void prcmu_write(unsigned int reg, u32 value) {}
 static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value) {}
 #endif
-
+#include <linux/platform_data/pinctrl-nomadik.h>
 #include <asm/mach/irq.h>
-
-#include <plat/pincfg.h>
-#include <plat/gpio-nomadik.h>
-
+#include <mach/irqs.h>
 #include "pinctrl-nomadik.h"
 
 /*
@@ -60,8 +57,6 @@ static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value) {}
  * Symbols in this file are called "nmk_gpio" for "nomadik gpio"
  */
 
-#define NMK_GPIO_PER_CHIP      32
-
 struct nmk_gpio_chip {
        struct gpio_chip chip;
        struct irq_domain *domain;
@@ -536,7 +531,7 @@ static int __nmk_config_pins(pin_cfg_t *cfgs, int num, bool sleep)
  * and its sleep mode based on the specified configuration.  The @cfg is
  * usually one of the SoC specific macros defined in mach/<soc>-pins.h.  These
  * are constructed using, and can be further enhanced with, the macros in
- * plat/pincfg.h.
+ * <linux/platform_data/pinctrl-nomadik.h>
  *
  * If a pin's mode is set to GPIO, it is configured as an input to avoid
  * side-effects.  The gpio can be manipulated later using standard GPIO API
index eef316e979a02a1156c8ede6ca10c3b039e5d7fc..bcd4191e10ea8ced278c469799d521e4a82dee65 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef PINCTRL_PINCTRL_NOMADIK_H
 #define PINCTRL_PINCTRL_NOMADIK_H
 
-#include <plat/gpio-nomadik.h>
+#include <linux/platform_data/pinctrl-nomadik.h>
 
 /* Package definitions */
 #define PINCTRL_NMK_STN8815    0
similarity index 71%
rename from arch/arm/plat-nomadik/include/plat/mtu.h
rename to include/linux/platform_data/clocksource-nomadik-mtu.h
index 582641f3dc01acf611f34edb846f741ded736d8c..80088973b73486c0f4b129b55b3a85b2bad8bea9 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __PLAT_MTU_H
 #define __PLAT_MTU_H
 
-void nmdk_timer_init(void __iomem *base);
+void nmdk_timer_init(void __iomem *base, int irq);
 void nmdk_clkevt_reset(void);
 void nmdk_clksrc_reset(void);
 
index 5b2d0817e26a106e643605c062f01231652ac7c3..94df96d9a3362609cee973227e6ddceef42cba2b 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef _CRYPTO_UX500_H
 #define _CRYPTO_UX500_H
 #include <linux/dmaengine.h>
-#include <plat/ste_dma40.h>
+#include <linux/platform_data/dma-ste-dma40.h>
 
 struct hash_platform_data {
        void *mem_to_engine;
similarity index 66%
rename from arch/arm/plat-nomadik/include/plat/pincfg.h
rename to include/linux/platform_data/pinctrl-nomadik.h
index 3b8ec60af351500a5cbcb80c970b8026c7d8477d..f73b2f0c55b77f6fc61605f6315563494d6692fc 100644 (file)
@@ -1,16 +1,17 @@
 /*
- * Copyright (C) ST-Ericsson SA 2010
+ * Structures and registers for GPIO access in the Nomadik SoC
  *
- * License terms: GNU General Public License, version 2
- * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
+ * Copyright (C) 2008 STMicroelectronics
+ *     Author: Prafulla WADASKAR <prafulla.wadaskar@st.com>
+ * Copyright (C) 2009 Alessandro Rubini <rubini@unipv.it>
  *
- * Based on arch/arm/mach-pxa/include/mach/mfp.h:
- *   Copyright (C) 2007 Marvell International Ltd.
- *   eric miao <eric.miao@marvell.com>
+ * 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.
  */
 
-#ifndef __PLAT_PINCFG_H
-#define __PLAT_PINCFG_H
+#ifndef __PLAT_NOMADIK_GPIO
+#define __PLAT_NOMADIK_GPIO
 
 /*
  * pin configurations are represented by 32-bit integers:
@@ -166,8 +167,100 @@ typedef unsigned long pin_cfg_t;
        (PIN_CFG_DEFAULT |\
         (PIN_NUM(num) | PIN_##alt | PIN_OUTPUT_##val))
 
+/*
+ * "nmk_gpio" and "NMK_GPIO" stand for "Nomadik GPIO", leaving
+ * the "gpio" namespace for generic and cross-machine functions
+ */
+
+#define GPIO_BLOCK_SHIFT 5
+#define NMK_GPIO_PER_CHIP (1 << GPIO_BLOCK_SHIFT)
+
+/* Register in the logic block */
+#define NMK_GPIO_DAT   0x00
+#define NMK_GPIO_DATS  0x04
+#define NMK_GPIO_DATC  0x08
+#define NMK_GPIO_PDIS  0x0c
+#define NMK_GPIO_DIR   0x10
+#define NMK_GPIO_DIRS  0x14
+#define NMK_GPIO_DIRC  0x18
+#define NMK_GPIO_SLPC  0x1c
+#define NMK_GPIO_AFSLA 0x20
+#define NMK_GPIO_AFSLB 0x24
+#define NMK_GPIO_LOWEMI        0x28
+
+#define NMK_GPIO_RIMSC 0x40
+#define NMK_GPIO_FIMSC 0x44
+#define NMK_GPIO_IS    0x48
+#define NMK_GPIO_IC    0x4c
+#define NMK_GPIO_RWIMSC        0x50
+#define NMK_GPIO_FWIMSC        0x54
+#define NMK_GPIO_WKS   0x58
+/* These appear in DB8540 and later ASICs */
+#define NMK_GPIO_EDGELEVEL 0x5C
+#define NMK_GPIO_LEVEL 0x60
+
+/* Alternate functions: function C is set in hw by setting both A and B */
+#define NMK_GPIO_ALT_GPIO      0
+#define NMK_GPIO_ALT_A 1
+#define NMK_GPIO_ALT_B 2
+#define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B)
+
+#define NMK_GPIO_ALT_CX_SHIFT 2
+#define NMK_GPIO_ALT_C1        ((1<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
+#define NMK_GPIO_ALT_C2        ((2<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
+#define NMK_GPIO_ALT_C3        ((3<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
+#define NMK_GPIO_ALT_C4        ((4<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C)
+
+/* Pull up/down values */
+enum nmk_gpio_pull {
+       NMK_GPIO_PULL_NONE,
+       NMK_GPIO_PULL_UP,
+       NMK_GPIO_PULL_DOWN,
+};
+
+/* Sleep mode */
+enum nmk_gpio_slpm {
+       NMK_GPIO_SLPM_INPUT,
+       NMK_GPIO_SLPM_WAKEUP_ENABLE = NMK_GPIO_SLPM_INPUT,
+       NMK_GPIO_SLPM_NOCHANGE,
+       NMK_GPIO_SLPM_WAKEUP_DISABLE = NMK_GPIO_SLPM_NOCHANGE,
+};
+
+/* Older deprecated pin config API that should go away soon */
 extern int nmk_config_pin(pin_cfg_t cfg, bool sleep);
 extern int nmk_config_pins(pin_cfg_t *cfgs, int num);
 extern int nmk_config_pins_sleep(pin_cfg_t *cfgs, int num);
-
+extern int nmk_gpio_set_slpm(int gpio, enum nmk_gpio_slpm mode);
+extern int nmk_gpio_set_pull(int gpio, enum nmk_gpio_pull pull);
+#ifdef CONFIG_PINCTRL_NOMADIK
+extern int nmk_gpio_set_mode(int gpio, int gpio_mode);
+#else
+static inline int nmk_gpio_set_mode(int gpio, int gpio_mode)
+{
+       return -ENODEV;
+}
 #endif
+extern int nmk_gpio_get_mode(int gpio);
+
+extern void nmk_gpio_wakeups_suspend(void);
+extern void nmk_gpio_wakeups_resume(void);
+
+extern void nmk_gpio_clocks_enable(void);
+extern void nmk_gpio_clocks_disable(void);
+
+extern void nmk_gpio_read_pull(int gpio_bank, u32 *pull_up);
+
+/*
+ * Platform data to register a block: only the initial gpio/irq number.
+ */
+struct nmk_gpio_platform_data {
+       char *name;
+       int first_gpio;
+       int first_irq;
+       int num_gpio;
+       u32 (*get_secondary_status)(unsigned int bank);
+       void (*set_ioforce)(bool enable);
+       bool supports_sleepmode;
+};
+
+#endif /* __PLAT_NOMADIK_GPIO */
index 1a04e248453c6fb743b7fb765d1ad1eeaa55cd39..b55b79f7536cd70fd1ce0da19d7aebf6a0256765 100644 (file)
@@ -18,8 +18,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/dmaengine.h>
 #include <linux/slab.h>
-
-#include <plat/ste_dma40.h>
+#include <linux/platform_data/dma-ste-dma40.h>
 
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>