Deleted Added
full compact
octusb.c (227309) octusb.c (228483)
1#include <sys/cdefs.h>
1#include <sys/cdefs.h>
2__FBSDID("$FreeBSD: head/sys/mips/cavium/usb/octusb.c 227309 2011-11-07 15:43:11Z ed $");
2__FBSDID("$FreeBSD: head/sys/mips/cavium/usb/octusb.c 228483 2011-12-14 00:28:54Z hselasky $");
3
4/*-
5 * Copyright (c) 2010 Hans Petter Selasky. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright

--- 897 unchanged lines hidden (view full) ---

908 cvmx_usb_shutdown(&sc->sc_port[x].state);
909 }
910 USB_BUS_UNLOCK(&sc->sc_bus);
911
912 return (0);
913
914}
915
3
4/*-
5 * Copyright (c) 2010 Hans Petter Selasky. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright

--- 897 unchanged lines hidden (view full) ---

908 cvmx_usb_shutdown(&sc->sc_port[x].state);
909 }
910 USB_BUS_UNLOCK(&sc->sc_bus);
911
912 return (0);
913
914}
915
916void
916static void
917octusb_suspend(struct octusb_softc *sc)
918{
917octusb_suspend(struct octusb_softc *sc)
918{
919
919 /* TODO */
920}
921
920}
921
922void
922static void
923octusb_resume(struct octusb_softc *sc)
924{
923octusb_resume(struct octusb_softc *sc)
924{
925
925 /* TODO */
926}
927
928/*------------------------------------------------------------------------*
929 * octusb_interrupt - OCTUSB interrupt handler
930 *------------------------------------------------------------------------*/
931void
932octusb_interrupt(struct octusb_softc *sc)
933{

--- 969 unchanged lines hidden (view full) ---

1903}
1904
1905static void
1906octusb_set_hw_power(struct usb_bus *bus)
1907{
1908 DPRINTF("Nothing to do.\n");
1909}
1910
926}
927
928/*------------------------------------------------------------------------*
929 * octusb_interrupt - OCTUSB interrupt handler
930 *------------------------------------------------------------------------*/
931void
932octusb_interrupt(struct octusb_softc *sc)
933{

--- 969 unchanged lines hidden (view full) ---

1903}
1904
1905static void
1906octusb_set_hw_power(struct usb_bus *bus)
1907{
1908 DPRINTF("Nothing to do.\n");
1909}
1910
1911static void
1912octusb_set_hw_power_sleep(struct usb_bus *bus, uint32_t state)
1913{
1914 struct octusb_softc *sc = OCTUSB_BUS2SC(bus);
1915
1916 switch (state) {
1917 case USB_HW_POWER_SUSPEND:
1918 octusb_suspend(sc);
1919 break;
1920 case USB_HW_POWER_SHUTDOWN:
1921 octusb_uninit(sc);
1922 break;
1923 case USB_HW_POWER_RESUME:
1924 octusb_resume(sc);
1925 break;
1926 default:
1927 break;
1928 }
1929}
1930
1911struct usb_bus_methods octusb_bus_methods = {
1912 .endpoint_init = octusb_ep_init,
1913 .xfer_setup = octusb_xfer_setup,
1914 .xfer_unsetup = octusb_xfer_unsetup,
1915 .get_dma_delay = octusb_get_dma_delay,
1916 .device_resume = octusb_device_resume,
1917 .device_suspend = octusb_device_suspend,
1918 .set_hw_power = octusb_set_hw_power,
1931struct usb_bus_methods octusb_bus_methods = {
1932 .endpoint_init = octusb_ep_init,
1933 .xfer_setup = octusb_xfer_setup,
1934 .xfer_unsetup = octusb_xfer_unsetup,
1935 .get_dma_delay = octusb_get_dma_delay,
1936 .device_resume = octusb_device_resume,
1937 .device_suspend = octusb_device_suspend,
1938 .set_hw_power = octusb_set_hw_power,
1939 .set_hw_power_sleep = octusb_set_hw_power_sleep,
1919 .roothub_exec = octusb_roothub_exec,
1920 .xfer_poll = octusb_do_poll,
1921};
1940 .roothub_exec = octusb_roothub_exec,
1941 .xfer_poll = octusb_do_poll,
1942};