Angel Pons has uploaded this change for review.

View Change

rayer_spi.c: Implement `set_sck_set_mosi` operation

Change-Id: Ieb05a35967685c2444d064cb61cec98e2a00f590
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
---
M rayer_spi.c
1 file changed, 10 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/65/49265/1
diff --git a/rayer_spi.c b/rayer_spi.c
index 8e869e6..8c7f53e 100644
--- a/rayer_spi.c
+++ b/rayer_spi.c
@@ -147,6 +147,15 @@
OUTB(lpt_outbyte, lpt_iobase);
}

+static void rayer_bitbang_set_sck_set_mosi(int sck, int mosi)
+{
+ lpt_outbyte &= ~(1 << pinout->sck_bit);
+ lpt_outbyte &= ~(1 << pinout->mosi_bit);
+ lpt_outbyte |= (sck << pinout->sck_bit);
+ lpt_outbyte |= (mosi << pinout->mosi_bit);
+ OUTB(lpt_outbyte, lpt_iobase);
+}
+
static int rayer_bitbang_get_miso(void)
{
uint8_t tmp;
@@ -160,6 +169,7 @@
.set_cs = rayer_bitbang_set_cs,
.set_sck = rayer_bitbang_set_sck,
.set_mosi = rayer_bitbang_set_mosi,
+ .set_sck_set_mosi = rayer_bitbang_set_sck_set_mosi,
.get_miso = rayer_bitbang_get_miso,
.half_period = 0,
};

To view, visit change 49265. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ieb05a35967685c2444d064cb61cec98e2a00f590
Gerrit-Change-Number: 49265
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus@gmail.com>
Gerrit-MessageType: newchange