[BACK]Return to bus.h CVS log [TXT][DIR] Up to [local] / funnyos / sys

Annotation of funnyos/sys/bus.h, Revision 1.1

1.1     ! init        1: /*
        !             2:  * $Id: bus.h,v 1.1.1.1 2007/10/12 08:40:38 init Exp $
        !             3:  */
        !             4: #ifndef _SYS_BUS_H
        !             5: #define _SYS_BUS_H
        !             6:
        !             7: #include <sys/device.h>
        !             8:
        !             9: /*
        !            10:  * Bus operations.
        !            11:  */
        !            12: struct busops {
        !            13:        uint8_t         (*bus_read_1)(struct device *devp, uint32_t addr);
        !            14:        uint16_t        (*bus_read_2)(struct device *devp, uint32_t addr);
        !            15:        uint32_t        (*bus_read_4)(struct device *devp, uint32_t addr);
        !            16:        int             (*bus_write_1)(struct device *devp, uint32_t addr, uint8_t data);
        !            17:        int             (*bus_write_2)(struct device *devp, uint32_t addr, uint16_t data);
        !            18:        int             (*bus_write_4)(struct device *devp, uint32_t addr, uint32_t data);
        !            19:        /* XXX DMA related stuff */
        !            20: };
        !            21:
        !            22: #define bus_read_1(dev, addr) ((struct busops *)dev->dv_devdata)->bus_read_1(dev, addr)
        !            23:
        !            24: #define bus_write_1(dev, addr, data) ((struct busops *)dev->dv_devdata)->bus_write_1(dev, addr, data)
        !            25:
        !            26: #endif /* _SYS_BUS_H */

CVSweb