All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/13] ARM: spear multiplatform support
@ 2013-03-12 16:46 Arnd Bergmann
  2013-03-12 16:46 ` [PATCH v2 01/13] ARM: spear13xx: make mach/dma.h local Arnd Bergmann
                   ` (12 more replies)
  0 siblings, 13 replies; 18+ messages in thread
From: Arnd Bergmann @ 2013-03-12 16:46 UTC (permalink / raw)
  To: linux-arm-kernel

This is the second time I post the SPEAr multiplatform patches.
It did not work out for 3.9, mostly because of conflicts against
patches in the DMA tree, but also because I did not push very
hard for these. The patches are basically unchanged now, just
some context differences since I rebased them on top of 3.9-rc2.

I'm adding them to the arm-soc tree for 3.10 now. If there are
any bugs, let's fix them on top of this branch. It would be
good to get some more testing on the branch though.

Arnd Bergmann (13):
  ARM: spear13xx: make mach/dma.h local
  ARM: spear: unify mach/generic.h and mach/irqs.h
  ARM: spear: move identical headers to plat-spear/include/mach
  ARM: spear: make spear3xx/6xx mach/spear.h files identical
  ARM: spear: merge Kconfig files
  ARM: spear: move spear.h and misc_regs.h into plat-spear
  ARM: spear: move all files to mach-spear
  ARM: spear: move generic.h and pl080.h into private dir
  ARM: spear: make clock driver independent of headers
  ARM: spear: rename duplicate pl080_plat_data
  ARM: spear: use multiplatform configuration options.
  ARM: spear: fix build error in restart.c
  ARM: spear: enable spear13xx in multi_v7_defconfig

 arch/arm/Kconfig                                   |  12 +-
 arch/arm/Makefile                                  |   5 +-
 arch/arm/configs/multi_v7_defconfig                |   9 +
 arch/arm/configs/spear3xx_defconfig                |   2 +
 arch/arm/configs/spear6xx_defconfig                |   1 +
 arch/arm/mach-spear/Kconfig                        | 103 +++++
 arch/arm/mach-spear/Makefile                       |  24 ++
 arch/arm/mach-spear/Makefile.boot                  |   3 +
 arch/arm/mach-spear/generic.h                      |  59 +++
 arch/arm/mach-spear/headsmp.S                      |  47 +++
 arch/arm/mach-spear/hotplug.c                      | 103 +++++
 arch/arm/mach-spear/include/mach/debug-macro.S     |  36 ++
 arch/arm/mach-spear/include/mach/irqs.h            |  35 ++
 arch/arm/mach-spear/include/mach/misc_regs.h       |  22 ++
 arch/arm/mach-spear/include/mach/spear.h           |  95 +++++
 arch/arm/mach-spear/include/mach/timex.h           |  19 +
 arch/arm/mach-spear/include/mach/uncompress.h      |  42 ++
 arch/arm/mach-spear/pl080.c                        |  78 ++++
 arch/arm/mach-spear/pl080.h                        |  21 +
 arch/arm/mach-spear/platsmp.c                      | 130 +++++++
 arch/arm/mach-spear/restart.c                      |  34 ++
 arch/arm/mach-spear/spear1310.c                    |  96 +++++
 arch/arm/mach-spear/spear1340.c                    | 193 +++++++++
 arch/arm/mach-spear/spear13xx-dma.h                | 128 ++++++
 arch/arm/mach-spear/spear13xx.c                    | 184 +++++++++
 arch/arm/mach-spear/spear300.c                     | 220 +++++++++++
 arch/arm/mach-spear/spear310.c                     | 262 +++++++++++++
 arch/arm/mach-spear/spear320.c                     | 277 +++++++++++++
 arch/arm/mach-spear/spear3xx.c                     | 116 ++++++
 arch/arm/mach-spear/spear6xx.c                     | 431 +++++++++++++++++++++
 arch/arm/mach-spear/time.c                         | 245 ++++++++++++
 arch/arm/mach-spear13xx/Kconfig                    |  20 -
 arch/arm/mach-spear13xx/Makefile                   |  10 -
 arch/arm/mach-spear13xx/Makefile.boot              |   3 -
 arch/arm/mach-spear13xx/headsmp.S                  |  47 ---
 arch/arm/mach-spear13xx/hotplug.c                  | 103 -----
 arch/arm/mach-spear13xx/include/mach/debug-macro.S |  14 -
 arch/arm/mach-spear13xx/include/mach/dma.h         | 128 ------
 arch/arm/mach-spear13xx/include/mach/generic.h     |  51 ---
 arch/arm/mach-spear13xx/include/mach/hardware.h    |   1 -
 arch/arm/mach-spear13xx/include/mach/irqs.h        |  20 -
 arch/arm/mach-spear13xx/include/mach/spear.h       |  54 ---
 arch/arm/mach-spear13xx/include/mach/timex.h       |  19 -
 arch/arm/mach-spear13xx/include/mach/uncompress.h  |  19 -
 arch/arm/mach-spear13xx/platsmp.c                  | 130 -------
 arch/arm/mach-spear13xx/spear1310.c                |  98 -----
 arch/arm/mach-spear13xx/spear1340.c                | 192 ---------
 arch/arm/mach-spear13xx/spear13xx.c                | 183 ---------
 arch/arm/mach-spear3xx/Kconfig                     |  26 --
 arch/arm/mach-spear3xx/Makefile                    |  15 -
 arch/arm/mach-spear3xx/Makefile.boot               |   3 -
 arch/arm/mach-spear3xx/include/mach/debug-macro.S  |  14 -
 arch/arm/mach-spear3xx/include/mach/generic.h      |  36 --
 arch/arm/mach-spear3xx/include/mach/hardware.h     |   1 -
 arch/arm/mach-spear3xx/include/mach/irqs.h         |  19 -
 arch/arm/mach-spear3xx/include/mach/misc_regs.h    |  22 --
 arch/arm/mach-spear3xx/include/mach/spear.h        |  60 ---
 arch/arm/mach-spear3xx/include/mach/timex.h        |  19 -
 arch/arm/mach-spear3xx/include/mach/uncompress.h   |  19 -
 arch/arm/mach-spear3xx/spear300.c                  | 220 -----------
 arch/arm/mach-spear3xx/spear310.c                  | 262 -------------
 arch/arm/mach-spear3xx/spear320.c                  | 276 -------------
 arch/arm/mach-spear3xx/spear3xx.c                  | 113 ------
 arch/arm/mach-spear6xx/Kconfig                     |  10 -
 arch/arm/mach-spear6xx/Makefile                    |   6 -
 arch/arm/mach-spear6xx/Makefile.boot               |   3 -
 arch/arm/mach-spear6xx/include/mach/debug-macro.S  |  14 -
 arch/arm/mach-spear6xx/include/mach/generic.h      |  23 --
 arch/arm/mach-spear6xx/include/mach/hardware.h     |   1 -
 arch/arm/mach-spear6xx/include/mach/irqs.h         |  25 --
 arch/arm/mach-spear6xx/include/mach/misc_regs.h    |  22 --
 arch/arm/mach-spear6xx/include/mach/spear.h        |  46 ---
 arch/arm/mach-spear6xx/include/mach/timex.h        |  19 -
 arch/arm/mach-spear6xx/include/mach/uncompress.h   |  19 -
 arch/arm/mach-spear6xx/spear6xx.c                  | 430 --------------------
 arch/arm/plat-spear/Kconfig                        |  47 ---
 arch/arm/plat-spear/Makefile                       |   9 -
 arch/arm/plat-spear/include/plat/debug-macro.S     |  36 --
 arch/arm/plat-spear/include/plat/pl080.h           |  21 -
 arch/arm/plat-spear/include/plat/timex.h           |  19 -
 arch/arm/plat-spear/include/plat/uncompress.h      |  42 --
 arch/arm/plat-spear/pl080.c                        |  78 ----
 arch/arm/plat-spear/restart.c                      |  33 --
 arch/arm/plat-spear/time.c                         | 245 ------------
 drivers/clk/spear/spear1310_clock.c                |  64 ++-
 drivers/clk/spear/spear1340_clock.c                |  63 ++-
 drivers/clk/spear/spear3xx_clock.c                 |  60 +--
 drivers/clk/spear/spear6xx_clock.c                 |  31 +-
 88 files changed, 3130 insertions(+), 3465 deletions(-)
 create mode 100644 arch/arm/mach-spear/Kconfig
 create mode 100644 arch/arm/mach-spear/Makefile
 create mode 100644 arch/arm/mach-spear/Makefile.boot
 create mode 100644 arch/arm/mach-spear/generic.h
 create mode 100644 arch/arm/mach-spear/headsmp.S
 create mode 100644 arch/arm/mach-spear/hotplug.c
 create mode 100644 arch/arm/mach-spear/include/mach/debug-macro.S
 create mode 100644 arch/arm/mach-spear/include/mach/irqs.h
 create mode 100644 arch/arm/mach-spear/include/mach/misc_regs.h
 create mode 100644 arch/arm/mach-spear/include/mach/spear.h
 create mode 100644 arch/arm/mach-spear/include/mach/timex.h
 create mode 100644 arch/arm/mach-spear/include/mach/uncompress.h
 create mode 100644 arch/arm/mach-spear/pl080.c
 create mode 100644 arch/arm/mach-spear/pl080.h
 create mode 100644 arch/arm/mach-spear/platsmp.c
 create mode 100644 arch/arm/mach-spear/restart.c
 create mode 100644 arch/arm/mach-spear/spear1310.c
 create mode 100644 arch/arm/mach-spear/spear1340.c
 create mode 100644 arch/arm/mach-spear/spear13xx-dma.h
 create mode 100644 arch/arm/mach-spear/spear13xx.c
 create mode 100644 arch/arm/mach-spear/spear300.c
 create mode 100644 arch/arm/mach-spear/spear310.c
 create mode 100644 arch/arm/mach-spear/spear320.c
 create mode 100644 arch/arm/mach-spear/spear3xx.c
 create mode 100644 arch/arm/mach-spear/spear6xx.c
 create mode 100644 arch/arm/mach-spear/time.c
 delete mode 100644 arch/arm/mach-spear13xx/Kconfig
 delete mode 100644 arch/arm/mach-spear13xx/Makefile
 delete mode 100644 arch/arm/mach-spear13xx/Makefile.boot
 delete mode 100644 arch/arm/mach-spear13xx/headsmp.S
 delete mode 100644 arch/arm/mach-spear13xx/hotplug.c
 delete mode 100644 arch/arm/mach-spear13xx/include/mach/debug-macro.S
 delete mode 100644 arch/arm/mach-spear13xx/include/mach/dma.h
 delete mode 100644 arch/arm/mach-spear13xx/include/mach/generic.h
 delete mode 100644 arch/arm/mach-spear13xx/include/mach/hardware.h
 delete mode 100644 arch/arm/mach-spear13xx/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-spear13xx/include/mach/spear.h
 delete mode 100644 arch/arm/mach-spear13xx/include/mach/timex.h
 delete mode 100644 arch/arm/mach-spear13xx/include/mach/uncompress.h
 delete mode 100644 arch/arm/mach-spear13xx/platsmp.c
 delete mode 100644 arch/arm/mach-spear13xx/spear1310.c
 delete mode 100644 arch/arm/mach-spear13xx/spear1340.c
 delete mode 100644 arch/arm/mach-spear13xx/spear13xx.c
 delete mode 100644 arch/arm/mach-spear3xx/Kconfig
 delete mode 100644 arch/arm/mach-spear3xx/Makefile
 delete mode 100644 arch/arm/mach-spear3xx/Makefile.boot
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/debug-macro.S
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/generic.h
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/hardware.h
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/misc_regs.h
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/spear.h
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/timex.h
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/uncompress.h
 delete mode 100644 arch/arm/mach-spear3xx/spear300.c
 delete mode 100644 arch/arm/mach-spear3xx/spear310.c
 delete mode 100644 arch/arm/mach-spear3xx/spear320.c
 delete mode 100644 arch/arm/mach-spear3xx/spear3xx.c
 delete mode 100644 arch/arm/mach-spear6xx/Kconfig
 delete mode 100644 arch/arm/mach-spear6xx/Makefile
 delete mode 100644 arch/arm/mach-spear6xx/Makefile.boot
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/debug-macro.S
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/generic.h
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/hardware.h
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/misc_regs.h
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/spear.h
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/timex.h
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/uncompress.h
 delete mode 100644 arch/arm/mach-spear6xx/spear6xx.c
 delete mode 100644 arch/arm/plat-spear/Kconfig
 delete mode 100644 arch/arm/plat-spear/Makefile
 delete mode 100644 arch/arm/plat-spear/include/plat/debug-macro.S
 delete mode 100644 arch/arm/plat-spear/include/plat/pl080.h
 delete mode 100644 arch/arm/plat-spear/include/plat/timex.h
 delete mode 100644 arch/arm/plat-spear/include/plat/uncompress.h
 delete mode 100644 arch/arm/plat-spear/pl080.c
 delete mode 100644 arch/arm/plat-spear/restart.c
 delete mode 100644 arch/arm/plat-spear/time.c

-- 
1.8.1.2

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 01/13] ARM: spear13xx: make mach/dma.h local
  2013-03-12 16:46 [PATCH v2 00/13] ARM: spear multiplatform support Arnd Bergmann
@ 2013-03-12 16:46 ` Arnd Bergmann
  2013-03-12 16:46 ` [PATCH v2 02/13] ARM: spear: unify mach/generic.h and mach/irqs.h Arnd Bergmann
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2013-03-12 16:46 UTC (permalink / raw)
  To: linux-arm-kernel

There is no reason for this header file to be globally visible, so
let's just move it into the mach directory.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-spear13xx/include/mach/dma.h | 128 -----------------------------
 arch/arm/mach-spear13xx/spear1340.c        |   3 +-
 arch/arm/mach-spear13xx/spear13xx-dma.h    | 128 +++++++++++++++++++++++++++++
 arch/arm/mach-spear13xx/spear13xx.c        |   3 +-
 4 files changed, 132 insertions(+), 130 deletions(-)
 delete mode 100644 arch/arm/mach-spear13xx/include/mach/dma.h
 create mode 100644 arch/arm/mach-spear13xx/spear13xx-dma.h

diff --git a/arch/arm/mach-spear13xx/include/mach/dma.h b/arch/arm/mach-spear13xx/include/mach/dma.h
deleted file mode 100644
index d50bdb6..0000000
--- a/arch/arm/mach-spear13xx/include/mach/dma.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * arch/arm/mach-spear13xx/include/mach/dma.h
- *
- * DMA information for SPEAr13xx machine family
- *
- * Copyright (C) 2012 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_DMA_H
-#define __MACH_DMA_H
-
-/* request id of all the peripherals */
-enum dma_master_info {
-	/* Accessible from only one master */
-	DMA_MASTER_MCIF = 0,
-	DMA_MASTER_FSMC = 1,
-	/* Accessible from both 0 & 1 */
-	DMA_MASTER_MEMORY = 0,
-	DMA_MASTER_ADC = 0,
-	DMA_MASTER_UART0 = 0,
-	DMA_MASTER_SSP0 = 0,
-	DMA_MASTER_I2C0 = 0,
-
-#ifdef CONFIG_MACH_SPEAR1310
-	/* Accessible from only one master */
-	SPEAR1310_DMA_MASTER_JPEG = 1,
-
-	/* Accessible from both 0 & 1 */
-	SPEAR1310_DMA_MASTER_I2S = 0,
-	SPEAR1310_DMA_MASTER_UART1 = 0,
-	SPEAR1310_DMA_MASTER_UART2 = 0,
-	SPEAR1310_DMA_MASTER_UART3 = 0,
-	SPEAR1310_DMA_MASTER_UART4 = 0,
-	SPEAR1310_DMA_MASTER_UART5 = 0,
-	SPEAR1310_DMA_MASTER_I2C1 = 0,
-	SPEAR1310_DMA_MASTER_I2C2 = 0,
-	SPEAR1310_DMA_MASTER_I2C3 = 0,
-	SPEAR1310_DMA_MASTER_I2C4 = 0,
-	SPEAR1310_DMA_MASTER_I2C5 = 0,
-	SPEAR1310_DMA_MASTER_I2C6 = 0,
-	SPEAR1310_DMA_MASTER_I2C7 = 0,
-	SPEAR1310_DMA_MASTER_SSP1 = 0,
-#endif
-
-#ifdef CONFIG_MACH_SPEAR1340
-	/* Accessible from only one master */
-	SPEAR1340_DMA_MASTER_I2S_PLAY = 1,
-	SPEAR1340_DMA_MASTER_I2S_REC = 1,
-	SPEAR1340_DMA_MASTER_I2C1 = 1,
-	SPEAR1340_DMA_MASTER_UART1 = 1,
-
-	/* following are accessible from both master 0 & 1 */
-	SPEAR1340_DMA_MASTER_SPDIF = 0,
-	SPEAR1340_DMA_MASTER_CAM = 1,
-	SPEAR1340_DMA_MASTER_VIDEO_IN = 0,
-	SPEAR1340_DMA_MASTER_MALI = 0,
-#endif
-};
-
-enum request_id {
-	DMA_REQ_ADC = 0,
-	DMA_REQ_SSP0_TX = 4,
-	DMA_REQ_SSP0_RX = 5,
-	DMA_REQ_UART0_TX = 6,
-	DMA_REQ_UART0_RX = 7,
-	DMA_REQ_I2C0_TX = 8,
-	DMA_REQ_I2C0_RX = 9,
-
-#ifdef CONFIG_MACH_SPEAR1310
-	SPEAR1310_DMA_REQ_FROM_JPEG = 2,
-	SPEAR1310_DMA_REQ_TO_JPEG = 3,
-	SPEAR1310_DMA_REQ_I2S_TX = 10,
-	SPEAR1310_DMA_REQ_I2S_RX = 11,
-
-	SPEAR1310_DMA_REQ_I2C1_RX = 0,
-	SPEAR1310_DMA_REQ_I2C1_TX = 1,
-	SPEAR1310_DMA_REQ_I2C2_RX = 2,
-	SPEAR1310_DMA_REQ_I2C2_TX = 3,
-	SPEAR1310_DMA_REQ_I2C3_RX = 4,
-	SPEAR1310_DMA_REQ_I2C3_TX = 5,
-	SPEAR1310_DMA_REQ_I2C4_RX = 6,
-	SPEAR1310_DMA_REQ_I2C4_TX = 7,
-	SPEAR1310_DMA_REQ_I2C5_RX = 8,
-	SPEAR1310_DMA_REQ_I2C5_TX = 9,
-	SPEAR1310_DMA_REQ_I2C6_RX = 10,
-	SPEAR1310_DMA_REQ_I2C6_TX = 11,
-	SPEAR1310_DMA_REQ_UART1_RX = 12,
-	SPEAR1310_DMA_REQ_UART1_TX = 13,
-	SPEAR1310_DMA_REQ_UART2_RX = 14,
-	SPEAR1310_DMA_REQ_UART2_TX = 15,
-	SPEAR1310_DMA_REQ_UART5_RX = 16,
-	SPEAR1310_DMA_REQ_UART5_TX = 17,
-	SPEAR1310_DMA_REQ_SSP1_RX = 18,
-	SPEAR1310_DMA_REQ_SSP1_TX = 19,
-	SPEAR1310_DMA_REQ_I2C7_RX = 20,
-	SPEAR1310_DMA_REQ_I2C7_TX = 21,
-	SPEAR1310_DMA_REQ_UART3_RX = 28,
-	SPEAR1310_DMA_REQ_UART3_TX = 29,
-	SPEAR1310_DMA_REQ_UART4_RX = 30,
-	SPEAR1310_DMA_REQ_UART4_TX = 31,
-#endif
-
-#ifdef CONFIG_MACH_SPEAR1340
-	SPEAR1340_DMA_REQ_SPDIF_TX = 2,
-	SPEAR1340_DMA_REQ_SPDIF_RX = 3,
-	SPEAR1340_DMA_REQ_I2S_TX = 10,
-	SPEAR1340_DMA_REQ_I2S_RX = 11,
-	SPEAR1340_DMA_REQ_UART1_TX = 12,
-	SPEAR1340_DMA_REQ_UART1_RX = 13,
-	SPEAR1340_DMA_REQ_I2C1_TX = 14,
-	SPEAR1340_DMA_REQ_I2C1_RX = 15,
-	SPEAR1340_DMA_REQ_CAM0_EVEN = 0,
-	SPEAR1340_DMA_REQ_CAM0_ODD = 1,
-	SPEAR1340_DMA_REQ_CAM1_EVEN = 2,
-	SPEAR1340_DMA_REQ_CAM1_ODD = 3,
-	SPEAR1340_DMA_REQ_CAM2_EVEN = 4,
-	SPEAR1340_DMA_REQ_CAM2_ODD = 5,
-	SPEAR1340_DMA_REQ_CAM3_EVEN = 6,
-	SPEAR1340_DMA_REQ_CAM3_ODD = 7,
-#endif
-};
-
-#endif /* __MACH_DMA_H */
diff --git a/arch/arm/mach-spear13xx/spear1340.c b/arch/arm/mach-spear13xx/spear1340.c
index 9a28beb..b01c4c7 100644
--- a/arch/arm/mach-spear13xx/spear1340.c
+++ b/arch/arm/mach-spear13xx/spear1340.c
@@ -20,10 +20,11 @@
 #include <linux/of_platform.h>
 #include <linux/irqchip.h>
 #include <asm/mach/arch.h>
-#include <mach/dma.h>
 #include <mach/generic.h>
 #include <mach/spear.h>
 
+#include "spear13xx-dma.h"
+
 /* Base addresses */
 #define SPEAR1340_SATA_BASE			UL(0xB1000000)
 #define SPEAR1340_UART1_BASE			UL(0xB4100000)
diff --git a/arch/arm/mach-spear13xx/spear13xx-dma.h b/arch/arm/mach-spear13xx/spear13xx-dma.h
new file mode 100644
index 0000000..d50bdb6
--- /dev/null
+++ b/arch/arm/mach-spear13xx/spear13xx-dma.h
@@ -0,0 +1,128 @@
+/*
+ * arch/arm/mach-spear13xx/include/mach/dma.h
+ *
+ * DMA information for SPEAr13xx machine family
+ *
+ * Copyright (C) 2012 ST Microelectronics
+ * Viresh Kumar <viresh.linux@gmail.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef __MACH_DMA_H
+#define __MACH_DMA_H
+
+/* request id of all the peripherals */
+enum dma_master_info {
+	/* Accessible from only one master */
+	DMA_MASTER_MCIF = 0,
+	DMA_MASTER_FSMC = 1,
+	/* Accessible from both 0 & 1 */
+	DMA_MASTER_MEMORY = 0,
+	DMA_MASTER_ADC = 0,
+	DMA_MASTER_UART0 = 0,
+	DMA_MASTER_SSP0 = 0,
+	DMA_MASTER_I2C0 = 0,
+
+#ifdef CONFIG_MACH_SPEAR1310
+	/* Accessible from only one master */
+	SPEAR1310_DMA_MASTER_JPEG = 1,
+
+	/* Accessible from both 0 & 1 */
+	SPEAR1310_DMA_MASTER_I2S = 0,
+	SPEAR1310_DMA_MASTER_UART1 = 0,
+	SPEAR1310_DMA_MASTER_UART2 = 0,
+	SPEAR1310_DMA_MASTER_UART3 = 0,
+	SPEAR1310_DMA_MASTER_UART4 = 0,
+	SPEAR1310_DMA_MASTER_UART5 = 0,
+	SPEAR1310_DMA_MASTER_I2C1 = 0,
+	SPEAR1310_DMA_MASTER_I2C2 = 0,
+	SPEAR1310_DMA_MASTER_I2C3 = 0,
+	SPEAR1310_DMA_MASTER_I2C4 = 0,
+	SPEAR1310_DMA_MASTER_I2C5 = 0,
+	SPEAR1310_DMA_MASTER_I2C6 = 0,
+	SPEAR1310_DMA_MASTER_I2C7 = 0,
+	SPEAR1310_DMA_MASTER_SSP1 = 0,
+#endif
+
+#ifdef CONFIG_MACH_SPEAR1340
+	/* Accessible from only one master */
+	SPEAR1340_DMA_MASTER_I2S_PLAY = 1,
+	SPEAR1340_DMA_MASTER_I2S_REC = 1,
+	SPEAR1340_DMA_MASTER_I2C1 = 1,
+	SPEAR1340_DMA_MASTER_UART1 = 1,
+
+	/* following are accessible from both master 0 & 1 */
+	SPEAR1340_DMA_MASTER_SPDIF = 0,
+	SPEAR1340_DMA_MASTER_CAM = 1,
+	SPEAR1340_DMA_MASTER_VIDEO_IN = 0,
+	SPEAR1340_DMA_MASTER_MALI = 0,
+#endif
+};
+
+enum request_id {
+	DMA_REQ_ADC = 0,
+	DMA_REQ_SSP0_TX = 4,
+	DMA_REQ_SSP0_RX = 5,
+	DMA_REQ_UART0_TX = 6,
+	DMA_REQ_UART0_RX = 7,
+	DMA_REQ_I2C0_TX = 8,
+	DMA_REQ_I2C0_RX = 9,
+
+#ifdef CONFIG_MACH_SPEAR1310
+	SPEAR1310_DMA_REQ_FROM_JPEG = 2,
+	SPEAR1310_DMA_REQ_TO_JPEG = 3,
+	SPEAR1310_DMA_REQ_I2S_TX = 10,
+	SPEAR1310_DMA_REQ_I2S_RX = 11,
+
+	SPEAR1310_DMA_REQ_I2C1_RX = 0,
+	SPEAR1310_DMA_REQ_I2C1_TX = 1,
+	SPEAR1310_DMA_REQ_I2C2_RX = 2,
+	SPEAR1310_DMA_REQ_I2C2_TX = 3,
+	SPEAR1310_DMA_REQ_I2C3_RX = 4,
+	SPEAR1310_DMA_REQ_I2C3_TX = 5,
+	SPEAR1310_DMA_REQ_I2C4_RX = 6,
+	SPEAR1310_DMA_REQ_I2C4_TX = 7,
+	SPEAR1310_DMA_REQ_I2C5_RX = 8,
+	SPEAR1310_DMA_REQ_I2C5_TX = 9,
+	SPEAR1310_DMA_REQ_I2C6_RX = 10,
+	SPEAR1310_DMA_REQ_I2C6_TX = 11,
+	SPEAR1310_DMA_REQ_UART1_RX = 12,
+	SPEAR1310_DMA_REQ_UART1_TX = 13,
+	SPEAR1310_DMA_REQ_UART2_RX = 14,
+	SPEAR1310_DMA_REQ_UART2_TX = 15,
+	SPEAR1310_DMA_REQ_UART5_RX = 16,
+	SPEAR1310_DMA_REQ_UART5_TX = 17,
+	SPEAR1310_DMA_REQ_SSP1_RX = 18,
+	SPEAR1310_DMA_REQ_SSP1_TX = 19,
+	SPEAR1310_DMA_REQ_I2C7_RX = 20,
+	SPEAR1310_DMA_REQ_I2C7_TX = 21,
+	SPEAR1310_DMA_REQ_UART3_RX = 28,
+	SPEAR1310_DMA_REQ_UART3_TX = 29,
+	SPEAR1310_DMA_REQ_UART4_RX = 30,
+	SPEAR1310_DMA_REQ_UART4_TX = 31,
+#endif
+
+#ifdef CONFIG_MACH_SPEAR1340
+	SPEAR1340_DMA_REQ_SPDIF_TX = 2,
+	SPEAR1340_DMA_REQ_SPDIF_RX = 3,
+	SPEAR1340_DMA_REQ_I2S_TX = 10,
+	SPEAR1340_DMA_REQ_I2S_RX = 11,
+	SPEAR1340_DMA_REQ_UART1_TX = 12,
+	SPEAR1340_DMA_REQ_UART1_RX = 13,
+	SPEAR1340_DMA_REQ_I2C1_TX = 14,
+	SPEAR1340_DMA_REQ_I2C1_RX = 15,
+	SPEAR1340_DMA_REQ_CAM0_EVEN = 0,
+	SPEAR1340_DMA_REQ_CAM0_ODD = 1,
+	SPEAR1340_DMA_REQ_CAM1_EVEN = 2,
+	SPEAR1340_DMA_REQ_CAM1_ODD = 3,
+	SPEAR1340_DMA_REQ_CAM2_EVEN = 4,
+	SPEAR1340_DMA_REQ_CAM2_ODD = 5,
+	SPEAR1340_DMA_REQ_CAM3_EVEN = 6,
+	SPEAR1340_DMA_REQ_CAM3_ODD = 7,
+#endif
+};
+
+#endif /* __MACH_DMA_H */
diff --git a/arch/arm/mach-spear13xx/spear13xx.c b/arch/arm/mach-spear13xx/spear13xx.c
index c7d2b4a..988fefe 100644
--- a/arch/arm/mach-spear13xx/spear13xx.c
+++ b/arch/arm/mach-spear13xx/spear13xx.c
@@ -21,10 +21,11 @@
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/mach/map.h>
 #include <asm/smp_twd.h>
-#include <mach/dma.h>
 #include <mach/generic.h>
 #include <mach/spear.h>
 
