ARM: Various: Future-proof serial platdata
Subsystems (2)
PATCH v5 1/1 ARM: Various: Future-proof serial platdata
A few boards still use ns16550_platdata structures, but assume the structure is going to be in a specific order. By explicitly naming each entry, this should also help 'future-proof' in the event the structure changes.
Tested on the Logic PD Torpedo + Wireless.
I only changed a handful of devices that used the same syntax as the Logic board. Appologies if I missed one or stepped on toes. Thanks to Derald Woods and Alexander Graf.
V5: Add fix to arch/arm/cpu/arm926ejs/lpc32xx/devices.c
V4: Fix subject heading
V3: Remove reg_offset out in all the structs. It was reverted out, and and if it did exist, it would get initialized to 0 by default.
V2: I hastily copy-pasted the boards without looking at the UART number. This addresses 3 boards that use UART3 and not UART1.
--- arch/arm/cpu/arm926ejs/lpc32xx/devices.c | 8 ++++---- board/isee/igep00x0/igep00x0.c | 6 +++--- board/logicpd/omap3som/omap3logic.c | 6 +++--- board/logicpd/zoom1/zoom1.c | 6 +++--- board/overo/overo.c | 6 +++--- board/quipos/cairo/cairo.c | 6 +++--- board/ti/beagle/beagle.c | 6 +++--- board/timll/devkit8000/devkit8000.c | 6 +++--- 8 files changed, 25 insertions(+), 25 deletions(-)
arch/arm/cpu/arm926ejs/lpc32xx/devices.c +4 -4
@@ -45,10 +45,10 @@ void lpc32xx_uart_init(unsigned int uart_id)#if !CONFIG_IS_ENABLED (OF_CONTROL )static const struct ns16550_platdata lpc32xx_uart[] = { - {UART3_BASE ,2 ,CONFIG_SYS_NS16550_CLK }, - {UART4_BASE ,2 ,CONFIG_SYS_NS16550_CLK }, - {UART5_BASE ,2 ,CONFIG_SYS_NS16550_CLK }, - {UART6_BASE ,2 ,CONFIG_SYS_NS16550_CLK }, + { .base =UART3_BASE , .reg_shift =2 , .clock =CONFIG_SYS_NS16550_CLK }, + { .base =UART4_BASE , .reg_shift =2 , .clock =CONFIG_SYS_NS16550_CLK }, + { .base =UART5_BASE , .reg_shift =2 , .clock =CONFIG_SYS_NS16550_CLK }, + { .base =UART6_BASE , .reg_shift =2 , .clock =CONFIG_SYS_NS16550_CLK }, };#if defined(CONFIG_LPC32XX_HSUART )
board/isee/igep00x0/igep00x0.c +3 -3
@@ -34,9 +34,9 @@ static const u32 gpmc_lan_config[] = {#endif static const struct ns16550_platdata igep_serial = { -OMAP34XX_UART3 , -2 , -V_NS16550_CLK + .base =OMAP34XX_UART3 , + .reg_shift =2 , + .clock =V_NS16550_CLK };U_BOOT_DEVICE (igep_uart) = {
board/logicpd/omap3som/omap3logic.c +3 -3
@@ -47,9 +47,9 @@ DECLARE_GLOBAL_DATA_PTR;*/ static const struct ns16550_platdata omap3logic_serial = { -OMAP34XX_UART1 , -2 , -V_NS16550_CLK + .base =OMAP34XX_UART1 , + .reg_shift =2 , + .clock =V_NS16550_CLK };U_BOOT_DEVICE (omap3logic_uart) = {
board/logicpd/zoom1/zoom1.c +3 -3
@@ -44,9 +44,9 @@ static const u32 gpmc_lab_enet[] = { };static const struct ns16550_platdata zoom1_serial = { -OMAP34XX_UART3 , -2 , -V_NS16550_CLK + .base =OMAP34XX_UART3 , + .reg_shift =2 , + .clock =V_NS16550_CLK };U_BOOT_DEVICE (zoom1_uart) = {
board/overo/overo.c +3 -3
@@ -68,9 +68,9 @@ static struct { } expansion_config = {0x0};static const struct ns16550_platdata overo_serial = { -OMAP34XX_UART3 , -2 , -V_NS16550_CLK + .base =OMAP34XX_UART3 , + .reg_shift =2 , + .clock =V_NS16550_CLK };U_BOOT_DEVICE (overo_uart) = {
board/quipos/cairo/cairo.c +3 -3
@@ -91,9 +91,9 @@ void get_board_mem_timings(struct board_sdrc_timings *timings)#endif static const struct ns16550_platdata cairo_serial = { -OMAP34XX_UART2 , -2 , -V_NS16550_CLK + .base =OMAP34XX_UART2 , + .reg_shift =2 , + .clock =V_NS16550_CLK };U_BOOT_DEVICE (cairo_uart) = {
board/ti/beagle/beagle.c +3 -3
@@ -73,9 +73,9 @@ static struct { } expansion_config;static const struct ns16550_platdata beagle_serial = { -OMAP34XX_UART3 , -2 , -V_NS16550_CLK + .base =OMAP34XX_UART3 , + .reg_shift =2 , + .clock =V_NS16550_CLK };U_BOOT_DEVICE (beagle_uart) = {
board/timll/devkit8000/devkit8000.c +3 -3
@@ -46,9 +46,9 @@ static u32 gpmc_net_config[GPMC_MAX_REG] = { };static const struct ns16550_platdata devkit8000_serial = { -OMAP34XX_UART3 , -2 , -V_NS16550_CLK + .base =OMAP34XX_UART3 , + .reg_shift =2 , + .clock =V_NS16550_CLK };U_BOOT_DEVICE (devkit8000_uart) = {
Signature · 1 line
1.9.1
PATCH v5 1/1 ARM: Various: Future-proof serial platdata
Quoted 8 lines
Am 02.03.2016 um 12:38 schrieb Adam Ford <[email protected]>:
A few boards still use
ns16550_platdatastructures, but assume the structure is going to be in a specific order. By explicitly naming each entry, this should also help 'future-proof' in the event the structure changes.
Quoted 7 lines
Tested on the Logic PD Torpedo + Wireless.
I only changed a handful of devices that used the same syntax as the Logic board. Appologies if I missed one or stepped on toes. Thanks to Derald Woods and Alexander Graf.
Signed-off-by Adam Ford <[email protected]>
Alex
Vladimir Zapolskiy
maintainerPATCH v5 1/1 ARM: Various: Future-proof serial platdata
In reply to Adam FordHi Adam,
Quoted 39 lines · Adam Ford
A few boards still use
ns16550_platdatastructures, but assume the structure is going to be in a specific order. By explicitly naming each entry, this should also help 'future-proof' in the event the structure changes.Tested on the Logic PD Torpedo + Wireless.
I only changed a handful of devices that used the same syntax as the Logic board. Appologies if I missed one or stepped on toes. Thanks to Derald Woods and Alexander Graf.
Signed-off-by Adam Ford <[email protected]>V5: Add fix to
arch/arm/cpu/arm926ejs/lpc32xx/devices.cV4: Fix subject heading
V3: Remove
reg_offsetout in all the structs. It was reverted out, and and if it did exist, it would get initialized to 0 by default.V2: I hastily copy-pasted the boards without looking at the UART number. This addresses 3 boards that use UART3 and not UART1.
--- arch/arm/cpu/arm926ejs/lpc32xx/devices.c | 8 ++++---- board/isee/igep00x0/igep00x0.c | 6 +++--- board/logicpd/omap3som/omap3logic.c | 6 +++--- board/logicpd/zoom1/zoom1.c | 6 +++--- board/overo/overo.c | 6 +++--- board/quipos/cairo/cairo.c | 6 +++--- board/ti/beagle/beagle.c | 6 +++--- board/timll/devkit8000/devkit8000.c | 6 +++--- 8 files changed, 25 insertions(+), 25 deletions(-)arch/arm/cpu/arm926ejs/lpc32xx/devices.c +0
-0@@ -45,10 +45,10 @@ void lpc32xx_uart_init(unsigned int uart_id)#if !CONFIG_IS_ENABLED (OF_CONTROL )
arch/arm/cpu/arm926ejs/lpc32xx/devices.c void lpc32xx_uart_init(unsigned int uart_id) · line 52
Quoted 10 lines
arch/arm/cpu/arm926ejs/lpc32xx/devices.c +4
-4static const struct ns16550_platdata lpc32xx_uart[] = { - {UART3_BASE ,2 ,CONFIG_SYS_NS16550_CLK }, - {UART4_BASE ,2 ,CONFIG_SYS_NS16550_CLK }, - {UART5_BASE ,2 ,CONFIG_SYS_NS16550_CLK }, - {UART6_BASE ,2 ,CONFIG_SYS_NS16550_CLK }, + { .base =UART3_BASE , .reg_shift =2 , .clock =CONFIG_SYS_NS16550_CLK }, + { .base =UART4_BASE , .reg_shift =2 , .clock =CONFIG_SYS_NS16550_CLK }, + { .base =UART5_BASE , .reg_shift =2 , .clock =CONFIG_SYS_NS16550_CLK }, + { .base =UART6_BASE , .reg_shift =2 , .clock =CONFIG_SYS_NS16550_CLK }, };
For LPC32xx part
--
With best wishes,
Vladimir
PATCH v5 1/1 ARM: Various: Future-proof serial platdata
In reply to Adam FordQuoted 14 lines · Adam Ford
A few boards still use
ns16550_platdatastructures, but assume the structure is going to be in a specific order. By explicitly naming each entry, this should also help 'future-proof' in the event the structure changes.Tested on the Logic PD Torpedo + Wireless.
I only changed a handful of devices that used the same syntax as the Logic board. Appologies if I missed one or stepped on toes. Thanks to Derald Woods and Alexander Graf.
Signed-off-by Adam Ford <[email protected]>V5: Add fix to
arch/arm/cpu/arm926ejs/lpc32xx/devices.c
Quoted 7 lines
V4: Fix subject heading
V3: Remove
reg_offsetout in all the structs. It was reverted out, and and if it did exist, it would get initialized to 0 by default.V2: I hastily copy-pasted the boards without looking at the UART number. This addresses 3 boards that use UART3 and not UART1.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160305/c0ec6dc5/attachment.sig>
PATCH v5 1/1 ARM: Various: Future-proof serial platdata
In reply to Adam FordQuoted 21 lines · Adam Ford
A few boards still use
ns16550_platdatastructures, but assume the structure is going to be in a specific order. By explicitly naming each entry, this should also help 'future-proof' in the event the structure changes.Tested on the Logic PD Torpedo + Wireless.
I only changed a handful of devices that used the same syntax as the Logic board. Appologies if I missed one or stepped on toes. Thanks to Derald Woods and Alexander Graf.
Signed-off-by Adam Ford <[email protected]>V5: Add fix to
arch/arm/cpu/arm926ejs/lpc32xx/devices.cV4: Fix subject heading
V3: Remove
reg_offsetout in all the structs. It was reverted out, and and if it did exist, it would get initialized to 0 by default.V2: I hastily copy-pasted the boards without looking at the UART number. This addresses 3 boards that use UART3 and not UART1.
Quoted 10 lines
--- arch/arm/cpu/arm926ejs/lpc32xx/devices.c | 8 ++++---- board/isee/igep00x0/igep00x0.c | 6 +++--- board/logicpd/omap3som/omap3logic.c | 6 +++--- board/logicpd/zoom1/zoom1.c | 6 +++--- board/overo/overo.c | 6 +++--- board/quipos/cairo/cairo.c | 6 +++--- board/ti/beagle/beagle.c | 6 +++--- board/timll/devkit8000/devkit8000.c | 6 +++--- 8 files changed, 25 insertions(+), 25 deletions(-)