diff options
Diffstat (limited to 'include')
205 files changed, 4994 insertions, 2210 deletions
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 2c744c7a5b3d..26a92fc28a59 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
| @@ -491,11 +491,11 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typ_a, u8 * slp_typ_b); | |||
| 491 | 491 | ||
| 492 | acpi_status acpi_enter_sleep_state_prep(u8 sleep_state); | 492 | acpi_status acpi_enter_sleep_state_prep(u8 sleep_state); |
| 493 | 493 | ||
| 494 | acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state, u8 flags); | 494 | acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state); |
| 495 | 495 | ||
| 496 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)) | 496 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)) |
| 497 | 497 | ||
| 498 | acpi_status acpi_leave_sleep_state_prep(u8 sleep_state, u8 flags); | 498 | acpi_status acpi_leave_sleep_state_prep(u8 sleep_state); |
| 499 | 499 | ||
| 500 | acpi_status acpi_leave_sleep_state(u8 sleep_state); | 500 | acpi_status acpi_leave_sleep_state(u8 sleep_state); |
| 501 | 501 | ||
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 3af87de6a68c..3d00bd5bd7e3 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
| @@ -803,7 +803,7 @@ typedef u8 acpi_adr_space_type; | |||
| 803 | 803 | ||
| 804 | /* Sleep function dispatch */ | 804 | /* Sleep function dispatch */ |
| 805 | 805 | ||
| 806 | typedef acpi_status(*ACPI_SLEEP_FUNCTION) (u8 sleep_state, u8 flags); | 806 | typedef acpi_status(*ACPI_SLEEP_FUNCTION) (u8 sleep_state); |
| 807 | 807 | ||
| 808 | struct acpi_sleep_functions { | 808 | struct acpi_sleep_functions { |
| 809 | ACPI_SLEEP_FUNCTION legacy_function; | 809 | ACPI_SLEEP_FUNCTION legacy_function; |
diff --git a/include/asm-generic/mutex-xchg.h b/include/asm-generic/mutex-xchg.h index 580a6d35c700..c04e0db8a2d6 100644 --- a/include/asm-generic/mutex-xchg.h +++ b/include/asm-generic/mutex-xchg.h | |||
| @@ -26,7 +26,13 @@ static inline void | |||
| 26 | __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *)) | 26 | __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *)) |
| 27 | { | 27 | { |
| 28 | if (unlikely(atomic_xchg(count, 0) != 1)) | 28 | if (unlikely(atomic_xchg(count, 0) != 1)) |
| 29 | fail_fn(count); | 29 | /* |
| 30 | * We failed to acquire the lock, so mark it contended | ||
| 31 | * to ensure that any waiting tasks are woken up by the | ||
| 32 | * unlock slow path. | ||
| 33 | */ | ||
| 34 | if (likely(atomic_xchg(count, -1) != 1)) | ||
| 35 | fail_fn(count); | ||
| 30 | } | 36 | } |
| 31 | 37 | ||
| 32 | /** | 38 | /** |
| @@ -43,7 +49,8 @@ static inline int | |||
| 43 | __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *)) | 49 | __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *)) |
| 44 | { | 50 | { |
| 45 | if (unlikely(atomic_xchg(count, 0) != 1)) | 51 | if (unlikely(atomic_xchg(count, 0) != 1)) |
| 46 | return fail_fn(count); | 52 | if (likely(atomic_xchg(count, -1) != 1)) |
| 53 | return fail_fn(count); | ||
| 47 | return 0; | 54 | return 0; |
| 48 | } | 55 | } |
| 49 | 56 | ||
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index a1a0386e0160..bfacf0d5a225 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
| @@ -118,7 +118,8 @@ enum drm_mode_status { | |||
| 118 | .hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), \ | 118 | .hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), \ |
| 119 | .htotal = (ht), .hskew = (hsk), .vdisplay = (vd), \ | 119 | .htotal = (ht), .hskew = (hsk), .vdisplay = (vd), \ |
| 120 | .vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), \ | 120 | .vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), \ |
| 121 | .vscan = (vs), .flags = (f), .vrefresh = 0 | 121 | .vscan = (vs), .flags = (f), .vrefresh = 0, \ |
| 122 | .base.type = DRM_MODE_OBJECT_MODE | ||
| 122 | 123 | ||
| 123 | #define CRTC_INTERLACE_HALVE_V 0x1 /* halve V values for interlacing */ | 124 | #define CRTC_INTERLACE_HALVE_V 0x1 /* halve V values for interlacing */ |
| 124 | 125 | ||
| @@ -166,8 +167,6 @@ struct drm_display_mode { | |||
| 166 | int crtc_vsync_start; | 167 | int crtc_vsync_start; |
| 167 | int crtc_vsync_end; | 168 | int crtc_vsync_end; |
| 168 | int crtc_vtotal; | 169 | int crtc_vtotal; |
| 169 | int crtc_hadjusted; | ||
| 170 | int crtc_vadjusted; | ||
| 171 | 170 | ||
| 172 | /* Driver private mode info */ | 171 | /* Driver private mode info */ |
| 173 | int private_size; | 172 | int private_size; |
diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h index bdf0152cbbe9..f4621184a9b4 100644 --- a/include/drm/drm_fourcc.h +++ b/include/drm/drm_fourcc.h | |||
| @@ -107,8 +107,7 @@ | |||
| 107 | #define DRM_FORMAT_NV16 fourcc_code('N', 'V', '1', '6') /* 2x1 subsampled Cr:Cb plane */ | 107 | #define DRM_FORMAT_NV16 fourcc_code('N', 'V', '1', '6') /* 2x1 subsampled Cr:Cb plane */ |
| 108 | #define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */ | 108 | #define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */ |
| 109 | 109 | ||
| 110 | /* 2 non contiguous plane YCbCr */ | 110 | /* special NV12 tiled format */ |
| 111 | #define DRM_FORMAT_NV12M fourcc_code('N', 'M', '1', '2') /* 2x2 subsampled Cr:Cb plane */ | ||
| 112 | #define DRM_FORMAT_NV12MT fourcc_code('T', 'M', '1', '2') /* 2x2 subsampled Cr:Cb plane 64x32 macroblocks */ | 111 | #define DRM_FORMAT_NV12MT fourcc_code('T', 'M', '1', '2') /* 2x2 subsampled Cr:Cb plane 64x32 macroblocks */ |
| 113 | 112 | ||
| 114 | /* | 113 | /* |
| @@ -131,7 +130,4 @@ | |||
| 131 | #define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */ | 130 | #define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */ |
| 132 | #define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */ | 131 | #define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */ |
| 133 | 132 | ||
| 134 | /* 3 non contiguous plane YCbCr */ | ||
| 135 | #define DRM_FORMAT_YUV420M fourcc_code('Y', 'M', '1', '2') /* 2x2 subsampled Cb (1) and Cr (2) planes */ | ||
| 136 | |||
| 137 | #endif /* DRM_FOURCC_H */ | 133 | #endif /* DRM_FOURCC_H */ |
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index 5581980b14f6..3d6301b6ec16 100644 --- a/include/drm/drm_mode.h +++ b/include/drm/drm_mode.h | |||
| @@ -359,8 +359,9 @@ struct drm_mode_mode_cmd { | |||
| 359 | struct drm_mode_modeinfo mode; | 359 | struct drm_mode_modeinfo mode; |
| 360 | }; | 360 | }; |
| 361 | 361 | ||
| 362 | #define DRM_MODE_CURSOR_BO (1<<0) | 362 | #define DRM_MODE_CURSOR_BO 0x01 |
| 363 | #define DRM_MODE_CURSOR_MOVE (1<<1) | 363 | #define DRM_MODE_CURSOR_MOVE 0x02 |
| 364 | #define DRM_MODE_CURSOR_FLAGS 0x03 | ||
| 364 | 365 | ||
| 365 | /* | 366 | /* |
| 366 | * depending on the value in flags different members are used. | 367 | * depending on the value in flags different members are used. |
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 7ff5c99b1638..c78bb997e2c6 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
| @@ -213,9 +213,12 @@ | |||
| 213 | {0x1002, 0x6800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 213 | {0x1002, 0x6800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| 214 | {0x1002, 0x6801, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 214 | {0x1002, 0x6801, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| 215 | {0x1002, 0x6802, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 215 | {0x1002, 0x6802, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| 216 | {0x1002, 0x6806, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ | ||
| 216 | {0x1002, 0x6808, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ | 217 | {0x1002, 0x6808, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
| 217 | {0x1002, 0x6809, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ | 218 | {0x1002, 0x6809, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
| 218 | {0x1002, 0x6810, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ | 219 | {0x1002, 0x6810, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
| 220 | {0x1002, 0x6816, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ | ||
| 221 | {0x1002, 0x6817, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ | ||
| 219 | {0x1002, 0x6818, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ | 222 | {0x1002, 0x6818, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
| 220 | {0x1002, 0x6819, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ | 223 | {0x1002, 0x6819, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
| 221 | {0x1002, 0x6820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 224 | {0x1002, 0x6820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index 58056865b8e9..dc3a8cd7db8a 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h | |||
| @@ -964,6 +964,8 @@ struct drm_radeon_cs { | |||
| 964 | #define RADEON_INFO_IB_VM_MAX_SIZE 0x0f | 964 | #define RADEON_INFO_IB_VM_MAX_SIZE 0x0f |
| 965 | /* max pipes - needed for compute shaders */ | 965 | /* max pipes - needed for compute shaders */ |
| 966 | #define RADEON_INFO_MAX_PIPES 0x10 | 966 | #define RADEON_INFO_MAX_PIPES 0x10 |
| 967 | /* timestamp for GL_ARB_timer_query (OpenGL), returns the current GPU clock */ | ||
| 968 | #define RADEON_INFO_TIMESTAMP 0x11 | ||
| 967 | 969 | ||
| 968 | struct drm_radeon_info { | 970 | struct drm_radeon_info { |
| 969 | uint32_t request; | 971 | uint32_t request; |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index d9a754474878..c57e064666e4 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
| @@ -84,7 +84,6 @@ header-y += capability.h | |||
| 84 | header-y += capi.h | 84 | header-y += capi.h |
| 85 | header-y += cciss_defs.h | 85 | header-y += cciss_defs.h |
| 86 | header-y += cciss_ioctl.h | 86 | header-y += cciss_ioctl.h |
| 87 | header-y += cdk.h | ||
| 88 | header-y += cdrom.h | 87 | header-y += cdrom.h |
| 89 | header-y += cgroupstats.h | 88 | header-y += cgroupstats.h |
| 90 | header-y += chio.h | 89 | header-y += chio.h |
| @@ -93,7 +92,6 @@ header-y += cn_proc.h | |||
| 93 | header-y += coda.h | 92 | header-y += coda.h |
| 94 | header-y += coda_psdev.h | 93 | header-y += coda_psdev.h |
| 95 | header-y += coff.h | 94 | header-y += coff.h |
| 96 | header-y += comstats.h | ||
| 97 | header-y += connector.h | 95 | header-y += connector.h |
| 98 | header-y += const.h | 96 | header-y += const.h |
| 99 | header-y += cramfs_fs.h | 97 | header-y += cramfs_fs.h |
| @@ -140,7 +138,6 @@ header-y += fuse.h | |||
| 140 | header-y += futex.h | 138 | header-y += futex.h |
| 141 | header-y += gameport.h | 139 | header-y += gameport.h |
| 142 | header-y += gen_stats.h | 140 | header-y += gen_stats.h |
| 143 | header-y += generic_serial.h | ||
| 144 | header-y += genetlink.h | 141 | header-y += genetlink.h |
| 145 | header-y += gfs2_ondisk.h | 142 | header-y += gfs2_ondisk.h |
| 146 | header-y += gigaset_dev.h | 143 | header-y += gigaset_dev.h |
| @@ -372,6 +369,7 @@ header-y += tipc.h | |||
| 372 | header-y += tipc_config.h | 369 | header-y += tipc_config.h |
| 373 | header-y += toshiba.h | 370 | header-y += toshiba.h |
| 374 | header-y += tty.h | 371 | header-y += tty.h |
| 372 | header-y += tty_flags.h | ||
| 375 | header-y += types.h | 373 | header-y += types.h |
| 376 | header-y += udf_fs_i.h | 374 | header-y += udf_fs_i.h |
| 377 | header-y += udp.h | 375 | header-y += udp.h |
| @@ -391,6 +389,7 @@ header-y += v4l2-dv-timings.h | |||
| 391 | header-y += v4l2-mediabus.h | 389 | header-y += v4l2-mediabus.h |
| 392 | header-y += v4l2-subdev.h | 390 | header-y += v4l2-subdev.h |
| 393 | header-y += veth.h | 391 | header-y += veth.h |
| 392 | header-y += vfio.h | ||
| 394 | header-y += vhost.h | 393 | header-y += vhost.h |
| 395 | header-y += videodev2.h | 394 | header-y += videodev2.h |
| 396 | header-y += virtio_9p.h | 395 | header-y += virtio_9p.h |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 3ad510b25283..4f2a76224509 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -96,7 +96,7 @@ void acpi_table_print_madt_entry (struct acpi_subtable_header *madt); | |||
| 96 | void acpi_numa_slit_init (struct acpi_table_slit *slit); | 96 | void acpi_numa_slit_init (struct acpi_table_slit *slit); |
| 97 | void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa); | 97 | void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa); |
| 98 | void acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa); | 98 | void acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa); |
| 99 | void acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); | 99 | int acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); |
| 100 | void acpi_numa_arch_fixup(void); | 100 | void acpi_numa_arch_fixup(void); |
| 101 | 101 | ||
| 102 | #ifdef CONFIG_ACPI_HOTPLUG_CPU | 102 | #ifdef CONFIG_ACPI_HOTPLUG_CPU |
diff --git a/include/linux/amba/serial.h b/include/linux/amba/serial.h index d117b29d1062..f612c783170f 100644 --- a/include/linux/amba/serial.h +++ b/include/linux/amba/serial.h | |||
| @@ -205,7 +205,6 @@ struct amba_pl011_data { | |||
| 205 | void *dma_tx_param; | 205 | void *dma_tx_param; |
| 206 | void (*init) (void); | 206 | void (*init) (void); |
| 207 | void (*exit) (void); | 207 | void (*exit) (void); |
| 208 | void (*reset) (void); | ||
| 209 | }; | 208 | }; |
| 210 | #endif | 209 | #endif |
| 211 | 210 | ||
diff --git a/include/linux/atmel-ssc.h b/include/linux/atmel-ssc.h index 06023393fba9..4eb31752e2b7 100644 --- a/include/linux/atmel-ssc.h +++ b/include/linux/atmel-ssc.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/platform_device.h> | 4 | #include <linux/platform_device.h> |
| 5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
| 6 | #include <linux/io.h> | ||
| 6 | 7 | ||
| 7 | struct ssc_device { | 8 | struct ssc_device { |
| 8 | struct list_head list; | 9 | struct list_head list; |
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index c97c6b9cd38e..2a9a9abc9126 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
| @@ -124,7 +124,6 @@ void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages, | |||
| 124 | void bdi_start_background_writeback(struct backing_dev_info *bdi); | 124 | void bdi_start_background_writeback(struct backing_dev_info *bdi); |
| 125 | int bdi_writeback_thread(void *data); | 125 | int bdi_writeback_thread(void *data); |
| 126 | int bdi_has_dirty_io(struct backing_dev_info *bdi); | 126 | int bdi_has_dirty_io(struct backing_dev_info *bdi); |
| 127 | void bdi_arm_supers_timer(void); | ||
| 128 | void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi); | 127 | void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi); |
| 129 | void bdi_lock_two(struct bdi_writeback *wb1, struct bdi_writeback *wb2); | 128 | void bdi_lock_two(struct bdi_writeback *wb1, struct bdi_writeback *wb2); |
| 130 | 129 | ||
diff --git a/include/linux/bcm2835_timer.h b/include/linux/bcm2835_timer.h new file mode 100644 index 000000000000..25680fe0903c --- /dev/null +++ b/include/linux/bcm2835_timer.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2012 Simon Arlott | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef __BCM2835_TIMER_H | ||
| 16 | #define __BCM2835_TIMER_H | ||
| 17 | |||
| 18 | #include <asm/mach/time.h> | ||
| 19 | |||
| 20 | extern struct sys_timer bcm2835_timer; | ||
| 21 | |||
| 22 | #endif | ||
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h index 3c80885fa829..d323a4b4143c 100644 --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
| @@ -89,6 +89,12 @@ | |||
| 89 | #define BCMA_CC_CHIPST_4313_OTP_PRESENT 2 | 89 | #define BCMA_CC_CHIPST_4313_OTP_PRESENT 2 |
| 90 | #define BCMA_CC_CHIPST_4331_SPROM_PRESENT 2 | 90 | #define BCMA_CC_CHIPST_4331_SPROM_PRESENT 2 |
| 91 | #define BCMA_CC_CHIPST_4331_OTP_PRESENT 4 | 91 | #define BCMA_CC_CHIPST_4331_OTP_PRESENT 4 |
| 92 | #define BCMA_CC_CHIPST_43228_ILP_DIV_EN 0x00000001 | ||
| 93 | #define BCMA_CC_CHIPST_43228_OTP_PRESENT 0x00000002 | ||
| 94 | #define BCMA_CC_CHIPST_43228_SERDES_REFCLK_PADSEL 0x00000004 | ||
| 95 | #define BCMA_CC_CHIPST_43228_SDIO_MODE 0x00000008 | ||
| 96 | #define BCMA_CC_CHIPST_43228_SDIO_OTP_PRESENT 0x00000010 | ||
| 97 | #define BCMA_CC_CHIPST_43228_SDIO_RESET 0x00000020 | ||
| 92 | #define BCMA_CC_CHIPST_4706_PKG_OPTION BIT(0) /* 0: full-featured package 1: low-cost package */ | 98 | #define BCMA_CC_CHIPST_4706_PKG_OPTION BIT(0) /* 0: full-featured package 1: low-cost package */ |
| 93 | #define BCMA_CC_CHIPST_4706_SFLASH_PRESENT BIT(1) /* 0: parallel, 1: serial flash is present */ | 99 | #define BCMA_CC_CHIPST_4706_SFLASH_PRESENT BIT(1) /* 0: parallel, 1: serial flash is present */ |
| 94 | #define BCMA_CC_CHIPST_4706_SFLASH_TYPE BIT(2) /* 0: 8b-p/ST-s flash, 1: 16b-p/Atmal-s flash */ | 100 | #define BCMA_CC_CHIPST_4706_SFLASH_TYPE BIT(2) /* 0: 8b-p/ST-s flash, 1: 16b-p/Atmal-s flash */ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 4e72a9d48232..4a2ab7c85393 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -601,7 +601,7 @@ static inline void blk_clear_rl_full(struct request_list *rl, bool sync) | |||
| 601 | * it already be started by driver. | 601 | * it already be started by driver. |
| 602 | */ | 602 | */ |
| 603 | #define RQ_NOMERGE_FLAGS \ | 603 | #define RQ_NOMERGE_FLAGS \ |
| 604 | (REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA) | 604 | (REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA | REQ_DISCARD) |
| 605 | #define rq_mergeable(rq) \ | 605 | #define rq_mergeable(rq) \ |
| 606 | (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \ | 606 | (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \ |
| 607 | (((rq)->cmd_flags & REQ_DISCARD) || \ | 607 | (((rq)->cmd_flags & REQ_DISCARD) || \ |
| @@ -894,6 +894,8 @@ extern void blk_queue_flush_queueable(struct request_queue *q, bool queueable); | |||
| 894 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); | 894 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); |
| 895 | 895 | ||
| 896 | extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *); | 896 | extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *); |
| 897 | extern int blk_bio_map_sg(struct request_queue *q, struct bio *bio, | ||
| 898 | struct scatterlist *sglist); | ||
| 897 | extern void blk_dump_rq_flags(struct request *, char *); | 899 | extern void blk_dump_rq_flags(struct request *, char *); |
| 898 | extern long nr_blockdev_pages(void); | 900 | extern long nr_blockdev_pages(void); |
| 899 | 901 | ||
| @@ -1139,6 +1141,16 @@ static inline int queue_limit_discard_alignment(struct queue_limits *lim, sector | |||
| 1139 | & (lim->discard_granularity - 1); | 1141 | & (lim->discard_granularity - 1); |
| 1140 | } | 1142 | } |
| 1141 | 1143 | ||
| 1144 | static inline int bdev_discard_alignment(struct block_device *bdev) | ||
| 1145 | { | ||
| 1146 | struct request_queue *q = bdev_get_queue(bdev); | ||
| 1147 | |||
| 1148 | if (bdev != bdev->bd_contains) | ||
| 1149 | return bdev->bd_part->discard_alignment; | ||
| 1150 | |||
| 1151 | return q->limits.discard_alignment; | ||
| 1152 | } | ||
| 1153 | |||
| 1142 | static inline unsigned int queue_discard_zeroes_data(struct request_queue *q) | 1154 | static inline unsigned int queue_discard_zeroes_data(struct request_queue *q) |
| 1143 | { | 1155 | { |
| 1144 | if (q->limits.max_discard_sectors && q->limits.discard_zeroes_data == 1) | 1156 | if (q->limits.max_discard_sectors && q->limits.discard_zeroes_data == 1) |
diff --git a/include/linux/can.h b/include/linux/can.h index 018055efc034..e52958d7c2d1 100644 --- a/include/linux/can.h +++ b/include/linux/can.h | |||
| @@ -74,20 +74,21 @@ struct can_frame { | |||
| 74 | /* | 74 | /* |
| 75 | * defined bits for canfd_frame.flags | 75 | * defined bits for canfd_frame.flags |
| 76 | * | 76 | * |
| 77 | * As the default for CAN FD should be to support the high data rate in the | 77 | * The use of struct canfd_frame implies the Extended Data Length (EDL) bit to |
| 78 | * payload section of the frame (HDR) and to support up to 64 byte in the | 78 | * be set in the CAN frame bitstream on the wire. The EDL bit switch turns |
| 79 | * data section (EDL) the bits are only set in the non-default case. | 79 | * the CAN controllers bitstream processor into the CAN FD mode which creates |
| 80 | * Btw. as long as there's no real implementation for CAN FD network driver | 80 | * two new options within the CAN FD frame specification: |
| 81 | * these bits are only preliminary. | ||
| 82 | * | 81 | * |
| 83 | * RX: NOHDR/NOEDL - info about received CAN FD frame | 82 | * Bit Rate Switch - to indicate a second bitrate is/was used for the payload |
| 84 | * ESI - bit from originating CAN controller | 83 | * Error State Indicator - represents the error state of the transmitting node |
| 85 | * TX: NOHDR/NOEDL - control per-frame settings if supported by CAN controller | 84 | * |
| 86 | * ESI - bit is set by local CAN controller | 85 | * As the CANFD_ESI bit is internally generated by the transmitting CAN |
| 86 | * controller only the CANFD_BRS bit is relevant for real CAN controllers when | ||
| 87 | * building a CAN FD frame for transmission. Setting the CANFD_ESI bit can make | ||
| 88 | * sense for virtual CAN interfaces to test applications with echoed frames. | ||
| 87 | */ | 89 | */ |
| 88 | #define CANFD_NOHDR 0x01 /* frame without high data rate */ | 90 | #define CANFD_BRS 0x01 /* bit rate switch (second bitrate for payload data) */ |
| 89 | #define CANFD_NOEDL 0x02 /* frame without extended data length */ | 91 | #define CANFD_ESI 0x02 /* error state indicator of the transmitting node */ |
| 90 | #define CANFD_ESI 0x04 /* error state indicator */ | ||
| 91 | 92 | ||
| 92 | /** | 93 | /** |
| 93 | * struct canfd_frame - CAN flexible data rate frame structure | 94 | * struct canfd_frame - CAN flexible data rate frame structure |
diff --git a/include/linux/cd1400.h b/include/linux/cd1400.h deleted file mode 100644 index 1dc3ab0523fd..000000000000 --- a/include/linux/cd1400.h +++ /dev/null | |||
| @@ -1,292 +0,0 @@ | |||
| 1 | /*****************************************************************************/ | ||
| 2 | |||
| 3 | /* | ||
| 4 | * cd1400.h -- cd1400 UART hardware info. | ||
| 5 | * | ||
| 6 | * Copyright (C) 1996-1998 Stallion Technologies | ||
| 7 | * Copyright (C) 1994-1996 Greg Ungerer. | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License | ||
| 20 | * along with this program; if not, write to the Free Software | ||
| 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 22 | */ | ||
| 23 | |||
| 24 | /*****************************************************************************/ | ||
| 25 | #ifndef _CD1400_H | ||
| 26 | #define _CD1400_H | ||
| 27 | /*****************************************************************************/ | ||
| 28 | |||
| 29 | /* | ||
| 30 | * Define the number of async ports per cd1400 uart chip. | ||
| 31 | */ | ||
| 32 | #define CD1400_PORTS 4 | ||
| 33 | |||
| 34 | /* | ||
| 35 | * Define the cd1400 uarts internal FIFO sizes. | ||
| 36 | */ | ||
| 37 | #define CD1400_TXFIFOSIZE 12 | ||
| 38 | #define CD1400_RXFIFOSIZE 12 | ||
| 39 | |||
| 40 | /* | ||
| 41 | * Local RX FIFO thresh hold level. Also define the RTS thresh hold | ||
| 42 | * based on the RX thresh hold. | ||
| 43 | */ | ||
| 44 | #define FIFO_RXTHRESHOLD 6 | ||
| 45 | #define FIFO_RTSTHRESHOLD 7 | ||
| 46 | |||
| 47 | /*****************************************************************************/ | ||
| 48 | |||
| 49 | /* | ||
| 50 | * Define the cd1400 register addresses. These are all the valid | ||
| 51 | * registers with the cd1400. Some are global, some virtual, some | ||
| 52 | * per port. | ||
| 53 | */ | ||
| 54 | #define GFRCR 0x40 | ||
| 55 | #define CAR 0x68 | ||
| 56 | #define GCR 0x4b | ||
| 57 | #define SVRR 0x67 | ||
| 58 | #define RICR 0x44 | ||
| 59 | #define TICR 0x45 | ||
| 60 | #define MICR 0x46 | ||
| 61 | #define RIR 0x6b | ||
| 62 | #define TIR 0x6a | ||
| 63 | #define MIR 0x69 | ||
| 64 | #define PPR 0x7e | ||
| 65 | |||
| 66 | #define RIVR 0x43 | ||
| 67 | #define TIVR 0x42 | ||
| 68 | #define MIVR 0x41 | ||
| 69 | #define TDR 0x63 | ||
| 70 | #define RDSR 0x62 | ||
| 71 | #define MISR 0x4c | ||
| 72 | #define EOSRR 0x60 | ||
| 73 | |||
| 74 | #define LIVR 0x18 | ||
| 75 | #define CCR 0x05 | ||
| 76 | #define SRER 0x06 | ||
| 77 | #define COR1 0x08 | ||
| 78 | #define COR2 0x09 | ||
| 79 | #define COR3 0x0a | ||
| 80 | #define COR4 0x1e | ||
| 81 | #define COR5 0x1f | ||
| 82 | #define CCSR 0x0b | ||
| 83 | #define RDCR 0x0e | ||
| 84 | #define SCHR1 0x1a | ||
| 85 | #define SCHR2 0x1b | ||
| 86 | #define SCHR3 0x1c | ||
| 87 | #define SCHR4 0x1d | ||
| 88 | #define SCRL 0x22 | ||
| 89 | #define SCRH 0x23 | ||
| 90 | #define LNC 0x24 | ||
| 91 | #define MCOR1 0x15 | ||
| 92 | #define MCOR2 0x16 | ||
| 93 | #define RTPR 0x21 | ||
| 94 | #define MSVR1 0x6c | ||
| 95 | #define MSVR2 0x6d | ||
| 96 | #define PSVR 0x6f | ||
| 97 | #define RBPR 0x78 | ||
| 98 | #define RCOR 0x7c | ||
| 99 | #define TBPR 0x72 | ||
| 100 | #define TCOR 0x76 | ||
| 101 | |||
| 102 | /*****************************************************************************/ | ||
| 103 | |||
| 104 | /* | ||
| 105 | * Define the set of baud rate clock divisors. | ||
| 106 | */ | ||
| 107 | #define CD1400_CLK0 8 | ||
| 108 | #define CD1400_CLK1 32 | ||
| 109 | #define CD1400_CLK2 128 | ||
| 110 | #define CD1400_CLK3 512 | ||
| 111 | #define CD1400_CLK4 2048 | ||
| 112 | |||
| 113 | #define CD1400_NUMCLKS 5 | ||
| 114 | |||
| 115 | /*****************************************************************************/ | ||
| 116 | |||
| 117 | /* | ||
| 118 | * Define the clock pre-scalar value to be a 5 ms clock. This should be | ||
| 119 | * OK for now. It would probably be better to make it 10 ms, but we | ||
| 120 | * can't fit that divisor into 8 bits! | ||
| 121 | */ | ||
| 122 | #define PPR_SCALAR 244 | ||
| 123 | |||
| 124 | /*****************************************************************************/ | ||
| 125 | |||
| 126 | /* | ||
| 127 | * Define values used to set character size options. | ||
| 128 | */ | ||
| 129 | #define COR1_CHL5 0x00 | ||
| 130 | #define COR1_CHL6 0x01 | ||
| 131 | #define COR1_CHL7 0x02 | ||
| 132 | #define COR1_CHL8 0x03 | ||
| 133 | |||
| 134 | /* | ||
| 135 | * Define values used to set the number of stop bits. | ||
| 136 | */ | ||
| 137 | #define COR1_STOP1 0x00 | ||
| 138 | #define COR1_STOP15 0x04 | ||
| 139 | #define COR1_STOP2 0x08 | ||
| 140 | |||
| 141 | /* | ||
| 142 | * Define values used to set the parity scheme in use. | ||
| 143 | */ | ||
| 144 | #define COR1_PARNONE 0x00 | ||
| 145 | #define COR1_PARFORCE 0x20 | ||
| 146 | #define COR1_PARENB 0x40 | ||
| 147 | #define COR1_PARIGNORE 0x10 | ||
| 148 | |||
| 149 | #define COR1_PARODD 0x80 | ||
| 150 | #define COR1_PAREVEN 0x00 | ||
| 151 | |||
| 152 | #define COR2_IXM 0x80 | ||
| 153 | #define COR2_TXIBE 0x40 | ||
| 154 | #define COR2_ETC 0x20 | ||
| 155 | #define COR2_LLM 0x10 | ||
| 156 | #define COR2_RLM 0x08 | ||
| 157 | #define COR2_RTSAO 0x04 | ||
| 158 | #define COR2_CTSAE 0x02 | ||
| 159 | |||
| 160 | #define COR3_SCDRNG 0x80 | ||
| 161 | #define COR3_SCD34 0x40 | ||
| 162 | #define COR3_FCT 0x20 | ||
| 163 | #define COR3_SCD12 0x10 | ||
| 164 | |||
| 165 | /* | ||
| 166 | * Define values used by COR4. | ||
| 167 | */ | ||
| 168 | #define COR4_BRKINT 0x08 | ||
| 169 | #define COR4_IGNBRK 0x18 | ||
| 170 | |||
| 171 | /*****************************************************************************/ | ||
| 172 | |||
| 173 | /* | ||
| 174 | * Define the modem control register values. | ||
| 175 | * Note that the actual hardware is a little different to the conventional | ||
| 176 | * pin names on the cd1400. | ||
| 177 | */ | ||
| 178 | #define MSVR1_DTR 0x01 | ||
| 179 | #define MSVR1_DSR 0x10 | ||
| 180 | #define MSVR1_RI 0x20 | ||
| 181 | #define MSVR1_CTS 0x40 | ||
| 182 | #define MSVR1_DCD 0x80 | ||
| 183 | |||
| 184 | #define MSVR2_RTS 0x02 | ||
| 185 | #define MSVR2_DSR 0x10 | ||
| 186 | #define MSVR2_RI 0x20 | ||
| 187 | #define MSVR2_CTS 0x40 | ||
| 188 | #define MSVR2_DCD 0x80 | ||
| 189 | |||
| 190 | #define MCOR1_DCD 0x80 | ||
| 191 | #define MCOR1_CTS 0x40 | ||
| 192 | #define MCOR1_RI 0x20 | ||
| 193 | #define MCOR1_DSR 0x10 | ||
| 194 | |||
| 195 | #define MCOR2_DCD 0x80 | ||
| 196 | #define MCOR2_CTS 0x40 | ||
| 197 | #define MCOR2_RI 0x20 | ||
| 198 | #define MCOR2_DSR 0x10 | ||
| 199 | |||
| 200 | /*****************************************************************************/ | ||
| 201 | |||
| 202 | /* | ||
| 203 | * Define the bits used with the service (interrupt) enable register. | ||
| 204 | */ | ||
| 205 | #define SRER_NNDT 0x01 | ||
| 206 | #define SRER_TXEMPTY 0x02 | ||
| 207 | #define SRER_TXDATA 0x04 | ||
| 208 | #define SRER_RXDATA 0x10 | ||
| 209 | #define SRER_MODEM 0x80 | ||
| 210 | |||
| 211 | /*****************************************************************************/ | ||
| 212 | |||
| 213 | /* | ||
| 214 | * Define operational commands for the command register. | ||
| 215 | */ | ||
| 216 | #define CCR_RESET 0x80 | ||
| 217 | #define CCR_CORCHANGE 0x4e | ||
| 218 | #define CCR_SENDCH 0x20 | ||
| 219 | #define CCR_CHANCTRL 0x10 | ||
| 220 | |||
| 221 | #define CCR_TXENABLE (CCR_CHANCTRL | 0x08) | ||
| 222 | #define CCR_TXDISABLE (CCR_CHANCTRL | 0x04) | ||
| 223 | #define CCR_RXENABLE (CCR_CHANCTRL | 0x02) | ||
| 224 | #define CCR_RXDISABLE (CCR_CHANCTRL | 0x01) | ||
| 225 | |||
| 226 | #define CCR_SENDSCHR1 (CCR_SENDCH | 0x01) | ||
| 227 | #define CCR_SENDSCHR2 (CCR_SENDCH | 0x02) | ||
| 228 | #define CCR_SENDSCHR3 (CCR_SENDCH | 0x03) | ||
| 229 | #define CCR_SENDSCHR4 (CCR_SENDCH | 0x04) | ||
| 230 | |||
| 231 | #define CCR_RESETCHAN (CCR_RESET | 0x00) | ||
| 232 | #define CCR_RESETFULL (CCR_RESET | 0x01) | ||
| 233 | #define CCR_TXFLUSHFIFO (CCR_RESET | 0x02) | ||
| 234 | |||
| 235 | #define CCR_MAXWAIT 10000 | ||
| 236 | |||
| 237 | /*****************************************************************************/ | ||
| 238 | |||
| 239 | /* | ||
| 240 | * Define the valid acknowledgement types (for hw ack cycle). | ||
| 241 | */ | ||
| 242 | #define ACK_TYPMASK 0x07 | ||
| 243 | #define ACK_TYPTX 0x02 | ||
| 244 | #define ACK_TYPMDM 0x01 | ||
| 245 | #define ACK_TYPRXGOOD 0x03 | ||
| 246 | #define ACK_TYPRXBAD 0x07 | ||
| 247 | |||
| 248 | #define SVRR_RX 0x01 | ||
| 249 | #define SVRR_TX 0x02 | ||
| 250 | #define SVRR_MDM 0x04 | ||
| 251 | |||
| 252 | #define ST_OVERRUN 0x01 | ||
| 253 | #define ST_FRAMING 0x02 | ||
| 254 | #define ST_PARITY 0x04 | ||
| 255 | #define ST_BREAK 0x08 | ||
| 256 | #define ST_SCHAR1 0x10 | ||
| 257 | #define ST_SCHAR2 0x20 | ||
| 258 | #define ST_SCHAR3 0x30 | ||
| 259 | #define ST_SCHAR4 0x40 | ||
| 260 | #define ST_RANGE 0x70 | ||
| 261 | #define ST_SCHARMASK 0x70 | ||
| 262 | #define ST_TIMEOUT 0x80 | ||
| 263 | |||
| 264 | #define MISR_DCD 0x80 | ||
| 265 | #define MISR_CTS 0x40 | ||
| 266 | #define MISR_RI 0x20 | ||
| 267 | #define MISR_DSR 0x10 | ||
| 268 | |||
| 269 | /*****************************************************************************/ | ||
| 270 | |||
| 271 | /* | ||
| 272 | * Defines for the CCSR status register. | ||
| 273 | */ | ||
| 274 | #define CCSR_RXENABLED 0x80 | ||
| 275 | #define CCSR_RXFLOWON 0x40 | ||
| 276 | #define CCSR_RXFLOWOFF 0x20 | ||
| 277 | #define CCSR_TXENABLED 0x08 | ||
| 278 | #define CCSR_TXFLOWON 0x04 | ||
| 279 | #define CCSR_TXFLOWOFF 0x02 | ||
| 280 | |||
| 281 | /*****************************************************************************/ | ||
| 282 | |||
| 283 | /* | ||
| 284 | * Define the embedded commands. | ||
| 285 | */ | ||
| 286 | #define ETC_CMD 0x00 | ||
| 287 | #define ETC_STARTBREAK 0x81 | ||
| 288 | #define ETC_DELAY 0x82 | ||
| 289 | #define ETC_STOPBREAK 0x83 | ||
| 290 | |||
| 291 | /*****************************************************************************/ | ||
| 292 | #endif | ||
diff --git a/include/linux/cdk.h b/include/linux/cdk.h deleted file mode 100644 index 80093a8d4f64..000000000000 --- a/include/linux/cdk.h +++ /dev/null | |||
| @@ -1,486 +0,0 @@ | |||
| 1 | /*****************************************************************************/ | ||
| 2 | |||
| 3 | /* | ||
| 4 | * cdk.h -- CDK interface definitions. | ||
| 5 | * | ||
| 6 | * Copyright (C) 1996-1998 Stallion Technologies | ||
| 7 | * Copyright (C) 1994-1996 Greg Ungerer. | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License | ||
| 20 | * along with this program; if not, write to the Free Software | ||
| 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 22 | */ | ||
| 23 | |||
| 24 | /*****************************************************************************/ | ||
| 25 | #ifndef _CDK_H | ||
| 26 | #define _CDK_H | ||
| 27 | /*****************************************************************************/ | ||
| 28 | |||
| 29 | #pragma pack(2) | ||
| 30 | |||
| 31 | /* | ||
| 32 | * The following set of definitions is used to communicate with the | ||
| 33 | * shared memory interface of the Stallion intelligent multiport serial | ||
| 34 | * boards. The definitions in this file are taken directly from the | ||
| 35 | * document titled "Generic Stackable Interface, Downloader and | ||
| 36 | * Communications Development Kit". | ||
| 37 | */ | ||
| 38 | |||
| 39 | /* | ||
| 40 | * Define the set of important shared memory addresses. These are | ||
| 41 | * required to initialize the board and get things started. All of these | ||
| 42 | * addresses are relative to the start of the shared memory. | ||
| 43 | */ | ||
| 44 | #define CDK_SIGADDR 0x200 | ||
| 45 | #define CDK_FEATADDR 0x280 | ||
| 46 | #define CDK_CDKADDR 0x300 | ||
| 47 | #define CDK_RDYADDR 0x262 | ||
| 48 | |||
| 49 | #define CDK_ALIVEMARKER 13 | ||
| 50 | |||
| 51 | /* | ||
| 52 | * On hardware power up the ROMs located on the EasyConnection 8/64 will | ||
| 53 | * fill out the following signature information into shared memory. This | ||
| 54 | * way the host system can quickly determine that the board is present | ||
| 55 | * and is operational. | ||
| 56 | */ | ||
| 57 | typedef struct cdkecpsig { | ||
| 58 | unsigned long magic; | ||
| 59 | unsigned short romver; | ||
| 60 | unsigned short cputype; | ||
| 61 | unsigned char panelid[8]; | ||
| 62 | } cdkecpsig_t; | ||
| 63 | |||
| 64 | #define ECP_MAGIC 0x21504345 | ||
| 65 | |||
| 66 | /* | ||
| 67 | * On hardware power up the ROMs located on the ONboard, Stallion and | ||
| 68 | * Brumbys will fill out the following signature information into shared | ||
| 69 | * memory. This way the host system can quickly determine that the board | ||
| 70 | * is present and is operational. | ||
| 71 | */ | ||
| 72 | typedef struct cdkonbsig { | ||
| 73 | unsigned short magic0; | ||
| 74 | unsigned short magic1; | ||
| 75 | unsigned short magic2; | ||
| 76 | unsigned short magic3; | ||
| 77 | unsigned short romver; | ||
| 78 | unsigned short memoff; | ||
| 79 | unsigned short memseg; | ||
| 80 | unsigned short amask0; | ||
| 81 | unsigned short pic; | ||
| 82 | unsigned short status; | ||
| 83 | unsigned short btype; | ||
| 84 | unsigned short clkticks; | ||
| 85 | unsigned short clkspeed; | ||
| 86 | unsigned short amask1; | ||
| 87 | unsigned short amask2; | ||
| 88 | } cdkonbsig_t; | ||
| 89 | |||
| 90 | #define ONB_MAGIC0 0xf2a7 | ||
| 91 | #define ONB_MAGIC1 0xa149 | ||
| 92 | #define ONB_MAGIC2 0x6352 | ||
| 93 | #define ONB_MAGIC3 0xf121 | ||
| 94 | |||
| 95 | /* | ||
| 96 | * Define the feature area structure. The feature area is the set of | ||
| 97 | * startup parameters used by the slave image when it starts executing. | ||
| 98 | * They allow for the specification of buffer sizes, debug trace, etc. | ||
| 99 | */ | ||
| 100 | typedef struct cdkfeature { | ||
| 101 | unsigned long debug; | ||
| 102 | unsigned long banner; | ||
| 103 | unsigned long etype; | ||
| 104 | unsigned long nrdevs; | ||
| 105 | unsigned long brdspec; | ||
| 106 | unsigned long txrqsize; | ||
| 107 | unsigned long rxrqsize; | ||
| 108 | unsigned long flags; | ||
| 109 | } cdkfeature_t; | ||
| 110 | |||
| 111 | #define ETYP_DDK 0 | ||
| 112 | #define ETYP_CDK 1 | ||
| 113 | |||
| 114 | /* | ||
| 115 | * Define the CDK header structure. This is the info that the slave | ||
| 116 | * environment sets up after it has been downloaded and started. It | ||
| 117 | * essentially provides a memory map for the shared memory interface. | ||
| 118 | */ | ||
| 119 | typedef struct cdkhdr { | ||
| 120 | unsigned short command; | ||
| 121 | unsigned short status; | ||
| 122 | unsigned short port; | ||
| 123 | unsigned short mode; | ||
| 124 | unsigned long cmd_buf[14]; | ||
| 125 | unsigned short alive_cnt; | ||
| 126 | unsigned short intrpt_mode; | ||
| 127 | unsigned char intrpt_id[8]; | ||
| 128 | unsigned char ver_release; | ||
| 129 | unsigned char ver_modification; | ||
| 130 | unsigned char ver_fix; | ||
| 131 | unsigned char deadman_restart; | ||
| 132 | unsigned short deadman; | ||
| 133 | unsigned short nrdevs; | ||
| 134 | unsigned long memp; | ||
| 135 | unsigned long hostp; | ||
| 136 | unsigned long slavep; | ||
| 137 | unsigned char hostreq; | ||
| 138 | unsigned char slavereq; | ||
| 139 | unsigned char cmd_reserved[30]; | ||
| 140 | } cdkhdr_t; | ||
| 141 | |||
| 142 | #define MODE_DDK 0 | ||
| 143 | #define MODE_CDK 1 | ||
| 144 | |||
| 145 | #define IMD_INTR 0x0 | ||
| 146 | #define IMD_PPINTR 0x1 | ||
| 147 | #define IMD_POLL 0xff | ||
| 148 | |||
| 149 | /* | ||
| 150 | * Define the memory mapping structure. This structure is pointed to by | ||
| 151 | * the memp field in the stlcdkhdr struct. As many as these structures | ||
| 152 | * as required are laid out in shared memory to define how the rest of | ||
| 153 | * shared memory is divided up. There will be one for each port. | ||
| 154 | */ | ||
| 155 | typedef struct cdkmem { | ||
| 156 | unsigned short dtype; | ||
| 157 | unsigned long offset; | ||
| 158 | } cdkmem_t; | ||
| 159 | |||
| 160 | #define TYP_UNDEFINED 0x0 | ||
| 161 | #define TYP_ASYNCTRL 0x1 | ||
| 162 | #define TYP_ASYNC 0x20 | ||
| 163 | #define TYP_PARALLEL 0x40 | ||
| 164 | #define TYP_SYNCX21 0x60 | ||
| 165 | |||
| 166 | /*****************************************************************************/ | ||
| 167 | |||
| 168 | /* | ||
| 169 | * Following is a set of defines and structures used to actually deal | ||
| 170 | * with the serial ports on the board. Firstly is the set of commands | ||
| 171 | * that can be applied to ports. | ||
| 172 | */ | ||
| 173 | #define ASYCMD (((unsigned long) 'a') << 8) | ||
| 174 | |||
| 175 | #define A_NULL (ASYCMD | 0) | ||
| 176 | #define A_FLUSH (ASYCMD | 1) | ||
| 177 | #define A_BREAK (ASYCMD | 2) | ||
| 178 | #define A_GETPORT (ASYCMD | 3) | ||
| 179 | #define A_SETPORT (ASYCMD | 4) | ||
| 180 | #define A_SETPORTF (ASYCMD | 5) | ||
| 181 | #define A_SETPORTFTX (ASYCMD | 6) | ||
| 182 | #define A_SETPORTFRX (ASYCMD | 7) | ||
| 183 | #define A_GETSIGNALS (ASYCMD | 8) | ||
| 184 | #define A_SETSIGNALS (ASYCMD | 9) | ||
| 185 | #define A_SETSIGNALSF (ASYCMD | 10) | ||
| 186 | #define A_SETSIGNALSFTX (ASYCMD | 11) | ||
| 187 | #define A_SETSIGNALSFRX (ASYCMD | 12) | ||
| 188 | #define A_GETNOTIFY (ASYCMD | 13) | ||
| 189 | #define A_SETNOTIFY (ASYCMD | 14) | ||
| 190 | #define A_NOTIFY (ASYCMD | 15) | ||
| 191 | #define A_PORTCTRL (ASYCMD | 16) | ||
| 192 | #define A_GETSTATS (ASYCMD | 17) | ||
| 193 | #define A_RQSTATE (ASYCMD | 18) | ||
| 194 | #define A_FLOWSTATE (ASYCMD | 19) | ||
| 195 | #define A_CLEARSTATS (ASYCMD | 20) | ||
| 196 | |||
| 197 | /* | ||
| 198 | * Define those arguments used for simple commands. | ||
| 199 | */ | ||
| 200 | #define FLUSHRX 0x1 | ||
| 201 | #define FLUSHTX 0x2 | ||
| 202 | |||
| 203 | #define BREAKON -1 | ||
| 204 | #define BREAKOFF -2 | ||
| 205 | |||
| 206 | /* | ||
| 207 | * Define the port setting structure, and all those defines that go along | ||
| 208 | * with it. Basically this structure defines the characteristics of this | ||
| 209 | * port: baud rate, chars, parity, input/output char cooking etc. | ||
| 210 | */ | ||
| 211 | typedef struct asyport { | ||
| 212 | unsigned long baudout; | ||
| 213 | unsigned long baudin; | ||
| 214 | unsigned long iflag; | ||
| 215 | unsigned long oflag; | ||
| 216 | unsigned long lflag; | ||
| 217 | unsigned long pflag; | ||
| 218 | unsigned long flow; | ||
| 219 | unsigned long spare1; | ||
| 220 | unsigned short vtime; | ||
| 221 | unsigned short vmin; | ||
| 222 | unsigned short txlo; | ||
| 223 | unsigned short txhi; | ||
| 224 | unsigned short rxlo; | ||
| 225 | unsigned short rxhi; | ||
| 226 | unsigned short rxhog; | ||
| 227 | unsigned short spare2; | ||
| 228 | unsigned char csize; | ||
| 229 | unsigned char stopbs; | ||
| 230 | unsigned char parity; | ||
| 231 | unsigned char stopin; | ||
| 232 | unsigned char startin; | ||
| 233 | unsigned char stopout; | ||
| 234 | unsigned char startout; | ||
| 235 | unsigned char parmark; | ||
| 236 | unsigned char brkmark; | ||
| 237 | unsigned char cc[11]; | ||
| 238 | } asyport_t; | ||
| 239 | |||
| 240 | #define PT_STOP1 0x0 | ||
| 241 | #define PT_STOP15 0x1 | ||
| 242 | #define PT_STOP2 0x2 | ||
| 243 | |||
| 244 | #define PT_NOPARITY 0x0 | ||
| 245 | #define PT_ODDPARITY 0x1 | ||
| 246 | #define PT_EVENPARITY 0x2 | ||
| 247 | #define PT_MARKPARITY 0x3 | ||
| 248 | #define PT_SPACEPARITY 0x4 | ||
| 249 | |||
| 250 | #define F_NONE 0x0 | ||
| 251 | #define F_IXON 0x1 | ||
| 252 | #define F_IXOFF 0x2 | ||
| 253 | #define F_IXANY 0x4 | ||
| 254 | #define F_IOXANY 0x8 | ||
| 255 | #define F_RTSFLOW 0x10 | ||
| 256 | #define F_CTSFLOW 0x20 | ||
| 257 | #define F_DTRFLOW 0x40 | ||
| 258 | #define F_DCDFLOW 0x80 | ||
| 259 | #define F_DSROFLOW 0x100 | ||
| 260 | #define F_DSRIFLOW 0x200 | ||
| 261 | |||
| 262 | #define FI_NORX 0x1 | ||
| 263 | #define FI_RAW 0x2 | ||
| 264 | #define FI_ISTRIP 0x4 | ||
| 265 | #define FI_UCLC 0x8 | ||
| 266 | #define FI_INLCR 0x10 | ||
| 267 | #define FI_ICRNL 0x20 | ||
| 268 | #define FI_IGNCR 0x40 | ||
| 269 | #define FI_IGNBREAK 0x80 | ||
| 270 | #define FI_DSCRDBREAK 0x100 | ||
| 271 | #define FI_1MARKBREAK 0x200 | ||
| 272 | #define FI_2MARKBREAK 0x400 | ||
| 273 | #define FI_XCHNGBREAK 0x800 | ||
| 274 | #define FI_IGNRXERRS 0x1000 | ||
| 275 | #define FI_DSCDRXERRS 0x2000 | ||
| 276 | #define FI_1MARKRXERRS 0x4000 | ||
| 277 | #define FI_2MARKRXERRS 0x8000 | ||
| 278 | #define FI_XCHNGRXERRS 0x10000 | ||
| 279 | #define FI_DSCRDNULL 0x20000 | ||
| 280 | |||
| 281 | #define FO_OLCUC 0x1 | ||
| 282 | #define FO_ONLCR 0x2 | ||
| 283 | #define FO_OOCRNL 0x4 | ||
| 284 | #define FO_ONOCR 0x8 | ||
| 285 | #define FO_ONLRET 0x10 | ||
| 286 | #define FO_ONL 0x20 | ||
| 287 | #define FO_OBS 0x40 | ||
| 288 | #define FO_OVT 0x80 | ||
| 289 | #define FO_OFF 0x100 | ||
| 290 | #define FO_OTAB1 0x200 | ||
| 291 | #define FO_OTAB2 0x400 | ||
| 292 | #define FO_OTAB3 0x800 | ||
| 293 | #define FO_OCR1 0x1000 | ||
| 294 | #define FO_OCR2 0x2000 | ||
| 295 | #define FO_OCR3 0x4000 | ||
| 296 | #define FO_OFILL 0x8000 | ||
| 297 | #define FO_ODELL 0x10000 | ||
| 298 | |||
| 299 | #define P_RTSLOCK 0x1 | ||
| 300 | #define P_CTSLOCK 0x2 | ||
| 301 | #define P_MAPRTS 0x4 | ||
| 302 | #define P_MAPCTS 0x8 | ||
| 303 | #define P_LOOPBACK 0x10 | ||
| 304 | #define P_DTRFOLLOW 0x20 | ||
| 305 | #define P_FAKEDCD 0x40 | ||
| 306 | |||
| 307 | #define P_RXIMIN 0x10000 | ||
| 308 | #define P_RXITIME 0x20000 | ||
| 309 | #define P_RXTHOLD 0x40000 | ||
| 310 | |||
| 311 | /* | ||
| 312 | * Define a structure to communicate serial port signal and data state | ||
| 313 | * information. | ||
| 314 | */ | ||
| 315 | typedef struct asysigs { | ||
| 316 | unsigned long data; | ||
| 317 | unsigned long signal; | ||
| 318 | unsigned long sigvalue; | ||
| 319 | } asysigs_t; | ||
| 320 | |||
| 321 | #define DT_TXBUSY 0x1 | ||
| 322 | #define DT_TXEMPTY 0x2 | ||
| 323 | #define DT_TXLOW 0x4 | ||
| 324 | #define DT_TXHIGH 0x8 | ||
| 325 | #define DT_TXFULL 0x10 | ||
| 326 | #define DT_TXHOG 0x20 | ||
| 327 | #define DT_TXFLOWED 0x40 | ||
| 328 | #define DT_TXBREAK 0x80 | ||
| 329 | |||
| 330 | #define DT_RXBUSY 0x100 | ||
| 331 | #define DT_RXEMPTY 0x200 | ||
| 332 | #define DT_RXLOW 0x400 | ||
| 333 | #define DT_RXHIGH 0x800 | ||
| 334 | #define DT_RXFULL 0x1000 | ||
| 335 | #define DT_RXHOG 0x2000 | ||
| 336 | #define DT_RXFLOWED 0x4000 | ||
| 337 | #define DT_RXBREAK 0x8000 | ||
| 338 | |||
| 339 | #define SG_DTR 0x1 | ||
| 340 | #define SG_DCD 0x2 | ||
| 341 | #define SG_RTS 0x4 | ||
| 342 | #define SG_CTS 0x8 | ||
| 343 | #define SG_DSR 0x10 | ||
| 344 | #define SG_RI 0x20 | ||
| 345 | |||
| 346 | /* | ||
| 347 | * Define the notification setting structure. This is used to tell the | ||
| 348 | * port what events we want to be informed about. Fields here use the | ||
| 349 | * same defines as for the asysigs structure above. | ||
| 350 | */ | ||
| 351 | typedef struct asynotify { | ||
| 352 | unsigned long ctrl; | ||
| 353 | unsigned long data; | ||
| 354 | unsigned long signal; | ||
| 355 | unsigned long sigvalue; | ||
| 356 | } asynotify_t; | ||
| 357 | |||
| 358 | /* | ||
| 359 | * Define the port control structure. It is used to do fine grain | ||
| 360 | * control operations on the port. | ||
| 361 | */ | ||
| 362 | typedef struct { | ||
| 363 | unsigned long rxctrl; | ||
| 364 | unsigned long txctrl; | ||
| 365 | char rximdch; | ||
| 366 | char tximdch; | ||
| 367 | char spare1; | ||
| 368 | char spare2; | ||
| 369 | } asyctrl_t; | ||
| 370 | |||
| 371 | #define CT_ENABLE 0x1 | ||
| 372 | #define CT_DISABLE 0x2 | ||
| 373 | #define CT_STOP 0x4 | ||
| 374 | #define CT_START 0x8 | ||
| 375 | #define CT_STARTFLOW 0x10 | ||
| 376 | #define CT_STOPFLOW 0x20 | ||
| 377 | #define CT_SENDCHR 0x40 | ||
| 378 | |||
| 379 | /* | ||
| 380 | * Define the stats structure kept for each port. This is a useful set | ||
| 381 | * of data collected for each port on the slave. The A_GETSTATS command | ||
| 382 | * is used to retrieve this data from the slave. | ||
| 383 | */ | ||
| 384 | typedef struct asystats { | ||
| 385 | unsigned long opens; | ||
| 386 | unsigned long txchars; | ||
| 387 | unsigned long rxchars; | ||
| 388 | unsigned long txringq; | ||
| 389 | unsigned long rxringq; | ||
| 390 | unsigned long txmsgs; | ||
| 391 | unsigned long rxmsgs; | ||
| 392 | unsigned long txflushes; | ||
| 393 | unsigned long rxflushes; | ||
| 394 | unsigned long overruns; | ||
| 395 | unsigned long framing; | ||
| 396 | unsigned long parity; | ||
| 397 | unsigned long ringover; | ||
| 398 | unsigned long lost; | ||
| 399 | unsigned long rxstart; | ||
| 400 | unsigned long rxstop; | ||
| 401 | unsigned long txstart; | ||
| 402 | unsigned long txstop; | ||
| 403 | unsigned long dcdcnt; | ||
| 404 | unsigned long dtrcnt; | ||
| 405 | unsigned long ctscnt; | ||
| 406 | unsigned long rtscnt; | ||
| 407 | unsigned long dsrcnt; | ||
| 408 | unsigned long ricnt; | ||
| 409 | unsigned long txbreaks; | ||
| 410 | unsigned long rxbreaks; | ||
| 411 | unsigned long signals; | ||
| 412 | unsigned long state; | ||
| 413 | unsigned long hwid; | ||
| 414 | } asystats_t; | ||
| 415 | |||
| 416 | /*****************************************************************************/ | ||
| 417 | |||
| 418 | /* | ||
| 419 | * All command and control communication with a device on the slave is | ||
| 420 | * via a control block in shared memory. Each device has its own control | ||
| 421 | * block, defined by the following structure. The control block allows | ||
| 422 | * the host to open, close and control the device on the slave. | ||
| 423 | */ | ||
| 424 | typedef struct cdkctrl { | ||
| 425 | unsigned char open; | ||
| 426 | unsigned char close; | ||
| 427 | unsigned long openarg; | ||
| 428 | unsigned long closearg; | ||
| 429 | unsigned long cmd; | ||
| 430 | unsigned long status; | ||
| 431 | unsigned long args[32]; | ||
| 432 | } cdkctrl_t; | ||
| 433 | |||
| 434 | /* | ||
| 435 | * Each device on the slave passes data to and from the host via a ring | ||
| 436 | * queue in shared memory. Define a ring queue structure to hold the | ||
| 437 | * vital information about each ring queue. Two ring queues will be | ||
| 438 | * allocated for each port, one for receive data and one for transmit | ||
| 439 | * data. | ||
| 440 | */ | ||
| 441 | typedef struct cdkasyrq { | ||
| 442 | unsigned long offset; | ||
| 443 | unsigned short size; | ||
| 444 | unsigned short head; | ||
| 445 | unsigned short tail; | ||
| 446 | } cdkasyrq_t; | ||
| 447 | |||
| 448 | /* | ||
| 449 | * Each asynchronous port is defined in shared memory by the following | ||
| 450 | * structure. It contains a control block to command a device, and also | ||
| 451 | * the necessary data channel information as well. | ||
| 452 | */ | ||
| 453 | typedef struct cdkasy { | ||
| 454 | cdkctrl_t ctrl; | ||
| 455 | unsigned short notify; | ||
| 456 | asynotify_t changed; | ||
| 457 | unsigned short receive; | ||
| 458 | cdkasyrq_t rxq; | ||
| 459 | unsigned short transmit; | ||
| 460 | cdkasyrq_t txq; | ||
| 461 | } cdkasy_t; | ||
| 462 | |||
| 463 | #pragma pack() | ||
| 464 | |||
| 465 | /*****************************************************************************/ | ||
| 466 | |||
| 467 | /* | ||
| 468 | * Define the set of ioctls used by the driver to do special things | ||
| 469 | * to the board. These include interrupting it, and initializing | ||
| 470 | * the driver after board startup and shutdown. | ||
| 471 | */ | ||
| 472 | #include <linux/ioctl.h> | ||
| 473 | |||
| 474 | #define STL_BINTR _IO('s',20) | ||
| 475 | #define STL_BSTART _IO('s',21) | ||
| 476 | #define STL_BSTOP _IO('s',22) | ||
| 477 | #define STL_BRESET _IO('s',23) | ||
| 478 | |||
| 479 | /* | ||
| 480 | * Define a set of ioctl extensions, used to get at special stuff. | ||
| 481 | */ | ||
| 482 | #define STL_GETPFLAG _IO('s',80) | ||
| 483 | #define STL_SETPFLAG _IO('s',81) | ||
| 484 | |||
| 485 | /*****************************************************************************/ | ||
| 486 | #endif | ||
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 77335fac943e..c12731582920 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #define CLK_IGNORE_UNUSED BIT(3) /* do not gate even if unused */ | 26 | #define CLK_IGNORE_UNUSED BIT(3) /* do not gate even if unused */ |
| 27 | #define CLK_IS_ROOT BIT(4) /* root clk, has no parent */ | 27 | #define CLK_IS_ROOT BIT(4) /* root clk, has no parent */ |
| 28 | #define CLK_IS_BASIC BIT(5) /* Basic clk, can't do a to_clk_foo() */ | 28 | #define CLK_IS_BASIC BIT(5) /* Basic clk, can't do a to_clk_foo() */ |
| 29 | #define CLK_GET_RATE_NOCACHE BIT(6) /* do not use the cached clk rate */ | ||
| 29 | 30 | ||
| 30 | struct clk_hw; | 31 | struct clk_hw; |
| 31 | 32 | ||
| @@ -360,6 +361,11 @@ int of_clk_add_provider(struct device_node *np, | |||
| 360 | void of_clk_del_provider(struct device_node *np); | 361 | void of_clk_del_provider(struct device_node *np); |
| 361 | struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec, | 362 | struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec, |
| 362 | void *data); | 363 | void *data); |
| 364 | struct clk_onecell_data { | ||
| 365 | struct clk **clks; | ||
| 366 | unsigned int clk_num; | ||
| 367 | }; | ||
| 368 | struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data); | ||
| 363 | const char *of_clk_get_parent_name(struct device_node *np, int index); | 369 | const char *of_clk_get_parent_name(struct device_node *np, int index); |
| 364 | void of_clk_init(const struct of_device_id *matches); | 370 | void of_clk_init(const struct of_device_id *matches); |
| 365 | 371 | ||
diff --git a/include/linux/clk/bcm2835.h b/include/linux/clk/bcm2835.h new file mode 100644 index 000000000000..aa937f6c17da --- /dev/null +++ b/include/linux/clk/bcm2835.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Broadcom | ||
| 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 | |||
| 19 | #ifndef __LINUX_CLK_BCM2835_H_ | ||
| 20 | #define __LINUX_CLK_BCM2835_H_ | ||
| 21 | |||
| 22 | void __init bcm2835_init_clocks(void); | ||
| 23 | |||
| 24 | #endif | ||
diff --git a/include/linux/compaction.h b/include/linux/compaction.h index 133ddcf83397..ef658147e4e8 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h | |||
| @@ -22,7 +22,7 @@ extern int sysctl_extfrag_handler(struct ctl_table *table, int write, | |||
| 22 | extern int fragmentation_index(struct zone *zone, unsigned int order); | 22 | extern int fragmentation_index(struct zone *zone, unsigned int order); |
| 23 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, | 23 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, |
| 24 | int order, gfp_t gfp_mask, nodemask_t *mask, | 24 | int order, gfp_t gfp_mask, nodemask_t *mask, |
| 25 | bool sync); | 25 | bool sync, bool *contended); |
| 26 | extern int compact_pgdat(pg_data_t *pgdat, int order); | 26 | extern int compact_pgdat(pg_data_t *pgdat, int order); |
| 27 | extern unsigned long compaction_suitable(struct zone *zone, int order); | 27 | extern unsigned long compaction_suitable(struct zone *zone, int order); |
| 28 | 28 | ||
| @@ -64,7 +64,7 @@ static inline bool compaction_deferred(struct zone *zone, int order) | |||
| 64 | #else | 64 | #else |
| 65 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, | 65 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, |
| 66 | int order, gfp_t gfp_mask, nodemask_t *nodemask, | 66 | int order, gfp_t gfp_mask, nodemask_t *nodemask, |
| 67 | bool sync) | 67 | bool sync, bool *contended) |
| 68 | { | 68 | { |
| 69 | return COMPACT_CONTINUE; | 69 | return COMPACT_CONTINUE; |
| 70 | } | 70 | } |
diff --git a/include/linux/comstats.h b/include/linux/comstats.h deleted file mode 100644 index 3f5ea8e8026d..000000000000 --- a/include/linux/comstats.h +++ /dev/null | |||
| @@ -1,119 +0,0 @@ | |||
| 1 | /*****************************************************************************/ | ||
| 2 | |||
| 3 | /* | ||
| 4 | * comstats.h -- Serial Port Stats. | ||
| 5 | * | ||
| 6 | * Copyright (C) 1996-1998 Stallion Technologies | ||
| 7 | * Copyright (C) 1994-1996 Greg Ungerer. | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License | ||
| 20 | * along with this program; if not, write to the Free Software | ||
| 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 22 | */ | ||
| 23 | |||
| 24 | /*****************************************************************************/ | ||
| 25 | #ifndef _COMSTATS_H | ||
| 26 | #define _COMSTATS_H | ||
| 27 | /*****************************************************************************/ | ||
| 28 | |||
| 29 | /* | ||
| 30 | * Serial port stats structure. The structure itself is UART | ||
| 31 | * independent, but some fields may be UART/driver specific (for | ||
| 32 | * example state). | ||
| 33 | */ | ||
| 34 | |||
| 35 | typedef struct { | ||
| 36 | unsigned long brd; | ||
| 37 | unsigned long panel; | ||
| 38 | unsigned long port; | ||
| 39 | unsigned long hwid; | ||
| 40 | unsigned long type; | ||
| 41 | unsigned long txtotal; | ||
| 42 | unsigned long rxtotal; | ||
| 43 | unsigned long txbuffered; | ||
| 44 | unsigned long rxbuffered; | ||
| 45 | unsigned long rxoverrun; | ||
| 46 | unsigned long rxparity; | ||
| 47 | unsigned long rxframing; | ||
| 48 | unsigned long rxlost; | ||
| 49 | unsigned long txbreaks; | ||
| 50 | unsigned long rxbreaks; | ||
| 51 | unsigned long txxon; | ||
| 52 | unsigned long txxoff; | ||
| 53 | unsigned long rxxon; | ||
| 54 | unsigned long rxxoff; | ||
| 55 | unsigned long txctson; | ||
| 56 | unsigned long txctsoff; | ||
| 57 | unsigned long rxrtson; | ||
| 58 | unsigned long rxrtsoff; | ||
| 59 | unsigned long modem; | ||
| 60 | unsigned long state; | ||
| 61 | unsigned long flags; | ||
| 62 | unsigned long ttystate; | ||
| 63 | unsigned long cflags; | ||
| 64 | unsigned long iflags; | ||
| 65 | unsigned long oflags; | ||
| 66 | unsigned long lflags; | ||
| 67 | unsigned long signals; | ||
| 68 | } comstats_t; | ||
| 69 | |||
| 70 | |||
| 71 | /* | ||
| 72 | * Board stats structure. Returns useful info about the board. | ||
| 73 | */ | ||
| 74 | |||
| 75 | #define COM_MAXPANELS 8 | ||
| 76 | |||
| 77 | typedef struct { | ||
| 78 | unsigned long panel; | ||
| 79 | unsigned long type; | ||
| 80 | unsigned long hwid; | ||
| 81 | unsigned long nrports; | ||
| 82 | } companel_t; | ||
| 83 | |||
| 84 | typedef struct { | ||
| 85 | unsigned long brd; | ||
| 86 | unsigned long type; | ||
| 87 | unsigned long hwid; | ||
| 88 | unsigned long state; | ||
| 89 | unsigned long ioaddr; | ||
| 90 | unsigned long ioaddr2; | ||
| 91 | unsigned long memaddr; | ||
| 92 | unsigned long irq; | ||
| 93 | unsigned long nrpanels; | ||
| 94 | unsigned long nrports; | ||
| 95 | companel_t panels[COM_MAXPANELS]; | ||
| 96 | } combrd_t; | ||
| 97 | |||
| 98 | |||
| 99 | /* | ||
| 100 | * Define the ioctl operations for stats stuff. | ||
| 101 | */ | ||
| 102 | #include <linux/ioctl.h> | ||
| 103 | |||
| 104 | #define COM_GETPORTSTATS _IO('c',30) | ||
| 105 | #define COM_CLRPORTSTATS _IO('c',31) | ||
| 106 | #define COM_GETBRDSTATS _IO('c',32) | ||
| 107 | |||
| 108 | |||
| 109 | /* | ||
| 110 | * Define the set of ioctls that give user level access to the | ||
| 111 | * private port, panel and board structures. The argument required | ||
| 112 | * will be driver dependent! | ||
| 113 | */ | ||
| 114 | #define COM_READPORT _IO('c',40) | ||
| 115 | #define COM_READBOARD _IO('c',41) | ||
| 116 | #define COM_READPANEL _IO('c',42) | ||
| 117 | |||
| 118 | /*****************************************************************************/ | ||
| 119 | #endif | ||
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 040b13b5c14a..279b1eaa8b73 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
| @@ -194,6 +194,10 @@ static inline int cpuidle_play_dead(void) {return -ENODEV; } | |||
| 194 | 194 | ||
| 195 | #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED | 195 | #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED |
| 196 | void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a); | 196 | void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a); |
| 197 | #else | ||
| 198 | static inline void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a) | ||
| 199 | { | ||
| 200 | } | ||
| 197 | #endif | 201 | #endif |
| 198 | 202 | ||
| 199 | /****************************** | 203 | /****************************** |
diff --git a/include/linux/efi.h b/include/linux/efi.h index 103adc6d7e3a..ec45ccd8708a 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -503,6 +503,8 @@ extern u64 efi_mem_attribute (unsigned long phys_addr, unsigned long size); | |||
| 503 | extern int __init efi_uart_console_only (void); | 503 | extern int __init efi_uart_console_only (void); |
| 504 | extern void efi_initialize_iomem_resources(struct resource *code_resource, | 504 | extern void efi_initialize_iomem_resources(struct resource *code_resource, |
| 505 | struct resource *data_resource, struct resource *bss_resource); | 505 | struct resource *data_resource, struct resource *bss_resource); |
| 506 | extern unsigned long efi_get_time(void); | ||
| 507 | extern int efi_set_rtc_mmss(unsigned long nowtime); | ||
| 506 | extern void efi_reserve_boot_services(void); | 508 | extern void efi_reserve_boot_services(void); |
| 507 | extern struct efi_memory_map memmap; | 509 | extern struct efi_memory_map memmap; |
| 508 | 510 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 38dba16c4176..aa110476a95b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -1491,7 +1491,6 @@ struct sb_writers { | |||
| 1491 | struct super_block { | 1491 | struct super_block { |
| 1492 | struct list_head s_list; /* Keep this first */ | 1492 | struct list_head s_list; /* Keep this first */ |
| 1493 | dev_t s_dev; /* search index; _not_ kdev_t */ | 1493 | dev_t s_dev; /* search index; _not_ kdev_t */ |
| 1494 | unsigned char s_dirt; | ||
| 1495 | unsigned char s_blocksize_bits; | 1494 | unsigned char s_blocksize_bits; |
| 1496 | unsigned long s_blocksize; | 1495 | unsigned long s_blocksize; |
| 1497 | loff_t s_maxbytes; /* Max file size */ | 1496 | loff_t s_maxbytes; /* Max file size */ |
| @@ -1861,7 +1860,6 @@ struct super_operations { | |||
| 1861 | int (*drop_inode) (struct inode *); | 1860 | int (*drop_inode) (struct inode *); |
| 1862 | void (*evict_inode) (struct inode *); | 1861 | void (*evict_inode) (struct inode *); |
| 1863 | void (*put_super) (struct super_block *); | 1862 | void (*put_super) (struct super_block *); |
| 1864 | void (*write_super) (struct super_block *); | ||
| 1865 | int (*sync_fs)(struct super_block *sb, int wait); | 1863 | int (*sync_fs)(struct super_block *sb, int wait); |
| 1866 | int (*freeze_fs) (struct super_block *); | 1864 | int (*freeze_fs) (struct super_block *); |
| 1867 | int (*unfreeze_fs) (struct super_block *); | 1865 | int (*unfreeze_fs) (struct super_block *); |
| @@ -2397,7 +2395,6 @@ extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end, | |||
| 2397 | int datasync); | 2395 | int datasync); |
| 2398 | extern int vfs_fsync(struct file *file, int datasync); | 2396 | extern int vfs_fsync(struct file *file, int datasync); |
| 2399 | extern int generic_write_sync(struct file *file, loff_t pos, loff_t count); | 2397 | extern int generic_write_sync(struct file *file, loff_t pos, loff_t count); |
| 2400 | extern void sync_supers(void); | ||
| 2401 | extern void emergency_sync(void); | 2398 | extern void emergency_sync(void); |
| 2402 | extern void emergency_remount(void); | 2399 | extern void emergency_remount(void); |
| 2403 | #ifdef CONFIG_BLOCK | 2400 | #ifdef CONFIG_BLOCK |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index af961d6f7ab1..642928cf57b4 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
| @@ -306,9 +306,10 @@ extern void *perf_trace_buf_prepare(int size, unsigned short type, | |||
| 306 | 306 | ||
| 307 | static inline void | 307 | static inline void |
| 308 | perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr, | 308 | perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr, |
| 309 | u64 count, struct pt_regs *regs, void *head) | 309 | u64 count, struct pt_regs *regs, void *head, |
| 310 | struct task_struct *task) | ||
| 310 | { | 311 | { |
| 311 | perf_tp_event(addr, count, raw_data, size, regs, head, rctx); | 312 | perf_tp_event(addr, count, raw_data, size, regs, head, rctx, task); |
| 312 | } | 313 | } |
| 313 | #endif | 314 | #endif |
| 314 | 315 | ||
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 9303348965fb..d8c713e148e3 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
| @@ -57,6 +57,9 @@ | |||
| 57 | * | 57 | * |
| 58 | * 7.19 | 58 | * 7.19 |
| 59 | * - add FUSE_FALLOCATE | 59 | * - add FUSE_FALLOCATE |
| 60 | * | ||
| 61 | * 7.20 | ||
| 62 | * - add FUSE_AUTO_INVAL_DATA | ||
| 60 | */ | 63 | */ |
| 61 | 64 | ||
| 62 | #ifndef _LINUX_FUSE_H | 65 | #ifndef _LINUX_FUSE_H |
| @@ -88,7 +91,7 @@ | |||
| 88 | #define FUSE_KERNEL_VERSION 7 | 91 | #define FUSE_KERNEL_VERSION 7 |
| 89 | 92 | ||
| 90 | /** Minor version number of this interface */ | 93 | /** Minor version number of this interface */ |
| 91 | #define FUSE_KERNEL_MINOR_VERSION 19 | 94 | #define FUSE_KERNEL_MINOR_VERSION 20 |
| 92 | 95 | ||
| 93 | /** The node ID of the root inode */ | 96 | /** The node ID of the root inode */ |
| 94 | #define FUSE_ROOT_ID 1 | 97 | #define FUSE_ROOT_ID 1 |
| @@ -163,10 +166,19 @@ struct fuse_file_lock { | |||
| 163 | /** | 166 | /** |
| 164 | * INIT request/reply flags | 167 | * INIT request/reply flags |
| 165 | * | 168 | * |
| 169 | * FUSE_ASYNC_READ: asynchronous read requests | ||
| 166 | * FUSE_POSIX_LOCKS: remote locking for POSIX file locks | 170 | * FUSE_POSIX_LOCKS: remote locking for POSIX file locks |
| 171 | * FUSE_FILE_OPS: kernel sends file handle for fstat, etc... (not yet supported) | ||
| 172 | * FUSE_ATOMIC_O_TRUNC: handles the O_TRUNC open flag in the filesystem | ||
| 167 | * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".." | 173 | * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".." |
| 174 | * FUSE_BIG_WRITES: filesystem can handle write size larger than 4kB | ||
| 168 | * FUSE_DONT_MASK: don't apply umask to file mode on create operations | 175 | * FUSE_DONT_MASK: don't apply umask to file mode on create operations |
| 176 | * FUSE_SPLICE_WRITE: kernel supports splice write on the device | ||
| 177 | * FUSE_SPLICE_MOVE: kernel supports splice move on the device | ||
| 178 | * FUSE_SPLICE_READ: kernel supports splice read on the device | ||
| 169 | * FUSE_FLOCK_LOCKS: remote locking for BSD style file locks | 179 | * FUSE_FLOCK_LOCKS: remote locking for BSD style file locks |
| 180 | * FUSE_HAS_IOCTL_DIR: kernel supports ioctl on directories | ||
| 181 | * FUSE_AUTO_INVAL_DATA: automatically invalidate cached pages | ||
| 170 | */ | 182 | */ |
| 171 | #define FUSE_ASYNC_READ (1 << 0) | 183 | #define FUSE_ASYNC_READ (1 << 0) |
| 172 | #define FUSE_POSIX_LOCKS (1 << 1) | 184 | #define FUSE_POSIX_LOCKS (1 << 1) |
| @@ -175,7 +187,12 @@ struct fuse_file_lock { | |||
| 175 | #define FUSE_EXPORT_SUPPORT (1 << 4) | 187 | #define FUSE_EXPORT_SUPPORT (1 << 4) |
| 176 | #define FUSE_BIG_WRITES (1 << 5) | 188 | #define FUSE_BIG_WRITES (1 << 5) |
| 177 | #define FUSE_DONT_MASK (1 << 6) | 189 | #define FUSE_DONT_MASK (1 << 6) |
| 190 | #define FUSE_SPLICE_WRITE (1 << 7) | ||
| 191 | #define FUSE_SPLICE_MOVE (1 << 8) | ||
| 192 | #define FUSE_SPLICE_READ (1 << 9) | ||
| 178 | #define FUSE_FLOCK_LOCKS (1 << 10) | 193 | #define FUSE_FLOCK_LOCKS (1 << 10) |
| 194 | #define FUSE_HAS_IOCTL_DIR (1 << 11) | ||
| 195 | #define FUSE_AUTO_INVAL_DATA (1 << 12) | ||
| 179 | 196 | ||
| 180 | /** | 197 | /** |
| 181 | * CUSE INIT request/reply flags | 198 | * CUSE INIT request/reply flags |
diff --git a/include/linux/generic_serial.h b/include/linux/generic_serial.h deleted file mode 100644 index 79b3eb37243a..000000000000 --- a/include/linux/generic_serial.h +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * generic_serial.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 1998 R.E.Wolff@BitWizard.nl | ||
| 5 | * | ||
| 6 | * written for the SX serial driver. | ||
| 7 | * | ||
| 8 | * Version 0.1 -- December, 1998. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef GENERIC_SERIAL_H | ||
| 12 | #define GENERIC_SERIAL_H | ||
| 13 | |||
| 14 | #warning Use of this header is deprecated. | ||
| 15 | #warning Since nobody sets the constants defined here for you, you should not, in any case, use them. Including the header is thus pointless. | ||
| 16 | |||
| 17 | /* Flags */ | ||
| 18 | /* Warning: serial.h defines some ASYNC_ flags, they say they are "only" | ||
| 19 | used in serial.c, but they are also used in all other serial drivers. | ||
| 20 | Make sure they don't clash with these here... */ | ||
| 21 | #define GS_TX_INTEN 0x00800000 | ||
| 22 | #define GS_RX_INTEN 0x00400000 | ||
| 23 | #define GS_ACTIVE 0x00200000 | ||
| 24 | |||
| 25 | #define GS_TYPE_NORMAL 1 | ||
| 26 | |||
| 27 | #define GS_DEBUG_FLUSH 0x00000001 | ||
| 28 | #define GS_DEBUG_BTR 0x00000002 | ||
| 29 | #define GS_DEBUG_TERMIOS 0x00000004 | ||
| 30 | #define GS_DEBUG_STUFF 0x00000008 | ||
| 31 | #define GS_DEBUG_CLOSE 0x00000010 | ||
| 32 | #define GS_DEBUG_FLOW 0x00000020 | ||
| 33 | #define GS_DEBUG_WRITE 0x00000040 | ||
| 34 | |||
| 35 | #endif | ||
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index bb7f30971858..305f23cd7cff 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | * | 22 | * |
| 23 | * - bits 16-25 are the hardirq count (max # of nested hardirqs: 1024) | 23 | * - bits 16-25 are the hardirq count (max # of nested hardirqs: 1024) |
| 24 | * - bit 26 is the NMI_MASK | 24 | * - bit 26 is the NMI_MASK |
| 25 | * - bit 28 is the PREEMPT_ACTIVE flag | 25 | * - bit 27 is the PREEMPT_ACTIVE flag |
| 26 | * | 26 | * |
| 27 | * PREEMPT_MASK: 0x000000ff | 27 | * PREEMPT_MASK: 0x000000ff |
| 28 | * SOFTIRQ_MASK: 0x0000ff00 | 28 | * SOFTIRQ_MASK: 0x0000ff00 |
diff --git a/include/linux/i2c-pnx.h b/include/linux/i2c-pnx.h index 1bc74afe7a35..49ed17fdf055 100644 --- a/include/linux/i2c-pnx.h +++ b/include/linux/i2c-pnx.h | |||
| @@ -22,6 +22,7 @@ struct i2c_pnx_mif { | |||
| 22 | struct timer_list timer; /* Timeout */ | 22 | struct timer_list timer; /* Timeout */ |
| 23 | u8 * buf; /* Data buffer */ | 23 | u8 * buf; /* Data buffer */ |
| 24 | int len; /* Length of data buffer */ | 24 | int len; /* Length of data buffer */ |
| 25 | int order; /* RX Bytes to order via TX */ | ||
| 25 | }; | 26 | }; |
| 26 | 27 | ||
| 27 | struct i2c_pnx_algo_data { | 28 | struct i2c_pnx_algo_data { |
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 7ea898c55a60..a12a38107c1a 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
| @@ -561,9 +561,6 @@ struct twl4030_bci_platform_data { | |||
| 561 | 561 | ||
| 562 | /* TWL4030_GPIO_MAX (18) GPIOs, with interrupts */ | 562 | /* TWL4030_GPIO_MAX (18) GPIOs, with interrupts */ |
| 563 | struct twl4030_gpio_platform_data { | 563 | struct twl4030_gpio_platform_data { |
| 564 | int gpio_base; | ||
| 565 | unsigned irq_base, irq_end; | ||
| 566 | |||
| 567 | /* package the two LED signals as output-only GPIOs? */ | 564 | /* package the two LED signals as output-only GPIOs? */ |
| 568 | bool use_leds; | 565 | bool use_leds; |
| 569 | 566 | ||
diff --git a/include/linux/if_team.h b/include/linux/if_team.h index 6960fc1841a7..aa2e167e1ef4 100644 --- a/include/linux/if_team.h +++ b/include/linux/if_team.h | |||
| @@ -96,21 +96,6 @@ static inline void team_netpoll_send_skb(struct team_port *port, | |||
| 96 | } | 96 | } |
| 97 | #endif | 97 | #endif |
| 98 | 98 | ||
| 99 | static inline int team_dev_queue_xmit(struct team *team, struct team_port *port, | ||
| 100 | struct sk_buff *skb) | ||
| 101 | { | ||
| 102 | BUILD_BUG_ON(sizeof(skb->queue_mapping) != | ||
| 103 | sizeof(qdisc_skb_cb(skb)->slave_dev_queue_mapping)); | ||
| 104 | skb_set_queue_mapping(skb, qdisc_skb_cb(skb)->slave_dev_queue_mapping); | ||
| 105 | |||
| 106 | skb->dev = port->dev; | ||
| 107 | if (unlikely(netpoll_tx_running(port->dev))) { | ||
| 108 | team_netpoll_send_skb(port, skb); | ||
| 109 | return 0; | ||
| 110 | } | ||
| 111 | return dev_queue_xmit(skb); | ||
| 112 | } | ||
| 113 | |||
| 114 | struct team_mode_ops { | 99 | struct team_mode_ops { |
| 115 | int (*init)(struct team *team); | 100 | int (*init)(struct team *team); |
| 116 | void (*exit)(struct team *team); | 101 | void (*exit)(struct team *team); |
| @@ -200,6 +185,21 @@ struct team { | |||
| 200 | long mode_priv[TEAM_MODE_PRIV_LONGS]; | 185 | long mode_priv[TEAM_MODE_PRIV_LONGS]; |
| 201 | }; | 186 | }; |
| 202 | 187 | ||
| 188 | static inline int team_dev_queue_xmit(struct team *team, struct team_port *port, | ||
| 189 | struct sk_buff *skb) | ||
| 190 | { | ||
| 191 | BUILD_BUG_ON(sizeof(skb->queue_mapping) != | ||
| 192 | sizeof(qdisc_skb_cb(skb)->slave_dev_queue_mapping)); | ||
| 193 | skb_set_queue_mapping(skb, qdisc_skb_cb(skb)->slave_dev_queue_mapping); | ||
| 194 | |||
| 195 | skb->dev = port->dev; | ||
| 196 | if (unlikely(netpoll_tx_running(team->dev))) { | ||
| 197 | team_netpoll_send_skb(port, skb); | ||
| 198 | return 0; | ||
| 199 | } | ||
| 200 | return dev_queue_xmit(skb); | ||
| 201 | } | ||
| 202 | |||
| 203 | static inline struct hlist_head *team_port_index_hash(struct team *team, | 203 | static inline struct hlist_head *team_port_index_hash(struct team *team, |
| 204 | int port_index) | 204 | int port_index) |
| 205 | { | 205 | { |
diff --git a/include/linux/iio/frequency/adf4350.h b/include/linux/iio/frequency/adf4350.h index b76b4a87065e..be91f344d5fc 100644 --- a/include/linux/iio/frequency/adf4350.h +++ b/include/linux/iio/frequency/adf4350.h | |||
| @@ -87,6 +87,8 @@ | |||
| 87 | #define ADF4350_MAX_BANDSEL_CLK 125000 /* Hz */ | 87 | #define ADF4350_MAX_BANDSEL_CLK 125000 /* Hz */ |
| 88 | #define ADF4350_MAX_FREQ_REFIN 250000000 /* Hz */ | 88 | #define ADF4350_MAX_FREQ_REFIN 250000000 /* Hz */ |
| 89 | #define ADF4350_MAX_MODULUS 4095 | 89 | #define ADF4350_MAX_MODULUS 4095 |
| 90 | #define ADF4350_MAX_R_CNT 1023 | ||
| 91 | |||
| 90 | 92 | ||
| 91 | /** | 93 | /** |
| 92 | * struct adf4350_platform_data - platform specific information | 94 | * struct adf4350_platform_data - platform specific information |
diff --git a/include/linux/input/eeti_ts.h b/include/linux/input/eeti_ts.h index f875b316249d..16625d799b6f 100644 --- a/include/linux/input/eeti_ts.h +++ b/include/linux/input/eeti_ts.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define LINUX_INPUT_EETI_TS_H | 2 | #define LINUX_INPUT_EETI_TS_H |
| 3 | 3 | ||
| 4 | struct eeti_ts_platform_data { | 4 | struct eeti_ts_platform_data { |
| 5 | int irq_gpio; | ||
| 5 | unsigned int irq_active_high; | 6 | unsigned int irq_active_high; |
| 6 | }; | 7 | }; |
| 7 | 8 | ||
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 54d6d690073c..7e83370e6fd2 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #define __LINUX_IOMMU_H | 20 | #define __LINUX_IOMMU_H |
| 21 | 21 | ||
| 22 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
| 23 | #include <linux/types.h> | ||
| 23 | 24 | ||
| 24 | #define IOMMU_READ (1) | 25 | #define IOMMU_READ (1) |
| 25 | #define IOMMU_WRITE (2) | 26 | #define IOMMU_WRITE (2) |
| @@ -30,6 +31,7 @@ struct iommu_group; | |||
| 30 | struct bus_type; | 31 | struct bus_type; |
| 31 | struct device; | 32 | struct device; |
| 32 | struct iommu_domain; | 33 | struct iommu_domain; |
| 34 | struct notifier_block; | ||
| 33 | 35 | ||
| 34 | /* iommu fault flags */ | 36 | /* iommu fault flags */ |
| 35 | #define IOMMU_FAULT_READ 0x0 | 37 | #define IOMMU_FAULT_READ 0x0 |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 379e433e15e0..879db26ec401 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
| @@ -369,6 +369,7 @@ struct ipv6_pinfo { | |||
| 369 | __u8 rcv_tclass; | 369 | __u8 rcv_tclass; |
| 370 | 370 | ||
| 371 | __u32 dst_cookie; | 371 | __u32 dst_cookie; |
| 372 | __u32 rx_dst_cookie; | ||
| 372 | 373 | ||
| 373 | struct ipv6_mc_socklist __rcu *ipv6_mc_list; | 374 | struct ipv6_mc_socklist __rcu *ipv6_mc_list; |
| 374 | struct ipv6_ac_socklist *ipv6_ac_list; | 375 | struct ipv6_ac_socklist *ipv6_ac_list; |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 553fb66da130..216b0ba109d7 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -349,6 +349,7 @@ enum { | |||
| 349 | IRQCHIP_MASK_ON_SUSPEND = (1 << 2), | 349 | IRQCHIP_MASK_ON_SUSPEND = (1 << 2), |
| 350 | IRQCHIP_ONOFFLINE_ENABLED = (1 << 3), | 350 | IRQCHIP_ONOFFLINE_ENABLED = (1 << 3), |
| 351 | IRQCHIP_SKIP_SET_WAKE = (1 << 4), | 351 | IRQCHIP_SKIP_SET_WAKE = (1 << 4), |
| 352 | IRQCHIP_ONESHOT_SAFE = (1 << 5), | ||
| 352 | }; | 353 | }; |
| 353 | 354 | ||
| 354 | /* This include will go away once we isolated irq_desc usage to core code */ | 355 | /* This include will go away once we isolated irq_desc usage to core code */ |
diff --git a/include/linux/irqchip/bcm2835.h b/include/linux/irqchip/bcm2835.h new file mode 100644 index 000000000000..48a859bc9dca --- /dev/null +++ b/include/linux/irqchip/bcm2835.h | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Broadcom | ||
| 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 | |||
| 19 | #ifndef __LINUX_IRQCHIP_BCM2835_H_ | ||
| 20 | #define __LINUX_IRQCHIP_BCM2835_H_ | ||
| 21 | |||
| 22 | #include <asm/exception.h> | ||
| 23 | |||
| 24 | extern void bcm2835_init_irq(void); | ||
| 25 | |||
| 26 | extern asmlinkage void __exception_irq_entry bcm2835_handle_irq( | ||
| 27 | struct pt_regs *regs); | ||
| 28 | |||
| 29 | #endif | ||
diff --git a/include/linux/istallion.h b/include/linux/istallion.h deleted file mode 100644 index ad700a60c158..000000000000 --- a/include/linux/istallion.h +++ /dev/null | |||
| @@ -1,123 +0,0 @@ | |||
| 1 | /*****************************************************************************/ | ||
| 2 | |||
| 3 | /* | ||
| 4 | * istallion.h -- stallion intelligent multiport serial driver. | ||
| 5 | * | ||
| 6 | * Copyright (C) 1996-1998 Stallion Technologies | ||
| 7 | * Copyright (C) 1994-1996 Greg Ungerer. | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License | ||
| 20 | * along with this program; if not, write to the Free Software | ||
| 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 22 | */ | ||
| 23 | |||
| 24 | /*****************************************************************************/ | ||
| 25 | #ifndef _ISTALLION_H | ||
| 26 | #define _ISTALLION_H | ||
| 27 | /*****************************************************************************/ | ||
| 28 | |||
| 29 | /* | ||
| 30 | * Define important driver constants here. | ||
| 31 | */ | ||
| 32 | #define STL_MAXBRDS 4 | ||
| 33 | #define STL_MAXPANELS 4 | ||
| 34 | #define STL_MAXPORTS 64 | ||
| 35 | #define STL_MAXCHANS (STL_MAXPORTS + 1) | ||
| 36 | #define STL_MAXDEVS (STL_MAXBRDS * STL_MAXPORTS) | ||
| 37 | |||
| 38 | |||
| 39 | /* | ||
| 40 | * Define a set of structures to hold all the board/panel/port info | ||
| 41 | * for our ports. These will be dynamically allocated as required at | ||
| 42 | * driver initialization time. | ||
| 43 | */ | ||
| 44 | |||
| 45 | /* | ||
| 46 | * Port and board structures to hold status info about each object. | ||
| 47 | * The board structure contains pointers to structures for each port | ||
| 48 | * connected to it. Panels are not distinguished here, since | ||
| 49 | * communication with the slave board will always be on a per port | ||
| 50 | * basis. | ||
| 51 | */ | ||
| 52 | struct stliport { | ||
| 53 | unsigned long magic; | ||
| 54 | struct tty_port port; | ||
| 55 | unsigned int portnr; | ||
| 56 | unsigned int panelnr; | ||
| 57 | unsigned int brdnr; | ||
| 58 | unsigned long state; | ||
| 59 | unsigned int devnr; | ||
| 60 | int baud_base; | ||
| 61 | int custom_divisor; | ||
| 62 | int closing_wait; | ||
| 63 | int rc; | ||
| 64 | int argsize; | ||
| 65 | void *argp; | ||
| 66 | unsigned int rxmarkmsk; | ||
| 67 | wait_queue_head_t raw_wait; | ||
| 68 | struct asysigs asig; | ||
| 69 | unsigned long addr; | ||
| 70 | unsigned long rxoffset; | ||
| 71 | unsigned long txoffset; | ||
| 72 | unsigned long sigs; | ||
| 73 | unsigned long pflag; | ||
| 74 | unsigned int rxsize; | ||
| 75 | unsigned int txsize; | ||
| 76 | unsigned char reqbit; | ||
| 77 | unsigned char portidx; | ||
| 78 | unsigned char portbit; | ||
| 79 | }; | ||
| 80 | |||
| 81 | /* | ||
| 82 | * Use a structure of function pointers to do board level operations. | ||
| 83 | * These include, enable/disable, paging shared memory, interrupting, etc. | ||
| 84 | */ | ||
| 85 | struct stlibrd { | ||
| 86 | unsigned long magic; | ||
| 87 | unsigned int brdnr; | ||
| 88 | unsigned int brdtype; | ||
| 89 | unsigned long state; | ||
| 90 | unsigned int nrpanels; | ||
| 91 | unsigned int nrports; | ||
| 92 | unsigned int nrdevs; | ||
| 93 | unsigned int iobase; | ||
| 94 | int iosize; | ||
| 95 | unsigned long memaddr; | ||
| 96 | void __iomem *membase; | ||
| 97 | unsigned long memsize; | ||
| 98 | int pagesize; | ||
| 99 | int hostoffset; | ||
| 100 | int slaveoffset; | ||
| 101 | int bitsize; | ||
| 102 | int enabval; | ||
| 103 | unsigned int panels[STL_MAXPANELS]; | ||
| 104 | int panelids[STL_MAXPANELS]; | ||
| 105 | void (*init)(struct stlibrd *brdp); | ||
| 106 | void (*enable)(struct stlibrd *brdp); | ||
| 107 | void (*reenable)(struct stlibrd *brdp); | ||
| 108 | void (*disable)(struct stlibrd *brdp); | ||
| 109 | void __iomem *(*getmemptr)(struct stlibrd *brdp, unsigned long offset, int line); | ||
| 110 | void (*intr)(struct stlibrd *brdp); | ||
| 111 | void (*reset)(struct stlibrd *brdp); | ||
| 112 | struct stliport *ports[STL_MAXPORTS]; | ||
| 113 | }; | ||
| 114 | |||
| 115 | |||
| 116 | /* | ||
| 117 | * Define MAGIC numbers used for above structures. | ||
| 118 | */ | ||
| 119 | #define STLI_PORTMAGIC 0xe671c7a1 | ||
| 120 | #define STLI_BOARDMAGIC 0x4bc6c825 | ||
| 121 | |||
| 122 | /*****************************************************************************/ | ||
| 123 | #endif | ||
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index f334c7fab967..3efc43f3f162 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
| @@ -1125,6 +1125,7 @@ extern int jbd2_journal_destroy (journal_t *); | |||
| 1125 | extern int jbd2_journal_recover (journal_t *journal); | 1125 | extern int jbd2_journal_recover (journal_t *journal); |
| 1126 | extern int jbd2_journal_wipe (journal_t *, int); | 1126 | extern int jbd2_journal_wipe (journal_t *, int); |
| 1127 | extern int jbd2_journal_skip_recovery (journal_t *); | 1127 | extern int jbd2_journal_skip_recovery (journal_t *); |
| 1128 | extern void jbd2_journal_update_sb_errno(journal_t *); | ||
| 1128 | extern void jbd2_journal_update_sb_log_tail (journal_t *, tid_t, | 1129 | extern void jbd2_journal_update_sb_log_tail (journal_t *, tid_t, |
| 1129 | unsigned long, int); | 1130 | unsigned long, int); |
| 1130 | extern void __jbd2_journal_abort_hard (journal_t *); | 1131 | extern void __jbd2_journal_abort_hard (journal_t *); |
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 265e2c3cbd1c..82680541576d 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
| @@ -39,9 +39,6 @@ | |||
| 39 | # error Invalid value of HZ. | 39 | # error Invalid value of HZ. |
| 40 | #endif | 40 | #endif |
| 41 | 41 | ||
| 42 | /* LATCH is used in the interval timer and ftape setup. */ | ||
| 43 | #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ | ||
| 44 | |||
| 45 | /* Suppose we want to divide two numbers NOM and DEN: NOM/DEN, then we can | 42 | /* Suppose we want to divide two numbers NOM and DEN: NOM/DEN, then we can |
| 46 | * improve accuracy by shifting LSH bits, hence calculating: | 43 | * improve accuracy by shifting LSH bits, hence calculating: |
| 47 | * (NOM << LSH) / DEN | 44 | * (NOM << LSH) / DEN |
| @@ -54,18 +51,30 @@ | |||
| 54 | #define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) \ | 51 | #define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) \ |
| 55 | + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN)) | 52 | + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN)) |
| 56 | 53 | ||
| 57 | /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */ | 54 | #ifdef CLOCK_TICK_RATE |
| 58 | #define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8)) | 55 | /* LATCH is used in the interval timer and ftape setup. */ |
| 56 | # define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ | ||
| 57 | |||
| 58 | /* | ||
| 59 | * HZ is the requested value. However the CLOCK_TICK_RATE may not allow | ||
| 60 | * for exactly HZ. So SHIFTED_HZ is high res HZ ("<< 8" is for accuracy) | ||
| 61 | */ | ||
| 62 | # define SHIFTED_HZ (SH_DIV(CLOCK_TICK_RATE, LATCH, 8)) | ||
| 63 | #else | ||
| 64 | # define SHIFTED_HZ (HZ << 8) | ||
| 65 | #endif | ||
| 59 | 66 | ||
| 60 | /* TICK_NSEC is the time between ticks in nsec assuming real ACTHZ */ | 67 | /* TICK_NSEC is the time between ticks in nsec assuming SHIFTED_HZ */ |
| 61 | #define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8)) | 68 | #define TICK_NSEC (SH_DIV(1000000UL * 1000, SHIFTED_HZ, 8)) |
| 62 | 69 | ||
| 63 | /* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */ | 70 | /* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */ |
| 64 | #define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) | 71 | #define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) |
| 65 | 72 | ||
| 66 | /* TICK_USEC_TO_NSEC is the time between ticks in nsec assuming real ACTHZ and */ | 73 | /* |
| 67 | /* a value TUSEC for TICK_USEC (can be set bij adjtimex) */ | 74 | * TICK_USEC_TO_NSEC is the time between ticks in nsec assuming SHIFTED_HZ and |
| 68 | #define TICK_USEC_TO_NSEC(TUSEC) (SH_DIV (TUSEC * USER_HZ * 1000, ACTHZ, 8)) | 75 | * a value TUSEC for TICK_USEC (can be set bij adjtimex) |
| 76 | */ | ||
| 77 | #define TICK_USEC_TO_NSEC(TUSEC) (SH_DIV(TUSEC * USER_HZ * 1000, SHIFTED_HZ, 8)) | ||
| 69 | 78 | ||
| 70 | /* some arch's have a small-data section that can be accessed register-relative | 79 | /* some arch's have a small-data section that can be accessed register-relative |
| 71 | * but that can only take up to, say, 4-byte variables. jiffies being part of | 80 | * but that can only take up to, say, 4-byte variables. jiffies being part of |
diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h index daf4a3a40ee0..b7c8cdc1d422 100644 --- a/include/linux/kbd_kern.h +++ b/include/linux/kbd_kern.h | |||
| @@ -65,7 +65,6 @@ struct kbd_struct { | |||
| 65 | 65 | ||
| 66 | extern int kbd_init(void); | 66 | extern int kbd_init(void); |
| 67 | 67 | ||
| 68 | extern unsigned char getledstate(void); | ||
| 69 | extern void setledstate(struct kbd_struct *kbd, unsigned int led); | 68 | extern void setledstate(struct kbd_struct *kbd, unsigned int led); |
| 70 | 69 | ||
| 71 | extern int do_poke_blanked_console; | 70 | extern int do_poke_blanked_console; |
| @@ -145,16 +144,4 @@ void compute_shiftstate(void); | |||
| 145 | 144 | ||
| 146 | extern unsigned int keymap_count; | 145 | extern unsigned int keymap_count; |
| 147 | 146 | ||
| 148 | /* console.c */ | ||
| 149 | |||
| 150 | static inline void con_schedule_flip(struct tty_struct *t) | ||
| 151 | { | ||
| 152 | unsigned long flags; | ||
| 153 | spin_lock_irqsave(&t->buf.lock, flags); | ||
| 154 | if (t->buf.tail != NULL) | ||
| 155 | t->buf.tail->commit = t->buf.tail->used; | ||
| 156 | spin_unlock_irqrestore(&t->buf.lock, flags); | ||
| 157 | schedule_work(&t->buf.work); | ||
| 158 | } | ||
| 159 | |||
| 160 | #endif | 147 | #endif |
diff --git a/include/linux/kdb.h b/include/linux/kdb.h index 064725854db8..42d9e863a313 100644 --- a/include/linux/kdb.h +++ b/include/linux/kdb.h | |||
| @@ -75,8 +75,6 @@ extern const char *kdb_diemsg; | |||
| 75 | #define KDB_FLAG_CATASTROPHIC (1 << 1) /* A catastrophic event has occurred */ | 75 | #define KDB_FLAG_CATASTROPHIC (1 << 1) /* A catastrophic event has occurred */ |
| 76 | #define KDB_FLAG_CMD_INTERRUPT (1 << 2) /* Previous command was interrupted */ | 76 | #define KDB_FLAG_CMD_INTERRUPT (1 << 2) /* Previous command was interrupted */ |
| 77 | #define KDB_FLAG_NOIPI (1 << 3) /* Do not send IPIs */ | 77 | #define KDB_FLAG_NOIPI (1 << 3) /* Do not send IPIs */ |
| 78 | #define KDB_FLAG_ONLY_DO_DUMP (1 << 4) /* Only do a dump, used when | ||
| 79 | * kdb is off */ | ||
| 80 | #define KDB_FLAG_NO_CONSOLE (1 << 5) /* No console is available, | 78 | #define KDB_FLAG_NO_CONSOLE (1 << 5) /* No console is available, |
| 81 | * kdb is disabled */ | 79 | * kdb is disabled */ |
| 82 | #define KDB_FLAG_NO_VT_CONSOLE (1 << 6) /* No VT console is available, do | 80 | #define KDB_FLAG_NO_VT_CONSOLE (1 << 6) /* No VT console is available, do |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 604382143bcf..594b419b7d20 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -82,10 +82,18 @@ | |||
| 82 | __x - (__x % (y)); \ | 82 | __x - (__x % (y)); \ |
| 83 | } \ | 83 | } \ |
| 84 | ) | 84 | ) |
| 85 | |||
| 86 | /* | ||
| 87 | * Divide positive or negative dividend by positive divisor and round | ||
| 88 | * to closest integer. Result is undefined for negative divisors. | ||
| 89 | */ | ||
| 85 | #define DIV_ROUND_CLOSEST(x, divisor)( \ | 90 | #define DIV_ROUND_CLOSEST(x, divisor)( \ |
| 86 | { \ | 91 | { \ |
| 87 | typeof(divisor) __divisor = divisor; \ | 92 | typeof(x) __x = x; \ |
| 88 | (((x) + ((__divisor) / 2)) / (__divisor)); \ | 93 | typeof(divisor) __d = divisor; \ |
| 94 | (((typeof(x))-1) >= 0 || (__x) >= 0) ? \ | ||
| 95 | (((__x) + ((__d) / 2)) / (__d)) : \ | ||
| 96 | (((__x) - ((__d) / 2)) / (__d)); \ | ||
| 89 | } \ | 97 | } \ |
| 90 | ) | 98 | ) |
| 91 | 99 | ||
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index fc615a97e2d3..1e57449395b1 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
| @@ -224,7 +224,7 @@ static inline int kobject_uevent_env(struct kobject *kobj, | |||
| 224 | 224 | ||
| 225 | static inline __printf(2, 3) | 225 | static inline __printf(2, 3) |
| 226 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) | 226 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) |
| 227 | { return 0; } | 227 | { return -ENOMEM; } |
| 228 | 228 | ||
| 229 | static inline int kobject_action_type(const char *buf, size_t count, | 229 | static inline int kobject_action_type(const char *buf, size_t count, |
| 230 | enum kobject_action *type) | 230 | enum kobject_action *type) |
diff --git a/include/linux/kref.h b/include/linux/kref.h index 9c07dcebded7..65af6887872f 100644 --- a/include/linux/kref.h +++ b/include/linux/kref.h | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/bug.h> | 18 | #include <linux/bug.h> |
| 19 | #include <linux/atomic.h> | 19 | #include <linux/atomic.h> |
| 20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
| 21 | #include <linux/mutex.h> | ||
| 21 | 22 | ||
| 22 | struct kref { | 23 | struct kref { |
| 23 | atomic_t refcount; | 24 | atomic_t refcount; |
| @@ -93,4 +94,21 @@ static inline int kref_put(struct kref *kref, void (*release)(struct kref *kref) | |||
| 93 | { | 94 | { |
| 94 | return kref_sub(kref, 1, release); | 95 | return kref_sub(kref, 1, release); |
| 95 | } | 96 | } |
| 97 | |||
| 98 | static inline int kref_put_mutex(struct kref *kref, | ||
| 99 | void (*release)(struct kref *kref), | ||
| 100 | struct mutex *lock) | ||
| 101 | { | ||
| 102 | WARN_ON(release == NULL); | ||
| 103 | if (unlikely(!atomic_add_unless(&kref->refcount, -1, 1))) { | ||
| 104 | mutex_lock(lock); | ||
| 105 | if (unlikely(!atomic_dec_and_test(&kref->refcount))) { | ||
| 106 | mutex_unlock(lock); | ||
| 107 | return 0; | ||
| 108 | } | ||
| 109 | release(kref); | ||
| 110 | return 1; | ||
| 111 | } | ||
| 112 | return 0; | ||
| 113 | } | ||
| 96 | #endif /* _KREF_H_ */ | 114 | #endif /* _KREF_H_ */ |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 603bec2913b0..06177ba10a16 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
| @@ -58,13 +58,6 @@ union ktime { | |||
| 58 | 58 | ||
| 59 | typedef union ktime ktime_t; /* Kill this */ | 59 | typedef union ktime ktime_t; /* Kill this */ |
| 60 | 60 | ||
| 61 | #define KTIME_MAX ((s64)~((u64)1 << 63)) | ||
| 62 | #if (BITS_PER_LONG == 64) | ||
| 63 | # define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) | ||
| 64 | #else | ||
| 65 | # define KTIME_SEC_MAX LONG_MAX | ||
| 66 | #endif | ||
| 67 | |||
| 68 | /* | 61 | /* |
| 69 | * ktime_t definitions when using the 64-bit scalar representation: | 62 | * ktime_t definitions when using the 64-bit scalar representation: |
| 70 | */ | 63 | */ |
diff --git a/include/linux/mISDNhw.h b/include/linux/mISDNhw.h index d0752eca9b44..9d96d5d4dfed 100644 --- a/include/linux/mISDNhw.h +++ b/include/linux/mISDNhw.h | |||
| @@ -183,7 +183,7 @@ extern int mISDN_initbchannel(struct bchannel *, unsigned short, | |||
| 183 | unsigned short); | 183 | unsigned short); |
| 184 | extern int mISDN_freedchannel(struct dchannel *); | 184 | extern int mISDN_freedchannel(struct dchannel *); |
| 185 | extern void mISDN_clear_bchannel(struct bchannel *); | 185 | extern void mISDN_clear_bchannel(struct bchannel *); |
| 186 | extern int mISDN_freebchannel(struct bchannel *); | 186 | extern void mISDN_freebchannel(struct bchannel *); |
| 187 | extern int mISDN_ctrl_bchannel(struct bchannel *, struct mISDN_ctrl_req *); | 187 | extern int mISDN_ctrl_bchannel(struct bchannel *, struct mISDN_ctrl_req *); |
| 188 | extern void queue_ch_frame(struct mISDNchannel *, u_int, | 188 | extern void queue_ch_frame(struct mISDNchannel *, u_int, |
| 189 | int, struct sk_buff *); | 189 | int, struct sk_buff *); |
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index 3a8435a8058f..cebe97ee98b8 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h | |||
| @@ -16,6 +16,8 @@ | |||
| 16 | 16 | ||
| 17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
| 18 | 18 | ||
| 19 | struct irq_domain; | ||
| 20 | |||
| 19 | /* | 21 | /* |
| 20 | * This struct describes the MFD part ("cell"). | 22 | * This struct describes the MFD part ("cell"). |
| 21 | * After registration the copy of this structure will become the platform data | 23 | * After registration the copy of this structure will become the platform data |
| @@ -98,7 +100,7 @@ static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev) | |||
| 98 | extern int mfd_add_devices(struct device *parent, int id, | 100 | extern int mfd_add_devices(struct device *parent, int id, |
| 99 | struct mfd_cell *cells, int n_devs, | 101 | struct mfd_cell *cells, int n_devs, |
| 100 | struct resource *mem_base, | 102 | struct resource *mem_base, |
| 101 | int irq_base); | 103 | int irq_base, struct irq_domain *irq_domain); |
| 102 | 104 | ||
| 103 | extern void mfd_remove_devices(struct device *parent); | 105 | extern void mfd_remove_devices(struct device *parent); |
| 104 | 106 | ||
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h index 5b90e94399e1..c410d99bd667 100644 --- a/include/linux/mfd/dbx500-prcmu.h +++ b/include/linux/mfd/dbx500-prcmu.h | |||
| @@ -136,6 +136,7 @@ enum prcmu_clock { | |||
| 136 | PRCMU_TIMCLK, | 136 | PRCMU_TIMCLK, |
| 137 | PRCMU_PLLSOC0, | 137 | PRCMU_PLLSOC0, |
| 138 | PRCMU_PLLSOC1, | 138 | PRCMU_PLLSOC1, |
| 139 | PRCMU_ARMSS, | ||
| 139 | PRCMU_PLLDDR, | 140 | PRCMU_PLLDDR, |
| 140 | PRCMU_PLLDSI, | 141 | PRCMU_PLLDSI, |
| 141 | PRCMU_DSI0CLK, | 142 | PRCMU_DSI0CLK, |
diff --git a/include/linux/mfd/ezx-pcap.h b/include/linux/mfd/ezx-pcap.h index 40c372165f3e..32a1b5cfeba1 100644 --- a/include/linux/mfd/ezx-pcap.h +++ b/include/linux/mfd/ezx-pcap.h | |||
| @@ -16,6 +16,7 @@ struct pcap_subdev { | |||
| 16 | struct pcap_platform_data { | 16 | struct pcap_platform_data { |
| 17 | unsigned int irq_base; | 17 | unsigned int irq_base; |
| 18 | unsigned int config; | 18 | unsigned int config; |
| 19 | int gpio; | ||
| 19 | void (*init) (void *); /* board specific init */ | 20 | void (*init) (void *); /* board specific init */ |
| 20 | int num_subdevs; | 21 | int num_subdevs; |
| 21 | struct pcap_subdev *subdevs; | 22 | struct pcap_subdev *subdevs; |
diff --git a/include/linux/mfd/tps65217.h b/include/linux/mfd/tps65217.h index 12c06870829a..7cd83d826ed8 100644 --- a/include/linux/mfd/tps65217.h +++ b/include/linux/mfd/tps65217.h | |||
| @@ -22,6 +22,9 @@ | |||
| 22 | #include <linux/regulator/driver.h> | 22 | #include <linux/regulator/driver.h> |
| 23 | #include <linux/regulator/machine.h> | 23 | #include <linux/regulator/machine.h> |
| 24 | 24 | ||
| 25 | /* TPS chip id list */ | ||
| 26 | #define TPS65217 0xF0 | ||
| 27 | |||
| 25 | /* I2C ID for TPS65217 part */ | 28 | /* I2C ID for TPS65217 part */ |
| 26 | #define TPS65217_I2C_ID 0x24 | 29 | #define TPS65217_I2C_ID 0x24 |
| 27 | 30 | ||
| @@ -248,13 +251,11 @@ struct tps_info { | |||
| 248 | struct tps65217 { | 251 | struct tps65217 { |
| 249 | struct device *dev; | 252 | struct device *dev; |
| 250 | struct tps65217_board *pdata; | 253 | struct tps65217_board *pdata; |
| 254 | unsigned int id; | ||
| 251 | struct regulator_desc desc[TPS65217_NUM_REGULATOR]; | 255 | struct regulator_desc desc[TPS65217_NUM_REGULATOR]; |
| 252 | struct regulator_dev *rdev[TPS65217_NUM_REGULATOR]; | 256 | struct regulator_dev *rdev[TPS65217_NUM_REGULATOR]; |
| 253 | struct tps_info *info[TPS65217_NUM_REGULATOR]; | 257 | struct tps_info *info[TPS65217_NUM_REGULATOR]; |
| 254 | struct regmap *regmap; | 258 | struct regmap *regmap; |
| 255 | |||
| 256 | /* Client devices */ | ||
| 257 | struct platform_device *regulator_pdev[TPS65217_NUM_REGULATOR]; | ||
| 258 | }; | 259 | }; |
| 259 | 260 | ||
| 260 | static inline struct tps65217 *dev_to_tps65217(struct device *dev) | 261 | static inline struct tps65217 *dev_to_tps65217(struct device *dev) |
| @@ -262,6 +263,11 @@ static inline struct tps65217 *dev_to_tps65217(struct device *dev) | |||
| 262 | return dev_get_drvdata(dev); | 263 | return dev_get_drvdata(dev); |
| 263 | } | 264 | } |
| 264 | 265 | ||
| 266 | static inline int tps65217_chip_id(struct tps65217 *tps65217) | ||
| 267 | { | ||
| 268 | return tps65217->id; | ||
| 269 | } | ||
| 270 | |||
| 265 | int tps65217_reg_read(struct tps65217 *tps, unsigned int reg, | 271 | int tps65217_reg_read(struct tps65217 *tps, unsigned int reg, |
| 266 | unsigned int *val); | 272 | unsigned int *val); |
| 267 | int tps65217_reg_write(struct tps65217 *tps, unsigned int reg, | 273 | int tps65217_reg_write(struct tps65217 *tps, unsigned int reg, |
diff --git a/include/linux/mfd/tps6586x.h b/include/linux/mfd/tps6586x.h index f350fd0ba1df..94514710a03f 100644 --- a/include/linux/mfd/tps6586x.h +++ b/include/linux/mfd/tps6586x.h | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #define TPS6586X_SLEW_RATE_MASK 0x07 | 14 | #define TPS6586X_SLEW_RATE_MASK 0x07 |
| 15 | 15 | ||
| 16 | enum { | 16 | enum { |
| 17 | TPS6586X_ID_SYS, | ||
| 17 | TPS6586X_ID_SM_0, | 18 | TPS6586X_ID_SM_0, |
| 18 | TPS6586X_ID_SM_1, | 19 | TPS6586X_ID_SM_1, |
| 19 | TPS6586X_ID_SM_2, | 20 | TPS6586X_ID_SM_2, |
diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h index eaad49f7c130..ba43d4806b83 100644 --- a/include/linux/mfd/twl6040.h +++ b/include/linux/mfd/twl6040.h | |||
| @@ -194,7 +194,6 @@ struct twl6040_vibra_data { | |||
| 194 | 194 | ||
| 195 | struct twl6040_platform_data { | 195 | struct twl6040_platform_data { |
| 196 | int audpwron_gpio; /* audio power-on gpio */ | 196 | int audpwron_gpio; /* audio power-on gpio */ |
| 197 | unsigned int irq_base; | ||
| 198 | 197 | ||
| 199 | struct twl6040_codec_data *codec; | 198 | struct twl6040_codec_data *codec; |
| 200 | struct twl6040_vibra_data *vibra; | 199 | struct twl6040_vibra_data *vibra; |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index bd6c9fcdf2dd..6e1b0f973a03 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -796,6 +796,19 @@ enum mlx4_net_trans_rule_id { | |||
| 796 | MLX4_NET_TRANS_RULE_NUM, /* should be last */ | 796 | MLX4_NET_TRANS_RULE_NUM, /* should be last */ |
| 797 | }; | 797 | }; |
| 798 | 798 | ||
| 799 | extern const u16 __sw_id_hw[]; | ||
| 800 | |||
| 801 | static inline int map_hw_to_sw_id(u16 header_id) | ||
| 802 | { | ||
| 803 | |||
| 804 | int i; | ||
| 805 | for (i = 0; i < MLX4_NET_TRANS_RULE_NUM; i++) { | ||
| 806 | if (header_id == __sw_id_hw[i]) | ||
| 807 | return i; | ||
| 808 | } | ||
| 809 | return -EINVAL; | ||
| 810 | } | ||
| 811 | |||
| 799 | enum mlx4_net_trans_promisc_mode { | 812 | enum mlx4_net_trans_promisc_mode { |
| 800 | MLX4_FS_PROMISC_NONE = 0, | 813 | MLX4_FS_PROMISC_NONE = 0, |
| 801 | MLX4_FS_PROMISC_UPLINK, | 814 | MLX4_FS_PROMISC_UPLINK, |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 111aca5e97f3..4b27f9f503e4 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
| @@ -239,6 +239,7 @@ struct mmc_card { | |||
| 239 | #define MMC_QUIRK_BLK_NO_CMD23 (1<<7) /* Avoid CMD23 for regular multiblock */ | 239 | #define MMC_QUIRK_BLK_NO_CMD23 (1<<7) /* Avoid CMD23 for regular multiblock */ |
| 240 | #define MMC_QUIRK_BROKEN_BYTE_MODE_512 (1<<8) /* Avoid sending 512 bytes in */ | 240 | #define MMC_QUIRK_BROKEN_BYTE_MODE_512 (1<<8) /* Avoid sending 512 bytes in */ |
| 241 | #define MMC_QUIRK_LONG_READ_TIME (1<<9) /* Data read time > CSD says */ | 241 | #define MMC_QUIRK_LONG_READ_TIME (1<<9) /* Data read time > CSD says */ |
| 242 | #define MMC_QUIRK_SEC_ERASE_TRIM_BROKEN (1<<10) /* Skip secure for erase/trim */ | ||
| 242 | /* byte mode */ | 243 | /* byte mode */ |
| 243 | unsigned int poweroff_notify_state; /* eMMC4.5 notify feature */ | 244 | unsigned int poweroff_notify_state; /* eMMC4.5 notify feature */ |
| 244 | #define MMC_NO_POWER_NOTIFICATION 0 | 245 | #define MMC_NO_POWER_NOTIFICATION 0 |
diff --git a/include/linux/mv643xx_eth.h b/include/linux/mv643xx_eth.h index 51bf8ada6dc0..49258e0ed1c6 100644 --- a/include/linux/mv643xx_eth.h +++ b/include/linux/mv643xx_eth.h | |||
| @@ -15,6 +15,8 @@ | |||
| 15 | #define MV643XX_ETH_SIZE_REG_4 0x2224 | 15 | #define MV643XX_ETH_SIZE_REG_4 0x2224 |
| 16 | #define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x2290 | 16 | #define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x2290 |
| 17 | 17 | ||
| 18 | #define MV643XX_TX_CSUM_DEFAULT_LIMIT 0 | ||
| 19 | |||
| 18 | struct mv643xx_eth_shared_platform_data { | 20 | struct mv643xx_eth_shared_platform_data { |
| 19 | struct mbus_dram_target_info *dram; | 21 | struct mbus_dram_target_info *dram; |
| 20 | struct platform_device *shared_smi; | 22 | struct platform_device *shared_smi; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index eb06e58bed0b..59dc05f38247 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -953,7 +953,8 @@ struct net_device_ops { | |||
| 953 | #ifdef CONFIG_NET_POLL_CONTROLLER | 953 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 954 | void (*ndo_poll_controller)(struct net_device *dev); | 954 | void (*ndo_poll_controller)(struct net_device *dev); |
| 955 | int (*ndo_netpoll_setup)(struct net_device *dev, | 955 | int (*ndo_netpoll_setup)(struct net_device *dev, |
| 956 | struct netpoll_info *info); | 956 | struct netpoll_info *info, |
| 957 | gfp_t gfp); | ||
| 957 | void (*ndo_netpoll_cleanup)(struct net_device *dev); | 958 | void (*ndo_netpoll_cleanup)(struct net_device *dev); |
| 958 | #endif | 959 | #endif |
| 959 | int (*ndo_set_vf_mac)(struct net_device *dev, | 960 | int (*ndo_set_vf_mac)(struct net_device *dev, |
| @@ -1300,6 +1301,8 @@ struct net_device { | |||
| 1300 | /* for setting kernel sock attribute on TCP connection setup */ | 1301 | /* for setting kernel sock attribute on TCP connection setup */ |
| 1301 | #define GSO_MAX_SIZE 65536 | 1302 | #define GSO_MAX_SIZE 65536 |
| 1302 | unsigned int gso_max_size; | 1303 | unsigned int gso_max_size; |
| 1304 | #define GSO_MAX_SEGS 65535 | ||
| 1305 | u16 gso_max_segs; | ||
| 1303 | 1306 | ||
| 1304 | #ifdef CONFIG_DCB | 1307 | #ifdef CONFIG_DCB |
| 1305 | /* Data Center Bridging netlink ops */ | 1308 | /* Data Center Bridging netlink ops */ |
| @@ -1519,6 +1522,8 @@ struct packet_type { | |||
| 1519 | struct sk_buff **(*gro_receive)(struct sk_buff **head, | 1522 | struct sk_buff **(*gro_receive)(struct sk_buff **head, |
| 1520 | struct sk_buff *skb); | 1523 | struct sk_buff *skb); |
| 1521 | int (*gro_complete)(struct sk_buff *skb); | 1524 | int (*gro_complete)(struct sk_buff *skb); |
| 1525 | bool (*id_match)(struct packet_type *ptype, | ||
| 1526 | struct sock *sk); | ||
| 1522 | void *af_packet_priv; | 1527 | void *af_packet_priv; |
| 1523 | struct list_head list; | 1528 | struct list_head list; |
| 1524 | }; | 1529 | }; |
diff --git a/include/linux/netfilter/nf_conntrack_sip.h b/include/linux/netfilter/nf_conntrack_sip.h index 0dfc8b7210a3..89f2a627f3f0 100644 --- a/include/linux/netfilter/nf_conntrack_sip.h +++ b/include/linux/netfilter/nf_conntrack_sip.h | |||
| @@ -164,7 +164,7 @@ extern int ct_sip_parse_address_param(const struct nf_conn *ct, const char *dptr | |||
| 164 | unsigned int dataoff, unsigned int datalen, | 164 | unsigned int dataoff, unsigned int datalen, |
| 165 | const char *name, | 165 | const char *name, |
| 166 | unsigned int *matchoff, unsigned int *matchlen, | 166 | unsigned int *matchoff, unsigned int *matchlen, |
| 167 | union nf_inet_addr *addr); | 167 | union nf_inet_addr *addr, bool delim); |
| 168 | extern int ct_sip_parse_numerical_param(const struct nf_conn *ct, const char *dptr, | 168 | extern int ct_sip_parse_numerical_param(const struct nf_conn *ct, const char *dptr, |
| 169 | unsigned int off, unsigned int datalen, | 169 | unsigned int off, unsigned int datalen, |
| 170 | const char *name, | 170 | const char *name, |
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 28f5389c924b..66d5379c305e 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
| @@ -23,6 +23,7 @@ struct netpoll { | |||
| 23 | u8 remote_mac[ETH_ALEN]; | 23 | u8 remote_mac[ETH_ALEN]; |
| 24 | 24 | ||
| 25 | struct list_head rx; /* rx_np list element */ | 25 | struct list_head rx; /* rx_np list element */ |
| 26 | struct rcu_head rcu; | ||
| 26 | }; | 27 | }; |
| 27 | 28 | ||
| 28 | struct netpoll_info { | 29 | struct netpoll_info { |
| @@ -38,28 +39,40 @@ struct netpoll_info { | |||
| 38 | struct delayed_work tx_work; | 39 | struct delayed_work tx_work; |
| 39 | 40 | ||
| 40 | struct netpoll *netpoll; | 41 | struct netpoll *netpoll; |
| 42 | struct rcu_head rcu; | ||
| 41 | }; | 43 | }; |
| 42 | 44 | ||
| 43 | void netpoll_send_udp(struct netpoll *np, const char *msg, int len); | 45 | void netpoll_send_udp(struct netpoll *np, const char *msg, int len); |
| 44 | void netpoll_print_options(struct netpoll *np); | 46 | void netpoll_print_options(struct netpoll *np); |
| 45 | int netpoll_parse_options(struct netpoll *np, char *opt); | 47 | int netpoll_parse_options(struct netpoll *np, char *opt); |
| 46 | int __netpoll_setup(struct netpoll *np, struct net_device *ndev); | 48 | int __netpoll_setup(struct netpoll *np, struct net_device *ndev, gfp_t gfp); |
| 47 | int netpoll_setup(struct netpoll *np); | 49 | int netpoll_setup(struct netpoll *np); |
| 48 | int netpoll_trap(void); | 50 | int netpoll_trap(void); |
| 49 | void netpoll_set_trap(int trap); | 51 | void netpoll_set_trap(int trap); |
| 50 | void __netpoll_cleanup(struct netpoll *np); | 52 | void __netpoll_cleanup(struct netpoll *np); |
| 53 | void __netpoll_free_rcu(struct netpoll *np); | ||
| 51 | void netpoll_cleanup(struct netpoll *np); | 54 | void netpoll_cleanup(struct netpoll *np); |
| 52 | int __netpoll_rx(struct sk_buff *skb); | 55 | int __netpoll_rx(struct sk_buff *skb, struct netpoll_info *npinfo); |
| 53 | void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb, | 56 | void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb, |
| 54 | struct net_device *dev); | 57 | struct net_device *dev); |
| 55 | static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) | 58 | static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) |
| 56 | { | 59 | { |
| 60 | unsigned long flags; | ||
| 61 | local_irq_save(flags); | ||
| 57 | netpoll_send_skb_on_dev(np, skb, np->dev); | 62 | netpoll_send_skb_on_dev(np, skb, np->dev); |
| 63 | local_irq_restore(flags); | ||
| 58 | } | 64 | } |
| 59 | 65 | ||
| 60 | 66 | ||
| 61 | 67 | ||
| 62 | #ifdef CONFIG_NETPOLL | 68 | #ifdef CONFIG_NETPOLL |
| 69 | static inline bool netpoll_rx_on(struct sk_buff *skb) | ||
| 70 | { | ||
| 71 | struct netpoll_info *npinfo = rcu_dereference_bh(skb->dev->npinfo); | ||
| 72 | |||
| 73 | return npinfo && (!list_empty(&npinfo->rx_np) || npinfo->rx_flags); | ||
| 74 | } | ||
| 75 | |||
| 63 | static inline bool netpoll_rx(struct sk_buff *skb) | 76 | static inline bool netpoll_rx(struct sk_buff *skb) |
| 64 | { | 77 | { |
| 65 | struct netpoll_info *npinfo; | 78 | struct netpoll_info *npinfo; |
| @@ -67,14 +80,14 @@ static inline bool netpoll_rx(struct sk_buff *skb) | |||
| 67 | bool ret = false; | 80 | bool ret = false; |
| 68 | 81 | ||
| 69 | local_irq_save(flags); | 82 | local_irq_save(flags); |
| 70 | npinfo = rcu_dereference_bh(skb->dev->npinfo); | ||
| 71 | 83 | ||
| 72 | if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags)) | 84 | if (!netpoll_rx_on(skb)) |
| 73 | goto out; | 85 | goto out; |
| 74 | 86 | ||
| 87 | npinfo = rcu_dereference_bh(skb->dev->npinfo); | ||
| 75 | spin_lock(&npinfo->rx_lock); | 88 | spin_lock(&npinfo->rx_lock); |
| 76 | /* check rx_flags again with the lock held */ | 89 | /* check rx_flags again with the lock held */ |
| 77 | if (npinfo->rx_flags && __netpoll_rx(skb)) | 90 | if (npinfo->rx_flags && __netpoll_rx(skb, npinfo)) |
| 78 | ret = true; | 91 | ret = true; |
| 79 | spin_unlock(&npinfo->rx_lock); | 92 | spin_unlock(&npinfo->rx_lock); |
| 80 | 93 | ||
| @@ -83,13 +96,6 @@ out: | |||
| 83 | return ret; | 96 | return ret; |
| 84 | } | 97 | } |
| 85 | 98 | ||
| 86 | static inline int netpoll_rx_on(struct sk_buff *skb) | ||
| 87 | { | ||
| 88 | struct netpoll_info *npinfo = rcu_dereference_bh(skb->dev->npinfo); | ||
| 89 | |||
| 90 | return npinfo && (!list_empty(&npinfo->rx_np) || npinfo->rx_flags); | ||
| 91 | } | ||
| 92 | |||
| 93 | static inline int netpoll_receive_skb(struct sk_buff *skb) | 99 | static inline int netpoll_receive_skb(struct sk_buff *skb) |
| 94 | { | 100 | { |
| 95 | if (!list_empty(&skb->dev->napi_list)) | 101 | if (!list_empty(&skb->dev->napi_list)) |
| @@ -119,7 +125,7 @@ static inline void netpoll_poll_unlock(void *have) | |||
| 119 | } | 125 | } |
| 120 | } | 126 | } |
| 121 | 127 | ||
| 122 | static inline int netpoll_tx_running(struct net_device *dev) | 128 | static inline bool netpoll_tx_running(struct net_device *dev) |
| 123 | { | 129 | { |
| 124 | return irqs_disabled(); | 130 | return irqs_disabled(); |
| 125 | } | 131 | } |
| @@ -127,11 +133,11 @@ static inline int netpoll_tx_running(struct net_device *dev) | |||
| 127 | #else | 133 | #else |
| 128 | static inline bool netpoll_rx(struct sk_buff *skb) | 134 | static inline bool netpoll_rx(struct sk_buff *skb) |
| 129 | { | 135 | { |
| 130 | return 0; | 136 | return false; |
| 131 | } | 137 | } |
| 132 | static inline int netpoll_rx_on(struct sk_buff *skb) | 138 | static inline bool netpoll_rx_on(struct sk_buff *skb) |
| 133 | { | 139 | { |
| 134 | return 0; | 140 | return false; |
| 135 | } | 141 | } |
| 136 | static inline int netpoll_receive_skb(struct sk_buff *skb) | 142 | static inline int netpoll_receive_skb(struct sk_buff *skb) |
| 137 | { | 143 | { |
| @@ -147,9 +153,9 @@ static inline void netpoll_poll_unlock(void *have) | |||
| 147 | static inline void netpoll_netdev_init(struct net_device *dev) | 153 | static inline void netpoll_netdev_init(struct net_device *dev) |
| 148 | { | 154 | { |
| 149 | } | 155 | } |
| 150 | static inline int netpoll_tx_running(struct net_device *dev) | 156 | static inline bool netpoll_tx_running(struct net_device *dev) |
| 151 | { | 157 | { |
| 152 | return 0; | 158 | return false; |
| 153 | } | 159 | } |
| 154 | #endif | 160 | #endif |
| 155 | 161 | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 1f8fc7f9bcd8..4b03f56e280e 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -265,11 +265,6 @@ static inline const struct nfs_rpc_ops *NFS_PROTO(const struct inode *inode) | |||
| 265 | return NFS_SERVER(inode)->nfs_client->rpc_ops; | 265 | return NFS_SERVER(inode)->nfs_client->rpc_ops; |
| 266 | } | 266 | } |
| 267 | 267 | ||
| 268 | static inline __be32 *NFS_COOKIEVERF(const struct inode *inode) | ||
| 269 | { | ||
| 270 | return NFS_I(inode)->cookieverf; | ||
| 271 | } | ||
| 272 | |||
| 273 | static inline unsigned NFS_MINATTRTIMEO(const struct inode *inode) | 268 | static inline unsigned NFS_MINATTRTIMEO(const struct inode *inode) |
| 274 | { | 269 | { |
| 275 | struct nfs_server *nfss = NFS_SERVER(inode); | 270 | struct nfs_server *nfss = NFS_SERVER(inode); |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 880805774f9f..92ce5783b707 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
| @@ -69,6 +69,7 @@ struct nfs_pageio_descriptor { | |||
| 69 | const struct nfs_pgio_completion_ops *pg_completion_ops; | 69 | const struct nfs_pgio_completion_ops *pg_completion_ops; |
| 70 | struct pnfs_layout_segment *pg_lseg; | 70 | struct pnfs_layout_segment *pg_lseg; |
| 71 | struct nfs_direct_req *pg_dreq; | 71 | struct nfs_direct_req *pg_dreq; |
| 72 | void *pg_layout_private; | ||
| 72 | }; | 73 | }; |
| 73 | 74 | ||
| 74 | #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) | 75 | #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 00485e084394..be9cf3c7e79e 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -652,7 +652,7 @@ struct nfs_getaclargs { | |||
| 652 | }; | 652 | }; |
| 653 | 653 | ||
| 654 | /* getxattr ACL interface flags */ | 654 | /* getxattr ACL interface flags */ |
| 655 | #define NFS4_ACL_LEN_REQUEST 0x0001 /* zero length getxattr buffer */ | 655 | #define NFS4_ACL_TRUNC 0x0001 /* ACL was truncated */ |
| 656 | struct nfs_getaclres { | 656 | struct nfs_getaclres { |
| 657 | size_t acl_len; | 657 | size_t acl_len; |
| 658 | size_t acl_data_offset; | 658 | size_t acl_data_offset; |
| @@ -1248,6 +1248,7 @@ struct nfs_pgio_header { | |||
| 1248 | void (*release) (struct nfs_pgio_header *hdr); | 1248 | void (*release) (struct nfs_pgio_header *hdr); |
| 1249 | const struct nfs_pgio_completion_ops *completion_ops; | 1249 | const struct nfs_pgio_completion_ops *completion_ops; |
| 1250 | struct nfs_direct_req *dreq; | 1250 | struct nfs_direct_req *dreq; |
| 1251 | void *layout_private; | ||
| 1251 | spinlock_t lock; | 1252 | spinlock_t lock; |
| 1252 | /* fields protected by lock */ | 1253 | /* fields protected by lock */ |
| 1253 | int pnfs_error; | 1254 | int pnfs_error; |
diff --git a/include/linux/of.h b/include/linux/of.h index 5919ee33f2b7..1b1163225f3b 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
| @@ -190,10 +190,17 @@ extern struct device_node *of_get_parent(const struct device_node *node); | |||
| 190 | extern struct device_node *of_get_next_parent(struct device_node *node); | 190 | extern struct device_node *of_get_next_parent(struct device_node *node); |
| 191 | extern struct device_node *of_get_next_child(const struct device_node *node, | 191 | extern struct device_node *of_get_next_child(const struct device_node *node, |
| 192 | struct device_node *prev); | 192 | struct device_node *prev); |
| 193 | extern struct device_node *of_get_next_available_child( | ||
| 194 | const struct device_node *node, struct device_node *prev); | ||
| 195 | |||
| 193 | #define for_each_child_of_node(parent, child) \ | 196 | #define for_each_child_of_node(parent, child) \ |
| 194 | for (child = of_get_next_child(parent, NULL); child != NULL; \ | 197 | for (child = of_get_next_child(parent, NULL); child != NULL; \ |
| 195 | child = of_get_next_child(parent, child)) | 198 | child = of_get_next_child(parent, child)) |
| 196 | 199 | ||
| 200 | #define for_each_available_child_of_node(parent, child) \ | ||
| 201 | for (child = of_get_next_available_child(parent, NULL); child != NULL; \ | ||
| 202 | child = of_get_next_available_child(parent, child)) | ||
| 203 | |||
| 197 | static inline int of_get_child_count(const struct device_node *np) | 204 | static inline int of_get_child_count(const struct device_node *np) |
| 198 | { | 205 | { |
| 199 | struct device_node *child; | 206 | struct device_node *child; |
diff --git a/include/linux/omapfb.h b/include/linux/omapfb.h index 4ff57e81051d..85af8184691a 100644 --- a/include/linux/omapfb.h +++ b/include/linux/omapfb.h | |||
| @@ -220,7 +220,12 @@ struct omapfb_display_info { | |||
| 220 | 220 | ||
| 221 | #ifdef __KERNEL__ | 221 | #ifdef __KERNEL__ |
| 222 | 222 | ||
| 223 | #include <plat/board.h> | 223 | struct omap_lcd_config { |
| 224 | char panel_name[16]; | ||
| 225 | char ctrl_name[16]; | ||
| 226 | s16 nreset_gpio; | ||
| 227 | u8 data_lines; | ||
| 228 | }; | ||
| 224 | 229 | ||
| 225 | struct omapfb_platform_data { | 230 | struct omapfb_platform_data { |
| 226 | struct omap_lcd_config lcd; | 231 | struct omap_lcd_config lcd; |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index fc3526077348..6b4565c440c8 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -2149,7 +2149,7 @@ | |||
| 2149 | #define PCI_DEVICE_ID_TIGON3_5704S 0x16a8 | 2149 | #define PCI_DEVICE_ID_TIGON3_5704S 0x16a8 |
| 2150 | #define PCI_DEVICE_ID_NX2_57800_VF 0x16a9 | 2150 | #define PCI_DEVICE_ID_NX2_57800_VF 0x16a9 |
| 2151 | #define PCI_DEVICE_ID_NX2_5706S 0x16aa | 2151 | #define PCI_DEVICE_ID_NX2_5706S 0x16aa |
| 2152 | #define PCI_DEVICE_ID_NX2_57840_MF 0x16ab | 2152 | #define PCI_DEVICE_ID_NX2_57840_MF 0x16a4 |
| 2153 | #define PCI_DEVICE_ID_NX2_5708S 0x16ac | 2153 | #define PCI_DEVICE_ID_NX2_5708S 0x16ac |
| 2154 | #define PCI_DEVICE_ID_NX2_57840_VF 0x16ad | 2154 | #define PCI_DEVICE_ID_NX2_57840_VF 0x16ad |
| 2155 | #define PCI_DEVICE_ID_NX2_57810_MF 0x16ae | 2155 | #define PCI_DEVICE_ID_NX2_57810_MF 0x16ae |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 76c5c8b724a7..33ed9d605f91 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -926,7 +926,7 @@ struct perf_event { | |||
| 926 | struct hw_perf_event hw; | 926 | struct hw_perf_event hw; |
| 927 | 927 | ||
| 928 | struct perf_event_context *ctx; | 928 | struct perf_event_context *ctx; |
| 929 | struct file *filp; | 929 | atomic_long_t refcount; |
| 930 | 930 | ||
| 931 | /* | 931 | /* |
| 932 | * These accumulate total time (in nanoseconds) that children | 932 | * These accumulate total time (in nanoseconds) that children |
| @@ -1272,7 +1272,8 @@ static inline bool perf_paranoid_kernel(void) | |||
| 1272 | extern void perf_event_init(void); | 1272 | extern void perf_event_init(void); |
| 1273 | extern void perf_tp_event(u64 addr, u64 count, void *record, | 1273 | extern void perf_tp_event(u64 addr, u64 count, void *record, |
| 1274 | int entry_size, struct pt_regs *regs, | 1274 | int entry_size, struct pt_regs *regs, |
| 1275 | struct hlist_head *head, int rctx); | 1275 | struct hlist_head *head, int rctx, |
| 1276 | struct task_struct *task); | ||
| 1276 | extern void perf_bp_event(struct perf_event *event, void *data); | 1277 | extern void perf_bp_event(struct perf_event *event, void *data); |
| 1277 | 1278 | ||
| 1278 | #ifndef perf_misc_flags | 1279 | #ifndef perf_misc_flags |
| @@ -1295,6 +1296,7 @@ extern int perf_swevent_get_recursion_context(void); | |||
| 1295 | extern void perf_swevent_put_recursion_context(int rctx); | 1296 | extern void perf_swevent_put_recursion_context(int rctx); |
| 1296 | extern void perf_event_enable(struct perf_event *event); | 1297 | extern void perf_event_enable(struct perf_event *event); |
| 1297 | extern void perf_event_disable(struct perf_event *event); | 1298 | extern void perf_event_disable(struct perf_event *event); |
| 1299 | extern int __perf_event_disable(void *info); | ||
| 1298 | extern void perf_event_task_tick(void); | 1300 | extern void perf_event_task_tick(void); |
| 1299 | #else | 1301 | #else |
| 1300 | static inline void | 1302 | static inline void |
| @@ -1333,6 +1335,7 @@ static inline int perf_swevent_get_recursion_context(void) { return -1; } | |||
| 1333 | static inline void perf_swevent_put_recursion_context(int rctx) { } | 1335 | static inline void perf_swevent_put_recursion_context(int rctx) { } |
| 1334 | static inline void perf_event_enable(struct perf_event *event) { } | 1336 | static inline void perf_event_enable(struct perf_event *event) { } |
| 1335 | static inline void perf_event_disable(struct perf_event *event) { } | 1337 | static inline void perf_event_disable(struct perf_event *event) { } |
| 1338 | static inline int __perf_event_disable(void *info) { return -1; } | ||
| 1336 | static inline void perf_event_task_tick(void) { } | 1339 | static inline void perf_event_task_tick(void) { } |
| 1337 | #endif | 1340 | #endif |
| 1338 | 1341 | ||
diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h index 6dd96fb45482..e9b7f4350844 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | /* This struct is private to the core and should be regarded as a cookie */ | 20 | /* This struct is private to the core and should be regarded as a cookie */ |
| 21 | struct pinctrl; | 21 | struct pinctrl; |
| 22 | struct pinctrl_state; | 22 | struct pinctrl_state; |
| 23 | struct device; | ||
| 23 | 24 | ||
| 24 | #ifdef CONFIG_PINCTRL | 25 | #ifdef CONFIG_PINCTRL |
| 25 | 26 | ||
diff --git a/include/linux/platform_data/asoc-imx-ssi.h b/include/linux/platform_data/asoc-imx-ssi.h new file mode 100644 index 000000000000..63f3c2804239 --- /dev/null +++ b/include/linux/platform_data/asoc-imx-ssi.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | #ifndef __MACH_SSI_H | ||
| 2 | #define __MACH_SSI_H | ||
| 3 | |||
| 4 | struct snd_ac97; | ||
| 5 | |||
| 6 | extern unsigned char imx_ssi_fiq_start, imx_ssi_fiq_end; | ||
| 7 | extern unsigned long imx_ssi_fiq_base, imx_ssi_fiq_tx_buffer, imx_ssi_fiq_rx_buffer; | ||
| 8 | |||
| 9 | struct imx_ssi_platform_data { | ||
| 10 | unsigned int flags; | ||
| 11 | #define IMX_SSI_DMA (1 << 0) | ||
| 12 | #define IMX_SSI_USE_AC97 (1 << 1) | ||
| 13 | #define IMX_SSI_NET (1 << 2) | ||
| 14 | #define IMX_SSI_SYN (1 << 3) | ||
| 15 | #define IMX_SSI_USE_I2S_SLAVE (1 << 4) | ||
| 16 | void (*ac97_reset) (struct snd_ac97 *ac97); | ||
| 17 | void (*ac97_warm_reset)(struct snd_ac97 *ac97); | ||
| 18 | }; | ||
| 19 | |||
| 20 | #endif /* __MACH_SSI_H */ | ||
| 21 | |||
diff --git a/include/linux/platform_data/asoc-kirkwood.h b/include/linux/platform_data/asoc-kirkwood.h new file mode 100644 index 000000000000..d6a55bd2e578 --- /dev/null +++ b/include/linux/platform_data/asoc-kirkwood.h | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | #ifndef __PLAT_AUDIO_H | ||
| 2 | #define __PLAT_AUDIO_H | ||
| 3 | |||
| 4 | struct kirkwood_asoc_platform_data { | ||
| 5 | int burst; | ||
| 6 | }; | ||
| 7 | #endif | ||
diff --git a/include/linux/platform_data/asoc-palm27x.h b/include/linux/platform_data/asoc-palm27x.h new file mode 100644 index 000000000000..58afb30d5298 --- /dev/null +++ b/include/linux/platform_data/asoc-palm27x.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #ifndef _INCLUDE_PALMASOC_H_ | ||
| 2 | #define _INCLUDE_PALMASOC_H_ | ||
| 3 | |||
| 4 | struct palm27x_asoc_info { | ||
| 5 | int jack_gpio; | ||
| 6 | }; | ||
| 7 | |||
| 8 | #endif | ||
diff --git a/include/linux/platform_data/asoc-s3c.h b/include/linux/platform_data/asoc-s3c.h new file mode 100644 index 000000000000..aa9875f77c40 --- /dev/null +++ b/include/linux/platform_data/asoc-s3c.h | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | /* arch/arm/plat-samsung/include/plat/audio.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2009 Samsung Electronics Co. Ltd | ||
| 4 | * Author: Jaswinder Singh <jassi.brar@samsung.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | /* The machine init code calls s3c*_ac97_setup_gpio with | ||
| 12 | * one of these defines in order to select appropriate bank | ||
| 13 | * of GPIO for AC97 pins | ||
| 14 | */ | ||
| 15 | #define S3C64XX_AC97_GPD 0 | ||
| 16 | #define S3C64XX_AC97_GPE 1 | ||
| 17 | extern void s3c64xx_ac97_setup_gpio(int); | ||
| 18 | |||
| 19 | /* | ||
| 20 | * The machine init code calls s5p*_spdif_setup_gpio with | ||
| 21 | * one of these defines in order to select appropriate bank | ||
| 22 | * of GPIO for S/PDIF pins | ||
| 23 | */ | ||
| 24 | #define S5PC100_SPDIF_GPD 0 | ||
| 25 | #define S5PC100_SPDIF_GPG3 1 | ||
| 26 | extern void s5pc100_spdif_setup_gpio(int); | ||
| 27 | |||
| 28 | struct samsung_i2s { | ||
| 29 | /* If the Primary DAI has 5.1 Channels */ | ||
| 30 | #define QUIRK_PRI_6CHAN (1 << 0) | ||
| 31 | /* If the I2S block has a Stereo Overlay Channel */ | ||
| 32 | #define QUIRK_SEC_DAI (1 << 1) | ||
| 33 | /* | ||
| 34 | * If the I2S block has no internal prescalar or MUX (I2SMOD[10] bit) | ||
| 35 | * The Machine driver must provide suitably set clock to the I2S block. | ||
| 36 | */ | ||
| 37 | #define QUIRK_NO_MUXPSR (1 << 2) | ||
| 38 | #define QUIRK_NEED_RSTCLR (1 << 3) | ||
| 39 | /* Quirks of the I2S controller */ | ||
| 40 | u32 quirks; | ||
| 41 | |||
| 42 | /* | ||
| 43 | * Array of clock names that can be used to generate I2S signals. | ||
| 44 | * Also corresponds to clocks of I2SMOD[10] | ||
| 45 | */ | ||
| 46 | const char **src_clk; | ||
| 47 | dma_addr_t idma_addr; | ||
| 48 | }; | ||
| 49 | |||
| 50 | /** | ||
| 51 | * struct s3c_audio_pdata - common platform data for audio device drivers | ||
| 52 | * @cfg_gpio: Callback function to setup mux'ed pins in I2S/PCM/AC97 mode | ||
| 53 | */ | ||
| 54 | struct s3c_audio_pdata { | ||
| 55 | int (*cfg_gpio)(struct platform_device *); | ||
| 56 | union { | ||
| 57 | struct samsung_i2s i2s; | ||
| 58 | } type; | ||
| 59 | }; | ||
diff --git a/include/linux/platform_data/asoc-s3c24xx_simtec.h b/include/linux/platform_data/asoc-s3c24xx_simtec.h new file mode 100644 index 000000000000..376af5286a3e --- /dev/null +++ b/include/linux/platform_data/asoc-s3c24xx_simtec.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* arch/arm/plat-samsung/include/plat/audio-simtec.h | ||
| 2 | * | ||
| 3 | * Copyright 2008 Simtec Electronics | ||
| 4 | * http://armlinux.simtec.co.uk/ | ||
| 5 | * Ben Dooks <ben@simtec.co.uk> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | * | ||
| 11 | * Simtec Audio support. | ||
| 12 | */ | ||
| 13 | |||
| 14 | /** | ||
| 15 | * struct s3c24xx_audio_simtec_pdata - platform data for simtec audio | ||
| 16 | * @use_mpllin: Select codec clock from MPLLin | ||
| 17 | * @output_cdclk: Need to output CDCLK to the codec | ||
| 18 | * @have_mic: Set if we have a MIC socket | ||
| 19 | * @have_lout: Set if we have a LineOut socket | ||
| 20 | * @amp_gpio: GPIO pin to enable the AMP | ||
| 21 | * @amp_gain: Option GPIO to control AMP gain | ||
| 22 | */ | ||
| 23 | struct s3c24xx_audio_simtec_pdata { | ||
| 24 | unsigned int use_mpllin:1; | ||
| 25 | unsigned int output_cdclk:1; | ||
| 26 | |||
| 27 | unsigned int have_mic:1; | ||
| 28 | unsigned int have_lout:1; | ||
| 29 | |||
| 30 | int amp_gpio; | ||
| 31 | int amp_gain[2]; | ||
| 32 | |||
| 33 | void (*startup)(void); | ||
| 34 | }; | ||
diff --git a/include/linux/platform_data/asoc-ti-mcbsp.h b/include/linux/platform_data/asoc-ti-mcbsp.h new file mode 100644 index 000000000000..18814127809a --- /dev/null +++ b/include/linux/platform_data/asoc-ti-mcbsp.h | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/plat-omap/include/mach/mcbsp.h | ||
| 3 | * | ||
| 4 | * Defines for Multi-Channel Buffered Serial Port | ||
| 5 | * | ||
| 6 | * Copyright (C) 2002 RidgeRun, Inc. | ||
| 7 | * Author: Steve Johnson | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License | ||
| 20 | * along with this program; if not, write to the Free Software | ||
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 22 | * | ||
| 23 | */ | ||
| 24 | #ifndef __ASM_ARCH_OMAP_MCBSP_H | ||
| 25 | #define __ASM_ARCH_OMAP_MCBSP_H | ||
| 26 | |||
| 27 | #include <linux/spinlock.h> | ||
| 28 | #include <linux/clk.h> | ||
| 29 | |||
| 30 | #define MCBSP_CONFIG_TYPE2 0x2 | ||
| 31 | #define MCBSP_CONFIG_TYPE3 0x3 | ||
| 32 | #define MCBSP_CONFIG_TYPE4 0x4 | ||
| 33 | |||
| 34 | /* Platform specific configuration */ | ||
| 35 | struct omap_mcbsp_ops { | ||
| 36 | void (*request)(unsigned int); | ||
| 37 | void (*free)(unsigned int); | ||
| 38 | }; | ||
| 39 | |||
| 40 | struct omap_mcbsp_platform_data { | ||
| 41 | struct omap_mcbsp_ops *ops; | ||
| 42 | u16 buffer_size; | ||
| 43 | u8 reg_size; | ||
| 44 | u8 reg_step; | ||
| 45 | |||
| 46 | /* McBSP platform and instance specific features */ | ||
| 47 | bool has_wakeup; /* Wakeup capability */ | ||
| 48 | bool has_ccr; /* Transceiver has configuration control registers */ | ||
| 49 | int (*enable_st_clock)(unsigned int, bool); | ||
| 50 | int (*set_clk_src)(struct device *dev, struct clk *clk, const char *src); | ||
| 51 | int (*mux_signal)(struct device *dev, const char *signal, const char *src); | ||
| 52 | }; | ||
| 53 | |||
| 54 | /** | ||
| 55 | * omap_mcbsp_dev_attr - OMAP McBSP device attributes for omap_hwmod | ||
| 56 | * @sidetone: name of the sidetone device | ||
| 57 | */ | ||
| 58 | struct omap_mcbsp_dev_attr { | ||
| 59 | const char *sidetone; | ||
| 60 | }; | ||
| 61 | |||
| 62 | #endif | ||
diff --git a/include/linux/platform_data/ata-pxa.h b/include/linux/platform_data/ata-pxa.h new file mode 100644 index 000000000000..6cf7df1d5830 --- /dev/null +++ b/include/linux/platform_data/ata-pxa.h | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | /* | ||
| 2 | * Generic PXA PATA driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; see the file COPYING. If not, write to | ||
| 18 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef __MACH_PATA_PXA_H__ | ||
| 22 | #define __MACH_PATA_PXA_H__ | ||
| 23 | |||
| 24 | struct pata_pxa_pdata { | ||
| 25 | /* PXA DMA DREQ<0:2> pin */ | ||
| 26 | uint32_t dma_dreq; | ||
| 27 | /* Register shift */ | ||
| 28 | uint32_t reg_shift; | ||
| 29 | /* IRQ flags */ | ||
| 30 | uint32_t irq_flags; | ||
| 31 | }; | ||
| 32 | |||
| 33 | #endif /* __MACH_PATA_PXA_H__ */ | ||
diff --git a/include/linux/platform_data/ata-samsung_cf.h b/include/linux/platform_data/ata-samsung_cf.h new file mode 100644 index 000000000000..2a3855a8372a --- /dev/null +++ b/include/linux/platform_data/ata-samsung_cf.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/include/plat/ata.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
| 4 | * http://www.samsung.com | ||
| 5 | * | ||
| 6 | * Samsung CF-ATA platform_device info | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 as | ||
| 10 | * published by the Free Software Foundation. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __ASM_PLAT_ATA_H | ||
| 14 | #define __ASM_PLAT_ATA_H __FILE__ | ||
| 15 | |||
| 16 | /** | ||
| 17 | * struct s3c_ide_platdata - S3C IDE driver platform data. | ||
| 18 | * @setup_gpio: Setup the external GPIO pins to the right state for data | ||
| 19 | * transfer in true-ide mode. | ||
| 20 | */ | ||
| 21 | struct s3c_ide_platdata { | ||
| 22 | void (*setup_gpio)(void); | ||
| 23 | }; | ||
| 24 | |||
| 25 | /* | ||
| 26 | * s3c_ide_set_platdata() - Setup the platform specifc data for IDE driver. | ||
| 27 | * @pdata: Platform data for IDE driver. | ||
| 28 | */ | ||
| 29 | extern void s3c_ide_set_platdata(struct s3c_ide_platdata *pdata); | ||
| 30 | |||
| 31 | /* architecture-specific IDE configuration */ | ||
| 32 | extern void s3c64xx_ide_setup_gpio(void); | ||
| 33 | extern void s5pc100_ide_setup_gpio(void); | ||
| 34 | extern void s5pv210_ide_setup_gpio(void); | ||
| 35 | |||
| 36 | #endif /*__ASM_PLAT_ATA_H */ | ||
diff --git a/include/linux/platform_data/atmel-aes.h b/include/linux/platform_data/atmel-aes.h index e7a1949bad26..ab68082fbcb0 100644 --- a/include/linux/platform_data/atmel-aes.h +++ b/include/linux/platform_data/atmel-aes.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #ifndef __LINUX_ATMEL_AES_H | 1 | #ifndef __LINUX_ATMEL_AES_H |
| 2 | #define __LINUX_ATMEL_AES_H | 2 | #define __LINUX_ATMEL_AES_H |
| 3 | 3 | ||
| 4 | #include <mach/at_hdmac.h> | 4 | #include <linux/platform_data/dma-atmel.h> |
| 5 | 5 | ||
| 6 | /** | 6 | /** |
| 7 | * struct aes_dma_data - DMA data for AES | 7 | * struct aes_dma_data - DMA data for AES |
diff --git a/include/linux/platform_data/camera-mx1.h b/include/linux/platform_data/camera-mx1.h new file mode 100644 index 000000000000..4fd6c70314b4 --- /dev/null +++ b/include/linux/platform_data/camera-mx1.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* | ||
| 2 | * mx1_camera.h - i.MX1/i.MXL camera driver header file | ||
| 3 | * | ||
| 4 | * Copyright (c) 2008, Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | ||
| 5 | * Copyright (C) 2009, Darius Augulis <augulis.darius@gmail.com> | ||
| 6 | * | ||
| 7 | * Based on PXA camera.h file: | ||
| 8 | * Copyright (C) 2003, Intel Corporation | ||
| 9 | * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de> | ||
| 10 | * | ||
| 11 | * This program is free software; you can redistribute it and/or modify | ||
| 12 | * it under the terms of the GNU General Public License version 2 as | ||
| 13 | * published by the Free Software Foundation. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #ifndef __ASM_ARCH_CAMERA_H_ | ||
| 17 | #define __ASM_ARCH_CAMERA_H_ | ||
| 18 | |||
| 19 | #define MX1_CAMERA_DATA_HIGH 1 | ||
| 20 | #define MX1_CAMERA_PCLK_RISING 2 | ||
| 21 | #define MX1_CAMERA_VSYNC_HIGH 4 | ||
| 22 | |||
| 23 | extern unsigned char mx1_camera_sof_fiq_start, mx1_camera_sof_fiq_end; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * struct mx1_camera_pdata - i.MX1/i.MXL camera platform data | ||
| 27 | * @mclk_10khz: master clock frequency in 10kHz units | ||
| 28 | * @flags: MX1 camera platform flags | ||
| 29 | */ | ||
| 30 | struct mx1_camera_pdata { | ||
| 31 | unsigned long mclk_10khz; | ||
| 32 | unsigned long flags; | ||
| 33 | }; | ||
| 34 | |||
| 35 | #endif /* __ASM_ARCH_CAMERA_H_ */ | ||
diff --git a/include/linux/platform_data/camera-mx2.h b/include/linux/platform_data/camera-mx2.h new file mode 100644 index 000000000000..7ded6f1f74bc --- /dev/null +++ b/include/linux/platform_data/camera-mx2.h | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | /* | ||
| 2 | * mx2-cam.h - i.MX27/i.MX25 camera driver header file | ||
| 3 | * | ||
| 4 | * Copyright (C) 2003, Intel Corporation | ||
| 5 | * Copyright (C) 2008, Sascha Hauer <s.hauer@pengutronix.de> | ||
| 6 | * Copyright (C) 2010, Baruch Siach <baruch@tkos.co.il> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License as published by | ||
| 10 | * the Free Software Foundation; either version 2 of the License, or | ||
| 11 | * (at your option) any later version. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with this program; if not, write to the Free Software | ||
| 20 | * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 21 | */ | ||
| 22 | |||
| 23 | #ifndef __MACH_MX2_CAM_H_ | ||
| 24 | #define __MACH_MX2_CAM_H_ | ||
| 25 | |||
| 26 | #define MX2_CAMERA_EXT_VSYNC (1 << 1) | ||
| 27 | #define MX2_CAMERA_CCIR (1 << 2) | ||
| 28 | #define MX2_CAMERA_CCIR_INTERLACE (1 << 3) | ||
| 29 | #define MX2_CAMERA_HSYNC_HIGH (1 << 4) | ||
| 30 | #define MX2_CAMERA_GATED_CLOCK (1 << 5) | ||
| 31 | #define MX2_CAMERA_INV_DATA (1 << 6) | ||
| 32 | #define MX2_CAMERA_PCLK_SAMPLE_RISING (1 << 7) | ||
| 33 | |||
| 34 | /** | ||
| 35 | * struct mx2_camera_platform_data - optional platform data for mx2_camera | ||
| 36 | * @flags: any combination of MX2_CAMERA_* | ||
| 37 | * @clk: clock rate of the csi block / 2 | ||
| 38 | */ | ||
| 39 | struct mx2_camera_platform_data { | ||
| 40 | unsigned long flags; | ||
| 41 | unsigned long clk; | ||
| 42 | }; | ||
| 43 | |||
| 44 | #endif /* __MACH_MX2_CAM_H_ */ | ||
diff --git a/include/linux/platform_data/camera-mx3.h b/include/linux/platform_data/camera-mx3.h new file mode 100644 index 000000000000..f226ee3777e1 --- /dev/null +++ b/include/linux/platform_data/camera-mx3.h | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | /* | ||
| 2 | * mx3_camera.h - i.MX3x camera driver header file | ||
| 3 | * | ||
| 4 | * Copyright (C) 2008, Guennadi Liakhovetski, DENX Software Engineering, <lg@denx.de> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef _MX3_CAMERA_H_ | ||
| 18 | #define _MX3_CAMERA_H_ | ||
| 19 | |||
| 20 | #include <linux/device.h> | ||
| 21 | |||
| 22 | #define MX3_CAMERA_CLK_SRC 1 | ||
| 23 | #define MX3_CAMERA_EXT_VSYNC 2 | ||
| 24 | #define MX3_CAMERA_DP 4 | ||
| 25 | #define MX3_CAMERA_PCP 8 | ||
| 26 | #define MX3_CAMERA_HSP 0x10 | ||
| 27 | #define MX3_CAMERA_VSP 0x20 | ||
| 28 | #define MX3_CAMERA_DATAWIDTH_4 0x40 | ||
| 29 | #define MX3_CAMERA_DATAWIDTH_8 0x80 | ||
| 30 | #define MX3_CAMERA_DATAWIDTH_10 0x100 | ||
| 31 | #define MX3_CAMERA_DATAWIDTH_15 0x200 | ||
| 32 | |||
| 33 | #define MX3_CAMERA_DATAWIDTH_MASK (MX3_CAMERA_DATAWIDTH_4 | MX3_CAMERA_DATAWIDTH_8 | \ | ||
| 34 | MX3_CAMERA_DATAWIDTH_10 | MX3_CAMERA_DATAWIDTH_15) | ||
| 35 | |||
| 36 | /** | ||
| 37 | * struct mx3_camera_pdata - i.MX3x camera platform data | ||
| 38 | * @flags: MX3_CAMERA_* flags | ||
| 39 | * @mclk_10khz: master clock frequency in 10kHz units | ||
| 40 | * @dma_dev: IPU DMA device to match against in channel allocation | ||
| 41 | */ | ||
| 42 | struct mx3_camera_pdata { | ||
| 43 | unsigned long flags; | ||
| 44 | unsigned long mclk_10khz; | ||
| 45 | struct device *dma_dev; | ||
| 46 | }; | ||
| 47 | |||
| 48 | #endif | ||
diff --git a/include/linux/platform_data/camera-pxa.h b/include/linux/platform_data/camera-pxa.h new file mode 100644 index 000000000000..6709b1cd7c77 --- /dev/null +++ b/include/linux/platform_data/camera-pxa.h | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | /* | ||
| 2 | camera.h - PXA camera driver header file | ||
| 3 | |||
| 4 | Copyright (C) 2003, Intel Corporation | ||
| 5 | Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de> | ||
| 6 | |||
| 7 | This program is free software; you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation; either version 2 of the License, or | ||
| 10 | (at your option) any later version. | ||
| 11 | |||
| 12 | This program is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with this program; if not, write to the Free Software | ||
| 19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 20 | */ | ||
| 21 | |||
| 22 | #ifndef __ASM_ARCH_CAMERA_H_ | ||
| 23 | #define __ASM_ARCH_CAMERA_H_ | ||
| 24 | |||
| 25 | #define PXA_CAMERA_MASTER 1 | ||
| 26 | #define PXA_CAMERA_DATAWIDTH_4 2 | ||
| 27 | #define PXA_CAMERA_DATAWIDTH_5 4 | ||
| 28 | #define PXA_CAMERA_DATAWIDTH_8 8 | ||
| 29 | #define PXA_CAMERA_DATAWIDTH_9 0x10 | ||
| 30 | #define PXA_CAMERA_DATAWIDTH_10 0x20 | ||
| 31 | #define PXA_CAMERA_PCLK_EN 0x40 | ||
| 32 | #define PXA_CAMERA_MCLK_EN 0x80 | ||
| 33 | #define PXA_CAMERA_PCP 0x100 | ||
| 34 | #define PXA_CAMERA_HSP 0x200 | ||
| 35 | #define PXA_CAMERA_VSP 0x400 | ||
| 36 | |||
| 37 | struct pxacamera_platform_data { | ||
| 38 | unsigned long flags; | ||
| 39 | unsigned long mclk_10khz; | ||
| 40 | }; | ||
| 41 | |||
| 42 | extern void pxa_set_camera_info(struct pxacamera_platform_data *); | ||
| 43 | |||
| 44 | #endif /* __ASM_ARCH_CAMERA_H_ */ | ||
diff --git a/include/linux/platform_data/clk-realview.h b/include/linux/platform_data/clk-realview.h new file mode 100644 index 000000000000..2e426a7dbc51 --- /dev/null +++ b/include/linux/platform_data/clk-realview.h | |||
| @@ -0,0 +1 @@ | |||
| void realview_clk_init(void __iomem *sysbase, bool is_pb1176); | |||
diff --git a/include/linux/platform_data/clk-ux500.h b/include/linux/platform_data/clk-ux500.h new file mode 100644 index 000000000000..3af0da1f3be5 --- /dev/null +++ b/include/linux/platform_data/clk-ux500.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* | ||
| 2 | * Clock definitions for ux500 platforms | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 ST-Ericsson SA | ||
| 5 | * Author: Ulf Hansson <ulf.hansson@linaro.org> | ||
| 6 | * | ||
| 7 | * License terms: GNU General Public License (GPL) version 2 | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __CLK_UX500_H | ||
| 11 | #define __CLK_UX500_H | ||
| 12 | |||
| 13 | void u8500_clk_init(void); | ||
| 14 | void u9540_clk_init(void); | ||
| 15 | void u8540_clk_init(void); | ||
| 16 | |||
| 17 | #endif /* __CLK_UX500_H */ | ||
diff --git a/include/linux/platform_data/crypto-ux500.h b/include/linux/platform_data/crypto-ux500.h new file mode 100644 index 000000000000..5b2d0817e26a --- /dev/null +++ b/include/linux/platform_data/crypto-ux500.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) ST-Ericsson SA 2011 | ||
| 3 | * | ||
| 4 | * Author: Joakim Bech <joakim.xx.bech@stericsson.com> for ST-Ericsson | ||
| 5 | * License terms: GNU General Public License (GPL) version 2 | ||
| 6 | */ | ||
| 7 | #ifndef _CRYPTO_UX500_H | ||
| 8 | #define _CRYPTO_UX500_H | ||
| 9 | #include <linux/dmaengine.h> | ||
| 10 | #include <plat/ste_dma40.h> | ||
| 11 | |||
| 12 | struct hash_platform_data { | ||
| 13 | void *mem_to_engine; | ||
| 14 | bool (*dma_filter)(struct dma_chan *chan, void *filter_param); | ||
| 15 | }; | ||
| 16 | |||
| 17 | struct cryp_platform_data { | ||
| 18 | struct stedma40_chan_cfg mem_to_engine; | ||
| 19 | struct stedma40_chan_cfg engine_to_mem; | ||
| 20 | }; | ||
| 21 | |||
| 22 | #endif | ||
diff --git a/include/linux/platform_data/dma-atmel.h b/include/linux/platform_data/dma-atmel.h new file mode 100644 index 000000000000..cab0997be3de --- /dev/null +++ b/include/linux/platform_data/dma-atmel.h | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | /* | ||
| 2 | * Header file for the Atmel AHB DMA Controller driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2008 Atmel Corporation | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | */ | ||
| 11 | #ifndef AT_HDMAC_H | ||
| 12 | #define AT_HDMAC_H | ||
| 13 | |||
| 14 | #include <linux/dmaengine.h> | ||
| 15 | |||
| 16 | /** | ||
| 17 | * struct at_dma_platform_data - Controller configuration parameters | ||
| 18 | * @nr_channels: Number of channels supported by hardware (max 8) | ||
| 19 | * @cap_mask: dma_capability flags supported by the platform | ||
| 20 | */ | ||
| 21 | struct at_dma_platform_data { | ||
| 22 | unsigned int nr_channels; | ||
| 23 | dma_cap_mask_t cap_mask; | ||
| 24 | }; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * struct at_dma_slave - Controller-specific information about a slave | ||
| 28 | * @dma_dev: required DMA master device | ||
| 29 | * @cfg: Platform-specific initializer for the CFG register | ||
| 30 | */ | ||
| 31 | struct at_dma_slave { | ||
| 32 | struct device *dma_dev; | ||
| 33 | u32 cfg; | ||
| 34 | }; | ||
| 35 | |||
| 36 | |||
| 37 | /* Platform-configurable bits in CFG */ | ||
| 38 | #define ATC_SRC_PER(h) (0xFU & (h)) /* Channel src rq associated with periph handshaking ifc h */ | ||
| 39 | #define ATC_DST_PER(h) ((0xFU & (h)) << 4) /* Channel dst rq associated with periph handshaking ifc h */ | ||
| 40 | #define ATC_SRC_REP (0x1 << 8) /* Source Replay Mod */ | ||
| 41 | #define ATC_SRC_H2SEL (0x1 << 9) /* Source Handshaking Mod */ | ||
| 42 | #define ATC_SRC_H2SEL_SW (0x0 << 9) | ||
| 43 | #define ATC_SRC_H2SEL_HW (0x1 << 9) | ||
| 44 | #define ATC_DST_REP (0x1 << 12) /* Destination Replay Mod */ | ||
| 45 | #define ATC_DST_H2SEL (0x1 << 13) /* Destination Handshaking Mod */ | ||
| 46 | #define ATC_DST_H2SEL_SW (0x0 << 13) | ||
| 47 | #define ATC_DST_H2SEL_HW (0x1 << 13) | ||
| 48 | #define ATC_SOD (0x1 << 16) /* Stop On Done */ | ||
| 49 | #define ATC_LOCK_IF (0x1 << 20) /* Interface Lock */ | ||
| 50 | #define ATC_LOCK_B (0x1 << 21) /* AHB Bus Lock */ | ||
| 51 | #define ATC_LOCK_IF_L (0x1 << 22) /* Master Interface Arbiter Lock */ | ||
| 52 | #define ATC_LOCK_IF_L_CHUNK (0x0 << 22) | ||
| 53 | #define ATC_LOCK_IF_L_BUFFER (0x1 << 22) | ||
| 54 | #define ATC_AHB_PROT_MASK (0x7 << 24) /* AHB Protection */ | ||
| 55 | #define ATC_FIFOCFG_MASK (0x3 << 28) /* FIFO Request Configuration */ | ||
| 56 | #define ATC_FIFOCFG_LARGESTBURST (0x0 << 28) | ||
| 57 | #define ATC_FIFOCFG_HALFFIFO (0x1 << 28) | ||
| 58 | #define ATC_FIFOCFG_ENOUGHSPACE (0x2 << 28) | ||
| 59 | |||
| 60 | |||
| 61 | #endif /* AT_HDMAC_H */ | ||
diff --git a/include/linux/platform_data/dma-ep93xx.h b/include/linux/platform_data/dma-ep93xx.h new file mode 100644 index 000000000000..e82c642fa53c --- /dev/null +++ b/include/linux/platform_data/dma-ep93xx.h | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | #ifndef __ASM_ARCH_DMA_H | ||
| 2 | #define __ASM_ARCH_DMA_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | #include <linux/dmaengine.h> | ||
| 6 | #include <linux/dma-mapping.h> | ||
| 7 | |||
| 8 | /* | ||
| 9 | * M2P channels. | ||
| 10 | * | ||
| 11 | * Note that these values are also directly used for setting the PPALLOC | ||
| 12 | * register. | ||
| 13 | */ | ||
| 14 | #define EP93XX_DMA_I2S1 0 | ||
| 15 | #define EP93XX_DMA_I2S2 1 | ||
| 16 | #define EP93XX_DMA_AAC1 2 | ||
| 17 | #define EP93XX_DMA_AAC2 3 | ||
| 18 | #define EP93XX_DMA_AAC3 4 | ||
| 19 | #define EP93XX_DMA_I2S3 5 | ||
| 20 | #define EP93XX_DMA_UART1 6 | ||
| 21 | #define EP93XX_DMA_UART2 7 | ||
| 22 | #define EP93XX_DMA_UART3 8 | ||
| 23 | #define EP93XX_DMA_IRDA 9 | ||
| 24 | /* M2M channels */ | ||
| 25 | #define EP93XX_DMA_SSP 10 | ||
| 26 | #define EP93XX_DMA_IDE 11 | ||
| 27 | |||
| 28 | /** | ||
| 29 | * struct ep93xx_dma_data - configuration data for the EP93xx dmaengine | ||
| 30 | * @port: peripheral which is requesting the channel | ||
| 31 | * @direction: TX/RX channel | ||
| 32 | * @name: optional name for the channel, this is displayed in /proc/interrupts | ||
| 33 | * | ||
| 34 | * This information is passed as private channel parameter in a filter | ||
| 35 | * function. Note that this is only needed for slave/cyclic channels. For | ||
| 36 | * memcpy channels %NULL data should be passed. | ||
| 37 | */ | ||
| 38 | struct ep93xx_dma_data { | ||
| 39 | int port; | ||
| 40 | enum dma_transfer_direction direction; | ||
| 41 | const char *name; | ||
| 42 | }; | ||
| 43 | |||
| 44 | /** | ||
| 45 | * struct ep93xx_dma_chan_data - platform specific data for a DMA channel | ||
| 46 | * @name: name of the channel, used for getting the right clock for the channel | ||
| 47 | * @base: mapped registers | ||
| 48 | * @irq: interrupt number used by this channel | ||
| 49 | */ | ||
| 50 | struct ep93xx_dma_chan_data { | ||
| 51 | const char *name; | ||
| 52 | void __iomem *base; | ||
| 53 | int irq; | ||
| 54 | }; | ||
| 55 | |||
| 56 | /** | ||
| 57 | * struct ep93xx_dma_platform_data - platform data for the dmaengine driver | ||
| 58 | * @channels: array of channels which are passed to the driver | ||
| 59 | * @num_channels: number of channels in the array | ||
| 60 | * | ||
| 61 | * This structure is passed to the DMA engine driver via platform data. For | ||
| 62 | * M2P channels, contract is that even channels are for TX and odd for RX. | ||
| 63 | * There is no requirement for the M2M channels. | ||
| 64 | */ | ||
| 65 | struct ep93xx_dma_platform_data { | ||
| 66 | struct ep93xx_dma_chan_data *channels; | ||
| 67 | size_t num_channels; | ||
| 68 | }; | ||
| 69 | |||
| 70 | static inline bool ep93xx_dma_chan_is_m2p(struct dma_chan *chan) | ||
| 71 | { | ||
| 72 | return !strcmp(dev_name(chan->device->dev), "ep93xx-dma-m2p"); | ||
| 73 | } | ||
| 74 | |||
| 75 | /** | ||
| 76 | * ep93xx_dma_chan_direction - returns direction the channel can be used | ||
| 77 | * @chan: channel | ||
| 78 | * | ||
| 79 | * This function can be used in filter functions to find out whether the | ||
| 80 | * channel supports given DMA direction. Only M2P channels have such | ||
| 81 | * limitation, for M2M channels the direction is configurable. | ||
| 82 | */ | ||
| 83 | static inline enum dma_transfer_direction | ||
| 84 | ep93xx_dma_chan_direction(struct dma_chan *chan) | ||
| 85 | { | ||
| 86 | if (!ep93xx_dma_chan_is_m2p(chan)) | ||
| 87 | return DMA_NONE; | ||
| 88 | |||
| 89 | /* even channels are for TX, odd for RX */ | ||
| 90 | return (chan->chan_id % 2 == 0) ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM; | ||
| 91 | } | ||
| 92 | |||
| 93 | #endif /* __ASM_ARCH_DMA_H */ | ||
diff --git a/include/linux/platform_data/dma-imx-sdma.h b/include/linux/platform_data/dma-imx-sdma.h new file mode 100644 index 000000000000..3a3942823c20 --- /dev/null +++ b/include/linux/platform_data/dma-imx-sdma.h | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | #ifndef __MACH_MXC_SDMA_H__ | ||
| 2 | #define __MACH_MXC_SDMA_H__ | ||
| 3 | |||
| 4 | /** | ||
| 5 | * struct sdma_script_start_addrs - SDMA script start pointers | ||
| 6 | * | ||
| 7 | * start addresses of the different functions in the physical | ||
| 8 | * address space of the SDMA engine. | ||
| 9 | */ | ||
| 10 | struct sdma_script_start_addrs { | ||
| 11 | s32 ap_2_ap_addr; | ||
| 12 | s32 ap_2_bp_addr; | ||
| 13 | s32 ap_2_ap_fixed_addr; | ||
| 14 | s32 bp_2_ap_addr; | ||
| 15 | s32 loopback_on_dsp_side_addr; | ||
| 16 | s32 mcu_interrupt_only_addr; | ||
| 17 | s32 firi_2_per_addr; | ||
| 18 | s32 firi_2_mcu_addr; | ||
| 19 | s32 per_2_firi_addr; | ||
| 20 | s32 mcu_2_firi_addr; | ||
| 21 | s32 uart_2_per_addr; | ||
| 22 | s32 uart_2_mcu_addr; | ||
| 23 | s32 per_2_app_addr; | ||
| 24 | s32 mcu_2_app_addr; | ||
| 25 | s32 per_2_per_addr; | ||
| 26 | s32 uartsh_2_per_addr; | ||
| 27 | s32 uartsh_2_mcu_addr; | ||
| 28 | s32 per_2_shp_addr; | ||
| 29 | s32 mcu_2_shp_addr; | ||
| 30 | s32 ata_2_mcu_addr; | ||
| 31 | s32 mcu_2_ata_addr; | ||
| 32 | s32 app_2_per_addr; | ||
| 33 | s32 app_2_mcu_addr; | ||
| 34 | s32 shp_2_per_addr; | ||
| 35 | s32 shp_2_mcu_addr; | ||
| 36 | s32 mshc_2_mcu_addr; | ||
| 37 | s32 mcu_2_mshc_addr; | ||
| 38 | s32 spdif_2_mcu_addr; | ||
| 39 | s32 mcu_2_spdif_addr; | ||
| 40 | s32 asrc_2_mcu_addr; | ||
| 41 | s32 ext_mem_2_ipu_addr; | ||
| 42 | s32 descrambler_addr; | ||
| 43 | s32 dptc_dvfs_addr; | ||
| 44 | s32 utra_addr; | ||
| 45 | s32 ram_code_start_addr; | ||
| 46 | }; | ||
| 47 | |||
| 48 | /** | ||
| 49 | * struct sdma_platform_data - platform specific data for SDMA engine | ||
| 50 | * | ||
| 51 | * @fw_name The firmware name | ||
| 52 | * @script_addrs SDMA scripts addresses in SDMA ROM | ||
| 53 | */ | ||
| 54 | struct sdma_platform_data { | ||
| 55 | char *fw_name; | ||
| 56 | struct sdma_script_start_addrs *script_addrs; | ||
| 57 | }; | ||
| 58 | |||
| 59 | #endif /* __MACH_MXC_SDMA_H__ */ | ||
diff --git a/include/linux/platform_data/dma-imx.h b/include/linux/platform_data/dma-imx.h new file mode 100644 index 000000000000..1b9080385b46 --- /dev/null +++ b/include/linux/platform_data/dma-imx.h | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2004-2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License version 2 as | ||
| 6 | * published by the Free Software Foundation. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef __ASM_ARCH_MXC_DMA_H__ | ||
| 10 | #define __ASM_ARCH_MXC_DMA_H__ | ||
| 11 | |||
| 12 | #include <linux/scatterlist.h> | ||
| 13 | #include <linux/device.h> | ||
| 14 | #include <linux/dmaengine.h> | ||
| 15 | |||
| 16 | /* | ||
| 17 | * This enumerates peripheral types. Used for SDMA. | ||
| 18 | */ | ||
| 19 | enum sdma_peripheral_type { | ||
| 20 | IMX_DMATYPE_SSI, /* MCU domain SSI */ | ||
| 21 | IMX_DMATYPE_SSI_SP, /* Shared SSI */ | ||
| 22 | IMX_DMATYPE_MMC, /* MMC */ | ||
| 23 | IMX_DMATYPE_SDHC, /* SDHC */ | ||
| 24 | IMX_DMATYPE_UART, /* MCU domain UART */ | ||
| 25 | IMX_DMATYPE_UART_SP, /* Shared UART */ | ||
| 26 | IMX_DMATYPE_FIRI, /* FIRI */ | ||
| 27 | IMX_DMATYPE_CSPI, /* MCU domain CSPI */ | ||
| 28 | IMX_DMATYPE_CSPI_SP, /* Shared CSPI */ | ||
| 29 | IMX_DMATYPE_SIM, /* SIM */ | ||
| 30 | IMX_DMATYPE_ATA, /* ATA */ | ||
| 31 | IMX_DMATYPE_CCM, /* CCM */ | ||
| 32 | IMX_DMATYPE_EXT, /* External peripheral */ | ||
| 33 | IMX_DMATYPE_MSHC, /* Memory Stick Host Controller */ | ||
| 34 | IMX_DMATYPE_MSHC_SP, /* Shared Memory Stick Host Controller */ | ||
| 35 | IMX_DMATYPE_DSP, /* DSP */ | ||
| 36 | IMX_DMATYPE_MEMORY, /* Memory */ | ||
| 37 | IMX_DMATYPE_FIFO_MEMORY,/* FIFO type Memory */ | ||
| 38 | IMX_DMATYPE_SPDIF, /* SPDIF */ | ||
| 39 | IMX_DMATYPE_IPU_MEMORY, /* IPU Memory */ | ||
| 40 | IMX_DMATYPE_ASRC, /* ASRC */ | ||
| 41 | IMX_DMATYPE_ESAI, /* ESAI */ | ||
| 42 | }; | ||
| 43 | |||
| 44 | enum imx_dma_prio { | ||
| 45 | DMA_PRIO_HIGH = 0, | ||
| 46 | DMA_PRIO_MEDIUM = 1, | ||
| 47 | DMA_PRIO_LOW = 2 | ||
| 48 | }; | ||
| 49 | |||
| 50 | struct imx_dma_data { | ||
| 51 | int dma_request; /* DMA request line */ | ||
| 52 | enum sdma_peripheral_type peripheral_type; | ||
| 53 | int priority; | ||
| 54 | }; | ||
| 55 | |||
| 56 | static inline int imx_dma_is_ipu(struct dma_chan *chan) | ||
| 57 | { | ||
| 58 | return !strcmp(dev_name(chan->device->dev), "ipu-core"); | ||
| 59 | } | ||
| 60 | |||
| 61 | static inline int imx_dma_is_general_purpose(struct dma_chan *chan) | ||
| 62 | { | ||
| 63 | return strstr(dev_name(chan->device->dev), "sdma") || | ||
| 64 | !strcmp(dev_name(chan->device->dev), "imx-dma"); | ||
| 65 | } | ||
| 66 | |||
| 67 | #endif | ||
diff --git a/include/linux/platform_data/dma-mmp_tdma.h b/include/linux/platform_data/dma-mmp_tdma.h new file mode 100644 index 000000000000..239e0fc1bb1f --- /dev/null +++ b/include/linux/platform_data/dma-mmp_tdma.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mach-mmp/include/mach/sram.h | ||
| 3 | * | ||
| 4 | * SRAM Memory Management | ||
| 5 | * | ||
| 6 | * Copyright (c) 2011 Marvell Semiconductors Inc. | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 as | ||
| 10 | * published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef __ASM_ARCH_SRAM_H | ||
| 15 | #define __ASM_ARCH_SRAM_H | ||
| 16 | |||
| 17 | #include <linux/genalloc.h> | ||
| 18 | |||
| 19 | /* ARBITRARY: SRAM allocations are multiples of this 2^N size */ | ||
| 20 | #define SRAM_GRANULARITY 512 | ||
| 21 | |||
| 22 | enum sram_type { | ||
| 23 | MMP_SRAM_UNDEFINED = 0, | ||
| 24 | MMP_ASRAM, | ||
| 25 | MMP_ISRAM, | ||
| 26 | }; | ||
| 27 | |||
| 28 | struct sram_platdata { | ||
| 29 | char *pool_name; | ||
| 30 | int granularity; | ||
| 31 | }; | ||
| 32 | |||
| 33 | extern struct gen_pool *sram_get_gpool(char *pool_name); | ||
| 34 | |||
| 35 | #endif /* __ASM_ARCH_SRAM_H */ | ||
diff --git a/include/linux/platform_data/dma-mv_xor.h b/include/linux/platform_data/dma-mv_xor.h new file mode 100644 index 000000000000..2ba1f7d76eef --- /dev/null +++ b/include/linux/platform_data/dma-mv_xor.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/plat-orion/include/plat/mv_xor.h | ||
| 3 | * | ||
| 4 | * Marvell XOR platform device data definition file. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #ifndef __PLAT_MV_XOR_H | ||
| 8 | #define __PLAT_MV_XOR_H | ||
| 9 | |||
| 10 | #include <linux/dmaengine.h> | ||
| 11 | #include <linux/mbus.h> | ||
| 12 | |||
| 13 | #define MV_XOR_SHARED_NAME "mv_xor_shared" | ||
| 14 | #define MV_XOR_NAME "mv_xor" | ||
| 15 | |||
| 16 | struct mv_xor_platform_data { | ||
| 17 | struct platform_device *shared; | ||
| 18 | int hw_id; | ||
| 19 | dma_cap_mask_t cap_mask; | ||
| 20 | size_t pool_size; | ||
| 21 | }; | ||
| 22 | |||
| 23 | |||
| 24 | #endif | ||
diff --git a/include/linux/platform_data/dsp-omap.h b/include/linux/platform_data/dsp-omap.h new file mode 100644 index 000000000000..5927709b1908 --- /dev/null +++ b/include/linux/platform_data/dsp-omap.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | #ifndef __OMAP_DSP_H__ | ||
| 2 | #define __OMAP_DSP_H__ | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | struct omap_dsp_platform_data { | ||
| 7 | void (*dsp_set_min_opp) (u8 opp_id); | ||
| 8 | u8 (*dsp_get_opp) (void); | ||
| 9 | void (*cpu_set_freq) (unsigned long f); | ||
| 10 | unsigned long (*cpu_get_freq) (void); | ||
| 11 | unsigned long mpu_speed[6]; | ||
| 12 | |||
| 13 | /* functions to write and read PRCM registers */ | ||
| 14 | void (*dsp_prm_write)(u32, s16 , u16); | ||
| 15 | u32 (*dsp_prm_read)(s16 , u16); | ||
| 16 | u32 (*dsp_prm_rmw_bits)(u32, u32, s16, s16); | ||
| 17 | void (*dsp_cm_write)(u32, s16 , u16); | ||
| 18 | u32 (*dsp_cm_read)(s16 , u16); | ||
| 19 | u32 (*dsp_cm_rmw_bits)(u32, u32, s16, s16); | ||
| 20 | |||
| 21 | void (*set_bootaddr)(u32); | ||
| 22 | void (*set_bootmode)(u8); | ||
| 23 | |||
| 24 | phys_addr_t phys_mempool_base; | ||
| 25 | phys_addr_t phys_mempool_size; | ||
| 26 | }; | ||
| 27 | |||
| 28 | #if defined(CONFIG_TIDSPBRIDGE) || defined(CONFIG_TIDSPBRIDGE_MODULE) | ||
| 29 | extern void omap_dsp_reserve_sdram_memblock(void); | ||
| 30 | #else | ||
| 31 | static inline void omap_dsp_reserve_sdram_memblock(void) { } | ||
| 32 | #endif | ||
| 33 | |||
| 34 | #endif | ||
diff --git a/include/linux/platform_data/eth-netx.h b/include/linux/platform_data/eth-netx.h new file mode 100644 index 000000000000..88af1ac28ead --- /dev/null +++ b/include/linux/platform_data/eth-netx.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-netx/include/mach/eth.h | ||
| 3 | * | ||
| 4 | * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 | ||
| 8 | * as published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef ASMARM_ARCH_ETH_H | ||
| 21 | #define ASMARM_ARCH_ETH_H | ||
| 22 | |||
| 23 | struct netxeth_platform_data { | ||
| 24 | unsigned int xcno; /* number of xmac/xpec engine this eth uses */ | ||
| 25 | }; | ||
| 26 | |||
| 27 | #endif | ||
diff --git a/include/linux/platform_data/gpio-omap.h b/include/linux/platform_data/gpio-omap.h new file mode 100644 index 000000000000..e8741c2678d5 --- /dev/null +++ b/include/linux/platform_data/gpio-omap.h | |||
| @@ -0,0 +1,217 @@ | |||
| 1 | /* | ||
| 2 | * OMAP GPIO handling defines and functions | ||
| 3 | * | ||
| 4 | * Copyright (C) 2003-2005 Nokia Corporation | ||
| 5 | * | ||
| 6 | * Written by Juha Yrjölä <juha.yrjola@nokia.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License as published by | ||
| 10 | * the Free Software Foundation; either version 2 of the License, or | ||
| 11 | * (at your option) any later version. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with this program; if not, write to the Free Software | ||
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 21 | * | ||
| 22 | */ | ||
| 23 | |||
| 24 | #ifndef __ASM_ARCH_OMAP_GPIO_H | ||
| 25 | #define __ASM_ARCH_OMAP_GPIO_H | ||
| 26 | |||
| 27 | #include <linux/io.h> | ||
| 28 | #include <linux/platform_device.h> | ||
| 29 | #include <mach/irqs.h> | ||
| 30 | |||
| 31 | #define OMAP1_MPUIO_BASE 0xfffb5000 | ||
| 32 | |||
| 33 | /* | ||
| 34 | * These are the omap15xx/16xx offsets. The omap7xx offset are | ||
| 35 | * OMAP_MPUIO_ / 2 offsets below. | ||
| 36 | */ | ||
| 37 | #define OMAP_MPUIO_INPUT_LATCH 0x00 | ||
| 38 | #define OMAP_MPUIO_OUTPUT 0x04 | ||
| 39 | #define OMAP_MPUIO_IO_CNTL 0x08 | ||
| 40 | #define OMAP_MPUIO_KBR_LATCH 0x10 | ||
| 41 | #define OMAP_MPUIO_KBC 0x14 | ||
| 42 | #define OMAP_MPUIO_GPIO_EVENT_MODE 0x18 | ||
| 43 | #define OMAP_MPUIO_GPIO_INT_EDGE 0x1c | ||
| 44 | #define OMAP_MPUIO_KBD_INT 0x20 | ||
| 45 | #define OMAP_MPUIO_GPIO_INT 0x24 | ||
| 46 | #define OMAP_MPUIO_KBD_MASKIT 0x28 | ||
| 47 | #define OMAP_MPUIO_GPIO_MASKIT 0x2c | ||
| 48 | #define OMAP_MPUIO_GPIO_DEBOUNCING 0x30 | ||
| 49 | #define OMAP_MPUIO_LATCH 0x34 | ||
| 50 | |||
| 51 | #define OMAP34XX_NR_GPIOS 6 | ||
| 52 | |||
| 53 | /* | ||
| 54 | * OMAP1510 GPIO registers | ||
| 55 | */ | ||
| 56 | #define OMAP1510_GPIO_DATA_INPUT 0x00 | ||
| 57 | #define OMAP1510_GPIO_DATA_OUTPUT 0x04 | ||
| 58 | #define OMAP1510_GPIO_DIR_CONTROL 0x08 | ||
| 59 | #define OMAP1510_GPIO_INT_CONTROL 0x0c | ||
| 60 | #define OMAP1510_GPIO_INT_MASK 0x10 | ||
| 61 | #define OMAP1510_GPIO_INT_STATUS 0x14 | ||
| 62 | #define OMAP1510_GPIO_PIN_CONTROL 0x18 | ||
| 63 | |||
| 64 | #define OMAP1510_IH_GPIO_BASE 64 | ||
| 65 | |||
| 66 | /* | ||
| 67 | * OMAP1610 specific GPIO registers | ||
| 68 | */ | ||
| 69 | #define OMAP1610_GPIO_REVISION 0x0000 | ||
| 70 | #define OMAP1610_GPIO_SYSCONFIG 0x0010 | ||
| 71 | #define OMAP1610_GPIO_SYSSTATUS 0x0014 | ||
| 72 | #define OMAP1610_GPIO_IRQSTATUS1 0x0018 | ||
| 73 | #define OMAP1610_GPIO_IRQENABLE1 0x001c | ||
| 74 | #define OMAP1610_GPIO_WAKEUPENABLE 0x0028 | ||
| 75 | #define OMAP1610_GPIO_DATAIN 0x002c | ||
| 76 | #define OMAP1610_GPIO_DATAOUT 0x0030 | ||
| 77 | #define OMAP1610_GPIO_DIRECTION 0x0034 | ||
| 78 | #define OMAP1610_GPIO_EDGE_CTRL1 0x0038 | ||
| 79 | #define OMAP1610_GPIO_EDGE_CTRL2 0x003c | ||
| 80 | #define OMAP1610_GPIO_CLEAR_IRQENABLE1 0x009c | ||
| 81 | #define OMAP1610_GPIO_CLEAR_WAKEUPENA 0x00a8 | ||
| 82 | #define OMAP1610_GPIO_CLEAR_DATAOUT 0x00b0 | ||
| 83 | #define OMAP1610_GPIO_SET_IRQENABLE1 0x00dc | ||
| 84 | #define OMAP1610_GPIO_SET_WAKEUPENA 0x00e8 | ||
| 85 | #define OMAP1610_GPIO_SET_DATAOUT 0x00f0 | ||
| 86 | |||
| 87 | /* | ||
| 88 | * OMAP7XX specific GPIO registers | ||
| 89 | */ | ||
| 90 | #define OMAP7XX_GPIO_DATA_INPUT 0x00 | ||
| 91 | #define OMAP7XX_GPIO_DATA_OUTPUT 0x04 | ||
| 92 | #define OMAP7XX_GPIO_DIR_CONTROL 0x08 | ||
| 93 | #define OMAP7XX_GPIO_INT_CONTROL 0x0c | ||
| 94 | #define OMAP7XX_GPIO_INT_MASK 0x10 | ||
| 95 | #define OMAP7XX_GPIO_INT_STATUS 0x14 | ||
| 96 | |||
| 97 | /* | ||
| 98 | * omap2+ specific GPIO registers | ||
| 99 | */ | ||
| 100 | #define OMAP24XX_GPIO_REVISION 0x0000 | ||
| 101 | #define OMAP24XX_GPIO_IRQSTATUS1 0x0018 | ||
| 102 | #define OMAP24XX_GPIO_IRQSTATUS2 0x0028 | ||
| 103 | #define OMAP24XX_GPIO_IRQENABLE2 0x002c | ||
| 104 | #define OMAP24XX_GPIO_IRQENABLE1 0x001c | ||
| 105 | #define OMAP24XX_GPIO_WAKE_EN 0x0020 | ||
| 106 | #define OMAP24XX_GPIO_CTRL 0x0030 | ||
| 107 | #define OMAP24XX_GPIO_OE 0x0034 | ||
| 108 | #define OMAP24XX_GPIO_DATAIN 0x0038 | ||
| 109 | #define OMAP24XX_GPIO_DATAOUT 0x003c | ||
| 110 | #define OMAP24XX_GPIO_LEVELDETECT0 0x0040 | ||
| 111 | #define OMAP24XX_GPIO_LEVELDETECT1 0x0044 | ||
| 112 | #define OMAP24XX_GPIO_RISINGDETECT 0x0048 | ||
| 113 | #define OMAP24XX_GPIO_FALLINGDETECT 0x004c | ||
| 114 | #define OMAP24XX_GPIO_DEBOUNCE_EN 0x0050 | ||
| 115 | #define OMAP24XX_GPIO_DEBOUNCE_VAL 0x0054 | ||
| 116 | #define OMAP24XX_GPIO_CLEARIRQENABLE1 0x0060 | ||
| 117 | #define OMAP24XX_GPIO_SETIRQENABLE1 0x0064 | ||
| 118 | #define OMAP24XX_GPIO_CLEARWKUENA 0x0080 | ||
| 119 | #define OMAP24XX_GPIO_SETWKUENA 0x0084 | ||
| 120 | #define OMAP24XX_GPIO_CLEARDATAOUT 0x0090 | ||
| 121 | #define OMAP24XX_GPIO_SETDATAOUT 0x0094 | ||
| 122 | |||
| 123 | #define OMAP4_GPIO_REVISION 0x0000 | ||
| 124 | #define OMAP4_GPIO_EOI 0x0020 | ||
| 125 | #define OMAP4_GPIO_IRQSTATUSRAW0 0x0024 | ||
| 126 | #define OMAP4_GPIO_IRQSTATUSRAW1 0x0028 | ||
| 127 | #define OMAP4_GPIO_IRQSTATUS0 0x002c | ||
| 128 | #define OMAP4_GPIO_IRQSTATUS1 0x0030 | ||
| 129 | #define OMAP4_GPIO_IRQSTATUSSET0 0x0034 | ||
| 130 | #define OMAP4_GPIO_IRQSTATUSSET1 0x0038 | ||
| 131 | #define OMAP4_GPIO_IRQSTATUSCLR0 0x003c | ||
| 132 | #define OMAP4_GPIO_IRQSTATUSCLR1 0x0040 | ||
| 133 | #define OMAP4_GPIO_IRQWAKEN0 0x0044 | ||
| 134 | #define OMAP4_GPIO_IRQWAKEN1 0x0048 | ||
| 135 | #define OMAP4_GPIO_IRQENABLE1 0x011c | ||
| 136 | #define OMAP4_GPIO_WAKE_EN 0x0120 | ||
| 137 | #define OMAP4_GPIO_IRQSTATUS2 0x0128 | ||
| 138 | #define OMAP4_GPIO_IRQENABLE2 0x012c | ||
| 139 | #define OMAP4_GPIO_CTRL 0x0130 | ||
| 140 | #define OMAP4_GPIO_OE 0x0134 | ||
| 141 | #define OMAP4_GPIO_DATAIN 0x0138 | ||
| 142 | #define OMAP4_GPIO_DATAOUT 0x013c | ||
| 143 | #define OMAP4_GPIO_LEVELDETECT0 0x0140 | ||
| 144 | #define OMAP4_GPIO_LEVELDETECT1 0x0144 | ||
| 145 | #define OMAP4_GPIO_RISINGDETECT 0x0148 | ||
| 146 | #define OMAP4_GPIO_FALLINGDETECT 0x014c | ||
| 147 | #define OMAP4_GPIO_DEBOUNCENABLE 0x0150 | ||
| 148 | #define OMAP4_GPIO_DEBOUNCINGTIME 0x0154 | ||
| 149 | #define OMAP4_GPIO_CLEARIRQENABLE1 0x0160 | ||
| 150 | #define OMAP4_GPIO_SETIRQENABLE1 0x0164 | ||
| 151 | #define OMAP4_GPIO_CLEARWKUENA 0x0180 | ||
| 152 | #define OMAP4_GPIO_SETWKUENA 0x0184 | ||
| 153 | #define OMAP4_GPIO_CLEARDATAOUT 0x0190 | ||
| 154 | #define OMAP4_GPIO_SETDATAOUT 0x0194 | ||
| 155 | |||
| 156 | #define OMAP_MAX_GPIO_LINES 192 | ||
| 157 | |||
| 158 | #define OMAP_MPUIO(nr) (OMAP_MAX_GPIO_LINES + (nr)) | ||
| 159 | #define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES) | ||
| 160 | |||
| 161 | struct omap_gpio_dev_attr { | ||
| 162 | int bank_width; /* GPIO bank width */ | ||
| 163 | bool dbck_flag; /* dbck required or not - True for OMAP3&4 */ | ||
| 164 | }; | ||
| 165 | |||
| 166 | struct omap_gpio_reg_offs { | ||
| 167 | u16 revision; | ||
| 168 | u16 direction; | ||
| 169 | u16 datain; | ||
| 170 | u16 dataout; | ||
| 171 | u16 set_dataout; | ||
| 172 | u16 clr_dataout; | ||
| 173 | u16 irqstatus; | ||
| 174 | u16 irqstatus2; | ||
| 175 | u16 irqstatus_raw0; | ||
| 176 | u16 irqstatus_raw1; | ||
| 177 | u16 irqenable; | ||
| 178 | u16 irqenable2; | ||
| 179 | u16 set_irqenable; | ||
| 180 | u16 clr_irqenable; | ||
| 181 | u16 debounce; | ||
| 182 | u16 debounce_en; | ||
| 183 | u16 ctrl; | ||
| 184 | u16 wkup_en; | ||
| 185 | u16 leveldetect0; | ||
| 186 | u16 leveldetect1; | ||
| 187 | u16 risingdetect; | ||
| 188 | u16 fallingdetect; | ||
| 189 | u16 irqctrl; | ||
| 190 | u16 edgectrl1; | ||
| 191 | u16 edgectrl2; | ||
| 192 | u16 pinctrl; | ||
| 193 | |||
| 194 | bool irqenable_inv; | ||
| 195 | }; | ||
| 196 | |||
| 197 | struct omap_gpio_platform_data { | ||
| 198 | int bank_type; | ||
| 199 | int bank_width; /* GPIO bank width */ | ||
| 200 | int bank_stride; /* Only needed for omap1 MPUIO */ | ||
| 201 | bool dbck_flag; /* dbck required or not - True for OMAP3&4 */ | ||
| 202 | bool loses_context; /* whether the bank would ever lose context */ | ||
| 203 | bool is_mpuio; /* whether the bank is of type MPUIO */ | ||
| 204 | u32 non_wakeup_gpios; | ||
| 205 | |||
| 206 | struct omap_gpio_reg_offs *regs; | ||
| 207 | |||
| 208 | /* Return context loss count due to PM states changing */ | ||
| 209 | int (*get_context_loss_count)(struct device *dev); | ||
| 210 | }; | ||
| 211 | |||
| 212 | extern void omap2_gpio_prepare_for_idle(int off_mode); | ||
| 213 | extern void omap2_gpio_resume_after_idle(void); | ||
| 214 | extern void omap_set_gpio_debounce(int gpio, int enable); | ||
| 215 | extern void omap_set_gpio_debounce_time(int gpio, int enable); | ||
| 216 | |||
| 217 | #endif | ||
diff --git a/include/linux/platform_data/hwmon-s3c.h b/include/linux/platform_data/hwmon-s3c.h new file mode 100644 index 000000000000..c167e4429bc7 --- /dev/null +++ b/include/linux/platform_data/hwmon-s3c.h | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | /* linux/arch/arm/plat-s3c/include/plat/hwmon.h | ||
| 2 | * | ||
| 3 | * Copyright 2005 Simtec Electronics | ||
| 4 | * Ben Dooks <ben@simtec.co.uk> | ||
| 5 | * http://armlinux.simtec.co.uk/ | ||
| 6 | * | ||
| 7 | * S3C - HWMon interface for ADC | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License version 2 as | ||
| 11 | * published by the Free Software Foundation. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef __ASM_ARCH_ADC_HWMON_H | ||
| 15 | #define __ASM_ARCH_ADC_HWMON_H __FILE__ | ||
| 16 | |||
| 17 | /** | ||
| 18 | * s3c_hwmon_chcfg - channel configuration | ||
| 19 | * @name: The name to give this channel. | ||
| 20 | * @mult: Multiply the ADC value read by this. | ||
| 21 | * @div: Divide the value from the ADC by this. | ||
| 22 | * | ||
| 23 | * The value read from the ADC is converted to a value that | ||
| 24 | * hwmon expects (mV) by result = (value_read * @mult) / @div. | ||
| 25 | */ | ||
| 26 | struct s3c_hwmon_chcfg { | ||
| 27 | const char *name; | ||
| 28 | unsigned int mult; | ||
| 29 | unsigned int div; | ||
| 30 | }; | ||
| 31 | |||
| 32 | /** | ||
| 33 | * s3c_hwmon_pdata - HWMON platform data | ||
| 34 | * @in: One configuration for each possible channel used. | ||
| 35 | */ | ||
| 36 | struct s3c_hwmon_pdata { | ||
| 37 | struct s3c_hwmon_chcfg *in[8]; | ||
| 38 | }; | ||
| 39 | |||
| 40 | /** | ||
| 41 | * s3c_hwmon_set_platdata - Set platform data for S3C HWMON device | ||
| 42 | * @pd: Platform data to register to device. | ||
| 43 | * | ||
| 44 | * Register the given platform data for use with the S3C HWMON device. | ||
| 45 | * The call will copy the platform data, so the board definitions can | ||
| 46 | * make the structure itself __initdata. | ||
| 47 | */ | ||
| 48 | extern void __init s3c_hwmon_set_platdata(struct s3c_hwmon_pdata *pd); | ||
| 49 | |||
| 50 | #endif /* __ASM_ARCH_ADC_HWMON_H */ | ||
| 51 | |||
diff --git a/include/linux/platform_data/i2c-davinci.h b/include/linux/platform_data/i2c-davinci.h new file mode 100644 index 000000000000..2312d197dfb7 --- /dev/null +++ b/include/linux/platform_data/i2c-davinci.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* | ||
| 2 | * DaVinci I2C controller platform_device info | ||
| 3 | * | ||
| 4 | * Author: Vladimir Barinov, MontaVista Software, Inc. <source@mvista.com> | ||
| 5 | * | ||
| 6 | * 2007 (c) MontaVista Software, Inc. This file is licensed under | ||
| 7 | * the terms of the GNU General Public License version 2. This program | ||
| 8 | * is licensed "as is" without any warranty of any kind, whether express | ||
| 9 | * or implied. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __ASM_ARCH_I2C_H | ||
| 13 | #define __ASM_ARCH_I2C_H | ||
| 14 | |||
| 15 | /* All frequencies are expressed in kHz */ | ||
| 16 | struct davinci_i2c_platform_data { | ||
| 17 | unsigned int bus_freq; /* standard bus frequency (kHz) */ | ||
| 18 | unsigned int bus_delay; /* post-transaction delay (usec) */ | ||
| 19 | unsigned int sda_pin; /* GPIO pin ID to use for SDA */ | ||
| 20 | unsigned int scl_pin; /* GPIO pin ID to use for SCL */ | ||
| 21 | }; | ||
| 22 | |||
| 23 | /* for board setup code */ | ||
| 24 | void davinci_init_i2c(struct davinci_i2c_platform_data *); | ||
| 25 | |||
| 26 | #endif /* __ASM_ARCH_I2C_H */ | ||
diff --git a/include/linux/platform_data/i2c-imx.h b/include/linux/platform_data/i2c-imx.h new file mode 100644 index 000000000000..8289d915e615 --- /dev/null +++ b/include/linux/platform_data/i2c-imx.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* | ||
| 2 | * i2c.h - i.MX I2C driver header file | ||
| 3 | * | ||
| 4 | * Copyright (c) 2008, Darius Augulis <augulis.darius@gmail.com> | ||
| 5 | * | ||
| 6 | * This file is released under the GPLv2 | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef __ASM_ARCH_I2C_H_ | ||
| 10 | #define __ASM_ARCH_I2C_H_ | ||
| 11 | |||
| 12 | /** | ||
| 13 | * struct imxi2c_platform_data - structure of platform data for MXC I2C driver | ||
| 14 | * @bitrate: Bus speed measured in Hz | ||
| 15 | * | ||
| 16 | **/ | ||
| 17 | struct imxi2c_platform_data { | ||
| 18 | u32 bitrate; | ||
| 19 | }; | ||
| 20 | |||
| 21 | #endif /* __ASM_ARCH_I2C_H_ */ | ||
diff --git a/include/linux/platform_data/i2c-nuc900.h b/include/linux/platform_data/i2c-nuc900.h new file mode 100644 index 000000000000..9ffb12d06e91 --- /dev/null +++ b/include/linux/platform_data/i2c-nuc900.h | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | #ifndef __ASM_ARCH_NUC900_I2C_H | ||
| 2 | #define __ASM_ARCH_NUC900_I2C_H | ||
| 3 | |||
| 4 | struct nuc900_platform_i2c { | ||
| 5 | int bus_num; | ||
| 6 | unsigned long bus_freq; | ||
| 7 | }; | ||
| 8 | |||
| 9 | #endif /* __ASM_ARCH_NUC900_I2C_H */ | ||
diff --git a/include/linux/platform_data/i2c-s3c2410.h b/include/linux/platform_data/i2c-s3c2410.h new file mode 100644 index 000000000000..51d52e767a19 --- /dev/null +++ b/include/linux/platform_data/i2c-s3c2410.h | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | /* arch/arm/plat-s3c/include/plat/iic.h | ||
| 2 | * | ||
| 3 | * Copyright 2004-2009 Simtec Electronics | ||
| 4 | * Ben Dooks <ben@simtec.co.uk> | ||
| 5 | * | ||
| 6 | * S3C - I2C Controller platform_device info | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 as | ||
| 10 | * published by the Free Software Foundation. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __ASM_ARCH_IIC_H | ||
| 14 | #define __ASM_ARCH_IIC_H __FILE__ | ||
| 15 | |||
| 16 | #define S3C_IICFLG_FILTER (1<<0) /* enable s3c2440 filter */ | ||
| 17 | |||
| 18 | /** | ||
| 19 | * struct s3c2410_platform_i2c - Platform data for s3c I2C. | ||
| 20 | * @bus_num: The bus number to use (if possible). | ||
| 21 | * @flags: Any flags for the I2C bus (E.g. S3C_IICFLK_FILTER). | ||
| 22 | * @slave_addr: The I2C address for the slave device (if enabled). | ||
| 23 | * @frequency: The desired frequency in Hz of the bus. This is | ||
| 24 | * guaranteed to not be exceeded. If the caller does | ||
| 25 | * not care, use zero and the driver will select a | ||
| 26 | * useful default. | ||
| 27 | * @sda_delay: The delay (in ns) applied to SDA edges. | ||
| 28 | * @cfg_gpio: A callback to configure the pins for I2C operation. | ||
| 29 | */ | ||
| 30 | struct s3c2410_platform_i2c { | ||
| 31 | int bus_num; | ||
| 32 | unsigned int flags; | ||
| 33 | unsigned int slave_addr; | ||
| 34 | unsigned long frequency; | ||
| 35 | unsigned int sda_delay; | ||
| 36 | |||
| 37 | void (*cfg_gpio)(struct platform_device *dev); | ||
| 38 | }; | ||
| 39 | |||
| 40 | /** | ||
| 41 | * s3c_i2c0_set_platdata - set platform data for i2c0 device | ||
| 42 | * @i2c: The platform data to set, or NULL for default data. | ||
| 43 | * | ||
| 44 | * Register the given platform data for use with the i2c0 device. This | ||
| 45 | * call copies the platform data, so the caller can use __initdata for | ||
| 46 | * their copy. | ||
| 47 | * | ||
| 48 | * This call will set cfg_gpio if is null to the default platform | ||
| 49 | * implementation. | ||
| 50 | * | ||
| 51 | * Any user of s3c_device_i2c0 should call this, even if it is with | ||
| 52 | * NULL to ensure that the device is given the default platform data | ||
| 53 | * as the driver will no longer carry defaults. | ||
| 54 | */ | ||
| 55 | extern void s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 56 | extern void s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 57 | extern void s3c_i2c2_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 58 | extern void s3c_i2c3_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 59 | extern void s3c_i2c4_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 60 | extern void s3c_i2c5_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 61 | extern void s3c_i2c6_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 62 | extern void s3c_i2c7_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 63 | extern void s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
| 64 | |||
| 65 | /* defined by architecture to configure gpio */ | ||
| 66 | extern void s3c_i2c0_cfg_gpio(struct platform_device *dev); | ||
| 67 | extern void s3c_i2c1_cfg_gpio(struct platform_device *dev); | ||
| 68 | extern void s3c_i2c2_cfg_gpio(struct platform_device *dev); | ||
| 69 | extern void s3c_i2c3_cfg_gpio(struct platform_device *dev); | ||
| 70 | extern void s3c_i2c4_cfg_gpio(struct platform_device *dev); | ||
| 71 | extern void s3c_i2c5_cfg_gpio(struct platform_device *dev); | ||
| 72 | extern void s3c_i2c6_cfg_gpio(struct platform_device *dev); | ||
| 73 | extern void s3c_i2c7_cfg_gpio(struct platform_device *dev); | ||
| 74 | |||
| 75 | extern struct s3c2410_platform_i2c default_i2c_data; | ||
| 76 | |||
| 77 | #endif /* __ASM_ARCH_IIC_H */ | ||
diff --git a/include/linux/platform_data/irda-pxaficp.h b/include/linux/platform_data/irda-pxaficp.h new file mode 100644 index 000000000000..3cd41f77dda4 --- /dev/null +++ b/include/linux/platform_data/irda-pxaficp.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | #ifndef ASMARM_ARCH_IRDA_H | ||
| 2 | #define ASMARM_ARCH_IRDA_H | ||
| 3 | |||
| 4 | /* board specific transceiver capabilities */ | ||
| 5 | |||
| 6 | #define IR_OFF 1 | ||
| 7 | #define IR_SIRMODE 2 | ||
| 8 | #define IR_FIRMODE 4 | ||
| 9 | |||
| 10 | struct pxaficp_platform_data { | ||
| 11 | int transceiver_cap; | ||
| 12 | void (*transceiver_mode)(struct device *dev, int mode); | ||
| 13 | int (*startup)(struct device *dev); | ||
| 14 | void (*shutdown)(struct device *dev); | ||
| 15 | int gpio_pwdown; /* powerdown GPIO for the IrDA chip */ | ||
| 16 | bool gpio_pwdown_inverted; /* gpio_pwdown is inverted */ | ||
| 17 | }; | ||
| 18 | |||
| 19 | extern void pxa_set_ficp_info(struct pxaficp_platform_data *info); | ||
| 20 | |||
| 21 | #if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x) | ||
| 22 | void pxa2xx_transceiver_mode(struct device *dev, int mode); | ||
| 23 | #endif | ||
| 24 | |||
| 25 | #endif | ||
diff --git a/include/linux/platform_data/keyboard-pxa930_rotary.h b/include/linux/platform_data/keyboard-pxa930_rotary.h new file mode 100644 index 000000000000..053587caffdd --- /dev/null +++ b/include/linux/platform_data/keyboard-pxa930_rotary.h | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | #ifndef __ASM_ARCH_PXA930_ROTARY_H | ||
| 2 | #define __ASM_ARCH_PXA930_ROTARY_H | ||
| 3 | |||
| 4 | /* NOTE: | ||
| 5 | * | ||
| 6 | * rotary can be either interpreted as a ralative input event (e.g. | ||
| 7 | * REL_WHEEL or REL_HWHEEL) or a specific key event (e.g. UP/DOWN | ||
| 8 | * or LEFT/RIGHT), depending on if up_key & down_key are assigned | ||
| 9 | * or rel_code is assigned a non-zero value. When all are non-zero, | ||
| 10 | * up_key and down_key will be preferred. | ||
| 11 | */ | ||
| 12 | struct pxa930_rotary_platform_data { | ||
| 13 | int up_key; | ||
| 14 | int down_key; | ||
| 15 | int rel_code; | ||
| 16 | }; | ||
| 17 | |||
| 18 | void __init pxa930_set_rotarykey_info(struct pxa930_rotary_platform_data *info); | ||
| 19 | |||
| 20 | #endif /* __ASM_ARCH_PXA930_ROTARY_H */ | ||
diff --git a/include/linux/platform_data/keyboard-spear.h b/include/linux/platform_data/keyboard-spear.h new file mode 100644 index 000000000000..9248e3a7e333 --- /dev/null +++ b/include/linux/platform_data/keyboard-spear.h | |||
| @@ -0,0 +1,164 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 ST Microelectronics | ||
| 3 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
| 4 | * | ||
| 5 | * This file is licensed under the terms of the GNU General Public | ||
| 6 | * License version 2. This program is licensed "as is" without any | ||
| 7 | * warranty of any kind, whether express or implied. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __PLAT_KEYBOARD_H | ||
| 11 | #define __PLAT_KEYBOARD_H | ||
| 12 | |||
| 13 | #include <linux/bitops.h> | ||
| 14 | #include <linux/input.h> | ||
| 15 | #include <linux/input/matrix_keypad.h> | ||
| 16 | #include <linux/types.h> | ||
| 17 | |||
| 18 | #define DECLARE_9x9_KEYMAP(_name) \ | ||
| 19 | int _name[] = { \ | ||
| 20 | KEY(0, 0, KEY_ESC), \ | ||
| 21 | KEY(0, 1, KEY_1), \ | ||
| 22 | KEY(0, 2, KEY_2), \ | ||
| 23 | KEY(0, 3, KEY_3), \ | ||
| 24 | KEY(0, 4, KEY_4), \ | ||
| 25 | KEY(0, 5, KEY_5), \ | ||
| 26 | KEY(0, 6, KEY_6), \ | ||
| 27 | KEY(0, 7, KEY_7), \ | ||
| 28 | KEY(0, 8, KEY_8), \ | ||
| 29 | KEY(1, 0, KEY_9), \ | ||
| 30 | KEY(1, 1, KEY_MINUS), \ | ||
| 31 | KEY(1, 2, KEY_EQUAL), \ | ||
| 32 | KEY(1, 3, KEY_BACKSPACE), \ | ||
| 33 | KEY(1, 4, KEY_TAB), \ | ||
| 34 | KEY(1, 5, KEY_Q), \ | ||
| 35 | KEY(1, 6, KEY_W), \ | ||
| 36 | KEY(1, 7, KEY_E), \ | ||
| 37 | KEY(1, 8, KEY_R), \ | ||
| 38 | KEY(2, 0, KEY_T), \ | ||
| 39 | KEY(2, 1, KEY_Y), \ | ||
| 40 | KEY(2, 2, KEY_U), \ | ||
| 41 | KEY(2, 3, KEY_I), \ | ||
| 42 | KEY(2, 4, KEY_O), \ | ||
| 43 | KEY(2, 5, KEY_P), \ | ||
| 44 | KEY(2, 6, KEY_LEFTBRACE), \ | ||
| 45 | KEY(2, 7, KEY_RIGHTBRACE), \ | ||
| 46 | KEY(2, 8, KEY_ENTER), \ | ||
| 47 | KEY(3, 0, KEY_LEFTCTRL), \ | ||
| 48 | KEY(3, 1, KEY_A), \ | ||
| 49 | KEY(3, 2, KEY_S), \ | ||
| 50 | KEY(3, 3, KEY_D), \ | ||
| 51 | KEY(3, 4, KEY_F), \ | ||
| 52 | KEY(3, 5, KEY_G), \ | ||
| 53 | KEY(3, 6, KEY_H), \ | ||
| 54 | KEY(3, 7, KEY_J), \ | ||
| 55 | KEY(3, 8, KEY_K), \ | ||
| 56 | KEY(4, 0, KEY_L), \ | ||
| 57 | KEY(4, 1, KEY_SEMICOLON), \ | ||
| 58 | KEY(4, 2, KEY_APOSTROPHE), \ | ||
| 59 | KEY(4, 3, KEY_GRAVE), \ | ||
| 60 | KEY(4, 4, KEY_LEFTSHIFT), \ | ||
| 61 | KEY(4, 5, KEY_BACKSLASH), \ | ||
| 62 | KEY(4, 6, KEY_Z), \ | ||
| 63 | KEY(4, 7, KEY_X), \ | ||
| 64 | KEY(4, 8, KEY_C), \ | ||
| 65 | KEY(5, 0, KEY_V), \ | ||
| 66 | KEY(5, 1, KEY_B), \ | ||
| 67 | KEY(5, 2, KEY_N), \ | ||
| 68 | KEY(5, 3, KEY_M), \ | ||
| 69 | KEY(5, 4, KEY_COMMA), \ | ||
| 70 | KEY(5, 5, KEY_DOT), \ | ||
| 71 | KEY(5, 6, KEY_SLASH), \ | ||
| 72 | KEY(5, 7, KEY_RIGHTSHIFT), \ | ||
| 73 | KEY(5, 8, KEY_KPASTERISK), \ | ||
| 74 | KEY(6, 0, KEY_LEFTALT), \ | ||
| 75 | KEY(6, 1, KEY_SPACE), \ | ||
| 76 | KEY(6, 2, KEY_CAPSLOCK), \ | ||
| 77 | KEY(6, 3, KEY_F1), \ | ||
| 78 | KEY(6, 4, KEY_F2), \ | ||
| 79 | KEY(6, 5, KEY_F3), \ | ||
| 80 | KEY(6, 6, KEY_F4), \ | ||
| 81 | KEY(6, 7, KEY_F5), \ | ||
| 82 | KEY(6, 8, KEY_F6), \ | ||
| 83 | KEY(7, 0, KEY_F7), \ | ||
| 84 | KEY(7, 1, KEY_F8), \ | ||
| 85 | KEY(7, 2, KEY_F9), \ | ||
| 86 | KEY(7, 3, KEY_F10), \ | ||
| 87 | KEY(7, 4, KEY_NUMLOCK), \ | ||
| 88 | KEY(7, 5, KEY_SCROLLLOCK), \ | ||
| 89 | KEY(7, 6, KEY_KP7), \ | ||
| 90 | KEY(7, 7, KEY_KP8), \ | ||
| 91 | KEY(7, 8, KEY_KP9), \ | ||
| 92 | KEY(8, 0, KEY_KPMINUS), \ | ||
| 93 | KEY(8, 1, KEY_KP4), \ | ||
| 94 | KEY(8, 2, KEY_KP5), \ | ||
| 95 | KEY(8, 3, KEY_KP6), \ | ||
| 96 | KEY(8, 4, KEY_KPPLUS), \ | ||
| 97 | KEY(8, 5, KEY_KP1), \ | ||
| 98 | KEY(8, 6, KEY_KP2), \ | ||
| 99 | KEY(8, 7, KEY_KP3), \ | ||
| 100 | KEY(8, 8, KEY_KP0), \ | ||
| 101 | } | ||
| 102 | |||
| 103 | #define DECLARE_6x6_KEYMAP(_name) \ | ||
| 104 | int _name[] = { \ | ||
| 105 | KEY(0, 0, KEY_RESERVED), \ | ||
| 106 | KEY(0, 1, KEY_1), \ | ||
| 107 | KEY(0, 2, KEY_2), \ | ||
| 108 | KEY(0, 3, KEY_3), \ | ||
| 109 | KEY(0, 4, KEY_4), \ | ||
| 110 | KEY(0, 5, KEY_5), \ | ||
| 111 | KEY(1, 0, KEY_Q), \ | ||
| 112 | KEY(1, 1, KEY_W), \ | ||
| 113 | KEY(1, 2, KEY_E), \ | ||
| 114 | KEY(1, 3, KEY_R), \ | ||
| 115 | KEY(1, 4, KEY_T), \ | ||
| 116 | KEY(1, 5, KEY_Y), \ | ||
| 117 | KEY(2, 0, KEY_D), \ | ||
| 118 | KEY(2, 1, KEY_F), \ | ||
| 119 | KEY(2, 2, KEY_G), \ | ||
| 120 | KEY(2, 3, KEY_H), \ | ||
| 121 | KEY(2, 4, KEY_J), \ | ||
| 122 | KEY(2, 5, KEY_K), \ | ||
| 123 | KEY(3, 0, KEY_B), \ | ||
| 124 | KEY(3, 1, KEY_N), \ | ||
| 125 | KEY(3, 2, KEY_M), \ | ||
| 126 | KEY(3, 3, KEY_COMMA), \ | ||
| 127 | KEY(3, 4, KEY_DOT), \ | ||
| 128 | KEY(3, 5, KEY_SLASH), \ | ||
| 129 | KEY(4, 0, KEY_F6), \ | ||
| 130 | KEY(4, 1, KEY_F7), \ | ||
| 131 | KEY(4, 2, KEY_F8), \ | ||
| 132 | KEY(4, 3, KEY_F9), \ | ||
| 133 | KEY(4, 4, KEY_F10), \ | ||
| 134 | KEY(4, 5, KEY_NUMLOCK), \ | ||
| 135 | KEY(5, 0, KEY_KP2), \ | ||
| 136 | KEY(5, 1, KEY_KP3), \ | ||
| 137 | KEY(5, 2, KEY_KP0), \ | ||
| 138 | KEY(5, 3, KEY_KPDOT), \ | ||
| 139 | KEY(5, 4, KEY_RO), \ | ||
| 140 | KEY(5, 5, KEY_ZENKAKUHANKAKU), \ | ||
| 141 | } | ||
| 142 | |||
| 143 | #define KEYPAD_9x9 0 | ||
| 144 | #define KEYPAD_6x6 1 | ||
| 145 | #define KEYPAD_2x2 2 | ||
| 146 | |||
| 147 | /** | ||
| 148 | * struct kbd_platform_data - spear keyboard platform data | ||
| 149 | * keymap: pointer to keymap data (table and size) | ||
| 150 | * rep: enables key autorepeat | ||
| 151 | * mode: choose keyboard support(9x9, 6x6, 2x2) | ||
| 152 | * suspended_rate: rate at which keyboard would operate in suspended mode | ||
| 153 | * | ||
| 154 | * This structure is supposed to be used by platform code to supply | ||
| 155 | * keymaps to drivers that implement keyboards. | ||
| 156 | */ | ||
| 157 | struct kbd_platform_data { | ||
| 158 | const struct matrix_keymap_data *keymap; | ||
| 159 | bool rep; | ||
| 160 | unsigned int mode; | ||
| 161 | unsigned int suspended_rate; | ||
| 162 | }; | ||
| 163 | |||
| 164 | #endif /* __PLAT_KEYBOARD_H */ | ||
diff --git a/include/linux/platform_data/keypad-ep93xx.h b/include/linux/platform_data/keypad-ep93xx.h new file mode 100644 index 000000000000..1e2f4e97f428 --- /dev/null +++ b/include/linux/platform_data/keypad-ep93xx.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h | ||
| 3 | */ | ||
| 4 | |||
| 5 | #ifndef __ASM_ARCH_EP93XX_KEYPAD_H | ||
| 6 | #define __ASM_ARCH_EP93XX_KEYPAD_H | ||
| 7 | |||
| 8 | struct matrix_keymap_data; | ||
| 9 | |||
| 10 | /* flags for the ep93xx_keypad driver */ | ||
| 11 | #define EP93XX_KEYPAD_DISABLE_3_KEY (1<<0) /* disable 3-key reset */ | ||
| 12 | #define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */ | ||
| 13 | #define EP93XX_KEYPAD_BACK_DRIVE (1<<2) /* back driving mode */ | ||
| 14 | #define EP93XX_KEYPAD_TEST_MODE (1<<3) /* scan only column 0 */ | ||
| 15 | #define EP93XX_KEYPAD_KDIV (1<<4) /* 1/4 clock or 1/16 clock */ | ||
| 16 | #define EP93XX_KEYPAD_AUTOREPEAT (1<<5) /* enable key autorepeat */ | ||
| 17 | |||
| 18 | /** | ||
| 19 | * struct ep93xx_keypad_platform_data - platform specific device structure | ||
| 20 | * @keymap_data: pointer to &matrix_keymap_data | ||
| 21 | * @debounce: debounce start count; terminal count is 0xff | ||
| 22 | * @prescale: row/column counter pre-scaler load value | ||
| 23 | * @flags: see above | ||
| 24 | */ | ||
| 25 | struct ep93xx_keypad_platform_data { | ||
| 26 | struct matrix_keymap_data *keymap_data; | ||
| 27 | unsigned int debounce; | ||
| 28 | unsigned int prescale; | ||
| 29 | unsigned int flags; | ||
| 30 | }; | ||
| 31 | |||
| 32 | #define EP93XX_MATRIX_ROWS (8) | ||
| 33 | #define EP93XX_MATRIX_COLS (8) | ||
| 34 | |||
| 35 | #endif /* __ASM_ARCH_EP93XX_KEYPAD_H */ | ||
diff --git a/include/linux/platform_data/keypad-nomadik-ske.h b/include/linux/platform_data/keypad-nomadik-ske.h new file mode 100644 index 000000000000..31382fbc07dc --- /dev/null +++ b/include/linux/platform_data/keypad-nomadik-ske.h | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) ST-Ericsson SA 2010 | ||
| 3 | * | ||
| 4 | * License Terms: GNU General Public License v2 | ||
| 5 | * Author: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com> | ||
| 6 | * | ||
| 7 | * ux500 Scroll key and Keypad Encoder (SKE) header | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __SKE_H | ||
| 11 | #define __SKE_H | ||
| 12 | |||
| 13 | #include <linux/input/matrix_keypad.h> | ||
| 14 | |||
| 15 | /* register definitions for SKE peripheral */ | ||
| 16 | #define SKE_CR 0x00 | ||
| 17 | #define SKE_VAL0 0x04 | ||
| 18 | #define SKE_VAL1 0x08 | ||
| 19 | #define SKE_DBCR 0x0C | ||
| 20 | #define SKE_IMSC 0x10 | ||
| 21 | #define SKE_RIS 0x14 | ||
| 22 | #define SKE_MIS 0x18 | ||
| 23 | #define SKE_ICR 0x1C | ||
| 24 | |||
| 25 | /* | ||
| 26 | * Keypad module | ||
| 27 | */ | ||
| 28 | |||
| 29 | /** | ||
| 30 | * struct keypad_platform_data - structure for platform specific data | ||
| 31 | * @init: pointer to keypad init function | ||
| 32 | * @exit: pointer to keypad deinitialisation function | ||
| 33 | * @keymap_data: matrix scan code table for keycodes | ||
| 34 | * @krow: maximum number of rows | ||
| 35 | * @kcol: maximum number of columns | ||
| 36 | * @debounce_ms: platform specific debounce time | ||
| 37 | * @no_autorepeat: flag for auto repetition | ||
| 38 | * @wakeup_enable: allow waking up the system | ||
| 39 | */ | ||
| 40 | struct ske_keypad_platform_data { | ||
| 41 | int (*init)(void); | ||
| 42 | int (*exit)(void); | ||
| 43 | const struct matrix_keymap_data *keymap_data; | ||
| 44 | u8 krow; | ||
| 45 | u8 kcol; | ||
| 46 | u8 debounce_ms; | ||
| 47 | bool no_autorepeat; | ||
| 48 | bool wakeup_enable; | ||
| 49 | }; | ||
| 50 | #endif /*__SKE_KPD_H*/ | ||
diff --git a/include/linux/platform_data/keypad-omap.h b/include/linux/platform_data/keypad-omap.h new file mode 100644 index 000000000000..a6b21eddb212 --- /dev/null +++ b/include/linux/platform_data/keypad-omap.h | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/plat-omap/include/mach/keypad.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 Komal Shah <komal_shah802003@yahoo.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | #ifndef ASMARM_ARCH_KEYPAD_H | ||
| 11 | #define ASMARM_ARCH_KEYPAD_H | ||
| 12 | |||
| 13 | #ifndef CONFIG_ARCH_OMAP1 | ||
| 14 | #warning Please update the board to use matrix-keypad driver | ||
| 15 | #define omap_readw(reg) 0 | ||
| 16 | #define omap_writew(val, reg) do {} while (0) | ||
| 17 | #endif | ||
| 18 | #include <linux/input/matrix_keypad.h> | ||
| 19 | |||
| 20 | struct omap_kp_platform_data { | ||
| 21 | int rows; | ||
| 22 | int cols; | ||
| 23 | const struct matrix_keymap_data *keymap_data; | ||
| 24 | bool rep; | ||
| 25 | unsigned long delay; | ||
| 26 | bool dbounce; | ||
| 27 | /* specific to OMAP242x*/ | ||
| 28 | unsigned int *row_gpios; | ||
| 29 | unsigned int *col_gpios; | ||
| 30 | }; | ||
| 31 | |||
| 32 | /* Group (0..3) -- when multiple keys are pressed, only the | ||
| 33 | * keys pressed in the same group are considered as pressed. This is | ||
| 34 | * in order to workaround certain crappy HW designs that produce ghost | ||
| 35 | * keypresses. Two free bits, not used by neither row/col nor keynum, | ||
| 36 | * must be available for use as group bits. The below GROUP_SHIFT | ||
| 37 | * macro definition is based on some prior knowledge of the | ||
| 38 | * matrix_keypad defined KEY() macro internals. | ||
| 39 | */ | ||
| 40 | #define GROUP_SHIFT 14 | ||
| 41 | #define GROUP_0 (0 << GROUP_SHIFT) | ||
| 42 | #define GROUP_1 (1 << GROUP_SHIFT) | ||
| 43 | #define GROUP_2 (2 << GROUP_SHIFT) | ||
| 44 | #define GROUP_3 (3 << GROUP_SHIFT) | ||
| 45 | #define GROUP_MASK GROUP_3 | ||
| 46 | #if KEY_MAX & GROUP_MASK | ||
| 47 | #error Group bits in conflict with keynum bits | ||
| 48 | #endif | ||
| 49 | |||
| 50 | |||
| 51 | #endif | ||
| 52 | |||
diff --git a/include/linux/platform_data/keypad-pxa27x.h b/include/linux/platform_data/keypad-pxa27x.h new file mode 100644 index 000000000000..5ce8d5e6ea51 --- /dev/null +++ b/include/linux/platform_data/keypad-pxa27x.h | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | #ifndef __ASM_ARCH_PXA27x_KEYPAD_H | ||
| 2 | #define __ASM_ARCH_PXA27x_KEYPAD_H | ||
| 3 | |||
| 4 | #include <linux/input.h> | ||
| 5 | #include <linux/input/matrix_keypad.h> | ||
| 6 | |||
| 7 | #define MAX_MATRIX_KEY_ROWS (8) | ||
| 8 | #define MAX_MATRIX_KEY_COLS (8) | ||
| 9 | #define MATRIX_ROW_SHIFT (3) | ||
| 10 | #define MAX_DIRECT_KEY_NUM (8) | ||
| 11 | |||
| 12 | /* pxa3xx keypad platform specific parameters | ||
| 13 | * | ||
| 14 | * NOTE: | ||
| 15 | * 1. direct_key_num indicates the number of keys in the direct keypad | ||
| 16 | * _plus_ the number of rotary-encoder sensor inputs, this can be | ||
| 17 | * left as 0 if only rotary encoders are enabled, the driver will | ||
| 18 | * automatically calculate this | ||
| 19 | * | ||
| 20 | * 2. direct_key_map is the key code map for the direct keys, if rotary | ||
| 21 | * encoder(s) are enabled, direct key 0/1(2/3) will be ignored | ||
| 22 | * | ||
| 23 | * 3. rotary can be either interpreted as a relative input event (e.g. | ||
| 24 | * REL_WHEEL/REL_HWHEEL) or specific keys (e.g. UP/DOWN/LEFT/RIGHT) | ||
| 25 | * | ||
| 26 | * 4. matrix key and direct key will use the same debounce_interval by | ||
| 27 | * default, which should be sufficient in most cases | ||
| 28 | * | ||
| 29 | * pxa168 keypad platform specific parameter | ||
| 30 | * | ||
| 31 | * NOTE: | ||
| 32 | * clear_wakeup_event callback is a workaround required to clear the | ||
| 33 | * keypad interrupt. The keypad wake must be cleared in addition to | ||
| 34 | * reading the MI/DI bits in the KPC register. | ||
| 35 | */ | ||
| 36 | struct pxa27x_keypad_platform_data { | ||
| 37 | |||
| 38 | /* code map for the matrix keys */ | ||
| 39 | unsigned int matrix_key_rows; | ||
| 40 | unsigned int matrix_key_cols; | ||
| 41 | unsigned int *matrix_key_map; | ||
| 42 | int matrix_key_map_size; | ||
| 43 | |||
| 44 | /* direct keys */ | ||
| 45 | int direct_key_num; | ||
| 46 | unsigned int direct_key_map[MAX_DIRECT_KEY_NUM]; | ||
| 47 | /* the key output may be low active */ | ||
| 48 | int direct_key_low_active; | ||
| 49 | /* give board a chance to choose the start direct key */ | ||
| 50 | unsigned int direct_key_mask; | ||
| 51 | |||
| 52 | /* rotary encoders 0 */ | ||
| 53 | int enable_rotary0; | ||
| 54 | int rotary0_rel_code; | ||
| 55 | int rotary0_up_key; | ||
| 56 | int rotary0_down_key; | ||
| 57 | |||
| 58 | /* rotary encoders 1 */ | ||
| 59 | int enable_rotary1; | ||
| 60 | int rotary1_rel_code; | ||
| 61 | int rotary1_up_key; | ||
| 62 | int rotary1_down_key; | ||
| 63 | |||
| 64 | /* key debounce interval */ | ||
| 65 | unsigned int debounce_interval; | ||
| 66 | |||
| 67 | /* clear wakeup event requirement for pxa168 */ | ||
| 68 | void (*clear_wakeup_event)(void); | ||
| 69 | }; | ||
| 70 | |||
| 71 | extern void pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info); | ||
| 72 | |||
| 73 | #endif /* __ASM_ARCH_PXA27x_KEYPAD_H */ | ||
diff --git a/include/linux/platform_data/keypad-w90p910.h b/include/linux/platform_data/keypad-w90p910.h new file mode 100644 index 000000000000..556778e8ddaa --- /dev/null +++ b/include/linux/platform_data/keypad-w90p910.h | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | #ifndef __ASM_ARCH_W90P910_KEYPAD_H | ||
| 2 | #define __ASM_ARCH_W90P910_KEYPAD_H | ||
| 3 | |||
| 4 | #include <linux/input/matrix_keypad.h> | ||
| 5 | |||
| 6 | extern void mfp_set_groupi(struct device *dev); | ||
| 7 | |||
| 8 | struct w90p910_keypad_platform_data { | ||
| 9 | const struct matrix_keymap_data *keymap_data; | ||
| 10 | |||
| 11 | unsigned int prescale; | ||
| 12 | unsigned int debounce; | ||
| 13 | }; | ||
| 14 | |||
| 15 | #endif /* __ASM_ARCH_W90P910_KEYPAD_H */ | ||
diff --git a/include/linux/platform_data/keyscan-davinci.h b/include/linux/platform_data/keyscan-davinci.h new file mode 100644 index 000000000000..7a560e05bda8 --- /dev/null +++ b/include/linux/platform_data/keyscan-davinci.h | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2009 Texas Instruments, Inc | ||
| 3 | * | ||
| 4 | * Author: Miguel Aguilar <miguel.aguilar@ridgerun.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef DAVINCI_KEYSCAN_H | ||
| 22 | #define DAVINCI_KEYSCAN_H | ||
| 23 | |||
| 24 | #include <linux/io.h> | ||
| 25 | |||
| 26 | enum davinci_matrix_types { | ||
| 27 | DAVINCI_KEYSCAN_MATRIX_4X4, | ||
| 28 | DAVINCI_KEYSCAN_MATRIX_5X3, | ||
| 29 | }; | ||
| 30 | |||
| 31 | struct davinci_ks_platform_data { | ||
| 32 | int (*device_enable)(struct device *dev); | ||
| 33 | unsigned short *keymap; | ||
| 34 | u32 keymapsize; | ||
| 35 | u8 rep:1; | ||
| 36 | u8 strobe; | ||
| 37 | u8 interval; | ||
| 38 | u8 matrix_type; | ||
| 39 | }; | ||
| 40 | |||
| 41 | #endif | ||
| 42 | |||
diff --git a/include/linux/platform_data/lcd-mipid.h b/include/linux/platform_data/lcd-mipid.h new file mode 100644 index 000000000000..8e52c6572281 --- /dev/null +++ b/include/linux/platform_data/lcd-mipid.h | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | #ifndef __LCD_MIPID_H | ||
| 2 | #define __LCD_MIPID_H | ||
| 3 | |||
| 4 | enum mipid_test_num { | ||
| 5 | MIPID_TEST_RGB_LINES, | ||
| 6 | }; | ||
| 7 | |||
| 8 | enum mipid_test_result { | ||
| 9 | MIPID_TEST_SUCCESS, | ||
| 10 | MIPID_TEST_INVALID, | ||
| 11 | MIPID_TEST_FAILED, | ||
| 12 | }; | ||
| 13 | |||
| 14 | #ifdef __KERNEL__ | ||
| 15 | |||
| 16 | struct mipid_platform_data { | ||
| 17 | int nreset_gpio; | ||
| 18 | int data_lines; | ||
| 19 | |||
| 20 | void (*shutdown)(struct mipid_platform_data *pdata); | ||
| 21 | void (*set_bklight_level)(struct mipid_platform_data *pdata, | ||
| 22 | int level); | ||
| 23 | int (*get_bklight_level)(struct mipid_platform_data *pdata); | ||
| 24 | int (*get_bklight_max)(struct mipid_platform_data *pdata); | ||
| 25 | }; | ||
| 26 | |||
| 27 | #endif | ||
| 28 | |||
| 29 | #endif | ||
diff --git a/include/linux/platform_data/leds-kirkwood-netxbig.h b/include/linux/platform_data/leds-kirkwood-netxbig.h new file mode 100644 index 000000000000..24b536ebdf13 --- /dev/null +++ b/include/linux/platform_data/leds-kirkwood-netxbig.h | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-kirkwood/include/mach/leds-netxbig.h | ||
| 3 | * | ||
| 4 | * Platform data structure for netxbig LED driver | ||
| 5 | * | ||
| 6 | * This file is licensed under the terms of the GNU General Public | ||
| 7 | * License version 2. This program is licensed "as is" without any | ||
| 8 | * warranty of any kind, whether express or implied. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __MACH_LEDS_NETXBIG_H | ||
| 12 | #define __MACH_LEDS_NETXBIG_H | ||
| 13 | |||
| 14 | struct netxbig_gpio_ext { | ||
| 15 | unsigned *addr; | ||
| 16 | int num_addr; | ||
| 17 | unsigned *data; | ||
| 18 | int num_data; | ||
| 19 | unsigned enable; | ||
| 20 | }; | ||
| 21 | |||
| 22 | enum netxbig_led_mode { | ||
| 23 | NETXBIG_LED_OFF, | ||
| 24 | NETXBIG_LED_ON, | ||
| 25 | NETXBIG_LED_SATA, | ||
| 26 | NETXBIG_LED_TIMER1, | ||
| 27 | NETXBIG_LED_TIMER2, | ||
| 28 | NETXBIG_LED_MODE_NUM, | ||
| 29 | }; | ||
| 30 | |||
| 31 | #define NETXBIG_LED_INVALID_MODE NETXBIG_LED_MODE_NUM | ||
| 32 | |||
| 33 | struct netxbig_led_timer { | ||
| 34 | unsigned long delay_on; | ||
| 35 | unsigned long delay_off; | ||
| 36 | enum netxbig_led_mode mode; | ||
| 37 | }; | ||
| 38 | |||
| 39 | struct netxbig_led { | ||
| 40 | const char *name; | ||
| 41 | const char *default_trigger; | ||
| 42 | int mode_addr; | ||
| 43 | int *mode_val; | ||
| 44 | int bright_addr; | ||
| 45 | }; | ||
| 46 | |||
| 47 | struct netxbig_led_platform_data { | ||
| 48 | struct netxbig_gpio_ext *gpio_ext; | ||
| 49 | struct netxbig_led_timer *timer; | ||
| 50 | int num_timer; | ||
| 51 | struct netxbig_led *leds; | ||
| 52 | int num_leds; | ||
| 53 | }; | ||
| 54 | |||
| 55 | #endif /* __MACH_LEDS_NETXBIG_H */ | ||
diff --git a/include/linux/platform_data/leds-kirkwood-ns2.h b/include/linux/platform_data/leds-kirkwood-ns2.h new file mode 100644 index 000000000000..e21272e5f668 --- /dev/null +++ b/include/linux/platform_data/leds-kirkwood-ns2.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-kirkwood/include/mach/leds-ns2.h | ||
| 3 | * | ||
| 4 | * Platform data structure for Network Space v2 LED driver | ||
| 5 | * | ||
| 6 | * This file is licensed under the terms of the GNU General Public | ||
| 7 | * License version 2. This program is licensed "as is" without any | ||
| 8 | * warranty of any kind, whether express or implied. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __MACH_LEDS_NS2_H | ||
| 12 | #define __MACH_LEDS_NS2_H | ||
| 13 | |||
| 14 | struct ns2_led { | ||
| 15 | const char *name; | ||
| 16 | const char *default_trigger; | ||
| 17 | unsigned cmd; | ||
| 18 | unsigned slow; | ||
| 19 | }; | ||
| 20 | |||
| 21 | struct ns2_led_platform_data { | ||
| 22 | int num_leds; | ||
| 23 | struct ns2_led *leds; | ||
| 24 | }; | ||
| 25 | |||
| 26 | #endif /* __MACH_LEDS_NS2_H */ | ||
diff --git a/include/linux/platform_data/leds-s3c24xx.h b/include/linux/platform_data/leds-s3c24xx.h new file mode 100644 index 000000000000..d8a7672519b6 --- /dev/null +++ b/include/linux/platform_data/leds-s3c24xx.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* arch/arm/mach-s3c2410/include/mach/leds-gpio.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2006 Simtec Electronics | ||
| 4 | * http://armlinux.simtec.co.uk/ | ||
| 5 | * Ben Dooks <ben@simtec.co.uk> | ||
| 6 | * | ||
| 7 | * S3C24XX - LEDs GPIO connector | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License version 2 as | ||
| 11 | * published by the Free Software Foundation. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef __ASM_ARCH_LEDSGPIO_H | ||
| 15 | #define __ASM_ARCH_LEDSGPIO_H "leds-gpio.h" | ||
| 16 | |||
| 17 | #define S3C24XX_LEDF_ACTLOW (1<<0) /* LED is on when GPIO low */ | ||
| 18 | #define S3C24XX_LEDF_TRISTATE (1<<1) /* tristate to turn off */ | ||
| 19 | |||
| 20 | struct s3c24xx_led_platdata { | ||
| 21 | unsigned int gpio; | ||
| 22 | unsigned int flags; | ||
| 23 | |||
| 24 | char *name; | ||
| 25 | char *def_trigger; | ||
| 26 | }; | ||
| 27 | |||
| 28 | #endif /* __ASM_ARCH_LEDSGPIO_H */ | ||
diff --git a/include/linux/platform_data/max310x.h b/include/linux/platform_data/max310x.h new file mode 100644 index 000000000000..91648bf5fc5c --- /dev/null +++ b/include/linux/platform_data/max310x.h | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | /* | ||
| 2 | * Maxim (Dallas) MAX3107/8 serial driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Alexander Shiyan <shc_work@mail.ru> | ||
| 5 | * | ||
| 6 | * Based on max3100.c, by Christian Pellegrin <chripell@evolware.org> | ||
| 7 | * Based on max3110.c, by Feng Tang <feng.tang@intel.com> | ||
| 8 | * Based on max3107.c, by Aavamobile | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License as published by | ||
| 12 | * the Free Software Foundation; either version 2 of the License, or | ||
| 13 | * (at your option) any later version. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #ifndef _MAX310X_H_ | ||
| 17 | #define _MAX310X_H_ | ||
| 18 | |||
| 19 | /* | ||
| 20 | * Example board initialization data: | ||
| 21 | * | ||
| 22 | * static struct max310x_pdata max3107_pdata = { | ||
| 23 | * .driver_flags = MAX310X_EXT_CLK, | ||
| 24 | * .uart_flags[0] = MAX310X_ECHO_SUPRESS | MAX310X_AUTO_DIR_CTRL, | ||
| 25 | * .frequency = 3686400, | ||
| 26 | * .gpio_base = -1, | ||
| 27 | * }; | ||
| 28 | * | ||
| 29 | * static struct spi_board_info spi_device_max3107[] = { | ||
| 30 | * { | ||
| 31 | * .modalias = "max3107", | ||
| 32 | * .irq = IRQ_EINT3, | ||
| 33 | * .bus_num = 1, | ||
| 34 | * .chip_select = 1, | ||
| 35 | * .platform_data = &max3107_pdata, | ||
| 36 | * }, | ||
| 37 | * }; | ||
| 38 | */ | ||
| 39 | |||
| 40 | #define MAX310X_MAX_UARTS 1 | ||
| 41 | |||
| 42 | /* MAX310X platform data structure */ | ||
| 43 | struct max310x_pdata { | ||
| 44 | /* Flags global to driver */ | ||
| 45 | const u8 driver_flags:2; | ||
| 46 | #define MAX310X_EXT_CLK (0x00000001) /* External clock enable */ | ||
| 47 | #define MAX310X_AUTOSLEEP (0x00000002) /* Enable AutoSleep mode */ | ||
| 48 | /* Flags global to UART port */ | ||
| 49 | const u8 uart_flags[MAX310X_MAX_UARTS]; | ||
| 50 | #define MAX310X_LOOPBACK (0x00000001) /* Loopback mode enable */ | ||
| 51 | #define MAX310X_ECHO_SUPRESS (0x00000002) /* Enable echo supress */ | ||
| 52 | #define MAX310X_AUTO_DIR_CTRL (0x00000004) /* Enable Auto direction | ||
| 53 | * control (RS-485) | ||
| 54 | */ | ||
| 55 | /* Frequency (extrenal clock or crystal) */ | ||
| 56 | const int frequency; | ||
| 57 | /* GPIO base number (can be negative) */ | ||
| 58 | const int gpio_base; | ||
| 59 | /* Called during startup */ | ||
| 60 | void (*init)(void); | ||
| 61 | /* Called before finish */ | ||
| 62 | void (*exit)(void); | ||
| 63 | /* Suspend callback */ | ||
| 64 | void (*suspend)(int do_suspend); | ||
| 65 | }; | ||
| 66 | |||
| 67 | #endif | ||
diff --git a/include/linux/platform_data/mfd-mcp-sa11x0.h b/include/linux/platform_data/mfd-mcp-sa11x0.h new file mode 100644 index 000000000000..4b2860ae3828 --- /dev/null +++ b/include/linux/platform_data/mfd-mcp-sa11x0.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-sa1100/include/mach/mcp.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2005 Russell King. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | #ifndef __ASM_ARM_ARCH_MCP_H | ||
| 11 | #define __ASM_ARM_ARCH_MCP_H | ||
| 12 | |||
| 13 | #include <linux/types.h> | ||
| 14 | |||
| 15 | struct mcp_plat_data { | ||
| 16 | u32 mccr0; | ||
| 17 | u32 mccr1; | ||
| 18 | unsigned int sclk_rate; | ||
| 19 | void *codec_pdata; | ||
| 20 | }; | ||
| 21 | |||
| 22 | #endif | ||
diff --git a/include/linux/platform_data/mipi-csis.h b/include/linux/platform_data/mipi-csis.h new file mode 100644 index 000000000000..c45b1e8d4c2e --- /dev/null +++ b/include/linux/platform_data/mipi-csis.h | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010-2011 Samsung Electronics Co., Ltd. | ||
| 3 | * | ||
| 4 | * S5P series MIPI CSI slave device support | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __PLAT_SAMSUNG_MIPI_CSIS_H_ | ||
| 12 | #define __PLAT_SAMSUNG_MIPI_CSIS_H_ __FILE__ | ||
| 13 | |||
| 14 | struct platform_device; | ||
| 15 | |||
| 16 | /** | ||
| 17 | * struct s5p_platform_mipi_csis - platform data for S5P MIPI-CSIS driver | ||
| 18 | * @clk_rate: bus clock frequency | ||
| 19 | * @lanes: number of data lanes used | ||
| 20 | * @alignment: data alignment in bits | ||
| 21 | * @hs_settle: HS-RX settle time | ||
| 22 | * @fixed_phy_vdd: false to enable external D-PHY regulator management in the | ||
| 23 | * driver or true in case this regulator has no enable function | ||
| 24 | * @phy_enable: pointer to a callback controlling D-PHY enable/reset | ||
| 25 | */ | ||
| 26 | struct s5p_platform_mipi_csis { | ||
| 27 | unsigned long clk_rate; | ||
| 28 | u8 lanes; | ||
| 29 | u8 alignment; | ||
| 30 | u8 hs_settle; | ||
| 31 | bool fixed_phy_vdd; | ||
| 32 | int (*phy_enable)(struct platform_device *pdev, bool on); | ||
| 33 | }; | ||
| 34 | |||
| 35 | /** | ||
| 36 | * s5p_csis_phy_enable - global MIPI-CSI receiver D-PHY control | ||
| 37 | * @pdev: MIPI-CSIS platform device | ||
| 38 | * @on: true to enable D-PHY and deassert its reset | ||
| 39 | * false to disable D-PHY | ||
| 40 | */ | ||
| 41 | int s5p_csis_phy_enable(struct platform_device *pdev, bool on); | ||
| 42 | |||
| 43 | #endif /* __PLAT_SAMSUNG_MIPI_CSIS_H_ */ | ||
diff --git a/include/linux/platform_data/mmc-davinci.h b/include/linux/platform_data/mmc-davinci.h new file mode 100644 index 000000000000..5ba6b22ce338 --- /dev/null +++ b/include/linux/platform_data/mmc-davinci.h | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | /* | ||
| 2 | * Board-specific MMC configuration | ||
| 3 | */ | ||
| 4 | |||
| 5 | #ifndef _DAVINCI_MMC_H | ||
| 6 | #define _DAVINCI_MMC_H | ||
| 7 | |||
| 8 | #include <linux/types.h> | ||
| 9 | #include <linux/mmc/host.h> | ||
| 10 | |||
| 11 | struct davinci_mmc_config { | ||
| 12 | /* get_cd()/get_wp() may sleep */ | ||
| 13 | int (*get_cd)(int module); | ||
| 14 | int (*get_ro)(int module); | ||
| 15 | |||
| 16 | void (*set_power)(int module, bool on); | ||
| 17 | |||
| 18 | /* wires == 0 is equivalent to wires == 4 (4-bit parallel) */ | ||
| 19 | u8 wires; | ||
| 20 | |||
| 21 | u32 max_freq; | ||
| 22 | |||
| 23 | /* any additional host capabilities: OR'd in to mmc->f_caps */ | ||
| 24 | u32 caps; | ||
| 25 | |||
| 26 | /* Version of the MMC/SD controller */ | ||
| 27 | u8 version; | ||
| 28 | |||
| 29 | /* Number of sg segments */ | ||
| 30 | u8 nr_sg; | ||
| 31 | }; | ||
| 32 | void davinci_setup_mmc(int module, struct davinci_mmc_config *config); | ||
| 33 | |||
| 34 | enum { | ||
| 35 | MMC_CTLR_VERSION_1 = 0, /* DM644x and DM355 */ | ||
| 36 | MMC_CTLR_VERSION_2, /* DA830 */ | ||
| 37 | }; | ||
| 38 | |||
| 39 | #endif | ||
diff --git a/include/linux/platform_data/mmc-esdhc-imx.h b/include/linux/platform_data/mmc-esdhc-imx.h new file mode 100644 index 000000000000..aaf97481f413 --- /dev/null +++ b/include/linux/platform_data/mmc-esdhc-imx.h | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2010 Wolfram Sang <w.sang@pengutronix.de> | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU General Public License | ||
| 6 | * as published by the Free Software Foundation; version 2 | ||
| 7 | * of the License. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __ASM_ARCH_IMX_ESDHC_H | ||
| 11 | #define __ASM_ARCH_IMX_ESDHC_H | ||
| 12 | |||
| 13 | enum wp_types { | ||
| 14 | ESDHC_WP_NONE, /* no WP, neither controller nor gpio */ | ||
| 15 | ESDHC_WP_CONTROLLER, /* mmc controller internal WP */ | ||
| 16 | ESDHC_WP_GPIO, /* external gpio pin for WP */ | ||
| 17 | }; | ||
| 18 | |||
| 19 | enum cd_types { | ||
| 20 | ESDHC_CD_NONE, /* no CD, neither controller nor gpio */ | ||
| 21 | ESDHC_CD_CONTROLLER, /* mmc controller internal CD */ | ||
| 22 | ESDHC_CD_GPIO, /* external gpio pin for CD */ | ||
| 23 | ESDHC_CD_PERMANENT, /* no CD, card permanently wired to host */ | ||
| 24 | }; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * struct esdhc_platform_data - platform data for esdhc on i.MX | ||
| 28 | * | ||
| 29 | * ESDHC_WP(CD)_CONTROLLER type is not available on i.MX25/35. | ||
| 30 | * | ||
| 31 | * @wp_gpio: gpio for write_protect | ||
| 32 | * @cd_gpio: gpio for card_detect interrupt | ||
| 33 | * @wp_type: type of write_protect method (see wp_types enum above) | ||
| 34 | * @cd_type: type of card_detect method (see cd_types enum above) | ||
| 35 | */ | ||
| 36 | |||
| 37 | struct esdhc_platform_data { | ||
| 38 | unsigned int wp_gpio; | ||
| 39 | unsigned int cd_gpio; | ||
| 40 | enum wp_types wp_type; | ||
| 41 | enum cd_types cd_type; | ||
| 42 | }; | ||
| 43 | #endif /* __ASM_ARCH_IMX_ESDHC_H */ | ||
diff --git a/include/linux/platform_data/mmc-msm_sdcc.h b/include/linux/platform_data/mmc-msm_sdcc.h new file mode 100644 index 000000000000..ffcd9e3a6a7e --- /dev/null +++ b/include/linux/platform_data/mmc-msm_sdcc.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/mach/mmc.h | ||
| 3 | */ | ||
| 4 | #ifndef ASMARM_MACH_MMC_H | ||
| 5 | #define ASMARM_MACH_MMC_H | ||
| 6 | |||
| 7 | #include <linux/mmc/host.h> | ||
| 8 | #include <linux/mmc/card.h> | ||
| 9 | #include <linux/mmc/sdio_func.h> | ||
| 10 | |||
| 11 | struct msm_mmc_gpio { | ||
| 12 | unsigned no; | ||
| 13 | const char *name; | ||
| 14 | }; | ||
| 15 | |||
| 16 | struct msm_mmc_gpio_data { | ||
| 17 | struct msm_mmc_gpio *gpio; | ||
| 18 | u8 size; | ||
| 19 | }; | ||
| 20 | |||
| 21 | struct msm_mmc_platform_data { | ||
| 22 | unsigned int ocr_mask; /* available voltages */ | ||
| 23 | u32 (*translate_vdd)(struct device *, unsigned int); | ||
| 24 | unsigned int (*status)(struct device *); | ||
| 25 | int (*register_status_notify)(void (*callback)(int card_present, void *dev_id), void *dev_id); | ||
| 26 | struct msm_mmc_gpio_data *gpio_data; | ||
| 27 | void (*init_card)(struct mmc_card *card); | ||
| 28 | }; | ||
| 29 | |||
| 30 | #endif | ||
diff --git a/include/linux/platform_data/mmc-mvsdio.h b/include/linux/platform_data/mmc-mvsdio.h new file mode 100644 index 000000000000..1190efedcb94 --- /dev/null +++ b/include/linux/platform_data/mmc-mvsdio.h | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/plat-orion/include/plat/mvsdio.h | ||
| 3 | * | ||
| 4 | * This file is licensed under the terms of the GNU General Public | ||
| 5 | * License version 2. This program is licensed "as is" without any | ||
| 6 | * warranty of any kind, whether express or implied. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef __MACH_MVSDIO_H | ||
| 10 | #define __MACH_MVSDIO_H | ||
| 11 | |||
| 12 | #include <linux/mbus.h> | ||
| 13 | |||
| 14 | struct mvsdio_platform_data { | ||
| 15 | unsigned int clock; | ||
| 16 | int gpio_card_detect; | ||
| 17 | int gpio_write_protect; | ||
| 18 | }; | ||
| 19 | |||
| 20 | #endif | ||
diff --git a/include/linux/platform_data/mmc-mxcmmc.h b/include/linux/platform_data/mmc-mxcmmc.h new file mode 100644 index 000000000000..29115f405af9 --- /dev/null +++ b/include/linux/platform_data/mmc-mxcmmc.h | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | #ifndef ASMARM_ARCH_MMC_H | ||
| 2 | #define ASMARM_ARCH_MMC_H | ||
| 3 | |||
| 4 | #include <linux/mmc/host.h> | ||
| 5 | |||
| 6 | struct device; | ||
| 7 | |||
| 8 | /* board specific SDHC data, optional. | ||
| 9 | * If not present, a writable card with 3,3V is assumed. | ||
| 10 | */ | ||
| 11 | struct imxmmc_platform_data { | ||
| 12 | /* Return values for the get_ro callback should be: | ||
| 13 | * 0 for a read/write card | ||
| 14 | * 1 for a read-only card | ||
| 15 | * -ENOSYS when not supported (equal to NULL callback) | ||
| 16 | * or a negative errno value when something bad happened | ||
| 17 | */ | ||
| 18 | int (*get_ro)(struct device *); | ||
| 19 | |||
| 20 | /* board specific hook to (de)initialize the SD slot. | ||
| 21 | * The board code can call 'handler' on a card detection | ||
| 22 | * change giving data as argument. | ||
| 23 | */ | ||
| 24 | int (*init)(struct device *dev, irq_handler_t handler, void *data); | ||
| 25 | void (*exit)(struct device *dev, void *data); | ||
| 26 | |||
| 27 | /* available voltages. If not given, assume | ||
| 28 | * MMC_VDD_32_33 | MMC_VDD_33_34 | ||
| 29 | */ | ||
| 30 | unsigned int ocr_avail; | ||
| 31 | |||
| 32 | /* adjust slot voltage */ | ||
| 33 | void (*setpower)(struct device *, unsigned int vdd); | ||
| 34 | |||
| 35 | /* enable card detect using DAT3 */ | ||
| 36 | int dat3_card_detect; | ||
| 37 | }; | ||
| 38 | |||
| 39 | #endif | ||
diff --git a/include/linux/platform_data/mmc-pxamci.h b/include/linux/platform_data/mmc-pxamci.h new file mode 100644 index 000000000000..9eb515bb799d --- /dev/null +++ b/include/linux/platform_data/mmc-pxamci.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #ifndef ASMARM_ARCH_MMC_H | ||
| 2 | #define ASMARM_ARCH_MMC_H | ||
| 3 | |||
| 4 | #include <linux/mmc/host.h> | ||
| 5 | #include <linux/interrupt.h> | ||
| 6 | |||
| 7 | struct device; | ||
| 8 | struct mmc_host; | ||
| 9 | |||
| 10 | struct pxamci_platform_data { | ||
| 11 | unsigned int ocr_mask; /* available voltages */ | ||
| 12 | unsigned long detect_delay_ms; /* delay in millisecond before detecting cards after interrupt */ | ||
| 13 | int (*init)(struct device *, irq_handler_t , void *); | ||
| 14 | int (*get_ro)(struct device *); | ||
| 15 | void (*setpower)(struct device *, unsigned int); | ||
| 16 | void (*exit)(struct device *, void *); | ||
| 17 | int gpio_card_detect; /* gpio detecting card insertion */ | ||
| 18 | int gpio_card_ro; /* gpio detecting read only toggle */ | ||
| 19 | bool gpio_card_ro_invert; /* gpio ro is inverted */ | ||
| 20 | int gpio_power; /* gpio powering up MMC bus */ | ||
| 21 | bool gpio_power_invert; /* gpio power is inverted */ | ||
| 22 | }; | ||
| 23 | |||
| 24 | extern void pxa_set_mci_info(struct pxamci_platform_data *info); | ||
| 25 | extern void pxa3xx_set_mci2_info(struct pxamci_platform_data *info); | ||
| 26 | extern void pxa3xx_set_mci3_info(struct pxamci_platform_data *info); | ||
| 27 | |||
| 28 | #endif | ||
diff --git a/include/linux/platform_data/mmc-s3cmci.h b/include/linux/platform_data/mmc-s3cmci.h new file mode 100644 index 000000000000..c42d31711944 --- /dev/null +++ b/include/linux/platform_data/mmc-s3cmci.h | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | #ifndef _ARCH_MCI_H | ||
| 2 | #define _ARCH_MCI_H | ||
| 3 | |||
| 4 | /** | ||
| 5 | * struct s3c24xx_mci_pdata - sd/mmc controller platform data | ||
| 6 | * @no_wprotect: Set this to indicate there is no write-protect switch. | ||
| 7 | * @no_detect: Set this if there is no detect switch. | ||
| 8 | * @wprotect_invert: Invert the default sense of the write protect switch. | ||
| 9 | * @detect_invert: Invert the default sense of the write protect switch. | ||
| 10 | * @use_dma: Set to allow the use of DMA. | ||
| 11 | * @gpio_detect: GPIO number for the card detect line. | ||
| 12 | * @gpio_wprotect: GPIO number for the write protect line. | ||
| 13 | * @ocr_avail: The mask of the available power states, non-zero to use. | ||
| 14 | * @set_power: Callback to control the power mode. | ||
| 15 | * | ||
| 16 | * The @gpio_detect is used for card detection when @no_wprotect is unset, | ||
| 17 | * and the default sense is that 0 returned from gpio_get_value() means | ||
| 18 | * that a card is inserted. If @detect_invert is set, then the value from | ||
| 19 | * gpio_get_value() is inverted, which makes 1 mean card inserted. | ||
| 20 | * | ||
| 21 | * The driver will use @gpio_wprotect to signal whether the card is write | ||
| 22 | * protected if @no_wprotect is not set. A 0 returned from gpio_get_value() | ||
| 23 | * means the card is read/write, and 1 means read-only. The @wprotect_invert | ||
| 24 | * will invert the value returned from gpio_get_value(). | ||
| 25 | * | ||
| 26 | * Card power is set by @ocr_availa, using MCC_VDD_ constants if it is set | ||
| 27 | * to a non-zero value, otherwise the default of 3.2-3.4V is used. | ||
| 28 | */ | ||
| 29 | struct s3c24xx_mci_pdata { | ||
| 30 | unsigned int no_wprotect:1; | ||
| 31 | unsigned int no_detect:1; | ||
| 32 | unsigned int wprotect_invert:1; | ||
| 33 | unsigned int detect_invert:1; /* set => detect active high */ | ||
| 34 | unsigned int use_dma:1; | ||
| 35 | |||
| 36 | unsigned int gpio_detect; | ||
| 37 | unsigned int gpio_wprotect; | ||
| 38 | unsigned long ocr_avail; | ||
| 39 | void (*set_power)(unsigned char power_mode, | ||
| 40 | unsigned short vdd); | ||
| 41 | }; | ||
| 42 | |||
| 43 | /** | ||
| 44 | * s3c24xx_mci_set_platdata - set platform data for mmc/sdi device | ||
| 45 | * @pdata: The platform data | ||
| 46 | * | ||
| 47 | * Copy the platform data supplied by @pdata so that this can be marked | ||
| 48 | * __initdata. | ||
| 49 | */ | ||
| 50 | extern void s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata); | ||
| 51 | |||
| 52 | #endif /* _ARCH_NCI_H */ | ||
diff --git a/include/linux/platform_data/mmc-sdhci-tegra.h b/include/linux/platform_data/mmc-sdhci-tegra.h new file mode 100644 index 000000000000..8f8430697686 --- /dev/null +++ b/include/linux/platform_data/mmc-sdhci-tegra.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2009 Palm, Inc. | ||
| 3 | * Author: Yvonne Yip <y@palm.com> | ||
| 4 | * | ||
| 5 | * This software is licensed under the terms of the GNU General Public | ||
| 6 | * License version 2, as published by the Free Software Foundation, and | ||
| 7 | * may be copied, distributed, and modified under those terms. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | */ | ||
| 15 | #ifndef __PLATFORM_DATA_TEGRA_SDHCI_H | ||
| 16 | #define __PLATFORM_DATA_TEGRA_SDHCI_H | ||
| 17 | |||
| 18 | #include <linux/mmc/host.h> | ||
| 19 | |||
| 20 | struct tegra_sdhci_platform_data { | ||
| 21 | int cd_gpio; | ||
| 22 | int wp_gpio; | ||
| 23 | int power_gpio; | ||
| 24 | int is_8bit; | ||
| 25 | int pm_flags; | ||
| 26 | }; | ||
| 27 | |||
| 28 | #endif | ||
diff --git a/include/linux/platform_data/mouse-pxa930_trkball.h b/include/linux/platform_data/mouse-pxa930_trkball.h new file mode 100644 index 000000000000..5e0789bc4729 --- /dev/null +++ b/include/linux/platform_data/mouse-pxa930_trkball.h | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | #ifndef __ASM_ARCH_PXA930_TRKBALL_H | ||
| 2 | #define __ASM_ARCH_PXA930_TRKBALL_H | ||
| 3 | |||
| 4 | struct pxa930_trkball_platform_data { | ||
| 5 | int x_filter; | ||
| 6 | int y_filter; | ||
| 7 | }; | ||
| 8 | |||
| 9 | #endif /* __ASM_ARCH_PXA930_TRKBALL_H */ | ||
| 10 | |||
diff --git a/include/linux/platform_data/mtd-davinci-aemif.h b/include/linux/platform_data/mtd-davinci-aemif.h new file mode 100644 index 000000000000..05b293443097 --- /dev/null +++ b/include/linux/platform_data/mtd-davinci-aemif.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* | ||
| 2 | * TI DaVinci AEMIF support | ||
| 3 | * | ||
| 4 | * Copyright 2010 (C) Texas Instruments, Inc. http://www.ti.com/ | ||
| 5 | * | ||
| 6 | * This file is licensed under the terms of the GNU General Public License | ||
| 7 | * version 2. This program is licensed "as is" without any warranty of any | ||
| 8 | * kind, whether express or implied. | ||
| 9 | */ | ||
| 10 | #ifndef _MACH_DAVINCI_AEMIF_H | ||
| 11 | #define _MACH_DAVINCI_AEMIF_H | ||
| 12 | |||
| 13 | #define NRCSR_OFFSET 0x00 | ||
| 14 | #define AWCCR_OFFSET 0x04 | ||
| 15 | #define A1CR_OFFSET 0x10 | ||
| 16 | |||
| 17 | #define ACR_ASIZE_MASK 0x3 | ||
| 18 | #define ACR_EW_MASK BIT(30) | ||
| 19 | #define ACR_SS_MASK BIT(31) | ||
| 20 | |||
| 21 | /* All timings in nanoseconds */ | ||
| 22 | struct davinci_aemif_timing { | ||
| 23 | u8 wsetup; | ||
| 24 | u8 wstrobe; | ||
| 25 | u8 whold; | ||
| 26 | |||
| 27 | u8 rsetup; | ||
| 28 | u8 rstrobe; | ||
| 29 | u8 rhold; | ||
| 30 | |||
| 31 | u8 ta; | ||
| 32 | }; | ||
| 33 | |||
| 34 | int davinci_aemif_setup_timing(struct davinci_aemif_timing *t, | ||
| 35 | void __iomem *base, unsigned cs); | ||
| 36 | #endif | ||
diff --git a/include/linux/platform_data/mtd-davinci.h b/include/linux/platform_data/mtd-davinci.h new file mode 100644 index 000000000000..1cf555aef896 --- /dev/null +++ b/include/linux/platform_data/mtd-davinci.h | |||
| @@ -0,0 +1,90 @@ | |||
| 1 | /* | ||
| 2 | * mach-davinci/nand.h | ||
| 3 | * | ||
| 4 | * Copyright © 2006 Texas Instruments. | ||
| 5 | * | ||
| 6 | * Ported to 2.6.23 Copyright © 2008 by | ||
| 7 | * Sander Huijsen <Shuijsen@optelecom-nkf.com> | ||
| 8 | * Troy Kisky <troy.kisky@boundarydevices.com> | ||
| 9 | * Dirk Behme <Dirk.Behme@gmail.com> | ||
| 10 | * | ||
| 11 | * -------------------------------------------------------------------------- | ||
| 12 | * | ||
| 13 | * This program is free software; you can redistribute it and/or modify | ||
| 14 | * it under the terms of the GNU General Public License as published by | ||
| 15 | * the Free Software Foundation; either version 2 of the License, or | ||
| 16 | * (at your option) any later version. | ||
| 17 | * | ||
| 18 | * This program is distributed in the hope that it will be useful, | ||
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 21 | * GNU General Public License for more details. | ||
| 22 | * | ||
| 23 | * You should have received a copy of the GNU General Public License | ||
| 24 | * along with this program; if not, write to the Free Software | ||
| 25 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 26 | */ | ||
| 27 | |||
| 28 | #ifndef __ARCH_ARM_DAVINCI_NAND_H | ||
| 29 | #define __ARCH_ARM_DAVINCI_NAND_H | ||
| 30 | |||
| 31 | #include <linux/mtd/nand.h> | ||
| 32 | |||
| 33 | #define NANDFCR_OFFSET 0x60 | ||
| 34 | #define NANDFSR_OFFSET 0x64 | ||
| 35 | #define NANDF1ECC_OFFSET 0x70 | ||
| 36 | |||
| 37 | /* 4-bit ECC syndrome registers */ | ||
| 38 | #define NAND_4BIT_ECC_LOAD_OFFSET 0xbc | ||
| 39 | #define NAND_4BIT_ECC1_OFFSET 0xc0 | ||
| 40 | #define NAND_4BIT_ECC2_OFFSET 0xc4 | ||
| 41 | #define NAND_4BIT_ECC3_OFFSET 0xc8 | ||
| 42 | #define NAND_4BIT_ECC4_OFFSET 0xcc | ||
| 43 | #define NAND_ERR_ADD1_OFFSET 0xd0 | ||
| 44 | #define NAND_ERR_ADD2_OFFSET 0xd4 | ||
| 45 | #define NAND_ERR_ERRVAL1_OFFSET 0xd8 | ||
| 46 | #define NAND_ERR_ERRVAL2_OFFSET 0xdc | ||
| 47 | |||
| 48 | /* NOTE: boards don't need to use these address bits | ||
| 49 | * for ALE/CLE unless they support booting from NAND. | ||
| 50 | * They're used unless platform data overrides them. | ||
| 51 | */ | ||
| 52 | #define MASK_ALE 0x08 | ||
| 53 | #define MASK_CLE 0x10 | ||
| 54 | |||
| 55 | struct davinci_nand_pdata { /* platform_data */ | ||
| 56 | uint32_t mask_ale; | ||
| 57 | uint32_t mask_cle; | ||
| 58 | |||
| 59 | /* for packages using two chipselects */ | ||
| 60 | uint32_t mask_chipsel; | ||
| 61 | |||
| 62 | /* board's default static partition info */ | ||
| 63 | struct mtd_partition *parts; | ||
| 64 | unsigned nr_parts; | ||
| 65 | |||
| 66 | /* none == NAND_ECC_NONE (strongly *not* advised!!) | ||
| 67 | * soft == NAND_ECC_SOFT | ||
| 68 | * else == NAND_ECC_HW, according to ecc_bits | ||
| 69 | * | ||
| 70 | * All DaVinci-family chips support 1-bit hardware ECC. | ||
| 71 | * Newer ones also support 4-bit ECC, but are awkward | ||
| 72 | * using it with large page chips. | ||
| 73 | */ | ||
| 74 | nand_ecc_modes_t ecc_mode; | ||
| 75 | u8 ecc_bits; | ||
| 76 | |||
| 77 | /* e.g. NAND_BUSWIDTH_16 */ | ||
| 78 | unsigned options; | ||
| 79 | /* e.g. NAND_BBT_USE_FLASH */ | ||
| 80 | unsigned bbt_options; | ||
| 81 | |||
| 82 | /* Main and mirror bbt descriptor overrides */ | ||
| 83 | struct nand_bbt_descr *bbt_td; | ||
| 84 | struct nand_bbt_descr *bbt_md; | ||
| 85 | |||
| 86 | /* Access timings */ | ||
| 87 | struct davinci_aemif_timing *timing; | ||
| 88 | }; | ||
| 89 | |||
| 90 | #endif /* __ARCH_ARM_DAVINCI_NAND_H */ | ||
diff --git a/include/linux/platform_data/mtd-mxc_nand.h b/include/linux/platform_data/mtd-mxc_nand.h new file mode 100644 index 000000000000..6bb96ef1600b --- /dev/null +++ b/include/linux/platform_data/mtd-mxc_nand.h | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | * Copyright 2008 Sascha Hauer, kernel@pengutronix.de | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or | ||
| 6 | * modify it under the terms of the GNU General Public License | ||
| 7 | * as published by the Free Software Foundation; either version 2 | ||
| 8 | * of the License, or (at your option) any later version. | ||
| 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., 51 Franklin Street, Fifth Floor, Boston, | ||
| 17 | * MA 02110-1301, USA. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef __ASM_ARCH_NAND_H | ||
| 21 | #define __ASM_ARCH_NAND_H | ||
| 22 | |||
| 23 | #include <linux/mtd/partitions.h> | ||
| 24 | |||
| 25 | struct mxc_nand_platform_data { | ||
| 26 | unsigned int width; /* data bus width in bytes */ | ||
| 27 | unsigned int hw_ecc:1; /* 0 if suppress hardware ECC */ | ||
| 28 | unsigned int flash_bbt:1; /* set to 1 to use a flash based bbt */ | ||
| 29 | struct mtd_partition *parts; /* partition table */ | ||
| 30 | int nr_parts; /* size of parts */ | ||
| 31 | }; | ||
| 32 | #endif /* __ASM_ARCH_NAND_H */ | ||
diff --git a/include/linux/platform_data/mtd-nand-omap2.h b/include/linux/platform_data/mtd-nand-omap2.h new file mode 100644 index 000000000000..1a68c1e5fe53 --- /dev/null +++ b/include/linux/platform_data/mtd-nand-omap2.h | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/plat-omap/include/mach/nand.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 Micron Technology Inc. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #include <plat/gpmc.h> | ||
| 12 | #include <linux/mtd/partitions.h> | ||
| 13 | |||
| 14 | enum nand_io { | ||
| 15 | NAND_OMAP_PREFETCH_POLLED = 0, /* prefetch polled mode, default */ | ||
| 16 | NAND_OMAP_POLLED, /* polled mode, without prefetch */ | ||
| 17 | NAND_OMAP_PREFETCH_DMA, /* prefetch enabled sDMA mode */ | ||
| 18 | NAND_OMAP_PREFETCH_IRQ /* prefetch enabled irq mode */ | ||
| 19 | }; | ||
| 20 | |||
| 21 | struct omap_nand_platform_data { | ||
| 22 | int cs; | ||
| 23 | struct mtd_partition *parts; | ||
| 24 | struct gpmc_timings *gpmc_t; | ||
| 25 | int nr_parts; | ||
| 26 | bool dev_ready; | ||
| 27 | enum nand_io xfer_type; | ||
| 28 | int devsize; | ||
| 29 | enum omap_ecc ecc_opt; | ||
| 30 | struct gpmc_nand_regs reg; | ||
| 31 | }; | ||
| 32 | |||
| 33 | /* minimum size for IO mapping */ | ||
| 34 | #define NAND_IO_SIZE 4 | ||
| 35 | |||
| 36 | #if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE) | ||
| 37 | extern int gpmc_nand_init(struct omap_nand_platform_data *d); | ||
| 38 | #else | ||
| 39 | static inline int gpmc_nand_init(struct omap_nand_platform_data *d) | ||
| 40 | { | ||
| 41 | return 0; | ||
| 42 | } | ||
| 43 | #endif | ||
diff --git a/include/linux/platform_data/mtd-nand-pxa3xx.h b/include/linux/platform_data/mtd-nand-pxa3xx.h new file mode 100644 index 000000000000..c42f39f20195 --- /dev/null +++ b/include/linux/platform_data/mtd-nand-pxa3xx.h | |||
| @@ -0,0 +1,79 @@ | |||
| 1 | #ifndef __ASM_ARCH_PXA3XX_NAND_H | ||
| 2 | #define __ASM_ARCH_PXA3XX_NAND_H | ||
| 3 | |||
| 4 | #include <linux/mtd/mtd.h> | ||
| 5 | #include <linux/mtd/partitions.h> | ||
| 6 | |||
| 7 | struct pxa3xx_nand_timing { | ||
| 8 | unsigned int tCH; /* Enable signal hold time */ | ||
| 9 | unsigned int tCS; /* Enable signal setup time */ | ||
| 10 | unsigned int tWH; /* ND_nWE high duration */ | ||
| 11 | unsigned int tWP; /* ND_nWE pulse time */ | ||
| 12 | unsigned int tRH; /* ND_nRE high duration */ | ||
| 13 | unsigned int tRP; /* ND_nRE pulse width */ | ||
| 14 | unsigned int tR; /* ND_nWE high to ND_nRE low for read */ | ||
| 15 | unsigned int tWHR; /* ND_nWE high to ND_nRE low for status read */ | ||
| 16 | unsigned int tAR; /* ND_ALE low to ND_nRE low delay */ | ||
| 17 | }; | ||
| 18 | |||
| 19 | struct pxa3xx_nand_cmdset { | ||
| 20 | uint16_t read1; | ||
| 21 | uint16_t read2; | ||
| 22 | uint16_t program; | ||
| 23 | uint16_t read_status; | ||
| 24 | uint16_t read_id; | ||
| 25 | uint16_t erase; | ||
| 26 | uint16_t reset; | ||
| 27 | uint16_t lock; | ||
| 28 | uint16_t unlock; | ||
| 29 | uint16_t lock_status; | ||
| 30 | }; | ||
| 31 | |||
| 32 | struct pxa3xx_nand_flash { | ||
| 33 | char *name; | ||
| 34 | uint32_t chip_id; | ||
| 35 | unsigned int page_per_block; /* Pages per block (PG_PER_BLK) */ | ||
| 36 | unsigned int page_size; /* Page size in bytes (PAGE_SZ) */ | ||
| 37 | unsigned int flash_width; /* Width of Flash memory (DWIDTH_M) */ | ||
| 38 | unsigned int dfc_width; /* Width of flash controller(DWIDTH_C) */ | ||
| 39 | unsigned int num_blocks; /* Number of physical blocks in Flash */ | ||
| 40 | |||
| 41 | struct pxa3xx_nand_timing *timing; /* NAND Flash timing */ | ||
| 42 | }; | ||
| 43 | |||
| 44 | /* | ||
| 45 | * Current pxa3xx_nand controller has two chip select which | ||
| 46 | * both be workable. | ||
| 47 | * | ||
| 48 | * Notice should be taken that: | ||
| 49 | * When you want to use this feature, you should not enable the | ||
| 50 | * keep configuration feature, for two chip select could be | ||
| 51 | * attached with different nand chip. The different page size | ||
| 52 | * and timing requirement make the keep configuration impossible. | ||
| 53 | */ | ||
| 54 | |||
| 55 | /* The max num of chip select current support */ | ||
| 56 | #define NUM_CHIP_SELECT (2) | ||
| 57 | struct pxa3xx_nand_platform_data { | ||
| 58 | |||
| 59 | /* the data flash bus is shared between the Static Memory | ||
| 60 | * Controller and the Data Flash Controller, the arbiter | ||
| 61 | * controls the ownership of the bus | ||
| 62 | */ | ||
| 63 | int enable_arbiter; | ||
| 64 | |||
| 65 | /* allow platform code to keep OBM/bootloader defined NFC config */ | ||
| 66 | int keep_config; | ||
| 67 | |||
| 68 | /* indicate how many chip selects will be used */ | ||
| 69 | int num_cs; | ||
| 70 | |||
| 71 | const struct mtd_partition *parts[NUM_CHIP_SELECT]; | ||
| 72 | unsigned int nr_parts[NUM_CHIP_SELECT]; | ||
| 73 | |||
| 74 | const struct pxa3xx_nand_flash * flash; | ||
| 75 | size_t num_flash; | ||
| 76 | }; | ||
| 77 | |||
| 78 | extern void pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info); | ||
| 79 | #endif /* __ASM_ARCH_PXA3XX_NAND_H */ | ||
diff --git a/include/linux/platform_data/mtd-nand-s3c2410.h b/include/linux/platform_data/mtd-nand-s3c2410.h new file mode 100644 index 000000000000..b64115fa93a4 --- /dev/null +++ b/include/linux/platform_data/mtd-nand-s3c2410.h | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | /* arch/arm/mach-s3c2410/include/mach/nand.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2004 Simtec Electronics | ||
| 4 | * Ben Dooks <ben@simtec.co.uk> | ||
| 5 | * | ||
| 6 | * S3C2410 - NAND device controller platform_device info | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 as | ||
| 10 | * published by the Free Software Foundation. | ||
| 11 | */ | ||
| 12 | |||
| 13 | /** | ||
| 14 | * struct s3c2410_nand_set - define a set of one or more nand chips | ||
| 15 | * @disable_ecc: Entirely disable ECC - Dangerous | ||
| 16 | * @flash_bbt: Openmoko u-boot can create a Bad Block Table | ||
| 17 | * Setting this flag will allow the kernel to | ||
| 18 | * look for it at boot time and also skip the NAND | ||
| 19 | * scan. | ||
| 20 | * @options: Default value to set into 'struct nand_chip' options. | ||
| 21 | * @nr_chips: Number of chips in this set | ||
| 22 | * @nr_partitions: Number of partitions pointed to by @partitions | ||
| 23 | * @name: Name of set (optional) | ||
| 24 | * @nr_map: Map for low-layer logical to physical chip numbers (option) | ||
| 25 | * @partitions: The mtd partition list | ||
| 26 | * | ||
| 27 | * define a set of one or more nand chips registered with an unique mtd. Also | ||
| 28 | * allows to pass flag to the underlying NAND layer. 'disable_ecc' will trigger | ||
| 29 | * a warning at boot time. | ||
| 30 | */ | ||
| 31 | struct s3c2410_nand_set { | ||
| 32 | unsigned int disable_ecc:1; | ||
| 33 | unsigned int flash_bbt:1; | ||
| 34 | |||
| 35 | unsigned int options; | ||
| 36 | int nr_chips; | ||
| 37 | int nr_partitions; | ||
| 38 | char *name; | ||
| 39 | int *nr_map; | ||
| 40 | struct mtd_partition *partitions; | ||
| 41 | struct nand_ecclayout *ecc_layout; | ||
| 42 | }; | ||
| 43 | |||
| 44 | struct s3c2410_platform_nand { | ||
| 45 | /* timing information for controller, all times in nanoseconds */ | ||
| 46 | |||
| 47 | int tacls; /* time for active CLE/ALE to nWE/nOE */ | ||
| 48 | int twrph0; /* active time for nWE/nOE */ | ||
| 49 | int twrph1; /* time for release CLE/ALE from nWE/nOE inactive */ | ||
| 50 | |||
| 51 | unsigned int ignore_unset_ecc:1; | ||
| 52 | |||
| 53 | int nr_sets; | ||
| 54 | struct s3c2410_nand_set *sets; | ||
| 55 | |||
| 56 | void (*select_chip)(struct s3c2410_nand_set *, | ||
| 57 | int chip); | ||
| 58 | }; | ||
| 59 | |||
| 60 | /** | ||
| 61 | * s3c_nand_set_platdata() - register NAND platform data. | ||
| 62 | * @nand: The NAND platform data to register with s3c_device_nand. | ||
| 63 | * | ||
| 64 | * This function copies the given NAND platform data, @nand and registers | ||
| 65 | * it with the s3c_device_nand. This allows @nand to be __initdata. | ||
| 66 | */ | ||
| 67 | extern void s3c_nand_set_platdata(struct s3c2410_platform_nand *nand); | ||
diff --git a/include/linux/platform_data/mtd-nomadik-nand.h b/include/linux/platform_data/mtd-nomadik-nand.h new file mode 100644 index 000000000000..c3c8254c22a5 --- /dev/null +++ b/include/linux/platform_data/mtd-nomadik-nand.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #ifndef __ASM_ARCH_NAND_H | ||
| 2 | #define __ASM_ARCH_NAND_H | ||
| 3 | |||
| 4 | struct nomadik_nand_platform_data { | ||
| 5 | struct mtd_partition *parts; | ||
| 6 | int nparts; | ||
| 7 | int options; | ||
| 8 | int (*init) (void); | ||
| 9 | int (*exit) (void); | ||
| 10 | }; | ||
| 11 | |||
| 12 | #define NAND_IO_DATA 0x40000000 | ||
| 13 | #define NAND_IO_CMD 0x40800000 | ||
| 14 | #define NAND_IO_ADDR 0x41000000 | ||
| 15 | |||
| 16 | #endif /* __ASM_ARCH_NAND_H */ | ||
diff --git a/include/linux/platform_data/mtd-onenand-omap2.h b/include/linux/platform_data/mtd-onenand-omap2.h new file mode 100644 index 000000000000..2858667d2e4f --- /dev/null +++ b/include/linux/platform_data/mtd-onenand-omap2.h | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/plat-omap/include/mach/onenand.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 Nokia Corporation | ||
| 5 | * Author: Juha Yrjola | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/mtd/mtd.h> | ||
| 13 | #include <linux/mtd/partitions.h> | ||
| 14 | |||
| 15 | #define ONENAND_SYNC_READ (1 << 0) | ||
| 16 | #define ONENAND_SYNC_READWRITE (1 << 1) | ||
| 17 | |||
| 18 | struct onenand_freq_info { | ||
| 19 | u16 maf_id; | ||
| 20 | u16 dev_id; | ||
| 21 | u16 ver_id; | ||
| 22 | }; | ||
| 23 | |||
| 24 | struct omap_onenand_platform_data { | ||
| 25 | int cs; | ||
| 26 | int gpio_irq; | ||
| 27 | struct mtd_partition *parts; | ||
| 28 | int nr_parts; | ||
| 29 | int (*onenand_setup)(void __iomem *, int *freq_ptr); | ||
| 30 | int (*get_freq)(const struct onenand_freq_info *freq_info, | ||
| 31 | bool *clk_dep); | ||
| 32 | int dma_channel; | ||
| 33 | u8 flags; | ||
| 34 | u8 regulator_can_sleep; | ||
| 35 | u8 skip_initial_unlocking; | ||
| 36 | }; | ||
| 37 | |||
| 38 | #define ONENAND_MAX_PARTITIONS 8 | ||
| 39 | |||
| 40 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ | ||
| 41 | defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) | ||
| 42 | |||
| 43 | extern void gpmc_onenand_init(struct omap_onenand_platform_data *d); | ||
| 44 | |||
| 45 | #else | ||
| 46 | |||
| 47 | #define board_onenand_data NULL | ||
| 48 | |||
| 49 | static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d) | ||
| 50 | { | ||
| 51 | } | ||
| 52 | |||
| 53 | #endif | ||
diff --git a/include/linux/platform_data/mtd-orion_nand.h b/include/linux/platform_data/mtd-orion_nand.h new file mode 100644 index 000000000000..9f3c180834d1 --- /dev/null +++ b/include/linux/platform_data/mtd-orion_nand.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/plat-orion/include/plat/orion_nand.h | ||
| 3 | * | ||
| 4 | * This file is licensed under the terms of the GNU General Public | ||
| 5 | * License version 2. This program is licensed "as is" without any | ||
| 6 | * warranty of any kind, whether express or implied. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef __PLAT_ORION_NAND_H | ||
| 10 | #define __PLAT_ORION_NAND_H | ||
| 11 | |||
| 12 | /* | ||
| 13 | * Device bus NAND private data | ||
| 14 | */ | ||
| 15 | struct orion_nand_data { | ||
| 16 | struct mtd_partition *parts; | ||
| 17 | int (*dev_ready)(struct mtd_info *mtd); | ||
| 18 | u32 nr_parts; | ||
| 19 | u8 ale; /* address line number connected to ALE */ | ||
| 20 | u8 cle; /* address line number connected to CLE */ | ||
| 21 | u8 width; /* buswidth */ | ||
| 22 | u8 chip_delay; | ||
| 23 | }; | ||
| 24 | |||
| 25 | |||
| 26 | #endif | ||
diff --git a/include/linux/platform_data/omap1_bl.h b/include/linux/platform_data/omap1_bl.h new file mode 100644 index 000000000000..881a8e92d605 --- /dev/null +++ b/include/linux/platform_data/omap1_bl.h | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #ifndef __OMAP1_BL_H__ | ||
| 2 | #define __OMAP1_BL_H__ | ||
| 3 | |||
| 4 | #include <linux/device.h> | ||
| 5 | |||
| 6 | struct omap_backlight_config { | ||
| 7 | int default_intensity; | ||
| 8 | int (*set_power)(struct device *dev, int state); | ||
| 9 | }; | ||
| 10 | |||
| 11 | #endif | ||
diff --git a/include/linux/platform_data/pcmcia-pxa2xx_viper.h b/include/linux/platform_data/pcmcia-pxa2xx_viper.h new file mode 100644 index 000000000000..d428be4db44c --- /dev/null +++ b/include/linux/platform_data/pcmcia-pxa2xx_viper.h | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #ifndef __ARCOM_PCMCIA_H | ||
| 2 | #define __ARCOM_PCMCIA_H | ||
| 3 | |||
| 4 | struct arcom_pcmcia_pdata { | ||
| 5 | int cd_gpio; | ||
| 6 | int rdy_gpio; | ||
| 7 | int pwr_gpio; | ||
| 8 | void (*reset)(int state); | ||
| 9 | }; | ||
| 10 | |||
| 11 | #endif | ||
diff --git a/include/linux/platform_data/pinctrl-coh901.h b/include/linux/platform_data/pinctrl-coh901.h new file mode 100644 index 000000000000..30dea251b835 --- /dev/null +++ b/include/linux/platform_data/pinctrl-coh901.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2007-2012 ST-Ericsson AB | ||
| 3 | * License terms: GNU General Public License (GPL) version 2 | ||
| 4 | * GPIO block resgister definitions and inline macros for | ||
| 5 | * U300 GPIO COH 901 335 or COH 901 571/3 | ||
| 6 | * Author: Linus Walleij <linus.walleij@stericsson.com> | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef __MACH_U300_GPIO_U300_H | ||
| 10 | #define __MACH_U300_GPIO_U300_H | ||
| 11 | |||
| 12 | /** | ||
| 13 | * struct u300_gpio_platform - U300 GPIO platform data | ||
| 14 | * @ports: number of GPIO block ports | ||
| 15 | * @gpio_base: first GPIO number for this block (use a free range) | ||
| 16 | * @gpio_irq_base: first GPIO IRQ number for this block (use a free range) | ||
| 17 | * @pinctrl_device: pin control device to spawn as child | ||
| 18 | */ | ||
| 19 | struct u300_gpio_platform { | ||
| 20 | u8 ports; | ||
| 21 | int gpio_base; | ||
| 22 | int gpio_irq_base; | ||
| 23 | struct platform_device *pinctrl_device; | ||
| 24 | }; | ||
| 25 | |||
| 26 | #endif /* __MACH_U300_GPIO_U300_H */ | ||
diff --git a/include/linux/platform_data/remoteproc-omap.h b/include/linux/platform_data/remoteproc-omap.h new file mode 100644 index 000000000000..b10eac89e2e9 --- /dev/null +++ b/include/linux/platform_data/remoteproc-omap.h | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | /* | ||
| 2 | * Remote Processor - omap-specific bits | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 Texas Instruments, Inc. | ||
| 5 | * Copyright (C) 2011 Google, Inc. | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or | ||
| 8 | * modify it under the terms 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 that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef _PLAT_REMOTEPROC_H | ||
| 18 | #define _PLAT_REMOTEPROC_H | ||
| 19 | |||
| 20 | struct rproc_ops; | ||
| 21 | struct platform_device; | ||
| 22 | |||
| 23 | /* | ||
| 24 | * struct omap_rproc_pdata - omap remoteproc's platform data | ||
| 25 | * @name: the remoteproc's name | ||
| 26 | * @oh_name: omap hwmod device | ||
| 27 | * @oh_name_opt: optional, secondary omap hwmod device | ||
| 28 | * @firmware: name of firmware file to load | ||
| 29 | * @mbox_name: name of omap mailbox device to use with this rproc | ||
| 30 | * @ops: start/stop rproc handlers | ||
| 31 | * @device_enable: omap-specific handler for enabling a device | ||
| 32 | * @device_shutdown: omap-specific handler for shutting down a device | ||
| 33 | */ | ||
| 34 | struct omap_rproc_pdata { | ||
| 35 | const char *name; | ||
| 36 | const char *oh_name; | ||
| 37 | const char *oh_name_opt; | ||
| 38 | const char *firmware; | ||
| 39 | const char *mbox_name; | ||
| 40 | const struct rproc_ops *ops; | ||
| 41 | int (*device_enable) (struct platform_device *pdev); | ||
| 42 | int (*device_shutdown) (struct platform_device *pdev); | ||
| 43 | }; | ||
| 44 | |||
| 45 | #if defined(CONFIG_OMAP_REMOTEPROC) || defined(CONFIG_OMAP_REMOTEPROC_MODULE) | ||
| 46 | |||
| 47 | void __init omap_rproc_reserve_cma(void); | ||
| 48 | |||
| 49 | #else | ||
| 50 | |||
| 51 | void __init omap_rproc_reserve_cma(void) | ||
| 52 | { | ||
| 53 | } | ||
| 54 | |||
| 55 | #endif | ||
| 56 | |||
| 57 | #endif /* _PLAT_REMOTEPROC_H */ | ||
diff --git a/include/linux/platform_data/sccnxp.h b/include/linux/platform_data/sccnxp.h new file mode 100644 index 000000000000..7311ccd3217f --- /dev/null +++ b/include/linux/platform_data/sccnxp.h | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | /* | ||
| 2 | * NXP (Philips) SCC+++(SCN+++) serial driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Alexander Shiyan <shc_work@mail.ru> | ||
| 5 | * | ||
| 6 | * Based on sc26xx.c, by Thomas Bogendörfer (tsbogend@alpha.franken.de) | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License as published by | ||
| 10 | * the Free Software Foundation; either version 2 of the License, or | ||
| 11 | * (at your option) any later version. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef __SCCNXP_H | ||
| 15 | #define __SCCNXP_H | ||
| 16 | |||
| 17 | #define SCCNXP_MAX_UARTS 2 | ||
| 18 | |||
| 19 | /* Output lines */ | ||
| 20 | #define LINE_OP0 1 | ||
| 21 | #define LINE_OP1 2 | ||
| 22 | #define LINE_OP2 3 | ||
| 23 | #define LINE_OP3 4 | ||
| 24 | #define LINE_OP4 5 | ||
| 25 | #define LINE_OP5 6 | ||
| 26 | #define LINE_OP6 7 | ||
| 27 | #define LINE_OP7 8 | ||
| 28 | |||
| 29 | /* Input lines */ | ||
| 30 | #define LINE_IP0 9 | ||
| 31 | #define LINE_IP1 10 | ||
| 32 | #define LINE_IP2 11 | ||
| 33 | #define LINE_IP3 12 | ||
| 34 | #define LINE_IP4 13 | ||
| 35 | #define LINE_IP5 14 | ||
| 36 | #define LINE_IP6 15 | ||
| 37 | |||
| 38 | /* Signals */ | ||
| 39 | #define DTR_OP 0 /* DTR */ | ||
| 40 | #define RTS_OP 4 /* RTS */ | ||
| 41 | #define DSR_IP 8 /* DSR */ | ||
| 42 | #define CTS_IP 12 /* CTS */ | ||
| 43 | #define DCD_IP 16 /* DCD */ | ||
| 44 | #define RNG_IP 20 /* RNG */ | ||
| 45 | |||
| 46 | #define DIR_OP 24 /* Special signal for control RS-485. | ||
| 47 | * Goes high when transmit, | ||
| 48 | * then goes low. | ||
| 49 | */ | ||
| 50 | |||
| 51 | /* Routing control signal 'sig' to line 'line' */ | ||
| 52 | #define MCTRL_SIG(sig, line) ((line) << (sig)) | ||
| 53 | |||
| 54 | /* | ||
| 55 | * Example board initialization data: | ||
| 56 | * | ||
| 57 | * static struct resource sc2892_resources[] = { | ||
| 58 | * DEFINE_RES_MEM(UART_PHYS_START, 0x10), | ||
| 59 | * DEFINE_RES_IRQ(IRQ_EXT2), | ||
| 60 | * }; | ||
| 61 | * | ||
| 62 | * static struct sccnxp_pdata sc2892_info = { | ||
| 63 | * .frequency = 3686400, | ||
| 64 | * .mctrl_cfg[0] = MCTRL_SIG(DIR_OP, LINE_OP0), | ||
| 65 | * .mctrl_cfg[1] = MCTRL_SIG(DIR_OP, LINE_OP1), | ||
| 66 | * }; | ||
| 67 | * | ||
| 68 | * static struct platform_device sc2892 = { | ||
| 69 | * .name = "sc2892", | ||
| 70 | * .id = -1, | ||
| 71 | * .resource = sc2892_resources, | ||
| 72 | * .num_resources = ARRAY_SIZE(sc2892_resources), | ||
| 73 | * .dev = { | ||
| 74 | * .platform_data = &sc2892_info, | ||
| 75 | * }, | ||
| 76 | * }; | ||
| 77 | */ | ||
| 78 | |||
| 79 | /* SCCNXP platform data structure */ | ||
| 80 | struct sccnxp_pdata { | ||
| 81 | /* Frequency (extrenal clock or crystal) */ | ||
| 82 | int frequency; | ||
| 83 | /* Shift for A0 line */ | ||
| 84 | const u8 reg_shift; | ||
| 85 | /* Modem control lines configuration */ | ||
| 86 | const u32 mctrl_cfg[SCCNXP_MAX_UARTS]; | ||
| 87 | /* Called during startup */ | ||
| 88 | void (*init)(void); | ||
| 89 | /* Called before finish */ | ||
| 90 | void (*exit)(void); | ||
| 91 | }; | ||
| 92 | |||
| 93 | #endif | ||
diff --git a/include/linux/platform_data/serial-imx.h b/include/linux/platform_data/serial-imx.h new file mode 100644 index 000000000000..4adec9b154dd --- /dev/null +++ b/include/linux/platform_data/serial-imx.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU General Public License | ||
| 6 | * as published by the Free Software Foundation; either version 2 | ||
| 7 | * of the License, or (at your option) any later version. | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program; if not, write to the Free Software | ||
| 15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
| 16 | * MA 02110-1301, USA. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef ASMARM_ARCH_UART_H | ||
| 20 | #define ASMARM_ARCH_UART_H | ||
| 21 | |||
| 22 | #define IMXUART_HAVE_RTSCTS (1<<0) | ||
| 23 | #define IMXUART_IRDA (1<<1) | ||
| 24 | |||
| 25 | struct imxuart_platform_data { | ||
| 26 | int (*init)(struct platform_device *pdev); | ||
| 27 | void (*exit)(struct platform_device *pdev); | ||
| 28 | unsigned int flags; | ||
| 29 | void (*irda_enable)(int enable); | ||
| 30 | unsigned int irda_inv_rx:1; | ||
| 31 | unsigned int irda_inv_tx:1; | ||
| 32 | unsigned short transceiver_delay; | ||
| 33 | }; | ||
| 34 | |||
| 35 | #endif | ||
diff --git a/include/linux/platform_data/spi-davinci.h b/include/linux/platform_data/spi-davinci.h new file mode 100644 index 000000000000..7af305b37868 --- /dev/null +++ b/include/linux/platform_data/spi-davinci.h | |||
| @@ -0,0 +1,89 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2009 Texas Instruments. | ||
| 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., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef __ARCH_ARM_DAVINCI_SPI_H | ||
| 20 | #define __ARCH_ARM_DAVINCI_SPI_H | ||
| 21 | |||
| 22 | #include <mach/edma.h> | ||
| 23 | |||
| 24 | #define SPI_INTERN_CS 0xFF | ||
| 25 | |||
| 26 | enum { | ||
| 27 | SPI_VERSION_1, /* For DM355/DM365/DM6467 */ | ||
| 28 | SPI_VERSION_2, /* For DA8xx */ | ||
| 29 | }; | ||
| 30 | |||
| 31 | /** | ||
| 32 | * davinci_spi_platform_data - Platform data for SPI master device on DaVinci | ||
| 33 | * | ||
| 34 | * @version: version of the SPI IP. Different DaVinci devices have slightly | ||
| 35 | * varying versions of the same IP. | ||
| 36 | * @num_chipselect: number of chipselects supported by this SPI master | ||
| 37 | * @intr_line: interrupt line used to connect the SPI IP to the ARM interrupt | ||
| 38 | * controller withn the SoC. Possible values are 0 and 1. | ||
| 39 | * @chip_sel: list of GPIOs which can act as chip-selects for the SPI. | ||
| 40 | * SPI_INTERN_CS denotes internal SPI chip-select. Not necessary | ||
| 41 | * to populate if all chip-selects are internal. | ||
| 42 | * @cshold_bug: set this to true if the SPI controller on your chip requires | ||
| 43 | * a write to CSHOLD bit in between transfers (like in DM355). | ||
| 44 | * @dma_event_q: DMA event queue to use if SPI_IO_TYPE_DMA is used for any | ||
| 45 | * device on the bus. | ||
| 46 | */ | ||
| 47 | struct davinci_spi_platform_data { | ||
| 48 | u8 version; | ||
| 49 | u8 num_chipselect; | ||
| 50 | u8 intr_line; | ||
| 51 | u8 *chip_sel; | ||
| 52 | bool cshold_bug; | ||
| 53 | enum dma_event_q dma_event_q; | ||
| 54 | }; | ||
| 55 | |||
| 56 | /** | ||
| 57 | * davinci_spi_config - Per-chip-select configuration for SPI slave devices | ||
| 58 | * | ||
| 59 | * @wdelay: amount of delay between transmissions. Measured in number of | ||
| 60 | * SPI module clocks. | ||
| 61 | * @odd_parity: polarity of parity flag at the end of transmit data stream. | ||
| 62 | * 0 - odd parity, 1 - even parity. | ||
| 63 | * @parity_enable: enable transmission of parity at end of each transmit | ||
| 64 | * data stream. | ||
| 65 | * @io_type: type of IO transfer. Choose between polled, interrupt and DMA. | ||
| 66 | * @timer_disable: disable chip-select timers (setup and hold) | ||
| 67 | * @c2tdelay: chip-select setup time. Measured in number of SPI module clocks. | ||
| 68 | * @t2cdelay: chip-select hold time. Measured in number of SPI module clocks. | ||
| 69 | * @t2edelay: transmit data finished to SPI ENAn pin inactive time. Measured | ||
| 70 | * in number of SPI clocks. | ||
| 71 | * @c2edelay: chip-select active to SPI ENAn signal active time. Measured in | ||
| 72 | * number of SPI clocks. | ||
| 73 | */ | ||
| 74 | struct davinci_spi_config { | ||
| 75 | u8 wdelay; | ||
| 76 | u8 odd_parity; | ||
| 77 | u8 parity_enable; | ||
| 78 | #define SPI_IO_TYPE_INTR 0 | ||
| 79 | #define SPI_IO_TYPE_POLL 1 | ||
| 80 | #define SPI_IO_TYPE_DMA 2 | ||
| 81 | u8 io_type; | ||
| 82 | u8 timer_disable; | ||
| 83 | u8 c2tdelay; | ||
| 84 | u8 t2cdelay; | ||
| 85 | u8 t2edelay; | ||
| 86 | u8 c2edelay; | ||
| 87 | }; | ||
| 88 | |||
| 89 | #endif /* __ARCH_ARM_DAVINCI_SPI_H */ | ||
diff --git a/include/linux/platform_data/spi-ep93xx.h b/include/linux/platform_data/spi-ep93xx.h new file mode 100644 index 000000000000..9bb63ac13f04 --- /dev/null +++ b/include/linux/platform_data/spi-ep93xx.h | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | #ifndef __ASM_MACH_EP93XX_SPI_H | ||
| 2 | #define __ASM_MACH_EP93XX_SPI_H | ||
| 3 | |||
| 4 | struct spi_device; | ||
| 5 | |||
| 6 | /** | ||
| 7 | * struct ep93xx_spi_info - EP93xx specific SPI descriptor | ||
| 8 | * @num_chipselect: number of chip selects on this board, must be | ||
| 9 | * at least one | ||
| 10 | * @use_dma: use DMA for the transfers | ||
| 11 | */ | ||
| 12 | struct ep93xx_spi_info { | ||
| 13 | int num_chipselect; | ||
| 14 | bool use_dma; | ||
| 15 | }; | ||
| 16 | |||
| 17 | /** | ||
| 18 | * struct ep93xx_spi_chip_ops - operation callbacks for SPI slave device | ||
| 19 | * @setup: setup the chip select mechanism | ||
| 20 | * @cleanup: cleanup the chip select mechanism | ||
| 21 | * @cs_control: control the device chip select | ||
| 22 | */ | ||
| 23 | struct ep93xx_spi_chip_ops { | ||
| 24 | int (*setup)(struct spi_device *spi); | ||
| 25 | void (*cleanup)(struct spi_device *spi); | ||
| 26 | void (*cs_control)(struct spi_device *spi, int value); | ||
| 27 | }; | ||
| 28 | |||
| 29 | #endif /* __ASM_MACH_EP93XX_SPI_H */ | ||
diff --git a/include/linux/platform_data/spi-imx.h b/include/linux/platform_data/spi-imx.h new file mode 100644 index 000000000000..08be445e8eb8 --- /dev/null +++ b/include/linux/platform_data/spi-imx.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | |||
| 2 | #ifndef __MACH_SPI_H_ | ||
| 3 | #define __MACH_SPI_H_ | ||
| 4 | |||
| 5 | /* | ||
| 6 | * struct spi_imx_master - device.platform_data for SPI controller devices. | ||
| 7 | * @chipselect: Array of chipselects for this master. Numbers >= 0 mean gpio | ||
| 8 | * pins, numbers < 0 mean internal CSPI chipselects according | ||
| 9 | * to MXC_SPI_CS(). Normally you want to use gpio based chip | ||
| 10 | * selects as the CSPI module tries to be intelligent about | ||
| 11 | * when to assert the chipselect: The CSPI module deasserts the | ||
| 12 | * chipselect once it runs out of input data. The other problem | ||
| 13 | * is that it is not possible to mix between high active and low | ||
| 14 | * active chipselects on one single bus using the internal | ||
| 15 | * chipselects. Unfortunately Freescale decided to put some | ||
| 16 | * chipselects on dedicated pins which are not usable as gpios, | ||
| 17 | * so we have to support the internal chipselects. | ||
| 18 | * @num_chipselect: ARRAY_SIZE(chipselect) | ||
| 19 | */ | ||
| 20 | struct spi_imx_master { | ||
| 21 | int *chipselect; | ||
| 22 | int num_chipselect; | ||
| 23 | }; | ||
| 24 | |||
| 25 | #define MXC_SPI_CS(no) ((no) - 32) | ||
| 26 | |||
| 27 | #endif /* __MACH_SPI_H_*/ | ||
diff --git a/include/linux/platform_data/spi-nuc900.h b/include/linux/platform_data/spi-nuc900.h new file mode 100644 index 000000000000..2c4e0c128501 --- /dev/null +++ b/include/linux/platform_data/spi-nuc900.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-w90x900/include/mach/nuc900_spi.h | ||
| 3 | * | ||
| 4 | * Copyright (c) 2009 Nuvoton technology corporation. | ||
| 5 | * | ||
| 6 | * Wan ZongShun <mcuos.com@gmail.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License as published by | ||
| 10 | * the Free Software Foundation;version 2 of the License. | ||
| 11 | * | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef __ASM_ARCH_SPI_H | ||
| 15 | #define __ASM_ARCH_SPI_H | ||
| 16 | |||
| 17 | extern void mfp_set_groupg(struct device *dev, const char *subname); | ||
| 18 | |||
| 19 | struct nuc900_spi_info { | ||
| 20 | unsigned int num_cs; | ||
| 21 | unsigned int lsb; | ||
| 22 | unsigned int txneg; | ||
| 23 | unsigned int rxneg; | ||
| 24 | unsigned int divider; | ||
| 25 | unsigned int sleep; | ||
| 26 | unsigned int txnum; | ||
| 27 | unsigned int txbitlen; | ||
| 28 | int bus_num; | ||
| 29 | }; | ||
| 30 | |||
| 31 | struct nuc900_spi_chip { | ||
| 32 | unsigned char bits_per_word; | ||
| 33 | }; | ||
| 34 | |||
| 35 | #endif /* __ASM_ARCH_SPI_H */ | ||
diff --git a/include/linux/platform_data/spi-omap2-mcspi.h b/include/linux/platform_data/spi-omap2-mcspi.h new file mode 100644 index 000000000000..a357eb26bd25 --- /dev/null +++ b/include/linux/platform_data/spi-omap2-mcspi.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | #ifndef _OMAP2_MCSPI_H | ||
| 2 | #define _OMAP2_MCSPI_H | ||
| 3 | |||
| 4 | #define OMAP2_MCSPI_REV 0 | ||
| 5 | #define OMAP3_MCSPI_REV 1 | ||
| 6 | #define OMAP4_MCSPI_REV 2 | ||
| 7 | |||
| 8 | #define OMAP4_MCSPI_REG_OFFSET 0x100 | ||
| 9 | |||
| 10 | struct omap2_mcspi_platform_config { | ||
| 11 | unsigned short num_cs; | ||
| 12 | unsigned int regs_offset; | ||
| 13 | }; | ||
| 14 | |||
| 15 | struct omap2_mcspi_dev_attr { | ||
| 16 | unsigned short num_chipselect; | ||
| 17 | }; | ||
| 18 | |||
| 19 | struct omap2_mcspi_device_config { | ||
| 20 | unsigned turbo_mode:1; | ||
| 21 | }; | ||
| 22 | |||
| 23 | #endif | ||
diff --git a/include/linux/platform_data/spi-s3c64xx.h b/include/linux/platform_data/spi-s3c64xx.h new file mode 100644 index 000000000000..ceba18d23a5a --- /dev/null +++ b/include/linux/platform_data/spi-s3c64xx.h | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h | ||
| 2 | * | ||
| 3 | * Copyright (C) 2009 Samsung Electronics Ltd. | ||
| 4 | * Jaswinder Singh <jassi.brar@samsung.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __S3C64XX_PLAT_SPI_H | ||
| 12 | #define __S3C64XX_PLAT_SPI_H | ||
| 13 | |||
| 14 | struct platform_device; | ||
| 15 | |||
| 16 | /** | ||
| 17 | * struct s3c64xx_spi_csinfo - ChipSelect description | ||
| 18 | * @fb_delay: Slave specific feedback delay. | ||
| 19 | * Refer to FB_CLK_SEL register definition in SPI chapter. | ||
| 20 | * @line: Custom 'identity' of the CS line. | ||
| 21 | * | ||
| 22 | * This is per SPI-Slave Chipselect information. | ||
| 23 | * Allocate and initialize one in machine init code and make the | ||
| 24 | * spi_board_info.controller_data point to it. | ||
| 25 | */ | ||
| 26 | struct s3c64xx_spi_csinfo { | ||
| 27 | u8 fb_delay; | ||
| 28 | unsigned line; | ||
| 29 | }; | ||
| 30 | |||
| 31 | /** | ||
| 32 | * struct s3c64xx_spi_info - SPI Controller defining structure | ||
| 33 | * @src_clk_nr: Clock source index for the CLK_CFG[SPI_CLKSEL] field. | ||
| 34 | * @num_cs: Number of CS this controller emulates. | ||
| 35 | * @cfg_gpio: Configure pins for this SPI controller. | ||
| 36 | */ | ||
| 37 | struct s3c64xx_spi_info { | ||
| 38 | int src_clk_nr; | ||
| 39 | int num_cs; | ||
| 40 | int (*cfg_gpio)(void); | ||
| 41 | }; | ||
| 42 | |||
| 43 | /** | ||
| 44 | * s3c64xx_spi_set_platdata - SPI Controller configure callback by the board | ||
| 45 | * initialization code. | ||
| 46 | * @cfg_gpio: Pointer to gpio setup function. | ||
| 47 | * @src_clk_nr: Clock the SPI controller is to use to generate SPI clocks. | ||
| 48 | * @num_cs: Number of elements in the 'cs' array. | ||
| 49 | * | ||
| 50 | * Call this from machine init code for each SPI Controller that | ||
| 51 | * has some chips attached to it. | ||
| 52 | */ | ||
| 53 | extern void s3c64xx_spi0_set_platdata(int (*cfg_gpio)(void), int src_clk_nr, | ||
| 54 | int num_cs); | ||
| 55 | extern void s3c64xx_spi1_set_platdata(int (*cfg_gpio)(void), int src_clk_nr, | ||
| 56 | int num_cs); | ||
| 57 | extern void s3c64xx_spi2_set_platdata(int (*cfg_gpio)(void), int src_clk_nr, | ||
| 58 | int num_cs); | ||
| 59 | |||
| 60 | /* defined by architecture to configure gpio */ | ||
| 61 | extern int s3c64xx_spi0_cfg_gpio(void); | ||
| 62 | extern int s3c64xx_spi1_cfg_gpio(void); | ||
| 63 | extern int s3c64xx_spi2_cfg_gpio(void); | ||
| 64 | |||
| 65 | extern struct s3c64xx_spi_info s3c64xx_spi0_pdata; | ||
| 66 | extern struct s3c64xx_spi_info s3c64xx_spi1_pdata; | ||
| 67 | extern struct s3c64xx_spi_info s3c64xx_spi2_pdata; | ||
| 68 | #endif /* __S3C64XX_PLAT_SPI_H */ | ||
diff --git a/include/linux/platform_data/touchscreen-s3c2410.h b/include/linux/platform_data/touchscreen-s3c2410.h new file mode 100644 index 000000000000..26fdb22e0fc2 --- /dev/null +++ b/include/linux/platform_data/touchscreen-s3c2410.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | /* arch/arm/plat-samsung/include/plat/ts.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org> | ||
| 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 | |||
| 10 | #ifndef __ASM_ARM_TS_H | ||
| 11 | #define __ASM_ARM_TS_H | ||
| 12 | |||
| 13 | struct s3c2410_ts_mach_info { | ||
| 14 | int delay; | ||
| 15 | int presc; | ||
| 16 | int oversampling_shift; | ||
| 17 | void (*cfg_gpio)(struct platform_device *dev); | ||
| 18 | }; | ||
| 19 | |||
| 20 | extern void s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *); | ||
| 21 | |||
| 22 | /* defined by architecture to configure gpio */ | ||
| 23 | extern void s3c24xx_ts_cfg_gpio(struct platform_device *dev); | ||
| 24 | |||
| 25 | #endif /* __ASM_ARM_TS_H */ | ||
diff --git a/include/linux/platform_data/usb-davinci.h b/include/linux/platform_data/usb-davinci.h new file mode 100644 index 000000000000..e0bc4abe69c2 --- /dev/null +++ b/include/linux/platform_data/usb-davinci.h | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | /* | ||
| 2 | * USB related definitions | ||
| 3 | * | ||
| 4 | * Copyright (C) 2009 MontaVista Software, Inc. <source@mvista.com> | ||
| 5 | * | ||
| 6 | * This file is licensed under the terms of the GNU General Public License | ||
| 7 | * version 2. This program is licensed "as is" without any warranty of any | ||
| 8 | * kind, whether express or implied. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __ASM_ARCH_USB_H | ||
| 12 | #define __ASM_ARCH_USB_H | ||
| 13 | |||
| 14 | /* DA8xx CFGCHIP2 (USB 2.0 PHY Control) register bits */ | ||
| 15 | #define CFGCHIP2_PHYCLKGD (1 << 17) | ||
| 16 | #define CFGCHIP2_VBUSSENSE (1 << 16) | ||
| 17 | #define CFGCHIP2_RESET (1 << 15) | ||
| 18 | #define CFGCHIP2_OTGMODE (3 << 13) | ||
| 19 | #define CFGCHIP2_NO_OVERRIDE (0 << 13) | ||
| 20 | #define CFGCHIP2_FORCE_HOST (1 << 13) | ||
| 21 | #define CFGCHIP2_FORCE_DEVICE (2 << 13) | ||
| 22 | #define CFGCHIP2_FORCE_HOST_VBUS_LOW (3 << 13) | ||
| 23 | #define CFGCHIP2_USB1PHYCLKMUX (1 << 12) | ||
| 24 | #define CFGCHIP2_USB2PHYCLKMUX (1 << 11) | ||
| 25 | #define CFGCHIP2_PHYPWRDN (1 << 10) | ||
| 26 | #define CFGCHIP2_OTGPWRDN (1 << 9) | ||
| 27 | #define CFGCHIP2_DATPOL (1 << 8) | ||
| 28 | #define CFGCHIP2_USB1SUSPENDM (1 << 7) | ||
| 29 | #define CFGCHIP2_PHY_PLLON (1 << 6) /* override PLL suspend */ | ||
| 30 | #define CFGCHIP2_SESENDEN (1 << 5) /* Vsess_end comparator */ | ||
| 31 | #define CFGCHIP2_VBDTCTEN (1 << 4) /* Vbus comparator */ | ||
| 32 | #define CFGCHIP2_REFFREQ (0xf << 0) | ||
| 33 | #define CFGCHIP2_REFFREQ_12MHZ (1 << 0) | ||
| 34 | #define CFGCHIP2_REFFREQ_24MHZ (2 << 0) | ||
| 35 | #define CFGCHIP2_REFFREQ_48MHZ (3 << 0) | ||
| 36 | |||
| 37 | struct da8xx_ohci_root_hub; | ||
| 38 | |||
| 39 | typedef void (*da8xx_ocic_handler_t)(struct da8xx_ohci_root_hub *hub, | ||
| 40 | unsigned port); | ||
| 41 | |||
| 42 | /* Passed as the platform data to the OHCI driver */ | ||
| 43 | struct da8xx_ohci_root_hub { | ||
| 44 | /* Switch the port power on/off */ | ||
| 45 | int (*set_power)(unsigned port, int on); | ||
| 46 | /* Read the port power status */ | ||
| 47 | int (*get_power)(unsigned port); | ||
| 48 | /* Read the port over-current indicator */ | ||
| 49 | int (*get_oci)(unsigned port); | ||
| 50 | /* Over-current indicator change notification (pass NULL to disable) */ | ||
| 51 | int (*ocic_notify)(da8xx_ocic_handler_t handler); | ||
| 52 | |||
| 53 | /* Time from power on to power good (in 2 ms units) */ | ||
| 54 | u8 potpgt; | ||
| 55 | }; | ||
| 56 | |||
| 57 | void davinci_setup_usb(unsigned mA, unsigned potpgt_ms); | ||
| 58 | |||
| 59 | #endif /* ifndef __ASM_ARCH_USB_H */ | ||
diff --git a/include/linux/platform_data/usb-ehci-mxc.h b/include/linux/platform_data/usb-ehci-mxc.h new file mode 100644 index 000000000000..7eb9d1329671 --- /dev/null +++ b/include/linux/platform_data/usb-ehci-mxc.h | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | #ifndef __INCLUDE_ASM_ARCH_MXC_EHCI_H | ||
| 2 | #define __INCLUDE_ASM_ARCH_MXC_EHCI_H | ||
| 3 | |||
| 4 | /* values for portsc field */ | ||
| 5 | #define MXC_EHCI_PHY_LOW_POWER_SUSPEND (1 << 23) | ||
| 6 | #define MXC_EHCI_FORCE_FS (1 << 24) | ||
| 7 | #define MXC_EHCI_UTMI_8BIT (0 << 28) | ||
| 8 | #define MXC_EHCI_UTMI_16BIT (1 << 28) | ||
| 9 | #define MXC_EHCI_SERIAL (1 << 29) | ||
| 10 | #define MXC_EHCI_MODE_UTMI (0 << 30) | ||
| 11 | #define MXC_EHCI_MODE_PHILIPS (1 << 30) | ||
| 12 | #define MXC_EHCI_MODE_ULPI (2 << 30) | ||
| 13 | #define MXC_EHCI_MODE_SERIAL (3 << 30) | ||
| 14 | |||
| 15 | /* values for flags field */ | ||
| 16 | #define MXC_EHCI_INTERFACE_DIFF_UNI (0 << 0) | ||
| 17 | #define MXC_EHCI_INTERFACE_DIFF_BI (1 << 0) | ||
| 18 | #define MXC_EHCI_INTERFACE_SINGLE_UNI (2 << 0) | ||
| 19 | #define MXC_EHCI_INTERFACE_SINGLE_BI (3 << 0) | ||
| 20 | #define MXC_EHCI_INTERFACE_MASK (0xf) | ||
| 21 | |||
| 22 | #define MXC_EHCI_POWER_PINS_ENABLED (1 << 5) | ||
| 23 | #define MXC_EHCI_PWR_PIN_ACTIVE_HIGH (1 << 6) | ||
| 24 | #define MXC_EHCI_OC_PIN_ACTIVE_LOW (1 << 7) | ||
| 25 | #define MXC_EHCI_TTL_ENABLED (1 << 8) | ||
| 26 | |||
| 27 | #define MXC_EHCI_INTERNAL_PHY (1 << 9) | ||
| 28 | #define MXC_EHCI_IPPUE_DOWN (1 << 10) | ||
| 29 | #define MXC_EHCI_IPPUE_UP (1 << 11) | ||
| 30 | #define MXC_EHCI_WAKEUP_ENABLED (1 << 12) | ||
| 31 | #define MXC_EHCI_ITC_NO_THRESHOLD (1 << 13) | ||
| 32 | |||
| 33 | #define MXC_USBCTRL_OFFSET 0 | ||
| 34 | #define MXC_USB_PHY_CTR_FUNC_OFFSET 0x8 | ||
| 35 | #define MXC_USB_PHY_CTR_FUNC2_OFFSET 0xc | ||
| 36 | #define MXC_USBH2CTRL_OFFSET 0x14 | ||
| 37 | |||
| 38 | #define MX5_USBOTHER_REGS_OFFSET 0x800 | ||
| 39 | |||
| 40 | /* USB_PHY_CTRL_FUNC2*/ | ||
| 41 | #define MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK 0x3 | ||
| 42 | #define MX5_USB_UTMI_PHYCTRL1_PLLDIV_SHIFT 0 | ||
| 43 | |||
| 44 | struct mxc_usbh_platform_data { | ||
| 45 | int (*init)(struct platform_device *pdev); | ||
| 46 | int (*exit)(struct platform_device *pdev); | ||
| 47 | |||
| 48 | unsigned int portsc; | ||
| 49 | struct usb_phy *otg; | ||
| 50 | }; | ||
| 51 | |||
| 52 | int mx51_initialize_usb_hw(int port, unsigned int flags); | ||
| 53 | int mx25_initialize_usb_hw(int port, unsigned int flags); | ||
| 54 | int mx31_initialize_usb_hw(int port, unsigned int flags); | ||
| 55 | int mx35_initialize_usb_hw(int port, unsigned int flags); | ||
| 56 | int mx27_initialize_usb_hw(int port, unsigned int flags); | ||
| 57 | |||
| 58 | #endif /* __INCLUDE_ASM_ARCH_MXC_EHCI_H */ | ||
| 59 | |||
diff --git a/include/linux/platform_data/usb-ehci-orion.h b/include/linux/platform_data/usb-ehci-orion.h new file mode 100644 index 000000000000..6fc78e430420 --- /dev/null +++ b/include/linux/platform_data/usb-ehci-orion.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/plat-orion/include/plat/ehci-orion.h | ||
| 3 | * | ||
| 4 | * This file is licensed under the terms of the GNU General Public | ||
| 5 | * License version 2. This program is licensed "as is" without any | ||
| 6 | * warranty of any kind, whether express or implied. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef __PLAT_EHCI_ORION_H | ||
| 10 | #define __PLAT_EHCI_ORION_H | ||
| 11 | |||
| 12 | #include <linux/mbus.h> | ||
| 13 | |||
| 14 | enum orion_ehci_phy_ver { | ||
| 15 | EHCI_PHY_ORION, | ||
| 16 | EHCI_PHY_DD, | ||
| 17 | EHCI_PHY_KW, | ||
| 18 | EHCI_PHY_NA, | ||
| 19 | }; | ||
| 20 | |||
| 21 | struct orion_ehci_data { | ||
| 22 | enum orion_ehci_phy_ver phy_version; | ||
| 23 | }; | ||
| 24 | |||
| 25 | |||
| 26 | #endif | ||
diff --git a/include/linux/platform_data/usb-ehci-s5p.h b/include/linux/platform_data/usb-ehci-s5p.h new file mode 100644 index 000000000000..5f28cae18582 --- /dev/null +++ b/include/linux/platform_data/usb-ehci-s5p.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011 Samsung Electronics Co.Ltd | ||
| 3 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it | ||
| 6 | * under the terms of the GNU General Public License as published by the | ||
| 7 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 8 | * option) any later version. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __PLAT_SAMSUNG_EHCI_H | ||
| 12 | #define __PLAT_SAMSUNG_EHCI_H __FILE__ | ||
| 13 | |||
| 14 | struct s5p_ehci_platdata { | ||
| 15 | int (*phy_init)(struct platform_device *pdev, int type); | ||
| 16 | int (*phy_exit)(struct platform_device *pdev, int type); | ||
| 17 | }; | ||
| 18 | |||
| 19 | extern void s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd); | ||
| 20 | |||
| 21 | #endif /* __PLAT_SAMSUNG_EHCI_H */ | ||
diff --git a/include/linux/platform_data/usb-exynos.h b/include/linux/platform_data/usb-exynos.h new file mode 100644 index 000000000000..c256c595be5e --- /dev/null +++ b/include/linux/platform_data/usb-exynos.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011 Samsung Electronics Co.Ltd | ||
| 3 | * http://www.samsung.com/ | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it | ||
| 6 | * under the terms of the GNU General Public License as published by the | ||
| 7 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 8 | * option) any later version. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __MACH_EXYNOS_OHCI_H | ||
| 12 | #define __MACH_EXYNOS_OHCI_H | ||
| 13 | |||
| 14 | struct exynos4_ohci_platdata { | ||
| 15 | int (*phy_init)(struct platform_device *pdev, int type); | ||
| 16 | int (*phy_exit)(struct platform_device *pdev, int type); | ||
| 17 | }; | ||
| 18 | |||
| 19 | extern void exynos4_ohci_set_platdata(struct exynos4_ohci_platdata *pd); | ||
| 20 | |||
| 21 | #endif /* __MACH_EXYNOS_OHCI_H */ | ||
diff --git a/include/linux/platform_data/usb-imx_udc.h b/include/linux/platform_data/usb-imx_udc.h new file mode 100644 index 000000000000..be273371f34a --- /dev/null +++ b/include/linux/platform_data/usb-imx_udc.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2008 Darius Augulis <augulis.darius@gmail.com> | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef __ASM_ARCH_MXC_USB | ||
| 16 | #define __ASM_ARCH_MXC_USB | ||
| 17 | |||
| 18 | struct imxusb_platform_data { | ||
| 19 | int (*init)(struct device *); | ||
| 20 | void (*exit)(struct device *); | ||
| 21 | }; | ||
| 22 | |||
| 23 | #endif /* __ASM_ARCH_MXC_USB */ | ||
diff --git a/include/linux/platform_data/usb-musb-ux500.h b/include/linux/platform_data/usb-musb-ux500.h new file mode 100644 index 000000000000..4c1cc50a595a --- /dev/null +++ b/include/linux/platform_data/usb-musb-ux500.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) ST-Ericsson SA 2011 | ||
| 3 | * | ||
| 4 | * Author: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> | ||
| 5 | * License terms: GNU General Public License (GPL) version 2 | ||
| 6 | */ | ||
| 7 | #ifndef __ASM_ARCH_USB_H | ||
| 8 | #define __ASM_ARCH_USB_H | ||
| 9 | |||
| 10 | #include <linux/dmaengine.h> | ||
| 11 | |||
| 12 | #define UX500_MUSB_DMA_NUM_RX_CHANNELS 8 | ||
| 13 | #define UX500_MUSB_DMA_NUM_TX_CHANNELS 8 | ||
| 14 | |||
| 15 | struct ux500_musb_board_data { | ||
| 16 | void **dma_rx_param_array; | ||
| 17 | void **dma_tx_param_array; | ||
| 18 | u32 num_rx_channels; | ||
| 19 | u32 num_tx_channels; | ||
| 20 | bool (*dma_filter)(struct dma_chan *chan, void *filter_param); | ||
| 21 | }; | ||
| 22 | |||
| 23 | void ux500_add_usb(struct device *parent, resource_size_t base, | ||
| 24 | int irq, int *dma_rx_cfg, int *dma_tx_cfg); | ||
| 25 | #endif | ||
diff --git a/include/linux/platform_data/usb-mx2.h b/include/linux/platform_data/usb-mx2.h new file mode 100644 index 000000000000..22d0b596262c --- /dev/null +++ b/include/linux/platform_data/usb-mx2.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2009 Martin Fuzzey <mfuzzey@gmail.com> | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef __ASM_ARCH_MX21_USBH | ||
| 16 | #define __ASM_ARCH_MX21_USBH | ||
| 17 | |||
| 18 | enum mx21_usbh_xcvr { | ||
| 19 | /* Values below as used by hardware (HWMODE register) */ | ||
| 20 | MX21_USBXCVR_TXDIF_RXDIF = 0, | ||
| 21 | MX21_USBXCVR_TXDIF_RXSE = 1, | ||
| 22 | MX21_USBXCVR_TXSE_RXDIF = 2, | ||
| 23 | MX21_USBXCVR_TXSE_RXSE = 3, | ||
| 24 | }; | ||
| 25 | |||
| 26 | struct mx21_usbh_platform_data { | ||
| 27 | enum mx21_usbh_xcvr host_xcvr; /* tranceiver mode host 1,2 ports */ | ||
| 28 | enum mx21_usbh_xcvr otg_xcvr; /* tranceiver mode otg (as host) port */ | ||
| 29 | u16 enable_host1:1, | ||
| 30 | enable_host2:1, | ||
| 31 | enable_otg_host:1, /* enable "OTG" port (as host) */ | ||
| 32 | host1_xcverless:1, /* traceiverless host1 port */ | ||
| 33 | host1_txenoe:1, /* output enable host1 transmit enable */ | ||
| 34 | otg_ext_xcvr:1, /* external tranceiver for OTG port */ | ||
| 35 | unused:10; | ||
| 36 | }; | ||
| 37 | |||
| 38 | #endif /* __ASM_ARCH_MX21_USBH */ | ||
diff --git a/include/linux/platform_data/usb-ohci-pxa27x.h b/include/linux/platform_data/usb-ohci-pxa27x.h new file mode 100644 index 000000000000..95b6e2a6e514 --- /dev/null +++ b/include/linux/platform_data/usb-ohci-pxa27x.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | #ifndef ASMARM_ARCH_OHCI_H | ||
| 2 | #define ASMARM_ARCH_OHCI_H | ||
| 3 | |||
| 4 | struct device; | ||
| 5 | |||
| 6 | struct pxaohci_platform_data { | ||
| 7 | int (*init)(struct device *); | ||
| 8 | void (*exit)(struct device *); | ||
| 9 | |||
| 10 | unsigned long flags; | ||
| 11 | #define ENABLE_PORT1 (1 << 0) | ||
| 12 | #define ENABLE_PORT2 (1 << 1) | ||
| 13 | #define ENABLE_PORT3 (1 << 2) | ||
| 14 | #define ENABLE_PORT_ALL (ENABLE_PORT1 | ENABLE_PORT2 | ENABLE_PORT3) | ||
| 15 | |||
| 16 | #define POWER_SENSE_LOW (1 << 3) | ||
| 17 | #define POWER_CONTROL_LOW (1 << 4) | ||
| 18 | #define NO_OC_PROTECTION (1 << 5) | ||
| 19 | #define OC_MODE_GLOBAL (0 << 6) | ||
| 20 | #define OC_MODE_PERPORT (1 << 6) | ||
| 21 | |||
| 22 | int power_on_delay; /* Power On to Power Good time - in ms | ||
| 23 | * HCD must wait for this duration before | ||
| 24 | * accessing a powered on port | ||
| 25 | */ | ||
| 26 | int port_mode; | ||
| 27 | #define PMM_NPS_MODE 1 | ||
| 28 | #define PMM_GLOBAL_MODE 2 | ||
| 29 | #define PMM_PERPORT_MODE 3 | ||
| 30 | |||
| 31 | int power_budget; | ||
| 32 | }; | ||
| 33 | |||
| 34 | extern void pxa_set_ohci_info(struct pxaohci_platform_data *info); | ||
| 35 | |||
| 36 | #endif | ||
diff --git a/include/linux/platform_data/usb-ohci-s3c2410.h b/include/linux/platform_data/usb-ohci-s3c2410.h new file mode 100644 index 000000000000..7fa1fbefc3f2 --- /dev/null +++ b/include/linux/platform_data/usb-ohci-s3c2410.h | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* arch/arm/plat-samsung/include/plat/usb-control.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2004 Simtec Electronics | ||
| 4 | * Ben Dooks <ben@simtec.co.uk> | ||
| 5 | * | ||
| 6 | * S3C - USB host port information | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 as | ||
| 10 | * published by the Free Software Foundation. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __ASM_ARCH_USBCONTROL_H | ||
| 14 | #define __ASM_ARCH_USBCONTROL_H | ||
| 15 | |||
| 16 | #define S3C_HCDFLG_USED (1) | ||
| 17 | |||
| 18 | struct s3c2410_hcd_port { | ||
| 19 | unsigned char flags; | ||
| 20 | unsigned char power; | ||
| 21 | unsigned char oc_status; | ||
| 22 | unsigned char oc_changed; | ||
| 23 | }; | ||
| 24 | |||
| 25 | struct s3c2410_hcd_info { | ||
| 26 | struct usb_hcd *hcd; | ||
| 27 | struct s3c2410_hcd_port port[2]; | ||
| 28 | |||
| 29 | void (*power_control)(int port, int to); | ||
| 30 | void (*enable_oc)(struct s3c2410_hcd_info *, int on); | ||
| 31 | void (*report_oc)(struct s3c2410_hcd_info *, int ports); | ||
| 32 | }; | ||
| 33 | |||
| 34 | static void inline s3c2410_usb_report_oc(struct s3c2410_hcd_info *info, int ports) | ||
| 35 | { | ||
| 36 | if (info->report_oc != NULL) { | ||
| 37 | (info->report_oc)(info, ports); | ||
| 38 | } | ||
| 39 | } | ||
| 40 | |||
| 41 | extern void s3c_ohci_set_platdata(struct s3c2410_hcd_info *info); | ||
| 42 | |||
| 43 | #endif /*__ASM_ARCH_USBCONTROL_H */ | ||
diff --git a/include/linux/platform_data/usb-pxa3xx-ulpi.h b/include/linux/platform_data/usb-pxa3xx-ulpi.h new file mode 100644 index 000000000000..9d82cb65ea56 --- /dev/null +++ b/include/linux/platform_data/usb-pxa3xx-ulpi.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* | ||
| 2 | * PXA3xx U2D header | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 CompuLab Ltd. | ||
| 5 | * | ||
| 6 | * Igor Grinberg <grinberg@compulab.co.il> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 as | ||
| 10 | * published by the Free Software Foundation. | ||
| 11 | */ | ||
| 12 | #ifndef __PXA310_U2D__ | ||
| 13 | #define __PXA310_U2D__ | ||
| 14 | |||
| 15 | #include <linux/usb/ulpi.h> | ||
| 16 | |||
| 17 | struct pxa3xx_u2d_platform_data { | ||
| 18 | |||
| 19 | #define ULPI_SER_6PIN (1 << 0) | ||
| 20 | #define ULPI_SER_3PIN (1 << 1) | ||
| 21 | unsigned int ulpi_mode; | ||
| 22 | |||
| 23 | int (*init)(struct device *); | ||
| 24 | void (*exit)(struct device *); | ||
| 25 | }; | ||
| 26 | |||
| 27 | |||
| 28 | /* Start PXA3xx U2D host */ | ||
| 29 | int pxa3xx_u2d_start_hc(struct usb_bus *host); | ||
| 30 | /* Stop PXA3xx U2D host */ | ||
| 31 | void pxa3xx_u2d_stop_hc(struct usb_bus *host); | ||
| 32 | |||
| 33 | extern void pxa3xx_set_u2d_info(struct pxa3xx_u2d_platform_data *info); | ||
| 34 | |||
| 35 | #endif /* __PXA310_U2D__ */ | ||
diff --git a/include/linux/platform_data/usb-s3c2410_udc.h b/include/linux/platform_data/usb-s3c2410_udc.h new file mode 100644 index 000000000000..de8e2288a509 --- /dev/null +++ b/include/linux/platform_data/usb-s3c2410_udc.h | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | /* arch/arm/plat-samsung/include/plat/udc.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org> | ||
| 4 | * | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * | ||
| 11 | * Changelog: | ||
| 12 | * 14-Mar-2005 RTP Created file | ||
| 13 | * 02-Aug-2005 RTP File rename | ||
| 14 | * 07-Sep-2005 BJD Minor cleanups, changed cmd to enum | ||
| 15 | * 18-Jan-2007 HMW Add per-platform vbus_draw function | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef __ASM_ARM_ARCH_UDC_H | ||
| 19 | #define __ASM_ARM_ARCH_UDC_H | ||
| 20 | |||
| 21 | enum s3c2410_udc_cmd_e { | ||
| 22 | S3C2410_UDC_P_ENABLE = 1, /* Pull-up enable */ | ||
| 23 | S3C2410_UDC_P_DISABLE = 2, /* Pull-up disable */ | ||
| 24 | S3C2410_UDC_P_RESET = 3, /* UDC reset, in case of */ | ||
| 25 | }; | ||
| 26 | |||
| 27 | struct s3c2410_udc_mach_info { | ||
| 28 | void (*udc_command)(enum s3c2410_udc_cmd_e); | ||
| 29 | void (*vbus_draw)(unsigned int ma); | ||
| 30 | |||
| 31 | unsigned int pullup_pin; | ||
| 32 | unsigned int pullup_pin_inverted; | ||
| 33 | |||
| 34 | unsigned int vbus_pin; | ||
| 35 | unsigned char vbus_pin_inverted; | ||
| 36 | }; | ||
| 37 | |||
| 38 | extern void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *); | ||
| 39 | |||
| 40 | struct s3c24xx_hsudc_platdata; | ||
| 41 | |||
| 42 | extern void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata *pd); | ||
| 43 | |||
| 44 | #endif /* __ASM_ARM_ARCH_UDC_H */ | ||
diff --git a/include/linux/platform_data/video-ep93xx.h b/include/linux/platform_data/video-ep93xx.h new file mode 100644 index 000000000000..d5ae11d7c453 --- /dev/null +++ b/include/linux/platform_data/video-ep93xx.h | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-ep93xx/include/mach/fb.h | ||
| 3 | */ | ||
| 4 | |||
| 5 | #ifndef __ASM_ARCH_EP93XXFB_H | ||
| 6 | #define __ASM_ARCH_EP93XXFB_H | ||
| 7 | |||
| 8 | struct platform_device; | ||
| 9 | struct fb_videomode; | ||
| 10 | struct fb_info; | ||
| 11 | |||
| 12 | #define EP93XXFB_USE_MODEDB 0 | ||
| 13 | |||
| 14 | /* VideoAttributes flags */ | ||
| 15 | #define EP93XXFB_STATE_MACHINE_ENABLE (1 << 0) | ||
| 16 | #define EP93XXFB_PIXEL_CLOCK_ENABLE (1 << 1) | ||
| 17 | #define EP93XXFB_VSYNC_ENABLE (1 << 2) | ||
| 18 | #define EP93XXFB_PIXEL_DATA_ENABLE (1 << 3) | ||
| 19 | #define EP93XXFB_COMPOSITE_SYNC (1 << 4) | ||
| 20 | #define EP93XXFB_SYNC_VERT_HIGH (1 << 5) | ||
| 21 | #define EP93XXFB_SYNC_HORIZ_HIGH (1 << 6) | ||
| 22 | #define EP93XXFB_SYNC_BLANK_HIGH (1 << 7) | ||
| 23 | #define EP93XXFB_PCLK_FALLING (1 << 8) | ||
| 24 | #define EP93XXFB_ENABLE_AC (1 << 9) | ||
| 25 | #define EP93XXFB_ENABLE_LCD (1 << 10) | ||
| 26 | #define EP93XXFB_ENABLE_CCIR (1 << 12) | ||
| 27 | #define EP93XXFB_USE_PARALLEL_INTERFACE (1 << 13) | ||
| 28 | #define EP93XXFB_ENABLE_INTERRUPT (1 << 14) | ||
| 29 | #define EP93XXFB_USB_INTERLACE (1 << 16) | ||
| 30 | #define EP93XXFB_USE_EQUALIZATION (1 << 17) | ||
| 31 | #define EP93XXFB_USE_DOUBLE_HORZ (1 << 18) | ||
| 32 | #define EP93XXFB_USE_DOUBLE_VERT (1 << 19) | ||
| 33 | #define EP93XXFB_USE_BLANK_PIXEL (1 << 20) | ||
| 34 | #define EP93XXFB_USE_SDCSN0 (0 << 21) | ||
| 35 | #define EP93XXFB_USE_SDCSN1 (1 << 21) | ||
| 36 | #define EP93XXFB_USE_SDCSN2 (2 << 21) | ||
| 37 | #define EP93XXFB_USE_SDCSN3 (3 << 21) | ||
| 38 | |||
| 39 | #define EP93XXFB_ENABLE (EP93XXFB_STATE_MACHINE_ENABLE | \ | ||
| 40 | EP93XXFB_PIXEL_CLOCK_ENABLE | \ | ||
| 41 | EP93XXFB_VSYNC_ENABLE | \ | ||
| 42 | EP93XXFB_PIXEL_DATA_ENABLE) | ||
| 43 | |||
| 44 | struct ep93xxfb_mach_info { | ||
| 45 | unsigned int num_modes; | ||
| 46 | const struct fb_videomode *modes; | ||
| 47 | const struct fb_videomode *default_mode; | ||
| 48 | int bpp; | ||
| 49 | unsigned int flags; | ||
| 50 | |||
| 51 | int (*setup)(struct platform_device *pdev); | ||
| 52 | void (*teardown)(struct platform_device *pdev); | ||
| 53 | void (*blank)(int blank_mode, struct fb_info *info); | ||
| 54 | }; | ||
| 55 | |||
| 56 | #endif /* __ASM_ARCH_EP93XXFB_H */ | ||
diff --git a/include/linux/platform_data/video-imxfb.h b/include/linux/platform_data/video-imxfb.h new file mode 100644 index 000000000000..9de8f062ad5d --- /dev/null +++ b/include/linux/platform_data/video-imxfb.h | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | /* | ||
| 2 | * This structure describes the machine which we are running on. | ||
| 3 | */ | ||
| 4 | #ifndef __MACH_IMXFB_H__ | ||
| 5 | #define __MACH_IMXFB_H__ | ||
| 6 | |||
| 7 | #include <linux/fb.h> | ||
| 8 | |||
| 9 | #define PCR_TFT (1 << 31) | ||
| 10 | #define PCR_COLOR (1 << 30) | ||
| 11 | #define PCR_PBSIZ_1 (0 << 28) | ||
| 12 | #define PCR_PBSIZ_2 (1 << 28) | ||
| 13 | #define PCR_PBSIZ_4 (2 << 28) | ||
| 14 | #define PCR_PBSIZ_8 (3 << 28) | ||
| 15 | #define PCR_BPIX_1 (0 << 25) | ||
| 16 | #define PCR_BPIX_2 (1 << 25) | ||
| 17 | #define PCR_BPIX_4 (2 << 25) | ||
| 18 | #define PCR_BPIX_8 (3 << 25) | ||
| 19 | #define PCR_BPIX_12 (4 << 25) | ||
| 20 | #define PCR_BPIX_16 (5 << 25) | ||
| 21 | #define PCR_BPIX_18 (6 << 25) | ||
| 22 | #define PCR_PIXPOL (1 << 24) | ||
| 23 | #define PCR_FLMPOL (1 << 23) | ||
| 24 | #define PCR_LPPOL (1 << 22) | ||
| 25 | #define PCR_CLKPOL (1 << 21) | ||
| 26 | #define PCR_OEPOL (1 << 20) | ||
| 27 | #define PCR_SCLKIDLE (1 << 19) | ||
| 28 | #define PCR_END_SEL (1 << 18) | ||
| 29 | #define PCR_END_BYTE_SWAP (1 << 17) | ||
| 30 | #define PCR_REV_VS (1 << 16) | ||
| 31 | #define PCR_ACD_SEL (1 << 15) | ||
| 32 | #define PCR_ACD(x) (((x) & 0x7f) << 8) | ||
| 33 | #define PCR_SCLK_SEL (1 << 7) | ||
| 34 | #define PCR_SHARP (1 << 6) | ||
| 35 | #define PCR_PCD(x) ((x) & 0x3f) | ||
| 36 | |||
| 37 | #define PWMR_CLS(x) (((x) & 0x1ff) << 16) | ||
| 38 | #define PWMR_LDMSK (1 << 15) | ||
| 39 | #define PWMR_SCR1 (1 << 10) | ||
| 40 | #define PWMR_SCR0 (1 << 9) | ||
| 41 | #define PWMR_CC_EN (1 << 8) | ||
| 42 | #define PWMR_PW(x) ((x) & 0xff) | ||
| 43 | |||
| 44 | #define LSCR1_PS_RISE_DELAY(x) (((x) & 0x7f) << 26) | ||
| 45 | #define LSCR1_CLS_RISE_DELAY(x) (((x) & 0x3f) << 16) | ||
| 46 | #define LSCR1_REV_TOGGLE_DELAY(x) (((x) & 0xf) << 8) | ||
| 47 | #define LSCR1_GRAY2(x) (((x) & 0xf) << 4) | ||
| 48 | #define LSCR1_GRAY1(x) (((x) & 0xf)) | ||
| 49 | |||
| 50 | #define DMACR_BURST (1 << 31) | ||
| 51 | #define DMACR_HM(x) (((x) & 0xf) << 16) | ||
| 52 | #define DMACR_TM(x) ((x) & 0xf) | ||
| 53 | |||
| 54 | struct imx_fb_videomode { | ||
| 55 | struct fb_videomode mode; | ||
| 56 | u32 pcr; | ||
| 57 | unsigned char bpp; | ||
| 58 | }; | ||
| 59 | |||
| 60 | struct imx_fb_platform_data { | ||
| 61 | struct imx_fb_videomode *mode; | ||
| 62 | int num_modes; | ||
| 63 | |||
| 64 | u_int cmap_greyscale:1, | ||
| 65 | cmap_inverse:1, | ||
| 66 | cmap_static:1, | ||
| 67 | unused:29; | ||
| 68 | |||
| 69 | u_int pwmr; | ||
| 70 | u_int lscr1; | ||
| 71 | u_int dmacr; | ||
| 72 | |||
| 73 | u_char * fixed_screen_cpu; | ||
| 74 | dma_addr_t fixed_screen_dma; | ||
| 75 | |||
| 76 | int (*init)(struct platform_device *); | ||
| 77 | void (*exit)(struct platform_device *); | ||
| 78 | |||
| 79 | void (*lcd_power)(int); | ||
| 80 | void (*backlight_power)(int); | ||
| 81 | }; | ||
| 82 | |||
| 83 | void set_imx_fb_info(struct imx_fb_platform_data *); | ||
| 84 | #endif /* ifndef __MACH_IMXFB_H__ */ | ||
diff --git a/include/linux/platform_data/video-msm_fb.h b/include/linux/platform_data/video-msm_fb.h new file mode 100644 index 000000000000..1f4fc81b3d8f --- /dev/null +++ b/include/linux/platform_data/video-msm_fb.h | |||
| @@ -0,0 +1,147 @@ | |||
| 1 | /* arch/arm/mach-msm/include/mach/msm_fb.h | ||
| 2 | * | ||
| 3 | * Internal shared definitions for various MSM framebuffer parts. | ||
| 4 | * | ||
| 5 | * Copyright (C) 2007 Google Incorporated | ||
| 6 | * | ||
| 7 | * This software is licensed under the terms of the GNU General Public | ||
| 8 | * License version 2, as published by the Free Software Foundation, and | ||
| 9 | * may be copied, distributed, and modified under those terms. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef _MSM_FB_H_ | ||
| 18 | #define _MSM_FB_H_ | ||
| 19 | |||
| 20 | #include <linux/device.h> | ||
| 21 | |||
| 22 | struct mddi_info; | ||
| 23 | |||
| 24 | struct msm_fb_data { | ||
| 25 | int xres; /* x resolution in pixels */ | ||
| 26 | int yres; /* y resolution in pixels */ | ||
| 27 | int width; /* disply width in mm */ | ||
| 28 | int height; /* display height in mm */ | ||
| 29 | unsigned output_format; | ||
| 30 | }; | ||
| 31 | |||
| 32 | struct msmfb_callback { | ||
| 33 | void (*func)(struct msmfb_callback *); | ||
| 34 | }; | ||
| 35 | |||
| 36 | enum { | ||
| 37 | MSM_MDDI_PMDH_INTERFACE, | ||
| 38 | MSM_MDDI_EMDH_INTERFACE, | ||
| 39 | MSM_EBI2_INTERFACE, | ||
| 40 | }; | ||
| 41 | |||
| 42 | #define MSMFB_CAP_PARTIAL_UPDATES (1 << 0) | ||
| 43 | |||
| 44 | struct msm_panel_data { | ||
| 45 | /* turns off the fb memory */ | ||
| 46 | int (*suspend)(struct msm_panel_data *); | ||
| 47 | /* turns on the fb memory */ | ||
| 48 | int (*resume)(struct msm_panel_data *); | ||
| 49 | /* turns off the panel */ | ||
| 50 | int (*blank)(struct msm_panel_data *); | ||
| 51 | /* turns on the panel */ | ||
| 52 | int (*unblank)(struct msm_panel_data *); | ||
| 53 | void (*wait_vsync)(struct msm_panel_data *); | ||
| 54 | void (*request_vsync)(struct msm_panel_data *, struct msmfb_callback *); | ||
| 55 | void (*clear_vsync)(struct msm_panel_data *); | ||
| 56 | /* from the enum above */ | ||
| 57 | unsigned interface_type; | ||
| 58 | /* data to be passed to the fb driver */ | ||
| 59 | struct msm_fb_data *fb_data; | ||
| 60 | |||
| 61 | /* capabilities supported by the panel */ | ||
| 62 | uint32_t caps; | ||
| 63 | }; | ||
| 64 | |||
| 65 | struct msm_mddi_client_data { | ||
| 66 | void (*suspend)(struct msm_mddi_client_data *); | ||
| 67 | void (*resume)(struct msm_mddi_client_data *); | ||
| 68 | void (*activate_link)(struct msm_mddi_client_data *); | ||
| 69 | void (*remote_write)(struct msm_mddi_client_data *, uint32_t val, | ||
| 70 | uint32_t reg); | ||
| 71 | uint32_t (*remote_read)(struct msm_mddi_client_data *, uint32_t reg); | ||
| 72 | void (*auto_hibernate)(struct msm_mddi_client_data *, int); | ||
| 73 | /* custom data that needs to be passed from the board file to a | ||
| 74 | * particular client */ | ||
| 75 | void *private_client_data; | ||
| 76 | struct resource *fb_resource; | ||
| 77 | /* from the list above */ | ||
| 78 | unsigned interface_type; | ||
| 79 | }; | ||
| 80 | |||
| 81 | struct msm_mddi_platform_data { | ||
| 82 | unsigned int clk_rate; | ||
| 83 | void (*power_client)(struct msm_mddi_client_data *, int on); | ||
| 84 | |||
| 85 | /* fixup the mfr name, product id */ | ||
| 86 | void (*fixup)(uint16_t *mfr_name, uint16_t *product_id); | ||
| 87 | |||
| 88 | struct resource *fb_resource; /*optional*/ | ||
| 89 | /* number of clients in the list that follows */ | ||
| 90 | int num_clients; | ||
| 91 | /* array of client information of clients */ | ||
| 92 | struct { | ||
| 93 | unsigned product_id; /* mfr id in top 16 bits, product id | ||
| 94 | * in lower 16 bits | ||
| 95 | */ | ||
| 96 | char *name; /* the device name will be the platform | ||
| 97 | * device name registered for the client, | ||
| 98 | * it should match the name of the associated | ||
| 99 | * driver | ||
| 100 | */ | ||
| 101 | unsigned id; /* id for mddi client device node, will also | ||
| 102 | * be used as device id of panel devices, if | ||
| 103 | * the client device will have multiple panels | ||
| 104 | * space must be left here for them | ||
| 105 | */ | ||
| 106 | void *client_data; /* required private client data */ | ||
| 107 | unsigned int clk_rate; /* optional: if the client requires a | ||
| 108 | * different mddi clk rate | ||
| 109 | */ | ||
| 110 | } client_platform_data[]; | ||
| 111 | }; | ||
| 112 | |||
| 113 | struct mdp_blit_req; | ||
| 114 | struct fb_info; | ||
| 115 | struct mdp_device { | ||
| 116 | struct device dev; | ||
| 117 | void (*dma)(struct mdp_device *mpd, uint32_t addr, | ||
| 118 | uint32_t stride, uint32_t w, uint32_t h, uint32_t x, | ||
| 119 | uint32_t y, struct msmfb_callback *callback, int interface); | ||
| 120 | void (*dma_wait)(struct mdp_device *mdp); | ||
| 121 | int (*blit)(struct mdp_device *mdp, struct fb_info *fb, | ||
| 122 | struct mdp_blit_req *req); | ||
| 123 | void (*set_grp_disp)(struct mdp_device *mdp, uint32_t disp_id); | ||
| 124 | }; | ||
| 125 | |||
| 126 | struct class_interface; | ||
| 127 | int register_mdp_client(struct class_interface *class_intf); | ||
| 128 | |||
| 129 | /**** private client data structs go below this line ***/ | ||
| 130 | |||
| 131 | struct msm_mddi_bridge_platform_data { | ||
| 132 | /* from board file */ | ||
| 133 | int (*init)(struct msm_mddi_bridge_platform_data *, | ||
| 134 | struct msm_mddi_client_data *); | ||
| 135 | int (*uninit)(struct msm_mddi_bridge_platform_data *, | ||
| 136 | struct msm_mddi_client_data *); | ||
| 137 | /* passed to panel for use by the fb driver */ | ||
| 138 | int (*blank)(struct msm_mddi_bridge_platform_data *, | ||
| 139 | struct msm_mddi_client_data *); | ||
| 140 | int (*unblank)(struct msm_mddi_bridge_platform_data *, | ||
| 141 | struct msm_mddi_client_data *); | ||
| 142 | struct msm_fb_data fb_data; | ||
| 143 | }; | ||
| 144 | |||
| 145 | |||
| 146 | |||
| 147 | #endif | ||
diff --git a/include/linux/platform_data/video-mx3fb.h b/include/linux/platform_data/video-mx3fb.h new file mode 100644 index 000000000000..fdbe60001542 --- /dev/null +++ b/include/linux/platform_data/video-mx3fb.h | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2008 | ||
| 3 | * Guennadi Liakhovetski, DENX Software Engineering, <lg@denx.de> | ||
| 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 | |||
| 10 | #ifndef __ASM_ARCH_MX3FB_H__ | ||
| 11 | #define __ASM_ARCH_MX3FB_H__ | ||
| 12 | |||
| 13 | #include <linux/device.h> | ||
| 14 | #include <linux/fb.h> | ||
| 15 | |||
| 16 | /* Proprietary FB_SYNC_ flags */ | ||
| 17 | #define FB_SYNC_OE_ACT_HIGH 0x80000000 | ||
| 18 | #define FB_SYNC_CLK_INVERT 0x40000000 | ||
| 19 | #define FB_SYNC_DATA_INVERT 0x20000000 | ||
| 20 | #define FB_SYNC_CLK_IDLE_EN 0x10000000 | ||
| 21 | #define FB_SYNC_SHARP_MODE 0x08000000 | ||
| 22 | #define FB_SYNC_SWAP_RGB 0x04000000 | ||
| 23 | #define FB_SYNC_CLK_SEL_EN 0x02000000 | ||
| 24 | |||
| 25 | /* | ||
| 26 | * Specify the way your display is connected. The IPU can arbitrarily | ||
| 27 | * map the internal colors to the external data lines. We only support | ||
| 28 | * the following mappings at the moment. | ||
| 29 | */ | ||
| 30 | enum disp_data_mapping { | ||
| 31 | /* blue -> d[0..5], green -> d[6..11], red -> d[12..17] */ | ||
| 32 | IPU_DISP_DATA_MAPPING_RGB666, | ||
| 33 | /* blue -> d[0..4], green -> d[5..10], red -> d[11..15] */ | ||
| 34 | IPU_DISP_DATA_MAPPING_RGB565, | ||
| 35 | /* blue -> d[0..7], green -> d[8..15], red -> d[16..23] */ | ||
| 36 | IPU_DISP_DATA_MAPPING_RGB888, | ||
| 37 | }; | ||
| 38 | |||
| 39 | /** | ||
| 40 | * struct mx3fb_platform_data - mx3fb platform data | ||
| 41 | * | ||
| 42 | * @dma_dev: pointer to the dma-device, used for dma-slave connection | ||
| 43 | * @mode: pointer to a platform-provided per mxc_register_fb() videomode | ||
| 44 | */ | ||
| 45 | struct mx3fb_platform_data { | ||
| 46 | struct device *dma_dev; | ||
| 47 | const char *name; | ||
| 48 | const struct fb_videomode *mode; | ||
| 49 | int num_modes; | ||
| 50 | enum disp_data_mapping disp_data_fmt; | ||
| 51 | }; | ||
| 52 | |||
| 53 | #endif | ||
diff --git a/include/linux/platform_data/video-nuc900fb.h b/include/linux/platform_data/video-nuc900fb.h new file mode 100644 index 000000000000..cec5ece765ed --- /dev/null +++ b/include/linux/platform_data/video-nuc900fb.h | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | /* linux/include/asm/arch-nuc900/fb.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2008 Nuvoton technology corporation | ||
| 4 | * All rights reserved. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * Changelog: | ||
| 12 | * | ||
| 13 | * 2008/08/26 vincen.zswan modify this file for LCD. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #ifndef __ASM_ARM_FB_H | ||
| 17 | #define __ASM_ARM_FB_H | ||
| 18 | |||
| 19 | |||
| 20 | |||
| 21 | /* LCD Controller Hardware Desc */ | ||
| 22 | struct nuc900fb_hw { | ||
| 23 | unsigned int lcd_dccs; | ||
| 24 | unsigned int lcd_device_ctrl; | ||
| 25 | unsigned int lcd_mpulcd_cmd; | ||
| 26 | unsigned int lcd_int_cs; | ||
| 27 | unsigned int lcd_crtc_size; | ||
| 28 | unsigned int lcd_crtc_dend; | ||
| 29 | unsigned int lcd_crtc_hr; | ||
| 30 | unsigned int lcd_crtc_hsync; | ||
| 31 | unsigned int lcd_crtc_vr; | ||
| 32 | unsigned int lcd_va_baddr0; | ||
| 33 | unsigned int lcd_va_baddr1; | ||
| 34 | unsigned int lcd_va_fbctrl; | ||
| 35 | unsigned int lcd_va_scale; | ||
| 36 | unsigned int lcd_va_test; | ||
| 37 | unsigned int lcd_va_win; | ||
| 38 | unsigned int lcd_va_stuff; | ||
| 39 | }; | ||
| 40 | |||
| 41 | /* LCD Display Description */ | ||
| 42 | struct nuc900fb_display { | ||
| 43 | /* LCD Image type */ | ||
| 44 | unsigned type; | ||
| 45 | |||
| 46 | /* LCD Screen Size */ | ||
| 47 | unsigned short width; | ||
| 48 | unsigned short height; | ||
| 49 | |||
| 50 | /* LCD Screen Info */ | ||
| 51 | unsigned short xres; | ||
| 52 | unsigned short yres; | ||
| 53 | unsigned short bpp; | ||
| 54 | |||
| 55 | unsigned long pixclock; | ||
| 56 | unsigned short left_margin; | ||
| 57 | unsigned short right_margin; | ||
| 58 | unsigned short hsync_len; | ||
| 59 | unsigned short upper_margin; | ||
| 60 | unsigned short lower_margin; | ||
| 61 | unsigned short vsync_len; | ||
| 62 | |||
| 63 | /* hardware special register value */ | ||
| 64 | unsigned int dccs; | ||
| 65 | unsigned int devctl; | ||
| 66 | unsigned int fbctrl; | ||
| 67 | unsigned int scale; | ||
| 68 | }; | ||
| 69 | |||
| 70 | struct nuc900fb_mach_info { | ||
| 71 | struct nuc900fb_display *displays; | ||
| 72 | unsigned num_displays; | ||
| 73 | unsigned default_display; | ||
| 74 | /* GPIO Setting Info */ | ||
| 75 | unsigned gpio_dir; | ||
| 76 | unsigned gpio_dir_mask; | ||
| 77 | unsigned gpio_data; | ||
| 78 | unsigned gpio_data_mask; | ||
| 79 | }; | ||
| 80 | |||
| 81 | extern void __init nuc900_fb_set_platdata(struct nuc900fb_mach_info *); | ||
| 82 | |||
| 83 | #endif /* __ASM_ARM_FB_H */ | ||
diff --git a/include/linux/platform_data/video-pxafb.h b/include/linux/platform_data/video-pxafb.h new file mode 100644 index 000000000000..486b4c519ae2 --- /dev/null +++ b/include/linux/platform_data/video-pxafb.h | |||
| @@ -0,0 +1,175 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-pxa/include/mach/pxafb.h | ||
| 3 | * | ||
| 4 | * Support for the xscale frame buffer. | ||
| 5 | * | ||
| 6 | * Author: Jean-Frederic Clere | ||
| 7 | * Created: Sep 22, 2003 | ||
| 8 | * Copyright: jfclere@sinix.net | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License version 2 as | ||
| 12 | * published by the Free Software Foundation. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/fb.h> | ||
| 16 | #include <mach/regs-lcd.h> | ||
| 17 | |||
| 18 | /* | ||
| 19 | * Supported LCD connections | ||
| 20 | * | ||
| 21 | * bits 0 - 3: for LCD panel type: | ||
| 22 | * | ||
| 23 | * STN - for passive matrix | ||
| 24 | * DSTN - for dual scan passive matrix | ||
| 25 | * TFT - for active matrix | ||
| 26 | * | ||
| 27 | * bits 4 - 9 : for bus width | ||
| 28 | * bits 10-17 : for AC Bias Pin Frequency | ||
| 29 | * bit 18 : for output enable polarity | ||
| 30 | * bit 19 : for pixel clock edge | ||
| 31 | * bit 20 : for output pixel format when base is RGBT16 | ||
| 32 | */ | ||
| 33 | #define LCD_CONN_TYPE(_x) ((_x) & 0x0f) | ||
| 34 | #define LCD_CONN_WIDTH(_x) (((_x) >> 4) & 0x1f) | ||
| 35 | |||
| 36 | #define LCD_TYPE_MASK 0xf | ||
| 37 | #define LCD_TYPE_UNKNOWN 0 | ||
| 38 | #define LCD_TYPE_MONO_STN 1 | ||
| 39 | #define LCD_TYPE_MONO_DSTN 2 | ||
| 40 | #define LCD_TYPE_COLOR_STN 3 | ||
| 41 | #define LCD_TYPE_COLOR_DSTN 4 | ||
| 42 | #define LCD_TYPE_COLOR_TFT 5 | ||
| 43 | #define LCD_TYPE_SMART_PANEL 6 | ||
| 44 | #define LCD_TYPE_MAX 7 | ||
| 45 | |||
| 46 | #define LCD_MONO_STN_4BPP ((4 << 4) | LCD_TYPE_MONO_STN) | ||
| 47 | #define LCD_MONO_STN_8BPP ((8 << 4) | LCD_TYPE_MONO_STN) | ||
| 48 | #define LCD_MONO_DSTN_8BPP ((8 << 4) | LCD_TYPE_MONO_DSTN) | ||
| 49 | #define LCD_COLOR_STN_8BPP ((8 << 4) | LCD_TYPE_COLOR_STN) | ||
| 50 | #define LCD_COLOR_DSTN_16BPP ((16 << 4) | LCD_TYPE_COLOR_DSTN) | ||
| 51 | #define LCD_COLOR_TFT_8BPP ((8 << 4) | LCD_TYPE_COLOR_TFT) | ||
| 52 | #define LCD_COLOR_TFT_16BPP ((16 << 4) | LCD_TYPE_COLOR_TFT) | ||
| 53 | #define LCD_COLOR_TFT_18BPP ((18 << 4) | LCD_TYPE_COLOR_TFT) | ||
| 54 | #define LCD_SMART_PANEL_8BPP ((8 << 4) | LCD_TYPE_SMART_PANEL) | ||
| 55 | #define LCD_SMART_PANEL_16BPP ((16 << 4) | LCD_TYPE_SMART_PANEL) | ||
| 56 | #define LCD_SMART_PANEL_18BPP ((18 << 4) | LCD_TYPE_SMART_PANEL) | ||
| 57 | |||
| 58 | #define LCD_AC_BIAS_FREQ(x) (((x) & 0xff) << 10) | ||
| 59 | #define LCD_BIAS_ACTIVE_HIGH (0 << 18) | ||
| 60 | #define LCD_BIAS_ACTIVE_LOW (1 << 18) | ||
| 61 | #define LCD_PCLK_EDGE_RISE (0 << 19) | ||
| 62 | #define LCD_PCLK_EDGE_FALL (1 << 19) | ||
| 63 | #define LCD_ALTERNATE_MAPPING (1 << 20) | ||
| 64 | |||
| 65 | /* | ||
| 66 | * This structure describes the machine which we are running on. | ||
| 67 | * It is set in linux/arch/arm/mach-pxa/machine_name.c and used in the probe routine | ||
| 68 | * of linux/drivers/video/pxafb.c | ||
| 69 | */ | ||
| 70 | struct pxafb_mode_info { | ||
| 71 | u_long pixclock; | ||
| 72 | |||
| 73 | u_short xres; | ||
| 74 | u_short yres; | ||
| 75 | |||
| 76 | u_char bpp; | ||
| 77 | u_int cmap_greyscale:1, | ||
| 78 | depth:8, | ||
| 79 | transparency:1, | ||
| 80 | unused:22; | ||
| 81 | |||
| 82 | /* Parallel Mode Timing */ | ||
| 83 | u_char hsync_len; | ||
| 84 | u_char left_margin; | ||
| 85 | u_char right_margin; | ||
| 86 | |||
| 87 | u_char vsync_len; | ||
| 88 | u_char upper_margin; | ||
| 89 | u_char lower_margin; | ||
| 90 | u_char sync; | ||
| 91 | |||
| 92 | /* Smart Panel Mode Timing - see PXA27x DM 7.4.15.0.3 for details | ||
| 93 | * Note: | ||
| 94 | * 1. all parameters in nanosecond (ns) | ||
| 95 | * 2. a0cs{rd,wr}_set_hld are controlled by the same register bits | ||
| 96 | * in pxa27x and pxa3xx, initialize them to the same value or | ||
| 97 | * the larger one will be used | ||
| 98 | * 3. same to {rd,wr}_pulse_width | ||
| 99 | * | ||
| 100 | * 4. LCD_PCLK_EDGE_{RISE,FALL} controls the L_PCLK_WR polarity | ||
| 101 | * 5. sync & FB_SYNC_HOR_HIGH_ACT controls the L_LCLK_A0 | ||
| 102 | * 6. sync & FB_SYNC_VERT_HIGH_ACT controls the L_LCLK_RD | ||
| 103 | */ | ||
| 104 | unsigned a0csrd_set_hld; /* A0 and CS Setup/Hold Time before/after L_FCLK_RD */ | ||
| 105 | unsigned a0cswr_set_hld; /* A0 and CS Setup/Hold Time before/after L_PCLK_WR */ | ||
| 106 | unsigned wr_pulse_width; /* L_PCLK_WR pulse width */ | ||
| 107 | unsigned rd_pulse_width; /* L_FCLK_RD pulse width */ | ||
| 108 | unsigned cmd_inh_time; /* Command Inhibit time between two writes */ | ||
| 109 | unsigned op_hold_time; /* Output Hold time from L_FCLK_RD negation */ | ||
| 110 | }; | ||
| 111 | |||
| 112 | struct pxafb_mach_info { | ||
| 113 | struct pxafb_mode_info *modes; | ||
| 114 | unsigned int num_modes; | ||
| 115 | |||
| 116 | unsigned int lcd_conn; | ||
| 117 | unsigned long video_mem_size; | ||
| 118 | |||
| 119 | u_int fixed_modes:1, | ||
| 120 | cmap_inverse:1, | ||
| 121 | cmap_static:1, | ||
| 122 | acceleration_enabled:1, | ||
| 123 | unused:28; | ||
| 124 | |||
| 125 | /* The following should be defined in LCCR0 | ||
| 126 | * LCCR0_Act or LCCR0_Pas Active or Passive | ||
| 127 | * LCCR0_Sngl or LCCR0_Dual Single/Dual panel | ||
| 128 | * LCCR0_Mono or LCCR0_Color Mono/Color | ||
| 129 | * LCCR0_4PixMono or LCCR0_8PixMono (in mono single mode) | ||
| 130 | * LCCR0_DMADel(Tcpu) (optional) DMA request delay | ||
| 131 | * | ||
| 132 | * The following should not be defined in LCCR0: | ||
| 133 | * LCCR0_OUM, LCCR0_BM, LCCR0_QDM, LCCR0_DIS, LCCR0_EFM | ||
| 134 | * LCCR0_IUM, LCCR0_SFM, LCCR0_LDM, LCCR0_ENB | ||
| 135 | */ | ||
| 136 | u_int lccr0; | ||
| 137 | /* The following should be defined in LCCR3 | ||
| 138 | * LCCR3_OutEnH or LCCR3_OutEnL Output enable polarity | ||
| 139 | * LCCR3_PixRsEdg or LCCR3_PixFlEdg Pixel clock edge type | ||
| 140 | * LCCR3_Acb(X) AB Bias pin frequency | ||
| 141 | * LCCR3_DPC (optional) Double Pixel Clock mode (untested) | ||
| 142 | * | ||
| 143 | * The following should not be defined in LCCR3 | ||
| 144 | * LCCR3_HSP, LCCR3_VSP, LCCR0_Pcd(x), LCCR3_Bpp | ||
| 145 | */ | ||
| 146 | u_int lccr3; | ||
| 147 | /* The following should be defined in LCCR4 | ||
| 148 | * LCCR4_PAL_FOR_0 or LCCR4_PAL_FOR_1 or LCCR4_PAL_FOR_2 | ||
| 149 | * | ||
| 150 | * All other bits in LCCR4 should be left alone. | ||
| 151 | */ | ||
| 152 | u_int lccr4; | ||
| 153 | void (*pxafb_backlight_power)(int); | ||
| 154 | void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *); | ||
| 155 | void (*smart_update)(struct fb_info *); | ||
| 156 | }; | ||
| 157 | |||
| 158 | void pxa_set_fb_info(struct device *, struct pxafb_mach_info *); | ||
| 159 | unsigned long pxafb_get_hsync_time(struct device *dev); | ||
| 160 | |||
| 161 | #ifdef CONFIG_FB_PXA_SMARTPANEL | ||
| 162 | extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int); | ||
| 163 | extern int pxafb_smart_flush(struct fb_info *info); | ||
| 164 | #else | ||
| 165 | static inline int pxafb_smart_queue(struct fb_info *info, | ||
| 166 | uint16_t *cmds, int n) | ||
| 167 | { | ||
| 168 | return 0; | ||
| 169 | } | ||
| 170 | |||
| 171 | static inline int pxafb_smart_flush(struct fb_info *info) | ||
| 172 | { | ||
| 173 | return 0; | ||
| 174 | } | ||
| 175 | #endif | ||
diff --git a/include/linux/platform_data/video-vt8500lcdfb.h b/include/linux/platform_data/video-vt8500lcdfb.h new file mode 100644 index 000000000000..7f399c370fe0 --- /dev/null +++ b/include/linux/platform_data/video-vt8500lcdfb.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* | ||
| 2 | * VT8500/WM8505 Frame Buffer platform data definitions | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Ed Spiridonov <edo.rus@gmail.com> | ||
| 5 | * | ||
| 6 | * This software is licensed under the terms of the GNU General Public | ||
| 7 | * License version 2, as published by the Free Software Foundation, and | ||
| 8 | * may be copied, distributed, and modified under those terms. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #ifndef _VT8500FB_H | ||
| 17 | #define _VT8500FB_H | ||
| 18 | |||
| 19 | #include <linux/fb.h> | ||
| 20 | |||
| 21 | struct vt8500fb_platform_data { | ||
| 22 | struct fb_videomode mode; | ||
| 23 | u32 xres_virtual; | ||
| 24 | u32 yres_virtual; | ||
| 25 | u32 bpp; | ||
| 26 | unsigned long video_mem_phys; | ||
| 27 | void *video_mem_virt; | ||
| 28 | unsigned long video_mem_len; | ||
| 29 | }; | ||
| 30 | |||
| 31 | #endif /* _VT8500FB_H */ | ||
diff --git a/include/linux/platform_data/voltage-omap.h b/include/linux/platform_data/voltage-omap.h new file mode 100644 index 000000000000..5be4d5def427 --- /dev/null +++ b/include/linux/platform_data/voltage-omap.h | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | /* | ||
| 2 | * OMAP Voltage Management Routines | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011, Texas Instruments, Inc. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __ARCH_ARM_OMAP_VOLTAGE_H | ||
| 12 | #define __ARCH_ARM_OMAP_VOLTAGE_H | ||
| 13 | |||
| 14 | /** | ||
| 15 | * struct omap_volt_data - Omap voltage specific data. | ||
| 16 | * @voltage_nominal: The possible voltage value in uV | ||
| 17 | * @sr_efuse_offs: The offset of the efuse register(from system | ||
| 18 | * control module base address) from where to read | ||
| 19 | * the n-target value for the smartreflex module. | ||
| 20 | * @sr_errminlimit: Error min limit value for smartreflex. This value | ||
| 21 | * differs at differnet opp and thus is linked | ||
| 22 | * with voltage. | ||
| 23 | * @vp_errorgain: Error gain value for the voltage processor. This | ||
| 24 | * field also differs according to the voltage/opp. | ||
| 25 | */ | ||
| 26 | struct omap_volt_data { | ||
| 27 | u32 volt_nominal; | ||
| 28 | u32 sr_efuse_offs; | ||
| 29 | u8 sr_errminlimit; | ||
| 30 | u8 vp_errgain; | ||
| 31 | }; | ||
| 32 | struct voltagedomain; | ||
| 33 | |||
| 34 | struct voltagedomain *voltdm_lookup(const char *name); | ||
| 35 | int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt); | ||
| 36 | unsigned long voltdm_get_voltage(struct voltagedomain *voltdm); | ||
| 37 | struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm, | ||
| 38 | unsigned long volt); | ||
| 39 | #endif | ||
diff --git a/include/linux/power/smartreflex.h b/include/linux/power/smartreflex.h index 3101e62a1213..4a496ebc7d73 100644 --- a/include/linux/power/smartreflex.h +++ b/include/linux/power/smartreflex.h | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
| 24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
| 25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
| 26 | #include <plat/voltage.h> | 26 | #include <linux/platform_data/voltage-omap.h> |
| 27 | 27 | ||
| 28 | /* | 28 | /* |
| 29 | * Different Smartreflex IPs version. The v1 is the 65nm version used in | 29 | * Different Smartreflex IPs version. The v1 is the 65nm version used in |
diff --git a/include/linux/sc26198.h b/include/linux/sc26198.h deleted file mode 100644 index 7ca35abad387..000000000000 --- a/include/linux/sc26198.h +++ /dev/null | |||
| @@ -1,533 +0,0 @@ | |||
| 1 | /*****************************************************************************/ | ||
| 2 | |||
| 3 | /* | ||
| 4 | * sc26198.h -- SC26198 UART hardware info. | ||
| 5 | * | ||
| 6 | * Copyright (C) 1995-1998 Stallion Technologies | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License as published by | ||
| 10 | * the Free Software Foundation; either version 2 of the License, or | ||
| 11 | * (at your option) any later version. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with this program; if not, write to the Free Software | ||
| 20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 21 | */ | ||
| 22 | |||
| 23 | /*****************************************************************************/ | ||
| 24 | #ifndef _SC26198_H | ||
| 25 | #define _SC26198_H | ||
| 26 | /*****************************************************************************/ | ||
| 27 | |||
| 28 | /* | ||
| 29 | * Define the number of async ports per sc26198 uart device. | ||
| 30 | */ | ||
| 31 | #define SC26198_PORTS 8 | ||
| 32 | |||
| 33 | /* | ||
| 34 | * Baud rate timing clocks. All derived from a master 14.7456 MHz clock. | ||
| 35 | */ | ||
| 36 | #define SC26198_MASTERCLOCK 14745600L | ||
| 37 | #define SC26198_DCLK (SC26198_MASTERCLOCK) | ||
| 38 | #define SC26198_CCLK (SC26198_MASTERCLOCK / 2) | ||
| 39 | #define SC26198_BCLK (SC26198_MASTERCLOCK / 4) | ||
| 40 | |||
| 41 | /* | ||
| 42 | * Define internal FIFO sizes for the 26198 ports. | ||
| 43 | */ | ||
| 44 | #define SC26198_TXFIFOSIZE 16 | ||
| 45 | #define SC26198_RXFIFOSIZE 16 | ||
| 46 | |||
| 47 | /*****************************************************************************/ | ||
| 48 | |||
| 49 | /* | ||
| 50 | * Global register definitions. These registers are global to each 26198 | ||
| 51 | * device, not specific ports on it. | ||
| 52 | */ | ||
| 53 | #define TSTR 0x0d | ||
| 54 | #define GCCR 0x0f | ||
| 55 | #define ICR 0x1b | ||
| 56 | #define WDTRCR 0x1d | ||
| 57 | #define IVR 0x1f | ||
| 58 | #define BRGTRUA 0x84 | ||
| 59 | #define GPOSR 0x87 | ||
| 60 | #define GPOC 0x8b | ||
| 61 | #define UCIR 0x8c | ||
| 62 | #define CIR 0x8c | ||
| 63 | #define BRGTRUB 0x8d | ||
| 64 | #define GRXFIFO 0x8e | ||
| 65 | #define GTXFIFO 0x8e | ||
| 66 | #define GCCR2 0x8f | ||
| 67 | #define BRGTRLA 0x94 | ||
| 68 | #define GPOR 0x97 | ||
| 69 | #define GPOD 0x9b | ||
| 70 | #define BRGTCR 0x9c | ||
| 71 | #define GICR 0x9c | ||
| 72 | #define BRGTRLB 0x9d | ||
| 73 | #define GIBCR 0x9d | ||
| 74 | #define GITR 0x9f | ||
| 75 | |||
| 76 | /* | ||
| 77 | * Per port channel registers. These are the register offsets within | ||
| 78 | * the port address space, so need to have the port address (0 to 7) | ||
| 79 | * inserted in bit positions 4:6. | ||
| 80 | */ | ||
| 81 | #define MR0 0x00 | ||
| 82 | #define MR1 0x01 | ||
| 83 | #define IOPCR 0x02 | ||
| 84 | #define BCRBRK 0x03 | ||
| 85 | #define BCRCOS 0x04 | ||
| 86 | #define BCRX 0x06 | ||
| 87 | #define BCRA 0x07 | ||
| 88 | #define XONCR 0x08 | ||
| 89 | #define XOFFCR 0x09 | ||
| 90 | #define ARCR 0x0a | ||
| 91 | #define RXCSR 0x0c | ||
| 92 | #define TXCSR 0x0e | ||
| 93 | #define MR2 0x80 | ||
| 94 | #define SR 0x81 | ||
| 95 | #define SCCR 0x81 | ||
| 96 | #define ISR 0x82 | ||
| 97 | #define IMR 0x82 | ||
| 98 | #define TXFIFO 0x83 | ||
| 99 | #define RXFIFO 0x83 | ||
| 100 | #define IPR 0x84 | ||
| 101 | #define IOPIOR 0x85 | ||
| 102 | #define XISR 0x86 | ||
| 103 | |||
| 104 | /* | ||
| 105 | * For any given port calculate the address to use to access a specified | ||
| 106 | * register. This is only used for unusual access, mostly this is done | ||
| 107 | * through the assembler access routines. | ||
| 108 | */ | ||
| 109 | #define SC26198_PORTREG(port,reg) ((((port) & 0x07) << 4) | (reg)) | ||
| 110 | |||
| 111 | /*****************************************************************************/ | ||
| 112 | |||
| 113 | /* | ||
| 114 | * Global configuration control register bit definitions. | ||
| 115 | */ | ||
| 116 | #define GCCR_NOACK 0x00 | ||
| 117 | #define GCCR_IVRACK 0x02 | ||
| 118 | #define GCCR_IVRCHANACK 0x04 | ||
| 119 | #define GCCR_IVRTYPCHANACK 0x06 | ||
| 120 | #define GCCR_ASYNCCYCLE 0x00 | ||
| 121 | #define GCCR_SYNCCYCLE 0x40 | ||
| 122 | |||
| 123 | /*****************************************************************************/ | ||
| 124 | |||
| 125 | /* | ||
| 126 | * Mode register 0 bit definitions. | ||
| 127 | */ | ||
| 128 | #define MR0_ADDRNONE 0x00 | ||
| 129 | #define MR0_AUTOWAKE 0x01 | ||
| 130 | #define MR0_AUTODOZE 0x02 | ||
| 131 | #define MR0_AUTOWAKEDOZE 0x03 | ||
| 132 | #define MR0_SWFNONE 0x00 | ||
| 133 | #define MR0_SWFTX 0x04 | ||
| 134 | #define MR0_SWFRX 0x08 | ||
| 135 | #define MR0_SWFRXTX 0x0c | ||
| 136 | #define MR0_TXMASK 0x30 | ||
| 137 | #define MR0_TXEMPTY 0x00 | ||
| 138 | #define MR0_TXHIGH 0x10 | ||
| 139 | #define MR0_TXHALF 0x20 | ||
| 140 | #define MR0_TXRDY 0x00 | ||
| 141 | #define MR0_ADDRNT 0x00 | ||
| 142 | #define MR0_ADDRT 0x40 | ||
| 143 | #define MR0_SWFNT 0x00 | ||
| 144 | #define MR0_SWFT 0x80 | ||
| 145 | |||
| 146 | /* | ||
| 147 | * Mode register 1 bit definitions. | ||
| 148 | */ | ||
| 149 | #define MR1_CS5 0x00 | ||
| 150 | #define MR1_CS6 0x01 | ||
| 151 | #define MR1_CS7 0x02 | ||
| 152 | #define MR1_CS8 0x03 | ||
| 153 | #define MR1_PAREVEN 0x00 | ||
| 154 | #define MR1_PARODD 0x04 | ||
| 155 | #define MR1_PARENB 0x00 | ||
| 156 | #define MR1_PARFORCE 0x08 | ||
| 157 | #define MR1_PARNONE 0x10 | ||
| 158 | #define MR1_PARSPECIAL 0x18 | ||
| 159 | #define MR1_ERRCHAR 0x00 | ||
| 160 | #define MR1_ERRBLOCK 0x20 | ||
| 161 | #define MR1_ISRUNMASKED 0x00 | ||
| 162 | #define MR1_ISRMASKED 0x40 | ||
| 163 | #define MR1_AUTORTS 0x80 | ||
| 164 | |||
| 165 | /* | ||
| 166 | * Mode register 2 bit definitions. | ||
| 167 | */ | ||
| 168 | #define MR2_STOP1 0x00 | ||
| 169 | #define MR2_STOP15 0x01 | ||
| 170 | #define MR2_STOP2 0x02 | ||
| 171 | #define MR2_STOP916 0x03 | ||
| 172 | #define MR2_RXFIFORDY 0x00 | ||
| 173 | #define MR2_RXFIFOHALF 0x04 | ||
| 174 | #define MR2_RXFIFOHIGH 0x08 | ||
| 175 | #define MR2_RXFIFOFULL 0x0c | ||
| 176 | #define MR2_AUTOCTS 0x10 | ||
| 177 | #define MR2_TXRTS 0x20 | ||
| 178 | #define MR2_MODENORM 0x00 | ||
| 179 | #define MR2_MODEAUTOECHO 0x40 | ||
| 180 | #define MR2_MODELOOP 0x80 | ||
| 181 | #define MR2_MODEREMECHO 0xc0 | ||
| 182 | |||
| 183 | /*****************************************************************************/ | ||
| 184 | |||
| 185 | /* | ||
| 186 | * Baud Rate Generator (BRG) selector values. | ||
| 187 | */ | ||
| 188 | #define BRG_50 0x00 | ||
| 189 | #define BRG_75 0x01 | ||
| 190 | #define BRG_150 0x02 | ||
| 191 | #define BRG_200 0x03 | ||
| 192 | #define BRG_300 0x04 | ||
| 193 | #define BRG_450 0x05 | ||
| 194 | #define BRG_600 0x06 | ||
| 195 | #define BRG_900 0x07 | ||
| 196 | #define BRG_1200 0x08 | ||
| 197 | #define BRG_1800 0x09 | ||
| 198 | #define BRG_2400 0x0a | ||
| 199 | #define BRG_3600 0x0b | ||
| 200 | #define BRG_4800 0x0c | ||
| 201 | #define BRG_7200 0x0d | ||
| 202 | #define BRG_9600 0x0e | ||
| 203 | #define BRG_14400 0x0f | ||
| 204 | #define BRG_19200 0x10 | ||
| 205 | #define BRG_28200 0x11 | ||
| 206 | #define BRG_38400 0x12 | ||
| 207 | #define BRG_57600 0x13 | ||
| 208 | #define BRG_115200 0x14 | ||
| 209 | #define BRG_230400 0x15 | ||
| 210 | #define BRG_GIN0 0x16 | ||
| 211 | #define BRG_GIN1 0x17 | ||
| 212 | #define BRG_CT0 0x18 | ||
| 213 | #define BRG_CT1 0x19 | ||
| 214 | #define BRG_RX2TX316 0x1b | ||
| 215 | #define BRG_RX2TX31 0x1c | ||
| 216 | |||
| 217 | #define SC26198_MAXBAUD 921600 | ||
| 218 | |||
| 219 | /*****************************************************************************/ | ||
| 220 | |||
| 221 | /* | ||
| 222 | * Command register command definitions. | ||
| 223 | */ | ||
| 224 | #define CR_NULL 0x04 | ||
| 225 | #define CR_ADDRNORMAL 0x0c | ||
| 226 | #define CR_RXRESET 0x14 | ||
| 227 | #define CR_TXRESET 0x1c | ||
| 228 | #define CR_CLEARRXERR 0x24 | ||
| 229 | #define CR_BREAKRESET 0x2c | ||
| 230 | #define CR_TXSTARTBREAK 0x34 | ||
| 231 | #define CR_TXSTOPBREAK 0x3c | ||
| 232 | #define CR_RTSON 0x44 | ||
| 233 | #define CR_RTSOFF 0x4c | ||
| 234 | #define CR_ADDRINIT 0x5c | ||
| 235 | #define CR_RXERRBLOCK 0x6c | ||
| 236 | #define CR_TXSENDXON 0x84 | ||
| 237 | #define CR_TXSENDXOFF 0x8c | ||
| 238 | #define CR_GANGXONSET 0x94 | ||
| 239 | #define CR_GANGXOFFSET 0x9c | ||
| 240 | #define CR_GANGXONINIT 0xa4 | ||
| 241 | #define CR_GANGXOFFINIT 0xac | ||
| 242 | #define CR_HOSTXON 0xb4 | ||
| 243 | #define CR_HOSTXOFF 0xbc | ||
| 244 | #define CR_CANCELXOFF 0xc4 | ||
| 245 | #define CR_ADDRRESET 0xdc | ||
| 246 | #define CR_RESETALLPORTS 0xf4 | ||
| 247 | #define CR_RESETALL 0xfc | ||
| 248 | |||
| 249 | #define CR_RXENABLE 0x01 | ||
| 250 | #define CR_TXENABLE 0x02 | ||
| 251 | |||
| 252 | /*****************************************************************************/ | ||
| 253 | |||
| 254 | /* | ||
| 255 | * Channel status register. | ||
| 256 | */ | ||
| 257 | #define SR_RXRDY 0x01 | ||
| 258 | #define SR_RXFULL 0x02 | ||
| 259 | #define SR_TXRDY 0x04 | ||
| 260 | #define SR_TXEMPTY 0x08 | ||
| 261 | #define SR_RXOVERRUN 0x10 | ||
| 262 | #define SR_RXPARITY 0x20 | ||
| 263 | #define SR_RXFRAMING 0x40 | ||
| 264 | #define SR_RXBREAK 0x80 | ||
| 265 | |||
| 266 | #define SR_RXERRS (SR_RXPARITY | SR_RXFRAMING | SR_RXOVERRUN) | ||
| 267 | |||
| 268 | /*****************************************************************************/ | ||
| 269 | |||
| 270 | /* | ||
| 271 | * Interrupt status register and interrupt mask register bit definitions. | ||
| 272 | */ | ||
| 273 | #define IR_TXRDY 0x01 | ||
| 274 | #define IR_RXRDY 0x02 | ||
| 275 | #define IR_RXBREAK 0x04 | ||
| 276 | #define IR_XONXOFF 0x10 | ||
| 277 | #define IR_ADDRRECOG 0x20 | ||
| 278 | #define IR_RXWATCHDOG 0x40 | ||
| 279 | #define IR_IOPORT 0x80 | ||
| 280 | |||
| 281 | /*****************************************************************************/ | ||
| 282 | |||
| 283 | /* | ||
| 284 | * Interrupt vector register field definitions. | ||
| 285 | */ | ||
| 286 | #define IVR_CHANMASK 0x07 | ||
| 287 | #define IVR_TYPEMASK 0x18 | ||
| 288 | #define IVR_CONSTMASK 0xc0 | ||
| 289 | |||
| 290 | #define IVR_RXDATA 0x10 | ||
| 291 | #define IVR_RXBADDATA 0x18 | ||
| 292 | #define IVR_TXDATA 0x08 | ||
| 293 | #define IVR_OTHER 0x00 | ||
| 294 | |||
| 295 | /*****************************************************************************/ | ||
| 296 | |||
| 297 | /* | ||
| 298 | * BRG timer control register bit definitions. | ||
| 299 | */ | ||
| 300 | #define BRGCTCR_DISABCLK0 0x00 | ||
| 301 | #define BRGCTCR_ENABCLK0 0x08 | ||
| 302 | #define BRGCTCR_DISABCLK1 0x00 | ||
| 303 | #define BRGCTCR_ENABCLK1 0x80 | ||
| 304 | |||
| 305 | #define BRGCTCR_0SCLK16 0x00 | ||
| 306 | #define BRGCTCR_0SCLK32 0x01 | ||
| 307 | #define BRGCTCR_0SCLK64 0x02 | ||
| 308 | #define BRGCTCR_0SCLK128 0x03 | ||
| 309 | #define BRGCTCR_0X1 0x04 | ||
| 310 | #define BRGCTCR_0X12 0x05 | ||
| 311 | #define BRGCTCR_0IO1A 0x06 | ||
| 312 | #define BRGCTCR_0GIN0 0x07 | ||
| 313 | |||
| 314 | #define BRGCTCR_1SCLK16 0x00 | ||
| 315 | #define BRGCTCR_1SCLK32 0x10 | ||
| 316 | #define BRGCTCR_1SCLK64 0x20 | ||
| 317 | #define BRGCTCR_1SCLK128 0x30 | ||
| 318 | #define BRGCTCR_1X1 0x40 | ||
| 319 | #define BRGCTCR_1X12 0x50 | ||
| 320 | #define BRGCTCR_1IO1B 0x60 | ||
| 321 | #define BRGCTCR_1GIN1 0x70 | ||
| 322 | |||
| 323 | /*****************************************************************************/ | ||
| 324 | |||
| 325 | /* | ||
| 326 | * Watch dog timer enable register. | ||
| 327 | */ | ||
| 328 | #define WDTRCR_ENABALL 0xff | ||
| 329 | |||
| 330 | /*****************************************************************************/ | ||
| 331 | |||
| 332 | /* | ||
| 333 | * XON/XOFF interrupt status register. | ||
| 334 | */ | ||
| 335 | #define XISR_TXCHARMASK 0x03 | ||
| 336 | #define XISR_TXCHARNORMAL 0x00 | ||
| 337 | #define XISR_TXWAIT 0x01 | ||
| 338 | #define XISR_TXXOFFPEND 0x02 | ||
| 339 | #define XISR_TXXONPEND 0x03 | ||
| 340 | |||
| 341 | #define XISR_TXFLOWMASK 0x0c | ||
| 342 | #define XISR_TXNORMAL 0x00 | ||
| 343 | #define XISR_TXSTOPPEND 0x04 | ||
| 344 | #define XISR_TXSTARTED 0x08 | ||
| 345 | #define XISR_TXSTOPPED 0x0c | ||
| 346 | |||
| 347 | #define XISR_RXFLOWMASK 0x30 | ||
| 348 | #define XISR_RXFLOWNONE 0x00 | ||
| 349 | #define XISR_RXXONSENT 0x10 | ||
| 350 | #define XISR_RXXOFFSENT 0x20 | ||
| 351 | |||
| 352 | #define XISR_RXXONGOT 0x40 | ||
| 353 | #define XISR_RXXOFFGOT 0x80 | ||
| 354 | |||
| 355 | /*****************************************************************************/ | ||
| 356 | |||
| 357 | /* | ||
| 358 | * Current interrupt register. | ||
| 359 | */ | ||
| 360 | #define CIR_TYPEMASK 0xc0 | ||
| 361 | #define CIR_TYPEOTHER 0x00 | ||
| 362 | #define CIR_TYPETX 0x40 | ||
| 363 | #define CIR_TYPERXGOOD 0x80 | ||
| 364 | #define CIR_TYPERXBAD 0xc0 | ||
| 365 | |||
| 366 | #define CIR_RXDATA 0x80 | ||
| 367 | #define CIR_RXBADDATA 0x40 | ||
| 368 | #define CIR_TXDATA 0x40 | ||
| 369 | |||
| 370 | #define CIR_CHANMASK 0x07 | ||
| 371 | #define CIR_CNTMASK 0x38 | ||
| 372 | |||
| 373 | #define CIR_SUBTYPEMASK 0x38 | ||
| 374 | #define CIR_SUBNONE 0x00 | ||
| 375 | #define CIR_SUBCOS 0x08 | ||
| 376 | #define CIR_SUBADDR 0x10 | ||
| 377 | #define CIR_SUBXONXOFF 0x18 | ||
| 378 | #define CIR_SUBBREAK 0x28 | ||
| 379 | |||
| 380 | /*****************************************************************************/ | ||
| 381 | |||
| 382 | /* | ||
| 383 | * Global interrupting channel register. | ||
| 384 | */ | ||
| 385 | #define GICR_CHANMASK 0x07 | ||
| 386 | |||
| 387 | /*****************************************************************************/ | ||
| 388 | |||
| 389 | /* | ||
| 390 | * Global interrupting byte count register. | ||
| 391 | */ | ||
| 392 | #define GICR_COUNTMASK 0x0f | ||
| 393 | |||
| 394 | /*****************************************************************************/ | ||
| 395 | |||
| 396 | /* | ||
| 397 | * Global interrupting type register. | ||
| 398 | */ | ||
| 399 | #define GITR_RXMASK 0xc0 | ||
| 400 | #define GITR_RXNONE 0x00 | ||
| 401 | #define GITR_RXBADDATA 0x80 | ||
| 402 | #define GITR_RXGOODDATA 0xc0 | ||
| 403 | #define GITR_TXDATA 0x20 | ||
| 404 | |||
| 405 | #define GITR_SUBTYPEMASK 0x07 | ||
| 406 | #define GITR_SUBNONE 0x00 | ||
| 407 | #define GITR_SUBCOS 0x01 | ||
| 408 | #define GITR_SUBADDR 0x02 | ||
| 409 | #define GITR_SUBXONXOFF 0x03 | ||
| 410 | #define GITR_SUBBREAK 0x05 | ||
| 411 | |||
| 412 | /*****************************************************************************/ | ||
| 413 | |||
| 414 | /* | ||
| 415 | * Input port change register. | ||
| 416 | */ | ||
| 417 | #define IPR_CTS 0x01 | ||
| 418 | #define IPR_DTR 0x02 | ||
| 419 | #define IPR_RTS 0x04 | ||
| 420 | #define IPR_DCD 0x08 | ||
| 421 | #define IPR_CTSCHANGE 0x10 | ||
| 422 | #define IPR_DTRCHANGE 0x20 | ||
| 423 | #define IPR_RTSCHANGE 0x40 | ||
| 424 | #define IPR_DCDCHANGE 0x80 | ||
| 425 | |||
| 426 | #define IPR_CHANGEMASK 0xf0 | ||
| 427 | |||
| 428 | /*****************************************************************************/ | ||
| 429 | |||
| 430 | /* | ||
| 431 | * IO port interrupt and output register. | ||
| 432 | */ | ||
| 433 | #define IOPR_CTS 0x01 | ||
| 434 | #define IOPR_DTR 0x02 | ||
| 435 | #define IOPR_RTS 0x04 | ||
| 436 | #define IOPR_DCD 0x08 | ||
| 437 | #define IOPR_CTSCOS 0x10 | ||
| 438 | #define IOPR_DTRCOS 0x20 | ||
| 439 | #define IOPR_RTSCOS 0x40 | ||
| 440 | #define IOPR_DCDCOS 0x80 | ||
| 441 | |||
| 442 | /*****************************************************************************/ | ||
| 443 | |||
| 444 | /* | ||
| 445 | * IO port configuration register. | ||
| 446 | */ | ||
| 447 | #define IOPCR_SETCTS 0x00 | ||
| 448 | #define IOPCR_SETDTR 0x04 | ||
| 449 | #define IOPCR_SETRTS 0x10 | ||
| 450 | #define IOPCR_SETDCD 0x00 | ||
| 451 | |||
| 452 | #define IOPCR_SETSIGS (IOPCR_SETRTS | IOPCR_SETRTS | IOPCR_SETDTR | IOPCR_SETDCD) | ||
| 453 | |||
| 454 | /*****************************************************************************/ | ||
| 455 | |||
| 456 | /* | ||
| 457 | * General purpose output select register. | ||
| 458 | */ | ||
| 459 | #define GPORS_TXC1XA 0x08 | ||
| 460 | #define GPORS_TXC16XA 0x09 | ||
| 461 | #define GPORS_RXC16XA 0x0a | ||
| 462 | #define GPORS_TXC16XB 0x0b | ||
| 463 | #define GPORS_GPOR3 0x0c | ||
| 464 | #define GPORS_GPOR2 0x0d | ||
| 465 | #define GPORS_GPOR1 0x0e | ||
| 466 | #define GPORS_GPOR0 0x0f | ||
| 467 | |||
| 468 | /*****************************************************************************/ | ||
| 469 | |||
| 470 | /* | ||
| 471 | * General purpose output register. | ||
| 472 | */ | ||
| 473 | #define GPOR_0 0x01 | ||
| 474 | #define GPOR_1 0x02 | ||
| 475 | #define GPOR_2 0x04 | ||
| 476 | #define GPOR_3 0x08 | ||
| 477 | |||
| 478 | /*****************************************************************************/ | ||
| 479 | |||
| 480 | /* | ||
| 481 | * General purpose output clock register. | ||
| 482 | */ | ||
| 483 | #define GPORC_0NONE 0x00 | ||
| 484 | #define GPORC_0GIN0 0x01 | ||
| 485 | #define GPORC_0GIN1 0x02 | ||
| 486 | #define GPORC_0IO3A 0x02 | ||
| 487 | |||
| 488 | #define GPORC_1NONE 0x00 | ||
| 489 | #define GPORC_1GIN0 0x04 | ||
| 490 | #define GPORC_1GIN1 0x08 | ||
| 491 | #define GPORC_1IO3C 0x0c | ||
| 492 | |||
| 493 | #define GPORC_2NONE 0x00 | ||
| 494 | #define GPORC_2GIN0 0x10 | ||
| 495 | #define GPORC_2GIN1 0x20 | ||
| 496 | #define GPORC_2IO3E 0x20 | ||
| 497 | |||
| 498 | #define GPORC_3NONE 0x00 | ||
| 499 | #define GPORC_3GIN0 0x40 | ||
| 500 | #define GPORC_3GIN1 0x80 | ||
| 501 | #define GPORC_3IO3G 0xc0 | ||
| 502 | |||
| 503 | /*****************************************************************************/ | ||
| 504 | |||
| 505 | /* | ||
| 506 | * General purpose output data register. | ||
| 507 | */ | ||
| 508 | #define GPOD_0MASK 0x03 | ||
| 509 | #define GPOD_0SET1 0x00 | ||
| 510 | #define GPOD_0SET0 0x01 | ||
| 511 | #define GPOD_0SETR0 0x02 | ||
| 512 | #define GPOD_0SETIO3B 0x03 | ||
| 513 | |||
| 514 | #define GPOD_1MASK 0x0c | ||
| 515 | #define GPOD_1SET1 0x00 | ||
| 516 | #define GPOD_1SET0 0x04 | ||
| 517 | #define GPOD_1SETR0 0x08 | ||
| 518 | #define GPOD_1SETIO3D 0x0c | ||
| 519 | |||
| 520 | #define GPOD_2MASK 0x30 | ||
| 521 | #define GPOD_2SET1 0x00 | ||
| 522 | #define GPOD_2SET0 0x10 | ||
| 523 | #define GPOD_2SETR0 0x20 | ||
| 524 | #define GPOD_2SETIO3F 0x30 | ||
| 525 | |||
| 526 | #define GPOD_3MASK 0xc0 | ||
| 527 | #define GPOD_3SET1 0x00 | ||
| 528 | #define GPOD_3SET0 0x40 | ||
| 529 | #define GPOD_3SETR0 0x80 | ||
| 530 | #define GPOD_3SETIO3H 0xc0 | ||
| 531 | |||
| 532 | /*****************************************************************************/ | ||
| 533 | #endif | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index c147e7024f11..23bddac4bad8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -334,14 +334,6 @@ static inline void lockup_detector_init(void) | |||
| 334 | } | 334 | } |
| 335 | #endif | 335 | #endif |
| 336 | 336 | ||
| 337 | #if defined(CONFIG_LOCKUP_DETECTOR) && defined(CONFIG_SUSPEND) | ||
| 338 | void lockup_detector_bootcpu_resume(void); | ||
| 339 | #else | ||
| 340 | static inline void lockup_detector_bootcpu_resume(void) | ||
| 341 | { | ||
| 342 | } | ||
| 343 | #endif | ||
| 344 | |||
| 345 | #ifdef CONFIG_DETECT_HUNG_TASK | 337 | #ifdef CONFIG_DETECT_HUNG_TASK |
| 346 | extern unsigned int sysctl_hung_task_panic; | 338 | extern unsigned int sysctl_hung_task_panic; |
| 347 | extern unsigned long sysctl_hung_task_check_count; | 339 | extern unsigned long sysctl_hung_task_check_count; |
| @@ -962,7 +954,6 @@ struct sched_domain { | |||
| 962 | unsigned int smt_gain; | 954 | unsigned int smt_gain; |
| 963 | int flags; /* See SD_* */ | 955 | int flags; /* See SD_* */ |
| 964 | int level; | 956 | int level; |
| 965 | int idle_buddy; /* cpu assigned to select_idle_sibling() */ | ||
| 966 | 957 | ||
| 967 | /* Runtime fields. */ | 958 | /* Runtime fields. */ |
| 968 | unsigned long last_balance; /* init to jiffies. units in jiffies */ | 959 | unsigned long last_balance; /* init to jiffies. units in jiffies */ |
diff --git a/include/linux/security.h b/include/linux/security.h index 4e5a73cdbbef..3dea6a9d568f 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -1242,8 +1242,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 1242 | * Check that the @parent process has sufficient permission to trace the | 1242 | * Check that the @parent process has sufficient permission to trace the |
| 1243 | * current process before allowing the current process to present itself | 1243 | * current process before allowing the current process to present itself |
| 1244 | * to the @parent process for tracing. | 1244 | * to the @parent process for tracing. |
| 1245 | * The parent process will still have to undergo the ptrace_access_check | ||
| 1246 | * checks before it is allowed to trace this one. | ||
| 1247 | * @parent contains the task_struct structure for debugger process. | 1245 | * @parent contains the task_struct structure for debugger process. |
| 1248 | * Return 0 if permission is granted. | 1246 | * Return 0 if permission is granted. |
| 1249 | * @capget: | 1247 | * @capget: |
diff --git a/include/linux/serial.h b/include/linux/serial.h index 90e9f981358a..861e51de476b 100644 --- a/include/linux/serial.h +++ b/include/linux/serial.h | |||
| @@ -12,9 +12,12 @@ | |||
| 12 | 12 | ||
| 13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
| 14 | 14 | ||
| 15 | #include <linux/tty_flags.h> | ||
| 16 | |||
| 15 | #ifdef __KERNEL__ | 17 | #ifdef __KERNEL__ |
| 16 | #include <asm/page.h> | 18 | #include <asm/page.h> |
| 17 | 19 | ||
| 20 | |||
| 18 | /* | 21 | /* |
| 19 | * Counters of the input lines (CTS, DSR, RI, CD) interrupts | 22 | * Counters of the input lines (CTS, DSR, RI, CD) interrupts |
| 20 | */ | 23 | */ |
| @@ -83,89 +86,11 @@ struct serial_struct { | |||
| 83 | #define SERIAL_IO_HUB6 1 | 86 | #define SERIAL_IO_HUB6 1 |
| 84 | #define SERIAL_IO_MEM 2 | 87 | #define SERIAL_IO_MEM 2 |
| 85 | 88 | ||
| 86 | struct serial_uart_config { | ||
| 87 | char *name; | ||
| 88 | int dfl_xmit_fifo_size; | ||
| 89 | int flags; | ||
| 90 | }; | ||
| 91 | |||
| 92 | #define UART_CLEAR_FIFO 0x01 | 89 | #define UART_CLEAR_FIFO 0x01 |
| 93 | #define UART_USE_FIFO 0x02 | 90 | #define UART_USE_FIFO 0x02 |
| 94 | #define UART_STARTECH 0x04 | 91 | #define UART_STARTECH 0x04 |
| 95 | #define UART_NATSEMI 0x08 | 92 | #define UART_NATSEMI 0x08 |
| 96 | 93 | ||
| 97 | /* | ||
| 98 | * Definitions for async_struct (and serial_struct) flags field | ||
| 99 | * | ||
| 100 | * Define ASYNCB_* for convenient use with {test,set,clear}_bit. | ||
| 101 | */ | ||
| 102 | #define ASYNCB_HUP_NOTIFY 0 /* Notify getty on hangups and closes | ||
| 103 | * on the callout port */ | ||
| 104 | #define ASYNCB_FOURPORT 1 /* Set OU1, OUT2 per AST Fourport settings */ | ||
| 105 | #define ASYNCB_SAK 2 /* Secure Attention Key (Orange book) */ | ||
| 106 | #define ASYNCB_SPLIT_TERMIOS 3 /* Separate termios for dialin/callout */ | ||
| 107 | #define ASYNCB_SPD_HI 4 /* Use 56000 instead of 38400 bps */ | ||
| 108 | #define ASYNCB_SPD_VHI 5 /* Use 115200 instead of 38400 bps */ | ||
| 109 | #define ASYNCB_SKIP_TEST 6 /* Skip UART test during autoconfiguration */ | ||
| 110 | #define ASYNCB_AUTO_IRQ 7 /* Do automatic IRQ during | ||
| 111 | * autoconfiguration */ | ||
| 112 | #define ASYNCB_SESSION_LOCKOUT 8 /* Lock out cua opens based on session */ | ||
| 113 | #define ASYNCB_PGRP_LOCKOUT 9 /* Lock out cua opens based on pgrp */ | ||
| 114 | #define ASYNCB_CALLOUT_NOHUP 10 /* Don't do hangups for cua device */ | ||
| 115 | #define ASYNCB_HARDPPS_CD 11 /* Call hardpps when CD goes high */ | ||
| 116 | #define ASYNCB_SPD_SHI 12 /* Use 230400 instead of 38400 bps */ | ||
| 117 | #define ASYNCB_LOW_LATENCY 13 /* Request low latency behaviour */ | ||
| 118 | #define ASYNCB_BUGGY_UART 14 /* This is a buggy UART, skip some safety | ||
| 119 | * checks. Note: can be dangerous! */ | ||
| 120 | #define ASYNCB_AUTOPROBE 15 /* Port was autoprobed by PCI or PNP code */ | ||
| 121 | #define ASYNCB_LAST_USER 15 | ||
| 122 | |||
| 123 | /* Internal flags used only by kernel */ | ||
| 124 | #define ASYNCB_INITIALIZED 31 /* Serial port was initialized */ | ||
| 125 | #define ASYNCB_SUSPENDED 30 /* Serial port is suspended */ | ||
| 126 | #define ASYNCB_NORMAL_ACTIVE 29 /* Normal device is active */ | ||
| 127 | #define ASYNCB_BOOT_AUTOCONF 28 /* Autoconfigure port on bootup */ | ||
| 128 | #define ASYNCB_CLOSING 27 /* Serial port is closing */ | ||
| 129 | #define ASYNCB_CTS_FLOW 26 /* Do CTS flow control */ | ||
| 130 | #define ASYNCB_CHECK_CD 25 /* i.e., CLOCAL */ | ||
| 131 | #define ASYNCB_SHARE_IRQ 24 /* for multifunction cards, no longer used */ | ||
| 132 | #define ASYNCB_CONS_FLOW 23 /* flow control for console */ | ||
| 133 | #define ASYNCB_FIRST_KERNEL 22 | ||
| 134 | |||
| 135 | #define ASYNC_HUP_NOTIFY (1U << ASYNCB_HUP_NOTIFY) | ||
| 136 | #define ASYNC_SUSPENDED (1U << ASYNCB_SUSPENDED) | ||
| 137 | #define ASYNC_FOURPORT (1U << ASYNCB_FOURPORT) | ||
| 138 | #define ASYNC_SAK (1U << ASYNCB_SAK) | ||
| 139 | #define ASYNC_SPLIT_TERMIOS (1U << ASYNCB_SPLIT_TERMIOS) | ||
| 140 | #define ASYNC_SPD_HI (1U << ASYNCB_SPD_HI) | ||
| 141 | #define ASYNC_SPD_VHI (1U << ASYNCB_SPD_VHI) | ||
| 142 | #define ASYNC_SKIP_TEST (1U << ASYNCB_SKIP_TEST) | ||
| 143 | #define ASYNC_AUTO_IRQ (1U << ASYNCB_AUTO_IRQ) | ||
| 144 | #define ASYNC_SESSION_LOCKOUT (1U << ASYNCB_SESSION_LOCKOUT) | ||
| 145 | #define ASYNC_PGRP_LOCKOUT (1U << ASYNCB_PGRP_LOCKOUT) | ||
| 146 | #define ASYNC_CALLOUT_NOHUP (1U << ASYNCB_CALLOUT_NOHUP) | ||
| 147 | #define ASYNC_HARDPPS_CD (1U << ASYNCB_HARDPPS_CD) | ||
| 148 | #define ASYNC_SPD_SHI (1U << ASYNCB_SPD_SHI) | ||
| 149 | #define ASYNC_LOW_LATENCY (1U << ASYNCB_LOW_LATENCY) | ||
| 150 | #define ASYNC_BUGGY_UART (1U << ASYNCB_BUGGY_UART) | ||
| 151 | #define ASYNC_AUTOPROBE (1U << ASYNCB_AUTOPROBE) | ||
| 152 | |||
| 153 | #define ASYNC_FLAGS ((1U << (ASYNCB_LAST_USER + 1)) - 1) | ||
| 154 | #define ASYNC_USR_MASK (ASYNC_SPD_MASK|ASYNC_CALLOUT_NOHUP| \ | ||
| 155 | ASYNC_LOW_LATENCY) | ||
| 156 | #define ASYNC_SPD_CUST (ASYNC_SPD_HI|ASYNC_SPD_VHI) | ||
| 157 | #define ASYNC_SPD_WARP (ASYNC_SPD_HI|ASYNC_SPD_SHI) | ||
| 158 | #define ASYNC_SPD_MASK (ASYNC_SPD_HI|ASYNC_SPD_VHI|ASYNC_SPD_SHI) | ||
| 159 | |||
| 160 | #define ASYNC_INITIALIZED (1U << ASYNCB_INITIALIZED) | ||
| 161 | #define ASYNC_NORMAL_ACTIVE (1U << ASYNCB_NORMAL_ACTIVE) | ||
| 162 | #define ASYNC_BOOT_AUTOCONF (1U << ASYNCB_BOOT_AUTOCONF) | ||
| 163 | #define ASYNC_CLOSING (1U << ASYNCB_CLOSING) | ||
| 164 | #define ASYNC_CTS_FLOW (1U << ASYNCB_CTS_FLOW) | ||
| 165 | #define ASYNC_CHECK_CD (1U << ASYNCB_CHECK_CD) | ||
| 166 | #define ASYNC_SHARE_IRQ (1U << ASYNCB_SHARE_IRQ) | ||
| 167 | #define ASYNC_CONS_FLOW (1U << ASYNCB_CONS_FLOW) | ||
| 168 | #define ASYNC_INTERNAL_FLAGS (~((1U << ASYNCB_FIRST_KERNEL) - 1)) | ||
| 169 | 94 | ||
| 170 | /* | 95 | /* |
| 171 | * Multiport serial configuration structure --- external structure | 96 | * Multiport serial configuration structure --- external structure |
diff --git a/include/linux/serial167.h b/include/linux/serial167.h deleted file mode 100644 index 59c81b708562..000000000000 --- a/include/linux/serial167.h +++ /dev/null | |||
| @@ -1,157 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * serial167.h | ||
| 3 | * | ||
| 4 | * Richard Hirst [richard@sleepie.demon.co.uk] | ||
| 5 | * | ||
| 6 | * Based on cyclades.h | ||
| 7 | */ | ||
| 8 | |||
| 9 | struct cyclades_monitor { | ||
| 10 | unsigned long int_count; | ||
| 11 | unsigned long char_count; | ||
| 12 | unsigned long char_max; | ||
| 13 | unsigned long char_last; | ||
| 14 | }; | ||
| 15 | |||
| 16 | /* | ||
| 17 | * This is our internal structure for each serial port's state. | ||
| 18 | * | ||
| 19 | * Many fields are paralleled by the structure used by the serial_struct | ||
| 20 | * structure. | ||
| 21 | * | ||
| 22 | * For definitions of the flags field, see tty.h | ||
| 23 | */ | ||
| 24 | |||
| 25 | struct cyclades_port { | ||
| 26 | int magic; | ||
| 27 | int type; | ||
| 28 | int card; | ||
| 29 | int line; | ||
| 30 | int flags; /* defined in tty.h */ | ||
| 31 | struct tty_struct *tty; | ||
| 32 | int read_status_mask; | ||
| 33 | int timeout; | ||
| 34 | int xmit_fifo_size; | ||
| 35 | int cor1,cor2,cor3,cor4,cor5,cor6,cor7; | ||
| 36 | int tbpr,tco,rbpr,rco; | ||
| 37 | int ignore_status_mask; | ||
| 38 | int close_delay; | ||
| 39 | int IER; /* Interrupt Enable Register */ | ||
| 40 | unsigned long last_active; | ||
| 41 | int count; /* # of fd on device */ | ||
| 42 | int x_char; /* to be pushed out ASAP */ | ||
| 43 | int x_break; | ||
| 44 | int blocked_open; /* # of blocked opens */ | ||
| 45 | unsigned char *xmit_buf; | ||
| 46 | int xmit_head; | ||
| 47 | int xmit_tail; | ||
| 48 | int xmit_cnt; | ||
| 49 | int default_threshold; | ||
| 50 | int default_timeout; | ||
| 51 | wait_queue_head_t open_wait; | ||
| 52 | wait_queue_head_t close_wait; | ||
| 53 | struct cyclades_monitor mon; | ||
| 54 | }; | ||
| 55 | |||
| 56 | #define CYCLADES_MAGIC 0x4359 | ||
| 57 | |||
| 58 | #define CYGETMON 0x435901 | ||
| 59 | #define CYGETTHRESH 0x435902 | ||
| 60 | #define CYSETTHRESH 0x435903 | ||
| 61 | #define CYGETDEFTHRESH 0x435904 | ||
| 62 | #define CYSETDEFTHRESH 0x435905 | ||
| 63 | #define CYGETTIMEOUT 0x435906 | ||
| 64 | #define CYSETTIMEOUT 0x435907 | ||
| 65 | #define CYGETDEFTIMEOUT 0x435908 | ||
| 66 | #define CYSETDEFTIMEOUT 0x435909 | ||
| 67 | |||
| 68 | #define CyMaxChipsPerCard 1 | ||
| 69 | |||
| 70 | /**** cd2401 registers ****/ | ||
| 71 | |||
| 72 | #define CyGFRCR (0x81) | ||
| 73 | #define CyCCR (0x13) | ||
| 74 | #define CyCLR_CHAN (0x40) | ||
| 75 | #define CyINIT_CHAN (0x20) | ||
| 76 | #define CyCHIP_RESET (0x10) | ||
| 77 | #define CyENB_XMTR (0x08) | ||
| 78 | #define CyDIS_XMTR (0x04) | ||
| 79 | #define CyENB_RCVR (0x02) | ||
| 80 | #define CyDIS_RCVR (0x01) | ||
| 81 | #define CyCAR (0xee) | ||
| 82 | #define CyIER (0x11) | ||
| 83 | #define CyMdmCh (0x80) | ||
| 84 | #define CyRxExc (0x20) | ||
| 85 | #define CyRxData (0x08) | ||
| 86 | #define CyTxMpty (0x02) | ||
| 87 | #define CyTxRdy (0x01) | ||
| 88 | #define CyLICR (0x26) | ||
| 89 | #define CyRISR (0x89) | ||
| 90 | #define CyTIMEOUT (0x80) | ||
| 91 | #define CySPECHAR (0x70) | ||
| 92 | #define CyOVERRUN (0x08) | ||
| 93 | #define CyPARITY (0x04) | ||
| 94 | #define CyFRAME (0x02) | ||
| 95 | #define CyBREAK (0x01) | ||
| 96 | #define CyREOIR (0x84) | ||
| 97 | #define CyTEOIR (0x85) | ||
| 98 | #define CyMEOIR (0x86) | ||
| 99 | #define CyNOTRANS (0x08) | ||
| 100 | #define CyRFOC (0x30) | ||
| 101 | #define CyRDR (0xf8) | ||
| 102 | #define CyTDR (0xf8) | ||
| 103 | #define CyMISR (0x8b) | ||
| 104 | #define CyRISR (0x89) | ||
| 105 | #define CyTISR (0x8a) | ||
| 106 | #define CyMSVR1 (0xde) | ||
| 107 | #define CyMSVR2 (0xdf) | ||
| 108 | #define CyDSR (0x80) | ||
| 109 | #define CyDCD (0x40) | ||
| 110 | #define CyCTS (0x20) | ||
| 111 | #define CyDTR (0x02) | ||
| 112 | #define CyRTS (0x01) | ||
| 113 | #define CyRTPRL (0x25) | ||
| 114 | #define CyRTPRH (0x24) | ||
| 115 | #define CyCOR1 (0x10) | ||
| 116 | #define CyPARITY_NONE (0x00) | ||
| 117 | #define CyPARITY_E (0x40) | ||
| 118 | #define CyPARITY_O (0xC0) | ||
| 119 | #define Cy_5_BITS (0x04) | ||
| 120 | #define Cy_6_BITS (0x05) | ||
| 121 | #define Cy_7_BITS (0x06) | ||
| 122 | #define Cy_8_BITS (0x07) | ||
| 123 | #define CyCOR2 (0x17) | ||
| 124 | #define CyETC (0x20) | ||
| 125 | #define CyCtsAE (0x02) | ||
| 126 | #define CyCOR3 (0x16) | ||
| 127 | #define Cy_1_STOP (0x02) | ||
| 128 | #define Cy_2_STOP (0x04) | ||
| 129 | #define CyCOR4 (0x15) | ||
| 130 | #define CyREC_FIFO (0x0F) /* Receive FIFO threshold */ | ||
| 131 | #define CyCOR5 (0x14) | ||
| 132 | #define CyCOR6 (0x18) | ||
| 133 | #define CyCOR7 (0x07) | ||
| 134 | #define CyRBPR (0xcb) | ||
| 135 | #define CyRCOR (0xc8) | ||
| 136 | #define CyTBPR (0xc3) | ||
| 137 | #define CyTCOR (0xc0) | ||
| 138 | #define CySCHR1 (0x1f) | ||
| 139 | #define CySCHR2 (0x1e) | ||
| 140 | #define CyTPR (0xda) | ||
| 141 | #define CyPILR1 (0xe3) | ||
| 142 | #define CyPILR2 (0xe0) | ||
| 143 | #define CyPILR3 (0xe1) | ||
| 144 | #define CyCMR (0x1b) | ||
| 145 | #define CyASYNC (0x02) | ||
| 146 | #define CyLICR (0x26) | ||
| 147 | #define CyLIVR (0x09) | ||
| 148 | #define CySCRL (0x23) | ||
| 149 | #define CySCRH (0x22) | ||
| 150 | #define CyTFTC (0x80) | ||
| 151 | |||
| 152 | |||
| 153 | /* max number of chars in the FIFO */ | ||
| 154 | |||
| 155 | #define CyMAX_CHAR_FIFO 12 | ||
| 156 | |||
| 157 | /***************************************************************************/ | ||
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index a416e92012ef..c174c90fb3fb 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h | |||
| @@ -65,11 +65,38 @@ enum { | |||
| 65 | * platform device. Using these will make your driver | 65 | * platform device. Using these will make your driver |
| 66 | * dependent on the 8250 driver. | 66 | * dependent on the 8250 driver. |
| 67 | */ | 67 | */ |
| 68 | struct uart_port; | 68 | |
| 69 | struct uart_8250_port; | 69 | struct uart_8250_port { |
| 70 | struct uart_port port; | ||
| 71 | struct timer_list timer; /* "no irq" timer */ | ||
| 72 | struct list_head list; /* ports on this IRQ */ | ||
| 73 | unsigned short capabilities; /* port capabilities */ | ||
| 74 | unsigned short bugs; /* port bugs */ | ||
| 75 | unsigned int tx_loadsz; /* transmit fifo load size */ | ||
| 76 | unsigned char acr; | ||
| 77 | unsigned char ier; | ||
| 78 | unsigned char lcr; | ||
| 79 | unsigned char mcr; | ||
| 80 | unsigned char mcr_mask; /* mask of user bits */ | ||
| 81 | unsigned char mcr_force; /* mask of forced bits */ | ||
| 82 | unsigned char cur_iotype; /* Running I/O type */ | ||
| 83 | |||
| 84 | /* | ||
| 85 | * Some bits in registers are cleared on a read, so they must | ||
| 86 | * be saved whenever the register is read but the bits will not | ||
| 87 | * be immediately processed. | ||
| 88 | */ | ||
| 89 | #define LSR_SAVE_FLAGS UART_LSR_BRK_ERROR_BITS | ||
| 90 | unsigned char lsr_saved_flags; | ||
| 91 | #define MSR_SAVE_FLAGS UART_MSR_ANY_DELTA | ||
| 92 | unsigned char msr_saved_flags; | ||
| 93 | |||
| 94 | /* 8250 specific callbacks */ | ||
| 95 | int (*dl_read)(struct uart_8250_port *); | ||
| 96 | void (*dl_write)(struct uart_8250_port *, int); | ||
| 97 | }; | ||
| 70 | 98 | ||
| 71 | int serial8250_register_8250_port(struct uart_8250_port *); | 99 | int serial8250_register_8250_port(struct uart_8250_port *); |
| 72 | int serial8250_register_port(struct uart_port *); | ||
| 73 | void serial8250_unregister_port(int line); | 100 | void serial8250_unregister_port(int line); |
| 74 | void serial8250_suspend_port(int line); | 101 | void serial8250_suspend_port(int line); |
| 75 | void serial8250_resume_port(int line); | 102 | void serial8250_resume_port(int line); |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 0253c2022e53..7cf0b68bbe9e 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -193,8 +193,8 @@ | |||
| 193 | /* SH-SCI */ | 193 | /* SH-SCI */ |
| 194 | #define PORT_SCIFB 93 | 194 | #define PORT_SCIFB 93 |
| 195 | 195 | ||
| 196 | /* MAX3107 */ | 196 | /* MAX310X */ |
| 197 | #define PORT_MAX3107 94 | 197 | #define PORT_MAX310X 94 |
| 198 | 198 | ||
| 199 | /* High Speed UART for Medfield */ | 199 | /* High Speed UART for Medfield */ |
| 200 | #define PORT_MFD 95 | 200 | #define PORT_MFD 95 |
diff --git a/include/linux/serial_reg.h b/include/linux/serial_reg.h index 8ce70d76f836..5ed325e88a81 100644 --- a/include/linux/serial_reg.h +++ b/include/linux/serial_reg.h | |||
| @@ -40,6 +40,10 @@ | |||
| 40 | 40 | ||
| 41 | #define UART_IIR_BUSY 0x07 /* DesignWare APB Busy Detect */ | 41 | #define UART_IIR_BUSY 0x07 /* DesignWare APB Busy Detect */ |
| 42 | 42 | ||
| 43 | #define UART_IIR_RX_TIMEOUT 0x0c /* OMAP RX Timeout interrupt */ | ||
| 44 | #define UART_IIR_XOFF 0x10 /* OMAP XOFF/Special Character */ | ||
| 45 | #define UART_IIR_CTS_RTS_DSR 0x20 /* OMAP CTS/RTS/DSR Change */ | ||
| 46 | |||
| 43 | #define UART_FCR 2 /* Out: FIFO Control Register */ | 47 | #define UART_FCR 2 /* Out: FIFO Control Register */ |
| 44 | #define UART_FCR_ENABLE_FIFO 0x01 /* Enable the FIFO */ | 48 | #define UART_FCR_ENABLE_FIFO 0x01 /* Enable the FIFO */ |
| 45 | #define UART_FCR_CLEAR_RCVR 0x02 /* Clear the RCVR FIFO */ | 49 | #define UART_FCR_CLEAR_RCVR 0x02 /* Clear the RCVR FIFO */ |
diff --git a/include/linux/stallion.h b/include/linux/stallion.h deleted file mode 100644 index 336af33c6ea4..000000000000 --- a/include/linux/stallion.h +++ /dev/null | |||
| @@ -1,147 +0,0 @@ | |||
| 1 | /*****************************************************************************/ | ||
| 2 | |||
| 3 | /* | ||
| 4 | * stallion.h -- stallion multiport serial driver. | ||
| 5 | * | ||
| 6 | * Copyright (C) 1996-1998 Stallion Technologies | ||
| 7 | * Copyright (C) 1994-1996 Greg Ungerer. | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License | ||
| 20 | * along with this program; if not, write to the Free Software | ||
| 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 22 | */ | ||
| 23 | |||
| 24 | /*****************************************************************************/ | ||
| 25 | #ifndef _STALLION_H | ||
| 26 | #define _STALLION_H | ||
| 27 | /*****************************************************************************/ | ||
| 28 | |||
| 29 | /* | ||
| 30 | * Define important driver constants here. | ||
| 31 | */ | ||
| 32 | #define STL_MAXBRDS 4 | ||
| 33 | #define STL_MAXPANELS 4 | ||
| 34 | #define STL_MAXBANKS 8 | ||
| 35 | #define STL_PORTSPERPANEL 16 | ||
| 36 | #define STL_MAXPORTS 64 | ||
| 37 | #define STL_MAXDEVS (STL_MAXBRDS * STL_MAXPORTS) | ||
| 38 | |||
| 39 | |||
| 40 | /* | ||
| 41 | * Define a set of structures to hold all the board/panel/port info | ||
| 42 | * for our ports. These will be dynamically allocated as required. | ||
| 43 | */ | ||
| 44 | |||
| 45 | /* | ||
| 46 | * Define a ring queue structure for each port. This will hold the | ||
| 47 | * TX data waiting to be output. Characters are fed into this buffer | ||
| 48 | * from the line discipline (or even direct from user space!) and | ||
| 49 | * then fed into the UARTs during interrupts. Will use a classic ring | ||
| 50 | * queue here for this. The good thing about this type of ring queue | ||
| 51 | * is that the head and tail pointers can be updated without interrupt | ||
| 52 | * protection - since "write" code only needs to change the head, and | ||
| 53 | * interrupt code only needs to change the tail. | ||
| 54 | */ | ||
| 55 | struct stlrq { | ||
| 56 | char *buf; | ||
| 57 | char *head; | ||
| 58 | char *tail; | ||
| 59 | }; | ||
| 60 | |||
| 61 | /* | ||
| 62 | * Port, panel and board structures to hold status info about each. | ||
| 63 | * The board structure contains pointers to structures for each panel | ||
| 64 | * connected to it, and in turn each panel structure contains pointers | ||
| 65 | * for each port structure for each port on that panel. Note that | ||
| 66 | * the port structure also contains the board and panel number that it | ||
| 67 | * is associated with, this makes it (fairly) easy to get back to the | ||
| 68 | * board/panel info for a port. | ||
| 69 | */ | ||
| 70 | struct stlport { | ||
| 71 | unsigned long magic; | ||
| 72 | struct tty_port port; | ||
| 73 | unsigned int portnr; | ||
| 74 | unsigned int panelnr; | ||
| 75 | unsigned int brdnr; | ||
| 76 | int ioaddr; | ||
| 77 | int uartaddr; | ||
| 78 | unsigned int pagenr; | ||
| 79 | unsigned long istate; | ||
| 80 | int baud_base; | ||
| 81 | int custom_divisor; | ||
| 82 | int close_delay; | ||
| 83 | int closing_wait; | ||
| 84 | int openwaitcnt; | ||
| 85 | int brklen; | ||
| 86 | unsigned int sigs; | ||
| 87 | unsigned int rxignoremsk; | ||
| 88 | unsigned int rxmarkmsk; | ||
| 89 | unsigned int imr; | ||
| 90 | unsigned int crenable; | ||
| 91 | unsigned long clk; | ||
| 92 | unsigned long hwid; | ||
| 93 | void *uartp; | ||
| 94 | comstats_t stats; | ||
| 95 | struct stlrq tx; | ||
| 96 | }; | ||
| 97 | |||
| 98 | struct stlpanel { | ||
| 99 | unsigned long magic; | ||
| 100 | unsigned int panelnr; | ||
| 101 | unsigned int brdnr; | ||
| 102 | unsigned int pagenr; | ||
| 103 | unsigned int nrports; | ||
| 104 | int iobase; | ||
| 105 | void *uartp; | ||
| 106 | void (*isr)(struct stlpanel *panelp, unsigned int iobase); | ||
| 107 | unsigned int hwid; | ||
| 108 | unsigned int ackmask; | ||
| 109 | struct stlport *ports[STL_PORTSPERPANEL]; | ||
| 110 | }; | ||
| 111 | |||
| 112 | struct stlbrd { | ||
| 113 | unsigned long magic; | ||
| 114 | unsigned int brdnr; | ||
| 115 | unsigned int brdtype; | ||
| 116 | unsigned int state; | ||
| 117 | unsigned int nrpanels; | ||
| 118 | unsigned int nrports; | ||
| 119 | unsigned int nrbnks; | ||
| 120 | int irq; | ||
| 121 | int irqtype; | ||
| 122 | int (*isr)(struct stlbrd *brdp); | ||
| 123 | unsigned int ioaddr1; | ||
| 124 | unsigned int ioaddr2; | ||
| 125 | unsigned int iosize1; | ||
| 126 | unsigned int iosize2; | ||
| 127 | unsigned int iostatus; | ||
| 128 | unsigned int ioctrl; | ||
| 129 | unsigned int ioctrlval; | ||
| 130 | unsigned int hwid; | ||
| 131 | unsigned long clk; | ||
| 132 | unsigned int bnkpageaddr[STL_MAXBANKS]; | ||
| 133 | unsigned int bnkstataddr[STL_MAXBANKS]; | ||
| 134 | struct stlpanel *bnk2panel[STL_MAXBANKS]; | ||
| 135 | struct stlpanel *panels[STL_MAXPANELS]; | ||
| 136 | }; | ||
| 137 | |||
| 138 | |||
| 139 | /* | ||
| 140 | * Define MAGIC numbers used for above structures. | ||
| 141 | */ | ||
| 142 | #define STL_PORTMAGIC 0x5a7182c9 | ||
| 143 | #define STL_PANELMAGIC 0x7ef621a1 | ||
| 144 | #define STL_BOARDMAGIC 0xa2267f52 | ||
| 145 | |||
| 146 | /*****************************************************************************/ | ||
| 147 | #endif | ||
diff --git a/include/linux/string.h b/include/linux/string.h index ffe0442e18d2..b9178812d9df 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
| @@ -144,8 +144,8 @@ static inline bool strstarts(const char *str, const char *prefix) | |||
| 144 | { | 144 | { |
| 145 | return strncmp(str, prefix, strlen(prefix)) == 0; | 145 | return strncmp(str, prefix, strlen(prefix)) == 0; |
| 146 | } | 146 | } |
| 147 | #endif | ||
| 148 | 147 | ||
| 149 | extern size_t memweight(const void *ptr, size_t bytes); | 148 | extern size_t memweight(const void *ptr, size_t bytes); |
| 150 | 149 | ||
| 150 | #endif /* __KERNEL__ */ | ||
| 151 | #endif /* _LINUX_STRING_H_ */ | 151 | #endif /* _LINUX_STRING_H_ */ |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index cff40aa7db62..bf8c49ff7530 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -114,6 +114,7 @@ struct rpc_xprt_ops { | |||
| 114 | void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); | 114 | void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); |
| 115 | int (*reserve_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); | 115 | int (*reserve_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); |
| 116 | void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); | 116 | void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); |
| 117 | void (*alloc_slot)(struct rpc_xprt *xprt, struct rpc_task *task); | ||
| 117 | void (*rpcbind)(struct rpc_task *task); | 118 | void (*rpcbind)(struct rpc_task *task); |
| 118 | void (*set_port)(struct rpc_xprt *xprt, unsigned short port); | 119 | void (*set_port)(struct rpc_xprt *xprt, unsigned short port); |
| 119 | void (*connect)(struct rpc_task *task); | 120 | void (*connect)(struct rpc_task *task); |
| @@ -281,6 +282,8 @@ void xprt_connect(struct rpc_task *task); | |||
| 281 | void xprt_reserve(struct rpc_task *task); | 282 | void xprt_reserve(struct rpc_task *task); |
| 282 | int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task); | 283 | int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task); |
| 283 | int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); | 284 | int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); |
| 285 | void xprt_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task); | ||
| 286 | void xprt_lock_and_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task); | ||
| 284 | int xprt_prepare_transmit(struct rpc_task *task); | 287 | int xprt_prepare_transmit(struct rpc_task *task); |
| 285 | void xprt_transmit(struct rpc_task *task); | 288 | void xprt_transmit(struct rpc_task *task); |
| 286 | void xprt_end_transmit(struct rpc_task *task); | 289 | void xprt_end_transmit(struct rpc_task *task); |
diff --git a/include/linux/time.h b/include/linux/time.h index c81c5e40fcb5..b51e664c83e7 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
| @@ -107,11 +107,36 @@ static inline struct timespec timespec_sub(struct timespec lhs, | |||
| 107 | return ts_delta; | 107 | return ts_delta; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | #define KTIME_MAX ((s64)~((u64)1 << 63)) | ||
| 111 | #if (BITS_PER_LONG == 64) | ||
| 112 | # define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) | ||
| 113 | #else | ||
| 114 | # define KTIME_SEC_MAX LONG_MAX | ||
| 115 | #endif | ||
| 116 | |||
| 110 | /* | 117 | /* |
| 111 | * Returns true if the timespec is norm, false if denorm: | 118 | * Returns true if the timespec is norm, false if denorm: |
| 112 | */ | 119 | */ |
| 113 | #define timespec_valid(ts) \ | 120 | static inline bool timespec_valid(const struct timespec *ts) |
| 114 | (((ts)->tv_sec >= 0) && (((unsigned long) (ts)->tv_nsec) < NSEC_PER_SEC)) | 121 | { |
| 122 | /* Dates before 1970 are bogus */ | ||
| 123 | if (ts->tv_sec < 0) | ||
| 124 | return false; | ||
| 125 | /* Can't have more nanoseconds then a second */ | ||
| 126 | if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) | ||
| 127 | return false; | ||
| 128 | return true; | ||
| 129 | } | ||
| 130 | |||
| 131 | static inline bool timespec_valid_strict(const struct timespec *ts) | ||
| 132 | { | ||
| 133 | if (!timespec_valid(ts)) | ||
| 134 | return false; | ||
| 135 | /* Disallow values that could overflow ktime_t */ | ||
| 136 | if ((unsigned long long)ts->tv_sec >= KTIME_SEC_MAX) | ||
| 137 | return false; | ||
| 138 | return true; | ||
| 139 | } | ||
| 115 | 140 | ||
| 116 | extern void read_persistent_clock(struct timespec *ts); | 141 | extern void read_persistent_clock(struct timespec *ts); |
| 117 | extern void read_boot_clock(struct timespec *ts); | 142 | extern void read_boot_clock(struct timespec *ts); |
diff --git a/include/linux/timex.h b/include/linux/timex.h index 99bc88b1fc02..7c5ceb20e03a 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
| @@ -232,7 +232,7 @@ struct timex { | |||
| 232 | * estimated error = NTP dispersion. | 232 | * estimated error = NTP dispersion. |
| 233 | */ | 233 | */ |
| 234 | extern unsigned long tick_usec; /* USER_HZ period (usec) */ | 234 | extern unsigned long tick_usec; /* USER_HZ period (usec) */ |
| 235 | extern unsigned long tick_nsec; /* ACTHZ period (nsec) */ | 235 | extern unsigned long tick_nsec; /* SHIFTED_HZ period (nsec) */ |
| 236 | 236 | ||
| 237 | extern void ntp_init(void); | 237 | extern void ntp_init(void); |
| 238 | extern void ntp_clear(void); | 238 | extern void ntp_clear(void); |
diff --git a/include/linux/topology.h b/include/linux/topology.h index e91cd43394df..fec12d667211 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
| @@ -164,6 +164,7 @@ int arch_update_cpu_topology(void); | |||
| 164 | | 0*SD_SHARE_CPUPOWER \ | 164 | | 0*SD_SHARE_CPUPOWER \ |
| 165 | | 0*SD_SHARE_PKG_RESOURCES \ | 165 | | 0*SD_SHARE_PKG_RESOURCES \ |
| 166 | | 0*SD_SERIALIZE \ | 166 | | 0*SD_SERIALIZE \ |
| 167 | | 1*SD_PREFER_SIBLING \ | ||
| 167 | , \ | 168 | , \ |
| 168 | .last_balance = jiffies, \ | 169 | .last_balance = jiffies, \ |
| 169 | .balance_interval = 1, \ | 170 | .balance_interval = 1, \ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 9f47ab540f65..1509b86825d8 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -43,6 +43,7 @@ | |||
| 43 | #include <linux/tty_driver.h> | 43 | #include <linux/tty_driver.h> |
| 44 | #include <linux/tty_ldisc.h> | 44 | #include <linux/tty_ldisc.h> |
| 45 | #include <linux/mutex.h> | 45 | #include <linux/mutex.h> |
| 46 | #include <linux/tty_flags.h> | ||
| 46 | 47 | ||
| 47 | 48 | ||
| 48 | 49 | ||
| @@ -103,28 +104,28 @@ struct tty_bufhead { | |||
| 103 | #define TTY_PARITY 3 | 104 | #define TTY_PARITY 3 |
| 104 | #define TTY_OVERRUN 4 | 105 | #define TTY_OVERRUN 4 |
| 105 | 106 | ||
| 106 | #define INTR_CHAR(tty) ((tty)->termios->c_cc[VINTR]) | 107 | #define INTR_CHAR(tty) ((tty)->termios.c_cc[VINTR]) |
| 107 | #define QUIT_CHAR(tty) ((tty)->termios->c_cc[VQUIT]) | 108 | #define QUIT_CHAR(tty) ((tty)->termios.c_cc[VQUIT]) |
| 108 | #define ERASE_CHAR(tty) ((tty)->termios->c_cc[VERASE]) | 109 | #define ERASE_CHAR(tty) ((tty)->termios.c_cc[VERASE]) |
| 109 | #define KILL_CHAR(tty) ((tty)->termios->c_cc[VKILL]) | 110 | #define KILL_CHAR(tty) ((tty)->termios.c_cc[VKILL]) |
| 110 | #define EOF_CHAR(tty) ((tty)->termios->c_cc[VEOF]) | 111 | #define EOF_CHAR(tty) ((tty)->termios.c_cc[VEOF]) |
| 111 | #define TIME_CHAR(tty) ((tty)->termios->c_cc[VTIME]) | 112 | #define TIME_CHAR(tty) ((tty)->termios.c_cc[VTIME]) |
| 112 | #define MIN_CHAR(tty) ((tty)->termios->c_cc[VMIN]) | 113 | #define MIN_CHAR(tty) ((tty)->termios.c_cc[VMIN]) |
| 113 | #define SWTC_CHAR(tty) ((tty)->termios->c_cc[VSWTC]) | 114 | #define SWTC_CHAR(tty) ((tty)->termios.c_cc[VSWTC]) |
| 114 | #define START_CHAR(tty) ((tty)->termios->c_cc[VSTART]) | 115 | #define START_CHAR(tty) ((tty)->termios.c_cc[VSTART]) |
| 115 | #define STOP_CHAR(tty) ((tty)->termios->c_cc[VSTOP]) | 116 | #define STOP_CHAR(tty) ((tty)->termios.c_cc[VSTOP]) |
| 116 | #define SUSP_CHAR(tty) ((tty)->termios->c_cc[VSUSP]) | 117 | #define SUSP_CHAR(tty) ((tty)->termios.c_cc[VSUSP]) |
| 117 | #define EOL_CHAR(tty) ((tty)->termios->c_cc[VEOL]) | 118 | #define EOL_CHAR(tty) ((tty)->termios.c_cc[VEOL]) |
| 118 | #define REPRINT_CHAR(tty) ((tty)->termios->c_cc[VREPRINT]) | 119 | #define REPRINT_CHAR(tty) ((tty)->termios.c_cc[VREPRINT]) |
| 119 | #define DISCARD_CHAR(tty) ((tty)->termios->c_cc[VDISCARD]) | 120 | #define DISCARD_CHAR(tty) ((tty)->termios.c_cc[VDISCARD]) |
| 120 | #define WERASE_CHAR(tty) ((tty)->termios->c_cc[VWERASE]) | 121 | #define WERASE_CHAR(tty) ((tty)->termios.c_cc[VWERASE]) |
| 121 | #define LNEXT_CHAR(tty) ((tty)->termios->c_cc[VLNEXT]) | 122 | #define LNEXT_CHAR(tty) ((tty)->termios.c_cc[VLNEXT]) |
| 122 | #define EOL2_CHAR(tty) ((tty)->termios->c_cc[VEOL2]) | 123 | #define EOL2_CHAR(tty) ((tty)->termios.c_cc[VEOL2]) |
| 123 | 124 | ||
| 124 | #define _I_FLAG(tty, f) ((tty)->termios->c_iflag & (f)) | 125 | #define _I_FLAG(tty, f) ((tty)->termios.c_iflag & (f)) |
| 125 | #define _O_FLAG(tty, f) ((tty)->termios->c_oflag & (f)) | 126 | #define _O_FLAG(tty, f) ((tty)->termios.c_oflag & (f)) |
| 126 | #define _C_FLAG(tty, f) ((tty)->termios->c_cflag & (f)) | 127 | #define _C_FLAG(tty, f) ((tty)->termios.c_cflag & (f)) |
| 127 | #define _L_FLAG(tty, f) ((tty)->termios->c_lflag & (f)) | 128 | #define _L_FLAG(tty, f) ((tty)->termios.c_lflag & (f)) |
| 128 | 129 | ||
| 129 | #define I_IGNBRK(tty) _I_FLAG((tty), IGNBRK) | 130 | #define I_IGNBRK(tty) _I_FLAG((tty), IGNBRK) |
| 130 | #define I_BRKINT(tty) _I_FLAG((tty), BRKINT) | 131 | #define I_BRKINT(tty) _I_FLAG((tty), BRKINT) |
| @@ -268,10 +269,11 @@ struct tty_struct { | |||
| 268 | struct mutex ldisc_mutex; | 269 | struct mutex ldisc_mutex; |
| 269 | struct tty_ldisc *ldisc; | 270 | struct tty_ldisc *ldisc; |
| 270 | 271 | ||
| 272 | struct mutex legacy_mutex; | ||
| 271 | struct mutex termios_mutex; | 273 | struct mutex termios_mutex; |
| 272 | spinlock_t ctrl_lock; | 274 | spinlock_t ctrl_lock; |
| 273 | /* Termios values are protected by the termios mutex */ | 275 | /* Termios values are protected by the termios mutex */ |
| 274 | struct ktermios *termios, *termios_locked; | 276 | struct ktermios termios, termios_locked; |
| 275 | struct termiox *termiox; /* May be NULL for unsupported */ | 277 | struct termiox *termiox; /* May be NULL for unsupported */ |
| 276 | char name[64]; | 278 | char name[64]; |
| 277 | struct pid *pgrp; /* Protected by ctrl lock */ | 279 | struct pid *pgrp; /* Protected by ctrl lock */ |
| @@ -410,6 +412,10 @@ extern int tty_register_driver(struct tty_driver *driver); | |||
| 410 | extern int tty_unregister_driver(struct tty_driver *driver); | 412 | extern int tty_unregister_driver(struct tty_driver *driver); |
| 411 | extern struct device *tty_register_device(struct tty_driver *driver, | 413 | extern struct device *tty_register_device(struct tty_driver *driver, |
| 412 | unsigned index, struct device *dev); | 414 | unsigned index, struct device *dev); |
| 415 | extern struct device *tty_register_device_attr(struct tty_driver *driver, | ||
| 416 | unsigned index, struct device *device, | ||
| 417 | void *drvdata, | ||
| 418 | const struct attribute_group **attr_grp); | ||
| 413 | extern void tty_unregister_device(struct tty_driver *driver, unsigned index); | 419 | extern void tty_unregister_device(struct tty_driver *driver, unsigned index); |
| 414 | extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, | 420 | extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, |
| 415 | int buflen); | 421 | int buflen); |
| @@ -423,7 +429,6 @@ extern void tty_unthrottle(struct tty_struct *tty); | |||
| 423 | extern int tty_do_resize(struct tty_struct *tty, struct winsize *ws); | 429 | extern int tty_do_resize(struct tty_struct *tty, struct winsize *ws); |
| 424 | extern void tty_driver_remove_tty(struct tty_driver *driver, | 430 | extern void tty_driver_remove_tty(struct tty_driver *driver, |
| 425 | struct tty_struct *tty); | 431 | struct tty_struct *tty); |
| 426 | extern void tty_shutdown(struct tty_struct *tty); | ||
| 427 | extern void tty_free_termios(struct tty_struct *tty); | 432 | extern void tty_free_termios(struct tty_struct *tty); |
| 428 | extern int is_current_pgrp_orphaned(void); | 433 | extern int is_current_pgrp_orphaned(void); |
| 429 | extern struct pid *tty_get_pgrp(struct tty_struct *tty); | 434 | extern struct pid *tty_get_pgrp(struct tty_struct *tty); |
| @@ -497,6 +502,15 @@ extern int tty_write_lock(struct tty_struct *tty, int ndelay); | |||
| 497 | #define tty_is_writelocked(tty) (mutex_is_locked(&tty->atomic_write_lock)) | 502 | #define tty_is_writelocked(tty) (mutex_is_locked(&tty->atomic_write_lock)) |
| 498 | 503 | ||
| 499 | extern void tty_port_init(struct tty_port *port); | 504 | extern void tty_port_init(struct tty_port *port); |
| 505 | extern void tty_port_link_device(struct tty_port *port, | ||
| 506 | struct tty_driver *driver, unsigned index); | ||
| 507 | extern struct device *tty_port_register_device(struct tty_port *port, | ||
| 508 | struct tty_driver *driver, unsigned index, | ||
| 509 | struct device *device); | ||
| 510 | extern struct device *tty_port_register_device_attr(struct tty_port *port, | ||
| 511 | struct tty_driver *driver, unsigned index, | ||
| 512 | struct device *device, void *drvdata, | ||
| 513 | const struct attribute_group **attr_grp); | ||
| 500 | extern int tty_port_alloc_xmit_buf(struct tty_port *port); | 514 | extern int tty_port_alloc_xmit_buf(struct tty_port *port); |
| 501 | extern void tty_port_free_xmit_buf(struct tty_port *port); | 515 | extern void tty_port_free_xmit_buf(struct tty_port *port); |
| 502 | extern void tty_port_put(struct tty_port *port); | 516 | extern void tty_port_put(struct tty_port *port); |
| @@ -508,6 +522,12 @@ static inline struct tty_port *tty_port_get(struct tty_port *port) | |||
| 508 | return port; | 522 | return port; |
| 509 | } | 523 | } |
| 510 | 524 | ||
| 525 | /* If the cts flow control is enabled, return true. */ | ||
| 526 | static inline bool tty_port_cts_enabled(struct tty_port *port) | ||
| 527 | { | ||
| 528 | return port->flags & ASYNC_CTS_FLOW; | ||
| 529 | } | ||
| 530 | |||
| 511 | extern struct tty_struct *tty_port_tty_get(struct tty_port *port); | 531 | extern struct tty_struct *tty_port_tty_get(struct tty_port *port); |
| 512 | extern void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty); | 532 | extern void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty); |
| 513 | extern int tty_port_carrier_raised(struct tty_port *port); | 533 | extern int tty_port_carrier_raised(struct tty_port *port); |
| @@ -521,6 +541,8 @@ extern int tty_port_close_start(struct tty_port *port, | |||
| 521 | extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty); | 541 | extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty); |
| 522 | extern void tty_port_close(struct tty_port *port, | 542 | extern void tty_port_close(struct tty_port *port, |
| 523 | struct tty_struct *tty, struct file *filp); | 543 | struct tty_struct *tty, struct file *filp); |
| 544 | extern int tty_port_install(struct tty_port *port, struct tty_driver *driver, | ||
| 545 | struct tty_struct *tty); | ||
| 524 | extern int tty_port_open(struct tty_port *port, | 546 | extern int tty_port_open(struct tty_port *port, |
| 525 | struct tty_struct *tty, struct file *filp); | 547 | struct tty_struct *tty, struct file *filp); |
| 526 | static inline int tty_port_users(struct tty_port *port) | 548 | static inline int tty_port_users(struct tty_port *port) |
| @@ -605,8 +627,12 @@ extern long vt_compat_ioctl(struct tty_struct *tty, | |||
| 605 | 627 | ||
| 606 | /* tty_mutex.c */ | 628 | /* tty_mutex.c */ |
| 607 | /* functions for preparation of BKL removal */ | 629 | /* functions for preparation of BKL removal */ |
| 608 | extern void __lockfunc tty_lock(void) __acquires(tty_lock); | 630 | extern void __lockfunc tty_lock(struct tty_struct *tty); |
| 609 | extern void __lockfunc tty_unlock(void) __releases(tty_lock); | 631 | extern void __lockfunc tty_unlock(struct tty_struct *tty); |
| 632 | extern void __lockfunc tty_lock_pair(struct tty_struct *tty, | ||
| 633 | struct tty_struct *tty2); | ||
| 634 | extern void __lockfunc tty_unlock_pair(struct tty_struct *tty, | ||
| 635 | struct tty_struct *tty2); | ||
| 610 | 636 | ||
| 611 | /* | 637 | /* |
| 612 | * this shall be called only from where BTM is held (like close) | 638 | * this shall be called only from where BTM is held (like close) |
| @@ -621,9 +647,9 @@ extern void __lockfunc tty_unlock(void) __releases(tty_lock); | |||
| 621 | static inline void tty_wait_until_sent_from_close(struct tty_struct *tty, | 647 | static inline void tty_wait_until_sent_from_close(struct tty_struct *tty, |
| 622 | long timeout) | 648 | long timeout) |
| 623 | { | 649 | { |
| 624 | tty_unlock(); /* tty->ops->close holds the BTM, drop it while waiting */ | 650 | tty_unlock(tty); /* tty->ops->close holds the BTM, drop it while waiting */ |
| 625 | tty_wait_until_sent(tty, timeout); | 651 | tty_wait_until_sent(tty, timeout); |
| 626 | tty_lock(); | 652 | tty_lock(tty); |
| 627 | } | 653 | } |
| 628 | 654 | ||
| 629 | /* | 655 | /* |
| @@ -638,16 +664,16 @@ static inline void tty_wait_until_sent_from_close(struct tty_struct *tty, | |||
| 638 | * | 664 | * |
| 639 | * Do not use in new code. | 665 | * Do not use in new code. |
| 640 | */ | 666 | */ |
| 641 | #define wait_event_interruptible_tty(wq, condition) \ | 667 | #define wait_event_interruptible_tty(tty, wq, condition) \ |
| 642 | ({ \ | 668 | ({ \ |
| 643 | int __ret = 0; \ | 669 | int __ret = 0; \ |
| 644 | if (!(condition)) { \ | 670 | if (!(condition)) { \ |
| 645 | __wait_event_interruptible_tty(wq, condition, __ret); \ | 671 | __wait_event_interruptible_tty(tty, wq, condition, __ret); \ |
| 646 | } \ | 672 | } \ |
| 647 | __ret; \ | 673 | __ret; \ |
| 648 | }) | 674 | }) |
| 649 | 675 | ||
| 650 | #define __wait_event_interruptible_tty(wq, condition, ret) \ | 676 | #define __wait_event_interruptible_tty(tty, wq, condition, ret) \ |
| 651 | do { \ | 677 | do { \ |
| 652 | DEFINE_WAIT(__wait); \ | 678 | DEFINE_WAIT(__wait); \ |
| 653 | \ | 679 | \ |
| @@ -656,9 +682,9 @@ do { \ | |||
| 656 | if (condition) \ | 682 | if (condition) \ |
| 657 | break; \ | 683 | break; \ |
| 658 | if (!signal_pending(current)) { \ | 684 | if (!signal_pending(current)) { \ |
| 659 | tty_unlock(); \ | 685 | tty_unlock(tty); \ |
| 660 | schedule(); \ | 686 | schedule(); \ |
| 661 | tty_lock(); \ | 687 | tty_lock(tty); \ |
| 662 | continue; \ | 688 | continue; \ |
| 663 | } \ | 689 | } \ |
| 664 | ret = -ERESTARTSYS; \ | 690 | ret = -ERESTARTSYS; \ |
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 6e6dbb7447b6..dd976cfb6131 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
| @@ -45,14 +45,9 @@ | |||
| 45 | * | 45 | * |
| 46 | * void (*shutdown)(struct tty_struct * tty); | 46 | * void (*shutdown)(struct tty_struct * tty); |
| 47 | * | 47 | * |
| 48 | * This routine is called synchronously when a particular tty device | 48 | * This routine is called under the tty lock when a particular tty device |
| 49 | * is closed for the last time freeing up the resources. | 49 | * is closed for the last time. It executes before the tty resources |
| 50 | * Note that tty_shutdown() is not called if ops->shutdown is defined. | 50 | * are freed so may execute while another function holds a tty kref. |
| 51 | * This means one is responsible to take care of calling ops->remove (e.g. | ||
| 52 | * via tty_driver_remove_tty) and releasing tty->termios. | ||
| 53 | * Note that this hook may be called from *all* the contexts where one | ||
| 54 | * uses tty refcounting (e.g. tty_port_tty_get). | ||
| 55 | * | ||
| 56 | * | 51 | * |
| 57 | * void (*cleanup)(struct tty_struct * tty); | 52 | * void (*cleanup)(struct tty_struct * tty); |
| 58 | * | 53 | * |
| @@ -294,18 +289,18 @@ struct tty_operations { | |||
| 294 | struct tty_driver { | 289 | struct tty_driver { |
| 295 | int magic; /* magic number for this structure */ | 290 | int magic; /* magic number for this structure */ |
| 296 | struct kref kref; /* Reference management */ | 291 | struct kref kref; /* Reference management */ |
| 297 | struct cdev cdev; | 292 | struct cdev *cdevs; |
| 298 | struct module *owner; | 293 | struct module *owner; |
| 299 | const char *driver_name; | 294 | const char *driver_name; |
| 300 | const char *name; | 295 | const char *name; |
| 301 | int name_base; /* offset of printed name */ | 296 | int name_base; /* offset of printed name */ |
| 302 | int major; /* major device number */ | 297 | int major; /* major device number */ |
| 303 | int minor_start; /* start of minor device number */ | 298 | int minor_start; /* start of minor device number */ |
| 304 | int num; /* number of devices allocated */ | 299 | unsigned int num; /* number of devices allocated */ |
| 305 | short type; /* type of tty driver */ | 300 | short type; /* type of tty driver */ |
| 306 | short subtype; /* subtype of tty driver */ | 301 | short subtype; /* subtype of tty driver */ |
| 307 | struct ktermios init_termios; /* Initial termios */ | 302 | struct ktermios init_termios; /* Initial termios */ |
| 308 | int flags; /* tty driver flags */ | 303 | unsigned long flags; /* tty driver flags */ |
| 309 | struct proc_dir_entry *proc_entry; /* /proc fs entry */ | 304 | struct proc_dir_entry *proc_entry; /* /proc fs entry */ |
| 310 | struct tty_driver *other; /* only used for the PTY driver */ | 305 | struct tty_driver *other; /* only used for the PTY driver */ |
| 311 | 306 | ||
| @@ -313,6 +308,7 @@ struct tty_driver { | |||
| 313 | * Pointer to the tty data structures | 308 | * Pointer to the tty data structures |
| 314 | */ | 309 | */ |
| 315 | struct tty_struct **ttys; | 310 | struct tty_struct **ttys; |
| 311 | struct tty_port **ports; | ||
| 316 | struct ktermios **termios; | 312 | struct ktermios **termios; |
| 317 | void *driver_state; | 313 | void *driver_state; |
| 318 | 314 | ||
| @@ -326,7 +322,8 @@ struct tty_driver { | |||
| 326 | 322 | ||
| 327 | extern struct list_head tty_drivers; | 323 | extern struct list_head tty_drivers; |
| 328 | 324 | ||
| 329 | extern struct tty_driver *__alloc_tty_driver(int lines, struct module *owner); | 325 | extern struct tty_driver *__tty_alloc_driver(unsigned int lines, |
| 326 | struct module *owner, unsigned long flags); | ||
| 330 | extern void put_tty_driver(struct tty_driver *driver); | 327 | extern void put_tty_driver(struct tty_driver *driver); |
| 331 | extern void tty_set_operations(struct tty_driver *driver, | 328 | extern void tty_set_operations(struct tty_driver *driver, |
| 332 | const struct tty_operations *op); | 329 | const struct tty_operations *op); |
| @@ -334,7 +331,21 @@ extern struct tty_driver *tty_find_polling_driver(char *name, int *line); | |||
| 334 | 331 | ||
| 335 | extern void tty_driver_kref_put(struct tty_driver *driver); | 332 | extern void tty_driver_kref_put(struct tty_driver *driver); |
| 336 | 333 | ||
| 337 | #define alloc_tty_driver(lines) __alloc_tty_driver(lines, THIS_MODULE) | 334 | /* Use TTY_DRIVER_* flags below */ |
| 335 | #define tty_alloc_driver(lines, flags) \ | ||
| 336 | __tty_alloc_driver(lines, THIS_MODULE, flags) | ||
| 337 | |||
| 338 | /* | ||
| 339 | * DEPRECATED Do not use this in new code, use tty_alloc_driver instead. | ||
| 340 | * (And change the return value checks.) | ||
| 341 | */ | ||
| 342 | static inline struct tty_driver *alloc_tty_driver(unsigned int lines) | ||
| 343 | { | ||
| 344 | struct tty_driver *ret = tty_alloc_driver(lines, 0); | ||
| 345 | if (IS_ERR(ret)) | ||
| 346 | return NULL; | ||
| 347 | return ret; | ||
| 348 | } | ||
| 338 | 349 | ||
| 339 | static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d) | 350 | static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d) |
| 340 | { | 351 | { |
| @@ -380,6 +391,14 @@ static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d) | |||
| 380 | * the requested timeout to the caller instead of using a simple | 391 | * the requested timeout to the caller instead of using a simple |
| 381 | * on/off interface. | 392 | * on/off interface. |
| 382 | * | 393 | * |
| 394 | * TTY_DRIVER_DYNAMIC_ALLOC -- do not allocate structures which are | ||
| 395 | * needed per line for this driver as it would waste memory. | ||
| 396 | * The driver will take care. | ||
| 397 | * | ||
| 398 | * TTY_DRIVER_UNNUMBERED_NODE -- do not create numbered /dev nodes. In | ||
| 399 | * other words create /dev/ttyprintk and not /dev/ttyprintk0. | ||
| 400 | * Applicable only when a driver for a single tty device is | ||
| 401 | * being allocated. | ||
| 383 | */ | 402 | */ |
| 384 | #define TTY_DRIVER_INSTALLED 0x0001 | 403 | #define TTY_DRIVER_INSTALLED 0x0001 |
| 385 | #define TTY_DRIVER_RESET_TERMIOS 0x0002 | 404 | #define TTY_DRIVER_RESET_TERMIOS 0x0002 |
| @@ -387,6 +406,8 @@ static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d) | |||
| 387 | #define TTY_DRIVER_DYNAMIC_DEV 0x0008 | 406 | #define TTY_DRIVER_DYNAMIC_DEV 0x0008 |
| 388 | #define TTY_DRIVER_DEVPTS_MEM 0x0010 | 407 | #define TTY_DRIVER_DEVPTS_MEM 0x0010 |
| 389 | #define TTY_DRIVER_HARDWARE_BREAK 0x0020 | 408 | #define TTY_DRIVER_HARDWARE_BREAK 0x0020 |
| 409 | #define TTY_DRIVER_DYNAMIC_ALLOC 0x0040 | ||
| 410 | #define TTY_DRIVER_UNNUMBERED_NODE 0x0080 | ||
| 390 | 411 | ||
| 391 | /* tty driver types */ | 412 | /* tty driver types */ |
| 392 | #define TTY_DRIVER_TYPE_SYSTEM 0x0001 | 413 | #define TTY_DRIVER_TYPE_SYSTEM 0x0001 |
diff --git a/include/linux/tty_flags.h b/include/linux/tty_flags.h new file mode 100644 index 000000000000..eefcb483a2c0 --- /dev/null +++ b/include/linux/tty_flags.h | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | #ifndef _LINUX_TTY_FLAGS_H | ||
| 2 | #define _LINUX_TTY_FLAGS_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * Definitions for async_struct (and serial_struct) flags field also | ||
| 6 | * shared by the tty_port flags structures. | ||
| 7 | * | ||
| 8 | * Define ASYNCB_* for convenient use with {test,set,clear}_bit. | ||
| 9 | */ | ||
| 10 | #define ASYNCB_HUP_NOTIFY 0 /* Notify getty on hangups and closes | ||
| 11 | * on the callout port */ | ||
| 12 | #define ASYNCB_FOURPORT 1 /* Set OU1, OUT2 per AST Fourport settings */ | ||
| 13 | #define ASYNCB_SAK 2 /* Secure Attention Key (Orange book) */ | ||
| 14 | #define ASYNCB_SPLIT_TERMIOS 3 /* Separate termios for dialin/callout */ | ||
| 15 | #define ASYNCB_SPD_HI 4 /* Use 56000 instead of 38400 bps */ | ||
| 16 | #define ASYNCB_SPD_VHI 5 /* Use 115200 instead of 38400 bps */ | ||
| 17 | #define ASYNCB_SKIP_TEST 6 /* Skip UART test during autoconfiguration */ | ||
| 18 | #define ASYNCB_AUTO_IRQ 7 /* Do automatic IRQ during | ||
| 19 | * autoconfiguration */ | ||
| 20 | #define ASYNCB_SESSION_LOCKOUT 8 /* Lock out cua opens based on session */ | ||
| 21 | #define ASYNCB_PGRP_LOCKOUT 9 /* Lock out cua opens based on pgrp */ | ||
| 22 | #define ASYNCB_CALLOUT_NOHUP 10 /* Don't do hangups for cua device */ | ||
| 23 | #define ASYNCB_HARDPPS_CD 11 /* Call hardpps when CD goes high */ | ||
| 24 | #define ASYNCB_SPD_SHI 12 /* Use 230400 instead of 38400 bps */ | ||
| 25 | #define ASYNCB_LOW_LATENCY 13 /* Request low latency behaviour */ | ||
| 26 | #define ASYNCB_BUGGY_UART 14 /* This is a buggy UART, skip some safety | ||
| 27 | * checks. Note: can be dangerous! */ | ||
| 28 | #define ASYNCB_AUTOPROBE 15 /* Port was autoprobed by PCI or PNP code */ | ||
| 29 | #define ASYNCB_LAST_USER 15 | ||
| 30 | |||
| 31 | /* Internal flags used only by kernel */ | ||
| 32 | #define ASYNCB_INITIALIZED 31 /* Serial port was initialized */ | ||
| 33 | #define ASYNCB_SUSPENDED 30 /* Serial port is suspended */ | ||
| 34 | #define ASYNCB_NORMAL_ACTIVE 29 /* Normal device is active */ | ||
| 35 | #define ASYNCB_BOOT_AUTOCONF 28 /* Autoconfigure port on bootup */ | ||
| 36 | #define ASYNCB_CLOSING 27 /* Serial port is closing */ | ||
| 37 | #define ASYNCB_CTS_FLOW 26 /* Do CTS flow control */ | ||
| 38 | #define ASYNCB_CHECK_CD 25 /* i.e., CLOCAL */ | ||
| 39 | #define ASYNCB_SHARE_IRQ 24 /* for multifunction cards, no longer used */ | ||
| 40 | #define ASYNCB_CONS_FLOW 23 /* flow control for console */ | ||
| 41 | #define ASYNCB_FIRST_KERNEL 22 | ||
| 42 | |||
| 43 | #define ASYNC_HUP_NOTIFY (1U << ASYNCB_HUP_NOTIFY) | ||
| 44 | #define ASYNC_SUSPENDED (1U << ASYNCB_SUSPENDED) | ||
| 45 | #define ASYNC_FOURPORT (1U << ASYNCB_FOURPORT) | ||
| 46 | #define ASYNC_SAK (1U << ASYNCB_SAK) | ||
| 47 | #define ASYNC_SPLIT_TERMIOS (1U << ASYNCB_SPLIT_TERMIOS) | ||
| 48 | #define ASYNC_SPD_HI (1U << ASYNCB_SPD_HI) | ||
| 49 | #define ASYNC_SPD_VHI (1U << ASYNCB_SPD_VHI) | ||
| 50 | #define ASYNC_SKIP_TEST (1U << ASYNCB_SKIP_TEST) | ||
| 51 | #define ASYNC_AUTO_IRQ (1U << ASYNCB_AUTO_IRQ) | ||
| 52 | #define ASYNC_SESSION_LOCKOUT (1U << ASYNCB_SESSION_LOCKOUT) | ||
| 53 | #define ASYNC_PGRP_LOCKOUT (1U << ASYNCB_PGRP_LOCKOUT) | ||
| 54 | #define ASYNC_CALLOUT_NOHUP (1U << ASYNCB_CALLOUT_NOHUP) | ||
| 55 | #define ASYNC_HARDPPS_CD (1U << ASYNCB_HARDPPS_CD) | ||
| 56 | #define ASYNC_SPD_SHI (1U << ASYNCB_SPD_SHI) | ||
| 57 | #define ASYNC_LOW_LATENCY (1U << ASYNCB_LOW_LATENCY) | ||
| 58 | #define ASYNC_BUGGY_UART (1U << ASYNCB_BUGGY_UART) | ||
| 59 | #define ASYNC_AUTOPROBE (1U << ASYNCB_AUTOPROBE) | ||
| 60 | |||
| 61 | #define ASYNC_FLAGS ((1U << (ASYNCB_LAST_USER + 1)) - 1) | ||
| 62 | #define ASYNC_USR_MASK (ASYNC_SPD_MASK|ASYNC_CALLOUT_NOHUP| \ | ||
| 63 | ASYNC_LOW_LATENCY) | ||
| 64 | #define ASYNC_SPD_CUST (ASYNC_SPD_HI|ASYNC_SPD_VHI) | ||
| 65 | #define ASYNC_SPD_WARP (ASYNC_SPD_HI|ASYNC_SPD_SHI) | ||
| 66 | #define ASYNC_SPD_MASK (ASYNC_SPD_HI|ASYNC_SPD_VHI|ASYNC_SPD_SHI) | ||
| 67 | |||
| 68 | #define ASYNC_INITIALIZED (1U << ASYNCB_INITIALIZED) | ||
| 69 | #define ASYNC_NORMAL_ACTIVE (1U << ASYNCB_NORMAL_ACTIVE) | ||
| 70 | #define ASYNC_BOOT_AUTOCONF (1U << ASYNCB_BOOT_AUTOCONF) | ||
| 71 | #define ASYNC_CLOSING (1U << ASYNCB_CLOSING) | ||
| 72 | #define ASYNC_CTS_FLOW (1U << ASYNCB_CTS_FLOW) | ||
| 73 | #define ASYNC_CHECK_CD (1U << ASYNCB_CHECK_CD) | ||
| 74 | #define ASYNC_SHARE_IRQ (1U << ASYNCB_SHARE_IRQ) | ||
| 75 | #define ASYNC_CONS_FLOW (1U << ASYNCB_CONS_FLOW) | ||
| 76 | #define ASYNC_INTERNAL_FLAGS (~((1U << ASYNCB_FIRST_KERNEL) - 1)) | ||
| 77 | |||
| 78 | #endif | ||
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index c66fe3332d83..50c3e8fa06a8 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
| @@ -104,7 +104,6 @@ static inline void wait_on_inode(struct inode *inode) | |||
| 104 | wait_on_bit(&inode->i_state, __I_NEW, inode_wait, TASK_UNINTERRUPTIBLE); | 104 | wait_on_bit(&inode->i_state, __I_NEW, inode_wait, TASK_UNINTERRUPTIBLE); |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | |||
| 108 | /* | 107 | /* |
| 109 | * mm/page-writeback.c | 108 | * mm/page-writeback.c |
| 110 | */ | 109 | */ |
diff --git a/include/net/bluetooth/smp.h b/include/net/bluetooth/smp.h index ca356a734920..8b27927b2a55 100644 --- a/include/net/bluetooth/smp.h +++ b/include/net/bluetooth/smp.h | |||
| @@ -136,7 +136,7 @@ struct smp_chan { | |||
| 136 | }; | 136 | }; |
| 137 | 137 | ||
| 138 | /* SMP Commands */ | 138 | /* SMP Commands */ |
| 139 | int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level); | 139 | int smp_conn_security(struct hci_conn *hcon, __u8 sec_level); |
| 140 | int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb); | 140 | int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb); |
| 141 | int smp_distribute_keys(struct l2cap_conn *conn, __u8 force); | 141 | int smp_distribute_keys(struct l2cap_conn *conn, __u8 force); |
| 142 | int smp_user_confirm_reply(struct hci_conn *conn, u16 mgmt_op, __le32 passkey); | 142 | int smp_user_confirm_reply(struct hci_conn *conn, u16 mgmt_op, __le32 passkey); |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 493fa0c79005..3d254e10ff30 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
| @@ -96,6 +96,7 @@ enum ieee80211_band { | |||
| 96 | * is not permitted. | 96 | * is not permitted. |
| 97 | * @IEEE80211_CHAN_NO_HT40MINUS: extension channel below this channel | 97 | * @IEEE80211_CHAN_NO_HT40MINUS: extension channel below this channel |
| 98 | * is not permitted. | 98 | * is not permitted. |
| 99 | * @IEEE80211_CHAN_NO_OFDM: OFDM is not allowed on this channel. | ||
| 99 | */ | 100 | */ |
| 100 | enum ieee80211_channel_flags { | 101 | enum ieee80211_channel_flags { |
| 101 | IEEE80211_CHAN_DISABLED = 1<<0, | 102 | IEEE80211_CHAN_DISABLED = 1<<0, |
| @@ -104,6 +105,7 @@ enum ieee80211_channel_flags { | |||
| 104 | IEEE80211_CHAN_RADAR = 1<<3, | 105 | IEEE80211_CHAN_RADAR = 1<<3, |
| 105 | IEEE80211_CHAN_NO_HT40PLUS = 1<<4, | 106 | IEEE80211_CHAN_NO_HT40PLUS = 1<<4, |
| 106 | IEEE80211_CHAN_NO_HT40MINUS = 1<<5, | 107 | IEEE80211_CHAN_NO_HT40MINUS = 1<<5, |
| 108 | IEEE80211_CHAN_NO_OFDM = 1<<6, | ||
| 107 | }; | 109 | }; |
| 108 | 110 | ||
| 109 | #define IEEE80211_CHAN_NO_HT40 \ | 111 | #define IEEE80211_CHAN_NO_HT40 \ |
diff --git a/include/net/codel.h b/include/net/codel.h index 550debfc2403..389cf621161d 100644 --- a/include/net/codel.h +++ b/include/net/codel.h | |||
| @@ -305,6 +305,8 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch, | |||
| 305 | } | 305 | } |
| 306 | } | 306 | } |
| 307 | } else if (drop) { | 307 | } else if (drop) { |
| 308 | u32 delta; | ||
| 309 | |||
| 308 | if (params->ecn && INET_ECN_set_ce(skb)) { | 310 | if (params->ecn && INET_ECN_set_ce(skb)) { |
| 309 | stats->ecn_mark++; | 311 | stats->ecn_mark++; |
| 310 | } else { | 312 | } else { |
| @@ -320,9 +322,11 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch, | |||
| 320 | * assume that the drop rate that controlled the queue on the | 322 | * assume that the drop rate that controlled the queue on the |
| 321 | * last cycle is a good starting point to control it now. | 323 | * last cycle is a good starting point to control it now. |
| 322 | */ | 324 | */ |
| 323 | if (codel_time_before(now - vars->drop_next, | 325 | delta = vars->count - vars->lastcount; |
| 326 | if (delta > 1 && | ||
| 327 | codel_time_before(now - vars->drop_next, | ||
| 324 | 16 * params->interval)) { | 328 | 16 * params->interval)) { |
| 325 | vars->count = (vars->count - vars->lastcount) | 1; | 329 | vars->count = delta; |
| 326 | /* we dont care if rec_inv_sqrt approximation | 330 | /* we dont care if rec_inv_sqrt approximation |
| 327 | * is not very precise : | 331 | * is not very precise : |
| 328 | * Next Newton steps will correct it quadratically. | 332 | * Next Newton steps will correct it quadratically. |
diff --git a/include/net/dst.h b/include/net/dst.h index baf597890064..621e3513ef5e 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
| @@ -110,7 +110,7 @@ struct dst_entry { | |||
| 110 | }; | 110 | }; |
| 111 | 111 | ||
| 112 | extern u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old); | 112 | extern u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old); |
| 113 | extern const u32 dst_default_metrics[RTAX_MAX]; | 113 | extern const u32 dst_default_metrics[]; |
| 114 | 114 | ||
| 115 | #define DST_METRICS_READ_ONLY 0x1UL | 115 | #define DST_METRICS_READ_ONLY 0x1UL |
| 116 | #define __DST_METRICS_PTR(Y) \ | 116 | #define __DST_METRICS_PTR(Y) \ |
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index 5ee66f517b4f..ba1d3615acbb 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h | |||
| @@ -39,6 +39,7 @@ struct inet_connection_sock_af_ops { | |||
| 39 | int (*queue_xmit)(struct sk_buff *skb, struct flowi *fl); | 39 | int (*queue_xmit)(struct sk_buff *skb, struct flowi *fl); |
| 40 | void (*send_check)(struct sock *sk, struct sk_buff *skb); | 40 | void (*send_check)(struct sock *sk, struct sk_buff *skb); |
| 41 | int (*rebuild_header)(struct sock *sk); | 41 | int (*rebuild_header)(struct sock *sk); |
| 42 | void (*sk_rx_dst_set)(struct sock *sk, const struct sk_buff *skb); | ||
| 42 | int (*conn_request)(struct sock *sk, struct sk_buff *skb); | 43 | int (*conn_request)(struct sock *sk, struct sk_buff *skb); |
| 43 | struct sock *(*syn_recv_sock)(struct sock *sk, struct sk_buff *skb, | 44 | struct sock *(*syn_recv_sock)(struct sock *sk, struct sk_buff *skb, |
| 44 | struct request_sock *req, | 45 | struct request_sock *req, |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 83b567fe1941..613cfa401672 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
| @@ -249,13 +249,4 @@ static inline __u8 inet_sk_flowi_flags(const struct sock *sk) | |||
| 249 | return flags; | 249 | return flags; |
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | static inline void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) | ||
| 253 | { | ||
| 254 | struct dst_entry *dst = skb_dst(skb); | ||
| 255 | |||
| 256 | dst_hold(dst); | ||
| 257 | sk->sk_rx_dst = dst; | ||
| 258 | inet_sk(sk)->rx_dst_ifindex = skb->skb_iif; | ||
| 259 | } | ||
| 260 | |||
| 261 | #endif /* _INET_SOCK_H */ | 252 | #endif /* _INET_SOCK_H */ |
diff --git a/include/net/ip.h b/include/net/ip.h index bd5e444a19ce..5a5d84d3d2c6 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
| @@ -120,7 +120,7 @@ extern struct sk_buff *__ip_make_skb(struct sock *sk, | |||
| 120 | struct flowi4 *fl4, | 120 | struct flowi4 *fl4, |
| 121 | struct sk_buff_head *queue, | 121 | struct sk_buff_head *queue, |
| 122 | struct inet_cork *cork); | 122 | struct inet_cork *cork); |
| 123 | extern int ip_send_skb(struct sk_buff *skb); | 123 | extern int ip_send_skb(struct net *net, struct sk_buff *skb); |
| 124 | extern int ip_push_pending_frames(struct sock *sk, struct flowi4 *fl4); | 124 | extern int ip_push_pending_frames(struct sock *sk, struct flowi4 *fl4); |
| 125 | extern void ip_flush_pending_frames(struct sock *sk); | 125 | extern void ip_flush_pending_frames(struct sock *sk); |
| 126 | extern struct sk_buff *ip_make_skb(struct sock *sk, | 126 | extern struct sk_buff *ip_make_skb(struct sock *sk, |
diff --git a/include/net/irda/ircomm_tty.h b/include/net/irda/ircomm_tty.h index 59ba38bc400f..80ffde3bb164 100644 --- a/include/net/irda/ircomm_tty.h +++ b/include/net/irda/ircomm_tty.h | |||
| @@ -52,21 +52,16 @@ | |||
| 52 | /* Same for payload size. See qos.c for the smallest max data size */ | 52 | /* Same for payload size. See qos.c for the smallest max data size */ |
| 53 | #define IRCOMM_TTY_DATA_UNINITIALISED (64 - IRCOMM_TTY_HDR_UNINITIALISED) | 53 | #define IRCOMM_TTY_DATA_UNINITIALISED (64 - IRCOMM_TTY_HDR_UNINITIALISED) |
| 54 | 54 | ||
| 55 | /* Those are really defined in include/linux/serial.h - Jean II */ | ||
| 56 | #define ASYNC_B_INITIALIZED 31 /* Serial port was initialized */ | ||
| 57 | #define ASYNC_B_NORMAL_ACTIVE 29 /* Normal device is active */ | ||
| 58 | #define ASYNC_B_CLOSING 27 /* Serial port is closing */ | ||
| 59 | |||
| 60 | /* | 55 | /* |
| 61 | * IrCOMM TTY driver state | 56 | * IrCOMM TTY driver state |
| 62 | */ | 57 | */ |
| 63 | struct ircomm_tty_cb { | 58 | struct ircomm_tty_cb { |
| 64 | irda_queue_t queue; /* Must be first */ | 59 | irda_queue_t queue; /* Must be first */ |
| 60 | struct tty_port port; | ||
| 65 | magic_t magic; | 61 | magic_t magic; |
| 66 | 62 | ||
| 67 | int state; /* Connect state */ | 63 | int state; /* Connect state */ |
| 68 | 64 | ||
| 69 | struct tty_struct *tty; | ||
| 70 | struct ircomm_cb *ircomm; /* IrCOMM layer instance */ | 65 | struct ircomm_cb *ircomm; /* IrCOMM layer instance */ |
| 71 | 66 | ||
| 72 | struct sk_buff *tx_skb; /* Transmit buffer */ | 67 | struct sk_buff *tx_skb; /* Transmit buffer */ |
| @@ -80,7 +75,6 @@ struct ircomm_tty_cb { | |||
| 80 | LOCAL_FLOW flow; /* IrTTP flow status */ | 75 | LOCAL_FLOW flow; /* IrTTP flow status */ |
| 81 | 76 | ||
| 82 | int line; | 77 | int line; |
| 83 | unsigned long flags; | ||
| 84 | 78 | ||
| 85 | __u8 dlsap_sel; | 79 | __u8 dlsap_sel; |
| 86 | __u8 slsap_sel; | 80 | __u8 slsap_sel; |
| @@ -97,19 +91,10 @@ struct ircomm_tty_cb { | |||
| 97 | void *skey; | 91 | void *skey; |
| 98 | void *ckey; | 92 | void *ckey; |
| 99 | 93 | ||
| 100 | wait_queue_head_t open_wait; | ||
| 101 | wait_queue_head_t close_wait; | ||
| 102 | struct timer_list watchdog_timer; | 94 | struct timer_list watchdog_timer; |
| 103 | struct work_struct tqueue; | 95 | struct work_struct tqueue; |
| 104 | 96 | ||
| 105 | unsigned short close_delay; | ||
| 106 | unsigned short closing_wait; /* time to wait before closing */ | ||
| 107 | |||
| 108 | int open_count; | ||
| 109 | int blocked_open; /* # of blocked opens */ | ||
| 110 | |||
| 111 | /* Protect concurent access to : | 97 | /* Protect concurent access to : |
| 112 | * o self->open_count | ||
| 113 | * o self->ctrl_skb | 98 | * o self->ctrl_skb |
| 114 | * o self->tx_skb | 99 | * o self->tx_skb |
| 115 | * Maybe other things may gain to be protected as well... | 100 | * Maybe other things may gain to be protected as well... |
diff --git a/include/net/llc.h b/include/net/llc.h index 226c846cab08..f2d0fc570527 100644 --- a/include/net/llc.h +++ b/include/net/llc.h | |||
| @@ -133,7 +133,7 @@ extern int llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb, | |||
| 133 | extern void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb); | 133 | extern void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb); |
| 134 | extern void llc_conn_handler(struct llc_sap *sap, struct sk_buff *skb); | 134 | extern void llc_conn_handler(struct llc_sap *sap, struct sk_buff *skb); |
| 135 | 135 | ||
| 136 | extern int llc_station_init(void); | 136 | extern void llc_station_init(void); |
| 137 | extern void llc_station_exit(void); | 137 | extern void llc_station_exit(void); |
| 138 | 138 | ||
| 139 | #ifdef CONFIG_PROC_FS | 139 | #ifdef CONFIG_PROC_FS |
diff --git a/include/net/netfilter/nf_conntrack_ecache.h b/include/net/netfilter/nf_conntrack_ecache.h index e1ce1048fe5f..4a045cda9c60 100644 --- a/include/net/netfilter/nf_conntrack_ecache.h +++ b/include/net/netfilter/nf_conntrack_ecache.h | |||
| @@ -18,6 +18,7 @@ struct nf_conntrack_ecache { | |||
| 18 | u16 ctmask; /* bitmask of ct events to be delivered */ | 18 | u16 ctmask; /* bitmask of ct events to be delivered */ |
| 19 | u16 expmask; /* bitmask of expect events to be delivered */ | 19 | u16 expmask; /* bitmask of expect events to be delivered */ |
| 20 | u32 pid; /* netlink pid of destroyer */ | 20 | u32 pid; /* netlink pid of destroyer */ |
| 21 | struct timer_list timeout; | ||
| 21 | }; | 22 | }; |
| 22 | 23 | ||
| 23 | static inline struct nf_conntrack_ecache * | 24 | static inline struct nf_conntrack_ecache * |
diff --git a/include/net/scm.h b/include/net/scm.h index 079d7887dac1..7dc0854f0b38 100644 --- a/include/net/scm.h +++ b/include/net/scm.h | |||
| @@ -70,9 +70,11 @@ static __inline__ void scm_destroy(struct scm_cookie *scm) | |||
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | static __inline__ int scm_send(struct socket *sock, struct msghdr *msg, | 72 | static __inline__ int scm_send(struct socket *sock, struct msghdr *msg, |
| 73 | struct scm_cookie *scm) | 73 | struct scm_cookie *scm, bool forcecreds) |
| 74 | { | 74 | { |
| 75 | memset(scm, 0, sizeof(*scm)); | 75 | memset(scm, 0, sizeof(*scm)); |
| 76 | if (forcecreds) | ||
| 77 | scm_set_cred(scm, task_tgid(current), current_cred()); | ||
| 76 | unix_get_peersec_dgram(sock, scm); | 78 | unix_get_peersec_dgram(sock, scm); |
| 77 | if (msg->msg_controllen <= 0) | 79 | if (msg->msg_controllen <= 0) |
| 78 | return 0; | 80 | return 0; |
diff --git a/include/net/sock.h b/include/net/sock.h index b3730239bf18..72132aef53fc 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -218,6 +218,7 @@ struct cg_proto; | |||
| 218 | * @sk_route_nocaps: forbidden route capabilities (e.g NETIF_F_GSO_MASK) | 218 | * @sk_route_nocaps: forbidden route capabilities (e.g NETIF_F_GSO_MASK) |
| 219 | * @sk_gso_type: GSO type (e.g. %SKB_GSO_TCPV4) | 219 | * @sk_gso_type: GSO type (e.g. %SKB_GSO_TCPV4) |
| 220 | * @sk_gso_max_size: Maximum GSO segment size to build | 220 | * @sk_gso_max_size: Maximum GSO segment size to build |
| 221 | * @sk_gso_max_segs: Maximum number of GSO segments | ||
| 221 | * @sk_lingertime: %SO_LINGER l_linger setting | 222 | * @sk_lingertime: %SO_LINGER l_linger setting |
| 222 | * @sk_backlog: always used with the per-socket spinlock held | 223 | * @sk_backlog: always used with the per-socket spinlock held |
| 223 | * @sk_callback_lock: used with the callbacks in the end of this struct | 224 | * @sk_callback_lock: used with the callbacks in the end of this struct |
| @@ -338,6 +339,7 @@ struct sock { | |||
| 338 | netdev_features_t sk_route_nocaps; | 339 | netdev_features_t sk_route_nocaps; |
| 339 | int sk_gso_type; | 340 | int sk_gso_type; |
| 340 | unsigned int sk_gso_max_size; | 341 | unsigned int sk_gso_max_size; |
| 342 | u16 sk_gso_max_segs; | ||
| 341 | int sk_rcvlowat; | 343 | int sk_rcvlowat; |
| 342 | unsigned long sk_lingertime; | 344 | unsigned long sk_lingertime; |
| 343 | struct sk_buff_head sk_error_queue; | 345 | struct sk_buff_head sk_error_queue; |
diff --git a/include/net/tcp.h b/include/net/tcp.h index e19124b84cd2..1f000ffe7075 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -464,6 +464,7 @@ extern int tcp_disconnect(struct sock *sk, int flags); | |||
| 464 | void tcp_connect_init(struct sock *sk); | 464 | void tcp_connect_init(struct sock *sk); |
| 465 | void tcp_finish_connect(struct sock *sk, struct sk_buff *skb); | 465 | void tcp_finish_connect(struct sock *sk, struct sk_buff *skb); |
| 466 | int tcp_send_rcvq(struct sock *sk, struct msghdr *msg, size_t size); | 466 | int tcp_send_rcvq(struct sock *sk, struct msghdr *msg, size_t size); |
| 467 | void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb); | ||
| 467 | 468 | ||
| 468 | /* From syncookies.c */ | 469 | /* From syncookies.c */ |
| 469 | extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]; | 470 | extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]; |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index d9509eb29b80..639dd1316d37 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
| @@ -213,6 +213,9 @@ struct xfrm_state { | |||
| 213 | struct xfrm_lifetime_cur curlft; | 213 | struct xfrm_lifetime_cur curlft; |
| 214 | struct tasklet_hrtimer mtimer; | 214 | struct tasklet_hrtimer mtimer; |
| 215 | 215 | ||
| 216 | /* used to fix curlft->add_time when changing date */ | ||
| 217 | long saved_tmo; | ||
| 218 | |||
| 216 | /* Last used time */ | 219 | /* Last used time */ |
| 217 | unsigned long lastused; | 220 | unsigned long lastused; |
| 218 | 221 | ||
| @@ -238,6 +241,7 @@ static inline struct net *xs_net(struct xfrm_state *x) | |||
| 238 | 241 | ||
| 239 | /* xflags - make enum if more show up */ | 242 | /* xflags - make enum if more show up */ |
| 240 | #define XFRM_TIME_DEFER 1 | 243 | #define XFRM_TIME_DEFER 1 |
| 244 | #define XFRM_SOFT_EXPIRE 2 | ||
| 241 | 245 | ||
| 242 | enum { | 246 | enum { |
| 243 | XFRM_STATE_VOID, | 247 | XFRM_STATE_VOID, |
| @@ -269,6 +273,9 @@ struct xfrm_replay { | |||
| 269 | int (*check)(struct xfrm_state *x, | 273 | int (*check)(struct xfrm_state *x, |
| 270 | struct sk_buff *skb, | 274 | struct sk_buff *skb, |
| 271 | __be32 net_seq); | 275 | __be32 net_seq); |
| 276 | int (*recheck)(struct xfrm_state *x, | ||
| 277 | struct sk_buff *skb, | ||
| 278 | __be32 net_seq); | ||
| 272 | void (*notify)(struct xfrm_state *x, int event); | 279 | void (*notify)(struct xfrm_state *x, int event); |
| 273 | int (*overflow)(struct xfrm_state *x, struct sk_buff *skb); | 280 | int (*overflow)(struct xfrm_state *x, struct sk_buff *skb); |
| 274 | }; | 281 | }; |
| @@ -288,6 +295,8 @@ struct xfrm_policy_afinfo { | |||
| 288 | struct flowi *fl, | 295 | struct flowi *fl, |
| 289 | int reverse); | 296 | int reverse); |
| 290 | int (*get_tos)(const struct flowi *fl); | 297 | int (*get_tos)(const struct flowi *fl); |
| 298 | void (*init_dst)(struct net *net, | ||
| 299 | struct xfrm_dst *dst); | ||
| 291 | int (*init_path)(struct xfrm_dst *path, | 300 | int (*init_path)(struct xfrm_dst *path, |
| 292 | struct dst_entry *dst, | 301 | struct dst_entry *dst, |
| 293 | int nfheader_len); | 302 | int nfheader_len); |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index c75c0d1a85e2..cdca2ab1e711 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
| @@ -1075,7 +1075,8 @@ static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max) | |||
| 1075 | const char *snd_pcm_format_name(snd_pcm_format_t format); | 1075 | const char *snd_pcm_format_name(snd_pcm_format_t format); |
| 1076 | 1076 | ||
| 1077 | /** | 1077 | /** |
| 1078 | * Get a string naming the direction of a stream | 1078 | * snd_pcm_stream_str - Get a string naming the direction of a stream |
| 1079 | * @substream: the pcm substream instance | ||
| 1079 | */ | 1080 | */ |
| 1080 | static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream) | 1081 | static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream) |
| 1081 | { | 1082 | { |
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index f1405d335a96..941c84bf1065 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h | |||
| @@ -23,7 +23,9 @@ struct se_subsystem_api { | |||
| 23 | struct se_device *(*create_virtdevice)(struct se_hba *, | 23 | struct se_device *(*create_virtdevice)(struct se_hba *, |
| 24 | struct se_subsystem_dev *, void *); | 24 | struct se_subsystem_dev *, void *); |
| 25 | void (*free_device)(void *); | 25 | void (*free_device)(void *); |
| 26 | int (*transport_complete)(struct se_cmd *cmd, struct scatterlist *); | 26 | void (*transport_complete)(struct se_cmd *cmd, |
| 27 | struct scatterlist *, | ||
| 28 | unsigned char *); | ||
| 27 | 29 | ||
| 28 | int (*parse_cdb)(struct se_cmd *cmd); | 30 | int (*parse_cdb)(struct se_cmd *cmd); |
| 29 | ssize_t (*check_configfs_dev_params)(struct se_hba *, | 31 | ssize_t (*check_configfs_dev_params)(struct se_hba *, |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 128ce46fa48a..5be89373ceac 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -121,6 +121,7 @@ | |||
| 121 | 121 | ||
| 122 | #define SE_INQUIRY_BUF 512 | 122 | #define SE_INQUIRY_BUF 512 |
| 123 | #define SE_MODE_PAGE_BUF 512 | 123 | #define SE_MODE_PAGE_BUF 512 |
| 124 | #define SE_SENSE_BUF 96 | ||
| 124 | 125 | ||
| 125 | /* struct se_hba->hba_flags */ | 126 | /* struct se_hba->hba_flags */ |
| 126 | enum hba_flags_table { | 127 | enum hba_flags_table { |
| @@ -503,8 +504,6 @@ struct se_cmd { | |||
| 503 | u32 se_ordered_id; | 504 | u32 se_ordered_id; |
| 504 | /* Total size in bytes associated with command */ | 505 | /* Total size in bytes associated with command */ |
| 505 | u32 data_length; | 506 | u32 data_length; |
| 506 | /* SCSI Presented Data Transfer Length */ | ||
| 507 | u32 cmd_spdtl; | ||
| 508 | u32 residual_count; | 507 | u32 residual_count; |
| 509 | u32 orig_fe_lun; | 508 | u32 orig_fe_lun; |
| 510 | /* Persistent Reservation key */ | 509 | /* Persistent Reservation key */ |
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index ea7a2035456d..5a8671e8a67f 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
| @@ -73,6 +73,9 @@ DECLARE_EVENT_CLASS(sched_wakeup_template, | |||
| 73 | __entry->prio = p->prio; | 73 | __entry->prio = p->prio; |
| 74 | __entry->success = success; | 74 | __entry->success = success; |
| 75 | __entry->target_cpu = task_cpu(p); | 75 | __entry->target_cpu = task_cpu(p); |
| 76 | ) | ||
| 77 | TP_perf_assign( | ||
| 78 | __perf_task(p); | ||
| 76 | ), | 79 | ), |
| 77 | 80 | ||
| 78 | TP_printk("comm=%s pid=%d prio=%d success=%d target_cpu=%03d", | 81 | TP_printk("comm=%s pid=%d prio=%d success=%d target_cpu=%03d", |
| @@ -325,6 +328,7 @@ DECLARE_EVENT_CLASS(sched_stat_template, | |||
| 325 | ) | 328 | ) |
| 326 | TP_perf_assign( | 329 | TP_perf_assign( |
| 327 | __perf_count(delay); | 330 | __perf_count(delay); |
| 331 | __perf_task(tsk); | ||
| 328 | ), | 332 | ), |
| 329 | 333 | ||
| 330 | TP_printk("comm=%s pid=%d delay=%Lu [ns]", | 334 | TP_printk("comm=%s pid=%d delay=%Lu [ns]", |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index c6bc2faaf261..a763888a36f9 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
| @@ -712,6 +712,9 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call | |||
| 712 | #undef __perf_count | 712 | #undef __perf_count |
| 713 | #define __perf_count(c) __count = (c) | 713 | #define __perf_count(c) __count = (c) |
| 714 | 714 | ||
| 715 | #undef __perf_task | ||
| 716 | #define __perf_task(t) __task = (t) | ||
| 717 | |||
| 715 | #undef TP_perf_assign | 718 | #undef TP_perf_assign |
| 716 | #define TP_perf_assign(args...) args | 719 | #define TP_perf_assign(args...) args |
| 717 | 720 | ||
| @@ -725,6 +728,7 @@ perf_trace_##call(void *__data, proto) \ | |||
| 725 | struct ftrace_raw_##call *entry; \ | 728 | struct ftrace_raw_##call *entry; \ |
| 726 | struct pt_regs __regs; \ | 729 | struct pt_regs __regs; \ |
| 727 | u64 __addr = 0, __count = 1; \ | 730 | u64 __addr = 0, __count = 1; \ |
| 731 | struct task_struct *__task = NULL; \ | ||
| 728 | struct hlist_head *head; \ | 732 | struct hlist_head *head; \ |
| 729 | int __entry_size; \ | 733 | int __entry_size; \ |
| 730 | int __data_size; \ | 734 | int __data_size; \ |
| @@ -752,7 +756,7 @@ perf_trace_##call(void *__data, proto) \ | |||
| 752 | \ | 756 | \ |
| 753 | head = this_cpu_ptr(event_call->perf_events); \ | 757 | head = this_cpu_ptr(event_call->perf_events); \ |
| 754 | perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ | 758 | perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ |
| 755 | __count, &__regs, head); \ | 759 | __count, &__regs, head, __task); \ |
| 756 | } | 760 | } |
| 757 | 761 | ||
| 758 | /* | 762 | /* |
diff --git a/include/xen/events.h b/include/xen/events.h index 9c641deb65d2..04399b28e821 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
| @@ -58,8 +58,6 @@ void notify_remote_via_irq(int irq); | |||
| 58 | 58 | ||
| 59 | void xen_irq_resume(void); | 59 | void xen_irq_resume(void); |
| 60 | 60 | ||
| 61 | void xen_hvm_prepare_kexec(struct shared_info *sip, unsigned long pfn); | ||
| 62 | |||
| 63 | /* Clear an irq's pending state, in preparation for polling on it */ | 61 | /* Clear an irq's pending state, in preparation for polling on it */ |
| 64 | void xen_clear_irq_pending(int irq); | 62 | void xen_clear_irq_pending(int irq); |
| 65 | void xen_set_irq_pending(int irq); | 63 | void xen_set_irq_pending(int irq); |
