aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-05-04 22:07:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-04 22:15:35 -0400
commitaf82455f7dbd9dc20244d80d033721b30d22c065 (patch)
tree3b9246456e82ae116b57834a2f0b4a307a016474 /include/linux
parent0be75179df5e20306528800fc7c6a504b12b97db (diff)
parent2a76f89fa58c769241cfc21f2614705591519ae3 (diff)
Merge tag 'char-misc-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH: "Here is the big set of new char/misc driver drivers and features for 4.12-rc1. There's lots of new drivers added this time around, new firmware drivers from Google, more auxdisplay drivers, extcon drivers, fpga drivers, and a bunch of other driver updates. Nothing major, except if you happen to have the hardware for these drivers, and then you will be happy :) All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (136 commits) firmware: google memconsole: Fix return value check in platform_memconsole_init() firmware: Google VPD: Fix return value check in vpd_platform_init() goldfish_pipe: fix build warning about using too much stack. goldfish_pipe: An implementation of more parallel pipe fpga fr br: update supported version numbers fpga: region: release FPGA region reference in error path fpga altera-hps2fpga: disable/unprepare clock on error in alt_fpga_bridge_probe() mei: drop the TODO from samples firmware: Google VPD sysfs driver firmware: Google VPD: import lib_vpd source files misc: lkdtm: Add volatile to intentional NULL pointer reference eeprom: idt_89hpesx: Add OF device ID table misc: ds1682: Add OF device ID table misc: tsl2550: Add OF device ID table w1: Remove unneeded use of assert() and remove w1_log.h w1: Use kernel common min() implementation uio_mf624: Align memory regions to page size and set correct offsets uio_mf624: Refactor memory info initialization uio: Allow handling of non page-aligned memory regions hangcheck-timer: Fix typo in comment ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cdev.h5
-rw-r--r--include/linux/fpga/altera-pr-ip-core.h29
-rw-r--r--include/linux/fpga/fpga-mgr.h4
-rw-r--r--include/linux/hyperv.h31
-rw-r--r--include/linux/uio_driver.h13
-rw-r--r--include/linux/vme.h12
6 files changed, 80 insertions, 14 deletions
diff --git a/include/linux/cdev.h b/include/linux/cdev.h
index f8763615a5f2..408bc09ce497 100644
--- a/include/linux/cdev.h
+++ b/include/linux/cdev.h
@@ -4,6 +4,7 @@
4#include <linux/kobject.h> 4#include <linux/kobject.h>
5#include <linux/kdev_t.h> 5#include <linux/kdev_t.h>
6#include <linux/list.h> 6#include <linux/list.h>
7#include <linux/device.h>
7 8
8struct file_operations; 9struct file_operations;
9struct inode; 10struct inode;
@@ -26,6 +27,10 @@ void cdev_put(struct cdev *p);
26 27
27int cdev_add(struct cdev *, dev_t, unsigned); 28int cdev_add(struct cdev *, dev_t, unsigned);
28 29
30void cdev_set_parent(struct cdev *p, struct kobject *kobj);
31int cdev_device_add(struct cdev *cdev, struct device *dev);
32void cdev_device_del(struct cdev *cdev, struct device *dev);
33
29void cdev_del(struct cdev *); 34void cdev_del(struct cdev *);
30 35
31void cd_forget(struct inode *); 36void cd_forget(struct inode *);
diff --git a/include/linux/fpga/altera-pr-ip-core.h b/include/linux/fpga/altera-pr-ip-core.h
new file mode 100644
index 000000000000..3810a9033f49
--- /dev/null
+++ b/include/linux/fpga/altera-pr-ip-core.h
@@ -0,0 +1,29 @@
1/*
2 * Driver for Altera Partial Reconfiguration IP Core
3 *
4 * Copyright (C) 2016 Intel Corporation
5 *
6 * Based on socfpga-a10.c Copyright (C) 2015-2016 Altera Corporation
7 * by Alan Tull <atull@opensource.altera.com>
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms and conditions of the GNU General Public License,
11 * version 2, as published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * more details.
17 *
18 * You should have received a copy of the GNU General Public License along with
19 * this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#ifndef _ALT_PR_IP_CORE_H
23#define _ALT_PR_IP_CORE_H
24#include <linux/io.h>
25
26int alt_pr_register(struct device *dev, void __iomem *reg_base);
27int alt_pr_unregister(struct device *dev);
28
29#endif /* _ALT_PR_IP_CORE_H */
diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h
index 57beb5d09bfc..b4ac24c4411d 100644
--- a/include/linux/fpga/fpga-mgr.h
+++ b/include/linux/fpga/fpga-mgr.h
@@ -70,17 +70,21 @@ enum fpga_mgr_states {
70 */ 70 */
71#define FPGA_MGR_PARTIAL_RECONFIG BIT(0) 71#define FPGA_MGR_PARTIAL_RECONFIG BIT(0)
72#define FPGA_MGR_EXTERNAL_CONFIG BIT(1) 72#define FPGA_MGR_EXTERNAL_CONFIG BIT(1)
73#define FPGA_MGR_ENCRYPTED_BITSTREAM BIT(2)
73 74
74/** 75/**
75 * struct fpga_image_info - information specific to a FPGA image 76 * struct fpga_image_info - information specific to a FPGA image
76 * @flags: boolean flags as defined above 77 * @flags: boolean flags as defined above
77 * @enable_timeout_us: maximum time to enable traffic through bridge (uSec) 78 * @enable_timeout_us: maximum time to enable traffic through bridge (uSec)
78 * @disable_timeout_us: maximum time to disable traffic through bridge (uSec) 79 * @disable_timeout_us: maximum time to disable traffic through bridge (uSec)
80 * @config_complete_timeout_us: maximum time for FPGA to switch to operating
81 * status in the write_complete op.
79 */ 82 */
80struct fpga_image_info { 83struct fpga_image_info {
81 u32 flags; 84 u32 flags;
82 u32 enable_timeout_us; 85 u32 enable_timeout_us;
83 u32 disable_timeout_us; 86 u32 disable_timeout_us;
87 u32 config_complete_timeout_us;
84}; 88};
85 89
86/** 90/**
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index 0c170a3f0d8b..e09fc8290c2f 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -491,6 +491,12 @@ struct vmbus_channel_rescind_offer {
491 u32 child_relid; 491 u32 child_relid;
492} __packed; 492} __packed;
493 493
494static inline u32
495hv_ringbuffer_pending_size(const struct hv_ring_buffer_info *rbi)
496{
497 return rbi->ring_buffer->pending_send_sz;
498}
499
494/* 500/*
495 * Request Offer -- no parameters, SynIC message contains the partition ID 501 * Request Offer -- no parameters, SynIC message contains the partition ID
496 * Set Snoop -- no parameters, SynIC message contains the partition ID 502 * Set Snoop -- no parameters, SynIC message contains the partition ID
@@ -524,10 +530,10 @@ struct vmbus_channel_open_channel {
524 u32 target_vp; 530 u32 target_vp;
525 531
526 /* 532 /*
527 * The upstream ring buffer begins at offset zero in the memory 533 * The upstream ring buffer begins at offset zero in the memory
528 * described by RingBufferGpadlHandle. The downstream ring buffer 534 * described by RingBufferGpadlHandle. The downstream ring buffer
529 * follows it at this offset (in pages). 535 * follows it at this offset (in pages).
530 */ 536 */
531 u32 downstream_ringbuffer_pageoffset; 537 u32 downstream_ringbuffer_pageoffset;
532 538
533 /* User-specific data to be passed along to the server endpoint. */ 539 /* User-specific data to be passed along to the server endpoint. */
@@ -1013,7 +1019,7 @@ extern int vmbus_open(struct vmbus_channel *channel,
1013 u32 recv_ringbuffersize, 1019 u32 recv_ringbuffersize,
1014 void *userdata, 1020 void *userdata,
1015 u32 userdatalen, 1021 u32 userdatalen,
1016 void(*onchannel_callback)(void *context), 1022 void (*onchannel_callback)(void *context),
1017 void *context); 1023 void *context);
1018 1024
1019extern void vmbus_close(struct vmbus_channel *channel); 1025extern void vmbus_close(struct vmbus_channel *channel);
@@ -1155,6 +1161,17 @@ static inline void *hv_get_drvdata(struct hv_device *dev)
1155 return dev_get_drvdata(&dev->device); 1161 return dev_get_drvdata(&dev->device);
1156} 1162}
1157 1163
1164struct hv_ring_buffer_debug_info {
1165 u32 current_interrupt_mask;
1166 u32 current_read_index;
1167 u32 current_write_index;
1168 u32 bytes_avail_toread;
1169 u32 bytes_avail_towrite;
1170};
1171
1172void hv_ringbuffer_get_debuginfo(const struct hv_ring_buffer_info *ring_info,
1173 struct hv_ring_buffer_debug_info *debug_info);
1174
1158/* Vmbus interface */ 1175/* Vmbus interface */
1159#define vmbus_driver_register(driver) \ 1176#define vmbus_driver_register(driver) \
1160 __vmbus_driver_register(driver, THIS_MODULE, KBUILD_MODNAME) 1177 __vmbus_driver_register(driver, THIS_MODULE, KBUILD_MODNAME)
@@ -1428,7 +1445,7 @@ struct hyperv_service_callback {
1428 char *log_msg; 1445 char *log_msg;
1429 uuid_le data; 1446 uuid_le data;
1430 struct vmbus_channel *channel; 1447 struct vmbus_channel *channel;
1431 void (*callback) (void *context); 1448 void (*callback)(void *context);
1432}; 1449};
1433 1450
1434#define MAX_SRV_VER 0x7ffffff 1451#define MAX_SRV_VER 0x7ffffff
@@ -1504,8 +1521,6 @@ static inline void hv_signal_on_read(struct vmbus_channel *channel)
1504 cached_write_sz = hv_get_cached_bytes_to_write(rbi); 1521 cached_write_sz = hv_get_cached_bytes_to_write(rbi);
1505 if (cached_write_sz < pending_sz) 1522 if (cached_write_sz < pending_sz)
1506 vmbus_setevent(channel); 1523 vmbus_setevent(channel);
1507
1508 return;
1509} 1524}
1510 1525
1511/* 1526/*
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h
index 32c0e83d6239..3c85c81b0027 100644
--- a/include/linux/uio_driver.h
+++ b/include/linux/uio_driver.h
@@ -23,11 +23,13 @@ struct uio_map;
23/** 23/**
24 * struct uio_mem - description of a UIO memory region 24 * struct uio_mem - description of a UIO memory region
25 * @name: name of the memory region for identification 25 * @name: name of the memory region for identification
26 * @addr: address of the device's memory (phys_addr is used since 26 * @addr: address of the device's memory rounded to page
27 * addr can be logical, virtual, or physical & phys_addr_t 27 * size (phys_addr is used since addr can be
28 * should always be large enough to handle any of the 28 * logical, virtual, or physical & phys_addr_t
29 * address types) 29 * should always be large enough to handle any of
30 * @size: size of IO 30 * the address types)
31 * @offs: offset of device memory within the page
32 * @size: size of IO (multiple of page size)
31 * @memtype: type of memory addr points to 33 * @memtype: type of memory addr points to
32 * @internal_addr: ioremap-ped version of addr, for driver internal use 34 * @internal_addr: ioremap-ped version of addr, for driver internal use
33 * @map: for use by the UIO core only. 35 * @map: for use by the UIO core only.
@@ -35,6 +37,7 @@ struct uio_map;
35struct uio_mem { 37struct uio_mem {
36 const char *name; 38 const char *name;
37 phys_addr_t addr; 39 phys_addr_t addr;
40 unsigned long offs;
38 resource_size_t size; 41 resource_size_t size;
39 int memtype; 42 int memtype;
40 void __iomem *internal_addr; 43 void __iomem *internal_addr;
diff --git a/include/linux/vme.h b/include/linux/vme.h
index ec5e8bf6118e..25874da3f2e1 100644
--- a/include/linux/vme.h
+++ b/include/linux/vme.h
@@ -92,7 +92,7 @@ extern struct bus_type vme_bus_type;
92#define VME_SLOT_ALL -2 92#define VME_SLOT_ALL -2
93 93
94/** 94/**
95 * Structure representing a VME device 95 * struct vme_dev - Structure representing a VME device
96 * @num: The device number 96 * @num: The device number
97 * @bridge: Pointer to the bridge device this device is on 97 * @bridge: Pointer to the bridge device this device is on
98 * @dev: Internal device structure 98 * @dev: Internal device structure
@@ -107,6 +107,16 @@ struct vme_dev {
107 struct list_head bridge_list; 107 struct list_head bridge_list;
108}; 108};
109 109
110/**
111 * struct vme_driver - Structure representing a VME driver
112 * @name: Driver name, should be unique among VME drivers and usually the same
113 * as the module name.
114 * @match: Callback used to determine whether probe should be run.
115 * @probe: Callback for device binding, called when new device is detected.
116 * @remove: Callback, called on device removal.
117 * @driver: Underlying generic device driver structure.
118 * @devices: List of VME devices (struct vme_dev) associated with this driver.
119 */
110struct vme_driver { 120struct vme_driver {
111 const char *name; 121 const char *name;
112 int (*match)(struct vme_dev *); 122 int (*match)(struct vme_dev *);