diff options
Diffstat (limited to 'include/linux')
42 files changed, 895 insertions, 588 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index c12731582920..f9f5e9eeb9dd 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
| @@ -335,8 +335,8 @@ const char *__clk_get_name(struct clk *clk); | |||
| 335 | struct clk_hw *__clk_get_hw(struct clk *clk); | 335 | struct clk_hw *__clk_get_hw(struct clk *clk); |
| 336 | u8 __clk_get_num_parents(struct clk *clk); | 336 | u8 __clk_get_num_parents(struct clk *clk); |
| 337 | struct clk *__clk_get_parent(struct clk *clk); | 337 | struct clk *__clk_get_parent(struct clk *clk); |
| 338 | inline int __clk_get_enable_count(struct clk *clk); | 338 | int __clk_get_enable_count(struct clk *clk); |
| 339 | inline int __clk_get_prepare_count(struct clk *clk); | 339 | int __clk_get_prepare_count(struct clk *clk); |
| 340 | unsigned long __clk_get_rate(struct clk *clk); | 340 | unsigned long __clk_get_rate(struct clk *clk); |
| 341 | unsigned long __clk_get_flags(struct clk *clk); | 341 | unsigned long __clk_get_flags(struct clk *clk); |
| 342 | int __clk_is_enabled(struct clk *clk); | 342 | int __clk_is_enabled(struct clk *clk); |
diff --git a/include/linux/devpts_fs.h b/include/linux/devpts_fs.h index 5ce0e5fd712e..251a2090a554 100644 --- a/include/linux/devpts_fs.h +++ b/include/linux/devpts_fs.h | |||
| @@ -20,28 +20,28 @@ | |||
| 20 | int devpts_new_index(struct inode *ptmx_inode); | 20 | int devpts_new_index(struct inode *ptmx_inode); |
| 21 | void devpts_kill_index(struct inode *ptmx_inode, int idx); | 21 | void devpts_kill_index(struct inode *ptmx_inode, int idx); |
| 22 | /* mknod in devpts */ | 22 | /* mknod in devpts */ |
| 23 | int devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty); | 23 | struct inode *devpts_pty_new(struct inode *ptmx_inode, dev_t device, int index, |
| 24 | /* get tty structure */ | 24 | void *priv); |
| 25 | struct tty_struct *devpts_get_tty(struct inode *pts_inode, int number); | 25 | /* get private structure */ |
| 26 | void *devpts_get_priv(struct inode *pts_inode); | ||
| 26 | /* unlink */ | 27 | /* unlink */ |
| 27 | void devpts_pty_kill(struct tty_struct *tty); | 28 | void devpts_pty_kill(struct inode *inode); |
| 28 | 29 | ||
| 29 | #else | 30 | #else |
| 30 | 31 | ||
| 31 | /* Dummy stubs in the no-pty case */ | 32 | /* Dummy stubs in the no-pty case */ |
| 32 | static inline int devpts_new_index(struct inode *ptmx_inode) { return -EINVAL; } | 33 | static inline int devpts_new_index(struct inode *ptmx_inode) { return -EINVAL; } |
| 33 | static inline void devpts_kill_index(struct inode *ptmx_inode, int idx) { } | 34 | static inline void devpts_kill_index(struct inode *ptmx_inode, int idx) { } |
| 34 | static inline int devpts_pty_new(struct inode *ptmx_inode, | 35 | static inline struct inode *devpts_pty_new(struct inode *ptmx_inode, |
| 35 | struct tty_struct *tty) | 36 | dev_t device, int index, void *priv) |
| 36 | { | 37 | { |
| 37 | return -EINVAL; | 38 | return ERR_PTR(-EINVAL); |
| 38 | } | 39 | } |
| 39 | static inline struct tty_struct *devpts_get_tty(struct inode *pts_inode, | 40 | static inline void *devpts_get_priv(struct inode *pts_inode) |
| 40 | int number) | ||
| 41 | { | 41 | { |
| 42 | return NULL; | 42 | return NULL; |
| 43 | } | 43 | } |
| 44 | static inline void devpts_pty_kill(struct tty_struct *tty) { } | 44 | static inline void devpts_pty_kill(struct inode *inode) { } |
| 45 | 45 | ||
| 46 | #endif | 46 | #endif |
| 47 | 47 | ||
diff --git a/include/linux/dma/ipu-dma.h b/include/linux/dma/ipu-dma.h new file mode 100644 index 000000000000..18031115c668 --- /dev/null +++ b/include/linux/dma/ipu-dma.h | |||
| @@ -0,0 +1,177 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2008 | ||
| 3 | * Guennadi Liakhovetski, DENX Software Engineering, <lg@denx.de> | ||
| 4 | * | ||
| 5 | * Copyright (C) 2005-2007 Freescale Semiconductor, Inc. | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __LINUX_DMA_IPU_DMA_H | ||
| 13 | #define __LINUX_DMA_IPU_DMA_H | ||
| 14 | |||
| 15 | #include <linux/types.h> | ||
| 16 | #include <linux/dmaengine.h> | ||
| 17 | |||
| 18 | /* IPU DMA Controller channel definitions. */ | ||
| 19 | enum ipu_channel { | ||
| 20 | IDMAC_IC_0 = 0, /* IC (encoding task) to memory */ | ||
| 21 | IDMAC_IC_1 = 1, /* IC (viewfinder task) to memory */ | ||
| 22 | IDMAC_ADC_0 = 1, | ||
| 23 | IDMAC_IC_2 = 2, | ||
| 24 | IDMAC_ADC_1 = 2, | ||
| 25 | IDMAC_IC_3 = 3, | ||
| 26 | IDMAC_IC_4 = 4, | ||
| 27 | IDMAC_IC_5 = 5, | ||
| 28 | IDMAC_IC_6 = 6, | ||
| 29 | IDMAC_IC_7 = 7, /* IC (sensor data) to memory */ | ||
| 30 | IDMAC_IC_8 = 8, | ||
| 31 | IDMAC_IC_9 = 9, | ||
| 32 | IDMAC_IC_10 = 10, | ||
| 33 | IDMAC_IC_11 = 11, | ||
| 34 | IDMAC_IC_12 = 12, | ||
| 35 | IDMAC_IC_13 = 13, | ||
| 36 | IDMAC_SDC_0 = 14, /* Background synchronous display data */ | ||
| 37 | IDMAC_SDC_1 = 15, /* Foreground data (overlay) */ | ||
| 38 | IDMAC_SDC_2 = 16, | ||
| 39 | IDMAC_SDC_3 = 17, | ||
| 40 | IDMAC_ADC_2 = 18, | ||
| 41 | IDMAC_ADC_3 = 19, | ||
| 42 | IDMAC_ADC_4 = 20, | ||
| 43 | IDMAC_ADC_5 = 21, | ||
| 44 | IDMAC_ADC_6 = 22, | ||
| 45 | IDMAC_ADC_7 = 23, | ||
| 46 | IDMAC_PF_0 = 24, | ||
| 47 | IDMAC_PF_1 = 25, | ||
| 48 | IDMAC_PF_2 = 26, | ||
| 49 | IDMAC_PF_3 = 27, | ||
| 50 | IDMAC_PF_4 = 28, | ||
| 51 | IDMAC_PF_5 = 29, | ||
| 52 | IDMAC_PF_6 = 30, | ||
| 53 | IDMAC_PF_7 = 31, | ||
| 54 | }; | ||
| 55 | |||
| 56 | /* Order significant! */ | ||
| 57 | enum ipu_channel_status { | ||
| 58 | IPU_CHANNEL_FREE, | ||
| 59 | IPU_CHANNEL_INITIALIZED, | ||
| 60 | IPU_CHANNEL_READY, | ||
| 61 | IPU_CHANNEL_ENABLED, | ||
| 62 | }; | ||
| 63 | |||
| 64 | #define IPU_CHANNELS_NUM 32 | ||
| 65 | |||
| 66 | enum pixel_fmt { | ||
| 67 | /* 1 byte */ | ||
| 68 | IPU_PIX_FMT_GENERIC, | ||
| 69 | IPU_PIX_FMT_RGB332, | ||
| 70 | IPU_PIX_FMT_YUV420P, | ||
| 71 | IPU_PIX_FMT_YUV422P, | ||
| 72 | IPU_PIX_FMT_YUV420P2, | ||
| 73 | IPU_PIX_FMT_YVU422P, | ||
| 74 | /* 2 bytes */ | ||
| 75 | IPU_PIX_FMT_RGB565, | ||
| 76 | IPU_PIX_FMT_RGB666, | ||
| 77 | IPU_PIX_FMT_BGR666, | ||
| 78 | IPU_PIX_FMT_YUYV, | ||
| 79 | IPU_PIX_FMT_UYVY, | ||
| 80 | /* 3 bytes */ | ||
| 81 | IPU_PIX_FMT_RGB24, | ||
| 82 | IPU_PIX_FMT_BGR24, | ||
| 83 | /* 4 bytes */ | ||
| 84 | IPU_PIX_FMT_GENERIC_32, | ||
| 85 | IPU_PIX_FMT_RGB32, | ||
| 86 | IPU_PIX_FMT_BGR32, | ||
| 87 | IPU_PIX_FMT_ABGR32, | ||
| 88 | IPU_PIX_FMT_BGRA32, | ||
| 89 | IPU_PIX_FMT_RGBA32, | ||
| 90 | }; | ||
| 91 | |||
| 92 | enum ipu_color_space { | ||
| 93 | IPU_COLORSPACE_RGB, | ||
| 94 | IPU_COLORSPACE_YCBCR, | ||
| 95 | IPU_COLORSPACE_YUV | ||
| 96 | }; | ||
| 97 | |||
| 98 | /* | ||
| 99 | * Enumeration of IPU rotation modes | ||
| 100 | */ | ||
| 101 | enum ipu_rotate_mode { | ||
| 102 | /* Note the enum values correspond to BAM value */ | ||
| 103 | IPU_ROTATE_NONE = 0, | ||
| 104 | IPU_ROTATE_VERT_FLIP = 1, | ||
| 105 | IPU_ROTATE_HORIZ_FLIP = 2, | ||
| 106 | IPU_ROTATE_180 = 3, | ||
| 107 | IPU_ROTATE_90_RIGHT = 4, | ||
| 108 | IPU_ROTATE_90_RIGHT_VFLIP = 5, | ||
| 109 | IPU_ROTATE_90_RIGHT_HFLIP = 6, | ||
| 110 | IPU_ROTATE_90_LEFT = 7, | ||
| 111 | }; | ||
| 112 | |||
| 113 | /* | ||
| 114 | * Enumeration of DI ports for ADC. | ||
| 115 | */ | ||
| 116 | enum display_port { | ||
| 117 | DISP0, | ||
| 118 | DISP1, | ||
| 119 | DISP2, | ||
| 120 | DISP3 | ||
| 121 | }; | ||
| 122 | |||
| 123 | struct idmac_video_param { | ||
| 124 | unsigned short in_width; | ||
| 125 | unsigned short in_height; | ||
| 126 | uint32_t in_pixel_fmt; | ||
| 127 | unsigned short out_width; | ||
| 128 | unsigned short out_height; | ||
| 129 | uint32_t out_pixel_fmt; | ||
| 130 | unsigned short out_stride; | ||
| 131 | bool graphics_combine_en; | ||
| 132 | bool global_alpha_en; | ||
| 133 | bool key_color_en; | ||
| 134 | enum display_port disp; | ||
| 135 | unsigned short out_left; | ||
| 136 | unsigned short out_top; | ||
| 137 | }; | ||
| 138 | |||
| 139 | /* | ||
| 140 | * Union of initialization parameters for a logical channel. So far only video | ||
| 141 | * parameters are used. | ||
| 142 | */ | ||
| 143 | union ipu_channel_param { | ||
| 144 | struct idmac_video_param video; | ||
| 145 | }; | ||
| 146 | |||
| 147 | struct idmac_tx_desc { | ||
| 148 | struct dma_async_tx_descriptor txd; | ||
| 149 | struct scatterlist *sg; /* scatterlist for this */ | ||
| 150 | unsigned int sg_len; /* tx-descriptor. */ | ||
| 151 | struct list_head list; | ||
| 152 | }; | ||
| 153 | |||
| 154 | struct idmac_channel { | ||
| 155 | struct dma_chan dma_chan; | ||
| 156 | dma_cookie_t completed; /* last completed cookie */ | ||
| 157 | union ipu_channel_param params; | ||
| 158 | enum ipu_channel link; /* input channel, linked to the output */ | ||
| 159 | enum ipu_channel_status status; | ||
| 160 | void *client; /* Only one client per channel */ | ||
| 161 | unsigned int n_tx_desc; | ||
| 162 | struct idmac_tx_desc *desc; /* allocated tx-descriptors */ | ||
| 163 | struct scatterlist *sg[2]; /* scatterlist elements in buffer-0 and -1 */ | ||
| 164 | struct list_head free_list; /* free tx-descriptors */ | ||
| 165 | struct list_head queue; /* queued tx-descriptors */ | ||
| 166 | spinlock_t lock; /* protects sg[0,1], queue */ | ||
| 167 | struct mutex chan_mutex; /* protects status, cookie, free_list */ | ||
| 168 | bool sec_chan_en; | ||
| 169 | int active_buffer; | ||
| 170 | unsigned int eof_irq; | ||
| 171 | char eof_name[16]; /* EOF IRQ name for request_irq() */ | ||
| 172 | }; | ||
| 173 | |||
| 174 | #define to_tx_desc(tx) container_of(tx, struct idmac_tx_desc, txd) | ||
| 175 | #define to_idmac_chan(c) container_of(c, struct idmac_channel, dma_chan) | ||
| 176 | |||
| 177 | #endif /* __LINUX_DMA_IPU_DMA_H */ | ||
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index c18257b0fa72..6dd4787a798a 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
| @@ -61,7 +61,7 @@ int __dynamic_netdev_dbg(struct _ddebug *descriptor, | |||
| 61 | const char *fmt, ...); | 61 | const char *fmt, ...); |
| 62 | 62 | ||
| 63 | #define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \ | 63 | #define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \ |
| 64 | static struct _ddebug __used __aligned(8) \ | 64 | static struct _ddebug __aligned(8) \ |
| 65 | __attribute__((section("__verbose"))) name = { \ | 65 | __attribute__((section("__verbose"))) name = { \ |
| 66 | .modname = KBUILD_MODNAME, \ | 66 | .modname = KBUILD_MODNAME, \ |
| 67 | .function = __func__, \ | 67 | .function = __func__, \ |
diff --git a/include/linux/extcon.h b/include/linux/extcon.h index 7443a560c9d0..2c26c14cd710 100644 --- a/include/linux/extcon.h +++ b/include/linux/extcon.h | |||
| @@ -68,7 +68,7 @@ enum extcon_cable_name { | |||
| 68 | EXTCON_VIDEO_OUT, | 68 | EXTCON_VIDEO_OUT, |
| 69 | EXTCON_MECHANICAL, | 69 | EXTCON_MECHANICAL, |
| 70 | }; | 70 | }; |
| 71 | extern const char *extcon_cable_name[]; | 71 | extern const char extcon_cable_name[][CABLE_NAME_MAX + 1]; |
| 72 | 72 | ||
| 73 | struct extcon_cable; | 73 | struct extcon_cable; |
| 74 | 74 | ||
diff --git a/include/linux/hashtable.h b/include/linux/hashtable.h new file mode 100644 index 000000000000..227c62424f3c --- /dev/null +++ b/include/linux/hashtable.h | |||
| @@ -0,0 +1,192 @@ | |||
| 1 | /* | ||
| 2 | * Statically sized hash table implementation | ||
| 3 | * (C) 2012 Sasha Levin <levinsasha928@gmail.com> | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _LINUX_HASHTABLE_H | ||
| 7 | #define _LINUX_HASHTABLE_H | ||
| 8 | |||
| 9 | #include <linux/list.h> | ||
| 10 | #include <linux/types.h> | ||
| 11 | #include <linux/kernel.h> | ||
| 12 | #include <linux/hash.h> | ||
| 13 | #include <linux/rculist.h> | ||
| 14 | |||
| 15 | #define DEFINE_HASHTABLE(name, bits) \ | ||
| 16 | struct hlist_head name[1 << (bits)] = \ | ||
| 17 | { [0 ... ((1 << (bits)) - 1)] = HLIST_HEAD_INIT } | ||
| 18 | |||
| 19 | #define DECLARE_HASHTABLE(name, bits) \ | ||
| 20 | struct hlist_head name[1 << (bits)] | ||
| 21 | |||
| 22 | #define HASH_SIZE(name) (ARRAY_SIZE(name)) | ||
| 23 | #define HASH_BITS(name) ilog2(HASH_SIZE(name)) | ||
| 24 | |||
| 25 | /* Use hash_32 when possible to allow for fast 32bit hashing in 64bit kernels. */ | ||
| 26 | #define hash_min(val, bits) \ | ||
| 27 | (sizeof(val) <= 4 ? hash_32(val, bits) : hash_long(val, bits)) | ||
| 28 | |||
| 29 | static inline void __hash_init(struct hlist_head *ht, unsigned int sz) | ||
| 30 | { | ||
| 31 | unsigned int i; | ||
| 32 | |||
| 33 | for (i = 0; i < sz; i++) | ||
| 34 | INIT_HLIST_HEAD(&ht[i]); | ||
| 35 | } | ||
| 36 | |||
| 37 | /** | ||
| 38 | * hash_init - initialize a hash table | ||
| 39 | * @hashtable: hashtable to be initialized | ||
| 40 | * | ||
| 41 | * Calculates the size of the hashtable from the given parameter, otherwise | ||
| 42 | * same as hash_init_size. | ||
| 43 | * | ||
| 44 | * This has to be a macro since HASH_BITS() will not work on pointers since | ||
| 45 | * it calculates the size during preprocessing. | ||
| 46 | */ | ||
| 47 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable)) | ||
| 48 | |||
| 49 | /** | ||
| 50 | * hash_add - add an object to a hashtable | ||
| 51 | * @hashtable: hashtable to add to | ||
| 52 | * @node: the &struct hlist_node of the object to be added | ||
| 53 | * @key: the key of the object to be added | ||
| 54 | */ | ||
| 55 | #define hash_add(hashtable, node, key) \ | ||
| 56 | hlist_add_head(node, &hashtable[hash_min(key, HASH_BITS(hashtable))]) | ||
| 57 | |||
| 58 | /** | ||
| 59 | * hash_add_rcu - add an object to a rcu enabled hashtable | ||
| 60 | * @hashtable: hashtable to add to | ||
| 61 | * @node: the &struct hlist_node of the object to be added | ||
| 62 | * @key: the key of the object to be added | ||
| 63 | */ | ||
| 64 | #define hash_add_rcu(hashtable, node, key) \ | ||
| 65 | hlist_add_head_rcu(node, &hashtable[hash_min(key, HASH_BITS(hashtable))]) | ||
| 66 | |||
| 67 | /** | ||
| 68 | * hash_hashed - check whether an object is in any hashtable | ||
| 69 | * @node: the &struct hlist_node of the object to be checked | ||
| 70 | */ | ||
| 71 | static inline bool hash_hashed(struct hlist_node *node) | ||
| 72 | { | ||
| 73 | return !hlist_unhashed(node); | ||
| 74 | } | ||
| 75 | |||
| 76 | static inline bool __hash_empty(struct hlist_head *ht, unsigned int sz) | ||
| 77 | { | ||
| 78 | unsigned int i; | ||
| 79 | |||
| 80 | for (i = 0; i < sz; i++) | ||
| 81 | if (!hlist_empty(&ht[i])) | ||
| 82 | return false; | ||
| 83 | |||
| 84 | return true; | ||
| 85 | } | ||
| 86 | |||
| 87 | /** | ||
| 88 | * hash_empty - check whether a hashtable is empty | ||
| 89 | * @hashtable: hashtable to check | ||
| 90 | * | ||
| 91 | * This has to be a macro since HASH_BITS() will not work on pointers since | ||
| 92 | * it calculates the size during preprocessing. | ||
| 93 | */ | ||
| 94 | #define hash_empty(hashtable) __hash_empty(hashtable, HASH_SIZE(hashtable)) | ||
| 95 | |||
| 96 | /** | ||
| 97 | * hash_del - remove an object from a hashtable | ||
| 98 | * @node: &struct hlist_node of the object to remove | ||
| 99 | */ | ||
| 100 | static inline void hash_del(struct hlist_node *node) | ||
| 101 | { | ||
| 102 | hlist_del_init(node); | ||
| 103 | } | ||
| 104 | |||
| 105 | /** | ||
| 106 | * hash_del_rcu - remove an object from a rcu enabled hashtable | ||
| 107 | * @node: &struct hlist_node of the object to remove | ||
| 108 | */ | ||
| 109 | static inline void hash_del_rcu(struct hlist_node *node) | ||
| 110 | { | ||
| 111 | hlist_del_init_rcu(node); | ||
| 112 | } | ||
| 113 | |||
| 114 | /** | ||
| 115 | * hash_for_each - iterate over a hashtable | ||
| 116 | * @name: hashtable to iterate | ||
| 117 | * @bkt: integer to use as bucket loop cursor | ||
| 118 | * @node: the &struct list_head to use as a loop cursor for each entry | ||
| 119 | * @obj: the type * to use as a loop cursor for each entry | ||
| 120 | * @member: the name of the hlist_node within the struct | ||
| 121 | */ | ||
| 122 | #define hash_for_each(name, bkt, node, obj, member) \ | ||
| 123 | for ((bkt) = 0, node = NULL; node == NULL && (bkt) < HASH_SIZE(name); (bkt)++)\ | ||
| 124 | hlist_for_each_entry(obj, node, &name[bkt], member) | ||
| 125 | |||
| 126 | /** | ||
| 127 | * hash_for_each_rcu - iterate over a rcu enabled hashtable | ||
| 128 | * @name: hashtable to iterate | ||
| 129 | * @bkt: integer to use as bucket loop cursor | ||
| 130 | * @node: the &struct list_head to use as a loop cursor for each entry | ||
| 131 | * @obj: the type * to use as a loop cursor for each entry | ||
| 132 | * @member: the name of the hlist_node within the struct | ||
| 133 | */ | ||
| 134 | #define hash_for_each_rcu(name, bkt, node, obj, member) \ | ||
| 135 | for ((bkt) = 0, node = NULL; node == NULL && (bkt) < HASH_SIZE(name); (bkt)++)\ | ||
| 136 | hlist_for_each_entry_rcu(obj, node, &name[bkt], member) | ||
| 137 | |||
| 138 | /** | ||
| 139 | * hash_for_each_safe - iterate over a hashtable safe against removal of | ||
| 140 | * hash entry | ||
| 141 | * @name: hashtable to iterate | ||
| 142 | * @bkt: integer to use as bucket loop cursor | ||
| 143 | * @node: the &struct list_head to use as a loop cursor for each entry | ||
| 144 | * @tmp: a &struct used for temporary storage | ||
| 145 | * @obj: the type * to use as a loop cursor for each entry | ||
| 146 | * @member: the name of the hlist_node within the struct | ||
| 147 | */ | ||
| 148 | #define hash_for_each_safe(name, bkt, node, tmp, obj, member) \ | ||
| 149 | for ((bkt) = 0, node = NULL; node == NULL && (bkt) < HASH_SIZE(name); (bkt)++)\ | ||
| 150 | hlist_for_each_entry_safe(obj, node, tmp, &name[bkt], member) | ||
| 151 | |||
| 152 | /** | ||
| 153 | * hash_for_each_possible - iterate over all possible objects hashing to the | ||
| 154 | * same bucket | ||
| 155 | * @name: hashtable to iterate | ||
| 156 | * @obj: the type * to use as a loop cursor for each entry | ||
| 157 | * @node: the &struct list_head to use as a loop cursor for each entry | ||
| 158 | * @member: the name of the hlist_node within the struct | ||
| 159 | * @key: the key of the objects to iterate over | ||
| 160 | */ | ||
| 161 | #define hash_for_each_possible(name, obj, node, member, key) \ | ||
| 162 | hlist_for_each_entry(obj, node, &name[hash_min(key, HASH_BITS(name))], member) | ||
| 163 | |||
| 164 | /** | ||
| 165 | * hash_for_each_possible_rcu - iterate over all possible objects hashing to the | ||
| 166 | * same bucket in an rcu enabled hashtable | ||
| 167 | * in a rcu enabled hashtable | ||
| 168 | * @name: hashtable to iterate | ||
| 169 | * @obj: the type * to use as a loop cursor for each entry | ||
| 170 | * @node: the &struct list_head to use as a loop cursor for each entry | ||
| 171 | * @member: the name of the hlist_node within the struct | ||
| 172 | * @key: the key of the objects to iterate over | ||
| 173 | */ | ||
| 174 | #define hash_for_each_possible_rcu(name, obj, node, member, key) \ | ||
| 175 | hlist_for_each_entry_rcu(obj, node, &name[hash_min(key, HASH_BITS(name))], member) | ||
| 176 | |||
| 177 | /** | ||
| 178 | * hash_for_each_possible_safe - iterate over all possible objects hashing to the | ||
| 179 | * same bucket safe against removals | ||
| 180 | * @name: hashtable to iterate | ||
| 181 | * @obj: the type * to use as a loop cursor for each entry | ||
| 182 | * @node: the &struct list_head to use as a loop cursor for each entry | ||
| 183 | * @tmp: a &struct used for temporary storage | ||
| 184 | * @member: the name of the hlist_node within the struct | ||
| 185 | * @key: the key of the objects to iterate over | ||
| 186 | */ | ||
| 187 | #define hash_for_each_possible_safe(name, obj, node, tmp, member, key) \ | ||
| 188 | hlist_for_each_entry_safe(obj, node, tmp, \ | ||
| 189 | &name[hash_min(key, HASH_BITS(name))], member) | ||
| 190 | |||
| 191 | |||
| 192 | #endif | ||
diff --git a/include/linux/i2c-omap.h b/include/linux/i2c-omap.h index df804ba73e0b..92a0dc75bc74 100644 --- a/include/linux/i2c-omap.h +++ b/include/linux/i2c-omap.h | |||
| @@ -34,6 +34,7 @@ struct omap_i2c_bus_platform_data { | |||
| 34 | u32 clkrate; | 34 | u32 clkrate; |
| 35 | u32 rev; | 35 | u32 rev; |
| 36 | u32 flags; | 36 | u32 flags; |
| 37 | void (*set_mpu_wkup_lat)(struct device *dev, long set); | ||
| 37 | }; | 38 | }; |
| 38 | 39 | ||
| 39 | #endif | 40 | #endif |
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index c0ae76ac4e0b..7806c24e5bc8 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h | |||
| @@ -618,4 +618,20 @@ static inline struct dentry *iio_get_debugfs_dentry(struct iio_dev *indio_dev) | |||
| 618 | }; | 618 | }; |
| 619 | #endif | 619 | #endif |
| 620 | 620 | ||
| 621 | /** | ||
| 622 | * IIO_DEGREE_TO_RAD() - Convert degree to rad | ||
| 623 | * @deg: A value in degree | ||
| 624 | * | ||
| 625 | * Returns the given value converted from degree to rad | ||
| 626 | */ | ||
| 627 | #define IIO_DEGREE_TO_RAD(deg) (((deg) * 314159ULL + 9000000ULL) / 18000000ULL) | ||
| 628 | |||
| 629 | /** | ||
| 630 | * IIO_G_TO_M_S_2() - Convert g to meter / second**2 | ||
| 631 | * @g: A value in g | ||
| 632 | * | ||
| 633 | * Returns the given value converted from g to meter / second**2 | ||
| 634 | */ | ||
| 635 | #define IIO_G_TO_M_S_2(g) ((g) * 980665ULL / 100000ULL) | ||
| 636 | |||
| 621 | #endif /* _INDUSTRIAL_IO_H_ */ | 637 | #endif /* _INDUSTRIAL_IO_H_ */ |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 93bfc9f9815c..ecc554374e44 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -42,19 +42,8 @@ | |||
| 42 | */ | 42 | */ |
| 43 | #define KVM_MEMSLOT_INVALID (1UL << 16) | 43 | #define KVM_MEMSLOT_INVALID (1UL << 16) |
| 44 | 44 | ||
| 45 | /* | 45 | /* Two fragments for cross MMIO pages. */ |
| 46 | * If we support unaligned MMIO, at most one fragment will be split into two: | 46 | #define KVM_MAX_MMIO_FRAGMENTS 2 |
| 47 | */ | ||
| 48 | #ifdef KVM_UNALIGNED_MMIO | ||
| 49 | # define KVM_EXTRA_MMIO_FRAGMENTS 1 | ||
| 50 | #else | ||
| 51 | # define KVM_EXTRA_MMIO_FRAGMENTS 0 | ||
| 52 | #endif | ||
| 53 | |||
| 54 | #define KVM_USER_MMIO_SIZE 8 | ||
| 55 | |||
| 56 | #define KVM_MAX_MMIO_FRAGMENTS \ | ||
| 57 | (KVM_MMIO_SIZE / KVM_USER_MMIO_SIZE + KVM_EXTRA_MMIO_FRAGMENTS) | ||
| 58 | 47 | ||
| 59 | /* | 48 | /* |
| 60 | * For the normal pfn, the highest 12 bits should be zero, | 49 | * For the normal pfn, the highest 12 bits should be zero, |
diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 569d67d4243e..d452ee191066 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h | |||
| @@ -57,6 +57,7 @@ int memblock_add(phys_addr_t base, phys_addr_t size); | |||
| 57 | int memblock_remove(phys_addr_t base, phys_addr_t size); | 57 | int memblock_remove(phys_addr_t base, phys_addr_t size); |
| 58 | int memblock_free(phys_addr_t base, phys_addr_t size); | 58 | int memblock_free(phys_addr_t base, phys_addr_t size); |
| 59 | int memblock_reserve(phys_addr_t base, phys_addr_t size); | 59 | int memblock_reserve(phys_addr_t base, phys_addr_t size); |
| 60 | void memblock_trim_memory(phys_addr_t align); | ||
| 60 | 61 | ||
| 61 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP | 62 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP |
| 62 | void __next_mem_pfn_range(int *idx, int nid, unsigned long *out_start_pfn, | 63 | void __next_mem_pfn_range(int *idx, int nid, unsigned long *out_start_pfn, |
diff --git a/include/linux/mfd/max77693.h b/include/linux/mfd/max77693.h index 1d28ae90384e..fe03b2d35d4f 100644 --- a/include/linux/mfd/max77693.h +++ b/include/linux/mfd/max77693.h | |||
| @@ -30,7 +30,20 @@ | |||
| 30 | #ifndef __LINUX_MFD_MAX77693_H | 30 | #ifndef __LINUX_MFD_MAX77693_H |
| 31 | #define __LINUX_MFD_MAX77693_H | 31 | #define __LINUX_MFD_MAX77693_H |
| 32 | 32 | ||
| 33 | struct max77693_reg_data { | ||
| 34 | u8 addr; | ||
| 35 | u8 data; | ||
| 36 | }; | ||
| 37 | |||
| 38 | struct max77693_muic_platform_data { | ||
| 39 | struct max77693_reg_data *init_data; | ||
| 40 | int num_init_data; | ||
| 41 | }; | ||
| 42 | |||
| 33 | struct max77693_platform_data { | 43 | struct max77693_platform_data { |
| 34 | int wakeup; | 44 | int wakeup; |
| 45 | |||
| 46 | /* muic data */ | ||
| 47 | struct max77693_muic_platform_data *muic_data; | ||
| 35 | }; | 48 | }; |
| 36 | #endif /* __LINUX_MFD_MAX77693_H */ | 49 | #endif /* __LINUX_MFD_MAX77693_H */ |
diff --git a/include/linux/mfd/menelaus.h b/include/linux/mfd/menelaus.h new file mode 100644 index 000000000000..f097e89134cb --- /dev/null +++ b/include/linux/mfd/menelaus.h | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | /* | ||
| 2 | * Functions to access Menelaus power management chip | ||
| 3 | */ | ||
| 4 | |||
| 5 | #ifndef __ASM_ARCH_MENELAUS_H | ||
| 6 | #define __ASM_ARCH_MENELAUS_H | ||
| 7 | |||
| 8 | struct device; | ||
| 9 | |||
| 10 | struct menelaus_platform_data { | ||
| 11 | int (* late_init)(struct device *dev); | ||
| 12 | }; | ||
| 13 | |||
| 14 | extern int menelaus_register_mmc_callback(void (*callback)(void *data, u8 card_mask), | ||
| 15 | void *data); | ||
| 16 | extern void menelaus_unregister_mmc_callback(void); | ||
| 17 | extern int menelaus_set_mmc_opendrain(int slot, int enable); | ||
| 18 | extern int menelaus_set_mmc_slot(int slot, int enable, int power, int cd_on); | ||
| 19 | |||
| 20 | extern int menelaus_set_vmem(unsigned int mV); | ||
| 21 | extern int menelaus_set_vio(unsigned int mV); | ||
| 22 | extern int menelaus_set_vmmc(unsigned int mV); | ||
| 23 | extern int menelaus_set_vaux(unsigned int mV); | ||
| 24 | extern int menelaus_set_vdcdc(int dcdc, unsigned int mV); | ||
| 25 | extern int menelaus_set_slot_sel(int enable); | ||
| 26 | extern int menelaus_get_slot_pin_states(void); | ||
| 27 | extern int menelaus_set_vcore_sw(unsigned int mV); | ||
| 28 | extern int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int floor_mV); | ||
| 29 | |||
| 30 | #define EN_VPLL_SLEEP (1 << 7) | ||
| 31 | #define EN_VMMC_SLEEP (1 << 6) | ||
| 32 | #define EN_VAUX_SLEEP (1 << 5) | ||
| 33 | #define EN_VIO_SLEEP (1 << 4) | ||
| 34 | #define EN_VMEM_SLEEP (1 << 3) | ||
| 35 | #define EN_DC3_SLEEP (1 << 2) | ||
| 36 | #define EN_DC2_SLEEP (1 << 1) | ||
| 37 | #define EN_VC_SLEEP (1 << 0) | ||
| 38 | |||
| 39 | extern int menelaus_set_regulator_sleep(int enable, u32 val); | ||
| 40 | |||
| 41 | #if defined(CONFIG_ARCH_OMAP2) && defined(CONFIG_MENELAUS) | ||
| 42 | #define omap_has_menelaus() 1 | ||
| 43 | #else | ||
| 44 | #define omap_has_menelaus() 0 | ||
| 45 | #endif | ||
| 46 | |||
| 47 | #endif | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index fa0680402738..bcaab4e6fe91 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -1684,9 +1684,5 @@ static inline unsigned int debug_guardpage_minorder(void) { return 0; } | |||
| 1684 | static inline bool page_is_guard(struct page *page) { return false; } | 1684 | static inline bool page_is_guard(struct page *page) { return false; } |
| 1685 | #endif /* CONFIG_DEBUG_PAGEALLOC */ | 1685 | #endif /* CONFIG_DEBUG_PAGEALLOC */ |
| 1686 | 1686 | ||
| 1687 | extern void reset_zone_present_pages(void); | ||
| 1688 | extern void fixup_zone_present_pages(int nid, unsigned long start_pfn, | ||
| 1689 | unsigned long end_pfn); | ||
| 1690 | |||
| 1691 | #endif /* __KERNEL__ */ | 1687 | #endif /* __KERNEL__ */ |
| 1692 | #endif /* _LINUX_MM_H */ | 1688 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h index 7c6a1139d8fa..96531664a061 100644 --- a/include/linux/mmc/dw_mmc.h +++ b/include/linux/mmc/dw_mmc.h | |||
| @@ -137,7 +137,7 @@ struct dw_mci { | |||
| 137 | 137 | ||
| 138 | dma_addr_t sg_dma; | 138 | dma_addr_t sg_dma; |
| 139 | void *sg_cpu; | 139 | void *sg_cpu; |
| 140 | struct dw_mci_dma_ops *dma_ops; | 140 | const struct dw_mci_dma_ops *dma_ops; |
| 141 | #ifdef CONFIG_MMC_DW_IDMAC | 141 | #ifdef CONFIG_MMC_DW_IDMAC |
| 142 | unsigned int ring_size; | 142 | unsigned int ring_size; |
| 143 | #else | 143 | #else |
| @@ -162,7 +162,7 @@ struct dw_mci { | |||
| 162 | u16 data_offset; | 162 | u16 data_offset; |
| 163 | struct device *dev; | 163 | struct device *dev; |
| 164 | struct dw_mci_board *pdata; | 164 | struct dw_mci_board *pdata; |
| 165 | struct dw_mci_drv_data *drv_data; | 165 | const struct dw_mci_drv_data *drv_data; |
| 166 | void *priv; | 166 | void *priv; |
| 167 | struct clk *biu_clk; | 167 | struct clk *biu_clk; |
| 168 | struct clk *ciu_clk; | 168 | struct clk *ciu_clk; |
| @@ -186,7 +186,7 @@ struct dw_mci { | |||
| 186 | 186 | ||
| 187 | struct regulator *vmmc; /* Power regulator */ | 187 | struct regulator *vmmc; /* Power regulator */ |
| 188 | unsigned long irq_flags; /* IRQ flags */ | 188 | unsigned long irq_flags; /* IRQ flags */ |
| 189 | unsigned int irq; | 189 | int irq; |
| 190 | }; | 190 | }; |
| 191 | 191 | ||
| 192 | /* DMA ops for Internal/External DMAC interface */ | 192 | /* DMA ops for Internal/External DMAC interface */ |
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index fa8529a859b8..1edcb4dad8c4 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h | |||
| @@ -91,6 +91,7 @@ struct sdhci_host { | |||
| 91 | unsigned int quirks2; /* More deviations from spec. */ | 91 | unsigned int quirks2; /* More deviations from spec. */ |
| 92 | 92 | ||
| 93 | #define SDHCI_QUIRK2_HOST_OFF_CARD_ON (1<<0) | 93 | #define SDHCI_QUIRK2_HOST_OFF_CARD_ON (1<<0) |
| 94 | #define SDHCI_QUIRK2_HOST_NO_CMD23 (1<<1) | ||
| 94 | 95 | ||
| 95 | int irq; /* Device IRQ */ | 96 | int irq; /* Device IRQ */ |
| 96 | void __iomem *ioaddr; /* Mapped address */ | 97 | void __iomem *ioaddr; /* Mapped address */ |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 50aaca81f63d..a23923ba8263 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -752,7 +752,7 @@ extern int init_currently_empty_zone(struct zone *zone, unsigned long start_pfn, | |||
| 752 | unsigned long size, | 752 | unsigned long size, |
| 753 | enum memmap_context context); | 753 | enum memmap_context context); |
| 754 | 754 | ||
| 755 | extern void lruvec_init(struct lruvec *lruvec, struct zone *zone); | 755 | extern void lruvec_init(struct lruvec *lruvec); |
| 756 | 756 | ||
| 757 | static inline struct zone *lruvec_zone(struct lruvec *lruvec) | 757 | static inline struct zone *lruvec_zone(struct lruvec *lruvec) |
| 758 | { | 758 | { |
diff --git a/include/linux/of_address.h b/include/linux/of_address.h index a1984dd037da..0506eb53519b 100644 --- a/include/linux/of_address.h +++ b/include/linux/of_address.h | |||
| @@ -28,11 +28,13 @@ static inline unsigned long pci_address_to_pio(phys_addr_t addr) { return -1; } | |||
| 28 | #endif | 28 | #endif |
| 29 | 29 | ||
| 30 | #else /* CONFIG_OF_ADDRESS */ | 30 | #else /* CONFIG_OF_ADDRESS */ |
| 31 | #ifndef of_address_to_resource | ||
| 31 | static inline int of_address_to_resource(struct device_node *dev, int index, | 32 | static inline int of_address_to_resource(struct device_node *dev, int index, |
| 32 | struct resource *r) | 33 | struct resource *r) |
| 33 | { | 34 | { |
| 34 | return -EINVAL; | 35 | return -EINVAL; |
| 35 | } | 36 | } |
| 37 | #endif | ||
| 36 | static inline struct device_node *of_find_matching_node_by_address( | 38 | static inline struct device_node *of_find_matching_node_by_address( |
| 37 | struct device_node *from, | 39 | struct device_node *from, |
| 38 | const struct of_device_id *matches, | 40 | const struct of_device_id *matches, |
| @@ -40,10 +42,12 @@ static inline struct device_node *of_find_matching_node_by_address( | |||
| 40 | { | 42 | { |
| 41 | return NULL; | 43 | return NULL; |
| 42 | } | 44 | } |
| 45 | #ifndef of_iomap | ||
| 43 | static inline void __iomem *of_iomap(struct device_node *device, int index) | 46 | static inline void __iomem *of_iomap(struct device_node *device, int index) |
| 44 | { | 47 | { |
| 45 | return NULL; | 48 | return NULL; |
| 46 | } | 49 | } |
| 50 | #endif | ||
| 47 | static inline const __be32 *of_get_address(struct device_node *dev, int index, | 51 | static inline const __be32 *of_get_address(struct device_node *dev, int index, |
| 48 | u64 *size, unsigned int *flags) | 52 | u64 *size, unsigned int *flags) |
| 49 | { | 53 | { |
diff --git a/include/linux/percpu-rwsem.h b/include/linux/percpu-rwsem.h index cf80f7e5277f..250a4acddb2b 100644 --- a/include/linux/percpu-rwsem.h +++ b/include/linux/percpu-rwsem.h | |||
| @@ -12,34 +12,27 @@ struct percpu_rw_semaphore { | |||
| 12 | struct mutex mtx; | 12 | struct mutex mtx; |
| 13 | }; | 13 | }; |
| 14 | 14 | ||
| 15 | #define light_mb() barrier() | ||
| 16 | #define heavy_mb() synchronize_sched() | ||
| 17 | |||
| 15 | static inline void percpu_down_read(struct percpu_rw_semaphore *p) | 18 | static inline void percpu_down_read(struct percpu_rw_semaphore *p) |
| 16 | { | 19 | { |
| 17 | rcu_read_lock(); | 20 | rcu_read_lock_sched(); |
| 18 | if (unlikely(p->locked)) { | 21 | if (unlikely(p->locked)) { |
| 19 | rcu_read_unlock(); | 22 | rcu_read_unlock_sched(); |
| 20 | mutex_lock(&p->mtx); | 23 | mutex_lock(&p->mtx); |
| 21 | this_cpu_inc(*p->counters); | 24 | this_cpu_inc(*p->counters); |
| 22 | mutex_unlock(&p->mtx); | 25 | mutex_unlock(&p->mtx); |
| 23 | return; | 26 | return; |
| 24 | } | 27 | } |
| 25 | this_cpu_inc(*p->counters); | 28 | this_cpu_inc(*p->counters); |
| 26 | rcu_read_unlock(); | 29 | rcu_read_unlock_sched(); |
| 30 | light_mb(); /* A, between read of p->locked and read of data, paired with D */ | ||
| 27 | } | 31 | } |
| 28 | 32 | ||
| 29 | static inline void percpu_up_read(struct percpu_rw_semaphore *p) | 33 | static inline void percpu_up_read(struct percpu_rw_semaphore *p) |
| 30 | { | 34 | { |
| 31 | /* | 35 | light_mb(); /* B, between read of the data and write to p->counter, paired with C */ |
| 32 | * On X86, write operation in this_cpu_dec serves as a memory unlock | ||
| 33 | * barrier (i.e. memory accesses may be moved before the write, but | ||
| 34 | * no memory accesses are moved past the write). | ||
| 35 | * On other architectures this may not be the case, so we need smp_mb() | ||
| 36 | * there. | ||
| 37 | */ | ||
| 38 | #if defined(CONFIG_X86) && (!defined(CONFIG_X86_PPRO_FENCE) && !defined(CONFIG_X86_OOSTORE)) | ||
| 39 | barrier(); | ||
| 40 | #else | ||
| 41 | smp_mb(); | ||
| 42 | #endif | ||
| 43 | this_cpu_dec(*p->counters); | 36 | this_cpu_dec(*p->counters); |
| 44 | } | 37 | } |
| 45 | 38 | ||
| @@ -58,14 +51,15 @@ static inline void percpu_down_write(struct percpu_rw_semaphore *p) | |||
| 58 | { | 51 | { |
| 59 | mutex_lock(&p->mtx); | 52 | mutex_lock(&p->mtx); |
| 60 | p->locked = true; | 53 | p->locked = true; |
| 61 | synchronize_rcu(); | 54 | synchronize_sched(); /* make sure that all readers exit the rcu_read_lock_sched region */ |
| 62 | while (__percpu_count(p->counters)) | 55 | while (__percpu_count(p->counters)) |
| 63 | msleep(1); | 56 | msleep(1); |
| 64 | smp_rmb(); /* paired with smp_mb() in percpu_sem_up_read() */ | 57 | heavy_mb(); /* C, between read of p->counter and write to data, paired with B */ |
| 65 | } | 58 | } |
| 66 | 59 | ||
| 67 | static inline void percpu_up_write(struct percpu_rw_semaphore *p) | 60 | static inline void percpu_up_write(struct percpu_rw_semaphore *p) |
| 68 | { | 61 | { |
| 62 | heavy_mb(); /* D, between write to data and write to p->locked, paired with A */ | ||
| 69 | p->locked = false; | 63 | p->locked = false; |
| 70 | mutex_unlock(&p->mtx); | 64 | mutex_unlock(&p->mtx); |
| 71 | } | 65 | } |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 2e902359aee5..6bfb2faa0b19 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -803,12 +803,16 @@ static inline void perf_event_task_tick(void) { } | |||
| 803 | do { \ | 803 | do { \ |
| 804 | static struct notifier_block fn##_nb __cpuinitdata = \ | 804 | static struct notifier_block fn##_nb __cpuinitdata = \ |
| 805 | { .notifier_call = fn, .priority = CPU_PRI_PERF }; \ | 805 | { .notifier_call = fn, .priority = CPU_PRI_PERF }; \ |
| 806 | unsigned long cpu = smp_processor_id(); \ | ||
| 807 | unsigned long flags; \ | ||
| 806 | fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \ | 808 | fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \ |
| 807 | (void *)(unsigned long)smp_processor_id()); \ | 809 | (void *)(unsigned long)cpu); \ |
| 810 | local_irq_save(flags); \ | ||
| 808 | fn(&fn##_nb, (unsigned long)CPU_STARTING, \ | 811 | fn(&fn##_nb, (unsigned long)CPU_STARTING, \ |
| 809 | (void *)(unsigned long)smp_processor_id()); \ | 812 | (void *)(unsigned long)cpu); \ |
| 813 | local_irq_restore(flags); \ | ||
| 810 | fn(&fn##_nb, (unsigned long)CPU_ONLINE, \ | 814 | fn(&fn##_nb, (unsigned long)CPU_ONLINE, \ |
| 811 | (void *)(unsigned long)smp_processor_id()); \ | 815 | (void *)(unsigned long)cpu); \ |
| 812 | register_cpu_notifier(&fn##_nb); \ | 816 | register_cpu_notifier(&fn##_nb); \ |
| 813 | } while (0) | 817 | } while (0) |
| 814 | 818 | ||
diff --git a/include/linux/platform_data/asoc-imx-ssi.h b/include/linux/platform_data/asoc-imx-ssi.h index 63f3c2804239..92c7fd72f636 100644 --- a/include/linux/platform_data/asoc-imx-ssi.h +++ b/include/linux/platform_data/asoc-imx-ssi.h | |||
| @@ -17,5 +17,7 @@ struct imx_ssi_platform_data { | |||
| 17 | void (*ac97_warm_reset)(struct snd_ac97 *ac97); | 17 | void (*ac97_warm_reset)(struct snd_ac97 *ac97); |
| 18 | }; | 18 | }; |
| 19 | 19 | ||
| 20 | extern int mxc_set_irq_fiq(unsigned int irq, unsigned int type); | ||
| 21 | |||
| 20 | #endif /* __MACH_SSI_H */ | 22 | #endif /* __MACH_SSI_H */ |
| 21 | 23 | ||
diff --git a/include/linux/platform_data/dma-imx.h b/include/linux/platform_data/dma-imx.h index 1b9080385b46..f6d30cc1cb77 100644 --- a/include/linux/platform_data/dma-imx.h +++ b/include/linux/platform_data/dma-imx.h | |||
| @@ -61,7 +61,9 @@ static inline int imx_dma_is_ipu(struct dma_chan *chan) | |||
| 61 | static inline int imx_dma_is_general_purpose(struct dma_chan *chan) | 61 | static inline int imx_dma_is_general_purpose(struct dma_chan *chan) |
| 62 | { | 62 | { |
| 63 | return strstr(dev_name(chan->device->dev), "sdma") || | 63 | return strstr(dev_name(chan->device->dev), "sdma") || |
| 64 | !strcmp(dev_name(chan->device->dev), "imx-dma"); | 64 | !strcmp(dev_name(chan->device->dev), "imx1-dma") || |
| 65 | !strcmp(dev_name(chan->device->dev), "imx21-dma") || | ||
| 66 | !strcmp(dev_name(chan->device->dev), "imx27-dma"); | ||
| 65 | } | 67 | } |
| 66 | 68 | ||
| 67 | #endif | 69 | #endif |
diff --git a/include/linux/platform_data/gpio-omap.h b/include/linux/platform_data/gpio-omap.h index e8741c2678d5..5d50b25a73d7 100644 --- a/include/linux/platform_data/gpio-omap.h +++ b/include/linux/platform_data/gpio-omap.h | |||
| @@ -26,7 +26,6 @@ | |||
| 26 | 26 | ||
| 27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
| 28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
| 29 | #include <mach/irqs.h> | ||
| 30 | 29 | ||
| 31 | #define OMAP1_MPUIO_BASE 0xfffb5000 | 30 | #define OMAP1_MPUIO_BASE 0xfffb5000 |
| 32 | 31 | ||
diff --git a/include/linux/platform_data/leds-omap.h b/include/linux/platform_data/leds-omap.h new file mode 100644 index 000000000000..56c9b2a0ada5 --- /dev/null +++ b/include/linux/platform_data/leds-omap.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2006 Samsung Electronics | ||
| 3 | * Kyungmin Park <kyungmin.park@samsung.com> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | */ | ||
| 9 | #ifndef ASMARM_ARCH_LED_H | ||
| 10 | #define ASMARM_ARCH_LED_H | ||
| 11 | |||
| 12 | struct omap_led_config { | ||
| 13 | struct led_classdev cdev; | ||
| 14 | s16 gpio; | ||
| 15 | }; | ||
| 16 | |||
| 17 | struct omap_led_platform_data { | ||
| 18 | s16 nr_leds; | ||
| 19 | struct omap_led_config *leds; | ||
| 20 | }; | ||
| 21 | |||
| 22 | #endif | ||
diff --git a/include/linux/platform_data/mmc-omap.h b/include/linux/platform_data/mmc-omap.h new file mode 100644 index 000000000000..2bf6ea82ff94 --- /dev/null +++ b/include/linux/platform_data/mmc-omap.h | |||
| @@ -0,0 +1,150 @@ | |||
| 1 | /* | ||
| 2 | * MMC definitions for OMAP2 | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 Nokia Corporation | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #define OMAP_MMC_MAX_SLOTS 2 | ||
| 12 | |||
| 13 | /* | ||
| 14 | * struct omap_mmc_dev_attr.flags possibilities | ||
| 15 | * | ||
| 16 | * OMAP_HSMMC_SUPPORTS_DUAL_VOLT: Some HSMMC controller instances can | ||
| 17 | * operate with either 1.8Vdc or 3.0Vdc card voltages; this flag | ||
| 18 | * should be set if this is the case. See for example Section 22.5.3 | ||
| 19 | * "MMC/SD/SDIO1 Bus Voltage Selection" of the OMAP34xx Multimedia | ||
| 20 | * Device Silicon Revision 3.1.x Revision ZR (July 2011) (SWPU223R). | ||
| 21 | * | ||
| 22 | * OMAP_HSMMC_BROKEN_MULTIBLOCK_READ: Multiple-block read transfers | ||
| 23 | * don't work correctly on some MMC controller instances on some | ||
| 24 | * OMAP3 SoCs; this flag should be set if this is the case. See | ||
| 25 | * for example Advisory 2.1.1.128 "MMC: Multiple Block Read | ||
| 26 | * Operation Issue" in _OMAP3530/3525/3515/3503 Silicon Errata_ | ||
| 27 | * Revision F (October 2010) (SPRZ278F). | ||
| 28 | */ | ||
| 29 | #define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(0) | ||
| 30 | #define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ BIT(1) | ||
| 31 | |||
| 32 | struct mmc_card; | ||
| 33 | |||
| 34 | struct omap_mmc_dev_attr { | ||
| 35 | u8 flags; | ||
| 36 | }; | ||
| 37 | |||
| 38 | struct omap_mmc_platform_data { | ||
| 39 | /* back-link to device */ | ||
| 40 | struct device *dev; | ||
| 41 | |||
| 42 | /* number of slots per controller */ | ||
| 43 | unsigned nr_slots:2; | ||
| 44 | |||
| 45 | /* set if your board has components or wiring that limits the | ||
| 46 | * maximum frequency on the MMC bus */ | ||
| 47 | unsigned int max_freq; | ||
| 48 | |||
| 49 | /* switch the bus to a new slot */ | ||
| 50 | int (*switch_slot)(struct device *dev, int slot); | ||
| 51 | /* initialize board-specific MMC functionality, can be NULL if | ||
| 52 | * not supported */ | ||
| 53 | int (*init)(struct device *dev); | ||
| 54 | void (*cleanup)(struct device *dev); | ||
| 55 | void (*shutdown)(struct device *dev); | ||
| 56 | |||
| 57 | /* To handle board related suspend/resume functionality for MMC */ | ||
| 58 | int (*suspend)(struct device *dev, int slot); | ||
| 59 | int (*resume)(struct device *dev, int slot); | ||
| 60 | |||
| 61 | /* Return context loss count due to PM states changing */ | ||
| 62 | int (*get_context_loss_count)(struct device *dev); | ||
| 63 | |||
| 64 | /* Integrating attributes from the omap_hwmod layer */ | ||
| 65 | u8 controller_flags; | ||
| 66 | |||
| 67 | /* Register offset deviation */ | ||
| 68 | u16 reg_offset; | ||
| 69 | |||
| 70 | struct omap_mmc_slot_data { | ||
| 71 | |||
| 72 | /* | ||
| 73 | * 4/8 wires and any additional host capabilities | ||
| 74 | * need to OR'd all capabilities (ref. linux/mmc/host.h) | ||
| 75 | */ | ||
| 76 | u8 wires; /* Used for the MMC driver on omap1 and 2420 */ | ||
| 77 | u32 caps; /* Used for the MMC driver on 2430 and later */ | ||
| 78 | u32 pm_caps; /* PM capabilities of the mmc */ | ||
| 79 | |||
| 80 | /* | ||
| 81 | * nomux means "standard" muxing is wrong on this board, and | ||
| 82 | * that board-specific code handled it before common init logic. | ||
| 83 | */ | ||
| 84 | unsigned nomux:1; | ||
| 85 | |||
| 86 | /* switch pin can be for card detect (default) or card cover */ | ||
| 87 | unsigned cover:1; | ||
| 88 | |||
| 89 | /* use the internal clock */ | ||
| 90 | unsigned internal_clock:1; | ||
| 91 | |||
| 92 | /* nonremovable e.g. eMMC */ | ||
| 93 | unsigned nonremovable:1; | ||
| 94 | |||
| 95 | /* Try to sleep or power off when possible */ | ||
| 96 | unsigned power_saving:1; | ||
| 97 | |||
| 98 | /* If using power_saving and the MMC power is not to go off */ | ||
| 99 | unsigned no_off:1; | ||
| 100 | |||
| 101 | /* eMMC does not handle power off when not in sleep state */ | ||
| 102 | unsigned no_regulator_off_init:1; | ||
| 103 | |||
| 104 | /* Regulator off remapped to sleep */ | ||
| 105 | unsigned vcc_aux_disable_is_sleep:1; | ||
| 106 | |||
| 107 | /* we can put the features above into this variable */ | ||
| 108 | #define HSMMC_HAS_PBIAS (1 << 0) | ||
| 109 | #define HSMMC_HAS_UPDATED_RESET (1 << 1) | ||
| 110 | #define MMC_OMAP7XX (1 << 2) | ||
| 111 | #define MMC_OMAP15XX (1 << 3) | ||
| 112 | #define MMC_OMAP16XX (1 << 4) | ||
| 113 | unsigned features; | ||
| 114 | |||
| 115 | int switch_pin; /* gpio (card detect) */ | ||
| 116 | int gpio_wp; /* gpio (write protect) */ | ||
| 117 | |||
| 118 | int (*set_bus_mode)(struct device *dev, int slot, int bus_mode); | ||
| 119 | int (*set_power)(struct device *dev, int slot, | ||
| 120 | int power_on, int vdd); | ||
| 121 | int (*get_ro)(struct device *dev, int slot); | ||
| 122 | void (*remux)(struct device *dev, int slot, int power_on); | ||
| 123 | /* Call back before enabling / disabling regulators */ | ||
| 124 | void (*before_set_reg)(struct device *dev, int slot, | ||
| 125 | int power_on, int vdd); | ||
| 126 | /* Call back after enabling / disabling regulators */ | ||
| 127 | void (*after_set_reg)(struct device *dev, int slot, | ||
| 128 | int power_on, int vdd); | ||
| 129 | /* if we have special card, init it using this callback */ | ||
| 130 | void (*init_card)(struct mmc_card *card); | ||
| 131 | |||
| 132 | /* return MMC cover switch state, can be NULL if not supported. | ||
| 133 | * | ||
| 134 | * possible return values: | ||
| 135 | * 0 - closed | ||
| 136 | * 1 - open | ||
| 137 | */ | ||
| 138 | int (*get_cover_state)(struct device *dev, int slot); | ||
| 139 | |||
| 140 | const char *name; | ||
| 141 | u32 ocr_mask; | ||
| 142 | |||
| 143 | /* Card detection IRQs */ | ||
| 144 | int card_detect_irq; | ||
| 145 | int (*card_detect)(struct device *dev, int slot); | ||
| 146 | |||
| 147 | unsigned int ban_openended:1; | ||
| 148 | |||
| 149 | } slots[OMAP_MMC_MAX_SLOTS]; | ||
| 150 | }; | ||
diff --git a/include/linux/platform_data/mtd-nand-omap2.h b/include/linux/platform_data/mtd-nand-omap2.h index 1a68c1e5fe53..24d32ca34bef 100644 --- a/include/linux/platform_data/mtd-nand-omap2.h +++ b/include/linux/platform_data/mtd-nand-omap2.h | |||
| @@ -8,9 +8,13 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | #include <plat/gpmc.h> | 11 | #ifndef _MTD_NAND_OMAP2_H |
| 12 | #define _MTD_NAND_OMAP2_H | ||
| 13 | |||
| 12 | #include <linux/mtd/partitions.h> | 14 | #include <linux/mtd/partitions.h> |
| 13 | 15 | ||
| 16 | #define GPMC_BCH_NUM_REMAINDER 8 | ||
| 17 | |||
| 14 | enum nand_io { | 18 | enum nand_io { |
| 15 | NAND_OMAP_PREFETCH_POLLED = 0, /* prefetch polled mode, default */ | 19 | NAND_OMAP_PREFETCH_POLLED = 0, /* prefetch polled mode, default */ |
| 16 | NAND_OMAP_POLLED, /* polled mode, without prefetch */ | 20 | NAND_OMAP_POLLED, /* polled mode, without prefetch */ |
| @@ -18,10 +22,38 @@ enum nand_io { | |||
| 18 | NAND_OMAP_PREFETCH_IRQ /* prefetch enabled irq mode */ | 22 | NAND_OMAP_PREFETCH_IRQ /* prefetch enabled irq mode */ |
| 19 | }; | 23 | }; |
| 20 | 24 | ||
| 25 | enum omap_ecc { | ||
| 26 | /* 1-bit ecc: stored at end of spare area */ | ||
| 27 | OMAP_ECC_HAMMING_CODE_DEFAULT = 0, /* Default, s/w method */ | ||
| 28 | OMAP_ECC_HAMMING_CODE_HW, /* gpmc to detect the error */ | ||
| 29 | /* 1-bit ecc: stored at beginning of spare area as romcode */ | ||
| 30 | OMAP_ECC_HAMMING_CODE_HW_ROMCODE, /* gpmc method & romcode layout */ | ||
| 31 | OMAP_ECC_BCH4_CODE_HW, /* 4-bit BCH ecc code */ | ||
| 32 | OMAP_ECC_BCH8_CODE_HW, /* 8-bit BCH ecc code */ | ||
| 33 | }; | ||
| 34 | |||
| 35 | struct gpmc_nand_regs { | ||
| 36 | void __iomem *gpmc_status; | ||
| 37 | void __iomem *gpmc_nand_command; | ||
| 38 | void __iomem *gpmc_nand_address; | ||
| 39 | void __iomem *gpmc_nand_data; | ||
| 40 | void __iomem *gpmc_prefetch_config1; | ||
| 41 | void __iomem *gpmc_prefetch_config2; | ||
| 42 | void __iomem *gpmc_prefetch_control; | ||
| 43 | void __iomem *gpmc_prefetch_status; | ||
| 44 | void __iomem *gpmc_ecc_config; | ||
| 45 | void __iomem *gpmc_ecc_control; | ||
| 46 | void __iomem *gpmc_ecc_size_config; | ||
| 47 | void __iomem *gpmc_ecc1_result; | ||
| 48 | void __iomem *gpmc_bch_result0[GPMC_BCH_NUM_REMAINDER]; | ||
| 49 | void __iomem *gpmc_bch_result1[GPMC_BCH_NUM_REMAINDER]; | ||
| 50 | void __iomem *gpmc_bch_result2[GPMC_BCH_NUM_REMAINDER]; | ||
| 51 | void __iomem *gpmc_bch_result3[GPMC_BCH_NUM_REMAINDER]; | ||
| 52 | }; | ||
| 53 | |||
| 21 | struct omap_nand_platform_data { | 54 | struct omap_nand_platform_data { |
| 22 | int cs; | 55 | int cs; |
| 23 | struct mtd_partition *parts; | 56 | struct mtd_partition *parts; |
| 24 | struct gpmc_timings *gpmc_t; | ||
| 25 | int nr_parts; | 57 | int nr_parts; |
| 26 | bool dev_ready; | 58 | bool dev_ready; |
| 27 | enum nand_io xfer_type; | 59 | enum nand_io xfer_type; |
| @@ -30,14 +62,4 @@ struct omap_nand_platform_data { | |||
| 30 | struct gpmc_nand_regs reg; | 62 | struct gpmc_nand_regs reg; |
| 31 | }; | 63 | }; |
| 32 | 64 | ||
| 33 | /* minimum size for IO mapping */ | ||
| 34 | #define NAND_IO_SIZE 4 | ||
| 35 | |||
| 36 | #if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE) | ||
| 37 | extern int gpmc_nand_init(struct omap_nand_platform_data *d); | ||
| 38 | #else | ||
| 39 | static inline int gpmc_nand_init(struct omap_nand_platform_data *d) | ||
| 40 | { | ||
| 41 | return 0; | ||
| 42 | } | ||
| 43 | #endif | 65 | #endif |
diff --git a/include/linux/platform_data/mtd-onenand-omap2.h b/include/linux/platform_data/mtd-onenand-omap2.h index 2858667d2e4f..685af7e8b120 100644 --- a/include/linux/platform_data/mtd-onenand-omap2.h +++ b/include/linux/platform_data/mtd-onenand-omap2.h | |||
| @@ -9,17 +9,15 @@ | |||
| 9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #ifndef __MTD_ONENAND_OMAP2_H | ||
| 13 | #define __MTD_ONENAND_OMAP2_H | ||
| 14 | |||
| 12 | #include <linux/mtd/mtd.h> | 15 | #include <linux/mtd/mtd.h> |
| 13 | #include <linux/mtd/partitions.h> | 16 | #include <linux/mtd/partitions.h> |
| 14 | 17 | ||
| 15 | #define ONENAND_SYNC_READ (1 << 0) | 18 | #define ONENAND_SYNC_READ (1 << 0) |
| 16 | #define ONENAND_SYNC_READWRITE (1 << 1) | 19 | #define ONENAND_SYNC_READWRITE (1 << 1) |
| 17 | 20 | #define ONENAND_IN_OMAP34XX (1 << 2) | |
| 18 | struct onenand_freq_info { | ||
| 19 | u16 maf_id; | ||
| 20 | u16 dev_id; | ||
| 21 | u16 ver_id; | ||
| 22 | }; | ||
| 23 | 21 | ||
| 24 | struct omap_onenand_platform_data { | 22 | struct omap_onenand_platform_data { |
| 25 | int cs; | 23 | int cs; |
| @@ -27,27 +25,9 @@ struct omap_onenand_platform_data { | |||
| 27 | struct mtd_partition *parts; | 25 | struct mtd_partition *parts; |
| 28 | int nr_parts; | 26 | int nr_parts; |
| 29 | int (*onenand_setup)(void __iomem *, int *freq_ptr); | 27 | int (*onenand_setup)(void __iomem *, int *freq_ptr); |
| 30 | int (*get_freq)(const struct onenand_freq_info *freq_info, | ||
| 31 | bool *clk_dep); | ||
| 32 | int dma_channel; | 28 | int dma_channel; |
| 33 | u8 flags; | 29 | u8 flags; |
| 34 | u8 regulator_can_sleep; | 30 | u8 regulator_can_sleep; |
| 35 | u8 skip_initial_unlocking; | 31 | u8 skip_initial_unlocking; |
| 36 | }; | 32 | }; |
| 37 | |||
| 38 | #define ONENAND_MAX_PARTITIONS 8 | ||
| 39 | |||
| 40 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ | ||
| 41 | defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) | ||
| 42 | |||
| 43 | extern void gpmc_onenand_init(struct omap_onenand_platform_data *d); | ||
| 44 | |||
| 45 | #else | ||
| 46 | |||
| 47 | #define board_onenand_data NULL | ||
| 48 | |||
| 49 | static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d) | ||
| 50 | { | ||
| 51 | } | ||
| 52 | |||
| 53 | #endif | 33 | #endif |
diff --git a/include/linux/platform_data/omap-wd-timer.h b/include/linux/platform_data/omap-wd-timer.h new file mode 100644 index 000000000000..d75f5f802d98 --- /dev/null +++ b/include/linux/platform_data/omap-wd-timer.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | /* | ||
| 2 | * OMAP2+ WDTIMER-specific function prototypes | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Texas Instruments, Inc. | ||
| 5 | * Paul Walmsley | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __LINUX_PLATFORM_DATA_OMAP_WD_TIMER_H | ||
| 14 | #define __LINUX_PLATFORM_DATA_OMAP_WD_TIMER_H | ||
| 15 | |||
| 16 | #include <linux/types.h> | ||
| 17 | |||
| 18 | /* | ||
| 19 | * Standardized OMAP reset source bits | ||
| 20 | * | ||
| 21 | * This is a subset of the ones listed in arch/arm/mach-omap2/prm.h | ||
| 22 | * and are the only ones needed in the watchdog driver. | ||
| 23 | */ | ||
| 24 | #define OMAP_MPU_WD_RST_SRC_ID_SHIFT 3 | ||
| 25 | |||
| 26 | /** | ||
| 27 | * struct omap_wd_timer_platform_data - WDTIMER integration to the host SoC | ||
| 28 | * @read_reset_sources - fn ptr for the SoC to indicate the last reset cause | ||
| 29 | * | ||
| 30 | * The function pointed to by @read_reset_sources must return its data | ||
| 31 | * in a standard format - search for RST_SRC_ID_SHIFT in | ||
| 32 | * arch/arm/mach-omap2 | ||
| 33 | */ | ||
| 34 | struct omap_wd_timer_platform_data { | ||
| 35 | u32 (*read_reset_sources)(void); | ||
| 36 | }; | ||
| 37 | |||
| 38 | #endif | ||
diff --git a/include/linux/platform_data/omap_ocp2scp.h b/include/linux/platform_data/omap_ocp2scp.h new file mode 100644 index 000000000000..5c6c3939355f --- /dev/null +++ b/include/linux/platform_data/omap_ocp2scp.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* | ||
| 2 | * omap_ocp2scp.h -- ocp2scp header file | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation; either version 2 of the License, or | ||
| 8 | * (at your option) any later version. | ||
| 9 | * | ||
| 10 | * Author: Kishon Vijay Abraham I <kishon@ti.com> | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef __DRIVERS_OMAP_OCP2SCP_H | ||
| 20 | #define __DRIVERS_OMAP_OCP2SCP_H | ||
| 21 | |||
| 22 | struct omap_ocp2scp_dev { | ||
| 23 | const char *drv_name; | ||
| 24 | struct resource *res; | ||
| 25 | }; | ||
| 26 | |||
| 27 | struct omap_ocp2scp_platform_data { | ||
| 28 | int dev_cnt; | ||
| 29 | struct omap_ocp2scp_dev **devices; | ||
| 30 | }; | ||
| 31 | #endif /* __DRIVERS_OMAP_OCP2SCP_H */ | ||
diff --git a/include/linux/platform_data/usb-omap.h b/include/linux/platform_data/usb-omap.h new file mode 100644 index 000000000000..8570bcfe6311 --- /dev/null +++ b/include/linux/platform_data/usb-omap.h | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | /* | ||
| 2 | * usb-omap.h - Platform data for the various OMAP USB IPs | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com | ||
| 5 | * | ||
| 6 | * This software is distributed under the terms of the GNU General Public | ||
| 7 | * License ("GPL") version 2, as published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| 10 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 11 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 12 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
| 13 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| 14 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| 15 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
| 16 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
| 17 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 18 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| 19 | * POSSIBILITY OF SUCH DAMAGE. | ||
| 20 | */ | ||
| 21 | |||
| 22 | #define OMAP3_HS_USB_PORTS 3 | ||
| 23 | |||
| 24 | enum usbhs_omap_port_mode { | ||
| 25 | OMAP_USBHS_PORT_MODE_UNUSED, | ||
| 26 | OMAP_EHCI_PORT_MODE_PHY, | ||
| 27 | OMAP_EHCI_PORT_MODE_TLL, | ||
| 28 | OMAP_EHCI_PORT_MODE_HSIC, | ||
| 29 | OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0, | ||
| 30 | OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM, | ||
| 31 | OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0, | ||
| 32 | OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM, | ||
| 33 | OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0, | ||
| 34 | OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM, | ||
| 35 | OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0, | ||
| 36 | OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM, | ||
| 37 | OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0, | ||
| 38 | OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM | ||
| 39 | }; | ||
| 40 | |||
| 41 | struct usbtll_omap_platform_data { | ||
| 42 | enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; | ||
| 43 | }; | ||
| 44 | |||
| 45 | struct ehci_hcd_omap_platform_data { | ||
| 46 | enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; | ||
| 47 | int reset_gpio_port[OMAP3_HS_USB_PORTS]; | ||
| 48 | struct regulator *regulator[OMAP3_HS_USB_PORTS]; | ||
| 49 | unsigned phy_reset:1; | ||
| 50 | }; | ||
| 51 | |||
| 52 | struct ohci_hcd_omap_platform_data { | ||
| 53 | enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; | ||
| 54 | unsigned es2_compatibility:1; | ||
| 55 | }; | ||
| 56 | |||
| 57 | struct usbhs_omap_platform_data { | ||
| 58 | enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; | ||
| 59 | |||
| 60 | struct ehci_hcd_omap_platform_data *ehci_data; | ||
| 61 | struct ohci_hcd_omap_platform_data *ohci_data; | ||
| 62 | }; | ||
| 63 | |||
| 64 | /*-------------------------------------------------------------------------*/ | ||
| 65 | |||
| 66 | struct omap_musb_board_data { | ||
| 67 | u8 interface_type; | ||
| 68 | u8 mode; | ||
| 69 | u16 power; | ||
| 70 | unsigned extvbus:1; | ||
| 71 | void (*set_phy_power)(u8 on); | ||
| 72 | void (*clear_irq)(void); | ||
| 73 | void (*set_mode)(u8 mode); | ||
| 74 | void (*reset)(void); | ||
| 75 | }; | ||
| 76 | |||
| 77 | enum musb_interface { | ||
| 78 | MUSB_INTERFACE_ULPI, | ||
| 79 | MUSB_INTERFACE_UTMI | ||
| 80 | }; | ||
diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h index f2dc6d8fc680..38a993508327 100644 --- a/include/linux/ptp_clock_kernel.h +++ b/include/linux/ptp_clock_kernel.h | |||
| @@ -54,7 +54,8 @@ struct ptp_clock_request { | |||
| 54 | * clock operations | 54 | * clock operations |
| 55 | * | 55 | * |
| 56 | * @adjfreq: Adjusts the frequency of the hardware clock. | 56 | * @adjfreq: Adjusts the frequency of the hardware clock. |
| 57 | * parameter delta: Desired period change in parts per billion. | 57 | * parameter delta: Desired frequency offset from nominal frequency |
| 58 | * in parts per billion | ||
| 58 | * | 59 | * |
| 59 | * @adjtime: Shifts the time of the hardware clock. | 60 | * @adjtime: Shifts the time of the hardware clock. |
| 60 | * parameter delta: Desired change in nanoseconds. | 61 | * parameter delta: Desired change in nanoseconds. |
diff --git a/include/linux/raid/Kbuild b/include/linux/raid/Kbuild index 2415a64c5e51..e69de29bb2d1 100644 --- a/include/linux/raid/Kbuild +++ b/include/linux/raid/Kbuild | |||
| @@ -1,2 +0,0 @@ | |||
| 1 | header-y += md_p.h | ||
| 2 | header-y += md_u.h | ||
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h deleted file mode 100644 index ee753536ab70..000000000000 --- a/include/linux/raid/md_p.h +++ /dev/null | |||
| @@ -1,301 +0,0 @@ | |||
| 1 | /* | ||
| 2 | md_p.h : physical layout of Linux RAID devices | ||
| 3 | Copyright (C) 1996-98 Ingo Molnar, Gadi Oxman | ||
| 4 | |||
| 5 | This program is free software; you can redistribute it and/or modify | ||
| 6 | it under the terms of the GNU General Public License as published by | ||
| 7 | the Free Software Foundation; either version 2, or (at your option) | ||
| 8 | any later version. | ||
| 9 | |||
| 10 | You should have received a copy of the GNU General Public License | ||
| 11 | (for example /usr/src/linux/COPYING); if not, write to the Free | ||
| 12 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef _MD_P_H | ||
| 16 | #define _MD_P_H | ||
| 17 | |||
| 18 | #include <linux/types.h> | ||
| 19 | |||
| 20 | /* | ||
| 21 | * RAID superblock. | ||
| 22 | * | ||
| 23 | * The RAID superblock maintains some statistics on each RAID configuration. | ||
| 24 | * Each real device in the RAID set contains it near the end of the device. | ||
| 25 | * Some of the ideas are copied from the ext2fs implementation. | ||
| 26 | * | ||
| 27 | * We currently use 4096 bytes as follows: | ||
| 28 | * | ||
| 29 | * word offset function | ||
| 30 | * | ||
| 31 | * 0 - 31 Constant generic RAID device information. | ||
| 32 | * 32 - 63 Generic state information. | ||
| 33 | * 64 - 127 Personality specific information. | ||
| 34 | * 128 - 511 12 32-words descriptors of the disks in the raid set. | ||
| 35 | * 512 - 911 Reserved. | ||
| 36 | * 912 - 1023 Disk specific descriptor. | ||
| 37 | */ | ||
| 38 | |||
| 39 | /* | ||
| 40 | * If x is the real device size in bytes, we return an apparent size of: | ||
| 41 | * | ||
| 42 | * y = (x & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES | ||
| 43 | * | ||
| 44 | * and place the 4kB superblock at offset y. | ||
| 45 | */ | ||
| 46 | #define MD_RESERVED_BYTES (64 * 1024) | ||
| 47 | #define MD_RESERVED_SECTORS (MD_RESERVED_BYTES / 512) | ||
| 48 | |||
| 49 | #define MD_NEW_SIZE_SECTORS(x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS) | ||
| 50 | |||
| 51 | #define MD_SB_BYTES 4096 | ||
| 52 | #define MD_SB_WORDS (MD_SB_BYTES / 4) | ||
| 53 | #define MD_SB_SECTORS (MD_SB_BYTES / 512) | ||
| 54 | |||
| 55 | /* | ||
| 56 | * The following are counted in 32-bit words | ||
| 57 | */ | ||
| 58 | #define MD_SB_GENERIC_OFFSET 0 | ||
| 59 | #define MD_SB_PERSONALITY_OFFSET 64 | ||
| 60 | #define MD_SB_DISKS_OFFSET 128 | ||
| 61 | #define MD_SB_DESCRIPTOR_OFFSET 992 | ||
| 62 | |||
| 63 | #define MD_SB_GENERIC_CONSTANT_WORDS 32 | ||
| 64 | #define MD_SB_GENERIC_STATE_WORDS 32 | ||
| 65 | #define MD_SB_GENERIC_WORDS (MD_SB_GENERIC_CONSTANT_WORDS + MD_SB_GENERIC_STATE_WORDS) | ||
| 66 | #define MD_SB_PERSONALITY_WORDS 64 | ||
| 67 | #define MD_SB_DESCRIPTOR_WORDS 32 | ||
| 68 | #define MD_SB_DISKS 27 | ||
| 69 | #define MD_SB_DISKS_WORDS (MD_SB_DISKS*MD_SB_DESCRIPTOR_WORDS) | ||
| 70 | #define MD_SB_RESERVED_WORDS (1024 - MD_SB_GENERIC_WORDS - MD_SB_PERSONALITY_WORDS - MD_SB_DISKS_WORDS - MD_SB_DESCRIPTOR_WORDS) | ||
| 71 | #define MD_SB_EQUAL_WORDS (MD_SB_GENERIC_WORDS + MD_SB_PERSONALITY_WORDS + MD_SB_DISKS_WORDS) | ||
| 72 | |||
| 73 | /* | ||
| 74 | * Device "operational" state bits | ||
| 75 | */ | ||
| 76 | #define MD_DISK_FAULTY 0 /* disk is faulty / operational */ | ||
| 77 | #define MD_DISK_ACTIVE 1 /* disk is running or spare disk */ | ||
| 78 | #define MD_DISK_SYNC 2 /* disk is in sync with the raid set */ | ||
| 79 | #define MD_DISK_REMOVED 3 /* disk is in sync with the raid set */ | ||
| 80 | |||
| 81 | #define MD_DISK_WRITEMOSTLY 9 /* disk is "write-mostly" is RAID1 config. | ||
| 82 | * read requests will only be sent here in | ||
| 83 | * dire need | ||
| 84 | */ | ||
| 85 | |||
| 86 | typedef struct mdp_device_descriptor_s { | ||
| 87 | __u32 number; /* 0 Device number in the entire set */ | ||
| 88 | __u32 major; /* 1 Device major number */ | ||
| 89 | __u32 minor; /* 2 Device minor number */ | ||
| 90 | __u32 raid_disk; /* 3 The role of the device in the raid set */ | ||
| 91 | __u32 state; /* 4 Operational state */ | ||
| 92 | __u32 reserved[MD_SB_DESCRIPTOR_WORDS - 5]; | ||
| 93 | } mdp_disk_t; | ||
| 94 | |||
| 95 | #define MD_SB_MAGIC 0xa92b4efc | ||
| 96 | |||
| 97 | /* | ||
| 98 | * Superblock state bits | ||
| 99 | */ | ||
| 100 | #define MD_SB_CLEAN 0 | ||
| 101 | #define MD_SB_ERRORS 1 | ||
| 102 | |||
| 103 | #define MD_SB_BITMAP_PRESENT 8 /* bitmap may be present nearby */ | ||
| 104 | |||
| 105 | /* | ||
| 106 | * Notes: | ||
| 107 | * - if an array is being reshaped (restriped) in order to change the | ||
| 108 | * the number of active devices in the array, 'raid_disks' will be | ||
| 109 | * the larger of the old and new numbers. 'delta_disks' will | ||
| 110 | * be the "new - old". So if +ve, raid_disks is the new value, and | ||
| 111 | * "raid_disks-delta_disks" is the old. If -ve, raid_disks is the | ||
| 112 | * old value and "raid_disks+delta_disks" is the new (smaller) value. | ||
| 113 | */ | ||
| 114 | |||
| 115 | |||
| 116 | typedef struct mdp_superblock_s { | ||
| 117 | /* | ||
| 118 | * Constant generic information | ||
| 119 | */ | ||
| 120 | __u32 md_magic; /* 0 MD identifier */ | ||
| 121 | __u32 major_version; /* 1 major version to which the set conforms */ | ||
| 122 | __u32 minor_version; /* 2 minor version ... */ | ||
| 123 | __u32 patch_version; /* 3 patchlevel version ... */ | ||
| 124 | __u32 gvalid_words; /* 4 Number of used words in this section */ | ||
| 125 | __u32 set_uuid0; /* 5 Raid set identifier */ | ||
| 126 | __u32 ctime; /* 6 Creation time */ | ||
| 127 | __u32 level; /* 7 Raid personality */ | ||
| 128 | __u32 size; /* 8 Apparent size of each individual disk */ | ||
| 129 | __u32 nr_disks; /* 9 total disks in the raid set */ | ||
| 130 | __u32 raid_disks; /* 10 disks in a fully functional raid set */ | ||
| 131 | __u32 md_minor; /* 11 preferred MD minor device number */ | ||
| 132 | __u32 not_persistent; /* 12 does it have a persistent superblock */ | ||
| 133 | __u32 set_uuid1; /* 13 Raid set identifier #2 */ | ||
| 134 | __u32 set_uuid2; /* 14 Raid set identifier #3 */ | ||
| 135 | __u32 set_uuid3; /* 15 Raid set identifier #4 */ | ||
| 136 | __u32 gstate_creserved[MD_SB_GENERIC_CONSTANT_WORDS - 16]; | ||
| 137 | |||
| 138 | /* | ||
| 139 | * Generic state information | ||
| 140 | */ | ||
| 141 | __u32 utime; /* 0 Superblock update time */ | ||
| 142 | __u32 state; /* 1 State bits (clean, ...) */ | ||
| 143 | __u32 active_disks; /* 2 Number of currently active disks */ | ||
| 144 | __u32 working_disks; /* 3 Number of working disks */ | ||
| 145 | __u32 failed_disks; /* 4 Number of failed disks */ | ||
| 146 | __u32 spare_disks; /* 5 Number of spare disks */ | ||
| 147 | __u32 sb_csum; /* 6 checksum of the whole superblock */ | ||
| 148 | #ifdef __BIG_ENDIAN | ||
| 149 | __u32 events_hi; /* 7 high-order of superblock update count */ | ||
| 150 | __u32 events_lo; /* 8 low-order of superblock update count */ | ||
| 151 | __u32 cp_events_hi; /* 9 high-order of checkpoint update count */ | ||
| 152 | __u32 cp_events_lo; /* 10 low-order of checkpoint update count */ | ||
| 153 | #else | ||
| 154 | __u32 events_lo; /* 7 low-order of superblock update count */ | ||
| 155 | __u32 events_hi; /* 8 high-order of superblock update count */ | ||
| 156 | __u32 cp_events_lo; /* 9 low-order of checkpoint update count */ | ||
| 157 | __u32 cp_events_hi; /* 10 high-order of checkpoint update count */ | ||
| 158 | #endif | ||
| 159 | __u32 recovery_cp; /* 11 recovery checkpoint sector count */ | ||
| 160 | /* There are only valid for minor_version > 90 */ | ||
| 161 | __u64 reshape_position; /* 12,13 next address in array-space for reshape */ | ||
| 162 | __u32 new_level; /* 14 new level we are reshaping to */ | ||
| 163 | __u32 delta_disks; /* 15 change in number of raid_disks */ | ||
| 164 | __u32 new_layout; /* 16 new layout */ | ||
| 165 | __u32 new_chunk; /* 17 new chunk size (bytes) */ | ||
| 166 | __u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS - 18]; | ||
| 167 | |||
| 168 | /* | ||
| 169 | * Personality information | ||
| 170 | */ | ||
| 171 | __u32 layout; /* 0 the array's physical layout */ | ||
| 172 | __u32 chunk_size; /* 1 chunk size in bytes */ | ||
| 173 | __u32 root_pv; /* 2 LV root PV */ | ||
| 174 | __u32 root_block; /* 3 LV root block */ | ||
| 175 | __u32 pstate_reserved[MD_SB_PERSONALITY_WORDS - 4]; | ||
| 176 | |||
| 177 | /* | ||
| 178 | * Disks information | ||
| 179 | */ | ||
| 180 | mdp_disk_t disks[MD_SB_DISKS]; | ||
| 181 | |||
| 182 | /* | ||
| 183 | * Reserved | ||
| 184 | */ | ||
| 185 | __u32 reserved[MD_SB_RESERVED_WORDS]; | ||
| 186 | |||
| 187 | /* | ||
| 188 | * Active descriptor | ||
| 189 | */ | ||
| 190 | mdp_disk_t this_disk; | ||
| 191 | |||
| 192 | } mdp_super_t; | ||
| 193 | |||
| 194 | static inline __u64 md_event(mdp_super_t *sb) { | ||
| 195 | __u64 ev = sb->events_hi; | ||
| 196 | return (ev<<32)| sb->events_lo; | ||
| 197 | } | ||
| 198 | |||
| 199 | #define MD_SUPERBLOCK_1_TIME_SEC_MASK ((1ULL<<40) - 1) | ||
| 200 | |||
| 201 | /* | ||
| 202 | * The version-1 superblock : | ||
| 203 | * All numeric fields are little-endian. | ||
| 204 | * | ||
| 205 | * total size: 256 bytes plus 2 per device. | ||
| 206 | * 1K allows 384 devices. | ||
| 207 | */ | ||
| 208 | struct mdp_superblock_1 { | ||
| 209 | /* constant array information - 128 bytes */ | ||
| 210 | __le32 magic; /* MD_SB_MAGIC: 0xa92b4efc - little endian */ | ||
| 211 | __le32 major_version; /* 1 */ | ||
| 212 | __le32 feature_map; /* bit 0 set if 'bitmap_offset' is meaningful */ | ||
| 213 | __le32 pad0; /* always set to 0 when writing */ | ||
| 214 | |||
| 215 | __u8 set_uuid[16]; /* user-space generated. */ | ||
| 216 | char set_name[32]; /* set and interpreted by user-space */ | ||
| 217 | |||
| 218 | __le64 ctime; /* lo 40 bits are seconds, top 24 are microseconds or 0*/ | ||
| 219 | __le32 level; /* -4 (multipath), -1 (linear), 0,1,4,5 */ | ||
| 220 | __le32 layout; /* only for raid5 and raid10 currently */ | ||
| 221 | __le64 size; /* used size of component devices, in 512byte sectors */ | ||
| 222 | |||
| 223 | __le32 chunksize; /* in 512byte sectors */ | ||
| 224 | __le32 raid_disks; | ||
| 225 | __le32 bitmap_offset; /* sectors after start of superblock that bitmap starts | ||
| 226 | * NOTE: signed, so bitmap can be before superblock | ||
| 227 | * only meaningful of feature_map[0] is set. | ||
| 228 | */ | ||
| 229 | |||
| 230 | /* These are only valid with feature bit '4' */ | ||
| 231 | __le32 new_level; /* new level we are reshaping to */ | ||
| 232 | __le64 reshape_position; /* next address in array-space for reshape */ | ||
| 233 | __le32 delta_disks; /* change in number of raid_disks */ | ||
| 234 | __le32 new_layout; /* new layout */ | ||
| 235 | __le32 new_chunk; /* new chunk size (512byte sectors) */ | ||
| 236 | __le32 new_offset; /* signed number to add to data_offset in new | ||
| 237 | * layout. 0 == no-change. This can be | ||
| 238 | * different on each device in the array. | ||
| 239 | */ | ||
| 240 | |||
| 241 | /* constant this-device information - 64 bytes */ | ||
| 242 | __le64 data_offset; /* sector start of data, often 0 */ | ||
| 243 | __le64 data_size; /* sectors in this device that can be used for data */ | ||
| 244 | __le64 super_offset; /* sector start of this superblock */ | ||
| 245 | __le64 recovery_offset;/* sectors before this offset (from data_offset) have been recovered */ | ||
| 246 | __le32 dev_number; /* permanent identifier of this device - not role in raid */ | ||
| 247 | __le32 cnt_corrected_read; /* number of read errors that were corrected by re-writing */ | ||
| 248 | __u8 device_uuid[16]; /* user-space setable, ignored by kernel */ | ||
| 249 | __u8 devflags; /* per-device flags. Only one defined...*/ | ||
| 250 | #define WriteMostly1 1 /* mask for writemostly flag in above */ | ||
| 251 | /* Bad block log. If there are any bad blocks the feature flag is set. | ||
| 252 | * If offset and size are non-zero, that space is reserved and available | ||
| 253 | */ | ||
| 254 | __u8 bblog_shift; /* shift from sectors to block size */ | ||
| 255 | __le16 bblog_size; /* number of sectors reserved for list */ | ||
| 256 | __le32 bblog_offset; /* sector offset from superblock to bblog, | ||
| 257 | * signed - not unsigned */ | ||
| 258 | |||
| 259 | /* array state information - 64 bytes */ | ||
| 260 | __le64 utime; /* 40 bits second, 24 bits microseconds */ | ||
| 261 | __le64 events; /* incremented when superblock updated */ | ||
| 262 | __le64 resync_offset; /* data before this offset (from data_offset) known to be in sync */ | ||
| 263 | __le32 sb_csum; /* checksum up to devs[max_dev] */ | ||
| 264 | __le32 max_dev; /* size of devs[] array to consider */ | ||
| 265 | __u8 pad3[64-32]; /* set to 0 when writing */ | ||
| 266 | |||
| 267 | /* device state information. Indexed by dev_number. | ||
| 268 | * 2 bytes per device | ||
| 269 | * Note there are no per-device state flags. State information is rolled | ||
| 270 | * into the 'roles' value. If a device is spare or faulty, then it doesn't | ||
| 271 | * have a meaningful role. | ||
| 272 | */ | ||
| 273 | __le16 dev_roles[0]; /* role in array, or 0xffff for a spare, or 0xfffe for faulty */ | ||
| 274 | }; | ||
| 275 | |||
| 276 | /* feature_map bits */ | ||
| 277 | #define MD_FEATURE_BITMAP_OFFSET 1 | ||
| 278 | #define MD_FEATURE_RECOVERY_OFFSET 2 /* recovery_offset is present and | ||
| 279 | * must be honoured | ||
| 280 | */ | ||
| 281 | #define MD_FEATURE_RESHAPE_ACTIVE 4 | ||
| 282 | #define MD_FEATURE_BAD_BLOCKS 8 /* badblock list is not empty */ | ||
| 283 | #define MD_FEATURE_REPLACEMENT 16 /* This device is replacing an | ||
| 284 | * active device with same 'role'. | ||
| 285 | * 'recovery_offset' is also set. | ||
| 286 | */ | ||
| 287 | #define MD_FEATURE_RESHAPE_BACKWARDS 32 /* Reshape doesn't change number | ||
| 288 | * of devices, but is going | ||
| 289 | * backwards anyway. | ||
| 290 | */ | ||
| 291 | #define MD_FEATURE_NEW_OFFSET 64 /* new_offset must be honoured */ | ||
| 292 | #define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \ | ||
| 293 | |MD_FEATURE_RECOVERY_OFFSET \ | ||
| 294 | |MD_FEATURE_RESHAPE_ACTIVE \ | ||
| 295 | |MD_FEATURE_BAD_BLOCKS \ | ||
| 296 | |MD_FEATURE_REPLACEMENT \ | ||
| 297 | |MD_FEATURE_RESHAPE_BACKWARDS \ | ||
| 298 | |MD_FEATURE_NEW_OFFSET \ | ||
| 299 | ) | ||
| 300 | |||
| 301 | #endif | ||
diff --git a/include/linux/raid/md_u.h b/include/linux/raid/md_u.h index fb1abb3367e9..358c04bfbe2a 100644 --- a/include/linux/raid/md_u.h +++ b/include/linux/raid/md_u.h | |||
| @@ -11,149 +11,10 @@ | |||
| 11 | (for example /usr/src/linux/COPYING); if not, write to the Free | 11 | (for example /usr/src/linux/COPYING); if not, write to the Free |
| 12 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 12 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 13 | */ | 13 | */ |
| 14 | |||
| 15 | #ifndef _MD_U_H | 14 | #ifndef _MD_U_H |
| 16 | #define _MD_U_H | 15 | #define _MD_U_H |
| 17 | 16 | ||
| 18 | /* | 17 | #include <uapi/linux/raid/md_u.h> |
| 19 | * Different major versions are not compatible. | ||
| 20 | * Different minor versions are only downward compatible. | ||
| 21 | * Different patchlevel versions are downward and upward compatible. | ||
| 22 | */ | ||
| 23 | #define MD_MAJOR_VERSION 0 | ||
| 24 | #define MD_MINOR_VERSION 90 | ||
| 25 | /* | ||
| 26 | * MD_PATCHLEVEL_VERSION indicates kernel functionality. | ||
| 27 | * >=1 means different superblock formats are selectable using SET_ARRAY_INFO | ||
| 28 | * and major_version/minor_version accordingly | ||
| 29 | * >=2 means that Internal bitmaps are supported by setting MD_SB_BITMAP_PRESENT | ||
| 30 | * in the super status byte | ||
| 31 | * >=3 means that bitmap superblock version 4 is supported, which uses | ||
| 32 | * little-ending representation rather than host-endian | ||
| 33 | */ | ||
| 34 | #define MD_PATCHLEVEL_VERSION 3 | ||
| 35 | |||
| 36 | /* ioctls */ | ||
| 37 | |||
| 38 | /* status */ | ||
| 39 | #define RAID_VERSION _IOR (MD_MAJOR, 0x10, mdu_version_t) | ||
| 40 | #define GET_ARRAY_INFO _IOR (MD_MAJOR, 0x11, mdu_array_info_t) | ||
| 41 | #define GET_DISK_INFO _IOR (MD_MAJOR, 0x12, mdu_disk_info_t) | ||
| 42 | #define PRINT_RAID_DEBUG _IO (MD_MAJOR, 0x13) | ||
| 43 | #define RAID_AUTORUN _IO (MD_MAJOR, 0x14) | ||
| 44 | #define GET_BITMAP_FILE _IOR (MD_MAJOR, 0x15, mdu_bitmap_file_t) | ||
| 45 | |||
| 46 | /* configuration */ | ||
| 47 | #define CLEAR_ARRAY _IO (MD_MAJOR, 0x20) | ||
| 48 | #define ADD_NEW_DISK _IOW (MD_MAJOR, 0x21, mdu_disk_info_t) | ||
| 49 | #define HOT_REMOVE_DISK _IO (MD_MAJOR, 0x22) | ||
| 50 | #define SET_ARRAY_INFO _IOW (MD_MAJOR, 0x23, mdu_array_info_t) | ||
| 51 | #define SET_DISK_INFO _IO (MD_MAJOR, 0x24) | ||
| 52 | #define WRITE_RAID_INFO _IO (MD_MAJOR, 0x25) | ||
| 53 | #define UNPROTECT_ARRAY _IO (MD_MAJOR, 0x26) | ||
| 54 | #define PROTECT_ARRAY _IO (MD_MAJOR, 0x27) | ||
| 55 | #define HOT_ADD_DISK _IO (MD_MAJOR, 0x28) | ||
| 56 | #define SET_DISK_FAULTY _IO (MD_MAJOR, 0x29) | ||
| 57 | #define HOT_GENERATE_ERROR _IO (MD_MAJOR, 0x2a) | ||
| 58 | #define SET_BITMAP_FILE _IOW (MD_MAJOR, 0x2b, int) | ||
| 59 | 18 | ||
| 60 | /* usage */ | ||
| 61 | #define RUN_ARRAY _IOW (MD_MAJOR, 0x30, mdu_param_t) | ||
| 62 | /* 0x31 was START_ARRAY */ | ||
| 63 | #define STOP_ARRAY _IO (MD_MAJOR, 0x32) | ||
| 64 | #define STOP_ARRAY_RO _IO (MD_MAJOR, 0x33) | ||
| 65 | #define RESTART_ARRAY_RW _IO (MD_MAJOR, 0x34) | ||
| 66 | |||
| 67 | /* 63 partitions with the alternate major number (mdp) */ | ||
| 68 | #define MdpMinorShift 6 | ||
| 69 | #ifdef __KERNEL__ | ||
| 70 | extern int mdp_major; | 19 | extern int mdp_major; |
| 71 | #endif | ||
| 72 | |||
| 73 | typedef struct mdu_version_s { | ||
| 74 | int major; | ||
| 75 | int minor; | ||
| 76 | int patchlevel; | ||
| 77 | } mdu_version_t; | ||
| 78 | |||
| 79 | typedef struct mdu_array_info_s { | ||
| 80 | /* | ||
| 81 | * Generic constant information | ||
| 82 | */ | ||
| 83 | int major_version; | ||
| 84 | int minor_version; | ||
| 85 | int patch_version; | ||
| 86 | int ctime; | ||
| 87 | int level; | ||
| 88 | int size; | ||
| 89 | int nr_disks; | ||
| 90 | int raid_disks; | ||
| 91 | int md_minor; | ||
| 92 | int not_persistent; | ||
| 93 | |||
| 94 | /* | ||
| 95 | * Generic state information | ||
| 96 | */ | ||
| 97 | int utime; /* 0 Superblock update time */ | ||
| 98 | int state; /* 1 State bits (clean, ...) */ | ||
| 99 | int active_disks; /* 2 Number of currently active disks */ | ||
| 100 | int working_disks; /* 3 Number of working disks */ | ||
| 101 | int failed_disks; /* 4 Number of failed disks */ | ||
| 102 | int spare_disks; /* 5 Number of spare disks */ | ||
| 103 | |||
| 104 | /* | ||
| 105 | * Personality information | ||
| 106 | */ | ||
| 107 | int layout; /* 0 the array's physical layout */ | ||
| 108 | int chunk_size; /* 1 chunk size in bytes */ | ||
| 109 | |||
| 110 | } mdu_array_info_t; | ||
| 111 | |||
| 112 | /* non-obvious values for 'level' */ | ||
| 113 | #define LEVEL_MULTIPATH (-4) | ||
| 114 | #define LEVEL_LINEAR (-1) | ||
| 115 | #define LEVEL_FAULTY (-5) | ||
| 116 | |||
| 117 | /* we need a value for 'no level specified' and 0 | ||
| 118 | * means 'raid0', so we need something else. This is | ||
| 119 | * for internal use only | ||
| 120 | */ | ||
| 121 | #define LEVEL_NONE (-1000000) | ||
| 122 | |||
| 123 | typedef struct mdu_disk_info_s { | ||
| 124 | /* | ||
| 125 | * configuration/status of one particular disk | ||
| 126 | */ | ||
| 127 | int number; | ||
| 128 | int major; | ||
| 129 | int minor; | ||
| 130 | int raid_disk; | ||
| 131 | int state; | ||
| 132 | |||
| 133 | } mdu_disk_info_t; | ||
| 134 | |||
| 135 | typedef struct mdu_start_info_s { | ||
| 136 | /* | ||
| 137 | * configuration/status of one particular disk | ||
| 138 | */ | ||
| 139 | int major; | ||
| 140 | int minor; | ||
| 141 | int raid_disk; | ||
| 142 | int state; | ||
| 143 | |||
| 144 | } mdu_start_info_t; | ||
| 145 | |||
| 146 | typedef struct mdu_bitmap_file_s | ||
| 147 | { | ||
| 148 | char pathname[4096]; | ||
| 149 | } mdu_bitmap_file_t; | ||
| 150 | |||
| 151 | typedef struct mdu_param_s | ||
| 152 | { | ||
| 153 | int personality; /* 1,2,3,4 */ | ||
| 154 | int chunk_size; /* in bytes */ | ||
| 155 | int max_fault; /* unused for now */ | ||
| 156 | } mdu_param_t; | ||
| 157 | |||
| 158 | #endif | 20 | #endif |
| 159 | |||
diff --git a/include/linux/rbtree_augmented.h b/include/linux/rbtree_augmented.h index 214caa33433b..2ac60c9cf644 100644 --- a/include/linux/rbtree_augmented.h +++ b/include/linux/rbtree_augmented.h | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #ifndef _LINUX_RBTREE_AUGMENTED_H | 24 | #ifndef _LINUX_RBTREE_AUGMENTED_H |
| 25 | #define _LINUX_RBTREE_AUGMENTED_H | 25 | #define _LINUX_RBTREE_AUGMENTED_H |
| 26 | 26 | ||
| 27 | #include <linux/compiler.h> | ||
| 27 | #include <linux/rbtree.h> | 28 | #include <linux/rbtree.h> |
| 28 | 29 | ||
| 29 | /* | 30 | /* |
diff --git a/include/linux/rio.h b/include/linux/rio.h index 4187da511006..a3e784278667 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h | |||
| @@ -275,9 +275,11 @@ struct rio_id_table { | |||
| 275 | * struct rio_net - RIO network info | 275 | * struct rio_net - RIO network info |
| 276 | * @node: Node in global list of RIO networks | 276 | * @node: Node in global list of RIO networks |
| 277 | * @devices: List of devices in this network | 277 | * @devices: List of devices in this network |
| 278 | * @switches: List of switches in this netowrk | ||
| 278 | * @mports: List of master ports accessing this network | 279 | * @mports: List of master ports accessing this network |
| 279 | * @hport: Default port for accessing this network | 280 | * @hport: Default port for accessing this network |
| 280 | * @id: RIO network ID | 281 | * @id: RIO network ID |
| 282 | * @destid_table: destID allocation table | ||
| 281 | */ | 283 | */ |
| 282 | struct rio_net { | 284 | struct rio_net { |
| 283 | struct list_head node; /* node in list of networks */ | 285 | struct list_head node; /* node in list of networks */ |
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index c64de9dd7631..2f694f3846a9 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h | |||
| @@ -46,8 +46,9 @@ struct ads7846_platform_data { | |||
| 46 | u16 debounce_rep; /* additional consecutive good readings | 46 | u16 debounce_rep; /* additional consecutive good readings |
| 47 | * required after the first two */ | 47 | * required after the first two */ |
| 48 | int gpio_pendown; /* the GPIO used to decide the pendown | 48 | int gpio_pendown; /* the GPIO used to decide the pendown |
| 49 | * state if get_pendown_state == NULL | 49 | * state if get_pendown_state == NULL */ |
| 50 | */ | 50 | int gpio_pendown_debounce; /* platform specific debounce time for |
| 51 | * the gpio_pendown */ | ||
| 51 | int (*get_pendown_state)(void); | 52 | int (*get_pendown_state)(void); |
| 52 | int (*filter_init) (const struct ads7846_platform_data *pdata, | 53 | int (*filter_init) (const struct ads7846_platform_data *pdata, |
| 53 | void **filter_data); | 54 | void **filter_data); |
diff --git a/include/linux/spi/tsc2005.h b/include/linux/spi/tsc2005.h index d9b0c84220c7..8f721e465e05 100644 --- a/include/linux/spi/tsc2005.h +++ b/include/linux/spi/tsc2005.h | |||
| @@ -3,8 +3,6 @@ | |||
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2009-2010 Nokia Corporation | 4 | * Copyright (C) 2009-2010 Nokia Corporation |
| 5 | * | 5 | * |
| 6 | * Contact: Aaro Koskinen <aaro.koskinen@nokia.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or | 8 | * the Free Software Foundation; either version 2 of the License, or |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 8a7fc4be2d75..60b7aac15e0e 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
| @@ -191,7 +191,8 @@ struct tcp_sock { | |||
| 191 | u8 do_early_retrans:1,/* Enable RFC5827 early-retransmit */ | 191 | u8 do_early_retrans:1,/* Enable RFC5827 early-retransmit */ |
| 192 | early_retrans_delayed:1, /* Delayed ER timer installed */ | 192 | early_retrans_delayed:1, /* Delayed ER timer installed */ |
| 193 | syn_data:1, /* SYN includes data */ | 193 | syn_data:1, /* SYN includes data */ |
| 194 | syn_fastopen:1; /* SYN includes Fast Open option */ | 194 | syn_fastopen:1, /* SYN includes Fast Open option */ |
| 195 | syn_data_acked:1;/* data in SYN is acked by SYN-ACK */ | ||
| 195 | 196 | ||
| 196 | /* RTT measurement */ | 197 | /* RTT measurement */ |
| 197 | u32 srtt; /* smoothed round trip time << 3 */ | 198 | u32 srtt; /* smoothed round trip time << 3 */ |
diff --git a/include/linux/tegra-ahb.h b/include/linux/tegra-ahb.h new file mode 100644 index 000000000000..f1cd075ceee1 --- /dev/null +++ b/include/linux/tegra-ahb.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms and conditions of the GNU General Public License, | ||
| 6 | * version 2, as published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 11 | * more details. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef __LINUX_AHB_H__ | ||
| 15 | #define __LINUX_AHB_H__ | ||
| 16 | |||
| 17 | extern int tegra_ahb_enable_smmu(struct device_node *ahb); | ||
| 18 | |||
| 19 | #endif /* __LINUX_AHB_H__ */ | ||
diff --git a/include/linux/tty.h b/include/linux/tty.h index f0b4eb47297c..d7ff88fb8967 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -188,7 +188,9 @@ struct tty_port_operations { | |||
| 188 | }; | 188 | }; |
| 189 | 189 | ||
| 190 | struct tty_port { | 190 | struct tty_port { |
| 191 | struct tty_bufhead buf; /* Locked internally */ | ||
| 191 | struct tty_struct *tty; /* Back pointer */ | 192 | struct tty_struct *tty; /* Back pointer */ |
| 193 | struct tty_struct *itty; /* internal back ptr */ | ||
| 192 | const struct tty_port_operations *ops; /* Port operations */ | 194 | const struct tty_port_operations *ops; /* Port operations */ |
| 193 | spinlock_t lock; /* Lock protecting tty field */ | 195 | spinlock_t lock; /* Lock protecting tty field */ |
| 194 | int blocked_open; /* Waiting to open */ | 196 | int blocked_open; /* Waiting to open */ |
| @@ -197,6 +199,9 @@ struct tty_port { | |||
| 197 | wait_queue_head_t close_wait; /* Close waiters */ | 199 | wait_queue_head_t close_wait; /* Close waiters */ |
| 198 | wait_queue_head_t delta_msr_wait; /* Modem status change */ | 200 | wait_queue_head_t delta_msr_wait; /* Modem status change */ |
| 199 | unsigned long flags; /* TTY flags ASY_*/ | 201 | unsigned long flags; /* TTY flags ASY_*/ |
| 202 | unsigned long iflags; /* TTYP_ internal flags */ | ||
| 203 | #define TTYP_FLUSHING 1 /* Flushing to ldisc in progress */ | ||
| 204 | #define TTYP_FLUSHPENDING 2 /* Queued buffer flush pending */ | ||
| 200 | unsigned char console:1; /* port is a console */ | 205 | unsigned char console:1; /* port is a console */ |
| 201 | struct mutex mutex; /* Locking */ | 206 | struct mutex mutex; /* Locking */ |
| 202 | struct mutex buf_mutex; /* Buffer alloc lock */ | 207 | struct mutex buf_mutex; /* Buffer alloc lock */ |
| @@ -235,6 +240,7 @@ struct tty_struct { | |||
| 235 | struct mutex ldisc_mutex; | 240 | struct mutex ldisc_mutex; |
| 236 | struct tty_ldisc *ldisc; | 241 | struct tty_ldisc *ldisc; |
| 237 | 242 | ||
| 243 | struct mutex atomic_write_lock; | ||
| 238 | struct mutex legacy_mutex; | 244 | struct mutex legacy_mutex; |
| 239 | struct mutex termios_mutex; | 245 | struct mutex termios_mutex; |
| 240 | spinlock_t ctrl_lock; | 246 | spinlock_t ctrl_lock; |
| @@ -254,7 +260,6 @@ struct tty_struct { | |||
| 254 | 260 | ||
| 255 | struct tty_struct *link; | 261 | struct tty_struct *link; |
| 256 | struct fasync_struct *fasync; | 262 | struct fasync_struct *fasync; |
| 257 | struct tty_bufhead buf; /* Locked internally */ | ||
| 258 | int alt_speed; /* For magic substitution of 38400 bps */ | 263 | int alt_speed; /* For magic substitution of 38400 bps */ |
| 259 | wait_queue_head_t write_wait; | 264 | wait_queue_head_t write_wait; |
| 260 | wait_queue_head_t read_wait; | 265 | wait_queue_head_t read_wait; |
| @@ -265,37 +270,10 @@ struct tty_struct { | |||
| 265 | 270 | ||
| 266 | #define N_TTY_BUF_SIZE 4096 | 271 | #define N_TTY_BUF_SIZE 4096 |
| 267 | 272 | ||
| 268 | /* | ||
| 269 | * The following is data for the N_TTY line discipline. For | ||
| 270 | * historical reasons, this is included in the tty structure. | ||
| 271 | * Mostly locked by the BKL. | ||
| 272 | */ | ||
| 273 | unsigned int column; | ||
| 274 | unsigned char lnext:1, erasing:1, raw:1, real_raw:1, icanon:1; | ||
| 275 | unsigned char closing:1; | 273 | unsigned char closing:1; |
| 276 | unsigned char echo_overrun:1; | ||
| 277 | unsigned short minimum_to_wake; | 274 | unsigned short minimum_to_wake; |
| 278 | unsigned long overrun_time; | ||
| 279 | int num_overrun; | ||
| 280 | unsigned long process_char_map[256/(8*sizeof(unsigned long))]; | ||
| 281 | char *read_buf; | ||
| 282 | int read_head; | ||
| 283 | int read_tail; | ||
| 284 | int read_cnt; | ||
| 285 | unsigned long read_flags[N_TTY_BUF_SIZE/(8*sizeof(unsigned long))]; | ||
| 286 | unsigned char *echo_buf; | ||
| 287 | unsigned int echo_pos; | ||
| 288 | unsigned int echo_cnt; | ||
| 289 | int canon_data; | ||
| 290 | unsigned long canon_head; | ||
| 291 | unsigned int canon_column; | ||
| 292 | struct mutex atomic_read_lock; | ||
| 293 | struct mutex atomic_write_lock; | ||
| 294 | struct mutex output_lock; | ||
| 295 | struct mutex echo_lock; | ||
| 296 | unsigned char *write_buf; | 275 | unsigned char *write_buf; |
| 297 | int write_cnt; | 276 | int write_cnt; |
| 298 | spinlock_t read_lock; | ||
| 299 | /* If the tty has a pending do_SAK, queue it here - akpm */ | 277 | /* If the tty has a pending do_SAK, queue it here - akpm */ |
| 300 | struct work_struct SAK_work; | 278 | struct work_struct SAK_work; |
| 301 | struct tty_port *port; | 279 | struct tty_port *port; |
| @@ -335,8 +313,6 @@ struct tty_file_private { | |||
| 335 | #define TTY_PTY_LOCK 16 /* pty private */ | 313 | #define TTY_PTY_LOCK 16 /* pty private */ |
| 336 | #define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */ | 314 | #define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */ |
| 337 | #define TTY_HUPPED 18 /* Post driver->hangup() */ | 315 | #define TTY_HUPPED 18 /* Post driver->hangup() */ |
| 338 | #define TTY_FLUSHING 19 /* Flushing to ldisc in progress */ | ||
| 339 | #define TTY_FLUSHPENDING 20 /* Queued buffer flush pending */ | ||
| 340 | #define TTY_HUPPING 21 /* ->hangup() in progress */ | 316 | #define TTY_HUPPING 21 /* ->hangup() in progress */ |
| 341 | 317 | ||
| 342 | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) | 318 | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) |
| @@ -412,9 +388,9 @@ extern void disassociate_ctty(int priv); | |||
| 412 | extern void no_tty(void); | 388 | extern void no_tty(void); |
| 413 | extern void tty_flip_buffer_push(struct tty_struct *tty); | 389 | extern void tty_flip_buffer_push(struct tty_struct *tty); |
| 414 | extern void tty_flush_to_ldisc(struct tty_struct *tty); | 390 | extern void tty_flush_to_ldisc(struct tty_struct *tty); |
| 415 | extern void tty_buffer_free_all(struct tty_struct *tty); | 391 | extern void tty_buffer_free_all(struct tty_port *port); |
| 416 | extern void tty_buffer_flush(struct tty_struct *tty); | 392 | extern void tty_buffer_flush(struct tty_struct *tty); |
| 417 | extern void tty_buffer_init(struct tty_struct *tty); | 393 | extern void tty_buffer_init(struct tty_port *port); |
| 418 | extern speed_t tty_get_baud_rate(struct tty_struct *tty); | 394 | extern speed_t tty_get_baud_rate(struct tty_struct *tty); |
| 419 | extern speed_t tty_termios_baud_rate(struct ktermios *termios); | 395 | extern speed_t tty_termios_baud_rate(struct ktermios *termios); |
| 420 | extern speed_t tty_termios_input_baud_rate(struct ktermios *termios); | 396 | extern speed_t tty_termios_input_baud_rate(struct ktermios *termios); |
| @@ -535,7 +511,7 @@ extern void n_tty_inherit_ops(struct tty_ldisc_ops *ops); | |||
| 535 | /* tty_audit.c */ | 511 | /* tty_audit.c */ |
| 536 | #ifdef CONFIG_AUDIT | 512 | #ifdef CONFIG_AUDIT |
| 537 | extern void tty_audit_add_data(struct tty_struct *tty, unsigned char *data, | 513 | extern void tty_audit_add_data(struct tty_struct *tty, unsigned char *data, |
| 538 | size_t size); | 514 | size_t size, unsigned icanon); |
| 539 | extern void tty_audit_exit(void); | 515 | extern void tty_audit_exit(void); |
| 540 | extern void tty_audit_fork(struct signal_struct *sig); | 516 | extern void tty_audit_fork(struct signal_struct *sig); |
| 541 | extern void tty_audit_tiocsti(struct tty_struct *tty, char ch); | 517 | extern void tty_audit_tiocsti(struct tty_struct *tty, char ch); |
| @@ -544,7 +520,7 @@ extern int tty_audit_push_task(struct task_struct *tsk, | |||
| 544 | kuid_t loginuid, u32 sessionid); | 520 | kuid_t loginuid, u32 sessionid); |
| 545 | #else | 521 | #else |
| 546 | static inline void tty_audit_add_data(struct tty_struct *tty, | 522 | static inline void tty_audit_add_data(struct tty_struct *tty, |
| 547 | unsigned char *data, size_t size) | 523 | unsigned char *data, size_t size, unsigned icanon) |
| 548 | { | 524 | { |
| 549 | } | 525 | } |
| 550 | static inline void tty_audit_tiocsti(struct tty_struct *tty, char ch) | 526 | static inline void tty_audit_tiocsti(struct tty_struct *tty, char ch) |
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index 9239d033a0a3..2002344ed36a 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h | |||
| @@ -11,7 +11,7 @@ void tty_schedule_flip(struct tty_struct *tty); | |||
| 11 | static inline int tty_insert_flip_char(struct tty_struct *tty, | 11 | static inline int tty_insert_flip_char(struct tty_struct *tty, |
| 12 | unsigned char ch, char flag) | 12 | unsigned char ch, char flag) |
| 13 | { | 13 | { |
| 14 | struct tty_buffer *tb = tty->buf.tail; | 14 | struct tty_buffer *tb = tty->port->buf.tail; |
| 15 | if (tb && tb->used < tb->size) { | 15 | if (tb && tb->used < tb->size) { |
| 16 | tb->flag_buf_ptr[tb->used] = flag; | 16 | tb->flag_buf_ptr[tb->used] = flag; |
| 17 | tb->char_buf_ptr[tb->used++] = ch; | 17 | tb->char_buf_ptr[tb->used++] = ch; |
diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h index e6f0331e3d45..24594571c5a3 100644 --- a/include/linux/uprobes.h +++ b/include/linux/uprobes.h | |||
| @@ -35,16 +35,6 @@ struct inode; | |||
| 35 | # include <asm/uprobes.h> | 35 | # include <asm/uprobes.h> |
| 36 | #endif | 36 | #endif |
| 37 | 37 | ||
| 38 | /* flags that denote/change uprobes behaviour */ | ||
| 39 | |||
| 40 | /* Have a copy of original instruction */ | ||
| 41 | #define UPROBE_COPY_INSN 0x1 | ||
| 42 | |||
| 43 | /* Dont run handlers when first register/ last unregister in progress*/ | ||
| 44 | #define UPROBE_RUN_HANDLER 0x2 | ||
| 45 | /* Can skip singlestep */ | ||
| 46 | #define UPROBE_SKIP_SSTEP 0x4 | ||
| 47 | |||
| 48 | struct uprobe_consumer { | 38 | struct uprobe_consumer { |
| 49 | int (*handler)(struct uprobe_consumer *self, struct pt_regs *regs); | 39 | int (*handler)(struct uprobe_consumer *self, struct pt_regs *regs); |
| 50 | /* | 40 | /* |
| @@ -59,7 +49,6 @@ struct uprobe_consumer { | |||
| 59 | #ifdef CONFIG_UPROBES | 49 | #ifdef CONFIG_UPROBES |
| 60 | enum uprobe_task_state { | 50 | enum uprobe_task_state { |
| 61 | UTASK_RUNNING, | 51 | UTASK_RUNNING, |
| 62 | UTASK_BP_HIT, | ||
| 63 | UTASK_SSTEP, | 52 | UTASK_SSTEP, |
| 64 | UTASK_SSTEP_ACK, | 53 | UTASK_SSTEP_ACK, |
| 65 | UTASK_SSTEP_TRAPPED, | 54 | UTASK_SSTEP_TRAPPED, |
