diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-30 08:10:12 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-30 08:10:12 -0700 |
commit | 24a77daf3d80bddcece044e6dc3675e427eef3f3 (patch) | |
tree | 2c5e0b0bea394d6fe62c5d5857c252e83e48ac48 /drivers/char | |
parent | e389f9aec689209724105ae80a6c91fd2e747bc9 (diff) | |
parent | f900e9777fc9b65140cb9570438597bc8fae56ab (diff) | |
download | linux-3.10-24a77daf3d80bddcece044e6dc3675e427eef3f3.tar.gz linux-3.10-24a77daf3d80bddcece044e6dc3675e427eef3f3.tar.bz2 linux-3.10-24a77daf3d80bddcece044e6dc3675e427eef3f3.zip |
Merge branch 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (255 commits)
[POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c
[POWERPC] remove kernel module option for booke wdt
[POWERPC] Avoid putting cpu node twice
[POWERPC] Spinlock initializer cleanup
[POWERPC] ppc4xx_sgdma needs dma-mapping.h
[POWERPC] arch/powerpc/sysdev/timer.c build fix
[POWERPC] get_property cleanups
[POWERPC] Remove the unused HTDMSOUND driver
[POWERPC] cell: cbe_cpufreq cleanup and crash fix
[POWERPC] Declare enable_kernel_spe in a header
[POWERPC] Add dt_xlate_addr() to bootwrapper
[POWERPC] bootwrapper: CONFIG_ -> CONFIG_DEVICE_TREE
[POWERPC] Don't define a custom bd_t for Xilixn Virtex based boards.
[POWERPC] Add sane defaults for Xilinx EDK generated xparameters files
[POWERPC] Add uartlite boot console driver for the zImage wrapper
[POWERPC] Stop using ppc_sys for Xilinx Virtex boards
[POWERPC] New registration for common Xilinx Virtex ppc405 platform devices
[POWERPC] Merge common virtex header files
[POWERPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform
[POWERPC] Clean up cpufreq Kconfig dependencies
...
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/briq_panel.c | 7 | ||||
-rw-r--r-- | drivers/char/hvc_console.c | 49 | ||||
-rw-r--r-- | drivers/char/hvc_iseries.c | 2 | ||||
-rw-r--r-- | drivers/char/hvc_vio.c | 2 | ||||
-rw-r--r-- | drivers/char/hvsi.c | 4 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_atmel.h | 4 | ||||
-rw-r--r-- | drivers/char/watchdog/Kconfig | 2 |
7 files changed, 46 insertions, 24 deletions
diff --git a/drivers/char/briq_panel.c b/drivers/char/briq_panel.c index 8dcf9d20f44..c70d52ace8b 100644 --- a/drivers/char/briq_panel.c +++ b/drivers/char/briq_panel.c @@ -202,13 +202,16 @@ static struct miscdevice briq_panel_miscdev = { static int __init briq_panel_init(void) { - struct device_node *root = find_path_device("/"); + struct device_node *root = of_find_node_by_path("/"); const char *machine; int i; machine = get_property(root, "model", NULL); - if (!machine || strncmp(machine, "TotalImpact,BRIQ-1", 18) != 0) + if (!machine || strncmp(machine, "TotalImpact,BRIQ-1", 18) != 0) { + of_node_put(root); return -ENODEV; + } + of_node_put(root); printk(KERN_INFO "briq_panel: v%s Dr. Karsten Jeppesen (kj@totalimpact.com)\n", diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index a0a88aa23f5..0f9ed7b46a6 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c @@ -47,8 +47,6 @@ #define HVC_MAJOR 229 #define HVC_MINOR 0 -#define TIMEOUT (10) - /* * Wait this long per iteration while trying to push buffered data to the * hypervisor before allowing the tty to complete a close operation. @@ -104,12 +102,12 @@ static DEFINE_SPINLOCK(hvc_structs_lock); /* * This value is used to assign a tty->index value to a hvc_struct based * upon order of exposure via hvc_probe(), when we can not match it to - * a console canidate registered with hvc_instantiate(). + * a console candidate registered with hvc_instantiate(). */ static int last_hvc = -1; /* - * Do not call this function with either the hvc_strucst_lock or the hvc_struct + * Do not call this function with either the hvc_structs_lock or the hvc_struct * lock held. If successful, this function increments the kobject reference * count against the target hvc_struct so it should be released when finished. */ @@ -162,7 +160,7 @@ void hvc_console_print(struct console *co, const char *b, unsigned count) if (index >= MAX_NR_HVC_CONSOLES) return; - /* This console adapter was removed so it is not useable. */ + /* This console adapter was removed so it is not usable. */ if (vtermnos[index] < 0) return; @@ -220,7 +218,7 @@ struct console hvc_con_driver = { }; /* - * Early console initialization. Preceeds driver initialization. + * Early console initialization. Precedes driver initialization. * * (1) we are first, and the user specified another driver * -- index will remain -1 @@ -257,7 +255,7 @@ int hvc_instantiate(uint32_t vtermno, int index, struct hv_ops *ops) if (vtermnos[index] != -1) return -1; - /* make sure no no tty has been registerd in this index */ + /* make sure no no tty has been registered in this index */ hp = hvc_get_by_index(index); if (hp) { kobject_put(&hp->kobj); @@ -267,7 +265,7 @@ int hvc_instantiate(uint32_t vtermno, int index, struct hv_ops *ops) vtermnos[index] = vtermno; cons_ops[index] = ops; - /* reserve all indices upto and including this index */ + /* reserve all indices up to and including this index */ if (last_hvc < index) last_hvc = index; @@ -528,7 +526,7 @@ static int hvc_write(struct tty_struct *tty, const unsigned char *buf, int count /* * This is actually a contract between the driver and the tty layer outlining - * how much write room the driver can guarentee will be sent OR BUFFERED. This + * how much write room the driver can guarantee will be sent OR BUFFERED. This * driver MUST honor the return value. */ static int hvc_write_room(struct tty_struct *tty) @@ -550,6 +548,18 @@ static int hvc_chars_in_buffer(struct tty_struct *tty) return hp->n_outbuf; } +/* + * timeout will vary between the MIN and MAX values defined here. By default + * and during console activity we will use a default MIN_TIMEOUT of 10. When + * the console is idle, we increase the timeout value on each pass through + * msleep until we reach the max. This may be noticeable as a brief (average + * one second) delay on the console before the console responds to input when + * there has been no input for some time. + */ +#define MIN_TIMEOUT (10) +#define MAX_TIMEOUT (2000) +static u32 timeout = MIN_TIMEOUT; + #define HVC_POLL_READ 0x00000001 #define HVC_POLL_WRITE 0x00000002 @@ -642,9 +652,14 @@ static int hvc_poll(struct hvc_struct *hp) bail: spin_unlock_irqrestore(&hp->lock, flags); - if (read_total) + if (read_total) { + /* Activity is occurring, so reset the polling backoff value to + a minimum for performance. */ + timeout = MIN_TIMEOUT; + tty_flip_buffer_push(tty); - + } + return poll_mask; } @@ -688,8 +703,12 @@ int khvcd(void *unused) if (!hvc_kicked) { if (poll_mask == 0) schedule(); - else - msleep_interruptible(TIMEOUT); + else { + if (timeout < MAX_TIMEOUT) + timeout += (timeout >> 6) + 1; + + msleep_interruptible(timeout); + } } __set_current_state(TASK_RUNNING); } while (!kthread_should_stop()); @@ -794,7 +813,7 @@ int __devexit hvc_remove(struct hvc_struct *hp) /* * We 'put' the instance that was grabbed when the kobject instance - * was intialized using kobject_init(). Let the last holder of this + * was initialized using kobject_init(). Let the last holder of this * kobject cause it to be removed, which will probably be the tty_hangup * below. */ @@ -850,7 +869,7 @@ int __init hvc_init(void) } module_init(hvc_init); -/* This isn't particularily necessary due to this being a console driver +/* This isn't particularly necessary due to this being a console driver * but it is nice to be thorough. */ static void __exit hvc_exit(void) diff --git a/drivers/char/hvc_iseries.c b/drivers/char/hvc_iseries.c index f144a947bd1..ec420fe8a90 100644 --- a/drivers/char/hvc_iseries.c +++ b/drivers/char/hvc_iseries.c @@ -575,7 +575,7 @@ static int hvc_find_vtys(void) (num_found >= VTTY_PORTS)) break; - vtermno = get_property(vty, "reg", NULL); + vtermno = of_get_property(vty, "reg", NULL); if (!vtermno) continue; diff --git a/drivers/char/hvc_vio.c b/drivers/char/hvc_vio.c index f9c00844d2b..94a542e20ef 100644 --- a/drivers/char/hvc_vio.c +++ b/drivers/char/hvc_vio.c @@ -153,7 +153,7 @@ static int hvc_find_vtys(void) if (num_found >= MAX_NR_HVC_CONSOLES) break; - vtermno = get_property(vty, "reg", NULL); + vtermno = of_get_property(vty, "reg", NULL); if (!vtermno) continue; diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c index 50315d6364f..d5a752da322 100644 --- a/drivers/char/hvsi.c +++ b/drivers/char/hvsi.c @@ -1279,8 +1279,8 @@ static int __init hvsi_console_init(void) struct hvsi_struct *hp; const uint32_t *vtermno, *irq; - vtermno = get_property(vty, "reg", NULL); - irq = get_property(vty, "interrupts", NULL); + vtermno = of_get_property(vty, "reg", NULL); + irq = of_get_property(vty, "interrupts", NULL); if (!vtermno || !irq) continue; diff --git a/drivers/char/tpm/tpm_atmel.h b/drivers/char/tpm/tpm_atmel.h index aefd683c60b..3c852009196 100644 --- a/drivers/char/tpm/tpm_atmel.h +++ b/drivers/char/tpm/tpm_atmel.h @@ -53,8 +53,8 @@ static void __iomem * atmel_get_base_addr(unsigned long *base, int *region_size) } reg = get_property(dn, "reg", ®len); - naddrc = prom_n_addr_cells(dn); - nsizec = prom_n_size_cells(dn); + naddrc = of_n_addr_cells(dn); + nsizec = of_n_size_cells(dn); of_node_put(dn); diff --git a/drivers/char/watchdog/Kconfig b/drivers/char/watchdog/Kconfig index e812aa129e2..60198a78974 100644 --- a/drivers/char/watchdog/Kconfig +++ b/drivers/char/watchdog/Kconfig @@ -548,7 +548,7 @@ config MV64X60_WDT depends on WATCHDOG && MV64X60 config BOOKE_WDT - tristate "PowerPC Book-E Watchdog Timer" + bool "PowerPC Book-E Watchdog Timer" depends on WATCHDOG && (BOOKE || 4xx) ---help--- Please see Documentation/watchdog/watchdog-api.txt for |