+#include "spear13xx-dma.h"
+
 /* common dw_dma filter routine to be used by peripherals */
 bool dw_dma_filter(struct dma_chan *chan, void *slave)
 {
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 02/13] ARM: spear: unify mach/generic.h and mach/irqs.h
  2013-03-12 16:46 [PATCH v2 00/13] ARM: spear multiplatform support Arnd Bergmann
  2013-03-12 16:46 ` [PATCH v2 01/13] ARM: spear13xx: make mach/dma.h local Arnd Bergmann
@ 2013-03-12 16:46 ` Arnd Bergmann
  2013-03-12 16:46 ` [PATCH v2 03/13] ARM: spear: move identical headers to plat-spear/include/mach Arnd Bergmann
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2013-03-12 16:46 UTC (permalink / raw)
  To: linux-arm-kernel

These are indeed easy to combine, as there are no conflicting
definitions in generic.h, and irqs.h will be obsolete once
we enable SPARSE_IRQ.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-spear13xx/include/mach/generic.h | 21 ++++++++----
 arch/arm/mach-spear13xx/include/mach/irqs.h    | 23 ++++++++++---
 arch/arm/mach-spear3xx/include/mach/generic.h  | 42 +++++++++++++++++------
 arch/arm/mach-spear3xx/include/mach/irqs.h     | 24 ++++++++++---
 arch/arm/mach-spear3xx/spear320.c              |  1 +
 arch/arm/mach-spear3xx/spear3xx.c              |  4 ++-
 arch/arm/mach-spear6xx/include/mach/generic.h  | 47 ++++++++++++++++++++++----
 arch/arm/mach-spear6xx/include/mach/irqs.h     | 22 ++++++++----
 8 files changed, 146 insertions(+), 38 deletions(-)

diff --git a/arch/arm/mach-spear13xx/include/mach/generic.h b/arch/arm/mach-spear13xx/include/mach/generic.h
index 633e678..af47d9b 100644
--- a/arch/arm/mach-spear13xx/include/mach/generic.h
+++ b/arch/arm/mach-spear13xx/include/mach/generic.h
@@ -1,9 +1,8 @@
 /*
- * arch/arm/mach-spear13xx/include/mach/generic.h
+ * spear machine family generic header file
  *
- * spear13xx machine family generic header file
- *
- * Copyright (C) 2012 ST Microelectronics
+ * Copyright (C) 2009-2012 ST Microelectronics
+ * Rajeev Kumar <rajeev-dlh.kumar@st.com>
  * Viresh Kumar <viresh.linux@gmail.com>
  *
  * This file is licensed under the terms of the GNU General Public
@@ -15,22 +14,30 @@
 #define __MACH_GENERIC_H
 
 #include <linux/dmaengine.h>
+#include <linux/amba/pl08x.h>
+#include <linux/init.h>
 #include <asm/mach/time.h>
 
-/* Add spear13xx structure declarations here */
 extern void spear13xx_timer_init(void);
+extern void spear3xx_timer_init(void);
 extern struct pl022_ssp_controller pl022_plat_data;
+extern struct pl08x_platform_data pl080_plat_data;
 extern struct dw_dma_platform_data dmac_plat_data;
 extern struct dw_dma_slave cf_dma_priv;
 extern struct dw_dma_slave nand_read_dma_priv;
 extern struct dw_dma_slave nand_write_dma_priv;
+bool dw_dma_filter(struct dma_chan *chan, void *slave);
 
-/* Add spear13xx family function declarations here */
 void __init spear_setup_of_timer(void);
+void __init spear3xx_clk_init(void);
+void __init spear3xx_map_io(void);
+void __init spear3xx_dt_init_irq(void);
+void __init spear6xx_clk_init(void);
 void __init spear13xx_map_io(void);
 void __init spear13xx_l2x0_init(void);
-bool dw_dma_filter(struct dma_chan *chan, void *slave);
+
 void spear_restart(char, const char *);
+
 void spear13xx_secondary_startup(void);
 void __cpuinit spear13xx_cpu_die(unsigned int cpu);
 
diff --git a/arch/arm/mach-spear13xx/include/mach/irqs.h b/arch/arm/mach-spear13xx/include/mach/irqs.h
index 271a62b..92da0a8 100644
--- a/arch/arm/mach-spear13xx/include/mach/irqs.h
+++ b/arch/arm/mach-spear13xx/include/mach/irqs.h
@@ -1,9 +1,8 @@
 /*
- * arch/arm/mach-spear13xx/include/mach/irqs.h
+ * IRQ helper macros for spear machine family
  *
- * IRQ helper macros for spear13xx machine family
- *
- * Copyright (C) 2012 ST Microelectronics
+ * Copyright (C) 2009-2012 ST Microelectronics
+ * Rajeev Kumar <rajeev-dlh.kumar@st.com>
  * Viresh Kumar <viresh.linux@gmail.com>
  *
  * This file is licensed under the terms of the GNU General Public
@@ -14,7 +13,23 @@
 #ifndef __MACH_IRQS_H
 #define __MACH_IRQS_H
 
+#ifdef CONFIG_ARCH_SPEAR3XX
+#define NR_IRQS			256
+#endif
+
+#ifdef CONFIG_ARCH_SPEAR6XX
+/* IRQ definitions */
+/* VIC 1 */
+#define IRQ_VIC_END				64
+
+/* GPIO pins virtual irqs */
+#define VIRTUAL_IRQS				24
+#define NR_IRQS					(IRQ_VIC_END + VIRTUAL_IRQS)
+#endif
+
+#ifdef CONFIG_ARCH_SPEAR13XX
 #define IRQ_GIC_END			160
 #define NR_IRQS				IRQ_GIC_END
+#endif
 
 #endif /* __MACH_IRQS_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h
index df31079..af47d9b 100644
--- a/arch/arm/mach-spear3xx/include/mach/generic.h
+++ b/arch/arm/mach-spear3xx/include/mach/generic.h
@@ -1,10 +1,9 @@
 /*
- * arch/arm/mach-spear3xx/generic.h
+ * spear machine family generic header file
  *
- * SPEAr3XX machine family generic header file
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar<viresh.linux@gmail.com>
+ * Copyright (C) 2009-2012 ST Microelectronics
+ * Rajeev Kumar <rajeev-dlh.kumar@st.com>
+ * Viresh Kumar <viresh.linux@gmail.com>
  *
  * This file is licensed under the terms of the GNU General Public
  * License version 2. This program is licensed "as is" without any
@@ -14,23 +13,46 @@
 #ifndef __MACH_GENERIC_H
 #define __MACH_GENERIC_H
 
+#include <linux/dmaengine.h>
 #include <linux/amba/pl08x.h>
 #include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/amba/bus.h>
 #include <asm/mach/time.h>
-#include <asm/mach/map.h>
 
-/* Add spear3xx family device structure declarations here */
+extern void spear13xx_timer_init(void);
 extern void spear3xx_timer_init(void);
 extern struct pl022_ssp_controller pl022_plat_data;
 extern struct pl08x_platform_data pl080_plat_data;
+extern struct dw_dma_platform_data dmac_plat_data;
+extern struct dw_dma_slave cf_dma_priv;
+extern struct dw_dma_slave nand_read_dma_priv;
+extern struct dw_dma_slave nand_write_dma_priv;
+bool dw_dma_filter(struct dma_chan *chan, void *slave);
 
-/* Add spear3xx family function declarations here */
 void __init spear_setup_of_timer(void);
 void __init spear3xx_clk_init(void);
 void __init spear3xx_map_io(void);
+void __init spear3xx_dt_init_irq(void);
+void __init spear6xx_clk_init(void);
+void __init spear13xx_map_io(void);
+void __init spear13xx_l2x0_init(void);
 
 void spear_restart(char, const char *);
 
+void spear13xx_secondary_startup(void);
+void __cpuinit spear13xx_cpu_die(unsigned int cpu);
+
+extern struct smp_operations spear13xx_smp_ops;
+
+#ifdef CONFIG_MACH_SPEAR1310
+void __init spear1310_clk_init(void);
+#else
+static inline void spear1310_clk_init(void) {}
+#endif
+
+#ifdef CONFIG_MACH_SPEAR1340
+void __init spear1340_clk_init(void);
+#else
+static inline void spear1340_clk_init(void) {}
+#endif
+
 #endif /* __MACH_GENERIC_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/irqs.h b/arch/arm/mach-spear3xx/include/mach/irqs.h
index f95e5b2..92da0a8 100644
--- a/arch/arm/mach-spear3xx/include/mach/irqs.h
+++ b/arch/arm/mach-spear3xx/include/mach/irqs.h
@@ -1,9 +1,8 @@
 /*
- * arch/arm/mach-spear3xx/include/mach/irqs.h
+ * IRQ helper macros for spear machine family
  *
- * IRQ helper macros for SPEAr3xx machine family
- *
- * Copyright (C) 2009 ST Microelectronics
+ * Copyright (C) 2009-2012 ST Microelectronics
+ * Rajeev Kumar <rajeev-dlh.kumar@st.com>
  * Viresh Kumar <viresh.linux@gmail.com>
  *
  * This file is licensed under the terms of the GNU General Public
@@ -14,6 +13,23 @@
 #ifndef __MACH_IRQS_H
 #define __MACH_IRQS_H
 
+#ifdef CONFIG_ARCH_SPEAR3XX
 #define NR_IRQS			256
+#endif
+
+#ifdef CONFIG_ARCH_SPEAR6XX
+/* IRQ definitions */
+/* VIC 1 */
+#define IRQ_VIC_END				64
+
+/* GPIO pins virtual irqs */
+#define VIRTUAL_IRQS				24
+#define NR_IRQS					(IRQ_VIC_END + VIRTUAL_IRQS)
+#endif
+
+#ifdef CONFIG_ARCH_SPEAR13XX
+#define IRQ_GIC_END			160
+#define NR_IRQS				IRQ_GIC_END
+#endif
 
 #endif /* __MACH_IRQS_H */
diff --git a/arch/arm/mach-spear3xx/spear320.c b/arch/arm/mach-spear3xx/spear320.c
index e1c7707..f671a0a 100644
--- a/arch/arm/mach-spear3xx/spear320.c
+++ b/arch/arm/mach-spear3xx/spear320.c
@@ -19,6 +19,7 @@
 #include <linux/irqchip.h>
 #include <linux/of_platform.h>
 #include <asm/mach/arch.h>
+#include <asm/mach/map.h>
 #include <mach/generic.h>
 #include <mach/spear.h>
 
diff --git a/arch/arm/mach-spear3xx/spear3xx.c b/arch/arm/mach-spear3xx/spear3xx.c
index f9d754f..72e3ae7 100644
--- a/arch/arm/mach-spear3xx/spear3xx.c
+++ b/arch/arm/mach-spear3xx/spear3xx.c
@@ -14,8 +14,10 @@
 #define pr_fmt(fmt) "SPEAr3xx: " fmt
 
 #include <linux/amba/pl022.h>
-#include <linux/amba/pl08x.h>
+#include <linux/amba/pl080.h>
+#include <linux/clk.h>
 #include <linux/io.h>
+#include <asm/mach/map.h>
 #include <plat/pl080.h>
 #include <mach/generic.h>
 #include <mach/spear.h>
diff --git a/arch/arm/mach-spear6xx/include/mach/generic.h b/arch/arm/mach-spear6xx/include/mach/generic.h
index 65514b1..af47d9b 100644
--- a/arch/arm/mach-spear6xx/include/mach/generic.h
+++ b/arch/arm/mach-spear6xx/include/mach/generic.h
@@ -1,10 +1,9 @@
 /*
- * arch/arm/mach-spear6xx/include/mach/generic.h
+ * spear machine family generic header file
  *
- * SPEAr6XX machine family specific generic header file
- *
- * Copyright (C) 2009 ST Microelectronics
- * Rajeev Kumar<rajeev-dlh.kumar@st.com>
+ * Copyright (C) 2009-2012 ST Microelectronics
+ * Rajeev Kumar <rajeev-dlh.kumar@st.com>
+ * Viresh Kumar <viresh.linux@gmail.com>
  *
  * This file is licensed under the terms of the GNU General Public
  * License version 2. This program is licensed "as is" without any
@@ -14,10 +13,46 @@
 #ifndef __MACH_GENERIC_H
 #define __MACH_GENERIC_H
 
+#include <linux/dmaengine.h>
+#include <linux/amba/pl08x.h>
 #include <linux/init.h>
+#include <asm/mach/time.h>
+
+extern void spear13xx_timer_init(void);
+extern void spear3xx_timer_init(void);
+extern struct pl022_ssp_controller pl022_plat_data;
+extern struct pl08x_platform_data pl080_plat_data;
+extern struct dw_dma_platform_data dmac_plat_data;
+extern struct dw_dma_slave cf_dma_priv;
+extern struct dw_dma_slave nand_read_dma_priv;
+extern struct dw_dma_slave nand_write_dma_priv;
+bool dw_dma_filter(struct dma_chan *chan, void *slave);
 
 void __init spear_setup_of_timer(void);
-void spear_restart(char, const char *);
+void __init spear3xx_clk_init(void);
+void __init spear3xx_map_io(void);
+void __init spear3xx_dt_init_irq(void);
 void __init spear6xx_clk_init(void);
+void __init spear13xx_map_io(void);
+void __init spear13xx_l2x0_init(void);
+
+void spear_restart(char, const char *);
+
+void spear13xx_secondary_startup(void);
+void __cpuinit spear13xx_cpu_die(unsigned int cpu);
+
+extern struct smp_operations spear13xx_smp_ops;
+
+#ifdef CONFIG_MACH_SPEAR1310
+void __init spear1310_clk_init(void);
+#else
+static inline void spear1310_clk_init(void) {}
+#endif
+
+#ifdef CONFIG_MACH_SPEAR1340
+void __init spear1340_clk_init(void);
+#else
+static inline void spear1340_clk_init(void) {}
+#endif
 
 #endif /* __MACH_GENERIC_H */
diff --git a/arch/arm/mach-spear6xx/include/mach/irqs.h b/arch/arm/mach-spear6xx/include/mach/irqs.h
index 37a5c41..92da0a8 100644
--- a/arch/arm/mach-spear6xx/include/mach/irqs.h
+++ b/arch/arm/mach-spear6xx/include/mach/irqs.h
@@ -1,10 +1,9 @@
 /*
- * arch/arm/mach-spear6xx/include/mach/irqs.h
+ * IRQ helper macros for spear machine family
  *
- * IRQ helper macros for SPEAr6xx machine family
- *
- * Copyright (C) 2009 ST Microelectronics
- * Rajeev Kumar<rajeev-dlh.kumar@st.com>
+ * Copyright (C) 2009-2012 ST Microelectronics
+ * Rajeev Kumar <rajeev-dlh.kumar@st.com>
+ * Viresh Kumar <viresh.linux@gmail.com>
  *
  * This file is licensed under the terms of the GNU General Public
  * License version 2. This program is licensed "as is" without any
@@ -14,6 +13,11 @@
 #ifndef __MACH_IRQS_H
 #define __MACH_IRQS_H
 
+#ifdef CONFIG_ARCH_SPEAR3XX
+#define NR_IRQS			256
+#endif
+
+#ifdef CONFIG_ARCH_SPEAR6XX
 /* IRQ definitions */
 /* VIC 1 */
 #define IRQ_VIC_END				64
@@ -21,5 +25,11 @@
 /* GPIO pins virtual irqs */
 #define VIRTUAL_IRQS				24
 #define NR_IRQS					(IRQ_VIC_END + VIRTUAL_IRQS)
+#endif
+
+#ifdef CONFIG_ARCH_SPEAR13XX
+#define IRQ_GIC_END			160
+#define NR_IRQS				IRQ_GIC_END
+#endif
 
-#endif	/* __MACH_IRQS_H */
+#endif /* __MACH_IRQS_H */
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 03/13] ARM: spear: move identical headers to plat-spear/include/mach
  2013-03-12 16:46 [PATCH v2 00/13] ARM: spear multiplatform support Arnd Bergmann
  2013-03-12 16:46 ` [PATCH v2 01/13] ARM: spear13xx: make mach/dma.h local Arnd Bergmann
  2013-03-12 16:46 ` [PATCH v2 02/13] ARM: spear: unify mach/generic.h and mach/irqs.h Arnd Bergmann
@ 2013-03-12 16:46 ` Arnd Bergmann
  2013-03-12 16:46 ` [PATCH v2 04/13] ARM: spear: make spear3xx/6xx mach/spear.h files identical Arnd Bergmann
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2013-03-12 16:46 UTC (permalink / raw)
  To: linux-arm-kernel

As an intermediate step towards unification of the three spear
platforms, this gets rid of the mach/* header files that are
obviously not platform specific.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-spear13xx/include/mach/debug-macro.S | 14 ------
 arch/arm/mach-spear13xx/include/mach/generic.h     | 58 ----------------------
 arch/arm/mach-spear13xx/include/mach/hardware.h    |  1 -
 arch/arm/mach-spear13xx/include/mach/irqs.h        | 35 -------------
 arch/arm/mach-spear13xx/include/mach/timex.h       | 19 -------
 arch/arm/mach-spear13xx/include/mach/uncompress.h  | 19 -------
 arch/arm/mach-spear3xx/include/mach/debug-macro.S  | 14 ------
 arch/arm/mach-spear3xx/include/mach/generic.h      | 58 ----------------------
 arch/arm/mach-spear3xx/include/mach/hardware.h     |  1 -
 arch/arm/mach-spear3xx/include/mach/irqs.h         | 35 -------------
 arch/arm/mach-spear3xx/include/mach/timex.h        | 19 -------
 arch/arm/mach-spear3xx/include/mach/uncompress.h   | 19 -------
 arch/arm/mach-spear6xx/include/mach/debug-macro.S  | 14 ------
 arch/arm/mach-spear6xx/include/mach/generic.h      | 58 ----------------------
 arch/arm/mach-spear6xx/include/mach/hardware.h     |  1 -
 arch/arm/mach-spear6xx/include/mach/irqs.h         | 35 -------------
 arch/arm/mach-spear6xx/include/mach/timex.h        | 19 -------
 arch/arm/mach-spear6xx/include/mach/uncompress.h   | 19 -------
 arch/arm/plat-spear/include/mach/debug-macro.S     | 36 ++++++++++++++
 arch/arm/plat-spear/include/mach/generic.h         | 58 ++++++++++++++++++++++
 arch/arm/plat-spear/include/mach/hardware.h        |  1 +
 arch/arm/plat-spear/include/mach/irqs.h            | 35 +++++++++++++
 arch/arm/plat-spear/include/mach/timex.h           | 19 +++++++
 arch/arm/plat-spear/include/mach/uncompress.h      | 42 ++++++++++++++++
 arch/arm/plat-spear/include/plat/debug-macro.S     | 36 --------------
 arch/arm/plat-spear/include/plat/timex.h           | 19 -------
 arch/arm/plat-spear/include/plat/uncompress.h      | 42 ----------------
 27 files changed, 191 insertions(+), 535 deletions(-)
 delete mode 100644 arch/arm/mach-spear13xx/include/mach/debug-macro.S
 delete mode 100644 arch/arm/mach-spear13xx/include/mach/generic.h
 delete mode 100644 arch/arm/mach-spear13xx/include/mach/hardware.h
 delete mode 100644 arch/arm/mach-spear13xx/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-spear13xx/include/mach/timex.h
 delete mode 100644 arch/arm/mach-spear13xx/include/mach/uncompress.h
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/debug-macro.S
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/generic.h
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/hardware.h
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/timex.h
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/uncompress.h
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/debug-macro.S
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/generic.h
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/hardware.h
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/timex.h
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/uncompress.h
 create mode 100644 arch/arm/plat-spear/include/mach/debug-macro.S
 create mode 100644 arch/arm/plat-spear/include/mach/generic.h
 create mode 100644 arch/arm/plat-spear/include/mach/hardware.h
 create mode 100644 arch/arm/plat-spear/include/mach/irqs.h
 create mode 100644 arch/arm/plat-spear/include/mach/timex.h
 create mode 100644 arch/arm/plat-spear/include/mach/uncompress.h
 delete mode 100644 arch/arm/plat-spear/include/plat/debug-macro.S
 delete mode 100644 arch/arm/plat-spear/include/plat/timex.h
 delete mode 100644 arch/arm/plat-spear/include/plat/uncompress.h

diff --git a/arch/arm/mach-spear13xx/include/mach/debug-macro.S b/arch/arm/mach-spear13xx/include/mach/debug-macro.S
deleted file mode 100644
index 9e3ae6b..0000000
--- a/arch/arm/mach-spear13xx/include/mach/debug-macro.S
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * arch/arm/mach-spear13xx/include/mach/debug-macro.S
- *
- * Debugging macro include header spear13xx machine family
- *
- * Copyright (C) 2012 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <plat/debug-macro.S>
diff --git a/arch/arm/mach-spear13xx/include/mach/generic.h b/arch/arm/mach-spear13xx/include/mach/generic.h
deleted file mode 100644
index af47d9b..0000000
--- a/arch/arm/mach-spear13xx/include/mach/generic.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * spear machine family generic header file
- *
- * Copyright (C) 2009-2012 ST Microelectronics
- * Rajeev Kumar <rajeev-dlh.kumar@st.com>
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_GENERIC_H
-#define __MACH_GENERIC_H
-
-#include <linux/dmaengine.h>
-#include <linux/amba/pl08x.h>
-#include <linux/init.h>
-#include <asm/mach/time.h>
-
-extern void spear13xx_timer_init(void);
-extern void spear3xx_timer_init(void);
-extern struct pl022_ssp_controller pl022_plat_data;
-extern struct pl08x_platform_data pl080_plat_data;
-extern struct dw_dma_platform_data dmac_plat_data;
-extern struct dw_dma_slave cf_dma_priv;
-extern struct dw_dma_slave nand_read_dma_priv;
-extern struct dw_dma_slave nand_write_dma_priv;
-bool dw_dma_filter(struct dma_chan *chan, void *slave);
-
-void __init spear_setup_of_timer(void);
-void __init spear3xx_clk_init(void);
-void __init spear3xx_map_io(void);
-void __init spear3xx_dt_init_irq(void);
-void __init spear6xx_clk_init(void);
-void __init spear13xx_map_io(void);
-void __init spear13xx_l2x0_init(void);
-
-void spear_restart(char, const char *);
-
-void spear13xx_secondary_startup(void);
-void __cpuinit spear13xx_cpu_die(unsigned int cpu);
-
-extern struct smp_operations spear13xx_smp_ops;
-
-#ifdef CONFIG_MACH_SPEAR1310
-void __init spear1310_clk_init(void);
-#else
-static inline void spear1310_clk_init(void) {}
-#endif
-
-#ifdef CONFIG_MACH_SPEAR1340
-void __init spear1340_clk_init(void);
-#else
-static inline void spear1340_clk_init(void) {}
-#endif
-
-#endif /* __MACH_GENERIC_H */
diff --git a/arch/arm/mach-spear13xx/include/mach/hardware.h b/arch/arm/mach-spear13xx/include/mach/hardware.h
deleted file mode 100644
index 40a8c17..0000000
--- a/arch/arm/mach-spear13xx/include/mach/hardware.h
+++ /dev/null
@@ -1 +0,0 @@
-/* empty */
diff --git a/arch/arm/mach-spear13xx/include/mach/irqs.h b/arch/arm/mach-spear13xx/include/mach/irqs.h
deleted file mode 100644
index 92da0a8..0000000
--- a/arch/arm/mach-spear13xx/include/mach/irqs.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * IRQ helper macros for spear machine family
- *
- * Copyright (C) 2009-2012 ST Microelectronics
- * Rajeev Kumar <rajeev-dlh.kumar@st.com>
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_IRQS_H
-#define __MACH_IRQS_H
-
-#ifdef CONFIG_ARCH_SPEAR3XX
-#define NR_IRQS			256
-#endif
-
-#ifdef CONFIG_ARCH_SPEAR6XX
-/* IRQ definitions */
-/* VIC 1 */
-#define IRQ_VIC_END				64
-
-/* GPIO pins virtual irqs */
-#define VIRTUAL_IRQS				24
-#define NR_IRQS					(IRQ_VIC_END + VIRTUAL_IRQS)
-#endif
-
-#ifdef CONFIG_ARCH_SPEAR13XX
-#define IRQ_GIC_END			160
-#define NR_IRQS				IRQ_GIC_END
-#endif
-
-#endif /* __MACH_IRQS_H */
diff --git a/arch/arm/mach-spear13xx/include/mach/timex.h b/arch/arm/mach-spear13xx/include/mach/timex.h
deleted file mode 100644
index 3a58b82..0000000
--- a/arch/arm/mach-spear13xx/include/mach/timex.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-spear3xx/include/mach/timex.h
- *
- * SPEAr3XX machine family specific timex definitions
- *
- * Copyright (C) 2012 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_TIMEX_H
-#define __MACH_TIMEX_H
-
-#include <plat/timex.h>
-
-#endif /* __MACH_TIMEX_H */
diff --git a/arch/arm/mach-spear13xx/include/mach/uncompress.h b/arch/arm/mach-spear13xx/include/mach/uncompress.h
deleted file mode 100644
index 70fe72f..0000000
--- a/arch/arm/mach-spear13xx/include/mach/uncompress.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-spear13xx/include/mach/uncompress.h
- *
- * Serial port stubs for kernel decompress status messages
- *
- * Copyright (C) 2012 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_UNCOMPRESS_H
-#define __MACH_UNCOMPRESS_H
-
-#include <plat/uncompress.h>
-
-#endif /* __MACH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/debug-macro.S b/arch/arm/mach-spear3xx/include/mach/debug-macro.S
deleted file mode 100644
index 0a6381f..0000000
--- a/arch/arm/mach-spear3xx/include/mach/debug-macro.S
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * arch/arm/mach-spear3xx/include/mach/debug-macro.S
- *
- * Debugging macro include header spear3xx machine family
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar<viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <plat/debug-macro.S>
diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h
deleted file mode 100644
index af47d9b..0000000
--- a/arch/arm/mach-spear3xx/include/mach/generic.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * spear machine family generic header file
- *
- * Copyright (C) 2009-2012 ST Microelectronics
- * Rajeev Kumar <rajeev-dlh.kumar@st.com>
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_GENERIC_H
-#define __MACH_GENERIC_H
-
-#include <linux/dmaengine.h>
-#include <linux/amba/pl08x.h>
-#include <linux/init.h>
-#include <asm/mach/time.h>
-
-extern void spear13xx_timer_init(void);
-extern void spear3xx_timer_init(void);
-extern struct pl022_ssp_controller pl022_plat_data;
-extern struct pl08x_platform_data pl080_plat_data;
-extern struct dw_dma_platform_data dmac_plat_data;
-extern struct dw_dma_slave cf_dma_priv;
-extern struct dw_dma_slave nand_read_dma_priv;
-extern struct dw_dma_slave nand_write_dma_priv;
-bool dw_dma_filter(struct dma_chan *chan, void *slave);
-
-void __init spear_setup_of_timer(void);
-void __init spear3xx_clk_init(void);
-void __init spear3xx_map_io(void);
-void __init spear3xx_dt_init_irq(void);
-void __init spear6xx_clk_init(void);
-void __init spear13xx_map_io(void);
-void __init spear13xx_l2x0_init(void);
-
-void spear_restart(char, const char *);
-
-void spear13xx_secondary_startup(void);
-void __cpuinit spear13xx_cpu_die(unsigned int cpu);
-
-extern struct smp_operations spear13xx_smp_ops;
-
-#ifdef CONFIG_MACH_SPEAR1310
-void __init spear1310_clk_init(void);
-#else
-static inline void spear1310_clk_init(void) {}
-#endif
-
-#ifdef CONFIG_MACH_SPEAR1340
-void __init spear1340_clk_init(void);
-#else
-static inline void spear1340_clk_init(void) {}
-#endif
-
-#endif /* __MACH_GENERIC_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/hardware.h b/arch/arm/mach-spear3xx/include/mach/hardware.h
deleted file mode 100644
index 40a8c17..0000000
--- a/arch/arm/mach-spear3xx/include/mach/hardware.h
+++ /dev/null
@@ -1 +0,0 @@
-/* empty */
diff --git a/arch/arm/mach-spear3xx/include/mach/irqs.h b/arch/arm/mach-spear3xx/include/mach/irqs.h
deleted file mode 100644
index 92da0a8..0000000
--- a/arch/arm/mach-spear3xx/include/mach/irqs.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * IRQ helper macros for spear machine family
- *
- * Copyright (C) 2009-2012 ST Microelectronics
- * Rajeev Kumar <rajeev-dlh.kumar@st.com>
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_IRQS_H
-#define __MACH_IRQS_H
-
-#ifdef CONFIG_ARCH_SPEAR3XX
-#define NR_IRQS			256
-#endif
-
-#ifdef CONFIG_ARCH_SPEAR6XX
-/* IRQ definitions */
-/* VIC 1 */
-#define IRQ_VIC_END				64
-
-/* GPIO pins virtual irqs */
-#define VIRTUAL_IRQS				24
-#define NR_IRQS					(IRQ_VIC_END + VIRTUAL_IRQS)
-#endif
-
-#ifdef CONFIG_ARCH_SPEAR13XX
-#define IRQ_GIC_END			160
-#define NR_IRQS				IRQ_GIC_END
-#endif
-
-#endif /* __MACH_IRQS_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/timex.h b/arch/arm/mach-spear3xx/include/mach/timex.h
deleted file mode 100644
index 9f5d08b..0000000
--- a/arch/arm/mach-spear3xx/include/mach/timex.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-spear3xx/include/mach/timex.h
- *
- * SPEAr3XX machine family specific timex definitions
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_TIMEX_H
-#define __MACH_TIMEX_H
-
-#include <plat/timex.h>
-
-#endif /* __MACH_TIMEX_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/uncompress.h b/arch/arm/mach-spear3xx/include/mach/uncompress.h
deleted file mode 100644
index b909b01..0000000
--- a/arch/arm/mach-spear3xx/include/mach/uncompress.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-spear3xx/include/mach/uncompress.h
- *
- * Serial port stubs for kernel decompress status messages
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_UNCOMPRESS_H
-#define __MACH_UNCOMPRESS_H
-
-#include <plat/uncompress.h>
-
-#endif /* __MACH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-spear6xx/include/mach/debug-macro.S b/arch/arm/mach-spear6xx/include/mach/debug-macro.S
deleted file mode 100644
index 0f3ea39..0000000
--- a/arch/arm/mach-spear6xx/include/mach/debug-macro.S
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * arch/arm/mach-spear6xx/include/mach/debug-macro.S
- *
- * Debugging macro include header for SPEAr6xx machine family
- *
- * Copyright (C) 2009 ST Microelectronics
- * Rajeev Kumar<rajeev-dlh.kumar@st.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <plat/debug-macro.S>
diff --git a/arch/arm/mach-spear6xx/include/mach/generic.h b/arch/arm/mach-spear6xx/include/mach/generic.h
deleted file mode 100644
index af47d9b..0000000
--- a/arch/arm/mach-spear6xx/include/mach/generic.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * spear machine family generic header file
- *
- * Copyright (C) 2009-2012 ST Microelectronics
- * Rajeev Kumar <rajeev-dlh.kumar@st.com>
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_GENERIC_H
-#define __MACH_GENERIC_H
-
-#include <linux/dmaengine.h>
-#include <linux/amba/pl08x.h>
-#include <linux/init.h>
-#include <asm/mach/time.h>
-
-extern void spear13xx_timer_init(void);
-extern void spear3xx_timer_init(void);
-extern struct pl022_ssp_controller pl022_plat_data;
-extern struct pl08x_platform_data pl080_plat_data;
-extern struct dw_dma_platform_data dmac_plat_data;
-extern struct dw_dma_slave cf_dma_priv;
-extern struct dw_dma_slave nand_read_dma_priv;
-extern struct dw_dma_slave nand_write_dma_priv;
-bool dw_dma_filter(struct dma_chan *chan, void *slave);
-
-void __init spear_setup_of_timer(void);
-void __init spear3xx_clk_init(void);
-void __init spear3xx_map_io(void);
-void __init spear3xx_dt_init_irq(void);
-void __init spear6xx_clk_init(void);
-void __init spear13xx_map_io(void);
-void __init spear13xx_l2x0_init(void);
-
-void spear_restart(char, const char *);
-
-void spear13xx_secondary_startup(void);
-void __cpuinit spear13xx_cpu_die(unsigned int cpu);
-
-extern struct smp_operations spear13xx_smp_ops;
-
-#ifdef CONFIG_MACH_SPEAR1310
-void __init spear1310_clk_init(void);
-#else
-static inline void spear1310_clk_init(void) {}
-#endif
-
-#ifdef CONFIG_MACH_SPEAR1340
-void __init spear1340_clk_init(void);
-#else
-static inline void spear1340_clk_init(void) {}
-#endif
-
-#endif /* __MACH_GENERIC_H */
diff --git a/arch/arm/mach-spear6xx/include/mach/hardware.h b/arch/arm/mach-spear6xx/include/mach/hardware.h
deleted file mode 100644
index 40a8c17..0000000
--- a/arch/arm/mach-spear6xx/include/mach/hardware.h
+++ /dev/null
@@ -1 +0,0 @@
-/* empty */
diff --git a/arch/arm/mach-spear6xx/include/mach/irqs.h b/arch/arm/mach-spear6xx/include/mach/irqs.h
deleted file mode 100644
index 92da0a8..0000000
--- a/arch/arm/mach-spear6xx/include/mach/irqs.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * IRQ helper macros for spear machine family
- *
- * Copyright (C) 2009-2012 ST Microelectronics
- * Rajeev Kumar <rajeev-dlh.kumar@st.com>
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_IRQS_H
-#define __MACH_IRQS_H
-
-#ifdef CONFIG_ARCH_SPEAR3XX
-#define NR_IRQS			256
-#endif
-
-#ifdef CONFIG_ARCH_SPEAR6XX
-/* IRQ definitions */
-/* VIC 1 */
-#define IRQ_VIC_END				64
-
-/* GPIO pins virtual irqs */
-#define VIRTUAL_IRQS				24
-#define NR_IRQS					(IRQ_VIC_END + VIRTUAL_IRQS)
-#endif
-
-#ifdef CONFIG_ARCH_SPEAR13XX
-#define IRQ_GIC_END			160
-#define NR_IRQS				IRQ_GIC_END
-#endif
-
-#endif /* __MACH_IRQS_H */
diff --git a/arch/arm/mach-spear6xx/include/mach/timex.h b/arch/arm/mach-spear6xx/include/mach/timex.h
deleted file mode 100644
index ac1c5b0..0000000
--- a/arch/arm/mach-spear6xx/include/mach/timex.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-spear6xx/include/mach/timex.h
- *
- * SPEAr6XX machine family specific timex definitions
- *
- * Copyright (C) 2009 ST Microelectronics
- * Rajeev Kumar<rajeev-dlh.kumar@st.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_TIMEX_H
-#define __MACH_TIMEX_H
-
-#include <plat/timex.h>
-
-#endif	/* __MACH_TIMEX_H */
diff --git a/arch/arm/mach-spear6xx/include/mach/uncompress.h b/arch/arm/mach-spear6xx/include/mach/uncompress.h
deleted file mode 100644
index 77f0765..0000000
--- a/arch/arm/mach-spear6xx/include/mach/uncompress.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-spear6xx/include/mach/uncompress.h
- *
- * Serial port stubs for kernel decompress status messages
- *
- * Copyright (C) 2009 ST Microelectronics
- * Rajeev Kumar<rajeev-dlh.kumar@st.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_UNCOMPRESS_H
-#define __MACH_UNCOMPRESS_H
-
-#include <plat/uncompress.h>
-
-#endif	/* __MACH_UNCOMPRESS_H */
diff --git a/arch/arm/plat-spear/include/mach/debug-macro.S b/arch/arm/plat-spear/include/mach/debug-macro.S
new file mode 100644
index 0000000..75b05ad
--- /dev/null
+++ b/arch/arm/plat-spear/include/mach/debug-macro.S
@@ -0,0 +1,36 @@
+/*
+ * arch/arm/plat-spear/include/plat/debug-macro.S
+ *
+ * Debugging macro include header for spear platform
+ *
+ * Copyright (C) 2009 ST Microelectronics
+ * Viresh Kumar <viresh.linux@gmail.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#include <linux/amba/serial.h>
+#include <mach/spear.h>
+
+		.macro	addruart, rp, rv, tmp
+		mov	\rp, #SPEAR_DBG_UART_BASE		@ Physical base
+		mov	\rv, #VA_SPEAR_DBG_UART_BASE		@ Virtual base
+		.endm
+
+		.macro	senduart, rd, rx
+		strb	\rd, [\rx, #UART01x_DR]			@ ASC_TX_BUFFER
+		.endm
+
+		.macro	waituart, rd, rx
+1001:		ldr	\rd, [\rx, #UART01x_FR]			@ FLAG REGISTER
+		tst	\rd, #UART01x_FR_TXFF			@ TX_FULL
+		bne	1001b
+		.endm
+
+		.macro	busyuart, rd, rx
+1002:		ldr	\rd, [\rx, #UART01x_FR]			@ FLAG REGISTER
+		tst	\rd, #UART011_FR_TXFE			@ TX_EMPTY
+		beq	1002b
+		.endm
diff --git a/arch/arm/plat-spear/include/mach/generic.h b/arch/arm/plat-spear/include/mach/generic.h
new file mode 100644
index 0000000..af47d9b
--- /dev/null
+++ b/arch/arm/plat-spear/include/mach/generic.h
@@ -0,0 +1,58 @@
+/*
+ * spear machine family generic header file
+ *
+ * Copyright (C) 2009-2012 ST Microelectronics
+ * Rajeev Kumar <rajeev-dlh.kumar@st.com>
+ * Viresh Kumar <viresh.linux@gmail.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef __MACH_GENERIC_H
+#define __MACH_GENERIC_H
+
+#include <linux/dmaengine.h>
+#include <linux/amba/pl08x.h>
+#include <linux/init.h>
+#include <asm/mach/time.h>
+
+extern void spear13xx_timer_init(void);
+extern void spear3xx_timer_init(void);
+extern struct pl022_ssp_controller pl022_plat_data;
+extern struct pl08x_platform_data pl080_plat_data;
+extern struct dw_dma_platform_data dmac_plat_data;
+extern struct dw_dma_slave cf_dma_priv;
+extern struct dw_dma_slave nand_read_dma_priv;
+extern struct dw_dma_slave nand_write_dma_priv;
+bool dw_dma_filter(struct dma_chan *chan, void *slave);
+
+void __init spear_setup_of_timer(void);
+void __init spear3xx_clk_init(void);
+void __init spear3xx_map_io(void);
+void __init spear3xx_dt_init_irq(void);
+void __init spear6xx_clk_init(void);
+void __init spear13xx_map_io(void);
+void __init spear13xx_l2x0_init(void);
+
+void spear_restart(char, const char *);
+
+void spear13xx_secondary_startup(void);
+void __cpuinit spear13xx_cpu_die(unsigned int cpu);
+
+extern struct smp_operations spear13xx_smp_ops;
+
+#ifdef CONFIG_MACH_SPEAR1310
+void __init spear1310_clk_init(void);
+#else
+static inline void spear1310_clk_init(void) {}
+#endif
+
+#ifdef CONFIG_MACH_SPEAR1340
+void __init spear1340_clk_init(void);
+#else
+static inline void spear1340_clk_init(void) {}
+#endif
+
+#endif /* __MACH_GENERIC_H */
diff --git a/arch/arm/plat-spear/include/mach/hardware.h b/arch/arm/plat-spear/include/mach/hardware.h
new file mode 100644
index 0000000..40a8c17
--- /dev/null
+++ b/arch/arm/plat-spear/include/mach/hardware.h
@@ -0,0 +1 @@
+/* empty */
diff --git a/arch/arm/plat-spear/include/mach/irqs.h b/arch/arm/plat-spear/include/mach/irqs.h
new file mode 100644
index 0000000..92da0a8
--- /dev/null
+++ b/arch/arm/plat-spear/include/mach/irqs.h
@@ -0,0 +1,35 @@
+/*
+ * IRQ helper macros for spear machine family
+ *
+ * Copyright (C) 2009-2012 ST Microelectronics
+ * Rajeev Kumar <rajeev-dlh.kumar@st.com>
+ * Viresh Kumar <viresh.linux@gmail.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef __MACH_IRQS_H
+#define __MACH_IRQS_H
+
+#ifdef CONFIG_ARCH_SPEAR3XX
+#define NR_IRQS			256
+#endif
+
+#ifdef CONFIG_ARCH_SPEAR6XX
+/* IRQ definitions */
+/* VIC 1 */
+#define IRQ_VIC_END				64
+
+/* GPIO pins virtual irqs */
+#define VIRTUAL_IRQS				24
+#define NR_IRQS					(IRQ_VIC_END + VIRTUAL_IRQS)
+#endif
+
+#ifdef CONFIG_ARCH_SPEAR13XX
+#define IRQ_GIC_END			160
+#define NR_IRQS				IRQ_GIC_END
+#endif
+
+#endif /* __MACH_IRQS_H */
diff --git a/arch/arm/plat-spear/include/mach/timex.h b/arch/arm/plat-spear/include/mach/timex.h
new file mode 100644
index 0000000..ef95e5b
--- /dev/null
+++ b/arch/arm/plat-spear/include/mach/timex.h
@@ -0,0 +1,19 @@
+/*
+ * arch/arm/plat-spear/include/plat/timex.h
+ *
+ * SPEAr platform specific timex definitions
+ *
+ * Copyright (C) 2009 ST Microelectronics
+ * Viresh Kumar <viresh.linux@gmail.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef __PLAT_TIMEX_H
+#define __PLAT_TIMEX_H
+
+#define CLOCK_TICK_RATE			48000000
+
+#endif /* __PLAT_TIMEX_H */
diff --git a/arch/arm/plat-spear/include/mach/uncompress.h b/arch/arm/plat-spear/include/mach/uncompress.h
new file mode 100644
index 0000000..51b2dc9
--- /dev/null
+++ b/arch/arm/plat-spear/include/mach/uncompress.h
@@ -0,0 +1,42 @@
+/*
+ * arch/arm/plat-spear/include/plat/uncompress.h
+ *
+ * Serial port stubs for kernel decompress status messages
+ *
+ * Copyright (C) 2009 ST Microelectronics
+ * Viresh Kumar <viresh.linux@gmail.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#include <linux/io.h>
+#include <linux/amba/serial.h>
+#include <mach/spear.h>
+
+#ifndef __PLAT_UNCOMPRESS_H
+#define __PLAT_UNCOMPRESS_H
+/*
+ * This does not append a newline
+ */
+static inline void putc(int c)
+{
+	void __iomem *base = (void __iomem *)SPEAR_DBG_UART_BASE;
+
+	while (readl_relaxed(base + UART01x_FR) & UART01x_FR_TXFF)
+		barrier();
+
+	writel_relaxed(c, base + UART01x_DR);
+}
+
+static inline void flush(void)
+{
+}
+
+/*
+ * nothing to do
+ */
+#define arch_decomp_setup()
+
+#endif /* __PLAT_UNCOMPRESS_H */
diff --git a/arch/arm/plat-spear/include/plat/debug-macro.S b/arch/arm/plat-spear/include/plat/debug-macro.S
deleted file mode 100644
index 75b05ad..0000000
--- a/arch/arm/plat-spear/include/plat/debug-macro.S
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * arch/arm/plat-spear/include/plat/debug-macro.S
- *
- * Debugging macro include header for spear platform
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <linux/amba/serial.h>
-#include <mach/spear.h>
-
-		.macro	addruart, rp, rv, tmp
-		mov	\rp, #SPEAR_DBG_UART_BASE		@ Physical base
-		mov	\rv, #VA_SPEAR_DBG_UART_BASE		@ Virtual base
-		.endm
-
-		.macro	senduart, rd, rx
-		strb	\rd, [\rx, #UART01x_DR]			@ ASC_TX_BUFFER
-		.endm
-
-		.macro	waituart, rd, rx
-1001:		ldr	\rd, [\rx, #UART01x_FR]			@ FLAG REGISTER
-		tst	\rd, #UART01x_FR_TXFF			@ TX_FULL
-		bne	1001b
-		.endm
-
-		.macro	busyuart, rd, rx
-1002:		ldr	\rd, [\rx, #UART01x_FR]			@ FLAG REGISTER
-		tst	\rd, #UART011_FR_TXFE			@ TX_EMPTY
-		beq	1002b
-		.endm
diff --git a/arch/arm/plat-spear/include/plat/timex.h b/arch/arm/plat-spear/include/plat/timex.h
deleted file mode 100644
index ef95e5b..0000000
--- a/arch/arm/plat-spear/include/plat/timex.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/plat-spear/include/plat/timex.h
- *
- * SPEAr platform specific timex definitions
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __PLAT_TIMEX_H
-#define __PLAT_TIMEX_H
-
-#define CLOCK_TICK_RATE			48000000
-
-#endif /* __PLAT_TIMEX_H */
diff --git a/arch/arm/plat-spear/include/plat/uncompress.h b/arch/arm/plat-spear/include/plat/uncompress.h
deleted file mode 100644
index 51b2dc9..0000000
--- a/arch/arm/plat-spear/include/plat/uncompress.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * arch/arm/plat-spear/include/plat/uncompress.h
- *
- * Serial port stubs for kernel decompress status messages
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <linux/io.h>
-#include <linux/amba/serial.h>
-#include <mach/spear.h>
-
-#ifndef __PLAT_UNCOMPRESS_H
-#define __PLAT_UNCOMPRESS_H
-/*
- * This does not append a newline
- */
-static inline void putc(int c)
-{
-	void __iomem *base = (void __iomem *)SPEAR_DBG_UART_BASE;
-
-	while (readl_relaxed(base + UART01x_FR) & UART01x_FR_TXFF)
-		barrier();
-
-	writel_relaxed(c, base + UART01x_DR);
-}
-
-static inline void flush(void)
-{
-}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
-
-#endif /* __PLAT_UNCOMPRESS_H */
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 04/13] ARM: spear: make spear3xx/6xx mach/spear.h files identical
  2013-03-12 16:46 [PATCH v2 00/13] ARM: spear multiplatform support Arnd Bergmann
                   ` (2 preceding siblings ...)
  2013-03-12 16:46 ` [PATCH v2 03/13] ARM: spear: move identical headers to plat-spear/include/mach Arnd Bergmann
@ 2013-03-12 16:46 ` Arnd Bergmann
  2013-03-12 16:46 ` [PATCH v2 05/13] ARM: spear: merge Kconfig files Arnd Bergmann
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2013-03-12 16:46 UTC (permalink / raw)
  To: linux-arm-kernel

The two files are almost identical already basically just differ
in the identifier names. By changing the identifiers to be the
same, we are able to merge the two as a preparation to building
a combined kernel.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-spear3xx/include/mach/misc_regs.h |  2 +-
 arch/arm/mach-spear3xx/include/mach/spear.h     | 47 ++++++++++---------
 arch/arm/mach-spear3xx/spear300.c               |  2 +-
 arch/arm/mach-spear3xx/spear310.c               |  2 +-
 arch/arm/mach-spear3xx/spear320.c               |  2 +-
 arch/arm/mach-spear3xx/spear3xx.c               |  8 ++--
 arch/arm/mach-spear6xx/include/mach/misc_regs.h |  2 +-
 arch/arm/mach-spear6xx/include/mach/spear.h     | 61 +++++++++++++++----------
 arch/arm/mach-spear6xx/spear6xx.c               | 12 ++---
 9 files changed, 75 insertions(+), 63 deletions(-)

diff --git a/arch/arm/mach-spear3xx/include/mach/misc_regs.h b/arch/arm/mach-spear3xx/include/mach/misc_regs.h
index 6309bf6..075812c 100644
--- a/arch/arm/mach-spear3xx/include/mach/misc_regs.h
+++ b/arch/arm/mach-spear3xx/include/mach/misc_regs.h
@@ -16,7 +16,7 @@
 
 #include <mach/spear.h>
 
-#define MISC_BASE		IOMEM(VA_SPEAR3XX_ICM3_MISC_REG_BASE)
+#define MISC_BASE		IOMEM(VA_SPEAR_ICM3_MISC_REG_BASE)
 #define DMA_CHN_CFG		(MISC_BASE + 0x0A0)
 
 #endif /* __MACH_MISC_REGS_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/spear.h b/arch/arm/mach-spear3xx/include/mach/spear.h
index 8cca951..ee5a774 100644
--- a/arch/arm/mach-spear3xx/include/mach/spear.h
+++ b/arch/arm/mach-spear3xx/include/mach/spear.h
@@ -1,9 +1,8 @@
 /*
- * arch/arm/mach-spear3xx/include/mach/spear.h
+ * SPEAr3xx/6xx Machine family specific definition
  *
- * SPEAr3xx Machine family specific definition
- *
- * Copyright (C) 2009 ST Microelectronics
+ * Copyright (C) 2009,2012 ST Microelectronics
+ * Rajeev Kumar<rajeev-dlh.kumar@st.com>
  * Viresh Kumar <viresh.linux@gmail.com>
  *
  * This file is licensed under the terms of the GNU General Public
@@ -11,38 +10,38 @@
  * warranty of any kind, whether express or implied.
  */
 
-#ifndef __MACH_SPEAR3XX_H
-#define __MACH_SPEAR3XX_H
+#ifndef __MACH_SPEAR_H
+#define __MACH_SPEAR_H
 
 #include <asm/memory.h>
 
 /* ICM1 - Low speed connection */
-#define SPEAR3XX_ICM1_2_BASE		UL(0xD0000000)
-#define VA_SPEAR3XX_ICM1_2_BASE		UL(0xFD000000)
-#define SPEAR3XX_ICM1_UART_BASE		UL(0xD0000000)
-#define VA_SPEAR3XX_ICM1_UART_BASE	(VA_SPEAR3XX_ICM1_2_BASE | SPEAR3XX_ICM1_UART_BASE)
+#define SPEAR_ICM1_2_BASE		UL(0xD0000000)
+#define VA_SPEAR_ICM1_2_BASE		UL(0xFD000000)
+#define SPEAR_ICM1_UART_BASE		UL(0xD0000000)
+#define VA_SPEAR_ICM1_UART_BASE		(VA_SPEAR_ICM1_2_BASE | SPEAR_ICM1_UART_BASE)
 #define SPEAR3XX_ICM1_SSP_BASE		UL(0xD0100000)
 
-/* ML1 - Multi Layer CPU Subsystem */
-#define SPEAR3XX_ICM3_ML1_2_BASE	UL(0xF0000000)
+/* ML-1, 2 - Multi Layer CPU Subsystem */
+#define SPEAR_ICM3_ML1_2_BASE		UL(0xF0000000)
 #define VA_SPEAR6XX_ML_CPU_BASE		UL(0xF0000000)
 
 /* ICM3 - Basic Subsystem */
-#define SPEAR3XX_ICM3_SMI_CTRL_BASE	UL(0xFC000000)
-#define VA_SPEAR3XX_ICM3_SMI_CTRL_BASE	UL(0xFC000000)
-#define SPEAR3XX_ICM3_DMA_BASE		UL(0xFC400000)
-#define SPEAR3XX_ICM3_SYS_CTRL_BASE	UL(0xFCA00000)
-#define VA_SPEAR3XX_ICM3_SYS_CTRL_BASE	(VA_SPEAR3XX_ICM3_SMI_CTRL_BASE | SPEAR3XX_ICM3_SYS_CTRL_BASE)
-#define SPEAR3XX_ICM3_MISC_REG_BASE	UL(0xFCA80000)
-#define VA_SPEAR3XX_ICM3_MISC_REG_BASE	(VA_SPEAR3XX_ICM3_SMI_CTRL_BASE | SPEAR3XX_ICM3_MISC_REG_BASE)
+#define SPEAR_ICM3_SMI_CTRL_BASE	UL(0xFC000000)
+#define VA_SPEAR_ICM3_SMI_CTRL_BASE	UL(0xFC000000)
+#define SPEAR_ICM3_DMA_BASE		UL(0xFC400000)
+#define SPEAR_ICM3_SYS_CTRL_BASE	UL(0xFCA00000)
+#define VA_SPEAR_ICM3_SYS_CTRL_BASE	(VA_SPEAR_ICM3_SMI_CTRL_BASE | SPEAR_ICM3_SYS_CTRL_BASE)
+#define SPEAR_ICM3_MISC_REG_BASE	UL(0xFCA80000)
+#define VA_SPEAR_ICM3_MISC_REG_BASE	(VA_SPEAR_ICM3_SMI_CTRL_BASE | SPEAR_ICM3_MISC_REG_BASE)
 
 /* Debug uart for linux, will be used for debug and uncompress messages */
-#define SPEAR_DBG_UART_BASE		SPEAR3XX_ICM1_UART_BASE
-#define VA_SPEAR_DBG_UART_BASE		VA_SPEAR3XX_ICM1_UART_BASE
+#define SPEAR_DBG_UART_BASE		SPEAR_ICM1_UART_BASE
+#define VA_SPEAR_DBG_UART_BASE		VA_SPEAR_ICM1_UART_BASE
 
 /* Sysctl base for spear platform */
-#define SPEAR_SYS_CTRL_BASE		SPEAR3XX_ICM3_SYS_CTRL_BASE
-#define VA_SPEAR_SYS_CTRL_BASE		VA_SPEAR3XX_ICM3_SYS_CTRL_BASE
+#define SPEAR_SYS_CTRL_BASE		SPEAR_ICM3_SYS_CTRL_BASE
+#define VA_SPEAR_SYS_CTRL_BASE		VA_SPEAR_ICM3_SYS_CTRL_BASE
 
 /* SPEAr320 Macros */
 #define SPEAR320_SOC_CONFIG_BASE	UL(0xB3000000)
@@ -57,4 +56,4 @@
 	#define SPEAR320_UART6_PCLK_SHIFT		12
 	#define SPEAR320_RS485_PCLK_SHIFT		13
 
-#endif /* __MACH_SPEAR3XX_H */
+#endif /* __MACH_SPEAR_H */
diff --git a/arch/arm/mach-spear3xx/spear300.c b/arch/arm/mach-spear3xx/spear300.c
index bbc9b7e..72449ee 100644
--- a/arch/arm/mach-spear3xx/spear300.c
+++ b/arch/arm/mach-spear3xx/spear300.c
@@ -185,7 +185,7 @@ struct pl08x_channel_data spear300_dma_info[] = {
 static struct of_dev_auxdata spear300_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE, NULL,
 			&pl022_plat_data),
-	OF_DEV_AUXDATA("arm,pl080", SPEAR3XX_ICM3_DMA_BASE, NULL,
+	OF_DEV_AUXDATA("arm,pl080", SPEAR_ICM3_DMA_BASE, NULL,
 			&pl080_plat_data),
 	{}
 };
diff --git a/arch/arm/mach-spear3xx/spear310.c b/arch/arm/mach-spear3xx/spear310.c
index c13a434..0b7962d 100644
--- a/arch/arm/mach-spear3xx/spear310.c
+++ b/arch/arm/mach-spear3xx/spear310.c
@@ -217,7 +217,7 @@ static struct amba_pl011_data spear310_uart_data[] = {
 static struct of_dev_auxdata spear310_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE, NULL,
 			&pl022_plat_data),
-	OF_DEV_AUXDATA("arm,pl080", SPEAR3XX_ICM3_DMA_BASE, NULL,
+	OF_DEV_AUXDATA("arm,pl080", SPEAR_ICM3_DMA_BASE, NULL,
 			&pl080_plat_data),
 	OF_DEV_AUXDATA("arm,pl011", SPEAR310_UART1_BASE, NULL,
 			&spear310_uart_data[0]),
diff --git a/arch/arm/mach-spear3xx/spear320.c b/arch/arm/mach-spear3xx/spear320.c
index f671a0a..e9db7db 100644
--- a/arch/arm/mach-spear3xx/spear320.c
+++ b/arch/arm/mach-spear3xx/spear320.c
@@ -223,7 +223,7 @@ static struct amba_pl011_data spear320_uart_data[] = {
 static struct of_dev_auxdata spear320_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE, NULL,
 			&pl022_plat_data),
-	OF_DEV_AUXDATA("arm,pl080", SPEAR3XX_ICM3_DMA_BASE, NULL,
+	OF_DEV_AUXDATA("arm,pl080", SPEAR_ICM3_DMA_BASE, NULL,
 			&pl080_plat_data),
 	OF_DEV_AUXDATA("arm,pl022", SPEAR320_SSP0_BASE, NULL,
 			&spear320_ssp_data[0]),
diff --git a/arch/arm/mach-spear3xx/spear3xx.c b/arch/arm/mach-spear3xx/spear3xx.c
index 72e3ae7..d7580f2 100644
--- a/arch/arm/mach-spear3xx/spear3xx.c
+++ b/arch/arm/mach-spear3xx/spear3xx.c
@@ -67,13 +67,13 @@ struct pl08x_platform_data pl080_plat_data = {
  */
 struct map_desc spear3xx_io_desc[] __initdata = {
 	{
-		.virtual	= VA_SPEAR3XX_ICM1_2_BASE,
-		.pfn		= __phys_to_pfn(SPEAR3XX_ICM1_2_BASE),
+		.virtual	= VA_SPEAR_ICM1_2_BASE,
+		.pfn		= __phys_to_pfn(SPEAR_ICM1_2_BASE),
 		.length		= SZ_16M,
 		.type		= MT_DEVICE
 	}, {
-		.virtual	= VA_SPEAR3XX_ICM3_SMI_CTRL_BASE,
-		.pfn		= __phys_to_pfn(SPEAR3XX_ICM3_SMI_CTRL_BASE),
+		.virtual	= VA_SPEAR_ICM3_SMI_CTRL_BASE,
+		.pfn		= __phys_to_pfn(SPEAR_ICM3_SMI_CTRL_BASE),
 		.length		= SZ_16M,
 		.type		= MT_DEVICE
 	},
diff --git a/arch/arm/mach-spear6xx/include/mach/misc_regs.h b/arch/arm/mach-spear6xx/include/mach/misc_regs.h
index c34acc2..28aa508 100644
--- a/arch/arm/mach-spear6xx/include/mach/misc_regs.h
+++ b/arch/arm/mach-spear6xx/include/mach/misc_regs.h
@@ -16,7 +16,7 @@
 
 #include <mach/spear.h>
 
-#define MISC_BASE		IOMEM(VA_SPEAR6XX_ICM3_MISC_REG_BASE)
+#define MISC_BASE		IOMEM(VA_SPEAR_ICM3_MISC_REG_BASE)
 #define DMA_CHN_CFG		(MISC_BASE + 0x0A0)
 
 #endif /* __MACH_MISC_REGS_H */
diff --git a/arch/arm/mach-spear6xx/include/mach/spear.h b/arch/arm/mach-spear6xx/include/mach/spear.h
index cb8ed2f..ee5a774 100644
--- a/arch/arm/mach-spear6xx/include/mach/spear.h
+++ b/arch/arm/mach-spear6xx/include/mach/spear.h
@@ -1,46 +1,59 @@
 /*
- * arch/arm/mach-spear6xx/include/mach/spear.h
+ * SPEAr3xx/6xx Machine family specific definition
  *
- * SPEAr6xx Machine family specific definition
- *
- * Copyright (C) 2009 ST Microelectronics
+ * Copyright (C) 2009,2012 ST Microelectronics
  * Rajeev Kumar<rajeev-dlh.kumar@st.com>
+ * Viresh Kumar <viresh.linux@gmail.com>
  *
  * This file is licensed under the terms of the GNU General Public
  * License version 2. This program is licensed "as is" without any
  * warranty of any kind, whether express or implied.
  */
 
-#ifndef __MACH_SPEAR6XX_H
-#define __MACH_SPEAR6XX_H
+#ifndef __MACH_SPEAR_H
+#define __MACH_SPEAR_H
 
 #include <asm/memory.h>
 
 /* ICM1 - Low speed connection */
-#define SPEAR6XX_ICM1_BASE		UL(0xD0000000)
-#define VA_SPEAR6XX_ICM1_BASE		UL(0xFD000000)
-#define SPEAR6XX_ICM1_UART0_BASE	UL(0xD0000000)
-#define VA_SPEAR6XX_ICM1_UART0_BASE	(VA_SPEAR6XX_ICM1_2_BASE | SPEAR6XX_ICM1_UART0_BASE)
+#define SPEAR_ICM1_2_BASE		UL(0xD0000000)
+#define VA_SPEAR_ICM1_2_BASE		UL(0xFD000000)
+#define SPEAR_ICM1_UART_BASE		UL(0xD0000000)
+#define VA_SPEAR_ICM1_UART_BASE		(VA_SPEAR_ICM1_2_BASE | SPEAR_ICM1_UART_BASE)
+#define SPEAR3XX_ICM1_SSP_BASE		UL(0xD0100000)
 
 /* ML-1, 2 - Multi Layer CPU Subsystem */
-#define SPEAR6XX_ML_CPU_BASE		UL(0xF0000000)
+#define SPEAR_ICM3_ML1_2_BASE		UL(0xF0000000)
 #define VA_SPEAR6XX_ML_CPU_BASE		UL(0xF0000000)
 
 /* ICM3 - Basic Subsystem */
-#define SPEAR6XX_ICM3_SMI_CTRL_BASE	UL(0xFC000000)
-#define VA_SPEAR6XX_ICM3_SMI_CTRL_BASE	UL(0xFC000000)
-#define SPEAR6XX_ICM3_DMA_BASE		UL(0xFC400000)
-#define SPEAR6XX_ICM3_SYS_CTRL_BASE	UL(0xFCA00000)
-#define VA_SPEAR6XX_ICM3_SYS_CTRL_BASE	(VA_SPEAR6XX_ICM3_SMI_CTRL_BASE | SPEAR6XX_ICM3_SYS_CTRL_BASE)
-#define SPEAR6XX_ICM3_MISC_REG_BASE	UL(0xFCA80000)
-#define VA_SPEAR6XX_ICM3_MISC_REG_BASE	(VA_SPEAR6XX_ICM3_SMI_CTRL_BASE | SPEAR6XX_ICM3_MISC_REG_BASE)
+#define SPEAR_ICM3_SMI_CTRL_BASE	UL(0xFC000000)
+#define VA_SPEAR_ICM3_SMI_CTRL_BASE	UL(0xFC000000)
+#define SPEAR_ICM3_DMA_BASE		UL(0xFC400000)
+#define SPEAR_ICM3_SYS_CTRL_BASE	UL(0xFCA00000)
+#define VA_SPEAR_ICM3_SYS_CTRL_BASE	(VA_SPEAR_ICM3_SMI_CTRL_BASE | SPEAR_ICM3_SYS_CTRL_BASE)
+#define SPEAR_ICM3_MISC_REG_BASE	UL(0xFCA80000)
+#define VA_SPEAR_ICM3_MISC_REG_BASE	(VA_SPEAR_ICM3_SMI_CTRL_BASE | SPEAR_ICM3_MISC_REG_BASE)
 
 /* Debug uart for linux, will be used for debug and uncompress messages */
-#define SPEAR_DBG_UART_BASE		SPEAR6XX_ICM1_UART0_BASE
-#define VA_SPEAR_DBG_UART_BASE		VA_SPEAR6XX_ICM1_UART0_BASE
+#define SPEAR_DBG_UART_BASE		SPEAR_ICM1_UART_BASE
+#define VA_SPEAR_DBG_UART_BASE		VA_SPEAR_ICM1_UART_BASE
 
 /* Sysctl base for spear platform */
-#define SPEAR_SYS_CTRL_BASE		SPEAR6XX_ICM3_SYS_CTRL_BASE
-#define VA_SPEAR_SYS_CTRL_BASE		VA_SPEAR6XX_ICM3_SYS_CTRL_BASE
-
-#endif /* __MACH_SPEAR6XX_H */
+#define SPEAR_SYS_CTRL_BASE		SPEAR_ICM3_SYS_CTRL_BASE
+#define VA_SPEAR_SYS_CTRL_BASE		VA_SPEAR_ICM3_SYS_CTRL_BASE
+
+/* SPEAr320 Macros */
+#define SPEAR320_SOC_CONFIG_BASE	UL(0xB3000000)
+#define VA_SPEAR320_SOC_CONFIG_BASE	UL(0xFE000000)
+#define SPEAR320_CONTROL_REG		IOMEM(VA_SPEAR320_SOC_CONFIG_BASE)
+#define SPEAR320_EXT_CTRL_REG		IOMEM(VA_SPEAR320_SOC_CONFIG_BASE + 0x0018)
+	#define SPEAR320_UARTX_PCLK_MASK		0x1
+	#define SPEAR320_UART2_PCLK_SHIFT		8
+	#define SPEAR320_UART3_PCLK_SHIFT		9
+	#define SPEAR320_UART4_PCLK_SHIFT		10
+	#define SPEAR320_UART5_PCLK_SHIFT		11
+	#define SPEAR320_UART6_PCLK_SHIFT		12
+	#define SPEAR320_RS485_PCLK_SHIFT		13
+
+#endif /* __MACH_SPEAR_H */
diff --git a/arch/arm/mach-spear6xx/spear6xx.c b/arch/arm/mach-spear6xx/spear6xx.c
index 8904d8a..97fb31d 100644
--- a/arch/arm/mach-spear6xx/spear6xx.c
+++ b/arch/arm/mach-spear6xx/spear6xx.c
@@ -351,17 +351,17 @@ struct pl08x_platform_data pl080_plat_data = {
 struct map_desc spear6xx_io_desc[] __initdata = {
 	{
 		.virtual	= VA_SPEAR6XX_ML_CPU_BASE,
-		.pfn		= __phys_to_pfn(SPEAR6XX_ML_CPU_BASE),
+		.pfn		= __phys_to_pfn(SPEAR_ICM3_ML1_2_BASE),
 		.length		= 2 * SZ_16M,
 		.type		= MT_DEVICE
 	},	{
-		.virtual	= VA_SPEAR6XX_ICM1_BASE,
-		.pfn		= __phys_to_pfn(SPEAR6XX_ICM1_BASE),
+		.virtual	= VA_SPEAR_ICM1_2_BASE,
+		.pfn		= __phys_to_pfn(SPEAR_ICM1_2_BASE),
 		.length		= SZ_16M,
 		.type		= MT_DEVICE
 	}, {
-		.virtual	= VA_SPEAR6XX_ICM3_SMI_CTRL_BASE,
-		.pfn		= __phys_to_pfn(SPEAR6XX_ICM3_SMI_CTRL_BASE),
+		.virtual	= VA_SPEAR_ICM3_SMI_CTRL_BASE,
+		.pfn		= __phys_to_pfn(SPEAR_ICM3_SMI_CTRL_BASE),
 		.length		= SZ_16M,
 		.type		= MT_DEVICE
 	},
@@ -404,7 +404,7 @@ void __init spear6xx_timer_init(void)
 
 /* Add auxdata to pass platform data */
 struct of_dev_auxdata spear6xx_auxdata_lookup[] __initdata = {
-	OF_DEV_AUXDATA("arm,pl080", SPEAR6XX_ICM3_DMA_BASE, NULL,
+	OF_DEV_AUXDATA("arm,pl080", SPEAR_ICM3_DMA_BASE, NULL,
 			&pl080_plat_data),
 	{}
 };
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 05/13] ARM: spear: merge Kconfig files
  2013-03-12 16:46 [PATCH v2 00/13] ARM: spear multiplatform support Arnd Bergmann
                   ` (3 preceding siblings ...)
  2013-03-12 16:46 ` [PATCH v2 04/13] ARM: spear: make spear3xx/6xx mach/spear.h files identical Arnd Bergmann
@ 2013-03-12 16:46 ` Arnd Bergmann
  2013-03-12 16:46 ` [PATCH v2 06/13] ARM: spear: move spear.h and misc_regs.h into plat-spear Arnd Bergmann
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2013-03-12 16:46 UTC (permalink / raw)
  To: linux-arm-kernel

As a preparation to merging the spear platforms into one directory, this
merges the four Kconfig files into one.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-spear13xx/Kconfig | 20 ----------------
 arch/arm/mach-spear3xx/Kconfig  | 26 ---------------------
 arch/arm/mach-spear6xx/Kconfig  | 10 --------
 arch/arm/plat-spear/Kconfig     | 51 +++++++++++++++++++++++++++++++++++++----
 4 files changed, 47 insertions(+), 60 deletions(-)
 delete mode 100644 arch/arm/mach-spear13xx/Kconfig
 delete mode 100644 arch/arm/mach-spear3xx/Kconfig
 delete mode 100644 arch/arm/mach-spear6xx/Kconfig

diff --git a/arch/arm/mach-spear13xx/Kconfig b/arch/arm/mach-spear13xx/Kconfig
deleted file mode 100644
index eaadc66..0000000
--- a/arch/arm/mach-spear13xx/Kconfig
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# SPEAr13XX Machine configuration file
-#
-
-if ARCH_SPEAR13XX
-
-menu "SPEAr13xx Implementations"
-config MACH_SPEAR1310
-	bool "SPEAr1310 Machine support with Device Tree"
-	select PINCTRL_SPEAR1310
-	help
-	  Supports ST SPEAr1310 machine configured via the device-tree
-
-config MACH_SPEAR1340
-	bool "SPEAr1340 Machine support with Device Tree"
-	select PINCTRL_SPEAR1340
-	help
-	  Supports ST SPEAr1340 machine configured via the device-tree
-endmenu
-endif #ARCH_SPEAR13XX
diff --git a/arch/arm/mach-spear3xx/Kconfig b/arch/arm/mach-spear3xx/Kconfig
deleted file mode 100644
index 8bd3729..0000000
--- a/arch/arm/mach-spear3xx/Kconfig
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# SPEAr3XX Machine configuration file
-#
-
-if ARCH_SPEAR3XX
-
-menu "SPEAr3xx Implementations"
-config MACH_SPEAR300
-	bool "SPEAr300 Machine support with Device Tree"
-	select PINCTRL_SPEAR300
-	help
-	  Supports ST SPEAr300 machine configured via the device-tree
-
-config MACH_SPEAR310
-	bool "SPEAr310 Machine support with Device Tree"
-	select PINCTRL_SPEAR310
-	help
-	  Supports ST SPEAr310 machine configured via the device-tree
-
-config MACH_SPEAR320
-	bool "SPEAr320 Machine support with Device Tree"
-	select PINCTRL_SPEAR320
-	help
-	  Supports ST SPEAr320 machine configured via the device-tree
-endmenu
-endif #ARCH_SPEAR3XX
diff --git a/arch/arm/mach-spear6xx/Kconfig b/arch/arm/mach-spear6xx/Kconfig
deleted file mode 100644
index 339f397..0000000
--- a/arch/arm/mach-spear6xx/Kconfig
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# SPEAr6XX Machine configuration file
-#
-
-config MACH_SPEAR600
-	def_bool y
-	depends on ARCH_SPEAR6XX
-	select USE_OF
-	help
-	  Supports ST SPEAr600 boards configured via the device-tree
diff --git a/arch/arm/plat-spear/Kconfig b/arch/arm/plat-spear/Kconfig
index 739d016..e288df9 100644
--- a/arch/arm/plat-spear/Kconfig
+++ b/arch/arm/plat-spear/Kconfig
@@ -39,9 +39,52 @@ config ARCH_SPEAR6XX
 
 endchoice
 
-# Adding SPEAr machine specific configuration files
-source "arch/arm/mach-spear13xx/Kconfig"
-source "arch/arm/mach-spear3xx/Kconfig"
-source "arch/arm/mach-spear6xx/Kconfig"
+if ARCH_SPEAR13XX
+
+menu "SPEAr13xx Implementations"
+config MACH_SPEAR1310
+	bool "SPEAr1310 Machine support with Device Tree"
+	select PINCTRL_SPEAR1310
+	help
+	  Supports ST SPEAr1310 machine configured via the device-tree
+
+config MACH_SPEAR1340
+	bool "SPEAr1340 Machine support with Device Tree"
+	select PINCTRL_SPEAR1340
+	help
+	  Supports ST SPEAr1340 machine configured via the device-tree
+endmenu
+endif #ARCH_SPEAR13XX
+
+if ARCH_SPEAR3XX
+
+menu "SPEAr3xx Implementations"
+config MACH_SPEAR300
+	bool "SPEAr300 Machine support with Device Tree"
+	select PINCTRL_SPEAR300
+	help
+	  Supports ST SPEAr300 machine configured via the device-tree
+
+config MACH_SPEAR310
+	bool "SPEAr310 Machine support with Device Tree"
+	select PINCTRL_SPEAR310
+	help
+	  Supports ST SPEAr310 machine configured via the device-tree
+
+config MACH_SPEAR320
+	bool "SPEAr320 Machine support with Device Tree"
+	select PINCTRL_SPEAR320
+	help
+	  Supports ST SPEAr320 machine configured via the device-tree
+endmenu
+
+endif
+
+config MACH_SPEAR600
+	def_bool y
+	depends on ARCH_SPEAR6XX
+	select USE_OF
+	help
+	  Supports ST SPEAr600 boards configured via the device-treesource "arch/arm/mach-spear6xx/Kconfig"
 
 endif
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 06/13] ARM: spear: move spear.h and misc_regs.h into plat-spear
  2013-03-12 16:46 [PATCH v2 00/13] ARM: spear multiplatform support Arnd Bergmann
                   ` (4 preceding siblings ...)
  2013-03-12 16:46 ` [PATCH v2 05/13] ARM: spear: merge Kconfig files Arnd Bergmann
@ 2013-03-12 16:46 ` Arnd Bergmann
  2013-03-12 16:46 ` [PATCH v2 08/13] ARM: spear: move generic.h and pl080.h into private dir Arnd Bergmann
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2013-03-12 16:46 UTC (permalink / raw)
  To: linux-arm-kernel

The spear13xx version of spear.h is completely different from
the newly combined spear3xx/spear6xx version, but we can never
build ARMv5 and ARMv7 platforms together, so there is no
harm in putting all the contents into a single file and adding
appropriate ifdefs.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-spear13xx/include/mach/spear.h    |  54 -------------
 arch/arm/mach-spear3xx/include/mach/misc_regs.h |  22 ------
 arch/arm/mach-spear3xx/include/mach/spear.h     |  59 --------------
 arch/arm/mach-spear6xx/include/mach/misc_regs.h |  22 ------
 arch/arm/mach-spear6xx/include/mach/spear.h     |  59 --------------
 arch/arm/plat-spear/include/mach/misc_regs.h    |  22 ++++++
 arch/arm/plat-spear/include/mach/spear.h        | 101 ++++++++++++++++++++++++
 7 files changed, 123 insertions(+), 216 deletions(-)
 delete mode 100644 arch/arm/mach-spear13xx/include/mach/spear.h
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/misc_regs.h
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/spear.h
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/misc_regs.h
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/spear.h
 create mode 100644 arch/arm/plat-spear/include/mach/misc_regs.h
 create mode 100644 arch/arm/plat-spear/include/mach/spear.h

diff --git a/arch/arm/mach-spear13xx/include/mach/spear.h b/arch/arm/mach-spear13xx/include/mach/spear.h
deleted file mode 100644
index 7cfa681..0000000
--- a/arch/arm/mach-spear13xx/include/mach/spear.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * arch/arm/mach-spear13xx/include/mach/spear.h
- *
- * spear13xx Machine family specific definition
- *
- * Copyright (C) 2012 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_SPEAR13XX_H
-#define __MACH_SPEAR13XX_H
-
-#include <asm/memory.h>
-
-#define PERIP_GRP2_BASE				UL(0xB3000000)
-#define VA_PERIP_GRP2_BASE			IOMEM(0xFE000000)
-#define MCIF_SDHCI_BASE				UL(0xB3000000)
-#define SYSRAM0_BASE				UL(0xB3800000)
-#define VA_SYSRAM0_BASE				IOMEM(0xFE800000)
-#define SYS_LOCATION				(VA_SYSRAM0_BASE + 0x600)
-
-#define PERIP_GRP1_BASE				UL(0xE0000000)
-#define VA_PERIP_GRP1_BASE			IOMEM(0xFD000000)
-#define UART_BASE				UL(0xE0000000)
-#define VA_UART_BASE				IOMEM(0xFD000000)
-#define SSP_BASE				UL(0xE0100000)
-#define MISC_BASE				UL(0xE0700000)
-#define VA_MISC_BASE				IOMEM(0xFD700000)
-
-#define A9SM_AND_MPMC_BASE			UL(0xEC000000)
-#define VA_A9SM_AND_MPMC_BASE			IOMEM(0xFC000000)
-
-/* A9SM peripheral offsets */
-#define A9SM_PERIP_BASE				UL(0xEC800000)
-#define VA_A9SM_PERIP_BASE			IOMEM(0xFC800000)
-#define VA_SCU_BASE				(VA_A9SM_PERIP_BASE + 0x00)
-
-#define L2CC_BASE				UL(0xED000000)
-#define VA_L2CC_BASE				IOMEM(UL(0xFB000000))
-
-/* others */
-#define DMAC0_BASE				UL(0xEA800000)
-#define DMAC1_BASE				UL(0xEB000000)
-#define MCIF_CF_BASE				UL(0xB2800000)
-
-/* Debug uart for linux, will be used for debug and uncompress messages */
-#define SPEAR_DBG_UART_BASE			UART_BASE
-#define VA_SPEAR_DBG_UART_BASE			VA_UART_BASE
-
-#endif /* __MACH_SPEAR13XX_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/misc_regs.h b/arch/arm/mach-spear3xx/include/mach/misc_regs.h
deleted file mode 100644
index 075812c..0000000
--- a/arch/arm/mach-spear3xx/include/mach/misc_regs.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * arch/arm/mach-spear3xx/include/mach/misc_regs.h
- *
- * Miscellaneous registers definitions for SPEAr3xx machine family
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_MISC_REGS_H
-#define __MACH_MISC_REGS_H
-
-#include <mach/spear.h>
-
-#define MISC_BASE		IOMEM(VA_SPEAR_ICM3_MISC_REG_BASE)
-#define DMA_CHN_CFG		(MISC_BASE + 0x0A0)
-
-#endif /* __MACH_MISC_REGS_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/spear.h b/arch/arm/mach-spear3xx/include/mach/spear.h
deleted file mode 100644
index ee5a774..0000000
--- a/arch/arm/mach-spear3xx/include/mach/spear.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * SPEAr3xx/6xx Machine family specific definition
- *
- * Copyright (C) 2009,2012 ST Microelectronics
- * Rajeev Kumar<rajeev-dlh.kumar@st.com>
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_SPEAR_H
-#define __MACH_SPEAR_H
-
-#include <asm/memory.h>
-
-/* ICM1 - Low speed connection */
-#define SPEAR_ICM1_2_BASE		UL(0xD0000000)
-#define VA_SPEAR_ICM1_2_BASE		UL(0xFD000000)
-#define SPEAR_ICM1_UART_BASE		UL(0xD0000000)
-#define VA_SPEAR_ICM1_UART_BASE		(VA_SPEAR_ICM1_2_BASE | SPEAR_ICM1_UART_BASE)
-#define SPEAR3XX_ICM1_SSP_BASE		UL(0xD0100000)
-
-/* ML-1, 2 - Multi Layer CPU Subsystem */
-#define SPEAR_ICM3_ML1_2_BASE		UL(0xF0000000)
-#define VA_SPEAR6XX_ML_CPU_BASE		UL(0xF0000000)
-
-/* ICM3 - Basic Subsystem */
-#define SPEAR_ICM3_SMI_CTRL_BASE	UL(0xFC000000)
-#define VA_SPEAR_ICM3_SMI_CTRL_BASE	UL(0xFC000000)
-#define SPEAR_ICM3_DMA_BASE		UL(0xFC400000)
-#define SPEAR_ICM3_SYS_CTRL_BASE	UL(0xFCA00000)
-#define VA_SPEAR_ICM3_SYS_CTRL_BASE	(VA_SPEAR_ICM3_SMI_CTRL_BASE | SPEAR_ICM3_SYS_CTRL_BASE)
-#define SPEAR_ICM3_MISC_REG_BASE	UL(0xFCA80000)
-#define VA_SPEAR_ICM3_MISC_REG_BASE	(VA_SPEAR_ICM3_SMI_CTRL_BASE | SPEAR_ICM3_MISC_REG_BASE)
-
-/* Debug uart for linux, will be used for debug and uncompress messages */
-#define SPEAR_DBG_UART_BASE		SPEAR_ICM1_UART_BASE
-#define VA_SPEAR_DBG_UART_BASE		VA_SPEAR_ICM1_UART_BASE
-
-/* Sysctl base for spear platform */
-#define SPEAR_SYS_CTRL_BASE		SPEAR_ICM3_SYS_CTRL_BASE
-#define VA_SPEAR_SYS_CTRL_BASE		VA_SPEAR_ICM3_SYS_CTRL_BASE
-
-/* SPEAr320 Macros */
-#define SPEAR320_SOC_CONFIG_BASE	UL(0xB3000000)
-#define VA_SPEAR320_SOC_CONFIG_BASE	UL(0xFE000000)
-#define SPEAR320_CONTROL_REG		IOMEM(VA_SPEAR320_SOC_CONFIG_BASE)
-#define SPEAR320_EXT_CTRL_REG		IOMEM(VA_SPEAR320_SOC_CONFIG_BASE + 0x0018)
-	#define SPEAR320_UARTX_PCLK_MASK		0x1
-	#define SPEAR320_UART2_PCLK_SHIFT		8
-	#define SPEAR320_UART3_PCLK_SHIFT		9
-	#define SPEAR320_UART4_PCLK_SHIFT		10
-	#define SPEAR320_UART5_PCLK_SHIFT		11
-	#define SPEAR320_UART6_PCLK_SHIFT		12
-	#define SPEAR320_RS485_PCLK_SHIFT		13
-
-#endif /* __MACH_SPEAR_H */
diff --git a/arch/arm/mach-spear6xx/include/mach/misc_regs.h b/arch/arm/mach-spear6xx/include/mach/misc_regs.h
deleted file mode 100644
index 28aa508..0000000
--- a/arch/arm/mach-spear6xx/include/mach/misc_regs.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * arch/arm/mach-spear6xx/include/mach/misc_regs.h
- *
- * Miscellaneous registers definitions for SPEAr6xx machine family
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_MISC_REGS_H
-#define __MACH_MISC_REGS_H
-
-#include <mach/spear.h>
-
-#define MISC_BASE		IOMEM(VA_SPEAR_ICM3_MISC_REG_BASE)
-#define DMA_CHN_CFG		(MISC_BASE + 0x0A0)
-
-#endif /* __MACH_MISC_REGS_H */
diff --git a/arch/arm/mach-spear6xx/include/mach/spear.h b/arch/arm/mach-spear6xx/include/mach/spear.h
deleted file mode 100644
index ee5a774..0000000
--- a/arch/arm/mach-spear6xx/include/mach/spear.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * SPEAr3xx/6xx Machine family specific definition
- *
- * Copyright (C) 2009,2012 ST Microelectronics
- * Rajeev Kumar<rajeev-dlh.kumar@st.com>
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_SPEAR_H
-#define __MACH_SPEAR_H
-
-#include <asm/memory.h>
-
-/* ICM1 - Low speed connection */
-#define SPEAR_ICM1_2_BASE		UL(0xD0000000)
-#define VA_SPEAR_ICM1_2_BASE		UL(0xFD000000)
-#define SPEAR_ICM1_UART_BASE		UL(0xD0000000)
-#define VA_SPEAR_ICM1_UART_BASE		(VA_SPEAR_ICM1_2_BASE | SPEAR_ICM1_UART_BASE)
-#define SPEAR3XX_ICM1_SSP_BASE		UL(0xD0100000)
-
-/* ML-1, 2 - Multi Layer CPU Subsystem */
-#define SPEAR_ICM3_ML1_2_BASE		UL(0xF0000000)
-#define VA_SPEAR6XX_ML_CPU_BASE		UL(0xF0000000)
-
-/* ICM3 - Basic Subsystem */
-#define SPEAR_ICM3_SMI_CTRL_BASE	UL(0xFC000000)
-#define VA_SPEAR_ICM3_SMI_CTRL_BASE	UL(0xFC000000)
-#define SPEAR_ICM3_DMA_BASE		UL(0xFC400000)
-#define SPEAR_ICM3_SYS_CTRL_BASE	UL(0xFCA00000)
-#define VA_SPEAR_ICM3_SYS_CTRL_BASE	(VA_SPEAR_ICM3_SMI_CTRL_BASE | SPEAR_ICM3_SYS_CTRL_BASE)
-#define SPEAR_ICM3_MISC_REG_BASE	UL(0xFCA80000)
-#define VA_SPEAR_ICM3_MISC_REG_BASE	(VA_SPEAR_ICM3_SMI_CTRL_BASE | SPEAR_ICM3_MISC_REG_BASE)
-
-/* Debug uart for linux, will be used for debug and uncompress messages */
-#define SPEAR_DBG_UART_BASE		SPEAR_ICM1_UART_BASE
-#define VA_SPEAR_DBG_UART_BASE		VA_SPEAR_ICM1_UART_BASE
-
-/* Sysctl base for spear platform */
-#define SPEAR_SYS_CTRL_BASE		SPEAR_ICM3_SYS_CTRL_BASE
-#define VA_SPEAR_SYS_CTRL_BASE		VA_SPEAR_ICM3_SYS_CTRL_BASE
-
-/* SPEAr320 Macros */
-#define SPEAR320_SOC_CONFIG_BASE	UL(0xB3000000)
-#define VA_SPEAR320_SOC_CONFIG_BASE	UL(0xFE000000)
-#define SPEAR320_CONTROL_REG		IOMEM(VA_SPEAR320_SOC_CONFIG_BASE)
-#define SPEAR320_EXT_CTRL_REG		IOMEM(VA_SPEAR320_SOC_CONFIG_BASE + 0x0018)
-	#define SPEAR320_UARTX_PCLK_MASK		0x1
-	#define SPEAR320_UART2_PCLK_SHIFT		8
-	#define SPEAR320_UART3_PCLK_SHIFT		9
-	#define SPEAR320_UART4_PCLK_SHIFT		10
-	#define SPEAR320_UART5_PCLK_SHIFT		11
-	#define SPEAR320_UART6_PCLK_SHIFT		12
-	#define SPEAR320_RS485_PCLK_SHIFT		13
-
-#endif /* __MACH_SPEAR_H */
diff --git a/arch/arm/plat-spear/include/mach/misc_regs.h b/arch/arm/plat-spear/include/mach/misc_regs.h
new file mode 100644
index 0000000..075812c
--- /dev/null
+++ b/arch/arm/plat-spear/include/mach/misc_regs.h
@@ -0,0 +1,22 @@
+/*
+ * arch/arm/mach-spear3xx/include/mach/misc_regs.h
+ *
+ * Miscellaneous registers definitions for SPEAr3xx machine family
+ *
+ * Copyright (C) 2009 ST Microelectronics
+ * Viresh Kumar <viresh.linux@gmail.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef __MACH_MISC_REGS_H
+#define __MACH_MISC_REGS_H
+
+#include <mach/spear.h>
+
+#define MISC_BASE		IOMEM(VA_SPEAR_ICM3_MISC_REG_BASE)
+#define DMA_CHN_CFG		(MISC_BASE + 0x0A0)
+
+#endif /* __MACH_MISC_REGS_H */
diff --git a/arch/arm/plat-spear/include/mach/spear.h b/arch/arm/plat-spear/include/mach/spear.h
new file mode 100644
index 0000000..2198ab9
--- /dev/null
+++ b/arch/arm/plat-spear/include/mach/spear.h
@@ -0,0 +1,101 @@
+/*
+ * SPEAr3xx/6xx Machine family specific definition
+ *
+ * Copyright (C) 2009,2012 ST Microelectronics
+ * Rajeev Kumar<rajeev-dlh.kumar@st.com>
+ * Viresh Kumar <viresh.linux@gmail.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef __MACH_SPEAR_H
+#define __MACH_SPEAR_H
+
+#include <asm/memory.h>
+
+#if defined(CONFIG_ARCH_SPEAR3XX) || defined (CONFIG_ARCH_SPEAR6XX)
+
+/* ICM1 - Low speed connection */
+#define SPEAR_ICM1_2_BASE		UL(0xD0000000)
+#define VA_SPEAR_ICM1_2_BASE		UL(0xFD000000)
+#define SPEAR_ICM1_UART_BASE		UL(0xD0000000)
+#define VA_SPEAR_ICM1_UART_BASE		(VA_SPEAR_ICM1_2_BASE | SPEAR_ICM1_UART_BASE)
+#define SPEAR3XX_ICM1_SSP_BASE		UL(0xD0100000)
+
+/* ML-1, 2 - Multi Layer CPU Subsystem */
+#define SPEAR_ICM3_ML1_2_BASE		UL(0xF0000000)
+#define VA_SPEAR6XX_ML_CPU_BASE		UL(0xF0000000)
+
+/* ICM3 - Basic Subsystem */
+#define SPEAR_ICM3_SMI_CTRL_BASE	UL(0xFC000000)
+#define VA_SPEAR_ICM3_SMI_CTRL_BASE	UL(0xFC000000)
+#define SPEAR_ICM3_DMA_BASE		UL(0xFC400000)
+#define SPEAR_ICM3_SYS_CTRL_BASE	UL(0xFCA00000)
+#define VA_SPEAR_ICM3_SYS_CTRL_BASE	(VA_SPEAR_ICM3_SMI_CTRL_BASE | SPEAR_ICM3_SYS_CTRL_BASE)
+#define SPEAR_ICM3_MISC_REG_BASE	UL(0xFCA80000)
+#define VA_SPEAR_ICM3_MISC_REG_BASE	(VA_SPEAR_ICM3_SMI_CTRL_BASE | SPEAR_ICM3_MISC_REG_BASE)
+
+/* Debug uart for linux, will be used for debug and uncompress messages */
+#define SPEAR_DBG_UART_BASE		SPEAR_ICM1_UART_BASE
+#define VA_SPEAR_DBG_UART_BASE		VA_SPEAR_ICM1_UART_BASE
+
+/* Sysctl base for spear platform */
+#define SPEAR_SYS_CTRL_BASE		SPEAR_ICM3_SYS_CTRL_BASE
+#define VA_SPEAR_SYS_CTRL_BASE		VA_SPEAR_ICM3_SYS_CTRL_BASE
+
+/* SPEAr320 Macros */
+#define SPEAR320_SOC_CONFIG_BASE	UL(0xB3000000)
+#define VA_SPEAR320_SOC_CONFIG_BASE	UL(0xFE000000)
+#define SPEAR320_CONTROL_REG		IOMEM(VA_SPEAR320_SOC_CONFIG_BASE)
+#define SPEAR320_EXT_CTRL_REG		IOMEM(VA_SPEAR320_SOC_CONFIG_BASE + 0x0018)
+	#define SPEAR320_UARTX_PCLK_MASK		0x1
+	#define SPEAR320_UART2_PCLK_SHIFT		8
+	#define SPEAR320_UART3_PCLK_SHIFT		9
+	#define SPEAR320_UART4_PCLK_SHIFT		10
+	#define SPEAR320_UART5_PCLK_SHIFT		11
+	#define SPEAR320_UART6_PCLK_SHIFT		12
+	#define SPEAR320_RS485_PCLK_SHIFT		13
+#endif /* SPEAR3xx || SPEAR6XX */
+
+#ifdef CONFIG_ARCH_SPEAR13XX
+
+#define PERIP_GRP2_BASE				UL(0xB3000000)
+#define VA_PERIP_GRP2_BASE			IOMEM(0xFE000000)
+#define MCIF_SDHCI_BASE				UL(0xB3000000)
+#define SYSRAM0_BASE				UL(0xB3800000)
+#define VA_SYSRAM0_BASE				IOMEM(0xFE800000)
+#define SYS_LOCATION				(VA_SYSRAM0_BASE + 0x600)
+
+#define PERIP_GRP1_BASE				UL(0xE0000000)
+#define VA_PERIP_GRP1_BASE			IOMEM(0xFD000000)
+#define UART_BASE				UL(0xE0000000)
+#define VA_UART_BASE				IOMEM(0xFD000000)
+#define SSP_BASE				UL(0xE0100000)
+#define MISC_BASE				UL(0xE0700000)
+#define VA_MISC_BASE				IOMEM(0xFD700000)
+
+#define A9SM_AND_MPMC_BASE			UL(0xEC000000)
+#define VA_A9SM_AND_MPMC_BASE			IOMEM(0xFC000000)
+
+/* A9SM peripheral offsets */
+#define A9SM_PERIP_BASE				UL(0xEC800000)
+#define VA_A9SM_PERIP_BASE			IOMEM(0xFC800000)
+#define VA_SCU_BASE				(VA_A9SM_PERIP_BASE + 0x00)
+
+#define L2CC_BASE				UL(0xED000000)
+#define VA_L2CC_BASE				IOMEM(UL(0xFB000000))
+
+/* others */
+#define DMAC0_BASE				UL(0xEA800000)
+#define DMAC1_BASE				UL(0xEB000000)
+#define MCIF_CF_BASE				UL(0xB2800000)
+
+/* Debug uart for linux, will be used for debug and uncompress messages */
+#define SPEAR_DBG_UART_BASE			UART_BASE
+#define VA_SPEAR_DBG_UART_BASE			VA_UART_BASE
+
+#endif /* SPEAR13XX */
+
+#endif /* __MACH_SPEAR_H */
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 08/13] ARM: spear: move generic.h and pl080.h into private dir
  2013-03-12 16:46 [PATCH v2 00/13] ARM: spear multiplatform support Arnd Bergmann
                   ` (5 preceding siblings ...)
  2013-03-12 16:46 ` [PATCH v2 06/13] ARM: spear: move spear.h and misc_regs.h into plat-spear Arnd Bergmann
@ 2013-03-12 16:46 ` Arnd Bergmann
  2013-03-12 16:46 ` [PATCH v2 09/13] ARM: spear: make clock driver independent of headers Arnd Bergmann
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2013-03-12 16:46 UTC (permalink / raw)
  To: linux-arm-kernel

No file outside of mach-spear includes these files any more,
so they don't have to be globally visible now.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-spear/generic.h               | 58 +++++++++++++++++++++++++++++
 arch/arm/mach-spear/include/mach/generic.h  | 58 -----------------------------
 arch/arm/mach-spear/include/mach/hardware.h |  1 -
 arch/arm/mach-spear/include/plat/pl080.h    | 21 -----------
 arch/arm/mach-spear/pl080.h                 | 21 +++++++++++
 arch/arm/mach-spear/platsmp.c               |  2 +-
 arch/arm/mach-spear/restart.c               |  2 +-
 arch/arm/mach-spear/spear1310.c             |  2 +-
 arch/arm/mach-spear/spear1340.c             |  2 +-
 arch/arm/mach-spear/spear13xx.c             |  2 +-
 arch/arm/mach-spear/spear300.c              |  2 +-
 arch/arm/mach-spear/spear310.c              |  2 +-
 arch/arm/mach-spear/spear320.c              |  2 +-
 arch/arm/mach-spear/spear3xx.c              |  4 +-
 arch/arm/mach-spear/spear6xx.c              |  4 +-
 arch/arm/mach-spear/time.c                  |  2 +-
 16 files changed, 92 insertions(+), 93 deletions(-)
 create mode 100644 arch/arm/mach-spear/generic.h
 delete mode 100644 arch/arm/mach-spear/include/mach/generic.h
 delete mode 100644 arch/arm/mach-spear/include/mach/hardware.h
 delete mode 100644 arch/arm/mach-spear/include/plat/pl080.h
 create mode 100644 arch/arm/mach-spear/pl080.h

diff --git a/arch/arm/mach-spear/generic.h b/arch/arm/mach-spear/generic.h
new file mode 100644
index 0000000..af47d9b
--- /dev/null
+++ b/arch/arm/mach-spear/generic.h
@@ -0,0 +1,58 @@
+/*
+ * spear machine family generic header file
+ *
+ * Copyright (C) 2009-2012 ST Microelectronics
+ * Rajeev Kumar <rajeev-dlh.kumar@st.com>
+ * Viresh Kumar <viresh.linux@gmail.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef __MACH_GENERIC_H
+#define __MACH_GENERIC_H
+
+#include <linux/dmaengine.h>
+#include <linux/amba/pl08x.h>
+#include <linux/init.h>
+#include <asm/mach/time.h>
+
+extern void spear13xx_timer_init(void);
+extern void spear3xx_timer_init(void);
+extern struct pl022_ssp_controller pl022_plat_data;
+extern struct pl08x_platform_data pl080_plat_data;
+extern struct dw_dma_platform_data dmac_plat_data;
+extern struct dw_dma_slave cf_dma_priv;
+extern struct dw_dma_slave nand_read_dma_priv;
+extern struct dw_dma_slave nand_write_dma_priv;
+bool dw_dma_filter(struct dma_chan *chan, void *slave);
+
+void __init spear_setup_of_timer(void);
+void __init spear3xx_clk_init(void);
+void __init spear3xx_map_io(void);
+void __init spear3xx_dt_init_irq(void);
+void __init spear6xx_clk_init(void);
+void __init spear13xx_map_io(void);
+void __init spear13xx_l2x0_init(void);
+
+void spear_restart(char, const char *);
+
+void spear13xx_secondary_startup(void);
+void __cpuinit spear13xx_cpu_die(unsigned int cpu);
+
+extern struct smp_operations spear13xx_smp_ops;
+
+#ifdef CONFIG_MACH_SPEAR1310
+void __init spear1310_clk_init(void);
+#else
+static inline void spear1310_clk_init(void) {}
+#endif
+
+#ifdef CONFIG_MACH_SPEAR1340
+void __init spear1340_clk_init(void);
+#else
+static inline void spear1340_clk_init(void) {}
+#endif
+
+#endif /* __MACH_GENERIC_H */
diff --git a/arch/arm/mach-spear/include/mach/generic.h b/arch/arm/mach-spear/include/mach/generic.h
deleted file mode 100644
index af47d9b..0000000
--- a/arch/arm/mach-spear/include/mach/generic.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * spear machine family generic header file
- *
- * Copyright (C) 2009-2012 ST Microelectronics
- * Rajeev Kumar <rajeev-dlh.kumar@st.com>
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_GENERIC_H
-#define __MACH_GENERIC_H
-
-#include <linux/dmaengine.h>
-#include <linux/amba/pl08x.h>
-#include <linux/init.h>
-#include <asm/mach/time.h>
-
-extern void spear13xx_timer_init(void);
-extern void spear3xx_timer_init(void);
-extern struct pl022_ssp_controller pl022_plat_data;
-extern struct pl08x_platform_data pl080_plat_data;
-extern struct dw_dma_platform_data dmac_plat_data;
-extern struct dw_dma_slave cf_dma_priv;
-extern struct dw_dma_slave nand_read_dma_priv;
-extern struct dw_dma_slave nand_write_dma_priv;
-bool dw_dma_filter(struct dma_chan *chan, void *slave);
-
-void __init spear_setup_of_timer(void);
-void __init spear3xx_clk_init(void);
-void __init spear3xx_map_io(void);
-void __init spear3xx_dt_init_irq(void);
-void __init spear6xx_clk_init(void);
-void __init spear13xx_map_io(void);
-void __init spear13xx_l2x0_init(void);
-
-void spear_restart(char, const char *);
-
-void spear13xx_secondary_startup(void);
-void __cpuinit spear13xx_cpu_die(unsigned int cpu);
-
-extern struct smp_operations spear13xx_smp_ops;
-
-#ifdef CONFIG_MACH_SPEAR1310
-void __init spear1310_clk_init(void);
-#else
-static inline void spear1310_clk_init(void) {}
-#endif
-
-#ifdef CONFIG_MACH_SPEAR1340
-void __init spear1340_clk_init(void);
-#else
-static inline void spear1340_clk_init(void) {}
-#endif
-
-#endif /* __MACH_GENERIC_H */
diff --git a/arch/arm/mach-spear/include/mach/hardware.h b/arch/arm/mach-spear/include/mach/hardware.h
deleted file mode 100644
index 40a8c17..0000000
--- a/arch/arm/mach-spear/include/mach/hardware.h
+++ /dev/null
@@ -1 +0,0 @@
-/* empty */
diff --git a/arch/arm/mach-spear/include/plat/pl080.h b/arch/arm/mach-spear/include/plat/pl080.h
deleted file mode 100644
index eb6590d..0000000
--- a/arch/arm/mach-spear/include/plat/pl080.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * arch/arm/plat-spear/include/plat/pl080.h
- *
- * DMAC pl080 definitions for SPEAr platform
- *
- * Copyright (C) 2012 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __PLAT_PL080_H
-#define __PLAT_PL080_H
-
-struct pl08x_channel_data;
-int pl080_get_signal(const struct pl08x_channel_data *cd);
-void pl080_put_signal(const struct pl08x_channel_data *cd, int signal);
-
-#endif /* __PLAT_PL080_H */
diff --git a/arch/arm/mach-spear/pl080.h b/arch/arm/mach-spear/pl080.h
new file mode 100644
index 0000000..eb6590d
--- /dev/null
+++ b/arch/arm/mach-spear/pl080.h
@@ -0,0 +1,21 @@
+/*
+ * arch/arm/plat-spear/include/plat/pl080.h
+ *
+ * DMAC pl080 definitions for SPEAr platform
+ *
+ * Copyright (C) 2012 ST Microelectronics
+ * Viresh Kumar <viresh.linux@gmail.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef __PLAT_PL080_H
+#define __PLAT_PL080_H
+
+struct pl08x_channel_data;
+int pl080_get_signal(const struct pl08x_channel_data *cd);
+void pl080_put_signal(const struct pl08x_channel_data *cd, int signal);
+
+#endif /* __PLAT_PL080_H */
diff --git a/arch/arm/mach-spear/platsmp.c b/arch/arm/mach-spear/platsmp.c
index af4ade6..927979e 100644
--- a/arch/arm/mach-spear/platsmp.c
+++ b/arch/arm/mach-spear/platsmp.c
@@ -19,7 +19,7 @@
 #include <asm/cacheflush.h>
 #include <asm/smp_scu.h>
 #include <mach/spear.h>
-#include <mach/generic.h>
+#include "generic.h"
 
 static DEFINE_SPINLOCK(boot_lock);
 
diff --git a/arch/arm/mach-spear/restart.c b/arch/arm/mach-spear/restart.c
index 7d4616d..004f0f2 100644
--- a/arch/arm/mach-spear/restart.c
+++ b/arch/arm/mach-spear/restart.c
@@ -14,7 +14,7 @@
 #include <linux/amba/sp810.h>
 #include <asm/system_misc.h>
 #include <mach/spear.h>
-#include <mach/generic.h>
+#include "generic.h"
 
 #define SPEAR13XX_SYS_SW_RES			(VA_MISC_BASE + 0x204)
 void spear_restart(char mode, const char *cmd)
diff --git a/arch/arm/mach-spear/spear1310.c b/arch/arm/mach-spear/spear1310.c
index 56214d1..fe868b2 100644
--- a/arch/arm/mach-spear/spear1310.c
+++ b/arch/arm/mach-spear/spear1310.c
@@ -19,7 +19,7 @@
 #include <linux/pata_arasan_cf_data.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
-#include <mach/generic.h>
+#include "generic.h"
 #include <mach/spear.h>
 
 /* Base addresses */
diff --git a/arch/arm/mach-spear/spear1340.c b/arch/arm/mach-spear/spear1340.c
index b01c4c7..75e3864 100644
--- a/arch/arm/mach-spear/spear1340.c
+++ b/arch/arm/mach-spear/spear1340.c
@@ -20,7 +20,7 @@
 #include <linux/of_platform.h>
 #include <linux/irqchip.h>
 #include <asm/mach/arch.h>
-#include <mach/generic.h>
+#include "generic.h"
 #include <mach/spear.h>
 
 #include "spear13xx-dma.h"
diff --git a/arch/arm/mach-spear/spear13xx.c b/arch/arm/mach-spear/spear13xx.c
index 988fefe..6f62dd5 100644
--- a/arch/arm/mach-spear/spear13xx.c
+++ b/arch/arm/mach-spear/spear13xx.c
@@ -21,7 +21,7 @@
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/mach/map.h>
 #include <asm/smp_twd.h>
-#include <mach/generic.h>
+#include "generic.h"
 #include <mach/spear.h>
 
 #include "spear13xx-dma.h"
diff --git a/arch/arm/mach-spear/spear300.c b/arch/arm/mach-spear/spear300.c
index 72449ee..bac56e8 100644
--- a/arch/arm/mach-spear/spear300.c
+++ b/arch/arm/mach-spear/spear300.c
@@ -17,7 +17,7 @@
 #include <linux/irqchip.h>
 #include <linux/of_platform.h>
 #include <asm/mach/arch.h>
-#include <mach/generic.h>
+#include "generic.h"
 #include <mach/spear.h>
 
 /* DMAC platform data's slave info */
diff --git a/arch/arm/mach-spear/spear310.c b/arch/arm/mach-spear/spear310.c
index 0b7962d..6ffbc63 100644
--- a/arch/arm/mach-spear/spear310.c
+++ b/arch/arm/mach-spear/spear310.c
@@ -18,7 +18,7 @@
 #include <linux/irqchip.h>
 #include <linux/of_platform.h>
 #include <asm/mach/arch.h>
-#include <mach/generic.h>
+#include "generic.h"
 #include <mach/spear.h>
 
 #define SPEAR310_UART1_BASE		UL(0xB2000000)
diff --git a/arch/arm/mach-spear/spear320.c b/arch/arm/mach-spear/spear320.c
index e9db7db..b8a4bb5 100644
--- a/arch/arm/mach-spear/spear320.c
+++ b/arch/arm/mach-spear/spear320.c
@@ -20,7 +20,7 @@
 #include <linux/of_platform.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
-#include <mach/generic.h>
+#include "generic.h"
 #include <mach/spear.h>
 
 #define SPEAR320_UART1_BASE		UL(0xA3000000)
diff --git a/arch/arm/mach-spear/spear3xx.c b/arch/arm/mach-spear/spear3xx.c
index d7580f2..be0c94d 100644
--- a/arch/arm/mach-spear/spear3xx.c
+++ b/arch/arm/mach-spear/spear3xx.c
@@ -18,8 +18,8 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 #include <asm/mach/map.h>
-#include <plat/pl080.h>
-#include <mach/generic.h>
+#include "pl080.h"
+#include "generic.h"
 #include <mach/spear.h>
 
 /* ssp device registration */
diff --git a/arch/arm/mach-spear/spear6xx.c b/arch/arm/mach-spear/spear6xx.c
index 97fb31d..78e1359 100644
--- a/arch/arm/mach-spear/spear6xx.c
+++ b/arch/arm/mach-spear/spear6xx.c
@@ -24,8 +24,8 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 #include <asm/mach/map.h>
-#include <plat/pl080.h>
-#include <mach/generic.h>
+#include "pl080.h"
+#include "generic.h"
 #include <mach/spear.h>
 
 /* dmac device registration */
diff --git a/arch/arm/mach-spear/time.c b/arch/arm/mach-spear/time.c
index bd5c53c..d449673 100644
--- a/arch/arm/mach-spear/time.c
+++ b/arch/arm/mach-spear/time.c
@@ -23,7 +23,7 @@
 #include <linux/time.h>
 #include <linux/irq.h>
 #include <asm/mach/time.h>
-#include <mach/generic.h>
+#include "generic.h"
 
 /*
  * We would use TIMER0 and TIMER1 as clockevent and clocksource.
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 09/13] ARM: spear: make clock driver independent of headers
  2013-03-12 16:46 [PATCH v2 00/13] ARM: spear multiplatform support Arnd Bergmann
                   ` (6 preceding siblings ...)
  2013-03-12 16:46 ` [PATCH v2 08/13] ARM: spear: move generic.h and pl080.h into private dir Arnd Bergmann
@ 2013-03-12 16:46 ` Arnd Bergmann
  2013-03-22 18:51   ` Mike Turquette
  2013-03-12 16:46 ` [PATCH v2 10/13] ARM: spear: rename duplicate pl080_plat_data Arnd Bergmann
                   ` (4 subsequent siblings)
  12 siblings, 1 reply; 18+ messages in thread
From: Arnd Bergmann @ 2013-03-12 16:46 UTC (permalink / raw)
  To: linux-arm-kernel

Device drivers should not access MMIO registers through hardcoded
platform specific address constants. Instead, we can pass the
MMIO token to the spear clock driver in the initialization routine
to contain that knowledge in the platform code itself.

Ideally, the clock driver would use of_iomap() or similar to
get the address, and that can be used later, but for now, this
is the minimal change.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-spear/generic.h                | 13 +++---
 arch/arm/mach-spear/include/mach/misc_regs.h |  2 +-
 arch/arm/mach-spear/include/mach/spear.h     | 28 +++++-------
 arch/arm/mach-spear/spear1310.c              |  2 -
 arch/arm/mach-spear/spear13xx.c              |  4 +-
 arch/arm/mach-spear/spear320.c               |  2 +-
 arch/arm/mach-spear/spear3xx.c               |  7 +--
 arch/arm/mach-spear/spear6xx.c               |  9 ++--
 drivers/clk/spear/spear1310_clock.c          | 64 ++++++++++++++--------------
 drivers/clk/spear/spear1340_clock.c          | 63 ++++++++++++++-------------
 drivers/clk/spear/spear3xx_clock.c           | 60 +++++++++++++++-----------
 drivers/clk/spear/spear6xx_clock.c           | 31 +++++++-------
 12 files changed, 143 insertions(+), 142 deletions(-)

diff --git a/arch/arm/mach-spear/generic.h b/arch/arm/mach-spear/generic.h
index af47d9b..8ba7e75 100644
--- a/arch/arm/mach-spear/generic.h
+++ b/arch/arm/mach-spear/generic.h
@@ -29,10 +29,11 @@ extern struct dw_dma_slave nand_write_dma_priv;
 bool dw_dma_filter(struct dma_chan *chan, void *slave);
 
 void __init spear_setup_of_timer(void);
-void __init spear3xx_clk_init(void);
+void __init spear3xx_clk_init(void __iomem *misc_base,
+			      void __iomem *soc_config_base);
 void __init spear3xx_map_io(void);
 void __init spear3xx_dt_init_irq(void);
-void __init spear6xx_clk_init(void);
+void __init spear6xx_clk_init(void __iomem *misc_base);
 void __init spear13xx_map_io(void);
 void __init spear13xx_l2x0_init(void);
 
@@ -44,15 +45,15 @@ void __cpuinit spear13xx_cpu_die(unsigned int cpu);
 extern struct smp_operations spear13xx_smp_ops;
 
 #ifdef CONFIG_MACH_SPEAR1310
-void __init spear1310_clk_init(void);
+void __init spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base);
 #else
-static inline void spear1310_clk_init(void) {}
+static inline void spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base) {}
 #endif
 
 #ifdef CONFIG_MACH_SPEAR1340
-void __init spear1340_clk_init(void);
+void __init spear1340_clk_init(void __iomem *misc_base);
 #else
-static inline void spear1340_clk_init(void) {}
+static inline void spear1340_clk_init(void __iomem *misc_base) {}
 #endif
 
 #endif /* __MACH_GENERIC_H */
diff --git a/arch/arm/mach-spear/include/mach/misc_regs.h b/arch/arm/mach-spear/include/mach/misc_regs.h
index 075812c..935639c 100644
--- a/arch/arm/mach-spear/include/mach/misc_regs.h
+++ b/arch/arm/mach-spear/include/mach/misc_regs.h
@@ -16,7 +16,7 @@
 
 #include <mach/spear.h>
 
-#define MISC_BASE		IOMEM(VA_SPEAR_ICM3_MISC_REG_BASE)
+#define MISC_BASE		(VA_SPEAR_ICM3_MISC_REG_BASE)
 #define DMA_CHN_CFG		(MISC_BASE + 0x0A0)
 
 #endif /* __MACH_MISC_REGS_H */
diff --git a/arch/arm/mach-spear/include/mach/spear.h b/arch/arm/mach-spear/include/mach/spear.h
index 2198ab9..374ddc3 100644
--- a/arch/arm/mach-spear/include/mach/spear.h
+++ b/arch/arm/mach-spear/include/mach/spear.h
@@ -19,23 +19,23 @@
 
 /* ICM1 - Low speed connection */
 #define SPEAR_ICM1_2_BASE		UL(0xD0000000)
-#define VA_SPEAR_ICM1_2_BASE		UL(0xFD000000)
+#define VA_SPEAR_ICM1_2_BASE		IOMEM(0xFD000000)
 #define SPEAR_ICM1_UART_BASE		UL(0xD0000000)
-#define VA_SPEAR_ICM1_UART_BASE		(VA_SPEAR_ICM1_2_BASE | SPEAR_ICM1_UART_BASE)
+#define VA_SPEAR_ICM1_UART_BASE		(VA_SPEAR_ICM1_2_BASE - SPEAR_ICM1_2_BASE + SPEAR_ICM1_UART_BASE)
 #define SPEAR3XX_ICM1_SSP_BASE		UL(0xD0100000)
 
 /* ML-1, 2 - Multi Layer CPU Subsystem */
 #define SPEAR_ICM3_ML1_2_BASE		UL(0xF0000000)
-#define VA_SPEAR6XX_ML_CPU_BASE		UL(0xF0000000)
+#define VA_SPEAR6XX_ML_CPU_BASE		IOMEM(0xF0000000)
 
 /* ICM3 - Basic Subsystem */
 #define SPEAR_ICM3_SMI_CTRL_BASE	UL(0xFC000000)
-#define VA_SPEAR_ICM3_SMI_CTRL_BASE	UL(0xFC000000)
+#define VA_SPEAR_ICM3_SMI_CTRL_BASE	IOMEM(0xFC000000)
 #define SPEAR_ICM3_DMA_BASE		UL(0xFC400000)
 #define SPEAR_ICM3_SYS_CTRL_BASE	UL(0xFCA00000)
-#define VA_SPEAR_ICM3_SYS_CTRL_BASE	(VA_SPEAR_ICM3_SMI_CTRL_BASE | SPEAR_ICM3_SYS_CTRL_BASE)
+#define VA_SPEAR_ICM3_SYS_CTRL_BASE	(VA_SPEAR_ICM3_SMI_CTRL_BASE - SPEAR_ICM3_SMI_CTRL_BASE + SPEAR_ICM3_SYS_CTRL_BASE)
 #define SPEAR_ICM3_MISC_REG_BASE	UL(0xFCA80000)
-#define VA_SPEAR_ICM3_MISC_REG_BASE	(VA_SPEAR_ICM3_SMI_CTRL_BASE | SPEAR_ICM3_MISC_REG_BASE)
+#define VA_SPEAR_ICM3_MISC_REG_BASE	(VA_SPEAR_ICM3_SMI_CTRL_BASE - SPEAR_ICM3_SMI_CTRL_BASE + SPEAR_ICM3_MISC_REG_BASE)
 
 /* Debug uart for linux, will be used for debug and uncompress messages */
 #define SPEAR_DBG_UART_BASE		SPEAR_ICM1_UART_BASE
@@ -44,20 +44,11 @@
 /* Sysctl base for spear platform */
 #define SPEAR_SYS_CTRL_BASE		SPEAR_ICM3_SYS_CTRL_BASE
 #define VA_SPEAR_SYS_CTRL_BASE		VA_SPEAR_ICM3_SYS_CTRL_BASE
+#endif /* SPEAR3xx || SPEAR6XX */
 
 /* SPEAr320 Macros */
 #define SPEAR320_SOC_CONFIG_BASE	UL(0xB3000000)
-#define VA_SPEAR320_SOC_CONFIG_BASE	UL(0xFE000000)
-#define SPEAR320_CONTROL_REG		IOMEM(VA_SPEAR320_SOC_CONFIG_BASE)
-#define SPEAR320_EXT_CTRL_REG		IOMEM(VA_SPEAR320_SOC_CONFIG_BASE + 0x0018)
-	#define SPEAR320_UARTX_PCLK_MASK		0x1
-	#define SPEAR320_UART2_PCLK_SHIFT		8
-	#define SPEAR320_UART3_PCLK_SHIFT		9
-	#define SPEAR320_UART4_PCLK_SHIFT		10
-	#define SPEAR320_UART5_PCLK_SHIFT		11
-	#define SPEAR320_UART6_PCLK_SHIFT		12
-	#define SPEAR320_RS485_PCLK_SHIFT		13
-#endif /* SPEAR3xx || SPEAR6XX */
+#define VA_SPEAR320_SOC_CONFIG_BASE	IOMEM(0xFE000000)
 
 #ifdef CONFIG_ARCH_SPEAR13XX
 
@@ -79,6 +70,9 @@
 #define A9SM_AND_MPMC_BASE			UL(0xEC000000)
 #define VA_A9SM_AND_MPMC_BASE			IOMEM(0xFC000000)
 
+#define SPEAR1310_RAS_BASE			UL(0xD8400000)
+#define VA_SPEAR1310_RAS_BASE			IOMEM(UL(0xFA400000))
+
 /* A9SM peripheral offsets */
 #define A9SM_PERIP_BASE				UL(0xEC800000)
 #define VA_A9SM_PERIP_BASE			IOMEM(0xFC800000)
diff --git a/arch/arm/mach-spear/spear1310.c b/arch/arm/mach-spear/spear1310.c
index fe868b2..ed3b5c2 100644
--- a/arch/arm/mach-spear/spear1310.c
+++ b/arch/arm/mach-spear/spear1310.c
@@ -30,8 +30,6 @@
 
 #define SPEAR1310_RAS_GRP1_BASE			UL(0xD8000000)
 #define VA_SPEAR1310_RAS_GRP1_BASE		UL(0xFA000000)
-#define SPEAR1310_RAS_BASE			UL(0xD8400000)
-#define VA_SPEAR1310_RAS_BASE			IOMEM(UL(0xFA400000))
 
 static struct arasan_cf_pdata cf_pdata = {
 	.cf_if_clk = CF_IF_CLK_166M,
diff --git a/arch/arm/mach-spear/spear13xx.c b/arch/arm/mach-spear/spear13xx.c
index 6f62dd5..1b97e86 100644
--- a/arch/arm/mach-spear/spear13xx.c
+++ b/arch/arm/mach-spear/spear13xx.c
@@ -146,9 +146,9 @@ void __init spear13xx_map_io(void)
 static void __init spear13xx_clk_init(void)
 {
 	if (of_machine_is_compatible("st,spear1310"))
-		spear1310_clk_init();
+		spear1310_clk_init(VA_MISC_BASE, VA_SPEAR1310_RAS_BASE);
 	else if (of_machine_is_compatible("st,spear1340"))
-		spear1340_clk_init();
+		spear1340_clk_init(VA_MISC_BASE);
 	else
 		pr_err("%s: Unknown machine\n", __func__);
 }
diff --git a/arch/arm/mach-spear/spear320.c b/arch/arm/mach-spear/spear320.c
index b8a4bb5..6eb3eec 100644
--- a/arch/arm/mach-spear/spear320.c
+++ b/arch/arm/mach-spear/spear320.c
@@ -254,7 +254,7 @@ static const char * const spear320_dt_board_compat[] = {
 
 struct map_desc spear320_io_desc[] __initdata = {
 	{
-		.virtual	= VA_SPEAR320_SOC_CONFIG_BASE,
+		.virtual	= (unsigned long)VA_SPEAR320_SOC_CONFIG_BASE,
 		.pfn		= __phys_to_pfn(SPEAR320_SOC_CONFIG_BASE),
 		.length		= SZ_16M,
 		.type		= MT_DEVICE
diff --git a/arch/arm/mach-spear/spear3xx.c b/arch/arm/mach-spear/spear3xx.c
index be0c94d..0227c97 100644
--- a/arch/arm/mach-spear/spear3xx.c
+++ b/arch/arm/mach-spear/spear3xx.c
@@ -21,6 +21,7 @@
 #include "pl080.h"
 #include "generic.h"
 #include <mach/spear.h>
+#include <mach/misc_regs.h>
 
 /* ssp device registration */
 struct pl022_ssp_controller pl022_plat_data = {
@@ -67,12 +68,12 @@ struct pl08x_platform_data pl080_plat_data = {
  */
 struct map_desc spear3xx_io_desc[] __initdata = {
 	{
-		.virtual	= VA_SPEAR_ICM1_2_BASE,
+		.virtual	= (unsigned long)VA_SPEAR_ICM1_2_BASE,
 		.pfn		= __phys_to_pfn(SPEAR_ICM1_2_BASE),
 		.length		= SZ_16M,
 		.type		= MT_DEVICE
 	}, {
-		.virtual	= VA_SPEAR_ICM3_SMI_CTRL_BASE,
+		.virtual	= (unsigned long)VA_SPEAR_ICM3_SMI_CTRL_BASE,
 		.pfn		= __phys_to_pfn(SPEAR_ICM3_SMI_CTRL_BASE),
 		.length		= SZ_16M,
 		.type		= MT_DEVICE
@@ -90,7 +91,7 @@ void __init spear3xx_timer_init(void)
 	char pclk_name[] = "pll3_clk";
 	struct clk *gpt_clk, *pclk;
 
-	spear3xx_clk_init();
+	spear3xx_clk_init(MISC_BASE, VA_SPEAR320_SOC_CONFIG_BASE);
 
 	/* get the system timer clock */
 	gpt_clk = clk_get_sys("gpt0", NULL);
diff --git a/arch/arm/mach-spear/spear6xx.c b/arch/arm/mach-spear/spear6xx.c
index 78e1359..9b5ea25 100644
--- a/arch/arm/mach-spear/spear6xx.c
+++ b/arch/arm/mach-spear/spear6xx.c
@@ -27,6 +27,7 @@
 #include "pl080.h"
 #include "generic.h"
 #include <mach/spear.h>
+#include <mach/misc_regs.h>
 
 /* dmac device registration */
 static struct pl08x_channel_data spear600_dma_info[] = {
@@ -350,17 +351,17 @@ struct pl08x_platform_data pl080_plat_data = {
  */
 struct map_desc spear6xx_io_desc[] __initdata = {
 	{
-		.virtual	= VA_SPEAR6XX_ML_CPU_BASE,
+		.virtual	= (unsigned long)VA_SPEAR6XX_ML_CPU_BASE,
 		.pfn		= __phys_to_pfn(SPEAR_ICM3_ML1_2_BASE),
 		.length		= 2 * SZ_16M,
 		.type		= MT_DEVICE
 	},	{
-		.virtual	= VA_SPEAR_ICM1_2_BASE,
+		.virtual	= (unsigned long)VA_SPEAR_ICM1_2_BASE,
 		.pfn		= __phys_to_pfn(SPEAR_ICM1_2_BASE),
 		.length		= SZ_16M,
 		.type		= MT_DEVICE
 	}, {
-		.virtual	= VA_SPEAR_ICM3_SMI_CTRL_BASE,
+		.virtual	= (unsigned long)VA_SPEAR_ICM3_SMI_CTRL_BASE,
 		.pfn		= __phys_to_pfn(SPEAR_ICM3_SMI_CTRL_BASE),
 		.length		= SZ_16M,
 		.type		= MT_DEVICE
@@ -378,7 +379,7 @@ void __init spear6xx_timer_init(void)
 	char pclk_name[] = "pll3_clk";
 	struct clk *gpt_clk, *pclk;
 
-	spear6xx_clk_init();
+	spear6xx_clk_init(MISC_BASE);
 
 	/* get the system timer clock */
 	gpt_clk = clk_get_sys("gpt0", NULL);
diff --git a/drivers/clk/spear/spear1310_clock.c b/drivers/clk/spear/spear1310_clock.c
index ed9af42..aedbbe1 100644
--- a/drivers/clk/spear/spear1310_clock.c
+++ b/drivers/clk/spear/spear1310_clock.c
@@ -17,12 +17,10 @@
 #include <linux/io.h>
 #include <linux/of_platform.h>
 #include <linux/spinlock_types.h>
-#include <mach/spear.h>
 #include "clk.h"
 
-#define VA_SPEAR1310_RAS_BASE			IOMEM(UL(0xFA400000))
 /* PLL related registers and bit values */
-#define SPEAR1310_PLL_CFG			(VA_MISC_BASE + 0x210)
+#define SPEAR1310_PLL_CFG			(misc_base + 0x210)
 	/* PLL_CFG bit values */
 	#define SPEAR1310_CLCD_SYNT_CLK_MASK		1
 	#define SPEAR1310_CLCD_SYNT_CLK_SHIFT		31
@@ -35,15 +33,15 @@
 	#define SPEAR1310_PLL2_CLK_SHIFT		22
 	#define SPEAR1310_PLL1_CLK_SHIFT		20
 
-#define SPEAR1310_PLL1_CTR			(VA_MISC_BASE + 0x214)
-#define SPEAR1310_PLL1_FRQ			(VA_MISC_BASE + 0x218)
-#define SPEAR1310_PLL2_CTR			(VA_MISC_BASE + 0x220)
-#define SPEAR1310_PLL2_FRQ			(VA_MISC_BASE + 0x224)
-#define SPEAR1310_PLL3_CTR			(VA_MISC_BASE + 0x22C)
-#define SPEAR1310_PLL3_FRQ			(VA_MISC_BASE + 0x230)
-#define SPEAR1310_PLL4_CTR			(VA_MISC_BASE + 0x238)
-#define SPEAR1310_PLL4_FRQ			(VA_MISC_BASE + 0x23C)
-#define SPEAR1310_PERIP_CLK_CFG			(VA_MISC_BASE + 0x244)
+#define SPEAR1310_PLL1_CTR			(misc_base + 0x214)
+#define SPEAR1310_PLL1_FRQ			(misc_base + 0x218)
+#define SPEAR1310_PLL2_CTR			(misc_base + 0x220)
+#define SPEAR1310_PLL2_FRQ			(misc_base + 0x224)
+#define SPEAR1310_PLL3_CTR			(misc_base + 0x22C)
+#define SPEAR1310_PLL3_FRQ			(misc_base + 0x230)
+#define SPEAR1310_PLL4_CTR			(misc_base + 0x238)
+#define SPEAR1310_PLL4_FRQ			(misc_base + 0x23C)
+#define SPEAR1310_PERIP_CLK_CFG			(misc_base + 0x244)
 	/* PERIP_CLK_CFG bit values */
 	#define SPEAR1310_GPT_OSC24_VAL			0
 	#define SPEAR1310_GPT_APB_VAL			1
@@ -65,7 +63,7 @@
 	#define SPEAR1310_C3_CLK_MASK			1
 	#define SPEAR1310_C3_CLK_SHIFT			1
 
-#define SPEAR1310_GMAC_CLK_CFG			(VA_MISC_BASE + 0x248)
+#define SPEAR1310_GMAC_CLK_CFG			(misc_base + 0x248)
 	#define SPEAR1310_GMAC_PHY_IF_SEL_MASK		3
 	#define SPEAR1310_GMAC_PHY_IF_SEL_SHIFT		4
 	#define SPEAR1310_GMAC_PHY_CLK_MASK		1
@@ -73,7 +71,7 @@
 	#define SPEAR1310_GMAC_PHY_INPUT_CLK_MASK	2
 	#define SPEAR1310_GMAC_PHY_INPUT_CLK_SHIFT	1
 
-#define SPEAR1310_I2S_CLK_CFG			(VA_MISC_BASE + 0x24C)
+#define SPEAR1310_I2S_CLK_CFG			(misc_base + 0x24C)
 	/* I2S_CLK_CFG register mask */
 	#define SPEAR1310_I2S_SCLK_X_MASK		0x1F
 	#define SPEAR1310_I2S_SCLK_X_SHIFT		27
@@ -91,21 +89,21 @@
 	#define SPEAR1310_I2S_SRC_CLK_MASK		2
 	#define SPEAR1310_I2S_SRC_CLK_SHIFT		0
 
-#define SPEAR1310_C3_CLK_SYNT			(VA_MISC_BASE + 0x250)
-#define SPEAR1310_UART_CLK_SYNT			(VA_MISC_BASE + 0x254)
-#define SPEAR1310_GMAC_CLK_SYNT			(VA_MISC_BASE + 0x258)
-#define SPEAR1310_SDHCI_CLK_SYNT		(VA_MISC_BASE + 0x25C)
-#define SPEAR1310_CFXD_CLK_SYNT			(VA_MISC_BASE + 0x260)
-#define SPEAR1310_ADC_CLK_SYNT			(VA_MISC_BASE + 0x264)
-#define SPEAR1310_AMBA_CLK_SYNT			(VA_MISC_BASE + 0x268)
-#define SPEAR1310_CLCD_CLK_SYNT			(VA_MISC_BASE + 0x270)
-#define SPEAR1310_RAS_CLK_SYNT0			(VA_MISC_BASE + 0x280)
-#define SPEAR1310_RAS_CLK_SYNT1			(VA_MISC_BASE + 0x288)
-#define SPEAR1310_RAS_CLK_SYNT2			(VA_MISC_BASE + 0x290)
-#define SPEAR1310_RAS_CLK_SYNT3			(VA_MISC_BASE + 0x298)
+#define SPEAR1310_C3_CLK_SYNT			(misc_base + 0x250)
+#define SPEAR1310_UART_CLK_SYNT			(misc_base + 0x254)
+#define SPEAR1310_GMAC_CLK_SYNT			(misc_base + 0x258)
+#define SPEAR1310_SDHCI_CLK_SYNT		(misc_base + 0x25C)
+#define SPEAR1310_CFXD_CLK_SYNT			(misc_base + 0x260)
+#define SPEAR1310_ADC_CLK_SYNT			(misc_base + 0x264)
+#define SPEAR1310_AMBA_CLK_SYNT			(misc_base + 0x268)
+#define SPEAR1310_CLCD_CLK_SYNT			(misc_base + 0x270)
+#define SPEAR1310_RAS_CLK_SYNT0			(misc_base + 0x280)
+#define SPEAR1310_RAS_CLK_SYNT1			(misc_base + 0x288)
+#define SPEAR1310_RAS_CLK_SYNT2			(misc_base + 0x290)
+#define SPEAR1310_RAS_CLK_SYNT3			(misc_base + 0x298)
 	/* Check Fractional synthesizer reg masks */
 
-#define SPEAR1310_PERIP1_CLK_ENB		(VA_MISC_BASE + 0x300)
+#define SPEAR1310_PERIP1_CLK_ENB		(misc_base + 0x300)
 	/* PERIP1_CLK_ENB register masks */
 	#define SPEAR1310_RTC_CLK_ENB			31
 	#define SPEAR1310_ADC_CLK_ENB			30
@@ -138,7 +136,7 @@
 	#define SPEAR1310_SYSROM_CLK_ENB		1
 	#define SPEAR1310_BUS_CLK_ENB			0
 
-#define SPEAR1310_PERIP2_CLK_ENB		(VA_MISC_BASE + 0x304)
+#define SPEAR1310_PERIP2_CLK_ENB		(misc_base + 0x304)
 	/* PERIP2_CLK_ENB register masks */
 	#define SPEAR1310_THSENS_CLK_ENB		8
 	#define SPEAR1310_I2S_REF_PAD_CLK_ENB		7
@@ -150,7 +148,7 @@
 	#define SPEAR1310_DDR_CORE_CLK_ENB		1
 	#define SPEAR1310_DDR_CTRL_CLK_ENB		0
 
-#define SPEAR1310_RAS_CLK_ENB			(VA_MISC_BASE + 0x310)
+#define SPEAR1310_RAS_CLK_ENB			(misc_base + 0x310)
 	/* RAS_CLK_ENB register masks */
 	#define SPEAR1310_SYNT3_CLK_ENB			17
 	#define SPEAR1310_SYNT2_CLK_ENB			16
@@ -172,7 +170,7 @@
 	#define SPEAR1310_ACLK_CLK_ENB			0
 
 /* RAS Area Control Register */
-#define SPEAR1310_RAS_CTRL_REG0			(VA_SPEAR1310_RAS_BASE + 0x000)
+#define SPEAR1310_RAS_CTRL_REG0			(ras_base + 0x000)
 	#define SPEAR1310_SSP1_CLK_MASK			3
 	#define SPEAR1310_SSP1_CLK_SHIFT		26
 	#define SPEAR1310_TDM_CLK_MASK			1
@@ -197,12 +195,12 @@
 	#define SPEAR1310_PCI_CLK_MASK			1
 	#define SPEAR1310_PCI_CLK_SHIFT			0
 
-#define SPEAR1310_RAS_CTRL_REG1			(VA_SPEAR1310_RAS_BASE + 0x004)
+#define SPEAR1310_RAS_CTRL_REG1			(ras_base + 0x004)
 	#define SPEAR1310_PHY_CLK_MASK			0x3
 	#define SPEAR1310_RMII_PHY_CLK_SHIFT		0
 	#define SPEAR1310_SMII_RGMII_PHY_CLK_SHIFT	2
 
-#define SPEAR1310_RAS_SW_CLK_CTRL		(VA_SPEAR1310_RAS_BASE + 0x0148)
+#define SPEAR1310_RAS_SW_CLK_CTRL		(ras_base + 0x0148)
 	#define SPEAR1310_CAN1_CLK_ENB			25
 	#define SPEAR1310_CAN0_CLK_ENB			24
 	#define SPEAR1310_GPT64_CLK_ENB			23
@@ -385,7 +383,7 @@ static const char *ssp1_parents[] = { "ras_apb_clk", "gen_syn1_clk",
 static const char *pci_parents[] = { "ras_pll3_clk", "gen_syn2_clk", };
 static const char *tdm_parents[] = { "ras_pll3_clk", "gen_syn1_clk", };
 
-void __init spear1310_clk_init(void)
+void __init spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base)
 {
 	struct clk *clk, *clk1;
 
diff --git a/drivers/clk/spear/spear1340_clock.c b/drivers/clk/spear/spear1340_clock.c
index 82abea3..3ceb450 100644
--- a/drivers/clk/spear/spear1340_clock.c
+++ b/drivers/clk/spear/spear1340_clock.c
@@ -17,18 +17,17 @@
 #include <linux/io.h>
 #include <linux/of_platform.h>
 #include <linux/spinlock_types.h>
-#include <mach/spear.h>
 #include "clk.h"
 
 /* Clock Configuration Registers */
-#define SPEAR1340_SYS_CLK_CTRL			(VA_MISC_BASE + 0x200)
+#define SPEAR1340_SYS_CLK_CTRL			(misc_base + 0x200)
 	#define SPEAR1340_HCLK_SRC_SEL_SHIFT	27
 	#define SPEAR1340_HCLK_SRC_SEL_MASK	1
 	#define SPEAR1340_SCLK_SRC_SEL_SHIFT	23
 	#define SPEAR1340_SCLK_SRC_SEL_MASK	3
 
 /* PLL related registers and bit values */
-#define SPEAR1340_PLL_CFG			(VA_MISC_BASE + 0x210)
+#define SPEAR1340_PLL_CFG			(misc_base + 0x210)
 	/* PLL_CFG bit values */
 	#define SPEAR1340_CLCD_SYNT_CLK_MASK		1
 	#define SPEAR1340_CLCD_SYNT_CLK_SHIFT		31
@@ -40,15 +39,15 @@
 	#define SPEAR1340_PLL2_CLK_SHIFT		22
 	#define SPEAR1340_PLL1_CLK_SHIFT		20
 
-#define SPEAR1340_PLL1_CTR			(VA_MISC_BASE + 0x214)
-#define SPEAR1340_PLL1_FRQ			(VA_MISC_BASE + 0x218)
-#define SPEAR1340_PLL2_CTR			(VA_MISC_BASE + 0x220)
-#define SPEAR1340_PLL2_FRQ			(VA_MISC_BASE + 0x224)
-#define SPEAR1340_PLL3_CTR			(VA_MISC_BASE + 0x22C)
-#define SPEAR1340_PLL3_FRQ			(VA_MISC_BASE + 0x230)
-#define SPEAR1340_PLL4_CTR			(VA_MISC_BASE + 0x238)
-#define SPEAR1340_PLL4_FRQ			(VA_MISC_BASE + 0x23C)
-#define SPEAR1340_PERIP_CLK_CFG			(VA_MISC_BASE + 0x244)
+#define SPEAR1340_PLL1_CTR			(misc_base + 0x214)
+#define SPEAR1340_PLL1_FRQ			(misc_base + 0x218)
+#define SPEAR1340_PLL2_CTR			(misc_base + 0x220)
+#define SPEAR1340_PLL2_FRQ			(misc_base + 0x224)
+#define SPEAR1340_PLL3_CTR			(misc_base + 0x22C)
+#define SPEAR1340_PLL3_FRQ			(misc_base + 0x230)
+#define SPEAR1340_PLL4_CTR			(misc_base + 0x238)
+#define SPEAR1340_PLL4_FRQ			(misc_base + 0x23C)
+#define SPEAR1340_PERIP_CLK_CFG			(misc_base + 0x244)
 	/* PERIP_CLK_CFG bit values */
 	#define SPEAR1340_SPDIF_CLK_MASK		1
 	#define SPEAR1340_SPDIF_OUT_CLK_SHIFT		15
@@ -66,13 +65,13 @@
 	#define SPEAR1340_C3_CLK_MASK			1
 	#define SPEAR1340_C3_CLK_SHIFT			1
 
-#define SPEAR1340_GMAC_CLK_CFG			(VA_MISC_BASE + 0x248)
+#define SPEAR1340_GMAC_CLK_CFG			(misc_base + 0x248)
 	#define SPEAR1340_GMAC_PHY_CLK_MASK		1
 	#define SPEAR1340_GMAC_PHY_CLK_SHIFT		2
 	#define SPEAR1340_GMAC_PHY_INPUT_CLK_MASK	2
 	#define SPEAR1340_GMAC_PHY_INPUT_CLK_SHIFT	0
 
-#define SPEAR1340_I2S_CLK_CFG			(VA_MISC_BASE + 0x24C)
+#define SPEAR1340_I2S_CLK_CFG			(misc_base + 0x24C)
 	/* I2S_CLK_CFG register mask */
 	#define SPEAR1340_I2S_SCLK_X_MASK		0x1F
 	#define SPEAR1340_I2S_SCLK_X_SHIFT		27
@@ -90,21 +89,21 @@
 	#define SPEAR1340_I2S_SRC_CLK_MASK		2
 	#define SPEAR1340_I2S_SRC_CLK_SHIFT		0
 
-#define SPEAR1340_C3_CLK_SYNT			(VA_MISC_BASE + 0x250)
-#define SPEAR1340_UART0_CLK_SYNT		(VA_MISC_BASE + 0x254)
-#define SPEAR1340_UART1_CLK_SYNT		(VA_MISC_BASE + 0x258)
-#define SPEAR1340_GMAC_CLK_SYNT			(VA_MISC_BASE + 0x25C)
-#define SPEAR1340_SDHCI_CLK_SYNT		(VA_MISC_BASE + 0x260)
-#define SPEAR1340_CFXD_CLK_SYNT			(VA_MISC_BASE + 0x264)
-#define SPEAR1340_ADC_CLK_SYNT			(VA_MISC_BASE + 0x270)
-#define SPEAR1340_AMBA_CLK_SYNT			(VA_MISC_BASE + 0x274)
-#define SPEAR1340_CLCD_CLK_SYNT			(VA_MISC_BASE + 0x27C)
-#define SPEAR1340_SYS_CLK_SYNT			(VA_MISC_BASE + 0x284)
-#define SPEAR1340_GEN_CLK_SYNT0			(VA_MISC_BASE + 0x28C)
-#define SPEAR1340_GEN_CLK_SYNT1			(VA_MISC_BASE + 0x294)
-#define SPEAR1340_GEN_CLK_SYNT2			(VA_MISC_BASE + 0x29C)
-#define SPEAR1340_GEN_CLK_SYNT3			(VA_MISC_BASE + 0x304)
-#define SPEAR1340_PERIP1_CLK_ENB		(VA_MISC_BASE + 0x30C)
+#define SPEAR1340_C3_CLK_SYNT			(misc_base + 0x250)
+#define SPEAR1340_UART0_CLK_SYNT		(misc_base + 0x254)
+#define SPEAR1340_UART1_CLK_SYNT		(misc_base + 0x258)
+#define SPEAR1340_GMAC_CLK_SYNT			(misc_base + 0x25C)
+#define SPEAR1340_SDHCI_CLK_SYNT		(misc_base + 0x260)
+#define SPEAR1340_CFXD_CLK_SYNT			(misc_base + 0x264)
+#define SPEAR1340_ADC_CLK_SYNT			(misc_base + 0x270)
+#define SPEAR1340_AMBA_CLK_SYNT			(misc_base + 0x274)
+#define SPEAR1340_CLCD_CLK_SYNT			(misc_base + 0x27C)
+#define SPEAR1340_SYS_CLK_SYNT			(misc_base + 0x284)
+#define SPEAR1340_GEN_CLK_SYNT0			(misc_base + 0x28C)
+#define SPEAR1340_GEN_CLK_SYNT1			(misc_base + 0x294)
+#define SPEAR1340_GEN_CLK_SYNT2			(misc_base + 0x29C)
+#define SPEAR1340_GEN_CLK_SYNT3			(misc_base + 0x304)
+#define SPEAR1340_PERIP1_CLK_ENB		(misc_base + 0x30C)
 	#define SPEAR1340_RTC_CLK_ENB			31
 	#define SPEAR1340_ADC_CLK_ENB			30
 	#define SPEAR1340_C3_CLK_ENB			29
@@ -133,7 +132,7 @@
 	#define SPEAR1340_SYSROM_CLK_ENB		1
 	#define SPEAR1340_BUS_CLK_ENB			0
 
-#define SPEAR1340_PERIP2_CLK_ENB		(VA_MISC_BASE + 0x310)
+#define SPEAR1340_PERIP2_CLK_ENB		(misc_base + 0x310)
 	#define SPEAR1340_THSENS_CLK_ENB		8
 	#define SPEAR1340_I2S_REF_PAD_CLK_ENB		7
 	#define SPEAR1340_ACP_CLK_ENB			6
@@ -144,7 +143,7 @@
 	#define SPEAR1340_DDR_CORE_CLK_ENB		1
 	#define SPEAR1340_DDR_CTRL_CLK_ENB		0
 
-#define SPEAR1340_PERIP3_CLK_ENB		(VA_MISC_BASE + 0x314)
+#define SPEAR1340_PERIP3_CLK_ENB		(misc_base + 0x314)
 	#define SPEAR1340_PLGPIO_CLK_ENB		18
 	#define SPEAR1340_VIDEO_DEC_CLK_ENB		16
 	#define SPEAR1340_VIDEO_ENC_CLK_ENB		15
@@ -441,7 +440,7 @@ static const char *gen_synth0_1_parents[] = { "vco1div4_clk", "vco3div2_clk",
 static const char *gen_synth2_3_parents[] = { "vco1div4_clk", "vco2div2_clk",
 	"pll2_clk", };
 
-void __init spear1340_clk_init(void)
+void __init spear1340_clk_init(void __iomem *misc_base)
 {
 	struct clk *clk, *clk1;
 
diff --git a/drivers/clk/spear/spear3xx_clock.c b/drivers/clk/spear/spear3xx_clock.c
index 33d3ac5..f9ec43f 100644
--- a/drivers/clk/spear/spear3xx_clock.c
+++ b/drivers/clk/spear/spear3xx_clock.c
@@ -15,21 +15,20 @@
 #include <linux/io.h>
 #include <linux/of_platform.h>
 #include <linux/spinlock_types.h>
-#include <mach/misc_regs.h>
 #include "clk.h"
 
 static DEFINE_SPINLOCK(_lock);
 
-#define PLL1_CTR			(MISC_BASE + 0x008)
-#define PLL1_FRQ			(MISC_BASE + 0x00C)
-#define PLL2_CTR			(MISC_BASE + 0x014)
-#define PLL2_FRQ			(MISC_BASE + 0x018)
-#define PLL_CLK_CFG			(MISC_BASE + 0x020)
+#define PLL1_CTR			(misc_base + 0x008)
+#define PLL1_FRQ			(misc_base + 0x00C)
+#define PLL2_CTR			(misc_base + 0x014)
+#define PLL2_FRQ			(misc_base + 0x018)
+#define PLL_CLK_CFG			(misc_base + 0x020)
 	/* PLL_CLK_CFG register masks */
 	#define MCTR_CLK_SHIFT		28
 	#define MCTR_CLK_MASK		3
 
-#define CORE_CLK_CFG			(MISC_BASE + 0x024)
+#define CORE_CLK_CFG			(misc_base + 0x024)
 	/* CORE CLK CFG register masks */
 	#define GEN_SYNTH2_3_CLK_SHIFT	18
 	#define GEN_SYNTH2_3_CLK_MASK	1
@@ -39,7 +38,7 @@ static DEFINE_SPINLOCK(_lock);
 	#define PCLK_RATIO_SHIFT	8
 	#define PCLK_RATIO_MASK		2
 
-#define PERIP_CLK_CFG			(MISC_BASE + 0x028)
+#define PERIP_CLK_CFG			(misc_base + 0x028)
 	/* PERIP_CLK_CFG register masks */
 	#define UART_CLK_SHIFT		4
 	#define UART_CLK_MASK		1
@@ -50,7 +49,7 @@ static DEFINE_SPINLOCK(_lock);
 	#define GPT2_CLK_SHIFT		12
 	#define GPT_CLK_MASK		1
 
-#define PERIP1_CLK_ENB			(MISC_BASE + 0x02C)
+#define PERIP1_CLK_ENB			(misc_base + 0x02C)
 	/* PERIP1_CLK_ENB register masks */
 	#define UART_CLK_ENB		3
 	#define SSP_CLK_ENB		5
@@ -69,7 +68,7 @@ static DEFINE_SPINLOCK(_lock);
 	#define USBH_CLK_ENB		25
 	#define C3_CLK_ENB		31
 
-#define RAS_CLK_ENB			(MISC_BASE + 0x034)
+#define RAS_CLK_ENB			(misc_base + 0x034)
 	#define RAS_AHB_CLK_ENB		0
 	#define RAS_PLL1_CLK_ENB	1
 	#define RAS_APB_CLK_ENB		2
@@ -82,20 +81,20 @@ static DEFINE_SPINLOCK(_lock);
 	#define RAS_SYNT2_CLK_ENB	10
 	#define RAS_SYNT3_CLK_ENB	11
 
-#define PRSC0_CLK_CFG			(MISC_BASE + 0x044)
-#define PRSC1_CLK_CFG			(MISC_BASE + 0x048)
-#define PRSC2_CLK_CFG			(MISC_BASE + 0x04C)
-#define AMEM_CLK_CFG			(MISC_BASE + 0x050)
+#define PRSC0_CLK_CFG			(misc_base + 0x044)
+#define PRSC1_CLK_CFG			(misc_base + 0x048)
+#define PRSC2_CLK_CFG			(misc_base + 0x04C)
+#define AMEM_CLK_CFG			(misc_base + 0x050)
 	#define AMEM_CLK_ENB		0
 
-#define CLCD_CLK_SYNT			(MISC_BASE + 0x05C)
-#define FIRDA_CLK_SYNT			(MISC_BASE + 0x060)
-#define UART_CLK_SYNT			(MISC_BASE + 0x064)
-#define GMAC_CLK_SYNT			(MISC_BASE + 0x068)
-#define GEN0_CLK_SYNT			(MISC_BASE + 0x06C)
-#define GEN1_CLK_SYNT			(MISC_BASE + 0x070)
-#define GEN2_CLK_SYNT			(MISC_BASE + 0x074)
-#define GEN3_CLK_SYNT			(MISC_BASE + 0x078)
+#define CLCD_CLK_SYNT			(misc_base + 0x05C)
+#define FIRDA_CLK_SYNT			(misc_base + 0x060)
+#define UART_CLK_SYNT			(misc_base + 0x064)
+#define GMAC_CLK_SYNT			(misc_base + 0x068)
+#define GEN0_CLK_SYNT			(misc_base + 0x06C)
+#define GEN1_CLK_SYNT			(misc_base + 0x070)
+#define GEN2_CLK_SYNT			(misc_base + 0x074)
+#define GEN3_CLK_SYNT			(misc_base + 0x078)
 
 /* pll rate configuration table, in ascending order of rates */
 static struct pll_rate_tbl pll_rtbl[] = {
@@ -211,6 +210,17 @@ static inline void spear310_clk_init(void) { }
 
 /* array of all spear 320 clock lookups */
 #ifdef CONFIG_MACH_SPEAR320
+
+#define SPEAR320_CONTROL_REG		(soc_config_base + 0x0000)
+#define SPEAR320_EXT_CTRL_REG		(soc_config_base + 0x0018)
+
+	#define SPEAR320_UARTX_PCLK_MASK		0x1
+	#define SPEAR320_UART2_PCLK_SHIFT		8
+	#define SPEAR320_UART3_PCLK_SHIFT		9
+	#define SPEAR320_UART4_PCLK_SHIFT		10
+	#define SPEAR320_UART5_PCLK_SHIFT		11
+	#define SPEAR320_UART6_PCLK_SHIFT		12
+	#define SPEAR320_RS485_PCLK_SHIFT		13
 	#define SMII_PCLK_SHIFT				18
 	#define SMII_PCLK_MASK				2
 	#define SMII_PCLK_VAL_PAD			0x0
@@ -235,7 +245,7 @@ static const char *smii0_parents[] = { "smii_125m_pad", "ras_pll2_clk",
 	"ras_syn0_gclk", };
 static const char *uartx_parents[] = { "ras_syn1_gclk", "ras_apb_clk", };
 
-static void __init spear320_clk_init(void)
+static void __init spear320_clk_init(void __iomem *soc_config_base)
 {
 	struct clk *clk;
 
@@ -362,7 +372,7 @@ static void __init spear320_clk_init(void)
 static inline void spear320_clk_init(void) { }
 #endif
 
-void __init spear3xx_clk_init(void)
+void __init spear3xx_clk_init(void __iomem *misc_base, void __iomem *soc_config_base)
 {
 	struct clk *clk, *clk1;
 
@@ -634,5 +644,5 @@ void __init spear3xx_clk_init(void)
 	else if (of_machine_is_compatible("st,spear310"))
 		spear310_clk_init();
 	else if (of_machine_is_compatible("st,spear320"))
-		spear320_clk_init();
+		spear320_clk_init(soc_config_base);
 }
diff --git a/drivers/clk/spear/spear6xx_clock.c b/drivers/clk/spear/spear6xx_clock.c
index e862a33..9406f24 100644
--- a/drivers/clk/spear/spear6xx_clock.c
+++ b/drivers/clk/spear/spear6xx_clock.c
@@ -13,28 +13,27 @@
 #include <linux/clkdev.h>
 #include <linux/io.h>
 #include <linux/spinlock_types.h>
-#include <mach/misc_regs.h>
 #include "clk.h"
 
 static DEFINE_SPINLOCK(_lock);
 
-#define PLL1_CTR			(MISC_BASE + 0x008)
-#define PLL1_FRQ			(MISC_BASE + 0x00C)
-#define PLL2_CTR			(MISC_BASE + 0x014)
-#define PLL2_FRQ			(MISC_BASE + 0x018)
-#define PLL_CLK_CFG			(MISC_BASE + 0x020)
+#define PLL1_CTR			(misc_base + 0x008)
+#define PLL1_FRQ			(misc_base + 0x00C)
+#define PLL2_CTR			(misc_base + 0x014)
+#define PLL2_FRQ			(misc_base + 0x018)
+#define PLL_CLK_CFG			(misc_base + 0x020)
 	/* PLL_CLK_CFG register masks */
 	#define MCTR_CLK_SHIFT		28
 	#define MCTR_CLK_MASK		3
 
-#define CORE_CLK_CFG			(MISC_BASE + 0x024)
+#define CORE_CLK_CFG			(misc_base + 0x024)
 	/* CORE CLK CFG register masks */
 	#define HCLK_RATIO_SHIFT	10
 	#define HCLK_RATIO_MASK		2
 	#define PCLK_RATIO_SHIFT	8
 	#define PCLK_RATIO_MASK		2
 
-#define PERIP_CLK_CFG			(MISC_BASE + 0x028)
+#define PERIP_CLK_CFG			(misc_base + 0x028)
 	/* PERIP_CLK_CFG register masks */
 	#define CLCD_CLK_SHIFT		2
 	#define CLCD_CLK_MASK		2
@@ -48,7 +47,7 @@ static DEFINE_SPINLOCK(_lock);
 	#define GPT3_CLK_SHIFT		12
 	#define GPT_CLK_MASK		1
 
-#define PERIP1_CLK_ENB			(MISC_BASE + 0x02C)
+#define PERIP1_CLK_ENB			(misc_base + 0x02C)
 	/* PERIP1_CLK_ENB register masks */
 	#define UART0_CLK_ENB		3
 	#define UART1_CLK_ENB		4
@@ -74,13 +73,13 @@ static DEFINE_SPINLOCK(_lock);
 	#define USBH0_CLK_ENB		25
 	#define USBH1_CLK_ENB		26
 
-#define PRSC0_CLK_CFG			(MISC_BASE + 0x044)
-#define PRSC1_CLK_CFG			(MISC_BASE + 0x048)
-#define PRSC2_CLK_CFG			(MISC_BASE + 0x04C)
+#define PRSC0_CLK_CFG			(misc_base + 0x044)
+#define PRSC1_CLK_CFG			(misc_base + 0x048)
+#define PRSC2_CLK_CFG			(misc_base + 0x04C)
 
-#define CLCD_CLK_SYNT			(MISC_BASE + 0x05C)
-#define FIRDA_CLK_SYNT			(MISC_BASE + 0x060)
-#define UART_CLK_SYNT			(MISC_BASE + 0x064)
+#define CLCD_CLK_SYNT			(misc_base + 0x05C)
+#define FIRDA_CLK_SYNT			(misc_base + 0x060)
+#define UART_CLK_SYNT			(misc_base + 0x064)
 
 /* vco rate configuration table, in ascending order of rates */
 static struct pll_rate_tbl pll_rtbl[] = {
@@ -115,7 +114,7 @@ static struct gpt_rate_tbl gpt_rtbl[] = {
 	{.mscale = 1, .nscale = 0}, /* 83 MHz */
 };
 
-void __init spear6xx_clk_init(void)
+void __init spear6xx_clk_init(void __iomem *misc_base)
 {
 	struct clk *clk, *clk1;
 
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 10/13] ARM: spear: rename duplicate pl080_plat_data
  2013-03-12 16:46 [PATCH v2 00/13] ARM: spear multiplatform support Arnd Bergmann
                   ` (7 preceding siblings ...)
  2013-03-12 16:46 ` [PATCH v2 09/13] ARM: spear: make clock driver independent of headers Arnd Bergmann
@ 2013-03-12 16:46 ` Arnd Bergmann
  2013-03-12 16:46 ` [PATCH v2 11/13] ARM: spear: use multiplatform configuration options Arnd Bergmann
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2013-03-12 16:46 UTC (permalink / raw)
  To: linux-arm-kernel

Both spear3xx and spear6xx have a global symbol named
pl080_plat_data. Eventually, both should be removed, but
for now, we can rename one to pl080_plat_data and declare
it static, since that one does not actually need to be
visible outside of spear6xx.c.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-spear/spear6xx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-spear/spear6xx.c b/arch/arm/mach-spear/spear6xx.c
index 9b5ea25..ec8eefb 100644
--- a/arch/arm/mach-spear/spear6xx.c
+++ b/arch/arm/mach-spear/spear6xx.c
@@ -322,7 +322,7 @@ static struct pl08x_channel_data spear600_dma_info[] = {
 	},
 };
 
-struct pl08x_platform_data pl080_plat_data = {
+static struct pl08x_platform_data spear6xx_pl080_plat_data = {
 	.memcpy_channel = {
 		.bus_id = "memcpy",
 		.cctl_memcpy =
@@ -406,7 +406,7 @@ void __init spear6xx_timer_init(void)
 /* Add auxdata to pass platform data */
 struct of_dev_auxdata spear6xx_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("arm,pl080", SPEAR_ICM3_DMA_BASE, NULL,
-			&pl080_plat_data),
+			&spear6xx_pl080_plat_data),
 	{}
 };
 
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 11/13] ARM: spear: use multiplatform configuration options.
  2013-03-12 16:46 [PATCH v2 00/13] ARM: spear multiplatform support Arnd Bergmann
                   ` (8 preceding siblings ...)
  2013-03-12 16:46 ` [PATCH v2 10/13] ARM: spear: rename duplicate pl080_plat_data Arnd Bergmann
@ 2013-03-12 16:46 ` Arnd Bergmann
  2013-03-12 16:46 ` [PATCH v2 12/13] ARM: spear: fix build error in restart.c Arnd Bergmann
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2013-03-12 16:46 UTC (permalink / raw)
  To: linux-arm-kernel

The spear platform is now multiplatform capable in principle,
and everything still builds when enabled. This slightly rearranges
the Kconfig options for spear to enable both single- and multiplatform
support. As a side-effect, even building the single spear kernel
can now enable spear3xx and spear6xx simultaneously, although
not together with spear13xx, because they are a different archicture
version (v7 instead of v5).

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/Kconfig                    | 10 +-----
 arch/arm/configs/spear3xx_defconfig |  2 ++
 arch/arm/configs/spear6xx_defconfig |  1 +
 arch/arm/mach-spear/Kconfig         | 67 ++++++++++++++++++++++---------------
 arch/arm/mach-spear/Makefile        |  2 ++
 5 files changed, 46 insertions(+), 36 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4d2b1cf..4b82c7b 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -933,16 +933,8 @@ config ARCH_NOMADIK
 	help
 	  Support for the Nomadik platform by ST-Ericsson
 
-config PLAT_SPEAR
+config PLAT_SPEAR_SINGLE
 	bool "ST SPEAr"
-	select ARCH_HAS_CPUFREQ
-	select ARCH_REQUIRE_GPIOLIB
-	select ARM_AMBA
-	select CLKDEV_LOOKUP
-	select CLKSRC_MMIO
-	select COMMON_CLK
-	select GENERIC_CLOCKEVENTS
-	select HAVE_CLK
 	help
 	  Support for ST's SPEAr platform (SPEAr3xx, SPEAr6xx and SPEAr13xx).
 
diff --git a/arch/arm/configs/spear3xx_defconfig b/arch/arm/configs/spear3xx_defconfig
index 865980c..7ff23a0 100644
--- a/arch/arm/configs/spear3xx_defconfig
+++ b/arch/arm/configs/spear3xx_defconfig
@@ -6,7 +6,9 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 CONFIG_MODVERSIONS=y
 CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ARCH_MULTI_V7 is not set
 CONFIG_PLAT_SPEAR=y
+CONFIG_ARCH_SPEAR3XX=y
 CONFIG_MACH_SPEAR300=y
 CONFIG_MACH_SPEAR310=y
 CONFIG_MACH_SPEAR320=y
diff --git a/arch/arm/configs/spear6xx_defconfig b/arch/arm/configs/spear6xx_defconfig
index a2a1265..7822980 100644
--- a/arch/arm/configs/spear6xx_defconfig
+++ b/arch/arm/configs/spear6xx_defconfig
@@ -6,6 +6,7 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 CONFIG_MODVERSIONS=y
 CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ARCH_MULTI_V7 is not set
 CONFIG_PLAT_SPEAR=y
 CONFIG_ARCH_SPEAR6XX=y
 CONFIG_BINFMT_MISC=y
diff --git a/arch/arm/mach-spear/Kconfig b/arch/arm/mach-spear/Kconfig
index e288df9..4c52ee2 100644
--- a/arch/arm/mach-spear/Kconfig
+++ b/arch/arm/mach-spear/Kconfig
@@ -2,14 +2,22 @@
 # SPEAr Platform configuration file
 #
 
-if PLAT_SPEAR
+menuconfig PLAT_SPEAR
+	bool "ST SPEAr Family" if ARCH_MULTI_V7 || ARCH_MULTI_V5
+	default PLAT_SPEAR_SINGLE
+	select ARCH_REQUIRE_GPIOLIB
+	select ARM_AMBA
+	select CLKDEV_LOOKUP
+	select CLKSRC_MMIO
+	select COMMON_CLK
+	select GENERIC_CLOCKEVENTS
+	select HAVE_CLK
 
-choice
-	prompt "ST SPEAr Family"
-	default ARCH_SPEAR3XX
+if PLAT_SPEAR
 
 config ARCH_SPEAR13XX
-	bool "ST SPEAr13xx with Device Tree"
+	bool "ST SPEAr13xx"
+	depends on ARCH_MULTI_V7 || PLAT_SPEAR_SINGLE
 	select ARCH_HAVE_CPUFREQ
 	select ARM_GIC
 	select CPU_V7
@@ -21,27 +29,8 @@ config ARCH_SPEAR13XX
 	help
 	  Supports for ARM's SPEAR13XX family
 
-config ARCH_SPEAR3XX
-	bool "ST SPEAr3xx with Device Tree"
-	select ARM_VIC
-	select CPU_ARM926T
-	select PINCTRL
-	select USE_OF
-	help
-	  Supports for ARM's SPEAR3XX family
-
-config ARCH_SPEAR6XX
-	bool "SPEAr6XX"
-	select ARM_VIC
-	select CPU_ARM926T
-	help
-	  Supports for ARM's SPEAR6XX family
-
-endchoice
-
 if ARCH_SPEAR13XX
 
-menu "SPEAr13xx Implementations"
 config MACH_SPEAR1310
 	bool "SPEAr1310 Machine support with Device Tree"
 	select PINCTRL_SPEAR1310
@@ -53,12 +42,22 @@ config MACH_SPEAR1340
 	select PINCTRL_SPEAR1340
 	help
 	  Supports ST SPEAr1340 machine configured via the device-tree
-endmenu
+
 endif #ARCH_SPEAR13XX
 
+config ARCH_SPEAR3XX
+	bool "ST SPEAr3xx"
+	depends on ARCH_MULTI_V5 || PLAT_SPEAR_SINGLE
+	depends on !ARCH_SPEAR13XX
+	select ARM_VIC
+	select CPU_ARM926T
+	select PINCTRL
+	select USE_OF
+	help
+	  Supports for ARM's SPEAR3XX family
+
 if ARCH_SPEAR3XX
 
-menu "SPEAr3xx Implementations"
 config MACH_SPEAR300
 	bool "SPEAr300 Machine support with Device Tree"
 	select PINCTRL_SPEAR300
@@ -76,10 +75,18 @@ config MACH_SPEAR320
 	select PINCTRL_SPEAR320
 	help
 	  Supports ST SPEAr320 machine configured via the device-tree
-endmenu
 
 endif
 
+config ARCH_SPEAR6XX
+	bool "ST SPEAr6XX"
+	depends on ARCH_MULTI_V5 || PLAT_SPEAR_SINGLE
+	depends on !ARCH_SPEAR13XX
+	select ARM_VIC
+	select CPU_ARM926T
+	help
+	  Supports for ARM's SPEAR6XX family
+
 config MACH_SPEAR600
 	def_bool y
 	depends on ARCH_SPEAR6XX
@@ -87,4 +94,10 @@ config MACH_SPEAR600
 	help
 	  Supports ST SPEAr600 boards configured via the device-treesource "arch/arm/mach-spear6xx/Kconfig"
 
+config ARCH_SPEAR_AUTO
+	def_bool PLAT_SPEAR_SINGLE
+	depends on !ARCH_SPEAR13XX && !ARCH_SPEAR6XX
+	select ARCH_SPEAR3XX
+
 endif
+
diff --git a/arch/arm/mach-spear/Makefile b/arch/arm/mach-spear/Makefile
index 8a937bf..dc9ce80 100644
--- a/arch/arm/mach-spear/Makefile
+++ b/arch/arm/mach-spear/Makefile
@@ -2,6 +2,8 @@
 # SPEAr Platform specific Makefile
 #
 
+ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
+
 # Common support
 obj-y	:= restart.o time.o
 
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 12/13] ARM: spear: fix build error in restart.c
  2013-03-12 16:46 [PATCH v2 00/13] ARM: spear multiplatform support Arnd Bergmann
                   ` (9 preceding siblings ...)
  2013-03-12 16:46 ` [PATCH v2 11/13] ARM: spear: use multiplatform configuration options Arnd Bergmann
@ 2013-03-12 16:46 ` Arnd Bergmann
  2013-03-12 16:46 ` [PATCH v2 13/13] ARM: spear: enable spear13xx in multi_v7_defconfig Arnd Bergmann
  2013-03-13  5:59 ` [PATCH v2 00/13] ARM: spear multiplatform support Viresh Kumar
  12 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2013-03-12 16:46 UTC (permalink / raw)
  To: linux-arm-kernel

