diff options
author | Anastasia Klimchuk <aklm@chromium.org> | 2021-05-26 09:54:08 +1000 |
---|---|---|
committer | Edward O'Callaghan <quasisec@chromium.org> | 2021-06-03 05:19:37 +0000 |
commit | 5f5eaeb7fa9b8443ff3656dd55041fd59582edf4 (patch) | |
tree | 33073db96a5fc583d3f8811e7351546ec99c58ff /ogp_spi.c | |
parent | 30815fc3706194117c633393d1ed65941a5afafd (diff) | |
download | flashrom-5f5eaeb7fa9b8443ff3656dd55041fd59582edf4.tar.gz flashrom-5f5eaeb7fa9b8443ff3656dd55041fd59582edf4.tar.bz2 flashrom-5f5eaeb7fa9b8443ff3656dd55041fd59582edf4.zip |
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.
BUG=b:185191942
TEST=builds
Change-Id: Id5722a43ce20feeed62630ad80e14df7744f9c02
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/54991
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'ogp_spi.c')
-rw-r--r-- | ogp_spi.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -49,32 +49,32 @@ const struct dev_entry ogp_spi[] = { {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; |