isa_outb
isa_outb(IO_ICU1, 0x0f); /* Poll */
isa_outb(IO_ICU2, 0x0f);
isa_outb(iobase + BT_CTRL_PORT, BT_CTRL_SRST);
isa_outb(iobase + BT_CMD_PORT, *ibuf++);
isa_outb(iobase + BT_CTRL_PORT, BT_CTRL_SRST);
isa_outb(iobase + BT_CTRL_PORT, BT_CTRL_IRST);
isa_outb(iobase + BT_CTRL_PORT, BT_CTRL_IRST);
isa_outb(iobase + BT_CMD_PORT, BT_START_SCSI);
isa_outb(iobase + BT_CTRL_PORT, BT_CTRL_HRST | BT_CTRL_SRST);
isa_outb(IO_ICU1 + PIC_OCW1, imen);
isa_outb(IO_ICU2 + PIC_OCW1, imen >> 8);
isa_outb(IO_ICU2 + PIC_OCW1, imen >> 8);
isa_outb(IO_ICU2 + PIC_OCW2,
isa_outb(IO_ICU1,
isa_outb(IO_ICU1 + PIC_OCW1, imen);
isa_outb(IO_ICU1 + PIC_OCW2,
isa_outb(IO_ICU1 + PIC_OCW1, imen);
isa_outb(IO_ICU2 + PIC_OCW1, imen >> 8);
isa_outb(IO_ICU1 + PIC_ICW1, ICW1_SELECT | ICW1_IC4);
isa_outb(IO_ICU1 + PIC_ICW2, 0);
isa_outb(IO_ICU1 + PIC_ICW3, ICW3_CASCADE(IRQ_SLAVE));
isa_outb(IO_ICU1 + PIC_ICW4, ICW4_8086);
isa_outb(IO_ICU1 + PIC_OCW1, 0xff);
isa_outb(IO_ICU1 + PIC_OCW3, OCW3_SELECT | OCW3_SSMM | OCW3_SMM);
isa_outb(IO_ICU1 + PIC_OCW3, OCW3_SELECT | OCW3_RR);
isa_outb(IO_ICU1 + PIC_OCW2,
isa_outb(IO_ICU2 + PIC_ICW1, ICW1_SELECT | ICW1_IC4);
isa_outb(IO_ICU2 + PIC_ICW2, 8);
isa_outb(IO_ICU2 + PIC_ICW3, ICW3_SIC(IRQ_SLAVE));
isa_outb(IO_ICU2 + PIC_ICW4, ICW4_8086);
isa_outb(IO_ICU2 + PIC_OCW1, 0xff);
isa_outb(IO_ICU2 + PIC_OCW3, OCW3_SELECT | OCW3_SSMM | OCW3_SMM);
isa_outb(IO_ICU2 + PIC_OCW3, OCW3_SELECT | OCW3_RR);
isa_outb(PITAUX_PORT, isa_inb(PITAUX_PORT) & ~PIT_SPKR);
isa_outb(IO_TIMER1 + TIMER_MODE,
isa_outb(IO_TIMER1 + TIMER_CNTR2, TIMER_DIV(pitch) % 256);
isa_outb(IO_TIMER1 + TIMER_CNTR2, TIMER_DIV(pitch) / 256);
isa_outb(PITAUX_PORT, isa_inb(PITAUX_PORT) | PIT_SPKR);
void isa_outb(uint32_t, uint8_t);
isa_outb(IO_ICU1, 0x0c);
isa_outb(IO_ICU2, 0x0c);
isa_outb(IO_ICU1, 0x11); /* program device, four bytes */
isa_outb(IO_ICU1+1, 0); /* starting at this vector */
isa_outb(IO_ICU1+1, 1 << IRQ_SLAVE); /* slave on line 2 */
isa_outb(IO_ICU1+1, 1); /* 8086 mode */
isa_outb(IO_ICU1+1, 0xff); /* leave interrupts masked */
isa_outb(IO_ICU2, 0x11); /* program device, four bytes */
isa_outb(IO_ICU2+1, 8); /* starting at this vector */
isa_outb(IO_ICU2+1, IRQ_SLAVE);
isa_outb(IO_ICU2+1, 1); /* 8086 mode */
isa_outb(IO_ICU2+1, 0xff); /* leave interrupts masked */
isa_outb(IO_ICU1+1, i8259->enable_mask);
isa_outb(IO_ICU2+1, i8259->enable_mask >> 8);
isa_outb(IO_ICU1+1, i8259->enable_mask);
isa_outb(IO_ICU2+1, i8259->enable_mask >> 8);
isa_outb(IO_ICU1, 0xe0 | irq);
isa_outb(IO_ICU2, 0xe0 | (irq & 7));
isa_outb(IO_ICU1, 0xe0 | IRQ_SLAVE);
isa_outb(IO_ELCR1, elcr[0]);
isa_outb(IO_ELCR2, elcr[1]);
isa_outb(IO_ELCR1, (0 >> 0) & 0xff);
isa_outb(IO_ELCR2, (0 >> 8) & 0xff);
isa_outb(PITAUX_PORT, isa_inb(PITAUX_PORT) & ~PIT_SPKR);
isa_outb(IO_TIMER1 + TIMER_MODE,
isa_outb(IO_TIMER1 + TIMER_CNTR2, TIMER_DIV(pitch) % 256);
isa_outb(IO_TIMER1 + TIMER_CNTR2, TIMER_DIV(pitch) / 256);
isa_outb(PITAUX_PORT, isa_inb(PITAUX_PORT) | PIT_SPKR); /* enable counter 2 */