summaryrefslogtreecommitdiffstats
path: root/drivers/char
Commit message (Collapse)AuthorAgeFilesLines
* intel-agp: Fix i830 mask variable that changed with G33 supportDave Airlie2007-09-192-2/+3
| | | | | | | | | | The mask on i830 should be 0x70 always, later chips 0xF0 should be okay. Signed-off-by: Dave Airlie <airlied@linux.ie> Acked-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Cc: Michael Haas <laga@laga.ath.cx> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* pci: fix unterminated pci_device_id listsKees Cook2007-09-191-1/+2
| | | | | | | | | | | | | | | | | Fix a couple drivers that do not correctly terminate their pci_device_id lists. This results in garbage being spewed into modules.pcimap when the module happens to not have 28 NULL bytes following the table, and/or the last PCI ID is actually truncated from the table when calculating the modules.alias PCI aliases, cause those unfortunate device IDs to not auto-load. Signed-off-by: Kees Cook <kees@ubuntu.com> Acked-by: Corey Minyard <minyard@acm.org> Cc: David Woodhouse <dwmw2@infradead.org> Acked-by: Jeff Garzik <jeff@garzik.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mspec: handle shrinking virtual memory areasCliff Wickman2007-09-191-21/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The shrinking of a virtual memory area that is mmap(2)'d to a memory special file (device drivers/char/mspec.c) can cause a panic. If the mapped size of the vma (vm_area_struct) is very large, mspec allocates a large vma_data structure with vmalloc(). But such a vma can be shrunk by an munmap(2). The current driver uses the current size of each vma to deduce whether its vma_data structure was allocated by kmalloc() or vmalloc(). So if the vma was shrunk it appears to have been allocated by kmalloc(), and mspec attempts to free it with kfree(). This results in a panic. This patch avoids the panic (by preserving the type of the allocation) and also makes mspec work correctly as the vma is split into pieces by the munmap(2)'s. All vma's derived from such a split vma share the same vma_data structure that represents all the pages mapped into this set of vma's. The mpec driver must be made capable of using the right portion of the structure for each member vma. In other words, it must index into the array of page addresses using the portion of the array that represents the current vma. This is enabled by storing the vma group's vm_start in the vma_data structure. The shared vma_data's are not protected by mm->mmap_sem in the fork() case so the reference count is left as atomic_t. Signed-off-by: Cliff Wickman <cpw@sgi.com> Acked-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sparc64 (and others): fix tty_ioctl.c buildTony Breeds2007-09-151-0/+14
| | | | | | | | | | | | | | | | Add Guards around TIOCSLCKTRMIOS and TIOCGLCKTRMIOS. Several architectures are still broken. Put temporary-for-2.6.23 ifdef guards around the offending code. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by:: Linus Torvalds <torvalds@linux-foundation.org>
* intel_agp: fix GTT map size on G33Zhenyu Wang2007-09-111-1/+4
| | | | | | | | | | | G33 has 1MB GTT table range. Fix GTT mapping in case like 512MB aperture size. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Acked-by: Dave Airlie <airlied@linux.ie> Cc: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* intel_agp: fix stolen mem range on G33Zhenyu Wang2007-09-111-0/+5
| | | | | | | | | | | G33 GTT stolen memory is below graphics data stolen memory and be seperate, so don't subtract it in stolen mem counting. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Acked-by: Dave Airlie <airlied@linux.ie> Cc: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* tty: termios locking functions break with new termios typeDavid Miller2007-09-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | I ran into a few problems. n_tty_ioctl() for instance: drivers/char/tty_ioctl.c:799: error: $,1rxstruct termios$,1ry has no member named $,1rxc_ispeed$,1ry This is calling the copy interface that is supposed to be using a termios2 when the new interfaces are defined, however: case TIOCGLCKTRMIOS: if (kernel_termios_to_user_termios((struct termios __user *)arg, real_tty->termios_locked)) return -EFAULT; return 0; This is going to write over the end of the userspace structure by a few bytes, and wasn't caught by you yet because the i386 implementation is simply copy_to_user() which does zero type checking. Signed-off-by: Alan Cox <alan@redhat.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Do not use the ia64 clocksource on non-ia64 architecturesLinus Torvalds2007-08-311-0/+3
| | | | | | | | | | | | | | | | | | | | | The HPET clocksource in drivers/char/hpet.c was written as generic code for ia64, but it is not yet ready to replace the native HPET clocksource implementations that the i386/x86-64 architectures use. On x86[-64], trying to register this clocksource results in potentially multiple hpet-based clocksources being registered, and if the ia64 one is chosen on x86_64 some users have experienced hangs. Eventually all three architectures may end up using the same code, but that is not the case right now. Cc: John Stultz <johnstul@us.ibm.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Paolo Ornati <ornati@fastwebnet.it> Cc: Bob Picco <bob.picco@hp.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [MIPS] Delete duplicate inclusion of <linux/delay.h>.Ralf Baechle2007-08-271-1/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Merge branch 'agp-patches' of ↵Linus Torvalds2007-08-258-5/+29
|\ | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6 * 'agp-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6: agp: balance ioremap checks agp: Add device id for P4M900 to via-agp module efficeon-agp leaks 'struct agp_bridge_data' in error paths of agp_efficeon_probe()
| * agp: balance ioremap checksScott Thompson2007-08-256-5/+22
| | | | | | | | | | | | | | | | | | patchset against 2.6.23-rc3. corrects missing ioremap return checks and balancing on iounmap calls, integrated changes per list recommendations on the original set of patches.. Signed-off-by: Scott Thompson <postfail <at> hushmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| * agp: Add device id for P4M900 to via-agp moduleXavier Bachelot2007-08-251-0/+5
| | | | | | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
| * efficeon-agp leaks 'struct agp_bridge_data' in error paths of ↵Jesper Juhl2007-08-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | agp_efficeon_probe() (This is a resend of a patch originally submitted on 24-Jul-2007 00:14) Ok, this is something the coverity checker found (CID: 1813). I'm not at all intimate with this code, so I'm not sure if this attempt at a fix is correct (but at least it compiles). Please look it over and NACK if bad or merge if good ;-) Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* | Merge branch 'drm-patches' of ↵Linus Torvalds2007-08-252-7/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm: ioremap return value checks drm/via: Fix dmablit when blit queue is full drm_rmmap_ioctl(): remove dead code
| * | drm: ioremap return value checksScott Thompson2007-08-251-1/+7
| | | | | | | | | | | | | | | Signed-off-by: Scott Thompson <postfail <at> hushmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | drm/via: Fix dmablit when blit queue is fullSimon Farnsworth2007-07-231-1/+1
| | | | | | | | | | | | | | | | | | | | | fd.o bug 11542 Acked-by: Thomas Hellstrom Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | drm_rmmap_ioctl(): remove dead codeAdrian Bunk2007-07-231-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | This patch removes some obviously dead code spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dave Airlie <airlied@linux.ie>
* | | Pull events into release branchLen Brown2007-08-251-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/acpi/video.c Signed-off-by: Len Brown <len.brown@intel.com>
| * | | ACPI: Schedule /proc/acpi/event for removalLen Brown2007-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Schedule /proc/acpi/event for removal in 6 months. Re-name acpi_bus_generate_event() to acpi_bus_generate_proc_event() to make sure there is no confusion that it is for /proc/acpi/event only. Add CONFIG_ACPI_PROC_EVENT to allow removal of /proc/acpi/event. There is no functional change if CONFIG_ACPI_PROC_EVENT=y Signed-off-by: Len Brown <len.brown@intel.com>
* | | | tty: dont needlessly cast kmalloc() return valueJesper Juhl2007-08-231-4/+2
|/ / / | | | | | | | | | | | | | | | | | | kmalloc() hands us a void pointer, we don't need to cast it. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | synclink_gt fix module referencePaul Fulghum2007-08-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Get module reference on open() by generic HDLC to prevent module from unloading while interface is active. Signed-off-by: Paul Fulghum <paulkf@microgate.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | IPMI: fix warning in ipmi_si_intf.cMijo Safradin2007-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trivial change: fix warning Signed-off-by: Mijo Safradin <safradin@de.ibm.com> Acked-by: Christian Krafft <krafft@de.ibm.com> Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visibleGeert Uytterhoeven2007-08-221-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible drivers/char/keyboard.c: In function 'kbd_keycode': drivers/char/keyboard.c:1142: error: implicit declaration of function 'mac_hid_mouse_emulate_buttons' The forward declaration of mac_hid_mouse_emulate_buttons() is not visible on m68k because it's hidden in the middle of a big #ifdef block. Move it to <linux/kbd_kern.h>, correct the type of the second parameter, and include <linux/kbd_kern.h> where needed. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | tpmdd maintainersKent Yoder2007-08-227-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix up the maintainers info in the tpm drivers. Kylene will be out for some time, so copying the sourceforge list is the best way to get some attention. Cc: Marcel Selhorst <tpm@selhorst.net> Cc: Kylene Jo Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | [WATCHDOG] Add support for 1533 bridge to alim1535_wdtAndrey Borzenkov2007-08-161-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: Andrey Borzenkov <arvidjaar@mail.ru> They are apparently pretty close (even lspci combines them). The patch adds support for 0x1533 bridge in addition to 0x1535. Tested on Toshiba Portege 4000 with 00:07.0 ISA bridge [0601]: ALi Corporation M1533/M1535 PCI to ISA Bridge [Aladdin IV/V/V+] [10b9:1533] 00:08.0 Bridge [0680]: ALi Corporation M7101 Power Management Controller [PMU] [10b9:7101] with result [ 2090.906736] PCI: Enabling device 0000:00:08.0 (0000 -> 0001) [ 2090.914034] ALi_M1535: initialized. timeout=3D60 sec (nowayout=3D0) Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
* | | [WATCHDOG] Eurotechwdt.c - clean-up commentsWim Van Sebroeck2007-08-161-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Clean-up history and add a comment about the fact that the watchdog is actually part of the SMSC FDC 37B782 super I/O chipset. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| | |
| \ \
*-. \ \ pull asus sony thinkpad into release branchLen Brown2007-08-121-1/+6
|\ \ \ \ | | |_|/ | |/| |
| | * | sonypi: fix ids member of struct acpi_driverEugene Teo2007-08-031-1/+6
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | ids member of struct acpi_driver is of type struct acpi_device_id, not a character array. Signed-off-by: Eugene Teo <eugeneteo@kernel.sg> Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
* | | lguest files should explicitly include asm/paravirt.hJes Sorensen2007-08-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Files using bits from paravirt.h should explicitly include it rather than relying on it being pulled in by something else. Signed-off-by: Jes Sorensen <jes@sgi.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | fix serial buffer memory leakAlan Cox2007-08-111-6/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch c5c34d4862e18ef07c1276d233507f540fb5a532 (tty: flush flip buffer on ldisc input queue flush) introduces a race condition which can lead to memory leaks. The problem can be triggered when tcflush() is called when data are being pushed to the line discipline driver by flush_to_ldisc(). flush_to_ldisc() releases tty->buf.lock when calling the line discipline receive_buf function. At that poing tty_buffer_flush() kicks in and sets both tty->buf.head and tty->buf.tail to NULL. When flush_to_ldisc() finishes, it restores tty->buf.head but doesn't touch tty->buf.tail. This corrups the buffer queue, and the next call to tty_buffer_request_room() will allocate a new buffer and overwrite tty->buf.head. The previous buffer is then lost forever without being released. (Thanks to Laurent for the above text, for finding, disgnosing and reporting the bug) - Use tty->flags bits for the flush status. - Wait for the flag to clear again before returning - Fix the doc error noted - Fix flush of empty queue leaving stale flushpending [akpm@linux-foundation.org: cleanup] Signed-off-by: Alan Cox <alan@redhat.com> Acked-by: Paul Fulghum <paulkf@microgate.com> Cc: Laurent Pinchart <laurentp@cse-semaphore.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | drivers/char/pcmcia/cm40x0_cs.c: fix release function callDaniel Ritz2007-08-112-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cm4000_cs.c and cm4040_cs.c call the internal release function with an argument of wrong type. this fixes bug #8485 Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch> Cc: Bill McConnaughey <mcconnau@biochem.wustl.edu> Cc: Natalie Protasevich <protasnb@gmail.com> Cc: Harald Welte <laforge@gnumonks.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | drm/i915: Fix i965 secured batchbuffer usageDave Airlie2007-08-062-3/+12
|/ / | | | | | | | | | | | | | | | | | | This 965G and above chipsets moved the batch buffer non-secure bits to another place. This means that previous drm's allowed in-secure batchbuffers to be submitted to the hardware from non-privileged users who are logged into X and and have access to direct rendering. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdogLinus Torvalds2007-07-3122-148/+1393
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: (28 commits) [WATCHDOG] Fix pcwd_init_module crash [WATCHDOG] ICH9 support for iTCO_wdt [WATCHDOG] 631xESB/632xESB support for iTCO_wdt - add all LPC bridges [WATCHDOG] 631xESB/632xESB support for iTCO_wdt [WATCHDOG] omap_wdt.c - default error for IOCTL is -ENOTTY [WATCHDOG] Return value of nonseekable_open [WATCHDOG] mv64x60_wdt: Rework the timeout register manipulation [WATCHDOG] mv64x60_wdt: disable watchdog timer when driver is probed [WATCHDOG] mv64x60_wdt: Support the WDIOF_MAGICCLOSE feature [WATCHDOG] mv64x60_wdt: Add a module parameter to change nowayout setting [WATCHDOG] mv64x60_wdt: Add WDIOC_SETOPTIONS ioctl support [WATCHDOG] mv64x60_wdt: Support for WDIOC_SETTIMEOUT ioctl [WATCHDOG] mv64x60_wdt: Fix WDIOC_GETTIMEOUT return value [WATCHDOG] mv64x60_wdt: Check return value of nonseekable_open [WATCHDOG] mv64x60_wdt: Add arch/powerpc platform support [WATCHDOG] mv64x60_wdt: Get register address from platform data [WATCHDOG] mv64x60_wdt: set up platform_device in platform code [WATCHDOG] ensure mouse and keyboard ignored in w83627hf_wdt [WATCHDOG] s3c2410_wdt: fixup after arch include moves [WATCHDOG] git-watchdog-typo ...
| * | [WATCHDOG] Fix pcwd_init_module crashWim Van Sebroeck2007-07-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for the problem detected by Ingo Molnar: enabling CONFIG_PCWATCHDOG=y crashes bzImage bootup. The reason for this can be found in drivers/makefile We first do: obj-y += char/ and later we do: obj-y += base/ block/ misc/ mfd/ net/ media/ So if we put a platform or isa or usb bus driver in char/watchdog (which is called from the Makefile in drivers/char/Makefile) then we didn't have the different device drivers initialized yet (they are in drivers/base and drivers/usb and ...) This fix makes sure that we compile the watchdog drivers after drivers/base, drivers/misc, drivers/pci and drivers/usb. We also do the compile after hwmon because in the future the watchdog temperature support will use the hwmon system. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * | [WATCHDOG] ICH9 support for iTCO_wdtWim Van Sebroeck2007-07-261-3/+15
| | | | | | | | | | | | | | | | | | | | | Add support for the ICH9 I/O chipsets to iTCO_wdt. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * | [WATCHDOG] 631xESB/632xESB support for iTCO_wdt - add all LPC bridgesWim Van Sebroeck2007-07-261-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add all LPC bridges for the 631xESB/632xESB I/O chipset. The datasheet says: * Device Function = B0:D31:FO * Function Description = LPC interface * DEV ID = 267xh * Comment = 2670h-267Fh Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * | [WATCHDOG] 631xESB/632xESB support for iTCO_wdtSergey Kononenko2007-07-261-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Add 631xESB/632xESB support to the iTCO_wdt driver. Signed-off-by: Sergey Kononenko <sergk@sergk.org.ua> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * | [WATCHDOG] omap_wdt.c - default error for IOCTL is -ENOTTYWim Van Sebroeck2007-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | The default value for an unknown ioctl call is -ENOTTY. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * | [WATCHDOG] Return value of nonseekable_openWim Van Sebroeck2007-07-244-11/+4
| | | | | | | | | | | | | | | | | | | | | Return the value of the nonseekable_open function and not 0. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * | [WATCHDOG] mv64x60_wdt: Rework the timeout register manipulationDale Farnsworth2007-07-241-36/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consolidate the timeout config register modification into a single function. Also, use the enabled flag in the config register to determine whether the timer is enabled instead of a separately maintained flag, MV64x60_WDOG_FLAG_ENABLED. Add spinlock protection around enabling/disabling the watchdog timer. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * | [WATCHDOG] mv64x60_wdt: disable watchdog timer when driver is probedDale Farnsworth2007-07-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Make sure that we disable the watchdog at start-up. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * | [WATCHDOG] mv64x60_wdt: Support the WDIOF_MAGICCLOSE featureDale Farnsworth2007-07-241-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Disallow disabling of the watchdog timer unless a particular character ('V') was recently written to the watchdog device. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * | [WATCHDOG] mv64x60_wdt: Add a module parameter to change nowayout settingDale Farnsworth2007-07-241-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, use the WATCHDOG_NOWAYOUT macro, rather than #ifdefs, and use __module_get to prevent module unloading if WATCHDOG_NOWAYOUT is set. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * | [WATCHDOG] mv64x60_wdt: Add WDIOC_SETOPTIONS ioctl supportDale Farnsworth2007-07-241-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the watchdog timer to be enabled or disabled via the WDIOC_SETOPTIONS ioctl. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * | [WATCHDOG] mv64x60_wdt: Support for WDIOC_SETTIMEOUT ioctlDale Farnsworth2007-07-241-7/+31
| | | | | | | | | | | | | | | | | | | | | | | | Add the ability to modify the watchdog timer timeout interval. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * | [WATCHDOG] mv64x60_wdt: Fix WDIOC_GETTIMEOUT return valueDale Farnsworth2007-07-241-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | WDIOC_GETTIMEOUT returns seconds, not jiffies. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * | [WATCHDOG] mv64x60_wdt: Check return value of nonseekable_openDale Farnsworth2007-07-241-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | Return the value of the nonseekable_open function and not 0. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * | [WATCHDOG] mv64x60_wdt: Add arch/powerpc platform supportDale Farnsworth2007-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add support for arch/powerpc, specifically for the prpmc2800 platform. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * | [WATCHDOG] mv64x60_wdt: Get register address from platform dataDale Farnsworth2007-07-241-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the address of the watchdog timer registers was retrieved by calling a global function, mv64x60_get_bridge_vbase(). That function doesn't exist in arch/powerpc. Instead, we now get the register address from a platform data resource and ioremap the registers within the driver. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * | [WATCHDOG] mv64x60_wdt: set up platform_device in platform codeDale Farnsworth2007-07-241-25/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver previously registered its platform device data in its own init function--that's bogus. Move that code to platform-specific code in arch/ppc. This is being done so that the platform code can decide at runtime whether to initialize this driver or not. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>