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
113bb329
Commit
113bb329
authored
Jan 10, 2003
by
Alan Cox
Committed by
Linus Torvalds
Jan 10, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] fix 32/64bit cleanness on cyrix chipsets
parent
e3ea33ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
drivers/ide/pci/cs5520.c
drivers/ide/pci/cs5520.c
+3
-3
drivers/ide/pci/cs5530.c
drivers/ide/pci/cs5530.c
+7
-4
No files found.
drivers/ide/pci/cs5520.c
View file @
113bb329
...
@@ -73,8 +73,8 @@ static int cs5520_get_info(char *buffer, char **addr, off_t offset, int count)
...
@@ -73,8 +73,8 @@ static int cs5520_get_info(char *buffer, char **addr, off_t offset, int count)
* at that point bibma+0x2 et bibma+0xa are byte registers
* at that point bibma+0x2 et bibma+0xa are byte registers
* to investigate:
* to investigate:
*/
*/
c0
=
inb
(
(
unsigned
short
)
bmiba
+
0x02
);
c0
=
inb
(
bmiba
+
0x02
);
c1
=
inb
(
(
unsigned
short
)
bmiba
+
0x0a
);
c1
=
inb
(
bmiba
+
0x0a
);
p
+=
sprintf
(
p
,
"
\n
Cyrix CS55x0 IDE
\n
"
);
p
+=
sprintf
(
p
,
"
\n
Cyrix CS55x0 IDE
\n
"
);
p
+=
sprintf
(
p
,
"--------------- Primary Channel "
p
+=
sprintf
(
p
,
"--------------- Primary Channel "
...
@@ -203,7 +203,7 @@ static unsigned int __devinit init_chipset_cs5520(struct pci_dev *dev, const cha
...
@@ -203,7 +203,7 @@ static unsigned int __devinit init_chipset_cs5520(struct pci_dev *dev, const cha
static
void
__devinit
cs5520_init_setup_dma
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
,
ide_hwif_t
*
hwif
)
static
void
__devinit
cs5520_init_setup_dma
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
,
ide_hwif_t
*
hwif
)
{
{
u
32
bmide
=
pci_resource_start
(
dev
,
2
);
/* Not the usual 4 */
u
nsigned
long
bmide
=
pci_resource_start
(
dev
,
2
);
/* Not the usual 4 */
if
(
hwif
->
mate
&&
hwif
->
mate
->
dma_base
)
/* Second channel at primary + 8 */
if
(
hwif
->
mate
&&
hwif
->
mate
->
dma_base
)
/* Second channel at primary + 8 */
bmide
+=
8
;
bmide
+=
8
;
ide_setup_dma
(
hwif
,
bmide
,
8
);
ide_setup_dma
(
hwif
,
bmide
,
8
);
...
...
drivers/ide/pci/cs5530.c
View file @
113bb329
...
@@ -42,7 +42,7 @@ static struct pci_dev *bmide_dev;
...
@@ -42,7 +42,7 @@ static struct pci_dev *bmide_dev;
static
int
cs5530_get_info
(
char
*
buffer
,
char
**
addr
,
off_t
offset
,
int
count
)
static
int
cs5530_get_info
(
char
*
buffer
,
char
**
addr
,
off_t
offset
,
int
count
)
{
{
char
*
p
=
buffer
;
char
*
p
=
buffer
;
u
32
bibma
=
pci_resource_start
(
bmide_dev
,
4
);
u
nsigned
long
bibma
=
pci_resource_start
(
bmide_dev
,
4
);
u8
c0
=
0
,
c1
=
0
;
u8
c0
=
0
,
c1
=
0
;
/*
/*
...
@@ -124,7 +124,8 @@ static unsigned int cs5530_pio_timings[2][5] = {
...
@@ -124,7 +124,8 @@ static unsigned int cs5530_pio_timings[2][5] = {
static
void
cs5530_tuneproc
(
ide_drive_t
*
drive
,
u8
pio
)
/* pio=255 means "autotune" */
static
void
cs5530_tuneproc
(
ide_drive_t
*
drive
,
u8
pio
)
/* pio=255 means "autotune" */
{
{
ide_hwif_t
*
hwif
=
HWIF
(
drive
);
ide_hwif_t
*
hwif
=
HWIF
(
drive
);
unsigned
int
format
,
basereg
=
CS5530_BASEREG
(
hwif
);
unsigned
int
format
;
unsigned
long
basereg
=
CS5530_BASEREG
(
hwif
);
static
u8
modes
[
5
]
=
{
XFER_PIO_0
,
XFER_PIO_1
,
XFER_PIO_2
,
XFER_PIO_3
,
XFER_PIO_4
};
static
u8
modes
[
5
]
=
{
XFER_PIO_0
,
XFER_PIO_1
,
XFER_PIO_2
,
XFER_PIO_3
,
XFER_PIO_4
};
pio
=
ide_get_best_pio_mode
(
drive
,
pio
,
4
,
NULL
);
pio
=
ide_get_best_pio_mode
(
drive
,
pio
,
4
,
NULL
);
...
@@ -151,7 +152,8 @@ static int cs5530_config_dma (ide_drive_t *drive)
...
@@ -151,7 +152,8 @@ static int cs5530_config_dma (ide_drive_t *drive)
int
unit
=
drive
->
select
.
b
.
unit
;
int
unit
=
drive
->
select
.
b
.
unit
;
ide_drive_t
*
mate
=
&
hwif
->
drives
[
unit
^
1
];
ide_drive_t
*
mate
=
&
hwif
->
drives
[
unit
^
1
];
struct
hd_driveid
*
id
=
drive
->
id
;
struct
hd_driveid
*
id
=
drive
->
id
;
unsigned
int
basereg
,
reg
,
timings
;
unsigned
int
reg
,
timings
;
unsigned
long
basereg
;
/*
/*
* Default to DMA-off in case we run into trouble here.
* Default to DMA-off in case we run into trouble here.
...
@@ -365,7 +367,8 @@ static unsigned int __init init_chipset_cs5530 (struct pci_dev *dev, const char
...
@@ -365,7 +367,8 @@ static unsigned int __init init_chipset_cs5530 (struct pci_dev *dev, const char
static
void
__init
init_hwif_cs5530
(
ide_hwif_t
*
hwif
)
static
void
__init
init_hwif_cs5530
(
ide_hwif_t
*
hwif
)
{
{
unsigned
int
basereg
,
d0_timings
;
unsigned
long
basereg
;
u32
d0_timings
;
hwif
->
autodma
=
0
;
hwif
->
autodma
=
0
;
if
(
hwif
->
mate
)
if
(
hwif
->
mate
)
...
...
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