diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2011-01-04 19:51:33 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2011-01-04 19:51:33 +0000 |
commit | c7f0c8feaba0208fd6b4d8a23459be7ed9419635 (patch) | |
tree | 6ab1a291f8bf2c184ee1935cf49c33583ae85125 /src/southbridge/nvidia/mcp55/ide.c | |
parent | 7e2fbd5dd3a9271edaf4c0b3fcc2301e10a83f8f (diff) |
MCP55: Cosmetic fixes, switch to u8 et al.
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6241 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/southbridge/nvidia/mcp55/ide.c')
-rw-r--r-- | src/southbridge/nvidia/mcp55/ide.c | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/src/southbridge/nvidia/mcp55/ide.c b/src/southbridge/nvidia/mcp55/ide.c index 90dd2bf48d..0677a75f58 100644 --- a/src/southbridge/nvidia/mcp55/ide.c +++ b/src/southbridge/nvidia/mcp55/ide.c @@ -31,33 +31,31 @@ static void ide_init(struct device *dev) { struct southbridge_nvidia_mcp55_config *conf; - /* Enable ide devices so the linux ide driver will work */ - uint32_t dword; - uint16_t word; - uint8_t byte; + u32 dword; + u16 word; + u8 byte; conf = dev->chip_info; word = pci_read_config16(dev, 0x50); - /* Ensure prefetch is disabled */ + /* Ensure prefetch is disabled. */ word &= ~((1 << 15) | (1 << 13)); if (conf->ide1_enable) { - /* Enable secondary ide interface */ - word |= (1<<0); + /* Enable secondary IDE interface. */ + word |= (1 << 0); printk(BIOS_DEBUG, "IDE1 \t"); } if (conf->ide0_enable) { - /* Enable primary ide interface */ - word |= (1<<1); + /* Enable primary IDE interface. */ + word |= (1 << 1); printk(BIOS_DEBUG, "IDE0\n"); } - word |= (1<<12); - word |= (1<<14); + word |= (1 << 12); + word |= (1 << 14); pci_write_config16(dev, 0x50, word); - - byte = 0x20 ; // Latency: 64-->32 + byte = 0x20; /* Latency: 64-->32 */ pci_write_config8(dev, 0xd, byte); dword = pci_read_config32(dev, 0xf8); @@ -66,17 +64,16 @@ static void ide_init(struct device *dev) #if CONFIG_PCI_ROM_RUN == 1 pci_dev_init(dev); #endif - } -static struct device_operations ide_ops = { - .read_resources = pci_dev_read_resources, - .set_resources = pci_dev_set_resources, - .enable_resources = pci_dev_enable_resources, - .init = ide_init, - .scan_bus = 0, -// .enable = mcp55_enable, - .ops_pci = &mcp55_pci_ops, +static struct device_operations ide_ops = { + .read_resources = pci_dev_read_resources, + .set_resources = pci_dev_set_resources, + .enable_resources = pci_dev_enable_resources, + .init = ide_init, + .scan_bus = 0, +// .enable = mcp55_enable, + .ops_pci = &mcp55_pci_ops, }; static const struct pci_driver ide_driver __pci_driver = { @@ -84,4 +81,3 @@ static const struct pci_driver ide_driver __pci_driver = { .vendor = PCI_VENDOR_ID_NVIDIA, .device = PCI_DEVICE_ID_NVIDIA_MCP55_IDE, }; - |