flashrom: Board enable for Portwell PPAP-2020VL Unfortunately no unique subsystem IDs so flashrom must be started with -m ppap-2020vl Signed-off-by: Peter Stuge Index: board_enable.c =================================================================== --- board_enable.c (revision 4030) +++ board_enable.c (working copy) @@ -600,6 +600,32 @@ return 0; } +static int board_portwell_ppap_2020vl(const char *name) +{ + uint8_t val; + uint16_t iobase; + struct pci_dev *dev; + + dev = pci_dev_find(0x1106, 0x3227); + if (!dev) { + fprintf(stderr, "\nERROR: VT8237R ISA bridge not found.\n"); + return -1; + } + + /* Enable GPO24 */ + val = pci_read_byte(dev, 0xe6); + val |= 1; + pci_write_byte(dev, 0xe6, val); + + /* Set GPO24 high */ + iobase = pci_read_long(dev, 0x88) & 0xff00; + val = INB(iobase + 0x4f); + val |= 1; + OUTB(val, iobase + 0x4f); + + return 0; +} + /** * We use 2 sets of IDs here, you're free to choose which is which. This * is to provide a very high degree of certainty when matching a board on @@ -1014,6 +1040,20 @@ .enable = ich6_gpio19_raise, }, { + .first_vendor = 0x1106, + .first_device = 0x0314, + .first_card_vendor = 0x0, + .first_card_device = 0x0, + .second_vendor = 0x1106, + .second_device = 0x3227, + .second_card_vendor = 0x0, + .second_card_device = 0x0, + .lb_vendor = "portwell", + .lb_part = "ppap-2020vl", + .name = "Portwell PPAP-2020VL", + .enable = board_portwell_ppap_2020vl, + }, + { .first_vendor = 0, .first_device = 0, .first_card_vendor = 0,