aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2020-07-16 15:25:37 +1000
committerEdward O'Callaghan <quasisec@chromium.org>2020-07-16 22:25:42 +0000
commit2ffc1e485be8102d860d52d2c8e44920c9dffde1 (patch)
treed8023c0ef27cd3a5b1ad219de2f6489932951a56
parent7aea04f7099ad4dde7b1f5900b54ef603eadf25e (diff)
downloadflashrom-2ffc1e485be8102d860d52d2c8e44920c9dffde1.tar.gz
flashrom-2ffc1e485be8102d860d52d2c8e44920c9dffde1.tar.bz2
flashrom-2ffc1e485be8102d860d52d2c8e44920c9dffde1.zip
ichspi.c: Make ich_init_spi() parametric on ich_generation
Work towards dropping ich_generation global usage and make the ich_init_spi() function more pure. Change-Id: I5293e7ae6f20a2299577172655c2926861091f5a Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/43498 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
-rw-r--r--ichspi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ichspi.c b/ichspi.c
index c780d525..c044eb92 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -1736,7 +1736,7 @@ int ich_init_spi(void *spibar, enum ich_chipset ich_gen)
memset(&desc, 0x00, sizeof(struct ich_descriptors));
/* Moving registers / bits */
- switch (ich_generation) {
+ switch (ich_gen) {
case CHIPSET_100_SERIES_SUNRISE_POINT:
case CHIPSET_C620_SERIES_LEWISBURG:
case CHIPSET_300_SERIES_CANNON_POINT:
@@ -1763,7 +1763,7 @@ int ich_init_spi(void *spibar, enum ich_chipset ich_gen)
hwseq_data.hsfc_fcycle = HSFC_FCYCLE;
break;
}
- switch (ich_generation) {
+ switch (ich_gen) {
case CHIPSET_100_SERIES_SUNRISE_POINT:
num_freg = 10;
break;
@@ -1779,7 +1779,7 @@ int ich_init_spi(void *spibar, enum ich_chipset ich_gen)
break;
}
- switch (ich_generation) {
+ switch (ich_gen) {
case CHIPSET_ICH7:
case CHIPSET_TUNNEL_CREEK:
case CHIPSET_CENTERTON:
@@ -2021,14 +2021,14 @@ int ich_init_spi(void *spibar, enum ich_chipset ich_gen)
return ERROR_FATAL;
}
- int tmpi = getFCBA_component_density(ich_generation, &desc, 0);
+ int tmpi = getFCBA_component_density(ich_gen, &desc, 0);
if (tmpi < 0) {
msg_perr("Could not determine density of flash component %d.\n", 0);
return ERROR_FATAL;
}
hwseq_data.size_comp0 = tmpi;
- tmpi = getFCBA_component_density(ich_generation, &desc, 1);
+ tmpi = getFCBA_component_density(ich_gen, &desc, 1);
if (tmpi < 0) {
msg_perr("Could not determine density of flash component %d.\n", 1);
return ERROR_FATAL;