We can now enable mach-spear without selecting any of the
machines in a multiplatform configuration.
Doing so causes a build error that is trivial to fix by
making both the spear13xx and the spear3xx/6xx portion of
this file conditional rather than alternatives.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-spear/restart.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-spear/restart.c b/arch/arm/mach-spear/restart.c
index 004f0f2..2b44500 100644
--- a/arch/arm/mach-spear/restart.c
+++ b/arch/arm/mach-spear/restart.c
@@ -26,7 +26,8 @@ void spear_restart(char mode, const char *cmd)
 		/* hardware reset, Use on-chip reset capability */
 #ifdef CONFIG_ARCH_SPEAR13XX
 		writel_relaxed(0x01, SPEAR13XX_SYS_SW_RES);
-#else
+#endif
+#if defined(CONFIG_ARCH_SPEAR3XX) || defined(CONFIG_ARCH_SPEAR6XX)
 		sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
 #endif
 	}
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 13/13] ARM: spear: enable spear13xx in multi_v7_defconfig
  2013-03-12 16:46 [PATCH v2 00/13] ARM: spear multiplatform support Arnd Bergmann
                   ` (10 preceding siblings ...)
  2013-03-12 16:46 ` [PATCH v2 12/13] ARM: spear: fix build error in restart.c Arnd Bergmann
