Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
c8b74f4b
Commit
c8b74f4b
authored
Sep 16, 2002
by
Jens Axboe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update promise drivers to new ide pci init scheme, remove now unused
old pdc202xx.c
parent
aa509d0d
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
139 additions
and
1220 deletions
+139
-1220
drivers/ide/pci/pdc202xx.c
drivers/ide/pci/pdc202xx.c
+0
-1181
drivers/ide/pci/pdc202xx_new.c
drivers/ide/pci/pdc202xx_new.c
+64
-13
drivers/ide/pci/pdc202xx_new.h
drivers/ide/pci/pdc202xx_new.h
+7
-7
drivers/ide/pci/pdc202xx_old.c
drivers/ide/pci/pdc202xx_old.c
+63
-14
drivers/ide/pci/pdc202xx_old.h
drivers/ide/pci/pdc202xx_old.h
+5
-5
No files found.
drivers/ide/pci/pdc202xx.c
deleted
100644 → 0
View file @
aa509d0d
This diff is collapsed.
Click to expand it.
drivers/ide/pci/pdc202xx_new.c
View file @
c8b74f4b
...
...
@@ -15,6 +15,7 @@
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/delay.h>
...
...
@@ -646,21 +647,71 @@ static void __init init_setup_pdc20276 (struct pci_dev *dev, ide_pci_device_t *d
ide_setup_pci_device
(
dev
,
d
);
}
int
__init
pdcnew_scan_pcidev
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
/**
* pdc202new_init_one - called when a pdc202xx is found
* @dev: the pdc202new device
* @id: the matching pci id
*
* Called when the PCI registration layer (or the IDE initialization)
* finds a device matching our IDE device tables.
*/
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_PROMISE
)
return
0
;
static
int
__devinit
pdc202new_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
ide_pci_device_t
*
d
=
&
pdcnew_chipsets
[
id
->
driver_data
];
for
(
d
=
pdcnew_chipsets
;
d
&&
d
->
vendor
&&
d
->
device
;
++
d
)
{
if
(((
d
->
vendor
==
dev
->
vendor
)
&&
(
d
->
device
==
dev
->
device
))
&&
(
d
->
init_setup
))
{
if
(
dev
->
device
!=
d
->
device
)
BUG
();
d
->
init_setup
(
dev
,
d
);
return
1
;
}
}
return
0
;
}
/**
* pdc202new_remove_one - called when a pdc202xx 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
pdc202new_remove_one
(
struct
pci_dev
*
dev
)
{
panic
(
"Promise IDE removal not yet supported"
);
}
static
struct
pci_device_id
pdc202new_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_PROMISE
,
PCI_DEVICE_ID_PROMISE_20268
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_PROMISE
,
PCI_DEVICE_ID_PROMISE_20269
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
1
},
{
PCI_VENDOR_ID_PROMISE
,
PCI_DEVICE_ID_PROMISE_20270
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
2
},
{
PCI_VENDOR_ID_PROMISE
,
PCI_DEVICE_ID_PROMISE_20271
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
3
},
{
PCI_VENDOR_ID_PROMISE
,
PCI_DEVICE_ID_PROMISE_20275
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
4
},
{
PCI_VENDOR_ID_PROMISE
,
PCI_DEVICE_ID_PROMISE_20276
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
5
},
{
PCI_VENDOR_ID_PROMISE
,
PCI_DEVICE_ID_PROMISE_20277
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
6
},
{
0
,
},
};
static
struct
pci_driver
driver
=
{
name:
"Promise IDE"
,
id_table:
pdc202new_pci_tbl
,
probe:
pdc202new_init_one
,
remove:
__devexit_p
(
pdc202new_remove_one
),
};
static
int
pdc202new_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
pdc202new_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
pdc202new_ide_init
);
module_exit
(
pdc202new_ide_exit
);
MODULE_AUTHOR
(
"Andre Hedrick, Frank Tiernan"
);
MODULE_DESCRIPTION
(
"PCI driver module for Promise PDC20268 and higher"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/pdc202xx_new.h
View file @
c8b74f4b
...
...
@@ -226,7 +226,7 @@ static void init_hwif_pdc202new(ide_hwif_t *);
static
void
init_dma_pdc202new
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
pdcnew_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_PROMISE
,
device:
PCI_DEVICE_ID_PROMISE_20268
,
name:
"PDC20268"
,
...
...
@@ -240,7 +240,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
OFF_BOARD
,
extra:
0
,
},{
},{
/* 1 */
vendor:
PCI_VENDOR_ID_PROMISE
,
device:
PCI_DEVICE_ID_PROMISE_20269
,
name:
"PDC20269"
,
...
...
@@ -254,7 +254,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
OFF_BOARD
,
extra:
0
,
},{
},{
/* 2 */
vendor:
PCI_VENDOR_ID_PROMISE
,
device:
PCI_DEVICE_ID_PROMISE_20270
,
name:
"PDC20270"
,
...
...
@@ -272,7 +272,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = {
#endif
bootable:
OFF_BOARD
,
extra:
0
,
},{
},{
/* 3 */
vendor:
PCI_VENDOR_ID_PROMISE
,
device:
PCI_DEVICE_ID_PROMISE_20271
,
name:
"PDC20271"
,
...
...
@@ -286,7 +286,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
OFF_BOARD
,
extra:
0
,
},{
},{
/* 4 */
vendor:
PCI_VENDOR_ID_PROMISE
,
device:
PCI_DEVICE_ID_PROMISE_20275
,
name:
"PDC20275"
,
...
...
@@ -300,7 +300,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = {
enablebits:
{{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
}},
bootable:
OFF_BOARD
,
extra:
0
,
},{
},{
/* 5 */
vendor:
PCI_VENDOR_ID_PROMISE
,
device:
PCI_DEVICE_ID_PROMISE_20276
,
name:
"PDC20276"
,
...
...
@@ -318,7 +318,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = {
#endif
bootable:
OFF_BOARD
,
extra:
0
,
},{
},{
/* 6 */
vendor:
PCI_VENDOR_ID_PROMISE
,
device:
PCI_DEVICE_ID_PROMISE_20277
,
name:
"PDC20277"
,
...
...
drivers/ide/pci/pdc202xx_old.c
View file @
c8b74f4b
/*
* linux/drivers/ide/pdc202xx.c Version 0.3
5 Mar. 30
, 2002
* linux/drivers/ide/pdc202xx.c Version 0.3
6 Sept 11
, 2002
*
* Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>
*
...
...
@@ -30,6 +30,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>
...
...
@@ -918,21 +919,69 @@ static void __init init_setup_pdc202xx (struct pci_dev *dev, ide_pci_device_t *d
ide_setup_pci_device
(
dev
,
d
);
}
int
__init
pdc202xx_scan_pcidev
(
struct
pci_dev
*
dev
)
{
ide_pci_device_t
*
d
;
/**
* pdc202xx_init_one - called when a PDC202xx is found
* @dev: the pdc202xx device
* @id: the matching pci id
*
* Called when the PCI registration layer (or the IDE initialization)
* finds a device matching our IDE device tables.
*/
if
(
dev
->
vendor
!=
PCI_VENDOR_ID_PROMISE
)
return
0
;
static
int
__devinit
pdc202xx_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
ide_pci_device_t
*
d
=
&
pdc202xx_chipsets
[
id
->
driver_data
];
for
(
d
=
pdc202xx_chipsets
;
d
&&
d
->
vendor
&&
d
->
device
;
++
d
)
{
if
(((
d
->
vendor
==
dev
->
vendor
)
&&
(
d
->
device
==
dev
->
device
))
&&
(
d
->
init_setup
))
{
if
(
dev
->
device
!=
d
->
device
)
BUG
();
d
->
init_setup
(
dev
,
d
);
return
1
;
}
}
return
0
;
}
/**
* pdc202xx_remove_one - called with the IDE to be 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
pdc202xx_remove_one
(
struct
pci_dev
*
dev
)
{
panic
(
"Promise IDE removal not yet supported"
);
}
static
struct
pci_device_id
pdc202xx_pci_tbl
[]
__devinitdata
=
{
{
PCI_VENDOR_ID_PROMISE
,
PCI_DEVICE_ID_PROMISE_20246
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
0
},
{
PCI_VENDOR_ID_PROMISE
,
PCI_DEVICE_ID_PROMISE_20262
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
1
},
{
PCI_VENDOR_ID_PROMISE
,
PCI_DEVICE_ID_PROMISE_20263
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
2
},
{
PCI_VENDOR_ID_PROMISE
,
PCI_DEVICE_ID_PROMISE_20265
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
3
},
{
PCI_VENDOR_ID_PROMISE
,
PCI_DEVICE_ID_PROMISE_20267
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
4
},
{
0
,
},
};
static
struct
pci_driver
driver
=
{
name:
"Promise Old IDE"
,
id_table:
pdc202xx_pci_tbl
,
probe:
pdc202xx_init_one
,
remove:
__devexit_p
(
pdc202xx_remove_one
),
};
static
int
pdc202xx_ide_init
(
void
)
{
return
ide_pci_register_driver
(
&
driver
);
}
static
void
pdc202xx_ide_exit
(
void
)
{
ide_pci_unregister_driver
(
&
driver
);
}
module_init
(
pdc202xx_ide_init
);
module_exit
(
pdc202xx_ide_exit
);
MODULE_AUTHOR
(
"Andre Hedrick, Frank Tiernan"
);
MODULE_DESCRIPTION
(
"PCI driver module for older Promise IDE"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_NO_SYMBOLS
;
drivers/ide/pci/pdc202xx_old.h
View file @
c8b74f4b
...
...
@@ -226,7 +226,7 @@ static void init_hwif_pdc202xx(ide_hwif_t *);
static
void
init_dma_pdc202xx
(
ide_hwif_t
*
,
unsigned
long
);
static
ide_pci_device_t
pdc202xx_chipsets
[]
__initdata
=
{
{
{
/* 0 */
vendor:
PCI_VENDOR_ID_PROMISE
,
device:
PCI_DEVICE_ID_PROMISE_20246
,
name:
"PDC20246"
,
...
...
@@ -244,7 +244,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __initdata = {
#endif
bootable:
OFF_BOARD
,
extra:
16
,
},{
},{
/* 1 */
vendor:
PCI_VENDOR_ID_PROMISE
,
device:
PCI_DEVICE_ID_PROMISE_20262
,
name:
"PDC20262"
,
...
...
@@ -262,7 +262,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __initdata = {
#endif
bootable:
OFF_BOARD
,
extra:
48
,
},{
},{
/* 2 */
vendor:
PCI_VENDOR_ID_PROMISE
,
device:
PCI_DEVICE_ID_PROMISE_20263
,
name:
"PDC20263"
,
...
...
@@ -280,7 +280,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __initdata = {
#endif
bootable:
OFF_BOARD
,
extra:
48
,
},{
},{
/* 3 */
vendor:
PCI_VENDOR_ID_PROMISE
,
device:
PCI_DEVICE_ID_PROMISE_20265
,
name:
"PDC20265"
,
...
...
@@ -297,7 +297,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __initdata = {
#endif
bootable:
OFF_BOARD
,
extra:
48
,
},{
},{
/* 4 */
vendor:
PCI_VENDOR_ID_PROMISE
,
device:
PCI_DEVICE_ID_PROMISE_20267
,
name:
"PDC20267"
,
...
...
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