Change in flashrom[master]: ichspi.c: Make ich_init_spi() parametric on ich_generation
Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/43498 ) Change subject: ichspi.c: Make ich_init_spi() parametric on ich_generation ...................................................................... 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> --- M ichspi.c 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://review.coreboot.org:29418/flashrom refs/changes/98/43498/1 diff --git a/ichspi.c b/ichspi.c index c780d52..c044eb9 100644 --- a/ichspi.c +++ b/ichspi.c @@ -1736,7 +1736,7 @@ 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 @@ 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 @@ break; } - switch (ich_generation) { + switch (ich_gen) { case CHIPSET_ICH7: case CHIPSET_TUNNEL_CREEK: case CHIPSET_CENTERTON: @@ -2021,14 +2021,14 @@ 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; -- To view, visit https://review.coreboot.org/c/flashrom/+/43498 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: I5293e7ae6f20a2299577172655c2926861091f5a Gerrit-Change-Number: 43498 Gerrit-PatchSet: 1 Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org> Gerrit-MessageType: newchange
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/43498 ) Change subject: ichspi.c: Make ich_init_spi() parametric on ich_generation ...................................................................... Patch Set 1: Code-Review+2 `ich_init_spi` is called with `ich_generation` so this change preserves behavior. As expected, still probes fine on Intel HM86 (the PCH in my Toshiba Satellite Pro L70-A). -- To view, visit https://review.coreboot.org/c/flashrom/+/43498 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: I5293e7ae6f20a2299577172655c2926861091f5a Gerrit-Change-Number: 43498 Gerrit-PatchSet: 1 Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net> Gerrit-Comment-Date: Thu, 16 Jul 2020 10:23:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/43498 ) Change subject: ichspi.c: Make ich_init_spi() parametric on ich_generation ...................................................................... Patch Set 1: (1 comment) https://review.coreboot.org/c/flashrom/+/43498/1//COMMIT_MSG Commit Message: https://review.coreboot.org/c/flashrom/+/43498/1//COMMIT_MSG@9 PS1, Line 9: dropping ich_generation global Is this desired to make testing easier? If so, I'd update the commit message. -- To view, visit https://review.coreboot.org/c/flashrom/+/43498 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: I5293e7ae6f20a2299577172655c2926861091f5a Gerrit-Change-Number: 43498 Gerrit-PatchSet: 1 Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net> Gerrit-Comment-Date: Thu, 16 Jul 2020 10:26:03 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/43498 ) Change subject: ichspi.c: Make ich_init_spi() parametric on ich_generation ...................................................................... Patch Set 1: (1 comment) https://review.coreboot.org/c/flashrom/+/43498/1//COMMIT_MSG Commit Message: https://review.coreboot.org/c/flashrom/+/43498/1//COMMIT_MSG@9 PS1, Line 9: dropping ich_generation global
Is this desired to make testing easier? If so, I'd update the commit message. I suppose it could however we are a bit far from that goal with ich at the moment I think. The later on patches are more heading in that direction however this one in particular is more just a cleean up to make the function a little less silly.
-- To view, visit https://review.coreboot.org/c/flashrom/+/43498 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: I5293e7ae6f20a2299577172655c2926861091f5a Gerrit-Change-Number: 43498 Gerrit-PatchSet: 1 Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net> Gerrit-Comment-Date: Thu, 16 Jul 2020 12:02:23 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Angel Pons <th3fanbus@gmail.com> Gerrit-MessageType: comment
Edward O'Callaghan has submitted this change. ( https://review.coreboot.org/c/flashrom/+/43498 ) Change subject: ichspi.c: Make ich_init_spi() parametric on ich_generation ...................................................................... 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> --- M ichspi.c 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved diff --git a/ichspi.c b/ichspi.c index c780d52..c044eb9 100644 --- a/ichspi.c +++ b/ichspi.c @@ -1736,7 +1736,7 @@ 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 @@ 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 @@ break; } - switch (ich_generation) { + switch (ich_gen) { case CHIPSET_ICH7: case CHIPSET_TUNNEL_CREEK: case CHIPSET_CENTERTON: @@ -2021,14 +2021,14 @@ 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; -- To view, visit https://review.coreboot.org/c/flashrom/+/43498 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: I5293e7ae6f20a2299577172655c2926861091f5a Gerrit-Change-Number: 43498 Gerrit-PatchSet: 2 Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net> Gerrit-MessageType: merged
participants (2)
-
Angel Pons (Code Review) -
Edward O'Callaghan (Code Review)