@ 2013-03-12 16:46 ` Arnd Bergmann
  2013-03-13  5:59 ` [PATCH v2 00/13] ARM: spear multiplatform support Viresh Kumar
  12 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2013-03-12 16:46 UTC (permalink / raw)
  To: linux-arm-kernel

SPEAr13xx can now be part of the regular multiplatform defconfig,
so let's enable it there.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/configs/multi_v7_defconfig | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index e31d442..3bf0c54 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -10,6 +10,10 @@ CONFIG_ARCH_SUNXI=y
 # CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA is not set
 CONFIG_ARCH_ZYNQ=y
 CONFIG_ARM_ERRATA_754322=y
+CONFIG_PLAT_SPEAR=y
+CONFIG_ARCH_SPEAR13XX=y
+CONFIG_MACH_SPEAR1310=y
+CONFIG_MACH_SPEAR1340=y
 CONFIG_SMP=y
 CONFIG_ARM_ARCH_TIMER=y
 CONFIG_AEABI=y
@@ -23,6 +27,7 @@ CONFIG_BLK_DEV_SD=y
 CONFIG_ATA=y
 CONFIG_SATA_HIGHBANK=y
 CONFIG_SATA_MV=y
+CONFIG_SATA_AHCI_PLATFORM=y
 CONFIG_NETDEVICES=y
 CONFIG_NET_CALXEDA_XGMAC=y
 CONFIG_SMSC911X=y
