Great to get HT1000 support into the tree.
One small remark. I believe that the "magic" on port cd6h and cd7h modifies general purpose I/Os of the HT1000; in the case of the x3455 board you probably deactivate write protection for the flash pin.
We are currently working on a different HT1000 based board, and have a similar patch ready, with the difference that we set different GPIOs... so this access is board dependant.
I think the CD6/CD7 access should move into a x3455 board enable function.
Regards, Mondrian
svn@openbios.org wrote:
Author: stepan Date: 2007-06-05 12:28:39 +0200 (Tue, 05 Jun 2007) New Revision: 2711
Modified: trunk/LinuxBIOSv2/util/flashrom/chipset_enable.c Log: Add support for BCM HT1000 chipset to flashrom. Tested on IBM x3455. (trivial)
Signed-off-by: Stefan Reinauer stepan@coresystems.de Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: trunk/LinuxBIOSv2/util/flashrom/chipset_enable.c
--- trunk/LinuxBIOSv2/util/flashrom/chipset_enable.c 2007-06-03 23:19:19 UTC (rev 2710) +++ trunk/LinuxBIOSv2/util/flashrom/chipset_enable.c 2007-06-05 10:28:39 UTC (rev 2711) @@ -387,6 +387,28 @@
}
+static int enable_flash_ht1000(struct pci_dev *dev, char *name) +{
- unsigned char byte;
- /* Set the 4MB enable bit */
- byte = pci_read_byte(dev, 0x41);
- byte |= 0x0e;
- pci_write_byte(dev, 0x41, byte);
- byte = pci_read_byte(dev, 0x43);
- byte |= (1<<4);
- pci_write_byte(dev, 0x43, byte);
- /* Some magic. Comment me if you can */
- outb(0x45, 0xcd6);
- byte = inb(0xcd7);
- outb(reg8|0x20, 0xcd7);
- return 0;
+}
typedef struct penable { unsigned short vendor, device; char *name; @@ -444,6 +466,8 @@ {0x10de, 0x0367, "NVIDIA MCP55", enable_flash_mcp55}, /* Pro */
{0x1002, 0x4377, "ATI SB400", enable_flash_sb400}, /* ATI Technologies Inc IXP SB400 PCI-ISA Bridge (rev 80) */
- {0x1166, 0x0205, "BCM HT1000", enable_flash_ht1000},
};
/*
* Mondrian Nuessle nuessle@uni-mannheim.de [070605 13:57]:
One small remark. I believe that the "magic" on port cd6h and cd7h modifies general purpose I/Os of the HT1000; in the case of the x3455 board you probably deactivate write protection for the flash pin.
Ok, then this should probably go into a x3455 board specific code instead. I saw Yinghai made a lot of io to those ports in the ht1000 specific code, so I assumed thats southbridge specific code.
The weird thing is that I could overwrite some parts of the flash without that code (0x70000 to 0x80000), so it's probably not the flash write line.
Or, it might be the FPGA on board catches the area from 0x70000 to 0x80000 and decides whether to switch or not. I have no information on that, unfortunately, and I doubt I will be able to get it in a timely manner.
We are currently working on a different HT1000 based board, and have a similar patch ready, with the difference that we set different GPIOs... so this access is board dependant.
I will prepare something to make this board dependent. Thank you very much for the feedback.
Stefan
Ok, then this should probably go into a x3455 board specific code instead. I saw Yinghai made a lot of io to those ports in the ht1000 specific code, so I assumed thats southbridge specific code.
these regs are also used for other things; but these two accesses are GPIOs.
The weird thing is that I could overwrite some parts of the flash without that code (0x70000 to 0x80000), so it's probably not the flash write line.
The flash has two signals regarding write protection, WP# und TBL#, write protect und top boot lock, one protecting the lower parts of the device, the other protecting the high part; so maybe only part of the flash is protected here...
Or, it might be the FPGA on board catches the area from 0x70000 to 0x80000 and decides whether to switch or not. I have no information on that, unfortunately, and I doubt I will be able to get it in a timely manner.
ok that is the other possibility
I will prepare something to make this board dependent. Thank you very much for the feedback.
we'll then also start posting patches for the board we are working on
Regards, Mondrian
* Mondrian Nuessle nuessle@uni-mannheim.de [070605 14:53]:
I will prepare something to make this board dependent. Thank you very much for the feedback.
we'll then also start posting patches for the board we are working on
Please do. I made the changes.