Hi Robin,
On 08/04/2011 03:49 PM, Robin Holt wrote:
> +#ifdef CONFIG_FLEXCAN_OF
I think we should check for the endianess of the system, arm vs. ppc.
Not sure if #ifdefs are acceptable at all. Many CONFIG_OFs have been
removed in recent versions of the kernel. I think a mixture of platform
and of-platform is possible (even if it does make little sense to me).
> +static inline u32 flexcan_read(unsigned __iomem *addr)
> +{
> + return in_be32(addr);
> +}
> +
> +static inline void flexcan_write(u32 val, unsigned __iomem *addr)
> +{
> + out_be32(addr, val);
> +}
> +#else
> +static inline u32 flexcan_read(unsigned __iomem *addr)
> +{
> + return readl(addr);
> +}
> +
> +static inline void flexcan_write(u32 val, unsigned __iomem *addr)
> +{
> + writel(val, addr);
> +}
> +#endif
But in principle we need something like that.
Wolfgang.
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users