Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
0d82618a
Commit
0d82618a
authored
Sep 16, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SUNBMAC]: Fix iomem warnings.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
115d2098
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
24 deletions
+24
-24
drivers/net/sunbmac.c
drivers/net/sunbmac.c
+20
-20
drivers/net/sunbmac.h
drivers/net/sunbmac.h
+4
-4
No files found.
drivers/net/sunbmac.c
View file @
0d82618a
...
@@ -68,7 +68,7 @@ static struct bigmac *root_bigmac_dev;
...
@@ -68,7 +68,7 @@ static struct bigmac *root_bigmac_dev;
#define QEC_RESET_TRIES 200
#define QEC_RESET_TRIES 200
static
int
qec_global_reset
(
unsigned
long
gregs
)
static
int
qec_global_reset
(
void
__iomem
*
gregs
)
{
{
int
tries
=
QEC_RESET_TRIES
;
int
tries
=
QEC_RESET_TRIES
;
...
@@ -88,7 +88,7 @@ static int qec_global_reset(unsigned long gregs)
...
@@ -88,7 +88,7 @@ static int qec_global_reset(unsigned long gregs)
static
void
qec_init
(
struct
bigmac
*
bp
)
static
void
qec_init
(
struct
bigmac
*
bp
)
{
{
unsigned
long
gregs
=
bp
->
gregs
;
void
__iomem
*
gregs
=
bp
->
gregs
;
struct
sbus_dev
*
qec_sdev
=
bp
->
qec_sdev
;
struct
sbus_dev
*
qec_sdev
=
bp
->
qec_sdev
;
u8
bsizes
=
bp
->
bigmac_bursts
;
u8
bsizes
=
bp
->
bigmac_bursts
;
u32
regval
;
u32
regval
;
...
@@ -117,7 +117,7 @@ static void qec_init(struct bigmac *bp)
...
@@ -117,7 +117,7 @@ static void qec_init(struct bigmac *bp)
#define TX_RESET_TRIES 32
#define TX_RESET_TRIES 32
#define RX_RESET_TRIES 32
#define RX_RESET_TRIES 32
static
void
bigmac_tx_reset
(
unsigned
long
bregs
)
static
void
bigmac_tx_reset
(
void
__iomem
*
bregs
)
{
{
int
tries
=
TX_RESET_TRIES
;
int
tries
=
TX_RESET_TRIES
;
...
@@ -137,7 +137,7 @@ static void bigmac_tx_reset(unsigned long bregs)
...
@@ -137,7 +137,7 @@ static void bigmac_tx_reset(unsigned long bregs)
}
}
}
}
static
void
bigmac_rx_reset
(
unsigned
long
bregs
)
static
void
bigmac_rx_reset
(
void
__iomem
*
bregs
)
{
{
int
tries
=
RX_RESET_TRIES
;
int
tries
=
RX_RESET_TRIES
;
...
@@ -159,7 +159,7 @@ static void bigmac_stop(struct bigmac *bp)
...
@@ -159,7 +159,7 @@ static void bigmac_stop(struct bigmac *bp)
bigmac_rx_reset
(
bp
->
bregs
);
bigmac_rx_reset
(
bp
->
bregs
);
}
}
static
void
bigmac_get_counters
(
struct
bigmac
*
bp
,
unsigned
long
bregs
)
static
void
bigmac_get_counters
(
struct
bigmac
*
bp
,
void
__iomem
*
bregs
)
{
{
struct
net_device_stats
*
stats
=
&
bp
->
enet_stats
;
struct
net_device_stats
*
stats
=
&
bp
->
enet_stats
;
...
@@ -244,7 +244,7 @@ static void bigmac_init_rings(struct bigmac *bp, int from_irq)
...
@@ -244,7 +244,7 @@ static void bigmac_init_rings(struct bigmac *bp, int from_irq)
#define MGMT_CLKON (MGMT_PAL_INT_MDIO|MGMT_PAL_EXT_MDIO|MGMT_PAL_OENAB|MGMT_PAL_DCLOCK)
#define MGMT_CLKON (MGMT_PAL_INT_MDIO|MGMT_PAL_EXT_MDIO|MGMT_PAL_OENAB|MGMT_PAL_DCLOCK)
#define MGMT_CLKOFF (MGMT_PAL_INT_MDIO|MGMT_PAL_EXT_MDIO|MGMT_PAL_OENAB)
#define MGMT_CLKOFF (MGMT_PAL_INT_MDIO|MGMT_PAL_EXT_MDIO|MGMT_PAL_OENAB)
static
void
idle_transceiver
(
unsigned
long
tregs
)
static
void
idle_transceiver
(
void
__iomem
*
tregs
)
{
{
int
i
=
20
;
int
i
=
20
;
...
@@ -256,7 +256,7 @@ static void idle_transceiver(unsigned long tregs)
...
@@ -256,7 +256,7 @@ static void idle_transceiver(unsigned long tregs)
}
}
}
}
static
void
write_tcvr_bit
(
struct
bigmac
*
bp
,
unsigned
long
tregs
,
int
bit
)
static
void
write_tcvr_bit
(
struct
bigmac
*
bp
,
void
__iomem
*
tregs
,
int
bit
)
{
{
if
(
bp
->
tcvr_type
==
internal
)
{
if
(
bp
->
tcvr_type
==
internal
)
{
bit
=
(
bit
&
1
)
<<
3
;
bit
=
(
bit
&
1
)
<<
3
;
...
@@ -279,7 +279,7 @@ static void write_tcvr_bit(struct bigmac *bp, unsigned long tregs, int bit)
...
@@ -279,7 +279,7 @@ static void write_tcvr_bit(struct bigmac *bp, unsigned long tregs, int bit)
}
}
}
}
static
int
read_tcvr_bit
(
struct
bigmac
*
bp
,
unsigned
long
tregs
)
static
int
read_tcvr_bit
(
struct
bigmac
*
bp
,
void
__iomem
*
tregs
)
{
{
int
retval
=
0
;
int
retval
=
0
;
...
@@ -302,7 +302,7 @@ static int read_tcvr_bit(struct bigmac *bp, unsigned long tregs)
...
@@ -302,7 +302,7 @@ static int read_tcvr_bit(struct bigmac *bp, unsigned long tregs)
return
retval
;
return
retval
;
}
}
static
int
read_tcvr_bit2
(
struct
bigmac
*
bp
,
unsigned
long
tregs
)
static
int
read_tcvr_bit2
(
struct
bigmac
*
bp
,
void
__iomem
*
tregs
)
{
{
int
retval
=
0
;
int
retval
=
0
;
...
@@ -325,7 +325,7 @@ static int read_tcvr_bit2(struct bigmac *bp, unsigned long tregs)
...
@@ -325,7 +325,7 @@ static int read_tcvr_bit2(struct bigmac *bp, unsigned long tregs)
}
}
static
void
put_tcvr_byte
(
struct
bigmac
*
bp
,
static
void
put_tcvr_byte
(
struct
bigmac
*
bp
,
unsigned
long
tregs
,
void
__iomem
*
tregs
,
unsigned
int
byte
)
unsigned
int
byte
)
{
{
int
shift
=
4
;
int
shift
=
4
;
...
@@ -336,7 +336,7 @@ static void put_tcvr_byte(struct bigmac *bp,
...
@@ -336,7 +336,7 @@ static void put_tcvr_byte(struct bigmac *bp,
}
while
(
shift
>=
0
);
}
while
(
shift
>=
0
);
}
}
static
void
bigmac_tcvr_write
(
struct
bigmac
*
bp
,
unsigned
long
tregs
,
static
void
bigmac_tcvr_write
(
struct
bigmac
*
bp
,
void
__iomem
*
tregs
,
int
reg
,
unsigned
short
val
)
int
reg
,
unsigned
short
val
)
{
{
int
shift
;
int
shift
;
...
@@ -376,7 +376,7 @@ static void bigmac_tcvr_write(struct bigmac *bp, unsigned long tregs,
...
@@ -376,7 +376,7 @@ static void bigmac_tcvr_write(struct bigmac *bp, unsigned long tregs,
}
}
static
unsigned
short
bigmac_tcvr_read
(
struct
bigmac
*
bp
,
static
unsigned
short
bigmac_tcvr_read
(
struct
bigmac
*
bp
,
unsigned
long
tregs
,
void
__iomem
*
tregs
,
int
reg
)
int
reg
)
{
{
unsigned
short
retval
=
0
;
unsigned
short
retval
=
0
;
...
@@ -444,7 +444,7 @@ static unsigned short bigmac_tcvr_read(struct bigmac *bp,
...
@@ -444,7 +444,7 @@ static unsigned short bigmac_tcvr_read(struct bigmac *bp,
static
void
bigmac_tcvr_init
(
struct
bigmac
*
bp
)
static
void
bigmac_tcvr_init
(
struct
bigmac
*
bp
)
{
{
unsigned
long
tregs
=
bp
->
tregs
;
void
__iomem
*
tregs
=
bp
->
tregs
;
u32
mpal
;
u32
mpal
;
idle_transceiver
(
tregs
);
idle_transceiver
(
tregs
);
...
@@ -482,7 +482,7 @@ static void bigmac_tcvr_init(struct bigmac *bp)
...
@@ -482,7 +482,7 @@ static void bigmac_tcvr_init(struct bigmac *bp)
static
int
bigmac_init
(
struct
bigmac
*
,
int
);
static
int
bigmac_init
(
struct
bigmac
*
,
int
);
static
int
try_next_permutation
(
struct
bigmac
*
bp
,
unsigned
long
tregs
)
static
int
try_next_permutation
(
struct
bigmac
*
bp
,
void
__iomem
*
tregs
)
{
{
if
(
bp
->
sw_bmcr
&
BMCR_SPEED100
)
{
if
(
bp
->
sw_bmcr
&
BMCR_SPEED100
)
{
int
timeout
;
int
timeout
;
...
@@ -518,7 +518,7 @@ static int try_next_permutation(struct bigmac *bp, unsigned long tregs)
...
@@ -518,7 +518,7 @@ static int try_next_permutation(struct bigmac *bp, unsigned long tregs)
static
void
bigmac_timer
(
unsigned
long
data
)
static
void
bigmac_timer
(
unsigned
long
data
)
{
{
struct
bigmac
*
bp
=
(
struct
bigmac
*
)
data
;
struct
bigmac
*
bp
=
(
struct
bigmac
*
)
data
;
unsigned
long
tregs
=
bp
->
tregs
;
void
__iomem
*
tregs
=
bp
->
tregs
;
int
restart_timer
=
0
;
int
restart_timer
=
0
;
bp
->
timer_ticks
++
;
bp
->
timer_ticks
++
;
...
@@ -573,7 +573,7 @@ static void bigmac_timer(unsigned long data)
...
@@ -573,7 +573,7 @@ static void bigmac_timer(unsigned long data)
*/
*/
static
void
bigmac_begin_auto_negotiation
(
struct
bigmac
*
bp
)
static
void
bigmac_begin_auto_negotiation
(
struct
bigmac
*
bp
)
{
{
unsigned
long
tregs
=
bp
->
tregs
;
void
__iomem
*
tregs
=
bp
->
tregs
;
int
timeout
;
int
timeout
;
/* Grab new software copies of PHY registers. */
/* Grab new software copies of PHY registers. */
...
@@ -612,9 +612,9 @@ static void bigmac_begin_auto_negotiation(struct bigmac *bp)
...
@@ -612,9 +612,9 @@ static void bigmac_begin_auto_negotiation(struct bigmac *bp)
static
int
bigmac_init
(
struct
bigmac
*
bp
,
int
from_irq
)
static
int
bigmac_init
(
struct
bigmac
*
bp
,
int
from_irq
)
{
{
unsigned
long
gregs
=
bp
->
gregs
;
void
__iomem
*
gregs
=
bp
->
gregs
;
unsigned
long
cregs
=
bp
->
creg
;
void
__iomem
*
cregs
=
bp
->
creg
;
unsigned
long
bregs
=
bp
->
bregs
;
void
__iomem
*
bregs
=
bp
->
bregs
;
unsigned
char
*
e
=
&
bp
->
dev
->
dev_addr
[
0
];
unsigned
char
*
e
=
&
bp
->
dev
->
dev_addr
[
0
];
/* Latch current counters into statistics. */
/* Latch current counters into statistics. */
...
@@ -987,7 +987,7 @@ static struct net_device_stats *bigmac_get_stats(struct net_device *dev)
...
@@ -987,7 +987,7 @@ static struct net_device_stats *bigmac_get_stats(struct net_device *dev)
static
void
bigmac_set_multicast
(
struct
net_device
*
dev
)
static
void
bigmac_set_multicast
(
struct
net_device
*
dev
)
{
{
struct
bigmac
*
bp
=
(
struct
bigmac
*
)
dev
->
priv
;
struct
bigmac
*
bp
=
(
struct
bigmac
*
)
dev
->
priv
;
unsigned
long
bregs
=
bp
->
bregs
;
void
__iomem
*
bregs
=
bp
->
bregs
;
struct
dev_mc_list
*
dmi
=
dev
->
mc_list
;
struct
dev_mc_list
*
dmi
=
dev
->
mc_list
;
char
*
addrs
;
char
*
addrs
;
int
i
;
int
i
;
...
...
drivers/net/sunbmac.h
View file @
0d82618a
...
@@ -303,10 +303,10 @@ enum bigmac_timer_state {
...
@@ -303,10 +303,10 @@ enum bigmac_timer_state {
};
};
struct
bigmac
{
struct
bigmac
{
unsigned
long
gregs
;
/* QEC Global Registers */
void
__iomem
*
gregs
;
/* QEC Global Registers */
unsigned
long
creg
;
/* QEC BigMAC Channel Registers */
void
__iomem
*
creg
;
/* QEC BigMAC Channel Registers */
unsigned
long
bregs
;
/* BigMAC Registers */
void
__iomem
*
bregs
;
/* BigMAC Registers */
unsigned
long
tregs
;
/* BigMAC Transceiver */
void
__iomem
*
tregs
;
/* BigMAC Transceiver */
struct
bmac_init_block
*
bmac_block
;
/* RX and TX descriptors */
struct
bmac_init_block
*
bmac_block
;
/* RX and TX descriptors */
__u32
bblock_dvma
;
/* RX and TX descriptors */
__u32
bblock_dvma
;
/* RX and TX descriptors */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment