Changeset 58563585 in mainline for uspace/drv/bus/usb/ohci


Ignore:
Timestamp:
2016-08-31T11:15:39Z (9 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
10cb47e
Parents:
7a67416
Message:

code review and cstyle cleanup (no change in functionality)

Location:
uspace/drv/bus/usb/ohci
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/endpoint_list.h

    r7a67416 r58563585  
    7676void endpoint_list_add_ep(endpoint_list_t *instance, ohci_endpoint_t *ep);
    7777void endpoint_list_remove_ep(endpoint_list_t *instance, ohci_endpoint_t *ep);
     78
    7879#endif
     80
    7981/**
    8082 * @}
  • uspace/drv/bus/usb/ohci/hc.c

    r7a67416 r58563585  
    177177                usb_log_error("Failed to create OHCI memory structures: %s.\n",
    178178                    str_error(ret));
    179                 //TODO: We should disable pio access here
     179                // TODO: We should disable pio access here
    180180                return ret;
    181181        }
     
    393393                    ohci_emulation_reg, OHCI_RD(*ohci_emulation_reg));
    394394                /* Zero everything but A20State */
    395                 //TODO: should we ack interrupts before doing this?
     395                // TODO: should we ack interrupts before doing this?
    396396                OHCI_CLR(*ohci_emulation_reg, ~0x100);
    397397                usb_log_debug(
     
    403403        if (OHCI_RD(instance->registers->control) & C_IR) {
    404404                usb_log_debug("SMM driver: request ownership change.\n");
    405                 //TODO: should we ack interrupts before doing this?
     405                // TODO: should we ack interrupts before doing this?
    406406                OHCI_SET(instance->registers->command_status, CS_OCR);
    407407                /* Hope that SMM actually knows its stuff or we can hang here */
  • uspace/drv/bus/usb/ohci/hc.h

    r7a67416 r58563585  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup drvusbohci
    2930 * @{
     
    3233 * @brief OHCI host controller driver structure
    3334 */
     35
    3436#ifndef DRV_OHCI_HC_H
    3537#define DRV_OHCI_HC_H
     
    7880} hc_t;
    7981
    80 int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts);
    81 void hc_fini(hc_t *instance);
     82extern int hc_init(hc_t *, const hw_res_list_parsed_t *, bool);
     83extern void hc_fini(hc_t *);
    8284
    83 void hc_enqueue_endpoint(hc_t *instance, const endpoint_t *ep);
    84 void hc_dequeue_endpoint(hc_t *instance, const endpoint_t *ep);
     85extern void hc_enqueue_endpoint(hc_t *, const endpoint_t *);
     86extern void hc_dequeue_endpoint(hc_t *, const endpoint_t *);
    8587
    8688int ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res);
    8789
    88 void ohci_hc_interrupt(hcd_t *hcd, uint32_t status);
    89 int ohci_hc_status(hcd_t *hcd, uint32_t *status);
    90 int ohci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch);
     90extern void ohci_hc_interrupt(hcd_t *, uint32_t);
     91extern int ohci_hc_status(hcd_t *, uint32_t *);
     92extern int ohci_hc_schedule(hcd_t *, usb_transfer_batch_t *);
     93
    9194#endif
     95
    9296/**
    9397 * @}
  • uspace/drv/bus/usb/ohci/hw_struct/completion_codes.h

    r7a67416 r58563585  
    5454};
    5555
    56 inline static unsigned cc_to_rc(unsigned cc)
     56inline static unsigned int cc_to_rc(unsigned int cc)
    5757{
    5858        switch (cc) {
  • uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.c

    r7a67416 r58563585  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup drvusbohci
    2930 * @{
  • uspace/drv/bus/usb/ohci/hw_struct/hcca.h

    r7a67416 r58563585  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup drvusbohci
    2930 * @{
     
    3233 * @brief OHCI driver
    3334 */
     35
    3436#ifndef DRV_OHCI_HW_STRUCT_HCCA_H
    3537#define DRV_OHCI_HW_STRUCT_HCCA_H
     
    8587        OHCI_MEM32_WR(hcca->int_ep[index], pa);
    8688}
     89
    8790#endif
     91
    8892/**
    8993 * @}
  • uspace/drv/bus/usb/ohci/hw_struct/iso_transfer_descriptor.h

    r7a67416 r58563585  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup drvusbohci
    2930 * @{
     
    3233 * @brief OHCI driver
    3334 */
     35
    3436#ifndef DRV_OHCI_HW_STRUCT_ISO_TRANSFER_DESCRIPTOR_H
    3537#define DRV_OHCI_HW_STRUCT_ISO_TRANSFER_DESCRIPTOR_H
     
    6870
    6971} __attribute__((packed)) itd_t;
     72
    7073#endif
     74
    7175/**
    7276 * @}
  • uspace/drv/bus/usb/ohci/hw_struct/mem_access.h

    r7a67416 r58563585  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup drvusbohci
    2930 * @{
     
    3233 * @brief OHCI driver
    3334 */
     35
    3436#ifndef DRV_OHCI_HW_MEM_ACCESS_H
    3537#define DRV_OHCI_HW_MEM_ACCESS_H
  • uspace/drv/bus/usb/ohci/hw_struct/transfer_descriptor.c

    r7a67416 r58563585  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup drvusbohci
    2930 * @{
  • uspace/drv/bus/usb/ohci/hw_struct/transfer_descriptor.h

    r7a67416 r58563585  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup drvusbohci
    2930 * @{
     
    3233 * @brief OHCI driver
    3334 */
     35
    3436#ifndef DRV_OHCI_HW_STRUCT_TRANSFER_DESCRIPTOR_H
    3537#define DRV_OHCI_HW_STRUCT_TRANSFER_DESCRIPTOR_H
     
    139141        return OHCI_MEM32_RD(instance->be) - OHCI_MEM32_RD(instance->cbp) + 1;
    140142}
     143
    141144#endif
     145
    142146/**
    143147 * @}
  • uspace/drv/bus/usb/ohci/main.c

    r7a67416 r58563585  
    2727 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2828 */
     29
    2930/** @addtogroup drvusbohci
    3031 * @{
     
    128129        return ddf_driver_main(&ohci_driver);
    129130}
     131
    130132/**
    131133 * @}
  • uspace/drv/bus/usb/ohci/ohci_batch.c

    r7a67416 r58563585  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup drvusbohci
    2930 * @{
  • uspace/drv/bus/usb/ohci/ohci_endpoint.c

    r7a67416 r58563585  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup drvusbohci
    2930 * @{
     
    117118        }
    118119}
     120
    119121/**
    120122 * @}
  • uspace/drv/bus/usb/ohci/ohci_regs.h

    r7a67416 r58563585  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup drvusbohci
    2930 * @{
     
    3233 * @brief OHCI host controller register structure
    3334 */
     35
    3436#ifndef DRV_OHCI_OHCI_REGS_H
    3537#define DRV_OHCI_OHCI_REGS_H
     38
    3639#include <ddi.h>
    3740#include <sys/types.h>
     
    246249#define RHPS_CHANGE_WC_MASK (0x1f0000)
    247250} ohci_regs_t;
     251
    248252#endif
     253
    249254/**
    250255 * @}
Note: See TracChangeset for help on using the changeset viewer.