mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
ssi: Implemented CS behaviour
Added default CS behaviour for SSI slaves. SSI devices can set a property to enable CS behaviour which will create a GPIO on the device which is the CS. Tristating of the bus on SSI transfers is implemented. Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Acked-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
b4a76e84f4
commit
6653095331
9 changed files with 118 additions and 16 deletions
|
@ -197,6 +197,7 @@ static uint32_t ssi_sd_transfer(SSISlave *dev, uint32_t val)
|
|||
|
||||
static void ssi_sd_save(QEMUFile *f, void *opaque)
|
||||
{
|
||||
SSISlave *ss = SSI_SLAVE(opaque);
|
||||
ssi_sd_state *s = (ssi_sd_state *)opaque;
|
||||
int i;
|
||||
|
||||
|
@ -209,10 +210,13 @@ static void ssi_sd_save(QEMUFile *f, void *opaque)
|
|||
qemu_put_be32(f, s->arglen);
|
||||
qemu_put_be32(f, s->response_pos);
|
||||
qemu_put_be32(f, s->stopping);
|
||||
|
||||
qemu_put_be32(f, ss->cs);
|
||||
}
|
||||
|
||||
static int ssi_sd_load(QEMUFile *f, void *opaque, int version_id)
|
||||
{
|
||||
SSISlave *ss = SSI_SLAVE(opaque);
|
||||
ssi_sd_state *s = (ssi_sd_state *)opaque;
|
||||
int i;
|
||||
|
||||
|
@ -229,6 +233,8 @@ static int ssi_sd_load(QEMUFile *f, void *opaque, int version_id)
|
|||
s->response_pos = qemu_get_be32(f);
|
||||
s->stopping = qemu_get_be32(f);
|
||||
|
||||
ss->cs = qemu_get_be32(f);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue