Changeset 8064c2f6 in mainline


Ignore:
Timestamp:
2013-09-28T21:51:51Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
11a3b5f
Parents:
8f1dd3b
Message:

uhci: Sanitize headers.

Include what you use.

Location:
uspace/drv/bus/usb/uhci
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/hc.c

    r8f1dd3b r8064c2f6  
    3232 * @brief UHCI Host controller driver routines
    3333 */
     34
     35#include <adt/list.h>
     36#include <assert.h>
     37#include <async.h>
     38#include <ddi.h>
     39#include <device/hw_res_parsed.h>
     40#include <fibril.h>
    3441#include <errno.h>
     42#include <macros.h>
     43#include <mem.h>
     44#include <stdlib.h>
    3545#include <str_error.h>
    36 #include <adt/list.h>
    37 #include <ddi.h>
     46#include <sys/types.h>
    3847
    3948#include <usb/debug.h>
    4049#include <usb/usb.h>
    4150
     51#include "uhci_batch.h"
     52#include "utils/malloc32.h"
    4253#include "hc.h"
    43 #include "uhci_batch.h"
    4454
    4555#define UHCI_INTR_ALLOW_INTERRUPTS \
  • uspace/drv/bus/usb/uhci/hc.h

    r8f1dd3b r8064c2f6  
    3636#define DRV_UHCI_HC_H
    3737
    38 #include <ddf/interrupt.h>
    3938#include <device/hw_res_parsed.h>
    4039#include <fibril.h>
    4140#include <macros.h>
     41#include <stdbool.h>
     42#include <sys/types.h>
    4243#include <usb/host/hcd.h>
     44#include <usb/host/usb_transfer_batch.h>
     45
    4346#include "uhci_rh.h"
    44 
    4547#include "transfer_list.h"
     48#include "hw_struct/link_pointer.h"
    4649
    4750/** UHCI I/O registers layout */
  • uspace/drv/bus/usb/uhci/hw_struct/link_pointer.h

    r8f1dd3b r8064c2f6  
    3535#define DRV_UHCI_HW_STRUCT_LINK_POINTER_H
    3636
     37#include <sys/types.h>
     38
    3739/** UHCI link pointer, used by many data structures */
    3840typedef uint32_t link_pointer_t;
  • uspace/drv/bus/usb/uhci/hw_struct/queue_head.h

    r8f1dd3b r8064c2f6  
    3434#ifndef DRV_UHCI_HW_STRUCT_QH_H
    3535#define DRV_UHCI_HW_STRUCT_QH_H
     36
    3637#include <assert.h>
     38#include <sys/types.h>
    3739
    3840#include "link_pointer.h"
  • uspace/drv/bus/usb/uhci/hw_struct/transfer_descriptor.c

    r8f1dd3b r8064c2f6  
    3232 * @brief UHCI driver
    3333 */
     34
     35#include <assert.h>
    3436#include <errno.h>
     37
    3538#include <usb/debug.h>
     39#include <usb/usb.h>
    3640
     41#include "link_pointer.h"
    3742#include "transfer_descriptor.h"
    3843#include "../utils/malloc32.h"
  • uspace/drv/bus/usb/uhci/hw_struct/transfer_descriptor.h

    r8f1dd3b r8064c2f6  
    3636
    3737#include <assert.h>
    38 #include <mem.h>
    3938#include <usb/usb.h>
     39#include <stdbool.h>
     40#include <sys/types.h>
    4041
    4142#include "link_pointer.h"
  • uspace/drv/bus/usb/uhci/main.c

    r8f1dd3b r8064c2f6  
    3232 * @brief UHCI driver initialization
    3333 */
     34
     35#include <assert.h>
    3436#include <ddf/driver.h>
    3537#include <errno.h>
     38#include <io/log.h>
     39#include <stdio.h>
    3640#include <str_error.h>
    37 
    3841#include <usb/debug.h>
    3942
  • uspace/drv/bus/usb/uhci/res.c

    r8f1dd3b r8064c2f6  
    3535 */
    3636
     37#include <assert.h>
     38#include <ddf/driver.h>
     39#include <device/pci.h>
     40#include <devman.h>
    3741#include <errno.h>
    38 #include <assert.h>
    39 #include <devman.h>
    40 #include <device/hw_res_parsed.h>
    41 #include <device/pci.h>
    4242
    4343#include "res.h"
  • uspace/drv/bus/usb/uhci/res.h

    r8f1dd3b r8064c2f6  
    3737
    3838#include <ddf/driver.h>
    39 #include <device/hw_res_parsed.h>
    4039
    4140int disable_legacy(ddf_dev_t *);
  • uspace/drv/bus/usb/uhci/transfer_list.c

    r8f1dd3b r8064c2f6  
    3434 */
    3535
     36#include <assert.h>
    3637#include <errno.h>
     38#include <libarch/barrier.h>
     39#include <sys/types.h>
    3740#include <usb/debug.h>
    38 #include <libarch/barrier.h>
    39 
     41#include <usb/host/usb_transfer_batch.h>
     42
     43#include "utils/malloc32.h"
     44#include "hw_struct/link_pointer.h"
    4045#include "transfer_list.h"
    4146
  • uspace/drv/bus/usb/uhci/transfer_list.h

    r8f1dd3b r8064c2f6  
    3535#define DRV_UHCI_TRANSFER_LIST_H
    3636
     37#include <adt/list.h>
    3738#include <fibril_synch.h>
    3839
  • uspace/drv/bus/usb/uhci/uhci.c

    r8f1dd3b r8064c2f6  
    3434 */
    3535
     36#include <assert.h>
     37#include <ddf/driver.h>
     38#include <ddf/interrupt.h>
     39#include <device/hw_res_parsed.h>
    3640#include <errno.h>
     41#include <stdbool.h>
     42#include <stdlib.h>
    3743#include <str_error.h>
    38 #include <ddf/interrupt.h>
     44#include <sys/types.h>
     45
    3946#include <usb/debug.h>
     47#include <usb/usb.h>
     48#include <usb/host/ddf_helpers.h>
    4049#include <usb/host/hcd.h>
    41 #include <usb/host/ddf_helpers.h>
     50#include <usb/host/usb_bus.h>
    4251
    4352#include "uhci.h"
  • uspace/drv/bus/usb/uhci/uhci_batch.c

    r8f1dd3b r8064c2f6  
    3232 * @brief UHCI driver USB transfer structure
    3333 */
     34
     35#include <assert.h>
    3436#include <errno.h>
    35 #include <str_error.h>
    3637#include <macros.h>
     38#include <mem.h>
     39#include <stdlib.h>
    3740
    3841#include <usb/usb.h>
    3942#include <usb/debug.h>
     43#include <usb/host/endpoint.h>
    4044
    4145#include "uhci_batch.h"
    42 #include "transfer_list.h"
    4346#include "hw_struct/transfer_descriptor.h"
    4447#include "utils/malloc32.h"
  • uspace/drv/bus/usb/uhci/uhci_batch.h

    r8f1dd3b r8064c2f6  
    3535#define DRV_UHCI_BATCH_H
    3636
     37#include <adt/list.h>
     38#include <assert.h>
     39#include <errno.h>
     40#include <stdbool.h>
     41#include <sys/types.h>
    3742#include <usb/host/usb_transfer_batch.h>
    38 #include <adt/list.h>
    3943
    4044#include "hw_struct/queue_head.h"
  • uspace/drv/bus/usb/uhci/uhci_rh.c

    r8f1dd3b r8064c2f6  
    2828
    2929#include <assert.h>
     30#include <async.h>
     31#include <ddi.h>
     32#include <errno.h>
    3033#include <macros.h>
     34#include <mem.h>
     35#include <sys/time.h>
     36
    3137#include <usb/debug.h>
     38#include <usb/descriptor.h>
    3239#include <usb/classes/hub.h>
    33 #include <ddi.h>
     40#include <usb/request.h>
     41#include <usb/usb.h>
    3442
    3543#include "uhci_rh.h"
  • uspace/drv/bus/usb/uhci/uhci_rh.h

    r8f1dd3b r8064c2f6  
    3838#include <usbvirt/virthub_base.h>
    3939#include <usb/host/usb_transfer_batch.h>
     40#include <usb/usb.h>
     41
     42#include <stdbool.h>
     43#include <sys/types.h>
    4044
    4145/** Endpoint number for status change pipe. */
     
    6367static inline usb_address_t uhci_rh_get_address(uhci_rh_t *instance)
    6468{
    65         assert(instance);
    6669        return virthub_base_get_address(&instance->base);
    6770}
  • uspace/drv/bus/usb/uhci/utils/malloc32.h

    r8f1dd3b r8064c2f6  
    3636
    3737#include <as.h>
    38 #include <assert.h>
    3938#include <ddi.h>
    4039#include <errno.h>
    4140#include <malloc.h>
    42 #include <mem.h>
    43 #include <unistd.h>
     41#include <sys/types.h>
    4442
    45 #define UHCI_STRCUTURES_ALIGNMENT 16
     43#define UHCI_STRUCTURES_ALIGNMENT 16
    4644#define UHCI_REQUIRED_PAGE_SIZE 4096
    4745
     
    5654        if (addr == NULL)
    5755                return 0;
    58        
     56
    5957        uintptr_t result;
    6058        const int ret = as_get_physical_mapping(addr, &result);
    6159        if (ret != EOK)
    6260                return 0;
    63        
     61
    6462        return result;
    6563}
     
    8179        /* Calculate alignment to make sure the block won't cross page
    8280         * boundary */
    83         size_t alignment = UHCI_STRCUTURES_ALIGNMENT;
     81        size_t alignment = UHCI_STRUCTURES_ALIGNMENT;
    8482        while (alignment < size)
    8583                alignment *= 2;
     
    104102        uintptr_t phys;
    105103        void *address;
    106        
     104
    107105        const int ret = dmamem_map_anonymous(UHCI_REQUIRED_PAGE_SIZE,
    108106            DMAMEM_4GiB, AS_AREA_READ | AS_AREA_WRITE, 0, &phys,
    109107            &address);
    110        
     108
    111109        return ((ret == EOK) ? address : NULL);
    112110}
Note: See TracChangeset for help on using the changeset viewer.