@@ -31,6 +36,7 @@ CONFIG_SERIO_AMBAKMI=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_DW=y
+CONFIG_KEYBOARD_SPEAR=y
 CONFIG_SERIAL_AMBA_PL011=y
 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
 CONFIG_SERIAL_OF_PLATFORM=y
@@ -40,6 +46,7 @@ CONFIG_I2C=y
 CONFIG_I2C_DESIGNWARE_PLATFORM=y
 CONFIG_SPI=y
 CONFIG_SPI_PL022=y
+CONFIG_GPIO_PL061=y
 CONFIG_FB=y
 CONFIG_FB_ARMCLCD=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
@@ -50,6 +57,7 @@ CONFIG_MMC=y
 CONFIG_MMC_ARMMMCI=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SDHCI_SPEAR=y
 CONFIG_EDAC=y
 CONFIG_EDAC_MM_EDAC=y
 CONFIG_EDAC_HIGHBANK_MC=y
@@ -58,3 +66,4 @@ CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_PL031=y
 CONFIG_DMADEVICES=y
 CONFIG_PL330_DMA=y
+CONFIG_DW_DMAC=y
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 00/13] ARM: spear multiplatform support
  2013-03-12 16:46 [PATCH v2 00/13] ARM: spear multiplatform support Arnd Bergmann
                   ` (11 preceding siblings ...)
  2013-03-12 16:46 ` [PATCH v2 13/13] ARM: spear: enable spear13xx in multi_v7_defconfig Arnd Bergmann
