All of lore.kernel.org
 help / color / mirror / Atom feed
* clps711x patchset
@ 2012-04-21  9:11 ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel

Hello.
This is patchset contains some cleanups and tricks for CLPS711X ARM target.
Please review and apply it to kernel tree. Comments are welcome :)
Thanks!


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

* clps711x patchset
@ 2012-04-21  9:11 ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.
This is patchset contains some cleanups and tricks for CLPS711X ARM target.
Please review and apply it to kernel tree. Comments are welcome :)
Thanks!

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

* [PATCH 01/17] ARM clps711x: Cleanup: Rename ARCH_EP7211 and ARCH_EP7212 to SOC_xxx
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21  9:11   ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Alexander Shiyan

In fact, these definitions indicate the CPU variant, so it is logically
correct to change the name of the definitions.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/Kconfig                 |    8 ++++----
 arch/arm/mach-clps711x/include/mach/hardware.h |    4 ++--
 drivers/net/irda/Kconfig                       |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index eb34bd1..ec47ef4 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -47,24 +47,24 @@ config ARCH_FORTUNET
 
 # XXX Maybe these should indicate register compatibility
 # instead of being mutually exclusive.
-config ARCH_EP7211
+config SOC_EP7211
 	bool
 	depends on ARCH_EDB7211
 	default y
 
-config ARCH_EP7212
+config SOC_EP7212
 	bool
 	depends on ARCH_P720T || ARCH_CEIVA
 	default y
 
 config EP72XX_ROM_BOOT
 	bool "EP72xx ROM boot"
-	depends on ARCH_EP7211 || ARCH_EP7212
+	depends on SOC_EP7211 || SOC_EP7212
 	---help---
 	  If you say Y here, your CLPS711x-based kernel will use the bootstrap
 	  mode memory map instead of the normal memory map.
 
-	  Processors derived from the Cirrus CLPS-711X core support two boot
+	  Processors derived from the Cirrus CLPS711X core support two boot
 	  modes.  Normal mode boots from the external memory device at CS0.
 	  Bootstrap mode rearranges parts of the memory map, placing an
 	  internal 128 byte bootstrap ROM at CS0.  This option performs the
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index d0b7d87..99461f3 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -52,13 +52,13 @@
 #define CS7_PHYS_BASE		(0x00000000)
 #endif
 
-#if defined (CONFIG_ARCH_EP7211)
+#if defined (CONFIG_SOC_EP7211)
 
 #define EP7211_VIRT_BASE	CLPS7111_VIRT_BASE
 #define EP7211_BASE		CLPS7111_VIRT_BASE
 #include <asm/hardware/ep7211.h>
 
-#elif defined (CONFIG_ARCH_EP7212)
+#elif defined (CONFIG_SOC_EP7212)
 
 #define EP7212_VIRT_BASE	CLPS7111_VIRT_BASE
 #define EP7212_BASE		CLPS7111_VIRT_BASE
diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig
index 4680478..54d7723 100644
--- a/drivers/net/irda/Kconfig
+++ b/drivers/net/irda/Kconfig
@@ -212,7 +212,7 @@ config KINGSUN_DONGLE
 
 config EP7211_DONGLE
 	tristate "EP7211 I/R support"
-	depends on IRTTY_SIR && ARCH_EP7211 && IRDA && EXPERIMENTAL
+	depends on IRTTY_SIR && (SOC_EP7211 || SOC_EP7212) && IRDA && EXPERIMENTAL
 	help
 	  Say Y here if you want to build support for the Cirrus logic
 	  EP7211 chipset's infrared module.
-- 
1.7.3.4


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

* [PATCH 01/17] ARM clps711x: Cleanup: Rename ARCH_EP7211 and ARCH_EP7212 to SOC_xxx
@ 2012-04-21  9:11   ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel

In fact, these definitions indicate the CPU variant, so it is logically
correct to change the name of the definitions.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/Kconfig                 |    8 ++++----
 arch/arm/mach-clps711x/include/mach/hardware.h |    4 ++--
 drivers/net/irda/Kconfig                       |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index eb34bd1..ec47ef4 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -47,24 +47,24 @@ config ARCH_FORTUNET
 
 # XXX Maybe these should indicate register compatibility
 # instead of being mutually exclusive.
-config ARCH_EP7211
+config SOC_EP7211
 	bool
 	depends on ARCH_EDB7211
 	default y
 
-config ARCH_EP7212
+config SOC_EP7212
 	bool
 	depends on ARCH_P720T || ARCH_CEIVA
 	default y
 
 config EP72XX_ROM_BOOT
 	bool "EP72xx ROM boot"
-	depends on ARCH_EP7211 || ARCH_EP7212
+	depends on SOC_EP7211 || SOC_EP7212
 	---help---
 	  If you say Y here, your CLPS711x-based kernel will use the bootstrap
 	  mode memory map instead of the normal memory map.
 
-	  Processors derived from the Cirrus CLPS-711X core support two boot
+	  Processors derived from the Cirrus CLPS711X core support two boot
 	  modes.  Normal mode boots from the external memory device at CS0.
 	  Bootstrap mode rearranges parts of the memory map, placing an
 	  internal 128 byte bootstrap ROM at CS0.  This option performs the
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index d0b7d87..99461f3 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -52,13 +52,13 @@
 #define CS7_PHYS_BASE		(0x00000000)
 #endif
 
-#if defined (CONFIG_ARCH_EP7211)
+#if defined (CONFIG_SOC_EP7211)
 
 #define EP7211_VIRT_BASE	CLPS7111_VIRT_BASE
 #define EP7211_BASE		CLPS7111_VIRT_BASE
 #include <asm/hardware/ep7211.h>
 
-#elif defined (CONFIG_ARCH_EP7212)
+#elif defined (CONFIG_SOC_EP7212)
 
 #define EP7212_VIRT_BASE	CLPS7111_VIRT_BASE
 #define EP7212_BASE		CLPS7111_VIRT_BASE
diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig
index 4680478..54d7723 100644
--- a/drivers/net/irda/Kconfig
+++ b/drivers/net/irda/Kconfig
@@ -212,7 +212,7 @@ config KINGSUN_DONGLE
 
 config EP7211_DONGLE
 	tristate "EP7211 I/R support"
-	depends on IRTTY_SIR && ARCH_EP7211 && IRDA && EXPERIMENTAL
+	depends on IRTTY_SIR && (SOC_EP7211 || SOC_EP7212) && IRDA && EXPERIMENTAL
 	help
 	  Say Y here if you want to build support for the Cirrus logic
 	  EP7211 chipset's infrared module.
-- 
1.7.3.4

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

