All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] ep93xx: Move SoC private bits to core
@ 2012-01-11  3:14 Ryan Mallon
  2012-01-11  3:14 ` [PATCH 01/11] ep93xx: Move PHYS_BASE defines to local SoC header file Ryan Mallon
                   ` (13 more replies)
  0 siblings, 14 replies; 41+ messages in thread
From: Ryan Mallon @ 2012-01-11  3:14 UTC (permalink / raw)
  To: linux-arm-kernel

This patch series is an effort to move the ep93xx SoC specific code out
of drivers and include/mach into arch/arm/mach-ep93xx. This work
involves the following changes:

 - Create a new private header called soc.h to replace most of 
   mach/include/ep93xx-regs.h
 - Move the Maverick crunch code from arch/arm/kernel to mach-ep93xx
 - Move all system controller access to the ep93xx core code

There are a small handful of defines left in ep93xx-regs.h which are
used by both the ep93xx core and include/mach files (uncompress.h,
debug-macro.S, etc).

Ryan Mallon (11):
  ep93xx: Move PHYS_BASE defines to local SoC header file
  ep93xx: Move GPIO defines to gpio-ep93xx.h
  ep93xx: Move peripheral defines to local SoC header
  ep93xx: Configure GPIO ports in core code
  ep93xx: Move arch_reset to core.c
  ep93xx: Don't use system controller defines in audio drivers
  ep93xx: Make syscon access functions private to SoC
  ep93xx: Move EP93XX_WATCHDOG_BASE define to driver
  ep93xx: Move crunch code to mach-ep93xx directory
  ep93xx: Move EP93XX_SYSCON defines to SoC private header
  ep93xx: Remove unnecessary includes of ep93xx-regs.h

 arch/arm/kernel/Makefile                        |    3 -
 arch/arm/mach-ep93xx/Makefile                   |    3 +
 arch/arm/mach-ep93xx/adssphere.c                |    1 +
 arch/arm/mach-ep93xx/clock.c                    |    1 +
 arch/arm/mach-ep93xx/core.c                     |   47 ++++--
 arch/arm/{kernel => mach-ep93xx}/crunch-bits.S  |    0
 arch/arm/{kernel => mach-ep93xx}/crunch.c       |    4 +-
 arch/arm/mach-ep93xx/dma.c                      |    2 +
 arch/arm/mach-ep93xx/edb93xx.c                  |    2 +
 arch/arm/mach-ep93xx/gesbc9312.c                |    1 +
 arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |  191 +--------------------
 arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h |   10 +
 arch/arm/mach-ep93xx/include/mach/hardware.h    |    1 -
 arch/arm/mach-ep93xx/include/mach/platform.h    |   16 +--
 arch/arm/mach-ep93xx/include/mach/system.h      |   14 +--
 arch/arm/mach-ep93xx/micro9.c                   |    1 +
 arch/arm/mach-ep93xx/simone.c                   |    2 +
 arch/arm/mach-ep93xx/snappercl15.c              |    2 +
 arch/arm/mach-ep93xx/soc.h                      |  210 +++++++++++++++++++++++
 arch/arm/mach-ep93xx/ts72xx.c                   |    2 +
 arch/arm/mach-ep93xx/vision_ep9307.c            |    2 +
 drivers/gpio/gpio-ep93xx.c                      |    7 -
 drivers/watchdog/ep93xx_wdt.c                   |    2 +
 sound/soc/ep93xx/edb93xx.c                      |    4 +-
 sound/soc/ep93xx/snappercl15.c                  |    4 +-
 25 files changed, 279 insertions(+), 253 deletions(-)
 rename arch/arm/{kernel => mach-ep93xx}/crunch-bits.S (100%)
 rename arch/arm/{kernel => mach-ep93xx}/crunch.c (98%)
 create mode 100644 arch/arm/mach-ep93xx/soc.h

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

