From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 3/3] usb: tegra: combine header file
Date: Tue, 18 Feb 2014 12:27:23 -0700 [thread overview]
Message-ID: <5303B41B.7010609@wwwdotorg.org> (raw)
In-Reply-To: <3f8b6a281d927fc230e86c66aa92a88c3a11144c.1392579568.git.stefan@agner.ch>
On 02/16/2014 12:50 PM, Stefan Agner wrote:
> Combine the Tegra USB header file into one header file for all SoCs.
> Use ifdef to account for the difference, especially Tegra20 is quite
> different from newer SoCs. This avoids duplication especially
> between Tegra30 and newer devices.
Aside from a few minor comments below,
Reviewed-by: Stephen Warren <swarren@nvidia.com>
I think this should be extended to Tegra124 too.
> diff --git a/arch/arm/include/asm/arch-tegra/usb.h b/arch/arm/include/asm/arch-tegra/usb.h
> #ifndef _TEGRA_USB_H_
> #define _TEGRA_USB_H_
>
> +
> +/* USB Controller (USBx_CONTROLLER_) regs */
Why two blank lines there?
> +struct usb_ctlr {
...
> + /* 0x200 */
> + uint reserved11[0x80];
> +
> +#else
> +
> + /* 0x130 */
I don't think there should be blank lines before/after the #else; there
aren't after the #if or before the #endif.
...
> +};
> +
> +
> /* USB1_LEGACY_CTRL */
Why two blank lines there?
> +#if defined(CONFIG_TEGRA20) || defined(CONFIG_TEGRA30)
> +/* USB2_IF_ULPI_TIMING_CTRL_0 */
> +#define ULPI_OUTPUT_PINMUX_BYP (1 << 10)
> +#define ULPI_CLKOUT_PINMUX_BYP (1 << 11)
> +
> +/* USB2_IF_ULPI_TIMING_CTRL_1 */
> +#define ULPI_DATA_TRIMMER_LOAD (1 << 0)
> +#define ULPI_DATA_TRIMMER_SEL(x) (((x) & 0x7) << 1)
> +#define ULPI_STPDIRNXT_TRIMMER_LOAD (1 << 16)
> +#define ULPI_STPDIRNXT_TRIMMER_SEL(x) (((x) & 0x7) << 17)
> +#define ULPI_DIR_TRIMMER_LOAD (1 << 24)
> +#define ULPI_DIR_TRIMMER_SEL(x) (((x) & 0x7) << 25)
> +#endif
Are those defines really Tegra20/30-only, or were they simply omitted
from the Tegra114 header because they aren't used by the driver?
Actually, if these aren't used, is it even worth including this text in
the header? Perhaps delete unused text in a separate patch before this
one, so that this patch simply moves text between files?
next prev parent reply other threads:[~2014-02-18 19:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-16 19:50 [U-Boot] [PATCH v3 0/3] ubs: tegra: two fixes and cleanup Stefan Agner
2014-02-16 19:50 ` [U-Boot] [PATCH v3 1/3] usb: tegra: fix USB2 powerdown for Tegra30 and later Stefan Agner
2014-02-18 18:23 ` Stephen Warren
2014-02-16 19:50 ` [U-Boot] [PATCH v3 2/3] usb: tegra: fix PHY configuration Stefan Agner
2014-02-18 18:44 ` Stephen Warren
2014-02-16 19:50 ` [U-Boot] [PATCH v3 3/3] usb: tegra: combine header file Stefan Agner
2014-02-18 19:27 ` Stephen Warren [this message]
2014-02-18 22:20 ` Stefan Agner
2014-02-18 22:49 ` Stephen Warren
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=5303B41B.7010609@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--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.