@ 2013-03-13  5:59 ` Viresh Kumar
  2013-03-13  6:04   ` vipul kumar samar
  12 siblings, 1 reply; 18+ messages in thread
From: Viresh Kumar @ 2013-03-13  5:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 13, 2013 at 12:46 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> This is the second time I post the SPEAr multiplatform patches.
> It did not work out for 3.9, mostly because of conflicts against
> patches in the DMA tree, but also because I did not push very
> hard for these. The patches are basically unchanged now, just
> some context differences since I rebased them on top of 3.9-rc2.
>
> I'm adding them to the arm-soc tree for 3.10 now. If there are
> any bugs, let's fix them on top of this branch. It would be
> good to get some more testing on the branch though.

I thought i would meet you at Connect, but last time i didn't come and
this time you :)

Anyways thanks for all the good work you have done for SPEAr. These
are already Acked by me

@Vipul: Can you give these a try? Please consider following which we got
from the last discussion:

From: Arnd...

Thanks for testing out the patches. I forgot about the loadaddress,
which indeed does not get set for multiplatform kernels, because
the kernel does not know the correct address when it depends on
the platform you are booting on.

The recommended solution for this is to boot a normal 'vmlinux'
or 'zImage' file rather than a uImage file. If you u-boot version
is too old for that and you cannot update, you can manually
call 'mkimage' to create a uImage file with the correct load
address.

