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
79d00d1d
Commit
79d00d1d
authored
Nov 23, 2002
by
Kai Germaschewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ISDN: Update eicon driver for removal of pcibios_*
Fairly obviously, but untested.
parent
6caf77e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
150 additions
and
283 deletions
+150
-283
drivers/isdn/eicon/divas.h
drivers/isdn/eicon/divas.h
+1
-2
drivers/isdn/eicon/lincfg.c
drivers/isdn/eicon/lincfg.c
+138
-267
drivers/isdn/eicon/linio.c
drivers/isdn/eicon/linio.c
+10
-12
drivers/isdn/eicon/uxio.h
drivers/isdn/eicon/uxio.h
+1
-2
No files found.
drivers/isdn/eicon/divas.h
View file @
79d00d1d
...
@@ -103,8 +103,7 @@ typedef struct
...
@@ -103,8 +103,7 @@ typedef struct
int
card_id
;
/* unique id assigned to this card */
int
card_id
;
/* unique id assigned to this card */
int
card_type
;
/* use DIA_CARD_TYPE_xxx above */
int
card_type
;
/* use DIA_CARD_TYPE_xxx above */
int
bus_type
;
/* use DIA_BUS_TYPE_xxx above */
int
bus_type
;
/* use DIA_BUS_TYPE_xxx above */
int
bus_num
;
/* bus number (instance number of bus type) */
struct
pci_dev
*
pdev
;
int
func_num
;
/* adapter function number (PCI register) */
int
slot
;
/* slot number in bus */
int
slot
;
/* slot number in bus */
unsigned
char
irq
;
/* IRQ number */
unsigned
char
irq
;
/* IRQ number */
int
reset_base
;
/* Reset register for I/O mapped cards */
int
reset_base
;
/* Reset register for I/O mapped cards */
...
...
drivers/isdn/eicon/lincfg.c
View file @
79d00d1d
...
@@ -42,310 +42,182 @@ int FPGA_Done=0;
...
@@ -42,310 +42,182 @@ int FPGA_Done=0;
int
DivasCardsDiscover
(
void
)
int
DivasCardsDiscover
(
void
)
{
{
struct
pci_dev
*
pdev
=
NULL
;
word
wNumCards
=
0
,
wDeviceIndex
=
0
;
word
wNumCards
=
0
,
wDeviceIndex
=
0
;
byte
byBus
,
byFunc
;
word
PCItmp
;
word
wPCIConsultation
,
PCItmp
;
dword
j
,
i
;
dword
j
,
i
;
unsigned
int
PCIserial
;
unsigned
int
PCIserial
;
dia_card_t
Card
;
dia_card_t
Card
;
byte
*
b
;
byte
*
b
;
while
(
wDeviceIndex
<
10
)
while
((
pdev
=
pci_find_device
(
PCI_VENDOR_ID_EICON
,
{
PCI_DEVICE_ID_EICON_MAESTRAQ
,
wPCIConsultation
=
pcibios_find_device
(
PCI_VENDOR_ID_EICON
,
pdev
)))
{
PCI_DEVICE_ID_EICON_MAESTRAQ
,
dword
dwRAM
,
dwDivasIOBase
,
dwCFG
,
dwCTL
;
wDeviceIndex
,
&
byBus
,
&
byFunc
);
if
(
wPCIConsultation
==
PCIBIOS_SUCCESSFUL
)
{
dword
dwRAM
,
dwDivasIOBase
,
dwCFG
,
dwCTL
;
byte
byIRQ
;
printk
(
KERN_DEBUG
"Divas: DIVA Server 4BRI Found
\n
"
);
printk
(
KERN_DEBUG
"Divas: DIVA Server 4BRI Found
\n
"
);
pcibios_read_config_dword
(
byBus
,
byFunc
,
PCI_BASE_ADDRESS_2
,(
unsigned
int
*
)
&
dwRAM
);
dwRAM
&=
0xFFC00000
;
dwRAM
=
pci_resource_start
(
pdev
,
2
);
dwDivasIOBase
=
pci_resource_start
(
pdev
,
1
);
pcibios_read_config_dword
(
byBus
,
byFunc
,
PCI_BASE_ADDRESS_1
,(
unsigned
int
*
)
&
dwDivasIOBase
);
dwCFG
=
pci_resource_start
(
pdev
,
0
);
dwDivasIOBase
&=
0xFFFFFF00
;
dwCTL
=
pci_resource_start
(
pdev
,
3
);
pcibios_read_config_dword
(
byBus
,
byFunc
,
PCI_BASE_ADDRESS_0
,(
unsigned
int
*
)
&
dwCFG
);
/* Retrieve the serial number */
dwCFG
&=
0xFFFFFF00
;
pci_write_config_word
(
pdev
,
0x4E
,
0x00FC
);
for
(
j
=
0
,
PCItmp
=
0
;
j
<
10000
&&
!
PCItmp
;
j
++
)
{
pcibios_read_config_dword
(
byBus
,
byFunc
,
PCI_BASE_ADDRESS_3
,(
unsigned
int
*
)
&
dwCTL
);
pci_read_config_word
(
pdev
,
0x4E
,
&
PCItmp
);
dwCTL
&=
0xFFFFE000
;
PCItmp
&=
0x8000
;
// extract done flag
}
pci_read_config_dword
(
pdev
,
0x50
,
&
PCIserial
);
pcibios_read_config_byte
(
byBus
,
byFunc
,
PCI_INTERRUPT_LINE
,
&
byIRQ
);
/* Retrieve the serial number */
pcibios_write_config_word
(
byBus
,
byFunc
,
0x4E
,
0x00FC
);
for
(
j
=
0
,
PCItmp
=
0
;
j
<
10000
&&
!
PCItmp
;
j
++
)
{
pcibios_read_config_word
(
byBus
,
byFunc
,
0x4E
,
&
PCItmp
);
PCItmp
&=
0x8000
;
// extract done flag
}
pcibios_read_config_dword
(
byBus
,
byFunc
,
0x50
,
&
PCIserial
);
Card
.
memory
[
DIVAS_RAM_MEMORY
]
=
ioremap
(
dwRAM
,
0x400000
);
Card
.
memory
[
DIVAS_RAM_MEMORY
]
=
ioremap
(
dwRAM
,
0x400000
);
Card
.
memory
[
DIVAS_CTL_MEMORY
]
=
ioremap
(
dwCTL
,
0x2000
);
Card
.
memory
[
DIVAS_CTL_MEMORY
]
=
ioremap
(
dwCTL
,
0x2000
);
Card
.
memory
[
DIVAS_CFG_MEMORY
]
=
ioremap
(
dwCFG
,
0x100
);
Card
.
memory
[
DIVAS_CFG_MEMORY
]
=
ioremap
(
dwCFG
,
0x100
);
Card
.
io_base
=
dwDivasIOBase
;
Card
.
io_base
=
dwDivasIOBase
;
Card
.
irq
=
byIRQ
;
Card
.
card_type
=
DIA_CARD_TYPE_DIVA_SERVER_Q
;
Card
.
bus_type
=
DIA_BUS_TYPE_PCI
;
Card
.
pdev
=
pdev
;
Card
.
irq
=
pdev
->
irq
;
Card
.
card_type
=
DIA_CARD_TYPE_DIVA_SERVER_Q
;
FPGA_Done
=
0
;
Card
.
bus_type
=
DIA_BUS_TYPE_PCI
;
/* Create four virtual card structures as we want to treat
FPGA_Done
=
0
;
the 4Bri card as 4 Bri cards*/
for
(
i
=
0
;
i
<
4
;
i
++
)
{
/* Create four virtual card structures as we want to treat
b
=
Card
.
memory
[
DIVAS_RAM_MEMORY
];
the 4Bri card as 4 Bri cards*/
b
+=
(
MQ_PROTCODE_OFFSET
)
*
(
i
==
0
?
0
:
1
);
for
(
i
=
0
;
i
<
4
;
i
++
)
DPRINTF
((
"divas: offset = 0x%x"
,
i
*
MQ_PROTCODE_OFFSET
));
{
Card
.
memory
[
DIVAS_RAM_MEMORY
]
=
b
;
b
=
Card
.
memory
[
DIVAS_RAM_MEMORY
];
b
+=
(
MQ_PROTCODE_OFFSET
)
*
(
i
==
0
?
0
:
1
);
DPRINTF
((
"divas: offset = 0x%x"
,
i
*
MQ_PROTCODE_OFFSET
));
Card
.
memory
[
DIVAS_RAM_MEMORY
]
=
b
;
b
=
Card
.
memory
[
DIVAS_RAM_MEMORY
];
b
=
Card
.
memory
[
DIVAS_RAM_MEMORY
];
b
+=
MQ_SM_OFFSET
;
b
+=
MQ_SM_OFFSET
;
Card
.
memory
[
DIVAS_SHARED_MEMORY
]
=
b
;
Card
.
memory
[
DIVAS_SHARED_MEMORY
]
=
b
;
Card
.
bus_num
=
byBus
;
Card
.
slot
=
-
1
;
Card
.
func_num
=
byFunc
;
Card
.
slot
=
-
1
;
/* Fill in Name */
Card
.
name
[
0
]
=
'D'
;
Card
.
name
[
1
]
=
'I'
;
Card
.
name
[
2
]
=
'V'
;
Card
.
name
[
3
]
=
'A'
;
Card
.
name
[
4
]
=
'S'
;
Card
.
name
[
5
]
=
'Q'
;
Card
.
name
[
6
]
=
'0'
+
i
;
Card
.
name
[
7
]
=
'\0'
;
Card
.
serial
=
PCIserial
;
Card
.
card_id
=
wNumCards
;
if
(
DivasCardNew
(
&
Card
)
!=
0
)
{
// Force for loop to terminate
i
=
4
;
continue
;
}
wNumCards
++
;
}
//for
}
wDeviceIndex
++
;
}
wDeviceIndex
=
0
;
while
(
wDeviceIndex
<
10
)
{
wPCIConsultation
=
pcibios_find_device
(
PCI_VENDOR_ID_EICON
,
PCI_DEVICE_ID_EICON_MAESTRA
,
wDeviceIndex
,
&
byBus
,
&
byFunc
);
if
(
wPCIConsultation
==
PCIBIOS_SUCCESSFUL
)
{
dword
dwPLXIOBase
,
dwDivasIOBase
;
byte
byIRQ
;
printk
(
KERN_DEBUG
"Divas: DIVA Server BRI (S/T) Found
\n
"
);
pcibios_read_config_dword
(
byBus
,
byFunc
,
PCI_BASE_ADDRESS_1
,
(
unsigned
int
*
)
&
dwPLXIOBase
);
dwPLXIOBase
&=
0xFFFFFF80
;
pcibios_read_config_dword
(
byBus
,
byFunc
,
PCI_BASE_ADDRESS_2
,
(
unsigned
int
*
)
&
dwDivasIOBase
);
sprintf
(
Card
.
name
,
"DIVASQ%ld"
,
i
);
dwDivasIOBase
&=
0xFFFFFFFC
;
pcibios_read_config_byte
(
byBus
,
byFunc
,
PCI_INTERRUPT_LINE
,
&
byIRQ
)
;
Card
.
serial
=
PCIserial
;
Card
.
card_id
=
wNumCards
;
Card
.
card_id
=
wNumCards
;
Card
.
card_type
=
DIA_CARD_TYPE_DIVA_SERVER_B
;
Card
.
bus_type
=
DIA_BUS_TYPE_PCI
;
Card
.
irq
=
byIRQ
;
Card
.
reset_base
=
dwPLXIOBase
;
Card
.
io_base
=
dwDivasIOBase
;
Card
.
bus_num
=
byBus
;
Card
.
func_num
=
byFunc
;
Card
.
slot
=
-
1
;
Card
.
name
[
0
]
=
'D'
;
Card
.
name
[
1
]
=
'I'
;
Card
.
name
[
2
]
=
'V'
;
Card
.
name
[
3
]
=
'A'
;
Card
.
name
[
4
]
=
'S'
;
Card
.
name
[
5
]
=
'B'
;
Card
.
name
[
6
]
=
'\0'
;
if
(
check_region
(
Card
.
io_base
,
0x20
))
{
printk
(
KERN_WARNING
"Divas: DIVA I/O Base already in use 0x%x-0x%x
\n
"
,
Card
.
io_base
,
Card
.
io_base
+
0x1F
);
wDeviceIndex
++
;
continue
;
}
if
(
check_region
(
Card
.
reset_base
,
0x80
))
{
printk
(
KERN_WARNING
"Divas: PLX I/O Base already in use 0x%x-0x%x
\n
"
,
Card
.
reset_base
,
Card
.
reset_base
+
0x7F
);
wDeviceIndex
++
;
continue
;
}
if
(
DivasCardNew
(
&
Card
)
!=
0
)
if
(
DivasCardNew
(
&
Card
)
!=
0
)
{
{
break
;
wDeviceIndex
++
;
continue
;
}
}
wNumCards
++
;
wNumCards
++
;
}
wPCIConsultation
=
pcibios_find_device
(
PCI_VENDOR_ID_EICON
,
PCI_DEVICE_ID_EICON_MAESTRAQ_U
,
wDeviceIndex
,
&
byBus
,
&
byFunc
);
if
(
wPCIConsultation
==
PCIBIOS_SUCCESSFUL
)
}
{
}
dword
dwPLXIOBase
,
dwDivasIOBase
;
byte
byIRQ
;
printk
(
KERN_DEBUG
"Divas: DIVA Server BRI (U) Found
\n
"
);
pdev
=
NULL
;
while
((
pdev
=
pci_find_device
(
PCI_VENDOR_ID_EICON
,
PCI_DEVICE_ID_EICON_MAESTRA
,
pdev
)))
{
dword
dwPLXIOBase
,
dwDivasIOBase
;
pcibios_read_config_dword
(
byBus
,
byFunc
,
PCI_BASE_ADDRESS_1
,
(
unsigned
int
*
)
&
dwPLXIOBase
);
printk
(
KERN_DEBUG
"Divas: DIVA Server BRI (S/T) Found
\n
"
);
dwPLXIOBase
&=
0xFFFFFF80
;
dwPLXIOBase
=
pci_resource_start
(
pdev
,
1
);
dwDivasIOBase
=
pci_resource_start
(
pdev
,
2
);
Card
.
card_id
=
wNumCards
;
Card
.
card_type
=
DIA_CARD_TYPE_DIVA_SERVER_B
;
Card
.
bus_type
=
DIA_BUS_TYPE_PCI
;
Card
.
pdev
=
pdev
;
Card
.
irq
=
pdev
->
irq
;
Card
.
reset_base
=
dwPLXIOBase
;
Card
.
io_base
=
dwDivasIOBase
;
Card
.
slot
=
-
1
;
strcpy
(
Card
.
name
,
"DIVASB"
);
if
(
check_region
(
Card
.
io_base
,
0x20
))
{
printk
(
KERN_WARNING
"Divas: DIVA I/O Base already in use 0x%x-0x%x
\n
"
,
Card
.
io_base
,
Card
.
io_base
+
0x1F
);
}
pcibios_read_config_dword
(
byBus
,
byFunc
,
PCI_BASE_ADDRESS_2
,
(
unsigned
int
*
)
&
dwDivasIOBase
);
if
(
check_region
(
Card
.
reset_base
,
0x80
))
{
dwDivasIOBase
&=
0xFFFFFFFC
;
printk
(
KERN_WARNING
"Divas: PLX I/O Base already in use 0x%x-0x%x
\n
"
,
Card
.
reset_base
,
Card
.
reset_base
+
0x7F
);
continue
;
}
if
(
DivasCardNew
(
&
Card
)
!=
0
)
{
continue
;
}
wNumCards
++
;
}
pcibios_read_config_byte
(
byBus
,
byFunc
,
PCI_INTERRUPT_LINE
,
&
byIRQ
);
pdev
=
NULL
;
while
((
pdev
=
pci_find_device
(
PCI_VENDOR_ID_EICON
,
PCI_DEVICE_ID_EICON_MAESTRAQ_U
,
pdev
)))
{
dword
dwPLXIOBase
,
dwDivasIOBase
;
Card
.
card_id
=
wNumCards
;
printk
(
KERN_DEBUG
"Divas: DIVA Server BRI (U) Found
\n
"
);
Card
.
card_type
=
DIA_CARD_TYPE_DIVA_SERVER_B
;
Card
.
bus_type
=
DIA_BUS_TYPE_PCI
;
Card
.
irq
=
byIRQ
;
Card
.
reset_base
=
dwPLXIOBase
;
Card
.
io_base
=
dwDivasIOBase
;
Card
.
bus_num
=
byBus
;
Card
.
func_num
=
byFunc
;
Card
.
slot
=
-
1
;
Card
.
name
[
0
]
=
'D'
;
Card
.
name
[
1
]
=
'I'
;
Card
.
name
[
2
]
=
'V'
;
Card
.
name
[
3
]
=
'A'
;
Card
.
name
[
4
]
=
'S'
;
Card
.
name
[
5
]
=
'B'
;
Card
.
name
[
6
]
=
'\0'
;
if
(
check_region
(
Card
.
io_base
,
0x20
))
{
printk
(
KERN_WARNING
"Divas: DIVA I/O Base already in use 0x%x-0x%x
\n
"
,
Card
.
io_base
,
Card
.
io_base
+
0x1F
);
wDeviceIndex
++
;
continue
;
}
if
(
check_region
(
Card
.
reset_base
,
0x80
))
dwPLXIOBase
=
pci_resource_start
(
pdev
,
1
);
{
dwDivasIOBase
=
pci_resource_start
(
pdev
,
2
);
printk
(
KERN_WARNING
"Divas: PLX I/O Base already in use 0x%x-0x%x
\n
"
,
Card
.
reset_base
,
Card
.
reset_base
+
0x7F
);
wDeviceIndex
++
;
Card
.
card_id
=
wNumCards
;
continue
;
Card
.
card_type
=
DIA_CARD_TYPE_DIVA_SERVER_B
;
}
Card
.
bus_type
=
DIA_BUS_TYPE_PCI
;
Card
.
pdev
=
pdev
;
Card
.
irq
=
pdev
->
irq
;
Card
.
reset_base
=
dwPLXIOBase
;
Card
.
io_base
=
dwDivasIOBase
;
Card
.
slot
=
-
1
;
strcpy
(
Card
.
name
,
"DIVASB"
);
if
(
check_region
(
Card
.
io_base
,
0x20
))
{
printk
(
KERN_WARNING
"Divas: DIVA I/O Base already in use 0x%x-0x%x
\n
"
,
Card
.
io_base
,
Card
.
io_base
+
0x1F
);
continue
;
}
if
(
DivasCardNew
(
&
Card
)
!=
0
)
if
(
check_region
(
Card
.
reset_base
,
0x80
))
{
{
printk
(
KERN_WARNING
"Divas: PLX I/O Base already in use 0x%x-0x%x
\n
"
,
Card
.
reset_base
,
Card
.
reset_base
+
0x7F
);
wDeviceIndex
++
;
continue
;
continue
;
}
wNumCards
++
;
}
}
wDeviceIndex
++
;
if
(
DivasCardNew
(
&
Card
)
!=
0
)
{
continue
;
}
wNumCards
++
;
}
}
wDeviceIndex
=
0
;
wDeviceIndex
=
0
;
while
(
wDeviceIndex
<
10
)
pdev
=
NULL
;
{
while
((
pdev
=
pci_find_device
(
PCI_VENDOR_ID_EICON
,
wPCIConsultation
=
pcibios_find_device
(
PCI_VENDOR_ID_EICON
,
PCI_DEVICE_ID_EICON_MAESTRAQ_U
,
PCI_DEVICE_ID_EICON_MAESTRAP
,
pdev
)))
{
wDeviceIndex
,
dword
dwRAM
,
dwREG
,
dwCFG
;
&
byBus
,
&
byFunc
);
if
(
wPCIConsultation
==
PCIBIOS_SUCCESSFUL
)
{
dword
dwRAM
,
dwREG
,
dwCFG
;
byte
byIRQ
;
printk
(
KERN_DEBUG
"Divas: DIVA Server PRI Found
\n
"
);
printk
(
KERN_DEBUG
"Divas: DIVA Server PRI Found
\n
"
);
pcibios_read_config_dword
(
byBus
,
byFunc
,
PCI_BASE_ADDRESS_0
,
(
unsigned
int
*
)
&
dwRAM
);
dwRAM
=
pci_resource_start
(
pdev
,
0
);
dwRAM
&=
0xFFFFF000
;
dwREG
=
pci_resource_start
(
pdev
,
2
);
dwCFG
=
pci_resource_start
(
pdev
,
4
);
pcibios_read_config_dword
(
byBus
,
byFunc
,
PCI_BASE_ADDRESS_2
,
(
unsigned
int
*
)
&
dwREG
);
dwREG
&=
0xFFFFF000
;
Card
.
memory
[
DIVAS_RAM_MEMORY
]
=
ioremap
(
dwRAM
,
0x10000
);
Card
.
memory
[
DIVAS_REG_MEMORY
]
=
ioremap
(
dwREG
,
0x4000
);
pcibios_read_config_dword
(
byBus
,
byFunc
,
PCI_BASE_ADDRESS_4
,
(
unsigned
int
*
)
&
dwCFG
);
Card
.
memory
[
DIVAS_CFG_MEMORY
]
=
ioremap
(
dwCFG
,
0x1000
);
dwCFG
&=
0xFFFFF000
;
Card
.
memory
[
DIVAS_SHARED_MEMORY
]
=
Card
.
memory
[
DIVAS_RAM_MEMORY
]
+
DIVAS_SHARED_OFFSET
;
pcibios_read_config_byte
(
byBus
,
byFunc
,
PCI_INTERRUPT_LINE
,
&
byIRQ
);
Card
.
card_id
=
wNumCards
;
Card
.
card_type
=
DIA_CARD_TYPE_DIVA_SERVER
;
Card
.
memory
[
DIVAS_RAM_MEMORY
]
=
ioremap
(
dwRAM
,
0x10000
);
Card
.
bus_type
=
DIA_BUS_TYPE_PCI
;
Card
.
memory
[
DIVAS_REG_MEMORY
]
=
ioremap
(
dwREG
,
0x4000
);
Card
.
pdev
=
pdev
;
Card
.
memory
[
DIVAS_CFG_MEMORY
]
=
ioremap
(
dwCFG
,
0x1000
);
Card
.
irq
=
pdev
->
irq
;
Card
.
memory
[
DIVAS_SHARED_MEMORY
]
=
Card
.
memory
[
DIVAS_RAM_MEMORY
]
+
DIVAS_SHARED_OFFSET
;
Card
.
slot
=
-
1
;
strcpy
(
Card
.
name
,
"DIVASP"
);
/* pcibios_read_config_dword(byBus, byFunc, PCI_BASE_ADDRESS_1, (unsigned int *) &dwPLXIOBase);
if
(
DivasCardNew
(
&
Card
)
!=
0
)
{
dwPLXIOBase &= 0xFFFFFFFc;
continue
;
pcibios_read_config_dword(byBus, byFunc, PCI_BASE_ADDRESS_2, (unsigned int *) &dwDivasIOBase);
dwDivasIOBase &= 0xFFFFFF80;
pcibios_read_config_byte(byBus, byFunc, PCI_INTERRUPT_LINE, &byIRQ);
*/
Card
.
card_id
=
wNumCards
;
Card
.
card_type
=
DIA_CARD_TYPE_DIVA_SERVER
;
Card
.
bus_type
=
DIA_BUS_TYPE_PCI
;
Card
.
irq
=
byIRQ
;
/* Card.reset_base = dwPLXIOBase;
Card.io_base = dwDivasIOBase;*/
Card
.
bus_num
=
byBus
;
Card
.
func_num
=
byFunc
;
Card
.
slot
=
-
1
;
Card
.
name
[
0
]
=
'D'
;
Card
.
name
[
1
]
=
'I'
;
Card
.
name
[
2
]
=
'V'
;
Card
.
name
[
3
]
=
'A'
;
Card
.
name
[
4
]
=
'S'
;
Card
.
name
[
5
]
=
'P'
;
Card
.
name
[
6
]
=
'\0'
;
if
(
DivasCardNew
(
&
Card
)
!=
0
)
{
wDeviceIndex
++
;
continue
;
}
wNumCards
++
;
}
}
wNumCards
++
;
wDeviceIndex
++
;
}
}
printk
(
KERN_INFO
"Divas: %d cards detected
\n
"
,
wNumCards
);
printk
(
KERN_INFO
"Divas: %d cards detected
\n
"
,
wNumCards
);
if
(
wNumCards
==
0
)
if
(
wNumCards
==
0
)
{
{
return
-
1
;
return
-
1
;
}
}
...
@@ -357,8 +229,7 @@ int DivasCardsDiscover(void)
...
@@ -357,8 +229,7 @@ int DivasCardsDiscover(void)
Divas_major
=
register_chrdev
(
0
,
"Divas"
,
&
Divas_fops
);
Divas_major
=
register_chrdev
(
0
,
"Divas"
,
&
Divas_fops
);
if
(
Divas_major
<
0
)
if
(
Divas_major
<
0
)
{
{
printk
(
KERN_WARNING
"Divas: Unable to register character driver
\n
"
);
printk
(
KERN_WARNING
"Divas: Unable to register character driver
\n
"
);
return
-
1
;
return
-
1
;
}
}
...
...
drivers/isdn/eicon/linio.c
View file @
79d00d1d
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include <linux/config.h>
#include <linux/config.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/smp_lock.h>
#include <linux/smp_lock.h>
#include <asm/io.h>
#include <asm/io.h>
#include <asm/system.h>
#include <asm/system.h>
...
@@ -67,8 +68,7 @@ int UxCardHandleGet(ux_diva_card_t **card, dia_card_t *cfg)
...
@@ -67,8 +68,7 @@ int UxCardHandleGet(ux_diva_card_t **card, dia_card_t *cfg)
switch
(
cfg
->
bus_type
)
switch
(
cfg
->
bus_type
)
{
{
case
DIA_BUS_TYPE_PCI
:
case
DIA_BUS_TYPE_PCI
:
c
->
bus_num
=
cfg
->
bus_num
;
c
->
pdev
=
cfg
->
pdev
;
c
->
func_num
=
cfg
->
func_num
;
c
->
io_base
=
cfg
->
io_base
;
c
->
io_base
=
cfg
->
io_base
;
c
->
reset_base
=
cfg
->
reset_base
;
c
->
reset_base
=
cfg
->
reset_base
;
c
->
card_type
=
cfg
->
card_type
;
c
->
card_type
=
cfg
->
card_type
;
...
@@ -625,16 +625,15 @@ void UxIsrRemove(ux_diva_card_t *card, void *dev_id)
...
@@ -625,16 +625,15 @@ void UxIsrRemove(ux_diva_card_t *card, void *dev_id)
void
UxPciConfigWrite
(
ux_diva_card_t
*
card
,
int
size
,
int
offset
,
void
*
value
)
void
UxPciConfigWrite
(
ux_diva_card_t
*
card
,
int
size
,
int
offset
,
void
*
value
)
{
{
switch
(
size
)
switch
(
size
)
{
{
case
sizeof
(
byte
):
case
sizeof
(
byte
):
pci
bios_write_config_byte
(
card
->
bus_num
,
card
->
func_num
,
offset
,
*
(
byte
*
)
value
);
pci
_write_config_byte
(
card
->
pdev
,
offset
,
*
(
byte
*
)
value
);
break
;
break
;
case
sizeof
(
word
):
case
sizeof
(
word
):
pci
bios_write_config_word
(
card
->
bus_num
,
card
->
func_num
,
offset
,
*
(
word
*
)
value
);
pci
_write_config_word
(
card
->
pdev
,
offset
,
*
(
word
*
)
value
);
break
;
break
;
case
sizeof
(
dword
):
case
sizeof
(
dword
):
pci
bios_write_config_dword
(
card
->
bus_num
,
card
->
func_num
,
offset
,
*
(
dword
*
)
value
);
pci
_write_config_dword
(
card
->
pdev
,
offset
,
*
(
dword
*
)
value
);
break
;
break
;
default:
default:
printk
(
KERN_WARNING
"Divas: Invalid size in UxPciConfigWrite
\n
"
);
printk
(
KERN_WARNING
"Divas: Invalid size in UxPciConfigWrite
\n
"
);
...
@@ -643,16 +642,15 @@ void UxPciConfigWrite(ux_diva_card_t *card, int size, int offset, void *value)
...
@@ -643,16 +642,15 @@ void UxPciConfigWrite(ux_diva_card_t *card, int size, int offset, void *value)
void
UxPciConfigRead
(
ux_diva_card_t
*
card
,
int
size
,
int
offset
,
void
*
value
)
void
UxPciConfigRead
(
ux_diva_card_t
*
card
,
int
size
,
int
offset
,
void
*
value
)
{
{
switch
(
size
)
switch
(
size
)
{
{
case
sizeof
(
byte
):
case
sizeof
(
byte
):
pci
bios_read_config_byte
(
card
->
bus_num
,
card
->
func_num
,
offset
,
(
byte
*
)
value
);
pci
_read_config_byte
(
card
->
pdev
,
offset
,
(
byte
*
)
value
);
break
;
break
;
case
sizeof
(
word
):
case
sizeof
(
word
):
pci
bios_read_config_word
(
card
->
bus_num
,
card
->
func_num
,
offset
,
(
word
*
)
value
);
pci
_read_config_word
(
card
->
pdev
,
offset
,
(
word
*
)
value
);
break
;
break
;
case
sizeof
(
dword
):
case
sizeof
(
dword
):
pci
bios_read_config_dword
(
card
->
bus_num
,
card
->
func_num
,
offset
,
(
unsigned
int
*
)
value
);
pci
_read_config_dword
(
card
->
pdev
,
offset
,
(
unsigned
int
*
)
value
);
break
;
break
;
default:
default:
printk
(
KERN_WARNING
"Divas: Invalid size in UxPciConfigRead
\n
"
);
printk
(
KERN_WARNING
"Divas: Invalid size in UxPciConfigRead
\n
"
);
...
...
drivers/isdn/eicon/uxio.h
View file @
79d00d1d
...
@@ -28,8 +28,7 @@ struct ux_diva_card_s
...
@@ -28,8 +28,7 @@ struct ux_diva_card_s
int
reset_base
;
int
reset_base
;
int
card_type
;
int
card_type
;
byte
*
mapped
;
byte
*
mapped
;
int
bus_num
;
struct
pci_dev
*
pdev
;
int
func_num
;
int
slot
;
int
slot
;
int
irq
;
int
irq
;
byte
*
pDRAM
;
byte
*
pDRAM
;
...
...
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