diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/device.h | 2 | ||||
| -rw-r--r-- | include/linux/ext2_fs.h | 16 | ||||
| -rw-r--r-- | include/linux/ext3_fs.h | 2 | ||||
| -rw-r--r-- | include/linux/firmware.h | 5 | ||||
| -rw-r--r-- | include/linux/fs.h | 2 | ||||
| -rw-r--r-- | include/linux/namei.h | 1 | ||||
| -rw-r--r-- | include/linux/nilfs2_fs.h | 24 | ||||
| -rw-r--r-- | include/linux/omapfb.h | 251 | ||||
| -rw-r--r-- | include/linux/pci.h | 42 | ||||
| -rw-r--r-- | include/linux/pci_regs.h | 18 | ||||
| -rw-r--r-- | include/linux/pcieport_if.h | 16 | ||||
| -rw-r--r-- | include/linux/platform_device.h | 20 | ||||
| -rw-r--r-- | include/linux/quota.h | 6 | ||||
| -rw-r--r-- | include/linux/syscalls.h | 4 | ||||
| -rw-r--r-- | include/linux/usb.h | 33 | ||||
| -rw-r--r-- | include/linux/usb/composite.h | 1 | ||||
| -rw-r--r-- | include/linux/usb/otg.h | 68 | ||||
| -rw-r--r-- | include/linux/usb/ulpi.h | 7 | ||||
| -rw-r--r-- | include/linux/usb_usual.h | 4 |
19 files changed, 465 insertions, 57 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 2ea3e4921812..2a73d9bcbc9c 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -558,7 +558,7 @@ extern void wait_for_device_probe(void); | |||
| 558 | #ifdef CONFIG_DEVTMPFS | 558 | #ifdef CONFIG_DEVTMPFS |
| 559 | extern int devtmpfs_create_node(struct device *dev); | 559 | extern int devtmpfs_create_node(struct device *dev); |
| 560 | extern int devtmpfs_delete_node(struct device *dev); | 560 | extern int devtmpfs_delete_node(struct device *dev); |
| 561 | extern int devtmpfs_mount(const char *mountpoint); | 561 | extern int devtmpfs_mount(const char *mntdir); |
| 562 | #else | 562 | #else |
| 563 | static inline int devtmpfs_create_node(struct device *dev) { return 0; } | 563 | static inline int devtmpfs_create_node(struct device *dev) { return 0; } |
| 564 | static inline int devtmpfs_delete_node(struct device *dev) { return 0; } | 564 | static inline int devtmpfs_delete_node(struct device *dev) { return 0; } |
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h index 121720d74e15..2dfa7076e8b6 100644 --- a/include/linux/ext2_fs.h +++ b/include/linux/ext2_fs.h | |||
| @@ -565,14 +565,14 @@ struct ext2_dir_entry_2 { | |||
| 565 | * other bits are reserved for now. | 565 | * other bits are reserved for now. |
| 566 | */ | 566 | */ |
| 567 | enum { | 567 | enum { |
| 568 | EXT2_FT_UNKNOWN, | 568 | EXT2_FT_UNKNOWN = 0, |
| 569 | EXT2_FT_REG_FILE, | 569 | EXT2_FT_REG_FILE = 1, |
| 570 | EXT2_FT_DIR, | 570 | EXT2_FT_DIR = 2, |
| 571 | EXT2_FT_CHRDEV, | 571 | EXT2_FT_CHRDEV = 3, |
| 572 | EXT2_FT_BLKDEV, | 572 | EXT2_FT_BLKDEV = 4, |
| 573 | EXT2_FT_FIFO, | 573 | EXT2_FT_FIFO = 5, |
| 574 | EXT2_FT_SOCK, | 574 | EXT2_FT_SOCK = 6, |
| 575 | EXT2_FT_SYMLINK, | 575 | EXT2_FT_SYMLINK = 7, |
| 576 | EXT2_FT_MAX | 576 | EXT2_FT_MAX |
| 577 | }; | 577 | }; |
| 578 | 578 | ||
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 7499b3667798..6b049030fbe6 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
| @@ -918,6 +918,8 @@ extern void ext3_abort (struct super_block *, const char *, const char *, ...) | |||
| 918 | __attribute__ ((format (printf, 3, 4))); | 918 | __attribute__ ((format (printf, 3, 4))); |
| 919 | extern void ext3_warning (struct super_block *, const char *, const char *, ...) | 919 | extern void ext3_warning (struct super_block *, const char *, const char *, ...) |
| 920 | __attribute__ ((format (printf, 3, 4))); | 920 | __attribute__ ((format (printf, 3, 4))); |
| 921 | extern void ext3_msg(struct super_block *, const char *, const char *, ...) | ||
| 922 | __attribute__ ((format (printf, 3, 4))); | ||
| 921 | extern void ext3_update_dynamic_rev (struct super_block *sb); | 923 | extern void ext3_update_dynamic_rev (struct super_block *sb); |
| 922 | 924 | ||
| 923 | #define ext3_std_error(sb, errno) \ | 925 | #define ext3_std_error(sb, errno) \ |
diff --git a/include/linux/firmware.h b/include/linux/firmware.h index d31544628436..043811f0d277 100644 --- a/include/linux/firmware.h +++ b/include/linux/firmware.h | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | #include <linux/module.h> | 4 | #include <linux/module.h> |
| 5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
| 6 | #include <linux/compiler.h> | 6 | #include <linux/compiler.h> |
| 7 | #include <linux/gfp.h> | ||
| 7 | 8 | ||
| 8 | #define FW_ACTION_NOHOTPLUG 0 | 9 | #define FW_ACTION_NOHOTPLUG 0 |
| 9 | #define FW_ACTION_HOTPLUG 1 | 10 | #define FW_ACTION_HOTPLUG 1 |
| @@ -38,7 +39,7 @@ int request_firmware(const struct firmware **fw, const char *name, | |||
| 38 | struct device *device); | 39 | struct device *device); |
| 39 | int request_firmware_nowait( | 40 | int request_firmware_nowait( |
| 40 | struct module *module, int uevent, | 41 | struct module *module, int uevent, |
| 41 | const char *name, struct device *device, void *context, | 42 | const char *name, struct device *device, gfp_t gfp, void *context, |
| 42 | void (*cont)(const struct firmware *fw, void *context)); | 43 | void (*cont)(const struct firmware *fw, void *context)); |
| 43 | 44 | ||
| 44 | void release_firmware(const struct firmware *fw); | 45 | void release_firmware(const struct firmware *fw); |
| @@ -51,7 +52,7 @@ static inline int request_firmware(const struct firmware **fw, | |||
| 51 | } | 52 | } |
| 52 | static inline int request_firmware_nowait( | 53 | static inline int request_firmware_nowait( |
| 53 | struct module *module, int uevent, | 54 | struct module *module, int uevent, |
| 54 | const char *name, struct device *device, void *context, | 55 | const char *name, struct device *device, gfp_t gfp, void *context, |
| 55 | void (*cont)(const struct firmware *fw, void *context)) | 56 | void (*cont)(const struct firmware *fw, void *context)) |
| 56 | { | 57 | { |
| 57 | return -EINVAL; | 58 | return -EINVAL; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 891f7d642e5c..a057f48eb156 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -2091,8 +2091,6 @@ extern int filemap_fdatawait_range(struct address_space *, loff_t lstart, | |||
| 2091 | extern int filemap_write_and_wait(struct address_space *mapping); | 2091 | extern int filemap_write_and_wait(struct address_space *mapping); |
| 2092 | extern int filemap_write_and_wait_range(struct address_space *mapping, | 2092 | extern int filemap_write_and_wait_range(struct address_space *mapping, |
| 2093 | loff_t lstart, loff_t lend); | 2093 | loff_t lstart, loff_t lend); |
| 2094 | extern int wait_on_page_writeback_range(struct address_space *mapping, | ||
| 2095 | pgoff_t start, pgoff_t end); | ||
| 2096 | extern int __filemap_fdatawrite_range(struct address_space *mapping, | 2094 | extern int __filemap_fdatawrite_range(struct address_space *mapping, |
| 2097 | loff_t start, loff_t end, int sync_mode); | 2095 | loff_t start, loff_t end, int sync_mode); |
| 2098 | extern int filemap_fdatawrite_range(struct address_space *mapping, | 2096 | extern int filemap_fdatawrite_range(struct address_space *mapping, |
diff --git a/include/linux/namei.h b/include/linux/namei.h index ec0f607b364a..028946750289 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
| @@ -76,7 +76,6 @@ extern struct file *nameidata_to_filp(struct nameidata *nd, int flags); | |||
| 76 | extern void release_open_intent(struct nameidata *); | 76 | extern void release_open_intent(struct nameidata *); |
| 77 | 77 | ||
| 78 | extern struct dentry *lookup_one_len(const char *, struct dentry *, int); | 78 | extern struct dentry *lookup_one_len(const char *, struct dentry *, int); |
| 79 | extern struct dentry *lookup_one_noperm(const char *, struct dentry *); | ||
| 80 | 79 | ||
| 81 | extern int follow_down(struct path *); | 80 | extern int follow_down(struct path *); |
| 82 | extern int follow_up(struct path *); | 81 | extern int follow_up(struct path *); |
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h index ce520402e840..3fe02cf8b65a 100644 --- a/include/linux/nilfs2_fs.h +++ b/include/linux/nilfs2_fs.h | |||
| @@ -151,6 +151,8 @@ struct nilfs_super_root { | |||
| 151 | #define NILFS_MOUNT_BARRIER 0x1000 /* Use block barriers */ | 151 | #define NILFS_MOUNT_BARRIER 0x1000 /* Use block barriers */ |
| 152 | #define NILFS_MOUNT_STRICT_ORDER 0x2000 /* Apply strict in-order | 152 | #define NILFS_MOUNT_STRICT_ORDER 0x2000 /* Apply strict in-order |
| 153 | semantics also for data */ | 153 | semantics also for data */ |
| 154 | #define NILFS_MOUNT_NORECOVERY 0x4000 /* Disable write access during | ||
| 155 | mount-time recovery */ | ||
| 154 | 156 | ||
| 155 | 157 | ||
| 156 | /** | 158 | /** |
| @@ -403,6 +405,28 @@ struct nilfs_segment_summary { | |||
| 403 | #define NILFS_SS_GC 0x0010 /* segment written for cleaner operation */ | 405 | #define NILFS_SS_GC 0x0010 /* segment written for cleaner operation */ |
| 404 | 406 | ||
| 405 | /** | 407 | /** |
| 408 | * struct nilfs_btree_node - B-tree node | ||
| 409 | * @bn_flags: flags | ||
| 410 | * @bn_level: level | ||
| 411 | * @bn_nchildren: number of children | ||
| 412 | * @bn_pad: padding | ||
| 413 | */ | ||
| 414 | struct nilfs_btree_node { | ||
| 415 | __u8 bn_flags; | ||
| 416 | __u8 bn_level; | ||
| 417 | __le16 bn_nchildren; | ||
| 418 | __le32 bn_pad; | ||
| 419 | }; | ||
| 420 | |||
| 421 | /* flags */ | ||
| 422 | #define NILFS_BTREE_NODE_ROOT 0x01 | ||
| 423 | |||
| 424 | /* level */ | ||
| 425 | #define NILFS_BTREE_LEVEL_DATA 0 | ||
| 426 | #define NILFS_BTREE_LEVEL_NODE_MIN (NILFS_BTREE_LEVEL_DATA + 1) | ||
| 427 | #define NILFS_BTREE_LEVEL_MAX 14 | ||
| 428 | |||
| 429 | /** | ||
| 406 | * struct nilfs_palloc_group_desc - block group descriptor | 430 | * struct nilfs_palloc_group_desc - block group descriptor |
| 407 | * @pg_nfrees: number of free entries in block group | 431 | * @pg_nfrees: number of free entries in block group |
| 408 | */ | 432 | */ |
diff --git a/include/linux/omapfb.h b/include/linux/omapfb.h new file mode 100644 index 000000000000..f46c40ac6d45 --- /dev/null +++ b/include/linux/omapfb.h | |||
| @@ -0,0 +1,251 @@ | |||
| 1 | /* | ||
| 2 | * File: include/linux/omapfb.h | ||
| 3 | * | ||
| 4 | * Framebuffer driver for TI OMAP boards | ||
| 5 | * | ||
| 6 | * Copyright (C) 2004 Nokia Corporation | ||
| 7 | * Author: Imre Deak <imre.deak@nokia.com> | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify it | ||
| 10 | * under the terms of the GNU General Public License as published by the | ||
| 11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 12 | * option) any later version. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, but | ||
| 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 17 | * General Public License for more details. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 21 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
| 22 | */ | ||
| 23 | |||
| 24 | #ifndef __LINUX_OMAPFB_H__ | ||
| 25 | #define __LINUX_OMAPFB_H__ | ||
| 26 | |||
| 27 | #include <linux/fb.h> | ||
| 28 | #include <linux/ioctl.h> | ||
| 29 | #include <linux/types.h> | ||
| 30 | |||
| 31 | /* IOCTL commands. */ | ||
| 32 | |||
| 33 | #define OMAP_IOW(num, dtype) _IOW('O', num, dtype) | ||
| 34 | #define OMAP_IOR(num, dtype) _IOR('O', num, dtype) | ||
| 35 | #define OMAP_IOWR(num, dtype) _IOWR('O', num, dtype) | ||
| 36 | #define OMAP_IO(num) _IO('O', num) | ||
| 37 | |||
| 38 | #define OMAPFB_MIRROR OMAP_IOW(31, int) | ||
| 39 | #define OMAPFB_SYNC_GFX OMAP_IO(37) | ||
| 40 | #define OMAPFB_VSYNC OMAP_IO(38) | ||
| 41 | #define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int) | ||
| 42 | #define OMAPFB_GET_CAPS OMAP_IOR(42, struct omapfb_caps) | ||
| 43 | #define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int) | ||
| 44 | #define OMAPFB_LCD_TEST OMAP_IOW(45, int) | ||
| 45 | #define OMAPFB_CTRL_TEST OMAP_IOW(46, int) | ||
| 46 | #define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(47, struct omapfb_update_window_old) | ||
| 47 | #define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key) | ||
| 48 | #define OMAPFB_GET_COLOR_KEY OMAP_IOW(51, struct omapfb_color_key) | ||
| 49 | #define OMAPFB_SETUP_PLANE OMAP_IOW(52, struct omapfb_plane_info) | ||
| 50 | #define OMAPFB_QUERY_PLANE OMAP_IOW(53, struct omapfb_plane_info) | ||
| 51 | #define OMAPFB_UPDATE_WINDOW OMAP_IOW(54, struct omapfb_update_window) | ||
| 52 | #define OMAPFB_SETUP_MEM OMAP_IOW(55, struct omapfb_mem_info) | ||
| 53 | #define OMAPFB_QUERY_MEM OMAP_IOW(56, struct omapfb_mem_info) | ||
| 54 | #define OMAPFB_WAITFORVSYNC OMAP_IO(57) | ||
| 55 | #define OMAPFB_MEMORY_READ OMAP_IOR(58, struct omapfb_memory_read) | ||
| 56 | #define OMAPFB_GET_OVERLAY_COLORMODE OMAP_IOR(59, struct omapfb_ovl_colormode) | ||
| 57 | #define OMAPFB_WAITFORGO OMAP_IO(60) | ||
| 58 | #define OMAPFB_GET_VRAM_INFO OMAP_IOR(61, struct omapfb_vram_info) | ||
| 59 | #define OMAPFB_SET_TEARSYNC OMAP_IOW(62, struct omapfb_tearsync_info) | ||
| 60 | |||
| 61 | #define OMAPFB_CAPS_GENERIC_MASK 0x00000fff | ||
| 62 | #define OMAPFB_CAPS_LCDC_MASK 0x00fff000 | ||
| 63 | #define OMAPFB_CAPS_PANEL_MASK 0xff000000 | ||
| 64 | |||
| 65 | #define OMAPFB_CAPS_MANUAL_UPDATE 0x00001000 | ||
| 66 | #define OMAPFB_CAPS_TEARSYNC 0x00002000 | ||
| 67 | #define OMAPFB_CAPS_PLANE_RELOCATE_MEM 0x00004000 | ||
| 68 | #define OMAPFB_CAPS_PLANE_SCALE 0x00008000 | ||
| 69 | #define OMAPFB_CAPS_WINDOW_PIXEL_DOUBLE 0x00010000 | ||
| 70 | #define OMAPFB_CAPS_WINDOW_SCALE 0x00020000 | ||
| 71 | #define OMAPFB_CAPS_WINDOW_OVERLAY 0x00040000 | ||
| 72 | #define OMAPFB_CAPS_WINDOW_ROTATE 0x00080000 | ||
| 73 | #define OMAPFB_CAPS_SET_BACKLIGHT 0x01000000 | ||
| 74 | |||
| 75 | /* Values from DSP must map to lower 16-bits */ | ||
| 76 | #define OMAPFB_FORMAT_MASK 0x00ff | ||
| 77 | #define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100 | ||
| 78 | #define OMAPFB_FORMAT_FLAG_TEARSYNC 0x0200 | ||
| 79 | #define OMAPFB_FORMAT_FLAG_FORCE_VSYNC 0x0400 | ||
| 80 | #define OMAPFB_FORMAT_FLAG_ENABLE_OVERLAY 0x0800 | ||
| 81 | #define OMAPFB_FORMAT_FLAG_DISABLE_OVERLAY 0x1000 | ||
| 82 | |||
| 83 | #define OMAPFB_MEMTYPE_SDRAM 0 | ||
| 84 | #define OMAPFB_MEMTYPE_SRAM 1 | ||
| 85 | #define OMAPFB_MEMTYPE_MAX 1 | ||
| 86 | |||
| 87 | enum omapfb_color_format { | ||
| 88 | OMAPFB_COLOR_RGB565 = 0, | ||
| 89 | OMAPFB_COLOR_YUV422, | ||
| 90 | OMAPFB_COLOR_YUV420, | ||
| 91 | OMAPFB_COLOR_CLUT_8BPP, | ||
| 92 | OMAPFB_COLOR_CLUT_4BPP, | ||
| 93 | OMAPFB_COLOR_CLUT_2BPP, | ||
| 94 | OMAPFB_COLOR_CLUT_1BPP, | ||
| 95 | OMAPFB_COLOR_RGB444, | ||
| 96 | OMAPFB_COLOR_YUY422, | ||
| 97 | |||
| 98 | OMAPFB_COLOR_ARGB16, | ||
| 99 | OMAPFB_COLOR_RGB24U, /* RGB24, 32-bit container */ | ||
| 100 | OMAPFB_COLOR_RGB24P, /* RGB24, 24-bit container */ | ||
| 101 | OMAPFB_COLOR_ARGB32, | ||
| 102 | OMAPFB_COLOR_RGBA32, | ||
| 103 | OMAPFB_COLOR_RGBX32, | ||
| 104 | }; | ||
| 105 | |||
| 106 | struct omapfb_update_window { | ||
| 107 | __u32 x, y; | ||
| 108 | __u32 width, height; | ||
| 109 | __u32 format; | ||
| 110 | __u32 out_x, out_y; | ||
| 111 | __u32 out_width, out_height; | ||
| 112 | __u32 reserved[8]; | ||
| 113 | }; | ||
| 114 | |||
| 115 | struct omapfb_update_window_old { | ||
| 116 | __u32 x, y; | ||
| 117 | __u32 width, height; | ||
| 118 | __u32 format; | ||
| 119 | }; | ||
| 120 | |||
| 121 | enum omapfb_plane { | ||
| 122 | OMAPFB_PLANE_GFX = 0, | ||
| 123 | OMAPFB_PLANE_VID1, | ||
| 124 | OMAPFB_PLANE_VID2, | ||
| 125 | }; | ||
| 126 | |||
| 127 | enum omapfb_channel_out { | ||
| 128 | OMAPFB_CHANNEL_OUT_LCD = 0, | ||
| 129 | OMAPFB_CHANNEL_OUT_DIGIT, | ||
| 130 | }; | ||
| 131 | |||
| 132 | struct omapfb_plane_info { | ||
| 133 | __u32 pos_x; | ||
| 134 | __u32 pos_y; | ||
| 135 | __u8 enabled; | ||
| 136 | __u8 channel_out; | ||
| 137 | __u8 mirror; | ||
| 138 | __u8 reserved1; | ||
| 139 | __u32 out_width; | ||
| 140 | __u32 out_height; | ||
| 141 | __u32 reserved2[12]; | ||
| 142 | }; | ||
| 143 | |||
| 144 | struct omapfb_mem_info { | ||
| 145 | __u32 size; | ||
| 146 | __u8 type; | ||
| 147 | __u8 reserved[3]; | ||
| 148 | }; | ||
| 149 | |||
| 150 | struct omapfb_caps { | ||
| 151 | __u32 ctrl; | ||
| 152 | __u32 plane_color; | ||
| 153 | __u32 wnd_color; | ||
| 154 | }; | ||
| 155 | |||
| 156 | enum omapfb_color_key_type { | ||
| 157 | OMAPFB_COLOR_KEY_DISABLED = 0, | ||
| 158 | OMAPFB_COLOR_KEY_GFX_DST, | ||
| 159 | OMAPFB_COLOR_KEY_VID_SRC, | ||
| 160 | }; | ||
| 161 | |||
| 162 | struct omapfb_color_key { | ||
| 163 | __u8 channel_out; | ||
| 164 | __u32 background; | ||
| 165 | __u32 trans_key; | ||
| 166 | __u8 key_type; | ||
| 167 | }; | ||
| 168 | |||
| 169 | enum omapfb_update_mode { | ||
| 170 | OMAPFB_UPDATE_DISABLED = 0, | ||
| 171 | OMAPFB_AUTO_UPDATE, | ||
| 172 | OMAPFB_MANUAL_UPDATE | ||
| 173 | }; | ||
| 174 | |||
| 175 | struct omapfb_memory_read { | ||
| 176 | __u16 x; | ||
| 177 | __u16 y; | ||
| 178 | __u16 w; | ||
| 179 | __u16 h; | ||
| 180 | size_t buffer_size; | ||
| 181 | void __user *buffer; | ||
| 182 | }; | ||
| 183 | |||
| 184 | struct omapfb_ovl_colormode { | ||
| 185 | __u8 overlay_idx; | ||
| 186 | __u8 mode_idx; | ||
| 187 | __u32 bits_per_pixel; | ||
| 188 | __u32 nonstd; | ||
| 189 | struct fb_bitfield red; | ||
| 190 | struct fb_bitfield green; | ||
| 191 | struct fb_bitfield blue; | ||
| 192 | struct fb_bitfield transp; | ||
| 193 | }; | ||
| 194 | |||
| 195 | struct omapfb_vram_info { | ||
| 196 | __u32 total; | ||
| 197 | __u32 free; | ||
| 198 | __u32 largest_free_block; | ||
| 199 | __u32 reserved[5]; | ||
| 200 | }; | ||
| 201 | |||
| 202 | struct omapfb_tearsync_info { | ||
| 203 | __u8 enabled; | ||
| 204 | __u8 reserved1[3]; | ||
| 205 | __u16 line; | ||
| 206 | __u16 reserved2; | ||
| 207 | }; | ||
| 208 | |||
| 209 | #ifdef __KERNEL__ | ||
| 210 | |||
| 211 | #include <plat/board.h> | ||
| 212 | |||
| 213 | #ifdef CONFIG_ARCH_OMAP1 | ||
| 214 | #define OMAPFB_PLANE_NUM 1 | ||
| 215 | #else | ||
| 216 | #define OMAPFB_PLANE_NUM 3 | ||
| 217 | #endif | ||
| 218 | |||
| 219 | struct omapfb_mem_region { | ||
| 220 | u32 paddr; | ||
| 221 | void __iomem *vaddr; | ||
| 222 | unsigned long size; | ||
| 223 | u8 type; /* OMAPFB_PLANE_MEM_* */ | ||
| 224 | enum omapfb_color_format format;/* OMAPFB_COLOR_* */ | ||
| 225 | unsigned format_used:1; /* Must be set when format is set. | ||
| 226 | * Needed b/c of the badly chosen 0 | ||
| 227 | * base for OMAPFB_COLOR_* values | ||
| 228 | */ | ||
| 229 | unsigned alloc:1; /* allocated by the driver */ | ||
| 230 | unsigned map:1; /* kernel mapped by the driver */ | ||
| 231 | }; | ||
| 232 | |||
| 233 | struct omapfb_mem_desc { | ||
| 234 | int region_cnt; | ||
| 235 | struct omapfb_mem_region region[OMAPFB_PLANE_NUM]; | ||
| 236 | }; | ||
| 237 | |||
| 238 | struct omapfb_platform_data { | ||
| 239 | struct omap_lcd_config lcd; | ||
| 240 | struct omapfb_mem_desc mem_desc; | ||
| 241 | void *ctrl_platform_data; | ||
| 242 | }; | ||
| 243 | |||
| 244 | /* in arch/arm/plat-omap/fb.c */ | ||
| 245 | extern void omapfb_set_platform_data(struct omapfb_platform_data *data); | ||
| 246 | extern void omapfb_set_ctrl_platform_data(void *pdata); | ||
| 247 | extern void omapfb_reserve_sdram(void); | ||
| 248 | |||
| 249 | #endif | ||
| 250 | |||
| 251 | #endif /* __OMAPFB_H */ | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index f5c7cd343e56..04771b9c3316 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -218,6 +218,7 @@ struct pci_dev { | |||
| 218 | unsigned int class; /* 3 bytes: (base,sub,prog-if) */ | 218 | unsigned int class; /* 3 bytes: (base,sub,prog-if) */ |
| 219 | u8 revision; /* PCI revision, low byte of class word */ | 219 | u8 revision; /* PCI revision, low byte of class word */ |
| 220 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ | 220 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ |
| 221 | u8 pcie_cap; /* PCI-E capability offset */ | ||
| 221 | u8 pcie_type; /* PCI-E device/port type */ | 222 | u8 pcie_type; /* PCI-E device/port type */ |
| 222 | u8 rom_base_reg; /* which config register controls the ROM */ | 223 | u8 rom_base_reg; /* which config register controls the ROM */ |
| 223 | u8 pin; /* which interrupt pin this device uses */ | 224 | u8 pin; /* which interrupt pin this device uses */ |
| @@ -280,6 +281,7 @@ struct pci_dev { | |||
| 280 | unsigned int is_virtfn:1; | 281 | unsigned int is_virtfn:1; |
| 281 | unsigned int reset_fn:1; | 282 | unsigned int reset_fn:1; |
| 282 | unsigned int is_hotplug_bridge:1; | 283 | unsigned int is_hotplug_bridge:1; |
| 284 | unsigned int aer_firmware_first:1; | ||
| 283 | pci_dev_flags_t dev_flags; | 285 | pci_dev_flags_t dev_flags; |
| 284 | atomic_t enable_cnt; /* pci_enable_device has been called */ | 286 | atomic_t enable_cnt; /* pci_enable_device has been called */ |
| 285 | 287 | ||
| @@ -635,7 +637,13 @@ struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, | |||
| 635 | unsigned int ss_vendor, unsigned int ss_device, | 637 | unsigned int ss_vendor, unsigned int ss_device, |
| 636 | struct pci_dev *from); | 638 | struct pci_dev *from); |
| 637 | struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn); | 639 | struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn); |
| 638 | struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn); | 640 | struct pci_dev *pci_get_domain_bus_and_slot(int domain, unsigned int bus, |
| 641 | unsigned int devfn); | ||
| 642 | static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus, | ||
| 643 | unsigned int devfn) | ||
| 644 | { | ||
| 645 | return pci_get_domain_bus_and_slot(0, bus, devfn); | ||
| 646 | } | ||
| 639 | struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from); | 647 | struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from); |
| 640 | int pci_dev_present(const struct pci_device_id *ids); | 648 | int pci_dev_present(const struct pci_device_id *ids); |
| 641 | 649 | ||
| @@ -701,6 +709,7 @@ void pci_disable_device(struct pci_dev *dev); | |||
| 701 | void pci_set_master(struct pci_dev *dev); | 709 | void pci_set_master(struct pci_dev *dev); |
| 702 | void pci_clear_master(struct pci_dev *dev); | 710 | void pci_clear_master(struct pci_dev *dev); |
| 703 | int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); | 711 | int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); |
| 712 | int pci_set_cacheline_size(struct pci_dev *dev); | ||
| 704 | #define HAVE_PCI_SET_MWI | 713 | #define HAVE_PCI_SET_MWI |
| 705 | int __must_check pci_set_mwi(struct pci_dev *dev); | 714 | int __must_check pci_set_mwi(struct pci_dev *dev); |
| 706 | int pci_try_set_mwi(struct pci_dev *dev); | 715 | int pci_try_set_mwi(struct pci_dev *dev); |
| @@ -1246,6 +1255,8 @@ extern int pci_pci_problems; | |||
| 1246 | 1255 | ||
| 1247 | extern unsigned long pci_cardbus_io_size; | 1256 | extern unsigned long pci_cardbus_io_size; |
| 1248 | extern unsigned long pci_cardbus_mem_size; | 1257 | extern unsigned long pci_cardbus_mem_size; |
| 1258 | extern u8 pci_dfl_cache_line_size; | ||
| 1259 | extern u8 pci_cache_line_size; | ||
| 1249 | 1260 | ||
| 1250 | extern unsigned long pci_hotplug_io_size; | 1261 | extern unsigned long pci_hotplug_io_size; |
| 1251 | extern unsigned long pci_hotplug_mem_size; | 1262 | extern unsigned long pci_hotplug_mem_size; |
| @@ -1290,5 +1301,34 @@ extern void pci_hp_create_module_link(struct pci_slot *pci_slot); | |||
| 1290 | extern void pci_hp_remove_module_link(struct pci_slot *pci_slot); | 1301 | extern void pci_hp_remove_module_link(struct pci_slot *pci_slot); |
| 1291 | #endif | 1302 | #endif |
| 1292 | 1303 | ||
| 1304 | /** | ||
| 1305 | * pci_pcie_cap - get the saved PCIe capability offset | ||
| 1306 | * @dev: PCI device | ||
| 1307 | * | ||
| 1308 | * PCIe capability offset is calculated at PCI device initialization | ||
| 1309 | * time and saved in the data structure. This function returns saved | ||
| 1310 | * PCIe capability offset. Using this instead of pci_find_capability() | ||
| 1311 | * reduces unnecessary search in the PCI configuration space. If you | ||
| 1312 | * need to calculate PCIe capability offset from raw device for some | ||
| 1313 | * reasons, please use pci_find_capability() instead. | ||
| 1314 | */ | ||
| 1315 | static inline int pci_pcie_cap(struct pci_dev *dev) | ||
| 1316 | { | ||
| 1317 | return dev->pcie_cap; | ||
| 1318 | } | ||
| 1319 | |||
| 1320 | /** | ||
| 1321 | * pci_is_pcie - check if the PCI device is PCI Express capable | ||
| 1322 | * @dev: PCI device | ||
| 1323 | * | ||
| 1324 | * Retrun true if the PCI device is PCI Express capable, false otherwise. | ||
| 1325 | */ | ||
| 1326 | static inline bool pci_is_pcie(struct pci_dev *dev) | ||
| 1327 | { | ||
| 1328 | return !!pci_pcie_cap(dev); | ||
| 1329 | } | ||
| 1330 | |||
| 1331 | void pci_request_acs(void); | ||
| 1332 | |||
| 1293 | #endif /* __KERNEL__ */ | 1333 | #endif /* __KERNEL__ */ |
| 1294 | #endif /* LINUX_PCI_H */ | 1334 | #endif /* LINUX_PCI_H */ |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index dd0bed4f1cf0..9f2ad0aa3c39 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
| @@ -365,6 +365,11 @@ | |||
| 365 | #define PCI_X_STATUS_266MHZ 0x40000000 /* 266 MHz capable */ | 365 | #define PCI_X_STATUS_266MHZ 0x40000000 /* 266 MHz capable */ |
| 366 | #define PCI_X_STATUS_533MHZ 0x80000000 /* 533 MHz capable */ | 366 | #define PCI_X_STATUS_533MHZ 0x80000000 /* 533 MHz capable */ |
| 367 | 367 | ||
| 368 | /* PCI Bridge Subsystem ID registers */ | ||
| 369 | |||
| 370 | #define PCI_SSVID_VENDOR_ID 4 /* PCI-Bridge subsystem vendor id register */ | ||
| 371 | #define PCI_SSVID_DEVICE_ID 6 /* PCI-Bridge subsystem device id register */ | ||
| 372 | |||
| 368 | /* PCI Express capability registers */ | 373 | /* PCI Express capability registers */ |
| 369 | 374 | ||
| 370 | #define PCI_EXP_FLAGS 2 /* Capabilities register */ | 375 | #define PCI_EXP_FLAGS 2 /* Capabilities register */ |
| @@ -502,6 +507,7 @@ | |||
| 502 | #define PCI_EXT_CAP_ID_VC 2 | 507 | #define PCI_EXT_CAP_ID_VC 2 |
| 503 | #define PCI_EXT_CAP_ID_DSN 3 | 508 | #define PCI_EXT_CAP_ID_DSN 3 |
| 504 | #define PCI_EXT_CAP_ID_PWR 4 | 509 | #define PCI_EXT_CAP_ID_PWR 4 |
| 510 | #define PCI_EXT_CAP_ID_ACS 13 | ||
| 505 | #define PCI_EXT_CAP_ID_ARI 14 | 511 | #define PCI_EXT_CAP_ID_ARI 14 |
| 506 | #define PCI_EXT_CAP_ID_ATS 15 | 512 | #define PCI_EXT_CAP_ID_ATS 15 |
| 507 | #define PCI_EXT_CAP_ID_SRIOV 16 | 513 | #define PCI_EXT_CAP_ID_SRIOV 16 |
| @@ -662,4 +668,16 @@ | |||
| 662 | #define PCI_SRIOV_VFM_MO 0x2 /* Active.MigrateOut */ | 668 | #define PCI_SRIOV_VFM_MO 0x2 /* Active.MigrateOut */ |
| 663 | #define PCI_SRIOV_VFM_AV 0x3 /* Active.Available */ | 669 | #define PCI_SRIOV_VFM_AV 0x3 /* Active.Available */ |
| 664 | 670 | ||
| 671 | /* Access Control Service */ | ||
| 672 | #define PCI_ACS_CAP 0x04 /* ACS Capability Register */ | ||
| 673 | #define PCI_ACS_SV 0x01 /* Source Validation */ | ||
| 674 | #define PCI_ACS_TB 0x02 /* Translation Blocking */ | ||
| 675 | #define PCI_ACS_RR 0x04 /* P2P Request Redirect */ | ||
| 676 | #define PCI_ACS_CR 0x08 /* P2P Completion Redirect */ | ||
| 677 | #define PCI_ACS_UF 0x10 /* Upstream Forwarding */ | ||
| 678 | #define PCI_ACS_EC 0x20 /* P2P Egress Control */ | ||
| 679 | #define PCI_ACS_DT 0x40 /* Direct Translated P2P */ | ||
| 680 | #define PCI_ACS_CTRL 0x06 /* ACS Control Register */ | ||
| 681 | #define PCI_ACS_EGRESS_CTL_V 0x08 /* ACS Egress Control Vector */ | ||
| 682 | |||
| 665 | #endif /* LINUX_PCI_REGS_H */ | 683 | #endif /* LINUX_PCI_REGS_H */ |
diff --git a/include/linux/pcieport_if.h b/include/linux/pcieport_if.h index b4c79545330b..6775532b92a9 100644 --- a/include/linux/pcieport_if.h +++ b/include/linux/pcieport_if.h | |||
| @@ -10,10 +10,7 @@ | |||
| 10 | #define _PCIEPORT_IF_H_ | 10 | #define _PCIEPORT_IF_H_ |
| 11 | 11 | ||
| 12 | /* Port Type */ | 12 | /* Port Type */ |
| 13 | #define PCIE_RC_PORT 4 /* Root port of RC */ | 13 | #define PCIE_ANY_PORT (~0) |
| 14 | #define PCIE_SW_UPSTREAM_PORT 5 /* Upstream port of Switch */ | ||
| 15 | #define PCIE_SW_DOWNSTREAM_PORT 6 /* Downstream port of Switch */ | ||
| 16 | #define PCIE_ANY_PORT 7 | ||
| 17 | 14 | ||
| 18 | /* Service Type */ | 15 | /* Service Type */ |
| 19 | #define PCIE_PORT_SERVICE_PME_SHIFT 0 /* Power Management Event */ | 16 | #define PCIE_PORT_SERVICE_PME_SHIFT 0 /* Power Management Event */ |
| @@ -25,17 +22,6 @@ | |||
| 25 | #define PCIE_PORT_SERVICE_VC_SHIFT 3 /* Virtual Channel */ | 22 | #define PCIE_PORT_SERVICE_VC_SHIFT 3 /* Virtual Channel */ |
| 26 | #define PCIE_PORT_SERVICE_VC (1 << PCIE_PORT_SERVICE_VC_SHIFT) | 23 | #define PCIE_PORT_SERVICE_VC (1 << PCIE_PORT_SERVICE_VC_SHIFT) |
| 27 | 24 | ||
| 28 | /* Root/Upstream/Downstream Port's Interrupt Mode */ | ||
| 29 | #define PCIE_PORT_NO_IRQ (-1) | ||
| 30 | #define PCIE_PORT_INTx_MODE 0 | ||
| 31 | #define PCIE_PORT_MSI_MODE 1 | ||
| 32 | #define PCIE_PORT_MSIX_MODE 2 | ||
| 33 | |||
| 34 | struct pcie_port_data { | ||
| 35 | int port_type; /* Type of the port */ | ||
| 36 | int port_irq_mode; /* [0:INTx | 1:MSI | 2:MSI-X] */ | ||
| 37 | }; | ||
| 38 | |||
| 39 | struct pcie_device { | 25 | struct pcie_device { |
| 40 | int irq; /* Service IRQ/MSI/MSI-X Vector */ | 26 | int irq; /* Service IRQ/MSI/MSI-X Vector */ |
| 41 | struct pci_dev *port; /* Root/Upstream/Downstream Port */ | 27 | struct pci_dev *port; /* Root/Upstream/Downstream Port */ |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 3c6675c2444b..71ff887ca44e 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
| @@ -83,6 +83,8 @@ struct early_platform_driver { | |||
| 83 | struct platform_driver *pdrv; | 83 | struct platform_driver *pdrv; |
| 84 | struct list_head list; | 84 | struct list_head list; |
| 85 | int requested_id; | 85 | int requested_id; |
| 86 | char *buffer; | ||
| 87 | int bufsize; | ||
| 86 | }; | 88 | }; |
| 87 | 89 | ||
| 88 | #define EARLY_PLATFORM_ID_UNSET -2 | 90 | #define EARLY_PLATFORM_ID_UNSET -2 |
| @@ -102,21 +104,29 @@ extern int early_platform_driver_probe(char *class_str, | |||
| 102 | int nr_probe, int user_only); | 104 | int nr_probe, int user_only); |
| 103 | extern void early_platform_cleanup(void); | 105 | extern void early_platform_cleanup(void); |
| 104 | 106 | ||
| 107 | #define early_platform_init(class_string, platdrv) \ | ||
| 108 | early_platform_init_buffer(class_string, platdrv, NULL, 0) | ||
| 105 | 109 | ||
| 106 | #ifndef MODULE | 110 | #ifndef MODULE |
| 107 | #define early_platform_init(class_string, platform_driver) \ | 111 | #define early_platform_init_buffer(class_string, platdrv, buf, bufsiz) \ |
| 108 | static __initdata struct early_platform_driver early_driver = { \ | 112 | static __initdata struct early_platform_driver early_driver = { \ |
| 109 | .class_str = class_string, \ | 113 | .class_str = class_string, \ |
| 110 | .pdrv = platform_driver, \ | 114 | .buffer = buf, \ |
| 115 | .bufsize = bufsiz, \ | ||
| 116 | .pdrv = platdrv, \ | ||
| 111 | .requested_id = EARLY_PLATFORM_ID_UNSET, \ | 117 | .requested_id = EARLY_PLATFORM_ID_UNSET, \ |
| 112 | }; \ | 118 | }; \ |
| 113 | static int __init early_platform_driver_setup_func(char *buf) \ | 119 | static int __init early_platform_driver_setup_func(char *buffer) \ |
| 114 | { \ | 120 | { \ |
| 115 | return early_platform_driver_register(&early_driver, buf); \ | 121 | return early_platform_driver_register(&early_driver, buffer); \ |
| 116 | } \ | 122 | } \ |
| 117 | early_param(class_string, early_platform_driver_setup_func) | 123 | early_param(class_string, early_platform_driver_setup_func) |
| 118 | #else /* MODULE */ | 124 | #else /* MODULE */ |
| 119 | #define early_platform_init(class_string, platform_driver) | 125 | #define early_platform_init_buffer(class_string, platdrv, buf, bufsiz) \ |
| 126 | static inline char *early_platform_driver_setup_func(void) \ | ||
| 127 | { \ | ||
| 128 | return bufsiz ? buf : NULL; \ | ||
| 129 | } | ||
| 120 | #endif /* MODULE */ | 130 | #endif /* MODULE */ |
| 121 | 131 | ||
| 122 | #endif /* _PLATFORM_DEVICE_H_ */ | 132 | #endif /* _PLATFORM_DEVICE_H_ */ |
diff --git a/include/linux/quota.h b/include/linux/quota.h index ce9a9b2e5cd4..e70e62194243 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
| @@ -73,6 +73,8 @@ | |||
| 73 | /* Quota format type IDs */ | 73 | /* Quota format type IDs */ |
| 74 | #define QFMT_VFS_OLD 1 | 74 | #define QFMT_VFS_OLD 1 |
| 75 | #define QFMT_VFS_V0 2 | 75 | #define QFMT_VFS_V0 2 |
| 76 | #define QFMT_OCFS2 3 | ||
| 77 | #define QFMT_VFS_V1 4 | ||
| 76 | 78 | ||
| 77 | /* Size of block in which space limits are passed through the quota | 79 | /* Size of block in which space limits are passed through the quota |
| 78 | * interface */ | 80 | * interface */ |
| @@ -334,7 +336,7 @@ struct quotactl_ops { | |||
| 334 | 336 | ||
| 335 | struct quota_format_type { | 337 | struct quota_format_type { |
| 336 | int qf_fmt_id; /* Quota format id */ | 338 | int qf_fmt_id; /* Quota format id */ |
| 337 | struct quota_format_ops *qf_ops; /* Operations of format */ | 339 | const struct quota_format_ops *qf_ops; /* Operations of format */ |
| 338 | struct module *qf_owner; /* Module implementing quota format */ | 340 | struct module *qf_owner; /* Module implementing quota format */ |
| 339 | struct quota_format_type *qf_next; | 341 | struct quota_format_type *qf_next; |
| 340 | }; | 342 | }; |
| @@ -394,7 +396,7 @@ struct quota_info { | |||
| 394 | struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */ | 396 | struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */ |
| 395 | struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ | 397 | struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ |
| 396 | struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ | 398 | struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ |
| 397 | struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ | 399 | const struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ |
| 398 | }; | 400 | }; |
| 399 | 401 | ||
| 400 | int register_quota_format(struct quota_format_type *fmt); | 402 | int register_quota_format(struct quota_format_type *fmt); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index bc70c5810fec..939a61507ac5 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -834,4 +834,8 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[]); | |||
| 834 | asmlinkage long sys_perf_event_open( | 834 | asmlinkage long sys_perf_event_open( |
| 835 | struct perf_event_attr __user *attr_uptr, | 835 | struct perf_event_attr __user *attr_uptr, |
| 836 | pid_t pid, int cpu, int group_fd, unsigned long flags); | 836 | pid_t pid, int cpu, int group_fd, unsigned long flags); |
| 837 | |||
| 838 | asmlinkage long sys_mmap_pgoff(unsigned long addr, unsigned long len, | ||
| 839 | unsigned long prot, unsigned long flags, | ||
| 840 | unsigned long fd, unsigned long pgoff); | ||
| 837 | #endif | 841 | #endif |
diff --git a/include/linux/usb.h b/include/linux/usb.h index a34fa89f1474..e101a2d04d75 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -331,6 +331,7 @@ struct usb_bus { | |||
| 331 | u8 otg_port; /* 0, or number of OTG/HNP port */ | 331 | u8 otg_port; /* 0, or number of OTG/HNP port */ |
| 332 | unsigned is_b_host:1; /* true during some HNP roleswitches */ | 332 | unsigned is_b_host:1; /* true during some HNP roleswitches */ |
| 333 | unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */ | 333 | unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */ |
| 334 | unsigned sg_tablesize; /* 0 or largest number of sg list entries */ | ||
| 334 | 335 | ||
| 335 | int devnum_next; /* Next open device number in | 336 | int devnum_next; /* Next open device number in |
| 336 | * round-robin allocation */ | 337 | * round-robin allocation */ |
| @@ -428,11 +429,9 @@ struct usb_tt; | |||
| 428 | * @last_busy: time of last use | 429 | * @last_busy: time of last use |
| 429 | * @autosuspend_delay: in jiffies | 430 | * @autosuspend_delay: in jiffies |
| 430 | * @connect_time: time device was first connected | 431 | * @connect_time: time device was first connected |
| 431 | * @auto_pm: autosuspend/resume in progress | ||
| 432 | * @do_remote_wakeup: remote wakeup should be enabled | 432 | * @do_remote_wakeup: remote wakeup should be enabled |
| 433 | * @reset_resume: needs reset instead of resume | 433 | * @reset_resume: needs reset instead of resume |
| 434 | * @autosuspend_disabled: autosuspend disabled by the user | 434 | * @autosuspend_disabled: autosuspend disabled by the user |
| 435 | * @autoresume_disabled: autoresume disabled by the user | ||
| 436 | * @skip_sys_resume: skip the next system resume | 435 | * @skip_sys_resume: skip the next system resume |
| 437 | * @wusb_dev: if this is a Wireless USB device, link to the WUSB | 436 | * @wusb_dev: if this is a Wireless USB device, link to the WUSB |
| 438 | * specific data for the device. | 437 | * specific data for the device. |
| @@ -513,11 +512,9 @@ struct usb_device { | |||
| 513 | int autosuspend_delay; | 512 | int autosuspend_delay; |
| 514 | unsigned long connect_time; | 513 | unsigned long connect_time; |
| 515 | 514 | ||
| 516 | unsigned auto_pm:1; | ||
| 517 | unsigned do_remote_wakeup:1; | 515 | unsigned do_remote_wakeup:1; |
| 518 | unsigned reset_resume:1; | 516 | unsigned reset_resume:1; |
| 519 | unsigned autosuspend_disabled:1; | 517 | unsigned autosuspend_disabled:1; |
| 520 | unsigned autoresume_disabled:1; | ||
| 521 | unsigned skip_sys_resume:1; | 518 | unsigned skip_sys_resume:1; |
| 522 | #endif | 519 | #endif |
| 523 | struct wusb_dev *wusb_dev; | 520 | struct wusb_dev *wusb_dev; |
| @@ -543,22 +540,20 @@ extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id); | |||
| 543 | 540 | ||
| 544 | /* USB autosuspend and autoresume */ | 541 | /* USB autosuspend and autoresume */ |
| 545 | #ifdef CONFIG_USB_SUSPEND | 542 | #ifdef CONFIG_USB_SUSPEND |
| 546 | extern int usb_autopm_set_interface(struct usb_interface *intf); | ||
| 547 | extern int usb_autopm_get_interface(struct usb_interface *intf); | 543 | extern int usb_autopm_get_interface(struct usb_interface *intf); |
| 548 | extern void usb_autopm_put_interface(struct usb_interface *intf); | 544 | extern void usb_autopm_put_interface(struct usb_interface *intf); |
| 549 | extern int usb_autopm_get_interface_async(struct usb_interface *intf); | 545 | extern int usb_autopm_get_interface_async(struct usb_interface *intf); |
| 550 | extern void usb_autopm_put_interface_async(struct usb_interface *intf); | 546 | extern void usb_autopm_put_interface_async(struct usb_interface *intf); |
| 551 | 547 | ||
| 552 | static inline void usb_autopm_enable(struct usb_interface *intf) | 548 | static inline void usb_autopm_get_interface_no_resume( |
| 549 | struct usb_interface *intf) | ||
| 553 | { | 550 | { |
| 554 | atomic_set(&intf->pm_usage_cnt, 0); | 551 | atomic_inc(&intf->pm_usage_cnt); |
| 555 | usb_autopm_set_interface(intf); | ||
| 556 | } | 552 | } |
| 557 | 553 | static inline void usb_autopm_put_interface_no_suspend( | |
| 558 | static inline void usb_autopm_disable(struct usb_interface *intf) | 554 | struct usb_interface *intf) |
| 559 | { | 555 | { |
| 560 | atomic_set(&intf->pm_usage_cnt, 1); | 556 | atomic_dec(&intf->pm_usage_cnt); |
| 561 | usb_autopm_set_interface(intf); | ||
| 562 | } | 557 | } |
| 563 | 558 | ||
| 564 | static inline void usb_mark_last_busy(struct usb_device *udev) | 559 | static inline void usb_mark_last_busy(struct usb_device *udev) |
| @@ -568,12 +563,8 @@ static inline void usb_mark_last_busy(struct usb_device *udev) | |||
| 568 | 563 | ||
| 569 | #else | 564 | #else |
| 570 | 565 | ||
| 571 | static inline int usb_autopm_set_interface(struct usb_interface *intf) | ||
| 572 | { return 0; } | ||
| 573 | |||
| 574 | static inline int usb_autopm_get_interface(struct usb_interface *intf) | 566 | static inline int usb_autopm_get_interface(struct usb_interface *intf) |
| 575 | { return 0; } | 567 | { return 0; } |
| 576 | |||
| 577 | static inline int usb_autopm_get_interface_async(struct usb_interface *intf) | 568 | static inline int usb_autopm_get_interface_async(struct usb_interface *intf) |
| 578 | { return 0; } | 569 | { return 0; } |
| 579 | 570 | ||
| @@ -581,9 +572,11 @@ static inline void usb_autopm_put_interface(struct usb_interface *intf) | |||
| 581 | { } | 572 | { } |
| 582 | static inline void usb_autopm_put_interface_async(struct usb_interface *intf) | 573 | static inline void usb_autopm_put_interface_async(struct usb_interface *intf) |
| 583 | { } | 574 | { } |
| 584 | static inline void usb_autopm_enable(struct usb_interface *intf) | 575 | static inline void usb_autopm_get_interface_no_resume( |
| 576 | struct usb_interface *intf) | ||
| 585 | { } | 577 | { } |
| 586 | static inline void usb_autopm_disable(struct usb_interface *intf) | 578 | static inline void usb_autopm_put_interface_no_suspend( |
| 579 | struct usb_interface *intf) | ||
| 587 | { } | 580 | { } |
| 588 | static inline void usb_mark_last_busy(struct usb_device *udev) | 581 | static inline void usb_mark_last_busy(struct usb_device *udev) |
| 589 | { } | 582 | { } |
| @@ -626,6 +619,10 @@ extern struct usb_interface *usb_ifnum_to_if(const struct usb_device *dev, | |||
| 626 | unsigned ifnum); | 619 | unsigned ifnum); |
| 627 | extern struct usb_host_interface *usb_altnum_to_altsetting( | 620 | extern struct usb_host_interface *usb_altnum_to_altsetting( |
| 628 | const struct usb_interface *intf, unsigned int altnum); | 621 | const struct usb_interface *intf, unsigned int altnum); |
| 622 | extern struct usb_host_interface *usb_find_alt_setting( | ||
| 623 | struct usb_host_config *config, | ||
| 624 | unsigned int iface_num, | ||
| 625 | unsigned int alt_num); | ||
| 629 | 626 | ||
| 630 | 627 | ||
| 631 | /** | 628 | /** |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 4f6bb3d2160e..738ea1a691cb 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
| @@ -127,6 +127,7 @@ struct usb_function { | |||
| 127 | /* private: */ | 127 | /* private: */ |
| 128 | /* internals */ | 128 | /* internals */ |
| 129 | struct list_head list; | 129 | struct list_head list; |
| 130 | DECLARE_BITMAP(endpoints, 32); | ||
| 130 | }; | 131 | }; |
| 131 | 132 | ||
| 132 | int usb_add_function(struct usb_configuration *, struct usb_function *); | 133 | int usb_add_function(struct usb_configuration *, struct usb_function *); |
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index 2443c0e7a80c..52bb917641f0 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
| @@ -33,6 +33,23 @@ enum usb_otg_state { | |||
| 33 | OTG_STATE_A_VBUS_ERR, | 33 | OTG_STATE_A_VBUS_ERR, |
| 34 | }; | 34 | }; |
| 35 | 35 | ||
| 36 | #define USB_OTG_PULLUP_ID (1 << 0) | ||
| 37 | #define USB_OTG_PULLDOWN_DP (1 << 1) | ||
| 38 | #define USB_OTG_PULLDOWN_DM (1 << 2) | ||
| 39 | #define USB_OTG_EXT_VBUS_INDICATOR (1 << 3) | ||
| 40 | #define USB_OTG_DRV_VBUS (1 << 4) | ||
| 41 | #define USB_OTG_DRV_VBUS_EXT (1 << 5) | ||
| 42 | |||
| 43 | struct otg_transceiver; | ||
| 44 | |||
| 45 | /* for transceivers connected thru an ULPI interface, the user must | ||
| 46 | * provide access ops | ||
| 47 | */ | ||
| 48 | struct otg_io_access_ops { | ||
| 49 | int (*read)(struct otg_transceiver *otg, u32 reg); | ||
| 50 | int (*write)(struct otg_transceiver *otg, u32 val, u32 reg); | ||
| 51 | }; | ||
| 52 | |||
| 36 | /* | 53 | /* |
| 37 | * the otg driver needs to interact with both device side and host side | 54 | * the otg driver needs to interact with both device side and host side |
| 38 | * usb controllers. it decides which controller is active at a given | 55 | * usb controllers. it decides which controller is active at a given |
| @@ -42,6 +59,7 @@ enum usb_otg_state { | |||
| 42 | struct otg_transceiver { | 59 | struct otg_transceiver { |
| 43 | struct device *dev; | 60 | struct device *dev; |
| 44 | const char *label; | 61 | const char *label; |
| 62 | unsigned int flags; | ||
| 45 | 63 | ||
| 46 | u8 default_a; | 64 | u8 default_a; |
| 47 | enum usb_otg_state state; | 65 | enum usb_otg_state state; |
| @@ -49,10 +67,17 @@ struct otg_transceiver { | |||
| 49 | struct usb_bus *host; | 67 | struct usb_bus *host; |
| 50 | struct usb_gadget *gadget; | 68 | struct usb_gadget *gadget; |
| 51 | 69 | ||
| 70 | struct otg_io_access_ops *io_ops; | ||
| 71 | void __iomem *io_priv; | ||
| 72 | |||
| 52 | /* to pass extra port status to the root hub */ | 73 | /* to pass extra port status to the root hub */ |
| 53 | u16 port_status; | 74 | u16 port_status; |
| 54 | u16 port_change; | 75 | u16 port_change; |
| 55 | 76 | ||
| 77 | /* initialize/shutdown the OTG controller */ | ||
| 78 | int (*init)(struct otg_transceiver *otg); | ||
| 79 | void (*shutdown)(struct otg_transceiver *otg); | ||
| 80 | |||
| 56 | /* bind/unbind the host controller */ | 81 | /* bind/unbind the host controller */ |
| 57 | int (*set_host)(struct otg_transceiver *otg, | 82 | int (*set_host)(struct otg_transceiver *otg, |
| 58 | struct usb_bus *host); | 83 | struct usb_bus *host); |
| @@ -65,6 +90,10 @@ struct otg_transceiver { | |||
| 65 | int (*set_power)(struct otg_transceiver *otg, | 90 | int (*set_power)(struct otg_transceiver *otg, |
| 66 | unsigned mA); | 91 | unsigned mA); |
| 67 | 92 | ||
| 93 | /* effective for A-peripheral, ignored for B devices */ | ||
| 94 | int (*set_vbus)(struct otg_transceiver *otg, | ||
| 95 | bool enabled); | ||
| 96 | |||
| 68 | /* for non-OTG B devices: set transceiver into suspend mode */ | 97 | /* for non-OTG B devices: set transceiver into suspend mode */ |
| 69 | int (*set_suspend)(struct otg_transceiver *otg, | 98 | int (*set_suspend)(struct otg_transceiver *otg, |
| 70 | int suspend); | 99 | int suspend); |
| @@ -85,6 +114,38 @@ extern int otg_set_transceiver(struct otg_transceiver *); | |||
| 85 | extern void usb_nop_xceiv_register(void); | 114 | extern void usb_nop_xceiv_register(void); |
| 86 | extern void usb_nop_xceiv_unregister(void); | 115 | extern void usb_nop_xceiv_unregister(void); |
| 87 | 116 | ||
| 117 | /* helpers for direct access thru low-level io interface */ | ||
| 118 | static inline int otg_io_read(struct otg_transceiver *otg, u32 reg) | ||
| 119 | { | ||
| 120 | if (otg->io_ops && otg->io_ops->read) | ||
| 121 | return otg->io_ops->read(otg, reg); | ||
| 122 | |||
| 123 | return -EINVAL; | ||
| 124 | } | ||
| 125 | |||
| 126 | static inline int otg_io_write(struct otg_transceiver *otg, u32 reg, u32 val) | ||
| 127 | { | ||
| 128 | if (otg->io_ops && otg->io_ops->write) | ||
| 129 | return otg->io_ops->write(otg, reg, val); | ||
| 130 | |||
| 131 | return -EINVAL; | ||
| 132 | } | ||
| 133 | |||
| 134 | static inline int | ||
| 135 | otg_init(struct otg_transceiver *otg) | ||
| 136 | { | ||
| 137 | if (otg->init) | ||
| 138 | return otg->init(otg); | ||
| 139 | |||
| 140 | return 0; | ||
| 141 | } | ||
| 142 | |||
| 143 | static inline void | ||
| 144 | otg_shutdown(struct otg_transceiver *otg) | ||
| 145 | { | ||
| 146 | if (otg->shutdown) | ||
| 147 | otg->shutdown(otg); | ||
| 148 | } | ||
| 88 | 149 | ||
| 89 | /* for usb host and peripheral controller drivers */ | 150 | /* for usb host and peripheral controller drivers */ |
| 90 | extern struct otg_transceiver *otg_get_transceiver(void); | 151 | extern struct otg_transceiver *otg_get_transceiver(void); |
| @@ -97,6 +158,12 @@ otg_start_hnp(struct otg_transceiver *otg) | |||
| 97 | return otg->start_hnp(otg); | 158 | return otg->start_hnp(otg); |
| 98 | } | 159 | } |
| 99 | 160 | ||
| 161 | /* Context: can sleep */ | ||
| 162 | static inline int | ||
| 163 | otg_set_vbus(struct otg_transceiver *otg, bool enabled) | ||
| 164 | { | ||
| 165 | return otg->set_vbus(otg, enabled); | ||
| 166 | } | ||
| 100 | 167 | ||
| 101 | /* for HCDs */ | 168 | /* for HCDs */ |
| 102 | static inline int | 169 | static inline int |
| @@ -105,7 +172,6 @@ otg_set_host(struct otg_transceiver *otg, struct usb_bus *host) | |||
| 105 | return otg->set_host(otg, host); | 172 | return otg->set_host(otg, host); |
| 106 | } | 173 | } |
| 107 | 174 | ||
| 108 | |||
| 109 | /* for usb peripheral controller drivers */ | 175 | /* for usb peripheral controller drivers */ |
| 110 | 176 | ||
| 111 | /* Context: can sleep */ | 177 | /* Context: can sleep */ |
diff --git a/include/linux/usb/ulpi.h b/include/linux/usb/ulpi.h new file mode 100644 index 000000000000..20675c6ebc4d --- /dev/null +++ b/include/linux/usb/ulpi.h | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | #ifndef __LINUX_USB_ULPI_H | ||
| 2 | #define __LINUX_USB_ULPI_H | ||
| 3 | |||
| 4 | struct otg_transceiver *otg_ulpi_create(struct otg_io_access_ops *ops, | ||
| 5 | unsigned int flags); | ||
| 6 | |||
| 7 | #endif /* __LINUX_USB_ULPI_H */ | ||
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index 3d15fb9bc116..a4b947e470a5 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
| @@ -56,7 +56,9 @@ | |||
| 56 | US_FLAG(SANE_SENSE, 0x00008000) \ | 56 | US_FLAG(SANE_SENSE, 0x00008000) \ |
| 57 | /* Sane Sense (> 18 bytes) */ \ | 57 | /* Sane Sense (> 18 bytes) */ \ |
| 58 | US_FLAG(CAPACITY_OK, 0x00010000) \ | 58 | US_FLAG(CAPACITY_OK, 0x00010000) \ |
| 59 | /* READ CAPACITY response is correct */ | 59 | /* READ CAPACITY response is correct */ \ |
| 60 | US_FLAG(BAD_SENSE, 0x00020000) \ | ||
| 61 | /* Bad Sense (never more than 18 bytes) */ | ||
| 60 | 62 | ||
| 61 | #define US_FLAG(name, value) US_FL_##name = value , | 63 | #define US_FLAG(name, value) US_FL_##name = value , |
| 62 | enum { US_DO_ALL_FLAGS }; | 64 | enum { US_DO_ALL_FLAGS }; |
