u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* Bug in board/logicpd/omap3som/omap3logic.h ???
@ 2021-09-27 14:45 Wolfgang Denk
  2021-09-27 14:49 ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2021-09-27 14:45 UTC (permalink / raw)
  To: Adam Ford, Tom Rini; +Cc: u-boot

Dear Adam,

commit 25e4ff45b17 "ARM: omap3_logic: Enable OMAP EHCI support for
SOM-LV Boards" added (among other things) these lines:

...
243         MUX_VAL(CP(MCSPI2_SOMI),        (IEN  | PTD | DIS | M0));       /*HSUSB2_DATA5*/
244         MUX_VAL(CP(MCSPI2_CS0),         (IEN  | PTD | EN  | M0));       /*HSUSB2_DATA6*/
245         MUX_VAL(CP(MCSPI2_CLK),         (IEN  | PTD | DIS | M0));       /*HSUSB2_DATA7*/
246         MUX_VAL(CP(SYS_BOOT2),      (IEN  | PTD | DIS | M4))    /* GPIO_4 */
247         MUX_VAL(CP(ETK_D10_ES2),        (IDIS | PTU | DIS | M3));       /*HSUSB2_CLK*/
248         MUX_VAL(CP(ETK_D11_ES2),        (IDIS | PTU | DIS | M3));       /*HSUSB2_STP*/
249         MUX_VAL(CP(ETK_D12_ES2),        (IEN  | PTU | DIS | M3));       /*HSUSB2_DIR*/
...

All the entries in set_muxconf_regs() have a terminating semicolon -
all except the entry in line # 246.

I reckon this is a mistake and should be fixed?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
I am more bored than you could ever possibly be.  Go back to work.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug in board/logicpd/omap3som/omap3logic.h ???
  2021-09-27 14:45 Bug in board/logicpd/omap3som/omap3logic.h ??? Wolfgang Denk
@ 2021-09-27 14:49 ` Tom Rini
  2021-09-27 15:12   ` Adam Ford
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2021-09-27 14:49 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: Adam Ford, u-boot

[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]

On Mon, Sep 27, 2021 at 04:45:01PM +0200, Wolfgang Denk wrote:

> Dear Adam,
> 
> commit 25e4ff45b17 "ARM: omap3_logic: Enable OMAP EHCI support for
> SOM-LV Boards" added (among other things) these lines:
> 
> ...
> 243         MUX_VAL(CP(MCSPI2_SOMI),        (IEN  | PTD | DIS | M0));       /*HSUSB2_DATA5*/
> 244         MUX_VAL(CP(MCSPI2_CS0),         (IEN  | PTD | EN  | M0));       /*HSUSB2_DATA6*/
> 245         MUX_VAL(CP(MCSPI2_CLK),         (IEN  | PTD | DIS | M0));       /*HSUSB2_DATA7*/
> 246         MUX_VAL(CP(SYS_BOOT2),      (IEN  | PTD | DIS | M4))    /* GPIO_4 */
> 247         MUX_VAL(CP(ETK_D10_ES2),        (IDIS | PTU | DIS | M3));       /*HSUSB2_CLK*/
> 248         MUX_VAL(CP(ETK_D11_ES2),        (IDIS | PTU | DIS | M3));       /*HSUSB2_STP*/
> 249         MUX_VAL(CP(ETK_D12_ES2),        (IEN  | PTU | DIS | M3));       /*HSUSB2_DIR*/
> ...
> 
> All the entries in set_muxconf_regs() have a terminating semicolon -
> all except the entry in line # 246.
> 
> I reckon this is a mistake and should be fixed?

Interesting.  MUX_VAL is from arch/arm/include/asm/arch-omap3/mux.h and
includes a semicolon, so that's how this didn't trip anything up.  Most
of the time it's not used with one either, from a quick grep.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug in board/logicpd/omap3som/omap3logic.h ???
  2021-09-27 14:49 ` Tom Rini
@ 2021-09-27 15:12   ` Adam Ford
  2021-09-27 15:50     ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Ford @ 2021-09-27 15:12 UTC (permalink / raw)
  To: Tom Rini; +Cc: Wolfgang Denk, U-Boot Mailing List

