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
20697cb7
Commit
20697cb7
authored
Jul 13, 2006
by
Stephen Rothwell
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hvc_iseries'
parents
54f5cd8a
4e9e95a3
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
652 additions
and
41 deletions
+652
-41
arch/powerpc/platforms/iseries/Kconfig
arch/powerpc/platforms/iseries/Kconfig
+6
-2
arch/powerpc/platforms/iseries/dt.c
arch/powerpc/platforms/iseries/dt.c
+2
-1
drivers/char/Kconfig
drivers/char/Kconfig
+7
-0
drivers/char/Makefile
drivers/char/Makefile
+1
-0
drivers/char/hvc_console.c
drivers/char/hvc_console.c
+9
-5
drivers/char/hvc_console.h
drivers/char/hvc_console.h
+1
-1
drivers/char/hvc_iseries.c
drivers/char/hvc_iseries.c
+594
-0
drivers/char/hvc_rtas.c
drivers/char/hvc_rtas.c
+1
-1
drivers/char/hvc_vio.c
drivers/char/hvc_vio.c
+2
-1
drivers/char/viocons.c
drivers/char/viocons.c
+1
-30
include/asm-powerpc/iseries/vio.h
include/asm-powerpc/iseries/vio.h
+28
-0
No files found.
arch/powerpc/platforms/iseries/Kconfig
View file @
20697cb7
...
...
@@ -3,13 +3,17 @@ menu "iSeries device drivers"
depends on PPC_ISERIES
config VIOCONS
tristate "iSeries Virtual Console Support"
tristate "iSeries Virtual Console Support (Obsolete)"
help
This is the old virtual console driver for legacy iSeries.
You should use the iSeries Hypervisor Virtual Console
support instead.
config VIODASD
tristate "iSeries Virtual I/O disk support"
help
If you are running on an iSeries system and you want to use
virtual disks created and managed by OS/400, say Y.
virtual disks created and managed by OS/400, say Y.
config VIOCD
tristate "iSeries Virtual I/O CD support"
...
...
arch/powerpc/platforms/iseries/dt.c
View file @
20697cb7
...
...
@@ -298,7 +298,8 @@ static void __init dt_vdevices(struct iseries_flat_dt *dt)
dt_prop_u32
(
dt
,
"#address-cells"
,
1
);
dt_prop_u32
(
dt
,
"#size-cells"
,
0
);
dt_do_vdevice
(
dt
,
"vty"
,
reg
,
-
1
,
device_type_serial
,
NULL
,
1
);
dt_do_vdevice
(
dt
,
"vty"
,
reg
,
-
1
,
device_type_serial
,
"IBM,iSeries-vty"
,
1
);
reg
++
;
dt_do_vdevice
(
dt
,
"v-scsi"
,
reg
,
-
1
,
device_type_vscsi
,
...
...
drivers/char/Kconfig
View file @
20697cb7
...
...
@@ -610,6 +610,13 @@ config HVC_CONSOLE
console. This driver allows each pSeries partition to have a console
which is accessed via the HMC.
config HVC_ISERIES
bool "iSeries Hypervisor Virtual Console support"
depends on PPC_ISERIES && !VIOCONS
select HVC_DRIVER
help
iSeries machines support a hypervisor virtual console.
config HVC_RTAS
bool "IBM RTAS Console support"
depends on PPC_RTAS
...
...
drivers/char/Makefile
View file @
20697cb7
...
...
@@ -42,6 +42,7 @@ obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o
obj-$(CONFIG_SX)
+=
sx.o generic_serial.o
obj-$(CONFIG_RIO)
+=
rio/ generic_serial.o
obj-$(CONFIG_HVC_CONSOLE)
+=
hvc_vio.o hvsi.o
obj-$(CONFIG_HVC_ISERIES)
+=
hvc_iseries.o
obj-$(CONFIG_HVC_RTAS)
+=
hvc_rtas.o
obj-$(CONFIG_HVC_DRIVER)
+=
hvc_console.o
obj-$(CONFIG_RAW_DRIVER)
+=
raw.o
...
...
drivers/char/hvc_console.c
View file @
20697cb7
...
...
@@ -80,7 +80,8 @@ struct hvc_struct {
struct
tty_struct
*
tty
;
unsigned
int
count
;
int
do_wakeup
;
char
outbuf
[
N_OUTBUF
]
__ALIGNED__
;
char
*
outbuf
;
int
outbuf_size
;
int
n_outbuf
;
uint32_t
vtermno
;
struct
hv_ops
*
ops
;
...
...
@@ -505,7 +506,7 @@ static int hvc_write(struct tty_struct *tty, const unsigned char *buf, int count
if
(
hp
->
n_outbuf
>
0
)
hvc_push
(
hp
);
while
(
count
>
0
&&
(
rsize
=
N_OUTBUF
-
hp
->
n_outbuf
)
>
0
)
{
while
(
count
>
0
&&
(
rsize
=
hp
->
outbuf_size
-
hp
->
n_outbuf
)
>
0
)
{
if
(
rsize
>
count
)
rsize
=
count
;
memcpy
(
hp
->
outbuf
+
hp
->
n_outbuf
,
buf
,
rsize
);
...
...
@@ -538,7 +539,7 @@ static int hvc_write_room(struct tty_struct *tty)
if
(
!
hp
)
return
-
1
;
return
N_OUTBUF
-
hp
->
n_outbuf
;
return
hp
->
outbuf_size
-
hp
->
n_outbuf
;
}
static
int
hvc_chars_in_buffer
(
struct
tty_struct
*
tty
)
...
...
@@ -728,12 +729,13 @@ static struct kobj_type hvc_kobj_type = {
};
struct
hvc_struct
__devinit
*
hvc_alloc
(
uint32_t
vtermno
,
int
irq
,
struct
hv_ops
*
ops
)
struct
hv_ops
*
ops
,
int
outbuf_size
)
{
struct
hvc_struct
*
hp
;
int
i
;
hp
=
kmalloc
(
sizeof
(
*
hp
),
GFP_KERNEL
);
hp
=
kmalloc
(
ALIGN
(
sizeof
(
*
hp
),
sizeof
(
long
))
+
outbuf_size
,
GFP_KERNEL
);
if
(
!
hp
)
return
ERR_PTR
(
-
ENOMEM
);
...
...
@@ -742,6 +744,8 @@ struct hvc_struct __devinit *hvc_alloc(uint32_t vtermno, int irq,
hp
->
vtermno
=
vtermno
;
hp
->
irq
=
irq
;
hp
->
ops
=
ops
;
hp
->
outbuf_size
=
outbuf_size
;
hp
->
outbuf
=
&
((
char
*
)
hp
)[
ALIGN
(
sizeof
(
*
hp
),
sizeof
(
long
))];
kobject_init
(
&
hp
->
kobj
);
hp
->
kobj
.
ktype
=
&
hvc_kobj_type
;
...
...
drivers/char/hvc_console.h
View file @
20697cb7
...
...
@@ -56,7 +56,7 @@ extern int hvc_instantiate(uint32_t vtermno, int index, struct hv_ops *ops);
/* register a vterm for hvc tty operation (module_init or hotplug add) */
extern
struct
hvc_struct
*
__devinit
hvc_alloc
(
uint32_t
vtermno
,
int
irq
,
struct
hv_ops
*
ops
);
struct
hv_ops
*
ops
,
int
outbuf_size
);
/* remove a vterm from hvc tty operation (modele_exit or hotplug remove) */
extern
int
__devexit
hvc_remove
(
struct
hvc_struct
*
hp
);
...
...
drivers/char/hvc_iseries.c
0 → 100644
View file @
20697cb7
This diff is collapsed.
Click to expand it.
drivers/char/hvc_rtas.c
View file @
20697cb7
...
...
@@ -94,7 +94,7 @@ static int hvc_rtas_init(void)
/* Allocate an hvc_struct for the console device we instantiated
* earlier. Save off hp so that we can return it on exit */
hp
=
hvc_alloc
(
hvc_rtas_cookie
,
NO_IRQ
,
&
hvc_rtas_get_put_ops
);
hp
=
hvc_alloc
(
hvc_rtas_cookie
,
NO_IRQ
,
&
hvc_rtas_get_put_ops
,
16
);
if
(
IS_ERR
(
hp
))
return
PTR_ERR
(
hp
);
...
...
drivers/char/hvc_vio.c
View file @
20697cb7
...
...
@@ -90,7 +90,8 @@ static int __devinit hvc_vio_probe(struct vio_dev *vdev,
if
(
!
vdev
||
!
id
)
return
-
EPERM
;
hp
=
hvc_alloc
(
vdev
->
unit_address
,
vdev
->
irq
,
&
hvc_get_put_ops
);
hp
=
hvc_alloc
(
vdev
->
unit_address
,
vdev
->
irq
,
&
hvc_get_put_ops
,
MAX_VIO_PUT_CHARS
);
if
(
IS_ERR
(
hp
))
return
PTR_ERR
(
hp
);
dev_set_drvdata
(
&
vdev
->
dev
,
hp
);
...
...
drivers/char/viocons.c
View file @
20697cb7
...
...
@@ -43,7 +43,6 @@
#include <linux/sysrq.h>
#include <asm/iseries/vio.h>
#include <asm/iseries/hv_lp_event.h>
#include <asm/iseries/hv_call_event.h>
#include <asm/iseries/hv_lp_config.h>
...
...
@@ -67,35 +66,6 @@ static int vio_sysrq_pressed;
extern
int
sysrq_enabled
;
#endif
/*
* The structure of the events that flow between us and OS/400. You can't
* mess with this unless the OS/400 side changes too
*/
struct
viocharlpevent
{
struct
HvLpEvent
event
;
u32
reserved
;
u16
version
;
u16
subtype_result_code
;
u8
virtual_device
;
u8
len
;
u8
data
[
VIOCHAR_MAX_DATA
];
};
#define VIOCHAR_WINDOW 10
#define VIOCHAR_HIGHWATERMARK 3
enum
viocharsubtype
{
viocharopen
=
0x0001
,
viocharclose
=
0x0002
,
viochardata
=
0x0003
,
viocharack
=
0x0004
,
viocharconfig
=
0x0005
};
enum
viochar_rc
{
viochar_rc_ebusy
=
1
};
#define VIOCHAR_NUM_BUF 16
/*
...
...
@@ -1183,6 +1153,7 @@ static int __init viocons_init(void)
port_info
[
i
].
magic
=
VIOTTY_MAGIC
;
}
HvCall_setLogBufferFormatAndCodepage
(
HvCall_LogBuffer_ASCII
,
437
);
add_preferred_console
(
"viocons"
,
0
,
NULL
);
register_console
(
&
viocons_early
);
return
0
;
}
...
...
include/asm-powerpc/iseries/vio.h
View file @
20697cb7
...
...
@@ -122,6 +122,34 @@ enum viorc {
viorc_openRejected
=
0x0301
};
/*
* The structure of the events that flow between us and OS/400 for chario
* events. You can't mess with this unless the OS/400 side changes too.
*/
struct
viocharlpevent
{
struct
HvLpEvent
event
;
u32
reserved
;
u16
version
;
u16
subtype_result_code
;
u8
virtual_device
;
u8
len
;
u8
data
[
VIOCHAR_MAX_DATA
];
};
#define VIOCHAR_WINDOW 10
enum
viocharsubtype
{
viocharopen
=
0x0001
,
viocharclose
=
0x0002
,
viochardata
=
0x0003
,
viocharack
=
0x0004
,
viocharconfig
=
0x0005
};
enum
viochar_rc
{
viochar_rc_ebusy
=
1
};
struct
device
;
extern
struct
device
*
iSeries_vio_dev
;
...
...
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