1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 22:21:16 +02:00

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>
This commit is contained in:
Anastasia Klimchuk
2021-05-26 09:54:08 +10:00
committed by Edward O'Callaghan
parent 30815fc370
commit 5f5eaeb7fa
8 changed files with 52 additions and 52 deletions

View File

@ -160,28 +160,28 @@ static const struct rayer_programmer rayer_spi_types[] = {
static const struct rayer_pinout *pinout = NULL;
static void rayer_bitbang_set_cs(int val)
static void rayer_bitbang_set_cs(int val, void *spi_data)
{
lpt_outbyte &= ~(1 << pinout->cs_bit);
lpt_outbyte |= (val << pinout->cs_bit);
OUTB(lpt_outbyte, lpt_iobase);
}
static void rayer_bitbang_set_sck(int val)
static void rayer_bitbang_set_sck(int val, void *spi_data)
{
lpt_outbyte &= ~(1 << pinout->sck_bit);
lpt_outbyte |= (val << pinout->sck_bit);
OUTB(lpt_outbyte, lpt_iobase);
}
static void rayer_bitbang_set_mosi(int val)
static void rayer_bitbang_set_mosi(int val, void *spi_data)
{
lpt_outbyte &= ~(1 << pinout->mosi_bit);
lpt_outbyte |= (val << pinout->mosi_bit);
OUTB(lpt_outbyte, lpt_iobase);
}
static int rayer_bitbang_get_miso(void)
static int rayer_bitbang_get_miso(void *spi_data)
{
uint8_t tmp;