diff options
Diffstat (limited to 'include')
219 files changed, 5206 insertions, 1462 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 23e364538ab5..c1d4105e1c1d 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
| @@ -110,9 +110,6 @@ static inline int __gpio_to_irq(unsigned gpio) | |||
| 110 | return gpiod_to_irq(gpio_to_desc(gpio)); | 110 | return gpiod_to_irq(gpio_to_desc(gpio)); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | extern int gpio_lock_as_irq(struct gpio_chip *chip, unsigned int offset); | ||
| 114 | extern void gpio_unlock_as_irq(struct gpio_chip *chip, unsigned int offset); | ||
| 115 | |||
| 116 | extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *label); | 113 | extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *label); |
| 117 | extern int gpio_request_array(const struct gpio *array, size_t num); | 114 | extern int gpio_request_array(const struct gpio *array, size_t num); |
| 118 | extern void gpio_free_array(const struct gpio *array, size_t num); | 115 | extern void gpio_free_array(const struct gpio *array, size_t num); |
diff --git a/include/asm-generic/pci-dma-compat.h b/include/asm-generic/pci-dma-compat.h index 1437b7da09b2..c110843fc53b 100644 --- a/include/asm-generic/pci-dma-compat.h +++ b/include/asm-generic/pci-dma-compat.h | |||
| @@ -19,6 +19,14 @@ pci_alloc_consistent(struct pci_dev *hwdev, size_t size, | |||
| 19 | return dma_alloc_coherent(hwdev == NULL ? NULL : &hwdev->dev, size, dma_handle, GFP_ATOMIC); | 19 | return dma_alloc_coherent(hwdev == NULL ? NULL : &hwdev->dev, size, dma_handle, GFP_ATOMIC); |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | static inline void * | ||
| 23 | pci_zalloc_consistent(struct pci_dev *hwdev, size_t size, | ||
| 24 | dma_addr_t *dma_handle) | ||
| 25 | { | ||
| 26 | return dma_zalloc_coherent(hwdev == NULL ? NULL : &hwdev->dev, | ||
| 27 | size, dma_handle, GFP_ATOMIC); | ||
| 28 | } | ||
| 29 | |||
| 22 | static inline void | 30 | static inline void |
| 23 | pci_free_consistent(struct pci_dev *hwdev, size_t size, | 31 | pci_free_consistent(struct pci_dev *hwdev, size_t size, |
| 24 | void *vaddr, dma_addr_t dma_handle) | 32 | void *vaddr, dma_addr_t dma_handle) |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index e41f17ea1f13..196890735367 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
| @@ -152,8 +152,6 @@ int drm_err(const char *func, const char *format, ...); | |||
| 152 | also include looping detection. */ | 152 | also include looping detection. */ |
| 153 | 153 | ||
| 154 | #define DRM_MAGIC_HASH_ORDER 4 /**< Size of key hash table. Must be power of 2. */ | 154 | #define DRM_MAGIC_HASH_ORDER 4 /**< Size of key hash table. Must be power of 2. */ |
| 155 | #define DRM_KERNEL_CONTEXT 0 /**< Change drm_resctx if changed */ | ||
| 156 | #define DRM_RESERVED_CONTEXTS 1 /**< Change drm_resctx if changed */ | ||
| 157 | 155 | ||
| 158 | #define DRM_MAP_HASH_OFFSET 0x10000000 | 156 | #define DRM_MAP_HASH_OFFSET 0x10000000 |
| 159 | 157 | ||
| @@ -347,18 +345,6 @@ struct drm_waitlist { | |||
| 347 | spinlock_t write_lock; | 345 | spinlock_t write_lock; |
| 348 | }; | 346 | }; |
| 349 | 347 | ||
| 350 | struct drm_freelist { | ||
| 351 | int initialized; /**< Freelist in use */ | ||
| 352 | atomic_t count; /**< Number of free buffers */ | ||
| 353 | struct drm_buf *next; /**< End pointer */ | ||
| 354 | |||
| 355 | wait_queue_head_t waiting; /**< Processes waiting on free bufs */ | ||
| 356 | int low_mark; /**< Low water mark */ | ||
| 357 | int high_mark; /**< High water mark */ | ||
| 358 | atomic_t wfh; /**< If waiting for high mark */ | ||
| 359 | spinlock_t lock; | ||
| 360 | }; | ||
| 361 | |||
| 362 | typedef struct drm_dma_handle { | 348 | typedef struct drm_dma_handle { |
| 363 | dma_addr_t busaddr; | 349 | dma_addr_t busaddr; |
| 364 | void *vaddr; | 350 | void *vaddr; |
| @@ -376,7 +362,8 @@ struct drm_buf_entry { | |||
| 376 | int page_order; | 362 | int page_order; |
| 377 | struct drm_dma_handle **seglist; | 363 | struct drm_dma_handle **seglist; |
| 378 | 364 | ||
| 379 | struct drm_freelist freelist; | 365 | int low_mark; /**< Low water mark */ |
| 366 | int high_mark; /**< High water mark */ | ||
| 380 | }; | 367 | }; |
| 381 | 368 | ||
| 382 | /* Event queued up for userspace to read */ | 369 | /* Event queued up for userspace to read */ |
| @@ -397,7 +384,6 @@ struct drm_prime_file_private { | |||
| 397 | 384 | ||
| 398 | /** File private data */ | 385 | /** File private data */ |
| 399 | struct drm_file { | 386 | struct drm_file { |
| 400 | unsigned always_authenticated :1; | ||
| 401 | unsigned authenticated :1; | 387 | unsigned authenticated :1; |
| 402 | /* Whether we're master for a minor. Protected by master_mutex */ | 388 | /* Whether we're master for a minor. Protected by master_mutex */ |
| 403 | unsigned is_master :1; | 389 | unsigned is_master :1; |
| @@ -442,23 +428,6 @@ struct drm_file { | |||
| 442 | struct drm_prime_file_private prime; | 428 | struct drm_prime_file_private prime; |
| 443 | }; | 429 | }; |
| 444 | 430 | ||
| 445 | /** Wait queue */ | ||
| 446 | struct drm_queue { | ||
| 447 | atomic_t use_count; /**< Outstanding uses (+1) */ | ||
| 448 | atomic_t finalization; /**< Finalization in progress */ | ||
| 449 | atomic_t block_count; /**< Count of processes waiting */ | ||
| 450 | atomic_t block_read; /**< Queue blocked for reads */ | ||
| 451 | wait_queue_head_t read_queue; /**< Processes waiting on block_read */ | ||
| 452 | atomic_t block_write; /**< Queue blocked for writes */ | ||
| 453 | wait_queue_head_t write_queue; /**< Processes waiting on block_write */ | ||
| 454 | atomic_t total_queued; /**< Total queued statistic */ | ||
| 455 | atomic_t total_flushed; /**< Total flushes statistic */ | ||
| 456 | atomic_t total_locks; /**< Total locks statistics */ | ||
| 457 | enum drm_ctx_flags flags; /**< Context preserving and 2D-only */ | ||
| 458 | struct drm_waitlist waitlist; /**< Pending buffers */ | ||
| 459 | wait_queue_head_t flush_queue; /**< Processes waiting until flush */ | ||
| 460 | }; | ||
| 461 | |||
| 462 | /** | 431 | /** |
| 463 | * Lock data. | 432 | * Lock data. |
| 464 | */ | 433 | */ |
| @@ -567,15 +536,6 @@ struct drm_map_list { | |||
| 567 | struct drm_master *master; | 536 | struct drm_master *master; |
| 568 | }; | 537 | }; |
| 569 | 538 | ||
| 570 | /** | ||
| 571 | * Context handle list | ||
| 572 | */ | ||
| 573 | struct drm_ctx_list { | ||
| 574 | struct list_head head; /**< list head */ | ||
| 575 | drm_context_t handle; /**< context handle */ | ||
| 576 | struct drm_file *tag; /**< associated fd private data */ | ||
| 577 | }; | ||
| 578 | |||
| 579 | /* location of GART table */ | 539 | /* location of GART table */ |
| 580 | #define DRM_ATI_GART_MAIN 1 | 540 | #define DRM_ATI_GART_MAIN 1 |
| 581 | #define DRM_ATI_GART_FB 2 | 541 | #define DRM_ATI_GART_FB 2 |
| @@ -1218,7 +1178,6 @@ extern bool drm_ioctl_flags(unsigned int nr, unsigned int *flags); | |||
| 1218 | /* Device support (drm_fops.h) */ | 1178 | /* Device support (drm_fops.h) */ |
| 1219 | extern struct mutex drm_global_mutex; | 1179 | extern struct mutex drm_global_mutex; |
| 1220 | extern int drm_open(struct inode *inode, struct file *filp); | 1180 | extern int drm_open(struct inode *inode, struct file *filp); |
| 1221 | extern int drm_stub_open(struct inode *inode, struct file *filp); | ||
| 1222 | extern ssize_t drm_read(struct file *filp, char __user *buffer, | 1181 | extern ssize_t drm_read(struct file *filp, char __user *buffer, |
| 1223 | size_t count, loff_t *offset); | 1182 | size_t count, loff_t *offset); |
| 1224 | extern int drm_release(struct inode *inode, struct file *filp); | 1183 | extern int drm_release(struct inode *inode, struct file *filp); |
| @@ -1256,29 +1215,6 @@ extern int drm_setversion(struct drm_device *dev, void *data, | |||
| 1256 | extern int drm_noop(struct drm_device *dev, void *data, | 1215 | extern int drm_noop(struct drm_device *dev, void *data, |
| 1257 | struct drm_file *file_priv); | 1216 | struct drm_file *file_priv); |
| 1258 | 1217 | ||
| 1259 | /* Context IOCTL support (drm_context.h) */ | ||
| 1260 | extern int drm_resctx(struct drm_device *dev, void *data, | ||
| 1261 | struct drm_file *file_priv); | ||
| 1262 | extern int drm_addctx(struct drm_device *dev, void *data, | ||
| 1263 | struct drm_file *file_priv); | ||
| 1264 | extern int drm_getctx(struct drm_device *dev, void *data, | ||
| 1265 | struct drm_file *file_priv); | ||
| 1266 | extern int drm_switchctx(struct drm_device *dev, void *data, | ||
| 1267 | struct drm_file *file_priv); | ||
| 1268 | extern int drm_newctx(struct drm_device *dev, void *data, | ||
| 1269 | struct drm_file *file_priv); | ||
| 1270 | extern int drm_rmctx(struct drm_device *dev, void *data, | ||
| 1271 | struct drm_file *file_priv); | ||
| 1272 | |||
| 1273 | extern int drm_ctxbitmap_init(struct drm_device *dev); | ||
| 1274 | extern void drm_ctxbitmap_cleanup(struct drm_device *dev); | ||
| 1275 | extern void drm_ctxbitmap_free(struct drm_device *dev, int ctx_handle); | ||
| 1276 | |||
| 1277 | extern int drm_setsareactx(struct drm_device *dev, void *data, | ||
| 1278 | struct drm_file *file_priv); | ||
| 1279 | extern int drm_getsareactx(struct drm_device *dev, void *data, | ||
| 1280 | struct drm_file *file_priv); | ||
| 1281 | |||
| 1282 | /* Authentication IOCTL support (drm_auth.h) */ | 1218 | /* Authentication IOCTL support (drm_auth.h) */ |
| 1283 | extern int drm_getmagic(struct drm_device *dev, void *data, | 1219 | extern int drm_getmagic(struct drm_device *dev, void *data, |
| 1284 | struct drm_file *file_priv); | 1220 | struct drm_file *file_priv); |
| @@ -1398,17 +1334,12 @@ extern void drm_master_put(struct drm_master **master); | |||
| 1398 | extern void drm_put_dev(struct drm_device *dev); | 1334 | extern void drm_put_dev(struct drm_device *dev); |
| 1399 | extern void drm_unplug_dev(struct drm_device *dev); | 1335 | extern void drm_unplug_dev(struct drm_device *dev); |
| 1400 | extern unsigned int drm_debug; | 1336 | extern unsigned int drm_debug; |
| 1401 | extern unsigned int drm_rnodes; | ||
| 1402 | extern unsigned int drm_universal_planes; | ||
| 1403 | 1337 | ||
| 1404 | extern unsigned int drm_vblank_offdelay; | 1338 | extern unsigned int drm_vblank_offdelay; |
| 1405 | extern unsigned int drm_timestamp_precision; | 1339 | extern unsigned int drm_timestamp_precision; |
| 1406 | extern unsigned int drm_timestamp_monotonic; | 1340 | extern unsigned int drm_timestamp_monotonic; |
| 1407 | 1341 | ||
| 1408 | extern struct class *drm_class; | 1342 | extern struct class *drm_class; |
| 1409 | extern struct dentry *drm_debugfs_root; | ||
| 1410 | |||
| 1411 | extern struct idr drm_minors_idr; | ||
| 1412 | 1343 | ||
| 1413 | extern struct drm_local_map *drm_getsarea(struct drm_device *dev); | 1344 | extern struct drm_local_map *drm_getsarea(struct drm_device *dev); |
| 1414 | 1345 | ||
| @@ -1422,6 +1353,8 @@ extern int drm_debugfs_create_files(const struct drm_info_list *files, | |||
| 1422 | extern int drm_debugfs_remove_files(const struct drm_info_list *files, | 1353 | extern int drm_debugfs_remove_files(const struct drm_info_list *files, |
| 1423 | int count, struct drm_minor *minor); | 1354 | int count, struct drm_minor *minor); |
| 1424 | extern int drm_debugfs_cleanup(struct drm_minor *minor); | 1355 | extern int drm_debugfs_cleanup(struct drm_minor *minor); |
| 1356 | extern int drm_debugfs_connector_add(struct drm_connector *connector); | ||
| 1357 | extern void drm_debugfs_connector_remove(struct drm_connector *connector); | ||
| 1425 | #else | 1358 | #else |
| 1426 | static inline int drm_debugfs_init(struct drm_minor *minor, int minor_id, | 1359 | static inline int drm_debugfs_init(struct drm_minor *minor, int minor_id, |
| 1427 | struct dentry *root) | 1360 | struct dentry *root) |
| @@ -1446,6 +1379,15 @@ static inline int drm_debugfs_cleanup(struct drm_minor *minor) | |||
| 1446 | { | 1379 | { |
| 1447 | return 0; | 1380 | return 0; |
| 1448 | } | 1381 | } |
| 1382 | |||
| 1383 | static inline int drm_debugfs_connector_add(struct drm_connector *connector) | ||
| 1384 | { | ||
| 1385 | return 0; | ||
| 1386 | } | ||
| 1387 | static inline void drm_debugfs_connector_remove(struct drm_connector *connector) | ||
| 1388 | { | ||
| 1389 | } | ||
| 1390 | |||
| 1449 | #endif | 1391 | #endif |
| 1450 | 1392 | ||
| 1451 | /* Info file support */ | 1393 | /* Info file support */ |
| @@ -1515,9 +1457,8 @@ extern int drm_pci_set_unique(struct drm_device *dev, | |||
| 1515 | struct drm_sysfs_class; | 1457 | struct drm_sysfs_class; |
| 1516 | extern struct class *drm_sysfs_create(struct module *owner, char *name); | 1458 | extern struct class *drm_sysfs_create(struct module *owner, char *name); |
| 1517 | extern void drm_sysfs_destroy(void); | 1459 | extern void drm_sysfs_destroy(void); |
| 1518 | extern int drm_sysfs_device_add(struct drm_minor *minor); | 1460 | extern struct device *drm_sysfs_minor_alloc(struct drm_minor *minor); |
| 1519 | extern void drm_sysfs_hotplug_event(struct drm_device *dev); | 1461 | extern void drm_sysfs_hotplug_event(struct drm_device *dev); |
| 1520 | extern void drm_sysfs_device_remove(struct drm_minor *minor); | ||
| 1521 | extern int drm_sysfs_connector_add(struct drm_connector *connector); | 1462 | extern int drm_sysfs_connector_add(struct drm_connector *connector); |
| 1522 | extern void drm_sysfs_connector_remove(struct drm_connector *connector); | 1463 | extern void drm_sysfs_connector_remove(struct drm_connector *connector); |
| 1523 | 1464 | ||
| @@ -1577,7 +1518,7 @@ void drm_gem_free_mmap_offset(struct drm_gem_object *obj); | |||
| 1577 | int drm_gem_create_mmap_offset(struct drm_gem_object *obj); | 1518 | int drm_gem_create_mmap_offset(struct drm_gem_object *obj); |
| 1578 | int drm_gem_create_mmap_offset_size(struct drm_gem_object *obj, size_t size); | 1519 | int drm_gem_create_mmap_offset_size(struct drm_gem_object *obj, size_t size); |
| 1579 | 1520 | ||
| 1580 | struct page **drm_gem_get_pages(struct drm_gem_object *obj, gfp_t gfpmask); | 1521 | struct page **drm_gem_get_pages(struct drm_gem_object *obj); |
| 1581 | void drm_gem_put_pages(struct drm_gem_object *obj, struct page **pages, | 1522 | void drm_gem_put_pages(struct drm_gem_object *obj, struct page **pages, |
| 1582 | bool dirty, bool accessed); | 1523 | bool dirty, bool accessed); |
| 1583 | 1524 | ||
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 251b75e6bf7a..f1105d0da059 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
| @@ -41,6 +41,7 @@ struct drm_framebuffer; | |||
| 41 | struct drm_object_properties; | 41 | struct drm_object_properties; |
| 42 | struct drm_file; | 42 | struct drm_file; |
| 43 | struct drm_clip_rect; | 43 | struct drm_clip_rect; |
| 44 | struct device_node; | ||
| 44 | 45 | ||
| 45 | #define DRM_MODE_OBJECT_CRTC 0xcccccccc | 46 | #define DRM_MODE_OBJECT_CRTC 0xcccccccc |
| 46 | #define DRM_MODE_OBJECT_CONNECTOR 0xc0c0c0c0 | 47 | #define DRM_MODE_OBJECT_CONNECTOR 0xc0c0c0c0 |
| @@ -75,6 +76,14 @@ static inline uint64_t I642U64(int64_t val) | |||
| 75 | return (uint64_t)*((uint64_t *)&val); | 76 | return (uint64_t)*((uint64_t *)&val); |
| 76 | } | 77 | } |
| 77 | 78 | ||
| 79 | /* rotation property bits */ | ||
| 80 | #define DRM_ROTATE_0 0 | ||
| 81 | #define DRM_ROTATE_90 1 | ||
| 82 | #define DRM_ROTATE_180 2 | ||
| 83 | #define DRM_ROTATE_270 3 | ||
| 84 | #define DRM_REFLECT_X 4 | ||
| 85 | #define DRM_REFLECT_Y 5 | ||
| 86 | |||
| 78 | enum drm_connector_force { | 87 | enum drm_connector_force { |
| 79 | DRM_FORCE_UNSPECIFIED, | 88 | DRM_FORCE_UNSPECIFIED, |
| 80 | DRM_FORCE_OFF, | 89 | DRM_FORCE_OFF, |
| @@ -314,6 +323,7 @@ struct drm_crtc_funcs { | |||
| 314 | */ | 323 | */ |
| 315 | struct drm_crtc { | 324 | struct drm_crtc { |
| 316 | struct drm_device *dev; | 325 | struct drm_device *dev; |
| 326 | struct device_node *port; | ||
| 317 | struct list_head head; | 327 | struct list_head head; |
| 318 | 328 | ||
| 319 | /** | 329 | /** |
| @@ -331,6 +341,10 @@ struct drm_crtc { | |||
| 331 | struct drm_plane *primary; | 341 | struct drm_plane *primary; |
| 332 | struct drm_plane *cursor; | 342 | struct drm_plane *cursor; |
| 333 | 343 | ||
| 344 | /* position of cursor plane on crtc */ | ||
| 345 | int cursor_x; | ||
| 346 | int cursor_y; | ||
| 347 | |||
| 334 | /* Temporary tracking of the old fb while a modeset is ongoing. Used | 348 | /* Temporary tracking of the old fb while a modeset is ongoing. Used |
| 335 | * by drm_mode_set_config_internal to implement correct refcounting. */ | 349 | * by drm_mode_set_config_internal to implement correct refcounting. */ |
| 336 | struct drm_framebuffer *old_fb; | 350 | struct drm_framebuffer *old_fb; |
| @@ -524,6 +538,8 @@ struct drm_connector { | |||
| 524 | struct drm_property_blob *edid_blob_ptr; | 538 | struct drm_property_blob *edid_blob_ptr; |
| 525 | struct drm_object_properties properties; | 539 | struct drm_object_properties properties; |
| 526 | 540 | ||
| 541 | struct drm_property_blob *path_blob_ptr; | ||
| 542 | |||
| 527 | uint8_t polled; /* DRM_CONNECTOR_POLL_* */ | 543 | uint8_t polled; /* DRM_CONNECTOR_POLL_* */ |
| 528 | 544 | ||
| 529 | /* requested DPMS state */ | 545 | /* requested DPMS state */ |
| @@ -533,6 +549,7 @@ struct drm_connector { | |||
| 533 | 549 | ||
| 534 | /* forced on connector */ | 550 | /* forced on connector */ |
| 535 | enum drm_connector_force force; | 551 | enum drm_connector_force force; |
| 552 | bool override_edid; | ||
| 536 | uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; | 553 | uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; |
| 537 | struct drm_encoder *encoder; /* currently active encoder */ | 554 | struct drm_encoder *encoder; /* currently active encoder */ |
| 538 | 555 | ||
| @@ -545,6 +562,8 @@ struct drm_connector { | |||
| 545 | int audio_latency[2]; | 562 | int audio_latency[2]; |
| 546 | int null_edid_counter; /* needed to workaround some HW bugs where we get all 0s */ | 563 | int null_edid_counter; /* needed to workaround some HW bugs where we get all 0s */ |
| 547 | unsigned bad_edid_counter; | 564 | unsigned bad_edid_counter; |
| 565 | |||
| 566 | struct dentry *debugfs_entry; | ||
| 548 | }; | 567 | }; |
| 549 | 568 | ||
| 550 | /** | 569 | /** |
| @@ -800,6 +819,7 @@ struct drm_mode_config { | |||
| 800 | struct list_head property_blob_list; | 819 | struct list_head property_blob_list; |
| 801 | struct drm_property *edid_property; | 820 | struct drm_property *edid_property; |
| 802 | struct drm_property *dpms_property; | 821 | struct drm_property *dpms_property; |
| 822 | struct drm_property *path_property; | ||
| 803 | struct drm_property *plane_type_property; | 823 | struct drm_property *plane_type_property; |
| 804 | 824 | ||
| 805 | /* DVI-I properties */ | 825 | /* DVI-I properties */ |
| @@ -823,6 +843,7 @@ struct drm_mode_config { | |||
| 823 | 843 | ||
| 824 | /* Optional properties */ | 844 | /* Optional properties */ |
| 825 | struct drm_property *scaling_mode_property; | 845 | struct drm_property *scaling_mode_property; |
| 846 | struct drm_property *aspect_ratio_property; | ||
| 826 | struct drm_property *dirty_info_property; | 847 | struct drm_property *dirty_info_property; |
| 827 | 848 | ||
| 828 | /* dumb ioctl parameters */ | 849 | /* dumb ioctl parameters */ |
| @@ -852,7 +873,7 @@ struct drm_prop_enum_list { | |||
| 852 | extern int drm_crtc_init_with_planes(struct drm_device *dev, | 873 | extern int drm_crtc_init_with_planes(struct drm_device *dev, |
| 853 | struct drm_crtc *crtc, | 874 | struct drm_crtc *crtc, |
| 854 | struct drm_plane *primary, | 875 | struct drm_plane *primary, |
| 855 | void *cursor, | 876 | struct drm_plane *cursor, |
| 856 | const struct drm_crtc_funcs *funcs); | 877 | const struct drm_crtc_funcs *funcs); |
| 857 | extern int drm_crtc_init(struct drm_device *dev, | 878 | extern int drm_crtc_init(struct drm_device *dev, |
| 858 | struct drm_crtc *crtc, | 879 | struct drm_crtc *crtc, |
| @@ -878,6 +899,8 @@ extern int drm_connector_init(struct drm_device *dev, | |||
| 878 | struct drm_connector *connector, | 899 | struct drm_connector *connector, |
| 879 | const struct drm_connector_funcs *funcs, | 900 | const struct drm_connector_funcs *funcs, |
| 880 | int connector_type); | 901 | int connector_type); |
| 902 | int drm_connector_register(struct drm_connector *connector); | ||
| 903 | void drm_connector_unregister(struct drm_connector *connector); | ||
| 881 | 904 | ||
| 882 | extern void drm_connector_cleanup(struct drm_connector *connector); | 905 | extern void drm_connector_cleanup(struct drm_connector *connector); |
| 883 | /* helper to unplug all connectors from sysfs for device */ | 906 | /* helper to unplug all connectors from sysfs for device */ |
| @@ -937,6 +960,7 @@ extern const char *drm_get_tv_select_name(int val); | |||
| 937 | extern void drm_fb_release(struct drm_file *file_priv); | 960 | extern void drm_fb_release(struct drm_file *file_priv); |
| 938 | extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group); | 961 | extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group); |
| 939 | extern void drm_mode_group_destroy(struct drm_mode_group *group); | 962 | extern void drm_mode_group_destroy(struct drm_mode_group *group); |
| 963 | extern void drm_reinit_primary_mode_group(struct drm_device *dev); | ||
| 940 | extern bool drm_probe_ddc(struct i2c_adapter *adapter); | 964 | extern bool drm_probe_ddc(struct i2c_adapter *adapter); |
| 941 | extern struct edid *drm_get_edid(struct drm_connector *connector, | 965 | extern struct edid *drm_get_edid(struct drm_connector *connector, |
| 942 | struct i2c_adapter *adapter); | 966 | struct i2c_adapter *adapter); |
| @@ -946,6 +970,8 @@ extern void drm_mode_config_init(struct drm_device *dev); | |||
| 946 | extern void drm_mode_config_reset(struct drm_device *dev); | 970 | extern void drm_mode_config_reset(struct drm_device *dev); |
| 947 | extern void drm_mode_config_cleanup(struct drm_device *dev); | 971 | extern void drm_mode_config_cleanup(struct drm_device *dev); |
| 948 | 972 | ||
| 973 | extern int drm_mode_connector_set_path_property(struct drm_connector *connector, | ||
| 974 | char *path); | ||
| 949 | extern int drm_mode_connector_update_edid_property(struct drm_connector *connector, | 975 | extern int drm_mode_connector_update_edid_property(struct drm_connector *connector, |
| 950 | struct edid *edid); | 976 | struct edid *edid); |
| 951 | 977 | ||
| @@ -994,7 +1020,8 @@ extern struct drm_property *drm_property_create_enum(struct drm_device *dev, int | |||
| 994 | struct drm_property *drm_property_create_bitmask(struct drm_device *dev, | 1020 | struct drm_property *drm_property_create_bitmask(struct drm_device *dev, |
| 995 | int flags, const char *name, | 1021 | int flags, const char *name, |
| 996 | const struct drm_prop_enum_list *props, | 1022 | const struct drm_prop_enum_list *props, |
| 997 | int num_values); | 1023 | int num_props, |
| 1024 | uint64_t supported_bits); | ||
| 998 | struct drm_property *drm_property_create_range(struct drm_device *dev, int flags, | 1025 | struct drm_property *drm_property_create_range(struct drm_device *dev, int flags, |
| 999 | const char *name, | 1026 | const char *name, |
| 1000 | uint64_t min, uint64_t max); | 1027 | uint64_t min, uint64_t max); |
| @@ -1010,6 +1037,7 @@ extern int drm_mode_create_dvi_i_properties(struct drm_device *dev); | |||
| 1010 | extern int drm_mode_create_tv_properties(struct drm_device *dev, int num_formats, | 1037 | extern int drm_mode_create_tv_properties(struct drm_device *dev, int num_formats, |
| 1011 | char *formats[]); | 1038 | char *formats[]); |
| 1012 | extern int drm_mode_create_scaling_mode_property(struct drm_device *dev); | 1039 | extern int drm_mode_create_scaling_mode_property(struct drm_device *dev); |
| 1040 | extern int drm_mode_create_aspect_ratio_property(struct drm_device *dev); | ||
| 1013 | extern int drm_mode_create_dirty_info_property(struct drm_device *dev); | 1041 | extern int drm_mode_create_dirty_info_property(struct drm_device *dev); |
| 1014 | 1042 | ||
| 1015 | extern int drm_mode_connector_attach_encoder(struct drm_connector *connector, | 1043 | extern int drm_mode_connector_attach_encoder(struct drm_connector *connector, |
| @@ -1100,6 +1128,10 @@ extern int drm_format_plane_cpp(uint32_t format, int plane); | |||
| 1100 | extern int drm_format_horz_chroma_subsampling(uint32_t format); | 1128 | extern int drm_format_horz_chroma_subsampling(uint32_t format); |
| 1101 | extern int drm_format_vert_chroma_subsampling(uint32_t format); | 1129 | extern int drm_format_vert_chroma_subsampling(uint32_t format); |
| 1102 | extern const char *drm_get_format_name(uint32_t format); | 1130 | extern const char *drm_get_format_name(uint32_t format); |
| 1131 | extern struct drm_property *drm_mode_create_rotation_property(struct drm_device *dev, | ||
| 1132 | unsigned int supported_rotations); | ||
| 1133 | extern unsigned int drm_rotation_simplify(unsigned int rotation, | ||
| 1134 | unsigned int supported_rotations); | ||
| 1103 | 1135 | ||
| 1104 | /* Helpers */ | 1136 | /* Helpers */ |
| 1105 | 1137 | ||
diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h new file mode 100644 index 000000000000..9b446ada2532 --- /dev/null +++ b/include/drm/drm_dp_mst_helper.h | |||
| @@ -0,0 +1,509 @@ | |||
| 1 | /* | ||
| 2 | * Copyright © 2014 Red Hat. | ||
| 3 | * | ||
| 4 | * Permission to use, copy, modify, distribute, and sell this software and its | ||
| 5 | * documentation for any purpose is hereby granted without fee, provided that | ||
| 6 | * the above copyright notice appear in all copies and that both that copyright | ||
| 7 | * notice and this permission notice appear in supporting documentation, and | ||
| 8 | * that the name of the copyright holders not be used in advertising or | ||
| 9 | * publicity pertaining to distribution of the software without specific, | ||
| 10 | * written prior permission. The copyright holders make no representations | ||
| 11 | * about the suitability of this software for any purpose. It is provided "as | ||
| 12 | * is" without express or implied warranty. | ||
| 13 | * | ||
| 14 | * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, | ||
| 15 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO | ||
| 16 | * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR | ||
| 17 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, | ||
| 18 | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER | ||
| 19 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE | ||
| 20 | * OF THIS SOFTWARE. | ||
| 21 | */ | ||
| 22 | #ifndef _DRM_DP_MST_HELPER_H_ | ||
| 23 | #define _DRM_DP_MST_HELPER_H_ | ||
| 24 | |||
| 25 | #include <linux/types.h> | ||
| 26 | #include <drm/drm_dp_helper.h> | ||
| 27 | |||
| 28 | struct drm_dp_mst_branch; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * struct drm_dp_vcpi - Virtual Channel Payload Identifer | ||
| 32 | * @vcpi: Virtual channel ID. | ||
| 33 | * @pbn: Payload Bandwidth Number for this channel | ||
| 34 | * @aligned_pbn: PBN aligned with slot size | ||
| 35 | * @num_slots: number of slots for this PBN | ||
| 36 | */ | ||
| 37 | struct drm_dp_vcpi { | ||
| 38 | int vcpi; | ||
| 39 | int pbn; | ||
| 40 | int aligned_pbn; | ||
| 41 | int num_slots; | ||
| 42 | }; | ||
| 43 | |||
| 44 | /** | ||
| 45 | * struct drm_dp_mst_port - MST port | ||
| 46 | * @kref: reference count for this port. | ||
| 47 | * @guid_valid: for DP 1.2 devices if we have validated the GUID. | ||
| 48 | * @guid: guid for DP 1.2 device on this port. | ||
| 49 | * @port_num: port number | ||
| 50 | * @input: if this port is an input port. | ||
| 51 | * @mcs: message capability status - DP 1.2 spec. | ||
| 52 | * @ddps: DisplayPort Device Plug Status - DP 1.2 | ||
| 53 | * @pdt: Peer Device Type | ||
| 54 | * @ldps: Legacy Device Plug Status | ||
| 55 | * @dpcd_rev: DPCD revision of device on this port | ||
| 56 | * @num_sdp_streams: Number of simultaneous streams | ||
| 57 | * @num_sdp_stream_sinks: Number of stream sinks | ||
| 58 | * @available_pbn: Available bandwidth for this port. | ||
| 59 | * @next: link to next port on this branch device | ||
| 60 | * @mstb: branch device attach below this port | ||
| 61 | * @aux: i2c aux transport to talk to device connected to this port. | ||
| 62 | * @parent: branch device parent of this port | ||
| 63 | * @vcpi: Virtual Channel Payload info for this port. | ||
| 64 | * @connector: DRM connector this port is connected to. | ||
| 65 | * @mgr: topology manager this port lives under. | ||
| 66 | * | ||
| 67 | * This structure represents an MST port endpoint on a device somewhere | ||
| 68 | * in the MST topology. | ||
| 69 | */ | ||
| 70 | struct drm_dp_mst_port { | ||
| 71 | struct kref kref; | ||
| 72 | |||
| 73 | /* if dpcd 1.2 device is on this port - its GUID info */ | ||
| 74 | bool guid_valid; | ||
| 75 | u8 guid[16]; | ||
| 76 | |||
| 77 | u8 port_num; | ||
| 78 | bool input; | ||
| 79 | bool mcs; | ||
| 80 | bool ddps; | ||
| 81 | u8 pdt; | ||
| 82 | bool ldps; | ||
| 83 | u8 dpcd_rev; | ||
| 84 | u8 num_sdp_streams; | ||
| 85 | u8 num_sdp_stream_sinks; | ||
| 86 | uint16_t available_pbn; | ||
| 87 | struct list_head next; | ||
| 88 | struct drm_dp_mst_branch *mstb; /* pointer to an mstb if this port has one */ | ||
| 89 | struct drm_dp_aux aux; /* i2c bus for this port? */ | ||
| 90 | struct drm_dp_mst_branch *parent; | ||
| 91 | |||
| 92 | struct drm_dp_vcpi vcpi; | ||
| 93 | struct drm_connector *connector; | ||
| 94 | struct drm_dp_mst_topology_mgr *mgr; | ||
| 95 | }; | ||
| 96 | |||
| 97 | /** | ||
| 98 | * struct drm_dp_mst_branch - MST branch device. | ||
| 99 | * @kref: reference count for this port. | ||
| 100 | * @rad: Relative Address to talk to this branch device. | ||
| 101 | * @lct: Link count total to talk to this branch device. | ||
| 102 | * @num_ports: number of ports on the branch. | ||
| 103 | * @msg_slots: one bit per transmitted msg slot. | ||
| 104 | * @ports: linked list of ports on this branch. | ||
| 105 | * @port_parent: pointer to the port parent, NULL if toplevel. | ||
| 106 | * @mgr: topology manager for this branch device. | ||
| 107 | * @tx_slots: transmission slots for this device. | ||
| 108 | * @last_seqno: last sequence number used to talk to this. | ||
| 109 | * @link_address_sent: if a link address message has been sent to this device yet. | ||
| 110 | * | ||
| 111 | * This structure represents an MST branch device, there is one | ||
| 112 | * primary branch device at the root, along with any others connected | ||
| 113 | * to downstream ports | ||
| 114 | */ | ||
| 115 | struct drm_dp_mst_branch { | ||
| 116 | struct kref kref; | ||
| 117 | u8 rad[8]; | ||
| 118 | u8 lct; | ||
| 119 | int num_ports; | ||
| 120 | |||
| 121 | int msg_slots; | ||
| 122 | struct list_head ports; | ||
| 123 | |||
| 124 | /* list of tx ops queue for this port */ | ||
| 125 | struct drm_dp_mst_port *port_parent; | ||
| 126 | struct drm_dp_mst_topology_mgr *mgr; | ||
| 127 | |||
| 128 | /* slots are protected by mstb->mgr->qlock */ | ||
| 129 | struct drm_dp_sideband_msg_tx *tx_slots[2]; | ||
| 130 | int last_seqno; | ||
| 131 | bool link_address_sent; | ||
| 132 | }; | ||
| 133 | |||
| 134 | |||
| 135 | /* sideband msg header - not bit struct */ | ||
| 136 | struct drm_dp_sideband_msg_hdr { | ||
| 137 | u8 lct; | ||
| 138 | u8 lcr; | ||
| 139 | u8 rad[8]; | ||
| 140 | bool broadcast; | ||
| 141 | bool path_msg; | ||
| 142 | u8 msg_len; | ||
| 143 | bool somt; | ||
| 144 | bool eomt; | ||
| 145 | bool seqno; | ||
| 146 | }; | ||
| 147 | |||
| 148 | struct drm_dp_nak_reply { | ||
| 149 | u8 guid[16]; | ||
| 150 | u8 reason; | ||
| 151 | u8 nak_data; | ||
| 152 | }; | ||
| 153 | |||
| 154 | struct drm_dp_link_address_ack_reply { | ||
| 155 | u8 guid[16]; | ||
| 156 | u8 nports; | ||
| 157 | struct drm_dp_link_addr_reply_port { | ||
| 158 | bool input_port; | ||
| 159 | u8 peer_device_type; | ||
| 160 | u8 port_number; | ||
| 161 | bool mcs; | ||
| 162 | bool ddps; | ||
| 163 | bool legacy_device_plug_status; | ||
| 164 | u8 dpcd_revision; | ||
| 165 | u8 peer_guid[16]; | ||
| 166 | u8 num_sdp_streams; | ||
| 167 | u8 num_sdp_stream_sinks; | ||
| 168 | } ports[16]; | ||
| 169 | }; | ||
| 170 | |||
| 171 | struct drm_dp_remote_dpcd_read_ack_reply { | ||
| 172 | u8 port_number; | ||
| 173 | u8 num_bytes; | ||
| 174 | u8 bytes[255]; | ||
| 175 | }; | ||
| 176 | |||
| 177 | struct drm_dp_remote_dpcd_write_ack_reply { | ||
| 178 | u8 port_number; | ||
| 179 | }; | ||
| 180 | |||
| 181 | struct drm_dp_remote_dpcd_write_nak_reply { | ||
| 182 | u8 port_number; | ||
| 183 | u8 reason; | ||
| 184 | u8 bytes_written_before_failure; | ||
| 185 | }; | ||
| 186 | |||
| 187 | struct drm_dp_remote_i2c_read_ack_reply { | ||
| 188 | u8 port_number; | ||
| 189 | u8 num_bytes; | ||
| 190 | u8 bytes[255]; | ||
| 191 | }; | ||
| 192 | |||
| 193 | struct drm_dp_remote_i2c_read_nak_reply { | ||
| 194 | u8 port_number; | ||
| 195 | u8 nak_reason; | ||
| 196 | u8 i2c_nak_transaction; | ||
| 197 | }; | ||
| 198 | |||
| 199 | struct drm_dp_remote_i2c_write_ack_reply { | ||
| 200 | u8 port_number; | ||
| 201 | }; | ||
| 202 | |||
| 203 | |||
| 204 | struct drm_dp_sideband_msg_rx { | ||
| 205 | u8 chunk[48]; | ||
| 206 | u8 msg[256]; | ||
| 207 | u8 curchunk_len; | ||
| 208 | u8 curchunk_idx; /* chunk we are parsing now */ | ||
| 209 | u8 curchunk_hdrlen; | ||
| 210 | u8 curlen; /* total length of the msg */ | ||
| 211 | bool have_somt; | ||
| 212 | bool have_eomt; | ||
| 213 | struct drm_dp_sideband_msg_hdr initial_hdr; | ||
| 214 | }; | ||
| 215 | |||
| 216 | |||
| 217 | struct drm_dp_allocate_payload { | ||
| 218 | u8 port_number; | ||
| 219 | u8 number_sdp_streams; | ||
| 220 | u8 vcpi; | ||
| 221 | u16 pbn; | ||
| 222 | u8 sdp_stream_sink[8]; | ||
| 223 | }; | ||
| 224 | |||
| 225 | struct drm_dp_allocate_payload_ack_reply { | ||
| 226 | u8 port_number; | ||
| 227 | u8 vcpi; | ||
| 228 | u16 allocated_pbn; | ||
| 229 | }; | ||
| 230 | |||
| 231 | struct drm_dp_connection_status_notify { | ||
| 232 | u8 guid[16]; | ||
| 233 | u8 port_number; | ||
| 234 | bool legacy_device_plug_status; | ||
| 235 | bool displayport_device_plug_status; | ||
| 236 | bool message_capability_status; | ||
| 237 | bool input_port; | ||
| 238 | u8 peer_device_type; | ||
| 239 | }; | ||
| 240 | |||
| 241 | struct drm_dp_remote_dpcd_read { | ||
| 242 | u8 port_number; | ||
| 243 | u32 dpcd_address; | ||
| 244 | u8 num_bytes; | ||
| 245 | }; | ||
| 246 | |||
| 247 | struct drm_dp_remote_dpcd_write { | ||
| 248 | u8 port_number; | ||
| 249 | u32 dpcd_address; | ||
| 250 | u8 num_bytes; | ||
| 251 | u8 *bytes; | ||
| 252 | }; | ||
| 253 | |||
| 254 | struct drm_dp_remote_i2c_read { | ||
| 255 | u8 num_transactions; | ||
| 256 | u8 port_number; | ||
| 257 | struct { | ||
| 258 | u8 i2c_dev_id; | ||
| 259 | u8 num_bytes; | ||
| 260 | u8 *bytes; | ||
| 261 | u8 no_stop_bit; | ||
| 262 | u8 i2c_transaction_delay; | ||
| 263 | } transactions[4]; | ||
| 264 | u8 read_i2c_device_id; | ||
| 265 | u8 num_bytes_read; | ||
| 266 | }; | ||
| 267 | |||
| 268 | struct drm_dp_remote_i2c_write { | ||
| 269 | u8 port_number; | ||
| 270 | u8 write_i2c_device_id; | ||
| 271 | u8 num_bytes; | ||
| 272 | u8 *bytes; | ||
| 273 | }; | ||
| 274 | |||
| 275 | /* this covers ENUM_RESOURCES, POWER_DOWN_PHY, POWER_UP_PHY */ | ||
| 276 | struct drm_dp_port_number_req { | ||
| 277 | u8 port_number; | ||
| 278 | }; | ||
| 279 | |||
| 280 | struct drm_dp_enum_path_resources_ack_reply { | ||
| 281 | u8 port_number; | ||
| 282 | u16 full_payload_bw_number; | ||
| 283 | u16 avail_payload_bw_number; | ||
| 284 | }; | ||
| 285 | |||
| 286 | /* covers POWER_DOWN_PHY, POWER_UP_PHY */ | ||
| 287 | struct drm_dp_port_number_rep { | ||
| 288 | u8 port_number; | ||
| 289 | }; | ||
| 290 | |||
| 291 | struct drm_dp_query_payload { | ||
| 292 | u8 port_number; | ||
| 293 | u8 vcpi; | ||
| 294 | }; | ||
| 295 | |||
| 296 | struct drm_dp_resource_status_notify { | ||
| 297 | u8 port_number; | ||
| 298 | u8 guid[16]; | ||
| 299 | u16 available_pbn; | ||
| 300 | }; | ||
| 301 | |||
| 302 | struct drm_dp_query_payload_ack_reply { | ||
| 303 | u8 port_number; | ||
| 304 | u8 allocated_pbn; | ||
| 305 | }; | ||
| 306 | |||
| 307 | struct drm_dp_sideband_msg_req_body { | ||
| 308 | u8 req_type; | ||
| 309 | union ack_req { | ||
| 310 | struct drm_dp_connection_status_notify conn_stat; | ||
| 311 | struct drm_dp_port_number_req port_num; | ||
| 312 | struct drm_dp_resource_status_notify resource_stat; | ||
| 313 | |||
| 314 | struct drm_dp_query_payload query_payload; | ||
| 315 | struct drm_dp_allocate_payload allocate_payload; | ||
| 316 | |||
| 317 | struct drm_dp_remote_dpcd_read dpcd_read; | ||
| 318 | struct drm_dp_remote_dpcd_write dpcd_write; | ||
| 319 | |||
| 320 | struct drm_dp_remote_i2c_read i2c_read; | ||
| 321 | struct drm_dp_remote_i2c_write i2c_write; | ||
| 322 | } u; | ||
| 323 | }; | ||
| 324 | |||
| 325 | struct drm_dp_sideband_msg_reply_body { | ||
| 326 | u8 reply_type; | ||
| 327 | u8 req_type; | ||
| 328 | union ack_replies { | ||
| 329 | struct drm_dp_nak_reply nak; | ||
| 330 | struct drm_dp_link_address_ack_reply link_addr; | ||
| 331 | struct drm_dp_port_number_rep port_number; | ||
| 332 | |||
| 333 | struct drm_dp_enum_path_resources_ack_reply path_resources; | ||
| 334 | struct drm_dp_allocate_payload_ack_reply allocate_payload; | ||
| 335 | struct drm_dp_query_payload_ack_reply query_payload; | ||
| 336 | |||
| 337 | struct drm_dp_remote_dpcd_read_ack_reply remote_dpcd_read_ack; | ||
| 338 | struct drm_dp_remote_dpcd_write_ack_reply remote_dpcd_write_ack; | ||
| 339 | struct drm_dp_remote_dpcd_write_nak_reply remote_dpcd_write_nack; | ||
| 340 | |||
| 341 | struct drm_dp_remote_i2c_read_ack_reply remote_i2c_read_ack; | ||
| 342 | struct drm_dp_remote_i2c_read_nak_reply remote_i2c_read_nack; | ||
| 343 | struct drm_dp_remote_i2c_write_ack_reply remote_i2c_write_ack; | ||
| 344 | } u; | ||
| 345 | }; | ||
| 346 | |||
| 347 | /* msg is queued to be put into a slot */ | ||
| 348 | #define DRM_DP_SIDEBAND_TX_QUEUED 0 | ||
| 349 | /* msg has started transmitting on a slot - still on msgq */ | ||
| 350 | #define DRM_DP_SIDEBAND_TX_START_SEND 1 | ||
| 351 | /* msg has finished transmitting on a slot - removed from msgq only in slot */ | ||
| 352 | #define DRM_DP_SIDEBAND_TX_SENT 2 | ||
| 353 | /* msg has received a response - removed from slot */ | ||
| 354 | #define DRM_DP_SIDEBAND_TX_RX 3 | ||
| 355 | #define DRM_DP_SIDEBAND_TX_TIMEOUT 4 | ||
| 356 | |||
| 357 | struct drm_dp_sideband_msg_tx { | ||
| 358 | u8 msg[256]; | ||
| 359 | u8 chunk[48]; | ||
| 360 | u8 cur_offset; | ||
| 361 | u8 cur_len; | ||
| 362 | struct drm_dp_mst_branch *dst; | ||
| 363 | struct list_head next; | ||
| 364 | int seqno; | ||
| 365 | int state; | ||
| 366 | bool path_msg; | ||
| 367 | struct drm_dp_sideband_msg_reply_body reply; | ||
| 368 | }; | ||
| 369 | |||
| 370 | /* sideband msg handler */ | ||
| 371 | struct drm_dp_mst_topology_mgr; | ||
| 372 | struct drm_dp_mst_topology_cbs { | ||
| 373 | /* create a connector for a port */ | ||
| 374 | struct drm_connector *(*add_connector)(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port, char *path); | ||
| 375 | void (*destroy_connector)(struct drm_dp_mst_topology_mgr *mgr, | ||
| 376 | struct drm_connector *connector); | ||
| 377 | void (*hotplug)(struct drm_dp_mst_topology_mgr *mgr); | ||
| 378 | |||
| 379 | }; | ||
| 380 | |||
| 381 | #define DP_MAX_PAYLOAD (sizeof(unsigned long) * 8) | ||
| 382 | |||
| 383 | #define DP_PAYLOAD_LOCAL 1 | ||
| 384 | #define DP_PAYLOAD_REMOTE 2 | ||
| 385 | #define DP_PAYLOAD_DELETE_LOCAL 3 | ||
| 386 | |||
| 387 | struct drm_dp_payload { | ||
| 388 | int payload_state; | ||
| 389 | int start_slot; | ||
| 390 | int num_slots; | ||
| 391 | }; | ||
| 392 | |||
| 393 | /** | ||
| 394 | * struct drm_dp_mst_topology_mgr - DisplayPort MST manager | ||
| 395 | * @dev: device pointer for adding i2c devices etc. | ||
| 396 | * @cbs: callbacks for connector addition and destruction. | ||
| 397 | * @max_dpcd_transaction_bytes - maximum number of bytes to read/write in one go. | ||
| 398 | * @aux: aux channel for the DP connector. | ||
| 399 | * @max_payloads: maximum number of payloads the GPU can generate. | ||
| 400 | * @conn_base_id: DRM connector ID this mgr is connected to. | ||
| 401 | * @down_rep_recv: msg receiver state for down replies. | ||
| 402 | * @up_req_recv: msg receiver state for up requests. | ||
| 403 | * @lock: protects mst state, primary, guid, dpcd. | ||
| 404 | * @mst_state: if this manager is enabled for an MST capable port. | ||
| 405 | * @mst_primary: pointer to the primary branch device. | ||
| 406 | * @guid_valid: GUID valid for the primary branch device. | ||
| 407 | * @guid: GUID for primary port. | ||
| 408 | * @dpcd: cache of DPCD for primary port. | ||
| 409 | * @pbn_div: PBN to slots divisor. | ||
| 410 | * | ||
| 411 | * This struct represents the toplevel displayport MST topology manager. | ||
| 412 | * There should be one instance of this for every MST capable DP connector | ||
| 413 | * on the GPU. | ||
| 414 | */ | ||
| 415 | struct drm_dp_mst_topology_mgr { | ||
| 416 | |||
| 417 | struct device *dev; | ||
| 418 | struct drm_dp_mst_topology_cbs *cbs; | ||
| 419 | int max_dpcd_transaction_bytes; | ||
| 420 | struct drm_dp_aux *aux; /* auxch for this topology mgr to use */ | ||
| 421 | int max_payloads; | ||
| 422 | int conn_base_id; | ||
| 423 | |||
| 424 | /* only ever accessed from the workqueue - which should be serialised */ | ||
| 425 | struct drm_dp_sideband_msg_rx down_rep_recv; | ||
| 426 | struct drm_dp_sideband_msg_rx up_req_recv; | ||
| 427 | |||
| 428 | /* pointer to info about the initial MST device */ | ||
| 429 | struct mutex lock; /* protects mst_state + primary + guid + dpcd */ | ||
| 430 | |||
| 431 | bool mst_state; | ||
| 432 | struct drm_dp_mst_branch *mst_primary; | ||
| 433 | /* primary MST device GUID */ | ||
| 434 | bool guid_valid; | ||
| 435 | u8 guid[16]; | ||
| 436 | u8 dpcd[DP_RECEIVER_CAP_SIZE]; | ||
| 437 | u8 sink_count; | ||
| 438 | int pbn_div; | ||
| 439 | int total_slots; | ||
| 440 | int avail_slots; | ||
| 441 | int total_pbn; | ||
| 442 | |||
| 443 | /* messages to be transmitted */ | ||
| 444 | /* qlock protects the upq/downq and in_progress, | ||
| 445 | the mstb tx_slots and txmsg->state once they are queued */ | ||
| 446 | struct mutex qlock; | ||
| 447 | struct list_head tx_msg_downq; | ||
| 448 | struct list_head tx_msg_upq; | ||
| 449 | bool tx_down_in_progress; | ||
| 450 | bool tx_up_in_progress; | ||
| 451 | |||
| 452 | /* payload info + lock for it */ | ||
| 453 | struct mutex payload_lock; | ||
| 454 | struct drm_dp_vcpi **proposed_vcpis; | ||
| 455 | struct drm_dp_payload *payloads; | ||
| 456 | unsigned long payload_mask; | ||
| 457 | |||
| 458 | wait_queue_head_t tx_waitq; | ||
| 459 | struct work_struct work; | ||
| 460 | |||
| 461 | struct work_struct tx_work; | ||
| 462 | }; | ||
| 463 | |||
| 464 | int drm_dp_mst_topology_mgr_init(struct drm_dp_mst_topology_mgr *mgr, struct device *dev, struct drm_dp_aux *aux, int max_dpcd_transaction_bytes, int max_payloads, int conn_base_id); | ||
| 465 | |||
| 466 | void drm_dp_mst_topology_mgr_destroy(struct drm_dp_mst_topology_mgr *mgr); | ||
| 467 | |||
| 468 | |||
| 469 | int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool mst_state); | ||
| 470 | |||
| 471 | |||
| 472 | int drm_dp_mst_hpd_irq(struct drm_dp_mst_topology_mgr *mgr, u8 *esi, bool *handled); | ||
| 473 | |||
| 474 | |||
| 475 | enum drm_connector_status drm_dp_mst_detect_port(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port); | ||
| 476 | |||
| 477 | struct edid *drm_dp_mst_get_edid(struct drm_connector *connector, struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port); | ||
| 478 | |||
| 479 | |||
| 480 | int drm_dp_calc_pbn_mode(int clock, int bpp); | ||
| 481 | |||
| 482 | |||
| 483 | bool drm_dp_mst_allocate_vcpi(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port, int pbn, int *slots); | ||
| 484 | |||
| 485 | |||
| 486 | void drm_dp_mst_reset_vcpi_slots(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port); | ||
| 487 | |||
| 488 | |||
| 489 | void drm_dp_mst_deallocate_vcpi(struct drm_dp_mst_topology_mgr *mgr, | ||
| 490 | struct drm_dp_mst_port *port); | ||
| 491 | |||
| 492 | |||
| 493 | int drm_dp_find_vcpi_slots(struct drm_dp_mst_topology_mgr *mgr, | ||
| 494 | int pbn); | ||
| 495 | |||
| 496 | |||
| 497 | int drm_dp_update_payload_part1(struct drm_dp_mst_topology_mgr *mgr); | ||
| 498 | |||
| 499 | |||
| 500 | int drm_dp_update_payload_part2(struct drm_dp_mst_topology_mgr *mgr); | ||
| 501 | |||
| 502 | int drm_dp_check_act_status(struct drm_dp_mst_topology_mgr *mgr); | ||
| 503 | |||
| 504 | void drm_dp_mst_dump_topology(struct seq_file *m, | ||
| 505 | struct drm_dp_mst_topology_mgr *mgr); | ||
| 506 | |||
| 507 | void drm_dp_mst_topology_mgr_suspend(struct drm_dp_mst_topology_mgr *mgr); | ||
| 508 | int drm_dp_mst_topology_mgr_resume(struct drm_dp_mst_topology_mgr *mgr); | ||
| 509 | #endif | ||
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index 7997246d4039..bfd329d613c4 100644 --- a/include/drm/drm_fb_helper.h +++ b/include/drm/drm_fb_helper.h | |||
| @@ -86,8 +86,9 @@ struct drm_fb_helper { | |||
| 86 | int crtc_count; | 86 | int crtc_count; |
| 87 | struct drm_fb_helper_crtc *crtc_info; | 87 | struct drm_fb_helper_crtc *crtc_info; |
| 88 | int connector_count; | 88 | int connector_count; |
| 89 | int connector_info_alloc_count; | ||
| 89 | struct drm_fb_helper_connector **connector_info; | 90 | struct drm_fb_helper_connector **connector_info; |
| 90 | struct drm_fb_helper_funcs *funcs; | 91 | const struct drm_fb_helper_funcs *funcs; |
| 91 | struct fb_info *fbdev; | 92 | struct fb_info *fbdev; |
| 92 | u32 pseudo_palette[17]; | 93 | u32 pseudo_palette[17]; |
| 93 | struct list_head kernel_fb_list; | 94 | struct list_head kernel_fb_list; |
| @@ -97,6 +98,8 @@ struct drm_fb_helper { | |||
| 97 | bool delayed_hotplug; | 98 | bool delayed_hotplug; |
| 98 | }; | 99 | }; |
| 99 | 100 | ||
| 101 | void drm_fb_helper_prepare(struct drm_device *dev, struct drm_fb_helper *helper, | ||
| 102 | const struct drm_fb_helper_funcs *funcs); | ||
| 100 | int drm_fb_helper_init(struct drm_device *dev, | 103 | int drm_fb_helper_init(struct drm_device *dev, |
| 101 | struct drm_fb_helper *helper, int crtc_count, | 104 | struct drm_fb_helper *helper, int crtc_count, |
| 102 | int max_conn); | 105 | int max_conn); |
| @@ -128,4 +131,7 @@ struct drm_display_mode * | |||
| 128 | drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn, | 131 | drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn, |
| 129 | int width, int height); | 132 | int width, int height); |
| 130 | 133 | ||
| 134 | int drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, struct drm_connector *connector); | ||
| 135 | int drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper, | ||
| 136 | struct drm_connector *connector); | ||
| 131 | #endif | 137 | #endif |
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index 944f33f8ba38..2bb55b8b9031 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h | |||
| @@ -94,6 +94,8 @@ void mipi_dsi_host_unregister(struct mipi_dsi_host *host); | |||
| 94 | #define MIPI_DSI_MODE_VSYNC_FLUSH BIT(8) | 94 | #define MIPI_DSI_MODE_VSYNC_FLUSH BIT(8) |
| 95 | /* disable EoT packets in HS mode */ | 95 | /* disable EoT packets in HS mode */ |
| 96 | #define MIPI_DSI_MODE_EOT_PACKET BIT(9) | 96 | #define MIPI_DSI_MODE_EOT_PACKET BIT(9) |
| 97 | /* device supports non-continuous clock behavior (DSI spec 5.6.1) */ | ||
| 98 | #define MIPI_DSI_CLOCK_NON_CONTINUOUS BIT(10) | ||
| 97 | 99 | ||
| 98 | enum mipi_dsi_pixel_format { | 100 | enum mipi_dsi_pixel_format { |
| 99 | MIPI_DSI_FMT_RGB888, | 101 | MIPI_DSI_FMT_RGB888, |
| @@ -121,14 +123,17 @@ struct mipi_dsi_device { | |||
| 121 | unsigned long mode_flags; | 123 | unsigned long mode_flags; |
| 122 | }; | 124 | }; |
| 123 | 125 | ||
| 124 | #define to_mipi_dsi_device(d) container_of(d, struct mipi_dsi_device, dev) | 126 | static inline struct mipi_dsi_device *to_mipi_dsi_device(struct device *dev) |
| 127 | { | ||
| 128 | return container_of(dev, struct mipi_dsi_device, dev); | ||
| 129 | } | ||
| 125 | 130 | ||
| 126 | int mipi_dsi_attach(struct mipi_dsi_device *dsi); | 131 | int mipi_dsi_attach(struct mipi_dsi_device *dsi); |
| 127 | int mipi_dsi_detach(struct mipi_dsi_device *dsi); | 132 | int mipi_dsi_detach(struct mipi_dsi_device *dsi); |
| 128 | int mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, unsigned int channel, | 133 | ssize_t mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, const void *data, |
| 129 | const void *data, size_t len); | 134 | size_t len); |
| 130 | ssize_t mipi_dsi_dcs_read(struct mipi_dsi_device *dsi, unsigned int channel, | 135 | ssize_t mipi_dsi_dcs_read(struct mipi_dsi_device *dsi, u8 cmd, void *data, |
| 131 | u8 cmd, void *data, size_t len); | 136 | size_t len); |
| 132 | 137 | ||
| 133 | /** | 138 | /** |
| 134 | * struct mipi_dsi_driver - DSI driver | 139 | * struct mipi_dsi_driver - DSI driver |
| @@ -144,7 +149,11 @@ struct mipi_dsi_driver { | |||
| 144 | void (*shutdown)(struct mipi_dsi_device *dsi); | 149 | void (*shutdown)(struct mipi_dsi_device *dsi); |
| 145 | }; | 150 | }; |
| 146 | 151 | ||
| 147 | #define to_mipi_dsi_driver(d) container_of(d, struct mipi_dsi_driver, driver) | 152 | static inline struct mipi_dsi_driver * |
| 153 | to_mipi_dsi_driver(struct device_driver *driver) | ||
| 154 | { | ||
| 155 | return container_of(driver, struct mipi_dsi_driver, driver); | ||
| 156 | } | ||
| 148 | 157 | ||
| 149 | static inline void *mipi_dsi_get_drvdata(const struct mipi_dsi_device *dsi) | 158 | static inline void *mipi_dsi_get_drvdata(const struct mipi_dsi_device *dsi) |
| 150 | { | 159 | { |
diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h new file mode 100644 index 000000000000..2441f7112074 --- /dev/null +++ b/include/drm/drm_of.h | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | #ifndef __DRM_OF_H__ | ||
| 2 | #define __DRM_OF_H__ | ||
| 3 | |||
| 4 | struct drm_device; | ||
| 5 | struct device_node; | ||
| 6 | |||
| 7 | #ifdef CONFIG_OF | ||
| 8 | extern uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, | ||
| 9 | struct device_node *port); | ||
| 10 | #else | ||
| 11 | static inline uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, | ||
| 12 | struct device_node *port) | ||
| 13 | { | ||
| 14 | return 0; | ||
| 15 | } | ||
| 16 | #endif | ||
| 17 | |||
| 18 | #endif /* __DRM_OF_H__ */ | ||
diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index c2ab77add67c..1fbcc96063a7 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h | |||
| @@ -30,8 +30,42 @@ struct drm_connector; | |||
| 30 | struct drm_device; | 30 | struct drm_device; |
| 31 | struct drm_panel; | 31 | struct drm_panel; |
| 32 | 32 | ||
| 33 | /** | ||
| 34 | * struct drm_panel_funcs - perform operations on a given panel | ||
| 35 | * @disable: disable panel (turn off back light, etc.) | ||
| 36 | * @unprepare: turn off panel | ||
| 37 | * @prepare: turn on panel and perform set up | ||
| 38 | * @enable: enable panel (turn on back light, etc.) | ||
| 39 | * @get_modes: add modes to the connector that the panel is attached to and | ||
| 40 | * return the number of modes added | ||
| 41 | * | ||
| 42 | * The .prepare() function is typically called before the display controller | ||
| 43 | * starts to transmit video data. Panel drivers can use this to turn the panel | ||
| 44 | * on and wait for it to become ready. If additional configuration is required | ||
| 45 | * (via a control bus such as I2C, SPI or DSI for example) this is a good time | ||
| 46 | * to do that. | ||
| 47 | * | ||
| 48 | * After the display controller has started transmitting video data, it's safe | ||
| 49 | * to call the .enable() function. This will typically enable the backlight to | ||
| 50 | * make the image on screen visible. Some panels require a certain amount of | ||
| 51 | * time or frames before the image is displayed. This function is responsible | ||
| 52 | * for taking this into account before enabling the backlight to avoid visual | ||
| 53 | * glitches. | ||
| 54 | * | ||
| 55 | * Before stopping video transmission from the display controller it can be | ||
| 56 | * necessary to turn off the panel to avoid visual glitches. This is done in | ||
| 57 | * the .disable() function. Analogously to .enable() this typically involves | ||
| 58 | * turning off the backlight and waiting for some time to make sure no image | ||
| 59 | * is visible on the panel. It is then safe for the display controller to | ||
| 60 | * cease transmission of video data. | ||
| 61 | * | ||
| 62 | * To save power when no video data is transmitted, a driver can power down | ||
| 63 | * the panel. This is the job of the .unprepare() function. | ||
| 64 | */ | ||
| 33 | struct drm_panel_funcs { | 65 | struct drm_panel_funcs { |
| 34 | int (*disable)(struct drm_panel *panel); | 66 | int (*disable)(struct drm_panel *panel); |
| 67 | int (*unprepare)(struct drm_panel *panel); | ||
| 68 | int (*prepare)(struct drm_panel *panel); | ||
| 35 | int (*enable)(struct drm_panel *panel); | 69 | int (*enable)(struct drm_panel *panel); |
| 36 | int (*get_modes)(struct drm_panel *panel); | 70 | int (*get_modes)(struct drm_panel *panel); |
| 37 | }; | 71 | }; |
| @@ -46,6 +80,14 @@ struct drm_panel { | |||
| 46 | struct list_head list; | 80 | struct list_head list; |
| 47 | }; | 81 | }; |
| 48 | 82 | ||
| 83 | static inline int drm_panel_unprepare(struct drm_panel *panel) | ||
| 84 | { | ||
| 85 | if (panel && panel->funcs && panel->funcs->unprepare) | ||
| 86 | return panel->funcs->unprepare(panel); | ||
| 87 | |||
| 88 | return panel ? -ENOSYS : -EINVAL; | ||
| 89 | } | ||
| 90 | |||
| 49 | static inline int drm_panel_disable(struct drm_panel *panel) | 91 | static inline int drm_panel_disable(struct drm_panel *panel) |
| 50 | { | 92 | { |
| 51 | if (panel && panel->funcs && panel->funcs->disable) | 93 | if (panel && panel->funcs && panel->funcs->disable) |
| @@ -54,6 +96,14 @@ static inline int drm_panel_disable(struct drm_panel *panel) | |||
| 54 | return panel ? -ENOSYS : -EINVAL; | 96 | return panel ? -ENOSYS : -EINVAL; |
| 55 | } | 97 | } |
| 56 | 98 | ||
| 99 | static inline int drm_panel_prepare(struct drm_panel *panel) | ||
| 100 | { | ||
| 101 | if (panel && panel->funcs && panel->funcs->prepare) | ||
| 102 | return panel->funcs->prepare(panel); | ||
| 103 | |||
| 104 | return panel ? -ENOSYS : -EINVAL; | ||
| 105 | } | ||
| 106 | |||
| 57 | static inline int drm_panel_enable(struct drm_panel *panel) | 107 | static inline int drm_panel_enable(struct drm_panel *panel) |
| 58 | { | 108 | { |
| 59 | if (panel && panel->funcs && panel->funcs->enable) | 109 | if (panel && panel->funcs && panel->funcs->enable) |
| @@ -62,6 +112,14 @@ static inline int drm_panel_enable(struct drm_panel *panel) | |||
| 62 | return panel ? -ENOSYS : -EINVAL; | 112 | return panel ? -ENOSYS : -EINVAL; |
| 63 | } | 113 | } |
| 64 | 114 | ||
| 115 | static inline int drm_panel_get_modes(struct drm_panel *panel) | ||
| 116 | { | ||
| 117 | if (panel && panel->funcs && panel->funcs->get_modes) | ||
| 118 | return panel->funcs->get_modes(panel); | ||
| 119 | |||
| 120 | return panel ? -ENOSYS : -EINVAL; | ||
| 121 | } | ||
| 122 | |||
| 65 | void drm_panel_init(struct drm_panel *panel); | 123 | void drm_panel_init(struct drm_panel *panel); |
| 66 | 124 | ||
| 67 | int drm_panel_add(struct drm_panel *panel); | 125 | int drm_panel_add(struct drm_panel *panel); |
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 6dfd64b3a604..e973540cd15b 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | {0x1002, 0x1315, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 17 | {0x1002, 0x1315, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 18 | {0x1002, 0x1316, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 18 | {0x1002, 0x1316, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 19 | {0x1002, 0x1317, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 19 | {0x1002, 0x1317, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 20 | {0x1002, 0x1318, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
| 20 | {0x1002, 0x131B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 21 | {0x1002, 0x131B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 21 | {0x1002, 0x131C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 22 | {0x1002, 0x131C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 22 | {0x1002, 0x131D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 23 | {0x1002, 0x131D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| @@ -164,8 +165,11 @@ | |||
| 164 | {0x1002, 0x6601, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 165 | {0x1002, 0x6601, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| 165 | {0x1002, 0x6602, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 166 | {0x1002, 0x6602, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| 166 | {0x1002, 0x6603, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 167 | {0x1002, 0x6603, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| 168 | {0x1002, 0x6604, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
| 169 | {0x1002, 0x6605, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
| 167 | {0x1002, 0x6606, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 170 | {0x1002, 0x6606, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| 168 | {0x1002, 0x6607, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 171 | {0x1002, 0x6607, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| 172 | {0x1002, 0x6608, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ | ||
| 169 | {0x1002, 0x6610, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ | 173 | {0x1002, 0x6610, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ |
| 170 | {0x1002, 0x6611, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ | 174 | {0x1002, 0x6611, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ |
| 171 | {0x1002, 0x6613, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ | 175 | {0x1002, 0x6613, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ |
| @@ -175,6 +179,8 @@ | |||
| 175 | {0x1002, 0x6631, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ | 179 | {0x1002, 0x6631, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ |
| 176 | {0x1002, 0x6640, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 180 | {0x1002, 0x6640, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| 177 | {0x1002, 0x6641, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 181 | {0x1002, 0x6641, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| 182 | {0x1002, 0x6646, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
| 183 | {0x1002, 0x6647, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
| 178 | {0x1002, 0x6649, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_NEW_MEMMAP}, \ | 184 | {0x1002, 0x6649, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_NEW_MEMMAP}, \ |
| 179 | {0x1002, 0x6650, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_NEW_MEMMAP}, \ | 185 | {0x1002, 0x6650, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_NEW_MEMMAP}, \ |
| 180 | {0x1002, 0x6651, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_NEW_MEMMAP}, \ | 186 | {0x1002, 0x6651, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_NEW_MEMMAP}, \ |
| @@ -297,6 +303,7 @@ | |||
| 297 | {0x1002, 0x6829, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ | 303 | {0x1002, 0x6829, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ |
| 298 | {0x1002, 0x682A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 304 | {0x1002, 0x682A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| 299 | {0x1002, 0x682B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 305 | {0x1002, 0x682B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| 306 | {0x1002, 0x682C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ | ||
| 300 | {0x1002, 0x682D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 307 | {0x1002, 0x682D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| 301 | {0x1002, 0x682F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 308 | {0x1002, 0x682F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| 302 | {0x1002, 0x6830, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 309 | {0x1002, 0x6830, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
diff --git a/include/drm/drm_rect.h b/include/drm/drm_rect.h index d1286297567b..26bb55e9e8b6 100644 --- a/include/drm/drm_rect.h +++ b/include/drm/drm_rect.h | |||
| @@ -163,5 +163,11 @@ int drm_rect_calc_vscale_relaxed(struct drm_rect *src, | |||
| 163 | struct drm_rect *dst, | 163 | struct drm_rect *dst, |
| 164 | int min_vscale, int max_vscale); | 164 | int min_vscale, int max_vscale); |
| 165 | void drm_rect_debug_print(const struct drm_rect *r, bool fixed_point); | 165 | void drm_rect_debug_print(const struct drm_rect *r, bool fixed_point); |
| 166 | void drm_rect_rotate(struct drm_rect *r, | ||
| 167 | int width, int height, | ||
| 168 | unsigned int rotation); | ||
| 169 | void drm_rect_rotate_inv(struct drm_rect *r, | ||
| 170 | int width, int height, | ||
| 171 | unsigned int rotation); | ||
| 166 | 172 | ||
| 167 | #endif | 173 | #endif |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index a5183da3ef92..1d9f0f1ff52d 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
| @@ -133,6 +133,7 @@ struct ttm_tt { | |||
| 133 | * struct ttm_dma_tt | 133 | * struct ttm_dma_tt |
| 134 | * | 134 | * |
| 135 | * @ttm: Base ttm_tt struct. | 135 | * @ttm: Base ttm_tt struct. |
| 136 | * @cpu_address: The CPU address of the pages | ||
| 136 | * @dma_address: The DMA (bus) addresses of the pages | 137 | * @dma_address: The DMA (bus) addresses of the pages |
| 137 | * @pages_list: used by some page allocation backend | 138 | * @pages_list: used by some page allocation backend |
| 138 | * | 139 | * |
| @@ -142,6 +143,7 @@ struct ttm_tt { | |||
| 142 | */ | 143 | */ |
| 143 | struct ttm_dma_tt { | 144 | struct ttm_dma_tt { |
| 144 | struct ttm_tt ttm; | 145 | struct ttm_tt ttm; |
| 146 | void **cpu_address; | ||
| 145 | dma_addr_t *dma_address; | 147 | dma_addr_t *dma_address; |
| 146 | struct list_head pages_list; | 148 | struct list_head pages_list; |
| 147 | }; | 149 | }; |
| @@ -182,6 +184,7 @@ struct ttm_mem_type_manager_func { | |||
| 182 | * @man: Pointer to a memory type manager. | 184 | * @man: Pointer to a memory type manager. |
| 183 | * @bo: Pointer to the buffer object we're allocating space for. | 185 | * @bo: Pointer to the buffer object we're allocating space for. |
| 184 | * @placement: Placement details. | 186 | * @placement: Placement details. |
| 187 | * @flags: Additional placement flags. | ||
| 185 | * @mem: Pointer to a struct ttm_mem_reg to be filled in. | 188 | * @mem: Pointer to a struct ttm_mem_reg to be filled in. |
| 186 | * | 189 | * |
| 187 | * This function should allocate space in the memory type managed | 190 | * This function should allocate space in the memory type managed |
| @@ -206,6 +209,7 @@ struct ttm_mem_type_manager_func { | |||
| 206 | int (*get_node)(struct ttm_mem_type_manager *man, | 209 | int (*get_node)(struct ttm_mem_type_manager *man, |
| 207 | struct ttm_buffer_object *bo, | 210 | struct ttm_buffer_object *bo, |
| 208 | struct ttm_placement *placement, | 211 | struct ttm_placement *placement, |
| 212 | uint32_t flags, | ||
| 209 | struct ttm_mem_reg *mem); | 213 | struct ttm_mem_reg *mem); |
| 210 | 214 | ||
| 211 | /** | 215 | /** |
| @@ -653,18 +657,6 @@ extern void ttm_tt_unbind(struct ttm_tt *ttm); | |||
| 653 | extern int ttm_tt_swapin(struct ttm_tt *ttm); | 657 | extern int ttm_tt_swapin(struct ttm_tt *ttm); |
| 654 | 658 | ||
| 655 | /** | 659 | /** |
| 656 | * ttm_tt_cache_flush: | ||
| 657 | * | ||
| 658 | * @pages: An array of pointers to struct page:s to flush. | ||
| 659 | * @num_pages: Number of pages to flush. | ||
| 660 | * | ||
| 661 | * Flush the data of the indicated pages from the cpu caches. | ||
| 662 | * This is used when changing caching attributes of the pages from | ||
| 663 | * cache-coherent. | ||
| 664 | */ | ||
| 665 | extern void ttm_tt_cache_flush(struct page *pages[], unsigned long num_pages); | ||
| 666 | |||
| 667 | /** | ||
| 668 | * ttm_tt_set_placement_caching: | 660 | * ttm_tt_set_placement_caching: |
| 669 | * | 661 | * |
| 670 | * @ttm A struct ttm_tt the backing pages of which will change caching policy. | 662 | * @ttm A struct ttm_tt the backing pages of which will change caching policy. |
diff --git a/include/dt-bindings/clock/imx1-clock.h b/include/dt-bindings/clock/imx1-clock.h new file mode 100644 index 000000000000..607bf01a31dd --- /dev/null +++ b/include/dt-bindings/clock/imx1-clock.h | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru> | ||
| 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 | */ | ||
| 9 | |||
| 10 | #ifndef __DT_BINDINGS_CLOCK_IMX1_H | ||
| 11 | #define __DT_BINDINGS_CLOCK_IMX1_H | ||
| 12 | |||
| 13 | #define IMX1_CLK_DUMMY 0 | ||
| 14 | #define IMX1_CLK_CLK32 1 | ||
| 15 | #define IMX1_CLK_CLK16M_EXT 2 | ||
| 16 | #define IMX1_CLK_CLK16M 3 | ||
| 17 | #define IMX1_CLK_CLK32_PREMULT 4 | ||
| 18 | #define IMX1_CLK_PREM 5 | ||
| 19 | #define IMX1_CLK_MPLL 6 | ||
| 20 | #define IMX1_CLK_MPLL_GATE 7 | ||
| 21 | #define IMX1_CLK_SPLL 8 | ||
| 22 | #define IMX1_CLK_SPLL_GATE 9 | ||
| 23 | #define IMX1_CLK_MCU 10 | ||
| 24 | #define IMX1_CLK_FCLK 11 | ||
| 25 | #define IMX1_CLK_HCLK 12 | ||
| 26 | #define IMX1_CLK_CLK48M 13 | ||
| 27 | #define IMX1_CLK_PER1 14 | ||
| 28 | #define IMX1_CLK_PER2 15 | ||
| 29 | #define IMX1_CLK_PER3 16 | ||
| 30 | #define IMX1_CLK_CLKO 17 | ||
| 31 | #define IMX1_CLK_UART3_GATE 18 | ||
| 32 | #define IMX1_CLK_SSI2_GATE 19 | ||
| 33 | #define IMX1_CLK_BROM_GATE 20 | ||
| 34 | #define IMX1_CLK_DMA_GATE 21 | ||
| 35 | #define IMX1_CLK_CSI_GATE 22 | ||
| 36 | #define IMX1_CLK_MMA_GATE 23 | ||
| 37 | #define IMX1_CLK_USBD_GATE 24 | ||
| 38 | #define IMX1_CLK_MAX 25 | ||
| 39 | |||
| 40 | #endif | ||
diff --git a/include/dt-bindings/clock/imx21-clock.h b/include/dt-bindings/clock/imx21-clock.h new file mode 100644 index 000000000000..b13596cf51b2 --- /dev/null +++ b/include/dt-bindings/clock/imx21-clock.h | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru> | ||
| 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 | */ | ||
| 9 | |||
| 10 | #ifndef __DT_BINDINGS_CLOCK_IMX21_H | ||
| 11 | #define __DT_BINDINGS_CLOCK_IMX21_H | ||
| 12 | |||
| 13 | #define IMX21_CLK_DUMMY 0 | ||
| 14 | #define IMX21_CLK_CKIL 1 | ||
| 15 | #define IMX21_CLK_CKIH 2 | ||
| 16 | #define IMX21_CLK_FPM 3 | ||
| 17 | #define IMX21_CLK_CKIH_DIV1P5 4 | ||
| 18 | #define IMX21_CLK_MPLL_GATE 5 | ||
| 19 | #define IMX21_CLK_SPLL_GATE 6 | ||
| 20 | #define IMX21_CLK_FPM_GATE 7 | ||
| 21 | #define IMX21_CLK_CKIH_GATE 8 | ||
| 22 | #define IMX21_CLK_MPLL_OSC_SEL 9 | ||
| 23 | #define IMX21_CLK_IPG 10 | ||
| 24 | #define IMX21_CLK_HCLK 11 | ||
| 25 | #define IMX21_CLK_MPLL_SEL 12 | ||
| 26 | #define IMX21_CLK_SPLL_SEL 13 | ||
| 27 | #define IMX21_CLK_SSI1_SEL 14 | ||
| 28 | #define IMX21_CLK_SSI2_SEL 15 | ||
| 29 | #define IMX21_CLK_USB_DIV 16 | ||
| 30 | #define IMX21_CLK_FCLK 17 | ||
| 31 | #define IMX21_CLK_MPLL 18 | ||
| 32 | #define IMX21_CLK_SPLL 19 | ||
| 33 | #define IMX21_CLK_NFC_DIV 20 | ||
| 34 | #define IMX21_CLK_SSI1_DIV 21 | ||
| 35 | #define IMX21_CLK_SSI2_DIV 22 | ||
| 36 | #define IMX21_CLK_PER1 23 | ||
| 37 | #define IMX21_CLK_PER2 24 | ||
| 38 | #define IMX21_CLK_PER3 25 | ||
| 39 | #define IMX21_CLK_PER4 26 | ||
| 40 | #define IMX21_CLK_UART1_IPG_GATE 27 | ||
| 41 | #define IMX21_CLK_UART2_IPG_GATE 28 | ||
| 42 | #define IMX21_CLK_UART3_IPG_GATE 29 | ||
| 43 | #define IMX21_CLK_UART4_IPG_GATE 30 | ||
| 44 | #define IMX21_CLK_CSPI1_IPG_GATE 31 | ||
| 45 | #define IMX21_CLK_CSPI2_IPG_GATE 32 | ||
| 46 | #define IMX21_CLK_SSI1_GATE 33 | ||
| 47 | #define IMX21_CLK_SSI2_GATE 34 | ||
| 48 | #define IMX21_CLK_SDHC1_IPG_GATE 35 | ||
| 49 | #define IMX21_CLK_SDHC2_IPG_GATE 36 | ||
| 50 | #define IMX21_CLK_GPIO_GATE 37 | ||
| 51 | #define IMX21_CLK_I2C_GATE 38 | ||
| 52 | #define IMX21_CLK_DMA_GATE 39 | ||
| 53 | #define IMX21_CLK_USB_GATE 40 | ||
| 54 | #define IMX21_CLK_EMMA_GATE 41 | ||
| 55 | #define IMX21_CLK_SSI2_BAUD_GATE 42 | ||
| 56 | #define IMX21_CLK_SSI1_BAUD_GATE 43 | ||
| 57 | #define IMX21_CLK_LCDC_IPG_GATE 44 | ||
| 58 | #define IMX21_CLK_NFC_GATE 45 | ||
| 59 | #define IMX21_CLK_LCDC_HCLK_GATE 46 | ||
| 60 | #define IMX21_CLK_PER4_GATE 47 | ||
| 61 | #define IMX21_CLK_BMI_GATE 48 | ||
| 62 | #define IMX21_CLK_USB_HCLK_GATE 49 | ||
| 63 | #define IMX21_CLK_SLCDC_GATE 50 | ||
| 64 | #define IMX21_CLK_SLCDC_HCLK_GATE 51 | ||
| 65 | #define IMX21_CLK_EMMA_HCLK_GATE 52 | ||
| 66 | #define IMX21_CLK_BROM_GATE 53 | ||
| 67 | #define IMX21_CLK_DMA_HCLK_GATE 54 | ||
| 68 | #define IMX21_CLK_CSI_HCLK_GATE 55 | ||
| 69 | #define IMX21_CLK_CSPI3_IPG_GATE 56 | ||
| 70 | #define IMX21_CLK_WDOG_GATE 57 | ||
| 71 | #define IMX21_CLK_GPT1_IPG_GATE 58 | ||
| 72 | #define IMX21_CLK_GPT2_IPG_GATE 59 | ||
| 73 | #define IMX21_CLK_GPT3_IPG_GATE 60 | ||
| 74 | #define IMX21_CLK_PWM_IPG_GATE 61 | ||
| 75 | #define IMX21_CLK_RTC_GATE 62 | ||
| 76 | #define IMX21_CLK_KPP_GATE 63 | ||
| 77 | #define IMX21_CLK_OWIRE_GATE 64 | ||
| 78 | #define IMX21_CLK_MAX 65 | ||
| 79 | |||
| 80 | #endif | ||
diff --git a/include/dt-bindings/clock/imx27-clock.h b/include/dt-bindings/clock/imx27-clock.h new file mode 100644 index 000000000000..148b053e54ec --- /dev/null +++ b/include/dt-bindings/clock/imx27-clock.h | |||
| @@ -0,0 +1,108 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru> | ||
| 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 | */ | ||
| 9 | |||
| 10 | #ifndef __DT_BINDINGS_CLOCK_IMX27_H | ||
| 11 | #define __DT_BINDINGS_CLOCK_IMX27_H | ||
| 12 | |||
| 13 | #define IMX27_CLK_DUMMY 0 | ||
| 14 | #define IMX27_CLK_CKIH 1 | ||
| 15 | #define IMX27_CLK_CKIL 2 | ||
| 16 | #define IMX27_CLK_MPLL 3 | ||
| 17 | #define IMX27_CLK_SPLL 4 | ||
| 18 | #define IMX27_CLK_MPLL_MAIN2 5 | ||
| 19 | #define IMX27_CLK_AHB 6 | ||
| 20 | #define IMX27_CLK_IPG 7 | ||
| 21 | #define IMX27_CLK_NFC_DIV 8 | ||
| 22 | #define IMX27_CLK_PER1_DIV 9 | ||
| 23 | #define IMX27_CLK_PER2_DIV 10 | ||
| 24 | #define IMX27_CLK_PER3_DIV 11 | ||
| 25 | #define IMX27_CLK_PER4_DIV 12 | ||
| 26 | #define IMX27_CLK_VPU_SEL 13 | ||
| 27 | #define IMX27_CLK_VPU_DIV 14 | ||
| 28 | #define IMX27_CLK_USB_DIV 15 | ||
| 29 | #define IMX27_CLK_CPU_SEL 16 | ||
| 30 | #define IMX27_CLK_CLKO_SEL 17 | ||
| 31 | #define IMX27_CLK_CPU_DIV 18 | ||
| 32 | #define IMX27_CLK_CLKO_DIV 19 | ||
| 33 | #define IMX27_CLK_SSI1_SEL 20 | ||
| 34 | #define IMX27_CLK_SSI2_SEL 21 | ||
| 35 | #define IMX27_CLK_SSI1_DIV 22 | ||
| 36 | #define IMX27_CLK_SSI2_DIV 23 | ||
| 37 | #define IMX27_CLK_CLKO_EN 24 | ||
| 38 | #define IMX27_CLK_SSI2_IPG_GATE 25 | ||
| 39 | #define IMX27_CLK_SSI1_IPG_GATE 26 | ||
| 40 | #define IMX27_CLK_SLCDC_IPG_GATE 27 | ||
| 41 | #define IMX27_CLK_SDHC3_IPG_GATE 28 | ||
| 42 | #define IMX27_CLK_SDHC2_IPG_GATE 29 | ||
| 43 | #define IMX27_CLK_SDHC1_IPG_GATE 30 | ||
| 44 | #define IMX27_CLK_SCC_IPG_GATE 31 | ||
| 45 | #define IMX27_CLK_SAHARA_IPG_GATE 32 | ||
| 46 | #define IMX27_CLK_RTC_IPG_GATE 33 | ||
| 47 | #define IMX27_CLK_PWM_IPG_GATE 34 | ||
| 48 | #define IMX27_CLK_OWIRE_IPG_GATE 35 | ||
| 49 | #define IMX27_CLK_LCDC_IPG_GATE 36 | ||
| 50 | #define IMX27_CLK_KPP_IPG_GATE 37 | ||
| 51 | #define IMX27_CLK_IIM_IPG_GATE 38 | ||
| 52 | #define IMX27_CLK_I2C2_IPG_GATE 39 | ||
| 53 | #define IMX27_CLK_I2C1_IPG_GATE 40 | ||
| 54 | #define IMX27_CLK_GPT6_IPG_GATE 41 | ||
| 55 | #define IMX27_CLK_GPT5_IPG_GATE 42 | ||
| 56 | #define IMX27_CLK_GPT4_IPG_GATE 43 | ||
| 57 | #define IMX27_CLK_GPT3_IPG_GATE 44 | ||
| 58 | #define IMX27_CLK_GPT2_IPG_GATE 45 | ||
| 59 | #define IMX27_CLK_GPT1_IPG_GATE 46 | ||
| 60 | #define IMX27_CLK_GPIO_IPG_GATE 47 | ||
| 61 | #define IMX27_CLK_FEC_IPG_GATE 48 | ||
| 62 | #define IMX27_CLK_EMMA_IPG_GATE 49 | ||
| 63 | #define IMX27_CLK_DMA_IPG_GATE 50 | ||
| 64 | #define IMX27_CLK_CSPI3_IPG_GATE 51 | ||
| 65 | #define IMX27_CLK_CSPI2_IPG_GATE 52 | ||
| 66 | #define IMX27_CLK_CSPI1_IPG_GATE 53 | ||
| 67 | #define IMX27_CLK_NFC_BAUD_GATE 54 | ||
| 68 | #define IMX27_CLK_SSI2_BAUD_GATE 55 | ||
| 69 | #define IMX27_CLK_SSI1_BAUD_GATE 56 | ||
| 70 | #define IMX27_CLK_VPU_BAUD_GATE 57 | ||
| 71 | #define IMX27_CLK_PER4_GATE 58 | ||
| 72 | #define IMX27_CLK_PER3_GATE 59 | ||
| 73 | #define IMX27_CLK_PER2_GATE 60 | ||
| 74 | #define IMX27_CLK_PER1_GATE 61 | ||
| 75 | #define IMX27_CLK_USB_AHB_GATE 62 | ||
| 76 | #define IMX27_CLK_SLCDC_AHB_GATE 63 | ||
| 77 | #define IMX27_CLK_SAHARA_AHB_GATE 64 | ||
| 78 | #define IMX27_CLK_LCDC_AHB_GATE 65 | ||
| 79 | #define IMX27_CLK_VPU_AHB_GATE 66 | ||
| 80 | #define IMX27_CLK_FEC_AHB_GATE 67 | ||
| 81 | #define IMX27_CLK_EMMA_AHB_GATE 68 | ||
| 82 | #define IMX27_CLK_EMI_AHB_GATE 69 | ||
| 83 | #define IMX27_CLK_DMA_AHB_GATE 70 | ||
| 84 | #define IMX27_CLK_CSI_AHB_GATE 71 | ||
| 85 | #define IMX27_CLK_BROM_AHB_GATE 72 | ||
| 86 | #define IMX27_CLK_ATA_AHB_GATE 73 | ||
| 87 | #define IMX27_CLK_WDOG_IPG_GATE 74 | ||
| 88 | #define IMX27_CLK_USB_IPG_GATE 75 | ||
| 89 | #define IMX27_CLK_UART6_IPG_GATE 76 | ||
| 90 | #define IMX27_CLK_UART5_IPG_GATE 77 | ||
| 91 | #define IMX27_CLK_UART4_IPG_GATE 78 | ||
| 92 | #define IMX27_CLK_UART3_IPG_GATE 79 | ||
| 93 | #define IMX27_CLK_UART2_IPG_GATE 80 | ||
| 94 | #define IMX27_CLK_UART1_IPG_GATE 81 | ||
| 95 | #define IMX27_CLK_CKIH_DIV1P5 82 | ||
| 96 | #define IMX27_CLK_FPM 83 | ||
| 97 | #define IMX27_CLK_MPLL_OSC_SEL 84 | ||
| 98 | #define IMX27_CLK_MPLL_SEL 85 | ||
| 99 | #define IMX27_CLK_SPLL_GATE 86 | ||
| 100 | #define IMX27_CLK_MSHC_DIV 87 | ||
| 101 | #define IMX27_CLK_RTIC_IPG_GATE 88 | ||
| 102 | #define IMX27_CLK_MSHC_IPG_GATE 89 | ||
| 103 | #define IMX27_CLK_RTIC_AHB_GATE 90 | ||
| 104 | #define IMX27_CLK_MSHC_BAUD_GATE 91 | ||
| 105 | #define IMX27_CLK_CKIH_GATE 92 | ||
| 106 | #define IMX27_CLK_MAX 93 | ||
| 107 | |||
| 108 | #endif | ||
diff --git a/include/dt-bindings/clock/imx6qdl-clock.h b/include/dt-bindings/clock/imx6qdl-clock.h new file mode 100644 index 000000000000..654151e24288 --- /dev/null +++ b/include/dt-bindings/clock/imx6qdl-clock.h | |||
| @@ -0,0 +1,224 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2014 Freescale Semiconductor, Inc. | ||
| 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 | |||
| 9 | #ifndef __DT_BINDINGS_CLOCK_IMX6QDL_H | ||
| 10 | #define __DT_BINDINGS_CLOCK_IMX6QDL_H | ||
| 11 | |||
| 12 | #define IMX6QDL_CLK_DUMMY 0 | ||
| 13 | #define IMX6QDL_CLK_CKIL 1 | ||
| 14 | #define IMX6QDL_CLK_CKIH 2 | ||
| 15 | #define IMX6QDL_CLK_OSC 3 | ||
| 16 | #define IMX6QDL_CLK_PLL2_PFD0_352M 4 | ||
| 17 | #define IMX6QDL_CLK_PLL2_PFD1_594M 5 | ||
| 18 | #define IMX6QDL_CLK_PLL2_PFD2_396M 6 | ||
| 19 | #define IMX6QDL_CLK_PLL3_PFD0_720M 7 | ||
| 20 | #define IMX6QDL_CLK_PLL3_PFD1_540M 8 | ||
| 21 | #define IMX6QDL_CLK_PLL3_PFD2_508M 9 | ||
| 22 | #define IMX6QDL_CLK_PLL3_PFD3_454M 10 | ||
| 23 | #define IMX6QDL_CLK_PLL2_198M 11 | ||
| 24 | #define IMX6QDL_CLK_PLL3_120M 12 | ||
| 25 | #define IMX6QDL_CLK_PLL3_80M 13 | ||
| 26 | #define IMX6QDL_CLK_PLL3_60M 14 | ||
| 27 | #define IMX6QDL_CLK_TWD 15 | ||
| 28 | #define IMX6QDL_CLK_STEP 16 | ||
| 29 | #define IMX6QDL_CLK_PLL1_SW 17 | ||
| 30 | #define IMX6QDL_CLK_PERIPH_PRE 18 | ||
| 31 | #define IMX6QDL_CLK_PERIPH2_PRE 19 | ||
| 32 | #define IMX6QDL_CLK_PERIPH_CLK2_SEL 20 | ||
| 33 | #define IMX6QDL_CLK_PERIPH2_CLK2_SEL 21 | ||
| 34 | #define IMX6QDL_CLK_AXI_SEL 22 | ||
| 35 | #define IMX6QDL_CLK_ESAI_SEL 23 | ||
| 36 | #define IMX6QDL_CLK_ASRC_SEL 24 | ||
| 37 | #define IMX6QDL_CLK_SPDIF_SEL 25 | ||
| 38 | #define IMX6QDL_CLK_GPU2D_AXI 26 | ||
| 39 | #define IMX6QDL_CLK_GPU3D_AXI 27 | ||
| 40 | #define IMX6QDL_CLK_GPU2D_CORE_SEL 28 | ||
| 41 | #define IMX6QDL_CLK_GPU3D_CORE_SEL 29 | ||
| 42 | #define IMX6QDL_CLK_GPU3D_SHADER_SEL 30 | ||
| 43 | #define IMX6QDL_CLK_IPU1_SEL 31 | ||
| 44 | #define IMX6QDL_CLK_IPU2_SEL 32 | ||
| 45 | #define IMX6QDL_CLK_LDB_DI0_SEL 33 | ||
| 46 | #define IMX6QDL_CLK_LDB_DI1_SEL 34 | ||
| 47 | #define IMX6QDL_CLK_IPU1_DI0_PRE_SEL 35 | ||
| 48 | #define IMX6QDL_CLK_IPU1_DI1_PRE_SEL 36 | ||
| 49 | #define IMX6QDL_CLK_IPU2_DI0_PRE_SEL 37 | ||
| 50 | #define IMX6QDL_CLK_IPU2_DI1_PRE_SEL 38 | ||
| 51 | #define IMX6QDL_CLK_IPU1_DI0_SEL 39 | ||
| 52 | #define IMX6QDL_CLK_IPU1_DI1_SEL 40 | ||
| 53 | #define IMX6QDL_CLK_IPU2_DI0_SEL 41 | ||
| 54 | #define IMX6QDL_CLK_IPU2_DI1_SEL 42 | ||
| 55 | #define IMX6QDL_CLK_HSI_TX_SEL 43 | ||
| 56 | #define IMX6QDL_CLK_PCIE_AXI_SEL 44 | ||
| 57 | #define IMX6QDL_CLK_SSI1_SEL 45 | ||
| 58 | #define IMX6QDL_CLK_SSI2_SEL 46 | ||
| 59 | #define IMX6QDL_CLK_SSI3_SEL 47 | ||
| 60 | #define IMX6QDL_CLK_USDHC1_SEL 48 | ||
| 61 | #define IMX6QDL_CLK_USDHC2_SEL 49 | ||
| 62 | #define IMX6QDL_CLK_USDHC3_SEL 50 | ||
| 63 | #define IMX6QDL_CLK_USDHC4_SEL 51 | ||
| 64 | #define IMX6QDL_CLK_ENFC_SEL 52 | ||
| 65 | #define IMX6QDL_CLK_EMI_SEL 53 | ||
| 66 | #define IMX6QDL_CLK_EMI_SLOW_SEL 54 | ||
| 67 | #define IMX6QDL_CLK_VDO_AXI_SEL 55 | ||
| 68 | #define IMX6QDL_CLK_VPU_AXI_SEL 56 | ||
| 69 | #define IMX6QDL_CLK_CKO1_SEL 57 | ||
| 70 | #define IMX6QDL_CLK_PERIPH 58 | ||
| 71 | #define IMX6QDL_CLK_PERIPH2 59 | ||
| 72 | #define IMX6QDL_CLK_PERIPH_CLK2 60 | ||
| 73 | #define IMX6QDL_CLK_PERIPH2_CLK2 61 | ||
| 74 | #define IMX6QDL_CLK_IPG 62 | ||
| 75 | #define IMX6QDL_CLK_IPG_PER 63 | ||
| 76 | #define IMX6QDL_CLK_ESAI_PRED 64 | ||
| 77 | #define IMX6QDL_CLK_ESAI_PODF 65 | ||
| 78 | #define IMX6QDL_CLK_ASRC_PRED 66 | ||
| 79 | #define IMX6QDL_CLK_ASRC_PODF 67 | ||
| 80 | #define IMX6QDL_CLK_SPDIF_PRED 68 | ||
| 81 | #define IMX6QDL_CLK_SPDIF_PODF 69 | ||
| 82 | #define IMX6QDL_CLK_CAN_ROOT 70 | ||
| 83 | #define IMX6QDL_CLK_ECSPI_ROOT 71 | ||
| 84 | #define IMX6QDL_CLK_GPU2D_CORE_PODF 72 | ||
| 85 | #define IMX6QDL_CLK_GPU3D_CORE_PODF 73 | ||
| 86 | #define IMX6QDL_CLK_GPU3D_SHADER 74 | ||
| 87 | #define IMX6QDL_CLK_IPU1_PODF 75 | ||
| 88 | #define IMX6QDL_CLK_IPU2_PODF 76 | ||
| 89 | #define IMX6QDL_CLK_LDB_DI0_PODF 77 | ||
| 90 | #define IMX6QDL_CLK_LDB_DI1_PODF 78 | ||
| 91 | #define IMX6QDL_CLK_IPU1_DI0_PRE 79 | ||
| 92 | #define IMX6QDL_CLK_IPU1_DI1_PRE 80 | ||
| 93 | #define IMX6QDL_CLK_IPU2_DI0_PRE 81 | ||
| 94 | #define IMX6QDL_CLK_IPU2_DI1_PRE 82 | ||
| 95 | #define IMX6QDL_CLK_HSI_TX_PODF 83 | ||
| 96 | #define IMX6QDL_CLK_SSI1_PRED 84 | ||
| 97 | #define IMX6QDL_CLK_SSI1_PODF 85 | ||
| 98 | #define IMX6QDL_CLK_SSI2_PRED 86 | ||
| 99 | #define IMX6QDL_CLK_SSI2_PODF 87 | ||
| 100 | #define IMX6QDL_CLK_SSI3_PRED 88 | ||
| 101 | #define IMX6QDL_CLK_SSI3_PODF 89 | ||
| 102 | #define IMX6QDL_CLK_UART_SERIAL_PODF 90 | ||
| 103 | #define IMX6QDL_CLK_USDHC1_PODF 91 | ||
| 104 | #define IMX6QDL_CLK_USDHC2_PODF 92 | ||
| 105 | #define IMX6QDL_CLK_USDHC3_PODF 93 | ||
| 106 | #define IMX6QDL_CLK_USDHC4_PODF 94 | ||
| 107 | #define IMX6QDL_CLK_ENFC_PRED 95 | ||
| 108 | #define IMX6QDL_CLK_ENFC_PODF 96 | ||
| 109 | #define IMX6QDL_CLK_EMI_PODF 97 | ||
| 110 | #define IMX6QDL_CLK_EMI_SLOW_PODF 98 | ||
| 111 | #define IMX6QDL_CLK_VPU_AXI_PODF 99 | ||
| 112 | #define IMX6QDL_CLK_CKO1_PODF 100 | ||
| 113 | #define IMX6QDL_CLK_AXI 101 | ||
| 114 | #define IMX6QDL_CLK_MMDC_CH0_AXI_PODF 102 | ||
| 115 | #define IMX6QDL_CLK_MMDC_CH1_AXI_PODF 103 | ||
| 116 | #define IMX6QDL_CLK_ARM 104 | ||
| 117 | #define IMX6QDL_CLK_AHB 105 | ||
| 118 | #define IMX6QDL_CLK_APBH_DMA 106 | ||
| 119 | #define IMX6QDL_CLK_ASRC 107 | ||
| 120 | #define IMX6QDL_CLK_CAN1_IPG 108 | ||
| 121 | #define IMX6QDL_CLK_CAN1_SERIAL 109 | ||
| 122 | #define IMX6QDL_CLK_CAN2_IPG 110 | ||
| 123 | #define IMX6QDL_CLK_CAN2_SERIAL 111 | ||
| 124 | #define IMX6QDL_CLK_ECSPI1 112 | ||
| 125 | #define IMX6QDL_CLK_ECSPI2 113 | ||
| 126 | #define IMX6QDL_CLK_ECSPI3 114 | ||
| 127 | #define IMX6QDL_CLK_ECSPI4 115 | ||
| 128 | #define IMX6Q_CLK_ECSPI5 116 | ||
| 129 | #define IMX6DL_CLK_I2C4 116 | ||
| 130 | #define IMX6QDL_CLK_ENET 117 | ||
| 131 | #define IMX6QDL_CLK_ESAI 118 | ||
| 132 | #define IMX6QDL_CLK_GPT_IPG 119 | ||
| 133 | #define IMX6QDL_CLK_GPT_IPG_PER 120 | ||
| 134 | #define IMX6QDL_CLK_GPU2D_CORE 121 | ||
| 135 | #define IMX6QDL_CLK_GPU3D_CORE 122 | ||
| 136 | #define IMX6QDL_CLK_HDMI_IAHB 123 | ||
| 137 | #define IMX6QDL_CLK_HDMI_ISFR 124 | ||
| 138 | #define IMX6QDL_CLK_I2C1 125 | ||
| 139 | #define IMX6QDL_CLK_I2C2 126 | ||
| 140 | #define IMX6QDL_CLK_I2C3 127 | ||
| 141 | #define IMX6QDL_CLK_IIM 128 | ||
| 142 | #define IMX6QDL_CLK_ENFC 129 | ||
| 143 | #define IMX6QDL_CLK_IPU1 130 | ||
| 144 | #define IMX6QDL_CLK_IPU1_DI0 131 | ||
| 145 | #define IMX6QDL_CLK_IPU1_DI1 132 | ||
| 146 | #define IMX6QDL_CLK_IPU2 133 | ||
| 147 | #define IMX6QDL_CLK_IPU2_DI0 134 | ||
| 148 | #define IMX6QDL_CLK_LDB_DI0 135 | ||
| 149 | #define IMX6QDL_CLK_LDB_DI1 136 | ||
| 150 | #define IMX6QDL_CLK_IPU2_DI1 137 | ||
| 151 | #define IMX6QDL_CLK_HSI_TX 138 | ||
| 152 | #define IMX6QDL_CLK_MLB 139 | ||
| 153 | #define IMX6QDL_CLK_MMDC_CH0_AXI 140 | ||
| 154 | #define IMX6QDL_CLK_MMDC_CH1_AXI 141 | ||
| 155 | #define IMX6QDL_CLK_OCRAM 142 | ||
| 156 | #define IMX6QDL_CLK_OPENVG_AXI 143 | ||
| 157 | #define IMX6QDL_CLK_PCIE_AXI 144 | ||
| 158 | #define IMX6QDL_CLK_PWM1 145 | ||
| 159 | #define IMX6QDL_CLK_PWM2 146 | ||
| 160 | #define IMX6QDL_CLK_PWM3 147 | ||
| 161 | #define IMX6QDL_CLK_PWM4 148 | ||
| 162 | #define IMX6QDL_CLK_PER1_BCH 149 | ||
| 163 | #define IMX6QDL_CLK_GPMI_BCH_APB 150 | ||
| 164 | #define IMX6QDL_CLK_GPMI_BCH 151 | ||
| 165 | #define IMX6QDL_CLK_GPMI_IO 152 | ||
| 166 | #define IMX6QDL_CLK_GPMI_APB 153 | ||
| 167 | #define IMX6QDL_CLK_SATA 154 | ||
| 168 | #define IMX6QDL_CLK_SDMA 155 | ||
| 169 | #define IMX6QDL_CLK_SPBA 156 | ||
| 170 | #define IMX6QDL_CLK_SSI1 157 | ||
| 171 | #define IMX6QDL_CLK_SSI2 158 | ||
| 172 | #define IMX6QDL_CLK_SSI3 159 | ||
| 173 | #define IMX6QDL_CLK_UART_IPG 160 | ||
| 174 | #define IMX6QDL_CLK_UART_SERIAL 161 | ||
| 175 | #define IMX6QDL_CLK_USBOH3 162 | ||
| 176 | #define IMX6QDL_CLK_USDHC1 163 | ||
| 177 | #define IMX6QDL_CLK_USDHC2 164 | ||
| 178 | #define IMX6QDL_CLK_USDHC3 165 | ||
| 179 | #define IMX6QDL_CLK_USDHC4 166 | ||
| 180 | #define IMX6QDL_CLK_VDO_AXI 167 | ||
| 181 | #define IMX6QDL_CLK_VPU_AXI 168 | ||
| 182 | #define IMX6QDL_CLK_CKO1 169 | ||
| 183 | #define IMX6QDL_CLK_PLL1_SYS 170 | ||
| 184 | #define IMX6QDL_CLK_PLL2_BUS 171 | ||
| 185 | #define IMX6QDL_CLK_PLL3_USB_OTG 172 | ||
| 186 | #define IMX6QDL_CLK_PLL4_AUDIO 173 | ||
| 187 | #define IMX6QDL_CLK_PLL5_VIDEO 174 | ||
| 188 | #define IMX6QDL_CLK_PLL8_MLB 175 | ||
| 189 | #define IMX6QDL_CLK_PLL7_USB_HOST 176 | ||
| 190 | #define IMX6QDL_CLK_PLL6_ENET 177 | ||
| 191 | #define IMX6QDL_CLK_SSI1_IPG 178 | ||
| 192 | #define IMX6QDL_CLK_SSI2_IPG 179 | ||
| 193 | #define IMX6QDL_CLK_SSI3_IPG 180 | ||
| 194 | #define IMX6QDL_CLK_ROM 181 | ||
| 195 | #define IMX6QDL_CLK_USBPHY1 182 | ||
| 196 | #define IMX6QDL_CLK_USBPHY2 183 | ||
| 197 | #define IMX6QDL_CLK_LDB_DI0_DIV_3_5 184 | ||
| 198 | #define IMX6QDL_CLK_LDB_DI1_DIV_3_5 185 | ||
| 199 | #define IMX6QDL_CLK_SATA_REF 186 | ||
| 200 | #define IMX6QDL_CLK_SATA_REF_100M 187 | ||
| 201 | #define IMX6QDL_CLK_PCIE_REF 188 | ||
| 202 | #define IMX6QDL_CLK_PCIE_REF_125M 189 | ||
| 203 | #define IMX6QDL_CLK_ENET_REF 190 | ||
| 204 | #define IMX6QDL_CLK_USBPHY1_GATE 191 | ||
| 205 | #define IMX6QDL_CLK_USBPHY2_GATE 192 | ||
| 206 | #define IMX6QDL_CLK_PLL4_POST_DIV 193 | ||
| 207 | #define IMX6QDL_CLK_PLL5_POST_DIV 194 | ||
| 208 | #define IMX6QDL_CLK_PLL5_VIDEO_DIV 195 | ||
| 209 | #define IMX6QDL_CLK_EIM_SLOW 196 | ||
| 210 | #define IMX6QDL_CLK_SPDIF 197 | ||
| 211 | #define IMX6QDL_CLK_CKO2_SEL 198 | ||
| 212 | #define IMX6QDL_CLK_CKO2_PODF 199 | ||
| 213 | #define IMX6QDL_CLK_CKO2 200 | ||
| 214 | #define IMX6QDL_CLK_CKO 201 | ||
| 215 | #define IMX6QDL_CLK_VDOA 202 | ||
| 216 | #define IMX6QDL_CLK_PLL4_AUDIO_DIV 203 | ||
| 217 | #define IMX6QDL_CLK_LVDS1_SEL 204 | ||
| 218 | #define IMX6QDL_CLK_LVDS2_SEL 205 | ||
| 219 | #define IMX6QDL_CLK_LVDS1_GATE 206 | ||
| 220 | #define IMX6QDL_CLK_LVDS2_GATE 207 | ||
| 221 | #define IMX6QDL_CLK_ESAI_AHB 208 | ||
| 222 | #define IMX6QDL_CLK_END 209 | ||
| 223 | |||
| 224 | #endif /* __DT_BINDINGS_CLOCK_IMX6QDL_H */ | ||
diff --git a/include/dt-bindings/clock/r8a7790-clock.h b/include/dt-bindings/clock/r8a7790-clock.h index 1118f7a4bca6..f929a79e6998 100644 --- a/include/dt-bindings/clock/r8a7790-clock.h +++ b/include/dt-bindings/clock/r8a7790-clock.h | |||
| @@ -59,6 +59,7 @@ | |||
| 59 | #define R8A7790_CLK_SDHI0 14 | 59 | #define R8A7790_CLK_SDHI0 14 |
| 60 | #define R8A7790_CLK_MMCIF0 15 | 60 | #define R8A7790_CLK_MMCIF0 15 |
| 61 | #define R8A7790_CLK_IIC0 18 | 61 | #define R8A7790_CLK_IIC0 18 |
| 62 | #define R8A7790_CLK_PCIEC 19 | ||
| 62 | #define R8A7790_CLK_IIC1 23 | 63 | #define R8A7790_CLK_IIC1 23 |
| 63 | #define R8A7790_CLK_SSUSB 28 | 64 | #define R8A7790_CLK_SSUSB 28 |
| 64 | #define R8A7790_CLK_CMT1 29 | 65 | #define R8A7790_CLK_CMT1 29 |
| @@ -107,4 +108,30 @@ | |||
| 107 | #define R8A7790_CLK_I2C1 30 | 108 | #define R8A7790_CLK_I2C1 30 |
| 108 | #define R8A7790_CLK_I2C0 31 | 109 | #define R8A7790_CLK_I2C0 31 |
| 109 | 110 | ||
| 111 | /* MSTP10 */ | ||
| 112 | #define R8A7790_CLK_SSI_ALL 5 | ||
| 113 | #define R8A7790_CLK_SSI9 6 | ||
| 114 | #define R8A7790_CLK_SSI8 7 | ||
| 115 | #define R8A7790_CLK_SSI7 8 | ||
| 116 | #define R8A7790_CLK_SSI6 9 | ||
| 117 | #define R8A7790_CLK_SSI5 10 | ||
| 118 | #define R8A7790_CLK_SSI4 11 | ||
| 119 | #define R8A7790_CLK_SSI3 12 | ||
| 120 | #define R8A7790_CLK_SSI2 13 | ||
| 121 | #define R8A7790_CLK_SSI1 14 | ||
| 122 | #define R8A7790_CLK_SSI0 15 | ||
| 123 | #define R8A7790_CLK_SCU_ALL 17 | ||
| 124 | #define R8A7790_CLK_SCU_DVC1 18 | ||
| 125 | #define R8A7790_CLK_SCU_DVC0 19 | ||
| 126 | #define R8A7790_CLK_SCU_SRC9 22 | ||
| 127 | #define R8A7790_CLK_SCU_SRC8 23 | ||
| 128 | #define R8A7790_CLK_SCU_SRC7 24 | ||
| 129 | #define R8A7790_CLK_SCU_SRC6 25 | ||
| 130 | #define R8A7790_CLK_SCU_SRC5 26 | ||
| 131 | #define R8A7790_CLK_SCU_SRC4 27 | ||
| 132 | #define R8A7790_CLK_SCU_SRC3 28 | ||
| 133 | #define R8A7790_CLK_SCU_SRC2 29 | ||
| 134 | #define R8A7790_CLK_SCU_SRC1 30 | ||
| 135 | #define R8A7790_CLK_SCU_SRC0 31 | ||
| 136 | |||
| 110 | #endif /* __DT_BINDINGS_CLOCK_R8A7790_H__ */ | 137 | #endif /* __DT_BINDINGS_CLOCK_R8A7790_H__ */ |
diff --git a/include/dt-bindings/clock/r8a7791-clock.h b/include/dt-bindings/clock/r8a7791-clock.h index b050d18437ce..f0d4d1049162 100644 --- a/include/dt-bindings/clock/r8a7791-clock.h +++ b/include/dt-bindings/clock/r8a7791-clock.h | |||
| @@ -53,6 +53,7 @@ | |||
| 53 | #define R8A7791_CLK_SDHI0 14 | 53 | #define R8A7791_CLK_SDHI0 14 |
| 54 | #define R8A7791_CLK_MMCIF0 15 | 54 | #define R8A7791_CLK_MMCIF0 15 |
| 55 | #define R8A7791_CLK_IIC0 18 | 55 | #define R8A7791_CLK_IIC0 18 |
| 56 | #define R8A7791_CLK_PCIEC 19 | ||
| 56 | #define R8A7791_CLK_IIC1 23 | 57 | #define R8A7791_CLK_IIC1 23 |
| 57 | #define R8A7791_CLK_SSUSB 28 | 58 | #define R8A7791_CLK_SSUSB 28 |
| 58 | #define R8A7791_CLK_CMT1 29 | 59 | #define R8A7791_CLK_CMT1 29 |
| @@ -107,6 +108,32 @@ | |||
| 107 | #define R8A7791_CLK_I2C1 30 | 108 | #define R8A7791_CLK_I2C1 30 |
| 108 | #define R8A7791_CLK_I2C0 31 | 109 | #define R8A7791_CLK_I2C0 31 |
| 109 | 110 | ||
| 111 | /* MSTP10 */ | ||
| 112 | #define R8A7791_CLK_SSI_ALL 5 | ||
| 113 | #define R8A7791_CLK_SSI9 6 | ||
| 114 | #define R8A7791_CLK_SSI8 7 | ||
| 115 | #define R8A7791_CLK_SSI7 8 | ||
| 116 | #define R8A7791_CLK_SSI6 9 | ||
| 117 | #define R8A7791_CLK_SSI5 10 | ||
| 118 | #define R8A7791_CLK_SSI4 11 | ||
| 119 | #define R8A7791_CLK_SSI3 12 | ||
| 120 | #define R8A7791_CLK_SSI2 13 | ||
| 121 | #define R8A7791_CLK_SSI1 14 | ||
| 122 | #define R8A7791_CLK_SSI0 15 | ||
| 123 | #define R8A7791_CLK_SCU_ALL 17 | ||
| 124 | #define R8A7791_CLK_SCU_DVC1 18 | ||
| 125 | #define R8A7791_CLK_SCU_DVC0 19 | ||
| 126 | #define R8A7791_CLK_SCU_SRC9 22 | ||
| 127 | #define R8A7791_CLK_SCU_SRC8 23 | ||
| 128 | #define R8A7791_CLK_SCU_SRC7 24 | ||
| 129 | #define R8A7791_CLK_SCU_SRC6 25 | ||
| 130 | #define R8A7791_CLK_SCU_SRC5 26 | ||
| 131 | #define R8A7791_CLK_SCU_SRC4 27 | ||
| 132 | #define R8A7791_CLK_SCU_SRC3 28 | ||
| 133 | #define R8A7791_CLK_SCU_SRC2 29 | ||
| 134 | #define R8A7791_CLK_SCU_SRC1 30 | ||
| 135 | #define R8A7791_CLK_SCU_SRC0 31 | ||
| 136 | |||
| 110 | /* MSTP11 */ | 137 | /* MSTP11 */ |
| 111 | #define R8A7791_CLK_SCIFA3 6 | 138 | #define R8A7791_CLK_SCIFA3 6 |
| 112 | #define R8A7791_CLK_SCIFA4 7 | 139 | #define R8A7791_CLK_SCIFA4 7 |
diff --git a/include/dt-bindings/clock/s5pv210-audss.h b/include/dt-bindings/clock/s5pv210-audss.h new file mode 100644 index 000000000000..fe57406e24de --- /dev/null +++ b/include/dt-bindings/clock/s5pv210-audss.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2014 Tomasz Figa <tomasz.figa@gmail.com> | ||
| 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 | * This header provides constants for Samsung audio subsystem | ||
| 9 | * clock controller. | ||
| 10 | * | ||
| 11 | * The constants defined in this header are being used in dts | ||
| 12 | * and s5pv210 audss driver. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef _DT_BINDINGS_CLOCK_S5PV210_AUDSS_H | ||
| 16 | #define _DT_BINDINGS_CLOCK_S5PV210_AUDSS_H | ||
| 17 | |||
| 18 | #define CLK_MOUT_AUDSS 0 | ||
| 19 | #define CLK_MOUT_I2S_A 1 | ||
| 20 | |||
| 21 | #define CLK_DOUT_AUD_BUS 2 | ||
| 22 | #define CLK_DOUT_I2S_A 3 | ||
| 23 | |||
| 24 | #define CLK_I2S 4 | ||
| 25 | #define CLK_HCLK_I2S 5 | ||
| 26 | #define CLK_HCLK_UART 6 | ||
| 27 | #define CLK_HCLK_HWA 7 | ||
| 28 | #define CLK_HCLK_DMA 8 | ||
| 29 | #define CLK_HCLK_BUF 9 | ||
| 30 | #define CLK_HCLK_RP 10 | ||
| 31 | |||
| 32 | #define AUDSS_MAX_CLKS 11 | ||
| 33 | |||
| 34 | #endif | ||
diff --git a/include/dt-bindings/clock/s5pv210.h b/include/dt-bindings/clock/s5pv210.h new file mode 100644 index 000000000000..e88986b7c677 --- /dev/null +++ b/include/dt-bindings/clock/s5pv210.h | |||
| @@ -0,0 +1,239 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2013 Samsung Electronics Co., Ltd. | ||
| 3 | * Author: Mateusz Krawczuk <m.krawczuk@partner.samsung.com> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * Device Tree binding constants for Samsung S5PV210 clock controller. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef _DT_BINDINGS_CLOCK_S5PV210_H | ||
| 13 | #define _DT_BINDINGS_CLOCK_S5PV210_H | ||
| 14 | |||
| 15 | /* Core clocks. */ | ||
| 16 | #define FIN_PLL 1 | ||
| 17 | #define FOUT_APLL 2 | ||
| 18 | #define FOUT_MPLL 3 | ||
| 19 | #define FOUT_EPLL 4 | ||
| 20 | #define FOUT_VPLL 5 | ||
| 21 | |||
| 22 | /* Muxes. */ | ||
| 23 | #define MOUT_FLASH 6 | ||
| 24 | #define MOUT_PSYS 7 | ||
| 25 | #define MOUT_DSYS 8 | ||
| 26 | #define MOUT_MSYS 9 | ||
| 27 | #define MOUT_VPLL 10 | ||
| 28 | #define MOUT_EPLL 11 | ||
| 29 | #define MOUT_MPLL 12 | ||
| 30 | #define MOUT_APLL 13 | ||
| 31 | #define MOUT_VPLLSRC 14 | ||
| 32 | #define MOUT_CSIS 15 | ||
| 33 | #define MOUT_FIMD 16 | ||
| 34 | #define MOUT_CAM1 17 | ||
| 35 | #define MOUT_CAM0 18 | ||
| 36 | #define MOUT_DAC 19 | ||
| 37 | #define MOUT_MIXER 20 | ||
| 38 | #define MOUT_HDMI 21 | ||
| 39 | #define MOUT_G2D 22 | ||
| 40 | #define MOUT_MFC 23 | ||
| 41 | #define MOUT_G3D 24 | ||
| 42 | #define MOUT_FIMC2 25 | ||
| 43 | #define MOUT_FIMC1 26 | ||
| 44 | #define MOUT_FIMC0 27 | ||
| 45 | #define MOUT_UART3 28 | ||
| 46 | #define MOUT_UART2 29 | ||
| 47 | #define MOUT_UART1 30 | ||
| 48 | #define MOUT_UART0 31 | ||
| 49 | #define MOUT_MMC3 32 | ||
| 50 | #define MOUT_MMC2 33 | ||
| 51 | #define MOUT_MMC1 34 | ||
| 52 | #define MOUT_MMC0 35 | ||
| 53 | #define MOUT_PWM 36 | ||
| 54 | #define MOUT_SPI0 37 | ||
| 55 | #define MOUT_SPI1 38 | ||
| 56 | #define MOUT_DMC0 39 | ||
| 57 | #define MOUT_PWI 40 | ||
| 58 | #define MOUT_HPM 41 | ||
| 59 | #define MOUT_SPDIF 42 | ||
| 60 | #define MOUT_AUDIO2 43 | ||
| 61 | #define MOUT_AUDIO1 44 | ||
| 62 | #define MOUT_AUDIO0 45 | ||
| 63 | |||
| 64 | /* Dividers. */ | ||
| 65 | #define DOUT_PCLKP 46 | ||
| 66 | #define DOUT_HCLKP 47 | ||
| 67 | #define DOUT_PCLKD 48 | ||
| 68 | #define DOUT_HCLKD 49 | ||
| 69 | #define DOUT_PCLKM 50 | ||
| 70 | #define DOUT_HCLKM 51 | ||
| 71 | #define DOUT_A2M 52 | ||
| 72 | #define DOUT_APLL 53 | ||
| 73 | #define DOUT_CSIS 54 | ||
| 74 | #define DOUT_FIMD 55 | ||
| 75 | #define DOUT_CAM1 56 | ||
| 76 | #define DOUT_CAM0 57 | ||
| 77 | #define DOUT_TBLK 58 | ||
| 78 | #define DOUT_G2D 59 | ||
| 79 | #define DOUT_MFC 60 | ||
| 80 | #define DOUT_G3D 61 | ||
| 81 | #define DOUT_FIMC2 62 | ||
| 82 | #define DOUT_FIMC1 63 | ||
| 83 | #define DOUT_FIMC0 64 | ||
| 84 | #define DOUT_UART3 65 | ||
| 85 | #define DOUT_UART2 66 | ||
| 86 | #define DOUT_UART1 67 | ||
| 87 | #define DOUT_UART0 68 | ||
| 88 | #define DOUT_MMC3 69 | ||
| 89 | #define DOUT_MMC2 70 | ||
| 90 | #define DOUT_MMC1 71 | ||
| 91 | #define DOUT_MMC0 72 | ||
| 92 | #define DOUT_PWM 73 | ||
| 93 | #define DOUT_SPI1 74 | ||
| 94 | #define DOUT_SPI0 75 | ||
| 95 | #define DOUT_DMC0 76 | ||
| 96 | #define DOUT_PWI 77 | ||
| 97 | #define DOUT_HPM 78 | ||
| 98 | #define DOUT_COPY 79 | ||
| 99 | #define DOUT_FLASH 80 | ||
| 100 | #define DOUT_AUDIO2 81 | ||
| 101 | #define DOUT_AUDIO1 82 | ||
| 102 | #define DOUT_AUDIO0 83 | ||
| 103 | #define DOUT_DPM 84 | ||
| 104 | #define DOUT_DVSEM 85 | ||
| 105 | |||
| 106 | /* Gates */ | ||
| 107 | #define SCLK_FIMC 86 | ||
| 108 | #define CLK_CSIS 87 | ||
| 109 | #define CLK_ROTATOR 88 | ||
| 110 | #define CLK_FIMC2 89 | ||
| 111 | #define CLK_FIMC1 90 | ||
| 112 | #define CLK_FIMC0 91 | ||
| 113 | #define CLK_MFC 92 | ||
| 114 | #define CLK_G2D 93 | ||
| 115 | #define CLK_G3D 94 | ||
| 116 | #define CLK_IMEM 95 | ||
| 117 | #define CLK_PDMA1 96 | ||
| 118 | #define CLK_PDMA0 97 | ||
| 119 | #define CLK_MDMA 98 | ||
| 120 | #define CLK_DMC1 99 | ||
| 121 | #define CLK_DMC0 100 | ||
| 122 | #define CLK_NFCON 101 | ||
| 123 | #define CLK_SROMC 102 | ||
| 124 | #define CLK_CFCON 103 | ||
| 125 | #define CLK_NANDXL 104 | ||
| 126 | #define CLK_USB_HOST 105 | ||
| 127 | #define CLK_USB_OTG 106 | ||
| 128 | #define CLK_HDMI 107 | ||
| 129 | #define CLK_TVENC 108 | ||
| 130 | #define CLK_MIXER 109 | ||
| 131 | #define CLK_VP 110 | ||
| 132 | #define CLK_DSIM 111 | ||
| 133 | #define CLK_FIMD 112 | ||
| 134 | #define CLK_TZIC3 113 | ||
| 135 | #define CLK_TZIC2 114 | ||
| 136 | #define CLK_TZIC1 115 | ||
| 137 | #define CLK_TZIC0 116 | ||
| 138 | #define CLK_VIC3 117 | ||
| 139 | #define CLK_VIC2 118 | ||
| 140 | #define CLK_VIC1 119 | ||
| 141 | #define CLK_VIC0 120 | ||
| 142 | #define CLK_TSI 121 | ||
| 143 | #define CLK_HSMMC3 122 | ||
| 144 | #define CLK_HSMMC2 123 | ||
| 145 | #define CLK_HSMMC1 124 | ||
| 146 | #define CLK_HSMMC0 125 | ||
| 147 | #define CLK_JTAG 126 | ||
| 148 | #define CLK_MODEMIF 127 | ||
| 149 | #define CLK_CORESIGHT 128 | ||
| 150 | #define CLK_SDM 129 | ||
| 151 | #define CLK_SECSS 130 | ||
| 152 | #define CLK_PCM2 131 | ||
| 153 | #define CLK_PCM1 132 | ||
| 154 | #define CLK_PCM0 133 | ||
| 155 | #define CLK_SYSCON 134 | ||
| 156 | #define CLK_GPIO 135 | ||
| 157 | #define CLK_TSADC 136 | ||
| 158 | #define CLK_PWM 137 | ||
| 159 | #define CLK_WDT 138 | ||
| 160 | #define CLK_KEYIF 139 | ||
| 161 | #define CLK_UART3 140 | ||
| 162 | #define CLK_UART2 141 | ||
| 163 | #define CLK_UART1 142 | ||
| 164 | #define CLK_UART0 143 | ||
| 165 | #define CLK_SYSTIMER 144 | ||
| 166 | #define CLK_RTC 145 | ||
| 167 | #define CLK_SPI1 146 | ||
| 168 | #define CLK_SPI0 147 | ||
| 169 | #define CLK_I2C_HDMI_PHY 148 | ||
| 170 | #define CLK_I2C1 149 | ||
| 171 | #define CLK_I2C2 150 | ||
| 172 | #define CLK_I2C0 151 | ||
| 173 | #define CLK_I2S1 152 | ||
| 174 | #define CLK_I2S2 153 | ||
| 175 | #define CLK_I2S0 154 | ||
| 176 | #define CLK_AC97 155 | ||
| 177 | #define CLK_SPDIF 156 | ||
| 178 | #define CLK_TZPC3 157 | ||
| 179 | #define CLK_TZPC2 158 | ||
| 180 | #define CLK_TZPC1 159 | ||
| 181 | #define CLK_TZPC0 160 | ||
| 182 | #define CLK_SECKEY 161 | ||
| 183 | #define CLK_IEM_APC 162 | ||
| 184 | #define CLK_IEM_IEC 163 | ||
| 185 | #define CLK_CHIPID 164 | ||
| 186 | #define CLK_JPEG 163 | ||
| 187 | |||
| 188 | /* Special clocks*/ | ||
| 189 | #define SCLK_PWI 164 | ||
| 190 | #define SCLK_SPDIF 165 | ||
| 191 | #define SCLK_AUDIO2 166 | ||
| 192 | #define SCLK_AUDIO1 167 | ||
| 193 | #define SCLK_AUDIO0 168 | ||
| 194 | #define SCLK_PWM 169 | ||
| 195 | #define SCLK_SPI1 170 | ||
| 196 | #define SCLK_SPI0 171 | ||
| 197 | #define SCLK_UART3 172 | ||
| 198 | #define SCLK_UART2 173 | ||
| 199 | #define SCLK_UART1 174 | ||
| 200 | #define SCLK_UART0 175 | ||
| 201 | #define SCLK_MMC3 176 | ||
| 202 | #define SCLK_MMC2 177 | ||
| 203 | #define SCLK_MMC1 178 | ||
| 204 | #define SCLK_MMC0 179 | ||
| 205 | #define SCLK_FINVPLL 180 | ||
| 206 | #define SCLK_CSIS 181 | ||
| 207 | #define SCLK_FIMD 182 | ||
| 208 | #define SCLK_CAM1 183 | ||
| 209 | #define SCLK_CAM0 184 | ||
| 210 | #define SCLK_DAC 185 | ||
| 211 | #define SCLK_MIXER 186 | ||
| 212 | #define SCLK_HDMI 187 | ||
| 213 | #define SCLK_FIMC2 188 | ||
| 214 | #define SCLK_FIMC1 189 | ||
| 215 | #define SCLK_FIMC0 190 | ||
| 216 | #define SCLK_HDMI27M 191 | ||
| 217 | #define SCLK_HDMIPHY 192 | ||
| 218 | #define SCLK_USBPHY0 193 | ||
| 219 | #define SCLK_USBPHY1 194 | ||
| 220 | |||
| 221 | /* S5P6442-specific clocks */ | ||
| 222 | #define MOUT_D0SYNC 195 | ||
| 223 | #define MOUT_D1SYNC 196 | ||
| 224 | #define DOUT_MIXER 197 | ||
| 225 | #define CLK_ETB 198 | ||
| 226 | #define CLK_ETM 199 | ||
| 227 | |||
| 228 | /* CLKOUT */ | ||
| 229 | #define FOUT_APLL_CLKOUT 200 | ||
| 230 | #define FOUT_MPLL_CLKOUT 201 | ||
| 231 | #define DOUT_APLL_CLKOUT 202 | ||
| 232 | #define MOUT_CLKSEL 203 | ||
| 233 | #define DOUT_CLKOUT 204 | ||
| 234 | #define MOUT_CLKOUT 205 | ||
| 235 | |||
| 236 | /* Total number of clocks. */ | ||
| 237 | #define NR_CLKS 206 | ||
| 238 | |||
| 239 | #endif /* _DT_BINDINGS_CLOCK_S5PV210_H */ | ||
diff --git a/include/dt-bindings/clock/vf610-clock.h b/include/dt-bindings/clock/vf610-clock.h index a91602951d3d..00953d9484cb 100644 --- a/include/dt-bindings/clock/vf610-clock.h +++ b/include/dt-bindings/clock/vf610-clock.h | |||
| @@ -164,6 +164,8 @@ | |||
| 164 | #define VF610_CLK_DMAMUX1 151 | 164 | #define VF610_CLK_DMAMUX1 151 |
| 165 | #define VF610_CLK_DMAMUX2 152 | 165 | #define VF610_CLK_DMAMUX2 152 |
| 166 | #define VF610_CLK_DMAMUX3 153 | 166 | #define VF610_CLK_DMAMUX3 153 |
| 167 | #define VF610_CLK_END 154 | 167 | #define VF610_CLK_FLEXCAN0_EN 154 |
| 168 | #define VF610_CLK_FLEXCAN1_EN 155 | ||
| 169 | #define VF610_CLK_END 156 | ||
| 168 | 170 | ||
| 169 | #endif /* __DT_BINDINGS_CLOCK_VF610_H */ | 171 | #endif /* __DT_BINDINGS_CLOCK_VF610_H */ |
diff --git a/include/dt-bindings/dma/nbpfaxi.h b/include/dt-bindings/dma/nbpfaxi.h new file mode 100644 index 000000000000..c1a5b9e0d6a4 --- /dev/null +++ b/include/dt-bindings/dma/nbpfaxi.h | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2013-2014 Renesas Electronics Europe Ltd. | ||
| 3 | * Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of version 2 of the GNU General Public License as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef DT_BINDINGS_NBPFAXI_H | ||
| 11 | #define DT_BINDINGS_NBPFAXI_H | ||
| 12 | |||
| 13 | /** | ||
| 14 | * Use "#dma-cells = <2>;" with the second integer defining slave DMA flags: | ||
| 15 | */ | ||
| 16 | #define NBPF_SLAVE_RQ_HIGH 1 | ||
| 17 | #define NBPF_SLAVE_RQ_LOW 2 | ||
| 18 | #define NBPF_SLAVE_RQ_LEVEL 4 | ||
| 19 | |||
| 20 | #endif | ||
diff --git a/include/dt-bindings/mfd/as3722.h b/include/dt-bindings/mfd/as3722.h index 0e692562d77b..e66c0898c58e 100644 --- a/include/dt-bindings/mfd/as3722.h +++ b/include/dt-bindings/mfd/as3722.h | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | /* External control pins */ | 13 | /* External control pins */ |
| 14 | #define AS3722_EXT_CONTROL_PIN_ENABLE1 1 | 14 | #define AS3722_EXT_CONTROL_PIN_ENABLE1 1 |
| 15 | #define AS3722_EXT_CONTROL_PIN_ENABLE2 2 | 15 | #define AS3722_EXT_CONTROL_PIN_ENABLE2 2 |
| 16 | #define AS3722_EXT_CONTROL_PIN_ENABLE2 3 | 16 | #define AS3722_EXT_CONTROL_PIN_ENABLE3 3 |
| 17 | 17 | ||
| 18 | /* Interrupt numbers for AS3722 */ | 18 | /* Interrupt numbers for AS3722 */ |
| 19 | #define AS3722_IRQ_LID 0 | 19 | #define AS3722_IRQ_LID 0 |
diff --git a/include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h b/include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h new file mode 100644 index 000000000000..914d56da9324 --- /dev/null +++ b/include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | #ifndef _DT_BINDINGS_PINCTRL_TEGRA_XUSB_H | ||
| 2 | #define _DT_BINDINGS_PINCTRL_TEGRA_XUSB_H 1 | ||
| 3 | |||
| 4 | #define TEGRA_XUSB_PADCTL_PCIE 0 | ||
| 5 | #define TEGRA_XUSB_PADCTL_SATA 1 | ||
| 6 | |||
| 7 | #endif /* _DT_BINDINGS_PINCTRL_TEGRA_XUSB_H */ | ||
diff --git a/include/kvm/arm_arch_timer.h b/include/kvm/arm_arch_timer.h index 6d9aeddc09bf..ad9db6045b2f 100644 --- a/include/kvm/arm_arch_timer.h +++ b/include/kvm/arm_arch_timer.h | |||
| @@ -67,6 +67,10 @@ void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu); | |||
| 67 | void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu); | 67 | void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu); |
| 68 | void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu); | 68 | void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu); |
| 69 | void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu); | 69 | void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu); |
| 70 | |||
| 71 | u64 kvm_arm_timer_get_reg(struct kvm_vcpu *, u64 regid); | ||
| 72 | int kvm_arm_timer_set_reg(struct kvm_vcpu *, u64 regid, u64 value); | ||
| 73 | |||
| 70 | #else | 74 | #else |
| 71 | static inline int kvm_timer_hyp_init(void) | 75 | static inline int kvm_timer_hyp_init(void) |
| 72 | { | 76 | { |
| @@ -84,6 +88,16 @@ static inline void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu) {} | |||
| 84 | static inline void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu) {} | 88 | static inline void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu) {} |
| 85 | static inline void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu) {} | 89 | static inline void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu) {} |
| 86 | static inline void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu) {} | 90 | static inline void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu) {} |
| 91 | |||
| 92 | static inline int kvm_arm_timer_set_reg(struct kvm_vcpu *vcpu, u64 regid, u64 value) | ||
| 93 | { | ||
| 94 | return 0; | ||
| 95 | } | ||
| 96 | |||
| 97 | static inline u64 kvm_arm_timer_get_reg(struct kvm_vcpu *vcpu, u64 regid) | ||
| 98 | { | ||
| 99 | return 0; | ||
| 100 | } | ||
| 87 | #endif | 101 | #endif |
| 88 | 102 | ||
| 89 | #endif | 103 | #endif |
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h index f27000f55a83..35b0c121bb65 100644 --- a/include/kvm/arm_vgic.h +++ b/include/kvm/arm_vgic.h | |||
| @@ -24,7 +24,6 @@ | |||
| 24 | #include <linux/irqreturn.h> | 24 | #include <linux/irqreturn.h> |
| 25 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
| 26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
| 27 | #include <linux/irqchip/arm-gic.h> | ||
| 28 | 27 | ||
| 29 | #define VGIC_NR_IRQS 256 | 28 | #define VGIC_NR_IRQS 256 |
| 30 | #define VGIC_NR_SGIS 16 | 29 | #define VGIC_NR_SGIS 16 |
| @@ -32,7 +31,9 @@ | |||
| 32 | #define VGIC_NR_PRIVATE_IRQS (VGIC_NR_SGIS + VGIC_NR_PPIS) | 31 | #define VGIC_NR_PRIVATE_IRQS (VGIC_NR_SGIS + VGIC_NR_PPIS) |
| 33 | #define VGIC_NR_SHARED_IRQS (VGIC_NR_IRQS - VGIC_NR_PRIVATE_IRQS) | 32 | #define VGIC_NR_SHARED_IRQS (VGIC_NR_IRQS - VGIC_NR_PRIVATE_IRQS) |
| 34 | #define VGIC_MAX_CPUS KVM_MAX_VCPUS | 33 | #define VGIC_MAX_CPUS KVM_MAX_VCPUS |
| 35 | #define VGIC_MAX_LRS (1 << 6) | 34 | |
| 35 | #define VGIC_V2_MAX_LRS (1 << 6) | ||
| 36 | #define VGIC_V3_MAX_LRS 16 | ||
| 36 | 37 | ||
| 37 | /* Sanity checks... */ | 38 | /* Sanity checks... */ |
| 38 | #if (VGIC_MAX_CPUS > 8) | 39 | #if (VGIC_MAX_CPUS > 8) |
| @@ -68,9 +69,62 @@ struct vgic_bytemap { | |||
| 68 | u32 shared[VGIC_NR_SHARED_IRQS / 4]; | 69 | u32 shared[VGIC_NR_SHARED_IRQS / 4]; |
| 69 | }; | 70 | }; |
| 70 | 71 | ||
| 72 | struct kvm_vcpu; | ||
| 73 | |||
| 74 | enum vgic_type { | ||
| 75 | VGIC_V2, /* Good ol' GICv2 */ | ||
| 76 | VGIC_V3, /* New fancy GICv3 */ | ||
| 77 | }; | ||
| 78 | |||
| 79 | #define LR_STATE_PENDING (1 << 0) | ||
| 80 | #define LR_STATE_ACTIVE (1 << 1) | ||
| 81 | #define LR_STATE_MASK (3 << 0) | ||
| 82 | #define LR_EOI_INT (1 << 2) | ||
| 83 | |||
| 84 | struct vgic_lr { | ||
| 85 | u16 irq; | ||
| 86 | u8 source; | ||
| 87 | u8 state; | ||
| 88 | }; | ||
| 89 | |||
| 90 | struct vgic_vmcr { | ||
| 91 | u32 ctlr; | ||
| 92 | u32 abpr; | ||
| 93 | u32 bpr; | ||
| 94 | u32 pmr; | ||
| 95 | }; | ||
| 96 | |||
| 97 | struct vgic_ops { | ||
| 98 | struct vgic_lr (*get_lr)(const struct kvm_vcpu *, int); | ||
| 99 | void (*set_lr)(struct kvm_vcpu *, int, struct vgic_lr); | ||
| 100 | void (*sync_lr_elrsr)(struct kvm_vcpu *, int, struct vgic_lr); | ||
| 101 | u64 (*get_elrsr)(const struct kvm_vcpu *vcpu); | ||
| 102 | u64 (*get_eisr)(const struct kvm_vcpu *vcpu); | ||
| 103 | u32 (*get_interrupt_status)(const struct kvm_vcpu *vcpu); | ||
| 104 | void (*enable_underflow)(struct kvm_vcpu *vcpu); | ||
| 105 | void (*disable_underflow)(struct kvm_vcpu *vcpu); | ||
| 106 | void (*get_vmcr)(struct kvm_vcpu *vcpu, struct vgic_vmcr *vmcr); | ||
| 107 | void (*set_vmcr)(struct kvm_vcpu *vcpu, struct vgic_vmcr *vmcr); | ||
| 108 | void (*enable)(struct kvm_vcpu *vcpu); | ||
| 109 | }; | ||
| 110 | |||
| 111 | struct vgic_params { | ||
| 112 | /* vgic type */ | ||
| 113 | enum vgic_type type; | ||
| 114 | /* Physical address of vgic virtual cpu interface */ | ||
| 115 | phys_addr_t vcpu_base; | ||
| 116 | /* Number of list registers */ | ||
| 117 | u32 nr_lr; | ||
| 118 | /* Interrupt number */ | ||
| 119 | unsigned int maint_irq; | ||
| 120 | /* Virtual control interface base address */ | ||
| 121 | void __iomem *vctrl_base; | ||
| 122 | }; | ||
| 123 | |||
| 71 | struct vgic_dist { | 124 | struct vgic_dist { |
| 72 | #ifdef CONFIG_KVM_ARM_VGIC | 125 | #ifdef CONFIG_KVM_ARM_VGIC |
| 73 | spinlock_t lock; | 126 | spinlock_t lock; |
| 127 | bool in_kernel; | ||
| 74 | bool ready; | 128 | bool ready; |
| 75 | 129 | ||
| 76 | /* Virtual control interface mapping */ | 130 | /* Virtual control interface mapping */ |
| @@ -110,6 +164,29 @@ struct vgic_dist { | |||
| 110 | #endif | 164 | #endif |
| 111 | }; | 165 | }; |
| 112 | 166 | ||
| 167 | struct vgic_v2_cpu_if { | ||
| 168 | u32 vgic_hcr; | ||
| 169 | u32 vgic_vmcr; | ||
| 170 | u32 vgic_misr; /* Saved only */ | ||
| 171 | u32 vgic_eisr[2]; /* Saved only */ | ||
| 172 | u32 vgic_elrsr[2]; /* Saved only */ | ||
| 173 | u32 vgic_apr; | ||
| 174 | u32 vgic_lr[VGIC_V2_MAX_LRS]; | ||
| 175 | }; | ||
| 176 | |||
| 177 | struct vgic_v3_cpu_if { | ||
| 178 | #ifdef CONFIG_ARM_GIC_V3 | ||
| 179 | u32 vgic_hcr; | ||
| 180 | u32 vgic_vmcr; | ||
| 181 | u32 vgic_misr; /* Saved only */ | ||
| 182 | u32 vgic_eisr; /* Saved only */ | ||
| 183 | u32 vgic_elrsr; /* Saved only */ | ||
| 184 | u32 vgic_ap0r[4]; | ||
| 185 | u32 vgic_ap1r[4]; | ||
| 186 | u64 vgic_lr[VGIC_V3_MAX_LRS]; | ||
| 187 | #endif | ||
| 188 | }; | ||
| 189 | |||
| 113 | struct vgic_cpu { | 190 | struct vgic_cpu { |
| 114 | #ifdef CONFIG_KVM_ARM_VGIC | 191 | #ifdef CONFIG_KVM_ARM_VGIC |
| 115 | /* per IRQ to LR mapping */ | 192 | /* per IRQ to LR mapping */ |
| @@ -120,24 +197,24 @@ struct vgic_cpu { | |||
| 120 | DECLARE_BITMAP( pending_shared, VGIC_NR_SHARED_IRQS); | 197 | DECLARE_BITMAP( pending_shared, VGIC_NR_SHARED_IRQS); |
| 121 | 198 | ||
| 122 | /* Bitmap of used/free list registers */ | 199 | /* Bitmap of used/free list registers */ |
| 123 | DECLARE_BITMAP( lr_used, VGIC_MAX_LRS); | 200 | DECLARE_BITMAP( lr_used, VGIC_V2_MAX_LRS); |
| 124 | 201 | ||
| 125 | /* Number of list registers on this CPU */ | 202 | /* Number of list registers on this CPU */ |
| 126 | int nr_lr; | 203 | int nr_lr; |
| 127 | 204 | ||
| 128 | /* CPU vif control registers for world switch */ | 205 | /* CPU vif control registers for world switch */ |
| 129 | u32 vgic_hcr; | 206 | union { |
| 130 | u32 vgic_vmcr; | 207 | struct vgic_v2_cpu_if vgic_v2; |
| 131 | u32 vgic_misr; /* Saved only */ | 208 | struct vgic_v3_cpu_if vgic_v3; |
| 132 | u32 vgic_eisr[2]; /* Saved only */ | 209 | }; |
| 133 | u32 vgic_elrsr[2]; /* Saved only */ | ||
| 134 | u32 vgic_apr; | ||
| 135 | u32 vgic_lr[VGIC_MAX_LRS]; | ||
| 136 | #endif | 210 | #endif |
| 137 | }; | 211 | }; |
| 138 | 212 | ||
| 139 | #define LR_EMPTY 0xff | 213 | #define LR_EMPTY 0xff |
| 140 | 214 | ||
| 215 | #define INT_STATUS_EOI (1 << 0) | ||
| 216 | #define INT_STATUS_UNDERFLOW (1 << 1) | ||
| 217 | |||
| 141 | struct kvm; | 218 | struct kvm; |
| 142 | struct kvm_vcpu; | 219 | struct kvm_vcpu; |
| 143 | struct kvm_run; | 220 | struct kvm_run; |
| @@ -157,9 +234,25 @@ int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu); | |||
| 157 | bool vgic_handle_mmio(struct kvm_vcpu *vcpu, struct kvm_run *run, | 234 | bool vgic_handle_mmio(struct kvm_vcpu *vcpu, struct kvm_run *run, |
| 158 | struct kvm_exit_mmio *mmio); | 235 | struct kvm_exit_mmio *mmio); |
| 159 | 236 | ||
| 160 | #define irqchip_in_kernel(k) (!!((k)->arch.vgic.vctrl_base)) | 237 | #define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel)) |
| 161 | #define vgic_initialized(k) ((k)->arch.vgic.ready) | 238 | #define vgic_initialized(k) ((k)->arch.vgic.ready) |
| 162 | 239 | ||
| 240 | int vgic_v2_probe(struct device_node *vgic_node, | ||
| 241 | const struct vgic_ops **ops, | ||
| 242 | const struct vgic_params **params); | ||
| 243 | #ifdef CONFIG_ARM_GIC_V3 | ||
| 244 | int vgic_v3_probe(struct device_node *vgic_node, | ||
| 245 | const struct vgic_ops **ops, | ||
| 246 | const struct vgic_params **params); | ||
| 247 | #else | ||
| 248 | static inline int vgic_v3_probe(struct device_node *vgic_node, | ||
| 249 | const struct vgic_ops **ops, | ||
| 250 | const struct vgic_params **params) | ||
| 251 | { | ||
| 252 | return -ENODEV; | ||
| 253 | } | ||
| 254 | #endif | ||
| 255 | |||
| 163 | #else | 256 | #else |
| 164 | static inline int kvm_vgic_hyp_init(void) | 257 | static inline int kvm_vgic_hyp_init(void) |
| 165 | { | 258 | { |
diff --git a/include/linux/acct.h b/include/linux/acct.h index 4a5b7cb56079..dccc2d4fe7de 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h | |||
| @@ -24,14 +24,10 @@ struct super_block; | |||
| 24 | struct pacct_struct; | 24 | struct pacct_struct; |
| 25 | struct pid_namespace; | 25 | struct pid_namespace; |
| 26 | extern int acct_parm[]; /* for sysctl */ | 26 | extern int acct_parm[]; /* for sysctl */ |
| 27 | extern void acct_auto_close_mnt(struct vfsmount *m); | ||
| 28 | extern void acct_auto_close(struct super_block *sb); | ||
| 29 | extern void acct_collect(long exitcode, int group_dead); | 27 | extern void acct_collect(long exitcode, int group_dead); |
| 30 | extern void acct_process(void); | 28 | extern void acct_process(void); |
| 31 | extern void acct_exit_ns(struct pid_namespace *); | 29 | extern void acct_exit_ns(struct pid_namespace *); |
| 32 | #else | 30 | #else |
| 33 | #define acct_auto_close_mnt(x) do { } while (0) | ||
| 34 | #define acct_auto_close(x) do { } while (0) | ||
| 35 | #define acct_collect(x,y) do { } while (0) | 31 | #define acct_collect(x,y) do { } while (0) |
| 36 | #define acct_process() do { } while (0) | 32 | #define acct_process() do { } while (0) |
| 37 | #define acct_exit_ns(ns) do { } while (0) | 33 | #define acct_exit_ns(ns) do { } while (0) |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 5320153c311b..807cbc46d73e 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -364,6 +364,17 @@ extern bool osc_sb_apei_support_acked; | |||
| 364 | #define OSC_PCI_EXPRESS_CAPABILITY_CONTROL 0x00000010 | 364 | #define OSC_PCI_EXPRESS_CAPABILITY_CONTROL 0x00000010 |
| 365 | #define OSC_PCI_CONTROL_MASKS 0x0000001f | 365 | #define OSC_PCI_CONTROL_MASKS 0x0000001f |
| 366 | 366 | ||
| 367 | #define ACPI_GSB_ACCESS_ATTRIB_QUICK 0x00000002 | ||
| 368 | #define ACPI_GSB_ACCESS_ATTRIB_SEND_RCV 0x00000004 | ||
| 369 | #define ACPI_GSB_ACCESS_ATTRIB_BYTE 0x00000006 | ||
| 370 | #define ACPI_GSB_ACCESS_ATTRIB_WORD 0x00000008 | ||
| 371 | #define ACPI_GSB_ACCESS_ATTRIB_BLOCK 0x0000000A | ||
| 372 | #define ACPI_GSB_ACCESS_ATTRIB_MULTIBYTE 0x0000000B | ||
| 373 | #define ACPI_GSB_ACCESS_ATTRIB_WORD_CALL 0x0000000C | ||
| 374 | #define ACPI_GSB_ACCESS_ATTRIB_BLOCK_CALL 0x0000000D | ||
| 375 | #define ACPI_GSB_ACCESS_ATTRIB_RAW_BYTES 0x0000000E | ||
| 376 | #define ACPI_GSB_ACCESS_ATTRIB_RAW_PROCESS 0x0000000F | ||
| 377 | |||
| 367 | extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, | 378 | extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, |
| 368 | u32 *mask, u32 req); | 379 | u32 *mask, u32 req); |
| 369 | 380 | ||
diff --git a/include/linux/atmel-pwm-bl.h b/include/linux/atmel-pwm-bl.h deleted file mode 100644 index 0153a47806c2..000000000000 --- a/include/linux/atmel-pwm-bl.h +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2007 Atmel Corporation | ||
| 3 | * | ||
| 4 | * Driver for the AT32AP700X PS/2 controller (PSIF). | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify it | ||
| 7 | * under the terms of the GNU General Public License version 2 as published | ||
| 8 | * by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __INCLUDE_ATMEL_PWM_BL_H | ||
| 12 | #define __INCLUDE_ATMEL_PWM_BL_H | ||
| 13 | |||
| 14 | /** | ||
| 15 | * struct atmel_pwm_bl_platform_data | ||
| 16 | * @pwm_channel: which PWM channel in the PWM module to use. | ||
| 17 | * @pwm_frequency: PWM frequency to generate, the driver will try to be as | ||
| 18 | * close as the prescaler allows. | ||
| 19 | * @pwm_compare_max: value to use in the PWM channel compare register. | ||
| 20 | * @pwm_duty_max: maximum duty cycle value, must be less than or equal to | ||
| 21 | * pwm_compare_max. | ||
| 22 | * @pwm_duty_min: minimum duty cycle value, must be less than pwm_duty_max. | ||
| 23 | * @pwm_active_low: set to one if the low part of the PWM signal increases the | ||
| 24 | * brightness of the backlight. | ||
| 25 | * @gpio_on: GPIO line to control the backlight on/off, set to -1 if not used. | ||
| 26 | * @on_active_low: set to one if the on/off signal is on when GPIO is low. | ||
| 27 | * | ||
| 28 | * This struct must be added to the platform device in the board code. It is | ||
| 29 | * used by the atmel-pwm-bl driver to setup the GPIO to control on/off and the | ||
| 30 | * PWM device. | ||
| 31 | */ | ||
| 32 | struct atmel_pwm_bl_platform_data { | ||
| 33 | unsigned int pwm_channel; | ||
| 34 | unsigned int pwm_frequency; | ||
| 35 | unsigned int pwm_compare_max; | ||
| 36 | unsigned int pwm_duty_max; | ||
| 37 | unsigned int pwm_duty_min; | ||
| 38 | unsigned int pwm_active_low; | ||
| 39 | int gpio_on; | ||
| 40 | unsigned int on_active_low; | ||
| 41 | }; | ||
| 42 | |||
| 43 | #endif /* __INCLUDE_ATMEL_PWM_BL_H */ | ||
diff --git a/include/linux/atmel_pwm.h b/include/linux/atmel_pwm.h deleted file mode 100644 index ea04abb3db8e..000000000000 --- a/include/linux/atmel_pwm.h +++ /dev/null | |||
| @@ -1,70 +0,0 @@ | |||
| 1 | #ifndef __LINUX_ATMEL_PWM_H | ||
| 2 | #define __LINUX_ATMEL_PWM_H | ||
| 3 | |||
| 4 | /** | ||
| 5 | * struct pwm_channel - driver handle to a PWM channel | ||
| 6 | * @regs: base of this channel's registers | ||
| 7 | * @index: number of this channel (0..31) | ||
| 8 | * @mck: base clock rate, which can be prescaled and maybe subdivided | ||
| 9 | * | ||
| 10 | * Drivers initialize a pwm_channel structure using pwm_channel_alloc(). | ||
| 11 | * Then they configure its clock rate (derived from MCK), alignment, | ||
| 12 | * polarity, and duty cycle by writing directly to the channel registers, | ||
| 13 | * before enabling the channel by calling pwm_channel_enable(). | ||
| 14 | * | ||
| 15 | * After emitting a PWM signal for the desired length of time, drivers | ||
| 16 | * may then pwm_channel_disable() or pwm_channel_free(). Both of these | ||
| 17 | * disable the channel, but when it's freed the IRQ is deconfigured and | ||
| 18 | * the channel must later be re-allocated and reconfigured. | ||
| 19 | * | ||
| 20 | * Note that if the period or duty cycle need to be changed while the | ||
| 21 | * PWM channel is operating, drivers must use the PWM_CUPD double buffer | ||
| 22 | * mechanism, either polling until they change or getting implicitly | ||
| 23 | * notified through a once-per-period interrupt handler. | ||
| 24 | */ | ||
| 25 | struct pwm_channel { | ||
| 26 | void __iomem *regs; | ||
| 27 | unsigned index; | ||
| 28 | unsigned long mck; | ||
| 29 | }; | ||
| 30 | |||
| 31 | extern int pwm_channel_alloc(int index, struct pwm_channel *ch); | ||
| 32 | extern int pwm_channel_free(struct pwm_channel *ch); | ||
| 33 | |||
| 34 | extern int pwm_clk_alloc(unsigned prescale, unsigned div); | ||
| 35 | extern void pwm_clk_free(unsigned clk); | ||
| 36 | |||
| 37 | extern int __pwm_channel_onoff(struct pwm_channel *ch, int enabled); | ||
| 38 | |||
| 39 | #define pwm_channel_enable(ch) __pwm_channel_onoff((ch), 1) | ||
| 40 | #define pwm_channel_disable(ch) __pwm_channel_onoff((ch), 0) | ||
| 41 | |||
| 42 | /* periodic interrupts, mostly for CUPD changes to period or cycle */ | ||
| 43 | extern int pwm_channel_handler(struct pwm_channel *ch, | ||
| 44 | void (*handler)(struct pwm_channel *ch)); | ||
| 45 | |||
| 46 | /* per-channel registers (banked at pwm_channel->regs) */ | ||
| 47 | #define PWM_CMR 0x00 /* mode register */ | ||
| 48 | #define PWM_CPR_CPD (1 << 10) /* set: CUPD modifies period */ | ||
| 49 | #define PWM_CPR_CPOL (1 << 9) /* set: idle high */ | ||
| 50 | #define PWM_CPR_CALG (1 << 8) /* set: center align */ | ||
| 51 | #define PWM_CPR_CPRE (0xf << 0) /* mask: rate is mck/(2^pre) */ | ||
| 52 | #define PWM_CPR_CLKA (0xb << 0) /* rate CLKA */ | ||
| 53 | #define PWM_CPR_CLKB (0xc << 0) /* rate CLKB */ | ||
| 54 | #define PWM_CDTY 0x04 /* duty cycle (max of CPRD) */ | ||
| 55 | #define PWM_CPRD 0x08 /* period (count up from zero) */ | ||
| 56 | #define PWM_CCNT 0x0c /* counter (20 bits?) */ | ||
| 57 | #define PWM_CUPD 0x10 /* update CPRD (or CDTY) next period */ | ||
| 58 | |||
| 59 | static inline void | ||
| 60 | pwm_channel_writel(struct pwm_channel *pwmc, unsigned offset, u32 val) | ||
| 61 | { | ||
| 62 | __raw_writel(val, pwmc->regs + offset); | ||
| 63 | } | ||
| 64 | |||
| 65 | static inline u32 pwm_channel_readl(struct pwm_channel *pwmc, unsigned offset) | ||
| 66 | { | ||
| 67 | return __raw_readl(pwmc->regs + offset); | ||
| 68 | } | ||
| 69 | |||
| 70 | #endif /* __LINUX_ATMEL_PWM_H */ | ||
diff --git a/include/linux/bio.h b/include/linux/bio.h index d2633ee099d9..b39e5000ff58 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
| @@ -308,6 +308,7 @@ struct bio_integrity_payload { | |||
| 308 | 308 | ||
| 309 | unsigned short bip_slab; /* slab the bip came from */ | 309 | unsigned short bip_slab; /* slab the bip came from */ |
| 310 | unsigned short bip_vcnt; /* # of integrity bio_vecs */ | 310 | unsigned short bip_vcnt; /* # of integrity bio_vecs */ |
| 311 | unsigned short bip_max_vcnt; /* integrity bio_vec slots */ | ||
| 311 | unsigned bip_owns_buf:1; /* should free bip_buf */ | 312 | unsigned bip_owns_buf:1; /* should free bip_buf */ |
| 312 | 313 | ||
| 313 | struct work_struct bip_work; /* I/O completion */ | 314 | struct work_struct bip_work; /* I/O completion */ |
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index 7ad634501e48..e1c8d080c427 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h | |||
| @@ -88,32 +88,32 @@ | |||
| 88 | * lib/bitmap.c provides these functions: | 88 | * lib/bitmap.c provides these functions: |
| 89 | */ | 89 | */ |
| 90 | 90 | ||
| 91 | extern int __bitmap_empty(const unsigned long *bitmap, int bits); | 91 | extern int __bitmap_empty(const unsigned long *bitmap, unsigned int nbits); |
| 92 | extern int __bitmap_full(const unsigned long *bitmap, int bits); | 92 | extern int __bitmap_full(const unsigned long *bitmap, unsigned int nbits); |
| 93 | extern int __bitmap_equal(const unsigned long *bitmap1, | 93 | extern int __bitmap_equal(const unsigned long *bitmap1, |
| 94 | const unsigned long *bitmap2, int bits); | 94 | const unsigned long *bitmap2, unsigned int nbits); |
| 95 | extern void __bitmap_complement(unsigned long *dst, const unsigned long *src, | 95 | extern void __bitmap_complement(unsigned long *dst, const unsigned long *src, |
| 96 | int bits); | 96 | unsigned int nbits); |
| 97 | extern void __bitmap_shift_right(unsigned long *dst, | 97 | extern void __bitmap_shift_right(unsigned long *dst, |
| 98 | const unsigned long *src, int shift, int bits); | 98 | const unsigned long *src, int shift, int bits); |
| 99 | extern void __bitmap_shift_left(unsigned long *dst, | 99 | extern void __bitmap_shift_left(unsigned long *dst, |
| 100 | const unsigned long *src, int shift, int bits); | 100 | const unsigned long *src, int shift, int bits); |
| 101 | extern int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, | 101 | extern int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, |
| 102 | const unsigned long *bitmap2, int bits); | 102 | const unsigned long *bitmap2, unsigned int nbits); |
| 103 | extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, | 103 | extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, |
| 104 | const unsigned long *bitmap2, int bits); | 104 | const unsigned long *bitmap2, unsigned int nbits); |
| 105 | extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, | 105 | extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, |
| 106 | const unsigned long *bitmap2, int bits); | 106 | const unsigned long *bitmap2, unsigned int nbits); |
| 107 | extern int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, | 107 | extern int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, |
| 108 | const unsigned long *bitmap2, int bits); | 108 | const unsigned long *bitmap2, unsigned int nbits); |
| 109 | extern int __bitmap_intersects(const unsigned long *bitmap1, | 109 | extern int __bitmap_intersects(const unsigned long *bitmap1, |
| 110 | const unsigned long *bitmap2, int bits); | 110 | const unsigned long *bitmap2, unsigned int nbits); |
| 111 | extern int __bitmap_subset(const unsigned long *bitmap1, | 111 | extern int __bitmap_subset(const unsigned long *bitmap1, |
| 112 | const unsigned long *bitmap2, int bits); | 112 | const unsigned long *bitmap2, unsigned int nbits); |
| 113 | extern int __bitmap_weight(const unsigned long *bitmap, int bits); | 113 | extern int __bitmap_weight(const unsigned long *bitmap, unsigned int nbits); |
| 114 | 114 | ||
| 115 | extern void bitmap_set(unsigned long *map, int i, int len); | 115 | extern void bitmap_set(unsigned long *map, unsigned int start, int len); |
| 116 | extern void bitmap_clear(unsigned long *map, int start, int nr); | 116 | extern void bitmap_clear(unsigned long *map, unsigned int start, int len); |
| 117 | extern unsigned long bitmap_find_next_zero_area(unsigned long *map, | 117 | extern unsigned long bitmap_find_next_zero_area(unsigned long *map, |
| 118 | unsigned long size, | 118 | unsigned long size, |
| 119 | unsigned long start, | 119 | unsigned long start, |
| @@ -140,9 +140,9 @@ extern void bitmap_onto(unsigned long *dst, const unsigned long *orig, | |||
| 140 | const unsigned long *relmap, int bits); | 140 | const unsigned long *relmap, int bits); |
| 141 | extern void bitmap_fold(unsigned long *dst, const unsigned long *orig, | 141 | extern void bitmap_fold(unsigned long *dst, const unsigned long *orig, |
| 142 | int sz, int bits); | 142 | int sz, int bits); |
| 143 | extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); | 143 | extern int bitmap_find_free_region(unsigned long *bitmap, unsigned int bits, int order); |
| 144 | extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); | 144 | extern void bitmap_release_region(unsigned long *bitmap, unsigned int pos, int order); |
| 145 | extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); | 145 | extern int bitmap_allocate_region(unsigned long *bitmap, unsigned int pos, int order); |
| 146 | extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits); | 146 | extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits); |
| 147 | extern int bitmap_ord_to_pos(const unsigned long *bitmap, int n, int bits); | 147 | extern int bitmap_ord_to_pos(const unsigned long *bitmap, int n, int bits); |
| 148 | 148 | ||
| @@ -188,15 +188,15 @@ static inline void bitmap_copy(unsigned long *dst, const unsigned long *src, | |||
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | static inline int bitmap_and(unsigned long *dst, const unsigned long *src1, | 190 | static inline int bitmap_and(unsigned long *dst, const unsigned long *src1, |
| 191 | const unsigned long *src2, int nbits) | 191 | const unsigned long *src2, unsigned int nbits) |
| 192 | { | 192 | { |
| 193 | if (small_const_nbits(nbits)) | 193 | if (small_const_nbits(nbits)) |
| 194 | return (*dst = *src1 & *src2) != 0; | 194 | return (*dst = *src1 & *src2 & BITMAP_LAST_WORD_MASK(nbits)) != 0; |
| 195 | return __bitmap_and(dst, src1, src2, nbits); | 195 | return __bitmap_and(dst, src1, src2, nbits); |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, | 198 | static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, |
| 199 | const unsigned long *src2, int nbits) | 199 | const unsigned long *src2, unsigned int nbits) |
| 200 | { | 200 | { |
| 201 | if (small_const_nbits(nbits)) | 201 | if (small_const_nbits(nbits)) |
| 202 | *dst = *src1 | *src2; | 202 | *dst = *src1 | *src2; |
| @@ -205,7 +205,7 @@ static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, | |||
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | static inline void bitmap_xor(unsigned long *dst, const unsigned long *src1, | 207 | static inline void bitmap_xor(unsigned long *dst, const unsigned long *src1, |
| 208 | const unsigned long *src2, int nbits) | 208 | const unsigned long *src2, unsigned int nbits) |
| 209 | { | 209 | { |
| 210 | if (small_const_nbits(nbits)) | 210 | if (small_const_nbits(nbits)) |
| 211 | *dst = *src1 ^ *src2; | 211 | *dst = *src1 ^ *src2; |
| @@ -214,24 +214,24 @@ static inline void bitmap_xor(unsigned long *dst, const unsigned long *src1, | |||
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | static inline int bitmap_andnot(unsigned long *dst, const unsigned long *src1, | 216 | static inline int bitmap_andnot(unsigned long *dst, const unsigned long *src1, |
| 217 | const unsigned long *src2, int nbits) | 217 | const unsigned long *src2, unsigned int nbits) |
| 218 | { | 218 | { |
| 219 | if (small_const_nbits(nbits)) | 219 | if (small_const_nbits(nbits)) |
| 220 | return (*dst = *src1 & ~(*src2)) != 0; | 220 | return (*dst = *src1 & ~(*src2) & BITMAP_LAST_WORD_MASK(nbits)) != 0; |
| 221 | return __bitmap_andnot(dst, src1, src2, nbits); | 221 | return __bitmap_andnot(dst, src1, src2, nbits); |
| 222 | } | 222 | } |
| 223 | 223 | ||
| 224 | static inline void bitmap_complement(unsigned long *dst, const unsigned long *src, | 224 | static inline void bitmap_complement(unsigned long *dst, const unsigned long *src, |
| 225 | int nbits) | 225 | unsigned int nbits) |
| 226 | { | 226 | { |
| 227 | if (small_const_nbits(nbits)) | 227 | if (small_const_nbits(nbits)) |
| 228 | *dst = ~(*src) & BITMAP_LAST_WORD_MASK(nbits); | 228 | *dst = ~(*src); |
| 229 | else | 229 | else |
| 230 | __bitmap_complement(dst, src, nbits); | 230 | __bitmap_complement(dst, src, nbits); |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | static inline int bitmap_equal(const unsigned long *src1, | 233 | static inline int bitmap_equal(const unsigned long *src1, |
| 234 | const unsigned long *src2, int nbits) | 234 | const unsigned long *src2, unsigned int nbits) |
| 235 | { | 235 | { |
| 236 | if (small_const_nbits(nbits)) | 236 | if (small_const_nbits(nbits)) |
| 237 | return ! ((*src1 ^ *src2) & BITMAP_LAST_WORD_MASK(nbits)); | 237 | return ! ((*src1 ^ *src2) & BITMAP_LAST_WORD_MASK(nbits)); |
| @@ -240,7 +240,7 @@ static inline int bitmap_equal(const unsigned long *src1, | |||
| 240 | } | 240 | } |
| 241 | 241 | ||
| 242 | static inline int bitmap_intersects(const unsigned long *src1, | 242 | static inline int bitmap_intersects(const unsigned long *src1, |
| 243 | const unsigned long *src2, int nbits) | 243 | const unsigned long *src2, unsigned int nbits) |
| 244 | { | 244 | { |
| 245 | if (small_const_nbits(nbits)) | 245 | if (small_const_nbits(nbits)) |
| 246 | return ((*src1 & *src2) & BITMAP_LAST_WORD_MASK(nbits)) != 0; | 246 | return ((*src1 & *src2) & BITMAP_LAST_WORD_MASK(nbits)) != 0; |
| @@ -249,7 +249,7 @@ static inline int bitmap_intersects(const unsigned long *src1, | |||
| 249 | } | 249 | } |
| 250 | 250 | ||
| 251 | static inline int bitmap_subset(const unsigned long *src1, | 251 | static inline int bitmap_subset(const unsigned long *src1, |
| 252 | const unsigned long *src2, int nbits) | 252 | const unsigned long *src2, unsigned int nbits) |
| 253 | { | 253 | { |
| 254 | if (small_const_nbits(nbits)) | 254 | if (small_const_nbits(nbits)) |
| 255 | return ! ((*src1 & ~(*src2)) & BITMAP_LAST_WORD_MASK(nbits)); | 255 | return ! ((*src1 & ~(*src2)) & BITMAP_LAST_WORD_MASK(nbits)); |
| @@ -257,7 +257,7 @@ static inline int bitmap_subset(const unsigned long *src1, | |||
| 257 | return __bitmap_subset(src1, src2, nbits); | 257 | return __bitmap_subset(src1, src2, nbits); |
| 258 | } | 258 | } |
| 259 | 259 | ||
| 260 | static inline int bitmap_empty(const unsigned long *src, int nbits) | 260 | static inline int bitmap_empty(const unsigned long *src, unsigned nbits) |
| 261 | { | 261 | { |
| 262 | if (small_const_nbits(nbits)) | 262 | if (small_const_nbits(nbits)) |
| 263 | return ! (*src & BITMAP_LAST_WORD_MASK(nbits)); | 263 | return ! (*src & BITMAP_LAST_WORD_MASK(nbits)); |
| @@ -265,7 +265,7 @@ static inline int bitmap_empty(const unsigned long *src, int nbits) | |||
| 265 | return __bitmap_empty(src, nbits); | 265 | return __bitmap_empty(src, nbits); |
| 266 | } | 266 | } |
| 267 | 267 | ||
| 268 | static inline int bitmap_full(const unsigned long *src, int nbits) | 268 | static inline int bitmap_full(const unsigned long *src, unsigned int nbits) |
| 269 | { | 269 | { |
| 270 | if (small_const_nbits(nbits)) | 270 | if (small_const_nbits(nbits)) |
| 271 | return ! (~(*src) & BITMAP_LAST_WORD_MASK(nbits)); | 271 | return ! (~(*src) & BITMAP_LAST_WORD_MASK(nbits)); |
| @@ -273,7 +273,7 @@ static inline int bitmap_full(const unsigned long *src, int nbits) | |||
| 273 | return __bitmap_full(src, nbits); | 273 | return __bitmap_full(src, nbits); |
| 274 | } | 274 | } |
| 275 | 275 | ||
| 276 | static inline int bitmap_weight(const unsigned long *src, int nbits) | 276 | static inline int bitmap_weight(const unsigned long *src, unsigned int nbits) |
| 277 | { | 277 | { |
| 278 | if (small_const_nbits(nbits)) | 278 | if (small_const_nbits(nbits)) |
| 279 | return hweight_long(*src & BITMAP_LAST_WORD_MASK(nbits)); | 279 | return hweight_long(*src & BITMAP_LAST_WORD_MASK(nbits)); |
| @@ -284,7 +284,7 @@ static inline void bitmap_shift_right(unsigned long *dst, | |||
| 284 | const unsigned long *src, int n, int nbits) | 284 | const unsigned long *src, int n, int nbits) |
| 285 | { | 285 | { |
| 286 | if (small_const_nbits(nbits)) | 286 | if (small_const_nbits(nbits)) |
| 287 | *dst = *src >> n; | 287 | *dst = (*src & BITMAP_LAST_WORD_MASK(nbits)) >> n; |
| 288 | else | 288 | else |
| 289 | __bitmap_shift_right(dst, src, n, nbits); | 289 | __bitmap_shift_right(dst, src, n, nbits); |
| 290 | } | 290 | } |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 8699bcf5f099..518b46555b80 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/bsg.h> | 21 | #include <linux/bsg.h> |
| 22 | #include <linux/smp.h> | 22 | #include <linux/smp.h> |
| 23 | #include <linux/rcupdate.h> | 23 | #include <linux/rcupdate.h> |
| 24 | #include <linux/percpu-refcount.h> | ||
| 24 | 25 | ||
| 25 | #include <asm/scatterlist.h> | 26 | #include <asm/scatterlist.h> |
| 26 | 27 | ||
| @@ -470,6 +471,7 @@ struct request_queue { | |||
| 470 | struct mutex sysfs_lock; | 471 | struct mutex sysfs_lock; |
| 471 | 472 | ||
| 472 | int bypass_depth; | 473 | int bypass_depth; |
| 474 | int mq_freeze_depth; | ||
| 473 | 475 | ||
| 474 | #if defined(CONFIG_BLK_DEV_BSG) | 476 | #if defined(CONFIG_BLK_DEV_BSG) |
| 475 | bsg_job_fn *bsg_job_fn; | 477 | bsg_job_fn *bsg_job_fn; |
| @@ -483,7 +485,7 @@ struct request_queue { | |||
| 483 | #endif | 485 | #endif |
| 484 | struct rcu_head rcu_head; | 486 | struct rcu_head rcu_head; |
| 485 | wait_queue_head_t mq_freeze_wq; | 487 | wait_queue_head_t mq_freeze_wq; |
| 486 | struct percpu_counter mq_usage_counter; | 488 | struct percpu_ref mq_usage_counter; |
| 487 | struct list_head all_q_node; | 489 | struct list_head all_q_node; |
| 488 | 490 | ||
| 489 | struct blk_mq_tag_set *tag_set; | 491 | struct blk_mq_tag_set *tag_set; |
diff --git a/include/linux/brcmphy.h b/include/linux/brcmphy.h index 6f76277baf39..61219b9b3445 100644 --- a/include/linux/brcmphy.h +++ b/include/linux/brcmphy.h | |||
| @@ -16,7 +16,6 @@ | |||
| 16 | #define PHY_ID_BCM7366 0x600d8490 | 16 | #define PHY_ID_BCM7366 0x600d8490 |
| 17 | #define PHY_ID_BCM7439 0x600d8480 | 17 | #define PHY_ID_BCM7439 0x600d8480 |
| 18 | #define PHY_ID_BCM7445 0x600d8510 | 18 | #define PHY_ID_BCM7445 0x600d8510 |
| 19 | #define PHY_ID_BCM7XXX_28 0x600d8400 | ||
| 20 | 19 | ||
| 21 | #define PHY_BCM_OUI_MASK 0xfffffc00 | 20 | #define PHY_BCM_OUI_MASK 0xfffffc00 |
| 22 | #define PHY_BCM_OUI_1 0x00206000 | 21 | #define PHY_BCM_OUI_1 0x00206000 |
diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h index 0846e6b931ce..89f67c1c3160 100644 --- a/include/linux/byteorder/generic.h +++ b/include/linux/byteorder/generic.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #define _LINUX_BYTEORDER_GENERIC_H | 2 | #define _LINUX_BYTEORDER_GENERIC_H |
| 3 | 3 | ||
| 4 | /* | 4 | /* |
| 5 | * linux/byteorder_generic.h | 5 | * linux/byteorder/generic.h |
| 6 | * Generic Byte-reordering support | 6 | * Generic Byte-reordering support |
| 7 | * | 7 | * |
| 8 | * The "... p" macros, like le64_to_cpup, can be used with pointers | 8 | * The "... p" macros, like le64_to_cpup, can be used with pointers |
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h index d21f2dba0731..40ae58e3e9db 100644 --- a/include/linux/ceph/messenger.h +++ b/include/linux/ceph/messenger.h | |||
| @@ -285,19 +285,9 @@ extern void ceph_msg_data_add_bio(struct ceph_msg *msg, struct bio *bio, | |||
| 285 | 285 | ||
| 286 | extern struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags, | 286 | extern struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags, |
| 287 | bool can_fail); | 287 | bool can_fail); |
| 288 | extern void ceph_msg_kfree(struct ceph_msg *m); | ||
| 289 | 288 | ||
| 290 | 289 | extern struct ceph_msg *ceph_msg_get(struct ceph_msg *msg); | |
| 291 | static inline struct ceph_msg *ceph_msg_get(struct ceph_msg *msg) | 290 | extern void ceph_msg_put(struct ceph_msg *msg); |
| 292 | { | ||
| 293 | kref_get(&msg->kref); | ||
| 294 | return msg; | ||
| 295 | } | ||
| 296 | extern void ceph_msg_last_put(struct kref *kref); | ||
| 297 | static inline void ceph_msg_put(struct ceph_msg *msg) | ||
| 298 | { | ||
| 299 | kref_put(&msg->kref, ceph_msg_last_put); | ||
| 300 | } | ||
| 301 | 291 | ||
| 302 | extern void ceph_msg_dump(struct ceph_msg *msg); | 292 | extern void ceph_msg_dump(struct ceph_msg *msg); |
| 303 | 293 | ||
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 94ec69672164..03aeb27fcc69 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h | |||
| @@ -117,7 +117,7 @@ struct ceph_osd_request { | |||
| 117 | struct list_head r_req_lru_item; | 117 | struct list_head r_req_lru_item; |
| 118 | struct list_head r_osd_item; | 118 | struct list_head r_osd_item; |
| 119 | struct list_head r_linger_item; | 119 | struct list_head r_linger_item; |
| 120 | struct list_head r_linger_osd; | 120 | struct list_head r_linger_osd_item; |
| 121 | struct ceph_osd *r_osd; | 121 | struct ceph_osd *r_osd; |
| 122 | struct ceph_pg r_pgid; | 122 | struct ceph_pg r_pgid; |
| 123 | int r_pg_osds[CEPH_PG_MAX_SIZE]; | 123 | int r_pg_osds[CEPH_PG_MAX_SIZE]; |
| @@ -325,22 +325,14 @@ extern struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *, | |||
| 325 | 325 | ||
| 326 | extern void ceph_osdc_set_request_linger(struct ceph_osd_client *osdc, | 326 | extern void ceph_osdc_set_request_linger(struct ceph_osd_client *osdc, |
| 327 | struct ceph_osd_request *req); | 327 | struct ceph_osd_request *req); |
| 328 | extern void ceph_osdc_unregister_linger_request(struct ceph_osd_client *osdc, | 328 | |
| 329 | struct ceph_osd_request *req); | 329 | extern void ceph_osdc_get_request(struct ceph_osd_request *req); |
| 330 | 330 | extern void ceph_osdc_put_request(struct ceph_osd_request *req); | |
| 331 | static inline void ceph_osdc_get_request(struct ceph_osd_request *req) | ||
| 332 | { | ||
| 333 | kref_get(&req->r_kref); | ||
| 334 | } | ||
| 335 | extern void ceph_osdc_release_request(struct kref *kref); | ||
| 336 | static inline void ceph_osdc_put_request(struct ceph_osd_request *req) | ||
| 337 | { | ||
| 338 | kref_put(&req->r_kref, ceph_osdc_release_request); | ||
| 339 | } | ||
| 340 | 331 | ||
| 341 | extern int ceph_osdc_start_request(struct ceph_osd_client *osdc, | 332 | extern int ceph_osdc_start_request(struct ceph_osd_client *osdc, |
| 342 | struct ceph_osd_request *req, | 333 | struct ceph_osd_request *req, |
| 343 | bool nofail); | 334 | bool nofail); |
| 335 | extern void ceph_osdc_cancel_request(struct ceph_osd_request *req); | ||
| 344 | extern int ceph_osdc_wait_request(struct ceph_osd_client *osdc, | 336 | extern int ceph_osdc_wait_request(struct ceph_osd_client *osdc, |
| 345 | struct ceph_osd_request *req); | 337 | struct ceph_osd_request *req); |
| 346 | extern void ceph_osdc_sync(struct ceph_osd_client *osdc); | 338 | extern void ceph_osdc_sync(struct ceph_osd_client *osdc); |
diff --git a/include/linux/cma.h b/include/linux/cma.h new file mode 100644 index 000000000000..371b93042520 --- /dev/null +++ b/include/linux/cma.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | #ifndef __CMA_H__ | ||
| 2 | #define __CMA_H__ | ||
| 3 | |||
| 4 | /* | ||
| 5 | * There is always at least global CMA area and a few optional | ||
| 6 | * areas configured in kernel .config. | ||
| 7 | */ | ||
| 8 | #ifdef CONFIG_CMA_AREAS | ||
| 9 | #define MAX_CMA_AREAS (1 + CONFIG_CMA_AREAS) | ||
| 10 | |||
| 11 | #else | ||
| 12 | #define MAX_CMA_AREAS (0) | ||
| 13 | |||
| 14 | #endif | ||
| 15 | |||
| 16 | struct cma; | ||
| 17 | |||
| 18 | extern phys_addr_t cma_get_base(struct cma *cma); | ||
| 19 | extern unsigned long cma_get_size(struct cma *cma); | ||
| 20 | |||
| 21 | extern int __init cma_declare_contiguous(phys_addr_t size, | ||
| 22 | phys_addr_t base, phys_addr_t limit, | ||
| 23 | phys_addr_t alignment, unsigned int order_per_bit, | ||
| 24 | bool fixed, struct cma **res_cma); | ||
| 25 | extern struct page *cma_alloc(struct cma *cma, int count, unsigned int align); | ||
| 26 | extern bool cma_release(struct cma *cma, struct page *pages, int count); | ||
| 27 | #endif | ||
diff --git a/include/linux/cred.h b/include/linux/cred.h index f61d6c8f5ef3..b2d0820837c4 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
| @@ -259,6 +259,15 @@ static inline void put_cred(const struct cred *_cred) | |||
| 259 | rcu_dereference_protected(current->cred, 1) | 259 | rcu_dereference_protected(current->cred, 1) |
| 260 | 260 | ||
| 261 | /** | 261 | /** |
| 262 | * current_real_cred - Access the current task's objective credentials | ||
| 263 | * | ||
| 264 | * Access the objective credentials of the current task. RCU-safe, | ||
| 265 | * since nobody else can modify it. | ||
| 266 | */ | ||
| 267 | #define current_real_cred() \ | ||
| 268 | rcu_dereference_protected(current->real_cred, 1) | ||
| 269 | |||
| 270 | /** | ||
| 262 | * __task_cred - Access a task's objective credentials | 271 | * __task_cred - Access a task's objective credentials |
| 263 | * @task: The task to query | 272 | * @task: The task to query |
| 264 | * | 273 | * |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 3c7ec327ebd2..e4ae2ad48d07 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
| @@ -249,6 +249,7 @@ extern struct dentry * d_splice_alias(struct inode *, struct dentry *); | |||
| 249 | extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *); | 249 | extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *); |
| 250 | extern struct dentry *d_find_any_alias(struct inode *inode); | 250 | extern struct dentry *d_find_any_alias(struct inode *inode); |
| 251 | extern struct dentry * d_obtain_alias(struct inode *); | 251 | extern struct dentry * d_obtain_alias(struct inode *); |
| 252 | extern struct dentry * d_obtain_root(struct inode *); | ||
| 252 | extern void shrink_dcache_sb(struct super_block *); | 253 | extern void shrink_dcache_sb(struct super_block *); |
| 253 | extern void shrink_dcache_parent(struct dentry *); | 254 | extern void shrink_dcache_parent(struct dentry *); |
| 254 | extern void shrink_dcache_for_umount(struct super_block *); | 255 | extern void shrink_dcache_for_umount(struct super_block *); |
diff --git a/include/linux/decompress/bunzip2.h b/include/linux/decompress/bunzip2.h index 115272137a9c..4d683df898e6 100644 --- a/include/linux/decompress/bunzip2.h +++ b/include/linux/decompress/bunzip2.h | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | #ifndef DECOMPRESS_BUNZIP2_H | 1 | #ifndef DECOMPRESS_BUNZIP2_H |
| 2 | #define DECOMPRESS_BUNZIP2_H | 2 | #define DECOMPRESS_BUNZIP2_H |
| 3 | 3 | ||
| 4 | int bunzip2(unsigned char *inbuf, int len, | 4 | int bunzip2(unsigned char *inbuf, long len, |
| 5 | int(*fill)(void*, unsigned int), | 5 | long (*fill)(void*, unsigned long), |
| 6 | int(*flush)(void*, unsigned int), | 6 | long (*flush)(void*, unsigned long), |
| 7 | unsigned char *output, | 7 | unsigned char *output, |
| 8 | int *pos, | 8 | long *pos, |
| 9 | void(*error)(char *x)); | 9 | void(*error)(char *x)); |
| 10 | #endif | 10 | #endif |
diff --git a/include/linux/decompress/generic.h b/include/linux/decompress/generic.h index 0c7111a55a1a..1fcfd64b5076 100644 --- a/include/linux/decompress/generic.h +++ b/include/linux/decompress/generic.h | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | #ifndef DECOMPRESS_GENERIC_H | 1 | #ifndef DECOMPRESS_GENERIC_H |
| 2 | #define DECOMPRESS_GENERIC_H | 2 | #define DECOMPRESS_GENERIC_H |
| 3 | 3 | ||
| 4 | typedef int (*decompress_fn) (unsigned char *inbuf, int len, | 4 | typedef int (*decompress_fn) (unsigned char *inbuf, long len, |
| 5 | int(*fill)(void*, unsigned int), | 5 | long (*fill)(void*, unsigned long), |
| 6 | int(*flush)(void*, unsigned int), | 6 | long (*flush)(void*, unsigned long), |
| 7 | unsigned char *outbuf, | 7 | unsigned char *outbuf, |
| 8 | int *posp, | 8 | long *posp, |
| 9 | void(*error)(char *x)); | 9 | void(*error)(char *x)); |
| 10 | 10 | ||
| 11 | /* inbuf - input buffer | 11 | /* inbuf - input buffer |
| @@ -33,7 +33,7 @@ typedef int (*decompress_fn) (unsigned char *inbuf, int len, | |||
| 33 | 33 | ||
| 34 | 34 | ||
| 35 | /* Utility routine to detect the decompression method */ | 35 | /* Utility routine to detect the decompression method */ |
| 36 | decompress_fn decompress_method(const unsigned char *inbuf, int len, | 36 | decompress_fn decompress_method(const unsigned char *inbuf, long len, |
| 37 | const char **name); | 37 | const char **name); |
| 38 | 38 | ||
| 39 | #endif | 39 | #endif |
diff --git a/include/linux/decompress/inflate.h b/include/linux/decompress/inflate.h index 1d0aedef9822..e4f411fdbd24 100644 --- a/include/linux/decompress/inflate.h +++ b/include/linux/decompress/inflate.h | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | #ifndef LINUX_DECOMPRESS_INFLATE_H | 1 | #ifndef LINUX_DECOMPRESS_INFLATE_H |
| 2 | #define LINUX_DECOMPRESS_INFLATE_H | 2 | #define LINUX_DECOMPRESS_INFLATE_H |
| 3 | 3 | ||
| 4 | int gunzip(unsigned char *inbuf, int len, | 4 | int gunzip(unsigned char *inbuf, long len, |
| 5 | int(*fill)(void*, unsigned int), | 5 | long (*fill)(void*, unsigned long), |
| 6 | int(*flush)(void*, unsigned int), | 6 | long (*flush)(void*, unsigned long), |
| 7 | unsigned char *output, | 7 | unsigned char *output, |
| 8 | int *pos, | 8 | long *pos, |
| 9 | void(*error_fn)(char *x)); | 9 | void(*error_fn)(char *x)); |
| 10 | #endif | 10 | #endif |
diff --git a/include/linux/decompress/unlz4.h b/include/linux/decompress/unlz4.h index d5b68bf3ec92..3273c2f36496 100644 --- a/include/linux/decompress/unlz4.h +++ b/include/linux/decompress/unlz4.h | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | #ifndef DECOMPRESS_UNLZ4_H | 1 | #ifndef DECOMPRESS_UNLZ4_H |
| 2 | #define DECOMPRESS_UNLZ4_H | 2 | #define DECOMPRESS_UNLZ4_H |
| 3 | 3 | ||
| 4 | int unlz4(unsigned char *inbuf, int len, | 4 | int unlz4(unsigned char *inbuf, long len, |
| 5 | int(*fill)(void*, unsigned int), | 5 | long (*fill)(void*, unsigned long), |
| 6 | int(*flush)(void*, unsigned int), | 6 | long (*flush)(void*, unsigned long), |
| 7 | unsigned char *output, | 7 | unsigned char *output, |
| 8 | int *pos, | 8 | long *pos, |
| 9 | void(*error)(char *x)); | 9 | void(*error)(char *x)); |
| 10 | #endif | 10 | #endif |
diff --git a/include/linux/decompress/unlzma.h b/include/linux/decompress/unlzma.h index 7796538f1bf4..8a891a193840 100644 --- a/include/linux/decompress/unlzma.h +++ b/include/linux/decompress/unlzma.h | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | #ifndef DECOMPRESS_UNLZMA_H | 1 | #ifndef DECOMPRESS_UNLZMA_H |
| 2 | #define DECOMPRESS_UNLZMA_H | 2 | #define DECOMPRESS_UNLZMA_H |
| 3 | 3 | ||
| 4 | int unlzma(unsigned char *, int, | 4 | int unlzma(unsigned char *, long, |
| 5 | int(*fill)(void*, unsigned int), | 5 | long (*fill)(void*, unsigned long), |
| 6 | int(*flush)(void*, unsigned int), | 6 | long (*flush)(void*, unsigned long), |
| 7 | unsigned char *output, | 7 | unsigned char *output, |
| 8 | int *posp, | 8 | long *posp, |
| 9 | void(*error)(char *x) | 9 | void(*error)(char *x) |
| 10 | ); | 10 | ); |
| 11 | 11 | ||
diff --git a/include/linux/decompress/unlzo.h b/include/linux/decompress/unlzo.h index 987229752519..af18f95d6570 100644 --- a/include/linux/decompress/unlzo.h +++ b/include/linux/decompress/unlzo.h | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | #ifndef DECOMPRESS_UNLZO_H | 1 | #ifndef DECOMPRESS_UNLZO_H |
| 2 | #define DECOMPRESS_UNLZO_H | 2 | #define DECOMPRESS_UNLZO_H |
| 3 | 3 | ||
| 4 | int unlzo(unsigned char *inbuf, int len, | 4 | int unlzo(unsigned char *inbuf, long len, |
| 5 | int(*fill)(void*, unsigned int), | 5 | long (*fill)(void*, unsigned long), |
| 6 | int(*flush)(void*, unsigned int), | 6 | long (*flush)(void*, unsigned long), |
| 7 | unsigned char *output, | 7 | unsigned char *output, |
| 8 | int *pos, | 8 | long *pos, |
| 9 | void(*error)(char *x)); | 9 | void(*error)(char *x)); |
| 10 | #endif | 10 | #endif |
diff --git a/include/linux/decompress/unxz.h b/include/linux/decompress/unxz.h index 41728fc6c8a1..f764e2a7201e 100644 --- a/include/linux/decompress/unxz.h +++ b/include/linux/decompress/unxz.h | |||
| @@ -10,10 +10,10 @@ | |||
| 10 | #ifndef DECOMPRESS_UNXZ_H | 10 | #ifndef DECOMPRESS_UNXZ_H |
| 11 | #define DECOMPRESS_UNXZ_H | 11 | #define DECOMPRESS_UNXZ_H |
| 12 | 12 | ||
| 13 | int unxz(unsigned char *in, int in_size, | 13 | int unxz(unsigned char *in, long in_size, |
| 14 | int (*fill)(void *dest, unsigned int size), | 14 | long (*fill)(void *dest, unsigned long size), |
| 15 | int (*flush)(void *src, unsigned int size), | 15 | long (*flush)(void *src, unsigned long size), |
| 16 | unsigned char *out, int *in_used, | 16 | unsigned char *out, long *in_used, |
| 17 | void (*error)(char *x)); | 17 | void (*error)(char *x)); |
| 18 | 18 | ||
| 19 | #endif | 19 | #endif |
diff --git a/include/linux/dma-contiguous.h b/include/linux/dma-contiguous.h index 772eab5d524a..569bbd039896 100644 --- a/include/linux/dma-contiguous.h +++ b/include/linux/dma-contiguous.h | |||
| @@ -53,18 +53,13 @@ | |||
| 53 | 53 | ||
| 54 | #ifdef __KERNEL__ | 54 | #ifdef __KERNEL__ |
| 55 | 55 | ||
| 56 | #include <linux/device.h> | ||
| 57 | |||
| 56 | struct cma; | 58 | struct cma; |
| 57 | struct page; | 59 | struct page; |
| 58 | struct device; | ||
| 59 | 60 | ||
| 60 | #ifdef CONFIG_DMA_CMA | 61 | #ifdef CONFIG_DMA_CMA |
| 61 | 62 | ||
| 62 | /* | ||
| 63 | * There is always at least global CMA area and a few optional device | ||
| 64 | * private areas configured in kernel .config. | ||
| 65 | */ | ||
| 66 | #define MAX_CMA_AREAS (1 + CONFIG_CMA_AREAS) | ||
| 67 | |||
| 68 | extern struct cma *dma_contiguous_default_area; | 63 | extern struct cma *dma_contiguous_default_area; |
| 69 | 64 | ||
| 70 | static inline struct cma *dev_get_cma_area(struct device *dev) | 65 | static inline struct cma *dev_get_cma_area(struct device *dev) |
| @@ -123,8 +118,6 @@ bool dma_release_from_contiguous(struct device *dev, struct page *pages, | |||
| 123 | 118 | ||
| 124 | #else | 119 | #else |
| 125 | 120 | ||
| 126 | #define MAX_CMA_AREAS (0) | ||
| 127 | |||
| 128 | static inline struct cma *dev_get_cma_area(struct device *dev) | 121 | static inline struct cma *dev_get_cma_area(struct device *dev) |
| 129 | { | 122 | { |
| 130 | return NULL; | 123 | return NULL; |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 3d1c2aa51530..1f9e642c66ad 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
| @@ -37,7 +37,6 @@ | |||
| 37 | */ | 37 | */ |
| 38 | typedef s32 dma_cookie_t; | 38 | typedef s32 dma_cookie_t; |
| 39 | #define DMA_MIN_COOKIE 1 | 39 | #define DMA_MIN_COOKIE 1 |
| 40 | #define DMA_MAX_COOKIE INT_MAX | ||
| 41 | 40 | ||
| 42 | static inline int dma_submit_error(dma_cookie_t cookie) | 41 | static inline int dma_submit_error(dma_cookie_t cookie) |
| 43 | { | 42 | { |
| @@ -671,7 +670,7 @@ struct dma_device { | |||
| 671 | struct dma_async_tx_descriptor *(*device_prep_dma_cyclic)( | 670 | struct dma_async_tx_descriptor *(*device_prep_dma_cyclic)( |
| 672 | struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, | 671 | struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, |
| 673 | size_t period_len, enum dma_transfer_direction direction, | 672 | size_t period_len, enum dma_transfer_direction direction, |
| 674 | unsigned long flags, void *context); | 673 | unsigned long flags); |
| 675 | struct dma_async_tx_descriptor *(*device_prep_interleaved_dma)( | 674 | struct dma_async_tx_descriptor *(*device_prep_interleaved_dma)( |
| 676 | struct dma_chan *chan, struct dma_interleaved_template *xt, | 675 | struct dma_chan *chan, struct dma_interleaved_template *xt, |
| 677 | unsigned long flags); | 676 | unsigned long flags); |
| @@ -746,7 +745,7 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic( | |||
| 746 | unsigned long flags) | 745 | unsigned long flags) |
| 747 | { | 746 | { |
| 748 | return chan->device->device_prep_dma_cyclic(chan, buf_addr, buf_len, | 747 | return chan->device->device_prep_dma_cyclic(chan, buf_addr, buf_len, |
| 749 | period_len, dir, flags, NULL); | 748 | period_len, dir, flags); |
| 750 | } | 749 | } |
| 751 | 750 | ||
| 752 | static inline struct dma_async_tx_descriptor *dmaengine_prep_interleaved_dma( | 751 | static inline struct dma_async_tx_descriptor *dmaengine_prep_interleaved_dma( |
diff --git a/include/linux/drbd.h b/include/linux/drbd.h index 3dbe9bd57a09..debb70d40547 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h | |||
| @@ -52,7 +52,7 @@ | |||
| 52 | #endif | 52 | #endif |
| 53 | 53 | ||
| 54 | extern const char *drbd_buildtag(void); | 54 | extern const char *drbd_buildtag(void); |
| 55 | #define REL_VERSION "8.4.3" | 55 | #define REL_VERSION "8.4.5" |
| 56 | #define API_VERSION 1 | 56 | #define API_VERSION 1 |
| 57 | #define PRO_VERSION_MIN 86 | 57 | #define PRO_VERSION_MIN 86 |
| 58 | #define PRO_VERSION_MAX 101 | 58 | #define PRO_VERSION_MAX 101 |
| @@ -245,7 +245,7 @@ enum drbd_disk_state { | |||
| 245 | D_DISKLESS, | 245 | D_DISKLESS, |
| 246 | D_ATTACHING, /* In the process of reading the meta-data */ | 246 | D_ATTACHING, /* In the process of reading the meta-data */ |
| 247 | D_FAILED, /* Becomes D_DISKLESS as soon as we told it the peer */ | 247 | D_FAILED, /* Becomes D_DISKLESS as soon as we told it the peer */ |
| 248 | /* when >= D_FAILED it is legal to access mdev->bc */ | 248 | /* when >= D_FAILED it is legal to access mdev->ldev */ |
| 249 | D_NEGOTIATING, /* Late attaching state, we need to talk to the peer */ | 249 | D_NEGOTIATING, /* Late attaching state, we need to talk to the peer */ |
| 250 | D_INCONSISTENT, | 250 | D_INCONSISTENT, |
| 251 | D_OUTDATED, | 251 | D_OUTDATED, |
diff --git a/include/linux/drbd_genl.h b/include/linux/drbd_genl.h index 4193f5f2636c..7b131ed8f9c6 100644 --- a/include/linux/drbd_genl.h +++ b/include/linux/drbd_genl.h | |||
| @@ -171,6 +171,10 @@ GENL_struct(DRBD_NLA_NET_CONF, 5, net_conf, | |||
| 171 | __flg_field(28, DRBD_GENLA_F_MANDATORY | DRBD_F_INVARIANT, tentative) | 171 | __flg_field(28, DRBD_GENLA_F_MANDATORY | DRBD_F_INVARIANT, tentative) |
| 172 | __flg_field_def(29, DRBD_GENLA_F_MANDATORY, use_rle, DRBD_USE_RLE_DEF) | 172 | __flg_field_def(29, DRBD_GENLA_F_MANDATORY, use_rle, DRBD_USE_RLE_DEF) |
| 173 | /* 9: __u32_field_def(30, DRBD_GENLA_F_MANDATORY, fencing_policy, DRBD_FENCING_DEF) */ | 173 | /* 9: __u32_field_def(30, DRBD_GENLA_F_MANDATORY, fencing_policy, DRBD_FENCING_DEF) */ |
| 174 | /* 9: __str_field_def(31, DRBD_GENLA_F_MANDATORY, name, SHARED_SECRET_MAX) */ | ||
| 175 | /* 9: __u32_field(32, DRBD_F_REQUIRED | DRBD_F_INVARIANT, peer_node_id) */ | ||
| 176 | __flg_field_def(33, 0 /* OPTIONAL */, csums_after_crash_only, DRBD_CSUMS_AFTER_CRASH_ONLY_DEF) | ||
| 177 | __u32_field_def(34, 0 /* OPTIONAL */, sock_check_timeo, DRBD_SOCKET_CHECK_TIMEO_DEF) | ||
| 174 | ) | 178 | ) |
| 175 | 179 | ||
| 176 | GENL_struct(DRBD_NLA_SET_ROLE_PARMS, 6, set_role_parms, | 180 | GENL_struct(DRBD_NLA_SET_ROLE_PARMS, 6, set_role_parms, |
diff --git a/include/linux/drbd_limits.h b/include/linux/drbd_limits.h index 17e50bb00521..8ac8c5d9a3ad 100644 --- a/include/linux/drbd_limits.h +++ b/include/linux/drbd_limits.h | |||
| @@ -214,6 +214,7 @@ | |||
| 214 | #define DRBD_ALLOW_TWO_PRIMARIES_DEF 0 | 214 | #define DRBD_ALLOW_TWO_PRIMARIES_DEF 0 |
| 215 | #define DRBD_ALWAYS_ASBP_DEF 0 | 215 | #define DRBD_ALWAYS_ASBP_DEF 0 |
| 216 | #define DRBD_USE_RLE_DEF 1 | 216 | #define DRBD_USE_RLE_DEF 1 |
| 217 | #define DRBD_CSUMS_AFTER_CRASH_ONLY_DEF 0 | ||
| 217 | 218 | ||
| 218 | #define DRBD_AL_STRIPES_MIN 1 | 219 | #define DRBD_AL_STRIPES_MIN 1 |
| 219 | #define DRBD_AL_STRIPES_MAX 1024 | 220 | #define DRBD_AL_STRIPES_MAX 1024 |
| @@ -224,4 +225,9 @@ | |||
| 224 | #define DRBD_AL_STRIPE_SIZE_MAX 16777216 | 225 | #define DRBD_AL_STRIPE_SIZE_MAX 16777216 |
| 225 | #define DRBD_AL_STRIPE_SIZE_DEF 32 | 226 | #define DRBD_AL_STRIPE_SIZE_DEF 32 |
| 226 | #define DRBD_AL_STRIPE_SIZE_SCALE 'k' /* kilobytes */ | 227 | #define DRBD_AL_STRIPE_SIZE_SCALE 'k' /* kilobytes */ |
| 228 | |||
| 229 | #define DRBD_SOCKET_CHECK_TIMEO_MIN 0 | ||
| 230 | #define DRBD_SOCKET_CHECK_TIMEO_MAX DRBD_PING_TIMEO_MAX | ||
| 231 | #define DRBD_SOCKET_CHECK_TIMEO_DEF 0 | ||
| 232 | #define DRBD_SOCKET_CHECK_TIMEO_SCALE '1' | ||
| 227 | #endif | 233 | #endif |
diff --git a/include/linux/edac.h b/include/linux/edac.h index 8e6c20af11a2..e1e68da6f35c 100644 --- a/include/linux/edac.h +++ b/include/linux/edac.h | |||
| @@ -194,6 +194,9 @@ static inline char *mc_event_error_type(const unsigned int err_type) | |||
| 194 | * @MEM_DDR3: DDR3 RAM | 194 | * @MEM_DDR3: DDR3 RAM |
| 195 | * @MEM_RDDR3: Registered DDR3 RAM | 195 | * @MEM_RDDR3: Registered DDR3 RAM |
| 196 | * This is a variant of the DDR3 memories. | 196 | * This is a variant of the DDR3 memories. |
| 197 | * @MEM_DDR4: DDR4 RAM | ||
| 198 | * @MEM_RDDR4: Registered DDR4 RAM | ||
| 199 | * This is a variant of the DDR4 memories. | ||
| 197 | */ | 200 | */ |
| 198 | enum mem_type { | 201 | enum mem_type { |
| 199 | MEM_EMPTY = 0, | 202 | MEM_EMPTY = 0, |
| @@ -213,6 +216,8 @@ enum mem_type { | |||
| 213 | MEM_XDR, | 216 | MEM_XDR, |
| 214 | MEM_DDR3, | 217 | MEM_DDR3, |
| 215 | MEM_RDDR3, | 218 | MEM_RDDR3, |
| 219 | MEM_DDR4, | ||
| 220 | MEM_RDDR4, | ||
| 216 | }; | 221 | }; |
| 217 | 222 | ||
| 218 | #define MEM_FLAG_EMPTY BIT(MEM_EMPTY) | 223 | #define MEM_FLAG_EMPTY BIT(MEM_EMPTY) |
diff --git a/include/linux/efi.h b/include/linux/efi.h index efc681fd5895..45cb4ffdea62 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -1156,6 +1156,9 @@ int efivars_sysfs_init(void); | |||
| 1156 | #ifdef CONFIG_EFI_RUNTIME_MAP | 1156 | #ifdef CONFIG_EFI_RUNTIME_MAP |
| 1157 | int efi_runtime_map_init(struct kobject *); | 1157 | int efi_runtime_map_init(struct kobject *); |
| 1158 | void efi_runtime_map_setup(void *, int, u32); | 1158 | void efi_runtime_map_setup(void *, int, u32); |
| 1159 | int efi_get_runtime_map_size(void); | ||
| 1160 | int efi_get_runtime_map_desc_size(void); | ||
| 1161 | int efi_runtime_map_copy(void *buf, size_t bufsz); | ||
| 1159 | #else | 1162 | #else |
| 1160 | static inline int efi_runtime_map_init(struct kobject *kobj) | 1163 | static inline int efi_runtime_map_init(struct kobject *kobj) |
| 1161 | { | 1164 | { |
| @@ -1164,6 +1167,22 @@ static inline int efi_runtime_map_init(struct kobject *kobj) | |||
| 1164 | 1167 | ||
| 1165 | static inline void | 1168 | static inline void |
| 1166 | efi_runtime_map_setup(void *map, int nr_entries, u32 desc_size) {} | 1169 | efi_runtime_map_setup(void *map, int nr_entries, u32 desc_size) {} |
| 1170 | |||
| 1171 | static inline int efi_get_runtime_map_size(void) | ||
| 1172 | { | ||
| 1173 | return 0; | ||
| 1174 | } | ||
| 1175 | |||
| 1176 | static inline int efi_get_runtime_map_desc_size(void) | ||
| 1177 | { | ||
| 1178 | return 0; | ||
| 1179 | } | ||
| 1180 | |||
| 1181 | static inline int efi_runtime_map_copy(void *buf, size_t bufsz) | ||
| 1182 | { | ||
| 1183 | return 0; | ||
| 1184 | } | ||
| 1185 | |||
| 1167 | #endif | 1186 | #endif |
| 1168 | 1187 | ||
| 1169 | /* prototypes shared between arch specific and generic stub code */ | 1188 | /* prototypes shared between arch specific and generic stub code */ |
diff --git a/include/linux/fb.h b/include/linux/fb.h index b6bfda99add3..09bb7a18d287 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
| @@ -553,7 +553,7 @@ static inline struct apertures_struct *alloc_apertures(unsigned int max_num) { | |||
| 553 | #define fb_memcpy_fromfb sbus_memcpy_fromio | 553 | #define fb_memcpy_fromfb sbus_memcpy_fromio |
| 554 | #define fb_memcpy_tofb sbus_memcpy_toio | 554 | #define fb_memcpy_tofb sbus_memcpy_toio |
| 555 | 555 | ||
| 556 | #elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) || defined(__powerpc__) || defined(__avr32__) || defined(__bfin__) | 556 | #elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) || defined(__powerpc__) || defined(__avr32__) || defined(__bfin__) || defined(__arm__) |
| 557 | 557 | ||
| 558 | #define fb_readb __raw_readb | 558 | #define fb_readb __raw_readb |
| 559 | #define fb_readw __raw_readw | 559 | #define fb_readw __raw_readw |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 2daccaf4b547..94187721ad41 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -387,7 +387,7 @@ struct address_space { | |||
| 387 | struct inode *host; /* owner: inode, block_device */ | 387 | struct inode *host; /* owner: inode, block_device */ |
| 388 | struct radix_tree_root page_tree; /* radix tree of all pages */ | 388 | struct radix_tree_root page_tree; /* radix tree of all pages */ |
| 389 | spinlock_t tree_lock; /* and lock protecting it */ | 389 | spinlock_t tree_lock; /* and lock protecting it */ |
| 390 | unsigned int i_mmap_writable;/* count VM_SHARED mappings */ | 390 | atomic_t i_mmap_writable;/* count VM_SHARED mappings */ |
| 391 | struct rb_root i_mmap; /* tree of private and shared mappings */ | 391 | struct rb_root i_mmap; /* tree of private and shared mappings */ |
| 392 | struct list_head i_mmap_nonlinear;/*list VM_NONLINEAR mappings */ | 392 | struct list_head i_mmap_nonlinear;/*list VM_NONLINEAR mappings */ |
| 393 | struct mutex i_mmap_mutex; /* protect tree, count, list */ | 393 | struct mutex i_mmap_mutex; /* protect tree, count, list */ |
| @@ -470,10 +470,35 @@ static inline int mapping_mapped(struct address_space *mapping) | |||
| 470 | * Note that i_mmap_writable counts all VM_SHARED vmas: do_mmap_pgoff | 470 | * Note that i_mmap_writable counts all VM_SHARED vmas: do_mmap_pgoff |
| 471 | * marks vma as VM_SHARED if it is shared, and the file was opened for | 471 | * marks vma as VM_SHARED if it is shared, and the file was opened for |
| 472 | * writing i.e. vma may be mprotected writable even if now readonly. | 472 | * writing i.e. vma may be mprotected writable even if now readonly. |
| 473 | * | ||
| 474 | * If i_mmap_writable is negative, no new writable mappings are allowed. You | ||
| 475 | * can only deny writable mappings, if none exists right now. | ||
| 473 | */ | 476 | */ |
| 474 | static inline int mapping_writably_mapped(struct address_space *mapping) | 477 | static inline int mapping_writably_mapped(struct address_space *mapping) |
| 475 | { | 478 | { |
| 476 | return mapping->i_mmap_writable != 0; | 479 | return atomic_read(&mapping->i_mmap_writable) > 0; |
| 480 | } | ||
| 481 | |||
| 482 | static inline int mapping_map_writable(struct address_space *mapping) | ||
| 483 | { | ||
| 484 | return atomic_inc_unless_negative(&mapping->i_mmap_writable) ? | ||
| 485 | 0 : -EPERM; | ||
| 486 | } | ||
| 487 | |||
| 488 | static inline void mapping_unmap_writable(struct address_space *mapping) | ||
| 489 | { | ||
| 490 | atomic_dec(&mapping->i_mmap_writable); | ||
| 491 | } | ||
| 492 | |||
| 493 | static inline int mapping_deny_writable(struct address_space *mapping) | ||
| 494 | { | ||
| 495 | return atomic_dec_unless_positive(&mapping->i_mmap_writable) ? | ||
| 496 | 0 : -EBUSY; | ||
| 497 | } | ||
| 498 | |||
| 499 | static inline void mapping_allow_writable(struct address_space *mapping) | ||
| 500 | { | ||
| 501 | atomic_inc(&mapping->i_mmap_writable); | ||
| 477 | } | 502 | } |
| 478 | 503 | ||
| 479 | /* | 504 | /* |
| @@ -1250,6 +1275,7 @@ struct super_block { | |||
| 1250 | 1275 | ||
| 1251 | /* AIO completions deferred from interrupt context */ | 1276 | /* AIO completions deferred from interrupt context */ |
| 1252 | struct workqueue_struct *s_dio_done_wq; | 1277 | struct workqueue_struct *s_dio_done_wq; |
| 1278 | struct hlist_head s_pins; | ||
| 1253 | 1279 | ||
| 1254 | /* | 1280 | /* |
| 1255 | * Keep the lru lists last in the structure so they always sit on their | 1281 | * Keep the lru lists last in the structure so they always sit on their |
| @@ -2335,6 +2361,7 @@ extern int do_pipe_flags(int *, int); | |||
| 2335 | 2361 | ||
| 2336 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); | 2362 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); |
| 2337 | extern ssize_t kernel_write(struct file *, const char *, size_t, loff_t); | 2363 | extern ssize_t kernel_write(struct file *, const char *, size_t, loff_t); |
| 2364 | extern ssize_t __kernel_write(struct file *, const char *, size_t, loff_t *); | ||
| 2338 | extern struct file * open_exec(const char *); | 2365 | extern struct file * open_exec(const char *); |
| 2339 | 2366 | ||
| 2340 | /* fs/dcache.c -- generic fs support functions */ | 2367 | /* fs/dcache.c -- generic fs support functions */ |
| @@ -2688,7 +2715,7 @@ static const struct file_operations __fops = { \ | |||
| 2688 | .read = simple_attr_read, \ | 2715 | .read = simple_attr_read, \ |
| 2689 | .write = simple_attr_write, \ | 2716 | .write = simple_attr_write, \ |
| 2690 | .llseek = generic_file_llseek, \ | 2717 | .llseek = generic_file_llseek, \ |
| 2691 | }; | 2718 | } |
| 2692 | 2719 | ||
| 2693 | static inline __printf(1, 2) | 2720 | static inline __printf(1, 2) |
| 2694 | void __simple_attr_check_format(const char *fmt, ...) | 2721 | void __simple_attr_check_format(const char *fmt, ...) |
diff --git a/include/linux/fs_pin.h b/include/linux/fs_pin.h new file mode 100644 index 000000000000..f66525e72ccf --- /dev/null +++ b/include/linux/fs_pin.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #include <linux/fs.h> | ||
| 2 | |||
| 3 | struct fs_pin { | ||
| 4 | atomic_long_t count; | ||
| 5 | union { | ||
| 6 | struct { | ||
| 7 | struct hlist_node s_list; | ||
| 8 | struct hlist_node m_list; | ||
| 9 | }; | ||
| 10 | struct rcu_head rcu; | ||
| 11 | }; | ||
| 12 | void (*kill)(struct fs_pin *); | ||
| 13 | }; | ||
| 14 | |||
| 15 | void pin_put(struct fs_pin *); | ||
| 16 | void pin_remove(struct fs_pin *); | ||
| 17 | void pin_insert(struct fs_pin *, struct vfsmount *); | ||
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index fc7718c6bd3e..ca060d7c4fa6 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
| @@ -322,16 +322,18 @@ extern int fsnotify_fasync(int fd, struct file *file, int on); | |||
| 322 | extern void fsnotify_destroy_event(struct fsnotify_group *group, | 322 | extern void fsnotify_destroy_event(struct fsnotify_group *group, |
| 323 | struct fsnotify_event *event); | 323 | struct fsnotify_event *event); |
| 324 | /* attach the event to the group notification queue */ | 324 | /* attach the event to the group notification queue */ |
| 325 | extern int fsnotify_add_notify_event(struct fsnotify_group *group, | 325 | extern int fsnotify_add_event(struct fsnotify_group *group, |
| 326 | struct fsnotify_event *event, | 326 | struct fsnotify_event *event, |
| 327 | int (*merge)(struct list_head *, | 327 | int (*merge)(struct list_head *, |
| 328 | struct fsnotify_event *)); | 328 | struct fsnotify_event *)); |
| 329 | /* Remove passed event from groups notification queue */ | ||
| 330 | extern void fsnotify_remove_event(struct fsnotify_group *group, struct fsnotify_event *event); | ||
| 329 | /* true if the group notification queue is empty */ | 331 | /* true if the group notification queue is empty */ |
| 330 | extern bool fsnotify_notify_queue_is_empty(struct fsnotify_group *group); | 332 | extern bool fsnotify_notify_queue_is_empty(struct fsnotify_group *group); |
| 331 | /* return, but do not dequeue the first event on the notification queue */ | 333 | /* return, but do not dequeue the first event on the notification queue */ |
| 332 | extern struct fsnotify_event *fsnotify_peek_notify_event(struct fsnotify_group *group); | 334 | extern struct fsnotify_event *fsnotify_peek_first_event(struct fsnotify_group *group); |
| 333 | /* return AND dequeue the first event on the notification queue */ | 335 | /* return AND dequeue the first event on the notification queue */ |
| 334 | extern struct fsnotify_event *fsnotify_remove_notify_event(struct fsnotify_group *group); | 336 | extern struct fsnotify_event *fsnotify_remove_first_event(struct fsnotify_group *group); |
| 335 | 337 | ||
| 336 | /* functions used to manipulate the marks attached to inodes */ | 338 | /* functions used to manipulate the marks attached to inodes */ |
| 337 | 339 | ||
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 6bb5e3f2a3b4..f0b0edbf55a9 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
| @@ -102,6 +102,15 @@ enum { | |||
| 102 | FTRACE_OPS_FL_DELETED = 1 << 8, | 102 | FTRACE_OPS_FL_DELETED = 1 << 8, |
| 103 | }; | 103 | }; |
| 104 | 104 | ||
| 105 | #ifdef CONFIG_DYNAMIC_FTRACE | ||
| 106 | /* The hash used to know what functions callbacks trace */ | ||
| 107 | struct ftrace_ops_hash { | ||
| 108 | struct ftrace_hash *notrace_hash; | ||
| 109 | struct ftrace_hash *filter_hash; | ||
| 110 | struct mutex regex_lock; | ||
| 111 | }; | ||
| 112 | #endif | ||
| 113 | |||
| 105 | /* | 114 | /* |
| 106 | * Note, ftrace_ops can be referenced outside of RCU protection. | 115 | * Note, ftrace_ops can be referenced outside of RCU protection. |
| 107 | * (Although, for perf, the control ops prevent that). If ftrace_ops is | 116 | * (Although, for perf, the control ops prevent that). If ftrace_ops is |
| @@ -121,10 +130,9 @@ struct ftrace_ops { | |||
| 121 | int __percpu *disabled; | 130 | int __percpu *disabled; |
| 122 | #ifdef CONFIG_DYNAMIC_FTRACE | 131 | #ifdef CONFIG_DYNAMIC_FTRACE |
| 123 | int nr_trampolines; | 132 | int nr_trampolines; |
| 124 | struct ftrace_hash *notrace_hash; | 133 | struct ftrace_ops_hash local_hash; |
| 125 | struct ftrace_hash *filter_hash; | 134 | struct ftrace_ops_hash *func_hash; |
| 126 | struct ftrace_hash *tramp_hash; | 135 | struct ftrace_hash *tramp_hash; |
| 127 | struct mutex regex_lock; | ||
| 128 | unsigned long trampoline; | 136 | unsigned long trampoline; |
| 129 | #endif | 137 | #endif |
| 130 | }; | 138 | }; |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 06c6faa9e5cc..28672e87e910 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
| @@ -571,40 +571,6 @@ do { \ | |||
| 571 | __trace_printk(ip, fmt, ##args); \ | 571 | __trace_printk(ip, fmt, ##args); \ |
| 572 | } while (0) | 572 | } while (0) |
| 573 | 573 | ||
| 574 | /** | ||
| 575 | * tracepoint_string - register constant persistent string to trace system | ||
| 576 | * @str - a constant persistent string that will be referenced in tracepoints | ||
| 577 | * | ||
| 578 | * If constant strings are being used in tracepoints, it is faster and | ||
| 579 | * more efficient to just save the pointer to the string and reference | ||
| 580 | * that with a printf "%s" instead of saving the string in the ring buffer | ||
| 581 | * and wasting space and time. | ||
| 582 | * | ||
| 583 | * The problem with the above approach is that userspace tools that read | ||
| 584 | * the binary output of the trace buffers do not have access to the string. | ||
| 585 | * Instead they just show the address of the string which is not very | ||
| 586 | * useful to users. | ||
| 587 | * | ||
| 588 | * With tracepoint_string(), the string will be registered to the tracing | ||
| 589 | * system and exported to userspace via the debugfs/tracing/printk_formats | ||
| 590 | * file that maps the string address to the string text. This way userspace | ||
| 591 | * tools that read the binary buffers have a way to map the pointers to | ||
| 592 | * the ASCII strings they represent. | ||
| 593 | * | ||
| 594 | * The @str used must be a constant string and persistent as it would not | ||
| 595 | * make sense to show a string that no longer exists. But it is still fine | ||
| 596 | * to be used with modules, because when modules are unloaded, if they | ||
| 597 | * had tracepoints, the ring buffers are cleared too. As long as the string | ||
| 598 | * does not change during the life of the module, it is fine to use | ||
| 599 | * tracepoint_string() within a module. | ||
| 600 | */ | ||
| 601 | #define tracepoint_string(str) \ | ||
| 602 | ({ \ | ||
| 603 | static const char *___tp_str __tracepoint_string = str; \ | ||
| 604 | ___tp_str; \ | ||
| 605 | }) | ||
| 606 | #define __tracepoint_string __attribute__((section("__tracepoint_str"))) | ||
| 607 | |||
| 608 | #ifdef CONFIG_PERF_EVENTS | 574 | #ifdef CONFIG_PERF_EVENTS |
| 609 | struct perf_event; | 575 | struct perf_event; |
| 610 | 576 | ||
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 6eb1fb37de9a..5e7219dc0fae 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
| @@ -360,7 +360,7 @@ extern unsigned long get_zeroed_page(gfp_t gfp_mask); | |||
| 360 | void *alloc_pages_exact(size_t size, gfp_t gfp_mask); | 360 | void *alloc_pages_exact(size_t size, gfp_t gfp_mask); |
| 361 | void free_pages_exact(void *virt, size_t size); | 361 | void free_pages_exact(void *virt, size_t size); |
| 362 | /* This is different from alloc_pages_exact_node !!! */ | 362 | /* This is different from alloc_pages_exact_node !!! */ |
| 363 | void *alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask); | 363 | void * __meminit alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask); |
| 364 | 364 | ||
| 365 | #define __get_free_page(gfp_mask) \ | 365 | #define __get_free_page(gfp_mask) \ |
| 366 | __get_free_pages((gfp_mask), 0) | 366 | __get_free_pages((gfp_mask), 0) |
diff --git a/include/linux/glob.h b/include/linux/glob.h new file mode 100644 index 000000000000..861d8347d08e --- /dev/null +++ b/include/linux/glob.h | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | #ifndef _LINUX_GLOB_H | ||
| 2 | #define _LINUX_GLOB_H | ||
| 3 | |||
| 4 | #include <linux/types.h> /* For bool */ | ||
| 5 | #include <linux/compiler.h> /* For __pure */ | ||
| 6 | |||
| 7 | bool __pure glob_match(char const *pat, char const *str); | ||
| 8 | |||
| 9 | #endif /* _LINUX_GLOB_H */ | ||
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index 05e53ccb708b..c7e17de732f3 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h | |||
| @@ -16,32 +16,81 @@ struct device; | |||
| 16 | */ | 16 | */ |
| 17 | struct gpio_desc; | 17 | struct gpio_desc; |
| 18 | 18 | ||
| 19 | #define GPIOD_FLAGS_BIT_DIR_SET BIT(0) | ||
| 20 | #define GPIOD_FLAGS_BIT_DIR_OUT BIT(1) | ||
| 21 | #define GPIOD_FLAGS_BIT_DIR_VAL BIT(2) | ||
| 22 | |||
| 23 | /** | ||
| 24 | * Optional flags that can be passed to one of gpiod_* to configure direction | ||
| 25 | * and output value. These values cannot be OR'd. | ||
| 26 | */ | ||
| 27 | enum gpiod_flags { | ||
| 28 | GPIOD_ASIS = 0, | ||
| 29 | GPIOD_IN = GPIOD_FLAGS_BIT_DIR_SET, | ||
| 30 | GPIOD_OUT_LOW = GPIOD_FLAGS_BIT_DIR_SET | GPIOD_FLAGS_BIT_DIR_OUT, | ||
| 31 | GPIOD_OUT_HIGH = GPIOD_FLAGS_BIT_DIR_SET | GPIOD_FLAGS_BIT_DIR_OUT | | ||
| 32 | GPIOD_FLAGS_BIT_DIR_VAL, | ||
| 33 | }; | ||
| 34 | |||
| 19 | #ifdef CONFIG_GPIOLIB | 35 | #ifdef CONFIG_GPIOLIB |
| 20 | 36 | ||
| 21 | /* Acquire and dispose GPIOs */ | 37 | /* Acquire and dispose GPIOs */ |
| 22 | struct gpio_desc *__must_check gpiod_get(struct device *dev, | 38 | struct gpio_desc *__must_check __gpiod_get(struct device *dev, |
| 23 | const char *con_id); | 39 | const char *con_id, |
| 24 | struct gpio_desc *__must_check gpiod_get_index(struct device *dev, | 40 | enum gpiod_flags flags); |
| 41 | #define __gpiod_get(dev, con_id, flags, ...) __gpiod_get(dev, con_id, flags) | ||
| 42 | #define gpiod_get(varargs...) __gpiod_get(varargs, 0) | ||
| 43 | struct gpio_desc *__must_check __gpiod_get_index(struct device *dev, | ||
| 25 | const char *con_id, | 44 | const char *con_id, |
| 26 | unsigned int idx); | 45 | unsigned int idx, |
| 27 | struct gpio_desc *__must_check gpiod_get_optional(struct device *dev, | 46 | enum gpiod_flags flags); |
| 28 | const char *con_id); | 47 | #define __gpiod_get_index(dev, con_id, index, flags, ...) \ |
| 29 | struct gpio_desc *__must_check gpiod_get_index_optional(struct device *dev, | 48 | __gpiod_get_index(dev, con_id, index, flags) |
| 49 | #define gpiod_get_index(varargs...) __gpiod_get_index(varargs, 0) | ||
| 50 | struct gpio_desc *__must_check __gpiod_get_optional(struct device *dev, | ||
| 51 | const char *con_id, | ||
| 52 | enum gpiod_flags flags); | ||
| 53 | #define __gpiod_get_optional(dev, con_id, flags, ...) \ | ||
| 54 | __gpiod_get_optional(dev, con_id, flags) | ||
| 55 | #define gpiod_get_optional(varargs...) __gpiod_get_optional(varargs, 0) | ||
| 56 | struct gpio_desc *__must_check __gpiod_get_index_optional(struct device *dev, | ||
| 30 | const char *con_id, | 57 | const char *con_id, |
| 31 | unsigned int index); | 58 | unsigned int index, |
| 59 | enum gpiod_flags flags); | ||
| 60 | #define __gpiod_get_index_optional(dev, con_id, index, flags, ...) \ | ||
| 61 | __gpiod_get_index_optional(dev, con_id, index, flags) | ||
| 62 | #define gpiod_get_index_optional(varargs...) \ | ||
| 63 | __gpiod_get_index_optional(varargs, 0) | ||
| 32 | 64 | ||
| 33 | void gpiod_put(struct gpio_desc *desc); | 65 | void gpiod_put(struct gpio_desc *desc); |
| 34 | 66 | ||
| 35 | struct gpio_desc *__must_check devm_gpiod_get(struct device *dev, | 67 | struct gpio_desc *__must_check __devm_gpiod_get(struct device *dev, |
| 36 | const char *con_id); | 68 | const char *con_id, |
| 37 | struct gpio_desc *__must_check devm_gpiod_get_index(struct device *dev, | 69 | enum gpiod_flags flags); |
| 70 | #define __devm_gpiod_get(dev, con_id, flags, ...) \ | ||
| 71 | __devm_gpiod_get(dev, con_id, flags) | ||
| 72 | #define devm_gpiod_get(varargs...) __devm_gpiod_get(varargs, 0) | ||
| 73 | struct gpio_desc *__must_check __devm_gpiod_get_index(struct device *dev, | ||
| 38 | const char *con_id, | 74 | const char *con_id, |
| 39 | unsigned int idx); | 75 | unsigned int idx, |
| 40 | struct gpio_desc *__must_check devm_gpiod_get_optional(struct device *dev, | 76 | enum gpiod_flags flags); |
| 41 | const char *con_id); | 77 | #define __devm_gpiod_get_index(dev, con_id, index, flags, ...) \ |
| 78 | __devm_gpiod_get_index(dev, con_id, index, flags) | ||
| 79 | #define devm_gpiod_get_index(varargs...) __devm_gpiod_get_index(varargs, 0) | ||
| 80 | struct gpio_desc *__must_check __devm_gpiod_get_optional(struct device *dev, | ||
| 81 | const char *con_id, | ||
| 82 | enum gpiod_flags flags); | ||
| 83 | #define __devm_gpiod_get_optional(dev, con_id, flags, ...) \ | ||
| 84 | __devm_gpiod_get_optional(dev, con_id, flags) | ||
| 85 | #define devm_gpiod_get_optional(varargs...) \ | ||
| 86 | __devm_gpiod_get_optional(varargs, 0) | ||
| 42 | struct gpio_desc *__must_check | 87 | struct gpio_desc *__must_check |
| 43 | devm_gpiod_get_index_optional(struct device *dev, const char *con_id, | 88 | __devm_gpiod_get_index_optional(struct device *dev, const char *con_id, |
| 44 | unsigned int index); | 89 | unsigned int index, enum gpiod_flags flags); |
| 90 | #define __devm_gpiod_get_index_optional(dev, con_id, index, flags, ...) \ | ||
| 91 | __devm_gpiod_get_index_optional(dev, con_id, index, flags) | ||
| 92 | #define devm_gpiod_get_index_optional(varargs...) \ | ||
| 93 | __devm_gpiod_get_index_optional(varargs, 0) | ||
| 45 | 94 | ||
| 46 | void devm_gpiod_put(struct device *dev, struct gpio_desc *desc); | 95 | void devm_gpiod_put(struct device *dev, struct gpio_desc *desc); |
| 47 | 96 | ||
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 573e4f3243d0..e78a2373e374 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h | |||
| @@ -141,73 +141,16 @@ extern const char *gpiochip_is_requested(struct gpio_chip *chip, | |||
| 141 | 141 | ||
| 142 | /* add/remove chips */ | 142 | /* add/remove chips */ |
| 143 | extern int gpiochip_add(struct gpio_chip *chip); | 143 | extern int gpiochip_add(struct gpio_chip *chip); |
| 144 | extern int __must_check gpiochip_remove(struct gpio_chip *chip); | 144 | extern int gpiochip_remove(struct gpio_chip *chip); |
| 145 | extern struct gpio_chip *gpiochip_find(void *data, | 145 | extern struct gpio_chip *gpiochip_find(void *data, |
| 146 | int (*match)(struct gpio_chip *chip, void *data)); | 146 | int (*match)(struct gpio_chip *chip, void *data)); |
| 147 | 147 | ||
| 148 | /* lock/unlock as IRQ */ | 148 | /* lock/unlock as IRQ */ |
| 149 | int gpiod_lock_as_irq(struct gpio_desc *desc); | 149 | int gpio_lock_as_irq(struct gpio_chip *chip, unsigned int offset); |
| 150 | void gpiod_unlock_as_irq(struct gpio_desc *desc); | 150 | void gpio_unlock_as_irq(struct gpio_chip *chip, unsigned int offset); |
| 151 | 151 | ||
| 152 | struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc); | 152 | struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc); |
| 153 | 153 | ||
| 154 | struct gpio_desc *gpiochip_get_desc(struct gpio_chip *chip, | ||
| 155 | u16 hwnum); | ||
| 156 | |||
| 157 | enum gpio_lookup_flags { | ||
| 158 | GPIO_ACTIVE_HIGH = (0 << 0), | ||
| 159 | GPIO_ACTIVE_LOW = (1 << 0), | ||
| 160 | GPIO_OPEN_DRAIN = (1 << 1), | ||
| 161 | GPIO_OPEN_SOURCE = (1 << 2), | ||
| 162 | }; | ||
| 163 | |||
| 164 | /** | ||
| 165 | * struct gpiod_lookup - lookup table | ||
| 166 | * @chip_label: name of the chip the GPIO belongs to | ||
| 167 | * @chip_hwnum: hardware number (i.e. relative to the chip) of the GPIO | ||
| 168 | * @con_id: name of the GPIO from the device's point of view | ||
| 169 | * @idx: index of the GPIO in case several GPIOs share the same name | ||
| 170 | * @flags: mask of GPIO_* values | ||
| 171 | * | ||
| 172 | * gpiod_lookup is a lookup table for associating GPIOs to specific devices and | ||
| 173 | * functions using platform data. | ||
| 174 | */ | ||
| 175 | struct gpiod_lookup { | ||
| 176 | const char *chip_label; | ||
| 177 | u16 chip_hwnum; | ||
| 178 | const char *con_id; | ||
| 179 | unsigned int idx; | ||
| 180 | enum gpio_lookup_flags flags; | ||
| 181 | }; | ||
| 182 | |||
| 183 | struct gpiod_lookup_table { | ||
| 184 | struct list_head list; | ||
| 185 | const char *dev_id; | ||
| 186 | struct gpiod_lookup table[]; | ||
| 187 | }; | ||
| 188 | |||
| 189 | /* | ||
| 190 | * Simple definition of a single GPIO under a con_id | ||
| 191 | */ | ||
| 192 | #define GPIO_LOOKUP(_chip_label, _chip_hwnum, _con_id, _flags) \ | ||
| 193 | GPIO_LOOKUP_IDX(_chip_label, _chip_hwnum, _con_id, 0, _flags) | ||
| 194 | |||
| 195 | /* | ||
| 196 | * Use this macro if you need to have several GPIOs under the same con_id. | ||
| 197 | * Each GPIO needs to use a different index and can be accessed using | ||
| 198 | * gpiod_get_index() | ||
| 199 | */ | ||
| 200 | #define GPIO_LOOKUP_IDX(_chip_label, _chip_hwnum, _con_id, _idx, _flags) \ | ||
| 201 | { \ | ||
| 202 | .chip_label = _chip_label, \ | ||
| 203 | .chip_hwnum = _chip_hwnum, \ | ||
| 204 | .con_id = _con_id, \ | ||
| 205 | .idx = _idx, \ | ||
| 206 | .flags = _flags, \ | ||
| 207 | } | ||
| 208 | |||
| 209 | void gpiod_add_lookup_table(struct gpiod_lookup_table *table); | ||
| 210 | |||
| 211 | #ifdef CONFIG_GPIOLIB_IRQCHIP | 154 | #ifdef CONFIG_GPIOLIB_IRQCHIP |
| 212 | 155 | ||
| 213 | void gpiochip_set_chained_irqchip(struct gpio_chip *gpiochip, | 156 | void gpiochip_set_chained_irqchip(struct gpio_chip *gpiochip, |
| @@ -223,6 +166,9 @@ int gpiochip_irqchip_add(struct gpio_chip *gpiochip, | |||
| 223 | 166 | ||
| 224 | #endif /* CONFIG_GPIO_IRQCHIP */ | 167 | #endif /* CONFIG_GPIO_IRQCHIP */ |
| 225 | 168 | ||
| 169 | int gpiochip_request_own_desc(struct gpio_desc *desc, const char *label); | ||
| 170 | void gpiochip_free_own_desc(struct gpio_desc *desc); | ||
| 171 | |||
| 226 | #else /* CONFIG_GPIOLIB */ | 172 | #else /* CONFIG_GPIOLIB */ |
| 227 | 173 | ||
| 228 | static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc) | 174 | static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc) |
diff --git a/include/linux/gpio/machine.h b/include/linux/gpio/machine.h new file mode 100644 index 000000000000..e2706140eaff --- /dev/null +++ b/include/linux/gpio/machine.h | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | #ifndef __LINUX_GPIO_MACHINE_H | ||
| 2 | #define __LINUX_GPIO_MACHINE_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | #include <linux/list.h> | ||
| 6 | |||
| 7 | enum gpio_lookup_flags { | ||
| 8 | GPIO_ACTIVE_HIGH = (0 << 0), | ||
| 9 | GPIO_ACTIVE_LOW = (1 << 0), | ||
| 10 | GPIO_OPEN_DRAIN = (1 << 1), | ||
| 11 | GPIO_OPEN_SOURCE = (1 << 2), | ||
| 12 | }; | ||
| 13 | |||
| 14 | /** | ||
| 15 | * struct gpiod_lookup - lookup table | ||
| 16 | * @chip_label: name of the chip the GPIO belongs to | ||
| 17 | * @chip_hwnum: hardware number (i.e. relative to the chip) of the GPIO | ||
| 18 | * @con_id: name of the GPIO from the device's point of view | ||
| 19 | * @idx: index of the GPIO in case several GPIOs share the same name | ||
| 20 | * @flags: mask of GPIO_* values | ||
| 21 | * | ||
| 22 | * gpiod_lookup is a lookup table for associating GPIOs to specific devices and | ||
| 23 | * functions using platform data. | ||
| 24 | */ | ||
| 25 | struct gpiod_lookup { | ||
| 26 | const char *chip_label; | ||
| 27 | u16 chip_hwnum; | ||
| 28 | const char *con_id; | ||
| 29 | unsigned int idx; | ||
| 30 | enum gpio_lookup_flags flags; | ||
| 31 | }; | ||
| 32 | |||
| 33 | struct gpiod_lookup_table { | ||
| 34 | struct list_head list; | ||
| 35 | const char *dev_id; | ||
| 36 | struct gpiod_lookup table[]; | ||
| 37 | }; | ||
| 38 | |||
| 39 | /* | ||
| 40 | * Simple definition of a single GPIO under a con_id | ||
| 41 | */ | ||
| 42 | #define GPIO_LOOKUP(_chip_label, _chip_hwnum, _con_id, _flags) \ | ||
| 43 | GPIO_LOOKUP_IDX(_chip_label, _chip_hwnum, _con_id, 0, _flags) | ||
| 44 | |||
| 45 | /* | ||
| 46 | * Use this macro if you need to have several GPIOs under the same con_id. | ||
| 47 | * Each GPIO needs to use a different index and can be accessed using | ||
| 48 | * gpiod_get_index() | ||
| 49 | */ | ||
| 50 | #define GPIO_LOOKUP_IDX(_chip_label, _chip_hwnum, _con_id, _idx, _flags) \ | ||
| 51 | { \ | ||
| 52 | .chip_label = _chip_label, \ | ||
| 53 | .chip_hwnum = _chip_hwnum, \ | ||
| 54 | .con_id = _con_id, \ | ||
| 55 | .idx = _idx, \ | ||
| 56 | .flags = _flags, \ | ||
| 57 | } | ||
| 58 | |||
| 59 | void gpiod_add_lookup_table(struct gpiod_lookup_table *table); | ||
| 60 | |||
| 61 | #endif /* __LINUX_GPIO_MACHINE_H */ | ||
diff --git a/include/linux/hid.h b/include/linux/hid.h index fca74f1d5c84..78ea9bf941cd 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
| @@ -265,6 +265,7 @@ struct hid_item { | |||
| 265 | #define HID_CONNECT_HIDDEV 0x08 | 265 | #define HID_CONNECT_HIDDEV 0x08 |
| 266 | #define HID_CONNECT_HIDDEV_FORCE 0x10 | 266 | #define HID_CONNECT_HIDDEV_FORCE 0x10 |
| 267 | #define HID_CONNECT_FF 0x20 | 267 | #define HID_CONNECT_FF 0x20 |
| 268 | #define HID_CONNECT_DRIVER 0x40 | ||
| 268 | #define HID_CONNECT_DEFAULT (HID_CONNECT_HIDINPUT|HID_CONNECT_HIDRAW| \ | 269 | #define HID_CONNECT_DEFAULT (HID_CONNECT_HIDINPUT|HID_CONNECT_HIDRAW| \ |
| 269 | HID_CONNECT_HIDDEV|HID_CONNECT_FF) | 270 | HID_CONNECT_HIDDEV|HID_CONNECT_FF) |
| 270 | 271 | ||
| @@ -287,6 +288,7 @@ struct hid_item { | |||
| 287 | #define HID_QUIRK_HIDINPUT_FORCE 0x00000080 | 288 | #define HID_QUIRK_HIDINPUT_FORCE 0x00000080 |
| 288 | #define HID_QUIRK_NO_EMPTY_INPUT 0x00000100 | 289 | #define HID_QUIRK_NO_EMPTY_INPUT 0x00000100 |
| 289 | #define HID_QUIRK_NO_INIT_INPUT_REPORTS 0x00000200 | 290 | #define HID_QUIRK_NO_INIT_INPUT_REPORTS 0x00000200 |
| 291 | #define HID_QUIRK_ALWAYS_POLL 0x00000400 | ||
| 290 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 | 292 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 |
| 291 | #define HID_QUIRK_SKIP_OUTPUT_REPORT_ID 0x00020000 | 293 | #define HID_QUIRK_SKIP_OUTPUT_REPORT_ID 0x00020000 |
| 292 | #define HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP 0x00040000 | 294 | #define HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP 0x00040000 |
| @@ -312,6 +314,11 @@ struct hid_item { | |||
| 312 | #define HID_GROUP_RMI 0x0100 | 314 | #define HID_GROUP_RMI 0x0100 |
| 313 | 315 | ||
| 314 | /* | 316 | /* |
| 317 | * Vendor specific HID device groups | ||
| 318 | */ | ||
| 319 | #define HID_GROUP_WACOM 0x0101 | ||
| 320 | |||
| 321 | /* | ||
| 315 | * This is the global environment of the parser. This information is | 322 | * This is the global environment of the parser. This information is |
| 316 | * persistent for main-items. The global environment can be saved and | 323 | * persistent for main-items. The global environment can be saved and |
| 317 | * restored with PUSH/POP statements. | 324 | * restored with PUSH/POP statements. |
| @@ -435,6 +442,7 @@ struct hid_output_fifo { | |||
| 435 | #define HID_CLAIMED_INPUT 1 | 442 | #define HID_CLAIMED_INPUT 1 |
| 436 | #define HID_CLAIMED_HIDDEV 2 | 443 | #define HID_CLAIMED_HIDDEV 2 |
| 437 | #define HID_CLAIMED_HIDRAW 4 | 444 | #define HID_CLAIMED_HIDRAW 4 |
| 445 | #define HID_CLAIMED_DRIVER 8 | ||
| 438 | 446 | ||
| 439 | #define HID_STAT_ADDED 1 | 447 | #define HID_STAT_ADDED 1 |
| 440 | #define HID_STAT_PARSED 2 | 448 | #define HID_STAT_PARSED 2 |
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 7fb31da45d03..9286a46b7d69 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
| @@ -93,7 +93,7 @@ static inline int kmap_atomic_idx_push(void) | |||
| 93 | 93 | ||
| 94 | #ifdef CONFIG_DEBUG_HIGHMEM | 94 | #ifdef CONFIG_DEBUG_HIGHMEM |
| 95 | WARN_ON_ONCE(in_irq() && !irqs_disabled()); | 95 | WARN_ON_ONCE(in_irq() && !irqs_disabled()); |
| 96 | BUG_ON(idx > KM_TYPE_NR); | 96 | BUG_ON(idx >= KM_TYPE_NR); |
| 97 | #endif | 97 | #endif |
| 98 | return idx; | 98 | return idx; |
| 99 | } | 99 | } |
diff --git a/include/linux/host1x.h b/include/linux/host1x.h index d2b52999e771..bb9840fd1e18 100644 --- a/include/linux/host1x.h +++ b/include/linux/host1x.h | |||
| @@ -164,12 +164,15 @@ int host1x_job_submit(struct host1x_job *job); | |||
| 164 | */ | 164 | */ |
| 165 | 165 | ||
| 166 | struct host1x_reloc { | 166 | struct host1x_reloc { |
| 167 | struct host1x_bo *cmdbuf; | 167 | struct { |
| 168 | u32 cmdbuf_offset; | 168 | struct host1x_bo *bo; |
| 169 | struct host1x_bo *target; | 169 | unsigned long offset; |
| 170 | u32 target_offset; | 170 | } cmdbuf; |
| 171 | u32 shift; | 171 | struct { |
| 172 | u32 pad; | 172 | struct host1x_bo *bo; |
| 173 | unsigned long offset; | ||
| 174 | } target; | ||
| 175 | unsigned long shift; | ||
| 173 | }; | 176 | }; |
| 174 | 177 | ||
| 175 | struct host1x_job { | 178 | struct host1x_job { |
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index b826239bdce0..63579cb8d3dc 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h | |||
| @@ -93,10 +93,6 @@ extern bool is_vma_temporary_stack(struct vm_area_struct *vma); | |||
| 93 | #endif /* CONFIG_DEBUG_VM */ | 93 | #endif /* CONFIG_DEBUG_VM */ |
| 94 | 94 | ||
| 95 | extern unsigned long transparent_hugepage_flags; | 95 | extern unsigned long transparent_hugepage_flags; |
| 96 | extern int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, | ||
| 97 | pmd_t *dst_pmd, pmd_t *src_pmd, | ||
| 98 | struct vm_area_struct *vma, | ||
| 99 | unsigned long addr, unsigned long end); | ||
| 100 | extern int split_huge_page_to_list(struct page *page, struct list_head *list); | 96 | extern int split_huge_page_to_list(struct page *page, struct list_head *list); |
| 101 | static inline int split_huge_page(struct page *page) | 97 | static inline int split_huge_page(struct page *page) |
| 102 | { | 98 | { |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index a23c096b3080..6e6d338641fe 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
| @@ -87,7 +87,6 @@ pte_t *huge_pmd_share(struct mm_struct *mm, unsigned long addr, pud_t *pud); | |||
| 87 | #endif | 87 | #endif |
| 88 | 88 | ||
| 89 | extern unsigned long hugepages_treat_as_movable; | 89 | extern unsigned long hugepages_treat_as_movable; |
| 90 | extern const unsigned long hugetlb_zero, hugetlb_infinity; | ||
| 91 | extern int sysctl_hugetlb_shm_group; | 90 | extern int sysctl_hugetlb_shm_group; |
| 92 | extern struct list_head huge_boot_pages; | 91 | extern struct list_head huge_boot_pages; |
| 93 | 92 | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index b556e0ab946f..a95efeb53a8b 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -577,4 +577,20 @@ static inline struct i2c_adapter *of_find_i2c_adapter_by_node(struct device_node | |||
| 577 | } | 577 | } |
| 578 | #endif /* CONFIG_OF */ | 578 | #endif /* CONFIG_OF */ |
| 579 | 579 | ||
| 580 | #ifdef CONFIG_ACPI | ||
| 581 | void acpi_i2c_register_devices(struct i2c_adapter *adap); | ||
| 582 | #else | ||
| 583 | static inline void acpi_i2c_register_devices(struct i2c_adapter *adap) { } | ||
| 584 | #endif /* CONFIG_ACPI */ | ||
| 585 | |||
| 586 | #ifdef CONFIG_ACPI_I2C_OPREGION | ||
| 587 | int acpi_i2c_install_space_handler(struct i2c_adapter *adapter); | ||
| 588 | void acpi_i2c_remove_space_handler(struct i2c_adapter *adapter); | ||
| 589 | #else | ||
| 590 | static inline void acpi_i2c_remove_space_handler(struct i2c_adapter *adapter) | ||
| 591 | { } | ||
| 592 | static inline int acpi_i2c_install_space_handler(struct i2c_adapter *adapter) | ||
| 593 | { return 0; } | ||
| 594 | #endif /* CONFIG_ACPI_I2C_OPREGION */ | ||
| 595 | |||
| 580 | #endif /* _LINUX_I2C_H */ | 596 | #endif /* _LINUX_I2C_H */ |
diff --git a/include/linux/i2c/atmel_mxt_ts.h b/include/linux/i2c/atmel_mxt_ts.h index 3891dc1de21c..02bf6ea31701 100644 --- a/include/linux/i2c/atmel_mxt_ts.h +++ b/include/linux/i2c/atmel_mxt_ts.h | |||
| @@ -17,9 +17,6 @@ | |||
| 17 | 17 | ||
| 18 | /* The platform data for the Atmel maXTouch touchscreen driver */ | 18 | /* The platform data for the Atmel maXTouch touchscreen driver */ |
| 19 | struct mxt_platform_data { | 19 | struct mxt_platform_data { |
| 20 | const u8 *config; | ||
| 21 | size_t config_length; | ||
| 22 | u32 config_crc; | ||
| 23 | unsigned long irqflags; | 20 | unsigned long irqflags; |
| 24 | u8 t19_num_keys; | 21 | u8 t19_num_keys; |
| 25 | const unsigned int *t19_keymap; | 22 | const unsigned int *t19_keymap; |
diff --git a/include/linux/i2c/s6000.h b/include/linux/i2c/s6000.h deleted file mode 100644 index d9b34bfdae76..000000000000 --- a/include/linux/i2c/s6000.h +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | #ifndef __LINUX_I2C_S6000_H | ||
| 2 | #define __LINUX_I2C_S6000_H | ||
| 3 | |||
| 4 | struct s6_i2c_platform_data { | ||
| 5 | const char *clock; /* the clock to use */ | ||
| 6 | int bus_num; /* the bus number to register */ | ||
| 7 | }; | ||
| 8 | |||
| 9 | #endif | ||
| 10 | |||
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 4967916fe4ac..d69f0577a319 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
| @@ -187,7 +187,6 @@ vlan_dev_get_egress_qos_mask(struct net_device *dev, u32 skprio) | |||
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | extern bool vlan_do_receive(struct sk_buff **skb); | 189 | extern bool vlan_do_receive(struct sk_buff **skb); |
| 190 | extern struct sk_buff *vlan_untag(struct sk_buff *skb); | ||
| 191 | 190 | ||
| 192 | extern int vlan_vid_add(struct net_device *dev, __be16 proto, u16 vid); | 191 | extern int vlan_vid_add(struct net_device *dev, __be16 proto, u16 vid); |
| 193 | extern void vlan_vid_del(struct net_device *dev, __be16 proto, u16 vid); | 192 | extern void vlan_vid_del(struct net_device *dev, __be16 proto, u16 vid); |
| @@ -241,11 +240,6 @@ static inline bool vlan_do_receive(struct sk_buff **skb) | |||
| 241 | return false; | 240 | return false; |
| 242 | } | 241 | } |
| 243 | 242 | ||
| 244 | static inline struct sk_buff *vlan_untag(struct sk_buff *skb) | ||
| 245 | { | ||
| 246 | return skb; | ||
| 247 | } | ||
| 248 | |||
| 249 | static inline int vlan_vid_add(struct net_device *dev, __be16 proto, u16 vid) | 243 | static inline int vlan_vid_add(struct net_device *dev, __be16 proto, u16 vid) |
| 250 | { | 244 | { |
| 251 | return 0; | 245 | return 0; |
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h index 1b1dfa80d9ff..f583ff639776 100644 --- a/include/linux/input/mt.h +++ b/include/linux/input/mt.h | |||
| @@ -105,6 +105,7 @@ void input_mt_report_slot_state(struct input_dev *dev, | |||
| 105 | 105 | ||
| 106 | void input_mt_report_finger_count(struct input_dev *dev, int count); | 106 | void input_mt_report_finger_count(struct input_dev *dev, int count); |
| 107 | void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count); | 107 | void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count); |
| 108 | void input_mt_drop_unused(struct input_dev *dev); | ||
| 108 | 109 | ||
| 109 | void input_mt_sync_frame(struct input_dev *dev); | 110 | void input_mt_sync_frame(struct input_dev *dev); |
| 110 | 111 | ||
diff --git a/include/linux/input/pixcir_ts.h b/include/linux/input/pixcir_ts.h index 160cf353aa39..7bae83b7c396 100644 --- a/include/linux/input/pixcir_ts.h +++ b/include/linux/input/pixcir_ts.h | |||
| @@ -43,10 +43,22 @@ enum pixcir_int_mode { | |||
| 43 | #define PIXCIR_INT_ENABLE (1UL << 3) | 43 | #define PIXCIR_INT_ENABLE (1UL << 3) |
| 44 | #define PIXCIR_INT_POL_HIGH (1UL << 2) | 44 | #define PIXCIR_INT_POL_HIGH (1UL << 2) |
| 45 | 45 | ||
| 46 | /** | ||
| 47 | * struct pixcir_irc_chip_data - chip related data | ||
| 48 | * @max_fingers: Max number of fingers reported simultaneously by h/w | ||
| 49 | * @has_hw_ids: Hardware supports finger tracking IDs | ||
| 50 | * | ||
| 51 | */ | ||
| 52 | struct pixcir_i2c_chip_data { | ||
| 53 | u8 max_fingers; | ||
| 54 | bool has_hw_ids; | ||
| 55 | }; | ||
| 56 | |||
| 46 | struct pixcir_ts_platform_data { | 57 | struct pixcir_ts_platform_data { |
| 47 | int x_max; | 58 | int x_max; |
| 48 | int y_max; | 59 | int y_max; |
| 49 | int gpio_attb; /* GPIO connected to ATTB line */ | 60 | int gpio_attb; /* GPIO connected to ATTB line */ |
| 61 | struct pixcir_i2c_chip_data chip; | ||
| 50 | }; | 62 | }; |
| 51 | 63 | ||
| 52 | #endif | 64 | #endif |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 5e3a906cc089..142ec544167c 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
| @@ -237,6 +237,12 @@ extern int iomem_is_exclusive(u64 addr); | |||
| 237 | extern int | 237 | extern int |
| 238 | walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages, | 238 | walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages, |
| 239 | void *arg, int (*func)(unsigned long, unsigned long, void *)); | 239 | void *arg, int (*func)(unsigned long, unsigned long, void *)); |
| 240 | extern int | ||
| 241 | walk_system_ram_res(u64 start, u64 end, void *arg, | ||
| 242 | int (*func)(u64, u64, void *)); | ||
| 243 | extern int | ||
| 244 | walk_iomem_res(char *name, unsigned long flags, u64 start, u64 end, void *arg, | ||
| 245 | int (*func)(u64, u64, void *)); | ||
| 240 | 246 | ||
| 241 | /* True if any part of r1 overlaps r2 */ | 247 | /* True if any part of r1 overlaps r2 */ |
| 242 | static inline bool resource_overlaps(struct resource *r1, struct resource *r2) | 248 | static inline bool resource_overlaps(struct resource *r1, struct resource *r2) |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index a9e2268ecccb..95624bed87ef 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -470,6 +470,7 @@ extern enum system_states { | |||
| 470 | #define TAINT_FIRMWARE_WORKAROUND 11 | 470 | #define TAINT_FIRMWARE_WORKAROUND 11 |
| 471 | #define TAINT_OOT_MODULE 12 | 471 | #define TAINT_OOT_MODULE 12 |
| 472 | #define TAINT_UNSIGNED_MODULE 13 | 472 | #define TAINT_UNSIGNED_MODULE 13 |
| 473 | #define TAINT_SOFTLOCKUP 14 | ||
| 473 | 474 | ||
| 474 | extern const char hex_asc[]; | 475 | extern const char hex_asc[]; |
| 475 | #define hex_asc_lo(x) hex_asc[((x) & 0x0f)] | 476 | #define hex_asc_lo(x) hex_asc[((x) & 0x0f)] |
| @@ -493,11 +494,6 @@ static inline char *hex_byte_pack_upper(char *buf, u8 byte) | |||
| 493 | return buf; | 494 | return buf; |
| 494 | } | 495 | } |
| 495 | 496 | ||
| 496 | static inline char * __deprecated pack_hex_byte(char *buf, u8 byte) | ||
| 497 | { | ||
| 498 | return hex_byte_pack(buf, byte); | ||
| 499 | } | ||
| 500 | |||
| 501 | extern int hex_to_bin(char ch); | 497 | extern int hex_to_bin(char ch); |
| 502 | extern int __must_check hex2bin(u8 *dst, const char *src, size_t count); | 498 | extern int __must_check hex2bin(u8 *dst, const char *src, size_t count); |
| 503 | 499 | ||
| @@ -849,5 +845,7 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
| 849 | /* User perms >= group perms >= other perms */ \ | 845 | /* User perms >= group perms >= other perms */ \ |
| 850 | BUILD_BUG_ON_ZERO(((perms) >> 6) < (((perms) >> 3) & 7)) + \ | 846 | BUILD_BUG_ON_ZERO(((perms) >> 6) < (((perms) >> 3) & 7)) + \ |
| 851 | BUILD_BUG_ON_ZERO((((perms) >> 3) & 7) < ((perms) & 7)) + \ | 847 | BUILD_BUG_ON_ZERO((((perms) >> 3) & 7) < ((perms) & 7)) + \ |
| 848 | /* Other writable? Generally considered a bad idea. */ \ | ||
| 849 | BUILD_BUG_ON_ZERO((perms) & 2) + \ | ||
| 852 | (perms)) | 850 | (perms)) |
| 853 | #endif | 851 | #endif |
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index a75641930049..4b2a0e11cc5b 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include <linux/ioport.h> | 10 | #include <linux/ioport.h> |
| 11 | #include <linux/elfcore.h> | 11 | #include <linux/elfcore.h> |
| 12 | #include <linux/elf.h> | 12 | #include <linux/elf.h> |
| 13 | #include <linux/module.h> | ||
| 13 | #include <asm/kexec.h> | 14 | #include <asm/kexec.h> |
| 14 | 15 | ||
| 15 | /* Verify architecture specific macros are defined */ | 16 | /* Verify architecture specific macros are defined */ |
| @@ -69,7 +70,18 @@ typedef unsigned long kimage_entry_t; | |||
| 69 | #define IND_SOURCE 0x8 | 70 | #define IND_SOURCE 0x8 |
| 70 | 71 | ||
| 71 | struct kexec_segment { | 72 | struct kexec_segment { |
| 72 | void __user *buf; | 73 | /* |
| 74 | * This pointer can point to user memory if kexec_load() system | ||
| 75 | * call is used or will point to kernel memory if | ||
| 76 | * kexec_file_load() system call is used. | ||
| 77 | * | ||
| 78 | * Use ->buf when expecting to deal with user memory and use ->kbuf | ||
| 79 | * when expecting to deal with kernel memory. | ||
| 80 | */ | ||
| 81 | union { | ||
| 82 | void __user *buf; | ||
| 83 | void *kbuf; | ||
| 84 | }; | ||
| 73 | size_t bufsz; | 85 | size_t bufsz; |
| 74 | unsigned long mem; | 86 | unsigned long mem; |
| 75 | size_t memsz; | 87 | size_t memsz; |
| @@ -84,6 +96,27 @@ struct compat_kexec_segment { | |||
| 84 | }; | 96 | }; |
| 85 | #endif | 97 | #endif |
| 86 | 98 | ||
| 99 | struct kexec_sha_region { | ||
| 100 | unsigned long start; | ||
| 101 | unsigned long len; | ||
| 102 | }; | ||
| 103 | |||
| 104 | struct purgatory_info { | ||
| 105 | /* Pointer to elf header of read only purgatory */ | ||
| 106 | Elf_Ehdr *ehdr; | ||
| 107 | |||
| 108 | /* Pointer to purgatory sechdrs which are modifiable */ | ||
| 109 | Elf_Shdr *sechdrs; | ||
| 110 | /* | ||
| 111 | * Temporary buffer location where purgatory is loaded and relocated | ||
| 112 | * This memory can be freed post image load | ||
| 113 | */ | ||
| 114 | void *purgatory_buf; | ||
| 115 | |||
| 116 | /* Address where purgatory is finally loaded and is executed from */ | ||
| 117 | unsigned long purgatory_load_addr; | ||
| 118 | }; | ||
| 119 | |||
| 87 | struct kimage { | 120 | struct kimage { |
| 88 | kimage_entry_t head; | 121 | kimage_entry_t head; |
| 89 | kimage_entry_t *entry; | 122 | kimage_entry_t *entry; |
| @@ -100,7 +133,7 @@ struct kimage { | |||
| 100 | 133 | ||
| 101 | struct list_head control_pages; | 134 | struct list_head control_pages; |
| 102 | struct list_head dest_pages; | 135 | struct list_head dest_pages; |
| 103 | struct list_head unuseable_pages; | 136 | struct list_head unusable_pages; |
| 104 | 137 | ||
| 105 | /* Address of next control page to allocate for crash kernels. */ | 138 | /* Address of next control page to allocate for crash kernels. */ |
| 106 | unsigned long control_page; | 139 | unsigned long control_page; |
| @@ -110,13 +143,63 @@ struct kimage { | |||
| 110 | #define KEXEC_TYPE_DEFAULT 0 | 143 | #define KEXEC_TYPE_DEFAULT 0 |
| 111 | #define KEXEC_TYPE_CRASH 1 | 144 | #define KEXEC_TYPE_CRASH 1 |
| 112 | unsigned int preserve_context : 1; | 145 | unsigned int preserve_context : 1; |
| 146 | /* If set, we are using file mode kexec syscall */ | ||
| 147 | unsigned int file_mode:1; | ||
| 113 | 148 | ||
| 114 | #ifdef ARCH_HAS_KIMAGE_ARCH | 149 | #ifdef ARCH_HAS_KIMAGE_ARCH |
| 115 | struct kimage_arch arch; | 150 | struct kimage_arch arch; |
| 116 | #endif | 151 | #endif |
| 152 | |||
| 153 | /* Additional fields for file based kexec syscall */ | ||
| 154 | void *kernel_buf; | ||
| 155 | unsigned long kernel_buf_len; | ||
| 156 | |||
| 157 | void *initrd_buf; | ||
| 158 | unsigned long initrd_buf_len; | ||
| 159 | |||
| 160 | char *cmdline_buf; | ||
| 161 | unsigned long cmdline_buf_len; | ||
| 162 | |||
| 163 | /* File operations provided by image loader */ | ||
| 164 | struct kexec_file_ops *fops; | ||
| 165 | |||
| 166 | /* Image loader handling the kernel can store a pointer here */ | ||
| 167 | void *image_loader_data; | ||
| 168 | |||
| 169 | /* Information for loading purgatory */ | ||
| 170 | struct purgatory_info purgatory_info; | ||
| 117 | }; | 171 | }; |
| 118 | 172 | ||
| 173 | /* | ||
| 174 | * Keeps track of buffer parameters as provided by caller for requesting | ||
| 175 | * memory placement of buffer. | ||
| 176 | */ | ||
| 177 | struct kexec_buf { | ||
| 178 | struct kimage *image; | ||
| 179 | char *buffer; | ||
| 180 | unsigned long bufsz; | ||
| 181 | unsigned long memsz; | ||
| 182 | unsigned long buf_align; | ||
| 183 | unsigned long buf_min; | ||
| 184 | unsigned long buf_max; | ||
| 185 | bool top_down; /* allocate from top of memory hole */ | ||
| 186 | }; | ||
| 119 | 187 | ||
| 188 | typedef int (kexec_probe_t)(const char *kernel_buf, unsigned long kernel_size); | ||
| 189 | typedef void *(kexec_load_t)(struct kimage *image, char *kernel_buf, | ||
| 190 | unsigned long kernel_len, char *initrd, | ||
| 191 | unsigned long initrd_len, char *cmdline, | ||
| 192 | unsigned long cmdline_len); | ||
| 193 | typedef int (kexec_cleanup_t)(void *loader_data); | ||
| 194 | typedef int (kexec_verify_sig_t)(const char *kernel_buf, | ||
| 195 | unsigned long kernel_len); | ||
| 196 | |||
| 197 | struct kexec_file_ops { | ||
| 198 | kexec_probe_t *probe; | ||
| 199 | kexec_load_t *load; | ||
| 200 | kexec_cleanup_t *cleanup; | ||
| 201 | kexec_verify_sig_t *verify_sig; | ||
| 202 | }; | ||
| 120 | 203 | ||
| 121 | /* kexec interface functions */ | 204 | /* kexec interface functions */ |
| 122 | extern void machine_kexec(struct kimage *image); | 205 | extern void machine_kexec(struct kimage *image); |
| @@ -127,8 +210,21 @@ extern asmlinkage long sys_kexec_load(unsigned long entry, | |||
| 127 | struct kexec_segment __user *segments, | 210 | struct kexec_segment __user *segments, |
| 128 | unsigned long flags); | 211 | unsigned long flags); |
| 129 | extern int kernel_kexec(void); | 212 | extern int kernel_kexec(void); |
| 213 | extern int kexec_add_buffer(struct kimage *image, char *buffer, | ||
| 214 | unsigned long bufsz, unsigned long memsz, | ||
| 215 | unsigned long buf_align, unsigned long buf_min, | ||
| 216 | unsigned long buf_max, bool top_down, | ||
| 217 | unsigned long *load_addr); | ||
| 130 | extern struct page *kimage_alloc_control_pages(struct kimage *image, | 218 | extern struct page *kimage_alloc_control_pages(struct kimage *image, |
| 131 | unsigned int order); | 219 | unsigned int order); |
| 220 | extern int kexec_load_purgatory(struct kimage *image, unsigned long min, | ||
| 221 | unsigned long max, int top_down, | ||
| 222 | unsigned long *load_addr); | ||
| 223 | extern int kexec_purgatory_get_set_symbol(struct kimage *image, | ||
| 224 | const char *name, void *buf, | ||
| 225 | unsigned int size, bool get_value); | ||
| 226 | extern void *kexec_purgatory_get_symbol_addr(struct kimage *image, | ||
| 227 | const char *name); | ||
| 132 | extern void crash_kexec(struct pt_regs *); | 228 | extern void crash_kexec(struct pt_regs *); |
| 133 | int kexec_should_crash(struct task_struct *); | 229 | int kexec_should_crash(struct task_struct *); |
| 134 | void crash_save_cpu(struct pt_regs *regs, int cpu); | 230 | void crash_save_cpu(struct pt_regs *regs, int cpu); |
| @@ -177,6 +273,10 @@ extern int kexec_load_disabled; | |||
| 177 | #define KEXEC_FLAGS (KEXEC_ON_CRASH | KEXEC_PRESERVE_CONTEXT) | 273 | #define KEXEC_FLAGS (KEXEC_ON_CRASH | KEXEC_PRESERVE_CONTEXT) |
| 178 | #endif | 274 | #endif |
| 179 | 275 | ||
| 276 | /* List of defined/legal kexec file flags */ | ||
| 277 | #define KEXEC_FILE_FLAGS (KEXEC_FILE_UNLOAD | KEXEC_FILE_ON_CRASH | \ | ||
| 278 | KEXEC_FILE_NO_INITRAMFS) | ||
| 279 | |||
| 180 | #define VMCOREINFO_BYTES (4096) | 280 | #define VMCOREINFO_BYTES (4096) |
| 181 | #define VMCOREINFO_NOTE_NAME "VMCOREINFO" | 281 | #define VMCOREINFO_NOTE_NAME "VMCOREINFO" |
| 182 | #define VMCOREINFO_NOTE_NAME_BYTES ALIGN(sizeof(VMCOREINFO_NOTE_NAME), 4) | 282 | #define VMCOREINFO_NOTE_NAME_BYTES ALIGN(sizeof(VMCOREINFO_NOTE_NAME), 4) |
diff --git a/include/linux/klist.h b/include/linux/klist.h index a370ce57cf1d..61e5b723ae73 100644 --- a/include/linux/klist.h +++ b/include/linux/klist.h | |||
| @@ -44,7 +44,7 @@ struct klist_node { | |||
| 44 | 44 | ||
| 45 | extern void klist_add_tail(struct klist_node *n, struct klist *k); | 45 | extern void klist_add_tail(struct klist_node *n, struct klist *k); |
| 46 | extern void klist_add_head(struct klist_node *n, struct klist *k); | 46 | extern void klist_add_head(struct klist_node *n, struct klist *k); |
| 47 | extern void klist_add_after(struct klist_node *n, struct klist_node *pos); | 47 | extern void klist_add_behind(struct klist_node *n, struct klist_node *pos); |
| 48 | extern void klist_add_before(struct klist_node *n, struct klist_node *pos); | 48 | extern void klist_add_before(struct klist_node *n, struct klist_node *pos); |
| 49 | 49 | ||
| 50 | extern void klist_del(struct klist_node *n); | 50 | extern void klist_del(struct klist_node *n); |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index ec4e3bd83d47..a4c33b34fe3f 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -325,24 +325,7 @@ struct kvm_kernel_irq_routing_entry { | |||
| 325 | struct hlist_node link; | 325 | struct hlist_node link; |
| 326 | }; | 326 | }; |
| 327 | 327 | ||
| 328 | #ifdef CONFIG_HAVE_KVM_IRQ_ROUTING | 328 | struct kvm_irq_routing_table; |
| 329 | |||
| 330 | struct kvm_irq_routing_table { | ||
| 331 | int chip[KVM_NR_IRQCHIPS][KVM_IRQCHIP_NUM_PINS]; | ||
| 332 | struct kvm_kernel_irq_routing_entry *rt_entries; | ||
| 333 | u32 nr_rt_entries; | ||
| 334 | /* | ||
| 335 | * Array indexed by gsi. Each entry contains list of irq chips | ||
| 336 | * the gsi is connected to. | ||
| 337 | */ | ||
| 338 | struct hlist_head map[0]; | ||
| 339 | }; | ||
| 340 | |||
| 341 | #else | ||
| 342 | |||
| 343 | struct kvm_irq_routing_table {}; | ||
| 344 | |||
| 345 | #endif | ||
| 346 | 329 | ||
| 347 | #ifndef KVM_PRIVATE_MEM_SLOTS | 330 | #ifndef KVM_PRIVATE_MEM_SLOTS |
| 348 | #define KVM_PRIVATE_MEM_SLOTS 0 | 331 | #define KVM_PRIVATE_MEM_SLOTS 0 |
| @@ -401,11 +384,12 @@ struct kvm { | |||
| 401 | struct mutex irq_lock; | 384 | struct mutex irq_lock; |
| 402 | #ifdef CONFIG_HAVE_KVM_IRQCHIP | 385 | #ifdef CONFIG_HAVE_KVM_IRQCHIP |
| 403 | /* | 386 | /* |
| 404 | * Update side is protected by irq_lock and, | 387 | * Update side is protected by irq_lock. |
| 405 | * if configured, irqfds.lock. | ||
| 406 | */ | 388 | */ |
| 407 | struct kvm_irq_routing_table __rcu *irq_routing; | 389 | struct kvm_irq_routing_table __rcu *irq_routing; |
| 408 | struct hlist_head mask_notifier_list; | 390 | struct hlist_head mask_notifier_list; |
| 391 | #endif | ||
| 392 | #ifdef CONFIG_HAVE_KVM_IRQFD | ||
| 409 | struct hlist_head irq_ack_notifier_list; | 393 | struct hlist_head irq_ack_notifier_list; |
| 410 | #endif | 394 | #endif |
| 411 | 395 | ||
| @@ -455,7 +439,7 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vcpu); | |||
| 455 | int __must_check vcpu_load(struct kvm_vcpu *vcpu); | 439 | int __must_check vcpu_load(struct kvm_vcpu *vcpu); |
| 456 | void vcpu_put(struct kvm_vcpu *vcpu); | 440 | void vcpu_put(struct kvm_vcpu *vcpu); |
| 457 | 441 | ||
| 458 | #ifdef CONFIG_HAVE_KVM_IRQ_ROUTING | 442 | #ifdef CONFIG_HAVE_KVM_IRQFD |
| 459 | int kvm_irqfd_init(void); | 443 | int kvm_irqfd_init(void); |
| 460 | void kvm_irqfd_exit(void); | 444 | void kvm_irqfd_exit(void); |
| 461 | #else | 445 | #else |
| @@ -602,7 +586,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp, | |||
| 602 | unsigned int ioctl, unsigned long arg); | 586 | unsigned int ioctl, unsigned long arg); |
| 603 | int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf); | 587 | int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf); |
| 604 | 588 | ||
| 605 | int kvm_dev_ioctl_check_extension(long ext); | 589 | int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext); |
| 606 | 590 | ||
| 607 | int kvm_get_dirty_log(struct kvm *kvm, | 591 | int kvm_get_dirty_log(struct kvm *kvm, |
| 608 | struct kvm_dirty_log *log, int *is_dirty); | 592 | struct kvm_dirty_log *log, int *is_dirty); |
| @@ -752,6 +736,10 @@ void kvm_unregister_irq_mask_notifier(struct kvm *kvm, int irq, | |||
| 752 | void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned irqchip, unsigned pin, | 736 | void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned irqchip, unsigned pin, |
| 753 | bool mask); | 737 | bool mask); |
| 754 | 738 | ||
| 739 | int kvm_irq_map_gsi(struct kvm *kvm, | ||
| 740 | struct kvm_kernel_irq_routing_entry *entries, int gsi); | ||
| 741 | int kvm_irq_map_chip_pin(struct kvm *kvm, unsigned irqchip, unsigned pin); | ||
| 742 | |||
| 755 | int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level, | 743 | int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level, |
| 756 | bool line_status); | 744 | bool line_status); |
| 757 | int kvm_set_irq_inatomic(struct kvm *kvm, int irq_source_id, u32 irq, int level); | 745 | int kvm_set_irq_inatomic(struct kvm *kvm, int irq_source_id, u32 irq, int level); |
| @@ -942,28 +930,27 @@ int kvm_set_irq_routing(struct kvm *kvm, | |||
| 942 | const struct kvm_irq_routing_entry *entries, | 930 | const struct kvm_irq_routing_entry *entries, |
| 943 | unsigned nr, | 931 | unsigned nr, |
| 944 | unsigned flags); | 932 | unsigned flags); |
| 945 | int kvm_set_routing_entry(struct kvm_irq_routing_table *rt, | 933 | int kvm_set_routing_entry(struct kvm_kernel_irq_routing_entry *e, |
| 946 | struct kvm_kernel_irq_routing_entry *e, | ||
| 947 | const struct kvm_irq_routing_entry *ue); | 934 | const struct kvm_irq_routing_entry *ue); |
| 948 | void kvm_free_irq_routing(struct kvm *kvm); | 935 | void kvm_free_irq_routing(struct kvm *kvm); |
| 949 | 936 | ||
| 950 | int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi); | ||
| 951 | |||
| 952 | #else | 937 | #else |
| 953 | 938 | ||
| 954 | static inline void kvm_free_irq_routing(struct kvm *kvm) {} | 939 | static inline void kvm_free_irq_routing(struct kvm *kvm) {} |
| 955 | 940 | ||
| 956 | #endif | 941 | #endif |
| 957 | 942 | ||
| 943 | int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi); | ||
| 944 | |||
| 958 | #ifdef CONFIG_HAVE_KVM_EVENTFD | 945 | #ifdef CONFIG_HAVE_KVM_EVENTFD |
| 959 | 946 | ||
| 960 | void kvm_eventfd_init(struct kvm *kvm); | 947 | void kvm_eventfd_init(struct kvm *kvm); |
| 961 | int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args); | 948 | int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args); |
| 962 | 949 | ||
| 963 | #ifdef CONFIG_HAVE_KVM_IRQCHIP | 950 | #ifdef CONFIG_HAVE_KVM_IRQFD |
| 964 | int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args); | 951 | int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args); |
| 965 | void kvm_irqfd_release(struct kvm *kvm); | 952 | void kvm_irqfd_release(struct kvm *kvm); |
| 966 | void kvm_irq_routing_update(struct kvm *, struct kvm_irq_routing_table *); | 953 | void kvm_irq_routing_update(struct kvm *); |
| 967 | #else | 954 | #else |
| 968 | static inline int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args) | 955 | static inline int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args) |
| 969 | { | 956 | { |
| @@ -985,10 +972,8 @@ static inline int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args) | |||
| 985 | static inline void kvm_irqfd_release(struct kvm *kvm) {} | 972 | static inline void kvm_irqfd_release(struct kvm *kvm) {} |
| 986 | 973 | ||
| 987 | #ifdef CONFIG_HAVE_KVM_IRQCHIP | 974 | #ifdef CONFIG_HAVE_KVM_IRQCHIP |
| 988 | static inline void kvm_irq_routing_update(struct kvm *kvm, | 975 | static inline void kvm_irq_routing_update(struct kvm *kvm) |
| 989 | struct kvm_irq_routing_table *irq_rt) | ||
| 990 | { | 976 | { |
| 991 | rcu_assign_pointer(kvm->irq_routing, irq_rt); | ||
| 992 | } | 977 | } |
| 993 | #endif | 978 | #endif |
| 994 | 979 | ||
diff --git a/include/linux/leds.h b/include/linux/leds.h index 0287ab296689..6a599dce7f9d 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
| 16 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
| 17 | #include <linux/rwsem.h> | 17 | #include <linux/rwsem.h> |
| 18 | #include <linux/timer.h> | ||
| 19 | #include <linux/workqueue.h> | 18 | #include <linux/workqueue.h> |
| 20 | 19 | ||
| 21 | struct device; | 20 | struct device; |
| @@ -63,11 +62,13 @@ struct led_classdev { | |||
| 63 | unsigned long *delay_off); | 62 | unsigned long *delay_off); |
| 64 | 63 | ||
| 65 | struct device *dev; | 64 | struct device *dev; |
| 65 | const struct attribute_group **groups; | ||
| 66 | |||
| 66 | struct list_head node; /* LED Device list */ | 67 | struct list_head node; /* LED Device list */ |
| 67 | const char *default_trigger; /* Trigger to use */ | 68 | const char *default_trigger; /* Trigger to use */ |
| 68 | 69 | ||
| 69 | unsigned long blink_delay_on, blink_delay_off; | 70 | unsigned long blink_delay_on, blink_delay_off; |
| 70 | struct timer_list blink_timer; | 71 | struct delayed_work blink_work; |
| 71 | int blink_brightness; | 72 | int blink_brightness; |
| 72 | 73 | ||
| 73 | struct work_struct set_brightness_work; | 74 | struct work_struct set_brightness_work; |
diff --git a/include/linux/list.h b/include/linux/list.h index ef9594171062..cbbb96fcead9 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
| @@ -654,15 +654,15 @@ static inline void hlist_add_before(struct hlist_node *n, | |||
| 654 | *(n->pprev) = n; | 654 | *(n->pprev) = n; |
| 655 | } | 655 | } |
| 656 | 656 | ||
| 657 | static inline void hlist_add_after(struct hlist_node *n, | 657 | static inline void hlist_add_behind(struct hlist_node *n, |
| 658 | struct hlist_node *next) | 658 | struct hlist_node *prev) |
| 659 | { | 659 | { |
| 660 | next->next = n->next; | 660 | n->next = prev->next; |
| 661 | n->next = next; | 661 | prev->next = n; |
| 662 | next->pprev = &n->next; | 662 | n->pprev = &prev->next; |
| 663 | 663 | ||
| 664 | if(next->next) | 664 | if (n->next) |
| 665 | next->next->pprev = &next->next; | 665 | n->next->pprev = &n->next; |
| 666 | } | 666 | } |
| 667 | 667 | ||
| 668 | /* after that we'll appear to be on some hlist and hlist_del will work */ | 668 | /* after that we'll appear to be on some hlist and hlist_del will work */ |
diff --git a/include/linux/memblock.h b/include/linux/memblock.h index b660e05b63d4..e8cc45307f8f 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h | |||
| @@ -249,7 +249,7 @@ phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align); | |||
| 249 | /* | 249 | /* |
| 250 | * Set the allocation direction to bottom-up or top-down. | 250 | * Set the allocation direction to bottom-up or top-down. |
| 251 | */ | 251 | */ |
| 252 | static inline void memblock_set_bottom_up(bool enable) | 252 | static inline void __init memblock_set_bottom_up(bool enable) |
| 253 | { | 253 | { |
| 254 | memblock.bottom_up = enable; | 254 | memblock.bottom_up = enable; |
| 255 | } | 255 | } |
| @@ -264,7 +264,7 @@ static inline bool memblock_bottom_up(void) | |||
| 264 | return memblock.bottom_up; | 264 | return memblock.bottom_up; |
| 265 | } | 265 | } |
| 266 | #else | 266 | #else |
| 267 | static inline void memblock_set_bottom_up(bool enable) {} | 267 | static inline void __init memblock_set_bottom_up(bool enable) {} |
| 268 | static inline bool memblock_bottom_up(void) { return false; } | 268 | static inline bool memblock_bottom_up(void) { return false; } |
| 269 | #endif | 269 | #endif |
| 270 | 270 | ||
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index eb65d29516ca..e0752d204d9e 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -54,39 +54,20 @@ struct mem_cgroup_reclaim_cookie { | |||
| 54 | }; | 54 | }; |
| 55 | 55 | ||
| 56 | #ifdef CONFIG_MEMCG | 56 | #ifdef CONFIG_MEMCG |
| 57 | /* | 57 | int mem_cgroup_try_charge(struct page *page, struct mm_struct *mm, |
| 58 | * All "charge" functions with gfp_mask should use GFP_KERNEL or | 58 | gfp_t gfp_mask, struct mem_cgroup **memcgp); |
| 59 | * (gfp_mask & GFP_RECLAIM_MASK). In current implementatin, memcg doesn't | 59 | void mem_cgroup_commit_charge(struct page *page, struct mem_cgroup *memcg, |
| 60 | * alloc memory but reclaims memory from all available zones. So, "where I want | 60 | bool lrucare); |
| 61 | * memory from" bits of gfp_mask has no meaning. So any bits of that field is | 61 | void mem_cgroup_cancel_charge(struct page *page, struct mem_cgroup *memcg); |
| 62 | * available but adding a rule is better. charge functions' gfp_mask should | 62 | void mem_cgroup_uncharge(struct page *page); |
| 63 | * be set to GFP_KERNEL or gfp_mask & GFP_RECLAIM_MASK for avoiding ambiguous | 63 | void mem_cgroup_uncharge_list(struct list_head *page_list); |
| 64 | * codes. | ||
| 65 | * (Of course, if memcg does memory allocation in future, GFP_KERNEL is sane.) | ||
| 66 | */ | ||
| 67 | 64 | ||
| 68 | extern int mem_cgroup_charge_anon(struct page *page, struct mm_struct *mm, | 65 | void mem_cgroup_migrate(struct page *oldpage, struct page *newpage, |
| 69 | gfp_t gfp_mask); | 66 | bool lrucare); |
| 70 | /* for swap handling */ | ||
| 71 | extern int mem_cgroup_try_charge_swapin(struct mm_struct *mm, | ||
| 72 | struct page *page, gfp_t mask, struct mem_cgroup **memcgp); | ||
| 73 | extern void mem_cgroup_commit_charge_swapin(struct page *page, | ||
| 74 | struct mem_cgroup *memcg); | ||
| 75 | extern void mem_cgroup_cancel_charge_swapin(struct mem_cgroup *memcg); | ||
| 76 | |||
| 77 | extern int mem_cgroup_charge_file(struct page *page, struct mm_struct *mm, | ||
| 78 | gfp_t gfp_mask); | ||
| 79 | 67 | ||
| 80 | struct lruvec *mem_cgroup_zone_lruvec(struct zone *, struct mem_cgroup *); | 68 | struct lruvec *mem_cgroup_zone_lruvec(struct zone *, struct mem_cgroup *); |
| 81 | struct lruvec *mem_cgroup_page_lruvec(struct page *, struct zone *); | 69 | struct lruvec *mem_cgroup_page_lruvec(struct page *, struct zone *); |
| 82 | 70 | ||
| 83 | /* For coalescing uncharge for reducing memcg' overhead*/ | ||
| 84 | extern void mem_cgroup_uncharge_start(void); | ||
| 85 | extern void mem_cgroup_uncharge_end(void); | ||
| 86 | |||
| 87 | extern void mem_cgroup_uncharge_page(struct page *page); | ||
| 88 | extern void mem_cgroup_uncharge_cache_page(struct page *page); | ||
| 89 | |||
| 90 | bool __mem_cgroup_same_or_subtree(const struct mem_cgroup *root_memcg, | 71 | bool __mem_cgroup_same_or_subtree(const struct mem_cgroup *root_memcg, |
| 91 | struct mem_cgroup *memcg); | 72 | struct mem_cgroup *memcg); |
| 92 | bool task_in_mem_cgroup(struct task_struct *task, | 73 | bool task_in_mem_cgroup(struct task_struct *task, |
| @@ -113,12 +94,6 @@ bool mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *memcg) | |||
| 113 | 94 | ||
| 114 | extern struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *memcg); | 95 | extern struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *memcg); |
| 115 | 96 | ||
| 116 | extern void | ||
| 117 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage, | ||
| 118 | struct mem_cgroup **memcgp); | ||
| 119 | extern void mem_cgroup_end_migration(struct mem_cgroup *memcg, | ||
| 120 | struct page *oldpage, struct page *newpage, bool migration_ok); | ||
| 121 | |||
| 122 | struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *, | 97 | struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *, |
| 123 | struct mem_cgroup *, | 98 | struct mem_cgroup *, |
| 124 | struct mem_cgroup_reclaim_cookie *); | 99 | struct mem_cgroup_reclaim_cookie *); |
| @@ -133,8 +108,6 @@ unsigned long mem_cgroup_get_lru_size(struct lruvec *lruvec, enum lru_list); | |||
| 133 | void mem_cgroup_update_lru_size(struct lruvec *, enum lru_list, int); | 108 | void mem_cgroup_update_lru_size(struct lruvec *, enum lru_list, int); |
| 134 | extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, | 109 | extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, |
| 135 | struct task_struct *p); | 110 | struct task_struct *p); |
| 136 | extern void mem_cgroup_replace_page_cache(struct page *oldpage, | ||
| 137 | struct page *newpage); | ||
| 138 | 111 | ||
| 139 | static inline void mem_cgroup_oom_enable(void) | 112 | static inline void mem_cgroup_oom_enable(void) |
| 140 | { | 113 | { |
| @@ -233,46 +206,36 @@ void mem_cgroup_print_bad_page(struct page *page); | |||
| 233 | #else /* CONFIG_MEMCG */ | 206 | #else /* CONFIG_MEMCG */ |
| 234 | struct mem_cgroup; | 207 | struct mem_cgroup; |
| 235 | 208 | ||
| 236 | static inline int mem_cgroup_charge_anon(struct page *page, | 209 | static inline int mem_cgroup_try_charge(struct page *page, struct mm_struct *mm, |
| 237 | struct mm_struct *mm, gfp_t gfp_mask) | 210 | gfp_t gfp_mask, |
| 238 | { | 211 | struct mem_cgroup **memcgp) |
| 239 | return 0; | ||
| 240 | } | ||
| 241 | |||
| 242 | static inline int mem_cgroup_charge_file(struct page *page, | ||
| 243 | struct mm_struct *mm, gfp_t gfp_mask) | ||
| 244 | { | ||
| 245 | return 0; | ||
| 246 | } | ||
| 247 | |||
| 248 | static inline int mem_cgroup_try_charge_swapin(struct mm_struct *mm, | ||
| 249 | struct page *page, gfp_t gfp_mask, struct mem_cgroup **memcgp) | ||
| 250 | { | 212 | { |
| 213 | *memcgp = NULL; | ||
| 251 | return 0; | 214 | return 0; |
| 252 | } | 215 | } |
| 253 | 216 | ||
| 254 | static inline void mem_cgroup_commit_charge_swapin(struct page *page, | 217 | static inline void mem_cgroup_commit_charge(struct page *page, |
| 255 | struct mem_cgroup *memcg) | 218 | struct mem_cgroup *memcg, |
| 256 | { | 219 | bool lrucare) |
| 257 | } | ||
| 258 | |||
| 259 | static inline void mem_cgroup_cancel_charge_swapin(struct mem_cgroup *memcg) | ||
| 260 | { | 220 | { |
| 261 | } | 221 | } |
| 262 | 222 | ||
| 263 | static inline void mem_cgroup_uncharge_start(void) | 223 | static inline void mem_cgroup_cancel_charge(struct page *page, |
| 224 | struct mem_cgroup *memcg) | ||
| 264 | { | 225 | { |
| 265 | } | 226 | } |
| 266 | 227 | ||
| 267 | static inline void mem_cgroup_uncharge_end(void) | 228 | static inline void mem_cgroup_uncharge(struct page *page) |
| 268 | { | 229 | { |
| 269 | } | 230 | } |
| 270 | 231 | ||
| 271 | static inline void mem_cgroup_uncharge_page(struct page *page) | 232 | static inline void mem_cgroup_uncharge_list(struct list_head *page_list) |
| 272 | { | 233 | { |
| 273 | } | 234 | } |
| 274 | 235 | ||
| 275 | static inline void mem_cgroup_uncharge_cache_page(struct page *page) | 236 | static inline void mem_cgroup_migrate(struct page *oldpage, |
| 237 | struct page *newpage, | ||
| 238 | bool lrucare) | ||
| 276 | { | 239 | { |
| 277 | } | 240 | } |
| 278 | 241 | ||
| @@ -311,17 +274,6 @@ static inline struct cgroup_subsys_state | |||
| 311 | return NULL; | 274 | return NULL; |
| 312 | } | 275 | } |
| 313 | 276 | ||
| 314 | static inline void | ||
| 315 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage, | ||
| 316 | struct mem_cgroup **memcgp) | ||
| 317 | { | ||
| 318 | } | ||
| 319 | |||
| 320 | static inline void mem_cgroup_end_migration(struct mem_cgroup *memcg, | ||
| 321 | struct page *oldpage, struct page *newpage, bool migration_ok) | ||
| 322 | { | ||
| 323 | } | ||
| 324 | |||
| 325 | static inline struct mem_cgroup * | 277 | static inline struct mem_cgroup * |
| 326 | mem_cgroup_iter(struct mem_cgroup *root, | 278 | mem_cgroup_iter(struct mem_cgroup *root, |
| 327 | struct mem_cgroup *prev, | 279 | struct mem_cgroup *prev, |
| @@ -417,10 +369,6 @@ static inline | |||
| 417 | void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx) | 369 | void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx) |
| 418 | { | 370 | { |
| 419 | } | 371 | } |
| 420 | static inline void mem_cgroup_replace_page_cache(struct page *oldpage, | ||
| 421 | struct page *newpage) | ||
| 422 | { | ||
| 423 | } | ||
| 424 | #endif /* CONFIG_MEMCG */ | 372 | #endif /* CONFIG_MEMCG */ |
| 425 | 373 | ||
| 426 | #if !defined(CONFIG_MEMCG) || !defined(CONFIG_DEBUG_VM) | 374 | #if !defined(CONFIG_MEMCG) || !defined(CONFIG_DEBUG_VM) |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 010d125bffbf..d9524c49d767 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
| @@ -26,11 +26,12 @@ enum { | |||
| 26 | MEMORY_HOTPLUG_MAX_BOOTMEM_TYPE = NODE_INFO, | 26 | MEMORY_HOTPLUG_MAX_BOOTMEM_TYPE = NODE_INFO, |
| 27 | }; | 27 | }; |
| 28 | 28 | ||
| 29 | /* Types for control the zone type of onlined memory */ | 29 | /* Types for control the zone type of onlined and offlined memory */ |
| 30 | enum { | 30 | enum { |
| 31 | ONLINE_KEEP, | 31 | MMOP_OFFLINE = -1, |
| 32 | ONLINE_KERNEL, | 32 | MMOP_ONLINE_KEEP, |
| 33 | ONLINE_MOVABLE, | 33 | MMOP_ONLINE_KERNEL, |
| 34 | MMOP_ONLINE_MOVABLE, | ||
| 34 | }; | 35 | }; |
| 35 | 36 | ||
| 36 | /* | 37 | /* |
| @@ -258,6 +259,7 @@ static inline void remove_memory(int nid, u64 start, u64 size) {} | |||
| 258 | extern int walk_memory_range(unsigned long start_pfn, unsigned long end_pfn, | 259 | extern int walk_memory_range(unsigned long start_pfn, unsigned long end_pfn, |
| 259 | void *arg, int (*func)(struct memory_block *, void *)); | 260 | void *arg, int (*func)(struct memory_block *, void *)); |
| 260 | extern int add_memory(int nid, u64 start, u64 size); | 261 | extern int add_memory(int nid, u64 start, u64 size); |
| 262 | extern int zone_for_memory(int nid, u64 start, u64 size, int zone_default); | ||
| 261 | extern int arch_add_memory(int nid, u64 start, u64 size); | 263 | extern int arch_add_memory(int nid, u64 start, u64 size); |
| 262 | extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages); | 264 | extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages); |
| 263 | extern bool is_memblock_offlined(struct memory_block *mem); | 265 | extern bool is_memblock_offlined(struct memory_block *mem); |
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index 4e7fe7417fc9..9475fee2bfc5 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h | |||
| @@ -505,6 +505,7 @@ static inline int is_ab9540_2p0_or_earlier(struct ab8500 *ab) | |||
| 505 | void ab8500_override_turn_on_stat(u8 mask, u8 set); | 505 | void ab8500_override_turn_on_stat(u8 mask, u8 set); |
| 506 | 506 | ||
| 507 | #ifdef CONFIG_AB8500_DEBUG | 507 | #ifdef CONFIG_AB8500_DEBUG |
| 508 | extern int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size); | ||
| 508 | void ab8500_dump_all_banks(struct device *dev); | 509 | void ab8500_dump_all_banks(struct device *dev); |
| 509 | void ab8500_debug_register_interrupt(int line); | 510 | void ab8500_debug_register_interrupt(int line); |
| 510 | #else | 511 | #else |
diff --git a/include/linux/mfd/arizona/core.h b/include/linux/mfd/arizona/core.h index a614b33d0a39..f34723f7663c 100644 --- a/include/linux/mfd/arizona/core.h +++ b/include/linux/mfd/arizona/core.h | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | #include <linux/regulator/consumer.h> | 18 | #include <linux/regulator/consumer.h> |
| 19 | #include <linux/mfd/arizona/pdata.h> | 19 | #include <linux/mfd/arizona/pdata.h> |
| 20 | 20 | ||
| 21 | #define ARIZONA_MAX_CORE_SUPPLIES 3 | 21 | #define ARIZONA_MAX_CORE_SUPPLIES 2 |
| 22 | 22 | ||
| 23 | enum arizona_type { | 23 | enum arizona_type { |
| 24 | WM5102 = 1, | 24 | WM5102 = 1, |
| @@ -46,8 +46,8 @@ enum arizona_type { | |||
| 46 | #define ARIZONA_IRQ_DSP_IRQ6 17 | 46 | #define ARIZONA_IRQ_DSP_IRQ6 17 |
| 47 | #define ARIZONA_IRQ_DSP_IRQ7 18 | 47 | #define ARIZONA_IRQ_DSP_IRQ7 18 |
| 48 | #define ARIZONA_IRQ_DSP_IRQ8 19 | 48 | #define ARIZONA_IRQ_DSP_IRQ8 19 |
| 49 | #define ARIZONA_IRQ_SPK_SHUTDOWN_WARN 20 | 49 | #define ARIZONA_IRQ_SPK_OVERHEAT_WARN 20 |
| 50 | #define ARIZONA_IRQ_SPK_SHUTDOWN 21 | 50 | #define ARIZONA_IRQ_SPK_OVERHEAT 21 |
| 51 | #define ARIZONA_IRQ_MICDET 22 | 51 | #define ARIZONA_IRQ_MICDET 22 |
| 52 | #define ARIZONA_IRQ_HPDET 23 | 52 | #define ARIZONA_IRQ_HPDET 23 |
| 53 | #define ARIZONA_IRQ_WSEQ_DONE 24 | 53 | #define ARIZONA_IRQ_WSEQ_DONE 24 |
| @@ -78,8 +78,31 @@ enum arizona_type { | |||
| 78 | #define ARIZONA_IRQ_FLL1_CLOCK_OK 49 | 78 | #define ARIZONA_IRQ_FLL1_CLOCK_OK 49 |
| 79 | #define ARIZONA_IRQ_MICD_CLAMP_RISE 50 | 79 | #define ARIZONA_IRQ_MICD_CLAMP_RISE 50 |
| 80 | #define ARIZONA_IRQ_MICD_CLAMP_FALL 51 | 80 | #define ARIZONA_IRQ_MICD_CLAMP_FALL 51 |
| 81 | 81 | #define ARIZONA_IRQ_HP3R_DONE 52 | |
| 82 | #define ARIZONA_NUM_IRQ 52 | 82 | #define ARIZONA_IRQ_HP3L_DONE 53 |
| 83 | #define ARIZONA_IRQ_HP2R_DONE 54 | ||
| 84 | #define ARIZONA_IRQ_HP2L_DONE 55 | ||
| 85 | #define ARIZONA_IRQ_HP1R_DONE 56 | ||
| 86 | #define ARIZONA_IRQ_HP1L_DONE 57 | ||
| 87 | #define ARIZONA_IRQ_ISRC3_CFG_ERR 58 | ||
| 88 | #define ARIZONA_IRQ_DSP_SHARED_WR_COLL 59 | ||
| 89 | #define ARIZONA_IRQ_SPK_SHUTDOWN 60 | ||
| 90 | #define ARIZONA_IRQ_SPK1R_SHORT 61 | ||
| 91 | #define ARIZONA_IRQ_SPK1L_SHORT 62 | ||
| 92 | #define ARIZONA_IRQ_HP3R_SC_NEG 63 | ||
| 93 | #define ARIZONA_IRQ_HP3R_SC_POS 64 | ||
| 94 | #define ARIZONA_IRQ_HP3L_SC_NEG 65 | ||
| 95 | #define ARIZONA_IRQ_HP3L_SC_POS 66 | ||
| 96 | #define ARIZONA_IRQ_HP2R_SC_NEG 67 | ||
| 97 | #define ARIZONA_IRQ_HP2R_SC_POS 68 | ||
| 98 | #define ARIZONA_IRQ_HP2L_SC_NEG 69 | ||
| 99 | #define ARIZONA_IRQ_HP2L_SC_POS 70 | ||
| 100 | #define ARIZONA_IRQ_HP1R_SC_NEG 71 | ||
| 101 | #define ARIZONA_IRQ_HP1R_SC_POS 72 | ||
| 102 | #define ARIZONA_IRQ_HP1L_SC_NEG 73 | ||
| 103 | #define ARIZONA_IRQ_HP1L_SC_POS 74 | ||
| 104 | |||
| 105 | #define ARIZONA_NUM_IRQ 75 | ||
| 83 | 106 | ||
| 84 | struct snd_soc_dapm_context; | 107 | struct snd_soc_dapm_context; |
| 85 | 108 | ||
| @@ -109,6 +132,8 @@ struct arizona { | |||
| 109 | struct mutex clk_lock; | 132 | struct mutex clk_lock; |
| 110 | int clk32k_ref; | 133 | int clk32k_ref; |
| 111 | 134 | ||
| 135 | bool ctrlif_error; | ||
| 136 | |||
| 112 | struct snd_soc_dapm_context *dapm; | 137 | struct snd_soc_dapm_context *dapm; |
| 113 | 138 | ||
| 114 | int tdm_width[ARIZONA_MAX_AIF]; | 139 | int tdm_width[ARIZONA_MAX_AIF]; |
diff --git a/include/linux/mfd/arizona/registers.h b/include/linux/mfd/arizona/registers.h index 7204d8138b24..dbd23c36de21 100644 --- a/include/linux/mfd/arizona/registers.h +++ b/include/linux/mfd/arizona/registers.h | |||
| @@ -878,22 +878,26 @@ | |||
| 878 | #define ARIZONA_INTERRUPT_STATUS_3 0xD02 | 878 | #define ARIZONA_INTERRUPT_STATUS_3 0xD02 |
| 879 | #define ARIZONA_INTERRUPT_STATUS_4 0xD03 | 879 | #define ARIZONA_INTERRUPT_STATUS_4 0xD03 |
| 880 | #define ARIZONA_INTERRUPT_STATUS_5 0xD04 | 880 | #define ARIZONA_INTERRUPT_STATUS_5 0xD04 |
| 881 | #define ARIZONA_INTERRUPT_STATUS_6 0xD05 | ||
| 881 | #define ARIZONA_INTERRUPT_STATUS_1_MASK 0xD08 | 882 | #define ARIZONA_INTERRUPT_STATUS_1_MASK 0xD08 |
| 882 | #define ARIZONA_INTERRUPT_STATUS_2_MASK 0xD09 | 883 | #define ARIZONA_INTERRUPT_STATUS_2_MASK 0xD09 |
| 883 | #define ARIZONA_INTERRUPT_STATUS_3_MASK 0xD0A | 884 | #define ARIZONA_INTERRUPT_STATUS_3_MASK 0xD0A |
| 884 | #define ARIZONA_INTERRUPT_STATUS_4_MASK 0xD0B | 885 | #define ARIZONA_INTERRUPT_STATUS_4_MASK 0xD0B |
| 885 | #define ARIZONA_INTERRUPT_STATUS_5_MASK 0xD0C | 886 | #define ARIZONA_INTERRUPT_STATUS_5_MASK 0xD0C |
| 887 | #define ARIZONA_INTERRUPT_STATUS_6_MASK 0xD0D | ||
| 886 | #define ARIZONA_INTERRUPT_CONTROL 0xD0F | 888 | #define ARIZONA_INTERRUPT_CONTROL 0xD0F |
| 887 | #define ARIZONA_IRQ2_STATUS_1 0xD10 | 889 | #define ARIZONA_IRQ2_STATUS_1 0xD10 |
| 888 | #define ARIZONA_IRQ2_STATUS_2 0xD11 | 890 | #define ARIZONA_IRQ2_STATUS_2 0xD11 |
| 889 | #define ARIZONA_IRQ2_STATUS_3 0xD12 | 891 | #define ARIZONA_IRQ2_STATUS_3 0xD12 |
| 890 | #define ARIZONA_IRQ2_STATUS_4 0xD13 | 892 | #define ARIZONA_IRQ2_STATUS_4 0xD13 |
| 891 | #define ARIZONA_IRQ2_STATUS_5 0xD14 | 893 | #define ARIZONA_IRQ2_STATUS_5 0xD14 |
| 894 | #define ARIZONA_IRQ2_STATUS_6 0xD15 | ||
| 892 | #define ARIZONA_IRQ2_STATUS_1_MASK 0xD18 | 895 | #define ARIZONA_IRQ2_STATUS_1_MASK 0xD18 |
| 893 | #define ARIZONA_IRQ2_STATUS_2_MASK 0xD19 | 896 | #define ARIZONA_IRQ2_STATUS_2_MASK 0xD19 |
| 894 | #define ARIZONA_IRQ2_STATUS_3_MASK 0xD1A | 897 | #define ARIZONA_IRQ2_STATUS_3_MASK 0xD1A |
| 895 | #define ARIZONA_IRQ2_STATUS_4_MASK 0xD1B | 898 | #define ARIZONA_IRQ2_STATUS_4_MASK 0xD1B |
| 896 | #define ARIZONA_IRQ2_STATUS_5_MASK 0xD1C | 899 | #define ARIZONA_IRQ2_STATUS_5_MASK 0xD1C |
| 900 | #define ARIZONA_IRQ2_STATUS_6_MASK 0xD1D | ||
| 897 | #define ARIZONA_IRQ2_CONTROL 0xD1F | 901 | #define ARIZONA_IRQ2_CONTROL 0xD1F |
| 898 | #define ARIZONA_INTERRUPT_RAW_STATUS_2 0xD20 | 902 | #define ARIZONA_INTERRUPT_RAW_STATUS_2 0xD20 |
| 899 | #define ARIZONA_INTERRUPT_RAW_STATUS_3 0xD21 | 903 | #define ARIZONA_INTERRUPT_RAW_STATUS_3 0xD21 |
| @@ -902,6 +906,7 @@ | |||
| 902 | #define ARIZONA_INTERRUPT_RAW_STATUS_6 0xD24 | 906 | #define ARIZONA_INTERRUPT_RAW_STATUS_6 0xD24 |
| 903 | #define ARIZONA_INTERRUPT_RAW_STATUS_7 0xD25 | 907 | #define ARIZONA_INTERRUPT_RAW_STATUS_7 0xD25 |
| 904 | #define ARIZONA_INTERRUPT_RAW_STATUS_8 0xD26 | 908 | #define ARIZONA_INTERRUPT_RAW_STATUS_8 0xD26 |
| 909 | #define ARIZONA_INTERRUPT_RAW_STATUS_9 0xD28 | ||
| 905 | #define ARIZONA_IRQ_PIN_STATUS 0xD40 | 910 | #define ARIZONA_IRQ_PIN_STATUS 0xD40 |
| 906 | #define ARIZONA_ADSP2_IRQ0 0xD41 | 911 | #define ARIZONA_ADSP2_IRQ0 0xD41 |
| 907 | #define ARIZONA_AOD_WKUP_AND_TRIG 0xD50 | 912 | #define ARIZONA_AOD_WKUP_AND_TRIG 0xD50 |
| @@ -4691,14 +4696,14 @@ | |||
| 4691 | /* | 4696 | /* |
| 4692 | * R3330 (0xD02) - Interrupt Status 3 | 4697 | * R3330 (0xD02) - Interrupt Status 3 |
| 4693 | */ | 4698 | */ |
| 4694 | #define ARIZONA_SPK_SHUTDOWN_WARN_EINT1 0x8000 /* SPK_SHUTDOWN_WARN_EINT1 */ | 4699 | #define ARIZONA_SPK_OVERHEAT_WARN_EINT1 0x8000 /* SPK_OVERHEAT_WARN_EINT1 */ |
| 4695 | #define ARIZONA_SPK_SHUTDOWN_WARN_EINT1_MASK 0x8000 /* SPK_SHUTDOWN_WARN_EINT1 */ | 4700 | #define ARIZONA_SPK_OVERHEAT_WARN_EINT1_MASK 0x8000 /* SPK_OVERHEAD_WARN_EINT1 */ |
| 4696 | #define ARIZONA_SPK_SHUTDOWN_WARN_EINT1_SHIFT 15 /* SPK_SHUTDOWN_WARN_EINT1 */ | 4701 | #define ARIZONA_SPK_OVERHEAT_WARN_EINT1_SHIFT 15 /* SPK_OVERHEAT_WARN_EINT1 */ |
| 4697 | #define ARIZONA_SPK_SHUTDOWN_WARN_EINT1_WIDTH 1 /* SPK_SHUTDOWN_WARN_EINT1 */ | 4702 | #define ARIZONA_SPK_OVERHEAT_WARN_EINT1_WIDTH 1 /* SPK_OVERHEAT_WARN_EINT1 */ |
| 4698 | #define ARIZONA_SPK_SHUTDOWN_EINT1 0x4000 /* SPK_SHUTDOWN_EINT1 */ | 4703 | #define ARIZONA_SPK_OVERHEAT_EINT1 0x4000 /* SPK_OVERHEAT_EINT1 */ |
| 4699 | #define ARIZONA_SPK_SHUTDOWN_EINT1_MASK 0x4000 /* SPK_SHUTDOWN_EINT1 */ | 4704 | #define ARIZONA_SPK_OVERHEAT_EINT1_MASK 0x4000 /* SPK_OVERHEAT_EINT1 */ |
| 4700 | #define ARIZONA_SPK_SHUTDOWN_EINT1_SHIFT 14 /* SPK_SHUTDOWN_EINT1 */ | 4705 | #define ARIZONA_SPK_OVERHEAT_EINT1_SHIFT 14 /* SPK_OVERHEAT_EINT1 */ |
| 4701 | #define ARIZONA_SPK_SHUTDOWN_EINT1_WIDTH 1 /* SPK_SHUTDOWN_EINT1 */ | 4706 | #define ARIZONA_SPK_OVERHEAT_EINT1_WIDTH 1 /* SPK_OVERHEAT_EINT1 */ |
| 4702 | #define ARIZONA_HPDET_EINT1 0x2000 /* HPDET_EINT1 */ | 4707 | #define ARIZONA_HPDET_EINT1 0x2000 /* HPDET_EINT1 */ |
| 4703 | #define ARIZONA_HPDET_EINT1_MASK 0x2000 /* HPDET_EINT1 */ | 4708 | #define ARIZONA_HPDET_EINT1_MASK 0x2000 /* HPDET_EINT1 */ |
| 4704 | #define ARIZONA_HPDET_EINT1_SHIFT 13 /* HPDET_EINT1 */ | 4709 | #define ARIZONA_HPDET_EINT1_SHIFT 13 /* HPDET_EINT1 */ |
| @@ -4795,6 +4800,77 @@ | |||
| 4795 | #define ARIZONA_ISRC2_CFG_ERR_EINT1_MASK 0x0040 /* ISRC2_CFG_ERR_EINT1 */ | 4800 | #define ARIZONA_ISRC2_CFG_ERR_EINT1_MASK 0x0040 /* ISRC2_CFG_ERR_EINT1 */ |
| 4796 | #define ARIZONA_ISRC2_CFG_ERR_EINT1_SHIFT 6 /* ISRC2_CFG_ERR_EINT1 */ | 4801 | #define ARIZONA_ISRC2_CFG_ERR_EINT1_SHIFT 6 /* ISRC2_CFG_ERR_EINT1 */ |
| 4797 | #define ARIZONA_ISRC2_CFG_ERR_EINT1_WIDTH 1 /* ISRC2_CFG_ERR_EINT1 */ | 4802 | #define ARIZONA_ISRC2_CFG_ERR_EINT1_WIDTH 1 /* ISRC2_CFG_ERR_EINT1 */ |
| 4803 | #define ARIZONA_HP3R_DONE_EINT1 0x0020 /* HP3R_DONE_EINT1 */ | ||
| 4804 | #define ARIZONA_HP3R_DONE_EINT1_MASK 0x0020 /* HP3R_DONE_EINT1 */ | ||
| 4805 | #define ARIZONA_HP3R_DONE_EINT1_SHIFT 5 /* HP3R_DONE_EINT1 */ | ||
| 4806 | #define ARIZONA_HP3R_DONE_EINT1_WIDTH 1 /* HP3R_DONE_EINT1 */ | ||
| 4807 | #define ARIZONA_HP3L_DONE_EINT1 0x0010 /* HP3L_DONE_EINT1 */ | ||
| 4808 | #define ARIZONA_HP3L_DONE_EINT1_MASK 0x0010 /* HP3L_DONE_EINT1 */ | ||
| 4809 | #define ARIZONA_HP3L_DONE_EINT1_SHIFT 4 /* HP3L_DONE_EINT1 */ | ||
| 4810 | #define ARIZONA_HP3L_DONE_EINT1_WIDTH 1 /* HP3L_DONE_EINT1 */ | ||
| 4811 | #define ARIZONA_HP2R_DONE_EINT1 0x0008 /* HP2R_DONE_EINT1 */ | ||
| 4812 | #define ARIZONA_HP2R_DONE_EINT1_MASK 0x0008 /* HP2R_DONE_EINT1 */ | ||
| 4813 | #define ARIZONA_HP2R_DONE_EINT1_SHIFT 3 /* HP2R_DONE_EINT1 */ | ||
| 4814 | #define ARIZONA_HP2R_DONE_EINT1_WIDTH 1 /* HP2R_DONE_EINT1 */ | ||
| 4815 | #define ARIZONA_HP2L_DONE_EINT1 0x0004 /* HP2L_DONE_EINT1 */ | ||
| 4816 | #define ARIZONA_HP2L_DONE_EINT1_MASK 0x0004 /* HP2L_DONE_EINT1 */ | ||
| 4817 | #define ARIZONA_HP2L_DONE_EINT1_SHIFT 2 /* HP2L_DONE_EINT1 */ | ||
| 4818 | #define ARIZONA_HP2L_DONE_EINT1_WIDTH 1 /* HP2L_DONE_EINT1 */ | ||
| 4819 | #define ARIZONA_HP1R_DONE_EINT1 0x0002 /* HP1R_DONE_EINT1 */ | ||
| 4820 | #define ARIZONA_HP1R_DONE_EINT1_MASK 0x0002 /* HP1R_DONE_EINT1 */ | ||
| 4821 | #define ARIZONA_HP1R_DONE_EINT1_SHIFT 1 /* HP1R_DONE_EINT1 */ | ||
| 4822 | #define ARIZONA_HP1R_DONE_EINT1_WIDTH 1 /* HP1R_DONE_EINT1 */ | ||
| 4823 | #define ARIZONA_HP1L_DONE_EINT1 0x0001 /* HP1L_DONE_EINT1 */ | ||
| 4824 | #define ARIZONA_HP1L_DONE_EINT1_MASK 0x0001 /* HP1L_DONE_EINT1 */ | ||
| 4825 | #define ARIZONA_HP1L_DONE_EINT1_SHIFT 0 /* HP1L_DONE_EINT1 */ | ||
| 4826 | #define ARIZONA_HP1L_DONE_EINT1_WIDTH 1 /* HP1L_DONE_EINT1 */ | ||
| 4827 | |||
| 4828 | /* | ||
| 4829 | * R3331 (0xD03) - Interrupt Status 4 (Alternate layout) | ||
| 4830 | * | ||
| 4831 | * Alternate layout used on later devices, note only fields that have moved | ||
| 4832 | * are specified | ||
| 4833 | */ | ||
| 4834 | #define ARIZONA_V2_AIF3_ERR_EINT1 0x8000 /* AIF3_ERR_EINT1 */ | ||
| 4835 | #define ARIZONA_V2_AIF3_ERR_EINT1_MASK 0x8000 /* AIF3_ERR_EINT1 */ | ||
| 4836 | #define ARIZONA_V2_AIF3_ERR_EINT1_SHIFT 15 /* AIF3_ERR_EINT1 */ | ||
| 4837 | #define ARIZONA_V2_AIF3_ERR_EINT1_WIDTH 1 /* AIF3_ERR_EINT1 */ | ||
| 4838 | #define ARIZONA_V2_AIF2_ERR_EINT1 0x4000 /* AIF2_ERR_EINT1 */ | ||
| 4839 | #define ARIZONA_V2_AIF2_ERR_EINT1_MASK 0x4000 /* AIF2_ERR_EINT1 */ | ||
| 4840 | #define ARIZONA_V2_AIF2_ERR_EINT1_SHIFT 14 /* AIF2_ERR_EINT1 */ | ||
| 4841 | #define ARIZONA_V2_AIF2_ERR_EINT1_WIDTH 1 /* AIF2_ERR_EINT1 */ | ||
| 4842 | #define ARIZONA_V2_AIF1_ERR_EINT1 0x2000 /* AIF1_ERR_EINT1 */ | ||
| 4843 | #define ARIZONA_V2_AIF1_ERR_EINT1_MASK 0x2000 /* AIF1_ERR_EINT1 */ | ||
| 4844 | #define ARIZONA_V2_AIF1_ERR_EINT1_SHIFT 13 /* AIF1_ERR_EINT1 */ | ||
| 4845 | #define ARIZONA_V2_AIF1_ERR_EINT1_WIDTH 1 /* AIF1_ERR_EINT1 */ | ||
| 4846 | #define ARIZONA_V2_CTRLIF_ERR_EINT1 0x1000 /* CTRLIF_ERR_EINT1 */ | ||
| 4847 | #define ARIZONA_V2_CTRLIF_ERR_EINT1_MASK 0x1000 /* CTRLIF_ERR_EINT1 */ | ||
| 4848 | #define ARIZONA_V2_CTRLIF_ERR_EINT1_SHIFT 12 /* CTRLIF_ERR_EINT1 */ | ||
| 4849 | #define ARIZONA_V2_CTRLIF_ERR_EINT1_WIDTH 1 /* CTRLIF_ERR_EINT1 */ | ||
| 4850 | #define ARIZONA_V2_MIXER_DROPPED_SAMPLE_EINT1 0x0800 /* MIXER_DROPPED_SAMPLE_EINT1 */ | ||
| 4851 | #define ARIZONA_V2_MIXER_DROPPED_SAMPLE_EINT1_MASK 0x0800 /* MIXER_DROPPED_SAMPLE_EINT1 */ | ||
| 4852 | #define ARIZONA_V2_MIXER_DROPPED_SAMPLE_EINT1_SHIFT 11 /* MIXER_DROPPED_SAMPLE_EINT1 */ | ||
| 4853 | #define ARIZONA_V2_MIXER_DROPPED_SAMPLE_EINT1_WIDTH 1 /* MIXER_DROPPED_SAMPLE_EINT1 */ | ||
| 4854 | #define ARIZONA_V2_ASYNC_CLK_ENA_LOW_EINT1 0x0400 /* ASYNC_CLK_ENA_LOW_EINT1 */ | ||
| 4855 | #define ARIZONA_V2_ASYNC_CLK_ENA_LOW_EINT1_MASK 0x0400 /* ASYNC_CLK_ENA_LOW_EINT1 */ | ||
| 4856 | #define ARIZONA_V2_ASYNC_CLK_ENA_LOW_EINT1_SHIFT 10 /* ASYNC_CLK_ENA_LOW_EINT1 */ | ||
| 4857 | #define ARIZONA_V2_ASYNC_CLK_ENA_LOW_EINT1_WIDTH 1 /* ASYNC_CLK_ENA_LOW_EINT1 */ | ||
| 4858 | #define ARIZONA_V2_SYSCLK_ENA_LOW_EINT1 0x0200 /* SYSCLK_ENA_LOW_EINT1 */ | ||
| 4859 | #define ARIZONA_V2_SYSCLK_ENA_LOW_EINT1_MASK 0x0200 /* SYSCLK_ENA_LOW_EINT1 */ | ||
| 4860 | #define ARIZONA_V2_SYSCLK_ENA_LOW_EINT1_SHIFT 9 /* SYSCLK_ENA_LOW_EINT1 */ | ||
| 4861 | #define ARIZONA_V2_SYSCLK_ENA_LOW_EINT1_WIDTH 1 /* SYSCLK_ENA_LOW_EINT1 */ | ||
| 4862 | #define ARIZONA_V2_ISRC1_CFG_ERR_EINT1 0x0100 /* ISRC1_CFG_ERR_EINT1 */ | ||
| 4863 | #define ARIZONA_V2_ISRC1_CFG_ERR_EINT1_MASK 0x0100 /* ISRC1_CFG_ERR_EINT1 */ | ||
| 4864 | #define ARIZONA_V2_ISRC1_CFG_ERR_EINT1_SHIFT 8 /* ISRC1_CFG_ERR_EINT1 */ | ||
| 4865 | #define ARIZONA_V2_ISRC1_CFG_ERR_EINT1_WIDTH 1 /* ISRC1_CFG_ERR_EINT1 */ | ||
| 4866 | #define ARIZONA_V2_ISRC2_CFG_ERR_EINT1 0x0080 /* ISRC2_CFG_ERR_EINT1 */ | ||
| 4867 | #define ARIZONA_V2_ISRC2_CFG_ERR_EINT1_MASK 0x0080 /* ISRC2_CFG_ERR_EINT1 */ | ||
| 4868 | #define ARIZONA_V2_ISRC2_CFG_ERR_EINT1_SHIFT 7 /* ISRC2_CFG_ERR_EINT1 */ | ||
| 4869 | #define ARIZONA_V2_ISRC2_CFG_ERR_EINT1_WIDTH 1 /* ISRC2_CFG_ERR_EINT1 */ | ||
| 4870 | #define ARIZONA_V2_ISRC3_CFG_ERR_EINT1 0x0040 /* ISRC3_CFG_ERR_EINT1 */ | ||
| 4871 | #define ARIZONA_V2_ISRC3_CFG_ERR_EINT1_MASK 0x0040 /* ISRC3_CFG_ERR_EINT1 */ | ||
| 4872 | #define ARIZONA_V2_ISRC3_CFG_ERR_EINT1_SHIFT 6 /* ISRC3_CFG_ERR_EINT1 */ | ||
| 4873 | #define ARIZONA_V2_ISRC3_CFG_ERR_EINT1_WIDTH 1 /* ISRC3_CFG_ERR_EINT1 */ | ||
| 4798 | 4874 | ||
| 4799 | /* | 4875 | /* |
| 4800 | * R3332 (0xD04) - Interrupt Status 5 | 4876 | * R3332 (0xD04) - Interrupt Status 5 |
| @@ -4821,6 +4897,85 @@ | |||
| 4821 | #define ARIZONA_FLL1_CLOCK_OK_EINT1_WIDTH 1 /* FLL1_CLOCK_OK_EINT1 */ | 4897 | #define ARIZONA_FLL1_CLOCK_OK_EINT1_WIDTH 1 /* FLL1_CLOCK_OK_EINT1 */ |
| 4822 | 4898 | ||
| 4823 | /* | 4899 | /* |
| 4900 | * R3332 (0xD05) - Interrupt Status 5 (Alternate layout) | ||
| 4901 | * | ||
| 4902 | * Alternate layout used on later devices, note only fields that have moved | ||
| 4903 | * are specified | ||
| 4904 | */ | ||
| 4905 | #define ARIZONA_V2_ASRC_CFG_ERR_EINT1 0x0008 /* ASRC_CFG_ERR_EINT1 */ | ||
| 4906 | #define ARIZONA_V2_ASRC_CFG_ERR_EINT1_MASK 0x0008 /* ASRC_CFG_ERR_EINT1 */ | ||
| 4907 | #define ARIZONA_V2_ASRC_CFG_ERR_EINT1_SHIFT 3 /* ASRC_CFG_ERR_EINT1 */ | ||
| 4908 | #define ARIZONA_V2_ASRC_CFG_ERR_EINT1_WIDTH 1 /* ASRC_CFG_ERR_EINT1 */ | ||
| 4909 | |||
| 4910 | /* | ||
| 4911 | * R3333 (0xD05) - Interrupt Status 6 | ||
| 4912 | */ | ||
| 4913 | #define ARIZONA_DSP_SHARED_WR_COLL_EINT1 0x8000 /* DSP_SHARED_WR_COLL_EINT1 */ | ||
| 4914 | #define ARIZONA_DSP_SHARED_WR_COLL_EINT1_MASK 0x8000 /* DSP_SHARED_WR_COLL_EINT1 */ | ||
| 4915 | #define ARIZONA_DSP_SHARED_WR_COLL_EINT1_SHIFT 15 /* DSP_SHARED_WR_COLL_EINT1 */ | ||
| 4916 | #define ARIZONA_DSP_SHARED_WR_COLL_EINT1_WIDTH 1 /* DSP_SHARED_WR_COLL_EINT1 */ | ||
| 4917 | #define ARIZONA_SPK_SHUTDOWN_EINT1 0x4000 /* SPK_SHUTDOWN_EINT1 */ | ||
| 4918 | #define ARIZONA_SPK_SHUTDOWN_EINT1_MASK 0x4000 /* SPK_SHUTDOWN_EINT1 */ | ||
| 4919 | #define ARIZONA_SPK_SHUTDOWN_EINT1_SHIFT 14 /* SPK_SHUTDOWN_EINT1 */ | ||
| 4920 | #define ARIZONA_SPK_SHUTDOWN_EINT1_WIDTH 1 /* SPK_SHUTDOWN_EINT1 */ | ||
| 4921 | #define ARIZONA_SPK1R_SHORT_EINT1 0x2000 /* SPK1R_SHORT_EINT1 */ | ||
| 4922 | #define ARIZONA_SPK1R_SHORT_EINT1_MASK 0x2000 /* SPK1R_SHORT_EINT1 */ | ||
| 4923 | #define ARIZONA_SPK1R_SHORT_EINT1_SHIFT 13 /* SPK1R_SHORT_EINT1 */ | ||
| 4924 | #define ARIZONA_SPK1R_SHORT_EINT1_WIDTH 1 /* SPK1R_SHORT_EINT1 */ | ||
| 4925 | #define ARIZONA_SPK1L_SHORT_EINT1 0x1000 /* SPK1L_SHORT_EINT1 */ | ||
| 4926 | #define ARIZONA_SPK1L_SHORT_EINT1_MASK 0x1000 /* SPK1L_SHORT_EINT1 */ | ||
| 4927 | #define ARIZONA_SPK1L_SHORT_EINT1_SHIFT 12 /* SPK1L_SHORT_EINT1 */ | ||
| 4928 | #define ARIZONA_SPK1L_SHORT_EINT1_WIDTH 1 /* SPK1L_SHORT_EINT1 */ | ||
| 4929 | #define ARIZONA_HP3R_SC_NEG_EINT1 0x0800 /* HP3R_SC_NEG_EINT1 */ | ||
| 4930 | #define ARIZONA_HP3R_SC_NEG_EINT1_MASK 0x0800 /* HP3R_SC_NEG_EINT1 */ | ||
| 4931 | #define ARIZONA_HP3R_SC_NEG_EINT1_SHIFT 11 /* HP3R_SC_NEG_EINT1 */ | ||
| 4932 | #define ARIZONA_HP3R_SC_NEG_EINT1_WIDTH 1 /* HP3R_SC_NEG_EINT1 */ | ||
| 4933 | #define ARIZONA_HP3R_SC_POS_EINT1 0x0400 /* HP3R_SC_POS_EINT1 */ | ||
| 4934 | #define ARIZONA_HP3R_SC_POS_EINT1_MASK 0x0400 /* HP3R_SC_POS_EINT1 */ | ||
| 4935 | #define ARIZONA_HP3R_SC_POS_EINT1_SHIFT 10 /* HP3R_SC_POS_EINT1 */ | ||
| 4936 | #define ARIZONA_HP3R_SC_POS_EINT1_WIDTH 1 /* HP3R_SC_POS_EINT1 */ | ||
| 4937 | #define ARIZONA_HP3L_SC_NEG_EINT1 0x0200 /* HP3L_SC_NEG_EINT1 */ | ||
| 4938 | #define ARIZONA_HP3L_SC_NEG_EINT1_MASK 0x0200 /* HP3L_SC_NEG_EINT1 */ | ||
| 4939 | #define ARIZONA_HP3L_SC_NEG_EINT1_SHIFT 9 /* HP3L_SC_NEG_EINT1 */ | ||
| 4940 | #define ARIZONA_HP3L_SC_NEG_EINT1_WIDTH 1 /* HP3L_SC_NEG_EINT1 */ | ||
| 4941 | #define ARIZONA_HP3L_SC_POS_EINT1 0x0100 /* HP3L_SC_POS_EINT1 */ | ||
| 4942 | #define ARIZONA_HP3L_SC_POS_EINT1_MASK 0x0100 /* HP3L_SC_POS_EINT1 */ | ||
| 4943 | #define ARIZONA_HP3L_SC_POS_EINT1_SHIFT 8 /* HP3L_SC_POS_EINT1 */ | ||
| 4944 | #define ARIZONA_HP3L_SC_POS_EINT1_WIDTH 1 /* HP3L_SC_POS_EINT1 */ | ||
| 4945 | #define ARIZONA_HP2R_SC_NEG_EINT1 0x0080 /* HP2R_SC_NEG_EINT1 */ | ||
| 4946 | #define ARIZONA_HP2R_SC_NEG_EINT1_MASK 0x0080 /* HP2R_SC_NEG_EINT1 */ | ||
| 4947 | #define ARIZONA_HP2R_SC_NEG_EINT1_SHIFT 7 /* HP2R_SC_NEG_EINT1 */ | ||
| 4948 | #define ARIZONA_HP2R_SC_NEG_EINT1_WIDTH 1 /* HP2R_SC_NEG_EINT1 */ | ||
| 4949 | #define ARIZONA_HP2R_SC_POS_EINT1 0x0040 /* HP2R_SC_POS_EINT1 */ | ||
| 4950 | #define ARIZONA_HP2R_SC_POS_EINT1_MASK 0x0040 /* HP2R_SC_POS_EINT1 */ | ||
| 4951 | #define ARIZONA_HP2R_SC_POS_EINT1_SHIFT 6 /* HP2R_SC_POS_EINT1 */ | ||
| 4952 | #define ARIZONA_HP2R_SC_POS_EINT1_WIDTH 1 /* HP2R_SC_POS_EINT1 */ | ||
| 4953 | #define ARIZONA_HP2L_SC_NEG_EINT1 0x0020 /* HP2L_SC_NEG_EINT1 */ | ||
| 4954 | #define ARIZONA_HP2L_SC_NEG_EINT1_MASK 0x0020 /* HP2L_SC_NEG_EINT1 */ | ||
| 4955 | #define ARIZONA_HP2L_SC_NEG_EINT1_SHIFT 5 /* HP2L_SC_NEG_EINT1 */ | ||
| 4956 | #define ARIZONA_HP2L_SC_NEG_EINT1_WIDTH 1 /* HP2L_SC_NEG_EINT1 */ | ||
| 4957 | #define ARIZONA_HP2L_SC_POS_EINT1 0x0010 /* HP2L_SC_POS_EINT1 */ | ||
| 4958 | #define ARIZONA_HP2L_SC_POS_EINT1_MASK 0x0010 /* HP2L_SC_POS_EINT1 */ | ||
| 4959 | #define ARIZONA_HP2L_SC_POS_EINT1_SHIFT 4 /* HP2L_SC_POS_EINT1 */ | ||
| 4960 | #define ARIZONA_HP2L_SC_POS_EINT1_WIDTH 1 /* HP2L_SC_POS_EINT1 */ | ||
| 4961 | #define ARIZONA_HP1R_SC_NEG_EINT1 0x0008 /* HP1R_SC_NEG_EINT1 */ | ||
| 4962 | #define ARIZONA_HP1R_SC_NEG_EINT1_MASK 0x0008 /* HP1R_SC_NEG_EINT1 */ | ||
| 4963 | #define ARIZONA_HP1R_SC_NEG_EINT1_SHIFT 3 /* HP1R_SC_NEG_EINT1 */ | ||
| 4964 | #define ARIZONA_HP1R_SC_NEG_EINT1_WIDTH 1 /* HP1R_SC_NEG_EINT1 */ | ||
| 4965 | #define ARIZONA_HP1R_SC_POS_EINT1 0x0004 /* HP1R_SC_POS_EINT1 */ | ||
| 4966 | #define ARIZONA_HP1R_SC_POS_EINT1_MASK 0x0004 /* HP1R_SC_POS_EINT1 */ | ||
| 4967 | #define ARIZONA_HP1R_SC_POS_EINT1_SHIFT 2 /* HP1R_SC_POS_EINT1 */ | ||
| 4968 | #define ARIZONA_HP1R_SC_POS_EINT1_WIDTH 1 /* HP1R_SC_POS_EINT1 */ | ||
| 4969 | #define ARIZONA_HP1L_SC_NEG_EINT1 0x0002 /* HP1L_SC_NEG_EINT1 */ | ||
| 4970 | #define ARIZONA_HP1L_SC_NEG_EINT1_MASK 0x0002 /* HP1L_SC_NEG_EINT1 */ | ||
| 4971 | #define ARIZONA_HP1L_SC_NEG_EINT1_SHIFT 1 /* HP1L_SC_NEG_EINT1 */ | ||
| 4972 | #define ARIZONA_HP1L_SC_NEG_EINT1_WIDTH 1 /* HP1L_SC_NEG_EINT1 */ | ||
| 4973 | #define ARIZONA_HP1L_SC_POS_EINT1 0x0001 /* HP1L_SC_POS_EINT1 */ | ||
| 4974 | #define ARIZONA_HP1L_SC_POS_EINT1_MASK 0x0001 /* HP1L_SC_POS_EINT1 */ | ||
| 4975 | #define ARIZONA_HP1L_SC_POS_EINT1_SHIFT 0 /* HP1L_SC_POS_EINT1 */ | ||
| 4976 | #define ARIZONA_HP1L_SC_POS_EINT1_WIDTH 1 /* HP1L_SC_POS_EINT1 */ | ||
| 4977 | |||
| 4978 | /* | ||
| 4824 | * R3336 (0xD08) - Interrupt Status 1 Mask | 4979 | * R3336 (0xD08) - Interrupt Status 1 Mask |
| 4825 | */ | 4980 | */ |
| 4826 | #define ARIZONA_IM_GP4_EINT1 0x0008 /* IM_GP4_EINT1 */ | 4981 | #define ARIZONA_IM_GP4_EINT1 0x0008 /* IM_GP4_EINT1 */ |
| @@ -4859,14 +5014,14 @@ | |||
| 4859 | /* | 5014 | /* |
| 4860 | * R3338 (0xD0A) - Interrupt Status 3 Mask | 5015 | * R3338 (0xD0A) - Interrupt Status 3 Mask |
| 4861 | */ | 5016 | */ |
| 4862 | #define ARIZONA_IM_SPK_SHUTDOWN_WARN_EINT1 0x8000 /* IM_SPK_SHUTDOWN_WARN_EINT1 */ | 5017 | #define ARIZONA_IM_SPK_OVERHEAT_WARN_EINT1 0x8000 /* IM_SPK_OVERHEAT_WARN_EINT1 */ |
| 4863 | #define ARIZONA_IM_SPK_SHUTDOWN_WARN_EINT1_MASK 0x8000 /* IM_SPK_SHUTDOWN_WARN_EINT1 */ | 5018 | #define ARIZONA_IM_SPK_OVERHEAT_WARN_EINT1_MASK 0x8000 /* IM_SPK_OVERHEAT_WARN_EINT1 */ |
| 4864 | #define ARIZONA_IM_SPK_SHUTDOWN_WARN_EINT1_SHIFT 15 /* IM_SPK_SHUTDOWN_WARN_EINT1 */ | 5019 | #define ARIZONA_IM_SPK_OVERHEAT_WARN_EINT1_SHIFT 15 /* IM_SPK_OVERHEAT_WARN_EINT1 */ |
| 4865 | #define ARIZONA_IM_SPK_SHUTDOWN_WARN_EINT1_WIDTH 1 /* IM_SPK_SHUTDOWN_WARN_EINT1 */ | 5020 | #define ARIZONA_IM_SPK_OVERHEAT_WARN_EINT1_WIDTH 1 /* IM_SPK_OVERHEAT_WARN_EINT1 */ |
| 4866 | #define ARIZONA_IM_SPK_SHUTDOWN_EINT1 0x4000 /* IM_SPK_SHUTDOWN_EINT1 */ | 5021 | #define ARIZONA_IM_SPK_OVERHEAT_EINT1 0x4000 /* IM_SPK_OVERHEAT_EINT1 */ |
| 4867 | #define ARIZONA_IM_SPK_SHUTDOWN_EINT1_MASK 0x4000 /* IM_SPK_SHUTDOWN_EINT1 */ | 5022 | #define ARIZONA_IM_SPK_OVERHEAT_EINT1_MASK 0x4000 /* IM_SPK_OVERHEAT_EINT1 */ |
| 4868 | #define ARIZONA_IM_SPK_SHUTDOWN_EINT1_SHIFT 14 /* IM_SPK_SHUTDOWN_EINT1 */ | 5023 | #define ARIZONA_IM_SPK_OVERHEAT_EINT1_SHIFT 14 /* IM_SPK_OVERHEAT_EINT1 */ |
| 4869 | #define ARIZONA_IM_SPK_SHUTDOWN_EINT1_WIDTH 1 /* IM_SPK_SHUTDOWN_EINT1 */ | 5024 | #define ARIZONA_IM_SPK_OVERHEAT_EINT1_WIDTH 1 /* IM_SPK_OVERHEAT_EINT1 */ |
| 4870 | #define ARIZONA_IM_HPDET_EINT1 0x2000 /* IM_HPDET_EINT1 */ | 5025 | #define ARIZONA_IM_HPDET_EINT1 0x2000 /* IM_HPDET_EINT1 */ |
| 4871 | #define ARIZONA_IM_HPDET_EINT1_MASK 0x2000 /* IM_HPDET_EINT1 */ | 5026 | #define ARIZONA_IM_HPDET_EINT1_MASK 0x2000 /* IM_HPDET_EINT1 */ |
| 4872 | #define ARIZONA_IM_HPDET_EINT1_SHIFT 13 /* IM_HPDET_EINT1 */ | 5027 | #define ARIZONA_IM_HPDET_EINT1_SHIFT 13 /* IM_HPDET_EINT1 */ |
| @@ -4963,6 +5118,77 @@ | |||
| 4963 | #define ARIZONA_IM_ISRC2_CFG_ERR_EINT1_MASK 0x0040 /* IM_ISRC2_CFG_ERR_EINT1 */ | 5118 | #define ARIZONA_IM_ISRC2_CFG_ERR_EINT1_MASK 0x0040 /* IM_ISRC2_CFG_ERR_EINT1 */ |
| 4964 | #define ARIZONA_IM_ISRC2_CFG_ERR_EINT1_SHIFT 6 /* IM_ISRC2_CFG_ERR_EINT1 */ | 5119 | #define ARIZONA_IM_ISRC2_CFG_ERR_EINT1_SHIFT 6 /* IM_ISRC2_CFG_ERR_EINT1 */ |
| 4965 | #define ARIZONA_IM_ISRC2_CFG_ERR_EINT1_WIDTH 1 /* IM_ISRC2_CFG_ERR_EINT1 */ | 5120 | #define ARIZONA_IM_ISRC2_CFG_ERR_EINT1_WIDTH 1 /* IM_ISRC2_CFG_ERR_EINT1 */ |
| 5121 | #define ARIZONA_IM_HP3R_DONE_EINT1 0x0020 /* IM_HP3R_DONE_EINT1 */ | ||
| 5122 | #define ARIZONA_IM_HP3R_DONE_EINT1_MASK 0x0020 /* IM_HP3R_DONE_EINT1 */ | ||
| 5123 | #define ARIZONA_IM_HP3R_DONE_EINT1_SHIFT 5 /* IM_HP3R_DONE_EINT1 */ | ||
| 5124 | #define ARIZONA_IM_HP3R_DONE_EINT1_WIDTH 1 /* IM_HP3R_DONE_EINT1 */ | ||
| 5125 | #define ARIZONA_IM_HP3L_DONE_EINT1 0x0010 /* IM_HP3L_DONE_EINT1 */ | ||
| 5126 | #define ARIZONA_IM_HP3L_DONE_EINT1_MASK 0x0010 /* IM_HP3L_DONE_EINT1 */ | ||
| 5127 | #define ARIZONA_IM_HP3L_DONE_EINT1_SHIFT 4 /* IM_HP3L_DONE_EINT1 */ | ||
| 5128 | #define ARIZONA_IM_HP3L_DONE_EINT1_WIDTH 1 /* IM_HP3L_DONE_EINT1 */ | ||
| 5129 | #define ARIZONA_IM_HP2R_DONE_EINT1 0x0008 /* IM_HP2R_DONE_EINT1 */ | ||
| 5130 | #define ARIZONA_IM_HP2R_DONE_EINT1_MASK 0x0008 /* IM_HP2R_DONE_EINT1 */ | ||
| 5131 | #define ARIZONA_IM_HP2R_DONE_EINT1_SHIFT 3 /* IM_HP2R_DONE_EINT1 */ | ||
| 5132 | #define ARIZONA_IM_HP2R_DONE_EINT1_WIDTH 1 /* IM_HP2R_DONE_EINT1 */ | ||
| 5133 | #define ARIZONA_IM_HP2L_DONE_EINT1 0x0004 /* IM_HP2L_DONE_EINT1 */ | ||
| 5134 | #define ARIZONA_IM_HP2L_DONE_EINT1_MASK 0x0004 /* IM_HP2L_DONE_EINT1 */ | ||
| 5135 | #define ARIZONA_IM_HP2L_DONE_EINT1_SHIFT 2 /* IM_HP2L_DONE_EINT1 */ | ||
| 5136 | #define ARIZONA_IM_HP2L_DONE_EINT1_WIDTH 1 /* IM_HP2L_DONE_EINT1 */ | ||
| 5137 | #define ARIZONA_IM_HP1R_DONE_EINT1 0x0002 /* IM_HP1R_DONE_EINT1 */ | ||
| 5138 | #define ARIZONA_IM_HP1R_DONE_EINT1_MASK 0x0002 /* IM_HP1R_DONE_EINT1 */ | ||
| 5139 | #define ARIZONA_IM_HP1R_DONE_EINT1_SHIFT 1 /* IM_HP1R_DONE_EINT1 */ | ||
| 5140 | #define ARIZONA_IM_HP1R_DONE_EINT1_WIDTH 1 /* IM_HP1R_DONE_EINT1 */ | ||
| 5141 | #define ARIZONA_IM_HP1L_DONE_EINT1 0x0001 /* IM_HP1L_DONE_EINT1 */ | ||
| 5142 | #define ARIZONA_IM_HP1L_DONE_EINT1_MASK 0x0001 /* IM_HP1L_DONE_EINT1 */ | ||
| 5143 | #define ARIZONA_IM_HP1L_DONE_EINT1_SHIFT 0 /* IM_HP1L_DONE_EINT1 */ | ||
| 5144 | #define ARIZONA_IM_HP1L_DONE_EINT1_WIDTH 1 /* IM_HP1L_DONE_EINT1 */ | ||
| 5145 | |||
| 5146 | /* | ||
| 5147 | * R3339 (0xD0B) - Interrupt Status 4 Mask (Alternate layout) | ||
| 5148 | * | ||
| 5149 | * Alternate layout used on later devices, note only fields that have moved | ||
| 5150 | * are specified | ||
| 5151 | */ | ||
| 5152 | #define ARIZONA_V2_IM_AIF3_ERR_EINT1 0x8000 /* IM_AIF3_ERR_EINT1 */ | ||
| 5153 | #define ARIZONA_V2_IM_AIF3_ERR_EINT1_MASK 0x8000 /* IM_AIF3_ERR_EINT1 */ | ||
| 5154 | #define ARIZONA_V2_IM_AIF3_ERR_EINT1_SHIFT 15 /* IM_AIF3_ERR_EINT1 */ | ||
| 5155 | #define ARIZONA_V2_IM_AIF3_ERR_EINT1_WIDTH 1 /* IM_AIF3_ERR_EINT1 */ | ||
| 5156 | #define ARIZONA_V2_IM_AIF2_ERR_EINT1 0x4000 /* IM_AIF2_ERR_EINT1 */ | ||
| 5157 | #define ARIZONA_V2_IM_AIF2_ERR_EINT1_MASK 0x4000 /* IM_AIF2_ERR_EINT1 */ | ||
| 5158 | #define ARIZONA_V2_IM_AIF2_ERR_EINT1_SHIFT 14 /* IM_AIF2_ERR_EINT1 */ | ||
| 5159 | #define ARIZONA_V2_IM_AIF2_ERR_EINT1_WIDTH 1 /* IM_AIF2_ERR_EINT1 */ | ||
| 5160 | #define ARIZONA_V2_IM_AIF1_ERR_EINT1 0x2000 /* IM_AIF1_ERR_EINT1 */ | ||
| 5161 | #define ARIZONA_V2_IM_AIF1_ERR_EINT1_MASK 0x2000 /* IM_AIF1_ERR_EINT1 */ | ||
| 5162 | #define ARIZONA_V2_IM_AIF1_ERR_EINT1_SHIFT 13 /* IM_AIF1_ERR_EINT1 */ | ||
| 5163 | #define ARIZONA_V2_IM_AIF1_ERR_EINT1_WIDTH 1 /* IM_AIF1_ERR_EINT1 */ | ||
| 5164 | #define ARIZONA_V2_IM_CTRLIF_ERR_EINT1 0x1000 /* IM_CTRLIF_ERR_EINT1 */ | ||
| 5165 | #define ARIZONA_V2_IM_CTRLIF_ERR_EINT1_MASK 0x1000 /* IM_CTRLIF_ERR_EINT1 */ | ||
| 5166 | #define ARIZONA_V2_IM_CTRLIF_ERR_EINT1_SHIFT 12 /* IM_CTRLIF_ERR_EINT1 */ | ||
| 5167 | #define ARIZONA_V2_IM_CTRLIF_ERR_EINT1_WIDTH 1 /* IM_CTRLIF_ERR_EINT1 */ | ||
| 5168 | #define ARIZONA_V2_IM_MIXER_DROPPED_SAMPLE_EINT1 0x0800 /* IM_MIXER_DROPPED_SAMPLE_EINT1 */ | ||
| 5169 | #define ARIZONA_V2_IM_MIXER_DROPPED_SAMPLE_EINT1_MASK 0x0800 /* IM_MIXER_DROPPED_SAMPLE_EINT1 */ | ||
| 5170 | #define ARIZONA_V2_IM_MIXER_DROPPED_SAMPLE_EINT1_SHIFT 11 /* IM_MIXER_DROPPED_SAMPLE_EINT1 */ | ||
| 5171 | #define ARIZONA_V2_IM_MIXER_DROPPED_SAMPLE_EINT1_WIDTH 1 /* IM_MIXER_DROPPED_SAMPLE_EINT1 */ | ||
| 5172 | #define ARIZONA_V2_IM_ASYNC_CLK_ENA_LOW_EINT1 0x0400 /* IM_ASYNC_CLK_ENA_LOW_EINT1 */ | ||
| 5173 | #define ARIZONA_V2_IM_ASYNC_CLK_ENA_LOW_EINT1_MASK 0x0400 /* IM_ASYNC_CLK_ENA_LOW_EINT1 */ | ||
| 5174 | #define ARIZONA_V2_IM_ASYNC_CLK_ENA_LOW_EINT1_SHIFT 10 /* IM_ASYNC_CLK_ENA_LOW_EINT1 */ | ||
| 5175 | #define ARIZONA_V2_IM_ASYNC_CLK_ENA_LOW_EINT1_WIDTH 1 /* IM_ASYNC_CLK_ENA_LOW_EINT1 */ | ||
| 5176 | #define ARIZONA_V2_IM_SYSCLK_ENA_LOW_EINT1 0x0200 /* IM_SYSCLK_ENA_LOW_EINT1 */ | ||
| 5177 | #define ARIZONA_V2_IM_SYSCLK_ENA_LOW_EINT1_MASK 0x0200 /* IM_SYSCLK_ENA_LOW_EINT1 */ | ||
| 5178 | #define ARIZONA_V2_IM_SYSCLK_ENA_LOW_EINT1_SHIFT 9 /* IM_SYSCLK_ENA_LOW_EINT1 */ | ||
| 5179 | #define ARIZONA_V2_IM_SYSCLK_ENA_LOW_EINT1_WIDTH 1 /* IM_SYSCLK_ENA_LOW_EINT1 */ | ||
| 5180 | #define ARIZONA_V2_IM_ISRC1_CFG_ERR_EINT1 0x0100 /* IM_ISRC1_CFG_ERR_EINT1 */ | ||
| 5181 | #define ARIZONA_V2_IM_ISRC1_CFG_ERR_EINT1_MASK 0x0100 /* IM_ISRC1_CFG_ERR_EINT1 */ | ||
| 5182 | #define ARIZONA_V2_IM_ISRC1_CFG_ERR_EINT1_SHIFT 8 /* IM_ISRC1_CFG_ERR_EINT1 */ | ||
| 5183 | #define ARIZONA_V2_IM_ISRC1_CFG_ERR_EINT1_WIDTH 1 /* IM_ISRC1_CFG_ERR_EINT1 */ | ||
| 5184 | #define ARIZONA_V2_IM_ISRC2_CFG_ERR_EINT1 0x0080 /* IM_ISRC2_CFG_ERR_EINT1 */ | ||
| 5185 | #define ARIZONA_V2_IM_ISRC2_CFG_ERR_EINT1_MASK 0x0080 /* IM_ISRC2_CFG_ERR_EINT1 */ | ||
| 5186 | #define ARIZONA_V2_IM_ISRC2_CFG_ERR_EINT1_SHIFT 7 /* IM_ISRC2_CFG_ERR_EINT1 */ | ||
| 5187 | #define ARIZONA_V2_IM_ISRC2_CFG_ERR_EINT1_WIDTH 1 /* IM_ISRC2_CFG_ERR_EINT1 */ | ||
| 5188 | #define ARIZONA_V2_IM_ISRC3_CFG_ERR_EINT1 0x0040 /* IM_ISRC3_CFG_ERR_EINT1 */ | ||
| 5189 | #define ARIZONA_V2_IM_ISRC3_CFG_ERR_EINT1_MASK 0x0040 /* IM_ISRC3_CFG_ERR_EINT1 */ | ||
| 5190 | #define ARIZONA_V2_IM_ISRC3_CFG_ERR_EINT1_SHIFT 6 /* IM_ISRC3_CFG_ERR_EINT1 */ | ||
| 5191 | #define ARIZONA_V2_IM_ISRC3_CFG_ERR_EINT1_WIDTH 1 /* IM_ISRC3_CFG_ERR_EINT1 */ | ||
| 4966 | 5192 | ||
| 4967 | /* | 5193 | /* |
| 4968 | * R3340 (0xD0C) - Interrupt Status 5 Mask | 5194 | * R3340 (0xD0C) - Interrupt Status 5 Mask |
| @@ -4989,6 +5215,85 @@ | |||
| 4989 | #define ARIZONA_IM_FLL1_CLOCK_OK_EINT1_WIDTH 1 /* IM_FLL1_CLOCK_OK_EINT1 */ | 5215 | #define ARIZONA_IM_FLL1_CLOCK_OK_EINT1_WIDTH 1 /* IM_FLL1_CLOCK_OK_EINT1 */ |
| 4990 | 5216 | ||
| 4991 | /* | 5217 | /* |
| 5218 | * R3340 (0xD0C) - Interrupt Status 5 Mask (Alternate layout) | ||
| 5219 | * | ||
| 5220 | * Alternate layout used on later devices, note only fields that have moved | ||
| 5221 | * are specified | ||
| 5222 | */ | ||
| 5223 | #define ARIZONA_V2_IM_ASRC_CFG_ERR_EINT1 0x0008 /* IM_ASRC_CFG_ERR_EINT1 */ | ||
| 5224 | #define ARIZONA_V2_IM_ASRC_CFG_ERR_EINT1_MASK 0x0008 /* IM_ASRC_CFG_ERR_EINT1 */ | ||
| 5225 | #define ARIZONA_V2_IM_ASRC_CFG_ERR_EINT1_SHIFT 3 /* IM_ASRC_CFG_ERR_EINT1 */ | ||
| 5226 | #define ARIZONA_V2_IM_ASRC_CFG_ERR_EINT1_WIDTH 1 /* IM_ASRC_CFG_ERR_EINT1 */ | ||
| 5227 | |||
| 5228 | /* | ||
| 5229 | * R3341 (0xD0D) - Interrupt Status 6 Mask | ||
| 5230 | */ | ||
| 5231 | #define ARIZONA_IM_DSP_SHARED_WR_COLL_EINT1 0x8000 /* IM_DSP_SHARED_WR_COLL_EINT1 */ | ||
| 5232 | #define ARIZONA_IM_DSP_SHARED_WR_COLL_EINT1_MASK 0x8000 /* IM_DSP_SHARED_WR_COLL_EINT1 */ | ||
| 5233 | #define ARIZONA_IM_DSP_SHARED_WR_COLL_EINT1_SHIFT 15 /* IM_DSP_SHARED_WR_COLL_EINT1 */ | ||
| 5234 | #define ARIZONA_IM_DSP_SHARED_WR_COLL_EINT1_WIDTH 1 /* IM_DSP_SHARED_WR_COLL_EINT1 */ | ||
| 5235 | #define ARIZONA_IM_SPK_SHUTDOWN_EINT1 0x4000 /* IM_SPK_SHUTDOWN_EINT1 */ | ||
| 5236 | #define ARIZONA_IM_SPK_SHUTDOWN_EINT1_MASK 0x4000 /* IM_SPK_SHUTDOWN_EINT1 */ | ||
| 5237 | #define ARIZONA_IM_SPK_SHUTDOWN_EINT1_SHIFT 14 /* IM_SPK_SHUTDOWN_EINT1 */ | ||
| 5238 | #define ARIZONA_IM_SPK_SHUTDOWN_EINT1_WIDTH 1 /* IM_SPK_SHUTDOWN_EINT1 */ | ||
| 5239 | #define ARIZONA_IM_SPK1R_SHORT_EINT1 0x2000 /* IM_SPK1R_SHORT_EINT1 */ | ||
| 5240 | #define ARIZONA_IM_SPK1R_SHORT_EINT1_MASK 0x2000 /* IM_SPK1R_SHORT_EINT1 */ | ||
| 5241 | #define ARIZONA_IM_SPK1R_SHORT_EINT1_SHIFT 13 /* IM_SPK1R_SHORT_EINT1 */ | ||
| 5242 | #define ARIZONA_IM_SPK1R_SHORT_EINT1_WIDTH 1 /* IM_SPK1R_SHORT_EINT1 */ | ||
| 5243 | #define ARIZONA_IM_SPK1L_SHORT_EINT1 0x1000 /* IM_SPK1L_SHORT_EINT1 */ | ||
| 5244 | #define ARIZONA_IM_SPK1L_SHORT_EINT1_MASK 0x1000 /* IM_SPK1L_SHORT_EINT1 */ | ||
| 5245 | #define ARIZONA_IM_SPK1L_SHORT_EINT1_SHIFT 12 /* IM_SPK1L_SHORT_EINT1 */ | ||
| 5246 | #define ARIZONA_IM_SPK1L_SHORT_EINT1_WIDTH 1 /* IM_SPK1L_SHORT_EINT1 */ | ||
| 5247 | #define ARIZONA_IM_HP3R_SC_NEG_EINT1 0x0800 /* IM_HP3R_SC_NEG_EINT1 */ | ||
| 5248 | #define ARIZONA_IM_HP3R_SC_NEG_EINT1_MASK 0x0800 /* IM_HP3R_SC_NEG_EINT1 */ | ||
| 5249 | #define ARIZONA_IM_HP3R_SC_NEG_EINT1_SHIFT 11 /* IM_HP3R_SC_NEG_EINT1 */ | ||
| 5250 | #define ARIZONA_IM_HP3R_SC_NEG_EINT1_WIDTH 1 /* IM_HP3R_SC_NEG_EINT1 */ | ||
| 5251 | #define ARIZONA_IM_HP3R_SC_POS_EINT1 0x0400 /* IM_HP3R_SC_POS_EINT1 */ | ||
| 5252 | #define ARIZONA_IM_HP3R_SC_POS_EINT1_MASK 0x0400 /* IM_HP3R_SC_POS_EINT1 */ | ||
| 5253 | #define ARIZONA_IM_HP3R_SC_POS_EINT1_SHIFT 10 /* IM_HP3R_SC_POS_EINT1 */ | ||
| 5254 | #define ARIZONA_IM_HP3R_SC_POS_EINT1_WIDTH 1 /* IM_HP3R_SC_POS_EINT1 */ | ||
| 5255 | #define ARIZONA_IM_HP3L_SC_NEG_EINT1 0x0200 /* IM_HP3L_SC_NEG_EINT1 */ | ||
| 5256 | #define ARIZONA_IM_HP3L_SC_NEG_EINT1_MASK 0x0200 /* IM_HP3L_SC_NEG_EINT1 */ | ||
| 5257 | #define ARIZONA_IM_HP3L_SC_NEG_EINT1_SHIFT 9 /* IM_HP3L_SC_NEG_EINT1 */ | ||
| 5258 | #define ARIZONA_IM_HP3L_SC_NEG_EINT1_WIDTH 1 /* IM_HP3L_SC_NEG_EINT1 */ | ||
| 5259 | #define ARIZONA_IM_HP3L_SC_POS_EINT1 0x0100 /* IM_HP3L_SC_POS_EINT1 */ | ||
| 5260 | #define ARIZONA_IM_HP3L_SC_POS_EINT1_MASK 0x0100 /* IM_HP3L_SC_POS_EINT1 */ | ||
| 5261 | #define ARIZONA_IM_HP3L_SC_POS_EINT1_SHIFT 8 /* IM_HP3L_SC_POS_EINT1 */ | ||
| 5262 | #define ARIZONA_IM_HP3L_SC_POS_EINT1_WIDTH 1 /* IM_HP3L_SC_POS_EINT1 */ | ||
| 5263 | #define ARIZONA_IM_HP2R_SC_NEG_EINT1 0x0080 /* IM_HP2R_SC_NEG_EINT1 */ | ||
| 5264 | #define ARIZONA_IM_HP2R_SC_NEG_EINT1_MASK 0x0080 /* IM_HP2R_SC_NEG_EINT1 */ | ||
| 5265 | #define ARIZONA_IM_HP2R_SC_NEG_EINT1_SHIFT 7 /* IM_HP2R_SC_NEG_EINT1 */ | ||
| 5266 | #define ARIZONA_IM_HP2R_SC_NEG_EINT1_WIDTH 1 /* IM_HP2R_SC_NEG_EINT1 */ | ||
| 5267 | #define ARIZONA_IM_HP2R_SC_POS_EINT1 0x0040 /* IM_HP2R_SC_POS_EINT1 */ | ||
| 5268 | #define ARIZONA_IM_HP2R_SC_POS_EINT1_MASK 0x0040 /* IM_HP2R_SC_POS_EINT1 */ | ||
| 5269 | #define ARIZONA_IM_HP2R_SC_POS_EINT1_SHIFT 6 /* IM_HP2R_SC_POS_EINT1 */ | ||
| 5270 | #define ARIZONA_IM_HP2R_SC_POS_EINT1_WIDTH 1 /* IM_HP2R_SC_POS_EINT1 */ | ||
| 5271 | #define ARIZONA_IM_HP2L_SC_NEG_EINT1 0x0020 /* IM_HP2L_SC_NEG_EINT1 */ | ||
| 5272 | #define ARIZONA_IM_HP2L_SC_NEG_EINT1_MASK 0x0020 /* IM_HP2L_SC_NEG_EINT1 */ | ||
| 5273 | #define ARIZONA_IM_HP2L_SC_NEG_EINT1_SHIFT 5 /* IM_HP2L_SC_NEG_EINT1 */ | ||
| 5274 | #define ARIZONA_IM_HP2L_SC_NEG_EINT1_WIDTH 1 /* IM_HP2L_SC_NEG_EINT1 */ | ||
| 5275 | #define ARIZONA_IM_HP2L_SC_POS_EINT1 0x0010 /* IM_HP2L_SC_POS_EINT1 */ | ||
| 5276 | #define ARIZONA_IM_HP2L_SC_POS_EINT1_MASK 0x0010 /* IM_HP2L_SC_POS_EINT1 */ | ||
| 5277 | #define ARIZONA_IM_HP2L_SC_POS_EINT1_SHIFT 4 /* IM_HP2L_SC_POS_EINT1 */ | ||
| 5278 | #define ARIZONA_IM_HP2L_SC_POS_EINT1_WIDTH 1 /* IM_HP2L_SC_POS_EINT1 */ | ||
| 5279 | #define ARIZONA_IM_HP1R_SC_NEG_EINT1 0x0008 /* IM_HP1R_SC_NEG_EINT1 */ | ||
| 5280 | #define ARIZONA_IM_HP1R_SC_NEG_EINT1_MASK 0x0008 /* IM_HP1R_SC_NEG_EINT1 */ | ||
| 5281 | #define ARIZONA_IM_HP1R_SC_NEG_EINT1_SHIFT 3 /* IM_HP1R_SC_NEG_EINT1 */ | ||
| 5282 | #define ARIZONA_IM_HP1R_SC_NEG_EINT1_WIDTH 1 /* IM_HP1R_SC_NEG_EINT1 */ | ||
| 5283 | #define ARIZONA_IM_HP1R_SC_POS_EINT1 0x0004 /* IM_HP1R_SC_POS_EINT1 */ | ||
| 5284 | #define ARIZONA_IM_HP1R_SC_POS_EINT1_MASK 0x0004 /* IM_HP1R_SC_POS_EINT1 */ | ||
| 5285 | #define ARIZONA_IM_HP1R_SC_POS_EINT1_SHIFT 2 /* IM_HP1R_SC_POS_EINT1 */ | ||
| 5286 | #define ARIZONA_IM_HP1R_SC_POS_EINT1_WIDTH 1 /* IM_HP1R_SC_POS_EINT1 */ | ||
| 5287 | #define ARIZONA_IM_HP1L_SC_NEG_EINT1 0x0002 /* IM_HP1L_SC_NEG_EINT1 */ | ||
| 5288 | #define ARIZONA_IM_HP1L_SC_NEG_EINT1_MASK 0x0002 /* IM_HP1L_SC_NEG_EINT1 */ | ||
| 5289 | #define ARIZONA_IM_HP1L_SC_NEG_EINT1_SHIFT 1 /* IM_HP1L_SC_NEG_EINT1 */ | ||
| 5290 | #define ARIZONA_IM_HP1L_SC_NEG_EINT1_WIDTH 1 /* IM_HP1L_SC_NEG_EINT1 */ | ||
| 5291 | #define ARIZONA_IM_HP1L_SC_POS_EINT1 0x0001 /* IM_HP1L_SC_POS_EINT1 */ | ||
| 5292 | #define ARIZONA_IM_HP1L_SC_POS_EINT1_MASK 0x0001 /* IM_HP1L_SC_POS_EINT1 */ | ||
| 5293 | #define ARIZONA_IM_HP1L_SC_POS_EINT1_SHIFT 0 /* IM_HP1L_SC_POS_EINT1 */ | ||
| 5294 | #define ARIZONA_IM_HP1L_SC_POS_EINT1_WIDTH 1 /* IM_HP1L_SC_POS_EINT1 */ | ||
| 5295 | |||
| 5296 | /* | ||
| 4992 | * R3343 (0xD0F) - Interrupt Control | 5297 | * R3343 (0xD0F) - Interrupt Control |
| 4993 | */ | 5298 | */ |
| 4994 | #define ARIZONA_IM_IRQ1 0x0001 /* IM_IRQ1 */ | 5299 | #define ARIZONA_IM_IRQ1 0x0001 /* IM_IRQ1 */ |
| @@ -5035,14 +5340,14 @@ | |||
| 5035 | /* | 5340 | /* |
| 5036 | * R3346 (0xD12) - IRQ2 Status 3 | 5341 | * R3346 (0xD12) - IRQ2 Status 3 |
| 5037 | */ | 5342 | */ |
| 5038 | #define ARIZONA_SPK_SHUTDOWN_WARN_EINT2 0x8000 /* SPK_SHUTDOWN_WARN_EINT2 */ | 5343 | #define ARIZONA_SPK_OVERHEAT_WARN_EINT2 0x8000 /* SPK_OVERHEAT_WARN_EINT2 */ |
| 5039 | #define ARIZONA_SPK_SHUTDOWN_WARN_EINT2_MASK 0x8000 /* SPK_SHUTDOWN_WARN_EINT2 */ | 5344 | #define ARIZONA_SPK_OVERHEAT_WARN_EINT2_MASK 0x8000 /* SPK_OVERHEAT_WARN_EINT2 */ |
| 5040 | #define ARIZONA_SPK_SHUTDOWN_WARN_EINT2_SHIFT 15 /* SPK_SHUTDOWN_WARN_EINT2 */ | 5345 | #define ARIZONA_SPK_OVERHEAT_WARN_EINT2_SHIFT 15 /* SPK_OVERHEAT_WARN_EINT2 */ |
| 5041 | #define ARIZONA_SPK_SHUTDOWN_WARN_EINT2_WIDTH 1 /* SPK_SHUTDOWN_WARN_EINT2 */ | 5346 | #define ARIZONA_SPK_OVERHEAT_WARN_EINT2_WIDTH 1 /* SPK_OVERHEAT_WARN_EINT2 */ |
| 5042 | #define ARIZONA_SPK_SHUTDOWN_EINT2 0x4000 /* SPK_SHUTDOWN_EINT2 */ | 5347 | #define ARIZONA_SPK_OVERHEAT_EINT2 0x4000 /* SPK_OVERHEAT_EINT2 */ |
| 5043 | #define ARIZONA_SPK_SHUTDOWN_EINT2_MASK 0x4000 /* SPK_SHUTDOWN_EINT2 */ | 5348 | #define ARIZONA_SPK_OVERHEAT_EINT2_MASK 0x4000 /* SPK_OVERHEAT_EINT2 */ |
| 5044 | #define ARIZONA_SPK_SHUTDOWN_EINT2_SHIFT 14 /* SPK_SHUTDOWN_EINT2 */ | 5349 | #define ARIZONA_SPK_OVERHEAT_EINT2_SHIFT 14 /* SPK_OVERHEAT_EINT2 */ |
| 5045 | #define ARIZONA_SPK_SHUTDOWN_EINT2_WIDTH 1 /* SPK_SHUTDOWN_EINT2 */ | 5350 | #define ARIZONA_SPK_OVERHEAT_EINT2_WIDTH 1 /* SPK_OVERHEAT_EINT2 */ |
| 5046 | #define ARIZONA_HPDET_EINT2 0x2000 /* HPDET_EINT2 */ | 5351 | #define ARIZONA_HPDET_EINT2 0x2000 /* HPDET_EINT2 */ |
| 5047 | #define ARIZONA_HPDET_EINT2_MASK 0x2000 /* HPDET_EINT2 */ | 5352 | #define ARIZONA_HPDET_EINT2_MASK 0x2000 /* HPDET_EINT2 */ |
| 5048 | #define ARIZONA_HPDET_EINT2_SHIFT 13 /* HPDET_EINT2 */ | 5353 | #define ARIZONA_HPDET_EINT2_SHIFT 13 /* HPDET_EINT2 */ |
| @@ -5139,6 +5444,77 @@ | |||
| 5139 | #define ARIZONA_ISRC2_CFG_ERR_EINT2_MASK 0x0040 /* ISRC2_CFG_ERR_EINT2 */ | 5444 | #define ARIZONA_ISRC2_CFG_ERR_EINT2_MASK 0x0040 /* ISRC2_CFG_ERR_EINT2 */ |
| 5140 | #define ARIZONA_ISRC2_CFG_ERR_EINT2_SHIFT 6 /* ISRC2_CFG_ERR_EINT2 */ | 5445 | #define ARIZONA_ISRC2_CFG_ERR_EINT2_SHIFT 6 /* ISRC2_CFG_ERR_EINT2 */ |
| 5141 | #define ARIZONA_ISRC2_CFG_ERR_EINT2_WIDTH 1 /* ISRC2_CFG_ERR_EINT2 */ | 5446 | #define ARIZONA_ISRC2_CFG_ERR_EINT2_WIDTH 1 /* ISRC2_CFG_ERR_EINT2 */ |
| 5447 | #define ARIZONA_HP3R_DONE_EINT2 0x0020 /* HP3R_DONE_EINT2 */ | ||
| 5448 | #define ARIZONA_HP3R_DONE_EINT2_MASK 0x0020 /* HP3R_DONE_EINT2 */ | ||
| 5449 | #define ARIZONA_HP3R_DONE_EINT2_SHIFT 5 /* HP3R_DONE_EINT2 */ | ||
| 5450 | #define ARIZONA_HP3R_DONE_EINT2_WIDTH 1 /* HP3R_DONE_EINT2 */ | ||
| 5451 | #define ARIZONA_HP3L_DONE_EINT2 0x0010 /* HP3L_DONE_EINT2 */ | ||
| 5452 | #define ARIZONA_HP3L_DONE_EINT2_MASK 0x0010 /* HP3L_DONE_EINT2 */ | ||
| 5453 | #define ARIZONA_HP3L_DONE_EINT2_SHIFT 4 /* HP3L_DONE_EINT2 */ | ||
| 5454 | #define ARIZONA_HP3L_DONE_EINT2_WIDTH 1 /* HP3L_DONE_EINT2 */ | ||
| 5455 | #define ARIZONA_HP2R_DONE_EINT2 0x0008 /* HP2R_DONE_EINT2 */ | ||
| 5456 | #define ARIZONA_HP2R_DONE_EINT2_MASK 0x0008 /* HP2R_DONE_EINT2 */ | ||
| 5457 | #define ARIZONA_HP2R_DONE_EINT2_SHIFT 3 /* HP2R_DONE_EINT2 */ | ||
| 5458 | #define ARIZONA_HP2R_DONE_EINT2_WIDTH 1 /* HP2R_DONE_EINT2 */ | ||
| 5459 | #define ARIZONA_HP2L_DONE_EINT2 0x0004 /* HP2L_DONE_EINT2 */ | ||
| 5460 | #define ARIZONA_HP2L_DONE_EINT2_MASK 0x0004 /* HP2L_DONE_EINT2 */ | ||
| 5461 | #define ARIZONA_HP2L_DONE_EINT2_SHIFT 2 /* HP2L_DONE_EINT2 */ | ||
| 5462 | #define ARIZONA_HP2L_DONE_EINT2_WIDTH 1 /* HP2L_DONE_EINT2 */ | ||
| 5463 | #define ARIZONA_HP1R_DONE_EINT2 0x0002 /* HP1R_DONE_EINT2 */ | ||
| 5464 | #define ARIZONA_HP1R_DONE_EINT2_MASK 0x0002 /* HP1R_DONE_EINT2 */ | ||
| 5465 | #define ARIZONA_HP1R_DONE_EINT2_SHIFT 1 /* HP1R_DONE_EINT2 */ | ||
| 5466 | #define ARIZONA_HP1R_DONE_EINT2_WIDTH 1 /* HP1R_DONE_EINT2 */ | ||
| 5467 | #define ARIZONA_HP1L_DONE_EINT2 0x0001 /* HP1L_DONE_EINT2 */ | ||
| 5468 | #define ARIZONA_HP1L_DONE_EINT2_MASK 0x0001 /* HP1L_DONE_EINT2 */ | ||
| 5469 | #define ARIZONA_HP1L_DONE_EINT2_SHIFT 0 /* HP1L_DONE_EINT2 */ | ||
| 5470 | #define ARIZONA_HP1L_DONE_EINT2_WIDTH 1 /* HP1L_DONE_EINT2 */ | ||
| 5471 | |||
| 5472 | /* | ||
| 5473 | * R3347 (0xD13) - IRQ2 Status 4 (Alternate layout) | ||
| 5474 | * | ||
| 5475 | * Alternate layout used on later devices, note only fields that have moved | ||
| 5476 | * are specified | ||
| 5477 | */ | ||
| 5478 | #define ARIZONA_V2_AIF3_ERR_EINT2 0x8000 /* AIF3_ERR_EINT2 */ | ||
| 5479 | #define ARIZONA_V2_AIF3_ERR_EINT2_MASK 0x8000 /* AIF3_ERR_EINT2 */ | ||
| 5480 | #define ARIZONA_V2_AIF3_ERR_EINT2_SHIFT 15 /* AIF3_ERR_EINT2 */ | ||
| 5481 | #define ARIZONA_V2_AIF3_ERR_EINT2_WIDTH 1 /* AIF3_ERR_EINT2 */ | ||
| 5482 | #define ARIZONA_V2_AIF2_ERR_EINT2 0x4000 /* AIF2_ERR_EINT2 */ | ||
| 5483 | #define ARIZONA_V2_AIF2_ERR_EINT2_MASK 0x4000 /* AIF2_ERR_EINT2 */ | ||
| 5484 | #define ARIZONA_V2_AIF2_ERR_EINT2_SHIFT 14 /* AIF2_ERR_EINT2 */ | ||
| 5485 | #define ARIZONA_V2_AIF2_ERR_EINT2_WIDTH 1 /* AIF2_ERR_EINT2 */ | ||
| 5486 | #define ARIZONA_V2_AIF1_ERR_EINT2 0x2000 /* AIF1_ERR_EINT2 */ | ||
| 5487 | #define ARIZONA_V2_AIF1_ERR_EINT2_MASK 0x2000 /* AIF1_ERR_EINT2 */ | ||
| 5488 | #define ARIZONA_V2_AIF1_ERR_EINT2_SHIFT 13 /* AIF1_ERR_EINT2 */ | ||
| 5489 | #define ARIZONA_V2_AIF1_ERR_EINT2_WIDTH 1 /* AIF1_ERR_EINT2 */ | ||
| 5490 | #define ARIZONA_V2_CTRLIF_ERR_EINT2 0x1000 /* CTRLIF_ERR_EINT2 */ | ||
| 5491 | #define ARIZONA_V2_CTRLIF_ERR_EINT2_MASK 0x1000 /* CTRLIF_ERR_EINT2 */ | ||
| 5492 | #define ARIZONA_V2_CTRLIF_ERR_EINT2_SHIFT 12 /* CTRLIF_ERR_EINT2 */ | ||
| 5493 | #define ARIZONA_V2_CTRLIF_ERR_EINT2_WIDTH 1 /* CTRLIF_ERR_EINT2 */ | ||
| 5494 | #define ARIZONA_V2_MIXER_DROPPED_SAMPLE_EINT2 0x0800 /* MIXER_DROPPED_SAMPLE_EINT2 */ | ||
| 5495 | #define ARIZONA_V2_MIXER_DROPPED_SAMPLE_EINT2_MASK 0x0800 /* MIXER_DROPPED_SAMPLE_EINT2 */ | ||
| 5496 | #define ARIZONA_V2_MIXER_DROPPED_SAMPLE_EINT2_SHIFT 11 /* MIXER_DROPPED_SAMPLE_EINT2 */ | ||
| 5497 | #define ARIZONA_V2_MIXER_DROPPED_SAMPLE_EINT2_WIDTH 1 /* MIXER_DROPPED_SAMPLE_EINT2 */ | ||
| 5498 | #define ARIZONA_V2_ASYNC_CLK_ENA_LOW_EINT2 0x0400 /* ASYNC_CLK_ENA_LOW_EINT2 */ | ||
| 5499 | #define ARIZONA_V2_ASYNC_CLK_ENA_LOW_EINT2_MASK 0x0400 /* ASYNC_CLK_ENA_LOW_EINT2 */ | ||
| 5500 | #define ARIZONA_V2_ASYNC_CLK_ENA_LOW_EINT2_SHIFT 10 /* ASYNC_CLK_ENA_LOW_EINT2 */ | ||
| 5501 | #define ARIZONA_V2_ASYNC_CLK_ENA_LOW_EINT2_WIDTH 1 /* ASYNC_CLK_ENA_LOW_EINT2 */ | ||
| 5502 | #define ARIZONA_V2_SYSCLK_ENA_LOW_EINT2 0x0200 /* SYSCLK_ENA_LOW_EINT2 */ | ||
| 5503 | #define ARIZONA_V2_SYSCLK_ENA_LOW_EINT2_MASK 0x0200 /* SYSCLK_ENA_LOW_EINT2 */ | ||
| 5504 | #define ARIZONA_V2_SYSCLK_ENA_LOW_EINT2_SHIFT 9 /* SYSCLK_ENA_LOW_EINT2 */ | ||
| 5505 | #define ARIZONA_V2_SYSCLK_ENA_LOW_EINT2_WIDTH 1 /* SYSCLK_ENA_LOW_EINT2 */ | ||
| 5506 | #define ARIZONA_V2_ISRC1_CFG_ERR_EINT2 0x0100 /* ISRC1_CFG_ERR_EINT2 */ | ||
| 5507 | #define ARIZONA_V2_ISRC1_CFG_ERR_EINT2_MASK 0x0100 /* ISRC1_CFG_ERR_EINT2 */ | ||
| 5508 | #define ARIZONA_V2_ISRC1_CFG_ERR_EINT2_SHIFT 8 /* ISRC1_CFG_ERR_EINT2 */ | ||
| 5509 | #define ARIZONA_V2_ISRC1_CFG_ERR_EINT2_WIDTH 1 /* ISRC1_CFG_ERR_EINT2 */ | ||
| 5510 | #define ARIZONA_V2_ISRC2_CFG_ERR_EINT2 0x0080 /* ISRC2_CFG_ERR_EINT2 */ | ||
| 5511 | #define ARIZONA_V2_ISRC2_CFG_ERR_EINT2_MASK 0x0080 /* ISRC2_CFG_ERR_EINT2 */ | ||
| 5512 | #define ARIZONA_V2_ISRC2_CFG_ERR_EINT2_SHIFT 7 /* ISRC2_CFG_ERR_EINT2 */ | ||
| 5513 | #define ARIZONA_V2_ISRC2_CFG_ERR_EINT2_WIDTH 1 /* ISRC2_CFG_ERR_EINT2 */ | ||
| 5514 | #define ARIZONA_V2_ISRC3_CFG_ERR_EINT2 0x0040 /* ISRC3_CFG_ERR_EINT2 */ | ||
| 5515 | #define ARIZONA_V2_ISRC3_CFG_ERR_EINT2_MASK 0x0040 /* ISRC3_CFG_ERR_EINT2 */ | ||
| 5516 | #define ARIZONA_V2_ISRC3_CFG_ERR_EINT2_SHIFT 6 /* ISRC3_CFG_ERR_EINT2 */ | ||
| 5517 | #define ARIZONA_V2_ISRC3_CFG_ERR_EINT2_WIDTH 1 /* ISRC3_CFG_ERR_EINT2 */ | ||
| 5142 | 5518 | ||
| 5143 | /* | 5519 | /* |
| 5144 | * R3348 (0xD14) - IRQ2 Status 5 | 5520 | * R3348 (0xD14) - IRQ2 Status 5 |
| @@ -5165,6 +5541,85 @@ | |||
| 5165 | #define ARIZONA_FLL1_CLOCK_OK_EINT2_WIDTH 1 /* FLL1_CLOCK_OK_EINT2 */ | 5541 | #define ARIZONA_FLL1_CLOCK_OK_EINT2_WIDTH 1 /* FLL1_CLOCK_OK_EINT2 */ |
| 5166 | 5542 | ||
| 5167 | /* | 5543 | /* |
| 5544 | * R3348 (0xD14) - IRQ2 Status 5 (Alternate layout) | ||
| 5545 | * | ||
| 5546 | * Alternate layout used on later devices, note only fields that have moved | ||
| 5547 | * are specified | ||
| 5548 | */ | ||
| 5549 | #define ARIZONA_V2_ASRC_CFG_ERR_EINT2 0x0008 /* ASRC_CFG_ERR_EINT2 */ | ||
| 5550 | #define ARIZONA_V2_ASRC_CFG_ERR_EINT2_MASK 0x0008 /* ASRC_CFG_ERR_EINT2 */ | ||
| 5551 | #define ARIZONA_V2_ASRC_CFG_ERR_EINT2_SHIFT 3 /* ASRC_CFG_ERR_EINT2 */ | ||
| 5552 | #define ARIZONA_V2_ASRC_CFG_ERR_EINT2_WIDTH 1 /* ASRC_CFG_ERR_EINT2 */ | ||
| 5553 | |||
| 5554 | /* | ||
| 5555 | * R3349 (0xD15) - IRQ2 Status 6 | ||
| 5556 | */ | ||
| 5557 | #define ARIZONA_DSP_SHARED_WR_COLL_EINT2 0x8000 /* DSP_SHARED_WR_COLL_EINT2 */ | ||
| 5558 | #define ARIZONA_DSP_SHARED_WR_COLL_EINT2_MASK 0x8000 /* DSP_SHARED_WR_COLL_EINT2 */ | ||
| 5559 | #define ARIZONA_DSP_SHARED_WR_COLL_EINT2_SHIFT 15 /* DSP_SHARED_WR_COLL_EINT2 */ | ||
| 5560 | #define ARIZONA_DSP_SHARED_WR_COLL_EINT2_WIDTH 1 /* DSP_SHARED_WR_COLL_EINT2 */ | ||
| 5561 | #define ARIZONA_SPK_SHUTDOWN_EINT2 0x4000 /* SPK_SHUTDOWN_EINT2 */ | ||
| 5562 | #define ARIZONA_SPK_SHUTDOWN_EINT2_MASK 0x4000 /* SPK_SHUTDOWN_EINT2 */ | ||
| 5563 | #define ARIZONA_SPK_SHUTDOWN_EINT2_SHIFT 14 /* SPK_SHUTDOWN_EINT2 */ | ||
| 5564 | #define ARIZONA_SPK_SHUTDOWN_EINT2_WIDTH 1 /* SPK_SHUTDOWN_EINT2 */ | ||
| 5565 | #define ARIZONA_SPK1R_SHORT_EINT2 0x2000 /* SPK1R_SHORT_EINT2 */ | ||
| 5566 | #define ARIZONA_SPK1R_SHORT_EINT2_MASK 0x2000 /* SPK1R_SHORT_EINT2 */ | ||
| 5567 | #define ARIZONA_SPK1R_SHORT_EINT2_SHIFT 13 /* SPK1R_SHORT_EINT2 */ | ||
| 5568 | #define ARIZONA_SPK1R_SHORT_EINT2_WIDTH 1 /* SPK1R_SHORT_EINT2 */ | ||
| 5569 | #define ARIZONA_SPK1L_SHORT_EINT2 0x1000 /* SPK1L_SHORT_EINT2 */ | ||
| 5570 | #define ARIZONA_SPK1L_SHORT_EINT2_MASK 0x1000 /* SPK1L_SHORT_EINT2 */ | ||
| 5571 | #define ARIZONA_SPK1L_SHORT_EINT2_SHIFT 12 /* SPK1L_SHORT_EINT2 */ | ||
| 5572 | #define ARIZONA_SPK1L_SHORT_EINT2_WIDTH 1 /* SPK1L_SHORT_EINT2 */ | ||
| 5573 | #define ARIZONA_HP3R_SC_NEG_EINT2 0x0800 /* HP3R_SC_NEG_EINT2 */ | ||
| 5574 | #define ARIZONA_HP3R_SC_NEG_EINT2_MASK 0x0800 /* HP3R_SC_NEG_EINT2 */ | ||
| 5575 | #define ARIZONA_HP3R_SC_NEG_EINT2_SHIFT 11 /* HP3R_SC_NEG_EINT2 */ | ||
| 5576 | #define ARIZONA_HP3R_SC_NEG_EINT2_WIDTH 1 /* HP3R_SC_NEG_EINT2 */ | ||
| 5577 | #define ARIZONA_HP3R_SC_POS_EINT2 0x0400 /* HP3R_SC_POS_EINT2 */ | ||
| 5578 | #define ARIZONA_HP3R_SC_POS_EINT2_MASK 0x0400 /* HP3R_SC_POS_EINT2 */ | ||
| 5579 | #define ARIZONA_HP3R_SC_POS_EINT2_SHIFT 10 /* HP3R_SC_POS_EINT2 */ | ||
| 5580 | #define ARIZONA_HP3R_SC_POS_EINT2_WIDTH 1 /* HP3R_SC_POS_EINT2 */ | ||
| 5581 | #define ARIZONA_HP3L_SC_NEG_EINT2 0x0200 /* HP3L_SC_NEG_EINT2 */ | ||
| 5582 | #define ARIZONA_HP3L_SC_NEG_EINT2_MASK 0x0200 /* HP3L_SC_NEG_EINT2 */ | ||
| 5583 | #define ARIZONA_HP3L_SC_NEG_EINT2_SHIFT 9 /* HP3L_SC_NEG_EINT2 */ | ||
| 5584 | #define ARIZONA_HP3L_SC_NEG_EINT2_WIDTH 1 /* HP3L_SC_NEG_EINT2 */ | ||
| 5585 | #define ARIZONA_HP3L_SC_POS_EINT2 0x0100 /* HP3L_SC_POS_EINT2 */ | ||
| 5586 | #define ARIZONA_HP3L_SC_POS_EINT2_MASK 0x0100 /* HP3L_SC_POS_EINT2 */ | ||
| 5587 | #define ARIZONA_HP3L_SC_POS_EINT2_SHIFT 8 /* HP3L_SC_POS_EINT2 */ | ||
| 5588 | #define ARIZONA_HP3L_SC_POS_EINT2_WIDTH 1 /* HP3L_SC_POS_EINT2 */ | ||
| 5589 | #define ARIZONA_HP2R_SC_NEG_EINT2 0x0080 /* HP2R_SC_NEG_EINT2 */ | ||
| 5590 | #define ARIZONA_HP2R_SC_NEG_EINT2_MASK 0x0080 /* HP2R_SC_NEG_EINT2 */ | ||
| 5591 | #define ARIZONA_HP2R_SC_NEG_EINT2_SHIFT 7 /* HP2R_SC_NEG_EINT2 */ | ||
| 5592 | #define ARIZONA_HP2R_SC_NEG_EINT2_WIDTH 1 /* HP2R_SC_NEG_EINT2 */ | ||
| 5593 | #define ARIZONA_HP2R_SC_POS_EINT2 0x0040 /* HP2R_SC_POS_EINT2 */ | ||
| 5594 | #define ARIZONA_HP2R_SC_POS_EINT2_MASK 0x0040 /* HP2R_SC_POS_EINT2 */ | ||
| 5595 | #define ARIZONA_HP2R_SC_POS_EINT2_SHIFT 6 /* HP2R_SC_POS_EINT2 */ | ||
| 5596 | #define ARIZONA_HP2R_SC_POS_EINT2_WIDTH 1 /* HP2R_SC_POS_EINT2 */ | ||
| 5597 | #define ARIZONA_HP2L_SC_NEG_EINT2 0x0020 /* HP2L_SC_NEG_EINT2 */ | ||
| 5598 | #define ARIZONA_HP2L_SC_NEG_EINT2_MASK 0x0020 /* HP2L_SC_NEG_EINT2 */ | ||
| 5599 | #define ARIZONA_HP2L_SC_NEG_EINT2_SHIFT 5 /* HP2L_SC_NEG_EINT2 */ | ||
| 5600 | #define ARIZONA_HP2L_SC_NEG_EINT2_WIDTH 1 /* HP2L_SC_NEG_EINT2 */ | ||
| 5601 | #define ARIZONA_HP2L_SC_POS_EINT2 0x0010 /* HP2L_SC_POS_EINT2 */ | ||
| 5602 | #define ARIZONA_HP2L_SC_POS_EINT2_MASK 0x0010 /* HP2L_SC_POS_EINT2 */ | ||
| 5603 | #define ARIZONA_HP2L_SC_POS_EINT2_SHIFT 4 /* HP2L_SC_POS_EINT2 */ | ||
| 5604 | #define ARIZONA_HP2L_SC_POS_EINT2_WIDTH 1 /* HP2L_SC_POS_EINT2 */ | ||
| 5605 | #define ARIZONA_HP1R_SC_NEG_EINT2 0x0008 /* HP1R_SC_NEG_EINT2 */ | ||
| 5606 | #define ARIZONA_HP1R_SC_NEG_EINT2_MASK 0x0008 /* HP1R_SC_NEG_EINT2 */ | ||
| 5607 | #define ARIZONA_HP1R_SC_NEG_EINT2_SHIFT 3 /* HP1R_SC_NEG_EINT2 */ | ||
| 5608 | #define ARIZONA_HP1R_SC_NEG_EINT2_WIDTH 1 /* HP1R_SC_NEG_EINT2 */ | ||
| 5609 | #define ARIZONA_HP1R_SC_POS_EINT2 0x0004 /* HP1R_SC_POS_EINT2 */ | ||
| 5610 | #define ARIZONA_HP1R_SC_POS_EINT2_MASK 0x0004 /* HP1R_SC_POS_EINT2 */ | ||
| 5611 | #define ARIZONA_HP1R_SC_POS_EINT2_SHIFT 2 /* HP1R_SC_POS_EINT2 */ | ||
| 5612 | #define ARIZONA_HP1R_SC_POS_EINT2_WIDTH 1 /* HP1R_SC_POS_EINT2 */ | ||
| 5613 | #define ARIZONA_HP1L_SC_NEG_EINT2 0x0002 /* HP1L_SC_NEG_EINT2 */ | ||
| 5614 | #define ARIZONA_HP1L_SC_NEG_EINT2_MASK 0x0002 /* HP1L_SC_NEG_EINT2 */ | ||
| 5615 | #define ARIZONA_HP1L_SC_NEG_EINT2_SHIFT 1 /* HP1L_SC_NEG_EINT2 */ | ||
| 5616 | #define ARIZONA_HP1L_SC_NEG_EINT2_WIDTH 1 /* HP1L_SC_NEG_EINT2 */ | ||
| 5617 | #define ARIZONA_HP1L_SC_POS_EINT2 0x0001 /* HP1L_SC_POS_EINT2 */ | ||
| 5618 | #define ARIZONA_HP1L_SC_POS_EINT2_MASK 0x0001 /* HP1L_SC_POS_EINT2 */ | ||
| 5619 | #define ARIZONA_HP1L_SC_POS_EINT2_SHIFT 0 /* HP1L_SC_POS_EINT2 */ | ||
| 5620 | #define ARIZONA_HP1L_SC_POS_EINT2_WIDTH 1 /* HP1L_SC_POS_EINT2 */ | ||
| 5621 | |||
| 5622 | /* | ||
| 5168 | * R3352 (0xD18) - IRQ2 Status 1 Mask | 5623 | * R3352 (0xD18) - IRQ2 Status 1 Mask |
| 5169 | */ | 5624 | */ |
| 5170 | #define ARIZONA_IM_GP4_EINT2 0x0008 /* IM_GP4_EINT2 */ | 5625 | #define ARIZONA_IM_GP4_EINT2 0x0008 /* IM_GP4_EINT2 */ |
| @@ -5203,14 +5658,14 @@ | |||
| 5203 | /* | 5658 | /* |
| 5204 | * R3354 (0xD1A) - IRQ2 Status 3 Mask | 5659 | * R3354 (0xD1A) - IRQ2 Status 3 Mask |
| 5205 | */ | 5660 | */ |
| 5206 | #define ARIZONA_IM_SPK_SHUTDOWN_WARN_EINT2 0x8000 /* IM_SPK_SHUTDOWN_WARN_EINT2 */ | 5661 | #define ARIZONA_IM_SPK_OVERHEAT_WARN_EINT2 0x8000 /* IM_SPK_OVERHEAT_WARN_EINT2 */ |
| 5207 | #define ARIZONA_IM_SPK_SHUTDOWN_WARN_EINT2_MASK 0x8000 /* IM_SPK_SHUTDOWN_WARN_EINT2 */ | 5662 | #define ARIZONA_IM_SPK_OVERHEAT_WARN_EINT2_MASK 0x8000 /* IM_SPK_OVERHEAT_WARN_EINT2 */ |
| 5208 | #define ARIZONA_IM_SPK_SHUTDOWN_WARN_EINT2_SHIFT 15 /* IM_SPK_SHUTDOWN_WARN_EINT2 */ | 5663 | #define ARIZONA_IM_SPK_OVERHEAT_WARN_EINT2_SHIFT 15 /* IM_SPK_OVERHEAT_WARN_EINT2 */ |
| 5209 | #define ARIZONA_IM_SPK_SHUTDOWN_WARN_EINT2_WIDTH 1 /* IM_SPK_SHUTDOWN_WARN_EINT2 */ | 5664 | #define ARIZONA_IM_SPK_OVERHEAT_WARN_EINT2_WIDTH 1 /* IM_SPK_OVERHEAT_WARN_EINT2 */ |
| 5210 | #define ARIZONA_IM_SPK_SHUTDOWN_EINT2 0x4000 /* IM_SPK_SHUTDOWN_EINT2 */ | 5665 | #define ARIZONA_IM_SPK_OVERHEAT_EINT2 0x4000 /* IM_SPK_OVERHEAT_EINT2 */ |
| 5211 | #define ARIZONA_IM_SPK_SHUTDOWN_EINT2_MASK 0x4000 /* IM_SPK_SHUTDOWN_EINT2 */ | 5666 | #define ARIZONA_IM_SPK_OVERHEAT_EINT2_MASK 0x4000 /* IM_SPK_OVERHEAT_EINT2 */ |
| 5212 | #define ARIZONA_IM_SPK_SHUTDOWN_EINT2_SHIFT 14 /* IM_SPK_SHUTDOWN_EINT2 */ | 5667 | #define ARIZONA_IM_SPK_OVERHEAT_EINT2_SHIFT 14 /* IM_SPK_OVERHEAT_EINT2 */ |
| 5213 | #define ARIZONA_IM_SPK_SHUTDOWN_EINT2_WIDTH 1 /* IM_SPK_SHUTDOWN_EINT2 */ | 5668 | #define ARIZONA_IM_SPK_OVERHEAT_EINT2_WIDTH 1 /* IM_SPK_OVERHEAT_EINT2 */ |
| 5214 | #define ARIZONA_IM_HPDET_EINT2 0x2000 /* IM_HPDET_EINT2 */ | 5669 | #define ARIZONA_IM_HPDET_EINT2 0x2000 /* IM_HPDET_EINT2 */ |
| 5215 | #define ARIZONA_IM_HPDET_EINT2_MASK 0x2000 /* IM_HPDET_EINT2 */ | 5670 | #define ARIZONA_IM_HPDET_EINT2_MASK 0x2000 /* IM_HPDET_EINT2 */ |
| 5216 | #define ARIZONA_IM_HPDET_EINT2_SHIFT 13 /* IM_HPDET_EINT2 */ | 5671 | #define ARIZONA_IM_HPDET_EINT2_SHIFT 13 /* IM_HPDET_EINT2 */ |
| @@ -5307,6 +5762,77 @@ | |||
| 5307 | #define ARIZONA_IM_ISRC2_CFG_ERR_EINT2_MASK 0x0040 /* IM_ISRC2_CFG_ERR_EINT2 */ | 5762 | #define ARIZONA_IM_ISRC2_CFG_ERR_EINT2_MASK 0x0040 /* IM_ISRC2_CFG_ERR_EINT2 */ |
| 5308 | #define ARIZONA_IM_ISRC2_CFG_ERR_EINT2_SHIFT 6 /* IM_ISRC2_CFG_ERR_EINT2 */ | 5763 | #define ARIZONA_IM_ISRC2_CFG_ERR_EINT2_SHIFT 6 /* IM_ISRC2_CFG_ERR_EINT2 */ |
| 5309 | #define ARIZONA_IM_ISRC2_CFG_ERR_EINT2_WIDTH 1 /* IM_ISRC2_CFG_ERR_EINT2 */ | 5764 | #define ARIZONA_IM_ISRC2_CFG_ERR_EINT2_WIDTH 1 /* IM_ISRC2_CFG_ERR_EINT2 */ |
| 5765 | #define ARIZONA_IM_HP3R_DONE_EINT2 0x0020 /* IM_HP3R_DONE_EINT2 */ | ||
| 5766 | #define ARIZONA_IM_HP3R_DONE_EINT2_MASK 0x0020 /* IM_HP3R_DONE_EINT2 */ | ||
| 5767 | #define ARIZONA_IM_HP3R_DONE_EINT2_SHIFT 5 /* IM_HP3R_DONE_EINT2 */ | ||
| 5768 | #define ARIZONA_IM_HP3R_DONE_EINT2_WIDTH 1 /* IM_HP3R_DONE_EINT2 */ | ||
| 5769 | #define ARIZONA_IM_HP3L_DONE_EINT2 0x0010 /* IM_HP3L_DONE_EINT2 */ | ||
| 5770 | #define ARIZONA_IM_HP3L_DONE_EINT2_MASK 0x0010 /* IM_HP3L_DONE_EINT2 */ | ||
| 5771 | #define ARIZONA_IM_HP3L_DONE_EINT2_SHIFT 4 /* IM_HP3L_DONE_EINT2 */ | ||
| 5772 | #define ARIZONA_IM_HP3L_DONE_EINT2_WIDTH 1 /* IM_HP3L_DONE_EINT2 */ | ||
| 5773 | #define ARIZONA_IM_HP2R_DONE_EINT2 0x0008 /* IM_HP2R_DONE_EINT2 */ | ||
| 5774 | #define ARIZONA_IM_HP2R_DONE_EINT2_MASK 0x0008 /* IM_HP2R_DONE_EINT2 */ | ||
| 5775 | #define ARIZONA_IM_HP2R_DONE_EINT2_SHIFT 3 /* IM_HP2R_DONE_EINT2 */ | ||
| 5776 | #define ARIZONA_IM_HP2R_DONE_EINT2_WIDTH 1 /* IM_HP2R_DONE_EINT2 */ | ||
| 5777 | #define ARIZONA_IM_HP2L_DONE_EINT2 0x0004 /* IM_HP2L_DONE_EINT2 */ | ||
| 5778 | #define ARIZONA_IM_HP2L_DONE_EINT2_MASK 0x0004 /* IM_HP2L_DONE_EINT2 */ | ||
| 5779 | #define ARIZONA_IM_HP2L_DONE_EINT2_SHIFT 2 /* IM_HP2L_DONE_EINT2 */ | ||
| 5780 | #define ARIZONA_IM_HP2L_DONE_EINT2_WIDTH 1 /* IM_HP2L_DONE_EINT2 */ | ||
| 5781 | #define ARIZONA_IM_HP1R_DONE_EINT2 0x0002 /* IM_HP1R_DONE_EINT2 */ | ||
| 5782 | #define ARIZONA_IM_HP1R_DONE_EINT2_MASK 0x0002 /* IM_HP1R_DONE_EINT2 */ | ||
| 5783 | #define ARIZONA_IM_HP1R_DONE_EINT2_SHIFT 1 /* IM_HP1R_DONE_EINT2 */ | ||
| 5784 | #define ARIZONA_IM_HP1R_DONE_EINT2_WIDTH 1 /* IM_HP1R_DONE_EINT2 */ | ||
| 5785 | #define ARIZONA_IM_HP1L_DONE_EINT2 0x0001 /* IM_HP1L_DONE_EINT2 */ | ||
| 5786 | #define ARIZONA_IM_HP1L_DONE_EINT2_MASK 0x0001 /* IM_HP1L_DONE_EINT2 */ | ||
| 5787 | #define ARIZONA_IM_HP1L_DONE_EINT2_SHIFT 0 /* IM_HP1L_DONE_EINT2 */ | ||
| 5788 | #define ARIZONA_IM_HP1L_DONE_EINT2_WIDTH 1 /* IM_HP1L_DONE_EINT2 */ | ||
| 5789 | |||
| 5790 | /* | ||
| 5791 | * R3355 (0xD1B) - IRQ2 Status 4 Mask (Alternate layout) | ||
| 5792 | * | ||
| 5793 | * Alternate layout used on later devices, note only fields that have moved | ||
| 5794 | * are specified | ||
| 5795 | */ | ||
| 5796 | #define ARIZONA_V2_IM_AIF3_ERR_EINT2 0x8000 /* IM_AIF3_ERR_EINT2 */ | ||
| 5797 | #define ARIZONA_V2_IM_AIF3_ERR_EINT2_MASK 0x8000 /* IM_AIF3_ERR_EINT2 */ | ||
| 5798 | #define ARIZONA_V2_IM_AIF3_ERR_EINT2_SHIFT 15 /* IM_AIF3_ERR_EINT2 */ | ||
| 5799 | #define ARIZONA_V2_IM_AIF3_ERR_EINT2_WIDTH 1 /* IM_AIF3_ERR_EINT2 */ | ||
| 5800 | #define ARIZONA_V2_IM_AIF2_ERR_EINT2 0x4000 /* IM_AIF2_ERR_EINT2 */ | ||
| 5801 | #define ARIZONA_V2_IM_AIF2_ERR_EINT2_MASK 0x4000 /* IM_AIF2_ERR_EINT2 */ | ||
| 5802 | #define ARIZONA_V2_IM_AIF2_ERR_EINT2_SHIFT 14 /* IM_AIF2_ERR_EINT2 */ | ||
| 5803 | #define ARIZONA_V2_IM_AIF2_ERR_EINT2_WIDTH 1 /* IM_AIF2_ERR_EINT2 */ | ||
| 5804 | #define ARIZONA_V2_IM_AIF1_ERR_EINT2 0x2000 /* IM_AIF1_ERR_EINT2 */ | ||
| 5805 | #define ARIZONA_V2_IM_AIF1_ERR_EINT2_MASK 0x2000 /* IM_AIF1_ERR_EINT2 */ | ||
| 5806 | #define ARIZONA_V2_IM_AIF1_ERR_EINT2_SHIFT 13 /* IM_AIF1_ERR_EINT2 */ | ||
| 5807 | #define ARIZONA_V2_IM_AIF1_ERR_EINT2_WIDTH 1 /* IM_AIF1_ERR_EINT2 */ | ||
| 5808 | #define ARIZONA_V2_IM_CTRLIF_ERR_EINT2 0x1000 /* IM_CTRLIF_ERR_EINT2 */ | ||
| 5809 | #define ARIZONA_V2_IM_CTRLIF_ERR_EINT2_MASK 0x1000 /* IM_CTRLIF_ERR_EINT2 */ | ||
| 5810 | #define ARIZONA_V2_IM_CTRLIF_ERR_EINT2_SHIFT 12 /* IM_CTRLIF_ERR_EINT2 */ | ||
| 5811 | #define ARIZONA_V2_IM_CTRLIF_ERR_EINT2_WIDTH 1 /* IM_CTRLIF_ERR_EINT2 */ | ||
| 5812 | #define ARIZONA_V2_IM_MIXER_DROPPED_SAMPLE_EINT2 0x0800 /* IM_MIXER_DROPPED_SAMPLE_EINT2 */ | ||
| 5813 | #define ARIZONA_V2_IM_MIXER_DROPPED_SAMPLE_EINT2_MASK 0x0800 /* IM_MIXER_DROPPED_SAMPLE_EINT2 */ | ||
| 5814 | #define ARIZONA_V2_IM_MIXER_DROPPED_SAMPLE_EINT2_SHIFT 11 /* IM_MIXER_DROPPED_SAMPLE_EINT2 */ | ||
| 5815 | #define ARIZONA_V2_IM_MIXER_DROPPED_SAMPLE_EINT2_WIDTH 1 /* IM_MIXER_DROPPED_SAMPLE_EINT2 */ | ||
| 5816 | #define ARIZONA_V2_IM_ASYNC_CLK_ENA_LOW_EINT2 0x0400 /* IM_ASYNC_CLK_ENA_LOW_EINT2 */ | ||
| 5817 | #define ARIZONA_V2_IM_ASYNC_CLK_ENA_LOW_EINT2_MASK 0x0400 /* IM_ASYNC_CLK_ENA_LOW_EINT2 */ | ||
| 5818 | #define ARIZONA_V2_IM_ASYNC_CLK_ENA_LOW_EINT2_SHIFT 10 /* IM_ASYNC_CLK_ENA_LOW_EINT2 */ | ||
| 5819 | #define ARIZONA_V2_IM_ASYNC_CLK_ENA_LOW_EINT2_WIDTH 1 /* IM_ASYNC_CLK_ENA_LOW_EINT2 */ | ||
| 5820 | #define ARIZONA_V2_IM_SYSCLK_ENA_LOW_EINT2 0x0200 /* IM_SYSCLK_ENA_LOW_EINT2 */ | ||
| 5821 | #define ARIZONA_V2_IM_SYSCLK_ENA_LOW_EINT2_MASK 0x0200 /* IM_SYSCLK_ENA_LOW_EINT2 */ | ||
| 5822 | #define ARIZONA_V2_IM_SYSCLK_ENA_LOW_EINT2_SHIFT 9 /* IM_SYSCLK_ENA_LOW_EINT2 */ | ||
| 5823 | #define ARIZONA_V2_IM_SYSCLK_ENA_LOW_EINT2_WIDTH 1 /* IM_SYSCLK_ENA_LOW_EINT2 */ | ||
| 5824 | #define ARIZONA_V2_IM_ISRC1_CFG_ERR_EINT2 0x0100 /* IM_ISRC1_CFG_ERR_EINT2 */ | ||
| 5825 | #define ARIZONA_V2_IM_ISRC1_CFG_ERR_EINT2_MASK 0x0100 /* IM_ISRC1_CFG_ERR_EINT2 */ | ||
| 5826 | #define ARIZONA_V2_IM_ISRC1_CFG_ERR_EINT2_SHIFT 8 /* IM_ISRC1_CFG_ERR_EINT2 */ | ||
| 5827 | #define ARIZONA_V2_IM_ISRC1_CFG_ERR_EINT2_WIDTH 1 /* IM_ISRC1_CFG_ERR_EINT2 */ | ||
| 5828 | #define ARIZONA_V2_IM_ISRC2_CFG_ERR_EINT2 0x0080 /* IM_ISRC2_CFG_ERR_EINT2 */ | ||
| 5829 | #define ARIZONA_V2_IM_ISRC2_CFG_ERR_EINT2_MASK 0x0080 /* IM_ISRC2_CFG_ERR_EINT2 */ | ||
| 5830 | #define ARIZONA_V2_IM_ISRC2_CFG_ERR_EINT2_SHIFT 7 /* IM_ISRC2_CFG_ERR_EINT2 */ | ||
| 5831 | #define ARIZONA_V2_IM_ISRC2_CFG_ERR_EINT2_WIDTH 1 /* IM_ISRC2_CFG_ERR_EINT2 */ | ||
| 5832 | #define ARIZONA_V2_IM_ISRC3_CFG_ERR_EINT2 0x0040 /* IM_ISRC3_CFG_ERR_EINT2 */ | ||
| 5833 | #define ARIZONA_V2_IM_ISRC3_CFG_ERR_EINT2_MASK 0x0040 /* IM_ISRC3_CFG_ERR_EINT2 */ | ||
| 5834 | #define ARIZONA_V2_IM_ISRC3_CFG_ERR_EINT2_SHIFT 6 /* IM_ISRC3_CFG_ERR_EINT2 */ | ||
| 5835 | #define ARIZONA_V2_IM_ISRC3_CFG_ERR_EINT2_WIDTH 1 /* IM_ISRC3_CFG_ERR_EINT2 */ | ||
| 5310 | 5836 | ||
| 5311 | /* | 5837 | /* |
| 5312 | * R3356 (0xD1C) - IRQ2 Status 5 Mask | 5838 | * R3356 (0xD1C) - IRQ2 Status 5 Mask |
| @@ -5334,6 +5860,85 @@ | |||
| 5334 | #define ARIZONA_IM_FLL1_CLOCK_OK_EINT2_WIDTH 1 /* IM_FLL1_CLOCK_OK_EINT2 */ | 5860 | #define ARIZONA_IM_FLL1_CLOCK_OK_EINT2_WIDTH 1 /* IM_FLL1_CLOCK_OK_EINT2 */ |
| 5335 | 5861 | ||
| 5336 | /* | 5862 | /* |
| 5863 | * R3340 (0xD0C) - Interrupt Status 5 Mask (Alternate layout) | ||
| 5864 | * | ||
| 5865 | * Alternate layout used on later devices, note only fields that have moved | ||
| 5866 | * are specified | ||
| 5867 | */ | ||
| 5868 | #define ARIZONA_V2_IM_ASRC_CFG_ERR_EINT2 0x0008 /* IM_ASRC_CFG_ERR_EINT2 */ | ||
| 5869 | #define ARIZONA_V2_IM_ASRC_CFG_ERR_EINT2_MASK 0x0008 /* IM_ASRC_CFG_ERR_EINT2 */ | ||
| 5870 | #define ARIZONA_V2_IM_ASRC_CFG_ERR_EINT2_SHIFT 3 /* IM_ASRC_CFG_ERR_EINT2 */ | ||
| 5871 | #define ARIZONA_V2_IM_ASRC_CFG_ERR_EINT2_WIDTH 1 /* IM_ASRC_CFG_ERR_EINT2 */ | ||
| 5872 | |||
| 5873 | /* | ||
| 5874 | * R3357 (0xD1D) - IRQ2 Status 6 Mask | ||
| 5875 | */ | ||
| 5876 | #define ARIZONA_IM_DSP_SHARED_WR_COLL_EINT2 0x8000 /* IM_DSP_SHARED_WR_COLL_EINT2 */ | ||
| 5877 | #define ARIZONA_IM_DSP_SHARED_WR_COLL_EINT2_MASK 0x8000 /* IM_DSP_SHARED_WR_COLL_EINT2 */ | ||
| 5878 | #define ARIZONA_IM_DSP_SHARED_WR_COLL_EINT2_SHIFT 15 /* IM_DSP_SHARED_WR_COLL_EINT2 */ | ||
| 5879 | #define ARIZONA_IM_DSP_SHARED_WR_COLL_EINT2_WIDTH 1 /* IM_DSP_SHARED_WR_COLL_EINT2 */ | ||
| 5880 | #define ARIZONA_IM_SPK_SHUTDOWN_EINT2 0x4000 /* IM_SPK_SHUTDOWN_EINT2 */ | ||
| 5881 | #define ARIZONA_IM_SPK_SHUTDOWN_EINT2_MASK 0x4000 /* IM_SPK_SHUTDOWN_EINT2 */ | ||
| 5882 | #define ARIZONA_IM_SPK_SHUTDOWN_EINT2_SHIFT 14 /* IM_SPK_SHUTDOWN_EINT2 */ | ||
| 5883 | #define ARIZONA_IM_SPK_SHUTDOWN_EINT2_WIDTH 1 /* IM_SPK_SHUTDOWN_EINT2 */ | ||
| 5884 | #define ARIZONA_IM_SPK1R_SHORT_EINT2 0x2000 /* IM_SPK1R_SHORT_EINT2 */ | ||
| 5885 | #define ARIZONA_IM_SPK1R_SHORT_EINT2_MASK 0x2000 /* IM_SPK1R_SHORT_EINT2 */ | ||
| 5886 | #define ARIZONA_IM_SPK1R_SHORT_EINT2_SHIFT 13 /* IM_SPK1R_SHORT_EINT2 */ | ||
| 5887 | #define ARIZONA_IM_SPK1R_SHORT_EINT2_WIDTH 1 /* IM_SPK1R_SHORT_EINT2 */ | ||
| 5888 | #define ARIZONA_IM_SPK1L_SHORT_EINT2 0x1000 /* IM_SPK1L_SHORT_EINT2 */ | ||
| 5889 | #define ARIZONA_IM_SPK1L_SHORT_EINT2_MASK 0x1000 /* IM_SPK1L_SHORT_EINT2 */ | ||
| 5890 | #define ARIZONA_IM_SPK1L_SHORT_EINT2_SHIFT 12 /* IM_SPK1L_SHORT_EINT2 */ | ||
| 5891 | #define ARIZONA_IM_SPK1L_SHORT_EINT2_WIDTH 1 /* IM_SPK1L_SHORT_EINT2 */ | ||
| 5892 | #define ARIZONA_IM_HP3R_SC_NEG_EINT2 0x0800 /* IM_HP3R_SC_NEG_EINT2 */ | ||
| 5893 | #define ARIZONA_IM_HP3R_SC_NEG_EINT2_MASK 0x0800 /* IM_HP3R_SC_NEG_EINT2 */ | ||
| 5894 | #define ARIZONA_IM_HP3R_SC_NEG_EINT2_SHIFT 11 /* IM_HP3R_SC_NEG_EINT2 */ | ||
| 5895 | #define ARIZONA_IM_HP3R_SC_NEG_EINT2_WIDTH 1 /* IM_HP3R_SC_NEG_EINT2 */ | ||
| 5896 | #define ARIZONA_IM_HP3R_SC_POS_EINT2 0x0400 /* IM_HP3R_SC_POS_EINT2 */ | ||
| 5897 | #define ARIZONA_IM_HP3R_SC_POS_EINT2_MASK 0x0400 /* IM_HP3R_SC_POS_EINT2 */ | ||
| 5898 | #define ARIZONA_IM_HP3R_SC_POS_EINT2_SHIFT 10 /* IM_HP3R_SC_POS_EINT2 */ | ||
| 5899 | #define ARIZONA_IM_HP3R_SC_POS_EINT2_WIDTH 1 /* IM_HP3R_SC_POS_EINT2 */ | ||
| 5900 | #define ARIZONA_IM_HP3L_SC_NEG_EINT2 0x0200 /* IM_HP3L_SC_NEG_EINT2 */ | ||
| 5901 | #define ARIZONA_IM_HP3L_SC_NEG_EINT2_MASK 0x0200 /* IM_HP3L_SC_NEG_EINT2 */ | ||
| 5902 | #define ARIZONA_IM_HP3L_SC_NEG_EINT2_SHIFT 9 /* IM_HP3L_SC_NEG_EINT2 */ | ||
| 5903 | #define ARIZONA_IM_HP3L_SC_NEG_EINT2_WIDTH 1 /* IM_HP3L_SC_NEG_EINT2 */ | ||
| 5904 | #define ARIZONA_IM_HP3L_SC_POS_EINT2 0x0100 /* IM_HP3L_SC_POS_EINT2 */ | ||
| 5905 | #define ARIZONA_IM_HP3L_SC_POS_EINT2_MASK 0x0100 /* IM_HP3L_SC_POS_EINT2 */ | ||
| 5906 | #define ARIZONA_IM_HP3L_SC_POS_EINT2_SHIFT 8 /* IM_HP3L_SC_POS_EINT2 */ | ||
| 5907 | #define ARIZONA_IM_HP3L_SC_POS_EINT2_WIDTH 1 /* IM_HP3L_SC_POS_EINT2 */ | ||
| 5908 | #define ARIZONA_IM_HP2R_SC_NEG_EINT2 0x0080 /* IM_HP2R_SC_NEG_EINT2 */ | ||
| 5909 | #define ARIZONA_IM_HP2R_SC_NEG_EINT2_MASK 0x0080 /* IM_HP2R_SC_NEG_EINT2 */ | ||
| 5910 | #define ARIZONA_IM_HP2R_SC_NEG_EINT2_SHIFT 7 /* IM_HP2R_SC_NEG_EINT2 */ | ||
| 5911 | #define ARIZONA_IM_HP2R_SC_NEG_EINT2_WIDTH 1 /* IM_HP2R_SC_NEG_EINT2 */ | ||
| 5912 | #define ARIZONA_IM_HP2R_SC_POS_EINT2 0x0040 /* IM_HP2R_SC_POS_EINT2 */ | ||
| 5913 | #define ARIZONA_IM_HP2R_SC_POS_EINT2_MASK 0x0040 /* IM_HP2R_SC_POS_EINT2 */ | ||
| 5914 | #define ARIZONA_IM_HP2R_SC_POS_EINT2_SHIFT 6 /* IM_HP2R_SC_POS_EINT2 */ | ||
| 5915 | #define ARIZONA_IM_HP2R_SC_POS_EINT2_WIDTH 1 /* IM_HP2R_SC_POS_EINT2 */ | ||
| 5916 | #define ARIZONA_IM_HP2L_SC_NEG_EINT2 0x0020 /* IM_HP2L_SC_NEG_EINT2 */ | ||
| 5917 | #define ARIZONA_IM_HP2L_SC_NEG_EINT2_MASK 0x0020 /* IM_HP2L_SC_NEG_EINT2 */ | ||
| 5918 | #define ARIZONA_IM_HP2L_SC_NEG_EINT2_SHIFT 5 /* IM_HP2L_SC_NEG_EINT2 */ | ||
| 5919 | #define ARIZONA_IM_HP2L_SC_NEG_EINT2_WIDTH 1 /* IM_HP2L_SC_NEG_EINT2 */ | ||
| 5920 | #define ARIZONA_IM_HP2L_SC_POS_EINT2 0x0010 /* IM_HP2L_SC_POS_EINT2 */ | ||
| 5921 | #define ARIZONA_IM_HP2L_SC_POS_EINT2_MASK 0x0010 /* IM_HP2L_SC_POS_EINT2 */ | ||
| 5922 | #define ARIZONA_IM_HP2L_SC_POS_EINT2_SHIFT 4 /* IM_HP2L_SC_POS_EINT2 */ | ||
| 5923 | #define ARIZONA_IM_HP2L_SC_POS_EINT2_WIDTH 1 /* IM_HP2L_SC_POS_EINT2 */ | ||
| 5924 | #define ARIZONA_IM_HP1R_SC_NEG_EINT2 0x0008 /* IM_HP1R_SC_NEG_EINT2 */ | ||
| 5925 | #define ARIZONA_IM_HP1R_SC_NEG_EINT2_MASK 0x0008 /* IM_HP1R_SC_NEG_EINT2 */ | ||
| 5926 | #define ARIZONA_IM_HP1R_SC_NEG_EINT2_SHIFT 3 /* IM_HP1R_SC_NEG_EINT2 */ | ||
| 5927 | #define ARIZONA_IM_HP1R_SC_NEG_EINT2_WIDTH 1 /* IM_HP1R_SC_NEG_EINT2 */ | ||
| 5928 | #define ARIZONA_IM_HP1R_SC_POS_EINT2 0x0004 /* IM_HP1R_SC_POS_EINT2 */ | ||
| 5929 | #define ARIZONA_IM_HP1R_SC_POS_EINT2_MASK 0x0004 /* IM_HP1R_SC_POS_EINT2 */ | ||
| 5930 | #define ARIZONA_IM_HP1R_SC_POS_EINT2_SHIFT 2 /* IM_HP1R_SC_POS_EINT2 */ | ||
| 5931 | #define ARIZONA_IM_HP1R_SC_POS_EINT2_WIDTH 1 /* IM_HP1R_SC_POS_EINT2 */ | ||
| 5932 | #define ARIZONA_IM_HP1L_SC_NEG_EINT2 0x0002 /* IM_HP1L_SC_NEG_EINT2 */ | ||
| 5933 | #define ARIZONA_IM_HP1L_SC_NEG_EINT2_MASK 0x0002 /* IM_HP1L_SC_NEG_EINT2 */ | ||
| 5934 | #define ARIZONA_IM_HP1L_SC_NEG_EINT2_SHIFT 1 /* IM_HP1L_SC_NEG_EINT2 */ | ||
| 5935 | #define ARIZONA_IM_HP1L_SC_NEG_EINT2_WIDTH 1 /* IM_HP1L_SC_NEG_EINT2 */ | ||
| 5936 | #define ARIZONA_IM_HP1L_SC_POS_EINT2 0x0001 /* IM_HP1L_SC_POS_EINT2 */ | ||
| 5937 | #define ARIZONA_IM_HP1L_SC_POS_EINT2_MASK 0x0001 /* IM_HP1L_SC_POS_EINT2 */ | ||
| 5938 | #define ARIZONA_IM_HP1L_SC_POS_EINT2_SHIFT 0 /* IM_HP1L_SC_POS_EINT2 */ | ||
| 5939 | #define ARIZONA_IM_HP1L_SC_POS_EINT2_WIDTH 1 /* IM_HP1L_SC_POS_EINT2 */ | ||
| 5940 | |||
| 5941 | /* | ||
| 5337 | * R3359 (0xD1F) - IRQ2 Control | 5942 | * R3359 (0xD1F) - IRQ2 Control |
| 5338 | */ | 5943 | */ |
| 5339 | #define ARIZONA_IM_IRQ2 0x0001 /* IM_IRQ2 */ | 5944 | #define ARIZONA_IM_IRQ2 0x0001 /* IM_IRQ2 */ |
| @@ -5360,14 +5965,14 @@ | |||
| 5360 | /* | 5965 | /* |
| 5361 | * R3361 (0xD21) - Interrupt Raw Status 3 | 5966 | * R3361 (0xD21) - Interrupt Raw Status 3 |
| 5362 | */ | 5967 | */ |
| 5363 | #define ARIZONA_SPK_SHUTDOWN_WARN_STS 0x8000 /* SPK_SHUTDOWN_WARN_STS */ | 5968 | #define ARIZONA_SPK_OVERHEAT_WARN_STS 0x8000 /* SPK_OVERHEAT_WARN_STS */ |
| 5364 | #define ARIZONA_SPK_SHUTDOWN_WARN_STS_MASK 0x8000 /* SPK_SHUTDOWN_WARN_STS */ | 5969 | #define ARIZONA_SPK_OVERHEAT_WARN_STS_MASK 0x8000 /* SPK_OVERHEAT_WARN_STS */ |
| 5365 | #define ARIZONA_SPK_SHUTDOWN_WARN_STS_SHIFT 15 /* SPK_SHUTDOWN_WARN_STS */ | 5970 | #define ARIZONA_SPK_OVERHEAT_WARN_STS_SHIFT 15 /* SPK_OVERHEAT_WARN_STS */ |
| 5366 | #define ARIZONA_SPK_SHUTDOWN_WARN_STS_WIDTH 1 /* SPK_SHUTDOWN_WARN_STS */ | 5971 | #define ARIZONA_SPK_OVERHEAT_WARN_STS_WIDTH 1 /* SPK_OVERHEAT_WARN_STS */ |
| 5367 | #define ARIZONA_SPK_SHUTDOWN_STS 0x4000 /* SPK_SHUTDOWN_STS */ | 5972 | #define ARIZONA_SPK_OVERHEAT_STS 0x4000 /* SPK_OVERHEAT_STS */ |
| 5368 | #define ARIZONA_SPK_SHUTDOWN_STS_MASK 0x4000 /* SPK_SHUTDOWN_STS */ | 5973 | #define ARIZONA_SPK_OVERHEAT_STS_MASK 0x4000 /* SPK_OVERHEAT_STS */ |
| 5369 | #define ARIZONA_SPK_SHUTDOWN_STS_SHIFT 14 /* SPK_SHUTDOWN_STS */ | 5974 | #define ARIZONA_SPK_OVERHEAT_STS_SHIFT 14 /* SPK_OVERHEAT_STS */ |
| 5370 | #define ARIZONA_SPK_SHUTDOWN_STS_WIDTH 1 /* SPK_SHUTDOWN_STS */ | 5975 | #define ARIZONA_SPK_OVERHEAT_STS_WIDTH 1 /* SPK_OVERHEAT_STS */ |
| 5371 | #define ARIZONA_HPDET_STS 0x2000 /* HPDET_STS */ | 5976 | #define ARIZONA_HPDET_STS 0x2000 /* HPDET_STS */ |
| 5372 | #define ARIZONA_HPDET_STS_MASK 0x2000 /* HPDET_STS */ | 5977 | #define ARIZONA_HPDET_STS_MASK 0x2000 /* HPDET_STS */ |
| 5373 | #define ARIZONA_HPDET_STS_SHIFT 13 /* HPDET_STS */ | 5978 | #define ARIZONA_HPDET_STS_SHIFT 13 /* HPDET_STS */ |
| @@ -5464,6 +6069,30 @@ | |||
| 5464 | #define ARIZONA_ISRC2_CFG_ERR_STS_MASK 0x0040 /* ISRC2_CFG_ERR_STS */ | 6069 | #define ARIZONA_ISRC2_CFG_ERR_STS_MASK 0x0040 /* ISRC2_CFG_ERR_STS */ |
| 5465 | #define ARIZONA_ISRC2_CFG_ERR_STS_SHIFT 6 /* ISRC2_CFG_ERR_STS */ | 6070 | #define ARIZONA_ISRC2_CFG_ERR_STS_SHIFT 6 /* ISRC2_CFG_ERR_STS */ |
| 5466 | #define ARIZONA_ISRC2_CFG_ERR_STS_WIDTH 1 /* ISRC2_CFG_ERR_STS */ | 6071 | #define ARIZONA_ISRC2_CFG_ERR_STS_WIDTH 1 /* ISRC2_CFG_ERR_STS */ |
| 6072 | #define ARIZONA_HP3R_DONE_STS 0x0020 /* HP3R_DONE_STS */ | ||
| 6073 | #define ARIZONA_HP3R_DONE_STS_MASK 0x0020 /* HP3R_DONE_STS */ | ||
| 6074 | #define ARIZONA_HP3R_DONE_STS_SHIFT 5 /* HP3R_DONE_STS */ | ||
| 6075 | #define ARIZONA_HP3R_DONE_STS_WIDTH 1 /* HP3R_DONE_STS */ | ||
| 6076 | #define ARIZONA_HP3L_DONE_STS 0x0010 /* HP3L_DONE_STS */ | ||
| 6077 | #define ARIZONA_HP3L_DONE_STS_MASK 0x0010 /* HP3L_DONE_STS */ | ||
| 6078 | #define ARIZONA_HP3L_DONE_STS_SHIFT 4 /* HP3L_DONE_STS */ | ||
| 6079 | #define ARIZONA_HP3L_DONE_STS_WIDTH 1 /* HP3L_DONE_STS */ | ||
| 6080 | #define ARIZONA_HP2R_DONE_STS 0x0008 /* HP2R_DONE_STS */ | ||
| 6081 | #define ARIZONA_HP2R_DONE_STS_MASK 0x0008 /* HP2R_DONE_STS */ | ||
| 6082 | #define ARIZONA_HP2R_DONE_STS_SHIFT 3 /* HP2R_DONE_STS */ | ||
| 6083 | #define ARIZONA_HP2R_DONE_STS_WIDTH 1 /* HP2R_DONE_STS */ | ||
| 6084 | #define ARIZONA_HP2L_DONE_STS 0x0004 /* HP2L_DONE_STS */ | ||
| 6085 | #define ARIZONA_HP2L_DONE_STS_MASK 0x0004 /* HP2L_DONE_STS */ | ||
| 6086 | #define ARIZONA_HP2L_DONE_STS_SHIFT 2 /* HP2L_DONE_STS */ | ||
| 6087 | #define ARIZONA_HP2L_DONE_STS_WIDTH 1 /* HP2L_DONE_STS */ | ||
| 6088 | #define ARIZONA_HP1R_DONE_STS 0x0002 /* HP1R_DONE_STS */ | ||
| 6089 | #define ARIZONA_HP1R_DONE_STS_MASK 0x0002 /* HP1R_DONE_STS */ | ||
| 6090 | #define ARIZONA_HP1R_DONE_STS_SHIFT 1 /* HP1R_DONE_STS */ | ||
| 6091 | #define ARIZONA_HP1R_DONE_STS_WIDTH 1 /* HP1R_DONE_STS */ | ||
| 6092 | #define ARIZONA_HP1L_DONE_STS 0x0001 /* HP1L_DONE_STS */ | ||
| 6093 | #define ARIZONA_HP1L_DONE_STS_MASK 0x0001 /* HP1L_DONE_STS */ | ||
| 6094 | #define ARIZONA_HP1L_DONE_STS_SHIFT 0 /* HP1L_DONE_STS */ | ||
| 6095 | #define ARIZONA_HP1L_DONE_STS_WIDTH 1 /* HP1L_DONE_STS */ | ||
| 5467 | 6096 | ||
| 5468 | /* | 6097 | /* |
| 5469 | * R3363 (0xD23) - Interrupt Raw Status 5 | 6098 | * R3363 (0xD23) - Interrupt Raw Status 5 |
| @@ -5580,6 +6209,10 @@ | |||
| 5580 | #define ARIZONA_ADSP2_1_OVERCLOCKED_STS_MASK 0x0008 /* ADSP2_1_OVERCLOCKED_STS */ | 6209 | #define ARIZONA_ADSP2_1_OVERCLOCKED_STS_MASK 0x0008 /* ADSP2_1_OVERCLOCKED_STS */ |
| 5581 | #define ARIZONA_ADSP2_1_OVERCLOCKED_STS_SHIFT 3 /* ADSP2_1_OVERCLOCKED_STS */ | 6210 | #define ARIZONA_ADSP2_1_OVERCLOCKED_STS_SHIFT 3 /* ADSP2_1_OVERCLOCKED_STS */ |
| 5582 | #define ARIZONA_ADSP2_1_OVERCLOCKED_STS_WIDTH 1 /* ADSP2_1_OVERCLOCKED_STS */ | 6211 | #define ARIZONA_ADSP2_1_OVERCLOCKED_STS_WIDTH 1 /* ADSP2_1_OVERCLOCKED_STS */ |
| 6212 | #define ARIZONA_ISRC3_OVERCLOCKED_STS 0x0004 /* ISRC3_OVERCLOCKED_STS */ | ||
| 6213 | #define ARIZONA_ISRC3_OVERCLOCKED_STS_MASK 0x0004 /* ISRC3_OVERCLOCKED_STS */ | ||
| 6214 | #define ARIZONA_ISRC3_OVERCLOCKED_STS_SHIFT 2 /* ISRC3_OVERCLOCKED_STS */ | ||
| 6215 | #define ARIZONA_ISRC3_OVERCLOCKED_STS_WIDTH 1 /* ISRC3_OVERCLOCKED_STS */ | ||
| 5583 | #define ARIZONA_ISRC2_OVERCLOCKED_STS 0x0002 /* ISRC2_OVERCLOCKED_STS */ | 6216 | #define ARIZONA_ISRC2_OVERCLOCKED_STS 0x0002 /* ISRC2_OVERCLOCKED_STS */ |
| 5584 | #define ARIZONA_ISRC2_OVERCLOCKED_STS_MASK 0x0002 /* ISRC2_OVERCLOCKED_STS */ | 6217 | #define ARIZONA_ISRC2_OVERCLOCKED_STS_MASK 0x0002 /* ISRC2_OVERCLOCKED_STS */ |
| 5585 | #define ARIZONA_ISRC2_OVERCLOCKED_STS_SHIFT 1 /* ISRC2_OVERCLOCKED_STS */ | 6218 | #define ARIZONA_ISRC2_OVERCLOCKED_STS_SHIFT 1 /* ISRC2_OVERCLOCKED_STS */ |
| @@ -5604,6 +6237,10 @@ | |||
| 5604 | #define ARIZONA_AIF1_UNDERCLOCKED_STS_MASK 0x0100 /* AIF1_UNDERCLOCKED_STS */ | 6237 | #define ARIZONA_AIF1_UNDERCLOCKED_STS_MASK 0x0100 /* AIF1_UNDERCLOCKED_STS */ |
| 5605 | #define ARIZONA_AIF1_UNDERCLOCKED_STS_SHIFT 8 /* AIF1_UNDERCLOCKED_STS */ | 6238 | #define ARIZONA_AIF1_UNDERCLOCKED_STS_SHIFT 8 /* AIF1_UNDERCLOCKED_STS */ |
| 5606 | #define ARIZONA_AIF1_UNDERCLOCKED_STS_WIDTH 1 /* AIF1_UNDERCLOCKED_STS */ | 6239 | #define ARIZONA_AIF1_UNDERCLOCKED_STS_WIDTH 1 /* AIF1_UNDERCLOCKED_STS */ |
| 6240 | #define ARIZONA_ISRC3_UNDERCLOCKED_STS 0x0080 /* ISRC3_UNDERCLOCKED_STS */ | ||
| 6241 | #define ARIZONA_ISRC3_UNDERCLOCKED_STS_MASK 0x0080 /* ISRC3_UNDERCLOCKED_STS */ | ||
| 6242 | #define ARIZONA_ISRC3_UNDERCLOCKED_STS_SHIFT 7 /* ISRC3_UNDERCLOCKED_STS */ | ||
| 6243 | #define ARIZONA_ISRC3_UNDERCLOCKED_STS_WIDTH 1 /* ISRC3_UNDERCLOCKED_STS */ | ||
| 5607 | #define ARIZONA_ISRC2_UNDERCLOCKED_STS 0x0040 /* ISRC2_UNDERCLOCKED_STS */ | 6244 | #define ARIZONA_ISRC2_UNDERCLOCKED_STS 0x0040 /* ISRC2_UNDERCLOCKED_STS */ |
| 5608 | #define ARIZONA_ISRC2_UNDERCLOCKED_STS_MASK 0x0040 /* ISRC2_UNDERCLOCKED_STS */ | 6245 | #define ARIZONA_ISRC2_UNDERCLOCKED_STS_MASK 0x0040 /* ISRC2_UNDERCLOCKED_STS */ |
| 5609 | #define ARIZONA_ISRC2_UNDERCLOCKED_STS_SHIFT 6 /* ISRC2_UNDERCLOCKED_STS */ | 6246 | #define ARIZONA_ISRC2_UNDERCLOCKED_STS_SHIFT 6 /* ISRC2_UNDERCLOCKED_STS */ |
| @@ -5634,6 +6271,74 @@ | |||
| 5634 | #define ARIZONA_MIXER_UNDERCLOCKED_STS_WIDTH 1 /* MIXER_UNDERCLOCKED_STS */ | 6271 | #define ARIZONA_MIXER_UNDERCLOCKED_STS_WIDTH 1 /* MIXER_UNDERCLOCKED_STS */ |
| 5635 | 6272 | ||
| 5636 | /* | 6273 | /* |
| 6274 | * R3368 (0xD28) - Interrupt Raw Status 9 | ||
| 6275 | */ | ||
| 6276 | #define ARIZONA_DSP_SHARED_WR_COLL_STS 0x8000 /* DSP_SHARED_WR_COLL_STS */ | ||
| 6277 | #define ARIZONA_DSP_SHARED_WR_COLL_STS_MASK 0x8000 /* DSP_SHARED_WR_COLL_STS */ | ||
| 6278 | #define ARIZONA_DSP_SHARED_WR_COLL_STS_SHIFT 15 /* DSP_SHARED_WR_COLL_STS */ | ||
| 6279 | #define ARIZONA_DSP_SHARED_WR_COLL_STS_WIDTH 1 /* DSP_SHARED_WR_COLL_STS */ | ||
| 6280 | #define ARIZONA_SPK_SHUTDOWN_STS 0x4000 /* SPK_SHUTDOWN_STS */ | ||
| 6281 | #define ARIZONA_SPK_SHUTDOWN_STS_MASK 0x4000 /* SPK_SHUTDOWN_STS */ | ||
| 6282 | #define ARIZONA_SPK_SHUTDOWN_STS_SHIFT 14 /* SPK_SHUTDOWN_STS */ | ||
| 6283 | #define ARIZONA_SPK_SHUTDOWN_STS_WIDTH 1 /* SPK_SHUTDOWN_STS */ | ||
| 6284 | #define ARIZONA_SPK1R_SHORT_STS 0x2000 /* SPK1R_SHORT_STS */ | ||
| 6285 | #define ARIZONA_SPK1R_SHORT_STS_MASK 0x2000 /* SPK1R_SHORT_STS */ | ||
| 6286 | #define ARIZONA_SPK1R_SHORT_STS_SHIFT 13 /* SPK1R_SHORT_STS */ | ||
| 6287 | #define ARIZONA_SPK1R_SHORT_STS_WIDTH 1 /* SPK1R_SHORT_STS */ | ||
| 6288 | #define ARIZONA_SPK1L_SHORT_STS 0x1000 /* SPK1L_SHORT_STS */ | ||
| 6289 | #define ARIZONA_SPK1L_SHORT_STS_MASK 0x1000 /* SPK1L_SHORT_STS */ | ||
| 6290 | #define ARIZONA_SPK1L_SHORT_STS_SHIFT 12 /* SPK1L_SHORT_STS */ | ||
| 6291 | #define ARIZONA_SPK1L_SHORT_STS_WIDTH 1 /* SPK1L_SHORT_STS */ | ||
| 6292 | #define ARIZONA_HP3R_SC_NEG_STS 0x0800 /* HP3R_SC_NEG_STS */ | ||
| 6293 | #define ARIZONA_HP3R_SC_NEG_STS_MASK 0x0800 /* HP3R_SC_NEG_STS */ | ||
| 6294 | #define ARIZONA_HP3R_SC_NEG_STS_SHIFT 11 /* HP3R_SC_NEG_STS */ | ||
| 6295 | #define ARIZONA_HP3R_SC_NEG_STS_WIDTH 1 /* HP3R_SC_NEG_STS */ | ||
| 6296 | #define ARIZONA_HP3R_SC_POS_STS 0x0400 /* HP3R_SC_POS_STS */ | ||
| 6297 | #define ARIZONA_HP3R_SC_POS_STS_MASK 0x0400 /* HP3R_SC_POS_STS */ | ||
| 6298 | #define ARIZONA_HP3R_SC_POS_STS_SHIFT 10 /* HP3R_SC_POS_STS */ | ||
| 6299 | #define ARIZONA_HP3R_SC_POS_STS_WIDTH 1 /* HP3R_SC_POS_STS */ | ||
| 6300 | #define ARIZONA_HP3L_SC_NEG_STS 0x0200 /* HP3L_SC_NEG_STS */ | ||
| 6301 | #define ARIZONA_HP3L_SC_NEG_STS_MASK 0x0200 /* HP3L_SC_NEG_STS */ | ||
| 6302 | #define ARIZONA_HP3L_SC_NEG_STS_SHIFT 9 /* HP3L_SC_NEG_STS */ | ||
| 6303 | #define ARIZONA_HP3L_SC_NEG_STS_WIDTH 1 /* HP3L_SC_NEG_STS */ | ||
| 6304 | #define ARIZONA_HP3L_SC_POS_STS 0x0100 /* HP3L_SC_POS_STS */ | ||
| 6305 | #define ARIZONA_HP3L_SC_POS_STS_MASK 0x0100 /* HP3L_SC_POS_STS */ | ||
| 6306 | #define ARIZONA_HP3L_SC_POS_STS_SHIFT 8 /* HP3L_SC_POS_STS */ | ||
| 6307 | #define ARIZONA_HP3L_SC_POS_STS_WIDTH 1 /* HP3L_SC_POS_STS */ | ||
| 6308 | #define ARIZONA_HP2R_SC_NEG_STS 0x0080 /* HP2R_SC_NEG_STS */ | ||
| 6309 | #define ARIZONA_HP2R_SC_NEG_STS_MASK 0x0080 /* HP2R_SC_NEG_STS */ | ||
| 6310 | #define ARIZONA_HP2R_SC_NEG_STS_SHIFT 7 /* HP2R_SC_NEG_STS */ | ||
| 6311 | #define ARIZONA_HP2R_SC_NEG_STS_WIDTH 1 /* HP2R_SC_NEG_STS */ | ||
| 6312 | #define ARIZONA_HP2R_SC_POS_STS 0x0040 /* HP2R_SC_POS_STS */ | ||
| 6313 | #define ARIZONA_HP2R_SC_POS_STS_MASK 0x0040 /* HP2R_SC_POS_STS */ | ||
| 6314 | #define ARIZONA_HP2R_SC_POS_STS_SHIFT 6 /* HP2R_SC_POS_STS */ | ||
| 6315 | #define ARIZONA_HP2R_SC_POS_STS_WIDTH 1 /* HP2R_SC_POS_STS */ | ||
| 6316 | #define ARIZONA_HP2L_SC_NEG_STS 0x0020 /* HP2L_SC_NEG_STS */ | ||
| 6317 | #define ARIZONA_HP2L_SC_NEG_STS_MASK 0x0020 /* HP2L_SC_NEG_STS */ | ||
| 6318 | #define ARIZONA_HP2L_SC_NEG_STS_SHIFT 5 /* HP2L_SC_NEG_STS */ | ||
| 6319 | #define ARIZONA_HP2L_SC_NEG_STS_WIDTH 1 /* HP2L_SC_NEG_STS */ | ||
| 6320 | #define ARIZONA_HP2L_SC_POS_STS 0x0010 /* HP2L_SC_POS_STS */ | ||
| 6321 | #define ARIZONA_HP2L_SC_POS_STS_MASK 0x0010 /* HP2L_SC_POS_STS */ | ||
| 6322 | #define ARIZONA_HP2L_SC_POS_STS_SHIFT 4 /* HP2L_SC_POS_STS */ | ||
| 6323 | #define ARIZONA_HP2L_SC_POS_STS_WIDTH 1 /* HP2L_SC_POS_STS */ | ||
| 6324 | #define ARIZONA_HP1R_SC_NEG_STS 0x0008 /* HP1R_SC_NEG_STS */ | ||
| 6325 | #define ARIZONA_HP1R_SC_NEG_STS_MASK 0x0008 /* HP1R_SC_NEG_STS */ | ||
| 6326 | #define ARIZONA_HP1R_SC_NEG_STS_SHIFT 3 /* HP1R_SC_NEG_STS */ | ||
| 6327 | #define ARIZONA_HP1R_SC_NEG_STS_WIDTH 1 /* HP1R_SC_NEG_STS */ | ||
| 6328 | #define ARIZONA_HP1R_SC_POS_STS 0x0004 /* HP1R_SC_POS_STS */ | ||
| 6329 | #define ARIZONA_HP1R_SC_POS_STS_MASK 0x0004 /* HP1R_SC_POS_STS */ | ||
| 6330 | #define ARIZONA_HP1R_SC_POS_STS_SHIFT 2 /* HP1R_SC_POS_STS */ | ||
| 6331 | #define ARIZONA_HP1R_SC_POS_STS_WIDTH 1 /* HP1R_SC_POS_STS */ | ||
| 6332 | #define ARIZONA_HP1L_SC_NEG_STS 0x0002 /* HP1L_SC_NEG_STS */ | ||
| 6333 | #define ARIZONA_HP1L_SC_NEG_STS_MASK 0x0002 /* HP1L_SC_NEG_STS */ | ||
| 6334 | #define ARIZONA_HP1L_SC_NEG_STS_SHIFT 1 /* HP1L_SC_NEG_STS */ | ||
| 6335 | #define ARIZONA_HP1L_SC_NEG_STS_WIDTH 1 /* HP1L_SC_NEG_STS */ | ||
| 6336 | #define ARIZONA_HP1L_SC_POS_STS 0x0001 /* HP1L_SC_POS_STS */ | ||
| 6337 | #define ARIZONA_HP1L_SC_POS_STS_MASK 0x0001 /* HP1L_SC_POS_STS */ | ||
| 6338 | #define ARIZONA_HP1L_SC_POS_STS_SHIFT 0 /* HP1L_SC_POS_STS */ | ||
| 6339 | #define ARIZONA_HP1L_SC_POS_STS_WIDTH 1 /* HP1L_SC_POS_STS */ | ||
| 6340 | |||
| 6341 | /* | ||
| 5637 | * R3392 (0xD40) - IRQ Pin Status | 6342 | * R3392 (0xD40) - IRQ Pin Status |
| 5638 | */ | 6343 | */ |
| 5639 | #define ARIZONA_IRQ2_STS 0x0002 /* IRQ2_STS */ | 6344 | #define ARIZONA_IRQ2_STS 0x0002 /* IRQ2_STS */ |
diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h index 887ef4f7bef7..fcbe9d129a9d 100644 --- a/include/linux/mfd/cros_ec.h +++ b/include/linux/mfd/cros_ec.h | |||
| @@ -16,7 +16,9 @@ | |||
| 16 | #ifndef __LINUX_MFD_CROS_EC_H | 16 | #ifndef __LINUX_MFD_CROS_EC_H |
| 17 | #define __LINUX_MFD_CROS_EC_H | 17 | #define __LINUX_MFD_CROS_EC_H |
| 18 | 18 | ||
| 19 | #include <linux/notifier.h> | ||
| 19 | #include <linux/mfd/cros_ec_commands.h> | 20 | #include <linux/mfd/cros_ec_commands.h> |
| 21 | #include <linux/mutex.h> | ||
| 20 | 22 | ||
| 21 | /* | 23 | /* |
| 22 | * Command interface between EC and AP, for LPC, I2C and SPI interfaces. | 24 | * Command interface between EC and AP, for LPC, I2C and SPI interfaces. |
| @@ -33,83 +35,76 @@ enum { | |||
| 33 | EC_MSG_TX_PROTO_BYTES, | 35 | EC_MSG_TX_PROTO_BYTES, |
| 34 | }; | 36 | }; |
| 35 | 37 | ||
| 36 | /** | 38 | /* |
| 37 | * struct cros_ec_msg - A message sent to the EC, and its reply | ||
| 38 | * | ||
| 39 | * @version: Command version number (often 0) | 39 | * @version: Command version number (often 0) |
| 40 | * @cmd: Command to send (EC_CMD_...) | 40 | * @command: Command to send (EC_CMD_...) |
| 41 | * @out_buf: Outgoing payload (to EC) | 41 | * @outdata: Outgoing data to EC |
| 42 | * @outlen: Outgoing length | 42 | * @outsize: Outgoing length in bytes |
| 43 | * @in_buf: Incoming payload (from EC) | 43 | * @indata: Where to put the incoming data from EC |
| 44 | * @in_len: Incoming length | 44 | * @insize: Max number of bytes to accept from EC |
| 45 | * @result: EC's response to the command (separate from communication failure) | ||
| 45 | */ | 46 | */ |
| 46 | struct cros_ec_msg { | 47 | struct cros_ec_command { |
| 47 | u8 version; | 48 | uint32_t version; |
| 48 | u8 cmd; | 49 | uint32_t command; |
| 49 | uint8_t *out_buf; | 50 | uint8_t *outdata; |
| 50 | int out_len; | 51 | uint32_t outsize; |
| 51 | uint8_t *in_buf; | 52 | uint8_t *indata; |
| 52 | int in_len; | 53 | uint32_t insize; |
| 54 | uint32_t result; | ||
| 53 | }; | 55 | }; |
| 54 | 56 | ||
| 55 | /** | 57 | /** |
| 56 | * struct cros_ec_device - Information about a ChromeOS EC device | 58 | * struct cros_ec_device - Information about a ChromeOS EC device |
| 57 | * | 59 | * |
| 58 | * @name: Name of this EC interface | 60 | * @ec_name: name of EC device (e.g. 'chromeos-ec') |
| 61 | * @phys_name: name of physical comms layer (e.g. 'i2c-4') | ||
| 62 | * @dev: Device pointer | ||
| 63 | * @was_wake_device: true if this device was set to wake the system from | ||
| 64 | * sleep at the last suspend | ||
| 65 | * @cmd_xfer: send command to EC and get response | ||
| 66 | * Returns the number of bytes received if the communication succeeded, but | ||
| 67 | * that doesn't mean the EC was happy with the command. The caller | ||
| 68 | * should check msg.result for the EC's result code. | ||
| 69 | * | ||
| 59 | * @priv: Private data | 70 | * @priv: Private data |
| 60 | * @irq: Interrupt to use | 71 | * @irq: Interrupt to use |
| 61 | * @din: input buffer (from EC) | 72 | * @din: input buffer (for data from EC) |
| 62 | * @dout: output buffer (to EC) | 73 | * @dout: output buffer (for data to EC) |
| 63 | * \note | 74 | * \note |
| 64 | * These two buffers will always be dword-aligned and include enough | 75 | * These two buffers will always be dword-aligned and include enough |
| 65 | * space for up to 7 word-alignment bytes also, so we can ensure that | 76 | * space for up to 7 word-alignment bytes also, so we can ensure that |
| 66 | * the body of the message is always dword-aligned (64-bit). | 77 | * the body of the message is always dword-aligned (64-bit). |
| 67 | * | ||
| 68 | * We use this alignment to keep ARM and x86 happy. Probably word | 78 | * We use this alignment to keep ARM and x86 happy. Probably word |
| 69 | * alignment would be OK, there might be a small performance advantage | 79 | * alignment would be OK, there might be a small performance advantage |
| 70 | * to using dword. | 80 | * to using dword. |
| 71 | * @din_size: size of din buffer | 81 | * @din_size: size of din buffer to allocate (zero to use static din) |
| 72 | * @dout_size: size of dout buffer | 82 | * @dout_size: size of dout buffer to allocate (zero to use static dout) |
| 73 | * @command_send: send a command | ||
| 74 | * @command_recv: receive a command | ||
| 75 | * @ec_name: name of EC device (e.g. 'chromeos-ec') | ||
| 76 | * @phys_name: name of physical comms layer (e.g. 'i2c-4') | ||
| 77 | * @parent: pointer to parent device (e.g. i2c or spi device) | 83 | * @parent: pointer to parent device (e.g. i2c or spi device) |
| 78 | * @dev: Device pointer | ||
| 79 | * dev_lock: Lock to prevent concurrent access | ||
| 80 | * @wake_enabled: true if this device can wake the system from sleep | 84 | * @wake_enabled: true if this device can wake the system from sleep |
| 81 | * @was_wake_device: true if this device was set to wake the system from | 85 | * @lock: one transaction at a time |
| 82 | * sleep at the last suspend | ||
| 83 | * @event_notifier: interrupt event notifier for transport devices | ||
| 84 | */ | 86 | */ |
| 85 | struct cros_ec_device { | 87 | struct cros_ec_device { |
| 86 | const char *name; | 88 | |
| 89 | /* These are used by other drivers that want to talk to the EC */ | ||
| 90 | const char *ec_name; | ||
| 91 | const char *phys_name; | ||
| 92 | struct device *dev; | ||
| 93 | bool was_wake_device; | ||
| 94 | struct class *cros_class; | ||
| 95 | int (*cmd_xfer)(struct cros_ec_device *ec, | ||
| 96 | struct cros_ec_command *msg); | ||
| 97 | |||
| 98 | /* These are used to implement the platform-specific interface */ | ||
| 87 | void *priv; | 99 | void *priv; |
| 88 | int irq; | 100 | int irq; |
| 89 | uint8_t *din; | 101 | uint8_t *din; |
| 90 | uint8_t *dout; | 102 | uint8_t *dout; |
| 91 | int din_size; | 103 | int din_size; |
| 92 | int dout_size; | 104 | int dout_size; |
| 93 | int (*command_send)(struct cros_ec_device *ec, | ||
| 94 | uint16_t cmd, void *out_buf, int out_len); | ||
| 95 | int (*command_recv)(struct cros_ec_device *ec, | ||
| 96 | uint16_t cmd, void *in_buf, int in_len); | ||
| 97 | int (*command_sendrecv)(struct cros_ec_device *ec, | ||
| 98 | uint16_t cmd, void *out_buf, int out_len, | ||
| 99 | void *in_buf, int in_len); | ||
| 100 | int (*command_xfer)(struct cros_ec_device *ec, | ||
| 101 | struct cros_ec_msg *msg); | ||
| 102 | |||
| 103 | const char *ec_name; | ||
| 104 | const char *phys_name; | ||
| 105 | struct device *parent; | 105 | struct device *parent; |
| 106 | |||
| 107 | /* These are --private-- fields - do not assign */ | ||
| 108 | struct device *dev; | ||
| 109 | struct mutex dev_lock; | ||
| 110 | bool wake_enabled; | 106 | bool wake_enabled; |
| 111 | bool was_wake_device; | 107 | struct mutex lock; |
| 112 | struct blocking_notifier_head event_notifier; | ||
| 113 | }; | 108 | }; |
| 114 | 109 | ||
| 115 | /** | 110 | /** |
| @@ -143,13 +138,24 @@ int cros_ec_resume(struct cros_ec_device *ec_dev); | |||
| 143 | * @msg: Message to write | 138 | * @msg: Message to write |
| 144 | */ | 139 | */ |
| 145 | int cros_ec_prepare_tx(struct cros_ec_device *ec_dev, | 140 | int cros_ec_prepare_tx(struct cros_ec_device *ec_dev, |
| 146 | struct cros_ec_msg *msg); | 141 | struct cros_ec_command *msg); |
| 142 | |||
| 143 | /** | ||
| 144 | * cros_ec_check_result - Check ec_msg->result | ||
| 145 | * | ||
| 146 | * This is used by ChromeOS EC drivers to check the ec_msg->result for | ||
| 147 | * errors and to warn about them. | ||
| 148 | * | ||
| 149 | * @ec_dev: EC device | ||
| 150 | * @msg: Message to check | ||
| 151 | */ | ||
| 152 | int cros_ec_check_result(struct cros_ec_device *ec_dev, | ||
| 153 | struct cros_ec_command *msg); | ||
| 147 | 154 | ||
| 148 | /** | 155 | /** |
| 149 | * cros_ec_remove - Remove a ChromeOS EC | 156 | * cros_ec_remove - Remove a ChromeOS EC |
| 150 | * | 157 | * |
| 151 | * Call this to deregister a ChromeOS EC. After this you should call | 158 | * Call this to deregister a ChromeOS EC, then clean up any private data. |
| 152 | * cros_ec_free(). | ||
| 153 | * | 159 | * |
| 154 | * @ec_dev: Device to register | 160 | * @ec_dev: Device to register |
| 155 | * @return 0 if ok, -ve on error | 161 | * @return 0 if ok, -ve on error |
diff --git a/include/linux/mfd/da9063/core.h b/include/linux/mfd/da9063/core.h index 00a9aac5d1e8..b92a3262f8f6 100644 --- a/include/linux/mfd/da9063/core.h +++ b/include/linux/mfd/da9063/core.h | |||
| @@ -34,7 +34,8 @@ enum da9063_models { | |||
| 34 | }; | 34 | }; |
| 35 | 35 | ||
| 36 | enum da9063_variant_codes { | 36 | enum da9063_variant_codes { |
| 37 | PMIC_DA9063_BB = 0x5 | 37 | PMIC_DA9063_AD = 0x3, |
| 38 | PMIC_DA9063_BB = 0x5, | ||
| 38 | }; | 39 | }; |
| 39 | 40 | ||
| 40 | /* Interrupts */ | 41 | /* Interrupts */ |
diff --git a/include/linux/mfd/da9063/registers.h b/include/linux/mfd/da9063/registers.h index 09a85c699da1..2e0ba6d5fbc3 100644 --- a/include/linux/mfd/da9063/registers.h +++ b/include/linux/mfd/da9063/registers.h | |||
| @@ -104,16 +104,27 @@ | |||
| 104 | #define DA9063_REG_COUNT_D 0x43 | 104 | #define DA9063_REG_COUNT_D 0x43 |
| 105 | #define DA9063_REG_COUNT_MO 0x44 | 105 | #define DA9063_REG_COUNT_MO 0x44 |
| 106 | #define DA9063_REG_COUNT_Y 0x45 | 106 | #define DA9063_REG_COUNT_Y 0x45 |
| 107 | #define DA9063_REG_ALARM_S 0x46 | 107 | |
| 108 | #define DA9063_REG_ALARM_MI 0x47 | 108 | #define DA9063_AD_REG_ALARM_MI 0x46 |
| 109 | #define DA9063_REG_ALARM_H 0x48 | 109 | #define DA9063_AD_REG_ALARM_H 0x47 |
| 110 | #define DA9063_REG_ALARM_D 0x49 | 110 | #define DA9063_AD_REG_ALARM_D 0x48 |
| 111 | #define DA9063_REG_ALARM_MO 0x4A | 111 | #define DA9063_AD_REG_ALARM_MO 0x49 |
| 112 | #define DA9063_REG_ALARM_Y 0x4B | 112 | #define DA9063_AD_REG_ALARM_Y 0x4A |
| 113 | #define DA9063_REG_SECOND_A 0x4C | 113 | #define DA9063_AD_REG_SECOND_A 0x4B |
| 114 | #define DA9063_REG_SECOND_B 0x4D | 114 | #define DA9063_AD_REG_SECOND_B 0x4C |
| 115 | #define DA9063_REG_SECOND_C 0x4E | 115 | #define DA9063_AD_REG_SECOND_C 0x4D |
| 116 | #define DA9063_REG_SECOND_D 0x4F | 116 | #define DA9063_AD_REG_SECOND_D 0x4E |
| 117 | |||
| 118 | #define DA9063_BB_REG_ALARM_S 0x46 | ||
| 119 | #define DA9063_BB_REG_ALARM_MI 0x47 | ||
| 120 | #define DA9063_BB_REG_ALARM_H 0x48 | ||
| 121 | #define DA9063_BB_REG_ALARM_D 0x49 | ||
| 122 | #define DA9063_BB_REG_ALARM_MO 0x4A | ||
| 123 | #define DA9063_BB_REG_ALARM_Y 0x4B | ||
| 124 | #define DA9063_BB_REG_SECOND_A 0x4C | ||
| 125 | #define DA9063_BB_REG_SECOND_B 0x4D | ||
| 126 | #define DA9063_BB_REG_SECOND_C 0x4E | ||
| 127 | #define DA9063_BB_REG_SECOND_D 0x4F | ||
| 117 | 128 | ||
| 118 | /* Sequencer Control Registers */ | 129 | /* Sequencer Control Registers */ |
| 119 | #define DA9063_REG_SEQ 0x81 | 130 | #define DA9063_REG_SEQ 0x81 |
| @@ -223,37 +234,67 @@ | |||
| 223 | #define DA9063_REG_CONFIG_J 0x10F | 234 | #define DA9063_REG_CONFIG_J 0x10F |
| 224 | #define DA9063_REG_CONFIG_K 0x110 | 235 | #define DA9063_REG_CONFIG_K 0x110 |
| 225 | #define DA9063_REG_CONFIG_L 0x111 | 236 | #define DA9063_REG_CONFIG_L 0x111 |
| 226 | #define DA9063_REG_CONFIG_M 0x112 | 237 | |
| 227 | #define DA9063_REG_CONFIG_N 0x113 | 238 | #define DA9063_AD_REG_MON_REG_1 0x112 |
| 228 | 239 | #define DA9063_AD_REG_MON_REG_2 0x113 | |
| 229 | #define DA9063_REG_MON_REG_1 0x114 | 240 | #define DA9063_AD_REG_MON_REG_3 0x114 |
| 230 | #define DA9063_REG_MON_REG_2 0x115 | 241 | #define DA9063_AD_REG_MON_REG_4 0x115 |
| 231 | #define DA9063_REG_MON_REG_3 0x116 | 242 | #define DA9063_AD_REG_MON_REG_5 0x116 |
| 232 | #define DA9063_REG_MON_REG_4 0x117 | 243 | #define DA9063_AD_REG_MON_REG_6 0x117 |
| 233 | #define DA9063_REG_MON_REG_5 0x11E | 244 | #define DA9063_AD_REG_TRIM_CLDR 0x118 |
| 234 | #define DA9063_REG_MON_REG_6 0x11F | 245 | |
| 235 | #define DA9063_REG_TRIM_CLDR 0x120 | 246 | #define DA9063_AD_REG_GP_ID_0 0x119 |
| 247 | #define DA9063_AD_REG_GP_ID_1 0x11A | ||
| 248 | #define DA9063_AD_REG_GP_ID_2 0x11B | ||
| 249 | #define DA9063_AD_REG_GP_ID_3 0x11C | ||
| 250 | #define DA9063_AD_REG_GP_ID_4 0x11D | ||
| 251 | #define DA9063_AD_REG_GP_ID_5 0x11E | ||
| 252 | #define DA9063_AD_REG_GP_ID_6 0x11F | ||
| 253 | #define DA9063_AD_REG_GP_ID_7 0x120 | ||
| 254 | #define DA9063_AD_REG_GP_ID_8 0x121 | ||
| 255 | #define DA9063_AD_REG_GP_ID_9 0x122 | ||
| 256 | #define DA9063_AD_REG_GP_ID_10 0x123 | ||
| 257 | #define DA9063_AD_REG_GP_ID_11 0x124 | ||
| 258 | #define DA9063_AD_REG_GP_ID_12 0x125 | ||
| 259 | #define DA9063_AD_REG_GP_ID_13 0x126 | ||
| 260 | #define DA9063_AD_REG_GP_ID_14 0x127 | ||
| 261 | #define DA9063_AD_REG_GP_ID_15 0x128 | ||
| 262 | #define DA9063_AD_REG_GP_ID_16 0x129 | ||
| 263 | #define DA9063_AD_REG_GP_ID_17 0x12A | ||
| 264 | #define DA9063_AD_REG_GP_ID_18 0x12B | ||
| 265 | #define DA9063_AD_REG_GP_ID_19 0x12C | ||
| 266 | |||
| 267 | #define DA9063_BB_REG_CONFIG_M 0x112 | ||
| 268 | #define DA9063_BB_REG_CONFIG_N 0x113 | ||
| 269 | |||
| 270 | #define DA9063_BB_REG_MON_REG_1 0x114 | ||
| 271 | #define DA9063_BB_REG_MON_REG_2 0x115 | ||
| 272 | #define DA9063_BB_REG_MON_REG_3 0x116 | ||
| 273 | #define DA9063_BB_REG_MON_REG_4 0x117 | ||
| 274 | #define DA9063_BB_REG_MON_REG_5 0x11E | ||
| 275 | #define DA9063_BB_REG_MON_REG_6 0x11F | ||
| 276 | #define DA9063_BB_REG_TRIM_CLDR 0x120 | ||
| 236 | /* General Purpose Registers */ | 277 | /* General Purpose Registers */ |
| 237 | #define DA9063_REG_GP_ID_0 0x121 | 278 | #define DA9063_BB_REG_GP_ID_0 0x121 |
| 238 | #define DA9063_REG_GP_ID_1 0x122 | 279 | #define DA9063_BB_REG_GP_ID_1 0x122 |
| 239 | #define DA9063_REG_GP_ID_2 0x123 | 280 | #define DA9063_BB_REG_GP_ID_2 0x123 |
| 240 | #define DA9063_REG_GP_ID_3 0x124 | 281 | #define DA9063_BB_REG_GP_ID_3 0x124 |
| 241 | #define DA9063_REG_GP_ID_4 0x125 | 282 | #define DA9063_BB_REG_GP_ID_4 0x125 |
| 242 | #define DA9063_REG_GP_ID_5 0x126 | 283 | #define DA9063_BB_REG_GP_ID_5 0x126 |
| 243 | #define DA9063_REG_GP_ID_6 0x127 | 284 | #define DA9063_BB_REG_GP_ID_6 0x127 |
| 244 | #define DA9063_REG_GP_ID_7 0x128 | 285 | #define DA9063_BB_REG_GP_ID_7 0x128 |
| 245 | #define DA9063_REG_GP_ID_8 0x129 | 286 | #define DA9063_BB_REG_GP_ID_8 0x129 |
| 246 | #define DA9063_REG_GP_ID_9 0x12A | 287 | #define DA9063_BB_REG_GP_ID_9 0x12A |
| 247 | #define DA9063_REG_GP_ID_10 0x12B | 288 | #define DA9063_BB_REG_GP_ID_10 0x12B |
| 248 | #define DA9063_REG_GP_ID_11 0x12C | 289 | #define DA9063_BB_REG_GP_ID_11 0x12C |
| 249 | #define DA9063_REG_GP_ID_12 0x12D | 290 | #define DA9063_BB_REG_GP_ID_12 0x12D |
| 250 | #define DA9063_REG_GP_ID_13 0x12E | 291 | #define DA9063_BB_REG_GP_ID_13 0x12E |
| 251 | #define DA9063_REG_GP_ID_14 0x12F | 292 | #define DA9063_BB_REG_GP_ID_14 0x12F |
| 252 | #define DA9063_REG_GP_ID_15 0x130 | 293 | #define DA9063_BB_REG_GP_ID_15 0x130 |
| 253 | #define DA9063_REG_GP_ID_16 0x131 | 294 | #define DA9063_BB_REG_GP_ID_16 0x131 |
| 254 | #define DA9063_REG_GP_ID_17 0x132 | 295 | #define DA9063_BB_REG_GP_ID_17 0x132 |
| 255 | #define DA9063_REG_GP_ID_18 0x133 | 296 | #define DA9063_BB_REG_GP_ID_18 0x133 |
| 256 | #define DA9063_REG_GP_ID_19 0x134 | 297 | #define DA9063_BB_REG_GP_ID_19 0x134 |
| 257 | 298 | ||
| 258 | /* Chip ID and variant */ | 299 | /* Chip ID and variant */ |
| 259 | #define DA9063_REG_CHIP_ID 0x181 | 300 | #define DA9063_REG_CHIP_ID 0x181 |
| @@ -404,10 +445,10 @@ | |||
| 404 | /* DA9063_REG_CONTROL_B (addr=0x0F) */ | 445 | /* DA9063_REG_CONTROL_B (addr=0x0F) */ |
| 405 | #define DA9063_CHG_SEL 0x01 | 446 | #define DA9063_CHG_SEL 0x01 |
| 406 | #define DA9063_WATCHDOG_PD 0x02 | 447 | #define DA9063_WATCHDOG_PD 0x02 |
| 407 | #define DA9063_RESET_BLINKING 0x04 | 448 | #define DA9063_BB_RESET_BLINKING 0x04 |
| 408 | #define DA9063_NRES_MODE 0x08 | 449 | #define DA9063_NRES_MODE 0x08 |
| 409 | #define DA9063_NONKEY_LOCK 0x10 | 450 | #define DA9063_NONKEY_LOCK 0x10 |
| 410 | #define DA9063_BUCK_SLOWSTART 0x80 | 451 | #define DA9063_BB_BUCK_SLOWSTART 0x80 |
| 411 | 452 | ||
| 412 | /* DA9063_REG_CONTROL_C (addr=0x10) */ | 453 | /* DA9063_REG_CONTROL_C (addr=0x10) */ |
| 413 | #define DA9063_DEBOUNCING_MASK 0x07 | 454 | #define DA9063_DEBOUNCING_MASK 0x07 |
| @@ -467,7 +508,7 @@ | |||
| 467 | #define DA9063_GPADC_PAUSE 0x02 | 508 | #define DA9063_GPADC_PAUSE 0x02 |
| 468 | #define DA9063_PMIF_DIS 0x04 | 509 | #define DA9063_PMIF_DIS 0x04 |
| 469 | #define DA9063_HS2WIRE_DIS 0x08 | 510 | #define DA9063_HS2WIRE_DIS 0x08 |
| 470 | #define DA9063_CLDR_PAUSE 0x10 | 511 | #define DA9063_BB_CLDR_PAUSE 0x10 |
| 471 | #define DA9063_BBAT_DIS 0x20 | 512 | #define DA9063_BBAT_DIS 0x20 |
| 472 | #define DA9063_OUT_32K_PAUSE 0x40 | 513 | #define DA9063_OUT_32K_PAUSE 0x40 |
| 473 | #define DA9063_PMCONT_DIS 0x80 | 514 | #define DA9063_PMCONT_DIS 0x80 |
| @@ -844,7 +885,7 @@ | |||
| 844 | #define DA9063_MONITOR 0x40 | 885 | #define DA9063_MONITOR 0x40 |
| 845 | 886 | ||
| 846 | /* DA9063_REG_ALARM_S (addr=0x46) */ | 887 | /* DA9063_REG_ALARM_S (addr=0x46) */ |
| 847 | #define DA9063_ALARM_S_MASK 0x3F | 888 | #define DA9063_BB_ALARM_S_MASK 0x3F |
| 848 | #define DA9063_ALARM_STATUS_ALARM 0x80 | 889 | #define DA9063_ALARM_STATUS_ALARM 0x80 |
| 849 | #define DA9063_ALARM_STATUS_TICK 0x40 | 890 | #define DA9063_ALARM_STATUS_TICK 0x40 |
| 850 | /* DA9063_REG_ALARM_MI (addr=0x47) */ | 891 | /* DA9063_REG_ALARM_MI (addr=0x47) */ |
diff --git a/include/linux/mfd/intel_soc_pmic.h b/include/linux/mfd/intel_soc_pmic.h new file mode 100644 index 000000000000..abcbfcf32d10 --- /dev/null +++ b/include/linux/mfd/intel_soc_pmic.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* | ||
| 2 | * intel_soc_pmic.h - Intel SoC PMIC Driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012-2014 Intel Corporation. All rights reserved. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU General Public License version | ||
| 8 | * 2 as published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * Author: Yang, Bin <bin.yang@intel.com> | ||
| 16 | * Author: Zhu, Lejun <lejun.zhu@linux.intel.com> | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef __INTEL_SOC_PMIC_H__ | ||
| 20 | #define __INTEL_SOC_PMIC_H__ | ||
| 21 | |||
| 22 | #include <linux/regmap.h> | ||
| 23 | |||
| 24 | struct intel_soc_pmic { | ||
| 25 | int irq; | ||
| 26 | struct regmap *regmap; | ||
| 27 | struct regmap_irq_chip_data *irq_chip_data; | ||
| 28 | }; | ||
| 29 | |||
| 30 | #endif /* __INTEL_SOC_PMIC_H__ */ | ||
diff --git a/include/linux/mfd/max77686-private.h b/include/linux/mfd/max77686-private.h index 8c75a9c8dfab..960b92ad450d 100644 --- a/include/linux/mfd/max77686-private.h +++ b/include/linux/mfd/max77686-private.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * max77686-private.h - Voltage regulator driver for the Maxim 77686 | 2 | * max77686-private.h - Voltage regulator driver for the Maxim 77686/802 |
| 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> |
| @@ -28,6 +28,7 @@ | |||
| 28 | 28 | ||
| 29 | #define MAX77686_REG_INVALID (0xff) | 29 | #define MAX77686_REG_INVALID (0xff) |
| 30 | 30 | ||
| 31 | /* MAX77686 PMIC registers */ | ||
| 31 | enum max77686_pmic_reg { | 32 | enum max77686_pmic_reg { |
| 32 | MAX77686_REG_DEVICE_ID = 0x00, | 33 | MAX77686_REG_DEVICE_ID = 0x00, |
| 33 | MAX77686_REG_INTSRC = 0x01, | 34 | MAX77686_REG_INTSRC = 0x01, |
| @@ -181,8 +182,209 @@ enum max77686_rtc_reg { | |||
| 181 | MAX77686_ALARM2_DATE = 0x1B, | 182 | MAX77686_ALARM2_DATE = 0x1B, |
| 182 | }; | 183 | }; |
| 183 | 184 | ||
| 184 | #define MAX77686_IRQSRC_PMIC (0) | 185 | /* MAX77802 PMIC registers */ |
| 185 | #define MAX77686_IRQSRC_RTC (1 << 0) | 186 | enum max77802_pmic_reg { |
| 187 | MAX77802_REG_DEVICE_ID = 0x00, | ||
| 188 | MAX77802_REG_INTSRC = 0x01, | ||
| 189 | MAX77802_REG_INT1 = 0x02, | ||
| 190 | MAX77802_REG_INT2 = 0x03, | ||
| 191 | |||
| 192 | MAX77802_REG_INT1MSK = 0x04, | ||
| 193 | MAX77802_REG_INT2MSK = 0x05, | ||
| 194 | |||
| 195 | MAX77802_REG_STATUS1 = 0x06, | ||
| 196 | MAX77802_REG_STATUS2 = 0x07, | ||
| 197 | |||
| 198 | MAX77802_REG_PWRON = 0x08, | ||
| 199 | /* Reserved: 0x09 */ | ||
| 200 | MAX77802_REG_MRSTB = 0x0A, | ||
| 201 | MAX77802_REG_EPWRHOLD = 0x0B, | ||
| 202 | /* Reserved: 0x0C-0x0D */ | ||
| 203 | MAX77802_REG_BOOSTCTRL = 0x0E, | ||
| 204 | MAX77802_REG_BOOSTOUT = 0x0F, | ||
| 205 | |||
| 206 | MAX77802_REG_BUCK1CTRL = 0x10, | ||
| 207 | MAX77802_REG_BUCK1DVS1 = 0x11, | ||
| 208 | MAX77802_REG_BUCK1DVS2 = 0x12, | ||
| 209 | MAX77802_REG_BUCK1DVS3 = 0x13, | ||
| 210 | MAX77802_REG_BUCK1DVS4 = 0x14, | ||
| 211 | MAX77802_REG_BUCK1DVS5 = 0x15, | ||
| 212 | MAX77802_REG_BUCK1DVS6 = 0x16, | ||
| 213 | MAX77802_REG_BUCK1DVS7 = 0x17, | ||
| 214 | MAX77802_REG_BUCK1DVS8 = 0x18, | ||
| 215 | /* Reserved: 0x19 */ | ||
| 216 | MAX77802_REG_BUCK2CTRL1 = 0x1A, | ||
| 217 | MAX77802_REG_BUCK2CTRL2 = 0x1B, | ||
| 218 | MAX77802_REG_BUCK2PHTRAN = 0x1C, | ||
| 219 | MAX77802_REG_BUCK2DVS1 = 0x1D, | ||
| 220 | MAX77802_REG_BUCK2DVS2 = 0x1E, | ||
| 221 | MAX77802_REG_BUCK2DVS3 = 0x1F, | ||
| 222 | MAX77802_REG_BUCK2DVS4 = 0x20, | ||
| 223 | MAX77802_REG_BUCK2DVS5 = 0x21, | ||
| 224 | MAX77802_REG_BUCK2DVS6 = 0x22, | ||
| 225 | MAX77802_REG_BUCK2DVS7 = 0x23, | ||
| 226 | MAX77802_REG_BUCK2DVS8 = 0x24, | ||
| 227 | /* Reserved: 0x25-0x26 */ | ||
| 228 | MAX77802_REG_BUCK3CTRL1 = 0x27, | ||
| 229 | MAX77802_REG_BUCK3DVS1 = 0x28, | ||
| 230 | MAX77802_REG_BUCK3DVS2 = 0x29, | ||
| 231 | MAX77802_REG_BUCK3DVS3 = 0x2A, | ||
| 232 | MAX77802_REG_BUCK3DVS4 = 0x2B, | ||
| 233 | MAX77802_REG_BUCK3DVS5 = 0x2C, | ||
| 234 | MAX77802_REG_BUCK3DVS6 = 0x2D, | ||
| 235 | MAX77802_REG_BUCK3DVS7 = 0x2E, | ||
| 236 | MAX77802_REG_BUCK3DVS8 = 0x2F, | ||
| 237 | /* Reserved: 0x30-0x36 */ | ||
| 238 | MAX77802_REG_BUCK4CTRL1 = 0x37, | ||
| 239 | MAX77802_REG_BUCK4DVS1 = 0x38, | ||
| 240 | MAX77802_REG_BUCK4DVS2 = 0x39, | ||
| 241 | MAX77802_REG_BUCK4DVS3 = 0x3A, | ||
| 242 | MAX77802_REG_BUCK4DVS4 = 0x3B, | ||
| 243 | MAX77802_REG_BUCK4DVS5 = 0x3C, | ||
| 244 | MAX77802_REG_BUCK4DVS6 = 0x3D, | ||
| 245 | MAX77802_REG_BUCK4DVS7 = 0x3E, | ||
| 246 | MAX77802_REG_BUCK4DVS8 = 0x3F, | ||
| 247 | /* Reserved: 0x40 */ | ||
| 248 | MAX77802_REG_BUCK5CTRL = 0x41, | ||
| 249 | MAX77802_REG_BUCK5OUT = 0x42, | ||
| 250 | /* Reserved: 0x43 */ | ||
| 251 | MAX77802_REG_BUCK6CTRL = 0x44, | ||
| 252 | MAX77802_REG_BUCK6DVS1 = 0x45, | ||
| 253 | MAX77802_REG_BUCK6DVS2 = 0x46, | ||
| 254 | MAX77802_REG_BUCK6DVS3 = 0x47, | ||
| 255 | MAX77802_REG_BUCK6DVS4 = 0x48, | ||
| 256 | MAX77802_REG_BUCK6DVS5 = 0x49, | ||
| 257 | MAX77802_REG_BUCK6DVS6 = 0x4A, | ||
| 258 | MAX77802_REG_BUCK6DVS7 = 0x4B, | ||
| 259 | MAX77802_REG_BUCK6DVS8 = 0x4C, | ||
| 260 | /* Reserved: 0x4D */ | ||
| 261 | MAX77802_REG_BUCK7CTRL = 0x4E, | ||
| 262 | MAX77802_REG_BUCK7OUT = 0x4F, | ||
| 263 | /* Reserved: 0x50 */ | ||
| 264 | MAX77802_REG_BUCK8CTRL = 0x51, | ||
| 265 | MAX77802_REG_BUCK8OUT = 0x52, | ||
| 266 | /* Reserved: 0x53 */ | ||
| 267 | MAX77802_REG_BUCK9CTRL = 0x54, | ||
| 268 | MAX77802_REG_BUCK9OUT = 0x55, | ||
| 269 | /* Reserved: 0x56 */ | ||
| 270 | MAX77802_REG_BUCK10CTRL = 0x57, | ||
| 271 | MAX77802_REG_BUCK10OUT = 0x58, | ||
| 272 | |||
| 273 | /* Reserved: 0x59-0x5F */ | ||
| 274 | |||
| 275 | MAX77802_REG_LDO1CTRL1 = 0x60, | ||
| 276 | MAX77802_REG_LDO2CTRL1 = 0x61, | ||
| 277 | MAX77802_REG_LDO3CTRL1 = 0x62, | ||
| 278 | MAX77802_REG_LDO4CTRL1 = 0x63, | ||
| 279 | MAX77802_REG_LDO5CTRL1 = 0x64, | ||
| 280 | MAX77802_REG_LDO6CTRL1 = 0x65, | ||
| 281 | MAX77802_REG_LDO7CTRL1 = 0x66, | ||
| 282 | MAX77802_REG_LDO8CTRL1 = 0x67, | ||
| 283 | MAX77802_REG_LDO9CTRL1 = 0x68, | ||
| 284 | MAX77802_REG_LDO10CTRL1 = 0x69, | ||
| 285 | MAX77802_REG_LDO11CTRL1 = 0x6A, | ||
| 286 | MAX77802_REG_LDO12CTRL1 = 0x6B, | ||
| 287 | MAX77802_REG_LDO13CTRL1 = 0x6C, | ||
| 288 | MAX77802_REG_LDO14CTRL1 = 0x6D, | ||
| 289 | MAX77802_REG_LDO15CTRL1 = 0x6E, | ||
| 290 | /* Reserved: 0x6F */ | ||
| 291 | MAX77802_REG_LDO17CTRL1 = 0x70, | ||
| 292 | MAX77802_REG_LDO18CTRL1 = 0x71, | ||
| 293 | MAX77802_REG_LDO19CTRL1 = 0x72, | ||
| 294 | MAX77802_REG_LDO20CTRL1 = 0x73, | ||
| 295 | MAX77802_REG_LDO21CTRL1 = 0x74, | ||
| 296 | MAX77802_REG_LDO22CTRL1 = 0x75, | ||
| 297 | MAX77802_REG_LDO23CTRL1 = 0x76, | ||
| 298 | MAX77802_REG_LDO24CTRL1 = 0x77, | ||
| 299 | MAX77802_REG_LDO25CTRL1 = 0x78, | ||
| 300 | MAX77802_REG_LDO26CTRL1 = 0x79, | ||
| 301 | MAX77802_REG_LDO27CTRL1 = 0x7A, | ||
| 302 | MAX77802_REG_LDO28CTRL1 = 0x7B, | ||
| 303 | MAX77802_REG_LDO29CTRL1 = 0x7C, | ||
| 304 | MAX77802_REG_LDO30CTRL1 = 0x7D, | ||
| 305 | /* Reserved: 0x7E */ | ||
| 306 | MAX77802_REG_LDO32CTRL1 = 0x7F, | ||
| 307 | MAX77802_REG_LDO33CTRL1 = 0x80, | ||
| 308 | MAX77802_REG_LDO34CTRL1 = 0x81, | ||
| 309 | MAX77802_REG_LDO35CTRL1 = 0x82, | ||
| 310 | /* Reserved: 0x83-0x8F */ | ||
| 311 | MAX77802_REG_LDO1CTRL2 = 0x90, | ||
| 312 | MAX77802_REG_LDO2CTRL2 = 0x91, | ||
| 313 | MAX77802_REG_LDO3CTRL2 = 0x92, | ||
| 314 | MAX77802_REG_LDO4CTRL2 = 0x93, | ||
| 315 | MAX77802_REG_LDO5CTRL2 = 0x94, | ||
| 316 | MAX77802_REG_LDO6CTRL2 = 0x95, | ||
| 317 | MAX77802_REG_LDO7CTRL2 = 0x96, | ||
| 318 | MAX77802_REG_LDO8CTRL2 = 0x97, | ||
| 319 | MAX77802_REG_LDO9CTRL2 = 0x98, | ||
| 320 | MAX77802_REG_LDO10CTRL2 = 0x99, | ||
| 321 | MAX77802_REG_LDO11CTRL2 = 0x9A, | ||
| 322 | MAX77802_REG_LDO12CTRL2 = 0x9B, | ||
| 323 | MAX77802_REG_LDO13CTRL2 = 0x9C, | ||
| 324 | MAX77802_REG_LDO14CTRL2 = 0x9D, | ||
| 325 | MAX77802_REG_LDO15CTRL2 = 0x9E, | ||
| 326 | /* Reserved: 0x9F */ | ||
| 327 | MAX77802_REG_LDO17CTRL2 = 0xA0, | ||
| 328 | MAX77802_REG_LDO18CTRL2 = 0xA1, | ||
| 329 | MAX77802_REG_LDO19CTRL2 = 0xA2, | ||
| 330 | MAX77802_REG_LDO20CTRL2 = 0xA3, | ||
| 331 | MAX77802_REG_LDO21CTRL2 = 0xA4, | ||
| 332 | MAX77802_REG_LDO22CTRL2 = 0xA5, | ||
| 333 | MAX77802_REG_LDO23CTRL2 = 0xA6, | ||
| 334 | MAX77802_REG_LDO24CTRL2 = 0xA7, | ||
| 335 | MAX77802_REG_LDO25CTRL2 = 0xA8, | ||
| 336 | MAX77802_REG_LDO26CTRL2 = 0xA9, | ||
| 337 | MAX77802_REG_LDO27CTRL2 = 0xAA, | ||
| 338 | MAX77802_REG_LDO28CTRL2 = 0xAB, | ||
| 339 | MAX77802_REG_LDO29CTRL2 = 0xAC, | ||
| 340 | MAX77802_REG_LDO30CTRL2 = 0xAD, | ||
| 341 | /* Reserved: 0xAE */ | ||
| 342 | MAX77802_REG_LDO32CTRL2 = 0xAF, | ||
| 343 | MAX77802_REG_LDO33CTRL2 = 0xB0, | ||
| 344 | MAX77802_REG_LDO34CTRL2 = 0xB1, | ||
| 345 | MAX77802_REG_LDO35CTRL2 = 0xB2, | ||
| 346 | /* Reserved: 0xB3 */ | ||
| 347 | |||
| 348 | MAX77802_REG_BBAT_CHG = 0xB4, | ||
| 349 | MAX77802_REG_32KHZ = 0xB5, | ||
| 350 | |||
| 351 | MAX77802_REG_PMIC_END = 0xB6, | ||
| 352 | }; | ||
| 353 | |||
| 354 | enum max77802_rtc_reg { | ||
| 355 | MAX77802_RTC_INT = 0xC0, | ||
| 356 | MAX77802_RTC_INTM = 0xC1, | ||
| 357 | MAX77802_RTC_CONTROLM = 0xC2, | ||
| 358 | MAX77802_RTC_CONTROL = 0xC3, | ||
| 359 | MAX77802_RTC_UPDATE0 = 0xC4, | ||
| 360 | MAX77802_RTC_UPDATE1 = 0xC5, | ||
| 361 | MAX77802_WTSR_SMPL_CNTL = 0xC6, | ||
| 362 | MAX77802_RTC_SEC = 0xC7, | ||
| 363 | MAX77802_RTC_MIN = 0xC8, | ||
| 364 | MAX77802_RTC_HOUR = 0xC9, | ||
| 365 | MAX77802_RTC_WEEKDAY = 0xCA, | ||
| 366 | MAX77802_RTC_MONTH = 0xCB, | ||
| 367 | MAX77802_RTC_YEAR = 0xCC, | ||
| 368 | MAX77802_RTC_DATE = 0xCD, | ||
| 369 | MAX77802_RTC_AE1 = 0xCE, | ||
| 370 | MAX77802_ALARM1_SEC = 0xCF, | ||
| 371 | MAX77802_ALARM1_MIN = 0xD0, | ||
| 372 | MAX77802_ALARM1_HOUR = 0xD1, | ||
| 373 | MAX77802_ALARM1_WEEKDAY = 0xD2, | ||
| 374 | MAX77802_ALARM1_MONTH = 0xD3, | ||
| 375 | MAX77802_ALARM1_YEAR = 0xD4, | ||
| 376 | MAX77802_ALARM1_DATE = 0xD5, | ||
| 377 | MAX77802_RTC_AE2 = 0xD6, | ||
| 378 | MAX77802_ALARM2_SEC = 0xD7, | ||
| 379 | MAX77802_ALARM2_MIN = 0xD8, | ||
| 380 | MAX77802_ALARM2_HOUR = 0xD9, | ||
| 381 | MAX77802_ALARM2_WEEKDAY = 0xDA, | ||
| 382 | MAX77802_ALARM2_MONTH = 0xDB, | ||
| 383 | MAX77802_ALARM2_YEAR = 0xDC, | ||
| 384 | MAX77802_ALARM2_DATE = 0xDD, | ||
| 385 | |||
| 386 | MAX77802_RTC_END = 0xDF, | ||
| 387 | }; | ||
| 186 | 388 | ||
| 187 | enum max77686_irq_source { | 389 | enum max77686_irq_source { |
| 188 | PMIC_INT1 = 0, | 390 | PMIC_INT1 = 0, |
| @@ -205,30 +407,46 @@ enum max77686_irq { | |||
| 205 | MAX77686_PMICIRQ_140C, | 407 | MAX77686_PMICIRQ_140C, |
| 206 | MAX77686_PMICIRQ_120C, | 408 | MAX77686_PMICIRQ_120C, |
| 207 | 409 | ||
| 208 | MAX77686_RTCIRQ_RTC60S, | 410 | MAX77686_RTCIRQ_RTC60S = 0, |
| 209 | MAX77686_RTCIRQ_RTCA1, | 411 | MAX77686_RTCIRQ_RTCA1, |
| 210 | MAX77686_RTCIRQ_RTCA2, | 412 | MAX77686_RTCIRQ_RTCA2, |
| 211 | MAX77686_RTCIRQ_SMPL, | 413 | MAX77686_RTCIRQ_SMPL, |
| 212 | MAX77686_RTCIRQ_RTC1S, | 414 | MAX77686_RTCIRQ_RTC1S, |
| 213 | MAX77686_RTCIRQ_WTSR, | 415 | MAX77686_RTCIRQ_WTSR, |
| 214 | |||
| 215 | MAX77686_IRQ_NR, | ||
| 216 | }; | 416 | }; |
| 217 | 417 | ||
| 418 | #define MAX77686_INT1_PWRONF_MSK BIT(0) | ||
| 419 | #define MAX77686_INT1_PWRONR_MSK BIT(1) | ||
| 420 | #define MAX77686_INT1_JIGONBF_MSK BIT(2) | ||
| 421 | #define MAX77686_INT1_JIGONBR_MSK BIT(3) | ||
| 422 | #define MAX77686_INT1_ACOKBF_MSK BIT(4) | ||
| 423 | #define MAX77686_INT1_ACOKBR_MSK BIT(5) | ||
| 424 | #define MAX77686_INT1_ONKEY1S_MSK BIT(6) | ||
| 425 | #define MAX77686_INT1_MRSTB_MSK BIT(7) | ||
| 426 | |||
| 427 | #define MAX77686_INT2_140C_MSK BIT(0) | ||
| 428 | #define MAX77686_INT2_120C_MSK BIT(1) | ||
| 429 | |||
| 430 | #define MAX77686_RTCINT_RTC60S_MSK BIT(0) | ||
| 431 | #define MAX77686_RTCINT_RTCA1_MSK BIT(1) | ||
| 432 | #define MAX77686_RTCINT_RTCA2_MSK BIT(2) | ||
| 433 | #define MAX77686_RTCINT_SMPL_MSK BIT(3) | ||
| 434 | #define MAX77686_RTCINT_RTC1S_MSK BIT(4) | ||
| 435 | #define MAX77686_RTCINT_WTSR_MSK BIT(5) | ||
| 436 | |||
| 218 | struct max77686_dev { | 437 | struct max77686_dev { |
| 219 | struct device *dev; | 438 | struct device *dev; |
| 220 | struct i2c_client *i2c; /* 0xcc / PMIC, Battery Control, and FLASH */ | 439 | struct i2c_client *i2c; /* 0xcc / PMIC, Battery Control, and FLASH */ |
| 221 | struct i2c_client *rtc; /* slave addr 0x0c */ | 440 | struct i2c_client *rtc; /* slave addr 0x0c */ |
| 222 | 441 | ||
| 223 | int type; | 442 | unsigned long type; |
| 224 | 443 | ||
| 225 | struct regmap *regmap; /* regmap for mfd */ | 444 | struct regmap *regmap; /* regmap for mfd */ |
| 226 | struct regmap *rtc_regmap; /* regmap for rtc */ | 445 | struct regmap *rtc_regmap; /* regmap for rtc */ |
| 227 | 446 | struct regmap_irq_chip_data *irq_data; | |
| 228 | struct irq_domain *irq_domain; | 447 | struct regmap_irq_chip_data *rtc_irq_data; |
| 229 | 448 | ||
| 230 | int irq; | 449 | int irq; |
| 231 | int irq_gpio; | ||
| 232 | bool wakeup; | 450 | bool wakeup; |
| 233 | struct mutex irqlock; | 451 | struct mutex irqlock; |
| 234 | int irq_masks_cur[MAX77686_IRQ_GROUP_NR]; | 452 | int irq_masks_cur[MAX77686_IRQ_GROUP_NR]; |
| @@ -237,6 +455,7 @@ struct max77686_dev { | |||
| 237 | 455 | ||
| 238 | enum max77686_types { | 456 | enum max77686_types { |
| 239 | TYPE_MAX77686, | 457 | TYPE_MAX77686, |
| 458 | TYPE_MAX77802, | ||
| 240 | }; | 459 | }; |
| 241 | 460 | ||
| 242 | extern int max77686_irq_init(struct max77686_dev *max77686); | 461 | extern int max77686_irq_init(struct max77686_dev *max77686); |
diff --git a/include/linux/mfd/max77686.h b/include/linux/mfd/max77686.h index 46c0f320ed76..7e6dc4b2b795 100644 --- a/include/linux/mfd/max77686.h +++ b/include/linux/mfd/max77686.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * max77686.h - Driver for the Maxim 77686 | 2 | * max77686.h - Driver for the Maxim 77686/802 |
| 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> |
| @@ -71,6 +71,54 @@ enum max77686_regulators { | |||
| 71 | MAX77686_REG_MAX, | 71 | MAX77686_REG_MAX, |
| 72 | }; | 72 | }; |
| 73 | 73 | ||
| 74 | /* MAX77802 regulator IDs */ | ||
| 75 | enum max77802_regulators { | ||
| 76 | MAX77802_BUCK1 = 0, | ||
| 77 | MAX77802_BUCK2, | ||
| 78 | MAX77802_BUCK3, | ||
| 79 | MAX77802_BUCK4, | ||
| 80 | MAX77802_BUCK5, | ||
| 81 | MAX77802_BUCK6, | ||
| 82 | MAX77802_BUCK7, | ||
| 83 | MAX77802_BUCK8, | ||
| 84 | MAX77802_BUCK9, | ||
| 85 | MAX77802_BUCK10, | ||
| 86 | MAX77802_LDO1, | ||
| 87 | MAX77802_LDO2, | ||
| 88 | MAX77802_LDO3, | ||
| 89 | MAX77802_LDO4, | ||
| 90 | MAX77802_LDO5, | ||
| 91 | MAX77802_LDO6, | ||
| 92 | MAX77802_LDO7, | ||
| 93 | MAX77802_LDO8, | ||
| 94 | MAX77802_LDO9, | ||
| 95 | MAX77802_LDO10, | ||
| 96 | MAX77802_LDO11, | ||
| 97 | MAX77802_LDO12, | ||
| 98 | MAX77802_LDO13, | ||
| 99 | MAX77802_LDO14, | ||
| 100 | MAX77802_LDO15, | ||
| 101 | MAX77802_LDO17, | ||
| 102 | MAX77802_LDO18, | ||
| 103 | MAX77802_LDO19, | ||
| 104 | MAX77802_LDO20, | ||
| 105 | MAX77802_LDO21, | ||
| 106 | MAX77802_LDO23, | ||
| 107 | MAX77802_LDO24, | ||
| 108 | MAX77802_LDO25, | ||
| 109 | MAX77802_LDO26, | ||
| 110 | MAX77802_LDO27, | ||
| 111 | MAX77802_LDO28, | ||
| 112 | MAX77802_LDO29, | ||
| 113 | MAX77802_LDO30, | ||
| 114 | MAX77802_LDO32, | ||
| 115 | MAX77802_LDO33, | ||
| 116 | MAX77802_LDO34, | ||
| 117 | MAX77802_LDO35, | ||
| 118 | |||
| 119 | MAX77802_REG_MAX, | ||
| 120 | }; | ||
| 121 | |||
| 74 | struct max77686_regulator_data { | 122 | struct max77686_regulator_data { |
| 75 | int id; | 123 | int id; |
| 76 | struct regulator_init_data *initdata; | 124 | struct regulator_init_data *initdata; |
| @@ -83,14 +131,19 @@ enum max77686_opmode { | |||
| 83 | MAX77686_OPMODE_STANDBY, | 131 | MAX77686_OPMODE_STANDBY, |
| 84 | }; | 132 | }; |
| 85 | 133 | ||
| 134 | enum max77802_opmode { | ||
| 135 | MAX77802_OPMODE_OFF, | ||
| 136 | MAX77802_OPMODE_STANDBY, | ||
| 137 | MAX77802_OPMODE_LP, | ||
| 138 | MAX77802_OPMODE_NORMAL, | ||
| 139 | }; | ||
| 140 | |||
| 86 | struct max77686_opmode_data { | 141 | struct max77686_opmode_data { |
| 87 | int id; | 142 | int id; |
| 88 | int mode; | 143 | int mode; |
| 89 | }; | 144 | }; |
| 90 | 145 | ||
| 91 | struct max77686_platform_data { | 146 | struct max77686_platform_data { |
| 92 | /* IRQ */ | ||
| 93 | int irq_gpio; | ||
| 94 | int ono; | 147 | int ono; |
| 95 | int wakeup; | 148 | int wakeup; |
| 96 | 149 | ||
diff --git a/include/linux/mfd/mc13783.h b/include/linux/mfd/mc13783.h index a8eeda773a7b..4ff6137d8d67 100644 --- a/include/linux/mfd/mc13783.h +++ b/include/linux/mfd/mc13783.h | |||
| @@ -86,6 +86,5 @@ | |||
| 86 | #define MC13783_IRQ_HSL 43 | 86 | #define MC13783_IRQ_HSL 43 |
| 87 | #define MC13783_IRQ_ALSPTH 44 | 87 | #define MC13783_IRQ_ALSPTH 44 |
| 88 | #define MC13783_IRQ_AHSSHORT 45 | 88 | #define MC13783_IRQ_AHSSHORT 45 |
| 89 | #define MC13783_NUM_IRQ MC13XXX_NUM_IRQ | ||
| 90 | 89 | ||
| 91 | #endif /* ifndef __LINUX_MFD_MC13783_H */ | 90 | #endif /* ifndef __LINUX_MFD_MC13783_H */ |
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h index d63b1d309106..638222e43e48 100644 --- a/include/linux/mfd/mc13xxx.h +++ b/include/linux/mfd/mc13xxx.h | |||
| @@ -23,15 +23,10 @@ int mc13xxx_reg_rmw(struct mc13xxx *mc13xxx, unsigned int offset, | |||
| 23 | 23 | ||
| 24 | int mc13xxx_irq_request(struct mc13xxx *mc13xxx, int irq, | 24 | int mc13xxx_irq_request(struct mc13xxx *mc13xxx, int irq, |
| 25 | irq_handler_t handler, const char *name, void *dev); | 25 | irq_handler_t handler, const char *name, void *dev); |
| 26 | int mc13xxx_irq_request_nounmask(struct mc13xxx *mc13xxx, int irq, | ||
| 27 | irq_handler_t handler, const char *name, void *dev); | ||
| 28 | int mc13xxx_irq_free(struct mc13xxx *mc13xxx, int irq, void *dev); | 26 | int mc13xxx_irq_free(struct mc13xxx *mc13xxx, int irq, void *dev); |
| 29 | 27 | ||
| 30 | int mc13xxx_irq_mask(struct mc13xxx *mc13xxx, int irq); | ||
| 31 | int mc13xxx_irq_unmask(struct mc13xxx *mc13xxx, int irq); | ||
| 32 | int mc13xxx_irq_status(struct mc13xxx *mc13xxx, int irq, | 28 | int mc13xxx_irq_status(struct mc13xxx *mc13xxx, int irq, |
| 33 | int *enabled, int *pending); | 29 | int *enabled, int *pending); |
| 34 | int mc13xxx_irq_ack(struct mc13xxx *mc13xxx, int irq); | ||
| 35 | 30 | ||
| 36 | int mc13xxx_get_flags(struct mc13xxx *mc13xxx); | 31 | int mc13xxx_get_flags(struct mc13xxx *mc13xxx); |
| 37 | 32 | ||
| @@ -39,6 +34,22 @@ int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx, | |||
| 39 | unsigned int mode, unsigned int channel, | 34 | unsigned int mode, unsigned int channel, |
| 40 | u8 ato, bool atox, unsigned int *sample); | 35 | u8 ato, bool atox, unsigned int *sample); |
| 41 | 36 | ||
| 37 | /* Deprecated calls */ | ||
| 38 | static inline int mc13xxx_irq_ack(struct mc13xxx *mc13xxx, int irq) | ||
| 39 | { | ||
| 40 | return 0; | ||
| 41 | } | ||
| 42 | |||
| 43 | static inline int mc13xxx_irq_request_nounmask(struct mc13xxx *mc13xxx, int irq, | ||
| 44 | irq_handler_t handler, | ||
| 45 | const char *name, void *dev) | ||
| 46 | { | ||
| 47 | return mc13xxx_irq_request(mc13xxx, irq, handler, name, dev); | ||
| 48 | } | ||
| 49 | |||
| 50 | int mc13xxx_irq_mask(struct mc13xxx *mc13xxx, int irq); | ||
| 51 | int mc13xxx_irq_unmask(struct mc13xxx *mc13xxx, int irq); | ||
| 52 | |||
| 42 | #define MC13783_AUDIO_RX0 36 | 53 | #define MC13783_AUDIO_RX0 36 |
| 43 | #define MC13783_AUDIO_RX1 37 | 54 | #define MC13783_AUDIO_RX1 37 |
| 44 | #define MC13783_AUDIO_TX 38 | 55 | #define MC13783_AUDIO_TX 38 |
| @@ -68,8 +79,6 @@ int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx, | |||
| 68 | #define MC13XXX_IRQ_THWARNH 37 | 79 | #define MC13XXX_IRQ_THWARNH 37 |
| 69 | #define MC13XXX_IRQ_CLK 38 | 80 | #define MC13XXX_IRQ_CLK 38 |
| 70 | 81 | ||
| 71 | #define MC13XXX_NUM_IRQ 46 | ||
| 72 | |||
| 73 | struct regulator_init_data; | 82 | struct regulator_init_data; |
| 74 | 83 | ||
| 75 | struct mc13xxx_regulator_init_data { | 84 | struct mc13xxx_regulator_init_data { |
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index a3835976f7c6..74346d5e7899 100644 --- a/include/linux/mfd/rtsx_pci.h +++ b/include/linux/mfd/rtsx_pci.h | |||
| @@ -943,6 +943,12 @@ void rtsx_pci_send_cmd_no_wait(struct rtsx_pcr *pcr); | |||
| 943 | int rtsx_pci_send_cmd(struct rtsx_pcr *pcr, int timeout); | 943 | int rtsx_pci_send_cmd(struct rtsx_pcr *pcr, int timeout); |
| 944 | int rtsx_pci_transfer_data(struct rtsx_pcr *pcr, struct scatterlist *sglist, | 944 | int rtsx_pci_transfer_data(struct rtsx_pcr *pcr, struct scatterlist *sglist, |
| 945 | int num_sg, bool read, int timeout); | 945 | int num_sg, bool read, int timeout); |
| 946 | int rtsx_pci_dma_map_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist, | ||
| 947 | int num_sg, bool read); | ||
| 948 | void rtsx_pci_dma_unmap_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist, | ||
| 949 | int num_sg, bool read); | ||
| 950 | int rtsx_pci_dma_transfer(struct rtsx_pcr *pcr, struct scatterlist *sglist, | ||
| 951 | int count, bool read, int timeout); | ||
| 946 | int rtsx_pci_read_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); | 952 | int rtsx_pci_read_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); |
| 947 | int rtsx_pci_write_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); | 953 | int rtsx_pci_write_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); |
| 948 | int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card); | 954 | int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card); |
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index 47d84242940b..b5f73de81aad 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h | |||
| @@ -21,6 +21,7 @@ enum sec_device_type { | |||
| 21 | S2MPA01, | 21 | S2MPA01, |
| 22 | S2MPS11X, | 22 | S2MPS11X, |
| 23 | S2MPS14X, | 23 | S2MPS14X, |
| 24 | S2MPU02, | ||
| 24 | }; | 25 | }; |
| 25 | 26 | ||
| 26 | /** | 27 | /** |
diff --git a/include/linux/mfd/samsung/irq.h b/include/linux/mfd/samsung/irq.h index 1224f447356b..f35af7361b60 100644 --- a/include/linux/mfd/samsung/irq.h +++ b/include/linux/mfd/samsung/irq.h | |||
| @@ -129,6 +129,30 @@ enum s2mps14_irq { | |||
| 129 | S2MPS14_IRQ_NR, | 129 | S2MPS14_IRQ_NR, |
| 130 | }; | 130 | }; |
| 131 | 131 | ||
| 132 | enum s2mpu02_irq { | ||
| 133 | S2MPU02_IRQ_PWRONF, | ||
| 134 | S2MPU02_IRQ_PWRONR, | ||
| 135 | S2MPU02_IRQ_JIGONBF, | ||
| 136 | S2MPU02_IRQ_JIGONBR, | ||
| 137 | S2MPU02_IRQ_ACOKBF, | ||
| 138 | S2MPU02_IRQ_ACOKBR, | ||
| 139 | S2MPU02_IRQ_PWRON1S, | ||
| 140 | S2MPU02_IRQ_MRB, | ||
| 141 | |||
| 142 | S2MPU02_IRQ_RTC60S, | ||
| 143 | S2MPU02_IRQ_RTCA1, | ||
| 144 | S2MPU02_IRQ_RTCA0, | ||
| 145 | S2MPU02_IRQ_SMPL, | ||
| 146 | S2MPU02_IRQ_RTC1S, | ||
| 147 | S2MPU02_IRQ_WTSR, | ||
| 148 | |||
| 149 | S2MPU02_IRQ_INT120C, | ||
| 150 | S2MPU02_IRQ_INT140C, | ||
| 151 | S2MPU02_IRQ_TSD, | ||
| 152 | |||
| 153 | S2MPU02_IRQ_NR, | ||
| 154 | }; | ||
| 155 | |||
| 132 | /* Masks for interrupts are the same as in s2mps11 */ | 156 | /* Masks for interrupts are the same as in s2mps11 */ |
| 133 | #define S2MPS14_IRQ_TSD_MASK (1 << 2) | 157 | #define S2MPS14_IRQ_TSD_MASK (1 << 2) |
| 134 | 158 | ||
diff --git a/include/linux/mfd/samsung/s2mpu02.h b/include/linux/mfd/samsung/s2mpu02.h new file mode 100644 index 000000000000..47ae9bc583a7 --- /dev/null +++ b/include/linux/mfd/samsung/s2mpu02.h | |||
| @@ -0,0 +1,201 @@ | |||
| 1 | /* | ||
| 2 | * s2mpu02.h | ||
| 3 | * | ||
| 4 | * Copyright (c) 2014 Samsung Electronics Co., Ltd | ||
| 5 | * http://www.samsung.com | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it | ||
| 8 | * under the terms of the GNU General Public License as published by the | ||
| 9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 10 | * option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef __LINUX_MFD_S2MPU02_H | ||
| 20 | #define __LINUX_MFD_S2MPU02_H | ||
| 21 | |||
| 22 | /* S2MPU02 registers */ | ||
| 23 | enum S2MPU02_reg { | ||
| 24 | S2MPU02_REG_ID, | ||
| 25 | S2MPU02_REG_INT1, | ||
| 26 | S2MPU02_REG_INT2, | ||
| 27 | S2MPU02_REG_INT3, | ||
| 28 | S2MPU02_REG_INT1M, | ||
| 29 | S2MPU02_REG_INT2M, | ||
| 30 | S2MPU02_REG_INT3M, | ||
| 31 | S2MPU02_REG_ST1, | ||
| 32 | S2MPU02_REG_ST2, | ||
| 33 | S2MPU02_REG_PWRONSRC, | ||
| 34 | S2MPU02_REG_OFFSRC, | ||
| 35 | S2MPU02_REG_BU_CHG, | ||
| 36 | S2MPU02_REG_RTCCTRL, | ||
| 37 | S2MPU02_REG_PMCTRL1, | ||
| 38 | S2MPU02_REG_RSVD1, | ||
| 39 | S2MPU02_REG_RSVD2, | ||
| 40 | S2MPU02_REG_RSVD3, | ||
| 41 | S2MPU02_REG_RSVD4, | ||
| 42 | S2MPU02_REG_RSVD5, | ||
| 43 | S2MPU02_REG_RSVD6, | ||
| 44 | S2MPU02_REG_RSVD7, | ||
| 45 | S2MPU02_REG_WRSTEN, | ||
| 46 | S2MPU02_REG_RSVD8, | ||
| 47 | S2MPU02_REG_RSVD9, | ||
| 48 | S2MPU02_REG_RSVD10, | ||
| 49 | S2MPU02_REG_B1CTRL1, | ||
| 50 | S2MPU02_REG_B1CTRL2, | ||
| 51 | S2MPU02_REG_B2CTRL1, | ||
| 52 | S2MPU02_REG_B2CTRL2, | ||
| 53 | S2MPU02_REG_B3CTRL1, | ||
| 54 | S2MPU02_REG_B3CTRL2, | ||
| 55 | S2MPU02_REG_B4CTRL1, | ||
| 56 | S2MPU02_REG_B4CTRL2, | ||
| 57 | S2MPU02_REG_B5CTRL1, | ||
| 58 | S2MPU02_REG_B5CTRL2, | ||
| 59 | S2MPU02_REG_B5CTRL3, | ||
| 60 | S2MPU02_REG_B5CTRL4, | ||
| 61 | S2MPU02_REG_B5CTRL5, | ||
| 62 | S2MPU02_REG_B6CTRL1, | ||
| 63 | S2MPU02_REG_B6CTRL2, | ||
| 64 | S2MPU02_REG_B7CTRL1, | ||
| 65 | S2MPU02_REG_B7CTRL2, | ||
| 66 | S2MPU02_REG_RAMP1, | ||
| 67 | S2MPU02_REG_RAMP2, | ||
| 68 | S2MPU02_REG_L1CTRL, | ||
| 69 | S2MPU02_REG_L2CTRL1, | ||
| 70 | S2MPU02_REG_L2CTRL2, | ||
| 71 | S2MPU02_REG_L2CTRL3, | ||
| 72 | S2MPU02_REG_L2CTRL4, | ||
| 73 | S2MPU02_REG_L3CTRL, | ||
| 74 | S2MPU02_REG_L4CTRL, | ||
| 75 | S2MPU02_REG_L5CTRL, | ||
| 76 | S2MPU02_REG_L6CTRL, | ||
| 77 | S2MPU02_REG_L7CTRL, | ||
| 78 | S2MPU02_REG_L8CTRL, | ||
| 79 | S2MPU02_REG_L9CTRL, | ||
| 80 | S2MPU02_REG_L10CTRL, | ||
| 81 | S2MPU02_REG_L11CTRL, | ||
| 82 | S2MPU02_REG_L12CTRL, | ||
| 83 | S2MPU02_REG_L13CTRL, | ||
| 84 | S2MPU02_REG_L14CTRL, | ||
| 85 | S2MPU02_REG_L15CTRL, | ||
| 86 | S2MPU02_REG_L16CTRL, | ||
| 87 | S2MPU02_REG_L17CTRL, | ||
| 88 | S2MPU02_REG_L18CTRL, | ||
| 89 | S2MPU02_REG_L19CTRL, | ||
| 90 | S2MPU02_REG_L20CTRL, | ||
| 91 | S2MPU02_REG_L21CTRL, | ||
| 92 | S2MPU02_REG_L22CTRL, | ||
| 93 | S2MPU02_REG_L23CTRL, | ||
| 94 | S2MPU02_REG_L24CTRL, | ||
| 95 | S2MPU02_REG_L25CTRL, | ||
| 96 | S2MPU02_REG_L26CTRL, | ||
| 97 | S2MPU02_REG_L27CTRL, | ||
| 98 | S2MPU02_REG_L28CTRL, | ||
| 99 | S2MPU02_REG_LDODSCH1, | ||
| 100 | S2MPU02_REG_LDODSCH2, | ||
| 101 | S2MPU02_REG_LDODSCH3, | ||
| 102 | S2MPU02_REG_LDODSCH4, | ||
| 103 | S2MPU02_REG_SELMIF, | ||
| 104 | S2MPU02_REG_RSVD11, | ||
| 105 | S2MPU02_REG_RSVD12, | ||
| 106 | S2MPU02_REG_RSVD13, | ||
| 107 | S2MPU02_REG_DVSSEL, | ||
| 108 | S2MPU02_REG_DVSPTR, | ||
| 109 | S2MPU02_REG_DVSDATA, | ||
| 110 | }; | ||
| 111 | |||
| 112 | /* S2MPU02 regulator ids */ | ||
| 113 | enum S2MPU02_regulators { | ||
| 114 | S2MPU02_LDO1, | ||
| 115 | S2MPU02_LDO2, | ||
| 116 | S2MPU02_LDO3, | ||
| 117 | S2MPU02_LDO4, | ||
| 118 | S2MPU02_LDO5, | ||
| 119 | S2MPU02_LDO6, | ||
| 120 | S2MPU02_LDO7, | ||
| 121 | S2MPU02_LDO8, | ||
| 122 | S2MPU02_LDO9, | ||
| 123 | S2MPU02_LDO10, | ||
| 124 | S2MPU02_LDO11, | ||
| 125 | S2MPU02_LDO12, | ||
| 126 | S2MPU02_LDO13, | ||
| 127 | S2MPU02_LDO14, | ||
| 128 | S2MPU02_LDO15, | ||
| 129 | S2MPU02_LDO16, | ||
| 130 | S2MPU02_LDO17, | ||
| 131 | S2MPU02_LDO18, | ||
| 132 | S2MPU02_LDO19, | ||
| 133 | S2MPU02_LDO20, | ||
| 134 | S2MPU02_LDO21, | ||
| 135 | S2MPU02_LDO22, | ||
| 136 | S2MPU02_LDO23, | ||
| 137 | S2MPU02_LDO24, | ||
| 138 | S2MPU02_LDO25, | ||
| 139 | S2MPU02_LDO26, | ||
| 140 | S2MPU02_LDO27, | ||
| 141 | S2MPU02_LDO28, | ||
| 142 | S2MPU02_BUCK1, | ||
| 143 | S2MPU02_BUCK2, | ||
| 144 | S2MPU02_BUCK3, | ||
| 145 | S2MPU02_BUCK4, | ||
| 146 | S2MPU02_BUCK5, | ||
| 147 | S2MPU02_BUCK6, | ||
| 148 | S2MPU02_BUCK7, | ||
| 149 | |||
| 150 | S2MPU02_REGULATOR_MAX, | ||
| 151 | }; | ||
| 152 | |||
| 153 | /* Regulator constraints for BUCKx */ | ||
| 154 | #define S2MPU02_BUCK1234_MIN_600MV 600000 | ||
| 155 | #define S2MPU02_BUCK5_MIN_1081_25MV 1081250 | ||
| 156 | #define S2MPU02_BUCK6_MIN_1700MV 1700000 | ||
| 157 | #define S2MPU02_BUCK7_MIN_900MV 900000 | ||
| 158 | |||
| 159 | #define S2MPU02_BUCK1234_STEP_6_25MV 6250 | ||
| 160 | #define S2MPU02_BUCK5_STEP_6_25MV 6250 | ||
| 161 | #define S2MPU02_BUCK6_STEP_2_50MV 2500 | ||
| 162 | #define S2MPU02_BUCK7_STEP_6_25MV 6250 | ||
| 163 | |||
| 164 | #define S2MPU02_BUCK1234_START_SEL 0x00 | ||
| 165 | #define S2MPU02_BUCK5_START_SEL 0x4D | ||
| 166 | #define S2MPU02_BUCK6_START_SEL 0x28 | ||
| 167 | #define S2MPU02_BUCK7_START_SEL 0x30 | ||
| 168 | |||
| 169 | #define S2MPU02_BUCK_RAMP_DELAY 12500 | ||
| 170 | |||
| 171 | /* Regulator constraints for different types of LDOx */ | ||
| 172 | #define S2MPU02_LDO_MIN_900MV 900000 | ||
| 173 | #define S2MPU02_LDO_MIN_1050MV 1050000 | ||
| 174 | #define S2MPU02_LDO_MIN_1600MV 1600000 | ||
| 175 | #define S2MPU02_LDO_STEP_12_5MV 12500 | ||
| 176 | #define S2MPU02_LDO_STEP_25MV 25000 | ||
| 177 | #define S2MPU02_LDO_STEP_50MV 50000 | ||
| 178 | |||
| 179 | #define S2MPU02_LDO_GROUP1_START_SEL 0x8 | ||
| 180 | #define S2MPU02_LDO_GROUP2_START_SEL 0xA | ||
| 181 | #define S2MPU02_LDO_GROUP3_START_SEL 0x10 | ||
| 182 | |||
| 183 | #define S2MPU02_LDO_VSEL_MASK 0x3F | ||
| 184 | #define S2MPU02_BUCK_VSEL_MASK 0xFF | ||
| 185 | #define S2MPU02_ENABLE_MASK (0x03 << S2MPU02_ENABLE_SHIFT) | ||
| 186 | #define S2MPU02_ENABLE_SHIFT 6 | ||
| 187 | |||
| 188 | /* On/Off controlled by PWREN */ | ||
| 189 | #define S2MPU02_ENABLE_SUSPEND (0x01 << S2MPU02_ENABLE_SHIFT) | ||
| 190 | #define S2MPU02_DISABLE_SUSPEND (0x11 << S2MPU02_ENABLE_SHIFT) | ||
| 191 | #define S2MPU02_LDO_N_VOLTAGES (S2MPU02_LDO_VSEL_MASK + 1) | ||
| 192 | #define S2MPU02_BUCK_N_VOLTAGES (S2MPU02_BUCK_VSEL_MASK + 1) | ||
| 193 | |||
| 194 | /* RAMP delay for BUCK1234*/ | ||
| 195 | #define S2MPU02_BUCK1_RAMP_SHIFT 6 | ||
| 196 | #define S2MPU02_BUCK2_RAMP_SHIFT 4 | ||
| 197 | #define S2MPU02_BUCK3_RAMP_SHIFT 2 | ||
| 198 | #define S2MPU02_BUCK4_RAMP_SHIFT 0 | ||
| 199 | #define S2MPU02_BUCK1234_RAMP_MASK 0x3 | ||
| 200 | |||
| 201 | #endif /* __LINUX_MFD_S2MPU02_H */ | ||
diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h index 16c2335c2856..6483a6fdce59 100644 --- a/include/linux/mfd/tps65910.h +++ b/include/linux/mfd/tps65910.h | |||
| @@ -892,7 +892,7 @@ struct tps65910 { | |||
| 892 | struct device *dev; | 892 | struct device *dev; |
| 893 | struct i2c_client *i2c_client; | 893 | struct i2c_client *i2c_client; |
| 894 | struct regmap *regmap; | 894 | struct regmap *regmap; |
| 895 | unsigned int id; | 895 | unsigned long id; |
| 896 | 896 | ||
| 897 | /* Client devices */ | 897 | /* Client devices */ |
| 898 | struct tps65910_pmic *pmic; | 898 | struct tps65910_pmic *pmic; |
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h index c8450366c130..379c02648ab3 100644 --- a/include/linux/mlx4/cmd.h +++ b/include/linux/mlx4/cmd.h | |||
| @@ -116,6 +116,7 @@ enum { | |||
| 116 | /* special QP and management commands */ | 116 | /* special QP and management commands */ |
| 117 | MLX4_CMD_CONF_SPECIAL_QP = 0x23, | 117 | MLX4_CMD_CONF_SPECIAL_QP = 0x23, |
| 118 | MLX4_CMD_MAD_IFC = 0x24, | 118 | MLX4_CMD_MAD_IFC = 0x24, |
| 119 | MLX4_CMD_MAD_DEMUX = 0x203, | ||
| 119 | 120 | ||
| 120 | /* multicast commands */ | 121 | /* multicast commands */ |
| 121 | MLX4_CMD_READ_MCG = 0x25, | 122 | MLX4_CMD_READ_MCG = 0x25, |
| @@ -186,6 +187,12 @@ enum { | |||
| 186 | }; | 187 | }; |
| 187 | 188 | ||
| 188 | enum { | 189 | enum { |
| 190 | MLX4_CMD_MAD_DEMUX_CONFIG = 0, | ||
| 191 | MLX4_CMD_MAD_DEMUX_QUERY_STATE = 1, | ||
| 192 | MLX4_CMD_MAD_DEMUX_QUERY_RESTR = 2, /* Query mad demux restrictions */ | ||
| 193 | }; | ||
| 194 | |||
| 195 | enum { | ||
| 189 | MLX4_CMD_WRAPPED, | 196 | MLX4_CMD_WRAPPED, |
| 190 | MLX4_CMD_NATIVE | 197 | MLX4_CMD_NATIVE |
| 191 | }; | 198 | }; |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index e15b1544ea83..071f6b234604 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -183,6 +183,7 @@ enum { | |||
| 183 | MLX4_DEV_CAP_FLAG2_UPDATE_QP = 1LL << 8, | 183 | MLX4_DEV_CAP_FLAG2_UPDATE_QP = 1LL << 8, |
| 184 | MLX4_DEV_CAP_FLAG2_DMFS_IPOIB = 1LL << 9, | 184 | MLX4_DEV_CAP_FLAG2_DMFS_IPOIB = 1LL << 9, |
| 185 | MLX4_DEV_CAP_FLAG2_VXLAN_OFFLOADS = 1LL << 10, | 185 | MLX4_DEV_CAP_FLAG2_VXLAN_OFFLOADS = 1LL << 10, |
| 186 | MLX4_DEV_CAP_FLAG2_MAD_DEMUX = 1LL << 11, | ||
| 186 | }; | 187 | }; |
| 187 | 188 | ||
| 188 | enum { | 189 | enum { |
| @@ -273,6 +274,7 @@ enum { | |||
| 273 | MLX4_PERM_REMOTE_WRITE = 1 << 13, | 274 | MLX4_PERM_REMOTE_WRITE = 1 << 13, |
| 274 | MLX4_PERM_ATOMIC = 1 << 14, | 275 | MLX4_PERM_ATOMIC = 1 << 14, |
| 275 | MLX4_PERM_BIND_MW = 1 << 15, | 276 | MLX4_PERM_BIND_MW = 1 << 15, |
| 277 | MLX4_PERM_MASK = 0xFC00 | ||
| 276 | }; | 278 | }; |
| 277 | 279 | ||
| 278 | enum { | 280 | enum { |
| @@ -1254,6 +1256,21 @@ int mlx4_vf_smi_enabled(struct mlx4_dev *dev, int slave, int port); | |||
| 1254 | int mlx4_vf_get_enable_smi_admin(struct mlx4_dev *dev, int slave, int port); | 1256 | int mlx4_vf_get_enable_smi_admin(struct mlx4_dev *dev, int slave, int port); |
| 1255 | int mlx4_vf_set_enable_smi_admin(struct mlx4_dev *dev, int slave, int port, | 1257 | int mlx4_vf_set_enable_smi_admin(struct mlx4_dev *dev, int slave, int port, |
| 1256 | int enable); | 1258 | int enable); |
| 1259 | int mlx4_mr_hw_get_mpt(struct mlx4_dev *dev, struct mlx4_mr *mmr, | ||
| 1260 | struct mlx4_mpt_entry ***mpt_entry); | ||
| 1261 | int mlx4_mr_hw_write_mpt(struct mlx4_dev *dev, struct mlx4_mr *mmr, | ||
| 1262 | struct mlx4_mpt_entry **mpt_entry); | ||
| 1263 | int mlx4_mr_hw_change_pd(struct mlx4_dev *dev, struct mlx4_mpt_entry *mpt_entry, | ||
| 1264 | u32 pdn); | ||
| 1265 | int mlx4_mr_hw_change_access(struct mlx4_dev *dev, | ||
| 1266 | struct mlx4_mpt_entry *mpt_entry, | ||
| 1267 | u32 access); | ||
| 1268 | void mlx4_mr_hw_put_mpt(struct mlx4_dev *dev, | ||
| 1269 | struct mlx4_mpt_entry **mpt_entry); | ||
| 1270 | void mlx4_mr_rereg_mem_cleanup(struct mlx4_dev *dev, struct mlx4_mr *mr); | ||
| 1271 | int mlx4_mr_rereg_mem_write(struct mlx4_dev *dev, struct mlx4_mr *mr, | ||
| 1272 | u64 iova, u64 size, int npages, | ||
| 1273 | int page_shift, struct mlx4_mpt_entry *mpt_entry); | ||
| 1257 | 1274 | ||
| 1258 | /* Returns true if running in low memory profile (kdump kernel) */ | 1275 | /* Returns true if running in low memory profile (kdump kernel) */ |
| 1259 | static inline bool mlx4_low_memory_profile(void) | 1276 | static inline bool mlx4_low_memory_profile(void) |
diff --git a/include/linux/mm.h b/include/linux/mm.h index e03dd29145a0..8981cc882ed2 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -2014,13 +2014,20 @@ static inline bool kernel_page_present(struct page *page) { return true; } | |||
| 2014 | #endif /* CONFIG_HIBERNATION */ | 2014 | #endif /* CONFIG_HIBERNATION */ |
| 2015 | #endif | 2015 | #endif |
| 2016 | 2016 | ||
| 2017 | #ifdef __HAVE_ARCH_GATE_AREA | ||
| 2017 | extern struct vm_area_struct *get_gate_vma(struct mm_struct *mm); | 2018 | extern struct vm_area_struct *get_gate_vma(struct mm_struct *mm); |
| 2018 | #ifdef __HAVE_ARCH_GATE_AREA | 2019 | extern int in_gate_area_no_mm(unsigned long addr); |
| 2019 | int in_gate_area_no_mm(unsigned long addr); | 2020 | extern int in_gate_area(struct mm_struct *mm, unsigned long addr); |
| 2020 | int in_gate_area(struct mm_struct *mm, unsigned long addr); | ||
| 2021 | #else | 2021 | #else |
| 2022 | int in_gate_area_no_mm(unsigned long addr); | 2022 | static inline struct vm_area_struct *get_gate_vma(struct mm_struct *mm) |
| 2023 | #define in_gate_area(mm, addr) ({(void)mm; in_gate_area_no_mm(addr);}) | 2023 | { |
| 2024 | return NULL; | ||
| 2025 | } | ||
| 2026 | static inline int in_gate_area_no_mm(unsigned long addr) { return 0; } | ||
| 2027 | static inline int in_gate_area(struct mm_struct *mm, unsigned long addr) | ||
| 2028 | { | ||
| 2029 | return 0; | ||
| 2030 | } | ||
| 2024 | #endif /* __HAVE_ARCH_GATE_AREA */ | 2031 | #endif /* __HAVE_ARCH_GATE_AREA */ |
| 2025 | 2032 | ||
| 2026 | #ifdef CONFIG_SYSCTL | 2033 | #ifdef CONFIG_SYSCTL |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 796deac19fcf..6e0b286649f1 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -461,6 +461,7 @@ static inline void mm_init_cpumask(struct mm_struct *mm) | |||
| 461 | #ifdef CONFIG_CPUMASK_OFFSTACK | 461 | #ifdef CONFIG_CPUMASK_OFFSTACK |
| 462 | mm->cpu_vm_mask_var = &mm->cpumask_allocation; | 462 | mm->cpu_vm_mask_var = &mm->cpumask_allocation; |
| 463 | #endif | 463 | #endif |
| 464 | cpumask_clear(mm->cpu_vm_mask_var); | ||
| 464 | } | 465 | } |
| 465 | 466 | ||
| 466 | /* Future-safe accessor for struct mm_struct's cpu_vm_mask. */ | 467 | /* Future-safe accessor for struct mm_struct's cpu_vm_mask. */ |
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h index babaea93bca6..29ce014ab421 100644 --- a/include/linux/mmc/dw_mmc.h +++ b/include/linux/mmc/dw_mmc.h | |||
| @@ -213,6 +213,8 @@ struct dw_mci_dma_ops { | |||
| 213 | #define DW_MCI_QUIRK_HIGHSPEED BIT(2) | 213 | #define DW_MCI_QUIRK_HIGHSPEED BIT(2) |
| 214 | /* Unreliable card detection */ | 214 | /* Unreliable card detection */ |
| 215 | #define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3) | 215 | #define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3) |
| 216 | /* No write protect */ | ||
| 217 | #define DW_MCI_QUIRK_NO_WRITE_PROTECT BIT(4) | ||
| 216 | 218 | ||
| 217 | /* Slot level quirks */ | 219 | /* Slot level quirks */ |
| 218 | /* This slot has no write protect */ | 220 | /* This slot has no write protect */ |
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index 08abe9941884..09ebe57d5ce9 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h | |||
| @@ -104,9 +104,6 @@ struct sdhci_host { | |||
| 104 | 104 | ||
| 105 | const struct sdhci_ops *ops; /* Low level hw interface */ | 105 | const struct sdhci_ops *ops; /* Low level hw interface */ |
| 106 | 106 | ||
| 107 | struct regulator *vmmc; /* Power regulator (vmmc) */ | ||
| 108 | struct regulator *vqmmc; /* Signaling regulator (vccq) */ | ||
| 109 | |||
| 110 | /* Internal data */ | 107 | /* Internal data */ |
| 111 | struct mmc_host *mmc; /* MMC structure */ | 108 | struct mmc_host *mmc; /* MMC structure */ |
| 112 | u64 dma_mask; /* custom DMA mask */ | 109 | u64 dma_mask; /* custom DMA mask */ |
diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h index edd82a105220..2f348d02f640 100644 --- a/include/linux/mmdebug.h +++ b/include/linux/mmdebug.h | |||
| @@ -20,11 +20,13 @@ extern void dump_page_badflags(struct page *page, const char *reason, | |||
| 20 | } while (0) | 20 | } while (0) |
| 21 | #define VM_WARN_ON(cond) WARN_ON(cond) | 21 | #define VM_WARN_ON(cond) WARN_ON(cond) |
| 22 | #define VM_WARN_ON_ONCE(cond) WARN_ON_ONCE(cond) | 22 | #define VM_WARN_ON_ONCE(cond) WARN_ON_ONCE(cond) |
| 23 | #define VM_WARN_ONCE(cond, format...) WARN_ONCE(cond, format) | ||
| 23 | #else | 24 | #else |
| 24 | #define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond) | 25 | #define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond) |
| 25 | #define VM_BUG_ON_PAGE(cond, page) VM_BUG_ON(cond) | 26 | #define VM_BUG_ON_PAGE(cond, page) VM_BUG_ON(cond) |
| 26 | #define VM_WARN_ON(cond) BUILD_BUG_ON_INVALID(cond) | 27 | #define VM_WARN_ON(cond) BUILD_BUG_ON_INVALID(cond) |
| 27 | #define VM_WARN_ON_ONCE(cond) BUILD_BUG_ON_INVALID(cond) | 28 | #define VM_WARN_ON_ONCE(cond) BUILD_BUG_ON_INVALID(cond) |
| 29 | #define VM_WARN_ONCE(cond, format...) BUILD_BUG_ON_INVALID(cond) | ||
| 28 | #endif | 30 | #endif |
| 29 | 31 | ||
| 30 | #ifdef CONFIG_DEBUG_VIRTUAL | 32 | #ifdef CONFIG_DEBUG_VIRTUAL |
diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h index deca87452528..27288692241e 100644 --- a/include/linux/mmu_notifier.h +++ b/include/linux/mmu_notifier.h | |||
| @@ -170,6 +170,8 @@ extern int __mmu_notifier_register(struct mmu_notifier *mn, | |||
| 170 | struct mm_struct *mm); | 170 | struct mm_struct *mm); |
| 171 | extern void mmu_notifier_unregister(struct mmu_notifier *mn, | 171 | extern void mmu_notifier_unregister(struct mmu_notifier *mn, |
| 172 | struct mm_struct *mm); | 172 | struct mm_struct *mm); |
| 173 | extern void mmu_notifier_unregister_no_release(struct mmu_notifier *mn, | ||
| 174 | struct mm_struct *mm); | ||
| 173 | extern void __mmu_notifier_mm_destroy(struct mm_struct *mm); | 175 | extern void __mmu_notifier_mm_destroy(struct mm_struct *mm); |
| 174 | extern void __mmu_notifier_release(struct mm_struct *mm); | 176 | extern void __mmu_notifier_release(struct mm_struct *mm); |
| 175 | extern int __mmu_notifier_clear_flush_young(struct mm_struct *mm, | 177 | extern int __mmu_notifier_clear_flush_young(struct mm_struct *mm, |
| @@ -288,6 +290,10 @@ static inline void mmu_notifier_mm_destroy(struct mm_struct *mm) | |||
| 288 | set_pte_at(___mm, ___address, __ptep, ___pte); \ | 290 | set_pte_at(___mm, ___address, __ptep, ___pte); \ |
| 289 | }) | 291 | }) |
| 290 | 292 | ||
| 293 | extern void mmu_notifier_call_srcu(struct rcu_head *rcu, | ||
| 294 | void (*func)(struct rcu_head *rcu)); | ||
| 295 | extern void mmu_notifier_synchronize(void); | ||
| 296 | |||
| 291 | #else /* CONFIG_MMU_NOTIFIER */ | 297 | #else /* CONFIG_MMU_NOTIFIER */ |
| 292 | 298 | ||
| 293 | static inline void mmu_notifier_release(struct mm_struct *mm) | 299 | static inline void mmu_notifier_release(struct mm_struct *mm) |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 6cbd1b6c3d20..318df7051850 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -143,6 +143,7 @@ enum zone_stat_item { | |||
| 143 | NR_SHMEM, /* shmem pages (included tmpfs/GEM pages) */ | 143 | NR_SHMEM, /* shmem pages (included tmpfs/GEM pages) */ |
| 144 | NR_DIRTIED, /* page dirtyings since bootup */ | 144 | NR_DIRTIED, /* page dirtyings since bootup */ |
| 145 | NR_WRITTEN, /* page writings since bootup */ | 145 | NR_WRITTEN, /* page writings since bootup */ |
| 146 | NR_PAGES_SCANNED, /* pages scanned since last reclaim */ | ||
| 146 | #ifdef CONFIG_NUMA | 147 | #ifdef CONFIG_NUMA |
| 147 | NUMA_HIT, /* allocated in intended node */ | 148 | NUMA_HIT, /* allocated in intended node */ |
| 148 | NUMA_MISS, /* allocated in non intended node */ | 149 | NUMA_MISS, /* allocated in non intended node */ |
| @@ -324,19 +325,12 @@ enum zone_type { | |||
| 324 | #ifndef __GENERATING_BOUNDS_H | 325 | #ifndef __GENERATING_BOUNDS_H |
| 325 | 326 | ||
| 326 | struct zone { | 327 | struct zone { |
| 327 | /* Fields commonly accessed by the page allocator */ | 328 | /* Read-mostly fields */ |
| 328 | 329 | ||
| 329 | /* zone watermarks, access with *_wmark_pages(zone) macros */ | 330 | /* zone watermarks, access with *_wmark_pages(zone) macros */ |
| 330 | unsigned long watermark[NR_WMARK]; | 331 | unsigned long watermark[NR_WMARK]; |
| 331 | 332 | ||
| 332 | /* | 333 | /* |
| 333 | * When free pages are below this point, additional steps are taken | ||
| 334 | * when reading the number of free pages to avoid per-cpu counter | ||
| 335 | * drift allowing watermarks to be breached | ||
| 336 | */ | ||
| 337 | unsigned long percpu_drift_mark; | ||
| 338 | |||
| 339 | /* | ||
| 340 | * We don't know if the memory that we're going to allocate will be freeable | 334 | * We don't know if the memory that we're going to allocate will be freeable |
| 341 | * or/and it will be released eventually, so to avoid totally wasting several | 335 | * or/and it will be released eventually, so to avoid totally wasting several |
| 342 | * GB of ram we must reserve some of the lower zone memory (otherwise we risk | 336 | * GB of ram we must reserve some of the lower zone memory (otherwise we risk |
| @@ -344,41 +338,26 @@ struct zone { | |||
| 344 | * on the higher zones). This array is recalculated at runtime if the | 338 | * on the higher zones). This array is recalculated at runtime if the |
| 345 | * sysctl_lowmem_reserve_ratio sysctl changes. | 339 | * sysctl_lowmem_reserve_ratio sysctl changes. |
| 346 | */ | 340 | */ |
| 347 | unsigned long lowmem_reserve[MAX_NR_ZONES]; | 341 | long lowmem_reserve[MAX_NR_ZONES]; |
| 348 | |||
| 349 | /* | ||
| 350 | * This is a per-zone reserve of pages that should not be | ||
| 351 | * considered dirtyable memory. | ||
| 352 | */ | ||
| 353 | unsigned long dirty_balance_reserve; | ||
| 354 | 342 | ||
| 355 | #ifdef CONFIG_NUMA | 343 | #ifdef CONFIG_NUMA |
| 356 | int node; | 344 | int node; |
| 345 | #endif | ||
| 346 | |||
| 357 | /* | 347 | /* |
| 358 | * zone reclaim becomes active if more unmapped pages exist. | 348 | * The target ratio of ACTIVE_ANON to INACTIVE_ANON pages on |
| 349 | * this zone's LRU. Maintained by the pageout code. | ||
| 359 | */ | 350 | */ |
| 360 | unsigned long min_unmapped_pages; | 351 | unsigned int inactive_ratio; |
| 361 | unsigned long min_slab_pages; | 352 | |
| 362 | #endif | 353 | struct pglist_data *zone_pgdat; |
| 363 | struct per_cpu_pageset __percpu *pageset; | 354 | struct per_cpu_pageset __percpu *pageset; |
| 355 | |||
| 364 | /* | 356 | /* |
| 365 | * free areas of different sizes | 357 | * This is a per-zone reserve of pages that should not be |
| 358 | * considered dirtyable memory. | ||
| 366 | */ | 359 | */ |
| 367 | spinlock_t lock; | 360 | unsigned long dirty_balance_reserve; |
| 368 | #if defined CONFIG_COMPACTION || defined CONFIG_CMA | ||
| 369 | /* Set to true when the PG_migrate_skip bits should be cleared */ | ||
| 370 | bool compact_blockskip_flush; | ||
| 371 | |||
| 372 | /* pfn where compaction free scanner should start */ | ||
| 373 | unsigned long compact_cached_free_pfn; | ||
| 374 | /* pfn where async and sync compaction migration scanner should start */ | ||
| 375 | unsigned long compact_cached_migrate_pfn[2]; | ||
| 376 | #endif | ||
| 377 | #ifdef CONFIG_MEMORY_HOTPLUG | ||
| 378 | /* see spanned/present_pages for more description */ | ||
| 379 | seqlock_t span_seqlock; | ||
| 380 | #endif | ||
| 381 | struct free_area free_area[MAX_ORDER]; | ||
| 382 | 361 | ||
| 383 | #ifndef CONFIG_SPARSEMEM | 362 | #ifndef CONFIG_SPARSEMEM |
| 384 | /* | 363 | /* |
| @@ -388,74 +367,14 @@ struct zone { | |||
| 388 | unsigned long *pageblock_flags; | 367 | unsigned long *pageblock_flags; |
| 389 | #endif /* CONFIG_SPARSEMEM */ | 368 | #endif /* CONFIG_SPARSEMEM */ |
| 390 | 369 | ||
| 391 | #ifdef CONFIG_COMPACTION | 370 | #ifdef CONFIG_NUMA |
| 392 | /* | ||
| 393 | * On compaction failure, 1<<compact_defer_shift compactions | ||
| 394 | * are skipped before trying again. The number attempted since | ||
| 395 | * last failure is tracked with compact_considered. | ||
| 396 | */ | ||
| 397 | unsigned int compact_considered; | ||
| 398 | unsigned int compact_defer_shift; | ||
| 399 | int compact_order_failed; | ||
| 400 | #endif | ||
| 401 | |||
| 402 | ZONE_PADDING(_pad1_) | ||
| 403 | |||
| 404 | /* Fields commonly accessed by the page reclaim scanner */ | ||
| 405 | spinlock_t lru_lock; | ||
| 406 | struct lruvec lruvec; | ||
| 407 | |||
| 408 | /* Evictions & activations on the inactive file list */ | ||
| 409 | atomic_long_t inactive_age; | ||
| 410 | |||
| 411 | unsigned long pages_scanned; /* since last reclaim */ | ||
| 412 | unsigned long flags; /* zone flags, see below */ | ||
| 413 | |||
| 414 | /* Zone statistics */ | ||
| 415 | atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; | ||
| 416 | |||
| 417 | /* | ||
| 418 | * The target ratio of ACTIVE_ANON to INACTIVE_ANON pages on | ||
| 419 | * this zone's LRU. Maintained by the pageout code. | ||
| 420 | */ | ||
| 421 | unsigned int inactive_ratio; | ||
| 422 | |||
| 423 | |||
| 424 | ZONE_PADDING(_pad2_) | ||
| 425 | /* Rarely used or read-mostly fields */ | ||
| 426 | |||
| 427 | /* | 371 | /* |
| 428 | * wait_table -- the array holding the hash table | 372 | * zone reclaim becomes active if more unmapped pages exist. |
| 429 | * wait_table_hash_nr_entries -- the size of the hash table array | ||
| 430 | * wait_table_bits -- wait_table_size == (1 << wait_table_bits) | ||
| 431 | * | ||
| 432 | * The purpose of all these is to keep track of the people | ||
| 433 | * waiting for a page to become available and make them | ||
| 434 | * runnable again when possible. The trouble is that this | ||
| 435 | * consumes a lot of space, especially when so few things | ||
| 436 | * wait on pages at a given time. So instead of using | ||
| 437 | * per-page waitqueues, we use a waitqueue hash table. | ||
| 438 | * | ||
| 439 | * The bucket discipline is to sleep on the same queue when | ||
| 440 | * colliding and wake all in that wait queue when removing. | ||
| 441 | * When something wakes, it must check to be sure its page is | ||
| 442 | * truly available, a la thundering herd. The cost of a | ||
| 443 | * collision is great, but given the expected load of the | ||
| 444 | * table, they should be so rare as to be outweighed by the | ||
| 445 | * benefits from the saved space. | ||
| 446 | * | ||
| 447 | * __wait_on_page_locked() and unlock_page() in mm/filemap.c, are the | ||
| 448 | * primary users of these fields, and in mm/page_alloc.c | ||
| 449 | * free_area_init_core() performs the initialization of them. | ||
| 450 | */ | 373 | */ |
| 451 | wait_queue_head_t * wait_table; | 374 | unsigned long min_unmapped_pages; |
| 452 | unsigned long wait_table_hash_nr_entries; | 375 | unsigned long min_slab_pages; |
| 453 | unsigned long wait_table_bits; | 376 | #endif /* CONFIG_NUMA */ |
| 454 | 377 | ||
| 455 | /* | ||
| 456 | * Discontig memory support fields. | ||
| 457 | */ | ||
| 458 | struct pglist_data *zone_pgdat; | ||
| 459 | /* zone_start_pfn == zone_start_paddr >> PAGE_SHIFT */ | 378 | /* zone_start_pfn == zone_start_paddr >> PAGE_SHIFT */ |
| 460 | unsigned long zone_start_pfn; | 379 | unsigned long zone_start_pfn; |
| 461 | 380 | ||
| @@ -500,9 +419,11 @@ struct zone { | |||
| 500 | * adjust_managed_page_count() should be used instead of directly | 419 | * adjust_managed_page_count() should be used instead of directly |
| 501 | * touching zone->managed_pages and totalram_pages. | 420 | * touching zone->managed_pages and totalram_pages. |
| 502 | */ | 421 | */ |
| 422 | unsigned long managed_pages; | ||
| 503 | unsigned long spanned_pages; | 423 | unsigned long spanned_pages; |
| 504 | unsigned long present_pages; | 424 | unsigned long present_pages; |
| 505 | unsigned long managed_pages; | 425 | |
| 426 | const char *name; | ||
| 506 | 427 | ||
| 507 | /* | 428 | /* |
| 508 | * Number of MIGRATE_RESEVE page block. To maintain for just | 429 | * Number of MIGRATE_RESEVE page block. To maintain for just |
| @@ -510,10 +431,94 @@ struct zone { | |||
| 510 | */ | 431 | */ |
| 511 | int nr_migrate_reserve_block; | 432 | int nr_migrate_reserve_block; |
| 512 | 433 | ||
| 434 | #ifdef CONFIG_MEMORY_HOTPLUG | ||
| 435 | /* see spanned/present_pages for more description */ | ||
| 436 | seqlock_t span_seqlock; | ||
| 437 | #endif | ||
| 438 | |||
| 513 | /* | 439 | /* |
| 514 | * rarely used fields: | 440 | * wait_table -- the array holding the hash table |
| 441 | * wait_table_hash_nr_entries -- the size of the hash table array | ||
| 442 | * wait_table_bits -- wait_table_size == (1 << wait_table_bits) | ||
| 443 | * | ||
| 444 | * The purpose of all these is to keep track of the people | ||
| 445 | * waiting for a page to become available and make them | ||
| 446 | * runnable again when possible. The trouble is that this | ||
| 447 | * consumes a lot of space, especially when so few things | ||
| 448 | * wait on pages at a given time. So instead of using | ||
| 449 | * per-page waitqueues, we use a waitqueue hash table. | ||
| 450 | * | ||
| 451 | * The bucket discipline is to sleep on the same queue when | ||
| 452 | * colliding and wake all in that wait queue when removing. | ||
| 453 | * When something wakes, it must check to be sure its page is | ||
| 454 | * truly available, a la thundering herd. The cost of a | ||
| 455 | * collision is great, but given the expected load of the | ||
| 456 | * table, they should be so rare as to be outweighed by the | ||
| 457 | * benefits from the saved space. | ||
| 458 | * | ||
| 459 | * __wait_on_page_locked() and unlock_page() in mm/filemap.c, are the | ||
| 460 | * primary users of these fields, and in mm/page_alloc.c | ||
| 461 | * free_area_init_core() performs the initialization of them. | ||
| 515 | */ | 462 | */ |
| 516 | const char *name; | 463 | wait_queue_head_t *wait_table; |
| 464 | unsigned long wait_table_hash_nr_entries; | ||
| 465 | unsigned long wait_table_bits; | ||
| 466 | |||
| 467 | ZONE_PADDING(_pad1_) | ||
| 468 | |||
| 469 | /* Write-intensive fields used from the page allocator */ | ||
| 470 | spinlock_t lock; | ||
| 471 | |||
| 472 | /* free areas of different sizes */ | ||
| 473 | struct free_area free_area[MAX_ORDER]; | ||
| 474 | |||
| 475 | /* zone flags, see below */ | ||
| 476 | unsigned long flags; | ||
| 477 | |||
| 478 | ZONE_PADDING(_pad2_) | ||
| 479 | |||
| 480 | /* Write-intensive fields used by page reclaim */ | ||
| 481 | |||
| 482 | /* Fields commonly accessed by the page reclaim scanner */ | ||
| 483 | spinlock_t lru_lock; | ||
| 484 | struct lruvec lruvec; | ||
| 485 | |||
| 486 | /* Evictions & activations on the inactive file list */ | ||
| 487 | atomic_long_t inactive_age; | ||
| 488 | |||
| 489 | /* | ||
| 490 | * When free pages are below this point, additional steps are taken | ||
| 491 | * when reading the number of free pages to avoid per-cpu counter | ||
| 492 | * drift allowing watermarks to be breached | ||
| 493 | */ | ||
| 494 | unsigned long percpu_drift_mark; | ||
| 495 | |||
| 496 | #if defined CONFIG_COMPACTION || defined CONFIG_CMA | ||
| 497 | /* pfn where compaction free scanner should start */ | ||
| 498 | unsigned long compact_cached_free_pfn; | ||
| 499 | /* pfn where async and sync compaction migration scanner should start */ | ||
| 500 | unsigned long compact_cached_migrate_pfn[2]; | ||
| 501 | #endif | ||
| 502 | |||
| 503 | #ifdef CONFIG_COMPACTION | ||
| 504 | /* | ||
| 505 | * On compaction failure, 1<<compact_defer_shift compactions | ||
| 506 | * are skipped before trying again. The number attempted since | ||
| 507 | * last failure is tracked with compact_considered. | ||
| 508 | */ | ||
| 509 | unsigned int compact_considered; | ||
| 510 | unsigned int compact_defer_shift; | ||
| 511 | int compact_order_failed; | ||
| 512 | #endif | ||
| 513 | |||
| 514 | #if defined CONFIG_COMPACTION || defined CONFIG_CMA | ||
| 515 | /* Set to true when the PG_migrate_skip bits should be cleared */ | ||
| 516 | bool compact_blockskip_flush; | ||
| 517 | #endif | ||
| 518 | |||
| 519 | ZONE_PADDING(_pad3_) | ||
| 520 | /* Zone statistics */ | ||
| 521 | atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; | ||
| 517 | } ____cacheline_internodealigned_in_smp; | 522 | } ____cacheline_internodealigned_in_smp; |
| 518 | 523 | ||
| 519 | typedef enum { | 524 | typedef enum { |
| @@ -529,6 +534,7 @@ typedef enum { | |||
| 529 | ZONE_WRITEBACK, /* reclaim scanning has recently found | 534 | ZONE_WRITEBACK, /* reclaim scanning has recently found |
| 530 | * many pages under writeback | 535 | * many pages under writeback |
| 531 | */ | 536 | */ |
| 537 | ZONE_FAIR_DEPLETED, /* fair zone policy batch depleted */ | ||
| 532 | } zone_flags_t; | 538 | } zone_flags_t; |
| 533 | 539 | ||
| 534 | static inline void zone_set_flag(struct zone *zone, zone_flags_t flag) | 540 | static inline void zone_set_flag(struct zone *zone, zone_flags_t flag) |
| @@ -566,6 +572,11 @@ static inline int zone_is_reclaim_locked(const struct zone *zone) | |||
| 566 | return test_bit(ZONE_RECLAIM_LOCKED, &zone->flags); | 572 | return test_bit(ZONE_RECLAIM_LOCKED, &zone->flags); |
| 567 | } | 573 | } |
| 568 | 574 | ||
| 575 | static inline int zone_is_fair_depleted(const struct zone *zone) | ||
| 576 | { | ||
| 577 | return test_bit(ZONE_FAIR_DEPLETED, &zone->flags); | ||
| 578 | } | ||
| 579 | |||
| 569 | static inline int zone_is_oom_locked(const struct zone *zone) | 580 | static inline int zone_is_oom_locked(const struct zone *zone) |
| 570 | { | 581 | { |
| 571 | return test_bit(ZONE_OOM_LOCKED, &zone->flags); | 582 | return test_bit(ZONE_OOM_LOCKED, &zone->flags); |
| @@ -872,6 +883,8 @@ static inline int zone_movable_is_highmem(void) | |||
| 872 | { | 883 | { |
| 873 | #if defined(CONFIG_HIGHMEM) && defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) | 884 | #if defined(CONFIG_HIGHMEM) && defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) |
| 874 | return movable_zone == ZONE_HIGHMEM; | 885 | return movable_zone == ZONE_HIGHMEM; |
| 886 | #elif defined(CONFIG_HIGHMEM) | ||
| 887 | return (ZONE_MOVABLE - 1) == ZONE_HIGHMEM; | ||
| 875 | #else | 888 | #else |
| 876 | return 0; | 889 | return 0; |
| 877 | #endif | 890 | #endif |
diff --git a/include/linux/module.h b/include/linux/module.h index f520a767c86c..71f282a4e307 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -396,18 +396,25 @@ bool is_module_address(unsigned long addr); | |||
| 396 | bool is_module_percpu_address(unsigned long addr); | 396 | bool is_module_percpu_address(unsigned long addr); |
| 397 | bool is_module_text_address(unsigned long addr); | 397 | bool is_module_text_address(unsigned long addr); |
| 398 | 398 | ||
| 399 | static inline int within_module_core(unsigned long addr, const struct module *mod) | 399 | static inline bool within_module_core(unsigned long addr, |
| 400 | const struct module *mod) | ||
| 400 | { | 401 | { |
| 401 | return (unsigned long)mod->module_core <= addr && | 402 | return (unsigned long)mod->module_core <= addr && |
| 402 | addr < (unsigned long)mod->module_core + mod->core_size; | 403 | addr < (unsigned long)mod->module_core + mod->core_size; |
| 403 | } | 404 | } |
| 404 | 405 | ||
| 405 | static inline int within_module_init(unsigned long addr, const struct module *mod) | 406 | static inline bool within_module_init(unsigned long addr, |
| 407 | const struct module *mod) | ||
| 406 | { | 408 | { |
| 407 | return (unsigned long)mod->module_init <= addr && | 409 | return (unsigned long)mod->module_init <= addr && |
| 408 | addr < (unsigned long)mod->module_init + mod->init_size; | 410 | addr < (unsigned long)mod->module_init + mod->init_size; |
| 409 | } | 411 | } |
| 410 | 412 | ||
| 413 | static inline bool within_module(unsigned long addr, const struct module *mod) | ||
| 414 | { | ||
| 415 | return within_module_init(addr, mod) || within_module_core(addr, mod); | ||
| 416 | } | ||
| 417 | |||
| 411 | /* Search for module by name: must hold module_mutex. */ | 418 | /* Search for module by name: must hold module_mutex. */ |
| 412 | struct module *find_module(const char *name); | 419 | struct module *find_module(const char *name); |
| 413 | 420 | ||
diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h index 560ca53a75fa..7eeb9bbfb816 100644 --- a/include/linux/moduleloader.h +++ b/include/linux/moduleloader.h | |||
| @@ -45,7 +45,8 @@ static inline int apply_relocate(Elf_Shdr *sechdrs, | |||
| 45 | unsigned int relsec, | 45 | unsigned int relsec, |
| 46 | struct module *me) | 46 | struct module *me) |
| 47 | { | 47 | { |
| 48 | printk(KERN_ERR "module %s: REL relocation unsupported\n", me->name); | 48 | printk(KERN_ERR "module %s: REL relocation unsupported\n", |
| 49 | module_name(me)); | ||
| 49 | return -ENOEXEC; | 50 | return -ENOEXEC; |
| 50 | } | 51 | } |
| 51 | #endif | 52 | #endif |
| @@ -67,7 +68,8 @@ static inline int apply_relocate_add(Elf_Shdr *sechdrs, | |||
| 67 | unsigned int relsec, | 68 | unsigned int relsec, |
| 68 | struct module *me) | 69 | struct module *me) |
| 69 | { | 70 | { |
| 70 | printk(KERN_ERR "module %s: REL relocation unsupported\n", me->name); | 71 | printk(KERN_ERR "module %s: REL relocation unsupported\n", |
| 72 | module_name(me)); | ||
| 71 | return -ENOEXEC; | 73 | return -ENOEXEC; |
| 72 | } | 74 | } |
| 73 | #endif | 75 | #endif |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 839bac270904..9262e4bf0cc3 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
| @@ -42,13 +42,20 @@ struct mnt_namespace; | |||
| 42 | * flag, consider how it interacts with shared mounts. | 42 | * flag, consider how it interacts with shared mounts. |
| 43 | */ | 43 | */ |
| 44 | #define MNT_SHARED_MASK (MNT_UNBINDABLE) | 44 | #define MNT_SHARED_MASK (MNT_UNBINDABLE) |
| 45 | #define MNT_PROPAGATION_MASK (MNT_SHARED | MNT_UNBINDABLE) | 45 | #define MNT_USER_SETTABLE_MASK (MNT_NOSUID | MNT_NODEV | MNT_NOEXEC \ |
| 46 | | MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME \ | ||
| 47 | | MNT_READONLY) | ||
| 48 | #define MNT_ATIME_MASK (MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME ) | ||
| 46 | 49 | ||
| 47 | #define MNT_INTERNAL_FLAGS (MNT_SHARED | MNT_WRITE_HOLD | MNT_INTERNAL | \ | 50 | #define MNT_INTERNAL_FLAGS (MNT_SHARED | MNT_WRITE_HOLD | MNT_INTERNAL | \ |
| 48 | MNT_DOOMED | MNT_SYNC_UMOUNT | MNT_MARKED) | 51 | MNT_DOOMED | MNT_SYNC_UMOUNT | MNT_MARKED) |
| 49 | 52 | ||
| 50 | #define MNT_INTERNAL 0x4000 | 53 | #define MNT_INTERNAL 0x4000 |
| 51 | 54 | ||
| 55 | #define MNT_LOCK_ATIME 0x040000 | ||
| 56 | #define MNT_LOCK_NOEXEC 0x080000 | ||
| 57 | #define MNT_LOCK_NOSUID 0x100000 | ||
| 58 | #define MNT_LOCK_NODEV 0x200000 | ||
| 52 | #define MNT_LOCK_READONLY 0x400000 | 59 | #define MNT_LOCK_READONLY 0x400000 |
| 53 | #define MNT_LOCKED 0x800000 | 60 | #define MNT_LOCKED 0x800000 |
| 54 | #define MNT_DOOMED 0x1000000 | 61 | #define MNT_DOOMED 0x1000000 |
| @@ -62,6 +69,7 @@ struct vfsmount { | |||
| 62 | }; | 69 | }; |
| 63 | 70 | ||
| 64 | struct file; /* forward dec */ | 71 | struct file; /* forward dec */ |
| 72 | struct path; | ||
| 65 | 73 | ||
| 66 | extern int mnt_want_write(struct vfsmount *mnt); | 74 | extern int mnt_want_write(struct vfsmount *mnt); |
| 67 | extern int mnt_want_write_file(struct file *file); | 75 | extern int mnt_want_write_file(struct file *file); |
| @@ -70,8 +78,7 @@ extern void mnt_drop_write(struct vfsmount *mnt); | |||
| 70 | extern void mnt_drop_write_file(struct file *file); | 78 | extern void mnt_drop_write_file(struct file *file); |
| 71 | extern void mntput(struct vfsmount *mnt); | 79 | extern void mntput(struct vfsmount *mnt); |
| 72 | extern struct vfsmount *mntget(struct vfsmount *mnt); | 80 | extern struct vfsmount *mntget(struct vfsmount *mnt); |
| 73 | extern void mnt_pin(struct vfsmount *mnt); | 81 | extern struct vfsmount *mnt_clone_internal(struct path *path); |
| 74 | extern void mnt_unpin(struct vfsmount *mnt); | ||
| 75 | extern int __mnt_is_readonly(struct vfsmount *mnt); | 82 | extern int __mnt_is_readonly(struct vfsmount *mnt); |
| 76 | 83 | ||
| 77 | struct file_system_type; | 84 | struct file_system_type; |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index a1b0b4c8fd79..031ff3a9a0bd 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
| @@ -222,6 +222,7 @@ struct mtd_info { | |||
| 222 | int (*_lock) (struct mtd_info *mtd, loff_t ofs, uint64_t len); | 222 | int (*_lock) (struct mtd_info *mtd, loff_t ofs, uint64_t len); |
| 223 | int (*_unlock) (struct mtd_info *mtd, loff_t ofs, uint64_t len); | 223 | int (*_unlock) (struct mtd_info *mtd, loff_t ofs, uint64_t len); |
| 224 | int (*_is_locked) (struct mtd_info *mtd, loff_t ofs, uint64_t len); | 224 | int (*_is_locked) (struct mtd_info *mtd, loff_t ofs, uint64_t len); |
| 225 | int (*_block_isreserved) (struct mtd_info *mtd, loff_t ofs); | ||
| 225 | int (*_block_isbad) (struct mtd_info *mtd, loff_t ofs); | 226 | int (*_block_isbad) (struct mtd_info *mtd, loff_t ofs); |
| 226 | int (*_block_markbad) (struct mtd_info *mtd, loff_t ofs); | 227 | int (*_block_markbad) (struct mtd_info *mtd, loff_t ofs); |
| 227 | int (*_suspend) (struct mtd_info *mtd); | 228 | int (*_suspend) (struct mtd_info *mtd); |
| @@ -302,6 +303,7 @@ static inline void mtd_sync(struct mtd_info *mtd) | |||
| 302 | int mtd_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len); | 303 | int mtd_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len); |
| 303 | int mtd_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len); | 304 | int mtd_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len); |
| 304 | int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len); | 305 | int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len); |
| 306 | int mtd_block_isreserved(struct mtd_info *mtd, loff_t ofs); | ||
| 305 | int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs); | 307 | int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs); |
| 306 | int mtd_block_markbad(struct mtd_info *mtd, loff_t ofs); | 308 | int mtd_block_markbad(struct mtd_info *mtd, loff_t ofs); |
| 307 | 309 | ||
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 2f0af2891f0f..3083c53e0270 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
| @@ -810,6 +810,7 @@ extern struct nand_manufacturers nand_manuf_ids[]; | |||
| 810 | extern int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd); | 810 | extern int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd); |
| 811 | extern int nand_default_bbt(struct mtd_info *mtd); | 811 | extern int nand_default_bbt(struct mtd_info *mtd); |
| 812 | extern int nand_markbad_bbt(struct mtd_info *mtd, loff_t offs); | 812 | extern int nand_markbad_bbt(struct mtd_info *mtd, loff_t offs); |
| 813 | extern int nand_isreserved_bbt(struct mtd_info *mtd, loff_t offs); | ||
| 813 | extern int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt); | 814 | extern int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt); |
| 814 | extern int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, | 815 | extern int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, |
| 815 | int allowbbt); | 816 | int allowbbt); |
| @@ -947,4 +948,56 @@ static inline int jedec_feature(struct nand_chip *chip) | |||
| 947 | return chip->jedec_version ? le16_to_cpu(chip->jedec_params.features) | 948 | return chip->jedec_version ? le16_to_cpu(chip->jedec_params.features) |
| 948 | : 0; | 949 | : 0; |
| 949 | } | 950 | } |
| 951 | |||
| 952 | /** | ||
| 953 | * struct nand_sdr_timings - SDR NAND chip timings | ||
| 954 | * | ||
| 955 | * This struct defines the timing requirements of a SDR NAND chip. | ||
| 956 | * These informations can be found in every NAND datasheets and the timings | ||
| 957 | * meaning are described in the ONFI specifications: | ||
| 958 | * www.onfi.org/~/media/ONFI/specs/onfi_3_1_spec.pdf (chapter 4.15 Timing | ||
| 959 | * Parameters) | ||
| 960 | * | ||
| 961 | * All these timings are expressed in picoseconds. | ||
| 962 | */ | ||
| 963 | |||
| 964 | struct nand_sdr_timings { | ||
| 965 | u32 tALH_min; | ||
| 966 | u32 tADL_min; | ||
| 967 | u32 tALS_min; | ||
| 968 | u32 tAR_min; | ||
| 969 | u32 tCEA_max; | ||
| 970 | u32 tCEH_min; | ||
| 971 | u32 tCH_min; | ||
| 972 | u32 tCHZ_max; | ||
| 973 | u32 tCLH_min; | ||
| 974 | u32 tCLR_min; | ||
| 975 | u32 tCLS_min; | ||
| 976 | u32 tCOH_min; | ||
| 977 | u32 tCS_min; | ||
| 978 | u32 tDH_min; | ||
| 979 | u32 tDS_min; | ||
| 980 | u32 tFEAT_max; | ||
| 981 | u32 tIR_min; | ||
| 982 | u32 tITC_max; | ||
| 983 | u32 tRC_min; | ||
| 984 | u32 tREA_max; | ||
| 985 | u32 tREH_min; | ||
| 986 | u32 tRHOH_min; | ||
| 987 | u32 tRHW_min; | ||
| 988 | u32 tRHZ_max; | ||
| 989 | u32 tRLOH_min; | ||
| 990 | u32 tRP_min; | ||
| 991 | u32 tRR_min; | ||
| 992 | u64 tRST_max; | ||
| 993 | u32 tWB_max; | ||
| 994 | u32 tWC_min; | ||
| 995 | u32 tWH_min; | ||
| 996 | u32 tWHR_min; | ||
| 997 | u32 tWP_min; | ||
| 998 | u32 tWW_min; | ||
| 999 | }; | ||
| 1000 | |||
| 1001 | /* get timing characteristics from ONFI timing mode. */ | ||
| 1002 | const struct nand_sdr_timings *onfi_async_timing_mode_to_sdr_timings(int mode); | ||
| 950 | #endif /* __LINUX_MTD_NAND_H */ | 1003 | #endif /* __LINUX_MTD_NAND_H */ |
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index 53241842a7ab..9e6294f32ba8 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #define SPINOR_OP_SE 0xd8 /* Sector erase (usually 64KiB) */ | 34 | #define SPINOR_OP_SE 0xd8 /* Sector erase (usually 64KiB) */ |
| 35 | #define SPINOR_OP_RDID 0x9f /* Read JEDEC ID */ | 35 | #define SPINOR_OP_RDID 0x9f /* Read JEDEC ID */ |
| 36 | #define SPINOR_OP_RDCR 0x35 /* Read configuration register */ | 36 | #define SPINOR_OP_RDCR 0x35 /* Read configuration register */ |
| 37 | #define SPINOR_OP_RDFSR 0x70 /* Read flag status register */ | ||
| 37 | 38 | ||
| 38 | /* 4-byte address opcodes - used on Spansion and some Macronix flashes. */ | 39 | /* 4-byte address opcodes - used on Spansion and some Macronix flashes. */ |
| 39 | #define SPINOR_OP_READ4 0x13 /* Read data bytes (low frequency) */ | 40 | #define SPINOR_OP_READ4 0x13 /* Read data bytes (low frequency) */ |
| @@ -66,6 +67,9 @@ | |||
| 66 | 67 | ||
| 67 | #define SR_QUAD_EN_MX 0x40 /* Macronix Quad I/O */ | 68 | #define SR_QUAD_EN_MX 0x40 /* Macronix Quad I/O */ |
| 68 | 69 | ||
| 70 | /* Flag Status Register bits */ | ||
| 71 | #define FSR_READY 0x80 | ||
| 72 | |||
| 69 | /* Configuration Register bits. */ | 73 | /* Configuration Register bits. */ |
| 70 | #define CR_QUAD_EN_SPAN 0x2 /* Spansion Quad I/O */ | 74 | #define CR_QUAD_EN_SPAN 0x2 /* Spansion Quad I/O */ |
| 71 | 75 | ||
diff --git a/include/linux/mvebu-pmsu.h b/include/linux/mvebu-pmsu.h new file mode 100644 index 000000000000..b918d07efe23 --- /dev/null +++ b/include/linux/mvebu-pmsu.h | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2012 Marvell | ||
| 3 | * | ||
| 4 | * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
| 5 | * | ||
| 6 | * This file is licensed under the terms of the GNU General Public | ||
| 7 | * License version 2. This program is licensed "as is" without any | ||
| 8 | * warranty of any kind, whether express or implied. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __MVEBU_PMSU_H__ | ||
| 12 | #define __MVEBU_PMSU_H__ | ||
| 13 | |||
| 14 | #ifdef CONFIG_MACH_MVEBU_V7 | ||
| 15 | int mvebu_pmsu_dfs_request(int cpu); | ||
| 16 | #else | ||
| 17 | static inline int mvebu_pmsu_dfs_request(int cpu) { return -ENODEV; } | ||
| 18 | #endif | ||
| 19 | |||
| 20 | #endif /* __MVEBU_PMSU_H__ */ | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index e30f6059ecd6..5180a7ededec 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -52,6 +52,7 @@ struct nfs_access_entry { | |||
| 52 | unsigned long jiffies; | 52 | unsigned long jiffies; |
| 53 | struct rpc_cred * cred; | 53 | struct rpc_cred * cred; |
| 54 | int mask; | 54 | int mask; |
| 55 | struct rcu_head rcu_head; | ||
| 55 | }; | 56 | }; |
| 56 | 57 | ||
| 57 | struct nfs_lockowner { | 58 | struct nfs_lockowner { |
| @@ -352,6 +353,7 @@ extern int nfs_release(struct inode *, struct file *); | |||
| 352 | extern int nfs_attribute_timeout(struct inode *inode); | 353 | extern int nfs_attribute_timeout(struct inode *inode); |
| 353 | extern int nfs_attribute_cache_expired(struct inode *inode); | 354 | extern int nfs_attribute_cache_expired(struct inode *inode); |
| 354 | extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); | 355 | extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); |
| 356 | extern int nfs_revalidate_inode_rcu(struct nfs_server *server, struct inode *inode); | ||
| 355 | extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); | 357 | extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); |
| 356 | extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); | 358 | extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); |
| 357 | extern int nfs_setattr(struct dentry *, struct iattr *); | 359 | extern int nfs_setattr(struct dentry *, struct iattr *); |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 1150ea41b626..922be2e050f5 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
| @@ -45,6 +45,7 @@ struct nfs_client { | |||
| 45 | struct sockaddr_storage cl_addr; /* server identifier */ | 45 | struct sockaddr_storage cl_addr; /* server identifier */ |
| 46 | size_t cl_addrlen; | 46 | size_t cl_addrlen; |
| 47 | char * cl_hostname; /* hostname of server */ | 47 | char * cl_hostname; /* hostname of server */ |
| 48 | char * cl_acceptor; /* GSSAPI acceptor name */ | ||
| 48 | struct list_head cl_share_link; /* link in global client list */ | 49 | struct list_head cl_share_link; /* link in global client list */ |
| 49 | struct list_head cl_superblocks; /* List of nfs_server structs */ | 50 | struct list_head cl_superblocks; /* List of nfs_server structs */ |
| 50 | 51 | ||
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 7d9096d95d4a..6c3e06ee2fb7 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
| @@ -26,7 +26,7 @@ enum { | |||
| 26 | PG_MAPPED, /* page private set for buffered io */ | 26 | PG_MAPPED, /* page private set for buffered io */ |
| 27 | PG_CLEAN, /* write succeeded */ | 27 | PG_CLEAN, /* write succeeded */ |
| 28 | PG_COMMIT_TO_DS, /* used by pnfs layouts */ | 28 | PG_COMMIT_TO_DS, /* used by pnfs layouts */ |
| 29 | PG_INODE_REF, /* extra ref held by inode (head req only) */ | 29 | PG_INODE_REF, /* extra ref held by inode when in writeback */ |
| 30 | PG_HEADLOCK, /* page group lock of wb_head */ | 30 | PG_HEADLOCK, /* page group lock of wb_head */ |
| 31 | PG_TEARDOWN, /* page group sync for destroy */ | 31 | PG_TEARDOWN, /* page group sync for destroy */ |
| 32 | PG_UNLOCKPAGE, /* page group sync bit in read path */ | 32 | PG_UNLOCKPAGE, /* page group sync bit in read path */ |
| @@ -62,12 +62,13 @@ struct nfs_pageio_ops { | |||
| 62 | 62 | ||
| 63 | struct nfs_rw_ops { | 63 | struct nfs_rw_ops { |
| 64 | const fmode_t rw_mode; | 64 | const fmode_t rw_mode; |
| 65 | struct nfs_rw_header *(*rw_alloc_header)(void); | 65 | struct nfs_pgio_header *(*rw_alloc_header)(void); |
| 66 | void (*rw_free_header)(struct nfs_rw_header *); | 66 | void (*rw_free_header)(struct nfs_pgio_header *); |
| 67 | void (*rw_release)(struct nfs_pgio_data *); | 67 | void (*rw_release)(struct nfs_pgio_header *); |
| 68 | int (*rw_done)(struct rpc_task *, struct nfs_pgio_data *, struct inode *); | 68 | int (*rw_done)(struct rpc_task *, struct nfs_pgio_header *, |
| 69 | void (*rw_result)(struct rpc_task *, struct nfs_pgio_data *); | 69 | struct inode *); |
| 70 | void (*rw_initiate)(struct nfs_pgio_data *, struct rpc_message *, | 70 | void (*rw_result)(struct rpc_task *, struct nfs_pgio_header *); |
| 71 | void (*rw_initiate)(struct nfs_pgio_header *, struct rpc_message *, | ||
| 71 | struct rpc_task_setup *, int); | 72 | struct rpc_task_setup *, int); |
| 72 | }; | 73 | }; |
| 73 | 74 | ||
| @@ -111,6 +112,8 @@ extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc, | |||
| 111 | int how); | 112 | int how); |
| 112 | extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *, | 113 | extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *, |
| 113 | struct nfs_page *); | 114 | struct nfs_page *); |
| 115 | extern int nfs_pageio_resend(struct nfs_pageio_descriptor *, | ||
| 116 | struct nfs_pgio_header *); | ||
| 114 | extern void nfs_pageio_complete(struct nfs_pageio_descriptor *desc); | 117 | extern void nfs_pageio_complete(struct nfs_pageio_descriptor *desc); |
| 115 | extern void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *, pgoff_t); | 118 | extern void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *, pgoff_t); |
| 116 | extern size_t nfs_generic_pg_test(struct nfs_pageio_descriptor *desc, | 119 | extern size_t nfs_generic_pg_test(struct nfs_pageio_descriptor *desc, |
| @@ -119,7 +122,8 @@ extern size_t nfs_generic_pg_test(struct nfs_pageio_descriptor *desc, | |||
| 119 | extern int nfs_wait_on_request(struct nfs_page *); | 122 | extern int nfs_wait_on_request(struct nfs_page *); |
| 120 | extern void nfs_unlock_request(struct nfs_page *req); | 123 | extern void nfs_unlock_request(struct nfs_page *req); |
| 121 | extern void nfs_unlock_and_release_request(struct nfs_page *); | 124 | extern void nfs_unlock_and_release_request(struct nfs_page *); |
| 122 | extern void nfs_page_group_lock(struct nfs_page *); | 125 | extern int nfs_page_group_lock(struct nfs_page *, bool); |
| 126 | extern void nfs_page_group_lock_wait(struct nfs_page *); | ||
| 123 | extern void nfs_page_group_unlock(struct nfs_page *); | 127 | extern void nfs_page_group_unlock(struct nfs_page *); |
| 124 | extern bool nfs_page_group_sync_on_bit(struct nfs_page *, unsigned int); | 128 | extern bool nfs_page_group_sync_on_bit(struct nfs_page *, unsigned int); |
| 125 | 129 | ||
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 9a1396e70310..0040629894df 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -993,6 +993,7 @@ struct nfs4_setclientid { | |||
| 993 | unsigned int sc_uaddr_len; | 993 | unsigned int sc_uaddr_len; |
| 994 | char sc_uaddr[RPCBIND_MAXUADDRLEN + 1]; | 994 | char sc_uaddr[RPCBIND_MAXUADDRLEN + 1]; |
| 995 | u32 sc_cb_ident; | 995 | u32 sc_cb_ident; |
| 996 | struct rpc_cred *sc_cred; | ||
| 996 | }; | 997 | }; |
| 997 | 998 | ||
| 998 | struct nfs4_setclientid_res { | 999 | struct nfs4_setclientid_res { |
| @@ -1253,18 +1254,12 @@ enum { | |||
| 1253 | NFS_IOHDR_ERROR = 0, | 1254 | NFS_IOHDR_ERROR = 0, |
| 1254 | NFS_IOHDR_EOF, | 1255 | NFS_IOHDR_EOF, |
| 1255 | NFS_IOHDR_REDO, | 1256 | NFS_IOHDR_REDO, |
| 1256 | NFS_IOHDR_NEED_COMMIT, | ||
| 1257 | NFS_IOHDR_NEED_RESCHED, | ||
| 1258 | }; | 1257 | }; |
| 1259 | 1258 | ||
| 1260 | struct nfs_pgio_data; | ||
| 1261 | |||
| 1262 | struct nfs_pgio_header { | 1259 | struct nfs_pgio_header { |
| 1263 | struct inode *inode; | 1260 | struct inode *inode; |
| 1264 | struct rpc_cred *cred; | 1261 | struct rpc_cred *cred; |
| 1265 | struct list_head pages; | 1262 | struct list_head pages; |
| 1266 | struct nfs_pgio_data *data; | ||
| 1267 | atomic_t refcnt; | ||
| 1268 | struct nfs_page *req; | 1263 | struct nfs_page *req; |
| 1269 | struct nfs_writeverf verf; /* Used for writes */ | 1264 | struct nfs_writeverf verf; /* Used for writes */ |
| 1270 | struct pnfs_layout_segment *lseg; | 1265 | struct pnfs_layout_segment *lseg; |
| @@ -1281,28 +1276,22 @@ struct nfs_pgio_header { | |||
| 1281 | int error; /* merge with pnfs_error */ | 1276 | int error; /* merge with pnfs_error */ |
| 1282 | unsigned long good_bytes; /* boundary of good data */ | 1277 | unsigned long good_bytes; /* boundary of good data */ |
| 1283 | unsigned long flags; | 1278 | unsigned long flags; |
| 1284 | }; | ||
| 1285 | 1279 | ||
| 1286 | struct nfs_pgio_data { | 1280 | /* |
| 1287 | struct nfs_pgio_header *header; | 1281 | * rpc data |
| 1282 | */ | ||
| 1288 | struct rpc_task task; | 1283 | struct rpc_task task; |
| 1289 | struct nfs_fattr fattr; | 1284 | struct nfs_fattr fattr; |
| 1290 | struct nfs_writeverf verf; /* Used for writes */ | ||
| 1291 | struct nfs_pgio_args args; /* argument struct */ | 1285 | struct nfs_pgio_args args; /* argument struct */ |
| 1292 | struct nfs_pgio_res res; /* result struct */ | 1286 | struct nfs_pgio_res res; /* result struct */ |
| 1293 | unsigned long timestamp; /* For lease renewal */ | 1287 | unsigned long timestamp; /* For lease renewal */ |
| 1294 | int (*pgio_done_cb) (struct rpc_task *task, struct nfs_pgio_data *data); | 1288 | int (*pgio_done_cb)(struct rpc_task *, struct nfs_pgio_header *); |
| 1295 | __u64 mds_offset; /* Filelayout dense stripe */ | 1289 | __u64 mds_offset; /* Filelayout dense stripe */ |
| 1296 | struct nfs_page_array pages; | 1290 | struct nfs_page_array page_array; |
| 1297 | struct nfs_client *ds_clp; /* pNFS data server */ | 1291 | struct nfs_client *ds_clp; /* pNFS data server */ |
| 1298 | int ds_idx; /* ds index if ds_clp is set */ | 1292 | int ds_idx; /* ds index if ds_clp is set */ |
| 1299 | }; | 1293 | }; |
| 1300 | 1294 | ||
| 1301 | struct nfs_rw_header { | ||
| 1302 | struct nfs_pgio_header header; | ||
| 1303 | struct nfs_pgio_data rpc_data; | ||
| 1304 | }; | ||
| 1305 | |||
| 1306 | struct nfs_mds_commit_info { | 1295 | struct nfs_mds_commit_info { |
| 1307 | atomic_t rpcs_out; | 1296 | atomic_t rpcs_out; |
| 1308 | unsigned long ncommit; | 1297 | unsigned long ncommit; |
| @@ -1432,11 +1421,12 @@ struct nfs_rpc_ops { | |||
| 1432 | struct nfs_pathconf *); | 1421 | struct nfs_pathconf *); |
| 1433 | int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); | 1422 | int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); |
| 1434 | int (*decode_dirent)(struct xdr_stream *, struct nfs_entry *, int); | 1423 | int (*decode_dirent)(struct xdr_stream *, struct nfs_entry *, int); |
| 1435 | int (*pgio_rpc_prepare)(struct rpc_task *, struct nfs_pgio_data *); | 1424 | int (*pgio_rpc_prepare)(struct rpc_task *, |
| 1436 | void (*read_setup) (struct nfs_pgio_data *, struct rpc_message *); | 1425 | struct nfs_pgio_header *); |
| 1437 | int (*read_done) (struct rpc_task *, struct nfs_pgio_data *); | 1426 | void (*read_setup)(struct nfs_pgio_header *, struct rpc_message *); |
| 1438 | void (*write_setup) (struct nfs_pgio_data *, struct rpc_message *); | 1427 | int (*read_done)(struct rpc_task *, struct nfs_pgio_header *); |
| 1439 | int (*write_done) (struct rpc_task *, struct nfs_pgio_data *); | 1428 | void (*write_setup)(struct nfs_pgio_header *, struct rpc_message *); |
| 1429 | int (*write_done)(struct rpc_task *, struct nfs_pgio_header *); | ||
| 1440 | void (*commit_setup) (struct nfs_commit_data *, struct rpc_message *); | 1430 | void (*commit_setup) (struct nfs_commit_data *, struct rpc_message *); |
| 1441 | void (*commit_rpc_prepare)(struct rpc_task *, struct nfs_commit_data *); | 1431 | void (*commit_rpc_prepare)(struct rpc_task *, struct nfs_commit_data *); |
| 1442 | int (*commit_done) (struct rpc_task *, struct nfs_commit_data *); | 1432 | int (*commit_done) (struct rpc_task *, struct nfs_commit_data *); |
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index 58b9a02c38d2..83a6aeda899d 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
| @@ -430,7 +430,15 @@ static inline int num_node_state(enum node_states state) | |||
| 430 | for_each_node_mask((__node), node_states[__state]) | 430 | for_each_node_mask((__node), node_states[__state]) |
| 431 | 431 | ||
| 432 | #define first_online_node first_node(node_states[N_ONLINE]) | 432 | #define first_online_node first_node(node_states[N_ONLINE]) |
| 433 | #define next_online_node(nid) next_node((nid), node_states[N_ONLINE]) | 433 | #define first_memory_node first_node(node_states[N_MEMORY]) |
| 434 | static inline int next_online_node(int nid) | ||
| 435 | { | ||
| 436 | return next_node(nid, node_states[N_ONLINE]); | ||
| 437 | } | ||
| 438 | static inline int next_memory_node(int nid) | ||
| 439 | { | ||
| 440 | return next_node(nid, node_states[N_MEMORY]); | ||
| 441 | } | ||
| 434 | 442 | ||
| 435 | extern int nr_node_ids; | 443 | extern int nr_node_ids; |
| 436 | extern int nr_online_nodes; | 444 | extern int nr_online_nodes; |
| @@ -471,6 +479,7 @@ static inline int num_node_state(enum node_states state) | |||
| 471 | for ( (node) = 0; (node) == 0; (node) = 1) | 479 | for ( (node) = 0; (node) == 0; (node) = 1) |
| 472 | 480 | ||
| 473 | #define first_online_node 0 | 481 | #define first_online_node 0 |
| 482 | #define first_memory_node 0 | ||
| 474 | #define next_online_node(nid) (MAX_NUMNODES) | 483 | #define next_online_node(nid) (MAX_NUMNODES) |
| 475 | #define nr_node_ids 1 | 484 | #define nr_node_ids 1 |
| 476 | #define nr_online_nodes 1 | 485 | #define nr_online_nodes 1 |
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h index b4ec59d159ac..35fa08fd7739 100644 --- a/include/linux/nsproxy.h +++ b/include/linux/nsproxy.h | |||
| @@ -40,32 +40,28 @@ extern struct nsproxy init_nsproxy; | |||
| 40 | * the namespaces access rules are: | 40 | * the namespaces access rules are: |
| 41 | * | 41 | * |
| 42 | * 1. only current task is allowed to change tsk->nsproxy pointer or | 42 | * 1. only current task is allowed to change tsk->nsproxy pointer or |
| 43 | * any pointer on the nsproxy itself | 43 | * any pointer on the nsproxy itself. Current must hold the task_lock |
| 44 | * when changing tsk->nsproxy. | ||
| 44 | * | 45 | * |
| 45 | * 2. when accessing (i.e. reading) current task's namespaces - no | 46 | * 2. when accessing (i.e. reading) current task's namespaces - no |
| 46 | * precautions should be taken - just dereference the pointers | 47 | * precautions should be taken - just dereference the pointers |
| 47 | * | 48 | * |
| 48 | * 3. the access to other task namespaces is performed like this | 49 | * 3. the access to other task namespaces is performed like this |
| 49 | * rcu_read_lock(); | 50 | * task_lock(task); |
| 50 | * nsproxy = task_nsproxy(tsk); | 51 | * nsproxy = task->nsproxy; |
| 51 | * if (nsproxy != NULL) { | 52 | * if (nsproxy != NULL) { |
| 52 | * / * | 53 | * / * |
| 53 | * * work with the namespaces here | 54 | * * work with the namespaces here |
| 54 | * * e.g. get the reference on one of them | 55 | * * e.g. get the reference on one of them |
| 55 | * * / | 56 | * * / |
| 56 | * } / * | 57 | * } / * |
| 57 | * * NULL task_nsproxy() means that this task is | 58 | * * NULL task->nsproxy means that this task is |
| 58 | * * almost dead (zombie) | 59 | * * almost dead (zombie) |
| 59 | * * / | 60 | * * / |
| 60 | * rcu_read_unlock(); | 61 | * task_unlock(task); |
| 61 | * | 62 | * |
| 62 | */ | 63 | */ |
| 63 | 64 | ||
| 64 | static inline struct nsproxy *task_nsproxy(struct task_struct *tsk) | ||
| 65 | { | ||
| 66 | return rcu_dereference(tsk->nsproxy); | ||
| 67 | } | ||
| 68 | |||
| 69 | int copy_namespaces(unsigned long flags, struct task_struct *tsk); | 65 | int copy_namespaces(unsigned long flags, struct task_struct *tsk); |
| 70 | void exit_task_namespaces(struct task_struct *tsk); | 66 | void exit_task_namespaces(struct task_struct *tsk); |
| 71 | void switch_task_namespaces(struct task_struct *tsk, struct nsproxy *new); | 67 | void switch_task_namespaces(struct task_struct *tsk, struct nsproxy *new); |
diff --git a/include/linux/of.h b/include/linux/of.h index 196b34c1ef4e..6c4363b8ddc3 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
| @@ -74,8 +74,6 @@ struct of_phandle_args { | |||
| 74 | uint32_t args[MAX_PHANDLE_ARGS]; | 74 | uint32_t args[MAX_PHANDLE_ARGS]; |
| 75 | }; | 75 | }; |
| 76 | 76 | ||
| 77 | extern int of_node_add(struct device_node *node); | ||
| 78 | |||
| 79 | /* initialize a node */ | 77 | /* initialize a node */ |
| 80 | extern struct kobj_type of_node_ktype; | 78 | extern struct kobj_type of_node_ktype; |
| 81 | static inline void of_node_init(struct device_node *node) | 79 | static inline void of_node_init(struct device_node *node) |
| @@ -113,6 +111,7 @@ static inline void of_node_put(struct device_node *node) { } | |||
| 113 | extern struct device_node *of_allnodes; | 111 | extern struct device_node *of_allnodes; |
| 114 | extern struct device_node *of_chosen; | 112 | extern struct device_node *of_chosen; |
| 115 | extern struct device_node *of_aliases; | 113 | extern struct device_node *of_aliases; |
| 114 | extern struct device_node *of_stdout; | ||
| 116 | extern raw_spinlock_t devtree_lock; | 115 | extern raw_spinlock_t devtree_lock; |
| 117 | 116 | ||
| 118 | static inline bool of_have_populated_dt(void) | 117 | static inline bool of_have_populated_dt(void) |
| @@ -204,6 +203,7 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size) | |||
| 204 | #define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */ | 203 | #define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */ |
| 205 | #define OF_DETACHED 2 /* node has been detached from the device tree */ | 204 | #define OF_DETACHED 2 /* node has been detached from the device tree */ |
| 206 | #define OF_POPULATED 3 /* device already created for the node */ | 205 | #define OF_POPULATED 3 /* device already created for the node */ |
| 206 | #define OF_POPULATED_BUS 4 /* of_platform_populate recursed to children of this node */ | ||
| 207 | 207 | ||
| 208 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) | 208 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) |
| 209 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) | 209 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) |
| @@ -322,6 +322,7 @@ extern int of_update_property(struct device_node *np, struct property *newprop); | |||
| 322 | struct of_prop_reconfig { | 322 | struct of_prop_reconfig { |
| 323 | struct device_node *dn; | 323 | struct device_node *dn; |
| 324 | struct property *prop; | 324 | struct property *prop; |
| 325 | struct property *old_prop; | ||
| 325 | }; | 326 | }; |
| 326 | 327 | ||
| 327 | extern int of_reconfig_notifier_register(struct notifier_block *); | 328 | extern int of_reconfig_notifier_register(struct notifier_block *); |
| @@ -352,7 +353,7 @@ const __be32 *of_prop_next_u32(struct property *prop, const __be32 *cur, | |||
| 352 | */ | 353 | */ |
| 353 | const char *of_prop_next_string(struct property *prop, const char *cur); | 354 | const char *of_prop_next_string(struct property *prop, const char *cur); |
| 354 | 355 | ||
| 355 | int of_device_is_stdout_path(struct device_node *dn); | 356 | bool of_console_check(struct device_node *dn, char *name, int index); |
| 356 | 357 | ||
| 357 | #else /* CONFIG_OF */ | 358 | #else /* CONFIG_OF */ |
| 358 | 359 | ||
| @@ -564,9 +565,9 @@ static inline int of_machine_is_compatible(const char *compat) | |||
| 564 | return 0; | 565 | return 0; |
| 565 | } | 566 | } |
| 566 | 567 | ||
| 567 | static inline int of_device_is_stdout_path(struct device_node *dn) | 568 | static inline bool of_console_check(const struct device_node *dn, const char *name, int index) |
| 568 | { | 569 | { |
| 569 | return 0; | 570 | return false; |
| 570 | } | 571 | } |
| 571 | 572 | ||
| 572 | static inline const __be32 *of_prop_next_u32(struct property *prop, | 573 | static inline const __be32 *of_prop_next_u32(struct property *prop, |
| @@ -786,4 +787,80 @@ typedef void (*of_init_fn_1)(struct device_node *); | |||
| 786 | #define OF_DECLARE_2(table, name, compat, fn) \ | 787 | #define OF_DECLARE_2(table, name, compat, fn) \ |
| 787 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2) | 788 | _OF_DECLARE(table, name, compat, fn, of_init_fn_2) |
| 788 | 789 | ||
| 790 | /** | ||
| 791 | * struct of_changeset_entry - Holds a changeset entry | ||
| 792 | * | ||
| 793 | * @node: list_head for the log list | ||
| 794 | * @action: notifier action | ||
| 795 | * @np: pointer to the device node affected | ||
| 796 | * @prop: pointer to the property affected | ||
| 797 | * @old_prop: hold a pointer to the original property | ||
| 798 | * | ||
| 799 | * Every modification of the device tree during a changeset | ||
| 800 | * is held in a list of of_changeset_entry structures. | ||
| 801 | * That way we can recover from a partial application, or we can | ||
| 802 | * revert the changeset | ||
| 803 | */ | ||
| 804 | struct of_changeset_entry { | ||
| 805 | struct list_head node; | ||
| 806 | unsigned long action; | ||
| 807 | struct device_node *np; | ||
| 808 | struct property *prop; | ||
| 809 | struct property *old_prop; | ||
| 810 | }; | ||
| 811 | |||
| 812 | /** | ||
| 813 | * struct of_changeset - changeset tracker structure | ||
| 814 | * | ||
| 815 | * @entries: list_head for the changeset entries | ||
| 816 | * | ||
| 817 | * changesets are a convenient way to apply bulk changes to the | ||
| 818 | * live tree. In case of an error, changes are rolled-back. | ||
| 819 | * changesets live on after initial application, and if not | ||
| 820 | * destroyed after use, they can be reverted in one single call. | ||
| 821 | */ | ||
| 822 | struct of_changeset { | ||
| 823 | struct list_head entries; | ||
| 824 | }; | ||
| 825 | |||
| 826 | #ifdef CONFIG_OF_DYNAMIC | ||
| 827 | extern void of_changeset_init(struct of_changeset *ocs); | ||
| 828 | extern void of_changeset_destroy(struct of_changeset *ocs); | ||
| 829 | extern int of_changeset_apply(struct of_changeset *ocs); | ||
| 830 | extern int of_changeset_revert(struct of_changeset *ocs); | ||
| 831 | extern int of_changeset_action(struct of_changeset *ocs, | ||
| 832 | unsigned long action, struct device_node *np, | ||
| 833 | struct property *prop); | ||
| 834 | |||
| 835 | static inline int of_changeset_attach_node(struct of_changeset *ocs, | ||
| 836 | struct device_node *np) | ||
| 837 | { | ||
| 838 | return of_changeset_action(ocs, OF_RECONFIG_ATTACH_NODE, np, NULL); | ||
| 839 | } | ||
| 840 | |||
| 841 | static inline int of_changeset_detach_node(struct of_changeset *ocs, | ||
| 842 | struct device_node *np) | ||
| 843 | { | ||
| 844 | return of_changeset_action(ocs, OF_RECONFIG_DETACH_NODE, np, NULL); | ||
| 845 | } | ||
| 846 | |||
| 847 | static inline int of_changeset_add_property(struct of_changeset *ocs, | ||
| 848 | struct device_node *np, struct property *prop) | ||
| 849 | { | ||
| 850 | return of_changeset_action(ocs, OF_RECONFIG_ADD_PROPERTY, np, prop); | ||
| 851 | } | ||
| 852 | |||
| 853 | static inline int of_changeset_remove_property(struct of_changeset *ocs, | ||
| 854 | struct device_node *np, struct property *prop) | ||
| 855 | { | ||
| 856 | return of_changeset_action(ocs, OF_RECONFIG_REMOVE_PROPERTY, np, prop); | ||
| 857 | } | ||
| 858 | |||
| 859 | static inline int of_changeset_update_property(struct of_changeset *ocs, | ||
| 860 | struct device_node *np, struct property *prop) | ||
| 861 | { | ||
| 862 | return of_changeset_action(ocs, OF_RECONFIG_UPDATE_PROPERTY, np, prop); | ||
| 863 | } | ||
| 864 | #endif | ||
| 865 | |||
| 789 | #endif /* _LINUX_OF_H */ | 866 | #endif /* _LINUX_OF_H */ |
diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h index ae36298ba076..56bc026c143f 100644 --- a/include/linux/of_dma.h +++ b/include/linux/of_dma.h | |||
| @@ -41,6 +41,8 @@ extern struct dma_chan *of_dma_request_slave_channel(struct device_node *np, | |||
| 41 | const char *name); | 41 | const char *name); |
| 42 | extern struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec, | 42 | extern struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec, |
| 43 | struct of_dma *ofdma); | 43 | struct of_dma *ofdma); |
| 44 | extern struct dma_chan *of_dma_xlate_by_chan_id(struct of_phandle_args *dma_spec, | ||
| 45 | struct of_dma *ofdma); | ||
| 44 | #else | 46 | #else |
| 45 | static inline int of_dma_controller_register(struct device_node *np, | 47 | static inline int of_dma_controller_register(struct device_node *np, |
| 46 | struct dma_chan *(*of_dma_xlate) | 48 | struct dma_chan *(*of_dma_xlate) |
| @@ -66,6 +68,8 @@ static inline struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_s | |||
| 66 | return NULL; | 68 | return NULL; |
| 67 | } | 69 | } |
| 68 | 70 | ||
| 71 | #define of_dma_xlate_by_chan_id NULL | ||
| 72 | |||
| 69 | #endif | 73 | #endif |
| 70 | 74 | ||
| 71 | #endif /* __LINUX_OF_DMA_H */ | 75 | #endif /* __LINUX_OF_DMA_H */ |
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index d96e1badbee0..c2b0627a2317 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
| @@ -72,7 +72,7 @@ extern int of_platform_populate(struct device_node *root, | |||
| 72 | const struct of_device_id *matches, | 72 | const struct of_device_id *matches, |
| 73 | const struct of_dev_auxdata *lookup, | 73 | const struct of_dev_auxdata *lookup, |
| 74 | struct device *parent); | 74 | struct device *parent); |
| 75 | extern int of_platform_depopulate(struct device *parent); | 75 | extern void of_platform_depopulate(struct device *parent); |
| 76 | #else | 76 | #else |
| 77 | static inline int of_platform_populate(struct device_node *root, | 77 | static inline int of_platform_populate(struct device_node *root, |
| 78 | const struct of_device_id *matches, | 78 | const struct of_device_id *matches, |
| @@ -81,10 +81,7 @@ static inline int of_platform_populate(struct device_node *root, | |||
| 81 | { | 81 | { |
| 82 | return -ENODEV; | 82 | return -ENODEV; |
| 83 | } | 83 | } |
| 84 | static inline int of_platform_depopulate(struct device *parent) | 84 | static inline void of_platform_depopulate(struct device *parent) { } |
| 85 | { | ||
| 86 | return -ENODEV; | ||
| 87 | } | ||
| 88 | #endif | 85 | #endif |
| 89 | 86 | ||
| 90 | #endif /* _LINUX_OF_PLATFORM_H */ | 87 | #endif /* _LINUX_OF_PLATFORM_H */ |
diff --git a/include/linux/of_reserved_mem.h b/include/linux/of_reserved_mem.h index 4669ddfdd5af..5b5efae09135 100644 --- a/include/linux/of_reserved_mem.h +++ b/include/linux/of_reserved_mem.h | |||
| @@ -8,6 +8,7 @@ struct reserved_mem_ops; | |||
| 8 | struct reserved_mem { | 8 | struct reserved_mem { |
| 9 | const char *name; | 9 | const char *name; |
| 10 | unsigned long fdt_node; | 10 | unsigned long fdt_node; |
| 11 | unsigned long phandle; | ||
| 11 | const struct reserved_mem_ops *ops; | 12 | const struct reserved_mem_ops *ops; |
| 12 | phys_addr_t base; | 13 | phys_addr_t base; |
| 13 | phys_addr_t size; | 14 | phys_addr_t size; |
| @@ -27,10 +28,16 @@ typedef int (*reservedmem_of_init_fn)(struct reserved_mem *rmem); | |||
| 27 | _OF_DECLARE(reservedmem, name, compat, init, reservedmem_of_init_fn) | 28 | _OF_DECLARE(reservedmem, name, compat, init, reservedmem_of_init_fn) |
| 28 | 29 | ||
| 29 | #ifdef CONFIG_OF_RESERVED_MEM | 30 | #ifdef CONFIG_OF_RESERVED_MEM |
| 31 | void of_reserved_mem_device_init(struct device *dev); | ||
| 32 | void of_reserved_mem_device_release(struct device *dev); | ||
| 33 | |||
| 30 | void fdt_init_reserved_mem(void); | 34 | void fdt_init_reserved_mem(void); |
| 31 | void fdt_reserved_mem_save_node(unsigned long node, const char *uname, | 35 | void fdt_reserved_mem_save_node(unsigned long node, const char *uname, |
| 32 | phys_addr_t base, phys_addr_t size); | 36 | phys_addr_t base, phys_addr_t size); |
| 33 | #else | 37 | #else |
| 38 | static inline void of_reserved_mem_device_init(struct device *dev) { } | ||
| 39 | static inline void of_reserved_mem_device_release(struct device *pdev) { } | ||
| 40 | |||
| 34 | static inline void fdt_init_reserved_mem(void) { } | 41 | static inline void fdt_init_reserved_mem(void) { } |
| 35 | static inline void fdt_reserved_mem_save_node(unsigned long node, | 42 | static inline void fdt_reserved_mem_save_node(unsigned long node, |
| 36 | const char *uname, phys_addr_t base, phys_addr_t size) { } | 43 | const char *uname, phys_addr_t base, phys_addr_t size) { } |
diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h index 88e6ea4a5d36..6f06f8bc612c 100644 --- a/include/linux/omap-dma.h +++ b/include/linux/omap-dma.h | |||
| @@ -130,6 +130,7 @@ | |||
| 130 | #define IS_WORD_16 BIT(0xd) | 130 | #define IS_WORD_16 BIT(0xd) |
| 131 | #define ENABLE_16XX_MODE BIT(0xe) | 131 | #define ENABLE_16XX_MODE BIT(0xe) |
| 132 | #define HS_CHANNELS_RESERVED BIT(0xf) | 132 | #define HS_CHANNELS_RESERVED BIT(0xf) |
| 133 | #define DMA_ENGINE_HANDLE_IRQ BIT(0x10) | ||
| 133 | 134 | ||
| 134 | /* Defines for DMA Capabilities */ | 135 | /* Defines for DMA Capabilities */ |
| 135 | #define DMA_HAS_TRANSPARENT_CAPS (0x1 << 18) | 136 | #define DMA_HAS_TRANSPARENT_CAPS (0x1 << 18) |
diff --git a/include/linux/oom.h b/include/linux/oom.h index 4cd62677feb9..647395a1a550 100644 --- a/include/linux/oom.h +++ b/include/linux/oom.h | |||
| @@ -55,8 +55,8 @@ extern void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order, | |||
| 55 | struct mem_cgroup *memcg, nodemask_t *nodemask, | 55 | struct mem_cgroup *memcg, nodemask_t *nodemask, |
| 56 | const char *message); | 56 | const char *message); |
| 57 | 57 | ||
| 58 | extern int try_set_zonelist_oom(struct zonelist *zonelist, gfp_t gfp_flags); | 58 | extern bool oom_zonelist_trylock(struct zonelist *zonelist, gfp_t gfp_flags); |
| 59 | extern void clear_zonelist_oom(struct zonelist *zonelist, gfp_t gfp_flags); | 59 | extern void oom_zonelist_unlock(struct zonelist *zonelist, gfp_t gfp_flags); |
| 60 | 60 | ||
| 61 | extern void check_panic_on_oom(enum oom_constraint constraint, gfp_t gfp_mask, | 61 | extern void check_panic_on_oom(enum oom_constraint constraint, gfp_t gfp_mask, |
| 62 | int order, const nodemask_t *nodemask); | 62 | int order, const nodemask_t *nodemask); |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 8304959ad336..e1f5fcd79792 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
| @@ -171,13 +171,12 @@ static inline int __TestClearPage##uname(struct page *page) \ | |||
| 171 | #define __PAGEFLAG(uname, lname) TESTPAGEFLAG(uname, lname) \ | 171 | #define __PAGEFLAG(uname, lname) TESTPAGEFLAG(uname, lname) \ |
| 172 | __SETPAGEFLAG(uname, lname) __CLEARPAGEFLAG(uname, lname) | 172 | __SETPAGEFLAG(uname, lname) __CLEARPAGEFLAG(uname, lname) |
| 173 | 173 | ||
| 174 | #define PAGEFLAG_FALSE(uname) \ | ||
| 175 | static inline int Page##uname(const struct page *page) \ | ||
| 176 | { return 0; } | ||
| 177 | |||
| 178 | #define TESTSCFLAG(uname, lname) \ | 174 | #define TESTSCFLAG(uname, lname) \ |
| 179 | TESTSETFLAG(uname, lname) TESTCLEARFLAG(uname, lname) | 175 | TESTSETFLAG(uname, lname) TESTCLEARFLAG(uname, lname) |
| 180 | 176 | ||
| 177 | #define TESTPAGEFLAG_FALSE(uname) \ | ||
| 178 | static inline int Page##uname(const struct page *page) { return 0; } | ||
| 179 | |||
| 181 | #define SETPAGEFLAG_NOOP(uname) \ | 180 | #define SETPAGEFLAG_NOOP(uname) \ |
| 182 | static inline void SetPage##uname(struct page *page) { } | 181 | static inline void SetPage##uname(struct page *page) { } |
| 183 | 182 | ||
| @@ -187,12 +186,21 @@ static inline void ClearPage##uname(struct page *page) { } | |||
| 187 | #define __CLEARPAGEFLAG_NOOP(uname) \ | 186 | #define __CLEARPAGEFLAG_NOOP(uname) \ |
| 188 | static inline void __ClearPage##uname(struct page *page) { } | 187 | static inline void __ClearPage##uname(struct page *page) { } |
| 189 | 188 | ||
| 189 | #define TESTSETFLAG_FALSE(uname) \ | ||
| 190 | static inline int TestSetPage##uname(struct page *page) { return 0; } | ||
| 191 | |||
| 190 | #define TESTCLEARFLAG_FALSE(uname) \ | 192 | #define TESTCLEARFLAG_FALSE(uname) \ |
| 191 | static inline int TestClearPage##uname(struct page *page) { return 0; } | 193 | static inline int TestClearPage##uname(struct page *page) { return 0; } |
| 192 | 194 | ||
| 193 | #define __TESTCLEARFLAG_FALSE(uname) \ | 195 | #define __TESTCLEARFLAG_FALSE(uname) \ |
| 194 | static inline int __TestClearPage##uname(struct page *page) { return 0; } | 196 | static inline int __TestClearPage##uname(struct page *page) { return 0; } |
| 195 | 197 | ||
| 198 | #define PAGEFLAG_FALSE(uname) TESTPAGEFLAG_FALSE(uname) \ | ||
| 199 | SETPAGEFLAG_NOOP(uname) CLEARPAGEFLAG_NOOP(uname) | ||
| 200 | |||
| 201 | #define TESTSCFLAG_FALSE(uname) \ | ||
| 202 | TESTSETFLAG_FALSE(uname) TESTCLEARFLAG_FALSE(uname) | ||
| 203 | |||
| 196 | struct page; /* forward declaration */ | 204 | struct page; /* forward declaration */ |
| 197 | 205 | ||
| 198 | TESTPAGEFLAG(Locked, locked) | 206 | TESTPAGEFLAG(Locked, locked) |
| @@ -248,7 +256,6 @@ PAGEFLAG_FALSE(HighMem) | |||
| 248 | PAGEFLAG(SwapCache, swapcache) | 256 | PAGEFLAG(SwapCache, swapcache) |
| 249 | #else | 257 | #else |
| 250 | PAGEFLAG_FALSE(SwapCache) | 258 | PAGEFLAG_FALSE(SwapCache) |
| 251 | SETPAGEFLAG_NOOP(SwapCache) CLEARPAGEFLAG_NOOP(SwapCache) | ||
| 252 | #endif | 259 | #endif |
| 253 | 260 | ||
| 254 | PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable) | 261 | PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable) |
| @@ -258,8 +265,8 @@ PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable) | |||
| 258 | PAGEFLAG(Mlocked, mlocked) __CLEARPAGEFLAG(Mlocked, mlocked) | 265 | PAGEFLAG(Mlocked, mlocked) __CLEARPAGEFLAG(Mlocked, mlocked) |
| 259 | TESTSCFLAG(Mlocked, mlocked) __TESTCLEARFLAG(Mlocked, mlocked) | 266 | TESTSCFLAG(Mlocked, mlocked) __TESTCLEARFLAG(Mlocked, mlocked) |
| 260 | #else | 267 | #else |
| 261 | PAGEFLAG_FALSE(Mlocked) SETPAGEFLAG_NOOP(Mlocked) | 268 | PAGEFLAG_FALSE(Mlocked) __CLEARPAGEFLAG_NOOP(Mlocked) |
| 262 | TESTCLEARFLAG_FALSE(Mlocked) __TESTCLEARFLAG_FALSE(Mlocked) | 269 | TESTSCFLAG_FALSE(Mlocked) __TESTCLEARFLAG_FALSE(Mlocked) |
| 263 | #endif | 270 | #endif |
| 264 | 271 | ||
| 265 | #ifdef CONFIG_ARCH_USES_PG_UNCACHED | 272 | #ifdef CONFIG_ARCH_USES_PG_UNCACHED |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index 777a524716db..5c831f1eca79 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
| @@ -3,17 +3,15 @@ | |||
| 3 | 3 | ||
| 4 | enum { | 4 | enum { |
| 5 | /* flags for mem_cgroup */ | 5 | /* flags for mem_cgroup */ |
| 6 | PCG_LOCK, /* Lock for pc->mem_cgroup and following bits. */ | 6 | PCG_USED = 0x01, /* This page is charged to a memcg */ |
| 7 | PCG_USED, /* this object is in use. */ | 7 | PCG_MEM = 0x02, /* This page holds a memory charge */ |
| 8 | PCG_MIGRATION, /* under page migration */ | 8 | PCG_MEMSW = 0x04, /* This page holds a memory+swap charge */ |
| 9 | __NR_PCG_FLAGS, | ||
| 10 | }; | 9 | }; |
| 11 | 10 | ||
| 12 | #ifndef __GENERATING_BOUNDS_H | 11 | struct pglist_data; |
| 13 | #include <generated/bounds.h> | ||
| 14 | 12 | ||
| 15 | #ifdef CONFIG_MEMCG | 13 | #ifdef CONFIG_MEMCG |
| 16 | #include <linux/bit_spinlock.h> | 14 | struct mem_cgroup; |
| 17 | 15 | ||
| 18 | /* | 16 | /* |
| 19 | * Page Cgroup can be considered as an extended mem_map. | 17 | * Page Cgroup can be considered as an extended mem_map. |
| @@ -27,65 +25,30 @@ struct page_cgroup { | |||
| 27 | struct mem_cgroup *mem_cgroup; | 25 | struct mem_cgroup *mem_cgroup; |
| 28 | }; | 26 | }; |
| 29 | 27 | ||
| 30 | void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat); | 28 | extern void pgdat_page_cgroup_init(struct pglist_data *pgdat); |
| 31 | 29 | ||
| 32 | #ifdef CONFIG_SPARSEMEM | 30 | #ifdef CONFIG_SPARSEMEM |
| 33 | static inline void __init page_cgroup_init_flatmem(void) | 31 | static inline void page_cgroup_init_flatmem(void) |
| 34 | { | 32 | { |
| 35 | } | 33 | } |
| 36 | extern void __init page_cgroup_init(void); | 34 | extern void page_cgroup_init(void); |
| 37 | #else | 35 | #else |
| 38 | void __init page_cgroup_init_flatmem(void); | 36 | extern void page_cgroup_init_flatmem(void); |
| 39 | static inline void __init page_cgroup_init(void) | 37 | static inline void page_cgroup_init(void) |
| 40 | { | 38 | { |
| 41 | } | 39 | } |
| 42 | #endif | 40 | #endif |
| 43 | 41 | ||
| 44 | struct page_cgroup *lookup_page_cgroup(struct page *page); | 42 | struct page_cgroup *lookup_page_cgroup(struct page *page); |
| 45 | struct page *lookup_cgroup_page(struct page_cgroup *pc); | ||
| 46 | |||
| 47 | #define TESTPCGFLAG(uname, lname) \ | ||
| 48 | static inline int PageCgroup##uname(struct page_cgroup *pc) \ | ||
| 49 | { return test_bit(PCG_##lname, &pc->flags); } | ||
| 50 | |||
| 51 | #define SETPCGFLAG(uname, lname) \ | ||
| 52 | static inline void SetPageCgroup##uname(struct page_cgroup *pc)\ | ||
| 53 | { set_bit(PCG_##lname, &pc->flags); } | ||
| 54 | |||
| 55 | #define CLEARPCGFLAG(uname, lname) \ | ||
| 56 | static inline void ClearPageCgroup##uname(struct page_cgroup *pc) \ | ||
| 57 | { clear_bit(PCG_##lname, &pc->flags); } | ||
| 58 | |||
| 59 | #define TESTCLEARPCGFLAG(uname, lname) \ | ||
| 60 | static inline int TestClearPageCgroup##uname(struct page_cgroup *pc) \ | ||
| 61 | { return test_and_clear_bit(PCG_##lname, &pc->flags); } | ||
| 62 | |||
| 63 | TESTPCGFLAG(Used, USED) | ||
| 64 | CLEARPCGFLAG(Used, USED) | ||
| 65 | SETPCGFLAG(Used, USED) | ||
| 66 | |||
| 67 | SETPCGFLAG(Migration, MIGRATION) | ||
| 68 | CLEARPCGFLAG(Migration, MIGRATION) | ||
| 69 | TESTPCGFLAG(Migration, MIGRATION) | ||
| 70 | 43 | ||
| 71 | static inline void lock_page_cgroup(struct page_cgroup *pc) | 44 | static inline int PageCgroupUsed(struct page_cgroup *pc) |
| 72 | { | 45 | { |
| 73 | /* | 46 | return !!(pc->flags & PCG_USED); |
| 74 | * Don't take this lock in IRQ context. | ||
| 75 | * This lock is for pc->mem_cgroup, USED, MIGRATION | ||
| 76 | */ | ||
| 77 | bit_spin_lock(PCG_LOCK, &pc->flags); | ||
| 78 | } | 47 | } |
| 79 | 48 | #else /* !CONFIG_MEMCG */ | |
| 80 | static inline void unlock_page_cgroup(struct page_cgroup *pc) | ||
| 81 | { | ||
| 82 | bit_spin_unlock(PCG_LOCK, &pc->flags); | ||
| 83 | } | ||
| 84 | |||
| 85 | #else /* CONFIG_MEMCG */ | ||
| 86 | struct page_cgroup; | 49 | struct page_cgroup; |
| 87 | 50 | ||
| 88 | static inline void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat) | 51 | static inline void pgdat_page_cgroup_init(struct pglist_data *pgdat) |
| 89 | { | 52 | { |
| 90 | } | 53 | } |
| 91 | 54 | ||
| @@ -98,10 +61,9 @@ static inline void page_cgroup_init(void) | |||
| 98 | { | 61 | { |
| 99 | } | 62 | } |
| 100 | 63 | ||
| 101 | static inline void __init page_cgroup_init_flatmem(void) | 64 | static inline void page_cgroup_init_flatmem(void) |
| 102 | { | 65 | { |
| 103 | } | 66 | } |
| 104 | |||
| 105 | #endif /* CONFIG_MEMCG */ | 67 | #endif /* CONFIG_MEMCG */ |
| 106 | 68 | ||
| 107 | #include <linux/swap.h> | 69 | #include <linux/swap.h> |
| @@ -140,6 +102,4 @@ static inline void swap_cgroup_swapoff(int type) | |||
| 140 | 102 | ||
| 141 | #endif /* CONFIG_MEMCG_SWAP */ | 103 | #endif /* CONFIG_MEMCG_SWAP */ |
| 142 | 104 | ||
| 143 | #endif /* !__GENERATING_BOUNDS_H */ | ||
| 144 | |||
| 145 | #endif /* __LINUX_PAGE_CGROUP_H */ | 105 | #endif /* __LINUX_PAGE_CGROUP_H */ |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index e1474ae18c88..3df8c7db7a4e 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
| @@ -484,6 +484,9 @@ static inline int lock_page_killable(struct page *page) | |||
| 484 | /* | 484 | /* |
| 485 | * lock_page_or_retry - Lock the page, unless this would block and the | 485 | * lock_page_or_retry - Lock the page, unless this would block and the |
| 486 | * caller indicated that it can handle a retry. | 486 | * caller indicated that it can handle a retry. |
| 487 | * | ||
| 488 | * Return value and mmap_sem implications depend on flags; see | ||
| 489 | * __lock_page_or_retry(). | ||
| 487 | */ | 490 | */ |
| 488 | static inline int lock_page_or_retry(struct page *page, struct mm_struct *mm, | 491 | static inline int lock_page_or_retry(struct page *page, struct mm_struct *mm, |
| 489 | unsigned int flags) | 492 | unsigned int flags) |
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index 7246ef3d4455..1997ffc295a7 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h | |||
| @@ -33,6 +33,7 @@ struct pid_namespace { | |||
| 33 | #ifdef CONFIG_PROC_FS | 33 | #ifdef CONFIG_PROC_FS |
| 34 | struct vfsmount *proc_mnt; | 34 | struct vfsmount *proc_mnt; |
| 35 | struct dentry *proc_self; | 35 | struct dentry *proc_self; |
| 36 | struct dentry *proc_thread_self; | ||
| 36 | #endif | 37 | #endif |
| 37 | #ifdef CONFIG_BSD_PROCESS_ACCT | 38 | #ifdef CONFIG_BSD_PROCESS_ACCT |
| 38 | struct bsd_acct_struct *bacct; | 39 | struct bsd_acct_struct *bacct; |
diff --git a/include/linux/pinctrl/pinmux.h b/include/linux/pinctrl/pinmux.h index c15395031cb3..3097aafbeb24 100644 --- a/include/linux/pinctrl/pinmux.h +++ b/include/linux/pinctrl/pinmux.h | |||
| @@ -70,8 +70,6 @@ struct pinmux_ops { | |||
| 70 | unsigned * const num_groups); | 70 | unsigned * const num_groups); |
| 71 | int (*enable) (struct pinctrl_dev *pctldev, unsigned func_selector, | 71 | int (*enable) (struct pinctrl_dev *pctldev, unsigned func_selector, |
| 72 | unsigned group_selector); | 72 | unsigned group_selector); |
| 73 | void (*disable) (struct pinctrl_dev *pctldev, unsigned func_selector, | ||
| 74 | unsigned group_selector); | ||
| 75 | int (*gpio_request_enable) (struct pinctrl_dev *pctldev, | 73 | int (*gpio_request_enable) (struct pinctrl_dev *pctldev, |
| 76 | struct pinctrl_gpio_range *range, | 74 | struct pinctrl_gpio_range *range, |
| 77 | unsigned offset); | 75 | unsigned offset); |
diff --git a/include/linux/platform_data/camera-mx1.h b/include/linux/platform_data/camera-mx1.h deleted file mode 100644 index 4fd6c70314b4..000000000000 --- a/include/linux/platform_data/camera-mx1.h +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * mx1_camera.h - i.MX1/i.MXL camera driver header file | ||
| 3 | * | ||
| 4 | * Copyright (c) 2008, Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | ||
| 5 | * Copyright (C) 2009, Darius Augulis <augulis.darius@gmail.com> | ||
| 6 | * | ||
| 7 | * Based on PXA camera.h file: | ||
| 8 | * Copyright (C) 2003, Intel Corporation | ||
| 9 | * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de> | ||
| 10 | * | ||
| 11 | * This program is free software; you can redistribute it and/or modify | ||
| 12 | * it under the terms of the GNU General Public License version 2 as | ||
| 13 | * published by the Free Software Foundation. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #ifndef __ASM_ARCH_CAMERA_H_ | ||
| 17 | #define __ASM_ARCH_CAMERA_H_ | ||
| 18 | |||
| 19 | #define MX1_CAMERA_DATA_HIGH 1 | ||
| 20 | #define MX1_CAMERA_PCLK_RISING 2 | ||
| 21 | #define MX1_CAMERA_VSYNC_HIGH 4 | ||
| 22 | |||
| 23 | extern unsigned char mx1_camera_sof_fiq_start, mx1_camera_sof_fiq_end; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * struct mx1_camera_pdata - i.MX1/i.MXL camera platform data | ||
| 27 | * @mclk_10khz: master clock frequency in 10kHz units | ||
| 28 | * @flags: MX1 camera platform flags | ||
| 29 | */ | ||
| 30 | struct mx1_camera_pdata { | ||
| 31 | unsigned long mclk_10khz; | ||
| 32 | unsigned long flags; | ||
| 33 | }; | ||
| 34 | |||
| 35 | #endif /* __ASM_ARCH_CAMERA_H_ */ | ||
diff --git a/include/linux/platform_data/dma-imx.h b/include/linux/platform_data/dma-imx.h index d05542aafa3e..6a1357d31871 100644 --- a/include/linux/platform_data/dma-imx.h +++ b/include/linux/platform_data/dma-imx.h | |||
| @@ -40,6 +40,7 @@ enum sdma_peripheral_type { | |||
| 40 | IMX_DMATYPE_ASRC, /* ASRC */ | 40 | IMX_DMATYPE_ASRC, /* ASRC */ |
| 41 | IMX_DMATYPE_ESAI, /* ESAI */ | 41 | IMX_DMATYPE_ESAI, /* ESAI */ |
| 42 | IMX_DMATYPE_SSI_DUAL, /* SSI Dual FIFO */ | 42 | IMX_DMATYPE_SSI_DUAL, /* SSI Dual FIFO */ |
| 43 | IMX_DMATYPE_ASRC_SP, /* Shared ASRC */ | ||
| 43 | }; | 44 | }; |
| 44 | 45 | ||
| 45 | enum imx_dma_prio { | 46 | enum imx_dma_prio { |
diff --git a/include/linux/platform_data/edma.h b/include/linux/platform_data/edma.h index eb8d5627d080..bdb2710e2aab 100644 --- a/include/linux/platform_data/edma.h +++ b/include/linux/platform_data/edma.h | |||
| @@ -150,6 +150,8 @@ void edma_clear_event(unsigned channel); | |||
| 150 | void edma_pause(unsigned channel); | 150 | void edma_pause(unsigned channel); |
| 151 | void edma_resume(unsigned channel); | 151 | void edma_resume(unsigned channel); |
| 152 | 152 | ||
| 153 | void edma_assign_channel_eventq(unsigned channel, enum dma_event_q eventq_no); | ||
| 154 | |||
| 153 | struct edma_rsv_info { | 155 | struct edma_rsv_info { |
| 154 | 156 | ||
| 155 | const s16 (*rsv_chans)[2]; | 157 | const s16 (*rsv_chans)[2]; |
diff --git a/include/linux/platform_data/mmc-omap.h b/include/linux/platform_data/mmc-omap.h index 2bf1b30cb5dc..51e70cf25cbc 100644 --- a/include/linux/platform_data/mmc-omap.h +++ b/include/linux/platform_data/mmc-omap.h | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | */ | 28 | */ |
| 29 | #define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(0) | 29 | #define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(0) |
| 30 | #define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ BIT(1) | 30 | #define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ BIT(1) |
| 31 | #define OMAP_HSMMC_SWAKEUP_MISSING BIT(2) | ||
| 31 | 32 | ||
| 32 | struct mmc_card; | 33 | struct mmc_card; |
| 33 | 34 | ||
diff --git a/include/linux/platform_data/usb-ehci-mxc.h b/include/linux/platform_data/usb-ehci-mxc.h index 7eb9d1329671..157e71f79f99 100644 --- a/include/linux/platform_data/usb-ehci-mxc.h +++ b/include/linux/platform_data/usb-ehci-mxc.h | |||
| @@ -1,46 +1,6 @@ | |||
| 1 | #ifndef __INCLUDE_ASM_ARCH_MXC_EHCI_H | 1 | #ifndef __INCLUDE_ASM_ARCH_MXC_EHCI_H |
| 2 | #define __INCLUDE_ASM_ARCH_MXC_EHCI_H | 2 | #define __INCLUDE_ASM_ARCH_MXC_EHCI_H |
| 3 | 3 | ||
| 4 | /* values for portsc field */ | ||
| 5 | #define MXC_EHCI_PHY_LOW_POWER_SUSPEND (1 << 23) | ||
| 6 | #define MXC_EHCI_FORCE_FS (1 << 24) | ||
| 7 | #define MXC_EHCI_UTMI_8BIT (0 << 28) | ||
| 8 | #define MXC_EHCI_UTMI_16BIT (1 << 28) | ||
| 9 | #define MXC_EHCI_SERIAL (1 << 29) | ||
| 10 | #define MXC_EHCI_MODE_UTMI (0 << 30) | ||
| 11 | #define MXC_EHCI_MODE_PHILIPS (1 << 30) | ||
| 12 | #define MXC_EHCI_MODE_ULPI (2 << 30) | ||
| 13 | #define MXC_EHCI_MODE_SERIAL (3 << 30) | ||
| 14 | |||
| 15 | /* values for flags field */ | ||
| 16 | #define MXC_EHCI_INTERFACE_DIFF_UNI (0 << 0) | ||
| 17 | #define MXC_EHCI_INTERFACE_DIFF_BI (1 << 0) | ||
| 18 | #define MXC_EHCI_INTERFACE_SINGLE_UNI (2 << 0) | ||
| 19 | #define MXC_EHCI_INTERFACE_SINGLE_BI (3 << 0) | ||
| 20 | #define MXC_EHCI_INTERFACE_MASK (0xf) | ||
| 21 | |||
| 22 | #define MXC_EHCI_POWER_PINS_ENABLED (1 << 5) | ||
| 23 | #define MXC_EHCI_PWR_PIN_ACTIVE_HIGH (1 << 6) | ||
| 24 | #define MXC_EHCI_OC_PIN_ACTIVE_LOW (1 << 7) | ||
| 25 | #define MXC_EHCI_TTL_ENABLED (1 << 8) | ||
| 26 | |||
| 27 | #define MXC_EHCI_INTERNAL_PHY (1 << 9) | ||
| 28 | #define MXC_EHCI_IPPUE_DOWN (1 << 10) | ||
| 29 | #define MXC_EHCI_IPPUE_UP (1 << 11) | ||
| 30 | #define MXC_EHCI_WAKEUP_ENABLED (1 << 12) | ||
| 31 | #define MXC_EHCI_ITC_NO_THRESHOLD (1 << 13) | ||
| 32 | |||
| 33 | #define MXC_USBCTRL_OFFSET 0 | ||
| 34 | #define MXC_USB_PHY_CTR_FUNC_OFFSET 0x8 | ||
| 35 | #define MXC_USB_PHY_CTR_FUNC2_OFFSET 0xc | ||
| 36 | #define MXC_USBH2CTRL_OFFSET 0x14 | ||
| 37 | |||
| 38 | #define MX5_USBOTHER_REGS_OFFSET 0x800 | ||
| 39 | |||
| 40 | /* USB_PHY_CTRL_FUNC2*/ | ||
| 41 | #define MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK 0x3 | ||
| 42 | #define MX5_USB_UTMI_PHYCTRL1_PLLDIV_SHIFT 0 | ||
| 43 | |||
| 44 | struct mxc_usbh_platform_data { | 4 | struct mxc_usbh_platform_data { |
| 45 | int (*init)(struct platform_device *pdev); | 5 | int (*init)(struct platform_device *pdev); |
| 46 | int (*exit)(struct platform_device *pdev); | 6 | int (*exit)(struct platform_device *pdev); |
| @@ -49,11 +9,5 @@ struct mxc_usbh_platform_data { | |||
| 49 | struct usb_phy *otg; | 9 | struct usb_phy *otg; |
| 50 | }; | 10 | }; |
| 51 | 11 | ||
| 52 | int mx51_initialize_usb_hw(int port, unsigned int flags); | ||
| 53 | int mx25_initialize_usb_hw(int port, unsigned int flags); | ||
| 54 | int mx31_initialize_usb_hw(int port, unsigned int flags); | ||
| 55 | int mx35_initialize_usb_hw(int port, unsigned int flags); | ||
| 56 | int mx27_initialize_usb_hw(int port, unsigned int flags); | ||
| 57 | |||
| 58 | #endif /* __INCLUDE_ASM_ARCH_MXC_EHCI_H */ | 12 | #endif /* __INCLUDE_ASM_ARCH_MXC_EHCI_H */ |
| 59 | 13 | ||
diff --git a/include/linux/platform_data/usb-imx_udc.h b/include/linux/platform_data/usb-imx_udc.h deleted file mode 100644 index be273371f34a..000000000000 --- a/include/linux/platform_data/usb-imx_udc.h +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2008 Darius Augulis <augulis.darius@gmail.com> | ||
| 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 as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef __ASM_ARCH_MXC_USB | ||
| 16 | #define __ASM_ARCH_MXC_USB | ||
| 17 | |||
| 18 | struct imxusb_platform_data { | ||
| 19 | int (*init)(struct device *); | ||
| 20 | void (*exit)(struct device *); | ||
| 21 | }; | ||
| 22 | |||
| 23 | #endif /* __ASM_ARCH_MXC_USB */ | ||
diff --git a/include/linux/platform_data/video-clcd-versatile.h b/include/linux/platform_data/video-clcd-versatile.h new file mode 100644 index 000000000000..09ccf182af4d --- /dev/null +++ b/include/linux/platform_data/video-clcd-versatile.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | #ifndef PLAT_CLCD_H | ||
| 2 | #define PLAT_CLCD_H | ||
| 3 | |||
| 4 | #ifdef CONFIG_PLAT_VERSATILE_CLCD | ||
| 5 | struct clcd_panel *versatile_clcd_get_panel(const char *); | ||
| 6 | int versatile_clcd_setup_dma(struct clcd_fb *, unsigned long); | ||
| 7 | int versatile_clcd_mmap_dma(struct clcd_fb *, struct vm_area_struct *); | ||
| 8 | void versatile_clcd_remove_dma(struct clcd_fb *); | ||
| 9 | #else | ||
| 10 | static inline struct clcd_panel *versatile_clcd_get_panel(const char *s) | ||
| 11 | { | ||
| 12 | return NULL; | ||
| 13 | } | ||
| 14 | static inline int versatile_clcd_setup_dma(struct clcd_fb *fb, unsigned long framesize) | ||
| 15 | { | ||
| 16 | return -ENODEV; | ||
| 17 | } | ||
| 18 | static inline int versatile_clcd_mmap_dma(struct clcd_fb *fb, struct vm_area_struct *vm) | ||
| 19 | { | ||
| 20 | return -ENODEV; | ||
| 21 | } | ||
| 22 | static inline void versatile_clcd_remove_dma(struct clcd_fb *fb) | ||
| 23 | { | ||
| 24 | } | ||
| 25 | #endif | ||
| 26 | |||
| 27 | #endif | ||
diff --git a/include/linux/printk.h b/include/linux/printk.h index 319ff7e53efb..d78125f73ac4 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
| @@ -10,6 +10,9 @@ | |||
| 10 | extern const char linux_banner[]; | 10 | extern const char linux_banner[]; |
| 11 | extern const char linux_proc_banner[]; | 11 | extern const char linux_proc_banner[]; |
| 12 | 12 | ||
| 13 | extern char *log_buf_addr_get(void); | ||
| 14 | extern u32 log_buf_len_get(void); | ||
| 15 | |||
| 13 | static inline int printk_get_level(const char *buffer) | 16 | static inline int printk_get_level(const char *buffer) |
| 14 | { | 17 | { |
| 15 | if (buffer[0] == KERN_SOH_ASCII && buffer[1]) { | 18 | if (buffer[0] == KERN_SOH_ASCII && buffer[1]) { |
| @@ -31,7 +34,7 @@ static inline const char *printk_skip_level(const char *buffer) | |||
| 31 | } | 34 | } |
| 32 | 35 | ||
| 33 | /* printk's without a loglevel use this.. */ | 36 | /* printk's without a loglevel use this.. */ |
| 34 | #define DEFAULT_MESSAGE_LOGLEVEL CONFIG_DEFAULT_MESSAGE_LOGLEVEL | 37 | #define MESSAGE_LOGLEVEL_DEFAULT CONFIG_MESSAGE_LOGLEVEL_DEFAULT |
| 35 | 38 | ||
| 36 | /* We show everything that is MORE important than this.. */ | 39 | /* We show everything that is MORE important than this.. */ |
| 37 | #define CONSOLE_LOGLEVEL_SILENT 0 /* Mum's the word */ | 40 | #define CONSOLE_LOGLEVEL_SILENT 0 /* Mum's the word */ |
diff --git a/include/linux/quota.h b/include/linux/quota.h index 0f3c5d38da1f..80d345a3524c 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
| @@ -390,7 +390,6 @@ struct quota_info { | |||
| 390 | unsigned int flags; /* Flags for diskquotas on this device */ | 390 | unsigned int flags; /* Flags for diskquotas on this device */ |
| 391 | struct mutex dqio_mutex; /* lock device while I/O in progress */ | 391 | struct mutex dqio_mutex; /* lock device while I/O in progress */ |
| 392 | struct mutex dqonoff_mutex; /* Serialize quotaon & quotaoff */ | 392 | struct mutex dqonoff_mutex; /* Serialize quotaon & quotaoff */ |
| 393 | struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */ | ||
| 394 | struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ | 393 | struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ |
| 395 | struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ | 394 | struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ |
| 396 | const struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ | 395 | const struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ |
diff --git a/include/linux/rculist.h b/include/linux/rculist.h index 8183b46fbaa2..372ad5e0dcb8 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h | |||
| @@ -432,9 +432,9 @@ static inline void hlist_add_before_rcu(struct hlist_node *n, | |||
| 432 | } | 432 | } |
| 433 | 433 | ||
| 434 | /** | 434 | /** |
| 435 | * hlist_add_after_rcu | 435 | * hlist_add_behind_rcu |
| 436 | * @prev: the existing element to add the new element after. | ||
| 437 | * @n: the new element to add to the hash list. | 436 | * @n: the new element to add to the hash list. |
| 437 | * @prev: the existing element to add the new element after. | ||
| 438 | * | 438 | * |
| 439 | * Description: | 439 | * Description: |
| 440 | * Adds the specified element to the specified hlist | 440 | * Adds the specified element to the specified hlist |
| @@ -449,8 +449,8 @@ static inline void hlist_add_before_rcu(struct hlist_node *n, | |||
| 449 | * hlist_for_each_entry_rcu(), used to prevent memory-consistency | 449 | * hlist_for_each_entry_rcu(), used to prevent memory-consistency |
| 450 | * problems on Alpha CPUs. | 450 | * problems on Alpha CPUs. |
| 451 | */ | 451 | */ |
| 452 | static inline void hlist_add_after_rcu(struct hlist_node *prev, | 452 | static inline void hlist_add_behind_rcu(struct hlist_node *n, |
| 453 | struct hlist_node *n) | 453 | struct hlist_node *prev) |
| 454 | { | 454 | { |
| 455 | n->next = prev->next; | 455 | n->next = prev->next; |
| 456 | n->pprev = &prev->next; | 456 | n->pprev = &prev->next; |
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h index 9cda293c867d..36826c0166c5 100644 --- a/include/linux/rhashtable.h +++ b/include/linux/rhashtable.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #include <linux/rculist.h> | 21 | #include <linux/rculist.h> |
| 22 | 22 | ||
| 23 | struct rhash_head { | 23 | struct rhash_head { |
| 24 | struct rhash_head *next; | 24 | struct rhash_head __rcu *next; |
| 25 | }; | 25 | }; |
| 26 | 26 | ||
| 27 | #define INIT_HASH_HEAD(ptr) ((ptr)->next = NULL) | 27 | #define INIT_HASH_HEAD(ptr) ((ptr)->next = NULL) |
| @@ -97,7 +97,7 @@ u32 rhashtable_obj_hashfn(const struct rhashtable *ht, void *ptr); | |||
| 97 | void rhashtable_insert(struct rhashtable *ht, struct rhash_head *node, gfp_t); | 97 | void rhashtable_insert(struct rhashtable *ht, struct rhash_head *node, gfp_t); |
| 98 | bool rhashtable_remove(struct rhashtable *ht, struct rhash_head *node, gfp_t); | 98 | bool rhashtable_remove(struct rhashtable *ht, struct rhash_head *node, gfp_t); |
| 99 | void rhashtable_remove_pprev(struct rhashtable *ht, struct rhash_head *obj, | 99 | void rhashtable_remove_pprev(struct rhashtable *ht, struct rhash_head *obj, |
| 100 | struct rhash_head **pprev, gfp_t flags); | 100 | struct rhash_head __rcu **pprev, gfp_t flags); |
| 101 | 101 | ||
| 102 | bool rht_grow_above_75(const struct rhashtable *ht, size_t new_size); | 102 | bool rht_grow_above_75(const struct rhashtable *ht, size_t new_size); |
| 103 | bool rht_shrink_below_30(const struct rhashtable *ht, size_t new_size); | 103 | bool rht_shrink_below_30(const struct rhashtable *ht, size_t new_size); |
| @@ -117,18 +117,12 @@ void rhashtable_destroy(const struct rhashtable *ht); | |||
| 117 | #define rht_dereference_rcu(p, ht) \ | 117 | #define rht_dereference_rcu(p, ht) \ |
| 118 | rcu_dereference_check(p, lockdep_rht_mutex_is_held(ht)) | 118 | rcu_dereference_check(p, lockdep_rht_mutex_is_held(ht)) |
| 119 | 119 | ||
| 120 | /* Internal, use rht_obj() instead */ | ||
| 121 | #define rht_entry(ptr, type, member) container_of(ptr, type, member) | 120 | #define rht_entry(ptr, type, member) container_of(ptr, type, member) |
| 122 | #define rht_entry_safe(ptr, type, member) \ | 121 | #define rht_entry_safe(ptr, type, member) \ |
| 123 | ({ \ | 122 | ({ \ |
| 124 | typeof(ptr) __ptr = (ptr); \ | 123 | typeof(ptr) __ptr = (ptr); \ |
| 125 | __ptr ? rht_entry(__ptr, type, member) : NULL; \ | 124 | __ptr ? rht_entry(__ptr, type, member) : NULL; \ |
| 126 | }) | 125 | }) |
| 127 | #define rht_entry_safe_rcu(ptr, type, member) \ | ||
| 128 | ({ \ | ||
| 129 | typeof(*ptr) __rcu *__ptr = (typeof(*ptr) __rcu __force *)ptr; \ | ||
| 130 | __ptr ? container_of((typeof(ptr))rcu_dereference_raw(__ptr), type, member) : NULL; \ | ||
| 131 | }) | ||
| 132 | 126 | ||
| 133 | #define rht_next_entry_safe(pos, ht, member) \ | 127 | #define rht_next_entry_safe(pos, ht, member) \ |
| 134 | ({ \ | 128 | ({ \ |
| @@ -205,9 +199,10 @@ void rhashtable_destroy(const struct rhashtable *ht); | |||
| 205 | * traversal is guarded by rcu_read_lock(). | 199 | * traversal is guarded by rcu_read_lock(). |
| 206 | */ | 200 | */ |
| 207 | #define rht_for_each_entry_rcu(pos, head, member) \ | 201 | #define rht_for_each_entry_rcu(pos, head, member) \ |
| 208 | for (pos = rht_entry_safe_rcu(head, typeof(*(pos)), member); \ | 202 | for (pos = rht_entry_safe(rcu_dereference_raw(head), \ |
| 203 | typeof(*(pos)), member); \ | ||
| 209 | pos; \ | 204 | pos; \ |
| 210 | pos = rht_entry_safe_rcu((pos)->member.next, \ | 205 | pos = rht_entry_safe(rcu_dereference_raw((pos)->member.next), \ |
| 211 | typeof(*(pos)), member)) | 206 | typeof(*(pos)), member)) |
| 212 | 207 | ||
| 213 | #endif /* _LINUX_RHASHTABLE_H */ | 208 | #endif /* _LINUX_RHASHTABLE_H */ |
diff --git a/include/linux/rio_drv.h b/include/linux/rio_drv.h index 5059994fe297..9fc2f213e74f 100644 --- a/include/linux/rio_drv.h +++ b/include/linux/rio_drv.h | |||
| @@ -384,11 +384,16 @@ void rio_dev_put(struct rio_dev *); | |||
| 384 | 384 | ||
| 385 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE | 385 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE |
| 386 | extern struct dma_chan *rio_request_dma(struct rio_dev *rdev); | 386 | extern struct dma_chan *rio_request_dma(struct rio_dev *rdev); |
| 387 | extern struct dma_chan *rio_request_mport_dma(struct rio_mport *mport); | ||
| 387 | extern void rio_release_dma(struct dma_chan *dchan); | 388 | extern void rio_release_dma(struct dma_chan *dchan); |
| 388 | extern struct dma_async_tx_descriptor *rio_dma_prep_slave_sg( | 389 | extern struct dma_async_tx_descriptor *rio_dma_prep_slave_sg( |
| 389 | struct rio_dev *rdev, struct dma_chan *dchan, | 390 | struct rio_dev *rdev, struct dma_chan *dchan, |
| 390 | struct rio_dma_data *data, | 391 | struct rio_dma_data *data, |
| 391 | enum dma_transfer_direction direction, unsigned long flags); | 392 | enum dma_transfer_direction direction, unsigned long flags); |
| 393 | extern struct dma_async_tx_descriptor *rio_dma_prep_xfer( | ||
| 394 | struct dma_chan *dchan, u16 destid, | ||
| 395 | struct rio_dma_data *data, | ||
| 396 | enum dma_transfer_direction direction, unsigned long flags); | ||
| 392 | #endif | 397 | #endif |
| 393 | 398 | ||
| 394 | /** | 399 | /** |
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index f4ec8bbcb372..ed8f9e70df9b 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h | |||
| @@ -136,7 +136,7 @@ static inline void sg_set_buf(struct scatterlist *sg, const void *buf, | |||
| 136 | static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, | 136 | static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, |
| 137 | struct scatterlist *sgl) | 137 | struct scatterlist *sgl) |
| 138 | { | 138 | { |
| 139 | #ifndef ARCH_HAS_SG_CHAIN | 139 | #ifndef CONFIG_ARCH_HAS_SG_CHAIN |
| 140 | BUG(); | 140 | BUG(); |
| 141 | #endif | 141 | #endif |
| 142 | 142 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 7c19d552dc3f..5c2c885ee52b 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -33,6 +33,7 @@ struct sched_param { | |||
| 33 | 33 | ||
| 34 | #include <linux/smp.h> | 34 | #include <linux/smp.h> |
| 35 | #include <linux/sem.h> | 35 | #include <linux/sem.h> |
| 36 | #include <linux/shm.h> | ||
| 36 | #include <linux/signal.h> | 37 | #include <linux/signal.h> |
| 37 | #include <linux/compiler.h> | 38 | #include <linux/compiler.h> |
| 38 | #include <linux/completion.h> | 39 | #include <linux/completion.h> |
| @@ -168,8 +169,7 @@ extern int nr_processes(void); | |||
| 168 | extern unsigned long nr_running(void); | 169 | extern unsigned long nr_running(void); |
| 169 | extern unsigned long nr_iowait(void); | 170 | extern unsigned long nr_iowait(void); |
| 170 | extern unsigned long nr_iowait_cpu(int cpu); | 171 | extern unsigned long nr_iowait_cpu(int cpu); |
| 171 | extern unsigned long this_cpu_load(void); | 172 | extern void get_iowait_load(unsigned long *nr_waiters, unsigned long *load); |
| 172 | |||
| 173 | 173 | ||
| 174 | extern void calc_global_load(unsigned long ticks); | 174 | extern void calc_global_load(unsigned long ticks); |
| 175 | extern void update_cpu_load_nohz(void); | 175 | extern void update_cpu_load_nohz(void); |
| @@ -1385,6 +1385,7 @@ struct task_struct { | |||
| 1385 | #ifdef CONFIG_SYSVIPC | 1385 | #ifdef CONFIG_SYSVIPC |
| 1386 | /* ipc stuff */ | 1386 | /* ipc stuff */ |
| 1387 | struct sysv_sem sysvsem; | 1387 | struct sysv_sem sysvsem; |
| 1388 | struct sysv_shm sysvshm; | ||
| 1388 | #endif | 1389 | #endif |
| 1389 | #ifdef CONFIG_DETECT_HUNG_TASK | 1390 | #ifdef CONFIG_DETECT_HUNG_TASK |
| 1390 | /* hung task detection */ | 1391 | /* hung task detection */ |
| @@ -1628,12 +1629,6 @@ struct task_struct { | |||
| 1628 | unsigned long trace_recursion; | 1629 | unsigned long trace_recursion; |
| 1629 | #endif /* CONFIG_TRACING */ | 1630 | #endif /* CONFIG_TRACING */ |
| 1630 | #ifdef CONFIG_MEMCG /* memcg uses this to do batch job */ | 1631 | #ifdef CONFIG_MEMCG /* memcg uses this to do batch job */ |
| 1631 | struct memcg_batch_info { | ||
| 1632 | int do_batch; /* incremented when batch uncharge started */ | ||
| 1633 | struct mem_cgroup *memcg; /* target memcg of uncharge */ | ||
| 1634 | unsigned long nr_pages; /* uncharged usage */ | ||
| 1635 | unsigned long memsw_nr_pages; /* uncharged mem+swap usage */ | ||
| 1636 | } memcg_batch; | ||
| 1637 | unsigned int memcg_kmem_skip_account; | 1632 | unsigned int memcg_kmem_skip_account; |
| 1638 | struct memcg_oom_info { | 1633 | struct memcg_oom_info { |
| 1639 | struct mem_cgroup *memcg; | 1634 | struct mem_cgroup *memcg; |
| @@ -2364,8 +2359,10 @@ static inline int on_sig_stack(unsigned long sp) | |||
| 2364 | 2359 | ||
| 2365 | static inline int sas_ss_flags(unsigned long sp) | 2360 | static inline int sas_ss_flags(unsigned long sp) |
| 2366 | { | 2361 | { |
| 2367 | return (current->sas_ss_size == 0 ? SS_DISABLE | 2362 | if (!current->sas_ss_size) |
| 2368 | : on_sig_stack(sp) ? SS_ONSTACK : 0); | 2363 | return SS_DISABLE; |
| 2364 | |||
| 2365 | return on_sig_stack(sp) ? SS_ONSTACK : 0; | ||
| 2369 | } | 2366 | } |
| 2370 | 2367 | ||
| 2371 | static inline unsigned long sigsp(unsigned long sp, struct ksignal *ksig) | 2368 | static inline unsigned long sigsp(unsigned long sp, struct ksignal *ksig) |
| @@ -2967,15 +2964,10 @@ static inline void inc_syscw(struct task_struct *tsk) | |||
| 2967 | 2964 | ||
| 2968 | #ifdef CONFIG_MEMCG | 2965 | #ifdef CONFIG_MEMCG |
| 2969 | extern void mm_update_next_owner(struct mm_struct *mm); | 2966 | extern void mm_update_next_owner(struct mm_struct *mm); |
| 2970 | extern void mm_init_owner(struct mm_struct *mm, struct task_struct *p); | ||
| 2971 | #else | 2967 | #else |
| 2972 | static inline void mm_update_next_owner(struct mm_struct *mm) | 2968 | static inline void mm_update_next_owner(struct mm_struct *mm) |
| 2973 | { | 2969 | { |
| 2974 | } | 2970 | } |
| 2975 | |||
| 2976 | static inline void mm_init_owner(struct mm_struct *mm, struct task_struct *p) | ||
| 2977 | { | ||
| 2978 | } | ||
| 2979 | #endif /* CONFIG_MEMCG */ | 2971 | #endif /* CONFIG_MEMCG */ |
| 2980 | 2972 | ||
| 2981 | static inline unsigned long task_rlimit(const struct task_struct *tsk, | 2973 | static inline unsigned long task_rlimit(const struct task_struct *tsk, |
diff --git a/include/linux/sh_dma.h b/include/linux/sh_dma.h index b7b43b82231e..56b97eed28a4 100644 --- a/include/linux/sh_dma.h +++ b/include/linux/sh_dma.h | |||
| @@ -95,19 +95,21 @@ struct sh_dmae_pdata { | |||
| 95 | }; | 95 | }; |
| 96 | 96 | ||
| 97 | /* DMAOR definitions */ | 97 | /* DMAOR definitions */ |
| 98 | #define DMAOR_AE 0x00000004 | 98 | #define DMAOR_AE 0x00000004 /* Address Error Flag */ |
| 99 | #define DMAOR_NMIF 0x00000002 | 99 | #define DMAOR_NMIF 0x00000002 |
| 100 | #define DMAOR_DME 0x00000001 | 100 | #define DMAOR_DME 0x00000001 /* DMA Master Enable */ |
| 101 | 101 | ||
| 102 | /* Definitions for the SuperH DMAC */ | 102 | /* Definitions for the SuperH DMAC */ |
| 103 | #define DM_INC 0x00004000 | 103 | #define DM_INC 0x00004000 /* Destination addresses are incremented */ |
| 104 | #define DM_DEC 0x00008000 | 104 | #define DM_DEC 0x00008000 /* Destination addresses are decremented */ |
| 105 | #define DM_FIX 0x0000c000 | 105 | #define DM_FIX 0x0000c000 /* Destination address is fixed */ |
| 106 | #define SM_INC 0x00001000 | 106 | #define SM_INC 0x00001000 /* Source addresses are incremented */ |
| 107 | #define SM_DEC 0x00002000 | 107 | #define SM_DEC 0x00002000 /* Source addresses are decremented */ |
| 108 | #define SM_FIX 0x00003000 | 108 | #define SM_FIX 0x00003000 /* Source address is fixed */ |
| 109 | #define CHCR_DE 0x00000001 | 109 | #define RS_AUTO 0x00000400 /* Auto Request */ |
| 110 | #define CHCR_TE 0x00000002 | 110 | #define RS_ERS 0x00000800 /* DMA extended resource selector */ |
| 111 | #define CHCR_IE 0x00000004 | 111 | #define CHCR_DE 0x00000001 /* DMA Enable */ |
| 112 | #define CHCR_TE 0x00000002 /* Transfer End Flag */ | ||
| 113 | #define CHCR_IE 0x00000004 /* Interrupt Enable */ | ||
| 112 | 114 | ||
| 113 | #endif | 115 | #endif |
diff --git a/include/linux/shm.h b/include/linux/shm.h index 57d77709fbe2..6fb801686ad6 100644 --- a/include/linux/shm.h +++ b/include/linux/shm.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef _LINUX_SHM_H_ | 1 | #ifndef _LINUX_SHM_H_ |
| 2 | #define _LINUX_SHM_H_ | 2 | #define _LINUX_SHM_H_ |
| 3 | 3 | ||
| 4 | #include <linux/list.h> | ||
| 4 | #include <asm/page.h> | 5 | #include <asm/page.h> |
| 5 | #include <uapi/linux/shm.h> | 6 | #include <uapi/linux/shm.h> |
| 6 | #include <asm/shmparam.h> | 7 | #include <asm/shmparam.h> |
| @@ -20,6 +21,7 @@ struct shmid_kernel /* private to the kernel */ | |||
| 20 | 21 | ||
| 21 | /* The task created the shm object. NULL if the task is dead. */ | 22 | /* The task created the shm object. NULL if the task is dead. */ |
| 22 | struct task_struct *shm_creator; | 23 | struct task_struct *shm_creator; |
| 24 | struct list_head shm_clist; /* list by creator */ | ||
| 23 | }; | 25 | }; |
| 24 | 26 | ||
| 25 | /* shm_mode upper byte flags */ | 27 | /* shm_mode upper byte flags */ |
| @@ -44,11 +46,20 @@ struct shmid_kernel /* private to the kernel */ | |||
| 44 | #define SHM_HUGE_1GB (30 << SHM_HUGE_SHIFT) | 46 | #define SHM_HUGE_1GB (30 << SHM_HUGE_SHIFT) |
| 45 | 47 | ||
| 46 | #ifdef CONFIG_SYSVIPC | 48 | #ifdef CONFIG_SYSVIPC |
| 49 | struct sysv_shm { | ||
| 50 | struct list_head shm_clist; | ||
| 51 | }; | ||
| 52 | |||
| 47 | long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr, | 53 | long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr, |
| 48 | unsigned long shmlba); | 54 | unsigned long shmlba); |
| 49 | extern int is_file_shm_hugepages(struct file *file); | 55 | int is_file_shm_hugepages(struct file *file); |
| 50 | extern void exit_shm(struct task_struct *task); | 56 | void exit_shm(struct task_struct *task); |
| 57 | #define shm_init_task(task) INIT_LIST_HEAD(&(task)->sysvshm.shm_clist) | ||
| 51 | #else | 58 | #else |
| 59 | struct sysv_shm { | ||
| 60 | /* empty */ | ||
| 61 | }; | ||
| 62 | |||
| 52 | static inline long do_shmat(int shmid, char __user *shmaddr, | 63 | static inline long do_shmat(int shmid, char __user *shmaddr, |
| 53 | int shmflg, unsigned long *addr, | 64 | int shmflg, unsigned long *addr, |
| 54 | unsigned long shmlba) | 65 | unsigned long shmlba) |
| @@ -62,6 +73,9 @@ static inline int is_file_shm_hugepages(struct file *file) | |||
| 62 | static inline void exit_shm(struct task_struct *task) | 73 | static inline void exit_shm(struct task_struct *task) |
| 63 | { | 74 | { |
| 64 | } | 75 | } |
| 76 | static inline void shm_init_task(struct task_struct *task) | ||
| 77 | { | ||
| 78 | } | ||
| 65 | #endif | 79 | #endif |
| 66 | 80 | ||
| 67 | #endif /* _LINUX_SHM_H_ */ | 81 | #endif /* _LINUX_SHM_H_ */ |
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index 4d1771c2d29f..50777b5b1e4c 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef __SHMEM_FS_H | 1 | #ifndef __SHMEM_FS_H |
| 2 | #define __SHMEM_FS_H | 2 | #define __SHMEM_FS_H |
| 3 | 3 | ||
| 4 | #include <linux/file.h> | ||
| 4 | #include <linux/swap.h> | 5 | #include <linux/swap.h> |
| 5 | #include <linux/mempolicy.h> | 6 | #include <linux/mempolicy.h> |
| 6 | #include <linux/pagemap.h> | 7 | #include <linux/pagemap.h> |
| @@ -11,6 +12,7 @@ | |||
| 11 | 12 | ||
| 12 | struct shmem_inode_info { | 13 | struct shmem_inode_info { |
| 13 | spinlock_t lock; | 14 | spinlock_t lock; |
| 15 | unsigned int seals; /* shmem seals */ | ||
| 14 | unsigned long flags; | 16 | unsigned long flags; |
| 15 | unsigned long alloced; /* data pages alloced to file */ | 17 | unsigned long alloced; /* data pages alloced to file */ |
| 16 | union { | 18 | union { |
| @@ -65,4 +67,19 @@ static inline struct page *shmem_read_mapping_page( | |||
| 65 | mapping_gfp_mask(mapping)); | 67 | mapping_gfp_mask(mapping)); |
| 66 | } | 68 | } |
| 67 | 69 | ||
| 70 | #ifdef CONFIG_TMPFS | ||
| 71 | |||
| 72 | extern int shmem_add_seals(struct file *file, unsigned int seals); | ||
| 73 | extern int shmem_get_seals(struct file *file); | ||
| 74 | extern long shmem_fcntl(struct file *file, unsigned int cmd, unsigned long arg); | ||
| 75 | |||
| 76 | #else | ||
| 77 | |||
| 78 | static inline long shmem_fcntl(struct file *f, unsigned int c, unsigned long a) | ||
| 79 | { | ||
| 80 | return -EINVAL; | ||
| 81 | } | ||
| 82 | |||
| 83 | #endif | ||
| 84 | |||
| 68 | #endif | 85 | #endif |
diff --git a/include/linux/signal.h b/include/linux/signal.h index c9e65360c49a..750196fcc0a5 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
| @@ -280,9 +280,8 @@ struct ksignal { | |||
| 280 | int sig; | 280 | int sig; |
| 281 | }; | 281 | }; |
| 282 | 282 | ||
| 283 | extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); | 283 | extern int get_signal(struct ksignal *ksig); |
| 284 | extern void signal_setup_done(int failed, struct ksignal *ksig, int stepping); | 284 | extern void signal_setup_done(int failed, struct ksignal *ksig, int stepping); |
| 285 | extern void signal_delivered(int sig, siginfo_t *info, struct k_sigaction *ka, struct pt_regs *regs, int stepping); | ||
| 286 | extern void exit_signals(struct task_struct *tsk); | 285 | extern void exit_signals(struct task_struct *tsk); |
| 287 | extern void kernel_sigaction(int, __sighandler_t); | 286 | extern void kernel_sigaction(int, __sighandler_t); |
| 288 | 287 | ||
| @@ -301,18 +300,6 @@ static inline void disallow_signal(int sig) | |||
| 301 | kernel_sigaction(sig, SIG_IGN); | 300 | kernel_sigaction(sig, SIG_IGN); |
| 302 | } | 301 | } |
| 303 | 302 | ||
| 304 | /* | ||
| 305 | * Eventually that'll replace get_signal_to_deliver(); macro for now, | ||
| 306 | * to avoid nastiness with include order. | ||
| 307 | */ | ||
| 308 | #define get_signal(ksig) \ | ||
| 309 | ({ \ | ||
| 310 | struct ksignal *p = (ksig); \ | ||
| 311 | p->sig = get_signal_to_deliver(&p->info, &p->ka, \ | ||
| 312 | signal_pt_regs(), NULL);\ | ||
| 313 | p->sig > 0; \ | ||
| 314 | }) | ||
| 315 | |||
| 316 | extern struct kmem_cache *sighand_cachep; | 303 | extern struct kmem_cache *sighand_cachep; |
| 317 | 304 | ||
| 318 | int unhandled_signal(struct task_struct *tsk, int sig); | 305 | int unhandled_signal(struct task_struct *tsk, int sig); |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 11c270551d25..abde271c18ae 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -2555,6 +2555,7 @@ int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen); | |||
| 2555 | void skb_scrub_packet(struct sk_buff *skb, bool xnet); | 2555 | void skb_scrub_packet(struct sk_buff *skb, bool xnet); |
| 2556 | unsigned int skb_gso_transport_seglen(const struct sk_buff *skb); | 2556 | unsigned int skb_gso_transport_seglen(const struct sk_buff *skb); |
| 2557 | struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features); | 2557 | struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features); |
| 2558 | struct sk_buff *skb_vlan_untag(struct sk_buff *skb); | ||
| 2558 | 2559 | ||
| 2559 | struct skb_checksum_ops { | 2560 | struct skb_checksum_ops { |
| 2560 | __wsum (*update)(const void *mem, int len, __wsum wsum); | 2561 | __wsum (*update)(const void *mem, int len, __wsum wsum); |
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 790be1472792..8e030075fe79 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
| @@ -103,6 +103,7 @@ struct rpc_auth_create_args { | |||
| 103 | 103 | ||
| 104 | /* Flags for rpcauth_lookupcred() */ | 104 | /* Flags for rpcauth_lookupcred() */ |
| 105 | #define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */ | 105 | #define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */ |
| 106 | #define RPCAUTH_LOOKUP_RCU 0x02 /* lock-less lookup */ | ||
| 106 | 107 | ||
| 107 | /* | 108 | /* |
| 108 | * Client authentication ops | 109 | * Client authentication ops |
| @@ -140,6 +141,7 @@ struct rpc_credops { | |||
| 140 | void *, __be32 *, void *); | 141 | void *, __be32 *, void *); |
| 141 | int (*crkey_timeout)(struct rpc_cred *); | 142 | int (*crkey_timeout)(struct rpc_cred *); |
| 142 | bool (*crkey_to_expire)(struct rpc_cred *); | 143 | bool (*crkey_to_expire)(struct rpc_cred *); |
| 144 | char * (*crstringify_acceptor)(struct rpc_cred *); | ||
| 143 | }; | 145 | }; |
| 144 | 146 | ||
| 145 | extern const struct rpc_authops authunix_ops; | 147 | extern const struct rpc_authops authunix_ops; |
| @@ -153,6 +155,7 @@ void rpc_destroy_generic_auth(void); | |||
| 153 | void rpc_destroy_authunix(void); | 155 | void rpc_destroy_authunix(void); |
| 154 | 156 | ||
| 155 | struct rpc_cred * rpc_lookup_cred(void); | 157 | struct rpc_cred * rpc_lookup_cred(void); |
| 158 | struct rpc_cred * rpc_lookup_cred_nonblock(void); | ||
| 156 | struct rpc_cred * rpc_lookup_machine_cred(const char *service_name); | 159 | struct rpc_cred * rpc_lookup_machine_cred(const char *service_name); |
| 157 | int rpcauth_register(const struct rpc_authops *); | 160 | int rpcauth_register(const struct rpc_authops *); |
| 158 | int rpcauth_unregister(const struct rpc_authops *); | 161 | int rpcauth_unregister(const struct rpc_authops *); |
| @@ -182,6 +185,7 @@ void rpcauth_clear_credcache(struct rpc_cred_cache *); | |||
| 182 | int rpcauth_key_timeout_notify(struct rpc_auth *, | 185 | int rpcauth_key_timeout_notify(struct rpc_auth *, |
| 183 | struct rpc_cred *); | 186 | struct rpc_cred *); |
| 184 | bool rpcauth_cred_key_to_expire(struct rpc_cred *); | 187 | bool rpcauth_cred_key_to_expire(struct rpc_cred *); |
| 188 | char * rpcauth_stringify_acceptor(struct rpc_cred *); | ||
| 185 | 189 | ||
| 186 | static inline | 190 | static inline |
| 187 | struct rpc_cred * get_rpccred(struct rpc_cred *cred) | 191 | struct rpc_cred * get_rpccred(struct rpc_cred *cred) |
diff --git a/include/linux/sunrpc/auth_gss.h b/include/linux/sunrpc/auth_gss.h index f1cfd4c85cd0..36eebc451b41 100644 --- a/include/linux/sunrpc/auth_gss.h +++ b/include/linux/sunrpc/auth_gss.h | |||
| @@ -69,8 +69,9 @@ struct gss_cl_ctx { | |||
| 69 | enum rpc_gss_proc gc_proc; | 69 | enum rpc_gss_proc gc_proc; |
| 70 | u32 gc_seq; | 70 | u32 gc_seq; |
| 71 | spinlock_t gc_seq_lock; | 71 | spinlock_t gc_seq_lock; |
| 72 | struct gss_ctx __rcu *gc_gss_ctx; | 72 | struct gss_ctx *gc_gss_ctx; |
| 73 | struct xdr_netobj gc_wire_ctx; | 73 | struct xdr_netobj gc_wire_ctx; |
| 74 | struct xdr_netobj gc_acceptor; | ||
| 74 | u32 gc_win; | 75 | u32 gc_win; |
| 75 | unsigned long gc_expiry; | 76 | unsigned long gc_expiry; |
| 76 | struct rcu_head gc_rcu; | 77 | struct rcu_head gc_rcu; |
diff --git a/include/linux/sunrpc/gss_krb5.h b/include/linux/sunrpc/gss_krb5.h index 5af2931cf58d..df02a4188487 100644 --- a/include/linux/sunrpc/gss_krb5.h +++ b/include/linux/sunrpc/gss_krb5.h | |||
| @@ -81,7 +81,7 @@ struct gss_krb5_enctype { | |||
| 81 | struct xdr_netobj *in, | 81 | struct xdr_netobj *in, |
| 82 | struct xdr_netobj *out); /* complete key generation */ | 82 | struct xdr_netobj *out); /* complete key generation */ |
| 83 | u32 (*encrypt_v2) (struct krb5_ctx *kctx, u32 offset, | 83 | u32 (*encrypt_v2) (struct krb5_ctx *kctx, u32 offset, |
| 84 | struct xdr_buf *buf, int ec, | 84 | struct xdr_buf *buf, |
| 85 | struct page **pages); /* v2 encryption function */ | 85 | struct page **pages); /* v2 encryption function */ |
| 86 | u32 (*decrypt_v2) (struct krb5_ctx *kctx, u32 offset, | 86 | u32 (*decrypt_v2) (struct krb5_ctx *kctx, u32 offset, |
| 87 | struct xdr_buf *buf, u32 *headskip, | 87 | struct xdr_buf *buf, u32 *headskip, |
| @@ -310,7 +310,7 @@ gss_krb5_aes_make_key(const struct gss_krb5_enctype *gk5e, | |||
| 310 | 310 | ||
| 311 | u32 | 311 | u32 |
| 312 | gss_krb5_aes_encrypt(struct krb5_ctx *kctx, u32 offset, | 312 | gss_krb5_aes_encrypt(struct krb5_ctx *kctx, u32 offset, |
| 313 | struct xdr_buf *buf, int ec, | 313 | struct xdr_buf *buf, |
| 314 | struct page **pages); | 314 | struct page **pages); |
| 315 | 315 | ||
| 316 | u32 | 316 | u32 |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 1bc7cd05b22e..cf61ecd148e0 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
| @@ -236,7 +236,7 @@ struct svc_rqst { | |||
| 236 | struct svc_cred rq_cred; /* auth info */ | 236 | struct svc_cred rq_cred; /* auth info */ |
| 237 | void * rq_xprt_ctxt; /* transport specific context ptr */ | 237 | void * rq_xprt_ctxt; /* transport specific context ptr */ |
| 238 | struct svc_deferred_req*rq_deferred; /* deferred request we are replaying */ | 238 | struct svc_deferred_req*rq_deferred; /* deferred request we are replaying */ |
| 239 | int rq_usedeferral; /* use deferral */ | 239 | bool rq_usedeferral; /* use deferral */ |
| 240 | 240 | ||
| 241 | size_t rq_xprt_hlen; /* xprt header len */ | 241 | size_t rq_xprt_hlen; /* xprt header len */ |
| 242 | struct xdr_buf rq_arg; | 242 | struct xdr_buf rq_arg; |
| @@ -277,7 +277,7 @@ struct svc_rqst { | |||
| 277 | struct auth_domain * rq_gssclient; /* "gss/"-style peer info */ | 277 | struct auth_domain * rq_gssclient; /* "gss/"-style peer info */ |
| 278 | int rq_cachetype; | 278 | int rq_cachetype; |
| 279 | struct svc_cacherep * rq_cacherep; /* cache info */ | 279 | struct svc_cacherep * rq_cacherep; /* cache info */ |
| 280 | int rq_splice_ok; /* turned off in gss privacy | 280 | bool rq_splice_ok; /* turned off in gss privacy |
| 281 | * to prevent encrypting page | 281 | * to prevent encrypting page |
| 282 | * cache pages */ | 282 | * cache pages */ |
| 283 | wait_queue_head_t rq_wait; /* synchronization */ | 283 | wait_queue_head_t rq_wait; /* synchronization */ |
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h index 5cf99a016368..975da754c778 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h | |||
| @@ -174,8 +174,7 @@ struct svcxprt_rdma { | |||
| 174 | * page size of 4k, or 32k * 2 ops / 4k = 16 outstanding RDMA_READ. */ | 174 | * page size of 4k, or 32k * 2 ops / 4k = 16 outstanding RDMA_READ. */ |
| 175 | #define RPCRDMA_ORD (64/4) | 175 | #define RPCRDMA_ORD (64/4) |
| 176 | #define RPCRDMA_SQ_DEPTH_MULT 8 | 176 | #define RPCRDMA_SQ_DEPTH_MULT 8 |
| 177 | #define RPCRDMA_MAX_THREADS 16 | 177 | #define RPCRDMA_MAX_REQUESTS 32 |
| 178 | #define RPCRDMA_MAX_REQUESTS 16 | ||
| 179 | #define RPCRDMA_MAX_REQ_SIZE 4096 | 178 | #define RPCRDMA_MAX_REQ_SIZE 4096 |
| 180 | 179 | ||
| 181 | /* svc_rdma_marshal.c */ | 180 | /* svc_rdma_marshal.c */ |
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index 7235040a19b2..ce6e4182a5b2 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
| @@ -25,6 +25,7 @@ struct svc_xprt_ops { | |||
| 25 | void (*xpo_detach)(struct svc_xprt *); | 25 | void (*xpo_detach)(struct svc_xprt *); |
| 26 | void (*xpo_free)(struct svc_xprt *); | 26 | void (*xpo_free)(struct svc_xprt *); |
| 27 | int (*xpo_secure_port)(struct svc_rqst *); | 27 | int (*xpo_secure_port)(struct svc_rqst *); |
| 28 | void (*xpo_adjust_wspace)(struct svc_xprt *); | ||
| 28 | }; | 29 | }; |
| 29 | 30 | ||
| 30 | struct svc_xprt_class { | 31 | struct svc_xprt_class { |
| @@ -33,6 +34,7 @@ struct svc_xprt_class { | |||
| 33 | struct svc_xprt_ops *xcl_ops; | 34 | struct svc_xprt_ops *xcl_ops; |
| 34 | struct list_head xcl_list; | 35 | struct list_head xcl_list; |
| 35 | u32 xcl_max_payload; | 36 | u32 xcl_max_payload; |
| 37 | int xcl_ident; | ||
| 36 | }; | 38 | }; |
| 37 | 39 | ||
| 38 | /* | 40 | /* |
diff --git a/include/linux/sunrpc/xprtrdma.h b/include/linux/sunrpc/xprtrdma.h index c2f04e1ae159..64a0a0a97b23 100644 --- a/include/linux/sunrpc/xprtrdma.h +++ b/include/linux/sunrpc/xprtrdma.h | |||
| @@ -62,8 +62,6 @@ | |||
| 62 | #define RPCRDMA_INLINE_PAD_THRESH (512)/* payload threshold to pad (bytes) */ | 62 | #define RPCRDMA_INLINE_PAD_THRESH (512)/* payload threshold to pad (bytes) */ |
| 63 | 63 | ||
| 64 | /* memory registration strategies */ | 64 | /* memory registration strategies */ |
| 65 | #define RPCRDMA_PERSISTENT_REGISTRATION (1) | ||
| 66 | |||
| 67 | enum rpcrdma_memreg { | 65 | enum rpcrdma_memreg { |
| 68 | RPCRDMA_BOUNCEBUFFERS = 0, | 66 | RPCRDMA_BOUNCEBUFFERS = 0, |
| 69 | RPCRDMA_REGISTER, | 67 | RPCRDMA_REGISTER, |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 4bdbee80eede..1b72060f093a 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -311,7 +311,6 @@ extern void lru_add_page_tail(struct page *page, struct page *page_tail, | |||
| 311 | struct lruvec *lruvec, struct list_head *head); | 311 | struct lruvec *lruvec, struct list_head *head); |
| 312 | extern void activate_page(struct page *); | 312 | extern void activate_page(struct page *); |
| 313 | extern void mark_page_accessed(struct page *); | 313 | extern void mark_page_accessed(struct page *); |
| 314 | extern void init_page_accessed(struct page *page); | ||
| 315 | extern void lru_add_drain(void); | 314 | extern void lru_add_drain(void); |
| 316 | extern void lru_add_drain_cpu(int cpu); | 315 | extern void lru_add_drain_cpu(int cpu); |
| 317 | extern void lru_add_drain_all(void); | 316 | extern void lru_add_drain_all(void); |
| @@ -321,6 +320,9 @@ extern void swap_setup(void); | |||
| 321 | 320 | ||
| 322 | extern void add_page_to_unevictable_list(struct page *page); | 321 | extern void add_page_to_unevictable_list(struct page *page); |
| 323 | 322 | ||
| 323 | extern void lru_cache_add_active_or_unevictable(struct page *page, | ||
| 324 | struct vm_area_struct *vma); | ||
| 325 | |||
| 324 | /* linux/mm/vmscan.c */ | 326 | /* linux/mm/vmscan.c */ |
| 325 | extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, | 327 | extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, |
| 326 | gfp_t gfp_mask, nodemask_t *mask); | 328 | gfp_t gfp_mask, nodemask_t *mask); |
| @@ -379,9 +381,13 @@ static inline int mem_cgroup_swappiness(struct mem_cgroup *mem) | |||
| 379 | } | 381 | } |
| 380 | #endif | 382 | #endif |
| 381 | #ifdef CONFIG_MEMCG_SWAP | 383 | #ifdef CONFIG_MEMCG_SWAP |
| 382 | extern void mem_cgroup_uncharge_swap(swp_entry_t ent); | 384 | extern void mem_cgroup_swapout(struct page *page, swp_entry_t entry); |
| 385 | extern void mem_cgroup_uncharge_swap(swp_entry_t entry); | ||
| 383 | #else | 386 | #else |
| 384 | static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) | 387 | static inline void mem_cgroup_swapout(struct page *page, swp_entry_t entry) |
| 388 | { | ||
| 389 | } | ||
| 390 | static inline void mem_cgroup_uncharge_swap(swp_entry_t entry) | ||
| 385 | { | 391 | { |
| 386 | } | 392 | } |
| 387 | #endif | 393 | #endif |
| @@ -441,7 +447,7 @@ extern void swap_shmem_alloc(swp_entry_t); | |||
| 441 | extern int swap_duplicate(swp_entry_t); | 447 | extern int swap_duplicate(swp_entry_t); |
| 442 | extern int swapcache_prepare(swp_entry_t); | 448 | extern int swapcache_prepare(swp_entry_t); |
| 443 | extern void swap_free(swp_entry_t); | 449 | extern void swap_free(swp_entry_t); |
| 444 | extern void swapcache_free(swp_entry_t, struct page *page); | 450 | extern void swapcache_free(swp_entry_t); |
| 445 | extern int free_swap_and_cache(swp_entry_t); | 451 | extern int free_swap_and_cache(swp_entry_t); |
| 446 | extern int swap_type_of(dev_t, sector_t, struct block_device **); | 452 | extern int swap_type_of(dev_t, sector_t, struct block_device **); |
| 447 | extern unsigned int count_swap_pages(int, int); | 453 | extern unsigned int count_swap_pages(int, int); |
| @@ -505,7 +511,7 @@ static inline void swap_free(swp_entry_t swp) | |||
| 505 | { | 511 | { |
| 506 | } | 512 | } |
| 507 | 513 | ||
| 508 | static inline void swapcache_free(swp_entry_t swp, struct page *page) | 514 | static inline void swapcache_free(swp_entry_t swp) |
| 509 | { | 515 | { |
| 510 | } | 516 | } |
| 511 | 517 | ||
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 701daff5d899..0f86d85a9ce4 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -317,6 +317,10 @@ asmlinkage long sys_restart_syscall(void); | |||
| 317 | asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments, | 317 | asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments, |
| 318 | struct kexec_segment __user *segments, | 318 | struct kexec_segment __user *segments, |
| 319 | unsigned long flags); | 319 | unsigned long flags); |
| 320 | asmlinkage long sys_kexec_file_load(int kernel_fd, int initrd_fd, | ||
| 321 | unsigned long cmdline_len, | ||
| 322 | const char __user *cmdline_ptr, | ||
| 323 | unsigned long flags); | ||
| 320 | 324 | ||
| 321 | asmlinkage long sys_exit(int error_code); | 325 | asmlinkage long sys_exit(int error_code); |
| 322 | asmlinkage long sys_exit_group(int error_code); | 326 | asmlinkage long sys_exit_group(int error_code); |
| @@ -802,6 +806,7 @@ asmlinkage long sys_timerfd_settime(int ufd, int flags, | |||
| 802 | asmlinkage long sys_timerfd_gettime(int ufd, struct itimerspec __user *otmr); | 806 | asmlinkage long sys_timerfd_gettime(int ufd, struct itimerspec __user *otmr); |
| 803 | asmlinkage long sys_eventfd(unsigned int count); | 807 | asmlinkage long sys_eventfd(unsigned int count); |
| 804 | asmlinkage long sys_eventfd2(unsigned int count, int flags); | 808 | asmlinkage long sys_eventfd2(unsigned int count, int flags); |
| 809 | asmlinkage long sys_memfd_create(const char __user *uname_ptr, unsigned int flags); | ||
| 805 | asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len); | 810 | asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len); |
| 806 | asmlinkage long sys_old_readdir(unsigned int, struct old_linux_dirent __user *, unsigned int); | 811 | asmlinkage long sys_old_readdir(unsigned int, struct old_linux_dirent __user *, unsigned int); |
| 807 | asmlinkage long sys_pselect6(int, fd_set __user *, fd_set __user *, | 812 | asmlinkage long sys_pselect6(int, fd_set __user *, fd_set __user *, |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 14a8ff2de11e..b7361f831226 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
| @@ -34,8 +34,6 @@ struct ctl_table_root; | |||
| 34 | struct ctl_table_header; | 34 | struct ctl_table_header; |
| 35 | struct ctl_dir; | 35 | struct ctl_dir; |
| 36 | 36 | ||
| 37 | typedef struct ctl_table ctl_table; | ||
| 38 | |||
| 39 | typedef int proc_handler (struct ctl_table *ctl, int write, | 37 | typedef int proc_handler (struct ctl_table *ctl, int write, |
| 40 | void __user *buffer, size_t *lenp, loff_t *ppos); | 38 | void __user *buffer, size_t *lenp, loff_t *ppos); |
| 41 | 39 | ||
diff --git a/include/linux/tegra-soc.h b/include/linux/tegra-soc.h deleted file mode 100644 index 95f611d78f3a..000000000000 --- a/include/linux/tegra-soc.h +++ /dev/null | |||
| @@ -1,22 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms and conditions of the GNU General Public License, | ||
| 6 | * version 2, as published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 11 | * more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef __LINUX_TEGRA_SOC_H_ | ||
| 18 | #define __LINUX_TEGRA_SOC_H_ | ||
| 19 | |||
| 20 | u32 tegra_read_chipid(void); | ||
| 21 | |||
| 22 | #endif /* __LINUX_TEGRA_SOC_H_ */ | ||
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index f7e11c7ea7d9..0305cde21a74 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
| @@ -158,6 +158,42 @@ struct thermal_attr { | |||
| 158 | char name[THERMAL_NAME_LENGTH]; | 158 | char name[THERMAL_NAME_LENGTH]; |
| 159 | }; | 159 | }; |
| 160 | 160 | ||
| 161 | /** | ||
| 162 | * struct thermal_zone_device - structure for a thermal zone | ||
| 163 | * @id: unique id number for each thermal zone | ||
| 164 | * @type: the thermal zone device type | ||
| 165 | * @device: &struct device for this thermal zone | ||
| 166 | * @trip_temp_attrs: attributes for trip points for sysfs: trip temperature | ||
| 167 | * @trip_type_attrs: attributes for trip points for sysfs: trip type | ||
| 168 | * @trip_hyst_attrs: attributes for trip points for sysfs: trip hysteresis | ||
| 169 | * @devdata: private pointer for device private data | ||
| 170 | * @trips: number of trip points the thermal zone supports | ||
| 171 | * @passive_delay: number of milliseconds to wait between polls when | ||
| 172 | * performing passive cooling. Currenty only used by the | ||
| 173 | * step-wise governor | ||
| 174 | * @polling_delay: number of milliseconds to wait between polls when | ||
| 175 | * checking whether trip points have been crossed (0 for | ||
| 176 | * interrupt driven systems) | ||
| 177 | * @temperature: current temperature. This is only for core code, | ||
| 178 | * drivers should use thermal_zone_get_temp() to get the | ||
| 179 | * current temperature | ||
| 180 | * @last_temperature: previous temperature read | ||
| 181 | * @emul_temperature: emulated temperature when using CONFIG_THERMAL_EMULATION | ||
| 182 | * @passive: 1 if you've crossed a passive trip point, 0 otherwise. | ||
| 183 | * Currenty only used by the step-wise governor. | ||
| 184 | * @forced_passive: If > 0, temperature at which to switch on all ACPI | ||
| 185 | * processor cooling devices. Currently only used by the | ||
| 186 | * step-wise governor. | ||
| 187 | * @ops: operations this &thermal_zone_device supports | ||
| 188 | * @tzp: thermal zone parameters | ||
| 189 | * @governor: pointer to the governor for this thermal zone | ||
| 190 | * @thermal_instances: list of &struct thermal_instance of this thermal zone | ||
| 191 | * @idr: &struct idr to generate unique id for this zone's cooling | ||
| 192 | * devices | ||
| 193 | * @lock: lock to protect thermal_instances list | ||
| 194 | * @node: node in thermal_tz_list (in thermal_core.c) | ||
| 195 | * @poll_queue: delayed work for polling | ||
| 196 | */ | ||
| 161 | struct thermal_zone_device { | 197 | struct thermal_zone_device { |
| 162 | int id; | 198 | int id; |
| 163 | char type[THERMAL_NAME_LENGTH]; | 199 | char type[THERMAL_NAME_LENGTH]; |
| @@ -179,12 +215,18 @@ struct thermal_zone_device { | |||
| 179 | struct thermal_governor *governor; | 215 | struct thermal_governor *governor; |
| 180 | struct list_head thermal_instances; | 216 | struct list_head thermal_instances; |
| 181 | struct idr idr; | 217 | struct idr idr; |
| 182 | struct mutex lock; /* protect thermal_instances list */ | 218 | struct mutex lock; |
| 183 | struct list_head node; | 219 | struct list_head node; |
| 184 | struct delayed_work poll_queue; | 220 | struct delayed_work poll_queue; |
| 185 | }; | 221 | }; |
| 186 | 222 | ||
| 187 | /* Structure that holds thermal governor information */ | 223 | /** |
| 224 | * struct thermal_governor - structure that holds thermal governor information | ||
| 225 | * @name: name of the governor | ||
| 226 | * @throttle: callback called for every trip point even if temperature is | ||
| 227 | * below the trip point temperature | ||
| 228 | * @governor_list: node in thermal_governor_list (in thermal_core.c) | ||
| 229 | */ | ||
| 188 | struct thermal_governor { | 230 | struct thermal_governor { |
| 189 | char name[THERMAL_NAME_LENGTH]; | 231 | char name[THERMAL_NAME_LENGTH]; |
| 190 | int (*throttle)(struct thermal_zone_device *tz, int trip); | 232 | int (*throttle)(struct thermal_zone_device *tz, int trip); |
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 6f8ab7da27c4..84d497297c5f 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
| @@ -133,10 +133,6 @@ static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step) | |||
| 133 | 133 | ||
| 134 | /** | 134 | /** |
| 135 | * tracehook_signal_handler - signal handler setup is complete | 135 | * tracehook_signal_handler - signal handler setup is complete |
| 136 | * @sig: number of signal being delivered | ||
| 137 | * @info: siginfo_t of signal being delivered | ||
| 138 | * @ka: sigaction setting that chose the handler | ||
| 139 | * @regs: user register state | ||
| 140 | * @stepping: nonzero if debugger single-step or block-step in use | 136 | * @stepping: nonzero if debugger single-step or block-step in use |
| 141 | * | 137 | * |
| 142 | * Called by the arch code after a signal handler has been set up. | 138 | * Called by the arch code after a signal handler has been set up. |
| @@ -146,9 +142,7 @@ static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step) | |||
| 146 | * Called without locks, shortly before returning to user mode | 142 | * Called without locks, shortly before returning to user mode |
| 147 | * (or handling more signals). | 143 | * (or handling more signals). |
| 148 | */ | 144 | */ |
| 149 | static inline void tracehook_signal_handler(int sig, siginfo_t *info, | 145 | static inline void tracehook_signal_handler(int stepping) |
| 150 | const struct k_sigaction *ka, | ||
| 151 | struct pt_regs *regs, int stepping) | ||
| 152 | { | 146 | { |
| 153 | if (stepping) | 147 | if (stepping) |
| 154 | ptrace_notify(SIGTRAP); | 148 | ptrace_notify(SIGTRAP); |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 2e2a5f7717e5..b1293f15f592 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
| @@ -249,6 +249,50 @@ extern void syscall_unregfunc(void); | |||
| 249 | 249 | ||
| 250 | #endif /* CONFIG_TRACEPOINTS */ | 250 | #endif /* CONFIG_TRACEPOINTS */ |
| 251 | 251 | ||
| 252 | #ifdef CONFIG_TRACING | ||
| 253 | /** | ||
| 254 | * tracepoint_string - register constant persistent string to trace system | ||
| 255 | * @str - a constant persistent string that will be referenced in tracepoints | ||
| 256 | * | ||
| 257 | * If constant strings are being used in tracepoints, it is faster and | ||
| 258 | * more efficient to just save the pointer to the string and reference | ||
| 259 | * that with a printf "%s" instead of saving the string in the ring buffer | ||
| 260 | * and wasting space and time. | ||
| 261 | * | ||
| 262 | * The problem with the above approach is that userspace tools that read | ||
| 263 | * the binary output of the trace buffers do not have access to the string. | ||
| 264 | * Instead they just show the address of the string which is not very | ||
| 265 | * useful to users. | ||
| 266 | * | ||
| 267 | * With tracepoint_string(), the string will be registered to the tracing | ||
| 268 | * system and exported to userspace via the debugfs/tracing/printk_formats | ||
| 269 | * file that maps the string address to the string text. This way userspace | ||
| 270 | * tools that read the binary buffers have a way to map the pointers to | ||
| 271 | * the ASCII strings they represent. | ||
| 272 | * | ||
| 273 | * The @str used must be a constant string and persistent as it would not | ||
| 274 | * make sense to show a string that no longer exists. But it is still fine | ||
| 275 | * to be used with modules, because when modules are unloaded, if they | ||
| 276 | * had tracepoints, the ring buffers are cleared too. As long as the string | ||
| 277 | * does not change during the life of the module, it is fine to use | ||
| 278 | * tracepoint_string() within a module. | ||
| 279 | */ | ||
| 280 | #define tracepoint_string(str) \ | ||
| 281 | ({ \ | ||
| 282 | static const char *___tp_str __tracepoint_string = str; \ | ||
| 283 | ___tp_str; \ | ||
| 284 | }) | ||
| 285 | #define __tracepoint_string __attribute__((section("__tracepoint_str"))) | ||
| 286 | #else | ||
| 287 | /* | ||
| 288 | * tracepoint_string() is used to save the string address for userspace | ||
| 289 | * tracing tools. When tracing isn't configured, there's no need to save | ||
| 290 | * anything. | ||
| 291 | */ | ||
| 292 | # define tracepoint_string(str) str | ||
| 293 | # define __tracepoint_string | ||
| 294 | #endif | ||
| 295 | |||
| 252 | /* | 296 | /* |
| 253 | * The need for the DECLARE_TRACE_NOARGS() is to handle the prototype | 297 | * The need for the DECLARE_TRACE_NOARGS() is to handle the prototype |
| 254 | * (void). "void" is a special value in a function prototype and can | 298 | * (void). "void" is a special value in a function prototype and can |
diff --git a/include/linux/uio.h b/include/linux/uio.h index 09a7cffc224e..48d64e6ab292 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h | |||
| @@ -84,7 +84,7 @@ unsigned long iov_iter_alignment(const struct iov_iter *i); | |||
| 84 | void iov_iter_init(struct iov_iter *i, int direction, const struct iovec *iov, | 84 | void iov_iter_init(struct iov_iter *i, int direction, const struct iovec *iov, |
| 85 | unsigned long nr_segs, size_t count); | 85 | unsigned long nr_segs, size_t count); |
| 86 | ssize_t iov_iter_get_pages(struct iov_iter *i, struct page **pages, | 86 | ssize_t iov_iter_get_pages(struct iov_iter *i, struct page **pages, |
| 87 | size_t maxsize, size_t *start); | 87 | unsigned maxpages, size_t *start); |
| 88 | ssize_t iov_iter_get_pages_alloc(struct iov_iter *i, struct page ***pages, | 88 | ssize_t iov_iter_get_pages_alloc(struct iov_iter *i, struct page ***pages, |
| 89 | size_t maxsize, size_t *start); | 89 | size_t maxsize, size_t *start); |
| 90 | int iov_iter_npages(const struct iov_iter *i, int maxpages); | 90 | int iov_iter_npages(const struct iov_iter *i, int maxpages); |
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index 4836ba3c1cd8..e95372654f09 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h | |||
| @@ -57,9 +57,9 @@ static inline void put_user_ns(struct user_namespace *ns) | |||
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | struct seq_operations; | 59 | struct seq_operations; |
| 60 | extern struct seq_operations proc_uid_seq_operations; | 60 | extern const struct seq_operations proc_uid_seq_operations; |
| 61 | extern struct seq_operations proc_gid_seq_operations; | 61 | extern const struct seq_operations proc_gid_seq_operations; |
| 62 | extern struct seq_operations proc_projid_seq_operations; | 62 | extern const struct seq_operations proc_projid_seq_operations; |
| 63 | extern ssize_t proc_uid_map_write(struct file *, const char __user *, size_t, loff_t *); | 63 | extern ssize_t proc_uid_map_write(struct file *, const char __user *, size_t, loff_t *); |
| 64 | extern ssize_t proc_gid_map_write(struct file *, const char __user *, size_t, loff_t *); | 64 | extern ssize_t proc_gid_map_write(struct file *, const char __user *, size_t, loff_t *); |
| 65 | extern ssize_t proc_projid_map_write(struct file *, const char __user *, size_t, loff_t *); | 65 | extern ssize_t proc_projid_map_write(struct file *, const char __user *, size_t, loff_t *); |
diff --git a/include/linux/vfio.h b/include/linux/vfio.h index 8ec980b5e3af..d3204115f15d 100644 --- a/include/linux/vfio.h +++ b/include/linux/vfio.h | |||
| @@ -98,4 +98,27 @@ extern int vfio_external_user_iommu_id(struct vfio_group *group); | |||
| 98 | extern long vfio_external_check_extension(struct vfio_group *group, | 98 | extern long vfio_external_check_extension(struct vfio_group *group, |
| 99 | unsigned long arg); | 99 | unsigned long arg); |
| 100 | 100 | ||
| 101 | struct pci_dev; | ||
| 102 | #ifdef CONFIG_EEH | ||
| 103 | extern void vfio_spapr_pci_eeh_open(struct pci_dev *pdev); | ||
| 104 | extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev); | ||
| 105 | extern long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group, | ||
| 106 | unsigned int cmd, | ||
| 107 | unsigned long arg); | ||
| 108 | #else | ||
| 109 | static inline void vfio_spapr_pci_eeh_open(struct pci_dev *pdev) | ||
| 110 | { | ||
| 111 | } | ||
| 112 | |||
| 113 | static inline void vfio_spapr_pci_eeh_release(struct pci_dev *pdev) | ||
| 114 | { | ||
| 115 | } | ||
| 116 | |||
| 117 | static inline long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group, | ||
| 118 | unsigned int cmd, | ||
| 119 | unsigned long arg) | ||
| 120 | { | ||
| 121 | return -ENOTTY; | ||
| 122 | } | ||
| 123 | #endif /* CONFIG_EEH */ | ||
| 101 | #endif /* VFIO_H */ | 124 | #endif /* VFIO_H */ |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 4b8a89189a29..b87696fdf06a 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
| @@ -113,7 +113,7 @@ extern struct vm_struct *remove_vm_area(const void *addr); | |||
| 113 | extern struct vm_struct *find_vm_area(const void *addr); | 113 | extern struct vm_struct *find_vm_area(const void *addr); |
| 114 | 114 | ||
| 115 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, | 115 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, |
| 116 | struct page ***pages); | 116 | struct page **pages); |
| 117 | #ifdef CONFIG_MMU | 117 | #ifdef CONFIG_MMU |
| 118 | extern int map_kernel_range_noflush(unsigned long start, unsigned long size, | 118 | extern int map_kernel_range_noflush(unsigned long start, unsigned long size, |
| 119 | pgprot_t prot, struct page **pages); | 119 | pgprot_t prot, struct page **pages); |
diff --git a/include/linux/zbud.h b/include/linux/zbud.h index 13af0d450bf6..f9d41a6e361f 100644 --- a/include/linux/zbud.h +++ b/include/linux/zbud.h | |||
| @@ -11,7 +11,7 @@ struct zbud_ops { | |||
| 11 | 11 | ||
| 12 | struct zbud_pool *zbud_create_pool(gfp_t gfp, struct zbud_ops *ops); | 12 | struct zbud_pool *zbud_create_pool(gfp_t gfp, struct zbud_ops *ops); |
| 13 | void zbud_destroy_pool(struct zbud_pool *pool); | 13 | void zbud_destroy_pool(struct zbud_pool *pool); |
| 14 | int zbud_alloc(struct zbud_pool *pool, unsigned int size, gfp_t gfp, | 14 | int zbud_alloc(struct zbud_pool *pool, size_t size, gfp_t gfp, |
| 15 | unsigned long *handle); | 15 | unsigned long *handle); |
| 16 | void zbud_free(struct zbud_pool *pool, unsigned long handle); | 16 | void zbud_free(struct zbud_pool *pool, unsigned long handle); |
| 17 | int zbud_reclaim_page(struct zbud_pool *pool, unsigned int retries); | 17 | int zbud_reclaim_page(struct zbud_pool *pool, unsigned int retries); |
diff --git a/include/linux/zlib.h b/include/linux/zlib.h index 9c5a6b4de0a3..92dbbd3f6c75 100644 --- a/include/linux/zlib.h +++ b/include/linux/zlib.h | |||
| @@ -83,11 +83,11 @@ struct internal_state; | |||
| 83 | 83 | ||
| 84 | typedef struct z_stream_s { | 84 | typedef struct z_stream_s { |
| 85 | const Byte *next_in; /* next input byte */ | 85 | const Byte *next_in; /* next input byte */ |
| 86 | uInt avail_in; /* number of bytes available at next_in */ | 86 | uLong avail_in; /* number of bytes available at next_in */ |
| 87 | uLong total_in; /* total nb of input bytes read so far */ | 87 | uLong total_in; /* total nb of input bytes read so far */ |
| 88 | 88 | ||
| 89 | Byte *next_out; /* next output byte should be put there */ | 89 | Byte *next_out; /* next output byte should be put there */ |
| 90 | uInt avail_out; /* remaining free space at next_out */ | 90 | uLong avail_out; /* remaining free space at next_out */ |
| 91 | uLong total_out; /* total nb of bytes output so far */ | 91 | uLong total_out; /* total nb of bytes output so far */ |
| 92 | 92 | ||
| 93 | char *msg; /* last error message, NULL if no error */ | 93 | char *msg; /* last error message, NULL if no error */ |
| @@ -493,64 +493,6 @@ extern int deflateInit2 (z_streamp strm, | |||
| 493 | method). msg is set to null if there is no error message. deflateInit2 does | 493 | method). msg is set to null if there is no error message. deflateInit2 does |
| 494 | not perform any compression: this will be done by deflate(). | 494 | not perform any compression: this will be done by deflate(). |
| 495 | */ | 495 | */ |
| 496 | |||
| 497 | #if 0 | ||
| 498 | extern int zlib_deflateSetDictionary (z_streamp strm, | ||
| 499 | const Byte *dictionary, | ||
| 500 | uInt dictLength); | ||
| 501 | #endif | ||
| 502 | /* | ||
| 503 | Initializes the compression dictionary from the given byte sequence | ||
| 504 | without producing any compressed output. This function must be called | ||
| 505 | immediately after deflateInit, deflateInit2 or deflateReset, before any | ||
| 506 | call of deflate. The compressor and decompressor must use exactly the same | ||
| 507 | dictionary (see inflateSetDictionary). | ||
| 508 | |||
| 509 | The dictionary should consist of strings (byte sequences) that are likely | ||
| 510 | to be encountered later in the data to be compressed, with the most commonly | ||
| 511 | used strings preferably put towards the end of the dictionary. Using a | ||
| 512 | dictionary is most useful when the data to be compressed is short and can be | ||
| 513 | predicted with good accuracy; the data can then be compressed better than | ||
| 514 | with the default empty dictionary. | ||
| 515 | |||
| 516 | Depending on the size of the compression data structures selected by | ||
| 517 | deflateInit or deflateInit2, a part of the dictionary may in effect be | ||
| 518 | discarded, for example if the dictionary is larger than the window size in | ||
| 519 | deflate or deflate2. Thus the strings most likely to be useful should be | ||
| 520 | put at the end of the dictionary, not at the front. | ||
| 521 | |||
| 522 | Upon return of this function, strm->adler is set to the Adler32 value | ||
| 523 | of the dictionary; the decompressor may later use this value to determine | ||
| 524 | which dictionary has been used by the compressor. (The Adler32 value | ||
| 525 | applies to the whole dictionary even if only a subset of the dictionary is | ||
| 526 | actually used by the compressor.) | ||
| 527 | |||
| 528 | deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a | ||
| 529 | parameter is invalid (such as NULL dictionary) or the stream state is | ||
| 530 | inconsistent (for example if deflate has already been called for this stream | ||
| 531 | or if the compression method is bsort). deflateSetDictionary does not | ||
| 532 | perform any compression: this will be done by deflate(). | ||
| 533 | */ | ||
| 534 | |||
| 535 | #if 0 | ||
| 536 | extern int zlib_deflateCopy (z_streamp dest, z_streamp source); | ||
| 537 | #endif | ||
| 538 | |||
| 539 | /* | ||
| 540 | Sets the destination stream as a complete copy of the source stream. | ||
| 541 | |||
| 542 | This function can be useful when several compression strategies will be | ||
| 543 | tried, for example when there are several ways of pre-processing the input | ||
| 544 | data with a filter. The streams that will be discarded should then be freed | ||
| 545 | by calling deflateEnd. Note that deflateCopy duplicates the internal | ||
| 546 | compression state which can be quite large, so this strategy is slow and | ||
| 547 | can consume lots of memory. | ||
| 548 | |||
| 549 | deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not | ||
| 550 | enough memory, Z_STREAM_ERROR if the source stream state was inconsistent | ||
| 551 | (such as zalloc being NULL). msg is left unchanged in both source and | ||
| 552 | destination. | ||
| 553 | */ | ||
| 554 | 496 | ||
| 555 | extern int zlib_deflateReset (z_streamp strm); | 497 | extern int zlib_deflateReset (z_streamp strm); |
| 556 | /* | 498 | /* |
| @@ -568,27 +510,6 @@ static inline unsigned long deflateBound(unsigned long s) | |||
| 568 | return s + ((s + 7) >> 3) + ((s + 63) >> 6) + 11; | 510 | return s + ((s + 7) >> 3) + ((s + 63) >> 6) + 11; |
| 569 | } | 511 | } |
| 570 | 512 | ||
| 571 | #if 0 | ||
| 572 | extern int zlib_deflateParams (z_streamp strm, int level, int strategy); | ||
| 573 | #endif | ||
| 574 | /* | ||
| 575 | Dynamically update the compression level and compression strategy. The | ||
| 576 | interpretation of level and strategy is as in deflateInit2. This can be | ||
| 577 | used to switch between compression and straight copy of the input data, or | ||
| 578 | to switch to a different kind of input data requiring a different | ||
| 579 | strategy. If the compression level is changed, the input available so far | ||
| 580 | is compressed with the old level (and may be flushed); the new level will | ||
| 581 | take effect only at the next call of deflate(). | ||
| 582 | |||
| 583 | Before the call of deflateParams, the stream state must be set as for | ||
| 584 | a call of deflate(), since the currently available input may have to | ||
| 585 | be compressed and flushed. In particular, strm->avail_out must be non-zero. | ||
| 586 | |||
| 587 | deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source | ||
| 588 | stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR | ||
| 589 | if strm->avail_out was zero. | ||
| 590 | */ | ||
| 591 | |||
| 592 | /* | 513 | /* |
| 593 | extern int inflateInit2 (z_streamp strm, int windowBits); | 514 | extern int inflateInit2 (z_streamp strm, int windowBits); |
| 594 | 515 | ||
| @@ -631,45 +552,6 @@ extern int inflateInit2 (z_streamp strm, int windowBits); | |||
| 631 | and avail_out are unchanged.) | 552 | and avail_out are unchanged.) |
| 632 | */ | 553 | */ |
| 633 | 554 | ||
| 634 | extern int zlib_inflateSetDictionary (z_streamp strm, | ||
| 635 | const Byte *dictionary, | ||
| 636 | uInt dictLength); | ||
| 637 | /* | ||
| 638 | Initializes the decompression dictionary from the given uncompressed byte | ||
| 639 | sequence. This function must be called immediately after a call of inflate, | ||
| 640 | if that call returned Z_NEED_DICT. The dictionary chosen by the compressor | ||
| 641 | can be determined from the adler32 value returned by that call of inflate. | ||
| 642 | The compressor and decompressor must use exactly the same dictionary (see | ||
| 643 | deflateSetDictionary). For raw inflate, this function can be called | ||
| 644 | immediately after inflateInit2() or inflateReset() and before any call of | ||
| 645 | inflate() to set the dictionary. The application must insure that the | ||
| 646 | dictionary that was used for compression is provided. | ||
| 647 | |||
| 648 | inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a | ||
| 649 | parameter is invalid (such as NULL dictionary) or the stream state is | ||
| 650 | inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the | ||
| 651 | expected one (incorrect adler32 value). inflateSetDictionary does not | ||
| 652 | perform any decompression: this will be done by subsequent calls of | ||
| 653 | inflate(). | ||
| 654 | */ | ||
| 655 | |||
| 656 | #if 0 | ||
| 657 | extern int zlib_inflateSync (z_streamp strm); | ||
| 658 | #endif | ||
| 659 | /* | ||
| 660 | Skips invalid compressed data until a full flush point (see above the | ||
| 661 | description of deflate with Z_FULL_FLUSH) can be found, or until all | ||
| 662 | available input is skipped. No output is provided. | ||
| 663 | |||
| 664 | inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR | ||
| 665 | if no more input was provided, Z_DATA_ERROR if no flush point has been found, | ||
| 666 | or Z_STREAM_ERROR if the stream structure was inconsistent. In the success | ||
| 667 | case, the application may save the current current value of total_in which | ||
| 668 | indicates where valid compressed data was found. In the error case, the | ||
| 669 | application may repeatedly call inflateSync, providing more input each time, | ||
| 670 | until success or end of the input data. | ||
| 671 | */ | ||
| 672 | |||
| 673 | extern int zlib_inflateReset (z_streamp strm); | 555 | extern int zlib_inflateReset (z_streamp strm); |
| 674 | /* | 556 | /* |
| 675 | This function is equivalent to inflateEnd followed by inflateInit, | 557 | This function is equivalent to inflateEnd followed by inflateInit, |
diff --git a/include/linux/zpool.h b/include/linux/zpool.h new file mode 100644 index 000000000000..f14bd75f08b3 --- /dev/null +++ b/include/linux/zpool.h | |||
| @@ -0,0 +1,106 @@ | |||
| 1 | /* | ||
| 2 | * zpool memory storage api | ||
| 3 | * | ||
| 4 | * Copyright (C) 2014 Dan Streetman | ||
| 5 | * | ||
| 6 | * This is a common frontend for the zbud and zsmalloc memory | ||
| 7 | * storage pool implementations. Typically, this is used to | ||
| 8 | * store compressed memory. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef _ZPOOL_H_ | ||
| 12 | #define _ZPOOL_H_ | ||
| 13 | |||
| 14 | struct zpool; | ||
| 15 | |||
| 16 | struct zpool_ops { | ||
| 17 | int (*evict)(struct zpool *pool, unsigned long handle); | ||
| 18 | }; | ||
| 19 | |||
| 20 | /* | ||
| 21 | * Control how a handle is mapped. It will be ignored if the | ||
| 22 | * implementation does not support it. Its use is optional. | ||
| 23 | * Note that this does not refer to memory protection, it | ||
| 24 | * refers to how the memory will be copied in/out if copying | ||
| 25 | * is necessary during mapping; read-write is the safest as | ||
| 26 | * it copies the existing memory in on map, and copies the | ||
| 27 | * changed memory back out on unmap. Write-only does not copy | ||
| 28 | * in the memory and should only be used for initialization. | ||
| 29 | * If in doubt, use ZPOOL_MM_DEFAULT which is read-write. | ||
| 30 | */ | ||
| 31 | enum zpool_mapmode { | ||
| 32 | ZPOOL_MM_RW, /* normal read-write mapping */ | ||
| 33 | ZPOOL_MM_RO, /* read-only (no copy-out at unmap time) */ | ||
| 34 | ZPOOL_MM_WO, /* write-only (no copy-in at map time) */ | ||
| 35 | |||
| 36 | ZPOOL_MM_DEFAULT = ZPOOL_MM_RW | ||
| 37 | }; | ||
| 38 | |||
| 39 | struct zpool *zpool_create_pool(char *type, gfp_t gfp, struct zpool_ops *ops); | ||
| 40 | |||
| 41 | char *zpool_get_type(struct zpool *pool); | ||
| 42 | |||
| 43 | void zpool_destroy_pool(struct zpool *pool); | ||
| 44 | |||
| 45 | int zpool_malloc(struct zpool *pool, size_t size, gfp_t gfp, | ||
| 46 | unsigned long *handle); | ||
| 47 | |||
| 48 | void zpool_free(struct zpool *pool, unsigned long handle); | ||
| 49 | |||
| 50 | int zpool_shrink(struct zpool *pool, unsigned int pages, | ||
| 51 | unsigned int *reclaimed); | ||
| 52 | |||
| 53 | void *zpool_map_handle(struct zpool *pool, unsigned long handle, | ||
| 54 | enum zpool_mapmode mm); | ||
| 55 | |||
| 56 | void zpool_unmap_handle(struct zpool *pool, unsigned long handle); | ||
| 57 | |||
| 58 | u64 zpool_get_total_size(struct zpool *pool); | ||
| 59 | |||
| 60 | |||
| 61 | /** | ||
| 62 | * struct zpool_driver - driver implementation for zpool | ||
| 63 | * @type: name of the driver. | ||
| 64 | * @list: entry in the list of zpool drivers. | ||
| 65 | * @create: create a new pool. | ||
| 66 | * @destroy: destroy a pool. | ||
| 67 | * @malloc: allocate mem from a pool. | ||
| 68 | * @free: free mem from a pool. | ||
| 69 | * @shrink: shrink the pool. | ||
| 70 | * @map: map a handle. | ||
| 71 | * @unmap: unmap a handle. | ||
| 72 | * @total_size: get total size of a pool. | ||
| 73 | * | ||
| 74 | * This is created by a zpool implementation and registered | ||
| 75 | * with zpool. | ||
| 76 | */ | ||
| 77 | struct zpool_driver { | ||
| 78 | char *type; | ||
| 79 | struct module *owner; | ||
| 80 | atomic_t refcount; | ||
| 81 | struct list_head list; | ||
| 82 | |||
| 83 | void *(*create)(gfp_t gfp, struct zpool_ops *ops); | ||
| 84 | void (*destroy)(void *pool); | ||
| 85 | |||
| 86 | int (*malloc)(void *pool, size_t size, gfp_t gfp, | ||
| 87 | unsigned long *handle); | ||
| 88 | void (*free)(void *pool, unsigned long handle); | ||
| 89 | |||
| 90 | int (*shrink)(void *pool, unsigned int pages, | ||
| 91 | unsigned int *reclaimed); | ||
| 92 | |||
| 93 | void *(*map)(void *pool, unsigned long handle, | ||
| 94 | enum zpool_mapmode mm); | ||
| 95 | void (*unmap)(void *pool, unsigned long handle); | ||
| 96 | |||
| 97 | u64 (*total_size)(void *pool); | ||
| 98 | }; | ||
| 99 | |||
| 100 | void zpool_register_driver(struct zpool_driver *driver); | ||
| 101 | |||
| 102 | int zpool_unregister_driver(struct zpool_driver *driver); | ||
| 103 | |||
| 104 | int zpool_evict(void *pool, unsigned long handle); | ||
| 105 | |||
| 106 | #endif | ||
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index 7a4313887568..5fbe6568c3cf 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h | |||
| @@ -62,6 +62,7 @@ struct inet_connection_sock_af_ops { | |||
| 62 | void (*addr2sockaddr)(struct sock *sk, struct sockaddr *); | 62 | void (*addr2sockaddr)(struct sock *sk, struct sockaddr *); |
| 63 | int (*bind_conflict)(const struct sock *sk, | 63 | int (*bind_conflict)(const struct sock *sk, |
| 64 | const struct inet_bind_bucket *tb, bool relax); | 64 | const struct inet_bind_bucket *tb, bool relax); |
| 65 | void (*mtu_reduced)(struct sock *sk); | ||
| 65 | }; | 66 | }; |
| 66 | 67 | ||
| 67 | /** inet_connection_sock - INET connection oriented sock | 68 | /** inet_connection_sock - INET connection oriented sock |
diff --git a/include/net/netlabel.h b/include/net/netlabel.h index a4fc39bb3e4f..7b5a300de7f5 100644 --- a/include/net/netlabel.h +++ b/include/net/netlabel.h | |||
| @@ -524,10 +524,10 @@ static inline int netlbl_catmap_setrng(struct netlbl_lsm_catmap **catmap, | |||
| 524 | { | 524 | { |
| 525 | return 0; | 525 | return 0; |
| 526 | } | 526 | } |
| 527 | static int netlbl_catmap_setlong(struct netlbl_lsm_catmap **catmap, | 527 | static inline int netlbl_catmap_setlong(struct netlbl_lsm_catmap **catmap, |
| 528 | u32 offset, | 528 | u32 offset, |
| 529 | unsigned long bitmap, | 529 | unsigned long bitmap, |
| 530 | gfp_t flags) | 530 | gfp_t flags) |
| 531 | { | 531 | { |
| 532 | return 0; | 532 | return 0; |
| 533 | } | 533 | } |
diff --git a/include/net/sock.h b/include/net/sock.h index 52fe0bc5598a..7f2ab72f321a 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -987,7 +987,6 @@ struct proto { | |||
| 987 | struct sk_buff *skb); | 987 | struct sk_buff *skb); |
| 988 | 988 | ||
| 989 | void (*release_cb)(struct sock *sk); | 989 | void (*release_cb)(struct sock *sk); |
| 990 | void (*mtu_reduced)(struct sock *sk); | ||
| 991 | 990 | ||
| 992 | /* Keeping track of sk's, looking them up, and port selection methods. */ | 991 | /* Keeping track of sk's, looking them up, and port selection methods. */ |
| 993 | void (*hash)(struct sock *sk); | 992 | void (*hash)(struct sock *sk); |
| @@ -2199,9 +2198,11 @@ static inline void sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk, | |||
| 2199 | /** | 2198 | /** |
| 2200 | * sock_tx_timestamp - checks whether the outgoing packet is to be time stamped | 2199 | * sock_tx_timestamp - checks whether the outgoing packet is to be time stamped |
| 2201 | * @sk: socket sending this packet | 2200 | * @sk: socket sending this packet |
| 2202 | * @tx_flags: filled with instructions for time stamping | 2201 | * @tx_flags: completed with instructions for time stamping |
| 2202 | * | ||
| 2203 | * Note : callers should take care of initial *tx_flags value (usually 0) | ||
| 2203 | */ | 2204 | */ |
| 2204 | void sock_tx_timestamp(struct sock *sk, __u8 *tx_flags); | 2205 | void sock_tx_timestamp(const struct sock *sk, __u8 *tx_flags); |
| 2205 | 2206 | ||
| 2206 | /** | 2207 | /** |
| 2207 | * sk_eat_skb - Release a skb if it is no longer needed | 2208 | * sk_eat_skb - Release a skb if it is no longer needed |
diff --git a/include/net/tcp.h b/include/net/tcp.h index dafa1cbc149b..590e01a476ac 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -417,7 +417,7 @@ void tcp_update_metrics(struct sock *sk); | |||
| 417 | void tcp_init_metrics(struct sock *sk); | 417 | void tcp_init_metrics(struct sock *sk); |
| 418 | void tcp_metrics_init(void); | 418 | void tcp_metrics_init(void); |
| 419 | bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst, | 419 | bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst, |
| 420 | bool paws_check); | 420 | bool paws_check, bool timestamps); |
| 421 | bool tcp_remember_stamp(struct sock *sk); | 421 | bool tcp_remember_stamp(struct sock *sk); |
| 422 | bool tcp_tw_remember_stamp(struct inet_timewait_sock *tw); | 422 | bool tcp_tw_remember_stamp(struct inet_timewait_sock *tw); |
| 423 | void tcp_fetch_timewait_stamp(struct sock *sk, struct dst_entry *dst); | 423 | void tcp_fetch_timewait_stamp(struct sock *sk, struct dst_entry *dst); |
| @@ -448,6 +448,7 @@ const u8 *tcp_parse_md5sig_option(const struct tcphdr *th); | |||
| 448 | */ | 448 | */ |
| 449 | 449 | ||
| 450 | void tcp_v4_send_check(struct sock *sk, struct sk_buff *skb); | 450 | void tcp_v4_send_check(struct sock *sk, struct sk_buff *skb); |
| 451 | void tcp_v4_mtu_reduced(struct sock *sk); | ||
| 451 | int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb); | 452 | int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb); |
| 452 | struct sock *tcp_create_openreq_child(struct sock *sk, | 453 | struct sock *tcp_create_openreq_child(struct sock *sk, |
| 453 | struct request_sock *req, | 454 | struct request_sock *req, |
| @@ -705,8 +706,10 @@ struct tcp_skb_cb { | |||
| 705 | #define TCPCB_SACKED_RETRANS 0x02 /* SKB retransmitted */ | 706 | #define TCPCB_SACKED_RETRANS 0x02 /* SKB retransmitted */ |
| 706 | #define TCPCB_LOST 0x04 /* SKB is lost */ | 707 | #define TCPCB_LOST 0x04 /* SKB is lost */ |
| 707 | #define TCPCB_TAGBITS 0x07 /* All tag bits */ | 708 | #define TCPCB_TAGBITS 0x07 /* All tag bits */ |
| 709 | #define TCPCB_REPAIRED 0x10 /* SKB repaired (no skb_mstamp) */ | ||
| 708 | #define TCPCB_EVER_RETRANS 0x80 /* Ever retransmitted frame */ | 710 | #define TCPCB_EVER_RETRANS 0x80 /* Ever retransmitted frame */ |
| 709 | #define TCPCB_RETRANS (TCPCB_SACKED_RETRANS|TCPCB_EVER_RETRANS) | 711 | #define TCPCB_RETRANS (TCPCB_SACKED_RETRANS|TCPCB_EVER_RETRANS| \ |
| 712 | TCPCB_REPAIRED) | ||
| 710 | 713 | ||
| 711 | __u8 ip_dsfield; /* IPv4 tos or IPv6 dsfield */ | 714 | __u8 ip_dsfield; /* IPv4 tos or IPv6 dsfield */ |
| 712 | /* 1 byte hole */ | 715 | /* 1 byte hole */ |
diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h index 3d81b90cc315..9bb99e983f58 100644 --- a/include/rdma/ib_mad.h +++ b/include/rdma/ib_mad.h | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | #include <linux/list.h> | 40 | #include <linux/list.h> |
| 41 | 41 | ||
| 42 | #include <rdma/ib_verbs.h> | 42 | #include <rdma/ib_verbs.h> |
| 43 | #include <uapi/rdma/ib_user_mad.h> | ||
| 43 | 44 | ||
| 44 | /* Management base version */ | 45 | /* Management base version */ |
| 45 | #define IB_MGMT_BASE_VERSION 1 | 46 | #define IB_MGMT_BASE_VERSION 1 |
| @@ -355,9 +356,13 @@ typedef void (*ib_mad_recv_handler)(struct ib_mad_agent *mad_agent, | |||
| 355 | * @hi_tid: Access layer assigned transaction ID for this client. | 356 | * @hi_tid: Access layer assigned transaction ID for this client. |
| 356 | * Unsolicited MADs sent by this client will have the upper 32-bits | 357 | * Unsolicited MADs sent by this client will have the upper 32-bits |
| 357 | * of their TID set to this value. | 358 | * of their TID set to this value. |
| 359 | * @flags: registration flags | ||
| 358 | * @port_num: Port number on which QP is registered | 360 | * @port_num: Port number on which QP is registered |
| 359 | * @rmpp_version: If set, indicates the RMPP version used by this agent. | 361 | * @rmpp_version: If set, indicates the RMPP version used by this agent. |
| 360 | */ | 362 | */ |
| 363 | enum { | ||
| 364 | IB_MAD_USER_RMPP = IB_USER_MAD_USER_RMPP, | ||
| 365 | }; | ||
| 361 | struct ib_mad_agent { | 366 | struct ib_mad_agent { |
| 362 | struct ib_device *device; | 367 | struct ib_device *device; |
| 363 | struct ib_qp *qp; | 368 | struct ib_qp *qp; |
| @@ -367,6 +372,7 @@ struct ib_mad_agent { | |||
| 367 | ib_mad_snoop_handler snoop_handler; | 372 | ib_mad_snoop_handler snoop_handler; |
| 368 | void *context; | 373 | void *context; |
| 369 | u32 hi_tid; | 374 | u32 hi_tid; |
| 375 | u32 flags; | ||
| 370 | u8 port_num; | 376 | u8 port_num; |
| 371 | u8 rmpp_version; | 377 | u8 rmpp_version; |
| 372 | }; | 378 | }; |
| @@ -426,6 +432,7 @@ struct ib_mad_recv_wc { | |||
| 426 | * in the range from 0x30 to 0x4f. Otherwise not used. | 432 | * in the range from 0x30 to 0x4f. Otherwise not used. |
| 427 | * @method_mask: The caller will receive unsolicited MADs for any method | 433 | * @method_mask: The caller will receive unsolicited MADs for any method |
| 428 | * where @method_mask = 1. | 434 | * where @method_mask = 1. |
| 435 | * | ||
| 429 | */ | 436 | */ |
| 430 | struct ib_mad_reg_req { | 437 | struct ib_mad_reg_req { |
| 431 | u8 mgmt_class; | 438 | u8 mgmt_class; |
| @@ -451,6 +458,7 @@ struct ib_mad_reg_req { | |||
| 451 | * @recv_handler: The completion callback routine invoked for a received | 458 | * @recv_handler: The completion callback routine invoked for a received |
| 452 | * MAD. | 459 | * MAD. |
| 453 | * @context: User specified context associated with the registration. | 460 | * @context: User specified context associated with the registration. |
| 461 | * @registration_flags: Registration flags to set for this agent | ||
| 454 | */ | 462 | */ |
| 455 | struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device, | 463 | struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device, |
| 456 | u8 port_num, | 464 | u8 port_num, |
| @@ -459,7 +467,8 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device, | |||
| 459 | u8 rmpp_version, | 467 | u8 rmpp_version, |
| 460 | ib_mad_send_handler send_handler, | 468 | ib_mad_send_handler send_handler, |
| 461 | ib_mad_recv_handler recv_handler, | 469 | ib_mad_recv_handler recv_handler, |
| 462 | void *context); | 470 | void *context, |
| 471 | u32 registration_flags); | ||
| 463 | 472 | ||
| 464 | enum ib_mad_snoop_flags { | 473 | enum ib_mad_snoop_flags { |
| 465 | /*IB_MAD_SNOOP_POSTED_SENDS = 1,*/ | 474 | /*IB_MAD_SNOOP_POSTED_SENDS = 1,*/ |
| @@ -661,4 +670,11 @@ void *ib_get_rmpp_segment(struct ib_mad_send_buf *send_buf, int seg_num); | |||
| 661 | */ | 670 | */ |
| 662 | void ib_free_send_mad(struct ib_mad_send_buf *send_buf); | 671 | void ib_free_send_mad(struct ib_mad_send_buf *send_buf); |
| 663 | 672 | ||
| 673 | /** | ||
| 674 | * ib_mad_kernel_rmpp_agent - Returns if the agent is performing RMPP. | ||
| 675 | * @agent: the agent in question | ||
| 676 | * @return: true if agent is performing rmpp, false otherwise. | ||
| 677 | */ | ||
| 678 | int ib_mad_kernel_rmpp_agent(struct ib_mad_agent *agent); | ||
| 679 | |||
| 664 | #endif /* IB_MAD_H */ | 680 | #endif /* IB_MAD_H */ |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 7ccef342f724..ed44cc07a7b3 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
| @@ -1097,7 +1097,8 @@ struct ib_mr_attr { | |||
| 1097 | enum ib_mr_rereg_flags { | 1097 | enum ib_mr_rereg_flags { |
| 1098 | IB_MR_REREG_TRANS = 1, | 1098 | IB_MR_REREG_TRANS = 1, |
| 1099 | IB_MR_REREG_PD = (1<<1), | 1099 | IB_MR_REREG_PD = (1<<1), |
| 1100 | IB_MR_REREG_ACCESS = (1<<2) | 1100 | IB_MR_REREG_ACCESS = (1<<2), |
| 1101 | IB_MR_REREG_SUPPORTED = ((IB_MR_REREG_ACCESS << 1) - 1) | ||
| 1101 | }; | 1102 | }; |
| 1102 | 1103 | ||
| 1103 | /** | 1104 | /** |
| @@ -1547,6 +1548,13 @@ struct ib_device { | |||
| 1547 | u64 virt_addr, | 1548 | u64 virt_addr, |
| 1548 | int mr_access_flags, | 1549 | int mr_access_flags, |
| 1549 | struct ib_udata *udata); | 1550 | struct ib_udata *udata); |
| 1551 | int (*rereg_user_mr)(struct ib_mr *mr, | ||
| 1552 | int flags, | ||
| 1553 | u64 start, u64 length, | ||
| 1554 | u64 virt_addr, | ||
| 1555 | int mr_access_flags, | ||
| 1556 | struct ib_pd *pd, | ||
| 1557 | struct ib_udata *udata); | ||
| 1550 | int (*query_mr)(struct ib_mr *mr, | 1558 | int (*query_mr)(struct ib_mr *mr, |
| 1551 | struct ib_mr_attr *mr_attr); | 1559 | struct ib_mr_attr *mr_attr); |
| 1552 | int (*dereg_mr)(struct ib_mr *mr); | 1560 | int (*dereg_mr)(struct ib_mr *mr); |
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index fd0421c6d40a..95ed9424a11a 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
| @@ -527,6 +527,7 @@ enum iscsi_err { | |||
| 527 | ISCSI_ERR_XMIT_FAILED = ISCSI_ERR_BASE + 19, | 527 | ISCSI_ERR_XMIT_FAILED = ISCSI_ERR_BASE + 19, |
| 528 | ISCSI_ERR_TCP_CONN_CLOSE = ISCSI_ERR_BASE + 20, | 528 | ISCSI_ERR_TCP_CONN_CLOSE = ISCSI_ERR_BASE + 20, |
| 529 | ISCSI_ERR_SCSI_EH_SESSION_RST = ISCSI_ERR_BASE + 21, | 529 | ISCSI_ERR_SCSI_EH_SESSION_RST = ISCSI_ERR_BASE + 21, |
| 530 | ISCSI_ERR_NOP_TIMEDOUT = ISCSI_ERR_BASE + 22, | ||
| 530 | }; | 531 | }; |
| 531 | 532 | ||
| 532 | /* | 533 | /* |
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index e6df23cae7be..261e708010da 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
| @@ -31,7 +31,7 @@ enum scsi_timeouts { | |||
| 31 | * Like SCSI_MAX_SG_SEGMENTS, but for archs that have sg chaining. This limit | 31 | * Like SCSI_MAX_SG_SEGMENTS, but for archs that have sg chaining. This limit |
| 32 | * is totally arbitrary, a setting of 2048 will get you at least 8mb ios. | 32 | * is totally arbitrary, a setting of 2048 will get you at least 8mb ios. |
| 33 | */ | 33 | */ |
| 34 | #ifdef ARCH_HAS_SG_CHAIN | 34 | #ifdef CONFIG_ARCH_HAS_SG_CHAIN |
| 35 | #define SCSI_MAX_SG_CHAIN_SEGMENTS 2048 | 35 | #define SCSI_MAX_SG_CHAIN_SEGMENTS 2048 |
| 36 | #else | 36 | #else |
| 37 | #define SCSI_MAX_SG_CHAIN_SEGMENTS SCSI_MAX_SG_SEGMENTS | 37 | #define SCSI_MAX_SG_CHAIN_SEGMENTS SCSI_MAX_SG_SEGMENTS |
diff --git a/include/scsi/sg.h b/include/scsi/sg.h index 9859355a7cf9..750e5db7c6bf 100644 --- a/include/scsi/sg.h +++ b/include/scsi/sg.h | |||
| @@ -86,7 +86,9 @@ typedef struct sg_io_hdr | |||
| 86 | #define SG_FLAG_MMAP_IO 4 /* request memory mapped IO */ | 86 | #define SG_FLAG_MMAP_IO 4 /* request memory mapped IO */ |
| 87 | #define SG_FLAG_NO_DXFER 0x10000 /* no transfer of kernel buffers to/from */ | 87 | #define SG_FLAG_NO_DXFER 0x10000 /* no transfer of kernel buffers to/from */ |
| 88 | /* user space (debug indirect IO) */ | 88 | /* user space (debug indirect IO) */ |
| 89 | #define SG_FLAG_Q_AT_TAIL 0x10 /* default is Q_AT_HEAD */ | 89 | /* defaults:: for sg driver: Q_AT_HEAD; for block layer: Q_AT_TAIL */ |
| 90 | #define SG_FLAG_Q_AT_TAIL 0x10 | ||
| 91 | #define SG_FLAG_Q_AT_HEAD 0x20 | ||
| 90 | 92 | ||
| 91 | /* following 'info' values are "or"-ed together */ | 93 | /* following 'info' values are "or"-ed together */ |
| 92 | #define SG_INFO_OK_MASK 0x1 | 94 | #define SG_INFO_OK_MASK 0x1 |
diff --git a/include/linux/tegra-ahb.h b/include/soc/tegra/ahb.h index f1cd075ceee1..504eb6f957e5 100644 --- a/include/linux/tegra-ahb.h +++ b/include/soc/tegra/ahb.h | |||
| @@ -11,9 +11,9 @@ | |||
| 11 | * more details. | 11 | * more details. |
| 12 | */ | 12 | */ |
| 13 | 13 | ||
| 14 | #ifndef __LINUX_AHB_H__ | 14 | #ifndef __SOC_TEGRA_AHB_H__ |
| 15 | #define __LINUX_AHB_H__ | 15 | #define __SOC_TEGRA_AHB_H__ |
| 16 | 16 | ||
| 17 | extern int tegra_ahb_enable_smmu(struct device_node *ahb); | 17 | extern int tegra_ahb_enable_smmu(struct device_node *ahb); |
| 18 | 18 | ||
| 19 | #endif /* __LINUX_AHB_H__ */ | 19 | #endif /* __SOC_TEGRA_AHB_H__ */ |
diff --git a/include/soc/tegra/common.h b/include/soc/tegra/common.h new file mode 100644 index 000000000000..fc13a9a134e9 --- /dev/null +++ b/include/soc/tegra/common.h | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2014 NVIDIA Corporation | ||
| 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 | |||
| 9 | #ifndef __SOC_TEGRA_COMMON_H__ | ||
| 10 | #define __SOC_TEGRA_COMMON_H__ | ||
| 11 | |||
| 12 | bool soc_is_tegra(void); | ||
| 13 | |||
| 14 | #endif /* __SOC_TEGRA_COMMON_H__ */ | ||
diff --git a/include/linux/tegra-cpuidle.h b/include/soc/tegra/cpuidle.h index 9c6286bbf662..ea04f4225638 100644 --- a/include/linux/tegra-cpuidle.h +++ b/include/soc/tegra/cpuidle.h | |||
| @@ -11,8 +11,8 @@ | |||
| 11 | * more details. | 11 | * more details. |
| 12 | */ | 12 | */ |
| 13 | 13 | ||
| 14 | #ifndef __LINUX_TEGRA_CPUIDLE_H__ | 14 | #ifndef __SOC_TEGRA_CPUIDLE_H__ |
| 15 | #define __LINUX_TEGRA_CPUIDLE_H__ | 15 | #define __SOC_TEGRA_CPUIDLE_H__ |
| 16 | 16 | ||
| 17 | #ifdef CONFIG_CPU_IDLE | 17 | #ifdef CONFIG_CPU_IDLE |
| 18 | void tegra_cpuidle_pcie_irqs_in_use(void); | 18 | void tegra_cpuidle_pcie_irqs_in_use(void); |
| @@ -22,4 +22,4 @@ static inline void tegra_cpuidle_pcie_irqs_in_use(void) | |||
| 22 | } | 22 | } |
| 23 | #endif | 23 | #endif |
| 24 | 24 | ||
| 25 | #endif | 25 | #endif /* __SOC_TEGRA_CPUIDLE_H__ */ |
diff --git a/include/soc/tegra/fuse.h b/include/soc/tegra/fuse.h new file mode 100644 index 000000000000..8e1249474e84 --- /dev/null +++ b/include/soc/tegra/fuse.h | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms and conditions of the GNU General Public License, | ||
| 6 | * version 2, as published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 11 | * more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef __SOC_TEGRA_FUSE_H__ | ||
| 18 | #define __SOC_TEGRA_FUSE_H__ | ||
| 19 | |||
| 20 | #define TEGRA20 0x20 | ||
| 21 | #define TEGRA30 0x30 | ||
| 22 | #define TEGRA114 0x35 | ||
| 23 | #define TEGRA124 0x40 | ||
| 24 | |||
| 25 | #define TEGRA_FUSE_SKU_CALIB_0 0xf0 | ||
| 26 | #define TEGRA30_FUSE_SATA_CALIB 0x124 | ||
| 27 | |||
| 28 | #ifndef __ASSEMBLY__ | ||
| 29 | |||
| 30 | u32 tegra_read_chipid(void); | ||
| 31 | u8 tegra_get_chip_id(void); | ||
| 32 | |||
| 33 | enum tegra_revision { | ||
| 34 | TEGRA_REVISION_UNKNOWN = 0, | ||
| 35 | TEGRA_REVISION_A01, | ||
| 36 | TEGRA_REVISION_A02, | ||
| 37 | TEGRA_REVISION_A03, | ||
| 38 | TEGRA_REVISION_A03p, | ||
| 39 | TEGRA_REVISION_A04, | ||
| 40 | TEGRA_REVISION_MAX, | ||
| 41 | }; | ||
| 42 | |||
| 43 | struct tegra_sku_info { | ||
| 44 | int sku_id; | ||
| 45 | int cpu_process_id; | ||
| 46 | int cpu_speedo_id; | ||
| 47 | int cpu_speedo_value; | ||
| 48 | int cpu_iddq_value; | ||
| 49 | int core_process_id; | ||
| 50 | int soc_speedo_id; | ||
| 51 | int gpu_speedo_id; | ||
| 52 | int gpu_process_id; | ||
| 53 | int gpu_speedo_value; | ||
| 54 | enum tegra_revision revision; | ||
| 55 | }; | ||
| 56 | |||
| 57 | u32 tegra_read_straps(void); | ||
| 58 | u32 tegra_read_chipid(void); | ||
| 59 | int tegra_fuse_readl(unsigned long offset, u32 *value); | ||
| 60 | |||
| 61 | extern struct tegra_sku_info tegra_sku_info; | ||
| 62 | |||
| 63 | #endif /* __ASSEMBLY__ */ | ||
| 64 | |||
| 65 | #endif /* __SOC_TEGRA_FUSE_H__ */ | ||
diff --git a/include/soc/tegra/pm.h b/include/soc/tegra/pm.h new file mode 100644 index 000000000000..30fe2078a547 --- /dev/null +++ b/include/soc/tegra/pm.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2014 NVIDIA Corporation | ||
| 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 | |||
| 9 | #ifndef __SOC_TEGRA_PM_H__ | ||
| 10 | #define __SOC_TEGRA_PM_H__ | ||
| 11 | |||
| 12 | enum tegra_suspend_mode { | ||
| 13 | TEGRA_SUSPEND_NONE = 0, | ||
| 14 | TEGRA_SUSPEND_LP2, /* CPU voltage off */ | ||
| 15 | TEGRA_SUSPEND_LP1, /* CPU voltage off, DRAM self-refresh */ | ||
| 16 | TEGRA_SUSPEND_LP0, /* CPU + core voltage off, DRAM self-refresh */ | ||
| 17 | TEGRA_MAX_SUSPEND_MODE, | ||
| 18 | }; | ||
| 19 | |||
| 20 | #ifdef CONFIG_PM_SLEEP | ||
| 21 | enum tegra_suspend_mode | ||
| 22 | tegra_pm_validate_suspend_mode(enum tegra_suspend_mode mode); | ||
| 23 | |||
| 24 | /* low-level resume entry point */ | ||
| 25 | void tegra_resume(void); | ||
| 26 | #else | ||
| 27 | static inline enum tegra_suspend_mode | ||
| 28 | tegra_pm_validate_suspend_mode(enum tegra_suspend_mode mode) | ||
| 29 | { | ||
| 30 | return TEGRA_SUSPEND_NONE; | ||
| 31 | } | ||
| 32 | |||
| 33 | static inline void tegra_resume(void) | ||
| 34 | { | ||
| 35 | } | ||
| 36 | #endif /* CONFIG_PM_SLEEP */ | ||
| 37 | |||
| 38 | #endif /* __SOC_TEGRA_PM_H__ */ | ||
diff --git a/include/linux/tegra-powergate.h b/include/soc/tegra/pmc.h index 46f0a07812b4..65a93273e72f 100644 --- a/include/linux/tegra-powergate.h +++ b/include/soc/tegra/pmc.h | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010 Google, Inc | 2 | * Copyright (c) 2010 Google, Inc |
| 3 | * Copyright (c) 2014 NVIDIA Corporation | ||
| 3 | * | 4 | * |
| 4 | * Author: | 5 | * Author: |
| 5 | * Colin Cross <ccross@google.com> | 6 | * Colin Cross <ccross@google.com> |
| @@ -15,12 +16,34 @@ | |||
| 15 | * | 16 | * |
| 16 | */ | 17 | */ |
| 17 | 18 | ||
| 18 | #ifndef _MACH_TEGRA_POWERGATE_H_ | 19 | #ifndef __SOC_TEGRA_PMC_H__ |
| 19 | #define _MACH_TEGRA_POWERGATE_H_ | 20 | #define __SOC_TEGRA_PMC_H__ |
| 21 | |||
| 22 | #include <linux/reboot.h> | ||
| 23 | |||
| 24 | #include <soc/tegra/pm.h> | ||
| 20 | 25 | ||
| 21 | struct clk; | 26 | struct clk; |
| 22 | struct reset_control; | 27 | struct reset_control; |
| 23 | 28 | ||
| 29 | void tegra_pmc_restart(enum reboot_mode mode, const char *cmd); | ||
| 30 | |||
| 31 | #ifdef CONFIG_PM_SLEEP | ||
| 32 | enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void); | ||
| 33 | void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode); | ||
| 34 | void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode); | ||
| 35 | #endif /* CONFIG_PM_SLEEP */ | ||
| 36 | |||
| 37 | #ifdef CONFIG_SMP | ||
| 38 | bool tegra_pmc_cpu_is_powered(int cpuid); | ||
| 39 | int tegra_pmc_cpu_power_on(int cpuid); | ||
| 40 | int tegra_pmc_cpu_remove_clamping(int cpuid); | ||
| 41 | #endif /* CONFIG_SMP */ | ||
| 42 | |||
| 43 | /* | ||
| 44 | * powergate and I/O rail APIs | ||
| 45 | */ | ||
| 46 | |||
| 24 | #define TEGRA_POWERGATE_CPU 0 | 47 | #define TEGRA_POWERGATE_CPU 0 |
| 25 | #define TEGRA_POWERGATE_3D 1 | 48 | #define TEGRA_POWERGATE_3D 1 |
| 26 | #define TEGRA_POWERGATE_VENC 2 | 49 | #define TEGRA_POWERGATE_VENC 2 |
| @@ -129,6 +152,6 @@ static inline int tegra_io_rail_power_off(int id) | |||
| 129 | { | 152 | { |
| 130 | return -ENOSYS; | 153 | return -ENOSYS; |
| 131 | } | 154 | } |
| 132 | #endif | 155 | #endif /* CONFIG_ARCH_TEGRA */ |
| 133 | 156 | ||
| 134 | #endif /* _MACH_TEGRA_POWERGATE_H_ */ | 157 | #endif /* __SOC_TEGRA_PMC_H__ */ |
diff --git a/include/trace/events/bcache.h b/include/trace/events/bcache.h index c9c3c044b32f..981acf74b14f 100644 --- a/include/trace/events/bcache.h +++ b/include/trace/events/bcache.h | |||
| @@ -148,11 +148,13 @@ TRACE_EVENT(bcache_read, | |||
| 148 | ); | 148 | ); |
| 149 | 149 | ||
| 150 | TRACE_EVENT(bcache_write, | 150 | TRACE_EVENT(bcache_write, |
| 151 | TP_PROTO(struct bio *bio, bool writeback, bool bypass), | 151 | TP_PROTO(struct cache_set *c, u64 inode, struct bio *bio, |
| 152 | TP_ARGS(bio, writeback, bypass), | 152 | bool writeback, bool bypass), |
| 153 | TP_ARGS(c, inode, bio, writeback, bypass), | ||
| 153 | 154 | ||
| 154 | TP_STRUCT__entry( | 155 | TP_STRUCT__entry( |
| 155 | __field(dev_t, dev ) | 156 | __array(char, uuid, 16 ) |
| 157 | __field(u64, inode ) | ||
| 156 | __field(sector_t, sector ) | 158 | __field(sector_t, sector ) |
| 157 | __field(unsigned int, nr_sector ) | 159 | __field(unsigned int, nr_sector ) |
| 158 | __array(char, rwbs, 6 ) | 160 | __array(char, rwbs, 6 ) |
| @@ -161,7 +163,8 @@ TRACE_EVENT(bcache_write, | |||
| 161 | ), | 163 | ), |
| 162 | 164 | ||
| 163 | TP_fast_assign( | 165 | TP_fast_assign( |
| 164 | __entry->dev = bio->bi_bdev->bd_dev; | 166 | memcpy(__entry->uuid, c->sb.set_uuid, 16); |
| 167 | __entry->inode = inode; | ||
| 165 | __entry->sector = bio->bi_iter.bi_sector; | 168 | __entry->sector = bio->bi_iter.bi_sector; |
| 166 | __entry->nr_sector = bio->bi_iter.bi_size >> 9; | 169 | __entry->nr_sector = bio->bi_iter.bi_size >> 9; |
| 167 | blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_iter.bi_size); | 170 | blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_iter.bi_size); |
| @@ -169,8 +172,8 @@ TRACE_EVENT(bcache_write, | |||
| 169 | __entry->bypass = bypass; | 172 | __entry->bypass = bypass; |
| 170 | ), | 173 | ), |
| 171 | 174 | ||
| 172 | TP_printk("%d,%d %s %llu + %u hit %u bypass %u", | 175 | TP_printk("%pU inode %llu %s %llu + %u hit %u bypass %u", |
| 173 | MAJOR(__entry->dev), MINOR(__entry->dev), | 176 | __entry->uuid, __entry->inode, |
| 174 | __entry->rwbs, (unsigned long long)__entry->sector, | 177 | __entry->rwbs, (unsigned long long)__entry->sector, |
| 175 | __entry->nr_sector, __entry->writeback, __entry->bypass) | 178 | __entry->nr_sector, __entry->writeback, __entry->bypass) |
| 176 | ); | 179 | ); |
| @@ -258,9 +261,9 @@ DEFINE_EVENT(btree_node, bcache_btree_node_alloc, | |||
| 258 | TP_ARGS(b) | 261 | TP_ARGS(b) |
| 259 | ); | 262 | ); |
| 260 | 263 | ||
| 261 | DEFINE_EVENT(btree_node, bcache_btree_node_alloc_fail, | 264 | DEFINE_EVENT(cache_set, bcache_btree_node_alloc_fail, |
| 262 | TP_PROTO(struct btree *b), | 265 | TP_PROTO(struct cache_set *c), |
| 263 | TP_ARGS(b) | 266 | TP_ARGS(c) |
| 264 | ); | 267 | ); |
| 265 | 268 | ||
| 266 | DEFINE_EVENT(btree_node, bcache_btree_node_free, | 269 | DEFINE_EVENT(btree_node, bcache_btree_node_free, |
diff --git a/include/trace/events/ipi.h b/include/trace/events/ipi.h new file mode 100644 index 000000000000..834a7362a610 --- /dev/null +++ b/include/trace/events/ipi.h | |||
| @@ -0,0 +1,89 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM ipi | ||
| 3 | |||
| 4 | #if !defined(_TRACE_IPI_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_IPI_H | ||
| 6 | |||
| 7 | #include <linux/tracepoint.h> | ||
| 8 | |||
| 9 | /** | ||
| 10 | * ipi_raise - called when a smp cross call is made | ||
| 11 | * | ||
| 12 | * @mask: mask of recipient CPUs for the IPI | ||
| 13 | * @reason: string identifying the IPI purpose | ||
| 14 | * | ||
| 15 | * It is necessary for @reason to be a static string declared with | ||
| 16 | * __tracepoint_string. | ||
| 17 | */ | ||
| 18 | TRACE_EVENT(ipi_raise, | ||
| 19 | |||
| 20 | TP_PROTO(const struct cpumask *mask, const char *reason), | ||
| 21 | |||
| 22 | TP_ARGS(mask, reason), | ||
| 23 | |||
| 24 | TP_STRUCT__entry( | ||
| 25 | __bitmask(target_cpus, nr_cpumask_bits) | ||
| 26 | __field(const char *, reason) | ||
| 27 | ), | ||
| 28 | |||
| 29 | TP_fast_assign( | ||
| 30 | __assign_bitmask(target_cpus, cpumask_bits(mask), nr_cpumask_bits); | ||
| 31 | __entry->reason = reason; | ||
| 32 | ), | ||
| 33 | |||
| 34 | TP_printk("target_mask=%s (%s)", __get_bitmask(target_cpus), __entry->reason) | ||
| 35 | ); | ||
| 36 | |||
| 37 | DECLARE_EVENT_CLASS(ipi_handler, | ||
| 38 | |||
| 39 | TP_PROTO(const char *reason), | ||
| 40 | |||
| 41 | TP_ARGS(reason), | ||
| 42 | |||
| 43 | TP_STRUCT__entry( | ||
| 44 | __field(const char *, reason) | ||
| 45 | ), | ||
| 46 | |||
| 47 | TP_fast_assign( | ||
| 48 | __entry->reason = reason; | ||
| 49 | ), | ||
| 50 | |||
| 51 | TP_printk("(%s)", __entry->reason) | ||
| 52 | ); | ||
| 53 | |||
| 54 | /** | ||
| 55 | * ipi_entry - called immediately before the IPI handler | ||
| 56 | * | ||
| 57 | * @reason: string identifying the IPI purpose | ||
| 58 | * | ||
| 59 | * It is necessary for @reason to be a static string declared with | ||
| 60 | * __tracepoint_string, ideally the same as used with trace_ipi_raise | ||
| 61 | * for that IPI. | ||
| 62 | */ | ||
| 63 | DEFINE_EVENT(ipi_handler, ipi_entry, | ||
| 64 | |||
| 65 | TP_PROTO(const char *reason), | ||
| 66 | |||
| 67 | TP_ARGS(reason) | ||
| 68 | ); | ||
| 69 | |||
| 70 | /** | ||
| 71 | * ipi_exit - called immediately after the IPI handler returns | ||
| 72 | * | ||
| 73 | * @reason: string identifying the IPI purpose | ||
| 74 | * | ||
| 75 | * It is necessary for @reason to be a static string declared with | ||
| 76 | * __tracepoint_string, ideally the same as used with trace_ipi_raise for | ||
| 77 | * that IPI. | ||
| 78 | */ | ||
| 79 | DEFINE_EVENT(ipi_handler, ipi_exit, | ||
| 80 | |||
| 81 | TP_PROTO(const char *reason), | ||
| 82 | |||
| 83 | TP_ARGS(reason) | ||
| 84 | ); | ||
| 85 | |||
| 86 | #endif /* _TRACE_IPI_H */ | ||
| 87 | |||
| 88 | /* This part must be outside protection */ | ||
| 89 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h index 131a0bda7aec..908925ace776 100644 --- a/include/trace/events/kvm.h +++ b/include/trace/events/kvm.h | |||
| @@ -37,7 +37,7 @@ TRACE_EVENT(kvm_userspace_exit, | |||
| 37 | __entry->errno < 0 ? -__entry->errno : __entry->reason) | 37 | __entry->errno < 0 ? -__entry->errno : __entry->reason) |
| 38 | ); | 38 | ); |
| 39 | 39 | ||
| 40 | #if defined(CONFIG_HAVE_KVM_IRQCHIP) | 40 | #if defined(CONFIG_HAVE_KVM_IRQFD) |
| 41 | TRACE_EVENT(kvm_set_irq, | 41 | TRACE_EVENT(kvm_set_irq, |
| 42 | TP_PROTO(unsigned int gsi, int level, int irq_source_id), | 42 | TP_PROTO(unsigned int gsi, int level, int irq_source_id), |
| 43 | TP_ARGS(gsi, level, irq_source_id), | 43 | TP_ARGS(gsi, level, irq_source_id), |
| @@ -57,7 +57,7 @@ TRACE_EVENT(kvm_set_irq, | |||
| 57 | TP_printk("gsi %u level %d source %d", | 57 | TP_printk("gsi %u level %d source %d", |
| 58 | __entry->gsi, __entry->level, __entry->irq_source_id) | 58 | __entry->gsi, __entry->level, __entry->irq_source_id) |
| 59 | ); | 59 | ); |
| 60 | #endif | 60 | #endif /* defined(CONFIG_HAVE_KVM_IRQFD) */ |
| 61 | 61 | ||
| 62 | #if defined(__KVM_HAVE_IOAPIC) | 62 | #if defined(__KVM_HAVE_IOAPIC) |
| 63 | #define kvm_deliver_mode \ | 63 | #define kvm_deliver_mode \ |
| @@ -124,7 +124,7 @@ TRACE_EVENT(kvm_msi_set_irq, | |||
| 124 | 124 | ||
| 125 | #endif /* defined(__KVM_HAVE_IOAPIC) */ | 125 | #endif /* defined(__KVM_HAVE_IOAPIC) */ |
| 126 | 126 | ||
| 127 | #if defined(CONFIG_HAVE_KVM_IRQCHIP) | 127 | #if defined(CONFIG_HAVE_KVM_IRQFD) |
| 128 | 128 | ||
| 129 | TRACE_EVENT(kvm_ack_irq, | 129 | TRACE_EVENT(kvm_ack_irq, |
| 130 | TP_PROTO(unsigned int irqchip, unsigned int pin), | 130 | TP_PROTO(unsigned int irqchip, unsigned int pin), |
| @@ -149,7 +149,7 @@ TRACE_EVENT(kvm_ack_irq, | |||
| 149 | #endif | 149 | #endif |
| 150 | ); | 150 | ); |
| 151 | 151 | ||
| 152 | #endif /* defined(CONFIG_HAVE_KVM_IRQCHIP) */ | 152 | #endif /* defined(CONFIG_HAVE_KVM_IRQFD) */ |
| 153 | 153 | ||
| 154 | 154 | ||
| 155 | 155 | ||
diff --git a/include/trace/events/migrate.h b/include/trace/events/migrate.h index 4e4f2f8b1ac2..dd2b5467d905 100644 --- a/include/trace/events/migrate.h +++ b/include/trace/events/migrate.h | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | {MR_MEMORY_HOTPLUG, "memory_hotplug"}, \ | 17 | {MR_MEMORY_HOTPLUG, "memory_hotplug"}, \ |
| 18 | {MR_SYSCALL, "syscall_or_cpuset"}, \ | 18 | {MR_SYSCALL, "syscall_or_cpuset"}, \ |
| 19 | {MR_MEMPOLICY_MBIND, "mempolicy_mbind"}, \ | 19 | {MR_MEMPOLICY_MBIND, "mempolicy_mbind"}, \ |
| 20 | {MR_NUMA_MISPLACED, "numa_misplaced"}, \ | ||
| 20 | {MR_CMA, "cma"} | 21 | {MR_CMA, "cma"} |
| 21 | 22 | ||
| 22 | TRACE_EVENT(mm_migrate_pages, | 23 | TRACE_EVENT(mm_migrate_pages, |
diff --git a/include/trace/events/pagemap.h b/include/trace/events/pagemap.h index 1c9fabde69e4..ce0803b8d05f 100644 --- a/include/trace/events/pagemap.h +++ b/include/trace/events/pagemap.h | |||
| @@ -28,12 +28,10 @@ TRACE_EVENT(mm_lru_insertion, | |||
| 28 | 28 | ||
| 29 | TP_PROTO( | 29 | TP_PROTO( |
| 30 | struct page *page, | 30 | struct page *page, |
| 31 | unsigned long pfn, | 31 | int lru |
| 32 | int lru, | ||
| 33 | unsigned long flags | ||
| 34 | ), | 32 | ), |
| 35 | 33 | ||
| 36 | TP_ARGS(page, pfn, lru, flags), | 34 | TP_ARGS(page, lru), |
| 37 | 35 | ||
| 38 | TP_STRUCT__entry( | 36 | TP_STRUCT__entry( |
| 39 | __field(struct page *, page ) | 37 | __field(struct page *, page ) |
| @@ -44,9 +42,9 @@ TRACE_EVENT(mm_lru_insertion, | |||
| 44 | 42 | ||
| 45 | TP_fast_assign( | 43 | TP_fast_assign( |
| 46 | __entry->page = page; | 44 | __entry->page = page; |
| 47 | __entry->pfn = pfn; | 45 | __entry->pfn = page_to_pfn(page); |
| 48 | __entry->lru = lru; | 46 | __entry->lru = lru; |
| 49 | __entry->flags = flags; | 47 | __entry->flags = trace_pagemap_flags(page); |
| 50 | ), | 48 | ), |
| 51 | 49 | ||
| 52 | /* Flag format is based on page-types.c formatting for pagemap */ | 50 | /* Flag format is based on page-types.c formatting for pagemap */ |
| @@ -64,9 +62,9 @@ TRACE_EVENT(mm_lru_insertion, | |||
| 64 | 62 | ||
| 65 | TRACE_EVENT(mm_lru_activate, | 63 | TRACE_EVENT(mm_lru_activate, |
| 66 | 64 | ||
| 67 | TP_PROTO(struct page *page, unsigned long pfn), | 65 | TP_PROTO(struct page *page), |
| 68 | 66 | ||
| 69 | TP_ARGS(page, pfn), | 67 | TP_ARGS(page), |
| 70 | 68 | ||
| 71 | TP_STRUCT__entry( | 69 | TP_STRUCT__entry( |
| 72 | __field(struct page *, page ) | 70 | __field(struct page *, page ) |
| @@ -75,7 +73,7 @@ TRACE_EVENT(mm_lru_activate, | |||
| 75 | 73 | ||
| 76 | TP_fast_assign( | 74 | TP_fast_assign( |
| 77 | __entry->page = page; | 75 | __entry->page = page; |
| 78 | __entry->pfn = pfn; | 76 | __entry->pfn = page_to_pfn(page); |
| 79 | ), | 77 | ), |
| 80 | 78 | ||
| 81 | /* Flag format is based on page-types.c formatting for pagemap */ | 79 | /* Flag format is based on page-types.c formatting for pagemap */ |
diff --git a/include/trace/events/thp.h b/include/trace/events/thp.h new file mode 100644 index 000000000000..b59b065e9e5d --- /dev/null +++ b/include/trace/events/thp.h | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM thp | ||
| 3 | |||
| 4 | #if !defined(_TRACE_THP_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_THP_H | ||
| 6 | |||
| 7 | #include <linux/types.h> | ||
| 8 | #include <linux/tracepoint.h> | ||
| 9 | |||
| 10 | TRACE_EVENT(hugepage_invalidate, | ||
| 11 | |||
| 12 | TP_PROTO(unsigned long addr, unsigned long pte), | ||
| 13 | TP_ARGS(addr, pte), | ||
| 14 | TP_STRUCT__entry( | ||
| 15 | __field(unsigned long, addr) | ||
| 16 | __field(unsigned long, pte) | ||
| 17 | ), | ||
| 18 | |||
| 19 | TP_fast_assign( | ||
| 20 | __entry->addr = addr; | ||
| 21 | __entry->pte = pte; | ||
| 22 | ), | ||
| 23 | |||
| 24 | TP_printk("hugepage invalidate at addr 0x%lx and pte = 0x%lx", | ||
| 25 | __entry->addr, __entry->pte) | ||
| 26 | ); | ||
| 27 | |||
| 28 | TRACE_EVENT(hugepage_set_pmd, | ||
| 29 | |||
| 30 | TP_PROTO(unsigned long addr, unsigned long pmd), | ||
| 31 | TP_ARGS(addr, pmd), | ||
| 32 | TP_STRUCT__entry( | ||
| 33 | __field(unsigned long, addr) | ||
| 34 | __field(unsigned long, pmd) | ||
| 35 | ), | ||
| 36 | |||
| 37 | TP_fast_assign( | ||
| 38 | __entry->addr = addr; | ||
| 39 | __entry->pmd = pmd; | ||
| 40 | ), | ||
| 41 | |||
| 42 | TP_printk("Set pmd with 0x%lx with 0x%lx", __entry->addr, __entry->pmd) | ||
| 43 | ); | ||
| 44 | |||
| 45 | |||
| 46 | TRACE_EVENT(hugepage_update, | ||
| 47 | |||
| 48 | TP_PROTO(unsigned long addr, unsigned long pte, unsigned long clr, unsigned long set), | ||
| 49 | TP_ARGS(addr, pte, clr, set), | ||
| 50 | TP_STRUCT__entry( | ||
| 51 | __field(unsigned long, addr) | ||
| 52 | __field(unsigned long, pte) | ||
| 53 | __field(unsigned long, clr) | ||
| 54 | __field(unsigned long, set) | ||
| 55 | ), | ||
| 56 | |||
| 57 | TP_fast_assign( | ||
| 58 | __entry->addr = addr; | ||
| 59 | __entry->pte = pte; | ||
| 60 | __entry->clr = clr; | ||
| 61 | __entry->set = set; | ||
| 62 | |||
| 63 | ), | ||
| 64 | |||
| 65 | TP_printk("hugepage update at addr 0x%lx and pte = 0x%lx clr = 0x%lx, set = 0x%lx", __entry->addr, __entry->pte, __entry->clr, __entry->set) | ||
| 66 | ); | ||
| 67 | TRACE_EVENT(hugepage_splitting, | ||
| 68 | |||
| 69 | TP_PROTO(unsigned long addr, unsigned long pte), | ||
| 70 | TP_ARGS(addr, pte), | ||
| 71 | TP_STRUCT__entry( | ||
| 72 | __field(unsigned long, addr) | ||
| 73 | __field(unsigned long, pte) | ||
| 74 | ), | ||
| 75 | |||
| 76 | TP_fast_assign( | ||
| 77 | __entry->addr = addr; | ||
| 78 | __entry->pte = pte; | ||
| 79 | ), | ||
| 80 | |||
| 81 | TP_printk("hugepage splitting at addr 0x%lx and pte = 0x%lx", | ||
| 82 | __entry->addr, __entry->pte) | ||
| 83 | ); | ||
| 84 | |||
| 85 | #endif /* _TRACE_THP_H */ | ||
| 86 | |||
| 87 | /* This part must be outside protection */ | ||
| 88 | #include <trace/define_trace.h> | ||
diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index f1afd607f043..11d11bc5c78f 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h | |||
| @@ -703,9 +703,11 @@ __SYSCALL(__NR_renameat2, sys_renameat2) | |||
| 703 | __SYSCALL(__NR_seccomp, sys_seccomp) | 703 | __SYSCALL(__NR_seccomp, sys_seccomp) |
| 704 | #define __NR_getrandom 278 | 704 | #define __NR_getrandom 278 |
| 705 | __SYSCALL(__NR_getrandom, sys_getrandom) | 705 | __SYSCALL(__NR_getrandom, sys_getrandom) |
| 706 | #define __NR_memfd_create 279 | ||
| 707 | __SYSCALL(__NR_memfd_create, sys_memfd_create) | ||
| 706 | 708 | ||
| 707 | #undef __NR_syscalls | 709 | #undef __NR_syscalls |
| 708 | #define __NR_syscalls 279 | 710 | #define __NR_syscalls 280 |
| 709 | 711 | ||
| 710 | /* | 712 | /* |
| 711 | * All syscalls below here should go away really, | 713 | * All syscalls below here should go away really, |
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index 9abbeb924cbb..b0b855613641 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h | |||
| @@ -780,7 +780,7 @@ struct drm_prime_handle { | |||
| 780 | 780 | ||
| 781 | /** | 781 | /** |
| 782 | * Device specific ioctls should only be in their respective headers | 782 | * Device specific ioctls should only be in their respective headers |
| 783 | * The device specific ioctl range is from 0x40 to 0x99. | 783 | * The device specific ioctl range is from 0x40 to 0x9f. |
| 784 | * Generic IOCTLS restart at 0xA0. | 784 | * Generic IOCTLS restart at 0xA0. |
| 785 | * | 785 | * |
| 786 | * \sa drmCommandNone(), drmCommandRead(), drmCommandWrite(), and | 786 | * \sa drmCommandNone(), drmCommandRead(), drmCommandWrite(), and |
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index def54f9e07ca..a0db2d4aa5f0 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h | |||
| @@ -88,6 +88,11 @@ | |||
| 88 | #define DRM_MODE_SCALE_CENTER 2 /* Centered, no scaling */ | 88 | #define DRM_MODE_SCALE_CENTER 2 /* Centered, no scaling */ |
| 89 | #define DRM_MODE_SCALE_ASPECT 3 /* Full screen, preserve aspect */ | 89 | #define DRM_MODE_SCALE_ASPECT 3 /* Full screen, preserve aspect */ |
| 90 | 90 | ||
| 91 | /* Picture aspect ratio options */ | ||
| 92 | #define DRM_MODE_PICTURE_ASPECT_NONE 0 | ||
| 93 | #define DRM_MODE_PICTURE_ASPECT_4_3 1 | ||
| 94 | #define DRM_MODE_PICTURE_ASPECT_16_9 2 | ||
| 95 | |||
| 91 | /* Dithering mode options */ | 96 | /* Dithering mode options */ |
| 92 | #define DRM_MODE_DITHERING_OFF 0 | 97 | #define DRM_MODE_DITHERING_OFF 0 |
| 93 | #define DRM_MODE_DITHERING_ON 1 | 98 | #define DRM_MODE_DITHERING_ON 1 |
diff --git a/include/uapi/drm/nouveau_drm.h b/include/uapi/drm/nouveau_drm.h index 2a5769fdf8ba..0d7608dc1a34 100644 --- a/include/uapi/drm/nouveau_drm.h +++ b/include/uapi/drm/nouveau_drm.h | |||
| @@ -25,6 +25,16 @@ | |||
| 25 | #ifndef __NOUVEAU_DRM_H__ | 25 | #ifndef __NOUVEAU_DRM_H__ |
| 26 | #define __NOUVEAU_DRM_H__ | 26 | #define __NOUVEAU_DRM_H__ |
| 27 | 27 | ||
| 28 | #define DRM_NOUVEAU_EVENT_NVIF 0x80000000 | ||
| 29 | |||
| 30 | /* reserved object handles when using deprecated object APIs - these | ||
| 31 | * are here so that libdrm can allow interoperability with the new | ||
| 32 | * object APIs | ||
| 33 | */ | ||
| 34 | #define NOUVEAU_ABI16_CLIENT 0xffffffff | ||
| 35 | #define NOUVEAU_ABI16_DEVICE 0xdddddddd | ||
| 36 | #define NOUVEAU_ABI16_CHAN(n) (0xcccc0000 | (n)) | ||
| 37 | |||
| 28 | #define NOUVEAU_GEM_DOMAIN_CPU (1 << 0) | 38 | #define NOUVEAU_GEM_DOMAIN_CPU (1 << 0) |
| 29 | #define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1) | 39 | #define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1) |
| 30 | #define NOUVEAU_GEM_DOMAIN_GART (1 << 2) | 40 | #define NOUVEAU_GEM_DOMAIN_GART (1 << 2) |
| @@ -123,6 +133,7 @@ struct drm_nouveau_gem_cpu_fini { | |||
| 123 | #define DRM_NOUVEAU_GROBJ_ALLOC 0x04 /* deprecated */ | 133 | #define DRM_NOUVEAU_GROBJ_ALLOC 0x04 /* deprecated */ |
| 124 | #define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 /* deprecated */ | 134 | #define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 /* deprecated */ |
| 125 | #define DRM_NOUVEAU_GPUOBJ_FREE 0x06 /* deprecated */ | 135 | #define DRM_NOUVEAU_GPUOBJ_FREE 0x06 /* deprecated */ |
| 136 | #define DRM_NOUVEAU_NVIF 0x07 | ||
| 126 | #define DRM_NOUVEAU_GEM_NEW 0x40 | 137 | #define DRM_NOUVEAU_GEM_NEW 0x40 |
| 127 | #define DRM_NOUVEAU_GEM_PUSHBUF 0x41 | 138 | #define DRM_NOUVEAU_GEM_PUSHBUF 0x41 |
| 128 | #define DRM_NOUVEAU_GEM_CPU_PREP 0x42 | 139 | #define DRM_NOUVEAU_GEM_CPU_PREP 0x42 |
diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h index 1cc0b610f162..fea6099608ef 100644 --- a/include/uapi/drm/radeon_drm.h +++ b/include/uapi/drm/radeon_drm.h | |||
| @@ -796,7 +796,9 @@ struct drm_radeon_gem_info { | |||
| 796 | uint64_t vram_visible; | 796 | uint64_t vram_visible; |
| 797 | }; | 797 | }; |
| 798 | 798 | ||
| 799 | #define RADEON_GEM_NO_BACKING_STORE 1 | 799 | #define RADEON_GEM_NO_BACKING_STORE (1 << 0) |
| 800 | #define RADEON_GEM_GTT_UC (1 << 1) | ||
| 801 | #define RADEON_GEM_GTT_WC (1 << 2) | ||
| 800 | 802 | ||
| 801 | struct drm_radeon_gem_create { | 803 | struct drm_radeon_gem_create { |
| 802 | uint64_t size; | 804 | uint64_t size; |
| @@ -942,6 +944,7 @@ struct drm_radeon_cs_chunk { | |||
| 942 | }; | 944 | }; |
| 943 | 945 | ||
| 944 | /* drm_radeon_cs_reloc.flags */ | 946 | /* drm_radeon_cs_reloc.flags */ |
| 947 | #define RADEON_RELOC_PRIO_MASK (0xf << 0) | ||
| 945 | 948 | ||
| 946 | struct drm_radeon_cs_reloc { | 949 | struct drm_radeon_cs_reloc { |
| 947 | uint32_t handle; | 950 | uint32_t handle; |
diff --git a/include/uapi/drm/tegra_drm.h b/include/uapi/drm/tegra_drm.h index b75482112428..c15d781ecc0f 100644 --- a/include/uapi/drm/tegra_drm.h +++ b/include/uapi/drm/tegra_drm.h | |||
| @@ -129,6 +129,44 @@ struct drm_tegra_submit { | |||
| 129 | __u32 reserved[5]; /* future expansion */ | 129 | __u32 reserved[5]; /* future expansion */ |
| 130 | }; | 130 | }; |
| 131 | 131 | ||
| 132 | #define DRM_TEGRA_GEM_TILING_MODE_PITCH 0 | ||
| 133 | #define DRM_TEGRA_GEM_TILING_MODE_TILED 1 | ||
| 134 | #define DRM_TEGRA_GEM_TILING_MODE_BLOCK 2 | ||
| 135 | |||
| 136 | struct drm_tegra_gem_set_tiling { | ||
| 137 | /* input */ | ||
| 138 | __u32 handle; | ||
| 139 | __u32 mode; | ||
| 140 | __u32 value; | ||
| 141 | __u32 pad; | ||
| 142 | }; | ||
| 143 | |||
| 144 | struct drm_tegra_gem_get_tiling { | ||
| 145 | /* input */ | ||
| 146 | __u32 handle; | ||
| 147 | /* output */ | ||
| 148 | __u32 mode; | ||
| 149 | __u32 value; | ||
| 150 | __u32 pad; | ||
| 151 | }; | ||
| 152 | |||
| 153 | #define DRM_TEGRA_GEM_BOTTOM_UP (1 << 0) | ||
| 154 | #define DRM_TEGRA_GEM_FLAGS (DRM_TEGRA_GEM_BOTTOM_UP) | ||
| 155 | |||
| 156 | struct drm_tegra_gem_set_flags { | ||
| 157 | /* input */ | ||
| 158 | __u32 handle; | ||
| 159 | /* output */ | ||
| 160 | __u32 flags; | ||
| 161 | }; | ||
| 162 | |||
| 163 | struct drm_tegra_gem_get_flags { | ||
| 164 | /* input */ | ||
| 165 | __u32 handle; | ||
| 166 | /* output */ | ||
| 167 | __u32 flags; | ||
| 168 | }; | ||
| 169 | |||
| 132 | #define DRM_TEGRA_GEM_CREATE 0x00 | 170 | #define DRM_TEGRA_GEM_CREATE 0x00 |
| 133 | #define DRM_TEGRA_GEM_MMAP 0x01 | 171 | #define DRM_TEGRA_GEM_MMAP 0x01 |
| 134 | #define DRM_TEGRA_SYNCPT_READ 0x02 | 172 | #define DRM_TEGRA_SYNCPT_READ 0x02 |
| @@ -139,6 +177,10 @@ struct drm_tegra_submit { | |||
| 139 | #define DRM_TEGRA_GET_SYNCPT 0x07 | 177 | #define DRM_TEGRA_GET_SYNCPT 0x07 |
| 140 | #define DRM_TEGRA_SUBMIT 0x08 | 178 | #define DRM_TEGRA_SUBMIT 0x08 |
| 141 | #define DRM_TEGRA_GET_SYNCPT_BASE 0x09 | 179 | #define DRM_TEGRA_GET_SYNCPT_BASE 0x09 |
| 180 | #define DRM_TEGRA_GEM_SET_TILING 0x0a | ||
| 181 | #define DRM_TEGRA_GEM_GET_TILING 0x0b | ||
| 182 | #define DRM_TEGRA_GEM_SET_FLAGS 0x0c | ||
| 183 | #define DRM_TEGRA_GEM_GET_FLAGS 0x0d | ||
| 142 | 184 | ||
| 143 | #define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create) | 185 | #define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create) |
| 144 | #define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap) | 186 | #define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap) |
| @@ -150,5 +192,9 @@ struct drm_tegra_submit { | |||
| 150 | #define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt) | 192 | #define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt) |
| 151 | #define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit) | 193 | #define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit) |
| 152 | #define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base) | 194 | #define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base) |
| 195 | #define DRM_IOCTL_TEGRA_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_TILING, struct drm_tegra_gem_set_tiling) | ||
| 196 | #define DRM_IOCTL_TEGRA_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_TILING, struct drm_tegra_gem_get_tiling) | ||
| 197 | #define DRM_IOCTL_TEGRA_GEM_SET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags) | ||
| 198 | #define DRM_IOCTL_TEGRA_GEM_GET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags) | ||
| 153 | 199 | ||
| 154 | #endif | 200 | #endif |
diff --git a/include/uapi/linux/bsg.h b/include/uapi/linux/bsg.h index 7a12e1c0f371..02986cf8b6f1 100644 --- a/include/uapi/linux/bsg.h +++ b/include/uapi/linux/bsg.h | |||
| @@ -10,12 +10,13 @@ | |||
| 10 | #define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 | 10 | #define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 |
| 11 | 11 | ||
| 12 | /* | 12 | /* |
| 13 | * For flags member below | 13 | * For flag constants below: |
| 14 | * sg.h sg_io_hdr also has bits defined for it's flags member. However | 14 | * sg.h sg_io_hdr also has bits defined for it's flags member. These |
| 15 | * none of these bits are implemented/used by bsg. The bits below are | 15 | * two flag values (0x10 and 0x20) have the same meaning in sg.h . For |
| 16 | * allocated to not conflict with sg.h ones anyway. | 16 | * bsg the BSG_FLAG_Q_AT_HEAD flag is ignored since it is the deafult. |
| 17 | */ | 17 | */ |
| 18 | #define BSG_FLAG_Q_AT_TAIL 0x10 /* default, == 0 at this bit, is Q_AT_HEAD */ | 18 | #define BSG_FLAG_Q_AT_TAIL 0x10 /* default is Q_AT_HEAD */ |
| 19 | #define BSG_FLAG_Q_AT_HEAD 0x20 | ||
| 19 | 20 | ||
| 20 | struct sg_io_v4 { | 21 | struct sg_io_v4 { |
| 21 | __s32 guard; /* [i] 'Q' to differentiate from v3 */ | 22 | __s32 guard; /* [i] 'Q' to differentiate from v3 */ |
diff --git a/include/uapi/linux/fcntl.h b/include/uapi/linux/fcntl.h index 074b886c6be0..beed138bd359 100644 --- a/include/uapi/linux/fcntl.h +++ b/include/uapi/linux/fcntl.h | |||
| @@ -28,6 +28,21 @@ | |||
| 28 | #define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8) | 28 | #define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8) |
| 29 | 29 | ||
| 30 | /* | 30 | /* |
| 31 | * Set/Get seals | ||
| 32 | */ | ||
| 33 | #define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9) | ||
| 34 | #define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10) | ||
| 35 | |||
| 36 | /* | ||
| 37 | * Types of seals | ||
| 38 | */ | ||
| 39 | #define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */ | ||
| 40 | #define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */ | ||
| 41 | #define F_SEAL_GROW 0x0004 /* prevent file from growing */ | ||
| 42 | #define F_SEAL_WRITE 0x0008 /* prevent writes */ | ||
| 43 | /* (1U << 31) is reserved for signed error codes */ | ||
| 44 | |||
| 45 | /* | ||
| 31 | * Types of directory notifications that may be requested. | 46 | * Types of directory notifications that may be requested. |
| 32 | */ | 47 | */ |
| 33 | #define DN_ACCESS 0x00000001 /* File accessed */ | 48 | #define DN_ACCESS 0x00000001 /* File accessed */ |
diff --git a/include/uapi/linux/in6.h b/include/uapi/linux/in6.h index 22b7a69619d8..74a2a1773494 100644 --- a/include/uapi/linux/in6.h +++ b/include/uapi/linux/in6.h | |||
| @@ -233,7 +233,6 @@ struct in6_flowlabel_req { | |||
| 233 | #if 0 /* not yet */ | 233 | #if 0 /* not yet */ |
| 234 | #define IPV6_USE_MIN_MTU 63 | 234 | #define IPV6_USE_MIN_MTU 63 |
| 235 | #endif | 235 | #endif |
| 236 | #define IPV6_AUTOFLOWLABEL 64 | ||
| 237 | 236 | ||
| 238 | /* | 237 | /* |
| 239 | * Netfilter (1) | 238 | * Netfilter (1) |
| @@ -262,6 +261,7 @@ struct in6_flowlabel_req { | |||
| 262 | * IP6T_SO_ORIGINAL_DST 80 | 261 | * IP6T_SO_ORIGINAL_DST 80 |
| 263 | */ | 262 | */ |
| 264 | 263 | ||
| 264 | #define IPV6_AUTOFLOWLABEL 70 | ||
| 265 | /* RFC5014: Source address selection */ | 265 | /* RFC5014: Source address selection */ |
| 266 | #define IPV6_ADDR_PREFERENCES 72 | 266 | #define IPV6_ADDR_PREFERENCES 72 |
| 267 | 267 | ||
diff --git a/include/uapi/linux/kexec.h b/include/uapi/linux/kexec.h index d6629d49a243..6925f5b42f89 100644 --- a/include/uapi/linux/kexec.h +++ b/include/uapi/linux/kexec.h | |||
| @@ -13,6 +13,17 @@ | |||
| 13 | #define KEXEC_PRESERVE_CONTEXT 0x00000002 | 13 | #define KEXEC_PRESERVE_CONTEXT 0x00000002 |
| 14 | #define KEXEC_ARCH_MASK 0xffff0000 | 14 | #define KEXEC_ARCH_MASK 0xffff0000 |
| 15 | 15 | ||
| 16 | /* | ||
| 17 | * Kexec file load interface flags. | ||
| 18 | * KEXEC_FILE_UNLOAD : Unload already loaded kexec/kdump image. | ||
| 19 | * KEXEC_FILE_ON_CRASH : Load/unload operation belongs to kdump image. | ||
| 20 | * KEXEC_FILE_NO_INITRAMFS : No initramfs is being loaded. Ignore the initrd | ||
| 21 | * fd field. | ||
| 22 | */ | ||
| 23 | #define KEXEC_FILE_UNLOAD 0x00000001 | ||
| 24 | #define KEXEC_FILE_ON_CRASH 0x00000002 | ||
| 25 | #define KEXEC_FILE_NO_INITRAMFS 0x00000004 | ||
| 26 | |||
| 16 | /* These values match the ELF architecture values. | 27 | /* These values match the ELF architecture values. |
| 17 | * Unless there is a good reason that should continue to be the case. | 28 | * Unless there is a good reason that should continue to be the case. |
| 18 | */ | 29 | */ |
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 9b744af871d7..cf3a2ff440e4 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h | |||
| @@ -162,7 +162,7 @@ struct kvm_pit_config { | |||
| 162 | #define KVM_EXIT_TPR_ACCESS 12 | 162 | #define KVM_EXIT_TPR_ACCESS 12 |
| 163 | #define KVM_EXIT_S390_SIEIC 13 | 163 | #define KVM_EXIT_S390_SIEIC 13 |
| 164 | #define KVM_EXIT_S390_RESET 14 | 164 | #define KVM_EXIT_S390_RESET 14 |
| 165 | #define KVM_EXIT_DCR 15 | 165 | #define KVM_EXIT_DCR 15 /* deprecated */ |
| 166 | #define KVM_EXIT_NMI 16 | 166 | #define KVM_EXIT_NMI 16 |
| 167 | #define KVM_EXIT_INTERNAL_ERROR 17 | 167 | #define KVM_EXIT_INTERNAL_ERROR 17 |
| 168 | #define KVM_EXIT_OSI 18 | 168 | #define KVM_EXIT_OSI 18 |
| @@ -268,7 +268,7 @@ struct kvm_run { | |||
| 268 | __u64 trans_exc_code; | 268 | __u64 trans_exc_code; |
| 269 | __u32 pgm_code; | 269 | __u32 pgm_code; |
| 270 | } s390_ucontrol; | 270 | } s390_ucontrol; |
| 271 | /* KVM_EXIT_DCR */ | 271 | /* KVM_EXIT_DCR (deprecated) */ |
| 272 | struct { | 272 | struct { |
| 273 | __u32 dcrn; | 273 | __u32 dcrn; |
| 274 | __u32 data; | 274 | __u32 data; |
| @@ -763,6 +763,8 @@ struct kvm_ppc_smmu_info { | |||
| 763 | #define KVM_CAP_VM_ATTRIBUTES 101 | 763 | #define KVM_CAP_VM_ATTRIBUTES 101 |
| 764 | #define KVM_CAP_ARM_PSCI_0_2 102 | 764 | #define KVM_CAP_ARM_PSCI_0_2 102 |
| 765 | #define KVM_CAP_PPC_FIXUP_HCALL 103 | 765 | #define KVM_CAP_PPC_FIXUP_HCALL 103 |
| 766 | #define KVM_CAP_PPC_ENABLE_HCALL 104 | ||
| 767 | #define KVM_CAP_CHECK_EXTENSION_VM 105 | ||
| 766 | 768 | ||
| 767 | #ifdef KVM_CAP_IRQ_ROUTING | 769 | #ifdef KVM_CAP_IRQ_ROUTING |
| 768 | 770 | ||
diff --git a/include/uapi/linux/memfd.h b/include/uapi/linux/memfd.h new file mode 100644 index 000000000000..534e364bda92 --- /dev/null +++ b/include/uapi/linux/memfd.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #ifndef _UAPI_LINUX_MEMFD_H | ||
| 2 | #define _UAPI_LINUX_MEMFD_H | ||
| 3 | |||
| 4 | /* flags for memfd_create(2) (unsigned int) */ | ||
| 5 | #define MFD_CLOEXEC 0x0001U | ||
| 6 | #define MFD_ALLOW_SEALING 0x0002U | ||
| 7 | |||
| 8 | #endif /* _UAPI_LINUX_MEMFD_H */ | ||
diff --git a/include/uapi/linux/serio.h b/include/uapi/linux/serio.h index 9f53fa7fc132..becdd78295cc 100644 --- a/include/uapi/linux/serio.h +++ b/include/uapi/linux/serio.h | |||
| @@ -76,5 +76,6 @@ | |||
| 76 | #define SERIO_HAMPSHIRE 0x3b | 76 | #define SERIO_HAMPSHIRE 0x3b |
| 77 | #define SERIO_PS2MULT 0x3c | 77 | #define SERIO_PS2MULT 0x3c |
| 78 | #define SERIO_TSC40 0x3d | 78 | #define SERIO_TSC40 0x3d |
| 79 | #define SERIO_WACOM_IV 0x3e | ||
| 79 | 80 | ||
| 80 | #endif /* _UAPI_SERIO_H */ | 81 | #endif /* _UAPI_SERIO_H */ |
diff --git a/include/uapi/linux/uhid.h b/include/uapi/linux/uhid.h index 1e3b09c191cd..aaa86d6bd1dd 100644 --- a/include/uapi/linux/uhid.h +++ b/include/uapi/linux/uhid.h | |||
| @@ -24,35 +24,23 @@ | |||
| 24 | #include <linux/hid.h> | 24 | #include <linux/hid.h> |
| 25 | 25 | ||
| 26 | enum uhid_event_type { | 26 | enum uhid_event_type { |
| 27 | UHID_CREATE, | 27 | __UHID_LEGACY_CREATE, |
| 28 | UHID_DESTROY, | 28 | UHID_DESTROY, |
| 29 | UHID_START, | 29 | UHID_START, |
| 30 | UHID_STOP, | 30 | UHID_STOP, |
| 31 | UHID_OPEN, | 31 | UHID_OPEN, |
| 32 | UHID_CLOSE, | 32 | UHID_CLOSE, |
| 33 | UHID_OUTPUT, | 33 | UHID_OUTPUT, |
| 34 | UHID_OUTPUT_EV, /* obsolete! */ | 34 | __UHID_LEGACY_OUTPUT_EV, |
| 35 | UHID_INPUT, | 35 | __UHID_LEGACY_INPUT, |
| 36 | UHID_FEATURE, | 36 | UHID_GET_REPORT, |
| 37 | UHID_FEATURE_ANSWER, | 37 | UHID_GET_REPORT_REPLY, |
| 38 | UHID_CREATE2, | 38 | UHID_CREATE2, |
| 39 | UHID_INPUT2, | 39 | UHID_INPUT2, |
| 40 | UHID_SET_REPORT, | ||
| 41 | UHID_SET_REPORT_REPLY, | ||
| 40 | }; | 42 | }; |
| 41 | 43 | ||
| 42 | struct uhid_create_req { | ||
| 43 | __u8 name[128]; | ||
| 44 | __u8 phys[64]; | ||
| 45 | __u8 uniq[64]; | ||
| 46 | __u8 __user *rd_data; | ||
| 47 | __u16 rd_size; | ||
| 48 | |||
| 49 | __u16 bus; | ||
| 50 | __u32 vendor; | ||
| 51 | __u32 product; | ||
| 52 | __u32 version; | ||
| 53 | __u32 country; | ||
| 54 | } __attribute__((__packed__)); | ||
| 55 | |||
| 56 | struct uhid_create2_req { | 44 | struct uhid_create2_req { |
| 57 | __u8 name[128]; | 45 | __u8 name[128]; |
| 58 | __u8 phys[64]; | 46 | __u8 phys[64]; |
| @@ -66,6 +54,16 @@ struct uhid_create2_req { | |||
| 66 | __u8 rd_data[HID_MAX_DESCRIPTOR_SIZE]; | 54 | __u8 rd_data[HID_MAX_DESCRIPTOR_SIZE]; |
| 67 | } __attribute__((__packed__)); | 55 | } __attribute__((__packed__)); |
| 68 | 56 | ||
| 57 | enum uhid_dev_flag { | ||
| 58 | UHID_DEV_NUMBERED_FEATURE_REPORTS = (1ULL << 0), | ||
| 59 | UHID_DEV_NUMBERED_OUTPUT_REPORTS = (1ULL << 1), | ||
| 60 | UHID_DEV_NUMBERED_INPUT_REPORTS = (1ULL << 2), | ||
| 61 | }; | ||
| 62 | |||
| 63 | struct uhid_start_req { | ||
| 64 | __u64 dev_flags; | ||
| 65 | }; | ||
| 66 | |||
| 69 | #define UHID_DATA_MAX 4096 | 67 | #define UHID_DATA_MAX 4096 |
| 70 | 68 | ||
| 71 | enum uhid_report_type { | 69 | enum uhid_report_type { |
| @@ -74,36 +72,94 @@ enum uhid_report_type { | |||
| 74 | UHID_INPUT_REPORT, | 72 | UHID_INPUT_REPORT, |
| 75 | }; | 73 | }; |
| 76 | 74 | ||
| 77 | struct uhid_input_req { | 75 | struct uhid_input2_req { |
| 76 | __u16 size; | ||
| 77 | __u8 data[UHID_DATA_MAX]; | ||
| 78 | } __attribute__((__packed__)); | ||
| 79 | |||
| 80 | struct uhid_output_req { | ||
| 78 | __u8 data[UHID_DATA_MAX]; | 81 | __u8 data[UHID_DATA_MAX]; |
| 79 | __u16 size; | 82 | __u16 size; |
| 83 | __u8 rtype; | ||
| 80 | } __attribute__((__packed__)); | 84 | } __attribute__((__packed__)); |
| 81 | 85 | ||
| 82 | struct uhid_input2_req { | 86 | struct uhid_get_report_req { |
| 87 | __u32 id; | ||
| 88 | __u8 rnum; | ||
| 89 | __u8 rtype; | ||
| 90 | } __attribute__((__packed__)); | ||
| 91 | |||
| 92 | struct uhid_get_report_reply_req { | ||
| 93 | __u32 id; | ||
| 94 | __u16 err; | ||
| 83 | __u16 size; | 95 | __u16 size; |
| 84 | __u8 data[UHID_DATA_MAX]; | 96 | __u8 data[UHID_DATA_MAX]; |
| 85 | } __attribute__((__packed__)); | 97 | } __attribute__((__packed__)); |
| 86 | 98 | ||
| 87 | struct uhid_output_req { | 99 | struct uhid_set_report_req { |
| 100 | __u32 id; | ||
| 101 | __u8 rnum; | ||
| 102 | __u8 rtype; | ||
| 103 | __u16 size; | ||
| 104 | __u8 data[UHID_DATA_MAX]; | ||
| 105 | } __attribute__((__packed__)); | ||
| 106 | |||
| 107 | struct uhid_set_report_reply_req { | ||
| 108 | __u32 id; | ||
| 109 | __u16 err; | ||
| 110 | } __attribute__((__packed__)); | ||
| 111 | |||
| 112 | /* | ||
| 113 | * Compat Layer | ||
| 114 | * All these commands and requests are obsolete. You should avoid using them in | ||
| 115 | * new code. We support them for backwards-compatibility, but you might not get | ||
| 116 | * access to new feature in case you use them. | ||
| 117 | */ | ||
| 118 | |||
| 119 | enum uhid_legacy_event_type { | ||
| 120 | UHID_CREATE = __UHID_LEGACY_CREATE, | ||
| 121 | UHID_OUTPUT_EV = __UHID_LEGACY_OUTPUT_EV, | ||
| 122 | UHID_INPUT = __UHID_LEGACY_INPUT, | ||
| 123 | UHID_FEATURE = UHID_GET_REPORT, | ||
| 124 | UHID_FEATURE_ANSWER = UHID_GET_REPORT_REPLY, | ||
| 125 | }; | ||
| 126 | |||
| 127 | /* Obsolete! Use UHID_CREATE2. */ | ||
| 128 | struct uhid_create_req { | ||
| 129 | __u8 name[128]; | ||
| 130 | __u8 phys[64]; | ||
| 131 | __u8 uniq[64]; | ||
| 132 | __u8 __user *rd_data; | ||
| 133 | __u16 rd_size; | ||
| 134 | |||
| 135 | __u16 bus; | ||
| 136 | __u32 vendor; | ||
| 137 | __u32 product; | ||
| 138 | __u32 version; | ||
| 139 | __u32 country; | ||
| 140 | } __attribute__((__packed__)); | ||
| 141 | |||
| 142 | /* Obsolete! Use UHID_INPUT2. */ | ||
| 143 | struct uhid_input_req { | ||
| 88 | __u8 data[UHID_DATA_MAX]; | 144 | __u8 data[UHID_DATA_MAX]; |
| 89 | __u16 size; | 145 | __u16 size; |
| 90 | __u8 rtype; | ||
| 91 | } __attribute__((__packed__)); | 146 | } __attribute__((__packed__)); |
| 92 | 147 | ||
| 93 | /* Obsolete! Newer kernels will no longer send these events but instead convert | 148 | /* Obsolete! Kernel uses UHID_OUTPUT exclusively now. */ |
| 94 | * it into raw output reports via UHID_OUTPUT. */ | ||
| 95 | struct uhid_output_ev_req { | 149 | struct uhid_output_ev_req { |
| 96 | __u16 type; | 150 | __u16 type; |
| 97 | __u16 code; | 151 | __u16 code; |
| 98 | __s32 value; | 152 | __s32 value; |
| 99 | } __attribute__((__packed__)); | 153 | } __attribute__((__packed__)); |
| 100 | 154 | ||
| 155 | /* Obsolete! Kernel uses ABI compatible UHID_GET_REPORT. */ | ||
| 101 | struct uhid_feature_req { | 156 | struct uhid_feature_req { |
| 102 | __u32 id; | 157 | __u32 id; |
| 103 | __u8 rnum; | 158 | __u8 rnum; |
| 104 | __u8 rtype; | 159 | __u8 rtype; |
| 105 | } __attribute__((__packed__)); | 160 | } __attribute__((__packed__)); |
| 106 | 161 | ||
| 162 | /* Obsolete! Use ABI compatible UHID_GET_REPORT_REPLY. */ | ||
| 107 | struct uhid_feature_answer_req { | 163 | struct uhid_feature_answer_req { |
| 108 | __u32 id; | 164 | __u32 id; |
| 109 | __u16 err; | 165 | __u16 err; |
| @@ -111,6 +167,15 @@ struct uhid_feature_answer_req { | |||
| 111 | __u8 data[UHID_DATA_MAX]; | 167 | __u8 data[UHID_DATA_MAX]; |
| 112 | } __attribute__((__packed__)); | 168 | } __attribute__((__packed__)); |
| 113 | 169 | ||
| 170 | /* | ||
| 171 | * UHID Events | ||
| 172 | * All UHID events from and to the kernel are encoded as "struct uhid_event". | ||
| 173 | * The "type" field contains a UHID_* type identifier. All payload depends on | ||
| 174 | * that type and can be accessed via ev->u.XYZ accordingly. | ||
| 175 | * If user-space writes short events, they're extended with 0s by the kernel. If | ||
| 176 | * the kernel writes short events, user-space shall extend them with 0s. | ||
| 177 | */ | ||
| 178 | |||
| 114 | struct uhid_event { | 179 | struct uhid_event { |
| 115 | __u32 type; | 180 | __u32 type; |
| 116 | 181 | ||
| @@ -120,9 +185,14 @@ struct uhid_event { | |||
| 120 | struct uhid_output_req output; | 185 | struct uhid_output_req output; |
| 121 | struct uhid_output_ev_req output_ev; | 186 | struct uhid_output_ev_req output_ev; |
| 122 | struct uhid_feature_req feature; | 187 | struct uhid_feature_req feature; |
| 188 | struct uhid_get_report_req get_report; | ||
| 123 | struct uhid_feature_answer_req feature_answer; | 189 | struct uhid_feature_answer_req feature_answer; |
| 190 | struct uhid_get_report_reply_req get_report_reply; | ||
| 124 | struct uhid_create2_req create2; | 191 | struct uhid_create2_req create2; |
| 125 | struct uhid_input2_req input2; | 192 | struct uhid_input2_req input2; |
| 193 | struct uhid_set_report_req set_report; | ||
| 194 | struct uhid_set_report_reply_req set_report_reply; | ||
| 195 | struct uhid_start_req start; | ||
| 126 | } u; | 196 | } u; |
| 127 | } __attribute__((__packed__)); | 197 | } __attribute__((__packed__)); |
| 128 | 198 | ||
diff --git a/include/uapi/linux/uinput.h b/include/uapi/linux/uinput.h index 0389b489bbba..baeab83deb64 100644 --- a/include/uapi/linux/uinput.h +++ b/include/uapi/linux/uinput.h | |||
| @@ -84,6 +84,15 @@ struct uinput_ff_erase { | |||
| 84 | */ | 84 | */ |
| 85 | #define UI_GET_SYSNAME(len) _IOC(_IOC_READ, UINPUT_IOCTL_BASE, 300, len) | 85 | #define UI_GET_SYSNAME(len) _IOC(_IOC_READ, UINPUT_IOCTL_BASE, 300, len) |
| 86 | 86 | ||
| 87 | /** | ||
| 88 | * UI_GET_VERSION - Return version of uinput protocol | ||
| 89 | * | ||
| 90 | * This writes uinput protocol version implemented by the kernel into | ||
| 91 | * the integer pointed to by the ioctl argument. The protocol version | ||
| 92 | * is hard-coded in the kernel and is independent of the uinput device. | ||
| 93 | */ | ||
| 94 | #define UI_GET_VERSION _IOR(UINPUT_IOCTL_BASE, 301, unsigned int) | ||
| 95 | |||
| 87 | /* | 96 | /* |
| 88 | * To write a force-feedback-capable driver, the upload_effect | 97 | * To write a force-feedback-capable driver, the upload_effect |
| 89 | * and erase_effect callbacks in input_dev must be implemented. | 98 | * and erase_effect callbacks in input_dev must be implemented. |
diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h index cb9023d4f063..6612974c64bf 100644 --- a/include/uapi/linux/vfio.h +++ b/include/uapi/linux/vfio.h | |||
| @@ -30,6 +30,9 @@ | |||
| 30 | */ | 30 | */ |
| 31 | #define VFIO_DMA_CC_IOMMU 4 | 31 | #define VFIO_DMA_CC_IOMMU 4 |
| 32 | 32 | ||
| 33 | /* Check if EEH is supported */ | ||
| 34 | #define VFIO_EEH 5 | ||
| 35 | |||
| 33 | /* | 36 | /* |
| 34 | * The IOCTL interface is designed for extensibility by embedding the | 37 | * The IOCTL interface is designed for extensibility by embedding the |
| 35 | * structure length (argsz) and flags into structures passed between | 38 | * structure length (argsz) and flags into structures passed between |
| @@ -455,6 +458,37 @@ struct vfio_iommu_spapr_tce_info { | |||
| 455 | 458 | ||
| 456 | #define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12) | 459 | #define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12) |
| 457 | 460 | ||
| 461 | /* | ||
| 462 | * EEH PE operation struct provides ways to: | ||
| 463 | * - enable/disable EEH functionality; | ||
| 464 | * - unfreeze IO/DMA for frozen PE; | ||
| 465 | * - read PE state; | ||
| 466 | * - reset PE; | ||
| 467 | * - configure PE. | ||
| 468 | */ | ||
| 469 | struct vfio_eeh_pe_op { | ||
| 470 | __u32 argsz; | ||
| 471 | __u32 flags; | ||
| 472 | __u32 op; | ||
| 473 | }; | ||
| 474 | |||
| 475 | #define VFIO_EEH_PE_DISABLE 0 /* Disable EEH functionality */ | ||
| 476 | #define VFIO_EEH_PE_ENABLE 1 /* Enable EEH functionality */ | ||
| 477 | #define VFIO_EEH_PE_UNFREEZE_IO 2 /* Enable IO for frozen PE */ | ||
| 478 | #define VFIO_EEH_PE_UNFREEZE_DMA 3 /* Enable DMA for frozen PE */ | ||
| 479 | #define VFIO_EEH_PE_GET_STATE 4 /* PE state retrieval */ | ||
| 480 | #define VFIO_EEH_PE_STATE_NORMAL 0 /* PE in functional state */ | ||
| 481 | #define VFIO_EEH_PE_STATE_RESET 1 /* PE reset in progress */ | ||
| 482 | #define VFIO_EEH_PE_STATE_STOPPED 2 /* Stopped DMA and IO */ | ||
| 483 | #define VFIO_EEH_PE_STATE_STOPPED_DMA 4 /* Stopped DMA only */ | ||
| 484 | #define VFIO_EEH_PE_STATE_UNAVAIL 5 /* State unavailable */ | ||
| 485 | #define VFIO_EEH_PE_RESET_DEACTIVATE 5 /* Deassert PE reset */ | ||
| 486 | #define VFIO_EEH_PE_RESET_HOT 6 /* Assert hot reset */ | ||
| 487 | #define VFIO_EEH_PE_RESET_FUNDAMENTAL 7 /* Assert fundamental reset */ | ||
| 488 | #define VFIO_EEH_PE_CONFIGURE 8 /* PE configuration */ | ||
| 489 | |||
| 490 | #define VFIO_EEH_PE_OP _IO(VFIO_TYPE, VFIO_BASE + 21) | ||
| 491 | |||
| 458 | /* ***************************************************************** */ | 492 | /* ***************************************************************** */ |
| 459 | 493 | ||
| 460 | #endif /* _UAPIVFIO_H */ | 494 | #endif /* _UAPIVFIO_H */ |
diff --git a/include/uapi/linux/virtio_blk.h b/include/uapi/linux/virtio_blk.h index 6d8e61c48563..9ad67b267584 100644 --- a/include/uapi/linux/virtio_blk.h +++ b/include/uapi/linux/virtio_blk.h | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | #define VIRTIO_BLK_F_WCE 9 /* Writeback mode enabled after reset */ | 40 | #define VIRTIO_BLK_F_WCE 9 /* Writeback mode enabled after reset */ |
| 41 | #define VIRTIO_BLK_F_TOPOLOGY 10 /* Topology information is available */ | 41 | #define VIRTIO_BLK_F_TOPOLOGY 10 /* Topology information is available */ |
| 42 | #define VIRTIO_BLK_F_CONFIG_WCE 11 /* Writeback mode available in config */ | 42 | #define VIRTIO_BLK_F_CONFIG_WCE 11 /* Writeback mode available in config */ |
| 43 | #define VIRTIO_BLK_F_MQ 12 /* support more than one vq */ | ||
| 43 | 44 | ||
| 44 | #ifndef __KERNEL__ | 45 | #ifndef __KERNEL__ |
| 45 | /* Old (deprecated) name for VIRTIO_BLK_F_WCE. */ | 46 | /* Old (deprecated) name for VIRTIO_BLK_F_WCE. */ |
| @@ -77,6 +78,10 @@ struct virtio_blk_config { | |||
| 77 | 78 | ||
| 78 | /* writeback mode (if VIRTIO_BLK_F_CONFIG_WCE) */ | 79 | /* writeback mode (if VIRTIO_BLK_F_CONFIG_WCE) */ |
| 79 | __u8 wce; | 80 | __u8 wce; |
| 81 | __u8 unused; | ||
| 82 | |||
| 83 | /* number of vqs, only available when VIRTIO_BLK_F_MQ is set */ | ||
| 84 | __u16 num_queues; | ||
| 80 | } __attribute__((packed)); | 85 | } __attribute__((packed)); |
| 81 | 86 | ||
| 82 | /* | 87 | /* |
diff --git a/include/uapi/rdma/ib_user_mad.h b/include/uapi/rdma/ib_user_mad.h index d6fce1cbdb90..09f809f323ea 100644 --- a/include/uapi/rdma/ib_user_mad.h +++ b/include/uapi/rdma/ib_user_mad.h | |||
| @@ -191,6 +191,45 @@ struct ib_user_mad_reg_req { | |||
| 191 | __u8 rmpp_version; | 191 | __u8 rmpp_version; |
| 192 | }; | 192 | }; |
| 193 | 193 | ||
| 194 | /** | ||
| 195 | * ib_user_mad_reg_req2 - MAD registration request | ||
| 196 | * | ||
| 197 | * @id - Set by the _kernel_; used by userspace to identify the | ||
| 198 | * registered agent in future requests. | ||
| 199 | * @qpn - Queue pair number; must be 0 or 1. | ||
| 200 | * @mgmt_class - Indicates which management class of MADs should be | ||
| 201 | * receive by the caller. This field is only required if | ||
| 202 | * the user wishes to receive unsolicited MADs, otherwise | ||
| 203 | * it should be 0. | ||
| 204 | * @mgmt_class_version - Indicates which version of MADs for the given | ||
| 205 | * management class to receive. | ||
| 206 | * @res - Ignored. | ||
| 207 | * @flags - additional registration flags; Must be in the set of | ||
| 208 | * flags defined in IB_USER_MAD_REG_FLAGS_CAP | ||
| 209 | * @method_mask - The caller wishes to receive unsolicited MADs for the | ||
| 210 | * methods whose bit(s) is(are) set. | ||
| 211 | * @oui - Indicates IEEE OUI to use when mgmt_class is a vendor | ||
| 212 | * class in the range from 0x30 to 0x4f. Otherwise not | ||
| 213 | * used. | ||
| 214 | * @rmpp_version - If set, indicates the RMPP version to use. | ||
| 215 | */ | ||
| 216 | enum { | ||
| 217 | IB_USER_MAD_USER_RMPP = (1 << 0), | ||
| 218 | }; | ||
| 219 | #define IB_USER_MAD_REG_FLAGS_CAP (IB_USER_MAD_USER_RMPP) | ||
| 220 | struct ib_user_mad_reg_req2 { | ||
| 221 | __u32 id; | ||
| 222 | __u32 qpn; | ||
| 223 | __u8 mgmt_class; | ||
| 224 | __u8 mgmt_class_version; | ||
| 225 | __u16 res; | ||
| 226 | __u32 flags; | ||
| 227 | __u64 method_mask[2]; | ||
| 228 | __u32 oui; | ||
| 229 | __u8 rmpp_version; | ||
| 230 | __u8 reserved[3]; | ||
| 231 | }; | ||
| 232 | |||
| 194 | #define IB_IOCTL_MAGIC 0x1b | 233 | #define IB_IOCTL_MAGIC 0x1b |
| 195 | 234 | ||
| 196 | #define IB_USER_MAD_REGISTER_AGENT _IOWR(IB_IOCTL_MAGIC, 1, \ | 235 | #define IB_USER_MAD_REGISTER_AGENT _IOWR(IB_IOCTL_MAGIC, 1, \ |
| @@ -200,4 +239,7 @@ struct ib_user_mad_reg_req { | |||
| 200 | 239 | ||
| 201 | #define IB_USER_MAD_ENABLE_PKEY _IO(IB_IOCTL_MAGIC, 3) | 240 | #define IB_USER_MAD_ENABLE_PKEY _IO(IB_IOCTL_MAGIC, 3) |
| 202 | 241 | ||
| 242 | #define IB_USER_MAD_REGISTER_AGENT2 _IOWR(IB_IOCTL_MAGIC, 4, \ | ||
| 243 | struct ib_user_mad_reg_req2) | ||
| 244 | |||
| 203 | #endif /* IB_USER_MAD_H */ | 245 | #endif /* IB_USER_MAD_H */ |
diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h index cbfdd4ca9510..26daf55ff76e 100644 --- a/include/uapi/rdma/ib_user_verbs.h +++ b/include/uapi/rdma/ib_user_verbs.h | |||
| @@ -276,6 +276,22 @@ struct ib_uverbs_reg_mr_resp { | |||
| 276 | __u32 rkey; | 276 | __u32 rkey; |
| 277 | }; | 277 | }; |
| 278 | 278 | ||
| 279 | struct ib_uverbs_rereg_mr { | ||
| 280 | __u64 response; | ||
| 281 | __u32 mr_handle; | ||
| 282 | __u32 flags; | ||
| 283 | __u64 start; | ||
| 284 | __u64 length; | ||
| 285 | __u64 hca_va; | ||
| 286 | __u32 pd_handle; | ||
| 287 | __u32 access_flags; | ||
| 288 | }; | ||
| 289 | |||
| 290 | struct ib_uverbs_rereg_mr_resp { | ||
| 291 | __u32 lkey; | ||
| 292 | __u32 rkey; | ||
| 293 | }; | ||
| 294 | |||
| 279 | struct ib_uverbs_dereg_mr { | 295 | struct ib_uverbs_dereg_mr { |
| 280 | __u32 mr_handle; | 296 | __u32 mr_handle; |
| 281 | }; | 297 | }; |
diff --git a/include/uapi/rdma/rdma_user_cm.h b/include/uapi/rdma/rdma_user_cm.h index 99b80abf360a..3066718eb120 100644 --- a/include/uapi/rdma/rdma_user_cm.h +++ b/include/uapi/rdma/rdma_user_cm.h | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #define RDMA_USER_CM_H | 34 | #define RDMA_USER_CM_H |
| 35 | 35 | ||
| 36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
| 37 | #include <linux/socket.h> | ||
| 37 | #include <linux/in6.h> | 38 | #include <linux/in6.h> |
| 38 | #include <rdma/ib_user_verbs.h> | 39 | #include <rdma/ib_user_verbs.h> |
| 39 | #include <rdma/ib_user_sa.h> | 40 | #include <rdma/ib_user_sa.h> |
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index fc06c5b5f12a..069dfca9549a 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
| @@ -61,6 +61,7 @@ struct omap_overlay_manager; | |||
| 61 | struct dss_lcd_mgr_config; | 61 | struct dss_lcd_mgr_config; |
| 62 | struct snd_aes_iec958; | 62 | struct snd_aes_iec958; |
| 63 | struct snd_cea_861_aud_if; | 63 | struct snd_cea_861_aud_if; |
| 64 | struct hdmi_avi_infoframe; | ||
| 64 | 65 | ||
| 65 | enum omap_display_type { | 66 | enum omap_display_type { |
| 66 | OMAP_DISPLAY_TYPE_NONE = 0, | 67 | OMAP_DISPLAY_TYPE_NONE = 0, |
| @@ -631,6 +632,10 @@ struct omapdss_hdmi_ops { | |||
| 631 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); | 632 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); |
| 632 | bool (*detect)(struct omap_dss_device *dssdev); | 633 | bool (*detect)(struct omap_dss_device *dssdev); |
| 633 | 634 | ||
| 635 | int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode); | ||
| 636 | int (*set_infoframe)(struct omap_dss_device *dssdev, | ||
| 637 | const struct hdmi_avi_infoframe *avi); | ||
| 638 | |||
| 634 | /* | 639 | /* |
| 635 | * Note: These functions might sleep. Do not call while | 640 | * Note: These functions might sleep. Do not call while |
| 636 | * holding a spinlock/readlock. | 641 | * holding a spinlock/readlock. |
| @@ -850,6 +855,10 @@ struct omap_dss_driver { | |||
| 850 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); | 855 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); |
| 851 | bool (*detect)(struct omap_dss_device *dssdev); | 856 | bool (*detect)(struct omap_dss_device *dssdev); |
| 852 | 857 | ||
| 858 | int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode); | ||
| 859 | int (*set_hdmi_infoframe)(struct omap_dss_device *dssdev, | ||
| 860 | const struct hdmi_avi_infoframe *avi); | ||
| 861 | |||
| 853 | /* | 862 | /* |
| 854 | * For display drivers that support audio. This encompasses | 863 | * For display drivers that support audio. This encompasses |
| 855 | * HDMI and DisplayPort at the moment. | 864 | * HDMI and DisplayPort at the moment. |
diff --git a/include/video/samsung_fimd.h b/include/video/samsung_fimd.h index b0393209679b..a20e4a3a8b15 100644 --- a/include/video/samsung_fimd.h +++ b/include/video/samsung_fimd.h | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | /* VIDCON0 */ | 19 | /* VIDCON0 */ |
| 20 | 20 | ||
| 21 | #define VIDCON0 0x00 | 21 | #define VIDCON0 0x00 |
| 22 | #define VIDCON0_DSI_EN (1 << 30) | ||
| 22 | #define VIDCON0_INTERLACE (1 << 29) | 23 | #define VIDCON0_INTERLACE (1 << 29) |
| 23 | #define VIDCON0_VIDOUT_MASK (0x7 << 26) | 24 | #define VIDCON0_VIDOUT_MASK (0x7 << 26) |
| 24 | #define VIDCON0_VIDOUT_SHIFT 26 | 25 | #define VIDCON0_VIDOUT_SHIFT 26 |
| @@ -107,7 +108,7 @@ | |||
| 107 | #define VIDCON2_ORGYCbCr (1 << 8) | 108 | #define VIDCON2_ORGYCbCr (1 << 8) |
| 108 | #define VIDCON2_YUVORDCrCb (1 << 7) | 109 | #define VIDCON2_YUVORDCrCb (1 << 7) |
| 109 | 110 | ||
| 110 | /* PRTCON (S3C6410, S5PC100) | 111 | /* PRTCON (S3C6410) |
| 111 | * Might not be present in the S3C6410 documentation, | 112 | * Might not be present in the S3C6410 documentation, |
| 112 | * but tests prove it's there almost for sure; shouldn't hurt in any case. | 113 | * but tests prove it's there almost for sure; shouldn't hurt in any case. |
| 113 | */ | 114 | */ |
| @@ -355,7 +356,7 @@ | |||
| 355 | #define VIDINTCON0_INT_ENABLE (1 << 0) | 356 | #define VIDINTCON0_INT_ENABLE (1 << 0) |
| 356 | 357 | ||
| 357 | #define VIDINTCON1 0x134 | 358 | #define VIDINTCON1 0x134 |
| 358 | #define VIDINTCON1_INT_I180 (1 << 2) | 359 | #define VIDINTCON1_INT_I80 (1 << 2) |
| 359 | #define VIDINTCON1_INT_FRAME (1 << 1) | 360 | #define VIDINTCON1_INT_FRAME (1 << 1) |
| 360 | #define VIDINTCON1_INT_FIFO (1 << 0) | 361 | #define VIDINTCON1_INT_FIFO (1 << 0) |
| 361 | 362 | ||
diff --git a/include/xen/grant_table.h b/include/xen/grant_table.h index 5c1aba154b64..3387465b9caa 100644 --- a/include/xen/grant_table.h +++ b/include/xen/grant_table.h | |||
| @@ -64,24 +64,6 @@ int gnttab_resume(void); | |||
| 64 | 64 | ||
| 65 | int gnttab_grant_foreign_access(domid_t domid, unsigned long frame, | 65 | int gnttab_grant_foreign_access(domid_t domid, unsigned long frame, |
| 66 | int readonly); | 66 | int readonly); |
| 67 | int gnttab_grant_foreign_access_subpage(domid_t domid, unsigned long frame, | ||
| 68 | int flags, unsigned page_off, | ||
| 69 | unsigned length); | ||
| 70 | int gnttab_grant_foreign_access_trans(domid_t domid, int flags, | ||
| 71 | domid_t trans_domid, | ||
| 72 | grant_ref_t trans_gref); | ||
| 73 | |||
| 74 | /* | ||
| 75 | * Are sub-page grants available on this version of Xen? Returns true if they | ||
| 76 | * are, and false if they're not. | ||
| 77 | */ | ||
| 78 | bool gnttab_subpage_grants_available(void); | ||
| 79 | |||
| 80 | /* | ||
| 81 | * Are transitive grants available on this version of Xen? Returns true if they | ||
| 82 | * are, and false if they're not. | ||
| 83 | */ | ||
| 84 | bool gnttab_trans_grants_available(void); | ||
| 85 | 67 | ||
| 86 | /* | 68 | /* |
| 87 | * End access through the given grant reference, iff the grant entry is no | 69 | * End access through the given grant reference, iff the grant entry is no |
| @@ -128,13 +110,6 @@ void gnttab_cancel_free_callback(struct gnttab_free_callback *callback); | |||
| 128 | 110 | ||
| 129 | void gnttab_grant_foreign_access_ref(grant_ref_t ref, domid_t domid, | 111 | void gnttab_grant_foreign_access_ref(grant_ref_t ref, domid_t domid, |
| 130 | unsigned long frame, int readonly); | 112 | unsigned long frame, int readonly); |
| 131 | int gnttab_grant_foreign_access_subpage_ref(grant_ref_t ref, domid_t domid, | ||
| 132 | unsigned long frame, int flags, | ||
| 133 | unsigned page_off, | ||
| 134 | unsigned length); | ||
| 135 | int gnttab_grant_foreign_access_trans_ref(grant_ref_t ref, domid_t domid, | ||
| 136 | int flags, domid_t trans_domid, | ||
| 137 | grant_ref_t trans_gref); | ||
| 138 | 113 | ||
| 139 | void gnttab_grant_foreign_transfer_ref(grant_ref_t, domid_t domid, | 114 | void gnttab_grant_foreign_transfer_ref(grant_ref_t, domid_t domid, |
| 140 | unsigned long pfn); | 115 | unsigned long pfn); |
| @@ -170,13 +145,10 @@ gnttab_set_unmap_op(struct gnttab_unmap_grant_ref *unmap, phys_addr_t addr, | |||
| 170 | unmap->dev_bus_addr = 0; | 145 | unmap->dev_bus_addr = 0; |
| 171 | } | 146 | } |
| 172 | 147 | ||
| 173 | int arch_gnttab_init(unsigned long nr_shared, unsigned long nr_status); | 148 | int arch_gnttab_init(unsigned long nr_shared); |
| 174 | int arch_gnttab_map_shared(xen_pfn_t *frames, unsigned long nr_gframes, | 149 | int arch_gnttab_map_shared(xen_pfn_t *frames, unsigned long nr_gframes, |
| 175 | unsigned long max_nr_gframes, | 150 | unsigned long max_nr_gframes, |
| 176 | void **__shared); | 151 | void **__shared); |
| 177 | int arch_gnttab_map_status(uint64_t *frames, unsigned long nr_gframes, | ||
| 178 | unsigned long max_nr_gframes, | ||
| 179 | grant_status_t **__shared); | ||
| 180 | void arch_gnttab_unmap(void *shared, unsigned long nr_gframes); | 152 | void arch_gnttab_unmap(void *shared, unsigned long nr_gframes); |
| 181 | 153 | ||
| 182 | struct grant_frames { | 154 | struct grant_frames { |
