From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [i2c-mxs] Broken DMA operations from within a module Date: Wed, 13 Feb 2013 12:14:50 +0000 Message-ID: <20130213121450.GA17833@n2100.arm.linux.org.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Enrico Scholz Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Wolfram Sang List-Id: linux-i2c@vger.kernel.org On Wed, Feb 13, 2013 at 01:00:50PM +0100, Enrico Scholz wrote: > E.g. when doing something like > > struct i2c_msg xfer = { > .buf = "something", > ... > }; > > ret = i2c_transfer(client->adapter, &xfer, 1); > > random data will be sent because buf is not DMA mapable ("something" is > located in the .strtab section within module memory). MXS has a memory > layout like DMA buffers must be located in lowmem *always*. This means placing them in the .data segment does not work. USB has been through this already and it's well known there...