qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] MIPS: DMA support for RC4030 chipset [v4]
@ 2008-12-27 18:09 Hervé Poussineau
  2008-12-30  0:30 ` Aurelien Jarno
  0 siblings, 1 reply; 2+ messages in thread
From: Hervé Poussineau @ 2008-12-27 18:09 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

Hi,

Attached patch implements DMA support to RC4030 chipset and simplifies 
jazz IO part (at 0xf0000000), where registers contain 16 bit values.
The patch also wires DMA transfers for the SCSI adapter in the Jazz 
emulation (Mips Magnum 4000 and Acer Pica 61).

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>

Changes since v1:
- Support reuse of esp callback functions up to DMA engine
- Don't keep in memory the DMA table, but read it when needed

Changes since v2:
- Don't use cpu_single_env in the DMA transfer function, as it is NULL 
in the aio path
- Multiple improvements to the DMA transfer function: report errors to 
the caller, support for non contiguous physical pages...

Changes since v3:
- Mask out higher bits of DMA translation table address

Hervé

[-- Attachment #2: rc4030_dma_v4.diff --]
[-- Type: plain/text, Size: 18065 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] MIPS: DMA support for RC4030 chipset [v4]
  2008-12-27 18:09 [Qemu-devel] [PATCH] MIPS: DMA support for RC4030 chipset [v4] Hervé Poussineau
@ 2008-12-30  0:30 ` Aurelien Jarno
  0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Jarno @ 2008-12-30  0:30 UTC (permalink / raw)
  To: Hervé Poussineau; +Cc: qemu-devel

On Sat, Dec 27, 2008 at 07:09:18PM +0100, Hervé Poussineau wrote:
> Hi,
>
> Attached patch implements DMA support to RC4030 chipset and simplifies  
> jazz IO part (at 0xf0000000), where registers contain 16 bit values.
> The patch also wires DMA transfers for the SCSI adapter in the Jazz  
> emulation (Mips Magnum 4000 and Acer Pica 61).
>
> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
>
> Changes since v1:
> - Support reuse of esp callback functions up to DMA engine
> - Don't keep in memory the DMA table, but read it when needed
>
> Changes since v2:
> - Don't use cpu_single_env in the DMA transfer function, as it is NULL  
> in the aio path
> - Multiple improvements to the DMA transfer function: report errors to  
> the caller, support for non contiguous physical pages...
>
> Changes since v3:
> - Mask out higher bits of DMA translation table address
>

This patches introduces some new warnings:
/home/aurel32/git/qemu/hw/rc4030.c: In function ‘rc4030_readl’:
/home/aurel32/git/qemu/hw/rc4030.c:227: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 4 has type ‘target_phys_addr_t’
/home/aurel32/git/qemu/hw/rc4030.c: In function ‘rc4030_writel’:
/home/aurel32/git/qemu/hw/rc4030.c:374: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 5 has type ‘target_phys_addr_t’
/home/aurel32/git/qemu/hw/rc4030.c: In function ‘jazzio_readw’:
/home/aurel32/git/qemu/hw/rc4030.c:501: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 4 has type ‘target_phys_addr_t’
/home/aurel32/git/qemu/hw/rc4030.c: In function ‘jazzio_writew’:
/home/aurel32/git/qemu/hw/rc4030.c:539: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 5 has type ‘target_phys_addr_t’

Also, please include a Signed-off.

[snip]

> +    jazzio_writeb,
> +    jazzio_writew,
> +    jazzio_writel,
>  };
>  
> -#define G364_512KB_RAM (0x0)
> -#define G364_2MB_RAM   (0x1)
> -#define G364_8MB_RAM   (0x2)
> -#define G364_32MB_RAM  (0x3)
> -
>  static void rc4030_reset(void *opaque)
>  {
>      rc4030State *s = opaque;
>      int i;
>  
> -    s->config = (G364_2MB_RAM << 8) | 0x04;
> +    s->config = 0x410;

Why this change? This make the resulting code less readable.

>      s->invalid_address_register = 0;
>  
>      memset(s->dma_regs, 0, sizeof(s->dma_regs));
> @@ -569,7 +589,6 @@
>      s->cache_ptag = s->cache_ltag = 0;
>      s->cache_bmask = s->cache_bwin = 0;
>  
 
-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-30  1:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-27 18:09 [Qemu-devel] [PATCH] MIPS: DMA support for RC4030 chipset [v4] Hervé Poussineau
2008-12-30  0:30 ` Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).