diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2008-06-30 23:45:22 +0000 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2008-06-30 23:45:22 +0000 |
commit | 2cb94e183be9c69afcf426f70a9b4cb2bbd8bded (patch) | |
tree | 151967e33263eafe4b36b556765e565532349af0 /it87spi.c | |
parent | e3eb9c1d69fcd878b8f6c153dbc1e15fd8b3d08d (diff) | |
download | ast2050-flashrom-2cb94e183be9c69afcf426f70a9b4cb2bbd8bded.zip ast2050-flashrom-2cb94e183be9c69afcf426f70a9b4cb2bbd8bded.tar.gz |
First attempt to clean up SPI probing and create a common construct: the flash bus
At some point the flash bus will be part of struct flashchip.
Pardon me for pushing this in, but I think it is important to beware of further
decay and it will improve things for other developers in the short run.
Carl-Daniel, I will consider your suggestions in another patch. I want to keep
things from getting too much for now. The patch includes Rudolf's VIA SPI
changes though.
Corresponding to flashrom svn r285 and coreboot v2 svn r3401.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'it87spi.c')
-rw-r--r-- | it87spi.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -3,6 +3,7 @@ * * Copyright (C) 2007, 2008 Carl-Daniel Hailfinger * Copyright (C) 2008 Ronald Hoogenboom <ronald@zonnet.nl> + * Copyright (C) 2008 coresystems GmbH * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -112,8 +113,13 @@ static uint16_t find_ite_spi_flash_port(uint16_t port) int it87xx_probe_spi_flash(const char *name) { it8716f_flashport = find_ite_spi_flash_port(ITE_SUPERIO_PORT1); + if (!it8716f_flashport) it8716f_flashport = find_ite_spi_flash_port(ITE_SUPERIO_PORT2); + + if (it8716f_flashport) + flashbus = BUS_TYPE_IT87XX_SPI; + return (!it8716f_flashport); } |