Changeset 278bc93 in rtems-libbsd for rtemsbsd/sys
- Timestamp:
- 03/16/15 20:39:14 (9 years ago)
- Branches:
- 4.11, 5, 5-freebsd-12, 6-freebsd-12, freebsd-9.3, master
- Children:
- 4dab3a0
- Parents:
- a0828f9
- git-author:
- Sebastian Huber <sebastian.huber@…> (03/16/15 20:39:14)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (05/15/15 13:40:55)
- Location:
- rtemsbsd/sys/dev/usb
- Files:
-
- 4 added
- 2 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
rtemsbsd/sys/dev/usb/controller/ehci_mpc83xx.c
ra0828f9 r278bc93 88 88 static device_attach_t ehci_mpc83xx_attach; 89 89 static device_detach_t ehci_mpc83xx_detach; 90 static device_suspend_t ehci_mpc83xx_suspend; 91 static device_resume_t ehci_mpc83xx_resume; 92 93 static int 94 ehci_mpc83xx_suspend(device_t self) 95 { 96 ehci_softc_t *e = device_get_softc(self); 97 int eno = bus_generic_suspend(self); 98 99 if (eno != 0) { 100 return (eno); 101 } 102 103 ehci_suspend(e); 104 105 return (0); 106 } 107 108 static int 109 ehci_mpc83xx_resume(device_t self) 110 { 111 ehci_softc_t *e = device_get_softc(self); 112 113 ehci_resume(e); 114 115 bus_generic_resume(self); 116 117 return (0); 118 } 119 90 120 91 121 static int … … 117 147 volatile uint32_t *control = &mpc83xx.usb_dr.control; 118 148 149 #ifdef BSP_USB_EHCI_MPC83XX_HAS_ULPI 150 *control = CONTROL_PHY_CLOCK_SEL; 151 #else 119 152 *control = CONTROL_PLL_RESET | CONTROL_REFSEL(0x2U); 120 153 *control = CONTROL_UTMI_PHY_EN | CONTROL_REFSEL(0x2U); 154 #endif 121 155 122 156 while ((*control & CONTROL_PHY_CLK_VALID) == 0) { … … 147 181 mpc83xx.usb_dr.snoop1 = SNOOP_ADDR(0x0) | SNOOP_SIZE_2GB; 148 182 mpc83xx.usb_dr.snoop2 = SNOOP_ADDR(0x80000) | SNOOP_SIZE_2GB; 183 #ifdef BSP_USB_EHCI_MPC83XX_HAS_ULPI 184 mpc83xx.usb_dr.control = CONTROL_PHY_CLOCK_SEL | CONTROL_USB_EN; 185 mpc83xx.usb_dr.portsc1 = htole32(PORTSC_PTS_ULPI); 186 #else 149 187 mpc83xx.usb_dr.control = CONTROL_UTMI_PHY_EN | CONTROL_REFSEL(0x2) | CONTROL_USB_EN; 150 188 mpc83xx.usb_dr.portsc1 = htole32(PORTSC_PTS_UTMI); 189 #endif 151 190 #if 0 152 191 mpc83xx.usb_dr.pri_ctrl = 0xcU; … … 251 290 DEVMETHOD(device_attach, ehci_mpc83xx_attach), 252 291 DEVMETHOD(device_detach, ehci_mpc83xx_detach), 253 DEVMETHOD(device_suspend, bus_generic_suspend),254 DEVMETHOD(device_resume, bus_generic_resume),292 DEVMETHOD(device_suspend, ehci_mpc83xx_suspend), 293 DEVMETHOD(device_resume, ehci_mpc83xx_resume), 255 294 DEVMETHOD(device_shutdown, bus_generic_shutdown), 256 295
Note: See TracChangeset
for help on using the changeset viewer.