aboutsummaryrefslogtreecommitdiffstats
path: root/mstarddc_spi.c
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.de>2021-05-04 15:32:17 +0200
committerNico Huber <nico.h@gmx.de>2021-06-10 12:49:16 +0000
commit4f5169df5ff2b63a40d654ab133b8a3108b6a599 (patch)
treed345dd5f3068a2325298234e302988b0c82a62e3 /mstarddc_spi.c
parent085db626fbf609704136aa3cc51c70325d0b40e2 (diff)
downloadflashrom-4f5169df5ff2b63a40d654ab133b8a3108b6a599.tar.gz
flashrom-4f5169df5ff2b63a40d654ab133b8a3108b6a599.tar.bz2
flashrom-4f5169df5ff2b63a40d654ab133b8a3108b6a599.zip
programmer_table: move each entry to the associated programmer source
Change-Id: I3d02bd789f0299e936eb86819b3b15b5ea2bb921 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de> Reviewed-on: https://review.coreboot.org/c/flashrom/+/52946 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'mstarddc_spi.c')
-rw-r--r--mstarddc_spi.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mstarddc_spi.c b/mstarddc_spi.c
index 0f638df2..a7816a4b 100644
--- a/mstarddc_spi.c
+++ b/mstarddc_spi.c
@@ -150,7 +150,7 @@ static const struct spi_master spi_master_mstarddc = {
};
/* Returns 0 upon success, a negative number upon errors. */
-int mstarddc_spi_init(void)
+static int mstarddc_spi_init(void)
{
int ret = 0;
int mstarddc_fd = -1;
@@ -252,4 +252,14 @@ out:
return ret;
}
+const struct programmer_entry programmer_mstarddc_spi = {
+ .name = "mstarddc_spi",
+ .type = OTHER,
+ .devs.note = "MSTAR DDC devices addressable via /dev/i2c-* on Linux.\n",
+ .init = mstarddc_spi_init,
+ .map_flash_region = fallback_map,
+ .unmap_flash_region = fallback_unmap,
+ .delay = internal_delay,
+};
+
#endif