public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 6/6] arm: mvf600: Add basic support for Vybrid MVF600TWR board
Date: Wed, 22 May 2013 18:43:21 +0200 (CEST)	[thread overview]
Message-ID: <1272719617.1057171.1369241001190.JavaMail.root@advansee.com> (raw)
In-Reply-To: <81BA6E5E0BC2344391CABCEE22D1B6D8336F90@039-SN1MPN1-003.039d.mgd.msft.net>

Hi Alison,

On Wednesday, May 22, 2013 10:23:12 AM, Wang Huan-B18965 wrote:

[...]

> > > +
> > > +#define ENET_PAD_CTRL	(PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_HIGH
> > | \
> > > +			PAD_CTL_DSE_50ohm | PAD_CTL_OBE_IBE_ENABLE)
> > > +
> > > +#define DDR_PAD_CTRL	PAD_CTL_DSE_25ohm
> > 
> > MUX_PAD_CTRL() could be added to the 4 pad control definitions above in
> > order to avoid repeating it everywhere below. But using MUX_PAD_CTRL()
> > relies on the fact that the pad control values in mvf_pins.h are all 0
> > (which is the case, but this is dangerous if this is changed later), so
> > a better approach could be to use NEW_PAD_CTRL(), e.g.:
> >         NEW_PAD_CTRL(MVF600_PAD_DDR_A15__DDR_A_15, DDR_PAD_CTRL),
> > instead of:
> >         MVF600_PAD_DDR_A15__DDR_A_15 | MUX_PAD_CTRL(DDR_PAD_CTRL),
> > 
> > > +
> [Alison Wang] I have a question about using NEW_PAD_CTRL(). If NEW_PAD_CTRL()
> is used, should the pad control values for MVF600_PAD_DDR_A15__DDR_A_15 in
> mvf_pins.h
> be the same as DDR_PAD_CTRL? I saw you didn't use the same value on other
> platforms,
> how do you define it?

No, you don't have to change mvf_pins.h. That's what NEW_PAD_CTRL() is useful
for: You can have any pad control value defined in mvf_pins.h, and a board can
override the pad control values when using definitions from mvf_pins.h, without
having to modify mvf_pins.h.

E.g.:
---
mvf_pins.h:
MVF600_PAD_PTA6__RMII0_CLKIN = IOMUX_PAD(0x0, 0x0, 2, 0x0, 0, PAD_CTRL1),

mvf600twr.c:
NEW_PAD_CTRL(MVF600_PAD_PTA6__RMII0_CLKIN, PAD_CTRL2),
---
would have the same effect as a theoretical:
---
mvf_pins.h:
MVF600_PAD_PTA6__RMII0_CLKIN = IOMUX_PAD(0x0, 0x0, 2, 0x0, 0, PAD_CTRL2),

mvf600twr.c:
MVF600_PAD_PTA6__RMII0_CLKIN,
---

But if you think that the pad control values that you have defined in
mvf600twr.c are not specific to this board and should be used as the default pad
control values for all boards based on the MVF600, then you should move those
definitions to mvf_pins.h, and use them there, which means that you will no
longer need MUX_PAD_CTRL() or NEW_PAD_CTRL() in mvf600twr.c:
---
mvf_pins.h:
#define MVF600_DDR_PAD_CTRL	PAD_CTL_DSE_25ohm
...
MVF600_PAD_DDR_A15__DDR_A_15 = IOMUX_PAD(0x0220, 0x0220, 0, 0x0000, 0,
                                         MVF600_DDR_PAD_CTRL),

mvf600twr.c:
MVF600_PAD_DDR_A15__DDR_A_15,
---

Best regards,
Beno?t

  reply	other threads:[~2013-05-22 16:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-22  8:23 [U-Boot] [PATCH v3 6/6] arm: mvf600: Add basic support for Vybrid MVF600TWR board Wang Huan-B18965
2013-05-22 16:43 ` Benoît Thébaudeau [this message]
2013-05-23  5:51   ` Wang Huan-B18965
  -- strict thread matches above, loose matches on Subject: below --
2013-05-22  5:28 Wang Huan-B18965
2013-05-21  9:02 [U-Boot] [PATCH v3 0/6] arm: mvf600: Add Freescale Vybrid MVF600 CPU and MVF600TWR board support Alison Wang
2013-05-21  9:03 ` [U-Boot] [PATCH v3 6/6] arm: mvf600: Add basic support for Vybrid MVF600TWR board Alison Wang
2013-05-21 17:29   ` Benoît Thébaudeau
     [not found]     ` <81BA6E5E0BC2344391CABCEE22D1B6D8335B27@039-SN1MPN1-003.039d.mgd.msft.net>
2013-05-22 16:21       ` Benoît Thébaudeau
2013-05-23  5:44         ` Wang Huan-B18965
2013-05-21 19:19   ` Benoît Thébaudeau

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=1272719617.1057171.1369241001190.JavaMail.root@advansee.com \
    --to=benoit.thebaudeau@advansee.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox