From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/5] imx: Add support for USB EHCI on imx25
Date: Tue, 5 Jul 2011 22:07:34 +0200 [thread overview]
Message-ID: <201107052207.34357.marek.vasut@gmail.com> (raw)
In-Reply-To: <4E0C9AE6.4090900@denx.de>
On Thursday, June 30, 2011 05:48:54 PM Stefano Babic wrote:
> On 06/30/2011 11:57 AM, Matthias Weisser wrote:
> > Adding support for USB host on imx25 using the internal PHY
> >
> > Signed-off-by: Matthias Weisser <weisserm@arcor.de>
> > ---
>
> Hi Matthias,
>
> > +#ifdef CONFIG_MX25
> > +#define MX25_USB_CTRL_IP_PUE_DOWN_BIT (1<<6)
> > +#define MX25_USB_CTRL_HSTD_BIT (1<<5)
> > +#define MX25_USB_CTRL_USBTE_BIT (1<<4)
> > +#define MX25_USB_CTRL_OCPOL_OTG_BIT (1<<3)
> > +#endif
> > +
> > +#ifdef CONFIG_MX31
> >
> > #define MX31_OTG_SIC_SHIFT 29
> > #define MX31_OTG_SIC_MASK (0x3 << MX31_OTG_SIC_SHIFT)
> > #define MX31_OTG_PM_BIT (1 << 24)
> >
> > @@ -42,10 +50,19 @@
> >
> > #define MX31_H1_SIC_MASK (0x3 << MX31_H1_SIC_SHIFT)
> > #define MX31_H1_PM_BIT (1 << 8)
> > #define MX31_H1_DT_BIT (1 << 4)
> >
> > +#endif
>
> Can we try to get rid of nasty #ifdef ? I am sure, we would have in
> future support for at least MX5, and if we add a special handling for
> each SOC this file will become unreadable.
... we would have ... if the developer won't hang himself first ;-)
Otherwise, we should probably unify this IMX_USB_BASE stuff indeed. Maybe even
compute USBCTRL_OTGBASE_OFFSET on the fly (as imx51 has different offset there).
>
> It seems to me that in most cases we can do it using the same names.
>
> > /* Take USB2 */
> >
> > +#ifdef CONFIG_MX25
> > + ehci = (struct usb_ehci *)(IMX_USB_BASE +
> > +#else
> >
> > ehci = (struct usb_ehci *)(MX31_OTG_BASE_ADDR +
> >
> > +#endif
>
> For example, here we can have a CONFIG_MXB_USB_BASE (or something like
> this), without adding #ifdef. I do not know if we can get completely get
> rid of them, but it is worth to try.
>
> Best regards,
> Stefano Babic
next prev parent reply other threads:[~2011-07-05 20:07 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-30 9:57 [U-Boot] [PATCH 0/5] Add support for zmx25 board Matthias Weisser
2011-06-30 9:57 ` [U-Boot] [PATCH 1/5] imx: Add get_tbclk() function for imx25 Matthias Weisser
2011-06-30 15:38 ` Stefano Babic
2011-07-04 5:56 ` Matthias Weißer
2011-06-30 9:57 ` [U-Boot] [PATCH 2/5] imx: Use correct imx25 reset.c Matthias Weisser
2011-06-30 10:46 ` Wolfgang Denk
2011-06-30 11:35 ` Matthias Weißer
2011-06-30 10:49 ` Wolfgang Denk
2011-06-30 11:30 ` Matthias Weißer
2011-06-30 9:57 ` [U-Boot] [PATCH 3/5] imx: Add support for USB EHCI on imx25 Matthias Weisser
2011-06-30 15:48 ` Stefano Babic
2011-07-05 20:07 ` Marek Vasut [this message]
2011-06-30 9:57 ` [U-Boot] [PATCH 4/5] imx: Add auto generation of asm-offsets.h for imx25 Matthias Weisser
2011-06-30 9:57 ` [U-Boot] [PATCH 5/5] imx: Add support for zmx25 board Matthias Weisser
2011-06-30 10:44 ` Wolfgang Denk
2011-06-30 13:44 ` Matthias Weißer
2011-06-30 15:36 ` Stefano Babic
2011-07-04 6:28 ` Matthias Weißer
2011-07-06 10:28 ` [U-Boot] [PATCH v2 0/6] " Matthias Weisser
2011-07-06 10:28 ` [U-Boot] [PATCH v2 1/6] imx: Add get_tbclk() function for imx25 Matthias Weisser
2011-07-13 11:33 ` Stefano Babic
2011-07-06 10:28 ` [U-Boot] [PATCH v2 2/6] imx: Use correct imx25 reset.c Matthias Weisser
2011-07-13 11:33 ` Stefano Babic
2011-07-06 10:28 ` [U-Boot] [PATCH v2 3/6] imx: Add support for USB EHCI on imx25 Matthias Weisser
2011-07-13 11:34 ` Stefano Babic
2011-07-06 10:28 ` [U-Boot] [PATCH v2 4/6] imx: Add auto generation of asm-offsets.h for imx25 Matthias Weisser
2011-07-13 11:35 ` Stefano Babic
2011-07-06 10:28 ` [U-Boot] [PATCH v2 5/6] imx: Make imx25 compatible to mxc_gpio driver and fix in tx25 Matthias Weisser
2011-07-13 11:35 ` Stefano Babic
2011-07-06 10:28 ` [U-Boot] [PATCH v2 6/6] imx: Add support for zmx25 board Matthias Weisser
2011-07-13 11:36 ` Stefano Babic
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=201107052207.34357.marek.vasut@gmail.com \
--to=marek.vasut@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.