* [PATCH 01/11] ep93xx: Move PHYS_BASE defines to local SoC header file
  2012-01-11  3:14 [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
@ 2012-01-11  3:14 ` Ryan Mallon
  2012-01-13 17:18   ` H Hartley Sweeten
  2012-01-11  3:14 ` [PATCH 02/11] ep93xx: Move GPIO defines to gpio-ep93xx.h Ryan Mallon
                   ` (12 subsequent siblings)
  13 siblings, 1 reply; 41+ messages in thread
From: Ryan Mallon @ 2012-01-11  3:14 UTC (permalink / raw)
  To: linux-arm-kernel

The PHYS_BASE defines in arch/arm/mach-ep93xx/include/mach-ep93xx-regs.h are
only used in the SoC code. Move the defines to a local header file.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
---
 arch/arm/mach-ep93xx/adssphere.c                |    1 +
 arch/arm/mach-ep93xx/edb93xx.c                  |    2 +
 arch/arm/mach-ep93xx/gesbc9312.c                |    1 +
 arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |   34 ---------------
 arch/arm/mach-ep93xx/micro9.c                   |    1 +
 arch/arm/mach-ep93xx/simone.c                   |    2 +
 arch/arm/mach-ep93xx/snappercl15.c              |    2 +
 arch/arm/mach-ep93xx/soc.h                      |   50 +++++++++++++++++++++++
 arch/arm/mach-ep93xx/ts72xx.c                   |    2 +
 arch/arm/mach-ep93xx/vision_ep9307.c            |    2 +
 10 files changed, 63 insertions(+), 34 deletions(-)
 create mode 100644 arch/arm/mach-ep93xx/soc.h

diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c
index 0713448..4e0a776 100644
--- a/arch/arm/mach-ep93xx/adssphere.c
+++ b/arch/arm/mach-ep93xx/adssphere.c
@@ -19,6 +19,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
+#include "soc.h"
 
 static struct ep93xx_eth_data __initdata adssphere_eth_data = {
 	.phy_id		= 1,
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c
index 70ef8c5..24df3ff 100644
--- a/arch/arm/mach-ep93xx/edb93xx.c
+++ b/arch/arm/mach-ep93xx/edb93xx.c
@@ -42,6 +42,8 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
+#include "soc.h"
+
 
 static void __init edb93xx_register_flash(void)
 {
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c
index 45ee205..86d36da 100644
--- a/arch/arm/mach-ep93xx/gesbc9312.c
+++ b/arch/arm/mach-ep93xx/gesbc9312.c
@@ -19,6 +19,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
+#include "soc.h"
 
 static struct ep93xx_eth_data __initdata gesbc9312_eth_data = {
 	.phy_id		= 1,
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
index c4a7b84..b029305 100644
--- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
+++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
@@ -6,40 +6,6 @@
 #define __ASM_ARCH_EP93XX_REGS_H
 
 /*
- * EP93xx Physical Memory Map:
- *
- * The ASDO pin is sampled at system reset to select a synchronous or
- * asynchronous boot configuration.  When ASDO is "1" (i.e. pulled-up)
- * the synchronous boot mode is selected.  When ASDO is "0" (i.e
- * pulled-down) the asynchronous boot mode is selected.
- *
- * In synchronous boot mode nSDCE3 is decoded starting at physical address
- * 0x00000000 and nCS0 is decoded starting at 0xf0000000.  For asynchronous
- * boot mode they are swapped with nCS0 decoded at 0x00000000 ann nSDCE3
- * decoded at 0xf0000000.
- *
- * There is known errata for the EP93xx dealing with External Memory
- * Configurations.  Please refer to "AN273: EP93xx Silicon Rev E Design
- * Guidelines" for more information.  This document can be found at:
- *
- *	http://www.cirrus.com/en/pubs/appNote/AN273REV4.pdf
- */
-
-#define EP93XX_CS0_PHYS_BASE_ASYNC	0x00000000	/* ASDO Pin = 0 */
-#define EP93XX_SDCE3_PHYS_BASE_SYNC	0x00000000	/* ASDO Pin = 1 */
-#define EP93XX_CS1_PHYS_BASE		0x10000000
-#define EP93XX_CS2_PHYS_BASE		0x20000000
-#define EP93XX_CS3_PHYS_BASE		0x30000000
-#define EP93XX_PCMCIA_PHYS_BASE		0x40000000
-#define EP93XX_CS6_PHYS_BASE		0x60000000
-#define EP93XX_CS7_PHYS_BASE		0x70000000
-#define EP93XX_SDCE0_PHYS_BASE		0xc0000000
-#define EP93XX_SDCE1_PHYS_BASE		0xd0000000
-#define EP93XX_SDCE2_PHYS_BASE		0xe0000000
-#define EP93XX_SDCE3_PHYS_BASE_ASYNC	0xf0000000	/* ASDO Pin = 0 */
-#define EP93XX_CS0_PHYS_BASE_SYNC	0xf0000000	/* ASDO Pin = 1 */
-
-/*
  * EP93xx linux memory map:
  *
  * virt		phys		size
diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c
index e72f736..858c8ec 100644
--- a/arch/arm/mach-ep93xx/micro9.c
+++ b/arch/arm/mach-ep93xx/micro9.c
@@ -21,6 +21,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
+#include "soc.h"
 
 /*************************************************************************
  * Micro9 NOR Flash
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c
index 52e090d..e1ea38e 100644
--- a/arch/arm/mach-ep93xx/simone.c
+++ b/arch/arm/mach-ep93xx/simone.c
@@ -28,6 +28,8 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
+#include "soc.h"
+
 static struct ep93xx_eth_data __initdata simone_eth_data = {
 	.phy_id		= 1,
 };
diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c
index 8121e3a..a23c6db 100644
--- a/arch/arm/mach-ep93xx/snappercl15.c
+++ b/arch/arm/mach-ep93xx/snappercl15.c
@@ -34,6 +34,8 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
+#include "soc.h"
+
 #define SNAPPERCL15_NAND_BASE	(EP93XX_CS7_PHYS_BASE + SZ_16M)
 
 #define SNAPPERCL15_NAND_WPN	(1 << 8)  /* Write protect (active low) */
diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h
new file mode 100644
index 0000000..74703e7
--- /dev/null
+++ b/arch/arm/mach-ep93xx/soc.h
@@ -0,0 +1,50 @@
+/*
+ * arch/arm/mach-ep93xx/soc.h
+ *
+ * Copyright (C) 2012 Open Kernel Labs <www.ok-labs.com>
+ * Copyright (C) 2012 Ryan Mallon <rmallon@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ */
+
+#ifndef _EP93XX_SOC_H
+#define _EP93XX_SOC_H
+
+/*
+ * EP93xx Physical Memory Map:
+ *
+ * The ASDO pin is sampled at system reset to select a synchronous or
+ * asynchronous boot configuration.  When ASDO is "1" (i.e. pulled-up)
+ * the synchronous boot mode is selected.  When ASDO is "0" (i.e
+ * pulled-down) the asynchronous boot mode is selected.
+ *
+ * In synchronous boot mode nSDCE3 is decoded starting at physical address
+ * 0x00000000 and nCS0 is decoded starting at 0xf0000000.  For asynchronous
+ * boot mode they are swapped with nCS0 decoded at 0x00000000 ann nSDCE3
+ * decoded at 0xf0000000.
+ *
+ * There is known errata for the EP93xx dealing with External Memory
+ * Configurations.  Please refer to "AN273: EP93xx Silicon Rev E Design
+ * Guidelines" for more information.  This document can be found at:
+ *
+ *	http://www.cirrus.com/en/pubs/appNote/AN273REV4.pdf
+ */
+
+#define EP93XX_CS0_PHYS_BASE_ASYNC	0x00000000	/* ASDO Pin = 0 */
+#define EP93XX_SDCE3_PHYS_BASE_SYNC	0x00000000	/* ASDO Pin = 1 */
+#define EP93XX_CS1_PHYS_BASE		0x10000000
+#define EP93XX_CS2_PHYS_BASE		0x20000000
+#define EP93XX_CS3_PHYS_BASE		0x30000000
+#define EP93XX_PCMCIA_PHYS_BASE		0x40000000
+#define EP93XX_CS6_PHYS_BASE		0x60000000
+#define EP93XX_CS7_PHYS_BASE		0x70000000
+#define EP93XX_SDCE0_PHYS_BASE		0xc0000000
+#define EP93XX_SDCE1_PHYS_BASE		0xd0000000
+#define EP93XX_SDCE2_PHYS_BASE		0xe0000000
+#define EP93XX_SDCE3_PHYS_BASE_ASYNC	0xf0000000	/* ASDO Pin = 0 */
+#define EP93XX_CS0_PHYS_BASE_SYNC	0xf0000000	/* ASDO Pin = 1 */
+
+#endif /* _EP93XX_PHYS_BASE_H */
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index 8b2f143..f5965db 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -27,6 +27,8 @@
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
 
+#include "soc.h"
+
 
 static struct map_desc ts72xx_io_desc[] __initdata = {
 	{
diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c
index d96e4db..9d763a7 100644
--- a/arch/arm/mach-ep93xx/vision_ep9307.c
+++ b/arch/arm/mach-ep93xx/vision_ep9307.c
@@ -37,6 +37,8 @@
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
 
+#include "soc.h"
+
 /*************************************************************************
  * Static I/O mappings for the FPGA
  *************************************************************************/
-- 
1.7.0.4

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

* [PATCH 02/11] ep93xx: Move GPIO defines to gpio-ep93xx.h
  2012-01-11  3:14 [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
  2012-01-11  3:14 ` [PATCH 01/11] ep93xx: Move PHYS_BASE defines to local SoC header file Ryan Mallon
@ 2012-01-11  3:14 ` Ryan Mallon
  2012-01-13 17:22   ` H Hartley Sweeten
  2012-01-11  3:14 ` [PATCH 03/11] ep93xx: Move peripheral defines to local SoC header Ryan Mallon
                   ` (11 subsequent siblings)
  13 siblings, 1 reply; 41+ messages in thread
From: Ryan Mallon @ 2012-01-11  3:14 UTC (permalink / raw)
  To: linux-arm-kernel

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
---
 arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |    8 --------
 arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h |   10 ++++++++++
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
index b029305..72b8687 100644
--- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
+++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
@@ -64,14 +64,6 @@
 
 #define EP93XX_SECURITY_BASE		EP93XX_APB_IOMEM(0x00030000)
 
-#define EP93XX_GPIO_PHYS_BASE		EP93XX_APB_PHYS(0x00040000)
-#define EP93XX_GPIO_BASE		EP93XX_APB_IOMEM(0x00040000)
-#define EP93XX_GPIO_REG(x)		(EP93XX_GPIO_BASE + (x))
-#define EP93XX_GPIO_F_INT_STATUS	EP93XX_GPIO_REG(0x5c)
-#define EP93XX_GPIO_A_INT_STATUS	EP93XX_GPIO_REG(0xa0)
-#define EP93XX_GPIO_B_INT_STATUS	EP93XX_GPIO_REG(0xbc)
-#define EP93XX_GPIO_EEDRIVE		EP93XX_GPIO_REG(0xc8)
-
 #define EP93XX_AAC_PHYS_BASE		EP93XX_APB_PHYS(0x00080000)
 #define EP93XX_AAC_BASE			EP93XX_APB_IOMEM(0x00080000)
 
diff --git a/arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h b/arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h
index 8aff2ea..6d7c571 100644
--- a/arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h
+++ b/arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h
@@ -3,6 +3,16 @@
 #ifndef __GPIO_EP93XX_H
 #define __GPIO_EP93XX_H
 
+#include <mach/ep93xx-regs.h>
+
+#define EP93XX_GPIO_PHYS_BASE		EP93XX_APB_PHYS(0x00040000)
+#define EP93XX_GPIO_BASE		EP93XX_APB_IOMEM(0x00040000)
+#define EP93XX_GPIO_REG(x)		(EP93XX_GPIO_BASE + (x))
+#define EP93XX_GPIO_F_INT_STATUS	EP93XX_GPIO_REG(0x5c)
+#define EP93XX_GPIO_A_INT_STATUS	EP93XX_GPIO_REG(0xa0)
+#define EP93XX_GPIO_B_INT_STATUS	EP93XX_GPIO_REG(0xbc)
+#define EP93XX_GPIO_EEDRIVE		EP93XX_GPIO_REG(0xc8)
+
 /* GPIO port A.  */
 #define EP93XX_GPIO_LINE_A(x)		((x) + 0)
 #define EP93XX_GPIO_LINE_EGPIO0		EP93XX_GPIO_LINE_A(0)
-- 
1.7.0.4

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

* [PATCH 03/11] ep93xx: Move peripheral defines to local SoC header
  2012-01-11  3:14 [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
  2012-01-11  3:14 ` [PATCH 01/11] ep93xx: Move PHYS_BASE defines to local SoC header file Ryan Mallon
  2012-01-11  3:14 ` [PATCH 02/11] ep93xx: Move GPIO defines to gpio-ep93xx.h Ryan Mallon
@ 2012-01-11  3:14 ` Ryan Mallon
  2012-01-13 17:25   ` H Hartley Sweeten
  2012-01-11  3:14 ` [PATCH 04/11] ep93xx: Configure GPIO ports in core code Ryan Mallon
                   ` (10 subsequent siblings)
  13 siblings, 1 reply; 41+ messages in thread
From: Ryan Mallon @ 2012-01-11  3:14 UTC (permalink / raw)
  To: linux-arm-kernel

Move the AHB/APB peripheral defines to local SoC header since they are
only needed by the core SoC code. The UART defines are not moved
because they are used by the mach/uncompress.h header.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
---
 arch/arm/mach-ep93xx/core.c                     |    1 +
 arch/arm/mach-ep93xx/dma.c                      |    2 +
 arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |   57 +----------------------
 arch/arm/mach-ep93xx/soc.h                      |   54 +++++++++++++++++++++
 4 files changed, 58 insertions(+), 56 deletions(-)

diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 2432a6b..dcb10c2 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -46,6 +46,7 @@
 
 #include <asm/hardware/vic.h>
 
+#include "soc.h"
 
 /*************************************************************************
  * Static I/O mappings that are needed for all EP93xx platforms
diff --git a/arch/arm/mach-ep93xx/dma.c b/arch/arm/mach-ep93xx/dma.c
index 5a25708..16976d7 100644
--- a/arch/arm/mach-ep93xx/dma.c
+++ b/arch/arm/mach-ep93xx/dma.c
@@ -28,6 +28,8 @@
 #include <mach/dma.h>
 #include <mach/hardware.h>
 
+#include "soc.h"
+
 #define DMA_CHANNEL(_name, _base, _irq) \
 	{ .name = (_name), .base = (_base), .irq = (_irq) }
 
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
index 72b8687..387f745 100644
--- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
+++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
@@ -28,50 +28,7 @@
 #define EP93XX_APB_PHYS(x)		(EP93XX_APB_PHYS_BASE + (x))
 #define EP93XX_APB_IOMEM(x)		IOMEM(EP93XX_APB_VIRT_BASE + (x))
 
-
-/* AHB peripherals */
-#define EP93XX_DMA_BASE			EP93XX_AHB_IOMEM(0x00000000)
-
-#define EP93XX_ETHERNET_PHYS_BASE	EP93XX_AHB_PHYS(0x00010000)
-#define EP93XX_ETHERNET_BASE		EP93XX_AHB_IOMEM(0x00010000)
-
-#define EP93XX_USB_PHYS_BASE		EP93XX_AHB_PHYS(0x00020000)
-#define EP93XX_USB_BASE			EP93XX_AHB_IOMEM(0x00020000)
-
-#define EP93XX_RASTER_PHYS_BASE		EP93XX_AHB_PHYS(0x00030000)
-#define EP93XX_RASTER_BASE		EP93XX_AHB_IOMEM(0x00030000)
-
-#define EP93XX_GRAPHICS_ACCEL_BASE	EP93XX_AHB_IOMEM(0x00040000)
-
-#define EP93XX_SDRAM_CONTROLLER_BASE	EP93XX_AHB_IOMEM(0x00060000)
-
-#define EP93XX_PCMCIA_CONTROLLER_BASE	EP93XX_AHB_IOMEM(0x00080000)
-
-#define EP93XX_BOOT_ROM_BASE		EP93XX_AHB_IOMEM(0x00090000)
-
-#define EP93XX_IDE_BASE			EP93XX_AHB_IOMEM(0x000a0000)
-
-#define EP93XX_VIC1_BASE		EP93XX_AHB_IOMEM(0x000b0000)
-
-#define EP93XX_VIC2_BASE		EP93XX_AHB_IOMEM(0x000c0000)
-
-
-/* APB peripherals */
-#define EP93XX_TIMER_BASE		EP93XX_APB_IOMEM(0x00010000)
-
-#define EP93XX_I2S_PHYS_BASE		EP93XX_APB_PHYS(0x00020000)
-#define EP93XX_I2S_BASE			EP93XX_APB_IOMEM(0x00020000)
-
-#define EP93XX_SECURITY_BASE		EP93XX_APB_IOMEM(0x00030000)
-
-#define EP93XX_AAC_PHYS_BASE		EP93XX_APB_PHYS(0x00080000)
-#define EP93XX_AAC_BASE			EP93XX_APB_IOMEM(0x00080000)
-
-#define EP93XX_SPI_PHYS_BASE		EP93XX_APB_PHYS(0x000a0000)
-#define EP93XX_SPI_BASE			EP93XX_APB_IOMEM(0x000a0000)
-
-#define EP93XX_IRDA_BASE		EP93XX_APB_IOMEM(0x000b0000)
-
+/* APB UARTs */
 #define EP93XX_UART1_PHYS_BASE		EP93XX_APB_PHYS(0x000c0000)
 #define EP93XX_UART1_BASE		EP93XX_APB_IOMEM(0x000c0000)
 
@@ -81,18 +38,6 @@
 #define EP93XX_UART3_PHYS_BASE		EP93XX_APB_PHYS(0x000e0000)
 #define EP93XX_UART3_BASE		EP93XX_APB_IOMEM(0x000e0000)
 
-#define EP93XX_KEY_MATRIX_PHYS_BASE	EP93XX_APB_PHYS(0x000f0000)
-#define EP93XX_KEY_MATRIX_BASE		EP93XX_APB_IOMEM(0x000f0000)
-
-#define EP93XX_ADC_BASE			EP93XX_APB_IOMEM(0x00100000)
-#define EP93XX_TOUCHSCREEN_BASE		EP93XX_APB_IOMEM(0x00100000)
-
-#define EP93XX_PWM_PHYS_BASE		EP93XX_APB_PHYS(0x00110000)
-#define EP93XX_PWM_BASE			EP93XX_APB_IOMEM(0x00110000)
-
-#define EP93XX_RTC_PHYS_BASE		EP93XX_APB_PHYS(0x00120000)
-#define EP93XX_RTC_BASE			EP93XX_APB_IOMEM(0x00120000)
-
 #define EP93XX_SYSCON_BASE		EP93XX_APB_IOMEM(0x00130000)
 #define EP93XX_SYSCON_REG(x)		(EP93XX_SYSCON_BASE + (x))
 #define EP93XX_SYSCON_POWER_STATE	EP93XX_SYSCON_REG(0x00)
diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h
index 74703e7..b0ef89b 100644
--- a/arch/arm/mach-ep93xx/soc.h
+++ b/arch/arm/mach-ep93xx/soc.h
@@ -47,4 +47,58 @@
 #define EP93XX_SDCE3_PHYS_BASE_ASYNC	0xf0000000	/* ASDO Pin = 0 */
 #define EP93XX_CS0_PHYS_BASE_SYNC	0xf0000000	/* ASDO Pin = 1 */
 
+/* AHB peripherals */
+#define EP93XX_DMA_BASE			EP93XX_AHB_IOMEM(0x00000000)
+
+#define EP93XX_ETHERNET_PHYS_BASE	EP93XX_AHB_PHYS(0x00010000)
+#define EP93XX_ETHERNET_BASE		EP93XX_AHB_IOMEM(0x00010000)
+
+#define EP93XX_USB_PHYS_BASE		EP93XX_AHB_PHYS(0x00020000)
+#define EP93XX_USB_BASE			EP93XX_AHB_IOMEM(0x00020000)
+
+#define EP93XX_RASTER_PHYS_BASE		EP93XX_AHB_PHYS(0x00030000)
+#define EP93XX_RASTER_BASE		EP93XX_AHB_IOMEM(0x00030000)
+
+#define EP93XX_GRAPHICS_ACCEL_BASE	EP93XX_AHB_IOMEM(0x00040000)
+
+#define EP93XX_SDRAM_CONTROLLER_BASE	EP93XX_AHB_IOMEM(0x00060000)
+
+#define EP93XX_PCMCIA_CONTROLLER_BASE	EP93XX_AHB_IOMEM(0x00080000)
+
+#define EP93XX_BOOT_ROM_BASE		EP93XX_AHB_IOMEM(0x00090000)
+
+#define EP93XX_IDE_BASE			EP93XX_AHB_IOMEM(0x000a0000)
+
+#define EP93XX_VIC1_BASE		EP93XX_AHB_IOMEM(0x000b0000)
+
+#define EP93XX_VIC2_BASE		EP93XX_AHB_IOMEM(0x000c0000)
+
+/* APB peripherals */
+#define EP93XX_TIMER_BASE		EP93XX_APB_IOMEM(0x00010000)
+
+#define EP93XX_I2S_PHYS_BASE		EP93XX_APB_PHYS(0x00020000)
+#define EP93XX_I2S_BASE			EP93XX_APB_IOMEM(0x00020000)
+
+#define EP93XX_SECURITY_BASE		EP93XX_APB_IOMEM(0x00030000)
+
+#define EP93XX_AAC_PHYS_BASE		EP93XX_APB_PHYS(0x00080000)
+#define EP93XX_AAC_BASE			EP93XX_APB_IOMEM(0x00080000)
+
+#define EP93XX_SPI_PHYS_BASE		EP93XX_APB_PHYS(0x000a0000)
+#define EP93XX_SPI_BASE			EP93XX_APB_IOMEM(0x000a0000)
+
+#define EP93XX_IRDA_BASE		EP93XX_APB_IOMEM(0x000b0000)
+
+#define EP93XX_KEY_MATRIX_PHYS_BASE	EP93XX_APB_PHYS(0x000f0000)
+#define EP93XX_KEY_MATRIX_BASE		EP93XX_APB_IOMEM(0x000f0000)
+
+#define EP93XX_ADC_BASE			EP93XX_APB_IOMEM(0x00100000)
+#define EP93XX_TOUCHSCREEN_BASE		EP93XX_APB_IOMEM(0x00100000)
+
+#define EP93XX_PWM_PHYS_BASE		EP93XX_APB_PHYS(0x00110000)
+#define EP93XX_PWM_BASE			EP93XX_APB_IOMEM(0x00110000)
+
+#define EP93XX_RTC_PHYS_BASE		EP93XX_APB_PHYS(0x00120000)
+#define EP93XX_RTC_BASE			EP93XX_APB_IOMEM(0x00120000)
+
 #endif /* _EP93XX_PHYS_BASE_H */
-- 
1.7.0.4

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

* [PATCH 04/11] ep93xx: Configure GPIO ports in core code
  2012-01-11  3:14 [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
                   ` (2 preceding siblings ...)
  2012-01-11  3:14 ` [PATCH 03/11] ep93xx: Move peripheral defines to local SoC header Ryan Mallon
@ 2012-01-11  3:14 ` Ryan Mallon
  2012-01-13  6:27   ` Mika Westerberg
  2012-01-11  3:14 ` [PATCH 05/11] ep93xx: Move arch_reset to core.c Ryan Mallon
                   ` (9 subsequent siblings)
  13 siblings, 1 reply; 41+ messages in thread
From: Ryan Mallon @ 2012-01-11  3:14 UTC (permalink / raw)
  To: linux-arm-kernel

Move the pinmux setting of the EP93xx GPIOs to the core code. This
removes the need for the GPIO driver to have access to the system
controller registers.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
---
 arch/arm/mach-ep93xx/core.c |    7 +++++++
 drivers/gpio/gpio-ep93xx.c  |    7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index dcb10c2..978c5a6 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -896,6 +896,13 @@ void __init ep93xx_init_devices(void)
 	/* Disallow access to MaverickCrunch initially */
 	ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA);
 
+	/* Default all ports to GPIO */
+	ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_KEYS |
+			       EP93XX_SYSCON_DEVCFG_GONK |
+			       EP93XX_SYSCON_DEVCFG_EONIDE |
+			       EP93XX_SYSCON_DEVCFG_GONIDE |
+			       EP93XX_SYSCON_DEVCFG_HONIDE);
+
 	/* Get the GPIO working early, other devices need it */
 	platform_device_register(&ep93xx_gpio_device);
 
diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
index 1c0fc37..4ca5642 100644
--- a/drivers/gpio/gpio-ep93xx.c
+++ b/drivers/gpio/gpio-ep93xx.c
@@ -378,13 +378,6 @@ static int __devinit ep93xx_gpio_probe(struct platform_device *pdev)
 	}
 	ep93xx_gpio->mmio_base = mmio;
 
-	/* Default all ports to GPIO */
-	ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_KEYS |
-			       EP93XX_SYSCON_DEVCFG_GONK |
-			       EP93XX_SYSCON_DEVCFG_EONIDE |
-			       EP93XX_SYSCON_DEVCFG_GONIDE |
-			       EP93XX_SYSCON_DEVCFG_HONIDE);
-
 	for (i = 0; i < ARRAY_SIZE(ep93xx_gpio_banks); i++) {
 		struct bgpio_chip *bgc = &ep93xx_gpio->bgc[i];
 		struct ep93xx_gpio_bank *bank = &ep93xx_gpio_banks[i];
-- 
1.7.0.4

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

* [PATCH 05/11] ep93xx: Move arch_reset to core.c
  2012-01-11  3:14 [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
                   ` (3 preceding siblings ...)
  2012-01-11  3:14 ` [PATCH 04/11] ep93xx: Configure GPIO ports in core code Ryan Mallon
@ 2012-01-11  3:14 ` Ryan Mallon
  2012-01-13 17:28   ` H Hartley Sweeten
  2012-01-11  3:14 ` [PATCH 06/11] ep93xx: Don't use system controller defines in audio drivers Ryan Mallon
                   ` (8 subsequent siblings)
  13 siblings, 1 reply; 41+ messages in thread
From: Ryan Mallon @ 2012-01-11  3:14 UTC (permalink / raw)
  To: linux-arm-kernel

Move the arch_reset function from include/mach/system.h to core.c.
This removes the need for the EP93XX_SYSCON_DEVCFG defines to be
exported in the include/mach headers.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
---
 arch/arm/mach-ep93xx/core.c                |   18 ++++++++++++++++++
 arch/arm/mach-ep93xx/include/mach/system.h |   14 +-------------
 2 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 978c5a6..bd59696 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -240,6 +240,24 @@ unsigned int ep93xx_chip_revision(void)
 }
 
 /*************************************************************************
+ * Reset handling for EP93xx
+ *************************************************************************/
+
+void arch_reset(char mode, const char *cmd)
+{
+	local_irq_disable();
+
+	/*
+	 * Set then clear the SWRST bit to initiate a software reset
+	 */
+	ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_SWRST);
+	ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_SWRST);
+
+	while (1)
+		;
+}
+
+/*************************************************************************
  * EP93xx GPIO
  *************************************************************************/
 static struct resource ep93xx_gpio_resource[] = {
diff --git a/arch/arm/mach-ep93xx/include/mach/system.h b/arch/arm/mach-ep93xx/include/mach/system.h
index 6d661fe..3d1ec74 100644
--- a/arch/arm/mach-ep93xx/include/mach/system.h
+++ b/arch/arm/mach-ep93xx/include/mach/system.h
@@ -9,16 +9,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-	local_irq_disable();
-
-	/*
-	 * Set then clear the SWRST bit to initiate a software reset
-	 */
-	ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_SWRST);
-	ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_SWRST);
-
-	while (1)
-		;
-}
+extern void arch_reset(char mode, const char *cmd);
-- 
1.7.0.4

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

* [PATCH 06/11] ep93xx: Don't use system controller defines in audio drivers
  2012-01-11  3:14 [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
                   ` (4 preceding siblings ...)
  2012-01-11  3:14 ` [PATCH 05/11] ep93xx: Move arch_reset to core.c Ryan Mallon
@ 2012-01-11  3:14 ` Ryan Mallon
  2012-01-11 17:42   ` Mark Brown
  2012-01-13 17:35   ` H Hartley Sweeten
  2012-01-11  3:14 ` [PATCH 07/11] ep93xx: Make syscon access functions private to SoC Ryan Mallon
                   ` (7 subsequent siblings)
  13 siblings, 2 replies; 41+ messages in thread
From: Ryan Mallon @ 2012-01-11  3:14 UTC (permalink / raw)
  To: linux-arm-kernel

Both the Snapper CL15 and EDB93xx audio drivers set the same audio
configuration in ep93xx_i2s_acquire. Remove the arguments to
ep93xx_i2s_acquire so that the audio drivers no longer need the
EP93XX_SYSCON defines exported.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
---
 arch/arm/mach-ep93xx/core.c                  |   19 ++++---------------
 arch/arm/mach-ep93xx/include/mach/platform.h |    2 +-
 sound/soc/ep93xx/edb93xx.c                   |    4 +---
 sound/soc/ep93xx/snappercl15.c               |    4 +---
 4 files changed, 7 insertions(+), 22 deletions(-)

diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index bd59696..0726b7b 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -836,23 +836,12 @@ void __init ep93xx_register_i2s(void)
 #define EP93XX_I2SCLKDIV_MASK		(EP93XX_SYSCON_I2SCLKDIV_ORIDE | \
 					 EP93XX_SYSCON_I2SCLKDIV_SPOL)
 
-int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config)
+int ep93xx_i2s_acquire(void)
 {
 	unsigned val;
 
-	/* Sanity check */
-	if (i2s_pins & ~EP93XX_SYSCON_DEVCFG_I2S_MASK)
-		return -EINVAL;
-	if (i2s_config & ~EP93XX_I2SCLKDIV_MASK)
-		return -EINVAL;
-
-	/* Must have only one of I2SONSSP/I2SONAC97 set */
-	if ((i2s_pins & EP93XX_SYSCON_DEVCFG_I2SONSSP) ==
-	    (i2s_pins & EP93XX_SYSCON_DEVCFG_I2SONAC97))
-		return -EINVAL;
-
-	ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_I2S_MASK);
-	ep93xx_devcfg_set_bits(i2s_pins);
+	ep93xx_devcfg_set_clear(EP93XX_SYSCON_DEVCFG_I2SONAC97,
+			EP93XX_SYSCON_DEVCFG_I2S_MASK);
 
 	/*
 	 * This is potentially racy with the clock api for i2s_mclk, sclk and 
@@ -862,7 +851,7 @@ int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config)
 	 */
 	val = __raw_readl(EP93XX_SYSCON_I2SCLKDIV);
 	val &= ~EP93XX_I2SCLKDIV_MASK;
-	val |= i2s_config;
+	val |= EP93XX_SYSCON_I2SCLKDIV_ORIDE | EP93XX_SYSCON_I2SCLKDIV_SPOL;
 	ep93xx_syscon_swlocked_write(val, EP93XX_SYSCON_I2SCLKDIV);
 
 	return 0;
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h
index 5066045..35e5d73 100644
--- a/arch/arm/mach-ep93xx/include/mach/platform.h
+++ b/arch/arm/mach-ep93xx/include/mach/platform.h
@@ -59,7 +59,7 @@ void ep93xx_register_keypad(struct ep93xx_keypad_platform_data *data);
 int ep93xx_keypad_acquire_gpio(struct platform_device *pdev);
 void ep93xx_keypad_release_gpio(struct platform_device *pdev);
 void ep93xx_register_i2s(void);
-int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config);
+int ep93xx_i2s_acquire(void);
 void ep93xx_i2s_release(void);
 void ep93xx_register_ac97(void);
 
diff --git a/sound/soc/ep93xx/edb93xx.c b/sound/soc/ep93xx/edb93xx.c
index 51930b6..3a6ab05 100644
--- a/sound/soc/ep93xx/edb93xx.c
+++ b/sound/soc/ep93xx/edb93xx.c
@@ -94,9 +94,7 @@ static int __devinit edb93xx_probe(struct platform_device *pdev)
 	struct snd_soc_card *card = &snd_soc_edb93xx;
 	int ret;
 
-	ret = ep93xx_i2s_acquire(EP93XX_SYSCON_DEVCFG_I2SONAC97,
-				 EP93XX_SYSCON_I2SCLKDIV_ORIDE |
-				 EP93XX_SYSCON_I2SCLKDIV_SPOL);
+	ret = ep93xx_i2s_acquire();
 	if (ret)
 		return ret;
 
diff --git a/sound/soc/ep93xx/snappercl15.c b/sound/soc/ep93xx/snappercl15.c
index 2cde433..6ccac5a 100644
--- a/sound/soc/ep93xx/snappercl15.c
+++ b/sound/soc/ep93xx/snappercl15.c
@@ -110,9 +110,7 @@ static int __devinit snappercl15_probe(struct platform_device *pdev)
 	struct snd_soc_card *card = &snd_soc_snappercl15;
 	int ret;
 
-	ret = ep93xx_i2s_acquire(EP93XX_SYSCON_DEVCFG_I2SONAC97,
-				 EP93XX_SYSCON_I2SCLKDIV_ORIDE |
-				 EP93XX_SYSCON_I2SCLKDIV_SPOL);
+	ret = ep93xx_i2s_acquire();
 	if (ret)
 		return ret;
 
-- 
1.7.0.4

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

* [PATCH 07/11] ep93xx: Make syscon access functions private to SoC
  2012-01-11  3:14 [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
                   ` (5 preceding siblings ...)
  2012-01-11  3:14 ` [PATCH 06/11] ep93xx: Don't use system controller defines in audio drivers Ryan Mallon
@ 2012-01-11  3:14 ` Ryan Mallon
  2012-01-13 17:38   ` H Hartley Sweeten
  2012-01-11  3:14 ` [PATCH 08/11] ep93xx: Move EP93XX_WATCHDOG_BASE define to driver Ryan Mallon
                   ` (6 subsequent siblings)
  13 siblings, 1 reply; 41+ messages in thread
From: Ryan Mallon @ 2012-01-11  3:14 UTC (permalink / raw)
  To: linux-arm-kernel

The syscon access functions are no longer used outside of the core
EP93xx code. Move their definitions into the SoC code.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
---
 arch/arm/mach-ep93xx/clock.c                 |    1 +
 arch/arm/mach-ep93xx/core.c                  |    2 --
 arch/arm/mach-ep93xx/include/mach/platform.h |   14 --------------
 arch/arm/mach-ep93xx/soc.h                   |   14 ++++++++++++++
 4 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c
index ca4de71..c95dbce 100644
--- a/arch/arm/mach-ep93xx/clock.c
+++ b/arch/arm/mach-ep93xx/clock.c
@@ -25,6 +25,7 @@
 
 #include <asm/div64.h>
 
+#include "soc.h"
 
 struct clk {
 	struct clk	*parent;
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 0726b7b..44beb5f 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -205,7 +205,6 @@ void ep93xx_syscon_swlocked_write(unsigned int val, void __iomem *reg)
 
 	spin_unlock_irqrestore(&syscon_swlock, flags);
 }
-EXPORT_SYMBOL(ep93xx_syscon_swlocked_write);
 
 void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits)
 {
@@ -222,7 +221,6 @@ void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits)
 
 	spin_unlock_irqrestore(&syscon_swlock, flags);
 }
-EXPORT_SYMBOL(ep93xx_devcfg_set_clear);
 
 /**
  * ep93xx_chip_revision() - returns the EP93xx chip revision
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h
index 35e5d73..b7fb10f 100644
--- a/arch/arm/mach-ep93xx/include/mach/platform.h
+++ b/arch/arm/mach-ep93xx/include/mach/platform.h
@@ -21,20 +21,6 @@ struct ep93xx_eth_data
 void ep93xx_map_io(void);
 void ep93xx_init_irq(void);
 
-/* EP93xx System Controller software locked register write */
-void ep93xx_syscon_swlocked_write(unsigned int val, void __iomem *reg);
-void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits);
-
-static inline void ep93xx_devcfg_set_bits(unsigned int bits)
-{
-	ep93xx_devcfg_set_clear(bits, 0x00);
-}
-
-static inline void ep93xx_devcfg_clear_bits(unsigned int bits)
-{
-	ep93xx_devcfg_set_clear(0x00, bits);
-}
-
 #define EP93XX_CHIP_REV_D0	3
 #define EP93XX_CHIP_REV_D1	4
 #define EP93XX_CHIP_REV_E0	5
diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h
index b0ef89b..958282a 100644
--- a/arch/arm/mach-ep93xx/soc.h
+++ b/arch/arm/mach-ep93xx/soc.h
@@ -13,6 +13,20 @@
 #ifndef _EP93XX_SOC_H
 #define _EP93XX_SOC_H
 
+/* EP93xx System Controller software locked register write */
+void ep93xx_syscon_swlocked_write(unsigned int val, void __iomem *reg);
+void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits);
+
+static inline void ep93xx_devcfg_set_bits(unsigned int bits)
+{
+	ep93xx_devcfg_set_clear(bits, 0x00);
+}
+
+static inline void ep93xx_devcfg_clear_bits(unsigned int bits)
+{
+	ep93xx_devcfg_set_clear(0x00, bits);
+}
+
 /*
  * EP93xx Physical Memory Map:
  *
-- 
1.7.0.4

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

* [PATCH 08/11] ep93xx: Move EP93XX_WATCHDOG_BASE define to driver
  2012-01-11  3:14 [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
                   ` (6 preceding siblings ...)
  2012-01-11  3:14 ` [PATCH 07/11] ep93xx: Make syscon access functions private to SoC Ryan Mallon
@ 2012-01-11  3:14 ` Ryan Mallon
  2012-01-13 17:45   ` H Hartley Sweeten
  2012-01-11  3:14 ` [PATCH 09/11] ep93xx: Move crunch code to mach-ep93xx directory Ryan Mallon
                   ` (5 subsequent siblings)
  13 siblings, 1 reply; 41+ messages in thread
From: Ryan Mallon @ 2012-01-11  3:14 UTC (permalink / raw)
  To: linux-arm-kernel

The EP93xx watchdog driver is the only user of this define, move it
there.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Cc: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
---
 arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |    2 --
 drivers/watchdog/ep93xx_wdt.c                   |    1 +
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
index 387f745..225790d 100644
--- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
+++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
@@ -127,7 +127,5 @@
 #define EP93XX_SYSCON_SYSCFG_LCSN1	(1<<0)
 #define EP93XX_SYSCON_SWLOCK		EP93XX_SYSCON_REG(0xc0)
 
-#define EP93XX_WATCHDOG_BASE		EP93XX_APB_IOMEM(0x00140000)
-
 
 #endif
diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c
index 726b7df..82f648a 100644
--- a/drivers/watchdog/ep93xx_wdt.c
+++ b/drivers/watchdog/ep93xx_wdt.c
@@ -49,6 +49,7 @@ static unsigned long boot_status;
 #define WDT_IN_USE		0
 #define WDT_OK_TO_CLOSE		1
 
+#define EP93XX_WATCHDOG_BASE	EP93XX_APB_IOMEM(0x00140000)
 #define EP93XX_WDT_REG(x)	(EP93XX_WATCHDOG_BASE + (x))
 #define EP93XX_WDT_WATCHDOG	EP93XX_WDT_REG(0x00)
 #define EP93XX_WDT_WDSTATUS	EP93XX_WDT_REG(0x04)
-- 
1.7.0.4

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

* [PATCH 09/11] ep93xx: Move crunch code to mach-ep93xx directory
  2012-01-11  3:14 [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
                   ` (7 preceding siblings ...)
  2012-01-11  3:14 ` [PATCH 08/11] ep93xx: Move EP93XX_WATCHDOG_BASE define to driver Ryan Mallon
@ 2012-01-11  3:14 ` Ryan Mallon
  2012-01-13 17:51   ` H Hartley Sweeten
  2012-01-11  3:14 ` [PATCH 10/11] ep93xx: Move EP93XX_SYSCON defines to SoC private header Ryan Mallon
                   ` (4 subsequent siblings)
  13 siblings, 1 reply; 41+ messages in thread
From: Ryan Mallon @ 2012-01-11  3:14 UTC (permalink / raw)
  To: linux-arm-kernel

The crunch code in arch/arm/kernel is specific to the EP93xx. Move it
to the mach-ep93xx directory. This removes the need for the
EP93XX_SYSCON defines to be exported to arch/arm/kernel.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
---
 arch/arm/kernel/Makefile                       |    3 ---
 arch/arm/mach-ep93xx/Makefile                  |    3 +++
 arch/arm/{kernel => mach-ep93xx}/crunch-bits.S |    0
 arch/arm/{kernel => mach-ep93xx}/crunch.c      |    2 ++
 4 files changed, 5 insertions(+), 3 deletions(-)
 rename arch/arm/{kernel => mach-ep93xx}/crunch-bits.S (100%)
 rename arch/arm/{kernel => mach-ep93xx}/crunch.c (99%)

diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 16eed6a..57aa6c9 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -62,9 +62,6 @@ obj-$(CONFIG_SWP_EMULATE)	+= swp_emulate.o
 CFLAGS_swp_emulate.o		:= -Wa,-march=armv7-a
 obj-$(CONFIG_HAVE_HW_BREAKPOINT)	+= hw_breakpoint.o
 
-obj-$(CONFIG_CRUNCH)		+= crunch.o crunch-bits.o
-AFLAGS_crunch-bits.o		:= -Wa,-mcpu=ep9312
-
 obj-$(CONFIG_CPU_XSCALE)	+= xscale-cp0.o
 obj-$(CONFIG_CPU_XSC3)		+= xscale-cp0.o
 obj-$(CONFIG_CPU_MOHAWK)	+= xscale-cp0.o
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile
index 574209d..0dc51f9 100644
--- a/arch/arm/mach-ep93xx/Makefile
+++ b/arch/arm/mach-ep93xx/Makefile
@@ -8,6 +8,9 @@ obj-			:=
 
 obj-$(CONFIG_EP93XX_DMA)	+= dma.o
 
+obj-$(CONFIG_CRUNCH)		+= crunch.o crunch-bits.o
+AFLAGS_crunch-bits.o		:= -Wa,-mcpu=ep9312
+
 obj-$(CONFIG_MACH_ADSSPHERE)	+= adssphere.o
 obj-$(CONFIG_MACH_EDB93XX)	+= edb93xx.o
 obj-$(CONFIG_MACH_GESBC9312)	+= gesbc9312.o
diff --git a/arch/arm/kernel/crunch-bits.S b/arch/arm/mach-ep93xx/crunch-bits.S
similarity index 100%
rename from arch/arm/kernel/crunch-bits.S
rename to arch/arm/mach-ep93xx/crunch-bits.S
diff --git a/arch/arm/kernel/crunch.c b/arch/arm/mach-ep93xx/crunch.c
similarity index 99%
rename from arch/arm/kernel/crunch.c
rename to arch/arm/mach-ep93xx/crunch.c
index 25ef223..d05ed0b 100644
--- a/arch/arm/kernel/crunch.c
+++ b/arch/arm/mach-ep93xx/crunch.c
@@ -19,6 +19,8 @@
 #include <mach/ep93xx-regs.h>
 #include <asm/thread_notify.h>
 
+#include "soc.h"
+
 struct crunch_state *crunch_owner;
 
 void crunch_task_release(struct thread_info *thread)
-- 
1.7.0.4

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

* [PATCH 10/11] ep93xx: Move EP93XX_SYSCON defines to SoC private header
  2012-01-11  3:14 [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
                   ` (8 preceding siblings ...)
  2012-01-11  3:14 ` [PATCH 09/11] ep93xx: Move crunch code to mach-ep93xx directory Ryan Mallon
@ 2012-01-11  3:14 ` Ryan Mallon
  2012-01-13 17:52   ` H Hartley Sweeten
  2012-01-11  3:14 ` [PATCH 11/11] ep93xx: Remove unnecessary includes of ep93xx-regs.h Ryan Mallon
                   ` (3 subsequent siblings)
  13 siblings, 1 reply; 41+ messages in thread
From: Ryan Mallon @ 2012-01-11  3:14 UTC (permalink / raw)
  To: linux-arm-kernel

The EP93XX_SYSCON defines are now no longer needed outside of the
EP93xx SoC core code, so they can be moved to a private header.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
---
 arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |   90 -----------------------
 arch/arm/mach-ep93xx/soc.h                      |   90 +++++++++++++++++++++++
 2 files changed, 90 insertions(+), 90 deletions(-)

diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
index 225790d..c64d742 100644
--- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
+++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
@@ -38,94 +38,4 @@
 #define EP93XX_UART3_PHYS_BASE		EP93XX_APB_PHYS(0x000e0000)
 #define EP93XX_UART3_BASE		EP93XX_APB_IOMEM(0x000e0000)
 
-#define EP93XX_SYSCON_BASE		EP93XX_APB_IOMEM(0x00130000)
-#define EP93XX_SYSCON_REG(x)		(EP93XX_SYSCON_BASE + (x))
-#define EP93XX_SYSCON_POWER_STATE	EP93XX_SYSCON_REG(0x00)
-#define EP93XX_SYSCON_PWRCNT		EP93XX_SYSCON_REG(0x04)
-#define EP93XX_SYSCON_PWRCNT_FIR_EN	(1<<31)
-#define EP93XX_SYSCON_PWRCNT_UARTBAUD	(1<<29)
-#define EP93XX_SYSCON_PWRCNT_USH_EN	(1<<28)
-#define EP93XX_SYSCON_PWRCNT_DMA_M2M1	(1<<27)
-#define EP93XX_SYSCON_PWRCNT_DMA_M2M0	(1<<26)
-#define EP93XX_SYSCON_PWRCNT_DMA_M2P8	(1<<25)
-#define EP93XX_SYSCON_PWRCNT_DMA_M2P9	(1<<24)
-#define EP93XX_SYSCON_PWRCNT_DMA_M2P6	(1<<23)
-#define EP93XX_SYSCON_PWRCNT_DMA_M2P7	(1<<22)
-#define EP93XX_SYSCON_PWRCNT_DMA_M2P4	(1<<21)
-#define EP93XX_SYSCON_PWRCNT_DMA_M2P5	(1<<20)
-#define EP93XX_SYSCON_PWRCNT_DMA_M2P2	(1<<19)
-#define EP93XX_SYSCON_PWRCNT_DMA_M2P3	(1<<18)
-#define EP93XX_SYSCON_PWRCNT_DMA_M2P0	(1<<17)
-#define EP93XX_SYSCON_PWRCNT_DMA_M2P1	(1<<16)
-#define EP93XX_SYSCON_HALT		EP93XX_SYSCON_REG(0x08)
-#define EP93XX_SYSCON_STANDBY		EP93XX_SYSCON_REG(0x0c)
-#define EP93XX_SYSCON_CLKSET1		EP93XX_SYSCON_REG(0x20)
-#define EP93XX_SYSCON_CLKSET1_NBYP1	(1<<23)
-#define EP93XX_SYSCON_CLKSET2		EP93XX_SYSCON_REG(0x24)
-#define EP93XX_SYSCON_CLKSET2_NBYP2	(1<<19)
-#define EP93XX_SYSCON_CLKSET2_PLL2_EN	(1<<18)
-#define EP93XX_SYSCON_DEVCFG		EP93XX_SYSCON_REG(0x80)
-#define EP93XX_SYSCON_DEVCFG_SWRST	(1<<31)
-#define EP93XX_SYSCON_DEVCFG_D1ONG	(1<<30)
-#define EP93XX_SYSCON_DEVCFG_D0ONG	(1<<29)
-#define EP93XX_SYSCON_DEVCFG_IONU2	(1<<28)
-#define EP93XX_SYSCON_DEVCFG_GONK	(1<<27)
-#define EP93XX_SYSCON_DEVCFG_TONG	(1<<26)
-#define EP93XX_SYSCON_DEVCFG_MONG	(1<<25)
-#define EP93XX_SYSCON_DEVCFG_U3EN	(1<<24)
-#define EP93XX_SYSCON_DEVCFG_CPENA	(1<<23)
-#define EP93XX_SYSCON_DEVCFG_A2ONG	(1<<22)
-#define EP93XX_SYSCON_DEVCFG_A1ONG	(1<<21)
-#define EP93XX_SYSCON_DEVCFG_U2EN	(1<<20)
-#define EP93XX_SYSCON_DEVCFG_EXVC	(1<<19)
-#define EP93XX_SYSCON_DEVCFG_U1EN	(1<<18)
-#define EP93XX_SYSCON_DEVCFG_TIN	(1<<17)
-#define EP93XX_SYSCON_DEVCFG_HC3IN	(1<<15)
-#define EP93XX_SYSCON_DEVCFG_HC3EN	(1<<14)
-#define EP93XX_SYSCON_DEVCFG_HC1IN	(1<<13)
-#define EP93XX_SYSCON_DEVCFG_HC1EN	(1<<12)
-#define EP93XX_SYSCON_DEVCFG_HONIDE	(1<<11)
-#define EP93XX_SYSCON_DEVCFG_GONIDE	(1<<10)
-#define EP93XX_SYSCON_DEVCFG_PONG	(1<<9)
-#define EP93XX_SYSCON_DEVCFG_EONIDE	(1<<8)
-#define EP93XX_SYSCON_DEVCFG_I2SONSSP	(1<<7)
-#define EP93XX_SYSCON_DEVCFG_I2SONAC97	(1<<6)
-#define EP93XX_SYSCON_DEVCFG_RASONP3	(1<<4)
-#define EP93XX_SYSCON_DEVCFG_RAS	(1<<3)
-#define EP93XX_SYSCON_DEVCFG_ADCPD	(1<<2)
-#define EP93XX_SYSCON_DEVCFG_KEYS	(1<<1)
-#define EP93XX_SYSCON_DEVCFG_SHENA	(1<<0)
-#define EP93XX_SYSCON_VIDCLKDIV		EP93XX_SYSCON_REG(0x84)
-#define EP93XX_SYSCON_CLKDIV_ENABLE	(1<<15)
-#define EP93XX_SYSCON_CLKDIV_ESEL	(1<<14)
-#define EP93XX_SYSCON_CLKDIV_PSEL	(1<<13)
-#define EP93XX_SYSCON_CLKDIV_PDIV_SHIFT	8
-#define EP93XX_SYSCON_I2SCLKDIV		EP93XX_SYSCON_REG(0x8c)
-#define EP93XX_SYSCON_I2SCLKDIV_SENA	(1<<31)
-#define EP93XX_SYSCON_I2SCLKDIV_ORIDE   (1<<29)
-#define EP93XX_SYSCON_I2SCLKDIV_SPOL	(1<<19)
-#define EP93XX_I2SCLKDIV_SDIV		(1 << 16)
-#define EP93XX_I2SCLKDIV_LRDIV32	(0 << 17)
-#define EP93XX_I2SCLKDIV_LRDIV64	(1 << 17)
-#define EP93XX_I2SCLKDIV_LRDIV128 	(2 << 17)
-#define EP93XX_I2SCLKDIV_LRDIV_MASK 	(3 << 17)
-#define EP93XX_SYSCON_KEYTCHCLKDIV	EP93XX_SYSCON_REG(0x90)
-#define EP93XX_SYSCON_KEYTCHCLKDIV_TSEN	(1<<31)
-#define EP93XX_SYSCON_KEYTCHCLKDIV_ADIV	(1<<16)
-#define EP93XX_SYSCON_KEYTCHCLKDIV_KEN	(1<<15)
-#define EP93XX_SYSCON_KEYTCHCLKDIV_KDIV	(1<<0)
-#define EP93XX_SYSCON_SYSCFG		EP93XX_SYSCON_REG(0x9c)
-#define EP93XX_SYSCON_SYSCFG_REV_MASK	(0xf0000000)
-#define EP93XX_SYSCON_SYSCFG_REV_SHIFT	(28)
-#define EP93XX_SYSCON_SYSCFG_SBOOT	(1<<8)
-#define EP93XX_SYSCON_SYSCFG_LCSN7	(1<<7)
-#define EP93XX_SYSCON_SYSCFG_LCSN6	(1<<6)
-#define EP93XX_SYSCON_SYSCFG_LASDO	(1<<5)
-#define EP93XX_SYSCON_SYSCFG_LEEDA	(1<<4)
-#define EP93XX_SYSCON_SYSCFG_LEECLK	(1<<3)
-#define EP93XX_SYSCON_SYSCFG_LCSN2	(1<<1)
-#define EP93XX_SYSCON_SYSCFG_LCSN1	(1<<0)
-#define EP93XX_SYSCON_SWLOCK		EP93XX_SYSCON_REG(0xc0)
-
-
 #endif
diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h
index 958282a..0e1041d 100644
--- a/arch/arm/mach-ep93xx/soc.h
+++ b/arch/arm/mach-ep93xx/soc.h
@@ -115,4 +115,94 @@ static inline void ep93xx_devcfg_clear_bits(unsigned int bits)
 #define EP93XX_RTC_PHYS_BASE		EP93XX_APB_PHYS(0x00120000)
 #define EP93XX_RTC_BASE			EP93XX_APB_IOMEM(0x00120000)
 
+/* System controller */
+#define EP93XX_SYSCON_BASE		EP93XX_APB_IOMEM(0x00130000)
+#define EP93XX_SYSCON_REG(x)		(EP93XX_SYSCON_BASE + (x))
+#define EP93XX_SYSCON_POWER_STATE	EP93XX_SYSCON_REG(0x00)
+#define EP93XX_SYSCON_PWRCNT		EP93XX_SYSCON_REG(0x04)
+#define EP93XX_SYSCON_PWRCNT_FIR_EN	(1<<31)
+#define EP93XX_SYSCON_PWRCNT_UARTBAUD	(1<<29)
+#define EP93XX_SYSCON_PWRCNT_USH_EN	(1<<28)
+#define EP93XX_SYSCON_PWRCNT_DMA_M2M1	(1<<27)
+#define EP93XX_SYSCON_PWRCNT_DMA_M2M0	(1<<26)
+#define EP93XX_SYSCON_PWRCNT_DMA_M2P8	(1<<25)
+#define EP93XX_SYSCON_PWRCNT_DMA_M2P9	(1<<24)
+#define EP93XX_SYSCON_PWRCNT_DMA_M2P6	(1<<23)
+#define EP93XX_SYSCON_PWRCNT_DMA_M2P7	(1<<22)
+#define EP93XX_SYSCON_PWRCNT_DMA_M2P4	(1<<21)
+#define EP93XX_SYSCON_PWRCNT_DMA_M2P5	(1<<20)
+#define EP93XX_SYSCON_PWRCNT_DMA_M2P2	(1<<19)
+#define EP93XX_SYSCON_PWRCNT_DMA_M2P3	(1<<18)
+#define EP93XX_SYSCON_PWRCNT_DMA_M2P0	(1<<17)
+#define EP93XX_SYSCON_PWRCNT_DMA_M2P1	(1<<16)
+#define EP93XX_SYSCON_HALT		EP93XX_SYSCON_REG(0x08)
+#define EP93XX_SYSCON_STANDBY		EP93XX_SYSCON_REG(0x0c)
+#define EP93XX_SYSCON_CLKSET1		EP93XX_SYSCON_REG(0x20)
+#define EP93XX_SYSCON_CLKSET1_NBYP1	(1<<23)
+#define EP93XX_SYSCON_CLKSET2		EP93XX_SYSCON_REG(0x24)
+#define EP93XX_SYSCON_CLKSET2_NBYP2	(1<<19)
+#define EP93XX_SYSCON_CLKSET2_PLL2_EN	(1<<18)
+#define EP93XX_SYSCON_DEVCFG		EP93XX_SYSCON_REG(0x80)
+#define EP93XX_SYSCON_DEVCFG_SWRST	(1<<31)
+#define EP93XX_SYSCON_DEVCFG_D1ONG	(1<<30)
+#define EP93XX_SYSCON_DEVCFG_D0ONG	(1<<29)
+#define EP93XX_SYSCON_DEVCFG_IONU2	(1<<28)
+#define EP93XX_SYSCON_DEVCFG_GONK	(1<<27)
+#define EP93XX_SYSCON_DEVCFG_TONG	(1<<26)
+#define EP93XX_SYSCON_DEVCFG_MONG	(1<<25)
+#define EP93XX_SYSCON_DEVCFG_U3EN	(1<<24)
+#define EP93XX_SYSCON_DEVCFG_CPENA	(1<<23)
+#define EP93XX_SYSCON_DEVCFG_A2ONG	(1<<22)
+#define EP93XX_SYSCON_DEVCFG_A1ONG	(1<<21)
+#define EP93XX_SYSCON_DEVCFG_U2EN	(1<<20)
+#define EP93XX_SYSCON_DEVCFG_EXVC	(1<<19)
+#define EP93XX_SYSCON_DEVCFG_U1EN	(1<<18)
+#define EP93XX_SYSCON_DEVCFG_TIN	(1<<17)
+#define EP93XX_SYSCON_DEVCFG_HC3IN	(1<<15)
+#define EP93XX_SYSCON_DEVCFG_HC3EN	(1<<14)
+#define EP93XX_SYSCON_DEVCFG_HC1IN	(1<<13)
+#define EP93XX_SYSCON_DEVCFG_HC1EN	(1<<12)
+#define EP93XX_SYSCON_DEVCFG_HONIDE	(1<<11)
+#define EP93XX_SYSCON_DEVCFG_GONIDE	(1<<10)
+#define EP93XX_SYSCON_DEVCFG_PONG	(1<<9)
+#define EP93XX_SYSCON_DEVCFG_EONIDE	(1<<8)
+#define EP93XX_SYSCON_DEVCFG_I2SONSSP	(1<<7)
+#define EP93XX_SYSCON_DEVCFG_I2SONAC97	(1<<6)
+#define EP93XX_SYSCON_DEVCFG_RASONP3	(1<<4)
+#define EP93XX_SYSCON_DEVCFG_RAS	(1<<3)
+#define EP93XX_SYSCON_DEVCFG_ADCPD	(1<<2)
+#define EP93XX_SYSCON_DEVCFG_KEYS	(1<<1)
+#define EP93XX_SYSCON_DEVCFG_SHENA	(1<<0)
+#define EP93XX_SYSCON_VIDCLKDIV		EP93XX_SYSCON_REG(0x84)
+#define EP93XX_SYSCON_CLKDIV_ENABLE	(1<<15)
+#define EP93XX_SYSCON_CLKDIV_ESEL	(1<<14)
+#define EP93XX_SYSCON_CLKDIV_PSEL	(1<<13)
+#define EP93XX_SYSCON_CLKDIV_PDIV_SHIFT	8
+#define EP93XX_SYSCON_I2SCLKDIV		EP93XX_SYSCON_REG(0x8c)
+#define EP93XX_SYSCON_I2SCLKDIV_SENA	(1<<31)
+#define EP93XX_SYSCON_I2SCLKDIV_ORIDE   (1<<29)
+#define EP93XX_SYSCON_I2SCLKDIV_SPOL	(1<<19)
+#define EP93XX_I2SCLKDIV_SDIV		(1 << 16)
+#define EP93XX_I2SCLKDIV_LRDIV32	(0 << 17)
+#define EP93XX_I2SCLKDIV_LRDIV64	(1 << 17)
+#define EP93XX_I2SCLKDIV_LRDIV128 	(2 << 17)
+#define EP93XX_I2SCLKDIV_LRDIV_MASK 	(3 << 17)
+#define EP93XX_SYSCON_KEYTCHCLKDIV	EP93XX_SYSCON_REG(0x90)
+#define EP93XX_SYSCON_KEYTCHCLKDIV_TSEN	(1<<31)
+#define EP93XX_SYSCON_KEYTCHCLKDIV_ADIV	(1<<16)
+#define EP93XX_SYSCON_KEYTCHCLKDIV_KEN	(1<<15)
+#define EP93XX_SYSCON_KEYTCHCLKDIV_KDIV	(1<<0)
+#define EP93XX_SYSCON_SYSCFG		EP93XX_SYSCON_REG(0x9c)
+#define EP93XX_SYSCON_SYSCFG_REV_MASK	(0xf0000000)
+#define EP93XX_SYSCON_SYSCFG_REV_SHIFT	(28)
+#define EP93XX_SYSCON_SYSCFG_SBOOT	(1<<8)
+#define EP93XX_SYSCON_SYSCFG_LCSN7	(1<<7)
+#define EP93XX_SYSCON_SYSCFG_LCSN6	(1<<6)
+#define EP93XX_SYSCON_SYSCFG_LASDO	(1<<5)
+#define EP93XX_SYSCON_SYSCFG_LEEDA	(1<<4)
+#define EP93XX_SYSCON_SYSCFG_LEECLK	(1<<3)
+#define EP93XX_SYSCON_SYSCFG_LCSN2	(1<<1)
+#define EP93XX_SYSCON_SYSCFG_LCSN1	(1<<0)
+#define EP93XX_SYSCON_SWLOCK		EP93XX_SYSCON_REG(0xc0)
+
 #endif /* _EP93XX_PHYS_BASE_H */
-- 
1.7.0.4

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

* [PATCH 11/11] ep93xx: Remove unnecessary includes of ep93xx-regs.h
  2012-01-11  3:14 [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
                   ` (9 preceding siblings ...)
  2012-01-11  3:14 ` [PATCH 10/11] ep93xx: Move EP93XX_SYSCON defines to SoC private header Ryan Mallon
@ 2012-01-11  3:14 ` Ryan Mallon
  2012-01-13 17:54   ` H Hartley Sweeten
  2012-01-12  0:17 ` [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
                   ` (2 subsequent siblings)
  13 siblings, 1 reply; 41+ messages in thread
From: Ryan Mallon @ 2012-01-11  3:14 UTC (permalink / raw)
  To: linux-arm-kernel

Remove the include of ep93xx-regs.h from files which no longer need
it, notably include/mach/hardware.h. An explict include of
ep93xx-regs.h is needed in the EP93xx watchdog driver for the
EP93XX_APB_IOMEM macro.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
---
 arch/arm/mach-ep93xx/crunch.c                |    2 +-
 arch/arm/mach-ep93xx/include/mach/hardware.h |    1 -
 arch/arm/mach-ep93xx/soc.h                   |    2 ++
 drivers/watchdog/ep93xx_wdt.c                |    1 +
 4 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-ep93xx/crunch.c b/arch/arm/mach-ep93xx/crunch.c
index d05ed0b..74753e2 100644
--- a/arch/arm/mach-ep93xx/crunch.c
+++ b/arch/arm/mach-ep93xx/crunch.c
@@ -16,7 +16,7 @@
 #include <linux/sched.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <mach/ep93xx-regs.h>
+
 #include <asm/thread_notify.h>
 
 #include "soc.h"
diff --git a/arch/arm/mach-ep93xx/include/mach/hardware.h b/arch/arm/mach-ep93xx/include/mach/hardware.h
index 4df8428..efcd478 100644
--- a/arch/arm/mach-ep93xx/include/mach/hardware.h
+++ b/arch/arm/mach-ep93xx/include/mach/hardware.h
@@ -5,7 +5,6 @@
 #ifndef __ASM_ARCH_HARDWARE_H
 #define __ASM_ARCH_HARDWARE_H
 
-#include <mach/ep93xx-regs.h>
 #include <mach/platform.h>
 
 /*
diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h
index 0e1041d..0a64e4a 100644
--- a/arch/arm/mach-ep93xx/soc.h
+++ b/arch/arm/mach-ep93xx/soc.h
@@ -13,6 +13,8 @@
 #ifndef _EP93XX_SOC_H
 #define _EP93XX_SOC_H
 
+#include <mach/ep93xx-regs.h>
+
 /* EP93xx System Controller software locked register write */
 void ep93xx_syscon_swlocked_write(unsigned int val, void __iomem *reg);
 void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits);
diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c
index 82f648a..3d7f691 100644
--- a/drivers/watchdog/ep93xx_wdt.c
+++ b/drivers/watchdog/ep93xx_wdt.c
@@ -31,6 +31,7 @@
 #include <linux/uaccess.h>
 #include <linux/io.h>
 #include <mach/hardware.h>
+#include <mach/ep93xx-regs.h>
 
 #define WDT_VERSION	"0.3"
 #define PFX		"ep93xx_wdt: "
-- 
1.7.0.4

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

* [PATCH 06/11] ep93xx: Don't use system controller defines in audio drivers
  2012-01-11  3:14 ` [PATCH 06/11] ep93xx: Don't use system controller defines in audio drivers Ryan Mallon
@ 2012-01-11 17:42   ` Mark Brown
  2012-01-11 19:57     ` Ryan Mallon
  2012-01-13 17:35   ` H Hartley Sweeten
  1 sibling, 1 reply; 41+ messages in thread
From: Mark Brown @ 2012-01-11 17:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 11, 2012 at 02:14:31PM +1100, Ryan Mallon wrote:
> Both the Snapper CL15 and EDB93xx audio drivers set the same audio
> configuration in ep93xx_i2s_acquire. Remove the arguments to
> ep93xx_i2s_acquire so that the audio drivers no longer need the
> EP93XX_SYSCON defines exported.

What if there are other boards out there which use a different
configuration?

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

* [PATCH 06/11] ep93xx: Don't use system controller defines in audio drivers
  2012-01-11 17:42   ` Mark Brown
@ 2012-01-11 19:57     ` Ryan Mallon
  2012-01-12  3:04       ` Mark Brown
  0 siblings, 1 reply; 41+ messages in thread
From: Ryan Mallon @ 2012-01-11 19:57 UTC (permalink / raw)
  To: linux-arm-kernel

On 12/01/12 04:42, Mark Brown wrote:
> On Wed, Jan 11, 2012 at 02:14:31PM +1100, Ryan Mallon wrote:
>> Both the Snapper CL15 and EDB93xx audio drivers set the same audio
>> configuration in ep93xx_i2s_acquire. Remove the arguments to
>> ep93xx_i2s_acquire so that the audio drivers no longer need the
>> EP93XX_SYSCON defines exported.
> What if there are other boards out there which use a different
> configuration?

We can either add a second function, like ep93xx_i2s_acquire_on_ssp, or
we can create a set of defines for the various options needed. I just
want to avoid exposing the system controller registers/flags directly.
The ep93xx chip is now obsolete, so I don't expect new boards to appear,
and these two boards have been the only ones with audio support for a
couple of years now, so this seemed to be the best solution.

~Ryan

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

* [PATCH 00/11] ep93xx: Move SoC private bits to core
  2012-01-11  3:14 [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
                   ` (10 preceding siblings ...)
  2012-01-11  3:14 ` [PATCH 11/11] ep93xx: Remove unnecessary includes of ep93xx-regs.h Ryan Mallon
@ 2012-01-12  0:17 ` Ryan Mallon
  2012-01-13 17:56 ` H Hartley Sweeten
  2012-01-14 19:07 ` Mika Westerberg
  13 siblings, 0 replies; 41+ messages in thread
From: Ryan Mallon @ 2012-01-12  0:17 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/01/12 14:14, Ryan Mallon wrote:

> This patch series is an effort to move the ep93xx SoC specific code out
> of drivers and include/mach into arch/arm/mach-ep93xx. This work
> involves the following changes:


So, I stupidly managed to make this patch series against some old,
irrelevant kernel version. I have rebased the patches on top of -next
(avaiable on the ep93xx-private-soc branch
git at github.com:RyanMallon/linux-2.6.git, hopefully I got that right,
it's my first attempt at doing a public git tree).

The rebase went cleanly, except for patch 5 being dropped since the ARM
reset rework already made that change. Since the patches should be
largely unchanged, I'll wait for an initial round of comments before
posting the new versions.

Apologies for the mistake,
~Ryan

> 
>  - Create a new private header called soc.h to replace most of 
>    mach/include/ep93xx-regs.h
>  - Move the Maverick crunch code from arch/arm/kernel to mach-ep93xx
>  - Move all system controller access to the ep93xx core code
> 
> There are a small handful of defines left in ep93xx-regs.h which are
> used by both the ep93xx core and include/mach files (uncompress.h,
> debug-macro.S, etc).
> 
> Ryan Mallon (11):
>   ep93xx: Move PHYS_BASE defines to local SoC header file
>   ep93xx: Move GPIO defines to gpio-ep93xx.h
>   ep93xx: Move peripheral defines to local SoC header
>   ep93xx: Configure GPIO ports in core code
>   ep93xx: Move arch_reset to core.c
>   ep93xx: Don't use system controller defines in audio drivers
>   ep93xx: Make syscon access functions private to SoC
>   ep93xx: Move EP93XX_WATCHDOG_BASE define to driver
>   ep93xx: Move crunch code to mach-ep93xx directory
>   ep93xx: Move EP93XX_SYSCON defines to SoC private header
>   ep93xx: Remove unnecessary includes of ep93xx-regs.h
> 
>  arch/arm/kernel/Makefile                        |    3 -
>  arch/arm/mach-ep93xx/Makefile                   |    3 +
>  arch/arm/mach-ep93xx/adssphere.c                |    1 +
>  arch/arm/mach-ep93xx/clock.c                    |    1 +
>  arch/arm/mach-ep93xx/core.c                     |   47 ++++--
>  arch/arm/{kernel => mach-ep93xx}/crunch-bits.S  |    0
>  arch/arm/{kernel => mach-ep93xx}/crunch.c       |    4 +-
>  arch/arm/mach-ep93xx/dma.c                      |    2 +
>  arch/arm/mach-ep93xx/edb93xx.c                  |    2 +
>  arch/arm/mach-ep93xx/gesbc9312.c                |    1 +
>  arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |  191 +--------------------
>  arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h |   10 +
>  arch/arm/mach-ep93xx/include/mach/hardware.h    |    1 -
>  arch/arm/mach-ep93xx/include/mach/platform.h    |   16 +--
>  arch/arm/mach-ep93xx/include/mach/system.h      |   14 +--
>  arch/arm/mach-ep93xx/micro9.c                   |    1 +
>  arch/arm/mach-ep93xx/simone.c                   |    2 +
>  arch/arm/mach-ep93xx/snappercl15.c              |    2 +
>  arch/arm/mach-ep93xx/soc.h                      |  210 +++++++++++++++++++++++
>  arch/arm/mach-ep93xx/ts72xx.c                   |    2 +
>  arch/arm/mach-ep93xx/vision_ep9307.c            |    2 +
>  drivers/gpio/gpio-ep93xx.c                      |    7 -
>  drivers/watchdog/ep93xx_wdt.c                   |    2 +
>  sound/soc/ep93xx/edb93xx.c                      |    4 +-
>  sound/soc/ep93xx/snappercl15.c                  |    4 +-
>  25 files changed, 279 insertions(+), 253 deletions(-)
>  rename arch/arm/{kernel => mach-ep93xx}/crunch-bits.S (100%)
>  rename arch/arm/{kernel => mach-ep93xx}/crunch.c (98%)
>  create mode 100644 arch/arm/mach-ep93xx/soc.h
> 

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

* [PATCH 06/11] ep93xx: Don't use system controller defines in audio drivers
  2012-01-11 19:57     ` Ryan Mallon
@ 2012-01-12  3:04       ` Mark Brown
  0 siblings, 0 replies; 41+ messages in thread
From: Mark Brown @ 2012-01-12  3:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 12, 2012 at 06:57:43AM +1100, Ryan Mallon wrote:

> We can either add a second function, like ep93xx_i2s_acquire_on_ssp, or
> we can create a set of defines for the various options needed. I just
> want to avoid exposing the system controller registers/flags directly.
> The ep93xx chip is now obsolete, so I don't expect new boards to appear,
> and these two boards have been the only ones with audio support for a
> couple of years now, so this seemed to be the best solution.

OK, that seems reasonable - I've applied the change, thanks.

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

* [PATCH 04/11] ep93xx: Configure GPIO ports in core code
  2012-01-11  3:14 ` [PATCH 04/11] ep93xx: Configure GPIO ports in core code Ryan Mallon
@ 2012-01-13  6:27   ` Mika Westerberg
  2012-01-13  7:00     ` Ryan Mallon
  0 siblings, 1 reply; 41+ messages in thread
From: Mika Westerberg @ 2012-01-13  6:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 11, 2012 at 02:14:29PM +1100, Ryan Mallon wrote:
> Move the pinmux setting of the EP93xx GPIOs to the core code. This
> removes the need for the GPIO driver to have access to the system
> controller registers.
> 
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Mika Westerberg <mika.westerberg@iki.fi>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
> ---
>  arch/arm/mach-ep93xx/core.c |    7 +++++++
>  drivers/gpio/gpio-ep93xx.c  |    7 -------
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
> index dcb10c2..978c5a6 100644
> --- a/arch/arm/mach-ep93xx/core.c
> +++ b/arch/arm/mach-ep93xx/core.c
> @@ -896,6 +896,13 @@ void __init ep93xx_init_devices(void)
>  	/* Disallow access to MaverickCrunch initially */
>  	ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA);
>  
> +	/* Default all ports to GPIO */
> +	ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_KEYS |
> +			       EP93XX_SYSCON_DEVCFG_GONK |
> +			       EP93XX_SYSCON_DEVCFG_EONIDE |
> +			       EP93XX_SYSCON_DEVCFG_GONIDE |
> +			       EP93XX_SYSCON_DEVCFG_HONIDE);
> +

Doesn't this now change the behaviour? Now you unconditionally mux the pins
whereas before they were only muxed if we had GPIO driver enabled.

>  	/* Get the GPIO working early, other devices need it */
>  	platform_device_register(&ep93xx_gpio_device);
>  
> diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
> index 1c0fc37..4ca5642 100644
> --- a/drivers/gpio/gpio-ep93xx.c
> +++ b/drivers/gpio/gpio-ep93xx.c
> @@ -378,13 +378,6 @@ static int __devinit ep93xx_gpio_probe(struct platform_device *pdev)
>  	}
>  	ep93xx_gpio->mmio_base = mmio;
>  
> -	/* Default all ports to GPIO */
> -	ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_KEYS |
> -			       EP93XX_SYSCON_DEVCFG_GONK |
> -			       EP93XX_SYSCON_DEVCFG_EONIDE |
> -			       EP93XX_SYSCON_DEVCFG_GONIDE |
> -			       EP93XX_SYSCON_DEVCFG_HONIDE);
> -
>  	for (i = 0; i < ARRAY_SIZE(ep93xx_gpio_banks); i++) {
>  		struct bgpio_chip *bgc = &ep93xx_gpio->bgc[i];
>  		struct ep93xx_gpio_bank *bank = &ep93xx_gpio_banks[i];
> -- 
> 1.7.0.4

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

* [PATCH 04/11] ep93xx: Configure GPIO ports in core code
  2012-01-13  6:27   ` Mika Westerberg
@ 2012-01-13  7:00     ` Ryan Mallon
  2012-01-13  8:12       ` Mika Westerberg
  2012-01-13 18:05       ` H Hartley Sweeten
  0 siblings, 2 replies; 41+ messages in thread
From: Ryan Mallon @ 2012-01-13  7:00 UTC (permalink / raw)
  To: linux-arm-kernel

On 13/01/12 17:27, Mika Westerberg wrote:
> On Wed, Jan 11, 2012 at 02:14:29PM +1100, Ryan Mallon wrote:
>> Move the pinmux setting of the EP93xx GPIOs to the core code. This
>> removes the need for the GPIO driver to have access to the system
>> controller registers.
>>
>> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
>> Cc: Mika Westerberg <mika.westerberg@iki.fi>
>> Cc: Grant Likely <grant.likely@secretlab.ca>
>> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
>> ---
>>  arch/arm/mach-ep93xx/core.c |    7 +++++++
>>  drivers/gpio/gpio-ep93xx.c  |    7 -------
>>  2 files changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
>> index dcb10c2..978c5a6 100644
>> --- a/arch/arm/mach-ep93xx/core.c
>> +++ b/arch/arm/mach-ep93xx/core.c
>> @@ -896,6 +896,13 @@ void __init ep93xx_init_devices(void)
>>  	/* Disallow access to MaverickCrunch initially */
>>  	ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA);
>>  
>> +	/* Default all ports to GPIO */
>> +	ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_KEYS |
>> +			       EP93XX_SYSCON_DEVCFG_GONK |
>> +			       EP93XX_SYSCON_DEVCFG_EONIDE |
>> +			       EP93XX_SYSCON_DEVCFG_GONIDE |
>> +			       EP93XX_SYSCON_DEVCFG_HONIDE);
>> +
> Doesn't this now change the behaviour? Now you unconditionally mux the pins
> whereas before they were only muxed if we had GPIO driver enabled.

True, but I think the previous behaviour was broken anyway. If the gpio
driver was installed after any driver which has muxed gpio pins for
other purposes then it will override those settings. All of the ep93xx
drivers will mux the pins they need at probe time. IIRC, before the gpio
driver was moved out of arch/arm/mach-ep93xx we muxed all the pins
unconditionally anyway.

I can update the changelog to reflect the changed behaviour, but I don't
think it will cause problems for anyone. Will see if Hartley has any
comments.

~Ryan

>>  	/* Get the GPIO working early, other devices need it */
>>  	platform_device_register(&ep93xx_gpio_device);
>>  
>> diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
>> index 1c0fc37..4ca5642 100644
>> --- a/drivers/gpio/gpio-ep93xx.c
>> +++ b/drivers/gpio/gpio-ep93xx.c
>> @@ -378,13 +378,6 @@ static int __devinit ep93xx_gpio_probe(struct platform_device *pdev)
>>  	}
>>  	ep93xx_gpio->mmio_base = mmio;
>>  
>> -	/* Default all ports to GPIO */
>> -	ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_KEYS |
>> -			       EP93XX_SYSCON_DEVCFG_GONK |
>> -			       EP93XX_SYSCON_DEVCFG_EONIDE |
>> -			       EP93XX_SYSCON_DEVCFG_GONIDE |
>> -			       EP93XX_SYSCON_DEVCFG_HONIDE);
>> -
>>  	for (i = 0; i < ARRAY_SIZE(ep93xx_gpio_banks); i++) {
>>  		struct bgpio_chip *bgc = &ep93xx_gpio->bgc[i];
>>  		struct ep93xx_gpio_bank *bank = &ep93xx_gpio_banks[i];
>> -- 
>> 1.7.0.4

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

* [PATCH 04/11] ep93xx: Configure GPIO ports in core code
  2012-01-13  7:00     ` Ryan Mallon
@ 2012-01-13  8:12       ` Mika Westerberg
  2012-01-13 18:05       ` H Hartley Sweeten
  1 sibling, 0 replies; 41+ messages in thread
From: Mika Westerberg @ 2012-01-13  8:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 13, 2012 at 06:00:36PM +1100, Ryan Mallon wrote:
> On 13/01/12 17:27, Mika Westerberg wrote:
> > On Wed, Jan 11, 2012 at 02:14:29PM +1100, Ryan Mallon wrote:
> >> Move the pinmux setting of the EP93xx GPIOs to the core code. This
> >> removes the need for the GPIO driver to have access to the system
> >> controller registers.
> >>
> >> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> >> Cc: Mika Westerberg <mika.westerberg@iki.fi>
> >> Cc: Grant Likely <grant.likely@secretlab.ca>
> >> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
> >> ---
> >>  arch/arm/mach-ep93xx/core.c |    7 +++++++
> >>  drivers/gpio/gpio-ep93xx.c  |    7 -------
> >>  2 files changed, 7 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
> >> index dcb10c2..978c5a6 100644
> >> --- a/arch/arm/mach-ep93xx/core.c
> >> +++ b/arch/arm/mach-ep93xx/core.c
> >> @@ -896,6 +896,13 @@ void __init ep93xx_init_devices(void)
> >>  	/* Disallow access to MaverickCrunch initially */
> >>  	ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA);
> >>  
> >> +	/* Default all ports to GPIO */
> >> +	ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_KEYS |
> >> +			       EP93XX_SYSCON_DEVCFG_GONK |
> >> +			       EP93XX_SYSCON_DEVCFG_EONIDE |
> >> +			       EP93XX_SYSCON_DEVCFG_GONIDE |
> >> +			       EP93XX_SYSCON_DEVCFG_HONIDE);
> >> +
> > Doesn't this now change the behaviour? Now you unconditionally mux the pins
> > whereas before they were only muxed if we had GPIO driver enabled.
> 
> True, but I think the previous behaviour was broken anyway. If the gpio
> driver was installed after any driver which has muxed gpio pins for
> other purposes then it will override those settings. All of the ep93xx
> drivers will mux the pins they need at probe time. IIRC, before the gpio
> driver was moved out of arch/arm/mach-ep93xx we muxed all the pins
> unconditionally anyway.