--
viresh

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 00/13] ARM: spear multiplatform support
  2013-03-13  5:59 ` [PATCH v2 00/13] ARM: spear multiplatform support Viresh Kumar
@ 2013-03-13  6:04   ` vipul kumar samar
  0 siblings, 0 replies; 18+ messages in thread
From: vipul kumar samar @ 2013-03-13  6:04 UTC (permalink / raw)
  To: linux-arm-kernel

On 3/13/2013 11:29 AM, Viresh Kumar wrote:
> On Wed, Mar 13, 2013 at 12:46 AM, Arnd Bergmann<arnd@arndb.de>  wrote:
>> This is the second time I post the SPEAr multiplatform patches.
>> It did not work out for 3.9, mostly because of conflicts against
>> patches in the DMA tree, but also because I did not push very
>> hard for these. The patches are basically unchanged now, just
>> some context differences since I rebased them on top of 3.9-rc2.
>>
>> I'm adding them to the arm-soc tree for 3.10 now. If there are
>> any bugs, let's fix them on top of this branch. It would be
>> good to get some more testing on the branch though.
>
> I thought i would meet you at Connect, but last time i didn't come and
> this time you :)
>
> Anyways thanks for all the good work you have done for SPEAr. These
> are already Acked by me
>
> @Vipul: Can you give these a try? Please consider following which we got
> from the last discussion:

ohk, i'll test this patch set and update you ASAP.

>
> From: Arnd...
>
> Thanks for testing out the patches. I forgot about the loadaddress,
> which indeed does not get set for multiplatform kernels, because
> the kernel does not know the correct address when it depends on
> the platform you are booting on.
>
> The recommended solution for this is to boot a normal 'vmlinux'
> or 'zImage' file rather than a uImage file. If you u-boot version
> is too old for that and you cannot update, you can manually
> call 'mkimage' to create a uImage file with the correct load
> address.

Ohk.

