diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/backlight.h | 9 | ||||
-rw-r--r-- | include/linux/bio.h | 6 | ||||
-rw-r--r-- | include/linux/blkdev.h | 25 | ||||
-rw-r--r-- | include/linux/blktrace_api.h | 12 | ||||
-rw-r--r-- | include/linux/dmi.h | 22 | ||||
-rw-r--r-- | include/linux/i2c-id.h | 2 | ||||
-rw-r--r-- | include/linux/ide.h | 34 | ||||
-rw-r--r-- | include/linux/ivtv.h | 72 | ||||
-rw-r--r-- | include/linux/ivtvfb.h | 42 | ||||
-rw-r--r-- | include/linux/mmc/card.h | 32 | ||||
-rw-r--r-- | include/linux/mmc/core.h | 63 | ||||
-rw-r--r-- | include/linux/mmc/host.h | 39 | ||||
-rw-r--r-- | include/linux/mmc/mmc.h | 39 | ||||
-rw-r--r-- | include/linux/mmc/sdio.h | 159 | ||||
-rw-r--r-- | include/linux/mmc/sdio_func.h | 153 | ||||
-rw-r--r-- | include/linux/mmc/sdio_ids.h | 23 | ||||
-rw-r--r-- | include/linux/mod_devicetable.h | 11 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 7 | ||||
-rw-r--r-- | include/linux/spi/mmc_spi.h | 33 | ||||
-rw-r--r-- | include/linux/swap.h | 2 | ||||
-rw-r--r-- | include/linux/umem.h | 138 | ||||
-rw-r--r-- | include/linux/videodev2.h | 7 | ||||
-rw-r--r-- | include/linux/writeback.h | 1 |
23 files changed, 738 insertions, 193 deletions
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index c897c7b03858..1ee9488ca2e4 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
@@ -92,4 +92,13 @@ static inline void * bl_get_data(struct backlight_device *bl_dev) | |||
92 | return dev_get_drvdata(&bl_dev->dev); | 92 | return dev_get_drvdata(&bl_dev->dev); |
93 | } | 93 | } |
94 | 94 | ||
95 | struct generic_bl_info { | ||
96 | const char *name; | ||
97 | int max_intensity; | ||
98 | int default_intensity; | ||
99 | int limit_mask; | ||
100 | void (*set_bl_intensity)(int intensity); | ||
101 | void (*kick_battery)(void); | ||
102 | }; | ||
103 | |||
95 | #endif | 104 | #endif |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 1ddef34f43c3..089a8bc55dd4 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -64,7 +64,7 @@ struct bio_vec { | |||
64 | 64 | ||
65 | struct bio_set; | 65 | struct bio_set; |
66 | struct bio; | 66 | struct bio; |
67 | typedef int (bio_end_io_t) (struct bio *, unsigned int, int); | 67 | typedef void (bio_end_io_t) (struct bio *, int); |
68 | typedef void (bio_destructor_t) (struct bio *); | 68 | typedef void (bio_destructor_t) (struct bio *); |
69 | 69 | ||
70 | /* | 70 | /* |
@@ -226,7 +226,7 @@ struct bio { | |||
226 | #define BIO_SEG_BOUNDARY(q, b1, b2) \ | 226 | #define BIO_SEG_BOUNDARY(q, b1, b2) \ |
227 | BIOVEC_SEG_BOUNDARY((q), __BVEC_END((b1)), __BVEC_START((b2))) | 227 | BIOVEC_SEG_BOUNDARY((q), __BVEC_END((b1)), __BVEC_START((b2))) |
228 | 228 | ||
229 | #define bio_io_error(bio, bytes) bio_endio((bio), (bytes), -EIO) | 229 | #define bio_io_error(bio) bio_endio((bio), -EIO) |
230 | 230 | ||
231 | /* | 231 | /* |
232 | * drivers should not use the __ version unless they _really_ want to | 232 | * drivers should not use the __ version unless they _really_ want to |
@@ -286,7 +286,7 @@ extern struct bio *bio_alloc_bioset(gfp_t, int, struct bio_set *); | |||
286 | extern void bio_put(struct bio *); | 286 | extern void bio_put(struct bio *); |
287 | extern void bio_free(struct bio *, struct bio_set *); | 287 | extern void bio_free(struct bio *, struct bio_set *); |
288 | 288 | ||
289 | extern void bio_endio(struct bio *, unsigned int, int); | 289 | extern void bio_endio(struct bio *, int); |
290 | struct request_queue; | 290 | struct request_queue; |
291 | extern int bio_phys_segments(struct request_queue *, struct bio *); | 291 | extern int bio_phys_segments(struct request_queue *, struct bio *); |
292 | extern int bio_hw_segments(struct request_queue *, struct bio *); | 292 | extern int bio_hw_segments(struct request_queue *, struct bio *); |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index b126c6f68e27..95be0ac57e76 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _LINUX_BLKDEV_H | 1 | #ifndef _LINUX_BLKDEV_H |
2 | #define _LINUX_BLKDEV_H | 2 | #define _LINUX_BLKDEV_H |
3 | 3 | ||
4 | #ifdef CONFIG_BLOCK | ||
5 | |||
4 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
5 | #include <linux/major.h> | 7 | #include <linux/major.h> |
6 | #include <linux/genhd.h> | 8 | #include <linux/genhd.h> |
@@ -32,8 +34,6 @@ | |||
32 | ) | 34 | ) |
33 | #endif | 35 | #endif |
34 | 36 | ||
35 | #ifdef CONFIG_BLOCK | ||
36 | |||
37 | struct scsi_ioctl_command; | 37 | struct scsi_ioctl_command; |
38 | 38 | ||
39 | struct request_queue; | 39 | struct request_queue; |
@@ -471,7 +471,6 @@ struct request_queue | |||
471 | int orderr, ordcolor; | 471 | int orderr, ordcolor; |
472 | struct request pre_flush_rq, bar_rq, post_flush_rq; | 472 | struct request pre_flush_rq, bar_rq, post_flush_rq; |
473 | struct request *orig_bar_rq; | 473 | struct request *orig_bar_rq; |
474 | unsigned int bi_size; | ||
475 | 474 | ||
476 | struct mutex sysfs_lock; | 475 | struct mutex sysfs_lock; |
477 | 476 | ||
@@ -637,10 +636,23 @@ static inline void blk_queue_bounce(struct request_queue *q, struct bio **bio) | |||
637 | } | 636 | } |
638 | #endif /* CONFIG_MMU */ | 637 | #endif /* CONFIG_MMU */ |
639 | 638 | ||
640 | #define rq_for_each_bio(_bio, rq) \ | 639 | struct req_iterator { |
640 | int i; | ||
641 | struct bio *bio; | ||
642 | }; | ||
643 | |||
644 | /* This should not be used directly - use rq_for_each_segment */ | ||
645 | #define __rq_for_each_bio(_bio, rq) \ | ||
641 | if ((rq->bio)) \ | 646 | if ((rq->bio)) \ |
642 | for (_bio = (rq)->bio; _bio; _bio = _bio->bi_next) | 647 | for (_bio = (rq)->bio; _bio; _bio = _bio->bi_next) |
643 | 648 | ||
649 | #define rq_for_each_segment(bvl, _rq, _iter) \ | ||
650 | __rq_for_each_bio(_iter.bio, _rq) \ | ||
651 | bio_for_each_segment(bvl, _iter.bio, _iter.i) | ||
652 | |||
653 | #define rq_iter_last(rq, _iter) \ | ||
654 | (_iter.bio->bi_next == NULL && _iter.i == _iter.bio->bi_vcnt-1) | ||
655 | |||
644 | extern int blk_register_queue(struct gendisk *disk); | 656 | extern int blk_register_queue(struct gendisk *disk); |
645 | extern void blk_unregister_queue(struct gendisk *disk); | 657 | extern void blk_unregister_queue(struct gendisk *disk); |
646 | extern void register_disk(struct gendisk *dev); | 658 | extern void register_disk(struct gendisk *dev); |
@@ -662,8 +674,8 @@ extern int sg_scsi_ioctl(struct file *, struct request_queue *, | |||
662 | /* | 674 | /* |
663 | * Temporary export, until SCSI gets fixed up. | 675 | * Temporary export, until SCSI gets fixed up. |
664 | */ | 676 | */ |
665 | extern int ll_back_merge_fn(struct request_queue *, struct request *, | 677 | extern int blk_rq_append_bio(struct request_queue *q, struct request *rq, |
666 | struct bio *); | 678 | struct bio *bio); |
667 | 679 | ||
668 | /* | 680 | /* |
669 | * A queue has just exitted congestion. Note this in the global counter of | 681 | * A queue has just exitted congestion. Note this in the global counter of |
@@ -810,7 +822,6 @@ static inline struct request *blk_map_queue_find_tag(struct blk_queue_tag *bqt, | |||
810 | return bqt->tag_index[tag]; | 822 | return bqt->tag_index[tag]; |
811 | } | 823 | } |
812 | 824 | ||
813 | extern void blk_rq_bio_prep(struct request_queue *, struct request *, struct bio *); | ||
814 | extern int blkdev_issue_flush(struct block_device *, sector_t *); | 825 | extern int blkdev_issue_flush(struct block_device *, sector_t *); |
815 | 826 | ||
816 | #define MAX_PHYS_SEGMENTS 128 | 827 | #define MAX_PHYS_SEGMENTS 128 |
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 7b5d56b82b59..2e105a12fe29 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -142,10 +142,14 @@ struct blk_user_trace_setup { | |||
142 | u32 pid; | 142 | u32 pid; |
143 | }; | 143 | }; |
144 | 144 | ||
145 | #ifdef __KERNEL__ | ||
145 | #if defined(CONFIG_BLK_DEV_IO_TRACE) | 146 | #if defined(CONFIG_BLK_DEV_IO_TRACE) |
146 | extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *); | 147 | extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *); |
147 | extern void blk_trace_shutdown(struct request_queue *); | 148 | extern void blk_trace_shutdown(struct request_queue *); |
148 | extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *); | 149 | extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *); |
150 | extern int do_blk_trace_setup(struct request_queue *q, | ||
151 | struct block_device *bdev, struct blk_user_trace_setup *buts); | ||
152 | |||
149 | 153 | ||
150 | /** | 154 | /** |
151 | * blk_add_trace_rq - Add a trace for a request oriented action | 155 | * blk_add_trace_rq - Add a trace for a request oriented action |
@@ -286,6 +290,12 @@ static inline void blk_add_trace_remap(struct request_queue *q, struct bio *bio, | |||
286 | #define blk_add_trace_generic(q, rq, rw, what) do { } while (0) | 290 | #define blk_add_trace_generic(q, rq, rw, what) do { } while (0) |
287 | #define blk_add_trace_pdu_int(q, what, bio, pdu) do { } while (0) | 291 | #define blk_add_trace_pdu_int(q, what, bio, pdu) do { } while (0) |
288 | #define blk_add_trace_remap(q, bio, dev, f, t) do {} while (0) | 292 | #define blk_add_trace_remap(q, bio, dev, f, t) do {} while (0) |
293 | static inline int do_blk_trace_setup(struct request_queue *q, | ||
294 | struct block_device *bdev, | ||
295 | struct blk_user_trace_setup *buts) | ||
296 | { | ||
297 | return 0; | ||
298 | } | ||
289 | #endif /* CONFIG_BLK_DEV_IO_TRACE */ | 299 | #endif /* CONFIG_BLK_DEV_IO_TRACE */ |
290 | 300 | #endif /* __KERNEL__ */ | |
291 | #endif | 301 | #endif |
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index b8ac7b01c45e..00fc7a9c35ec 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -54,7 +54,7 @@ struct dmi_strmatch { | |||
54 | }; | 54 | }; |
55 | 55 | ||
56 | struct dmi_system_id { | 56 | struct dmi_system_id { |
57 | int (*callback)(struct dmi_system_id *); | 57 | int (*callback)(const struct dmi_system_id *); |
58 | const char *ident; | 58 | const char *ident; |
59 | struct dmi_strmatch matches[4]; | 59 | struct dmi_strmatch matches[4]; |
60 | void *driver_data; | 60 | void *driver_data; |
@@ -71,22 +71,22 @@ struct dmi_device { | |||
71 | 71 | ||
72 | #ifdef CONFIG_DMI | 72 | #ifdef CONFIG_DMI |
73 | 73 | ||
74 | extern int dmi_check_system(struct dmi_system_id *list); | 74 | extern int dmi_check_system(const struct dmi_system_id *list); |
75 | extern char * dmi_get_system_info(int field); | 75 | extern const char * dmi_get_system_info(int field); |
76 | extern struct dmi_device * dmi_find_device(int type, const char *name, | 76 | extern const struct dmi_device * dmi_find_device(int type, const char *name, |
77 | struct dmi_device *from); | 77 | const struct dmi_device *from); |
78 | extern void dmi_scan_machine(void); | 78 | extern void dmi_scan_machine(void); |
79 | extern int dmi_get_year(int field); | 79 | extern int dmi_get_year(int field); |
80 | extern int dmi_name_in_vendors(char *str); | 80 | extern int dmi_name_in_vendors(const char *str); |
81 | 81 | ||
82 | #else | 82 | #else |
83 | 83 | ||
84 | static inline int dmi_check_system(struct dmi_system_id *list) { return 0; } | 84 | static inline int dmi_check_system(const struct dmi_system_id *list) { return 0; } |
85 | static inline char * dmi_get_system_info(int field) { return NULL; } | 85 | static inline const char * dmi_get_system_info(int field) { return NULL; } |
86 | static inline struct dmi_device * dmi_find_device(int type, const char *name, | 86 | static inline const struct dmi_device * dmi_find_device(int type, const char *name, |
87 | struct dmi_device *from) { return NULL; } | 87 | const struct dmi_device *from) { return NULL; } |
88 | static inline int dmi_get_year(int year) { return 0; } | 88 | static inline int dmi_get_year(int year) { return 0; } |
89 | static inline int dmi_name_in_vendors(char *s) { return 0; } | 89 | static inline int dmi_name_in_vendors(const char *s) { return 0; } |
90 | 90 | ||
91 | #endif | 91 | #endif |
92 | 92 | ||
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index b69014865714..a271b67a8e2d 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -119,6 +119,7 @@ | |||
119 | #define I2C_DRIVERID_WM8750 90 /* Wolfson WM8750 audio codec */ | 119 | #define I2C_DRIVERID_WM8750 90 /* Wolfson WM8750 audio codec */ |
120 | #define I2C_DRIVERID_WM8753 91 /* Wolfson WM8753 audio codec */ | 120 | #define I2C_DRIVERID_WM8753 91 /* Wolfson WM8753 audio codec */ |
121 | #define I2C_DRIVERID_LM4857 92 /* LM4857 Audio Amplifier */ | 121 | #define I2C_DRIVERID_LM4857 92 /* LM4857 Audio Amplifier */ |
122 | #define I2C_DRIVERID_VP27SMPX 93 /* Panasonic VP27s tuner internal MPX */ | ||
122 | 123 | ||
123 | #define I2C_DRIVERID_I2CDEV 900 | 124 | #define I2C_DRIVERID_I2CDEV 900 |
124 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ | 125 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ |
@@ -196,6 +197,7 @@ | |||
196 | #define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */ | 197 | #define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */ |
197 | #define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */ | 198 | #define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */ |
198 | #define I2C_HW_B_INTELFB 0x010021 /* intel framebuffer driver */ | 199 | #define I2C_HW_B_INTELFB 0x010021 /* intel framebuffer driver */ |
200 | #define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */ | ||
199 | 201 | ||
200 | /* --- PCF 8584 based algorithms */ | 202 | /* --- PCF 8584 based algorithms */ |
201 | #define I2C_HW_P_LP 0x020000 /* Parallel port interface */ | 203 | #define I2C_HW_P_LP 0x020000 /* Parallel port interface */ |
diff --git a/include/linux/ide.h b/include/linux/ide.h index b9f66c10caa0..85d448b4abec 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -634,7 +634,7 @@ typedef struct ide_drive_s { | |||
634 | 634 | ||
635 | unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ | 635 | unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ |
636 | unsigned int cyl; /* "real" number of cyls */ | 636 | unsigned int cyl; /* "real" number of cyls */ |
637 | unsigned int drive_data; /* use by tuneproc/selectproc */ | 637 | unsigned int drive_data; /* used by set_pio_mode/selectproc */ |
638 | unsigned int failures; /* current failure count */ | 638 | unsigned int failures; /* current failure count */ |
639 | unsigned int max_failures; /* maximum allowed failure count */ | 639 | unsigned int max_failures; /* maximum allowed failure count */ |
640 | u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */ | 640 | u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */ |
@@ -702,10 +702,10 @@ typedef struct hwif_s { | |||
702 | #if 0 | 702 | #if 0 |
703 | ide_hwif_ops_t *hwifops; | 703 | ide_hwif_ops_t *hwifops; |
704 | #else | 704 | #else |
705 | /* routine to tune PIO mode for drives */ | 705 | /* routine to set PIO mode for drives */ |
706 | void (*tuneproc)(ide_drive_t *, u8); | 706 | void (*set_pio_mode)(ide_drive_t *, const u8); |
707 | /* routine to retune DMA modes for drives */ | 707 | /* routine to retune DMA modes for drives */ |
708 | int (*speedproc)(ide_drive_t *, u8); | 708 | int (*speedproc)(ide_drive_t *, const u8); |
709 | /* tweaks hardware to select drive */ | 709 | /* tweaks hardware to select drive */ |
710 | void (*selectproc)(ide_drive_t *); | 710 | void (*selectproc)(ide_drive_t *); |
711 | /* chipset polling based on hba specifics */ | 711 | /* chipset polling based on hba specifics */ |
@@ -723,6 +723,7 @@ typedef struct hwif_s { | |||
723 | /* driver soft-power interface */ | 723 | /* driver soft-power interface */ |
724 | int (*busproc)(ide_drive_t *, int); | 724 | int (*busproc)(ide_drive_t *, int); |
725 | #endif | 725 | #endif |
726 | u8 (*mdma_filter)(ide_drive_t *); | ||
726 | u8 (*udma_filter)(ide_drive_t *); | 727 | u8 (*udma_filter)(ide_drive_t *); |
727 | 728 | ||
728 | void (*ata_input_data)(ide_drive_t *, void *, u32); | 729 | void (*ata_input_data)(ide_drive_t *, void *, u32); |
@@ -1255,6 +1256,12 @@ enum { | |||
1255 | IDE_HFLAG_PIO_NO_BLACKLIST = (1 << 2), | 1256 | IDE_HFLAG_PIO_NO_BLACKLIST = (1 << 2), |
1256 | /* don't use conservative PIO "downgrade" */ | 1257 | /* don't use conservative PIO "downgrade" */ |
1257 | IDE_HFLAG_PIO_NO_DOWNGRADE = (1 << 3), | 1258 | IDE_HFLAG_PIO_NO_DOWNGRADE = (1 << 3), |
1259 | /* use PIO8/9 for prefetch off/on */ | ||
1260 | IDE_HFLAG_ABUSE_PREFETCH = (1 << 4), | ||
1261 | /* use PIO6/7 for fast-devsel off/on */ | ||
1262 | IDE_HFLAG_ABUSE_FAST_DEVSEL = (1 << 5), | ||
1263 | /* use 100-102 and 200-202 PIO values to set DMA modes */ | ||
1264 | IDE_HFLAG_ABUSE_DMA_MODES = (1 << 6), | ||
1258 | }; | 1265 | }; |
1259 | 1266 | ||
1260 | typedef struct ide_pci_device_s { | 1267 | typedef struct ide_pci_device_s { |
@@ -1295,7 +1302,14 @@ int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *); | |||
1295 | #ifdef CONFIG_BLK_DEV_IDEDMA | 1302 | #ifdef CONFIG_BLK_DEV_IDEDMA |
1296 | int __ide_dma_bad_drive(ide_drive_t *); | 1303 | int __ide_dma_bad_drive(ide_drive_t *); |
1297 | int __ide_dma_good_drive(ide_drive_t *); | 1304 | int __ide_dma_good_drive(ide_drive_t *); |
1298 | u8 ide_max_dma_mode(ide_drive_t *); | 1305 | |
1306 | u8 ide_find_dma_mode(ide_drive_t *, u8); | ||
1307 | |||
1308 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) | ||
1309 | { | ||
1310 | return ide_find_dma_mode(drive, XFER_UDMA_6); | ||
1311 | } | ||
1312 | |||
1299 | int ide_tune_dma(ide_drive_t *); | 1313 | int ide_tune_dma(ide_drive_t *); |
1300 | void ide_dma_off(ide_drive_t *); | 1314 | void ide_dma_off(ide_drive_t *); |
1301 | void ide_dma_verbose(ide_drive_t *); | 1315 | void ide_dma_verbose(ide_drive_t *); |
@@ -1321,6 +1335,7 @@ extern void ide_dma_timeout(ide_drive_t *); | |||
1321 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ | 1335 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ |
1322 | 1336 | ||
1323 | #else | 1337 | #else |
1338 | static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; } | ||
1324 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } | 1339 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } |
1325 | static inline int ide_tune_dma(ide_drive_t *drive) { return 0; } | 1340 | static inline int ide_tune_dma(ide_drive_t *drive) { return 0; } |
1326 | static inline void ide_dma_off(ide_drive_t *drive) { ; } | 1341 | static inline void ide_dma_off(ide_drive_t *drive) { ; } |
@@ -1337,11 +1352,13 @@ extern int ide_acpi_exec_tfs(ide_drive_t *drive); | |||
1337 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); | 1352 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); |
1338 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); | 1353 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); |
1339 | extern void ide_acpi_init(ide_hwif_t *hwif); | 1354 | extern void ide_acpi_init(ide_hwif_t *hwif); |
1355 | extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); | ||
1340 | #else | 1356 | #else |
1341 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } | 1357 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } |
1342 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } | 1358 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } |
1343 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } | 1359 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } |
1344 | static inline void ide_acpi_init(ide_hwif_t *hwif) { ; } | 1360 | static inline void ide_acpi_init(ide_hwif_t *hwif) { ; } |
1361 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} | ||
1345 | #endif | 1362 | #endif |
1346 | 1363 | ||
1347 | extern int ide_hwif_request_regions(ide_hwif_t *hwif); | 1364 | extern int ide_hwif_request_regions(ide_hwif_t *hwif); |
@@ -1367,7 +1384,6 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data) | |||
1367 | } | 1384 | } |
1368 | 1385 | ||
1369 | /* ide-lib.c */ | 1386 | /* ide-lib.c */ |
1370 | u8 ide_rate_filter(ide_drive_t *, u8); | ||
1371 | extern char *ide_xfer_verbose(u8 xfer_rate); | 1387 | extern char *ide_xfer_verbose(u8 xfer_rate); |
1372 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); | 1388 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); |
1373 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); | 1389 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); |
@@ -1404,6 +1420,12 @@ unsigned int ide_pio_cycle_time(ide_drive_t *, u8); | |||
1404 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); | 1420 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); |
1405 | extern const ide_pio_timings_t ide_pio_timings[6]; | 1421 | extern const ide_pio_timings_t ide_pio_timings[6]; |
1406 | 1422 | ||
1423 | void ide_set_pio(ide_drive_t *, u8); | ||
1424 | |||
1425 | static inline void ide_set_max_pio(ide_drive_t *drive) | ||
1426 | { | ||
1427 | ide_set_pio(drive, 255); | ||
1428 | } | ||
1407 | 1429 | ||
1408 | extern spinlock_t ide_lock; | 1430 | extern spinlock_t ide_lock; |
1409 | extern struct mutex ide_cfg_mtx; | 1431 | extern struct mutex ide_cfg_mtx; |
diff --git a/include/linux/ivtv.h b/include/linux/ivtv.h new file mode 100644 index 000000000000..794b8daa9378 --- /dev/null +++ b/include/linux/ivtv.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | Public ivtv API header | ||
3 | Copyright (C) 2003-2004 Kevin Thayer <nufan_wfk at yahoo.com> | ||
4 | Copyright (C) 2004-2007 Hans Verkuil <hverkuil@xs4all.nl> | ||
5 | |||
6 | This program is free software; you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation; either version 2 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #ifndef __LINUX_IVTV_H__ | ||
22 | #define __LINUX_IVTV_H__ | ||
23 | |||
24 | #ifdef __KERNEL__ | ||
25 | #include <linux/compiler.h> /* need __user */ | ||
26 | #else | ||
27 | #define __user | ||
28 | #endif | ||
29 | #include <linux/types.h> | ||
30 | |||
31 | /* ivtv knows several distinct output modes: MPEG streaming, | ||
32 | YUV streaming, YUV updates through user DMA and the passthrough | ||
33 | mode. | ||
34 | |||
35 | In order to clearly tell the driver that we are in user DMA | ||
36 | YUV mode you need to call IVTV_IOC_DMA_FRAME with y_source == NULL | ||
37 | first (althrough if you don't then the first time | ||
38 | DMA_FRAME is called the mode switch is done automatically). | ||
39 | |||
40 | When you close the file handle the user DMA mode is exited again. | ||
41 | |||
42 | While in one mode, you cannot use another mode (EBUSY is returned). | ||
43 | |||
44 | All this means that if you want to change the YUV interlacing | ||
45 | for the user DMA YUV mode you first need to do call IVTV_IOC_DMA_FRAME | ||
46 | with y_source == NULL before you can set the correct format using | ||
47 | VIDIOC_S_FMT. | ||
48 | |||
49 | Eventually all this should be replaced with a proper V4L2 API, | ||
50 | but for now we have to do it this way. */ | ||
51 | |||
52 | struct ivtv_dma_frame { | ||
53 | enum v4l2_buf_type type; /* V4L2_BUF_TYPE_VIDEO_OUTPUT */ | ||
54 | __u32 pixelformat; /* 0 == same as destination */ | ||
55 | void __user *y_source; /* if NULL and type == V4L2_BUF_TYPE_VIDEO_OUTPUT, | ||
56 | then just switch to user DMA YUV output mode */ | ||
57 | void __user *uv_source; /* Unused for RGB pixelformats */ | ||
58 | struct v4l2_rect src; | ||
59 | struct v4l2_rect dst; | ||
60 | __u32 src_width; | ||
61 | __u32 src_height; | ||
62 | }; | ||
63 | |||
64 | #define IVTV_IOC_DMA_FRAME _IOW ('V', BASE_VIDIOC_PRIVATE+0, struct ivtv_dma_frame) | ||
65 | |||
66 | /* These are the VBI types as they appear in the embedded VBI private packets. */ | ||
67 | #define IVTV_SLICED_TYPE_TELETEXT_B (1) | ||
68 | #define IVTV_SLICED_TYPE_CAPTION_525 (4) | ||
69 | #define IVTV_SLICED_TYPE_WSS_625 (5) | ||
70 | #define IVTV_SLICED_TYPE_VPS (7) | ||
71 | |||
72 | #endif /* _LINUX_IVTV_H */ | ||
diff --git a/include/linux/ivtvfb.h b/include/linux/ivtvfb.h new file mode 100644 index 000000000000..e980ba62ddcc --- /dev/null +++ b/include/linux/ivtvfb.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | On Screen Display cx23415 Framebuffer driver | ||
3 | |||
4 | Copyright (C) 2006, 2007 Ian Armstrong <ian@iarmst.demon.co.uk> | ||
5 | |||
6 | This program is free software; you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation; either version 2 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #ifndef __LINUX_IVTVFB_H__ | ||
22 | #define __LINUX_IVTVFB_H__ | ||
23 | |||
24 | #ifdef __KERNEL__ | ||
25 | #include <linux/compiler.h> /* need __user */ | ||
26 | #else | ||
27 | #define __user | ||
28 | #endif | ||
29 | #include <linux/types.h> | ||
30 | |||
31 | /* Framebuffer external API */ | ||
32 | |||
33 | struct ivtvfb_dma_frame { | ||
34 | void __user *source; | ||
35 | unsigned long dest_offset; | ||
36 | int count; | ||
37 | }; | ||
38 | |||
39 | #define IVTVFB_IOC_DMA_FRAME _IOW('V', BASE_VIDIOC_PRIVATE+0, struct ivtvfb_dma_frame) | ||
40 | #define FBIO_WAITFORVSYNC _IOW('F', 0x20, u_int32_t) | ||
41 | |||
42 | #endif | ||
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index badf702fcff4..0d508ac17d64 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -55,7 +55,28 @@ struct sd_switch_caps { | |||
55 | unsigned int hs_max_dtr; | 55 | unsigned int hs_max_dtr; |
56 | }; | 56 | }; |
57 | 57 | ||
58 | struct sdio_cccr { | ||
59 | unsigned int sdio_vsn; | ||
60 | unsigned int sd_vsn; | ||
61 | unsigned int multi_block:1, | ||
62 | low_speed:1, | ||
63 | wide_bus:1, | ||
64 | high_power:1, | ||
65 | high_speed:1; | ||
66 | }; | ||
67 | |||
68 | struct sdio_cis { | ||
69 | unsigned short vendor; | ||
70 | unsigned short device; | ||
71 | unsigned short blksize; | ||
72 | unsigned int max_dtr; | ||
73 | }; | ||
74 | |||
58 | struct mmc_host; | 75 | struct mmc_host; |
76 | struct sdio_func; | ||
77 | struct sdio_func_tuple; | ||
78 | |||
79 | #define SDIO_MAX_FUNCS 7 | ||
59 | 80 | ||
60 | /* | 81 | /* |
61 | * MMC device | 82 | * MMC device |
@@ -67,11 +88,13 @@ struct mmc_card { | |||
67 | unsigned int type; /* card type */ | 88 | unsigned int type; /* card type */ |
68 | #define MMC_TYPE_MMC 0 /* MMC card */ | 89 | #define MMC_TYPE_MMC 0 /* MMC card */ |
69 | #define MMC_TYPE_SD 1 /* SD card */ | 90 | #define MMC_TYPE_SD 1 /* SD card */ |
91 | #define MMC_TYPE_SDIO 2 /* SDIO card */ | ||
70 | unsigned int state; /* (our) card state */ | 92 | unsigned int state; /* (our) card state */ |
71 | #define MMC_STATE_PRESENT (1<<0) /* present in sysfs */ | 93 | #define MMC_STATE_PRESENT (1<<0) /* present in sysfs */ |
72 | #define MMC_STATE_READONLY (1<<1) /* card is read-only */ | 94 | #define MMC_STATE_READONLY (1<<1) /* card is read-only */ |
73 | #define MMC_STATE_HIGHSPEED (1<<2) /* card is in high speed mode */ | 95 | #define MMC_STATE_HIGHSPEED (1<<2) /* card is in high speed mode */ |
74 | #define MMC_STATE_BLOCKADDR (1<<3) /* card uses block-addressing */ | 96 | #define MMC_STATE_BLOCKADDR (1<<3) /* card uses block-addressing */ |
97 | |||
75 | u32 raw_cid[4]; /* raw card CID */ | 98 | u32 raw_cid[4]; /* raw card CID */ |
76 | u32 raw_csd[4]; /* raw card CSD */ | 99 | u32 raw_csd[4]; /* raw card CSD */ |
77 | u32 raw_scr[2]; /* raw card SCR */ | 100 | u32 raw_scr[2]; /* raw card SCR */ |
@@ -80,10 +103,19 @@ struct mmc_card { | |||
80 | struct mmc_ext_csd ext_csd; /* mmc v4 extended card specific */ | 103 | struct mmc_ext_csd ext_csd; /* mmc v4 extended card specific */ |
81 | struct sd_scr scr; /* extra SD information */ | 104 | struct sd_scr scr; /* extra SD information */ |
82 | struct sd_switch_caps sw_caps; /* switch (CMD6) caps */ | 105 | struct sd_switch_caps sw_caps; /* switch (CMD6) caps */ |
106 | |||
107 | unsigned int sdio_funcs; /* number of SDIO functions */ | ||
108 | struct sdio_cccr cccr; /* common card info */ | ||
109 | struct sdio_cis cis; /* common tuple info */ | ||
110 | struct sdio_func *sdio_func[SDIO_MAX_FUNCS]; /* SDIO functions (devices) */ | ||
111 | unsigned num_info; /* number of info strings */ | ||
112 | const char **info; /* info strings */ | ||
113 | struct sdio_func_tuple *tuples; /* unknown common tuples */ | ||
83 | }; | 114 | }; |
84 | 115 | ||
85 | #define mmc_card_mmc(c) ((c)->type == MMC_TYPE_MMC) | 116 | #define mmc_card_mmc(c) ((c)->type == MMC_TYPE_MMC) |
86 | #define mmc_card_sd(c) ((c)->type == MMC_TYPE_SD) | 117 | #define mmc_card_sd(c) ((c)->type == MMC_TYPE_SD) |
118 | #define mmc_card_sdio(c) ((c)->type == MMC_TYPE_SDIO) | ||
87 | 119 | ||
88 | #define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT) | 120 | #define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT) |
89 | #define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY) | 121 | #define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY) |
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 63a80ea61124..d0c3abed74c2 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h | |||
@@ -25,14 +25,20 @@ struct mmc_command { | |||
25 | #define MMC_RSP_CRC (1 << 2) /* expect valid crc */ | 25 | #define MMC_RSP_CRC (1 << 2) /* expect valid crc */ |
26 | #define MMC_RSP_BUSY (1 << 3) /* card may send busy */ | 26 | #define MMC_RSP_BUSY (1 << 3) /* card may send busy */ |
27 | #define MMC_RSP_OPCODE (1 << 4) /* response contains opcode */ | 27 | #define MMC_RSP_OPCODE (1 << 4) /* response contains opcode */ |
28 | #define MMC_CMD_MASK (3 << 5) /* command type */ | 28 | |
29 | #define MMC_CMD_MASK (3 << 5) /* non-SPI command type */ | ||
29 | #define MMC_CMD_AC (0 << 5) | 30 | #define MMC_CMD_AC (0 << 5) |
30 | #define MMC_CMD_ADTC (1 << 5) | 31 | #define MMC_CMD_ADTC (1 << 5) |
31 | #define MMC_CMD_BC (2 << 5) | 32 | #define MMC_CMD_BC (2 << 5) |
32 | #define MMC_CMD_BCR (3 << 5) | 33 | #define MMC_CMD_BCR (3 << 5) |
33 | 34 | ||
35 | #define MMC_RSP_SPI_S1 (1 << 7) /* one status byte */ | ||
36 | #define MMC_RSP_SPI_S2 (1 << 8) /* second byte */ | ||
37 | #define MMC_RSP_SPI_B4 (1 << 9) /* four data bytes */ | ||
38 | #define MMC_RSP_SPI_BUSY (1 << 10) /* card may send busy */ | ||
39 | |||
34 | /* | 40 | /* |
35 | * These are the response types, and correspond to valid bit | 41 | * These are the native response types, and correspond to valid bit |
36 | * patterns of the above flags. One additional valid pattern | 42 | * patterns of the above flags. One additional valid pattern |
37 | * is all zeros, which means we don't expect a response. | 43 | * is all zeros, which means we don't expect a response. |
38 | */ | 44 | */ |
@@ -41,12 +47,30 @@ struct mmc_command { | |||
41 | #define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) | 47 | #define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) |
42 | #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) | 48 | #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) |
43 | #define MMC_RSP_R3 (MMC_RSP_PRESENT) | 49 | #define MMC_RSP_R3 (MMC_RSP_PRESENT) |
50 | #define MMC_RSP_R4 (MMC_RSP_PRESENT) | ||
51 | #define MMC_RSP_R5 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) | ||
44 | #define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) | 52 | #define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) |
45 | #define MMC_RSP_R7 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) | 53 | #define MMC_RSP_R7 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) |
46 | 54 | ||
47 | #define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE)) | 55 | #define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE)) |
48 | 56 | ||
49 | /* | 57 | /* |
58 | * These are the SPI response types for MMC, SD, and SDIO cards. | ||
59 | * Commands return R1, with maybe more info. Zero is an error type; | ||
60 | * callers must always provide the appropriate MMC_RSP_SPI_Rx flags. | ||
61 | */ | ||
62 | #define MMC_RSP_SPI_R1 (MMC_RSP_SPI_S1) | ||
63 | #define MMC_RSP_SPI_R1B (MMC_RSP_SPI_S1|MMC_RSP_SPI_BUSY) | ||
64 | #define MMC_RSP_SPI_R2 (MMC_RSP_SPI_S1|MMC_RSP_SPI_S2) | ||
65 | #define MMC_RSP_SPI_R3 (MMC_RSP_SPI_S1|MMC_RSP_SPI_B4) | ||
66 | #define MMC_RSP_SPI_R4 (MMC_RSP_SPI_S1|MMC_RSP_SPI_B4) | ||
67 | #define MMC_RSP_SPI_R5 (MMC_RSP_SPI_S1|MMC_RSP_SPI_S2) | ||
68 | #define MMC_RSP_SPI_R7 (MMC_RSP_SPI_S1|MMC_RSP_SPI_B4) | ||
69 | |||
70 | #define mmc_spi_resp_type(cmd) ((cmd)->flags & \ | ||
71 | (MMC_RSP_SPI_S1|MMC_RSP_SPI_BUSY|MMC_RSP_SPI_S2|MMC_RSP_SPI_B4)) | ||
72 | |||
73 | /* | ||
50 | * These are the command types. | 74 | * These are the command types. |
51 | */ | 75 | */ |
52 | #define mmc_cmd_type(cmd) ((cmd)->flags & MMC_CMD_MASK) | 76 | #define mmc_cmd_type(cmd) ((cmd)->flags & MMC_CMD_MASK) |
@@ -54,12 +78,19 @@ struct mmc_command { | |||
54 | unsigned int retries; /* max number of retries */ | 78 | unsigned int retries; /* max number of retries */ |
55 | unsigned int error; /* command error */ | 79 | unsigned int error; /* command error */ |
56 | 80 | ||
57 | #define MMC_ERR_NONE 0 | 81 | /* |
58 | #define MMC_ERR_TIMEOUT 1 | 82 | * Standard errno values are used for errors, but some have specific |
59 | #define MMC_ERR_BADCRC 2 | 83 | * meaning in the MMC layer: |
60 | #define MMC_ERR_FIFO 3 | 84 | * |
61 | #define MMC_ERR_FAILED 4 | 85 | * ETIMEDOUT Card took too long to respond |
62 | #define MMC_ERR_INVALID 5 | 86 | * EILSEQ Basic format problem with the received or sent data |
87 | * (e.g. CRC check failed, incorrect opcode in response | ||
88 | * or bad end bit) | ||
89 | * EINVAL Request cannot be performed because of restrictions | ||
90 | * in hardware and/or the driver | ||
91 | * ENOMEDIUM Host can determine that the slot is empty and is | ||
92 | * actively failing requests | ||
93 | */ | ||
63 | 94 | ||
64 | struct mmc_data *data; /* data segment associated with cmd */ | 95 | struct mmc_data *data; /* data segment associated with cmd */ |
65 | struct mmc_request *mrq; /* associated request */ | 96 | struct mmc_request *mrq; /* associated request */ |
@@ -76,7 +107,6 @@ struct mmc_data { | |||
76 | #define MMC_DATA_WRITE (1 << 8) | 107 | #define MMC_DATA_WRITE (1 << 8) |
77 | #define MMC_DATA_READ (1 << 9) | 108 | #define MMC_DATA_READ (1 << 9) |
78 | #define MMC_DATA_STREAM (1 << 10) | 109 | #define MMC_DATA_STREAM (1 << 10) |
79 | #define MMC_DATA_MULTI (1 << 11) | ||
80 | 110 | ||
81 | unsigned int bytes_xfered; | 111 | unsigned int bytes_xfered; |
82 | 112 | ||
@@ -104,9 +134,20 @@ extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int); | |||
104 | extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *, | 134 | extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *, |
105 | struct mmc_command *, int); | 135 | struct mmc_command *, int); |
106 | 136 | ||
107 | extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *, int); | 137 | extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *); |
108 | 138 | ||
109 | extern void mmc_claim_host(struct mmc_host *host); | 139 | extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); |
110 | extern void mmc_release_host(struct mmc_host *host); | 140 | extern void mmc_release_host(struct mmc_host *host); |
111 | 141 | ||
142 | /** | ||
143 | * mmc_claim_host - exclusively claim a host | ||
144 | * @host: mmc host to claim | ||
145 | * | ||
146 | * Claim a host for a set of operations. | ||
147 | */ | ||
148 | static inline void mmc_claim_host(struct mmc_host *host) | ||
149 | { | ||
150 | __mmc_claim_host(host, NULL); | ||
151 | } | ||
152 | |||
112 | #endif | 153 | #endif |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index b1350dfd3e91..125eee1407ff 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -10,6 +10,8 @@ | |||
10 | #ifndef LINUX_MMC_HOST_H | 10 | #ifndef LINUX_MMC_HOST_H |
11 | #define LINUX_MMC_HOST_H | 11 | #define LINUX_MMC_HOST_H |
12 | 12 | ||
13 | #include <linux/leds.h> | ||
14 | |||
13 | #include <linux/mmc/core.h> | 15 | #include <linux/mmc/core.h> |
14 | 16 | ||
15 | struct mmc_ios { | 17 | struct mmc_ios { |
@@ -51,6 +53,7 @@ struct mmc_host_ops { | |||
51 | void (*request)(struct mmc_host *host, struct mmc_request *req); | 53 | void (*request)(struct mmc_host *host, struct mmc_request *req); |
52 | void (*set_ios)(struct mmc_host *host, struct mmc_ios *ios); | 54 | void (*set_ios)(struct mmc_host *host, struct mmc_ios *ios); |
53 | int (*get_ro)(struct mmc_host *host); | 55 | int (*get_ro)(struct mmc_host *host); |
56 | void (*enable_sdio_irq)(struct mmc_host *host, int enable); | ||
54 | }; | 57 | }; |
55 | 58 | ||
56 | struct mmc_card; | 59 | struct mmc_card; |
@@ -87,9 +90,10 @@ struct mmc_host { | |||
87 | 90 | ||
88 | #define MMC_CAP_4_BIT_DATA (1 << 0) /* Can the host do 4 bit transfers */ | 91 | #define MMC_CAP_4_BIT_DATA (1 << 0) /* Can the host do 4 bit transfers */ |
89 | #define MMC_CAP_MULTIWRITE (1 << 1) /* Can accurately report bytes sent to card on error */ | 92 | #define MMC_CAP_MULTIWRITE (1 << 1) /* Can accurately report bytes sent to card on error */ |
90 | #define MMC_CAP_BYTEBLOCK (1 << 2) /* Can do non-log2 block sizes */ | 93 | #define MMC_CAP_MMC_HIGHSPEED (1 << 2) /* Can do MMC high-speed timing */ |
91 | #define MMC_CAP_MMC_HIGHSPEED (1 << 3) /* Can do MMC high-speed timing */ | 94 | #define MMC_CAP_SD_HIGHSPEED (1 << 3) /* Can do SD high-speed timing */ |
92 | #define MMC_CAP_SD_HIGHSPEED (1 << 4) /* Can do SD high-speed timing */ | 95 | #define MMC_CAP_SDIO_IRQ (1 << 4) /* Can signal pending SDIO IRQs */ |
96 | #define MMC_CAP_SPI (1 << 5) /* Talks only SPI protocols */ | ||
93 | 97 | ||
94 | /* host specific block data */ | 98 | /* host specific block data */ |
95 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ | 99 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ |
@@ -106,6 +110,14 @@ struct mmc_host { | |||
106 | struct mmc_ios ios; /* current io bus settings */ | 110 | struct mmc_ios ios; /* current io bus settings */ |
107 | u32 ocr; /* the current OCR setting */ | 111 | u32 ocr; /* the current OCR setting */ |
108 | 112 | ||
113 | /* group bitfields together to minimize padding */ | ||
114 | unsigned int use_spi_crc:1; | ||
115 | unsigned int claimed:1; /* host exclusively claimed */ | ||
116 | unsigned int bus_dead:1; /* bus has been released */ | ||
117 | #ifdef CONFIG_MMC_DEBUG | ||
118 | unsigned int removed:1; /* host is being removed */ | ||
119 | #endif | ||
120 | |||
109 | unsigned int mode; /* current card mode of host */ | 121 | unsigned int mode; /* current card mode of host */ |
110 | #define MMC_MODE_MMC 0 | 122 | #define MMC_MODE_MMC 0 |
111 | #define MMC_MODE_SD 1 | 123 | #define MMC_MODE_SD 1 |
@@ -113,16 +125,19 @@ struct mmc_host { | |||
113 | struct mmc_card *card; /* device attached to this host */ | 125 | struct mmc_card *card; /* device attached to this host */ |
114 | 126 | ||
115 | wait_queue_head_t wq; | 127 | wait_queue_head_t wq; |
116 | unsigned int claimed:1; /* host exclusively claimed */ | ||
117 | 128 | ||
118 | struct delayed_work detect; | 129 | struct delayed_work detect; |
119 | #ifdef CONFIG_MMC_DEBUG | ||
120 | unsigned int removed:1; /* host is being removed */ | ||
121 | #endif | ||
122 | 130 | ||
123 | const struct mmc_bus_ops *bus_ops; /* current bus driver */ | 131 | const struct mmc_bus_ops *bus_ops; /* current bus driver */ |
124 | unsigned int bus_refs; /* reference counter */ | 132 | unsigned int bus_refs; /* reference counter */ |
125 | unsigned int bus_dead:1; /* bus has been released */ | 133 | |
134 | unsigned int sdio_irqs; | ||
135 | struct task_struct *sdio_irq_thread; | ||
136 | atomic_t sdio_irq_thread_abort; | ||
137 | |||
138 | #ifdef CONFIG_LEDS_TRIGGERS | ||
139 | struct led_trigger *led; /* activity led */ | ||
140 | #endif | ||
126 | 141 | ||
127 | unsigned long private[0] ____cacheline_aligned; | 142 | unsigned long private[0] ____cacheline_aligned; |
128 | }; | 143 | }; |
@@ -137,6 +152,8 @@ static inline void *mmc_priv(struct mmc_host *host) | |||
137 | return (void *)host->private; | 152 | return (void *)host->private; |
138 | } | 153 | } |
139 | 154 | ||
155 | #define mmc_host_is_spi(host) ((host)->caps & MMC_CAP_SPI) | ||
156 | |||
140 | #define mmc_dev(x) ((x)->parent) | 157 | #define mmc_dev(x) ((x)->parent) |
141 | #define mmc_classdev(x) (&(x)->class_dev) | 158 | #define mmc_classdev(x) (&(x)->class_dev) |
142 | #define mmc_hostname(x) ((x)->class_dev.bus_id) | 159 | #define mmc_hostname(x) ((x)->class_dev.bus_id) |
@@ -147,5 +164,11 @@ extern int mmc_resume_host(struct mmc_host *); | |||
147 | extern void mmc_detect_change(struct mmc_host *, unsigned long delay); | 164 | extern void mmc_detect_change(struct mmc_host *, unsigned long delay); |
148 | extern void mmc_request_done(struct mmc_host *, struct mmc_request *); | 165 | extern void mmc_request_done(struct mmc_host *, struct mmc_request *); |
149 | 166 | ||
167 | static inline void mmc_signal_sdio_irq(struct mmc_host *host) | ||
168 | { | ||
169 | host->ops->enable_sdio_irq(host, 0); | ||
170 | wake_up_process(host->sdio_irq_thread); | ||
171 | } | ||
172 | |||
150 | #endif | 173 | #endif |
151 | 174 | ||
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index e3ed9b95040e..4236fbf0b6fb 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | /* Standard MMC commands (4.1) type argument response */ | 28 | /* Standard MMC commands (4.1) type argument response */ |
29 | /* class 1 */ | 29 | /* class 1 */ |
30 | #define MMC_GO_IDLE_STATE 0 /* bc */ | 30 | #define MMC_GO_IDLE_STATE 0 /* bc */ |
31 | #define MMC_SEND_OP_COND 1 /* bcr [31:0] OCR R3 */ | 31 | #define MMC_SEND_OP_COND 1 /* bcr [31:0] OCR R3 */ |
32 | #define MMC_ALL_SEND_CID 2 /* bcr R2 */ | 32 | #define MMC_ALL_SEND_CID 2 /* bcr R2 */ |
33 | #define MMC_SET_RELATIVE_ADDR 3 /* ac [31:16] RCA R1 */ | 33 | #define MMC_SET_RELATIVE_ADDR 3 /* ac [31:16] RCA R1 */ |
@@ -39,8 +39,10 @@ | |||
39 | #define MMC_SEND_CID 10 /* ac [31:16] RCA R2 */ | 39 | #define MMC_SEND_CID 10 /* ac [31:16] RCA R2 */ |
40 | #define MMC_READ_DAT_UNTIL_STOP 11 /* adtc [31:0] dadr R1 */ | 40 | #define MMC_READ_DAT_UNTIL_STOP 11 /* adtc [31:0] dadr R1 */ |
41 | #define MMC_STOP_TRANSMISSION 12 /* ac R1b */ | 41 | #define MMC_STOP_TRANSMISSION 12 /* ac R1b */ |
42 | #define MMC_SEND_STATUS 13 /* ac [31:16] RCA R1 */ | 42 | #define MMC_SEND_STATUS 13 /* ac [31:16] RCA R1 */ |
43 | #define MMC_GO_INACTIVE_STATE 15 /* ac [31:16] RCA */ | 43 | #define MMC_GO_INACTIVE_STATE 15 /* ac [31:16] RCA */ |
44 | #define MMC_SPI_READ_OCR 58 /* spi spi_R3 */ | ||
45 | #define MMC_SPI_CRC_ON_OFF 59 /* spi [0:0] flag spi_R1 */ | ||
44 | 46 | ||
45 | /* class 2 */ | 47 | /* class 2 */ |
46 | #define MMC_SET_BLOCKLEN 16 /* ac [31:0] block len R1 */ | 48 | #define MMC_SET_BLOCKLEN 16 /* ac [31:0] block len R1 */ |
@@ -90,15 +92,15 @@ | |||
90 | */ | 92 | */ |
91 | 93 | ||
92 | /* | 94 | /* |
93 | MMC status in R1 | 95 | MMC status in R1, for native mode (SPI bits are different) |
94 | Type | 96 | Type |
95 | e : error bit | 97 | e : error bit |
96 | s : status bit | 98 | s : status bit |
97 | r : detected and set for the actual command response | 99 | r : detected and set for the actual command response |
98 | x : detected and set during command execution. the host must poll | 100 | x : detected and set during command execution. the host must poll |
99 | the card by sending status command in order to read these bits. | 101 | the card by sending status command in order to read these bits. |
100 | Clear condition | 102 | Clear condition |
101 | a : according to the card state | 103 | a : according to the card state |
102 | b : always related to the previous command. Reception of | 104 | b : always related to the previous command. Reception of |
103 | a valid command will clear it (with a delay of one command) | 105 | a valid command will clear it (with a delay of one command) |
104 | c : clear by read | 106 | c : clear by read |
@@ -124,10 +126,33 @@ | |||
124 | #define R1_CARD_ECC_DISABLED (1 << 14) /* sx, a */ | 126 | #define R1_CARD_ECC_DISABLED (1 << 14) /* sx, a */ |
125 | #define R1_ERASE_RESET (1 << 13) /* sr, c */ | 127 | #define R1_ERASE_RESET (1 << 13) /* sr, c */ |
126 | #define R1_STATUS(x) (x & 0xFFFFE000) | 128 | #define R1_STATUS(x) (x & 0xFFFFE000) |
127 | #define R1_CURRENT_STATE(x) ((x & 0x00001E00) >> 9) /* sx, b (4 bits) */ | 129 | #define R1_CURRENT_STATE(x) ((x & 0x00001E00) >> 9) /* sx, b (4 bits) */ |
128 | #define R1_READY_FOR_DATA (1 << 8) /* sx, a */ | 130 | #define R1_READY_FOR_DATA (1 << 8) /* sx, a */ |
129 | #define R1_APP_CMD (1 << 5) /* sr, c */ | 131 | #define R1_APP_CMD (1 << 5) /* sr, c */ |
130 | 132 | ||
133 | /* | ||
134 | * MMC/SD in SPI mode reports R1 status always, and R2 for SEND_STATUS | ||
135 | * R1 is the low order byte; R2 is the next highest byte, when present. | ||
136 | */ | ||
137 | #define R1_SPI_IDLE (1 << 0) | ||
138 | #define R1_SPI_ERASE_RESET (1 << 1) | ||
139 | #define R1_SPI_ILLEGAL_COMMAND (1 << 2) | ||
140 | #define R1_SPI_COM_CRC (1 << 3) | ||
141 | #define R1_SPI_ERASE_SEQ (1 << 4) | ||
142 | #define R1_SPI_ADDRESS (1 << 5) | ||
143 | #define R1_SPI_PARAMETER (1 << 6) | ||
144 | /* R1 bit 7 is always zero */ | ||
145 | #define R2_SPI_CARD_LOCKED (1 << 8) | ||
146 | #define R2_SPI_WP_ERASE_SKIP (1 << 9) /* or lock/unlock fail */ | ||
147 | #define R2_SPI_LOCK_UNLOCK_FAIL R2_SPI_WP_ERASE_SKIP | ||
148 | #define R2_SPI_ERROR (1 << 10) | ||
149 | #define R2_SPI_CC_ERROR (1 << 11) | ||
150 | #define R2_SPI_CARD_ECC_ERROR (1 << 12) | ||
151 | #define R2_SPI_WP_VIOLATION (1 << 13) | ||
152 | #define R2_SPI_ERASE_PARAM (1 << 14) | ||
153 | #define R2_SPI_OUT_OF_RANGE (1 << 15) /* or CSD overwrite */ | ||
154 | #define R2_SPI_CSD_OVERWRITE R2_SPI_OUT_OF_RANGE | ||
155 | |||
131 | /* These are unpacked versions of the actual responses */ | 156 | /* These are unpacked versions of the actual responses */ |
132 | 157 | ||
133 | struct _mmc_csd { | 158 | struct _mmc_csd { |
@@ -182,6 +207,7 @@ struct _mmc_csd { | |||
182 | */ | 207 | */ |
183 | #define CCC_BASIC (1<<0) /* (0) Basic protocol functions */ | 208 | #define CCC_BASIC (1<<0) /* (0) Basic protocol functions */ |
184 | /* (CMD0,1,2,3,4,7,9,10,12,13,15) */ | 209 | /* (CMD0,1,2,3,4,7,9,10,12,13,15) */ |
210 | /* (and for SPI, CMD58,59) */ | ||
185 | #define CCC_STREAM_READ (1<<1) /* (1) Stream read commands */ | 211 | #define CCC_STREAM_READ (1<<1) /* (1) Stream read commands */ |
186 | /* (CMD11) */ | 212 | /* (CMD11) */ |
187 | #define CCC_BLOCK_READ (1<<2) /* (2) Block read commands */ | 213 | #define CCC_BLOCK_READ (1<<2) /* (2) Block read commands */ |
@@ -227,6 +253,7 @@ struct _mmc_csd { | |||
227 | #define EXT_CSD_BUS_WIDTH 183 /* R/W */ | 253 | #define EXT_CSD_BUS_WIDTH 183 /* R/W */ |
228 | #define EXT_CSD_HS_TIMING 185 /* R/W */ | 254 | #define EXT_CSD_HS_TIMING 185 /* R/W */ |
229 | #define EXT_CSD_CARD_TYPE 196 /* RO */ | 255 | #define EXT_CSD_CARD_TYPE 196 /* RO */ |
256 | #define EXT_CSD_REV 192 /* RO */ | ||
230 | #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ | 257 | #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ |
231 | 258 | ||
232 | /* | 259 | /* |
diff --git a/include/linux/mmc/sdio.h b/include/linux/mmc/sdio.h new file mode 100644 index 000000000000..47ba464f5170 --- /dev/null +++ b/include/linux/mmc/sdio.h | |||
@@ -0,0 +1,159 @@ | |||
1 | /* | ||
2 | * include/linux/mmc/sdio.h | ||
3 | * | ||
4 | * Copyright 2006-2007 Pierre Ossman | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or (at | ||
9 | * your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef MMC_SDIO_H | ||
13 | #define MMC_SDIO_H | ||
14 | |||
15 | /* SDIO commands type argument response */ | ||
16 | #define SD_IO_SEND_OP_COND 5 /* bcr [23:0] OCR R4 */ | ||
17 | #define SD_IO_RW_DIRECT 52 /* ac [31:0] See below R5 */ | ||
18 | #define SD_IO_RW_EXTENDED 53 /* adtc [31:0] See below R5 */ | ||
19 | |||
20 | /* | ||
21 | * SD_IO_RW_DIRECT argument format: | ||
22 | * | ||
23 | * [31] R/W flag | ||
24 | * [30:28] Function number | ||
25 | * [27] RAW flag | ||
26 | * [25:9] Register address | ||
27 | * [7:0] Data | ||
28 | */ | ||
29 | |||
30 | /* | ||
31 | * SD_IO_RW_EXTENDED argument format: | ||
32 | * | ||
33 | * [31] R/W flag | ||
34 | * [30:28] Function number | ||
35 | * [27] Block mode | ||
36 | * [26] Increment address | ||
37 | * [25:9] Register address | ||
38 | * [8:0] Byte/block count | ||
39 | */ | ||
40 | |||
41 | /* | ||
42 | SDIO status in R5 | ||
43 | Type | ||
44 | e : error bit | ||
45 | s : status bit | ||
46 | r : detected and set for the actual command response | ||
47 | x : detected and set during command execution. the host must poll | ||
48 | the card by sending status command in order to read these bits. | ||
49 | Clear condition | ||
50 | a : according to the card state | ||
51 | b : always related to the previous command. Reception of | ||
52 | a valid command will clear it (with a delay of one command) | ||
53 | c : clear by read | ||
54 | */ | ||
55 | |||
56 | #define R5_COM_CRC_ERROR (1 << 15) /* er, b */ | ||
57 | #define R5_ILLEGAL_COMMAND (1 << 14) /* er, b */ | ||
58 | #define R5_ERROR (1 << 11) /* erx, c */ | ||
59 | #define R5_FUNCTION_NUMBER (1 << 9) /* er, c */ | ||
60 | #define R5_OUT_OF_RANGE (1 << 8) /* er, c */ | ||
61 | #define R5_STATUS(x) (x & 0xCB00) | ||
62 | #define R5_IO_CURRENT_STATE(x) ((x & 0x3000) >> 12) /* s, b */ | ||
63 | |||
64 | /* | ||
65 | * Card Common Control Registers (CCCR) | ||
66 | */ | ||
67 | |||
68 | #define SDIO_CCCR_CCCR 0x00 | ||
69 | |||
70 | #define SDIO_CCCR_REV_1_00 0 /* CCCR/FBR Version 1.00 */ | ||
71 | #define SDIO_CCCR_REV_1_10 1 /* CCCR/FBR Version 1.10 */ | ||
72 | #define SDIO_CCCR_REV_1_20 2 /* CCCR/FBR Version 1.20 */ | ||
73 | |||
74 | #define SDIO_SDIO_REV_1_00 0 /* SDIO Spec Version 1.00 */ | ||
75 | #define SDIO_SDIO_REV_1_10 1 /* SDIO Spec Version 1.10 */ | ||
76 | #define SDIO_SDIO_REV_1_20 2 /* SDIO Spec Version 1.20 */ | ||
77 | #define SDIO_SDIO_REV_2_00 3 /* SDIO Spec Version 2.00 */ | ||
78 | |||
79 | #define SDIO_CCCR_SD 0x01 | ||
80 | |||
81 | #define SDIO_SD_REV_1_01 0 /* SD Physical Spec Version 1.01 */ | ||
82 | #define SDIO_SD_REV_1_10 1 /* SD Physical Spec Version 1.10 */ | ||
83 | #define SDIO_SD_REV_2_00 2 /* SD Physical Spec Version 2.00 */ | ||
84 | |||
85 | #define SDIO_CCCR_IOEx 0x02 | ||
86 | #define SDIO_CCCR_IORx 0x03 | ||
87 | |||
88 | #define SDIO_CCCR_IENx 0x04 /* Function/Master Interrupt Enable */ | ||
89 | #define SDIO_CCCR_INTx 0x05 /* Function Interrupt Pending */ | ||
90 | |||
91 | #define SDIO_CCCR_ABORT 0x06 /* function abort/card reset */ | ||
92 | |||
93 | #define SDIO_CCCR_IF 0x07 /* bus interface controls */ | ||
94 | |||
95 | #define SDIO_BUS_WIDTH_1BIT 0x00 | ||
96 | #define SDIO_BUS_WIDTH_4BIT 0x02 | ||
97 | |||
98 | #define SDIO_BUS_CD_DISABLE 0x80 /* disable pull-up on DAT3 (pin 1) */ | ||
99 | |||
100 | #define SDIO_CCCR_CAPS 0x08 | ||
101 | |||
102 | #define SDIO_CCCR_CAP_SDC 0x01 /* can do CMD52 while data transfer */ | ||
103 | #define SDIO_CCCR_CAP_SMB 0x02 /* can do multi-block xfers (CMD53) */ | ||
104 | #define SDIO_CCCR_CAP_SRW 0x04 /* supports read-wait protocol */ | ||
105 | #define SDIO_CCCR_CAP_SBS 0x08 /* supports suspend/resume */ | ||
106 | #define SDIO_CCCR_CAP_S4MI 0x10 /* interrupt during 4-bit CMD53 */ | ||
107 | #define SDIO_CCCR_CAP_E4MI 0x20 /* enable ints during 4-bit CMD53 */ | ||
108 | #define SDIO_CCCR_CAP_LSC 0x40 /* low speed card */ | ||
109 | #define SDIO_CCCR_CAP_4BLS 0x80 /* 4 bit low speed card */ | ||
110 | |||
111 | #define SDIO_CCCR_CIS 0x09 /* common CIS pointer (3 bytes) */ | ||
112 | |||
113 | /* Following 4 regs are valid only if SBS is set */ | ||
114 | #define SDIO_CCCR_SUSPEND 0x0c | ||
115 | #define SDIO_CCCR_SELx 0x0d | ||
116 | #define SDIO_CCCR_EXECx 0x0e | ||
117 | #define SDIO_CCCR_READYx 0x0f | ||
118 | |||
119 | #define SDIO_CCCR_BLKSIZE 0x10 | ||
120 | |||
121 | #define SDIO_CCCR_POWER 0x12 | ||
122 | |||
123 | #define SDIO_POWER_SMPC 0x01 /* Supports Master Power Control */ | ||
124 | #define SDIO_POWER_EMPC 0x02 /* Enable Master Power Control */ | ||
125 | |||
126 | #define SDIO_CCCR_SPEED 0x13 | ||
127 | |||
128 | #define SDIO_SPEED_SHS 0x01 /* Supports High-Speed mode */ | ||
129 | #define SDIO_SPEED_EHS 0x02 /* Enable High-Speed mode */ | ||
130 | |||
131 | /* | ||
132 | * Function Basic Registers (FBR) | ||
133 | */ | ||
134 | |||
135 | #define SDIO_FBR_BASE(f) ((f) * 0x100) /* base of function f's FBRs */ | ||
136 | |||
137 | #define SDIO_FBR_STD_IF 0x00 | ||
138 | |||
139 | #define SDIO_FBR_SUPPORTS_CSA 0x40 /* supports Code Storage Area */ | ||
140 | #define SDIO_FBR_ENABLE_CSA 0x80 /* enable Code Storage Area */ | ||
141 | |||
142 | #define SDIO_FBR_STD_IF_EXT 0x01 | ||
143 | |||
144 | #define SDIO_FBR_POWER 0x02 | ||
145 | |||
146 | #define SDIO_FBR_POWER_SPS 0x01 /* Supports Power Selection */ | ||
147 | #define SDIO_FBR_POWER_EPS 0x02 /* Enable (low) Power Selection */ | ||
148 | |||
149 | #define SDIO_FBR_CIS 0x09 /* CIS pointer (3 bytes) */ | ||
150 | |||
151 | |||
152 | #define SDIO_FBR_CSA 0x0C /* CSA pointer (3 bytes) */ | ||
153 | |||
154 | #define SDIO_FBR_CSA_DATA 0x0F | ||
155 | |||
156 | #define SDIO_FBR_BLKSIZE 0x10 /* block size (2 bytes) */ | ||
157 | |||
158 | #endif | ||
159 | |||
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h new file mode 100644 index 000000000000..b050f4d7b41f --- /dev/null +++ b/include/linux/mmc/sdio_func.h | |||
@@ -0,0 +1,153 @@ | |||
1 | /* | ||
2 | * include/linux/mmc/sdio_func.h | ||
3 | * | ||
4 | * Copyright 2007 Pierre Ossman | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or (at | ||
9 | * your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef MMC_SDIO_FUNC_H | ||
13 | #define MMC_SDIO_FUNC_H | ||
14 | |||
15 | #include <linux/device.h> | ||
16 | #include <linux/mod_devicetable.h> | ||
17 | |||
18 | struct mmc_card; | ||
19 | struct sdio_func; | ||
20 | |||
21 | typedef void (sdio_irq_handler_t)(struct sdio_func *); | ||
22 | |||
23 | /* | ||
24 | * SDIO function CIS tuple (unknown to the core) | ||
25 | */ | ||
26 | struct sdio_func_tuple { | ||
27 | struct sdio_func_tuple *next; | ||
28 | unsigned char code; | ||
29 | unsigned char size; | ||
30 | unsigned char data[0]; | ||
31 | }; | ||
32 | |||
33 | /* | ||
34 | * SDIO function devices | ||
35 | */ | ||
36 | struct sdio_func { | ||
37 | struct mmc_card *card; /* the card this device belongs to */ | ||
38 | struct device dev; /* the device */ | ||
39 | sdio_irq_handler_t *irq_handler; /* IRQ callback */ | ||
40 | unsigned int num; /* function number */ | ||
41 | |||
42 | unsigned char class; /* standard interface class */ | ||
43 | unsigned short vendor; /* vendor id */ | ||
44 | unsigned short device; /* device id */ | ||
45 | |||
46 | unsigned max_blksize; /* maximum block size */ | ||
47 | unsigned cur_blksize; /* current block size */ | ||
48 | |||
49 | unsigned int state; /* function state */ | ||
50 | #define SDIO_STATE_PRESENT (1<<0) /* present in sysfs */ | ||
51 | |||
52 | u8 tmpbuf[4]; /* DMA:able scratch buffer */ | ||
53 | |||
54 | unsigned num_info; /* number of info strings */ | ||
55 | const char **info; /* info strings */ | ||
56 | |||
57 | struct sdio_func_tuple *tuples; | ||
58 | }; | ||
59 | |||
60 | #define sdio_func_present(f) ((f)->state & SDIO_STATE_PRESENT) | ||
61 | |||
62 | #define sdio_func_set_present(f) ((f)->state |= SDIO_STATE_PRESENT) | ||
63 | |||
64 | #define sdio_func_id(f) ((f)->dev.bus_id) | ||
65 | |||
66 | #define sdio_get_drvdata(f) dev_get_drvdata(&(f)->dev) | ||
67 | #define sdio_set_drvdata(f,d) dev_set_drvdata(&(f)->dev, d) | ||
68 | |||
69 | /* | ||
70 | * SDIO function device driver | ||
71 | */ | ||
72 | struct sdio_driver { | ||
73 | char *name; | ||
74 | const struct sdio_device_id *id_table; | ||
75 | |||
76 | int (*probe)(struct sdio_func *, const struct sdio_device_id *); | ||
77 | void (*remove)(struct sdio_func *); | ||
78 | |||
79 | struct device_driver drv; | ||
80 | }; | ||
81 | |||
82 | /** | ||
83 | * SDIO_DEVICE - macro used to describe a specific SDIO device | ||
84 | * @vend: the 16 bit manufacturer code | ||
85 | * @dev: the 16 bit function id | ||
86 | * | ||
87 | * This macro is used to create a struct sdio_device_id that matches a | ||
88 | * specific device. The class field will be set to SDIO_ANY_ID. | ||
89 | */ | ||
90 | #define SDIO_DEVICE(vend,dev) \ | ||
91 | .class = SDIO_ANY_ID, \ | ||
92 | .vendor = (vend), .device = (dev) | ||
93 | |||
94 | /** | ||
95 | * SDIO_DEVICE_CLASS - macro used to describe a specific SDIO device class | ||
96 | * @dev_class: the 8 bit standard interface code | ||
97 | * | ||
98 | * This macro is used to create a struct sdio_device_id that matches a | ||
99 | * specific standard SDIO function type. The vendor and device fields will | ||
100 | * be set to SDIO_ANY_ID. | ||
101 | */ | ||
102 | #define SDIO_DEVICE_CLASS(dev_class) \ | ||
103 | .class = (dev_class), \ | ||
104 | .vendor = SDIO_ANY_ID, .device = SDIO_ANY_ID | ||
105 | |||
106 | extern int sdio_register_driver(struct sdio_driver *); | ||
107 | extern void sdio_unregister_driver(struct sdio_driver *); | ||
108 | |||
109 | /* | ||
110 | * SDIO I/O operations | ||
111 | */ | ||
112 | extern void sdio_claim_host(struct sdio_func *func); | ||
113 | extern void sdio_release_host(struct sdio_func *func); | ||
114 | |||
115 | extern int sdio_enable_func(struct sdio_func *func); | ||
116 | extern int sdio_disable_func(struct sdio_func *func); | ||
117 | |||
118 | extern int sdio_set_block_size(struct sdio_func *func, unsigned blksz); | ||
119 | |||
120 | extern int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler); | ||
121 | extern int sdio_release_irq(struct sdio_func *func); | ||
122 | |||
123 | extern unsigned char sdio_readb(struct sdio_func *func, | ||
124 | unsigned int addr, int *err_ret); | ||
125 | extern unsigned short sdio_readw(struct sdio_func *func, | ||
126 | unsigned int addr, int *err_ret); | ||
127 | extern unsigned long sdio_readl(struct sdio_func *func, | ||
128 | unsigned int addr, int *err_ret); | ||
129 | |||
130 | extern int sdio_memcpy_fromio(struct sdio_func *func, void *dst, | ||
131 | unsigned int addr, int count); | ||
132 | extern int sdio_readsb(struct sdio_func *func, void *dst, | ||
133 | unsigned int addr, int count); | ||
134 | |||
135 | extern void sdio_writeb(struct sdio_func *func, unsigned char b, | ||
136 | unsigned int addr, int *err_ret); | ||
137 | extern void sdio_writew(struct sdio_func *func, unsigned short b, | ||
138 | unsigned int addr, int *err_ret); | ||
139 | extern void sdio_writel(struct sdio_func *func, unsigned long b, | ||
140 | unsigned int addr, int *err_ret); | ||
141 | |||
142 | extern int sdio_memcpy_toio(struct sdio_func *func, unsigned int addr, | ||
143 | void *src, int count); | ||
144 | extern int sdio_writesb(struct sdio_func *func, unsigned int addr, | ||
145 | void *src, int count); | ||
146 | |||
147 | extern unsigned char sdio_f0_readb(struct sdio_func *func, | ||
148 | unsigned int addr, int *err_ret); | ||
149 | extern void sdio_f0_writeb(struct sdio_func *func, unsigned char b, | ||
150 | unsigned int addr, int *err_ret); | ||
151 | |||
152 | #endif | ||
153 | |||
diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h new file mode 100644 index 000000000000..09306d47ff5e --- /dev/null +++ b/include/linux/mmc/sdio_ids.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * SDIO Classes, Interface Types, Manufacturer IDs, etc. | ||
3 | */ | ||
4 | |||
5 | #ifndef MMC_SDIO_IDS_H | ||
6 | #define MMC_SDIO_IDS_H | ||
7 | |||
8 | /* | ||
9 | * Standard SDIO Function Interfaces | ||
10 | */ | ||
11 | |||
12 | #define SDIO_CLASS_NONE 0x00 /* Not a SDIO standard interface */ | ||
13 | #define SDIO_CLASS_UART 0x01 /* standard UART interface */ | ||
14 | #define SDIO_CLASS_BT_A 0x02 /* Type-A BlueTooth std interface */ | ||
15 | #define SDIO_CLASS_BT_B 0x03 /* Type-B BlueTooth std interface */ | ||
16 | #define SDIO_CLASS_GPS 0x04 /* GPS standard interface */ | ||
17 | #define SDIO_CLASS_CAMERA 0x05 /* Camera standard interface */ | ||
18 | #define SDIO_CLASS_PHS 0x06 /* PHS standard interface */ | ||
19 | #define SDIO_CLASS_WLAN 0x07 /* WLAN interface */ | ||
20 | #define SDIO_CLASS_ATA 0x08 /* Embedded SDIO-ATA std interface */ | ||
21 | |||
22 | |||
23 | #endif | ||
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 0c522e6b0917..74523d999f7a 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -340,6 +340,17 @@ struct parisc_device_id { | |||
340 | #define PA_HVERSION_ANY_ID 0xffff | 340 | #define PA_HVERSION_ANY_ID 0xffff |
341 | #define PA_SVERSION_ANY_ID 0xffffffff | 341 | #define PA_SVERSION_ANY_ID 0xffffffff |
342 | 342 | ||
343 | /* SDIO */ | ||
344 | |||
345 | #define SDIO_ANY_ID (~0) | ||
346 | |||
347 | struct sdio_device_id { | ||
348 | __u8 class; /* Standard interface or SDIO_ANY_ID */ | ||
349 | __u16 vendor; /* Vendor or SDIO_ANY_ID */ | ||
350 | __u16 device; /* Device ID or SDIO_ANY_ID */ | ||
351 | kernel_ulong_t driver_data; /* Data private to the driver */ | ||
352 | }; | ||
353 | |||
343 | /* SSB core, see drivers/ssb/ */ | 354 | /* SSB core, see drivers/ssb/ */ |
344 | struct ssb_device_id { | 355 | struct ssb_device_id { |
345 | __u16 vendor; | 356 | __u16 vendor; |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 27363bf29791..8acae4eeaa76 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1471,6 +1471,8 @@ | |||
1471 | #define PCI_DEVICE_ID_RICOH_RL5C476 0x0476 | 1471 | #define PCI_DEVICE_ID_RICOH_RL5C476 0x0476 |
1472 | #define PCI_DEVICE_ID_RICOH_RL5C478 0x0478 | 1472 | #define PCI_DEVICE_ID_RICOH_RL5C478 0x0478 |
1473 | #define PCI_DEVICE_ID_RICOH_R5C822 0x0822 | 1473 | #define PCI_DEVICE_ID_RICOH_R5C822 0x0822 |
1474 | #define PCI_DEVICE_ID_RICOH_R5C832 0x0832 | ||
1475 | #define PCI_DEVICE_ID_RICOH_R5C843 0x0843 | ||
1474 | 1476 | ||
1475 | #define PCI_VENDOR_ID_DLINK 0x1186 | 1477 | #define PCI_VENDOR_ID_DLINK 0x1186 |
1476 | #define PCI_DEVICE_ID_DLINK_DGE510T 0x4c00 | 1478 | #define PCI_DEVICE_ID_DLINK_DGE510T 0x4c00 |
@@ -1736,6 +1738,11 @@ | |||
1736 | 1738 | ||
1737 | #define PCI_VENDOR_ID_RADISYS 0x1331 | 1739 | #define PCI_VENDOR_ID_RADISYS 0x1331 |
1738 | 1740 | ||
1741 | #define PCI_VENDOR_ID_MICRO_MEMORY 0x1332 | ||
1742 | #define PCI_DEVICE_ID_MICRO_MEMORY_5415CN 0x5415 | ||
1743 | #define PCI_DEVICE_ID_MICRO_MEMORY_5425CN 0x5425 | ||
1744 | #define PCI_DEVICE_ID_MICRO_MEMORY_6155 0x6155 | ||
1745 | |||
1739 | #define PCI_VENDOR_ID_DOMEX 0x134a | 1746 | #define PCI_VENDOR_ID_DOMEX 0x134a |
1740 | #define PCI_DEVICE_ID_DOMEX_DMX3191D 0x0001 | 1747 | #define PCI_DEVICE_ID_DOMEX_DMX3191D 0x0001 |
1741 | 1748 | ||
diff --git a/include/linux/spi/mmc_spi.h b/include/linux/spi/mmc_spi.h new file mode 100644 index 000000000000..e9bbe3ebd721 --- /dev/null +++ b/include/linux/spi/mmc_spi.h | |||
@@ -0,0 +1,33 @@ | |||
1 | #ifndef __LINUX_SPI_MMC_SPI_H | ||
2 | #define __LINUX_SPI_MMC_SPI_H | ||
3 | |||
4 | struct device; | ||
5 | struct mmc_host; | ||
6 | |||
7 | /* Put this in platform_data of a device being used to manage an MMC/SD | ||
8 | * card slot. (Modeled after PXA mmc glue; see that for usage examples.) | ||
9 | * | ||
10 | * REVISIT This is not a spi-specific notion. Any card slot should be | ||
11 | * able to handle it. If the MMC core doesn't adopt this kind of notion, | ||
12 | * switch the "struct device *" parameters over to "struct spi_device *". | ||
13 | */ | ||
14 | struct mmc_spi_platform_data { | ||
15 | /* driver activation and (optional) card detect irq hookup */ | ||
16 | int (*init)(struct device *, | ||
17 | irqreturn_t (*)(int, void *), | ||
18 | void *); | ||
19 | void (*exit)(struct device *, void *); | ||
20 | |||
21 | /* sense switch on sd cards */ | ||
22 | int (*get_ro)(struct device *); | ||
23 | |||
24 | /* how long to debounce card detect, in msecs */ | ||
25 | u16 detect_delay; | ||
26 | |||
27 | /* power management */ | ||
28 | u16 powerup_msecs; /* delay of up to 250 msec */ | ||
29 | u32 ocr_mask; /* available voltages */ | ||
30 | void (*setpower)(struct device *, unsigned int maskval); | ||
31 | }; | ||
32 | |||
33 | #endif /* __LINUX_SPI_MMC_SPI_H */ | ||
diff --git a/include/linux/swap.h b/include/linux/swap.h index 665f85f2a3af..edf681a7fd8f 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -221,7 +221,7 @@ extern void swap_unplug_io_fn(struct backing_dev_info *, struct page *); | |||
221 | /* linux/mm/page_io.c */ | 221 | /* linux/mm/page_io.c */ |
222 | extern int swap_readpage(struct file *, struct page *); | 222 | extern int swap_readpage(struct file *, struct page *); |
223 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); | 223 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); |
224 | extern int end_swap_bio_read(struct bio *bio, unsigned int bytes_done, int err); | 224 | extern void end_swap_bio_read(struct bio *bio, int err); |
225 | 225 | ||
226 | /* linux/mm/swap_state.c */ | 226 | /* linux/mm/swap_state.c */ |
227 | extern struct address_space swapper_space; | 227 | extern struct address_space swapper_space; |
diff --git a/include/linux/umem.h b/include/linux/umem.h deleted file mode 100644 index f36ebfc32bf6..000000000000 --- a/include/linux/umem.h +++ /dev/null | |||
@@ -1,138 +0,0 @@ | |||
1 | |||
2 | /* | ||
3 | * This file contains defines for the | ||
4 | * Micro Memory MM5415 | ||
5 | * family PCI Memory Module with Battery Backup. | ||
6 | * | ||
7 | * Copyright Micro Memory INC 2001. All rights reserved. | ||
8 | * Release under the terms of the GNU GENERAL PUBLIC LICENSE version 2. | ||
9 | * See the file COPYING. | ||
10 | */ | ||
11 | |||
12 | #ifndef _DRIVERS_BLOCK_MM_H | ||
13 | #define _DRIVERS_BLOCK_MM_H | ||
14 | |||
15 | |||
16 | #define IRQ_TIMEOUT (1 * HZ) | ||
17 | |||
18 | /* CSR register definition */ | ||
19 | #define MEMCTRLSTATUS_MAGIC 0x00 | ||
20 | #define MM_MAGIC_VALUE (unsigned char)0x59 | ||
21 | |||
22 | #define MEMCTRLSTATUS_BATTERY 0x04 | ||
23 | #define BATTERY_1_DISABLED 0x01 | ||
24 | #define BATTERY_1_FAILURE 0x02 | ||
25 | #define BATTERY_2_DISABLED 0x04 | ||
26 | #define BATTERY_2_FAILURE 0x08 | ||
27 | |||
28 | #define MEMCTRLSTATUS_MEMORY 0x07 | ||
29 | #define MEM_128_MB 0xfe | ||
30 | #define MEM_256_MB 0xfc | ||
31 | #define MEM_512_MB 0xf8 | ||
32 | #define MEM_1_GB 0xf0 | ||
33 | #define MEM_2_GB 0xe0 | ||
34 | |||
35 | #define MEMCTRLCMD_LEDCTRL 0x08 | ||
36 | #define LED_REMOVE 2 | ||
37 | #define LED_FAULT 4 | ||
38 | #define LED_POWER 6 | ||
39 | #define LED_FLIP 255 | ||
40 | #define LED_OFF 0x00 | ||
41 | #define LED_ON 0x01 | ||
42 | #define LED_FLASH_3_5 0x02 | ||
43 | #define LED_FLASH_7_0 0x03 | ||
44 | #define LED_POWER_ON 0x00 | ||
45 | #define LED_POWER_OFF 0x01 | ||
46 | #define USER_BIT1 0x01 | ||
47 | #define USER_BIT2 0x02 | ||
48 | |||
49 | #define MEMORY_INITIALIZED USER_BIT1 | ||
50 | |||
51 | #define MEMCTRLCMD_ERRCTRL 0x0C | ||
52 | #define EDC_NONE_DEFAULT 0x00 | ||
53 | #define EDC_NONE 0x01 | ||
54 | #define EDC_STORE_READ 0x02 | ||
55 | #define EDC_STORE_CORRECT 0x03 | ||
56 | |||
57 | #define MEMCTRLCMD_ERRCNT 0x0D | ||
58 | #define MEMCTRLCMD_ERRSTATUS 0x0E | ||
59 | |||
60 | #define ERROR_DATA_LOG 0x20 | ||
61 | #define ERROR_ADDR_LOG 0x28 | ||
62 | #define ERROR_COUNT 0x3D | ||
63 | #define ERROR_SYNDROME 0x3E | ||
64 | #define ERROR_CHECK 0x3F | ||
65 | |||
66 | #define DMA_PCI_ADDR 0x40 | ||
67 | #define DMA_LOCAL_ADDR 0x48 | ||
68 | #define DMA_TRANSFER_SIZE 0x50 | ||
69 | #define DMA_DESCRIPTOR_ADDR 0x58 | ||
70 | #define DMA_SEMAPHORE_ADDR 0x60 | ||
71 | #define DMA_STATUS_CTRL 0x68 | ||
72 | #define DMASCR_GO 0x00001 | ||
73 | #define DMASCR_TRANSFER_READ 0x00002 | ||
74 | #define DMASCR_CHAIN_EN 0x00004 | ||
75 | #define DMASCR_SEM_EN 0x00010 | ||
76 | #define DMASCR_DMA_COMP_EN 0x00020 | ||
77 | #define DMASCR_CHAIN_COMP_EN 0x00040 | ||
78 | #define DMASCR_ERR_INT_EN 0x00080 | ||
79 | #define DMASCR_PARITY_INT_EN 0x00100 | ||
80 | #define DMASCR_ANY_ERR 0x00800 | ||
81 | #define DMASCR_MBE_ERR 0x01000 | ||
82 | #define DMASCR_PARITY_ERR_REP 0x02000 | ||
83 | #define DMASCR_PARITY_ERR_DET 0x04000 | ||
84 | #define DMASCR_SYSTEM_ERR_SIG 0x08000 | ||
85 | #define DMASCR_TARGET_ABT 0x10000 | ||
86 | #define DMASCR_MASTER_ABT 0x20000 | ||
87 | #define DMASCR_DMA_COMPLETE 0x40000 | ||
88 | #define DMASCR_CHAIN_COMPLETE 0x80000 | ||
89 | |||
90 | /* | ||
91 | 3.SOME PCs HAVE HOST BRIDGES WHICH APPARENTLY DO NOT CORRECTLY HANDLE | ||
92 | READ-LINE (0xE) OR READ-MULTIPLE (0xC) PCI COMMAND CODES DURING DMA | ||
93 | TRANSFERS. IN OTHER SYSTEMS THESE COMMAND CODES WILL CAUSE THE HOST BRIDGE | ||
94 | TO ALLOW LONGER BURSTS DURING DMA READ OPERATIONS. THE UPPER FOUR BITS | ||
95 | (31..28) OF THE DMA CSR HAVE BEEN MADE PROGRAMMABLE, SO THAT EITHER A 0x6, | ||
96 | AN 0xE OR A 0xC CAN BE WRITTEN TO THEM TO SET THE COMMAND CODE USED DURING | ||
97 | DMA READ OPERATIONS. | ||
98 | */ | ||
99 | #define DMASCR_READ 0x60000000 | ||
100 | #define DMASCR_READLINE 0xE0000000 | ||
101 | #define DMASCR_READMULTI 0xC0000000 | ||
102 | |||
103 | |||
104 | #define DMASCR_ERROR_MASK (DMASCR_MASTER_ABT | DMASCR_TARGET_ABT | DMASCR_SYSTEM_ERR_SIG | DMASCR_PARITY_ERR_DET | DMASCR_MBE_ERR | DMASCR_ANY_ERR) | ||
105 | #define DMASCR_HARD_ERROR (DMASCR_MASTER_ABT | DMASCR_TARGET_ABT | DMASCR_SYSTEM_ERR_SIG | DMASCR_PARITY_ERR_DET | DMASCR_MBE_ERR) | ||
106 | |||
107 | #define WINDOWMAP_WINNUM 0x7B | ||
108 | |||
109 | #define DMA_READ_FROM_HOST 0 | ||
110 | #define DMA_WRITE_TO_HOST 1 | ||
111 | |||
112 | struct mm_dma_desc { | ||
113 | __le64 pci_addr; | ||
114 | __le64 local_addr; | ||
115 | __le32 transfer_size; | ||
116 | u32 zero1; | ||
117 | __le64 next_desc_addr; | ||
118 | __le64 sem_addr; | ||
119 | __le32 control_bits; | ||
120 | u32 zero2; | ||
121 | |||
122 | dma_addr_t data_dma_handle; | ||
123 | |||
124 | /* Copy of the bits */ | ||
125 | __le64 sem_control_bits; | ||
126 | } __attribute__((aligned(8))); | ||
127 | |||
128 | #define PCI_VENDOR_ID_MICRO_MEMORY 0x1332 | ||
129 | #define PCI_DEVICE_ID_MICRO_MEMORY_5415CN 0x5415 | ||
130 | #define PCI_DEVICE_ID_MICRO_MEMORY_5425CN 0x5425 | ||
131 | #define PCI_DEVICE_ID_MICRO_MEMORY_6155 0x6155 | ||
132 | |||
133 | /* bits for card->flags */ | ||
134 | #define UM_FLAG_DMA_IN_REGS 1 | ||
135 | #define UM_FLAG_NO_BYTE_STATUS 2 | ||
136 | #define UM_FLAG_NO_BATTREG 4 | ||
137 | #define UM_FLAG_NO_BATT 8 | ||
138 | #endif | ||
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index ae9b24c12f6a..1f503e94eff1 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -271,6 +271,7 @@ struct v4l2_pix_format | |||
271 | 271 | ||
272 | /* Pixel format FOURCC depth Description */ | 272 | /* Pixel format FOURCC depth Description */ |
273 | #define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1') /* 8 RGB-3-3-2 */ | 273 | #define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1') /* 8 RGB-3-3-2 */ |
274 | #define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R','4','4','4') /* 16 xxxxrrrr ggggbbbb */ | ||
274 | #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O') /* 16 RGB-5-5-5 */ | 275 | #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O') /* 16 RGB-5-5-5 */ |
275 | #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P') /* 16 RGB-5-6-5 */ | 276 | #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P') /* 16 RGB-5-6-5 */ |
276 | #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R','G','B','Q') /* 16 RGB-5-5-5 BE */ | 277 | #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R','G','B','Q') /* 16 RGB-5-5-5 BE */ |
@@ -280,6 +281,7 @@ struct v4l2_pix_format | |||
280 | #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B','G','R','4') /* 32 BGR-8-8-8-8 */ | 281 | #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B','G','R','4') /* 32 BGR-8-8-8-8 */ |
281 | #define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R','G','B','4') /* 32 RGB-8-8-8-8 */ | 282 | #define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R','G','B','4') /* 32 RGB-8-8-8-8 */ |
282 | #define V4L2_PIX_FMT_GREY v4l2_fourcc('G','R','E','Y') /* 8 Greyscale */ | 283 | #define V4L2_PIX_FMT_GREY v4l2_fourcc('G','R','E','Y') /* 8 Greyscale */ |
284 | #define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P','A','L','8') /* 8 8-bit palette */ | ||
283 | #define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y','V','U','9') /* 9 YVU 4:1:0 */ | 285 | #define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y','V','U','9') /* 9 YVU 4:1:0 */ |
284 | #define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y','V','1','2') /* 12 YVU 4:2:0 */ | 286 | #define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y','V','1','2') /* 12 YVU 4:2:0 */ |
285 | #define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y','U','Y','V') /* 16 YUV 4:2:2 */ | 287 | #define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y','U','Y','V') /* 16 YUV 4:2:2 */ |
@@ -287,6 +289,10 @@ struct v4l2_pix_format | |||
287 | #define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4','2','2','P') /* 16 YVU422 planar */ | 289 | #define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4','2','2','P') /* 16 YVU422 planar */ |
288 | #define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4','1','1','P') /* 16 YVU411 planar */ | 290 | #define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4','1','1','P') /* 16 YVU411 planar */ |
289 | #define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y','4','1','P') /* 12 YUV 4:1:1 */ | 291 | #define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y','4','1','P') /* 12 YUV 4:1:1 */ |
292 | #define V4L2_PIX_FMT_YUV444 v4l2_fourcc('Y','4','4','4') /* 16 xxxxyyyy uuuuvvvv */ | ||
293 | #define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y','U','V','O') /* 16 YUV-5-5-5 */ | ||
294 | #define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y','U','V','P') /* 16 YUV-5-6-5 */ | ||
295 | #define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y','U','V','4') /* 32 YUV-8-8-8-8 */ | ||
290 | 296 | ||
291 | /* two planes -- one Y, one Cr + Cb interleaved */ | 297 | /* two planes -- one Y, one Cr + Cb interleaved */ |
292 | #define V4L2_PIX_FMT_NV12 v4l2_fourcc('N','V','1','2') /* 12 Y/CbCr 4:2:0 */ | 298 | #define V4L2_PIX_FMT_NV12 v4l2_fourcc('N','V','1','2') /* 12 Y/CbCr 4:2:0 */ |
@@ -298,7 +304,6 @@ struct v4l2_pix_format | |||
298 | #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ | 304 | #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ |
299 | #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ | 305 | #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ |
300 | #define V4L2_PIX_FMT_HM12 v4l2_fourcc('H','M','1','2') /* 8 YUV 4:2:0 16x16 macroblocks */ | 306 | #define V4L2_PIX_FMT_HM12 v4l2_fourcc('H','M','1','2') /* 8 YUV 4:2:0 16x16 macroblocks */ |
301 | #define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R','4','4','4') /* 16 xxxxrrrr ggggbbbb */ | ||
302 | 307 | ||
303 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ | 308 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ |
304 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ | 309 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index b4af6bcb7b7a..c7c3337c3a88 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #define WRITEBACK_H | 5 | #define WRITEBACK_H |
6 | 6 | ||
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/fs.h> | ||
8 | 9 | ||
9 | struct backing_dev_info; | 10 | struct backing_dev_info; |
10 | 11 | ||