All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Ford <aford173@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2] OMAP3: Various: Update serial platdata to update reg_offset to 0
Date: Mon, 29 Feb 2016 06:51:40 -0600	[thread overview]
Message-ID: <CAHCN7x+tsJnU-8sxGmM8DvULBBGXwpUirsKO=yLFy0wBQBj4Bw@mail.gmail.com> (raw)
In-Reply-To: <56D439A9.5090205@denx.de>

V1 I changed all the platform data to explicitly name the entries
instead of just using a table of numbers.  This would hopefully
address future proofing against the header changing order.  I
copy-pasted the table from my board to a series of boards and then
later realized I had accidentally changed the UART number which would
have broken a few boards.

V2, Fixes that issue because  igep, overo, beagle and devkit8000 used
UART3 instead of UART1, so it was a correction on my part.  The change
from V1 was kept, but the correct UART was referenced.

On Mon, Feb 29, 2016 at 6:29 AM, Heiko Schocher <hs@denx.de> wrote:
> Hello Adam,
>
> Am 29.02.2016 um 12:53 schrieb Adam Ford:
>>
>> V2: I hastily copy-pasted the boards without looking at the UART number.
>> This addresses 3 boards that use UART3 and not UART1.
>>
>> With commit: d9a3bec682f9 "dm: ns16550: Add support for reg-offset
>> property"
>> reg_offset is added to the struct ns16550_platdata to be
>> dt compatible with Linux kernel driver. A variety of OMAP3 boards are
>> broken
>> as the serial platdata is missing offsets. By explicitly naming the entry,
>> this should also help 'future-proof' if more entries get added but are not
>> needed for OMAP3.  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>
>> ---
>>   board/isee/igep00x0/igep00x0.c      | 7 ++++---
>>   board/logicpd/omap3som/omap3logic.c | 7 ++++---
>>   board/logicpd/zoom1/zoom1.c         | 7 ++++---
>>   board/overo/overo.c                 | 7 ++++---
>>   board/quipos/cairo/cairo.c          | 7 ++++---
>>   board/ti/beagle/beagle.c            | 7 ++++---
>>   board/timll/devkit8000/devkit8000.c | 7 ++++---
>>   7 files changed, 28 insertions(+), 21 deletions(-)
>
>
> What has changed exactly in v2 ?
>
> Beside of this:
> Reviewed-by: Heiko Schocher <hs@denx.de>
>
> Thanks!
>
> bye,
> Heiko
>
>>
>> diff --git a/board/isee/igep00x0/igep00x0.c
>> b/board/isee/igep00x0/igep00x0.c
>> index e2fce50..63489e5 100644
>> --- a/board/isee/igep00x0/igep00x0.c
>> +++ b/board/isee/igep00x0/igep00x0.c
>> @@ -34,9 +34,10 @@ static const u32 gpmc_lan_config[] = {
>>   #endif
>>
>>   static const struct ns16550_platdata igep_serial = {
>> -       OMAP34XX_UART3,
>> -       2,
>> -       V_NS16550_CLK
>> +       .base = OMAP34XX_UART1,
>> +       .reg_offset = 0,
>> +       .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..0e72a5a 100644
>> --- a/board/logicpd/omap3som/omap3logic.c
>> +++ b/board/logicpd/omap3som/omap3logic.c
>> @@ -47,9 +47,10 @@ DECLARE_GLOBAL_DATA_PTR;
>>    */
>>
>>   static const struct ns16550_platdata omap3logic_serial = {
>> -       OMAP34XX_UART1,
>> -       2,
>> -       V_NS16550_CLK
>> +       .base = OMAP34XX_UART1,
>> +       .reg_offset = 0,
>> +       .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..3d34919 100644
>> --- a/board/logicpd/zoom1/zoom1.c
>> +++ b/board/logicpd/zoom1/zoom1.c
>> @@ -44,9 +44,10 @@ static const u32 gpmc_lab_enet[] = {
>>   };
>>
>>   static const struct ns16550_platdata zoom1_serial = {
>> -       OMAP34XX_UART3,
>> -       2,
>> -       V_NS16550_CLK
>> +       .base = OMAP34XX_UART1,
>> +       .reg_offset = 0,
>> +       .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..3da80e9 100644
>> --- a/board/overo/overo.c
>> +++ b/board/overo/overo.c
>> @@ -68,9 +68,10 @@ static struct {
>>   } expansion_config = {0x0};
>>
>>   static const struct ns16550_platdata overo_serial = {
>> -       OMAP34XX_UART3,
>> -       2,
>> -       V_NS16550_CLK
>> +       .base = OMAP34XX_UART3,
>> +       .reg_offset = 0,
>> +       .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..15d68c1 100644
>> --- a/board/quipos/cairo/cairo.c
>> +++ b/board/quipos/cairo/cairo.c
>> @@ -91,9 +91,10 @@ 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_UART1,
>> +       .reg_offset = 0,
>> +       .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..a5f2af7 100644
>> --- a/board/ti/beagle/beagle.c
>> +++ b/board/ti/beagle/beagle.c
>> @@ -73,9 +73,10 @@ static struct {
>>   } expansion_config;
>>
>>   static const struct ns16550_platdata beagle_serial = {
>> -       OMAP34XX_UART3,
>> -       2,
>> -       V_NS16550_CLK
>> +       .base = OMAP34XX_UART3,
>> +       .reg_offset = 0,
>> +       .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..fb8e357 100644
>> --- a/board/timll/devkit8000/devkit8000.c
>> +++ b/board/timll/devkit8000/devkit8000.c
>> @@ -46,9 +46,10 @@ 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_offset = 0,
>> +       .reg_shift = 2,
>> +       .clock = V_NS16550_CLK
>>   };
>>
>>   U_BOOT_DEVICE(devkit8000_uart) = {
>>
>
> --
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  reply	other threads:[~2016-02-29 12:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-29 11:53 [U-Boot] [PATCH V2] OMAP3: Various: Update serial platdata to update reg_offset to 0 Adam Ford
2016-02-29 12:29 ` Heiko Schocher
2016-02-29 12:51   ` Adam Ford [this message]
2016-02-29 13:28     ` Heiko Schocher
2016-02-29 13:04 ` Alexander Graf
2016-02-29 21:31   ` Adam Ford
2016-02-29 21:47     ` Derald D. Woods
2016-02-29 21:49     ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHCN7x+tsJnU-8sxGmM8DvULBBGXwpUirsKO=yLFy0wBQBj4Bw@mail.gmail.com' \
    --to=aford173@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.