Changeset dd0c8a0 in mainline for uspace/drv/block/ata_bd/ata_bd.h


Ignore:
Timestamp:
2013-09-29T06:56:33Z (12 years ago)
Author:
Beniamino Galvani <b.galvani@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a9bd960d
Parents:
3deb0155 (diff), 13be2583 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/block/ata_bd/ata_bd.h

    r3deb0155 rdd0c8a0  
    3636#define __ATA_BD_H__
    3737
     38#include <async.h>
    3839#include <bd_srv.h>
     40#include <ddf/driver.h>
    3941#include <sys/types.h>
    4042#include <fibril_synch.h>
    4143#include <str.h>
     44#include "ata_hw.h"
     45
     46#define NAME "ata_bd"
    4247
    4348/** Base addresses for ATA I/O blocks. */
     
    95100typedef struct {
    96101        bool present;
     102        struct ata_ctrl *ctrl;
     103        struct ata_fun *afun;
    97104
    98105        /** Device type */
     
    116123        char model[STR_BOUNDS(40) + 1];
    117124
     125        int disk_id;
     126} disk_t;
     127
     128/** ATA controller */
     129typedef struct ata_ctrl {
     130        /** DDF device */
     131        ddf_dev_t *dev;
     132        /** I/O base address of the command registers */
     133        uintptr_t cmd_physical;
     134        /** I/O base address of the control registers */
     135        uintptr_t ctl_physical;
     136
     137        /** Command registers */
     138        ata_cmd_t *cmd;
     139        /** Control registers */
     140        ata_ctl_t *ctl;
     141
     142        /** Per-disk state. */
     143        disk_t disk[MAX_DISKS];
     144
    118145        fibril_mutex_t lock;
    119         service_id_t service_id;
    120         int disk_id;
     146} ata_ctrl_t;
     147
     148typedef struct ata_fun {
     149        ddf_fun_t *fun;
     150        disk_t *disk;
    121151        bd_srvs_t bds;
    122 } disk_t;
     152} ata_fun_t;
     153
     154extern int ata_ctrl_init(ata_ctrl_t *, ata_base_t *);
     155extern int ata_ctrl_remove(ata_ctrl_t *);
     156extern int ata_ctrl_gone(ata_ctrl_t *);
     157
     158extern bd_ops_t ata_bd_ops;
    123159
    124160#endif
Note: See TracChangeset for help on using the changeset viewer.