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
f0da1f2c
Commit
f0da1f2c
authored
Nov 14, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] icside: use MMIO for IDE registers.
parent
4f5381ac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
24 deletions
+22
-24
drivers/ide/arm/icside.c
drivers/ide/arm/icside.c
+22
-24
No files found.
drivers/ide/arm/icside.c
View file @
f0da1f2c
...
@@ -28,19 +28,19 @@
...
@@ -28,19 +28,19 @@
#define ICS_ARCIN_V5_INTRSTAT 0x0000
#define ICS_ARCIN_V5_INTRSTAT 0x0000
#define ICS_ARCIN_V5_INTROFFSET 0x0004
#define ICS_ARCIN_V5_INTROFFSET 0x0004
#define ICS_ARCIN_V5_IDEOFFSET 0x
a
00
#define ICS_ARCIN_V5_IDEOFFSET 0x
28
00
#define ICS_ARCIN_V5_IDEALTOFFSET 0x
ae
0
#define ICS_ARCIN_V5_IDEALTOFFSET 0x
2b8
0
#define ICS_ARCIN_V5_IDESTEPPING
4
#define ICS_ARCIN_V5_IDESTEPPING
6
#define ICS_ARCIN_V6_IDEOFFSET_1 0x
8
00
#define ICS_ARCIN_V6_IDEOFFSET_1 0x
20
00
#define ICS_ARCIN_V6_INTROFFSET_1 0x2200
#define ICS_ARCIN_V6_INTROFFSET_1 0x2200
#define ICS_ARCIN_V6_INTRSTAT_1 0x2290
#define ICS_ARCIN_V6_INTRSTAT_1 0x2290
#define ICS_ARCIN_V6_IDEALTOFFSET_1 0x
8e
0
#define ICS_ARCIN_V6_IDEALTOFFSET_1 0x
238
0
#define ICS_ARCIN_V6_IDEOFFSET_2 0x
c
00
#define ICS_ARCIN_V6_IDEOFFSET_2 0x
30
00
#define ICS_ARCIN_V6_INTROFFSET_2 0x3200
#define ICS_ARCIN_V6_INTROFFSET_2 0x3200
#define ICS_ARCIN_V6_INTRSTAT_2 0x3290
#define ICS_ARCIN_V6_INTRSTAT_2 0x3290
#define ICS_ARCIN_V6_IDEALTOFFSET_2 0x
ce
0
#define ICS_ARCIN_V6_IDEALTOFFSET_2 0x
338
0
#define ICS_ARCIN_V6_IDESTEPPING
4
#define ICS_ARCIN_V6_IDESTEPPING
6
struct
cardinfo
{
struct
cardinfo
{
unsigned
int
dataoffset
;
unsigned
int
dataoffset
;
...
@@ -571,24 +571,30 @@ static ide_hwif_t *icside_find_hwif(unsigned long dataport)
...
@@ -571,24 +571,30 @@ static ide_hwif_t *icside_find_hwif(unsigned long dataport)
}
}
static
ide_hwif_t
*
static
ide_hwif_t
*
icside_setup
(
unsigned
long
base
,
struct
cardinfo
*
info
,
struct
expansion_card
*
ec
)
icside_setup
(
void
__iomem
*
base
,
struct
cardinfo
*
info
,
struct
expansion_card
*
ec
)
{
{
unsigned
long
port
=
base
+
info
->
dataoffset
;
unsigned
long
port
=
(
unsigned
long
)
base
+
info
->
dataoffset
;
ide_hwif_t
*
hwif
;
ide_hwif_t
*
hwif
;
hwif
=
icside_find_hwif
(
base
);
hwif
=
icside_find_hwif
(
port
);
if
(
hwif
)
{
if
(
hwif
)
{
int
i
;
int
i
;
memset
(
&
hwif
->
hw
,
0
,
sizeof
(
hw_regs_t
));
memset
(
&
hwif
->
hw
,
0
,
sizeof
(
hw_regs_t
));
/*
* Ensure we're using MMIO
*/
default_hwif_mmiops
(
hwif
);
hwif
->
mmio
=
2
;
for
(
i
=
IDE_DATA_OFFSET
;
i
<=
IDE_STATUS_OFFSET
;
i
++
)
{
for
(
i
=
IDE_DATA_OFFSET
;
i
<=
IDE_STATUS_OFFSET
;
i
++
)
{
hwif
->
hw
.
io_ports
[
i
]
=
port
;
hwif
->
hw
.
io_ports
[
i
]
=
port
;
hwif
->
io_ports
[
i
]
=
port
;
hwif
->
io_ports
[
i
]
=
port
;
port
+=
1
<<
info
->
stepping
;
port
+=
1
<<
info
->
stepping
;
}
}
hwif
->
hw
.
io_ports
[
IDE_CONTROL_OFFSET
]
=
base
+
info
->
ctrloffset
;
hwif
->
hw
.
io_ports
[
IDE_CONTROL_OFFSET
]
=
(
unsigned
long
)
base
+
info
->
ctrloffset
;
hwif
->
io_ports
[
IDE_CONTROL_OFFSET
]
=
base
+
info
->
ctrloffset
;
hwif
->
io_ports
[
IDE_CONTROL_OFFSET
]
=
(
unsigned
long
)
base
+
info
->
ctrloffset
;
hwif
->
hw
.
irq
=
ec
->
irq
;
hwif
->
hw
.
irq
=
ec
->
irq
;
hwif
->
irq
=
ec
->
irq
;
hwif
->
irq
=
ec
->
irq
;
hwif
->
noprobe
=
0
;
hwif
->
noprobe
=
0
;
...
@@ -602,11 +608,9 @@ icside_setup(unsigned long base, struct cardinfo *info, struct expansion_card *e
...
@@ -602,11 +608,9 @@ icside_setup(unsigned long base, struct cardinfo *info, struct expansion_card *e
static
int
__init
static
int
__init
icside_register_v5
(
struct
icside_state
*
state
,
struct
expansion_card
*
ec
)
icside_register_v5
(
struct
icside_state
*
state
,
struct
expansion_card
*
ec
)
{
{
unsigned
long
slot_port
;
ide_hwif_t
*
hwif
;
ide_hwif_t
*
hwif
;
void
__iomem
*
base
;
void
__iomem
*
base
;
slot_port
=
ecard_address
(
ec
,
ECARD_MEMC
,
0
);
base
=
ioremap
(
ecard_resource_start
(
ec
,
ECARD_RES_MEMC
),
base
=
ioremap
(
ecard_resource_start
(
ec
,
ECARD_RES_MEMC
),
ecard_resource_len
(
ec
,
ECARD_RES_MEMC
));
ecard_resource_len
(
ec
,
ECARD_RES_MEMC
));
if
(
!
base
)
if
(
!
base
)
...
@@ -624,7 +628,7 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec)
...
@@ -624,7 +628,7 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec)
*/
*/
icside_irqdisable_arcin_v5
(
ec
,
0
);
icside_irqdisable_arcin_v5
(
ec
,
0
);
hwif
=
icside_setup
(
slot_port
,
&
icside_cardinfo_v5
,
ec
);
hwif
=
icside_setup
(
base
,
&
icside_cardinfo_v5
,
ec
);
if
(
!
hwif
)
{
if
(
!
hwif
)
{
iounmap
(
base
);
iounmap
(
base
);
return
-
ENODEV
;
return
-
ENODEV
;
...
@@ -638,17 +642,11 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec)
...
@@ -638,17 +642,11 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec)
static
int
__init
static
int
__init
icside_register_v6
(
struct
icside_state
*
state
,
struct
expansion_card
*
ec
)
icside_register_v6
(
struct
icside_state
*
state
,
struct
expansion_card
*
ec
)
{
{
unsigned
long
slot_port
,
port
;
ide_hwif_t
*
hwif
,
*
mate
;
ide_hwif_t
*
hwif
,
*
mate
;
void
__iomem
*
ioc_base
,
*
easi_base
;
void
__iomem
*
ioc_base
,
*
easi_base
;
unsigned
int
sel
=
0
;
unsigned
int
sel
=
0
;
int
ret
;
int
ret
;
slot_port
=
ecard_address
(
ec
,
ECARD_IOC
,
ECARD_FAST
);
port
=
ecard_address
(
ec
,
ECARD_EASI
,
ECARD_FAST
);
if
(
port
==
0
)
port
=
slot_port
;
ioc_base
=
ioremap
(
ecard_resource_start
(
ec
,
ECARD_RES_IOCFAST
),
ioc_base
=
ioremap
(
ecard_resource_start
(
ec
,
ECARD_RES_IOCFAST
),
ecard_resource_len
(
ec
,
ECARD_RES_IOCFAST
));
ecard_resource_len
(
ec
,
ECARD_RES_IOCFAST
));
if
(
!
ioc_base
)
{
if
(
!
ioc_base
)
{
...
@@ -688,8 +686,8 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
...
@@ -688,8 +686,8 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
/*
/*
* Find and register the interfaces.
* Find and register the interfaces.
*/
*/
hwif
=
icside_setup
(
port
,
&
icside_cardinfo_v6_1
,
ec
);
hwif
=
icside_setup
(
easi_base
,
&
icside_cardinfo_v6_1
,
ec
);
mate
=
icside_setup
(
port
,
&
icside_cardinfo_v6_2
,
ec
);
mate
=
icside_setup
(
easi_base
,
&
icside_cardinfo_v6_2
,
ec
);
if
(
!
hwif
||
!
mate
)
{
if
(
!
hwif
||
!
mate
)
{
ret
=
-
ENODEV
;
ret
=
-
ENODEV
;
...
...
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