[U-Boot] [PATCH v3 3/3] usb: tegra: combine header file

Stephen Warren swarren at wwwdotorg.org
Tue Feb 18 23:49:53 CET 2014


On 02/18/2014 03:20 PM, Stefan Agner wrote:
> Am 2014-02-18 20:27, schrieb Stephen Warren:
>> On 02/16/2014 12:50 PM, Stefan Agner wrote:
>>> +#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?
>
> I don't have access to a Tegra114 TRM right now, but I can it be that
> the ULPI PHY is not in place there? If its not used in the driver, I
> guess we can remove those defines completely...

Looking further, all those values are used, but by a piece of code
that's #ifdef CONFIG_USB_ULPI, and that define is only enabled on a
couple of Tegra20 boards.

Looking at the TRMs, both the Tegra20/30 TRMs mention the register that
contains these fields (but doesn't document the register:-/), but
neither the Tegra114/124 TRMs mention the same registers, so perhaps
those values are Tegra20/30-only, so the ifdef you have is fine.



More information about the U-Boot mailing list