Deleted Added
full compact
uss820dci.h (192552) uss820dci.h (192984)
1/* $FreeBSD: head/sys/dev/usb/controller/uss820dci.h 192552 2009-05-21 17:39:21Z thompsa $ */
1/* $FreeBSD: head/sys/dev/usb/controller/uss820dci.h 192984 2009-05-28 17:36:36Z thompsa $ */
2/*-
3 * Copyright (c) 2007 Hans Petter Selasky <hselasky@FreeBSD.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright

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

265
266typedef uint8_t (uss820dci_cmd_t)(struct uss820dci_td *td);
267
268struct uss820dci_td {
269 bus_space_tag_t io_tag;
270 bus_space_handle_t io_hdl;
271 struct uss820dci_td *obj_next;
272 uss820dci_cmd_t *func;
2/*-
3 * Copyright (c) 2007 Hans Petter Selasky <hselasky@FreeBSD.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright

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

265
266typedef uint8_t (uss820dci_cmd_t)(struct uss820dci_td *td);
267
268struct uss820dci_td {
269 bus_space_tag_t io_tag;
270 bus_space_handle_t io_hdl;
271 struct uss820dci_td *obj_next;
272 uss820dci_cmd_t *func;
273 struct usb2_page_cache *pc;
273 struct usb_page_cache *pc;
274 uint32_t offset;
275 uint32_t remainder;
276 uint16_t max_packet_size;
277 uint8_t ep_index;
278 uint8_t error:1;
279 uint8_t alt_next:1;
280 uint8_t short_pkt:1;
281 uint8_t support_multi_buffer:1;
282 uint8_t did_stall:1;
283 uint8_t did_enable:1;
284};
285
286struct uss820_std_temp {
287 uss820dci_cmd_t *func;
274 uint32_t offset;
275 uint32_t remainder;
276 uint16_t max_packet_size;
277 uint8_t ep_index;
278 uint8_t error:1;
279 uint8_t alt_next:1;
280 uint8_t short_pkt:1;
281 uint8_t support_multi_buffer:1;
282 uint8_t did_stall:1;
283 uint8_t did_enable:1;
284};
285
286struct uss820_std_temp {
287 uss820dci_cmd_t *func;
288 struct usb2_page_cache *pc;
288 struct usb_page_cache *pc;
289 struct uss820dci_td *td;
290 struct uss820dci_td *td_next;
291 uint32_t len;
292 uint32_t offset;
293 uint16_t max_frame_size;
294 uint8_t short_pkt;
295 /*
296 * short_pkt = 0: transfer should be short terminated
297 * short_pkt = 1: transfer should not be short terminated
298 */
299 uint8_t setup_alt_next;
300 uint8_t did_stall;
301};
302
303struct uss820dci_config_desc {
289 struct uss820dci_td *td;
290 struct uss820dci_td *td_next;
291 uint32_t len;
292 uint32_t offset;
293 uint16_t max_frame_size;
294 uint8_t short_pkt;
295 /*
296 * short_pkt = 0: transfer should be short terminated
297 * short_pkt = 1: transfer should not be short terminated
298 */
299 uint8_t setup_alt_next;
300 uint8_t did_stall;
301};
302
303struct uss820dci_config_desc {
304 struct usb2_config_descriptor confd;
305 struct usb2_interface_descriptor ifcd;
306 struct usb2_endpoint_descriptor endpd;
304 struct usb_config_descriptor confd;
305 struct usb_interface_descriptor ifcd;
306 struct usb_endpoint_descriptor endpd;
307} __packed;
308
309union uss820_hub_temp {
310 uWord wValue;
307} __packed;
308
309union uss820_hub_temp {
310 uWord wValue;
311 struct usb2_port_status ps;
311 struct usb_port_status ps;
312};
313
314struct uss820_flags {
315 uint8_t change_connect:1;
316 uint8_t change_suspend:1;
317 uint8_t status_suspend:1; /* set if suspended */
318 uint8_t status_vbus:1; /* set if present */
319 uint8_t status_bus_reset:1; /* set if reset complete */
320 uint8_t clocks_off:1;
321 uint8_t port_powered:1;
322 uint8_t port_enabled:1;
323 uint8_t d_pulled_up:1;
324 uint8_t mcsr_feat:1;
325};
326
327struct uss820dci_softc {
312};
313
314struct uss820_flags {
315 uint8_t change_connect:1;
316 uint8_t change_suspend:1;
317 uint8_t status_suspend:1; /* set if suspended */
318 uint8_t status_vbus:1; /* set if present */
319 uint8_t status_bus_reset:1; /* set if reset complete */
320 uint8_t clocks_off:1;
321 uint8_t port_powered:1;
322 uint8_t port_enabled:1;
323 uint8_t d_pulled_up:1;
324 uint8_t mcsr_feat:1;
325};
326
327struct uss820dci_softc {
328 struct usb2_bus sc_bus;
328 struct usb_bus sc_bus;
329 union uss820_hub_temp sc_hub_temp;
330
329 union uss820_hub_temp sc_hub_temp;
330
331 struct usb2_device *sc_devices[USS820_MAX_DEVICES];
331 struct usb_device *sc_devices[USS820_MAX_DEVICES];
332 struct resource *sc_io_res;
333 struct resource *sc_irq_res;
334 void *sc_intr_hdl;
335 bus_size_t sc_io_size;
336 bus_space_tag_t sc_io_tag;
337 bus_space_handle_t sc_io_hdl;
338
339 uint8_t sc_rt_addr; /* root HUB address */

--- 17 unchanged lines hidden ---
332 struct resource *sc_io_res;
333 struct resource *sc_irq_res;
334 void *sc_intr_hdl;
335 bus_size_t sc_io_size;
336 bus_space_tag_t sc_io_tag;
337 bus_space_handle_t sc_io_hdl;
338
339 uint8_t sc_rt_addr; /* root HUB address */

--- 17 unchanged lines hidden ---