Ah, right. So now it actually behaves better since it's not dependent on which
phase the GPIO driver is probed.

Thus,

Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>

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

* [PATCH 01/11] ep93xx: Move PHYS_BASE defines to local SoC header file
  2012-01-11  3:14 ` [PATCH 01/11] ep93xx: Move PHYS_BASE defines to local SoC header file Ryan Mallon
@ 2012-01-13 17:18   ` H Hartley Sweeten
  2012-01-13 21:35     ` Ryan Mallon
  0 siblings, 1 reply; 41+ messages in thread
From: H Hartley Sweeten @ 2012-01-13 17:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday, January 10, 2012 8:14 PM, Ryan Mallon wrote:
>
> The PHYS_BASE defines in arch/arm/mach-ep93xx/include/mach-ep93xx-regs.h
> are only used in the SoC code. Move the defines to a local header file.
>
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Mika Westerberg <mika.westerberg@iki.fi>
> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
> ---
>  arch/arm/mach-ep93xx/adssphere.c                |    1 +
>  arch/arm/mach-ep93xx/edb93xx.c                  |    2 +
>  arch/arm/mach-ep93xx/gesbc9312.c                |    1 +
>  arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |   34 ---------------
>  arch/arm/mach-ep93xx/micro9.c                   |    1 +
>  arch/arm/mach-ep93xx/simone.c                   |    2 +
>  arch/arm/mach-ep93xx/snappercl15.c              |    2 +
>  arch/arm/mach-ep93xx/soc.h                      |   50 +++++++++++++++++++++++
>  arch/arm/mach-ep93xx/ts72xx.c                   |    2 +
>  arch/arm/mach-ep93xx/vision_ep9307.c            |    2 +
>  10 files changed, 63 insertions(+), 34 deletions(-)  create mode 100644 arch/arm/mach-ep93xx/soc.h

<snip>

> diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index 70ef8c5..24df3ff 100644
> --- a/arch/arm/mach-ep93xx/edb93xx.c
> +++ b/arch/arm/mach-ep93xx/edb93xx.c
> @@ -42,6 +42,8 @@
>  #include <asm/mach-types.h>
>  #include <asm/mach/arch.h>
>  
> +#include "soc.h"
> +
 
Nitpick... Unnecessary whitespace...

<snip>

> diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index 8b2f143..f5965db 100644
> --- a/arch/arm/mach-ep93xx/ts72xx.c
> +++ b/arch/arm/mach-ep93xx/ts72xx.c
> @@ -27,6 +27,8 @@
>  #include <asm/mach/map.h>
>  #include <asm/mach/arch.h>
>  
> +#include "soc.h"
> +

Nitpick... Unnecessary whitespace...
 
Other than that... Looks ok.

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

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

* [PATCH 02/11] ep93xx: Move GPIO defines to gpio-ep93xx.h
  2012-01-11  3:14 ` [PATCH 02/11] ep93xx: Move GPIO defines to gpio-ep93xx.h Ryan Mallon
@ 2012-01-13 17:22   ` H Hartley Sweeten
  0 siblings, 0 replies; 41+ messages in thread
From: H Hartley Sweeten @ 2012-01-13 17:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday, January 10, 2012 8:14 PM, Ryan Mallon wrote:
>
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Mika Westerberg <mika.westerberg@iki.fi>
> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
> ---
>  arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |    8 --------
>  arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h |   10 ++++++++++
>  2 files changed, 10 insertions(+), 8 deletions(-)

Nitpick... You should add a commit comment.

Other than that, looks good.

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

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

* [PATCH 03/11] ep93xx: Move peripheral defines to local SoC header
  2012-01-11  3:14 ` [PATCH 03/11] ep93xx: Move peripheral defines to local SoC header Ryan Mallon
@ 2012-01-13 17:25   ` H Hartley Sweeten
  0 siblings, 0 replies; 41+ messages in thread
From: H Hartley Sweeten @ 2012-01-13 17:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday, January 10, 2012 8:14 PM, Ryan Mallon wrote:
>
> Move the AHB/APB peripheral defines to local SoC header since they
> are only needed by the core SoC code. The UART defines are not
>  moved because they are used by the mach/uncompress.h header.
>
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Mika Westerberg <mika.westerberg@iki.fi>
> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
> ---
>  arch/arm/mach-ep93xx/core.c                     |    1 +
>  arch/arm/mach-ep93xx/dma.c                      |    2 +
>  arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |   57 +----------------------
>  arch/arm/mach-ep93xx/soc.h                      |   54 +++++++++++++++++++++
>  4 files changed, 58 insertions(+), 56 deletions(-)

Looks good.

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

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

* [PATCH 05/11] ep93xx: Move arch_reset to core.c
  2012-01-11  3:14 ` [PATCH 05/11] ep93xx: Move arch_reset to core.c Ryan Mallon
