diff options
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/board-cm-t35.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-overo.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-zoom-debugboard.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock44xx_data.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap2/hsmmc.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/i2c.c | 68 | ||||
-rw-r--r-- | arch/arm/mach-omap2/iommu2.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap-iommu.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 27 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_2420_data.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_2430_data.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 81 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/powerdomains44xx_data.c | 9 |
16 files changed, 223 insertions, 49 deletions
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 35891d49c631..f0749215df11 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -1,8 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * board-cm-t35.c (CompuLab CM-T35 module) | 2 | * board-cm-t35.c (CompuLab CM-T35 module) |
3 | * | 3 | * |
4 | * Copyright (C) 2009 CompuLab, Ltd. | 4 | * Copyright (C) 2009-2011 CompuLab, Ltd. |
5 | * Author: Mike Rapoport <mike@compulab.co.il> | 5 | * Authors: Mike Rapoport <mike@compulab.co.il> |
6 | * Igor Grinberg <grinberg@compulab.co.il> | ||
6 | * | 7 | * |
7 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License | 9 | * modify it under the terms of the GNU General Public License |
@@ -13,11 +14,6 @@ | |||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 | * General Public License for more details. | 15 | * General Public License for more details. |
15 | * | 16 | * |
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., 51 Franklin St, Fifth Floor, Boston, MA | ||
19 | * 02110-1301 USA | ||
20 | * | ||
21 | */ | 17 | */ |
22 | 18 | ||
23 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
@@ -149,12 +145,12 @@ static struct mtd_partition cm_t35_nand_partitions[] = { | |||
149 | }, | 145 | }, |
150 | { | 146 | { |
151 | .name = "linux", | 147 | .name = "linux", |
152 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */ | 148 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x2A0000 */ |
153 | .size = 32 * NAND_BLOCK_SIZE, | 149 | .size = 32 * NAND_BLOCK_SIZE, |
154 | }, | 150 | }, |
155 | { | 151 | { |
156 | .name = "rootfs", | 152 | .name = "rootfs", |
157 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */ | 153 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x6A0000 */ |
158 | .size = MTDPART_SIZ_FULL, | 154 | .size = MTDPART_SIZ_FULL, |
159 | }, | 155 | }, |
160 | }; | 156 | }; |
@@ -433,9 +429,9 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio, | |||
433 | if (gpio_request_one(wlan_rst, GPIOF_OUT_INIT_HIGH, "WLAN RST") == 0) { | 429 | if (gpio_request_one(wlan_rst, GPIOF_OUT_INIT_HIGH, "WLAN RST") == 0) { |
434 | gpio_export(wlan_rst, 0); | 430 | gpio_export(wlan_rst, 0); |
435 | udelay(10); | 431 | udelay(10); |
436 | gpio_set_value(wlan_rst, 0); | 432 | gpio_set_value_cansleep(wlan_rst, 0); |
437 | udelay(10); | 433 | udelay(10); |
438 | gpio_set_value(wlan_rst, 1); | 434 | gpio_set_value_cansleep(wlan_rst, 1); |
439 | } else { | 435 | } else { |
440 | pr_err("CM-T35: could not obtain gpio for WiFi reset\n"); | 436 | pr_err("CM-T35: could not obtain gpio for WiFi reset\n"); |
441 | } | 437 | } |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index f1f18d03d24c..f949a9954d76 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -519,7 +519,6 @@ static void __init overo_init(void) | |||
519 | usb_musb_init(NULL); | 519 | usb_musb_init(NULL); |
520 | usbhs_init(&usbhs_bdata); | 520 | usbhs_init(&usbhs_bdata); |
521 | overo_spi_init(); | 521 | overo_spi_init(); |
522 | overo_ads7846_init(); | ||
523 | overo_init_smsc911x(); | 522 | overo_init_smsc911x(); |
524 | overo_display_init(); | 523 | overo_display_init(); |
525 | overo_init_led(); | 524 | overo_init_led(); |
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c index 6402e781c458..369c2eb7715b 100644 --- a/arch/arm/mach-omap2/board-zoom-debugboard.c +++ b/arch/arm/mach-omap2/board-zoom-debugboard.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #define ZOOM_SMSC911X_GPIO 158 | 23 | #define ZOOM_SMSC911X_GPIO 158 |
24 | #define ZOOM_QUADUART_CS 3 | 24 | #define ZOOM_QUADUART_CS 3 |
25 | #define ZOOM_QUADUART_GPIO 102 | 25 | #define ZOOM_QUADUART_GPIO 102 |
26 | #define ZOOM_QUADUART_RST_GPIO 152 | ||
26 | #define QUART_CLK 1843200 | 27 | #define QUART_CLK 1843200 |
27 | #define DEBUG_BASE 0x08000000 | 28 | #define DEBUG_BASE 0x08000000 |
28 | #define ZOOM_ETHR_START DEBUG_BASE | 29 | #define ZOOM_ETHR_START DEBUG_BASE |
@@ -67,6 +68,14 @@ static inline void __init zoom_init_quaduart(void) | |||
67 | unsigned long cs_mem_base; | 68 | unsigned long cs_mem_base; |
68 | int quart_gpio = 0; | 69 | int quart_gpio = 0; |
69 | 70 | ||
71 | if (gpio_request_one(ZOOM_QUADUART_RST_GPIO, | ||
72 | GPIOF_OUT_INIT_LOW, | ||
73 | "TL16CP754C GPIO") < 0) { | ||
74 | pr_err("Failed to request GPIO%d for TL16CP754C\n", | ||
75 | ZOOM_QUADUART_RST_GPIO); | ||
76 | return; | ||
77 | } | ||
78 | |||
70 | quart_cs = ZOOM_QUADUART_CS; | 79 | quart_cs = ZOOM_QUADUART_CS; |
71 | 80 | ||
72 | if (gpmc_cs_request(quart_cs, SZ_1M, &cs_mem_base) < 0) { | 81 | if (gpmc_cs_request(quart_cs, SZ_1M, &cs_mem_base) < 0) { |
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 180299e4a838..bf9c36c7dffd 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -453,6 +453,7 @@ int __init omap2_clk_switch_mpurate_at_boot(const char *mpurate_ck_name) | |||
453 | if (IS_ERR_VALUE(r)) { | 453 | if (IS_ERR_VALUE(r)) { |
454 | WARN(1, "clock: %s: unable to set MPU rate to %d: %d\n", | 454 | WARN(1, "clock: %s: unable to set MPU rate to %d: %d\n", |
455 | mpurate_ck->name, mpurate, r); | 455 | mpurate_ck->name, mpurate, r); |
456 | clk_put(mpurate_ck); | ||
456 | return -EINVAL; | 457 | return -EINVAL; |
457 | } | 458 | } |
458 | 459 | ||
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 5b7cab794fb9..25473a1db3e7 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -1639,6 +1639,7 @@ static struct clk gpmc_ick = { | |||
1639 | .ops = &clkops_omap2_dflt, | 1639 | .ops = &clkops_omap2_dflt, |
1640 | .enable_reg = OMAP4430_CM_L3_2_GPMC_CLKCTRL, | 1640 | .enable_reg = OMAP4430_CM_L3_2_GPMC_CLKCTRL, |
1641 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 1641 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
1642 | .flags = ENABLE_ON_INIT, | ||
1642 | .clkdm_name = "l3_2_clkdm", | 1643 | .clkdm_name = "l3_2_clkdm", |
1643 | .parent = &l3_div_ck, | 1644 | .parent = &l3_div_ck, |
1644 | .recalc = &followparent_recalc, | 1645 | .recalc = &followparent_recalc, |
@@ -3068,10 +3069,10 @@ static struct omap_clk omap44xx_clks[] = { | |||
3068 | CLK(NULL, "dmic_sync_mux_ck", &dmic_sync_mux_ck, CK_443X), | 3069 | CLK(NULL, "dmic_sync_mux_ck", &dmic_sync_mux_ck, CK_443X), |
3069 | CLK(NULL, "dmic_fck", &dmic_fck, CK_443X), | 3070 | CLK(NULL, "dmic_fck", &dmic_fck, CK_443X), |
3070 | CLK(NULL, "dsp_fck", &dsp_fck, CK_443X), | 3071 | CLK(NULL, "dsp_fck", &dsp_fck, CK_443X), |
3071 | CLK("omapdss_dss", "sys_clk", &dss_sys_clk, CK_443X), | 3072 | CLK(NULL, "dss_sys_clk", &dss_sys_clk, CK_443X), |
3072 | CLK("omapdss_dss", "tv_clk", &dss_tv_clk, CK_443X), | 3073 | CLK(NULL, "dss_tv_clk", &dss_tv_clk, CK_443X), |
3073 | CLK("omapdss_dss", "video_clk", &dss_48mhz_clk, CK_443X), | 3074 | CLK(NULL, "dss_48mhz_clk", &dss_48mhz_clk, CK_443X), |
3074 | CLK("omapdss_dss", "fck", &dss_dss_clk, CK_443X), | 3075 | CLK(NULL, "dss_dss_clk", &dss_dss_clk, CK_443X), |
3075 | CLK("omapdss_dss", "ick", &dss_fck, CK_443X), | 3076 | CLK("omapdss_dss", "ick", &dss_fck, CK_443X), |
3076 | CLK(NULL, "efuse_ctrl_cust_fck", &efuse_ctrl_cust_fck, CK_443X), | 3077 | CLK(NULL, "efuse_ctrl_cust_fck", &efuse_ctrl_cust_fck, CK_443X), |
3077 | CLK(NULL, "emif1_fck", &emif1_fck, CK_443X), | 3078 | CLK(NULL, "emif1_fck", &emif1_fck, CK_443X), |
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 66868c5d5a29..a9b45c76e1d3 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/gpio.h> | ||
16 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
17 | #include <plat/mmc.h> | 18 | #include <plat/mmc.h> |
18 | #include <plat/omap-pm.h> | 19 | #include <plat/omap-pm.h> |
@@ -213,12 +214,10 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on, | |||
213 | static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller, | 214 | static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller, |
214 | int controller_nr) | 215 | int controller_nr) |
215 | { | 216 | { |
216 | if ((mmc_controller->slots[0].switch_pin > 0) && \ | 217 | if (gpio_is_valid(mmc_controller->slots[0].switch_pin)) |
217 | (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES)) | ||
218 | omap_mux_init_gpio(mmc_controller->slots[0].switch_pin, | 218 | omap_mux_init_gpio(mmc_controller->slots[0].switch_pin, |
219 | OMAP_PIN_INPUT_PULLUP); | 219 | OMAP_PIN_INPUT_PULLUP); |
220 | if ((mmc_controller->slots[0].gpio_wp > 0) && \ | 220 | if (gpio_is_valid(mmc_controller->slots[0].gpio_wp)) |
221 | (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES)) | ||
222 | omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, | 221 | omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, |
223 | OMAP_PIN_INPUT_PULLUP); | 222 | OMAP_PIN_INPUT_PULLUP); |
224 | if (cpu_is_omap34xx()) { | 223 | if (cpu_is_omap34xx()) { |
diff --git a/arch/arm/mach-omap2/i2c.c b/arch/arm/mach-omap2/i2c.c index 79c478c4cb1c..ace99944e96f 100644 --- a/arch/arm/mach-omap2/i2c.c +++ b/arch/arm/mach-omap2/i2c.c | |||
@@ -21,9 +21,19 @@ | |||
21 | 21 | ||
22 | #include <plat/cpu.h> | 22 | #include <plat/cpu.h> |
23 | #include <plat/i2c.h> | 23 | #include <plat/i2c.h> |
24 | #include <plat/common.h> | ||
25 | #include <plat/omap_hwmod.h> | ||
24 | 26 | ||
25 | #include "mux.h" | 27 | #include "mux.h" |
26 | 28 | ||
29 | /* In register I2C_CON, Bit 15 is the I2C enable bit */ | ||
30 | #define I2C_EN BIT(15) | ||
31 | #define OMAP2_I2C_CON_OFFSET 0x24 | ||
32 | #define OMAP4_I2C_CON_OFFSET 0xA4 | ||
33 | |||
34 | /* Maximum microseconds to wait for OMAP module to softreset */ | ||
35 | #define MAX_MODULE_SOFTRESET_WAIT 10000 | ||
36 | |||
27 | void __init omap2_i2c_mux_pins(int bus_id) | 37 | void __init omap2_i2c_mux_pins(int bus_id) |
28 | { | 38 | { |
29 | char mux_name[sizeof("i2c2_scl.i2c2_scl")]; | 39 | char mux_name[sizeof("i2c2_scl.i2c2_scl")]; |
@@ -37,3 +47,61 @@ void __init omap2_i2c_mux_pins(int bus_id) | |||
37 | sprintf(mux_name, "i2c%i_sda.i2c%i_sda", bus_id, bus_id); | 47 | sprintf(mux_name, "i2c%i_sda.i2c%i_sda", bus_id, bus_id); |
38 | omap_mux_init_signal(mux_name, OMAP_PIN_INPUT); | 48 | omap_mux_init_signal(mux_name, OMAP_PIN_INPUT); |
39 | } | 49 | } |
50 | |||
51 | /** | ||
52 | * omap_i2c_reset - reset the omap i2c module. | ||
53 | * @oh: struct omap_hwmod * | ||
54 | * | ||
55 | * The i2c moudle in omap2, omap3 had a special sequence to reset. The | ||
56 | * sequence is: | ||
57 | * - Disable the I2C. | ||
58 | * - Write to SOFTRESET bit. | ||
59 | * - Enable the I2C. | ||
60 | * - Poll on the RESETDONE bit. | ||
61 | * The sequence is implemented in below function. This is called for 2420, | ||
62 | * 2430 and omap3. | ||
63 | */ | ||
64 | int omap_i2c_reset(struct omap_hwmod *oh) | ||
65 | { | ||
66 | u32 v; | ||
67 | u16 i2c_con; | ||
68 | int c = 0; | ||
69 | |||
70 | if (oh->class->rev == OMAP_I2C_IP_VERSION_2) { | ||
71 | i2c_con = OMAP4_I2C_CON_OFFSET; | ||
72 | } else if (oh->class->rev == OMAP_I2C_IP_VERSION_1) { | ||
73 | i2c_con = OMAP2_I2C_CON_OFFSET; | ||
74 | } else { | ||
75 | WARN(1, "Cannot reset I2C block %s: unsupported revision\n", | ||
76 | oh->name); | ||
77 | return -EINVAL; | ||
78 | } | ||
79 | |||
80 | /* Disable I2C */ | ||
81 | v = omap_hwmod_read(oh, i2c_con); | ||
82 | v &= ~I2C_EN; | ||
83 | omap_hwmod_write(v, oh, i2c_con); | ||
84 | |||
85 | /* Write to the SOFTRESET bit */ | ||
86 | omap_hwmod_softreset(oh); | ||
87 | |||
88 | /* Enable I2C */ | ||
89 | v = omap_hwmod_read(oh, i2c_con); | ||
90 | v |= I2C_EN; | ||
91 | omap_hwmod_write(v, oh, i2c_con); | ||
92 | |||
93 | /* Poll on RESETDONE bit */ | ||
94 | omap_test_timeout((omap_hwmod_read(oh, | ||
95 | oh->class->sysc->syss_offs) | ||
96 | & SYSS_RESETDONE_MASK), | ||
97 | MAX_MODULE_SOFTRESET_WAIT, c); | ||
98 | |||
99 | if (c == MAX_MODULE_SOFTRESET_WAIT) | ||
100 | pr_warning("%s: %s: softreset failed (waited %d usec)\n", | ||
101 | __func__, oh->name, MAX_MODULE_SOFTRESET_WAIT); | ||
102 | else | ||
103 | pr_debug("%s: %s: softreset in %d usec\n", __func__, | ||
104 | oh->name, c); | ||
105 | |||
106 | return 0; | ||
107 | } | ||
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index adb083e41acd..f286012783c6 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c | |||
@@ -225,8 +225,8 @@ static u32 omap2_get_pte_attr(struct iotlb_entry *e) | |||
225 | attr = e->mixed << 5; | 225 | attr = e->mixed << 5; |
226 | attr |= e->endian; | 226 | attr |= e->endian; |
227 | attr |= e->elsz >> 3; | 227 | attr |= e->elsz >> 3; |
228 | attr <<= ((e->pgsz & MMU_CAM_PGSZ_4K) ? 0 : 6); | 228 | attr <<= (((e->pgsz == MMU_CAM_PGSZ_4K) || |
229 | 229 | (e->pgsz == MMU_CAM_PGSZ_64K)) ? 0 : 6); | |
230 | return attr; | 230 | return attr; |
231 | } | 231 | } |
232 | 232 | ||
diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c index 3fc5dc7233da..e61feadcda4e 100644 --- a/arch/arm/mach-omap2/omap-iommu.c +++ b/arch/arm/mach-omap2/omap-iommu.c | |||
@@ -67,7 +67,7 @@ static struct iommu_device omap4_devices[] = { | |||
67 | .pdata = { | 67 | .pdata = { |
68 | .name = "ducati", | 68 | .name = "ducati", |
69 | .nr_tlb_entries = 32, | 69 | .nr_tlb_entries = 32, |
70 | .clk_name = "ducati_ick", | 70 | .clk_name = "ipu_fck", |
71 | .da_start = 0x0, | 71 | .da_start = 0x0, |
72 | .da_end = 0xFFFFF000, | 72 | .da_end = 0xFFFFF000, |
73 | }, | 73 | }, |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 7d242c9e2a2c..02b6016393a8 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -1656,6 +1656,33 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs) | |||
1656 | } | 1656 | } |
1657 | 1657 | ||
1658 | /** | 1658 | /** |
1659 | * omap_hwmod_softreset - reset a module via SYSCONFIG.SOFTRESET bit | ||
1660 | * @oh: struct omap_hwmod * | ||
1661 | * | ||
1662 | * This is a public function exposed to drivers. Some drivers may need to do | ||
1663 | * some settings before and after resetting the device. Those drivers after | ||
1664 | * doing the necessary settings could use this function to start a reset by | ||
1665 | * setting the SYSCONFIG.SOFTRESET bit. | ||
1666 | */ | ||
1667 | int omap_hwmod_softreset(struct omap_hwmod *oh) | ||
1668 | { | ||
1669 | u32 v; | ||
1670 | int ret; | ||
1671 | |||
1672 | if (!oh || !(oh->_sysc_cache)) | ||
1673 | return -EINVAL; | ||
1674 | |||
1675 | v = oh->_sysc_cache; | ||
1676 | ret = _set_softreset(oh, &v); | ||
1677 | if (ret) | ||
1678 | goto error; | ||
1679 | _write_sysconfig(v, oh); | ||
1680 | |||
1681 | error: | ||
1682 | return ret; | ||
1683 | } | ||
1684 | |||
1685 | /** | ||
1659 | * omap_hwmod_set_slave_idlemode - set the hwmod's OCP slave idlemode | 1686 | * omap_hwmod_set_slave_idlemode - set the hwmod's OCP slave idlemode |
1660 | * @oh: struct omap_hwmod * | 1687 | * @oh: struct omap_hwmod * |
1661 | * @idlemode: SIDLEMODE field bits (shifted to bit 0) | 1688 | * @idlemode: SIDLEMODE field bits (shifted to bit 0) |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c index f3901abf2c28..a015c69068f6 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c | |||
@@ -1029,9 +1029,16 @@ static struct omap_hwmod_class_sysconfig i2c_sysc = { | |||
1029 | static struct omap_hwmod_class i2c_class = { | 1029 | static struct omap_hwmod_class i2c_class = { |
1030 | .name = "i2c", | 1030 | .name = "i2c", |
1031 | .sysc = &i2c_sysc, | 1031 | .sysc = &i2c_sysc, |
1032 | .rev = OMAP_I2C_IP_VERSION_1, | ||
1033 | .reset = &omap_i2c_reset, | ||
1032 | }; | 1034 | }; |
1033 | 1035 | ||
1034 | static struct omap_i2c_dev_attr i2c_dev_attr; | 1036 | static struct omap_i2c_dev_attr i2c_dev_attr = { |
1037 | .flags = OMAP_I2C_FLAG_NO_FIFO | | ||
1038 | OMAP_I2C_FLAG_SIMPLE_CLOCK | | ||
1039 | OMAP_I2C_FLAG_16BIT_DATA_REG | | ||
1040 | OMAP_I2C_FLAG_BUS_SHIFT_2, | ||
1041 | }; | ||
1035 | 1042 | ||
1036 | /* I2C1 */ | 1043 | /* I2C1 */ |
1037 | 1044 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index 2a52f025bd06..16743c7d6e8e 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -1078,10 +1078,15 @@ static struct omap_hwmod_class_sysconfig i2c_sysc = { | |||
1078 | static struct omap_hwmod_class i2c_class = { | 1078 | static struct omap_hwmod_class i2c_class = { |
1079 | .name = "i2c", | 1079 | .name = "i2c", |
1080 | .sysc = &i2c_sysc, | 1080 | .sysc = &i2c_sysc, |
1081 | .rev = OMAP_I2C_IP_VERSION_1, | ||
1082 | .reset = &omap_i2c_reset, | ||
1081 | }; | 1083 | }; |
1082 | 1084 | ||
1083 | static struct omap_i2c_dev_attr i2c_dev_attr = { | 1085 | static struct omap_i2c_dev_attr i2c_dev_attr = { |
1084 | .fifo_depth = 8, /* bytes */ | 1086 | .fifo_depth = 8, /* bytes */ |
1087 | .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | | ||
1088 | OMAP_I2C_FLAG_BUS_SHIFT_2 | | ||
1089 | OMAP_I2C_FLAG_FORCE_19200_INT_CLK, | ||
1085 | }; | 1090 | }; |
1086 | 1091 | ||
1087 | /* I2C1 */ | 1092 | /* I2C1 */ |
@@ -1092,6 +1097,7 @@ static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = { | |||
1092 | 1097 | ||
1093 | static struct omap_hwmod omap2430_i2c1_hwmod = { | 1098 | static struct omap_hwmod omap2430_i2c1_hwmod = { |
1094 | .name = "i2c1", | 1099 | .name = "i2c1", |
1100 | .flags = HWMOD_16BIT_REG, | ||
1095 | .mpu_irqs = omap2_i2c1_mpu_irqs, | 1101 | .mpu_irqs = omap2_i2c1_mpu_irqs, |
1096 | .sdma_reqs = omap2_i2c1_sdma_reqs, | 1102 | .sdma_reqs = omap2_i2c1_sdma_reqs, |
1097 | .main_clk = "i2chs1_fck", | 1103 | .main_clk = "i2chs1_fck", |
@@ -1127,6 +1133,7 @@ static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = { | |||
1127 | 1133 | ||
1128 | static struct omap_hwmod omap2430_i2c2_hwmod = { | 1134 | static struct omap_hwmod omap2430_i2c2_hwmod = { |
1129 | .name = "i2c2", | 1135 | .name = "i2c2", |
1136 | .flags = HWMOD_16BIT_REG, | ||
1130 | .mpu_irqs = omap2_i2c2_mpu_irqs, | 1137 | .mpu_irqs = omap2_i2c2_mpu_irqs, |
1131 | .sdma_reqs = omap2_i2c2_sdma_reqs, | 1138 | .sdma_reqs = omap2_i2c2_sdma_reqs, |
1132 | .main_clk = "i2chs2_fck", | 1139 | .main_clk = "i2chs2_fck", |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 1a52716e48bf..25bf43b5a4ec 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -1306,8 +1306,10 @@ static struct omap_hwmod omap3xxx_uart4_hwmod = { | |||
1306 | }; | 1306 | }; |
1307 | 1307 | ||
1308 | static struct omap_hwmod_class i2c_class = { | 1308 | static struct omap_hwmod_class i2c_class = { |
1309 | .name = "i2c", | 1309 | .name = "i2c", |
1310 | .sysc = &i2c_sysc, | 1310 | .sysc = &i2c_sysc, |
1311 | .rev = OMAP_I2C_IP_VERSION_1, | ||
1312 | .reset = &omap_i2c_reset, | ||
1311 | }; | 1313 | }; |
1312 | 1314 | ||
1313 | static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = { | 1315 | static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = { |
@@ -1607,6 +1609,9 @@ static struct omap_hwmod omap3xxx_dss_venc_hwmod = { | |||
1607 | 1609 | ||
1608 | static struct omap_i2c_dev_attr i2c1_dev_attr = { | 1610 | static struct omap_i2c_dev_attr i2c1_dev_attr = { |
1609 | .fifo_depth = 8, /* bytes */ | 1611 | .fifo_depth = 8, /* bytes */ |
1612 | .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | | ||
1613 | OMAP_I2C_FLAG_RESET_REGS_POSTIDLE | | ||
1614 | OMAP_I2C_FLAG_BUS_SHIFT_2, | ||
1610 | }; | 1615 | }; |
1611 | 1616 | ||
1612 | static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = { | 1617 | static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = { |
@@ -1615,6 +1620,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = { | |||
1615 | 1620 | ||
1616 | static struct omap_hwmod omap3xxx_i2c1_hwmod = { | 1621 | static struct omap_hwmod omap3xxx_i2c1_hwmod = { |
1617 | .name = "i2c1", | 1622 | .name = "i2c1", |
1623 | .flags = HWMOD_16BIT_REG, | ||
1618 | .mpu_irqs = omap2_i2c1_mpu_irqs, | 1624 | .mpu_irqs = omap2_i2c1_mpu_irqs, |
1619 | .sdma_reqs = omap2_i2c1_sdma_reqs, | 1625 | .sdma_reqs = omap2_i2c1_sdma_reqs, |
1620 | .main_clk = "i2c1_fck", | 1626 | .main_clk = "i2c1_fck", |
@@ -1638,6 +1644,9 @@ static struct omap_hwmod omap3xxx_i2c1_hwmod = { | |||
1638 | 1644 | ||
1639 | static struct omap_i2c_dev_attr i2c2_dev_attr = { | 1645 | static struct omap_i2c_dev_attr i2c2_dev_attr = { |
1640 | .fifo_depth = 8, /* bytes */ | 1646 | .fifo_depth = 8, /* bytes */ |
1647 | .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | | ||
1648 | OMAP_I2C_FLAG_RESET_REGS_POSTIDLE | | ||
1649 | OMAP_I2C_FLAG_BUS_SHIFT_2, | ||
1641 | }; | 1650 | }; |
1642 | 1651 | ||
1643 | static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = { | 1652 | static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = { |
@@ -1646,6 +1655,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = { | |||
1646 | 1655 | ||
1647 | static struct omap_hwmod omap3xxx_i2c2_hwmod = { | 1656 | static struct omap_hwmod omap3xxx_i2c2_hwmod = { |
1648 | .name = "i2c2", | 1657 | .name = "i2c2", |
1658 | .flags = HWMOD_16BIT_REG, | ||
1649 | .mpu_irqs = omap2_i2c2_mpu_irqs, | 1659 | .mpu_irqs = omap2_i2c2_mpu_irqs, |
1650 | .sdma_reqs = omap2_i2c2_sdma_reqs, | 1660 | .sdma_reqs = omap2_i2c2_sdma_reqs, |
1651 | .main_clk = "i2c2_fck", | 1661 | .main_clk = "i2c2_fck", |
@@ -1669,6 +1679,9 @@ static struct omap_hwmod omap3xxx_i2c2_hwmod = { | |||
1669 | 1679 | ||
1670 | static struct omap_i2c_dev_attr i2c3_dev_attr = { | 1680 | static struct omap_i2c_dev_attr i2c3_dev_attr = { |
1671 | .fifo_depth = 64, /* bytes */ | 1681 | .fifo_depth = 64, /* bytes */ |
1682 | .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | | ||
1683 | OMAP_I2C_FLAG_RESET_REGS_POSTIDLE | | ||
1684 | OMAP_I2C_FLAG_BUS_SHIFT_2, | ||
1672 | }; | 1685 | }; |
1673 | 1686 | ||
1674 | static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = { | 1687 | static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = { |
@@ -1688,6 +1701,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = { | |||
1688 | 1701 | ||
1689 | static struct omap_hwmod omap3xxx_i2c3_hwmod = { | 1702 | static struct omap_hwmod omap3xxx_i2c3_hwmod = { |
1690 | .name = "i2c3", | 1703 | .name = "i2c3", |
1704 | .flags = HWMOD_16BIT_REG, | ||
1691 | .mpu_irqs = i2c3_mpu_irqs, | 1705 | .mpu_irqs = i2c3_mpu_irqs, |
1692 | .sdma_reqs = i2c3_sdma_reqs, | 1706 | .sdma_reqs = i2c3_sdma_reqs, |
1693 | .main_clk = "i2c3_fck", | 1707 | .main_clk = "i2c3_fck", |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index e01143725b08..5d5df49749df 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -22,11 +22,13 @@ | |||
22 | 22 | ||
23 | #include <plat/omap_hwmod.h> | 23 | #include <plat/omap_hwmod.h> |
24 | #include <plat/cpu.h> | 24 | #include <plat/cpu.h> |
25 | #include <plat/i2c.h> | ||
25 | #include <plat/gpio.h> | 26 | #include <plat/gpio.h> |
26 | #include <plat/dma.h> | 27 | #include <plat/dma.h> |
27 | #include <plat/mcspi.h> | 28 | #include <plat/mcspi.h> |
28 | #include <plat/mcbsp.h> | 29 | #include <plat/mcbsp.h> |
29 | #include <plat/mmc.h> | 30 | #include <plat/mmc.h> |
31 | #include <plat/i2c.h> | ||
30 | 32 | ||
31 | #include "omap_hwmod_common_data.h" | 33 | #include "omap_hwmod_common_data.h" |
32 | 34 | ||
@@ -1136,7 +1138,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = { | |||
1136 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = { | 1138 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = { |
1137 | .master = &omap44xx_l3_main_2_hwmod, | 1139 | .master = &omap44xx_l3_main_2_hwmod, |
1138 | .slave = &omap44xx_dss_hwmod, | 1140 | .slave = &omap44xx_dss_hwmod, |
1139 | .clk = "l3_div_ck", | 1141 | .clk = "dss_fck", |
1140 | .addr = omap44xx_dss_dma_addrs, | 1142 | .addr = omap44xx_dss_dma_addrs, |
1141 | .user = OCP_USER_SDMA, | 1143 | .user = OCP_USER_SDMA, |
1142 | }; | 1144 | }; |
@@ -1175,7 +1177,7 @@ static struct omap_hwmod_opt_clk dss_opt_clks[] = { | |||
1175 | static struct omap_hwmod omap44xx_dss_hwmod = { | 1177 | static struct omap_hwmod omap44xx_dss_hwmod = { |
1176 | .name = "dss_core", | 1178 | .name = "dss_core", |
1177 | .class = &omap44xx_dss_hwmod_class, | 1179 | .class = &omap44xx_dss_hwmod_class, |
1178 | .main_clk = "dss_fck", | 1180 | .main_clk = "dss_dss_clk", |
1179 | .prcm = { | 1181 | .prcm = { |
1180 | .omap4 = { | 1182 | .omap4 = { |
1181 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | 1183 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, |
@@ -1238,7 +1240,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = { | |||
1238 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = { | 1240 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = { |
1239 | .master = &omap44xx_l3_main_2_hwmod, | 1241 | .master = &omap44xx_l3_main_2_hwmod, |
1240 | .slave = &omap44xx_dss_dispc_hwmod, | 1242 | .slave = &omap44xx_dss_dispc_hwmod, |
1241 | .clk = "l3_div_ck", | 1243 | .clk = "dss_fck", |
1242 | .addr = omap44xx_dss_dispc_dma_addrs, | 1244 | .addr = omap44xx_dss_dispc_dma_addrs, |
1243 | .user = OCP_USER_SDMA, | 1245 | .user = OCP_USER_SDMA, |
1244 | }; | 1246 | }; |
@@ -1267,17 +1269,26 @@ static struct omap_hwmod_ocp_if *omap44xx_dss_dispc_slaves[] = { | |||
1267 | &omap44xx_l4_per__dss_dispc, | 1269 | &omap44xx_l4_per__dss_dispc, |
1268 | }; | 1270 | }; |
1269 | 1271 | ||
1272 | static struct omap_hwmod_opt_clk dss_dispc_opt_clks[] = { | ||
1273 | { .role = "sys_clk", .clk = "dss_sys_clk" }, | ||
1274 | { .role = "tv_clk", .clk = "dss_tv_clk" }, | ||
1275 | { .role = "hdmi_clk", .clk = "dss_48mhz_clk" }, | ||
1276 | }; | ||
1277 | |||
1270 | static struct omap_hwmod omap44xx_dss_dispc_hwmod = { | 1278 | static struct omap_hwmod omap44xx_dss_dispc_hwmod = { |
1271 | .name = "dss_dispc", | 1279 | .name = "dss_dispc", |
1272 | .class = &omap44xx_dispc_hwmod_class, | 1280 | .class = &omap44xx_dispc_hwmod_class, |
1281 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1273 | .mpu_irqs = omap44xx_dss_dispc_irqs, | 1282 | .mpu_irqs = omap44xx_dss_dispc_irqs, |
1274 | .sdma_reqs = omap44xx_dss_dispc_sdma_reqs, | 1283 | .sdma_reqs = omap44xx_dss_dispc_sdma_reqs, |
1275 | .main_clk = "dss_fck", | 1284 | .main_clk = "dss_dss_clk", |
1276 | .prcm = { | 1285 | .prcm = { |
1277 | .omap4 = { | 1286 | .omap4 = { |
1278 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | 1287 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, |
1279 | }, | 1288 | }, |
1280 | }, | 1289 | }, |
1290 | .opt_clks = dss_dispc_opt_clks, | ||
1291 | .opt_clks_cnt = ARRAY_SIZE(dss_dispc_opt_clks), | ||
1281 | .slaves = omap44xx_dss_dispc_slaves, | 1292 | .slaves = omap44xx_dss_dispc_slaves, |
1282 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves), | 1293 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves), |
1283 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 1294 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
@@ -1329,7 +1340,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = { | |||
1329 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = { | 1340 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = { |
1330 | .master = &omap44xx_l3_main_2_hwmod, | 1341 | .master = &omap44xx_l3_main_2_hwmod, |
1331 | .slave = &omap44xx_dss_dsi1_hwmod, | 1342 | .slave = &omap44xx_dss_dsi1_hwmod, |
1332 | .clk = "l3_div_ck", | 1343 | .clk = "dss_fck", |
1333 | .addr = omap44xx_dss_dsi1_dma_addrs, | 1344 | .addr = omap44xx_dss_dsi1_dma_addrs, |
1334 | .user = OCP_USER_SDMA, | 1345 | .user = OCP_USER_SDMA, |
1335 | }; | 1346 | }; |
@@ -1358,17 +1369,23 @@ static struct omap_hwmod_ocp_if *omap44xx_dss_dsi1_slaves[] = { | |||
1358 | &omap44xx_l4_per__dss_dsi1, | 1369 | &omap44xx_l4_per__dss_dsi1, |
1359 | }; | 1370 | }; |
1360 | 1371 | ||
1372 | static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = { | ||
1373 | { .role = "sys_clk", .clk = "dss_sys_clk" }, | ||
1374 | }; | ||
1375 | |||
1361 | static struct omap_hwmod omap44xx_dss_dsi1_hwmod = { | 1376 | static struct omap_hwmod omap44xx_dss_dsi1_hwmod = { |
1362 | .name = "dss_dsi1", | 1377 | .name = "dss_dsi1", |
1363 | .class = &omap44xx_dsi_hwmod_class, | 1378 | .class = &omap44xx_dsi_hwmod_class, |
1364 | .mpu_irqs = omap44xx_dss_dsi1_irqs, | 1379 | .mpu_irqs = omap44xx_dss_dsi1_irqs, |
1365 | .sdma_reqs = omap44xx_dss_dsi1_sdma_reqs, | 1380 | .sdma_reqs = omap44xx_dss_dsi1_sdma_reqs, |
1366 | .main_clk = "dss_fck", | 1381 | .main_clk = "dss_dss_clk", |
1367 | .prcm = { | 1382 | .prcm = { |
1368 | .omap4 = { | 1383 | .omap4 = { |
1369 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | 1384 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, |
1370 | }, | 1385 | }, |
1371 | }, | 1386 | }, |
1387 | .opt_clks = dss_dsi1_opt_clks, | ||
1388 | .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks), | ||
1372 | .slaves = omap44xx_dss_dsi1_slaves, | 1389 | .slaves = omap44xx_dss_dsi1_slaves, |
1373 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_slaves), | 1390 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_slaves), |
1374 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 1391 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
@@ -1399,7 +1416,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = { | |||
1399 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = { | 1416 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = { |
1400 | .master = &omap44xx_l3_main_2_hwmod, | 1417 | .master = &omap44xx_l3_main_2_hwmod, |
1401 | .slave = &omap44xx_dss_dsi2_hwmod, | 1418 | .slave = &omap44xx_dss_dsi2_hwmod, |
1402 | .clk = "l3_div_ck", | 1419 | .clk = "dss_fck", |
1403 | .addr = omap44xx_dss_dsi2_dma_addrs, | 1420 | .addr = omap44xx_dss_dsi2_dma_addrs, |
1404 | .user = OCP_USER_SDMA, | 1421 | .user = OCP_USER_SDMA, |
1405 | }; | 1422 | }; |
@@ -1428,17 +1445,23 @@ static struct omap_hwmod_ocp_if *omap44xx_dss_dsi2_slaves[] = { | |||
1428 | &omap44xx_l4_per__dss_dsi2, | 1445 | &omap44xx_l4_per__dss_dsi2, |
1429 | }; | 1446 | }; |
1430 | 1447 | ||
1448 | static struct omap_hwmod_opt_clk dss_dsi2_opt_clks[] = { | ||
1449 | { .role = "sys_clk", .clk = "dss_sys_clk" }, | ||
1450 | }; | ||
1451 | |||
1431 | static struct omap_hwmod omap44xx_dss_dsi2_hwmod = { | 1452 | static struct omap_hwmod omap44xx_dss_dsi2_hwmod = { |
1432 | .name = "dss_dsi2", | 1453 | .name = "dss_dsi2", |
1433 | .class = &omap44xx_dsi_hwmod_class, | 1454 | .class = &omap44xx_dsi_hwmod_class, |
1434 | .mpu_irqs = omap44xx_dss_dsi2_irqs, | 1455 | .mpu_irqs = omap44xx_dss_dsi2_irqs, |
1435 | .sdma_reqs = omap44xx_dss_dsi2_sdma_reqs, | 1456 | .sdma_reqs = omap44xx_dss_dsi2_sdma_reqs, |
1436 | .main_clk = "dss_fck", | 1457 | .main_clk = "dss_dss_clk", |
1437 | .prcm = { | 1458 | .prcm = { |
1438 | .omap4 = { | 1459 | .omap4 = { |
1439 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | 1460 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, |
1440 | }, | 1461 | }, |
1441 | }, | 1462 | }, |
1463 | .opt_clks = dss_dsi2_opt_clks, | ||
1464 | .opt_clks_cnt = ARRAY_SIZE(dss_dsi2_opt_clks), | ||
1442 | .slaves = omap44xx_dss_dsi2_slaves, | 1465 | .slaves = omap44xx_dss_dsi2_slaves, |
1443 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_slaves), | 1466 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_slaves), |
1444 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 1467 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
@@ -1489,7 +1512,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = { | |||
1489 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = { | 1512 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = { |
1490 | .master = &omap44xx_l3_main_2_hwmod, | 1513 | .master = &omap44xx_l3_main_2_hwmod, |
1491 | .slave = &omap44xx_dss_hdmi_hwmod, | 1514 | .slave = &omap44xx_dss_hdmi_hwmod, |
1492 | .clk = "l3_div_ck", | 1515 | .clk = "dss_fck", |
1493 | .addr = omap44xx_dss_hdmi_dma_addrs, | 1516 | .addr = omap44xx_dss_hdmi_dma_addrs, |
1494 | .user = OCP_USER_SDMA, | 1517 | .user = OCP_USER_SDMA, |
1495 | }; | 1518 | }; |
@@ -1518,17 +1541,23 @@ static struct omap_hwmod_ocp_if *omap44xx_dss_hdmi_slaves[] = { | |||
1518 | &omap44xx_l4_per__dss_hdmi, | 1541 | &omap44xx_l4_per__dss_hdmi, |
1519 | }; | 1542 | }; |
1520 | 1543 | ||
1544 | static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = { | ||
1545 | { .role = "sys_clk", .clk = "dss_sys_clk" }, | ||
1546 | }; | ||
1547 | |||
1521 | static struct omap_hwmod omap44xx_dss_hdmi_hwmod = { | 1548 | static struct omap_hwmod omap44xx_dss_hdmi_hwmod = { |
1522 | .name = "dss_hdmi", | 1549 | .name = "dss_hdmi", |
1523 | .class = &omap44xx_hdmi_hwmod_class, | 1550 | .class = &omap44xx_hdmi_hwmod_class, |
1524 | .mpu_irqs = omap44xx_dss_hdmi_irqs, | 1551 | .mpu_irqs = omap44xx_dss_hdmi_irqs, |
1525 | .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs, | 1552 | .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs, |
1526 | .main_clk = "dss_fck", | 1553 | .main_clk = "dss_dss_clk", |
1527 | .prcm = { | 1554 | .prcm = { |
1528 | .omap4 = { | 1555 | .omap4 = { |
1529 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | 1556 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, |
1530 | }, | 1557 | }, |
1531 | }, | 1558 | }, |
1559 | .opt_clks = dss_hdmi_opt_clks, | ||
1560 | .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks), | ||
1532 | .slaves = omap44xx_dss_hdmi_slaves, | 1561 | .slaves = omap44xx_dss_hdmi_slaves, |
1533 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_slaves), | 1562 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_slaves), |
1534 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 1563 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
@@ -1574,7 +1603,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = { | |||
1574 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = { | 1603 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = { |
1575 | .master = &omap44xx_l3_main_2_hwmod, | 1604 | .master = &omap44xx_l3_main_2_hwmod, |
1576 | .slave = &omap44xx_dss_rfbi_hwmod, | 1605 | .slave = &omap44xx_dss_rfbi_hwmod, |
1577 | .clk = "l3_div_ck", | 1606 | .clk = "dss_fck", |
1578 | .addr = omap44xx_dss_rfbi_dma_addrs, | 1607 | .addr = omap44xx_dss_rfbi_dma_addrs, |
1579 | .user = OCP_USER_SDMA, | 1608 | .user = OCP_USER_SDMA, |
1580 | }; | 1609 | }; |
@@ -1603,16 +1632,22 @@ static struct omap_hwmod_ocp_if *omap44xx_dss_rfbi_slaves[] = { | |||
1603 | &omap44xx_l4_per__dss_rfbi, | 1632 | &omap44xx_l4_per__dss_rfbi, |
1604 | }; | 1633 | }; |
1605 | 1634 | ||
1635 | static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = { | ||
1636 | { .role = "ick", .clk = "dss_fck" }, | ||
1637 | }; | ||
1638 | |||
1606 | static struct omap_hwmod omap44xx_dss_rfbi_hwmod = { | 1639 | static struct omap_hwmod omap44xx_dss_rfbi_hwmod = { |
1607 | .name = "dss_rfbi", | 1640 | .name = "dss_rfbi", |
1608 | .class = &omap44xx_rfbi_hwmod_class, | 1641 | .class = &omap44xx_rfbi_hwmod_class, |
1609 | .sdma_reqs = omap44xx_dss_rfbi_sdma_reqs, | 1642 | .sdma_reqs = omap44xx_dss_rfbi_sdma_reqs, |
1610 | .main_clk = "dss_fck", | 1643 | .main_clk = "dss_dss_clk", |
1611 | .prcm = { | 1644 | .prcm = { |
1612 | .omap4 = { | 1645 | .omap4 = { |
1613 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | 1646 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, |
1614 | }, | 1647 | }, |
1615 | }, | 1648 | }, |
1649 | .opt_clks = dss_rfbi_opt_clks, | ||
1650 | .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks), | ||
1616 | .slaves = omap44xx_dss_rfbi_slaves, | 1651 | .slaves = omap44xx_dss_rfbi_slaves, |
1617 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_slaves), | 1652 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_slaves), |
1618 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 1653 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
@@ -1642,7 +1677,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = { | |||
1642 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = { | 1677 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = { |
1643 | .master = &omap44xx_l3_main_2_hwmod, | 1678 | .master = &omap44xx_l3_main_2_hwmod, |
1644 | .slave = &omap44xx_dss_venc_hwmod, | 1679 | .slave = &omap44xx_dss_venc_hwmod, |
1645 | .clk = "l3_div_ck", | 1680 | .clk = "dss_fck", |
1646 | .addr = omap44xx_dss_venc_dma_addrs, | 1681 | .addr = omap44xx_dss_venc_dma_addrs, |
1647 | .user = OCP_USER_SDMA, | 1682 | .user = OCP_USER_SDMA, |
1648 | }; | 1683 | }; |
@@ -1674,7 +1709,7 @@ static struct omap_hwmod_ocp_if *omap44xx_dss_venc_slaves[] = { | |||
1674 | static struct omap_hwmod omap44xx_dss_venc_hwmod = { | 1709 | static struct omap_hwmod omap44xx_dss_venc_hwmod = { |
1675 | .name = "dss_venc", | 1710 | .name = "dss_venc", |
1676 | .class = &omap44xx_venc_hwmod_class, | 1711 | .class = &omap44xx_venc_hwmod_class, |
1677 | .main_clk = "dss_fck", | 1712 | .main_clk = "dss_dss_clk", |
1678 | .prcm = { | 1713 | .prcm = { |
1679 | .omap4 = { | 1714 | .omap4 = { |
1680 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | 1715 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, |
@@ -2127,6 +2162,12 @@ static struct omap_hwmod_class_sysconfig omap44xx_i2c_sysc = { | |||
2127 | static struct omap_hwmod_class omap44xx_i2c_hwmod_class = { | 2162 | static struct omap_hwmod_class omap44xx_i2c_hwmod_class = { |
2128 | .name = "i2c", | 2163 | .name = "i2c", |
2129 | .sysc = &omap44xx_i2c_sysc, | 2164 | .sysc = &omap44xx_i2c_sysc, |
2165 | .rev = OMAP_I2C_IP_VERSION_2, | ||
2166 | .reset = &omap_i2c_reset, | ||
2167 | }; | ||
2168 | |||
2169 | static struct omap_i2c_dev_attr i2c_dev_attr = { | ||
2170 | .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE, | ||
2130 | }; | 2171 | }; |
2131 | 2172 | ||
2132 | /* i2c1 */ | 2173 | /* i2c1 */ |
@@ -2168,7 +2209,7 @@ static struct omap_hwmod_ocp_if *omap44xx_i2c1_slaves[] = { | |||
2168 | static struct omap_hwmod omap44xx_i2c1_hwmod = { | 2209 | static struct omap_hwmod omap44xx_i2c1_hwmod = { |
2169 | .name = "i2c1", | 2210 | .name = "i2c1", |
2170 | .class = &omap44xx_i2c_hwmod_class, | 2211 | .class = &omap44xx_i2c_hwmod_class, |
2171 | .flags = HWMOD_INIT_NO_RESET, | 2212 | .flags = HWMOD_16BIT_REG, |
2172 | .mpu_irqs = omap44xx_i2c1_irqs, | 2213 | .mpu_irqs = omap44xx_i2c1_irqs, |
2173 | .sdma_reqs = omap44xx_i2c1_sdma_reqs, | 2214 | .sdma_reqs = omap44xx_i2c1_sdma_reqs, |
2174 | .main_clk = "i2c1_fck", | 2215 | .main_clk = "i2c1_fck", |
@@ -2179,6 +2220,7 @@ static struct omap_hwmod omap44xx_i2c1_hwmod = { | |||
2179 | }, | 2220 | }, |
2180 | .slaves = omap44xx_i2c1_slaves, | 2221 | .slaves = omap44xx_i2c1_slaves, |
2181 | .slaves_cnt = ARRAY_SIZE(omap44xx_i2c1_slaves), | 2222 | .slaves_cnt = ARRAY_SIZE(omap44xx_i2c1_slaves), |
2223 | .dev_attr = &i2c_dev_attr, | ||
2182 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 2224 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
2183 | }; | 2225 | }; |
2184 | 2226 | ||
@@ -2221,7 +2263,7 @@ static struct omap_hwmod_ocp_if *omap44xx_i2c2_slaves[] = { | |||
2221 | static struct omap_hwmod omap44xx_i2c2_hwmod = { | 2263 | static struct omap_hwmod omap44xx_i2c2_hwmod = { |
2222 | .name = "i2c2", | 2264 | .name = "i2c2", |
2223 | .class = &omap44xx_i2c_hwmod_class, | 2265 | .class = &omap44xx_i2c_hwmod_class, |
2224 | .flags = HWMOD_INIT_NO_RESET, | 2266 | .flags = HWMOD_16BIT_REG, |
2225 | .mpu_irqs = omap44xx_i2c2_irqs, | 2267 | .mpu_irqs = omap44xx_i2c2_irqs, |
2226 | .sdma_reqs = omap44xx_i2c2_sdma_reqs, | 2268 | .sdma_reqs = omap44xx_i2c2_sdma_reqs, |
2227 | .main_clk = "i2c2_fck", | 2269 | .main_clk = "i2c2_fck", |
@@ -2232,6 +2274,7 @@ static struct omap_hwmod omap44xx_i2c2_hwmod = { | |||
2232 | }, | 2274 | }, |
2233 | .slaves = omap44xx_i2c2_slaves, | 2275 | .slaves = omap44xx_i2c2_slaves, |
2234 | .slaves_cnt = ARRAY_SIZE(omap44xx_i2c2_slaves), | 2276 | .slaves_cnt = ARRAY_SIZE(omap44xx_i2c2_slaves), |
2277 | .dev_attr = &i2c_dev_attr, | ||
2235 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 2278 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
2236 | }; | 2279 | }; |
2237 | 2280 | ||
@@ -2274,7 +2317,7 @@ static struct omap_hwmod_ocp_if *omap44xx_i2c3_slaves[] = { | |||
2274 | static struct omap_hwmod omap44xx_i2c3_hwmod = { | 2317 | static struct omap_hwmod omap44xx_i2c3_hwmod = { |
2275 | .name = "i2c3", | 2318 | .name = "i2c3", |
2276 | .class = &omap44xx_i2c_hwmod_class, | 2319 | .class = &omap44xx_i2c_hwmod_class, |
2277 | .flags = HWMOD_INIT_NO_RESET, | 2320 | .flags = HWMOD_16BIT_REG, |
2278 | .mpu_irqs = omap44xx_i2c3_irqs, | 2321 | .mpu_irqs = omap44xx_i2c3_irqs, |
2279 | .sdma_reqs = omap44xx_i2c3_sdma_reqs, | 2322 | .sdma_reqs = omap44xx_i2c3_sdma_reqs, |
2280 | .main_clk = "i2c3_fck", | 2323 | .main_clk = "i2c3_fck", |
@@ -2285,6 +2328,7 @@ static struct omap_hwmod omap44xx_i2c3_hwmod = { | |||
2285 | }, | 2328 | }, |
2286 | .slaves = omap44xx_i2c3_slaves, | 2329 | .slaves = omap44xx_i2c3_slaves, |
2287 | .slaves_cnt = ARRAY_SIZE(omap44xx_i2c3_slaves), | 2330 | .slaves_cnt = ARRAY_SIZE(omap44xx_i2c3_slaves), |
2331 | .dev_attr = &i2c_dev_attr, | ||
2288 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 2332 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
2289 | }; | 2333 | }; |
2290 | 2334 | ||
@@ -2327,7 +2371,7 @@ static struct omap_hwmod_ocp_if *omap44xx_i2c4_slaves[] = { | |||
2327 | static struct omap_hwmod omap44xx_i2c4_hwmod = { | 2371 | static struct omap_hwmod omap44xx_i2c4_hwmod = { |
2328 | .name = "i2c4", | 2372 | .name = "i2c4", |
2329 | .class = &omap44xx_i2c_hwmod_class, | 2373 | .class = &omap44xx_i2c_hwmod_class, |
2330 | .flags = HWMOD_INIT_NO_RESET, | 2374 | .flags = HWMOD_16BIT_REG, |
2331 | .mpu_irqs = omap44xx_i2c4_irqs, | 2375 | .mpu_irqs = omap44xx_i2c4_irqs, |
2332 | .sdma_reqs = omap44xx_i2c4_sdma_reqs, | 2376 | .sdma_reqs = omap44xx_i2c4_sdma_reqs, |
2333 | .main_clk = "i2c4_fck", | 2377 | .main_clk = "i2c4_fck", |
@@ -2338,6 +2382,7 @@ static struct omap_hwmod omap44xx_i2c4_hwmod = { | |||
2338 | }, | 2382 | }, |
2339 | .slaves = omap44xx_i2c4_slaves, | 2383 | .slaves = omap44xx_i2c4_slaves, |
2340 | .slaves_cnt = ARRAY_SIZE(omap44xx_i2c4_slaves), | 2384 | .slaves_cnt = ARRAY_SIZE(omap44xx_i2c4_slaves), |
2385 | .dev_attr = &i2c_dev_attr, | ||
2341 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 2386 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
2342 | }; | 2387 | }; |
2343 | 2388 | ||
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 49486f522dca..d48813fd62de 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -106,7 +106,7 @@ static void omap2_init_processor_devices(void) | |||
106 | int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) | 106 | int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) |
107 | { | 107 | { |
108 | u32 cur_state; | 108 | u32 cur_state; |
109 | int sleep_switch = 0; | 109 | int sleep_switch = -1; |
110 | int ret = 0; | 110 | int ret = 0; |
111 | 111 | ||
112 | if (pwrdm == NULL || IS_ERR(pwrdm)) | 112 | if (pwrdm == NULL || IS_ERR(pwrdm)) |
diff --git a/arch/arm/mach-omap2/powerdomains44xx_data.c b/arch/arm/mach-omap2/powerdomains44xx_data.c index 3a7e678fd5f1..247e79495115 100644 --- a/arch/arm/mach-omap2/powerdomains44xx_data.c +++ b/arch/arm/mach-omap2/powerdomains44xx_data.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * OMAP4 Power domains framework | 2 | * OMAP4 Power domains framework |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. | 4 | * Copyright (C) 2009-2011 Texas Instruments, Inc. |
5 | * Copyright (C) 2009-2011 Nokia Corporation | 5 | * Copyright (C) 2009-2011 Nokia Corporation |
6 | * | 6 | * |
7 | * Abhijit Pagare (abhijitpagare@ti.com) | 7 | * Abhijit Pagare (abhijitpagare@ti.com) |
@@ -41,14 +41,14 @@ static struct powerdomain core_44xx_pwrdm = { | |||
41 | .banks = 5, | 41 | .banks = 5, |
42 | .pwrsts_mem_ret = { | 42 | .pwrsts_mem_ret = { |
43 | [0] = PWRSTS_OFF, /* core_nret_bank */ | 43 | [0] = PWRSTS_OFF, /* core_nret_bank */ |
44 | [1] = PWRSTS_OFF_RET, /* core_ocmram */ | 44 | [1] = PWRSTS_RET, /* core_ocmram */ |
45 | [2] = PWRSTS_RET, /* core_other_bank */ | 45 | [2] = PWRSTS_RET, /* core_other_bank */ |
46 | [3] = PWRSTS_OFF_RET, /* ducati_l2ram */ | 46 | [3] = PWRSTS_OFF_RET, /* ducati_l2ram */ |
47 | [4] = PWRSTS_OFF_RET, /* ducati_unicache */ | 47 | [4] = PWRSTS_OFF_RET, /* ducati_unicache */ |
48 | }, | 48 | }, |
49 | .pwrsts_mem_on = { | 49 | .pwrsts_mem_on = { |
50 | [0] = PWRSTS_ON, /* core_nret_bank */ | 50 | [0] = PWRSTS_ON, /* core_nret_bank */ |
51 | [1] = PWRSTS_OFF_RET, /* core_ocmram */ | 51 | [1] = PWRSTS_ON, /* core_ocmram */ |
52 | [2] = PWRSTS_ON, /* core_other_bank */ | 52 | [2] = PWRSTS_ON, /* core_other_bank */ |
53 | [3] = PWRSTS_ON, /* ducati_l2ram */ | 53 | [3] = PWRSTS_ON, /* ducati_l2ram */ |
54 | [4] = PWRSTS_ON, /* ducati_unicache */ | 54 | [4] = PWRSTS_ON, /* ducati_unicache */ |
@@ -205,7 +205,7 @@ static struct powerdomain mpu_44xx_pwrdm = { | |||
205 | .prcm_offs = OMAP4430_PRM_MPU_INST, | 205 | .prcm_offs = OMAP4430_PRM_MPU_INST, |
206 | .prcm_partition = OMAP4430_PRM_PARTITION, | 206 | .prcm_partition = OMAP4430_PRM_PARTITION, |
207 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 207 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
208 | .pwrsts = PWRSTS_OFF_RET_ON, | 208 | .pwrsts = PWRSTS_RET_ON, |
209 | .pwrsts_logic_ret = PWRSTS_OFF_RET, | 209 | .pwrsts_logic_ret = PWRSTS_OFF_RET, |
210 | .banks = 3, | 210 | .banks = 3, |
211 | .pwrsts_mem_ret = { | 211 | .pwrsts_mem_ret = { |
@@ -318,6 +318,7 @@ static struct powerdomain cefuse_44xx_pwrdm = { | |||
318 | .prcm_partition = OMAP4430_PRM_PARTITION, | 318 | .prcm_partition = OMAP4430_PRM_PARTITION, |
319 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 319 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
320 | .pwrsts = PWRSTS_OFF_ON, | 320 | .pwrsts = PWRSTS_OFF_ON, |
321 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | ||
321 | }; | 322 | }; |
322 | 323 | ||
323 | /* | 324 | /* |