Regards
Vipul Samar

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 09/13] ARM: spear: make clock driver independent of headers
  2013-03-12 16:46 ` [PATCH v2 09/13] ARM: spear: make clock driver independent of headers Arnd Bergmann
@ 2013-03-22 18:51   ` Mike Turquette
  2013-03-22 19:34     ` Arnd Bergmann
  0 siblings, 1 reply; 18+ messages in thread
From: Mike Turquette @ 2013-03-22 18:51 UTC (permalink / raw)
  To: linux-arm-kernel

Quoting Arnd Bergmann (2013-03-12 09:46:52)
> Device drivers should not access MMIO registers through hardcoded
> platform specific address constants. Instead, we can pass the
> MMIO token to the spear clock driver in the initialization routine
> to contain that knowledge in the platform code itself.
> 
> Ideally, the clock driver would use of_iomap() or similar to
> get the address, and that can be used later, but for now, this
> is the minimal change.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

Hi Arnd,

Do you want this patch to go through clk-next, or all together with the
rest of the series?

Regards,
Mike

> ---
>  arch/arm/mach-spear/generic.h                | 13 +++---
>  arch/arm/mach-spear/include/mach/misc_regs.h |  2 +-
>  arch/arm/mach-spear/include/mach/spear.h     | 28 +++++-------
>  arch/arm/mach-spear/spear1310.c              |  2 -
>  arch/arm/mach-spear/spear13xx.c              |  4 +-
>  arch/arm/mach-spear/spear320.c               |  2 +-
>  arch/arm/mach-spear/spear3xx.c               |  7 +--
>  arch/arm/mach-spear/spear6xx.c               |  9 ++--
>  drivers/clk/spear/spear1310_clock.c          | 64 ++++++++++++++--------------
>  drivers/clk/spear/spear1340_clock.c          | 63 ++++++++++++++-------------
>  drivers/clk/spear/spear3xx_clock.c           | 60 +++++++++++++++-----------
>  drivers/clk/spear/spear6xx_clock.c           | 31 +++++++-------
>  12 files changed, 143 insertions(+), 142 deletions(-)
> 
> diff --git a/arch/arm/mach-spear/generic.h b/arch/arm/mach-spear/generic.h
> index af47d9b..8ba7e75 100644
> --- a/arch/arm/mach-spear/generic.h
> +++ b/arch/arm/mach-spear/generic.h
> @@ -29,10 +29,11 @@ extern struct dw_dma_slave nand_write_dma_priv;
>  bool dw_dma_filter(struct dma_chan *chan, void *slave);
>  
>  void __init spear_setup_of_timer(void);
> -void __init spear3xx_clk_init(void);
> +void __init spear3xx_clk_init(void __iomem *misc_base,
> +                             void __iomem *soc_config_base);
>  void __init spear3xx_map_io(void);
>  void __init spear3xx_dt_init_irq(void);
> -void __init spear6xx_clk_init(void);
> +void __init spear6xx_clk_init(void __iomem *misc_base);
>  void __init spear13xx_map_io(void);
>  void __init spear13xx_l2x0_init(void);
>  
> @@ -44,15 +45,15 @@ void __cpuinit spear13xx_cpu_die(unsigned int cpu);
>  extern struct smp_operations spear13xx_smp_ops;
>  
>  #ifdef CONFIG_MACH_SPEAR1310
> -void __init spear1310_clk_init(void);
> +void __init spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base);
>  #else
> -static inline void spear1310_clk_init(void) {}
> +static inline void spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base) {}
>  #endif
>  
>  #ifdef CONFIG_MACH_SPEAR1340
> -void __init spear1340_clk_init(void);
> +void __init spear1340_clk_init(void __iomem *misc_base);
>  #else
> -static inline void spear1340_clk_init(void) {}
> +static inline void spear1340_clk_init(void __iomem *misc_base) {}
>  #endif
>  
>  #endif /* __MACH_GENERIC_H */
> diff --git a/arch/arm/mach-spear/include/mach/misc_regs.h b/arch/arm/mach-spear/include/mach/misc_regs.h
> index 075812c..935639c 100644
> --- a/arch/arm/mach-spear/include/mach/misc_regs.h
> +++ b/arch/arm/mach-spear/include/mach/misc_regs.h
> @@ -16,7 +16,7 @@
>  
>  #include <mach/spear.h>
>  
> -#define MISC_BASE              IOMEM(VA_SPEAR_ICM3_MISC_REG_BASE)
> +#define MISC_BASE              (VA_SPEAR_ICM3_MISC_REG_BASE)
>  #define DMA_CHN_CFG            (MISC_BASE + 0x0A0)
>  
>  #endif /* __MACH_MISC_REGS_H */
> diff --git a/arch/arm/mach-spear/include/mach/spear.h b/arch/arm/mach-spear/include/mach/spear.h
> index 2198ab9..374ddc3 100644
> --- a/arch/arm/mach-spear/include/mach/spear.h
> +++ b/arch/arm/mach-spear/include/mach/spear.h
> @@ -19,23 +19,23 @@
>  
>  /* ICM1 - Low speed connection */
>  #define SPEAR_ICM1_2_BASE              UL(0xD0000000)
> -#define VA_SPEAR_ICM1_2_BASE           UL(0xFD000000)
> +#define VA_SPEAR_ICM1_2_BASE           IOMEM(0xFD000000)
>  #define SPEAR_ICM1_UART_BASE           UL(0xD0000000)
> -#define VA_SPEAR_ICM1_UART_BASE                (VA_SPEAR_ICM1_2_BASE | SPEAR_ICM1_UART_BASE)
> +#define VA_SPEAR_ICM1_UART_BASE                (VA_SPEAR_ICM1_2_BASE - SPEAR_ICM1_2_BASE + SPEAR_ICM1_UART_BASE)
>  #define SPEAR3XX_ICM1_SSP_BASE         UL(0xD0100000)
>  
>  /* ML-1, 2 - Multi Layer CPU Subsystem */
>  #define SPEAR_ICM3_ML1_2_BASE          UL(0xF0000000)
> -#define VA_SPEAR6XX_ML_CPU_BASE                UL(0xF0000000)
> +#define VA_SPEAR6XX_ML_CPU_BASE                IOMEM(0xF0000000)
>  
>  /* ICM3 - Basic Subsystem */
>  #define SPEAR_ICM3_SMI_CTRL_BASE       UL(0xFC000000)
> -#define VA_SPEAR_ICM3_SMI_CTRL_BASE    UL(0xFC000000)
> +#define VA_SPEAR_ICM3_SMI_CTRL_BASE    IOMEM(0xFC000000)
>  #define SPEAR_ICM3_DMA_BASE            UL(0xFC400000)
>  #define SPEAR_ICM3_SYS_CTRL_BASE       UL(0xFCA00000)
> -#define VA_SPEAR_ICM3_SYS_CTRL_BASE    (VA_SPEAR_ICM3_SMI_CTRL_BASE | SPEAR_ICM3_SYS_CTRL_BASE)
> +#define VA_SPEAR_ICM3_SYS_CTRL_BASE    (VA_SPEAR_ICM3_SMI_CTRL_BASE - SPEAR_ICM3_SMI_CTRL_BASE + SPEAR_ICM3_SYS_CTRL_BASE)
>  #define SPEAR_ICM3_MISC_REG_BASE       UL(0xFCA80000)
> -#define VA_SPEAR_ICM3_MISC_REG_BASE    (VA_SPEAR_ICM3_SMI_CTRL_BASE | SPEAR_ICM3_MISC_REG_BASE)
> +#define VA_SPEAR_ICM3_MISC_REG_BASE    (VA_SPEAR_ICM3_SMI_CTRL_BASE - SPEAR_ICM3_SMI_CTRL_BASE + SPEAR_ICM3_MISC_REG_BASE)
>  
>  /* Debug uart for linux, will be used for debug and uncompress messages */
>  #define SPEAR_DBG_UART_BASE            SPEAR_ICM1_UART_BASE
> @@ -44,20 +44,11 @@
>  /* Sysctl base for spear platform */
>  #define SPEAR_SYS_CTRL_BASE            SPEAR_ICM3_SYS_CTRL_BASE
>  #define VA_SPEAR_SYS_CTRL_BASE         VA_SPEAR_ICM3_SYS_CTRL_BASE
> +#endif /* SPEAR3xx || SPEAR6XX */
>  
>  /* SPEAr320 Macros */
>  #define SPEAR320_SOC_CONFIG_BASE       UL(0xB3000000)
> -#define VA_SPEAR320_SOC_CONFIG_BASE    UL(0xFE000000)
> -#define SPEAR320_CONTROL_REG           IOMEM(VA_SPEAR320_SOC_CONFIG_BASE)
> -#define SPEAR320_EXT_CTRL_REG          IOMEM(VA_SPEAR320_SOC_CONFIG_BASE + 0x0018)
> -       #define SPEAR320_UARTX_PCLK_MASK                0x1
> -       #define SPEAR320_UART2_PCLK_SHIFT               8
> -       #define SPEAR320_UART3_PCLK_SHIFT               9
> -       #define SPEAR320_UART4_PCLK_SHIFT               10
> -       #define SPEAR320_UART5_PCLK_SHIFT               11
> -       #define SPEAR320_UART6_PCLK_SHIFT               12
> -       #define SPEAR320_RS485_PCLK_SHIFT               13
> -#endif /* SPEAR3xx || SPEAR6XX */
> +#define VA_SPEAR320_SOC_CONFIG_BASE    IOMEM(0xFE000000)
>  
>  #ifdef CONFIG_ARCH_SPEAR13XX
>  
> @@ -79,6 +70,9 @@
>  #define A9SM_AND_MPMC_BASE                     UL(0xEC000000)
>  #define VA_A9SM_AND_MPMC_BASE                  IOMEM(0xFC000000)
>  
> +#define SPEAR1310_RAS_BASE                     UL(0xD8400000)
> +#define VA_SPEAR1310_RAS_BASE                  IOMEM(UL(0xFA400000))
> +
>  /* A9SM peripheral offsets */
>  #define A9SM_PERIP_BASE                                UL(0xEC800000)
>  #define VA_A9SM_PERIP_BASE                     IOMEM(0xFC800000)
> diff --git a/arch/arm/mach-spear/spear1310.c b/arch/arm/mach-spear/spear1310.c
> index fe868b2..ed3b5c2 100644
> --- a/arch/arm/mach-spear/spear1310.c
> +++ b/arch/arm/mach-spear/spear1310.c
> @@ -30,8 +30,6 @@
>  
>  #define SPEAR1310_RAS_GRP1_BASE                        UL(0xD8000000)
>  #define VA_SPEAR1310_RAS_GRP1_BASE             UL(0xFA000000)
> -#define SPEAR1310_RAS_BASE                     UL(0xD8400000)
> -#define VA_SPEAR1310_RAS_BASE                  IOMEM(UL(0xFA400000))
>  
>  static struct arasan_cf_pdata cf_pdata = {
>         .cf_if_clk = CF_IF_CLK_166M,
> diff --git a/arch/arm/mach-spear/spear13xx.c b/arch/arm/mach-spear/spear13xx.c
> index 6f62dd5..1b97e86 100644
> --- a/arch/arm/mach-spear/spear13xx.c
> +++ b/arch/arm/mach-spear/spear13xx.c
> @@ -146,9 +146,9 @@ void __init spear13xx_map_io(void)
>  static void __init spear13xx_clk_init(void)
>  {
>         if (of_machine_is_compatible("st,spear1310"))
> -               spear1310_clk_init();
> +               spear1310_clk_init(VA_MISC_BASE, VA_SPEAR1310_RAS_BASE);
>         else if (of_machine_is_compatible("st,spear1340"))
> -               spear1340_clk_init();
> +               spear1340_clk_init(VA_MISC_BASE);
>         else
>                 pr_err("%s: Unknown machine\n", __func__);
>  }
> diff --git a/arch/arm/mach-spear/spear320.c b/arch/arm/mach-spear/spear320.c
> index b8a4bb5..6eb3eec 100644
> --- a/arch/arm/mach-spear/spear320.c
> +++ b/arch/arm/mach-spear/spear320.c
> @@ -254,7 +254,7 @@ static const char * const spear320_dt_board_compat[] = {
>  
>  struct map_desc spear320_io_desc[] __initdata = {
>         {
> -               .virtual        = VA_SPEAR320_SOC_CONFIG_BASE,
> +               .virtual        = (unsigned long)VA_SPEAR320_SOC_CONFIG_BASE,
>                 .pfn            = __phys_to_pfn(SPEAR320_SOC_CONFIG_BASE),
>                 .length         = SZ_16M,
>                 .type           = MT_DEVICE
> diff --git a/arch/arm/mach-spear/spear3xx.c b/arch/arm/mach-spear/spear3xx.c
> index be0c94d..0227c97 100644
> --- a/arch/arm/mach-spear/spear3xx.c
> +++ b/arch/arm/mach-spear/spear3xx.c
> @@ -21,6 +21,7 @@
>  #include "pl080.h"
>  #include "generic.h"
>  #include <mach/spear.h>
> +#include <mach/misc_regs.h>
>  
>  /* ssp device registration */
>  struct pl022_ssp_controller pl022_plat_data = {
> @@ -67,12 +68,12 @@ struct pl08x_platform_data pl080_plat_data = {
>   */
>  struct map_desc spear3xx_io_desc[] __initdata = {
>         {
> -               .virtual        = VA_SPEAR_ICM1_2_BASE,
> +               .virtual        = (unsigned long)VA_SPEAR_ICM1_2_BASE,
>                 .pfn            = __phys_to_pfn(SPEAR_ICM1_2_BASE),
>                 .length         = SZ_16M,
>                 .type           = MT_DEVICE
>         }, {
> -               .virtual        = VA_SPEAR_ICM3_SMI_CTRL_BASE,
> +               .virtual        = (unsigned long)VA_SPEAR_ICM3_SMI_CTRL_BASE,
>                 .pfn            = __phys_to_pfn(SPEAR_ICM3_SMI_CTRL_BASE),
>                 .length         = SZ_16M,
>                 .type           = MT_DEVICE
> @@ -90,7 +91,7 @@ void __init spear3xx_timer_init(void)
>         char pclk_name[] = "pll3_clk";
>         struct clk *gpt_clk, *pclk;
>  
> -       spear3xx_clk_init();
> +       spear3xx_clk_init(MISC_BASE, VA_SPEAR320_SOC_CONFIG_BASE);
>  
>         /* get the system timer clock */
>         gpt_clk = clk_get_sys("gpt0", NULL);
> diff --git a/arch/arm/mach-spear/spear6xx.c b/arch/arm/mach-spear/spear6xx.c
> index 78e1359..9b5ea25 100644
> --- a/arch/arm/mach-spear/spear6xx.c
> +++ b/arch/arm/mach-spear/spear6xx.c
> @@ -27,6 +27,7 @@
>  #include "pl080.h"
>  #include "generic.h"
>  #include <mach/spear.h>
> +#include <mach/misc_regs.h>
>  
>  /* dmac device registration */
>  static struct pl08x_channel_data spear600_dma_info[] = {
> @@ -350,17 +351,17 @@ struct pl08x_platform_data pl080_plat_data = {
>   */
>  struct map_desc spear6xx_io_desc[] __initdata = {
>         {
> -               .virtual        = VA_SPEAR6XX_ML_CPU_BASE,
> +               .virtual        = (unsigned long)VA_SPEAR6XX_ML_CPU_BASE,
>                 .pfn            = __phys_to_pfn(SPEAR_ICM3_ML1_2_BASE),
>                 .length         = 2 * SZ_16M,
>                 .type           = MT_DEVICE
>         },      {
> -               .virtual        = VA_SPEAR_ICM1_2_BASE,
> +               .virtual        = (unsigned long)VA_SPEAR_ICM1_2_BASE,
>                 .pfn            = __phys_to_pfn(SPEAR_ICM1_2_BASE),
>                 .length         = SZ_16M,
>                 .type           = MT_DEVICE
>         }, {
> -               .virtual        = VA_SPEAR_ICM3_SMI_CTRL_BASE,
> +               .virtual        = (unsigned long)VA_SPEAR_ICM3_SMI_CTRL_BASE,
>                 .pfn            = __phys_to_pfn(SPEAR_ICM3_SMI_CTRL_BASE),
>                 .length         = SZ_16M,
>                 .type           = MT_DEVICE
> @@ -378,7 +379,7 @@ void __init spear6xx_timer_init(void)
>         char pclk_name[] = "pll3_clk";
>         struct clk *gpt_clk, *pclk;
>  
> -       spear6xx_clk_init();
> +       spear6xx_clk_init(MISC_BASE);
>  
>         /* get the system timer clock */
>         gpt_clk = clk_get_sys("gpt0", NULL);
> diff --git a/drivers/clk/spear/spear1310_clock.c b/drivers/clk/spear/spear1310_clock.c
> index ed9af42..aedbbe1 100644
> --- a/drivers/clk/spear/spear1310_clock.c
> +++ b/drivers/clk/spear/spear1310_clock.c
> @@ -17,12 +17,10 @@
>  #include <linux/io.h>
>  #include <linux/of_platform.h>
>  #include <linux/spinlock_types.h>
> -#include <mach/spear.h>
>  #include "clk.h"
>  
> -#define VA_SPEAR1310_RAS_BASE                  IOMEM(UL(0xFA400000))
>  /* PLL related registers and bit values */
> -#define SPEAR1310_PLL_CFG                      (VA_MISC_BASE + 0x210)
> +#define SPEAR1310_PLL_CFG                      (misc_base + 0x210)
>         /* PLL_CFG bit values */
>         #define SPEAR1310_CLCD_SYNT_CLK_MASK            1
>         #define SPEAR1310_CLCD_SYNT_CLK_SHIFT           31
> @@ -35,15 +33,15 @@
>         #define SPEAR1310_PLL2_CLK_SHIFT                22
>         #define SPEAR1310_PLL1_CLK_SHIFT                20
>  
> -#define SPEAR1310_PLL1_CTR                     (VA_MISC_BASE + 0x214)
> -#define SPEAR1310_PLL1_FRQ                     (VA_MISC_BASE + 0x218)
> -#define SPEAR1310_PLL2_CTR                     (VA_MISC_BASE + 0x220)
> -#define SPEAR1310_PLL2_FRQ                     (VA_MISC_BASE + 0x224)
> -#define SPEAR1310_PLL3_CTR                     (VA_MISC_BASE + 0x22C)
> -#define SPEAR1310_PLL3_FRQ                     (VA_MISC_BASE + 0x230)
> -#define SPEAR1310_PLL4_CTR                     (VA_MISC_BASE + 0x238)
> -#define SPEAR1310_PLL4_FRQ                     (VA_MISC_BASE + 0x23C)
> -#define SPEAR1310_PERIP_CLK_CFG                        (VA_MISC_BASE + 0x244)
> +#define SPEAR1310_PLL1_CTR                     (misc_base + 0x214)
> +#define SPEAR1310_PLL1_FRQ                     (misc_base + 0x218)
> +#define SPEAR1310_PLL2_CTR                     (misc_base + 0x220)
> +#define SPEAR1310_PLL2_FRQ                     (misc_base + 0x224)
> +#define SPEAR1310_PLL3_CTR                     (misc_base + 0x22C)
> +#define SPEAR1310_PLL3_FRQ                     (misc_base + 0x230)
> +#define SPEAR1310_PLL4_CTR                     (misc_base + 0x238)
> +#define SPEAR1310_PLL4_FRQ                     (misc_base + 0x23C)
> +#define SPEAR1310_PERIP_CLK_CFG                        (misc_base + 0x244)
>         /* PERIP_CLK_CFG bit values */
>         #define SPEAR1310_GPT_OSC24_VAL                 0
>         #define SPEAR1310_GPT_APB_VAL                   1
> @@ -65,7 +63,7 @@
>         #define SPEAR1310_C3_CLK_MASK                   1
>         #define SPEAR1310_C3_CLK_SHIFT                  1
>  
> -#define SPEAR1310_GMAC_CLK_CFG                 (VA_MISC_BASE + 0x248)
> +#define SPEAR1310_GMAC_CLK_CFG                 (misc_base + 0x248)
>         #define SPEAR1310_GMAC_PHY_IF_SEL_MASK          3
>         #define SPEAR1310_GMAC_PHY_IF_SEL_SHIFT         4
>         #define SPEAR1310_GMAC_PHY_CLK_MASK             1
> @@ -73,7 +71,7 @@
>         #define SPEAR1310_GMAC_PHY_INPUT_CLK_MASK       2
>         #define SPEAR1310_GMAC_PHY_INPUT_CLK_SHIFT      1
>  
> -#define SPEAR1310_I2S_CLK_CFG                  (VA_MISC_BASE + 0x24C)
> +#define SPEAR1310_I2S_CLK_CFG                  (misc_base + 0x24C)
>         /* I2S_CLK_CFG register mask */
>         #define SPEAR1310_I2S_SCLK_X_MASK               0x1F
>         #define SPEAR1310_I2S_SCLK_X_SHIFT              27
> @@ -91,21 +89,21 @@
>         #define SPEAR1310_I2S_SRC_CLK_MASK              2
>         #define SPEAR1310_I2S_SRC_CLK_SHIFT             0
>  
> -#define SPEAR1310_C3_CLK_SYNT                  (VA_MISC_BASE + 0x250)
> -#define SPEAR1310_UART_CLK_SYNT                        (VA_MISC_BASE + 0x254)
> -#define SPEAR1310_GMAC_CLK_SYNT                        (VA_MISC_BASE + 0x258)
> -#define SPEAR1310_SDHCI_CLK_SYNT               (VA_MISC_BASE + 0x25C)
> -#define SPEAR1310_CFXD_CLK_SYNT                        (VA_MISC_BASE + 0x260)
> -#define SPEAR1310_ADC_CLK_SYNT                 (VA_MISC_BASE + 0x264)
> -#define SPEAR1310_AMBA_CLK_SYNT                        (VA_MISC_BASE + 0x268)
> -#define SPEAR1310_CLCD_CLK_SYNT                        (VA_MISC_BASE + 0x270)
> -#define SPEAR1310_RAS_CLK_SYNT0                        (VA_MISC_BASE + 0x280)
> -#define SPEAR1310_RAS_CLK_SYNT1                        (VA_MISC_BASE + 0x288)
> -#define SPEAR1310_RAS_CLK_SYNT2                        (VA_MISC_BASE + 0x290)
> -#define SPEAR1310_RAS_CLK_SYNT3                        (VA_MISC_BASE + 0x298)
> +#define SPEAR1310_C3_CLK_SYNT                  (misc_base + 0x250)
> +#define SPEAR1310_UART_CLK_SYNT                        (misc_base + 0x254)
> +#define SPEAR1310_GMAC_CLK_SYNT                        (misc_base + 0x258)
> +#define SPEAR1310_SDHCI_CLK_SYNT               (misc_base + 0x25C)
> +#define SPEAR1310_CFXD_CLK_SYNT                        (misc_base + 0x260)
> +#define SPEAR1310_ADC_CLK_SYNT                 (misc_base + 0x264)
> +#define SPEAR1310_AMBA_CLK_SYNT                        (misc_base + 0x268)
> +#define SPEAR1310_CLCD_CLK_SYNT                        (misc_base + 0x270)
> +#define SPEAR1310_RAS_CLK_SYNT0                        (misc_base + 0x280)
> +#define SPEAR1310_RAS_CLK_SYNT1                        (misc_base + 0x288)
> +#define SPEAR1310_RAS_CLK_SYNT2                        (misc_base + 0x290)
> +#define SPEAR1310_RAS_CLK_SYNT3                        (misc_base + 0x298)
>         /* Check Fractional synthesizer reg masks */
>  
> -#define SPEAR1310_PERIP1_CLK_ENB               (VA_MISC_BASE + 0x300)
> +#define SPEAR1310_PERIP1_CLK_ENB               (misc_base + 0x300)
>         /* PERIP1_CLK_ENB register masks */
>         #define SPEAR1310_RTC_CLK_ENB                   31
>         #define SPEAR1310_ADC_CLK_ENB                   30
> @@ -138,7 +136,7 @@
>         #define SPEAR1310_SYSROM_CLK_ENB                1
>         #define SPEAR1310_BUS_CLK_ENB                   0
>  
> -#define SPEAR1310_PERIP2_CLK_ENB               (VA_MISC_BASE + 0x304)
> +#define SPEAR1310_PERIP2_CLK_ENB               (misc_base + 0x304)
>         /* PERIP2_CLK_ENB register masks */
>         #define SPEAR1310_THSENS_CLK_ENB                8
>         #define SPEAR1310_I2S_REF_PAD_CLK_ENB           7
> @@ -150,7 +148,7 @@
>         #define SPEAR1310_DDR_CORE_CLK_ENB              1
>         #define SPEAR1310_DDR_CTRL_CLK_ENB              0
>  
> -#define SPEAR1310_RAS_CLK_ENB                  (VA_MISC_BASE + 0x310)
> +#define SPEAR1310_RAS_CLK_ENB                  (misc_base + 0x310)
>         /* RAS_CLK_ENB register masks */
>         #define SPEAR1310_SYNT3_CLK_ENB                 17
>         #define SPEAR1310_SYNT2_CLK_ENB                 16
> @@ -172,7 +170,7 @@
>         #define SPEAR1310_ACLK_CLK_ENB                  0
>  
>  /* RAS Area Control Register */
> -#define SPEAR1310_RAS_CTRL_REG0                        (VA_SPEAR1310_RAS_BASE + 0x000)
> +#define SPEAR1310_RAS_CTRL_REG0                        (ras_base + 0x000)
>         #define SPEAR1310_SSP1_CLK_MASK                 3
>         #define SPEAR1310_SSP1_CLK_SHIFT                26
>         #define SPEAR1310_TDM_CLK_MASK                  1
> @@ -197,12 +195,12 @@
>         #define SPEAR1310_PCI_CLK_MASK                  1
>         #define SPEAR1310_PCI_CLK_SHIFT                 0
>  
> -#define SPEAR1310_RAS_CTRL_REG1                        (VA_SPEAR1310_RAS_BASE + 0x004)
> +#define SPEAR1310_RAS_CTRL_REG1                        (ras_base + 0x004)
>         #define SPEAR1310_PHY_CLK_MASK                  0x3
>         #define SPEAR1310_RMII_PHY_CLK_SHIFT            0
>         #define SPEAR1310_SMII_RGMII_PHY_CLK_SHIFT      2
>  
> -#define SPEAR1310_RAS_SW_CLK_CTRL              (VA_SPEAR1310_RAS_BASE + 0x0148)
> +#define SPEAR1310_RAS_SW_CLK_CTRL              (ras_base + 0x0148)
>         #define SPEAR1310_CAN1_CLK_ENB                  25
>         #define SPEAR1310_CAN0_CLK_ENB                  24
>         #define SPEAR1310_GPT64_CLK_ENB                 23
> @@ -385,7 +383,7 @@ static const char *ssp1_parents[] = { "ras_apb_clk", "gen_syn1_clk",
>  static const char *pci_parents[] = { "ras_pll3_clk", "gen_syn2_clk", };
>  static const char *tdm_parents[] = { "ras_pll3_clk", "gen_syn1_clk", };
>  
> -void __init spear1310_clk_init(void)
> +void __init spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base)
>  {
>         struct clk *clk, *clk1;
>  
> diff --git a/drivers/clk/spear/spear1340_clock.c b/drivers/clk/spear/spear1340_clock.c
> index 82abea3..3ceb450 100644
> --- a/drivers/clk/spear/spear1340_clock.c
> +++ b/drivers/clk/spear/spear1340_clock.c
> @@ -17,18 +17,17 @@
>  #include <linux/io.h>
>  #include <linux/of_platform.h>
>  #include <linux/spinlock_types.h>
> -#include <mach/spear.h>
>  #include "clk.h"
>  
>  /* Clock Configuration Registers */
> -#define SPEAR1340_SYS_CLK_CTRL                 (VA_MISC_BASE + 0x200)
> +#define SPEAR1340_SYS_CLK_CTRL                 (misc_base + 0x200)
>         #define SPEAR1340_HCLK_SRC_SEL_SHIFT    27
>         #define SPEAR1340_HCLK_SRC_SEL_MASK     1
>         #define SPEAR1340_SCLK_SRC_SEL_SHIFT    23
>         #define SPEAR1340_SCLK_SRC_SEL_MASK     3
>  
>  /* PLL related registers and bit values */
> -#define SPEAR1340_PLL_CFG                      (VA_MISC_BASE + 0x210)
> +#define SPEAR1340_PLL_CFG                      (misc_base + 0x210)
>         /* PLL_CFG bit values */
>         #define SPEAR1340_CLCD_SYNT_CLK_MASK            1
>         #define SPEAR1340_CLCD_SYNT_CLK_SHIFT           31
> @@ -40,15 +39,15 @@
>         #define SPEAR1340_PLL2_CLK_SHIFT                22
>         #define SPEAR1340_PLL1_CLK_SHIFT                20
>  
> -#define SPEAR1340_PLL1_CTR                     (VA_MISC_BASE + 0x214)
> -#define SPEAR1340_PLL1_FRQ                     (VA_MISC_BASE + 0x218)
> -#define SPEAR1340_PLL2_CTR                     (VA_MISC_BASE + 0x220)
> -#define SPEAR1340_PLL2_FRQ                     (VA_MISC_BASE + 0x224)
> -#define SPEAR1340_PLL3_CTR                     (VA_MISC_BASE + 0x22C)
> -#define SPEAR1340_PLL3_FRQ                     (VA_MISC_BASE + 0x230)
> -#define SPEAR1340_PLL4_CTR                     (VA_MISC_BASE + 0x238)
> -#define SPEAR1340_PLL4_FRQ                     (VA_MISC_BASE + 0x23C)
> -#define SPEAR1340_PERIP_CLK_CFG                        (VA_MISC_BASE + 0x244)
> +#define SPEAR1340_PLL1_CTR                     (misc_base + 0x214)
> +#define SPEAR1340_PLL1_FRQ                     (misc_base + 0x218)
> +#define SPEAR1340_PLL2_CTR                     (misc_base + 0x220)
> +#define SPEAR1340_PLL2_FRQ                     (misc_base + 0x224)
> +#define SPEAR1340_PLL3_CTR                     (misc_base + 0x22C)
> +#define SPEAR1340_PLL3_FRQ                     (misc_base + 0x230)
> +#define SPEAR1340_PLL4_CTR                     (misc_base + 0x238)
> +#define SPEAR1340_PLL4_FRQ                     (misc_base + 0x23C)
> +#define SPEAR1340_PERIP_CLK_CFG                        (misc_base + 0x244)
>         /* PERIP_CLK_CFG bit values */
>         #define SPEAR1340_SPDIF_CLK_MASK                1
>         #define SPEAR1340_SPDIF_OUT_CLK_SHIFT           15
> @@ -66,13 +65,13 @@
>         #define SPEAR1340_C3_CLK_MASK                   1
>         #define SPEAR1340_C3_CLK_SHIFT                  1
>  
> -#define SPEAR1340_GMAC_CLK_CFG                 (VA_MISC_BASE + 0x248)
> +#define SPEAR1340_GMAC_CLK_CFG                 (misc_base + 0x248)
>         #define SPEAR1340_GMAC_PHY_CLK_MASK             1
>         #define SPEAR1340_GMAC_PHY_CLK_SHIFT            2
>         #define SPEAR1340_GMAC_PHY_INPUT_CLK_MASK       2
>         #define SPEAR1340_GMAC_PHY_INPUT_CLK_SHIFT      0
>  
> -#define SPEAR1340_I2S_CLK_CFG                  (VA_MISC_BASE + 0x24C)
> +#define SPEAR1340_I2S_CLK_CFG                  (misc_base + 0x24C)
>         /* I2S_CLK_CFG register mask */
>         #define SPEAR1340_I2S_SCLK_X_MASK               0x1F
>         #define SPEAR1340_I2S_SCLK_X_SHIFT              27
> @@ -90,21 +89,21 @@
>         #define SPEAR1340_I2S_SRC_CLK_MASK              2
>         #define SPEAR1340_I2S_SRC_CLK_SHIFT             0
>  
> -#define SPEAR1340_C3_CLK_SYNT                  (VA_MISC_BASE + 0x250)
> -#define SPEAR1340_UART0_CLK_SYNT               (VA_MISC_BASE + 0x254)
> -#define SPEAR1340_UART1_CLK_SYNT               (VA_MISC_BASE + 0x258)
> -#define SPEAR1340_GMAC_CLK_SYNT                        (VA_MISC_BASE + 0x25C)
> -#define SPEAR1340_SDHCI_CLK_SYNT               (VA_MISC_BASE + 0x260)
> -#define SPEAR1340_CFXD_CLK_SYNT                        (VA_MISC_BASE + 0x264)
> -#define SPEAR1340_ADC_CLK_SYNT                 (VA_MISC_BASE + 0x270)
> -#define SPEAR1340_AMBA_CLK_SYNT                        (VA_MISC_BASE + 0x274)
> -#define SPEAR1340_CLCD_CLK_SYNT                        (VA_MISC_BASE + 0x27C)
> -#define SPEAR1340_SYS_CLK_SYNT                 (VA_MISC_BASE + 0x284)
> -#define SPEAR1340_GEN_CLK_SYNT0                        (VA_MISC_BASE + 0x28C)
> -#define SPEAR1340_GEN_CLK_SYNT1                        (VA_MISC_BASE + 0x294)
> -#define SPEAR1340_GEN_CLK_SYNT2                        (VA_MISC_BASE + 0x29C)
> -#define SPEAR1340_GEN_CLK_SYNT3                        (VA_MISC_BASE + 0x304)
> -#define SPEAR1340_PERIP1_CLK_ENB               (VA_MISC_BASE + 0x30C)
> +#define SPEAR1340_C3_CLK_SYNT                  (misc_base + 0x250)
> +#define SPEAR1340_UART0_CLK_SYNT               (misc_base + 0x254)
> +#define SPEAR1340_UART1_CLK_SYNT               (misc_base + 0x258)
> +#define SPEAR1340_GMAC_CLK_SYNT                        (misc_base + 0x25C)
> +#define SPEAR1340_SDHCI_CLK_SYNT               (misc_base + 0x260)
> +#define SPEAR1340_CFXD_CLK_SYNT                        (misc_base + 0x264)
> +#define SPEAR1340_ADC_CLK_SYNT                 (misc_base + 0x270)
> +#define SPEAR1340_AMBA_CLK_SYNT                        (misc_base + 0x274)
> +#define SPEAR1340_CLCD_CLK_SYNT                        (misc_base + 0x27C)
> +#define SPEAR1340_SYS_CLK_SYNT                 (misc_base + 0x284)
> +#define SPEAR1340_GEN_CLK_SYNT0                        (misc_base + 0x28C)
> +#define SPEAR1340_GEN_CLK_SYNT1                        (misc_base + 0x294)
> +#define SPEAR1340_GEN_CLK_SYNT2                        (misc_base + 0x29C)
> +#define SPEAR1340_GEN_CLK_SYNT3                        (misc_base + 0x304)
> +#define SPEAR1340_PERIP1_CLK_ENB               (misc_base + 0x30C)
>         #define SPEAR1340_RTC_CLK_ENB                   31
>         #define SPEAR1340_ADC_CLK_ENB                   30
>         #define SPEAR1340_C3_CLK_ENB                    29
> @@ -133,7 +132,7 @@
>         #define SPEAR1340_SYSROM_CLK_ENB                1
>         #define SPEAR1340_BUS_CLK_ENB                   0
>  
> -#define SPEAR1340_PERIP2_CLK_ENB               (VA_MISC_BASE + 0x310)
> +#define SPEAR1340_PERIP2_CLK_ENB               (misc_base + 0x310)
>         #define SPEAR1340_THSENS_CLK_ENB                8
>         #define SPEAR1340_I2S_REF_PAD_CLK_ENB           7
>         #define SPEAR1340_ACP_CLK_ENB                   6
> @@ -144,7 +143,7 @@
>         #define SPEAR1340_DDR_CORE_CLK_ENB              1
>         #define SPEAR1340_DDR_CTRL_CLK_ENB              0
>  
> -#define SPEAR1340_PERIP3_CLK_ENB               (VA_MISC_BASE + 0x314)
> +#define SPEAR1340_PERIP3_CLK_ENB               (misc_base + 0x314)
>         #define SPEAR1340_PLGPIO_CLK_ENB                18
>         #define SPEAR1340_VIDEO_DEC_CLK_ENB             16
>         #define SPEAR1340_VIDEO_ENC_CLK_ENB             15
> @@ -441,7 +440,7 @@ static const char *gen_synth0_1_parents[] = { "vco1div4_clk", "vco3div2_clk",
>  static const char *gen_synth2_3_parents[] = { "vco1div4_clk", "vco2div2_clk",
>         "pll2_clk", };
>  
> -void __init spear1340_clk_init(void)
> +void __init spear1340_clk_init(void __iomem *misc_base)
>  {
>         struct clk *clk, *clk1;
>  
> diff --git a/drivers/clk/spear/spear3xx_clock.c b/drivers/clk/spear/spear3xx_clock.c
> index 33d3ac5..f9ec43f 100644
> --- a/drivers/clk/spear/spear3xx_clock.c
> +++ b/drivers/clk/spear/spear3xx_clock.c
> @@ -15,21 +15,20 @@
>  #include <linux/io.h>
>  #include <linux/of_platform.h>
>  #include <linux/spinlock_types.h>
> -#include <mach/misc_regs.h>
>  #include "clk.h"
>  
>  static DEFINE_SPINLOCK(_lock);
>  
> -#define PLL1_CTR                       (MISC_BASE + 0x008)
> -#define PLL1_FRQ                       (MISC_BASE + 0x00C)
> -#define PLL2_CTR                       (MISC_BASE + 0x014)
> -#define PLL2_FRQ                       (MISC_BASE + 0x018)
> -#define PLL_CLK_CFG                    (MISC_BASE + 0x020)
> +#define PLL1_CTR                       (misc_base + 0x008)
> +#define PLL1_FRQ                       (misc_base + 0x00C)
> +#define PLL2_CTR                       (misc_base + 0x014)
> +#define PLL2_FRQ                       (misc_base + 0x018)
> +#define PLL_CLK_CFG                    (misc_base + 0x020)
>         /* PLL_CLK_CFG register masks */
>         #define MCTR_CLK_SHIFT          28
>         #define MCTR_CLK_MASK           3
>  
> -#define CORE_CLK_CFG                   (MISC_BASE + 0x024)
> +#define CORE_CLK_CFG                   (misc_base + 0x024)
>         /* CORE CLK CFG register masks */
>         #define GEN_SYNTH2_3_CLK_SHIFT  18
>         #define GEN_SYNTH2_3_CLK_MASK   1
> @@ -39,7 +38,7 @@ static DEFINE_SPINLOCK(_lock);
>         #define PCLK_RATIO_SHIFT        8
>         #define PCLK_RATIO_MASK         2
>  
> -#define PERIP_CLK_CFG                  (MISC_BASE + 0x028)
> +#define PERIP_CLK_CFG                  (misc_base + 0x028)
>         /* PERIP_CLK_CFG register masks */
>         #define UART_CLK_SHIFT          4
>         #define UART_CLK_MASK           1
> @@ -50,7 +49,7 @@ static DEFINE_SPINLOCK(_lock);
>         #define GPT2_CLK_SHIFT          12
>         #define GPT_CLK_MASK            1
>  
> -#define PERIP1_CLK_ENB                 (MISC_BASE + 0x02C)
> +#define PERIP1_CLK_ENB                 (misc_base + 0x02C)
>         /* PERIP1_CLK_ENB register masks */
>         #define UART_CLK_ENB            3
>         #define SSP_CLK_ENB             5
> @@ -69,7 +68,7 @@ static DEFINE_SPINLOCK(_lock);
>         #define USBH_CLK_ENB            25
>         #define C3_CLK_ENB              31
>  
> -#define RAS_CLK_ENB                    (MISC_BASE + 0x034)
> +#define RAS_CLK_ENB                    (misc_base + 0x034)
>         #define RAS_AHB_CLK_ENB         0
>         #define RAS_PLL1_CLK_ENB        1
>         #define RAS_APB_CLK_ENB         2
> @@ -82,20 +81,20 @@ static DEFINE_SPINLOCK(_lock);
>         #define RAS_SYNT2_CLK_ENB       10
>         #define RAS_SYNT3_CLK_ENB       11
>  
> -#define PRSC0_CLK_CFG                  (MISC_BASE + 0x044)
> -#define PRSC1_CLK_CFG                  (MISC_BASE + 0x048)
> -#define PRSC2_CLK_CFG                  (MISC_BASE + 0x04C)
> -#define AMEM_CLK_CFG                   (MISC_BASE + 0x050)
> +#define PRSC0_CLK_CFG                  (misc_base + 0x044)
> +#define PRSC1_CLK_CFG                  (misc_base + 0x048)
> +#define PRSC2_CLK_CFG                  (misc_base + 0x04C)
> +#define AMEM_CLK_CFG                   (misc_base + 0x050)
>         #define AMEM_CLK_ENB            0
>  
> -#define CLCD_CLK_SYNT                  (MISC_BASE + 0x05C)
> -#define FIRDA_CLK_SYNT                 (MISC_BASE + 0x060)
> -#define UART_CLK_SYNT                  (MISC_BASE + 0x064)
> -#define GMAC_CLK_SYNT                  (MISC_BASE + 0x068)
> -#define GEN0_CLK_SYNT                  (MISC_BASE + 0x06C)
> -#define GEN1_CLK_SYNT                  (MISC_BASE + 0x070)
> -#define GEN2_CLK_SYNT                  (MISC_BASE + 0x074)
> -#define GEN3_CLK_SYNT                  (MISC_BASE + 0x078)
> +#define CLCD_CLK_SYNT                  (misc_base + 0x05C)
> +#define FIRDA_CLK_SYNT                 (misc_base + 0x060)
> +#define UART_CLK_SYNT                  (misc_base + 0x064)
> +#define GMAC_CLK_SYNT                  (misc_base + 0x068)
> +#define GEN0_CLK_SYNT                  (misc_base + 0x06C)
> +#define GEN1_CLK_SYNT                  (misc_base + 0x070)
> +#define GEN2_CLK_SYNT                  (misc_base + 0x074)
> +#define GEN3_CLK_SYNT                  (misc_base + 0x078)
>  
>  /* pll rate configuration table, in ascending order of rates */
>  static struct pll_rate_tbl pll_rtbl[] = {
> @@ -211,6 +210,17 @@ static inline void spear310_clk_init(void) { }
>  
>  /* array of all spear 320 clock lookups */
>  #ifdef CONFIG_MACH_SPEAR320
> +
> +#define SPEAR320_CONTROL_REG           (soc_config_base + 0x0000)
> +#define SPEAR320_EXT_CTRL_REG          (soc_config_base + 0x0018)
> +
> +       #define SPEAR320_UARTX_PCLK_MASK                0x1
> +       #define SPEAR320_UART2_PCLK_SHIFT               8
> +       #define SPEAR320_UART3_PCLK_SHIFT               9
> +       #define SPEAR320_UART4_PCLK_SHIFT               10
> +       #define SPEAR320_UART5_PCLK_SHIFT               11
> +       #define SPEAR320_UART6_PCLK_SHIFT               12
> +       #define SPEAR320_RS485_PCLK_SHIFT               13
>         #define SMII_PCLK_SHIFT                         18
>         #define SMII_PCLK_MASK                          2
>         #define SMII_PCLK_VAL_PAD                       0x0
> @@ -235,7 +245,7 @@ static const char *smii0_parents[] = { "smii_125m_pad", "ras_pll2_clk",
>         "ras_syn0_gclk", };
>  static const char *uartx_parents[] = { "ras_syn1_gclk", "ras_apb_clk", };
>  
> -static void __init spear320_clk_init(void)
> +static void __init spear320_clk_init(void __iomem *soc_config_base)
>  {
>         struct clk *clk;
>  
> @@ -362,7 +372,7 @@ static void __init spear320_clk_init(void)
>  static inline void spear320_clk_init(void) { }
>  #endif
>  
> -void __init spear3xx_clk_init(void)
> +void __init spear3xx_clk_init(void __iomem *misc_base, void __iomem *soc_config_base)
>  {
>         struct clk *clk, *clk1;
>  
> @@ -634,5 +644,5 @@ void __init spear3xx_clk_init(void)
>         else if (of_machine_is_compatible("st,spear310"))
>                 spear310_clk_init();
>         else if (of_machine_is_compatible("st,spear320"))
> -               spear320_clk_init();
> +               spear320_clk_init(soc_config_base);
>  }
> diff --git a/drivers/clk/spear/spear6xx_clock.c b/drivers/clk/spear/spear6xx_clock.c
> index e862a33..9406f24 100644
> --- a/drivers/clk/spear/spear6xx_clock.c
> +++ b/drivers/clk/spear/spear6xx_clock.c
> @@ -13,28 +13,27 @@
>  #include <linux/clkdev.h>
>  #include <linux/io.h>
>  #include <linux/spinlock_types.h>
> -#include <mach/misc_regs.h>
>  #include "clk.h"
>  
>  static DEFINE_SPINLOCK(_lock);
>  
> -#define PLL1_CTR                       (MISC_BASE + 0x008)
> -#define PLL1_FRQ                       (MISC_BASE + 0x00C)
> -#define PLL2_CTR                       (MISC_BASE + 0x014)
> -#define PLL2_FRQ                       (MISC_BASE + 0x018)
> -#define PLL_CLK_CFG                    (MISC_BASE + 0x020)
> +#define PLL1_CTR                       (misc_base + 0x008)
> +#define PLL1_FRQ                       (misc_base + 0x00C)
> +#define PLL2_CTR                       (misc_base + 0x014)
> +#define PLL2_FRQ                       (misc_base + 0x018)
> +#define PLL_CLK_CFG                    (misc_base + 0x020)
>         /* PLL_CLK_CFG register masks */
>         #define MCTR_CLK_SHIFT          28
>         #define MCTR_CLK_MASK           3
>  
> -#define CORE_CLK_CFG                   (MISC_BASE + 0x024)
> +#define CORE_CLK_CFG                   (misc_base + 0x024)
>         /* CORE CLK CFG register masks */
>         #define HCLK_RATIO_SHIFT        10
>         #define HCLK_RATIO_MASK         2
>         #define PCLK_RATIO_SHIFT        8
>         #define PCLK_RATIO_MASK         2
>  
> -#define PERIP_CLK_CFG                  (MISC_BASE + 0x028)
> +#define PERIP_CLK_CFG                  (misc_base + 0x028)
>         /* PERIP_CLK_CFG register masks */
>         #define CLCD_CLK_SHIFT          2
>         #define CLCD_CLK_MASK           2
> @@ -48,7 +47,7 @@ static DEFINE_SPINLOCK(_lock);
>         #define GPT3_CLK_SHIFT          12
>         #define GPT_CLK_MASK            1
>  
> -#define PERIP1_CLK_ENB                 (MISC_BASE + 0x02C)
> +#define PERIP1_CLK_ENB                 (misc_base + 0x02C)
>         /* PERIP1_CLK_ENB register masks */
>         #define UART0_CLK_ENB           3
>         #define UART1_CLK_ENB           4
> @@ -74,13 +73,13 @@ static DEFINE_SPINLOCK(_lock);
>         #define USBH0_CLK_ENB           25
>         #define USBH1_CLK_ENB           26
>  
> -#define PRSC0_CLK_CFG                  (MISC_BASE + 0x044)
> -#define PRSC1_CLK_CFG                  (MISC_BASE + 0x048)
> -#define PRSC2_CLK_CFG                  (MISC_BASE + 0x04C)
> +#define PRSC0_CLK_CFG                  (misc_base + 0x044)
> +#define PRSC1_CLK_CFG                  (misc_base + 0x048)
> +#define PRSC2_CLK_CFG                  (misc_base + 0x04C)
>  
> -#define CLCD_CLK_SYNT                  (MISC_BASE + 0x05C)
> -#define FIRDA_CLK_SYNT                 (MISC_BASE + 0x060)
> -#define UART_CLK_SYNT                  (MISC_BASE + 0x064)
> +#define CLCD_CLK_SYNT                  (misc_base + 0x05C)
> +#define FIRDA_CLK_SYNT                 (misc_base + 0x060)
> +#define UART_CLK_SYNT                  (misc_base + 0x064)
>  
>  /* vco rate configuration table, in ascending order of rates */
>  static struct pll_rate_tbl pll_rtbl[] = {
> @@ -115,7 +114,7 @@ static struct gpt_rate_tbl gpt_rtbl[] = {
>         {.mscale = 1, .nscale = 0}, /* 83 MHz */
>  };
>  
> -void __init spear6xx_clk_init(void)
> +void __init spear6xx_clk_init(void __iomem *misc_base)
>  {
>         struct clk *clk, *clk1;
>  
> -- 
> 1.8.1.2
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 09/13] ARM: spear: make clock driver independent of headers
  2013-03-22 18:51   ` Mike Turquette
@ 2013-03-22 19:34     ` Arnd Bergmann
  2013-03-22 19:57       ` Mike Turquette
  0 siblings, 1 reply; 18+ messages in thread
From: Arnd Bergmann @ 2013-03-22 19:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 22 March 2013, Mike Turquette wrote:
> Do you want this patch to go through clk-next, or all together with the
> rest of the series?

I would prefer to keep this together with the other patches, since last
patch depends on all earlier ones.

	Arnd

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 09/13] ARM: spear: make clock driver independent of headers
  2013-03-22 19:34     ` Arnd Bergmann
@ 2013-03-22 19:57       ` Mike Turquette
  0 siblings, 0 replies; 18+ messages in thread
From: Mike Turquette @ 2013-03-22 19:57 UTC (permalink / raw)
  To: linux-arm-kernel

Quoting Arnd Bergmann (2013-03-22 12:34:08)
> On Friday 22 March 2013, Mike Turquette wrote:
> > Do you want this patch to go through clk-next, or all together with the
> > rest of the series?
> 
> I would prefer to keep this together with the other patches, since last
> patch depends on all earlier ones.
> 

In that case,

Acked-by: Mike Turquette <mturquette@linaro.org>

>         Arnd

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-03-22 19:57 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-12 16:46 [PATCH v2 00/13] ARM: spear multiplatform support Arnd Bergmann
2013-03-12 16:46 ` [PATCH v2 01/13] ARM: spear13xx: make mach/dma.h local Arnd Bergmann
2013-03-12 16:46 ` [PATCH v2 02/13] ARM: spear: unify mach/generic.h and mach/irqs.h Arnd Bergmann
2013-03-12 16:46 ` [PATCH v2 03/13] ARM: spear: move identical headers to plat-spear/include/mach Arnd Bergmann
2013-03-12 16:46 ` [PATCH v2 04/13] ARM: spear: make spear3xx/6xx mach/spear.h files identical Arnd Bergmann
2013-03-12 16:46 ` [PATCH v2 05/13] ARM: spear: merge Kconfig files Arnd Bergmann
2013-03-12 16:46 ` [PATCH v2 06/13] ARM: spear: move spear.h and misc_regs.h into plat-spear Arnd Bergmann
2013-03-12 16:46 ` [PATCH v2 08/13] ARM: spear: move generic.h and pl080.h into private dir Arnd Bergmann
2013-03-12 16:46 ` [PATCH v2 09/13] ARM: spear: make clock driver independent of headers Arnd Bergmann
2013-03-22 18:51   ` Mike Turquette
2013-03-22 19:34     ` Arnd Bergmann
2013-03-22 19:57       ` Mike Turquette
2013-03-12 16:46 ` [PATCH v2 10/13] ARM: spear: rename duplicate pl080_plat_data Arnd Bergmann
2013-03-12 16:46 ` [PATCH v2 11/13] ARM: spear: use multiplatform configuration options Arnd Bergmann
2013-03-12 16:46 ` [PATCH v2 12/13] ARM: spear: fix build error in restart.c Arnd Bergmann
2013-03-12 16:46 ` [PATCH v2 13/13] ARM: spear: enable spear13xx in multi_v7_defconfig Arnd Bergmann
2013-03-13  5:59 ` [PATCH v2 00/13] ARM: spear multiplatform support Viresh Kumar
2013-03-13  6:04   ` vipul kumar samar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.