[U-Boot] [PATCH 4/4] vexpress64: support the Juno Development Platform

2014-12-23 Thread Linus Walleij
The Juno Development Platform is a physical Versatile Express
device with some differences from the emulated semihosting
models. The main difference is that the system is split in
a SoC and an FPGA where the SoC hosts the serial ports at
totally different adresses.

Signed-off-by: Linus Walleij 
---
 arch/arm/Kconfig   |  4 
 board/armltd/vexpress64/Kconfig| 13 +
 board/armltd/vexpress64/MAINTAINERS|  5 +
 configs/vexpress_aemv8a_juno_defconfig |  5 +
 include/configs/vexpress_aemv8a.h  | 20 +++-
 5 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 configs/vexpress_aemv8a_juno_defconfig

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 9a7e36570de5..489c16f3ccd6 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -736,6 +736,10 @@ config TARGET_VEXPRESS64_BASE_FVP
select ARM64
select SEMIHOSTING
 
+config TARGET_VEXPRESS64_JUNO
+   bool "Support Versatile Express Juno Development Platform"
+   select ARM64
+
 config TARGET_LS2085A_EMU
bool "Support ls2085a_emu"
select ARM64
diff --git a/board/armltd/vexpress64/Kconfig b/board/armltd/vexpress64/Kconfig
index 2343e717f121..f7de039b7f5b 100644
--- a/board/armltd/vexpress64/Kconfig
+++ b/board/armltd/vexpress64/Kconfig
@@ -23,3 +23,16 @@ config SYS_CONFIG_NAME
default "vexpress_aemv8a"
 
 endif
+
+if TARGET_VEXPRESS64_JUNO
+
+config SYS_BOARD
+   default "vexpress64"
+
+config SYS_VENDOR
+   default "armltd"
+
+config SYS_CONFIG_NAME
+   default "vexpress_aemv8a"
+
+endif
diff --git a/board/armltd/vexpress64/MAINTAINERS 
b/board/armltd/vexpress64/MAINTAINERS
index 66c8dffa1634..0ba044d7ff87 100644
--- a/board/armltd/vexpress64/MAINTAINERS
+++ b/board/armltd/vexpress64/MAINTAINERS
@@ -9,3 +9,8 @@ VEXPRESS_AEMV8A_SEMI BOARD
 M: Linus Walleij 
 S: Maintained
 F: configs/vexpress_aemv8a_semi_defconfig
+
+JUNO DEVELOPMENT PLATFORM BOARD
+M: Linus Walleij 
+S: Maintained
+F: configs/vexpress_aemv8a_juno_defconfig
diff --git a/configs/vexpress_aemv8a_juno_defconfig 
b/configs/vexpress_aemv8a_juno_defconfig
new file mode 100644
index ..d28a4286e5af
--- /dev/null
+++ b/configs/vexpress_aemv8a_juno_defconfig
@@ -0,0 +1,5 @@
+# ARM Ltd. Juno Board Reference Design
+CONFIG_ARM=y
+CONFIG_TARGET_VEXPRESS64_JUNO=y
+CONFIG_DEFAULT_DEVICE_TREE="vexpress64"
+CONFIG_SHOW_BOOT_PROGRESS=y
diff --git a/include/configs/vexpress_aemv8a.h 
b/include/configs/vexpress_aemv8a.h
index 85894bedf8bd..9527b02718dd 100644
--- a/include/configs/vexpress_aemv8a.h
+++ b/include/configs/vexpress_aemv8a.h
@@ -21,9 +21,11 @@
 
 #define CONFIG_REMAKE_ELF
 
-#ifndef CONFIG_TARGET_VEXPRESS64_BASE_FVP
+#if !defined(CONFIG_TARGET_VEXPRESS64_BASE_FVP) && \
+!defined(CONFIG_TARGET_VEXPRESS64_JUNO)
 /* Base FVP and Juno not using GICv3 yet */
 #define CONFIG_GICV3
+//#define CONFIG_GICV2
 #endif
 
 /*#define CONFIG_ARMV8_SWITCH_TO_EL1*/
@@ -44,6 +46,9 @@
 /* ATF loads u-boot here for BASE_FVP model */
 #define CONFIG_SYS_TEXT_BASE   0x8800
 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x03f0)
+#elif CONFIG_TARGET_VEXPRESS64_JUNO
+#define CONFIG_SYS_TEXT_BASE   0xe000
+#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
 #else
 #define CONFIG_SYS_TEXT_BASE   0x8000
 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
@@ -88,10 +93,15 @@
 #define V2M_KMI0   (V2M_PA_CS3 + V2M_PERIPH_OFFSET(6))
 #define V2M_KMI1   (V2M_PA_CS3 + V2M_PERIPH_OFFSET(7))
 
+#ifdef CONFIG_TARGET_VEXPRESS64_JUNO
+#define V2M_UART0  0x7ff8
+#define V2M_UART1  0x7ff7
+#else /* Not Juno */
 #define V2M_UART0  (V2M_PA_CS3 + V2M_PERIPH_OFFSET(9))
 #define V2M_UART1  (V2M_PA_CS3 + V2M_PERIPH_OFFSET(10))
 #define V2M_UART2  (V2M_PA_CS3 + V2M_PERIPH_OFFSET(11))
 #define V2M_UART3  (V2M_PA_CS3 + V2M_PERIPH_OFFSET(12))
+#endif
 
 #define V2M_WDT(V2M_PA_CS3 + 
V2M_PERIPH_OFFSET(15))
 
@@ -122,6 +132,9 @@
 #ifdef CONFIG_TARGET_VEXPRESS64_BASE_FVP
 #define GICD_BASE  (0x2f00)
 #define GICC_BASE  (0x2c00)
+#elif CONFIG_TARGET_VEXPRESS64_JUNO
+#define GICD_BASE  (0x2C01)
+#define GICC_BASE  (0x2C02f000)
 #else
 #define GICD_BASE  (0x2C001000)
 #define GICC_BASE  (0x2C002000)
@@ -140,7 +153,11 @@
 
 /* PL011 Serial Configuration */
 #define CONFIG_PL011_SERIAL
+#ifdef CONFIG_TARGET_VEXPRESS64_JUNO
+#define CONFIG_PL011_CLOCK 7273800
+#else
 #define CONFIG_PL011_CLOCK 2400
+#endif
 #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \
 (void

Re: [U-Boot] [PATCH 4/4] vexpress64: support the Juno Development Platform

2014-12-29 Thread Tom Rini
On Wed, Dec 24, 2014 at 02:03:16AM +0100, Linus Walleij wrote:

> The Juno Development Platform is a physical Versatile Express
> device with some differences from the emulated semihosting
> models. The main difference is that the system is split in
> a SoC and an FPGA where the SoC hosts the serial ports at
> totally different adresses.

Ah so that's what it was, thanks!

[snip]
> @@ -21,9 +21,11 @@
>  
>  #define CONFIG_REMAKE_ELF
>  
> -#ifndef CONFIG_TARGET_VEXPRESS64_BASE_FVP
> +#if !defined(CONFIG_TARGET_VEXPRESS64_BASE_FVP) && \
> +!defined(CONFIG_TARGET_VEXPRESS64_JUNO)
>  /* Base FVP and Juno not using GICv3 yet */
>  #define CONFIG_GICV3
> +//#define CONFIG_GICV2

No // style comments.

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot