Deleted Added
full compact
atmegadci.c (241082) atmegadci.c (246122)
1#include <sys/cdefs.h>
2__FBSDID("$FreeBSD: head/sys/dev/usb/controller/atmegadci.c 241082 2012-10-01 05:42:43Z hselasky $");
3
1/* $FreeBSD: head/sys/dev/usb/controller/atmegadci.c 246122 2013-01-30 15:26:04Z hselasky $ */
4/*-
5 * Copyright (c) 2009 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
11 * notice, this list of conditions and the following disclaimer.

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

31 * driver currently only supports the DCI mode of the USB hardware.
32 */
33
34/*
35 * NOTE: When the chip detects BUS-reset it will also reset the
36 * endpoints, Function-address and more.
37 */
38
2/*-
3 * Copyright (c) 2009 Hans Petter Selasky. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.

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

29 * driver currently only supports the DCI mode of the USB hardware.
30 */
31
32/*
33 * NOTE: When the chip detects BUS-reset it will also reset the
34 * endpoints, Function-address and more.
35 */
36
37#ifdef USB_GLOBAL_INCLUDE_FILE
38#include USB_GLOBAL_INCLUDE_FILE
39#else
39#include <sys/stdint.h>
40#include <sys/stddef.h>
41#include <sys/param.h>
42#include <sys/queue.h>
43#include <sys/types.h>
44#include <sys/systm.h>
45#include <sys/kernel.h>
46#include <sys/bus.h>

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

66#include <dev/usb/usb_process.h>
67#include <dev/usb/usb_transfer.h>
68#include <dev/usb/usb_device.h>
69#include <dev/usb/usb_hub.h>
70#include <dev/usb/usb_util.h>
71
72#include <dev/usb/usb_controller.h>
73#include <dev/usb/usb_bus.h>
40#include <sys/stdint.h>
41#include <sys/stddef.h>
42#include <sys/param.h>
43#include <sys/queue.h>
44#include <sys/types.h>
45#include <sys/systm.h>
46#include <sys/kernel.h>
47#include <sys/bus.h>

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

67#include <dev/usb/usb_process.h>
68#include <dev/usb/usb_transfer.h>
69#include <dev/usb/usb_device.h>
70#include <dev/usb/usb_hub.h>
71#include <dev/usb/usb_util.h>
72
73#include <dev/usb/usb_controller.h>
74#include <dev/usb/usb_bus.h>
75#endif /* USB_GLOBAL_INCLUDE_FILE */
76
74#include <dev/usb/controller/atmegadci.h>
75
76#define ATMEGA_BUS2SC(bus) \
77 ((struct atmegadci_softc *)(((uint8_t *)(bus)) - \
78 ((uint8_t *)&(((struct atmegadci_softc *)0)->sc_bus))))
79
80#define ATMEGA_PC2SC(pc) \
81 ATMEGA_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus)

--- 2077 unchanged lines hidden ---
77#include <dev/usb/controller/atmegadci.h>
78
79#define ATMEGA_BUS2SC(bus) \
80 ((struct atmegadci_softc *)(((uint8_t *)(bus)) - \
81 ((uint8_t *)&(((struct atmegadci_softc *)0)->sc_bus))))
82
83#define ATMEGA_PC2SC(pc) \
84 ATMEGA_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus)

--- 2077 unchanged lines hidden ---