bitbang: Extend bitbang_spi_master functions to accept spi data
This way every bitbang spi master has access to its own spi data,
and can use this data in all its functions.
This patch only changes the signatures of functions.
flashrom-stable: Adapted new function signatures in `nicintel_spi`.
Change-Id: Id5722a43ce20feeed62630ad80e14df7744f9c02
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/54991
Original-Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/73268
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/ogp_spi.c b/ogp_spi.c
index ea1f6b2..aa4f422 100644
--- a/ogp_spi.c
+++ b/ogp_spi.c
@@ -50,32 +50,32 @@
{0},
};
-static void ogp_request_spibus(void)
+static void ogp_request_spibus(void *spi_data)
{
pci_mmio_writel(1, ogp_spibar + ogp_reg_sel);
}
-static void ogp_release_spibus(void)
+static void ogp_release_spibus(void *spi_data)
{
pci_mmio_writel(0, ogp_spibar + ogp_reg_sel);
}
-static void ogp_bitbang_set_cs(int val)
+static void ogp_bitbang_set_cs(int val, void *spi_data)
{
pci_mmio_writel(val, ogp_spibar + ogp_reg__ce);
}
-static void ogp_bitbang_set_sck(int val)
+static void ogp_bitbang_set_sck(int val, void *spi_data)
{
pci_mmio_writel(val, ogp_spibar + ogp_reg_sck);
}
-static void ogp_bitbang_set_mosi(int val)
+static void ogp_bitbang_set_mosi(int val, void *spi_data)
{
pci_mmio_writel(val, ogp_spibar + ogp_reg_siso);
}
-static int ogp_bitbang_get_miso(void)
+static int ogp_bitbang_get_miso(void *spi_data)
{
uint32_t tmp;