@ 2012-01-13 17:28   ` H Hartley Sweeten
  0 siblings, 0 replies; 41+ messages in thread
From: H Hartley Sweeten @ 2012-01-13 17:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday, January 10, 2012 8:15 PM, Ryan Mallon wrote:
> 
> Move the arch_reset function from include/mach/system.h to core.c.
> This removes the need for the EP93XX_SYSCON_DEVCFG defines to
>  be exported in the include/mach headers.
>
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Mika Westerberg <mika.westerberg@iki.fi>
> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
> ---
>  arch/arm/mach-ep93xx/core.c                |   18 ++++++++++++++++++
>  arch/arm/mach-ep93xx/include/mach/system.h |   14 +-------------
>  2 files changed, 19 insertions(+), 13 deletions(-)

As you already found, the ARM reset rework already handled this.

Regards,
Hartley

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

* [PATCH 06/11] ep93xx: Don't use system controller defines in audio drivers
  2012-01-11  3:14 ` [PATCH 06/11] ep93xx: Don't use system controller defines in audio drivers Ryan Mallon
  2012-01-11 17:42   ` Mark Brown
@ 2012-01-13 17:35   ` H Hartley Sweeten
  2012-01-13 21:41     ` Ryan Mallon
  1 sibling, 1 reply; 41+ messages in thread
From: H Hartley Sweeten @ 2012-01-13 17:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday, January 10, 2012 8:15 PM, Ryan Mallon wrote:
>
> Both the Snapper CL15 and EDB93xx audio drivers set the same
> audio configuration in ep93xx_i2s_acquire. Remove the arguments
>  to ep93xx_i2s_acquire so that the audio drivers no longer need
> the EP93XX_SYSCON defines exported.
> 
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Mika Westerberg <mika.westerberg@iki.fi>
> Cc: Liam Girdwood <lrg@ti.com>
> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
> ---
>  arch/arm/mach-ep93xx/core.c                  |   19 ++++---------------
>  arch/arm/mach-ep93xx/include/mach/platform.h |    2 +-
>  sound/soc/ep93xx/edb93xx.c                   |    4 +---
>  sound/soc/ep93xx/snappercl15.c               |    4 +---
>  4 files changed, 7 insertions(+), 22 deletions(-)
>
> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index bd59696..0726b7b 100644
> --- a/arch/arm/mach-ep93xx/core.c
> +++ b/arch/arm/mach-ep93xx/core.c
> @@ -836,23 +836,12 @@ void __init ep93xx_register_i2s(void)
>  #define EP93XX_I2SCLKDIV_MASK		(EP93XX_SYSCON_I2SCLKDIV_ORIDE | \
>  					 EP93XX_SYSCON_I2SCLKDIV_SPOL)
>  
> -int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config)
> +int ep93xx_i2s_acquire(void)
>  {
>  	unsigned val;
>  
> -	/* Sanity check */
> -	if (i2s_pins & ~EP93XX_SYSCON_DEVCFG_I2S_MASK)
> -		return -EINVAL;
> -	if (i2s_config & ~EP93XX_I2SCLKDIV_MASK)
> -		return -EINVAL;
> -
> -	/* Must have only one of I2SONSSP/I2SONAC97 set */
> -	if ((i2s_pins & EP93XX_SYSCON_DEVCFG_I2SONSSP) ==
> -	    (i2s_pins & EP93XX_SYSCON_DEVCFG_I2SONAC97))
> -		return -EINVAL;
> -
> -	ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_I2S_MASK);
> -	ep93xx_devcfg_set_bits(i2s_pins);
> +	ep93xx_devcfg_set_clear(EP93XX_SYSCON_DEVCFG_I2SONAC97,
> +			EP93XX_SYSCON_DEVCFG_I2S_MASK);
>  
>  	/*
>  	 * This is potentially racy with the clock api for i2s_mclk, sclk and @@ -862,7 +851,7 @@ int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config)
>  	 */
>  	val = __raw_readl(EP93XX_SYSCON_I2SCLKDIV);
>  	val &= ~EP93XX_I2SCLKDIV_MASK;
> -	val |= i2s_config;
> +	val |= EP93XX_SYSCON_I2SCLKDIV_ORIDE | EP93XX_SYSCON_I2SCLKDIV_SPOL;
> 	ep93xx_syscon_swlocked_write(val, EP93XX_SYSCON_I2SCLKDIV);

Nitpick... You clear then set the same bits here.

> diff --git a/sound/soc/ep93xx/edb93xx.c b/sound/soc/ep93xx/edb93xx.c index 51930b6..3a6ab05 100644
> --- a/sound/soc/ep93xx/edb93xx.c
> +++ b/sound/soc/ep93xx/edb93xx.c
> @@ -94,9 +94,7 @@ static int __devinit edb93xx_probe(struct platform_device *pdev)
>  	struct snd_soc_card *card = &snd_soc_edb93xx;
>  	int ret;
>  
> -	ret = ep93xx_i2s_acquire(EP93XX_SYSCON_DEVCFG_I2SONAC97,
> -				 EP93XX_SYSCON_I2SCLKDIV_ORIDE |
> -				 EP93XX_SYSCON_I2SCLKDIV_SPOL);
> +	ret = ep93xx_i2s_acquire();
>  	if (ret)
>  		return ret;
>  
> diff --git a/sound/soc/ep93xx/snappercl15.c b/sound/soc/ep93xx/snappercl15.c index 2cde433..6ccac5a 100644
> --- a/sound/soc/ep93xx/snappercl15.c
> +++ b/sound/soc/ep93xx/snappercl15.c
> @@ -110,9 +110,7 @@ static int __devinit snappercl15_probe(struct platform_device *pdev)
>  	struct snd_soc_card *card = &snd_soc_snappercl15;
>  	int ret;
>  
> -	ret = ep93xx_i2s_acquire(EP93XX_SYSCON_DEVCFG_I2SONAC97,
> -				 EP93XX_SYSCON_I2SCLKDIV_ORIDE |
> -				 EP93XX_SYSCON_I2SCLKDIV_SPOL);
> +	ret = ep93xx_i2s_acquire();
>  	if (ret)
>  		return ret;
>

Maybe the ep93xx_i2s_acquire() function should be renamed to something
like ep93xx_i2s_ac97_acquire() so that the i2s configuration is understood.
This should address Mark Brown's issue.

Regardless, looks good.

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

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

* [PATCH 07/11] ep93xx: Make syscon access functions private to SoC
  2012-01-11  3:14 ` [PATCH 07/11] ep93xx: Make syscon access functions private to SoC Ryan Mallon
