aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/stmmac/dwmac100_core.c
diff options
context:
space:
mode:
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>2010-08-23 16:40:42 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-25 19:30:51 -0400
commitad01b7d480a4a135f974afd5c617c417e0b0542f (patch)
treebd69865fb4bb323e697d46c8b0365ec1774a9696 /drivers/net/stmmac/dwmac100_core.c
parentac75791aa943c7953521cb4fa7728bf51f9abd2d (diff)
stmmac: make ioaddr 'void __iomem *' rather than unsigned long
This avoids unnecessary casting and adds the ioaddr in the private structure. This patch also removes many warning when compile the driver. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/stmmac/dwmac100_core.c')
-rw-r--r--drivers/net/stmmac/dwmac100_core.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/stmmac/dwmac100_core.c b/drivers/net/stmmac/dwmac100_core.c
index 2fb165fa2ba0..135a8082816e 100644
--- a/drivers/net/stmmac/dwmac100_core.c
+++ b/drivers/net/stmmac/dwmac100_core.c
@@ -31,7 +31,7 @@
31#include <linux/crc32.h> 31#include <linux/crc32.h>
32#include "dwmac100.h" 32#include "dwmac100.h"
33 33
34static void dwmac100_core_init(unsigned long ioaddr) 34static void dwmac100_core_init(void __iomem *ioaddr)
35{ 35{
36 u32 value = readl(ioaddr + MAC_CONTROL); 36 u32 value = readl(ioaddr + MAC_CONTROL);
37 37
@@ -42,12 +42,12 @@ static void dwmac100_core_init(unsigned long ioaddr)
42#endif 42#endif
43} 43}
44 44
45static void dwmac100_dump_mac_regs(unsigned long ioaddr) 45static void dwmac100_dump_mac_regs(void __iomem *ioaddr)
46{ 46{
47 pr_info("\t----------------------------------------------\n" 47 pr_info("\t----------------------------------------------\n"
48 "\t DWMAC 100 CSR (base addr = 0x%8x)\n" 48 "\t DWMAC 100 CSR (base addr = 0x%8x)\n"
49 "\t----------------------------------------------\n", 49 "\t----------------------------------------------\n",
50 (unsigned int)ioaddr); 50 (unsigned int) ioaddr);
51 pr_info("\tcontrol reg (offset 0x%x): 0x%08x\n", MAC_CONTROL, 51 pr_info("\tcontrol reg (offset 0x%x): 0x%08x\n", MAC_CONTROL,
52 readl(ioaddr + MAC_CONTROL)); 52 readl(ioaddr + MAC_CONTROL));
53 pr_info("\taddr HI (offset 0x%x): 0x%08x\n ", MAC_ADDR_HIGH, 53 pr_info("\taddr HI (offset 0x%x): 0x%08x\n ", MAC_ADDR_HIGH,
@@ -77,18 +77,18 @@ static void dwmac100_dump_mac_regs(unsigned long ioaddr)
77 MMC_LOW_INTR_MASK, readl(ioaddr + MMC_LOW_INTR_MASK)); 77 MMC_LOW_INTR_MASK, readl(ioaddr + MMC_LOW_INTR_MASK));
78} 78}
79 79
80static void dwmac100_irq_status(unsigned long ioaddr) 80static void dwmac100_irq_status(void __iomem *ioaddr)
81{ 81{
82 return; 82 return;
83} 83}
84 84
85static void dwmac100_set_umac_addr(unsigned long ioaddr, unsigned char *addr, 85static void dwmac100_set_umac_addr(void __iomem *ioaddr, unsigned char *addr,
86 unsigned int reg_n) 86 unsigned int reg_n)
87{ 87{
88 stmmac_set_mac_addr(ioaddr, addr, MAC_ADDR_HIGH, MAC_ADDR_LOW); 88 stmmac_set_mac_addr(ioaddr, addr, MAC_ADDR_HIGH, MAC_ADDR_LOW);
89} 89}
90 90
91static void dwmac100_get_umac_addr(unsigned long ioaddr, unsigned char *addr, 91static void dwmac100_get_umac_addr(void __iomem *ioaddr, unsigned char *addr,
92 unsigned int reg_n) 92 unsigned int reg_n)
93{ 93{
94 stmmac_get_mac_addr(ioaddr, addr, MAC_ADDR_HIGH, MAC_ADDR_LOW); 94 stmmac_get_mac_addr(ioaddr, addr, MAC_ADDR_HIGH, MAC_ADDR_LOW);
@@ -96,7 +96,7 @@ static void dwmac100_get_umac_addr(unsigned long ioaddr, unsigned char *addr,
96 96
97static void dwmac100_set_filter(struct net_device *dev) 97static void dwmac100_set_filter(struct net_device *dev)
98{ 98{
99 unsigned long ioaddr = dev->base_addr; 99 void __iomem *ioaddr = (void __iomem *) dev->base_addr;
100 u32 value = readl(ioaddr + MAC_CONTROL); 100 u32 value = readl(ioaddr + MAC_CONTROL);
101 101
102 if (dev->flags & IFF_PROMISC) { 102 if (dev->flags & IFF_PROMISC) {
@@ -145,7 +145,7 @@ static void dwmac100_set_filter(struct net_device *dev)
145 readl(ioaddr + MAC_HASH_HIGH), readl(ioaddr + MAC_HASH_LOW)); 145 readl(ioaddr + MAC_HASH_HIGH), readl(ioaddr + MAC_HASH_LOW));
146} 146}
147 147
148static void dwmac100_flow_ctrl(unsigned long ioaddr, unsigned int duplex, 148static void dwmac100_flow_ctrl(void __iomem *ioaddr, unsigned int duplex,
149 unsigned int fc, unsigned int pause_time) 149 unsigned int fc, unsigned int pause_time)
150{ 150{
151 unsigned int flow = MAC_FLOW_CTRL_ENABLE; 151 unsigned int flow = MAC_FLOW_CTRL_ENABLE;
@@ -158,7 +158,7 @@ static void dwmac100_flow_ctrl(unsigned long ioaddr, unsigned int duplex,
158/* No PMT module supported for this Ethernet Controller. 158/* No PMT module supported for this Ethernet Controller.
159 * Tested on ST platforms only. 159 * Tested on ST platforms only.
160 */ 160 */
161static void dwmac100_pmt(unsigned long ioaddr, unsigned long mode) 161static void dwmac100_pmt(void __iomem *ioaddr, unsigned long mode)
162{ 162{
163 return; 163 return;
164} 164}
@@ -174,7 +174,7 @@ struct stmmac_ops dwmac100_ops = {
174 .get_umac_addr = dwmac100_get_umac_addr, 174 .get_umac_addr = dwmac100_get_umac_addr,
175}; 175};
176 176
177struct mac_device_info *dwmac100_setup(unsigned long ioaddr) 177struct mac_device_info *dwmac100_setup(void __iomem *ioaddr)
178{ 178{
179 struct mac_device_info *mac; 179 struct mac_device_info *mac;
180 180