diff --git a/[refs] b/[refs] index 29d6aad070dd..01b48cc86b49 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c8ff99a7c2fb23a0f1165f3821fd66fd65f30264 +refs/heads/master: 656a3f797889dafcce2f5b8b222ad66e9974b6f7 diff --git a/trunk/drivers/watchdog/Kconfig b/trunk/drivers/watchdog/Kconfig index ccb78f66c2b6..254d115cafab 100644 --- a/trunk/drivers/watchdog/Kconfig +++ b/trunk/drivers/watchdog/Kconfig @@ -295,19 +295,6 @@ config ALIM7101_WDT Most people will say N. -config GEODE_WDT - tristate "AMD Geode CS5535/CS5536 Watchdog" - depends on MGEODE_LX - help - This driver enables a watchdog capability built into the - CS5535/CS5536 companion chips for the AMD Geode GX and LX - processors. This watchdog watches your kernel to make sure - it doesn't freeze, and if it does, it reboots your computer after - a certain amount of time. - - You can compile this driver directly into the kernel, or use - it as a module. The module will be called geodewdt. - config SC520_WDT tristate "AMD Elan SC520 processor Watchdog" depends on X86 diff --git a/trunk/drivers/watchdog/Makefile b/trunk/drivers/watchdog/Makefile index 25b352b664d9..f3fb170fe5c6 100644 --- a/trunk/drivers/watchdog/Makefile +++ b/trunk/drivers/watchdog/Makefile @@ -59,7 +59,6 @@ obj-$(CONFIG_ACQUIRE_WDT) += acquirewdt.o obj-$(CONFIG_ADVANTECH_WDT) += advantechwdt.o obj-$(CONFIG_ALIM1535_WDT) += alim1535_wdt.o obj-$(CONFIG_ALIM7101_WDT) += alim7101_wdt.o -obj-$(CONFIG_GEODE_WDT) += geodewdt.o obj-$(CONFIG_SC520_WDT) += sc520_wdt.o obj-$(CONFIG_EUROTECH_WDT) += eurotechwdt.o obj-$(CONFIG_IB700_WDT) += ib700wdt.o diff --git a/trunk/drivers/watchdog/bfin_wdt.c b/trunk/drivers/watchdog/bfin_wdt.c index 03b3e3d91e7c..1237113dc14a 100644 --- a/trunk/drivers/watchdog/bfin_wdt.c +++ b/trunk/drivers/watchdog/bfin_wdt.c @@ -29,8 +29,7 @@ #define stamp(fmt, args...) pr_debug("%s:%i: " fmt "\n", __func__, __LINE__, ## args) #define stampit() stamp("here i am") -#define pr_devinit(fmt, args...) ({ static const __devinitconst char __fmt[] = fmt; printk(__fmt, ## args); }) -#define pr_init(fmt, args...) ({ static const __initconst char __fmt[] = fmt; printk(__fmt, ## args); }) +#define pr_init(fmt, args...) ({ static const __initdata char __fmt[] = fmt; printk(__fmt, ## args); }) #define WATCHDOG_NAME "bfin-wdt" #define PFX WATCHDOG_NAME ": " @@ -378,6 +377,20 @@ static int bfin_wdt_resume(struct platform_device *pdev) # define bfin_wdt_resume NULL #endif +static struct platform_device bfin_wdt_device = { + .name = WATCHDOG_NAME, + .id = -1, +}; + +static struct platform_driver bfin_wdt_driver = { + .driver = { + .name = WATCHDOG_NAME, + .owner = THIS_MODULE, + }, + .suspend = bfin_wdt_suspend, + .resume = bfin_wdt_resume, +}; + static const struct file_operations bfin_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, @@ -404,67 +417,11 @@ static struct notifier_block bfin_wdt_notifier = { .notifier_call = bfin_wdt_notify_sys, }; -/** - * bfin_wdt_probe - Initialize module - * - * Registers the misc device and notifier handler. Actual device - * initialization is handled by bfin_wdt_open(). - */ -static int __devinit bfin_wdt_probe(struct platform_device *pdev) -{ - int ret; - - ret = register_reboot_notifier(&bfin_wdt_notifier); - if (ret) { - pr_devinit(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", ret); - return ret; - } - - ret = misc_register(&bfin_wdt_miscdev); - if (ret) { - pr_devinit(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", - WATCHDOG_MINOR, ret); - unregister_reboot_notifier(&bfin_wdt_notifier); - return ret; - } - - pr_devinit(KERN_INFO PFX "initialized: timeout=%d sec (nowayout=%d)\n", - timeout, nowayout); - - return 0; -} - -/** - * bfin_wdt_remove - Initialize module - * - * Unregisters the misc device and notifier handler. Actual device - * deinitialization is handled by bfin_wdt_close(). - */ -static int __devexit bfin_wdt_remove(struct platform_device *pdev) -{ - misc_deregister(&bfin_wdt_miscdev); - unregister_reboot_notifier(&bfin_wdt_notifier); - return 0; -} - -static struct platform_device *bfin_wdt_device; - -static struct platform_driver bfin_wdt_driver = { - .probe = bfin_wdt_probe, - .remove = __devexit_p(bfin_wdt_remove), - .suspend = bfin_wdt_suspend, - .resume = bfin_wdt_resume, - .driver = { - .name = WATCHDOG_NAME, - .owner = THIS_MODULE, - }, -}; - /** * bfin_wdt_init - Initialize module * - * Checks the module params and registers the platform device & driver. - * Real work is in the platform probe function. + * Registers the device and notifier handler. Actual device + * initialization is handled by bfin_wdt_open(). */ static int __init bfin_wdt_init(void) { @@ -479,32 +436,44 @@ static int __init bfin_wdt_init(void) /* Since this is an on-chip device and needs no board-specific * resources, we'll handle all the platform device stuff here. */ - ret = platform_driver_register(&bfin_wdt_driver); + ret = platform_device_register(&bfin_wdt_device); + if (ret) + return ret; + + ret = platform_driver_probe(&bfin_wdt_driver, NULL); + if (ret) + return ret; + + ret = register_reboot_notifier(&bfin_wdt_notifier); if (ret) { - pr_init(KERN_ERR PFX "unable to register driver\n"); + pr_init(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", ret); return ret; } - bfin_wdt_device = platform_device_register_simple(WATCHDOG_NAME, -1, NULL, 0); - if (IS_ERR(bfin_wdt_device)) { - pr_init(KERN_ERR PFX "unable to register device\n"); - platform_driver_unregister(&bfin_wdt_driver); - return PTR_ERR(bfin_wdt_device); + ret = misc_register(&bfin_wdt_miscdev); + if (ret) { + pr_init(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", + WATCHDOG_MINOR, ret); + unregister_reboot_notifier(&bfin_wdt_notifier); + return ret; } + pr_init(KERN_INFO PFX "initialized: timeout=%d sec (nowayout=%d)\n", + timeout, nowayout); + return 0; } /** * bfin_wdt_exit - Deinitialize module * - * Back out the platform device & driver steps. Real work is in the - * platform remove function. + * Unregisters the device and notifier handler. Actual device + * deinitialization is handled by bfin_wdt_close(). */ static void __exit bfin_wdt_exit(void) { - platform_device_unregister(bfin_wdt_device); - platform_driver_unregister(&bfin_wdt_driver); + misc_deregister(&bfin_wdt_miscdev); + unregister_reboot_notifier(&bfin_wdt_notifier); } module_init(bfin_wdt_init); diff --git a/trunk/drivers/watchdog/booke_wdt.c b/trunk/drivers/watchdog/booke_wdt.c index c1ba0db48501..d362f5bf658a 100644 --- a/trunk/drivers/watchdog/booke_wdt.c +++ b/trunk/drivers/watchdog/booke_wdt.c @@ -1,10 +1,12 @@ /* + * drivers/char/watchdog/booke_wdt.c + * * Watchdog timer for PowerPC Book-E systems * * Author: Matthew McClintock * Maintainer: Kumar Gala * - * Copyright 2005, 2008 Freescale Semiconductor Inc. + * Copyright 2005 Freescale Semiconductor Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -14,7 +16,6 @@ #include #include -#include #include #include #include @@ -37,7 +38,7 @@ #define WDT_PERIOD_DEFAULT 3 /* Refer to the PPC40x and PPC4xx manuals */ #endif /* for timing information */ -u32 booke_wdt_enabled; +u32 booke_wdt_enabled = 0; u32 booke_wdt_period = WDT_PERIOD_DEFAULT; #ifdef CONFIG_FSL_BOOKE @@ -46,31 +47,33 @@ u32 booke_wdt_period = WDT_PERIOD_DEFAULT; #define WDTP(x) (TCR_WP(x)) #endif -static DEFINE_SPINLOCK(booke_wdt_lock); - -static void __booke_wdt_ping(void *data) +/* + * booke_wdt_ping: + */ +static __inline__ void booke_wdt_ping(void) { mtspr(SPRN_TSR, TSR_ENW|TSR_WIS); } -static void booke_wdt_ping(void) -{ - on_each_cpu(__booke_wdt_ping, NULL, 0, 0); -} - -static void __booke_wdt_enable(void *data) +/* + * booke_wdt_enable: + */ +static __inline__ void booke_wdt_enable(void) { u32 val; /* clear status before enabling watchdog */ - __booke_wdt_ping(NULL); + booke_wdt_ping(); val = mfspr(SPRN_TCR); val |= (TCR_WIE|TCR_WRC(WRC_CHIP)|WDTP(booke_wdt_period)); mtspr(SPRN_TCR, val); } -static ssize_t booke_wdt_write(struct file *file, const char __user *buf, +/* + * booke_wdt_write: + */ +static ssize_t booke_wdt_write (struct file *file, const char __user *buf, size_t count, loff_t *ppos) { booke_wdt_ping(); @@ -78,11 +81,15 @@ static ssize_t booke_wdt_write(struct file *file, const char __user *buf, } static struct watchdog_info ident = { - .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, - .identity = "PowerPC Book-E Watchdog", + .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, + .firmware_version = 0, + .identity = "PowerPC Book-E Watchdog", }; -static int booke_wdt_ioctl(struct inode *inode, struct file *file, +/* + * booke_wdt_ioctl: + */ +static int booke_wdt_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { u32 tmp = 0; @@ -90,7 +97,7 @@ static int booke_wdt_ioctl(struct inode *inode, struct file *file, switch (cmd) { case WDIOC_GETSUPPORT: - if (copy_to_user((struct watchdog_info __user *)arg, &ident, + if (copy_to_user ((struct watchdog_info __user *) arg, &ident, sizeof(struct watchdog_info))) return -EFAULT; case WDIOC_GETSTATUS: @@ -125,33 +132,33 @@ static int booke_wdt_ioctl(struct inode *inode, struct file *file, return 0; } - -static int booke_wdt_open(struct inode *inode, struct file *file) +/* + * booke_wdt_open: + */ +static int booke_wdt_open (struct inode *inode, struct file *file) { - spin_lock(&booke_wdt_lock); if (booke_wdt_enabled == 0) { booke_wdt_enabled = 1; - on_each_cpu(__booke_wdt_enable, NULL, 0, 0); - printk(KERN_INFO "PowerPC Book-E Watchdog Timer Enabled " - "(wdt_period=%d)\n", booke_wdt_period); + booke_wdt_enable(); + printk (KERN_INFO "PowerPC Book-E Watchdog Timer Enabled (wdt_period=%d)\n", + booke_wdt_period); } - spin_unlock(&booke_wdt_lock); return nonseekable_open(inode, file); } static const struct file_operations booke_wdt_fops = { - .owner = THIS_MODULE, - .llseek = no_llseek, - .write = booke_wdt_write, - .ioctl = booke_wdt_ioctl, - .open = booke_wdt_open, + .owner = THIS_MODULE, + .llseek = no_llseek, + .write = booke_wdt_write, + .ioctl = booke_wdt_ioctl, + .open = booke_wdt_open, }; static struct miscdevice booke_wdt_miscdev = { - .minor = WATCHDOG_MINOR, - .name = "watchdog", - .fops = &booke_wdt_fops, + .minor = WATCHDOG_MINOR, + .name = "watchdog", + .fops = &booke_wdt_fops, }; static void __exit booke_wdt_exit(void) @@ -159,27 +166,28 @@ static void __exit booke_wdt_exit(void) misc_deregister(&booke_wdt_miscdev); } +/* + * booke_wdt_init: + */ static int __init booke_wdt_init(void) { int ret = 0; - printk(KERN_INFO "PowerPC Book-E Watchdog Timer Loaded\n"); + printk (KERN_INFO "PowerPC Book-E Watchdog Timer Loaded\n"); ident.firmware_version = cur_cpu_spec->pvr_value; ret = misc_register(&booke_wdt_miscdev); if (ret) { - printk(KERN_CRIT "Cannot register miscdev on minor=%d: %d\n", + printk (KERN_CRIT "Cannot register miscdev on minor=%d (err=%d)\n", WATCHDOG_MINOR, ret); return ret; } - spin_lock(&booke_wdt_lock); if (booke_wdt_enabled == 1) { - printk(KERN_INFO "PowerPC Book-E Watchdog Timer Enabled " - "(wdt_period=%d)\n", booke_wdt_period); - on_each_cpu(__booke_wdt_enable, NULL, 0, 0); + printk (KERN_INFO "PowerPC Book-E Watchdog Timer Enabled (wdt_period=%d)\n", + booke_wdt_period); + booke_wdt_enable(); } - spin_unlock(&booke_wdt_lock); return ret; } diff --git a/trunk/drivers/watchdog/geodewdt.c b/trunk/drivers/watchdog/geodewdt.c deleted file mode 100644 index f85b19625f97..000000000000 --- a/trunk/drivers/watchdog/geodewdt.c +++ /dev/null @@ -1,309 +0,0 @@ -/* Watchdog timer for the Geode GX/LX with the CS5535/CS5536 companion chip - * - * Copyright (C) 2006-2007, Advanced Micro Devices, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#define GEODEWDT_HZ 500 -#define GEODEWDT_SCALE 6 -#define GEODEWDT_MAX_SECONDS 131 - -#define WDT_FLAGS_OPEN 1 -#define WDT_FLAGS_ORPHAN 2 - -#define DRV_NAME "geodewdt" -#define WATCHDOG_NAME "Geode GX/LX WDT" -#define WATCHDOG_TIMEOUT 60 - -static int timeout = WATCHDOG_TIMEOUT; -module_param(timeout, int, 0); -MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1<= timeout <=131, default=" __MODULE_STRING(WATCHDOG_TIMEOUT) "."); - -static int nowayout = WATCHDOG_NOWAYOUT; -module_param(nowayout, int, 0); -MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); - -static struct platform_device *geodewdt_platform_device; -static unsigned long wdt_flags; -static int wdt_timer; -static int safe_close; - -static void geodewdt_ping(void) -{ - /* Stop the counter */ - geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0); - - /* Reset the counter */ - geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0); - - /* Enable the counter */ - geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, MFGPT_SETUP_CNTEN); -} - -static void geodewdt_disable(void) -{ - geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0); - geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0); -} - -static int geodewdt_set_heartbeat(int val) -{ - if (val < 1 || val > GEODEWDT_MAX_SECONDS) - return -EINVAL; - - geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0); - geode_mfgpt_write(wdt_timer, MFGPT_REG_CMP2, val * GEODEWDT_HZ); - geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0); - geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, MFGPT_SETUP_CNTEN); - - timeout = val; - return 0; -} - -static int -geodewdt_open(struct inode *inode, struct file *file) -{ - if (test_and_set_bit(WDT_FLAGS_OPEN, &wdt_flags)) - return -EBUSY; - - if (!test_and_clear_bit(WDT_FLAGS_ORPHAN, &wdt_flags)) - __module_get(THIS_MODULE); - - geodewdt_ping(); - return nonseekable_open(inode, file); -} - -static int -geodewdt_release(struct inode *inode, struct file *file) -{ - if (safe_close) { - geodewdt_disable(); - module_put(THIS_MODULE); - } - else { - printk(KERN_CRIT "Unexpected close - watchdog is not stopping.\n"); - geodewdt_ping(); - - set_bit(WDT_FLAGS_ORPHAN, &wdt_flags); - } - - clear_bit(WDT_FLAGS_OPEN, &wdt_flags); - safe_close = 0; - return 0; -} - -static ssize_t -geodewdt_write(struct file *file, const char __user *data, size_t len, - loff_t *ppos) -{ - if(len) { - if (!nowayout) { - size_t i; - safe_close = 0; - - for (i = 0; i != len; i++) { - char c; - - if (get_user(c, data + i)) - return -EFAULT; - - if (c == 'V') - safe_close = 1; - } - } - - geodewdt_ping(); - } - return len; -} - -static int -geodewdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg) -{ - void __user *argp = (void __user *)arg; - int __user *p = argp; - int interval; - - static struct watchdog_info ident = { - .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING - | WDIOF_MAGICCLOSE, - .firmware_version = 1, - .identity = WATCHDOG_NAME, - }; - - switch(cmd) { - case WDIOC_GETSUPPORT: - return copy_to_user(argp, &ident, - sizeof(ident)) ? -EFAULT : 0; - break; - - case WDIOC_GETSTATUS: - case WDIOC_GETBOOTSTATUS: - return put_user(0, p); - - case WDIOC_KEEPALIVE: - geodewdt_ping(); - return 0; - - case WDIOC_SETTIMEOUT: - if (get_user(interval, p)) - return -EFAULT; - - if (geodewdt_set_heartbeat(interval)) - return -EINVAL; - -/* Fall through */ - - case WDIOC_GETTIMEOUT: - return put_user(timeout, p); - - case WDIOC_SETOPTIONS: - { - int options, ret = -EINVAL; - - if (get_user(options, p)) - return -EFAULT; - - if (options & WDIOS_DISABLECARD) { - geodewdt_disable(); - ret = 0; - } - - if (options & WDIOS_ENABLECARD) { - geodewdt_ping(); - ret = 0; - } - - return ret; - } - default: - return -ENOTTY; - } - - return 0; -} - -static const struct file_operations geodewdt_fops = { - .owner = THIS_MODULE, - .llseek = no_llseek, - .write = geodewdt_write, - .ioctl = geodewdt_ioctl, - .open = geodewdt_open, - .release = geodewdt_release, -}; - -static struct miscdevice geodewdt_miscdev = { - .minor = WATCHDOG_MINOR, - .name = "watchdog", - .fops = &geodewdt_fops -}; - -static int __devinit -geodewdt_probe(struct platform_device *dev) -{ - int ret, timer; - - timer = geode_mfgpt_alloc_timer(MFGPT_TIMER_ANY, - MFGPT_DOMAIN_WORKING, THIS_MODULE); - - if (timer == -1) { - printk(KERN_ERR "geodewdt: No timers were available\n"); - return -ENODEV; - } - - wdt_timer = timer; - - /* Set up the timer */ - - geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, - GEODEWDT_SCALE | (3 << 8)); - - /* Set up comparator 2 to reset when the event fires */ - geode_mfgpt_toggle_event(wdt_timer, MFGPT_CMP2, MFGPT_EVENT_RESET, 1); - - /* Set up the initial timeout */ - - geode_mfgpt_write(wdt_timer, MFGPT_REG_CMP2, - timeout * GEODEWDT_HZ); - - ret = misc_register(&geodewdt_miscdev); - - return ret; -} - -static int __devexit -geodewdt_remove(struct platform_device *dev) -{ - misc_deregister(&geodewdt_miscdev); - return 0; -} - -static void -geodewdt_shutdown(struct platform_device *dev) -{ - geodewdt_disable(); -} - -static struct platform_driver geodewdt_driver = { - .probe = geodewdt_probe, - .remove = __devexit_p(geodewdt_remove), - .shutdown = geodewdt_shutdown, - .driver = { - .owner = THIS_MODULE, - .name = DRV_NAME, - }, -}; - -static int __init -geodewdt_init(void) -{ - int ret; - - ret = platform_driver_register(&geodewdt_driver); - if (ret) - return ret; - - geodewdt_platform_device = platform_device_register_simple(DRV_NAME, -1, NULL, 0); - if (IS_ERR(geodewdt_platform_device)) { - ret = PTR_ERR(geodewdt_platform_device); - goto err; - } - - return 0; -err: - platform_driver_unregister(&geodewdt_driver); - return ret; -} - -static void __exit -geodewdt_exit(void) -{ - platform_device_unregister(geodewdt_platform_device); - platform_driver_unregister(&geodewdt_driver); -} - -module_init(geodewdt_init); -module_exit(geodewdt_exit); - -MODULE_AUTHOR("Advanced Micro Devices, Inc"); -MODULE_DESCRIPTION("Geode GX/LX Watchdog Driver"); -MODULE_LICENSE("GPL"); -MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); diff --git a/trunk/drivers/watchdog/hpwdt.c b/trunk/drivers/watchdog/hpwdt.c index 6a63535fc04d..6483d1066b95 100644 --- a/trunk/drivers/watchdog/hpwdt.c +++ b/trunk/drivers/watchdog/hpwdt.c @@ -418,20 +418,23 @@ static int hpwdt_pretimeout(struct notifier_block *nb, unsigned long ulReason, static unsigned long rom_pl; static int die_nmi_called; - if (ulReason == DIE_NMI || ulReason == DIE_NMI_IPI) { - spin_lock_irqsave(&rom_lock, rom_pl); - if (!die_nmi_called) - asminline_call(&cmn_regs, cru_rom_addr); - die_nmi_called = 1; - spin_unlock_irqrestore(&rom_lock, rom_pl); - if (cmn_regs.u1.ral != 0) { - panic("An NMI occurred, please see the Integrated " - "Management Log for details.\n"); - } + if (ulReason != DIE_NMI && ulReason != DIE_NMI_IPI) + return NOTIFY_OK; + + spin_lock_irqsave(&rom_lock, rom_pl); + if (!die_nmi_called) + asminline_call(&cmn_regs, cru_rom_addr); + die_nmi_called = 1; + spin_unlock_irqrestore(&rom_lock, rom_pl); + if (cmn_regs.u1.ral == 0) { + printk(KERN_WARNING "hpwdt: An NMI occurred, " + "but unable to determine source.\n"); + } else { + panic("An NMI occurred, please see the Integrated " + "Management Log for details.\n"); } - die_nmi_called = 0; - return NOTIFY_DONE; + return NOTIFY_STOP; } /* diff --git a/trunk/drivers/watchdog/iTCO_wdt.c b/trunk/drivers/watchdog/iTCO_wdt.c index 95ba985bd341..a0e6809e369f 100644 --- a/trunk/drivers/watchdog/iTCO_wdt.c +++ b/trunk/drivers/watchdog/iTCO_wdt.c @@ -41,10 +41,9 @@ * 82801HH (ICH8DH) : document number 313056-003, 313057-009, * 82801HO (ICH8DO) : document number 313056-003, 313057-009, * 82801HEM (ICH8M-E) : document number 313056-003, 313057-009, - * 82801IB (ICH9) : document number 316972-001, 316973-006, - * 82801IR (ICH9R) : document number 316972-001, 316973-006, - * 82801IH (ICH9DH) : document number 316972-001, 316973-006, - * 82801IO (ICH9DO) : document number 316972-001, 316973-006, + * 82801IB (ICH9) : document number 316972-001, 316973-001, + * 82801IR (ICH9R) : document number 316972-001, 316973-001, + * 82801IH (ICH9DH) : document number 316972-001, 316973-001, * 6300ESB (6300ESB) : document number 300641-003, 300884-010, * 631xESB (631xESB) : document number 313082-001, 313075-005, * 632xESB (632xESB) : document number 313082-001, 313075-005 @@ -56,8 +55,8 @@ /* Module and version information */ #define DRV_NAME "iTCO_wdt" -#define DRV_VERSION "1.03" -#define DRV_RELDATE "30-Apr-2008" +#define DRV_VERSION "1.02" +#define DRV_RELDATE "26-Jul-2007" #define PFX DRV_NAME ": " /* Includes */ @@ -105,7 +104,6 @@ enum iTCO_chipsets { TCO_ICH9, /* ICH9 */ TCO_ICH9R, /* ICH9R */ TCO_ICH9DH, /* ICH9DH */ - TCO_ICH9DO, /* ICH9DO */ TCO_631XESB, /* 631xESB/632xESB */ }; @@ -138,7 +136,6 @@ static struct { {"ICH9", 2}, {"ICH9R", 2}, {"ICH9DH", 2}, - {"ICH9DO", 2}, {"631xESB/632xESB", 2}, {NULL,0} }; @@ -184,7 +181,6 @@ static struct pci_device_id iTCO_wdt_pci_tbl[] = { { ITCO_PCI_DEVICE(0x2918, TCO_ICH9 )}, { ITCO_PCI_DEVICE(0x2916, TCO_ICH9R )}, { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH9_2, TCO_ICH9DH )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH9_4, TCO_ICH9DO )}, { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ESB2_0, TCO_631XESB)}, { ITCO_PCI_DEVICE(0x2671, TCO_631XESB)}, { ITCO_PCI_DEVICE(0x2672, TCO_631XESB)}, diff --git a/trunk/drivers/watchdog/w83697hf_wdt.c b/trunk/drivers/watchdog/w83697hf_wdt.c index 528b882420b6..c622a0e6c9ae 100644 --- a/trunk/drivers/watchdog/w83697hf_wdt.c +++ b/trunk/drivers/watchdog/w83697hf_wdt.c @@ -44,7 +44,6 @@ #define WATCHDOG_NAME "w83697hf/hg WDT" #define PFX WATCHDOG_NAME ": " #define WATCHDOG_TIMEOUT 60 /* 60 sec default timeout */ -#define WATCHDOG_EARLY_DISABLE 1 /* Disable until userland kicks in */ static unsigned long wdt_is_open; static char expect_close; @@ -57,16 +56,12 @@ MODULE_PARM_DESC(wdt_io, "w83697hf/hg WDT io port (default 0x2e, 0 = autodetect) static int timeout = WATCHDOG_TIMEOUT; /* in seconds */ module_param(timeout, int, 0); -MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1<= timeout <=255 (default=" __MODULE_STRING(WATCHDOG_TIMEOUT) ")"); +MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1<= timeout <=255, default=" __MODULE_STRING(WATCHDOG_TIMEOUT) "."); static int nowayout = WATCHDOG_NOWAYOUT; module_param(nowayout, int, 0); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); -static int early_disable = WATCHDOG_EARLY_DISABLE; -module_param(early_disable, int, 0); -MODULE_PARM_DESC(early_disable, "Watchdog gets disabled at boot time (default=" __MODULE_STRING(WATCHDOG_EARLY_DISABLE) ")"); - /* * Kernel methods. */ @@ -145,7 +140,7 @@ w83697hf_init(void) w83697hf_deselect_wdt(); } -static void +static int wdt_ping(void) { spin_lock(&io_lock); @@ -155,9 +150,10 @@ wdt_ping(void) w83697hf_deselect_wdt(); spin_unlock(&io_lock); + return 0; } -static void +static int wdt_enable(void) { spin_lock(&io_lock); @@ -168,9 +164,10 @@ wdt_enable(void) w83697hf_deselect_wdt(); spin_unlock(&io_lock); + return 0; } -static void +static int wdt_disable(void) { spin_lock(&io_lock); @@ -181,22 +178,7 @@ wdt_disable(void) w83697hf_deselect_wdt(); spin_unlock(&io_lock); -} - -static unsigned char -wdt_running(void) -{ - unsigned char t; - - spin_lock(&io_lock); - w83697hf_select_wdt(); - - t = w83697hf_get_reg(0xF4); /* Read timer */ - - w83697hf_deselect_wdt(); - spin_unlock(&io_lock); - - return t; + return 0; } static int @@ -415,11 +397,7 @@ wdt_init(void) } w83697hf_init(); - if (early_disable) { - if (wdt_running()) - printk (KERN_WARNING PFX "Stopping previously enabled watchdog until userland kicks in\n"); - wdt_disable(); - } + wdt_disable(); /* Disable watchdog until first use */ if (wdt_set_heartbeat(timeout)) { wdt_set_heartbeat(WATCHDOG_TIMEOUT); diff --git a/trunk/scripts/ver_linux b/trunk/scripts/ver_linux index ab69ecefedbd..7ac0e309be09 100755 --- a/trunk/scripts/ver_linux +++ b/trunk/scripts/ver_linux @@ -12,12 +12,9 @@ echo ' ' uname -a echo ' ' -gcc --version 2>&1| head -n 1 | grep -v gcc | awk \ +gcc -dumpversion 2>&1| awk \ 'NR==1{print "Gnu C ", $1}' -gcc --version 2>&1| grep gcc | awk \ -'NR==1{print "Gnu C ", $3}' - make --version 2>&1 | awk -F, '{print $1}' | awk \ '/GNU Make/{print "Gnu make ",$NF}' diff --git a/trunk/sound/drivers/pcsp/pcsp.h b/trunk/sound/drivers/pcsp/pcsp.h index 1d661f795e8c..f07cc1ee1fe7 100644 --- a/trunk/sound/drivers/pcsp/pcsp.h +++ b/trunk/sound/drivers/pcsp/pcsp.h @@ -24,8 +24,7 @@ static DEFINE_SPINLOCK(i8253_lock); /* default timer freq for PC-Speaker: 18643 Hz */ #define DIV_18KHZ 64 #define MAX_DIV DIV_18KHZ -#define CALC_DIV(d) (MAX_DIV >> (d)) -#define CUR_DIV() CALC_DIV(chip->treble) +#define CUR_DIV() (MAX_DIV >> chip->treble) #define PCSP_MAX_TREBLE 1 /* unfortunately, with hrtimers 37KHz does not work very well :( */ @@ -37,8 +36,7 @@ static DEFINE_SPINLOCK(i8253_lock); #define PCSP_DEFAULT_SDIV (DIV_18KHZ >> 1) #define PCSP_DEFAULT_SRATE (PIT_TICK_RATE / PCSP_DEFAULT_SDIV) #define PCSP_INDEX_INC() (1 << (PCSP_MAX_TREBLE - chip->treble)) -#define PCSP_CALC_RATE(i) (PIT_TICK_RATE / CALC_DIV(i)) -#define PCSP_RATE() PCSP_CALC_RATE(chip->treble) +#define PCSP_RATE() (PIT_TICK_RATE / CUR_DIV()) #define PCSP_MIN_RATE__1 MAX_DIV/PIT_TICK_RATE #define PCSP_MAX_RATE__1 MIN_DIV/PIT_TICK_RATE #define PCSP_MAX_PERIOD_NS (1000000000ULL * PCSP_MIN_RATE__1) diff --git a/trunk/sound/drivers/pcsp/pcsp_mixer.c b/trunk/sound/drivers/pcsp/pcsp_mixer.c index caeb0f57fcca..64a695fef74e 100644 --- a/trunk/sound/drivers/pcsp/pcsp_mixer.c +++ b/trunk/sound/drivers/pcsp/pcsp_mixer.c @@ -50,8 +50,7 @@ static int pcsp_treble_info(struct snd_kcontrol *kcontrol, uinfo->value.enumerated.items = chip->max_treble + 1; if (uinfo->value.enumerated.item > chip->max_treble) uinfo->value.enumerated.item = chip->max_treble; - sprintf(uinfo->value.enumerated.name, "%d", - PCSP_CALC_RATE(uinfo->value.enumerated.item)); + sprintf(uinfo->value.enumerated.name, "%d", PCSP_RATE()); return 0; } diff --git a/trunk/sound/pci/hda/patch_analog.c b/trunk/sound/pci/hda/patch_analog.c index ff1b922c610b..e0a605adde42 100644 --- a/trunk/sound/pci/hda/patch_analog.c +++ b/trunk/sound/pci/hda/patch_analog.c @@ -2858,7 +2858,6 @@ static const char *ad1988_models[AD1988_MODEL_LAST] = { static struct snd_pci_quirk ad1988_cfg_tbl[] = { SND_PCI_QUIRK(0x1043, 0x81ec, "Asus P5B-DLX", AD1988_6STACK_DIG), SND_PCI_QUIRK(0x1043, 0x81f6, "Asus M2N-SLI", AD1988_6STACK_DIG), - SND_PCI_QUIRK(0x1043, 0x8277, "Asus P5K-E/WIFI-AP", AD1988_6STACK_DIG), {} }; diff --git a/trunk/sound/pci/hda/patch_realtek.c b/trunk/sound/pci/hda/patch_realtek.c index 8f31247c52bd..864b2f598c38 100644 --- a/trunk/sound/pci/hda/patch_realtek.c +++ b/trunk/sound/pci/hda/patch_realtek.c @@ -853,7 +853,6 @@ static void alc_subsystem_id(struct hda_codec *codec, case 0x10ec0269: case 0x10ec0862: case 0x10ec0662: - case 0x10ec0889: snd_hda_codec_write(codec, 0x14, 0, AC_VERB_SET_EAPD_BTLENABLE, 2); snd_hda_codec_write(codec, 0x15, 0, @@ -878,7 +877,6 @@ static void alc_subsystem_id(struct hda_codec *codec, case 0x10ec0883: case 0x10ec0885: case 0x10ec0888: - case 0x10ec0889: snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 7); tmp = snd_hda_codec_read(codec, 0x20, 0, @@ -7745,7 +7743,6 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), - SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC), SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), diff --git a/trunk/sound/pci/hda/patch_sigmatel.c b/trunk/sound/pci/hda/patch_sigmatel.c index a4f44a00bae8..393f7fd2b1be 100644 --- a/trunk/sound/pci/hda/patch_sigmatel.c +++ b/trunk/sound/pci/hda/patch_sigmatel.c @@ -840,7 +840,7 @@ static struct snd_kcontrol_new stac92hd71bxx_mixer[] = { static struct snd_kcontrol_new stac925x_mixer[] = { STAC_INPUT_SOURCE(1), HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT), - HDA_CODEC_MUTE("Capture Switch", 0x14, 0, HDA_OUTPUT), + HDA_CODEC_MUTE("Capture Switch", 0x09, 0, HDA_OUTPUT), HDA_CODEC_VOLUME("Capture Mux Volume", 0x0f, 0, HDA_OUTPUT), { } /* end */ }; diff --git a/trunk/sound/pci/hda/patch_via.c b/trunk/sound/pci/hda/patch_via.c index e7e43524f8c7..52b1d81a26f7 100644 --- a/trunk/sound/pci/hda/patch_via.c +++ b/trunk/sound/pci/hda/patch_via.c @@ -447,23 +447,6 @@ static struct hda_pcm_stream vt1708_pcm_analog_playback = { }, }; -static struct hda_pcm_stream vt1708_pcm_analog_s16_playback = { - .substreams = 1, - .channels_min = 2, - .channels_max = 8, - .nid = 0x10, /* NID to query formats and rates */ - /* We got noisy outputs on the right channel on VT1708 when - * 24bit samples are used. Until any workaround is found, - * disable the 24bit format, so far. - */ - .formats = SNDRV_PCM_FMTBIT_S16_LE, - .ops = { - .open = via_playback_pcm_open, - .prepare = via_playback_pcm_prepare, - .cleanup = via_playback_pcm_cleanup - }, -}; - static struct hda_pcm_stream vt1708_pcm_analog_capture = { .substreams = 2, .channels_min = 2, @@ -916,9 +899,6 @@ static int patch_vt1708(struct hda_codec *codec) spec->stream_name_analog = "VT1708 Analog"; spec->stream_analog_playback = &vt1708_pcm_analog_playback; - /* disable 32bit format on VT1708 */ - if (codec->vendor_id == 0x11061708) - spec->stream_analog_playback = &vt1708_pcm_analog_s16_playback; spec->stream_analog_capture = &vt1708_pcm_analog_capture; spec->stream_name_digital = "VT1708 Digital";