
On 08/19/2012 10:08 AM, Lucas Stach wrote:
This adds the required code to set up a ULPI USB port. It is mostly a port of the Linux ULPI setup code with some tweaks added for more correctness, discovered along the way of debugging this.
To use this both CONFIG_USB_ULPI and CONFIG_USB_ULPI_VIEWPORT have to be set in the board configuration file.
diff --git a/arch/arm/cpu/armv7/tegra20/usb.c b/arch/arm/cpu/armv7/tegra20/usb.c
-/* set up the USB controller with the parameters provided */ -static int init_usb_controller(struct fdt_usb *config, +/* set up the UTMI USB controller with the parameters provided */ +static int init_utmi_usb_controller(struct fdt_usb *config, struct usb_ctlr *usbctlr, const u32 timing[])
...
+#ifdef CONFIG_USB_ULPI +/* set up the ULPI USB controller with the parameters provided */ +static int init_ulpi_usb_controller(struct fdt_usb *config,
struct usb_ctlr *usbctlr)
I'm not sure why there's a CONFIG_USB_ULPI and not a matching CONFIG_USB_UTMI; it seems rather unbalanced, but anyway...
Aside from that, I don't have any other obvious objections to this.