From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762993AbYEUJAu (ORCPT ); Wed, 21 May 2008 05:00:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754334AbYEUJAn (ORCPT ); Wed, 21 May 2008 05:00:43 -0400 Received: from mail161.messagelabs.com ([216.82.253.115]:58969 "EHLO mail161.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754112AbYEUJAl (ORCPT ); Wed, 21 May 2008 05:00:41 -0400 X-VirusChecked: Checked X-Env-Sender: Uwe.Kleine-Koenig@digi.com X-Msg-Ref: server-3.tower-161.messagelabs.com!1211360433!7930658!4 X-StarScan-Version: 5.5.12.14.2; banners=-,-,- X-Originating-IP: [66.77.174.14] Date: Wed, 21 May 2008 10:50:33 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Magnus Damm CC: Paul Mundt , "Hans J. Koch" , , , , Katsuya MATSUBARA Subject: Re: [PATCH 00/03][RFC] Reusable UIO Platform Driver Message-ID: <20080521085033.GA29607@digi.com> References: <20080520105132.1474.73941.sendpatchset@rx1.opensource.se> <20080520210713.GE3220@local> <20080521064938.GA11580@digi.com> <20080521074950.GA27310@linux-sh.org> <20080521080503.GA28751@digi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-OriginalArrivalTime: 21 May 2008 08:50:33.0990 (UTC) FILETIME=[BB3EE260:01C8BB1F] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Magnus Damm wrote: > On Wed, May 21, 2008 at 5:05 PM, Uwe Kleine-König > wrote: > > @Magnus: Maybe you can provide the userspace part of the driver? > > How is that mapping used there? > > [Added Matsubara-san as CC] > > Sure, here is a little test program. Have a look at "uio_mem". The > "address" member contains the physical address that can be used for > bus mastering DMA. Compare that to "iomem" which is the pointer to the > virtual memory area in user space. > > Hope this helps! Yes it does. I thought the physical address is stored in internal_addr and the virtual in addr, but it's the other way round. Thanks. Best regards Uwe -- Uwe Kleine-König, Software Engineer Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962