mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +02:00
Add support for ASUS P5A (Socket 7, ALi based)
* Add support for the ALi M1533 to chipset_enable.c * Add some SMBus poking needed for the ASUS P5A, to board_enable.c Since PCI subsystem IDs are worthless with this board, people will have to name the board directly. Corresponding to flashrom svn r109 and coreboot v2 svn r2677. Signed-off-by: Luc Verhaegen <libv@skynet.be> Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
This commit is contained in:
parent
a7e0548cea
commit
6b14175ead
3
README
3
README
@ -51,7 +51,8 @@ The following boards require the specification of the board name, if
|
|||||||
no LinuxBIOS table is found:
|
no LinuxBIOS table is found:
|
||||||
|
|
||||||
* IWILL DK8-HTX: use -m iwill:dk8_htx
|
* IWILL DK8-HTX: use -m iwill:dk8_htx
|
||||||
* agami Aruma: use -m AGAMI:ARUMA
|
* Agami Aruma: use -m AGAMI:ARUMA
|
||||||
|
* ASUS P5A: use -m asus:p5a
|
||||||
|
|
||||||
|
|
||||||
ROM Layout Support
|
ROM Layout Support
|
||||||
|
@ -138,7 +138,7 @@ static int board_via_epia_m(const char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Suited for Asus A7V8X-MX SE and A7V400-MX.
|
* Suited for ASUS A7V8X-MX SE and A7V400-MX.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -169,6 +169,83 @@ static int board_asus_a7v8x_mx(const char *name)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Suited for ASUS P5A.
|
||||||
|
*
|
||||||
|
* This is rather nasty code, but there's no way to do this cleanly.
|
||||||
|
* We're basically talking to some unknown device on SMBus, my guess
|
||||||
|
* is that it is the Winbond W83781D that lives near the DIP BIOS.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static int board_asus_p5a(const char *name)
|
||||||
|
{
|
||||||
|
uint8_t tmp;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
#define ASUSP5A_LOOP 5000
|
||||||
|
|
||||||
|
outb(0x00, 0xE807);
|
||||||
|
outb(0xEF, 0xE803);
|
||||||
|
|
||||||
|
outb(0xFF, 0xE800);
|
||||||
|
|
||||||
|
for (i = 0; i < ASUSP5A_LOOP; i++) {
|
||||||
|
outb(0xE1, 0xFF);
|
||||||
|
if (inb(0xE800) & 0x04)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i == ASUSP5A_LOOP) {
|
||||||
|
printf("%s: Unable to contact device.\n", name);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
outb(0x20, 0xE801);
|
||||||
|
outb(0x20, 0xE1);
|
||||||
|
|
||||||
|
outb(0xFF, 0xE802);
|
||||||
|
|
||||||
|
for (i = 0; i < ASUSP5A_LOOP; i++) {
|
||||||
|
tmp = inb(0xE800);
|
||||||
|
if (tmp & 0x70)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((i == ASUSP5A_LOOP) || !(tmp & 0x10)) {
|
||||||
|
printf("%s: failed to read device.\n", name);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp = inb(0xE804);
|
||||||
|
tmp &= ~0x02;
|
||||||
|
|
||||||
|
outb(0x00, 0xE807);
|
||||||
|
outb(0xEE, 0xE803);
|
||||||
|
|
||||||
|
outb(tmp, 0xE804);
|
||||||
|
|
||||||
|
outb(0xFF, 0xE800);
|
||||||
|
outb(0xE1, 0xFF);
|
||||||
|
|
||||||
|
outb(0x20, 0xE801);
|
||||||
|
outb(0x20, 0xE1);
|
||||||
|
|
||||||
|
outb(0xFF, 0xE802);
|
||||||
|
|
||||||
|
for (i = 0; i < ASUSP5A_LOOP; i++) {
|
||||||
|
tmp = inb(0xE800);
|
||||||
|
if (tmp & 0x70)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((i == ASUSP5A_LOOP) || !(tmp & 0x10)) {
|
||||||
|
printf("%s: failed to write to device.\n", name);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We use 2 sets of ids here, you're free to choose which is which. This
|
* We use 2 sets of ids here, you're free to choose which is which. This
|
||||||
* to provide a very high degree of certainty when matching a board on
|
* to provide a very high degree of certainty when matching a board on
|
||||||
@ -211,7 +288,8 @@ struct board_pciid_enable board_pciid_enables[] = {
|
|||||||
NULL, NULL, "VIA EPIA M/MII/...", board_via_epia_m},
|
NULL, NULL, "VIA EPIA M/MII/...", board_via_epia_m},
|
||||||
{0x1106, 0x3177, 0x1043, 0x80A1, 0x1106, 0x3205, 0x1043, 0x8118,
|
{0x1106, 0x3177, 0x1043, 0x80A1, 0x1106, 0x3205, 0x1043, 0x8118,
|
||||||
NULL, NULL, "ASUS A7V8-MX SE", board_asus_a7v8x_mx},
|
NULL, NULL, "ASUS A7V8-MX SE", board_asus_a7v8x_mx},
|
||||||
|
{0x10B9, 0x1541, 0x0000, 0x0000, 0x10B9, 0x1533, 0x0000, 0x0000,
|
||||||
|
"asus", "p5a", "ASUS P5A", board_asus_p5a},
|
||||||
{0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL} /* Keep this */
|
{0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL} /* Keep this */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -18,6 +18,19 @@
|
|||||||
#include "flash.h"
|
#include "flash.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
|
static int enable_flash_ali_m1533(struct pci_dev *dev, char *name)
|
||||||
|
{
|
||||||
|
uint8_t tmp;
|
||||||
|
|
||||||
|
/* ROM Write enable, 0xFFFC0000-0xFFFDFFFF and
|
||||||
|
0xFFFE0000-0xFFFFFFFF ROM select enable. */
|
||||||
|
tmp = pci_read_byte(dev, 0x47);
|
||||||
|
tmp |= 0x46;
|
||||||
|
pci_write_byte(dev, 0x47, tmp);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int enable_flash_sis630(struct pci_dev *dev, char *name)
|
static int enable_flash_sis630(struct pci_dev *dev, char *name)
|
||||||
{
|
{
|
||||||
char b;
|
char b;
|
||||||
@ -410,6 +423,7 @@ static FLASH_ENABLE enables[] = {
|
|||||||
{0x100b, 0x0510, "SC1100", enable_flash_sc1100},
|
{0x100b, 0x0510, "SC1100", enable_flash_sc1100},
|
||||||
{0x1039, 0x0008, "SIS5595", enable_flash_sis5595},
|
{0x1039, 0x0008, "SIS5595", enable_flash_sis5595},
|
||||||
{0x1022, 0x7468, "AMD8111", enable_flash_amd8111},
|
{0x1022, 0x7468, "AMD8111", enable_flash_amd8111},
|
||||||
|
{0x10B9, 0x1533, "ALi M1533", enable_flash_ali_m1533},
|
||||||
/* this fallthrough looks broken. */
|
/* this fallthrough looks broken. */
|
||||||
{0x10de, 0x0050, "NVIDIA CK804", enable_flash_ck804}, /* LPC */
|
{0x10de, 0x0050, "NVIDIA CK804", enable_flash_ck804}, /* LPC */
|
||||||
{0x10de, 0x0051, "NVIDIA CK804", enable_flash_ck804}, /* Pro */
|
{0x10de, 0x0051, "NVIDIA CK804", enable_flash_ck804}, /* Pro */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user