@ 2012-01-13 17:38   ` H Hartley Sweeten
  2012-01-13 21:43     ` Ryan Mallon
  0 siblings, 1 reply; 41+ messages in thread
From: H Hartley Sweeten @ 2012-01-13 17:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday, January 10, 2012 8:15 PM, Ryan Mallon wrote:
>
> The syscon access functions are no longer used outside of the
> core EP93xx code. Move their definitions into the SoC code.
> 
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Mika Westerberg <mika.westerberg@iki.fi>
> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
> ---
>  arch/arm/mach-ep93xx/clock.c                 |    1 +
>  arch/arm/mach-ep93xx/core.c                  |    2 --
>  arch/arm/mach-ep93xx/include/mach/platform.h |   14 --------------
>  arch/arm/mach-ep93xx/soc.h                   |   14 ++++++++++++++
>  4 files changed, 15 insertions(+), 16 deletions(-)

It looks like part of this patch is word wrapped, or it could just be me...

<snip>

> diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h index b0ef89b..958282a 100644
> --- a/arch/arm/mach-ep93xx/soc.h
> +++ b/arch/arm/mach-ep93xx/soc.h
> @@ -13,6 +13,20 @@
>  #ifndef _EP93XX_SOC_H
>  #define _EP93XX_SOC_H
>  
> +/* EP93xx System Controller software locked register write */ void 
> +ep93xx_syscon_swlocked_write(unsigned int val, void __iomem *reg); void 
> +ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int 
> +clear_bits);
> +
> +static inline void ep93xx_devcfg_set_bits(unsigned int bits) {
> +	ep93xx_devcfg_set_clear(bits, 0x00);
> +}
> +
> +static inline void ep93xx_devcfg_clear_bits(unsigned int bits) {
> +	ep93xx_devcfg_set_clear(0x00, bits);
> +}
> +
>  /*
>   * EP93xx Physical Memory Map:
>   *

I would prefer these functions to be after all the #define's.  But, your call...

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

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

* [PATCH 08/11] ep93xx: Move EP93XX_WATCHDOG_BASE define to driver
  2012-01-11  3:14 ` [PATCH 08/11] ep93xx: Move EP93XX_WATCHDOG_BASE define to driver Ryan Mallon
@ 2012-01-13 17:45   ` H Hartley Sweeten
  2012-01-13 21:46     ` Ryan Mallon
  0 siblings, 1 reply; 41+ messages in thread
From: H Hartley Sweeten @ 2012-01-13 17:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday, January 10, 2012 8:15 PM, Ryan Mallon wrote:
>
> The EP93xx watchdog driver is the only user of this define, move it there.
> 
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Mika Westerberg <mika.westerberg@iki.fi>
> Cc: Wim Van Sebroeck <wim@iguana.be>
> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
> ---
>  arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |    2 --
>  drivers/watchdog/ep93xx_wdt.c                   |    1 +
>  2 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
> index 387f745..225790d 100644
> --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
> +++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
> @@ -127,7 +127,5 @@
>  #define EP93XX_SYSCON_SYSCFG_LCSN1	(1<<0)
>  #define EP93XX_SYSCON_SWLOCK		EP93XX_SYSCON_REG(0xc0)
>  
> -#define EP93XX_WATCHDOG_BASE		EP93XX_APB_IOMEM(0x00140000)
> -
>  
>  #endif
> diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c index 726b7df..82f648a 100644
> --- a/drivers/watchdog/ep93xx_wdt.c
> +++ b/drivers/watchdog/ep93xx_wdt.c
> @@ -49,6 +49,7 @@ static unsigned long boot_status;
>  #define WDT_IN_USE		0
>  #define WDT_OK_TO_CLOSE		1
>  
> +#define EP93XX_WATCHDOG_BASE	EP93XX_APB_IOMEM(0x00140000)
>  #define EP93XX_WDT_REG(x)	(EP93XX_WATCHDOG_BASE + (x))
>  #define EP93XX_WDT_WATCHDOG	EP93XX_WDT_REG(0x00)
>  #define EP93XX_WDT_WDSTATUS	EP93XX_WDT_REG(0x04)

Ryan,

I have a patch to convert the watchdog driver to a platform device and
use the WatchDog Timer Driver Core.  This patch will end up moving the
base define to soc.h instead. But, for now, this looks good.

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

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

* [PATCH 09/11] ep93xx: Move crunch code to mach-ep93xx directory
  2012-01-11  3:14 ` [PATCH 09/11] ep93xx: Move crunch code to mach-ep93xx directory Ryan Mallon
@ 2012-01-13 17:51   ` H Hartley Sweeten
  2012-01-13 21:16     ` Ryan Mallon
  0 siblings, 1 reply; 41+ messages in thread
From: H Hartley Sweeten @ 2012-01-13 17:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday, January 10, 2012 8:15 PM, Ryan Mallon wrote:
>
> The crunch code in arch/arm/kernel is specific to the EP93xx. Move
> it to the mach-ep93xx directory. This removes the need for the
> EP93XX_SYSCON defines to be exported to arch/arm/kernel.
> 
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Mika Westerberg <mika.westerberg@iki.fi>
> Cc: Russell King <linux@arm.linux.org.uk>
> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
> ---
>  arch/arm/kernel/Makefile                       |    3 ---
>  arch/arm/mach-ep93xx/Makefile                  |    3 +++
>  arch/arm/{kernel => mach-ep93xx}/crunch-bits.S |    0
>  arch/arm/{kernel => mach-ep93xx}/crunch.c      |    2 ++
>  4 files changed, 5 insertions(+), 3 deletions(-)  rename arch/arm/{kernel => mach-ep93xx}/crunch-bits.S (100%)  rename arch/arm/{kernel => mach-ep93xx}/crunch.c (99%)
>
> diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 16eed6a..57aa6c9 100644
> --- a/arch/arm/kernel/Makefile
> +++ b/arch/arm/kernel/Makefile
> @@ -62,9 +62,6 @@ obj-$(CONFIG_SWP_EMULATE)	+= swp_emulate.o
>  CFLAGS_swp_emulate.o		:= -Wa,-march=armv7-a
>  obj-$(CONFIG_HAVE_HW_BREAKPOINT)	+= hw_breakpoint.o
>  
> -obj-$(CONFIG_CRUNCH)		+= crunch.o crunch-bits.o
> -AFLAGS_crunch-bits.o		:= -Wa,-mcpu=ep9312
> -
>  obj-$(CONFIG_CPU_XSCALE)	+= xscale-cp0.o
>  obj-$(CONFIG_CPU_XSC3)		+= xscale-cp0.o
>  obj-$(CONFIG_CPU_MOHAWK)	+= xscale-cp0.o
> diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile index 574209d..0dc51f9 100644
> --- a/arch/arm/mach-ep93xx/Makefile
> +++ b/arch/arm/mach-ep93xx/Makefile
> @@ -8,6 +8,9 @@ obj-			:=
>  
>  obj-$(CONFIG_EP93XX_DMA)	+= dma.o
>  
> +obj-$(CONFIG_CRUNCH)		+= crunch.o crunch-bits.o
> +AFLAGS_crunch-bits.o		:= -Wa,-mcpu=ep9312
> +

Nitpick... Care to align the core stuff above this while you are touching this file?

Also, does the compile order matter here? Should the crunch stuff come before
the dma driver?

>  obj-$(CONFIG_MACH_ADSSPHERE)	+= adssphere.o
>  obj-$(CONFIG_MACH_EDB93XX)	+= edb93xx.o
>  obj-$(CONFIG_MACH_GESBC9312)	+= gesbc9312.o
> diff --git a/arch/arm/kernel/crunch-bits.S b/arch/arm/mach-ep93xx/crunch-bits.S
> similarity index 100%
> rename from arch/arm/kernel/crunch-bits.S rename to arch/arm/mach-ep93xx/crunch-bits.S
> diff --git a/arch/arm/kernel/crunch.c b/arch/arm/mach-ep93xx/crunch.c similarity index 99% rename from arch/arm/kernel/crunch.c rename to arch/arm/mach-ep93xx/crunch.c index > 25ef223..d05ed0b 100644
> --- a/arch/arm/kernel/crunch.c
> +++ b/arch/arm/mach-ep93xx/crunch.c
> @@ -19,6 +19,8 @@
>  #include <mach/ep93xx-regs.h>
>  #include <asm/thread_notify.h>
>  
> +#include "soc.h"
> +
>  struct crunch_state *crunch_owner;
>  
>  void crunch_task_release(struct thread_info *thread)

While you are moving this, is there anything you can do about the sparse
warning regarding the crunch_owner variable?

Regardless, looks good.

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

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

* [PATCH 10/11] ep93xx: Move EP93XX_SYSCON defines to SoC private header
  2012-01-11  3:14 ` [PATCH 10/11] ep93xx: Move EP93XX_SYSCON defines to SoC private header Ryan Mallon
@ 2012-01-13 17:52   ` H Hartley Sweeten
  0 siblings, 0 replies; 41+ messages in thread
From: H Hartley Sweeten @ 2012-01-13 17:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday, January 10, 2012 8:15 PM, Ryan Mallon wrote:
>
> The EP93XX_SYSCON defines are now no longer needed outside of
> the EP93xx SoC core code, so they can be moved to a private header.
> 
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Mika Westerberg <mika.westerberg@iki.fi>
> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
> ---
>  arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |   90 -----------------------
>  arch/arm/mach-ep93xx/soc.h                      |   90 +++++++++++++++++++++++
>  2 files changed, 90 insertions(+), 90 deletions(-)

Looks good.

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

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

* [PATCH 11/11] ep93xx: Remove unnecessary includes of ep93xx-regs.h
  2012-01-11  3:14 ` [PATCH 11/11] ep93xx: Remove unnecessary includes of ep93xx-regs.h Ryan Mallon
@ 2012-01-13 17:54   ` H Hartley Sweeten
  0 siblings, 0 replies; 41+ messages in thread
From: H Hartley Sweeten @ 2012-01-13 17:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday, January 10, 2012 8:15 PM, Ryan Mallon wrote:
> 
> Remove the include of ep93xx-regs.h from files which no longer need
> it, notably include/mach/hardware.h. An explict include of ep93xx-regs.h
>  is needed in the EP93xx watchdog driver for the EP93XX_APB_IOMEM macro.
>
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Mika Westerberg <mika.westerberg@iki.fi>
> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
> ---
>  arch/arm/mach-ep93xx/crunch.c                |    2 +-
>  arch/arm/mach-ep93xx/include/mach/hardware.h |    1 -
>  arch/arm/mach-ep93xx/soc.h                   |    2 ++
>  drivers/watchdog/ep93xx_wdt.c                |    1 +
>  4 files changed, 4 insertions(+), 2 deletions(-)

My patch to convert the watchdog driver to a platform device using the
WatchDog Timer Core will also remove the need to include ep93xx-regs.h.

But for now this looks good.

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

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

* [PATCH 00/11] ep93xx: Move SoC private bits to core
  2012-01-11  3:14 [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
                   ` (11 preceding siblings ...)
  2012-01-12  0:17 ` [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
@ 2012-01-13 17:56 ` H Hartley Sweeten
  2012-01-14 19:07 ` Mika Westerberg
  13 siblings, 0 replies; 41+ messages in thread
From: H Hartley Sweeten @ 2012-01-13 17:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday, January 10, 2012 8:14 PM, Ryan Mallon wrote:
>
> This patch series is an effort to move the ep93xx SoC specific code
> out of drivers and include/mach into arch/arm/mach-ep93xx. This
> work involves the following changes:

<snip>

Ryan,

I have reviewed all you patches and replied. They all look good except
for a couple nitpicks that I pointed out.

Thanks for doing this.

Regards,
Hartley

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

* [PATCH 04/11] ep93xx: Configure GPIO ports in core code
  2012-01-13  7:00     ` Ryan Mallon
  2012-01-13  8:12       ` Mika Westerberg
@ 2012-01-13 18:05       ` H Hartley Sweeten
  1 sibling, 0 replies; 41+ messages in thread
From: H Hartley Sweeten @ 2012-01-13 18:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday, January 13, 2012 12:01 AM, Ryan Mallon wrote:
> On 13/01/12 17:27, Mika Westerberg wrote:
>> On Wed, Jan 11, 2012 at 02:14:29PM +1100, Ryan Mallon wrote:
>>> Move the pinmux setting of the EP93xx GPIOs to the core code. This 
>>> removes the need for the GPIO driver to have access to the system 
>>> controller registers.
>>>
>>> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
>>> Cc: Mika Westerberg <mika.westerberg@iki.fi>
>>> Cc: Grant Likely <grant.likely@secretlab.ca>
>>> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
>>> ---
>>>  arch/arm/mach-ep93xx/core.c |    7 +++++++
>>>  drivers/gpio/gpio-ep93xx.c  |    7 -------
>>>  2 files changed, 7 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-ep93xx/core.c 
>>> b/arch/arm/mach-ep93xx/core.c index dcb10c2..978c5a6 100644
>>> --- a/arch/arm/mach-ep93xx/core.c
>>> +++ b/arch/arm/mach-ep93xx/core.c
>>> @@ -896,6 +896,13 @@ void __init ep93xx_init_devices(void)
>>>  	/* Disallow access to MaverickCrunch initially */
>>>  	ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA);
>>>  
>>> +	/* Default all ports to GPIO */
>>> +	ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_KEYS |
>>> +			       EP93XX_SYSCON_DEVCFG_GONK |
>>> +			       EP93XX_SYSCON_DEVCFG_EONIDE |
>>> +			       EP93XX_SYSCON_DEVCFG_GONIDE |
>>> +			       EP93XX_SYSCON_DEVCFG_HONIDE);
>>> +
>> Doesn't this now change the behaviour? Now you unconditionally mux the 
>> pins whereas before they were only muxed if we had GPIO driver enabled.
>
> True, but I think the previous behaviour was broken anyway. If the gpio driver
> was installed after any driver which has muxed gpio pins for other purposes
> then it will override those settings. All of the ep93xx drivers will mux the pins
> they need at probe time. IIRC, before the gpio driver was moved out of
> arch/arm/mach-ep93xx we muxed all the pins unconditionally anyway.
>
> I can update the changelog to reflect the changed behaviour, but I don't think
> it will cause problems for anyone. Will see if Hartley has any comments.