On Mon, Sep 27, 2021 at 9:49 AM Tom Rini <trini@konsulko.com> wrote:
>
> On Mon, Sep 27, 2021 at 04:45:01PM +0200, Wolfgang Denk wrote:
>
> > Dear Adam,
> >
> > commit 25e4ff45b17 "ARM: omap3_logic: Enable OMAP EHCI support for
> > SOM-LV Boards" added (among other things) these lines:
> >
> > ...
> > 243         MUX_VAL(CP(MCSPI2_SOMI),        (IEN  | PTD | DIS | M0));       /*HSUSB2_DATA5*/
> > 244         MUX_VAL(CP(MCSPI2_CS0),         (IEN  | PTD | EN  | M0));       /*HSUSB2_DATA6*/
> > 245         MUX_VAL(CP(MCSPI2_CLK),         (IEN  | PTD | DIS | M0));       /*HSUSB2_DATA7*/
> > 246         MUX_VAL(CP(SYS_BOOT2),      (IEN  | PTD | DIS | M4))    /* GPIO_4 */
> > 247         MUX_VAL(CP(ETK_D10_ES2),        (IDIS | PTU | DIS | M3));       /*HSUSB2_CLK*/
> > 248         MUX_VAL(CP(ETK_D11_ES2),        (IDIS | PTU | DIS | M3));       /*HSUSB2_STP*/
> > 249         MUX_VAL(CP(ETK_D12_ES2),        (IEN  | PTU | DIS | M3));       /*HSUSB2_DIR*/
> > ...
> >
> > All the entries in set_muxconf_regs() have a terminating semicolon -
> > all except the entry in line # 246.
> >
> > I reckon this is a mistake and should be fixed?
>
> Interesting.  MUX_VAL is from arch/arm/include/asm/arch-omap3/mux.h and
> includes a semicolon, so that's how this didn't trip anything up.  Most
> of the time it's not used with one either, from a quick grep.

I am guessing it was left out by accident.  I would not have
intentionally done that.  I can submit a patch to make it consistent
if you want.

adam
>
> --
> Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug in board/logicpd/omap3som/omap3logic.h ???
  2021-09-27 15:12   ` Adam Ford
@ 2021-09-27 15:50     ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2021-09-27 15:50 UTC (permalink / raw)
  To: Adam Ford; +Cc: Tom Rini, U-Boot Mailing List

Dear Adam,

In message <CAHCN7x+_3iZtTjL9i0QL=w-iLC3imegNH38Q=RyT6wz7=Ovicw@mail.gmail.com> you wrote:
> > >
> > > commit 25e4ff45b17 "ARM: omap3_logic: Enable OMAP EHCI support for
> > > SOM-LV Boards" added (among other things) these lines:
> > >
> > > ...
> > > 243         MUX_VAL(CP(MCSPI2_SOMI),        (IEN  | PTD | DIS | M0));       /*HSUSB2_DATA5*/
> > > 244         MUX_VAL(CP(MCSPI2_CS0),         (IEN  | PTD | EN  | M0));       /*HSUSB2_DATA6*/
> > > 245         MUX_VAL(CP(MCSPI2_CLK),         (IEN  | PTD | DIS | M0));       /*HSUSB2_DATA7*/
> > > 246         MUX_VAL(CP(SYS_BOOT2),      (IEN  | PTD | DIS | M4))    /* GPIO_4 */
> > > 247         MUX_VAL(CP(ETK_D10_ES2),        (IDIS | PTU | DIS | M3));       /*HSUSB2_CLK*/
> > > 248         MUX_VAL(CP(ETK_D11_ES2),        (IDIS | PTU | DIS | M3));       /*HSUSB2_STP*/
> > > 249         MUX_VAL(CP(ETK_D12_ES2),        (IEN  | PTU | DIS | M3));       /*HSUSB2_DIR*/
> > > ...
> > >
> > > All the entries in set_muxconf_regs() have a terminating semicolon -
> > > all except the entry in line # 246.
> > >
> > > I reckon this is a mistake and should be fixed?
> >
> > Interesting.  MUX_VAL is from arch/arm/include/asm/arch-omap3/mux.h and
> > includes a semicolon, so that's how this didn't trip anything up.  Most
> > of the time it's not used with one either, from a quick grep.
>
> I am guessing it was left out by accident.  I would not have
> intentionally done that.  I can submit a patch to make it consistent
> if you want.

Yes, it should be made xonsistent, please - otherwise everybody
seeing this wonders what is going on here.

Tom says there is already a semicolon in the macro and most use
cases don;t have one, so the fix should probably be to keep that
line and remove the other semicolons ?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
The human race is faced with a cruel choice: work  or  daytime  tele-
vision.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-27 15:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 14:45 Bug in board/logicpd/omap3som/omap3logic.h ??? Wolfgang Denk
2021-09-27 14:49 ` Tom Rini
2021-09-27 15:12   ` Adam Ford
2021-09-27 15:50     ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).