mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-30 16:33:41 +02:00
Boards: Fix several issues with nvidia_mcp_gpio_set
- CK804, MCP04, MCP2 use the isa bridges.. - Newer nvidia mcp's do use the smbus controllers (Found by Michael Karcher). - gpio line check breaks EPoX EP-8RDA3+, and should be wider. Corresponding to flashrom svn r810. Signed-off-by: Luc Verhaegen <libv@skynet.be> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
This commit is contained in:
parent
e4984102e9
commit
23ebd751ee
@ -440,20 +440,30 @@ static int nvidia_mcp_gpio_set(int gpio, int raise)
|
|||||||
uint16_t base;
|
uint16_t base;
|
||||||
uint8_t tmp;
|
uint8_t tmp;
|
||||||
|
|
||||||
if ((gpio < 0) || (gpio > 31)) {
|
if ((gpio < 0) || (gpio >= 0x40)) {
|
||||||
fprintf(stderr, "\nERROR: unsupported GPIO: %d.\n", gpio);
|
fprintf(stderr, "\nERROR: unsupported GPIO: %d.\n", gpio);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev = pci_dev_find_vendorclass(0x10DE, 0x0C05);
|
/* First, check the ISA Bridge */
|
||||||
|
dev = pci_dev_find_vendorclass(0x10DE, 0x0601);
|
||||||
switch (dev->device_id) {
|
switch (dev->device_id) {
|
||||||
case 0x0030: /* CK804 */
|
case 0x0030: /* CK804 */
|
||||||
case 0x0050: /* MCP04 */
|
case 0x0050: /* MCP04 */
|
||||||
case 0x0060: /* MCP2 */
|
case 0x0060: /* MCP2 */
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "\nERROR: no nVidia SMBus controller found.\n");
|
/* Newer MCPs use the SMBus Controller */
|
||||||
|
dev = pci_dev_find_vendorclass(0x10DE, 0x0C05);
|
||||||
|
switch (dev->device_id) {
|
||||||
|
case 0x0264: /* MCP51 */
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fprintf(stderr,
|
||||||
|
"\nERROR: no nVidia LPC/SMBus controller found.\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
base = pci_read_long(dev, 0x64) & 0x0000FF00; /* System control area */
|
base = pci_read_long(dev, 0x64) & 0x0000FF00; /* System control area */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user