Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
d6561010
Commit
d6561010
authored
Feb 01, 2006
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sn3 iomem annotations and fixes
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
29e646df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
drivers/sn/ioc3.c
drivers/sn/ioc3.c
+9
-9
include/linux/ioc3.h
include/linux/ioc3.h
+1
-1
No files found.
drivers/sn/ioc3.c
View file @
d6561010
...
@@ -38,10 +38,10 @@ static inline unsigned mcr_pack(unsigned pulse, unsigned sample)
...
@@ -38,10 +38,10 @@ static inline unsigned mcr_pack(unsigned pulse, unsigned sample)
static
int
nic_wait
(
struct
ioc3_driver_data
*
idd
)
static
int
nic_wait
(
struct
ioc3_driver_data
*
idd
)
{
{
volatile
unsigned
mcr
;
unsigned
mcr
;
do
{
do
{
mcr
=
(
volatile
unsigned
)
idd
->
vma
->
mcr
;
mcr
=
readl
(
&
idd
->
vma
->
mcr
)
;
}
while
(
!
(
mcr
&
2
));
}
while
(
!
(
mcr
&
2
));
return
mcr
&
1
;
return
mcr
&
1
;
...
@@ -53,7 +53,7 @@ static int nic_reset(struct ioc3_driver_data *idd)
...
@@ -53,7 +53,7 @@ static int nic_reset(struct ioc3_driver_data *idd)
unsigned
long
flags
;
unsigned
long
flags
;
local_irq_save
(
flags
);
local_irq_save
(
flags
);
idd
->
vma
->
mcr
=
mcr_pack
(
500
,
65
);
writel
(
mcr_pack
(
500
,
65
),
&
idd
->
vma
->
mcr
);
presence
=
nic_wait
(
idd
);
presence
=
nic_wait
(
idd
);
local_irq_restore
(
flags
);
local_irq_restore
(
flags
);
...
@@ -68,7 +68,7 @@ static inline int nic_read_bit(struct ioc3_driver_data *idd)
...
@@ -68,7 +68,7 @@ static inline int nic_read_bit(struct ioc3_driver_data *idd)
unsigned
long
flags
;
unsigned
long
flags
;
local_irq_save
(
flags
);
local_irq_save
(
flags
);
idd
->
vma
->
mcr
=
mcr_pack
(
6
,
13
);
writel
(
mcr_pack
(
6
,
13
),
&
idd
->
vma
->
mcr
);
result
=
nic_wait
(
idd
);
result
=
nic_wait
(
idd
);
local_irq_restore
(
flags
);
local_irq_restore
(
flags
);
...
@@ -80,9 +80,9 @@ static inline int nic_read_bit(struct ioc3_driver_data *idd)
...
@@ -80,9 +80,9 @@ static inline int nic_read_bit(struct ioc3_driver_data *idd)
static
inline
void
nic_write_bit
(
struct
ioc3_driver_data
*
idd
,
int
bit
)
static
inline
void
nic_write_bit
(
struct
ioc3_driver_data
*
idd
,
int
bit
)
{
{
if
(
bit
)
if
(
bit
)
idd
->
vma
->
mcr
=
mcr_pack
(
6
,
110
);
writel
(
mcr_pack
(
6
,
110
),
&
idd
->
vma
->
mcr
);
else
else
idd
->
vma
->
mcr
=
mcr_pack
(
80
,
30
);
writel
(
mcr_pack
(
80
,
30
),
&
idd
->
vma
->
mcr
);
nic_wait
(
idd
);
nic_wait
(
idd
);
}
}
...
@@ -337,7 +337,7 @@ static void probe_nic(struct ioc3_driver_data *idd)
...
@@ -337,7 +337,7 @@ static void probe_nic(struct ioc3_driver_data *idd)
int
save
=
0
,
loops
=
3
;
int
save
=
0
,
loops
=
3
;
unsigned
long
first
,
addr
;
unsigned
long
first
,
addr
;
idd
->
vma
->
gpcr_s
=
GPCR_MLAN_EN
;
writel
(
GPCR_MLAN_EN
,
&
idd
->
vma
->
gpcr_s
)
;
while
(
loops
>
0
)
{
while
(
loops
>
0
)
{
idd
->
nic_part
[
0
]
=
0
;
idd
->
nic_part
[
0
]
=
0
;
...
@@ -408,7 +408,7 @@ static irqreturn_t ioc3_intr_io(int irq, void *arg, struct pt_regs *regs)
...
@@ -408,7 +408,7 @@ static irqreturn_t ioc3_intr_io(int irq, void *arg, struct pt_regs *regs)
read_lock_irqsave
(
&
ioc3_submodules_lock
,
flags
);
read_lock_irqsave
(
&
ioc3_submodules_lock
,
flags
);
if
(
idd
->
dual_irq
&&
idd
->
vma
->
eisr
)
{
if
(
idd
->
dual_irq
&&
readb
(
&
idd
->
vma
->
eisr
)
)
{
/* send Ethernet IRQ to the driver */
/* send Ethernet IRQ to the driver */
if
(
ioc3_ethernet
&&
idd
->
active
[
ioc3_ethernet
->
id
]
&&
if
(
ioc3_ethernet
&&
idd
->
active
[
ioc3_ethernet
->
id
]
&&
ioc3_ethernet
->
intr
)
{
ioc3_ethernet
->
intr
)
{
...
@@ -682,7 +682,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
...
@@ -682,7 +682,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
idd
->
id
=
ioc3_counter
++
;
idd
->
id
=
ioc3_counter
++
;
up_write
(
&
ioc3_devices_rwsem
);
up_write
(
&
ioc3_devices_rwsem
);
idd
->
gpdr_shadow
=
idd
->
vma
->
gpdr
;
idd
->
gpdr_shadow
=
readl
(
&
idd
->
vma
->
gpdr
)
;
/* Read IOC3 NIC contents */
/* Read IOC3 NIC contents */
probe_nic
(
idd
);
probe_nic
(
idd
);
...
...
include/linux/ioc3.h
View file @
d6561010
...
@@ -27,7 +27,7 @@ struct ioc3_driver_data {
...
@@ -27,7 +27,7 @@ struct ioc3_driver_data {
int
id
;
/* IOC3 sequence number */
int
id
;
/* IOC3 sequence number */
/* PCI mapping */
/* PCI mapping */
unsigned
long
pma
;
/* physical address */
unsigned
long
pma
;
/* physical address */
struct
__iomem
ioc3
*
vma
;
/* pointer to registers */
struct
ioc3
__iomem
*
vma
;
/* pointer to registers */
struct
pci_dev
*
pdev
;
/* PCI device */
struct
pci_dev
*
pdev
;
/* PCI device */
/* IRQ stuff */
/* IRQ stuff */
int
dual_irq
;
/* set if separate IRQs are used */
int
dual_irq
;
/* set if separate IRQs are used */
...
...
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