diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2008-03-17 22:59:40 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2008-03-17 22:59:40 +0000 |
commit | 012ed48bf2c28af293c1868f8e0d0371e20ed8ec (patch) | |
tree | 0be4e162021cf0a87a5b7a2a489ee6ffada29bf6 /util/flashrom/board_enable.c | |
parent | 2ce4e4caa9c2856c77b666299b9551dfd10a0dab (diff) | |
download | coreboot-012ed48bf2c28af293c1868f8e0d0371e20ed8ec.tar.xz |
Support for the Winbond W39V080FA series of chips.
Support for flashing on the Kontron 986LCD-M board.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3165 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/board_enable.c')
-rw-r--r-- | util/flashrom/board_enable.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/util/flashrom/board_enable.c b/util/flashrom/board_enable.c index 714e650220..9691748714 100644 --- a/util/flashrom/board_enable.c +++ b/util/flashrom/board_enable.c @@ -431,6 +431,42 @@ static int board_artecgroup_dbe6x(const char *name) return 0; } +static int board_kontron_986lcd_m(const char *name) +{ + struct pci_dev *dev; + uint16_t gpiobar; + uint32_t val; + +#define ICH7_GPIO_LVL2 0x38 + + dev = pci_dev_find(0x8086, 0x27b8); /* Intel ICH7 LPC */ + if (!dev) { + // This will never happen on this board + fprintf(stderr, "\nERROR: ICH7 LPC bridge not found.\n"); + return -1; + } + + /* Use GPIOBASE register to find where the GPIO is mapped. */ + gpiobar = pci_read_word(dev, 0x48) & 0xfffc; + + val = inl(gpiobar + ICH7_GPIO_LVL2); /* GP_LVL2 */ + printf_debug("\nGPIOBAR=0x%04x GP_LVL: 0x%08x\n", gpiobar, val); + + /* bit 2 (0x04) = 0 #TBL --> bootblock locking = 1 + * bit 2 (0x04) = 1 #TBL --> bootblock locking = 0 + * bit 3 (0x08) = 0 #WP --> block locking = 1 + * bit 3 (0x08) = 1 #WP --> block locking = 0 + * + * To enable full block locking, you would do: + * val &= ~ ((1 << 2) | (1 << 3)); + */ + val |= (1 << 2) | (1 << 3); + + outl(val, gpiobar + ICH7_GPIO_LVL2); + + 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 @@ -497,6 +533,8 @@ struct board_pciid_enable board_pciid_enables[] = { "artecgroup", "dbe61", "Artec Group DBE61", board_artecgroup_dbe6x}, {0x1022, 0x2090, 0x0000, 0x0000, 0x1022, 0x2080, 0x0000, 0x0000, "artecgroup", "dbe62", "Artec Group DBE62", board_artecgroup_dbe6x}, + {0x8086, 0x27b8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + "kontron", "986lcd-m", "Kontron 986LCD-M", board_kontron_986lcd_m}, {0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL} /* Keep this */ }; |