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
b815b4b7
Commit
b815b4b7
authored
Nov 01, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SERIAL] 8250_gsc: Convert to use serial8250_{un,}register_port.
parent
3113fa59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
32 deletions
+15
-32
drivers/serial/8250_gsc.c
drivers/serial/8250_gsc.c
+15
-32
No files found.
drivers/serial/8250_gsc.c
View file @
b815b4b7
...
...
@@ -14,7 +14,7 @@
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/module.h>
#include <linux/serial.h>
#include <linux/serial
_core
.h>
#include <linux/signal.h>
#include <linux/slab.h>
#include <linux/types.h>
...
...
@@ -22,37 +22,18 @@
#include <asm/hardware.h>
#include <asm/parisc-device.h>
#include <asm/io.h>
#include <asm/serial.h>
#include <asm/serial.h>
/* for LASI_BASE_BAUD */
static
void
setup_parisc_serial
(
struct
serial_struct
*
serial
,
unsigned
long
address
,
int
irq
,
int
line
)
{
memset
(
serial
,
0
,
sizeof
(
struct
serial_struct
));
/* autoconfig() sets state->type. This sets info->type */
serial
->
type
=
PORT_16550A
;
serial
->
line
=
line
;
serial
->
iomap_base
=
address
;
serial
->
iomem_base
=
ioremap
(
address
,
0x8
);
serial
->
irq
=
irq
;
serial
->
io_type
=
SERIAL_IO_MEM
;
/* define access method */
serial
->
flags
=
0
;
serial
->
xmit_fifo_size
=
16
;
serial
->
custom_divisor
=
0
;
serial
->
baud_base
=
LASI_BASE_BAUD
;
}
#include "8250.h"
static
int
__init
serial_init_chip
(
struct
parisc_device
*
dev
)
{
static
int
serial_line_nr
;
struct
uart_port
port
;
unsigned
long
address
;
int
err
;
struct
serial_struct
*
serial
;
if
(
!
dev
->
irq
)
{
/* We find some unattached serial ports by walking native
* busses. These should be silently ignored. Otherwise,
...
...
@@ -66,21 +47,23 @@ serial_init_chip(struct parisc_device *dev)
return
-
ENODEV
;
}
serial
=
kmalloc
(
sizeof
(
*
serial
),
GFP_KERNEL
);
if
(
!
serial
)
return
-
ENOMEM
;
address
=
dev
->
hpa
;
if
(
dev
->
id
.
sversion
!=
0x8d
)
{
address
+=
0x800
;
}
setup_parisc_serial
(
serial
,
address
,
dev
->
irq
,
serial_line_nr
++
);
err
=
register_serial
(
serial
);
memset
(
&
port
,
0
,
sizeof
(
struct
uart_port
));
port
.
mapbase
=
address
;
port
.
irq
=
dev
->
irq
;
port
.
iotype
=
UPIO_MEM
;
port
.
flags
=
UPF_IOREMAP
|
UPF_BOOT_AUTOCONF
;
port
.
uartclk
=
LASI_BASE_BAUD
*
16
;
port
.
dev
=
&
dev
->
dev
;
err
=
serial8250_register_port
(
&
port
);
if
(
err
<
0
)
{
printk
(
KERN_WARNING
"register_serial returned error %d
\n
"
,
err
);
kfree
(
serial
);
return
-
ENODEV
;
printk
(
KERN_WARNING
"serial8250_register_port returned error %d
\n
"
,
err
);
return
err
;
}
return
0
;
...
...
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