amr_mailbox
static int amr_quartz_get_work(struct amr_softc *sc, struct amr_mailbox *mbsave);
bcopy(&ac->ac_mailbox, (void *)(uintptr_t)(volatile void *)sc->amr_mailbox, AMR_MBOX_CMDSIZE);
static int amr_std_get_work(struct amr_softc *sc, struct amr_mailbox *mbsave);
sc->amr_mailbox->mb_ident = 0xFE;
sc->amr_mailbox->mb_nstatus = 0xFF;
sc->amr_mailbox->mb_status = 0xFF;
sc->amr_mailbox->mb_poll = 0;
sc->amr_mailbox->mb_ack = 0;
sc->amr_mailbox->mb_busy = 1;
while(sc->amr_mailbox->mb_nstatus == 0xFF)
while(sc->amr_mailbox->mb_status == 0xFF)
ac->ac_status=sc->amr_mailbox->mb_status;
while(sc->amr_mailbox->mb_poll != 0x77)
sc->amr_mailbox->mb_poll = 0;
sc->amr_mailbox->mb_ack = 0x77;
struct amr_mailbox mbox;
bzero(&ac->ac_mailbox, sizeof(struct amr_mailbox));
while (sc->amr_mailbox->mb_busy && (i++ < 10)) {
if (sc->amr_mailbox->mb_busy) {
bcopy(&ac->ac_mailbox, (void *)(uintptr_t)(volatile void *)sc->amr_mailbox, 14);
sc->amr_mailbox->mb_busy = 1;
sc->amr_mailbox->mb_poll = 0;
sc->amr_mailbox->mb_ack = 0;
bcopy(&ac->ac_mailbox, (void *)(uintptr_t)(volatile void *)sc->amr_mailbox, 14);
sc->amr_mailbox->mb_busy = 1;
sc->amr_mailbox->mb_poll = 0;
sc->amr_mailbox->mb_ack = 0;
amr_quartz_get_work(struct amr_softc *sc, struct amr_mailbox *mbsave)
while ((nstatus = sc->amr_mailbox->mb_nstatus) == 0xff)
sc->amr_mailbox->mb_nstatus = 0xff;
while ((completed[i] = sc->amr_mailbox->mb_completed[i]) == 0xff)
sc->amr_mailbox->mb_completed[i] = 0xff;
mbsave->mb_status = sc->amr_mailbox->mb_status;
sc->amr_mailbox->mb_status = 0xff;
amr_std_get_work(struct amr_softc *sc, struct amr_mailbox *mbsave)
bcopy((void *)(uintptr_t)(volatile void *)sc->amr_mailbox, mbsave, sizeof(*mbsave));
struct amr_mailbox *mb;
error = copyout(&status, &((struct amr_mailbox *)&((struct amr_linux_ioctl *)addr)->mbox[0])->mb_status, sizeof(status));
if (sc->amr_mailbox) {
sc->amr_mailbox = &sc->amr_mailbox64->mb;
struct amr_mailbox mb;
struct amr_mailbox ac_mailbox;
volatile struct amr_mailbox *amr_mailbox;
int (* amr_get_work)(struct amr_softc *sc, struct amr_mailbox *mbsave);