{
uint8_t byte;
uint8_t byte_old;
- uint32_t nmi_option;
-
- uint32_t dword;
+ int nmi_option;
/* Set up NMI on errors */
byte = inb(0x70); // RTC70
byte_old = byte;
nmi_option = NMI_OFF;
- get_option("nmi", &nmi_option);
+ get_option(&nmi_option, "nmi");
if (nmi_option) {
byte &= ~(1 << 7); /* set NMI */
} else {
byte |= ( 1 << 7); // Can not mask NMI from PCI-E and NMI_NOW
}
if( byte != byte_old) {
- outb(0x70, byte);
+ outb(byte, 0x70);
}
static void bcm5785_sb_read_resources(device_t dev)
{
struct resource *res;
- unsigned long index;
/* Get the normal pci resources of this device */
- pci_dev_read_resources(dev);
-
- /* Get Resource for SMBUS */
- pci_get_resource(dev, 0x90);
+ pci_dev_read_resources(dev);
+ /* Get Resource for SMBUS */
+ pci_get_resource(dev, 0x90);
- compact_resources(dev);
+ compact_resources(dev);
/* Add an extra subtractive resource for both memory and I/O */
res = new_resource(dev, IOINDEX_SUBTRACTIVE(0, 0));
res->flags = IORESOURCE_IO | IORESOURCE_SUBTRACTIVE | IORESOURCE_ASSIGNED;
-
+
res = new_resource(dev, IOINDEX_SUBTRACTIVE(1, 0));
res->flags = IORESOURCE_MEM | IORESOURCE_SUBTRACTIVE | IORESOURCE_ASSIGNED;
}
+
static int lsmbus_recv_byte(device_t dev)
{
unsigned device;
return do_smbus_recv_byte(res->base, device);
}
-
+
static int lsmbus_send_byte(device_t dev, uint8_t val)
{
unsigned device;