ARM: PRIMA2: initial support for SiRFmarco dual-core SoC
Subsystems (4)
From: Barry Song <[email protected]>
SiRFmarco is a dual-core cortex-A9 SoC. This patch adds initial support for it. It is only a RFC for early review from community. I'd like to split it into multiple patches later.
change list:
1. Marco has different OS timer hardware with Prima2, so add a new timer-marco
2. add platsmp.c, headsmp.S and hotplug.c for MPcore support
3. some hardwares have changed, like rstc, so use of_compatible to branch Prima2 and Marco
4. add initial .dtsi for Marco SoC and initial .dts for the EVB
5. some hardware support both Prima2 and Marco, add marco stuff to of_match tables
6. use GIC for Marco instead of Prima2's IRQ controller
7. add DEBUG_LL uart ports for Prima2 and Marco debug ports
---
arch/arm/Kconfig | 3 +-
arch/arm/Kconfig.debug | 14 +
arch/arm/Makefile | 2 +-
arch/arm/boot/dts/marco-evb.dts | 20 +
arch/arm/boot/dts/marco.dtsi | 497 ++++++++++++++++++++++
arch/arm/configs/marcocb_defconfig | 86 ++++
arch/arm/mach-prima2/Kconfig | 14 +
arch/arm/mach-prima2/Makefile | 5 +-
arch/arm/mach-prima2/common.c | 44 ++-
arch/arm/mach-prima2/common.h | 6 +-
arch/arm/mach-prima2/headsmp.S | 79 ++++
arch/arm/mach-prima2/hotplug.c | 57 +++
arch/arm/mach-prima2/include/mach/uart.h | 4 +
arch/arm/mach-prima2/l2x0.c | 19 +-
arch/arm/mach-prima2/platsmp.c | 154 +++++++
arch/arm/mach-prima2/pm.c | 1 +
arch/arm/mach-prima2/rstc.c | 47 ++-
arch/arm/mach-prima2/rtciobrg.c | 1 +
arch/arm/mach-prima2/timer-marco.c | 295 +++++++++++++
arch/arm/mach-prima2/{timer.c => timer-prima2.c} | 4 +-
drivers/pinctrl/Kconfig | 2 +-
21 files changed, 1326 insertions(+), 28 deletions(-)
create mode 100644 arch/arm/boot/dts/marco-evb.dts
create mode 100644 arch/arm/boot/dts/marco.dtsi
create mode 100644 arch/arm/configs/marcocb_defconfig
create mode 100644 arch/arm/mach-prima2/headsmp.S
create mode 100644 arch/arm/mach-prima2/hotplug.c
create mode 100644 arch/arm/mach-prima2/platsmp.c
create mode 100644 arch/arm/mach-prima2/timer-marco.c
rename arch/arm/mach-prima2/{timer.c => timer-prima2.c} (98%)arch/arm/Kconfig +2 -1
@@ -418,8 +418,9 @@ config ARCH_SIRF select PINCTRL select PINCTRL_SIRF select USE_OF + select AUTO_ZRELADDR help - Support for CSR SiRFprimaII/Marco/Polo platforms + Support for CSR SiRFprimaII/Marco/Polo platforms config ARCH_EBSA110 bool "EBSA-110"
arch/arm/Kconfig.debug +14 -0
@@ -310,6 +310,20 @@ choice The uncompressor code port configuration is now handled by CONFIG_S3C_LOWLEVEL_UART_PORT. + config DEBUG_SIRFPRIMA2_UART1 + bool "Kernel low-level debugging messages via SiRFprimaII UART1" + depends on ARCH_PRIMA2 + help + Say Y here if you want the debug print routines to direct + their output to the uart1 port on SiRFprimaII devices. + + config DEBUG_SIRFMARCO_UART1 + bool "Kernel low-level debugging messages via SiRFmarco UART1" + depends on ARCH_MARCO + help + Say Y here if you want the debug print routines to direct + their output to the uart1 port on SiRFmarco devices. + config DEBUG_VEXPRESS_UART0_DETECT bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" depends on ARCH_VEXPRESS && CPU_CP15_MMU
arch/arm/Makefile +1 -1
@@ -168,7 +168,6 @@ 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_PXA) := pxa machine-$(CONFIG_ARCH_REALVIEW) := realview machine-$(CONFIG_ARCH_RPC) := rpc
@@ -182,6 +181,7 @@ machine-$(CONFIG_ARCH_EXYNOS5) := exynos machine-$(CONFIG_ARCH_SA1100) := sa1100 machine-$(CONFIG_ARCH_SHARK) := shark machine-$(CONFIG_ARCH_SHMOBILE) := shmobile +machine-$(CONFIG_ARCH_SIRF) := prima2 machine-$(CONFIG_ARCH_TEGRA) := tegra machine-$(CONFIG_ARCH_U300) := u300 machine-$(CONFIG_ARCH_U8500) := ux500
arch/arm/boot/dts/marco-evb.dts new file +20 -0
@@ -0,0 +1,20 @@ +/* + * DTS file for CSR SiRFmarco Evaluation Board + * + * Copyright (c) 2012 Cambridge Silicon Radio Limited, a CSR plc group company. + * + * Licensed under GPLv2 or later. + */ + +/dts-v1/; + +/include/ "marco.dtsi" + +/ { + model = "CSR SiRFmarco Evaluation Board"; + compatible = "sirf,marco", "sirf,marco-cb"; + + memory { + reg = <0x40000000 0x60000000>; + }; +};
arch/arm/boot/dts/marco.dtsi new file +497 -0
497 lines not on this page · raw message
arch/arm/configs/marcocb_defconfig new file +86 -0
86 lines not on this page · raw message
arch/arm/mach-prima2/Kconfig +14 -0
@@ -11,9 +11,23 @@ config ARCH_PRIMA2 help Support for CSR SiRFSoC ARM Cortex A9 Platform +config ARCH_MARCO + bool "CSR SiRFSoC MARCO ARM Cortex A9 Platform" + default y + select CPU_V7 + select HAVE_SMP + select SMP_ON_UP + select ARM_GIC + select SIRFMARCO_FPGA + help + Support for CSR SiRFSoC ARM Cortex A9 Platform + endmenu config SIRF_IRQ bool +config SIRFMARCO_FPGA + bool "CSR SiRFmarco FPGA with 26Mhz io clock" + endif
arch/arm/mach-prima2/Makefile +4 -1
@@ -1,4 +1,3 @@ -obj-y := timer.o obj-y += rstc.o obj-y += common.o obj-y += rtciobrg.o
@@ -6,3 +5,7 @@ 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 +obj-$(CONFIG_SMP) += platsmp.o headsmp.o +obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o +obj-$(CONFIG_ARCH_PRIMA2) += timer-prima2.o +obj-$(CONFIG_ARCH_MARCO) += timer-marco.o
arch/arm/mach-prima2/common.c +41 -3
68 lines not on this page · raw message
arch/arm/mach-prima2/common.h +5 -1
@@ -12,11 +12,13 @@#include <linux/init.h> #include <asm/mach/time.h> -extern struct sys_timer sirfsoc_timer; +extern struct sys_timer sirfsoc_prima2_timer; +extern struct sys_timer sirfsoc_marco_timer;extern void __init sirfsoc_of_irq_init (void );extern void __init sirfsoc_of_clk_init (void );extern void sirfsoc_restart (char ,const char *); +extern void sirfsoc_secondary_startup (void );#ifndef CONFIG_DEBUG_LL static inline void sirfsoc_map_lluart (void ) {}
@@ -24,6 +26,8 @@ static inline void sirfsoc_map_lluart(void) {}extern void __init sirfsoc_map_lluart (void );#endif +extern void sirfsoc_map_scu (void ); +#ifdef CONFIG_SUSPEND extern int sirfsoc_pm_init (void );#else
arch/arm/mach-prima2/headsmp.S new file +79 -0
79 lines not on this page · raw message
arch/arm/mach-prima2/hotplug.c new file +57 -0
57 lines not on this page · raw message
arch/arm/mach-prima2/include/mach/uart.h +4 -0
@@ -10,7 +10,11 @@#define __MACH_PRIMA2_SIRFSOC_UART_H/* UART-1: used as serial debug port */ +#if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1 )#define SIRFSOC_UART1_PA_BASE 0xb0060000 +#elif defined(CONFIG_DEBUG_SIRFMARCO_UART1 ) +#define SIRFSOC_UART1_PA_BASE 0xcc060000 +#endif #define SIRFSOC_UART1_VA_BASE SIRFSOC_VA(0x060000)#define SIRFSOC_UART1_SIZE SZ_4K
arch/arm/mach-prima2/l2x0.c +18 -1
@@ -11,21 +11,38 @@#include <linux/of.h> #include <asm/hardware/cache-l2x0.h> +/* +* fixme: make aux_val and aux_mask the private data +* of of_device_id after we get right aux_val/mask +*/ static struct of_device_id prima2_l2x0_ids[] = { { .compatible ="sirf,prima2-pl310-cache" }, {}, }; +static struct of_device_id marco_l2x0_ids[] = { + { .compatible ="sirf,marco-pl310-cache" }, + {}, +}; +static int __init sirfsoc_l2x0_init (void ) {struct device_node *np; - np =of_find_matching_node (NULL , prima2_l2x0_ids);if (np) {pr_info ("Initializing prima2 L2 cache\n" );return l2x0_of_init (0x40000 ,0 ); } + np =of_find_matching_node (NULL , marco_l2x0_ids); +if (np) { +pr_info ("Initializing marco L2 cache\n" ); +/* +* fixme: set the right aux_val and aux_mask +* return l2x0_of_init(0x10000, 0); +*/ + } +return 0 ; }early_initcall (sirfsoc_l2x0_init);
arch/arm/mach-prima2/platsmp.c new file +154 -0
154 lines not on this page · raw message
arch/arm/mach-prima2/pm.c +1 -0
@@ -93,6 +93,7 @@ int __init sirfsoc_pm_init(void)static const struct of_device_id pwrc_ids[] = { { .compatible ="sirf,prima2-pwrc" }, + { .compatible ="sirf,marco-pwrc" }, {} };
arch/arm/mach-prima2/rstc.c +30 -17
63 lines not on this page · raw message
arch/arm/mach-prima2/rtciobrg.c +1 -0
@@ -104,6 +104,7 @@ EXPORT_SYMBOL_GPL(sirfsoc_rtc_iobrg_writel);static const struct of_device_id rtciobrg_ids[] = { { .compatible ="sirf,prima2-rtciobg" }, + { .compatible ="sirf,marco-rtciobg" }, {} };
arch/arm/mach-prima2/timer-marco.c new file +295 -0
295 lines not on this page · raw message
arch/arm/mach-prima2/timer-prima2.c renamed from arch/arm/mach-prima2/timer.c +2 -2
@@ -233,7 +233,7 @@ static void __init sirfsoc_of_timer_map(void) np =of_find_matching_node (NULL , timer_ids);if (!np) -panic ("unable to find compatible timer node in dtb\n" ); +return ; sirfsoc_timer_base =of_iomap (np,0 );if (!sirfsoc_timer_base)panic ("unable to map timer cpu registers\n" );
@@ -246,6 +246,6 @@ static void __init sirfsoc_of_timer_map(void)of_node_put (np); } -struct sys_timer sirfsoc_timer = { +struct sys_timer sirfsoc_prima2_timer = { .init = sirfsoc_timer_init, };
drivers/pinctrl/Kconfig +1 -1
@@ -112,7 +112,7 @@ config PINCTRL_SINGLE config PINCTRL_SIRF bool "CSR SiRFprimaII pin controller driver" - depends on ARCH_PRIMA2 + depends on ARCH_SIRF select PINMUX config PINCTRL_TEGRA
Signature · 6 lines
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 [email protected]/blog
Quoted 6 lines · Barry Song
arch/arm/boot/dts/marco.dtsi new file +6
-0+ l2-cache-controller at c0030000 { + compatible = "arm,pl310-cache", "sirf,marco-pl310-cache"; + reg = <0xc0030000 0x1000>; + interrupts = <0 59 0>; + arm,tag-latency = <1 1 1>; + arm,data-latency = <1 1 1>;
arch/arm/boot/dts/marco.dtsi line 46
Quoted 10 lines
arch/arm/boot/dts/marco.dtsi new file +10
-0+ arm,filter-ranges = <0x40000000 0xc0000000>; + }; + + gic: interrupt-controller at c0011000 { + compatible = "arm,cortex-a9-gic"; + interrupt-controller; + #interrupt-cells = <3>; + reg = <0xc0011000 0x1000>, + <0xc0010100 0x0100>; + };
The indentation here looks broken. Just use tabs instead of sapces everywhere.
Quoted 7 lines
arch/arm/boot/dts/marco.dtsi new file +7
-0+ rstc-iobg { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0xc2000000 0xc2000000 0x10000>; + + reset-controller at c2000000 {
arch/arm/boot/dts/marco.dtsi line 64
Quoted 10 lines
arch/arm/boot/dts/marco.dtsi new file +10
-0+ compatible = "sirf,marco-rstc"; + reg = <0xc2000000 0x10000>; + }; + }; + + sys-iobg { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0xc3000000 0xc3000000 0x30000>;
It looks to me that the sub-buses all have a size of 0x1000000, so I would recommend listing that one in the ranges, rather than only enough to provide the devices that you actually use.
Quoted 5 lines
arch/arm/boot/dts/marco.dtsi new file +5
-0+ uart0: uart at cc050000 { + cell-index = <0>; + compatible = "sirf,marco-uart"; + reg = <0xcc050000 0x1000>; + interrupts = <0 17 0>;
arch/arm/boot/dts/marco.dtsi line 218
Quoted 10 lines
arch/arm/boot/dts/marco.dtsi new file +10
-0+ fifosize = <128>; + }; + + uart1: uart at cc060000 { + cell-index = <1>; + compatible = "sirf,marco-uart"; + reg = <0xcc060000 0x1000>; + interrupts = <0 18 0>; + fifosize = <32>; + };
For the uart, as well as any other device that only provides a connection to the board rather than being useful by itself, we commonly put a 'status = "disabled"' property in each node in the .dtsi file, and then override them from the board specific .dts file with 'status= "ok"'. That way, only the devices that are actually populated on a particular board and up being registered as platform_devices in Linux.
Quoted 22 lines
arch/arm/boot/dts/marco.dtsi new file +22
-0+ + spi0: spi at cc0D0000 { + cell-index = <0>; + compatible = "sirf,marco-spi"; + reg = <0xcc0D0000 0x10000>; + interrupts = <0 15 0>; + sirf,spi-num-chipselects = <1>; + cs-gpios = <&gpio 0 0>; + }; + + spi1: spi at cc170000 { + cell-index = <1>; + compatible = "sirf,marco-spi"; + reg = <0xcc170000 0x10000>; + interrupts = <0 16 0>; + sirf,spi-num-chipselects = <1>; + cs-gpios = <&gpio 0 0>; + }; + + i2c0: i2c at cc0e0000 { + cell-index = <0>; + compatible = "sirf,marco-i2c";
arch/arm/boot/dts/marco.dtsi line 314
Quoted 10 lines
arch/arm/boot/dts/marco.dtsi new file +10
-0+ reg = <0xcc0e0000 0x10000>; + interrupts = <0 24 0>; + }; + + i2c1: i2c at cc0f0000 { + cell-index = <1>; + compatible = "sirf,marco-i2c"; + reg = <0xcc0f0000 0x10000>; + interrupts = <0 25 0>; + };
Same thing here.
Quoted 9 lines
arch/arm/boot/dts/marco.dtsi new file +9
-0+ pci-iobg { + compatible = "sirf,marco-pciiobg", "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0xcD000000 0xcD000000 0x1000000>; + + sd0: sdhci at cD000000 { + cell-index = <0>; + compatible = "sirf,marco-sdhc";
arch/arm/boot/dts/marco.dtsi line 370
Quoted 10 lines
arch/arm/boot/dts/marco.dtsi new file +10
-0+ reg = <0xcD000000 0x100000>; + interrupts = <0 38 0>; + }; + + sd1: sdhci at cD100000 { + cell-index = <1>; + compatible = "sirf,marco-sdhc"; + reg = <0xcD100000 0x100000>; + interrupts = <0 38 0>; + };
And here. Note that these you are probably missing the gpio lines for card detect and write protect as well as the required "bus-width" property.
arch/arm/configs/marcocb_defconfig
Quoted 5 lines
arch/arm/configs/marcocb_defconfig new file +0
-0
Can you make the defconfig a superset of prima2 and marco? We are trying to keep the number of distinct defconfig files low, while trying to also have build coverage over many drivers.
arch/arm/mach-prima2/hotplug.c line 20
Quoted 11 lines
arch/arm/mach-prima2/hotplug.c new file +5
-0+extern volatile int pen_release; + +static inline void platform_do_lowpower (unsigned int cpu) +{ +flush_cache_all ();
This file will get a merge conflict when we also integrate the patch series to let us abstract the SMP operations into a run-time selectable structure.
arch/arm/mach-prima2/timer-prima2.c
Quoted 13 lines
arch/arm/mach-prima2/timer-marco.c new file +0
-0arch/arm/mach-prima2/timer-prima2.c renamed from arch/arm/mach-prima2/timer.c +0
-0
Both of these files should now be moved out of the platform directory into drivers/clocksource/.
Arnd
Hi Arnd,
Thanks a lot for reviewing.
2012/9/3 Arnd Bergmann <[email protected]>:
Quoted 19 lines · Barry Song
Quoted 7 lines
arch/arm/boot/dts/marco.dtsi new file +6
-0+ l2-cache-controller at c0030000 { + compatible = "arm,pl310-cache", "sirf,marco-pl310-cache"; + reg = <0xc0030000 0x1000>; + interrupts = <0 59 0>; + arm,tag-latency = <1 1 1>; + arm,data-latency = <1 1 1>;arch/arm/boot/dts/marco.dtsi line 46
Quoted 10 lines
arch/arm/boot/dts/marco.dtsi new file +10
-0+ arm,filter-ranges = <0x40000000 0xc0000000>; + }; + + gic: interrupt-controller at c0011000 { + compatible = "arm,cortex-a9-gic"; + interrupt-controller; + #interrupt-cells = <3>; + reg = <0xc0011000 0x1000>, + <0xc0010100 0x0100>; + };
Quoted 1 line
The indentation here looks broken. Just use tabs instead of sapces everywhere.
ok.
Quoted 14 lines
Quoted 14 lines
arch/arm/boot/dts/marco.dtsi new file +13
-0+ rstc-iobg { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0xc2000000 0xc2000000 0x10000>; + + reset-controller at c2000000 { + compatible = "sirf,marco-rstc"; + reg = <0xc2000000 0x10000>; + }; + }; + + sys-iobg {
Quoted 8 lines
arch/arm/boot/dts/marco.dtsi line 64
Quoted 4 lines
arch/arm/boot/dts/marco.dtsi new file +4
-0+ compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0xc3000000 0xc3000000 0x30000>;It looks to me that the sub-buses all have a size of
0x1000000, so I would recommend listing that one in the ranges, rather than only enough to provide the devices that you actually use.
these ranges come from the hw spec. it seems you mean something like:
ranges = <0xcc050000 0xcc050000 0x1000
0xcc060000 0xcc060000 0x1000
0xcc190000 0xcc190000 0x1000
....>;then the list will be very long. i can't really understand the benefit. of course, if a driver makes misoperations to map an address not in this list, io mapping will fail for it.
here <0xc3000000 0xc3000000 0x30000> is the filter range that will go through sys-iobg in marco SoC. if an address located in this range doesn't locate in a real hardware which exists, the driver should fail due to hw error.
Quoted 17 lines
Quoted 6 lines
arch/arm/boot/dts/marco.dtsi new file +5
-0+ uart0: uart at cc050000 { + cell-index = <0>; + compatible = "sirf,marco-uart"; + reg = <0xcc050000 0x1000>; + interrupts = <0 17 0>;arch/arm/boot/dts/marco.dtsi line 218
Quoted 10 lines
arch/arm/boot/dts/marco.dtsi new file +10
-0+ fifosize = <128>; + }; + + uart1: uart at cc060000 { + cell-index = <1>; + compatible = "sirf,marco-uart"; + reg = <0xcc060000 0x1000>; + interrupts = <0 18 0>; + fifosize = <32>; + };
Quoted 6 lines
For the uart, as well as any other device that only provides a connection to the board rather than being useful by itself, we commonly put a 'status = "disabled"' property in each node in the .dtsi file, and then override them from the board specific .dts file with 'status= "ok"'. That way, only the devices that are actually populated on a particular board and up being registered as
platform_devicesin Linux.
ok.
Quoted 51 lines
Quoted 23 lines
arch/arm/boot/dts/marco.dtsi new file +22
-0+ + spi0: spi at cc0D0000 { + cell-index = <0>; + compatible = "sirf,marco-spi"; + reg = <0xcc0D0000 0x10000>; + interrupts = <0 15 0>; + sirf,spi-num-chipselects = <1>; + cs-gpios = <&gpio 0 0>; + }; + + spi1: spi at cc170000 { + cell-index = <1>; + compatible = "sirf,marco-spi"; + reg = <0xcc170000 0x10000>; + interrupts = <0 16 0>; + sirf,spi-num-chipselects = <1>; + cs-gpios = <&gpio 0 0>; + }; + + i2c0: i2c at cc0e0000 { + cell-index = <0>; + compatible = "sirf,marco-i2c";arch/arm/boot/dts/marco.dtsi line 314
Quoted 10 lines
arch/arm/boot/dts/marco.dtsi new file +10
-0+ reg = <0xcc0e0000 0x10000>; + interrupts = <0 24 0>; + }; + + i2c1: i2c at cc0f0000 { + cell-index = <1>; + compatible = "sirf,marco-i2c"; + reg = <0xcc0f0000 0x10000>; + interrupts = <0 25 0>; + };Same thing here.
Quoted 14 lines
arch/arm/boot/dts/marco.dtsi new file +14
-0+ pci-iobg { + compatible = "sirf,marco-pciiobg", "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0xcD000000 0xcD000000 0x1000000>; + + sd0: sdhci at cD000000 { + cell-index = <0>; + compatible = "sirf,marco-sdhc"; + reg = <0xcD000000 0x100000>; + interrupts = <0 38 0>; + }; + + sd1: sdhci at cD100000 {
Quoted 8 lines
arch/arm/boot/dts/marco.dtsi line 370
Quoted 5 lines
arch/arm/boot/dts/marco.dtsi new file +5
-0+ cell-index = <1>; + compatible = "sirf,marco-sdhc"; + reg = <0xcD100000 0x100000>; + interrupts = <0 38 0>; + };And here. Note that these you are probably missing the gpio lines for card detect and write protect as well as the required "bus-width" property.
ok. i will check. we don't have brought up SD driver yet.
Quoted 10 lines
arch/arm/configs/marcocb_defconfig
Quoted 6 lines
arch/arm/configs/marcocb_defconfig new file +0
-0Can you make the defconfig a superset of prima2 and marco? We are trying to keep the number of distinct defconfig files low, while trying to also have build coverage over many drivers.
yes, i can. the only problem is actually we don't want prima2 to have SMP. but of course we can make the uniprocessor work on mpcore sw.
Quoted 7 lines
Quoted 6 lines
arch/arm/mach-prima2/hotplug.c new file +0
-0
Quoted 9 lines
arch/arm/mach-prima2/hotplug.c line 20
Quoted 5 lines
arch/arm/mach-prima2/hotplug.c new file +5
-0+extern volatile int pen_release; + +static inline void platform_do_lowpower (unsigned int cpu) +{ +flush_cache_all ();This file will get a merge conflict when we also integrate the patch series to let us abstract the SMP operations into a run-time selectable structure.
yes. smp_ops(sirfsoc_smp_ops) came to my plan, but i haven't updated to that yet.
Quoted 7 lines
Quoted 6 lines
arch/arm/mach-prima2/timer-marco.c new file +0
-0
Quoted 10 lines
arch/arm/mach-prima2/timer-prima2.c
Quoted 7 lines
arch/arm/mach-prima2/timer-prima2.c renamed from arch/arm/mach-prima2/timer.c +0
-0Both of these files should now be moved out of the platform directory into
drivers/clocksource/.
ok.
Quoted 2 lines
Arnd
-barry
Quoted 28 lines · Barry Song
Quoted 14 lines
Quoted 14 lines
arch/arm/boot/dts/marco.dtsi new file +13
-0+ rstc-iobg { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0xc2000000 0xc2000000 0x10000>; + + reset-controller at c2000000 { + compatible = "sirf,marco-rstc"; + reg = <0xc2000000 0x10000>; + }; + }; + + sys-iobg {Quoted 8 lines
arch/arm/boot/dts/marco.dtsi line 64
Quoted 4 lines
arch/arm/boot/dts/marco.dtsi new file +4
-0+ compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0xc3000000 0xc3000000 0x30000>;It looks to me that the sub-buses all have a size of
0x1000000, so I would recommend listing that one in the ranges, rather than only enough to provide the devices that you actually use.these ranges come from the hw spec. it seems you mean something like:
ranges = <0xcc050000 0xcc050000 0x1000 0xcc060000 0xcc060000 0x1000 0xcc190000 0xcc190000 0x1000 ....>;
Quoted 7 lines
then the list will be very long. i can't really understand the benefit. of course, if a driver makes misoperations to map an address not in this list, io mapping will fail for it.
here <0xc30000000xc30000000x30000> is the filter range that will go through sys-iobg in marco SoC. if an address located in this range doesn't locate in a real hardware which exists, the driver should fail due to hw error.
I actually meant
ranges = <0xc2000000 0xc2000000 0x1000000>;
Since each iobg range seems to be 16MB apart from the previous one, I would assume that the actual ranges that get translated are also 16 MB, not 64 KB or 192 KB as in the examples above. The rule however is that you should model what the hardware does, and if that bus has a 192KB window, then you should list that in the DT source.
Arnd
2012/9/5 Arnd Bergmann <[email protected]>:
Quoted 40 lines · Barry Song
Quoted 29 lines
Quoted 15 lines
Quoted 15 lines
arch/arm/boot/dts/marco.dtsi new file +13
-0+ rstc-iobg { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0xc2000000 0xc2000000 0x10000>; + + reset-controller at c2000000 { + compatible = "sirf,marco-rstc"; + reg = <0xc2000000 0x10000>; + }; + }; + + sys-iobg {Quoted 8 lines
arch/arm/boot/dts/marco.dtsi line 64
Quoted 4 lines
arch/arm/boot/dts/marco.dtsi new file +4
-0+ compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0xc3000000 0xc3000000 0x30000>;It looks to me that the sub-buses all have a size of
0x1000000, so I would recommend listing that one in the ranges, rather than only enough to provide the devices that you actually use.these ranges come from the hw spec. it seems you mean something like:
ranges = <0xcc050000 0xcc050000 0x1000 0xcc060000 0xcc060000 0x1000 0xcc190000 0xcc190000 0x1000 ....>;Quoted 7 lines
then the list will be very long. i can't really understand the benefit. of course, if a driver makes misoperations to map an address not in this list, io mapping will fail for it.
here <0xc30000000xc30000000x30000> is the filter range that will go through sys-iobg in marco SoC. if an address located in this range doesn't locate in a real hardware which exists, the driver should fail due to hw error.I actually meant
Quoted 7 lines
ranges = <0xc2000000 0xc2000000 0x1000000>;Since each iobg range seems to be 16MB apart from the previous one, I would assume that the actual ranges that get translated are also 16 MB, not 64 KB or 192 KB as in the examples above. The rule however is that you should model what the hardware does, and if that bus has a 192KB window, then you should list that in the DT source.
yes. every iobrg almost begins from a 16MB alignment:
CPURTC IO Bridge: 0xC1000000
RSTC IO Bridge: 0xC2000000
SYS IO Bridge: 0xC3000000
MEM IO Bridge: 0xC4000000
MEM IO Bridge: 0xC5000000
...
i'd like to make sure from SoC guys about the real hardware model.
Quoted 3 lines
Arnd
-barry