OMAP3: Various: Future-proof serial platdata
PATCH v4 1/1 OMAP3: 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.
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.
--- 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 +++--- 7 files changed, 21 insertions(+), 21 deletions(-)
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 v4 1/1 OMAP3: Various: Future-proof serial platdata
Quoted 19 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]>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.
Quoted 8 lines
--- 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 +++---
Looks to me like you didn't catch all boards out there. I don't think it makes sense to limit yourself to OMAP3, otherwise different boards (that people may not realize are broken that fast) break next time...
arch/arm/cpu/arm926ejs/lpc32xx/devices.carch/arm/cpu/armv7/am33xx/board.carch/arm/mach-tegra/board.cboard/isee/igep00x0/igep00x0.cboard/lge/sniper/sniper.cboard/logicpd/omap3som/omap3logic.cboard/logicpd/zoom1/zoom1.cboard/overo/overo.cboard/quipos/cairo/cairo.cboard/ti/beagle/beagle.cboard/timll/devkit8000/devkit8000.c
Alex
PATCH v4 1/1 OMAP3: Various: Future-proof serial platdata
I can only test OMAP3, and I tried to state that in the patch. I grepped for the platdata structure and not that manu boards aooeared. I didn't want to just fix the board that affects me, but I didn't want to go beyond the platform for fear of breaking something and not being able to test it.
Quoted 54 lines · Alexander Graf
Quoted 1 line · Adam Ford
A few boards still use
ns16550_platdatastructures, but assume thestructure
Quoted 6 lines
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
Quoted 1 line
board. Appologies if I missed one or stepped on toes. Thanks to Derald
Woods
Quoted 7 lines
and Alexander Graf.
Signed-off-by Adam Ford <[email protected]>V4: Fix subject heading
V3: Remove
reg_offsetout in all the structs. It was reverted out, andand if
Quoted 4 lines
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 8 lines
--- 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 +++---Looks to me like you didn't catch all boards out there. I don't think it makes sense to limit yourself to OMAP3, otherwise different boards (that people may not realize are broken that fast) break next time...
arch/arm/cpu/arm926ejs/lpc32xx/devices.carch/arm/cpu/armv7/am33xx/board.carch/arm/mach-tegra/board.cboard/isee/igep00x0/igep00x0.cboard/lge/sniper/sniper.cboard/logicpd/omap3som/omap3logic.cboard/logicpd/zoom1/zoom1.cboard/overo/overo.cboard/quipos/cairo/cairo.cboard/ti/beagle/beagle.cboard/timll/devkit8000/devkit8000.cAlex
PATCH v4 1/1 OMAP3: Various: Future-proof serial platdata
Quoted 5 lines · Adam Ford
I can only test OMAP3, and I tried to state that in the patch. I grepped for the platdata structure and not that manu boards aooeared. I didn't want to just fix the board that affects me, but I didn't want to go beyond the platform for fear of breaking something and not being able to test it.
I think in this case the change is simple enough that code review should catch issues quickly.
I really don't think it's a good idea to convert 80% of the code base and leave 20% for some random point in time later. It's a great recipe for disaster :). Let's just get rid of all unnamed struct field initializers for the serial port and call it a day.
Alex
PATCH v4 1/1 OMAP3: Various: Future-proof serial platdata
In reply to Alexander GrafQuoted 31 lines · Alexander Graf
Quoted 19 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]>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.
Quoted 8 lines
--- 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 +++---
Quoted 5 lines
Looks to me like you didn't catch all boards out there. I don't think it makes sense to limit yourself to OMAP3, otherwise different boards (that people may not realize are broken that fast) break next time...
arch/arm/cpu/arm926ejs/lpc32xx/devices.c
I will fix and CC its maintainer.
Quoted 1 line
arch/arm/cpu/armv7/am33xx/board.c
These boards already have a pending patch from TI.
Quoted 1 line
arch/arm/mach-tegra/board.c
Already in git master.
Quoted 1 line
board/isee/igep00x0/igep00x0.c
I my patch
Quoted 1 line
board/lge/sniper/sniper.c
Already in git master
Quoted 6 lines
board/logicpd/omap3som/omap3logic.cboard/logicpd/zoom1/zoom1.cboard/overo/overo.cboard/quipos/cairo/cairo.cboard/ti/beagle/beagle.cboard/timll/devkit8000/devkit8000.c
The rest should have all been included in my original patch, so I think they are addressed. Does that address your concern? If so, I'll push another revision that adds arch/arm/cpu/arm926ejs/lpc32xx/devices.c.
adam
Quoted 3 lines
Alex
PATCH v4 1/1 OMAP3: Various: Future-proof serial platdata
Quoted 62 lines
Am 02.03.2016 um 12:29 schrieb Adam Ford <[email protected]>:
Quoted 32 lines · Alexander Graf
Quoted 23 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]>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.
---Quoted 7 lines
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 +++---Quoted 5 lines
Looks to me like you didn't catch all boards out there. I don't think it makes sense to limit yourself to OMAP3, otherwise different boards (that people may not realize are broken that fast) break next time...
arch/arm/cpu/arm926ejs/lpc32xx/devices.cI will fix and CC its maintainer.
Quoted 1 line
arch/arm/cpu/armv7/am33xx/board.cThese boards already have a pending patch from TI.
Quoted 1 line
arch/arm/mach-tegra/board.cAlready in git master.
Quoted 1 line
board/isee/igep00x0/igep00x0.cI my patch
Quoted 1 line
board/lge/sniper/sniper.cAlready in git master
Quoted 6 lines
board/logicpd/omap3som/omap3logic.cboard/logicpd/zoom1/zoom1.cboard/overo/overo.cboard/quipos/cairo/cairo.cboard/ti/beagle/beagle.cboard/timll/devkit8000/devkit8000.c
Quoted 4 lines
The rest should have all been included in my original patch, so I think they are addressed. Does that address your concern? If so, I'll push another revision that adds
arch/arm/cpu/arm926ejs/lpc32xx/devices.c.
Yes, thanks a lot!
Alex
PATCH v4 1/1 OMAP3: Various: Future-proof serial platdata
Quoted 10 lines · Alexander Graf
Quoted 10 lines
Am 02.03.2016 um 12:29 schrieb Adam Ford <[email protected]>:
Quoted 5 lines · Alexander Graf
Quoted 4 lines · Adam Ford
A few boards still use
ns16550_platdatastructures, but assume the
structure
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
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 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Tested on the Logic PD Torpedo + Wireless.
I only changed a handful of devices that used the same syntax as the
Logic
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
board. Appologies if I missed one or stepped on toes. Thanks to
Derald Woods
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
and Alexander Graf.
Signed-off-by Adam Ford <[email protected]>V4: Fix subject heading
V3: Remove
reg_offsetout in all the structs. It was reverted out,
and and if
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
it did exist, it would get initialized to 0 by default.
V2: I hastily copy-pasted the boards without looking at the UART
number.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 9 lines
This addresses 3 boards that use UART3 and not UART1.
---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 +++---Looks to me like you didn't catch all boards out there. I don't think
it
Quoted 1 line
Quoted 1 line
Quoted 1 line
makes sense to limit yourself to OMAP3, otherwise different boards
(that
Quoted 24 lines
Quoted 24 lines
Quoted 3 lines
people may not realize are broken that fast) break next time...
arch/arm/cpu/arm926ejs/lpc32xx/devices.cI will fix and CC its maintainer.
Quoted 1 line
arch/arm/cpu/armv7/am33xx/board.cThese boards already have a pending patch from TI.
Quoted 1 line
arch/arm/mach-tegra/board.cAlready in git master.
Quoted 1 line
board/isee/igep00x0/igep00x0.cI my patch
Quoted 1 line
board/lge/sniper/sniper.cAlready in git master
Quoted 6 lines
board/logicpd/omap3som/omap3logic.cboard/logicpd/zoom1/zoom1.cboard/overo/overo.cboard/quipos/cairo/cairo.cboard/ti/beagle/beagle.cboard/timll/devkit8000/devkit8000.c
Quoted 6 lines
Quoted 4 lines
The rest should have all been included in my original patch, so I think they are addressed. Does that address your concern? If so, I'll push another revision that adds
arch/arm/cpu/arm926ejs/lpc32xx/devices.c.Yes, thanks a lot!
No problem. After discussing it with Mugunthan, I will add the am33xx into the patch, but I won't be able to get to it until this weekend. My house is undergoing some minor updates at the moment and I can use the computer.
Quoted 3 lines
Alex