[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support |
Date: |
Thu, 5 Apr 2012 08:18:15 +0100 |
On 5 April 2012 01:32, Peter Crosthwaite
<address@hidden> wrote:
> 3: add support for flagging sdi/sdo bits as tristated:
>
> --- a/hw/ssi.h
> +++ b/hw/ssi.h
> @@ -28,7 +28,11 @@ typedef struct SSISlaveClass {
> DeviceClass parent_class;
>
> int (*init)(SSISlave *dev);
> - uint32_t (*transfer)(SSISlave *dev, uint32_t val);
> + /* transfer data. If z if provided, *z is the tristate mask
> + * It is initially populated with tristate value for tx, and
> + * on return should be populated with tristate for rx
> + */
> + uint32_t (*transfer)(SSISlave *dev, uint32_t val, uint32_t *z);
> } SSISlaveClass;
I'm not sure what you intend the tristate masks to be used for?
If the sending device puts the line into high-impedance presumably
the receiving device is just going to read something random which
it's supposed to ignore, so the sender could just send whatever
it likes. We're not modelling multiple devices sending at once,
which is the only case I can think of where you'd need to care
which bits each device was tristating for.
-- PMM
- Re: [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support, Peter Maydell, 2012/04/02
- Re: [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support, Peter Crosthwaite, 2012/04/02
- Re: [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support, Peter Crosthwaite, 2012/04/02
- Re: [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support, Paul Brook, 2012/04/03
- Re: [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support, Peter Maydell, 2012/04/03
- Re: [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support, Paul Brook, 2012/04/03
- Re: [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support, Peter Crosthwaite, 2012/04/03
- Re: [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support, Paul Brook, 2012/04/04
- Re: [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support, Peter Crosthwaite, 2012/04/04
- Re: [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support,
Peter Maydell <=
- Re: [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support, Peter Crosthwaite, 2012/04/06
Re: [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support, Peter Crosthwaite, 2012/04/02