musb_otg.h (192552) | musb_otg.h (192984) |
---|---|
1/* $FreeBSD: head/sys/dev/usb/controller/musb_otg.h 192552 2009-05-21 17:39:21Z thompsa $ */ | 1/* $FreeBSD: head/sys/dev/usb/controller/musb_otg.h 192984 2009-05-28 17:36:36Z thompsa $ */ |
2/*- 3 * Copyright (c) 2008 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. --- 290 unchanged lines hidden (view full) --- 300 uint8_t busy:1; 301 uint8_t complete:1; 302 uint8_t error:1; 303}; 304 305struct musbotg_td { 306 struct musbotg_td *obj_next; 307 musbotg_cmd_t *func; | 2/*- 3 * Copyright (c) 2008 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. --- 290 unchanged lines hidden (view full) --- 300 uint8_t busy:1; 301 uint8_t complete:1; 302 uint8_t error:1; 303}; 304 305struct musbotg_td { 306 struct musbotg_td *obj_next; 307 musbotg_cmd_t *func; |
308 struct usb2_page_cache *pc; | 308 struct usb_page_cache *pc; |
309 uint32_t offset; 310 uint32_t remainder; 311 uint16_t max_frame_size; /* packet_size * mult */ 312 uint8_t ep_no; 313 uint8_t error:1; 314 uint8_t alt_next:1; 315 uint8_t short_pkt:1; 316 uint8_t support_multi_buffer:1; 317 uint8_t did_stall:1; 318 uint8_t dma_enabled:1; 319}; 320 321struct musbotg_std_temp { 322 musbotg_cmd_t *func; | 309 uint32_t offset; 310 uint32_t remainder; 311 uint16_t max_frame_size; /* packet_size * mult */ 312 uint8_t ep_no; 313 uint8_t error:1; 314 uint8_t alt_next:1; 315 uint8_t short_pkt:1; 316 uint8_t support_multi_buffer:1; 317 uint8_t did_stall:1; 318 uint8_t dma_enabled:1; 319}; 320 321struct musbotg_std_temp { 322 musbotg_cmd_t *func; |
323 struct usb2_page_cache *pc; | 323 struct usb_page_cache *pc; |
324 struct musbotg_td *td; 325 struct musbotg_td *td_next; 326 uint32_t len; 327 uint32_t offset; 328 uint16_t max_frame_size; 329 uint8_t short_pkt; 330 /* 331 * short_pkt = 0: transfer should be short terminated 332 * short_pkt = 1: transfer should not be short terminated 333 */ 334 uint8_t setup_alt_next; 335 uint8_t did_stall; 336}; 337 338struct musbotg_config_desc { | 324 struct musbotg_td *td; 325 struct musbotg_td *td_next; 326 uint32_t len; 327 uint32_t offset; 328 uint16_t max_frame_size; 329 uint8_t short_pkt; 330 /* 331 * short_pkt = 0: transfer should be short terminated 332 * short_pkt = 1: transfer should not be short terminated 333 */ 334 uint8_t setup_alt_next; 335 uint8_t did_stall; 336}; 337 338struct musbotg_config_desc { |
339 struct usb2_config_descriptor confd; 340 struct usb2_interface_descriptor ifcd; 341 struct usb2_endpoint_descriptor endpd; | 339 struct usb_config_descriptor confd; 340 struct usb_interface_descriptor ifcd; 341 struct usb_endpoint_descriptor endpd; |
342} __packed; 343 344union musbotg_hub_temp { 345 uWord wValue; | 342} __packed; 343 344union musbotg_hub_temp { 345 uWord wValue; |
346 struct usb2_port_status ps; | 346 struct usb_port_status ps; |
347}; 348 349struct musbotg_flags { 350 uint8_t change_connect:1; 351 uint8_t change_suspend:1; 352 uint8_t status_suspend:1; /* set if suspended */ 353 uint8_t status_vbus:1; /* set if present */ 354 uint8_t status_bus_reset:1; /* set if reset complete */ 355 uint8_t status_high_speed:1; /* set if High Speed is selected */ 356 uint8_t remote_wakeup:1; 357 uint8_t self_powered:1; 358 uint8_t clocks_off:1; 359 uint8_t port_powered:1; 360 uint8_t port_enabled:1; 361 uint8_t d_pulled_up:1; 362}; 363 364struct musbotg_softc { | 347}; 348 349struct musbotg_flags { 350 uint8_t change_connect:1; 351 uint8_t change_suspend:1; 352 uint8_t status_suspend:1; /* set if suspended */ 353 uint8_t status_vbus:1; /* set if present */ 354 uint8_t status_bus_reset:1; /* set if reset complete */ 355 uint8_t status_high_speed:1; /* set if High Speed is selected */ 356 uint8_t remote_wakeup:1; 357 uint8_t self_powered:1; 358 uint8_t clocks_off:1; 359 uint8_t port_powered:1; 360 uint8_t port_enabled:1; 361 uint8_t d_pulled_up:1; 362}; 363 364struct musbotg_softc { |
365 struct usb2_bus sc_bus; | 365 struct usb_bus sc_bus; |
366 union musbotg_hub_temp sc_hub_temp; | 366 union musbotg_hub_temp sc_hub_temp; |
367 struct usb2_hw_ep_profile sc_hw_ep_profile[16]; | 367 struct usb_hw_ep_profile sc_hw_ep_profile[16]; |
368 | 368 |
369 struct usb2_device *sc_devices[MUSB2_MAX_DEVICES]; | 369 struct usb_device *sc_devices[MUSB2_MAX_DEVICES]; |
370 struct resource *sc_io_res; 371 struct resource *sc_irq_res; 372 void *sc_intr_hdl; 373 bus_size_t sc_io_size; 374 bus_space_tag_t sc_io_tag; 375 bus_space_handle_t sc_io_hdl; 376 377 void (*sc_clocks_on) (void *arg); --- 29 unchanged lines hidden --- | 370 struct resource *sc_io_res; 371 struct resource *sc_irq_res; 372 void *sc_intr_hdl; 373 bus_size_t sc_io_size; 374 bus_space_tag_t sc_io_tag; 375 bus_space_handle_t sc_io_hdl; 376 377 void (*sc_clocks_on) (void *arg); --- 29 unchanged lines hidden --- |