Since some people disapprove of white space cleanups mixed in regular commits
[coreboot.git] / src / southbridge / broadcom / bcm5785 / bcm5785_sb_pci_main.c
index f90b81fa3f175fa5760fc60df57959eb65b34b3f..4f518b6a54967041edc0682d57c0691cba4283a6 100644 (file)
@@ -23,22 +23,20 @@ static void sb_init(device_t dev)
 {
        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);
        }
 
 
@@ -47,24 +45,23 @@ static void sb_init(device_t dev)
 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;
@@ -78,7 +75,7 @@ static int lsmbus_recv_byte(device_t dev)
 
         return do_smbus_recv_byte(res->base, device);
 }
-        
+
 static int lsmbus_send_byte(device_t dev, uint8_t val)
 {
         unsigned device;