[coreboot] flashrom fails to write/erase on VIA VT8237

Peter Stuge peter at stuge.se
Mon Mar 30 08:59:37 CEST 2009


Dear Vinod,

vinuxesgmail wrote:
> >1. Which vendor and board is this?
>
> The M/B model name is PPAP-2020VL, and the vendor is Portwell.

Great!


> >2. Please find out where pin 7 WP# and 8 TBL# on the flash chip
> >are connected. To which pin on which chip?
>
> Pin 7 and 8 of the flash-chip are connected to GPIOA. GPIOA
> connects to 8237R AE5 PIN. Please find the attached board diagram
> image "8237.jpg".

Perfect information! Thank you very much.


> Let me know if u need any further information.

Please apply the attached patch to the flashrom code, build and run
to see if my idea for enabling writes on this board works.

Unfortunately you must use flashrom -m ppap-2020vl while testing,
because of this I would also appreciate if you can supply lspci -vnn
output, so that the board can be autodetected instead, if there are
unique PCI subsystem IDs.


Best regards

//Peter
-------------- next part --------------
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		= 0x0,
+		.first_device		= 0x0,
+		.first_card_vendor	= 0x0,
+		.first_card_device	= 0x0,
+		.second_vendor		= 0x0,
+		.second_device		= 0x0,
+		.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,


More information about the coreboot mailing list