summaryrefslogtreecommitdiffstats
path: root/it85spi.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2011-11-09 23:40:00 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2011-11-09 23:40:00 +0000
commiteaacd2d4e7485d747e4e0bbd54b7bb44cf3fd179 (patch)
tree5e023363074cbe351bc6ded9f20c3f116e6c6f1c /it85spi.c
parentf382e352ac63108ec0f912ff52b538c99f46c340 (diff)
downloadast2050-flashrom-eaacd2d4e7485d747e4e0bbd54b7bb44cf3fd179.zip
ast2050-flashrom-eaacd2d4e7485d747e4e0bbd54b7bb44cf3fd179.tar.gz
Register Parallel/LPC/FWH programmers the same way SPI programmers are registered
All programmers are now calling programmer registration functions and direct manipulations of buses_supported are not needed/possible anymore. Note: Programmers without parallel/LPC/FWH chip support should not call register_par_programmer(). Additional fixes: Set max_rom_decode.parallel for drkaiser. Remove abuse of programmer_map_flash_region in it85spi. Annotate several FIXMEs in it85spi. Corresponding to flashrom svn r1463. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Diffstat (limited to 'it85spi.c')
-rw-r--r--it85spi.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/it85spi.c b/it85spi.c
index 75a565c..d25f5ac 100644
--- a/it85spi.c
+++ b/it85spi.c
@@ -257,8 +257,10 @@ static int it85xx_spi_common_init(struct superio s)
INDIRECT_A3(shm_io_base, (base >> 24));
#endif
#ifdef LPC_MEMORY
- base = (chipaddr)programmer_map_flash_region("it85 communication",
- 0xFFFFF000, 0x1000);
+ /* FIXME: We should block accessing that region for anything else.
+ * Major TODO here, and it will be a lot of work.
+ */
+ base = (chipaddr)physmap("it85 communication", 0xFFFFF000, 0x1000);
msg_pdbg("%s():%d base=0x%08x\n", __func__, __LINE__,
(unsigned int)base);
ce_high = (unsigned char *)(base + 0xE00); /* 0xFFFFFE00 */
@@ -285,18 +287,26 @@ int it85xx_spi_init(struct superio s)
{
int ret;
- if (!(buses_supported & BUS_FWH)) {
+ if (!(internal_buses_supported & BUS_FWH)) {
msg_pdbg("%s():%d buses not support FWH\n", __func__, __LINE__);
return 1;
}
ret = it85xx_spi_common_init(s);
msg_pdbg("FWH: %s():%d ret=%d\n", __func__, __LINE__, ret);
if (!ret) {
- msg_pdbg("%s():%d buses_supported=0x%x\n", __func__, __LINE__,
- buses_supported);
- if (buses_supported & BUS_FWH)
- msg_pdbg("Overriding chipset SPI with IT85 FWH|SPI.\n");
- /* Really leave FWH enabled? */
+ msg_pdbg("%s: internal_buses_supported=0x%x\n", __func__,
+ internal_buses_supported);
+ /* Check for FWH because IT85 listens to FWH cycles.
+ * FIXME: The big question is whether FWH cycles are necessary
+ * for communication even if LPC_IO is defined.
+ */
+ if (internal_buses_supported & BUS_FWH)
+ msg_pdbg("Registering IT85 SPI.\n");
+ /* FIXME: Really leave FWH enabled? We can't use this region
+ * anymore since accessing it would mess up IT85 communication.
+ * If we decide to disable FWH for this region, we should print
+ * a debug message about it.
+ */
/* Set this as SPI controller. */
register_spi_programmer(&spi_programmer_it85xx);
}
OpenPOWER on IntegriCloud