summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
AgeCommit message (Expand)Author
2016-01-22Merge tag 'mmc-v4.5-rc1' of git://git.linaro.org/people/ulf.hansson/mmcLinus Torvalds
2016-01-21mmc: pwrseq_simple: Make reset-gpios optional to match docMartin Fuzzey
2016-01-20mmc: sdio_cis: fix unknown tuple for CISTPL_SDIO_STDShawn Lin
2016-01-19mmc: debugfs: correct wrong voltage valueChuanxiao Dong
2016-01-18Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egt...Linus Torvalds
2016-01-14mmc: atmel: get rid of struct mci_dma_dataMans Rullgard
2016-01-14mmc: atmel-mci: restore dma on AVR32Mans Rullgard
2016-01-14mmc: tmio_mmc_dma: don't print invalid DMA cookieArnd Bergmann
2016-01-14mmc: core: Enable tuning according to the actual timingCarlo Caione
2016-01-14mmc: mmci: support 8bit mode on the NomadikLinus Walleij
2016-01-14mmc: mmci: fix an ages old detection errorLinus Walleij
2016-01-13mmc: sd: limit SD card power limit according to cards capabilitiesRussell King
2016-01-05mmc: dw_mmc: remove the unused quirksJaehoon Chung
2016-01-05mmc: sdhci-pci: use to_pci_dev()Geliang Tang
2016-01-05mmc: cb710: use to_platform_device()Geliang Tang
2016-01-05mmc: tegra: use correct accessor for misc ctrl registerLucas Stach
2016-01-05mmc: tegra: enable UHS-I modesLucas Stach
2015-12-28mmc: tegra: implement UHS tuningLucas Stach
2015-12-28mmc: tegra: disable SPI_MODE_CLKENLucas Stach
2015-12-28mmc: tegra: implement module external clock changeLucas Stach
2015-12-28mmc: sdhci: restore behavior when setting VDD via external regulatorJisheng Zhang
2015-12-28mmc: It is not an error for the card to be removed while suspendedAdrian Hunter
2015-12-28mmc: block: Allow more than 8 partitions per cardColin Cross
2015-12-28mmc: core: Optimize boot time by detecting cards simultaneouslyUlf Hansson
2015-12-22mmc: dw_mmc: use resource_size_t to store physical addressArnd Bergmann
2015-12-22mmc: core: fix __mmc_switch timeout caused by preemptChaotian Jing
2015-12-22mmc: usdhi6rol0: handle NULL data in timeoutRabin Vincent
2015-12-22mmc: of_mmc_spi: Add IRQF_ONESHOT to interrupt flagssaurabh
2015-12-22mmc: mediatek: change some dev_err to dev_dbgChaotian Jing
2015-12-22mmc: enable MMC/SD/SDIO device to suspend/resume asynchronouslyFu, Zhonghui
2015-12-22mmc: sdhci: Fix sdhci_runtime_pm_bus_on/off()Adrian Hunter
2015-12-22mmc: sdhci: 64-bit DMA actually has 4-byte alignmentAdrian Hunter
2015-12-22mmc: sdhci: Fix DMA descriptor with zero data lengthAdrian Hunter
2015-12-22mmc: sdio: Fix invalid vdd in voltage switch power cycleAdrian Hunter
2015-12-22mmc: sdhci: Do not BUG on invalid vddAdrian Hunter
2015-12-22mmc: sdhci-pci: Do not default to 33 Ohm driver strength for Intel SPTAdrian Hunter
2015-12-22mmc: mmc: Fix incorrect use of driver strength switching HS200 and HS400Wenkai Du
2015-12-22mmc: core: Introduce MMC_CAP2_NO_SDIO capCarlo Caione
2015-12-22mmc: mvsdio: delete platform data code pathLinus Walleij
2015-12-22mmc: mvsdio: delete platform data headerLinus Walleij
2015-12-22mmc: sdhci-of-esdhc: add/remove some quirks according to vendor versionyangbo lu
2015-12-22mmc: atmel-mci: atmci_convert_chksize depends on controller versionludovic.desroches@atmel.com
2015-12-22mmc: atmel-mci: move atmel-mci-regs.h content in atmel-mci.cludovic.desroches@atmel.com
2015-12-22mmc: fix mmc_{un,}register_pm_notifier prototypesArnd Bergmann
2015-12-22mmc: sdhci-esdhc-imx: correct the tuning-step settingHaibo Chen
2015-12-22mmc: sh_mmcif: rework dma channel handlingArnd Bergmann
2015-12-22mmc: sdhci: Fix strings broken across multiple linesMarek Vasut
2015-12-22mmc: pwrseq: constify mmc_pwrseq_ops structuresJulia Lawall
2015-12-22mmc: tegra: Add Tegra210 supportThierry Reding
2015-12-22mmc: tegra: Constify SoC dataThierry Reding
ribute 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. * * Neither Oleg Drokin nor iXcelerator.com admit liability nor provide * 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"); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);