Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292535
b: refs/heads/master
c: 7d3d897
h: refs/heads/master
i:
  292533: fb3a037
  292531: 4e5496d
  292527: df41c5b
v: v3
  • Loading branch information
Benjamin Herrenschmidt committed Mar 15, 2012
1 parent 6c6a5ba commit dba2668
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ba7a4822b48fbc7afd6b567c18e316a03f46684d
refs/heads/master: 7d3d897a4697e4ff746e5e82f116b2346ed28150
4 changes: 4 additions & 0 deletions trunk/drivers/tty/hvc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ config HVC_UDBG
depends on PPC && EXPERIMENTAL
select HVC_DRIVER
default n
help
This is meant to be used during HW bring up or debugging when
no other console mechanism exist but udbg, to get you a quick
console for userspace. Do NOT enable in production kernels.

config HVC_DCC
bool "ARM JTAG DCC console"
Expand Down
8 changes: 7 additions & 1 deletion trunk/drivers/tty/hvc/hvc_udbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static int hvc_udbg_put(uint32_t vtermno, const char *buf, int count)
{
int i;

for (i = 0; i < count; i++)
for (i = 0; i < count && udbg_putc; i++)
udbg_putc(buf[i]);

return i;
Expand Down Expand Up @@ -67,6 +67,9 @@ static int __init hvc_udbg_init(void)
{
struct hvc_struct *hp;

if (!udbg_putc)
return -ENODEV;

BUG_ON(hvc_udbg_dev);

hp = hvc_alloc(0, NO_IRQ, &hvc_udbg_ops, 16);
Expand All @@ -88,6 +91,9 @@ module_exit(hvc_udbg_exit);

static int __init hvc_udbg_console_init(void)
{
if (!udbg_putc)
return -ENODEV;

hvc_instantiate(0, 0, &hvc_udbg_ops);
add_preferred_console("hvc", 0, NULL);

Expand Down

0 comments on commit dba2668

Please sign in to comment.