lkml.org 
[lkml]   [2006]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 3/3] Add tsi108 On Chip Ethernet device driver support
Zang Roy-r61911 wrote:
> +#define TSI108_ETH_WRITE_REG(offset, val) \
> + writel(le32_to_cpu(val),data->regs + (offset))
> +
> +#define TSI108_ETH_READ_REG(offset) \
> + le32_to_cpu(readl(data->regs + (offset)))
> +
> +#define TSI108_ETH_WRITE_PHYREG(offset, val) \
> + writel(le32_to_cpu(val), data->phyregs + (offset))
> +
> +#define TSI108_ETH_READ_PHYREG(offset) \
> + le32_to_cpu(readl(data->phyregs + (offset)))


NAK:

1) writel() and readl() are defined to be little endian.

If your platform is different, then your platform should have its own
foobus_writel() and foobus_readl().

2) TSI108_ETH_WRITE_REG() is just way too long. TSI_READ(),
TSI_WRITE(), TSI_READ_PHY() and TSI_WRITE_PHY() would be far more readable.

More in next email.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-09-21 06:29    [W:0.204 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site