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
d04ed1e0
Commit
d04ed1e0
authored
Oct 30, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] etherh: add __iomem annotations.
parent
32812cab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
25 deletions
+30
-25
drivers/net/arm/etherh.c
drivers/net/arm/etherh.c
+30
-25
No files found.
drivers/net/arm/etherh.c
View file @
d04ed1e0
...
...
@@ -58,15 +58,16 @@
#define DEBUG_INIT 2
#define DRV_NAME "etherh"
#define DRV_VERSION "1.1
0
"
#define DRV_VERSION "1.1
1
"
static
unsigned
int
net_debug
=
NET_DEBUG
;
struct
etherh_priv
{
void
*
ioc_fast
;
void
*
memc
;
void
__iomem
*
ioc_fast
;
void
__iomem
*
memc
;
void
__iomem
*
dma_base
;
unsigned
int
id
;
void
*
ctrl_port
;
void
__iomem
*
ctrl_port
;
unsigned
char
ctrl
;
u32
supported
;
};
...
...
@@ -167,7 +168,8 @@ static void
etherh_setif
(
struct
net_device
*
dev
)
{
struct
ei_device
*
ei_local
=
netdev_priv
(
dev
);
unsigned
long
addr
,
flags
;
unsigned
long
flags
;
void
__iomem
*
addr
;
local_irq_save
(
flags
);
...
...
@@ -175,7 +177,7 @@ etherh_setif(struct net_device *dev)
switch
(
etherh_priv
(
dev
)
->
id
)
{
case
PROD_I3_ETHERLAN600
:
case
PROD_I3_ETHERLAN600A
:
addr
=
dev
->
base_addr
+
EN0_RCNTHI
;
addr
=
(
void
*
)
dev
->
base_addr
+
EN0_RCNTHI
;
switch
(
dev
->
if_port
)
{
case
IF_PORT_10BASE2
:
...
...
@@ -210,17 +212,19 @@ static int
etherh_getifstat
(
struct
net_device
*
dev
)
{
struct
ei_device
*
ei_local
=
netdev_priv
(
dev
);
void
__iomem
*
addr
;
int
stat
=
0
;
switch
(
etherh_priv
(
dev
)
->
id
)
{
case
PROD_I3_ETHERLAN600
:
case
PROD_I3_ETHERLAN600A
:
addr
=
(
void
*
)
dev
->
base_addr
+
EN0_RCNTHI
;
switch
(
dev
->
if_port
)
{
case
IF_PORT_10BASE2
:
stat
=
1
;
break
;
case
IF_PORT_10BASET
:
stat
=
readb
(
dev
->
base_addr
+
EN0_RCNTHI
)
&
4
;
stat
=
readb
(
addr
)
&
4
;
break
;
}
break
;
...
...
@@ -277,8 +281,9 @@ static void
etherh_reset
(
struct
net_device
*
dev
)
{
struct
ei_device
*
ei_local
=
netdev_priv
(
dev
);
void
__iomem
*
addr
=
(
void
*
)
dev
->
base_addr
;
writeb
(
E8390_NODMA
+
E8390_PAGE0
+
E8390_STOP
,
dev
->
base_
addr
);
writeb
(
E8390_NODMA
+
E8390_PAGE0
+
E8390_STOP
,
addr
);
/*
* See if we need to change the interface type.
...
...
@@ -304,8 +309,8 @@ static void
etherh_block_output
(
struct
net_device
*
dev
,
int
count
,
const
unsigned
char
*
buf
,
int
start_page
)
{
struct
ei_device
*
ei_local
=
netdev_priv
(
dev
);
unsigned
int
addr
,
dma_addr
;
unsigned
long
dma_start
;
void
__iomem
*
dma_base
,
*
addr
;
if
(
ei_local
->
dmaing
)
{
printk
(
KERN_ERR
"%s: DMAing conflict in etherh_block_input: "
...
...
@@ -322,8 +327,8 @@ etherh_block_output (struct net_device *dev, int count, const unsigned char *buf
ei_local
->
dmaing
=
1
;
addr
=
dev
->
base_addr
;
dma_
addr
=
dev
->
mem_start
;
addr
=
(
void
*
)
dev
->
base_addr
;
dma_
base
=
etherh_priv
(
dev
)
->
dma_base
;
count
=
(
count
+
1
)
&
~
1
;
writeb
(
E8390_NODMA
|
E8390_PAGE0
|
E8390_START
,
addr
+
E8390_CMD
);
...
...
@@ -344,9 +349,9 @@ etherh_block_output (struct net_device *dev, int count, const unsigned char *buf
writeb
(
E8390_RWRITE
|
E8390_START
,
addr
+
E8390_CMD
);
if
(
ei_local
->
word16
)
writesw
(
dma_
addr
,
buf
,
count
>>
1
);
writesw
(
dma_
base
,
buf
,
count
>>
1
);
else
writesb
(
dma_
addr
,
buf
,
count
);
writesb
(
dma_
base
,
buf
,
count
);
dma_start
=
jiffies
;
...
...
@@ -370,8 +375,8 @@ static void
etherh_block_input
(
struct
net_device
*
dev
,
int
count
,
struct
sk_buff
*
skb
,
int
ring_offset
)
{
struct
ei_device
*
ei_local
=
netdev_priv
(
dev
);
unsigned
int
addr
,
dma_addr
;
unsigned
char
*
buf
;
void
__iomem
*
dma_base
,
*
addr
;
if
(
ei_local
->
dmaing
)
{
printk
(
KERN_ERR
"%s: DMAing conflict in etherh_block_input: "
...
...
@@ -382,8 +387,8 @@ etherh_block_input (struct net_device *dev, int count, struct sk_buff *skb, int
ei_local
->
dmaing
=
1
;
addr
=
dev
->
base_addr
;
dma_
addr
=
dev
->
mem_start
;
addr
=
(
void
*
)
dev
->
base_addr
;
dma_
base
=
etherh_priv
(
dev
)
->
dma_base
;
buf
=
skb
->
data
;
writeb
(
E8390_NODMA
|
E8390_PAGE0
|
E8390_START
,
addr
+
E8390_CMD
);
...
...
@@ -394,11 +399,11 @@ etherh_block_input (struct net_device *dev, int count, struct sk_buff *skb, int
writeb
(
E8390_RREAD
|
E8390_START
,
addr
+
E8390_CMD
);
if
(
ei_local
->
word16
)
{
readsw
(
dma_
addr
,
buf
,
count
>>
1
);
readsw
(
dma_
base
,
buf
,
count
>>
1
);
if
(
count
&
1
)
buf
[
count
-
1
]
=
readb
(
dma_
addr
);
buf
[
count
-
1
]
=
readb
(
dma_
base
);
}
else
readsb
(
dma_
addr
,
buf
,
count
);
readsb
(
dma_
base
,
buf
,
count
);
writeb
(
ENISR_RDC
,
addr
+
EN0_ISR
);
ei_local
->
dmaing
=
0
;
...
...
@@ -411,7 +416,7 @@ static void
etherh_get_header
(
struct
net_device
*
dev
,
struct
e8390_pkt_hdr
*
hdr
,
int
ring_page
)
{
struct
ei_device
*
ei_local
=
netdev_priv
(
dev
);
unsigned
int
addr
,
dma_
addr
;
void
__iomem
*
dma_base
,
*
addr
;
if
(
ei_local
->
dmaing
)
{
printk
(
KERN_ERR
"%s: DMAing conflict in etherh_get_header: "
...
...
@@ -422,8 +427,8 @@ etherh_get_header (struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_p
ei_local
->
dmaing
=
1
;
addr
=
dev
->
base_addr
;
dma_
addr
=
dev
->
mem_start
;
addr
=
(
void
*
)
dev
->
base_addr
;
dma_
base
=
etherh_priv
(
dev
)
->
dma_base
;
writeb
(
E8390_NODMA
|
E8390_PAGE0
|
E8390_START
,
addr
+
E8390_CMD
);
writeb
(
sizeof
(
*
hdr
),
addr
+
EN0_RCNTLO
);
...
...
@@ -433,9 +438,9 @@ etherh_get_header (struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_p
writeb
(
E8390_RREAD
|
E8390_START
,
addr
+
E8390_CMD
);
if
(
ei_local
->
word16
)
readsw
(
dma_
addr
,
hdr
,
sizeof
(
*
hdr
)
>>
1
);
readsw
(
dma_
base
,
hdr
,
sizeof
(
*
hdr
)
>>
1
);
else
readsb
(
dma_
addr
,
hdr
,
sizeof
(
*
hdr
));
readsb
(
dma_
base
,
hdr
,
sizeof
(
*
hdr
));
writeb
(
ENISR_RDC
,
addr
+
EN0_ISR
);
ei_local
->
dmaing
=
0
;
...
...
@@ -692,7 +697,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
}
dev
->
base_addr
=
(
unsigned
long
)
eh
->
memc
+
data
->
ns8390_offset
;
dev
->
mem_start
=
(
unsigned
long
)
eh
->
memc
+
data
->
dataport_offset
;
eh
->
dma_base
=
eh
->
memc
+
data
->
dataport_offset
;
eh
->
ctrl_port
+=
data
->
ctrlport_offset
;
/*
...
...
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