ARM: add basic CSR atlas7 Auto SoC support
Subsystems (4)
cover ARM: add basic CSR atlas7 Auto SoC support
From: Barry Song <[email protected]>
add basic support for CSR atlas7 new Auto SoC. this patchset only adds debug port, dts, smp and machine for the chip.
we need some follow-up patches for clock, pinctrl, dma and so on.
Guo Zeng (1):
ARM: sirf: add two debug ports for CSRatlas7 SoC
Zhiwu Song (3):
ARM: sirf: add atlas7 machine support
ARM: dts: add init dts file for CSR atlas7 SoC
ARM: sirf: bring up SMP in atlas7 SoC
Documentation/devicetree/bindings/arm/sirf.txt | 2 + arch/arm/Kconfig.debug | 21 +- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/atlas7-evb.dts | 110 ++++ arch/arm/boot/dts/atlas7.dtsi | 813 +++++++++++++++++++++++++ arch/arm/include/debug/sirf.S | 37 +- arch/arm/mach-prima2/Kconfig | 13 +- arch/arm/mach-prima2/common.c | 16 +- arch/arm/mach-prima2/lluart.c | 21 +- arch/arm/mach-prima2/platsmp.c | 52 +- 10 files changed, 1022 insertions(+), 64 deletions(-) create mode 100644 arch/arm/boot/dts/atlas7-evb.dts create mode 100644 arch/arm/boot/dts/atlas7.dtsi
Signature · 1 line
2.2.0
PATCH 1/4 ARM: sirf: add two debug ports for CSRatlas7 SoC
From: Guo Zeng <[email protected]>
this patch adds UART0 and UART1 as LLUART port, as the new atlas7 registers layout are different, it also refines some names of old hard-coded MARCOs.
--- arch/arm/Kconfig.debug | 21 ++++++++++++++++++++- arch/arm/include/debug/sirf.S | 37 ++++++++++++++++++++++++------------- arch/arm/mach-prima2/lluart.c | 21 ++++++++++++--------- 3 files changed, 56 insertions(+), 23 deletions(-)
arch/arm/Kconfig.debug +20 -1
@@ -927,6 +927,22 @@ choice Say Y here if you want the debug print routines to direct their output to the uart1 port on SiRFmarco devices. + config DEBUG_SIRFATLAS7_UART0 + bool "Kernel low-level debugging messages via SiRFatlas7 UART0" + depends on ARCH_ATLAS7 + help + Say Y here if you want the debug print routines to direct + their output to the uart0 port on SiRFATLAS7 devices.The uart0 + is used on SiRFATLAS7 as a extra debug port.sometimes an extra + debug port can be very useful. + + config DEBUG_SIRFATLAS7_UART1 + bool "Kernel low-level debugging messages via SiRFatlas7 UART1" + depends on ARCH_ATLAS7 + help + Say Y here if you want the debug print routines to direct + their output to the uart1 port on SiRFATLAS7 devices. + config STIH41X_DEBUG_ASC2 bool "Use StiH415/416 ASC2 UART for low-level debug" depends on ARCH_STI
@@ -1195,7 +1211,10 @@ config DEBUG_LL_INCLUDE default "debug/renesas-scif.S" if DEBUG_RMOBILE_SCIFA4 default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART default "debug/s5pv210.S" if DEBUG_S5PV210_UART - default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 + default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || \ + DEBUG_SIRFMARCO_UART1 || \ + DEBUG_SIRFATLAS7_UART0 || \ + DEBUG_SIRFATLAS7_UART1 default "debug/sti.S" if DEBUG_STI_UART default "debug/tegra.S" if DEBUG_TEGRA_UART default "debug/ux500.S" if DEBUG_UX500_UART
arch/arm/include/debug/sirf.S +24 -13
@@ -7,36 +7,47 @@ */ #if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1) -#define SIRFSOC_UART1_PA_BASE 0xb0060000 +#define SIRF_LLUART_PA_BASE 0xb0060000 #elif defined(CONFIG_DEBUG_SIRFMARCO_UART1) -#define SIRFSOC_UART1_PA_BASE 0xcc060000 +#define SIRF_LLUART_PA_BASE 0xcc060000 +#elif defined(CONFIG_DEBUG_SIRFATLAS7_UART1) +#define SIRF_LLUART_PA_BASE 0x18020000 +#elif defined(CONFIG_DEBUG_SIRFATLAS7_UART0) +#define SIRF_LLUART_PA_BASE 0x18010000 #else -#define SIRFSOC_UART1_PA_BASE 0 +#define SIRF_LLUART_PA_BASE 0 #endif -#define SIRFSOC_UART1_VA_BASE 0xFEC60000 +#define SIRF_LLUART_VA_BASE (0xFEC00000 \ + | (SIRF_LLUART_PA_BASE & 0x000FFFFF)) -#define SIRFSOC_UART_TXFIFO_STATUS 0x0114 -#define SIRFSOC_UART_TXFIFO_DATA 0x0118 +#define SIRF_LLUART_TXFIFO_STATUS 0x0114 +#define SIRF_LLUART_TXFIFO_DATA 0x0118 + +#define SIRF_LLUART_TXFIFO_FULL (1 << 5) + +#ifdef CONFIG_DEBUG_SIRFATLAS7_UART0 +#define SIRF_LLUART_TXFIFO_EMPTY (1 << 8) +#else +#define SIRF_LLUART_TXFIFO_EMPTY (1 << 6) +#endif -#define SIRFSOC_UART1_TXFIFO_FULL (1 << 5) -#define SIRFSOC_UART1_TXFIFO_EMPTY (1 << 6) .macro addruart, rp, rv, tmp - ldr \rp, =SIRFSOC_UART1_PA_BASE @ physical - ldr \rv, =SIRFSOC_UART1_VA_BASE @ virtual + ldr \rp, =SIRF_LLUART_PA_BASE @ physical + ldr \rv, =SIRF_LLUART_VA_BASE @ virtual .endm .macro senduart,rd,rx - str \rd, [\rx, #SIRFSOC_UART_TXFIFO_DATA] + str \rd, [\rx, #SIRF_LLUART_TXFIFO_DATA] .endm .macro busyuart,rd,rx .endm .macro waituart,rd,rx -1001: ldr \rd, [\rx, #SIRFSOC_UART_TXFIFO_STATUS] - tst \rd, #SIRFSOC_UART1_TXFIFO_EMPTY +1001: ldr \rd, [\rx, #SIRF_LLUART_TXFIFO_STATUS] + tst \rd, #SIRF_LLUART_TXFIFO_EMPTY beq 1001b .endm
arch/arm/mach-prima2/lluart.c +12 -9
@@ -12,24 +12,27 @@#include "common.h" #if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1 ) -#define SIRFSOC_UART1_PA_BASE 0xb0060000 +#define SIRF_LLUART_PA_BASE 0xb0060000#elif defined(CONFIG_DEBUG_SIRFMARCO_UART1 ) -#define SIRFSOC_UART1_PA_BASE 0xcc060000 +#define SIRF_LLUART_PA_BASE 0xcc060000 +#elif defined(CONFIG_DEBUG_SIRFATLAS7_UART1 ) +#define SIRF_LLUART_PA_BASE 0x18020000 +#elif defined(CONFIG_DEBUG_SIRFATLAS7_UART0 ) +#define SIRF_LLUART_PA_BASE 0x18010000#else -#define SIRFSOC_UART1_PA_BASE 0 +#define SIRF_LLUART_PA_BASE 0#endif -#define SIRFSOC_UART1_VA_BASE SIRFSOC_VA(0x060000) -#define SIRFSOC_UART1_SIZE SZ_4K +#define SIRF_LLUART_VA_BASE SIRFSOC_VA(SIRF_LLUART_PA_BASE & 0x000FFFFF) +#define SIRF_LLUART_SIZE SZ_4Kvoid __init sirfsoc_map_lluart (void ) {struct map_desc sirfsoc_lluart_map = { - .virtual =SIRFSOC_UART1_VA_BASE , - .pfn =__phys_to_pfn (SIRFSOC_UART1_PA_BASE ), - .length =SIRFSOC_UART1_SIZE , + .virtual =SIRF_LLUART_VA_BASE , + .pfn =__phys_to_pfn (SIRF_LLUART_PA_BASE ), + .length =SIRF_LLUART_SIZE , .type =MT_DEVICE , }; -iotable_init (&sirfsoc_lluart_map,1 ); }
Signature · 1 line
2.2.0
Arnd Bergmann
maintainerPATCH 1/4 ARM: sirf: add two debug ports for CSRatlas7 SoC
Quoted 4 lines · On Thursday 25 December 2014 16:34:17 Barry Song wrote:
#if
defined(CONFIG_DEBUG_SIRFPRIMA2_UART1)arch/arm/include/debug/sirf.S +1
-1-#define SIRFSOC_UART1_PA_BASE 0xb0060000 +#define SIRF_LLUART_PA_BASE 0xb0060000 #elif defined(CONFIG_DEBUG_SIRFMARCO_UART1)
arch/arm/include/debug/sirf.S line 19
Quoted 10 lines
arch/arm/include/debug/sirf.S +6
-2-#define SIRFSOC_UART1_PA_BASE 0xcc060000 +#define SIRF_LLUART_PA_BASE 0xcc060000 +#elif defined(CONFIG_DEBUG_SIRFATLAS7_UART1) +#define SIRF_LLUART_PA_BASE 0x18020000 +#elif defined(CONFIG_DEBUG_SIRFATLAS7_UART0) +#define SIRF_LLUART_PA_BASE 0x18010000 #else -#define SIRFSOC_UART1_PA_BASE 0 +#define SIRF_LLUART_PA_BASE 0 #endif
I think it would be nicer to use DEBUG_UART_PHYS/DEBUG_UART_VIRT here.
Arnd
PATCH 1/4 ARM: sirf: add two debug ports for CSRatlas7 SoC
2014-12-31 6:35 GMT+08:00 Arnd Bergmann <[email protected]>:
Quoted 9 lines · On Thursday 25 December 2014 16:34:17 Barry Song wrote:
Quoted 8 lines
#if
defined(CONFIG_DEBUG_SIRFPRIMA2_UART1)arch/arm/include/debug/sirf.S +4
-2-#define SIRFSOC_UART1_PA_BASE 0xb0060000 +#define SIRF_LLUART_PA_BASE 0xb0060000 #elif defined(CONFIG_DEBUG_SIRFMARCO_UART1) -#define SIRFSOC_UART1_PA_BASE 0xcc060000 +#define SIRF_LLUART_PA_BASE 0xcc060000 +#elif defined(CONFIG_DEBUG_SIRFATLAS7_UART1) +#define SIRF_LLUART_PA_BASE 0x18020000
Quoted 8 lines
arch/arm/include/debug/sirf.S line 19
Quoted 6 lines
arch/arm/include/debug/sirf.S +3
-1+#elif defined(CONFIG_DEBUG_SIRFATLAS7_UART0) +#define SIRF_LLUART_PA_BASE 0x18010000 #else -#define SIRFSOC_UART1_PA_BASE 0 +#define SIRF_LLUART_PA_BASE 0 #endifI think it would be nicer to use DEBUG_UART_PHYS/DEBUG_UART_VIRT here.
yes if it is more general name for all. my second feeling is that does this conflict CSR namespace stuff into high-level and common namespace things?
Quoted 2 lines
Arnd
-barry
Arnd Bergmann
maintainerPATCH 1/4 ARM: sirf: add two debug ports for CSRatlas7 SoC
Quoted 19 lines · On Wednesday 31 December 2014 23:05:44 Barry Song wrote:
2014-12-31 6:35 GMT+08:00 Arnd Bergmann <[email protected]>:
Quoted 9 lines · On Thursday 25 December 2014 16:34:17 Barry Song wrote:
Quoted 8 lines
#if
defined(CONFIG_DEBUG_SIRFPRIMA2_UART1)arch/arm/include/debug/sirf.S +4
-2-#define SIRFSOC_UART1_PA_BASE 0xb0060000 +#define SIRF_LLUART_PA_BASE 0xb0060000 #elif defined(CONFIG_DEBUG_SIRFMARCO_UART1) -#define SIRFSOC_UART1_PA_BASE 0xcc060000 +#define SIRF_LLUART_PA_BASE 0xcc060000 +#elif defined(CONFIG_DEBUG_SIRFATLAS7_UART1) +#define SIRF_LLUART_PA_BASE 0x18020000Quoted 8 lines
arch/arm/include/debug/sirf.S line 19
Quoted 6 lines
arch/arm/include/debug/sirf.S +3
-1+#elif defined(CONFIG_DEBUG_SIRFATLAS7_UART0) +#define SIRF_LLUART_PA_BASE 0x18010000 #else -#define SIRFSOC_UART1_PA_BASE 0 +#define SIRF_LLUART_PA_BASE 0 #endifI think it would be nicer to use DEBUG_UART_PHYS/DEBUG_UART_VIRT here.
Quoted 3 lines
yes if it is more general name for all. my second feeling is that does this conflict CSR namespace stuff into high-level and common namespace things?
I think my comment was misleading. What I meant was to use CONFIG_DEBUG_UART_PHYS from arch/arm/Kconfig.debug the same way we do for the 8250 and pl011 compatible uarts.
Arnd
PATCH 1/4 ARM: sirf: add two debug ports for CSRatlas7 SoC
2014-12-31 23:31 GMT+08:00, Arnd Bergmann <[email protected]>:
Quoted 20 lines · On Wednesday 31 December 2014 23:05:44 Barry Song wrote:
Quoted 19 lines
2014-12-31 6:35 GMT+08:00 Arnd Bergmann <[email protected]>:
Quoted 17 lines · On Thursday 25 December 2014 16:34:17 Barry Song wrote:
Quoted 4 lines
#if
defined(CONFIG_DEBUG_SIRFPRIMA2_UART1)arch/arm/include/debug/sirf.S +1
-1-#define SIRFSOC_UART1_PA_BASE 0xb0060000 +#define SIRF_LLUART_PA_BASE 0xb0060000 #elif defined(CONFIG_DEBUG_SIRFMARCO_UART1)arch/arm/include/debug/sirf.S line 19
Quoted 10 lines
arch/arm/include/debug/sirf.S +6
-2-#define SIRFSOC_UART1_PA_BASE 0xcc060000 +#define SIRF_LLUART_PA_BASE 0xcc060000 +#elif defined(CONFIG_DEBUG_SIRFATLAS7_UART1) +#define SIRF_LLUART_PA_BASE 0x18020000 +#elif defined(CONFIG_DEBUG_SIRFATLAS7_UART0) +#define SIRF_LLUART_PA_BASE 0x18010000 #else -#define SIRFSOC_UART1_PA_BASE 0 +#define SIRF_LLUART_PA_BASE 0 #endifI think it would be nicer to use DEBUG_UART_PHYS/DEBUG_UART_VIRT here.
Quoted 7 lines
Quoted 3 lines
yes if it is more general name for all. my second feeling is that does this conflict CSR namespace stuff into high-level and common namespace things?
I think my comment was misleading. What I meant was to use
CONFIG_DEBUG_UART_PHYSfromarch/arm/Kconfig.debugthe same way we do for the 8250 and pl011 compatible uarts.
it is even better if all CSR ports are same in register layout. then we can simply have a Kconfig options for all ports and use the CONFIG_DEBUG_UART_VIRT/PHYS to differentiate ports. but here we still need the options for different ports as TXFIFO_EMPTY bits are different on different ports.
+#ifdef CONFIG_DEBUG_SIRFATLAS7_UART0
+#define SIRF_LLUART_TXFIFO_EMPTY (1 << 8)
+#else
+#define SIRF_LLUART_TXFIFO_EMPTY (1 << 6)
+#endif
but we can still get benefit to define the BASE address from Kconfig and have some similar ways with:
include/debug/8250.S: ldr \rv, =CONFIG_DEBUG_UART_VIRT include/debug/bcm63xx.S: ldr \rv, =CONFIG_DEBUG_UART_VIRT include/debug/meson.S: ldr \rv, =(CONFIG_DEBUG_UART_VIRT) @ virtual include/debug/msm.S: ldr \rv, =CONFIG_DEBUG_UART_VIRT include/debug/pl01x.S: ldr \rv, =CONFIG_DEBUG_UART_VIRT include/debug/s3c24xx.S: ldr \rv, = CONFIG_DEBUG_UART_VIRT
Quoted 3 lines
Arnd
-barry
Arnd Bergmann
maintainerPATCH 1/4 ARM: sirf: add two debug ports for CSRatlas7 SoC
Quoted 25 lines · On Friday 02 January 2015 15:51:41 Barry Song wrote:
2014-12-31 23:31 GMT+08:00, Arnd Bergmann <[email protected]>:
Quoted 24 lines · On Wednesday 31 December 2014 23:05:44 Barry Song wrote:
Quoted 22 lines
2014-12-31 6:35 GMT+08:00 Arnd Bergmann <[email protected]>:
Quoted 9 lines · On Thursday 25 December 2014 16:34:17 Barry Song wrote:
Quoted 8 lines
#if
defined(CONFIG_DEBUG_SIRFPRIMA2_UART1)arch/arm/include/debug/sirf.S +4
-2-#define SIRFSOC_UART1_PA_BASE 0xb0060000 +#define SIRF_LLUART_PA_BASE 0xb0060000 #elif defined(CONFIG_DEBUG_SIRFMARCO_UART1) -#define SIRFSOC_UART1_PA_BASE 0xcc060000 +#define SIRF_LLUART_PA_BASE 0xcc060000 +#elif defined(CONFIG_DEBUG_SIRFATLAS7_UART1) +#define SIRF_LLUART_PA_BASE 0x18020000Quoted 8 lines
arch/arm/include/debug/sirf.S line 19
Quoted 6 lines
arch/arm/include/debug/sirf.S +3
-1+#elif defined(CONFIG_DEBUG_SIRFATLAS7_UART0) +#define SIRF_LLUART_PA_BASE 0x18010000 #else -#define SIRFSOC_UART1_PA_BASE 0 +#define SIRF_LLUART_PA_BASE 0 #endifI think it would be nicer to use DEBUG_UART_PHYS/DEBUG_UART_VIRT here.
yes if it is more general name for all. my second feeling is that does this conflict CSR namespace stuff into high-level and common namespace things?
Quoted 7 lines
Quoted 3 lines
I think my comment was misleading. What I meant was to use
CONFIG_DEBUG_UART_PHYSfromarch/arm/Kconfig.debugthe same way we do for the 8250 and pl011 compatible uarts.it is even better if all CSR ports are same in register layout. then we can simply have a
Kconfigoptions for all ports and use the CONFIG_DEBUG_UART_VIRT/PHYS to differentiate ports.
Right. In most other cases, we still have one option per implementation but then only use it to pick a different default for the UART address.
As a side note here, we don't yet have working CONFIG_EARLYCON support on ARM, but there are new patches to implement that. With EARLYCON working, it would be much less important to have DEBUG_LL configured easily, and you could just leave entering the right address to advanced users that need to debug the kernel earlier than the earlycon init.
arch/arm/include/debug/sirf.S line 33
Quoted 9 lines
but here we still
need the options for different ports asTXFIFO_EMPTYbits are different on different ports.arch/arm/include/debug/sirf.S +5
-0+#ifdef CONFIG_DEBUG_SIRFATLAS7_UART0 +#define SIRF_LLUART_TXFIFO_EMPTY (1 << 8) +#else +#define SIRF_LLUART_TXFIFO_EMPTY (1 << 6) +#endif
Yes, so we need two options at least, so we can tell the difference between atlas7 and the others.
Arnd
PATCH 2/4 ARM: sirf: add atlas7 machine support
In reply to Barry SongFrom: Zhiwu Song <[email protected]>
atlas7 is next-gen auto soc from CSR.
It could bring to customers most integrated SoC solution:
- World leading Bluetooth 4.0 and GNSS baseband
- Audio processing, analog CODEC and ADC
- Analog video input
- SDR accelerators
--- Documentation/devicetree/bindings/arm/sirf.txt | 2 ++ arch/arm/mach-prima2/Kconfig | 13 ++++++++++++- arch/arm/mach-prima2/common.c | 15 +++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/sirf.txt +2 -0
@@ -3,7 +3,9 @@ CSR SiRFprimaII and SiRFmarco device tree bindings. Required root node properties: - compatible: + - "sirf,atlas7-cb" : atlas7 device based board - "sirf,prima2-cb" : prima2 "cb" evaluation board - "sirf,marco-cb" : marco "cb" evaluation board + - "sirf,atlas7" : atlas7 device based board - "sirf,prima2" : prima2 device based board - "sirf,marco" : marco device based board
arch/arm/mach-prima2/Kconfig +12 -1
@@ -11,7 +11,7 @@ menuconfig ARCH_SIRF if ARCH_SIRF -comment "CSR SiRF atlas6/primaII/Marco/Polo Specific Features" +comment "CSR SiRF atlas6/primaII/Marco/Atlas7 Specific Features" config ARCH_ATLAS6 bool "CSR SiRFSoC ATLAS6 ARM Cortex A9 Platform"
@@ -20,6 +20,17 @@ config ARCH_ATLAS6 help Support for CSR SiRFSoC ARM Cortex A9 Platform +config ARCH_ATLAS7 + bool "CSR SiRFSoC ATLAS7 ARM Cortex A7 Platform" + default y + select ARM_GIC + select CPU_V7 + select HAVE_ARM_SCU if SMP + select HAVE_SMP + select SMP_ON_UP if SMP + help + Support for CSR SiRFSoC ARM Cortex A7 Platform + config ARCH_PRIMA2 bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform" default y
arch/arm/mach-prima2/common.c +15 -0
@@ -75,3 +75,18 @@ DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)") .dt_compat = marco_dt_match, MACHINE_END#endif + +#ifdef CONFIG_ARCH_ATLAS7 +static const char *atlas7_dt_match[]__initdata = { +"sirf,atlas7" , +NULL +}; + +DT_MACHINE_START (ATLAS7_DT ,"Generic ATLAS7 (Flattened Device Tree)" ) +/* Maintainer: Barry Song <[email protected]> */ + .smp = smp_ops(sirfsoc_smp_ops), + .map_io = sirfsoc_map_io, + .init_late = sirfsoc_init_late, + .dt_compat = atlas7_dt_match, +MACHINE_END +#endif
Signature · 1 line
2.2.0
Arnd Bergmann
maintainerPATCH 2/4 ARM: sirf: add atlas7 machine support
arch/arm/mach-prima2/common.c DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)") · line 91
Quoted 7 lines · On Thursday 25 December 2014 16:34:18 Barry Song wrote:
arch/arm/mach-prima2/common.c +7
-0+DT_MACHINE_START (ATLAS7_DT ,"Generic ATLAS7 (Flattened Device Tree)" ) +/* Maintainer: Barry Song <[email protected]> */ + .smp = smp_ops(sirfsoc_smp_ops), + .map_io = sirfsoc_map_io, + .init_late = sirfsoc_init_late, + .dt_compat = atlas7_dt_match, +MACHINE_END
Can you check if the sirfsoc_map_io function is still required? My guess is that you can just replace sirfsoc_map_scu() with a call of ioremap in sirfsoc_smp_prepare_cpus, and drop sirfsoc_map_lluart() entirely in favor of the default debug_ll_io_init() function that is called when map_io is NULL.
Also, how about merging the entries for atlas6 and atlas7, and just having multiple compatible strings in atlas_dt_match?
Arnd
PATCH 2/4 ARM: sirf: add atlas7 machine support
2014-12-31 6:34 GMT+08:00 Arnd Bergmann <[email protected]>:
Quoted 15 lines · On Thursday 25 December 2014 16:34:18 Barry Song wrote:
arch/arm/mach-prima2/common.c DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)") · line 91
Quoted 7 lines
arch/arm/mach-prima2/common.c +7
-0+DT_MACHINE_START (ATLAS7_DT ,"Generic ATLAS7 (Flattened Device Tree)" ) +/* Maintainer: Barry Song <[email protected]> */ + .smp = smp_ops(sirfsoc_smp_ops), + .map_io = sirfsoc_map_io, + .init_late = sirfsoc_init_late, + .dt_compat = atlas7_dt_match, +MACHINE_END Can you check if the
sirfsoc_map_iofunction is still required? My guess is that you can just replacesirfsoc_map_scu()with a call of ioremap insirfsoc_smp_prepare_cpus, and dropsirfsoc_map_lluart()entirely in favor of the defaultdebug_ll_io_init()function that is called whenmap_iois NULL.
Quoted 2 lines
Also, how about merging the entries for atlas6 and atlas7, and just having multiple compatible strings in
atlas_dt_match?
the situation is that atlas7 is not a family of atlas6. atlas6 is much similar with prima2, but atlas7 is actually a replacement of earlier marco family.
atlas7 is a dual core cortex-a7, but atlas6 is a single core cortex-a9. and atlas7 is using a Network on Chip(NoC) bus architecture which is completely not same with atlas6 which is using a tree-type bus, so atlas7 will have some machine-specific codes like NoC fireware which should be in machine specific codes to handle external data aborts things for security protection. and more important, atlas7 has much different IP modules with atlas6 for things like GPS, connectiviy, software digital radios. and atlas7 has a more cortex-M3 for CAN stack, so this will involve some IPC drivers. and one more DSP for audio processing.
this means atlas7 is not a simple atlas6+1, it is a new chip. i have a feeling atlas7 should be highlighted as a seperate machine.
Quoted 2 lines
Arnd
-barry
Arnd Bergmann
maintainerPATCH 2/4 ARM: sirf: add atlas7 machine support
Quoted 34 lines · On Wednesday 31 December 2014 22:50:16 Barry Song wrote:
2014-12-31 6:34 GMT+08:00 Arnd Bergmann <[email protected]>:
Quoted 15 lines · On Thursday 25 December 2014 16:34:18 Barry Song wrote:
arch/arm/mach-prima2/common.c DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)") · line 91
Quoted 7 lines
arch/arm/mach-prima2/common.c +7
-0+DT_MACHINE_START (ATLAS7_DT ,"Generic ATLAS7 (Flattened Device Tree)" ) +/* Maintainer: Barry Song <[email protected]> */ + .smp = smp_ops(sirfsoc_smp_ops), + .map_io = sirfsoc_map_io, + .init_late = sirfsoc_init_late, + .dt_compat = atlas7_dt_match, +MACHINE_END Can you check if the
sirfsoc_map_iofunction is still required? My guess is that you can just replacesirfsoc_map_scu()with a call of ioremap insirfsoc_smp_prepare_cpus, and dropsirfsoc_map_lluart()entirely in favor of the defaultdebug_ll_io_init()function that is called whenmap_iois NULL.Quoted 2 lines
Also, how about merging the entries for atlas6 and atlas7, and just having multiple compatible strings in
atlas_dt_match?the situation is that atlas7 is not a family of atlas6. atlas6 is much similar with prima2, but atlas7 is actually a replacement of earlier marco family.
atlas7 is a dual core cortex-a7, but atlas6 is a single core cortex-a9. and atlas7 is using a Network on Chip(NoC) bus architecture which is completely not same with atlas6 which is using a tree-type bus, so atlas7 will have some machine-specific codes like NoC fireware which should be in machine specific codes to handle external data aborts things for security protection. and more important, atlas7 has much different IP modules with atlas6 for things like GPS, connectiviy, software digital radios. and atlas7 has a more cortex-M3 for CAN stack, so this will involve some IPC drivers. and one more DSP for audio processing.
Quoted 2 lines
this means atlas7 is not a simple atlas6+1, it is a new chip. i have a feeling atlas7 should be highlighted as a seperate machine.
Ideally, I'd like to see a single DT_MACHINE_START for all of the sirf machines once you have eliminated all the callbacks, but until then, using one per SoC type for consistency is fine with me as well, so just leave it that way for now.
Arnd
PATCH 2/4 ARM: sirf: add atlas7 machine support
In reply to Arnd Bergmann2014-12-31 6:34 GMT+08:00 Arnd Bergmann <[email protected]>:
Quoted 6 lines · On Thursday 25 December 2014 16:34:18 Barry Song wrote:
Quoted 5 lines
arch/arm/mach-prima2/common.c +5
-0+DT_MACHINE_START (ATLAS7_DT ,"Generic ATLAS7 (Flattened Device Tree)" ) +/* Maintainer: Barry Song <[email protected]> */ + .smp = smp_ops(sirfsoc_smp_ops), + .map_io = sirfsoc_map_io, + .init_late = sirfsoc_init_late,
Quoted 8 lines
arch/arm/mach-prima2/common.c DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)") · line 91
Quoted 2 lines
arch/arm/mach-prima2/common.c +2
-0+ .dt_compat = atlas7_dt_match, +MACHINE_END Can you check if the
sirfsoc_map_iofunction is still required? My guess is that you can just replacesirfsoc_map_scu()with a call of ioremap insirfsoc_smp_prepare_cpus, and dropsirfsoc_map_lluart()entirely in favor of the defaultdebug_ll_io_init()function that is called whenmap_iois NULL.
after dropping MARCO, i can simply delete sirfsoc_map_scu() as for atlas7, this is not needed any more.
then finally, i can delete all sirfsoc_map_io() and DEBUG_LL mapping.
-barry
PATCH 3/4 ARM: dts: add init dts file for CSR atlas7 SoC
In reply to Barry SongFrom: Zhiwu Song <[email protected]>
CSR atlas7 uses Network on Chip(NoC) bus architecture, there are dozens of MARCOs, in each MARCO, there are dozens of hardware modules.
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/atlas7-evb.dts | 110 ++++++ arch/arm/boot/dts/atlas7.dtsi | 813 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 924 insertions(+) create mode 100644 arch/arm/boot/dts/atlas7-evb.dts create mode 100644 arch/arm/boot/dts/atlas7.dtsi
arch/arm/boot/dts/Makefile +1 -0
@@ -52,6 +52,7 @@ dtb-$(CONFIG_ARCH_AT91) += sama5d36ek.dtb dtb-$(CONFIG_ARCH_AT91) += at91-sama5d4ek.dtb dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb +dtb-$(CONFIG_ARCH_ATLAS7) += atlas7-evb.dtb dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b-plus.dtb
arch/arm/boot/dts/atlas7-evb.dts new file +110 -0
110 lines not on this page · raw message
arch/arm/boot/dts/atlas7.dtsi new file +813 -0
813 lines not on this page · raw message
Signature · 1 line
2.2.0
PATCH 4/4 ARM: sirf: bring up SMP in atlas7 SoC
In reply to Barry SongFrom: Zhiwu Song <[email protected]>
correct cpu1 jump/flag address, remove scu related logic, scu doesn't expose in cortex-a7.
this patch breaks marco chip, but marco project has been dropped.
--- arch/arm/mach-prima2/common.c | 1 - arch/arm/mach-prima2/platsmp.c | 52 +++++++++++------------------------------- 2 files changed, 13 insertions(+), 40 deletions(-)
arch/arm/mach-prima2/common.c +0 -1
@@ -23,7 +23,6 @@ static void __init sirfsoc_init_late(void)static __init void sirfsoc_map_io (void ) {sirfsoc_map_lluart (); -sirfsoc_map_scu (); }#ifdef CONFIG_ARCH_ATLAS6
arch/arm/mach-prima2/platsmp.c +13 -39
91 lines not on this page · raw message
Signature · 1 line
2.2.0
Arnd Bergmann
maintainerPATCH 4/4 ARM: sirf: bring up SMP in atlas7 SoC
Quoted 9 lines · On Thursday 25 December 2014 16:34:20 Barry Song wrote:
From: Zhiwu Song <[email protected]>
correct cpu1 jump/flag address, remove scu related logic, scu doesn't expose in cortex-a7.
this patch breaks marco chip, but marco project has been dropped.
Signed-off-by Zhiwu Song <[email protected]>Signed-off-by Barry Song <[email protected]>
It doesn't seem nice to intentionally break hardware that we still have support for in the kernel. If Marco is not used anywhere, how about sending another patch before this one to remove all references to it?
Arnd
PATCH 4/4 ARM: sirf: bring up SMP in atlas7 SoC
2014-12-31 6:38 GMT+08:00 Arnd Bergmann <[email protected]>:
Quoted 6 lines · On Thursday 25 December 2014 16:34:20 Barry Song wrote:
Quoted 5 lines
From: Zhiwu Song <[email protected]>
correct cpu1 jump/flag address, remove scu related logic, scu doesn't expose in cortex-a7.
Quoted 8 lines
Quoted 4 lines
this patch breaks marco chip, but marco project has been dropped.
Signed-off-by Zhiwu Song <[email protected]>Signed-off-by Barry Song <[email protected]>It doesn't seem nice to intentionally break hardware that we still have support for in the kernel. If Marco is not used anywhere, how about sending another patch before this one to remove all references to it?
it is ok. we can drop the MARCO machine and related configurations.
Quoted 2 lines
Arnd
-barry