* [U-Boot] [PATCH V4] OMAP3: Various: Future-proof serial platdata
@ 2016-03-01 23:23 Adam Ford
2016-03-02 0:01 ` Alexander Graf
0 siblings, 1 reply; 7+ messages in thread
From: Adam Ford @ 2016-03-01 23:23 UTC (permalink / raw)
To: u-boot
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.
Signed-off-by: Adam Ford <aford173@gmail.com>
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(-)
diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c
index e2fce50..d1a6a6f 100644
--- a/board/isee/igep00x0/igep00x0.c
+++ b/board/isee/igep00x0/igep00x0.c
@@ -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) = {
diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c
index 668f684..51d2987 100644
--- a/board/logicpd/omap3som/omap3logic.c
+++ b/board/logicpd/omap3som/omap3logic.c
@@ -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) = {
diff --git a/board/logicpd/zoom1/zoom1.c b/board/logicpd/zoom1/zoom1.c
index 4040114..982619c 100644
--- a/board/logicpd/zoom1/zoom1.c
+++ b/board/logicpd/zoom1/zoom1.c
@@ -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) = {
diff --git a/board/overo/overo.c b/board/overo/overo.c
index a38b959..40f13e5 100644
--- a/board/overo/overo.c
+++ b/board/overo/overo.c
@@ -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) = {
diff --git a/board/quipos/cairo/cairo.c b/board/quipos/cairo/cairo.c
index 21793e8..77e4482 100644
--- a/board/quipos/cairo/cairo.c
+++ b/board/quipos/cairo/cairo.c
@@ -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) = {
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index ff317ef..0ed4f52 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -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) = {
diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c
index 1a447c7..965252f 100644
--- a/board/timll/devkit8000/devkit8000.c
+++ b/board/timll/devkit8000/devkit8000.c
@@ -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) = {
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [U-Boot] [PATCH V4] OMAP3: Various: Future-proof serial platdata
2016-03-01 23:23 [U-Boot] [PATCH V4] OMAP3: Various: Future-proof serial platdata Adam Ford
@ 2016-03-02 0:01 ` Alexander Graf
2016-03-02 0:05 ` Adam Ford
2016-03-02 11:29 ` Adam Ford
0 siblings, 2 replies; 7+ messages in thread
From: Alexander Graf @ 2016-03-02 0:01 UTC (permalink / raw)
To: u-boot
On 02.03.16 00:23, Adam Ford wrote:
> 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.
>
> Signed-off-by: Adam Ford <aford173@gmail.com>
>
> 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 +++---
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
arch/arm/cpu/armv7/am33xx/board.c
arch/arm/mach-tegra/board.c
board/isee/igep00x0/igep00x0.c
board/lge/sniper/sniper.c
board/logicpd/omap3som/omap3logic.c
board/logicpd/zoom1/zoom1.c
board/overo/overo.c
board/quipos/cairo/cairo.c
board/ti/beagle/beagle.c
board/timll/devkit8000/devkit8000.c
Alex
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH V4] OMAP3: Various: Future-proof serial platdata
2016-03-02 0:01 ` Alexander Graf
@ 2016-03-02 0:05 ` Adam Ford
2016-03-02 0:31 ` Alexander Graf
2016-03-02 11:29 ` Adam Ford
1 sibling, 1 reply; 7+ messages in thread
From: Adam Ford @ 2016-03-02 0:05 UTC (permalink / raw)
To: u-boot
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.
On Mar 1, 2016 6:01 PM, "Alexander Graf" <agraf@suse.de> wrote:
>
>
> On 02.03.16 00:23, Adam Ford wrote:
> > 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.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> >
> > 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 +++---
>
> 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
> arch/arm/cpu/armv7/am33xx/board.c
> arch/arm/mach-tegra/board.c
> board/isee/igep00x0/igep00x0.c
> board/lge/sniper/sniper.c
> board/logicpd/omap3som/omap3logic.c
> board/logicpd/zoom1/zoom1.c
> board/overo/overo.c
> board/quipos/cairo/cairo.c
> board/ti/beagle/beagle.c
> board/timll/devkit8000/devkit8000.c
>
>
> Alex
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH V4] OMAP3: Various: Future-proof serial platdata
2016-03-02 0:05 ` Adam Ford
@ 2016-03-02 0:31 ` Alexander Graf
0 siblings, 0 replies; 7+ messages in thread
From: Alexander Graf @ 2016-03-02 0:31 UTC (permalink / raw)
To: u-boot
On 02.03.16 01:05, Adam Ford wrote:
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH V4] OMAP3: Various: Future-proof serial platdata
2016-03-02 0:01 ` Alexander Graf
2016-03-02 0:05 ` Adam Ford
@ 2016-03-02 11:29 ` Adam Ford
2016-03-02 15:13 ` Alexander Graf
1 sibling, 1 reply; 7+ messages in thread
From: Adam Ford @ 2016-03-02 11:29 UTC (permalink / raw)
To: u-boot
On Tue, Mar 1, 2016 at 6:01 PM, Alexander Graf <agraf@suse.de> wrote:
>
>
> On 02.03.16 00:23, Adam Ford wrote:
>> 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.
>>
>> Signed-off-by: Adam Ford <aford173@gmail.com>
>>
>> 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 +++---
>
> 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.
> arch/arm/cpu/armv7/am33xx/board.c
These boards already have a pending patch from TI.
> arch/arm/mach-tegra/board.c
Already in git master.
> board/isee/igep00x0/igep00x0.c
I my patch
> board/lge/sniper/sniper.c
Already in git master
> board/logicpd/omap3som/omap3logic.c
> board/logicpd/zoom1/zoom1.c
> board/overo/overo.c
> board/quipos/cairo/cairo.c
> board/ti/beagle/beagle.c
> board/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
>
>
> Alex
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH V4] OMAP3: Various: Future-proof serial platdata
2016-03-02 11:29 ` Adam Ford
@ 2016-03-02 15:13 ` Alexander Graf
2016-03-03 15:44 ` Adam Ford
0 siblings, 1 reply; 7+ messages in thread
From: Alexander Graf @ 2016-03-02 15:13 UTC (permalink / raw)
To: u-boot
> Am 02.03.2016 um 12:29 schrieb Adam Ford <aford173@gmail.com>:
>
>> On Tue, Mar 1, 2016 at 6:01 PM, Alexander Graf <agraf@suse.de> wrote:
>>
>>
>>> On 02.03.16 00:23, Adam Ford wrote:
>>> 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.
>>>
>>> Signed-off-by: Adam Ford <aford173@gmail.com>
>>>
>>> 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 +++---
>>
>> 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.
>
>> arch/arm/cpu/armv7/am33xx/board.c
> These boards already have a pending patch from TI.
>
>> arch/arm/mach-tegra/board.c
> Already in git master.
>
>> board/isee/igep00x0/igep00x0.c
> I my patch
>
>> board/lge/sniper/sniper.c
> Already in git master
>
>> board/logicpd/omap3som/omap3logic.c
>> board/logicpd/zoom1/zoom1.c
>> board/overo/overo.c
>> board/quipos/cairo/cairo.c
>> board/ti/beagle/beagle.c
>> board/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.
Yes, thanks a lot!
Alex
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH V4] OMAP3: Various: Future-proof serial platdata
2016-03-02 15:13 ` Alexander Graf
@ 2016-03-03 15:44 ` Adam Ford
0 siblings, 0 replies; 7+ messages in thread
From: Adam Ford @ 2016-03-03 15:44 UTC (permalink / raw)
To: u-boot
On Mar 2, 2016 9:13 AM, "Alexander Graf" <agraf@suse.de> wrote:
>
>
>
> > Am 02.03.2016 um 12:29 schrieb Adam Ford <aford173@gmail.com>:
> >
> >> On Tue, Mar 1, 2016 at 6:01 PM, Alexander Graf <agraf@suse.de> wrote:
> >>
> >>
> >>> On 02.03.16 00:23, Adam Ford wrote:
> >>> 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.
> >>>
> >>> Signed-off-by: Adam Ford <aford173@gmail.com>
> >>>
> >>> 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 +++---
> >>
> >> 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.
> >
> >> arch/arm/cpu/armv7/am33xx/board.c
> > These boards already have a pending patch from TI.
> >
> >> arch/arm/mach-tegra/board.c
> > Already in git master.
> >
> >> board/isee/igep00x0/igep00x0.c
> > I my patch
> >
> >> board/lge/sniper/sniper.c
> > Already in git master
> >
> >> board/logicpd/omap3som/omap3logic.c
> >> board/logicpd/zoom1/zoom1.c
> >> board/overo/overo.c
> >> board/quipos/cairo/cairo.c
> >> board/ti/beagle/beagle.c
> >> board/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.
>
> 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.
>
> Alex
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-03-03 15:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-01 23:23 [U-Boot] [PATCH V4] OMAP3: Various: Future-proof serial platdata Adam Ford
2016-03-02 0:01 ` Alexander Graf
2016-03-02 0:05 ` Adam Ford
2016-03-02 0:31 ` Alexander Graf
2016-03-02 11:29 ` Adam Ford
2016-03-02 15:13 ` Alexander Graf
2016-03-03 15:44 ` Adam Ford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox