| To: | Ralf Baechle <ralf@linux-mips.org> |
|---|---|
| Subject: | Re: Dma addr should use Kuseg1 for MIPS32? |
| From: | figo zhang <figo1802@gmail.com> |
| Date: | Tue, 8 Dec 2009 09:49:34 +0800 |
| Cc: | David Daney <ddaney@caviumnetworks.com>, macro@linux-mips.org, linux-mips@linux-mips.org |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=XKXWg8dmOQz/aFW9Ia6RDliGwEBycBvJXX6uUmncVqQ=; b=lBbTdrLUPJW/AzOiMVAeoEZQBMm6ItIcXodLYtDjDzfuEK6orXwAar0ZdzNelYxK8f c/WN/tjn5U36H5TunUeN5ERums/usggcebXkov7xi1NQk6ramvQ/Wamxs0qD9EBjJGaT FjoRUlTXBocEFUrGqP1s9pmG/+plc3ct01jT8= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=vlOkVJXlpNONdLvfrMF6nNykCAZgbwMRZIupv3l09Jyp2C4VciOUUwJbf35BWaEPq8 ySCm9cSk5CljVB+qJNOU+rn7X50L407QJ0YaiyoZpI2mlsO8JhnWujTDWQg5Dapw9oIl 8aTIzmbO/oG4FMqv/9mFNvigY6E6eUoXqvrco= |
| In-reply-to: | <20091207134502.GB5119@linux-mips.org> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <c6ed1ac50912070455n736af31fuf2c981fc182b494f@mail.gmail.com> <20091207134502.GB5119@linux-mips.org> |
| Sender: | linux-mips-bounce@linux-mips.org |
|
2009/12/7 Ralf Baechle <ralf@linux-mips.org>
hi Ralf, is it using dma_alloc_coherent()? i see the this funtion in arch/mips/mm/dma_default.c, it also invork the __get_free_pages() and return the dma_addr by plat_map_dma_mem()->virt_to_phy() , see include/asm-mips/mach-genric/dma-coherent.h. so i think, i see use __get_free_pages() alloce buffer for DMA.
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? 2. If my system have HIGHMEM, so i alloc highmem pages by : page = alloc_pages(__GFP_HIGHMEM, order); phy = page_to_phys(page); how i write this highmem phy addr to DMA base register? Best, Figo.zhang
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Warning about add_wired_entry, pascal@pabr.org |
|---|---|
| Next by Date: | Re: [PATCH v8 5/8] Loongson: YeeLoong: add hardware monitoring driver, Wu Zhangjin |
| Previous by Thread: | Re: Dma addr should use Kuseg1 for MIPS32?, Ralf Baechle |
| Next by Thread: | Re: Dma addr should use Kuseg1 for MIPS32?, Sergei Shtylyov |
| Indexes: | [Date] [Thread] [Top] [All Lists] |