1 /* Copyright 2000 AG Electronics Ltd. */
2 /* This code is distributed without warranty under the GPL v2 (see COPYING) */
5 #include <console/console.h>
8 void pnp_output(char address, char data)
10 outb(address, PNP_CFGADDR);
11 outb(data, PNP_CFGDATA);
14 void sio_enable(struct chip *chip, enum chip_pass pass)
20 case CONF_PASS_PRE_PCI:
21 printk_info("Configuring PC97307...\n");
24 pnp_output(0x07, 0x00);
25 pnp_output(0x30, 0x00); /* Disable keyboard */
26 pnp_output(0xf0, 0x40); /* Set KBC clock to 8 Mhz */
27 pnp_output(0x30, 0x01); /* Enable keyboard */
30 pnp_output(0x07, 0x01);
31 pnp_output(0x30, 0x01);
34 pnp_output(0x07, 0x02);
35 pnp_output(0x30, 0x01);
38 pnp_output(0x07, 0x03);
39 pnp_output(0x30, 0x01);
41 /* Enable parallel port */
42 pnp_output(0x07, 0x04);
43 pnp_output(0x30, 0x01);
45 /* Set up floppy in PS/2 mode */
46 outb(0x09, SIO_CONFIG_RA);
47 reg = inb(SIO_CONFIG_RD);
48 reg = (reg & 0x3F) | 0x40;
49 outb(reg, SIO_CONFIG_RD);
50 outb(reg, SIO_CONFIG_RD); /* Have to write twice to change! */
58 struct chip_control superio_NSC_pc97307_control = {