mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-21 23:37:29 +08:00
parent
7c34c62c42
commit
c9c4d79898
@ -91,6 +91,17 @@ usbphy_detach(device_t dev)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __rtems__
|
||||||
|
#define BUS_SPACE_PHYSADDR(res, offs) \
|
||||||
|
((u_int)(rman_get_start(res)+(offs)))
|
||||||
|
|
||||||
|
void
|
||||||
|
imx6_anatop_write_4(bus_size_t offset, uint32_t value)
|
||||||
|
{
|
||||||
|
|
||||||
|
bus_space_write_4(0, 0x20c8000, offset, value);
|
||||||
|
}
|
||||||
|
#endif /* __rtems__ */
|
||||||
static int
|
static int
|
||||||
usbphy_attach(device_t dev)
|
usbphy_attach(device_t dev)
|
||||||
{
|
{
|
||||||
|
@ -303,6 +303,16 @@ imx_ehci_probe(device_t dev)
|
|||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
|
|
||||||
if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) {
|
if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) {
|
||||||
|
#ifdef __rtems__
|
||||||
|
char dr_mode[24];
|
||||||
|
|
||||||
|
if (OF_getprop(ofw_bus_get_node(dev), "dr_mode",
|
||||||
|
&dr_mode, sizeof(dr_mode)) > 0 &&
|
||||||
|
strcasecmp(dr_mode, "host") != 0) {
|
||||||
|
return (ENXIO);
|
||||||
|
}
|
||||||
|
#endif /* __rtems__ */
|
||||||
|
|
||||||
device_set_desc(dev, "Freescale i.MX integrated USB controller");
|
device_set_desc(dev, "Freescale i.MX integrated USB controller");
|
||||||
return (BUS_PROBE_DEFAULT);
|
return (BUS_PROBE_DEFAULT);
|
||||||
}
|
}
|
||||||
@ -437,8 +447,10 @@ imx_ehci_attach(device_t dev)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __rtems__
|
||||||
/* Turn on clocks. */
|
/* Turn on clocks. */
|
||||||
imx_ccm_usb_enable(dev);
|
imx_ccm_usb_enable(dev);
|
||||||
|
#endif /* __rtems__ */
|
||||||
|
|
||||||
/* Disable overcurrent detection, if configured to do so. */
|
/* Disable overcurrent detection, if configured to do so. */
|
||||||
if (OF_hasprop(ofw_bus_get_node(sc->dev), "disable-over-current"))
|
if (OF_hasprop(ofw_bus_get_node(sc->dev), "disable-over-current"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user