From 3989d95473036f0cd320ea03c196c500f2963a86 Mon Sep 17 00:00:00 2001 From: Simon Shields <simon.shields@data61.csiro.au> Date: Wed, 16 Jan 2019 13:47:33 +1100 Subject: [PATCH] arm: use UART_PPTR for all uarts --- include/plat/allwinnerA20/plat/machine/devices.h | 2 +- include/plat/allwinnerA20/plat/machine/hardware.h | 2 +- include/plat/am335x/plat/machine/devices.h | 2 +- include/plat/am335x/plat/machine/hardware.h | 2 +- include/plat/hikey/plat/32/plat_mode/machine/devices.h | 2 +- include/plat/hikey/plat/64/plat_mode/machine/devices.h | 2 +- include/plat/hikey/plat/machine/hardware.h | 2 +- include/plat/omap3/plat/machine/devices.h | 2 +- include/plat/omap3/plat/machine/hardware.h | 2 +- include/plat/tk1/plat/machine/devices.h | 1 + include/plat/tx1/plat/machine/devices.h | 2 +- include/plat/tx1/plat/machine/hardware.h | 2 +- include/plat/tx2/plat/machine/devices.h | 2 +- include/plat/tx2/plat/machine/hardware.h | 2 +- src/plat/allwinnerA20/machine/io.c | 2 +- src/plat/am335x/machine/io.c | 2 +- src/plat/hikey/machine/io.c | 2 +- src/plat/omap3/machine/io.c | 2 +- src/plat/tk1/machine/io.c | 2 +- src/plat/tx1/machine/io.c | 2 +- src/plat/tx2/machine/io.c | 2 +- 21 files changed, 21 insertions(+), 20 deletions(-) diff --git a/include/plat/allwinnerA20/plat/machine/devices.h b/include/plat/allwinnerA20/plat/machine/devices.h index bef602d96..06d71f333 100644 --- a/include/plat/allwinnerA20/plat/machine/devices.h +++ b/include/plat/allwinnerA20/plat/machine/devices.h @@ -18,7 +18,7 @@ #define __PLAT_MACHINE_DEVICES_H /* These devices are used by the seL4 kernel. */ -#define UART0_PPTR 0xfff01000 +#define UART_PPTR 0xfff01000 #define TIMER0_PPTR 0xfff02000 #define GIC_DISTRIBUTOR_PPTR 0xfff03000 #define GIC_CONTROLLER_PPTR 0xfff04000 diff --git a/include/plat/allwinnerA20/plat/machine/hardware.h b/include/plat/allwinnerA20/plat/machine/hardware.h index 1b70163d9..7736ed2d1 100755 --- a/include/plat/allwinnerA20/plat/machine/hardware.h +++ b/include/plat/allwinnerA20/plat/machine/hardware.h @@ -35,7 +35,7 @@ static const kernel_frame_t BOOT_RODATA kernel_devices[] = { { /* UART */ UART0_PADDR, - UART0_PPTR, + UART_PPTR, true /* armExecuteNever */ #endif } diff --git a/include/plat/am335x/plat/machine/devices.h b/include/plat/am335x/plat/machine/devices.h index fc7946feb..8767e429f 100644 --- a/include/plat/am335x/plat/machine/devices.h +++ b/include/plat/am335x/plat/machine/devices.h @@ -13,7 +13,7 @@ /* These devices are used by the kernel. */ #define INTC_PPTR 0xfff01000 -#define UART0_PPTR 0xfff02000 +#define UART_PPTR 0xfff02000 #define DMTIMER0_PPTR 0xfff03000 #define WDT1_PPTR 0xfff04000 #define CMPER_PPTR 0xfff05000 diff --git a/include/plat/am335x/plat/machine/hardware.h b/include/plat/am335x/plat/machine/hardware.h index 4d47c521b..f215aeb75 100644 --- a/include/plat/am335x/plat/machine/hardware.h +++ b/include/plat/am335x/plat/machine/hardware.h @@ -47,7 +47,7 @@ static const kernel_frame_t BOOT_RODATA kernel_devices[] = { { /* UART */ UART0_PADDR, - UART0_PPTR, + UART_PPTR, true /* armExecuteNever */ #endif } diff --git a/include/plat/hikey/plat/32/plat_mode/machine/devices.h b/include/plat/hikey/plat/32/plat_mode/machine/devices.h index 47126e023..9516d17b6 100644 --- a/include/plat/hikey/plat/32/plat_mode/machine/devices.h +++ b/include/plat/hikey/plat/32/plat_mode/machine/devices.h @@ -14,7 +14,7 @@ #define __PLAT_MODE_MACHINE_DEVICES_H /* These devices are used by the seL4 kernel. */ -#define UART0_PPTR 0xfff01000 +#define UART_PPTR 0xfff01000 #define GIC_DISTRIBUTOR_PPTR 0xfff03000 #define GIC_CONTROLLER_PPTR 0xfff04000 #define ARM_DEBUG_MMAPPING_PPTR 0xfff05000 diff --git a/include/plat/hikey/plat/64/plat_mode/machine/devices.h b/include/plat/hikey/plat/64/plat_mode/machine/devices.h index 5e749afc5..9a2bf2af0 100644 --- a/include/plat/hikey/plat/64/plat_mode/machine/devices.h +++ b/include/plat/hikey/plat/64/plat_mode/machine/devices.h @@ -14,7 +14,7 @@ #define __PLAT_MODE_MACHINE_DEVICES_H /* These devices are used by the seL4 kernel. */ -#define UART0_PPTR 0xffffffffffff0000 +#define UART_PPTR 0xffffffffffff0000 #define GIC_DISTRIBUTOR_PPTR 0xffffffffffff3000 #define GIC_CONTROLLER_PPTR 0xffffffffffff4000 diff --git a/include/plat/hikey/plat/machine/hardware.h b/include/plat/hikey/plat/machine/hardware.h index 06cd6fb2e..dfa719336 100755 --- a/include/plat/hikey/plat/machine/hardware.h +++ b/include/plat/hikey/plat/machine/hardware.h @@ -34,7 +34,7 @@ static const kernel_frame_t BOOT_RODATA kernel_devices[] = { { /* UART */ UART0_PADDR, - UART0_PPTR, + UART_PPTR, true /* armExecuteNever */ #endif } diff --git a/include/plat/omap3/plat/machine/devices.h b/include/plat/omap3/plat/machine/devices.h index 48e0dd23c..5412292c1 100644 --- a/include/plat/omap3/plat/machine/devices.h +++ b/include/plat/omap3/plat/machine/devices.h @@ -19,7 +19,7 @@ #define __PLAT_MACHINE_DEVICES_H /* These devices are used by the seL4 kernel. */ -#define UART3_PPTR 0xfff01000 +#define UART_PPTR 0xfff01000 #define INTC_PPTR 0xfff02000 #define GPTIMER9_PPTR 0xfff03000 #define ARM_DEBUG_MMAPPING_PPTR 0xfff04000 diff --git a/include/plat/omap3/plat/machine/hardware.h b/include/plat/omap3/plat/machine/hardware.h index d115ee17b..7bc466dc9 100644 --- a/include/plat/omap3/plat/machine/hardware.h +++ b/include/plat/omap3/plat/machine/hardware.h @@ -36,7 +36,7 @@ static const kernel_frame_t BOOT_RODATA kernel_devices[] = { { /* UART */ UART3_PADDR, - UART3_PPTR, + UART_PPTR, true /* armExecuteNever */ #endif } diff --git a/include/plat/tk1/plat/machine/devices.h b/include/plat/tk1/plat/machine/devices.h index 520aec52e..1a4feae6d 100644 --- a/include/plat/tk1/plat/machine/devices.h +++ b/include/plat/tk1/plat/machine/devices.h @@ -26,6 +26,7 @@ #define ARM_DEBUG_MMAPPING_PPTR 0xfff08000 +#define UART_PPTR UARTD_PPTR #define GIC_PL390_CONTROLLER_PPTR GIC_CONTROLLER_PPTR #define GIC_PL390_DISTRIBUTOR_PPTR GIC_DISTRIBUTOR_PPTR diff --git a/include/plat/tx1/plat/machine/devices.h b/include/plat/tx1/plat/machine/devices.h index 66792c591..4e0ea3967 100644 --- a/include/plat/tx1/plat/machine/devices.h +++ b/include/plat/tx1/plat/machine/devices.h @@ -22,7 +22,7 @@ #define KDEV_PPTR 0xffffffffffff0000lu #endif -#define UARTA_PPTR (KDEV_PPTR) +#define UART_PPTR (KDEV_PPTR) #define GIC_DISTRIBUTOR_PPTR (KDEV_PPTR + 0x3000) #define GIC_CONTROLLER_PPTR (KDEV_PPTR + 0x4000) #define GICH_PPTR (KDEV_PPTR + 0x6000) diff --git a/include/plat/tx1/plat/machine/hardware.h b/include/plat/tx1/plat/machine/hardware.h index 2e7f9ca84..d62905b28 100644 --- a/include/plat/tx1/plat/machine/hardware.h +++ b/include/plat/tx1/plat/machine/hardware.h @@ -37,7 +37,7 @@ static const kernel_frame_t BOOT_RODATA kernel_devices[] = { { /* UART */ UARTA_PADDR, - UARTA_PPTR, + UART_PPTR, true #endif /* CONFIG_PRINTING */ #ifdef CONFIG_ARM_HYPERVISOR_SUPPORT diff --git a/include/plat/tx2/plat/machine/devices.h b/include/plat/tx2/plat/machine/devices.h index c391a003b..8c7becf38 100644 --- a/include/plat/tx2/plat/machine/devices.h +++ b/include/plat/tx2/plat/machine/devices.h @@ -38,7 +38,7 @@ compile_assert(log_buffer_vaddr_2MiB_aligned, (KS_LOG_PPTR & (0x200000 - 1)) == #endif -#define UARTA_PPTR (KDEV_PPTR) +#define UART_PPTR (KDEV_PPTR) #define GIC_DISTRIBUTOR_PPTR (KDEV_PPTR + 0x3000) #define GIC_CONTROLLER_PPTR (KDEV_PPTR + 0x4000) #define GICH_PPTR (KDEV_PPTR + 0x6000) diff --git a/include/plat/tx2/plat/machine/hardware.h b/include/plat/tx2/plat/machine/hardware.h index bd0d90378..b9f9d9e45 100644 --- a/include/plat/tx2/plat/machine/hardware.h +++ b/include/plat/tx2/plat/machine/hardware.h @@ -37,7 +37,7 @@ static const kernel_frame_t BOOT_RODATA kernel_devices[] = { { /* UART */ UARTA_PADDR, - UARTA_PPTR, + UART_PPTR, true #endif /* CONFIG_PRINTING */ #ifdef CONFIG_ARM_HYPERVISOR_SUPPORT diff --git a/src/plat/allwinnerA20/machine/io.c b/src/plat/allwinnerA20/machine/io.c index 7e0fa919c..956ff6f8c 100755 --- a/src/plat/allwinnerA20/machine/io.c +++ b/src/plat/allwinnerA20/machine/io.c @@ -18,7 +18,7 @@ #define ULSR 0x14 /* UART Line Status Register */ #define ULSR_THRE 0x20 /* Transmit Holding Register Empty */ -#define UART_REG(x) ((volatile uint32_t *)(UART0_PPTR + (x))) +#define UART_REG(x) ((volatile uint32_t *)(UART_PPTR + (x))) #if defined(CONFIG_DEBUG_BUILD) || defined(CONFIG_PRINTING) void diff --git a/src/plat/am335x/machine/io.c b/src/plat/am335x/machine/io.c index 84ca4ecf7..5617b247e 100644 --- a/src/plat/am335x/machine/io.c +++ b/src/plat/am335x/machine/io.c @@ -18,7 +18,7 @@ #define ULSR 0x14 /* UART Line Status Register */ #define ULSR_THRE BIT(5) /* Transmit Holding Register Empty */ -#define UART_REG(x) ((volatile uint32_t *)(UART0_PPTR + (x))) +#define UART_REG(x) ((volatile uint32_t *)(UART_PPTR + (x))) #if defined(CONFIG_PRINTING) || defined(CONFIG_DEBUG_BUILD) void diff --git a/src/plat/hikey/machine/io.c b/src/plat/hikey/machine/io.c index f5f13caf0..069dfd2b7 100644 --- a/src/plat/hikey/machine/io.c +++ b/src/plat/hikey/machine/io.c @@ -18,7 +18,7 @@ #define UARTFR 0x018 #define PL011_UARTFR_TXFF (1 << 5) -#define UART_REG(x) ((volatile uint32_t *)(UART0_PPTR + (x))) +#define UART_REG(x) ((volatile uint32_t *)(UART_PPTR + (x))) #if defined(CONFIG_DEBUG_BUILD) || defined(CONFIG_PRINTING) void diff --git a/src/plat/omap3/machine/io.c b/src/plat/omap3/machine/io.c index 44a0a3dad..995e62a97 100644 --- a/src/plat/omap3/machine/io.c +++ b/src/plat/omap3/machine/io.c @@ -18,7 +18,7 @@ #define ULSR 0x14 /* UART Line Status Register */ #define ULSR_THRE 0x20 /* Transmit Holding Register Empty */ -#define UART_REG(x) ((volatile uint32_t *)(UART3_PPTR + (x))) +#define UART_REG(x) ((volatile uint32_t *)(UART_PPTR + (x))) #if defined(CONFIG_DEBUG_BUILD) || defined(CONFIG_PRINTING) void diff --git a/src/plat/tk1/machine/io.c b/src/plat/tk1/machine/io.c index 3094198a4..d6ccca757 100644 --- a/src/plat/tk1/machine/io.c +++ b/src/plat/tk1/machine/io.c @@ -18,7 +18,7 @@ #define ULSR 0x14 #define ULSR_THRE (1 << 5) -#define UART_REG(x) ((volatile uint32_t *)(UARTD_PPTR + (x))) +#define UART_REG(x) ((volatile uint32_t *)(UART_PPTR + (x))) #if defined(CONFIG_DEBUG_BUILD) || defined(CONFIG_PRINTING) void diff --git a/src/plat/tx1/machine/io.c b/src/plat/tx1/machine/io.c index 7550d9d62..ef4b43957 100644 --- a/src/plat/tx1/machine/io.c +++ b/src/plat/tx1/machine/io.c @@ -20,7 +20,7 @@ #define ULSR 0x14 #define ULSR_THRE (1 << 5) -#define UART_REG(x) ((volatile uint32_t *)(UARTA_PPTR + (x))) +#define UART_REG(x) ((volatile uint32_t *)(UART_PPTR + (x))) #if defined(CONFIG_DEBUG_BUILD) || defined(CONFIG_PRINTING) void diff --git a/src/plat/tx2/machine/io.c b/src/plat/tx2/machine/io.c index 1ec85477b..e8c52ceab 100644 --- a/src/plat/tx2/machine/io.c +++ b/src/plat/tx2/machine/io.c @@ -20,7 +20,7 @@ #define ULSR 0x14 #define ULSR_THRE BIT(5) -#define UART_REG(x) ((volatile uint32_t *)(UARTA_PPTR + (x))) +#define UART_REG(x) ((volatile uint32_t *)(UART_PPTR + (x))) #if defined(CONFIG_DEBUG_BUILD) || defined(CONFIG_PRINTING) void -- GitLab