#include <part/sizeram.h>
#include <device/device.h>
#include <device/pci.h>
+#include <device/chip.h>
#include <delay.h>
#if 0
#include <part/mainboard.h>
unsigned long totalmem;
post_code(0x80);
+
+ CONFIGURE(CONF_PASS_PRE_CONSOLE);
+
/* displayinit MUST PRECEDE ALL PRINTK! */
console_init();
}
#endif
init_timer();
+ CONFIGURE(CONF_PASS_PRE_PCI);
/* pick how to scan the bus. This is first so we can get at memory size. */
printk_info("Finding PCI configuration type.\n");
*/
lb_mem = write_tables(mem, processor_map);
+ CONFIGURE(CONF_PASS_PRE_PCI);
+
elfboot(lb_mem);
}
/* some of the types of resources chips can control */
#ifndef CONFIG_CHIP_CONFIGURE
-#define CHIP_CONFIGURE(chip, pass) chip_configure(chip, pass)
+#define CONFIGURE(dev, pass) chip_configure(chip, pass)
#else
-#define CHIP_CONFIGURE(chip, pass)
+#define CONFIGURE(dev, pass)
#endif
struct com_ports {
};
enum chip_pass {
- CHIP_PASS_PRE_CONSOLE,
- CHIP_PASS_PRE_PCI,
- CHIP_PASS_PRE_DEVICE_ENUMERATE,
- CHIP_PASS_PRE_DEVICE_CONFIGURE,
- CHIP_PASS_PRE_DEVICE_ENABLE,
- CHIP_PASS_PRE_DEVICE_INITIALIZE,
- CHIP_PASS_PRE_BOOT
+ CONF_PASS_PRE_CONSOLE,
+ CONF_PASS_PRE_PCI,
+ CONF_PASS_PRE_DEVICE_ENUMERATE,
+ CONF_PASS_PRE_DEVICE_CONFIGURE,
+ CONF_PASS_PRE_DEVICE_ENABLE,
+ CONF_PASS_PRE_DEVICE_INITIALIZE,
+ CONF_PASS_PRE_BOOT
};
struct superio_NSC_pc97307_config *conf = (struct superio_NSC_pc97307_config *)chip->chip_info;
switch (pass) {
- case CHIP_PRE_CONSOLE:
+ case CONF_PASS_PRE_CONSOLE:
/* Enable Super IO Chip */
pnp_output(0x07, 6); /* LD 6 = UART1 */
pnp_output(0x30, 0); /* Dectivate */