diff options
author | Nicolas Pitre <nico@cam.org> | 2005-06-29 13:10:54 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-06-29 13:10:54 -0400 |
commit | c7e788766610bdc764d7150e69ace2e0c4196cf0 (patch) | |
tree | f2b0012a9677206b4662cf7c17a3ffa8ebc8c75d /drivers/net/arm | |
parent | aaaa3f9e51245be3215ff67bb3c7aaf5abb82f00 (diff) |
[PATCH] ARM: 2723/2: remove __udivdi3 and __umoddi3 from the kernel
Patch from Nicolas Pitre
Those are big, slow and generally not recommended for kernel code.
They are even not present on i386. So it should be concluded that
one could as well get away with do_div() alone.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/net/arm')
-rw-r--r-- | drivers/net/arm/etherh.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/arm/etherh.c b/drivers/net/arm/etherh.c index 2e28c201dcc0..942a2819576c 100644 --- a/drivers/net/arm/etherh.c +++ b/drivers/net/arm/etherh.c | |||
@@ -68,7 +68,6 @@ struct etherh_priv { | |||
68 | void __iomem *dma_base; | 68 | void __iomem *dma_base; |
69 | unsigned int id; | 69 | unsigned int id; |
70 | void __iomem *ctrl_port; | 70 | void __iomem *ctrl_port; |
71 | void __iomem *base; | ||
72 | unsigned char ctrl; | 71 | unsigned char ctrl; |
73 | u32 supported; | 72 | u32 supported; |
74 | }; | 73 | }; |
@@ -178,7 +177,7 @@ etherh_setif(struct net_device *dev) | |||
178 | switch (etherh_priv(dev)->id) { | 177 | switch (etherh_priv(dev)->id) { |
179 | case PROD_I3_ETHERLAN600: | 178 | case PROD_I3_ETHERLAN600: |
180 | case PROD_I3_ETHERLAN600A: | 179 | case PROD_I3_ETHERLAN600A: |
181 | addr = etherh_priv(dev)->base + EN0_RCNTHI; | 180 | addr = (void *)dev->base_addr + EN0_RCNTHI; |
182 | 181 | ||
183 | switch (dev->if_port) { | 182 | switch (dev->if_port) { |
184 | case IF_PORT_10BASE2: | 183 | case IF_PORT_10BASE2: |
@@ -219,7 +218,7 @@ etherh_getifstat(struct net_device *dev) | |||
219 | switch (etherh_priv(dev)->id) { | 218 | switch (etherh_priv(dev)->id) { |
220 | case PROD_I3_ETHERLAN600: | 219 | case PROD_I3_ETHERLAN600: |
221 | case PROD_I3_ETHERLAN600A: | 220 | case PROD_I3_ETHERLAN600A: |
222 | addr = etherh_priv(dev)->base + EN0_RCNTHI; | 221 | addr = (void *)dev->base_addr + EN0_RCNTHI; |
223 | switch (dev->if_port) { | 222 | switch (dev->if_port) { |
224 | case IF_PORT_10BASE2: | 223 | case IF_PORT_10BASE2: |
225 | stat = 1; | 224 | stat = 1; |
@@ -282,7 +281,7 @@ static void | |||
282 | etherh_reset(struct net_device *dev) | 281 | etherh_reset(struct net_device *dev) |
283 | { | 282 | { |
284 | struct ei_device *ei_local = netdev_priv(dev); | 283 | struct ei_device *ei_local = netdev_priv(dev); |
285 | void __iomem *addr = etherh_priv(dev)->base; | 284 | void __iomem *addr = (void *)dev->base_addr; |
286 | 285 | ||
287 | writeb(E8390_NODMA+E8390_PAGE0+E8390_STOP, addr); | 286 | writeb(E8390_NODMA+E8390_PAGE0+E8390_STOP, addr); |
288 | 287 | ||
@@ -328,7 +327,7 @@ etherh_block_output (struct net_device *dev, int count, const unsigned char *buf | |||
328 | 327 | ||
329 | ei_local->dmaing = 1; | 328 | ei_local->dmaing = 1; |
330 | 329 | ||
331 | addr = etherh_priv(dev)->base; | 330 | addr = (void *)dev->base_addr; |
332 | dma_base = etherh_priv(dev)->dma_base; | 331 | dma_base = etherh_priv(dev)->dma_base; |
333 | 332 | ||
334 | count = (count + 1) & ~1; | 333 | count = (count + 1) & ~1; |
@@ -388,7 +387,7 @@ etherh_block_input (struct net_device *dev, int count, struct sk_buff *skb, int | |||
388 | 387 | ||
389 | ei_local->dmaing = 1; | 388 | ei_local->dmaing = 1; |
390 | 389 | ||
391 | addr = etherh_priv(dev)->base; | 390 | addr = (void *)dev->base_addr; |
392 | dma_base = etherh_priv(dev)->dma_base; | 391 | dma_base = etherh_priv(dev)->dma_base; |
393 | 392 | ||
394 | buf = skb->data; | 393 | buf = skb->data; |
@@ -428,7 +427,7 @@ etherh_get_header (struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_p | |||
428 | 427 | ||
429 | ei_local->dmaing = 1; | 428 | ei_local->dmaing = 1; |
430 | 429 | ||
431 | addr = etherh_priv(dev)->base; | 430 | addr = (void *)dev->base_addr; |
432 | dma_base = etherh_priv(dev)->dma_base; | 431 | dma_base = etherh_priv(dev)->dma_base; |
433 | 432 | ||
434 | writeb (E8390_NODMA | E8390_PAGE0 | E8390_START, addr + E8390_CMD); | 433 | writeb (E8390_NODMA | E8390_PAGE0 | E8390_START, addr + E8390_CMD); |
@@ -697,8 +696,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
697 | eh->ctrl_port = eh->ioc_fast; | 696 | eh->ctrl_port = eh->ioc_fast; |
698 | } | 697 | } |
699 | 698 | ||
700 | eh->base = eh->memc + data->ns8390_offset; | 699 | dev->base_addr = (unsigned long)eh->memc + data->ns8390_offset; |
701 | dev->base_addr = (unsigned long)eh->base; | ||
702 | eh->dma_base = eh->memc + data->dataport_offset; | 700 | eh->dma_base = eh->memc + data->dataport_offset; |
703 | eh->ctrl_port += data->ctrlport_offset; | 701 | eh->ctrl_port += data->ctrlport_offset; |
704 | 702 | ||