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
b731ec4f
Commit
b731ec4f
authored
Nov 03, 2002
by
Matthew Wilcox
Committed by
Linus Torvalds
Nov 03, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] parport_gsc
Update to the latest parport_gsc in the PA tree.
parent
57b1dfbd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
59 deletions
+37
-59
drivers/parport/parport_gsc.c
drivers/parport/parport_gsc.c
+37
-59
No files found.
drivers/parport/parport_gsc.c
View file @
b731ec4f
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* (at your option) any later version.
*
*
* by Helge Deller <deller@gmx.de>
*
(C) 1999-2001
by Helge Deller <deller@gmx.de>
*
*
*
*
* based on parport_pc.c by
* based on parport_pc.c by
...
@@ -36,9 +36,9 @@
...
@@ -36,9 +36,9 @@
#include <asm/io.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <asm/dma.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include <asm/superio.h>
#include <linux/parport.h>
#include <linux/parport.h>
#include <asm/gsc.h>
#include <asm/pdc.h>
#include <asm/pdc.h>
#include <asm/hardware.h>
#include <asm/hardware.h>
#include <asm/parport_gsc.h>
#include <asm/parport_gsc.h>
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
MODULE_AUTHOR
(
"Helge Deller <deller@gmx.de>"
);
MODULE_AUTHOR
(
"Helge Deller <deller@gmx.de>"
);
MODULE_DESCRIPTION
(
"HP-PARISC PC-style parallel port driver"
);
MODULE_DESCRIPTION
(
"HP-PARISC PC-style parallel port driver"
);
MODULE_SUPPORTED_DEVICE
(
"integrated PC-style parallel port"
);
MODULE_SUPPORTED_DEVICE
(
"integrated PC-style parallel port"
);
MODULE_LICENSE
(
"GPL"
);
/*
/*
...
@@ -347,13 +348,6 @@ struct parport *__devinit parport_gsc_probe_port (unsigned long base,
...
@@ -347,13 +348,6 @@ struct parport *__devinit parport_gsc_probe_port (unsigned long base,
struct
parport
tmp
;
struct
parport
tmp
;
struct
parport
*
p
=
&
tmp
;
struct
parport
*
p
=
&
tmp
;
#if 1
#warning Take this out when region handling works again, <deller@gmx,de>
#else
if
(
check_region
(
base
,
3
))
return
NULL
;
#endif
priv
=
kmalloc
(
sizeof
(
struct
parport_gsc_private
),
GFP_KERNEL
);
priv
=
kmalloc
(
sizeof
(
struct
parport_gsc_private
),
GFP_KERNEL
);
if
(
!
priv
)
{
if
(
!
priv
)
{
printk
(
KERN_DEBUG
"parport (0x%lx): no memory!
\n
"
,
base
);
printk
(
KERN_DEBUG
"parport (0x%lx): no memory!
\n
"
,
base
);
...
@@ -430,12 +424,6 @@ struct parport *__devinit parport_gsc_probe_port (unsigned long base,
...
@@ -430,12 +424,6 @@ struct parport *__devinit parport_gsc_probe_port (unsigned long base,
printk
(
"]
\n
"
);
printk
(
"]
\n
"
);
parport_proc_register
(
p
);
parport_proc_register
(
p
);
request_region
(
p
->
base
,
3
,
p
->
name
);
if
(
p
->
size
>
3
)
request_region
(
p
->
base
+
3
,
p
->
size
-
3
,
p
->
name
);
if
(
p
->
modes
&
PARPORT_MODE_ECP
)
request_region
(
p
->
base_hi
,
3
,
p
->
name
);
if
(
p
->
irq
!=
PARPORT_IRQ_NONE
)
{
if
(
p
->
irq
!=
PARPORT_IRQ_NONE
)
{
if
(
request_irq
(
p
->
irq
,
parport_gsc_interrupt
,
if
(
request_irq
(
p
->
irq
,
parport_gsc_interrupt
,
0
,
p
->
name
,
p
))
{
0
,
p
->
name
,
p
))
{
...
@@ -465,62 +453,56 @@ struct parport *__devinit parport_gsc_probe_port (unsigned long base,
...
@@ -465,62 +453,56 @@ struct parport *__devinit parport_gsc_probe_port (unsigned long base,
static
int
__initdata
parport_count
;
static
int
__initdata
parport_count
;
static
int
__
init
parport_init_chip
(
struct
hp_device
*
d
,
struct
pa_iodc_driver
*
dri
)
static
int
__
devinit
parport_init_chip
(
struct
parisc_device
*
dev
)
{
{
unsigned
long
port
;
unsigned
long
port
;
int
irq
;
irq
=
busdevice_alloc_irq
(
d
);
if
(
!
irq
)
{
if
(
!
dev
->
irq
)
{
printk
(
KERN_DEBUG
"IRQ not found for parallel device at 0x%p
\n
"
,
d
->
hpa
);
printk
(
"IRQ not found for parallel device at 0x%lx
\n
"
,
dev
->
hpa
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
port
=
((
unsigned
long
)
d
->
hpa
)
+
PARPORT_GSC_OFFSET
;
port
=
dev
->
hpa
+
PARPORT_GSC_OFFSET
;
/*
/*
some older machines with ASP-chip don't support
some older machines with ASP-chip don't support the enhanced parport modes
* the enhanced parport modes.
*/
*/
if
(
!
pdc_add_valid
(
(
void
*
)(
port
+
4
)))
{
if
(
boot_cpu_data
.
cpu_type
>
pcxt
&&
!
pdc_add_valid
(
port
+
4
))
{
/* Initialize bidirectional-mode (0x10) & data-tranfer-mode #1 (0x20) */
/* Initialize bidirectional-mode (0x10) & data-tranfer-mode #1 (0x20) */
printk
(
KERN_DEBUG
"%s: initialize bidirectional-mode.
\n
"
,
__FUNCTION__
);
printk
(
"%s: initialize bidirectional-mode.
\n
"
,
__FUNCTION__
);
parport_writeb
(
(
0x10
+
0x20
),
port
+
4
);
parport_writeb
(
(
0x10
+
0x20
),
port
+
4
);
}
else
{
}
else
{
printk
(
KERN_DEBUG
"%s: enhanced parport-modes not supported.
\n
"
,
__FUNCTION__
);
printk
(
"%s: enhanced parport-modes not supported.
\n
"
,
__FUNCTION__
);
}
}
if
(
parport_gsc_probe_port
(
port
,
0
,
if
(
parport_gsc_probe_port
(
port
,
0
,
dev
->
irq
,
irq
,
/* PARPORT_IRQ_NONE */
/* PARPORT_IRQ_NONE */
PARPORT_DMA_NONE
,
NULL
))
PARPORT_DMA_NONE
,
NULL
))
parport_count
++
;
parport_count
++
;
return
0
;
return
0
;
}
}
static
struct
pa_iodc_driver
parport_drivers_for
[]
__initdata
=
{
static
struct
parisc_device_id
parport_tbl
[]
=
{
{
HPHW_FIO
,
0x0
,
0x0
,
0x74
,
0x0
,
0
,
/* 715/64 */
{
HPHW_FIO
,
HVERSION_REV_ANY_ID
,
HVERSION_ANY_ID
,
0x74
},
DRIVER_CHECK_SVERSION
+
DRIVER_CHECK_HWTYPE
,
{
0
,
}
"parallel device"
,
"HP 7xx - Series"
,
(
void
*
)
parport_init_chip
},
{
0
}
};
};
int
__init
parport_gsc_init
(
void
)
MODULE_DEVICE_TABLE
(
parisc
,
parport_tbl
);
{
parport_count
=
0
;
register_driver
(
parport_drivers_for
);
return
0
;
}
static
struct
parisc_driver
parport_driver
=
{
name:
"Parallel"
,
id_table:
parport_tbl
,
probe:
parport_init_chip
,
};
static
int
__init
parport_gsc_init_module
(
void
)
int
__devinit
parport_gsc_init
(
void
)
{
{
return
!
parport_gsc_init
(
);
return
register_parisc_driver
(
&
parport_driver
);
}
}
static
void
__
exit
parport_gsc_exit_module
(
void
)
static
void
__
devexit
parport_gsc_exit
(
void
)
{
{
struct
parport
*
p
=
parport_enumerate
(),
*
tmp
;
struct
parport
*
p
=
parport_enumerate
(),
*
tmp
;
while
(
p
)
{
while
(
p
)
{
...
@@ -532,11 +514,6 @@ static void __exit parport_gsc_exit_module(void)
...
@@ -532,11 +514,6 @@ static void __exit parport_gsc_exit_module(void)
free_dma
(
p
->
dma
);
free_dma
(
p
->
dma
);
if
(
p
->
irq
!=
PARPORT_IRQ_NONE
)
if
(
p
->
irq
!=
PARPORT_IRQ_NONE
)
free_irq
(
p
->
irq
,
p
);
free_irq
(
p
->
irq
,
p
);
release_region
(
p
->
base
,
3
);
if
(
p
->
size
>
3
)
release_region
(
p
->
base
+
3
,
p
->
size
-
3
);
if
(
p
->
modes
&
PARPORT_MODE_ECP
)
release_region
(
p
->
base_hi
,
3
);
parport_proc_unregister
(
p
);
parport_proc_unregister
(
p
);
if
(
priv
->
dma_buf
)
if
(
priv
->
dma_buf
)
pci_free_consistent
(
priv
->
dev
,
PAGE_SIZE
,
pci_free_consistent
(
priv
->
dev
,
PAGE_SIZE
,
...
@@ -548,7 +525,8 @@ static void __exit parport_gsc_exit_module(void)
...
@@ -548,7 +525,8 @@ static void __exit parport_gsc_exit_module(void)
}
}
p
=
tmp
;
p
=
tmp
;
}
}
unregister_parisc_driver
(
&
parport_driver
);
}
}
module_init
(
parport_gsc_init
_module
);
module_init
(
parport_gsc_init
);
module_exit
(
parport_gsc_exit
_module
);
module_exit
(
parport_gsc_exit
);
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