Subject: Re: [PATCH net-next-2.6 1/2] can: add driver for Softing card

From: Marc Kleine-Budde <[email-masked]>
Date: Tue, 04 Jan 2011 11:54:42 +0100

On 01/03/2011 06:33 PM, David Miller wrote:
> From: Kurt Van Dijck <kurt.van.dijck-/[email-masked]>
> Date: Mon, 3 Jan 2011 17:38:35 +0100
> 
>> 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 ....
> 
> Yes, this is what you'll need to do.

There's ioread() and get_unaligned(). Do we have a combination of this?

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

_______________________________________________
Socketcan-core mailing list
[email-masked]
https://lists.berlios.de/mailman/listinfo/socketcan-core