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
a21fb2ee
Commit
a21fb2ee
authored
Sep 11, 2002
by
Jens Axboe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rz1000 update
parent
fd95fd27
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
40 deletions
+68
-40
drivers/ide/pci/rz1000.c
drivers/ide/pci/rz1000.c
+20
-40
drivers/ide/pci/rz1000.h
drivers/ide/pci/rz1000.h
+48
-0
No files found.
drivers/ide/pci/rz1000.c
View file @
a21fb2ee
...
...
@@ -32,11 +32,11 @@
#include <asm/io.h>
#i
fdef CONFIG_BLK_DEV_IDEPCI
#i
nclude "rz1000.h"
void
__init
ide_init_rz1000
(
ide_hwif_t
*
hwif
)
/* called from ide-pci.c */
static
void
__init
init_hwif_rz1000
(
ide_hwif_t
*
hwif
)
{
u
nsigned
short
reg
;
u
16
reg
;
struct
pci_dev
*
dev
=
hwif
->
pci_dev
;
hwif
->
chipset
=
ide_rz1000
;
...
...
@@ -53,48 +53,28 @@ void __init ide_init_rz1000 (ide_hwif_t *hwif) /* called from ide-pci.c */
}
}
#else
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
__init
init_
rz1000
(
struct
pci_dev
*
dev
,
const
char
*
name
)
static
void
__init
init_
setup_rz1000
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
{
unsigned
short
reg
,
h
;
if
(
!
pci_read_config_word
(
dev
,
PCI_COMMAND
,
&
reg
)
&&
!
(
reg
&
PCI_COMMAND_IO
))
{
printk
(
"%s: buggy IDE controller disabled (BIOS)
\n
"
,
name
);
return
;
}
if
(
!
pci_read_config_word
(
dev
,
0x40
,
&
reg
)
&&
!
pci_write_config_word
(
dev
,
0x40
,
reg
&
0xdfff
))
{
printk
(
"IDE: disabled chipset read-ahead (buggy %s)
\n
"
,
name
);
}
else
{
for
(
h
=
0
;
h
<
MAX_HWIFS
;
++
h
)
{
ide_hwif_t
*
hwif
=
&
ide_hwifs
[
h
];
if
((
hwif
->
io_ports
[
IDE_DATA_OFFSET
]
==
0x1f0
||
hwif
->
io_ports
[
IDE_DATA_OFFSET
]
==
0x170
)
&&
(
hwif
->
chipset
==
ide_unknown
||
hwif
->
chipset
==
ide_generic
))
{
hwif
->
chipset
=
ide_rz1000
;
hwif
->
serialized
=
1
;
hwif
->
drives
[
0
].
no_unmask
=
1
;
hwif
->
drives
[
1
].
no_unmask
=
1
;
if
(
hwif
->
io_ports
[
IDE_DATA_OFFSET
]
==
0x170
)
hwif
->
channel
=
1
;
printk
(
"%s: serialized, disabled unmasking "
"(buggy %s)
\n
"
,
hwif
->
name
,
name
);
}
}
}
ide_setup_pci_device
(
dev
,
d
);
}
void
__init
ide_probe_for_rz100x
(
void
)
/* called from ide.c */
int
__init
rz1000_scan_pcidev
(
struct
pci_dev
*
dev
)
{
struct
pci_dev
*
dev
=
NULL
;
ide_pci_device_t
*
d
;
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_PCTECH
)
return
0
;
while
((
dev
=
pci_find_device
(
PCI_VENDOR_ID_PCTECH
,
PCI_DEVICE_ID_PCTECH_RZ1000
,
dev
))
!=
NULL
)
init_rz1000
(
dev
,
"RZ1000"
);
while
((
dev
=
pci_find_device
(
PCI_VENDOR_ID_PCTECH
,
PCI_DEVICE_ID_PCTECH_RZ1001
,
dev
))
!=
NULL
)
init_rz1000
(
dev
,
"RZ1001"
);
for
(
d
=
rz1000_chipsets
;
d
&&
d
->
vendor
&&
d
->
device
;
++
d
)
{
if
(((
d
->
vendor
==
dev
->
vendor
)
&&
(
d
->
device
==
dev
->
device
))
&&
(
d
->
init_setup
))
{
d
->
init_setup
(
dev
,
d
);
return
1
;
}
}
return
0
;
}
#endif
/* CONFIG_BLK_DEV_IDEPCI */
drivers/ide/pci/rz1000.h
0 → 100644
View file @
a21fb2ee
#ifndef RZ100X_H
#define RZ100X_H
#include <linux/config.h>
#include <linux/pci.h>
#include <linux/ide.h>
static
void
init_setup_rz1000
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
init_hwif_rz1000
(
ide_hwif_t
*
);
static
ide_pci_device_t
rz1000_chipsets
[]
__initdata
=
{
{
vendor:
PCI_VENDOR_ID_PCTECH
,
device:
PCI_DEVICE_ID_PCTECH_RZ1000
,
name:
"RZ1000"
,
init_setup:
init_setup_rz1000
,
init_chipset:
NULL
,
init_iops:
NULL
,
init_hwif:
init_hwif_rz1000
,
init_dma:
NULL
,
channels:
2
,
autodma:
NODMA
,
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
vendor:
PCI_VENDOR_ID_PCTECH
,
device:
PCI_DEVICE_ID_PCTECH_RZ1001
,
name:
"RZ1001"
,
init_setup:
init_setup_rz1000
,
init_chipset:
NULL
,
init_iops:
NULL
,
init_hwif:
init_hwif_rz1000
,
init_dma:
NULL
,
channels:
2
,
autodma:
NODMA
,
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
vendor:
0
,
device:
0
,
channels:
0
,
bootable:
EOL
,
}
};
#endif
/* RZ100X_H */
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