All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: PRIMA2: some patches prepared to support new SiRF SoCs
@ 2012-08-20  8:19 Barry Song
  2012-08-20  8:19 ` [PATCH 1/3] ARM: PRIMA2: use DT_MACHINE_START and convert to generic board Barry Song
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Barry Song @ 2012-08-20  8:19 UTC (permalink / raw)
  To: linux-arm-kernel

From: Barry Song <Baohua.Song@csr.com>

we will support SiRFmarco and SiRFpolo SMP SoCs, this series is making
mach-prima2 common for all of them.

Barry Song (3):
  ARM: PRIMA2: use DT_MACHINE_START and convert to generic board
  ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC
  ARM: SIRF: make sirf irqchip driver selectable since new SoCs will
    have GIC

 arch/arm/Kconfig                                   |   10 +++++-----
 arch/arm/Makefile                                  |    2 +-
 arch/arm/mach-sirf/Kconfig                         |   20 ++++++++++++++++++++
 arch/arm/{mach-prima2 => mach-sirf}/Makefile       |    4 ++--
 arch/arm/{mach-prima2 => mach-sirf}/Makefile.boot  |    0
 .../prima2.c => mach-sirf/board-generic.c}         |   10 ++++++----
 arch/arm/{mach-prima2 => mach-sirf}/common.h       |    0
 .../include/mach/clkdev.h                          |    0
 .../include/mach/debug-macro.S                     |    0
 .../include/mach/entry-macro.S                     |    0
 .../{mach-prima2 => mach-sirf}/include/mach/gpio.h |    0
 .../include/mach/hardware.h                        |    0
 .../{mach-prima2 => mach-sirf}/include/mach/irqs.h |    0
 .../{mach-prima2 => mach-sirf}/include/mach/map.h  |    0
 .../include/mach/timex.h                           |    0
 .../{mach-prima2 => mach-sirf}/include/mach/uart.h |    0
 .../include/mach/uncompress.h                      |    0
 arch/arm/{mach-prima2 => mach-sirf}/irq.c          |    0
 arch/arm/{mach-prima2 => mach-sirf}/l2x0.c         |    0
 arch/arm/{mach-prima2 => mach-sirf}/lluart.c       |    0
 arch/arm/{mach-prima2 => mach-sirf}/pm.c           |    0
 arch/arm/{mach-prima2 => mach-sirf}/pm.h           |    0
 arch/arm/{mach-prima2 => mach-sirf}/rstc.c         |    0
 arch/arm/{mach-prima2 => mach-sirf}/rtciobrg.c     |    0
 arch/arm/{mach-prima2 => mach-sirf}/sleep.S        |    0
 arch/arm/{mach-prima2 => mach-sirf}/timer.c        |    0
 26 files changed, 34 insertions(+), 12 deletions(-)
 create mode 100644 arch/arm/mach-sirf/Kconfig
 rename arch/arm/{mach-prima2 => mach-sirf}/Makefile (73%)
 rename arch/arm/{mach-prima2 => mach-sirf}/Makefile.boot (100%)
 rename arch/arm/{mach-prima2/prima2.c => mach-sirf/board-generic.c} (81%)
 rename arch/arm/{mach-prima2 => mach-sirf}/common.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/clkdev.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/debug-macro.S (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/entry-macro.S (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/gpio.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/hardware.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/irqs.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/map.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/timex.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/uart.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/uncompress.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/irq.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/l2x0.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/lluart.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/pm.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/pm.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/rstc.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/rtciobrg.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/sleep.S (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/timer.c (100%)



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog

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

* [PATCH 1/3] ARM: PRIMA2: use DT_MACHINE_START and convert to generic board
  2012-08-20  8:19 [PATCH 0/3] ARM: PRIMA2: some patches prepared to support new SiRF SoCs Barry Song
@ 2012-08-20  8:19 ` Barry Song
  2012-08-20 20:56   ` Arnd Bergmann
  2012-08-20  8:19 ` [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC Barry Song
  2012-08-20  8:19 ` [PATCH 3/3] ARM: SIRF: make sirf irqchip driver selectable since new SoCs will have GIC Barry Song
  2 siblings, 1 reply; 22+ messages in thread
From: Barry Song @ 2012-08-20  8:19 UTC (permalink / raw)
  To: linux-arm-kernel

From: Barry Song <Baohua.Song@csr.com>

we will have SiRFMarco and SiRFPolo, all of them will be in the
generic board.

Signed-off-by: Barry Song <Baohua.Song@csr.com>
---
 arch/arm/mach-prima2/Makefile                      |    2 +-
 arch/arm/mach-prima2/{prima2.c => board-generic.c} |   10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)
 rename arch/arm/mach-prima2/{prima2.c => board-generic.c} (81%)

diff --git a/arch/arm/mach-prima2/Makefile b/arch/arm/mach-prima2/Makefile
index 841847d..852af49 100644
--- a/arch/arm/mach-prima2/Makefile
+++ b/arch/arm/mach-prima2/Makefile
@@ -1,7 +1,7 @@
 obj-y := timer.o
 obj-y += irq.o
 obj-y += rstc.o
-obj-y += prima2.o
+obj-y += board-generic.o
 obj-y += rtciobrg.o
 obj-$(CONFIG_DEBUG_LL) += lluart.o
 obj-$(CONFIG_CACHE_L2X0) += l2x0.o
diff --git a/arch/arm/mach-prima2/prima2.c b/arch/arm/mach-prima2/board-generic.c
similarity index 81%
rename from arch/arm/mach-prima2/prima2.c
rename to arch/arm/mach-prima2/board-generic.c
index e9a17ae..f06b887 100644
--- a/arch/arm/mach-prima2/prima2.c
+++ b/arch/arm/mach-prima2/board-generic.c
@@ -30,12 +30,13 @@ void __init sirfsoc_init_late(void)
 	sirfsoc_pm_init();
 }
 
-static const char *prima2cb_dt_match[] __initdata = {
-       "sirf,prima2-cb",
+#ifdef CONFIG_ARCH_PRIMA2
+static const char *prima2_dt_match[] __initdata = {
+       "sirf,prima2",
        NULL
 };
 
-MACHINE_START(PRIMA2_EVB, "prima2cb")
+DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
 	/* Maintainer: Barry Song <baohua.song@csr.com> */
 	.atag_offset	= 0x100,
 	.map_io         = sirfsoc_map_lluart,
@@ -44,6 +45,7 @@ MACHINE_START(PRIMA2_EVB, "prima2cb")
 	.dma_zone_size	= SZ_256M,
 	.init_machine	= sirfsoc_mach_init,
 	.init_late	= sirfsoc_init_late,
-	.dt_compat      = prima2cb_dt_match,
+	.dt_compat      = prima2_dt_match,
 	.restart	= sirfsoc_restart,
 MACHINE_END
+#endif
-- 
1.7.0.4



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog

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

* [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC
  2012-08-20  8:19 [PATCH 0/3] ARM: PRIMA2: some patches prepared to support new SiRF SoCs Barry Song
  2012-08-20  8:19 ` [PATCH 1/3] ARM: PRIMA2: use DT_MACHINE_START and convert to generic board Barry Song
@ 2012-08-20  8:19 ` Barry Song
  2012-08-20 21:06   ` Arnd Bergmann
  2012-08-20  8:19 ` [PATCH 3/3] ARM: SIRF: make sirf irqchip driver selectable since new SoCs will have GIC Barry Song
  2 siblings, 1 reply; 22+ messages in thread
From: Barry Song @ 2012-08-20  8:19 UTC (permalink / raw)
  To: linux-arm-kernel

From: Barry Song <Baohua.Song@csr.com>

We will have SiRF Marco and Polo, so rename the dir to mach-sirf
and add Kconfig menu

Signed-off-by: Baohua Song <Baohua.Song@csr.com>
---
 arch/arm/Kconfig                                   |   10 +++++-----
 arch/arm/Makefile                                  |    2 +-
 arch/arm/mach-sirf/Kconfig                         |   16 ++++++++++++++++
 arch/arm/{mach-prima2 => mach-sirf}/Makefile       |    0
 arch/arm/{mach-prima2 => mach-sirf}/Makefile.boot  |    0
 .../arm/{mach-prima2 => mach-sirf}/board-generic.c |    0
 arch/arm/{mach-prima2 => mach-sirf}/common.h       |    0
 .../include/mach/clkdev.h                          |    0
 .../include/mach/debug-macro.S                     |    0
 .../include/mach/entry-macro.S                     |    0
 .../{mach-prima2 => mach-sirf}/include/mach/gpio.h |    0
 .../include/mach/hardware.h                        |    0
 .../{mach-prima2 => mach-sirf}/include/mach/irqs.h |    0
 .../{mach-prima2 => mach-sirf}/include/mach/map.h  |    0
 .../include/mach/timex.h                           |    0
 .../{mach-prima2 => mach-sirf}/include/mach/uart.h |    0
 .../include/mach/uncompress.h                      |    0
 arch/arm/{mach-prima2 => mach-sirf}/irq.c          |    0
 arch/arm/{mach-prima2 => mach-sirf}/l2x0.c         |    0
 arch/arm/{mach-prima2 => mach-sirf}/lluart.c       |    0
 arch/arm/{mach-prima2 => mach-sirf}/pm.c           |    0
 arch/arm/{mach-prima2 => mach-sirf}/pm.h           |    0
 arch/arm/{mach-prima2 => mach-sirf}/rstc.c         |    0
 arch/arm/{mach-prima2 => mach-sirf}/rtciobrg.c     |    0
 arch/arm/{mach-prima2 => mach-sirf}/sleep.S        |    0
 arch/arm/{mach-prima2 => mach-sirf}/timer.c        |    0
 26 files changed, 22 insertions(+), 6 deletions(-)
 create mode 100644 arch/arm/mach-sirf/Kconfig
 rename arch/arm/{mach-prima2 => mach-sirf}/Makefile (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/Makefile.boot (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/board-generic.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/common.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/clkdev.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/debug-macro.S (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/entry-macro.S (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/gpio.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/hardware.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/irqs.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/map.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/timex.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/uart.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/uncompress.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/irq.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/l2x0.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/lluart.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/pm.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/pm.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/rstc.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/rtciobrg.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/sleep.S (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/timer.c (100%)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index fb60148..21cc08a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -407,9 +407,8 @@ config ARCH_GEMINI
 	help
 	  Support for the Cortina Systems Gemini family SoCs
 
-config ARCH_PRIMA2
-	bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
-	select CPU_V7
+config ARCH_SIRF
+	bool "CSR SiRF"
 	select NO_IOPORT
 	select ARCH_REQUIRE_GPIOLIB
 	select GENERIC_CLOCKEVENTS
@@ -419,9 +418,8 @@ config ARCH_PRIMA2
 	select PINCTRL
 	select PINCTRL_SIRF
 	select USE_OF
-	select ZONE_DMA
 	help
-          Support for CSR SiRFSoC ARM Cortex A9 Platform
+	  Support for CSR SiRFprimaII/Marco/Polo platforms
 
 config ARCH_EBSA110
 	bool "EBSA-110"
@@ -1118,6 +1116,8 @@ source "arch/arm/mach-exynos/Kconfig"
 
 source "arch/arm/mach-shmobile/Kconfig"
 
+source "arch/arm/mach-sirf/Kconfig"
+
 source "arch/arm/mach-tegra/Kconfig"
 
 source "arch/arm/mach-u300/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 30eae87..cc8da8e 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -168,7 +168,7 @@ machine-$(CONFIG_ARCH_OMAP2PLUS)	:= omap2
 machine-$(CONFIG_ARCH_ORION5X)		:= orion5x
 machine-$(CONFIG_ARCH_PICOXCELL)	:= picoxcell
 machine-$(CONFIG_ARCH_PNX4008)		:= pnx4008
-machine-$(CONFIG_ARCH_PRIMA2)		:= prima2
+machine-$(CONFIG_ARCH_SIRF)		:= sirf
 machine-$(CONFIG_ARCH_PXA)		:= pxa
 machine-$(CONFIG_ARCH_REALVIEW)		:= realview
 machine-$(CONFIG_ARCH_RPC)		:= rpc
diff --git a/arch/arm/mach-sirf/Kconfig b/arch/arm/mach-sirf/Kconfig
new file mode 100644
index 0000000..811e782
--- /dev/null
+++ b/arch/arm/mach-sirf/Kconfig
@@ -0,0 +1,16 @@
+if ARCH_SIRF
+
+choice
+	prompt "Qualcomm SiRF SoC Type"
+	default ARCH_PRIMA2
+
+config ARCH_PRIMA2
+	bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
+	select CPU_V7
+	select ZONE_DMA
+	help
+          Support for CSR SiRFSoC ARM Cortex A9 Platform
+
+endchoice
+
+endif
diff --git a/arch/arm/mach-prima2/Makefile b/arch/arm/mach-sirf/Makefile
similarity index 100%
rename from arch/arm/mach-prima2/Makefile
rename to arch/arm/mach-sirf/Makefile
diff --git a/arch/arm/mach-prima2/Makefile.boot b/arch/arm/mach-sirf/Makefile.boot
similarity index 100%
rename from arch/arm/mach-prima2/Makefile.boot
rename to arch/arm/mach-sirf/Makefile.boot
diff --git a/arch/arm/mach-prima2/board-generic.c b/arch/arm/mach-sirf/board-generic.c
similarity index 100%
rename from arch/arm/mach-prima2/board-generic.c
rename to arch/arm/mach-sirf/board-generic.c
diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-sirf/common.h
similarity index 100%
rename from arch/arm/mach-prima2/common.h
rename to arch/arm/mach-sirf/common.h
diff --git a/arch/arm/mach-prima2/include/mach/clkdev.h b/arch/arm/mach-sirf/include/mach/clkdev.h
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/clkdev.h
rename to arch/arm/mach-sirf/include/mach/clkdev.h
diff --git a/arch/arm/mach-prima2/include/mach/debug-macro.S b/arch/arm/mach-sirf/include/mach/debug-macro.S
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/debug-macro.S
rename to arch/arm/mach-sirf/include/mach/debug-macro.S
diff --git a/arch/arm/mach-prima2/include/mach/entry-macro.S b/arch/arm/mach-sirf/include/mach/entry-macro.S
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/entry-macro.S
rename to arch/arm/mach-sirf/include/mach/entry-macro.S
diff --git a/arch/arm/mach-prima2/include/mach/gpio.h b/arch/arm/mach-sirf/include/mach/gpio.h
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/gpio.h
rename to arch/arm/mach-sirf/include/mach/gpio.h
diff --git a/arch/arm/mach-prima2/include/mach/hardware.h b/arch/arm/mach-sirf/include/mach/hardware.h
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/hardware.h
rename to arch/arm/mach-sirf/include/mach/hardware.h
diff --git a/arch/arm/mach-prima2/include/mach/irqs.h b/arch/arm/mach-sirf/include/mach/irqs.h
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/irqs.h
rename to arch/arm/mach-sirf/include/mach/irqs.h
diff --git a/arch/arm/mach-prima2/include/mach/map.h b/arch/arm/mach-sirf/include/mach/map.h
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/map.h
rename to arch/arm/mach-sirf/include/mach/map.h
diff --git a/arch/arm/mach-prima2/include/mach/timex.h b/arch/arm/mach-sirf/include/mach/timex.h
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/timex.h
rename to arch/arm/mach-sirf/include/mach/timex.h
diff --git a/arch/arm/mach-prima2/include/mach/uart.h b/arch/arm/mach-sirf/include/mach/uart.h
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/uart.h
rename to arch/arm/mach-sirf/include/mach/uart.h
diff --git a/arch/arm/mach-prima2/include/mach/uncompress.h b/arch/arm/mach-sirf/include/mach/uncompress.h
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/uncompress.h
rename to arch/arm/mach-sirf/include/mach/uncompress.h
diff --git a/arch/arm/mach-prima2/irq.c b/arch/arm/mach-sirf/irq.c
similarity index 100%
rename from arch/arm/mach-prima2/irq.c
rename to arch/arm/mach-sirf/irq.c
diff --git a/arch/arm/mach-prima2/l2x0.c b/arch/arm/mach-sirf/l2x0.c
similarity index 100%
rename from arch/arm/mach-prima2/l2x0.c
rename to arch/arm/mach-sirf/l2x0.c
diff --git a/arch/arm/mach-prima2/lluart.c b/arch/arm/mach-sirf/lluart.c
similarity index 100%
rename from arch/arm/mach-prima2/lluart.c
rename to arch/arm/mach-sirf/lluart.c
diff --git a/arch/arm/mach-prima2/pm.c b/arch/arm/mach-sirf/pm.c
similarity index 100%
rename from arch/arm/mach-prima2/pm.c
rename to arch/arm/mach-sirf/pm.c
diff --git a/arch/arm/mach-prima2/pm.h b/arch/arm/mach-sirf/pm.h
similarity index 100%
rename from arch/arm/mach-prima2/pm.h
rename to arch/arm/mach-sirf/pm.h
diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-sirf/rstc.c
similarity index 100%
rename from arch/arm/mach-prima2/rstc.c
rename to arch/arm/mach-sirf/rstc.c
diff --git a/arch/arm/mach-prima2/rtciobrg.c b/arch/arm/mach-sirf/rtciobrg.c
similarity index 100%
rename from arch/arm/mach-prima2/rtciobrg.c
rename to arch/arm/mach-sirf/rtciobrg.c
diff --git a/arch/arm/mach-prima2/sleep.S b/arch/arm/mach-sirf/sleep.S
similarity index 100%
rename from arch/arm/mach-prima2/sleep.S
rename to arch/arm/mach-sirf/sleep.S
diff --git a/arch/arm/mach-prima2/timer.c b/arch/arm/mach-sirf/timer.c
similarity index 100%
rename from arch/arm/mach-prima2/timer.c
rename to arch/arm/mach-sirf/timer.c
-- 
1.7.0.4



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog

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

* [PATCH 3/3] ARM: SIRF: make sirf irqchip driver selectable since new SoCs will have GIC
  2012-08-20  8:19 [PATCH 0/3] ARM: PRIMA2: some patches prepared to support new SiRF SoCs Barry Song
  2012-08-20  8:19 ` [PATCH 1/3] ARM: PRIMA2: use DT_MACHINE_START and convert to generic board Barry Song
  2012-08-20  8:19 ` [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC Barry Song
@ 2012-08-20  8:19 ` Barry Song
  2 siblings, 0 replies; 22+ messages in thread
From: Barry Song @ 2012-08-20  8:19 UTC (permalink / raw)
  To: linux-arm-kernel

From: Barry Song <Baohua.Song@csr.com>

New MARCO and POLO SoC uses GIC, so make irq.c selectable and select
it for PRIMAII

Signed-off-by: Barry Song <Baohua.Song@csr.com>
---
 arch/arm/mach-sirf/Kconfig  |    4 ++++
 arch/arm/mach-sirf/Makefile |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-sirf/Kconfig b/arch/arm/mach-sirf/Kconfig
index 811e782..fea4bd9 100644
--- a/arch/arm/mach-sirf/Kconfig
+++ b/arch/arm/mach-sirf/Kconfig
@@ -8,9 +8,13 @@ config ARCH_PRIMA2
 	bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
 	select CPU_V7
 	select ZONE_DMA
+	select SIRF_IRQ
 	help
           Support for CSR SiRFSoC ARM Cortex A9 Platform
 
 endchoice
 
+config SIRF_IRQ
+	bool
+
 endif
diff --git a/arch/arm/mach-sirf/Makefile b/arch/arm/mach-sirf/Makefile
index 852af49..3103fdf 100644
--- a/arch/arm/mach-sirf/Makefile
+++ b/arch/arm/mach-sirf/Makefile
@@ -1,8 +1,8 @@
 obj-y := timer.o
-obj-y += irq.o
 obj-y += rstc.o
 obj-y += board-generic.o
 obj-y += rtciobrg.o
 obj-$(CONFIG_DEBUG_LL) += lluart.o
 obj-$(CONFIG_CACHE_L2X0) += l2x0.o
 obj-$(CONFIG_SUSPEND) += pm.o sleep.o
+obj-$(CONFIG_SIRF_IRQ) += irq.o
-- 
1.7.0.4



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog

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

* [PATCH 1/3] ARM: PRIMA2: use DT_MACHINE_START and convert to generic board
  2012-08-20  8:19 ` [PATCH 1/3] ARM: PRIMA2: use DT_MACHINE_START and convert to generic board Barry Song
@ 2012-08-20 20:56   ` Arnd Bergmann
  2012-08-21  1:49     ` Barry Song
  0 siblings, 1 reply; 22+ messages in thread
From: Arnd Bergmann @ 2012-08-20 20:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 20 August 2012, Barry Song wrote:
> From: Barry Song <Baohua.Song@csr.com>
> 
> we will have SiRFMarco and SiRFPolo, all of them will be in the
> generic board.
> 
> Signed-off-by: Barry Song <Baohua.Song@csr.com>
> ---
>  arch/arm/mach-prima2/Makefile                      |    2 +-
>  arch/arm/mach-prima2/{prima2.c => board-generic.c} |   10 ++++++----
>  2 files changed, 7 insertions(+), 5 deletions(-)
>  rename arch/arm/mach-prima2/{prima2.c => board-generic.c} (81%)

I would prefer not to have a board-* file in there, because it's not
specific to a board. If you want to get rid of the prima2 name in it,
you can call it common.c.

> diff --git a/arch/arm/mach-prima2/prima2.c b/arch/arm/mach-prima2/board-generic.c
> similarity index 81%
> rename from arch/arm/mach-prima2/prima2.c
> rename to arch/arm/mach-prima2/board-generic.c
> index e9a17ae..f06b887 100644
> --- a/arch/arm/mach-prima2/prima2.c
> +++ b/arch/arm/mach-prima2/board-generic.c
> @@ -30,12 +30,13 @@ void __init sirfsoc_init_late(void)
>  	sirfsoc_pm_init();
>  }
>  
> -static const char *prima2cb_dt_match[] __initdata = {
> -       "sirf,prima2-cb",
> +#ifdef CONFIG_ARCH_PRIMA2
> +static const char *prima2_dt_match[] __initdata = {
> +       "sirf,prima2",
>         NULL
>  };
>  
> -MACHINE_START(PRIMA2_EVB, "prima2cb")
> +DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
>  	/* Maintainer: Barry Song <baohua.song@csr.com> */
>  	.atag_offset	= 0x100,
>  	.map_io         = sirfsoc_map_lluart,
> @@ -44,6 +45,7 @@ MACHINE_START(PRIMA2_EVB, "prima2cb")
>  	.dma_zone_size	= SZ_256M,
>  	.init_machine	= sirfsoc_mach_init,
>  	.init_late	= sirfsoc_init_late,
> -	.dt_compat      = prima2cb_dt_match,
> +	.dt_compat      = prima2_dt_match,
>  	.restart	= sirfsoc_restart,
>  MACHINE_END
> +#endif

I suppose this never really worked before then?

	Arnd

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

* [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC
  2012-08-20  8:19 ` [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC Barry Song
@ 2012-08-20 21:06   ` Arnd Bergmann
  2012-08-21  1:56     ` Barry Song
  2012-08-21  2:06     ` Barry Song
  0 siblings, 2 replies; 22+ messages in thread
From: Arnd Bergmann @ 2012-08-20 21:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 20 August 2012, Barry Song wrote:
> From: Barry Song <Baohua.Song@csr.com>
> 
> We will have SiRF Marco and Polo, so rename the dir to mach-sirf
> and add Kconfig menu
> 
> Signed-off-by: Baohua Song <Baohua.Song@csr.com>
> ---
>  arch/arm/Kconfig                                   |   10 +++++-----
>  arch/arm/Makefile                                  |    2 +-
>  arch/arm/mach-sirf/Kconfig                         |   16 ++++++++++++++++
>  arch/arm/{mach-prima2 => mach-sirf}/Makefile       |    0
>  arch/arm/{mach-prima2 => mach-sirf}/Makefile.boot  |    0
>  .../arm/{mach-prima2 => mach-sirf}/board-generic.c |    0
>  arch/arm/{mach-prima2 => mach-sirf}/common.h       |    0
>  .../include/mach/clkdev.h                          |    0
>  .../include/mach/debug-macro.S                     |    0
>  .../include/mach/entry-macro.S                     |    0
>  .../{mach-prima2 => mach-sirf}/include/mach/gpio.h |    0
>  .../include/mach/hardware.h                        |    0
>  .../{mach-prima2 => mach-sirf}/include/mach/irqs.h |    0
>  .../{mach-prima2 => mach-sirf}/include/mach/map.h  |    0

I'm not sure if we should rename all of these right now. I've been thinking
about moving all of recent and simple ARMv7 based platforms (socfpga, zynq,
prima2, ...) into a single directory, where they would basically end up
being one file per platform. We should discuss this at the ARM mini summit,
and I can let you know the outcome of it. I don't object on the rename in
principle, but it might end up causing extra churn.

> +if ARCH_SIRF
> +
> +choice
> +       prompt "Qualcomm SiRF SoC Type"
> +       default ARCH_PRIMA2

I'm curious about this: I did read that Samsung acquired CSR, and
you list the chips as Qualcomm. What's the story here?

> +config ARCH_PRIMA2
> +       bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
> +       select CPU_V7
> +       select ZONE_DMA
> +       help
> +          Support for CSR SiRFSoC ARM Cortex A9 Platform
> +
> +endchoice

Is this still needed? When you add other SoC type here, would you
build kernels that are for just one of them in practice?  If they
are completely generic anyway, you can skip the submenu.

	Arnd

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

* [PATCH 1/3] ARM: PRIMA2: use DT_MACHINE_START and convert to generic board
  2012-08-20 20:56   ` Arnd Bergmann
@ 2012-08-21  1:49     ` Barry Song
  2012-08-21  7:53       ` Arnd Bergmann
  0 siblings, 1 reply; 22+ messages in thread
From: Barry Song @ 2012-08-21  1:49 UTC (permalink / raw)
  To: linux-arm-kernel

2012/8/21 Arnd Bergmann <arnd@arndb.de>:
> On Monday 20 August 2012, Barry Song wrote:
>> From: Barry Song <Baohua.Song@csr.com>
>>
>> we will have SiRFMarco and SiRFPolo, all of them will be in the
>> generic board.
>>
>> Signed-off-by: Barry Song <Baohua.Song@csr.com>
>> ---
>>  arch/arm/mach-prima2/Makefile                      |    2 +-
>>  arch/arm/mach-prima2/{prima2.c => board-generic.c} |   10 ++++++----
>>  2 files changed, 7 insertions(+), 5 deletions(-)
>>  rename arch/arm/mach-prima2/{prima2.c => board-generic.c} (81%)
>
> I would prefer not to have a board-* file in there, because it's not
> specific to a board. If you want to get rid of the prima2 name in it,
> you can call it common.c.

that is fine to me. i rename to board-generic.c just because omap and
some others did like that.
and i'll add marco and polo DT_MACHINE_START to this file too.

>
>> diff --git a/arch/arm/mach-prima2/prima2.c b/arch/arm/mach-prima2/board-generic.c
>> similarity index 81%
>> rename from arch/arm/mach-prima2/prima2.c
>> rename to arch/arm/mach-prima2/board-generic.c
>> index e9a17ae..f06b887 100644
>> --- a/arch/arm/mach-prima2/prima2.c
>> +++ b/arch/arm/mach-prima2/board-generic.c
>> @@ -30,12 +30,13 @@ void __init sirfsoc_init_late(void)
>>       sirfsoc_pm_init();
>>  }
>>
>> -static const char *prima2cb_dt_match[] __initdata = {
>> -       "sirf,prima2-cb",
>> +#ifdef CONFIG_ARCH_PRIMA2
>> +static const char *prima2_dt_match[] __initdata = {
>> +       "sirf,prima2",
>>         NULL
>>  };
>>
>> -MACHINE_START(PRIMA2_EVB, "prima2cb")
>> +DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
>>       /* Maintainer: Barry Song <baohua.song@csr.com> */
>>       .atag_offset    = 0x100,
>>       .map_io         = sirfsoc_map_lluart,
>> @@ -44,6 +45,7 @@ MACHINE_START(PRIMA2_EVB, "prima2cb")
>>       .dma_zone_size  = SZ_256M,
>>       .init_machine   = sirfsoc_mach_init,
>>       .init_late      = sirfsoc_init_late,
>> -     .dt_compat      = prima2cb_dt_match,
>> +     .dt_compat      = prima2_dt_match,
>>       .restart        = sirfsoc_restart,
>>  MACHINE_END
>> +#endif
>
> I suppose this never really worked before then?

i am not sure what you mean, but this does work and i tested and found
prima2 can boot normally.

>
>         Arnd

-barry

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

* [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC
  2012-08-20 21:06   ` Arnd Bergmann
@ 2012-08-21  1:56     ` Barry Song
  2012-08-21  7:57       ` Arnd Bergmann
  2012-08-21  9:29       ` Barry Song
  2012-08-21  2:06     ` Barry Song
  1 sibling, 2 replies; 22+ messages in thread
From: Barry Song @ 2012-08-21  1:56 UTC (permalink / raw)
  To: linux-arm-kernel

2012/8/21 Arnd Bergmann <arnd@arndb.de>:
> On Monday 20 August 2012, Barry Song wrote:
>> From: Barry Song <Baohua.Song@csr.com>
>>
>> We will have SiRF Marco and Polo, so rename the dir to mach-sirf
>> and add Kconfig menu
>>
>> Signed-off-by: Baohua Song <Baohua.Song@csr.com>
>> ---
>>  arch/arm/Kconfig                                   |   10 +++++-----
>>  arch/arm/Makefile                                  |    2 +-
>>  arch/arm/mach-sirf/Kconfig                         |   16 ++++++++++++++++
>>  arch/arm/{mach-prima2 => mach-sirf}/Makefile       |    0
>>  arch/arm/{mach-prima2 => mach-sirf}/Makefile.boot  |    0
>>  .../arm/{mach-prima2 => mach-sirf}/board-generic.c |    0
>>  arch/arm/{mach-prima2 => mach-sirf}/common.h       |    0
>>  .../include/mach/clkdev.h                          |    0
>>  .../include/mach/debug-macro.S                     |    0
>>  .../include/mach/entry-macro.S                     |    0
>>  .../{mach-prima2 => mach-sirf}/include/mach/gpio.h |    0
>>  .../include/mach/hardware.h                        |    0
>>  .../{mach-prima2 => mach-sirf}/include/mach/irqs.h |    0
>>  .../{mach-prima2 => mach-sirf}/include/mach/map.h  |    0
>
> I'm not sure if we should rename all of these right now. I've been thinking
> about moving all of recent and simple ARMv7 based platforms (socfpga, zynq,
> prima2, ...) into a single directory, where they would basically end up
> being one file per platform. We should discuss this at the ARM mini summit,
> and I can let you know the outcome of it. I don't object on the rename in
> principle, but it might end up causing extra churn.

ok. i will follow the output of  ARM mini summit.

>
>> +if ARCH_SIRF
>> +
>> +choice
>> +       prompt "Qualcomm SiRF SoC Type"
>> +       default ARCH_PRIMA2
>
> I'm curious about this: I did read that Samsung acquired CSR, and
> you list the chips as Qualcomm. What's the story here?

sorry. this is typo.
prompt "Qualcomm SiRF SoC Type"
->
prompt "CSR SiRF SoC Type"

>
>> +config ARCH_PRIMA2
>> +       bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
>> +       select CPU_V7
>> +       select ZONE_DMA
>> +       help
>> +          Support for CSR SiRFSoC ARM Cortex A9 Platform
>> +
>> +endchoice
>
> Is this still needed? When you add other SoC type here, would you
> build kernels that are for just one of them in practice?  If they
> are completely generic anyway, you can skip the submenu.
>

for the moment, that is needed just because the DEBUG UART base
address is difficult for different SoC. debug-macro.S is very early,
it depends on the SIRFSOC_UART1_PA_BASE.

 /* UART-1: used as serial debug port */
 #ifdef CONFIG_ARCH_PRIMA2
#define SIRFSOC_UART1_PA_BASE          0xb0060000
 #elif defined(CONFIG_ARCH_MARCO)
#define SIRFSOC_UART1_PA_BASE          0xcc060000
#endif
otherwise, PRIMA2 and MARCO can co-exist.

i think i can find some ways to set the rp dynamically according to chip type.
         .macro  addruart, rp, rv, tmp
         ldr     \rp, =SIRFSOC_UART1_PA_BASE             @ physical
         ldr     \rv, =SIRFSOC_UART1_VA_BASE             @ virtual
         .endm


>         Arnd
>

-barry

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

* [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC
  2012-08-20 21:06   ` Arnd Bergmann
  2012-08-21  1:56     ` Barry Song
@ 2012-08-21  2:06     ` Barry Song
  2012-08-21  7:55       ` Arnd Bergmann
  1 sibling, 1 reply; 22+ messages in thread
From: Barry Song @ 2012-08-21  2:06 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd,

more comments.

2012/8/21 Arnd Bergmann <arnd@arndb.de>:
> On Monday 20 August 2012, Barry Song wrote:
>> From: Barry Song <Baohua.Song@csr.com>
>>
>> We will have SiRF Marco and Polo, so rename the dir to mach-sirf
>> and add Kconfig menu
>>
>> Signed-off-by: Baohua Song <Baohua.Song@csr.com>
>> ---
>>  arch/arm/Kconfig                                   |   10 +++++-----
>>  arch/arm/Makefile                                  |    2 +-
>>  arch/arm/mach-sirf/Kconfig                         |   16 ++++++++++++++++
>>  arch/arm/{mach-prima2 => mach-sirf}/Makefile       |    0
>>  arch/arm/{mach-prima2 => mach-sirf}/Makefile.boot  |    0
>>  .../arm/{mach-prima2 => mach-sirf}/board-generic.c |    0
>>  arch/arm/{mach-prima2 => mach-sirf}/common.h       |    0
>>  .../include/mach/clkdev.h                          |    0
>>  .../include/mach/debug-macro.S                     |    0
>>  .../include/mach/entry-macro.S                     |    0
>>  .../{mach-prima2 => mach-sirf}/include/mach/gpio.h |    0
>>  .../include/mach/hardware.h                        |    0
>>  .../{mach-prima2 => mach-sirf}/include/mach/irqs.h |    0
>>  .../{mach-prima2 => mach-sirf}/include/mach/map.h  |    0
>
> I'm not sure if we should rename all of these right now. I've been thinking
> about moving all of recent and simple ARMv7 based platforms (socfpga, zynq,
> prima2, ...) into a single directory, where they would basically end up
> being one file per platform. We should discuss this at the ARM mini summit,
> and I can let you know the outcome of it. I don't object on the rename in
> principle, but it might end up causing extra churn.

we will have other SoCs which are more complex than primaII. i am not
sure whether you can merge all of them into a single dir together with
zynq or other platforms.
i am debugging the patches of MARCO and will send them soon. this
series is just preparing for delivering MARCO patches.

>
>> +if ARCH_SIRF
>> +
>> +choice
>> +       prompt "Qualcomm SiRF SoC Type"
>> +       default ARCH_PRIMA2
>
> I'm curious about this: I did read that Samsung acquired CSR, and
> you list the chips as Qualcomm. What's the story here?

BTW, i just want to clarify Samsung  acquired the mobile business of
CSR, not including our primaII or other SoCs.

>
>> +config ARCH_PRIMA2
>> +       bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
>> +       select CPU_V7
>> +       select ZONE_DMA
>> +       help
>> +          Support for CSR SiRFSoC ARM Cortex A9 Platform
>> +
>> +endchoice
>
> Is this still needed? When you add other SoC type here, would you
> build kernels that are for just one of them in practice?  If they
> are completely generic anyway, you can skip the submenu.
>
>         Arnd
>

-barry

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

* [PATCH 1/3] ARM: PRIMA2: use DT_MACHINE_START and convert to generic board
  2012-08-21  1:49     ` Barry Song
@ 2012-08-21  7:53       ` Arnd Bergmann
  2012-08-21  8:26         ` Barry Song
  0 siblings, 1 reply; 22+ messages in thread
From: Arnd Bergmann @ 2012-08-21  7:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 21 August 2012, Barry Song wrote:
> 2012/8/21 Arnd Bergmann <arnd@arndb.de>:
> > On Monday 20 August 2012, Barry Song wrote:
> >
> > I would prefer not to have a board-* file in there, because it's not
> > specific to a board. If you want to get rid of the prima2 name in it,
> > you can call it common.c.
> 
> that is fine to me. i rename to board-generic.c just because omap and
> some others did like that.
> and i'll add marco and polo DT_MACHINE_START to this file too.

Ok. For the older platforms that have a lot of non-DT board files, it makes
sense to have a separate board-generic.c file.

> >> diff --git a/arch/arm/mach-prima2/prima2.c b/arch/arm/mach-prima2/board-generic.c
> >> similarity index 81%
> >> rename from arch/arm/mach-prima2/prima2.c
> >> rename to arch/arm/mach-prima2/board-generic.c
> >> index e9a17ae..f06b887 100644
> >> --- a/arch/arm/mach-prima2/prima2.c
> >> +++ b/arch/arm/mach-prima2/board-generic.c
> >> @@ -30,12 +30,13 @@ void __init sirfsoc_init_late(void)
> >>       sirfsoc_pm_init();
> >>  }
> >>
> >> -static const char *prima2cb_dt_match[] __initdata = {
> >> -       "sirf,prima2-cb",
> >> +#ifdef CONFIG_ARCH_PRIMA2
> >> +static const char *prima2_dt_match[] __initdata = {
> >> +       "sirf,prima2",
> >>         NULL
> >>  };
> >>
> >> -MACHINE_START(PRIMA2_EVB, "prima2cb")
> >> +DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
> >>       /* Maintainer: Barry Song <baohua.song@csr.com> */
> >>       .atag_offset    = 0x100,
> >>       .map_io         = sirfsoc_map_lluart,
> >> @@ -44,6 +45,7 @@ MACHINE_START(PRIMA2_EVB, "prima2cb")
> >>       .dma_zone_size  = SZ_256M,
> >>       .init_machine   = sirfsoc_mach_init,
> >>       .init_late      = sirfsoc_init_late,
> >> -     .dt_compat      = prima2cb_dt_match,
> >> +     .dt_compat      = prima2_dt_match,
> >>       .restart        = sirfsoc_restart,
> >>  MACHINE_END
> >> +#endif
> >
> > I suppose this never really worked before then?
> 
> i am not sure what you mean, but this does work and i tested and found
> prima2 can boot normally.

I mean the old version, not the new one. If you use MACHINE_START,
you cannot access the device tree data from the boot loader, which
means that none of the device drivers find their devices.

I also just noticed that you ahve both the .atag_offset and the .dt_compat
field set here, which is a bit strange as the dt_compat field was previously
unused. Now, the .atag_offset field is unused, so you should remove that.

	Arnd

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

* [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC
  2012-08-21  2:06     ` Barry Song
@ 2012-08-21  7:55       ` Arnd Bergmann
  0 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2012-08-21  7:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 21 August 2012, Barry Song wrote:
> >
> >> +if ARCH_SIRF
> >> +
> >> +choice
> >> +       prompt "Qualcomm SiRF SoC Type"
> >> +       default ARCH_PRIMA2
> >
> > I'm curious about this: I did read that Samsung acquired CSR, and
> > you list the chips as Qualcomm. What's the story here?
> 
> BTW, i just want to clarify Samsung  acquired the mobile business of
> CSR, not including our primaII or other SoCs.

Ah, I had not realized that. Thanks for the clarification.

	Arnd

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

* [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC
  2012-08-21  1:56     ` Barry Song
@ 2012-08-21  7:57       ` Arnd Bergmann
  2012-08-21  9:16         ` Barry Song
  2012-08-21  9:29       ` Barry Song
  1 sibling, 1 reply; 22+ messages in thread
From: Arnd Bergmann @ 2012-08-21  7:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 21 August 2012, Barry Song wrote:
> for the moment, that is needed just because the DEBUG UART base
> address is difficult for different SoC. debug-macro.S is very early,
> it depends on the SIRFSOC_UART1_PA_BASE.
> 
>  /* UART-1: used as serial debug port */
>  #ifdef CONFIG_ARCH_PRIMA2
> #define SIRFSOC_UART1_PA_BASE          0xb0060000
>  #elif defined(CONFIG_ARCH_MARCO)
> #define SIRFSOC_UART1_PA_BASE          0xcc060000
> #endif
> otherwise, PRIMA2 and MARCO can co-exist.

Ok, I see.

> i think i can find some ways to set the rp dynamically according to chip type.
>          .macro  addruart, rp, rv, tmp
>          ldr     \rp, =SIRFSOC_UART1_PA_BASE             @ physical
>          ldr     \rv, =SIRFSOC_UART1_VA_BASE             @ virtual
>          .endm

The most common way to do this is to have multiple entries in
arch/arm/Kconfig.debug in the "Kernel low-level debugging port"
menu. For production kernels, you would just leave out DEBUG_LL
while for debugging you have to pick one UART.

	Arnd

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

* [PATCH 1/3] ARM: PRIMA2: use DT_MACHINE_START and convert to generic board
  2012-08-21  7:53       ` Arnd Bergmann
@ 2012-08-21  8:26         ` Barry Song
  2012-08-21  8:44           ` Arnd Bergmann
  0 siblings, 1 reply; 22+ messages in thread
From: Barry Song @ 2012-08-21  8:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd,
Thanks.

2012/8/21 Arnd Bergmann <arnd@arndb.de>:
> On Tuesday 21 August 2012, Barry Song wrote:
>> 2012/8/21 Arnd Bergmann <arnd@arndb.de>:
>> > On Monday 20 August 2012, Barry Song wrote:
>> >
>> > I would prefer not to have a board-* file in there, because it's not
>> > specific to a board. If you want to get rid of the prima2 name in it,
>> > you can call it common.c.
>>
>> that is fine to me. i rename to board-generic.c just because omap and
>> some others did like that.
>> and i'll add marco and polo DT_MACHINE_START to this file too.
>
> Ok. For the older platforms that have a lot of non-DT board files, it makes
> sense to have a separate board-generic.c file.

ok. then renaming to common.c is better for this full-DT platform.

>
>> >> diff --git a/arch/arm/mach-prima2/prima2.c b/arch/arm/mach-prima2/board-generic.c
>> >> similarity index 81%
>> >> rename from arch/arm/mach-prima2/prima2.c
>> >> rename to arch/arm/mach-prima2/board-generic.c
>> >> index e9a17ae..f06b887 100644
>> >> --- a/arch/arm/mach-prima2/prima2.c
>> >> +++ b/arch/arm/mach-prima2/board-generic.c
>> >> @@ -30,12 +30,13 @@ void __init sirfsoc_init_late(void)
>> >>       sirfsoc_pm_init();
>> >>  }
>> >>
>> >> -static const char *prima2cb_dt_match[] __initdata = {
>> >> -       "sirf,prima2-cb",
>> >> +#ifdef CONFIG_ARCH_PRIMA2
>> >> +static const char *prima2_dt_match[] __initdata = {
>> >> +       "sirf,prima2",
>> >>         NULL
>> >>  };
>> >>
>> >> -MACHINE_START(PRIMA2_EVB, "prima2cb")
>> >> +DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
>> >>       /* Maintainer: Barry Song <baohua.song@csr.com> */
>> >>       .atag_offset    = 0x100,
>> >>       .map_io         = sirfsoc_map_lluart,
>> >> @@ -44,6 +45,7 @@ MACHINE_START(PRIMA2_EVB, "prima2cb")
>> >>       .dma_zone_size  = SZ_256M,
>> >>       .init_machine   = sirfsoc_mach_init,
>> >>       .init_late      = sirfsoc_init_late,
>> >> -     .dt_compat      = prima2cb_dt_match,
>> >> +     .dt_compat      = prima2_dt_match,
>> >>       .restart        = sirfsoc_restart,
>> >>  MACHINE_END
>> >> +#endif
>> >
>> > I suppose this never really worked before then?
>>
>> i am not sure what you mean, but this does work and i tested and found
>> prima2 can boot normally.
>
> I mean the old version, not the new one. If you use MACHINE_START,
> you cannot access the device tree data from the boot loader, which
> means that none of the device drivers find their devices.

sorry i didn't get you.

DT is read to 0x3608000 by bootloader, and bootm has param "bootm
0x02008000 - 0x3608000" as:

bootcmd=mmc read 0 0x3608000 0x3780 0x80;mmc read 0 0x02008000 0x1800
0x1800;fdt addr 0x3608000;
fdt resize;bootm 0x02008000 - 0x3608000

kernel has been always able to read DT data from bootloader.

>
> I also just noticed that you ahve both the .atag_offset and the .dt_compat
> field set here, which is a bit strange as the dt_compat field was previously
> unused. Now, the .atag_offset field is unused, so you should remove that.
>

i'll remove .atag_offset field then.

>         Arnd

-barry

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

* [PATCH 1/3] ARM: PRIMA2: use DT_MACHINE_START and convert to generic board
  2012-08-21  8:26         ` Barry Song
@ 2012-08-21  8:44           ` Arnd Bergmann
  0 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2012-08-21  8:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 21 August 2012, Barry Song wrote:
> > I mean the old version, not the new one. If you use MACHINE_START,
> > you cannot access the device tree data from the boot loader, which
> > means that none of the device drivers find their devices.
> 
> sorry i didn't get you.
> 
> DT is read to 0x3608000 by bootloader, and bootm has param "bootm
> 0x02008000 - 0x3608000" as:
> 
> bootcmd=mmc read 0 0x3608000 0x3780 0x80;mmc read 0 0x02008000 0x1800
> 0x1800;fdt addr 0x3608000;
> fdt resize;bootm 0x02008000 - 0x3608000
> 
> kernel has been always able to read DT data from bootloader.

Ah, right. I had to read the initialition code again, my incorrect
assumption was that we could not use a machine_desc that is
declared with MACHINE_START() together with a flattened device tree.

	Arnd

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

* [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC
  2012-08-21  7:57       ` Arnd Bergmann
@ 2012-08-21  9:16         ` Barry Song
  2012-08-21  9:20           ` Arnd Bergmann
  0 siblings, 1 reply; 22+ messages in thread
From: Barry Song @ 2012-08-21  9:16 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd,

2012/8/21 Arnd Bergmann <arnd@arndb.de>:
> On Tuesday 21 August 2012, Barry Song wrote:
>> for the moment, that is needed just because the DEBUG UART base
>> address is difficult for different SoC. debug-macro.S is very early,
>> it depends on the SIRFSOC_UART1_PA_BASE.
>>
>>  /* UART-1: used as serial debug port */
>>  #ifdef CONFIG_ARCH_PRIMA2
>> #define SIRFSOC_UART1_PA_BASE          0xb0060000
>>  #elif defined(CONFIG_ARCH_MARCO)
>> #define SIRFSOC_UART1_PA_BASE          0xcc060000
>> #endif
>> otherwise, PRIMA2 and MARCO can co-exist.
>
> Ok, I see.
>
>> i think i can find some ways to set the rp dynamically according to chip type.
>>          .macro  addruart, rp, rv, tmp
>>          ldr     \rp, =SIRFSOC_UART1_PA_BASE             @ physical
>>          ldr     \rv, =SIRFSOC_UART1_VA_BASE             @ virtual
>>          .endm
>
> The most common way to do this is to have multiple entries in
> arch/arm/Kconfig.debug in the "Kernel low-level debugging port"
> menu. For production kernels, you would just leave out DEBUG_LL
> while for debugging you have to pick one UART.

then i add these to Kconfig.debug as it is a common way

        config DEBUG_PRIMA2_UART1
                bool "Kernel low-level debugging on DaVinci DA8XX using UART1"
                depends on ARCH_PRIMA2
                help
                  Say Y here if you want the debug print routines to direct
                  their output to UART1 serial port on SiRFprimaII devices.

        config DEBUG_MARCO_UART1
                bool "Kernel low-level debugging on DaVinci DA8XX using UART2"
                depends on ARCH_MARCO
                help
                  Say Y here if you want the debug print routines to direct
                  their output to UART1 serial port on SiRFmarco devices.

and these in mach-prima2/include/mach/uart.h

  #ifdef CONFIG_DEBUG_PRIMA2_UART1
  #define SIRFSOC_UART1_PA_BASE          0xb0060000
  #elif defined(CONFIG_DEBUG_MARCO_UART1)
  #define SIRFSOC_UART1_PA_BASE          0xcc060000
  #endif

the above codes seem still ugly ?

>
>         Arnd

-barry

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

* [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC
  2012-08-21  9:16         ` Barry Song
@ 2012-08-21  9:20           ` Arnd Bergmann
  2012-08-28  6:15             ` Barry Song
  0 siblings, 1 reply; 22+ messages in thread
From: Arnd Bergmann @ 2012-08-21  9:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 21 August 2012, Barry Song wrote:
> then i add these to Kconfig.debug as it is a common way
> 
>         config DEBUG_PRIMA2_UART1
>                 bool "Kernel low-level debugging on DaVinci DA8XX using UART1"
>                 depends on ARCH_PRIMA2
>                 help
>                   Say Y here if you want the debug print routines to direct
>                   their output to UART1 serial port on SiRFprimaII devices.
> 
>         config DEBUG_MARCO_UART1
>                 bool "Kernel low-level debugging on DaVinci DA8XX using UART2"
>                 depends on ARCH_MARCO
>                 help
>                   Say Y here if you want the debug print routines to direct
>                   their output to UART1 serial port on SiRFmarco devices.
> 
> and these in mach-prima2/include/mach/uart.h
> 
>   #ifdef CONFIG_DEBUG_PRIMA2_UART1
>   #define SIRFSOC_UART1_PA_BASE          0xb0060000
>   #elif defined(CONFIG_DEBUG_MARCO_UART1)
>   #define SIRFSOC_UART1_PA_BASE          0xcc060000
>   #endif
> 
> the above codes seem still ugly ?
> 

No, that's fine, about as a good as it gets with today's kernel
capabilities. Just fix the description to have the correct
SoC name instead of "DaVinci DA8XX" ;-)

	Arnd

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

* [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC
  2012-08-21  1:56     ` Barry Song
  2012-08-21  7:57       ` Arnd Bergmann
@ 2012-08-21  9:29       ` Barry Song
  2012-08-21 10:16         ` Arnd Bergmann
  1 sibling, 1 reply; 22+ messages in thread
From: Barry Song @ 2012-08-21  9:29 UTC (permalink / raw)
  To: linux-arm-kernel

2012/8/21 Barry Song <21cnbao@gmail.com>:
> 2012/8/21 Arnd Bergmann <arnd@arndb.de>:
>> On Monday 20 August 2012, Barry Song wrote:
>>> From: Barry Song <Baohua.Song@csr.com>
>>>
>>> We will have SiRF Marco and Polo, so rename the dir to mach-sirf
>>> and add Kconfig menu
>>>
>>> Signed-off-by: Baohua Song <Baohua.Song@csr.com>
>>> ---
>>>  arch/arm/Kconfig                                   |   10 +++++-----
>>>  arch/arm/Makefile                                  |    2 +-
>>>  arch/arm/mach-sirf/Kconfig                         |   16 ++++++++++++++++
>>>  arch/arm/{mach-prima2 => mach-sirf}/Makefile       |    0
>>>  arch/arm/{mach-prima2 => mach-sirf}/Makefile.boot  |    0
>>>  .../arm/{mach-prima2 => mach-sirf}/board-generic.c |    0
>>>  arch/arm/{mach-prima2 => mach-sirf}/common.h       |    0
>>>  .../include/mach/clkdev.h                          |    0
>>>  .../include/mach/debug-macro.S                     |    0
>>>  .../include/mach/entry-macro.S                     |    0
>>>  .../{mach-prima2 => mach-sirf}/include/mach/gpio.h |    0
>>>  .../include/mach/hardware.h                        |    0
>>>  .../{mach-prima2 => mach-sirf}/include/mach/irqs.h |    0
>>>  .../{mach-prima2 => mach-sirf}/include/mach/map.h  |    0
>>
>> I'm not sure if we should rename all of these right now. I've been thinking
>> about moving all of recent and simple ARMv7 based platforms (socfpga, zynq,
>> prima2, ...) into a single directory, where they would basically end up
>> being one file per platform. We should discuss this at the ARM mini summit,
>> and I can let you know the outcome of it. I don't object on the rename in
>> principle, but it might end up causing extra churn.
>
> ok. i will follow the output of  ARM mini summit.

i would think merging several SoCs into a dir still needs much time.
if the whole rename is too aggresive for the moment, how about keeping
the mach-prima2 temporarily, but this prima2 dir will also include the
coming Marco stuff?

-barry

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

* [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC
  2012-08-21  9:29       ` Barry Song
@ 2012-08-21 10:16         ` Arnd Bergmann
  0 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2012-08-21 10:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 21 August 2012, Barry Song wrote:
> i would think merging several SoCs into a dir still needs much time.
> if the whole rename is too aggresive for the moment, how about keeping
> the mach-prima2 temporarily, but this prima2 dir will also include the
> coming Marco stuff?
> 

Yes, that is what I meant. Sorry if I wasn't clear on that. Please send
the marco patches adding the code in the mach-prima2 directory.


	Arnd

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

* [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC
  2012-08-21  9:20           ` Arnd Bergmann
@ 2012-08-28  6:15             ` Barry Song
  2012-08-28  8:08               ` Barry Song
  0 siblings, 1 reply; 22+ messages in thread
From: Barry Song @ 2012-08-28  6:15 UTC (permalink / raw)
  To: linux-arm-kernel

2012/8/21 Arnd Bergmann <arnd@arndb.de>:
> On Tuesday 21 August 2012, Barry Song wrote:
>> then i add these to Kconfig.debug as it is a common way
>>
>>         config DEBUG_PRIMA2_UART1
>>                 bool "Kernel low-level debugging on DaVinci DA8XX using UART1"
>>                 depends on ARCH_PRIMA2
>>                 help
>>                   Say Y here if you want the debug print routines to direct
>>                   their output to UART1 serial port on SiRFprimaII devices.
>>
>>         config DEBUG_MARCO_UART1
>>                 bool "Kernel low-level debugging on DaVinci DA8XX using UART2"
>>                 depends on ARCH_MARCO
>>                 help
>>                   Say Y here if you want the debug print routines to direct
>>                   their output to UART1 serial port on SiRFmarco devices.
>>
>> and these in mach-prima2/include/mach/uart.h
>>
>>   #ifdef CONFIG_DEBUG_PRIMA2_UART1
>>   #define SIRFSOC_UART1_PA_BASE          0xb0060000
>>   #elif defined(CONFIG_DEBUG_MARCO_UART1)
>>   #define SIRFSOC_UART1_PA_BASE          0xcc060000
>>   #endif
>>
>> the above codes seem still ugly ?
>>
>
> No, that's fine, about as a good as it gets with today's kernel
> capabilities. Just fix the description to have the correct
> SoC name instead of "DaVinci DA8XX" ;-)

except the DEBUG_LL uart base address, i missed the zreladdr-y. for
primaii, it is 0x00008000, for marco, it is 0x40008000 as marco's
memory space begins from 0x4000000.
i would to have AUTO_ZRELADDR for the whole SiRF series.
but for uImage load address difference in uImage header, which blocks
multiple SoCs from using same uImage, is "KERNEL_NOLOAD" uImage type
the current generic solution?

>
>         Arnd

-barry

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

* [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC
  2012-08-28  6:15             ` Barry Song
@ 2012-08-28  8:08               ` Barry Song
  2012-08-28 14:28                 ` Stephen Warren
  0 siblings, 1 reply; 22+ messages in thread
From: Barry Song @ 2012-08-28  8:08 UTC (permalink / raw)
  To: linux-arm-kernel

2012/8/28 Barry Song <21cnbao@gmail.com>:
> 2012/8/21 Arnd Bergmann <arnd@arndb.de>:
>> On Tuesday 21 August 2012, Barry Song wrote:
>>> then i add these to Kconfig.debug as it is a common way
>>>
>>>         config DEBUG_PRIMA2_UART1
>>>                 bool "Kernel low-level debugging on DaVinci DA8XX using UART1"
>>>                 depends on ARCH_PRIMA2
>>>                 help
>>>                   Say Y here if you want the debug print routines to direct
>>>                   their output to UART1 serial port on SiRFprimaII devices.
>>>
>>>         config DEBUG_MARCO_UART1
>>>                 bool "Kernel low-level debugging on DaVinci DA8XX using UART2"
>>>                 depends on ARCH_MARCO
>>>                 help
>>>                   Say Y here if you want the debug print routines to direct
>>>                   their output to UART1 serial port on SiRFmarco devices.
>>>
>>> and these in mach-prima2/include/mach/uart.h
>>>
>>>   #ifdef CONFIG_DEBUG_PRIMA2_UART1
>>>   #define SIRFSOC_UART1_PA_BASE          0xb0060000
>>>   #elif defined(CONFIG_DEBUG_MARCO_UART1)
>>>   #define SIRFSOC_UART1_PA_BASE          0xcc060000
>>>   #endif
>>>
>>> the above codes seem still ugly ?
>>>
>>
>> No, that's fine, about as a good as it gets with today's kernel
>> capabilities. Just fix the description to have the correct
>> SoC name instead of "DaVinci DA8XX" ;-)
>
> except the DEBUG_LL uart base address, i missed the zreladdr-y. for
> primaii, it is 0x00008000, for marco, it is 0x40008000 as marco's
> memory space begins from 0x4000000.
> i would to have AUTO_ZRELADDR for the whole SiRF series.
> but for uImage load address difference in uImage header, which blocks
> multiple SoCs from using same uImage, is "KERNEL_NOLOAD" uImage type
> the current generic solution?

also add Stephen Warren.

i have two verified ways to resolve this problem:

1. use "kernel noload", build uImage by:

make uImage UIMAGE_TYPE=kernel_noload
and add the following patch in kernel:

diff --git a/arch/arm/mach-prima2/Makefile.boot
b/arch/arm/mach-prima2/Makefile.boot
index 53c5225..059bcd7 100644
--- a/arch/arm/mach-prima2/Makefile.boot
+++ b/arch/arm/mach-prima2/Makefile.boot
@@ -1,12 +1,4 @@

-zreladdr-y             += 0x00008000
-params_phys-y          := 0x00000100
-initrd_phys-y          := 0x00800000
#we use kernel_noload uImage and AUTO_ZRELADDR
+zreladdr-y             += 0x0

2. don't use kernel's uImage target, mkimage uImage out of kernel by
giving mkimage the "-a 0x40008000" and keep kernel unchanged.

anyway, i think arm SoC needs a generic way to handle this kind of problem.

if we move to 1, i think almost all ARM SoCs don't need Makefile.boot again.

>
>>
>>         Arnd
>
> -barry

-barry

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

* [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC
  2012-08-28  8:08               ` Barry Song
@ 2012-08-28 14:28                 ` Stephen Warren
  2012-08-28 14:57                   ` Barry Song
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Warren @ 2012-08-28 14:28 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/28/2012 01:08 AM, Barry Song wrote:
> 2012/8/28 Barry Song <21cnbao@gmail.com>:
>> 2012/8/21 Arnd Bergmann <arnd@arndb.de>:
>>> On Tuesday 21 August 2012, Barry Song wrote:
>>>> then i add these to Kconfig.debug as it is a common way
>>>>
>>>>         config DEBUG_PRIMA2_UART1
>>>>                 bool "Kernel low-level debugging on DaVinci DA8XX using UART1"
>>>>                 depends on ARCH_PRIMA2
>>>>                 help
>>>>                   Say Y here if you want the debug print routines to direct
>>>>                   their output to UART1 serial port on SiRFprimaII devices.
>>>>
>>>>         config DEBUG_MARCO_UART1
>>>>                 bool "Kernel low-level debugging on DaVinci DA8XX using UART2"
>>>>                 depends on ARCH_MARCO
>>>>                 help
>>>>                   Say Y here if you want the debug print routines to direct
>>>>                   their output to UART1 serial port on SiRFmarco devices.
>>>>
>>>> and these in mach-prima2/include/mach/uart.h
>>>>
>>>>   #ifdef CONFIG_DEBUG_PRIMA2_UART1
>>>>   #define SIRFSOC_UART1_PA_BASE          0xb0060000
>>>>   #elif defined(CONFIG_DEBUG_MARCO_UART1)
>>>>   #define SIRFSOC_UART1_PA_BASE          0xcc060000
>>>>   #endif
>>>>
>>>> the above codes seem still ugly ?
>>>>
>>>
>>> No, that's fine, about as a good as it gets with today's kernel
>>> capabilities. Just fix the description to have the correct
>>> SoC name instead of "DaVinci DA8XX" ;-)
>>
>> except the DEBUG_LL uart base address, i missed the zreladdr-y. for
>> primaii, it is 0x00008000, for marco, it is 0x40008000 as marco's
>> memory space begins from 0x4000000.
>> i would to have AUTO_ZRELADDR for the whole SiRF series.
>> but for uImage load address difference in uImage header, which blocks
>> multiple SoCs from using same uImage, is "KERNEL_NOLOAD" uImage type
>> the current generic solution?
> 
> also add Stephen Warren.
> 
> i have two verified ways to resolve this problem:
> 
> 1. use "kernel noload", build uImage by:
> 
> make uImage UIMAGE_TYPE=kernel_noload
> and add the following patch in kernel:

Very recent U-Boot have a bootz command, which acts just like bootm, but
allows use of a raw zImage or the kernel, rather than a
uImage-wrapped-zImage. This was implemented by Marek Vasut.

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

* [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC
  2012-08-28 14:28                 ` Stephen Warren
@ 2012-08-28 14:57                   ` Barry Song
  0 siblings, 0 replies; 22+ messages in thread
From: Barry Song @ 2012-08-28 14:57 UTC (permalink / raw)
  To: linux-arm-kernel

2012/8/28 Stephen Warren <swarren@wwwdotorg.org>:
> On 08/28/2012 01:08 AM, Barry Song wrote:
>> 2012/8/28 Barry Song <21cnbao@gmail.com>:
>>> 2012/8/21 Arnd Bergmann <arnd@arndb.de>:
>>>> On Tuesday 21 August 2012, Barry Song wrote:
>>>>> then i add these to Kconfig.debug as it is a common way
>>>>>
>>>>>         config DEBUG_PRIMA2_UART1
>>>>>                 bool "Kernel low-level debugging on DaVinci DA8XX using UART1"
>>>>>                 depends on ARCH_PRIMA2
>>>>>                 help
>>>>>                   Say Y here if you want the debug print routines to direct
>>>>>                   their output to UART1 serial port on SiRFprimaII devices.
>>>>>
>>>>>         config DEBUG_MARCO_UART1
>>>>>                 bool "Kernel low-level debugging on DaVinci DA8XX using UART2"
>>>>>                 depends on ARCH_MARCO
>>>>>                 help
>>>>>                   Say Y here if you want the debug print routines to direct
>>>>>                   their output to UART1 serial port on SiRFmarco devices.
>>>>>
>>>>> and these in mach-prima2/include/mach/uart.h
>>>>>
>>>>>   #ifdef CONFIG_DEBUG_PRIMA2_UART1
>>>>>   #define SIRFSOC_UART1_PA_BASE          0xb0060000
>>>>>   #elif defined(CONFIG_DEBUG_MARCO_UART1)
>>>>>   #define SIRFSOC_UART1_PA_BASE          0xcc060000
>>>>>   #endif
>>>>>
>>>>> the above codes seem still ugly ?
>>>>>
>>>>
>>>> No, that's fine, about as a good as it gets with today's kernel
>>>> capabilities. Just fix the description to have the correct
>>>> SoC name instead of "DaVinci DA8XX" ;-)
>>>
>>> except the DEBUG_LL uart base address, i missed the zreladdr-y. for
>>> primaii, it is 0x00008000, for marco, it is 0x40008000 as marco's
>>> memory space begins from 0x4000000.
>>> i would to have AUTO_ZRELADDR for the whole SiRF series.
>>> but for uImage load address difference in uImage header, which blocks
>>> multiple SoCs from using same uImage, is "KERNEL_NOLOAD" uImage type
>>> the current generic solution?
>>
>> also add Stephen Warren.
>>
>> i have two verified ways to resolve this problem:
>>
>> 1. use "kernel noload", build uImage by:
>>
>> make uImage UIMAGE_TYPE=kernel_noload
>> and add the following patch in kernel:
>
> Very recent U-Boot have a bootz command, which acts just like bootm, but
> allows use of a raw zImage or the kernel, rather than a
> uImage-wrapped-zImage. This was implemented by Marek Vasut.

Thanks, Stephen. i guess xianglong will try bootz on SiRFmarco and try
to move from uImage to raw zImage.

Based on your past "kernel_noload" support patch, we actually can
compile an uImage by:
make uImage UIMAGE_TYPE=kernel_noload UIMAGE_ENTRYADDR=0x0
and it gets a cross-SoCs uImage which doesn't care about zreladdr-y in
Makefile.boot.
actually it just jumps to (loaded uImage dram address + 0x40).

anyway, we don't need to modify mach-prima2/Makefile.boot for marco any more.

do people think we have a chance to delete mach-xxx/Makefile.boot for
some platforms if  zreladdr-y and related address don't make many
senses again?

-barry

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

end of thread, other threads:[~2012-08-28 14:57 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-20  8:19 [PATCH 0/3] ARM: PRIMA2: some patches prepared to support new SiRF SoCs Barry Song
2012-08-20  8:19 ` [PATCH 1/3] ARM: PRIMA2: use DT_MACHINE_START and convert to generic board Barry Song
2012-08-20 20:56   ` Arnd Bergmann
2012-08-21  1:49     ` Barry Song
2012-08-21  7:53       ` Arnd Bergmann
2012-08-21  8:26         ` Barry Song
2012-08-21  8:44           ` Arnd Bergmann
2012-08-20  8:19 ` [PATCH 2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC Barry Song
2012-08-20 21:06   ` Arnd Bergmann
2012-08-21  1:56     ` Barry Song
2012-08-21  7:57       ` Arnd Bergmann
2012-08-21  9:16         ` Barry Song
2012-08-21  9:20           ` Arnd Bergmann
2012-08-28  6:15             ` Barry Song
2012-08-28  8:08               ` Barry Song
2012-08-28 14:28                 ` Stephen Warren
2012-08-28 14:57                   ` Barry Song
2012-08-21  9:29       ` Barry Song
2012-08-21 10:16         ` Arnd Bergmann
2012-08-21  2:06     ` Barry Song
2012-08-21  7:55       ` Arnd Bergmann
2012-08-20  8:19 ` [PATCH 3/3] ARM: SIRF: make sirf irqchip driver selectable since new SoCs will have GIC Barry Song

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.