aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 19:13:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 19:13:21 -0400
commit675c354a95d5375153b8bb80a0448cab916c7991 (patch)
tree88cbc5a5a31dd1c1016271006a8d56cfe0abf7bd /arch/avr32
parentc70929147a10fa4538886cb23b934b509c4c0e49 (diff)
parent1b3fa22e0234d613df967445cd34807e10fa54fa (diff)
Merge tag 'char-misc-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver patches from Greg KH: "Here's the big char/misc driver updates for 3.15-rc1. Lots of various things here, including the new mcb driver subsystem. All of these have been in linux-next for a while" * tag 'char-misc-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (118 commits) extcon: Move OF helper function to extcon core and change function name extcon: of: Remove unnecessary function call by using the name of device_node extcon: gpio: Use SIMPLE_DEV_PM_OPS macro extcon: palmas: Use SIMPLE_DEV_PM_OPS macro mei: don't use deprecated DEFINE_PCI_DEVICE_TABLE macro mei: amthif: fix checkpatch error mei: client.h fix checkpatch errors mei: use cl_dbg where appropriate mei: fix Unnecessary space after function pointer name mei: report consistently copy_from/to_user failures mei: drop pr_fmt macros mei: make me hw headers private to me hw. mei: fix memory leak of pending write cb objects mei: me: do not reset when less than expected data is received drivers: mcb: Fix build error discovered by 0-day bot cs5535-mfgpt: Simplify dependencies spmi: pm: drop bus-level PM suspend/resume routines spmi: pmic_arb: make selectable on ARCH_QCOM Drivers: hv: vmbus: Increase the limit on the number of pfns we can handle pch_phub: Report error writing MAC back to user ...
Diffstat (limited to 'arch/avr32')
-rw-r--r--arch/avr32/boards/mimc200/Makefile2
-rw-r--r--arch/avr32/boards/mimc200/fram.c82
2 files changed, 1 insertions, 83 deletions
diff --git a/arch/avr32/boards/mimc200/Makefile b/arch/avr32/boards/mimc200/Makefile
index 79c076e168a8..c740aa116755 100644
--- a/arch/avr32/boards/mimc200/Makefile
+++ b/arch/avr32/boards/mimc200/Makefile
@@ -1 +1 @@
obj-y += setup.o flash.o fram.o obj-y += setup.o flash.o
diff --git a/arch/avr32/boards/mimc200/fram.c b/arch/avr32/boards/mimc200/fram.c
deleted file mode 100644
index c1466a872b9c..000000000000
--- a/arch/avr32/boards/mimc200/fram.c
+++ /dev/null
@@ -1,82 +0,0 @@
1/*
2 * FRAM driver for MIMC200 board
3 *
4 * Copyright 2008 Mark Jackson <mpfj@mimc.co.uk>
5 *
6 * This module adds *very* simply support for the system's FRAM device.
7 * At the moment, this is hard-coded to the MIMC200 platform, and only
8 * supports mmap().
9 */
10
11#define FRAM_VERSION "1.0"
12
13#include <linux/miscdevice.h>
14#include <linux/module.h>
15#include <linux/proc_fs.h>
16#include <linux/mm.h>
17#include <linux/io.h>
18
19#define FRAM_BASE 0xac000000
20#define FRAM_SIZE 0x20000
21
22/*
23 * The are the file operation function for user access to /dev/fram
24 */
25
26static int fram_mmap(struct file *filp, struct vm_area_struct *vma)
27{
28 int ret;
29
30 ret = remap_pfn_range(vma,
31 vma->vm_start,
32 virt_to_phys((void *)((unsigned long)FRAM_BASE)) >> PAGE_SHIFT,
33 vma->vm_end-vma->vm_start,
34 PAGE_SHARED);
35
36 if (ret != 0)
37 return -EAGAIN;
38
39 return 0;
40}
41
42static const struct file_operations fram_fops = {
43 .owner = THIS_MODULE,
44 .mmap = fram_mmap,
45 .llseek = noop_llseek,
46};
47
48#define FRAM_MINOR 0
49
50static struct miscdevice fram_dev = {
51 FRAM_MINOR,
52 "fram",
53 &fram_fops
54};
55
56static int __init
57fram_init(void)
58{
59 int ret;
60
61 ret = misc_register(&fram_dev);
62 if (ret) {
63 printk(KERN_ERR "fram: can't misc_register on minor=%d\n",
64 FRAM_MINOR);
65 return ret;
66 }
67 printk(KERN_INFO "FRAM memory driver v" FRAM_VERSION "\n");
68 return 0;
69}
70
71static void __exit
72fram_cleanup_module(void)
73{
74 misc_deregister(&fram_dev);
75}
76
77module_init(fram_init);
78module_exit(fram_cleanup_module);
79
80MODULE_LICENSE("GPL");
81
82MODULE_ALIAS_MISCDEV(FRAM_MINOR);