diff options
Diffstat (limited to 'include')
40 files changed, 1073 insertions, 124 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 3cd9ccdcbd8f..54508ccea023 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
| @@ -242,6 +242,8 @@ struct acpi_device_perf { | |||
| 242 | struct acpi_device_wakeup_flags { | 242 | struct acpi_device_wakeup_flags { |
| 243 | u8 valid:1; /* Can successfully enable wakeup? */ | 243 | u8 valid:1; /* Can successfully enable wakeup? */ |
| 244 | u8 run_wake:1; /* Run-Wake GPE devices */ | 244 | u8 run_wake:1; /* Run-Wake GPE devices */ |
| 245 | u8 always_enabled:1; /* Run-wake devices that are always enabled */ | ||
| 246 | u8 notifier_present:1; /* Wake-up notify handler has been installed */ | ||
| 245 | }; | 247 | }; |
| 246 | 248 | ||
| 247 | struct acpi_device_wakeup_state { | 249 | struct acpi_device_wakeup_state { |
| @@ -256,6 +258,7 @@ struct acpi_device_wakeup { | |||
| 256 | struct acpi_device_wakeup_state state; | 258 | struct acpi_device_wakeup_state state; |
| 257 | struct acpi_device_wakeup_flags flags; | 259 | struct acpi_device_wakeup_flags flags; |
| 258 | int prepare_count; | 260 | int prepare_count; |
| 261 | int run_wake_count; | ||
| 259 | }; | 262 | }; |
| 260 | 263 | ||
| 261 | /* Device */ | 264 | /* Device */ |
| @@ -386,6 +389,9 @@ acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int); | |||
| 386 | struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle); | 389 | struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle); |
| 387 | #define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle)) | 390 | #define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle)) |
| 388 | 391 | ||
| 392 | int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state); | ||
| 393 | int acpi_disable_wakeup_device_power(struct acpi_device *dev); | ||
| 394 | |||
| 389 | #ifdef CONFIG_PM_SLEEP | 395 | #ifdef CONFIG_PM_SLEEP |
| 390 | int acpi_pm_device_sleep_state(struct device *, int *); | 396 | int acpi_pm_device_sleep_state(struct device *, int *); |
| 391 | int acpi_pm_device_sleep_wake(struct device *, bool); | 397 | int acpi_pm_device_sleep_wake(struct device *, bool); |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index f4906f6568d4..3a4767c01c5f 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
| @@ -104,6 +104,7 @@ int acpi_pci_bind_root(struct acpi_device *device); | |||
| 104 | 104 | ||
| 105 | struct pci_bus *pci_acpi_scan_root(struct acpi_device *device, int domain, | 105 | struct pci_bus *pci_acpi_scan_root(struct acpi_device *device, int domain, |
| 106 | int bus); | 106 | int bus); |
| 107 | void pci_acpi_crs_quirks(void); | ||
| 107 | 108 | ||
| 108 | /* -------------------------------------------------------------------------- | 109 | /* -------------------------------------------------------------------------- |
| 109 | Processor | 110 | Processor |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 86e9735a96bd..3988f93b9c66 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
| @@ -281,11 +281,11 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status); | |||
| 281 | /* | 281 | /* |
| 282 | * GPE Interfaces | 282 | * GPE Interfaces |
| 283 | */ | 283 | */ |
| 284 | acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type); | 284 | acpi_status acpi_set_gpe(acpi_handle gpe_device, u32 gpe_number, u8 action); |
| 285 | 285 | ||
| 286 | acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number); | 286 | acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u8 type); |
| 287 | 287 | ||
| 288 | acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number); | 288 | acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u8 type); |
| 289 | 289 | ||
| 290 | acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags); | 290 | acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags); |
| 291 | 291 | ||
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 153f12dc3373..73af40863371 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
| @@ -668,15 +668,16 @@ typedef u32 acpi_event_status; | |||
| 668 | 668 | ||
| 669 | /* | 669 | /* |
| 670 | * GPE info flags - Per GPE | 670 | * GPE info flags - Per GPE |
| 671 | * +-+-+-+---+---+-+ | 671 | * +-+-+-+---+-+-+-+ |
| 672 | * |7|6|5|4:3|2:1|0| | 672 | * |7|6|5|4:3|2|1|0| |
| 673 | * +-+-+-+---+---+-+ | 673 | * +-+-+-+---+-+-+-+ |
| 674 | * | | | | | | | 674 | * | | | | | | | |
| 675 | * | | | | | +--- Interrupt type: Edge or Level Triggered | 675 | * | | | | | | +--- Interrupt type: Edge or Level Triggered |
| 676 | * | | | | +--- Type: Wake-only, Runtime-only, or wake/runtime | 676 | * | | | | | +--- GPE can wake the system |
| 677 | * | | | | +--- Unused | ||
| 677 | * | | | +--- Type of dispatch -- to method, handler, or none | 678 | * | | | +--- Type of dispatch -- to method, handler, or none |
| 678 | * | | +--- Enabled for runtime? | 679 | * | | +--- Unused |
| 679 | * | +--- Enabled for wake? | 680 | * | +--- Unused |
| 680 | * +--- Unused | 681 | * +--- Unused |
| 681 | */ | 682 | */ |
| 682 | #define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x01 | 683 | #define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x01 |
| @@ -687,22 +688,13 @@ typedef u32 acpi_event_status; | |||
| 687 | #define ACPI_GPE_TYPE_WAKE_RUN (u8) 0x06 | 688 | #define ACPI_GPE_TYPE_WAKE_RUN (u8) 0x06 |
| 688 | #define ACPI_GPE_TYPE_WAKE (u8) 0x02 | 689 | #define ACPI_GPE_TYPE_WAKE (u8) 0x02 |
| 689 | #define ACPI_GPE_TYPE_RUNTIME (u8) 0x04 /* Default */ | 690 | #define ACPI_GPE_TYPE_RUNTIME (u8) 0x04 /* Default */ |
| 691 | #define ACPI_GPE_CAN_WAKE (u8) 0x02 | ||
| 690 | 692 | ||
| 691 | #define ACPI_GPE_DISPATCH_MASK (u8) 0x18 | 693 | #define ACPI_GPE_DISPATCH_MASK (u8) 0x18 |
| 692 | #define ACPI_GPE_DISPATCH_HANDLER (u8) 0x08 | 694 | #define ACPI_GPE_DISPATCH_HANDLER (u8) 0x08 |
| 693 | #define ACPI_GPE_DISPATCH_METHOD (u8) 0x10 | 695 | #define ACPI_GPE_DISPATCH_METHOD (u8) 0x10 |
| 694 | #define ACPI_GPE_DISPATCH_NOT_USED (u8) 0x00 /* Default */ | 696 | #define ACPI_GPE_DISPATCH_NOT_USED (u8) 0x00 /* Default */ |
| 695 | 697 | ||
| 696 | #define ACPI_GPE_RUN_ENABLE_MASK (u8) 0x20 | ||
| 697 | #define ACPI_GPE_RUN_ENABLED (u8) 0x20 | ||
| 698 | #define ACPI_GPE_RUN_DISABLED (u8) 0x00 /* Default */ | ||
| 699 | |||
| 700 | #define ACPI_GPE_WAKE_ENABLE_MASK (u8) 0x40 | ||
| 701 | #define ACPI_GPE_WAKE_ENABLED (u8) 0x40 | ||
| 702 | #define ACPI_GPE_WAKE_DISABLED (u8) 0x00 /* Default */ | ||
| 703 | |||
| 704 | #define ACPI_GPE_ENABLE_MASK (u8) 0x60 /* Both run/wake */ | ||
| 705 | |||
| 706 | /* | 698 | /* |
| 707 | * Flags for GPE and Lock interfaces | 699 | * Flags for GPE and Lock interfaces |
| 708 | */ | 700 | */ |
diff --git a/include/crypto/md5.h b/include/crypto/md5.h new file mode 100644 index 000000000000..65f299b08b0d --- /dev/null +++ b/include/crypto/md5.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #ifndef _CRYPTO_MD5_H | ||
| 2 | #define _CRYPTO_MD5_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | #define MD5_DIGEST_SIZE 16 | ||
| 7 | #define MD5_HMAC_BLOCK_SIZE 64 | ||
| 8 | #define MD5_BLOCK_WORDS 16 | ||
| 9 | #define MD5_HASH_WORDS 4 | ||
| 10 | |||
| 11 | struct md5_state { | ||
| 12 | u32 hash[MD5_HASH_WORDS]; | ||
| 13 | u32 block[MD5_BLOCK_WORDS]; | ||
| 14 | u64 byte_count; | ||
| 15 | }; | ||
| 16 | |||
| 17 | #endif | ||
diff --git a/include/crypto/pcrypt.h b/include/crypto/pcrypt.h new file mode 100644 index 000000000000..d7d8bd8c6edc --- /dev/null +++ b/include/crypto/pcrypt.h | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | /* | ||
| 2 | * pcrypt - Parallel crypto engine. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2009 secunet Security Networks AG | ||
| 5 | * Copyright (C) 2009 Steffen Klassert <steffen.klassert@secunet.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it | ||
| 8 | * under the terms and conditions of the GNU General Public License, | ||
| 9 | * version 2, as published by the Free Software Foundation. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 14 | * more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License along with | ||
| 17 | * this program; if not, write to the Free Software Foundation, Inc., | ||
| 18 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef _CRYPTO_PCRYPT_H | ||
| 22 | #define _CRYPTO_PCRYPT_H | ||
| 23 | |||
| 24 | #include <linux/crypto.h> | ||
| 25 | #include <linux/kernel.h> | ||
| 26 | #include <linux/padata.h> | ||
| 27 | |||
| 28 | struct pcrypt_request { | ||
| 29 | struct padata_priv padata; | ||
| 30 | void *data; | ||
| 31 | void *__ctx[] CRYPTO_MINALIGN_ATTR; | ||
| 32 | }; | ||
| 33 | |||
| 34 | static inline void *pcrypt_request_ctx(struct pcrypt_request *req) | ||
| 35 | { | ||
| 36 | return req->__ctx; | ||
| 37 | } | ||
| 38 | |||
| 39 | static inline | ||
| 40 | struct padata_priv *pcrypt_request_padata(struct pcrypt_request *req) | ||
| 41 | { | ||
| 42 | return &req->padata; | ||
| 43 | } | ||
| 44 | |||
| 45 | static inline | ||
| 46 | struct pcrypt_request *pcrypt_padata_request(struct padata_priv *padata) | ||
| 47 | { | ||
| 48 | return container_of(padata, struct pcrypt_request, padata); | ||
| 49 | } | ||
| 50 | |||
| 51 | #endif | ||
diff --git a/include/linux/device.h b/include/linux/device.h index a62799f2ab00..b30527db3ac0 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -472,6 +472,23 @@ static inline int device_is_registered(struct device *dev) | |||
| 472 | return dev->kobj.state_in_sysfs; | 472 | return dev->kobj.state_in_sysfs; |
| 473 | } | 473 | } |
| 474 | 474 | ||
| 475 | static inline void device_enable_async_suspend(struct device *dev) | ||
| 476 | { | ||
| 477 | if (dev->power.status == DPM_ON) | ||
| 478 | dev->power.async_suspend = true; | ||
| 479 | } | ||
| 480 | |||
| 481 | static inline void device_disable_async_suspend(struct device *dev) | ||
| 482 | { | ||
| 483 | if (dev->power.status == DPM_ON) | ||
| 484 | dev->power.async_suspend = false; | ||
| 485 | } | ||
| 486 | |||
| 487 | static inline bool device_async_suspend_enabled(struct device *dev) | ||
| 488 | { | ||
| 489 | return !!dev->power.async_suspend; | ||
| 490 | } | ||
| 491 | |||
| 475 | void driver_init(void); | 492 | void driver_init(void); |
| 476 | 493 | ||
| 477 | /* | 494 | /* |
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index ab2cc20e21a5..74152c08ad07 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
| @@ -17,6 +17,12 @@ static inline void flush_anon_page(struct vm_area_struct *vma, struct page *page | |||
| 17 | static inline void flush_kernel_dcache_page(struct page *page) | 17 | static inline void flush_kernel_dcache_page(struct page *page) |
| 18 | { | 18 | { |
| 19 | } | 19 | } |
| 20 | static inline void flush_kernel_vmap_range(void *vaddr, int size) | ||
| 21 | { | ||
| 22 | } | ||
| 23 | static inline void invalidate_kernel_vmap_range(void *vaddr, int size) | ||
| 24 | { | ||
| 25 | } | ||
| 20 | #endif | 26 | #endif |
| 21 | 27 | ||
| 22 | #include <asm/kmap_types.h> | 28 | #include <asm/kmap_types.h> |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 7129504e053d..dda98410d588 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
| @@ -112,6 +112,7 @@ extern struct resource iomem_resource; | |||
| 112 | 112 | ||
| 113 | extern int request_resource(struct resource *root, struct resource *new); | 113 | extern int request_resource(struct resource *root, struct resource *new); |
| 114 | extern int release_resource(struct resource *new); | 114 | extern int release_resource(struct resource *new); |
| 115 | void release_child_resources(struct resource *new); | ||
| 115 | extern void reserve_region_with_split(struct resource *root, | 116 | extern void reserve_region_with_split(struct resource *root, |
| 116 | resource_size_t start, resource_size_t end, | 117 | resource_size_t start, resource_size_t end, |
| 117 | const char *name); | 118 | const char *name); |
| @@ -120,8 +121,10 @@ extern void insert_resource_expand_to_fit(struct resource *root, struct resource | |||
| 120 | extern int allocate_resource(struct resource *root, struct resource *new, | 121 | extern int allocate_resource(struct resource *root, struct resource *new, |
| 121 | resource_size_t size, resource_size_t min, | 122 | resource_size_t size, resource_size_t min, |
| 122 | resource_size_t max, resource_size_t align, | 123 | resource_size_t max, resource_size_t align, |
| 123 | void (*alignf)(void *, struct resource *, | 124 | resource_size_t (*alignf)(void *, |
| 124 | resource_size_t, resource_size_t), | 125 | const struct resource *, |
| 126 | resource_size_t, | ||
| 127 | resource_size_t), | ||
| 125 | void *alignf_data); | 128 | void *alignf_data); |
| 126 | int adjust_resource(struct resource *res, resource_size_t start, | 129 | int adjust_resource(struct resource *res, resource_size_t start, |
| 127 | resource_size_t size); | 130 | resource_size_t size); |
diff --git a/include/linux/mtd/sh_flctl.h b/include/linux/mtd/sh_flctl.h index e77c1cea404d..ab77609ec337 100644 --- a/include/linux/mtd/sh_flctl.h +++ b/include/linux/mtd/sh_flctl.h | |||
| @@ -51,6 +51,8 @@ | |||
| 51 | #define _4ECCCNTEN (0x1 << 24) | 51 | #define _4ECCCNTEN (0x1 << 24) |
| 52 | #define _4ECCEN (0x1 << 23) | 52 | #define _4ECCEN (0x1 << 23) |
| 53 | #define _4ECCCORRECT (0x1 << 22) | 53 | #define _4ECCCORRECT (0x1 << 22) |
| 54 | #define SHBUSSEL (0x1 << 20) | ||
| 55 | #define SEL_16BIT (0x1 << 19) | ||
| 54 | #define SNAND_E (0x1 << 18) /* SNAND (0=512 1=2048)*/ | 56 | #define SNAND_E (0x1 << 18) /* SNAND (0=512 1=2048)*/ |
| 55 | #define QTSEL_E (0x1 << 17) | 57 | #define QTSEL_E (0x1 << 17) |
| 56 | #define ENDIAN (0x1 << 16) /* 1 = little endian */ | 58 | #define ENDIAN (0x1 << 16) /* 1 = little endian */ |
| @@ -96,6 +98,7 @@ | |||
| 96 | struct sh_flctl { | 98 | struct sh_flctl { |
| 97 | struct mtd_info mtd; | 99 | struct mtd_info mtd; |
| 98 | struct nand_chip chip; | 100 | struct nand_chip chip; |
| 101 | struct platform_device *pdev; | ||
| 99 | void __iomem *reg; | 102 | void __iomem *reg; |
| 100 | 103 | ||
| 101 | uint8_t done_buff[2048 + 64]; /* max size 2048 + 64 */ | 104 | uint8_t done_buff[2048 + 64]; /* max size 2048 + 64 */ |
diff --git a/include/linux/padata.h b/include/linux/padata.h new file mode 100644 index 000000000000..51611da9c498 --- /dev/null +++ b/include/linux/padata.h | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | /* | ||
| 2 | * padata.h - header for the padata parallelization interface | ||
| 3 | * | ||
| 4 | * Copyright (C) 2008, 2009 secunet Security Networks AG | ||
| 5 | * Copyright (C) 2008, 2009 Steffen Klassert <steffen.klassert@secunet.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it | ||
| 8 | * under the terms and conditions of the GNU General Public License, | ||
| 9 | * version 2, as published by the Free Software Foundation. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 14 | * more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License along with | ||
| 17 | * this program; if not, write to the Free Software Foundation, Inc., | ||
| 18 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef PADATA_H | ||
| 22 | #define PADATA_H | ||
| 23 | |||
| 24 | #include <linux/workqueue.h> | ||
| 25 | #include <linux/spinlock.h> | ||
| 26 | #include <linux/list.h> | ||
| 27 | |||
| 28 | struct padata_priv { | ||
| 29 | struct list_head list; | ||
| 30 | struct parallel_data *pd; | ||
| 31 | int cb_cpu; | ||
| 32 | int seq_nr; | ||
| 33 | int info; | ||
| 34 | void (*parallel)(struct padata_priv *padata); | ||
| 35 | void (*serial)(struct padata_priv *padata); | ||
| 36 | }; | ||
| 37 | |||
| 38 | struct padata_list { | ||
| 39 | struct list_head list; | ||
| 40 | spinlock_t lock; | ||
| 41 | }; | ||
| 42 | |||
| 43 | struct padata_queue { | ||
| 44 | struct padata_list parallel; | ||
| 45 | struct padata_list reorder; | ||
| 46 | struct padata_list serial; | ||
| 47 | struct work_struct pwork; | ||
| 48 | struct work_struct swork; | ||
| 49 | struct parallel_data *pd; | ||
| 50 | atomic_t num_obj; | ||
| 51 | int cpu_index; | ||
| 52 | }; | ||
| 53 | |||
| 54 | struct parallel_data { | ||
| 55 | struct padata_instance *pinst; | ||
| 56 | struct padata_queue *queue; | ||
| 57 | atomic_t seq_nr; | ||
| 58 | atomic_t reorder_objects; | ||
| 59 | atomic_t refcnt; | ||
| 60 | unsigned int max_seq_nr; | ||
| 61 | cpumask_var_t cpumask; | ||
| 62 | spinlock_t lock; | ||
| 63 | }; | ||
| 64 | |||
| 65 | struct padata_instance { | ||
| 66 | struct notifier_block cpu_notifier; | ||
| 67 | struct workqueue_struct *wq; | ||
| 68 | struct parallel_data *pd; | ||
| 69 | cpumask_var_t cpumask; | ||
| 70 | struct mutex lock; | ||
| 71 | u8 flags; | ||
| 72 | #define PADATA_INIT 1 | ||
| 73 | #define PADATA_RESET 2 | ||
| 74 | }; | ||
| 75 | |||
| 76 | extern struct padata_instance *padata_alloc(const struct cpumask *cpumask, | ||
| 77 | struct workqueue_struct *wq); | ||
| 78 | extern void padata_free(struct padata_instance *pinst); | ||
| 79 | extern int padata_do_parallel(struct padata_instance *pinst, | ||
| 80 | struct padata_priv *padata, int cb_cpu); | ||
| 81 | extern void padata_do_serial(struct padata_priv *padata); | ||
| 82 | extern int padata_set_cpumask(struct padata_instance *pinst, | ||
| 83 | cpumask_var_t cpumask); | ||
| 84 | extern int padata_add_cpu(struct padata_instance *pinst, int cpu); | ||
| 85 | extern int padata_remove_cpu(struct padata_instance *pinst, int cpu); | ||
| 86 | extern void padata_start(struct padata_instance *pinst); | ||
| 87 | extern void padata_stop(struct padata_instance *pinst); | ||
| 88 | #endif | ||
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 93a7c08f869d..c8b6473c5f42 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
| @@ -11,6 +11,13 @@ | |||
| 11 | #include <linux/acpi.h> | 11 | #include <linux/acpi.h> |
| 12 | 12 | ||
| 13 | #ifdef CONFIG_ACPI | 13 | #ifdef CONFIG_ACPI |
| 14 | extern acpi_status pci_acpi_add_bus_pm_notifier(struct acpi_device *dev, | ||
| 15 | struct pci_bus *pci_bus); | ||
| 16 | extern acpi_status pci_acpi_remove_bus_pm_notifier(struct acpi_device *dev); | ||
| 17 | extern acpi_status pci_acpi_add_pm_notifier(struct acpi_device *dev, | ||
| 18 | struct pci_dev *pci_dev); | ||
| 19 | extern acpi_status pci_acpi_remove_pm_notifier(struct acpi_device *dev); | ||
| 20 | |||
| 14 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) | 21 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) |
| 15 | { | 22 | { |
| 16 | struct pci_bus *pbus = pdev->bus; | 23 | struct pci_bus *pbus = pdev->bus; |
diff --git a/include/linux/pci.h b/include/linux/pci.h index c1968f464c38..e19a69613d8f 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -187,6 +187,33 @@ enum pci_bus_flags { | |||
| 187 | PCI_BUS_FLAGS_NO_MMRBC = (__force pci_bus_flags_t) 2, | 187 | PCI_BUS_FLAGS_NO_MMRBC = (__force pci_bus_flags_t) 2, |
| 188 | }; | 188 | }; |
| 189 | 189 | ||
| 190 | /* Based on the PCI Hotplug Spec, but some values are made up by us */ | ||
| 191 | enum pci_bus_speed { | ||
| 192 | PCI_SPEED_33MHz = 0x00, | ||
| 193 | PCI_SPEED_66MHz = 0x01, | ||
| 194 | PCI_SPEED_66MHz_PCIX = 0x02, | ||
| 195 | PCI_SPEED_100MHz_PCIX = 0x03, | ||
| 196 | PCI_SPEED_133MHz_PCIX = 0x04, | ||
| 197 | PCI_SPEED_66MHz_PCIX_ECC = 0x05, | ||
| 198 | PCI_SPEED_100MHz_PCIX_ECC = 0x06, | ||
| 199 | PCI_SPEED_133MHz_PCIX_ECC = 0x07, | ||
| 200 | PCI_SPEED_66MHz_PCIX_266 = 0x09, | ||
| 201 | PCI_SPEED_100MHz_PCIX_266 = 0x0a, | ||
| 202 | PCI_SPEED_133MHz_PCIX_266 = 0x0b, | ||
| 203 | AGP_UNKNOWN = 0x0c, | ||
| 204 | AGP_1X = 0x0d, | ||
| 205 | AGP_2X = 0x0e, | ||
| 206 | AGP_4X = 0x0f, | ||
| 207 | AGP_8X = 0x10, | ||
| 208 | PCI_SPEED_66MHz_PCIX_533 = 0x11, | ||
| 209 | PCI_SPEED_100MHz_PCIX_533 = 0x12, | ||
| 210 | PCI_SPEED_133MHz_PCIX_533 = 0x13, | ||
| 211 | PCIE_SPEED_2_5GT = 0x14, | ||
| 212 | PCIE_SPEED_5_0GT = 0x15, | ||
| 213 | PCIE_SPEED_8_0GT = 0x16, | ||
| 214 | PCI_SPEED_UNKNOWN = 0xff, | ||
| 215 | }; | ||
| 216 | |||
| 190 | struct pci_cap_saved_state { | 217 | struct pci_cap_saved_state { |
| 191 | struct hlist_node next; | 218 | struct hlist_node next; |
| 192 | char cap_nr; | 219 | char cap_nr; |
| @@ -239,6 +266,7 @@ struct pci_dev { | |||
| 239 | configuration space */ | 266 | configuration space */ |
| 240 | unsigned int pme_support:5; /* Bitmask of states from which PME# | 267 | unsigned int pme_support:5; /* Bitmask of states from which PME# |
| 241 | can be generated */ | 268 | can be generated */ |
| 269 | unsigned int pme_interrupt:1; | ||
| 242 | unsigned int d1_support:1; /* Low power state D1 is supported */ | 270 | unsigned int d1_support:1; /* Low power state D1 is supported */ |
| 243 | unsigned int d2_support:1; /* Low power state D2 is supported */ | 271 | unsigned int d2_support:1; /* Low power state D2 is supported */ |
| 244 | unsigned int no_d1d2:1; /* Only allow D0 and D3 */ | 272 | unsigned int no_d1d2:1; /* Only allow D0 and D3 */ |
| @@ -275,7 +303,8 @@ struct pci_dev { | |||
| 275 | unsigned int msix_enabled:1; | 303 | unsigned int msix_enabled:1; |
| 276 | unsigned int ari_enabled:1; /* ARI forwarding */ | 304 | unsigned int ari_enabled:1; /* ARI forwarding */ |
| 277 | unsigned int is_managed:1; | 305 | unsigned int is_managed:1; |
| 278 | unsigned int is_pcie:1; | 306 | unsigned int is_pcie:1; /* Obsolete. Will be removed. |
| 307 | Use pci_is_pcie() instead */ | ||
| 279 | unsigned int needs_freset:1; /* Dev requires fundamental reset */ | 308 | unsigned int needs_freset:1; /* Dev requires fundamental reset */ |
| 280 | unsigned int state_saved:1; | 309 | unsigned int state_saved:1; |
| 281 | unsigned int is_physfn:1; | 310 | unsigned int is_physfn:1; |
| @@ -335,9 +364,26 @@ static inline void pci_add_saved_cap(struct pci_dev *pci_dev, | |||
| 335 | hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space); | 364 | hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space); |
| 336 | } | 365 | } |
| 337 | 366 | ||
| 338 | #ifndef PCI_BUS_NUM_RESOURCES | 367 | /* |
| 339 | #define PCI_BUS_NUM_RESOURCES 16 | 368 | * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond |
| 340 | #endif | 369 | * to P2P or CardBus bridge windows) go in a table. Additional ones (for |
| 370 | * buses below host bridges or subtractive decode bridges) go in the list. | ||
| 371 | * Use pci_bus_for_each_resource() to iterate through all the resources. | ||
| 372 | */ | ||
| 373 | |||
| 374 | /* | ||
| 375 | * PCI_SUBTRACTIVE_DECODE means the bridge forwards the window implicitly | ||
| 376 | * and there's no way to program the bridge with the details of the window. | ||
| 377 | * This does not apply to ACPI _CRS windows, even with the _DEC subtractive- | ||
| 378 | * decode bit set, because they are explicit and can be programmed with _SRS. | ||
| 379 | */ | ||
| 380 | #define PCI_SUBTRACTIVE_DECODE 0x1 | ||
| 381 | |||
| 382 | struct pci_bus_resource { | ||
| 383 | struct list_head list; | ||
| 384 | struct resource *res; | ||
| 385 | unsigned int flags; | ||
| 386 | }; | ||
| 341 | 387 | ||
| 342 | #define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */ | 388 | #define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */ |
| 343 | 389 | ||
| @@ -348,8 +394,8 @@ struct pci_bus { | |||
| 348 | struct list_head devices; /* list of devices on this bus */ | 394 | struct list_head devices; /* list of devices on this bus */ |
| 349 | struct pci_dev *self; /* bridge device as seen by parent */ | 395 | struct pci_dev *self; /* bridge device as seen by parent */ |
| 350 | struct list_head slots; /* list of slots on this bus */ | 396 | struct list_head slots; /* list of slots on this bus */ |
| 351 | struct resource *resource[PCI_BUS_NUM_RESOURCES]; | 397 | struct resource *resource[PCI_BRIDGE_RESOURCE_NUM]; |
| 352 | /* address space routed to this bus */ | 398 | struct list_head resources; /* address space routed to this bus */ |
| 353 | 399 | ||
| 354 | struct pci_ops *ops; /* configuration access functions */ | 400 | struct pci_ops *ops; /* configuration access functions */ |
| 355 | void *sysdata; /* hook for sys-specific extension */ | 401 | void *sysdata; /* hook for sys-specific extension */ |
| @@ -359,6 +405,8 @@ struct pci_bus { | |||
| 359 | unsigned char primary; /* number of primary bridge */ | 405 | unsigned char primary; /* number of primary bridge */ |
| 360 | unsigned char secondary; /* number of secondary bridge */ | 406 | unsigned char secondary; /* number of secondary bridge */ |
| 361 | unsigned char subordinate; /* max number of subordinate buses */ | 407 | unsigned char subordinate; /* max number of subordinate buses */ |
| 408 | unsigned char max_bus_speed; /* enum pci_bus_speed */ | ||
| 409 | unsigned char cur_bus_speed; /* enum pci_bus_speed */ | ||
| 362 | 410 | ||
| 363 | char name[48]; | 411 | char name[48]; |
| 364 | 412 | ||
| @@ -563,7 +611,8 @@ int __must_check pcibios_enable_device(struct pci_dev *, int mask); | |||
| 563 | char *pcibios_setup(char *str); | 611 | char *pcibios_setup(char *str); |
| 564 | 612 | ||
| 565 | /* Used only when drivers/pci/setup.c is used */ | 613 | /* Used only when drivers/pci/setup.c is used */ |
| 566 | void pcibios_align_resource(void *, struct resource *, resource_size_t, | 614 | resource_size_t pcibios_align_resource(void *, const struct resource *, |
| 615 | resource_size_t, | ||
| 567 | resource_size_t); | 616 | resource_size_t); |
| 568 | void pcibios_update_irq(struct pci_dev *, int irq); | 617 | void pcibios_update_irq(struct pci_dev *, int irq); |
| 569 | 618 | ||
| @@ -589,6 +638,7 @@ struct pci_bus *pci_create_bus(struct device *parent, int bus, | |||
| 589 | struct pci_ops *ops, void *sysdata); | 638 | struct pci_ops *ops, void *sysdata); |
| 590 | struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, | 639 | struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, |
| 591 | int busnr); | 640 | int busnr); |
| 641 | void pcie_update_link_speed(struct pci_bus *bus, u16 link_status); | ||
| 592 | struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr, | 642 | struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr, |
| 593 | const char *name, | 643 | const char *name, |
| 594 | struct hotplug_slot *hotplug); | 644 | struct hotplug_slot *hotplug); |
| @@ -615,12 +665,6 @@ extern void pci_sort_breadthfirst(void); | |||
| 615 | 665 | ||
| 616 | /* Generic PCI functions exported to card drivers */ | 666 | /* Generic PCI functions exported to card drivers */ |
| 617 | 667 | ||
| 618 | #ifdef CONFIG_PCI_LEGACY | ||
| 619 | struct pci_dev __deprecated *pci_find_device(unsigned int vendor, | ||
| 620 | unsigned int device, | ||
| 621 | struct pci_dev *from); | ||
| 622 | #endif /* CONFIG_PCI_LEGACY */ | ||
| 623 | |||
| 624 | enum pci_lost_interrupt_reason { | 668 | enum pci_lost_interrupt_reason { |
| 625 | PCI_LOST_IRQ_NO_INFORMATION = 0, | 669 | PCI_LOST_IRQ_NO_INFORMATION = 0, |
| 626 | PCI_LOST_IRQ_DISABLE_MSI, | 670 | PCI_LOST_IRQ_DISABLE_MSI, |
| @@ -750,11 +794,19 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state); | |||
| 750 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); | 794 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); |
| 751 | bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); | 795 | bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); |
| 752 | void pci_pme_active(struct pci_dev *dev, bool enable); | 796 | void pci_pme_active(struct pci_dev *dev, bool enable); |
| 753 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, bool enable); | 797 | int __pci_enable_wake(struct pci_dev *dev, pci_power_t state, |
| 798 | bool runtime, bool enable); | ||
| 754 | int pci_wake_from_d3(struct pci_dev *dev, bool enable); | 799 | int pci_wake_from_d3(struct pci_dev *dev, bool enable); |
| 755 | pci_power_t pci_target_state(struct pci_dev *dev); | 800 | pci_power_t pci_target_state(struct pci_dev *dev); |
| 756 | int pci_prepare_to_sleep(struct pci_dev *dev); | 801 | int pci_prepare_to_sleep(struct pci_dev *dev); |
| 757 | int pci_back_from_sleep(struct pci_dev *dev); | 802 | int pci_back_from_sleep(struct pci_dev *dev); |
| 803 | bool pci_dev_run_wake(struct pci_dev *dev); | ||
| 804 | |||
| 805 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, | ||
| 806 | bool enable) | ||
| 807 | { | ||
| 808 | return __pci_enable_wake(dev, state, false, enable); | ||
| 809 | } | ||
| 758 | 810 | ||
| 759 | /* For use by arch with custom probe code */ | 811 | /* For use by arch with custom probe code */ |
| 760 | void set_pcie_port_type(struct pci_dev *pdev); | 812 | void set_pcie_port_type(struct pci_dev *pdev); |
| @@ -776,6 +828,7 @@ void pci_bus_assign_resources(const struct pci_bus *bus); | |||
| 776 | void pci_bus_size_bridges(struct pci_bus *bus); | 828 | void pci_bus_size_bridges(struct pci_bus *bus); |
| 777 | int pci_claim_resource(struct pci_dev *, int); | 829 | int pci_claim_resource(struct pci_dev *, int); |
| 778 | void pci_assign_unassigned_resources(void); | 830 | void pci_assign_unassigned_resources(void); |
| 831 | void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge); | ||
| 779 | void pdev_enable_device(struct pci_dev *); | 832 | void pdev_enable_device(struct pci_dev *); |
| 780 | void pdev_sort_resources(struct pci_dev *, struct resource_list *); | 833 | void pdev_sort_resources(struct pci_dev *, struct resource_list *); |
| 781 | int pci_enable_resources(struct pci_dev *, int mask); | 834 | int pci_enable_resources(struct pci_dev *, int mask); |
| @@ -793,12 +846,23 @@ int pci_request_selected_regions_exclusive(struct pci_dev *, int, const char *); | |||
| 793 | void pci_release_selected_regions(struct pci_dev *, int); | 846 | void pci_release_selected_regions(struct pci_dev *, int); |
| 794 | 847 | ||
| 795 | /* drivers/pci/bus.c */ | 848 | /* drivers/pci/bus.c */ |
| 849 | void pci_bus_add_resource(struct pci_bus *bus, struct resource *res, unsigned int flags); | ||
| 850 | struct resource *pci_bus_resource_n(const struct pci_bus *bus, int n); | ||
| 851 | void pci_bus_remove_resources(struct pci_bus *bus); | ||
| 852 | |||
| 853 | #define pci_bus_for_each_resource(bus, res, i) \ | ||
| 854 | for (i = 0; \ | ||
| 855 | (res = pci_bus_resource_n(bus, i)) || i < PCI_BRIDGE_RESOURCE_NUM; \ | ||
| 856 | i++) | ||
| 857 | |||
| 796 | int __must_check pci_bus_alloc_resource(struct pci_bus *bus, | 858 | int __must_check pci_bus_alloc_resource(struct pci_bus *bus, |
| 797 | struct resource *res, resource_size_t size, | 859 | struct resource *res, resource_size_t size, |
| 798 | resource_size_t align, resource_size_t min, | 860 | resource_size_t align, resource_size_t min, |
| 799 | unsigned int type_mask, | 861 | unsigned int type_mask, |
| 800 | void (*alignf)(void *, struct resource *, | 862 | resource_size_t (*alignf)(void *, |
| 801 | resource_size_t, resource_size_t), | 863 | const struct resource *, |
| 864 | resource_size_t, | ||
| 865 | resource_size_t), | ||
| 802 | void *alignf_data); | 866 | void *alignf_data); |
| 803 | void pci_enable_bridges(struct pci_bus *bus); | 867 | void pci_enable_bridges(struct pci_bus *bus); |
| 804 | 868 | ||
| @@ -977,13 +1041,6 @@ static inline int pci_proc_domain(struct pci_bus *bus) | |||
| 977 | _PCI_NOP_ALL(read, *) | 1041 | _PCI_NOP_ALL(read, *) |
| 978 | _PCI_NOP_ALL(write,) | 1042 | _PCI_NOP_ALL(write,) |
| 979 | 1043 | ||
| 980 | static inline struct pci_dev *pci_find_device(unsigned int vendor, | ||
| 981 | unsigned int device, | ||
| 982 | struct pci_dev *from) | ||
| 983 | { | ||
| 984 | return NULL; | ||
| 985 | } | ||
| 986 | |||
| 987 | static inline struct pci_dev *pci_get_device(unsigned int vendor, | 1044 | static inline struct pci_dev *pci_get_device(unsigned int vendor, |
| 988 | unsigned int device, | 1045 | unsigned int device, |
| 989 | struct pci_dev *from) | 1046 | struct pci_dev *from) |
| @@ -1241,8 +1298,12 @@ enum pci_fixup_pass { | |||
| 1241 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \ | 1298 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \ |
| 1242 | suspend##vendor##device##hook, vendor, device, hook) | 1299 | suspend##vendor##device##hook, vendor, device, hook) |
| 1243 | 1300 | ||
| 1244 | 1301 | #ifdef CONFIG_PCI_QUIRKS | |
| 1245 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); | 1302 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); |
| 1303 | #else | ||
| 1304 | static inline void pci_fixup_device(enum pci_fixup_pass pass, | ||
| 1305 | struct pci_dev *dev) {} | ||
| 1306 | #endif | ||
| 1246 | 1307 | ||
| 1247 | void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); | 1308 | void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); |
| 1248 | void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); | 1309 | void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); |
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h index 652ba797696d..5d09cbafa7db 100644 --- a/include/linux/pci_hotplug.h +++ b/include/linux/pci_hotplug.h | |||
| @@ -28,26 +28,6 @@ | |||
| 28 | #ifndef _PCI_HOTPLUG_H | 28 | #ifndef _PCI_HOTPLUG_H |
| 29 | #define _PCI_HOTPLUG_H | 29 | #define _PCI_HOTPLUG_H |
| 30 | 30 | ||
| 31 | |||
| 32 | /* These values come from the PCI Hotplug Spec */ | ||
| 33 | enum pci_bus_speed { | ||
| 34 | PCI_SPEED_33MHz = 0x00, | ||
| 35 | PCI_SPEED_66MHz = 0x01, | ||
| 36 | PCI_SPEED_66MHz_PCIX = 0x02, | ||
| 37 | PCI_SPEED_100MHz_PCIX = 0x03, | ||
| 38 | PCI_SPEED_133MHz_PCIX = 0x04, | ||
| 39 | PCI_SPEED_66MHz_PCIX_ECC = 0x05, | ||
| 40 | PCI_SPEED_100MHz_PCIX_ECC = 0x06, | ||
| 41 | PCI_SPEED_133MHz_PCIX_ECC = 0x07, | ||
| 42 | PCI_SPEED_66MHz_PCIX_266 = 0x09, | ||
| 43 | PCI_SPEED_100MHz_PCIX_266 = 0x0a, | ||
| 44 | PCI_SPEED_133MHz_PCIX_266 = 0x0b, | ||
| 45 | PCI_SPEED_66MHz_PCIX_533 = 0x11, | ||
| 46 | PCI_SPEED_100MHz_PCIX_533 = 0x12, | ||
| 47 | PCI_SPEED_133MHz_PCIX_533 = 0x13, | ||
| 48 | PCI_SPEED_UNKNOWN = 0xff, | ||
| 49 | }; | ||
| 50 | |||
| 51 | /* These values come from the PCI Express Spec */ | 31 | /* These values come from the PCI Express Spec */ |
| 52 | enum pcie_link_width { | 32 | enum pcie_link_width { |
| 53 | PCIE_LNK_WIDTH_RESRV = 0x00, | 33 | PCIE_LNK_WIDTH_RESRV = 0x00, |
| @@ -61,12 +41,6 @@ enum pcie_link_width { | |||
| 61 | PCIE_LNK_WIDTH_UNKNOWN = 0xFF, | 41 | PCIE_LNK_WIDTH_UNKNOWN = 0xFF, |
| 62 | }; | 42 | }; |
| 63 | 43 | ||
| 64 | enum pcie_link_speed { | ||
| 65 | PCIE_2_5GB = 0x14, | ||
| 66 | PCIE_5_0GB = 0x15, | ||
| 67 | PCIE_LNK_SPEED_UNKNOWN = 0xFF, | ||
| 68 | }; | ||
| 69 | |||
| 70 | /** | 44 | /** |
| 71 | * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use | 45 | * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use |
| 72 | * @owner: The module owner of this structure | 46 | * @owner: The module owner of this structure |
| @@ -89,12 +63,6 @@ enum pcie_link_speed { | |||
| 89 | * @get_adapter_status: Called to get see if an adapter is present in the slot or not. | 63 | * @get_adapter_status: Called to get see if an adapter is present in the slot or not. |
| 90 | * If this field is NULL, the value passed in the struct hotplug_slot_info | 64 | * If this field is NULL, the value passed in the struct hotplug_slot_info |
| 91 | * will be used when this value is requested by a user. | 65 | * will be used when this value is requested by a user. |
| 92 | * @get_max_bus_speed: Called to get the max bus speed for a slot. | ||
| 93 | * If this field is NULL, the value passed in the struct hotplug_slot_info | ||
| 94 | * will be used when this value is requested by a user. | ||
| 95 | * @get_cur_bus_speed: Called to get the current bus speed for a slot. | ||
| 96 | * If this field is NULL, the value passed in the struct hotplug_slot_info | ||
| 97 | * will be used when this value is requested by a user. | ||
| 98 | * | 66 | * |
| 99 | * The table of function pointers that is passed to the hotplug pci core by a | 67 | * The table of function pointers that is passed to the hotplug pci core by a |
| 100 | * hotplug pci driver. These functions are called by the hotplug pci core when | 68 | * hotplug pci driver. These functions are called by the hotplug pci core when |
| @@ -112,17 +80,14 @@ struct hotplug_slot_ops { | |||
| 112 | int (*get_attention_status) (struct hotplug_slot *slot, u8 *value); | 80 | int (*get_attention_status) (struct hotplug_slot *slot, u8 *value); |
| 113 | int (*get_latch_status) (struct hotplug_slot *slot, u8 *value); | 81 | int (*get_latch_status) (struct hotplug_slot *slot, u8 *value); |
| 114 | int (*get_adapter_status) (struct hotplug_slot *slot, u8 *value); | 82 | int (*get_adapter_status) (struct hotplug_slot *slot, u8 *value); |
| 115 | int (*get_max_bus_speed) (struct hotplug_slot *slot, enum pci_bus_speed *value); | ||
| 116 | int (*get_cur_bus_speed) (struct hotplug_slot *slot, enum pci_bus_speed *value); | ||
| 117 | }; | 83 | }; |
| 118 | 84 | ||
| 119 | /** | 85 | /** |
| 120 | * struct hotplug_slot_info - used to notify the hotplug pci core of the state of the slot | 86 | * struct hotplug_slot_info - used to notify the hotplug pci core of the state of the slot |
| 121 | * @power: if power is enabled or not (1/0) | 87 | * @power_status: if power is enabled or not (1/0) |
| 122 | * @attention_status: if the attention light is enabled or not (1/0) | 88 | * @attention_status: if the attention light is enabled or not (1/0) |
| 123 | * @latch_status: if the latch (if any) is open or closed (1/0) | 89 | * @latch_status: if the latch (if any) is open or closed (1/0) |
| 124 | * @adapter_present: if there is a pci board present in the slot or not (1/0) | 90 | * @adapter_status: if there is a pci board present in the slot or not (1/0) |
| 125 | * @address: (domain << 16 | bus << 8 | dev) | ||
| 126 | * | 91 | * |
| 127 | * Used to notify the hotplug pci core of the status of a specific slot. | 92 | * Used to notify the hotplug pci core of the status of a specific slot. |
| 128 | */ | 93 | */ |
| @@ -131,8 +96,6 @@ struct hotplug_slot_info { | |||
| 131 | u8 attention_status; | 96 | u8 attention_status; |
| 132 | u8 latch_status; | 97 | u8 latch_status; |
| 133 | u8 adapter_status; | 98 | u8 adapter_status; |
| 134 | enum pci_bus_speed max_bus_speed; | ||
| 135 | enum pci_bus_speed cur_bus_speed; | ||
| 136 | }; | 99 | }; |
| 137 | 100 | ||
| 138 | /** | 101 | /** |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index cca8a044e2b6..0be824320580 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -2417,6 +2417,9 @@ | |||
| 2417 | #define PCI_DEVICE_ID_INTEL_82840_HB 0x1a21 | 2417 | #define PCI_DEVICE_ID_INTEL_82840_HB 0x1a21 |
| 2418 | #define PCI_DEVICE_ID_INTEL_82845_HB 0x1a30 | 2418 | #define PCI_DEVICE_ID_INTEL_82845_HB 0x1a30 |
| 2419 | #define PCI_DEVICE_ID_INTEL_IOAT 0x1a38 | 2419 | #define PCI_DEVICE_ID_INTEL_IOAT 0x1a38 |
| 2420 | #define PCI_DEVICE_ID_INTEL_CPT_SMBUS 0x1c22 | ||
| 2421 | #define PCI_DEVICE_ID_INTEL_CPT_LPC1 0x1c42 | ||
| 2422 | #define PCI_DEVICE_ID_INTEL_CPT_LPC2 0x1c43 | ||
| 2420 | #define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 | 2423 | #define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 |
| 2421 | #define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411 | 2424 | #define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411 |
| 2422 | #define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413 | 2425 | #define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413 |
diff --git a/include/linux/pfkeyv2.h b/include/linux/pfkeyv2.h index 228b0b6306b0..0b80c806631f 100644 --- a/include/linux/pfkeyv2.h +++ b/include/linux/pfkeyv2.h | |||
| @@ -315,6 +315,7 @@ struct sadb_x_kmaddress { | |||
| 315 | #define SADB_X_EALG_AES_GCM_ICV12 19 | 315 | #define SADB_X_EALG_AES_GCM_ICV12 19 |
| 316 | #define SADB_X_EALG_AES_GCM_ICV16 20 | 316 | #define SADB_X_EALG_AES_GCM_ICV16 20 |
| 317 | #define SADB_X_EALG_CAMELLIACBC 22 | 317 | #define SADB_X_EALG_CAMELLIACBC 22 |
| 318 | #define SADB_X_EALG_NULL_AES_GMAC 23 | ||
| 318 | #define SADB_EALG_MAX 253 /* last EALG */ | 319 | #define SADB_EALG_MAX 253 /* last EALG */ |
| 319 | /* private allocations should use 249-255 (RFC2407) */ | 320 | /* private allocations should use 249-255 (RFC2407) */ |
| 320 | #define SADB_X_EALG_SERPENTCBC 252 /* draft-ietf-ipsec-ciph-aes-cbc-00 */ | 321 | #define SADB_X_EALG_SERPENTCBC 252 /* draft-ietf-ipsec-ciph-aes-cbc-00 */ |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 198b8f9fe05e..e80df06ad22a 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include <linux/spinlock.h> | 26 | #include <linux/spinlock.h> |
| 27 | #include <linux/wait.h> | 27 | #include <linux/wait.h> |
| 28 | #include <linux/timer.h> | 28 | #include <linux/timer.h> |
| 29 | #include <linux/completion.h> | ||
| 29 | 30 | ||
| 30 | /* | 31 | /* |
| 31 | * Callbacks for platform drivers to implement. | 32 | * Callbacks for platform drivers to implement. |
| @@ -412,9 +413,11 @@ struct dev_pm_info { | |||
| 412 | pm_message_t power_state; | 413 | pm_message_t power_state; |
| 413 | unsigned int can_wakeup:1; | 414 | unsigned int can_wakeup:1; |
| 414 | unsigned int should_wakeup:1; | 415 | unsigned int should_wakeup:1; |
| 416 | unsigned async_suspend:1; | ||
| 415 | enum dpm_state status; /* Owned by the PM core */ | 417 | enum dpm_state status; /* Owned by the PM core */ |
| 416 | #ifdef CONFIG_PM_SLEEP | 418 | #ifdef CONFIG_PM_SLEEP |
| 417 | struct list_head entry; | 419 | struct list_head entry; |
| 420 | struct completion completion; | ||
| 418 | #endif | 421 | #endif |
| 419 | #ifdef CONFIG_PM_RUNTIME | 422 | #ifdef CONFIG_PM_RUNTIME |
| 420 | struct timer_list suspend_timer; | 423 | struct timer_list suspend_timer; |
| @@ -430,6 +433,7 @@ struct dev_pm_info { | |||
| 430 | unsigned int request_pending:1; | 433 | unsigned int request_pending:1; |
| 431 | unsigned int deferred_resume:1; | 434 | unsigned int deferred_resume:1; |
| 432 | unsigned int run_wake:1; | 435 | unsigned int run_wake:1; |
| 436 | unsigned int runtime_auto:1; | ||
| 433 | enum rpm_request request; | 437 | enum rpm_request request; |
| 434 | enum rpm_status runtime_status; | 438 | enum rpm_status runtime_status; |
| 435 | int runtime_error; | 439 | int runtime_error; |
| @@ -508,6 +512,7 @@ extern void __suspend_report_result(const char *function, void *fn, int ret); | |||
| 508 | __suspend_report_result(__func__, fn, ret); \ | 512 | __suspend_report_result(__func__, fn, ret); \ |
| 509 | } while (0) | 513 | } while (0) |
| 510 | 514 | ||
| 515 | extern void device_pm_wait_for_dev(struct device *sub, struct device *dev); | ||
| 511 | #else /* !CONFIG_PM_SLEEP */ | 516 | #else /* !CONFIG_PM_SLEEP */ |
| 512 | 517 | ||
| 513 | #define device_pm_lock() do {} while (0) | 518 | #define device_pm_lock() do {} while (0) |
| @@ -520,6 +525,7 @@ static inline int dpm_suspend_start(pm_message_t state) | |||
| 520 | 525 | ||
| 521 | #define suspend_report_result(fn, ret) do {} while (0) | 526 | #define suspend_report_result(fn, ret) do {} while (0) |
| 522 | 527 | ||
| 528 | static inline void device_pm_wait_for_dev(struct device *a, struct device *b) {} | ||
| 523 | #endif /* !CONFIG_PM_SLEEP */ | 529 | #endif /* !CONFIG_PM_SLEEP */ |
| 524 | 530 | ||
| 525 | /* How to reorder dpm_list after device_move() */ | 531 | /* How to reorder dpm_list after device_move() */ |
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 370ce0a6fe4a..7d773aac5314 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
| @@ -28,6 +28,8 @@ extern int __pm_runtime_set_status(struct device *dev, unsigned int status); | |||
| 28 | extern int pm_runtime_barrier(struct device *dev); | 28 | extern int pm_runtime_barrier(struct device *dev); |
| 29 | extern void pm_runtime_enable(struct device *dev); | 29 | extern void pm_runtime_enable(struct device *dev); |
| 30 | extern void __pm_runtime_disable(struct device *dev, bool check_resume); | 30 | extern void __pm_runtime_disable(struct device *dev, bool check_resume); |
| 31 | extern void pm_runtime_allow(struct device *dev); | ||
| 32 | extern void pm_runtime_forbid(struct device *dev); | ||
| 31 | 33 | ||
| 32 | static inline bool pm_children_suspended(struct device *dev) | 34 | static inline bool pm_children_suspended(struct device *dev) |
| 33 | { | 35 | { |
| @@ -78,6 +80,8 @@ static inline int __pm_runtime_set_status(struct device *dev, | |||
| 78 | static inline int pm_runtime_barrier(struct device *dev) { return 0; } | 80 | static inline int pm_runtime_barrier(struct device *dev) { return 0; } |
| 79 | static inline void pm_runtime_enable(struct device *dev) {} | 81 | static inline void pm_runtime_enable(struct device *dev) {} |
| 80 | static inline void __pm_runtime_disable(struct device *dev, bool c) {} | 82 | static inline void __pm_runtime_disable(struct device *dev, bool c) {} |
| 83 | static inline void pm_runtime_allow(struct device *dev) {} | ||
| 84 | static inline void pm_runtime_forbid(struct device *dev) {} | ||
| 81 | 85 | ||
| 82 | static inline bool pm_children_suspended(struct device *dev) { return false; } | 86 | static inline bool pm_children_suspended(struct device *dev) { return false; } |
| 83 | static inline void pm_suspend_ignore_children(struct device *dev, bool en) {} | 87 | static inline void pm_suspend_ignore_children(struct device *dev, bool en) {} |
diff --git a/include/linux/raid_class.h b/include/linux/raid_class.h index 6b537f1ac96c..31e1ff69efc8 100644 --- a/include/linux/raid_class.h +++ b/include/linux/raid_class.h | |||
| @@ -32,6 +32,7 @@ enum raid_level { | |||
| 32 | RAID_LEVEL_0, | 32 | RAID_LEVEL_0, |
| 33 | RAID_LEVEL_1, | 33 | RAID_LEVEL_1, |
| 34 | RAID_LEVEL_10, | 34 | RAID_LEVEL_10, |
| 35 | RAID_LEVEL_1E, | ||
| 35 | RAID_LEVEL_3, | 36 | RAID_LEVEL_3, |
| 36 | RAID_LEVEL_4, | 37 | RAID_LEVEL_4, |
| 37 | RAID_LEVEL_5, | 38 | RAID_LEVEL_5, |
diff --git a/include/linux/resume-trace.h b/include/linux/resume-trace.h index c9ba2fdf807d..bc8c3881c729 100644 --- a/include/linux/resume-trace.h +++ b/include/linux/resume-trace.h | |||
| @@ -6,6 +6,11 @@ | |||
| 6 | 6 | ||
| 7 | extern int pm_trace_enabled; | 7 | extern int pm_trace_enabled; |
| 8 | 8 | ||
| 9 | static inline int pm_trace_is_enabled(void) | ||
| 10 | { | ||
| 11 | return pm_trace_enabled; | ||
| 12 | } | ||
| 13 | |||
| 9 | struct device; | 14 | struct device; |
| 10 | extern void set_trace_device(struct device *); | 15 | extern void set_trace_device(struct device *); |
| 11 | extern void generate_resume_trace(const void *tracedata, unsigned int user); | 16 | extern void generate_resume_trace(const void *tracedata, unsigned int user); |
| @@ -17,6 +22,8 @@ extern void generate_resume_trace(const void *tracedata, unsigned int user); | |||
| 17 | 22 | ||
| 18 | #else | 23 | #else |
| 19 | 24 | ||
| 25 | static inline int pm_trace_is_enabled(void) { return 0; } | ||
| 26 | |||
| 20 | #define TRACE_DEVICE(dev) do { } while (0) | 27 | #define TRACE_DEVICE(dev) do { } while (0) |
| 21 | #define TRACE_RESUME(dev) do { } while (0) | 28 | #define TRACE_RESUME(dev) do { } while (0) |
| 22 | 29 | ||
diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h index 4ef246f14654..51d288d8ac88 100644 --- a/include/linux/sh_intc.h +++ b/include/linux/sh_intc.h | |||
| @@ -45,7 +45,7 @@ struct intc_sense_reg { | |||
| 45 | #define INTC_SMP(stride, nr) | 45 | #define INTC_SMP(stride, nr) |
| 46 | #endif | 46 | #endif |
| 47 | 47 | ||
| 48 | struct intc_desc { | 48 | struct intc_hw_desc { |
| 49 | struct intc_vect *vectors; | 49 | struct intc_vect *vectors; |
| 50 | unsigned int nr_vectors; | 50 | unsigned int nr_vectors; |
| 51 | struct intc_group *groups; | 51 | struct intc_group *groups; |
| @@ -56,29 +56,40 @@ struct intc_desc { | |||
| 56 | unsigned int nr_prio_regs; | 56 | unsigned int nr_prio_regs; |
| 57 | struct intc_sense_reg *sense_regs; | 57 | struct intc_sense_reg *sense_regs; |
| 58 | unsigned int nr_sense_regs; | 58 | unsigned int nr_sense_regs; |
| 59 | char *name; | ||
| 60 | struct intc_mask_reg *ack_regs; | 59 | struct intc_mask_reg *ack_regs; |
| 61 | unsigned int nr_ack_regs; | 60 | unsigned int nr_ack_regs; |
| 62 | }; | 61 | }; |
| 63 | 62 | ||
| 64 | #define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a) | 63 | #define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a) |
| 64 | #define INTC_HW_DESC(vectors, groups, mask_regs, \ | ||
| 65 | prio_regs, sense_regs, ack_regs) \ | ||
| 66 | { \ | ||
| 67 | _INTC_ARRAY(vectors), _INTC_ARRAY(groups), \ | ||
| 68 | _INTC_ARRAY(mask_regs), _INTC_ARRAY(prio_regs), \ | ||
| 69 | _INTC_ARRAY(sense_regs), _INTC_ARRAY(ack_regs), \ | ||
| 70 | } | ||
| 71 | |||
| 72 | struct intc_desc { | ||
| 73 | char *name; | ||
| 74 | intc_enum force_enable; | ||
| 75 | intc_enum force_disable; | ||
| 76 | struct intc_hw_desc hw; | ||
| 77 | }; | ||
| 78 | |||
| 65 | #define DECLARE_INTC_DESC(symbol, chipname, vectors, groups, \ | 79 | #define DECLARE_INTC_DESC(symbol, chipname, vectors, groups, \ |
| 66 | mask_regs, prio_regs, sense_regs) \ | 80 | mask_regs, prio_regs, sense_regs) \ |
| 67 | struct intc_desc symbol __initdata = { \ | 81 | struct intc_desc symbol __initdata = { \ |
| 68 | _INTC_ARRAY(vectors), _INTC_ARRAY(groups), \ | 82 | .name = chipname, \ |
| 69 | _INTC_ARRAY(mask_regs), _INTC_ARRAY(prio_regs), \ | 83 | .hw = INTC_HW_DESC(vectors, groups, mask_regs, \ |
| 70 | _INTC_ARRAY(sense_regs), \ | 84 | prio_regs, sense_regs, NULL), \ |
| 71 | chipname, \ | ||
| 72 | } | 85 | } |
| 73 | 86 | ||
| 74 | #define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, \ | 87 | #define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, \ |
| 75 | mask_regs, prio_regs, sense_regs, ack_regs) \ | 88 | mask_regs, prio_regs, sense_regs, ack_regs) \ |
| 76 | struct intc_desc symbol __initdata = { \ | 89 | struct intc_desc symbol __initdata = { \ |
| 77 | _INTC_ARRAY(vectors), _INTC_ARRAY(groups), \ | 90 | .name = chipname, \ |
| 78 | _INTC_ARRAY(mask_regs), _INTC_ARRAY(prio_regs), \ | 91 | .hw = INTC_HW_DESC(vectors, groups, mask_regs, \ |
| 79 | _INTC_ARRAY(sense_regs), \ | 92 | prio_regs, sense_regs, ack_regs), \ |
| 80 | chipname, \ | ||
| 81 | _INTC_ARRAY(ack_regs), \ | ||
| 82 | } | 93 | } |
| 83 | 94 | ||
| 84 | void __init register_intc_controller(struct intc_desc *desc); | 95 | void __init register_intc_controller(struct intc_desc *desc); |
diff --git a/include/linux/usb.h b/include/linux/usb.h index d7ace1b80f09..332eaea61021 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -339,6 +339,7 @@ struct usb_bus { | |||
| 339 | 339 | ||
| 340 | struct usb_devmap devmap; /* device address allocation map */ | 340 | struct usb_devmap devmap; /* device address allocation map */ |
| 341 | struct usb_device *root_hub; /* Root hub */ | 341 | struct usb_device *root_hub; /* Root hub */ |
| 342 | struct usb_bus *hs_companion; /* Companion EHCI bus, if any */ | ||
| 342 | struct list_head bus_list; /* list of busses */ | 343 | struct list_head bus_list; /* list of busses */ |
| 343 | 344 | ||
| 344 | int bandwidth_allocated; /* on this bus: how much of the time | 345 | int bandwidth_allocated; /* on this bus: how much of the time |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index d4962a782b8a..3793d168b44d 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
| @@ -350,6 +350,7 @@ struct v4l2_pix_format { | |||
| 350 | #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */ | 350 | #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */ |
| 351 | 351 | ||
| 352 | /* Vendor-specific formats */ | 352 | /* Vendor-specific formats */ |
| 353 | #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ | ||
| 353 | #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ | 354 | #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ |
| 354 | #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */ | 355 | #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */ |
| 355 | #define V4L2_PIX_FMT_SN9C20X_I420 v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */ | 356 | #define V4L2_PIX_FMT_SN9C20X_I420 v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */ |
| @@ -362,6 +363,7 @@ struct v4l2_pix_format { | |||
| 362 | #define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ | 363 | #define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ |
| 363 | #define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ | 364 | #define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ |
| 364 | #define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ | 365 | #define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ |
| 366 | #define V4L2_PIX_FMT_SN9C2028 v4l2_fourcc('S', 'O', 'N', 'X') /* compressed GBRG bayer */ | ||
| 365 | #define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ | 367 | #define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ |
| 366 | #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ | 368 | #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ |
| 367 | #define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ | 369 | #define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ |
diff --git a/include/media/davinci/isif.h b/include/media/davinci/isif.h new file mode 100644 index 000000000000..b0b74ad618cc --- /dev/null +++ b/include/media/davinci/isif.h | |||
| @@ -0,0 +1,531 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2008-2009 Texas Instruments Inc | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 17 | * | ||
| 18 | * isif header file | ||
| 19 | */ | ||
| 20 | #ifndef _ISIF_H | ||
| 21 | #define _ISIF_H | ||
| 22 | |||
| 23 | #include <media/davinci/ccdc_types.h> | ||
| 24 | #include <media/davinci/vpfe_types.h> | ||
| 25 | |||
| 26 | /* isif float type S8Q8/U8Q8 */ | ||
| 27 | struct isif_float_8 { | ||
| 28 | /* 8 bit integer part */ | ||
| 29 | __u8 integer; | ||
| 30 | /* 8 bit decimal part */ | ||
| 31 | __u8 decimal; | ||
| 32 | }; | ||
| 33 | |||
| 34 | /* isif float type U16Q16/S16Q16 */ | ||
| 35 | struct isif_float_16 { | ||
| 36 | /* 16 bit integer part */ | ||
| 37 | __u16 integer; | ||
| 38 | /* 16 bit decimal part */ | ||
| 39 | __u16 decimal; | ||
| 40 | }; | ||
| 41 | |||
| 42 | /************************************************************************ | ||
| 43 | * Vertical Defect Correction parameters | ||
| 44 | ***********************************************************************/ | ||
| 45 | /* Defect Correction (DFC) table entry */ | ||
| 46 | struct isif_vdfc_entry { | ||
| 47 | /* vertical position of defect */ | ||
| 48 | __u16 pos_vert; | ||
| 49 | /* horizontal position of defect */ | ||
| 50 | __u16 pos_horz; | ||
| 51 | /* | ||
| 52 | * Defect level of Vertical line defect position. This is subtracted | ||
| 53 | * from the data at the defect position | ||
| 54 | */ | ||
| 55 | __u8 level_at_pos; | ||
| 56 | /* | ||
| 57 | * Defect level of the pixels upper than the vertical line defect. | ||
| 58 | * This is subtracted from the data | ||
| 59 | */ | ||
| 60 | __u8 level_up_pixels; | ||
| 61 | /* | ||
| 62 | * Defect level of the pixels lower than the vertical line defect. | ||
| 63 | * This is subtracted from the data | ||
| 64 | */ | ||
| 65 | __u8 level_low_pixels; | ||
| 66 | }; | ||
| 67 | |||
| 68 | #define ISIF_VDFC_TABLE_SIZE 8 | ||
| 69 | struct isif_dfc { | ||
| 70 | /* enable vertical defect correction */ | ||
| 71 | __u8 en; | ||
| 72 | /* Defect level subtraction. Just fed through if saturating */ | ||
| 73 | #define ISIF_VDFC_NORMAL 0 | ||
| 74 | /* | ||
| 75 | * Defect level subtraction. Horizontal interpolation ((i-2)+(i+2))/2 | ||
| 76 | * if data saturating | ||
| 77 | */ | ||
| 78 | #define ISIF_VDFC_HORZ_INTERPOL_IF_SAT 1 | ||
| 79 | /* Horizontal interpolation (((i-2)+(i+2))/2) */ | ||
| 80 | #define ISIF_VDFC_HORZ_INTERPOL 2 | ||
| 81 | /* one of the vertical defect correction modes above */ | ||
| 82 | __u8 corr_mode; | ||
| 83 | /* 0 - whole line corrected, 1 - not pixels upper than the defect */ | ||
| 84 | __u8 corr_whole_line; | ||
| 85 | #define ISIF_VDFC_NO_SHIFT 0 | ||
| 86 | #define ISIF_VDFC_SHIFT_1 1 | ||
| 87 | #define ISIF_VDFC_SHIFT_2 2 | ||
| 88 | #define ISIF_VDFC_SHIFT_3 3 | ||
| 89 | #define ISIF_VDFC_SHIFT_4 4 | ||
| 90 | /* | ||
| 91 | * defect level shift value. level_at_pos, level_upper_pos, | ||
| 92 | * and level_lower_pos can be shifted up by this value. Choose | ||
| 93 | * one of the values above | ||
| 94 | */ | ||
| 95 | __u8 def_level_shift; | ||
| 96 | /* defect saturation level */ | ||
| 97 | __u16 def_sat_level; | ||
| 98 | /* number of vertical defects. Max is ISIF_VDFC_TABLE_SIZE */ | ||
| 99 | __u16 num_vdefects; | ||
| 100 | /* VDFC table ptr */ | ||
| 101 | struct isif_vdfc_entry table[ISIF_VDFC_TABLE_SIZE]; | ||
| 102 | }; | ||
| 103 | |||
| 104 | struct isif_horz_bclamp { | ||
| 105 | |||
| 106 | /* Horizontal clamp disabled. Only vertical clamp value is subtracted */ | ||
| 107 | #define ISIF_HORZ_BC_DISABLE 0 | ||
| 108 | /* | ||
| 109 | * Horizontal clamp value is calculated and subtracted from image data | ||
| 110 | * along with vertical clamp value | ||
| 111 | */ | ||
| 112 | #define ISIF_HORZ_BC_CLAMP_CALC_ENABLED 1 | ||
| 113 | /* | ||
| 114 | * Horizontal clamp value calculated from previous image is subtracted | ||
| 115 | * from image data along with vertical clamp value. | ||
| 116 | */ | ||
| 117 | #define ISIF_HORZ_BC_CLAMP_NOT_UPDATED 2 | ||
| 118 | /* horizontal clamp mode. One of the values above */ | ||
| 119 | __u8 mode; | ||
| 120 | /* | ||
| 121 | * pixel value limit enable. | ||
| 122 | * 0 - limit disabled | ||
| 123 | * 1 - pixel value limited to 1023 | ||
| 124 | */ | ||
| 125 | __u8 clamp_pix_limit; | ||
| 126 | /* Select Most left window for bc calculation */ | ||
| 127 | #define ISIF_SEL_MOST_LEFT_WIN 0 | ||
| 128 | /* Select Most right window for bc calculation */ | ||
| 129 | #define ISIF_SEL_MOST_RIGHT_WIN 1 | ||
| 130 | /* Select most left or right window for clamp val calculation */ | ||
| 131 | __u8 base_win_sel_calc; | ||
| 132 | /* Window count per color for calculation. range 1-32 */ | ||
| 133 | __u8 win_count_calc; | ||
| 134 | /* Window start position - horizontal for calculation. 0 - 8191 */ | ||
| 135 | __u16 win_start_h_calc; | ||
| 136 | /* Window start position - vertical for calculation 0 - 8191 */ | ||
| 137 | __u16 win_start_v_calc; | ||
| 138 | #define ISIF_HORZ_BC_SZ_H_2PIXELS 0 | ||
| 139 | #define ISIF_HORZ_BC_SZ_H_4PIXELS 1 | ||
| 140 | #define ISIF_HORZ_BC_SZ_H_8PIXELS 2 | ||
| 141 | #define ISIF_HORZ_BC_SZ_H_16PIXELS 3 | ||
| 142 | /* Width of the sample window in pixels for calculation */ | ||
| 143 | __u8 win_h_sz_calc; | ||
| 144 | #define ISIF_HORZ_BC_SZ_V_32PIXELS 0 | ||
| 145 | #define ISIF_HORZ_BC_SZ_V_64PIXELS 1 | ||
| 146 | #define ISIF_HORZ_BC_SZ_V_128PIXELS 2 | ||
| 147 | #define ISIF_HORZ_BC_SZ_V_256PIXELS 3 | ||
| 148 | /* Height of the sample window in pixels for calculation */ | ||
| 149 | __u8 win_v_sz_calc; | ||
| 150 | }; | ||
| 151 | |||
| 152 | /************************************************************************ | ||
| 153 | * Black Clamp parameters | ||
| 154 | ***********************************************************************/ | ||
| 155 | struct isif_vert_bclamp { | ||
| 156 | /* Reset value used is the clamp value calculated */ | ||
| 157 | #define ISIF_VERT_BC_USE_HORZ_CLAMP_VAL 0 | ||
| 158 | /* Reset value used is reset_clamp_val configured */ | ||
| 159 | #define ISIF_VERT_BC_USE_CONFIG_CLAMP_VAL 1 | ||
| 160 | /* No update, previous image value is used */ | ||
| 161 | #define ISIF_VERT_BC_NO_UPDATE 2 | ||
| 162 | /* | ||
| 163 | * Reset value selector for vertical clamp calculation. Use one of | ||
| 164 | * the above values | ||
| 165 | */ | ||
| 166 | __u8 reset_val_sel; | ||
| 167 | /* U8Q8. Line average coefficient used in vertical clamp calculation */ | ||
| 168 | __u8 line_ave_coef; | ||
| 169 | /* Height of the optical black region for calculation */ | ||
| 170 | __u16 ob_v_sz_calc; | ||
| 171 | /* Optical black region start position - horizontal. 0 - 8191 */ | ||
| 172 | __u16 ob_start_h; | ||
| 173 | /* Optical black region start position - vertical 0 - 8191 */ | ||
| 174 | __u16 ob_start_v; | ||
| 175 | }; | ||
| 176 | |||
| 177 | struct isif_black_clamp { | ||
| 178 | /* | ||
| 179 | * This offset value is added irrespective of the clamp enable status. | ||
| 180 | * S13 | ||
| 181 | */ | ||
| 182 | __u16 dc_offset; | ||
| 183 | /* | ||
| 184 | * Enable black/digital clamp value to be subtracted from the image data | ||
| 185 | */ | ||
| 186 | __u8 en; | ||
| 187 | /* | ||
| 188 | * black clamp mode. same/separate clamp for 4 colors | ||
| 189 | * 0 - disable - same clamp value for all colors | ||
| 190 | * 1 - clamp value calculated separately for all colors | ||
| 191 | */ | ||
| 192 | __u8 bc_mode_color; | ||
| 193 | /* Vrtical start position for bc subtraction */ | ||
| 194 | __u16 vert_start_sub; | ||
| 195 | /* Black clamp for horizontal direction */ | ||
| 196 | struct isif_horz_bclamp horz; | ||
| 197 | /* Black clamp for vertical direction */ | ||
| 198 | struct isif_vert_bclamp vert; | ||
| 199 | }; | ||
| 200 | |||
| 201 | /************************************************************************* | ||
| 202 | ** Color Space Convertion (CSC) | ||
| 203 | *************************************************************************/ | ||
| 204 | #define ISIF_CSC_NUM_COEFF 16 | ||
| 205 | struct isif_color_space_conv { | ||
| 206 | /* Enable color space conversion */ | ||
| 207 | __u8 en; | ||
| 208 | /* | ||
| 209 | * csc coeffient table. S8Q5, M00 at index 0, M01 at index 1, and | ||
| 210 | * so forth | ||
| 211 | */ | ||
| 212 | struct isif_float_8 coeff[ISIF_CSC_NUM_COEFF]; | ||
| 213 | }; | ||
| 214 | |||
| 215 | |||
| 216 | /************************************************************************* | ||
| 217 | ** Black Compensation parameters | ||
| 218 | *************************************************************************/ | ||
| 219 | struct isif_black_comp { | ||
| 220 | /* Comp for Red */ | ||
| 221 | __s8 r_comp; | ||
| 222 | /* Comp for Gr */ | ||
| 223 | __s8 gr_comp; | ||
| 224 | /* Comp for Blue */ | ||
| 225 | __s8 b_comp; | ||
| 226 | /* Comp for Gb */ | ||
| 227 | __s8 gb_comp; | ||
| 228 | }; | ||
| 229 | |||
| 230 | /************************************************************************* | ||
| 231 | ** Gain parameters | ||
| 232 | *************************************************************************/ | ||
| 233 | struct isif_gain { | ||
| 234 | /* Gain for Red or ye */ | ||
| 235 | struct isif_float_16 r_ye; | ||
| 236 | /* Gain for Gr or cy */ | ||
| 237 | struct isif_float_16 gr_cy; | ||
| 238 | /* Gain for Gb or g */ | ||
| 239 | struct isif_float_16 gb_g; | ||
| 240 | /* Gain for Blue or mg */ | ||
| 241 | struct isif_float_16 b_mg; | ||
| 242 | }; | ||
| 243 | |||
| 244 | #define ISIF_LINEAR_TAB_SIZE 192 | ||
| 245 | /************************************************************************* | ||
| 246 | ** Linearization parameters | ||
| 247 | *************************************************************************/ | ||
| 248 | struct isif_linearize { | ||
| 249 | /* Enable or Disable linearization of data */ | ||
| 250 | __u8 en; | ||
| 251 | /* Shift value applied */ | ||
| 252 | __u8 corr_shft; | ||
| 253 | /* scale factor applied U11Q10 */ | ||
| 254 | struct isif_float_16 scale_fact; | ||
| 255 | /* Size of the linear table */ | ||
| 256 | __u16 table[ISIF_LINEAR_TAB_SIZE]; | ||
| 257 | }; | ||
| 258 | |||
| 259 | /* Color patterns */ | ||
| 260 | #define ISIF_RED 0 | ||
| 261 | #define ISIF_GREEN_RED 1 | ||
| 262 | #define ISIF_GREEN_BLUE 2 | ||
| 263 | #define ISIF_BLUE 3 | ||
| 264 | struct isif_col_pat { | ||
| 265 | __u8 olop; | ||
| 266 | __u8 olep; | ||
| 267 | __u8 elop; | ||
| 268 | __u8 elep; | ||
| 269 | }; | ||
| 270 | |||
| 271 | /************************************************************************* | ||
| 272 | ** Data formatter parameters | ||
| 273 | *************************************************************************/ | ||
| 274 | struct isif_fmtplen { | ||
| 275 | /* | ||
| 276 | * number of program entries for SET0, range 1 - 16 | ||
| 277 | * when fmtmode is ISIF_SPLIT, 1 - 8 when fmtmode is | ||
| 278 | * ISIF_COMBINE | ||
| 279 | */ | ||
| 280 | __u16 plen0; | ||
| 281 | /* | ||
| 282 | * number of program entries for SET1, range 1 - 16 | ||
| 283 | * when fmtmode is ISIF_SPLIT, 1 - 8 when fmtmode is | ||
| 284 | * ISIF_COMBINE | ||
| 285 | */ | ||
| 286 | __u16 plen1; | ||
| 287 | /** | ||
| 288 | * number of program entries for SET2, range 1 - 16 | ||
| 289 | * when fmtmode is ISIF_SPLIT, 1 - 8 when fmtmode is | ||
| 290 | * ISIF_COMBINE | ||
| 291 | */ | ||
| 292 | __u16 plen2; | ||
| 293 | /** | ||
| 294 | * number of program entries for SET3, range 1 - 16 | ||
| 295 | * when fmtmode is ISIF_SPLIT, 1 - 8 when fmtmode is | ||
| 296 | * ISIF_COMBINE | ||
| 297 | */ | ||
| 298 | __u16 plen3; | ||
| 299 | }; | ||
| 300 | |||
| 301 | struct isif_fmt_cfg { | ||
| 302 | #define ISIF_SPLIT 0 | ||
| 303 | #define ISIF_COMBINE 1 | ||
| 304 | /* Split or combine or line alternate */ | ||
| 305 | __u8 fmtmode; | ||
| 306 | /* enable or disable line alternating mode */ | ||
| 307 | __u8 ln_alter_en; | ||
| 308 | #define ISIF_1LINE 0 | ||
| 309 | #define ISIF_2LINES 1 | ||
| 310 | #define ISIF_3LINES 2 | ||
| 311 | #define ISIF_4LINES 3 | ||
| 312 | /* Split/combine line number */ | ||
| 313 | __u8 lnum; | ||
| 314 | /* Address increment Range 1 - 16 */ | ||
| 315 | __u8 addrinc; | ||
| 316 | }; | ||
| 317 | |||
| 318 | struct isif_fmt_addr_ptr { | ||
| 319 | /* Initial address */ | ||
| 320 | __u32 init_addr; | ||
| 321 | /* output line number */ | ||
| 322 | #define ISIF_1STLINE 0 | ||
| 323 | #define ISIF_2NDLINE 1 | ||
| 324 | #define ISIF_3RDLINE 2 | ||
| 325 | #define ISIF_4THLINE 3 | ||
| 326 | __u8 out_line; | ||
| 327 | }; | ||
| 328 | |||
| 329 | struct isif_fmtpgm_ap { | ||
| 330 | /* program address pointer */ | ||
| 331 | __u8 pgm_aptr; | ||
| 332 | /* program address increment or decrement */ | ||
| 333 | __u8 pgmupdt; | ||
| 334 | }; | ||
| 335 | |||
| 336 | struct isif_data_formatter { | ||
| 337 | /* Enable/Disable data formatter */ | ||
| 338 | __u8 en; | ||
| 339 | /* data formatter configuration */ | ||
| 340 | struct isif_fmt_cfg cfg; | ||
| 341 | /* Formatter program entries length */ | ||
| 342 | struct isif_fmtplen plen; | ||
| 343 | /* first pixel in a line fed to formatter */ | ||
| 344 | __u16 fmtrlen; | ||
| 345 | /* HD interval for output line. Only valid when split line */ | ||
| 346 | __u16 fmthcnt; | ||
| 347 | /* formatter address pointers */ | ||
| 348 | struct isif_fmt_addr_ptr fmtaddr_ptr[16]; | ||
| 349 | /* program enable/disable */ | ||
| 350 | __u8 pgm_en[32]; | ||
| 351 | /* program address pointers */ | ||
| 352 | struct isif_fmtpgm_ap fmtpgm_ap[32]; | ||
| 353 | }; | ||
| 354 | |||
| 355 | struct isif_df_csc { | ||
| 356 | /* Color Space Conversion confguration, 0 - csc, 1 - df */ | ||
| 357 | __u8 df_or_csc; | ||
| 358 | /* csc configuration valid if df_or_csc is 0 */ | ||
| 359 | struct isif_color_space_conv csc; | ||
| 360 | /* data formatter configuration valid if df_or_csc is 1 */ | ||
| 361 | struct isif_data_formatter df; | ||
| 362 | /* start pixel in a line at the input */ | ||
| 363 | __u32 start_pix; | ||
| 364 | /* number of pixels in input line */ | ||
| 365 | __u32 num_pixels; | ||
| 366 | /* start line at the input */ | ||
| 367 | __u32 start_line; | ||
| 368 | /* number of lines at the input */ | ||
| 369 | __u32 num_lines; | ||
| 370 | }; | ||
| 371 | |||
| 372 | struct isif_gain_offsets_adj { | ||
| 373 | /* Gain adjustment per color */ | ||
| 374 | struct isif_gain gain; | ||
| 375 | /* Offset adjustment */ | ||
| 376 | __u16 offset; | ||
| 377 | /* Enable or Disable Gain adjustment for SDRAM data */ | ||
| 378 | __u8 gain_sdram_en; | ||
| 379 | /* Enable or Disable Gain adjustment for IPIPE data */ | ||
| 380 | __u8 gain_ipipe_en; | ||
| 381 | /* Enable or Disable Gain adjustment for H3A data */ | ||
| 382 | __u8 gain_h3a_en; | ||
| 383 | /* Enable or Disable Gain adjustment for SDRAM data */ | ||
| 384 | __u8 offset_sdram_en; | ||
| 385 | /* Enable or Disable Gain adjustment for IPIPE data */ | ||
| 386 | __u8 offset_ipipe_en; | ||
| 387 | /* Enable or Disable Gain adjustment for H3A data */ | ||
| 388 | __u8 offset_h3a_en; | ||
| 389 | }; | ||
| 390 | |||
| 391 | struct isif_cul { | ||
| 392 | /* Horizontal Cull pattern for odd lines */ | ||
| 393 | __u8 hcpat_odd; | ||
| 394 | /* Horizontal Cull pattern for even lines */ | ||
| 395 | __u8 hcpat_even; | ||
| 396 | /* Vertical Cull pattern */ | ||
| 397 | __u8 vcpat; | ||
| 398 | /* Enable or disable lpf. Apply when cull is enabled */ | ||
| 399 | __u8 en_lpf; | ||
| 400 | }; | ||
| 401 | |||
| 402 | struct isif_compress { | ||
| 403 | #define ISIF_ALAW 0 | ||
| 404 | #define ISIF_DPCM 1 | ||
| 405 | #define ISIF_NO_COMPRESSION 2 | ||
| 406 | /* Compression Algorithm used */ | ||
| 407 | __u8 alg; | ||
| 408 | /* Choose Predictor1 for DPCM compression */ | ||
| 409 | #define ISIF_DPCM_PRED1 0 | ||
| 410 | /* Choose Predictor2 for DPCM compression */ | ||
| 411 | #define ISIF_DPCM_PRED2 1 | ||
| 412 | /* Predictor for DPCM compression */ | ||
| 413 | __u8 pred; | ||
| 414 | }; | ||
| 415 | |||
| 416 | /* all the stuff in this struct will be provided by userland */ | ||
| 417 | struct isif_config_params_raw { | ||
| 418 | /* Linearization parameters for image sensor data input */ | ||
| 419 | struct isif_linearize linearize; | ||
| 420 | /* Data formatter or CSC */ | ||
| 421 | struct isif_df_csc df_csc; | ||
| 422 | /* Defect Pixel Correction (DFC) confguration */ | ||
| 423 | struct isif_dfc dfc; | ||
| 424 | /* Black/Digital Clamp configuration */ | ||
| 425 | struct isif_black_clamp bclamp; | ||
| 426 | /* Gain, offset adjustments */ | ||
| 427 | struct isif_gain_offsets_adj gain_offset; | ||
| 428 | /* Culling */ | ||
| 429 | struct isif_cul culling; | ||
| 430 | /* A-Law and DPCM compression options */ | ||
| 431 | struct isif_compress compress; | ||
| 432 | /* horizontal offset for Gain/LSC/DFC */ | ||
| 433 | __u16 horz_offset; | ||
| 434 | /* vertical offset for Gain/LSC/DFC */ | ||
| 435 | __u16 vert_offset; | ||
| 436 | /* color pattern for field 0 */ | ||
| 437 | struct isif_col_pat col_pat_field0; | ||
| 438 | /* color pattern for field 1 */ | ||
| 439 | struct isif_col_pat col_pat_field1; | ||
| 440 | #define ISIF_NO_SHIFT 0 | ||
| 441 | #define ISIF_1BIT_SHIFT 1 | ||
| 442 | #define ISIF_2BIT_SHIFT 2 | ||
| 443 | #define ISIF_3BIT_SHIFT 3 | ||
| 444 | #define ISIF_4BIT_SHIFT 4 | ||
| 445 | #define ISIF_5BIT_SHIFT 5 | ||
| 446 | #define ISIF_6BIT_SHIFT 6 | ||
| 447 | /* Data shift applied before storing to SDRAM */ | ||
| 448 | __u8 data_shift; | ||
| 449 | /* enable input test pattern generation */ | ||
| 450 | __u8 test_pat_gen; | ||
| 451 | }; | ||
| 452 | |||
| 453 | #ifdef __KERNEL__ | ||
| 454 | struct isif_ycbcr_config { | ||
| 455 | /* isif pixel format */ | ||
| 456 | enum ccdc_pixfmt pix_fmt; | ||
| 457 | /* isif frame format */ | ||
| 458 | enum ccdc_frmfmt frm_fmt; | ||
| 459 | /* ISIF crop window */ | ||
| 460 | struct v4l2_rect win; | ||
| 461 | /* field polarity */ | ||
| 462 | enum vpfe_pin_pol fid_pol; | ||
| 463 | /* interface VD polarity */ | ||
| 464 | enum vpfe_pin_pol vd_pol; | ||
| 465 | /* interface HD polarity */ | ||
| 466 | enum vpfe_pin_pol hd_pol; | ||
| 467 | /* isif pix order. Only used for ycbcr capture */ | ||
| 468 | enum ccdc_pixorder pix_order; | ||
| 469 | /* isif buffer type. Only used for ycbcr capture */ | ||
| 470 | enum ccdc_buftype buf_type; | ||
| 471 | }; | ||
| 472 | |||
| 473 | /* MSB of image data connected to sensor port */ | ||
| 474 | enum isif_data_msb { | ||
| 475 | ISIF_BIT_MSB_15, | ||
| 476 | ISIF_BIT_MSB_14, | ||
| 477 | ISIF_BIT_MSB_13, | ||
| 478 | ISIF_BIT_MSB_12, | ||
| 479 | ISIF_BIT_MSB_11, | ||
| 480 | ISIF_BIT_MSB_10, | ||
| 481 | ISIF_BIT_MSB_9, | ||
| 482 | ISIF_BIT_MSB_8, | ||
| 483 | ISIF_BIT_MSB_7 | ||
| 484 | }; | ||
| 485 | |||
| 486 | enum isif_cfa_pattern { | ||
| 487 | ISIF_CFA_PAT_MOSAIC, | ||
| 488 | ISIF_CFA_PAT_STRIPE | ||
| 489 | }; | ||
| 490 | |||
| 491 | struct isif_params_raw { | ||
| 492 | /* isif pixel format */ | ||
| 493 | enum ccdc_pixfmt pix_fmt; | ||
| 494 | /* isif frame format */ | ||
| 495 | enum ccdc_frmfmt frm_fmt; | ||
| 496 | /* video window */ | ||
| 497 | struct v4l2_rect win; | ||
| 498 | /* field polarity */ | ||
| 499 | enum vpfe_pin_pol fid_pol; | ||
| 500 | /* interface VD polarity */ | ||
| 501 | enum vpfe_pin_pol vd_pol; | ||
| 502 | /* interface HD polarity */ | ||
| 503 | enum vpfe_pin_pol hd_pol; | ||
| 504 | /* buffer type. Applicable for interlaced mode */ | ||
| 505 | enum ccdc_buftype buf_type; | ||
| 506 | /* Gain values */ | ||
| 507 | struct isif_gain gain; | ||
| 508 | /* cfa pattern */ | ||
| 509 | enum isif_cfa_pattern cfa_pat; | ||
| 510 | /* Data MSB position */ | ||
| 511 | enum isif_data_msb data_msb; | ||
| 512 | /* Enable horizontal flip */ | ||
| 513 | unsigned char horz_flip_en; | ||
| 514 | /* Enable image invert vertically */ | ||
| 515 | unsigned char image_invert_en; | ||
| 516 | |||
| 517 | /* all the userland defined stuff*/ | ||
| 518 | struct isif_config_params_raw config_params; | ||
| 519 | }; | ||
| 520 | |||
| 521 | enum isif_data_pack { | ||
| 522 | ISIF_PACK_16BIT, | ||
| 523 | ISIF_PACK_12BIT, | ||
| 524 | ISIF_PACK_8BIT | ||
| 525 | }; | ||
| 526 | |||
| 527 | #define ISIF_WIN_NTSC {0, 0, 720, 480} | ||
| 528 | #define ISIF_WIN_VGA {0, 0, 640, 480} | ||
| 529 | |||
| 530 | #endif | ||
| 531 | #endif | ||
diff --git a/include/media/davinci/vpss.h b/include/media/davinci/vpss.h index fcdff745fae2..c59cc029c74a 100644 --- a/include/media/davinci/vpss.h +++ b/include/media/davinci/vpss.h | |||
| @@ -29,7 +29,19 @@ | |||
| 29 | /* selector for ccdc input selection on DM355 */ | 29 | /* selector for ccdc input selection on DM355 */ |
| 30 | enum vpss_ccdc_source_sel { | 30 | enum vpss_ccdc_source_sel { |
| 31 | VPSS_CCDCIN, | 31 | VPSS_CCDCIN, |
| 32 | VPSS_HSSIIN | 32 | VPSS_HSSIIN, |
| 33 | VPSS_PGLPBK, /* for DM365 only */ | ||
| 34 | VPSS_CCDCPG /* for DM365 only */ | ||
| 35 | }; | ||
| 36 | |||
| 37 | struct vpss_sync_pol { | ||
| 38 | unsigned int ccdpg_hdpol:1; | ||
| 39 | unsigned int ccdpg_vdpol:1; | ||
| 40 | }; | ||
| 41 | |||
| 42 | struct vpss_pg_frame_size { | ||
| 43 | short hlpfr; | ||
| 44 | short pplen; | ||
| 33 | }; | 45 | }; |
| 34 | 46 | ||
| 35 | /* Used for enable/diable VPSS Clock */ | 47 | /* Used for enable/diable VPSS Clock */ |
| @@ -47,12 +59,38 @@ enum vpss_clock_sel { | |||
| 47 | */ | 59 | */ |
| 48 | VPSS_VENC_CLOCK_SEL, | 60 | VPSS_VENC_CLOCK_SEL, |
| 49 | VPSS_VPBE_CLOCK, | 61 | VPSS_VPBE_CLOCK, |
| 62 | /* DM365 only clocks */ | ||
| 63 | VPSS_IPIPEIF_CLOCK, | ||
| 64 | VPSS_RSZ_CLOCK, | ||
| 65 | VPSS_BL_CLOCK, | ||
| 66 | /* | ||
| 67 | * When using VPSS_PCLK_INTERNAL in vpss_enable_clock() api | ||
| 68 | * following applies:- | ||
| 69 | * en = 0 disable internal PCLK | ||
| 70 | * en = 1 enables internal PCLK | ||
| 71 | */ | ||
| 72 | VPSS_PCLK_INTERNAL, | ||
| 73 | /* | ||
| 74 | * When using VPSS_PSYNC_CLOCK_SEL in vpss_enable_clock() api | ||
| 75 | * following applies:- | ||
| 76 | * en = 0 enables MMR clock | ||
| 77 | * en = 1 enables VPSS clock | ||
| 78 | */ | ||
| 79 | VPSS_PSYNC_CLOCK_SEL, | ||
| 80 | VPSS_LDC_CLOCK_SEL, | ||
| 81 | VPSS_OSD_CLOCK_SEL, | ||
| 82 | VPSS_FDIF_CLOCK, | ||
| 83 | VPSS_LDC_CLOCK | ||
| 50 | }; | 84 | }; |
| 51 | 85 | ||
| 52 | /* select input to ccdc on dm355 */ | 86 | /* select input to ccdc on dm355 */ |
| 53 | int vpss_select_ccdc_source(enum vpss_ccdc_source_sel src_sel); | 87 | int vpss_select_ccdc_source(enum vpss_ccdc_source_sel src_sel); |
| 54 | /* enable/disable a vpss clock, 0 - success, -1 - failure */ | 88 | /* enable/disable a vpss clock, 0 - success, -1 - failure */ |
| 55 | int vpss_enable_clock(enum vpss_clock_sel clock_sel, int en); | 89 | int vpss_enable_clock(enum vpss_clock_sel clock_sel, int en); |
| 90 | /* set sync polarity, only for DM365*/ | ||
| 91 | void dm365_vpss_set_sync_pol(struct vpss_sync_pol); | ||
| 92 | /* set the PG_FRAME_SIZE register, only for DM365 */ | ||
| 93 | void dm365_vpss_set_pg_frame_size(struct vpss_pg_frame_size); | ||
| 56 | 94 | ||
| 57 | /* wbl reset for dm644x */ | 95 | /* wbl reset for dm644x */ |
| 58 | enum vpss_wbl_sel { | 96 | enum vpss_wbl_sel { |
| @@ -65,5 +103,6 @@ enum vpss_wbl_sel { | |||
| 65 | VPSS_PCR_PREV_WBL_0, | 103 | VPSS_PCR_PREV_WBL_0, |
| 66 | VPSS_PCR_CCDC_WBL_O, | 104 | VPSS_PCR_CCDC_WBL_O, |
| 67 | }; | 105 | }; |
| 106 | /* clear wbl overflow flag for DM6446 */ | ||
| 68 | int vpss_clear_wbl_overflow(enum vpss_wbl_sel wbl_sel); | 107 | int vpss_clear_wbl_overflow(enum vpss_wbl_sel wbl_sel); |
| 69 | #endif | 108 | #endif |
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 2c6af24b905e..c66298062d39 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | 35 | ||
| 36 | struct ir_input_state { | 36 | struct ir_input_state { |
| 37 | /* configuration */ | 37 | /* configuration */ |
| 38 | int ir_type; | 38 | u64 ir_type; |
| 39 | 39 | ||
| 40 | /* key info */ | 40 | /* key info */ |
| 41 | u32 ir_key; /* ir scancode */ | 41 | u32 ir_key; /* ir scancode */ |
| @@ -84,7 +84,7 @@ struct card_ir { | |||
| 84 | /* Routines from ir-functions.c */ | 84 | /* Routines from ir-functions.c */ |
| 85 | 85 | ||
| 86 | int ir_input_init(struct input_dev *dev, struct ir_input_state *ir, | 86 | int ir_input_init(struct input_dev *dev, struct ir_input_state *ir, |
| 87 | int ir_type); | 87 | const u64 ir_type); |
| 88 | void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir); | 88 | void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir); |
| 89 | void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir, | 89 | void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir, |
| 90 | u32 ir_key); | 90 | u32 ir_key); |
| @@ -162,4 +162,6 @@ extern struct ir_scancode_table ir_codes_terratec_cinergy_xs_table; | |||
| 162 | extern struct ir_scancode_table ir_codes_videomate_s350_table; | 162 | extern struct ir_scancode_table ir_codes_videomate_s350_table; |
| 163 | extern struct ir_scancode_table ir_codes_gadmei_rm008z_table; | 163 | extern struct ir_scancode_table ir_codes_gadmei_rm008z_table; |
| 164 | extern struct ir_scancode_table ir_codes_nec_terratec_cinergy_xs_table; | 164 | extern struct ir_scancode_table ir_codes_nec_terratec_cinergy_xs_table; |
| 165 | extern struct ir_scancode_table ir_codes_winfast_usbii_deluxe_table; | ||
| 166 | extern struct ir_scancode_table ir_codes_kworld_315u_table; | ||
| 165 | #endif | 167 | #endif |
diff --git a/include/media/ir-core.h b/include/media/ir-core.h index 299d201e1339..61c223bc3953 100644 --- a/include/media/ir-core.h +++ b/include/media/ir-core.h | |||
| @@ -21,13 +21,11 @@ extern int ir_core_debug; | |||
| 21 | #define IR_dprintk(level, fmt, arg...) if (ir_core_debug >= level) \ | 21 | #define IR_dprintk(level, fmt, arg...) if (ir_core_debug >= level) \ |
| 22 | printk(KERN_DEBUG "%s: " fmt , __func__, ## arg) | 22 | printk(KERN_DEBUG "%s: " fmt , __func__, ## arg) |
| 23 | 23 | ||
| 24 | enum ir_type { | 24 | #define IR_TYPE_UNKNOWN 0 |
| 25 | IR_TYPE_UNKNOWN = 0, | 25 | #define IR_TYPE_RC5 (1 << 0) /* Philips RC5 protocol */ |
| 26 | IR_TYPE_RC5 = 1, | 26 | #define IR_TYPE_PD (1 << 1) /* Pulse distance encoded IR */ |
| 27 | IR_TYPE_PD = 2, /* Pulse distance encoded IR */ | 27 | #define IR_TYPE_NEC (1 << 2) |
| 28 | IR_TYPE_NEC = 3, | 28 | #define IR_TYPE_OTHER (((u64)1) << 63l) |
| 29 | IR_TYPE_OTHER = 99, | ||
| 30 | }; | ||
| 31 | 29 | ||
| 32 | struct ir_scancode { | 30 | struct ir_scancode { |
| 33 | u16 scancode; | 31 | u16 scancode; |
| @@ -37,26 +35,40 @@ struct ir_scancode { | |||
| 37 | struct ir_scancode_table { | 35 | struct ir_scancode_table { |
| 38 | struct ir_scancode *scan; | 36 | struct ir_scancode *scan; |
| 39 | int size; | 37 | int size; |
| 40 | enum ir_type ir_type; | 38 | u64 ir_type; |
| 41 | spinlock_t lock; | 39 | spinlock_t lock; |
| 42 | }; | 40 | }; |
| 43 | 41 | ||
| 42 | struct ir_dev_props { | ||
| 43 | unsigned long allowed_protos; | ||
| 44 | void *priv; | ||
| 45 | int (*change_protocol)(void *priv, u64 ir_type); | ||
| 46 | }; | ||
| 47 | |||
| 48 | |||
| 44 | struct ir_input_dev { | 49 | struct ir_input_dev { |
| 45 | struct input_dev *dev; | 50 | struct input_dev *dev; /* Input device*/ |
| 46 | struct ir_scancode_table rc_tab; | 51 | struct ir_scancode_table rc_tab; /* scan/key table */ |
| 52 | unsigned long devno; /* device number */ | ||
| 53 | struct attribute_group attr; /* IR attributes */ | ||
| 54 | struct device *class_dev; /* virtual class dev */ | ||
| 55 | const struct ir_dev_props *props; /* Device properties */ | ||
| 47 | }; | 56 | }; |
| 57 | #define to_ir_input_dev(_attr) container_of(_attr, struct ir_input_dev, attr) | ||
| 48 | 58 | ||
| 49 | /* Routines from ir-keytable.c */ | 59 | /* Routines from ir-keytable.c */ |
| 50 | 60 | ||
| 51 | u32 ir_g_keycode_from_table(struct input_dev *input_dev, | 61 | u32 ir_g_keycode_from_table(struct input_dev *input_dev, |
| 52 | u32 scancode); | 62 | u32 scancode); |
| 53 | 63 | ||
| 54 | int ir_set_keycode_table(struct input_dev *input_dev, | ||
| 55 | struct ir_scancode_table *rc_tab); | ||
| 56 | |||
| 57 | int ir_roundup_tablesize(int n_elems); | ||
| 58 | int ir_input_register(struct input_dev *dev, | 64 | int ir_input_register(struct input_dev *dev, |
| 59 | struct ir_scancode_table *ir_codes); | 65 | const struct ir_scancode_table *ir_codes, |
| 66 | const struct ir_dev_props *props); | ||
| 60 | void ir_input_unregister(struct input_dev *input_dev); | 67 | void ir_input_unregister(struct input_dev *input_dev); |
| 61 | 68 | ||
| 69 | /* Routines from ir-sysfs.c */ | ||
| 70 | |||
| 71 | int ir_register_class(struct input_dev *input_dev); | ||
| 72 | void ir_unregister_class(struct input_dev *input_dev); | ||
| 73 | |||
| 62 | #endif | 74 | #endif |
diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h index aaf65e8b1a40..9142936603cc 100644 --- a/include/media/ir-kbd-i2c.h +++ b/include/media/ir-kbd-i2c.h | |||
| @@ -36,7 +36,7 @@ enum ir_kbd_get_key_fn { | |||
| 36 | struct IR_i2c_init_data { | 36 | struct IR_i2c_init_data { |
| 37 | struct ir_scancode_table *ir_codes; | 37 | struct ir_scancode_table *ir_codes; |
| 38 | const char *name; | 38 | const char *name; |
| 39 | int type; /* IR_TYPE_RC5, IR_TYPE_PD, etc */ | 39 | u64 type; /* IR_TYPE_RC5, IR_TYPE_PD, etc */ |
| 40 | /* | 40 | /* |
| 41 | * Specify either a function pointer or a value indicating one of | 41 | * Specify either a function pointer or a value indicating one of |
| 42 | * ir_kbd_i2c's internal get_key functions | 42 | * ir_kbd_i2c's internal get_key functions |
diff --git a/include/media/ov772x.h b/include/media/ov772x.h index 14c77efd6a85..548bf1155c83 100644 --- a/include/media/ov772x.h +++ b/include/media/ov772x.h | |||
| @@ -15,8 +15,9 @@ | |||
| 15 | #include <media/soc_camera.h> | 15 | #include <media/soc_camera.h> |
| 16 | 16 | ||
| 17 | /* for flags */ | 17 | /* for flags */ |
| 18 | #define OV772X_FLAG_VFLIP 0x00000001 /* Vertical flip image */ | 18 | #define OV772X_FLAG_VFLIP (1 << 0) /* Vertical flip image */ |
| 19 | #define OV772X_FLAG_HFLIP 0x00000002 /* Horizontal flip image */ | 19 | #define OV772X_FLAG_HFLIP (1 << 1) /* Horizontal flip image */ |
| 20 | #define OV772X_FLAG_8BIT (1 << 2) /* default 10 bit */ | ||
| 20 | 21 | ||
| 21 | /* | 22 | /* |
| 22 | * for Edge ctrl | 23 | * for Edge ctrl |
| @@ -53,9 +54,8 @@ struct ov772x_edge_ctrl { | |||
| 53 | * ov772x camera info | 54 | * ov772x camera info |
| 54 | */ | 55 | */ |
| 55 | struct ov772x_camera_info { | 56 | struct ov772x_camera_info { |
| 56 | unsigned long buswidth; | 57 | unsigned long flags; |
| 57 | unsigned long flags; | 58 | struct ov772x_edge_ctrl edgectrl; |
| 58 | struct ov772x_edge_ctrl edgectrl; | ||
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | #endif /* __OV772X_H__ */ | 61 | #endif /* __OV772X_H__ */ |
diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h index 4aeff96ff7d8..b9da1f5591e7 100644 --- a/include/media/saa7146_vv.h +++ b/include/media/saa7146_vv.h | |||
| @@ -188,6 +188,7 @@ void saa7146_buffer_timeout(unsigned long data); | |||
| 188 | void saa7146_dma_free(struct saa7146_dev* dev,struct videobuf_queue *q, | 188 | void saa7146_dma_free(struct saa7146_dev* dev,struct videobuf_queue *q, |
| 189 | struct saa7146_buf *buf); | 189 | struct saa7146_buf *buf); |
| 190 | 190 | ||
| 191 | int saa7146_vv_devinit(struct saa7146_dev *dev); | ||
| 191 | int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv); | 192 | int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv); |
| 192 | int saa7146_vv_release(struct saa7146_dev* dev); | 193 | int saa7146_vv_release(struct saa7146_dev* dev); |
| 193 | 194 | ||
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index dcc5b86bcb6c..9d69f01b6fa2 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h | |||
| @@ -81,6 +81,8 @@ struct soc_camera_host_ops { | |||
| 81 | int (*set_bus_param)(struct soc_camera_device *, __u32); | 81 | int (*set_bus_param)(struct soc_camera_device *, __u32); |
| 82 | int (*get_ctrl)(struct soc_camera_device *, struct v4l2_control *); | 82 | int (*get_ctrl)(struct soc_camera_device *, struct v4l2_control *); |
| 83 | int (*set_ctrl)(struct soc_camera_device *, struct v4l2_control *); | 83 | int (*set_ctrl)(struct soc_camera_device *, struct v4l2_control *); |
| 84 | int (*get_parm)(struct soc_camera_device *, struct v4l2_streamparm *); | ||
| 85 | int (*set_parm)(struct soc_camera_device *, struct v4l2_streamparm *); | ||
| 84 | unsigned int (*poll)(struct file *, poll_table *); | 86 | unsigned int (*poll)(struct file *, poll_table *); |
| 85 | const struct v4l2_queryctrl *controls; | 87 | const struct v4l2_queryctrl *controls; |
| 86 | int num_controls; | 88 | int num_controls; |
diff --git a/include/media/timb_radio.h b/include/media/timb_radio.h new file mode 100644 index 000000000000..fcd32a3696ba --- /dev/null +++ b/include/media/timb_radio.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* | ||
| 2 | * timb_radio.h Platform struct for the Timberdale radio driver | ||
| 3 | * Copyright (c) 2009 Intel Corporation | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef _TIMB_RADIO_ | ||
| 20 | #define _TIMB_RADIO_ 1 | ||
| 21 | |||
| 22 | #include <linux/i2c.h> | ||
| 23 | |||
| 24 | struct timb_radio_platform_data { | ||
| 25 | int i2c_adapter; /* I2C adapter where the tuner and dsp are attached */ | ||
| 26 | struct { | ||
| 27 | const char *module_name; | ||
| 28 | struct i2c_board_info *info; | ||
| 29 | } tuner; | ||
| 30 | struct { | ||
| 31 | const char *module_name; | ||
| 32 | struct i2c_board_info *info; | ||
| 33 | } dsp; | ||
| 34 | }; | ||
| 35 | |||
| 36 | #endif | ||
diff --git a/include/media/tuner.h b/include/media/tuner.h index 4d5b53ff17db..5505c5360ca3 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h | |||
| @@ -129,6 +129,7 @@ | |||
| 129 | #define TUNER_PARTSNIC_PTI_5NF05 81 | 129 | #define TUNER_PARTSNIC_PTI_5NF05 81 |
| 130 | #define TUNER_PHILIPS_CU1216L 82 | 130 | #define TUNER_PHILIPS_CU1216L 82 |
| 131 | #define TUNER_NXP_TDA18271 83 | 131 | #define TUNER_NXP_TDA18271 83 |
| 132 | #define TUNER_SONY_BTF_PXN01Z 84 | ||
| 132 | 133 | ||
| 133 | /* tv card specific */ | 134 | /* tv card specific */ |
| 134 | #define TDA9887_PRESENT (1<<0) | 135 | #define TDA9887_PRESENT (1<<0) |
diff --git a/include/media/tvp7002.h b/include/media/tvp7002.h new file mode 100644 index 000000000000..ee4353459ef5 --- /dev/null +++ b/include/media/tvp7002.h | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | /* Texas Instruments Triple 8-/10-BIT 165-/110-MSPS Video and Graphics | ||
| 2 | * Digitizer with Horizontal PLL registers | ||
| 3 | * | ||
| 4 | * Copyright (C) 2009 Texas Instruments Inc | ||
| 5 | * Author: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> | ||
| 6 | * | ||
| 7 | * This code is partially based upon the TVP5150 driver | ||
| 8 | * written by Mauro Carvalho Chehab (mchehab@infradead.org), | ||
| 9 | * the TVP514x driver written by Vaibhav Hiremath <hvaibhav@ti.com> | ||
| 10 | * and the TVP7002 driver in the TI LSP 2.10.00.14 | ||
| 11 | * | ||
| 12 | * This program is free software; you can redistribute it and/or modify | ||
| 13 | * it under the terms of the GNU General Public License as published by | ||
| 14 | * the Free Software Foundation; either version 2 of the License, or | ||
| 15 | * (at your option) any later version. | ||
| 16 | * | ||
| 17 | * This program is distributed in the hope that it will be useful, | ||
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 20 | * GNU General Public License for more details. | ||
| 21 | * | ||
| 22 | * You should have received a copy of the GNU General Public License | ||
| 23 | * along with this program; if not, write to the Free Software | ||
| 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 25 | */ | ||
| 26 | #ifndef _TVP7002_H_ | ||
| 27 | #define _TVP7002_H_ | ||
| 28 | |||
| 29 | /* Platform-dependent data | ||
| 30 | * | ||
| 31 | * clk_polarity: | ||
| 32 | * 0 -> data clocked out on rising edge of DATACLK signal | ||
| 33 | * 1 -> data clocked out on falling edge of DATACLK signal | ||
| 34 | * hs_polarity: | ||
| 35 | * 0 -> active low HSYNC output | ||
| 36 | * 1 -> active high HSYNC output | ||
| 37 | * sog_polarity: | ||
| 38 | * 0 -> normal operation | ||
| 39 | * 1 -> operation with polarity inverted | ||
| 40 | * vs_polarity: | ||
| 41 | * 0 -> active low VSYNC output | ||
| 42 | * 1 -> active high VSYNC output | ||
| 43 | * fid_polarity: | ||
| 44 | * 0 -> the field ID output is set to logic 1 for an odd | ||
| 45 | * field (field 1) and set to logic 0 for an even | ||
| 46 | * field (field 0). | ||
| 47 | * 1 -> operation with polarity inverted. | ||
| 48 | */ | ||
| 49 | struct tvp7002_config { | ||
| 50 | u8 clk_polarity; | ||
| 51 | u8 hs_polarity; | ||
| 52 | u8 vs_polarity; | ||
| 53 | u8 fid_polarity; | ||
| 54 | u8 sog_polarity; | ||
| 55 | }; | ||
| 56 | #endif | ||
diff --git a/include/media/tw9910.h b/include/media/tw9910.h index 5e2895a05e6b..90bcf1fa5421 100644 --- a/include/media/tw9910.h +++ b/include/media/tw9910.h | |||
| @@ -30,8 +30,8 @@ enum tw9910_mpout_pin { | |||
| 30 | }; | 30 | }; |
| 31 | 31 | ||
| 32 | struct tw9910_video_info { | 32 | struct tw9910_video_info { |
| 33 | unsigned long buswidth; | 33 | unsigned long buswidth; |
| 34 | enum tw9910_mpout_pin mpout; | 34 | enum tw9910_mpout_pin mpout; |
| 35 | }; | 35 | }; |
| 36 | 36 | ||
| 37 | 37 | ||
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h index 6cc107d198a0..56abf21dd786 100644 --- a/include/media/v4l2-chip-ident.h +++ b/include/media/v4l2-chip-ident.h | |||
| @@ -39,6 +39,7 @@ enum { | |||
| 39 | 39 | ||
| 40 | /* module saa7115: reserved range 101-149 */ | 40 | /* module saa7115: reserved range 101-149 */ |
| 41 | V4L2_IDENT_SAA7111 = 101, | 41 | V4L2_IDENT_SAA7111 = 101, |
| 42 | V4L2_IDENT_SAA7111A = 102, | ||
| 42 | V4L2_IDENT_SAA7113 = 103, | 43 | V4L2_IDENT_SAA7113 = 103, |
| 43 | V4L2_IDENT_SAA7114 = 104, | 44 | V4L2_IDENT_SAA7114 = 104, |
| 44 | V4L2_IDENT_SAA7115 = 105, | 45 | V4L2_IDENT_SAA7115 = 105, |
| @@ -134,6 +135,9 @@ enum { | |||
| 134 | /* modules tef6862: just ident 6862 */ | 135 | /* modules tef6862: just ident 6862 */ |
| 135 | V4L2_IDENT_TEF6862 = 6862, | 136 | V4L2_IDENT_TEF6862 = 6862, |
| 136 | 137 | ||
| 138 | /* module tvp7002: just ident 7002 */ | ||
| 139 | V4L2_IDENT_TVP7002 = 7002, | ||
| 140 | |||
| 137 | /* module adv7170: just ident 7170 */ | 141 | /* module adv7170: just ident 7170 */ |
| 138 | V4L2_IDENT_ADV7170 = 7170, | 142 | V4L2_IDENT_ADV7170 = 7170, |
| 139 | 143 | ||
| @@ -155,6 +159,9 @@ enum { | |||
| 155 | /* module adv7343: just ident 7343 */ | 159 | /* module adv7343: just ident 7343 */ |
| 156 | V4L2_IDENT_ADV7343 = 7343, | 160 | V4L2_IDENT_ADV7343 = 7343, |
| 157 | 161 | ||
| 162 | /* module saa7706h: just ident 7706 */ | ||
| 163 | V4L2_IDENT_SAA7706H = 7706, | ||
| 164 | |||
| 158 | /* module wm8739: just ident 8739 */ | 165 | /* module wm8739: just ident 8739 */ |
| 159 | V4L2_IDENT_WM8739 = 8739, | 166 | V4L2_IDENT_WM8739 = 8739, |
| 160 | 167 | ||
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 9ba99cd39ee7..2bcdca0a57fc 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h | |||
| @@ -180,6 +180,7 @@ struct v4l2_subdev_audio_ops { | |||
| 180 | int (*s_clock_freq)(struct v4l2_subdev *sd, u32 freq); | 180 | int (*s_clock_freq)(struct v4l2_subdev *sd, u32 freq); |
| 181 | int (*s_i2s_clock_freq)(struct v4l2_subdev *sd, u32 freq); | 181 | int (*s_i2s_clock_freq)(struct v4l2_subdev *sd, u32 freq); |
| 182 | int (*s_routing)(struct v4l2_subdev *sd, u32 input, u32 output, u32 config); | 182 | int (*s_routing)(struct v4l2_subdev *sd, u32 input, u32 output, u32 config); |
| 183 | int (*s_stream)(struct v4l2_subdev *sd, int enable); | ||
| 183 | }; | 184 | }; |
| 184 | 185 | ||
| 185 | /* | 186 | /* |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 7c4449900c24..d80b6dbed1ca 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
| @@ -348,7 +348,8 @@ extern int scsi_mode_select(struct scsi_device *sdev, int pf, int sp, | |||
| 348 | struct scsi_sense_hdr *); | 348 | struct scsi_sense_hdr *); |
| 349 | extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, | 349 | extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, |
| 350 | int retries, struct scsi_sense_hdr *sshdr); | 350 | int retries, struct scsi_sense_hdr *sshdr); |
| 351 | extern unsigned char *scsi_get_vpd_page(struct scsi_device *, u8 page); | 351 | extern int scsi_get_vpd_page(struct scsi_device *, u8 page, unsigned char *buf, |
| 352 | int buf_len); | ||
| 352 | extern int scsi_device_set_state(struct scsi_device *sdev, | 353 | extern int scsi_device_set_state(struct scsi_device *sdev, |
| 353 | enum scsi_device_state state); | 354 | enum scsi_device_state state); |
| 354 | extern struct scsi_event *sdev_evt_alloc(enum scsi_device_event evt_type, | 355 | extern struct scsi_event *sdev_evt_alloc(enum scsi_device_event evt_type, |
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 61ad3594aad6..ffeebc34a4f7 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h | |||
| @@ -107,6 +107,8 @@ struct sas_end_device { | |||
| 107 | struct sas_rphy rphy; | 107 | struct sas_rphy rphy; |
| 108 | /* flags */ | 108 | /* flags */ |
| 109 | unsigned ready_led_meaning:1; | 109 | unsigned ready_led_meaning:1; |
| 110 | unsigned tlr_supported:1; | ||
| 111 | unsigned tlr_enabled:1; | ||
| 110 | /* parameters */ | 112 | /* parameters */ |
| 111 | u16 I_T_nexus_loss_timeout; | 113 | u16 I_T_nexus_loss_timeout; |
| 112 | u16 initiator_response_timeout; | 114 | u16 initiator_response_timeout; |
| @@ -181,6 +183,11 @@ extern int sas_phy_add(struct sas_phy *); | |||
| 181 | extern void sas_phy_delete(struct sas_phy *); | 183 | extern void sas_phy_delete(struct sas_phy *); |
| 182 | extern int scsi_is_sas_phy(const struct device *); | 184 | extern int scsi_is_sas_phy(const struct device *); |
| 183 | 185 | ||
| 186 | unsigned int sas_tlr_supported(struct scsi_device *); | ||
| 187 | unsigned int sas_is_tlr_enabled(struct scsi_device *); | ||
| 188 | void sas_disable_tlr(struct scsi_device *); | ||
| 189 | void sas_enable_tlr(struct scsi_device *); | ||
| 190 | |||
| 184 | extern struct sas_rphy *sas_end_device_alloc(struct sas_port *); | 191 | extern struct sas_rphy *sas_end_device_alloc(struct sas_port *); |
| 185 | extern struct sas_rphy *sas_expander_alloc(struct sas_port *, enum sas_device_type); | 192 | extern struct sas_rphy *sas_expander_alloc(struct sas_port *, enum sas_device_type); |
| 186 | void sas_rphy_free(struct sas_rphy *); | 193 | void sas_rphy_free(struct sas_rphy *); |
diff --git a/include/video/sh_mobile_lcdc.h b/include/video/sh_mobile_lcdc.h index 288205457713..2cc893fc1f85 100644 --- a/include/video/sh_mobile_lcdc.h +++ b/include/video/sh_mobile_lcdc.h | |||
| @@ -34,6 +34,8 @@ enum { LCDC_CLK_BUS, LCDC_CLK_PERIPHERAL, LCDC_CLK_EXTERNAL }; | |||
| 34 | #define LCDC_FLAGS_HSCNT (1 << 3) /* Disable HSYNC during VBLANK */ | 34 | #define LCDC_FLAGS_HSCNT (1 << 3) /* Disable HSYNC during VBLANK */ |
| 35 | #define LCDC_FLAGS_DWCNT (1 << 4) /* Disable dotclock during blanking */ | 35 | #define LCDC_FLAGS_DWCNT (1 << 4) /* Disable dotclock during blanking */ |
| 36 | 36 | ||
| 37 | #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) | ||
| 38 | |||
| 37 | struct sh_mobile_lcdc_sys_bus_cfg { | 39 | struct sh_mobile_lcdc_sys_bus_cfg { |
| 38 | unsigned long ldmt2r; | 40 | unsigned long ldmt2r; |
| 39 | unsigned long ldmt3r; | 41 | unsigned long ldmt3r; |
