summaryrefslogtreecommitdiffstats
path: root/arch/m68k
AgeCommit message (Expand)Author
2012-07-24Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg...Linus Torvalds
2012-07-24Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jik...Linus Torvalds
2012-07-20module.c: spelling s/postition/position/gGeert Uytterhoeven
2012-07-17m68k: allow PCI bus to be enabled for ColdFire m54xx CPUsGreg Ungerer
2012-07-17m68k: add PCI bus code support for the ColdFire M54xx SoC familyGreg Ungerer
2012-07-17m68k: add IO access definitions to support PCI on ColdFire platformsGreg Ungerer
2012-07-17m68k: add PCI bus support definitions for the ColdFire M54xx SoC familyGreg Ungerer
2012-07-17m68k: common PCI support definitions and codeGreg Ungerer
2012-07-17m68k: add support for DMA_BIDIRECTIONAL in dma support functionsGreg Ungerer
2012-07-17m68k: fix ColdFire clear cache operationGreg Ungerer
2012-07-16m68k: use simpler dma_alloc_coherent() for ColdFire CPUsGreg Ungerer
2012-07-16m68knommu: platform support for 8390 based ethernet used on some boardsGreg Ungerer
2012-07-16m68knommu: Add clk definitions for m532x.Steven King
2012-07-16m68knommu: Add clk definitions for m520x.Steven King
2012-07-16m68knommu: Add rtc device for m5441x.Steven King
2012-07-16m68knommu: add definitions for the third interrupt controller on devices that...Steven King
2012-07-16m68knommu: Add support for the Coldfire m5441x.Steven King
2012-07-16m68knommu: use MCF_IRQ_PIT1 instead of MCFINT_VECBASE + MCFINT_PIT1Steven King
2012-07-16m68knommu: Add support for the Coldfire 5251/5253Steven King
2012-07-16m68knommu: refactor Coldfire GPIO not to require GPIOLIB, eliminate mcf_gpio_...Steven King
2012-07-16m68k: merge the MMU and non-MMU versions of the entry.S codeGreg Ungerer
2012-07-16m68k: use jbsr to call functions instead of bsrlGreg Ungerer
2012-07-16m68k: use some direct calls to ret_from_exception in entry codeGreg Ungerer
2012-07-12net: add support for NS8390 based eth controllers on some ColdFire CPU boardsGreg Ungerer
2012-07-12m68knommu: move the badly named mcfne.h to a better mcf8390.hGreg Ungerer
2012-06-25m68knommu: define a local devm_clk_get() functionGreg Ungerer
2012-06-13Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gee...Linus Torvalds
2012-06-12m68k: make syscall_trace_enter/leave exist for non-MMU classic m68k typesGreg Ungerer
2012-06-12m68knommu: fix 68360 local setting of timer interrupt handlerGreg Ungerer
2012-06-12m68knommu: fix 68328 local setting of timer interrupt handlerGreg Ungerer
2012-06-12m68k: fix inclusion of arch_gettimeoffset for non-MMU 68k classic CPU typesGreg Ungerer
2012-06-12m68knommu: m528x qspi definition fixSteven King
2012-06-06m68k: Use generic strncpy_from_user(), strlen_user(), and strnlen_user()Geert Uytterhoeven
2012-06-01Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vir...Linus Torvalds
2012-06-01Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vir...Linus Torvalds
2012-06-01new helper: signal_delivered()Al Viro
2012-06-01most of set_current_blocked() callers want SIGKILL/SIGSTOP removed from setAl Viro
2012-06-01pull clearing RESTORE_SIGMASK into block_sigmask()Al Viro
2012-06-01new helper: sigmask_to_save()Al Viro
2012-06-01new helper: restore_saved_sigmask()Al Viro
2012-05-31Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vir...Linus Torvalds
2012-05-30bury __kernel_nlink_t, make internal nlink_t consistentAl Viro
2012-05-24Merge branch 'next' of git://git.kernel.org/pub/scm/virt/kvm/kvmLinus Torvalds
2012-05-24Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds
2012-05-24Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/ke...Linus Torvalds
2012-05-23move key_repace_session_keyring() into tracehook_notify_resume()Al Viro
2012-05-23Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vir...Linus Torvalds
2012-05-23Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...Linus Torvalds
2012-05-22Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jik...Linus Torvalds
2012-05-21m68k: add TIF_NOTIFY_RESUME and handle it.Al Viro
an class="cm"> * warranty for any of this software. This material is provided * "AS-IS" and at no charge. * * (c) Copyright 2000 Oleg Drokin <green@crimea.edu> * * 27/11/2000 Initial release */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h> #include <linux/kernel.h> #include <linux/fs.h> #include <linux/miscdevice.h> #include <linux/watchdog.h> #include <linux/init.h> #include <linux/io.h> #include <linux/bitops.h> #include <linux/uaccess.h> #include <linux/timex.h> #ifdef CONFIG_ARCH_PXA #include <mach/regs-ost.h> #endif #include <mach/reset.h> #include <mach/hardware.h> static unsigned long oscr_freq; static unsigned long sa1100wdt_users; static unsigned int pre_margin; static int boot_status; /* * Allow only one person to hold it open */ static int sa1100dog_open(struct inode *inode, struct file *file) { if (test_and_set_bit(1, &sa1100wdt_users)) return -EBUSY; /* Activate SA1100 Watchdog timer */ writel_relaxed(readl_relaxed(OSCR) + pre_margin, OSMR3); writel_relaxed(OSSR_M3, OSSR); writel_relaxed(OWER_WME, OWER); writel_relaxed(readl_relaxed(OIER) | OIER_E3, OIER); return nonseekable_open(inode, file); } /* * The watchdog cannot be disabled. * * Previous comments suggested that turning off the interrupt by * clearing OIER[E3] would prevent the watchdog timing out but this * does not appear to be true (at least on the PXA255). */ static int sa1100dog_release(struct inode *inode, struct file *file) { pr_crit("Device closed - timer will not stop\n"); clear_bit(1, &sa1100wdt_users); return 0; } static ssize_t sa1100dog_write(struct file *file, const char __user *data, size_t len, loff_t *ppos) { if (len) /* Refresh OSMR3 timer. */ writel_relaxed(readl_relaxed(OSCR) + pre_margin, OSMR3); return len; } static const struct watchdog_info ident = { .options = WDIOF_CARDRESET | WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, .identity = "SA1100/PXA255 Watchdog", .firmware_version = 1, }; static long sa1100dog_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { int ret = -ENOTTY; int time; void __user *argp = (void __user *)arg; int __user *p = argp; switch (cmd) { case WDIOC_GETSUPPORT: ret = copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; break; case WDIOC_GETSTATUS: ret = put_user(0, p); break; case WDIOC_GETBOOTSTATUS: ret = put_user(boot_status, p); break; case WDIOC_KEEPALIVE: writel_relaxed(readl_relaxed(OSCR) + pre_margin, OSMR3); ret = 0; break; case WDIOC_SETTIMEOUT: ret = get_user(time, p); if (ret) break; if (time <= 0 || (oscr_freq * (long long)time >= 0xffffffff)) { ret = -EINVAL; break; } pre_margin = oscr_freq * time; writel_relaxed(readl_relaxed(OSCR) + pre_margin, OSMR3); /*fall through*/ case WDIOC_GETTIMEOUT: ret = put_user(pre_margin / oscr_freq, p); break; } return ret; } static const struct file_operations sa1100dog_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = sa1100dog_write, .unlocked_ioctl = sa1100dog_ioctl, .open = sa1100dog_open, .release = sa1100dog_release, }; static struct miscdevice sa1100dog_miscdev = { .minor = WATCHDOG_MINOR, .name = "watchdog", .fops = &sa1100dog_fops, }; static int margin __initdata = 60; /* (secs) Default is 1 minute */ static int __init sa1100dog_init(void) { int ret; oscr_freq = get_clock_tick_rate(); /* * Read the reset status, and save it for later. If * we suspend, RCSR will be cleared, and the watchdog * reset reason will be lost. */ boot_status = (reset_status & RESET_STATUS_WATCHDOG) ? WDIOF_CARDRESET : 0; pre_margin = oscr_freq * margin; ret = misc_register(&sa1100dog_miscdev); if (ret == 0) pr_info("SA1100/PXA2xx Watchdog Timer: timer margin %d sec\n", margin); return ret; } static void __exit sa1100dog_exit(void) { misc_deregister(&sa1100dog_miscdev); } module_init(sa1100dog_init); module_exit(sa1100dog_exit); MODULE_AUTHOR("Oleg Drokin <green@crimea.edu>"); MODULE_DESCRIPTION("SA1100/PXA2xx Watchdog"); module_param(margin, int, 0); MODULE_PARM_DESC(margin, "Watchdog margin in seconds (default 60s)"); MODULE_LICENSE("GPL");