Re: [Qemu-devel] [PATCH v6 1/4] hw: introduce standard SD host controller

2012-08-10 Thread Peter Crosthwaite
Ping! Any further thoughts here? There seem to be a few minor correction for PPM, but the sore-thumb issue is the long/infinite ADMA. Is there an (easy) AIO based solution to be had or do we need to do some sort of ptimer hack? Regards, Peter On Tue, Aug 7, 2012 at 4:31 PM, Peter Crosthwaite w

Re: [Qemu-devel] [PATCH v6 1/4] hw: introduce standard SD host controller

2012-08-06 Thread Peter Crosthwaite
>>> +sdhci_update_irq(s); >>> +break; >>> +} >>> +} >>> +} >> >> So I think the guest can make this loop never terminate if it sets up >> a loop of ACT_LINK descriptors, right? I don't know how we should >> handle this but I'm pretty sure "make qemu sit there for

Re: [Qemu-devel] [PATCH v6 1/4] hw: introduce standard SD host controller

2012-08-06 Thread Igor Mitsyanko
Recently I've noticed that drive_get_next() usage is not very convenient if you want to use specific SD controller interface. Maybe we should switch from drive_get_next() to DEFINE_PROP_DRIVE()? It'll still preserve "-sd .." behaviour. What do you think Peter?

Re: [Qemu-devel] [PATCH v6 1/4] hw: introduce standard SD host controller

2012-08-06 Thread Igor Mitsyanko
On 08/06/2012 03:15 PM, Peter Maydell wrote: On 6 August 2012 04:25, Peter A. G. Crosthwaite wrote: From: Igor Mitsyanko Device model for standard SD Host Controller Interface (SDHCI) compliant with version 2.00 of SD association specification. +typedef struct ADMADescr { +target_phys_add

Re: [Qemu-devel] [PATCH v6 1/4] hw: introduce standard SD host controller

2012-08-06 Thread Peter Maydell
On 6 August 2012 12:28, Igor Mitsyanko wrote: > On 08/06/2012 02:30 PM, Peter Maydell wrote: >>> +static void get_adma_description(SDHCIState *s, ADMADescr *dscr) >>> +{ >>> +uint32_t adma1 = 0; >>> +uint64_t adma2 = 0; >>> +target_phys_addr_t entry_addr = (target_phys_addr_t)s->admasy

Re: [Qemu-devel] [PATCH v6 1/4] hw: introduce standard SD host controller

2012-08-06 Thread Igor Mitsyanko
On 08/06/2012 02:30 PM, Peter Maydell wrote: On 6 August 2012 04:25, Peter A. G. Crosthwaite wrote: +static void sdhci_sdma_transfer_multi_blocks(SDHCIState *s) +{ +bool page_aligned = false; +unsigned int n, begin; +const uint16_t block_size = s->blksize & 0x0fff; +uint32_t bo

Re: [Qemu-devel] [PATCH v6 1/4] hw: introduce standard SD host controller

2012-08-06 Thread Peter Maydell
On 6 August 2012 04:25, Peter A. G. Crosthwaite wrote: > From: Igor Mitsyanko > > Device model for standard SD Host Controller Interface (SDHCI) compliant with > version 2.00 of SD association specification. > +typedef struct ADMADescr { > +target_phys_addr_t addr; > +uint16_t length; >

Re: [Qemu-devel] [PATCH v6 1/4] hw: introduce standard SD host controller

2012-08-06 Thread Peter Maydell
On 6 August 2012 04:25, Peter A. G. Crosthwaite wrote: > +static void sdhci_sdma_transfer_multi_blocks(SDHCIState *s) > +{ > +bool page_aligned = false; > +unsigned int n, begin; > +const uint16_t block_size = s->blksize & 0x0fff; > +uint32_t boundary_chk = 1 << (((s->blksize & 0x