Actually, there shouldn't be any change in behavior.

The gpio-ep93xx driver is always enabled in drivers/gpio/Kconfig when ARCH_EP93XX
Is enabled:

config GPIO_EP93XX
	def_bool y
	depends on ARCH_EP93XX
	select GPIO_GENERIC

Because it's a hidden Kconfig option it cannot be disabled.

Since the gpio-ep93xx driver is the first driver registered it also ends up being the
first one probed. So the gpiomux ends up getting set before any other driver is
loaded anyway.

The other drivers then setup the gpiomux as required as they load.

Regards,
Hartley

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

* [PATCH 09/11] ep93xx: Move crunch code to mach-ep93xx directory
  2012-01-13 17:51   ` H Hartley Sweeten
@ 2012-01-13 21:16     ` Ryan Mallon
  2012-01-13 21:52       ` Russell King - ARM Linux
  0 siblings, 1 reply; 41+ messages in thread
From: Ryan Mallon @ 2012-01-13 21:16 UTC (permalink / raw)
  To: linux-arm-kernel

On 14/01/12 04:51, H Hartley Sweeten wrote:
> On Tuesday, January 10, 2012 8:15 PM, Ryan Mallon wrote:
>> The crunch code in arch/arm/kernel is specific to the EP93xx. Move
>> it to the mach-ep93xx directory. This removes the need for the
>> EP93XX_SYSCON defines to be exported to arch/arm/kernel.
>>
>> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
>> Cc: Mika Westerberg <mika.westerberg@iki.fi>
>> Cc: Russell King <linux@arm.linux.org.uk>
>> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
>> ---
>>  arch/arm/kernel/Makefile                       |    3 ---
>>  arch/arm/mach-ep93xx/Makefile                  |    3 +++
>>  arch/arm/{kernel => mach-ep93xx}/crunch-bits.S |    0
>>  arch/arm/{kernel => mach-ep93xx}/crunch.c      |    2 ++
>>  4 files changed, 5 insertions(+), 3 deletions(-)  rename arch/arm/{kernel => mach-ep93xx}/crunch-bits.S (100%)  rename arch/arm/{kernel => mach-ep93xx}/crunch.c (99%)
>>
>> diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 16eed6a..57aa6c9 100644
>> --- a/arch/arm/kernel/Makefile
>> +++ b/arch/arm/kernel/Makefile
>> @@ -62,9 +62,6 @@ obj-$(CONFIG_SWP_EMULATE)	+= swp_emulate.o
>>  CFLAGS_swp_emulate.o		:= -Wa,-march=armv7-a
>>  obj-$(CONFIG_HAVE_HW_BREAKPOINT)	+= hw_breakpoint.o
>>  
>> -obj-$(CONFIG_CRUNCH)		+= crunch.o crunch-bits.o
>> -AFLAGS_crunch-bits.o		:= -Wa,-mcpu=ep9312
>> -
>>  obj-$(CONFIG_CPU_XSCALE)	+= xscale-cp0.o
>>  obj-$(CONFIG_CPU_XSC3)		+= xscale-cp0.o
>>  obj-$(CONFIG_CPU_MOHAWK)	+= xscale-cp0.o
>> diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile index 574209d..0dc51f9 100644
>> --- a/arch/arm/mach-ep93xx/Makefile
>> +++ b/arch/arm/mach-ep93xx/Makefile
>> @@ -8,6 +8,9 @@ obj-			:=
>>  
>>  obj-$(CONFIG_EP93XX_DMA)	+= dma.o
>>  
>> +obj-$(CONFIG_CRUNCH)		+= crunch.o crunch-bits.o
>> +AFLAGS_crunch-bits.o		:= -Wa,-mcpu=ep9312
>> +
> Nitpick... Care to align the core stuff above this while you are touching this file?
>
> Also, does the compile order matter here? Should the crunch stuff come before
> the dma driver?

I was hoping that Russell would make some comment here about whether
moving this file out of arch/arm/kernel is okay to do. I assume it had
some reason to be there in the first place. I have only done build
testing so far since I don't have any ep93xx hardware to test on, and
have never actually used crunch anyway.

I don't want to make unnecessary changes in this patch. I think the
include of "soc.h" should actually get moved to the next patch also, so
that this patch becomes a straight out move.

>>  obj-$(CONFIG_MACH_ADSSPHERE)	+= adssphere.o
>>  obj-$(CONFIG_MACH_EDB93XX)	+= edb93xx.o
>>  obj-$(CONFIG_MACH_GESBC9312)	+= gesbc9312.o
>> diff --git a/arch/arm/kernel/crunch-bits.S b/arch/arm/mach-ep93xx/crunch-bits.S
>> similarity index 100%
>> rename from arch/arm/kernel/crunch-bits.S rename to arch/arm/mach-ep93xx/crunch-bits.S
>> diff --git a/arch/arm/kernel/crunch.c b/arch/arm/mach-ep93xx/crunch.c similarity index 99% rename from arch/arm/kernel/crunch.c rename to arch/arm/mach-ep93xx/crunch.c index > 25ef223..d05ed0b 100644
>> --- a/arch/arm/kernel/crunch.c
>> +++ b/arch/arm/mach-ep93xx/crunch.c
>> @@ -19,6 +19,8 @@
>>  #include <mach/ep93xx-regs.h>
>>  #include <asm/thread_notify.h>
>>  
>> +#include "soc.h"
>> +
>>  struct crunch_state *crunch_owner;
>>  
>>  void crunch_task_release(struct thread_info *thread)
> While you are moving this, is there anything you can do about the sparse
> warning regarding the crunch_owner variable?
>

What is the warning?

> Regardless, looks good.
>
> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
>
Thanks,
~Ryan

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

* [PATCH 01/11] ep93xx: Move PHYS_BASE defines to local SoC header file
  2012-01-13 17:18   ` H Hartley Sweeten
@ 2012-01-13 21:35     ` Ryan Mallon
  0 siblings, 0 replies; 41+ messages in thread
From: Ryan Mallon @ 2012-01-13 21:35 UTC (permalink / raw)
  To: linux-arm-kernel

On 14/01/12 04:18, H Hartley Sweeten wrote:
> On Tuesday, January 10, 2012 8:14 PM, Ryan Mallon wrote:
>> The PHYS_BASE defines in arch/arm/mach-ep93xx/include/mach-ep93xx-regs.h
>> are only used in the SoC code. Move the defines to a local header file.
>>
>> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
>> Cc: Mika Westerberg <mika.westerberg@iki.fi>
>> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
>> ---
>>  arch/arm/mach-ep93xx/adssphere.c                |    1 +
>>  arch/arm/mach-ep93xx/edb93xx.c                  |    2 +
>>  arch/arm/mach-ep93xx/gesbc9312.c                |    1 +
>>  arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |   34 ---------------
>>  arch/arm/mach-ep93xx/micro9.c                   |    1 +
>>  arch/arm/mach-ep93xx/simone.c                   |    2 +
>>  arch/arm/mach-ep93xx/snappercl15.c              |    2 +
>>  arch/arm/mach-ep93xx/soc.h                      |   50 +++++++++++++++++++++++
>>  arch/arm/mach-ep93xx/ts72xx.c                   |    2 +
>>  arch/arm/mach-ep93xx/vision_ep9307.c            |    2 +
>>  10 files changed, 63 insertions(+), 34 deletions(-)  create mode 100644 arch/arm/mach-ep93xx/soc.h
> <snip>
>
>> diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index 70ef8c5..24df3ff 100644
>> --- a/arch/arm/mach-ep93xx/edb93xx.c
>> +++ b/arch/arm/mach-ep93xx/edb93xx.c
>> @@ -42,6 +42,8 @@
>>  #include <asm/mach-types.h>
>>  #include <asm/mach/arch.h>
>>  
>> +#include "soc.h"
>> +
>  
> Nitpick... Unnecessary whitespace...
>
> <snip>
>
>> diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index 8b2f143..f5965db 100644
>> --- a/arch/arm/mach-ep93xx/ts72xx.c
>> +++ b/arch/arm/mach-ep93xx/ts72xx.c
>> @@ -27,6 +27,8 @@
>>  #include <asm/mach/map.h>
>>  #include <asm/mach/arch.h>
>>  
>> +#include "soc.h"
>> +
> Nitpick... Unnecessary whitespace...

Oops, will fix.

>  
> Other than that... Looks ok.
>
> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
>
Thanks,
~Ryan

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

* [PATCH 06/11] ep93xx: Don't use system controller defines in audio drivers
  2012-01-13 17:35   ` H Hartley Sweeten
@ 2012-01-13 21:41     ` Ryan Mallon
  2012-01-13 22:13       ` Mark Brown
  0 siblings, 1 reply; 41+ messages in thread
From: Ryan Mallon @ 2012-01-13 21:41 UTC (permalink / raw)
  To: linux-arm-kernel

On 14/01/12 04:35, H Hartley Sweeten wrote:
> On Tuesday, January 10, 2012 8:15 PM, Ryan Mallon wrote:
>> Both the Snapper CL15 and EDB93xx audio drivers set the same
>> audio configuration in ep93xx_i2s_acquire. Remove the arguments
>>  to ep93xx_i2s_acquire so that the audio drivers no longer need
>> the EP93XX_SYSCON defines exported.
>>
>> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
>> Cc: Mika Westerberg <mika.westerberg@iki.fi>
>> Cc: Liam Girdwood <lrg@ti.com>
>> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
>> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
>> ---
>>  arch/arm/mach-ep93xx/core.c                  |   19 ++++---------------
>>  arch/arm/mach-ep93xx/include/mach/platform.h |    2 +-
>>  sound/soc/ep93xx/edb93xx.c                   |    4 +---
>>  sound/soc/ep93xx/snappercl15.c               |    4 +---
>>  4 files changed, 7 insertions(+), 22 deletions(-)
>>
>> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index bd59696..0726b7b 100644
>> --- a/arch/arm/mach-ep93xx/core.c
>> +++ b/arch/arm/mach-ep93xx/core.c
>> @@ -836,23 +836,12 @@ void __init ep93xx_register_i2s(void)
>>  #define EP93XX_I2SCLKDIV_MASK		(EP93XX_SYSCON_I2SCLKDIV_ORIDE | \
>>  					 EP93XX_SYSCON_I2SCLKDIV_SPOL)
>>  
>> -int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config)
>> +int ep93xx_i2s_acquire(void)
>>  {
>>  	unsigned val;
>>  
>> -	/* Sanity check */
>> -	if (i2s_pins & ~EP93XX_SYSCON_DEVCFG_I2S_MASK)
>> -		return -EINVAL;
>> -	if (i2s_config & ~EP93XX_I2SCLKDIV_MASK)
>> -		return -EINVAL;
>> -
>> -	/* Must have only one of I2SONSSP/I2SONAC97 set */
>> -	if ((i2s_pins & EP93XX_SYSCON_DEVCFG_I2SONSSP) ==
>> -	    (i2s_pins & EP93XX_SYSCON_DEVCFG_I2SONAC97))
>> -		return -EINVAL;
>> -
>> -	ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_I2S_MASK);
>> -	ep93xx_devcfg_set_bits(i2s_pins);
>> +	ep93xx_devcfg_set_clear(EP93XX_SYSCON_DEVCFG_I2SONAC97,
>> +			EP93XX_SYSCON_DEVCFG_I2S_MASK);
>>  
>>  	/*
>>  	 * This is potentially racy with the clock api for i2s_mclk, sclk and @@ -862,7 +851,7 @@ int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config)
>>  	 */
>>  	val = __raw_readl(EP93XX_SYSCON_I2SCLKDIV);
>>  	val &= ~EP93XX_I2SCLKDIV_MASK;
>> -	val |= i2s_config;
>> +	val |= EP93XX_SYSCON_I2SCLKDIV_ORIDE | EP93XX_SYSCON_I2SCLKDIV_SPOL;
>> 	ep93xx_syscon_swlocked_write(val, EP93XX_SYSCON_I2SCLKDIV);
> Nitpick... You clear then set the same bits here.