* [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21  9:11   ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Alexander Shiyan

Added register definitions specific to EP7312 and the necessary
configuration options.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/ep7312.h         |  106 ++++++++++++++++++++++++
 arch/arm/mach-clps711x/Kconfig                 |    9 ++-
 arch/arm/mach-clps711x/include/mach/hardware.h |    4 +
 drivers/net/irda/Kconfig                       |    3 +-
 4 files changed, 119 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/include/asm/hardware/ep7312.h

diff --git a/arch/arm/include/asm/hardware/ep7312.h b/arch/arm/include/asm/hardware/ep7312.h
new file mode 100644
index 0000000..c01cced
--- /dev/null
+++ b/arch/arm/include/asm/hardware/ep7312.h
@@ -0,0 +1,106 @@
+/*
+ *  linux/arch/arm/include/asm/hardware/ep7312.h
+ *
+ *  This file contains the hardware definitions of the EP7312 internal
+ *  registers.
+ *
+ *  Copyright (C) 2000 Deep Blue Solutions Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ */
+#ifndef __ASM_HARDWARE_EP7312_H
+#define __ASM_HARDWARE_EP7312_H
+
+/* These registers are specific to the EP7312 only */
+#define DAIR			0x2000
+#define DAIDR0			0x2040
+#define DAIDR1			0x2080
+#define DAIDR2			0x20c0
+#define DAISR			0x2100
+#define SYSCON3			0x2200
+#define INTSR3			0x2240
+#define INTMR3			0x2280
+#define LEDFLSH			0x22c0
+#define SDCONF			0x2300
+#define SDRFPR			0x2340
+#define UNIQID			0x2440
+#define DAI64FS			0x2600
+#define PLLW			0x2610
+#define PLLR			0xA5A8
+#define RANDID0			0x2700
+#define RANDID1			0x2704
+#define RANDID2			0x2708
+#define RANDID3			0x270c
+
+#define DAI64FS_I2SF64		(1 << 0)
+#define DAI64FS_AUDIOCLKEN	(1 << 1)
+#define DAI64FS_AUDIOCLKSRC	(1 << 2)
+#define DAI64FS_MCLK256EN	(1 << 3)
+#define DAI64FS_LOOPBACK	(1 << 5)
+
+#define DAIR_RESERVED		(0x0404)
+#define DAIR_DAIEN		(1 << 16)
+#define DAIR_ECS		(1 << 17)
+#define DAIR_LCTM		(1 << 19)
+#define DAIR_LCRM		(1 << 20)
+#define DAIR_RCTM		(1 << 21)
+#define DAIR_RCRM		(1 << 22)
+#define DAIR_LBM		(1 << 23)
+
+#define DAIDR2_FIFOEN		(1 << 15)
+#define DAIDR2_FIFOLEFT		(0x0d << 16)
+#define DAIDR2_FIFORIGHT	(0x11 << 16)
+
+#define DAISR_RCTS		(1 << 0)
+#define DAISR_RCRS		(1 << 1)
+#define DAISR_LCTS		(1 << 2)
+#define DAISR_LCRS		(1 << 3)
+#define DAISR_RCTU		(1 << 4)
+#define DAISR_RCRO		(1 << 5)
+#define DAISR_LCTU		(1 << 6)
+#define DAISR_LCRO		(1 << 7)
+#define DAISR_RCNF		(1 << 8)
+#define DAISR_RCNE		(1 << 9)
+#define DAISR_LCNF		(1 << 10)
+#define DAISR_LCNE		(1 << 11)
+#define DAISR_FIFO		(1 << 12)
+
+#define SYSCON3_ADCCON		(1 << 0)
+#define SYSCON3_CLKCTL0		(1 << 1)
+#define SYSCON3_CLKCTL1		(1 << 2)
+#define SYSCON3_DAISEL		(1 << 3)
+#define SYSCON3_ADCCKNSEN	(1 << 4)
+#define SYSCON3_VERSN(x)	(((x) >> 5) & 0x7)
+#define SYSCON3_RESERVED0	(1 << 8)
+#define SYSCON3_128FS		(1 << 9)
+#define SYSCON3_ENPD67		(1 << 10)
+
+#define SDCONF_ACTIVE		(1 << 10)
+#define SDCONF_CLKCTL		(1 << 9)
+#define SDCONF_WIDTH_4		(0 << 7)
+#define SDCONF_WIDTH_8		(1 << 7)
+#define SDCONF_WIDTH_16		(2 << 7)
+#define SDCONF_WIDTH_32		(3 << 7)
+#define SDCONF_SIZE_16		(0 << 5)
+#define SDCONF_SIZE_64		(1 << 5)
+#define SDCONF_SIZE_128		(2 << 5)
+#define SDCONF_SIZE_256		(3 << 5)
+#define SDCONF_CASLAT_2		(2)
+#define SDCONF_CASLAT_3		(3)
+
+#define SYNCIO_FRMLEN(x)	(((x) & 0x3f) << 7)
+#define SYNCIO_CFGLEN(x)	((x) & 0x7f)
+
+#endif /* __ASM_HARDWARE_EP7312_H */
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index ec47ef4..f86aec1 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -1,6 +1,6 @@
 if ARCH_CLPS711X
 
-menu "CLPS711X/EP721X Implementations"
+menu "CLPS711X/EP721X/EP731X Implementations"
 
 config ARCH_AUTCPU12
 	bool "AUTCPU12"
@@ -57,9 +57,14 @@ config SOC_EP7212
 	depends on ARCH_P720T || ARCH_CEIVA
 	default y
 
+config SOC_EP7312
+	bool
+	depends on ARCH_FORTUNET
+	default y
+
 config EP72XX_ROM_BOOT
 	bool "EP72xx ROM boot"
-	depends on SOC_EP7211 || SOC_EP7212
+	depends on SOC_EP7211 || SOC_EP7212 || SOC_EP7312
 	---help---
 	  If you say Y here, your CLPS711x-based kernel will use the bootstrap
 	  mode memory map instead of the normal memory map.
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index 99461f3..2ff3473 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -64,6 +64,10 @@
 #define EP7212_BASE		CLPS7111_VIRT_BASE
 #include <asm/hardware/ep7212.h>
 
+#elif defined (CONFIG_SOC_EP7213)
+
+#include <asm/hardware/ep7312.h>
+
 #endif
 
 #define SYSPLD_VIRT_BASE	0xfe000000
diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig
index 54d7723..a3929a1 100644
--- a/drivers/net/irda/Kconfig
+++ b/drivers/net/irda/Kconfig
@@ -212,7 +212,8 @@ config KINGSUN_DONGLE
 
 config EP7211_DONGLE
 	tristate "EP7211 I/R support"
-	depends on IRTTY_SIR && (SOC_EP7211 || SOC_EP7212) && IRDA && EXPERIMENTAL
+	depends on IRTTY_SIR && IRDA && EXPERIMENTAL && \
+		(SOC_EP7211 || SOC_EP7212 || SOC_7312)
 	help
 	  Say Y here if you want to build support for the Cirrus logic
 	  EP7211 chipset's infrared module.
-- 
1.7.3.4


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

* [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
@ 2012-04-21  9:11   ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel

Added register definitions specific to EP7312 and the necessary
configuration options.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/ep7312.h         |  106 ++++++++++++++++++++++++
 arch/arm/mach-clps711x/Kconfig                 |    9 ++-
 arch/arm/mach-clps711x/include/mach/hardware.h |    4 +
 drivers/net/irda/Kconfig                       |    3 +-
 4 files changed, 119 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/include/asm/hardware/ep7312.h

diff --git a/arch/arm/include/asm/hardware/ep7312.h b/arch/arm/include/asm/hardware/ep7312.h
new file mode 100644
index 0000000..c01cced
--- /dev/null
+++ b/arch/arm/include/asm/hardware/ep7312.h
@@ -0,0 +1,106 @@
+/*
+ *  linux/arch/arm/include/asm/hardware/ep7312.h
+ *
+ *  This file contains the hardware definitions of the EP7312 internal
+ *  registers.
+ *
+ *  Copyright (C) 2000 Deep Blue Solutions Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ */
+#ifndef __ASM_HARDWARE_EP7312_H
+#define __ASM_HARDWARE_EP7312_H
+
+/* These registers are specific to the EP7312 only */
+#define DAIR			0x2000
+#define DAIDR0			0x2040
+#define DAIDR1			0x2080
+#define DAIDR2			0x20c0
+#define DAISR			0x2100
+#define SYSCON3			0x2200
+#define INTSR3			0x2240
+#define INTMR3			0x2280
+#define LEDFLSH			0x22c0
+#define SDCONF			0x2300
+#define SDRFPR			0x2340
+#define UNIQID			0x2440
+#define DAI64FS			0x2600
+#define PLLW			0x2610
+#define PLLR			0xA5A8
+#define RANDID0			0x2700
+#define RANDID1			0x2704
+#define RANDID2			0x2708
+#define RANDID3			0x270c
+
+#define DAI64FS_I2SF64		(1 << 0)
+#define DAI64FS_AUDIOCLKEN	(1 << 1)
+#define DAI64FS_AUDIOCLKSRC	(1 << 2)
+#define DAI64FS_MCLK256EN	(1 << 3)
+#define DAI64FS_LOOPBACK	(1 << 5)
+
+#define DAIR_RESERVED		(0x0404)
+#define DAIR_DAIEN		(1 << 16)
+#define DAIR_ECS		(1 << 17)
+#define DAIR_LCTM		(1 << 19)
+#define DAIR_LCRM		(1 << 20)
+#define DAIR_RCTM		(1 << 21)
+#define DAIR_RCRM		(1 << 22)
+#define DAIR_LBM		(1 << 23)
+
+#define DAIDR2_FIFOEN		(1 << 15)
+#define DAIDR2_FIFOLEFT		(0x0d << 16)
+#define DAIDR2_FIFORIGHT	(0x11 << 16)
+
+#define DAISR_RCTS		(1 << 0)
+#define DAISR_RCRS		(1 << 1)
+#define DAISR_LCTS		(1 << 2)
+#define DAISR_LCRS		(1 << 3)
+#define DAISR_RCTU		(1 << 4)
+#define DAISR_RCRO		(1 << 5)
+#define DAISR_LCTU		(1 << 6)
+#define DAISR_LCRO		(1 << 7)
+#define DAISR_RCNF		(1 << 8)
+#define DAISR_RCNE		(1 << 9)
+#define DAISR_LCNF		(1 << 10)
+#define DAISR_LCNE		(1 << 11)
+#define DAISR_FIFO		(1 << 12)
+
+#define SYSCON3_ADCCON		(1 << 0)
+#define SYSCON3_CLKCTL0		(1 << 1)
+#define SYSCON3_CLKCTL1		(1 << 2)
+#define SYSCON3_DAISEL		(1 << 3)
+#define SYSCON3_ADCCKNSEN	(1 << 4)
+#define SYSCON3_VERSN(x)	(((x) >> 5) & 0x7)
+#define SYSCON3_RESERVED0	(1 << 8)
+#define SYSCON3_128FS		(1 << 9)
+#define SYSCON3_ENPD67		(1 << 10)
+
+#define SDCONF_ACTIVE		(1 << 10)
+#define SDCONF_CLKCTL		(1 << 9)
+#define SDCONF_WIDTH_4		(0 << 7)
+#define SDCONF_WIDTH_8		(1 << 7)
+#define SDCONF_WIDTH_16		(2 << 7)
+#define SDCONF_WIDTH_32		(3 << 7)
+#define SDCONF_SIZE_16		(0 << 5)
+#define SDCONF_SIZE_64		(1 << 5)
+#define SDCONF_SIZE_128		(2 << 5)
+#define SDCONF_SIZE_256		(3 << 5)
+#define SDCONF_CASLAT_2		(2)
+#define SDCONF_CASLAT_3		(3)
+
+#define SYNCIO_FRMLEN(x)	(((x) & 0x3f) << 7)
+#define SYNCIO_CFGLEN(x)	((x) & 0x7f)
+
+#endif /* __ASM_HARDWARE_EP7312_H */
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index ec47ef4..f86aec1 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -1,6 +1,6 @@
 if ARCH_CLPS711X
 
-menu "CLPS711X/EP721X Implementations"
+menu "CLPS711X/EP721X/EP731X Implementations"
 
 config ARCH_AUTCPU12
 	bool "AUTCPU12"
@@ -57,9 +57,14 @@ config SOC_EP7212
 	depends on ARCH_P720T || ARCH_CEIVA
 	default y
 
+config SOC_EP7312
+	bool
+	depends on ARCH_FORTUNET
+	default y
+
 config EP72XX_ROM_BOOT
 	bool "EP72xx ROM boot"
-	depends on SOC_EP7211 || SOC_EP7212
+	depends on SOC_EP7211 || SOC_EP7212 || SOC_EP7312
 	---help---
 	  If you say Y here, your CLPS711x-based kernel will use the bootstrap
 	  mode memory map instead of the normal memory map.
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index 99461f3..2ff3473 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -64,6 +64,10 @@
 #define EP7212_BASE		CLPS7111_VIRT_BASE
 #include <asm/hardware/ep7212.h>
 
+#elif defined (CONFIG_SOC_EP7213)
+
+#include <asm/hardware/ep7312.h>
+
 #endif
 
 #define SYSPLD_VIRT_BASE	0xfe000000
diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig
index 54d7723..a3929a1 100644
--- a/drivers/net/irda/Kconfig
+++ b/drivers/net/irda/Kconfig
@@ -212,7 +212,8 @@ config KINGSUN_DONGLE
 
 config EP7211_DONGLE
 	tristate "EP7211 I/R support"
-	depends on IRTTY_SIR && (SOC_EP7211 || SOC_EP7212) && IRDA && EXPERIMENTAL
+	depends on IRTTY_SIR && IRDA && EXPERIMENTAL && \
+		(SOC_EP7211 || SOC_EP7212 || SOC_7312)
 	help
 	  Say Y here if you want to build support for the Cirrus logic
 	  EP7211 chipset's infrared module.
-- 
1.7.3.4

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

* [PATCH 03/17] ARM clps711x: Selecting CPU-variant automatically for clps711x targets
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21  9:11   ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Alexander Shiyan


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/Kconfig |   33 ++++++++++++++++-----------------
 1 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index f86aec1..28ac4d6 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -2,14 +2,25 @@ if ARCH_CLPS711X
 
 menu "CLPS711X/EP721X/EP731X Implementations"
 
+config SOC_EP7211
+	bool
+
+config SOC_EP7212
+	bool
+
+config SOC_EP7312
+	bool
+
 config ARCH_AUTCPU12
 	bool "AUTCPU12"
+	select SOC_EP7212
 	help
 	  Say Y if you intend to run the kernel on the autronix autcpu12
 	  board. This board is based on a Cirrus Logic CS89712.
 
 config ARCH_CDB89712
 	bool "CDB89712"
+	select SOC_EP7212
 	select ISA
 	help
 	  This is an evaluation board from Cirrus for the CS89712 processor.
@@ -18,17 +29,20 @@ config ARCH_CDB89712
 
 config ARCH_CEIVA
 	bool "CEIVA"
+	select SOC_EP7212
 	help
 	  Say Y here if you intend to run this kernel on the Ceiva/Polaroid
 	  PhotoMax Digital Picture Frame.
 
 config ARCH_CLEP7312
 	bool "CLEP7312"
+	select SOC_EP7312
 	help
 	  Boards based on the Cirrus Logic 7212/7312 chips.
 
 config ARCH_EDB7211
 	bool "EDB7211"
+	select SOC_EP7211
 	select ISA
 	select ARCH_SPARSEMEM_ENABLE
 	select ARCH_SELECT_MEMORY_MODEL
@@ -38,29 +52,14 @@ config ARCH_EDB7211
 
 config ARCH_P720T
 	bool "P720T"
+	select SOC_EP7212
 	help
 	  Say Y here if you intend to run this kernel on the ARM Prospector
 	  720T.
 
 config ARCH_FORTUNET
 	bool "FORTUNET"
-
-# XXX Maybe these should indicate register compatibility
-# instead of being mutually exclusive.
-config SOC_EP7211
-	bool
-	depends on ARCH_EDB7211
-	default y
-
-config SOC_EP7212
-	bool
-	depends on ARCH_P720T || ARCH_CEIVA
-	default y
-
-config SOC_EP7312
-	bool
-	depends on ARCH_FORTUNET
-	default y
+	select SOC_EP7312
 
 config EP72XX_ROM_BOOT
 	bool "EP72xx ROM boot"
-- 
1.7.3.4


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

* [PATCH 03/17] ARM clps711x: Selecting CPU-variant automatically for clps711x targets
@ 2012-04-21  9:11   ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/Kconfig |   33 ++++++++++++++++-----------------
 1 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index f86aec1..28ac4d6 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -2,14 +2,25 @@ if ARCH_CLPS711X
 
 menu "CLPS711X/EP721X/EP731X Implementations"
 
+config SOC_EP7211
+	bool
+
+config SOC_EP7212
+	bool
+
+config SOC_EP7312
+	bool
+
 config ARCH_AUTCPU12
 	bool "AUTCPU12"
+	select SOC_EP7212
 	help
 	  Say Y if you intend to run the kernel on the autronix autcpu12
 	  board. This board is based on a Cirrus Logic CS89712.
 
 config ARCH_CDB89712
 	bool "CDB89712"
+	select SOC_EP7212
 	select ISA
 	help
 	  This is an evaluation board from Cirrus for the CS89712 processor.
@@ -18,17 +29,20 @@ config ARCH_CDB89712
 
 config ARCH_CEIVA
 	bool "CEIVA"
+	select SOC_EP7212
 	help
 	  Say Y here if you intend to run this kernel on the Ceiva/Polaroid
 	  PhotoMax Digital Picture Frame.
 
 config ARCH_CLEP7312
 	bool "CLEP7312"
+	select SOC_EP7312
 	help
 	  Boards based on the Cirrus Logic 7212/7312 chips.
 
 config ARCH_EDB7211
 	bool "EDB7211"
+	select SOC_EP7211
 	select ISA
 	select ARCH_SPARSEMEM_ENABLE
 	select ARCH_SELECT_MEMORY_MODEL
@@ -38,29 +52,14 @@ config ARCH_EDB7211
 
 config ARCH_P720T
 	bool "P720T"
+	select SOC_EP7212
 	help
 	  Say Y here if you intend to run this kernel on the ARM Prospector
 	  720T.
 
 config ARCH_FORTUNET
 	bool "FORTUNET"
-
-# XXX Maybe these should indicate register compatibility
-# instead of being mutually exclusive.
-config SOC_EP7211
-	bool
-	depends on ARCH_EDB7211
-	default y
-
-config SOC_EP7212
-	bool
-	depends on ARCH_P720T || ARCH_CEIVA
-	default y
-
-config SOC_EP7312
-	bool
-	depends on ARCH_FORTUNET
-	default y
+	select SOC_EP7312
 
 config EP72XX_ROM_BOOT
 	bool "EP72xx ROM boot"
-- 
1.7.3.4

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

* [PATCH 04/17] ARM clps711x: Using a single definition for virtual address register
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21  9:11   ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Alexander Shiyan

Using a single definition for the virtual address register for all
variants boards clps711x.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/ep7211.h         |    5 -----
 arch/arm/include/asm/hardware/ep7212.h         |    9 ++-------
 arch/arm/mach-clps711x/include/mach/hardware.h |   10 ----------
 drivers/mtd/nand/autcpu12.c                    |    4 ++--
 4 files changed, 4 insertions(+), 24 deletions(-)

diff --git a/arch/arm/include/asm/hardware/ep7211.h b/arch/arm/include/asm/hardware/ep7211.h
index 654d5f6..ca4d198 100644
--- a/arch/arm/include/asm/hardware/ep7211.h
+++ b/arch/arm/include/asm/hardware/ep7211.h
@@ -25,11 +25,6 @@
 
 #include <asm/hardware/clps7111.h>
 
-/*
- * define EP7211_BASE to be the base address of the region
- * you want to access.
- */
-
 #define EP7211_PHYS_BASE	(0x80000000)
 
 /*
diff --git a/arch/arm/include/asm/hardware/ep7212.h b/arch/arm/include/asm/hardware/ep7212.h
index 3b43bbe..0b1f508 100644
--- a/arch/arm/include/asm/hardware/ep7212.h
+++ b/arch/arm/include/asm/hardware/ep7212.h
@@ -23,16 +23,11 @@
 #ifndef __ASM_HARDWARE_EP7212_H
 #define __ASM_HARDWARE_EP7212_H
 
-/*
- * define EP7212_BASE to be the base address of the region
- * you want to access.
- */
-
 #define EP7212_PHYS_BASE	(0x80000000)
 
 #ifndef __ASSEMBLY__
-#define ep_readl(off)		__raw_readl(EP7212_BASE + (off))
-#define ep_writel(val,off)	__raw_writel(val, EP7212_BASE + (off))
+#define ep_readl(off)		__raw_readl(CLPS7111_BASE + (off))
+#define ep_writel(val,off)	__raw_writel(val, CLPS7111_BASE + (off))
 #endif
 
 /*
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index 2ff3473..8c7b28e 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -54,14 +54,10 @@
 
 #if defined (CONFIG_SOC_EP7211)
 
-#define EP7211_VIRT_BASE	CLPS7111_VIRT_BASE
-#define EP7211_BASE		CLPS7111_VIRT_BASE
 #include <asm/hardware/ep7211.h>
 
 #elif defined (CONFIG_SOC_EP7212)
 
-#define EP7212_VIRT_BASE	CLPS7111_VIRT_BASE
-#define EP7212_BASE		CLPS7111_VIRT_BASE
 #include <asm/hardware/ep7212.h>
 
 #elif defined (CONFIG_SOC_EP7213)
@@ -75,9 +71,6 @@
 
 #if  defined (CONFIG_ARCH_AUTCPU12)
 
-#define  CS89712_VIRT_BASE	CLPS7111_VIRT_BASE
-#define  CS89712_BASE		CLPS7111_VIRT_BASE
-
 #include <asm/hardware/clps7111.h>
 #include <asm/hardware/ep7212.h>
 #include <asm/hardware/cs89712.h>
@@ -158,9 +151,6 @@
 
 #if defined (CONFIG_ARCH_CEIVA)
 
-#define  CEIVA_VIRT_BASE	CLPS7111_VIRT_BASE
-#define  CEIVA_BASE		CLPS7111_VIRT_BASE
-
 #include <asm/hardware/clps7111.h>
 #include <asm/hardware/ep7212.h>
 
diff --git a/drivers/mtd/nand/autcpu12.c b/drivers/mtd/nand/autcpu12.c
index 2e42ec2..5bd4107 100644
--- a/drivers/mtd/nand/autcpu12.c
+++ b/drivers/mtd/nand/autcpu12.c
@@ -102,7 +102,7 @@ static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd,
 		void __iomem *addr;
 		unsigned char bits;
 
-		addr = CS89712_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
+		addr = CLPS7111_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
 		bits = (ctrl & NAND_CLE) << 4;
 		bits |= (ctrl & NAND_ALE) << 2;
 		writeb((readb(addr) & ~0x30) | bits, addr);
@@ -120,7 +120,7 @@ static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd,
  */
 int autcpu12_device_ready(struct mtd_info *mtd)
 {
-	void __iomem *addr = CS89712_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
+	void __iomem *addr = CLPS7111_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
 
 	return readb(addr) & AUTCPU12_SMC_RDY;
 }
-- 
1.7.3.4


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

* [PATCH 04/17] ARM clps711x: Using a single definition for virtual address register
@ 2012-04-21  9:11   ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel

Using a single definition for the virtual address register for all
variants boards clps711x.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/ep7211.h         |    5 -----
 arch/arm/include/asm/hardware/ep7212.h         |    9 ++-------
 arch/arm/mach-clps711x/include/mach/hardware.h |   10 ----------
 drivers/mtd/nand/autcpu12.c                    |    4 ++--
 4 files changed, 4 insertions(+), 24 deletions(-)

diff --git a/arch/arm/include/asm/hardware/ep7211.h b/arch/arm/include/asm/hardware/ep7211.h
index 654d5f6..ca4d198 100644
--- a/arch/arm/include/asm/hardware/ep7211.h
+++ b/arch/arm/include/asm/hardware/ep7211.h
@@ -25,11 +25,6 @@
 
 #include <asm/hardware/clps7111.h>
 
-/*
- * define EP7211_BASE to be the base address of the region
- * you want to access.
- */
-
 #define EP7211_PHYS_BASE	(0x80000000)
 
 /*
diff --git a/arch/arm/include/asm/hardware/ep7212.h b/arch/arm/include/asm/hardware/ep7212.h
index 3b43bbe..0b1f508 100644
--- a/arch/arm/include/asm/hardware/ep7212.h
+++ b/arch/arm/include/asm/hardware/ep7212.h
@@ -23,16 +23,11 @@
 #ifndef __ASM_HARDWARE_EP7212_H
 #define __ASM_HARDWARE_EP7212_H
 
-/*
- * define EP7212_BASE to be the base address of the region
- * you want to access.
- */
-
 #define EP7212_PHYS_BASE	(0x80000000)
 
 #ifndef __ASSEMBLY__
-#define ep_readl(off)		__raw_readl(EP7212_BASE + (off))
-#define ep_writel(val,off)	__raw_writel(val, EP7212_BASE + (off))
+#define ep_readl(off)		__raw_readl(CLPS7111_BASE + (off))
+#define ep_writel(val,off)	__raw_writel(val, CLPS7111_BASE + (off))
 #endif
 
 /*
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index 2ff3473..8c7b28e 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -54,14 +54,10 @@
 
 #if defined (CONFIG_SOC_EP7211)
 
-#define EP7211_VIRT_BASE	CLPS7111_VIRT_BASE
-#define EP7211_BASE		CLPS7111_VIRT_BASE
 #include <asm/hardware/ep7211.h>
 
 #elif defined (CONFIG_SOC_EP7212)
 
-#define EP7212_VIRT_BASE	CLPS7111_VIRT_BASE
-#define EP7212_BASE		CLPS7111_VIRT_BASE
 #include <asm/hardware/ep7212.h>
 
 #elif defined (CONFIG_SOC_EP7213)
@@ -75,9 +71,6 @@
 
 #if  defined (CONFIG_ARCH_AUTCPU12)
 
-#define  CS89712_VIRT_BASE	CLPS7111_VIRT_BASE
-#define  CS89712_BASE		CLPS7111_VIRT_BASE
-
 #include <asm/hardware/clps7111.h>
 #include <asm/hardware/ep7212.h>
 #include <asm/hardware/cs89712.h>
@@ -158,9 +151,6 @@
 
 #if defined (CONFIG_ARCH_CEIVA)
 
-#define  CEIVA_VIRT_BASE	CLPS7111_VIRT_BASE
-#define  CEIVA_BASE		CLPS7111_VIRT_BASE
-
 #include <asm/hardware/clps7111.h>
 #include <asm/hardware/ep7212.h>
 
diff --git a/drivers/mtd/nand/autcpu12.c b/drivers/mtd/nand/autcpu12.c
index 2e42ec2..5bd4107 100644
--- a/drivers/mtd/nand/autcpu12.c
+++ b/drivers/mtd/nand/autcpu12.c
@@ -102,7 +102,7 @@ static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd,
 		void __iomem *addr;
 		unsigned char bits;
 
-		addr = CS89712_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
+		addr = CLPS7111_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
 		bits = (ctrl & NAND_CLE) << 4;
 		bits |= (ctrl & NAND_ALE) << 2;
 		writeb((readb(addr) & ~0x30) | bits, addr);
@@ -120,7 +120,7 @@ static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd,
  */
 int autcpu12_device_ready(struct mtd_info *mtd)
 {
-	void __iomem *addr = CS89712_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
+	void __iomem *addr = CLPS7111_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
 
 	return readb(addr) & AUTCPU12_SMC_RDY;
 }
-- 
1.7.3.4

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

* [PATCH 05/17] ARM clps711x: Added missing definitions for PORT C
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21  9:11   ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Alexander Shiyan


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/clps7111.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/include/asm/hardware/clps7111.h b/arch/arm/include/asm/hardware/clps7111.h
index 4447722..84358d8 100644
--- a/arch/arm/include/asm/hardware/clps7111.h
+++ b/arch/arm/include/asm/hardware/clps7111.h
@@ -36,9 +36,11 @@
 
 #define PADR		(0x0000)
 #define PBDR		(0x0001)
+#define PCDR		(0x0002)
 #define PDDR		(0x0003)
 #define PADDR		(0x0040)
 #define PBDDR		(0x0041)
+#define PCDDR		(0x0042)
 #define PDDDR		(0x0043)
 #define PEDR		(0x0080)
 #define PEDDR		(0x00c0)
-- 
1.7.3.4


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

* [PATCH 05/17] ARM clps711x: Added missing definitions for PORT C
@ 2012-04-21  9:11   ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/clps7111.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/include/asm/hardware/clps7111.h b/arch/arm/include/asm/hardware/clps7111.h
index 4447722..84358d8 100644
--- a/arch/arm/include/asm/hardware/clps7111.h
+++ b/arch/arm/include/asm/hardware/clps7111.h
@@ -36,9 +36,11 @@
 
 #define PADR		(0x0000)
 #define PBDR		(0x0001)
+#define PCDR		(0x0002)
 #define PDDR		(0x0003)
 #define PADDR		(0x0040)
 #define PBDDR		(0x0041)
+#define PCDDR		(0x0042)
 #define PDDDR		(0x0043)
 #define PEDR		(0x0080)
 #define PEDDR		(0x00c0)
-- 
1.7.3.4

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

* [PATCH 06/17] ARM clps711x: Remove now unused cs89712 board header
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21  9:11   ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Alexander Shiyan


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/cs89712.h        |   49 ------------------------
 arch/arm/mach-clps711x/include/mach/hardware.h |    2 -
 2 files changed, 0 insertions(+), 51 deletions(-)
 delete mode 100644 arch/arm/include/asm/hardware/cs89712.h

diff --git a/arch/arm/include/asm/hardware/cs89712.h b/arch/arm/include/asm/hardware/cs89712.h
deleted file mode 100644
index f756269..0000000
--- a/arch/arm/include/asm/hardware/cs89712.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *  arch/arm/include/asm/hardware/cs89712.h
- *
- *  This file contains the hardware definitions of the CS89712
- *  additional internal registers.
- *
- *  Copyright (C) 2001 Thomas Gleixner autronix automation <gleixner@autronix.de>
- *			
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __ASM_HARDWARE_CS89712_H
-#define __ASM_HARDWARE_CS89712_H
-
-/*
-*	CS89712 additional registers
-*/
-                                  
-#define PCDR			0x0002	/* Port C Data register ---------------------------- */
-#define PCDDR			0x0042	/* Port C Data Direction register ------------------ */
-#define SDCONF			0x2300  /* SDRAM Configuration register ---------------------*/
-#define SDRFPR			0x2340  /* SDRAM Refresh period register --------------------*/
-
-#define SDCONF_ACTIVE		(1 << 10)
-#define SDCONF_CLKCTL		(1 << 9)
-#define SDCONF_WIDTH_4		(0 << 7)
-#define SDCONF_WIDTH_8		(1 << 7)
-#define SDCONF_WIDTH_16		(2 << 7)
-#define SDCONF_WIDTH_32		(3 << 7)
-#define SDCONF_SIZE_16		(0 << 5)
-#define SDCONF_SIZE_64		(1 << 5)
-#define SDCONF_SIZE_128		(2 << 5)
-#define SDCONF_SIZE_256		(3 << 5)
-#define SDCONF_CASLAT_2		(2)
-#define SDCONF_CASLAT_3		(3)
-
-#endif /* __ASM_HARDWARE_CS89712_H */
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index 8c7b28e..f00e87a 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -73,7 +73,6 @@
 
 #include <asm/hardware/clps7111.h>
 #include <asm/hardware/ep7212.h>
-#include <asm/hardware/cs89712.h>
 
 #endif
 
@@ -82,7 +81,6 @@
 
 #include <asm/hardware/clps7111.h>
 #include <asm/hardware/ep7212.h>
-#include <asm/hardware/cs89712.h>
 
 /* static cdb89712_map_io() areas */
 #define REGISTER_START   0x80000000
-- 
1.7.3.4


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

* [PATCH 06/17] ARM clps711x: Remove now unused cs89712 board header
@ 2012-04-21  9:11   ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/cs89712.h        |   49 ------------------------
 arch/arm/mach-clps711x/include/mach/hardware.h |    2 -
 2 files changed, 0 insertions(+), 51 deletions(-)
 delete mode 100644 arch/arm/include/asm/hardware/cs89712.h

diff --git a/arch/arm/include/asm/hardware/cs89712.h b/arch/arm/include/asm/hardware/cs89712.h
deleted file mode 100644
index f756269..0000000
--- a/arch/arm/include/asm/hardware/cs89712.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *  arch/arm/include/asm/hardware/cs89712.h
- *
- *  This file contains the hardware definitions of the CS89712
- *  additional internal registers.
- *
- *  Copyright (C) 2001 Thomas Gleixner autronix automation <gleixner@autronix.de>
- *			
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __ASM_HARDWARE_CS89712_H
-#define __ASM_HARDWARE_CS89712_H
-
-/*
-*	CS89712 additional registers
-*/
-                                  
-#define PCDR			0x0002	/* Port C Data register ---------------------------- */
-#define PCDDR			0x0042	/* Port C Data Direction register ------------------ */
-#define SDCONF			0x2300  /* SDRAM Configuration register ---------------------*/
-#define SDRFPR			0x2340  /* SDRAM Refresh period register --------------------*/
-
-#define SDCONF_ACTIVE		(1 << 10)
-#define SDCONF_CLKCTL		(1 << 9)
-#define SDCONF_WIDTH_4		(0 << 7)
-#define SDCONF_WIDTH_8		(1 << 7)
-#define SDCONF_WIDTH_16		(2 << 7)
-#define SDCONF_WIDTH_32		(3 << 7)
-#define SDCONF_SIZE_16		(0 << 5)
-#define SDCONF_SIZE_64		(1 << 5)
-#define SDCONF_SIZE_128		(2 << 5)
-#define SDCONF_SIZE_256		(3 << 5)
-#define SDCONF_CASLAT_2		(2)
-#define SDCONF_CASLAT_3		(3)
-
-#endif /* __ASM_HARDWARE_CS89712_H */
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index 8c7b28e..f00e87a 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -73,7 +73,6 @@
 
 #include <asm/hardware/clps7111.h>
 #include <asm/hardware/ep7212.h>
-#include <asm/hardware/cs89712.h>
 
 #endif
 
@@ -82,7 +81,6 @@
 
 #include <asm/hardware/clps7111.h>
 #include <asm/hardware/ep7212.h>
-#include <asm/hardware/cs89712.h>
 
 /* static cdb89712_map_io() areas */
 #define REGISTER_START   0x80000000
-- 
1.7.3.4

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

* [PATCH 07/17] ARM clps711x: Remove unused includes
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21  9:11   ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Alexander Shiyan

All necessary definitions now provides by mach/hardware.h

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/ep7211.h            |    2 --
 arch/arm/mach-clps711x/common.c                   |    1 -
 arch/arm/mach-clps711x/include/mach/debug-macro.S |    1 -
 arch/arm/mach-clps711x/include/mach/entry-macro.S |    1 -
 arch/arm/mach-clps711x/include/mach/hardware.h    |   18 ++----------------
 arch/arm/mach-clps711x/include/mach/time.h        |    2 +-
 arch/arm/mach-clps711x/include/mach/uncompress.h  |    1 -
 arch/arm/mach-clps711x/p720t-leds.c               |    3 ---
 drivers/tty/serial/clps711x.c                     |    1 -
 drivers/video/clps711xfb.c                        |    1 -
 10 files changed, 3 insertions(+), 28 deletions(-)

diff --git a/arch/arm/include/asm/hardware/ep7211.h b/arch/arm/include/asm/hardware/ep7211.h
index ca4d198..0b09e38 100644
--- a/arch/arm/include/asm/hardware/ep7211.h
+++ b/arch/arm/include/asm/hardware/ep7211.h
@@ -23,8 +23,6 @@
 #ifndef __ASM_HARDWARE_EP7211_H
 #define __ASM_HARDWARE_EP7211_H
 
-#include <asm/hardware/clps7111.h>
-
 #define EP7211_PHYS_BASE	(0x80000000)
 
 /*
diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c
index 3c5b5bb..3544433 100644
--- a/arch/arm/mach-clps711x/common.c
+++ b/arch/arm/mach-clps711x/common.c
@@ -36,7 +36,6 @@
 #include <asm/page.h>
 #include <asm/mach/map.h>
 #include <asm/mach/time.h>
-#include <asm/hardware/clps7111.h>
 #include <asm/system_misc.h>
 
 /*
diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S
index b802e8a..15a9036 100644
--- a/arch/arm/mach-clps711x/include/mach/debug-macro.S
+++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S
@@ -12,7 +12,6 @@
 */
 
 #include <mach/hardware.h>
-#include <asm/hardware/clps7111.h>
 
 		.macro	addruart, rp, rv, tmp
 #ifndef CONFIG_DEBUG_CLPS711X_UART2
diff --git a/arch/arm/mach-clps711x/include/mach/entry-macro.S b/arch/arm/mach-clps711x/include/mach/entry-macro.S
index 125af59..4ff5e77 100644
--- a/arch/arm/mach-clps711x/include/mach/entry-macro.S
+++ b/arch/arm/mach-clps711x/include/mach/entry-macro.S
@@ -8,7 +8,6 @@
  * warranty of any kind, whether express or implied.
  */
 #include <mach/hardware.h>
-#include <asm/hardware/clps7111.h>
 
 		.macro	get_irqnr_preamble, base, tmp
 		.endm
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index f00e87a..fa9b8f2 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -22,10 +22,11 @@
 #ifndef __ASM_ARCH_HARDWARE_H
 #define __ASM_ARCH_HARDWARE_H
 
-
 #define CLPS7111_VIRT_BASE	0xff000000
 #define CLPS7111_BASE		CLPS7111_VIRT_BASE
 
+#include <asm/hardware/clps7111.h>
+
 /*
  * The physical addresses that the external chip select signals map to is
  * dependent on the setting of the nMEDCHG signal on EP7211 and EP7212
@@ -69,19 +70,8 @@
 #define SYSPLD_VIRT_BASE	0xfe000000
 #define SYSPLD_BASE		SYSPLD_VIRT_BASE
 
-#if  defined (CONFIG_ARCH_AUTCPU12)
-
-#include <asm/hardware/clps7111.h>
-#include <asm/hardware/ep7212.h>
-
-#endif
-
-
 #if defined (CONFIG_ARCH_CDB89712)
 
-#include <asm/hardware/clps7111.h>
-#include <asm/hardware/ep7212.h>
-
 /* static cdb89712_map_io() areas */
 #define REGISTER_START   0x80000000
 #define REGISTER_SIZE    0x4000
@@ -149,10 +139,6 @@
 
 #if defined (CONFIG_ARCH_CEIVA)
 
-#include <asm/hardware/clps7111.h>
-#include <asm/hardware/ep7212.h>
-
-
 /*
  * The two flash banks are wired to chip selects 0 and 1. This is the mapping
  * for them.
diff --git a/arch/arm/mach-clps711x/include/mach/time.h b/arch/arm/mach-clps711x/include/mach/time.h
index 61fef91..5f65865 100644
--- a/arch/arm/mach-clps711x/include/mach/time.h
+++ b/arch/arm/mach-clps711x/include/mach/time.h
@@ -18,7 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include <asm/leds.h>
-#include <asm/hardware/clps7111.h>
+#include <mach/hardware.h>
 
 extern void clps711x_setup_timer(void);
 
diff --git a/arch/arm/mach-clps711x/include/mach/uncompress.h b/arch/arm/mach-clps711x/include/mach/uncompress.h
index 35ed731..ac42332 100644
--- a/arch/arm/mach-clps711x/include/mach/uncompress.h
+++ b/arch/arm/mach-clps711x/include/mach/uncompress.h
@@ -18,7 +18,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include <mach/hardware.h>
-#include <asm/hardware/clps7111.h>
 
 #undef CLPS7111_BASE
 #define CLPS7111_BASE CLPS7111_PHYS_BASE
diff --git a/arch/arm/mach-clps711x/p720t-leds.c b/arch/arm/mach-clps711x/p720t-leds.c
index dd9a6cd..bbc449f 100644
--- a/arch/arm/mach-clps711x/p720t-leds.c
+++ b/arch/arm/mach-clps711x/p720t-leds.c
@@ -27,9 +27,6 @@
 #include <asm/leds.h>
 #include <asm/mach-types.h>
 
-#include <asm/hardware/clps7111.h>
-#include <asm/hardware/ep7212.h>
-
 static void p720t_leds_event(led_event_t ledevt)
 {
 	unsigned long flags;
diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c
index 836fe273..d0f719f 100644
--- a/drivers/tty/serial/clps711x.c
+++ b/drivers/tty/serial/clps711x.c
@@ -40,7 +40,6 @@
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/hardware/clps7111.h>
 
 #define UART_NR		2
 
diff --git a/drivers/video/clps711xfb.c b/drivers/video/clps711xfb.c
index 99b354b..f994c8b 100644
--- a/drivers/video/clps711xfb.c
+++ b/drivers/video/clps711xfb.c
@@ -33,7 +33,6 @@
 #include <asm/mach-types.h>
 #include <linux/uaccess.h>
 
-#include <asm/hardware/clps7111.h>
 #include <mach/syspld.h>
 
 struct fb_info	*cfb;
-- 
1.7.3.4


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

* [PATCH 07/17] ARM clps711x: Remove unused includes
@ 2012-04-21  9:11   ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel

All necessary definitions now provides by mach/hardware.h

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/ep7211.h            |    2 --
 arch/arm/mach-clps711x/common.c                   |    1 -
 arch/arm/mach-clps711x/include/mach/debug-macro.S |    1 -
 arch/arm/mach-clps711x/include/mach/entry-macro.S |    1 -
 arch/arm/mach-clps711x/include/mach/hardware.h    |   18 ++----------------
 arch/arm/mach-clps711x/include/mach/time.h        |    2 +-
 arch/arm/mach-clps711x/include/mach/uncompress.h  |    1 -
 arch/arm/mach-clps711x/p720t-leds.c               |    3 ---
 drivers/tty/serial/clps711x.c                     |    1 -
 drivers/video/clps711xfb.c                        |    1 -
 10 files changed, 3 insertions(+), 28 deletions(-)

diff --git a/arch/arm/include/asm/hardware/ep7211.h b/arch/arm/include/asm/hardware/ep7211.h
index ca4d198..0b09e38 100644
--- a/arch/arm/include/asm/hardware/ep7211.h
+++ b/arch/arm/include/asm/hardware/ep7211.h
@@ -23,8 +23,6 @@
 #ifndef __ASM_HARDWARE_EP7211_H
 #define __ASM_HARDWARE_EP7211_H
 
-#include <asm/hardware/clps7111.h>
-
 #define EP7211_PHYS_BASE	(0x80000000)
 
 /*
diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c
index 3c5b5bb..3544433 100644
--- a/arch/arm/mach-clps711x/common.c
+++ b/arch/arm/mach-clps711x/common.c
@@ -36,7 +36,6 @@
 #include <asm/page.h>
 #include <asm/mach/map.h>
 #include <asm/mach/time.h>
-#include <asm/hardware/clps7111.h>
 #include <asm/system_misc.h>
 
 /*
diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S
index b802e8a..15a9036 100644
--- a/arch/arm/mach-clps711x/include/mach/debug-macro.S
+++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S
@@ -12,7 +12,6 @@
 */
 
 #include <mach/hardware.h>
-#include <asm/hardware/clps7111.h>
 
 		.macro	addruart, rp, rv, tmp
 #ifndef CONFIG_DEBUG_CLPS711X_UART2
diff --git a/arch/arm/mach-clps711x/include/mach/entry-macro.S b/arch/arm/mach-clps711x/include/mach/entry-macro.S
index 125af59..4ff5e77 100644
--- a/arch/arm/mach-clps711x/include/mach/entry-macro.S
+++ b/arch/arm/mach-clps711x/include/mach/entry-macro.S
@@ -8,7 +8,6 @@
  * warranty of any kind, whether express or implied.
  */
 #include <mach/hardware.h>
-#include <asm/hardware/clps7111.h>
 
 		.macro	get_irqnr_preamble, base, tmp
 		.endm
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index f00e87a..fa9b8f2 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -22,10 +22,11 @@
 #ifndef __ASM_ARCH_HARDWARE_H
 #define __ASM_ARCH_HARDWARE_H
 
-
 #define CLPS7111_VIRT_BASE	0xff000000
 #define CLPS7111_BASE		CLPS7111_VIRT_BASE
 
+#include <asm/hardware/clps7111.h>
+
 /*
  * The physical addresses that the external chip select signals map to is
  * dependent on the setting of the nMEDCHG signal on EP7211 and EP7212
@@ -69,19 +70,8 @@
 #define SYSPLD_VIRT_BASE	0xfe000000
 #define SYSPLD_BASE		SYSPLD_VIRT_BASE
 
-#if  defined (CONFIG_ARCH_AUTCPU12)
-
-#include <asm/hardware/clps7111.h>
-#include <asm/hardware/ep7212.h>
-
-#endif
-
-
 #if defined (CONFIG_ARCH_CDB89712)
 
-#include <asm/hardware/clps7111.h>
-#include <asm/hardware/ep7212.h>
-
 /* static cdb89712_map_io() areas */
 #define REGISTER_START   0x80000000
 #define REGISTER_SIZE    0x4000
@@ -149,10 +139,6 @@
 
 #if defined (CONFIG_ARCH_CEIVA)
 
-#include <asm/hardware/clps7111.h>
-#include <asm/hardware/ep7212.h>
-
-
 /*
  * The two flash banks are wired to chip selects 0 and 1. This is the mapping
  * for them.
diff --git a/arch/arm/mach-clps711x/include/mach/time.h b/arch/arm/mach-clps711x/include/mach/time.h
index 61fef91..5f65865 100644
--- a/arch/arm/mach-clps711x/include/mach/time.h
+++ b/arch/arm/mach-clps711x/include/mach/time.h
@@ -18,7 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include <asm/leds.h>
-#include <asm/hardware/clps7111.h>
+#include <mach/hardware.h>
 
 extern void clps711x_setup_timer(void);
 
diff --git a/arch/arm/mach-clps711x/include/mach/uncompress.h b/arch/arm/mach-clps711x/include/mach/uncompress.h
index 35ed731..ac42332 100644
--- a/arch/arm/mach-clps711x/include/mach/uncompress.h
+++ b/arch/arm/mach-clps711x/include/mach/uncompress.h
@@ -18,7 +18,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include <mach/hardware.h>
-#include <asm/hardware/clps7111.h>
 
 #undef CLPS7111_BASE
 #define CLPS7111_BASE CLPS7111_PHYS_BASE
diff --git a/arch/arm/mach-clps711x/p720t-leds.c b/arch/arm/mach-clps711x/p720t-leds.c
index dd9a6cd..bbc449f 100644
--- a/arch/arm/mach-clps711x/p720t-leds.c
+++ b/arch/arm/mach-clps711x/p720t-leds.c
@@ -27,9 +27,6 @@
 #include <asm/leds.h>
 #include <asm/mach-types.h>
 
-#include <asm/hardware/clps7111.h>
-#include <asm/hardware/ep7212.h>
-
 static void p720t_leds_event(led_event_t ledevt)
 {
 	unsigned long flags;
diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c
index 836fe273..d0f719f 100644
--- a/drivers/tty/serial/clps711x.c
+++ b/drivers/tty/serial/clps711x.c
@@ -40,7 +40,6 @@
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/hardware/clps7111.h>
 
 #define UART_NR		2
 
diff --git a/drivers/video/clps711xfb.c b/drivers/video/clps711xfb.c
index 99b354b..f994c8b 100644
--- a/drivers/video/clps711xfb.c
+++ b/drivers/video/clps711xfb.c
@@ -33,7 +33,6 @@
 #include <asm/mach-types.h>
 #include <linux/uaccess.h>
 
-#include <asm/hardware/clps7111.h>
 #include <mach/syspld.h>
 
 struct fb_info	*cfb;
-- 
1.7.3.4

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

* [PATCH 08/17] ARM clps711x: Cleanup: remove unused definitions for ep_readl/ep_writel
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21  9:11   ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Alexander Shiyan


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/ep7212.h |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/arch/arm/include/asm/hardware/ep7212.h b/arch/arm/include/asm/hardware/ep7212.h
index 0b1f508..2672291 100644
--- a/arch/arm/include/asm/hardware/ep7212.h
+++ b/arch/arm/include/asm/hardware/ep7212.h
@@ -25,11 +25,6 @@
 
 #define EP7212_PHYS_BASE	(0x80000000)
 
-#ifndef __ASSEMBLY__
-#define ep_readl(off)		__raw_readl(CLPS7111_BASE + (off))
-#define ep_writel(val,off)	__raw_writel(val, CLPS7111_BASE + (off))
-#endif
-
 /*
  * These registers are specific to the EP7212 only
  */
-- 
1.7.3.4


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

* [PATCH 08/17] ARM clps711x: Cleanup: remove unused definitions for ep_readl/ep_writel
@ 2012-04-21  9:11   ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/ep7212.h |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/arch/arm/include/asm/hardware/ep7212.h b/arch/arm/include/asm/hardware/ep7212.h
index 0b1f508..2672291 100644
--- a/arch/arm/include/asm/hardware/ep7212.h
+++ b/arch/arm/include/asm/hardware/ep7212.h
@@ -25,11 +25,6 @@
 
 #define EP7212_PHYS_BASE	(0x80000000)
 
-#ifndef __ASSEMBLY__
-#define ep_readl(off)		__raw_readl(CLPS7111_BASE + (off))
-#define ep_writel(val,off)	__raw_writel(val, CLPS7111_BASE + (off))
-#endif
-
 /*
  * These registers are specific to the EP7212 only
  */
-- 
1.7.3.4

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

* [PATCH 09/17] ARM clps711x: Using a single definition for physical address register
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21  9:11   ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Alexander Shiyan

Using a single definition for the physical address register for all
variants boards clps711x.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/ep7211.h         |    2 --
 arch/arm/include/asm/hardware/ep7212.h         |    2 --
 arch/arm/mach-clps711x/include/mach/hardware.h |    4 ----
 3 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/arch/arm/include/asm/hardware/ep7211.h b/arch/arm/include/asm/hardware/ep7211.h
index 0b09e38..4b3f86b 100644
--- a/arch/arm/include/asm/hardware/ep7211.h
+++ b/arch/arm/include/asm/hardware/ep7211.h
@@ -23,8 +23,6 @@
 #ifndef __ASM_HARDWARE_EP7211_H
 #define __ASM_HARDWARE_EP7211_H
 
-#define EP7211_PHYS_BASE	(0x80000000)
-
 /*
  * XXX miket@bluemug.com: need to introduce EP7211 registers (those not
  * present in 7212) here.
diff --git a/arch/arm/include/asm/hardware/ep7212.h b/arch/arm/include/asm/hardware/ep7212.h
index 2672291..aad07f7 100644
--- a/arch/arm/include/asm/hardware/ep7212.h
+++ b/arch/arm/include/asm/hardware/ep7212.h
@@ -23,8 +23,6 @@
 #ifndef __ASM_HARDWARE_EP7212_H
 #define __ASM_HARDWARE_EP7212_H
 
-#define EP7212_PHYS_BASE	(0x80000000)
-
 /*
  * These registers are specific to the EP7212 only
  */
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index fa9b8f2..50d68c2 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -73,10 +73,6 @@
 #if defined (CONFIG_ARCH_CDB89712)
 
 /* static cdb89712_map_io() areas */
-#define REGISTER_START   0x80000000
-#define REGISTER_SIZE    0x4000
-#define REGISTER_BASE    0xff000000
-
 #define ETHER_START      0x20000000
 #define ETHER_SIZE       0x1000
 #define ETHER_BASE       0xfe000000
-- 
1.7.3.4


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

* [PATCH 09/17] ARM clps711x: Using a single definition for physical address register
@ 2012-04-21  9:11   ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel

Using a single definition for the physical address register for all
variants boards clps711x.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/ep7211.h         |    2 --
 arch/arm/include/asm/hardware/ep7212.h         |    2 --
 arch/arm/mach-clps711x/include/mach/hardware.h |    4 ----
 3 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/arch/arm/include/asm/hardware/ep7211.h b/arch/arm/include/asm/hardware/ep7211.h
index 0b09e38..4b3f86b 100644
--- a/arch/arm/include/asm/hardware/ep7211.h
+++ b/arch/arm/include/asm/hardware/ep7211.h
@@ -23,8 +23,6 @@
 #ifndef __ASM_HARDWARE_EP7211_H
 #define __ASM_HARDWARE_EP7211_H
 
-#define EP7211_PHYS_BASE	(0x80000000)
-
 /*
  * XXX miket at bluemug.com: need to introduce EP7211 registers (those not
  * present in 7212) here.
diff --git a/arch/arm/include/asm/hardware/ep7212.h b/arch/arm/include/asm/hardware/ep7212.h
index 2672291..aad07f7 100644
--- a/arch/arm/include/asm/hardware/ep7212.h
+++ b/arch/arm/include/asm/hardware/ep7212.h
@@ -23,8 +23,6 @@
 #ifndef __ASM_HARDWARE_EP7212_H
 #define __ASM_HARDWARE_EP7212_H
 
-#define EP7212_PHYS_BASE	(0x80000000)
-
 /*
  * These registers are specific to the EP7212 only
  */
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index fa9b8f2..50d68c2 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -73,10 +73,6 @@
 #if defined (CONFIG_ARCH_CDB89712)
 
 /* static cdb89712_map_io() areas */
-#define REGISTER_START   0x80000000
-#define REGISTER_SIZE    0x4000
-#define REGISTER_BASE    0xff000000
-
 #define ETHER_START      0x20000000
 #define ETHER_SIZE       0x1000
 #define ETHER_BASE       0xfe000000
-- 
1.7.3.4

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

* [PATCH 10/17] ARM clps711x: Address register renaming to reflect the fact that the name is the same for all arch
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21  9:11   ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Alexander Shiyan


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/clps7111.h          |    2 +-
 arch/arm/mach-clps711x/common.c                   |    4 ++--
 arch/arm/mach-clps711x/include/mach/debug-macro.S |    4 ++--
 arch/arm/mach-clps711x/include/mach/hardware.h    |    4 ++--
 arch/arm/mach-clps711x/include/mach/uncompress.h  |    2 +-
 drivers/mtd/nand/autcpu12.c                       |    4 ++--
 drivers/mtd/nand/h1910.c                          |    2 +-
 7 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/arch/arm/include/asm/hardware/clps7111.h b/arch/arm/include/asm/hardware/clps7111.h
index 84358d8..b63ed8c 100644
--- a/arch/arm/include/asm/hardware/clps7111.h
+++ b/arch/arm/include/asm/hardware/clps7111.h
@@ -23,7 +23,7 @@
 #ifndef __ASM_HARDWARE_CLPS7111_H
 #define __ASM_HARDWARE_CLPS7111_H
 
-#define CLPS7111_PHYS_BASE	(0x80000000)
+#define CLPS711X_PHYS_BASE	(0x80000000)
 
 #ifndef __ASSEMBLY__
 #define clps_readb(off)		__raw_readb(CLPS7111_BASE + (off))
diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c
index 3544433..3b6e6b8 100644
--- a/arch/arm/mach-clps711x/common.c
+++ b/arch/arm/mach-clps711x/common.c
@@ -43,8 +43,8 @@
  */
 static struct map_desc clps711x_io_desc[] __initdata = {
 	{
-		.virtual	= CLPS7111_VIRT_BASE,
-		.pfn		= __phys_to_pfn(CLPS7111_PHYS_BASE),
+		.virtual	= CLPS711X_VIRT_BASE,
+		.pfn		= __phys_to_pfn(CLPS711X_PHYS_BASE),
 		.length		= SZ_1M,
 		.type		= MT_DEVICE
 	}
diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S
index 15a9036..118b3d9 100644
--- a/arch/arm/mach-clps711x/include/mach/debug-macro.S
+++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S
@@ -19,8 +19,8 @@
 #else
 		mov	\rp, #0x1000	@ UART2
 #endif
-		orr	\rv, \rp, #CLPS7111_VIRT_BASE
-		orr	\rp, \rp, #CLPS7111_PHYS_BASE
+		orr	\rv, \rp, #CLPS711X_VIRT_BASE
+		orr	\rp, \rp, #CLPS711X_PHYS_BASE
 		.endm
 
 		.macro	senduart,rd,rx
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index 50d68c2..f5d8313 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -22,8 +22,8 @@
 #ifndef __ASM_ARCH_HARDWARE_H
 #define __ASM_ARCH_HARDWARE_H
 
-#define CLPS7111_VIRT_BASE	0xff000000
-#define CLPS7111_BASE		CLPS7111_VIRT_BASE
+#define CLPS711X_VIRT_BASE	0xff000000
+#define CLPS7111_BASE		CLPS711X_VIRT_BASE
 
 #include <asm/hardware/clps7111.h>
 
diff --git a/arch/arm/mach-clps711x/include/mach/uncompress.h b/arch/arm/mach-clps711x/include/mach/uncompress.h
index ac42332..bf7b112 100644
--- a/arch/arm/mach-clps711x/include/mach/uncompress.h
+++ b/arch/arm/mach-clps711x/include/mach/uncompress.h
@@ -20,7 +20,7 @@
 #include <mach/hardware.h>
 
 #undef CLPS7111_BASE
-#define CLPS7111_BASE CLPS7111_PHYS_BASE
+#define CLPS7111_BASE CLPS711X_PHYS_BASE
 
 #define __raw_readl(p)		(*(unsigned long *)(p))
 #define __raw_writel(v,p)	(*(unsigned long *)(p) = (v))
diff --git a/drivers/mtd/nand/autcpu12.c b/drivers/mtd/nand/autcpu12.c
index 5bd4107..e78975a 100644
--- a/drivers/mtd/nand/autcpu12.c
+++ b/drivers/mtd/nand/autcpu12.c
@@ -102,7 +102,7 @@ static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd,
 		void __iomem *addr;
 		unsigned char bits;
 
-		addr = CLPS7111_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
+		addr = CLPS711X_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
 		bits = (ctrl & NAND_CLE) << 4;
 		bits |= (ctrl & NAND_ALE) << 2;
 		writeb((readb(addr) & ~0x30) | bits, addr);
@@ -120,7 +120,7 @@ static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd,
  */
 int autcpu12_device_ready(struct mtd_info *mtd)
 {
-	void __iomem *addr = CLPS7111_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
+	void __iomem *addr = CLPS711X_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
 
 	return readb(addr) & AUTCPU12_SMC_RDY;
 }
diff --git a/drivers/mtd/nand/h1910.c b/drivers/mtd/nand/h1910.c
index 11e4878..9bf5ce5 100644
--- a/drivers/mtd/nand/h1910.c
+++ b/drivers/mtd/nand/h1910.c
@@ -24,7 +24,7 @@
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 #include <asm/io.h>
-#include <mach/hardware.h>	/* for CLPS7111_VIRT_BASE */
+#include <mach/hardware.h>
 #include <asm/sizes.h>
 #include <mach/h1900-gpio.h>
 #include <mach/ipaq.h>
-- 
1.7.3.4


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

* [PATCH 10/17] ARM clps711x: Address register renaming to reflect the fact that the name is the same for all arch
@ 2012-04-21  9:11   ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/clps7111.h          |    2 +-
 arch/arm/mach-clps711x/common.c                   |    4 ++--
 arch/arm/mach-clps711x/include/mach/debug-macro.S |    4 ++--
 arch/arm/mach-clps711x/include/mach/hardware.h    |    4 ++--
 arch/arm/mach-clps711x/include/mach/uncompress.h  |    2 +-
 drivers/mtd/nand/autcpu12.c                       |    4 ++--
 drivers/mtd/nand/h1910.c                          |    2 +-
 7 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/arch/arm/include/asm/hardware/clps7111.h b/arch/arm/include/asm/hardware/clps7111.h
index 84358d8..b63ed8c 100644
--- a/arch/arm/include/asm/hardware/clps7111.h
+++ b/arch/arm/include/asm/hardware/clps7111.h
@@ -23,7 +23,7 @@
 #ifndef __ASM_HARDWARE_CLPS7111_H
 #define __ASM_HARDWARE_CLPS7111_H
 
-#define CLPS7111_PHYS_BASE	(0x80000000)
+#define CLPS711X_PHYS_BASE	(0x80000000)
 
 #ifndef __ASSEMBLY__
 #define clps_readb(off)		__raw_readb(CLPS7111_BASE + (off))
diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c
index 3544433..3b6e6b8 100644
--- a/arch/arm/mach-clps711x/common.c
+++ b/arch/arm/mach-clps711x/common.c
@@ -43,8 +43,8 @@
  */
 static struct map_desc clps711x_io_desc[] __initdata = {
 	{
-		.virtual	= CLPS7111_VIRT_BASE,
-		.pfn		= __phys_to_pfn(CLPS7111_PHYS_BASE),
+		.virtual	= CLPS711X_VIRT_BASE,
+		.pfn		= __phys_to_pfn(CLPS711X_PHYS_BASE),
 		.length		= SZ_1M,
 		.type		= MT_DEVICE
 	}
diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S
index 15a9036..118b3d9 100644
--- a/arch/arm/mach-clps711x/include/mach/debug-macro.S
+++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S
@@ -19,8 +19,8 @@
 #else
 		mov	\rp, #0x1000	@ UART2
 #endif
-		orr	\rv, \rp, #CLPS7111_VIRT_BASE
-		orr	\rp, \rp, #CLPS7111_PHYS_BASE
+		orr	\rv, \rp, #CLPS711X_VIRT_BASE
+		orr	\rp, \rp, #CLPS711X_PHYS_BASE
 		.endm
 
 		.macro	senduart,rd,rx
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index 50d68c2..f5d8313 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -22,8 +22,8 @@
 #ifndef __ASM_ARCH_HARDWARE_H
 #define __ASM_ARCH_HARDWARE_H
 
-#define CLPS7111_VIRT_BASE	0xff000000
-#define CLPS7111_BASE		CLPS7111_VIRT_BASE
+#define CLPS711X_VIRT_BASE	0xff000000
+#define CLPS7111_BASE		CLPS711X_VIRT_BASE
 
 #include <asm/hardware/clps7111.h>
 
diff --git a/arch/arm/mach-clps711x/include/mach/uncompress.h b/arch/arm/mach-clps711x/include/mach/uncompress.h
index ac42332..bf7b112 100644
--- a/arch/arm/mach-clps711x/include/mach/uncompress.h
+++ b/arch/arm/mach-clps711x/include/mach/uncompress.h
@@ -20,7 +20,7 @@
 #include <mach/hardware.h>
 
 #undef CLPS7111_BASE
-#define CLPS7111_BASE CLPS7111_PHYS_BASE
+#define CLPS7111_BASE CLPS711X_PHYS_BASE
 
 #define __raw_readl(p)		(*(unsigned long *)(p))
 #define __raw_writel(v,p)	(*(unsigned long *)(p) = (v))
diff --git a/drivers/mtd/nand/autcpu12.c b/drivers/mtd/nand/autcpu12.c
index 5bd4107..e78975a 100644
--- a/drivers/mtd/nand/autcpu12.c
+++ b/drivers/mtd/nand/autcpu12.c
@@ -102,7 +102,7 @@ static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd,
 		void __iomem *addr;
 		unsigned char bits;
 
-		addr = CLPS7111_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
+		addr = CLPS711X_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
 		bits = (ctrl & NAND_CLE) << 4;
 		bits |= (ctrl & NAND_ALE) << 2;
 		writeb((readb(addr) & ~0x30) | bits, addr);
@@ -120,7 +120,7 @@ static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd,
  */
 int autcpu12_device_ready(struct mtd_info *mtd)
 {
-	void __iomem *addr = CLPS7111_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
+	void __iomem *addr = CLPS711X_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET;
 
 	return readb(addr) & AUTCPU12_SMC_RDY;
 }
diff --git a/drivers/mtd/nand/h1910.c b/drivers/mtd/nand/h1910.c
index 11e4878..9bf5ce5 100644
--- a/drivers/mtd/nand/h1910.c
+++ b/drivers/mtd/nand/h1910.c
@@ -24,7 +24,7 @@
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 #include <asm/io.h>
-#include <mach/hardware.h>	/* for CLPS7111_VIRT_BASE */
+#include <mach/hardware.h>
 #include <asm/sizes.h>
 #include <mach/h1900-gpio.h>
 #include <mach/ipaq.h>
-- 
1.7.3.4

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

* [PATCH 11/17] ARM clps711x: Move definitions of register address in one unit
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21  9:11   ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Alexander Shiyan


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/clps7111.h          |   11 -----------
 arch/arm/mach-clps711x/include/mach/entry-macro.S |    2 +-
 arch/arm/mach-clps711x/include/mach/hardware.h    |   15 ++++++++++++---
 arch/arm/mach-clps711x/include/mach/uncompress.h  |    9 ++++-----
 4 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/arch/arm/include/asm/hardware/clps7111.h b/arch/arm/include/asm/hardware/clps7111.h
index b63ed8c..f4a3ac9 100644
--- a/arch/arm/include/asm/hardware/clps7111.h
+++ b/arch/arm/include/asm/hardware/clps7111.h
@@ -23,17 +23,6 @@
 #ifndef __ASM_HARDWARE_CLPS7111_H
 #define __ASM_HARDWARE_CLPS7111_H
 
-#define CLPS711X_PHYS_BASE	(0x80000000)
-
-#ifndef __ASSEMBLY__
-#define clps_readb(off)		__raw_readb(CLPS7111_BASE + (off))
-#define clps_readw(off)		__raw_readw(CLPS7111_BASE + (off))
-#define clps_readl(off)		__raw_readl(CLPS7111_BASE + (off))
-#define clps_writeb(val,off)	__raw_writeb(val, CLPS7111_BASE + (off))
-#define clps_writew(val,off)	__raw_writew(val, CLPS7111_BASE + (off))
-#define clps_writel(val,off)	__raw_writel(val, CLPS7111_BASE + (off))
-#endif
-
 #define PADR		(0x0000)
 #define PBDR		(0x0001)
 #define PCDR		(0x0002)
diff --git a/arch/arm/mach-clps711x/include/mach/entry-macro.S b/arch/arm/mach-clps711x/include/mach/entry-macro.S
index 4ff5e77..56e5c2c 100644
--- a/arch/arm/mach-clps711x/include/mach/entry-macro.S
+++ b/arch/arm/mach-clps711x/include/mach/entry-macro.S
@@ -17,7 +17,7 @@
 #endif
 
 		.macro	get_irqnr_and_base, irqnr, stat, base, mask
-		mov	\base, #CLPS7111_BASE
+		mov	\base, #CLPS711X_VIRT_BASE
 		ldr	\stat, [\base, #INTSR1]
 		ldr	\mask, [\base, #INTMR1]
 		mov	\irqnr, #4
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index f5d8313..495d57b 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -22,11 +22,20 @@
 #ifndef __ASM_ARCH_HARDWARE_H
 #define __ASM_ARCH_HARDWARE_H
 
-#define CLPS711X_VIRT_BASE	0xff000000
-#define CLPS7111_BASE		CLPS711X_VIRT_BASE
-
 #include <asm/hardware/clps7111.h>
 
+#define CLPS711X_PHYS_BASE	(0x80000000)
+#define CLPS711X_VIRT_BASE	(0xff000000)
+
+#ifndef __ASSEMBLY__
+#define clps_readb(off)		__raw_readb(CLPS711X_VIRT_BASE + (off))
+#define clps_readw(off)		__raw_readw(CLPS711X_VIRT_BASE + (off))
+#define clps_readl(off)		__raw_readl(CLPS711X_VIRT_BASE + (off))
+#define clps_writeb(val,off)	__raw_writeb(val, CLPS711X_VIRT_BASE + (off))
+#define clps_writew(val,off)	__raw_writew(val, CLPS711X_VIRT_BASE + (off))
+#define clps_writel(val,off)	__raw_writel(val, CLPS711X_VIRT_BASE + (off))
+#endif
+
 /*
  * The physical addresses that the external chip select signals map to is
  * dependent on the setting of the nMEDCHG signal on EP7211 and EP7212
diff --git a/arch/arm/mach-clps711x/include/mach/uncompress.h b/arch/arm/mach-clps711x/include/mach/uncompress.h
index bf7b112..f0e8a32 100644
--- a/arch/arm/mach-clps711x/include/mach/uncompress.h
+++ b/arch/arm/mach-clps711x/include/mach/uncompress.h
@@ -19,11 +19,10 @@
  */
 #include <mach/hardware.h>
 
-#undef CLPS7111_BASE
-#define CLPS7111_BASE CLPS711X_PHYS_BASE
-
-#define __raw_readl(p)		(*(unsigned long *)(p))
-#define __raw_writel(v,p)	(*(unsigned long *)(p) = (v))
+#undef clps_readl
+#undef clps_writel
+#define clps_readl(p)		(*(unsigned long *)(CLPS711X_PHYS_BASE+p))
+#define clps_writel(v,p)	(*(unsigned long *)(CLPS711X_PHYS_BASE+p) = (v))
 
 #ifdef CONFIG_DEBUG_CLPS711X_UART2
 #define SYSFLGx	SYSFLG2
-- 
1.7.3.4


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

* [PATCH 11/17] ARM clps711x: Move definitions of register address in one unit
@ 2012-04-21  9:11   ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/include/asm/hardware/clps7111.h          |   11 -----------
 arch/arm/mach-clps711x/include/mach/entry-macro.S |    2 +-
 arch/arm/mach-clps711x/include/mach/hardware.h    |   15 ++++++++++++---
 arch/arm/mach-clps711x/include/mach/uncompress.h  |    9 ++++-----
 4 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/arch/arm/include/asm/hardware/clps7111.h b/arch/arm/include/asm/hardware/clps7111.h
index b63ed8c..f4a3ac9 100644
--- a/arch/arm/include/asm/hardware/clps7111.h
+++ b/arch/arm/include/asm/hardware/clps7111.h
@@ -23,17 +23,6 @@
 #ifndef __ASM_HARDWARE_CLPS7111_H
 #define __ASM_HARDWARE_CLPS7111_H
 
-#define CLPS711X_PHYS_BASE	(0x80000000)
-
-#ifndef __ASSEMBLY__
-#define clps_readb(off)		__raw_readb(CLPS7111_BASE + (off))
-#define clps_readw(off)		__raw_readw(CLPS7111_BASE + (off))
-#define clps_readl(off)		__raw_readl(CLPS7111_BASE + (off))
-#define clps_writeb(val,off)	__raw_writeb(val, CLPS7111_BASE + (off))
-#define clps_writew(val,off)	__raw_writew(val, CLPS7111_BASE + (off))
-#define clps_writel(val,off)	__raw_writel(val, CLPS7111_BASE + (off))
-#endif
-
 #define PADR		(0x0000)
 #define PBDR		(0x0001)
 #define PCDR		(0x0002)
diff --git a/arch/arm/mach-clps711x/include/mach/entry-macro.S b/arch/arm/mach-clps711x/include/mach/entry-macro.S
index 4ff5e77..56e5c2c 100644
--- a/arch/arm/mach-clps711x/include/mach/entry-macro.S
+++ b/arch/arm/mach-clps711x/include/mach/entry-macro.S
@@ -17,7 +17,7 @@
 #endif
 
 		.macro	get_irqnr_and_base, irqnr, stat, base, mask
-		mov	\base, #CLPS7111_BASE
+		mov	\base, #CLPS711X_VIRT_BASE
 		ldr	\stat, [\base, #INTSR1]
 		ldr	\mask, [\base, #INTMR1]
 		mov	\irqnr, #4
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index f5d8313..495d57b 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -22,11 +22,20 @@
 #ifndef __ASM_ARCH_HARDWARE_H
 #define __ASM_ARCH_HARDWARE_H
 
-#define CLPS711X_VIRT_BASE	0xff000000
-#define CLPS7111_BASE		CLPS711X_VIRT_BASE
-
 #include <asm/hardware/clps7111.h>
 
+#define CLPS711X_PHYS_BASE	(0x80000000)
+#define CLPS711X_VIRT_BASE	(0xff000000)
+
+#ifndef __ASSEMBLY__
+#define clps_readb(off)		__raw_readb(CLPS711X_VIRT_BASE + (off))
+#define clps_readw(off)		__raw_readw(CLPS711X_VIRT_BASE + (off))
+#define clps_readl(off)		__raw_readl(CLPS711X_VIRT_BASE + (off))
+#define clps_writeb(val,off)	__raw_writeb(val, CLPS711X_VIRT_BASE + (off))
+#define clps_writew(val,off)	__raw_writew(val, CLPS711X_VIRT_BASE + (off))
+#define clps_writel(val,off)	__raw_writel(val, CLPS711X_VIRT_BASE + (off))
+#endif
+
 /*
  * The physical addresses that the external chip select signals map to is
  * dependent on the setting of the nMEDCHG signal on EP7211 and EP7212
diff --git a/arch/arm/mach-clps711x/include/mach/uncompress.h b/arch/arm/mach-clps711x/include/mach/uncompress.h
index bf7b112..f0e8a32 100644
--- a/arch/arm/mach-clps711x/include/mach/uncompress.h
+++ b/arch/arm/mach-clps711x/include/mach/uncompress.h
@@ -19,11 +19,10 @@
  */
 #include <mach/hardware.h>
 
-#undef CLPS7111_BASE
-#define CLPS7111_BASE CLPS711X_PHYS_BASE
-
-#define __raw_readl(p)		(*(unsigned long *)(p))
-#define __raw_writel(v,p)	(*(unsigned long *)(p) = (v))
+#undef clps_readl
+#undef clps_writel
+#define clps_readl(p)		(*(unsigned long *)(CLPS711X_PHYS_BASE+p))
+#define clps_writel(v,p)	(*(unsigned long *)(CLPS711X_PHYS_BASE+p) = (v))
 
 #ifdef CONFIG_DEBUG_CLPS711X_UART2
 #define SYSFLGx	SYSFLG2
-- 
1.7.3.4

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

* [PATCH 12/17] ARM clps711x: Simple optimise debug_macro by removing one NOP
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21  9:11   ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Alexander Shiyan


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/include/mach/debug-macro.S |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S
index 118b3d9..37c4d8a 100644
--- a/arch/arm/mach-clps711x/include/mach/debug-macro.S
+++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S
@@ -14,10 +14,8 @@
 #include <mach/hardware.h>
 
 		.macro	addruart, rp, rv, tmp
-#ifndef CONFIG_DEBUG_CLPS711X_UART2
-		mov	\rp, #0x0000	@ UART1
-#else
-		mov	\rp, #0x1000	@ UART2
+#ifdef CONFIG_DEBUG_CLPS711X_UART2
+		mov	\rp, #0x1000	@ Add offset for UART2 base reg
 #endif
 		orr	\rv, \rp, #CLPS711X_VIRT_BASE
 		orr	\rp, \rp, #CLPS711X_PHYS_BASE
-- 
1.7.3.4


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

* [PATCH 12/17] ARM clps711x: Simple optimise debug_macro by removing one NOP
@ 2012-04-21  9:11   ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/include/mach/debug-macro.S |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S
index 118b3d9..37c4d8a 100644
--- a/arch/arm/mach-clps711x/include/mach/debug-macro.S
+++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S
@@ -14,10 +14,8 @@
 #include <mach/hardware.h>
 
 		.macro	addruart, rp, rv, tmp
-#ifndef CONFIG_DEBUG_CLPS711X_UART2
-		mov	\rp, #0x0000	@ UART1
-#else
-		mov	\rp, #0x1000	@ UART2
+#ifdef CONFIG_DEBUG_CLPS711X_UART2
+		mov	\rp, #0x1000	@ Add offset for UART2 base reg
 #endif
 		orr	\rv, \rp, #CLPS711X_VIRT_BASE
 		orr	\rp, \rp, #CLPS711X_PHYS_BASE
-- 
1.7.3.4

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

* [PATCH 13/17] ARM clps711x: Removed unused header mach/time.h
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21  9:11   ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Alexander Shiyan

All functions from this header already provided by common.c

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/include/mach/time.h |   49 ----------------------------
 1 files changed, 0 insertions(+), 49 deletions(-)
 delete mode 100644 arch/arm/mach-clps711x/include/mach/time.h

diff --git a/arch/arm/mach-clps711x/include/mach/time.h b/arch/arm/mach-clps711x/include/mach/time.h
deleted file mode 100644
index 5f65865..0000000
--- a/arch/arm/mach-clps711x/include/mach/time.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *  arch/arm/mach-clps711x/include/mach/time.h
- *
- *  Copyright (C) 2000 Deep Blue Solutions Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#include <asm/leds.h>
-#include <mach/hardware.h>
-
-extern void clps711x_setup_timer(void);
-
-/*
- * IRQ handler for the timer
- */
-static irqreturn_t
-p720t_timer_interrupt(int irq, void *dev_id)
-{
-	struct pt_regs *regs = get_irq_regs();
-	do_leds();
-	xtime_update(1);
-#ifndef CONFIG_SMP
-	update_process_times(user_mode(regs));
-#endif
-	do_profile(regs);
-	return IRQ_HANDLED;
-}
-
-/*
- * Set up timer interrupt, and return the current time in seconds.
- */
-void __init time_init(void)
-{
-	clps711x_setup_timer();
-	timer_irq.handler = p720t_timer_interrupt;
-	setup_irq(IRQ_TC2OI, &timer_irq);
-}
-- 
1.7.3.4


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

* [PATCH 13/17] ARM clps711x: Removed unused header mach/time.h
@ 2012-04-21  9:11   ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel

All functions from this header already provided by common.c

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/include/mach/time.h |   49 ----------------------------
 1 files changed, 0 insertions(+), 49 deletions(-)
 delete mode 100644 arch/arm/mach-clps711x/include/mach/time.h

diff --git a/arch/arm/mach-clps711x/include/mach/time.h b/arch/arm/mach-clps711x/include/mach/time.h
deleted file mode 100644
index 5f65865..0000000
--- a/arch/arm/mach-clps711x/include/mach/time.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *  arch/arm/mach-clps711x/include/mach/time.h
- *
- *  Copyright (C) 2000 Deep Blue Solutions Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#include <asm/leds.h>
-#include <mach/hardware.h>
-
-extern void clps711x_setup_timer(void);
-
-/*
- * IRQ handler for the timer
- */
-static irqreturn_t
-p720t_timer_interrupt(int irq, void *dev_id)
-{
-	struct pt_regs *regs = get_irq_regs();
-	do_leds();
-	xtime_update(1);
-#ifndef CONFIG_SMP
-	update_process_times(user_mode(regs));
-#endif
-	do_profile(regs);
-	return IRQ_HANDLED;
-}
-
-/*
- * Set up timer interrupt, and return the current time in seconds.
- */
-void __init time_init(void)
-{
-	clps711x_setup_timer();
-	timer_irq.handler = p720t_timer_interrupt;
-	setup_irq(IRQ_TC2OI, &timer_irq);
-}
-- 
1.7.3.4

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

* [PATCH 14/17] ARM clps711x: Do not mask interrupts in ack procedure
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21  9:11   ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Alexander Shiyan

We have separate intX_mask procedure for it.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/common.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c
index 3b6e6b8..b19fa92 100644
--- a/arch/arm/mach-clps711x/common.c
+++ b/arch/arm/mach-clps711x/common.c
@@ -66,12 +66,6 @@ static void int1_mask(struct irq_data *d)
 
 static void int1_ack(struct irq_data *d)
 {
-	u32 intmr1;
-
-	intmr1 = clps_readl(INTMR1);
-	intmr1 &= ~(1 << d->irq);
-	clps_writel(intmr1, INTMR1);
-
 	switch (d->irq) {
 	case IRQ_CSINT:  clps_writel(0, COEOI);  break;
 	case IRQ_TC1OI:  clps_writel(0, TC1EOI); break;
@@ -108,12 +102,6 @@ static void int2_mask(struct irq_data *d)
 
 static void int2_ack(struct irq_data *d)
 {
-	u32 intmr2;
-
-	intmr2 = clps_readl(INTMR2);
-	intmr2 &= ~(1 << (d->irq - 16));
-	clps_writel(intmr2, INTMR2);
-
 	switch (d->irq) {
 	case IRQ_KBDINT: clps_writel(0, KBDEOI); break;
 	}
-- 
1.7.3.4


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

* [PATCH 14/17] ARM clps711x: Do not mask interrupts in ack procedure
@ 2012-04-21  9:11   ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel

We have separate intX_mask procedure for it.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/common.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c
index 3b6e6b8..b19fa92 100644
--- a/arch/arm/mach-clps711x/common.c
+++ b/arch/arm/mach-clps711x/common.c
@@ -66,12 +66,6 @@ static void int1_mask(struct irq_data *d)
 
 static void int1_ack(struct irq_data *d)
 {
-	u32 intmr1;
-
-	intmr1 = clps_readl(INTMR1);
-	intmr1 &= ~(1 << d->irq);
-	clps_writel(intmr1, INTMR1);
-
 	switch (d->irq) {
 	case IRQ_CSINT:  clps_writel(0, COEOI);  break;
 	case IRQ_TC1OI:  clps_writel(0, TC1EOI); break;
@@ -108,12 +102,6 @@ static void int2_mask(struct irq_data *d)
 
 static void int2_ack(struct irq_data *d)
 {
-	u32 intmr2;
-
-	intmr2 = clps_readl(INTMR2);
-	intmr2 &= ~(1 << (d->irq - 16));
-	clps_writel(intmr2, INTMR2);
-
 	switch (d->irq) {
 	case IRQ_KBDINT: clps_writel(0, KBDEOI); break;
 	}
-- 
1.7.3.4

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

* [PATCH 15/17] ARM clps711x: Removed unused definitions from mach/irqs.h
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21  9:11   ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Alexander Shiyan


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/include/mach/irqs.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-clps711x/include/mach/irqs.h b/arch/arm/mach-clps711x/include/mach/irqs.h
index 30b7e97..3e0c341 100644
--- a/arch/arm/mach-clps711x/include/mach/irqs.h
+++ b/arch/arm/mach-clps711x/include/mach/irqs.h
@@ -35,7 +35,6 @@
 #define IRQ_SSEOTI			15
 
 #define INT1_IRQS			(0x0000fff0)
-#define INT1_ACK_IRQS			(0x00004f10)
 
 /*
  * Interrupts from INTSR2
@@ -47,7 +46,6 @@
 #define IRQ_URXINT2			(16+13)	/* bit 13 */
 
 #define INT2_IRQS			(0x30070000)
-#define INT2_ACK_IRQS			(0x00010000)
 
 #define NR_IRQS                         30
 
-- 
1.7.3.4


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

* [PATCH 15/17] ARM clps711x: Removed unused definitions from mach/irqs.h
@ 2012-04-21  9:11   ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/include/mach/irqs.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-clps711x/include/mach/irqs.h b/arch/arm/mach-clps711x/include/mach/irqs.h
index 30b7e97..3e0c341 100644
--- a/arch/arm/mach-clps711x/include/mach/irqs.h
+++ b/arch/arm/mach-clps711x/include/mach/irqs.h
@@ -35,7 +35,6 @@
 #define IRQ_SSEOTI			15
 
 #define INT1_IRQS			(0x0000fff0)
-#define INT1_ACK_IRQS			(0x00004f10)
 
 /*
  * Interrupts from INTSR2
@@ -47,7 +46,6 @@
 #define IRQ_URXINT2			(16+13)	/* bit 13 */
 
 #define INT2_IRQS			(0x30070000)
-#define INT2_ACK_IRQS			(0x00010000)
 
 #define NR_IRQS                         30
 
-- 
1.7.3.4

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

* [PATCH 16/17] ARM clps711x: Replaced frequency settings to definition
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21  9:11   ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Alexander Shiyan

Some CPUs from CLPS711X-line can operate at frequencies other than 73 MHz.
Added calculation of system clock frequency and the frequency of UART,
depending on processor speed.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/include/mach/hardware.h |    4 ++++
 arch/arm/mach-clps711x/include/mach/timex.h    |    4 +++-
 drivers/tty/serial/clps711x.c                  |    4 ++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index 495d57b..acaf777 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -24,6 +24,10 @@
 
 #include <asm/hardware/clps7111.h>
 
+#define CPU_SPEED		(73728000)
+#define CPU_BUS_SPEED		(CPU_SPEED / 2)
+#define UART_BAUD_BASE		(CPU_BUS_SPEED / 10)
+
 #define CLPS711X_PHYS_BASE	(0x80000000)
 #define CLPS711X_VIRT_BASE	(0xff000000)
 
diff --git a/arch/arm/mach-clps711x/include/mach/timex.h b/arch/arm/mach-clps711x/include/mach/timex.h
index ac8823c..56f5ecf 100644
--- a/arch/arm/mach-clps711x/include/mach/timex.h
+++ b/arch/arm/mach-clps711x/include/mach/timex.h
@@ -20,4 +20,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#define CLOCK_TICK_RATE 512000
+#include <mach/hardware.h>
+
+#define CLOCK_TICK_RATE	(CPU_SPEED / 144)
diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c
index d0f719f..bae678d 100644
--- a/drivers/tty/serial/clps711x.c
+++ b/drivers/tty/serial/clps711x.c
@@ -401,7 +401,7 @@ static struct uart_port clps711x_ports[UART_NR] = {
 	{
 		.iobase		= SYSCON1,
 		.irq		= IRQ_UTXINT1, /* IRQ_URXINT1, IRQ_UMSINT */
-		.uartclk	= 3686400,
+		.uartclk	= UART_BAUD_BASE,
 		.fifosize	= 16,
 		.ops		= &clps711x_pops,
 		.line		= 0,
@@ -410,7 +410,7 @@ static struct uart_port clps711x_ports[UART_NR] = {
 	{
 		.iobase		= SYSCON2,
 		.irq		= IRQ_UTXINT2, /* IRQ_URXINT2 */
-		.uartclk	= 3686400,
+		.uartclk	= UART_BAUD_BASE,
 		.fifosize	= 16,
 		.ops		= &clps711x_pops,
 		.line		= 1,
-- 
1.7.3.4


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

* [PATCH 16/17] ARM clps711x: Replaced frequency settings to definition
@ 2012-04-21  9:11   ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel

Some CPUs from CLPS711X-line can operate at frequencies other than 73 MHz.
Added calculation of system clock frequency and the frequency of UART,
depending on processor speed.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/include/mach/hardware.h |    4 ++++
 arch/arm/mach-clps711x/include/mach/timex.h    |    4 +++-
 drivers/tty/serial/clps711x.c                  |    4 ++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index 495d57b..acaf777 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -24,6 +24,10 @@
 
 #include <asm/hardware/clps7111.h>
 
+#define CPU_SPEED		(73728000)
+#define CPU_BUS_SPEED		(CPU_SPEED / 2)
+#define UART_BAUD_BASE		(CPU_BUS_SPEED / 10)
+
 #define CLPS711X_PHYS_BASE	(0x80000000)
 #define CLPS711X_VIRT_BASE	(0xff000000)
 
diff --git a/arch/arm/mach-clps711x/include/mach/timex.h b/arch/arm/mach-clps711x/include/mach/timex.h
index ac8823c..56f5ecf 100644
--- a/arch/arm/mach-clps711x/include/mach/timex.h
+++ b/arch/arm/mach-clps711x/include/mach/timex.h
@@ -20,4 +20,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#define CLOCK_TICK_RATE 512000
+#include <mach/hardware.h>
+
+#define CLOCK_TICK_RATE	(CPU_SPEED / 144)
diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c
index d0f719f..bae678d 100644
--- a/drivers/tty/serial/clps711x.c
+++ b/drivers/tty/serial/clps711x.c
@@ -401,7 +401,7 @@ static struct uart_port clps711x_ports[UART_NR] = {
 	{
 		.iobase		= SYSCON1,
 		.irq		= IRQ_UTXINT1, /* IRQ_URXINT1, IRQ_UMSINT */
-		.uartclk	= 3686400,
+		.uartclk	= UART_BAUD_BASE,
 		.fifosize	= 16,
 		.ops		= &clps711x_pops,
 		.line		= 0,
@@ -410,7 +410,7 @@ static struct uart_port clps711x_ports[UART_NR] = {
 	{
 		.iobase		= SYSCON2,
 		.irq		= IRQ_UTXINT2, /* IRQ_URXINT2 */
-		.uartclk	= 3686400,
+		.uartclk	= UART_BAUD_BASE,
 		.fifosize	= 16,
 		.ops		= &clps711x_pops,
 		.line		= 1,
-- 
1.7.3.4

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

* [PATCH 17/17] ARM clps711x: Make select CPU spees as KConfig option
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21  9:11   ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Alexander Shiyan


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/Kconfig                 |    4 ++++
 arch/arm/mach-clps711x/include/mach/hardware.h |    3 +--
 arch/arm/mach-clps711x/include/mach/timex.h    |    2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index 28ac4d6..aeb7ec2 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -61,6 +61,10 @@ config ARCH_FORTUNET
 	bool "FORTUNET"
 	select SOC_EP7312
 
+config EP72XX_CPU_SPEED
+	int "CPU frequency"
+	default 73728000
+
 config EP72XX_ROM_BOOT
 	bool "EP72xx ROM boot"
 	depends on SOC_EP7211 || SOC_EP7212 || SOC_EP7312
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index acaf777..b234922 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -24,8 +24,7 @@
 
 #include <asm/hardware/clps7111.h>
 
-#define CPU_SPEED		(73728000)
-#define CPU_BUS_SPEED		(CPU_SPEED / 2)
+#define CPU_BUS_SPEED		(CONFIG_EP72XX_CPU_SPEED / 2)
 #define UART_BAUD_BASE		(CPU_BUS_SPEED / 10)
 
 #define CLPS711X_PHYS_BASE	(0x80000000)
diff --git a/arch/arm/mach-clps711x/include/mach/timex.h b/arch/arm/mach-clps711x/include/mach/timex.h
index 56f5ecf..d558e71 100644
--- a/arch/arm/mach-clps711x/include/mach/timex.h
+++ b/arch/arm/mach-clps711x/include/mach/timex.h
@@ -22,4 +22,4 @@
 
 #include <mach/hardware.h>
 
-#define CLOCK_TICK_RATE	(CPU_SPEED / 144)
+#define CLOCK_TICK_RATE	(CONFIG_EP72XX_CPU_SPEED / 144)
-- 
1.7.3.4


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

* [PATCH 17/17] ARM clps711x: Make select CPU spees as KConfig option
@ 2012-04-21  9:11   ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21  9:11 UTC (permalink / raw)
  To: linux-arm-kernel


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/Kconfig                 |    4 ++++
 arch/arm/mach-clps711x/include/mach/hardware.h |    3 +--
 arch/arm/mach-clps711x/include/mach/timex.h    |    2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index 28ac4d6..aeb7ec2 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -61,6 +61,10 @@ config ARCH_FORTUNET
 	bool "FORTUNET"
 	select SOC_EP7312
 
+config EP72XX_CPU_SPEED
+	int "CPU frequency"
+	default 73728000
+
 config EP72XX_ROM_BOOT
 	bool "EP72xx ROM boot"
 	depends on SOC_EP7211 || SOC_EP7212 || SOC_EP7312
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index acaf777..b234922 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -24,8 +24,7 @@
 
 #include <asm/hardware/clps7111.h>
 
-#define CPU_SPEED		(73728000)
-#define CPU_BUS_SPEED		(CPU_SPEED / 2)
+#define CPU_BUS_SPEED		(CONFIG_EP72XX_CPU_SPEED / 2)
 #define UART_BAUD_BASE		(CPU_BUS_SPEED / 10)
 
 #define CLPS711X_PHYS_BASE	(0x80000000)
diff --git a/arch/arm/mach-clps711x/include/mach/timex.h b/arch/arm/mach-clps711x/include/mach/timex.h
index 56f5ecf..d558e71 100644
--- a/arch/arm/mach-clps711x/include/mach/timex.h
+++ b/arch/arm/mach-clps711x/include/mach/timex.h
@@ -22,4 +22,4 @@
 
 #include <mach/hardware.h>
 
-#define CLOCK_TICK_RATE	(CPU_SPEED / 144)
+#define CLOCK_TICK_RATE	(CONFIG_EP72XX_CPU_SPEED / 144)
-- 
1.7.3.4

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

* Re: [PATCH 12/17] ARM clps711x: Simple optimise debug_macro by removing one NOP
  2012-04-21  9:11   ` Alexander Shiyan
@ 2012-04-21 10:46     ` Russell King - ARM Linux
  -1 siblings, 0 replies; 66+ messages in thread
From: Russell King - ARM Linux @ 2012-04-21 10:46 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: linux-arm-kernel, linux-kernel

On Sat, Apr 21, 2012 at 01:11:25PM +0400, Alexander Shiyan wrote:
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  arch/arm/mach-clps711x/include/mach/debug-macro.S |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S
> index 118b3d9..37c4d8a 100644
> --- a/arch/arm/mach-clps711x/include/mach/debug-macro.S
> +++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S
> @@ -14,10 +14,8 @@
>  #include <mach/hardware.h>
>  
>  		.macro	addruart, rp, rv, tmp
> -#ifndef CONFIG_DEBUG_CLPS711X_UART2
> -		mov	\rp, #0x0000	@ UART1
> -#else
> -		mov	\rp, #0x1000	@ UART2
> +#ifdef CONFIG_DEBUG_CLPS711X_UART2
> +		mov	\rp, #0x1000	@ Add offset for UART2 base reg
>  #endif

This looks wrong.  How is rp initialized if CONFIG_DEBUG_CLPS711X_UART2 is
not set?

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

* [PATCH 12/17] ARM clps711x: Simple optimise debug_macro by removing one NOP
@ 2012-04-21 10:46     ` Russell King - ARM Linux
  0 siblings, 0 replies; 66+ messages in thread
From: Russell King - ARM Linux @ 2012-04-21 10:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Apr 21, 2012 at 01:11:25PM +0400, Alexander Shiyan wrote:
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  arch/arm/mach-clps711x/include/mach/debug-macro.S |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S
> index 118b3d9..37c4d8a 100644
> --- a/arch/arm/mach-clps711x/include/mach/debug-macro.S
> +++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S
> @@ -14,10 +14,8 @@
>  #include <mach/hardware.h>
>  
>  		.macro	addruart, rp, rv, tmp
> -#ifndef CONFIG_DEBUG_CLPS711X_UART2
> -		mov	\rp, #0x0000	@ UART1
> -#else
> -		mov	\rp, #0x1000	@ UART2
> +#ifdef CONFIG_DEBUG_CLPS711X_UART2
> +		mov	\rp, #0x1000	@ Add offset for UART2 base reg
>  #endif

This looks wrong.  How is rp initialized if CONFIG_DEBUG_CLPS711X_UART2 is
not set?

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

* Re[2]: [PATCH 12/17] ARM clps711x: Simple optimise debug_macro by removing one NOP
  2012-04-21 10:46     ` Russell King - ARM Linux
@ 2012-04-21 10:50       ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21 10:50 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: linux-arm-kernel, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 1223 bytes --]

Sat, 21 Apr 2012 11:46:27 +0100 от Russell King - ARM Linux <linux@arm.linux.org.uk>:
> On Sat, Apr 21, 2012 at 01:11:25PM +0400, Alexander Shiyan wrote:
> > 
> > Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> > ---
> >  arch/arm/mach-clps711x/include/mach/debug-macro.S |    6 ++----
> >  1 files changed, 2 insertions(+), 4 deletions(-)
> > 
> > diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S
> > index 118b3d9..37c4d8a 100644
> > --- a/arch/arm/mach-clps711x/include/mach/debug-macro.S
> > +++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S
> > @@ -14,10 +14,8 @@
> >  #include <mach/hardware.h>
> >  
> >  		.macro	addruart, rp, rv, tmp
> > -#ifndef CONFIG_DEBUG_CLPS711X_UART2
> > -		mov	\rp, #0x0000	@ UART1
> > -#else
> > -		mov	\rp, #0x1000	@ UART2
> > +#ifdef CONFIG_DEBUG_CLPS711X_UART2
> > +		mov	\rp, #0x1000	@ Add offset for UART2 base reg
> >  #endif
> 
> This looks wrong.  How is rp initialized if CONFIG_DEBUG_CLPS711X_UART2 is
> not set?
You are right. My mistake.ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re[2]: [PATCH 12/17] ARM clps711x: Simple optimise debug_macro by removing one NOP
@ 2012-04-21 10:50       ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21 10:50 UTC (permalink / raw)
  To: linux-arm-kernel

Sat, 21 Apr 2012 11:46:27 +0100 ?? Russell King - ARM Linux <linux@arm.linux.org.uk>:
> On Sat, Apr 21, 2012 at 01:11:25PM +0400, Alexander Shiyan wrote:
> > 
> > Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> > ---
> >  arch/arm/mach-clps711x/include/mach/debug-macro.S |    6 ++----
> >  1 files changed, 2 insertions(+), 4 deletions(-)
> > 
> > diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S
> > index 118b3d9..37c4d8a 100644
> > --- a/arch/arm/mach-clps711x/include/mach/debug-macro.S
> > +++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S
> > @@ -14,10 +14,8 @@
> >  #include <mach/hardware.h>
> >  
> >  		.macro	addruart, rp, rv, tmp
> > -#ifndef CONFIG_DEBUG_CLPS711X_UART2
> > -		mov	\rp, #0x0000	@ UART1
> > -#else
> > -		mov	\rp, #0x1000	@ UART2
> > +#ifdef CONFIG_DEBUG_CLPS711X_UART2
> > +		mov	\rp, #0x1000	@ Add offset for UART2 base reg
> >  #endif
> 
> This looks wrong.  How is rp initialized if CONFIG_DEBUG_CLPS711X_UART2 is
> not set?
You are right. My mistake.

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

* Re: [PATCH 12/17] ARM clps711x: Simple optimise debug_macro by removing one NOP
  2012-04-21  9:11   ` Alexander Shiyan
@ 2012-04-21 11:18     ` Arnd Bergmann
  -1 siblings, 0 replies; 66+ messages in thread
From: Arnd Bergmann @ 2012-04-21 11:18 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Alexander Shiyan, Russell King, linux-kernel

On Saturday 21 April 2012, Alexander Shiyan wrote:
> 
>                 .macro  addruart, rp, rv, tmp
> -#ifndef CONFIG_DEBUG_CLPS711X_UART2
> -               mov     \rp, #0x0000    @ UART1
> -#else
> -               mov     \rp, #0x1000    @ UART2
> +#ifdef CONFIG_DEBUG_CLPS711X_UART2
> +               mov     \rp, #0x1000    @ Add offset for UART2 base reg
>  #endif
>                 orr     \rv, \rp, #CLPS711X_VIRT_BASE
>                 orr     \rp, \rp, #CLPS711X_PHYS_BASE

This looks wrong at first sight. Is rp guaranteed to be zero when calling
the macro? Am I misreading this? Sorry my ARM assembly skill is still horrible.

	Arnd

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

* [PATCH 12/17] ARM clps711x: Simple optimise debug_macro by removing one NOP
@ 2012-04-21 11:18     ` Arnd Bergmann
  0 siblings, 0 replies; 66+ messages in thread
From: Arnd Bergmann @ 2012-04-21 11:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Saturday 21 April 2012, Alexander Shiyan wrote:
> 
>                 .macro  addruart, rp, rv, tmp
> -#ifndef CONFIG_DEBUG_CLPS711X_UART2
> -               mov     \rp, #0x0000    @ UART1
> -#else
> -               mov     \rp, #0x1000    @ UART2
> +#ifdef CONFIG_DEBUG_CLPS711X_UART2
> +               mov     \rp, #0x1000    @ Add offset for UART2 base reg
>  #endif
>                 orr     \rv, \rp, #CLPS711X_VIRT_BASE
>                 orr     \rp, \rp, #CLPS711X_PHYS_BASE

This looks wrong at first sight. Is rp guaranteed to be zero when calling
the macro? Am I misreading this? Sorry my ARM assembly skill is still horrible.

	Arnd

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

* Re: [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
  2012-04-21  9:11   ` Alexander Shiyan
@ 2012-04-21 11:21     ` Arnd Bergmann
  -1 siblings, 0 replies; 66+ messages in thread
From: Arnd Bergmann @ 2012-04-21 11:21 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Alexander Shiyan, Russell King, linux-kernel

On Saturday 21 April 2012, Alexander Shiyan wrote:
> 
> Added register definitions specific to EP7312 and the necessary
> configuration options.
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  arch/arm/include/asm/hardware/ep7312.h         |  106 ++++++++++++++++++++++++
>  arch/arm/mach-clps711x/Kconfig                 |    9 ++-
>  arch/arm/mach-clps711x/include/mach/hardware.h |    4 +
>  drivers/net/irda/Kconfig                       |    3 +-
>  4 files changed, 119 insertions(+), 3 deletions(-)
>  create mode 100644 arch/arm/include/asm/hardware/ep7312.h

I'm missing some historical background here. Why are these files in asm/hardware
rather than in mach/? Should we move them to the platform directory?

	Arnd

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

* [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
@ 2012-04-21 11:21     ` Arnd Bergmann
  0 siblings, 0 replies; 66+ messages in thread
From: Arnd Bergmann @ 2012-04-21 11:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Saturday 21 April 2012, Alexander Shiyan wrote:
> 
> Added register definitions specific to EP7312 and the necessary
> configuration options.
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  arch/arm/include/asm/hardware/ep7312.h         |  106 ++++++++++++++++++++++++
>  arch/arm/mach-clps711x/Kconfig                 |    9 ++-
>  arch/arm/mach-clps711x/include/mach/hardware.h |    4 +
>  drivers/net/irda/Kconfig                       |    3 +-
>  4 files changed, 119 insertions(+), 3 deletions(-)
>  create mode 100644 arch/arm/include/asm/hardware/ep7312.h

I'm missing some historical background here. Why are these files in asm/hardware
rather than in mach/? Should we move them to the platform directory?

	Arnd

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

* Re[2]: [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
  2012-04-21 11:21     ` Arnd Bergmann
@ 2012-04-21 11:30       ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21 11:30 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-arm-kernel, Russell King, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 1210 bytes --]

Sat, 21 Apr 2012 11:21:49 +0000 от Arnd Bergmann <arnd@arndb.de>:
> On Saturday 21 April 2012, Alexander Shiyan wrote:
> > 
> > Added register definitions specific to EP7312 and the necessary
> > configuration options.
> > 
> > Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> > ---
> >  arch/arm/include/asm/hardware/ep7312.h         |  106 ++++++++++++++++++++++++
> >  arch/arm/mach-clps711x/Kconfig                 |    9 ++-
> >  arch/arm/mach-clps711x/include/mach/hardware.h |    4 +
> >  drivers/net/irda/Kconfig                       |    3 +-
> >  4 files changed, 119 insertions(+), 3 deletions(-)
> >  create mode 100644 arch/arm/include/asm/hardware/ep7312.h
> 
> I'm missing some historical background here. Why are these files in asm/hardware
> rather than in mach/? Should we move them to the platform directory?

I just placed this header into current place for this cpu.
Of course it can be moved (with others) into platform directory.
I can do other patch for this operation later. For this patch I think it is not important.ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re[2]: [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
@ 2012-04-21 11:30       ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21 11:30 UTC (permalink / raw)
  To: linux-arm-kernel

Sat, 21 Apr 2012 11:21:49 +0000 ?? Arnd Bergmann <arnd@arndb.de>:
> On Saturday 21 April 2012, Alexander Shiyan wrote:
> > 
> > Added register definitions specific to EP7312 and the necessary
> > configuration options.
> > 
> > Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> > ---
> >  arch/arm/include/asm/hardware/ep7312.h         |  106 ++++++++++++++++++++++++
> >  arch/arm/mach-clps711x/Kconfig                 |    9 ++-
> >  arch/arm/mach-clps711x/include/mach/hardware.h |    4 +
> >  drivers/net/irda/Kconfig                       |    3 +-
> >  4 files changed, 119 insertions(+), 3 deletions(-)
> >  create mode 100644 arch/arm/include/asm/hardware/ep7312.h
> 
> I'm missing some historical background here. Why are these files in asm/hardware
> rather than in mach/? Should we move them to the platform directory?

I just placed this header into current place for this cpu.
Of course it can be moved (with others) into platform directory.
I can do other patch for this operation later. For this patch I think it is not important.

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

* Re: clps711x patchset
  2012-04-21  9:11 ` Alexander Shiyan
@ 2012-04-21 11:40   ` Arnd Bergmann
  -1 siblings, 0 replies; 66+ messages in thread
From: Arnd Bergmann @ 2012-04-21 11:40 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Alexander Shiyan, Russell King, linux-kernel

On Saturday 21 April 2012, Alexander Shiyan wrote:
> Hello.
> This is patchset contains some cleanups and tricks for CLPS711X ARM target.
> Please review and apply it to kernel tree. Comments are welcome :)

Hi Alexander,

This looks very nice overall, it's certainly good that you can manage to add
support for a new soc with a net removal of lines.

Note that with the current work split, it will be Olof and me who apply
these patches in the end, not Russell, although he will probably have
to something to say about the patches, too, since he has done almost all the
changes to this platform in its more active times.

>From my reading of the git history, very little has happened in clps711x
since about 2005, and we've never had a subarch maintainer for it. Are you
interested in becoming the maintainer for it, or is this more a one-time
effort on your side? I don't expect this to be much work for you, but it
would be nice to have some person that can review the occasional patch
touching multiple platforms.

Do you have any plans to add more stuff to the platform, like additional
SoCs or more board files? Do you see value in having it included in
a single kernel image that runs on various different ARMv4/ARMv5 based
Socs? I assume that the answer to all of these is 'no', but you plan
to do them, we should talk about how to make that happen.

	Arnd

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

* clps711x patchset
@ 2012-04-21 11:40   ` Arnd Bergmann
  0 siblings, 0 replies; 66+ messages in thread
From: Arnd Bergmann @ 2012-04-21 11:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Saturday 21 April 2012, Alexander Shiyan wrote:
> Hello.
> This is patchset contains some cleanups and tricks for CLPS711X ARM target.
> Please review and apply it to kernel tree. Comments are welcome :)

Hi Alexander,

This looks very nice overall, it's certainly good that you can manage to add
support for a new soc with a net removal of lines.

Note that with the current work split, it will be Olof and me who apply
these patches in the end, not Russell, although he will probably have
to something to say about the patches, too, since he has done almost all the
changes to this platform in its more active times.

>From my reading of the git history, very little has happened in clps711x
since about 2005, and we've never had a subarch maintainer for it. Are you
interested in becoming the maintainer for it, or is this more a one-time
effort on your side? I don't expect this to be much work for you, but it
would be nice to have some person that can review the occasional patch
touching multiple platforms.

Do you have any plans to add more stuff to the platform, like additional
SoCs or more board files? Do you see value in having it included in
a single kernel image that runs on various different ARMv4/ARMv5 based
Socs? I assume that the answer to all of these is 'no', but you plan
to do them, we should talk about how to make that happen.

	Arnd

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

* Re: [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
  2012-04-21 11:21     ` Arnd Bergmann
@ 2012-04-21 11:48       ` Russell King - ARM Linux
  -1 siblings, 0 replies; 66+ messages in thread
From: Russell King - ARM Linux @ 2012-04-21 11:48 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-arm-kernel, Alexander Shiyan, linux-kernel

On Sat, Apr 21, 2012 at 11:21:49AM +0000, Arnd Bergmann wrote:
> On Saturday 21 April 2012, Alexander Shiyan wrote:
> > 
> > Added register definitions specific to EP7312 and the necessary
> > configuration options.
> > 
> > Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> > ---
> >  arch/arm/include/asm/hardware/ep7312.h         |  106 ++++++++++++++++++++++++
> >  arch/arm/mach-clps711x/Kconfig                 |    9 ++-
> >  arch/arm/mach-clps711x/include/mach/hardware.h |    4 +
> >  drivers/net/irda/Kconfig                       |    3 +-
> >  4 files changed, 119 insertions(+), 3 deletions(-)
> >  create mode 100644 arch/arm/include/asm/hardware/ep7312.h
> 
> I'm missing some historical background here. Why are these files in asm/hardware
> rather than in mach/? Should we move them to the platform directory?

That's where we used to put truely hardware dependent stuff, rather than
machine type stuff when the structure was first implemented.  At that time
we had a number of different mach-* directories wanting to share things
like the acorn IOC/IOMD stuff, and there's also sharing of definitions
between CLPS711x and EP93xx.

That was long before we invented the plat-* stuff - but even that doesn't
actually cover what asm/hardware does - eg, the SA1111 stuff shared
between SA11x0 and PXA.

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

* [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
@ 2012-04-21 11:48       ` Russell King - ARM Linux
  0 siblings, 0 replies; 66+ messages in thread
From: Russell King - ARM Linux @ 2012-04-21 11:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Apr 21, 2012 at 11:21:49AM +0000, Arnd Bergmann wrote:
> On Saturday 21 April 2012, Alexander Shiyan wrote:
> > 
> > Added register definitions specific to EP7312 and the necessary
> > configuration options.
> > 
> > Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> > ---
> >  arch/arm/include/asm/hardware/ep7312.h         |  106 ++++++++++++++++++++++++
> >  arch/arm/mach-clps711x/Kconfig                 |    9 ++-
> >  arch/arm/mach-clps711x/include/mach/hardware.h |    4 +
> >  drivers/net/irda/Kconfig                       |    3 +-
> >  4 files changed, 119 insertions(+), 3 deletions(-)
> >  create mode 100644 arch/arm/include/asm/hardware/ep7312.h
> 
> I'm missing some historical background here. Why are these files in asm/hardware
> rather than in mach/? Should we move them to the platform directory?

That's where we used to put truely hardware dependent stuff, rather than
machine type stuff when the structure was first implemented.  At that time
we had a number of different mach-* directories wanting to share things
like the acorn IOC/IOMD stuff, and there's also sharing of definitions
between CLPS711x and EP93xx.

That was long before we invented the plat-* stuff - but even that doesn't
actually cover what asm/hardware does - eg, the SA1111 stuff shared
between SA11x0 and PXA.

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

* Re: [PATCH 12/17] ARM clps711x: Simple optimise debug_macro by removing one NOP
  2012-04-21 11:18     ` Arnd Bergmann
@ 2012-04-21 11:49       ` Arnd Bergmann
  -1 siblings, 0 replies; 66+ messages in thread
From: Arnd Bergmann @ 2012-04-21 11:49 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Russell King, linux-kernel, Alexander Shiyan

On Saturday 21 April 2012, Arnd Bergmann wrote:
> 
> On Saturday 21 April 2012, Alexander Shiyan wrote:
> > 
> >                 .macro  addruart, rp, rv, tmp
> > -#ifndef CONFIG_DEBUG_CLPS711X_UART2
> > -               mov     \rp, #0x0000    @ UART1
> > -#else
> > -               mov     \rp, #0x1000    @ UART2
> > +#ifdef CONFIG_DEBUG_CLPS711X_UART2
> > +               mov     \rp, #0x1000    @ Add offset for UART2 base reg
> >  #endif
> >                 orr     \rv, \rp, #CLPS711X_VIRT_BASE
> >                 orr     \rp, \rp, #CLPS711X_PHYS_BASE
> 
> This looks wrong at first sight. Is rp guaranteed to be zero when calling
> the macro? Am I misreading this? Sorry my ARM assembly skill is still horrible.

Ah, Russell was faster to point out the same problem. Well I'm glad that
I sometimes read the assembly correctly then ;-)

	Arnd

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

* [PATCH 12/17] ARM clps711x: Simple optimise debug_macro by removing one NOP
@ 2012-04-21 11:49       ` Arnd Bergmann
  0 siblings, 0 replies; 66+ messages in thread
From: Arnd Bergmann @ 2012-04-21 11:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Saturday 21 April 2012, Arnd Bergmann wrote:
> 
> On Saturday 21 April 2012, Alexander Shiyan wrote:
> > 
> >                 .macro  addruart, rp, rv, tmp
> > -#ifndef CONFIG_DEBUG_CLPS711X_UART2
> > -               mov     \rp, #0x0000    @ UART1
> > -#else
> > -               mov     \rp, #0x1000    @ UART2
> > +#ifdef CONFIG_DEBUG_CLPS711X_UART2
> > +               mov     \rp, #0x1000    @ Add offset for UART2 base reg
> >  #endif
> >                 orr     \rv, \rp, #CLPS711X_VIRT_BASE
> >                 orr     \rp, \rp, #CLPS711X_PHYS_BASE
> 
> This looks wrong at first sight. Is rp guaranteed to be zero when calling
> the macro? Am I misreading this? Sorry my ARM assembly skill is still horrible.

Ah, Russell was faster to point out the same problem. Well I'm glad that
I sometimes read the assembly correctly then ;-)

	Arnd

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

* Re[2]: clps711x patchset
  2012-04-21 11:40   ` Arnd Bergmann
@ 2012-04-21 12:04     ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21 12:04 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-arm-kernel, Russell King, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 2016 bytes --]

Sat, 21 Apr 2012 11:40:21 +0000 от Arnd Bergmann <arnd@arndb.de>:
> On Saturday 21 April 2012, Alexander Shiyan wrote:
> > Hello.
> > This is patchset contains some cleanups and tricks for CLPS711X ARM target.
> > Please review and apply it to kernel tree. Comments are welcome :)
...
> This looks very nice overall, it's certainly good that you can manage to add
> support for a new soc with a net removal of lines.
> 
> Note that with the current work split, it will be Olof and me who apply
> these patches in the end, not Russell, although he will probably have
> to something to say about the patches, too, since he has done almost all the
> changes to this platform in its more active times.
> 
> From my reading of the git history, very little has happened in clps711x
> since about 2005, and we've never had a subarch maintainer for it. Are you
> interested in becoming the maintainer for it, or is this more a one-time
> effort on your side? I don't expect this to be much work for you, but it
> would be nice to have some person that can review the occasional patch
> touching multiple platforms.
> 
> Do you have any plans to add more stuff to the platform, like additional
> SoCs or more board files? Do you see value in having it included in
> a single kernel image that runs on various different ARMv4/ARMv5 based
> Socs? I assume that the answer to all of these is 'no', but you plan
> to do them, we should talk about how to make that happen.

The new processors in this series as far as I know there is not and no more will be.
Existing processors are still produced and used. We use this processor is 4-5 years
old and still expect to use in the future.

I can look at the new code is correct, but check it can only work on our custom board.

Of the new things I would like to add the ability to use gpiolib with this type of processor.ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re[2]: clps711x patchset
@ 2012-04-21 12:04     ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-21 12:04 UTC (permalink / raw)
  To: linux-arm-kernel

Sat, 21 Apr 2012 11:40:21 +0000 ?? Arnd Bergmann <arnd@arndb.de>:
> On Saturday 21 April 2012, Alexander Shiyan wrote:
> > Hello.
> > This is patchset contains some cleanups and tricks for CLPS711X ARM target.
> > Please review and apply it to kernel tree. Comments are welcome :)
...
> This looks very nice overall, it's certainly good that you can manage to add
> support for a new soc with a net removal of lines.
> 
> Note that with the current work split, it will be Olof and me who apply
> these patches in the end, not Russell, although he will probably have
> to something to say about the patches, too, since he has done almost all the
> changes to this platform in its more active times.
> 
> From my reading of the git history, very little has happened in clps711x
> since about 2005, and we've never had a subarch maintainer for it. Are you
> interested in becoming the maintainer for it, or is this more a one-time
> effort on your side? I don't expect this to be much work for you, but it
> would be nice to have some person that can review the occasional patch
> touching multiple platforms.
> 
> Do you have any plans to add more stuff to the platform, like additional
> SoCs or more board files? Do you see value in having it included in
> a single kernel image that runs on various different ARMv4/ARMv5 based
> Socs? I assume that the answer to all of these is 'no', but you plan
> to do them, we should talk about how to make that happen.

The new processors in this series as far as I know there is not and no more will be.
Existing processors are still produced and used. We use this processor is 4-5 years
old and still expect to use in the future.

I can look at the new code is correct, but check it can only work on our custom board.

Of the new things I would like to add the ability to use gpiolib with this type of processor.

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

* Re: [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
  2012-04-21 11:48       ` Russell King - ARM Linux
@ 2012-04-21 12:11         ` Arnd Bergmann
  -1 siblings, 0 replies; 66+ messages in thread
From: Arnd Bergmann @ 2012-04-21 12:11 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: linux-arm-kernel, Alexander Shiyan, linux-kernel

On Saturday 21 April 2012, Russell King - ARM Linux wrote:
> That's where we used to put truely hardware dependent stuff, rather than
> machine type stuff when the structure was first implemented.  At that time
> we had a number of different mach-* directories wanting to share things
> like the acorn IOC/IOMD stuff, and there's also sharing of definitions
> between CLPS711x and EP93xx.
> 
> That was long before we invented the plat-* stuff - but even that doesn't
> actually cover what asm/hardware does - eg, the SA1111 stuff shared
> between SA11x0 and PXA.

Ah, thanks for the explanation.

Since the clps7111 based asm/hardware/*.h files are not shared with ep93xx,
I guess it makes sense to move them to mach-clps711x/include/mach/*.h as part of
this cleanup series, right?

I found these clps711x specific files:

 asm/hardware/clps7111.h
 asm/hardware/cs89712.h
 asm/hardware/ep7211.h
 asm/hardware/ep7212.h

Out of these, only the first one is used in two places outside of
arch/arm/mach-clps711x, the serial and the fb driver, which could
be changed to use mach/hardware.h instead.

	Arnd

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

* [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
@ 2012-04-21 12:11         ` Arnd Bergmann
  0 siblings, 0 replies; 66+ messages in thread
From: Arnd Bergmann @ 2012-04-21 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Saturday 21 April 2012, Russell King - ARM Linux wrote:
> That's where we used to put truely hardware dependent stuff, rather than
> machine type stuff when the structure was first implemented.  At that time
> we had a number of different mach-* directories wanting to share things
> like the acorn IOC/IOMD stuff, and there's also sharing of definitions
> between CLPS711x and EP93xx.
> 
> That was long before we invented the plat-* stuff - but even that doesn't
> actually cover what asm/hardware does - eg, the SA1111 stuff shared
> between SA11x0 and PXA.

Ah, thanks for the explanation.

Since the clps7111 based asm/hardware/*.h files are not shared with ep93xx,
I guess it makes sense to move them to mach-clps711x/include/mach/*.h as part of
this cleanup series, right?

I found these clps711x specific files:

 asm/hardware/clps7111.h
 asm/hardware/cs89712.h
 asm/hardware/ep7211.h
 asm/hardware/ep7212.h

Out of these, only the first one is used in two places outside of
arch/arm/mach-clps711x, the serial and the fb driver, which could
be changed to use mach/hardware.h instead.

	Arnd

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

* Re: Re[2]: clps711x patchset
  2012-04-21 12:04     ` Alexander Shiyan
@ 2012-04-21 12:14       ` Arnd Bergmann
  -1 siblings, 0 replies; 66+ messages in thread
From: Arnd Bergmann @ 2012-04-21 12:14 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: linux-arm-kernel, Russell King, linux-kernel

On Saturday 21 April 2012, Alexander Shiyan wrote:
> The new processors in this series as far as I know there is not and no more will be.
> Existing processors are still produced and used. We use this processor is 4-5 years
> old and still expect to use in the future.

Ok, makes sense.

> I can look at the new code is correct, but check it can only work on our custom board.

That's probably good enough, as most of the changes I expect would either
break the entire platform or just work.

> Of the new things I would like to add the ability to use gpiolib with this type of processor.

Ok, that sounds like a very useful thing to do, I'm looking forward
to the patches.

	Arnd

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

* clps711x patchset
@ 2012-04-21 12:14       ` Arnd Bergmann
  0 siblings, 0 replies; 66+ messages in thread
From: Arnd Bergmann @ 2012-04-21 12:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Saturday 21 April 2012, Alexander Shiyan wrote:
> The new processors in this series as far as I know there is not and no more will be.
> Existing processors are still produced and used. We use this processor is 4-5 years
> old and still expect to use in the future.

Ok, makes sense.

> I can look at the new code is correct, but check it can only work on our custom board.

That's probably good enough, as most of the changes I expect would either
break the entire platform or just work.

> Of the new things I would like to add the ability to use gpiolib with this type of processor.

Ok, that sounds like a very useful thing to do, I'm looking forward
to the patches.

	Arnd

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

* Re: [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
  2012-04-21 12:11         ` Arnd Bergmann
@ 2012-04-21 12:20           ` Russell King - ARM Linux
  -1 siblings, 0 replies; 66+ messages in thread
From: Russell King - ARM Linux @ 2012-04-21 12:20 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-arm-kernel, Alexander Shiyan, linux-kernel

On Sat, Apr 21, 2012 at 12:11:35PM +0000, Arnd Bergmann wrote:
> On Saturday 21 April 2012, Russell King - ARM Linux wrote:
> > That's where we used to put truely hardware dependent stuff, rather than
> > machine type stuff when the structure was first implemented.  At that time
> > we had a number of different mach-* directories wanting to share things
> > like the acorn IOC/IOMD stuff, and there's also sharing of definitions
> > between CLPS711x and EP93xx.
> > 
> > That was long before we invented the plat-* stuff - but even that doesn't
> > actually cover what asm/hardware does - eg, the SA1111 stuff shared
> > between SA11x0 and PXA.
> 
> Ah, thanks for the explanation.
> 
> Since the clps7111 based asm/hardware/*.h files are not shared with ep93xx,
> I guess it makes sense to move them to mach-clps711x/include/mach/*.h as part of
> this cleanup series, right?

Yes.

> Out of these, only the first one is used in two places outside of
> arch/arm/mach-clps711x, the serial and the fb driver, which could
> be changed to use mach/hardware.h instead.

The headers still have to end up being in an accessible place, and having
drivers include the minimum required is a good idea.  Merely moving them
into include/mach and updating the include statements as far as I'd go.
(and I've never liked the idea of mach/hardware.h being an "include the
world for this platform" header file.)

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

* [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
@ 2012-04-21 12:20           ` Russell King - ARM Linux
  0 siblings, 0 replies; 66+ messages in thread
From: Russell King - ARM Linux @ 2012-04-21 12:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Apr 21, 2012 at 12:11:35PM +0000, Arnd Bergmann wrote:
> On Saturday 21 April 2012, Russell King - ARM Linux wrote:
> > That's where we used to put truely hardware dependent stuff, rather than
> > machine type stuff when the structure was first implemented.  At that time
> > we had a number of different mach-* directories wanting to share things
> > like the acorn IOC/IOMD stuff, and there's also sharing of definitions
> > between CLPS711x and EP93xx.
> > 
> > That was long before we invented the plat-* stuff - but even that doesn't
> > actually cover what asm/hardware does - eg, the SA1111 stuff shared
> > between SA11x0 and PXA.
> 
> Ah, thanks for the explanation.
> 
> Since the clps7111 based asm/hardware/*.h files are not shared with ep93xx,
> I guess it makes sense to move them to mach-clps711x/include/mach/*.h as part of
> this cleanup series, right?

Yes.

> Out of these, only the first one is used in two places outside of
> arch/arm/mach-clps711x, the serial and the fb driver, which could
> be changed to use mach/hardware.h instead.

The headers still have to end up being in an accessible place, and having
drivers include the minimum required is a good idea.  Merely moving them
into include/mach and updating the include statements as far as I'd go.
(and I've never liked the idea of mach/hardware.h being an "include the
world for this platform" header file.)

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

* Re: [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
  2012-04-21 12:20           ` Russell King - ARM Linux
@ 2012-04-22 13:58             ` Arnd Bergmann
  -1 siblings, 0 replies; 66+ messages in thread
From: Arnd Bergmann @ 2012-04-22 13:58 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Russell King - ARM Linux, Alexander Shiyan, linux-kernel

On Saturday 21 April 2012, Russell King - ARM Linux wrote:
> The headers still have to end up being in an accessible place, and having
> drivers include the minimum required is a good idea.  Merely moving them
> into include/mach and updating the include statements as far as I'd go.
> (and I've never liked the idea of mach/hardware.h being an "include the
> world for this platform" header file.)

Digging a bit deeper into clps711x, I found that with Alexander's patch
series applied, there is nothing that actually includes the three
asm/hardware/ep7*.h files. I wonder about the motivation behind providing
them. Any reason we can't just remove those three files altogher?

Note that if we were to actually start using those files, this section
of mach/hardware.h would be broken:

#if defined (CONFIG_SOC_EP7211)
#include <asm/hardware/ep7211.h>
#elif defined (CONFIG_SOC_EP7212)
#include <asm/hardware/ep7212.h>
#elif defined (CONFIG_SOC_EP7213)
#include <asm/hardware/ep7312.h>
#endif

Because we can have more than one of these socs enabled in the
same configuration and enabling CONFIG_SOC_EP7211 would make the
other two headers invisible.

	Arnd

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

* [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
@ 2012-04-22 13:58             ` Arnd Bergmann
  0 siblings, 0 replies; 66+ messages in thread
From: Arnd Bergmann @ 2012-04-22 13:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Saturday 21 April 2012, Russell King - ARM Linux wrote:
> The headers still have to end up being in an accessible place, and having
> drivers include the minimum required is a good idea.  Merely moving them
> into include/mach and updating the include statements as far as I'd go.
> (and I've never liked the idea of mach/hardware.h being an "include the
> world for this platform" header file.)

Digging a bit deeper into clps711x, I found that with Alexander's patch
series applied, there is nothing that actually includes the three
asm/hardware/ep7*.h files. I wonder about the motivation behind providing
them. Any reason we can't just remove those three files altogher?

Note that if we were to actually start using those files, this section
of mach/hardware.h would be broken:

#if defined (CONFIG_SOC_EP7211)
#include <asm/hardware/ep7211.h>
#elif defined (CONFIG_SOC_EP7212)
#include <asm/hardware/ep7212.h>
#elif defined (CONFIG_SOC_EP7213)
#include <asm/hardware/ep7312.h>
#endif

Because we can have more than one of these socs enabled in the
same configuration and enabling CONFIG_SOC_EP7211 would make the
other two headers invisible.

	Arnd

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

* Re: [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
  2012-04-22 13:58             ` Arnd Bergmann
@ 2012-04-22 14:13               ` Russell King - ARM Linux
  -1 siblings, 0 replies; 66+ messages in thread
From: Russell King - ARM Linux @ 2012-04-22 14:13 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-arm-kernel, Alexander Shiyan, linux-kernel

On Sun, Apr 22, 2012 at 01:58:28PM +0000, Arnd Bergmann wrote:
> On Saturday 21 April 2012, Russell King - ARM Linux wrote:
> > The headers still have to end up being in an accessible place, and having
> > drivers include the minimum required is a good idea.  Merely moving them
> > into include/mach and updating the include statements as far as I'd go.
> > (and I've never liked the idea of mach/hardware.h being an "include the
> > world for this platform" header file.)
> 
> Digging a bit deeper into clps711x, I found that with Alexander's patch
> series applied, there is nothing that actually includes the three
> asm/hardware/ep7*.h files. I wonder about the motivation behind providing
> them. Any reason we can't just remove those three files altogher?

To me it looks like there isn't anything using any definitions from those
ep721*.h files, so there's little point them existing.  And they've not
changed since 2.6.12-rc2 either...  I'd suggest just getting rid of those
two headers entirely.

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

* [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
@ 2012-04-22 14:13               ` Russell King - ARM Linux
  0 siblings, 0 replies; 66+ messages in thread
From: Russell King - ARM Linux @ 2012-04-22 14:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Apr 22, 2012 at 01:58:28PM +0000, Arnd Bergmann wrote:
> On Saturday 21 April 2012, Russell King - ARM Linux wrote:
> > The headers still have to end up being in an accessible place, and having
> > drivers include the minimum required is a good idea.  Merely moving them
> > into include/mach and updating the include statements as far as I'd go.
> > (and I've never liked the idea of mach/hardware.h being an "include the
> > world for this platform" header file.)
> 
> Digging a bit deeper into clps711x, I found that with Alexander's patch
> series applied, there is nothing that actually includes the three
> asm/hardware/ep7*.h files. I wonder about the motivation behind providing
> them. Any reason we can't just remove those three files altogher?

To me it looks like there isn't anything using any definitions from those
ep721*.h files, so there's little point them existing.  And they've not
changed since 2.6.12-rc2 either...  I'd suggest just getting rid of those
two headers entirely.

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

* Re[2]: [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
  2012-04-22 13:58             ` Arnd Bergmann
@ 2012-04-22 14:24               ` Alexander Shiyan
  -1 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-22 14:24 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-arm-kernel, Russell King - ARM Linux, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 1691 bytes --]




Sun, 22 Apr 2012 13:58:28 +0000 от Arnd Bergmann <arnd@arndb.de>:
> On Saturday 21 April 2012, Russell King - ARM Linux wrote:
> > The headers still have to end up being in an accessible place, and having
> > drivers include the minimum required is a good idea.  Merely moving them
> > into include/mach and updating the include statements as far as I'd go.
> > (and I've never liked the idea of mach/hardware.h being an "include the
> > world for this platform" header file.)
> 
> Digging a bit deeper into clps711x, I found that with Alexander's patch
> series applied, there is nothing that actually includes the three
> asm/hardware/ep7*.h files. I wonder about the motivation behind providing
> them. Any reason we can't just remove those three files altogher?
> 
> Note that if we were to actually start using those files, this section
> of mach/hardware.h would be broken:
> 
> #if defined (CONFIG_SOC_EP7211)
> #include <asm/hardware/ep7211.h>
> #elif defined (CONFIG_SOC_EP7212)
> #include <asm/hardware/ep7212.h>
> #elif defined (CONFIG_SOC_EP7213)
> #include <asm/hardware/ep7312.h>
> #endif
> 
> Because we can have more than one of these socs enabled in the
> same configuration and enabling CONFIG_SOC_EP7211 would make the
> other two headers invisible.
We can define the уз7312 registers in a single clps7111.h header and just always
keep in mind that additional registers can be used only with the corresponding processor.
In any case, additional registers are used in the code for a particular board only.
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re[2]: [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant
@ 2012-04-22 14:24               ` Alexander Shiyan
  0 siblings, 0 replies; 66+ messages in thread
From: Alexander Shiyan @ 2012-04-22 14:24 UTC (permalink / raw)
  To: linux-arm-kernel




Sun, 22 Apr 2012 13:58:28 +0000 ?? Arnd Bergmann <arnd@arndb.de>:
> On Saturday 21 April 2012, Russell King - ARM Linux wrote:
> > The headers still have to end up being in an accessible place, and having
> > drivers include the minimum required is a good idea.  Merely moving them
> > into include/mach and updating the include statements as far as I'd go.
> > (and I've never liked the idea of mach/hardware.h being an "include the
> > world for this platform" header file.)
> 
> Digging a bit deeper into clps711x, I found that with Alexander's patch
> series applied, there is nothing that actually includes the three
> asm/hardware/ep7*.h files. I wonder about the motivation behind providing
> them. Any reason we can't just remove those three files altogher?
> 
> Note that if we were to actually start using those files, this section
> of mach/hardware.h would be broken:
> 
> #if defined (CONFIG_SOC_EP7211)
> #include <asm/hardware/ep7211.h>
> #elif defined (CONFIG_SOC_EP7212)
> #include <asm/hardware/ep7212.h>
> #elif defined (CONFIG_SOC_EP7213)
> #include <asm/hardware/ep7312.h>
> #endif
> 
> Because we can have more than one of these socs enabled in the
> same configuration and enabling CONFIG_SOC_EP7211 would make the
> other two headers invisible.
We can define the ??7312 registers in a single clps7111.h header and just always
keep in mind that additional registers can be used only with the corresponding processor.
In any case, additional registers are used in the code for a particular board only.

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

end of thread, other threads:[~2012-04-22 14:24 UTC | newest]

Thread overview: 66+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-21  9:11 clps711x patchset Alexander Shiyan
2012-04-21  9:11 ` Alexander Shiyan
2012-04-21  9:11 ` [PATCH 01/17] ARM clps711x: Cleanup: Rename ARCH_EP7211 and ARCH_EP7212 to SOC_xxx Alexander Shiyan
2012-04-21  9:11   ` Alexander Shiyan
2012-04-21  9:11 ` [PATCH 02/17] ARM clps711x: Added Cirrus Logic EP7312 CPU variant Alexander Shiyan
2012-04-21  9:11   ` Alexander Shiyan
2012-04-21 11:21   ` Arnd Bergmann
2012-04-21 11:21     ` Arnd Bergmann
2012-04-21 11:30     ` Re[2]: " Alexander Shiyan
2012-04-21 11:30       ` Alexander Shiyan
2012-04-21 11:48     ` Russell King - ARM Linux
2012-04-21 11:48       ` Russell King - ARM Linux
2012-04-21 12:11       ` Arnd Bergmann
2012-04-21 12:11         ` Arnd Bergmann
2012-04-21 12:20         ` Russell King - ARM Linux
2012-04-21 12:20           ` Russell King - ARM Linux
2012-04-22 13:58           ` Arnd Bergmann
2012-04-22 13:58             ` Arnd Bergmann
2012-04-22 14:13             ` Russell King - ARM Linux
2012-04-22 14:13               ` Russell King - ARM Linux
2012-04-22 14:24             ` Re[2]: " Alexander Shiyan
2012-04-22 14:24               ` Alexander Shiyan
2012-04-21  9:11 ` [PATCH 03/17] ARM clps711x: Selecting CPU-variant automatically for clps711x targets Alexander Shiyan
2012-04-21  9:11   ` Alexander Shiyan
2012-04-21  9:11 ` [PATCH 04/17] ARM clps711x: Using a single definition for virtual address register Alexander Shiyan
2012-04-21  9:11   ` Alexander Shiyan
2012-04-21  9:11 ` [PATCH 05/17] ARM clps711x: Added missing definitions for PORT C Alexander Shiyan
2012-04-21  9:11   ` Alexander Shiyan
2012-04-21  9:11 ` [PATCH 06/17] ARM clps711x: Remove now unused cs89712 board header Alexander Shiyan
2012-04-21  9:11   ` Alexander Shiyan
2012-04-21  9:11 ` [PATCH 07/17] ARM clps711x: Remove unused includes Alexander Shiyan
2012-04-21  9:11   ` Alexander Shiyan
2012-04-21  9:11 ` [PATCH 08/17] ARM clps711x: Cleanup: remove unused definitions for ep_readl/ep_writel Alexander Shiyan
2012-04-21  9:11   ` Alexander Shiyan
2012-04-21  9:11 ` [PATCH 09/17] ARM clps711x: Using a single definition for physical address register Alexander Shiyan
2012-04-21  9:11   ` Alexander Shiyan
2012-04-21  9:11 ` [PATCH 10/17] ARM clps711x: Address register renaming to reflect the fact that the name is the same for all arch Alexander Shiyan
2012-04-21  9:11   ` Alexander Shiyan
2012-04-21  9:11 ` [PATCH 11/17] ARM clps711x: Move definitions of register address in one unit Alexander Shiyan
2012-04-21  9:11   ` Alexander Shiyan
2012-04-21  9:11 ` [PATCH 12/17] ARM clps711x: Simple optimise debug_macro by removing one NOP Alexander Shiyan
2012-04-21  9:11   ` Alexander Shiyan
2012-04-21 10:46   ` Russell King - ARM Linux
2012-04-21 10:46     ` Russell King - ARM Linux
2012-04-21 10:50     ` Re[2]: " Alexander Shiyan
2012-04-21 10:50       ` Alexander Shiyan
2012-04-21 11:18   ` Arnd Bergmann
2012-04-21 11:18     ` Arnd Bergmann
2012-04-21 11:49     ` Arnd Bergmann
2012-04-21 11:49       ` Arnd Bergmann
2012-04-21  9:11 ` [PATCH 13/17] ARM clps711x: Removed unused header mach/time.h Alexander Shiyan
2012-04-21  9:11   ` Alexander Shiyan
2012-04-21  9:11 ` [PATCH 14/17] ARM clps711x: Do not mask interrupts in ack procedure Alexander Shiyan
2012-04-21  9:11   ` Alexander Shiyan
2012-04-21  9:11 ` [PATCH 15/17] ARM clps711x: Removed unused definitions from mach/irqs.h Alexander Shiyan
2012-04-21  9:11   ` Alexander Shiyan
2012-04-21  9:11 ` [PATCH 16/17] ARM clps711x: Replaced frequency settings to definition Alexander Shiyan
2012-04-21  9:11   ` Alexander Shiyan
2012-04-21  9:11 ` [PATCH 17/17] ARM clps711x: Make select CPU spees as KConfig option Alexander Shiyan
2012-04-21  9:11   ` Alexander Shiyan
2012-04-21 11:40 ` clps711x patchset Arnd Bergmann
2012-04-21 11:40   ` Arnd Bergmann
2012-04-21 12:04   ` Re[2]: " Alexander Shiyan
2012-04-21 12:04     ` Alexander Shiyan
2012-04-21 12:14     ` Arnd Bergmann
2012-04-21 12:14       ` Arnd Bergmann

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.