ehci-hcd: Add init_after_reset

Some host controllers need addidional initialization after ehci_reset()
In non-dm implementation it is possible to use CONFIG_EHCI_HCD_INIT_AFTER_RESET.
This patch adds similar option to ehci drivers using dm.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Mateusz Kulikowski 2016-03-31 23:12:17 +02:00 committed by Tom Rini
parent 9d11d12a16
commit 3f9f8a5b83
2 changed files with 7 additions and 0 deletions

View File

@ -1615,6 +1615,12 @@ int ehci_register(struct udevice *dev, struct ehci_hccr *hccr,
if (ret)
goto err;
if (ops->init_after_reset) {
ret = ops->init_after_reset(ctrl);
if (ret)
goto err;
}
ret = ehci_common_init(ctrl, tweaks);
if (ret)
goto err;

View File

@ -240,6 +240,7 @@ struct ehci_ops {
void (*powerup_fixup)(struct ehci_ctrl *ctrl, uint32_t *status_reg,
uint32_t *reg);
uint32_t *(*get_portsc_register)(struct ehci_ctrl *ctrl, int port);
int (*init_after_reset)(struct ehci_ctrl *ctrl);
};
struct ehci_ctrl {