Add support for Xilinx ZynqMP SoC
v3 cover Add support for Xilinx ZynqMP SoC
From: "Edgar E. Iglesias" <[email protected]>
Adds support for the Cadence UART in Xilinx ZynqMP. The rest of the ZynqMP platform is discovered via device-tree.
Cheers,
Edgar
Changelog:
v2 -> v3:
* Fix coding style issues. (Julien review)
v1 -> v2:
* Rebase with upstream/staging to fix the device-tree device matching. (Ian review)
Edgar E. Iglesias (2):
xen/arm: Add Cadence UART driver
xen/arm: Add Xilinx ZynqMP early printk support
config/arm64.mk | 1 + docs/misc/arm/early-printk.txt | 1 + xen/arch/arm/Rules.mk | 6 + xen/arch/arm/arm64/debug-cadence.inc | 45 +++++++ xen/drivers/char/Makefile | 1 + xen/drivers/char/cadence-uart.c | 224 +++++++++++++++++++++++++++++++++++ xen/include/asm-arm/cadence-uart.h | 55 +++++++++ 7 files changed, 333 insertions(+) create mode 100644 xen/arch/arm/arm64/debug-cadence.inc create mode 100644 xen/drivers/char/cadence-uart.c create mode 100644 xen/include/asm-arm/cadence-uart.h
Signature · 1 line
1.9.1
PATCH v3 1/2 xen/arm: Add Cadence UART driver
--- config/arm64.mk | 1 + xen/drivers/char/Makefile | 1 + xen/drivers/char/cadence-uart.c | 224 +++++++++++++++++++++++++++++++++++++ xen/include/asm-arm/cadence-uart.h | 55 +++++++++ 4 files changed, 281 insertions(+) create mode 100644 xen/drivers/char/cadence-uart.c create mode 100644 xen/include/asm-arm/cadence-uart.h
config/arm64.mk +1 -0
@@ -7,6 +7,7 @@ CONFIG_XEN_INSTALL_SUFFIX := CFLAGS += #-marm -march= -mcpu= etc HAS_PL011 := y +HAS_CADENCE_UART := y HAS_NS16550 := y # Use only if calling $(LD) directly.
xen/drivers/char/Makefile +1 -0
@@ -1,5 +1,6 @@ obj-y += console.o obj-$(HAS_NS16550) += ns16550.o +obj-$(HAS_CADENCE_UART) += cadence-uart.o obj-$(HAS_PL011) += pl011.o obj-$(HAS_EXYNOS4210) += exynos4210-uart.o obj-$(HAS_OMAP) += omap-uart.o
xen/drivers/char/cadence-uart.c new file +224 -0
224 lines not on this page · raw message
xen/include/asm-arm/cadence-uart.h new file +55 -0
55 lines not on this page · raw message
Signature · 1 line
1.9.1
Re: [PATCH v3 1/2] xen/arm: Add Cadence UART driver
Hello Edgar,
Quoted 1 line · Edgar E. Iglesias
Signed-off-by Edgar E. Iglesias <[email protected]>
Regards,
Signature · 1 line
Julien Grall
PATCH v3 2/2 xen/arm: Add Xilinx ZynqMP early printk support
In reply to Edgar E. IglesiasFrom: "Edgar E. Iglesias" <[email protected]>
--- docs/misc/arm/early-printk.txt | 1 + xen/arch/arm/Rules.mk | 6 +++++ xen/arch/arm/arm64/debug-cadence.inc | 45 ++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 xen/arch/arm/arm64/debug-cadence.inc
docs/misc/arm/early-printk.txt +1 -0
@@ -21,6 +21,7 @@ where mach is the name of the machine: - seattle: printk with pl011 for AMD Seattle processor - lager: printk with SCIF0 on Renesas R-Car H2 processors - thunderx: printk with pl011 for Cavium ThunderX processor + - zynqmp: printk with Cadence UART for Xilinx ZynqMP SoCs The base address and baud rate is hardcoded in xen/arch/arm/Rules.mk, see there when adding support for new machines.
xen/arch/arm/Rules.mk +6 -0
@@ -118,6 +118,12 @@ EARLY_PRINTK_INC := pl011 EARLY_UART_BASE_ADDRESS := 0x87e024000000 endif +ifeq ($(CONFIG_EARLY_PRINTK), zynqmp) +EARLY_PRINTK_INC := cadence +EARLY_PRINTK_BAUD := 115200 +EARLY_UART_BASE_ADDRESS := 0xff000000 +endif + ifneq ($(EARLY_PRINTK_INC),) EARLY_PRINTK := y endif
xen/arch/arm/arm64/debug-cadence.inc new file +45 -0
45 lines not on this page · raw message
Signature · 1 line
1.9.1
Hello Edgar,
Thank you for adding support of the ZynqMP.
Quoted 4 lines · Edgar E. Iglesias
From: "Edgar E. Iglesias" <[email protected]>
Adds support for the Cadence UART in Xilinx ZynqMP. The rest of the ZynqMP platform is discovered via device-tree.
Did you make sure that the default grant table range (0xb0000000 - 0xb0020000) don't overlap with an hardware region?
Regards,
Signature · 1 line
Julien Grall
Quoted 4 lines · Julien Grall
Hello Edgar,
Thank you for adding support of the ZynqMP.
Quoted 8 lines
Quoted 4 lines · Edgar E. Iglesias
From: "Edgar E. Iglesias" <[email protected]>
Adds support for the Cadence UART in Xilinx ZynqMP. The rest of the ZynqMP platform is discovered via device-tree.
Did you make sure that the default grant table range (
0xb0000000-0xb0020000) don't overlap with an hardware region?
No I didn't, thanks for pointing that out. I need to move these to another address.
So now I'm back to needing platform specific code. Long term, Maybe it would make sense making the grant table range somehow configurable via DT?
Anyway, I'll send a v4 with the platform code to move the gnt into a reserved area in the memory map.
Thanks,
Edgar
Quoted 5 lines
Regards,
Signature · 1 line
Julien Grall
Quoted 14 lines · Edgar E. Iglesias
Quoted 4 lines · Julien Grall
Hello Edgar,
Thank you for adding support of the ZynqMP.
Quoted 8 lines
Quoted 4 lines · Edgar E. Iglesias
From: "Edgar E. Iglesias" <[email protected]>
Adds support for the Cadence UART in Xilinx ZynqMP. The rest of the ZynqMP platform is discovered via device-tree.
Did you make sure that the default grant table range (
0xb0000000-0xb0020000) don't overlap with an hardware region?
Quoted 6 lines
No I didn't, thanks for pointing that out. I need to move these to another address.
So now I'm back to needing platform specific code. Long term, Maybe it would make sense making the grant table range somehow configurable via DT?
The plan is to have Xen preallocate the grant table pages and expose their physical address to dom0, so when dom0 then maps it 1:1 it won't clash with either memory used by Xen or by the dom0's actual assigned memory and since it is RAM it can't possibly clash with any MMIO.
Quoted 2 lines
Anyway, I'll send a v4 with the platform code to move the gnt into a reserved area in the memory map.
Ian.
Sorry for top post.
That makes sense, thanks!
Cheers,
Edgar
---
Sent from my phone
Quoted 27 lines · Ian Campbell
Quoted 14 lines · Edgar E. Iglesias
Quoted 4 lines · Julien Grall
Hello Edgar,
Thank you for adding support of the ZynqMP.
Quoted 8 lines
Quoted 4 lines · Edgar E. Iglesias
From: "Edgar E. Iglesias" <[email protected]>
Adds support for the Cadence UART in Xilinx ZynqMP. The rest of the ZynqMP platform is discovered via device-tree.
Did you make sure that the default grant table range (
0xb0000000-0xb0020000) don't overlap with an hardware region?Quoted 6 lines
No I didn't, thanks for pointing that out. I need to move these to another address.
So now I'm back to needing platform specific code. Long term, Maybe it would make sense making the grant table range somehow configurable via DT?
The plan is to have Xen preallocate the grant table pages and expose their physical address to dom0, so when dom0 then maps it 1:1 it won't clash with either memory used by Xen or by the dom0's actual assigned memory and since it is RAM it can't possibly clash with any MMIO.
Quoted 6 lines
Quoted 2 lines
Anyway, I'll send a v4 with the platform code to move the gnt into a reserved area in the memory map.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel