From: Barry Song <hidden> Date: 2012-08-20 08:19:45
From: Barry Song <redacted>
we will have SiRFMarco and SiRFPolo, all of them will be in the
generic board.
Signed-off-by: Barry Song <redacted>
---
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/prima2.c b/arch/arm/mach-prima2/board-generic.csimilarity index 81%rename from arch/arm/mach-prima2/prima2.crename to arch/arm/mach-prima2/board-generic.cindex 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();}-staticconstchar*prima2cb_dt_match[]__initdata={-"sirf,prima2-cb",+#ifdef CONFIG_ARCH_PRIMA2+staticconstchar*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,
--
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
diff --git a/arch/arm/mach-prima2/Makefile b/arch/arm/mach-sirf/Makefilesimilarity index 100%rename from arch/arm/mach-prima2/Makefilerename to arch/arm/mach-sirf/Makefilediff --git a/arch/arm/mach-prima2/Makefile.boot b/arch/arm/mach-sirf/Makefile.bootsimilarity index 100%rename from arch/arm/mach-prima2/Makefile.bootrename to arch/arm/mach-sirf/Makefile.bootdiff --git a/arch/arm/mach-prima2/board-generic.c b/arch/arm/mach-sirf/board-generic.csimilarity index 100%rename from arch/arm/mach-prima2/board-generic.crename to arch/arm/mach-sirf/board-generic.cdiff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-sirf/common.hsimilarity index 100%rename from arch/arm/mach-prima2/common.hrename to arch/arm/mach-sirf/common.hdiff --git a/arch/arm/mach-prima2/include/mach/clkdev.h b/arch/arm/mach-sirf/include/mach/clkdev.hsimilarity index 100%rename from arch/arm/mach-prima2/include/mach/clkdev.hrename to arch/arm/mach-sirf/include/mach/clkdev.hdiff --git a/arch/arm/mach-prima2/include/mach/debug-macro.S b/arch/arm/mach-sirf/include/mach/debug-macro.Ssimilarity index 100%rename from arch/arm/mach-prima2/include/mach/debug-macro.Srename to arch/arm/mach-sirf/include/mach/debug-macro.Sdiff --git a/arch/arm/mach-prima2/include/mach/entry-macro.S b/arch/arm/mach-sirf/include/mach/entry-macro.Ssimilarity index 100%rename from arch/arm/mach-prima2/include/mach/entry-macro.Srename to arch/arm/mach-sirf/include/mach/entry-macro.Sdiff --git a/arch/arm/mach-prima2/include/mach/gpio.h b/arch/arm/mach-sirf/include/mach/gpio.hsimilarity index 100%rename from arch/arm/mach-prima2/include/mach/gpio.hrename to arch/arm/mach-sirf/include/mach/gpio.hdiff --git a/arch/arm/mach-prima2/include/mach/hardware.h b/arch/arm/mach-sirf/include/mach/hardware.hsimilarity index 100%rename from arch/arm/mach-prima2/include/mach/hardware.hrename to arch/arm/mach-sirf/include/mach/hardware.hdiff --git a/arch/arm/mach-prima2/include/mach/irqs.h b/arch/arm/mach-sirf/include/mach/irqs.hsimilarity index 100%rename from arch/arm/mach-prima2/include/mach/irqs.hrename to arch/arm/mach-sirf/include/mach/irqs.hdiff --git a/arch/arm/mach-prima2/include/mach/map.h b/arch/arm/mach-sirf/include/mach/map.hsimilarity index 100%rename from arch/arm/mach-prima2/include/mach/map.hrename to arch/arm/mach-sirf/include/mach/map.hdiff --git a/arch/arm/mach-prima2/include/mach/timex.h b/arch/arm/mach-sirf/include/mach/timex.hsimilarity index 100%rename from arch/arm/mach-prima2/include/mach/timex.hrename to arch/arm/mach-sirf/include/mach/timex.hdiff --git a/arch/arm/mach-prima2/include/mach/uart.h b/arch/arm/mach-sirf/include/mach/uart.hsimilarity index 100%rename from arch/arm/mach-prima2/include/mach/uart.hrename to arch/arm/mach-sirf/include/mach/uart.hdiff --git a/arch/arm/mach-prima2/include/mach/uncompress.h b/arch/arm/mach-sirf/include/mach/uncompress.hsimilarity index 100%rename from arch/arm/mach-prima2/include/mach/uncompress.hrename to arch/arm/mach-sirf/include/mach/uncompress.hdiff --git a/arch/arm/mach-prima2/irq.c b/arch/arm/mach-sirf/irq.csimilarity index 100%rename from arch/arm/mach-prima2/irq.crename to arch/arm/mach-sirf/irq.cdiff --git a/arch/arm/mach-prima2/l2x0.c b/arch/arm/mach-sirf/l2x0.csimilarity index 100%rename from arch/arm/mach-prima2/l2x0.crename to arch/arm/mach-sirf/l2x0.cdiff --git a/arch/arm/mach-prima2/lluart.c b/arch/arm/mach-sirf/lluart.csimilarity index 100%rename from arch/arm/mach-prima2/lluart.crename to arch/arm/mach-sirf/lluart.cdiff --git a/arch/arm/mach-prima2/pm.c b/arch/arm/mach-sirf/pm.csimilarity index 100%rename from arch/arm/mach-prima2/pm.crename to arch/arm/mach-sirf/pm.cdiff --git a/arch/arm/mach-prima2/pm.h b/arch/arm/mach-sirf/pm.hsimilarity index 100%rename from arch/arm/mach-prima2/pm.hrename to arch/arm/mach-sirf/pm.hdiff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-sirf/rstc.csimilarity index 100%rename from arch/arm/mach-prima2/rstc.crename to arch/arm/mach-sirf/rstc.cdiff --git a/arch/arm/mach-prima2/rtciobrg.c b/arch/arm/mach-sirf/rtciobrg.csimilarity index 100%rename from arch/arm/mach-prima2/rtciobrg.crename to arch/arm/mach-sirf/rtciobrg.cdiff --git a/arch/arm/mach-prima2/sleep.S b/arch/arm/mach-sirf/sleep.Ssimilarity index 100%rename from arch/arm/mach-prima2/sleep.Srename to arch/arm/mach-sirf/sleep.Sdiff --git a/arch/arm/mach-prima2/timer.c b/arch/arm/mach-sirf/timer.csimilarity index 100%rename from arch/arm/mach-prima2/timer.crename 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
From: Barry Song <hidden> Date: 2012-08-20 08:19:47
From: Barry Song <redacted>
New MARCO and POLO SoC uses GIC, so make irq.c selectable and select
it for PRIMAII
Signed-off-by: Barry Song <redacted>
---
arch/arm/mach-sirf/Kconfig | 4 ++++
arch/arm/mach-sirf/Makefile | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
--
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
From: Barry Song <redacted>
we will have SiRFMarco and SiRFPolo, all of them will be in the
generic board.
Signed-off-by: Barry Song <redacted>
---
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.
quoted hunk
diff --git a/arch/arm/mach-prima2/prima2.c b/arch/arm/mach-prima2/board-generic.csimilarity index 81%rename from arch/arm/mach-prima2/prima2.crename to arch/arm/mach-prima2/board-generic.cindex 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();}-staticconstchar*prima2cb_dt_match[]__initdata={-"sirf,prima2-cb",+#ifdef CONFIG_ARCH_PRIMA2+staticconstchar*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,
From: Barry Song <redacted>
We will have SiRF Marco and Polo, so rename the dir to mach-sirf
and add Kconfig menu
Signed-off-by: Baohua Song <redacted>
---
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.
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
From: Barry Song <hidden> Date: 2012-08-21 01:49:04
2012/8/21 Arnd Bergmann [off-list ref]:
On Monday 20 August 2012, Barry Song wrote:
quoted
From: Barry Song <redacted>
we will have SiRFMarco and SiRFPolo, all of them will be in the
generic board.
Signed-off-by: Barry Song <redacted>
---
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.
quoted
diff --git a/arch/arm/mach-prima2/prima2.c b/arch/arm/mach-prima2/board-generic.csimilarity index 81%rename from arch/arm/mach-prima2/prima2.crename to arch/arm/mach-prima2/board-generic.cindex 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();}-staticconstchar*prima2cb_dt_match[]__initdata={-"sirf,prima2-cb",+#ifdef CONFIG_ARCH_PRIMA2+staticconstchar*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,
From: Barry Song <hidden> Date: 2012-08-21 01:56:02
2012/8/21 Arnd Bergmann [off-list ref]:
On Monday 20 August 2012, Barry Song wrote:
quoted
From: Barry Song <redacted>
We will have SiRF Marco and Polo, so rename the dir to mach-sirf
and add Kconfig menu
Signed-off-by: Baohua Song <redacted>
---
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.
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"
quoted
+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
From: Barry Song <hidden> Date: 2012-08-21 02:06:50
Hi Arnd,
more comments.
2012/8/21 Arnd Bergmann [off-list ref]:
On Monday 20 August 2012, Barry Song wrote:
quoted
From: Barry Song <redacted>
We will have SiRF Marco and Polo, so rename the dir to mach-sirf
and add Kconfig menu
Signed-off-by: Baohua Song <redacted>
---
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.
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.
quoted
+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
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.
quoted
quoted
diff --git a/arch/arm/mach-prima2/prima2.c b/arch/arm/mach-prima2/board-generic.csimilarity index 81%rename from arch/arm/mach-prima2/prima2.crename to arch/arm/mach-prima2/board-generic.cindex 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();}-staticconstchar*prima2cb_dt_match[]__initdata={-"sirf,prima2-cb",+#ifdef CONFIG_ARCH_PRIMA2+staticconstchar*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,
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
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
From: Barry Song <hidden> Date: 2012-08-21 08:26:31
Hi Arnd,
Thanks.
2012/8/21 Arnd Bergmann [off-list ref]:
On Tuesday 21 August 2012, Barry Song wrote:
quoted
2012/8/21 Arnd Bergmann [off-list ref]:
quoted
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.
quoted
quoted
quoted
diff --git a/arch/arm/mach-prima2/prima2.c b/arch/arm/mach-prima2/board-generic.csimilarity index 81%rename from arch/arm/mach-prima2/prima2.crename to arch/arm/mach-prima2/board-generic.cindex 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();}-staticconstchar*prima2cb_dt_match[]__initdata={-"sirf,prima2-cb",+#ifdef CONFIG_ARCH_PRIMA2+staticconstchar*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,
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 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
From: Barry Song <hidden> Date: 2012-08-21 09:16:02
Hi Arnd,
2012/8/21 Arnd Bergmann [off-list ref]:
On Tuesday 21 August 2012, Barry Song wrote:
quoted
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.
quoted
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 ?
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
From: Barry Song <hidden> Date: 2012-08-21 09:29:54
2012/8/21 Barry Song [off-list ref]:
2012/8/21 Arnd Bergmann [off-list ref]:
quoted
On Monday 20 August 2012, Barry Song wrote:
quoted
From: Barry Song <redacted>
We will have SiRF Marco and Polo, so rename the dir to mach-sirf
and add Kconfig menu
Signed-off-by: Baohua Song <redacted>
---
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
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
From: Barry Song <hidden> Date: 2012-08-28 06:15:26
2012/8/21 Arnd Bergmann [off-list ref]:
On Tuesday 21 August 2012, Barry Song wrote:
quoted
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?
From: Barry Song <hidden> Date: 2012-08-28 08:08:38
2012/8/28 Barry Song [off-list ref]:
2012/8/21 Arnd Bergmann [off-list ref]:
quoted
On Tuesday 21 August 2012, Barry Song wrote:
quoted
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
#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.
From: Stephen Warren <hidden> Date: 2012-08-28 14:28:28
On 08/28/2012 01:08 AM, Barry Song wrote:
2012/8/28 Barry Song [off-list ref]:
quoted
2012/8/21 Arnd Bergmann [off-list ref]:
quoted
On Tuesday 21 August 2012, Barry Song wrote:
quoted
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.
From: Barry Song <hidden> Date: 2012-08-28 14:57:59
2012/8/28 Stephen Warren [off-list ref]:
On 08/28/2012 01:08 AM, Barry Song wrote:
quoted
2012/8/28 Barry Song [off-list ref]:
quoted
2012/8/21 Arnd Bergmann [off-list ref]:
quoted
On Tuesday 21 August 2012, Barry Song wrote:
quoted
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