diff options
| author | Lennert Buytenhek <buytenh@marvell.com> | 2008-11-20 03:57:36 -0800 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2008-11-20 03:57:36 -0800 |
| commit | 37a6084f4b4693a408ac2fb229843af9f9f301ce (patch) | |
| tree | f3ab879e190b9f1299c532afb73095b1ee2ed50a /net/sched/cls_basic.c | |
| parent | 10a9948d13eb51d757684da4354cf67891dc3481 (diff) | |
| download | olio-linux-3.10-37a6084f4b4693a408ac2fb229843af9f9f301ce.tar.xz olio-linux-3.10-37a6084f4b4693a408ac2fb229843af9f9f301ce.zip | |
mv643xx_eth: introduce per-port register area pointer
The mv643xx_eth driver uses the rdl()/wrl() macros to read and
write hardware registers. Per-port registers are accessed in the
following way:
#define PORT_STATUS(p) (0x0444 + ((p) << 10))
[...]
static inline u32 rdl(struct mv643xx_eth_private *mp, int offset)
{
return readl(mp->shared->base + offset);
}
[...]
port_status = rdl(mp, PORT_STATUS(mp->port_num));
By giving the per-port 'struct mv643xx_eth_private' its own
'void __iomem *base' pointer that points to the per-port register
area, we can get rid of both the double indirection and the << 10
that is done for every per-port register access -- this patch does
that.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_basic.c')
0 files changed, 0 insertions, 0 deletions