Example #1
0
static int
bcm283x_dwc_otg_attach(device_t dev)
{
	int err;

	err = bcm2835_mbox_set_power_state(BCM2835_MBOX_POWER_ID_USB_HCD, TRUE);
	if (err)
		device_printf(dev, "failed to set power state, err=%d\n", err);

	return (dwc_otg_attach(dev));
}
Example #2
0
static int
hisi_dwc_otg_attach(device_t dev)
{
	struct dwc_otg_fdt_softc *sc;

	/* Set the default to host mode. */
	/* TODO: Use vbus to detect this. */
	sc = device_get_softc(dev);
	sc->sc_otg.sc_mode = DWC_MODE_HOST;

	return (dwc_otg_attach(dev));
}