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
Kirill Smelkov
linux
Commits
aa509d0d
Commit
aa509d0d
authored
Sep 16, 2002
by
Jens Axboe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New IDE pci low level driver setup scheme
parent
a40bed1d
Changes
48
Hide whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
1293 additions
and
683 deletions
+1293
-683
drivers/ide/pci/aec62xx.c
drivers/ide/pci/aec62xx.c
+61
-16
drivers/ide/pci/aec62xx.h
drivers/ide/pci/aec62xx.h
+5
-10
drivers/ide/pci/alim15x3.c
drivers/ide/pci/alim15x3.c
+46
-24
drivers/ide/pci/alim15x3.h
drivers/ide/pci/alim15x3.h
+1
-3
drivers/ide/pci/amd74xx.c
drivers/ide/pci/amd74xx.c
+49
-14
drivers/ide/pci/amd74xx.h
drivers/ide/pci/amd74xx.h
+5
-11
drivers/ide/pci/cmd64x.c
drivers/ide/pci/cmd64x.c
+50
-22
drivers/ide/pci/cmd64x.h
drivers/ide/pci/cmd64x.h
+3
-8
drivers/ide/pci/cs5530.c
drivers/ide/pci/cs5530.c
+42
-29
drivers/ide/pci/cs5530.h
drivers/ide/pci/cs5530.h
+1
-3
drivers/ide/pci/cy82c693.c
drivers/ide/pci/cy82c693.c
+45
-18
drivers/ide/pci/cy82c693.h
drivers/ide/pci/cy82c693.h
+1
-3
drivers/ide/pci/generic.c
drivers/ide/pci/generic.c
+75
-13
drivers/ide/pci/generic.h
drivers/ide/pci/generic.h
+10
-10
drivers/ide/pci/hpt34x.c
drivers/ide/pci/hpt34x.c
+45
-17
drivers/ide/pci/hpt34x.h
drivers/ide/pci/hpt34x.h
+1
-3
drivers/ide/pci/hpt366.c
drivers/ide/pci/hpt366.c
+63
-15
drivers/ide/pci/hpt366.h
drivers/ide/pci/hpt366.h
+5
-5
drivers/ide/pci/it8172.c
drivers/ide/pci/it8172.c
+43
-15
drivers/ide/pci/it8172.h
drivers/ide/pci/it8172.h
+1
-1
drivers/ide/pci/ns87415.c
drivers/ide/pci/ns87415.c
+45
-15
drivers/ide/pci/ns87415.h
drivers/ide/pci/ns87415.h
+1
-3
drivers/ide/pci/nvidia.c
drivers/ide/pci/nvidia.c
+46
-17
drivers/ide/pci/nvidia.h
drivers/ide/pci/nvidia.h
+1
-7
drivers/ide/pci/opti621.c
drivers/ide/pci/opti621.c
+50
-14
drivers/ide/pci/opti621.h
drivers/ide/pci/opti621.h
+2
-2
drivers/ide/pci/pdcadma.c
drivers/ide/pci/pdcadma.c
+46
-17
drivers/ide/pci/pdcadma.h
drivers/ide/pci/pdcadma.h
+1
-1
drivers/ide/pci/piix.c
drivers/ide/pci/piix.c
+69
-18
drivers/ide/pci/piix.h
drivers/ide/pci/piix.h
+24
-18
drivers/ide/pci/rz1000.c
drivers/ide/pci/rz1000.c
+48
-16
drivers/ide/pci/rz1000.h
drivers/ide/pci/rz1000.h
+0
-3
drivers/ide/pci/serverworks.c
drivers/ide/pci/serverworks.c
+67
-14
drivers/ide/pci/serverworks.h
drivers/ide/pci/serverworks.h
+4
-4
drivers/ide/pci/siimage.c
drivers/ide/pci/siimage.c
+47
-15
drivers/ide/pci/siimage.h
drivers/ide/pci/siimage.h
+2
-5
drivers/ide/pci/sis5513.c
drivers/ide/pci/sis5513.c
+46
-15
drivers/ide/pci/sis5513.h
drivers/ide/pci/sis5513.h
+1
-3
drivers/ide/pci/sl82c105.c
drivers/ide/pci/sl82c105.c
+43
-14
drivers/ide/pci/sl82c105.h
drivers/ide/pci/sl82c105.h
+1
-3
drivers/ide/pci/slc90e66.c
drivers/ide/pci/slc90e66.c
+46
-15
drivers/ide/pci/slc90e66.h
drivers/ide/pci/slc90e66.h
+1
-3
drivers/ide/pci/trm290.c
drivers/ide/pci/trm290.c
+46
-16
drivers/ide/pci/trm290.h
drivers/ide/pci/trm290.h
+1
-3
drivers/ide/pci/via82cxxx.c
drivers/ide/pci/via82cxxx.c
+43
-24
drivers/ide/pci/via82cxxx.h
drivers/ide/pci/via82cxxx.h
+2
-5
drivers/ide/setup-pci.c
drivers/ide/setup-pci.c
+56
-150
include/linux/ide.h
include/linux/ide.h
+2
-23
No files found.
drivers/ide/pci/aec62xx.c
View file @
aa509d0d
...
...
@@ -38,8 +38,6 @@ static int aec62xx_get_info (char *buffer, char **addr, off_t offset, int count)
char
*
chipset_nums
[]
=
{
"error"
,
"error"
,
"error"
,
"error"
,
"error"
,
"error"
,
"850UF"
,
"860"
,
"860R"
,
"865"
,
"865R"
,
"error"
};
// char *modes_33[] = {};
// char *modes_34[] = {};
int
i
;
for
(
i
=
0
;
i
<
n_aec_devs
;
i
++
)
{
...
...
@@ -516,22 +514,69 @@ static void __init init_setup_aec6x80 (struct pci_dev *dev, ide_pci_device_t *d)
ide_setup_pci_device
(
dev
,
d
);
}
int
__init
aec62xx_scan_pcidev
(
struct
pci_dev
*
dev
)
/**
* aec62xx_init_one - called when a AEC is found
* @dev: the aec62xx device
* @id: the matching pci id
*
* Called when the PCI registration layer (or the IDE initialization)
* finds a device matching our IDE device tables.
*/
static
int
__devinit
aec62xx_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
ide_pci_device_t
*
d
;
ide_pci_device_t
*
d
=
&
aec62xx_chipsets
[
id
->
driver_data
]
;
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_ARTOP
)
return
0
;
for
(
d
=
aec62xx_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
;
}
}
if
(
dev
->
device
!=
d
->
device
)
BUG
();
d
->
init_setup
(
dev
,
d
);
return
0
;
}
/**
* aec62xx_remove_one - called when an AEC is unplugged
* @dev: the device that was removed
*
* Disconnect an AEC device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
aec62xx_remove_one
(
struct
pci_dev
*
dev
)
{
panic
(
"AEC62xx removal not yet supported"
);
}
static
struct
pci_device_id
aec62xx_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_ARTOP
,
PCI_DEVICE_ID_ARTOP_ATP850UF
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_ARTOP
,
PCI_DEVICE_ID_ARTOP_ATP860
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
1
},
{
PCI_VENDOR_ID_ARTOP
,
PCI_DEVICE_ID_ARTOP_ATP860R
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
2
},
{
PCI_VENDOR_ID_ARTOP
,
PCI_DEVICE_ID_ARTOP_ATP865
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
3
},
{
PCI_VENDOR_ID_ARTOP
,
PCI_DEVICE_ID_ARTOP_ATP865R
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
4
},
{
0
,
},
};
static
struct
pci_driver
driver
=
{
name:
"AEC62xx IDE"
,
id_table:
aec62xx_pci_tbl
,
probe:
aec62xx_init_one
,
remove:
__devexit_p
(
aec62xx_remove_one
),
};
static
int
aec62xx_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
aec62xx_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
aec62xx_ide_init
);
module_exit
(
aec62xx_ide_exit
);
MODULE_AUTHOR
(
"Andre Hedrick"
);
MODULE_DESCRIPTION
(
"PCI driver module for ARTOP AEC62xx IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/aec62xx.h
View file @
aa509d0d
...
...
@@ -99,7 +99,7 @@ static void init_hwif_aec62xx(ide_hwif_t *);
static
void
init_dma_aec62xx
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
aec62xx_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_ARTOP
,
device:
PCI_DEVICE_ID_ARTOP_ATP850UF
,
name:
"AEC6210"
,
...
...
@@ -113,7 +113,7 @@ static ide_pci_device_t aec62xx_chipsets[] __initdata = {
enablebits:
{{
0x4a
,
0x02
,
0x02
},
{
0x4a
,
0x04
,
0x04
}},
bootable:
OFF_BOARD
,
extra:
0
,
},{
},{
/* 1 */
vendor:
PCI_VENDOR_ID_ARTOP
,
device:
PCI_DEVICE_ID_ARTOP_ATP860
,
name:
"AEC6260"
,
...
...
@@ -127,7 +127,7 @@ static ide_pci_device_t aec62xx_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
OFF_BOARD
,
extra:
0
,
},{
},{
/* 2 */
vendor:
PCI_VENDOR_ID_ARTOP
,
device:
PCI_DEVICE_ID_ARTOP_ATP860R
,
name:
"AEC6260R"
,
...
...
@@ -141,7 +141,7 @@ static ide_pci_device_t aec62xx_chipsets[] __initdata = {
enablebits:
{{
0x4a
,
0x02
,
0x02
},
{
0x4a
,
0x04
,
0x04
}},
bootable:
NEVER_BOARD
,
extra:
0
,
},{
},{
/* 3 */
vendor:
PCI_VENDOR_ID_ARTOP
,
device:
PCI_DEVICE_ID_ARTOP_ATP865
,
name:
"AEC6X80"
,
...
...
@@ -155,7 +155,7 @@ static ide_pci_device_t aec62xx_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
OFF_BOARD
,
extra:
0
,
},{
},{
/* 4 */
vendor:
PCI_VENDOR_ID_ARTOP
,
device:
PCI_DEVICE_ID_ARTOP_ATP865R
,
name:
"AEC6X80R"
,
...
...
@@ -169,11 +169,6 @@ static ide_pci_device_t aec62xx_chipsets[] __initdata = {
enablebits:
{{
0x4a
,
0x02
,
0x02
},
{
0x4a
,
0x04
,
0x04
}},
bootable:
OFF_BOARD
,
extra:
0
,
},{
vendor:
0
,
device:
0
,
channels:
0
,
bootable:
EOL
,
}
};
...
...
drivers/ide/pci/alim15x3.c
View file @
aa509d0d
...
...
@@ -22,6 +22,7 @@
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/pci.h>
...
...
@@ -623,9 +624,11 @@ static unsigned int __init init_chipset_ali15x3 (struct pci_dev *dev, const char
/*
* We should only tune the 1533 enable if we are using an ALi
* North bridge
* North bridge. We might have no north found on some zany
* box without a device at 0:0.0. The ALi bridge will be at
* 0:0.0 so if we didn't find one we know what is cooking.
*/
if
(
north
->
vendor
!=
PCI_VENDOR_ID_AL
)
{
if
(
north
&&
north
->
vendor
!=
PCI_VENDOR_ID_AL
)
{
local_irq_restore
(
flags
);
return
0
;
}
...
...
@@ -841,45 +844,64 @@ extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
/**
*
init_setup_ali15x3
- set up an ALi15x3 IDE controller
*
alim15x3_init_one
- set up an ALi15x3 IDE controller
* @dev: PCI device to set up
* @d: IDE PCI structures
*
* Perform the actual set up for the ALi15x3.
* Perform the actual set up for an ALi15x3 that has been found by the
* hot plug layer.
*/
static
void
__init
init_setup_ali15x3
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
alim15x3_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
i
d
)
{
ide_pci_device_t
*
d
=
&
ali15x3_chipsets
[
id
->
driver_data
];
#if defined(CONFIG_SPARC64)
d
->
init_hwif
=
init_hwif_common_ali15x3
;
#endif
/* CONFIG_SPARC64 */
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
/**
* ali15x3_
scan_pcidev - check for ali pci ide
* @dev:
device found by IDE ordered scan
* ali15x3_
remove_one - called with an ALi is unplugged
* @dev:
the device that was removed
*
* If the device is a known ALi IDE controller we set it up and
* then return 1. If we do not know it, or set up fails we return 0
* and it will be offered to other drivers or taken generic
* Disconnect an ALi device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
int
__init
ali15x3_scan_pcidev
(
struct
pci_dev
*
dev
)
static
void
ali15x3_remove_one
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
panic
(
"ALi removal not yet supported"
);
}
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_AL
)
return
0
;
static
struct
pci_device_id
alim15x3_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_AL
,
PCI_DEVICE_ID_AL_M5229
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
0
,
},
};
for
(
d
=
ali15x3_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
;
static
struct
pci_driver
driver
=
{
name:
"ALI15x3 IDE"
,
id_table:
alim15x3_pci_tbl
,
probe:
alim15x3_init_one
,
remove:
__devexit_p
(
ali15x3_remove_one
),
};
static
int
ali15x3_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
ali15x3_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
ali15x3_ide_init
);
module_exit
(
ali15x3_ide_exit
);
MODULE_AUTHOR
(
"Michael Aubry, Andrzej Krzysztofowicz, CJ, Andre Hedrick, Alan Cox"
);
MODULE_DESCRIPTION
(
"PCI driver module for ALi 15x3 IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/alim15x3.h
View file @
aa509d0d
...
...
@@ -25,18 +25,16 @@ static ide_pci_host_proc_t ali_procs[] __initdata = {
};
#endif
/* DISPLAY_ALI_TIMINGS && CONFIG_PROC_FS */
static
void
init_setup_ali15x3
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
unsigned
int
init_chipset_ali15x3
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_common_ali15x3
(
ide_hwif_t
*
);
static
void
init_hwif_ali15x3
(
ide_hwif_t
*
);
static
void
init_dma_ali15x3
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
ali15x3_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_AL
,
device:
PCI_DEVICE_ID_AL_M5229
,
name:
"ALI15X3"
,
init_setup:
init_setup_ali15x3
,
init_chipset:
init_chipset_ali15x3
,
init_iops:
NULL
,
init_hwif:
init_hwif_ali15x3
,
...
...
drivers/ide/pci/amd74xx.c
View file @
aa509d0d
...
...
@@ -7,6 +7,7 @@
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/delay.h>
...
...
@@ -392,26 +393,60 @@ static void __init init_dma_amd74xx (ide_hwif_t *hwif, unsigned long dmabase)
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
__init
init_setup_amd74xx
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
amd74xx_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
ide_pci_device_t
*
d
=
&
amd74xx_chipsets
[
id
->
driver_data
];
if
(
dev
->
device
!=
d
->
device
)
BUG
();
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
int
__init
amd74xx_scan_pcidev
(
struct
pci_dev
*
dev
)
/**
* amd74xx_remove_one - called with an AMD IDE is unplugged
* @dev: the device that was removed
*
* Disconnect an AMD IDE device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
amd74xx_remove_one
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
panic
(
"AMD IDE removal not yet supported"
);
}
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_AMD
)
return
0
;
static
struct
pci_device_id
amd74xx_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_AMD
,
PCI_DEVICE_ID_AMD_COBRA_7401
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_AMD
,
PCI_DEVICE_ID_AMD_VIPER_7409
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
1
},
{
PCI_VENDOR_ID_AMD
,
PCI_DEVICE_ID_AMD_VIPER_7411
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
2
},
{
PCI_VENDOR_ID_AMD
,
PCI_DEVICE_ID_AMD_OPUS_7441
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
3
},
{
PCI_VENDOR_ID_AMD
,
PCI_DEVICE_ID_AMD_8111_IDE
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
4
},
{
0
,
},
};
static
struct
pci_driver
driver
=
{
name:
"AMD IDE"
,
id_table:
amd74xx_pci_tbl
,
probe:
amd74xx_init_one
,
remove:
__devexit_p
(
amd74xx_remove_one
),
};
static
int
amd74xx_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
for
(
d
=
amd74xx_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
;
static
void
amd74xx_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
amd74xx_ide_init
);
module_exit
(
amd74xx_ide_exit
);
MODULE_AUTHOR
(
"Andre Hedrick"
);
MODULE_DESCRIPTION
(
"PCI driver module for AMD IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/amd74xx.h
View file @
aa509d0d
...
...
@@ -25,17 +25,15 @@ static ide_pci_host_proc_t amd74xx_procs[] __initdata = {
};
#endif
/* defined(DISPLAY_VIPER_TIMINGS) && defined(CONFIG_PROC_FS) */
static
void
init_setup_amd74xx
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
unsigned
int
init_chipset_amd74xx
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_amd74xx
(
ide_hwif_t
*
);
static
void
init_dma_amd74xx
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
amd74xx_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_AMD
,
device:
PCI_DEVICE_ID_AMD_COBRA_7401
,
name:
"AMD7401"
,
init_setup:
init_setup_amd74xx
,
init_chipset:
init_chipset_amd74xx
,
init_iops:
NULL
,
init_hwif:
init_hwif_amd74xx
,
...
...
@@ -45,11 +43,10 @@ static ide_pci_device_t amd74xx_chipsets[] __initdata = {
enablebits:
{{
0x40
,
0x01
,
0x01
},
{
0x40
,
0x02
,
0x02
}},
bootable:
ON_BOARD
,
extra:
0
},{
},{
/* 1 */
vendor:
PCI_VENDOR_ID_AMD
,
device:
PCI_DEVICE_ID_AMD_VIPER_7409
,
name:
"AMD7409"
,
init_setup:
init_setup_amd74xx
,
init_chipset:
init_chipset_amd74xx
,
init_iops:
NULL
,
init_hwif:
init_hwif_amd74xx
,
...
...
@@ -59,11 +56,10 @@ static ide_pci_device_t amd74xx_chipsets[] __initdata = {
enablebits:
{{
0x40
,
0x01
,
0x01
},
{
0x40
,
0x02
,
0x02
}},
bootable:
ON_BOARD
,
extra:
0
},{
},{
/* 2 */
vendor:
PCI_VENDOR_ID_AMD
,
device:
PCI_DEVICE_ID_AMD_VIPER_7411
,
name:
"AMD7411"
,
init_setup:
init_setup_amd74xx
,
init_chipset:
init_chipset_amd74xx
,
init_iops:
NULL
,
init_hwif:
init_hwif_amd74xx
,
...
...
@@ -73,11 +69,10 @@ static ide_pci_device_t amd74xx_chipsets[] __initdata = {
enablebits:
{{
0x40
,
0x01
,
0x01
},
{
0x40
,
0x02
,
0x02
}},
bootable:
ON_BOARD
,
extra:
0
},{
},{
/* 3 */
vendor:
PCI_VENDOR_ID_AMD
,
device:
PCI_DEVICE_ID_AMD_OPUS_7441
,
name:
"AMD7441"
,
init_setup:
init_setup_amd74xx
,
init_chipset:
init_chipset_amd74xx
,
init_iops:
NULL
,
init_hwif:
init_hwif_amd74xx
,
...
...
@@ -87,11 +82,10 @@ static ide_pci_device_t amd74xx_chipsets[] __initdata = {
enablebits:
{{
0x40
,
0x01
,
0x01
},
{
0x40
,
0x02
,
0x02
}},
bootable:
ON_BOARD
,
extra:
0
},{
},{
/* 4 */
vendor:
PCI_VENDOR_ID_AMD
,
device:
PCI_DEVICE_ID_AMD_8111_IDE
,
name:
"AMD8111"
,
init_setup:
init_setup_amd74xx
,
init_chipset:
init_chipset_amd74xx
,
init_iops:
NULL
,
init_hwif:
init_hwif_amd74xx
,
...
...
drivers/ide/pci/cmd64x.c
View file @
aa509d0d
/* $Id: cmd64x.c,v 1.21 2000/01/30 23:23:16
*
* linux/drivers/ide/cmd64x.c Version 1.
22 June 9, 2000
* linux/drivers/ide/cmd64x.c Version 1.
30 Sept 10, 2002
*
* cmd64x.c: Enable interrupts at initialization time on Ultra/PCI machines.
* Note, this driver is not used at all on other systems because
...
...
@@ -15,6 +15,7 @@
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/delay.h>
...
...
@@ -727,10 +728,12 @@ static void __init init_hwif_cmd64x (ide_hwif_t *hwif)
if
(
dev
->
device
==
PCI_DEVICE_ID_CMD_643
)
hwif
->
ultra_mask
=
0x80
;
if
(
dev
->
device
==
PCI_DEVICE_ID_CMD_646
)
{
if
(
class_rev
>
0x04
)
hwif
->
ultra_mask
=
0x07
;
else
hwif
->
ultra_mask
=
0x80
;
}
#ifdef CONFIG_BLK_DEV_IDEDMA
hwif
->
ide_dma_check
=
&
cmd64x_config_drive_for_dma
;
...
...
@@ -758,10 +761,6 @@ static void __init init_hwif_cmd64x (ide_hwif_t *hwif)
#endif
/* CONFIG_BLK_DEV_IDEDMA */
}
/**
* FIXME: not required ?
*/
static
void
__init
init_dma_cmd64x
(
ide_hwif_t
*
hwif
,
unsigned
long
dmabase
)
{
ide_setup_dma
(
hwif
,
dmabase
,
8
);
...
...
@@ -769,30 +768,59 @@ static void __init init_dma_cmd64x (ide_hwif_t *hwif, unsigned long dmabase)
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
int
__devinit
cmd64x_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
ide_pci_device_t
*
d
=
&
cmd64x_chipsets
[
id
->
driver_data
];
if
(
dev
->
device
!=
d
->
device
)
BUG
();
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
/**
* FIXME: not required either ?
* cmd64x_remove_one - called with an CMD64x is unplugged
* @dev: the device that was removed
*
* Disconnect a CMD64x device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
__init
init_setup_cmd64x
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
void
cmd64x_remove_one
(
struct
pci_dev
*
dev
)
{
ide_setup_pci_device
(
dev
,
d
);
panic
(
"CMD64x removal not yet supported"
);
}
int
__init
cmd64x_scan_pcidev
(
struct
pci_dev
*
dev
)
static
struct
pci_device_id
cmd64x_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_CMD
,
PCI_DEVICE_ID_CMD_643
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_CMD
,
PCI_DEVICE_ID_CMD_646
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
1
},
{
PCI_VENDOR_ID_CMD
,
PCI_DEVICE_ID_CMD_648
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
2
},
{
PCI_VENDOR_ID_CMD
,
PCI_DEVICE_ID_CMD_649
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
3
},
{
0
,
},
};
static
struct
pci_driver
driver
=
{
name:
"CMD64x IDE"
,
id_table:
cmd64x_pci_tbl
,
probe:
cmd64x_init_one
,
remove:
__devexit_p
(
cmd64x_remove_one
),
};
static
int
cmd64x_ide_init
(
void
)
{
ide_pci_device_t
*
d
;
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_CMD
)
return
0
;
return
ide_pci_register_driver
(
&
driver
);
}
for
(
d
=
cmd64x_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
;
static
void
cmd64x_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
cmd64x_ide_init
);
module_exit
(
cmd64x_ide_exit
);
MODULE_AUTHOR
(
"Eddie Dost, David Miller, Andre Hedrick"
);
MODULE_DESCRIPTION
(
"PCI driver module for CMD64x IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/cmd64x.h
View file @
aa509d0d
...
...
@@ -79,17 +79,15 @@ static ide_pci_host_proc_t cmd64x_procs[] __initdata = {
};
#endif
/* defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_PROC_FS) */
static
void
init_setup_cmd64x
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
unsigned
int
init_chipset_cmd64x
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_cmd64x
(
ide_hwif_t
*
);
static
void
init_dma_cmd64x
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
cmd64x_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_CMD
,
device:
PCI_DEVICE_ID_CMD_643
,
name:
"CMD643"
,
init_setup:
init_setup_cmd64x
,
init_chipset:
init_chipset_cmd64x
,
init_iops:
NULL
,
init_hwif:
init_hwif_cmd64x
,
...
...
@@ -99,11 +97,10 @@ static ide_pci_device_t cmd64x_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 1 */
vendor:
PCI_VENDOR_ID_CMD
,
device:
PCI_DEVICE_ID_CMD_646
,
name:
"CMD646"
,
init_setup:
init_setup_cmd64x
,
init_chipset:
init_chipset_cmd64x
,
init_iops:
NULL
,
init_hwif:
init_hwif_cmd64x
,
...
...
@@ -113,11 +110,10 @@ static ide_pci_device_t cmd64x_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x51
,
0x80
,
0x80
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 2 */
vendor:
PCI_VENDOR_ID_CMD
,
device:
PCI_DEVICE_ID_CMD_648
,
name:
"CMD648"
,
init_setup:
init_setup_cmd64x
,
init_chipset:
init_chipset_cmd64x
,
init_iops:
NULL
,
init_hwif:
init_hwif_cmd64x
,
...
...
@@ -131,7 +127,6 @@ static ide_pci_device_t cmd64x_chipsets[] __initdata = {
vendor:
PCI_VENDOR_ID_CMD
,
device:
PCI_DEVICE_ID_CMD_649
,
name:
"CMD649"
,
init_setup:
init_setup_cmd64x
,
init_chipset:
init_chipset_cmd64x
,
init_iops:
NULL
,
init_hwif:
init_hwif_cmd64x
,
...
...
drivers/ide/pci/cs5530.c
View file @
aa509d0d
/*
* linux/drivers/ide/cs5530.c Version 0.
6 Mar. 18, 2000
* linux/drivers/ide/cs5530.c Version 0.
7 Sept 10, 2002
*
* Copyright (C) 2000 Andre Hedrick <andre@linux-ide.org>
* Ditto of GNU General Public License.
...
...
@@ -12,6 +12,7 @@
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/delay.h>
...
...
@@ -419,44 +420,56 @@ static void __init init_dma_cs5530 (ide_hwif_t *hwif, unsigned long dmabase)
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
/**
* init_setup_cs5530 - set up a CS5530 IDE
* @dev: PCI device
* @d: PCI ide device info
*
* FIXME: this function can go away too
*/
static
void
__init
init_setup_cs5530
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
cs5530_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
ide_pci_device_t
*
d
=
&
cs5530_chipsets
[
id
->
driver_data
];
if
(
dev
->
device
!=
d
->
device
)
BUG
();
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
/**
* cs5530_
scan_pcidev - set up any CS5530 device
* @dev:
pci device to check
* cs5530_
remove_one - called when a CS5530 is unplugged
* @dev:
the device that was removed
*
* Check if the device is a 5530 IDE controller. If it is then
* claim and set up the interface. Return 1 if we claimed the
* interface or zero if it is not ours
* Disconnect an Cyrix device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
int
__init
cs5530_scan_pcidev
(
struct
pci_dev
*
dev
)
static
void
cs5530_remove_one
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
panic
(
"Cyrix removal not yet supported"
);
}
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_CYRIX
)
return
0
;
static
struct
pci_device_id
cs5530_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_CYRIX
,
PCI_DEVICE_ID_CYRIX_5530_IDE
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
0
,
},
};
for
(
d
=
cs5530_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
;
static
struct
pci_driver
driver
=
{
name:
"CS5530 IDE"
,
id_table:
cs5530_pci_tbl
,
probe:
cs5530_init_one
,
remove:
__devexit_p
(
cs5530_remove_one
),
};
static
int
cs5530_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
cs5530_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
cs5530_ide_init
);
module_exit
(
cs5530_ide_exit
);
MODULE_AUTHOR
(
"Mark Lord"
);
MODULE_DESCRIPTION
(
"PCI driver module for Cyrix/NS 5530 IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/cs5530.h
View file @
aa509d0d
...
...
@@ -25,17 +25,15 @@ static ide_pci_host_proc_t cs5530_procs[] __initdata = {
};
#endif
/* DISPLAY_CS5530_TIMINGS && CONFIG_PROC_FS */
static
void
init_setup_cs5530
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
unsigned
int
init_chipset_cs5530
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_cs5530
(
ide_hwif_t
*
);
static
void
init_dma_cs5530
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
cs5530_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_CYRIX
,
device:
PCI_DEVICE_ID_CYRIX_5530_IDE
,
name:
"CS5530"
,
init_setup:
init_setup_cs5530
,
init_chipset:
init_chipset_cs5530
,
init_iops:
NULL
,
init_hwif:
init_hwif_cs5530
,
...
...
drivers/ide/pci/cy82c693.c
View file @
aa509d0d
/*
* linux/drivers/ide/cy82c693.c Version 0.
34 Dec. 13, 1999
* linux/drivers/ide/cy82c693.c Version 0.
40 Sep. 10, 2002
*
* Copyright (C) 1998-2000 Andreas S. Krebs (akrebs@altavista.net), Maintainer
* Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>, Integrater
...
...
@@ -29,8 +29,7 @@
* - first tests with DMA look okay, they seem to work, but there is a
* problem with sound - the BusMaster IDE TimeOut should fixed this
*
*
* History:
* Ancient History:
* AMH@1999-08-24: v0.34 init_cy82c693_chip moved to pci_init_cy82c693
* ASK@1999-01-23: v0.33 made a few minor code clean ups
* removed DMA clock speed setting by default
...
...
@@ -46,6 +45,7 @@
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/delay.h>
...
...
@@ -418,29 +418,56 @@ void __init init_dma_cy82c693 (ide_hwif_t *hwif, unsigned long dmabase)
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
void
__init
init_setup_cy82c693
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
cy82c693_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
i
d
)
{
ide_pci_device_t
*
d
=
&
cy82c693_chipsets
[
id
->
driver_data
];
if
((
!
(
PCI_FUNC
(
dev
->
devfn
)
&
1
)
||
(
!
((
dev
->
class
>>
8
)
==
PCI_CLASS_STORAGE_IDE
))))
return
;
/* CY82C693 is more than only a IDE controller */
return
0
;
/* CY82C693 is more than only a IDE controller */
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
int
__init
cy82c693_scan_pcidev
(
struct
pci_dev
*
dev
)
/**
* cy82c693_remove_one - called with an Cypress is unplugged
* @dev: the device that was removed
*
* Disconnect an Cypress device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
cy82c693_remove_one
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
panic
(
"Cypress removal not yet supported"
);
}
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_CONTAQ
)
return
0
;
static
struct
pci_device_id
cy82c693_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_NVIDIA
,
PCI_DEVICE_ID_NVIDIA_NFORCE_IDE
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
0
,
},
};
for
(
d
=
cy82c693_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
;
static
struct
pci_driver
driver
=
{
name:
"Cypress IDE"
,
id_table:
cy82c693_pci_tbl
,
probe:
cy82c693_init_one
,
remove:
__devexit_p
(
cy82c693_remove_one
),
};
static
int
cy82c693_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
cy82c693_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
cy82c693_ide_init
);
module_exit
(
cy82c693_ide_exit
);
MODULE_AUTHOR
(
"Andreas Krebs, Andre Hedrick"
);
MODULE_DESCRIPTION
(
"PCI driver module for the Cypress CY82C693 IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/cy82c693.h
View file @
aa509d0d
...
...
@@ -64,17 +64,15 @@ typedef struct pio_clocks_s {
u8
time_8
;
/* clocks for 8bit (0xF0=Active/data, 0x0F=Recovery) */
}
pio_clocks_t
;
extern
void
init_setup_cy82c693
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
extern
unsigned
int
init_chipset_cy82c693
(
struct
pci_dev
*
,
const
char
*
);
extern
void
init_hwif_cy82c693
(
ide_hwif_t
*
);
extern
void
init_dma_cy82c693
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
cy82c693_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_CONTAQ
,
device:
PCI_DEVICE_ID_CONTAQ_82C693
,
name:
"CY82C693"
,
init_setup:
init_setup_cy82c693
,
init_chipset:
init_chipset_cy82c693
,
init_iops:
NULL
,
init_hwif:
init_hwif_cy82c693
,
...
...
drivers/ide/pci/generic.c
View file @
aa509d0d
/*
* linux/drivers/ide/
pci-orphan.c Version 0.01 December 8, 1997
* linux/drivers/ide/
generic.c Version 0.10 Sept 11, 2002
*
* Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org>
*/
...
...
@@ -9,6 +9,7 @@
#include <linux/config.h>
/* for CONFIG_BLK_DEV_IDEPCI */
#include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/timer.h>
...
...
@@ -84,19 +85,10 @@ static void __init init_setup_unknown (struct pci_dev *dev, ide_pci_device_t *d)
ide_setup_pci_device
(
dev
,
d
);
}
int
__init
generic_scan_pcidev
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
for
(
d
=
generic_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
;
}
}
#if 0
/* Logic to add back later on */
if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) {
ide_pci_device_t *unknown = unknown_chipset;
// unknown->vendor = dev->vendor;
...
...
@@ -105,5 +97,75 @@ int __init generic_scan_pcidev (struct pci_dev *dev)
return 1;
}
return 0;
#endif
/**
* generic_init_one - called when a PIIX is found
* @dev: the generic device
* @id: the matching pci id
*
* Called when the PCI registration layer (or the IDE initialization)
* finds a device matching our IDE device tables.
*/
static
int
__devinit
generic_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
ide_pci_device_t
*
d
=
&
generic_chipsets
[
id
->
driver_data
];
if
(
dev
->
device
!=
d
->
device
)
BUG
();
d
->
init_setup
(
dev
,
d
);
return
0
;
}
/**
* generic_remove_one - called when PCI IDE is unplugged
* @dev: the device that was removed
*
* Disconnect an IDE device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
generic_remove_one
(
struct
pci_dev
*
dev
)
{
panic
(
"PCI IDE removal not yet supported"
);
}
static
struct
pci_device_id
generic_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_NS
,
PCI_DEVICE_ID_NS_87410
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_PCTECH
,
PCI_DEVICE_ID_PCTECH_SAMURAI_IDE
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
1
},
{
PCI_VENDOR_ID_HOLTEK
,
PCI_DEVICE_ID_HOLTEK_6565
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
2
},
{
PCI_VENDOR_ID_UMC
,
PCI_DEVICE_ID_UMC_UM8673F
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
3
},
{
PCI_VENDOR_ID_UMC
,
PCI_DEVICE_ID_UMC_UM8886A
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
4
},
{
PCI_VENDOR_ID_UMC
,
PCI_DEVICE_ID_UMC_UM8886BF
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
5
},
{
PCI_VENDOR_ID_HINT
,
PCI_DEVICE_ID_HINT_VXPROII_IDE
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
6
},
{
PCI_VENDOR_ID_VIA
,
PCI_DEVICE_ID_VIA_82C561
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
7
},
{
PCI_VENDOR_ID_OPTI
,
PCI_DEVICE_ID_OPTI_82C558
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
8
},
{
0
,
},
};
static
struct
pci_driver
driver
=
{
name:
"PCI IDE"
,
id_table:
generic_pci_tbl
,
probe:
generic_init_one
,
remove:
__devexit_p
(
generic_remove_one
),
};
static
int
generic_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
generic_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
generic_ide_init
);
module_exit
(
generic_ide_exit
);
MODULE_AUTHOR
(
"Andre Hedrick"
);
MODULE_DESCRIPTION
(
"PCI driver module for generic PCI IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/generic.h
View file @
aa509d0d
...
...
@@ -11,7 +11,7 @@ static void init_hwif_generic(ide_hwif_t *);
static
void
init_dma_generic
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
generic_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_NS
,
device:
PCI_DEVICE_ID_NS_87410
,
name:
"NS87410"
,
...
...
@@ -25,7 +25,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
enablebits:
{{
0x43
,
0x08
,
0x08
},
{
0x47
,
0x08
,
0x08
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 1 */
vendor:
PCI_VENDOR_ID_PCTECH
,
device:
PCI_DEVICE_ID_PCTECH_SAMURAI_IDE
,
name:
"SAMURAI"
,
...
...
@@ -39,7 +39,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 2 */
vendor:
PCI_VENDOR_ID_HOLTEK
,
device:
PCI_DEVICE_ID_HOLTEK_6565
,
name:
"HT6565"
,
...
...
@@ -53,7 +53,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 3 */
vendor:
PCI_VENDOR_ID_UMC
,
device:
PCI_DEVICE_ID_UMC_UM8673F
,
name:
"UM8673F"
,
...
...
@@ -67,7 +67,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 4 */
vendor:
PCI_VENDOR_ID_UMC
,
device:
PCI_DEVICE_ID_UMC_UM8886A
,
name:
"UM8886A"
,
...
...
@@ -81,7 +81,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 5 */
vendor:
PCI_VENDOR_ID_UMC
,
device:
PCI_DEVICE_ID_UMC_UM8886BF
,
name:
"UM8886BF"
,
...
...
@@ -95,7 +95,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 6 */
vendor:
PCI_VENDOR_ID_HINT
,
device:
PCI_DEVICE_ID_HINT_VXPROII_IDE
,
name:
"HINT_IDE"
,
...
...
@@ -109,7 +109,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 7 */
vendor:
PCI_VENDOR_ID_VIA
,
device:
PCI_DEVICE_ID_VIA_82C561
,
name:
"VIA_IDE"
,
...
...
@@ -123,7 +123,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 8 */
vendor:
PCI_VENDOR_ID_OPTI
,
device:
PCI_DEVICE_ID_OPTI_82C558
,
name:
"OPTI621V"
,
...
...
@@ -146,7 +146,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
};
static
ide_pci_device_t
unknown_chipset
[]
__initdata
=
{
{
{
/* 0 */
vendor:
0
,
device:
0
,
name:
"PCI_IDE"
,
...
...
drivers/ide/pci/hpt34x.c
View file @
aa509d0d
/*
* linux/drivers/ide/hpt34x.c Version 0.
31 June. 9, 2000
* linux/drivers/ide/hpt34x.c Version 0.
40 Sept 10, 2002
*
* Copyright (C) 1998-2000 Andre Hedrick <andre@linux-ide.org>
* May be copied or modified under the terms of the GNU General Public License
...
...
@@ -25,6 +25,7 @@
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/delay.h>
...
...
@@ -321,34 +322,61 @@ static void __init init_dma_hpt34x (ide_hwif_t *hwif, unsigned long dmabase)
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
__init
init_setup_hpt34x
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
hpt34x_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
i
d
)
{
char
*
chipset_names
[]
=
{
"HPT343"
,
"HPT345"
};
ide_pci_device_t
*
d
=
&
hpt34x_chipsets
[
id
->
driver_data
];
static
char
*
chipset_names
[]
=
{
"HPT343"
,
"HPT345"
};
u16
pcicmd
=
0
;
pci_read_config_word
(
dev
,
PCI_COMMAND
,
&
pcicmd
);
strcpy
(
d
->
name
,
chipset_names
[(
pcicmd
&
PCI_COMMAND_MEMORY
)
?
1
:
0
])
;
d
->
name
=
chipset_names
[(
pcicmd
&
PCI_COMMAND_MEMORY
)
?
1
:
0
]
;
d
->
bootable
=
(
pcicmd
&
PCI_COMMAND_MEMORY
)
?
OFF_BOARD
:
NEVER_BOARD
;
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
int
__init
hpt34x_scan_pcidev
(
struct
pci_dev
*
dev
)
/**
* hpt34x_remove_one - called with an hpt34x is unplugged
* @dev: the device that was removed
*
* Disconnect an hpt34x device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
hpt34x_remove_one
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
panic
(
"hpt34x removal not yet supported"
);
}
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_TTI
)
return
0
;
static
struct
pci_device_id
hpt34x_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_TTI
,
PCI_DEVICE_ID_TTI_HPT343
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
0
,
},
};
for
(
d
=
hpt34x_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
;
static
struct
pci_driver
driver
=
{
name:
"HPT34x IDE"
,
id_table:
hpt34x_pci_tbl
,
probe:
hpt34x_init_one
,
remove:
__devexit_p
(
hpt34x_remove_one
),
};
static
int
hpt34x_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
hpt34x_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
hpt34x_ide_init
);
module_exit
(
hpt34x_ide_exit
);
MODULE_AUTHOR
(
"Andre Hedrick"
);
MODULE_DESCRIPTION
(
"PCI driver module for Highpoint 34x IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/hpt34x.h
View file @
aa509d0d
...
...
@@ -31,17 +31,15 @@ static ide_pci_host_proc_t hpt34x_procs[] __initdata = {
};
#endif
/* defined(DISPLAY_HPT34X_TIMINGS) && defined(CONFIG_PROC_FS) */
static
void
init_setup_hpt34x
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
unsigned
int
init_chipset_hpt34x
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_hpt34x
(
ide_hwif_t
*
);
static
void
init_dma_hpt34x
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
hpt34x_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_TTI
,
device:
PCI_DEVICE_ID_TTI_HPT343
,
name:
"HPT34X"
,
init_setup:
init_setup_hpt34x
,
init_chipset:
init_chipset_hpt34x
,
init_iops:
NULL
,
init_hwif:
init_hwif_hpt34x
,
...
...
drivers/ide/pci/hpt366.c
View file @
aa509d0d
...
...
@@ -44,6 +44,7 @@
#include <linux/config.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/timer.h>
...
...
@@ -1167,23 +1168,70 @@ static void __init init_setup_hpt366 (struct pci_dev *dev, ide_pci_device_t *d)
ide_setup_pci_device
(
dev
,
d
);
}
int
__init
hpt366_scan_pcidev
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_TTI
)
return
0
;
if
(
dev
->
device
==
PCI_DEVICE_ID_TTI_HPT343
)
return
0
;
/**
* hpt366_init_one - called when an HPT366 is found
* @dev: the hpt366 device
* @id: the matching pci id
*
* Called when the PCI registration layer (or the IDE initialization)
* finds a device matching our IDE device tables.
*/
static
int
__devinit
hpt366_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
ide_pci_device_t
*
d
=
&
hpt366_chipsets
[
id
->
driver_data
];
for
(
d
=
hpt366_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
;
}
}
if
(
dev
->
device
!=
d
->
device
)
BUG
();
d
->
init_setup
(
dev
,
d
);
return
0
;
}
/**
* hpt366_remove_one - called when an HPT366 is unplugged
* @dev: the device that was removed
*
* Disconnect a HPT366 device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
hpt366_remove_one
(
struct
pci_dev
*
dev
)
{
panic
(
"HPT366 removal not yet supported"
);
}
static
struct
pci_device_id
hpt366_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_TTI
,
PCI_DEVICE_ID_TTI_HPT366
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_TTI
,
PCI_DEVICE_ID_TTI_HPT372
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
1
},
{
PCI_VENDOR_ID_TTI
,
PCI_DEVICE_ID_TTI_HPT302
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
2
},
{
PCI_VENDOR_ID_TTI
,
PCI_DEVICE_ID_TTI_HPT371
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
3
},
{
PCI_VENDOR_ID_TTI
,
PCI_DEVICE_ID_TTI_HPT374
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
15
},
{
0
,
},
};
static
struct
pci_driver
driver
=
{
name:
"HPT366 IDE"
,
id_table:
hpt366_pci_tbl
,
probe:
hpt366_init_one
,
remove:
__devexit_p
(
hpt366_remove_one
),
};
static
int
hpt366_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
hpt366_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
hpt366_ide_init
);
module_exit
(
hpt366_ide_exit
);
MODULE_AUTHOR
(
"Andre Hedrick"
);
MODULE_DESCRIPTION
(
"PCI driver module for Highpoint HPT366 IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/hpt366.h
View file @
aa509d0d
...
...
@@ -442,7 +442,7 @@ static void init_hwif_hpt366(ide_hwif_t *);
static
void
init_dma_hpt366
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
hpt366_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_TTI
,
device:
PCI_DEVICE_ID_TTI_HPT366
,
name:
"HPT366"
,
...
...
@@ -456,7 +456,7 @@ static ide_pci_device_t hpt366_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
OFF_BOARD
,
extra:
240
},{
},{
/* 1 */
vendor:
PCI_VENDOR_ID_TTI
,
device:
PCI_DEVICE_ID_TTI_HPT372
,
name:
"HPT372A"
,
...
...
@@ -470,7 +470,7 @@ static ide_pci_device_t hpt366_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
OFF_BOARD
,
extra:
0
},{
},{
/* 2 */
vendor:
PCI_VENDOR_ID_TTI
,
device:
PCI_DEVICE_ID_TTI_HPT302
,
name:
"HPT302"
,
...
...
@@ -484,7 +484,7 @@ static ide_pci_device_t hpt366_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
OFF_BOARD
,
extra:
0
},{
},{
/* 3 */
vendor:
PCI_VENDOR_ID_TTI
,
device:
PCI_DEVICE_ID_TTI_HPT371
,
name:
"HPT371"
,
...
...
@@ -498,7 +498,7 @@ static ide_pci_device_t hpt366_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
OFF_BOARD
,
extra:
0
},{
},{
/* 4 */
vendor:
PCI_VENDOR_ID_TTI
,
device:
PCI_DEVICE_ID_TTI_HPT374
,
name:
"HPT374"
,
...
...
drivers/ide/pci/it8172.c
View file @
aa509d0d
...
...
@@ -29,6 +29,7 @@
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/ioport.h>
...
...
@@ -297,29 +298,56 @@ static void __init init_dma_it8172 (ide_hwif_t *hwif, unsigned long dmabase)
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
__init
init_setup_it8172
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
it8172_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
i
d
)
{
ide_pci_device_t
*
d
=
&
it8172_chipsets
[
id
->
driver_data
];
if
((
!
(
PCI_FUNC
(
dev
->
devfn
)
&
1
)
||
(
!
((
dev
->
class
>>
8
)
==
PCI_CLASS_STORAGE_IDE
))))
return
;
/* IT8172 is more than only a IDE controller */
return
0
;
/* IT8172 is more than only a IDE controller */
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
static
int
__init
it8172_scan_pcidev
(
struct
pci_dev
*
dev
)
/**
* it8172_remove_one - called with an IT8172 is unplugged
* @dev: the device that was removed
*
* Disconnect an IT8172 device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
it8172_remove_one
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
panic
(
"IT8172 removal not yet supported"
);
}
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_ITE
)
return
0
;
static
struct
pci_device_id
it8172_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_ITE
,
PCI_DEVICE_ID_ITE_IT8172G
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
0
,
},
};
for
(
d
=
it8172_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
;
static
struct
pci_driver
driver
=
{
name:
"IT8172IDE"
,
id_table:
it8172_pci_tbl
,
probe:
it8172_init_one
,
remove:
__devexit_p
(
it8172_remove_one
),
};
static
int
it8172_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
it8172_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
it8172_ide_init
);
module_exit
(
it8172_ide_exit
);
MODULE_AUTHOR
(
"SteveL@mvista.com"
);
MODULE_DESCRIPTION
(
"PCI driver module for ITE 8172 IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/it8172.h
View file @
aa509d0d
...
...
@@ -20,7 +20,7 @@ static void init_hwif_it8172(ide_hwif_t *);
static
void
init_dma_it8172
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
it8172_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_ITE
,
device:
PCI_DEVICE_ID_ITE_IT8172G
,
name:
"IT8172G"
,
...
...
drivers/ide/pci/ns87415.c
View file @
aa509d0d
/*
* linux/drivers/ide/ns87415.c Version
1.01 Mar. 18, 2000
* linux/drivers/ide/ns87415.c Version
2.00 Sep. 10, 2002
*
* Copyright (C) 1997-1998 Mark Lord <mlord@pobox.com>
* Copyright (C) 1998 Eddie C. Dost <ecd@skynet.be>
...
...
@@ -9,6 +9,7 @@
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/timer.h>
...
...
@@ -229,26 +230,55 @@ static void __init init_dma_ns87415 (ide_hwif_t *hwif, unsigned long dmabase)
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
__init
init_setup_ns87415
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
ns87415_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
i
d
)
{
ide_pci_device_t
*
d
=
&
ns87415_chipsets
[
id
->
driver_data
];
if
(
dev
->
device
!=
d
->
device
)
BUG
();
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
int
__init
ns87415_scan_pcidev
(
struct
pci_dev
*
dev
)
/**
* ns87415_remove_one - called with an NS87415 is unplugged
* @dev: the device that was removed
*
* Disconnect an NS87415 device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
ns87415_remove_one
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
panic
(
"NS87415 removal not yet supported"
);
}
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_NS
)
return
0
;
static
struct
pci_device_id
ns87415_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_NS
,
PCI_DEVICE_ID_NS_87415
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
0
,
},
};
for
(
d
=
ns87415_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
;
static
struct
pci_driver
driver
=
{
name:
"NS87415IDE"
,
id_table:
ns87415_pci_tbl
,
probe:
ns87415_init_one
,
remove:
__devexit_p
(
ns87415_remove_one
),
};
static
int
ns87415_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
ns87415_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
ns87415_ide_init
);
module_exit
(
ns87415_ide_exit
);
MODULE_AUTHOR
(
"Mark Lord, Eddie Dost, Andre Hedrick"
);
MODULE_DESCRIPTION
(
"PCI driver module for NS87415 IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/ns87415.h
View file @
aa509d0d
...
...
@@ -5,16 +5,14 @@
#include <linux/pci.h>
#include <linux/ide.h>
static
void
init_setup_ns87415
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
init_hwif_ns87415
(
ide_hwif_t
*
);
static
void
init_dma_ns87415
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
ns87415_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_NS
,
device:
PCI_DEVICE_ID_NS_87415
,
name:
"NS87415"
,
init_setup:
init_setup_ns87415
,
init_chipset:
NULL
,
init_iops:
NULL
,
init_hwif:
init_hwif_ns87415
,
...
...
drivers/ide/pci/nvidia.c
View file @
aa509d0d
...
...
@@ -7,6 +7,7 @@
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/delay.h>
...
...
@@ -91,8 +92,8 @@ static u8 nforce_ratemask (ide_drive_t *drive)
*/
static
int
nforce_tune_chipset
(
ide_drive_t
*
drive
,
u8
xferspeed
)
{
u8
drive_pci
[]
=
{
0x63
,
0x62
,
0x61
,
0x60
};
u8
drive_pci2
[]
=
{
0x5b
,
0x5a
,
0x59
,
0x58
};
static
const
u8
drive_pci
[]
=
{
0x63
,
0x62
,
0x61
,
0x60
};
static
const
u8
drive_pci2
[]
=
{
0x5b
,
0x5a
,
0x59
,
0x58
};
ide_hwif_t
*
hwif
=
HWIF
(
drive
);
struct
pci_dev
*
dev
=
hwif
->
pci_dev
;
...
...
@@ -336,27 +337,55 @@ static void __init init_dma_nforce (ide_hwif_t *hwif, unsigned long dmabase)
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
/* FIXME - not needed */
static
void
__init
init_setup_nforce
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
nforce_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
ide_pci_device_t
*
d
=
&
nvidia_chipsets
[
id
->
driver_data
];
if
(
dev
->
device
!=
d
->
device
)
BUG
();
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
int
__init
nforce_scan_pcidev
(
struct
pci_dev
*
dev
)
/**
* nforce_remove_one - called with an nForce is unplugged
* @dev: the device that was removed
*
* Disconnect an nForce device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
nforce_remove_one
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
panic
(
"nForce removal not yet supported"
);
}
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_NVIDIA
)
return
0
;
static
struct
pci_device_id
nforce_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_NVIDIA
,
PCI_DEVICE_ID_NVIDIA_NFORCE_IDE
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
0
,
},
};
for
(
d
=
nvidia_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
;
static
struct
pci_driver
driver
=
{
name:
"nForce IDE"
,
id_table:
nforce_pci_tbl
,
probe:
nforce_init_one
,
remove:
__devexit_p
(
nforce_remove_one
),
};
static
int
nforce_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
nforce_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
nforce_ide_init
);
module_exit
(
nforce_ide_exit
);
MODULE_AUTHOR
(
"Andre Hedrick"
);
MODULE_DESCRIPTION
(
"PCI driver module for nVidia nForce IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/nvidia.h
View file @
aa509d0d
...
...
@@ -25,7 +25,6 @@ static ide_pci_host_proc_t nforce_procs[] __initdata = {
};
#endif
/* defined(DISPLAY_NFORCE_TIMINGS) && defined(CONFIG_PROC_FS) */
static
void
init_setup_nforce
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
unsigned
int
init_chipset_nforce
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_nforce
(
ide_hwif_t
*
);
static
void
init_dma_nforce
(
ide_hwif_t
*
,
unsigned
long
);
...
...
@@ -35,7 +34,6 @@ static ide_pci_device_t nvidia_chipsets[] __initdata = {
vendor:
PCI_VENDOR_ID_NVIDIA
,
device:
PCI_DEVICE_ID_NVIDIA_NFORCE_IDE
,
name:
"NFORCE"
,
init_setup:
init_setup_nforce
,
init_chipset:
init_chipset_nforce
,
init_iops:
NULL
,
init_hwif:
init_hwif_nforce
,
...
...
@@ -45,12 +43,8 @@ static ide_pci_device_t nvidia_chipsets[] __initdata = {
enablebits:
{{
0x50
,
0x01
,
0x01
},
{
0x50
,
0x02
,
0x02
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
vendor:
0
,
device:
0
,
channels:
0
,
bootable:
EOL
,
}
};
#endif
/* NFORCE_H */
drivers/ide/pci/opti621.c
View file @
aa509d0d
/*
* linux/drivers/ide/opti621.c Version 0.
6 Jan 02, 1999
* linux/drivers/ide/opti621.c Version 0.
7 Sept 10, 2002
*
* Copyright (C) 1996-1998 Linus Torvalds & authors (see below)
*/
...
...
@@ -91,6 +91,7 @@
#define OPTI621_DEBUG
/* define for debug messages */
#include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/timer.h>
...
...
@@ -363,21 +364,56 @@ static void __init init_setup_opti621 (struct pci_dev *dev, ide_pci_device_t *d)
ide_setup_pci_device
(
dev
,
d
);
}
int
__init
opti621_scan_pcidev
(
struct
pci_dev
*
dev
)
static
int
__devinit
opti621_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
ide_pci_device_t
*
d
;
ide_pci_device_t
*
d
=
&
opti621_chipsets
[
id
->
driver_data
];
if
(
dev
->
device
!=
d
->
device
)
BUG
();
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_OPTI
)
return
0
;
/**
* opti621_remove_one - called with an Opti621 is unplugged
* @dev: the device that was removed
*
* Disconnect an Opti621 device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
opti621_remove_one
(
struct
pci_dev
*
dev
)
{
panic
(
"Opti621 removal not yet supported"
);
}
for
(
d
=
opti621_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
;
static
struct
pci_device_id
opti621_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_OPTI
,
PCI_DEVICE_ID_OPTI_82C621
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_OPTI
,
PCI_DEVICE_ID_OPTI_82C825
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
1
},
{
0
,
},
};
static
struct
pci_driver
driver
=
{
name:
"Opti621 IDE"
,
id_table:
opti621_pci_tbl
,
probe:
opti621_init_one
,
remove:
__devexit_p
(
opti621_remove_one
),
};
static
int
opti621_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
opti621_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
opti621_ide_init
);
module_exit
(
opti621_ide_exit
);
MODULE_AUTHOR
(
"Jaromir Koutek, Jan Harkes, Mark Lord"
);
MODULE_DESCRIPTION
(
"PCI driver module for Opti621 IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/opti621.h
View file @
aa509d0d
...
...
@@ -10,7 +10,7 @@ static void init_hwif_opti621(ide_hwif_t *);
static
void
init_dma_opti621
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
opti621_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_OPTI
,
device:
PCI_DEVICE_ID_OPTI_82C621
,
name:
"OPTI621"
,
...
...
@@ -24,7 +24,7 @@ static ide_pci_device_t opti621_chipsets[] __initdata = {
enablebits:
{{
0x45
,
0x80
,
0x00
},
{
0x40
,
0x08
,
0x00
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 1 */
vendor:
PCI_VENDOR_ID_OPTI
,
device:
PCI_DEVICE_ID_OPTI_82C825
,
name:
"OPTI621X"
,
...
...
drivers/ide/pci/pdcadma.c
View file @
aa509d0d
/*
* linux/drivers/ide/pdcadma.c Version 0.0
1 June 21, 2001
* linux/drivers/ide/pdcadma.c Version 0.0
5 Sept 10, 2002
*
* Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org>
* May be copied or modified under the terms of the GNU General Public License
...
...
@@ -127,26 +127,55 @@ static void __init init_dma_pdcadma (ide_hwif_t *hwif, unsigned long dmabase)
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
__init
init_setup_pdcadma
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
pdcadma_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
i
d
)
{
ide_pci_device_t
*
d
=
&
pdcadma_chipsets
[
id
->
driver_data
];
if
(
dev
->
device
!=
d
->
device
)
BUG
();
ide_setup_pci_device
(
dev
,
d
);
return
1
;
}
int
__init
pdcadma_scan_pcidev
(
struct
pci_dev
*
dev
)
/**
* pdcadma_remove_one - called when a PDCADMA is unplugged
* @dev: the device that was removed
*
* Disconnect a PDCADMA device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
pdcadma_remove_one
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_PDC
)
return
0
;
for
(
d
=
pdcadma_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
;
panic
(
"PDCADMA removal not yet supported"
);
}
static
struct
pci_device_id
pdcadma_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_PDC
,
PCI_DEVICE_ID_PDC_1841
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
0
,
},
};
static
struct
pci_driver
driver
=
{
name:
"PDCADMA-IDE"
,
id_table:
pdcadma_pci_tbl
,
probe:
pdcadma_init_one
,
remove:
__devexit_p
(
pdcadma_remove_one
),
};
static
int
pdcadma_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
pdcadma_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
pdcadma_ide_init
);
module_exit
(
pdcadma_ide_exit
);
MODULE_AUTHOR
(
"Andre Hedrick"
);
MODULE_DESCRIPTION
(
"PCI driver module for PDCADMA IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/pdcadma.h
View file @
aa509d0d
...
...
@@ -31,7 +31,7 @@ static void init_hwif_pdcadma(ide_hwif_t *);
static
void
init_dma_pdcadma
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
pdcadma_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_PDC
,
device:
PCI_DEVICE_ID_PDC_1841
,
name:
"PDCADMA"
,
...
...
drivers/ide/pci/piix.c
View file @
aa509d0d
...
...
@@ -55,6 +55,7 @@
#include <linux/config.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/ioport.h>
#include <linux/pci.h>
...
...
@@ -664,29 +665,79 @@ static void __init init_setup_piix (struct pci_dev *dev, ide_pci_device_t *d)
}
/**
* piix_scan_pcidev - Check for and initialize PIIX IDE
* @dev: PCI device to check
* piix_init_one - called when a PIIX is found
* @dev: the piix device
* @id: the matching pci id
*
* Checks if the passed device is an Intel PIIX device. If so the
* hardware is initialized and we return 1 to claim the device. If not
* we return 0.
* Called when the PCI registration layer (or the IDE initialization)
* finds a device matching our IDE device tables.
*/
int
__init
piix_scan_pcidev
(
struct
pci_dev
*
dev
)
static
int
__devinit
piix_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
ide_pci_device_t
*
d
;
ide_pci_device_t
*
d
=
&
piix_pci_info
[
id
->
driver_data
]
;
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_INTEL
)
return
0
;
for
(
d
=
piix_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
;
}
}
if
(
dev
->
device
!=
d
->
device
)
BUG
();
d
->
init_setup
(
dev
,
d
);
return
0
;
}
/**
* piix_remove_one - called with a PIIX is unplugged
* @dev: the device that was removed
*
* Disconnect a PIIX device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
piix_remove_one
(
struct
pci_dev
*
dev
)
{
panic
(
"PIIX removal not yet supported"
);
}
static
struct
pci_device_id
piix_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82371FB_0
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82371FB_1
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
1
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82371MX
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
2
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82371SB_1
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
3
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82371AB
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
4
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801AB_1
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
5
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82443MX_1
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
6
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801AA_1
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
7
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82372FB_1
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
8
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82451NX
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
9
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801BA_9
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
10
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801BA_8
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
11
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801CA_10
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
12
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801CA_11
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
13
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801DB_11
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
14
},
{
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82801E_11
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
15
},
{
0
,
},
};
static
struct
pci_driver
driver
=
{
name:
"PIIX IDE"
,
id_table:
piix_pci_tbl
,
probe:
piix_init_one
,
remove:
__devexit_p
(
piix_remove_one
),
};
static
int
piix_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
piix_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
piix_ide_init
);
module_exit
(
piix_ide_exit
);
MODULE_AUTHOR
(
"Andre Hedrick, Andrzej Krzysztofowicz"
);
MODULE_DESCRIPTION
(
"PCI driver module for Intel PIIX IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/piix.h
View file @
aa509d0d
...
...
@@ -28,12 +28,18 @@ static ide_pci_host_proc_t piix_procs[] __initdata = {
#endif
/* defined(DISPLAY_PIIX_TIMINGS) && defined(CONFIG_PROC_FS) */
static
void
init_setup_piix
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
unsigned
int
init_chipset_piix
(
struct
pci_dev
*
,
const
char
*
);
static
unsigned
int
__init
init_chipset_piix
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_piix
(
ide_hwif_t
*
);
static
void
init_dma_piix
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
piix_chipsets
[]
__initdata
=
{
{
/*
* Table of the various PIIX capability blocks
*
*/
static
ide_pci_device_t
piix_pci_info
[]
__devinit
=
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_INTEL
,
device:
PCI_DEVICE_ID_INTEL_82371FB_0
,
name:
"PIIXa"
,
...
...
@@ -47,7 +53,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits:
{{
0x41
,
0x80
,
0x80
},
{
0x43
,
0x80
,
0x80
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 1 */
vendor:
PCI_VENDOR_ID_INTEL
,
device:
PCI_DEVICE_ID_INTEL_82371FB_1
,
name:
"PIIXb"
,
...
...
@@ -61,7 +67,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits:
{{
0x41
,
0x80
,
0x80
},
{
0x43
,
0x80
,
0x80
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 2 */
vendor:
PCI_VENDOR_ID_INTEL
,
device:
PCI_DEVICE_ID_INTEL_82371MX
,
name:
"MPIIX"
,
...
...
@@ -75,7 +81,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits:
{{
0x6D
,
0x80
,
0x80
},
{
0x6F
,
0x80
,
0x80
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 3 */
vendor:
PCI_VENDOR_ID_INTEL
,
device:
PCI_DEVICE_ID_INTEL_82371SB_1
,
name:
"PIIX3"
,
...
...
@@ -89,7 +95,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits:
{{
0x41
,
0x80
,
0x80
},
{
0x43
,
0x80
,
0x80
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 4 */
vendor:
PCI_VENDOR_ID_INTEL
,
device:
PCI_DEVICE_ID_INTEL_82371AB
,
name:
"PIIX4"
,
...
...
@@ -103,7 +109,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits:
{{
0x41
,
0x80
,
0x80
},
{
0x43
,
0x80
,
0x80
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 5 */
vendor:
PCI_VENDOR_ID_INTEL
,
device:
PCI_DEVICE_ID_INTEL_82801AB_1
,
name:
"ICH0"
,
...
...
@@ -117,7 +123,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits:
{{
0x41
,
0x80
,
0x80
},
{
0x43
,
0x80
,
0x80
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 6 */
vendor:
PCI_VENDOR_ID_INTEL
,
device:
PCI_DEVICE_ID_INTEL_82443MX_1
,
name:
"PIIX4"
,
...
...
@@ -131,7 +137,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits:
{{
0x41
,
0x80
,
0x80
},
{
0x43
,
0x80
,
0x80
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 7 */
vendor:
PCI_VENDOR_ID_INTEL
,
device:
PCI_DEVICE_ID_INTEL_82801AA_1
,
name:
"ICH"
,
...
...
@@ -145,7 +151,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits:
{{
0x41
,
0x80
,
0x80
},
{
0x43
,
0x80
,
0x80
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 8 */
vendor:
PCI_VENDOR_ID_INTEL
,
device:
PCI_DEVICE_ID_INTEL_82372FB_1
,
name:
"PIIX4"
,
...
...
@@ -159,7 +165,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits:
{{
0x41
,
0x80
,
0x80
},
{
0x43
,
0x80
,
0x80
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 9 */
vendor:
PCI_VENDOR_ID_INTEL
,
device:
PCI_DEVICE_ID_INTEL_82451NX
,
name:
"PIIX4"
,
...
...
@@ -173,7 +179,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits:
{{
0x41
,
0x80
,
0x80
},
{
0x43
,
0x80
,
0x80
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 10 */
vendor:
PCI_VENDOR_ID_INTEL
,
device:
PCI_DEVICE_ID_INTEL_82801BA_9
,
name:
"ICH2"
,
...
...
@@ -187,7 +193,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits:
{{
0x41
,
0x80
,
0x80
},
{
0x43
,
0x80
,
0x80
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 11 */
vendor:
PCI_VENDOR_ID_INTEL
,
device:
PCI_DEVICE_ID_INTEL_82801BA_8
,
name:
"ICH2M"
,
...
...
@@ -201,7 +207,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits:
{{
0x41
,
0x80
,
0x80
},
{
0x43
,
0x80
,
0x80
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 12 */
vendor:
PCI_VENDOR_ID_INTEL
,
device:
PCI_DEVICE_ID_INTEL_82801CA_10
,
name:
"ICH3M"
,
...
...
@@ -215,7 +221,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits:
{{
0x41
,
0x80
,
0x80
},
{
0x43
,
0x80
,
0x80
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 13 */
vendor:
PCI_VENDOR_ID_INTEL
,
device:
PCI_DEVICE_ID_INTEL_82801CA_11
,
name:
"ICH3"
,
...
...
@@ -229,7 +235,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits:
{{
0x41
,
0x80
,
0x80
},
{
0x43
,
0x80
,
0x80
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 14 */
vendor:
PCI_VENDOR_ID_INTEL
,
device:
PCI_DEVICE_ID_INTEL_82801DB_11
,
name:
"ICH4"
,
...
...
@@ -243,7 +249,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits:
{{
0x41
,
0x80
,
0x80
},
{
0x43
,
0x80
,
0x80
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 15 */
vendor:
PCI_VENDOR_ID_INTEL
,
device:
PCI_DEVICE_ID_INTEL_82801E_11
,
name:
"C-ICH"
,
...
...
drivers/ide/pci/rz1000.c
View file @
aa509d0d
...
...
@@ -19,6 +19,7 @@
#include <linux/config.h>
/* for CONFIG_BLK_DEV_IDEPCI */
#include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/timer.h>
...
...
@@ -55,26 +56,57 @@ static void __init init_hwif_rz1000 (ide_hwif_t *hwif)
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
__init
init_setup_rz1000
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
rz1000_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
i
d
)
{
ide_pci_device_t
*
d
=
&
rz1000_chipsets
[
id
->
driver_data
];
if
(
dev
->
device
!=
d
->
device
)
BUG
();
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
int
__init
rz1000_scan_pcidev
(
struct
pci_dev
*
dev
)
/**
* rz1000_remove_one - called with an RZ1000 is unplugged
* @dev: the device that was removed
*
* Disconnect an RZ1000 device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
rz1000_remove_one
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_PCTECH
)
return
0
;
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
;
panic
(
"RZ1000 removal not yet supported"
);
}
static
struct
pci_device_id
rz1000_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_PCTECH
,
PCI_DEVICE_ID_PCTECH_RZ1000
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_PCTECH
,
PCI_DEVICE_ID_PCTECH_RZ1001
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
1
},
{
0
,
},
};
static
struct
pci_driver
driver
=
{
name:
"RZ1000 IDE"
,
id_table:
rz1000_pci_tbl
,
probe:
rz1000_init_one
,
remove:
__devexit_p
(
rz1000_remove_one
),
};
static
int
rz1000_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
rz1000_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
rz1000_ide_init
);
module_exit
(
rz1000_ide_exit
);
MODULE_AUTHOR
(
"Andre Hedrick"
);
MODULE_DESCRIPTION
(
"PCI driver module for RZ1000 IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/rz1000.h
View file @
aa509d0d
...
...
@@ -5,7 +5,6 @@
#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
=
{
...
...
@@ -13,7 +12,6 @@ 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
,
...
...
@@ -27,7 +25,6 @@ static ide_pci_device_t rz1000_chipsets[] __initdata = {
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
,
...
...
drivers/ide/pci/serverworks.c
View file @
aa509d0d
/*
* linux/drivers/ide/serverworks.c Version 0.
6 05 April
2002
* linux/drivers/ide/serverworks.c Version 0.
7 10 Sept
2002
*
* Copyright (C) 1998-2000 Michel Aubry
* Copyright (C) 1998-2000 Andrzej Krzysztofowicz
...
...
@@ -25,6 +25,7 @@
#include <linux/config.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/ioport.h>
#include <linux/pci.h>
...
...
@@ -766,21 +767,73 @@ static void __init init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
ide_setup_pci_device
(
dev
,
d
);
}
int
__init
serverworks_scan_pcidev
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_SERVERWORKS
)
return
0
;
/**
* svwks_init_one - called when a OSB/CSB is found
* @dev: the svwks device
* @id: the matching pci id
*
* Called when the PCI registration layer (or the IDE initialization)
* finds a device matching our IDE device tables.
*/
static
int
__devinit
svwks_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
ide_pci_device_t
*
d
=
&
serverworks_chipsets
[
id
->
driver_data
];
for
(
d
=
serverworks_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
;
}
}
if
(
dev
->
device
!=
d
->
device
)
BUG
();
d
->
init_setup
(
dev
,
d
);
return
0
;
}
/**
* svwks_remove_one - called when an OSB/CSB is unplugged
* @dev: the device that was removed
*
* Disconnect a SVWKS device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
svwks_remove_one
(
struct
pci_dev
*
dev
)
{
panic
(
"SVWKS removal not yet supported"
);
}
static
struct
pci_device_id
svwks_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_SERVERWORKS
,
PCI_DEVICE_ID_SERVERWORKS_OSB4IDE
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_SERVERWORKS
,
PCI_DEVICE_ID_SERVERWORKS_CSB5IDE
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
1
},
{
PCI_VENDOR_ID_SERVERWORKS
,
PCI_DEVICE_ID_SERVERWORKS_CSB6IDE
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
2
},
{
PCI_VENDOR_ID_SERVERWORKS
,
PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
3
},
{
0
,
},
};
static
struct
pci_driver
driver
=
{
name:
"Serverworks IDE"
,
id_table:
svwks_pci_tbl
,
probe:
svwks_init_one
,
remove:
__devexit_p
(
svwks_remove_one
),
#if 0 /* FIXME: implement */
suspend: ,
resume: ,
#endif
};
static
int
svwks_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
svwks_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
svwks_ide_init
);
module_exit
(
svwks_ide_exit
);
MODULE_AUTHOR
(
"Michael Aubry. Andrzej Krzysztofowicz, Andre Hedrick"
);
MODULE_DESCRIPTION
(
"PCI driver module for Serverworks OSB4/CSB5/CSB6 IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/serverworks.h
View file @
aa509d0d
...
...
@@ -38,7 +38,7 @@ static void init_hwif_svwks(ide_hwif_t *);
static
void
init_dma_svwks
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
serverworks_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_SERVERWORKS
,
device:
PCI_DEVICE_ID_SERVERWORKS_OSB4IDE
,
name:
"SvrWks OSB4"
,
...
...
@@ -52,7 +52,7 @@ static ide_pci_device_t serverworks_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 1 */
vendor:
PCI_VENDOR_ID_SERVERWORKS
,
device:
PCI_DEVICE_ID_SERVERWORKS_CSB5IDE
,
name:
"SvrWks CSB5"
,
...
...
@@ -66,7 +66,7 @@ static ide_pci_device_t serverworks_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 2 */
vendor:
PCI_VENDOR_ID_SERVERWORKS
,
device:
PCI_DEVICE_ID_SERVERWORKS_CSB6IDE
,
name:
"SvrWks CSB6"
,
...
...
@@ -80,7 +80,7 @@ static ide_pci_device_t serverworks_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 3 */
vendor:
PCI_VENDOR_ID_SERVERWORKS
,
device:
PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2
,
name:
"SvrWks CSB6"
,
...
...
drivers/ide/pci/siimage.c
View file @
aa509d0d
/*
* linux/drivers/ide/siimage.c Version 1.0
0 May 9
, 2002
* linux/drivers/ide/siimage.c Version 1.0
1 Sept 11
, 2002
*
* Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org>
*/
#include <linux/config.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/hdreg.h>
...
...
@@ -836,26 +837,57 @@ static void __init init_dma_siimage (ide_hwif_t *hwif, unsigned long dmabase)
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
__init
init_setup_siimage
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
siimage_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
ide_pci_device_t
*
d
=
&
siimage_chipsets
[
id
->
driver_data
];
if
(
dev
->
device
!=
d
->
device
)
BUG
();
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
int
__init
siimage_scan_pcidev
(
struct
pci_dev
*
dev
)
/**
* siimage_remove_one - called when an SI IDE is unplugged
* @dev: the device that was removed
*
* Disconnect an IDE device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
siimage_remove_one
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
panic
(
"SiImage IDE removal not yet supported"
);
}
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_CMD
)
return
0
;
static
struct
pci_device_id
siimage_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_CMD
,
PCI_DEVICE_ID_SII_680
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_CMD
,
PCI_DEVICE_ID_SII_3112
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
1
},
{
0
,
},
};
for
(
d
=
siimage_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
;
static
struct
pci_driver
driver
=
{
name:
"SiI IDE"
,
id_table:
siimage_pci_tbl
,
probe:
siimage_init_one
,
remove:
__devexit_p
(
siimage_remove_one
),
};
static
int
siimage_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
siimage_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
siimage_ide_init
);
module_exit
(
siimage_ide_exit
);
MODULE_AUTHOR
(
"Andre Hedrick"
);
MODULE_DESCRIPTION
(
"PCI driver module for SiI IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/siimage.h
View file @
aa509d0d
...
...
@@ -107,18 +107,16 @@ static ide_pci_host_proc_t siimage_procs[] __initdata = {
};
#endif
/* DISPLAY_SIIMAGE_TIMINGS && CONFIG_PROC_FS */
static
void
init_setup_siimage
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
unsigned
int
init_chipset_siimage
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_iops_siimage
(
ide_hwif_t
*
);
static
void
init_hwif_siimage
(
ide_hwif_t
*
);
static
void
init_dma_siimage
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
siimage_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_CMD
,
device:
PCI_DEVICE_ID_SII_680
,
name:
"SiI680"
,
init_setup:
init_setup_siimage
,
init_chipset:
init_chipset_siimage
,
init_iops:
init_iops_siimage
,
init_hwif:
init_hwif_siimage
,
...
...
@@ -128,11 +126,10 @@ static ide_pci_device_t siimage_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 1 */
vendor:
PCI_VENDOR_ID_CMD
,
device:
PCI_DEVICE_ID_SII_3112
,
name:
"SiI3112 Serial ATA"
,
init_setup:
init_setup_siimage
,
init_chipset:
init_chipset_siimage
,
init_iops:
init_iops_siimage
,
init_hwif:
init_hwif_siimage
,
...
...
drivers/ide/pci/sis5513.c
View file @
aa509d0d
/*
* linux/drivers/ide/sis5513.c Version 0.14
July 24
, 2002
* linux/drivers/ide/sis5513.c Version 0.14
ac Sept 11
, 2002
*
* Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org>
* Copyright (C) 2002 Lionel Bouton <Lionel.Bouton@inet6.fr>, Maintainer
...
...
@@ -34,6 +34,7 @@
#include <linux/config.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/timer.h>
...
...
@@ -1022,26 +1023,56 @@ static void __init init_dma_sis5513 (ide_hwif_t *hwif, unsigned long dmabase)
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
__init
init_setup_sis5513
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
sis5513_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
ide_pci_device_t
*
d
=
&
sis5513_chipsets
[
id
->
driver_data
];
if
(
dev
->
device
!=
d
->
device
)
BUG
();
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
int
__init
sis5513_scan_pcidev
(
struct
pci_dev
*
dev
)
/**
* sis5513_remove_one - called when SIS IDE is unplugged
* @dev: the device that was removed
*
* Disconnect a SIS IDE device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
sis5513_remove_one
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
panic
(
"SIS IDE removal not yet supported"
);
}
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_SI
)
return
0
;
static
struct
pci_device_id
sis5513_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_SI
,
PCI_DEVICE_ID_SI_5513
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
0
,
},
};
for
(
d
=
sis5513_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
;
static
struct
pci_driver
driver
=
{
name:
"SIS IDE"
,
id_table:
sis5513_pci_tbl
,
probe:
sis5513_init_one
,
remove:
__devexit_p
(
sis5513_remove_one
),
};
static
int
sis5513_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
sis5513_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
sis5513_ide_init
);
module_exit
(
sis5513_ide_exit
);
MODULE_AUTHOR
(
"Lionel Bouton, L C Chang, Andre Hedrick"
);
MODULE_DESCRIPTION
(
"PCI driver module for SIS IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/sis5513.h
View file @
aa509d0d
...
...
@@ -25,17 +25,15 @@ static ide_pci_host_proc_t sis_procs[] __initdata = {
};
#endif
/* defined(DISPLAY_SIS_TIMINGS) && defined(CONFIG_PROC_FS) */
static
void
init_setup_sis5513
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
unsigned
int
init_chipset_sis5513
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_sis5513
(
ide_hwif_t
*
);
static
void
init_dma_sis5513
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
sis5513_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_SI
,
device:
PCI_DEVICE_ID_SI_5513
,
name:
"SIS5513"
,
init_setup:
init_setup_sis5513
,
init_chipset:
init_chipset_sis5513
,
init_iops:
NULL
,
init_hwif:
init_hwif_sis5513
,
...
...
drivers/ide/pci/sl82c105.c
View file @
aa509d0d
...
...
@@ -11,6 +11,7 @@
#include <linux/config.h>
#include <linux/types.h>
#include <linuyx/module.h>
#include <linux/kernel.h>
#include <linux/timer.h>
#include <linux/mm.h>
...
...
@@ -281,26 +282,54 @@ static void __init init_hwif_sl82c105(ide_hwif_t *hwif)
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
__init
init_setup_sl82c105
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
sl82c105_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
i
d
)
{
ide_pci_device_t
*
d
=
&
slc82c105_chipsets
[
id
->
driver_data
];
if
(
dev
->
device
!=
d
->
device
)
BUG
();
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
int
__init
sl82c105_scan_pcidev
(
struct
pci_dev
*
dev
)
/**
* sl82c105_remove_one - called with an SLC82c105 is unplugged
* @dev: the device that was removed
*
* Disconnect an W82C105 device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
sl82c105_remove_one
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
panic
(
"W82C105 removal not yet supported"
);
}
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_WINBOND
)
return
0
;
static
struct
pci_device_id
sl82c105_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_WINBOND
,
PCI_DEVICE_ID_WINBOND_82C105
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
0
,
},
};
for
(
d
=
sl82c105_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
;
static
struct
pci_driver
driver
=
{
name:
"W82C105 IDE"
,
id_table:
sl82c105_pci_tbl
,
probe:
sl82c105_init_one
,
remove:
__devexit_p
(
sl82c105_remove_one
),
};
static
int
sl82c105_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
sl82c105_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
sl82c105_ide_init
);
module_exit
(
sl82c105_ide_exit
);
MODULE_DESCRIPTION
(
"PCI driver module for W82C105 IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/sl82c105.h
View file @
aa509d0d
...
...
@@ -5,17 +5,15 @@
#include <linux/pci.h>
#include <linux/ide.h>
static
void
init_setup_sl82c105
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
unsigned
int
init_chipset_sl82c105
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_sl82c105
(
ide_hwif_t
*
);
static
void
init_dma_sl82c105
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
sl82c105_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_WINBOND
,
device:
PCI_DEVICE_ID_WINBOND_82C105
,
name:
"W82C105"
,
init_setup:
init_setup_sl82c105
,
init_chipset:
init_chipset_sl82c105
,
init_iops:
NULL
,
init_hwif:
init_hwif_sl82c105
,
...
...
drivers/ide/pci/slc90e66.c
View file @
aa509d0d
/*
* linux/drivers/ide/slc90e66.c Version 0.1
0 October 4, 2000
* linux/drivers/ide/slc90e66.c Version 0.1
1 September 11, 2002
*
* Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org>
*
...
...
@@ -10,6 +10,7 @@
#include <linux/config.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/ioport.h>
#include <linux/pci.h>
...
...
@@ -364,26 +365,56 @@ static void __init init_dma_slc90e66 (ide_hwif_t *hwif, unsigned long dmabase)
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
void
__init
init_setup_slc90e66
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
slc90e66_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
ide_pci_device_t
*
d
=
&
slc90e66_chipsets
[
id
->
driver_data
];
if
(
dev
->
device
!=
d
->
device
)
BUG
();
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
int
__init
slc90e66_scan_pcidev
(
struct
pci_dev
*
dev
)
/**
* slc90e66_remove_one - called with an slc90e66 is unplugged
* @dev: the device that was removed
*
* Disconnect an slc90e66 device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
slc90e66_remove_one
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
panic
(
"slc90e66 removal not yet supported"
);
}
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_EFAR
)
return
0
;
static
struct
pci_device_id
slc90e66_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_EFAR
,
PCI_DEVICE_ID_EFAR_SLC90E66_1
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
0
,
},
};
for
(
d
=
slc90e66_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
;
static
struct
pci_driver
driver
=
{
name:
"SLC90e66 IDE"
,
id_table:
slc90e66_pci_tbl
,
probe:
slc90e66_init_one
,
remove:
__devexit_p
(
slc90e66_remove_one
),
};
static
int
slc90e66_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
slc90e66_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
slc90e66_ide_init
);
module_exit
(
slc90e66_ide_exit
);
MODULE_AUTHOR
(
"Andre Hedrick"
);
MODULE_DESCRIPTION
(
"PCI driver module for SLC90E66 IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/slc90e66.h
View file @
aa509d0d
...
...
@@ -27,17 +27,15 @@ static ide_pci_host_proc_t slc90e66_procs[] __initdata = {
};
#endif
/* defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS) */
static
void
init_setup_slc90e66
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
unsigned
int
init_chipset_slc90e66
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_slc90e66
(
ide_hwif_t
*
);
static
void
init_dma_slc90e66
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
slc90e66_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_EFAR
,
device:
PCI_DEVICE_ID_EFAR_SLC90E66_1
,
name:
"SLC90E66"
,
init_setup:
init_setup_slc90e66
,
init_chipset:
init_chipset_slc90e66
,
init_iops:
NULL
,
init_hwif:
init_hwif_slc90e66
,
...
...
drivers/ide/pci/trm290.c
View file @
aa509d0d
...
...
@@ -126,6 +126,7 @@
#include <linux/config.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/ioport.h>
...
...
@@ -191,7 +192,7 @@ static int trm290_ide_dma_write (ide_drive_t *drive /*, struct request *rq */)
trm290_prepare_drive
(
drive
,
0
);
/* select PIO xfer */
return
1
;
#endif
if
(
!
(
count
=
ide_build_dmatable
(
drive
,
rq
)))
{
if
(
!
(
count
=
ide_build_dmatable
(
drive
,
rq
,
PCI_DMA_TODEVICE
)))
{
/* try PIO instead of DMA */
trm290_prepare_drive
(
drive
,
0
);
/* select PIO xfer */
return
1
;
...
...
@@ -235,7 +236,7 @@ static int trm290_ide_dma_read (ide_drive_t *drive /*, struct request *rq */)
task_ioreg_t
command
=
WIN_NOP
;
unsigned
int
count
,
reading
=
2
,
writing
=
0
;
if
(
!
(
count
=
ide_build_dmatable
(
drive
,
rq
)))
{
if
(
!
(
count
=
ide_build_dmatable
(
drive
,
rq
,
PCI_DMA_FROMDEVICE
)))
{
/* try PIO instead of DMA */
trm290_prepare_drive
(
drive
,
0
);
/* select PIO xfer */
return
1
;
...
...
@@ -396,26 +397,55 @@ void __init init_hwif_trm290 (ide_hwif_t *hwif)
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
void
__init
init_setup_trm290
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
trm290_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
i
d
)
{
ide_pci_device_t
*
d
=
&
trm290_chipsets
[
id
->
driver_data
];
if
(
dev
->
device
!=
d
->
device
)
BUG
();
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
int
__init
trm290_scan_pcidev
(
struct
pci_dev
*
dev
)
/**
* trm290_remove_one - called when an trm290 is unplugged
* @dev: the device that was removed
*
* Disconnect a trm290 device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static
void
trm290_remove_one
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
panic
(
"trm290 removal not yet supported"
);
}
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_TEKRAM
)
return
0
;
static
struct
pci_device_id
trm290_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_TEKRAM
,
PCI_DEVICE_ID_TEKRAM_DC290
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
0
,
},
};
for
(
d
=
trm290_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
;
static
struct
pci_driver
driver
=
{
name:
"TRM290 IDE"
,
id_table:
trm290_pci_tbl
,
probe:
trm290_init_one
,
remove:
__devexit_p
(
trm290_remove_one
),
};
static
int
trm290_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
trm290_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
trm290_ide_init
);
module_exit
(
trm290_ide_exit
);
MODULE_AUTHOR
(
"Mark Lord"
);
MODULE_DESCRIPTION
(
"PCI driver module for Tekram TRM290 IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/trm290.h
View file @
aa509d0d
...
...
@@ -5,15 +5,13 @@
#include <linux/pci.h>
#include <linux/ide.h>
extern
void
init_setup_trm290
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
extern
void
init_hwif_trm290
(
ide_hwif_t
*
);
static
ide_pci_device_t
trm290_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_TEKRAM
,
device:
PCI_DEVICE_ID_TEKRAM_DC290
,
name:
"TRM290"
,
init_setup:
init_setup_trm290
,
init_chipset:
NULL
,
init_iops:
NULL
,
init_hwif:
init_hwif_trm290
,
...
...
drivers/ide/pci/via82cxxx.c
View file @
aa509d0d
/*
* $Id: via82cxxx.c,v 3.35-ac
1 2002/08/19
Alan Exp $
* $Id: via82cxxx.c,v 3.35-ac
2 2002/09/111
Alan Exp $
*
* Copyright (c) 2000-2001 Vojtech Pavlik
*
...
...
@@ -33,6 +33,7 @@
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/ioport.h>
#include <linux/blkdev.h>
...
...
@@ -161,7 +162,7 @@ static int via_get_info(char *buffer, char **addr, off_t offset, int count)
via_print
(
"Highest DMA rate: %s"
,
via_dma
[
via_config
->
flags
&
VIA_UDMA
]);
via_print
(
"BM-DMA base: %#x"
,
via_base
);
via_print
(
"BM-DMA base: %#
l
x"
,
via_base
);
via_print
(
"PCI clock: %d.%dMHz"
,
via_clock
/
1000
,
via_clock
/
100
%
10
);
...
...
@@ -634,38 +635,56 @@ static void __init init_dma_via82cxxx(ide_hwif_t *hwif, unsigned long dmabase)
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
/*
* FIXME: should not be needed
*/
static
void
__init
init_setup_via82cxxx
(
struct
pci_dev
*
dev
,
ide_pci_device_t
*
d
)
static
int
__devinit
via_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
ide_pci_device_t
*
d
=
&
via82cxxx_chipsets
[
id
->
driver_data
];
if
(
dev
->
device
!=
d
->
device
)
BUG
();
ide_setup_pci_device
(
dev
,
d
);
return
0
;
}
/**
* via
82cxxx_scan_pcidev - set up any via devices
* @dev:
PCI device we are offer
ed
* via
_remove_one - called with a VIA IDE interface is unplugged
* @dev:
the device that was remov
ed
*
*
Any controller we are offered that we can configure we set up
*
and return 1. Anything we cannot drive we return 0
*
Disconnect a VIA IDE device that has been unplugged either by hotplug
*
or by a more civilized notification scheme. Not yet supported.
*/
int
__init
via82cxxx_scan_pcidev
(
struct
pci_dev
*
dev
)
static
void
via_remove_one
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
panic
(
"VIA IDE removal not yet supported"
);
}
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_VIA
)
return
0
;
static
struct
pci_device_id
via_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_VIA
,
PCI_DEVICE_ID_VIA_82C576_1
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_VIA
,
PCI_DEVICE_ID_VIA_82C586_1
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
1
},
{
0
,
},
};
for
(
d
=
via82cxxx_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
;
static
struct
pci_driver
driver
=
{
name:
"VIA IDE"
,
id_table:
via_pci_tbl
,
probe:
via_init_one
,
remove:
__devexit_p
(
via_remove_one
),
};
static
int
via_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
via_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
via_ide_init
);
module_exit
(
via_ide_exit
);
MODULE_AUTHOR
(
"Vojtech Pavlik, Michel Aubry, Jeff Garzik, Andre Hedrick"
);
MODULE_DESCRIPTION
(
"PCI driver module for VIA IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/via82cxxx.h
View file @
aa509d0d
...
...
@@ -25,17 +25,15 @@ static ide_pci_host_proc_t via_procs[] __initdata = {
};
#endif
/* DISPLAY_VIA_TIMINGS && CONFIG_PROC_FS */
static
void
init_setup_via82cxxx
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
static
unsigned
int
init_chipset_via82cxxx
(
struct
pci_dev
*
,
const
char
*
);
static
void
init_hwif_via82cxxx
(
ide_hwif_t
*
);
static
void
init_dma_via82cxxx
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
via82cxxx_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_VIA
,
device:
PCI_DEVICE_ID_VIA_82C576_1
,
name:
"VP_IDE"
,
init_setup:
init_setup_via82cxxx
,
init_chipset:
init_chipset_via82cxxx
,
init_iops:
NULL
,
init_hwif:
init_hwif_via82cxxx
,
...
...
@@ -45,11 +43,10 @@ static ide_pci_device_t via82cxxx_chipsets[] __initdata = {
enablebits:
{{
0x40
,
0x02
,
0x02
},
{
0x40
,
0x01
,
0x01
}},
bootable:
ON_BOARD
,
extra:
0
,
},{
},{
/* 1 */
vendor:
PCI_VENDOR_ID_VIA
,
device:
PCI_DEVICE_ID_VIA_82C586_1
,
name:
"VP_IDE"
,
init_setup:
init_setup_via82cxxx
,
init_chipset:
init_chipset_via82cxxx
,
init_iops:
NULL
,
init_hwif:
init_hwif_via82cxxx
,
...
...
drivers/ide/setup-pci.c
View file @
aa509d0d
...
...
@@ -712,6 +712,8 @@ void ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_t *d)
probe_hwif_init
(
&
ide_hwifs
[
index_list
.
b
.
high
]);
}
EXPORT_SYMBOL_GPL
(
ide_setup_pci_device
);
void
ide_setup_pci_devices
(
struct
pci_dev
*
dev
,
struct
pci_dev
*
dev2
,
ide_pci_device_t
*
d
)
{
ata_index_t
index_list
=
do_ide_setup_pci_device
(
dev
,
d
,
1
);
...
...
@@ -727,152 +729,10 @@ void ide_setup_pci_devices (struct pci_dev *dev, struct pci_dev *dev2, ide_pci_d
probe_hwif_init
(
&
ide_hwifs
[
index_list2
.
b
.
high
]);
}
/*
* ide_scan_pcibus() gets invoked at boot time from ide.c.
* It finds all PCI IDE controllers and calls ide_setup_pci_device for them.
*/
void
__init
ide_scan_pcidev
(
struct
pci_dev
*
dev
)
{
#if 0
printk(" PCI slot %s, VID=%04x, DID=%04x\n",
dev->slot_name, dev->vendor, dev->device);
#endif
if
((
dev
->
vendor
==
PCI_VENDOR_ID_CMD
)
&&
(
dev
->
device
==
PCI_DEVICE_ID_CMD_640
))
{
return
;
#ifdef CONFIG_BLK_DEV_ALI15X3
}{
extern
int
ali15x3_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
ali15x3_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_ALI15X3 */
#ifdef CONFIG_BLK_DEV_AMD74XX
}{
extern
int
amd74xx_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
amd74xx_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_AMD74XX */
#ifdef CONFIG_BLK_DEV_CS5530
}{
extern
int
cs5530_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
cs5530_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_CS5530 */
#ifdef CONFIG_BLK_DEV_CY82C693
}{
extern
int
cy82c693_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
cy82c693_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_CY82C693 */
#ifdef CONFIG_BLK_DEV_IT8172
}{
extern
int
it8172_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
it8172_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_IT8172 */
#ifdef CONFIG_BLK_DEV_NFORCE
}{
extern
int
nforce_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
nforce_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_NFORCE */
#ifdef CONFIG_BLK_DEV_NS87415
}{
extern
int
ns87415_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
ns87415_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_NS87415 */
#ifdef CONFIG_BLK_DEV_OPTI621
}{
extern
int
opti621_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
opti621_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_OPTI621 */
#ifdef CONFIG_BLK_DEV_PIIX
}{
extern
int
piix_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
piix_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_PIIX */
#ifdef CONFIG_BLK_DEV_RZ1000
}{
extern
int
rz1000_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
rz1000_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_RZ1000 */
#ifdef CONFIG_BLK_DEV_SVWKS
}{
extern
int
serverworks_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
serverworks_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_SVWKS */
#ifdef CONFIG_BLK_DEV_SIS5513
}{
extern
int
sis5513_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
sis5513_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_SIS5513 */
#ifdef CONFIG_BLK_DEV_SLC90E66
}{
extern
int
slc90e66_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
slc90e66_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_SLC90E66 */
#ifdef CONFIG_BLK_DEV_VIA82CXXX
}{
extern
int
via82cxxx_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
via82cxxx_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_VIA82CXXX */
#ifdef CONFIG_BLK_DEV_AEC62XX
}{
extern
int
aec62xx_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
aec62xx_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_AEC62XX */
#ifdef CONFIG_BLK_DEV_CMD64X
}{
extern
int
cmd64x_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
cmd64x_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_CMD64X */
#ifdef CONFIG_BLK_DEV_HPT34X
}{
extern
int
hpt34x_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
hpt34x_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_HPT34X */
#ifdef CONFIG_BLK_DEV_HPT366
}{
extern
int
hpt366_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
hpt366_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_HPT366 */
#ifdef CONFIG_BLK_DEV_PDC202XX_OLD
}{
extern
int
pdc202xx_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
pdc202xx_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_PDC202XX_OLD */
#ifdef CONFIG_BLK_DEV_PDC202XX_NEW
}{
extern
int
pdcnew_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
pdcnew_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_PDC202XX_NEW */
#ifdef CONFIG_BLK_DEV_PDC_ADMA
}{
extern
int
pdcadma_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
pdcadma_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_PDC_ADMA */
#ifdef CONFIG_BLK_DEV_SIIMAGE
}{
extern
int
siimage_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
siimage_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_SIIMAGE */
#ifdef CONFIG_BLK_DEV_SL82C105
}{
extern
int
sl82c105_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
sl82c105_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_SL82C105 */
#ifdef CONFIG_BLK_DEV_TRM290
}{
extern
int
trm290_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
trm290_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_TRM290 */
#ifdef CONFIG_BLK_DEV_GENERIC
}{
extern
int
generic_scan_pcidev
(
struct
pci_dev
*
dev
);
if
(
generic_scan_pcidev
(
dev
))
return
;
#endif
/* CONFIG_BLK_DEV_GENERIC */
}
}
EXPORT_SYMBOL_GPL
(
ide_setup_pci_devices
);
/*
* Module interfaces
- not yet functional.
* Module interfaces
*/
static
int
pre_init
=
1
;
/* Before first ordered IDE scan */
...
...
@@ -893,15 +753,15 @@ static LIST_HEAD(ide_pci_drivers);
* Returns are the same as for pci_register_driver
*/
int
ide_
register_pci
_driver
(
struct
pci_driver
*
driver
)
int
ide_
pci_register
_driver
(
struct
pci_driver
*
driver
)
{
if
(
!
pre_init
)
return
pci_
register_driver
(
driver
);
return
pci_
module_init
(
driver
);
list_add_tail
(
&
driver
->
node
,
&
ide_pci_drivers
);
return
0
;
}
EXPORT_SYMBOL
(
ide_register_pci
_driver
);
EXPORT_SYMBOL
_GPL
(
ide_pci_register
_driver
);
/**
* ide_unregister_pci_driver - unregister an IDE driver
...
...
@@ -911,7 +771,7 @@ EXPORT_SYMBOL(ide_register_pci_driver);
* as for pci_unregister_driver
*/
void
ide_
unregister_pci
_driver
(
struct
pci_driver
*
driver
)
void
ide_
pci_unregister
_driver
(
struct
pci_driver
*
driver
)
{
if
(
!
pre_init
)
pci_unregister_driver
(
driver
);
...
...
@@ -919,7 +779,40 @@ void ide_unregister_pci_driver(struct pci_driver *driver)
list_del
(
&
driver
->
node
);
}
EXPORT_SYMBOL
(
ide_unregister_pci_driver
);
EXPORT_SYMBOL_GPL
(
ide_pci_unregister_driver
);
/**
* ide_scan_pcidev - find an IDE driver for a device
* @dev: PCI device to check
*
* Look for an IDE driver to handle the device we are considering.
* This is only used during boot up to get the ordering correct. After
* boot up the pci layer takes over the job.
*/
static
int
__init
ide_scan_pcidev
(
struct
pci_dev
*
dev
)
{
struct
list_head
*
l
;
struct
pci_driver
*
d
;
list_for_each
(
l
,
&
ide_pci_drivers
)
{
d
=
list_entry
(
l
,
struct
pci_driver
,
node
);
if
(
d
->
id_table
)
{
const
struct
pci_device_id
*
id
=
pci_match_device
(
d
->
id_table
,
dev
);
if
(
id
!=
NULL
)
{
if
(
d
->
probe
(
dev
,
id
)
>=
0
)
{
dev
->
driver
=
d
;
return
1
;
}
}
}
}
return
0
;
}
/**
* ide_scan_pcibus - perform the initial IDE driver scan
...
...
@@ -933,6 +826,8 @@ EXPORT_SYMBOL(ide_unregister_pci_driver);
void
__init
ide_scan_pcibus
(
int
scan_direction
)
{
struct
pci_dev
*
dev
;
struct
pci_driver
*
d
;
struct
list_head
*
l
,
*
n
;
pre_init
=
0
;
if
(
!
scan_direction
)
{
...
...
@@ -944,5 +839,16 @@ void __init ide_scan_pcibus (int scan_direction)
ide_scan_pcidev
(
dev
);
}
}
/* FIXME: now add the drivers list to the real pci probe list */
/*
* Hand the drivers over to the PCI layer now we
* are post init.
*/
list_for_each_safe
(
l
,
n
,
&
ide_pci_drivers
)
{
list_del
(
l
);
d
=
list_entry
(
l
,
struct
pci_driver
,
node
);
pci_register_driver
(
d
);
}
}
include/linux/ide.h
View file @
aa509d0d
...
...
@@ -904,9 +904,7 @@ extern inline void ide_unmap_buffer(struct request *rq, char *buffer, unsigned l
((1<<ide_pci)|(1<<ide_cmd646)|(1<<ide_ali14xx))
#define IDE_CHIPSET_IS_PCI(c) ((IDE_CHIPSET_PCI_MASK >> (c)) & 1)
#ifdef CONFIG_BLK_DEV_IDEPCI
struct
ide_pci_device_s
;
#endif
/* CONFIG_BLK_DEV_IDEPCI */
typedef
struct
hwif_s
{
struct
hwif_s
*
next
;
/* for linked-list in ide_hwgroup_t */
...
...
@@ -937,10 +935,8 @@ typedef struct hwif_s {
hwif_chipset_t
chipset
;
/* sub-module for tuning.. */
#ifdef CONFIG_BLK_DEV_IDEPCI
struct
pci_dev
*
pci_dev
;
/* for pci chipsets */
struct
ide_pci_device_s
*
cds
;
/* chipset device struct */
#endif
/* CONFIG_BLK_DEV_IDEPCI */
#if 0
ide_hwif_ops_t *hwifops;
...
...
@@ -1108,12 +1104,10 @@ typedef struct hwgroup_s {
/* ptr to current hwif in linked-list */
ide_hwif_t
*
hwif
;
#ifdef CONFIG_BLK_DEV_IDEPCI
/* for pci chipsets */
struct
pci_dev
*
pci_dev
;
/* chipset device struct */
struct
ide_pci_device_s
*
cds
;
#endif
/* CONFIG_BLK_DEV_IDEPCI */
/* current request */
struct
request
*
rq
;
...
...
@@ -1637,23 +1631,16 @@ extern void ide_intr(int irq, void *dev_id, struct pt_regs *regs);
extern
void
do_ide_request
(
request_queue_t
*
);
extern
void
ide_init_subdrivers
(
void
);
#ifndef _IDE_C
extern
struct
block_device_operations
ide_fops
[];
extern
ide_proc_entry_t
generic_subdriver_entries
[];
#endif
extern
int
ata_attach
(
ide_drive_t
*
);
#ifdef _IDE_C
#ifdef CONFIG_BLK_DEV_IDE
extern
int
ideprobe_init
(
void
);
#ifdef CONFIG_BLK_DEV_IDEPCI
extern
void
ide_scan_pcibus
(
int
scan_direction
)
__init
;
#endif
/* CONFIG_BLK_DEV_IDEPCI */
#endif
/* CONFIG_BLK_DEV_IDE */
#endif
/* _IDE_C */
extern
int
ide_pci_register_driver
(
struct
pci_driver
*
driver
);
extern
void
ide_pci_unregister_driver
(
struct
pci_driver
*
driver
);
extern
void
default_hwif_iops
(
ide_hwif_t
*
);
extern
void
default_hwif_mmiops
(
ide_hwif_t
*
);
...
...
@@ -1665,8 +1652,6 @@ int ide_register_subdriver (ide_drive_t *drive, ide_driver_t *driver, int versio
int
ide_unregister_subdriver
(
ide_drive_t
*
drive
);
int
ide_replace_subdriver
(
ide_drive_t
*
drive
,
const
char
*
driver
);
#ifdef CONFIG_BLK_DEV_IDEPCI
#ifdef CONFIG_PROC_FS
typedef
struct
ide_pci_host_proc_s
{
char
*
name
;
...
...
@@ -1716,14 +1701,9 @@ typedef struct ide_pci_device_s {
struct
ide_pci_device_s
*
next
;
}
ide_pci_device_t
;
#ifdef LINUX_PCI_H
extern
void
ide_setup_pci_device
(
struct
pci_dev
*
,
ide_pci_device_t
*
);
extern
void
ide_setup_pci_devices
(
struct
pci_dev
*
,
struct
pci_dev
*
,
ide_pci_device_t
*
);
#endif
/* LINUX_PCI_H */
#endif
/* CONFIG_BLK_DEV_IDEPCI */
#ifdef CONFIG_BLK_DEV_IDEDMA
#define BAD_DMA_DRIVE 0
#define GOOD_DMA_DRIVE 1
extern
int
ide_build_dmatable
(
ide_drive_t
*
,
struct
request
*
);
...
...
@@ -1750,7 +1730,6 @@ extern int __ide_dma_verbose(ide_drive_t *);
extern
int
__ide_dma_retune
(
ide_drive_t
*
);
extern
int
__ide_dma_lostirq
(
ide_drive_t
*
);
extern
int
__ide_dma_timeout
(
ide_drive_t
*
);
#endif
/* CONFIG_BLK_DEV_IDEDMA */
extern
void
hwif_unregister
(
ide_hwif_t
*
);
...
...
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