SB600 has four write once LPC ROM protect areas. It is not possible to write enable that area once the register is set so print a warning.

Signed-off-by: Marc Jones <marcj.jones@amd.com>


Index: chipset_enable.c
===================================================================
--- chipset_enable.c	(revision 3658)
+++ chipset_enable.c	(working copy)
@@ -571,6 +571,24 @@
 	return 0;
 }
 
+static int enable_flash_sb600(struct pci_dev *dev, const char *name)
+{
+        uint32_t val;
+	uint8_t reg;
+
+        /* Clear ROM Protect 0-3 */
+	for (reg = 0x50; reg < 0x60; reg+=4) {
+	        val = pci_read_long(dev, reg);
+	        if (val & 0x03) {
+			printf("\nLPC ROM Protect 0x%x is set to 0x%x on %s.\n You will not be able to flash that location. (WARNING ONLY)\n", reg, val, name);
+	        }
+	}
+
+        return 0;
+
+
+}
+
 static int enable_flash_ck804(struct pci_dev *dev, const char *name)
 {
 	uint8_t old, new;
@@ -744,6 +762,7 @@
 	{0x1039, 0x0008, "SiS5595",		enable_flash_sis5595},
 	{0x1022, 0x2080, "AMD CS5536",		enable_flash_cs5536},
 	{0x1022, 0x7468, "AMD8111",		enable_flash_amd8111},
+	{0x1002, 0x438D, "ATI(AMD) SB600",	enable_flash_sb600},
 	{0x10B9, 0x1533, "ALi M1533",		enable_flash_ali_m1533},
 	{0x10de, 0x0050, "NVIDIA CK804",	enable_flash_ck804}, /* LPC */
 	{0x10de, 0x0051, "NVIDIA CK804",	enable_flash_ck804}, /* Pro */
