diff options
Diffstat (limited to 'include/linux')
141 files changed, 2712 insertions, 1487 deletions
diff --git a/include/linux/acpi_gpio.h b/include/linux/acpi_gpio.h deleted file mode 100644 index d875bc3dba3c..000000000000 --- a/include/linux/acpi_gpio.h +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | #ifndef _LINUX_ACPI_GPIO_H_ | ||
| 2 | #define _LINUX_ACPI_GPIO_H_ | ||
| 3 | |||
| 4 | #include <linux/device.h> | ||
| 5 | #include <linux/err.h> | ||
| 6 | #include <linux/errno.h> | ||
| 7 | #include <linux/gpio.h> | ||
| 8 | #include <linux/gpio/consumer.h> | ||
| 9 | |||
| 10 | /** | ||
| 11 | * struct acpi_gpio_info - ACPI GPIO specific information | ||
| 12 | * @gpioint: if %true this GPIO is of type GpioInt otherwise type is GpioIo | ||
| 13 | * @active_low: in case of @gpioint, the pin is active low | ||
| 14 | */ | ||
| 15 | struct acpi_gpio_info { | ||
| 16 | bool gpioint; | ||
| 17 | bool active_low; | ||
| 18 | }; | ||
| 19 | |||
| 20 | #ifdef CONFIG_GPIO_ACPI | ||
| 21 | |||
| 22 | struct gpio_desc *acpi_get_gpiod_by_index(struct device *dev, int index, | ||
| 23 | struct acpi_gpio_info *info); | ||
| 24 | void acpi_gpiochip_request_interrupts(struct gpio_chip *chip); | ||
| 25 | void acpi_gpiochip_free_interrupts(struct gpio_chip *chip); | ||
| 26 | |||
| 27 | #else /* CONFIG_GPIO_ACPI */ | ||
| 28 | |||
| 29 | static inline struct gpio_desc * | ||
| 30 | acpi_get_gpiod_by_index(struct device *dev, int index, | ||
| 31 | struct acpi_gpio_info *info) | ||
| 32 | { | ||
| 33 | return ERR_PTR(-ENOSYS); | ||
| 34 | } | ||
| 35 | |||
| 36 | static inline void acpi_gpiochip_request_interrupts(struct gpio_chip *chip) { } | ||
| 37 | static inline void acpi_gpiochip_free_interrupts(struct gpio_chip *chip) { } | ||
| 38 | |||
| 39 | #endif /* CONFIG_GPIO_ACPI */ | ||
| 40 | |||
| 41 | static inline int acpi_get_gpio_by_index(struct device *dev, int index, | ||
| 42 | struct acpi_gpio_info *info) | ||
| 43 | { | ||
| 44 | struct gpio_desc *desc = acpi_get_gpiod_by_index(dev, index, info); | ||
| 45 | |||
| 46 | if (IS_ERR(desc)) | ||
| 47 | return PTR_ERR(desc); | ||
| 48 | return desc_to_gpio(desc); | ||
| 49 | } | ||
| 50 | |||
| 51 | #endif /* _LINUX_ACPI_GPIO_H_ */ | ||
diff --git a/include/linux/assoc_array.h b/include/linux/assoc_array.h index 9a193b84238a..a89df3be1686 100644 --- a/include/linux/assoc_array.h +++ b/include/linux/assoc_array.h | |||
| @@ -41,10 +41,10 @@ struct assoc_array_ops { | |||
| 41 | /* Is this the object we're looking for? */ | 41 | /* Is this the object we're looking for? */ |
| 42 | bool (*compare_object)(const void *object, const void *index_key); | 42 | bool (*compare_object)(const void *object, const void *index_key); |
| 43 | 43 | ||
| 44 | /* How different are two objects, to a bit position in their keys? (or | 44 | /* How different is an object from an index key, to a bit position in |
| 45 | * -1 if they're the same) | 45 | * their keys? (or -1 if they're the same) |
| 46 | */ | 46 | */ |
| 47 | int (*diff_objects)(const void *a, const void *b); | 47 | int (*diff_objects)(const void *object, const void *index_key); |
| 48 | 48 | ||
| 49 | /* Method to free an object. */ | 49 | /* Method to free an object. */ |
| 50 | void (*free_object)(void *object); | 50 | void (*free_object)(void *object); |
diff --git a/include/linux/auxvec.h b/include/linux/auxvec.h index 669fef5c745a..3e0fbe441763 100644 --- a/include/linux/auxvec.h +++ b/include/linux/auxvec.h | |||
| @@ -3,6 +3,6 @@ | |||
| 3 | 3 | ||
| 4 | #include <uapi/linux/auxvec.h> | 4 | #include <uapi/linux/auxvec.h> |
| 5 | 5 | ||
| 6 | #define AT_VECTOR_SIZE_BASE 19 /* NEW_AUX_ENT entries in auxiliary table */ | 6 | #define AT_VECTOR_SIZE_BASE 20 /* NEW_AUX_ENT entries in auxiliary table */ |
| 7 | /* number of "#define AT_.*" above, minus {AT_NULL, AT_IGNORE, AT_NOTELF} */ | 7 | /* number of "#define AT_.*" above, minus {AT_NULL, AT_IGNORE, AT_NOTELF} */ |
| 8 | #endif /* _LINUX_AUXVEC_H */ | 8 | #endif /* _LINUX_AUXVEC_H */ |
diff --git a/include/linux/bottom_half.h b/include/linux/bottom_half.h index 27b1bcffe408..86c12c93e3cf 100644 --- a/include/linux/bottom_half.h +++ b/include/linux/bottom_half.h | |||
| @@ -1,9 +1,35 @@ | |||
| 1 | #ifndef _LINUX_BH_H | 1 | #ifndef _LINUX_BH_H |
| 2 | #define _LINUX_BH_H | 2 | #define _LINUX_BH_H |
| 3 | 3 | ||
| 4 | extern void local_bh_disable(void); | 4 | #include <linux/preempt.h> |
| 5 | #include <linux/preempt_mask.h> | ||
| 6 | |||
| 7 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
| 8 | extern void __local_bh_disable_ip(unsigned long ip, unsigned int cnt); | ||
| 9 | #else | ||
| 10 | static __always_inline void __local_bh_disable_ip(unsigned long ip, unsigned int cnt) | ||
| 11 | { | ||
| 12 | preempt_count_add(cnt); | ||
| 13 | barrier(); | ||
| 14 | } | ||
| 15 | #endif | ||
| 16 | |||
| 17 | static inline void local_bh_disable(void) | ||
| 18 | { | ||
| 19 | __local_bh_disable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET); | ||
| 20 | } | ||
| 21 | |||
| 5 | extern void _local_bh_enable(void); | 22 | extern void _local_bh_enable(void); |
| 6 | extern void local_bh_enable(void); | 23 | extern void __local_bh_enable_ip(unsigned long ip, unsigned int cnt); |
| 7 | extern void local_bh_enable_ip(unsigned long ip); | 24 | |
| 25 | static inline void local_bh_enable_ip(unsigned long ip) | ||
| 26 | { | ||
| 27 | __local_bh_enable_ip(ip, SOFTIRQ_DISABLE_OFFSET); | ||
| 28 | } | ||
| 29 | |||
| 30 | static inline void local_bh_enable(void) | ||
| 31 | { | ||
| 32 | __local_bh_enable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET); | ||
| 33 | } | ||
| 8 | 34 | ||
| 9 | #endif /* _LINUX_BH_H */ | 35 | #endif /* _LINUX_BH_H */ |
diff --git a/include/linux/compiler-intel.h b/include/linux/compiler-intel.h index 973ce10c40b6..dc1bd3dcf11f 100644 --- a/include/linux/compiler-intel.h +++ b/include/linux/compiler-intel.h | |||
| @@ -28,8 +28,6 @@ | |||
| 28 | 28 | ||
| 29 | #endif | 29 | #endif |
| 30 | 30 | ||
| 31 | #define uninitialized_var(x) x | ||
| 32 | |||
| 33 | #ifndef __HAVE_BUILTIN_BSWAP16__ | 31 | #ifndef __HAVE_BUILTIN_BSWAP16__ |
| 34 | /* icc has this, but it's called _bswap16 */ | 32 | /* icc has this, but it's called _bswap16 */ |
| 35 | #define __HAVE_BUILTIN_BSWAP16__ | 33 | #define __HAVE_BUILTIN_BSWAP16__ |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 92669cd182a6..fe7a686dfd8d 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
| @@ -298,6 +298,11 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | |||
| 298 | # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) | 298 | # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) |
| 299 | #endif | 299 | #endif |
| 300 | 300 | ||
| 301 | /* Is this type a native word size -- useful for atomic operations */ | ||
| 302 | #ifndef __native_word | ||
| 303 | # define __native_word(t) (sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) | ||
| 304 | #endif | ||
| 305 | |||
| 301 | /* Compile time object size, -1 for unknown */ | 306 | /* Compile time object size, -1 for unknown */ |
| 302 | #ifndef __compiletime_object_size | 307 | #ifndef __compiletime_object_size |
| 303 | # define __compiletime_object_size(obj) -1 | 308 | # define __compiletime_object_size(obj) -1 |
| @@ -337,6 +342,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | |||
| 337 | #define compiletime_assert(condition, msg) \ | 342 | #define compiletime_assert(condition, msg) \ |
| 338 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) | 343 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) |
| 339 | 344 | ||
| 345 | #define compiletime_assert_atomic_type(t) \ | ||
| 346 | compiletime_assert(__native_word(t), \ | ||
| 347 | "Need native word sized stores/loads for atomicity.") | ||
| 348 | |||
| 340 | /* | 349 | /* |
| 341 | * Prevent the compiler from merging or refetching accesses. The compiler | 350 | * Prevent the compiler from merging or refetching accesses. The compiler |
| 342 | * is also forbidden from reordering successive instances of ACCESS_ONCE(), | 351 | * is also forbidden from reordering successive instances of ACCESS_ONCE(), |
diff --git a/include/linux/component.h b/include/linux/component.h new file mode 100644 index 000000000000..68870182ca1e --- /dev/null +++ b/include/linux/component.h | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | #ifndef COMPONENT_H | ||
| 2 | #define COMPONENT_H | ||
| 3 | |||
| 4 | struct device; | ||
| 5 | |||
| 6 | struct component_ops { | ||
| 7 | int (*bind)(struct device *, struct device *, void *); | ||
| 8 | void (*unbind)(struct device *, struct device *, void *); | ||
| 9 | }; | ||
| 10 | |||
| 11 | int component_add(struct device *, const struct component_ops *); | ||
| 12 | void component_del(struct device *, const struct component_ops *); | ||
| 13 | |||
| 14 | int component_bind_all(struct device *, void *); | ||
| 15 | void component_unbind_all(struct device *, void *); | ||
| 16 | |||
| 17 | struct master; | ||
| 18 | |||
| 19 | struct component_master_ops { | ||
| 20 | int (*add_components)(struct device *, struct master *); | ||
| 21 | int (*bind)(struct device *); | ||
| 22 | void (*unbind)(struct device *); | ||
| 23 | }; | ||
| 24 | |||
| 25 | int component_master_add(struct device *, const struct component_master_ops *); | ||
| 26 | void component_master_del(struct device *, | ||
| 27 | const struct component_master_ops *); | ||
| 28 | |||
| 29 | int component_master_add_child(struct master *master, | ||
| 30 | int (*compare)(struct device *, void *), void *compare_data); | ||
| 31 | |||
| 32 | #endif | ||
diff --git a/include/linux/context_tracking.h b/include/linux/context_tracking.h index 158158704c30..37b81bd51ec0 100644 --- a/include/linux/context_tracking.h +++ b/include/linux/context_tracking.h | |||
| @@ -17,13 +17,13 @@ extern void __context_tracking_task_switch(struct task_struct *prev, | |||
| 17 | 17 | ||
| 18 | static inline void user_enter(void) | 18 | static inline void user_enter(void) |
| 19 | { | 19 | { |
| 20 | if (static_key_false(&context_tracking_enabled)) | 20 | if (context_tracking_is_enabled()) |
| 21 | context_tracking_user_enter(); | 21 | context_tracking_user_enter(); |
| 22 | 22 | ||
| 23 | } | 23 | } |
| 24 | static inline void user_exit(void) | 24 | static inline void user_exit(void) |
| 25 | { | 25 | { |
| 26 | if (static_key_false(&context_tracking_enabled)) | 26 | if (context_tracking_is_enabled()) |
| 27 | context_tracking_user_exit(); | 27 | context_tracking_user_exit(); |
| 28 | } | 28 | } |
| 29 | 29 | ||
| @@ -31,7 +31,7 @@ static inline enum ctx_state exception_enter(void) | |||
| 31 | { | 31 | { |
| 32 | enum ctx_state prev_ctx; | 32 | enum ctx_state prev_ctx; |
| 33 | 33 | ||
| 34 | if (!static_key_false(&context_tracking_enabled)) | 34 | if (!context_tracking_is_enabled()) |
| 35 | return 0; | 35 | return 0; |
| 36 | 36 | ||
| 37 | prev_ctx = this_cpu_read(context_tracking.state); | 37 | prev_ctx = this_cpu_read(context_tracking.state); |
| @@ -42,7 +42,7 @@ static inline enum ctx_state exception_enter(void) | |||
| 42 | 42 | ||
| 43 | static inline void exception_exit(enum ctx_state prev_ctx) | 43 | static inline void exception_exit(enum ctx_state prev_ctx) |
| 44 | { | 44 | { |
| 45 | if (static_key_false(&context_tracking_enabled)) { | 45 | if (context_tracking_is_enabled()) { |
| 46 | if (prev_ctx == IN_USER) | 46 | if (prev_ctx == IN_USER) |
| 47 | context_tracking_user_enter(); | 47 | context_tracking_user_enter(); |
| 48 | } | 48 | } |
| @@ -51,7 +51,7 @@ static inline void exception_exit(enum ctx_state prev_ctx) | |||
| 51 | static inline void context_tracking_task_switch(struct task_struct *prev, | 51 | static inline void context_tracking_task_switch(struct task_struct *prev, |
| 52 | struct task_struct *next) | 52 | struct task_struct *next) |
| 53 | { | 53 | { |
| 54 | if (static_key_false(&context_tracking_enabled)) | 54 | if (context_tracking_is_enabled()) |
| 55 | __context_tracking_task_switch(prev, next); | 55 | __context_tracking_task_switch(prev, next); |
| 56 | } | 56 | } |
| 57 | #else | 57 | #else |
diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h index 0f1979d0674f..97a81225d037 100644 --- a/include/linux/context_tracking_state.h +++ b/include/linux/context_tracking_state.h | |||
| @@ -22,15 +22,20 @@ struct context_tracking { | |||
| 22 | extern struct static_key context_tracking_enabled; | 22 | extern struct static_key context_tracking_enabled; |
| 23 | DECLARE_PER_CPU(struct context_tracking, context_tracking); | 23 | DECLARE_PER_CPU(struct context_tracking, context_tracking); |
| 24 | 24 | ||
| 25 | static inline bool context_tracking_in_user(void) | 25 | static inline bool context_tracking_is_enabled(void) |
| 26 | { | 26 | { |
| 27 | return __this_cpu_read(context_tracking.state) == IN_USER; | 27 | return static_key_false(&context_tracking_enabled); |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | static inline bool context_tracking_active(void) | 30 | static inline bool context_tracking_cpu_is_enabled(void) |
| 31 | { | 31 | { |
| 32 | return __this_cpu_read(context_tracking.active); | 32 | return __this_cpu_read(context_tracking.active); |
| 33 | } | 33 | } |
| 34 | |||
| 35 | static inline bool context_tracking_in_user(void) | ||
| 36 | { | ||
| 37 | return __this_cpu_read(context_tracking.state) == IN_USER; | ||
| 38 | } | ||
| 34 | #else | 39 | #else |
| 35 | static inline bool context_tracking_in_user(void) { return false; } | 40 | static inline bool context_tracking_in_user(void) { return false; } |
| 36 | static inline bool context_tracking_active(void) { return false; } | 41 | static inline bool context_tracking_active(void) { return false; } |
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index fe68a5a98583..7032518f8542 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h | |||
| @@ -6,6 +6,8 @@ | |||
| 6 | #include <linux/proc_fs.h> | 6 | #include <linux/proc_fs.h> |
| 7 | #include <linux/elf.h> | 7 | #include <linux/elf.h> |
| 8 | 8 | ||
| 9 | #include <asm/pgtable.h> /* for pgprot_t */ | ||
| 10 | |||
| 9 | #define ELFCORE_ADDR_MAX (-1ULL) | 11 | #define ELFCORE_ADDR_MAX (-1ULL) |
| 10 | #define ELFCORE_ADDR_ERR (-2ULL) | 12 | #define ELFCORE_ADDR_ERR (-2ULL) |
| 11 | 13 | ||
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 57e87e749a48..bf72e9ac6de0 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
| @@ -29,8 +29,10 @@ struct vfsmount; | |||
| 29 | /* The hash is always the low bits of hash_len */ | 29 | /* The hash is always the low bits of hash_len */ |
| 30 | #ifdef __LITTLE_ENDIAN | 30 | #ifdef __LITTLE_ENDIAN |
| 31 | #define HASH_LEN_DECLARE u32 hash; u32 len; | 31 | #define HASH_LEN_DECLARE u32 hash; u32 len; |
| 32 | #define bytemask_from_count(cnt) (~(~0ul << (cnt)*8)) | ||
| 32 | #else | 33 | #else |
| 33 | #define HASH_LEN_DECLARE u32 len; u32 hash; | 34 | #define HASH_LEN_DECLARE u32 len; u32 hash; |
| 35 | #define bytemask_from_count(cnt) (~(~0ul >> (cnt)*8)) | ||
| 34 | #endif | 36 | #endif |
| 35 | 37 | ||
| 36 | /* | 38 | /* |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 41cf0c399288..ba5f96db0754 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #define LINUX_DMAENGINE_H | 22 | #define LINUX_DMAENGINE_H |
| 23 | 23 | ||
| 24 | #include <linux/device.h> | 24 | #include <linux/device.h> |
| 25 | #include <linux/err.h> | ||
| 25 | #include <linux/uio.h> | 26 | #include <linux/uio.h> |
| 26 | #include <linux/bug.h> | 27 | #include <linux/bug.h> |
| 27 | #include <linux/scatterlist.h> | 28 | #include <linux/scatterlist.h> |
| @@ -363,6 +364,32 @@ struct dma_slave_config { | |||
| 363 | unsigned int slave_id; | 364 | unsigned int slave_id; |
| 364 | }; | 365 | }; |
| 365 | 366 | ||
| 367 | /** | ||
| 368 | * enum dma_residue_granularity - Granularity of the reported transfer residue | ||
| 369 | * @DMA_RESIDUE_GRANULARITY_DESCRIPTOR: Residue reporting is not support. The | ||
| 370 | * DMA channel is only able to tell whether a descriptor has been completed or | ||
| 371 | * not, which means residue reporting is not supported by this channel. The | ||
| 372 | * residue field of the dma_tx_state field will always be 0. | ||
| 373 | * @DMA_RESIDUE_GRANULARITY_SEGMENT: Residue is updated after each successfully | ||
| 374 | * completed segment of the transfer (For cyclic transfers this is after each | ||
| 375 | * period). This is typically implemented by having the hardware generate an | ||
| 376 | * interrupt after each transferred segment and then the drivers updates the | ||
| 377 | * outstanding residue by the size of the segment. Another possibility is if | ||
| 378 | * the hardware supports scatter-gather and the segment descriptor has a field | ||
| 379 | * which gets set after the segment has been completed. The driver then counts | ||
| 380 | * the number of segments without the flag set to compute the residue. | ||
| 381 | * @DMA_RESIDUE_GRANULARITY_BURST: Residue is updated after each transferred | ||
| 382 | * burst. This is typically only supported if the hardware has a progress | ||
| 383 | * register of some sort (E.g. a register with the current read/write address | ||
| 384 | * or a register with the amount of bursts/beats/bytes that have been | ||
| 385 | * transferred or still need to be transferred). | ||
| 386 | */ | ||
| 387 | enum dma_residue_granularity { | ||
| 388 | DMA_RESIDUE_GRANULARITY_DESCRIPTOR = 0, | ||
| 389 | DMA_RESIDUE_GRANULARITY_SEGMENT = 1, | ||
| 390 | DMA_RESIDUE_GRANULARITY_BURST = 2, | ||
| 391 | }; | ||
| 392 | |||
| 366 | /* struct dma_slave_caps - expose capabilities of a slave channel only | 393 | /* struct dma_slave_caps - expose capabilities of a slave channel only |
| 367 | * | 394 | * |
| 368 | * @src_addr_widths: bit mask of src addr widths the channel supports | 395 | * @src_addr_widths: bit mask of src addr widths the channel supports |
| @@ -373,6 +400,7 @@ struct dma_slave_config { | |||
| 373 | * should be checked by controller as well | 400 | * should be checked by controller as well |
| 374 | * @cmd_pause: true, if pause and thereby resume is supported | 401 | * @cmd_pause: true, if pause and thereby resume is supported |
| 375 | * @cmd_terminate: true, if terminate cmd is supported | 402 | * @cmd_terminate: true, if terminate cmd is supported |
| 403 | * @residue_granularity: granularity of the reported transfer residue | ||
| 376 | */ | 404 | */ |
| 377 | struct dma_slave_caps { | 405 | struct dma_slave_caps { |
| 378 | u32 src_addr_widths; | 406 | u32 src_addr_widths; |
| @@ -380,6 +408,7 @@ struct dma_slave_caps { | |||
| 380 | u32 directions; | 408 | u32 directions; |
| 381 | bool cmd_pause; | 409 | bool cmd_pause; |
| 382 | bool cmd_terminate; | 410 | bool cmd_terminate; |
| 411 | enum dma_residue_granularity residue_granularity; | ||
| 383 | }; | 412 | }; |
| 384 | 413 | ||
| 385 | static inline const char *dma_chan_name(struct dma_chan *chan) | 414 | static inline const char *dma_chan_name(struct dma_chan *chan) |
| @@ -1040,6 +1069,8 @@ enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); | |||
| 1040 | void dma_issue_pending_all(void); | 1069 | void dma_issue_pending_all(void); |
| 1041 | struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask, | 1070 | struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask, |
| 1042 | dma_filter_fn fn, void *fn_param); | 1071 | dma_filter_fn fn, void *fn_param); |
| 1072 | struct dma_chan *dma_request_slave_channel_reason(struct device *dev, | ||
| 1073 | const char *name); | ||
| 1043 | struct dma_chan *dma_request_slave_channel(struct device *dev, const char *name); | 1074 | struct dma_chan *dma_request_slave_channel(struct device *dev, const char *name); |
| 1044 | void dma_release_channel(struct dma_chan *chan); | 1075 | void dma_release_channel(struct dma_chan *chan); |
| 1045 | #else | 1076 | #else |
| @@ -1063,6 +1094,11 @@ static inline struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask, | |||
| 1063 | { | 1094 | { |
| 1064 | return NULL; | 1095 | return NULL; |
| 1065 | } | 1096 | } |
| 1097 | static inline struct dma_chan *dma_request_slave_channel_reason( | ||
| 1098 | struct device *dev, const char *name) | ||
| 1099 | { | ||
| 1100 | return ERR_PTR(-ENODEV); | ||
| 1101 | } | ||
| 1066 | static inline struct dma_chan *dma_request_slave_channel(struct device *dev, | 1102 | static inline struct dma_chan *dma_request_slave_channel(struct device *dev, |
| 1067 | const char *name) | 1103 | const char *name) |
| 1068 | { | 1104 | { |
diff --git a/include/linux/edac.h b/include/linux/edac.h index dbdffe8d4469..8e6c20af11a2 100644 --- a/include/linux/edac.h +++ b/include/linux/edac.h | |||
| @@ -35,6 +35,34 @@ extern void edac_atomic_assert_error(void); | |||
| 35 | extern struct bus_type *edac_get_sysfs_subsys(void); | 35 | extern struct bus_type *edac_get_sysfs_subsys(void); |
| 36 | extern void edac_put_sysfs_subsys(void); | 36 | extern void edac_put_sysfs_subsys(void); |
| 37 | 37 | ||
| 38 | enum { | ||
| 39 | EDAC_REPORTING_ENABLED, | ||
| 40 | EDAC_REPORTING_DISABLED, | ||
| 41 | EDAC_REPORTING_FORCE | ||
| 42 | }; | ||
| 43 | |||
| 44 | extern int edac_report_status; | ||
| 45 | #ifdef CONFIG_EDAC | ||
| 46 | static inline int get_edac_report_status(void) | ||
| 47 | { | ||
| 48 | return edac_report_status; | ||
| 49 | } | ||
| 50 | |||
| 51 | static inline void set_edac_report_status(int new) | ||
| 52 | { | ||
| 53 | edac_report_status = new; | ||
| 54 | } | ||
| 55 | #else | ||
| 56 | static inline int get_edac_report_status(void) | ||
| 57 | { | ||
| 58 | return EDAC_REPORTING_DISABLED; | ||
| 59 | } | ||
| 60 | |||
| 61 | static inline void set_edac_report_status(int new) | ||
| 62 | { | ||
| 63 | } | ||
| 64 | #endif | ||
| 65 | |||
| 38 | static inline void opstate_init(void) | 66 | static inline void opstate_init(void) |
| 39 | { | 67 | { |
| 40 | switch (edac_op_state) { | 68 | switch (edac_op_state) { |
diff --git a/include/linux/efi.h b/include/linux/efi.h index bc5687d0f315..0a819e7a60c9 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -556,6 +556,9 @@ extern struct efi { | |||
| 556 | unsigned long hcdp; /* HCDP table */ | 556 | unsigned long hcdp; /* HCDP table */ |
| 557 | unsigned long uga; /* UGA table */ | 557 | unsigned long uga; /* UGA table */ |
| 558 | unsigned long uv_systab; /* UV system table */ | 558 | unsigned long uv_systab; /* UV system table */ |
| 559 | unsigned long fw_vendor; /* fw_vendor */ | ||
| 560 | unsigned long runtime; /* runtime table */ | ||
| 561 | unsigned long config_table; /* config tables */ | ||
| 559 | efi_get_time_t *get_time; | 562 | efi_get_time_t *get_time; |
| 560 | efi_set_time_t *set_time; | 563 | efi_set_time_t *set_time; |
| 561 | efi_get_wakeup_time_t *get_wakeup_time; | 564 | efi_get_wakeup_time_t *get_wakeup_time; |
| @@ -653,6 +656,7 @@ extern int __init efi_setup_pcdp_console(char *); | |||
| 653 | #define EFI_RUNTIME_SERVICES 3 /* Can we use runtime services? */ | 656 | #define EFI_RUNTIME_SERVICES 3 /* Can we use runtime services? */ |
| 654 | #define EFI_MEMMAP 4 /* Can we use EFI memory map? */ | 657 | #define EFI_MEMMAP 4 /* Can we use EFI memory map? */ |
| 655 | #define EFI_64BIT 5 /* Is the firmware 64-bit? */ | 658 | #define EFI_64BIT 5 /* Is the firmware 64-bit? */ |
| 659 | #define EFI_ARCH_1 6 /* First arch-specific bit */ | ||
| 656 | 660 | ||
| 657 | #ifdef CONFIG_EFI | 661 | #ifdef CONFIG_EFI |
| 658 | # ifdef CONFIG_X86 | 662 | # ifdef CONFIG_X86 |
| @@ -801,6 +805,8 @@ struct efivar_entry { | |||
| 801 | struct efi_variable var; | 805 | struct efi_variable var; |
| 802 | struct list_head list; | 806 | struct list_head list; |
| 803 | struct kobject kobj; | 807 | struct kobject kobj; |
| 808 | bool scanning; | ||
| 809 | bool deleting; | ||
| 804 | }; | 810 | }; |
| 805 | 811 | ||
| 806 | 812 | ||
| @@ -866,6 +872,21 @@ void efivar_run_worker(void); | |||
| 866 | #if defined(CONFIG_EFI_VARS) || defined(CONFIG_EFI_VARS_MODULE) | 872 | #if defined(CONFIG_EFI_VARS) || defined(CONFIG_EFI_VARS_MODULE) |
| 867 | int efivars_sysfs_init(void); | 873 | int efivars_sysfs_init(void); |
| 868 | 874 | ||
| 875 | #define EFIVARS_DATA_SIZE_MAX 1024 | ||
| 876 | |||
| 869 | #endif /* CONFIG_EFI_VARS */ | 877 | #endif /* CONFIG_EFI_VARS */ |
| 870 | 878 | ||
| 879 | #ifdef CONFIG_EFI_RUNTIME_MAP | ||
| 880 | int efi_runtime_map_init(struct kobject *); | ||
| 881 | void efi_runtime_map_setup(void *, int, u32); | ||
| 882 | #else | ||
| 883 | static inline int efi_runtime_map_init(struct kobject *kobj) | ||
| 884 | { | ||
| 885 | return 0; | ||
| 886 | } | ||
| 887 | |||
| 888 | static inline void | ||
| 889 | efi_runtime_map_setup(void *map, int nr_entries, u32 desc_size) {} | ||
| 890 | #endif | ||
| 891 | |||
| 871 | #endif /* _LINUX_EFI_H */ | 892 | #endif /* _LINUX_EFI_H */ |
diff --git a/include/linux/extcon/extcon-gpio.h b/include/linux/extcon/extcon-gpio.h index 4195810f87fe..8900fdf511c6 100644 --- a/include/linux/extcon/extcon-gpio.h +++ b/include/linux/extcon/extcon-gpio.h | |||
| @@ -51,6 +51,7 @@ struct gpio_extcon_platform_data { | |||
| 51 | /* if NULL, "0" or "1" will be printed */ | 51 | /* if NULL, "0" or "1" will be printed */ |
| 52 | const char *state_on; | 52 | const char *state_on; |
| 53 | const char *state_off; | 53 | const char *state_off; |
| 54 | bool check_on_resume; | ||
| 54 | }; | 55 | }; |
| 55 | 56 | ||
| 56 | #endif /* __EXTCON_GPIO_H__ */ | 57 | #endif /* __EXTCON_GPIO_H__ */ |
diff --git a/include/linux/firmware.h b/include/linux/firmware.h index e154c1005cd1..59529330efd6 100644 --- a/include/linux/firmware.h +++ b/include/linux/firmware.h | |||
| @@ -68,4 +68,11 @@ static inline void release_firmware(const struct firmware *fw) | |||
| 68 | 68 | ||
| 69 | #endif | 69 | #endif |
| 70 | 70 | ||
| 71 | #ifdef CONFIG_FW_LOADER_USER_HELPER | ||
| 72 | int request_firmware_direct(const struct firmware **fw, const char *name, | ||
| 73 | struct device *device); | ||
| 74 | #else | ||
| 75 | #define request_firmware_direct request_firmware | ||
| 76 | #endif | ||
| 77 | |||
| 71 | #endif | 78 | #endif |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 9abbe630c456..8c9b7a1c4138 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
| @@ -248,6 +248,9 @@ struct ftrace_event_call { | |||
| 248 | #ifdef CONFIG_PERF_EVENTS | 248 | #ifdef CONFIG_PERF_EVENTS |
| 249 | int perf_refcount; | 249 | int perf_refcount; |
| 250 | struct hlist_head __percpu *perf_events; | 250 | struct hlist_head __percpu *perf_events; |
| 251 | |||
| 252 | int (*perf_perm)(struct ftrace_event_call *, | ||
| 253 | struct perf_event *); | ||
| 251 | #endif | 254 | #endif |
| 252 | }; | 255 | }; |
| 253 | 256 | ||
| @@ -317,6 +320,19 @@ struct ftrace_event_file { | |||
| 317 | } \ | 320 | } \ |
| 318 | early_initcall(trace_init_flags_##name); | 321 | early_initcall(trace_init_flags_##name); |
| 319 | 322 | ||
| 323 | #define __TRACE_EVENT_PERF_PERM(name, expr...) \ | ||
| 324 | static int perf_perm_##name(struct ftrace_event_call *tp_event, \ | ||
| 325 | struct perf_event *p_event) \ | ||
| 326 | { \ | ||
| 327 | return ({ expr; }); \ | ||
| 328 | } \ | ||
| 329 | static int __init trace_init_perf_perm_##name(void) \ | ||
| 330 | { \ | ||
| 331 | event_##name.perf_perm = &perf_perm_##name; \ | ||
| 332 | return 0; \ | ||
| 333 | } \ | ||
| 334 | early_initcall(trace_init_perf_perm_##name); | ||
| 335 | |||
| 320 | #define PERF_MAX_TRACE_SIZE 2048 | 336 | #define PERF_MAX_TRACE_SIZE 2048 |
| 321 | 337 | ||
| 322 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ | 338 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ |
diff --git a/include/linux/gpio.h b/include/linux/gpio.h index 13dfd24d01ab..b581b13d29d9 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h | |||
| @@ -90,7 +90,6 @@ void devm_gpio_free(struct device *dev, unsigned int gpio); | |||
| 90 | 90 | ||
| 91 | #include <linux/kernel.h> | 91 | #include <linux/kernel.h> |
| 92 | #include <linux/types.h> | 92 | #include <linux/types.h> |
| 93 | #include <linux/errno.h> | ||
| 94 | #include <linux/bug.h> | 93 | #include <linux/bug.h> |
| 95 | #include <linux/pinctrl/pinctrl.h> | 94 | #include <linux/pinctrl/pinctrl.h> |
| 96 | 95 | ||
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 656a27efb2c8..a3e181e09636 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h | |||
| @@ -2,9 +2,12 @@ | |||
| 2 | #define __LINUX_GPIO_DRIVER_H | 2 | #define __LINUX_GPIO_DRIVER_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | #include <linux/module.h> | ||
| 5 | 6 | ||
| 6 | struct device; | 7 | struct device; |
| 7 | struct gpio_desc; | 8 | struct gpio_desc; |
| 9 | struct of_phandle_args; | ||
| 10 | struct device_node; | ||
| 8 | struct seq_file; | 11 | struct seq_file; |
| 9 | 12 | ||
| 10 | /** | 13 | /** |
| @@ -36,14 +39,15 @@ struct seq_file; | |||
| 36 | * @ngpio: the number of GPIOs handled by this controller; the last GPIO | 39 | * @ngpio: the number of GPIOs handled by this controller; the last GPIO |
| 37 | * handled is (base + ngpio - 1). | 40 | * handled is (base + ngpio - 1). |
| 38 | * @desc: array of ngpio descriptors. Private. | 41 | * @desc: array of ngpio descriptors. Private. |
| 39 | * @can_sleep: flag must be set iff get()/set() methods sleep, as they | ||
| 40 | * must while accessing GPIO expander chips over I2C or SPI | ||
| 41 | * @names: if set, must be an array of strings to use as alternative | 42 | * @names: if set, must be an array of strings to use as alternative |
| 42 | * names for the GPIOs in this chip. Any entry in the array | 43 | * names for the GPIOs in this chip. Any entry in the array |
| 43 | * may be NULL if there is no alias for the GPIO, however the | 44 | * may be NULL if there is no alias for the GPIO, however the |
| 44 | * array must be @ngpio entries long. A name can include a single printk | 45 | * array must be @ngpio entries long. A name can include a single printk |
| 45 | * format specifier for an unsigned int. It is substituted by the actual | 46 | * format specifier for an unsigned int. It is substituted by the actual |
| 46 | * number of the gpio. | 47 | * number of the gpio. |
| 48 | * @can_sleep: flag must be set iff get()/set() methods sleep, as they | ||
| 49 | * must while accessing GPIO expander chips over I2C or SPI | ||
| 50 | * @exported: flags if the gpiochip is exported for use from sysfs. Private. | ||
| 47 | * | 51 | * |
| 48 | * A gpio_chip can help platforms abstract various sources of GPIOs so | 52 | * A gpio_chip can help platforms abstract various sources of GPIOs so |
| 49 | * they can all be accessed through a common programing interface. | 53 | * they can all be accessed through a common programing interface. |
| @@ -88,8 +92,8 @@ struct gpio_chip { | |||
| 88 | u16 ngpio; | 92 | u16 ngpio; |
| 89 | struct gpio_desc *desc; | 93 | struct gpio_desc *desc; |
| 90 | const char *const *names; | 94 | const char *const *names; |
| 91 | unsigned can_sleep:1; | 95 | bool can_sleep; |
| 92 | unsigned exported:1; | 96 | bool exported; |
| 93 | 97 | ||
| 94 | #if defined(CONFIG_OF_GPIO) | 98 | #if defined(CONFIG_OF_GPIO) |
| 95 | /* | 99 | /* |
| @@ -125,60 +129,58 @@ extern struct gpio_chip *gpiochip_find(void *data, | |||
| 125 | int gpiod_lock_as_irq(struct gpio_desc *desc); | 129 | int gpiod_lock_as_irq(struct gpio_desc *desc); |
| 126 | void gpiod_unlock_as_irq(struct gpio_desc *desc); | 130 | void gpiod_unlock_as_irq(struct gpio_desc *desc); |
| 127 | 131 | ||
| 132 | enum gpio_lookup_flags { | ||
| 133 | GPIO_ACTIVE_HIGH = (0 << 0), | ||
| 134 | GPIO_ACTIVE_LOW = (1 << 0), | ||
| 135 | GPIO_OPEN_DRAIN = (1 << 1), | ||
| 136 | GPIO_OPEN_SOURCE = (1 << 2), | ||
| 137 | }; | ||
| 138 | |||
| 128 | /** | 139 | /** |
| 129 | * Lookup table for associating GPIOs to specific devices and functions using | 140 | * struct gpiod_lookup - lookup table |
| 130 | * platform data. | 141 | * @chip_label: name of the chip the GPIO belongs to |
| 142 | * @chip_hwnum: hardware number (i.e. relative to the chip) of the GPIO | ||
| 143 | * @con_id: name of the GPIO from the device's point of view | ||
| 144 | * @idx: index of the GPIO in case several GPIOs share the same name | ||
| 145 | * @flags: mask of GPIO_* values | ||
| 146 | * | ||
| 147 | * gpiod_lookup is a lookup table for associating GPIOs to specific devices and | ||
| 148 | * functions using platform data. | ||
| 131 | */ | 149 | */ |
| 132 | struct gpiod_lookup { | 150 | struct gpiod_lookup { |
| 133 | struct list_head list; | ||
| 134 | /* | ||
| 135 | * name of the chip the GPIO belongs to | ||
| 136 | */ | ||
| 137 | const char *chip_label; | 151 | const char *chip_label; |
| 138 | /* | ||
| 139 | * hardware number (i.e. relative to the chip) of the GPIO | ||
| 140 | */ | ||
| 141 | u16 chip_hwnum; | 152 | u16 chip_hwnum; |
| 142 | /* | ||
| 143 | * name of device that can claim this GPIO | ||
| 144 | */ | ||
| 145 | const char *dev_id; | ||
| 146 | /* | ||
| 147 | * name of the GPIO from the device's point of view | ||
| 148 | */ | ||
| 149 | const char *con_id; | 153 | const char *con_id; |
| 150 | /* | ||
| 151 | * index of the GPIO in case several GPIOs share the same name | ||
| 152 | */ | ||
| 153 | unsigned int idx; | 154 | unsigned int idx; |
| 154 | /* | 155 | enum gpio_lookup_flags flags; |
| 155 | * mask of GPIOF_* values | 156 | }; |
| 156 | */ | 157 | |
| 157 | unsigned long flags; | 158 | struct gpiod_lookup_table { |
| 159 | struct list_head list; | ||
| 160 | const char *dev_id; | ||
| 161 | struct gpiod_lookup table[]; | ||
| 158 | }; | 162 | }; |
| 159 | 163 | ||
| 160 | /* | 164 | /* |
| 161 | * Simple definition of a single GPIO under a con_id | 165 | * Simple definition of a single GPIO under a con_id |
| 162 | */ | 166 | */ |
| 163 | #define GPIO_LOOKUP(_chip_label, _chip_hwnum, _dev_id, _con_id, _flags) \ | 167 | #define GPIO_LOOKUP(_chip_label, _chip_hwnum, _con_id, _flags) \ |
| 164 | GPIO_LOOKUP_IDX(_chip_label, _chip_hwnum, _dev_id, _con_id, 0, _flags) | 168 | GPIO_LOOKUP_IDX(_chip_label, _chip_hwnum, _con_id, 0, _flags) |
| 165 | 169 | ||
| 166 | /* | 170 | /* |
| 167 | * Use this macro if you need to have several GPIOs under the same con_id. | 171 | * Use this macro if you need to have several GPIOs under the same con_id. |
| 168 | * Each GPIO needs to use a different index and can be accessed using | 172 | * Each GPIO needs to use a different index and can be accessed using |
| 169 | * gpiod_get_index() | 173 | * gpiod_get_index() |
| 170 | */ | 174 | */ |
| 171 | #define GPIO_LOOKUP_IDX(_chip_label, _chip_hwnum, _dev_id, _con_id, _idx, \ | 175 | #define GPIO_LOOKUP_IDX(_chip_label, _chip_hwnum, _con_id, _idx, _flags) \ |
| 172 | _flags) \ | ||
| 173 | { \ | 176 | { \ |
| 174 | .chip_label = _chip_label, \ | 177 | .chip_label = _chip_label, \ |
| 175 | .chip_hwnum = _chip_hwnum, \ | 178 | .chip_hwnum = _chip_hwnum, \ |
| 176 | .dev_id = _dev_id, \ | ||
| 177 | .con_id = _con_id, \ | 179 | .con_id = _con_id, \ |
| 178 | .idx = _idx, \ | 180 | .idx = _idx, \ |
| 179 | .flags = _flags, \ | 181 | .flags = _flags, \ |
| 180 | } | 182 | } |
| 181 | 183 | ||
| 182 | void gpiod_add_table(struct gpiod_lookup *table, size_t size); | 184 | void gpiod_add_lookup_table(struct gpiod_lookup_table *table); |
| 183 | 185 | ||
| 184 | #endif | 186 | #endif |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index d9cf963ac832..12d5f972f23f 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include <linux/lockdep.h> | 5 | #include <linux/lockdep.h> |
| 6 | #include <linux/ftrace_irq.h> | 6 | #include <linux/ftrace_irq.h> |
| 7 | #include <linux/vtime.h> | 7 | #include <linux/vtime.h> |
| 8 | #include <asm/hardirq.h> | ||
| 8 | 9 | ||
| 9 | 10 | ||
| 10 | extern void synchronize_irq(unsigned int irq); | 11 | extern void synchronize_irq(unsigned int irq); |
diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h index a265af294ea4..b914ca3f57ba 100644 --- a/include/linux/hid-sensor-hub.h +++ b/include/linux/hid-sensor-hub.h | |||
| @@ -21,6 +21,8 @@ | |||
| 21 | 21 | ||
| 22 | #include <linux/hid.h> | 22 | #include <linux/hid.h> |
| 23 | #include <linux/hid-sensor-ids.h> | 23 | #include <linux/hid-sensor-ids.h> |
| 24 | #include <linux/iio/iio.h> | ||
| 25 | #include <linux/iio/trigger.h> | ||
| 24 | 26 | ||
| 25 | /** | 27 | /** |
| 26 | * struct hid_sensor_hub_attribute_info - Attribute info | 28 | * struct hid_sensor_hub_attribute_info - Attribute info |
| @@ -40,6 +42,8 @@ struct hid_sensor_hub_attribute_info { | |||
| 40 | s32 units; | 42 | s32 units; |
| 41 | s32 unit_expo; | 43 | s32 unit_expo; |
| 42 | s32 size; | 44 | s32 size; |
| 45 | s32 logical_minimum; | ||
| 46 | s32 logical_maximum; | ||
| 43 | }; | 47 | }; |
| 44 | 48 | ||
| 45 | /** | 49 | /** |
| @@ -184,6 +188,7 @@ struct hid_sensor_common { | |||
| 184 | struct platform_device *pdev; | 188 | struct platform_device *pdev; |
| 185 | unsigned usage_id; | 189 | unsigned usage_id; |
| 186 | bool data_ready; | 190 | bool data_ready; |
| 191 | struct iio_trigger *trigger; | ||
| 187 | struct hid_sensor_hub_attribute_info poll; | 192 | struct hid_sensor_hub_attribute_info poll; |
| 188 | struct hid_sensor_hub_attribute_info report_state; | 193 | struct hid_sensor_hub_attribute_info report_state; |
| 189 | struct hid_sensor_hub_attribute_info power_state; | 194 | struct hid_sensor_hub_attribute_info power_state; |
diff --git a/include/linux/hid-sensor-ids.h b/include/linux/hid-sensor-ids.h index 4f945d3ed49f..beaf965621c1 100644 --- a/include/linux/hid-sensor-ids.h +++ b/include/linux/hid-sensor-ids.h | |||
| @@ -23,22 +23,26 @@ | |||
| 23 | 23 | ||
| 24 | /* Accel 3D (200073) */ | 24 | /* Accel 3D (200073) */ |
| 25 | #define HID_USAGE_SENSOR_ACCEL_3D 0x200073 | 25 | #define HID_USAGE_SENSOR_ACCEL_3D 0x200073 |
| 26 | #define HID_USAGE_SENSOR_DATA_ACCELERATION 0x200452 | ||
| 26 | #define HID_USAGE_SENSOR_ACCEL_X_AXIS 0x200453 | 27 | #define HID_USAGE_SENSOR_ACCEL_X_AXIS 0x200453 |
| 27 | #define HID_USAGE_SENSOR_ACCEL_Y_AXIS 0x200454 | 28 | #define HID_USAGE_SENSOR_ACCEL_Y_AXIS 0x200454 |
| 28 | #define HID_USAGE_SENSOR_ACCEL_Z_AXIS 0x200455 | 29 | #define HID_USAGE_SENSOR_ACCEL_Z_AXIS 0x200455 |
| 29 | 30 | ||
| 30 | /* ALS (200041) */ | 31 | /* ALS (200041) */ |
| 31 | #define HID_USAGE_SENSOR_ALS 0x200041 | 32 | #define HID_USAGE_SENSOR_ALS 0x200041 |
| 33 | #define HID_USAGE_SENSOR_DATA_LIGHT 0x2004d0 | ||
| 32 | #define HID_USAGE_SENSOR_LIGHT_ILLUM 0x2004d1 | 34 | #define HID_USAGE_SENSOR_LIGHT_ILLUM 0x2004d1 |
| 33 | 35 | ||
| 34 | /* Gyro 3D: (200076) */ | 36 | /* Gyro 3D: (200076) */ |
| 35 | #define HID_USAGE_SENSOR_GYRO_3D 0x200076 | 37 | #define HID_USAGE_SENSOR_GYRO_3D 0x200076 |
| 38 | #define HID_USAGE_SENSOR_DATA_ANGL_VELOCITY 0x200456 | ||
| 36 | #define HID_USAGE_SENSOR_ANGL_VELOCITY_X_AXIS 0x200457 | 39 | #define HID_USAGE_SENSOR_ANGL_VELOCITY_X_AXIS 0x200457 |
| 37 | #define HID_USAGE_SENSOR_ANGL_VELOCITY_Y_AXIS 0x200458 | 40 | #define HID_USAGE_SENSOR_ANGL_VELOCITY_Y_AXIS 0x200458 |
| 38 | #define HID_USAGE_SENSOR_ANGL_VELOCITY_Z_AXIS 0x200459 | 41 | #define HID_USAGE_SENSOR_ANGL_VELOCITY_Z_AXIS 0x200459 |
| 39 | 42 | ||
| 40 | /* ORIENTATION: Compass 3D: (200083) */ | 43 | /* ORIENTATION: Compass 3D: (200083) */ |
| 41 | #define HID_USAGE_SENSOR_COMPASS_3D 0x200083 | 44 | #define HID_USAGE_SENSOR_COMPASS_3D 0x200083 |
| 45 | #define HID_USAGE_SENSOR_DATA_ORIENTATION 0x200470 | ||
| 42 | #define HID_USAGE_SENSOR_ORIENT_MAGN_HEADING 0x200471 | 46 | #define HID_USAGE_SENSOR_ORIENT_MAGN_HEADING 0x200471 |
| 43 | #define HID_USAGE_SENSOR_ORIENT_MAGN_HEADING_X 0x200472 | 47 | #define HID_USAGE_SENSOR_ORIENT_MAGN_HEADING_X 0x200472 |
| 44 | #define HID_USAGE_SENSOR_ORIENT_MAGN_HEADING_Y 0x200473 | 48 | #define HID_USAGE_SENSOR_ORIENT_MAGN_HEADING_Y 0x200473 |
| @@ -54,10 +58,14 @@ | |||
| 54 | #define HID_USAGE_SENSOR_ORIENT_DISTANCE_Y 0x20047B | 58 | #define HID_USAGE_SENSOR_ORIENT_DISTANCE_Y 0x20047B |
| 55 | #define HID_USAGE_SENSOR_ORIENT_DISTANCE_Z 0x20047C | 59 | #define HID_USAGE_SENSOR_ORIENT_DISTANCE_Z 0x20047C |
| 56 | #define HID_USAGE_SENSOR_ORIENT_DISTANCE_OUT_OF_RANGE 0x20047D | 60 | #define HID_USAGE_SENSOR_ORIENT_DISTANCE_OUT_OF_RANGE 0x20047D |
| 61 | |||
| 62 | /* ORIENTATION: Inclinometer 3D: (200086) */ | ||
| 63 | #define HID_USAGE_SENSOR_INCLINOMETER_3D 0x200086 | ||
| 57 | #define HID_USAGE_SENSOR_ORIENT_TILT 0x20047E | 64 | #define HID_USAGE_SENSOR_ORIENT_TILT 0x20047E |
| 58 | #define HID_USAGE_SENSOR_ORIENT_TILT_X 0x20047F | 65 | #define HID_USAGE_SENSOR_ORIENT_TILT_X 0x20047F |
| 59 | #define HID_USAGE_SENSOR_ORIENT_TILT_Y 0x200480 | 66 | #define HID_USAGE_SENSOR_ORIENT_TILT_Y 0x200480 |
| 60 | #define HID_USAGE_SENSOR_ORIENT_TILT_Z 0x200481 | 67 | #define HID_USAGE_SENSOR_ORIENT_TILT_Z 0x200481 |
| 68 | |||
| 61 | #define HID_USAGE_SENSOR_ORIENT_ROTATION_MATRIX 0x200482 | 69 | #define HID_USAGE_SENSOR_ORIENT_ROTATION_MATRIX 0x200482 |
| 62 | #define HID_USAGE_SENSOR_ORIENT_QUATERNION 0x200483 | 70 | #define HID_USAGE_SENSOR_ORIENT_QUATERNION 0x200483 |
| 63 | #define HID_USAGE_SENSOR_ORIENT_MAGN_FLUX 0x200484 | 71 | #define HID_USAGE_SENSOR_ORIENT_MAGN_FLUX 0x200484 |
| @@ -117,4 +125,20 @@ | |||
| 117 | #define HID_USAGE_SENSOR_PROP_REPORT_STATE 0x200316 | 125 | #define HID_USAGE_SENSOR_PROP_REPORT_STATE 0x200316 |
| 118 | #define HID_USAGE_SENSOR_PROY_POWER_STATE 0x200319 | 126 | #define HID_USAGE_SENSOR_PROY_POWER_STATE 0x200319 |
| 119 | 127 | ||
| 128 | /* Per data field properties */ | ||
| 129 | #define HID_USAGE_SENSOR_DATA_MOD_NONE 0x00 | ||
| 130 | #define HID_USAGE_SENSOR_DATA_MOD_CHANGE_SENSITIVITY_ABS 0x1000 | ||
| 131 | |||
| 132 | /* Power state enumerations */ | ||
| 133 | #define HID_USAGE_SENSOR_PROP_POWER_STATE_UNDEFINED_ENUM 0x00 | ||
| 134 | #define HID_USAGE_SENSOR_PROP_POWER_STATE_D0_FULL_POWER_ENUM 0x01 | ||
| 135 | #define HID_USAGE_SENSOR_PROP_POWER_STATE_D1_LOW_POWER_ENUM 0x02 | ||
| 136 | #define HID_USAGE_SENSOR_PROP_POWER_STATE_D2_STANDBY_WITH_WAKE_ENUM 0x03 | ||
| 137 | #define HID_USAGE_SENSOR_PROP_POWER_STATE_D3_SLEEP_WITH_WAKE_ENUM 0x04 | ||
| 138 | #define HID_USAGE_SENSOR_PROP_POWER_STATE_D4_POWER_OFF_ENUM 0x05 | ||
| 139 | |||
| 140 | /* Report State enumerations */ | ||
| 141 | #define HID_USAGE_SENSOR_PROP_REPORTING_STATE_NO_EVENTS_ENUM 0x00 | ||
| 142 | #define HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM 0x01 | ||
| 143 | |||
| 120 | #endif | 144 | #endif |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 9649ff0c63f8..bd7e98752222 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
| @@ -142,7 +142,10 @@ static inline int dequeue_hwpoisoned_huge_page(struct page *page) | |||
| 142 | return 0; | 142 | return 0; |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | #define isolate_huge_page(p, l) false | 145 | static inline bool isolate_huge_page(struct page *page, struct list_head *list) |
| 146 | { | ||
| 147 | return false; | ||
| 148 | } | ||
| 146 | #define putback_active_hugepage(p) do {} while (0) | 149 | #define putback_active_hugepage(p) do {} while (0) |
| 147 | #define is_hugepage_active(x) false | 150 | #define is_hugepage_active(x) false |
| 148 | 151 | ||
diff --git a/include/linux/i2c-pnx.h b/include/linux/i2c-pnx.h index 49ed17fdf055..5388326fbbff 100644 --- a/include/linux/i2c-pnx.h +++ b/include/linux/i2c-pnx.h | |||
| @@ -31,7 +31,6 @@ struct i2c_pnx_algo_data { | |||
| 31 | int last; | 31 | int last; |
| 32 | struct clk *clk; | 32 | struct clk *clk; |
| 33 | struct i2c_adapter adapter; | 33 | struct i2c_adapter adapter; |
| 34 | phys_addr_t base; | ||
| 35 | int irq; | 34 | int irq; |
| 36 | u32 timeout; | 35 | u32 timeout; |
| 37 | }; | 36 | }; |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index eff50e062be8..d9c8dbd3373f 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -445,7 +445,7 @@ static inline void i2c_set_adapdata(struct i2c_adapter *dev, void *data) | |||
| 445 | static inline struct i2c_adapter * | 445 | static inline struct i2c_adapter * |
| 446 | i2c_parent_is_i2c_adapter(const struct i2c_adapter *adapter) | 446 | i2c_parent_is_i2c_adapter(const struct i2c_adapter *adapter) |
| 447 | { | 447 | { |
| 448 | #if IS_ENABLED(I2C_MUX) | 448 | #if IS_ENABLED(CONFIG_I2C_MUX) |
| 449 | struct device *parent = adapter->dev.parent; | 449 | struct device *parent = adapter->dev.parent; |
| 450 | 450 | ||
| 451 | if (parent != NULL && parent->type == &i2c_adapter_type) | 451 | if (parent != NULL && parent->type == &i2c_adapter_type) |
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 673a3ce67f31..ade1c06d4ceb 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
| @@ -175,6 +175,9 @@ static inline int twl_class_is_ ##class(void) \ | |||
| 175 | TWL_CLASS_IS(4030, TWL4030_CLASS_ID) | 175 | TWL_CLASS_IS(4030, TWL4030_CLASS_ID) |
| 176 | TWL_CLASS_IS(6030, TWL6030_CLASS_ID) | 176 | TWL_CLASS_IS(6030, TWL6030_CLASS_ID) |
| 177 | 177 | ||
| 178 | /* Set the regcache bypass for the regmap associated with the nodule */ | ||
| 179 | int twl_set_regcache_bypass(u8 mod_no, bool enable); | ||
| 180 | |||
| 178 | /* | 181 | /* |
| 179 | * Read and write several 8-bit registers at once. | 182 | * Read and write several 8-bit registers at once. |
| 180 | */ | 183 | */ |
| @@ -667,8 +670,6 @@ struct twl4030_codec_data { | |||
| 667 | unsigned int digimic_delay; /* in ms */ | 670 | unsigned int digimic_delay; /* in ms */ |
| 668 | unsigned int ramp_delay_value; | 671 | unsigned int ramp_delay_value; |
| 669 | unsigned int offset_cncl_path; | 672 | unsigned int offset_cncl_path; |
| 670 | unsigned int check_defaults:1; | ||
| 671 | unsigned int reset_registers:1; | ||
| 672 | unsigned int hs_extmute:1; | 673 | unsigned int hs_extmute:1; |
| 673 | int hs_extmute_gpio; | 674 | int hs_extmute_gpio; |
| 674 | }; | 675 | }; |
diff --git a/include/linux/iio/buffer.h b/include/linux/iio/buffer.h index 15607b45221a..519392763393 100644 --- a/include/linux/iio/buffer.h +++ b/include/linux/iio/buffer.h | |||
| @@ -21,6 +21,8 @@ struct iio_buffer; | |||
| 21 | * struct iio_buffer_access_funcs - access functions for buffers. | 21 | * struct iio_buffer_access_funcs - access functions for buffers. |
| 22 | * @store_to: actually store stuff to the buffer | 22 | * @store_to: actually store stuff to the buffer |
| 23 | * @read_first_n: try to get a specified number of bytes (must exist) | 23 | * @read_first_n: try to get a specified number of bytes (must exist) |
| 24 | * @data_available: indicates whether data for reading from the buffer is | ||
| 25 | * available. | ||
| 24 | * @request_update: if a parameter change has been marked, update underlying | 26 | * @request_update: if a parameter change has been marked, update underlying |
| 25 | * storage. | 27 | * storage. |
| 26 | * @get_bytes_per_datum:get current bytes per datum | 28 | * @get_bytes_per_datum:get current bytes per datum |
| @@ -43,6 +45,7 @@ struct iio_buffer_access_funcs { | |||
| 43 | int (*read_first_n)(struct iio_buffer *buffer, | 45 | int (*read_first_n)(struct iio_buffer *buffer, |
| 44 | size_t n, | 46 | size_t n, |
| 45 | char __user *buf); | 47 | char __user *buf); |
| 48 | bool (*data_available)(struct iio_buffer *buffer); | ||
| 46 | 49 | ||
| 47 | int (*request_update)(struct iio_buffer *buffer); | 50 | int (*request_update)(struct iio_buffer *buffer); |
| 48 | 51 | ||
diff --git a/include/linux/iio/events.h b/include/linux/iio/events.h index 5dab2c41031f..8bbd7bc1043d 100644 --- a/include/linux/iio/events.h +++ b/include/linux/iio/events.h | |||
| @@ -46,10 +46,6 @@ struct iio_event_data { | |||
| 46 | ((u16)chan)) | 46 | ((u16)chan)) |
| 47 | 47 | ||
| 48 | 48 | ||
| 49 | #define IIO_EV_DIR_MAX 4 | ||
| 50 | #define IIO_EV_BIT(type, direction) \ | ||
| 51 | (1 << (type*IIO_EV_DIR_MAX + direction)) | ||
| 52 | |||
| 53 | /** | 49 | /** |
| 54 | * IIO_MOD_EVENT_CODE() - create event identifier for modified channels | 50 | * IIO_MOD_EVENT_CODE() - create event identifier for modified channels |
| 55 | * @chan_type: Type of the channel. Should be one of enum iio_chan_type. | 51 | * @chan_type: Type of the channel. Should be one of enum iio_chan_type. |
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index 256a90a1bea6..75a8a20c8179 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h | |||
| @@ -185,7 +185,6 @@ struct iio_event_spec { | |||
| 185 | * by all channels of the same direction. | 185 | * by all channels of the same direction. |
| 186 | * @info_mask_shared_by_all: What information is to be exported that is shared | 186 | * @info_mask_shared_by_all: What information is to be exported that is shared |
| 187 | * by all channels. | 187 | * by all channels. |
| 188 | * @event_mask: What events can this channel produce. | ||
| 189 | * @event_spec: Array of events which should be registered for this | 188 | * @event_spec: Array of events which should be registered for this |
| 190 | * channel. | 189 | * channel. |
| 191 | * @num_event_specs: Size of the event_spec array. | 190 | * @num_event_specs: Size of the event_spec array. |
| @@ -226,7 +225,6 @@ struct iio_chan_spec { | |||
| 226 | long info_mask_shared_by_type; | 225 | long info_mask_shared_by_type; |
| 227 | long info_mask_shared_by_dir; | 226 | long info_mask_shared_by_dir; |
| 228 | long info_mask_shared_by_all; | 227 | long info_mask_shared_by_all; |
| 229 | long event_mask; | ||
| 230 | const struct iio_event_spec *event_spec; | 228 | const struct iio_event_spec *event_spec; |
| 231 | unsigned int num_event_specs; | 229 | unsigned int num_event_specs; |
| 232 | const struct iio_chan_spec_ext_info *ext_info; | 230 | const struct iio_chan_spec_ext_info *ext_info; |
| @@ -307,16 +305,8 @@ struct iio_dev; | |||
| 307 | * returns IIO_VAL_INT_PLUS_MICRO. | 305 | * returns IIO_VAL_INT_PLUS_MICRO. |
| 308 | * @read_event_config: find out if the event is enabled. | 306 | * @read_event_config: find out if the event is enabled. |
| 309 | * @write_event_config: set if the event is enabled. | 307 | * @write_event_config: set if the event is enabled. |
| 310 | * @read_event_value: read a value associated with the event. Meaning | 308 | * @read_event_value: read a configuration value associated with the event. |
| 311 | * is event dependant. event_code specifies which event. | 309 | * @write_event_value: write a configuration value for the event. |
| 312 | * @write_event_value: write the value associated with the event. | ||
| 313 | * Meaning is event dependent. | ||
| 314 | * @read_event_config_new: find out if the event is enabled. New style interface. | ||
| 315 | * @write_event_config_new: set if the event is enabled. New style interface. | ||
| 316 | * @read_event_value_new: read a configuration value associated with the event. | ||
| 317 | * New style interface. | ||
| 318 | * @write_event_value_new: write a configuration value for the event. New style | ||
| 319 | * interface. | ||
| 320 | * @validate_trigger: function to validate the trigger when the | 310 | * @validate_trigger: function to validate the trigger when the |
| 321 | * current trigger gets changed. | 311 | * current trigger gets changed. |
| 322 | * @update_scan_mode: function to configure device and scan buffer when | 312 | * @update_scan_mode: function to configure device and scan buffer when |
| @@ -345,37 +335,23 @@ struct iio_info { | |||
| 345 | long mask); | 335 | long mask); |
| 346 | 336 | ||
| 347 | int (*read_event_config)(struct iio_dev *indio_dev, | 337 | int (*read_event_config)(struct iio_dev *indio_dev, |
| 348 | u64 event_code); | ||
| 349 | |||
| 350 | int (*write_event_config)(struct iio_dev *indio_dev, | ||
| 351 | u64 event_code, | ||
| 352 | int state); | ||
| 353 | |||
| 354 | int (*read_event_value)(struct iio_dev *indio_dev, | ||
| 355 | u64 event_code, | ||
| 356 | int *val); | ||
| 357 | int (*write_event_value)(struct iio_dev *indio_dev, | ||
| 358 | u64 event_code, | ||
| 359 | int val); | ||
| 360 | |||
| 361 | int (*read_event_config_new)(struct iio_dev *indio_dev, | ||
| 362 | const struct iio_chan_spec *chan, | 338 | const struct iio_chan_spec *chan, |
| 363 | enum iio_event_type type, | 339 | enum iio_event_type type, |
| 364 | enum iio_event_direction dir); | 340 | enum iio_event_direction dir); |
| 365 | 341 | ||
| 366 | int (*write_event_config_new)(struct iio_dev *indio_dev, | 342 | int (*write_event_config)(struct iio_dev *indio_dev, |
| 367 | const struct iio_chan_spec *chan, | 343 | const struct iio_chan_spec *chan, |
| 368 | enum iio_event_type type, | 344 | enum iio_event_type type, |
| 369 | enum iio_event_direction dir, | 345 | enum iio_event_direction dir, |
| 370 | int state); | 346 | int state); |
| 371 | 347 | ||
| 372 | int (*read_event_value_new)(struct iio_dev *indio_dev, | 348 | int (*read_event_value)(struct iio_dev *indio_dev, |
| 373 | const struct iio_chan_spec *chan, | 349 | const struct iio_chan_spec *chan, |
| 374 | enum iio_event_type type, | 350 | enum iio_event_type type, |
| 375 | enum iio_event_direction dir, | 351 | enum iio_event_direction dir, |
| 376 | enum iio_event_info info, int *val, int *val2); | 352 | enum iio_event_info info, int *val, int *val2); |
| 377 | 353 | ||
| 378 | int (*write_event_value_new)(struct iio_dev *indio_dev, | 354 | int (*write_event_value)(struct iio_dev *indio_dev, |
| 379 | const struct iio_chan_spec *chan, | 355 | const struct iio_chan_spec *chan, |
| 380 | enum iio_event_type type, | 356 | enum iio_event_type type, |
| 381 | enum iio_event_direction dir, | 357 | enum iio_event_direction dir, |
| @@ -490,32 +466,12 @@ struct iio_dev { | |||
| 490 | #endif | 466 | #endif |
| 491 | }; | 467 | }; |
| 492 | 468 | ||
| 493 | /** | ||
| 494 | * iio_find_channel_from_si() - get channel from its scan index | ||
| 495 | * @indio_dev: device | ||
| 496 | * @si: scan index to match | ||
| 497 | */ | ||
| 498 | const struct iio_chan_spec | 469 | const struct iio_chan_spec |
| 499 | *iio_find_channel_from_si(struct iio_dev *indio_dev, int si); | 470 | *iio_find_channel_from_si(struct iio_dev *indio_dev, int si); |
| 500 | |||
| 501 | /** | ||
| 502 | * iio_device_register() - register a device with the IIO subsystem | ||
| 503 | * @indio_dev: Device structure filled by the device driver | ||
| 504 | **/ | ||
| 505 | int iio_device_register(struct iio_dev *indio_dev); | 471 | int iio_device_register(struct iio_dev *indio_dev); |
| 506 | |||
| 507 | /** | ||
| 508 | * iio_device_unregister() - unregister a device from the IIO subsystem | ||
| 509 | * @indio_dev: Device structure representing the device. | ||
| 510 | **/ | ||
| 511 | void iio_device_unregister(struct iio_dev *indio_dev); | 472 | void iio_device_unregister(struct iio_dev *indio_dev); |
| 512 | 473 | int devm_iio_device_register(struct device *dev, struct iio_dev *indio_dev); | |
| 513 | /** | 474 | void devm_iio_device_unregister(struct device *dev, struct iio_dev *indio_dev); |
| 514 | * iio_push_event() - try to add event to the list for userspace reading | ||
| 515 | * @indio_dev: IIO device structure | ||
| 516 | * @ev_code: What event | ||
| 517 | * @timestamp: When the event occurred | ||
| 518 | **/ | ||
| 519 | int iio_push_event(struct iio_dev *indio_dev, u64 ev_code, s64 timestamp); | 475 | int iio_push_event(struct iio_dev *indio_dev, u64 ev_code, s64 timestamp); |
| 520 | 476 | ||
| 521 | extern struct bus_type iio_bus_type; | 477 | extern struct bus_type iio_bus_type; |
| @@ -579,10 +535,6 @@ static inline void *iio_device_get_drvdata(struct iio_dev *indio_dev) | |||
| 579 | 535 | ||
| 580 | /* Can we make this smaller? */ | 536 | /* Can we make this smaller? */ |
| 581 | #define IIO_ALIGN L1_CACHE_BYTES | 537 | #define IIO_ALIGN L1_CACHE_BYTES |
| 582 | /** | ||
| 583 | * iio_device_alloc() - allocate an iio_dev from a driver | ||
| 584 | * @sizeof_priv: Space to allocate for private structure. | ||
| 585 | **/ | ||
| 586 | struct iio_dev *iio_device_alloc(int sizeof_priv); | 538 | struct iio_dev *iio_device_alloc(int sizeof_priv); |
| 587 | 539 | ||
| 588 | static inline void *iio_priv(const struct iio_dev *indio_dev) | 540 | static inline void *iio_priv(const struct iio_dev *indio_dev) |
| @@ -596,64 +548,11 @@ static inline struct iio_dev *iio_priv_to_dev(void *priv) | |||
| 596 | ALIGN(sizeof(struct iio_dev), IIO_ALIGN)); | 548 | ALIGN(sizeof(struct iio_dev), IIO_ALIGN)); |
| 597 | } | 549 | } |
| 598 | 550 | ||
| 599 | /** | ||
| 600 | * iio_device_free() - free an iio_dev from a driver | ||
| 601 | * @indio_dev: the iio_dev associated with the device | ||
| 602 | **/ | ||
| 603 | void iio_device_free(struct iio_dev *indio_dev); | 551 | void iio_device_free(struct iio_dev *indio_dev); |
| 604 | |||
| 605 | /** | ||
| 606 | * devm_iio_device_alloc - Resource-managed iio_device_alloc() | ||
| 607 | * @dev: Device to allocate iio_dev for | ||
| 608 | * @sizeof_priv: Space to allocate for private structure. | ||
| 609 | * | ||
| 610 | * Managed iio_device_alloc. iio_dev allocated with this function is | ||
| 611 | * automatically freed on driver detach. | ||
| 612 | * | ||
| 613 | * If an iio_dev allocated with this function needs to be freed separately, | ||
| 614 | * devm_iio_device_free() must be used. | ||
| 615 | * | ||
| 616 | * RETURNS: | ||
| 617 | * Pointer to allocated iio_dev on success, NULL on failure. | ||
| 618 | */ | ||
| 619 | struct iio_dev *devm_iio_device_alloc(struct device *dev, int sizeof_priv); | 552 | struct iio_dev *devm_iio_device_alloc(struct device *dev, int sizeof_priv); |
| 620 | |||
| 621 | /** | ||
| 622 | * devm_iio_device_free - Resource-managed iio_device_free() | ||
| 623 | * @dev: Device this iio_dev belongs to | ||
| 624 | * @indio_dev: the iio_dev associated with the device | ||
| 625 | * | ||
| 626 | * Free iio_dev allocated with devm_iio_device_alloc(). | ||
| 627 | */ | ||
| 628 | void devm_iio_device_free(struct device *dev, struct iio_dev *indio_dev); | 553 | void devm_iio_device_free(struct device *dev, struct iio_dev *indio_dev); |
| 629 | |||
| 630 | /** | ||
| 631 | * devm_iio_trigger_alloc - Resource-managed iio_trigger_alloc() | ||
| 632 | * @dev: Device to allocate iio_trigger for | ||
| 633 | * @fmt: trigger name format. If it includes format | ||
| 634 | * specifiers, the additional arguments following | ||
| 635 | * format are formatted and inserted in the resulting | ||
| 636 | * string replacing their respective specifiers. | ||
| 637 | * | ||
| 638 | * Managed iio_trigger_alloc. iio_trigger allocated with this function is | ||
| 639 | * automatically freed on driver detach. | ||
| 640 | * | ||
| 641 | * If an iio_trigger allocated with this function needs to be freed separately, | ||
| 642 | * devm_iio_trigger_free() must be used. | ||
| 643 | * | ||
| 644 | * RETURNS: | ||
| 645 | * Pointer to allocated iio_trigger on success, NULL on failure. | ||
| 646 | */ | ||
| 647 | struct iio_trigger *devm_iio_trigger_alloc(struct device *dev, | 554 | struct iio_trigger *devm_iio_trigger_alloc(struct device *dev, |
| 648 | const char *fmt, ...); | 555 | const char *fmt, ...); |
| 649 | |||
| 650 | /** | ||
| 651 | * devm_iio_trigger_free - Resource-managed iio_trigger_free() | ||
| 652 | * @dev: Device this iio_dev belongs to | ||
| 653 | * @iio_trig: the iio_trigger associated with the device | ||
| 654 | * | ||
| 655 | * Free iio_trigger allocated with devm_iio_trigger_alloc(). | ||
| 656 | */ | ||
| 657 | void devm_iio_trigger_free(struct device *dev, struct iio_trigger *iio_trig); | 556 | void devm_iio_trigger_free(struct device *dev, struct iio_trigger *iio_trig); |
| 658 | 557 | ||
| 659 | /** | 558 | /** |
diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h index 4ac928ee31c5..084d882fe01b 100644 --- a/include/linux/iio/types.h +++ b/include/linux/iio/types.h | |||
| @@ -29,6 +29,7 @@ enum iio_chan_type { | |||
| 29 | IIO_ALTVOLTAGE, | 29 | IIO_ALTVOLTAGE, |
| 30 | IIO_CCT, | 30 | IIO_CCT, |
| 31 | IIO_PRESSURE, | 31 | IIO_PRESSURE, |
| 32 | IIO_HUMIDITYRELATIVE, | ||
| 32 | }; | 33 | }; |
| 33 | 34 | ||
| 34 | enum iio_modifier { | 35 | enum iio_modifier { |
diff --git a/include/linux/init.h b/include/linux/init.h index 8e68a64bfe00..e1688802964f 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
| @@ -286,9 +286,11 @@ void __init parse_early_options(char *cmdline); | |||
| 286 | #define arch_initcall(fn) module_init(fn) | 286 | #define arch_initcall(fn) module_init(fn) |
| 287 | #define subsys_initcall(fn) module_init(fn) | 287 | #define subsys_initcall(fn) module_init(fn) |
| 288 | #define fs_initcall(fn) module_init(fn) | 288 | #define fs_initcall(fn) module_init(fn) |
| 289 | #define rootfs_initcall(fn) module_init(fn) | ||
| 289 | #define device_initcall(fn) module_init(fn) | 290 | #define device_initcall(fn) module_init(fn) |
| 290 | #define late_initcall(fn) module_init(fn) | 291 | #define late_initcall(fn) module_init(fn) |
| 291 | 292 | ||
| 293 | #define console_initcall(fn) module_init(fn) | ||
| 292 | #define security_initcall(fn) module_init(fn) | 294 | #define security_initcall(fn) module_init(fn) |
| 293 | 295 | ||
| 294 | /* Each module must use one module_init(). */ | 296 | /* Each module must use one module_init(). */ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index b0ed422e4e4a..f0e52383a001 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include <linux/user_namespace.h> | 11 | #include <linux/user_namespace.h> |
| 12 | #include <linux/securebits.h> | 12 | #include <linux/securebits.h> |
| 13 | #include <linux/seqlock.h> | 13 | #include <linux/seqlock.h> |
| 14 | #include <linux/rbtree.h> | ||
| 14 | #include <net/net_namespace.h> | 15 | #include <net/net_namespace.h> |
| 15 | #include <linux/sched/rt.h> | 16 | #include <linux/sched/rt.h> |
| 16 | 17 | ||
| @@ -154,6 +155,14 @@ extern struct task_group root_task_group; | |||
| 154 | 155 | ||
| 155 | #define INIT_TASK_COMM "swapper" | 156 | #define INIT_TASK_COMM "swapper" |
| 156 | 157 | ||
| 158 | #ifdef CONFIG_RT_MUTEXES | ||
| 159 | # define INIT_RT_MUTEXES(tsk) \ | ||
| 160 | .pi_waiters = RB_ROOT, \ | ||
| 161 | .pi_waiters_leftmost = NULL, | ||
| 162 | #else | ||
| 163 | # define INIT_RT_MUTEXES(tsk) | ||
| 164 | #endif | ||
| 165 | |||
| 157 | /* | 166 | /* |
| 158 | * INIT_TASK is used to set up the first task table, touch at | 167 | * INIT_TASK is used to set up the first task table, touch at |
| 159 | * your own risk!. Base=0, limit=0x1fffff (=2MB) | 168 | * your own risk!. Base=0, limit=0x1fffff (=2MB) |
| @@ -221,6 +230,7 @@ extern struct task_group root_task_group; | |||
| 221 | INIT_TRACE_RECURSION \ | 230 | INIT_TRACE_RECURSION \ |
| 222 | INIT_TASK_RCU_PREEMPT(tsk) \ | 231 | INIT_TASK_RCU_PREEMPT(tsk) \ |
| 223 | INIT_CPUSET_SEQ(tsk) \ | 232 | INIT_CPUSET_SEQ(tsk) \ |
| 233 | INIT_RT_MUTEXES(tsk) \ | ||
| 224 | INIT_VTIME(tsk) \ | 234 | INIT_VTIME(tsk) \ |
| 225 | } | 235 | } |
| 226 | 236 | ||
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 5d89d1b808a6..c56c350324e4 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | #include <uapi/linux/ipv6.h> | 4 | #include <uapi/linux/ipv6.h> |
| 5 | 5 | ||
| 6 | #define ipv6_optlen(p) (((p)->hdrlen+1) << 3) | 6 | #define ipv6_optlen(p) (((p)->hdrlen+1) << 3) |
| 7 | #define ipv6_authlen(p) (((p)->hdrlen+2) << 2) | ||
| 7 | /* | 8 | /* |
| 8 | * This structure contains configuration options per IPv6 link. | 9 | * This structure contains configuration options per IPv6 link. |
| 9 | */ | 10 | */ |
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 56fb646909dc..26e2661d3935 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
| @@ -152,6 +152,14 @@ static inline int irq_balancing_disabled(unsigned int irq) | |||
| 152 | return desc->status_use_accessors & IRQ_NO_BALANCING_MASK; | 152 | return desc->status_use_accessors & IRQ_NO_BALANCING_MASK; |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | static inline int irq_is_percpu(unsigned int irq) | ||
| 156 | { | ||
| 157 | struct irq_desc *desc; | ||
| 158 | |||
| 159 | desc = irq_to_desc(irq); | ||
| 160 | return desc->status_use_accessors & IRQ_PER_CPU; | ||
| 161 | } | ||
| 162 | |||
| 155 | static inline void | 163 | static inline void |
| 156 | irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class) | 164 | irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class) |
| 157 | { | 165 | { |
diff --git a/include/linux/irqreturn.h b/include/linux/irqreturn.h index 714ba08dc092..e374e369fb2f 100644 --- a/include/linux/irqreturn.h +++ b/include/linux/irqreturn.h | |||
| @@ -14,6 +14,6 @@ enum irqreturn { | |||
| 14 | }; | 14 | }; |
| 15 | 15 | ||
| 16 | typedef enum irqreturn irqreturn_t; | 16 | typedef enum irqreturn irqreturn_t; |
| 17 | #define IRQ_RETVAL(x) ((x) != IRQ_NONE) | 17 | #define IRQ_RETVAL(x) ((x) ? IRQ_HANDLED : IRQ_NONE) |
| 18 | 18 | ||
| 19 | #endif | 19 | #endif |
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index 39999775b922..5c1dfb2a9e73 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h | |||
| @@ -81,18 +81,21 @@ struct module; | |||
| 81 | #include <linux/atomic.h> | 81 | #include <linux/atomic.h> |
| 82 | #ifdef HAVE_JUMP_LABEL | 82 | #ifdef HAVE_JUMP_LABEL |
| 83 | 83 | ||
| 84 | #define JUMP_LABEL_TRUE_BRANCH 1UL | 84 | #define JUMP_LABEL_TYPE_FALSE_BRANCH 0UL |
| 85 | #define JUMP_LABEL_TYPE_TRUE_BRANCH 1UL | ||
| 86 | #define JUMP_LABEL_TYPE_MASK 1UL | ||
| 85 | 87 | ||
| 86 | static | 88 | static |
| 87 | inline struct jump_entry *jump_label_get_entries(struct static_key *key) | 89 | inline struct jump_entry *jump_label_get_entries(struct static_key *key) |
| 88 | { | 90 | { |
| 89 | return (struct jump_entry *)((unsigned long)key->entries | 91 | return (struct jump_entry *)((unsigned long)key->entries |
| 90 | & ~JUMP_LABEL_TRUE_BRANCH); | 92 | & ~JUMP_LABEL_TYPE_MASK); |
| 91 | } | 93 | } |
| 92 | 94 | ||
| 93 | static inline bool jump_label_get_branch_default(struct static_key *key) | 95 | static inline bool jump_label_get_branch_default(struct static_key *key) |
| 94 | { | 96 | { |
| 95 | if ((unsigned long)key->entries & JUMP_LABEL_TRUE_BRANCH) | 97 | if (((unsigned long)key->entries & JUMP_LABEL_TYPE_MASK) == |
| 98 | JUMP_LABEL_TYPE_TRUE_BRANCH) | ||
| 96 | return true; | 99 | return true; |
| 97 | return false; | 100 | return false; |
| 98 | } | 101 | } |
| @@ -122,10 +125,12 @@ extern void static_key_slow_inc(struct static_key *key); | |||
| 122 | extern void static_key_slow_dec(struct static_key *key); | 125 | extern void static_key_slow_dec(struct static_key *key); |
| 123 | extern void jump_label_apply_nops(struct module *mod); | 126 | extern void jump_label_apply_nops(struct module *mod); |
| 124 | 127 | ||
| 125 | #define STATIC_KEY_INIT_TRUE ((struct static_key) \ | 128 | #define STATIC_KEY_INIT_TRUE ((struct static_key) \ |
| 126 | { .enabled = ATOMIC_INIT(1), .entries = (void *)1 }) | 129 | { .enabled = ATOMIC_INIT(1), \ |
| 127 | #define STATIC_KEY_INIT_FALSE ((struct static_key) \ | 130 | .entries = (void *)JUMP_LABEL_TYPE_TRUE_BRANCH }) |
| 128 | { .enabled = ATOMIC_INIT(0), .entries = (void *)0 }) | 131 | #define STATIC_KEY_INIT_FALSE ((struct static_key) \ |
| 132 | { .enabled = ATOMIC_INIT(0), \ | ||
| 133 | .entries = (void *)JUMP_LABEL_TYPE_FALSE_BRANCH }) | ||
| 129 | 134 | ||
| 130 | #else /* !HAVE_JUMP_LABEL */ | 135 | #else /* !HAVE_JUMP_LABEL */ |
| 131 | 136 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index d4e98d13eff4..2aa3d4b000e6 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -193,7 +193,8 @@ extern int _cond_resched(void); | |||
| 193 | (__x < 0) ? -__x : __x; \ | 193 | (__x < 0) ? -__x : __x; \ |
| 194 | }) | 194 | }) |
| 195 | 195 | ||
| 196 | #if defined(CONFIG_PROVE_LOCKING) || defined(CONFIG_DEBUG_ATOMIC_SLEEP) | 196 | #if defined(CONFIG_MMU) && \ |
| 197 | (defined(CONFIG_PROVE_LOCKING) || defined(CONFIG_DEBUG_ATOMIC_SLEEP)) | ||
| 197 | void might_fault(void); | 198 | void might_fault(void); |
| 198 | #else | 199 | #else |
| 199 | static inline void might_fault(void) { } | 200 | static inline void might_fault(void) { } |
| @@ -393,6 +394,15 @@ extern int panic_on_oops; | |||
| 393 | extern int panic_on_unrecovered_nmi; | 394 | extern int panic_on_unrecovered_nmi; |
| 394 | extern int panic_on_io_nmi; | 395 | extern int panic_on_io_nmi; |
| 395 | extern int sysctl_panic_on_stackoverflow; | 396 | extern int sysctl_panic_on_stackoverflow; |
| 397 | /* | ||
| 398 | * Only to be used by arch init code. If the user over-wrote the default | ||
| 399 | * CONFIG_PANIC_TIMEOUT, honor it. | ||
| 400 | */ | ||
| 401 | static inline void set_arch_panic_timeout(int timeout, int arch_default_timeout) | ||
| 402 | { | ||
| 403 | if (panic_timeout == arch_default_timeout) | ||
| 404 | panic_timeout = timeout; | ||
| 405 | } | ||
| 396 | extern const char *print_tainted(void); | 406 | extern const char *print_tainted(void); |
| 397 | enum lockdep_ok { | 407 | enum lockdep_ok { |
| 398 | LOCKDEP_STILL_OK, | 408 | LOCKDEP_STILL_OK, |
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h new file mode 100644 index 000000000000..5be9f0228a3b --- /dev/null +++ b/include/linux/kernfs.h | |||
| @@ -0,0 +1,376 @@ | |||
| 1 | /* | ||
| 2 | * kernfs.h - pseudo filesystem decoupled from vfs locking | ||
| 3 | * | ||
| 4 | * This file is released under the GPLv2. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #ifndef __LINUX_KERNFS_H | ||
| 8 | #define __LINUX_KERNFS_H | ||
| 9 | |||
| 10 | #include <linux/kernel.h> | ||
| 11 | #include <linux/err.h> | ||
| 12 | #include <linux/list.h> | ||
| 13 | #include <linux/mutex.h> | ||
| 14 | #include <linux/idr.h> | ||
| 15 | #include <linux/lockdep.h> | ||
| 16 | #include <linux/rbtree.h> | ||
| 17 | #include <linux/atomic.h> | ||
| 18 | #include <linux/completion.h> | ||
| 19 | |||
| 20 | struct file; | ||
| 21 | struct dentry; | ||
| 22 | struct iattr; | ||
| 23 | struct seq_file; | ||
| 24 | struct vm_area_struct; | ||
| 25 | struct super_block; | ||
| 26 | struct file_system_type; | ||
| 27 | |||
| 28 | struct kernfs_open_node; | ||
| 29 | struct kernfs_iattrs; | ||
| 30 | |||
| 31 | enum kernfs_node_type { | ||
| 32 | KERNFS_DIR = 0x0001, | ||
| 33 | KERNFS_FILE = 0x0002, | ||
| 34 | KERNFS_LINK = 0x0004, | ||
| 35 | }; | ||
| 36 | |||
| 37 | #define KERNFS_TYPE_MASK 0x000f | ||
| 38 | #define KERNFS_ACTIVE_REF KERNFS_FILE | ||
| 39 | #define KERNFS_FLAG_MASK ~KERNFS_TYPE_MASK | ||
| 40 | |||
| 41 | enum kernfs_node_flag { | ||
| 42 | KERNFS_REMOVED = 0x0010, | ||
| 43 | KERNFS_NS = 0x0020, | ||
| 44 | KERNFS_HAS_SEQ_SHOW = 0x0040, | ||
| 45 | KERNFS_HAS_MMAP = 0x0080, | ||
| 46 | KERNFS_LOCKDEP = 0x0100, | ||
| 47 | KERNFS_STATIC_NAME = 0x0200, | ||
| 48 | }; | ||
| 49 | |||
| 50 | /* type-specific structures for kernfs_node union members */ | ||
| 51 | struct kernfs_elem_dir { | ||
| 52 | unsigned long subdirs; | ||
| 53 | /* children rbtree starts here and goes through kn->rb */ | ||
| 54 | struct rb_root children; | ||
| 55 | |||
| 56 | /* | ||
| 57 | * The kernfs hierarchy this directory belongs to. This fits | ||
| 58 | * better directly in kernfs_node but is here to save space. | ||
| 59 | */ | ||
| 60 | struct kernfs_root *root; | ||
| 61 | }; | ||
| 62 | |||
| 63 | struct kernfs_elem_symlink { | ||
| 64 | struct kernfs_node *target_kn; | ||
| 65 | }; | ||
| 66 | |||
| 67 | struct kernfs_elem_attr { | ||
| 68 | const struct kernfs_ops *ops; | ||
| 69 | struct kernfs_open_node *open; | ||
| 70 | loff_t size; | ||
| 71 | }; | ||
| 72 | |||
| 73 | /* | ||
| 74 | * kernfs_node - the building block of kernfs hierarchy. Each and every | ||
| 75 | * kernfs node is represented by single kernfs_node. Most fields are | ||
| 76 | * private to kernfs and shouldn't be accessed directly by kernfs users. | ||
| 77 | * | ||
| 78 | * As long as s_count reference is held, the kernfs_node itself is | ||
| 79 | * accessible. Dereferencing elem or any other outer entity requires | ||
| 80 | * active reference. | ||
| 81 | */ | ||
| 82 | struct kernfs_node { | ||
| 83 | atomic_t count; | ||
| 84 | atomic_t active; | ||
| 85 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
| 86 | struct lockdep_map dep_map; | ||
| 87 | #endif | ||
| 88 | /* the following two fields are published */ | ||
| 89 | struct kernfs_node *parent; | ||
| 90 | const char *name; | ||
| 91 | |||
| 92 | struct rb_node rb; | ||
| 93 | |||
| 94 | union { | ||
| 95 | struct completion *completion; | ||
| 96 | struct kernfs_node *removed_list; | ||
| 97 | } u; | ||
| 98 | |||
| 99 | const void *ns; /* namespace tag */ | ||
| 100 | unsigned int hash; /* ns + name hash */ | ||
| 101 | union { | ||
| 102 | struct kernfs_elem_dir dir; | ||
| 103 | struct kernfs_elem_symlink symlink; | ||
| 104 | struct kernfs_elem_attr attr; | ||
| 105 | }; | ||
| 106 | |||
| 107 | void *priv; | ||
| 108 | |||
| 109 | unsigned short flags; | ||
| 110 | umode_t mode; | ||
| 111 | unsigned int ino; | ||
| 112 | struct kernfs_iattrs *iattr; | ||
| 113 | }; | ||
| 114 | |||
| 115 | /* | ||
| 116 | * kernfs_dir_ops may be specified on kernfs_create_root() to support | ||
| 117 | * directory manipulation syscalls. These optional callbacks are invoked | ||
| 118 | * on the matching syscalls and can perform any kernfs operations which | ||
| 119 | * don't necessarily have to be the exact operation requested. | ||
| 120 | */ | ||
| 121 | struct kernfs_dir_ops { | ||
| 122 | int (*mkdir)(struct kernfs_node *parent, const char *name, | ||
| 123 | umode_t mode); | ||
| 124 | int (*rmdir)(struct kernfs_node *kn); | ||
| 125 | int (*rename)(struct kernfs_node *kn, struct kernfs_node *new_parent, | ||
| 126 | const char *new_name); | ||
| 127 | }; | ||
| 128 | |||
| 129 | struct kernfs_root { | ||
| 130 | /* published fields */ | ||
| 131 | struct kernfs_node *kn; | ||
| 132 | |||
| 133 | /* private fields, do not use outside kernfs proper */ | ||
| 134 | struct ida ino_ida; | ||
| 135 | struct kernfs_dir_ops *dir_ops; | ||
| 136 | }; | ||
| 137 | |||
| 138 | struct kernfs_open_file { | ||
| 139 | /* published fields */ | ||
| 140 | struct kernfs_node *kn; | ||
| 141 | struct file *file; | ||
| 142 | |||
| 143 | /* private fields, do not use outside kernfs proper */ | ||
| 144 | struct mutex mutex; | ||
| 145 | int event; | ||
| 146 | struct list_head list; | ||
| 147 | |||
| 148 | bool mmapped; | ||
| 149 | const struct vm_operations_struct *vm_ops; | ||
| 150 | }; | ||
| 151 | |||
| 152 | struct kernfs_ops { | ||
| 153 | /* | ||
| 154 | * Read is handled by either seq_file or raw_read(). | ||
| 155 | * | ||
| 156 | * If seq_show() is present, seq_file path is active. Other seq | ||
| 157 | * operations are optional and if not implemented, the behavior is | ||
| 158 | * equivalent to single_open(). @sf->private points to the | ||
| 159 | * associated kernfs_open_file. | ||
| 160 | * | ||
| 161 | * read() is bounced through kernel buffer and a read larger than | ||
| 162 | * PAGE_SIZE results in partial operation of PAGE_SIZE. | ||
| 163 | */ | ||
| 164 | int (*seq_show)(struct seq_file *sf, void *v); | ||
| 165 | |||
| 166 | void *(*seq_start)(struct seq_file *sf, loff_t *ppos); | ||
| 167 | void *(*seq_next)(struct seq_file *sf, void *v, loff_t *ppos); | ||
| 168 | void (*seq_stop)(struct seq_file *sf, void *v); | ||
| 169 | |||
| 170 | ssize_t (*read)(struct kernfs_open_file *of, char *buf, size_t bytes, | ||
| 171 | loff_t off); | ||
| 172 | |||
| 173 | /* | ||
| 174 | * write() is bounced through kernel buffer and a write larger than | ||
| 175 | * PAGE_SIZE results in partial operation of PAGE_SIZE. | ||
| 176 | */ | ||
| 177 | ssize_t (*write)(struct kernfs_open_file *of, char *buf, size_t bytes, | ||
| 178 | loff_t off); | ||
| 179 | |||
| 180 | int (*mmap)(struct kernfs_open_file *of, struct vm_area_struct *vma); | ||
| 181 | |||
| 182 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
| 183 | struct lock_class_key lockdep_key; | ||
| 184 | #endif | ||
| 185 | }; | ||
| 186 | |||
| 187 | #ifdef CONFIG_SYSFS | ||
| 188 | |||
| 189 | static inline enum kernfs_node_type kernfs_type(struct kernfs_node *kn) | ||
| 190 | { | ||
| 191 | return kn->flags & KERNFS_TYPE_MASK; | ||
| 192 | } | ||
| 193 | |||
| 194 | /** | ||
| 195 | * kernfs_enable_ns - enable namespace under a directory | ||
| 196 | * @kn: directory of interest, should be empty | ||
| 197 | * | ||
| 198 | * This is to be called right after @kn is created to enable namespace | ||
| 199 | * under it. All children of @kn must have non-NULL namespace tags and | ||
| 200 | * only the ones which match the super_block's tag will be visible. | ||
| 201 | */ | ||
| 202 | static inline void kernfs_enable_ns(struct kernfs_node *kn) | ||
| 203 | { | ||
| 204 | WARN_ON_ONCE(kernfs_type(kn) != KERNFS_DIR); | ||
| 205 | WARN_ON_ONCE(!RB_EMPTY_ROOT(&kn->dir.children)); | ||
| 206 | kn->flags |= KERNFS_NS; | ||
| 207 | } | ||
| 208 | |||
| 209 | /** | ||
| 210 | * kernfs_ns_enabled - test whether namespace is enabled | ||
| 211 | * @kn: the node to test | ||
| 212 | * | ||
| 213 | * Test whether namespace filtering is enabled for the children of @ns. | ||
| 214 | */ | ||
| 215 | static inline bool kernfs_ns_enabled(struct kernfs_node *kn) | ||
| 216 | { | ||
| 217 | return kn->flags & KERNFS_NS; | ||
| 218 | } | ||
| 219 | |||
| 220 | struct kernfs_node *kernfs_find_and_get_ns(struct kernfs_node *parent, | ||
| 221 | const char *name, const void *ns); | ||
| 222 | void kernfs_get(struct kernfs_node *kn); | ||
| 223 | void kernfs_put(struct kernfs_node *kn); | ||
| 224 | |||
| 225 | struct kernfs_root *kernfs_create_root(struct kernfs_dir_ops *kdops, | ||
| 226 | void *priv); | ||
| 227 | void kernfs_destroy_root(struct kernfs_root *root); | ||
| 228 | |||
| 229 | struct kernfs_node *kernfs_create_dir_ns(struct kernfs_node *parent, | ||
| 230 | const char *name, umode_t mode, | ||
| 231 | void *priv, const void *ns); | ||
| 232 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent, | ||
| 233 | const char *name, | ||
| 234 | umode_t mode, loff_t size, | ||
| 235 | const struct kernfs_ops *ops, | ||
| 236 | void *priv, const void *ns, | ||
| 237 | bool name_is_static, | ||
| 238 | struct lock_class_key *key); | ||
| 239 | struct kernfs_node *kernfs_create_link(struct kernfs_node *parent, | ||
| 240 | const char *name, | ||
| 241 | struct kernfs_node *target); | ||
| 242 | void kernfs_remove(struct kernfs_node *kn); | ||
| 243 | int kernfs_remove_by_name_ns(struct kernfs_node *parent, const char *name, | ||
| 244 | const void *ns); | ||
| 245 | int kernfs_rename_ns(struct kernfs_node *kn, struct kernfs_node *new_parent, | ||
| 246 | const char *new_name, const void *new_ns); | ||
| 247 | int kernfs_setattr(struct kernfs_node *kn, const struct iattr *iattr); | ||
| 248 | void kernfs_notify(struct kernfs_node *kn); | ||
| 249 | |||
| 250 | const void *kernfs_super_ns(struct super_block *sb); | ||
| 251 | struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags, | ||
| 252 | struct kernfs_root *root, const void *ns); | ||
| 253 | void kernfs_kill_sb(struct super_block *sb); | ||
| 254 | |||
| 255 | void kernfs_init(void); | ||
| 256 | |||
| 257 | #else /* CONFIG_SYSFS */ | ||
| 258 | |||
| 259 | static inline enum kernfs_node_type kernfs_type(struct kernfs_node *kn) | ||
| 260 | { return 0; } /* whatever */ | ||
| 261 | |||
| 262 | static inline void kernfs_enable_ns(struct kernfs_node *kn) { } | ||
| 263 | |||
| 264 | static inline bool kernfs_ns_enabled(struct kernfs_node *kn) | ||
| 265 | { return false; } | ||
| 266 | |||
| 267 | static inline struct kernfs_node * | ||
| 268 | kernfs_find_and_get_ns(struct kernfs_node *parent, const char *name, | ||
| 269 | const void *ns) | ||
| 270 | { return NULL; } | ||
| 271 | |||
| 272 | static inline void kernfs_get(struct kernfs_node *kn) { } | ||
| 273 | static inline void kernfs_put(struct kernfs_node *kn) { } | ||
| 274 | |||
| 275 | static inline struct kernfs_root * | ||
| 276 | kernfs_create_root(struct kernfs_dir_ops *kdops, void *priv) | ||
| 277 | { return ERR_PTR(-ENOSYS); } | ||
| 278 | |||
| 279 | static inline void kernfs_destroy_root(struct kernfs_root *root) { } | ||
| 280 | |||
| 281 | static inline struct kernfs_node * | ||
| 282 | kernfs_create_dir_ns(struct kernfs_node *parent, const char *name, | ||
| 283 | umode_t mode, void *priv, const void *ns) | ||
| 284 | { return ERR_PTR(-ENOSYS); } | ||
| 285 | |||
| 286 | static inline struct kernfs_node * | ||
| 287 | __kernfs_create_file(struct kernfs_node *parent, const char *name, | ||
| 288 | umode_t mode, loff_t size, const struct kernfs_ops *ops, | ||
| 289 | void *priv, const void *ns, bool name_is_static, | ||
| 290 | struct lock_class_key *key) | ||
| 291 | { return ERR_PTR(-ENOSYS); } | ||
| 292 | |||
| 293 | static inline struct kernfs_node * | ||
| 294 | kernfs_create_link(struct kernfs_node *parent, const char *name, | ||
| 295 | struct kernfs_node *target) | ||
| 296 | { return ERR_PTR(-ENOSYS); } | ||
| 297 | |||
| 298 | static inline void kernfs_remove(struct kernfs_node *kn) { } | ||
| 299 | |||
| 300 | static inline int kernfs_remove_by_name_ns(struct kernfs_node *kn, | ||
| 301 | const char *name, const void *ns) | ||
| 302 | { return -ENOSYS; } | ||
| 303 | |||
| 304 | static inline int kernfs_rename_ns(struct kernfs_node *kn, | ||
| 305 | struct kernfs_node *new_parent, | ||
| 306 | const char *new_name, const void *new_ns) | ||
| 307 | { return -ENOSYS; } | ||
| 308 | |||
| 309 | static inline int kernfs_setattr(struct kernfs_node *kn, | ||
| 310 | const struct iattr *iattr) | ||
| 311 | { return -ENOSYS; } | ||
| 312 | |||
| 313 | static inline void kernfs_notify(struct kernfs_node *kn) { } | ||
| 314 | |||
| 315 | static inline const void *kernfs_super_ns(struct super_block *sb) | ||
| 316 | { return NULL; } | ||
| 317 | |||
| 318 | static inline struct dentry * | ||
| 319 | kernfs_mount_ns(struct file_system_type *fs_type, int flags, | ||
| 320 | struct kernfs_root *root, const void *ns) | ||
| 321 | { return ERR_PTR(-ENOSYS); } | ||
| 322 | |||
| 323 | static inline void kernfs_kill_sb(struct super_block *sb) { } | ||
| 324 | |||
| 325 | static inline void kernfs_init(void) { } | ||
| 326 | |||
| 327 | #endif /* CONFIG_SYSFS */ | ||
| 328 | |||
| 329 | static inline struct kernfs_node * | ||
| 330 | kernfs_find_and_get(struct kernfs_node *kn, const char *name) | ||
| 331 | { | ||
| 332 | return kernfs_find_and_get_ns(kn, name, NULL); | ||
| 333 | } | ||
| 334 | |||
| 335 | static inline struct kernfs_node * | ||
| 336 | kernfs_create_dir(struct kernfs_node *parent, const char *name, umode_t mode, | ||
| 337 | void *priv) | ||
| 338 | { | ||
| 339 | return kernfs_create_dir_ns(parent, name, mode, priv, NULL); | ||
| 340 | } | ||
| 341 | |||
| 342 | static inline struct kernfs_node * | ||
| 343 | kernfs_create_file_ns(struct kernfs_node *parent, const char *name, | ||
| 344 | umode_t mode, loff_t size, const struct kernfs_ops *ops, | ||
| 345 | void *priv, const void *ns) | ||
| 346 | { | ||
| 347 | struct lock_class_key *key = NULL; | ||
| 348 | |||
| 349 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
| 350 | key = (struct lock_class_key *)&ops->lockdep_key; | ||
| 351 | #endif | ||
| 352 | return __kernfs_create_file(parent, name, mode, size, ops, priv, ns, | ||
| 353 | false, key); | ||
| 354 | } | ||
| 355 | |||
| 356 | static inline struct kernfs_node * | ||
| 357 | kernfs_create_file(struct kernfs_node *parent, const char *name, umode_t mode, | ||
| 358 | loff_t size, const struct kernfs_ops *ops, void *priv) | ||
| 359 | { | ||
| 360 | return kernfs_create_file_ns(parent, name, mode, size, ops, priv, NULL); | ||
| 361 | } | ||
| 362 | |||
| 363 | static inline int kernfs_remove_by_name(struct kernfs_node *parent, | ||
| 364 | const char *name) | ||
| 365 | { | ||
| 366 | return kernfs_remove_by_name_ns(parent, name, NULL); | ||
| 367 | } | ||
| 368 | |||
| 369 | static inline struct dentry * | ||
| 370 | kernfs_mount(struct file_system_type *fs_type, int flags, | ||
| 371 | struct kernfs_root *root) | ||
| 372 | { | ||
| 373 | return kernfs_mount_ns(fs_type, flags, root, NULL); | ||
| 374 | } | ||
| 375 | |||
| 376 | #endif /* __LINUX_KERNFS_H */ | ||
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index d78d28a733b1..5fd33dc1fe3a 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
| @@ -198,6 +198,9 @@ extern u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4]; | |||
| 198 | extern size_t vmcoreinfo_size; | 198 | extern size_t vmcoreinfo_size; |
| 199 | extern size_t vmcoreinfo_max_size; | 199 | extern size_t vmcoreinfo_max_size; |
| 200 | 200 | ||
| 201 | /* flag to track if kexec reboot is in progress */ | ||
| 202 | extern bool kexec_in_progress; | ||
| 203 | |||
| 201 | int __init parse_crashkernel(char *cmdline, unsigned long long system_ram, | 204 | int __init parse_crashkernel(char *cmdline, unsigned long long system_ram, |
| 202 | unsigned long long *crash_size, unsigned long long *crash_base); | 205 | unsigned long long *crash_size, unsigned long long *crash_base); |
| 203 | int parse_crashkernel_high(char *cmdline, unsigned long long system_ram, | 206 | int parse_crashkernel_high(char *cmdline, unsigned long long system_ram, |
diff --git a/include/linux/kobj_completion.h b/include/linux/kobj_completion.h deleted file mode 100644 index a428f6436063..000000000000 --- a/include/linux/kobj_completion.h +++ /dev/null | |||
| @@ -1,18 +0,0 @@ | |||
| 1 | #ifndef _KOBJ_COMPLETION_H_ | ||
| 2 | #define _KOBJ_COMPLETION_H_ | ||
| 3 | |||
| 4 | #include <linux/kobject.h> | ||
| 5 | #include <linux/completion.h> | ||
| 6 | |||
| 7 | struct kobj_completion { | ||
| 8 | struct kobject kc_kobj; | ||
| 9 | struct completion kc_unregister; | ||
| 10 | }; | ||
| 11 | |||
| 12 | #define kobj_to_kobj_completion(kobj) \ | ||
| 13 | container_of(kobj, struct kobj_completion, kc_kobj) | ||
| 14 | |||
| 15 | void kobj_completion_init(struct kobj_completion *kc, struct kobj_type *ktype); | ||
| 16 | void kobj_completion_release(struct kobject *kobj); | ||
| 17 | void kobj_completion_del_and_wait(struct kobj_completion *kc); | ||
| 18 | #endif /* _KOBJ_COMPLETION_H_ */ | ||
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index e7ba650086ce..926afb6f6b5f 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
| @@ -64,7 +64,7 @@ struct kobject { | |||
| 64 | struct kobject *parent; | 64 | struct kobject *parent; |
| 65 | struct kset *kset; | 65 | struct kset *kset; |
| 66 | struct kobj_type *ktype; | 66 | struct kobj_type *ktype; |
| 67 | struct sysfs_dirent *sd; | 67 | struct kernfs_node *sd; |
| 68 | struct kref kref; | 68 | struct kref kref; |
| 69 | #ifdef CONFIG_DEBUG_KOBJECT_RELEASE | 69 | #ifdef CONFIG_DEBUG_KOBJECT_RELEASE |
| 70 | struct delayed_work release; | 70 | struct delayed_work release; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 0e23c26485f4..9b503376738f 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -418,6 +418,7 @@ enum { | |||
| 418 | ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */ | 418 | ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */ |
| 419 | ATA_HORKAGE_MAX_SEC_LBA48 = (1 << 17), /* Set max sects to 65535 */ | 419 | ATA_HORKAGE_MAX_SEC_LBA48 = (1 << 17), /* Set max sects to 65535 */ |
| 420 | ATA_HORKAGE_ATAPI_DMADIR = (1 << 18), /* device requires dmadir */ | 420 | ATA_HORKAGE_ATAPI_DMADIR = (1 << 18), /* device requires dmadir */ |
| 421 | ATA_HORKAGE_NO_NCQ_TRIM = (1 << 19), /* don't use queued TRIM */ | ||
| 421 | 422 | ||
| 422 | /* DMA mask for user DMA control: User visible values; DO NOT | 423 | /* DMA mask for user DMA control: User visible values; DO NOT |
| 423 | renumber */ | 424 | renumber */ |
diff --git a/include/linux/lockref.h b/include/linux/lockref.h index c8929c3832db..4bfde0e99ed5 100644 --- a/include/linux/lockref.h +++ b/include/linux/lockref.h | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | 19 | ||
| 20 | #define USE_CMPXCHG_LOCKREF \ | 20 | #define USE_CMPXCHG_LOCKREF \ |
| 21 | (IS_ENABLED(CONFIG_ARCH_USE_CMPXCHG_LOCKREF) && \ | 21 | (IS_ENABLED(CONFIG_ARCH_USE_CMPXCHG_LOCKREF) && \ |
| 22 | IS_ENABLED(CONFIG_SMP) && !BLOATED_SPINLOCKS) | 22 | IS_ENABLED(CONFIG_SMP) && SPINLOCK_SIZE <= 4) |
| 23 | 23 | ||
| 24 | struct lockref { | 24 | struct lockref { |
| 25 | union { | 25 | union { |
diff --git a/include/linux/math64.h b/include/linux/math64.h index 69ed5f5e9f6e..c45c089bfdac 100644 --- a/include/linux/math64.h +++ b/include/linux/math64.h | |||
| @@ -133,4 +133,34 @@ __iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder) | |||
| 133 | return ret; | 133 | return ret; |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | #if defined(CONFIG_ARCH_SUPPORTS_INT128) && defined(__SIZEOF_INT128__) | ||
| 137 | |||
| 138 | #ifndef mul_u64_u32_shr | ||
| 139 | static inline u64 mul_u64_u32_shr(u64 a, u32 mul, unsigned int shift) | ||
| 140 | { | ||
| 141 | return (u64)(((unsigned __int128)a * mul) >> shift); | ||
| 142 | } | ||
| 143 | #endif /* mul_u64_u32_shr */ | ||
| 144 | |||
| 145 | #else | ||
| 146 | |||
| 147 | #ifndef mul_u64_u32_shr | ||
| 148 | static inline u64 mul_u64_u32_shr(u64 a, u32 mul, unsigned int shift) | ||
| 149 | { | ||
| 150 | u32 ah, al; | ||
| 151 | u64 ret; | ||
| 152 | |||
| 153 | al = a; | ||
| 154 | ah = a >> 32; | ||
| 155 | |||
| 156 | ret = ((u64)al * mul) >> shift; | ||
| 157 | if (ah) | ||
| 158 | ret += ((u64)ah * mul) << (32 - shift); | ||
| 159 | |||
| 160 | return ret; | ||
| 161 | } | ||
| 162 | #endif /* mul_u64_u32_shr */ | ||
| 163 | |||
| 164 | #endif | ||
| 165 | |||
| 136 | #endif /* _LINUX_MATH64_H */ | 166 | #endif /* _LINUX_MATH64_H */ |
diff --git a/include/linux/memory.h b/include/linux/memory.h index 9a6bbf76452d..bb7384e3c3d8 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
| @@ -35,6 +35,7 @@ struct memory_block { | |||
| 35 | }; | 35 | }; |
| 36 | 36 | ||
| 37 | int arch_get_memory_phys_device(unsigned long start_pfn); | 37 | int arch_get_memory_phys_device(unsigned long start_pfn); |
| 38 | unsigned long __weak memory_block_size_bytes(void); | ||
| 38 | 39 | ||
| 39 | /* These states are exposed to userspace as text strings in sysfs */ | 40 | /* These states are exposed to userspace as text strings in sysfs */ |
| 40 | #define MEM_ONLINE (1<<0) /* exposed to userspace */ | 41 | #define MEM_ONLINE (1<<0) /* exposed to userspace */ |
diff --git a/include/linux/mfd/abx500/ab8500-gpio.h b/include/linux/mfd/abx500/ab8500-gpio.h deleted file mode 100644 index 172b2f201ae0..000000000000 --- a/include/linux/mfd/abx500/ab8500-gpio.h +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright ST-Ericsson 2010. | ||
| 3 | * | ||
| 4 | * Author: Bibek Basu <bibek.basu@stericsson.com> | ||
| 5 | * Licensed under GPLv2. | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef _AB8500_GPIO_H | ||
| 9 | #define _AB8500_GPIO_H | ||
| 10 | |||
| 11 | /* | ||
| 12 | * Platform data to register a block: only the initial gpio/irq number. | ||
| 13 | * Array sizes are large enough to contain all AB8500 and AB9540 GPIO | ||
| 14 | * registers. | ||
| 15 | */ | ||
| 16 | |||
| 17 | struct abx500_gpio_platform_data { | ||
| 18 | int gpio_base; | ||
| 19 | }; | ||
| 20 | |||
| 21 | enum abx500_gpio_pull_updown { | ||
| 22 | ABX500_GPIO_PULL_DOWN = 0x0, | ||
| 23 | ABX500_GPIO_PULL_NONE = 0x1, | ||
| 24 | ABX500_GPIO_PULL_UP = 0x3, | ||
| 25 | }; | ||
| 26 | |||
| 27 | enum abx500_gpio_vinsel { | ||
| 28 | ABX500_GPIO_VINSEL_VBAT = 0x0, | ||
| 29 | ABX500_GPIO_VINSEL_VIN_1V8 = 0x1, | ||
| 30 | ABX500_GPIO_VINSEL_VDD_BIF = 0x2, | ||
| 31 | }; | ||
| 32 | |||
| 33 | #endif /* _AB8500_GPIO_H */ | ||
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index f4acd898dac9..a86ca1406fb8 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h | |||
| @@ -368,7 +368,6 @@ struct ab8500 { | |||
| 368 | }; | 368 | }; |
| 369 | 369 | ||
| 370 | struct ab8500_regulator_platform_data; | 370 | struct ab8500_regulator_platform_data; |
| 371 | struct ab8500_gpio_platform_data; | ||
| 372 | struct ab8500_codec_platform_data; | 371 | struct ab8500_codec_platform_data; |
| 373 | struct ab8500_sysctrl_platform_data; | 372 | struct ab8500_sysctrl_platform_data; |
| 374 | 373 | ||
| @@ -382,7 +381,6 @@ struct ab8500_platform_data { | |||
| 382 | int irq_base; | 381 | int irq_base; |
| 383 | void (*init) (struct ab8500 *); | 382 | void (*init) (struct ab8500 *); |
| 384 | struct ab8500_regulator_platform_data *regulator; | 383 | struct ab8500_regulator_platform_data *regulator; |
| 385 | struct abx500_gpio_platform_data *gpio; | ||
| 386 | struct ab8500_codec_platform_data *codec; | 384 | struct ab8500_codec_platform_data *codec; |
| 387 | struct ab8500_sysctrl_platform_data *sysctrl; | 385 | struct ab8500_sysctrl_platform_data *sysctrl; |
| 388 | }; | 386 | }; |
diff --git a/include/linux/mfd/arizona/registers.h b/include/linux/mfd/arizona/registers.h index cb49417f8ba9..fdf3aa376eb2 100644 --- a/include/linux/mfd/arizona/registers.h +++ b/include/linux/mfd/arizona/registers.h | |||
| @@ -139,6 +139,7 @@ | |||
| 139 | #define ARIZONA_INPUT_ENABLES_STATUS 0x301 | 139 | #define ARIZONA_INPUT_ENABLES_STATUS 0x301 |
| 140 | #define ARIZONA_INPUT_RATE 0x308 | 140 | #define ARIZONA_INPUT_RATE 0x308 |
| 141 | #define ARIZONA_INPUT_VOLUME_RAMP 0x309 | 141 | #define ARIZONA_INPUT_VOLUME_RAMP 0x309 |
| 142 | #define ARIZONA_HPF_CONTROL 0x30C | ||
| 142 | #define ARIZONA_IN1L_CONTROL 0x310 | 143 | #define ARIZONA_IN1L_CONTROL 0x310 |
| 143 | #define ARIZONA_ADC_DIGITAL_VOLUME_1L 0x311 | 144 | #define ARIZONA_ADC_DIGITAL_VOLUME_1L 0x311 |
| 144 | #define ARIZONA_DMIC1L_CONTROL 0x312 | 145 | #define ARIZONA_DMIC1L_CONTROL 0x312 |
| @@ -160,6 +161,7 @@ | |||
| 160 | #define ARIZONA_IN4L_CONTROL 0x328 | 161 | #define ARIZONA_IN4L_CONTROL 0x328 |
| 161 | #define ARIZONA_ADC_DIGITAL_VOLUME_4L 0x329 | 162 | #define ARIZONA_ADC_DIGITAL_VOLUME_4L 0x329 |
| 162 | #define ARIZONA_DMIC4L_CONTROL 0x32A | 163 | #define ARIZONA_DMIC4L_CONTROL 0x32A |
| 164 | #define ARIZONA_IN4R_CONTROL 0x32C | ||
| 163 | #define ARIZONA_ADC_DIGITAL_VOLUME_4R 0x32D | 165 | #define ARIZONA_ADC_DIGITAL_VOLUME_4R 0x32D |
| 164 | #define ARIZONA_DMIC4R_CONTROL 0x32E | 166 | #define ARIZONA_DMIC4R_CONTROL 0x32E |
| 165 | #define ARIZONA_OUTPUT_ENABLES_1 0x400 | 167 | #define ARIZONA_OUTPUT_ENABLES_1 0x400 |
| @@ -224,6 +226,9 @@ | |||
| 224 | #define ARIZONA_PDM_SPK1_CTRL_2 0x491 | 226 | #define ARIZONA_PDM_SPK1_CTRL_2 0x491 |
| 225 | #define ARIZONA_PDM_SPK2_CTRL_1 0x492 | 227 | #define ARIZONA_PDM_SPK2_CTRL_1 0x492 |
| 226 | #define ARIZONA_PDM_SPK2_CTRL_2 0x493 | 228 | #define ARIZONA_PDM_SPK2_CTRL_2 0x493 |
| 229 | #define ARIZONA_HP1_SHORT_CIRCUIT_CTRL 0x4A0 | ||
| 230 | #define ARIZONA_HP2_SHORT_CIRCUIT_CTRL 0x4A1 | ||
| 231 | #define ARIZONA_HP3_SHORT_CIRCUIT_CTRL 0x4A2 | ||
| 227 | #define ARIZONA_SPK_CTRL_2 0x4B5 | 232 | #define ARIZONA_SPK_CTRL_2 0x4B5 |
| 228 | #define ARIZONA_SPK_CTRL_3 0x4B6 | 233 | #define ARIZONA_SPK_CTRL_3 0x4B6 |
| 229 | #define ARIZONA_DAC_COMP_1 0x4DC | 234 | #define ARIZONA_DAC_COMP_1 0x4DC |
| @@ -511,6 +516,38 @@ | |||
| 511 | #define ARIZONA_AIF2TX2MIX_INPUT_3_VOLUME 0x74D | 516 | #define ARIZONA_AIF2TX2MIX_INPUT_3_VOLUME 0x74D |
| 512 | #define ARIZONA_AIF2TX2MIX_INPUT_4_SOURCE 0x74E | 517 | #define ARIZONA_AIF2TX2MIX_INPUT_4_SOURCE 0x74E |
| 513 | #define ARIZONA_AIF2TX2MIX_INPUT_4_VOLUME 0x74F | 518 | #define ARIZONA_AIF2TX2MIX_INPUT_4_VOLUME 0x74F |
| 519 | #define ARIZONA_AIF2TX3MIX_INPUT_1_SOURCE 0x750 | ||
| 520 | #define ARIZONA_AIF2TX3MIX_INPUT_1_VOLUME 0x751 | ||
| 521 | #define ARIZONA_AIF2TX3MIX_INPUT_2_SOURCE 0x752 | ||
| 522 | #define ARIZONA_AIF2TX3MIX_INPUT_2_VOLUME 0x753 | ||
| 523 | #define ARIZONA_AIF2TX3MIX_INPUT_3_SOURCE 0x754 | ||
| 524 | #define ARIZONA_AIF2TX3MIX_INPUT_3_VOLUME 0x755 | ||
| 525 | #define ARIZONA_AIF2TX3MIX_INPUT_4_SOURCE 0x756 | ||
| 526 | #define ARIZONA_AIF2TX3MIX_INPUT_4_VOLUME 0x757 | ||
| 527 | #define ARIZONA_AIF2TX4MIX_INPUT_1_SOURCE 0x758 | ||
| 528 | #define ARIZONA_AIF2TX4MIX_INPUT_1_VOLUME 0x759 | ||
| 529 | #define ARIZONA_AIF2TX4MIX_INPUT_2_SOURCE 0x75A | ||
| 530 | #define ARIZONA_AIF2TX4MIX_INPUT_2_VOLUME 0x75B | ||
| 531 | #define ARIZONA_AIF2TX4MIX_INPUT_3_SOURCE 0x75C | ||
| 532 | #define ARIZONA_AIF2TX4MIX_INPUT_3_VOLUME 0x75D | ||
| 533 | #define ARIZONA_AIF2TX4MIX_INPUT_4_SOURCE 0x75E | ||
| 534 | #define ARIZONA_AIF2TX4MIX_INPUT_4_VOLUME 0x75F | ||
| 535 | #define ARIZONA_AIF2TX5MIX_INPUT_1_SOURCE 0x760 | ||
| 536 | #define ARIZONA_AIF2TX5MIX_INPUT_1_VOLUME 0x761 | ||
| 537 | #define ARIZONA_AIF2TX5MIX_INPUT_2_SOURCE 0x762 | ||
| 538 | #define ARIZONA_AIF2TX5MIX_INPUT_2_VOLUME 0x763 | ||
| 539 | #define ARIZONA_AIF2TX5MIX_INPUT_3_SOURCE 0x764 | ||
| 540 | #define ARIZONA_AIF2TX5MIX_INPUT_3_VOLUME 0x765 | ||
| 541 | #define ARIZONA_AIF2TX5MIX_INPUT_4_SOURCE 0x766 | ||
| 542 | #define ARIZONA_AIF2TX5MIX_INPUT_4_VOLUME 0x767 | ||
| 543 | #define ARIZONA_AIF2TX6MIX_INPUT_1_SOURCE 0x768 | ||
| 544 | #define ARIZONA_AIF2TX6MIX_INPUT_1_VOLUME 0x769 | ||
| 545 | #define ARIZONA_AIF2TX6MIX_INPUT_2_SOURCE 0x76A | ||
| 546 | #define ARIZONA_AIF2TX6MIX_INPUT_2_VOLUME 0x76B | ||
| 547 | #define ARIZONA_AIF2TX6MIX_INPUT_3_SOURCE 0x76C | ||
| 548 | #define ARIZONA_AIF2TX6MIX_INPUT_3_VOLUME 0x76D | ||
| 549 | #define ARIZONA_AIF2TX6MIX_INPUT_4_SOURCE 0x76E | ||
| 550 | #define ARIZONA_AIF2TX6MIX_INPUT_4_VOLUME 0x76F | ||
| 514 | #define ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE 0x780 | 551 | #define ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE 0x780 |
| 515 | #define ARIZONA_AIF3TX1MIX_INPUT_1_VOLUME 0x781 | 552 | #define ARIZONA_AIF3TX1MIX_INPUT_1_VOLUME 0x781 |
| 516 | #define ARIZONA_AIF3TX1MIX_INPUT_2_SOURCE 0x782 | 553 | #define ARIZONA_AIF3TX1MIX_INPUT_2_SOURCE 0x782 |
| @@ -2196,6 +2233,15 @@ | |||
| 2196 | /* | 2233 | /* |
| 2197 | * R677 (0x2A5) - Mic Detect 3 | 2234 | * R677 (0x2A5) - Mic Detect 3 |
| 2198 | */ | 2235 | */ |
| 2236 | #define ARIZONA_MICD_LVL_0 0x0004 /* MICD_LVL - [2] */ | ||
| 2237 | #define ARIZONA_MICD_LVL_1 0x0008 /* MICD_LVL - [3] */ | ||
| 2238 | #define ARIZONA_MICD_LVL_2 0x0010 /* MICD_LVL - [4] */ | ||
| 2239 | #define ARIZONA_MICD_LVL_3 0x0020 /* MICD_LVL - [5] */ | ||
| 2240 | #define ARIZONA_MICD_LVL_4 0x0040 /* MICD_LVL - [6] */ | ||
| 2241 | #define ARIZONA_MICD_LVL_5 0x0080 /* MICD_LVL - [7] */ | ||
| 2242 | #define ARIZONA_MICD_LVL_6 0x0100 /* MICD_LVL - [8] */ | ||
| 2243 | #define ARIZONA_MICD_LVL_7 0x0200 /* MICD_LVL - [9] */ | ||
| 2244 | #define ARIZONA_MICD_LVL_8 0x0400 /* MICD_LVL - [10] */ | ||
| 2199 | #define ARIZONA_MICD_LVL_MASK 0x07FC /* MICD_LVL - [10:2] */ | 2245 | #define ARIZONA_MICD_LVL_MASK 0x07FC /* MICD_LVL - [10:2] */ |
| 2200 | #define ARIZONA_MICD_LVL_SHIFT 2 /* MICD_LVL - [10:2] */ | 2246 | #define ARIZONA_MICD_LVL_SHIFT 2 /* MICD_LVL - [10:2] */ |
| 2201 | #define ARIZONA_MICD_LVL_WIDTH 9 /* MICD_LVL - [10:2] */ | 2247 | #define ARIZONA_MICD_LVL_WIDTH 9 /* MICD_LVL - [10:2] */ |
| @@ -2293,8 +2339,18 @@ | |||
| 2293 | #define ARIZONA_IN_VI_RAMP_WIDTH 3 /* IN_VI_RAMP - [2:0] */ | 2339 | #define ARIZONA_IN_VI_RAMP_WIDTH 3 /* IN_VI_RAMP - [2:0] */ |
| 2294 | 2340 | ||
| 2295 | /* | 2341 | /* |
| 2342 | * R780 (0x30C) - HPF Control | ||
| 2343 | */ | ||
| 2344 | #define ARIZONA_IN_HPF_CUT_MASK 0x0007 /* IN_HPF_CUT [2:0] */ | ||
| 2345 | #define ARIZONA_IN_HPF_CUT_SHIFT 0 /* IN_HPF_CUT [2:0] */ | ||
| 2346 | #define ARIZONA_IN_HPF_CUT_WIDTH 3 /* IN_HPF_CUT [2:0] */ | ||
| 2347 | |||
| 2348 | /* | ||
| 2296 | * R784 (0x310) - IN1L Control | 2349 | * R784 (0x310) - IN1L Control |
| 2297 | */ | 2350 | */ |
| 2351 | #define ARIZONA_IN1L_HPF_MASK 0x8000 /* IN1L_HPF - [15] */ | ||
| 2352 | #define ARIZONA_IN1L_HPF_SHIFT 15 /* IN1L_HPF - [15] */ | ||
| 2353 | #define ARIZONA_IN1L_HPF_WIDTH 1 /* IN1L_HPF - [15] */ | ||
| 2298 | #define ARIZONA_IN1_OSR_MASK 0x6000 /* IN1_OSR - [14:13] */ | 2354 | #define ARIZONA_IN1_OSR_MASK 0x6000 /* IN1_OSR - [14:13] */ |
| 2299 | #define ARIZONA_IN1_OSR_SHIFT 13 /* IN1_OSR - [14:13] */ | 2355 | #define ARIZONA_IN1_OSR_SHIFT 13 /* IN1_OSR - [14:13] */ |
| 2300 | #define ARIZONA_IN1_OSR_WIDTH 2 /* IN1_OSR - [14:13] */ | 2356 | #define ARIZONA_IN1_OSR_WIDTH 2 /* IN1_OSR - [14:13] */ |
| @@ -2333,6 +2389,9 @@ | |||
| 2333 | /* | 2389 | /* |
| 2334 | * R788 (0x314) - IN1R Control | 2390 | * R788 (0x314) - IN1R Control |
| 2335 | */ | 2391 | */ |
| 2392 | #define ARIZONA_IN1R_HPF_MASK 0x8000 /* IN1R_HPF - [15] */ | ||
| 2393 | #define ARIZONA_IN1R_HPF_SHIFT 15 /* IN1R_HPF - [15] */ | ||
| 2394 | #define ARIZONA_IN1R_HPF_WIDTH 1 /* IN1R_HPF - [15] */ | ||
| 2336 | #define ARIZONA_IN1R_PGA_VOL_MASK 0x00FE /* IN1R_PGA_VOL - [7:1] */ | 2395 | #define ARIZONA_IN1R_PGA_VOL_MASK 0x00FE /* IN1R_PGA_VOL - [7:1] */ |
| 2337 | #define ARIZONA_IN1R_PGA_VOL_SHIFT 1 /* IN1R_PGA_VOL - [7:1] */ | 2396 | #define ARIZONA_IN1R_PGA_VOL_SHIFT 1 /* IN1R_PGA_VOL - [7:1] */ |
| 2338 | #define ARIZONA_IN1R_PGA_VOL_WIDTH 7 /* IN1R_PGA_VOL - [7:1] */ | 2397 | #define ARIZONA_IN1R_PGA_VOL_WIDTH 7 /* IN1R_PGA_VOL - [7:1] */ |
| @@ -2362,6 +2421,9 @@ | |||
| 2362 | /* | 2421 | /* |
| 2363 | * R792 (0x318) - IN2L Control | 2422 | * R792 (0x318) - IN2L Control |
| 2364 | */ | 2423 | */ |
| 2424 | #define ARIZONA_IN2L_HPF_MASK 0x8000 /* IN2L_HPF - [15] */ | ||
| 2425 | #define ARIZONA_IN2L_HPF_SHIFT 15 /* IN2L_HPF - [15] */ | ||
| 2426 | #define ARIZONA_IN2L_HPF_WIDTH 1 /* IN2L_HPF - [15] */ | ||
| 2365 | #define ARIZONA_IN2_OSR_MASK 0x6000 /* IN2_OSR - [14:13] */ | 2427 | #define ARIZONA_IN2_OSR_MASK 0x6000 /* IN2_OSR - [14:13] */ |
| 2366 | #define ARIZONA_IN2_OSR_SHIFT 13 /* IN2_OSR - [14:13] */ | 2428 | #define ARIZONA_IN2_OSR_SHIFT 13 /* IN2_OSR - [14:13] */ |
| 2367 | #define ARIZONA_IN2_OSR_WIDTH 2 /* IN2_OSR - [14:13] */ | 2429 | #define ARIZONA_IN2_OSR_WIDTH 2 /* IN2_OSR - [14:13] */ |
| @@ -2400,6 +2462,9 @@ | |||
| 2400 | /* | 2462 | /* |
| 2401 | * R796 (0x31C) - IN2R Control | 2463 | * R796 (0x31C) - IN2R Control |
| 2402 | */ | 2464 | */ |
| 2465 | #define ARIZONA_IN2R_HPF_MASK 0x8000 /* IN2R_HPF - [15] */ | ||
| 2466 | #define ARIZONA_IN2R_HPF_SHIFT 15 /* IN2R_HPF - [15] */ | ||
| 2467 | #define ARIZONA_IN2R_HPF_WIDTH 1 /* IN2R_HPF - [15] */ | ||
| 2403 | #define ARIZONA_IN2R_PGA_VOL_MASK 0x00FE /* IN2R_PGA_VOL - [7:1] */ | 2468 | #define ARIZONA_IN2R_PGA_VOL_MASK 0x00FE /* IN2R_PGA_VOL - [7:1] */ |
| 2404 | #define ARIZONA_IN2R_PGA_VOL_SHIFT 1 /* IN2R_PGA_VOL - [7:1] */ | 2469 | #define ARIZONA_IN2R_PGA_VOL_SHIFT 1 /* IN2R_PGA_VOL - [7:1] */ |
| 2405 | #define ARIZONA_IN2R_PGA_VOL_WIDTH 7 /* IN2R_PGA_VOL - [7:1] */ | 2470 | #define ARIZONA_IN2R_PGA_VOL_WIDTH 7 /* IN2R_PGA_VOL - [7:1] */ |
| @@ -2429,6 +2494,9 @@ | |||
| 2429 | /* | 2494 | /* |
| 2430 | * R800 (0x320) - IN3L Control | 2495 | * R800 (0x320) - IN3L Control |
| 2431 | */ | 2496 | */ |
| 2497 | #define ARIZONA_IN3L_HPF_MASK 0x8000 /* IN3L_HPF - [15] */ | ||
| 2498 | #define ARIZONA_IN3L_HPF_SHIFT 15 /* IN3L_HPF - [15] */ | ||
| 2499 | #define ARIZONA_IN3L_HPF_WIDTH 1 /* IN3L_HPF - [15] */ | ||
| 2432 | #define ARIZONA_IN3_OSR_MASK 0x6000 /* IN3_OSR - [14:13] */ | 2500 | #define ARIZONA_IN3_OSR_MASK 0x6000 /* IN3_OSR - [14:13] */ |
| 2433 | #define ARIZONA_IN3_OSR_SHIFT 13 /* IN3_OSR - [14:13] */ | 2501 | #define ARIZONA_IN3_OSR_SHIFT 13 /* IN3_OSR - [14:13] */ |
| 2434 | #define ARIZONA_IN3_OSR_WIDTH 2 /* IN3_OSR - [14:13] */ | 2502 | #define ARIZONA_IN3_OSR_WIDTH 2 /* IN3_OSR - [14:13] */ |
| @@ -2467,6 +2535,9 @@ | |||
| 2467 | /* | 2535 | /* |
| 2468 | * R804 (0x324) - IN3R Control | 2536 | * R804 (0x324) - IN3R Control |
| 2469 | */ | 2537 | */ |
| 2538 | #define ARIZONA_IN3R_HPF_MASK 0x8000 /* IN3R_HPF - [15] */ | ||
| 2539 | #define ARIZONA_IN3R_HPF_SHIFT 15 /* IN3R_HPF - [15] */ | ||
| 2540 | #define ARIZONA_IN3R_HPF_WIDTH 1 /* IN3R_HPF - [15] */ | ||
| 2470 | #define ARIZONA_IN3R_PGA_VOL_MASK 0x00FE /* IN3R_PGA_VOL - [7:1] */ | 2541 | #define ARIZONA_IN3R_PGA_VOL_MASK 0x00FE /* IN3R_PGA_VOL - [7:1] */ |
| 2471 | #define ARIZONA_IN3R_PGA_VOL_SHIFT 1 /* IN3R_PGA_VOL - [7:1] */ | 2542 | #define ARIZONA_IN3R_PGA_VOL_SHIFT 1 /* IN3R_PGA_VOL - [7:1] */ |
| 2472 | #define ARIZONA_IN3R_PGA_VOL_WIDTH 7 /* IN3R_PGA_VOL - [7:1] */ | 2543 | #define ARIZONA_IN3R_PGA_VOL_WIDTH 7 /* IN3R_PGA_VOL - [7:1] */ |
| @@ -2496,6 +2567,9 @@ | |||
| 2496 | /* | 2567 | /* |
| 2497 | * R808 (0x328) - IN4 Control | 2568 | * R808 (0x328) - IN4 Control |
| 2498 | */ | 2569 | */ |
| 2570 | #define ARIZONA_IN4L_HPF_MASK 0x8000 /* IN4L_HPF - [15] */ | ||
| 2571 | #define ARIZONA_IN4L_HPF_SHIFT 15 /* IN4L_HPF - [15] */ | ||
| 2572 | #define ARIZONA_IN4L_HPF_WIDTH 1 /* IN4L_HPF - [15] */ | ||
| 2499 | #define ARIZONA_IN4_OSR_MASK 0x6000 /* IN4_OSR - [14:13] */ | 2573 | #define ARIZONA_IN4_OSR_MASK 0x6000 /* IN4_OSR - [14:13] */ |
| 2500 | #define ARIZONA_IN4_OSR_SHIFT 13 /* IN4_OSR - [14:13] */ | 2574 | #define ARIZONA_IN4_OSR_SHIFT 13 /* IN4_OSR - [14:13] */ |
| 2501 | #define ARIZONA_IN4_OSR_WIDTH 2 /* IN4_OSR - [14:13] */ | 2575 | #define ARIZONA_IN4_OSR_WIDTH 2 /* IN4_OSR - [14:13] */ |
| @@ -2526,6 +2600,13 @@ | |||
| 2526 | #define ARIZONA_IN4L_DMIC_DLY_WIDTH 6 /* IN4L_DMIC_DLY - [5:0] */ | 2600 | #define ARIZONA_IN4L_DMIC_DLY_WIDTH 6 /* IN4L_DMIC_DLY - [5:0] */ |
| 2527 | 2601 | ||
| 2528 | /* | 2602 | /* |
| 2603 | * R812 (0x32C) - IN4R Control | ||
| 2604 | */ | ||
| 2605 | #define ARIZONA_IN4R_HPF_MASK 0x8000 /* IN4R_HPF - [15] */ | ||
| 2606 | #define ARIZONA_IN4R_HPF_SHIFT 15 /* IN4R_HPF - [15] */ | ||
| 2607 | #define ARIZONA_IN4R_HPF_WIDTH 1 /* IN4R_HPF - [15] */ | ||
| 2608 | |||
| 2609 | /* | ||
| 2529 | * R813 (0x32D) - ADC Digital Volume 4R | 2610 | * R813 (0x32D) - ADC Digital Volume 4R |
| 2530 | */ | 2611 | */ |
| 2531 | #define ARIZONA_IN_VU 0x0200 /* IN_VU */ | 2612 | #define ARIZONA_IN_VU 0x0200 /* IN_VU */ |
| @@ -3138,6 +3219,10 @@ | |||
| 3138 | /* | 3219 | /* |
| 3139 | * R1088 (0x440) - DRE Enable | 3220 | * R1088 (0x440) - DRE Enable |
| 3140 | */ | 3221 | */ |
| 3222 | #define ARIZONA_DRE3R_ENA 0x0020 /* DRE3R_ENA */ | ||
| 3223 | #define ARIZONA_DRE3R_ENA_MASK 0x0020 /* DRE3R_ENA */ | ||
| 3224 | #define ARIZONA_DRE3R_ENA_SHIFT 5 /* DRE3R_ENA */ | ||
| 3225 | #define ARIZONA_DRE3R_ENA_WIDTH 1 /* DRE3R_ENA */ | ||
| 3141 | #define ARIZONA_DRE3L_ENA 0x0010 /* DRE3L_ENA */ | 3226 | #define ARIZONA_DRE3L_ENA 0x0010 /* DRE3L_ENA */ |
| 3142 | #define ARIZONA_DRE3L_ENA_MASK 0x0010 /* DRE3L_ENA */ | 3227 | #define ARIZONA_DRE3L_ENA_MASK 0x0010 /* DRE3L_ENA */ |
| 3143 | #define ARIZONA_DRE3L_ENA_SHIFT 4 /* DRE3L_ENA */ | 3228 | #define ARIZONA_DRE3L_ENA_SHIFT 4 /* DRE3L_ENA */ |
| @@ -3260,6 +3345,30 @@ | |||
| 3260 | #define ARIZONA_SPK2_FMT_WIDTH 1 /* SPK2_FMT */ | 3345 | #define ARIZONA_SPK2_FMT_WIDTH 1 /* SPK2_FMT */ |
| 3261 | 3346 | ||
| 3262 | /* | 3347 | /* |
| 3348 | * R1184 (0x4A0) - HP1 Short Circuit Ctrl | ||
| 3349 | */ | ||
| 3350 | #define ARIZONA_HP1_SC_ENA 0x1000 /* HP1_SC_ENA */ | ||
| 3351 | #define ARIZONA_HP1_SC_ENA_MASK 0x1000 /* HP1_SC_ENA */ | ||
| 3352 | #define ARIZONA_HP1_SC_ENA_SHIFT 12 /* HP1_SC_ENA */ | ||
| 3353 | #define ARIZONA_HP1_SC_ENA_WIDTH 1 /* HP1_SC_ENA */ | ||
| 3354 | |||
| 3355 | /* | ||
| 3356 | * R1185 (0x4A1) - HP2 Short Circuit Ctrl | ||
| 3357 | */ | ||
| 3358 | #define ARIZONA_HP2_SC_ENA 0x1000 /* HP2_SC_ENA */ | ||
| 3359 | #define ARIZONA_HP2_SC_ENA_MASK 0x1000 /* HP2_SC_ENA */ | ||
| 3360 | #define ARIZONA_HP2_SC_ENA_SHIFT 12 /* HP2_SC_ENA */ | ||
| 3361 | #define ARIZONA_HP2_SC_ENA_WIDTH 1 /* HP2_SC_ENA */ | ||
| 3362 | |||
| 3363 | /* | ||
| 3364 | * R1186 (0x4A2) - HP3 Short Circuit Ctrl | ||
| 3365 | */ | ||
| 3366 | #define ARIZONA_HP3_SC_ENA 0x1000 /* HP3_SC_ENA */ | ||
| 3367 | #define ARIZONA_HP3_SC_ENA_MASK 0x1000 /* HP3_SC_ENA */ | ||
| 3368 | #define ARIZONA_HP3_SC_ENA_SHIFT 12 /* HP3_SC_ENA */ | ||
| 3369 | #define ARIZONA_HP3_SC_ENA_WIDTH 1 /* HP3_SC_ENA */ | ||
| 3370 | |||
| 3371 | /* | ||
| 3263 | * R1244 (0x4DC) - DAC comp 1 | 3372 | * R1244 (0x4DC) - DAC comp 1 |
| 3264 | */ | 3373 | */ |
| 3265 | #define ARIZONA_OUT_COMP_COEFF_MASK 0xFFFF /* OUT_COMP_COEFF - [15:0] */ | 3374 | #define ARIZONA_OUT_COMP_COEFF_MASK 0xFFFF /* OUT_COMP_COEFF - [15:0] */ |
| @@ -3726,6 +3835,35 @@ | |||
| 3726 | #define ARIZONA_AIF2TX2_SLOT_WIDTH 6 /* AIF2TX2_SLOT - [5:0] */ | 3835 | #define ARIZONA_AIF2TX2_SLOT_WIDTH 6 /* AIF2TX2_SLOT - [5:0] */ |
| 3727 | 3836 | ||
| 3728 | /* | 3837 | /* |
| 3838 | * R1355 (0x54B) - AIF2 Frame Ctrl 5 | ||
| 3839 | */ | ||
| 3840 | #define ARIZONA_AIF2TX3_SLOT_MASK 0x003F /* AIF2TX3_SLOT - [5:0] */ | ||
| 3841 | #define ARIZONA_AIF2TX3_SLOT_SHIFT 0 /* AIF2TX3_SLOT - [5:0] */ | ||
| 3842 | #define ARIZONA_AIF2TX3_SLOT_WIDTH 6 /* AIF2TX3_SLOT - [5:0] */ | ||
| 3843 | |||
| 3844 | /* | ||
| 3845 | * R1356 (0x54C) - AIF2 Frame Ctrl 6 | ||
| 3846 | */ | ||
| 3847 | #define ARIZONA_AIF2TX4_SLOT_MASK 0x003F /* AIF2TX4_SLOT - [5:0] */ | ||
| 3848 | #define ARIZONA_AIF2TX4_SLOT_SHIFT 0 /* AIF2TX4_SLOT - [5:0] */ | ||
| 3849 | #define ARIZONA_AIF2TX4_SLOT_WIDTH 6 /* AIF2TX4_SLOT - [5:0] */ | ||
| 3850 | |||
| 3851 | |||
| 3852 | /* | ||
| 3853 | * R1357 (0x54D) - AIF2 Frame Ctrl 7 | ||
| 3854 | */ | ||
| 3855 | #define ARIZONA_AIF2TX5_SLOT_MASK 0x003F /* AIF2TX5_SLOT - [5:0] */ | ||
| 3856 | #define ARIZONA_AIF2TX5_SLOT_SHIFT 0 /* AIF2TX5_SLOT - [5:0] */ | ||
| 3857 | #define ARIZONA_AIF2TX5_SLOT_WIDTH 6 /* AIF2TX5_SLOT - [5:0] */ | ||
| 3858 | |||
| 3859 | /* | ||
| 3860 | * R1358 (0x54E) - AIF2 Frame Ctrl 8 | ||
| 3861 | */ | ||
| 3862 | #define ARIZONA_AIF2TX6_SLOT_MASK 0x003F /* AIF2TX6_SLOT - [5:0] */ | ||
| 3863 | #define ARIZONA_AIF2TX6_SLOT_SHIFT 0 /* AIF2TX6_SLOT - [5:0] */ | ||
| 3864 | #define ARIZONA_AIF2TX6_SLOT_WIDTH 6 /* AIF2TX6_SLOT - [5:0] */ | ||
| 3865 | |||
| 3866 | /* | ||
| 3729 | * R1361 (0x551) - AIF2 Frame Ctrl 11 | 3867 | * R1361 (0x551) - AIF2 Frame Ctrl 11 |
| 3730 | */ | 3868 | */ |
| 3731 | #define ARIZONA_AIF2RX1_SLOT_MASK 0x003F /* AIF2RX1_SLOT - [5:0] */ | 3869 | #define ARIZONA_AIF2RX1_SLOT_MASK 0x003F /* AIF2RX1_SLOT - [5:0] */ |
| @@ -3740,8 +3878,52 @@ | |||
| 3740 | #define ARIZONA_AIF2RX2_SLOT_WIDTH 6 /* AIF2RX2_SLOT - [5:0] */ | 3878 | #define ARIZONA_AIF2RX2_SLOT_WIDTH 6 /* AIF2RX2_SLOT - [5:0] */ |
| 3741 | 3879 | ||
| 3742 | /* | 3880 | /* |
| 3881 | * R1363 (0x553) - AIF2 Frame Ctrl 13 | ||
| 3882 | */ | ||
| 3883 | #define ARIZONA_AIF2RX3_SLOT_MASK 0x003F /* AIF2RX3_SLOT - [5:0] */ | ||
| 3884 | #define ARIZONA_AIF2RX3_SLOT_SHIFT 0 /* AIF2RX3_SLOT - [5:0] */ | ||
| 3885 | #define ARIZONA_AIF2RX3_SLOT_WIDTH 6 /* AIF2RX3_SLOT - [5:0] */ | ||
| 3886 | |||
| 3887 | /* | ||
| 3888 | * R1364 (0x554) - AIF2 Frame Ctrl 14 | ||
| 3889 | */ | ||
| 3890 | #define ARIZONA_AIF2RX4_SLOT_MASK 0x003F /* AIF2RX4_SLOT - [5:0] */ | ||
| 3891 | #define ARIZONA_AIF2RX4_SLOT_SHIFT 0 /* AIF2RX4_SLOT - [5:0] */ | ||
| 3892 | #define ARIZONA_AIF2RX4_SLOT_WIDTH 6 /* AIF2RX4_SLOT - [5:0] */ | ||
| 3893 | |||
| 3894 | /* | ||
| 3895 | * R1365 (0x555) - AIF2 Frame Ctrl 15 | ||
| 3896 | */ | ||
| 3897 | #define ARIZONA_AIF2RX5_SLOT_MASK 0x003F /* AIF2RX5_SLOT - [5:0] */ | ||
| 3898 | #define ARIZONA_AIF2RX5_SLOT_SHIFT 0 /* AIF2RX5_SLOT - [5:0] */ | ||
| 3899 | #define ARIZONA_AIF2RX5_SLOT_WIDTH 6 /* AIF2RX5_SLOT - [5:0] */ | ||
| 3900 | |||
| 3901 | /* | ||
| 3902 | * R1366 (0x556) - AIF2 Frame Ctrl 16 | ||
| 3903 | */ | ||
| 3904 | #define ARIZONA_AIF2RX6_SLOT_MASK 0x003F /* AIF2RX6_SLOT - [5:0] */ | ||
| 3905 | #define ARIZONA_AIF2RX6_SLOT_SHIFT 0 /* AIF2RX6_SLOT - [5:0] */ | ||
| 3906 | #define ARIZONA_AIF2RX6_SLOT_WIDTH 6 /* AIF2RX6_SLOT - [5:0] */ | ||
| 3907 | |||
| 3908 | /* | ||
| 3743 | * R1369 (0x559) - AIF2 Tx Enables | 3909 | * R1369 (0x559) - AIF2 Tx Enables |
| 3744 | */ | 3910 | */ |
| 3911 | #define ARIZONA_AIF2TX6_ENA 0x0020 /* AIF2TX6_ENA */ | ||
| 3912 | #define ARIZONA_AIF2TX6_ENA_MASK 0x0020 /* AIF2TX6_ENA */ | ||
| 3913 | #define ARIZONA_AIF2TX6_ENA_SHIFT 5 /* AIF2TX6_ENA */ | ||
| 3914 | #define ARIZONA_AIF2TX6_ENA_WIDTH 1 /* AIF2TX6_ENA */ | ||
| 3915 | #define ARIZONA_AIF2TX5_ENA 0x0010 /* AIF2TX5_ENA */ | ||
| 3916 | #define ARIZONA_AIF2TX5_ENA_MASK 0x0010 /* AIF2TX5_ENA */ | ||
| 3917 | #define ARIZONA_AIF2TX5_ENA_SHIFT 4 /* AIF2TX5_ENA */ | ||
| 3918 | #define ARIZONA_AIF2TX5_ENA_WIDTH 1 /* AIF2TX5_ENA */ | ||
| 3919 | #define ARIZONA_AIF2TX4_ENA 0x0008 /* AIF2TX4_ENA */ | ||
| 3920 | #define ARIZONA_AIF2TX4_ENA_MASK 0x0008 /* AIF2TX4_ENA */ | ||
| 3921 | #define ARIZONA_AIF2TX4_ENA_SHIFT 3 /* AIF2TX4_ENA */ | ||
| 3922 | #define ARIZONA_AIF2TX4_ENA_WIDTH 1 /* AIF2TX4_ENA */ | ||
| 3923 | #define ARIZONA_AIF2TX3_ENA 0x0004 /* AIF2TX3_ENA */ | ||
| 3924 | #define ARIZONA_AIF2TX3_ENA_MASK 0x0004 /* AIF2TX3_ENA */ | ||
| 3925 | #define ARIZONA_AIF2TX3_ENA_SHIFT 2 /* AIF2TX3_ENA */ | ||
| 3926 | #define ARIZONA_AIF2TX3_ENA_WIDTH 1 /* AIF2TX3_ENA */ | ||
| 3745 | #define ARIZONA_AIF2TX2_ENA 0x0002 /* AIF2TX2_ENA */ | 3927 | #define ARIZONA_AIF2TX2_ENA 0x0002 /* AIF2TX2_ENA */ |
| 3746 | #define ARIZONA_AIF2TX2_ENA_MASK 0x0002 /* AIF2TX2_ENA */ | 3928 | #define ARIZONA_AIF2TX2_ENA_MASK 0x0002 /* AIF2TX2_ENA */ |
| 3747 | #define ARIZONA_AIF2TX2_ENA_SHIFT 1 /* AIF2TX2_ENA */ | 3929 | #define ARIZONA_AIF2TX2_ENA_SHIFT 1 /* AIF2TX2_ENA */ |
| @@ -3754,6 +3936,22 @@ | |||
| 3754 | /* | 3936 | /* |
| 3755 | * R1370 (0x55A) - AIF2 Rx Enables | 3937 | * R1370 (0x55A) - AIF2 Rx Enables |
| 3756 | */ | 3938 | */ |
| 3939 | #define ARIZONA_AIF2RX6_ENA 0x0020 /* AIF2RX6_ENA */ | ||
| 3940 | #define ARIZONA_AIF2RX6_ENA_MASK 0x0020 /* AIF2RX6_ENA */ | ||
| 3941 | #define ARIZONA_AIF2RX6_ENA_SHIFT 5 /* AIF2RX6_ENA */ | ||
| 3942 | #define ARIZONA_AIF2RX6_ENA_WIDTH 1 /* AIF2RX6_ENA */ | ||
| 3943 | #define ARIZONA_AIF2RX5_ENA 0x0010 /* AIF2RX5_ENA */ | ||
| 3944 | #define ARIZONA_AIF2RX5_ENA_MASK 0x0010 /* AIF2RX5_ENA */ | ||
| 3945 | #define ARIZONA_AIF2RX5_ENA_SHIFT 4 /* AIF2RX5_ENA */ | ||
| 3946 | #define ARIZONA_AIF2RX5_ENA_WIDTH 1 /* AIF2RX5_ENA */ | ||
| 3947 | #define ARIZONA_AIF2RX4_ENA 0x0008 /* AIF2RX4_ENA */ | ||
| 3948 | #define ARIZONA_AIF2RX4_ENA_MASK 0x0008 /* AIF2RX4_ENA */ | ||
| 3949 | #define ARIZONA_AIF2RX4_ENA_SHIFT 3 /* AIF2RX4_ENA */ | ||
| 3950 | #define ARIZONA_AIF2RX4_ENA_WIDTH 1 /* AIF2RX4_ENA */ | ||
| 3951 | #define ARIZONA_AIF2RX3_ENA 0x0004 /* AIF2RX3_ENA */ | ||
| 3952 | #define ARIZONA_AIF2RX3_ENA_MASK 0x0004 /* AIF2RX3_ENA */ | ||
| 3953 | #define ARIZONA_AIF2RX3_ENA_SHIFT 2 /* AIF2RX3_ENA */ | ||
| 3954 | #define ARIZONA_AIF2RX3_ENA_WIDTH 1 /* AIF2RX3_ENA */ | ||
| 3757 | #define ARIZONA_AIF2RX2_ENA 0x0002 /* AIF2RX2_ENA */ | 3955 | #define ARIZONA_AIF2RX2_ENA 0x0002 /* AIF2RX2_ENA */ |
| 3758 | #define ARIZONA_AIF2RX2_ENA_MASK 0x0002 /* AIF2RX2_ENA */ | 3956 | #define ARIZONA_AIF2RX2_ENA_MASK 0x0002 /* AIF2RX2_ENA */ |
| 3759 | #define ARIZONA_AIF2RX2_ENA_SHIFT 1 /* AIF2RX2_ENA */ | 3957 | #define ARIZONA_AIF2RX2_ENA_SHIFT 1 /* AIF2RX2_ENA */ |
diff --git a/include/linux/mfd/as3722.h b/include/linux/mfd/as3722.h index 16bf8a0dcd97..f654a7a42260 100644 --- a/include/linux/mfd/as3722.h +++ b/include/linux/mfd/as3722.h | |||
| @@ -314,6 +314,7 @@ | |||
| 314 | #define AS3722_GPIO_IOSF_GPIO_INTERRUPT_IN AS3722_GPIO_IOSF_VAL(3) | 314 | #define AS3722_GPIO_IOSF_GPIO_INTERRUPT_IN AS3722_GPIO_IOSF_VAL(3) |
| 315 | #define AS3722_GPIO_IOSF_ISINK_PWM_IN AS3722_GPIO_IOSF_VAL(4) | 315 | #define AS3722_GPIO_IOSF_ISINK_PWM_IN AS3722_GPIO_IOSF_VAL(4) |
| 316 | #define AS3722_GPIO_IOSF_VOLTAGE_STBY AS3722_GPIO_IOSF_VAL(5) | 316 | #define AS3722_GPIO_IOSF_VOLTAGE_STBY AS3722_GPIO_IOSF_VAL(5) |
| 317 | #define AS3722_GPIO_IOSF_SD0_OUT AS3722_GPIO_IOSF_VAL(6) | ||
| 317 | #define AS3722_GPIO_IOSF_PWR_GOOD_OUT AS3722_GPIO_IOSF_VAL(7) | 318 | #define AS3722_GPIO_IOSF_PWR_GOOD_OUT AS3722_GPIO_IOSF_VAL(7) |
| 318 | #define AS3722_GPIO_IOSF_Q32K_OUT AS3722_GPIO_IOSF_VAL(8) | 319 | #define AS3722_GPIO_IOSF_Q32K_OUT AS3722_GPIO_IOSF_VAL(8) |
| 319 | #define AS3722_GPIO_IOSF_WATCHDOG_IN AS3722_GPIO_IOSF_VAL(9) | 320 | #define AS3722_GPIO_IOSF_WATCHDOG_IN AS3722_GPIO_IOSF_VAL(9) |
diff --git a/include/linux/mfd/lp3943.h b/include/linux/mfd/lp3943.h new file mode 100644 index 000000000000..3490db782988 --- /dev/null +++ b/include/linux/mfd/lp3943.h | |||
| @@ -0,0 +1,114 @@ | |||
| 1 | /* | ||
| 2 | * TI/National Semiconductor LP3943 Device | ||
| 3 | * | ||
| 4 | * Copyright 2013 Texas Instruments | ||
| 5 | * | ||
| 6 | * Author: Milo Kim <milo.kim@ti.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 as | ||
| 10 | * published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef __MFD_LP3943_H__ | ||
| 15 | #define __MFD_LP3943_H__ | ||
| 16 | |||
| 17 | #include <linux/gpio.h> | ||
| 18 | #include <linux/pwm.h> | ||
| 19 | #include <linux/regmap.h> | ||
| 20 | |||
| 21 | /* Registers */ | ||
| 22 | #define LP3943_REG_GPIO_A 0x00 | ||
| 23 | #define LP3943_REG_GPIO_B 0x01 | ||
| 24 | #define LP3943_REG_PRESCALE0 0x02 | ||
| 25 | #define LP3943_REG_PWM0 0x03 | ||
| 26 | #define LP3943_REG_PRESCALE1 0x04 | ||
| 27 | #define LP3943_REG_PWM1 0x05 | ||
| 28 | #define LP3943_REG_MUX0 0x06 | ||
| 29 | #define LP3943_REG_MUX1 0x07 | ||
| 30 | #define LP3943_REG_MUX2 0x08 | ||
| 31 | #define LP3943_REG_MUX3 0x09 | ||
| 32 | |||
| 33 | /* Bit description for LP3943_REG_MUX0 ~ 3 */ | ||
| 34 | #define LP3943_GPIO_IN 0x00 | ||
| 35 | #define LP3943_GPIO_OUT_HIGH 0x00 | ||
| 36 | #define LP3943_GPIO_OUT_LOW 0x01 | ||
| 37 | #define LP3943_DIM_PWM0 0x02 | ||
| 38 | #define LP3943_DIM_PWM1 0x03 | ||
| 39 | |||
| 40 | #define LP3943_NUM_PWMS 2 | ||
| 41 | |||
| 42 | enum lp3943_pwm_output { | ||
| 43 | LP3943_PWM_OUT0, | ||
| 44 | LP3943_PWM_OUT1, | ||
| 45 | LP3943_PWM_OUT2, | ||
| 46 | LP3943_PWM_OUT3, | ||
| 47 | LP3943_PWM_OUT4, | ||
| 48 | LP3943_PWM_OUT5, | ||
| 49 | LP3943_PWM_OUT6, | ||
| 50 | LP3943_PWM_OUT7, | ||
| 51 | LP3943_PWM_OUT8, | ||
| 52 | LP3943_PWM_OUT9, | ||
| 53 | LP3943_PWM_OUT10, | ||
| 54 | LP3943_PWM_OUT11, | ||
| 55 | LP3943_PWM_OUT12, | ||
| 56 | LP3943_PWM_OUT13, | ||
| 57 | LP3943_PWM_OUT14, | ||
| 58 | LP3943_PWM_OUT15, | ||
| 59 | }; | ||
| 60 | |||
| 61 | /* | ||
| 62 | * struct lp3943_pwm_map | ||
| 63 | * @output: Output pins which are mapped to each PWM channel | ||
| 64 | * @num_outputs: Number of outputs | ||
| 65 | */ | ||
| 66 | struct lp3943_pwm_map { | ||
| 67 | enum lp3943_pwm_output *output; | ||
| 68 | int num_outputs; | ||
| 69 | }; | ||
| 70 | |||
| 71 | /* | ||
| 72 | * struct lp3943_platform_data | ||
| 73 | * @pwms: Output channel definitions for PWM channel 0 and 1 | ||
| 74 | */ | ||
| 75 | struct lp3943_platform_data { | ||
| 76 | struct lp3943_pwm_map *pwms[LP3943_NUM_PWMS]; | ||
| 77 | }; | ||
| 78 | |||
| 79 | /* | ||
| 80 | * struct lp3943_reg_cfg | ||
| 81 | * @reg: Register address | ||
| 82 | * @mask: Register bit mask to be updated | ||
| 83 | * @shift: Register bit shift | ||
| 84 | */ | ||
| 85 | struct lp3943_reg_cfg { | ||
| 86 | u8 reg; | ||
| 87 | u8 mask; | ||
| 88 | u8 shift; | ||
| 89 | }; | ||
| 90 | |||
| 91 | /* | ||
| 92 | * struct lp3943 | ||
| 93 | * @dev: Parent device pointer | ||
| 94 | * @regmap: Used for I2C communication on accessing registers | ||
| 95 | * @pdata: LP3943 platform specific data | ||
| 96 | * @mux_cfg: Register configuration for pin MUX | ||
| 97 | * @pin_used: Bit mask for output pin used. | ||
| 98 | * This bitmask is used for pin assignment management. | ||
| 99 | * 1 = pin used, 0 = available. | ||
| 100 | * Only LSB 16 bits are used, but it is unsigned long type | ||
| 101 | * for atomic bitwise operations. | ||
| 102 | */ | ||
| 103 | struct lp3943 { | ||
| 104 | struct device *dev; | ||
| 105 | struct regmap *regmap; | ||
| 106 | struct lp3943_platform_data *pdata; | ||
| 107 | const struct lp3943_reg_cfg *mux_cfg; | ||
| 108 | unsigned long pin_used; | ||
| 109 | }; | ||
| 110 | |||
| 111 | int lp3943_read_byte(struct lp3943 *lp3943, u8 reg, u8 *read); | ||
| 112 | int lp3943_write_byte(struct lp3943 *lp3943, u8 reg, u8 data); | ||
| 113 | int lp3943_update_bits(struct lp3943 *lp3943, u8 reg, u8 mask, u8 data); | ||
| 114 | #endif | ||
diff --git a/include/linux/mfd/max14577-private.h b/include/linux/mfd/max14577-private.h new file mode 100644 index 000000000000..a3d0185196d3 --- /dev/null +++ b/include/linux/mfd/max14577-private.h | |||
| @@ -0,0 +1,330 @@ | |||
| 1 | /* | ||
| 2 | * max14577-private.h - Common API for the Maxim 14577 internal sub chip | ||
| 3 | * | ||
| 4 | * Copyright (C) 2013 Samsung Electrnoics | ||
| 5 | * Chanwoo Choi <cw00.choi@samsung.com> | ||
| 6 | * Krzysztof Kozlowski <k.kozlowski@samsung.com> | ||
| 7 | * | ||
| 8 | * 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 | ||
| 10 | * the Free Software Foundation; either version 2 of the License, or | ||
| 11 | * (at your option) any later version. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef __MAX14577_PRIVATE_H__ | ||
| 20 | #define __MAX14577_PRIVATE_H__ | ||
| 21 | |||
| 22 | #include <linux/i2c.h> | ||
| 23 | #include <linux/regmap.h> | ||
| 24 | |||
| 25 | #define MAX14577_REG_INVALID (0xff) | ||
| 26 | |||
| 27 | /* Slave addr = 0x4A: Interrupt */ | ||
| 28 | enum max14577_reg { | ||
| 29 | MAX14577_REG_DEVICEID = 0x00, | ||
| 30 | MAX14577_REG_INT1 = 0x01, | ||
| 31 | MAX14577_REG_INT2 = 0x02, | ||
| 32 | MAX14577_REG_INT3 = 0x03, | ||
| 33 | MAX14577_REG_STATUS1 = 0x04, | ||
| 34 | MAX14577_REG_STATUS2 = 0x05, | ||
| 35 | MAX14577_REG_STATUS3 = 0x06, | ||
| 36 | MAX14577_REG_INTMASK1 = 0x07, | ||
| 37 | MAX14577_REG_INTMASK2 = 0x08, | ||
| 38 | MAX14577_REG_INTMASK3 = 0x09, | ||
| 39 | MAX14577_REG_CDETCTRL1 = 0x0A, | ||
| 40 | MAX14577_REG_RFU = 0x0B, | ||
| 41 | MAX14577_REG_CONTROL1 = 0x0C, | ||
| 42 | MAX14577_REG_CONTROL2 = 0x0D, | ||
| 43 | MAX14577_REG_CONTROL3 = 0x0E, | ||
| 44 | MAX14577_REG_CHGCTRL1 = 0x0F, | ||
| 45 | MAX14577_REG_CHGCTRL2 = 0x10, | ||
| 46 | MAX14577_REG_CHGCTRL3 = 0x11, | ||
| 47 | MAX14577_REG_CHGCTRL4 = 0x12, | ||
| 48 | MAX14577_REG_CHGCTRL5 = 0x13, | ||
| 49 | MAX14577_REG_CHGCTRL6 = 0x14, | ||
| 50 | MAX14577_REG_CHGCTRL7 = 0x15, | ||
| 51 | |||
| 52 | MAX14577_REG_END, | ||
| 53 | }; | ||
| 54 | |||
| 55 | /* Slave addr = 0x4A: MUIC */ | ||
| 56 | enum max14577_muic_reg { | ||
| 57 | MAX14577_MUIC_REG_STATUS1 = 0x04, | ||
| 58 | MAX14577_MUIC_REG_STATUS2 = 0x05, | ||
| 59 | MAX14577_MUIC_REG_CONTROL1 = 0x0C, | ||
| 60 | MAX14577_MUIC_REG_CONTROL3 = 0x0E, | ||
| 61 | |||
| 62 | MAX14577_MUIC_REG_END, | ||
| 63 | }; | ||
| 64 | |||
| 65 | enum max14577_muic_charger_type { | ||
| 66 | MAX14577_CHARGER_TYPE_NONE = 0, | ||
| 67 | MAX14577_CHARGER_TYPE_USB, | ||
| 68 | MAX14577_CHARGER_TYPE_DOWNSTREAM_PORT, | ||
| 69 | MAX14577_CHARGER_TYPE_DEDICATED_CHG, | ||
| 70 | MAX14577_CHARGER_TYPE_SPECIAL_500MA, | ||
| 71 | MAX14577_CHARGER_TYPE_SPECIAL_1A, | ||
| 72 | MAX14577_CHARGER_TYPE_RESERVED, | ||
| 73 | MAX14577_CHARGER_TYPE_DEAD_BATTERY = 7, | ||
| 74 | }; | ||
| 75 | |||
| 76 | /* MAX14577 interrupts */ | ||
| 77 | #define INT1_ADC_MASK (0x1 << 0) | ||
| 78 | #define INT1_ADCLOW_MASK (0x1 << 1) | ||
| 79 | #define INT1_ADCERR_MASK (0x1 << 2) | ||
| 80 | |||
| 81 | #define INT2_CHGTYP_MASK (0x1 << 0) | ||
| 82 | #define INT2_CHGDETRUN_MASK (0x1 << 1) | ||
| 83 | #define INT2_DCDTMR_MASK (0x1 << 2) | ||
| 84 | #define INT2_DBCHG_MASK (0x1 << 3) | ||
| 85 | #define INT2_VBVOLT_MASK (0x1 << 4) | ||
| 86 | |||
| 87 | #define INT3_EOC_MASK (0x1 << 0) | ||
| 88 | #define INT3_CGMBC_MASK (0x1 << 1) | ||
| 89 | #define INT3_OVP_MASK (0x1 << 2) | ||
| 90 | #define INT3_MBCCHGERR_MASK (0x1 << 3) | ||
| 91 | |||
| 92 | /* MAX14577 DEVICE ID register */ | ||
| 93 | #define DEVID_VENDORID_SHIFT 0 | ||
| 94 | #define DEVID_DEVICEID_SHIFT 3 | ||
| 95 | #define DEVID_VENDORID_MASK (0x07 << DEVID_VENDORID_SHIFT) | ||
| 96 | #define DEVID_DEVICEID_MASK (0x1f << DEVID_DEVICEID_SHIFT) | ||
| 97 | |||
| 98 | /* MAX14577 STATUS1 register */ | ||
| 99 | #define STATUS1_ADC_SHIFT 0 | ||
| 100 | #define STATUS1_ADCLOW_SHIFT 5 | ||
| 101 | #define STATUS1_ADCERR_SHIFT 6 | ||
| 102 | #define STATUS1_ADC_MASK (0x1f << STATUS1_ADC_SHIFT) | ||
| 103 | #define STATUS1_ADCLOW_MASK (0x1 << STATUS1_ADCLOW_SHIFT) | ||
| 104 | #define STATUS1_ADCERR_MASK (0x1 << STATUS1_ADCERR_SHIFT) | ||
| 105 | |||
| 106 | /* MAX14577 STATUS2 register */ | ||
| 107 | #define STATUS2_CHGTYP_SHIFT 0 | ||
| 108 | #define STATUS2_CHGDETRUN_SHIFT 3 | ||
| 109 | #define STATUS2_DCDTMR_SHIFT 4 | ||
| 110 | #define STATUS2_DBCHG_SHIFT 5 | ||
| 111 | #define STATUS2_VBVOLT_SHIFT 6 | ||
| 112 | #define STATUS2_CHGTYP_MASK (0x7 << STATUS2_CHGTYP_SHIFT) | ||
| 113 | #define STATUS2_CHGDETRUN_MASK (0x1 << STATUS2_CHGDETRUN_SHIFT) | ||
| 114 | #define STATUS2_DCDTMR_MASK (0x1 << STATUS2_DCDTMR_SHIFT) | ||
| 115 | #define STATUS2_DBCHG_MASK (0x1 << STATUS2_DBCHG_SHIFT) | ||
| 116 | #define STATUS2_VBVOLT_MASK (0x1 << STATUS2_VBVOLT_SHIFT) | ||
| 117 | |||
| 118 | /* MAX14577 CONTROL1 register */ | ||
| 119 | #define COMN1SW_SHIFT 0 | ||
| 120 | #define COMP2SW_SHIFT 3 | ||
| 121 | #define MICEN_SHIFT 6 | ||
| 122 | #define IDBEN_SHIFT 7 | ||
| 123 | #define COMN1SW_MASK (0x7 << COMN1SW_SHIFT) | ||
| 124 | #define COMP2SW_MASK (0x7 << COMP2SW_SHIFT) | ||
| 125 | #define MICEN_MASK (0x1 << MICEN_SHIFT) | ||
| 126 | #define IDBEN_MASK (0x1 << IDBEN_SHIFT) | ||
| 127 | #define CLEAR_IDBEN_MICEN_MASK (COMN1SW_MASK | COMP2SW_MASK) | ||
| 128 | #define CTRL1_SW_USB ((1 << COMP2SW_SHIFT) \ | ||
| 129 | | (1 << COMN1SW_SHIFT)) | ||
| 130 | #define CTRL1_SW_AUDIO ((2 << COMP2SW_SHIFT) \ | ||
| 131 | | (2 << COMN1SW_SHIFT)) | ||
| 132 | #define CTRL1_SW_UART ((3 << COMP2SW_SHIFT) \ | ||
| 133 | | (3 << COMN1SW_SHIFT)) | ||
| 134 | #define CTRL1_SW_OPEN ((0 << COMP2SW_SHIFT) \ | ||
| 135 | | (0 << COMN1SW_SHIFT)) | ||
| 136 | |||
| 137 | /* MAX14577 CONTROL2 register */ | ||
| 138 | #define CTRL2_LOWPWR_SHIFT (0) | ||
| 139 | #define CTRL2_ADCEN_SHIFT (1) | ||
| 140 | #define CTRL2_CPEN_SHIFT (2) | ||
| 141 | #define CTRL2_SFOUTASRT_SHIFT (3) | ||
| 142 | #define CTRL2_SFOUTORD_SHIFT (4) | ||
| 143 | #define CTRL2_ACCDET_SHIFT (5) | ||
| 144 | #define CTRL2_USBCPINT_SHIFT (6) | ||
| 145 | #define CTRL2_RCPS_SHIFT (7) | ||
| 146 | #define CTRL2_LOWPWR_MASK (0x1 << CTRL2_LOWPWR_SHIFT) | ||
| 147 | #define CTRL2_ADCEN_MASK (0x1 << CTRL2_ADCEN_SHIFT) | ||
| 148 | #define CTRL2_CPEN_MASK (0x1 << CTRL2_CPEN_SHIFT) | ||
| 149 | #define CTRL2_SFOUTASRT_MASK (0x1 << CTRL2_SFOUTASRT_SHIFT) | ||
| 150 | #define CTRL2_SFOUTORD_MASK (0x1 << CTRL2_SFOUTORD_SHIFT) | ||
| 151 | #define CTRL2_ACCDET_MASK (0x1 << CTRL2_ACCDET_SHIFT) | ||
| 152 | #define CTRL2_USBCPINT_MASK (0x1 << CTRL2_USBCPINT_SHIFT) | ||
| 153 | #define CTRL2_RCPS_MASK (0x1 << CTR2_RCPS_SHIFT) | ||
| 154 | |||
| 155 | #define CTRL2_CPEN1_LOWPWR0 ((1 << CTRL2_CPEN_SHIFT) | \ | ||
| 156 | (0 << CTRL2_LOWPWR_SHIFT)) | ||
| 157 | #define CTRL2_CPEN0_LOWPWR1 ((0 << CTRL2_CPEN_SHIFT) | \ | ||
| 158 | (1 << CTRL2_LOWPWR_SHIFT)) | ||
| 159 | |||
| 160 | /* MAX14577 CONTROL3 register */ | ||
| 161 | #define CTRL3_JIGSET_SHIFT 0 | ||
| 162 | #define CTRL3_BOOTSET_SHIFT 2 | ||
| 163 | #define CTRL3_ADCDBSET_SHIFT 4 | ||
| 164 | #define CTRL3_JIGSET_MASK (0x3 << CTRL3_JIGSET_SHIFT) | ||
| 165 | #define CTRL3_BOOTSET_MASK (0x3 << CTRL3_BOOTSET_SHIFT) | ||
| 166 | #define CTRL3_ADCDBSET_MASK (0x3 << CTRL3_ADCDBSET_SHIFT) | ||
| 167 | |||
| 168 | /* Slave addr = 0x4A: Charger */ | ||
| 169 | enum max14577_charger_reg { | ||
| 170 | MAX14577_CHG_REG_STATUS3 = 0x06, | ||
| 171 | MAX14577_CHG_REG_CHG_CTRL1 = 0x0F, | ||
| 172 | MAX14577_CHG_REG_CHG_CTRL2 = 0x10, | ||
| 173 | MAX14577_CHG_REG_CHG_CTRL3 = 0x11, | ||
| 174 | MAX14577_CHG_REG_CHG_CTRL4 = 0x12, | ||
| 175 | MAX14577_CHG_REG_CHG_CTRL5 = 0x13, | ||
| 176 | MAX14577_CHG_REG_CHG_CTRL6 = 0x14, | ||
| 177 | MAX14577_CHG_REG_CHG_CTRL7 = 0x15, | ||
| 178 | |||
| 179 | MAX14577_CHG_REG_END, | ||
| 180 | }; | ||
| 181 | |||
| 182 | /* MAX14577 STATUS3 register */ | ||
| 183 | #define STATUS3_EOC_SHIFT 0 | ||
| 184 | #define STATUS3_CGMBC_SHIFT 1 | ||
| 185 | #define STATUS3_OVP_SHIFT 2 | ||
| 186 | #define STATUS3_MBCCHGERR_SHIFT 3 | ||
| 187 | #define STATUS3_EOC_MASK (0x1 << STATUS3_EOC_SHIFT) | ||
| 188 | #define STATUS3_CGMBC_MASK (0x1 << STATUS3_CGMBC_SHIFT) | ||
| 189 | #define STATUS3_OVP_MASK (0x1 << STATUS3_OVP_SHIFT) | ||
| 190 | #define STATUS3_MBCCHGERR_MASK (0x1 << STATUS3_MBCCHGERR_SHIFT) | ||
| 191 | |||
| 192 | /* MAX14577 CDETCTRL1 register */ | ||
| 193 | #define CDETCTRL1_CHGDETEN_SHIFT 0 | ||
| 194 | #define CDETCTRL1_CHGTYPMAN_SHIFT 1 | ||
| 195 | #define CDETCTRL1_DCDEN_SHIFT 2 | ||
| 196 | #define CDETCTRL1_DCD2SCT_SHIFT 3 | ||
| 197 | #define CDETCTRL1_DCHKTM_SHIFT 4 | ||
| 198 | #define CDETCTRL1_DBEXIT_SHIFT 5 | ||
| 199 | #define CDETCTRL1_DBIDLE_SHIFT 6 | ||
| 200 | #define CDETCTRL1_CDPDET_SHIFT 7 | ||
| 201 | #define CDETCTRL1_CHGDETEN_MASK (0x1 << CDETCTRL1_CHGDETEN_SHIFT) | ||
| 202 | #define CDETCTRL1_CHGTYPMAN_MASK (0x1 << CDETCTRL1_CHGTYPMAN_SHIFT) | ||
| 203 | #define CDETCTRL1_DCDEN_MASK (0x1 << CDETCTRL1_DCDEN_SHIFT) | ||
| 204 | #define CDETCTRL1_DCD2SCT_MASK (0x1 << CDETCTRL1_DCD2SCT_SHIFT) | ||
| 205 | #define CDETCTRL1_DCHKTM_MASK (0x1 << CDETCTRL1_DCHKTM_SHIFT) | ||
| 206 | #define CDETCTRL1_DBEXIT_MASK (0x1 << CDETCTRL1_DBEXIT_SHIFT) | ||
| 207 | #define CDETCTRL1_DBIDLE_MASK (0x1 << CDETCTRL1_DBIDLE_SHIFT) | ||
| 208 | #define CDETCTRL1_CDPDET_MASK (0x1 << CDETCTRL1_CDPDET_SHIFT) | ||
| 209 | |||
| 210 | /* MAX14577 CHGCTRL1 register */ | ||
| 211 | #define CHGCTRL1_TCHW_SHIFT 4 | ||
| 212 | #define CHGCTRL1_TCHW_MASK (0x7 << CHGCTRL1_TCHW_SHIFT) | ||
| 213 | |||
| 214 | /* MAX14577 CHGCTRL2 register */ | ||
| 215 | #define CHGCTRL2_MBCHOSTEN_SHIFT 6 | ||
| 216 | #define CHGCTRL2_MBCHOSTEN_MASK (0x1 << CHGCTRL2_MBCHOSTEN_SHIFT) | ||
| 217 | #define CHGCTRL2_VCHGR_RC_SHIFT 7 | ||
| 218 | #define CHGCTRL2_VCHGR_RC_MASK (0x1 << CHGCTRL2_VCHGR_RC_SHIFT) | ||
| 219 | |||
| 220 | /* MAX14577 CHGCTRL3 register */ | ||
| 221 | #define CHGCTRL3_MBCCVWRC_SHIFT 0 | ||
| 222 | #define CHGCTRL3_MBCCVWRC_MASK (0xf << CHGCTRL3_MBCCVWRC_SHIFT) | ||
| 223 | |||
| 224 | /* MAX14577 CHGCTRL4 register */ | ||
| 225 | #define CHGCTRL4_MBCICHWRCH_SHIFT 0 | ||
| 226 | #define CHGCTRL4_MBCICHWRCH_MASK (0xf << CHGCTRL4_MBCICHWRCH_SHIFT) | ||
| 227 | #define CHGCTRL4_MBCICHWRCL_SHIFT 4 | ||
| 228 | #define CHGCTRL4_MBCICHWRCL_MASK (0x1 << CHGCTRL4_MBCICHWRCL_SHIFT) | ||
| 229 | |||
| 230 | /* MAX14577 CHGCTRL5 register */ | ||
| 231 | #define CHGCTRL5_EOCS_SHIFT 0 | ||
| 232 | #define CHGCTRL5_EOCS_MASK (0xf << CHGCTRL5_EOCS_SHIFT) | ||
| 233 | |||
| 234 | /* MAX14577 CHGCTRL6 register */ | ||
| 235 | #define CHGCTRL6_AUTOSTOP_SHIFT 5 | ||
| 236 | #define CHGCTRL6_AUTOSTOP_MASK (0x1 << CHGCTRL6_AUTOSTOP_SHIFT) | ||
| 237 | |||
| 238 | /* MAX14577 CHGCTRL7 register */ | ||
| 239 | #define CHGCTRL7_OTPCGHCVS_SHIFT 0 | ||
| 240 | #define CHGCTRL7_OTPCGHCVS_MASK (0x3 << CHGCTRL7_OTPCGHCVS_SHIFT) | ||
| 241 | |||
| 242 | /* MAX14577 regulator current limits (as in CHGCTRL4 register), uA */ | ||
| 243 | #define MAX14577_REGULATOR_CURRENT_LIMIT_MIN 90000 | ||
| 244 | #define MAX14577_REGULATOR_CURRENT_LIMIT_HIGH_START 200000 | ||
| 245 | #define MAX14577_REGULATOR_CURRENT_LIMIT_HIGH_STEP 50000 | ||
| 246 | #define MAX14577_REGULATOR_CURRENT_LIMIT_MAX 950000 | ||
| 247 | |||
| 248 | /* MAX14577 regulator SFOUT LDO voltage, fixed, uV */ | ||
| 249 | #define MAX14577_REGULATOR_SAFEOUT_VOLTAGE 4900000 | ||
| 250 | |||
| 251 | enum max14577_irq_source { | ||
| 252 | MAX14577_IRQ_INT1 = 0, | ||
| 253 | MAX14577_IRQ_INT2, | ||
| 254 | MAX14577_IRQ_INT3, | ||
| 255 | |||
| 256 | MAX14577_IRQ_REGS_NUM, | ||
| 257 | }; | ||
| 258 | |||
| 259 | enum max14577_irq { | ||
| 260 | /* INT1 */ | ||
| 261 | MAX14577_IRQ_INT1_ADC, | ||
| 262 | MAX14577_IRQ_INT1_ADCLOW, | ||
| 263 | MAX14577_IRQ_INT1_ADCERR, | ||
| 264 | |||
| 265 | /* INT2 */ | ||
| 266 | MAX14577_IRQ_INT2_CHGTYP, | ||
| 267 | MAX14577_IRQ_INT2_CHGDETRUN, | ||
| 268 | MAX14577_IRQ_INT2_DCDTMR, | ||
| 269 | MAX14577_IRQ_INT2_DBCHG, | ||
| 270 | MAX14577_IRQ_INT2_VBVOLT, | ||
| 271 | |||
| 272 | /* INT3 */ | ||
| 273 | MAX14577_IRQ_INT3_EOC, | ||
| 274 | MAX14577_IRQ_INT3_CGMBC, | ||
| 275 | MAX14577_IRQ_INT3_OVP, | ||
| 276 | MAX14577_IRQ_INT3_MBCCHGERR, | ||
| 277 | |||
| 278 | MAX14577_IRQ_NUM, | ||
| 279 | }; | ||
| 280 | |||
| 281 | struct max14577 { | ||
| 282 | struct device *dev; | ||
| 283 | struct i2c_client *i2c; /* Slave addr = 0x4A */ | ||
| 284 | |||
| 285 | struct regmap *regmap; | ||
| 286 | |||
| 287 | struct regmap_irq_chip_data *irq_data; | ||
| 288 | int irq; | ||
| 289 | |||
| 290 | /* Device ID */ | ||
| 291 | u8 vendor_id; /* Vendor Identification */ | ||
| 292 | u8 device_id; /* Chip Version */ | ||
| 293 | }; | ||
| 294 | |||
| 295 | /* MAX14577 shared regmap API function */ | ||
| 296 | static inline int max14577_read_reg(struct regmap *map, u8 reg, u8 *dest) | ||
| 297 | { | ||
| 298 | unsigned int val; | ||
| 299 | int ret; | ||
| 300 | |||
| 301 | ret = regmap_read(map, reg, &val); | ||
| 302 | *dest = val; | ||
| 303 | |||
| 304 | return ret; | ||
| 305 | } | ||
| 306 | |||
| 307 | static inline int max14577_bulk_read(struct regmap *map, u8 reg, u8 *buf, | ||
| 308 | int count) | ||
| 309 | { | ||
| 310 | return regmap_bulk_read(map, reg, buf, count); | ||
| 311 | } | ||
| 312 | |||
| 313 | static inline int max14577_write_reg(struct regmap *map, u8 reg, u8 value) | ||
| 314 | { | ||
| 315 | return regmap_write(map, reg, value); | ||
| 316 | } | ||
| 317 | |||
| 318 | static inline int max14577_bulk_write(struct regmap *map, u8 reg, u8 *buf, | ||
| 319 | int count) | ||
| 320 | { | ||
| 321 | return regmap_bulk_write(map, reg, buf, count); | ||
| 322 | } | ||
| 323 | |||
| 324 | static inline int max14577_update_reg(struct regmap *map, u8 reg, u8 mask, | ||
| 325 | u8 val) | ||
| 326 | { | ||
| 327 | return regmap_update_bits(map, reg, mask, val); | ||
| 328 | } | ||
| 329 | |||
| 330 | #endif /* __MAX14577_PRIVATE_H__ */ | ||
diff --git a/include/linux/mfd/max14577.h b/include/linux/mfd/max14577.h new file mode 100644 index 000000000000..247b021dfaaf --- /dev/null +++ b/include/linux/mfd/max14577.h | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | /* | ||
| 2 | * max14577.h - Driver for the Maxim 14577 | ||
| 3 | * | ||
| 4 | * Copyright (C) 2013 Samsung Electrnoics | ||
| 5 | * Chanwoo Choi <cw00.choi@samsung.com> | ||
| 6 | * Krzysztof Kozlowski <k.kozlowski@samsung.com> | ||
| 7 | * | ||
| 8 | * 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 | ||
| 10 | * the Free Software Foundation; either version 2 of the License, or | ||
| 11 | * (at your option) any later version. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | * | ||
| 18 | * This driver is based on max8997.h | ||
| 19 | * | ||
| 20 | * MAX14577 has MUIC, Charger devices. | ||
| 21 | * The devices share the same I2C bus and interrupt line | ||
| 22 | * included in this mfd driver. | ||
| 23 | */ | ||
| 24 | |||
| 25 | #ifndef __MAX14577_H__ | ||
| 26 | #define __MAX14577_H__ | ||
| 27 | |||
| 28 | #include <linux/mfd/max14577-private.h> | ||
| 29 | #include <linux/regulator/consumer.h> | ||
| 30 | |||
| 31 | /* | ||
| 32 | * MAX14577 Regulator | ||
| 33 | */ | ||
| 34 | |||
| 35 | /* MAX14577 regulator IDs */ | ||
| 36 | enum max14577_regulators { | ||
| 37 | MAX14577_SAFEOUT = 0, | ||
| 38 | MAX14577_CHARGER, | ||
| 39 | |||
| 40 | MAX14577_REG_MAX, | ||
| 41 | }; | ||
| 42 | |||
| 43 | struct max14577_regulator_platform_data { | ||
| 44 | int id; | ||
| 45 | struct regulator_init_data *initdata; | ||
| 46 | struct device_node *of_node; | ||
| 47 | }; | ||
| 48 | |||
| 49 | /* | ||
| 50 | * MAX14577 MFD platform data | ||
| 51 | */ | ||
| 52 | struct max14577_platform_data { | ||
| 53 | /* IRQ */ | ||
| 54 | int irq_base; | ||
| 55 | |||
| 56 | /* current control GPIOs */ | ||
| 57 | int gpio_pogo_vbatt_en; | ||
| 58 | int gpio_pogo_vbus_en; | ||
| 59 | |||
| 60 | /* current control GPIO control function */ | ||
| 61 | int (*set_gpio_pogo_vbatt_en) (int gpio_val); | ||
| 62 | int (*set_gpio_pogo_vbus_en) (int gpio_val); | ||
| 63 | |||
| 64 | int (*set_gpio_pogo_cb) (int new_dev); | ||
| 65 | |||
| 66 | struct max14577_regulator_platform_data *regulators; | ||
| 67 | }; | ||
| 68 | |||
| 69 | #endif /* __MAX14577_H__ */ | ||
diff --git a/include/linux/mfd/max77686-private.h b/include/linux/mfd/max77686-private.h index d327d4971e4f..8c75a9c8dfab 100644 --- a/include/linux/mfd/max77686-private.h +++ b/include/linux/mfd/max77686-private.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * max77686.h - Voltage regulator driver for the Maxim 77686 | 2 | * max77686-private.h - Voltage regulator driver for the Maxim 77686 |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 Samsung Electrnoics | 4 | * Copyright (C) 2012 Samsung Electrnoics |
| 5 | * Chiwoong Byun <woong.byun@samsung.com> | 5 | * Chiwoong Byun <woong.byun@samsung.com> |
diff --git a/include/linux/mfd/max8997-private.h b/include/linux/mfd/max8997-private.h index fb465dfbb59e..ad1ae7f345ad 100644 --- a/include/linux/mfd/max8997-private.h +++ b/include/linux/mfd/max8997-private.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * max8997.h - Voltage regulator driver for the Maxim 8997 | 2 | * max8997-private.h - Voltage regulator driver for the Maxim 8997 |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2010 Samsung Electrnoics | 4 | * Copyright (C) 2010 Samsung Electrnoics |
| 5 | * MyungJoo Ham <myungjoo.ham@samsung.com> | 5 | * MyungJoo Ham <myungjoo.ham@samsung.com> |
diff --git a/include/linux/mfd/max8998-private.h b/include/linux/mfd/max8998-private.h index 84844e0a5704..4ecb24b4b863 100644 --- a/include/linux/mfd/max8998-private.h +++ b/include/linux/mfd/max8998-private.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * max8998.h - Voltage regulator driver for the Maxim 8998 | 2 | * max8998-private.h - Voltage regulator driver for the Maxim 8998 |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2009-2010 Samsung Electrnoics | 4 | * Copyright (C) 2009-2010 Samsung Electrnoics |
| 5 | * Kyungmin Park <kyungmin.park@samsung.com> | 5 | * Kyungmin Park <kyungmin.park@samsung.com> |
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h index 67c17b5a6f44..6156686bf108 100644 --- a/include/linux/mfd/mc13xxx.h +++ b/include/linux/mfd/mc13xxx.h | |||
| @@ -21,8 +21,6 @@ int mc13xxx_reg_write(struct mc13xxx *mc13xxx, unsigned int offset, u32 val); | |||
| 21 | int mc13xxx_reg_rmw(struct mc13xxx *mc13xxx, unsigned int offset, | 21 | int mc13xxx_reg_rmw(struct mc13xxx *mc13xxx, unsigned int offset, |
| 22 | u32 mask, u32 val); | 22 | u32 mask, u32 val); |
| 23 | 23 | ||
| 24 | int mc13xxx_get_flags(struct mc13xxx *mc13xxx); | ||
| 25 | |||
| 26 | int mc13xxx_irq_request(struct mc13xxx *mc13xxx, int irq, | 24 | int mc13xxx_irq_request(struct mc13xxx *mc13xxx, int irq, |
| 27 | irq_handler_t handler, const char *name, void *dev); | 25 | irq_handler_t handler, const char *name, void *dev); |
| 28 | int mc13xxx_irq_request_nounmask(struct mc13xxx *mc13xxx, int irq, | 26 | int mc13xxx_irq_request_nounmask(struct mc13xxx *mc13xxx, int irq, |
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index 2d0c9071bcfb..cab2dd279076 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h | |||
| @@ -39,7 +39,8 @@ enum sec_device_type { | |||
| 39 | struct sec_pmic_dev { | 39 | struct sec_pmic_dev { |
| 40 | struct device *dev; | 40 | struct device *dev; |
| 41 | struct sec_platform_data *pdata; | 41 | struct sec_platform_data *pdata; |
| 42 | struct regmap *regmap; | 42 | struct regmap *regmap_pmic; |
| 43 | struct regmap *regmap_rtc; | ||
| 43 | struct i2c_client *i2c; | 44 | struct i2c_client *i2c; |
| 44 | struct i2c_client *rtc; | 45 | struct i2c_client *rtc; |
| 45 | 46 | ||
diff --git a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h index b6d36b38b99c..866e355fa409 100644 --- a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h +++ b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h | |||
| @@ -212,6 +212,7 @@ | |||
| 212 | #define IMX6Q_GPR3_MIPI_MUX_CTL_IPU1_DI1 (0x1 << 4) | 212 | #define IMX6Q_GPR3_MIPI_MUX_CTL_IPU1_DI1 (0x1 << 4) |
| 213 | #define IMX6Q_GPR3_MIPI_MUX_CTL_IPU2_DI0 (0x2 << 4) | 213 | #define IMX6Q_GPR3_MIPI_MUX_CTL_IPU2_DI0 (0x2 << 4) |
| 214 | #define IMX6Q_GPR3_MIPI_MUX_CTL_IPU2_DI1 (0x3 << 4) | 214 | #define IMX6Q_GPR3_MIPI_MUX_CTL_IPU2_DI1 (0x3 << 4) |
| 215 | #define IMX6Q_GPR3_HDMI_MUX_CTL_SHIFT 2 | ||
| 215 | #define IMX6Q_GPR3_HDMI_MUX_CTL_MASK (0x3 << 2) | 216 | #define IMX6Q_GPR3_HDMI_MUX_CTL_MASK (0x3 << 2) |
| 216 | #define IMX6Q_GPR3_HDMI_MUX_CTL_IPU1_DI0 (0x0 << 2) | 217 | #define IMX6Q_GPR3_HDMI_MUX_CTL_IPU1_DI0 (0x0 << 2) |
| 217 | #define IMX6Q_GPR3_HDMI_MUX_CTL_IPU1_DI1 (0x1 << 2) | 218 | #define IMX6Q_GPR3_HDMI_MUX_CTL_IPU1_DI1 (0x1 << 2) |
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h index d498d98f0c2c..fb96c84dada5 100644 --- a/include/linux/mfd/ti_am335x_tscadc.h +++ b/include/linux/mfd/ti_am335x_tscadc.h | |||
| @@ -159,6 +159,9 @@ struct ti_tscadc_dev { | |||
| 159 | int adc_cell; /* -1 if not used */ | 159 | int adc_cell; /* -1 if not used */ |
| 160 | struct mfd_cell cells[TSCADC_CELLS]; | 160 | struct mfd_cell cells[TSCADC_CELLS]; |
| 161 | u32 reg_se_cache; | 161 | u32 reg_se_cache; |
| 162 | bool adc_waiting; | ||
| 163 | bool adc_in_use; | ||
| 164 | wait_queue_head_t reg_se_wait; | ||
| 162 | spinlock_t reg_lock; | 165 | spinlock_t reg_lock; |
| 163 | unsigned int clk_div; | 166 | unsigned int clk_div; |
| 164 | 167 | ||
| @@ -176,8 +179,9 @@ static inline struct ti_tscadc_dev *ti_tscadc_dev_get(struct platform_device *p) | |||
| 176 | return *tscadc_dev; | 179 | return *tscadc_dev; |
| 177 | } | 180 | } |
| 178 | 181 | ||
| 179 | void am335x_tsc_se_update(struct ti_tscadc_dev *tsadc); | 182 | void am335x_tsc_se_set_cache(struct ti_tscadc_dev *tsadc, u32 val); |
| 180 | void am335x_tsc_se_set(struct ti_tscadc_dev *tsadc, u32 val); | 183 | void am335x_tsc_se_set_once(struct ti_tscadc_dev *tsadc, u32 val); |
| 181 | void am335x_tsc_se_clr(struct ti_tscadc_dev *tsadc, u32 val); | 184 | void am335x_tsc_se_clr(struct ti_tscadc_dev *tsadc, u32 val); |
| 185 | void am335x_tsc_se_adc_done(struct ti_tscadc_dev *tsadc); | ||
| 182 | 186 | ||
| 183 | #endif | 187 | #endif |
diff --git a/include/linux/mfd/tps6586x.h b/include/linux/mfd/tps6586x.h index 87994542573b..cbecec2e353a 100644 --- a/include/linux/mfd/tps6586x.h +++ b/include/linux/mfd/tps6586x.h | |||
| @@ -13,6 +13,12 @@ | |||
| 13 | #define TPS6586X_SLEW_RATE_SET 0x08 | 13 | #define TPS6586X_SLEW_RATE_SET 0x08 |
| 14 | #define TPS6586X_SLEW_RATE_MASK 0x07 | 14 | #define TPS6586X_SLEW_RATE_MASK 0x07 |
| 15 | 15 | ||
| 16 | /* VERSION CRC */ | ||
| 17 | #define TPS658621A 0x15 | ||
| 18 | #define TPS658621CD 0x2c | ||
| 19 | #define TPS658623 0x1b | ||
| 20 | #define TPS658643 0x03 | ||
| 21 | |||
| 16 | enum { | 22 | enum { |
| 17 | TPS6586X_ID_SYS, | 23 | TPS6586X_ID_SYS, |
| 18 | TPS6586X_ID_SM_0, | 24 | TPS6586X_ID_SM_0, |
| @@ -97,5 +103,6 @@ extern int tps6586x_clr_bits(struct device *dev, int reg, uint8_t bit_mask); | |||
| 97 | extern int tps6586x_update(struct device *dev, int reg, uint8_t val, | 103 | extern int tps6586x_update(struct device *dev, int reg, uint8_t val, |
| 98 | uint8_t mask); | 104 | uint8_t mask); |
| 99 | extern int tps6586x_irq_get_virq(struct device *dev, int irq); | 105 | extern int tps6586x_irq_get_virq(struct device *dev, int irq); |
| 106 | extern int tps6586x_get_version(struct device *dev); | ||
| 100 | 107 | ||
| 101 | #endif /*__LINUX_MFD_TPS6586X_H */ | 108 | #endif /*__LINUX_MFD_TPS6586X_H */ |
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h index ad05ce60c1c9..2e5b194b9b19 100644 --- a/include/linux/micrel_phy.h +++ b/include/linux/micrel_phy.h | |||
| @@ -22,6 +22,8 @@ | |||
| 22 | #define PHY_ID_KSZ8021 0x00221555 | 22 | #define PHY_ID_KSZ8021 0x00221555 |
| 23 | #define PHY_ID_KSZ8031 0x00221556 | 23 | #define PHY_ID_KSZ8031 0x00221556 |
| 24 | #define PHY_ID_KSZ8041 0x00221510 | 24 | #define PHY_ID_KSZ8041 0x00221510 |
| 25 | /* undocumented */ | ||
| 26 | #define PHY_ID_KSZ8041RNLI 0x00221537 | ||
| 25 | #define PHY_ID_KSZ8051 0x00221550 | 27 | #define PHY_ID_KSZ8051 0x00221550 |
| 26 | /* same id: ks8001 Rev. A/B, and ks8721 Rev 3. */ | 28 | /* same id: ks8001 Rev. A/B, and ks8721 Rev 3. */ |
| 27 | #define PHY_ID_KSZ8001 0x0022161A | 29 | #define PHY_ID_KSZ8001 0x0022161A |
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index f5096b58b20d..f015c059e159 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
| @@ -55,7 +55,8 @@ extern int migrate_huge_page_move_mapping(struct address_space *mapping, | |||
| 55 | struct page *newpage, struct page *page); | 55 | struct page *newpage, struct page *page); |
| 56 | extern int migrate_page_move_mapping(struct address_space *mapping, | 56 | extern int migrate_page_move_mapping(struct address_space *mapping, |
| 57 | struct page *newpage, struct page *page, | 57 | struct page *newpage, struct page *page, |
| 58 | struct buffer_head *head, enum migrate_mode mode); | 58 | struct buffer_head *head, enum migrate_mode mode, |
| 59 | int extra_count); | ||
| 59 | #else | 60 | #else |
| 60 | 61 | ||
| 61 | static inline void putback_lru_pages(struct list_head *l) {} | 62 | static inline void putback_lru_pages(struct list_head *l) {} |
| @@ -90,10 +91,19 @@ static inline int migrate_huge_page_move_mapping(struct address_space *mapping, | |||
| 90 | #endif /* CONFIG_MIGRATION */ | 91 | #endif /* CONFIG_MIGRATION */ |
| 91 | 92 | ||
| 92 | #ifdef CONFIG_NUMA_BALANCING | 93 | #ifdef CONFIG_NUMA_BALANCING |
| 94 | extern bool pmd_trans_migrating(pmd_t pmd); | ||
| 95 | extern void wait_migrate_huge_page(struct anon_vma *anon_vma, pmd_t *pmd); | ||
| 93 | extern int migrate_misplaced_page(struct page *page, | 96 | extern int migrate_misplaced_page(struct page *page, |
| 94 | struct vm_area_struct *vma, int node); | 97 | struct vm_area_struct *vma, int node); |
| 95 | extern bool migrate_ratelimited(int node); | 98 | extern bool migrate_ratelimited(int node); |
| 96 | #else | 99 | #else |
| 100 | static inline bool pmd_trans_migrating(pmd_t pmd) | ||
| 101 | { | ||
| 102 | return false; | ||
| 103 | } | ||
| 104 | static inline void wait_migrate_huge_page(struct anon_vma *anon_vma, pmd_t *pmd) | ||
| 105 | { | ||
| 106 | } | ||
| 97 | static inline int migrate_misplaced_page(struct page *page, | 107 | static inline int migrate_misplaced_page(struct page *page, |
| 98 | struct vm_area_struct *vma, int node) | 108 | struct vm_area_struct *vma, int node) |
| 99 | { | 109 | { |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 1cedd000cf29..35527173cf50 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -1317,7 +1317,7 @@ static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long a | |||
| 1317 | #endif /* CONFIG_MMU && !__ARCH_HAS_4LEVEL_HACK */ | 1317 | #endif /* CONFIG_MMU && !__ARCH_HAS_4LEVEL_HACK */ |
| 1318 | 1318 | ||
| 1319 | #if USE_SPLIT_PTE_PTLOCKS | 1319 | #if USE_SPLIT_PTE_PTLOCKS |
| 1320 | #if BLOATED_SPINLOCKS | 1320 | #if ALLOC_SPLIT_PTLOCKS |
| 1321 | extern bool ptlock_alloc(struct page *page); | 1321 | extern bool ptlock_alloc(struct page *page); |
| 1322 | extern void ptlock_free(struct page *page); | 1322 | extern void ptlock_free(struct page *page); |
| 1323 | 1323 | ||
| @@ -1325,7 +1325,7 @@ static inline spinlock_t *ptlock_ptr(struct page *page) | |||
| 1325 | { | 1325 | { |
| 1326 | return page->ptl; | 1326 | return page->ptl; |
| 1327 | } | 1327 | } |
| 1328 | #else /* BLOATED_SPINLOCKS */ | 1328 | #else /* ALLOC_SPLIT_PTLOCKS */ |
| 1329 | static inline bool ptlock_alloc(struct page *page) | 1329 | static inline bool ptlock_alloc(struct page *page) |
| 1330 | { | 1330 | { |
| 1331 | return true; | 1331 | return true; |
| @@ -1339,7 +1339,7 @@ static inline spinlock_t *ptlock_ptr(struct page *page) | |||
| 1339 | { | 1339 | { |
| 1340 | return &page->ptl; | 1340 | return &page->ptl; |
| 1341 | } | 1341 | } |
| 1342 | #endif /* BLOATED_SPINLOCKS */ | 1342 | #endif /* ALLOC_SPLIT_PTLOCKS */ |
| 1343 | 1343 | ||
| 1344 | static inline spinlock_t *pte_lockptr(struct mm_struct *mm, pmd_t *pmd) | 1344 | static inline spinlock_t *pte_lockptr(struct mm_struct *mm, pmd_t *pmd) |
| 1345 | { | 1345 | { |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index bd299418a934..290901a8c1de 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -26,6 +26,7 @@ struct address_space; | |||
| 26 | #define USE_SPLIT_PTE_PTLOCKS (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS) | 26 | #define USE_SPLIT_PTE_PTLOCKS (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS) |
| 27 | #define USE_SPLIT_PMD_PTLOCKS (USE_SPLIT_PTE_PTLOCKS && \ | 27 | #define USE_SPLIT_PMD_PTLOCKS (USE_SPLIT_PTE_PTLOCKS && \ |
| 28 | IS_ENABLED(CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK)) | 28 | IS_ENABLED(CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK)) |
| 29 | #define ALLOC_SPLIT_PTLOCKS (SPINLOCK_SIZE > BITS_PER_LONG/8) | ||
| 29 | 30 | ||
| 30 | /* | 31 | /* |
| 31 | * Each physical page in the system has a struct page associated with | 32 | * Each physical page in the system has a struct page associated with |
| @@ -155,7 +156,7 @@ struct page { | |||
| 155 | * system if PG_buddy is set. | 156 | * system if PG_buddy is set. |
| 156 | */ | 157 | */ |
| 157 | #if USE_SPLIT_PTE_PTLOCKS | 158 | #if USE_SPLIT_PTE_PTLOCKS |
| 158 | #if BLOATED_SPINLOCKS | 159 | #if ALLOC_SPLIT_PTLOCKS |
| 159 | spinlock_t *ptl; | 160 | spinlock_t *ptl; |
| 160 | #else | 161 | #else |
| 161 | spinlock_t ptl; | 162 | spinlock_t ptl; |
| @@ -443,6 +444,14 @@ struct mm_struct { | |||
| 443 | /* numa_scan_seq prevents two threads setting pte_numa */ | 444 | /* numa_scan_seq prevents two threads setting pte_numa */ |
| 444 | int numa_scan_seq; | 445 | int numa_scan_seq; |
| 445 | #endif | 446 | #endif |
| 447 | #if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION) | ||
| 448 | /* | ||
| 449 | * An operation with batched TLB flushing is going on. Anything that | ||
| 450 | * can move process memory needs to flush the TLB when moving a | ||
| 451 | * PROT_NONE or PROT_NUMA mapped page. | ||
| 452 | */ | ||
| 453 | bool tlb_flush_pending; | ||
| 454 | #endif | ||
| 446 | struct uprobes_state uprobes_state; | 455 | struct uprobes_state uprobes_state; |
| 447 | }; | 456 | }; |
| 448 | 457 | ||
| @@ -459,4 +468,45 @@ static inline cpumask_t *mm_cpumask(struct mm_struct *mm) | |||
| 459 | return mm->cpu_vm_mask_var; | 468 | return mm->cpu_vm_mask_var; |
| 460 | } | 469 | } |
| 461 | 470 | ||
| 471 | #if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION) | ||
| 472 | /* | ||
| 473 | * Memory barriers to keep this state in sync are graciously provided by | ||
| 474 | * the page table locks, outside of which no page table modifications happen. | ||
| 475 | * The barriers below prevent the compiler from re-ordering the instructions | ||
| 476 | * around the memory barriers that are already present in the code. | ||
| 477 | */ | ||
| 478 | static inline bool mm_tlb_flush_pending(struct mm_struct *mm) | ||
| 479 | { | ||
| 480 | barrier(); | ||
| 481 | return mm->tlb_flush_pending; | ||
| 482 | } | ||
| 483 | static inline void set_tlb_flush_pending(struct mm_struct *mm) | ||
| 484 | { | ||
| 485 | mm->tlb_flush_pending = true; | ||
| 486 | |||
| 487 | /* | ||
| 488 | * Guarantee that the tlb_flush_pending store does not leak into the | ||
| 489 | * critical section updating the page tables | ||
| 490 | */ | ||
| 491 | smp_mb__before_spinlock(); | ||
| 492 | } | ||
| 493 | /* Clearing is done after a TLB flush, which also provides a barrier. */ | ||
| 494 | static inline void clear_tlb_flush_pending(struct mm_struct *mm) | ||
| 495 | { | ||
| 496 | barrier(); | ||
| 497 | mm->tlb_flush_pending = false; | ||
| 498 | } | ||
| 499 | #else | ||
| 500 | static inline bool mm_tlb_flush_pending(struct mm_struct *mm) | ||
| 501 | { | ||
| 502 | return false; | ||
| 503 | } | ||
| 504 | static inline void set_tlb_flush_pending(struct mm_struct *mm) | ||
| 505 | { | ||
| 506 | } | ||
| 507 | static inline void clear_tlb_flush_pending(struct mm_struct *mm) | ||
| 508 | { | ||
| 509 | } | ||
| 510 | #endif | ||
| 511 | |||
| 462 | #endif /* _LINUX_MM_TYPES_H */ | 512 | #endif /* _LINUX_MM_TYPES_H */ |
diff --git a/include/linux/net.h b/include/linux/net.h index 4bcee94cef93..69be3e6079c8 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
| @@ -181,7 +181,7 @@ struct proto_ops { | |||
| 181 | int offset, size_t size, int flags); | 181 | int offset, size_t size, int flags); |
| 182 | ssize_t (*splice_read)(struct socket *sock, loff_t *ppos, | 182 | ssize_t (*splice_read)(struct socket *sock, loff_t *ppos, |
| 183 | struct pipe_inode_info *pipe, size_t len, unsigned int flags); | 183 | struct pipe_inode_info *pipe, size_t len, unsigned int flags); |
| 184 | void (*set_peek_off)(struct sock *sk, int val); | 184 | int (*set_peek_off)(struct sock *sk, int val); |
| 185 | }; | 185 | }; |
| 186 | 186 | ||
| 187 | #define DECLARE_SOCKADDR(type, dst, src) \ | 187 | #define DECLARE_SOCKADDR(type, dst, src) \ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 7f0ed423a360..ce2a1f5f9a1e 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -769,7 +769,8 @@ struct netdev_phys_port_id { | |||
| 769 | * (can also return NETDEV_TX_LOCKED iff NETIF_F_LLTX) | 769 | * (can also return NETDEV_TX_LOCKED iff NETIF_F_LLTX) |
| 770 | * Required can not be NULL. | 770 | * Required can not be NULL. |
| 771 | * | 771 | * |
| 772 | * u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb); | 772 | * u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb, |
| 773 | * void *accel_priv); | ||
| 773 | * Called to decide which queue to when device supports multiple | 774 | * Called to decide which queue to when device supports multiple |
| 774 | * transmit queues. | 775 | * transmit queues. |
| 775 | * | 776 | * |
| @@ -990,7 +991,8 @@ struct net_device_ops { | |||
| 990 | netdev_tx_t (*ndo_start_xmit) (struct sk_buff *skb, | 991 | netdev_tx_t (*ndo_start_xmit) (struct sk_buff *skb, |
| 991 | struct net_device *dev); | 992 | struct net_device *dev); |
| 992 | u16 (*ndo_select_queue)(struct net_device *dev, | 993 | u16 (*ndo_select_queue)(struct net_device *dev, |
| 993 | struct sk_buff *skb); | 994 | struct sk_buff *skb, |
| 995 | void *accel_priv); | ||
| 994 | void (*ndo_change_rx_flags)(struct net_device *dev, | 996 | void (*ndo_change_rx_flags)(struct net_device *dev, |
| 995 | int flags); | 997 | int flags); |
| 996 | void (*ndo_set_rx_mode)(struct net_device *dev); | 998 | void (*ndo_set_rx_mode)(struct net_device *dev); |
| @@ -1255,7 +1257,7 @@ struct net_device { | |||
| 1255 | unsigned char perm_addr[MAX_ADDR_LEN]; /* permanent hw address */ | 1257 | unsigned char perm_addr[MAX_ADDR_LEN]; /* permanent hw address */ |
| 1256 | unsigned char addr_assign_type; /* hw address assignment type */ | 1258 | unsigned char addr_assign_type; /* hw address assignment type */ |
| 1257 | unsigned char addr_len; /* hardware address length */ | 1259 | unsigned char addr_len; /* hardware address length */ |
| 1258 | unsigned char neigh_priv_len; | 1260 | unsigned short neigh_priv_len; |
| 1259 | unsigned short dev_id; /* Used to differentiate devices | 1261 | unsigned short dev_id; /* Used to differentiate devices |
| 1260 | * that share the same link | 1262 | * that share the same link |
| 1261 | * layer address | 1263 | * layer address |
| @@ -1529,7 +1531,8 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev, | |||
| 1529 | } | 1531 | } |
| 1530 | 1532 | ||
| 1531 | struct netdev_queue *netdev_pick_tx(struct net_device *dev, | 1533 | struct netdev_queue *netdev_pick_tx(struct net_device *dev, |
| 1532 | struct sk_buff *skb); | 1534 | struct sk_buff *skb, |
| 1535 | void *accel_priv); | ||
| 1533 | u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb); | 1536 | u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb); |
| 1534 | 1537 | ||
| 1535 | /* | 1538 | /* |
| @@ -1819,6 +1822,7 @@ int dev_close(struct net_device *dev); | |||
| 1819 | void dev_disable_lro(struct net_device *dev); | 1822 | void dev_disable_lro(struct net_device *dev); |
| 1820 | int dev_loopback_xmit(struct sk_buff *newskb); | 1823 | int dev_loopback_xmit(struct sk_buff *newskb); |
| 1821 | int dev_queue_xmit(struct sk_buff *skb); | 1824 | int dev_queue_xmit(struct sk_buff *skb); |
| 1825 | int dev_queue_xmit_accel(struct sk_buff *skb, void *accel_priv); | ||
| 1822 | int register_netdevice(struct net_device *dev); | 1826 | int register_netdevice(struct net_device *dev); |
| 1823 | void unregister_netdevice_queue(struct net_device *dev, struct list_head *head); | 1827 | void unregister_netdevice_queue(struct net_device *dev, struct list_head *head); |
| 1824 | void unregister_netdevice_many(struct list_head *head); | 1828 | void unregister_netdevice_many(struct list_head *head); |
| @@ -1912,6 +1916,15 @@ static inline int dev_parse_header(const struct sk_buff *skb, | |||
| 1912 | return dev->header_ops->parse(skb, haddr); | 1916 | return dev->header_ops->parse(skb, haddr); |
| 1913 | } | 1917 | } |
| 1914 | 1918 | ||
| 1919 | static inline int dev_rebuild_header(struct sk_buff *skb) | ||
| 1920 | { | ||
| 1921 | const struct net_device *dev = skb->dev; | ||
| 1922 | |||
| 1923 | if (!dev->header_ops || !dev->header_ops->rebuild) | ||
| 1924 | return 0; | ||
| 1925 | return dev->header_ops->rebuild(skb); | ||
| 1926 | } | ||
| 1927 | |||
| 1915 | typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int len); | 1928 | typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int len); |
| 1916 | int register_gifconf(unsigned int family, gifconf_func_t *gifconf); | 1929 | int register_gifconf(unsigned int family, gifconf_func_t *gifconf); |
| 1917 | static inline int unregister_gifconf(unsigned int family) | 1930 | static inline int unregister_gifconf(unsigned int family) |
| @@ -2417,7 +2430,7 @@ int dev_change_carrier(struct net_device *, bool new_carrier); | |||
| 2417 | int dev_get_phys_port_id(struct net_device *dev, | 2430 | int dev_get_phys_port_id(struct net_device *dev, |
| 2418 | struct netdev_phys_port_id *ppid); | 2431 | struct netdev_phys_port_id *ppid); |
| 2419 | int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, | 2432 | int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, |
| 2420 | struct netdev_queue *txq, void *accel_priv); | 2433 | struct netdev_queue *txq); |
| 2421 | int dev_forward_skb(struct net_device *dev, struct sk_buff *skb); | 2434 | int dev_forward_skb(struct net_device *dev, struct sk_buff *skb); |
| 2422 | 2435 | ||
| 2423 | extern int netdev_budget; | 2436 | extern int netdev_budget; |
| @@ -3008,6 +3021,19 @@ static inline void netif_set_gso_max_size(struct net_device *dev, | |||
| 3008 | dev->gso_max_size = size; | 3021 | dev->gso_max_size = size; |
| 3009 | } | 3022 | } |
| 3010 | 3023 | ||
| 3024 | static inline void skb_gso_error_unwind(struct sk_buff *skb, __be16 protocol, | ||
| 3025 | int pulled_hlen, u16 mac_offset, | ||
| 3026 | int mac_len) | ||
| 3027 | { | ||
| 3028 | skb->protocol = protocol; | ||
| 3029 | skb->encapsulation = 1; | ||
| 3030 | skb_push(skb, pulled_hlen); | ||
| 3031 | skb_reset_transport_header(skb); | ||
| 3032 | skb->mac_header = mac_offset; | ||
| 3033 | skb->network_header = skb->mac_header + mac_len; | ||
| 3034 | skb->mac_len = mac_len; | ||
| 3035 | } | ||
| 3036 | |||
| 3011 | static inline bool netif_is_macvlan(struct net_device *dev) | 3037 | static inline bool netif_is_macvlan(struct net_device *dev) |
| 3012 | { | 3038 | { |
| 3013 | return dev->priv_flags & IFF_MACVLAN; | 3039 | return dev->priv_flags & IFF_MACVLAN; |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index c1637062c1ce..12c2cb947df5 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
| @@ -413,16 +413,6 @@ enum lock_type4 { | |||
| 413 | #define NFS4_VERSION 4 | 413 | #define NFS4_VERSION 4 |
| 414 | #define NFS4_MINOR_VERSION 0 | 414 | #define NFS4_MINOR_VERSION 0 |
| 415 | 415 | ||
| 416 | #if defined(CONFIG_NFS_V4_2) | ||
| 417 | #define NFS4_MAX_MINOR_VERSION 2 | ||
| 418 | #else | ||
| 419 | #if defined(CONFIG_NFS_V4_1) | ||
| 420 | #define NFS4_MAX_MINOR_VERSION 1 | ||
| 421 | #else | ||
| 422 | #define NFS4_MAX_MINOR_VERSION 0 | ||
| 423 | #endif /* CONFIG_NFS_V4_1 */ | ||
| 424 | #endif /* CONFIG_NFS_V4_2 */ | ||
| 425 | |||
| 426 | #define NFS4_DEBUG 1 | 416 | #define NFS4_DEBUG 1 |
| 427 | 417 | ||
| 428 | /* Index of predefined Linux client operations */ | 418 | /* Index of predefined Linux client operations */ |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 14a48207a304..48997374eaf0 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -507,24 +507,6 @@ extern int nfs_mountpoint_expiry_timeout; | |||
| 507 | extern void nfs_release_automount_timer(void); | 507 | extern void nfs_release_automount_timer(void); |
| 508 | 508 | ||
| 509 | /* | 509 | /* |
| 510 | * linux/fs/nfs/nfs4proc.c | ||
| 511 | */ | ||
| 512 | #ifdef CONFIG_NFS_V4_SECURITY_LABEL | ||
| 513 | extern struct nfs4_label *nfs4_label_alloc(struct nfs_server *server, gfp_t flags); | ||
| 514 | static inline void nfs4_label_free(struct nfs4_label *label) | ||
| 515 | { | ||
| 516 | if (label) { | ||
| 517 | kfree(label->label); | ||
| 518 | kfree(label); | ||
| 519 | } | ||
| 520 | return; | ||
| 521 | } | ||
| 522 | #else | ||
| 523 | static inline struct nfs4_label *nfs4_label_alloc(struct nfs_server *server, gfp_t flags) { return NULL; } | ||
| 524 | static inline void nfs4_label_free(void *label) {} | ||
| 525 | #endif | ||
| 526 | |||
| 527 | /* | ||
| 528 | * linux/fs/nfs/unlink.c | 510 | * linux/fs/nfs/unlink.c |
| 529 | */ | 511 | */ |
| 530 | extern void nfs_complete_unlink(struct dentry *dentry, struct inode *); | 512 | extern void nfs_complete_unlink(struct dentry *dentry, struct inode *); |
diff --git a/include/linux/padata.h b/include/linux/padata.h index 86292beebfe2..438694650471 100644 --- a/include/linux/padata.h +++ b/include/linux/padata.h | |||
| @@ -129,10 +129,9 @@ struct parallel_data { | |||
| 129 | struct padata_serial_queue __percpu *squeue; | 129 | struct padata_serial_queue __percpu *squeue; |
| 130 | atomic_t reorder_objects; | 130 | atomic_t reorder_objects; |
| 131 | atomic_t refcnt; | 131 | atomic_t refcnt; |
| 132 | atomic_t seq_nr; | ||
| 132 | struct padata_cpumask cpumask; | 133 | struct padata_cpumask cpumask; |
| 133 | spinlock_t lock ____cacheline_aligned; | 134 | spinlock_t lock ____cacheline_aligned; |
| 134 | spinlock_t seq_lock; | ||
| 135 | unsigned int seq_nr; | ||
| 136 | unsigned int processed; | 135 | unsigned int processed; |
| 137 | struct timer_list timer; | 136 | struct timer_list timer; |
| 138 | }; | 137 | }; |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 1084a15175e0..a13d6825e586 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -960,6 +960,7 @@ void pci_update_resource(struct pci_dev *dev, int resno); | |||
| 960 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 960 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
| 961 | int __must_check pci_reassign_resource(struct pci_dev *dev, int i, resource_size_t add_size, resource_size_t align); | 961 | int __must_check pci_reassign_resource(struct pci_dev *dev, int i, resource_size_t add_size, resource_size_t align); |
| 962 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); | 962 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); |
| 963 | bool pci_device_is_present(struct pci_dev *pdev); | ||
| 963 | 964 | ||
| 964 | /* ROM control related routines */ | 965 | /* ROM control related routines */ |
| 965 | int pci_enable_rom(struct pci_dev *pdev); | 966 | int pci_enable_rom(struct pci_dev *pdev); |
| @@ -1567,65 +1568,65 @@ enum pci_fixup_pass { | |||
| 1567 | /* Anonymous variables would be nice... */ | 1568 | /* Anonymous variables would be nice... */ |
| 1568 | #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, class, \ | 1569 | #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, class, \ |
| 1569 | class_shift, hook) \ | 1570 | class_shift, hook) \ |
| 1570 | static const struct pci_fixup __pci_fixup_##name __used \ | 1571 | static const struct pci_fixup __PASTE(__pci_fixup_##name,__LINE__) __used \ |
| 1571 | __attribute__((__section__(#section), aligned((sizeof(void *))))) \ | 1572 | __attribute__((__section__(#section), aligned((sizeof(void *))))) \ |
| 1572 | = { vendor, device, class, class_shift, hook }; | 1573 | = { vendor, device, class, class_shift, hook }; |
| 1573 | 1574 | ||
| 1574 | #define DECLARE_PCI_FIXUP_CLASS_EARLY(vendor, device, class, \ | 1575 | #define DECLARE_PCI_FIXUP_CLASS_EARLY(vendor, device, class, \ |
| 1575 | class_shift, hook) \ | 1576 | class_shift, hook) \ |
| 1576 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early, \ | 1577 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early, \ |
| 1577 | vendor##device##hook, vendor, device, class, class_shift, hook) | 1578 | hook, vendor, device, class, class_shift, hook) |
| 1578 | #define DECLARE_PCI_FIXUP_CLASS_HEADER(vendor, device, class, \ | 1579 | #define DECLARE_PCI_FIXUP_CLASS_HEADER(vendor, device, class, \ |
| 1579 | class_shift, hook) \ | 1580 | class_shift, hook) \ |
| 1580 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \ | 1581 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \ |
| 1581 | vendor##device##hook, vendor, device, class, class_shift, hook) | 1582 | hook, vendor, device, class, class_shift, hook) |
| 1582 | #define DECLARE_PCI_FIXUP_CLASS_FINAL(vendor, device, class, \ | 1583 | #define DECLARE_PCI_FIXUP_CLASS_FINAL(vendor, device, class, \ |
| 1583 | class_shift, hook) \ | 1584 | class_shift, hook) \ |
| 1584 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ | 1585 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ |
| 1585 | vendor##device##hook, vendor, device, class, class_shift, hook) | 1586 | hook, vendor, device, class, class_shift, hook) |
| 1586 | #define DECLARE_PCI_FIXUP_CLASS_ENABLE(vendor, device, class, \ | 1587 | #define DECLARE_PCI_FIXUP_CLASS_ENABLE(vendor, device, class, \ |
| 1587 | class_shift, hook) \ | 1588 | class_shift, hook) \ |
| 1588 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \ | 1589 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \ |
| 1589 | vendor##device##hook, vendor, device, class, class_shift, hook) | 1590 | hook, vendor, device, class, class_shift, hook) |
| 1590 | #define DECLARE_PCI_FIXUP_CLASS_RESUME(vendor, device, class, \ | 1591 | #define DECLARE_PCI_FIXUP_CLASS_RESUME(vendor, device, class, \ |
| 1591 | class_shift, hook) \ | 1592 | class_shift, hook) \ |
| 1592 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume, \ | 1593 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume, \ |
| 1593 | resume##vendor##device##hook, vendor, device, class, \ | 1594 | resume##hook, vendor, device, class, \ |
| 1594 | class_shift, hook) | 1595 | class_shift, hook) |
| 1595 | #define DECLARE_PCI_FIXUP_CLASS_RESUME_EARLY(vendor, device, class, \ | 1596 | #define DECLARE_PCI_FIXUP_CLASS_RESUME_EARLY(vendor, device, class, \ |
| 1596 | class_shift, hook) \ | 1597 | class_shift, hook) \ |
| 1597 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume_early, \ | 1598 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume_early, \ |
| 1598 | resume_early##vendor##device##hook, vendor, device, \ | 1599 | resume_early##hook, vendor, device, \ |
| 1599 | class, class_shift, hook) | 1600 | class, class_shift, hook) |
| 1600 | #define DECLARE_PCI_FIXUP_CLASS_SUSPEND(vendor, device, class, \ | 1601 | #define DECLARE_PCI_FIXUP_CLASS_SUSPEND(vendor, device, class, \ |
| 1601 | class_shift, hook) \ | 1602 | class_shift, hook) \ |
| 1602 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \ | 1603 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \ |
| 1603 | suspend##vendor##device##hook, vendor, device, class, \ | 1604 | suspend##hook, vendor, device, class, \ |
| 1604 | class_shift, hook) | 1605 | class_shift, hook) |
| 1605 | 1606 | ||
| 1606 | #define DECLARE_PCI_FIXUP_EARLY(vendor, device, hook) \ | 1607 | #define DECLARE_PCI_FIXUP_EARLY(vendor, device, hook) \ |
| 1607 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early, \ | 1608 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early, \ |
| 1608 | vendor##device##hook, vendor, device, PCI_ANY_ID, 0, hook) | 1609 | hook, vendor, device, PCI_ANY_ID, 0, hook) |
| 1609 | #define DECLARE_PCI_FIXUP_HEADER(vendor, device, hook) \ | 1610 | #define DECLARE_PCI_FIXUP_HEADER(vendor, device, hook) \ |
| 1610 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \ | 1611 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \ |
| 1611 | vendor##device##hook, vendor, device, PCI_ANY_ID, 0, hook) | 1612 | hook, vendor, device, PCI_ANY_ID, 0, hook) |
| 1612 | #define DECLARE_PCI_FIXUP_FINAL(vendor, device, hook) \ | 1613 | #define DECLARE_PCI_FIXUP_FINAL(vendor, device, hook) \ |
| 1613 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ | 1614 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ |
| 1614 | vendor##device##hook, vendor, device, PCI_ANY_ID, 0, hook) | 1615 | hook, vendor, device, PCI_ANY_ID, 0, hook) |
| 1615 | #define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook) \ | 1616 | #define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook) \ |
| 1616 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \ | 1617 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \ |
| 1617 | vendor##device##hook, vendor, device, PCI_ANY_ID, 0, hook) | 1618 | hook, vendor, device, PCI_ANY_ID, 0, hook) |
| 1618 | #define DECLARE_PCI_FIXUP_RESUME(vendor, device, hook) \ | 1619 | #define DECLARE_PCI_FIXUP_RESUME(vendor, device, hook) \ |
| 1619 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume, \ | 1620 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume, \ |
| 1620 | resume##vendor##device##hook, vendor, device, \ | 1621 | resume##hook, vendor, device, \ |
| 1621 | PCI_ANY_ID, 0, hook) | 1622 | PCI_ANY_ID, 0, hook) |
| 1622 | #define DECLARE_PCI_FIXUP_RESUME_EARLY(vendor, device, hook) \ | 1623 | #define DECLARE_PCI_FIXUP_RESUME_EARLY(vendor, device, hook) \ |
| 1623 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume_early, \ | 1624 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume_early, \ |
| 1624 | resume_early##vendor##device##hook, vendor, device, \ | 1625 | resume_early##hook, vendor, device, \ |
| 1625 | PCI_ANY_ID, 0, hook) | 1626 | PCI_ANY_ID, 0, hook) |
| 1626 | #define DECLARE_PCI_FIXUP_SUSPEND(vendor, device, hook) \ | 1627 | #define DECLARE_PCI_FIXUP_SUSPEND(vendor, device, hook) \ |
| 1627 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \ | 1628 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \ |
| 1628 | suspend##vendor##device##hook, vendor, device, \ | 1629 | suspend##hook, vendor, device, \ |
| 1629 | PCI_ANY_ID, 0, hook) | 1630 | PCI_ANY_ID, 0, hook) |
| 1630 | 1631 | ||
| 1631 | #ifdef CONFIG_PCI_QUIRKS | 1632 | #ifdef CONFIG_PCI_QUIRKS |
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h index 57e890abe1f0..a5fc7d01aad6 100644 --- a/include/linux/percpu-defs.h +++ b/include/linux/percpu-defs.h | |||
| @@ -69,6 +69,7 @@ | |||
| 69 | __PCPU_DUMMY_ATTRS char __pcpu_scope_##name; \ | 69 | __PCPU_DUMMY_ATTRS char __pcpu_scope_##name; \ |
| 70 | extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ | 70 | extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ |
| 71 | __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ | 71 | __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ |
| 72 | extern __PCPU_ATTRS(sec) __typeof__(type) name; \ | ||
| 72 | __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES __weak \ | 73 | __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES __weak \ |
| 73 | __typeof__(type) name | 74 | __typeof__(type) name |
| 74 | #else | 75 | #else |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 2e069d1288df..e56b07f5c9b6 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -320,6 +320,7 @@ struct perf_event { | |||
| 320 | struct list_head migrate_entry; | 320 | struct list_head migrate_entry; |
| 321 | 321 | ||
| 322 | struct hlist_node hlist_entry; | 322 | struct hlist_node hlist_entry; |
| 323 | struct list_head active_entry; | ||
| 323 | int nr_siblings; | 324 | int nr_siblings; |
| 324 | int group_flags; | 325 | int group_flags; |
| 325 | struct perf_event *group_leader; | 326 | struct perf_event *group_leader; |
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index 6d722695e027..e273e5ac19c9 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h | |||
| @@ -38,6 +38,14 @@ struct phy_ops { | |||
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | /** | 40 | /** |
| 41 | * struct phy_attrs - represents phy attributes | ||
| 42 | * @bus_width: Data path width implemented by PHY | ||
| 43 | */ | ||
| 44 | struct phy_attrs { | ||
| 45 | u32 bus_width; | ||
| 46 | }; | ||
| 47 | |||
| 48 | /** | ||
| 41 | * struct phy - represents the phy device | 49 | * struct phy - represents the phy device |
| 42 | * @dev: phy device | 50 | * @dev: phy device |
| 43 | * @id: id of the phy device | 51 | * @id: id of the phy device |
| @@ -46,6 +54,7 @@ struct phy_ops { | |||
| 46 | * @mutex: mutex to protect phy_ops | 54 | * @mutex: mutex to protect phy_ops |
| 47 | * @init_count: used to protect when the PHY is used by multiple consumers | 55 | * @init_count: used to protect when the PHY is used by multiple consumers |
| 48 | * @power_count: used to protect when the PHY is used by multiple consumers | 56 | * @power_count: used to protect when the PHY is used by multiple consumers |
| 57 | * @phy_attrs: used to specify PHY specific attributes | ||
| 49 | */ | 58 | */ |
| 50 | struct phy { | 59 | struct phy { |
| 51 | struct device dev; | 60 | struct device dev; |
| @@ -55,6 +64,7 @@ struct phy { | |||
| 55 | struct mutex mutex; | 64 | struct mutex mutex; |
| 56 | int init_count; | 65 | int init_count; |
| 57 | int power_count; | 66 | int power_count; |
| 67 | struct phy_attrs attrs; | ||
| 58 | }; | 68 | }; |
| 59 | 69 | ||
| 60 | /** | 70 | /** |
| @@ -127,6 +137,14 @@ int phy_init(struct phy *phy); | |||
| 127 | int phy_exit(struct phy *phy); | 137 | int phy_exit(struct phy *phy); |
| 128 | int phy_power_on(struct phy *phy); | 138 | int phy_power_on(struct phy *phy); |
| 129 | int phy_power_off(struct phy *phy); | 139 | int phy_power_off(struct phy *phy); |
| 140 | static inline int phy_get_bus_width(struct phy *phy) | ||
| 141 | { | ||
| 142 | return phy->attrs.bus_width; | ||
| 143 | } | ||
| 144 | static inline void phy_set_bus_width(struct phy *phy, int bus_width) | ||
| 145 | { | ||
| 146 | phy->attrs.bus_width = bus_width; | ||
| 147 | } | ||
| 130 | struct phy *phy_get(struct device *dev, const char *string); | 148 | struct phy *phy_get(struct device *dev, const char *string); |
| 131 | struct phy *devm_phy_get(struct device *dev, const char *string); | 149 | struct phy *devm_phy_get(struct device *dev, const char *string); |
| 132 | void phy_put(struct phy *phy); | 150 | void phy_put(struct phy *phy); |
| @@ -199,6 +217,16 @@ static inline int phy_power_off(struct phy *phy) | |||
| 199 | return -ENOSYS; | 217 | return -ENOSYS; |
| 200 | } | 218 | } |
| 201 | 219 | ||
| 220 | static inline int phy_get_bus_width(struct phy *phy) | ||
| 221 | { | ||
| 222 | return -ENOSYS; | ||
| 223 | } | ||
| 224 | |||
| 225 | static inline void phy_set_bus_width(struct phy *phy, int bus_width) | ||
| 226 | { | ||
| 227 | return; | ||
| 228 | } | ||
| 229 | |||
| 202 | static inline struct phy *phy_get(struct device *dev, const char *string) | 230 | static inline struct phy *phy_get(struct device *dev, const char *string) |
| 203 | { | 231 | { |
| 204 | return ERR_PTR(-ENOSYS); | 232 | return ERR_PTR(-ENOSYS); |
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index fb90ef5eb038..a15f10727eb8 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h | |||
| @@ -61,6 +61,9 @@ | |||
| 61 | * argument is ignored. | 61 | * argument is ignored. |
| 62 | * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current | 62 | * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current |
| 63 | * passed as argument. The argument is in mA. | 63 | * passed as argument. The argument is in mA. |
| 64 | * @PIN_CONFIG_INPUT_ENABLE: enable the pin's input. Note that this does not | ||
| 65 | * affect the pin's ability to drive output. 1 enables input, 0 disables | ||
| 66 | * input. | ||
| 64 | * @PIN_CONFIG_INPUT_SCHMITT_ENABLE: control schmitt-trigger mode on the pin. | 67 | * @PIN_CONFIG_INPUT_SCHMITT_ENABLE: control schmitt-trigger mode on the pin. |
| 65 | * If the argument != 0, schmitt-trigger mode is enabled. If it's 0, | 68 | * If the argument != 0, schmitt-trigger mode is enabled. If it's 0, |
| 66 | * schmitt-trigger mode is disabled. | 69 | * schmitt-trigger mode is disabled. |
| @@ -82,8 +85,10 @@ | |||
| 82 | * operation, if several modes of operation are supported these can be | 85 | * operation, if several modes of operation are supported these can be |
| 83 | * passed in the argument on a custom form, else just use argument 1 | 86 | * passed in the argument on a custom form, else just use argument 1 |
| 84 | * to indicate low power mode, argument 0 turns low power mode off. | 87 | * to indicate low power mode, argument 0 turns low power mode off. |
| 85 | * @PIN_CONFIG_OUTPUT: this will configure the pin in output, use argument | 88 | * @PIN_CONFIG_OUTPUT: this will configure the pin as an output. Use argument |
| 86 | * 1 to indicate high level, argument 0 to indicate low level. | 89 | * 1 to indicate high level, argument 0 to indicate low level. (Please |
| 90 | * see Documentation/pinctrl.txt, section "GPIO mode pitfalls" for a | ||
| 91 | * discussion around this parameter.) | ||
| 87 | * @PIN_CONFIG_END: this is the last enumerator for pin configurations, if | 92 | * @PIN_CONFIG_END: this is the last enumerator for pin configurations, if |
| 88 | * you need to pass in custom configurations to the pin controller, use | 93 | * you need to pass in custom configurations to the pin controller, use |
| 89 | * PIN_CONFIG_END+1 as the base offset. | 94 | * PIN_CONFIG_END+1 as the base offset. |
| @@ -99,6 +104,7 @@ enum pin_config_param { | |||
| 99 | PIN_CONFIG_DRIVE_OPEN_DRAIN, | 104 | PIN_CONFIG_DRIVE_OPEN_DRAIN, |
| 100 | PIN_CONFIG_DRIVE_OPEN_SOURCE, | 105 | PIN_CONFIG_DRIVE_OPEN_SOURCE, |
| 101 | PIN_CONFIG_DRIVE_STRENGTH, | 106 | PIN_CONFIG_DRIVE_STRENGTH, |
| 107 | PIN_CONFIG_INPUT_ENABLE, | ||
| 102 | PIN_CONFIG_INPUT_SCHMITT_ENABLE, | 108 | PIN_CONFIG_INPUT_SCHMITT_ENABLE, |
| 103 | PIN_CONFIG_INPUT_SCHMITT, | 109 | PIN_CONFIG_INPUT_SCHMITT, |
| 104 | PIN_CONFIG_INPUT_DEBOUNCE, | 110 | PIN_CONFIG_INPUT_DEBOUNCE, |
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h index fefb88663975..cc8e1aff0e28 100644 --- a/include/linux/pinctrl/pinctrl.h +++ b/include/linux/pinctrl/pinctrl.h | |||
| @@ -32,10 +32,12 @@ struct device_node; | |||
| 32 | * pins, pads or other muxable units in this struct | 32 | * pins, pads or other muxable units in this struct |
| 33 | * @number: unique pin number from the global pin number space | 33 | * @number: unique pin number from the global pin number space |
| 34 | * @name: a name for this pin | 34 | * @name: a name for this pin |
| 35 | * @drv_data: driver-defined per-pin data. pinctrl core does not touch this | ||
| 35 | */ | 36 | */ |
| 36 | struct pinctrl_pin_desc { | 37 | struct pinctrl_pin_desc { |
| 37 | unsigned number; | 38 | unsigned number; |
| 38 | const char *name; | 39 | const char *name; |
| 40 | void *drv_data; | ||
| 39 | }; | 41 | }; |
| 40 | 42 | ||
| 41 | /* Convenience macro to define a single named or anonymous pin descriptor */ | 43 | /* Convenience macro to define a single named or anonymous pin descriptor */ |
diff --git a/include/linux/platform_data/asoc-ti-mcbsp.h b/include/linux/platform_data/asoc-ti-mcbsp.h index c78d90b28b19..3c73c045f8da 100644 --- a/include/linux/platform_data/asoc-ti-mcbsp.h +++ b/include/linux/platform_data/asoc-ti-mcbsp.h | |||
| @@ -1,6 +1,4 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/plat-omap/include/mach/mcbsp.h | ||
| 3 | * | ||
| 4 | * Defines for Multi-Channel Buffered Serial Port | 2 | * Defines for Multi-Channel Buffered Serial Port |
| 5 | * | 3 | * |
| 6 | * Copyright (C) 2002 RidgeRun, Inc. | 4 | * Copyright (C) 2002 RidgeRun, Inc. |
| @@ -21,8 +19,8 @@ | |||
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 22 | * | 20 | * |
| 23 | */ | 21 | */ |
| 24 | #ifndef __ASM_ARCH_OMAP_MCBSP_H | 22 | #ifndef __ASOC_TI_MCBSP_H |
| 25 | #define __ASM_ARCH_OMAP_MCBSP_H | 23 | #define __ASOC_TI_MCBSP_H |
| 26 | 24 | ||
| 27 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
| 28 | #include <linux/clk.h> | 26 | #include <linux/clk.h> |
diff --git a/include/linux/platform_data/asoc-ux500-msp.h b/include/linux/platform_data/asoc-ux500-msp.h index 9991aea3d577..2f34bb98fe2a 100644 --- a/include/linux/platform_data/asoc-ux500-msp.h +++ b/include/linux/platform_data/asoc-ux500-msp.h | |||
| @@ -10,16 +10,9 @@ | |||
| 10 | 10 | ||
| 11 | #include <linux/platform_data/dma-ste-dma40.h> | 11 | #include <linux/platform_data/dma-ste-dma40.h> |
| 12 | 12 | ||
| 13 | enum msp_i2s_id { | ||
| 14 | MSP_I2S_0 = 0, | ||
| 15 | MSP_I2S_1, | ||
| 16 | MSP_I2S_2, | ||
| 17 | MSP_I2S_3, | ||
| 18 | }; | ||
| 19 | |||
| 20 | /* Platform data structure for a MSP I2S-device */ | 13 | /* Platform data structure for a MSP I2S-device */ |
| 21 | struct msp_i2s_platform_data { | 14 | struct msp_i2s_platform_data { |
| 22 | enum msp_i2s_id id; | 15 | int id; |
| 23 | struct stedma40_chan_cfg *msp_i2s_dma_rx; | 16 | struct stedma40_chan_cfg *msp_i2s_dma_rx; |
| 24 | struct stedma40_chan_cfg *msp_i2s_dma_tx; | 17 | struct stedma40_chan_cfg *msp_i2s_dma_tx; |
| 25 | }; | 18 | }; |
diff --git a/include/linux/platform_data/davinci_asp.h b/include/linux/platform_data/davinci_asp.h index 689a856b86f9..5245992b0367 100644 --- a/include/linux/platform_data/davinci_asp.h +++ b/include/linux/platform_data/davinci_asp.h | |||
| @@ -92,6 +92,7 @@ enum { | |||
| 92 | MCASP_VERSION_1 = 0, /* DM646x */ | 92 | MCASP_VERSION_1 = 0, /* DM646x */ |
| 93 | MCASP_VERSION_2, /* DA8xx/OMAPL1x */ | 93 | MCASP_VERSION_2, /* DA8xx/OMAPL1x */ |
| 94 | MCASP_VERSION_3, /* TI81xx/AM33xx */ | 94 | MCASP_VERSION_3, /* TI81xx/AM33xx */ |
| 95 | MCASP_VERSION_4, /* DRA7xxx */ | ||
| 95 | }; | 96 | }; |
| 96 | 97 | ||
| 97 | enum mcbsp_clk_input_pin { | 98 | enum mcbsp_clk_input_pin { |
diff --git a/include/linux/platform_data/gpio-lpc32xx.h b/include/linux/platform_data/gpio-lpc32xx.h new file mode 100644 index 000000000000..a544e962a818 --- /dev/null +++ b/include/linux/platform_data/gpio-lpc32xx.h | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | /* | ||
| 2 | * Author: Kevin Wells <kevin.wells@nxp.com> | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 NXP Semiconductors | ||
| 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 as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef __MACH_GPIO_LPC32XX_H | ||
| 18 | #define __MACH_GPIO_LPC32XX_H | ||
| 19 | |||
| 20 | /* | ||
| 21 | * Note! | ||
| 22 | * Muxed GP pins need to be setup to the GP state in the board level | ||
| 23 | * code prior to using this driver. | ||
| 24 | * GPI pins : 28xP3 group | ||
| 25 | * GPO pins : 24xP3 group | ||
| 26 | * GPIO pins: 8xP0 group, 24xP1 group, 13xP2 group, 6xP3 group | ||
| 27 | */ | ||
| 28 | |||
| 29 | #define LPC32XX_GPIO_P0_MAX 8 | ||
| 30 | #define LPC32XX_GPIO_P1_MAX 24 | ||
| 31 | #define LPC32XX_GPIO_P2_MAX 13 | ||
| 32 | #define LPC32XX_GPIO_P3_MAX 6 | ||
| 33 | #define LPC32XX_GPI_P3_MAX 29 | ||
| 34 | #define LPC32XX_GPO_P3_MAX 24 | ||
| 35 | |||
| 36 | #define LPC32XX_GPIO_P0_GRP 0 | ||
| 37 | #define LPC32XX_GPIO_P1_GRP (LPC32XX_GPIO_P0_GRP + LPC32XX_GPIO_P0_MAX) | ||
| 38 | #define LPC32XX_GPIO_P2_GRP (LPC32XX_GPIO_P1_GRP + LPC32XX_GPIO_P1_MAX) | ||
| 39 | #define LPC32XX_GPIO_P3_GRP (LPC32XX_GPIO_P2_GRP + LPC32XX_GPIO_P2_MAX) | ||
| 40 | #define LPC32XX_GPI_P3_GRP (LPC32XX_GPIO_P3_GRP + LPC32XX_GPIO_P3_MAX) | ||
| 41 | #define LPC32XX_GPO_P3_GRP (LPC32XX_GPI_P3_GRP + LPC32XX_GPI_P3_MAX) | ||
| 42 | |||
| 43 | /* | ||
| 44 | * A specific GPIO can be selected with this macro | ||
| 45 | * ie, GPIO_05 can be selected with LPC32XX_GPIO(LPC32XX_GPIO_P3_GRP, 5) | ||
| 46 | * See the LPC32x0 User's guide for GPIO group numbers | ||
| 47 | */ | ||
| 48 | #define LPC32XX_GPIO(x, y) ((x) + (y)) | ||
| 49 | |||
| 50 | #endif /* __MACH_GPIO_LPC32XX_H */ | ||
diff --git a/include/linux/platform_data/hwmon-s3c.h b/include/linux/platform_data/hwmon-s3c.h index c167e4429bc7..0e3cce130fe2 100644 --- a/include/linux/platform_data/hwmon-s3c.h +++ b/include/linux/platform_data/hwmon-s3c.h | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | /* linux/arch/arm/plat-s3c/include/plat/hwmon.h | 1 | /* |
| 2 | * | ||
| 3 | * Copyright 2005 Simtec Electronics | 2 | * Copyright 2005 Simtec Electronics |
| 4 | * Ben Dooks <ben@simtec.co.uk> | 3 | * Ben Dooks <ben@simtec.co.uk> |
| 5 | * http://armlinux.simtec.co.uk/ | 4 | * http://armlinux.simtec.co.uk/ |
| @@ -11,8 +10,8 @@ | |||
| 11 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 12 | */ | 11 | */ |
| 13 | 12 | ||
| 14 | #ifndef __ASM_ARCH_ADC_HWMON_H | 13 | #ifndef __HWMON_S3C_H__ |
| 15 | #define __ASM_ARCH_ADC_HWMON_H __FILE__ | 14 | #define __HWMON_S3C_H__ |
| 16 | 15 | ||
| 17 | /** | 16 | /** |
| 18 | * s3c_hwmon_chcfg - channel configuration | 17 | * s3c_hwmon_chcfg - channel configuration |
| @@ -47,5 +46,4 @@ struct s3c_hwmon_pdata { | |||
| 47 | */ | 46 | */ |
| 48 | extern void __init s3c_hwmon_set_platdata(struct s3c_hwmon_pdata *pd); | 47 | extern void __init s3c_hwmon_set_platdata(struct s3c_hwmon_pdata *pd); |
| 49 | 48 | ||
| 50 | #endif /* __ASM_ARCH_ADC_HWMON_H */ | 49 | #endif /* __HWMON_S3C_H__ */ |
| 51 | |||
diff --git a/include/linux/platform_data/i2c-nomadik.h b/include/linux/platform_data/i2c-nomadik.h deleted file mode 100644 index 3a8be9cdc95c..000000000000 --- a/include/linux/platform_data/i2c-nomadik.h +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2009 ST-Ericsson | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License version 2, as | ||
| 6 | * published by the Free Software Foundation. | ||
| 7 | */ | ||
| 8 | #ifndef __PDATA_I2C_NOMADIK_H | ||
| 9 | #define __PDATA_I2C_NOMADIK_H | ||
| 10 | |||
| 11 | enum i2c_freq_mode { | ||
| 12 | I2C_FREQ_MODE_STANDARD, /* up to 100 Kb/s */ | ||
| 13 | I2C_FREQ_MODE_FAST, /* up to 400 Kb/s */ | ||
| 14 | I2C_FREQ_MODE_HIGH_SPEED, /* up to 3.4 Mb/s */ | ||
| 15 | I2C_FREQ_MODE_FAST_PLUS, /* up to 1 Mb/s */ | ||
| 16 | }; | ||
| 17 | |||
| 18 | /** | ||
| 19 | * struct nmk_i2c_controller - client specific controller configuration | ||
| 20 | * @clk_freq: clock frequency for the operation mode | ||
| 21 | * @slsu: Slave data setup time in ns. | ||
| 22 | * The needed setup time for three modes of operation | ||
| 23 | * are 250ns, 100ns and 10ns respectively thus leading | ||
| 24 | * to the values of 14, 6, 2 for a 48 MHz i2c clk | ||
| 25 | * @tft: Tx FIFO Threshold in bytes | ||
| 26 | * @rft: Rx FIFO Threshold in bytes | ||
| 27 | * @timeout Slave response timeout(ms) | ||
| 28 | * @sm: speed mode | ||
| 29 | */ | ||
| 30 | struct nmk_i2c_controller { | ||
| 31 | u32 clk_freq; | ||
| 32 | unsigned short slsu; | ||
| 33 | unsigned char tft; | ||
| 34 | unsigned char rft; | ||
| 35 | int timeout; | ||
| 36 | enum i2c_freq_mode sm; | ||
| 37 | }; | ||
| 38 | |||
| 39 | #endif /* __PDATA_I2C_NOMADIK_H */ | ||
diff --git a/include/linux/platform_data/max197.h b/include/linux/platform_data/max197.h index e2a41dd7690c..8da8f94ee15c 100644 --- a/include/linux/platform_data/max197.h +++ b/include/linux/platform_data/max197.h | |||
| @@ -11,6 +11,9 @@ | |||
| 11 | * For further information, see the Documentation/hwmon/max197 file. | 11 | * For further information, see the Documentation/hwmon/max197 file. |
| 12 | */ | 12 | */ |
| 13 | 13 | ||
| 14 | #ifndef _PDATA_MAX197_H | ||
| 15 | #define _PDATA_MAX197_H | ||
| 16 | |||
| 14 | /** | 17 | /** |
| 15 | * struct max197_platform_data - MAX197 connectivity info | 18 | * struct max197_platform_data - MAX197 connectivity info |
| 16 | * @convert: Function used to start a conversion with control byte ctrl. | 19 | * @convert: Function used to start a conversion with control byte ctrl. |
| @@ -19,3 +22,5 @@ | |||
| 19 | struct max197_platform_data { | 22 | struct max197_platform_data { |
| 20 | int (*convert)(u8 ctrl); | 23 | int (*convert)(u8 ctrl); |
| 21 | }; | 24 | }; |
| 25 | |||
| 26 | #endif /* _PDATA_MAX197_H */ | ||
diff --git a/include/linux/platform_data/mfd-mcp-sa11x0.h b/include/linux/platform_data/mfd-mcp-sa11x0.h index 4b2860ae3828..747cd6baf711 100644 --- a/include/linux/platform_data/mfd-mcp-sa11x0.h +++ b/include/linux/platform_data/mfd-mcp-sa11x0.h | |||
| @@ -1,14 +1,12 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/mach-sa1100/include/mach/mcp.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2005 Russell King. | 2 | * Copyright (C) 2005 Russell King. |
| 5 | * | 3 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 4 | * 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 | 5 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
| 9 | */ | 7 | */ |
| 10 | #ifndef __ASM_ARM_ARCH_MCP_H | 8 | #ifndef __MFD_MCP_SA11X0_H |
| 11 | #define __ASM_ARM_ARCH_MCP_H | 9 | #define __MFD_MCP_SA11X0_H |
| 12 | 10 | ||
| 13 | #include <linux/types.h> | 11 | #include <linux/types.h> |
| 14 | 12 | ||
diff --git a/include/linux/platform_data/sht15.h b/include/linux/platform_data/sht15.h index 33e0fd27225e..12289c1e9413 100644 --- a/include/linux/platform_data/sht15.h +++ b/include/linux/platform_data/sht15.h | |||
| @@ -12,6 +12,9 @@ | |||
| 12 | * For further information, see the Documentation/hwmon/sht15 file. | 12 | * For further information, see the Documentation/hwmon/sht15 file. |
| 13 | */ | 13 | */ |
| 14 | 14 | ||
| 15 | #ifndef _PDATA_SHT15_H | ||
| 16 | #define _PDATA_SHT15_H | ||
| 17 | |||
| 15 | /** | 18 | /** |
| 16 | * struct sht15_platform_data - sht15 connectivity info | 19 | * struct sht15_platform_data - sht15 connectivity info |
| 17 | * @gpio_data: no. of gpio to which bidirectional data line is | 20 | * @gpio_data: no. of gpio to which bidirectional data line is |
| @@ -31,3 +34,5 @@ struct sht15_platform_data { | |||
| 31 | bool no_otp_reload; | 34 | bool no_otp_reload; |
| 32 | bool low_resolution; | 35 | bool low_resolution; |
| 33 | }; | 36 | }; |
| 37 | |||
| 38 | #endif /* _PDATA_SHT15_H */ | ||
diff --git a/include/linux/platform_data/usb-ehci-orion.h b/include/linux/platform_data/usb-ehci-orion.h index 6fc78e430420..52b0acb35fd7 100644 --- a/include/linux/platform_data/usb-ehci-orion.h +++ b/include/linux/platform_data/usb-ehci-orion.h | |||
| @@ -1,13 +1,11 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/plat-orion/include/plat/ehci-orion.h | ||
| 3 | * | ||
| 4 | * This file is licensed under the terms of the GNU General Public | 2 | * This file is licensed under the terms of the GNU General Public |
| 5 | * License version 2. This program is licensed "as is" without any | 3 | * License version 2. This program is licensed "as is" without any |
| 6 | * warranty of any kind, whether express or implied. | 4 | * warranty of any kind, whether express or implied. |
| 7 | */ | 5 | */ |
| 8 | 6 | ||
| 9 | #ifndef __PLAT_EHCI_ORION_H | 7 | #ifndef __USB_EHCI_ORION_H |
| 10 | #define __PLAT_EHCI_ORION_H | 8 | #define __USB_EHCI_ORION_H |
| 11 | 9 | ||
| 12 | #include <linux/mbus.h> | 10 | #include <linux/mbus.h> |
| 13 | 11 | ||
diff --git a/include/linux/platform_data/usb-omap1.h b/include/linux/platform_data/usb-omap1.h new file mode 100644 index 000000000000..43b5ce139c37 --- /dev/null +++ b/include/linux/platform_data/usb-omap1.h | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | /* | ||
| 2 | * Platform data for OMAP1 USB | ||
| 3 | * | ||
| 4 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 5 | * License. See the file "COPYING" in the main directory of this archive for | ||
| 6 | * more details. | ||
| 7 | */ | ||
| 8 | #ifndef __LINUX_USB_OMAP1_H | ||
| 9 | #define __LINUX_USB_OMAP1_H | ||
| 10 | |||
| 11 | #include <linux/platform_device.h> | ||
| 12 | |||
| 13 | struct omap_usb_config { | ||
| 14 | /* Configure drivers according to the connectors on your board: | ||
| 15 | * - "A" connector (rectagular) | ||
| 16 | * ... for host/OHCI use, set "register_host". | ||
| 17 | * - "B" connector (squarish) or "Mini-B" | ||
| 18 | * ... for device/gadget use, set "register_dev". | ||
| 19 | * - "Mini-AB" connector (very similar to Mini-B) | ||
| 20 | * ... for OTG use as device OR host, initialize "otg" | ||
| 21 | */ | ||
| 22 | unsigned register_host:1; | ||
| 23 | unsigned register_dev:1; | ||
| 24 | u8 otg; /* port number, 1-based: usb1 == 2 */ | ||
| 25 | |||
| 26 | const char *extcon; /* extcon device for OTG */ | ||
| 27 | |||
| 28 | u8 hmc_mode; | ||
| 29 | |||
| 30 | /* implicitly true if otg: host supports remote wakeup? */ | ||
| 31 | u8 rwc; | ||
| 32 | |||
| 33 | /* signaling pins used to talk to transceiver on usbN: | ||
| 34 | * 0 == usbN unused | ||
| 35 | * 2 == usb0-only, using internal transceiver | ||
| 36 | * 3 == 3 wire bidirectional | ||
| 37 | * 4 == 4 wire bidirectional | ||
| 38 | * 6 == 6 wire unidirectional (or TLL) | ||
| 39 | */ | ||
| 40 | u8 pins[3]; | ||
| 41 | |||
| 42 | struct platform_device *udc_device; | ||
| 43 | struct platform_device *ohci_device; | ||
| 44 | struct platform_device *otg_device; | ||
| 45 | |||
| 46 | u32 (*usb0_init)(unsigned nwires, unsigned is_device); | ||
| 47 | u32 (*usb1_init)(unsigned nwires); | ||
| 48 | u32 (*usb2_init)(unsigned nwires, unsigned alt_pingroup); | ||
| 49 | |||
| 50 | int (*ocpi_enable)(void); | ||
| 51 | }; | ||
| 52 | |||
| 53 | #endif /* __LINUX_USB_OMAP1_H */ | ||
diff --git a/include/linux/power/bq2415x_charger.h b/include/linux/power/bq2415x_charger.h index 8dcc0f46fc0a..50762af8b834 100644 --- a/include/linux/power/bq2415x_charger.h +++ b/include/linux/power/bq2415x_charger.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * bq2415x charger driver | 2 | * bq2415x charger driver |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2011-2012 Pali Rohár <pali.rohar@gmail.com> | 4 | * Copyright (C) 2011-2013 Pali Rohár <pali.rohar@gmail.com> |
| 5 | * | 5 | * |
| 6 | * 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 |
| 7 | * 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 |
| @@ -31,46 +31,9 @@ | |||
| 31 | * termination current. It it is less or equal to zero, configuring charge | 31 | * termination current. It it is less or equal to zero, configuring charge |
| 32 | * and termination current will not be possible. | 32 | * and termination current will not be possible. |
| 33 | * | 33 | * |
| 34 | * Function set_mode_hook is needed for automode (setting correct current | 34 | * For automode support is needed to provide name of power supply device |
| 35 | * limit when charger is connected/disconnected or setting boost mode). | 35 | * in value notify_device. Device driver must immediately report property |
| 36 | * When is NULL, automode function is disabled. When is not NULL, it must | 36 | * POWER_SUPPLY_PROP_CURRENT_MAX when current changed. |
| 37 | * have this prototype: | ||
| 38 | * | ||
| 39 | * int (*set_mode_hook)( | ||
| 40 | * void (*hook)(enum bq2415x_mode mode, void *data), | ||
| 41 | * void *data) | ||
| 42 | * | ||
| 43 | * hook is hook function (see below) and data is pointer to driver private | ||
| 44 | * data | ||
| 45 | * | ||
| 46 | * bq2415x driver will call it as: | ||
| 47 | * | ||
| 48 | * platform_data->set_mode_hook(bq2415x_hook_function, bq2415x_device); | ||
| 49 | * | ||
| 50 | * Board/platform function set_mode_hook return non zero value when hook | ||
| 51 | * function was successful registered. Platform code should call that hook | ||
| 52 | * function (which get from pointer, with data) every time when charger | ||
| 53 | * was connected/disconnected or require to enable boost mode. bq2415x | ||
| 54 | * driver then will set correct current limit, enable/disable charger or | ||
| 55 | * boost mode. | ||
| 56 | * | ||
| 57 | * Hook function has this prototype: | ||
| 58 | * | ||
| 59 | * void hook(enum bq2415x_mode mode, void *data); | ||
| 60 | * | ||
| 61 | * mode is bq2415x mode (charger or boost) | ||
| 62 | * data is pointer to driver private data (which get from | ||
| 63 | * set_charger_type_hook) | ||
| 64 | * | ||
| 65 | * When bq driver is being unloaded, it call function: | ||
| 66 | * | ||
| 67 | * platform_data->set_mode_hook(NULL, NULL); | ||
| 68 | * | ||
| 69 | * (hook function and driver private data are NULL) | ||
| 70 | * | ||
| 71 | * After that board/platform code must not call driver hook function! It | ||
| 72 | * is possible that pointer to hook function will not be valid and calling | ||
| 73 | * will cause undefined result. | ||
| 74 | */ | 37 | */ |
| 75 | 38 | ||
| 76 | /* Supported modes with maximal current limit */ | 39 | /* Supported modes with maximal current limit */ |
| @@ -89,8 +52,7 @@ struct bq2415x_platform_data { | |||
| 89 | int charge_current; /* mA */ | 52 | int charge_current; /* mA */ |
| 90 | int termination_current; /* mA */ | 53 | int termination_current; /* mA */ |
| 91 | int resistor_sense; /* m ohm */ | 54 | int resistor_sense; /* m ohm */ |
| 92 | int (*set_mode_hook)(void (*hook)(enum bq2415x_mode mode, void *data), | 55 | const char *notify_device; /* name */ |
| 93 | void *data); | ||
| 94 | }; | 56 | }; |
| 95 | 57 | ||
| 96 | #endif | 58 | #endif |
diff --git a/include/linux/power/charger-manager.h b/include/linux/power/charger-manager.h index 0e86840eb603..07e7945a1ff2 100644 --- a/include/linux/power/charger-manager.h +++ b/include/linux/power/charger-manager.h | |||
| @@ -37,6 +37,8 @@ enum cm_event_types { | |||
| 37 | CM_EVENT_BATT_FULL, | 37 | CM_EVENT_BATT_FULL, |
| 38 | CM_EVENT_BATT_IN, | 38 | CM_EVENT_BATT_IN, |
| 39 | CM_EVENT_BATT_OUT, | 39 | CM_EVENT_BATT_OUT, |
| 40 | CM_EVENT_BATT_OVERHEAT, | ||
| 41 | CM_EVENT_BATT_COLD, | ||
| 40 | CM_EVENT_EXT_PWR_IN_OUT, | 42 | CM_EVENT_EXT_PWR_IN_OUT, |
| 41 | CM_EVENT_CHG_START_STOP, | 43 | CM_EVENT_CHG_START_STOP, |
| 42 | CM_EVENT_OTHERS, | 44 | CM_EVENT_OTHERS, |
| @@ -173,11 +175,10 @@ struct charger_regulator { | |||
| 173 | * @num_charger_regulator: the number of entries in charger_regulators | 175 | * @num_charger_regulator: the number of entries in charger_regulators |
| 174 | * @charger_regulators: array of charger regulators | 176 | * @charger_regulators: array of charger regulators |
| 175 | * @psy_fuel_gauge: the name of power-supply for fuel gauge | 177 | * @psy_fuel_gauge: the name of power-supply for fuel gauge |
| 176 | * @temperature_out_of_range: | 178 | * @thermal_zone : the name of thermal zone for battery |
| 177 | * Determine whether the status is overheat or cold or normal. | 179 | * @temp_min : Minimum battery temperature for charging. |
| 178 | * return_value > 0: overheat | 180 | * @temp_max : Maximum battery temperature for charging. |
| 179 | * return_value == 0: normal | 181 | * @temp_diff : Temperature diffential to restart charging. |
| 180 | * return_value < 0: cold | ||
| 181 | * @measure_battery_temp: | 182 | * @measure_battery_temp: |
| 182 | * true: measure battery temperature | 183 | * true: measure battery temperature |
| 183 | * false: measure ambient temperature | 184 | * false: measure ambient temperature |
| @@ -190,7 +191,7 @@ struct charger_regulator { | |||
| 190 | * max_duration_ms', cm start charging. | 191 | * max_duration_ms', cm start charging. |
| 191 | */ | 192 | */ |
| 192 | struct charger_desc { | 193 | struct charger_desc { |
| 193 | char *psy_name; | 194 | const char *psy_name; |
| 194 | 195 | ||
| 195 | enum polling_modes polling_mode; | 196 | enum polling_modes polling_mode; |
| 196 | unsigned int polling_interval_ms; | 197 | unsigned int polling_interval_ms; |
| @@ -203,18 +204,23 @@ struct charger_desc { | |||
| 203 | 204 | ||
| 204 | enum data_source battery_present; | 205 | enum data_source battery_present; |
| 205 | 206 | ||
| 206 | char **psy_charger_stat; | 207 | const char **psy_charger_stat; |
| 207 | 208 | ||
| 208 | int num_charger_regulators; | 209 | int num_charger_regulators; |
| 209 | struct charger_regulator *charger_regulators; | 210 | struct charger_regulator *charger_regulators; |
| 210 | 211 | ||
| 211 | char *psy_fuel_gauge; | 212 | const char *psy_fuel_gauge; |
| 213 | |||
| 214 | const char *thermal_zone; | ||
| 215 | |||
| 216 | int temp_min; | ||
| 217 | int temp_max; | ||
| 218 | int temp_diff; | ||
| 212 | 219 | ||
| 213 | int (*temperature_out_of_range)(int *mC); | ||
| 214 | bool measure_battery_temp; | 220 | bool measure_battery_temp; |
| 215 | 221 | ||
| 216 | u64 charging_max_duration_ms; | 222 | u32 charging_max_duration_ms; |
| 217 | u64 discharging_max_duration_ms; | 223 | u32 discharging_max_duration_ms; |
| 218 | }; | 224 | }; |
| 219 | 225 | ||
| 220 | #define PSY_NAME_MAX 30 | 226 | #define PSY_NAME_MAX 30 |
| @@ -226,13 +232,13 @@ struct charger_desc { | |||
| 226 | * @desc: instance of charger_desc | 232 | * @desc: instance of charger_desc |
| 227 | * @fuel_gauge: power_supply for fuel gauge | 233 | * @fuel_gauge: power_supply for fuel gauge |
| 228 | * @charger_stat: array of power_supply for chargers | 234 | * @charger_stat: array of power_supply for chargers |
| 235 | * @tzd_batt : thermal zone device for battery | ||
| 229 | * @charger_enabled: the state of charger | 236 | * @charger_enabled: the state of charger |
| 230 | * @fullbatt_vchk_jiffies_at: | 237 | * @fullbatt_vchk_jiffies_at: |
| 231 | * jiffies at the time full battery check will occur. | 238 | * jiffies at the time full battery check will occur. |
| 232 | * @fullbatt_vchk_work: work queue for full battery check | 239 | * @fullbatt_vchk_work: work queue for full battery check |
| 233 | * @emergency_stop: | 240 | * @emergency_stop: |
| 234 | * When setting true, stop charging | 241 | * When setting true, stop charging |
| 235 | * @last_temp_mC: the measured temperature in milli-Celsius | ||
| 236 | * @psy_name_buf: the name of power-supply-class for charger manager | 242 | * @psy_name_buf: the name of power-supply-class for charger manager |
| 237 | * @charger_psy: power_supply for charger manager | 243 | * @charger_psy: power_supply for charger manager |
| 238 | * @status_save_ext_pwr_inserted: | 244 | * @status_save_ext_pwr_inserted: |
| @@ -250,13 +256,15 @@ struct charger_manager { | |||
| 250 | struct power_supply *fuel_gauge; | 256 | struct power_supply *fuel_gauge; |
| 251 | struct power_supply **charger_stat; | 257 | struct power_supply **charger_stat; |
| 252 | 258 | ||
| 259 | #ifdef CONFIG_THERMAL | ||
| 260 | struct thermal_zone_device *tzd_batt; | ||
| 261 | #endif | ||
| 253 | bool charger_enabled; | 262 | bool charger_enabled; |
| 254 | 263 | ||
| 255 | unsigned long fullbatt_vchk_jiffies_at; | 264 | unsigned long fullbatt_vchk_jiffies_at; |
| 256 | struct delayed_work fullbatt_vchk_work; | 265 | struct delayed_work fullbatt_vchk_work; |
| 257 | 266 | ||
| 258 | int emergency_stop; | 267 | int emergency_stop; |
| 259 | int last_temp_mC; | ||
| 260 | 268 | ||
| 261 | char psy_name_buf[PSY_NAME_MAX + 1]; | 269 | char psy_name_buf[PSY_NAME_MAX + 1]; |
| 262 | struct power_supply charger_psy; | 270 | struct power_supply charger_psy; |
diff --git a/include/linux/power/isp1704_charger.h b/include/linux/power/isp1704_charger.h index 68096a6aa2d7..0105d9e7af85 100644 --- a/include/linux/power/isp1704_charger.h +++ b/include/linux/power/isp1704_charger.h | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | struct isp1704_charger_data { | 25 | struct isp1704_charger_data { |
| 26 | void (*set_power)(bool on); | 26 | void (*set_power)(bool on); |
| 27 | int enable_gpio; | ||
| 27 | }; | 28 | }; |
| 28 | 29 | ||
| 29 | #endif | 30 | #endif |
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 5c2600630dc9..c9dc4e09854c 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/workqueue.h> | 16 | #include <linux/workqueue.h> |
| 17 | #include <linux/leds.h> | 17 | #include <linux/leds.h> |
| 18 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
| 19 | #include <linux/notifier.h> | ||
| 19 | 20 | ||
| 20 | struct device; | 21 | struct device; |
| 21 | 22 | ||
| @@ -158,6 +159,10 @@ enum power_supply_type { | |||
| 158 | POWER_SUPPLY_TYPE_USB_ACA, /* Accessory Charger Adapters */ | 159 | POWER_SUPPLY_TYPE_USB_ACA, /* Accessory Charger Adapters */ |
| 159 | }; | 160 | }; |
| 160 | 161 | ||
| 162 | enum power_supply_notifier_events { | ||
| 163 | PSY_EVENT_PROP_CHANGED, | ||
| 164 | }; | ||
| 165 | |||
| 161 | union power_supply_propval { | 166 | union power_supply_propval { |
| 162 | int intval; | 167 | int intval; |
| 163 | const char *strval; | 168 | const char *strval; |
| @@ -235,7 +240,18 @@ struct power_supply_info { | |||
| 235 | int use_for_apm; | 240 | int use_for_apm; |
| 236 | }; | 241 | }; |
| 237 | 242 | ||
| 243 | extern struct atomic_notifier_head power_supply_notifier; | ||
| 244 | extern int power_supply_reg_notifier(struct notifier_block *nb); | ||
| 245 | extern void power_supply_unreg_notifier(struct notifier_block *nb); | ||
| 238 | extern struct power_supply *power_supply_get_by_name(const char *name); | 246 | extern struct power_supply *power_supply_get_by_name(const char *name); |
| 247 | #ifdef CONFIG_OF | ||
| 248 | extern struct power_supply *power_supply_get_by_phandle(struct device_node *np, | ||
| 249 | const char *property); | ||
| 250 | #else /* !CONFIG_OF */ | ||
| 251 | static inline struct power_supply * | ||
| 252 | power_supply_get_by_phandle(struct device_node *np, const char *property) | ||
| 253 | { return NULL; } | ||
| 254 | #endif /* CONFIG_OF */ | ||
| 239 | extern void power_supply_changed(struct power_supply *psy); | 255 | extern void power_supply_changed(struct power_supply *psy); |
| 240 | extern int power_supply_am_i_supplied(struct power_supply *psy); | 256 | extern int power_supply_am_i_supplied(struct power_supply *psy); |
| 241 | extern int power_supply_set_battery_charged(struct power_supply *psy); | 257 | extern int power_supply_set_battery_charged(struct power_supply *psy); |
diff --git a/include/linux/preempt.h b/include/linux/preempt.h index a3d9dc8c2c00..59749fc48328 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h | |||
| @@ -64,7 +64,11 @@ do { \ | |||
| 64 | } while (0) | 64 | } while (0) |
| 65 | 65 | ||
| 66 | #else | 66 | #else |
| 67 | #define preempt_enable() preempt_enable_no_resched() | 67 | #define preempt_enable() \ |
| 68 | do { \ | ||
| 69 | barrier(); \ | ||
| 70 | preempt_count_dec(); \ | ||
| 71 | } while (0) | ||
| 68 | #define preempt_check_resched() do { } while (0) | 72 | #define preempt_check_resched() do { } while (0) |
| 69 | #endif | 73 | #endif |
| 70 | 74 | ||
| @@ -93,7 +97,11 @@ do { \ | |||
| 93 | __preempt_schedule_context(); \ | 97 | __preempt_schedule_context(); \ |
| 94 | } while (0) | 98 | } while (0) |
| 95 | #else | 99 | #else |
| 96 | #define preempt_enable_notrace() preempt_enable_no_resched_notrace() | 100 | #define preempt_enable_notrace() \ |
| 101 | do { \ | ||
| 102 | barrier(); \ | ||
| 103 | __preempt_count_dec(); \ | ||
| 104 | } while (0) | ||
| 97 | #endif | 105 | #endif |
| 98 | 106 | ||
| 99 | #else /* !CONFIG_PREEMPT_COUNT */ | 107 | #else /* !CONFIG_PREEMPT_COUNT */ |
| @@ -116,6 +124,31 @@ do { \ | |||
| 116 | 124 | ||
| 117 | #endif /* CONFIG_PREEMPT_COUNT */ | 125 | #endif /* CONFIG_PREEMPT_COUNT */ |
| 118 | 126 | ||
| 127 | #ifdef MODULE | ||
| 128 | /* | ||
| 129 | * Modules have no business playing preemption tricks. | ||
| 130 | */ | ||
| 131 | #undef sched_preempt_enable_no_resched | ||
| 132 | #undef preempt_enable_no_resched | ||
| 133 | #undef preempt_enable_no_resched_notrace | ||
| 134 | #undef preempt_check_resched | ||
| 135 | #endif | ||
| 136 | |||
| 137 | #ifdef CONFIG_PREEMPT | ||
| 138 | #define preempt_set_need_resched() \ | ||
| 139 | do { \ | ||
| 140 | set_preempt_need_resched(); \ | ||
| 141 | } while (0) | ||
| 142 | #define preempt_fold_need_resched() \ | ||
| 143 | do { \ | ||
| 144 | if (tif_need_resched()) \ | ||
| 145 | set_preempt_need_resched(); \ | ||
| 146 | } while (0) | ||
| 147 | #else | ||
| 148 | #define preempt_set_need_resched() do { } while (0) | ||
| 149 | #define preempt_fold_need_resched() do { } while (0) | ||
| 150 | #endif | ||
| 151 | |||
| 119 | #ifdef CONFIG_PREEMPT_NOTIFIERS | 152 | #ifdef CONFIG_PREEMPT_NOTIFIERS |
| 120 | 153 | ||
| 121 | struct preempt_notifier; | 154 | struct preempt_notifier; |
diff --git a/include/linux/preempt_mask.h b/include/linux/preempt_mask.h index d169820203dd..dbeec4d4a3be 100644 --- a/include/linux/preempt_mask.h +++ b/include/linux/preempt_mask.h | |||
| @@ -2,7 +2,6 @@ | |||
| 2 | #define LINUX_PREEMPT_MASK_H | 2 | #define LINUX_PREEMPT_MASK_H |
| 3 | 3 | ||
| 4 | #include <linux/preempt.h> | 4 | #include <linux/preempt.h> |
| 5 | #include <asm/hardirq.h> | ||
| 6 | 5 | ||
| 7 | /* | 6 | /* |
| 8 | * We put the hardirq and softirq counter into the preemption | 7 | * We put the hardirq and softirq counter into the preemption |
| @@ -79,6 +78,21 @@ | |||
| 79 | #endif | 78 | #endif |
| 80 | 79 | ||
| 81 | /* | 80 | /* |
| 81 | * The preempt_count offset needed for things like: | ||
| 82 | * | ||
| 83 | * spin_lock_bh() | ||
| 84 | * | ||
| 85 | * Which need to disable both preemption (CONFIG_PREEMPT_COUNT) and | ||
| 86 | * softirqs, such that unlock sequences of: | ||
| 87 | * | ||
| 88 | * spin_unlock(); | ||
| 89 | * local_bh_enable(); | ||
| 90 | * | ||
| 91 | * Work as expected. | ||
| 92 | */ | ||
| 93 | #define SOFTIRQ_LOCK_OFFSET (SOFTIRQ_DISABLE_OFFSET + PREEMPT_CHECK_OFFSET) | ||
| 94 | |||
| 95 | /* | ||
| 82 | * Are we running in atomic context? WARNING: this macro cannot | 96 | * Are we running in atomic context? WARNING: this macro cannot |
| 83 | * always detect atomic context; in particular, it cannot know about | 97 | * always detect atomic context; in particular, it cannot know about |
| 84 | * held spinlocks in non-preemptible kernels. Thus it should not be | 98 | * held spinlocks in non-preemptible kernels. Thus it should not be |
diff --git a/include/linux/pstore.h b/include/linux/pstore.h index abd437d0a8a7..ece0c6bbfcc5 100644 --- a/include/linux/pstore.h +++ b/include/linux/pstore.h | |||
| @@ -51,6 +51,7 @@ struct pstore_info { | |||
| 51 | char *buf; | 51 | char *buf; |
| 52 | size_t bufsize; | 52 | size_t bufsize; |
| 53 | struct mutex read_mutex; /* serialize open/read/close */ | 53 | struct mutex read_mutex; /* serialize open/read/close */ |
| 54 | int flags; | ||
| 54 | int (*open)(struct pstore_info *psi); | 55 | int (*open)(struct pstore_info *psi); |
| 55 | int (*close)(struct pstore_info *psi); | 56 | int (*close)(struct pstore_info *psi); |
| 56 | ssize_t (*read)(u64 *id, enum pstore_type_id *type, | 57 | ssize_t (*read)(u64 *id, enum pstore_type_id *type, |
| @@ -70,6 +71,8 @@ struct pstore_info { | |||
| 70 | void *data; | 71 | void *data; |
| 71 | }; | 72 | }; |
| 72 | 73 | ||
| 74 | #define PSTORE_FLAGS_FRAGILE 1 | ||
| 75 | |||
| 73 | #ifdef CONFIG_PSTORE | 76 | #ifdef CONFIG_PSTORE |
| 74 | extern int pstore_register(struct pstore_info *); | 77 | extern int pstore_register(struct pstore_info *); |
| 75 | extern bool pstore_cannot_block_path(enum kmsg_dump_reason reason); | 78 | extern bool pstore_cannot_block_path(enum kmsg_dump_reason reason); |
diff --git a/include/linux/rculist.h b/include/linux/rculist.h index 45a0a9e81478..dbaf99084112 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h | |||
| @@ -55,8 +55,8 @@ static inline void __list_add_rcu(struct list_head *new, | |||
| 55 | next->prev = new; | 55 | next->prev = new; |
| 56 | } | 56 | } |
| 57 | #else | 57 | #else |
| 58 | extern void __list_add_rcu(struct list_head *new, | 58 | void __list_add_rcu(struct list_head *new, |
| 59 | struct list_head *prev, struct list_head *next); | 59 | struct list_head *prev, struct list_head *next); |
| 60 | #endif | 60 | #endif |
| 61 | 61 | ||
| 62 | /** | 62 | /** |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 39cbb889e20d..3e355c688618 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -50,13 +50,13 @@ extern int rcutorture_runnable; /* for sysctl */ | |||
| 50 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ | 50 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ |
| 51 | 51 | ||
| 52 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) | 52 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) |
| 53 | extern void rcutorture_record_test_transition(void); | 53 | void rcutorture_record_test_transition(void); |
| 54 | extern void rcutorture_record_progress(unsigned long vernum); | 54 | void rcutorture_record_progress(unsigned long vernum); |
| 55 | extern void do_trace_rcu_torture_read(const char *rcutorturename, | 55 | void do_trace_rcu_torture_read(const char *rcutorturename, |
| 56 | struct rcu_head *rhp, | 56 | struct rcu_head *rhp, |
| 57 | unsigned long secs, | 57 | unsigned long secs, |
| 58 | unsigned long c_old, | 58 | unsigned long c_old, |
| 59 | unsigned long c); | 59 | unsigned long c); |
| 60 | #else | 60 | #else |
| 61 | static inline void rcutorture_record_test_transition(void) | 61 | static inline void rcutorture_record_test_transition(void) |
| 62 | { | 62 | { |
| @@ -65,11 +65,11 @@ static inline void rcutorture_record_progress(unsigned long vernum) | |||
| 65 | { | 65 | { |
| 66 | } | 66 | } |
| 67 | #ifdef CONFIG_RCU_TRACE | 67 | #ifdef CONFIG_RCU_TRACE |
| 68 | extern void do_trace_rcu_torture_read(const char *rcutorturename, | 68 | void do_trace_rcu_torture_read(const char *rcutorturename, |
| 69 | struct rcu_head *rhp, | 69 | struct rcu_head *rhp, |
| 70 | unsigned long secs, | 70 | unsigned long secs, |
| 71 | unsigned long c_old, | 71 | unsigned long c_old, |
| 72 | unsigned long c); | 72 | unsigned long c); |
| 73 | #else | 73 | #else |
| 74 | #define do_trace_rcu_torture_read(rcutorturename, rhp, secs, c_old, c) \ | 74 | #define do_trace_rcu_torture_read(rcutorturename, rhp, secs, c_old, c) \ |
| 75 | do { } while (0) | 75 | do { } while (0) |
| @@ -118,8 +118,8 @@ extern void do_trace_rcu_torture_read(const char *rcutorturename, | |||
| 118 | * if CPU A and CPU B are the same CPU (but again only if the system has | 118 | * if CPU A and CPU B are the same CPU (but again only if the system has |
| 119 | * more than one CPU). | 119 | * more than one CPU). |
| 120 | */ | 120 | */ |
| 121 | extern void call_rcu(struct rcu_head *head, | 121 | void call_rcu(struct rcu_head *head, |
| 122 | void (*func)(struct rcu_head *head)); | 122 | void (*func)(struct rcu_head *head)); |
| 123 | 123 | ||
| 124 | #else /* #ifdef CONFIG_PREEMPT_RCU */ | 124 | #else /* #ifdef CONFIG_PREEMPT_RCU */ |
| 125 | 125 | ||
| @@ -149,8 +149,8 @@ extern void call_rcu(struct rcu_head *head, | |||
| 149 | * See the description of call_rcu() for more detailed information on | 149 | * See the description of call_rcu() for more detailed information on |
| 150 | * memory ordering guarantees. | 150 | * memory ordering guarantees. |
| 151 | */ | 151 | */ |
| 152 | extern void call_rcu_bh(struct rcu_head *head, | 152 | void call_rcu_bh(struct rcu_head *head, |
| 153 | void (*func)(struct rcu_head *head)); | 153 | void (*func)(struct rcu_head *head)); |
| 154 | 154 | ||
| 155 | /** | 155 | /** |
| 156 | * call_rcu_sched() - Queue an RCU for invocation after sched grace period. | 156 | * call_rcu_sched() - Queue an RCU for invocation after sched grace period. |
| @@ -171,16 +171,16 @@ extern void call_rcu_bh(struct rcu_head *head, | |||
| 171 | * See the description of call_rcu() for more detailed information on | 171 | * See the description of call_rcu() for more detailed information on |
| 172 | * memory ordering guarantees. | 172 | * memory ordering guarantees. |
| 173 | */ | 173 | */ |
| 174 | extern void call_rcu_sched(struct rcu_head *head, | 174 | void call_rcu_sched(struct rcu_head *head, |
| 175 | void (*func)(struct rcu_head *rcu)); | 175 | void (*func)(struct rcu_head *rcu)); |
| 176 | 176 | ||
| 177 | extern void synchronize_sched(void); | 177 | void synchronize_sched(void); |
| 178 | 178 | ||
| 179 | #ifdef CONFIG_PREEMPT_RCU | 179 | #ifdef CONFIG_PREEMPT_RCU |
| 180 | 180 | ||
| 181 | extern void __rcu_read_lock(void); | 181 | void __rcu_read_lock(void); |
| 182 | extern void __rcu_read_unlock(void); | 182 | void __rcu_read_unlock(void); |
| 183 | extern void rcu_read_unlock_special(struct task_struct *t); | 183 | void rcu_read_unlock_special(struct task_struct *t); |
| 184 | void synchronize_rcu(void); | 184 | void synchronize_rcu(void); |
| 185 | 185 | ||
| 186 | /* | 186 | /* |
| @@ -216,19 +216,19 @@ static inline int rcu_preempt_depth(void) | |||
| 216 | #endif /* #else #ifdef CONFIG_PREEMPT_RCU */ | 216 | #endif /* #else #ifdef CONFIG_PREEMPT_RCU */ |
| 217 | 217 | ||
| 218 | /* Internal to kernel */ | 218 | /* Internal to kernel */ |
| 219 | extern void rcu_init(void); | 219 | void rcu_init(void); |
| 220 | extern void rcu_sched_qs(int cpu); | 220 | void rcu_sched_qs(int cpu); |
| 221 | extern void rcu_bh_qs(int cpu); | 221 | void rcu_bh_qs(int cpu); |
| 222 | extern void rcu_check_callbacks(int cpu, int user); | 222 | void rcu_check_callbacks(int cpu, int user); |
| 223 | struct notifier_block; | 223 | struct notifier_block; |
| 224 | extern void rcu_idle_enter(void); | 224 | void rcu_idle_enter(void); |
| 225 | extern void rcu_idle_exit(void); | 225 | void rcu_idle_exit(void); |
| 226 | extern void rcu_irq_enter(void); | 226 | void rcu_irq_enter(void); |
| 227 | extern void rcu_irq_exit(void); | 227 | void rcu_irq_exit(void); |
| 228 | 228 | ||
| 229 | #ifdef CONFIG_RCU_USER_QS | 229 | #ifdef CONFIG_RCU_USER_QS |
| 230 | extern void rcu_user_enter(void); | 230 | void rcu_user_enter(void); |
| 231 | extern void rcu_user_exit(void); | 231 | void rcu_user_exit(void); |
| 232 | #else | 232 | #else |
| 233 | static inline void rcu_user_enter(void) { } | 233 | static inline void rcu_user_enter(void) { } |
| 234 | static inline void rcu_user_exit(void) { } | 234 | static inline void rcu_user_exit(void) { } |
| @@ -262,7 +262,7 @@ static inline void rcu_user_hooks_switch(struct task_struct *prev, | |||
| 262 | } while (0) | 262 | } while (0) |
| 263 | 263 | ||
| 264 | #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) | 264 | #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) |
| 265 | extern bool __rcu_is_watching(void); | 265 | bool __rcu_is_watching(void); |
| 266 | #endif /* #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) */ | 266 | #endif /* #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) */ |
| 267 | 267 | ||
| 268 | /* | 268 | /* |
| @@ -289,8 +289,8 @@ void wait_rcu_gp(call_rcu_func_t crf); | |||
| 289 | * initialization. | 289 | * initialization. |
| 290 | */ | 290 | */ |
| 291 | #ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD | 291 | #ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD |
| 292 | extern void init_rcu_head_on_stack(struct rcu_head *head); | 292 | void init_rcu_head_on_stack(struct rcu_head *head); |
| 293 | extern void destroy_rcu_head_on_stack(struct rcu_head *head); | 293 | void destroy_rcu_head_on_stack(struct rcu_head *head); |
| 294 | #else /* !CONFIG_DEBUG_OBJECTS_RCU_HEAD */ | 294 | #else /* !CONFIG_DEBUG_OBJECTS_RCU_HEAD */ |
| 295 | static inline void init_rcu_head_on_stack(struct rcu_head *head) | 295 | static inline void init_rcu_head_on_stack(struct rcu_head *head) |
| 296 | { | 296 | { |
| @@ -325,6 +325,7 @@ static inline void rcu_lock_release(struct lockdep_map *map) | |||
| 325 | extern struct lockdep_map rcu_lock_map; | 325 | extern struct lockdep_map rcu_lock_map; |
| 326 | extern struct lockdep_map rcu_bh_lock_map; | 326 | extern struct lockdep_map rcu_bh_lock_map; |
| 327 | extern struct lockdep_map rcu_sched_lock_map; | 327 | extern struct lockdep_map rcu_sched_lock_map; |
| 328 | extern struct lockdep_map rcu_callback_map; | ||
| 328 | extern int debug_lockdep_rcu_enabled(void); | 329 | extern int debug_lockdep_rcu_enabled(void); |
| 329 | 330 | ||
| 330 | /** | 331 | /** |
| @@ -362,7 +363,7 @@ static inline int rcu_read_lock_held(void) | |||
| 362 | * rcu_read_lock_bh_held() is defined out of line to avoid #include-file | 363 | * rcu_read_lock_bh_held() is defined out of line to avoid #include-file |
| 363 | * hell. | 364 | * hell. |
| 364 | */ | 365 | */ |
| 365 | extern int rcu_read_lock_bh_held(void); | 366 | int rcu_read_lock_bh_held(void); |
| 366 | 367 | ||
| 367 | /** | 368 | /** |
| 368 | * rcu_read_lock_sched_held() - might we be in RCU-sched read-side critical section? | 369 | * rcu_read_lock_sched_held() - might we be in RCU-sched read-side critical section? |
| @@ -448,7 +449,7 @@ static inline int rcu_read_lock_sched_held(void) | |||
| 448 | 449 | ||
| 449 | #ifdef CONFIG_PROVE_RCU | 450 | #ifdef CONFIG_PROVE_RCU |
| 450 | 451 | ||
| 451 | extern int rcu_my_thread_group_empty(void); | 452 | int rcu_my_thread_group_empty(void); |
| 452 | 453 | ||
| 453 | /** | 454 | /** |
| 454 | * rcu_lockdep_assert - emit lockdep splat if specified condition not met | 455 | * rcu_lockdep_assert - emit lockdep splat if specified condition not met |
| @@ -548,10 +549,48 @@ static inline void rcu_preempt_sleep_check(void) | |||
| 548 | smp_read_barrier_depends(); \ | 549 | smp_read_barrier_depends(); \ |
| 549 | (_________p1); \ | 550 | (_________p1); \ |
| 550 | }) | 551 | }) |
| 551 | #define __rcu_assign_pointer(p, v, space) \ | 552 | |
| 553 | /** | ||
| 554 | * RCU_INITIALIZER() - statically initialize an RCU-protected global variable | ||
| 555 | * @v: The value to statically initialize with. | ||
| 556 | */ | ||
| 557 | #define RCU_INITIALIZER(v) (typeof(*(v)) __force __rcu *)(v) | ||
| 558 | |||
| 559 | /** | ||
| 560 | * rcu_assign_pointer() - assign to RCU-protected pointer | ||
| 561 | * @p: pointer to assign to | ||
| 562 | * @v: value to assign (publish) | ||
| 563 | * | ||
| 564 | * Assigns the specified value to the specified RCU-protected | ||
| 565 | * pointer, ensuring that any concurrent RCU readers will see | ||
| 566 | * any prior initialization. | ||
| 567 | * | ||
| 568 | * Inserts memory barriers on architectures that require them | ||
| 569 | * (which is most of them), and also prevents the compiler from | ||
| 570 | * reordering the code that initializes the structure after the pointer | ||
| 571 | * assignment. More importantly, this call documents which pointers | ||
| 572 | * will be dereferenced by RCU read-side code. | ||
| 573 | * | ||
| 574 | * In some special cases, you may use RCU_INIT_POINTER() instead | ||
| 575 | * of rcu_assign_pointer(). RCU_INIT_POINTER() is a bit faster due | ||
| 576 | * to the fact that it does not constrain either the CPU or the compiler. | ||
| 577 | * That said, using RCU_INIT_POINTER() when you should have used | ||
| 578 | * rcu_assign_pointer() is a very bad thing that results in | ||
| 579 | * impossible-to-diagnose memory corruption. So please be careful. | ||
| 580 | * See the RCU_INIT_POINTER() comment header for details. | ||
| 581 | * | ||
| 582 | * Note that rcu_assign_pointer() evaluates each of its arguments only | ||
| 583 | * once, appearances notwithstanding. One of the "extra" evaluations | ||
| 584 | * is in typeof() and the other visible only to sparse (__CHECKER__), | ||
| 585 | * neither of which actually execute the argument. As with most cpp | ||
| 586 | * macros, this execute-arguments-only-once property is important, so | ||
| 587 | * please be careful when making changes to rcu_assign_pointer() and the | ||
| 588 | * other macros that it invokes. | ||
| 589 | */ | ||
| 590 | #define rcu_assign_pointer(p, v) \ | ||
| 552 | do { \ | 591 | do { \ |
| 553 | smp_wmb(); \ | 592 | smp_wmb(); \ |
| 554 | (p) = (typeof(*v) __force space *)(v); \ | 593 | ACCESS_ONCE(p) = RCU_INITIALIZER(v); \ |
| 555 | } while (0) | 594 | } while (0) |
| 556 | 595 | ||
| 557 | 596 | ||
| @@ -890,32 +929,6 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) | |||
| 890 | } | 929 | } |
| 891 | 930 | ||
| 892 | /** | 931 | /** |
| 893 | * rcu_assign_pointer() - assign to RCU-protected pointer | ||
| 894 | * @p: pointer to assign to | ||
| 895 | * @v: value to assign (publish) | ||
| 896 | * | ||
| 897 | * Assigns the specified value to the specified RCU-protected | ||
| 898 | * pointer, ensuring that any concurrent RCU readers will see | ||
| 899 | * any prior initialization. | ||
| 900 | * | ||
| 901 | * Inserts memory barriers on architectures that require them | ||
| 902 | * (which is most of them), and also prevents the compiler from | ||
| 903 | * reordering the code that initializes the structure after the pointer | ||
| 904 | * assignment. More importantly, this call documents which pointers | ||
| 905 | * will be dereferenced by RCU read-side code. | ||
| 906 | * | ||
| 907 | * In some special cases, you may use RCU_INIT_POINTER() instead | ||
| 908 | * of rcu_assign_pointer(). RCU_INIT_POINTER() is a bit faster due | ||
| 909 | * to the fact that it does not constrain either the CPU or the compiler. | ||
| 910 | * That said, using RCU_INIT_POINTER() when you should have used | ||
| 911 | * rcu_assign_pointer() is a very bad thing that results in | ||
| 912 | * impossible-to-diagnose memory corruption. So please be careful. | ||
| 913 | * See the RCU_INIT_POINTER() comment header for details. | ||
| 914 | */ | ||
| 915 | #define rcu_assign_pointer(p, v) \ | ||
| 916 | __rcu_assign_pointer((p), (v), __rcu) | ||
| 917 | |||
| 918 | /** | ||
| 919 | * RCU_INIT_POINTER() - initialize an RCU protected pointer | 932 | * RCU_INIT_POINTER() - initialize an RCU protected pointer |
| 920 | * | 933 | * |
| 921 | * Initialize an RCU-protected pointer in special cases where readers | 934 | * Initialize an RCU-protected pointer in special cases where readers |
| @@ -949,7 +962,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) | |||
| 949 | */ | 962 | */ |
| 950 | #define RCU_INIT_POINTER(p, v) \ | 963 | #define RCU_INIT_POINTER(p, v) \ |
| 951 | do { \ | 964 | do { \ |
| 952 | p = (typeof(*v) __force __rcu *)(v); \ | 965 | p = RCU_INITIALIZER(v); \ |
| 953 | } while (0) | 966 | } while (0) |
| 954 | 967 | ||
| 955 | /** | 968 | /** |
| @@ -958,7 +971,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) | |||
| 958 | * GCC-style initialization for an RCU-protected pointer in a structure field. | 971 | * GCC-style initialization for an RCU-protected pointer in a structure field. |
| 959 | */ | 972 | */ |
| 960 | #define RCU_POINTER_INITIALIZER(p, v) \ | 973 | #define RCU_POINTER_INITIALIZER(p, v) \ |
| 961 | .p = (typeof(*v) __force __rcu *)(v) | 974 | .p = RCU_INITIALIZER(v) |
| 962 | 975 | ||
| 963 | /* | 976 | /* |
| 964 | * Does the specified offset indicate that the corresponding rcu_head | 977 | * Does the specified offset indicate that the corresponding rcu_head |
| @@ -1005,7 +1018,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) | |||
| 1005 | __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head)) | 1018 | __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head)) |
| 1006 | 1019 | ||
| 1007 | #ifdef CONFIG_RCU_NOCB_CPU | 1020 | #ifdef CONFIG_RCU_NOCB_CPU |
| 1008 | extern bool rcu_is_nocb_cpu(int cpu); | 1021 | bool rcu_is_nocb_cpu(int cpu); |
| 1009 | #else | 1022 | #else |
| 1010 | static inline bool rcu_is_nocb_cpu(int cpu) { return false; } | 1023 | static inline bool rcu_is_nocb_cpu(int cpu) { return false; } |
| 1011 | #endif /* #else #ifdef CONFIG_RCU_NOCB_CPU */ | 1024 | #endif /* #else #ifdef CONFIG_RCU_NOCB_CPU */ |
| @@ -1013,8 +1026,8 @@ static inline bool rcu_is_nocb_cpu(int cpu) { return false; } | |||
| 1013 | 1026 | ||
| 1014 | /* Only for use by adaptive-ticks code. */ | 1027 | /* Only for use by adaptive-ticks code. */ |
| 1015 | #ifdef CONFIG_NO_HZ_FULL_SYSIDLE | 1028 | #ifdef CONFIG_NO_HZ_FULL_SYSIDLE |
| 1016 | extern bool rcu_sys_is_idle(void); | 1029 | bool rcu_sys_is_idle(void); |
| 1017 | extern void rcu_sysidle_force_exit(void); | 1030 | void rcu_sysidle_force_exit(void); |
| 1018 | #else /* #ifdef CONFIG_NO_HZ_FULL_SYSIDLE */ | 1031 | #else /* #ifdef CONFIG_NO_HZ_FULL_SYSIDLE */ |
| 1019 | 1032 | ||
| 1020 | static inline bool rcu_sys_is_idle(void) | 1033 | static inline bool rcu_sys_is_idle(void) |
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 09ebcbe9fd78..6f01771b571c 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
| @@ -125,7 +125,7 @@ static inline void exit_rcu(void) | |||
| 125 | 125 | ||
| 126 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 126 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
| 127 | extern int rcu_scheduler_active __read_mostly; | 127 | extern int rcu_scheduler_active __read_mostly; |
| 128 | extern void rcu_scheduler_starting(void); | 128 | void rcu_scheduler_starting(void); |
| 129 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | 129 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ |
| 130 | static inline void rcu_scheduler_starting(void) | 130 | static inline void rcu_scheduler_starting(void) |
| 131 | { | 131 | { |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 4b9c81548742..72137ee8c603 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
| @@ -30,9 +30,9 @@ | |||
| 30 | #ifndef __LINUX_RCUTREE_H | 30 | #ifndef __LINUX_RCUTREE_H |
| 31 | #define __LINUX_RCUTREE_H | 31 | #define __LINUX_RCUTREE_H |
| 32 | 32 | ||
| 33 | extern void rcu_note_context_switch(int cpu); | 33 | void rcu_note_context_switch(int cpu); |
| 34 | extern int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies); | 34 | int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies); |
| 35 | extern void rcu_cpu_stall_reset(void); | 35 | void rcu_cpu_stall_reset(void); |
| 36 | 36 | ||
| 37 | /* | 37 | /* |
| 38 | * Note a virtualization-based context switch. This is simply a | 38 | * Note a virtualization-based context switch. This is simply a |
| @@ -44,9 +44,9 @@ static inline void rcu_virt_note_context_switch(int cpu) | |||
| 44 | rcu_note_context_switch(cpu); | 44 | rcu_note_context_switch(cpu); |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | extern void synchronize_rcu_bh(void); | 47 | void synchronize_rcu_bh(void); |
| 48 | extern void synchronize_sched_expedited(void); | 48 | void synchronize_sched_expedited(void); |
| 49 | extern void synchronize_rcu_expedited(void); | 49 | void synchronize_rcu_expedited(void); |
| 50 | 50 | ||
| 51 | void kfree_call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu)); | 51 | void kfree_call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu)); |
| 52 | 52 | ||
| @@ -71,25 +71,25 @@ static inline void synchronize_rcu_bh_expedited(void) | |||
| 71 | synchronize_sched_expedited(); | 71 | synchronize_sched_expedited(); |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | extern void rcu_barrier(void); | 74 | void rcu_barrier(void); |
| 75 | extern void rcu_barrier_bh(void); | 75 | void rcu_barrier_bh(void); |
| 76 | extern void rcu_barrier_sched(void); | 76 | void rcu_barrier_sched(void); |
| 77 | 77 | ||
| 78 | extern unsigned long rcutorture_testseq; | 78 | extern unsigned long rcutorture_testseq; |
| 79 | extern unsigned long rcutorture_vernum; | 79 | extern unsigned long rcutorture_vernum; |
| 80 | extern long rcu_batches_completed(void); | 80 | long rcu_batches_completed(void); |
| 81 | extern long rcu_batches_completed_bh(void); | 81 | long rcu_batches_completed_bh(void); |
| 82 | extern long rcu_batches_completed_sched(void); | 82 | long rcu_batches_completed_sched(void); |
| 83 | 83 | ||
| 84 | extern void rcu_force_quiescent_state(void); | 84 | void rcu_force_quiescent_state(void); |
| 85 | extern void rcu_bh_force_quiescent_state(void); | 85 | void rcu_bh_force_quiescent_state(void); |
| 86 | extern void rcu_sched_force_quiescent_state(void); | 86 | void rcu_sched_force_quiescent_state(void); |
| 87 | 87 | ||
| 88 | extern void exit_rcu(void); | 88 | void exit_rcu(void); |
| 89 | 89 | ||
| 90 | extern void rcu_scheduler_starting(void); | 90 | void rcu_scheduler_starting(void); |
| 91 | extern int rcu_scheduler_active __read_mostly; | 91 | extern int rcu_scheduler_active __read_mostly; |
| 92 | 92 | ||
| 93 | extern bool rcu_is_watching(void); | 93 | bool rcu_is_watching(void); |
| 94 | 94 | ||
| 95 | #endif /* __LINUX_RCUTREE_H */ | 95 | #endif /* __LINUX_RCUTREE_H */ |
diff --git a/include/linux/reboot.h b/include/linux/reboot.h index 8e00f9f6f963..9e7db9e73cc1 100644 --- a/include/linux/reboot.h +++ b/include/linux/reboot.h | |||
| @@ -43,6 +43,7 @@ extern int unregister_reboot_notifier(struct notifier_block *); | |||
| 43 | * Architecture-specific implementations of sys_reboot commands. | 43 | * Architecture-specific implementations of sys_reboot commands. |
| 44 | */ | 44 | */ |
| 45 | 45 | ||
| 46 | extern void migrate_to_reboot_cpu(void); | ||
| 46 | extern void machine_restart(char *cmd); | 47 | extern void machine_restart(char *cmd); |
| 47 | extern void machine_halt(void); | 48 | extern void machine_halt(void); |
| 48 | extern void machine_power_off(void); | 49 | extern void machine_power_off(void); |
diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h index de17134244f3..3aed8d737e1a 100644 --- a/include/linux/rtmutex.h +++ b/include/linux/rtmutex.h | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | #define __LINUX_RT_MUTEX_H | 13 | #define __LINUX_RT_MUTEX_H |
| 14 | 14 | ||
| 15 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
| 16 | #include <linux/plist.h> | 16 | #include <linux/rbtree.h> |
| 17 | #include <linux/spinlock_types.h> | 17 | #include <linux/spinlock_types.h> |
| 18 | 18 | ||
| 19 | extern int max_lock_depth; /* for sysctl */ | 19 | extern int max_lock_depth; /* for sysctl */ |
| @@ -22,12 +22,14 @@ extern int max_lock_depth; /* for sysctl */ | |||
| 22 | * The rt_mutex structure | 22 | * The rt_mutex structure |
| 23 | * | 23 | * |
| 24 | * @wait_lock: spinlock to protect the structure | 24 | * @wait_lock: spinlock to protect the structure |
| 25 | * @wait_list: pilist head to enqueue waiters in priority order | 25 | * @waiters: rbtree root to enqueue waiters in priority order |
| 26 | * @waiters_leftmost: top waiter | ||
| 26 | * @owner: the mutex owner | 27 | * @owner: the mutex owner |
| 27 | */ | 28 | */ |
| 28 | struct rt_mutex { | 29 | struct rt_mutex { |
| 29 | raw_spinlock_t wait_lock; | 30 | raw_spinlock_t wait_lock; |
| 30 | struct plist_head wait_list; | 31 | struct rb_root waiters; |
| 32 | struct rb_node *waiters_leftmost; | ||
| 31 | struct task_struct *owner; | 33 | struct task_struct *owner; |
| 32 | #ifdef CONFIG_DEBUG_RT_MUTEXES | 34 | #ifdef CONFIG_DEBUG_RT_MUTEXES |
| 33 | int save_state; | 35 | int save_state; |
| @@ -66,7 +68,7 @@ struct hrtimer_sleeper; | |||
| 66 | 68 | ||
| 67 | #define __RT_MUTEX_INITIALIZER(mutexname) \ | 69 | #define __RT_MUTEX_INITIALIZER(mutexname) \ |
| 68 | { .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(mutexname.wait_lock) \ | 70 | { .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(mutexname.wait_lock) \ |
| 69 | , .wait_list = PLIST_HEAD_INIT(mutexname.wait_list) \ | 71 | , .waiters = RB_ROOT \ |
| 70 | , .owner = NULL \ | 72 | , .owner = NULL \ |
| 71 | __DEBUG_RT_MUTEX_INITIALIZER(mutexname)} | 73 | __DEBUG_RT_MUTEX_INITIALIZER(mutexname)} |
| 72 | 74 | ||
| @@ -98,12 +100,4 @@ extern int rt_mutex_trylock(struct rt_mutex *lock); | |||
| 98 | 100 | ||
| 99 | extern void rt_mutex_unlock(struct rt_mutex *lock); | 101 | extern void rt_mutex_unlock(struct rt_mutex *lock); |
| 100 | 102 | ||
| 101 | #ifdef CONFIG_RT_MUTEXES | ||
| 102 | # define INIT_RT_MUTEXES(tsk) \ | ||
| 103 | .pi_waiters = PLIST_HEAD_INIT(tsk.pi_waiters), \ | ||
| 104 | INIT_RT_MUTEX_DEBUG(tsk) | ||
| 105 | #else | ||
| 106 | # define INIT_RT_MUTEXES(tsk) | ||
| 107 | #endif | ||
| 108 | |||
| 109 | #endif | 103 | #endif |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 939428ad25ac..8e3e66ac0a52 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
| @@ -24,6 +24,11 @@ extern int rtnl_trylock(void); | |||
| 24 | extern int rtnl_is_locked(void); | 24 | extern int rtnl_is_locked(void); |
| 25 | #ifdef CONFIG_PROVE_LOCKING | 25 | #ifdef CONFIG_PROVE_LOCKING |
| 26 | extern int lockdep_rtnl_is_held(void); | 26 | extern int lockdep_rtnl_is_held(void); |
| 27 | #else | ||
| 28 | static inline int lockdep_rtnl_is_held(void) | ||
| 29 | { | ||
| 30 | return 1; | ||
| 31 | } | ||
| 27 | #endif /* #ifdef CONFIG_PROVE_LOCKING */ | 32 | #endif /* #ifdef CONFIG_PROVE_LOCKING */ |
| 28 | 33 | ||
| 29 | /** | 34 | /** |
diff --git a/include/linux/rwlock_api_smp.h b/include/linux/rwlock_api_smp.h index 9c9f0495d37c..5b9b84b20407 100644 --- a/include/linux/rwlock_api_smp.h +++ b/include/linux/rwlock_api_smp.h | |||
| @@ -172,8 +172,7 @@ static inline void __raw_read_lock_irq(rwlock_t *lock) | |||
| 172 | 172 | ||
| 173 | static inline void __raw_read_lock_bh(rwlock_t *lock) | 173 | static inline void __raw_read_lock_bh(rwlock_t *lock) |
| 174 | { | 174 | { |
| 175 | local_bh_disable(); | 175 | __local_bh_disable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET); |
| 176 | preempt_disable(); | ||
| 177 | rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_); | 176 | rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_); |
| 178 | LOCK_CONTENDED(lock, do_raw_read_trylock, do_raw_read_lock); | 177 | LOCK_CONTENDED(lock, do_raw_read_trylock, do_raw_read_lock); |
| 179 | } | 178 | } |
| @@ -200,8 +199,7 @@ static inline void __raw_write_lock_irq(rwlock_t *lock) | |||
| 200 | 199 | ||
| 201 | static inline void __raw_write_lock_bh(rwlock_t *lock) | 200 | static inline void __raw_write_lock_bh(rwlock_t *lock) |
| 202 | { | 201 | { |
| 203 | local_bh_disable(); | 202 | __local_bh_disable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET); |
| 204 | preempt_disable(); | ||
| 205 | rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_); | 203 | rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_); |
| 206 | LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock); | 204 | LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock); |
| 207 | } | 205 | } |
| @@ -250,8 +248,7 @@ static inline void __raw_read_unlock_bh(rwlock_t *lock) | |||
| 250 | { | 248 | { |
| 251 | rwlock_release(&lock->dep_map, 1, _RET_IP_); | 249 | rwlock_release(&lock->dep_map, 1, _RET_IP_); |
| 252 | do_raw_read_unlock(lock); | 250 | do_raw_read_unlock(lock); |
| 253 | preempt_enable_no_resched(); | 251 | __local_bh_enable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET); |
| 254 | local_bh_enable_ip((unsigned long)__builtin_return_address(0)); | ||
| 255 | } | 252 | } |
| 256 | 253 | ||
| 257 | static inline void __raw_write_unlock_irqrestore(rwlock_t *lock, | 254 | static inline void __raw_write_unlock_irqrestore(rwlock_t *lock, |
| @@ -275,8 +272,7 @@ static inline void __raw_write_unlock_bh(rwlock_t *lock) | |||
| 275 | { | 272 | { |
| 276 | rwlock_release(&lock->dep_map, 1, _RET_IP_); | 273 | rwlock_release(&lock->dep_map, 1, _RET_IP_); |
| 277 | do_raw_write_unlock(lock); | 274 | do_raw_write_unlock(lock); |
| 278 | preempt_enable_no_resched(); | 275 | __local_bh_enable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET); |
| 279 | local_bh_enable_ip((unsigned long)__builtin_return_address(0)); | ||
| 280 | } | 276 | } |
| 281 | 277 | ||
| 282 | #endif /* __LINUX_RWLOCK_API_SMP_H */ | 278 | #endif /* __LINUX_RWLOCK_API_SMP_H */ |
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index adae88f5b0ab..a964f7285600 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h | |||
| @@ -345,6 +345,7 @@ struct sg_mapping_iter { | |||
| 345 | 345 | ||
| 346 | void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl, | 346 | void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl, |
| 347 | unsigned int nents, unsigned int flags); | 347 | unsigned int nents, unsigned int flags); |
| 348 | bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset); | ||
| 348 | bool sg_miter_next(struct sg_mapping_iter *miter); | 349 | bool sg_miter_next(struct sg_mapping_iter *miter); |
| 349 | void sg_miter_stop(struct sg_mapping_iter *miter); | 350 | void sg_miter_stop(struct sg_mapping_iter *miter); |
| 350 | 351 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 7e35d4b9e14a..ffccdad050b5 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -16,6 +16,7 @@ struct sched_param { | |||
| 16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
| 17 | #include <linux/timex.h> | 17 | #include <linux/timex.h> |
| 18 | #include <linux/jiffies.h> | 18 | #include <linux/jiffies.h> |
| 19 | #include <linux/plist.h> | ||
| 19 | #include <linux/rbtree.h> | 20 | #include <linux/rbtree.h> |
| 20 | #include <linux/thread_info.h> | 21 | #include <linux/thread_info.h> |
| 21 | #include <linux/cpumask.h> | 22 | #include <linux/cpumask.h> |
| @@ -56,6 +57,70 @@ struct sched_param { | |||
| 56 | 57 | ||
| 57 | #include <asm/processor.h> | 58 | #include <asm/processor.h> |
| 58 | 59 | ||
| 60 | #define SCHED_ATTR_SIZE_VER0 48 /* sizeof first published struct */ | ||
| 61 | |||
| 62 | /* | ||
| 63 | * Extended scheduling parameters data structure. | ||
| 64 | * | ||
| 65 | * This is needed because the original struct sched_param can not be | ||
| 66 | * altered without introducing ABI issues with legacy applications | ||
| 67 | * (e.g., in sched_getparam()). | ||
| 68 | * | ||
| 69 | * However, the possibility of specifying more than just a priority for | ||
| 70 | * the tasks may be useful for a wide variety of application fields, e.g., | ||
| 71 | * multimedia, streaming, automation and control, and many others. | ||
| 72 | * | ||
| 73 | * This variant (sched_attr) is meant at describing a so-called | ||
| 74 | * sporadic time-constrained task. In such model a task is specified by: | ||
| 75 | * - the activation period or minimum instance inter-arrival time; | ||
| 76 | * - the maximum (or average, depending on the actual scheduling | ||
| 77 | * discipline) computation time of all instances, a.k.a. runtime; | ||
| 78 | * - the deadline (relative to the actual activation time) of each | ||
| 79 | * instance. | ||
| 80 | * Very briefly, a periodic (sporadic) task asks for the execution of | ||
| 81 | * some specific computation --which is typically called an instance-- | ||
| 82 | * (at most) every period. Moreover, each instance typically lasts no more | ||
| 83 | * than the runtime and must be completed by time instant t equal to | ||
| 84 | * the instance activation time + the deadline. | ||
| 85 | * | ||
| 86 | * This is reflected by the actual fields of the sched_attr structure: | ||
| 87 | * | ||
| 88 | * @size size of the structure, for fwd/bwd compat. | ||
| 89 | * | ||
| 90 | * @sched_policy task's scheduling policy | ||
| 91 | * @sched_flags for customizing the scheduler behaviour | ||
| 92 | * @sched_nice task's nice value (SCHED_NORMAL/BATCH) | ||
| 93 | * @sched_priority task's static priority (SCHED_FIFO/RR) | ||
| 94 | * @sched_deadline representative of the task's deadline | ||
| 95 | * @sched_runtime representative of the task's runtime | ||
| 96 | * @sched_period representative of the task's period | ||
| 97 | * | ||
| 98 | * Given this task model, there are a multiplicity of scheduling algorithms | ||
| 99 | * and policies, that can be used to ensure all the tasks will make their | ||
| 100 | * timing constraints. | ||
| 101 | * | ||
| 102 | * As of now, the SCHED_DEADLINE policy (sched_dl scheduling class) is the | ||
| 103 | * only user of this new interface. More information about the algorithm | ||
| 104 | * available in the scheduling class file or in Documentation/. | ||
| 105 | */ | ||
| 106 | struct sched_attr { | ||
| 107 | u32 size; | ||
| 108 | |||
| 109 | u32 sched_policy; | ||
| 110 | u64 sched_flags; | ||
| 111 | |||
| 112 | /* SCHED_NORMAL, SCHED_BATCH */ | ||
| 113 | s32 sched_nice; | ||
| 114 | |||
| 115 | /* SCHED_FIFO, SCHED_RR */ | ||
| 116 | u32 sched_priority; | ||
| 117 | |||
| 118 | /* SCHED_DEADLINE */ | ||
| 119 | u64 sched_runtime; | ||
| 120 | u64 sched_deadline; | ||
| 121 | u64 sched_period; | ||
| 122 | }; | ||
| 123 | |||
| 59 | struct exec_domain; | 124 | struct exec_domain; |
| 60 | struct futex_pi_state; | 125 | struct futex_pi_state; |
| 61 | struct robust_list_head; | 126 | struct robust_list_head; |
| @@ -168,7 +233,6 @@ extern char ___assert_task_state[1 - 2*!!( | |||
| 168 | 233 | ||
| 169 | #define task_is_traced(task) ((task->state & __TASK_TRACED) != 0) | 234 | #define task_is_traced(task) ((task->state & __TASK_TRACED) != 0) |
| 170 | #define task_is_stopped(task) ((task->state & __TASK_STOPPED) != 0) | 235 | #define task_is_stopped(task) ((task->state & __TASK_STOPPED) != 0) |
| 171 | #define task_is_dead(task) ((task)->exit_state != 0) | ||
| 172 | #define task_is_stopped_or_traced(task) \ | 236 | #define task_is_stopped_or_traced(task) \ |
| 173 | ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0) | 237 | ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0) |
| 174 | #define task_contributes_to_load(task) \ | 238 | #define task_contributes_to_load(task) \ |
| @@ -440,8 +504,6 @@ struct task_cputime { | |||
| 440 | .sum_exec_runtime = 0, \ | 504 | .sum_exec_runtime = 0, \ |
| 441 | } | 505 | } |
| 442 | 506 | ||
| 443 | #define PREEMPT_ENABLED (PREEMPT_NEED_RESCHED) | ||
| 444 | |||
| 445 | #ifdef CONFIG_PREEMPT_COUNT | 507 | #ifdef CONFIG_PREEMPT_COUNT |
| 446 | #define PREEMPT_DISABLED (1 + PREEMPT_ENABLED) | 508 | #define PREEMPT_DISABLED (1 + PREEMPT_ENABLED) |
| 447 | #else | 509 | #else |
| @@ -831,8 +893,6 @@ struct sched_domain { | |||
| 831 | unsigned int balance_interval; /* initialise to 1. units in ms. */ | 893 | unsigned int balance_interval; /* initialise to 1. units in ms. */ |
| 832 | unsigned int nr_balance_failed; /* initialise to 0 */ | 894 | unsigned int nr_balance_failed; /* initialise to 0 */ |
| 833 | 895 | ||
| 834 | u64 last_update; | ||
| 835 | |||
| 836 | /* idle_balance() stats */ | 896 | /* idle_balance() stats */ |
| 837 | u64 max_newidle_lb_cost; | 897 | u64 max_newidle_lb_cost; |
| 838 | unsigned long next_decay_max_lb_cost; | 898 | unsigned long next_decay_max_lb_cost; |
| @@ -934,7 +994,8 @@ struct pipe_inode_info; | |||
| 934 | struct uts_namespace; | 994 | struct uts_namespace; |
| 935 | 995 | ||
| 936 | struct load_weight { | 996 | struct load_weight { |
| 937 | unsigned long weight, inv_weight; | 997 | unsigned long weight; |
| 998 | u32 inv_weight; | ||
| 938 | }; | 999 | }; |
| 939 | 1000 | ||
| 940 | struct sched_avg { | 1001 | struct sched_avg { |
| @@ -1032,6 +1093,51 @@ struct sched_rt_entity { | |||
| 1032 | #endif | 1093 | #endif |
| 1033 | }; | 1094 | }; |
| 1034 | 1095 | ||
| 1096 | struct sched_dl_entity { | ||
| 1097 | struct rb_node rb_node; | ||
| 1098 | |||
| 1099 | /* | ||
| 1100 | * Original scheduling parameters. Copied here from sched_attr | ||
| 1101 | * during sched_setscheduler2(), they will remain the same until | ||
| 1102 | * the next sched_setscheduler2(). | ||
| 1103 | */ | ||
| 1104 | u64 dl_runtime; /* maximum runtime for each instance */ | ||
| 1105 | u64 dl_deadline; /* relative deadline of each instance */ | ||
| 1106 | u64 dl_period; /* separation of two instances (period) */ | ||
| 1107 | u64 dl_bw; /* dl_runtime / dl_deadline */ | ||
| 1108 | |||
| 1109 | /* | ||
| 1110 | * Actual scheduling parameters. Initialized with the values above, | ||
| 1111 | * they are continously updated during task execution. Note that | ||
| 1112 | * the remaining runtime could be < 0 in case we are in overrun. | ||
| 1113 | */ | ||
| 1114 | s64 runtime; /* remaining runtime for this instance */ | ||
| 1115 | u64 deadline; /* absolute deadline for this instance */ | ||
| 1116 | unsigned int flags; /* specifying the scheduler behaviour */ | ||
| 1117 | |||
| 1118 | /* | ||
| 1119 | * Some bool flags: | ||
| 1120 | * | ||
| 1121 | * @dl_throttled tells if we exhausted the runtime. If so, the | ||
| 1122 | * task has to wait for a replenishment to be performed at the | ||
| 1123 | * next firing of dl_timer. | ||
| 1124 | * | ||
| 1125 | * @dl_new tells if a new instance arrived. If so we must | ||
| 1126 | * start executing it with full runtime and reset its absolute | ||
| 1127 | * deadline; | ||
| 1128 | * | ||
| 1129 | * @dl_boosted tells if we are boosted due to DI. If so we are | ||
| 1130 | * outside bandwidth enforcement mechanism (but only until we | ||
| 1131 | * exit the critical section). | ||
| 1132 | */ | ||
| 1133 | int dl_throttled, dl_new, dl_boosted; | ||
| 1134 | |||
| 1135 | /* | ||
| 1136 | * Bandwidth enforcement timer. Each -deadline task has its | ||
| 1137 | * own bandwidth to be enforced, thus we need one timer per task. | ||
| 1138 | */ | ||
| 1139 | struct hrtimer dl_timer; | ||
| 1140 | }; | ||
| 1035 | 1141 | ||
| 1036 | struct rcu_node; | 1142 | struct rcu_node; |
| 1037 | 1143 | ||
| @@ -1068,6 +1174,7 @@ struct task_struct { | |||
| 1068 | #ifdef CONFIG_CGROUP_SCHED | 1174 | #ifdef CONFIG_CGROUP_SCHED |
| 1069 | struct task_group *sched_task_group; | 1175 | struct task_group *sched_task_group; |
| 1070 | #endif | 1176 | #endif |
| 1177 | struct sched_dl_entity dl; | ||
| 1071 | 1178 | ||
| 1072 | #ifdef CONFIG_PREEMPT_NOTIFIERS | 1179 | #ifdef CONFIG_PREEMPT_NOTIFIERS |
| 1073 | /* list of struct preempt_notifier: */ | 1180 | /* list of struct preempt_notifier: */ |
| @@ -1101,6 +1208,7 @@ struct task_struct { | |||
| 1101 | struct list_head tasks; | 1208 | struct list_head tasks; |
| 1102 | #ifdef CONFIG_SMP | 1209 | #ifdef CONFIG_SMP |
| 1103 | struct plist_node pushable_tasks; | 1210 | struct plist_node pushable_tasks; |
| 1211 | struct rb_node pushable_dl_tasks; | ||
| 1104 | #endif | 1212 | #endif |
| 1105 | 1213 | ||
| 1106 | struct mm_struct *mm, *active_mm; | 1214 | struct mm_struct *mm, *active_mm; |
| @@ -1252,9 +1360,12 @@ struct task_struct { | |||
| 1252 | 1360 | ||
| 1253 | #ifdef CONFIG_RT_MUTEXES | 1361 | #ifdef CONFIG_RT_MUTEXES |
| 1254 | /* PI waiters blocked on a rt_mutex held by this task */ | 1362 | /* PI waiters blocked on a rt_mutex held by this task */ |
| 1255 | struct plist_head pi_waiters; | 1363 | struct rb_root pi_waiters; |
| 1364 | struct rb_node *pi_waiters_leftmost; | ||
| 1256 | /* Deadlock detection and priority inheritance handling */ | 1365 | /* Deadlock detection and priority inheritance handling */ |
| 1257 | struct rt_mutex_waiter *pi_blocked_on; | 1366 | struct rt_mutex_waiter *pi_blocked_on; |
| 1367 | /* Top pi_waiters task */ | ||
| 1368 | struct task_struct *pi_top_task; | ||
| 1258 | #endif | 1369 | #endif |
| 1259 | 1370 | ||
| 1260 | #ifdef CONFIG_DEBUG_MUTEXES | 1371 | #ifdef CONFIG_DEBUG_MUTEXES |
| @@ -1883,7 +1994,9 @@ static inline void sched_clock_idle_wakeup_event(u64 delta_ns) | |||
| 1883 | * but then during bootup it turns out that sched_clock() | 1994 | * but then during bootup it turns out that sched_clock() |
| 1884 | * is reliable after all: | 1995 | * is reliable after all: |
| 1885 | */ | 1996 | */ |
| 1886 | extern int sched_clock_stable; | 1997 | extern int sched_clock_stable(void); |
| 1998 | extern void set_sched_clock_stable(void); | ||
| 1999 | extern void clear_sched_clock_stable(void); | ||
| 1887 | 2000 | ||
| 1888 | extern void sched_clock_tick(void); | 2001 | extern void sched_clock_tick(void); |
| 1889 | extern void sched_clock_idle_sleep_event(void); | 2002 | extern void sched_clock_idle_sleep_event(void); |
| @@ -1962,6 +2075,8 @@ extern int sched_setscheduler(struct task_struct *, int, | |||
| 1962 | const struct sched_param *); | 2075 | const struct sched_param *); |
| 1963 | extern int sched_setscheduler_nocheck(struct task_struct *, int, | 2076 | extern int sched_setscheduler_nocheck(struct task_struct *, int, |
| 1964 | const struct sched_param *); | 2077 | const struct sched_param *); |
| 2078 | extern int sched_setattr(struct task_struct *, | ||
| 2079 | const struct sched_attr *); | ||
| 1965 | extern struct task_struct *idle_task(int cpu); | 2080 | extern struct task_struct *idle_task(int cpu); |
| 1966 | /** | 2081 | /** |
| 1967 | * is_idle_task - is the specified task an idle task? | 2082 | * is_idle_task - is the specified task an idle task? |
| @@ -2041,7 +2156,7 @@ extern void wake_up_new_task(struct task_struct *tsk); | |||
| 2041 | #else | 2156 | #else |
| 2042 | static inline void kick_process(struct task_struct *tsk) { } | 2157 | static inline void kick_process(struct task_struct *tsk) { } |
| 2043 | #endif | 2158 | #endif |
| 2044 | extern void sched_fork(unsigned long clone_flags, struct task_struct *p); | 2159 | extern int sched_fork(unsigned long clone_flags, struct task_struct *p); |
| 2045 | extern void sched_dead(struct task_struct *p); | 2160 | extern void sched_dead(struct task_struct *p); |
| 2046 | 2161 | ||
| 2047 | extern void proc_caches_init(void); | 2162 | extern void proc_caches_init(void); |
| @@ -2630,6 +2745,21 @@ static inline bool __must_check current_clr_polling_and_test(void) | |||
| 2630 | } | 2745 | } |
| 2631 | #endif | 2746 | #endif |
| 2632 | 2747 | ||
| 2748 | static inline void current_clr_polling(void) | ||
| 2749 | { | ||
| 2750 | __current_clr_polling(); | ||
| 2751 | |||
| 2752 | /* | ||
| 2753 | * Ensure we check TIF_NEED_RESCHED after we clear the polling bit. | ||
| 2754 | * Once the bit is cleared, we'll get IPIs with every new | ||
| 2755 | * TIF_NEED_RESCHED and the IPI handler, scheduler_ipi(), will also | ||
| 2756 | * fold. | ||
| 2757 | */ | ||
| 2758 | smp_mb(); /* paired with resched_task() */ | ||
| 2759 | |||
| 2760 | preempt_fold_need_resched(); | ||
| 2761 | } | ||
| 2762 | |||
| 2633 | static __always_inline bool need_resched(void) | 2763 | static __always_inline bool need_resched(void) |
| 2634 | { | 2764 | { |
| 2635 | return unlikely(tif_need_resched()); | 2765 | return unlikely(tif_need_resched()); |
diff --git a/include/linux/sched/deadline.h b/include/linux/sched/deadline.h new file mode 100644 index 000000000000..9d303b8847df --- /dev/null +++ b/include/linux/sched/deadline.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | #ifndef _SCHED_DEADLINE_H | ||
| 2 | #define _SCHED_DEADLINE_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * SCHED_DEADLINE tasks has negative priorities, reflecting | ||
| 6 | * the fact that any of them has higher prio than RT and | ||
| 7 | * NORMAL/BATCH tasks. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #define MAX_DL_PRIO 0 | ||
| 11 | |||
| 12 | static inline int dl_prio(int prio) | ||
| 13 | { | ||
| 14 | if (unlikely(prio < MAX_DL_PRIO)) | ||
| 15 | return 1; | ||
| 16 | return 0; | ||
| 17 | } | ||
| 18 | |||
| 19 | static inline int dl_task(struct task_struct *p) | ||
| 20 | { | ||
| 21 | return dl_prio(p->prio); | ||
| 22 | } | ||
| 23 | |||
| 24 | #endif /* _SCHED_DEADLINE_H */ | ||
diff --git a/include/linux/sched/rt.h b/include/linux/sched/rt.h index 440434df3627..34e4ebea8fce 100644 --- a/include/linux/sched/rt.h +++ b/include/linux/sched/rt.h | |||
| @@ -35,6 +35,7 @@ static inline int rt_task(struct task_struct *p) | |||
| 35 | #ifdef CONFIG_RT_MUTEXES | 35 | #ifdef CONFIG_RT_MUTEXES |
| 36 | extern int rt_mutex_getprio(struct task_struct *p); | 36 | extern int rt_mutex_getprio(struct task_struct *p); |
| 37 | extern void rt_mutex_setprio(struct task_struct *p, int prio); | 37 | extern void rt_mutex_setprio(struct task_struct *p, int prio); |
| 38 | extern struct task_struct *rt_mutex_get_top_task(struct task_struct *task); | ||
| 38 | extern void rt_mutex_adjust_pi(struct task_struct *p); | 39 | extern void rt_mutex_adjust_pi(struct task_struct *p); |
| 39 | static inline bool tsk_is_pi_blocked(struct task_struct *tsk) | 40 | static inline bool tsk_is_pi_blocked(struct task_struct *tsk) |
| 40 | { | 41 | { |
| @@ -45,6 +46,10 @@ static inline int rt_mutex_getprio(struct task_struct *p) | |||
| 45 | { | 46 | { |
| 46 | return p->normal_prio; | 47 | return p->normal_prio; |
| 47 | } | 48 | } |
| 49 | static inline struct task_struct *rt_mutex_get_top_task(struct task_struct *task) | ||
| 50 | { | ||
| 51 | return NULL; | ||
| 52 | } | ||
| 48 | # define rt_mutex_adjust_pi(p) do { } while (0) | 53 | # define rt_mutex_adjust_pi(p) do { } while (0) |
| 49 | static inline bool tsk_is_pi_blocked(struct task_struct *tsk) | 54 | static inline bool tsk_is_pi_blocked(struct task_struct *tsk) |
| 50 | { | 55 | { |
diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h index 41467f8ff8ec..31e0193cb0c5 100644 --- a/include/linux/sched/sysctl.h +++ b/include/linux/sched/sysctl.h | |||
| @@ -48,7 +48,6 @@ extern unsigned int sysctl_numa_balancing_scan_delay; | |||
| 48 | extern unsigned int sysctl_numa_balancing_scan_period_min; | 48 | extern unsigned int sysctl_numa_balancing_scan_period_min; |
| 49 | extern unsigned int sysctl_numa_balancing_scan_period_max; | 49 | extern unsigned int sysctl_numa_balancing_scan_period_max; |
| 50 | extern unsigned int sysctl_numa_balancing_scan_size; | 50 | extern unsigned int sysctl_numa_balancing_scan_size; |
| 51 | extern unsigned int sysctl_numa_balancing_settle_count; | ||
| 52 | 51 | ||
| 53 | #ifdef CONFIG_SCHED_DEBUG | 52 | #ifdef CONFIG_SCHED_DEBUG |
| 54 | extern unsigned int sysctl_sched_migration_cost; | 53 | extern unsigned int sysctl_sched_migration_cost; |
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index cf87a24c0f92..535f158977b9 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h | |||
| @@ -117,15 +117,15 @@ repeat: | |||
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | /** | 119 | /** |
| 120 | * read_seqcount_begin_no_lockdep - start seq-read critical section w/o lockdep | 120 | * raw_read_seqcount_begin - start seq-read critical section w/o lockdep |
| 121 | * @s: pointer to seqcount_t | 121 | * @s: pointer to seqcount_t |
| 122 | * Returns: count to be passed to read_seqcount_retry | 122 | * Returns: count to be passed to read_seqcount_retry |
| 123 | * | 123 | * |
| 124 | * read_seqcount_begin_no_lockdep opens a read critical section of the given | 124 | * raw_read_seqcount_begin opens a read critical section of the given |
| 125 | * seqcount, but without any lockdep checking. Validity of the critical | 125 | * seqcount, but without any lockdep checking. Validity of the critical |
| 126 | * section is tested by checking read_seqcount_retry function. | 126 | * section is tested by checking read_seqcount_retry function. |
| 127 | */ | 127 | */ |
| 128 | static inline unsigned read_seqcount_begin_no_lockdep(const seqcount_t *s) | 128 | static inline unsigned raw_read_seqcount_begin(const seqcount_t *s) |
| 129 | { | 129 | { |
| 130 | unsigned ret = __read_seqcount_begin(s); | 130 | unsigned ret = __read_seqcount_begin(s); |
| 131 | smp_rmb(); | 131 | smp_rmb(); |
| @@ -144,7 +144,7 @@ static inline unsigned read_seqcount_begin_no_lockdep(const seqcount_t *s) | |||
| 144 | static inline unsigned read_seqcount_begin(const seqcount_t *s) | 144 | static inline unsigned read_seqcount_begin(const seqcount_t *s) |
| 145 | { | 145 | { |
| 146 | seqcount_lockdep_reader_access(s); | 146 | seqcount_lockdep_reader_access(s); |
| 147 | return read_seqcount_begin_no_lockdep(s); | 147 | return raw_read_seqcount_begin(s); |
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | /** | 150 | /** |
| @@ -206,14 +206,26 @@ static inline int read_seqcount_retry(const seqcount_t *s, unsigned start) | |||
| 206 | } | 206 | } |
| 207 | 207 | ||
| 208 | 208 | ||
| 209 | |||
| 210 | static inline void raw_write_seqcount_begin(seqcount_t *s) | ||
| 211 | { | ||
| 212 | s->sequence++; | ||
| 213 | smp_wmb(); | ||
| 214 | } | ||
| 215 | |||
| 216 | static inline void raw_write_seqcount_end(seqcount_t *s) | ||
| 217 | { | ||
| 218 | smp_wmb(); | ||
| 219 | s->sequence++; | ||
| 220 | } | ||
| 221 | |||
| 209 | /* | 222 | /* |
| 210 | * Sequence counter only version assumes that callers are using their | 223 | * Sequence counter only version assumes that callers are using their |
| 211 | * own mutexing. | 224 | * own mutexing. |
| 212 | */ | 225 | */ |
| 213 | static inline void write_seqcount_begin_nested(seqcount_t *s, int subclass) | 226 | static inline void write_seqcount_begin_nested(seqcount_t *s, int subclass) |
| 214 | { | 227 | { |
| 215 | s->sequence++; | 228 | raw_write_seqcount_begin(s); |
| 216 | smp_wmb(); | ||
| 217 | seqcount_acquire(&s->dep_map, subclass, 0, _RET_IP_); | 229 | seqcount_acquire(&s->dep_map, subclass, 0, _RET_IP_); |
| 218 | } | 230 | } |
| 219 | 231 | ||
| @@ -225,8 +237,7 @@ static inline void write_seqcount_begin(seqcount_t *s) | |||
| 225 | static inline void write_seqcount_end(seqcount_t *s) | 237 | static inline void write_seqcount_end(seqcount_t *s) |
| 226 | { | 238 | { |
| 227 | seqcount_release(&s->dep_map, 1, _RET_IP_); | 239 | seqcount_release(&s->dep_map, 1, _RET_IP_); |
| 228 | smp_wmb(); | 240 | raw_write_seqcount_end(s); |
| 229 | s->sequence++; | ||
| 230 | } | 241 | } |
| 231 | 242 | ||
| 232 | /** | 243 | /** |
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index 30aa0dc60d75..9d55438bc4ad 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h | |||
| @@ -47,6 +47,8 @@ extern int shmem_init(void); | |||
| 47 | extern int shmem_fill_super(struct super_block *sb, void *data, int silent); | 47 | extern int shmem_fill_super(struct super_block *sb, void *data, int silent); |
| 48 | extern struct file *shmem_file_setup(const char *name, | 48 | extern struct file *shmem_file_setup(const char *name, |
| 49 | loff_t size, unsigned long flags); | 49 | loff_t size, unsigned long flags); |
| 50 | extern struct file *shmem_kernel_file_setup(const char *name, loff_t size, | ||
| 51 | unsigned long flags); | ||
| 50 | extern int shmem_zero_setup(struct vm_area_struct *); | 52 | extern int shmem_zero_setup(struct vm_area_struct *); |
| 51 | extern int shmem_lock(struct file *file, int lock, struct user_struct *user); | 53 | extern int shmem_lock(struct file *file, int lock, struct user_struct *user); |
| 52 | extern void shmem_unlock_mapping(struct address_space *mapping); | 54 | extern void shmem_unlock_mapping(struct address_space *mapping); |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index bec1cc7d5e3c..6f69b3f914fb 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -1638,6 +1638,11 @@ static inline void skb_set_mac_header(struct sk_buff *skb, const int offset) | |||
| 1638 | skb->mac_header += offset; | 1638 | skb->mac_header += offset; |
| 1639 | } | 1639 | } |
| 1640 | 1640 | ||
| 1641 | static inline void skb_pop_mac_header(struct sk_buff *skb) | ||
| 1642 | { | ||
| 1643 | skb->mac_header = skb->network_header; | ||
| 1644 | } | ||
| 1645 | |||
| 1641 | static inline void skb_probe_transport_header(struct sk_buff *skb, | 1646 | static inline void skb_probe_transport_header(struct sk_buff *skb, |
| 1642 | const int offset_hint) | 1647 | const int offset_hint) |
| 1643 | { | 1648 | { |
| @@ -2263,6 +2268,24 @@ static inline void skb_postpull_rcsum(struct sk_buff *skb, | |||
| 2263 | 2268 | ||
| 2264 | unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len); | 2269 | unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len); |
| 2265 | 2270 | ||
| 2271 | /** | ||
| 2272 | * pskb_trim_rcsum - trim received skb and update checksum | ||
| 2273 | * @skb: buffer to trim | ||
| 2274 | * @len: new length | ||
| 2275 | * | ||
| 2276 | * This is exactly the same as pskb_trim except that it ensures the | ||
| 2277 | * checksum of received packets are still valid after the operation. | ||
| 2278 | */ | ||
| 2279 | |||
| 2280 | static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len) | ||
| 2281 | { | ||
| 2282 | if (likely(len >= skb->len)) | ||
| 2283 | return 0; | ||
| 2284 | if (skb->ip_summed == CHECKSUM_COMPLETE) | ||
| 2285 | skb->ip_summed = CHECKSUM_NONE; | ||
| 2286 | return __pskb_trim(skb, len); | ||
| 2287 | } | ||
| 2288 | |||
| 2266 | #define skb_queue_walk(queue, skb) \ | 2289 | #define skb_queue_walk(queue, skb) \ |
| 2267 | for (skb = (queue)->next; \ | 2290 | for (skb = (queue)->next; \ |
| 2268 | skb != (struct sk_buff *)(queue); \ | 2291 | skb != (struct sk_buff *)(queue); \ |
| @@ -2360,27 +2383,6 @@ __wsum __skb_checksum(const struct sk_buff *skb, int offset, int len, | |||
| 2360 | __wsum skb_checksum(const struct sk_buff *skb, int offset, int len, | 2383 | __wsum skb_checksum(const struct sk_buff *skb, int offset, int len, |
| 2361 | __wsum csum); | 2384 | __wsum csum); |
| 2362 | 2385 | ||
| 2363 | /** | ||
| 2364 | * pskb_trim_rcsum - trim received skb and update checksum | ||
| 2365 | * @skb: buffer to trim | ||
| 2366 | * @len: new length | ||
| 2367 | * | ||
| 2368 | * This is exactly the same as pskb_trim except that it ensures the | ||
| 2369 | * checksum of received packets are still valid after the operation. | ||
| 2370 | */ | ||
| 2371 | |||
| 2372 | static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len) | ||
| 2373 | { | ||
| 2374 | if (likely(len >= skb->len)) | ||
| 2375 | return 0; | ||
| 2376 | if (skb->ip_summed == CHECKSUM_COMPLETE) { | ||
| 2377 | __wsum adj = skb_checksum(skb, len, skb->len - len, 0); | ||
| 2378 | |||
| 2379 | skb->csum = csum_sub(skb->csum, adj); | ||
| 2380 | } | ||
| 2381 | return __pskb_trim(skb, len); | ||
| 2382 | } | ||
| 2383 | |||
| 2384 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, | 2386 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, |
| 2385 | int len, void *buffer) | 2387 | int len, void *buffer) |
| 2386 | { | 2388 | { |
| @@ -2529,6 +2531,10 @@ static inline void sw_tx_timestamp(struct sk_buff *skb) | |||
| 2529 | * Ethernet MAC Drivers should call this function in their hard_xmit() | 2531 | * Ethernet MAC Drivers should call this function in their hard_xmit() |
| 2530 | * function immediately before giving the sk_buff to the MAC hardware. | 2532 | * function immediately before giving the sk_buff to the MAC hardware. |
| 2531 | * | 2533 | * |
| 2534 | * Specifically, one should make absolutely sure that this function is | ||
| 2535 | * called before TX completion of this packet can trigger. Otherwise | ||
| 2536 | * the packet could potentially already be freed. | ||
| 2537 | * | ||
| 2532 | * @skb: A socket buffer. | 2538 | * @skb: A socket buffer. |
| 2533 | */ | 2539 | */ |
| 2534 | static inline void skb_tx_timestamp(struct sk_buff *skb) | 2540 | static inline void skb_tx_timestamp(struct sk_buff *skb) |
diff --git a/include/linux/slab.h b/include/linux/slab.h index c2bba248fa63..1e2f4fe12773 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
| @@ -388,10 +388,55 @@ static __always_inline void *kmalloc_large(size_t size, gfp_t flags) | |||
| 388 | /** | 388 | /** |
| 389 | * kmalloc - allocate memory | 389 | * kmalloc - allocate memory |
| 390 | * @size: how many bytes of memory are required. | 390 | * @size: how many bytes of memory are required. |
| 391 | * @flags: the type of memory to allocate (see kcalloc). | 391 | * @flags: the type of memory to allocate. |
| 392 | * | 392 | * |
| 393 | * kmalloc is the normal method of allocating memory | 393 | * kmalloc is the normal method of allocating memory |
| 394 | * for objects smaller than page size in the kernel. | 394 | * for objects smaller than page size in the kernel. |
| 395 | * | ||
| 396 | * The @flags argument may be one of: | ||
| 397 | * | ||
| 398 | * %GFP_USER - Allocate memory on behalf of user. May sleep. | ||
| 399 | * | ||
| 400 | * %GFP_KERNEL - Allocate normal kernel ram. May sleep. | ||
| 401 | * | ||
| 402 | * %GFP_ATOMIC - Allocation will not sleep. May use emergency pools. | ||
| 403 | * For example, use this inside interrupt handlers. | ||
| 404 | * | ||
| 405 | * %GFP_HIGHUSER - Allocate pages from high memory. | ||
| 406 | * | ||
| 407 | * %GFP_NOIO - Do not do any I/O at all while trying to get memory. | ||
| 408 | * | ||
| 409 | * %GFP_NOFS - Do not make any fs calls while trying to get memory. | ||
| 410 | * | ||
| 411 | * %GFP_NOWAIT - Allocation will not sleep. | ||
| 412 | * | ||
| 413 | * %GFP_THISNODE - Allocate node-local memory only. | ||
| 414 | * | ||
| 415 | * %GFP_DMA - Allocation suitable for DMA. | ||
| 416 | * Should only be used for kmalloc() caches. Otherwise, use a | ||
| 417 | * slab created with SLAB_DMA. | ||
| 418 | * | ||
| 419 | * Also it is possible to set different flags by OR'ing | ||
| 420 | * in one or more of the following additional @flags: | ||
| 421 | * | ||
| 422 | * %__GFP_COLD - Request cache-cold pages instead of | ||
| 423 | * trying to return cache-warm pages. | ||
| 424 | * | ||
| 425 | * %__GFP_HIGH - This allocation has high priority and may use emergency pools. | ||
| 426 | * | ||
| 427 | * %__GFP_NOFAIL - Indicate that this allocation is in no way allowed to fail | ||
| 428 | * (think twice before using). | ||
| 429 | * | ||
| 430 | * %__GFP_NORETRY - If memory is not immediately available, | ||
| 431 | * then give up at once. | ||
| 432 | * | ||
| 433 | * %__GFP_NOWARN - If allocation fails, don't issue any warnings. | ||
| 434 | * | ||
| 435 | * %__GFP_REPEAT - If allocation fails initially, try once more before failing. | ||
| 436 | * | ||
| 437 | * There are other flags available as well, but these are not intended | ||
| 438 | * for general use, and so are not documented here. For a full list of | ||
| 439 | * potential flags, always refer to linux/gfp.h. | ||
| 395 | */ | 440 | */ |
| 396 | static __always_inline void *kmalloc(size_t size, gfp_t flags) | 441 | static __always_inline void *kmalloc(size_t size, gfp_t flags) |
| 397 | { | 442 | { |
| @@ -502,61 +547,6 @@ int cache_show(struct kmem_cache *s, struct seq_file *m); | |||
| 502 | void print_slabinfo_header(struct seq_file *m); | 547 | void print_slabinfo_header(struct seq_file *m); |
| 503 | 548 | ||
| 504 | /** | 549 | /** |
| 505 | * kmalloc - allocate memory | ||
| 506 | * @size: how many bytes of memory are required. | ||
| 507 | * @flags: the type of memory to allocate. | ||
| 508 | * | ||
| 509 | * The @flags argument may be one of: | ||
| 510 | * | ||
| 511 | * %GFP_USER - Allocate memory on behalf of user. May sleep. | ||
| 512 | * | ||
| 513 | * %GFP_KERNEL - Allocate normal kernel ram. May sleep. | ||
| 514 | * | ||
| 515 | * %GFP_ATOMIC - Allocation will not sleep. May use emergency pools. | ||
| 516 | * For example, use this inside interrupt handlers. | ||
| 517 | * | ||
| 518 | * %GFP_HIGHUSER - Allocate pages from high memory. | ||
| 519 | * | ||
| 520 | * %GFP_NOIO - Do not do any I/O at all while trying to get memory. | ||
| 521 | * | ||
| 522 | * %GFP_NOFS - Do not make any fs calls while trying to get memory. | ||
| 523 | * | ||
| 524 | * %GFP_NOWAIT - Allocation will not sleep. | ||
| 525 | * | ||
| 526 | * %GFP_THISNODE - Allocate node-local memory only. | ||
| 527 | * | ||
| 528 | * %GFP_DMA - Allocation suitable for DMA. | ||
| 529 | * Should only be used for kmalloc() caches. Otherwise, use a | ||
| 530 | * slab created with SLAB_DMA. | ||
| 531 | * | ||
| 532 | * Also it is possible to set different flags by OR'ing | ||
| 533 | * in one or more of the following additional @flags: | ||
| 534 | * | ||
| 535 | * %__GFP_COLD - Request cache-cold pages instead of | ||
| 536 | * trying to return cache-warm pages. | ||
| 537 | * | ||
| 538 | * %__GFP_HIGH - This allocation has high priority and may use emergency pools. | ||
| 539 | * | ||
| 540 | * %__GFP_NOFAIL - Indicate that this allocation is in no way allowed to fail | ||
| 541 | * (think twice before using). | ||
| 542 | * | ||
| 543 | * %__GFP_NORETRY - If memory is not immediately available, | ||
| 544 | * then give up at once. | ||
| 545 | * | ||
| 546 | * %__GFP_NOWARN - If allocation fails, don't issue any warnings. | ||
| 547 | * | ||
| 548 | * %__GFP_REPEAT - If allocation fails initially, try once more before failing. | ||
| 549 | * | ||
| 550 | * There are other flags available as well, but these are not intended | ||
| 551 | * for general use, and so are not documented here. For a full list of | ||
| 552 | * potential flags, always refer to linux/gfp.h. | ||
| 553 | * | ||
| 554 | * kmalloc is the normal method of allocating memory | ||
| 555 | * in the kernel. | ||
| 556 | */ | ||
| 557 | static __always_inline void *kmalloc(size_t size, gfp_t flags); | ||
| 558 | |||
| 559 | /** | ||
| 560 | * kmalloc_array - allocate memory for an array. | 550 | * kmalloc_array - allocate memory for an array. |
| 561 | * @n: number of elements. | 551 | * @n: number of elements. |
| 562 | * @size: element size. | 552 | * @size: element size. |
diff --git a/include/linux/spi/74x164.h b/include/linux/spi/74x164.h deleted file mode 100644 index 0aa6acc73317..000000000000 --- a/include/linux/spi/74x164.h +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | #ifndef LINUX_SPI_74X164_H | ||
| 2 | #define LINUX_SPI_74X164_H | ||
| 3 | |||
| 4 | struct gen_74x164_chip_platform_data { | ||
| 5 | /* number assigned to the first GPIO */ | ||
| 6 | unsigned base; | ||
| 7 | }; | ||
| 8 | |||
| 9 | #endif | ||
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 75f34949d9ab..3f2867ff0ced 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
| @@ -130,6 +130,16 @@ do { \ | |||
| 130 | #define smp_mb__before_spinlock() smp_wmb() | 130 | #define smp_mb__before_spinlock() smp_wmb() |
| 131 | #endif | 131 | #endif |
| 132 | 132 | ||
| 133 | /* | ||
| 134 | * Place this after a lock-acquisition primitive to guarantee that | ||
| 135 | * an UNLOCK+LOCK pair act as a full barrier. This guarantee applies | ||
| 136 | * if the UNLOCK and LOCK are executed by the same CPU or if the | ||
| 137 | * UNLOCK and LOCK operate on the same lock variable. | ||
| 138 | */ | ||
| 139 | #ifndef smp_mb__after_unlock_lock | ||
| 140 | #define smp_mb__after_unlock_lock() do { } while (0) | ||
| 141 | #endif | ||
| 142 | |||
| 133 | /** | 143 | /** |
| 134 | * raw_spin_unlock_wait - wait until the spinlock gets unlocked | 144 | * raw_spin_unlock_wait - wait until the spinlock gets unlocked |
| 135 | * @lock: the spinlock in question. | 145 | * @lock: the spinlock in question. |
diff --git a/include/linux/spinlock_api_smp.h b/include/linux/spinlock_api_smp.h index bdb9993f0fda..42dfab89e740 100644 --- a/include/linux/spinlock_api_smp.h +++ b/include/linux/spinlock_api_smp.h | |||
| @@ -131,8 +131,7 @@ static inline void __raw_spin_lock_irq(raw_spinlock_t *lock) | |||
| 131 | 131 | ||
| 132 | static inline void __raw_spin_lock_bh(raw_spinlock_t *lock) | 132 | static inline void __raw_spin_lock_bh(raw_spinlock_t *lock) |
| 133 | { | 133 | { |
| 134 | local_bh_disable(); | 134 | __local_bh_disable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET); |
| 135 | preempt_disable(); | ||
| 136 | spin_acquire(&lock->dep_map, 0, 0, _RET_IP_); | 135 | spin_acquire(&lock->dep_map, 0, 0, _RET_IP_); |
| 137 | LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock); | 136 | LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock); |
| 138 | } | 137 | } |
| @@ -174,20 +173,17 @@ static inline void __raw_spin_unlock_bh(raw_spinlock_t *lock) | |||
| 174 | { | 173 | { |
| 175 | spin_release(&lock->dep_map, 1, _RET_IP_); | 174 | spin_release(&lock->dep_map, 1, _RET_IP_); |
| 176 | do_raw_spin_unlock(lock); | 175 | do_raw_spin_unlock(lock); |
| 177 | preempt_enable_no_resched(); | 176 | __local_bh_enable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET); |
| 178 | local_bh_enable_ip((unsigned long)__builtin_return_address(0)); | ||
| 179 | } | 177 | } |
| 180 | 178 | ||
| 181 | static inline int __raw_spin_trylock_bh(raw_spinlock_t *lock) | 179 | static inline int __raw_spin_trylock_bh(raw_spinlock_t *lock) |
| 182 | { | 180 | { |
| 183 | local_bh_disable(); | 181 | __local_bh_disable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET); |
| 184 | preempt_disable(); | ||
| 185 | if (do_raw_spin_trylock(lock)) { | 182 | if (do_raw_spin_trylock(lock)) { |
| 186 | spin_acquire(&lock->dep_map, 0, 1, _RET_IP_); | 183 | spin_acquire(&lock->dep_map, 0, 1, _RET_IP_); |
| 187 | return 1; | 184 | return 1; |
| 188 | } | 185 | } |
| 189 | preempt_enable_no_resched(); | 186 | __local_bh_enable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET); |
| 190 | local_bh_enable_ip((unsigned long)__builtin_return_address(0)); | ||
| 191 | return 0; | 187 | return 0; |
| 192 | } | 188 | } |
| 193 | 189 | ||
diff --git a/include/linux/spinlock_api_up.h b/include/linux/spinlock_api_up.h index af1f47229e70..d0d188861ad6 100644 --- a/include/linux/spinlock_api_up.h +++ b/include/linux/spinlock_api_up.h | |||
| @@ -24,11 +24,14 @@ | |||
| 24 | * flags straight, to suppress compiler warnings of unused lock | 24 | * flags straight, to suppress compiler warnings of unused lock |
| 25 | * variables, and to add the proper checker annotations: | 25 | * variables, and to add the proper checker annotations: |
| 26 | */ | 26 | */ |
| 27 | #define ___LOCK(lock) \ | ||
| 28 | do { __acquire(lock); (void)(lock); } while (0) | ||
| 29 | |||
| 27 | #define __LOCK(lock) \ | 30 | #define __LOCK(lock) \ |
| 28 | do { preempt_disable(); __acquire(lock); (void)(lock); } while (0) | 31 | do { preempt_disable(); ___LOCK(lock); } while (0) |
| 29 | 32 | ||
| 30 | #define __LOCK_BH(lock) \ | 33 | #define __LOCK_BH(lock) \ |
| 31 | do { local_bh_disable(); __LOCK(lock); } while (0) | 34 | do { __local_bh_disable_ip(_THIS_IP_, SOFTIRQ_LOCK_OFFSET); ___LOCK(lock); } while (0) |
| 32 | 35 | ||
| 33 | #define __LOCK_IRQ(lock) \ | 36 | #define __LOCK_IRQ(lock) \ |
| 34 | do { local_irq_disable(); __LOCK(lock); } while (0) | 37 | do { local_irq_disable(); __LOCK(lock); } while (0) |
| @@ -36,12 +39,15 @@ | |||
| 36 | #define __LOCK_IRQSAVE(lock, flags) \ | 39 | #define __LOCK_IRQSAVE(lock, flags) \ |
| 37 | do { local_irq_save(flags); __LOCK(lock); } while (0) | 40 | do { local_irq_save(flags); __LOCK(lock); } while (0) |
| 38 | 41 | ||
| 42 | #define ___UNLOCK(lock) \ | ||
| 43 | do { __release(lock); (void)(lock); } while (0) | ||
| 44 | |||
| 39 | #define __UNLOCK(lock) \ | 45 | #define __UNLOCK(lock) \ |
| 40 | do { preempt_enable(); __release(lock); (void)(lock); } while (0) | 46 | do { preempt_enable(); ___UNLOCK(lock); } while (0) |
| 41 | 47 | ||
| 42 | #define __UNLOCK_BH(lock) \ | 48 | #define __UNLOCK_BH(lock) \ |
| 43 | do { preempt_enable_no_resched(); local_bh_enable(); \ | 49 | do { __local_bh_enable_ip(_THIS_IP_, SOFTIRQ_LOCK_OFFSET); \ |
| 44 | __release(lock); (void)(lock); } while (0) | 50 | ___UNLOCK(lock); } while (0) |
| 45 | 51 | ||
| 46 | #define __UNLOCK_IRQ(lock) \ | 52 | #define __UNLOCK_IRQ(lock) \ |
| 47 | do { local_irq_enable(); __UNLOCK(lock); } while (0) | 53 | do { local_irq_enable(); __UNLOCK(lock); } while (0) |
diff --git a/include/linux/ssbi.h b/include/linux/ssbi.h index 44ef5da21470..bcbb642a7641 100644 --- a/include/linux/ssbi.h +++ b/include/linux/ssbi.h | |||
| @@ -17,22 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
| 19 | 19 | ||
| 20 | struct ssbi_slave_info { | 20 | int ssbi_write(struct device *dev, u16 addr, const u8 *buf, int len); |
| 21 | const char *name; | ||
| 22 | void *platform_data; | ||
| 23 | }; | ||
| 24 | |||
| 25 | enum ssbi_controller_type { | ||
| 26 | MSM_SBI_CTRL_SSBI = 0, | ||
| 27 | MSM_SBI_CTRL_SSBI2, | ||
| 28 | MSM_SBI_CTRL_PMIC_ARBITER, | ||
| 29 | }; | ||
| 30 | |||
| 31 | struct ssbi_platform_data { | ||
| 32 | struct ssbi_slave_info slave; | ||
| 33 | enum ssbi_controller_type controller_type; | ||
| 34 | }; | ||
| 35 | |||
| 36 | int ssbi_write(struct device *dev, u16 addr, u8 *buf, int len); | ||
| 37 | int ssbi_read(struct device *dev, u16 addr, u8 *buf, int len); | 21 | int ssbi_read(struct device *dev, u16 addr, u8 *buf, int len); |
| 22 | |||
| 38 | #endif | 23 | #endif |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 94273bbe6050..40ed9e9a77e5 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -38,6 +38,7 @@ struct rlimit; | |||
| 38 | struct rlimit64; | 38 | struct rlimit64; |
| 39 | struct rusage; | 39 | struct rusage; |
| 40 | struct sched_param; | 40 | struct sched_param; |
| 41 | struct sched_attr; | ||
| 41 | struct sel_arg_struct; | 42 | struct sel_arg_struct; |
| 42 | struct semaphore; | 43 | struct semaphore; |
| 43 | struct sembuf; | 44 | struct sembuf; |
| @@ -279,9 +280,14 @@ asmlinkage long sys_sched_setscheduler(pid_t pid, int policy, | |||
| 279 | struct sched_param __user *param); | 280 | struct sched_param __user *param); |
| 280 | asmlinkage long sys_sched_setparam(pid_t pid, | 281 | asmlinkage long sys_sched_setparam(pid_t pid, |
| 281 | struct sched_param __user *param); | 282 | struct sched_param __user *param); |
| 283 | asmlinkage long sys_sched_setattr(pid_t pid, | ||
| 284 | struct sched_attr __user *attr); | ||
| 282 | asmlinkage long sys_sched_getscheduler(pid_t pid); | 285 | asmlinkage long sys_sched_getscheduler(pid_t pid); |
| 283 | asmlinkage long sys_sched_getparam(pid_t pid, | 286 | asmlinkage long sys_sched_getparam(pid_t pid, |
| 284 | struct sched_param __user *param); | 287 | struct sched_param __user *param); |
| 288 | asmlinkage long sys_sched_getattr(pid_t pid, | ||
| 289 | struct sched_attr __user *attr, | ||
| 290 | unsigned int size); | ||
| 285 | asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len, | 291 | asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len, |
| 286 | unsigned long __user *user_mask_ptr); | 292 | unsigned long __user *user_mask_ptr); |
| 287 | asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len, | 293 | asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len, |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 6695040a0317..30b2ebee6439 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #ifndef _SYSFS_H_ | 12 | #ifndef _SYSFS_H_ |
| 13 | #define _SYSFS_H_ | 13 | #define _SYSFS_H_ |
| 14 | 14 | ||
| 15 | #include <linux/kernfs.h> | ||
| 15 | #include <linux/compiler.h> | 16 | #include <linux/compiler.h> |
| 16 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
| 17 | #include <linux/list.h> | 18 | #include <linux/list.h> |
| @@ -175,8 +176,6 @@ struct sysfs_ops { | |||
| 175 | ssize_t (*store)(struct kobject *, struct attribute *, const char *, size_t); | 176 | ssize_t (*store)(struct kobject *, struct attribute *, const char *, size_t); |
| 176 | }; | 177 | }; |
| 177 | 178 | ||
| 178 | struct sysfs_dirent; | ||
| 179 | |||
| 180 | #ifdef CONFIG_SYSFS | 179 | #ifdef CONFIG_SYSFS |
| 181 | 180 | ||
| 182 | int sysfs_schedule_callback(struct kobject *kobj, void (*func)(void *), | 181 | int sysfs_schedule_callback(struct kobject *kobj, void (*func)(void *), |
| @@ -244,12 +243,6 @@ void sysfs_remove_link_from_group(struct kobject *kobj, const char *group_name, | |||
| 244 | const char *link_name); | 243 | const char *link_name); |
| 245 | 244 | ||
| 246 | void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr); | 245 | void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr); |
| 247 | void sysfs_notify_dirent(struct sysfs_dirent *sd); | ||
| 248 | struct sysfs_dirent *sysfs_get_dirent_ns(struct sysfs_dirent *parent_sd, | ||
| 249 | const unsigned char *name, | ||
| 250 | const void *ns); | ||
| 251 | struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd); | ||
| 252 | void sysfs_put(struct sysfs_dirent *sd); | ||
| 253 | 246 | ||
| 254 | int __must_check sysfs_init(void); | 247 | int __must_check sysfs_init(void); |
| 255 | 248 | ||
| @@ -419,22 +412,6 @@ static inline void sysfs_notify(struct kobject *kobj, const char *dir, | |||
| 419 | const char *attr) | 412 | const char *attr) |
| 420 | { | 413 | { |
| 421 | } | 414 | } |
| 422 | static inline void sysfs_notify_dirent(struct sysfs_dirent *sd) | ||
| 423 | { | ||
| 424 | } | ||
| 425 | static inline struct sysfs_dirent * | ||
| 426 | sysfs_get_dirent_ns(struct sysfs_dirent *parent_sd, const unsigned char *name, | ||
| 427 | const void *ns) | ||
| 428 | { | ||
| 429 | return NULL; | ||
| 430 | } | ||
| 431 | static inline struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd) | ||
| 432 | { | ||
| 433 | return NULL; | ||
| 434 | } | ||
| 435 | static inline void sysfs_put(struct sysfs_dirent *sd) | ||
| 436 | { | ||
| 437 | } | ||
| 438 | 415 | ||
| 439 | static inline int __must_check sysfs_init(void) | 416 | static inline int __must_check sysfs_init(void) |
| 440 | { | 417 | { |
| @@ -461,10 +438,26 @@ static inline int sysfs_rename_link(struct kobject *kobj, struct kobject *target | |||
| 461 | return sysfs_rename_link_ns(kobj, target, old_name, new_name, NULL); | 438 | return sysfs_rename_link_ns(kobj, target, old_name, new_name, NULL); |
| 462 | } | 439 | } |
| 463 | 440 | ||
| 464 | static inline struct sysfs_dirent * | 441 | static inline void sysfs_notify_dirent(struct kernfs_node *kn) |
| 465 | sysfs_get_dirent(struct sysfs_dirent *parent_sd, const unsigned char *name) | 442 | { |
| 443 | kernfs_notify(kn); | ||
| 444 | } | ||
| 445 | |||
| 446 | static inline struct kernfs_node *sysfs_get_dirent(struct kernfs_node *parent, | ||
| 447 | const unsigned char *name) | ||
| 448 | { | ||
| 449 | return kernfs_find_and_get(parent, name); | ||
| 450 | } | ||
| 451 | |||
| 452 | static inline struct kernfs_node *sysfs_get(struct kernfs_node *kn) | ||
| 453 | { | ||
| 454 | kernfs_get(kn); | ||
| 455 | return kn; | ||
| 456 | } | ||
| 457 | |||
| 458 | static inline void sysfs_put(struct kernfs_node *kn) | ||
| 466 | { | 459 | { |
| 467 | return sysfs_get_dirent_ns(parent_sd, name, NULL); | 460 | kernfs_put(kn); |
| 468 | } | 461 | } |
| 469 | 462 | ||
| 470 | #endif /* _SYSFS_H_ */ | 463 | #endif /* _SYSFS_H_ */ |
diff --git a/include/linux/tegra-powergate.h b/include/linux/tegra-powergate.h index c98cfa406952..fd4498329c7c 100644 --- a/include/linux/tegra-powergate.h +++ b/include/linux/tegra-powergate.h | |||
| @@ -45,6 +45,7 @@ struct clk; | |||
| 45 | 45 | ||
| 46 | #define TEGRA_POWERGATE_3D0 TEGRA_POWERGATE_3D | 46 | #define TEGRA_POWERGATE_3D0 TEGRA_POWERGATE_3D |
| 47 | 47 | ||
| 48 | #ifdef CONFIG_ARCH_TEGRA | ||
| 48 | int tegra_powergate_is_powered(int id); | 49 | int tegra_powergate_is_powered(int id); |
| 49 | int tegra_powergate_power_on(int id); | 50 | int tegra_powergate_power_on(int id); |
| 50 | int tegra_powergate_power_off(int id); | 51 | int tegra_powergate_power_off(int id); |
| @@ -52,5 +53,31 @@ int tegra_powergate_remove_clamping(int id); | |||
| 52 | 53 | ||
| 53 | /* Must be called with clk disabled, and returns with clk enabled */ | 54 | /* Must be called with clk disabled, and returns with clk enabled */ |
| 54 | int tegra_powergate_sequence_power_up(int id, struct clk *clk); | 55 | int tegra_powergate_sequence_power_up(int id, struct clk *clk); |
| 56 | #else | ||
| 57 | static inline int tegra_powergate_is_powered(int id) | ||
| 58 | { | ||
| 59 | return -ENOSYS; | ||
| 60 | } | ||
| 61 | |||
| 62 | static inline int tegra_powergate_power_on(int id) | ||
| 63 | { | ||
| 64 | return -ENOSYS; | ||
| 65 | } | ||
| 66 | |||
| 67 | static inline int tegra_powergate_power_off(int id) | ||
| 68 | { | ||
| 69 | return -ENOSYS; | ||
| 70 | } | ||
| 71 | |||
| 72 | static inline int tegra_powergate_remove_clamping(int id) | ||
| 73 | { | ||
| 74 | return -ENOSYS; | ||
| 75 | } | ||
| 76 | |||
| 77 | static inline int tegra_powergate_sequence_power_up(int id, struct clk *clk) | ||
| 78 | { | ||
| 79 | return -ENOSYS; | ||
| 80 | } | ||
| 81 | #endif | ||
| 55 | 82 | ||
| 56 | #endif /* _MACH_TEGRA_POWERGATE_H_ */ | 83 | #endif /* _MACH_TEGRA_POWERGATE_H_ */ |
diff --git a/include/linux/tick.h b/include/linux/tick.h index 5128d33bbb39..0175d8663b6c 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h | |||
| @@ -104,7 +104,7 @@ extern struct cpumask *tick_get_broadcast_oneshot_mask(void); | |||
| 104 | extern void tick_clock_notify(void); | 104 | extern void tick_clock_notify(void); |
| 105 | extern int tick_check_oneshot_change(int allow_nohz); | 105 | extern int tick_check_oneshot_change(int allow_nohz); |
| 106 | extern struct tick_sched *tick_get_tick_sched(int cpu); | 106 | extern struct tick_sched *tick_get_tick_sched(int cpu); |
| 107 | extern void tick_check_idle(int cpu); | 107 | extern void tick_check_idle(void); |
| 108 | extern int tick_oneshot_mode_active(void); | 108 | extern int tick_oneshot_mode_active(void); |
| 109 | # ifndef arch_needs_cpu | 109 | # ifndef arch_needs_cpu |
| 110 | # define arch_needs_cpu(cpu) (0) | 110 | # define arch_needs_cpu(cpu) (0) |
| @@ -112,7 +112,7 @@ extern int tick_oneshot_mode_active(void); | |||
| 112 | # else | 112 | # else |
| 113 | static inline void tick_clock_notify(void) { } | 113 | static inline void tick_clock_notify(void) { } |
| 114 | static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } | 114 | static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } |
| 115 | static inline void tick_check_idle(int cpu) { } | 115 | static inline void tick_check_idle(void) { } |
| 116 | static inline int tick_oneshot_mode_active(void) { return 0; } | 116 | static inline int tick_oneshot_mode_active(void) { return 0; } |
| 117 | # endif | 117 | # endif |
| 118 | 118 | ||
| @@ -121,7 +121,7 @@ static inline void tick_init(void) { } | |||
| 121 | static inline void tick_cancel_sched_timer(int cpu) { } | 121 | static inline void tick_cancel_sched_timer(int cpu) { } |
| 122 | static inline void tick_clock_notify(void) { } | 122 | static inline void tick_clock_notify(void) { } |
| 123 | static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } | 123 | static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } |
| 124 | static inline void tick_check_idle(int cpu) { } | 124 | static inline void tick_check_idle(void) { } |
| 125 | static inline int tick_oneshot_mode_active(void) { return 0; } | 125 | static inline int tick_oneshot_mode_active(void) { return 0; } |
| 126 | #endif /* !CONFIG_GENERIC_CLOCKEVENTS */ | 126 | #endif /* !CONFIG_GENERIC_CLOCKEVENTS */ |
| 127 | 127 | ||
| @@ -165,7 +165,7 @@ extern cpumask_var_t tick_nohz_full_mask; | |||
| 165 | 165 | ||
| 166 | static inline bool tick_nohz_full_enabled(void) | 166 | static inline bool tick_nohz_full_enabled(void) |
| 167 | { | 167 | { |
| 168 | if (!static_key_false(&context_tracking_enabled)) | 168 | if (!context_tracking_is_enabled()) |
| 169 | return false; | 169 | return false; |
| 170 | 170 | ||
| 171 | return tick_nohz_full_running; | 171 | return tick_nohz_full_running; |
diff --git a/include/linux/tpm.h b/include/linux/tpm.h index 9a9051bb1a03..fff1d0976f80 100644 --- a/include/linux/tpm.h +++ b/include/linux/tpm.h | |||
| @@ -29,6 +29,18 @@ | |||
| 29 | */ | 29 | */ |
| 30 | #define TPM_ANY_NUM 0xFFFF | 30 | #define TPM_ANY_NUM 0xFFFF |
| 31 | 31 | ||
| 32 | struct tpm_chip; | ||
| 33 | |||
| 34 | struct tpm_class_ops { | ||
| 35 | const u8 req_complete_mask; | ||
| 36 | const u8 req_complete_val; | ||
| 37 | bool (*req_canceled)(struct tpm_chip *chip, u8 status); | ||
| 38 | int (*recv) (struct tpm_chip *chip, u8 *buf, size_t len); | ||
| 39 | int (*send) (struct tpm_chip *chip, u8 *buf, size_t len); | ||
| 40 | void (*cancel) (struct tpm_chip *chip); | ||
| 41 | u8 (*status) (struct tpm_chip *chip); | ||
| 42 | }; | ||
| 43 | |||
| 32 | #if defined(CONFIG_TCG_TPM) || defined(CONFIG_TCG_TPM_MODULE) | 44 | #if defined(CONFIG_TCG_TPM) || defined(CONFIG_TCG_TPM_MODULE) |
| 33 | 45 | ||
| 34 | extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf); | 46 | extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf); |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index ebeab360d851..f16dc0a40049 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
| @@ -267,6 +267,8 @@ static inline void tracepoint_synchronize_unregister(void) | |||
| 267 | 267 | ||
| 268 | #define TRACE_EVENT_FLAGS(event, flag) | 268 | #define TRACE_EVENT_FLAGS(event, flag) |
| 269 | 269 | ||
| 270 | #define TRACE_EVENT_PERF_PERM(event, expr...) | ||
| 271 | |||
| 270 | #endif /* DECLARE_TRACE */ | 272 | #endif /* DECLARE_TRACE */ |
| 271 | 273 | ||
| 272 | #ifndef TRACE_EVENT | 274 | #ifndef TRACE_EVENT |
| @@ -399,4 +401,6 @@ static inline void tracepoint_synchronize_unregister(void) | |||
| 399 | 401 | ||
| 400 | #define TRACE_EVENT_FLAGS(event, flag) | 402 | #define TRACE_EVENT_FLAGS(event, flag) |
| 401 | 403 | ||
| 404 | #define TRACE_EVENT_PERF_PERM(event, expr...) | ||
| 405 | |||
| 402 | #endif /* ifdef TRACE_EVENT (see note above) */ | 406 | #endif /* ifdef TRACE_EVENT (see note above) */ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 97d660ed70c1..90b4fdc8a61f 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -39,10 +39,14 @@ struct tty_buffer { | |||
| 39 | int size; | 39 | int size; |
| 40 | int commit; | 40 | int commit; |
| 41 | int read; | 41 | int read; |
| 42 | int flags; | ||
| 42 | /* Data points here */ | 43 | /* Data points here */ |
| 43 | unsigned long data[0]; | 44 | unsigned long data[0]; |
| 44 | }; | 45 | }; |
| 45 | 46 | ||
| 47 | /* Values for .flags field of tty_buffer */ | ||
| 48 | #define TTYB_NORMAL 1 /* buffer has no flags buffer */ | ||
| 49 | |||
| 46 | static inline unsigned char *char_buf_ptr(struct tty_buffer *b, int ofs) | 50 | static inline unsigned char *char_buf_ptr(struct tty_buffer *b, int ofs) |
| 47 | { | 51 | { |
| 48 | return ((unsigned char *)b->data) + ofs; | 52 | return ((unsigned char *)b->data) + ofs; |
| @@ -60,7 +64,8 @@ struct tty_bufhead { | |||
| 60 | atomic_t priority; | 64 | atomic_t priority; |
| 61 | struct tty_buffer sentinel; | 65 | struct tty_buffer sentinel; |
| 62 | struct llist_head free; /* Free queue head */ | 66 | struct llist_head free; /* Free queue head */ |
| 63 | atomic_t memory_used; /* In-use buffers excluding free list */ | 67 | atomic_t mem_used; /* In-use buffers excluding free list */ |
| 68 | int mem_limit; | ||
| 64 | struct tty_buffer *tail; /* Active buffer */ | 69 | struct tty_buffer *tail; /* Active buffer */ |
| 65 | }; | 70 | }; |
| 66 | /* | 71 | /* |
| @@ -137,6 +142,7 @@ struct tty_bufhead { | |||
| 137 | #define C_CLOCAL(tty) _C_FLAG((tty), CLOCAL) | 142 | #define C_CLOCAL(tty) _C_FLAG((tty), CLOCAL) |
| 138 | #define C_CIBAUD(tty) _C_FLAG((tty), CIBAUD) | 143 | #define C_CIBAUD(tty) _C_FLAG((tty), CIBAUD) |
| 139 | #define C_CRTSCTS(tty) _C_FLAG((tty), CRTSCTS) | 144 | #define C_CRTSCTS(tty) _C_FLAG((tty), CRTSCTS) |
| 145 | #define C_CMSPAR(tty) _C_FLAG((tty), CMSPAR) | ||
| 140 | 146 | ||
| 141 | #define L_ISIG(tty) _L_FLAG((tty), ISIG) | 147 | #define L_ISIG(tty) _L_FLAG((tty), ISIG) |
| 142 | #define L_ICANON(tty) _L_FLAG((tty), ICANON) | 148 | #define L_ICANON(tty) _L_FLAG((tty), ICANON) |
| @@ -422,7 +428,6 @@ extern int is_ignored(int sig); | |||
| 422 | extern int tty_signal(int sig, struct tty_struct *tty); | 428 | extern int tty_signal(int sig, struct tty_struct *tty); |
| 423 | extern void tty_hangup(struct tty_struct *tty); | 429 | extern void tty_hangup(struct tty_struct *tty); |
| 424 | extern void tty_vhangup(struct tty_struct *tty); | 430 | extern void tty_vhangup(struct tty_struct *tty); |
| 425 | extern void tty_vhangup_locked(struct tty_struct *tty); | ||
| 426 | extern void tty_unhangup(struct file *filp); | 431 | extern void tty_unhangup(struct file *filp); |
| 427 | extern int tty_hung_up_p(struct file *filp); | 432 | extern int tty_hung_up_p(struct file *filp); |
| 428 | extern void do_SAK(struct tty_struct *tty); | 433 | extern void do_SAK(struct tty_struct *tty); |
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index 21ddd7d9ea1f..c28dd523f96e 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef _LINUX_TTY_FLIP_H | 1 | #ifndef _LINUX_TTY_FLIP_H |
| 2 | #define _LINUX_TTY_FLIP_H | 2 | #define _LINUX_TTY_FLIP_H |
| 3 | 3 | ||
| 4 | extern int tty_buffer_set_limit(struct tty_port *port, int limit); | ||
| 4 | extern int tty_buffer_space_avail(struct tty_port *port); | 5 | extern int tty_buffer_space_avail(struct tty_port *port); |
| 5 | extern int tty_buffer_request_room(struct tty_port *port, size_t size); | 6 | extern int tty_buffer_request_room(struct tty_port *port, size_t size); |
| 6 | extern int tty_insert_flip_string_flags(struct tty_port *port, | 7 | extern int tty_insert_flip_string_flags(struct tty_port *port, |
| @@ -9,8 +10,6 @@ extern int tty_insert_flip_string_fixed_flag(struct tty_port *port, | |||
| 9 | const unsigned char *chars, char flag, size_t size); | 10 | const unsigned char *chars, char flag, size_t size); |
| 10 | extern int tty_prepare_flip_string(struct tty_port *port, | 11 | extern int tty_prepare_flip_string(struct tty_port *port, |
| 11 | unsigned char **chars, size_t size); | 12 | unsigned char **chars, size_t size); |
| 12 | extern int tty_prepare_flip_string_flags(struct tty_port *port, | ||
| 13 | unsigned char **chars, char **flags, size_t size); | ||
| 14 | extern void tty_flip_buffer_push(struct tty_port *port); | 13 | extern void tty_flip_buffer_push(struct tty_port *port); |
| 15 | void tty_schedule_flip(struct tty_port *port); | 14 | void tty_schedule_flip(struct tty_port *port); |
| 16 | 15 | ||
| @@ -18,8 +17,12 @@ static inline int tty_insert_flip_char(struct tty_port *port, | |||
| 18 | unsigned char ch, char flag) | 17 | unsigned char ch, char flag) |
| 19 | { | 18 | { |
| 20 | struct tty_buffer *tb = port->buf.tail; | 19 | struct tty_buffer *tb = port->buf.tail; |
| 21 | if (tb && tb->used < tb->size) { | 20 | int change; |
| 22 | *flag_buf_ptr(tb, tb->used) = flag; | 21 | |
| 22 | change = (tb->flags & TTYB_NORMAL) && (flag != TTY_NORMAL); | ||
| 23 | if (!change && tb->used < tb->size) { | ||
| 24 | if (~tb->flags & TTYB_NORMAL) | ||
| 25 | *flag_buf_ptr(tb, tb->used) = flag; | ||
| 23 | *char_buf_ptr(tb, tb->used++) = ch; | 26 | *char_buf_ptr(tb, tb->used++) = ch; |
| 24 | return 1; | 27 | return 1; |
| 25 | } | 28 | } |
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index f15c898ff462..b8347c207cb8 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h | |||
| @@ -84,7 +84,8 @@ | |||
| 84 | * processing. <cp> is a pointer to the buffer of input | 84 | * processing. <cp> is a pointer to the buffer of input |
| 85 | * character received by the device. <fp> is a pointer to a | 85 | * character received by the device. <fp> is a pointer to a |
| 86 | * pointer of flag bytes which indicate whether a character was | 86 | * pointer of flag bytes which indicate whether a character was |
| 87 | * received with a parity error, etc. | 87 | * received with a parity error, etc. <fp> may be NULL to indicate |
| 88 | * all data received is TTY_NORMAL. | ||
| 88 | * | 89 | * |
| 89 | * void (*write_wakeup)(struct tty_struct *); | 90 | * void (*write_wakeup)(struct tty_struct *); |
| 90 | * | 91 | * |
| @@ -118,7 +119,8 @@ | |||
| 118 | * processing. <cp> is a pointer to the buffer of input | 119 | * processing. <cp> is a pointer to the buffer of input |
| 119 | * character received by the device. <fp> is a pointer to a | 120 | * character received by the device. <fp> is a pointer to a |
| 120 | * pointer of flag bytes which indicate whether a character was | 121 | * pointer of flag bytes which indicate whether a character was |
| 121 | * received with a parity error, etc. | 122 | * received with a parity error, etc. <fp> may be NULL to indicate |
| 123 | * all data received is TTY_NORMAL. | ||
| 122 | * If assigned, prefer this function for automatic flow control. | 124 | * If assigned, prefer this function for automatic flow control. |
| 123 | */ | 125 | */ |
| 124 | 126 | ||
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h index 9d8cf056e661..ecd3319dac33 100644 --- a/include/linux/uaccess.h +++ b/include/linux/uaccess.h | |||
| @@ -25,13 +25,16 @@ static inline void pagefault_disable(void) | |||
| 25 | 25 | ||
| 26 | static inline void pagefault_enable(void) | 26 | static inline void pagefault_enable(void) |
| 27 | { | 27 | { |
| 28 | #ifndef CONFIG_PREEMPT | ||
| 28 | /* | 29 | /* |
| 29 | * make sure to issue those last loads/stores before enabling | 30 | * make sure to issue those last loads/stores before enabling |
| 30 | * the pagefault handler again. | 31 | * the pagefault handler again. |
| 31 | */ | 32 | */ |
| 32 | barrier(); | 33 | barrier(); |
| 33 | preempt_count_dec(); | 34 | preempt_count_dec(); |
| 34 | preempt_check_resched(); | 35 | #else |
| 36 | preempt_enable(); | ||
| 37 | #endif | ||
| 35 | } | 38 | } |
| 36 | 39 | ||
| 37 | #ifndef ARCH_HAS_NOCACHE_UACCESS | 40 | #ifndef ARCH_HAS_NOCACHE_UACCESS |
diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h index 319eae70fe84..e32251e00e62 100644 --- a/include/linux/uprobes.h +++ b/include/linux/uprobes.h | |||
| @@ -26,16 +26,13 @@ | |||
| 26 | 26 | ||
| 27 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
| 28 | #include <linux/rbtree.h> | 28 | #include <linux/rbtree.h> |
| 29 | #include <linux/types.h> | ||
| 29 | 30 | ||
| 30 | struct vm_area_struct; | 31 | struct vm_area_struct; |
| 31 | struct mm_struct; | 32 | struct mm_struct; |
| 32 | struct inode; | 33 | struct inode; |
| 33 | struct notifier_block; | 34 | struct notifier_block; |
| 34 | 35 | ||
| 35 | #ifdef CONFIG_ARCH_SUPPORTS_UPROBES | ||
| 36 | # include <asm/uprobes.h> | ||
| 37 | #endif | ||
| 38 | |||
| 39 | #define UPROBE_HANDLER_REMOVE 1 | 36 | #define UPROBE_HANDLER_REMOVE 1 |
| 40 | #define UPROBE_HANDLER_MASK 1 | 37 | #define UPROBE_HANDLER_MASK 1 |
| 41 | 38 | ||
| @@ -60,6 +57,8 @@ struct uprobe_consumer { | |||
| 60 | }; | 57 | }; |
| 61 | 58 | ||
| 62 | #ifdef CONFIG_UPROBES | 59 | #ifdef CONFIG_UPROBES |
| 60 | #include <asm/uprobes.h> | ||
| 61 | |||
| 63 | enum uprobe_task_state { | 62 | enum uprobe_task_state { |
| 64 | UTASK_RUNNING, | 63 | UTASK_RUNNING, |
| 65 | UTASK_SSTEP, | 64 | UTASK_SSTEP, |
| @@ -72,35 +71,28 @@ enum uprobe_task_state { | |||
| 72 | */ | 71 | */ |
| 73 | struct uprobe_task { | 72 | struct uprobe_task { |
| 74 | enum uprobe_task_state state; | 73 | enum uprobe_task_state state; |
| 75 | struct arch_uprobe_task autask; | ||
| 76 | 74 | ||
| 77 | struct return_instance *return_instances; | 75 | union { |
| 78 | unsigned int depth; | 76 | struct { |
| 79 | struct uprobe *active_uprobe; | 77 | struct arch_uprobe_task autask; |
| 78 | unsigned long vaddr; | ||
| 79 | }; | ||
| 80 | 80 | ||
| 81 | struct { | ||
| 82 | struct callback_head dup_xol_work; | ||
| 83 | unsigned long dup_xol_addr; | ||
| 84 | }; | ||
| 85 | }; | ||
| 86 | |||
| 87 | struct uprobe *active_uprobe; | ||
| 81 | unsigned long xol_vaddr; | 88 | unsigned long xol_vaddr; |
| 82 | unsigned long vaddr; | ||
| 83 | }; | ||
| 84 | 89 | ||
| 85 | /* | 90 | struct return_instance *return_instances; |
| 86 | * On a breakpoint hit, thread contests for a slot. It frees the | 91 | unsigned int depth; |
| 87 | * slot after singlestep. Currently a fixed number of slots are | ||
| 88 | * allocated. | ||
| 89 | */ | ||
| 90 | struct xol_area { | ||
| 91 | wait_queue_head_t wq; /* if all slots are busy */ | ||
| 92 | atomic_t slot_count; /* number of in-use slots */ | ||
| 93 | unsigned long *bitmap; /* 0 = free slot */ | ||
| 94 | struct page *page; | ||
| 95 | |||
| 96 | /* | ||
| 97 | * We keep the vma's vm_start rather than a pointer to the vma | ||
| 98 | * itself. The probed process or a naughty kernel module could make | ||
| 99 | * the vma go away, and we must handle that reasonably gracefully. | ||
| 100 | */ | ||
| 101 | unsigned long vaddr; /* Page(s) of instruction slots */ | ||
| 102 | }; | 92 | }; |
| 103 | 93 | ||
| 94 | struct xol_area; | ||
| 95 | |||
| 104 | struct uprobes_state { | 96 | struct uprobes_state { |
| 105 | struct xol_area *xol_area; | 97 | struct xol_area *xol_area; |
| 106 | }; | 98 | }; |
| @@ -109,6 +101,7 @@ extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsign | |||
| 109 | extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); | 101 | extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); |
| 110 | extern bool __weak is_swbp_insn(uprobe_opcode_t *insn); | 102 | extern bool __weak is_swbp_insn(uprobe_opcode_t *insn); |
| 111 | extern bool __weak is_trap_insn(uprobe_opcode_t *insn); | 103 | extern bool __weak is_trap_insn(uprobe_opcode_t *insn); |
| 104 | extern unsigned long __weak uprobe_get_swbp_addr(struct pt_regs *regs); | ||
| 112 | extern int uprobe_write_opcode(struct mm_struct *mm, unsigned long vaddr, uprobe_opcode_t); | 105 | extern int uprobe_write_opcode(struct mm_struct *mm, unsigned long vaddr, uprobe_opcode_t); |
| 113 | extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); | 106 | extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); |
| 114 | extern int uprobe_apply(struct inode *inode, loff_t offset, struct uprobe_consumer *uc, bool); | 107 | extern int uprobe_apply(struct inode *inode, loff_t offset, struct uprobe_consumer *uc, bool); |
| @@ -120,7 +113,6 @@ extern void uprobe_end_dup_mmap(void); | |||
| 120 | extern void uprobe_dup_mmap(struct mm_struct *oldmm, struct mm_struct *newmm); | 113 | extern void uprobe_dup_mmap(struct mm_struct *oldmm, struct mm_struct *newmm); |
| 121 | extern void uprobe_free_utask(struct task_struct *t); | 114 | extern void uprobe_free_utask(struct task_struct *t); |
| 122 | extern void uprobe_copy_process(struct task_struct *t, unsigned long flags); | 115 | extern void uprobe_copy_process(struct task_struct *t, unsigned long flags); |
| 123 | extern unsigned long __weak uprobe_get_swbp_addr(struct pt_regs *regs); | ||
| 124 | extern int uprobe_post_sstep_notifier(struct pt_regs *regs); | 116 | extern int uprobe_post_sstep_notifier(struct pt_regs *regs); |
| 125 | extern int uprobe_pre_sstep_notifier(struct pt_regs *regs); | 117 | extern int uprobe_pre_sstep_notifier(struct pt_regs *regs); |
| 126 | extern void uprobe_notify_resume(struct pt_regs *regs); | 118 | extern void uprobe_notify_resume(struct pt_regs *regs); |
| @@ -176,10 +168,6 @@ static inline bool uprobe_deny_signal(void) | |||
| 176 | { | 168 | { |
| 177 | return false; | 169 | return false; |
| 178 | } | 170 | } |
| 179 | static inline unsigned long uprobe_get_swbp_addr(struct pt_regs *regs) | ||
| 180 | { | ||
| 181 | return 0; | ||
| 182 | } | ||
| 183 | static inline void uprobe_free_utask(struct task_struct *t) | 171 | static inline void uprobe_free_utask(struct task_struct *t) |
| 184 | { | 172 | { |
| 185 | } | 173 | } |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 7454865ad148..c716da18c668 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -965,6 +965,7 @@ struct usb_dynid { | |||
| 965 | }; | 965 | }; |
| 966 | 966 | ||
| 967 | extern ssize_t usb_store_new_id(struct usb_dynids *dynids, | 967 | extern ssize_t usb_store_new_id(struct usb_dynids *dynids, |
| 968 | const struct usb_device_id *id_table, | ||
| 968 | struct device_driver *driver, | 969 | struct device_driver *driver, |
| 969 | const char *buf, size_t count); | 970 | const char *buf, size_t count); |
| 970 | 971 | ||
| @@ -1264,6 +1265,8 @@ typedef void (*usb_complete_t)(struct urb *); | |||
| 1264 | * @sg: scatter gather buffer list, the buffer size of each element in | 1265 | * @sg: scatter gather buffer list, the buffer size of each element in |
| 1265 | * the list (except the last) must be divisible by the endpoint's | 1266 | * the list (except the last) must be divisible by the endpoint's |
| 1266 | * max packet size if no_sg_constraint isn't set in 'struct usb_bus' | 1267 | * max packet size if no_sg_constraint isn't set in 'struct usb_bus' |
| 1268 | * (FIXME: scatter-gather under xHCI is broken for periodic transfers. | ||
| 1269 | * Do not use urb->sg for interrupt endpoints for now, only bulk.) | ||
| 1267 | * @num_mapped_sgs: (internal) number of mapped sg entries | 1270 | * @num_mapped_sgs: (internal) number of mapped sg entries |
| 1268 | * @num_sgs: number of entries in the sg list | 1271 | * @num_sgs: number of entries in the sg list |
| 1269 | * @transfer_buffer_length: How big is transfer_buffer. The transfer may | 1272 | * @transfer_buffer_length: How big is transfer_buffer. The transfer may |
diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h index 7d399671a566..708bd119627f 100644 --- a/include/linux/usb/chipidea.h +++ b/include/linux/usb/chipidea.h | |||
| @@ -24,6 +24,7 @@ struct ci_hdrc_platform_data { | |||
| 24 | * but otg is not supported (no register otgsc). | 24 | * but otg is not supported (no register otgsc). |
| 25 | */ | 25 | */ |
| 26 | #define CI_HDRC_DUAL_ROLE_NOT_OTG BIT(4) | 26 | #define CI_HDRC_DUAL_ROLE_NOT_OTG BIT(4) |
| 27 | #define CI_HDRC_IMX28_WRITE_FIX BIT(5) | ||
| 27 | enum usb_dr_mode dr_mode; | 28 | enum usb_dr_mode dr_mode; |
| 28 | #define CI_HDRC_CONTROLLER_RESET_EVENT 0 | 29 | #define CI_HDRC_CONTROLLER_RESET_EVENT 0 |
| 29 | #define CI_HDRC_CONTROLLER_STOPPED_EVENT 1 | 30 | #define CI_HDRC_CONTROLLER_STOPPED_EVENT 1 |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 5e61589fc166..dba63f53906c 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
| @@ -468,6 +468,8 @@ struct usb_function_instance { | |||
| 468 | struct config_group group; | 468 | struct config_group group; |
| 469 | struct list_head cfs_list; | 469 | struct list_head cfs_list; |
| 470 | struct usb_function_driver *fd; | 470 | struct usb_function_driver *fd; |
| 471 | int (*set_inst_name)(struct usb_function_instance *inst, | ||
| 472 | const char *name); | ||
| 471 | void (*free_func_inst)(struct usb_function_instance *inst); | 473 | void (*free_func_inst)(struct usb_function_instance *inst); |
| 472 | }; | 474 | }; |
| 473 | 475 | ||
diff --git a/include/linux/usb/functionfs.h b/include/linux/usb/functionfs.h index 65d0a88dbc67..71190663f1ee 100644 --- a/include/linux/usb/functionfs.h +++ b/include/linux/usb/functionfs.h | |||
| @@ -3,34 +3,4 @@ | |||
| 3 | 3 | ||
| 4 | #include <uapi/linux/usb/functionfs.h> | 4 | #include <uapi/linux/usb/functionfs.h> |
| 5 | 5 | ||
| 6 | |||
| 7 | struct ffs_data; | ||
| 8 | struct usb_composite_dev; | ||
| 9 | struct usb_configuration; | ||
| 10 | |||
| 11 | |||
| 12 | static int functionfs_init(void) __attribute__((warn_unused_result)); | ||
| 13 | static void functionfs_cleanup(void); | ||
| 14 | |||
| 15 | static int functionfs_bind(struct ffs_data *ffs, struct usb_composite_dev *cdev) | ||
| 16 | __attribute__((warn_unused_result, nonnull)); | ||
| 17 | static void functionfs_unbind(struct ffs_data *ffs) | ||
| 18 | __attribute__((nonnull)); | ||
| 19 | |||
| 20 | static int functionfs_bind_config(struct usb_composite_dev *cdev, | ||
| 21 | struct usb_configuration *c, | ||
| 22 | struct ffs_data *ffs) | ||
| 23 | __attribute__((warn_unused_result, nonnull)); | ||
| 24 | |||
| 25 | |||
| 26 | static int functionfs_ready_callback(struct ffs_data *ffs) | ||
| 27 | __attribute__((warn_unused_result, nonnull)); | ||
| 28 | static void functionfs_closed_callback(struct ffs_data *ffs) | ||
| 29 | __attribute__((nonnull)); | ||
| 30 | static void *functionfs_acquire_dev_callback(const char *dev_name) | ||
| 31 | __attribute__((warn_unused_result, nonnull)); | ||
| 32 | static void functionfs_release_dev_callback(struct ffs_data *ffs_data) | ||
| 33 | __attribute__((nonnull)); | ||
| 34 | |||
| 35 | |||
| 36 | #endif | 6 | #endif |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 942ef5e053bf..c3a61853cd13 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
| @@ -148,6 +148,9 @@ struct usb_ep_ops { | |||
| 148 | * @maxpacket:The maximum packet size used on this endpoint. The initial | 148 | * @maxpacket:The maximum packet size used on this endpoint. The initial |
| 149 | * value can sometimes be reduced (hardware allowing), according to | 149 | * value can sometimes be reduced (hardware allowing), according to |
| 150 | * the endpoint descriptor used to configure the endpoint. | 150 | * the endpoint descriptor used to configure the endpoint. |
| 151 | * @maxpacket_limit:The maximum packet size value which can be handled by this | ||
| 152 | * endpoint. It's set once by UDC driver when endpoint is initialized, and | ||
| 153 | * should not be changed. Should not be confused with maxpacket. | ||
| 151 | * @max_streams: The maximum number of streams supported | 154 | * @max_streams: The maximum number of streams supported |
| 152 | * by this EP (0 - 16, actual number is 2^n) | 155 | * by this EP (0 - 16, actual number is 2^n) |
| 153 | * @mult: multiplier, 'mult' value for SS Isoc EPs | 156 | * @mult: multiplier, 'mult' value for SS Isoc EPs |
| @@ -171,6 +174,7 @@ struct usb_ep { | |||
| 171 | const struct usb_ep_ops *ops; | 174 | const struct usb_ep_ops *ops; |
| 172 | struct list_head ep_list; | 175 | struct list_head ep_list; |
| 173 | unsigned maxpacket:16; | 176 | unsigned maxpacket:16; |
| 177 | unsigned maxpacket_limit:16; | ||
| 174 | unsigned max_streams:16; | 178 | unsigned max_streams:16; |
| 175 | unsigned mult:2; | 179 | unsigned mult:2; |
| 176 | unsigned maxburst:5; | 180 | unsigned maxburst:5; |
| @@ -182,6 +186,21 @@ struct usb_ep { | |||
| 182 | /*-------------------------------------------------------------------------*/ | 186 | /*-------------------------------------------------------------------------*/ |
| 183 | 187 | ||
| 184 | /** | 188 | /** |
| 189 | * usb_ep_set_maxpacket_limit - set maximum packet size limit for endpoint | ||
| 190 | * @ep:the endpoint being configured | ||
| 191 | * @maxpacket_limit:value of maximum packet size limit | ||
| 192 | * | ||
| 193 | * This function shoud be used only in UDC drivers to initialize endpoint | ||
| 194 | * (usually in probe function). | ||
| 195 | */ | ||
| 196 | static inline void usb_ep_set_maxpacket_limit(struct usb_ep *ep, | ||
| 197 | unsigned maxpacket_limit) | ||
| 198 | { | ||
| 199 | ep->maxpacket_limit = maxpacket_limit; | ||
| 200 | ep->maxpacket = maxpacket_limit; | ||
| 201 | } | ||
| 202 | |||
| 203 | /** | ||
| 185 | * usb_ep_enable - configure endpoint, making it usable | 204 | * usb_ep_enable - configure endpoint, making it usable |
| 186 | * @ep:the endpoint being configured. may not be the endpoint named "ep0". | 205 | * @ep:the endpoint being configured. may not be the endpoint named "ep0". |
| 187 | * drivers discover endpoints through the ep_list of a usb_gadget. | 206 | * drivers discover endpoints through the ep_list of a usb_gadget. |
| @@ -485,6 +504,11 @@ struct usb_gadget_ops { | |||
| 485 | * @max_speed: Maximal speed the UDC can handle. UDC must support this | 504 | * @max_speed: Maximal speed the UDC can handle. UDC must support this |
| 486 | * and all slower speeds. | 505 | * and all slower speeds. |
| 487 | * @state: the state we are now (attached, suspended, configured, etc) | 506 | * @state: the state we are now (attached, suspended, configured, etc) |
| 507 | * @name: Identifies the controller hardware type. Used in diagnostics | ||
| 508 | * and sometimes configuration. | ||
| 509 | * @dev: Driver model state for this abstract device. | ||
| 510 | * @out_epnum: last used out ep number | ||
| 511 | * @in_epnum: last used in ep number | ||
| 488 | * @sg_supported: true if we can handle scatter-gather | 512 | * @sg_supported: true if we can handle scatter-gather |
| 489 | * @is_otg: True if the USB device port uses a Mini-AB jack, so that the | 513 | * @is_otg: True if the USB device port uses a Mini-AB jack, so that the |
| 490 | * gadget driver must provide a USB OTG descriptor. | 514 | * gadget driver must provide a USB OTG descriptor. |
| @@ -497,11 +521,8 @@ struct usb_gadget_ops { | |||
| 497 | * only supports HNP on a different root port. | 521 | * only supports HNP on a different root port. |
| 498 | * @b_hnp_enable: OTG device feature flag, indicating that the A-Host | 522 | * @b_hnp_enable: OTG device feature flag, indicating that the A-Host |
| 499 | * enabled HNP support. | 523 | * enabled HNP support. |
| 500 | * @name: Identifies the controller hardware type. Used in diagnostics | 524 | * @quirk_ep_out_aligned_size: epout requires buffer size to be aligned to |
| 501 | * and sometimes configuration. | 525 | * MaxPacketSize. |
| 502 | * @dev: Driver model state for this abstract device. | ||
| 503 | * @out_epnum: last used out ep number | ||
| 504 | * @in_epnum: last used in ep number | ||
| 505 | * | 526 | * |
| 506 | * Gadgets have a mostly-portable "gadget driver" implementing device | 527 | * Gadgets have a mostly-portable "gadget driver" implementing device |
| 507 | * functions, handling all usb configurations and interfaces. Gadget | 528 | * functions, handling all usb configurations and interfaces. Gadget |
| @@ -530,16 +551,18 @@ struct usb_gadget { | |||
| 530 | enum usb_device_speed speed; | 551 | enum usb_device_speed speed; |
| 531 | enum usb_device_speed max_speed; | 552 | enum usb_device_speed max_speed; |
| 532 | enum usb_device_state state; | 553 | enum usb_device_state state; |
| 554 | const char *name; | ||
| 555 | struct device dev; | ||
| 556 | unsigned out_epnum; | ||
| 557 | unsigned in_epnum; | ||
| 558 | |||
| 533 | unsigned sg_supported:1; | 559 | unsigned sg_supported:1; |
| 534 | unsigned is_otg:1; | 560 | unsigned is_otg:1; |
| 535 | unsigned is_a_peripheral:1; | 561 | unsigned is_a_peripheral:1; |
| 536 | unsigned b_hnp_enable:1; | 562 | unsigned b_hnp_enable:1; |
| 537 | unsigned a_hnp_support:1; | 563 | unsigned a_hnp_support:1; |
| 538 | unsigned a_alt_hnp_support:1; | 564 | unsigned a_alt_hnp_support:1; |
| 539 | const char *name; | 565 | unsigned quirk_ep_out_aligned_size:1; |
| 540 | struct device dev; | ||
| 541 | unsigned out_epnum; | ||
| 542 | unsigned in_epnum; | ||
| 543 | }; | 566 | }; |
| 544 | #define work_to_gadget(w) (container_of((w), struct usb_gadget, work)) | 567 | #define work_to_gadget(w) (container_of((w), struct usb_gadget, work)) |
| 545 | 568 | ||
| @@ -558,6 +581,23 @@ static inline struct usb_gadget *dev_to_usb_gadget(struct device *dev) | |||
| 558 | 581 | ||
| 559 | 582 | ||
| 560 | /** | 583 | /** |
| 584 | * usb_ep_align_maybe - returns @len aligned to ep's maxpacketsize if gadget | ||
| 585 | * requires quirk_ep_out_aligned_size, otherwise reguens len. | ||
| 586 | * @g: controller to check for quirk | ||
| 587 | * @ep: the endpoint whose maxpacketsize is used to align @len | ||
| 588 | * @len: buffer size's length to align to @ep's maxpacketsize | ||
| 589 | * | ||
| 590 | * This helper is used in case it's required for any reason to check and maybe | ||
| 591 | * align buffer's size to an ep's maxpacketsize. | ||
| 592 | */ | ||
| 593 | static inline size_t | ||
| 594 | usb_ep_align_maybe(struct usb_gadget *g, struct usb_ep *ep, size_t len) | ||
| 595 | { | ||
| 596 | return !g->quirk_ep_out_aligned_size ? len : | ||
| 597 | round_up(len, (size_t)ep->desc->wMaxPacketSize); | ||
| 598 | } | ||
| 599 | |||
| 600 | /** | ||
| 561 | * gadget_is_dualspeed - return true iff the hardware handles high speed | 601 | * gadget_is_dualspeed - return true iff the hardware handles high speed |
| 562 | * @g: controller that might support both high and full speeds | 602 | * @g: controller that might support both high and full speeds |
| 563 | */ | 603 | */ |
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index b8aba196f7f1..efe8d8a7c7ad 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
| @@ -134,6 +134,7 @@ struct usb_hcd { | |||
| 134 | unsigned rh_registered:1;/* is root hub registered? */ | 134 | unsigned rh_registered:1;/* is root hub registered? */ |
| 135 | unsigned rh_pollable:1; /* may we poll the root hub? */ | 135 | unsigned rh_pollable:1; /* may we poll the root hub? */ |
| 136 | unsigned msix_enabled:1; /* driver has MSI-X enabled? */ | 136 | unsigned msix_enabled:1; /* driver has MSI-X enabled? */ |
| 137 | unsigned remove_phy:1; /* auto-remove USB phy */ | ||
| 137 | 138 | ||
| 138 | /* The next flag is a stopgap, to be removed when all the HCDs | 139 | /* The next flag is a stopgap, to be removed when all the HCDs |
| 139 | * support the new root-hub polling mechanism. */ | 140 | * support the new root-hub polling mechanism. */ |
| @@ -352,6 +353,8 @@ struct hc_driver { | |||
| 352 | void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *); | 353 | void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *); |
| 353 | /* Returns the hardware-chosen device address */ | 354 | /* Returns the hardware-chosen device address */ |
| 354 | int (*address_device)(struct usb_hcd *, struct usb_device *udev); | 355 | int (*address_device)(struct usb_hcd *, struct usb_device *udev); |
| 356 | /* prepares the hardware to send commands to the device */ | ||
| 357 | int (*enable_device)(struct usb_hcd *, struct usb_device *udev); | ||
| 355 | /* Notifies the HCD after a hub descriptor is fetched. | 358 | /* Notifies the HCD after a hub descriptor is fetched. |
| 356 | * Will block. | 359 | * Will block. |
| 357 | */ | 360 | */ |
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index eb505250940a..a4ee1b582183 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h | |||
| @@ -76,6 +76,9 @@ struct musb_hdrc_config { | |||
| 76 | unsigned dma:1 __deprecated; /* supports DMA */ | 76 | unsigned dma:1 __deprecated; /* supports DMA */ |
| 77 | unsigned vendor_req:1 __deprecated; /* vendor registers required */ | 77 | unsigned vendor_req:1 __deprecated; /* vendor registers required */ |
| 78 | 78 | ||
| 79 | /* need to explicitly de-assert the port reset after resume? */ | ||
| 80 | unsigned host_port_deassert_reset_at_resume:1; | ||
| 81 | |||
| 79 | u8 num_eps; /* number of endpoints _with_ ep0 */ | 82 | u8 num_eps; /* number of endpoints _with_ ep0 */ |
| 80 | u8 dma_channels __deprecated; /* number of dma channels */ | 83 | u8 dma_channels __deprecated; /* number of dma channels */ |
| 81 | u8 dyn_fifo_size; /* dynamic size in bytes */ | 84 | u8 dyn_fifo_size; /* dynamic size in bytes */ |
diff --git a/include/linux/usb/omap_control_usb.h b/include/linux/usb/omap_control_usb.h index 596b01918813..69ae383ee3cc 100644 --- a/include/linux/usb/omap_control_usb.h +++ b/include/linux/usb/omap_control_usb.h | |||
| @@ -24,6 +24,7 @@ enum omap_control_usb_type { | |||
| 24 | OMAP_CTRL_TYPE_USB2, /* USB2_PHY, power down in CONTROL_DEV_CONF */ | 24 | OMAP_CTRL_TYPE_USB2, /* USB2_PHY, power down in CONTROL_DEV_CONF */ |
| 25 | OMAP_CTRL_TYPE_PIPE3, /* PIPE3 PHY, DPLL & seperate Rx/Tx power */ | 25 | OMAP_CTRL_TYPE_PIPE3, /* PIPE3 PHY, DPLL & seperate Rx/Tx power */ |
| 26 | OMAP_CTRL_TYPE_DRA7USB2, /* USB2 PHY, power and power_aux e.g. DRA7 */ | 26 | OMAP_CTRL_TYPE_DRA7USB2, /* USB2 PHY, power and power_aux e.g. DRA7 */ |
| 27 | OMAP_CTRL_TYPE_AM437USB2, /* USB2 PHY, power e.g. AM437x */ | ||
| 27 | }; | 28 | }; |
| 28 | 29 | ||
| 29 | struct omap_control_usb { | 30 | struct omap_control_usb { |
| @@ -64,6 +65,11 @@ enum omap_control_usb_mode { | |||
| 64 | 65 | ||
| 65 | #define OMAP_CTRL_USB2_PHY_PD BIT(28) | 66 | #define OMAP_CTRL_USB2_PHY_PD BIT(28) |
| 66 | 67 | ||
| 68 | #define AM437X_CTRL_USB2_PHY_PD BIT(0) | ||
| 69 | #define AM437X_CTRL_USB2_OTG_PD BIT(1) | ||
| 70 | #define AM437X_CTRL_USB2_OTGVDET_EN BIT(19) | ||
| 71 | #define AM437X_CTRL_USB2_OTGSESSEND_EN BIT(20) | ||
| 72 | |||
| 67 | #if IS_ENABLED(CONFIG_OMAP_CONTROL_USB) | 73 | #if IS_ENABLED(CONFIG_OMAP_CONTROL_USB) |
| 68 | extern void omap_control_usb_phy_power(struct device *dev, int on); | 74 | extern void omap_control_usb_phy_power(struct device *dev, int on); |
| 69 | extern void omap_control_usb_set_mode(struct device *dev, | 75 | extern void omap_control_usb_set_mode(struct device *dev, |
diff --git a/include/linux/usb/otg-fsm.h b/include/linux/usb/otg-fsm.h new file mode 100644 index 000000000000..b6ba1bfb86f2 --- /dev/null +++ b/include/linux/usb/otg-fsm.h | |||
| @@ -0,0 +1,244 @@ | |||
| 1 | /* Copyright (C) 2007,2008 Freescale Semiconductor, Inc. | ||
| 2 | * | ||
| 3 | * This program is free software; you can redistribute it and/or modify it | ||
| 4 | * under the terms of the GNU General Public License as published by the | ||
| 5 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 6 | * option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, but | ||
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 11 | * General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License along | ||
| 14 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 15 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef __LINUX_USB_OTG_FSM_H | ||
| 19 | #define __LINUX_USB_OTG_FSM_H | ||
| 20 | |||
| 21 | #include <linux/mutex.h> | ||
| 22 | #include <linux/errno.h> | ||
| 23 | |||
| 24 | #undef VERBOSE | ||
| 25 | |||
| 26 | #ifdef VERBOSE | ||
| 27 | #define VDBG(fmt, args...) pr_debug("[%s] " fmt , \ | ||
| 28 | __func__, ## args) | ||
| 29 | #else | ||
| 30 | #define VDBG(stuff...) do {} while (0) | ||
| 31 | #endif | ||
| 32 | |||
| 33 | #ifdef VERBOSE | ||
| 34 | #define MPC_LOC printk("Current Location [%s]:[%d]\n", __FILE__, __LINE__) | ||
| 35 | #else | ||
| 36 | #define MPC_LOC do {} while (0) | ||
| 37 | #endif | ||
| 38 | |||
| 39 | #define PROTO_UNDEF (0) | ||
| 40 | #define PROTO_HOST (1) | ||
| 41 | #define PROTO_GADGET (2) | ||
| 42 | |||
| 43 | enum otg_fsm_timer { | ||
| 44 | /* Standard OTG timers */ | ||
| 45 | A_WAIT_VRISE, | ||
| 46 | A_WAIT_VFALL, | ||
| 47 | A_WAIT_BCON, | ||
| 48 | A_AIDL_BDIS, | ||
| 49 | B_ASE0_BRST, | ||
| 50 | A_BIDL_ADIS, | ||
| 51 | |||
| 52 | /* Auxiliary timers */ | ||
| 53 | B_SE0_SRP, | ||
| 54 | B_SRP_FAIL, | ||
| 55 | A_WAIT_ENUM, | ||
| 56 | |||
| 57 | NUM_OTG_FSM_TIMERS, | ||
| 58 | }; | ||
| 59 | |||
| 60 | /* OTG state machine according to the OTG spec */ | ||
| 61 | struct otg_fsm { | ||
| 62 | /* Input */ | ||
| 63 | int id; | ||
| 64 | int adp_change; | ||
| 65 | int power_up; | ||
| 66 | int test_device; | ||
| 67 | int a_bus_drop; | ||
| 68 | int a_bus_req; | ||
| 69 | int a_srp_det; | ||
| 70 | int a_vbus_vld; | ||
| 71 | int b_conn; | ||
| 72 | int a_bus_resume; | ||
| 73 | int a_bus_suspend; | ||
| 74 | int a_conn; | ||
| 75 | int b_bus_req; | ||
| 76 | int b_se0_srp; | ||
| 77 | int b_ssend_srp; | ||
| 78 | int b_sess_vld; | ||
| 79 | /* Auxilary inputs */ | ||
| 80 | int a_sess_vld; | ||
| 81 | int b_bus_resume; | ||
| 82 | int b_bus_suspend; | ||
| 83 | |||
| 84 | /* Output */ | ||
| 85 | int data_pulse; | ||
| 86 | int drv_vbus; | ||
| 87 | int loc_conn; | ||
| 88 | int loc_sof; | ||
| 89 | int adp_prb; | ||
| 90 | int adp_sns; | ||
| 91 | |||
| 92 | /* Internal variables */ | ||
| 93 | int a_set_b_hnp_en; | ||
| 94 | int b_srp_done; | ||
| 95 | int b_hnp_enable; | ||
| 96 | int a_clr_err; | ||
| 97 | |||
| 98 | /* Informative variables */ | ||
| 99 | int a_bus_drop_inf; | ||
| 100 | int a_bus_req_inf; | ||
| 101 | int a_clr_err_inf; | ||
| 102 | int b_bus_req_inf; | ||
| 103 | /* Auxilary informative variables */ | ||
| 104 | int a_suspend_req_inf; | ||
| 105 | |||
| 106 | /* Timeout indicator for timers */ | ||
| 107 | int a_wait_vrise_tmout; | ||
| 108 | int a_wait_vfall_tmout; | ||
| 109 | int a_wait_bcon_tmout; | ||
| 110 | int a_aidl_bdis_tmout; | ||
| 111 | int b_ase0_brst_tmout; | ||
| 112 | int a_bidl_adis_tmout; | ||
| 113 | |||
| 114 | struct otg_fsm_ops *ops; | ||
| 115 | struct usb_otg *otg; | ||
| 116 | |||
| 117 | /* Current usb protocol used: 0:undefine; 1:host; 2:client */ | ||
| 118 | int protocol; | ||
| 119 | struct mutex lock; | ||
| 120 | }; | ||
| 121 | |||
| 122 | struct otg_fsm_ops { | ||
| 123 | void (*chrg_vbus)(struct otg_fsm *fsm, int on); | ||
| 124 | void (*drv_vbus)(struct otg_fsm *fsm, int on); | ||
| 125 | void (*loc_conn)(struct otg_fsm *fsm, int on); | ||
| 126 | void (*loc_sof)(struct otg_fsm *fsm, int on); | ||
| 127 | void (*start_pulse)(struct otg_fsm *fsm); | ||
| 128 | void (*start_adp_prb)(struct otg_fsm *fsm); | ||
| 129 | void (*start_adp_sns)(struct otg_fsm *fsm); | ||
| 130 | void (*add_timer)(struct otg_fsm *fsm, enum otg_fsm_timer timer); | ||
| 131 | void (*del_timer)(struct otg_fsm *fsm, enum otg_fsm_timer timer); | ||
| 132 | int (*start_host)(struct otg_fsm *fsm, int on); | ||
| 133 | int (*start_gadget)(struct otg_fsm *fsm, int on); | ||
| 134 | }; | ||
| 135 | |||
| 136 | |||
| 137 | static inline int otg_chrg_vbus(struct otg_fsm *fsm, int on) | ||
| 138 | { | ||
| 139 | if (!fsm->ops->chrg_vbus) | ||
| 140 | return -EOPNOTSUPP; | ||
| 141 | fsm->ops->chrg_vbus(fsm, on); | ||
| 142 | return 0; | ||
| 143 | } | ||
| 144 | |||
| 145 | static inline int otg_drv_vbus(struct otg_fsm *fsm, int on) | ||
| 146 | { | ||
| 147 | if (!fsm->ops->drv_vbus) | ||
| 148 | return -EOPNOTSUPP; | ||
| 149 | if (fsm->drv_vbus != on) { | ||
| 150 | fsm->drv_vbus = on; | ||
| 151 | fsm->ops->drv_vbus(fsm, on); | ||
| 152 | } | ||
| 153 | return 0; | ||
| 154 | } | ||
| 155 | |||
| 156 | static inline int otg_loc_conn(struct otg_fsm *fsm, int on) | ||
| 157 | { | ||
| 158 | if (!fsm->ops->loc_conn) | ||
| 159 | return -EOPNOTSUPP; | ||
| 160 | if (fsm->loc_conn != on) { | ||
| 161 | fsm->loc_conn = on; | ||
| 162 | fsm->ops->loc_conn(fsm, on); | ||
| 163 | } | ||
| 164 | return 0; | ||
| 165 | } | ||
| 166 | |||
| 167 | static inline int otg_loc_sof(struct otg_fsm *fsm, int on) | ||
| 168 | { | ||
| 169 | if (!fsm->ops->loc_sof) | ||
| 170 | return -EOPNOTSUPP; | ||
| 171 | if (fsm->loc_sof != on) { | ||
| 172 | fsm->loc_sof = on; | ||
| 173 | fsm->ops->loc_sof(fsm, on); | ||
| 174 | } | ||
| 175 | return 0; | ||
| 176 | } | ||
| 177 | |||
| 178 | static inline int otg_start_pulse(struct otg_fsm *fsm) | ||
| 179 | { | ||
| 180 | if (!fsm->ops->start_pulse) | ||
| 181 | return -EOPNOTSUPP; | ||
| 182 | if (!fsm->data_pulse) { | ||
| 183 | fsm->data_pulse = 1; | ||
| 184 | fsm->ops->start_pulse(fsm); | ||
| 185 | } | ||
| 186 | return 0; | ||
| 187 | } | ||
| 188 | |||
| 189 | static inline int otg_start_adp_prb(struct otg_fsm *fsm) | ||
| 190 | { | ||
| 191 | if (!fsm->ops->start_adp_prb) | ||
| 192 | return -EOPNOTSUPP; | ||
| 193 | if (!fsm->adp_prb) { | ||
| 194 | fsm->adp_sns = 0; | ||
| 195 | fsm->adp_prb = 1; | ||
| 196 | fsm->ops->start_adp_prb(fsm); | ||
| 197 | } | ||
| 198 | return 0; | ||
| 199 | } | ||
| 200 | |||
| 201 | static inline int otg_start_adp_sns(struct otg_fsm *fsm) | ||
| 202 | { | ||
| 203 | if (!fsm->ops->start_adp_sns) | ||
| 204 | return -EOPNOTSUPP; | ||
| 205 | if (!fsm->adp_sns) { | ||
| 206 | fsm->adp_sns = 1; | ||
| 207 | fsm->ops->start_adp_sns(fsm); | ||
| 208 | } | ||
| 209 | return 0; | ||
| 210 | } | ||
| 211 | |||
| 212 | static inline int otg_add_timer(struct otg_fsm *fsm, enum otg_fsm_timer timer) | ||
| 213 | { | ||
| 214 | if (!fsm->ops->add_timer) | ||
| 215 | return -EOPNOTSUPP; | ||
| 216 | fsm->ops->add_timer(fsm, timer); | ||
| 217 | return 0; | ||
| 218 | } | ||
| 219 | |||
| 220 | static inline int otg_del_timer(struct otg_fsm *fsm, enum otg_fsm_timer timer) | ||
| 221 | { | ||
| 222 | if (!fsm->ops->del_timer) | ||
| 223 | return -EOPNOTSUPP; | ||
| 224 | fsm->ops->del_timer(fsm, timer); | ||
| 225 | return 0; | ||
| 226 | } | ||
| 227 | |||
| 228 | static inline int otg_start_host(struct otg_fsm *fsm, int on) | ||
| 229 | { | ||
| 230 | if (!fsm->ops->start_host) | ||
| 231 | return -EOPNOTSUPP; | ||
| 232 | return fsm->ops->start_host(fsm, on); | ||
| 233 | } | ||
| 234 | |||
| 235 | static inline int otg_start_gadget(struct otg_fsm *fsm, int on) | ||
| 236 | { | ||
| 237 | if (!fsm->ops->start_gadget) | ||
| 238 | return -EOPNOTSUPP; | ||
| 239 | return fsm->ops->start_gadget(fsm, on); | ||
| 240 | } | ||
| 241 | |||
| 242 | int otg_statemachine(struct otg_fsm *fsm); | ||
| 243 | |||
| 244 | #endif /* __LINUX_USB_OTG_FSM_H */ | ||
diff --git a/include/linux/usb/wusb.h b/include/linux/usb/wusb.h index 0c4d4ca370ec..eeb28329fa3c 100644 --- a/include/linux/usb/wusb.h +++ b/include/linux/usb/wusb.h | |||
| @@ -271,6 +271,8 @@ static inline u8 wusb_key_index(int index, int type, int originator) | |||
| 271 | #define WUSB_KEY_INDEX_TYPE_GTK 2 | 271 | #define WUSB_KEY_INDEX_TYPE_GTK 2 |
| 272 | #define WUSB_KEY_INDEX_ORIGINATOR_HOST 0 | 272 | #define WUSB_KEY_INDEX_ORIGINATOR_HOST 0 |
| 273 | #define WUSB_KEY_INDEX_ORIGINATOR_DEVICE 1 | 273 | #define WUSB_KEY_INDEX_ORIGINATOR_DEVICE 1 |
| 274 | /* bits 0-3 used for the key index. */ | ||
| 275 | #define WUSB_KEY_INDEX_MAX 15 | ||
| 274 | 276 | ||
| 275 | /* A CCM Nonce, defined in WUSB1.0[6.4.1] */ | 277 | /* A CCM Nonce, defined in WUSB1.0[6.4.1] */ |
| 276 | struct aes_ccm_nonce { | 278 | struct aes_ccm_nonce { |
diff --git a/include/linux/uwb/umc.h b/include/linux/uwb/umc.h index 891d1d5f3947..ba82f03d8287 100644 --- a/include/linux/uwb/umc.h +++ b/include/linux/uwb/umc.h | |||
| @@ -143,7 +143,7 @@ int umc_match_pci_id(struct umc_driver *umc_drv, struct umc_dev *umc); | |||
| 143 | static inline struct pci_dev *umc_parent_pci_dev(struct umc_dev *umc_dev) | 143 | static inline struct pci_dev *umc_parent_pci_dev(struct umc_dev *umc_dev) |
| 144 | { | 144 | { |
| 145 | struct pci_dev *pci_dev = NULL; | 145 | struct pci_dev *pci_dev = NULL; |
| 146 | if (umc_dev->dev.parent->bus == &pci_bus_type) | 146 | if (dev_is_pci(umc_dev->dev.parent)) |
| 147 | pci_dev = to_pci_dev(umc_dev->dev.parent); | 147 | pci_dev = to_pci_dev(umc_dev->dev.parent); |
| 148 | return pci_dev; | 148 | return pci_dev; |
| 149 | } | 149 | } |
diff --git a/include/linux/vme.h b/include/linux/vme.h index c9d65bf14cec..8cd6f19ca518 100644 --- a/include/linux/vme.h +++ b/include/linux/vme.h | |||
| @@ -164,7 +164,8 @@ int vme_lm_attach(struct vme_resource *, int, void (*callback)(int)); | |||
| 164 | int vme_lm_detach(struct vme_resource *, int); | 164 | int vme_lm_detach(struct vme_resource *, int); |
| 165 | void vme_lm_free(struct vme_resource *); | 165 | void vme_lm_free(struct vme_resource *); |
| 166 | 166 | ||
| 167 | int vme_slot_get(struct vme_dev *); | 167 | int vme_slot_num(struct vme_dev *); |
| 168 | int vme_bus_num(struct vme_dev *); | ||
| 168 | 169 | ||
| 169 | int vme_register_driver(struct vme_driver *, unsigned int); | 170 | int vme_register_driver(struct vme_driver *, unsigned int); |
| 170 | void vme_unregister_driver(struct vme_driver *); | 171 | void vme_unregister_driver(struct vme_driver *); |
diff --git a/include/linux/vtime.h b/include/linux/vtime.h index f5b72b364bda..c5165fd256f9 100644 --- a/include/linux/vtime.h +++ b/include/linux/vtime.h | |||
| @@ -19,8 +19,8 @@ static inline bool vtime_accounting_enabled(void) { return true; } | |||
| 19 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN | 19 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN |
| 20 | static inline bool vtime_accounting_enabled(void) | 20 | static inline bool vtime_accounting_enabled(void) |
| 21 | { | 21 | { |
| 22 | if (static_key_false(&context_tracking_enabled)) { | 22 | if (context_tracking_is_enabled()) { |
| 23 | if (context_tracking_active()) | 23 | if (context_tracking_cpu_is_enabled()) |
| 24 | return true; | 24 | return true; |
| 25 | } | 25 | } |
| 26 | 26 | ||
diff --git a/include/linux/zorro.h b/include/linux/zorro.h index dff42025649b..63fbba0740c2 100644 --- a/include/linux/zorro.h +++ b/include/linux/zorro.h | |||
| @@ -11,107 +11,10 @@ | |||
| 11 | #ifndef _LINUX_ZORRO_H | 11 | #ifndef _LINUX_ZORRO_H |
| 12 | #define _LINUX_ZORRO_H | 12 | #define _LINUX_ZORRO_H |
| 13 | 13 | ||
| 14 | #include <linux/device.h> | ||
| 15 | |||
| 16 | |||
| 17 | /* | ||
| 18 | * Each Zorro board has a 32-bit ID of the form | ||
| 19 | * | ||
| 20 | * mmmmmmmmmmmmmmmmppppppppeeeeeeee | ||
| 21 | * | ||
| 22 | * with | ||
| 23 | * | ||
| 24 | * mmmmmmmmmmmmmmmm 16-bit Manufacturer ID (assigned by CBM (sigh)) | ||
| 25 | * pppppppp 8-bit Product ID (assigned by manufacturer) | ||
| 26 | * eeeeeeee 8-bit Extended Product ID (currently only used | ||
| 27 | * for some GVP boards) | ||
| 28 | */ | ||
| 29 | |||
| 30 | |||
| 31 | #define ZORRO_MANUF(id) ((id) >> 16) | ||
| 32 | #define ZORRO_PROD(id) (((id) >> 8) & 0xff) | ||
| 33 | #define ZORRO_EPC(id) ((id) & 0xff) | ||
| 34 | |||
| 35 | #define ZORRO_ID(manuf, prod, epc) \ | ||
| 36 | ((ZORRO_MANUF_##manuf << 16) | ((prod) << 8) | (epc)) | ||
| 37 | |||
| 38 | typedef __u32 zorro_id; | ||
| 39 | |||
| 40 | |||
| 41 | /* Include the ID list */ | ||
| 42 | #include <linux/zorro_ids.h> | ||
| 43 | |||
| 44 | 14 | ||
| 45 | /* | 15 | #include <uapi/linux/zorro.h> |
| 46 | * GVP identifies most of its products through the 'extended product code' | ||
| 47 | * (epc). The epc has to be ANDed with the GVP_PRODMASK before the | ||
| 48 | * identification. | ||
| 49 | */ | ||
| 50 | |||
| 51 | #define GVP_PRODMASK (0xf8) | ||
| 52 | #define GVP_SCSICLKMASK (0x01) | ||
| 53 | |||
| 54 | enum GVP_flags { | ||
| 55 | GVP_IO = 0x01, | ||
| 56 | GVP_ACCEL = 0x02, | ||
| 57 | GVP_SCSI = 0x04, | ||
| 58 | GVP_24BITDMA = 0x08, | ||
| 59 | GVP_25BITDMA = 0x10, | ||
| 60 | GVP_NOBANK = 0x20, | ||
| 61 | GVP_14MHZ = 0x40, | ||
| 62 | }; | ||
| 63 | |||
| 64 | |||
| 65 | struct Node { | ||
| 66 | struct Node *ln_Succ; /* Pointer to next (successor) */ | ||
| 67 | struct Node *ln_Pred; /* Pointer to previous (predecessor) */ | ||
| 68 | __u8 ln_Type; | ||
| 69 | __s8 ln_Pri; /* Priority, for sorting */ | ||
| 70 | __s8 *ln_Name; /* ID string, null terminated */ | ||
| 71 | } __attribute__ ((packed)); | ||
| 72 | |||
| 73 | struct ExpansionRom { | ||
| 74 | /* -First 16 bytes of the expansion ROM */ | ||
| 75 | __u8 er_Type; /* Board type, size and flags */ | ||
| 76 | __u8 er_Product; /* Product number, assigned by manufacturer */ | ||
| 77 | __u8 er_Flags; /* Flags */ | ||
| 78 | __u8 er_Reserved03; /* Must be zero ($ff inverted) */ | ||
| 79 | __u16 er_Manufacturer; /* Unique ID, ASSIGNED BY COMMODORE-AMIGA! */ | ||
| 80 | __u32 er_SerialNumber; /* Available for use by manufacturer */ | ||
| 81 | __u16 er_InitDiagVec; /* Offset to optional "DiagArea" structure */ | ||
| 82 | __u8 er_Reserved0c; | ||
| 83 | __u8 er_Reserved0d; | ||
| 84 | __u8 er_Reserved0e; | ||
| 85 | __u8 er_Reserved0f; | ||
| 86 | } __attribute__ ((packed)); | ||
| 87 | |||
| 88 | /* er_Type board type bits */ | ||
| 89 | #define ERT_TYPEMASK 0xc0 | ||
| 90 | #define ERT_ZORROII 0xc0 | ||
| 91 | #define ERT_ZORROIII 0x80 | ||
| 92 | |||
| 93 | /* other bits defined in er_Type */ | ||
| 94 | #define ERTB_MEMLIST 5 /* Link RAM into free memory list */ | ||
| 95 | #define ERTF_MEMLIST (1<<5) | ||
| 96 | |||
| 97 | struct ConfigDev { | ||
| 98 | struct Node cd_Node; | ||
| 99 | __u8 cd_Flags; /* (read/write) */ | ||
| 100 | __u8 cd_Pad; /* reserved */ | ||
| 101 | struct ExpansionRom cd_Rom; /* copy of board's expansion ROM */ | ||
| 102 | void *cd_BoardAddr; /* where in memory the board was placed */ | ||
| 103 | __u32 cd_BoardSize; /* size of board in bytes */ | ||
| 104 | __u16 cd_SlotAddr; /* which slot number (PRIVATE) */ | ||
| 105 | __u16 cd_SlotSize; /* number of slots (PRIVATE) */ | ||
| 106 | void *cd_Driver; /* pointer to node of driver */ | ||
| 107 | struct ConfigDev *cd_NextCD; /* linked list of drivers to config */ | ||
| 108 | __u32 cd_Unused[4]; /* for whatever the driver wants */ | ||
| 109 | } __attribute__ ((packed)); | ||
| 110 | |||
| 111 | #define ZORRO_NUM_AUTO 16 | ||
| 112 | |||
| 113 | #ifdef __KERNEL__ | ||
| 114 | 16 | ||
| 17 | #include <linux/device.h> | ||
| 115 | #include <linux/init.h> | 18 | #include <linux/init.h> |
| 116 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
| 117 | #include <linux/mod_devicetable.h> | 20 | #include <linux/mod_devicetable.h> |
| @@ -175,7 +78,23 @@ static inline struct zorro_driver *zorro_dev_driver(const struct zorro_dev *z) | |||
| 175 | 78 | ||
| 176 | 79 | ||
| 177 | extern unsigned int zorro_num_autocon; /* # of autoconfig devices found */ | 80 | extern unsigned int zorro_num_autocon; /* # of autoconfig devices found */ |
| 178 | extern struct zorro_dev zorro_autocon[ZORRO_NUM_AUTO]; | 81 | extern struct zorro_dev *zorro_autocon; |
| 82 | |||
| 83 | |||
| 84 | /* | ||
| 85 | * Minimal information about a Zorro device, passed from bootinfo | ||
| 86 | * Only available temporarily, i.e. until initmem has been freed! | ||
| 87 | */ | ||
| 88 | |||
| 89 | struct zorro_dev_init { | ||
| 90 | struct ExpansionRom rom; | ||
| 91 | u16 slotaddr; | ||
| 92 | u16 slotsize; | ||
| 93 | u32 boardaddr; | ||
| 94 | u32 boardsize; | ||
| 95 | }; | ||
| 96 | |||
| 97 | extern struct zorro_dev_init zorro_autocon_init[ZORRO_NUM_AUTO] __initdata; | ||
| 179 | 98 | ||
| 180 | 99 | ||
| 181 | /* | 100 | /* |
| @@ -229,6 +148,4 @@ extern DECLARE_BITMAP(zorro_unused_z2ram, 128); | |||
| 229 | #define Z2RAM_CHUNKSHIFT (16) | 148 | #define Z2RAM_CHUNKSHIFT (16) |
| 230 | 149 | ||
| 231 | 150 | ||
| 232 | #endif /* __KERNEL__ */ | ||
| 233 | |||
| 234 | #endif /* _LINUX_ZORRO_H */ | 151 | #endif /* _LINUX_ZORRO_H */ |
diff --git a/include/linux/zorro_ids.h b/include/linux/zorro_ids.h deleted file mode 100644 index 74bc53bcfdcf..000000000000 --- a/include/linux/zorro_ids.h +++ /dev/null | |||
| @@ -1,552 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Zorro board IDs | ||
| 3 | * | ||
| 4 | * Please keep sorted. | ||
| 5 | */ | ||
| 6 | |||
| 7 | |||
| 8 | #define ZORRO_MANUF_PACIFIC_PERIPHERALS 0x00D3 | ||
| 9 | #define ZORRO_PROD_PACIFIC_PERIPHERALS_SE_2000_A500 ZORRO_ID(PACIFIC_PERIPHERALS, 0x00, 0) | ||
| 10 | #define ZORRO_PROD_PACIFIC_PERIPHERALS_SCSI ZORRO_ID(PACIFIC_PERIPHERALS, 0x0A, 0) | ||
| 11 | |||
| 12 | #define ZORRO_MANUF_MACROSYSTEMS_USA_2 0x0100 | ||
| 13 | #define ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE ZORRO_ID(MACROSYSTEMS_USA_2, 0x13, 0) | ||
| 14 | |||
| 15 | #define ZORRO_MANUF_KUPKE_1 0x00DD | ||
| 16 | #define ZORRO_PROD_KUPKE_GOLEM_RAM_BOX_2MB ZORRO_ID(KUPKE_1, 0x00, 0) | ||
| 17 | |||
| 18 | #define ZORRO_MANUF_MEMPHIS 0x0100 | ||
| 19 | #define ZORRO_PROD_MEMPHIS_STORMBRINGER ZORRO_ID(MEMPHIS, 0x00, 0) | ||
| 20 | |||
| 21 | #define ZORRO_MANUF_3_STATE 0x0200 | ||
| 22 | #define ZORRO_PROD_3_STATE_MEGAMIX_2000 ZORRO_ID(3_STATE, 0x02, 0) | ||
| 23 | |||
| 24 | #define ZORRO_MANUF_COMMODORE_BRAUNSCHWEIG 0x0201 | ||
| 25 | #define ZORRO_PROD_CBM_A2088_A2286 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x01, 0) | ||
| 26 | #define ZORRO_PROD_CBM_A2286 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x02, 0) | ||
| 27 | #define ZORRO_PROD_CBM_A4091_1 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x54, 0) | ||
| 28 | #define ZORRO_PROD_CBM_A2386SX_1 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x67, 0) | ||
| 29 | |||
| 30 | #define ZORRO_MANUF_COMMODORE_WEST_CHESTER_1 0x0202 | ||
| 31 | #define ZORRO_PROD_CBM_A2090A ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x01, 0) | ||
| 32 | #define ZORRO_PROD_CBM_A590_A2091_1 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x02, 0) | ||
| 33 | #define ZORRO_PROD_CBM_A590_A2091_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x03, 0) | ||
| 34 | #define ZORRO_PROD_CBM_A2090B ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x04, 0) | ||
| 35 | #define ZORRO_PROD_CBM_A2060 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x09, 0) | ||
| 36 | #define ZORRO_PROD_CBM_A590_A2052_A2058_A2091 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x0A, 0) | ||
| 37 | #define ZORRO_PROD_CBM_A560_RAM ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x20, 0) | ||
| 38 | #define ZORRO_PROD_CBM_A2232_PROTOTYPE ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x45, 0) | ||
| 39 | #define ZORRO_PROD_CBM_A2232 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x46, 0) | ||
| 40 | #define ZORRO_PROD_CBM_A2620 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x50, 0) | ||
| 41 | #define ZORRO_PROD_CBM_A2630 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x51, 0) | ||
| 42 | #define ZORRO_PROD_CBM_A4091_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x54, 0) | ||
| 43 | #define ZORRO_PROD_CBM_A2065_1 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x5A, 0) | ||
| 44 | #define ZORRO_PROD_CBM_ROMULATOR ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x60, 0) | ||
| 45 | #define ZORRO_PROD_CBM_A3000_TEST_FIXTURE ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x61, 0) | ||
| 46 | #define ZORRO_PROD_CBM_A2386SX_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x67, 0) | ||
| 47 | #define ZORRO_PROD_CBM_A2065_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x70, 0) | ||
| 48 | |||
| 49 | #define ZORRO_MANUF_COMMODORE_WEST_CHESTER_2 0x0203 | ||
| 50 | #define ZORRO_PROD_CBM_A2090A_CM ZORRO_ID(COMMODORE_WEST_CHESTER_2, 0x03, 0) | ||
| 51 | |||
| 52 | #define ZORRO_MANUF_PROGRESSIVE_PERIPHERALS_AND_SYSTEMS_2 0x02F4 | ||
| 53 | #define ZORRO_PROD_PPS_EXP8000 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS_2, 0x02, 0) | ||
| 54 | |||
| 55 | #define ZORRO_MANUF_KOLFF_COMPUTER_SUPPLIES 0x02FF | ||
| 56 | #define ZORRO_PROD_KCS_POWER_PC_BOARD ZORRO_ID(KOLFF_COMPUTER_SUPPLIES, 0x00, 0) | ||
| 57 | |||
| 58 | #define ZORRO_MANUF_CARDCO_1 0x03EC | ||
| 59 | #define ZORRO_PROD_CARDCO_KRONOS_2000_1 ZORRO_ID(CARDCO_1, 0x04, 0) | ||
| 60 | #define ZORRO_PROD_CARDCO_A1000_1 ZORRO_ID(CARDCO_1, 0x0C, 0) | ||
| 61 | #define ZORRO_PROD_CARDCO_ESCORT ZORRO_ID(CARDCO_1, 0x0E, 0) | ||
| 62 | #define ZORRO_PROD_CARDCO_A2410 ZORRO_ID(CARDCO_1, 0xF5, 0) | ||
| 63 | |||
| 64 | #define ZORRO_MANUF_A_SQUARED 0x03ED | ||
| 65 | #define ZORRO_PROD_A_SQUARED_LIVE_2000 ZORRO_ID(A_SQUARED, 0x01, 0) | ||
| 66 | |||
| 67 | #define ZORRO_MANUF_COMSPEC_COMMUNICATIONS 0x03EE | ||
| 68 | #define ZORRO_PROD_COMSPEC_COMMUNICATIONS_AX2000 ZORRO_ID(COMSPEC_COMMUNICATIONS, 0x01, 0) | ||
| 69 | |||
| 70 | #define ZORRO_MANUF_ANAKIN_RESEARCH 0x03F1 | ||
| 71 | #define ZORRO_PROD_ANAKIN_RESEARCH_EASYL ZORRO_ID(ANAKIN_RESEARCH, 0x01, 0) | ||
| 72 | |||
| 73 | #define ZORRO_MANUF_MICROBOTICS 0x03F2 | ||
| 74 | #define ZORRO_PROD_MICROBOTICS_STARBOARD_II ZORRO_ID(MICROBOTICS, 0x00, 0) | ||
| 75 | #define ZORRO_PROD_MICROBOTICS_STARDRIVE ZORRO_ID(MICROBOTICS, 0x02, 0) | ||
| 76 | #define ZORRO_PROD_MICROBOTICS_8_UP_A ZORRO_ID(MICROBOTICS, 0x03, 0) | ||
| 77 | #define ZORRO_PROD_MICROBOTICS_8_UP_Z ZORRO_ID(MICROBOTICS, 0x04, 0) | ||
| 78 | #define ZORRO_PROD_MICROBOTICS_DELTA_RAM ZORRO_ID(MICROBOTICS, 0x20, 0) | ||
| 79 | #define ZORRO_PROD_MICROBOTICS_8_STAR_RAM ZORRO_ID(MICROBOTICS, 0x40, 0) | ||
| 80 | #define ZORRO_PROD_MICROBOTICS_8_STAR ZORRO_ID(MICROBOTICS, 0x41, 0) | ||
| 81 | #define ZORRO_PROD_MICROBOTICS_VXL_RAM_32 ZORRO_ID(MICROBOTICS, 0x44, 0) | ||
| 82 | #define ZORRO_PROD_MICROBOTICS_VXL_68030 ZORRO_ID(MICROBOTICS, 0x45, 0) | ||
| 83 | #define ZORRO_PROD_MICROBOTICS_DELTA ZORRO_ID(MICROBOTICS, 0x60, 0) | ||
| 84 | #define ZORRO_PROD_MICROBOTICS_MBX_1200_1200Z_RAM ZORRO_ID(MICROBOTICS, 0x81, 0) | ||
| 85 | #define ZORRO_PROD_MICROBOTICS_HARDFRAME_2000_1 ZORRO_ID(MICROBOTICS, 0x96, 0) | ||
| 86 | #define ZORRO_PROD_MICROBOTICS_HARDFRAME_2000_2 ZORRO_ID(MICROBOTICS, 0x9E, 0) | ||
| 87 | #define ZORRO_PROD_MICROBOTICS_MBX_1200_1200Z ZORRO_ID(MICROBOTICS, 0xC1, 0) | ||
| 88 | |||
| 89 | #define ZORRO_MANUF_ACCESS_ASSOCIATES_ALEGRA 0x03F4 | ||
| 90 | |||
| 91 | #define ZORRO_MANUF_EXPANSION_TECHNOLOGIES 0x03F6 | ||
| 92 | |||
| 93 | #define ZORRO_MANUF_ASDG 0x03FF | ||
| 94 | #define ZORRO_PROD_ASDG_MEMORY_1 ZORRO_ID(ASDG, 0x01, 0) | ||
| 95 | #define ZORRO_PROD_ASDG_MEMORY_2 ZORRO_ID(ASDG, 0x02, 0) | ||
| 96 | #define ZORRO_PROD_ASDG_EB920_LAN_ROVER ZORRO_ID(ASDG, 0xFE, 0) | ||
| 97 | #define ZORRO_PROD_ASDG_GPIB_DUALIEEE488_TWIN_X ZORRO_ID(ASDG, 0xFF, 0) | ||
| 98 | |||
| 99 | #define ZORRO_MANUF_IMTRONICS_1 0x0404 | ||
| 100 | #define ZORRO_PROD_IMTRONICS_HURRICANE_2800_1 ZORRO_ID(IMTRONICS_1, 0x39, 0) | ||
| 101 | #define ZORRO_PROD_IMTRONICS_HURRICANE_2800_2 ZORRO_ID(IMTRONICS_1, 0x57, 0) | ||
| 102 | |||
| 103 | #define ZORRO_MANUF_CBM_UNIVERSITY_OF_LOWELL 0x0406 | ||
| 104 | #define ZORRO_PROD_CBM_A2410 ZORRO_ID(CBM_UNIVERSITY_OF_LOWELL, 0x00, 0) | ||
| 105 | |||
| 106 | #define ZORRO_MANUF_AMERISTAR 0x041D | ||
| 107 | #define ZORRO_PROD_AMERISTAR_A2065 ZORRO_ID(AMERISTAR, 0x01, 0) | ||
| 108 | #define ZORRO_PROD_AMERISTAR_A560 ZORRO_ID(AMERISTAR, 0x09, 0) | ||
| 109 | #define ZORRO_PROD_AMERISTAR_A4066 ZORRO_ID(AMERISTAR, 0x0A, 0) | ||
| 110 | |||
| 111 | #define ZORRO_MANUF_SUPRA 0x0420 | ||
| 112 | #define ZORRO_PROD_SUPRA_SUPRADRIVE_4x4 ZORRO_ID(SUPRA, 0x01, 0) | ||
| 113 | #define ZORRO_PROD_SUPRA_1000_RAM ZORRO_ID(SUPRA, 0x02, 0) | ||
| 114 | #define ZORRO_PROD_SUPRA_2000_DMA ZORRO_ID(SUPRA, 0x03, 0) | ||
| 115 | #define ZORRO_PROD_SUPRA_500 ZORRO_ID(SUPRA, 0x05, 0) | ||
| 116 | #define ZORRO_PROD_SUPRA_500_SCSI ZORRO_ID(SUPRA, 0x08, 0) | ||
| 117 | #define ZORRO_PROD_SUPRA_500XP_2000_RAM ZORRO_ID(SUPRA, 0x09, 0) | ||
| 118 | #define ZORRO_PROD_SUPRA_500RX_2000_RAM ZORRO_ID(SUPRA, 0x0A, 0) | ||
| 119 | #define ZORRO_PROD_SUPRA_2400ZI ZORRO_ID(SUPRA, 0x0B, 0) | ||
| 120 | #define ZORRO_PROD_SUPRA_500XP_SUPRADRIVE_WORDSYNC ZORRO_ID(SUPRA, 0x0C, 0) | ||
| 121 | #define ZORRO_PROD_SUPRA_SUPRADRIVE_WORDSYNC_II ZORRO_ID(SUPRA, 0x0D, 0) | ||
| 122 | #define ZORRO_PROD_SUPRA_2400ZIPLUS ZORRO_ID(SUPRA, 0x10, 0) | ||
| 123 | |||
| 124 | #define ZORRO_MANUF_COMPUTER_SYSTEMS_ASSOCIATES 0x0422 | ||
| 125 | #define ZORRO_PROD_CSA_MAGNUM ZORRO_ID(COMPUTER_SYSTEMS_ASSOCIATES, 0x11, 0) | ||
| 126 | #define ZORRO_PROD_CSA_12_GAUGE ZORRO_ID(COMPUTER_SYSTEMS_ASSOCIATES, 0x15, 0) | ||
| 127 | |||
| 128 | #define ZORRO_MANUF_MARC_MICHAEL_GROTH 0x0439 | ||
| 129 | |||
| 130 | #define ZORRO_MANUF_M_TECH 0x0502 | ||
| 131 | #define ZORRO_PROD_MTEC_AT500_1 ZORRO_ID(M_TECH, 0x03, 0) | ||
| 132 | |||
| 133 | #define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_1 0x06E1 | ||
| 134 | #define ZORRO_PROD_GVP_IMPACT_SERIES_I ZORRO_ID(GREAT_VALLEY_PRODUCTS_1, 0x08, 0) | ||
| 135 | |||
| 136 | #define ZORRO_MANUF_BYTEBOX 0x07DA | ||
| 137 | #define ZORRO_PROD_BYTEBOX_A500 ZORRO_ID(BYTEBOX, 0x00, 0) | ||
| 138 | |||
| 139 | #define ZORRO_MANUF_DKB_POWER_COMPUTING 0x07DC | ||
| 140 | #define ZORRO_PROD_DKB_POWER_COMPUTING_SECUREKEY ZORRO_ID(DKB_POWER_COMPUTING, 0x09, 0) | ||
| 141 | #define ZORRO_PROD_DKB_POWER_COMPUTING_DKM_3128 ZORRO_ID(DKB_POWER_COMPUTING, 0x0E, 0) | ||
| 142 | #define ZORRO_PROD_DKB_POWER_COMPUTING_RAPID_FIRE ZORRO_ID(DKB_POWER_COMPUTING, 0x0F, 0) | ||
| 143 | #define ZORRO_PROD_DKB_POWER_COMPUTING_DKM_1202 ZORRO_ID(DKB_POWER_COMPUTING, 0x10, 0) | ||
| 144 | #define ZORRO_PROD_DKB_POWER_COMPUTING_COBRA_VIPER_II_68EC030 ZORRO_ID(DKB_POWER_COMPUTING, 0x12, 0) | ||
| 145 | #define ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_1 ZORRO_ID(DKB_POWER_COMPUTING, 0x17, 0) | ||
| 146 | #define ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_2 ZORRO_ID(DKB_POWER_COMPUTING, 0xFF, 0) | ||
| 147 | |||
| 148 | #define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_2 0x07E1 | ||
| 149 | #define ZORRO_PROD_GVP_IMPACT_SERIES_I_4K ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x01, 0) | ||
| 150 | #define ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x02, 0) | ||
| 151 | #define ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_3 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x03, 0) | ||
| 152 | #define ZORRO_PROD_GVP_IMPACT_3001_IDE_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x08, 0) | ||
| 153 | #define ZORRO_PROD_GVP_IMPACT_3001_RAM ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x09, 0) | ||
| 154 | #define ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0A, 0) | ||
| 155 | #define ZORRO_PROD_GVP_EPC_BASE ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0) | ||
| 156 | #define ZORRO_PROD_GVP_GFORCE_040_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x20) | ||
| 157 | #define ZORRO_PROD_GVP_GFORCE_040_SCSI_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x30) | ||
| 158 | #define ZORRO_PROD_GVP_A1291 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x40) | ||
| 159 | #define ZORRO_PROD_GVP_COMBO_030_R4 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x60) | ||
| 160 | #define ZORRO_PROD_GVP_COMBO_030_R4_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x70) | ||
| 161 | #define ZORRO_PROD_GVP_PHONEPAK ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x78) | ||
| 162 | #define ZORRO_PROD_GVP_IO_EXTENDER ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x98) | ||
| 163 | #define ZORRO_PROD_GVP_GFORCE_030 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xa0) | ||
| 164 | #define ZORRO_PROD_GVP_GFORCE_030_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xb0) | ||
| 165 | #define ZORRO_PROD_GVP_A530 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xc0) | ||
| 166 | #define ZORRO_PROD_GVP_A530_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xd0) | ||
| 167 | #define ZORRO_PROD_GVP_COMBO_030_R3 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xe0) | ||
| 168 | #define ZORRO_PROD_GVP_COMBO_030_R3_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf0) | ||
| 169 | #define ZORRO_PROD_GVP_SERIES_II ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf8) | ||
| 170 | #define ZORRO_PROD_GVP_IMPACT_3001_IDE_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0) | ||
| 171 | /*#define ZORRO_PROD_GVP_A2000_030 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0)*/ | ||
| 172 | /*#define ZORRO_PROD_GVP_GFORCE_040_SCSI_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0)*/ | ||
| 173 | #define ZORRO_PROD_GVP_GFORCE_040_060 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x16, 0) | ||
| 174 | #define ZORRO_PROD_GVP_IMPACT_VISION_24 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x20, 0) | ||
| 175 | #define ZORRO_PROD_GVP_GFORCE_040_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0xFF, 0) | ||
| 176 | |||
| 177 | #define ZORRO_MANUF_CALIFORNIA_ACCESS_SYNERGY 0x07E5 | ||
| 178 | #define ZORRO_PROD_CALIFORNIA_ACCESS_SYNERGY_MALIBU ZORRO_ID(CALIFORNIA_ACCESS_SYNERGY, 0x01, 0) | ||
| 179 | |||
| 180 | #define ZORRO_MANUF_XETEC 0x07E6 | ||
| 181 | #define ZORRO_PROD_XETEC_FASTCARD ZORRO_ID(XETEC, 0x01, 0) | ||
| 182 | #define ZORRO_PROD_XETEC_FASTCARD_RAM ZORRO_ID(XETEC, 0x02, 0) | ||
| 183 | #define ZORRO_PROD_XETEC_FASTCARD_PLUS ZORRO_ID(XETEC, 0x03, 0) | ||
| 184 | |||
| 185 | #define ZORRO_MANUF_PROGRESSIVE_PERIPHERALS_AND_SYSTEMS 0x07EA | ||
| 186 | #define ZORRO_PROD_PPS_MERCURY ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x00, 0) | ||
| 187 | #define ZORRO_PROD_PPS_A3000_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x01, 0) | ||
| 188 | #define ZORRO_PROD_PPS_A2000_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x69, 0) | ||
| 189 | #define ZORRO_PROD_PPS_ZEUS ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x96, 0) | ||
| 190 | #define ZORRO_PROD_PPS_A500_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0xBB, 0) | ||
| 191 | |||
| 192 | #define ZORRO_MANUF_XEBEC 0x07EC | ||
| 193 | |||
| 194 | #define ZORRO_MANUF_SPIRIT_TECHNOLOGY 0x07F2 | ||
| 195 | #define ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN1000 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x01, 0) | ||
| 196 | #define ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN500 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x02, 0) | ||
| 197 | #define ZORRO_PROD_SPIRIT_TECHNOLOGY_SIN500 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x03, 0) | ||
| 198 | #define ZORRO_PROD_SPIRIT_TECHNOLOGY_HDA_506 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x04, 0) | ||
| 199 | #define ZORRO_PROD_SPIRIT_TECHNOLOGY_AX_S ZORRO_ID(SPIRIT_TECHNOLOGY, 0x05, 0) | ||
| 200 | #define ZORRO_PROD_SPIRIT_TECHNOLOGY_OCTABYTE ZORRO_ID(SPIRIT_TECHNOLOGY, 0x06, 0) | ||
| 201 | #define ZORRO_PROD_SPIRIT_TECHNOLOGY_INMATE ZORRO_ID(SPIRIT_TECHNOLOGY, 0x08, 0) | ||
| 202 | |||
| 203 | #define ZORRO_MANUF_SPIRIT_TECHNOLOGY_2 0x07F3 | ||
| 204 | |||
| 205 | #define ZORRO_MANUF_BSC_ALFADATA_1 0x07FE | ||
| 206 | #define ZORRO_PROD_BSC_ALF_3_1 ZORRO_ID(BSC_ALFADATA_1, 0x03, 0) | ||
| 207 | |||
| 208 | #define ZORRO_MANUF_BSC_ALFADATA_2 0x0801 | ||
| 209 | #define ZORRO_PROD_BSC_ALF_2_1 ZORRO_ID(BSC_ALFADATA_2, 0x01, 0) | ||
| 210 | #define ZORRO_PROD_BSC_ALF_2_2 ZORRO_ID(BSC_ALFADATA_2, 0x02, 0) | ||
| 211 | #define ZORRO_PROD_BSC_ALF_3_2 ZORRO_ID(BSC_ALFADATA_2, 0x03, 0) | ||
| 212 | |||
| 213 | #define ZORRO_MANUF_CARDCO_2 0x0802 | ||
| 214 | #define ZORRO_PROD_CARDCO_KRONOS_2000_2 ZORRO_ID(CARDCO_2, 0x04, 0) | ||
| 215 | #define ZORRO_PROD_CARDCO_A1000_2 ZORRO_ID(CARDCO_2, 0x0C, 0) | ||
| 216 | |||
| 217 | #define ZORRO_MANUF_JOCHHEIM 0x0804 | ||
| 218 | #define ZORRO_PROD_JOCHHEIM_RAM ZORRO_ID(JOCHHEIM, 0x01, 0) | ||
| 219 | |||
| 220 | #define ZORRO_MANUF_CHECKPOINT_TECHNOLOGIES 0x0807 | ||
| 221 | #define ZORRO_PROD_CHECKPOINT_TECHNOLOGIES_SERIAL_SOLUTION ZORRO_ID(CHECKPOINT_TECHNOLOGIES, 0x00, 0) | ||
| 222 | |||
| 223 | #define ZORRO_MANUF_EDOTRONIK 0x0810 | ||
| 224 | #define ZORRO_PROD_EDOTRONIK_IEEE_488 ZORRO_ID(EDOTRONIK, 0x01, 0) | ||
| 225 | #define ZORRO_PROD_EDOTRONIK_8032 ZORRO_ID(EDOTRONIK, 0x02, 0) | ||
| 226 | #define ZORRO_PROD_EDOTRONIK_MULTISERIAL ZORRO_ID(EDOTRONIK, 0x03, 0) | ||
| 227 | #define ZORRO_PROD_EDOTRONIK_VIDEODIGITIZER ZORRO_ID(EDOTRONIK, 0x04, 0) | ||
| 228 | #define ZORRO_PROD_EDOTRONIK_PARALLEL_IO ZORRO_ID(EDOTRONIK, 0x05, 0) | ||
| 229 | #define ZORRO_PROD_EDOTRONIK_PIC_PROTOYPING ZORRO_ID(EDOTRONIK, 0x06, 0) | ||
| 230 | #define ZORRO_PROD_EDOTRONIK_ADC ZORRO_ID(EDOTRONIK, 0x07, 0) | ||
| 231 | #define ZORRO_PROD_EDOTRONIK_VME ZORRO_ID(EDOTRONIK, 0x08, 0) | ||
| 232 | #define ZORRO_PROD_EDOTRONIK_DSP96000 ZORRO_ID(EDOTRONIK, 0x09, 0) | ||
| 233 | |||
| 234 | #define ZORRO_MANUF_NES_INC 0x0813 | ||
| 235 | #define ZORRO_PROD_NES_INC_RAM ZORRO_ID(NES_INC, 0x00, 0) | ||
| 236 | |||
| 237 | #define ZORRO_MANUF_ICD 0x0817 | ||
| 238 | #define ZORRO_PROD_ICD_ADVANTAGE_2000_SCSI ZORRO_ID(ICD, 0x01, 0) | ||
| 239 | #define ZORRO_PROD_ICD_ADVANTAGE_IDE ZORRO_ID(ICD, 0x03, 0) | ||
| 240 | #define ZORRO_PROD_ICD_ADVANTAGE_2080_RAM ZORRO_ID(ICD, 0x04, 0) | ||
| 241 | |||
| 242 | #define ZORRO_MANUF_KUPKE_2 0x0819 | ||
| 243 | #define ZORRO_PROD_KUPKE_OMTI ZORRO_ID(KUPKE_2, 0x01, 0) | ||
| 244 | #define ZORRO_PROD_KUPKE_SCSI_II ZORRO_ID(KUPKE_2, 0x02, 0) | ||
| 245 | #define ZORRO_PROD_KUPKE_GOLEM_BOX ZORRO_ID(KUPKE_2, 0x03, 0) | ||
| 246 | #define ZORRO_PROD_KUPKE_030_882 ZORRO_ID(KUPKE_2, 0x04, 0) | ||
| 247 | #define ZORRO_PROD_KUPKE_SCSI_AT ZORRO_ID(KUPKE_2, 0x05, 0) | ||
| 248 | |||
| 249 | #define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_3 0x081D | ||
| 250 | #define ZORRO_PROD_GVP_A2000_RAM8 ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x09, 0) | ||
| 251 | #define ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x0A, 0) | ||
| 252 | |||
| 253 | #define ZORRO_MANUF_INTERWORKS_NETWORK 0x081E | ||
| 254 | |||
| 255 | #define ZORRO_MANUF_HARDITAL_SYNTHESIS 0x0820 | ||
| 256 | #define ZORRO_PROD_HARDITAL_SYNTHESIS_TQM_68030_68882 ZORRO_ID(HARDITAL_SYNTHESIS, 0x14, 0) | ||
| 257 | |||
| 258 | #define ZORRO_MANUF_APPLIED_ENGINEERING 0x0828 | ||
| 259 | #define ZORRO_PROD_APPLIED_ENGINEERING_DL2000 ZORRO_ID(APPLIED_ENGINEERING, 0x10, 0) | ||
| 260 | #define ZORRO_PROD_APPLIED_ENGINEERING_RAM_WORKS ZORRO_ID(APPLIED_ENGINEERING, 0xE0, 0) | ||
| 261 | |||
| 262 | #define ZORRO_MANUF_BSC_ALFADATA_3 0x082C | ||
| 263 | #define ZORRO_PROD_BSC_OKTAGON_2008 ZORRO_ID(BSC_ALFADATA_3, 0x05, 0) | ||
| 264 | #define ZORRO_PROD_BSC_TANDEM_AT_2008_508 ZORRO_ID(BSC_ALFADATA_3, 0x06, 0) | ||
| 265 | #define ZORRO_PROD_BSC_ALFA_RAM_1200 ZORRO_ID(BSC_ALFADATA_3, 0x07, 0) | ||
| 266 | #define ZORRO_PROD_BSC_OKTAGON_2008_RAM ZORRO_ID(BSC_ALFADATA_3, 0x08, 0) | ||
| 267 | #define ZORRO_PROD_BSC_MULTIFACE_I ZORRO_ID(BSC_ALFADATA_3, 0x10, 0) | ||
| 268 | #define ZORRO_PROD_BSC_MULTIFACE_II ZORRO_ID(BSC_ALFADATA_3, 0x11, 0) | ||
| 269 | #define ZORRO_PROD_BSC_MULTIFACE_III ZORRO_ID(BSC_ALFADATA_3, 0x12, 0) | ||
| 270 | #define ZORRO_PROD_BSC_FRAMEMASTER_II ZORRO_ID(BSC_ALFADATA_3, 0x20, 0) | ||
| 271 | #define ZORRO_PROD_BSC_GRAFFITI_RAM ZORRO_ID(BSC_ALFADATA_3, 0x21, 0) | ||
| 272 | #define ZORRO_PROD_BSC_GRAFFITI_REG ZORRO_ID(BSC_ALFADATA_3, 0x22, 0) | ||
| 273 | #define ZORRO_PROD_BSC_ISDN_MASTERCARD ZORRO_ID(BSC_ALFADATA_3, 0x40, 0) | ||
| 274 | #define ZORRO_PROD_BSC_ISDN_MASTERCARD_II ZORRO_ID(BSC_ALFADATA_3, 0x41, 0) | ||
| 275 | |||
| 276 | #define ZORRO_MANUF_PHOENIX 0x0835 | ||
| 277 | #define ZORRO_PROD_PHOENIX_ST506 ZORRO_ID(PHOENIX, 0x21, 0) | ||
| 278 | #define ZORRO_PROD_PHOENIX_SCSI ZORRO_ID(PHOENIX, 0x22, 0) | ||
| 279 | #define ZORRO_PROD_PHOENIX_RAM ZORRO_ID(PHOENIX, 0xBE, 0) | ||
| 280 | |||
| 281 | #define ZORRO_MANUF_ADVANCED_STORAGE_SYSTEMS 0x0836 | ||
| 282 | #define ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x01, 0) | ||
| 283 | #define ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS_RAM ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x08, 0) | ||
| 284 | |||
| 285 | #define ZORRO_MANUF_IMPULSE 0x0838 | ||
| 286 | #define ZORRO_PROD_IMPULSE_FIRECRACKER_24 ZORRO_ID(IMPULSE, 0x00, 0) | ||
| 287 | |||
| 288 | #define ZORRO_MANUF_IVS 0x0840 | ||
| 289 | #define ZORRO_PROD_IVS_GRANDSLAM_PIC_2 ZORRO_ID(IVS, 0x02, 0) | ||
| 290 | #define ZORRO_PROD_IVS_GRANDSLAM_PIC_1 ZORRO_ID(IVS, 0x04, 0) | ||
| 291 | #define ZORRO_PROD_IVS_OVERDRIVE ZORRO_ID(IVS, 0x10, 0) | ||
| 292 | #define ZORRO_PROD_IVS_TRUMPCARD_CLASSIC ZORRO_ID(IVS, 0x30, 0) | ||
| 293 | #define ZORRO_PROD_IVS_TRUMPCARD_PRO_GRANDSLAM ZORRO_ID(IVS, 0x34, 0) | ||
| 294 | #define ZORRO_PROD_IVS_META_4 ZORRO_ID(IVS, 0x40, 0) | ||
| 295 | #define ZORRO_PROD_IVS_WAVETOOLS ZORRO_ID(IVS, 0xBF, 0) | ||
| 296 | #define ZORRO_PROD_IVS_VECTOR_1 ZORRO_ID(IVS, 0xF3, 0) | ||
| 297 | #define ZORRO_PROD_IVS_VECTOR_2 ZORRO_ID(IVS, 0xF4, 0) | ||
| 298 | |||
| 299 | #define ZORRO_MANUF_VECTOR_1 0x0841 | ||
| 300 | #define ZORRO_PROD_VECTOR_CONNECTION_1 ZORRO_ID(VECTOR_1, 0xE3, 0) | ||
| 301 | |||
| 302 | #define ZORRO_MANUF_XPERT_PRODEV 0x0845 | ||
| 303 | #define ZORRO_PROD_XPERT_PRODEV_VISIONA_RAM ZORRO_ID(XPERT_PRODEV, 0x01, 0) | ||
| 304 | #define ZORRO_PROD_XPERT_PRODEV_VISIONA_REG ZORRO_ID(XPERT_PRODEV, 0x02, 0) | ||
| 305 | #define ZORRO_PROD_XPERT_PRODEV_MERLIN_RAM ZORRO_ID(XPERT_PRODEV, 0x03, 0) | ||
| 306 | #define ZORRO_PROD_XPERT_PRODEV_MERLIN_REG_1 ZORRO_ID(XPERT_PRODEV, 0x04, 0) | ||
| 307 | #define ZORRO_PROD_XPERT_PRODEV_MERLIN_REG_2 ZORRO_ID(XPERT_PRODEV, 0xC9, 0) | ||
| 308 | |||
| 309 | #define ZORRO_MANUF_HYDRA_SYSTEMS 0x0849 | ||
| 310 | #define ZORRO_PROD_HYDRA_SYSTEMS_AMIGANET ZORRO_ID(HYDRA_SYSTEMS, 0x01, 0) | ||
| 311 | |||
| 312 | #define ZORRO_MANUF_SUNRIZE_INDUSTRIES 0x084F | ||
| 313 | #define ZORRO_PROD_SUNRIZE_INDUSTRIES_AD1012 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x01, 0) | ||
| 314 | #define ZORRO_PROD_SUNRIZE_INDUSTRIES_AD516 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x02, 0) | ||
| 315 | #define ZORRO_PROD_SUNRIZE_INDUSTRIES_DD512 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x03, 0) | ||
| 316 | |||
| 317 | #define ZORRO_MANUF_TRICERATOPS 0x0850 | ||
| 318 | #define ZORRO_PROD_TRICERATOPS_MULTI_IO ZORRO_ID(TRICERATOPS, 0x01, 0) | ||
| 319 | |||
| 320 | #define ZORRO_MANUF_APPLIED_MAGIC 0x0851 | ||
| 321 | #define ZORRO_PROD_APPLIED_MAGIC_DMI_RESOLVER ZORRO_ID(APPLIED_MAGIC, 0x01, 0) | ||
| 322 | #define ZORRO_PROD_APPLIED_MAGIC_DIGITAL_BROADCASTER ZORRO_ID(APPLIED_MAGIC, 0x06, 0) | ||
| 323 | |||
| 324 | #define ZORRO_MANUF_GFX_BASE 0x085E | ||
| 325 | #define ZORRO_PROD_GFX_BASE_GDA_1_VRAM ZORRO_ID(GFX_BASE, 0x00, 0) | ||
| 326 | #define ZORRO_PROD_GFX_BASE_GDA_1 ZORRO_ID(GFX_BASE, 0x01, 0) | ||
| 327 | |||
| 328 | #define ZORRO_MANUF_ROCTEC 0x0860 | ||
| 329 | #define ZORRO_PROD_ROCTEC_RH_800C ZORRO_ID(ROCTEC, 0x01, 0) | ||
| 330 | #define ZORRO_PROD_ROCTEC_RH_800C_RAM ZORRO_ID(ROCTEC, 0x01, 0) | ||
| 331 | |||
| 332 | #define ZORRO_MANUF_KATO 0x0861 | ||
| 333 | #define ZORRO_PROD_KATO_MELODY ZORRO_ID(KATO, 0x80, 0) | ||
| 334 | /* ID clash!! */ | ||
| 335 | #define ZORRO_MANUF_HELFRICH_1 0x0861 | ||
| 336 | #define ZORRO_PROD_HELFRICH_RAINBOW_II ZORRO_ID(HELFRICH_1, 0x20, 0) | ||
| 337 | #define ZORRO_PROD_HELFRICH_RAINBOW_III ZORRO_ID(HELFRICH_1, 0x21, 0) | ||
| 338 | |||
| 339 | #define ZORRO_MANUF_ATLANTIS 0x0862 | ||
| 340 | |||
| 341 | #define ZORRO_MANUF_PROTAR 0x0864 | ||
| 342 | |||
| 343 | #define ZORRO_MANUF_ACS 0x0865 | ||
| 344 | |||
| 345 | #define ZORRO_MANUF_SOFTWARE_RESULTS_ENTERPRISES 0x0866 | ||
| 346 | #define ZORRO_PROD_SOFTWARE_RESULTS_ENTERPRISES_GOLDEN_GATE_2_BUS_PLUS ZORRO_ID(SOFTWARE_RESULTS_ENTERPRISES, 0x01, 0) | ||
| 347 | |||
| 348 | #define ZORRO_MANUF_MASOBOSHI 0x086D | ||
| 349 | #define ZORRO_PROD_MASOBOSHI_MASTER_CARD_SC201 ZORRO_ID(MASOBOSHI, 0x03, 0) | ||
| 350 | #define ZORRO_PROD_MASOBOSHI_MASTER_CARD_MC702 ZORRO_ID(MASOBOSHI, 0x04, 0) | ||
| 351 | #define ZORRO_PROD_MASOBOSHI_MVD_819 ZORRO_ID(MASOBOSHI, 0x07, 0) | ||
| 352 | |||
| 353 | #define ZORRO_MANUF_MAINHATTAN_DATA 0x086F | ||
| 354 | #define ZORRO_PROD_MAINHATTAN_DATA_IDE ZORRO_ID(MAINHATTAN_DATA, 0x01, 0) | ||
| 355 | |||
| 356 | #define ZORRO_MANUF_VILLAGE_TRONIC 0x0877 | ||
| 357 | #define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_RAM ZORRO_ID(VILLAGE_TRONIC, 0x01, 0) | ||
| 358 | #define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_REG ZORRO_ID(VILLAGE_TRONIC, 0x02, 0) | ||
| 359 | #define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_16M_PROTOTYPE ZORRO_ID(VILLAGE_TRONIC, 0x03, 0) | ||
| 360 | #define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_RAM ZORRO_ID(VILLAGE_TRONIC, 0x0B, 0) | ||
| 361 | #define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_REG ZORRO_ID(VILLAGE_TRONIC, 0x0C, 0) | ||
| 362 | #define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_SEGMENTED_MODE ZORRO_ID(VILLAGE_TRONIC, 0x0D, 0) | ||
| 363 | #define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_RAM1 ZORRO_ID(VILLAGE_TRONIC, 0x15, 0) | ||
| 364 | #define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_RAM2 ZORRO_ID(VILLAGE_TRONIC, 0x16, 0) | ||
| 365 | #define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_REG ZORRO_ID(VILLAGE_TRONIC, 0x17, 0) | ||
| 366 | #define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z3 ZORRO_ID(VILLAGE_TRONIC, 0x18, 0) | ||
| 367 | #define ZORRO_PROD_VILLAGE_TRONIC_ARIADNE ZORRO_ID(VILLAGE_TRONIC, 0xC9, 0) | ||
| 368 | #define ZORRO_PROD_VILLAGE_TRONIC_ARIADNE2 ZORRO_ID(VILLAGE_TRONIC, 0xCA, 0) | ||
| 369 | |||
| 370 | #define ZORRO_MANUF_UTILITIES_UNLIMITED 0x087B | ||
| 371 | #define ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE ZORRO_ID(UTILITIES_UNLIMITED, 0x15, 0) | ||
| 372 | #define ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE2 ZORRO_ID(UTILITIES_UNLIMITED, 0x20, 0) | ||
| 373 | |||
| 374 | #define ZORRO_MANUF_AMITRIX 0x0880 | ||
| 375 | #define ZORRO_PROD_AMITRIX_MULTI_IO ZORRO_ID(AMITRIX, 0x01, 0) | ||
| 376 | #define ZORRO_PROD_AMITRIX_CD_RAM ZORRO_ID(AMITRIX, 0x02, 0) | ||
| 377 | |||
| 378 | #define ZORRO_MANUF_ARMAX 0x0885 | ||
| 379 | #define ZORRO_PROD_ARMAX_OMNIBUS ZORRO_ID(ARMAX, 0x00, 0) | ||
| 380 | |||
| 381 | #define ZORRO_MANUF_ZEUS 0x088D | ||
| 382 | #define ZORRO_PROD_ZEUS_SPIDER ZORRO_ID(ZEUS, 0x04, 0) | ||
| 383 | |||
| 384 | #define ZORRO_MANUF_NEWTEK 0x088F | ||
| 385 | #define ZORRO_PROD_NEWTEK_VIDEOTOASTER ZORRO_ID(NEWTEK, 0x00, 0) | ||
| 386 | |||
| 387 | #define ZORRO_MANUF_M_TECH_GERMANY 0x0890 | ||
| 388 | #define ZORRO_PROD_MTEC_AT500_2 ZORRO_ID(M_TECH_GERMANY, 0x01, 0) | ||
| 389 | #define ZORRO_PROD_MTEC_68030 ZORRO_ID(M_TECH_GERMANY, 0x03, 0) | ||
| 390 | #define ZORRO_PROD_MTEC_68020I ZORRO_ID(M_TECH_GERMANY, 0x06, 0) | ||
| 391 | #define ZORRO_PROD_MTEC_A1200_T68030_RTC ZORRO_ID(M_TECH_GERMANY, 0x20, 0) | ||
| 392 | #define ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530 ZORRO_ID(M_TECH_GERMANY, 0x21, 0) | ||
| 393 | #define ZORRO_PROD_MTEC_8_MB_RAM ZORRO_ID(M_TECH_GERMANY, 0x22, 0) | ||
| 394 | #define ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530_SCSI_IDE ZORRO_ID(M_TECH_GERMANY, 0x24, 0) | ||
| 395 | |||
| 396 | #define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_4 0x0891 | ||
| 397 | #define ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_RAM ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x01, 0) | ||
| 398 | #define ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_REG ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x02, 0) | ||
| 399 | |||
| 400 | #define ZORRO_MANUF_APOLLO_1 0x0892 | ||
| 401 | #define ZORRO_PROD_APOLLO_A1200 ZORRO_ID(APOLLO_1, 0x01, 0) | ||
| 402 | |||
| 403 | #define ZORRO_MANUF_HELFRICH_2 0x0893 | ||
| 404 | #define ZORRO_PROD_HELFRICH_PICCOLO_RAM ZORRO_ID(HELFRICH_2, 0x05, 0) | ||
| 405 | #define ZORRO_PROD_HELFRICH_PICCOLO_REG ZORRO_ID(HELFRICH_2, 0x06, 0) | ||
| 406 | #define ZORRO_PROD_HELFRICH_PEGGY_PLUS_MPEG ZORRO_ID(HELFRICH_2, 0x07, 0) | ||
| 407 | #define ZORRO_PROD_HELFRICH_VIDEOCRUNCHER ZORRO_ID(HELFRICH_2, 0x08, 0) | ||
| 408 | #define ZORRO_PROD_HELFRICH_SD64_RAM ZORRO_ID(HELFRICH_2, 0x0A, 0) | ||
| 409 | #define ZORRO_PROD_HELFRICH_SD64_REG ZORRO_ID(HELFRICH_2, 0x0B, 0) | ||
| 410 | |||
| 411 | #define ZORRO_MANUF_MACROSYSTEMS_USA 0x089B | ||
| 412 | #define ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx ZORRO_ID(MACROSYSTEMS_USA, 0x13, 0) | ||
| 413 | |||
| 414 | #define ZORRO_MANUF_ELBOX_COMPUTER 0x089E | ||
| 415 | #define ZORRO_PROD_ELBOX_COMPUTER_1200_4 ZORRO_ID(ELBOX_COMPUTER, 0x06, 0) | ||
| 416 | |||
| 417 | #define ZORRO_MANUF_HARMS_PROFESSIONAL 0x0A00 | ||
| 418 | #define ZORRO_PROD_HARMS_PROFESSIONAL_030_PLUS ZORRO_ID(HARMS_PROFESSIONAL, 0x10, 0) | ||
| 419 | #define ZORRO_PROD_HARMS_PROFESSIONAL_3500 ZORRO_ID(HARMS_PROFESSIONAL, 0xD0, 0) | ||
| 420 | |||
| 421 | #define ZORRO_MANUF_MICRONIK 0x0A50 | ||
| 422 | #define ZORRO_PROD_MICRONIK_RCA_120 ZORRO_ID(MICRONIK, 0x0A, 0) | ||
| 423 | |||
| 424 | #define ZORRO_MANUF_MICRONIK2 0x0F0F | ||
| 425 | #define ZORRO_PROD_MICRONIK2_Z3I ZORRO_ID(MICRONIK2, 0x01, 0) | ||
| 426 | |||
| 427 | #define ZORRO_MANUF_MEGAMICRO 0x1000 | ||
| 428 | #define ZORRO_PROD_MEGAMICRO_SCRAM_500 ZORRO_ID(MEGAMICRO, 0x03, 0) | ||
| 429 | #define ZORRO_PROD_MEGAMICRO_SCRAM_500_RAM ZORRO_ID(MEGAMICRO, 0x04, 0) | ||
| 430 | |||
| 431 | #define ZORRO_MANUF_IMTRONICS_2 0x1028 | ||
| 432 | #define ZORRO_PROD_IMTRONICS_HURRICANE_2800_3 ZORRO_ID(IMTRONICS_2, 0x39, 0) | ||
| 433 | #define ZORRO_PROD_IMTRONICS_HURRICANE_2800_4 ZORRO_ID(IMTRONICS_2, 0x57, 0) | ||
| 434 | |||
| 435 | /* unofficial ID */ | ||
| 436 | #define ZORRO_MANUF_INDIVIDUAL_COMPUTERS 0x1212 | ||
| 437 | #define ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x00, 0) | ||
| 438 | #define ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x17, 0) | ||
| 439 | #define ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x2A, 0) | ||
| 440 | |||
| 441 | #define ZORRO_MANUF_KUPKE_3 0x1248 | ||
| 442 | #define ZORRO_PROD_KUPKE_GOLEM_HD_3000 ZORRO_ID(KUPKE_3, 0x01, 0) | ||
| 443 | |||
| 444 | #define ZORRO_MANUF_ITH 0x1388 | ||
| 445 | #define ZORRO_PROD_ITH_ISDN_MASTER_II ZORRO_ID(ITH, 0x01, 0) | ||
| 446 | |||
| 447 | #define ZORRO_MANUF_VMC 0x1389 | ||
| 448 | #define ZORRO_PROD_VMC_ISDN_BLASTER_Z2 ZORRO_ID(VMC, 0x01, 0) | ||
| 449 | #define ZORRO_PROD_VMC_HYPERCOM_4 ZORRO_ID(VMC, 0x02, 0) | ||
| 450 | |||
| 451 | #define ZORRO_MANUF_INFORMATION 0x157C | ||
| 452 | #define ZORRO_PROD_INFORMATION_ISDN_ENGINE_I ZORRO_ID(INFORMATION, 0x64, 0) | ||
| 453 | |||
| 454 | #define ZORRO_MANUF_VORTEX 0x2017 | ||
| 455 | #define ZORRO_PROD_VORTEX_GOLDEN_GATE_80386SX ZORRO_ID(VORTEX, 0x07, 0) | ||
| 456 | #define ZORRO_PROD_VORTEX_GOLDEN_GATE_RAM ZORRO_ID(VORTEX, 0x08, 0) | ||
| 457 | #define ZORRO_PROD_VORTEX_GOLDEN_GATE_80486 ZORRO_ID(VORTEX, 0x09, 0) | ||
| 458 | |||
| 459 | #define ZORRO_MANUF_EXPANSION_SYSTEMS 0x2062 | ||
| 460 | #define ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX ZORRO_ID(EXPANSION_SYSTEMS, 0x01, 0) | ||
| 461 | #define ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX_RAM ZORRO_ID(EXPANSION_SYSTEMS, 0x02, 0) | ||
| 462 | |||
| 463 | #define ZORRO_MANUF_READYSOFT 0x2100 | ||
| 464 | #define ZORRO_PROD_READYSOFT_AMAX_II_IV ZORRO_ID(READYSOFT, 0x01, 0) | ||
| 465 | |||
| 466 | #define ZORRO_MANUF_PHASE5 0x2140 | ||
| 467 | #define ZORRO_PROD_PHASE5_BLIZZARD_RAM ZORRO_ID(PHASE5, 0x01, 0) | ||
| 468 | #define ZORRO_PROD_PHASE5_BLIZZARD ZORRO_ID(PHASE5, 0x02, 0) | ||
| 469 | #define ZORRO_PROD_PHASE5_BLIZZARD_1220_IV ZORRO_ID(PHASE5, 0x06, 0) | ||
| 470 | #define ZORRO_PROD_PHASE5_FASTLANE_Z3_RAM ZORRO_ID(PHASE5, 0x0A, 0) | ||
| 471 | #define ZORRO_PROD_PHASE5_BLIZZARD_1230_II_FASTLANE_Z3_CYBERSCSI_CYBERSTORM060 ZORRO_ID(PHASE5, 0x0B, 0) | ||
| 472 | #define ZORRO_PROD_PHASE5_BLIZZARD_1220_CYBERSTORM ZORRO_ID(PHASE5, 0x0C, 0) | ||
| 473 | #define ZORRO_PROD_PHASE5_BLIZZARD_1230 ZORRO_ID(PHASE5, 0x0D, 0) | ||
| 474 | #define ZORRO_PROD_PHASE5_BLIZZARD_1230_IV_1260 ZORRO_ID(PHASE5, 0x11, 0) | ||
| 475 | #define ZORRO_PROD_PHASE5_BLIZZARD_2060 ZORRO_ID(PHASE5, 0x18, 0) | ||
| 476 | #define ZORRO_PROD_PHASE5_CYBERSTORM_MK_II ZORRO_ID(PHASE5, 0x19, 0) | ||
| 477 | #define ZORRO_PROD_PHASE5_CYBERVISION64 ZORRO_ID(PHASE5, 0x22, 0) | ||
| 478 | #define ZORRO_PROD_PHASE5_CYBERVISION64_3D_PROTOTYPE ZORRO_ID(PHASE5, 0x32, 0) | ||
| 479 | #define ZORRO_PROD_PHASE5_CYBERVISION64_3D ZORRO_ID(PHASE5, 0x43, 0) | ||
| 480 | #define ZORRO_PROD_PHASE5_CYBERSTORM_MK_III ZORRO_ID(PHASE5, 0x64, 0) | ||
| 481 | #define ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS ZORRO_ID(PHASE5, 0x6e, 0) | ||
| 482 | |||
| 483 | #define ZORRO_MANUF_DPS 0x2169 | ||
| 484 | #define ZORRO_PROD_DPS_PERSONAL_ANIMATION_RECORDER ZORRO_ID(DPS, 0x01, 0) | ||
| 485 | |||
| 486 | #define ZORRO_MANUF_APOLLO_2 0x2200 | ||
| 487 | #define ZORRO_PROD_APOLLO_A620_68020_1 ZORRO_ID(APOLLO_2, 0x00, 0) | ||
| 488 | #define ZORRO_PROD_APOLLO_A620_68020_2 ZORRO_ID(APOLLO_2, 0x01, 0) | ||
| 489 | |||
| 490 | #define ZORRO_MANUF_APOLLO_3 0x2222 | ||
| 491 | #define ZORRO_PROD_APOLLO_AT_APOLLO ZORRO_ID(APOLLO_3, 0x22, 0) | ||
| 492 | #define ZORRO_PROD_APOLLO_1230_1240_1260_2030_4040_4060 ZORRO_ID(APOLLO_3, 0x23, 0) | ||
| 493 | |||
| 494 | #define ZORRO_MANUF_PETSOFF_LP 0x38A5 | ||
| 495 | #define ZORRO_PROD_PETSOFF_LP_DELFINA ZORRO_ID(PETSOFF_LP, 0x00, 0) | ||
| 496 | #define ZORRO_PROD_PETSOFF_LP_DELFINA_LITE ZORRO_ID(PETSOFF_LP, 0x01, 0) | ||
| 497 | |||
| 498 | #define ZORRO_MANUF_UWE_GERLACH 0x3FF7 | ||
| 499 | #define ZORRO_PROD_UWE_GERLACH_RAM_ROM ZORRO_ID(UWE_GERLACH, 0xd4, 0) | ||
| 500 | |||
| 501 | #define ZORRO_MANUF_ACT 0x4231 | ||
| 502 | #define ZORRO_PROD_ACT_PRELUDE ZORRO_ID(ACT, 0x01, 0) | ||
| 503 | |||
| 504 | #define ZORRO_MANUF_MACROSYSTEMS_GERMANY 0x4754 | ||
| 505 | #define ZORRO_PROD_MACROSYSTEMS_MAESTRO ZORRO_ID(MACROSYSTEMS_GERMANY, 0x03, 0) | ||
| 506 | #define ZORRO_PROD_MACROSYSTEMS_VLAB ZORRO_ID(MACROSYSTEMS_GERMANY, 0x04, 0) | ||
| 507 | #define ZORRO_PROD_MACROSYSTEMS_MAESTRO_PRO ZORRO_ID(MACROSYSTEMS_GERMANY, 0x05, 0) | ||
| 508 | #define ZORRO_PROD_MACROSYSTEMS_RETINA ZORRO_ID(MACROSYSTEMS_GERMANY, 0x06, 0) | ||
| 509 | #define ZORRO_PROD_MACROSYSTEMS_MULTI_EVOLUTION ZORRO_ID(MACROSYSTEMS_GERMANY, 0x08, 0) | ||
| 510 | #define ZORRO_PROD_MACROSYSTEMS_TOCCATA ZORRO_ID(MACROSYSTEMS_GERMANY, 0x0C, 0) | ||
| 511 | #define ZORRO_PROD_MACROSYSTEMS_RETINA_Z3 ZORRO_ID(MACROSYSTEMS_GERMANY, 0x10, 0) | ||
| 512 | #define ZORRO_PROD_MACROSYSTEMS_VLAB_MOTION ZORRO_ID(MACROSYSTEMS_GERMANY, 0x12, 0) | ||
| 513 | #define ZORRO_PROD_MACROSYSTEMS_ALTAIS ZORRO_ID(MACROSYSTEMS_GERMANY, 0x13, 0) | ||
| 514 | #define ZORRO_PROD_MACROSYSTEMS_FALCON_040 ZORRO_ID(MACROSYSTEMS_GERMANY, 0xFD, 0) | ||
| 515 | |||
| 516 | #define ZORRO_MANUF_COMBITEC 0x6766 | ||
| 517 | |||
| 518 | #define ZORRO_MANUF_SKI_PERIPHERALS 0x8000 | ||
| 519 | #define ZORRO_PROD_SKI_PERIPHERALS_MAST_FIREBALL ZORRO_ID(SKI_PERIPHERALS, 0x08, 0) | ||
| 520 | #define ZORRO_PROD_SKI_PERIPHERALS_SCSI_DUAL_SERIAL ZORRO_ID(SKI_PERIPHERALS, 0x80, 0) | ||
| 521 | |||
| 522 | #define ZORRO_MANUF_REIS_WARE_2 0xA9AD | ||
| 523 | #define ZORRO_PROD_REIS_WARE_SCAN_KING ZORRO_ID(REIS_WARE_2, 0x11, 0) | ||
| 524 | |||
| 525 | #define ZORRO_MANUF_CAMERON 0xAA01 | ||
| 526 | #define ZORRO_PROD_CAMERON_PERSONAL_A4 ZORRO_ID(CAMERON, 0x10, 0) | ||
| 527 | |||
| 528 | #define ZORRO_MANUF_REIS_WARE 0xAA11 | ||
| 529 | #define ZORRO_PROD_REIS_WARE_HANDYSCANNER ZORRO_ID(REIS_WARE, 0x11, 0) | ||
| 530 | |||
| 531 | #define ZORRO_MANUF_PHOENIX_2 0xB5A8 | ||
| 532 | #define ZORRO_PROD_PHOENIX_ST506_2 ZORRO_ID(PHOENIX_2, 0x21, 0) | ||
| 533 | #define ZORRO_PROD_PHOENIX_SCSI_2 ZORRO_ID(PHOENIX_2, 0x22, 0) | ||
| 534 | #define ZORRO_PROD_PHOENIX_RAM_2 ZORRO_ID(PHOENIX_2, 0xBE, 0) | ||
| 535 | |||
| 536 | #define ZORRO_MANUF_COMBITEC_2 0xC008 | ||
| 537 | #define ZORRO_PROD_COMBITEC_HD ZORRO_ID(COMBITEC_2, 0x2A, 0) | ||
| 538 | #define ZORRO_PROD_COMBITEC_SRAM ZORRO_ID(COMBITEC_2, 0x2B, 0) | ||
| 539 | |||
| 540 | |||
| 541 | /* | ||
| 542 | * Test and illegal Manufacturer IDs. | ||
| 543 | */ | ||
| 544 | |||
| 545 | #define ZORRO_MANUF_HACKER 0x07DB | ||
| 546 | #define ZORRO_PROD_GENERAL_PROTOTYPE ZORRO_ID(HACKER, 0x00, 0) | ||
| 547 | #define ZORRO_PROD_HACKER_SCSI ZORRO_ID(HACKER, 0x01, 0) | ||
| 548 | #define ZORRO_PROD_RESOURCE_MANAGEMENT_FORCE_QUICKNET_QN2000 ZORRO_ID(HACKER, 0x02, 0) | ||
| 549 | #define ZORRO_PROD_VECTOR_CONNECTION_2 ZORRO_ID(HACKER, 0xE0, 0) | ||
| 550 | #define ZORRO_PROD_VECTOR_CONNECTION_3 ZORRO_ID(HACKER, 0xE1, 0) | ||
| 551 | #define ZORRO_PROD_VECTOR_CONNECTION_4 ZORRO_ID(HACKER, 0xE2, 0) | ||
| 552 | #define ZORRO_PROD_VECTOR_CONNECTION_5 ZORRO_ID(HACKER, 0xE3, 0) | ||
