[BACK]Return to pxapcicvar.h CVS log [TXT][DIR] Up to [local] / sys / arch / arm / xscale

Annotation of sys/arch/arm/xscale/pxapcicvar.h, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: pxapcicvar.h,v 1.7 2005/12/14 15:08:51 uwe Exp $ */
        !             2:
        !             3: /*
        !             4:  * Copyright (c) 2005 Dale Rahn <drahn@openbsd.org>
        !             5:  *
        !             6:  * Permission to use, copy, modify, and distribute this software for any
        !             7:  * purpose with or without fee is hereby granted, provided that the above
        !             8:  * copyright notice and this permission notice appear in all copies.
        !             9:  *
        !            10:  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
        !            11:  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
        !            12:  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
        !            13:  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
        !            14:  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
        !            15:  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
        !            16:  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
        !            17:  */
        !            18:
        !            19: struct pxapcic_socket {
        !            20:         struct pxapcic_softc *sc;
        !            21:         int socket;            /* socket number */
        !            22:         struct device *pcmcia;
        !            23:        struct proc *event_thread;
        !            24:
        !            25:         int flags;
        !            26:         int power_capability;  /* PXAPCIC_POWER_3V | PXAPCIC_POWER_5V */
        !            27:
        !            28:        int irqpin;
        !            29:        void *irq;
        !            30:
        !            31:         void *pcictag_cookie;  /* opaque data for pcictag functions */
        !            32:        struct pxapcic_tag *pcictag;
        !            33: };
        !            34:
        !            35: /* event */
        !            36: #define PXAPCIC_EVENT_INSERTION        0
        !            37: #define PXAPCIC_EVENT_REMOVAL  1
        !            38:
        !            39: /* flags */
        !            40: #define PXAPCIC_FLAG_CARDD     0
        !            41: #define PXAPCIC_FLAG_CARDP     1
        !            42:
        !            43: struct pxapcic_tag {
        !            44:        u_int (*read)(struct pxapcic_socket *, int);
        !            45:        void (*write)(struct pxapcic_socket *, int, u_int);
        !            46:        void (*set_power)(struct pxapcic_socket *, int);
        !            47:        void (*clear_intr)(struct pxapcic_socket *);
        !            48:        void *(*intr_establish)(struct pxapcic_socket *, int,
        !            49:            int (*)(void *), void *);
        !            50:        void (*intr_disestablish)(struct pxapcic_socket *, void *);
        !            51:        const char *(*intr_string)(struct pxapcic_socket *);
        !            52: };
        !            53:
        !            54: /* pcictag registers and their values */
        !            55: #define PXAPCIC_CARD_STATUS    0
        !            56: #define  PXAPCIC_CARD_INVALID  0
        !            57: #define  PXAPCIC_CARD_VALID    1
        !            58: #define PXAPCIC_CARD_READY     1
        !            59: #define PXAPCIC_CARD_POWER     2
        !            60: #define  PXAPCIC_POWER_OFF     0
        !            61: #define  PXAPCIC_POWER_3V      1
        !            62: #define  PXAPCIC_POWER_5V      2
        !            63: #define PXAPCIC_CARD_RESET     3
        !            64:
        !            65: struct pxapcic_softc {
        !            66:        struct device sc_dev;
        !            67:        struct pxapcic_socket sc_socket[2];
        !            68:
        !            69:         bus_space_tag_t sc_iot;
        !            70:         bus_space_handle_t sc_memctl_ioh;
        !            71:
        !            72:        void *sc_irq;
        !            73:         int sc_shutdown;
        !            74:        int sc_nslots;
        !            75:        int sc_irqpin[2];
        !            76:        int sc_irqcfpin[2];
        !            77: };
        !            78:
        !            79: void   pxapcic_attach(struct pxapcic_softc *,
        !            80:     void (*socket_setup_hook)(struct pxapcic_socket *));
        !            81: int    pxapcic_intr(void *);

CVSweb