[Top] [All Lists]

Re: Dma addr should use Kuseg1 for MIPS32?

To: Sergei Shtylyov <>
Subject: Re: Dma addr should use Kuseg1 for MIPS32?
From: figo zhang <>
Date: Wed, 9 Dec 2009 19:46:15 +0800
Cc: Ralf Baechle <>, David Daney <>,,
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=+IR+/hVZIXeyFUMO03UeX32rKxjo6HV2C49LJRRasVk=; b=kW/5M4bzvwioukJRvFId+g+/zJ/4OcnG8+dG3Mnew5rZTDY9NWtQoFcWpNSMvQdL4w MebUkNyw9L4jIdHUSHPQacHP0GD9d6QpmLKrlgW20dtKXLUFe2wyFx1qb48y/Yoc6qpm I60YY/wmZHV96k+S+PJwBRWDOBKzfq19+CYA0=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Ywfpu1+uqSA0MXucSvMavWrL8TeOmXsqOyxITZOd5jjV7ncn4ehhs6tEwYgYpxjFsA jmbe1+rednUBRcrPLNGc32+2efGOLchD/PdraeNH2iTvhDuqRIXIr7qSz3wS/afizIFR K+aN9YhMZ+gxj/2AUDR69iyu67MCINumGUvYU=
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <>

2009/12/8 Sergei Shtylyov <>

figo zhang wrote:

   > i write dma_phy to DMA base register, but why it cannot work? it
   > write Kseg1 space to DMA register?
   > I remember that it is ok for ARM/X86 .

   It's only happens to work on some systems.

in my puzzle, if i run dma_vaddr =(char*) __get_free_pages(GFP_KERNEL,  order);
dma_phy = virt_to_phy(dma_vaddr);

if the result is:
dma_vaddr = 0x801b00000;
dma_phy = 0x1b00000;

so i should write 0x1b00000 to my DMA Base register or wirte (0x1b000000 | 0xa0000000) to DMA?

 You must always use the physical addresses when programming DMA, i.e. 0x1b00000 in this case.

I  write  0x1b00000 to my DMA Base register, the driver donot work.  write (0x1b00000 | 0xa000000) it work, why?

WBR, Sergei

<Prev in Thread] Current Thread [Next in Thread>