Changeset 64cf7a3 in mainline for uspace/drv/block/ata_bd/main.c


Ignore:
Timestamp:
2024-05-06T18:33:22Z (9 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
2791fbb7
Parents:
21989e5
Message:

ATA Block Driver support for IRQ

You can fall back to PIO mode by not assigning an IRQ resource to
the driver instance.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/block/ata_bd/main.c

    r21989e5 r64cf7a3  
    11/*
    2  * Copyright (c) 2013 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    6666};
    6767
    68 static errno_t ata_get_res(ddf_dev_t *dev, ata_base_t *ata_res)
     68static errno_t ata_get_res(ddf_dev_t *dev, ata_hwres_t *ata_res)
    6969{
    7070        async_sess_t *parent_sess;
     
    8686        }
    8787
     88        /* I/O ranges */
     89
    8890        addr_range_t *cmd_rng = &hw_res.io_ranges.ranges[0];
    8991        addr_range_t *ctl_rng = &hw_res.io_ranges.ranges[1];
     
    101103        }
    102104
     105        /* IRQ */
     106        if (hw_res.irqs.count > 0) {
     107                ata_res->irq = hw_res.irqs.irqs[0];
     108        } else {
     109                ata_res->irq = -1;
     110        }
     111
    103112        return EOK;
    104113error:
     
    115124{
    116125        ata_ctrl_t *ctrl;
    117         ata_base_t res;
     126        ata_hwres_t res;
    118127        errno_t rc;
    119128
Note: See TracChangeset for help on using the changeset viewer.