From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kurt Van Dijck Subject: Re: [PATCH net-next-2.6 1/2] can: add driver for Softing card Date: Mon, 3 Jan 2011 17:38:35 +0100 Message-ID: <20110103163835.GD320@e-circ.dyndns.org> References: <20101223093627.GA325@e-circ.dyndns.org> <20101223094302.GB325@e-circ.dyndns.org> <4D135BC3.6070707@pengutronix.de> <20101224091428.GA375@e-circ.dyndns.org> <4D148788.3010808@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Marc Kleine-Budde Return-path: Content-Disposition: inline In-Reply-To: <4D148788.3010808-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: socketcan-core-bounces-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org Errors-To: socketcan-core-bounces-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org List-Id: netdev.vger.kernel.org On Fri, Dec 24, 2010 at 12:44:08PM +0100, Marc Kleine-Budde wrote: > > >> hmmm..all stuff behind dpram is __iomem, isn't it? I think it should > >> only be accessed with via the ioread/iowrite operators. Please check > > I did an ioremap_nocache. Since it is unaligned, ioread/iowrite would render > > a lot of statements. > > The thing is, ioremapped mem should not be accessed directly. Instead > ioread/iowrite should be used. The softing driver should work on non x86 > platforms, too. > I use __attribute__((packed)) structs to refer to the iomemory. To read an unaligned uint16_t, is should then use 2 readb()'s ?? I could of course turn that sequence into a macro .... Kurt