I think that is probably a good idea anyway, since if someone copy and
pastes this function to make one for other types of audio devices then
they are more likely to get it right :-).

>> diff --git a/sound/soc/ep93xx/edb93xx.c b/sound/soc/ep93xx/edb93xx.c index 51930b6..3a6ab05 100644
>> --- a/sound/soc/ep93xx/edb93xx.c
>> +++ b/sound/soc/ep93xx/edb93xx.c
>> @@ -94,9 +94,7 @@ static int __devinit edb93xx_probe(struct platform_device *pdev)
>>  	struct snd_soc_card *card = &snd_soc_edb93xx;
>>  	int ret;
>>  
>> -	ret = ep93xx_i2s_acquire(EP93XX_SYSCON_DEVCFG_I2SONAC97,
>> -				 EP93XX_SYSCON_I2SCLKDIV_ORIDE |
>> -				 EP93XX_SYSCON_I2SCLKDIV_SPOL);
>> +	ret = ep93xx_i2s_acquire();
>>  	if (ret)
>>  		return ret;
>>  
>> diff --git a/sound/soc/ep93xx/snappercl15.c b/sound/soc/ep93xx/snappercl15.c index 2cde433..6ccac5a 100644
>> --- a/sound/soc/ep93xx/snappercl15.c
>> +++ b/sound/soc/ep93xx/snappercl15.c
>> @@ -110,9 +110,7 @@ static int __devinit snappercl15_probe(struct platform_device *pdev)
>>  	struct snd_soc_card *card = &snd_soc_snappercl15;
>>  	int ret;
>>  
>> -	ret = ep93xx_i2s_acquire(EP93XX_SYSCON_DEVCFG_I2SONAC97,
>> -				 EP93XX_SYSCON_I2SCLKDIV_ORIDE |
>> -				 EP93XX_SYSCON_I2SCLKDIV_SPOL);
>> +	ret = ep93xx_i2s_acquire();
>>  	if (ret)
>>  		return ret;
>>
> Maybe the ep93xx_i2s_acquire() function should be renamed to something
> like ep93xx_i2s_ac97_acquire() so that the i2s configuration is understood.
> This should address Mark Brown's issue.

Mark has already picked this patch up. I can probably modify it and get
him to grab the new one, but the reason I didn't change the name is
because there have been only two users of this function for a couple of
years now, and the ep93xx is obsolete, so its unlikely that we are going
to need a new function anyway.

> Regardless, looks good.
>
> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
>
Thanks,
~Ryan

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

* [PATCH 07/11] ep93xx: Make syscon access functions private to SoC
  2012-01-13 17:38   ` H Hartley Sweeten
@ 2012-01-13 21:43     ` Ryan Mallon
  0 siblings, 0 replies; 41+ messages in thread
From: Ryan Mallon @ 2012-01-13 21:43 UTC (permalink / raw)
  To: linux-arm-kernel

On 14/01/12 04:38, H Hartley Sweeten wrote:
> On Tuesday, January 10, 2012 8:15 PM, Ryan Mallon wrote:
>> The syscon access functions are no longer used outside of the
>> core EP93xx code. Move their definitions into the SoC code.
>>
>> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
>> Cc: Mika Westerberg <mika.westerberg@iki.fi>
>> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
>> ---
>>  arch/arm/mach-ep93xx/clock.c                 |    1 +
>>  arch/arm/mach-ep93xx/core.c                  |    2 --
>>  arch/arm/mach-ep93xx/include/mach/platform.h |   14 --------------
>>  arch/arm/mach-ep93xx/soc.h                   |   14 ++++++++++++++
>>  4 files changed, 15 insertions(+), 16 deletions(-)
> It looks like part of this patch is word wrapped, or it could just be me...

Odd, not sure what happened there. The code I have looks correct, and it
was sent using git format-patch/send-email.

> <snip>
>
>> diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h index b0ef89b..958282a 100644
>> --- a/arch/arm/mach-ep93xx/soc.h
>> +++ b/arch/arm/mach-ep93xx/soc.h
>> @@ -13,6 +13,20 @@
>>  #ifndef _EP93XX_SOC_H
>>  #define _EP93XX_SOC_H
>>  
>> +/* EP93xx System Controller software locked register write */ void 
>> +ep93xx_syscon_swlocked_write(unsigned int val, void __iomem *reg); void 
>> +ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int 
>> +clear_bits);
>> +
>> +static inline void ep93xx_devcfg_set_bits(unsigned int bits) {
>> +	ep93xx_devcfg_set_clear(bits, 0x00);
>> +}
>> +
>> +static inline void ep93xx_devcfg_clear_bits(unsigned int bits) {
>> +	ep93xx_devcfg_set_clear(0x00, bits);
>> +}
>> +
>>  /*
>>   * EP93xx Physical Memory Map:
>>   *
> I would prefer these functions to be after all the #define's.  But, your call...
>
> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
>
I'll move them.

Thanks,
~Ryan

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

* [PATCH 08/11] ep93xx: Move EP93XX_WATCHDOG_BASE define to driver
  2012-01-13 17:45   ` H Hartley Sweeten
@ 2012-01-13 21:46     ` Ryan Mallon
  2012-01-13 22:48       ` H Hartley Sweeten
  0 siblings, 1 reply; 41+ messages in thread
From: Ryan Mallon @ 2012-01-13 21:46 UTC (permalink / raw)
  To: linux-arm-kernel

On 14/01/12 04:45, H Hartley Sweeten wrote:
> On Tuesday, January 10, 2012 8:15 PM, Ryan Mallon wrote:
>> The EP93xx watchdog driver is the only user of this define, move it there.
>>
>> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
>> Cc: Mika Westerberg <mika.westerberg@iki.fi>
>> Cc: Wim Van Sebroeck <wim@iguana.be>
>> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
>> ---
>>  arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |    2 --
>>  drivers/watchdog/ep93xx_wdt.c                   |    1 +
>>  2 files changed, 1 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
>> index 387f745..225790d 100644
>> --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
>> +++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
>> @@ -127,7 +127,5 @@
>>  #define EP93XX_SYSCON_SYSCFG_LCSN1	(1<<0)
>>  #define EP93XX_SYSCON_SWLOCK		EP93XX_SYSCON_REG(0xc0)
>>  
>> -#define EP93XX_WATCHDOG_BASE		EP93XX_APB_IOMEM(0x00140000)
>> -
>>  
>>  #endif
>> diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c index 726b7df..82f648a 100644
>> --- a/drivers/watchdog/ep93xx_wdt.c
>> +++ b/drivers/watchdog/ep93xx_wdt.c
>> @@ -49,6 +49,7 @@ static unsigned long boot_status;
>>  #define WDT_IN_USE		0
>>  #define WDT_OK_TO_CLOSE		1
>>  
>> +#define EP93XX_WATCHDOG_BASE	EP93XX_APB_IOMEM(0x00140000)
>>  #define EP93XX_WDT_REG(x)	(EP93XX_WATCHDOG_BASE + (x))
>>  #define EP93XX_WDT_WATCHDOG	EP93XX_WDT_REG(0x00)
>>  #define EP93XX_WDT_WDSTATUS	EP93XX_WDT_REG(0x04)
> Ryan,
>
> I have a patch to convert the watchdog driver to a platform device and
> use the WatchDog Timer Driver Core.  This patch will end up moving the
> base define to soc.h instead. But, for now, this looks good.

Is your patch ready to go? I'm in no rush to get these patches in, and I
can add it to this series if you like, which would get rid of the need
for this patch and would also mean that we don't need the include of
<mach/ep93xx-regs.h> in the watchdog driver in the final patch.

Thanks,
~Ryan

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

* [PATCH 09/11] ep93xx: Move crunch code to mach-ep93xx directory
  2012-01-13 21:16     ` Ryan Mallon
@ 2012-01-13 21:52       ` Russell King - ARM Linux
  0 siblings, 0 replies; 41+ messages in thread
From: Russell King - ARM Linux @ 2012-01-13 21:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jan 14, 2012 at 08:16:53AM +1100, Ryan Mallon wrote:
> I was hoping that Russell would make some comment here about whether
> moving this file out of arch/arm/kernel is okay to do.

I have no objection to SoC specific code moving out of arch-generic areas
into SoC specific areas - provided it doesn't cause any abonimations!

> I assume it had
> some reason to be there in the first place. I have only done build
> testing so far since I don't have any ep93xx hardware to test on, and
> have never actually used crunch anyway.

I suspect it was there because the iwmmxt stuff was also in that directory,
and at the time we didn't have the notifier in place to be able to properly
broadcast events that ISA extensions needed to react to context switching
etc.

Now that we do have all that in place, I don't think there's much reason
it lives in arch/arm/kernel.

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

* [PATCH 06/11] ep93xx: Don't use system controller defines in audio drivers
  2012-01-13 21:41     ` Ryan Mallon
@ 2012-01-13 22:13       ` Mark Brown
  0 siblings, 0 replies; 41+ messages in thread
From: Mark Brown @ 2012-01-13 22:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jan 14, 2012 at 08:41:11AM +1100, Ryan Mallon wrote:
> On 14/01/12 04:35, H Hartley Sweeten wrote:

> > Maybe the ep93xx_i2s_acquire() function should be renamed to something
> > like ep93xx_i2s_ac97_acquire() so that the i2s configuration is understood.
> > This should address Mark Brown's issue.

> Mark has already picked this patch up. I can probably modify it and get
> him to grab the new one, but the reason I didn't change the name is
> because there have been only two users of this function for a couple of
> years now, and the ep93xx is obsolete, so its unlikely that we are going
> to need a new function anyway.

If you do change it then please send an incremental patch rather than a
new version.  I'm OK whatever you guys decide here.

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

* [PATCH 08/11] ep93xx: Move EP93XX_WATCHDOG_BASE define to driver
  2012-01-13 21:46     ` Ryan Mallon
@ 2012-01-13 22:48       ` H Hartley Sweeten
  0 siblings, 0 replies; 41+ messages in thread
From: H Hartley Sweeten @ 2012-01-13 22:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday, January 13, 2012 2:47 PM, Ryan Mallon wrote:
> On 14/01/12 04:45, H Hartley Sweeten wrote:
>> I have a patch to convert the watchdog driver to a platform device and 
>> use the WatchDog Timer Driver Core.  This patch will end up moving the 
>> base define to soc.h instead. But, for now, this looks good.
>
> Is your patch ready to go? I'm in no rush to get these patches in, and I
> can add it to this series if you like, which would get rid of the need for
> this patch and would also mean that we don't need the include of
> <mach/ep93xx-regs.h> in the watchdog driver in the final patch.

Right now I just have the WatchDog Timer Driver Core conversion done.
But, it needs to be retested against the current mainline.

Converting the driver into a platform device is trivial after that.

Let's go with what you have for right now. If/when It hits linux-next I'll
rebase my patch against that.

Regards,
Hartley

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

* [PATCH 00/11] ep93xx: Move SoC private bits to core
  2012-01-11  3:14 [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
                   ` (12 preceding siblings ...)
  2012-01-13 17:56 ` H Hartley Sweeten
@ 2012-01-14 19:07 ` Mika Westerberg
  2012-01-16  4:51   ` Ryan Mallon
  13 siblings, 1 reply; 41+ messages in thread
From: Mika Westerberg @ 2012-01-14 19:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 11, 2012 at 02:14:25PM +1100, Ryan Mallon wrote:
> This patch series is an effort to move the ep93xx SoC specific code out
> of drivers and include/mach into arch/arm/mach-ep93xx. This work
> involves the following changes:
> 
>  - Create a new private header called soc.h to replace most of 
>    mach/include/ep93xx-regs.h
>  - Move the Maverick crunch code from arch/arm/kernel to mach-ep93xx
>  - Move all system controller access to the ep93xx core code
> 
> There are a small handful of defines left in ep93xx-regs.h which are
> used by both the ep93xx core and include/mach files (uncompress.h,
> debug-macro.S, etc).

Sorry for the delay. I went through the series and it looks good to me. You
can add

Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>

for all the patches, if you like.

Thanks!

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

* [PATCH 00/11] ep93xx: Move SoC private bits to core
  2012-01-14 19:07 ` Mika Westerberg
@ 2012-01-16  4:51   ` Ryan Mallon
  0 siblings, 0 replies; 41+ messages in thread
From: Ryan Mallon @ 2012-01-16  4:51 UTC (permalink / raw)
  To: linux-arm-kernel

On 15/01/12 06:07, Mika Westerberg wrote:

> On Wed, Jan 11, 2012 at 02:14:25PM +1100, Ryan Mallon wrote:
>> This patch series is an effort to move the ep93xx SoC specific code out
>> of drivers and include/mach into arch/arm/mach-ep93xx. This work
>> involves the following changes:
>>
>>  - Create a new private header called soc.h to replace most of 
>>    mach/include/ep93xx-regs.h
>>  - Move the Maverick crunch code from arch/arm/kernel to mach-ep93xx
>>  - Move all system controller access to the ep93xx core code
>>
>> There are a small handful of defines left in ep93xx-regs.h which are
>> used by both the ep93xx core and include/mach files (uncompress.h,
>> debug-macro.S, etc).
> 
> Sorry for the delay. I went through the series and it looks good to me. You
> can add
> 
> Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
> 
> for all the patches, if you like.


Thanks Mika. I'm going to do a repost later this week after address
Hartley's review comments.

Thanks,
~Ryan

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

end of thread, other threads:[~2012-01-16  4:51 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-11  3:14 [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
2012-01-11  3:14 ` [PATCH 01/11] ep93xx: Move PHYS_BASE defines to local SoC header file Ryan Mallon
2012-01-13 17:18   ` H Hartley Sweeten
2012-01-13 21:35     ` Ryan Mallon
2012-01-11  3:14 ` [PATCH 02/11] ep93xx: Move GPIO defines to gpio-ep93xx.h Ryan Mallon
2012-01-13 17:22   ` H Hartley Sweeten
2012-01-11  3:14 ` [PATCH 03/11] ep93xx: Move peripheral defines to local SoC header Ryan Mallon
2012-01-13 17:25   ` H Hartley Sweeten
2012-01-11  3:14 ` [PATCH 04/11] ep93xx: Configure GPIO ports in core code Ryan Mallon
2012-01-13  6:27   ` Mika Westerberg
2012-01-13  7:00     ` Ryan Mallon
2012-01-13  8:12       ` Mika Westerberg
2012-01-13 18:05       ` H Hartley Sweeten
2012-01-11  3:14 ` [PATCH 05/11] ep93xx: Move arch_reset to core.c Ryan Mallon
2012-01-13 17:28   ` H Hartley Sweeten
2012-01-11  3:14 ` [PATCH 06/11] ep93xx: Don't use system controller defines in audio drivers Ryan Mallon
2012-01-11 17:42   ` Mark Brown
2012-01-11 19:57     ` Ryan Mallon
2012-01-12  3:04       ` Mark Brown
2012-01-13 17:35   ` H Hartley Sweeten
2012-01-13 21:41     ` Ryan Mallon
2012-01-13 22:13       ` Mark Brown
2012-01-11  3:14 ` [PATCH 07/11] ep93xx: Make syscon access functions private to SoC Ryan Mallon
2012-01-13 17:38   ` H Hartley Sweeten
2012-01-13 21:43     ` Ryan Mallon
2012-01-11  3:14 ` [PATCH 08/11] ep93xx: Move EP93XX_WATCHDOG_BASE define to driver Ryan Mallon
2012-01-13 17:45   ` H Hartley Sweeten
2012-01-13 21:46     ` Ryan Mallon
2012-01-13 22:48       ` H Hartley Sweeten
2012-01-11  3:14 ` [PATCH 09/11] ep93xx: Move crunch code to mach-ep93xx directory Ryan Mallon
2012-01-13 17:51   ` H Hartley Sweeten
2012-01-13 21:16     ` Ryan Mallon
2012-01-13 21:52       ` Russell King - ARM Linux
2012-01-11  3:14 ` [PATCH 10/11] ep93xx: Move EP93XX_SYSCON defines to SoC private header Ryan Mallon
2012-01-13 17:52   ` H Hartley Sweeten
2012-01-11  3:14 ` [PATCH 11/11] ep93xx: Remove unnecessary includes of ep93xx-regs.h Ryan Mallon
2012-01-13 17:54   ` H Hartley Sweeten
2012-01-12  0:17 ` [PATCH 00/11] ep93xx: Move SoC private bits to core Ryan Mallon
2012-01-13 17:56 ` H Hartley Sweeten
2012-01-14 19:07 ` Mika Westerberg
2012-01-16  4:51   ` Ryan Mallon

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.