diff options
author | Edward O'Callaghan <quasisec@google.com> | 2022-04-28 13:31:52 +1000 |
---|---|---|
committer | Edward O'Callaghan <quasisec@chromium.org> | 2022-04-30 00:40:34 +0000 |
commit | 9f44e1494d5a1ca2bd63aaf9d9617cd4c0d23c5a (patch) | |
tree | 45e5c7ecfae8c5cf8809d82ff67917b8d99d0a5d /raiden_debug_spi.c | |
parent | cb7e627f11f98df20b5127a2040fef2ee87bc48c (diff) | |
download | flashrom-9f44e1494d5a1ca2bd63aaf9d9617cd4c0d23c5a.tar.gz flashrom-9f44e1494d5a1ca2bd63aaf9d9617cd4c0d23c5a.tar.bz2 flashrom-9f44e1494d5a1ca2bd63aaf9d9617cd4c0d23c5a.zip |
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>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/63902
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sam McNally <sammc@google.com>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Diffstat (limited to 'raiden_debug_spi.c')
-rw-r--r-- | raiden_debug_spi.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/raiden_debug_spi.c b/raiden_debug_spi.c index 521539f1..f9ab3e04 100644 --- a/raiden_debug_spi.c +++ b/raiden_debug_spi.c @@ -399,6 +399,10 @@ enum usb_spi_error { USB_SPI_UNKNOWN_ERROR = 0x8000, }; +/* Corresponds with 'enum usb_spi_request' in, + * platform/cr50/chip/g/usb_spi.h and, + * platform/ec/chip/stm32/usb_spi.h. + */ enum raiden_debug_spi_request { RAIDEN_DEBUG_SPI_REQ_ENABLE = 0x0000, RAIDEN_DEBUG_SPI_REQ_DISABLE = 0x0001, @@ -1445,6 +1449,10 @@ static int get_ap_request_type(void) static int get_target(void) { + /** + * REQ_ENABLE doesn't specify a target bus, and will be rejected + * by adapters that support more than one target. + */ int request_enable = RAIDEN_DEBUG_SPI_REQ_ENABLE; char *target_str = extract_programmer_param("target"); |