Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset c9e954c in mainline


Ignore:
Timestamp:
2014-01-18T22:37:06Z (8 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
615abda
Parents:
fccf289
Message:

ehci: Add ehci_ prefix to driver interface functions.

Location:
uspace/drv/bus/usb/ehci
Files:
3 edited

Legend:

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

    rfccf289 rc9e954c  
    9595/** Generate IRQ code.
    9696 * @param[out] ranges PIO ranges buffer.
    97  * @param[in] ranges_size Size of the ranges buffer (bytes).
    98  * @param[out] cmds Commands buffer.
    99  * @param[in] cmds_size Size of the commands buffer (bytes).
    10097 * @param[in] hw_res Device's resources.
    10198 *
    10299 * @return Error code.
    103100 */
    104 int hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res)
     101int ehci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res)
    105102{
    106103        assert(code);
     
    215212}
    216213
     214int ehci_hc_status(hcd_t *hcd, uint32_t *status)
     215{
     216        assert(hcd);
     217        hc_t *instance = hcd->driver.data;
     218        assert(instance);
     219        assert(status);
     220        *status = 0;
     221        if (instance->registers) {
     222                *status = EHCI_RD(instance->registers->usbsts);
     223                EHCI_WR(instance->registers->usbsts, *status);
     224        }
     225        return EOK;
     226}
     227
    217228/** Add USB transfer to the schedule.
    218229 *
    219  * @param[in] instance EHCI hc driver structure.
     230 * @param[in] hcd HCD driver structure.
    220231 * @param[in] batch Batch representing the transfer.
    221232 * @return Error code.
    222233 */
    223 int hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch)
     234int ehci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch)
    224235{
    225236        assert(hcd);
     
    237248/** Interrupt handling routine
    238249 *
    239  * @param[in] instance EHCI hc driver structure.
     250 * @param[in] hcd HCD driver structure.
    240251 * @param[in] status Value of the status register at the time of interrupt.
    241252 */
    242 void hc_interrupt(hcd_t *hcd, uint32_t status)
     253void ehci_hc_interrupt(hcd_t *hcd, uint32_t status)
    243254{
    244255        assert(hcd);
  • uspace/drv/bus/usb/ehci/hc.h

    rfccf289 rc9e954c  
    7171} hc_t;
    7272
    73 int hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res);
    74 int hc_register_hub(hc_t *instance, ddf_fun_t *hub_fun);
    7573int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts);
    7674void hc_fini(hc_t *instance);
     
    7977void hc_dequeue_endpoint(hc_t *instance, const endpoint_t *ep);
    8078
    81 int hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch);
    82 void hc_interrupt(hcd_t *hcd, uint32_t status);
     79int ehci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res);
     80
     81void ehci_hc_interrupt(hcd_t *hcd, uint32_t status);
     82int ehci_hc_status(hcd_t *hcd, uint32_t *status);
     83int ehci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch);
    8384#endif
    8485/**
  • uspace/drv/bus/usb/ehci/main.c

    rfccf289 rc9e954c  
    5959        const int ret = hc_init(instance, res, irq);
    6060        if (ret == EOK)
    61                 hcd_set_implementation(hcd, instance, hc_schedule,
    62                     NULL, NULL, hc_interrupt, NULL);
     61                hcd_set_implementation(hcd, instance, ehci_hc_schedule,
     62                    NULL, NULL, ehci_hc_interrupt, ehci_hc_status);
    6363        return ret;
    6464}
     
    9898        const int ret = ddf_hcd_device_setup_all(device, USB_SPEED_HIGH,
    9999            BANDWIDTH_AVAILABLE_USB20, bandwidth_count_usb11,
    100             ddf_hcd_gen_irq_handler, hc_gen_irq_code,
     100            ddf_hcd_gen_irq_handler, ehci_hc_gen_irq_code,
    101101            ehci_driver_init, ehci_driver_fini);
    102102        if (ret != EOK) {
Note: See TracChangeset for help on using the changeset viewer.