]> git.dujemihanovic.xyz Git - u-boot.git/commit
dm: usb: tegra: Store the controller type explicitly
authorSimon Glass <sjg@chromium.org>
Wed, 25 Mar 2015 18:22:20 +0000 (12:22 -0600)
committerSimon Glass <sjg@chromium.org>
Sat, 18 Apr 2015 17:11:23 +0000 (11:11 -0600)
commit27f782b6a137b51fe81dc2900d64ea6cbe502663
treec3adc193532ada94b3c0956e4614cfb1f0bfba6c
parentc4a3141d55398660a65417fa15c05d2630400af7
dm: usb: tegra: Store the controller type explicitly

At present the tegra driver uses a separate pointer to know which controller
type is in use. This works because only one controller type is used at a
time.

With driver model we want to make the controller state hermetic in the sense
that it is not necessary to look elsewhere to know the controller type. This
will permit a controller to implement the EHCI weak functions without
reference to global data structures.

To achieve this, define an enum for the controller type and store it with
the information on each EHCI controller.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
drivers/usb/host/ehci-tegra.c