From mboxrd@z Thu Jan 1 00:00:00 1970 From: Enrico Scholz Subject: Re: [i2c-mxs] Broken DMA operations from within a module Date: Wed, 13 Feb 2013 13:28:41 +0100 Message-ID: References: <20130213121450.GA17833@n2100.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <20130213121450.GA17833-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org> (Russell King's message of "Wed, 13 Feb 2013 12:14:50 +0000") Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Russell King - ARM Linux Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Wolfram Sang List-Id: linux-i2c@vger.kernel.org Russell King - ARM Linux writes: >> .buf = "something", >> ... >> 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... Yes; I know about USB and this requirement is explicitly mentioned in the 'struct urb' documentation. But I can not find something similar for i2c_msg and lot of i2c drivers are working with non DMA mapable buffers. Enrico