From 4f5169df5ff2b63a40d654ab133b8a3108b6a599 Mon Sep 17 00:00:00 2001 From: Thomas Heijligen Date: Tue, 4 May 2021 15:32:17 +0200 Subject: programmer_table: move each entry to the associated programmer source Change-Id: I3d02bd789f0299e936eb86819b3b15b5ea2bb921 Signed-off-by: Thomas Heijligen Reviewed-on: https://review.coreboot.org/c/flashrom/+/52946 Tested-by: build bot (Jenkins) Reviewed-by: Anastasia Klimchuk Reviewed-by: Nico Huber --- linux_spi.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'linux_spi.c') diff --git a/linux_spi.c b/linux_spi.c index 7d866f477..46779a020 100644 --- a/linux_spi.c +++ b/linux_spi.c @@ -165,7 +165,7 @@ out: return result; } -int linux_spi_init(void) +static int linux_spi_init(void) { char *p, *endp, *dev; uint32_t speed_hz = 2 * 1000 * 1000; @@ -251,4 +251,14 @@ init_err: return 1; } +const struct programmer_entry programmer_linux_spi = { + .name = "linux_spi", + .type = OTHER, + .devs.note = "Device files /dev/spidev*.*\n", + .init = linux_spi_init, + .map_flash_region = fallback_map, + .unmap_flash_region = fallback_unmap, + .delay = internal_delay, +}; + #endif // CONFIG_LINUX_SPI == 1 -- cgit v1.2.3