Changeset View
Changeset View
Standalone View
Standalone View
pci_lpc.c
Context not available. | |||||
static const char *lpc_uart_names[LPC_UART_NUM] = { "COM1", "COM2" }; | static const char *lpc_uart_names[LPC_UART_NUM] = { "COM1", "COM2" }; | ||||
extern int | |||||
lpc_ata_init(struct vmctx *ctx, const char *opts); | |||||
static const char *lpc_ata0_opts = NULL; | |||||
static const char *lpc_ata1_opts = NULL; | |||||
/* | /* | ||||
* LPC device configuration is in the following form: | * LPC device configuration is in the following form: | ||||
* <lpc_device_name>[,<options>] | * <lpc_device_name>[,<options>] | ||||
Context not available. | |||||
goto done; | goto done; | ||||
} | } | ||||
} | } | ||||
if (strcasecmp(lpcdev, "ata-hd") == 0) { | |||||
if (str[0] == '0') | |||||
lpc_ata0_opts = str; | |||||
else if (str[0] == '1') | |||||
lpc_ata1_opts = str; | |||||
error = 0; | |||||
goto done; | |||||
} | |||||
} | } | ||||
done: | done: | ||||
Context not available. | |||||
sc->enabled = 1; | sc->enabled = 1; | ||||
} | } | ||||
if (lpc_ata0_opts) | |||||
lpc_ata_init(lpc_bridge->pi_vmctx, lpc_ata0_opts); | |||||
if (lpc_ata1_opts) | |||||
lpc_ata_init(lpc_bridge->pi_vmctx, lpc_ata1_opts); | |||||
return (0); | return (0); | ||||
} | } | ||||
Context not available. | |||||
return (-1); | return (-1); | ||||
} | } | ||||
lpc_bridge = pi; | |||||
if (lpc_init() != 0) | if (lpc_init() != 0) | ||||
return (-1); | return (-1); | ||||
Context not available. | |||||
pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_BRIDGE); | pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_BRIDGE); | ||||
pci_set_cfgdata8(pi, PCIR_SUBCLASS, PCIS_BRIDGE_ISA); | pci_set_cfgdata8(pi, PCIR_SUBCLASS, PCIS_BRIDGE_ISA); | ||||
lpc_bridge = pi; | |||||
return (0); | return (0); | ||||
} | } | ||||
Context not available. |