Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/63902 )
Change subject: raiden_debug_spi.c: Document where raiden_debug_spi_requests are handled ......................................................................
raiden_debug_spi.c: Document where raiden_debug_spi_requests are handled
Because the enum is a different name to the one within cr50 it was entirely unclear where these values were handled at the end-point and what a untargetted REQ_ENABLE actually did. Comment to avoid needing to chase this again.
BUG=b:224358254 TEST=builds
Change-Id: I8cc78a85660190c9f750bf67994f0d59d69592d8 Signed-off-by: Edward O'Callaghan quasisec@google.com --- M raiden_debug_spi.c 1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/02/63902/1
diff --git a/raiden_debug_spi.c b/raiden_debug_spi.c index 521539f..a0deb28 100644 --- a/raiden_debug_spi.c +++ b/raiden_debug_spi.c @@ -399,6 +399,7 @@ USB_SPI_UNKNOWN_ERROR = 0x8000, };
+/* Corresponds with 'enum usb_spi_request' in platform/cr50/chip/g/usb_spi.h */ enum raiden_debug_spi_request { RAIDEN_DEBUG_SPI_REQ_ENABLE = 0x0000, RAIDEN_DEBUG_SPI_REQ_DISABLE = 0x0001, @@ -1445,6 +1446,10 @@
static int get_target(void) { + /** + * A untargetted REQ_ENABLE is handled as a sentinel value that + * a target value was unspecified. + */ int request_enable = RAIDEN_DEBUG_SPI_REQ_ENABLE;
char *target_str = extract_programmer_param("target");