diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/devpts_fs.h | 20 | ||||
-rw-r--r-- | include/linux/mfd/menelaus.h | 47 | ||||
-rw-r--r-- | include/linux/platform_data/gpio-omap.h | 1 | ||||
-rw-r--r-- | include/linux/platform_data/leds-omap.h | 22 | ||||
-rw-r--r-- | include/linux/platform_data/mmc-omap.h | 150 | ||||
-rw-r--r-- | include/linux/platform_data/mtd-nand-omap2.h | 46 | ||||
-rw-r--r-- | include/linux/platform_data/mtd-onenand-omap2.h | 28 | ||||
-rw-r--r-- | include/linux/platform_data/usb-omap.h | 80 | ||||
-rw-r--r-- | include/linux/tty.h | 44 | ||||
-rw-r--r-- | include/linux/tty_flip.h | 2 | ||||
-rw-r--r-- | include/video/omapdss.h | 14 | ||||
-rw-r--r-- | include/video/omapvrfb.h | 68 |
12 files changed, 440 insertions, 82 deletions
diff --git a/include/linux/devpts_fs.h b/include/linux/devpts_fs.h index 5ce0e5fd712e..251a2090a554 100644 --- a/include/linux/devpts_fs.h +++ b/include/linux/devpts_fs.h | |||
@@ -20,28 +20,28 @@ | |||
20 | int devpts_new_index(struct inode *ptmx_inode); | 20 | int devpts_new_index(struct inode *ptmx_inode); |
21 | void devpts_kill_index(struct inode *ptmx_inode, int idx); | 21 | void devpts_kill_index(struct inode *ptmx_inode, int idx); |
22 | /* mknod in devpts */ | 22 | /* mknod in devpts */ |
23 | int devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty); | 23 | struct inode *devpts_pty_new(struct inode *ptmx_inode, dev_t device, int index, |
24 | /* get tty structure */ | 24 | void *priv); |
25 | struct tty_struct *devpts_get_tty(struct inode *pts_inode, int number); | 25 | /* get private structure */ |
26 | void *devpts_get_priv(struct inode *pts_inode); | ||
26 | /* unlink */ | 27 | /* unlink */ |
27 | void devpts_pty_kill(struct tty_struct *tty); | 28 | void devpts_pty_kill(struct inode *inode); |
28 | 29 | ||
29 | #else | 30 | #else |
30 | 31 | ||
31 | /* Dummy stubs in the no-pty case */ | 32 | /* Dummy stubs in the no-pty case */ |
32 | static inline int devpts_new_index(struct inode *ptmx_inode) { return -EINVAL; } | 33 | static inline int devpts_new_index(struct inode *ptmx_inode) { return -EINVAL; } |
33 | static inline void devpts_kill_index(struct inode *ptmx_inode, int idx) { } | 34 | static inline void devpts_kill_index(struct inode *ptmx_inode, int idx) { } |
34 | static inline int devpts_pty_new(struct inode *ptmx_inode, | 35 | static inline struct inode *devpts_pty_new(struct inode *ptmx_inode, |
35 | struct tty_struct *tty) | 36 | dev_t device, int index, void *priv) |
36 | { | 37 | { |
37 | return -EINVAL; | 38 | return ERR_PTR(-EINVAL); |
38 | } | 39 | } |
39 | static inline struct tty_struct *devpts_get_tty(struct inode *pts_inode, | 40 | static inline void *devpts_get_priv(struct inode *pts_inode) |
40 | int number) | ||
41 | { | 41 | { |
42 | return NULL; | 42 | return NULL; |
43 | } | 43 | } |
44 | static inline void devpts_pty_kill(struct tty_struct *tty) { } | 44 | static inline void devpts_pty_kill(struct inode *inode) { } |
45 | 45 | ||
46 | #endif | 46 | #endif |
47 | 47 | ||
diff --git a/include/linux/mfd/menelaus.h b/include/linux/mfd/menelaus.h new file mode 100644 index 000000000000..f097e89134cb --- /dev/null +++ b/include/linux/mfd/menelaus.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * Functions to access Menelaus power management chip | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_MENELAUS_H | ||
6 | #define __ASM_ARCH_MENELAUS_H | ||
7 | |||
8 | struct device; | ||
9 | |||
10 | struct menelaus_platform_data { | ||
11 | int (* late_init)(struct device *dev); | ||
12 | }; | ||
13 | |||
14 | extern int menelaus_register_mmc_callback(void (*callback)(void *data, u8 card_mask), | ||
15 | void *data); | ||
16 | extern void menelaus_unregister_mmc_callback(void); | ||
17 | extern int menelaus_set_mmc_opendrain(int slot, int enable); | ||
18 | extern int menelaus_set_mmc_slot(int slot, int enable, int power, int cd_on); | ||
19 | |||
20 | extern int menelaus_set_vmem(unsigned int mV); | ||
21 | extern int menelaus_set_vio(unsigned int mV); | ||
22 | extern int menelaus_set_vmmc(unsigned int mV); | ||
23 | extern int menelaus_set_vaux(unsigned int mV); | ||
24 | extern int menelaus_set_vdcdc(int dcdc, unsigned int mV); | ||
25 | extern int menelaus_set_slot_sel(int enable); | ||
26 | extern int menelaus_get_slot_pin_states(void); | ||
27 | extern int menelaus_set_vcore_sw(unsigned int mV); | ||
28 | extern int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int floor_mV); | ||
29 | |||
30 | #define EN_VPLL_SLEEP (1 << 7) | ||
31 | #define EN_VMMC_SLEEP (1 << 6) | ||
32 | #define EN_VAUX_SLEEP (1 << 5) | ||
33 | #define EN_VIO_SLEEP (1 << 4) | ||
34 | #define EN_VMEM_SLEEP (1 << 3) | ||
35 | #define EN_DC3_SLEEP (1 << 2) | ||
36 | #define EN_DC2_SLEEP (1 << 1) | ||
37 | #define EN_VC_SLEEP (1 << 0) | ||
38 | |||
39 | extern int menelaus_set_regulator_sleep(int enable, u32 val); | ||
40 | |||
41 | #if defined(CONFIG_ARCH_OMAP2) && defined(CONFIG_MENELAUS) | ||
42 | #define omap_has_menelaus() 1 | ||
43 | #else | ||
44 | #define omap_has_menelaus() 0 | ||
45 | #endif | ||
46 | |||
47 | #endif | ||
diff --git a/include/linux/platform_data/gpio-omap.h b/include/linux/platform_data/gpio-omap.h index e8741c2678d5..5d50b25a73d7 100644 --- a/include/linux/platform_data/gpio-omap.h +++ b/include/linux/platform_data/gpio-omap.h | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <mach/irqs.h> | ||
30 | 29 | ||
31 | #define OMAP1_MPUIO_BASE 0xfffb5000 | 30 | #define OMAP1_MPUIO_BASE 0xfffb5000 |
32 | 31 | ||
diff --git a/include/linux/platform_data/leds-omap.h b/include/linux/platform_data/leds-omap.h new file mode 100644 index 000000000000..56c9b2a0ada5 --- /dev/null +++ b/include/linux/platform_data/leds-omap.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006 Samsung Electronics | ||
3 | * Kyungmin Park <kyungmin.park@samsung.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | #ifndef ASMARM_ARCH_LED_H | ||
10 | #define ASMARM_ARCH_LED_H | ||
11 | |||
12 | struct omap_led_config { | ||
13 | struct led_classdev cdev; | ||
14 | s16 gpio; | ||
15 | }; | ||
16 | |||
17 | struct omap_led_platform_data { | ||
18 | s16 nr_leds; | ||
19 | struct omap_led_config *leds; | ||
20 | }; | ||
21 | |||
22 | #endif | ||
diff --git a/include/linux/platform_data/mmc-omap.h b/include/linux/platform_data/mmc-omap.h new file mode 100644 index 000000000000..2bf6ea82ff94 --- /dev/null +++ b/include/linux/platform_data/mmc-omap.h | |||
@@ -0,0 +1,150 @@ | |||
1 | /* | ||
2 | * MMC definitions for OMAP2 | ||
3 | * | ||
4 | * Copyright (C) 2006 Nokia 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 version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #define OMAP_MMC_MAX_SLOTS 2 | ||
12 | |||
13 | /* | ||
14 | * struct omap_mmc_dev_attr.flags possibilities | ||
15 | * | ||
16 | * OMAP_HSMMC_SUPPORTS_DUAL_VOLT: Some HSMMC controller instances can | ||
17 | * operate with either 1.8Vdc or 3.0Vdc card voltages; this flag | ||
18 | * should be set if this is the case. See for example Section 22.5.3 | ||
19 | * "MMC/SD/SDIO1 Bus Voltage Selection" of the OMAP34xx Multimedia | ||
20 | * Device Silicon Revision 3.1.x Revision ZR (July 2011) (SWPU223R). | ||
21 | * | ||
22 | * OMAP_HSMMC_BROKEN_MULTIBLOCK_READ: Multiple-block read transfers | ||
23 | * don't work correctly on some MMC controller instances on some | ||
24 | * OMAP3 SoCs; this flag should be set if this is the case. See | ||
25 | * for example Advisory 2.1.1.128 "MMC: Multiple Block Read | ||
26 | * Operation Issue" in _OMAP3530/3525/3515/3503 Silicon Errata_ | ||
27 | * Revision F (October 2010) (SPRZ278F). | ||
28 | */ | ||
29 | #define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(0) | ||
30 | #define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ BIT(1) | ||
31 | |||
32 | struct mmc_card; | ||
33 | |||
34 | struct omap_mmc_dev_attr { | ||
35 | u8 flags; | ||
36 | }; | ||
37 | |||
38 | struct omap_mmc_platform_data { | ||
39 | /* back-link to device */ | ||
40 | struct device *dev; | ||
41 | |||
42 | /* number of slots per controller */ | ||
43 | unsigned nr_slots:2; | ||
44 | |||
45 | /* set if your board has components or wiring that limits the | ||
46 | * maximum frequency on the MMC bus */ | ||
47 | unsigned int max_freq; | ||
48 | |||
49 | /* switch the bus to a new slot */ | ||
50 | int (*switch_slot)(struct device *dev, int slot); | ||
51 | /* initialize board-specific MMC functionality, can be NULL if | ||
52 | * not supported */ | ||
53 | int (*init)(struct device *dev); | ||
54 | void (*cleanup)(struct device *dev); | ||
55 | void (*shutdown)(struct device *dev); | ||
56 | |||
57 | /* To handle board related suspend/resume functionality for MMC */ | ||
58 | int (*suspend)(struct device *dev, int slot); | ||
59 | int (*resume)(struct device *dev, int slot); | ||
60 | |||
61 | /* Return context loss count due to PM states changing */ | ||
62 | int (*get_context_loss_count)(struct device *dev); | ||
63 | |||
64 | /* Integrating attributes from the omap_hwmod layer */ | ||
65 | u8 controller_flags; | ||
66 | |||
67 | /* Register offset deviation */ | ||
68 | u16 reg_offset; | ||
69 | |||
70 | struct omap_mmc_slot_data { | ||
71 | |||
72 | /* | ||
73 | * 4/8 wires and any additional host capabilities | ||
74 | * need to OR'd all capabilities (ref. linux/mmc/host.h) | ||
75 | */ | ||
76 | u8 wires; /* Used for the MMC driver on omap1 and 2420 */ | ||
77 | u32 caps; /* Used for the MMC driver on 2430 and later */ | ||
78 | u32 pm_caps; /* PM capabilities of the mmc */ | ||
79 | |||
80 | /* | ||
81 | * nomux means "standard" muxing is wrong on this board, and | ||
82 | * that board-specific code handled it before common init logic. | ||
83 | */ | ||
84 | unsigned nomux:1; | ||
85 | |||
86 | /* switch pin can be for card detect (default) or card cover */ | ||
87 | unsigned cover:1; | ||
88 | |||
89 | /* use the internal clock */ | ||
90 | unsigned internal_clock:1; | ||
91 | |||
92 | /* nonremovable e.g. eMMC */ | ||
93 | unsigned nonremovable:1; | ||
94 | |||
95 | /* Try to sleep or power off when possible */ | ||
96 | unsigned power_saving:1; | ||
97 | |||
98 | /* If using power_saving and the MMC power is not to go off */ | ||
99 | unsigned no_off:1; | ||
100 | |||
101 | /* eMMC does not handle power off when not in sleep state */ | ||
102 | unsigned no_regulator_off_init:1; | ||
103 | |||
104 | /* Regulator off remapped to sleep */ | ||
105 | unsigned vcc_aux_disable_is_sleep:1; | ||
106 | |||
107 | /* we can put the features above into this variable */ | ||
108 | #define HSMMC_HAS_PBIAS (1 << 0) | ||
109 | #define HSMMC_HAS_UPDATED_RESET (1 << 1) | ||
110 | #define MMC_OMAP7XX (1 << 2) | ||
111 | #define MMC_OMAP15XX (1 << 3) | ||
112 | #define MMC_OMAP16XX (1 << 4) | ||
113 | unsigned features; | ||
114 | |||
115 | int switch_pin; /* gpio (card detect) */ | ||
116 | int gpio_wp; /* gpio (write protect) */ | ||
117 | |||
118 | int (*set_bus_mode)(struct device *dev, int slot, int bus_mode); | ||
119 | int (*set_power)(struct device *dev, int slot, | ||
120 | int power_on, int vdd); | ||
121 | int (*get_ro)(struct device *dev, int slot); | ||
122 | void (*remux)(struct device *dev, int slot, int power_on); | ||
123 | /* Call back before enabling / disabling regulators */ | ||
124 | void (*before_set_reg)(struct device *dev, int slot, | ||
125 | int power_on, int vdd); | ||
126 | /* Call back after enabling / disabling regulators */ | ||
127 | void (*after_set_reg)(struct device *dev, int slot, | ||
128 | int power_on, int vdd); | ||
129 | /* if we have special card, init it using this callback */ | ||
130 | void (*init_card)(struct mmc_card *card); | ||
131 | |||
132 | /* return MMC cover switch state, can be NULL if not supported. | ||
133 | * | ||
134 | * possible return values: | ||
135 | * 0 - closed | ||
136 | * 1 - open | ||
137 | */ | ||
138 | int (*get_cover_state)(struct device *dev, int slot); | ||
139 | |||
140 | const char *name; | ||
141 | u32 ocr_mask; | ||
142 | |||
143 | /* Card detection IRQs */ | ||
144 | int card_detect_irq; | ||
145 | int (*card_detect)(struct device *dev, int slot); | ||
146 | |||
147 | unsigned int ban_openended:1; | ||
148 | |||
149 | } slots[OMAP_MMC_MAX_SLOTS]; | ||
150 | }; | ||
diff --git a/include/linux/platform_data/mtd-nand-omap2.h b/include/linux/platform_data/mtd-nand-omap2.h index 1a68c1e5fe53..24d32ca34bef 100644 --- a/include/linux/platform_data/mtd-nand-omap2.h +++ b/include/linux/platform_data/mtd-nand-omap2.h | |||
@@ -8,9 +8,13 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <plat/gpmc.h> | 11 | #ifndef _MTD_NAND_OMAP2_H |
12 | #define _MTD_NAND_OMAP2_H | ||
13 | |||
12 | #include <linux/mtd/partitions.h> | 14 | #include <linux/mtd/partitions.h> |
13 | 15 | ||
16 | #define GPMC_BCH_NUM_REMAINDER 8 | ||
17 | |||
14 | enum nand_io { | 18 | enum nand_io { |
15 | NAND_OMAP_PREFETCH_POLLED = 0, /* prefetch polled mode, default */ | 19 | NAND_OMAP_PREFETCH_POLLED = 0, /* prefetch polled mode, default */ |
16 | NAND_OMAP_POLLED, /* polled mode, without prefetch */ | 20 | NAND_OMAP_POLLED, /* polled mode, without prefetch */ |
@@ -18,10 +22,38 @@ enum nand_io { | |||
18 | NAND_OMAP_PREFETCH_IRQ /* prefetch enabled irq mode */ | 22 | NAND_OMAP_PREFETCH_IRQ /* prefetch enabled irq mode */ |
19 | }; | 23 | }; |
20 | 24 | ||
25 | enum omap_ecc { | ||
26 | /* 1-bit ecc: stored at end of spare area */ | ||
27 | OMAP_ECC_HAMMING_CODE_DEFAULT = 0, /* Default, s/w method */ | ||
28 | OMAP_ECC_HAMMING_CODE_HW, /* gpmc to detect the error */ | ||
29 | /* 1-bit ecc: stored at beginning of spare area as romcode */ | ||
30 | OMAP_ECC_HAMMING_CODE_HW_ROMCODE, /* gpmc method & romcode layout */ | ||
31 | OMAP_ECC_BCH4_CODE_HW, /* 4-bit BCH ecc code */ | ||
32 | OMAP_ECC_BCH8_CODE_HW, /* 8-bit BCH ecc code */ | ||
33 | }; | ||
34 | |||
35 | struct gpmc_nand_regs { | ||
36 | void __iomem *gpmc_status; | ||
37 | void __iomem *gpmc_nand_command; | ||
38 | void __iomem *gpmc_nand_address; | ||
39 | void __iomem *gpmc_nand_data; | ||
40 | void __iomem *gpmc_prefetch_config1; | ||
41 | void __iomem *gpmc_prefetch_config2; | ||
42 | void __iomem *gpmc_prefetch_control; | ||
43 | void __iomem *gpmc_prefetch_status; | ||
44 | void __iomem *gpmc_ecc_config; | ||
45 | void __iomem *gpmc_ecc_control; | ||
46 | void __iomem *gpmc_ecc_size_config; | ||
47 | void __iomem *gpmc_ecc1_result; | ||
48 | void __iomem *gpmc_bch_result0[GPMC_BCH_NUM_REMAINDER]; | ||
49 | void __iomem *gpmc_bch_result1[GPMC_BCH_NUM_REMAINDER]; | ||
50 | void __iomem *gpmc_bch_result2[GPMC_BCH_NUM_REMAINDER]; | ||
51 | void __iomem *gpmc_bch_result3[GPMC_BCH_NUM_REMAINDER]; | ||
52 | }; | ||
53 | |||
21 | struct omap_nand_platform_data { | 54 | struct omap_nand_platform_data { |
22 | int cs; | 55 | int cs; |
23 | struct mtd_partition *parts; | 56 | struct mtd_partition *parts; |
24 | struct gpmc_timings *gpmc_t; | ||
25 | int nr_parts; | 57 | int nr_parts; |
26 | bool dev_ready; | 58 | bool dev_ready; |
27 | enum nand_io xfer_type; | 59 | enum nand_io xfer_type; |
@@ -30,14 +62,4 @@ struct omap_nand_platform_data { | |||
30 | struct gpmc_nand_regs reg; | 62 | struct gpmc_nand_regs reg; |
31 | }; | 63 | }; |
32 | 64 | ||
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 | 65 | #endif |
diff --git a/include/linux/platform_data/mtd-onenand-omap2.h b/include/linux/platform_data/mtd-onenand-omap2.h index 2858667d2e4f..685af7e8b120 100644 --- a/include/linux/platform_data/mtd-onenand-omap2.h +++ b/include/linux/platform_data/mtd-onenand-omap2.h | |||
@@ -9,17 +9,15 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef __MTD_ONENAND_OMAP2_H | ||
13 | #define __MTD_ONENAND_OMAP2_H | ||
14 | |||
12 | #include <linux/mtd/mtd.h> | 15 | #include <linux/mtd/mtd.h> |
13 | #include <linux/mtd/partitions.h> | 16 | #include <linux/mtd/partitions.h> |
14 | 17 | ||
15 | #define ONENAND_SYNC_READ (1 << 0) | 18 | #define ONENAND_SYNC_READ (1 << 0) |
16 | #define ONENAND_SYNC_READWRITE (1 << 1) | 19 | #define ONENAND_SYNC_READWRITE (1 << 1) |
17 | 20 | #define ONENAND_IN_OMAP34XX (1 << 2) | |
18 | struct onenand_freq_info { | ||
19 | u16 maf_id; | ||
20 | u16 dev_id; | ||
21 | u16 ver_id; | ||
22 | }; | ||
23 | 21 | ||
24 | struct omap_onenand_platform_data { | 22 | struct omap_onenand_platform_data { |
25 | int cs; | 23 | int cs; |
@@ -27,27 +25,9 @@ struct omap_onenand_platform_data { | |||
27 | struct mtd_partition *parts; | 25 | struct mtd_partition *parts; |
28 | int nr_parts; | 26 | int nr_parts; |
29 | int (*onenand_setup)(void __iomem *, int *freq_ptr); | 27 | 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; | 28 | int dma_channel; |
33 | u8 flags; | 29 | u8 flags; |
34 | u8 regulator_can_sleep; | 30 | u8 regulator_can_sleep; |
35 | u8 skip_initial_unlocking; | 31 | u8 skip_initial_unlocking; |
36 | }; | 32 | }; |
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 | 33 | #endif |
diff --git a/include/linux/platform_data/usb-omap.h b/include/linux/platform_data/usb-omap.h new file mode 100644 index 000000000000..8570bcfe6311 --- /dev/null +++ b/include/linux/platform_data/usb-omap.h | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * usb-omap.h - Platform data for the various OMAP USB IPs | ||
3 | * | ||
4 | * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com | ||
5 | * | ||
6 | * This software is distributed under the terms of the GNU General Public | ||
7 | * License ("GPL") version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
10 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
11 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
12 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
13 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
14 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
15 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
16 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
17 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
18 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
19 | * POSSIBILITY OF SUCH DAMAGE. | ||
20 | */ | ||
21 | |||
22 | #define OMAP3_HS_USB_PORTS 3 | ||
23 | |||
24 | enum usbhs_omap_port_mode { | ||
25 | OMAP_USBHS_PORT_MODE_UNUSED, | ||
26 | OMAP_EHCI_PORT_MODE_PHY, | ||
27 | OMAP_EHCI_PORT_MODE_TLL, | ||
28 | OMAP_EHCI_PORT_MODE_HSIC, | ||
29 | OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0, | ||
30 | OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM, | ||
31 | OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0, | ||
32 | OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM, | ||
33 | OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0, | ||
34 | OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM, | ||
35 | OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0, | ||
36 | OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM, | ||
37 | OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0, | ||
38 | OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM | ||
39 | }; | ||
40 | |||
41 | struct usbtll_omap_platform_data { | ||
42 | enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; | ||
43 | }; | ||
44 | |||
45 | struct ehci_hcd_omap_platform_data { | ||
46 | enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; | ||
47 | int reset_gpio_port[OMAP3_HS_USB_PORTS]; | ||
48 | struct regulator *regulator[OMAP3_HS_USB_PORTS]; | ||
49 | unsigned phy_reset:1; | ||
50 | }; | ||
51 | |||
52 | struct ohci_hcd_omap_platform_data { | ||
53 | enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; | ||
54 | unsigned es2_compatibility:1; | ||
55 | }; | ||
56 | |||
57 | struct usbhs_omap_platform_data { | ||
58 | enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; | ||
59 | |||
60 | struct ehci_hcd_omap_platform_data *ehci_data; | ||
61 | struct ohci_hcd_omap_platform_data *ohci_data; | ||
62 | }; | ||
63 | |||
64 | /*-------------------------------------------------------------------------*/ | ||
65 | |||
66 | struct omap_musb_board_data { | ||
67 | u8 interface_type; | ||
68 | u8 mode; | ||
69 | u16 power; | ||
70 | unsigned extvbus:1; | ||
71 | void (*set_phy_power)(u8 on); | ||
72 | void (*clear_irq)(void); | ||
73 | void (*set_mode)(u8 mode); | ||
74 | void (*reset)(void); | ||
75 | }; | ||
76 | |||
77 | enum musb_interface { | ||
78 | MUSB_INTERFACE_ULPI, | ||
79 | MUSB_INTERFACE_UTMI | ||
80 | }; | ||
diff --git a/include/linux/tty.h b/include/linux/tty.h index f0b4eb47297c..d7ff88fb8967 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -188,7 +188,9 @@ struct tty_port_operations { | |||
188 | }; | 188 | }; |
189 | 189 | ||
190 | struct tty_port { | 190 | struct tty_port { |
191 | struct tty_bufhead buf; /* Locked internally */ | ||
191 | struct tty_struct *tty; /* Back pointer */ | 192 | struct tty_struct *tty; /* Back pointer */ |
193 | struct tty_struct *itty; /* internal back ptr */ | ||
192 | const struct tty_port_operations *ops; /* Port operations */ | 194 | const struct tty_port_operations *ops; /* Port operations */ |
193 | spinlock_t lock; /* Lock protecting tty field */ | 195 | spinlock_t lock; /* Lock protecting tty field */ |
194 | int blocked_open; /* Waiting to open */ | 196 | int blocked_open; /* Waiting to open */ |
@@ -197,6 +199,9 @@ struct tty_port { | |||
197 | wait_queue_head_t close_wait; /* Close waiters */ | 199 | wait_queue_head_t close_wait; /* Close waiters */ |
198 | wait_queue_head_t delta_msr_wait; /* Modem status change */ | 200 | wait_queue_head_t delta_msr_wait; /* Modem status change */ |
199 | unsigned long flags; /* TTY flags ASY_*/ | 201 | unsigned long flags; /* TTY flags ASY_*/ |
202 | unsigned long iflags; /* TTYP_ internal flags */ | ||
203 | #define TTYP_FLUSHING 1 /* Flushing to ldisc in progress */ | ||
204 | #define TTYP_FLUSHPENDING 2 /* Queued buffer flush pending */ | ||
200 | unsigned char console:1; /* port is a console */ | 205 | unsigned char console:1; /* port is a console */ |
201 | struct mutex mutex; /* Locking */ | 206 | struct mutex mutex; /* Locking */ |
202 | struct mutex buf_mutex; /* Buffer alloc lock */ | 207 | struct mutex buf_mutex; /* Buffer alloc lock */ |
@@ -235,6 +240,7 @@ struct tty_struct { | |||
235 | struct mutex ldisc_mutex; | 240 | struct mutex ldisc_mutex; |
236 | struct tty_ldisc *ldisc; | 241 | struct tty_ldisc *ldisc; |
237 | 242 | ||
243 | struct mutex atomic_write_lock; | ||
238 | struct mutex legacy_mutex; | 244 | struct mutex legacy_mutex; |
239 | struct mutex termios_mutex; | 245 | struct mutex termios_mutex; |
240 | spinlock_t ctrl_lock; | 246 | spinlock_t ctrl_lock; |
@@ -254,7 +260,6 @@ struct tty_struct { | |||
254 | 260 | ||
255 | struct tty_struct *link; | 261 | struct tty_struct *link; |
256 | struct fasync_struct *fasync; | 262 | struct fasync_struct *fasync; |
257 | struct tty_bufhead buf; /* Locked internally */ | ||
258 | int alt_speed; /* For magic substitution of 38400 bps */ | 263 | int alt_speed; /* For magic substitution of 38400 bps */ |
259 | wait_queue_head_t write_wait; | 264 | wait_queue_head_t write_wait; |
260 | wait_queue_head_t read_wait; | 265 | wait_queue_head_t read_wait; |
@@ -265,37 +270,10 @@ struct tty_struct { | |||
265 | 270 | ||
266 | #define N_TTY_BUF_SIZE 4096 | 271 | #define N_TTY_BUF_SIZE 4096 |
267 | 272 | ||
268 | /* | ||
269 | * The following is data for the N_TTY line discipline. For | ||
270 | * historical reasons, this is included in the tty structure. | ||
271 | * Mostly locked by the BKL. | ||
272 | */ | ||
273 | unsigned int column; | ||
274 | unsigned char lnext:1, erasing:1, raw:1, real_raw:1, icanon:1; | ||
275 | unsigned char closing:1; | 273 | unsigned char closing:1; |
276 | unsigned char echo_overrun:1; | ||
277 | unsigned short minimum_to_wake; | 274 | unsigned short minimum_to_wake; |
278 | unsigned long overrun_time; | ||
279 | int num_overrun; | ||
280 | unsigned long process_char_map[256/(8*sizeof(unsigned long))]; | ||
281 | char *read_buf; | ||
282 | int read_head; | ||
283 | int read_tail; | ||
284 | int read_cnt; | ||
285 | unsigned long read_flags[N_TTY_BUF_SIZE/(8*sizeof(unsigned long))]; | ||
286 | unsigned char *echo_buf; | ||
287 | unsigned int echo_pos; | ||
288 | unsigned int echo_cnt; | ||
289 | int canon_data; | ||
290 | unsigned long canon_head; | ||
291 | unsigned int canon_column; | ||
292 | struct mutex atomic_read_lock; | ||
293 | struct mutex atomic_write_lock; | ||
294 | struct mutex output_lock; | ||
295 | struct mutex echo_lock; | ||
296 | unsigned char *write_buf; | 275 | unsigned char *write_buf; |
297 | int write_cnt; | 276 | int write_cnt; |
298 | spinlock_t read_lock; | ||
299 | /* If the tty has a pending do_SAK, queue it here - akpm */ | 277 | /* If the tty has a pending do_SAK, queue it here - akpm */ |
300 | struct work_struct SAK_work; | 278 | struct work_struct SAK_work; |
301 | struct tty_port *port; | 279 | struct tty_port *port; |
@@ -335,8 +313,6 @@ struct tty_file_private { | |||
335 | #define TTY_PTY_LOCK 16 /* pty private */ | 313 | #define TTY_PTY_LOCK 16 /* pty private */ |
336 | #define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */ | 314 | #define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */ |
337 | #define TTY_HUPPED 18 /* Post driver->hangup() */ | 315 | #define TTY_HUPPED 18 /* Post driver->hangup() */ |
338 | #define TTY_FLUSHING 19 /* Flushing to ldisc in progress */ | ||
339 | #define TTY_FLUSHPENDING 20 /* Queued buffer flush pending */ | ||
340 | #define TTY_HUPPING 21 /* ->hangup() in progress */ | 316 | #define TTY_HUPPING 21 /* ->hangup() in progress */ |
341 | 317 | ||
342 | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) | 318 | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) |
@@ -412,9 +388,9 @@ extern void disassociate_ctty(int priv); | |||
412 | extern void no_tty(void); | 388 | extern void no_tty(void); |
413 | extern void tty_flip_buffer_push(struct tty_struct *tty); | 389 | extern void tty_flip_buffer_push(struct tty_struct *tty); |
414 | extern void tty_flush_to_ldisc(struct tty_struct *tty); | 390 | extern void tty_flush_to_ldisc(struct tty_struct *tty); |
415 | extern void tty_buffer_free_all(struct tty_struct *tty); | 391 | extern void tty_buffer_free_all(struct tty_port *port); |
416 | extern void tty_buffer_flush(struct tty_struct *tty); | 392 | extern void tty_buffer_flush(struct tty_struct *tty); |
417 | extern void tty_buffer_init(struct tty_struct *tty); | 393 | extern void tty_buffer_init(struct tty_port *port); |
418 | extern speed_t tty_get_baud_rate(struct tty_struct *tty); | 394 | extern speed_t tty_get_baud_rate(struct tty_struct *tty); |
419 | extern speed_t tty_termios_baud_rate(struct ktermios *termios); | 395 | extern speed_t tty_termios_baud_rate(struct ktermios *termios); |
420 | extern speed_t tty_termios_input_baud_rate(struct ktermios *termios); | 396 | extern speed_t tty_termios_input_baud_rate(struct ktermios *termios); |
@@ -535,7 +511,7 @@ extern void n_tty_inherit_ops(struct tty_ldisc_ops *ops); | |||
535 | /* tty_audit.c */ | 511 | /* tty_audit.c */ |
536 | #ifdef CONFIG_AUDIT | 512 | #ifdef CONFIG_AUDIT |
537 | extern void tty_audit_add_data(struct tty_struct *tty, unsigned char *data, | 513 | extern void tty_audit_add_data(struct tty_struct *tty, unsigned char *data, |
538 | size_t size); | 514 | size_t size, unsigned icanon); |
539 | extern void tty_audit_exit(void); | 515 | extern void tty_audit_exit(void); |
540 | extern void tty_audit_fork(struct signal_struct *sig); | 516 | extern void tty_audit_fork(struct signal_struct *sig); |
541 | extern void tty_audit_tiocsti(struct tty_struct *tty, char ch); | 517 | extern void tty_audit_tiocsti(struct tty_struct *tty, char ch); |
@@ -544,7 +520,7 @@ extern int tty_audit_push_task(struct task_struct *tsk, | |||
544 | kuid_t loginuid, u32 sessionid); | 520 | kuid_t loginuid, u32 sessionid); |
545 | #else | 521 | #else |
546 | static inline void tty_audit_add_data(struct tty_struct *tty, | 522 | static inline void tty_audit_add_data(struct tty_struct *tty, |
547 | unsigned char *data, size_t size) | 523 | unsigned char *data, size_t size, unsigned icanon) |
548 | { | 524 | { |
549 | } | 525 | } |
550 | static inline void tty_audit_tiocsti(struct tty_struct *tty, char ch) | 526 | static inline void tty_audit_tiocsti(struct tty_struct *tty, char ch) |
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index 9239d033a0a3..2002344ed36a 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h | |||
@@ -11,7 +11,7 @@ void tty_schedule_flip(struct tty_struct *tty); | |||
11 | static inline int tty_insert_flip_char(struct tty_struct *tty, | 11 | static inline int tty_insert_flip_char(struct tty_struct *tty, |
12 | unsigned char ch, char flag) | 12 | unsigned char ch, char flag) |
13 | { | 13 | { |
14 | struct tty_buffer *tb = tty->buf.tail; | 14 | struct tty_buffer *tb = tty->port->buf.tail; |
15 | if (tb && tb->used < tb->size) { | 15 | if (tb && tb->used < tb->size) { |
16 | tb->flag_buf_ptr[tb->used] = flag; | 16 | tb->flag_buf_ptr[tb->used] = flag; |
17 | tb->char_buf_ptr[tb->used++] = ch; | 17 | tb->char_buf_ptr[tb->used++] = ch; |
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 3729173b7fbc..88c829466fc1 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
@@ -314,6 +314,19 @@ int dsi_vc_send_bta_sync(struct omap_dss_device *dssdev, int channel); | |||
314 | int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel); | 314 | int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel); |
315 | void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel); | 315 | void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel); |
316 | 316 | ||
317 | enum omapdss_version { | ||
318 | OMAPDSS_VER_UNKNOWN = 0, | ||
319 | OMAPDSS_VER_OMAP24xx, | ||
320 | OMAPDSS_VER_OMAP34xx_ES1, /* OMAP3430 ES1.0, 2.0 */ | ||
321 | OMAPDSS_VER_OMAP34xx_ES3, /* OMAP3430 ES3.0+ */ | ||
322 | OMAPDSS_VER_OMAP3630, | ||
323 | OMAPDSS_VER_AM35xx, | ||
324 | OMAPDSS_VER_OMAP4430_ES1, /* OMAP4430 ES1.0 */ | ||
325 | OMAPDSS_VER_OMAP4430_ES2, /* OMAP4430 ES2.0, 2.1, 2.2 */ | ||
326 | OMAPDSS_VER_OMAP4, /* All other OMAP4s */ | ||
327 | OMAPDSS_VER_OMAP5, | ||
328 | }; | ||
329 | |||
317 | /* Board specific data */ | 330 | /* Board specific data */ |
318 | struct omap_dss_board_info { | 331 | struct omap_dss_board_info { |
319 | int (*get_context_loss_count)(struct device *dev); | 332 | int (*get_context_loss_count)(struct device *dev); |
@@ -323,6 +336,7 @@ struct omap_dss_board_info { | |||
323 | int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask); | 336 | int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask); |
324 | void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask); | 337 | void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask); |
325 | int (*set_min_bus_tput)(struct device *dev, unsigned long r); | 338 | int (*set_min_bus_tput)(struct device *dev, unsigned long r); |
339 | enum omapdss_version version; | ||
326 | }; | 340 | }; |
327 | 341 | ||
328 | /* Init with the board info */ | 342 | /* Init with the board info */ |
diff --git a/include/video/omapvrfb.h b/include/video/omapvrfb.h new file mode 100644 index 000000000000..bb0bd89f8bc6 --- /dev/null +++ b/include/video/omapvrfb.h | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * VRFB Rotation Engine | ||
3 | * | ||
4 | * Copyright (C) 2009 Nokia Corporation | ||
5 | * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com> | ||
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 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef __OMAP_VRFB_H__ | ||
22 | #define __OMAP_VRFB_H__ | ||
23 | |||
24 | #define OMAP_VRFB_LINE_LEN 2048 | ||
25 | |||
26 | struct vrfb { | ||
27 | u8 context; | ||
28 | void __iomem *vaddr[4]; | ||
29 | unsigned long paddr[4]; | ||
30 | u16 xres; | ||
31 | u16 yres; | ||
32 | u16 xoffset; | ||
33 | u16 yoffset; | ||
34 | u8 bytespp; | ||
35 | bool yuv_mode; | ||
36 | }; | ||
37 | |||
38 | #ifdef CONFIG_OMAP2_VRFB | ||
39 | extern bool omap_vrfb_supported(void); | ||
40 | extern int omap_vrfb_request_ctx(struct vrfb *vrfb); | ||
41 | extern void omap_vrfb_release_ctx(struct vrfb *vrfb); | ||
42 | extern void omap_vrfb_adjust_size(u16 *width, u16 *height, | ||
43 | u8 bytespp); | ||
44 | extern u32 omap_vrfb_min_phys_size(u16 width, u16 height, u8 bytespp); | ||
45 | extern u16 omap_vrfb_max_height(u32 phys_size, u16 width, u8 bytespp); | ||
46 | extern void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr, | ||
47 | u16 width, u16 height, | ||
48 | unsigned bytespp, bool yuv_mode); | ||
49 | extern int omap_vrfb_map_angle(struct vrfb *vrfb, u16 height, u8 rot); | ||
50 | extern void omap_vrfb_restore_context(void); | ||
51 | |||
52 | #else | ||
53 | static inline bool omap_vrfb_supported(void) { return false; } | ||
54 | static inline int omap_vrfb_request_ctx(struct vrfb *vrfb) { return 0; } | ||
55 | static inline void omap_vrfb_release_ctx(struct vrfb *vrfb) {} | ||
56 | static inline void omap_vrfb_adjust_size(u16 *width, u16 *height, | ||
57 | u8 bytespp) {} | ||
58 | static inline u32 omap_vrfb_min_phys_size(u16 width, u16 height, u8 bytespp) | ||
59 | { return 0; } | ||
60 | static inline u16 omap_vrfb_max_height(u32 phys_size, u16 width, u8 bytespp) | ||
61 | { return 0; } | ||
62 | static inline void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr, | ||
63 | u16 width, u16 height, unsigned bytespp, bool yuv_mode) {} | ||
64 | static inline int omap_vrfb_map_angle(struct vrfb *vrfb, u16 height, u8 rot) | ||
65 | { return 0; } | ||
66 | static inline void omap_vrfb_restore_context(void) {} | ||
67 | #endif | ||
68 | #endif /* __VRFB_H */ | ||