diff options
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/cpu-omap.c | 8 | ||||
-rw-r--r-- | arch/arm/plat-omap/debug-leds.c | 11 | ||||
-rw-r--r-- | arch/arm/plat-omap/dma.c | 4 | ||||
-rw-r--r-- | arch/arm/plat-omap/gpio.c | 141 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/clock.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/cpu.h | 5 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/io.h | 3 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/mux.h | 4 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/prcm.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/sdrc.h | 11 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/serial.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/sram.h | 23 | ||||
-rw-r--r-- | arch/arm/plat-omap/sram.c | 34 |
13 files changed, 170 insertions, 78 deletions
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c index 843e8af64066..1868c0d8f9b5 100644 --- a/arch/arm/plat-omap/cpu-omap.c +++ b/arch/arm/plat-omap/cpu-omap.c | |||
@@ -78,10 +78,10 @@ static int omap_target(struct cpufreq_policy *policy, | |||
78 | 78 | ||
79 | /* Ensure desired rate is within allowed range. Some govenors | 79 | /* Ensure desired rate is within allowed range. Some govenors |
80 | * (ondemand) will just pass target_freq=0 to get the minimum. */ | 80 | * (ondemand) will just pass target_freq=0 to get the minimum. */ |
81 | if (target_freq < policy->cpuinfo.min_freq) | 81 | if (target_freq < policy->min) |
82 | target_freq = policy->cpuinfo.min_freq; | 82 | target_freq = policy->min; |
83 | if (target_freq > policy->cpuinfo.max_freq) | 83 | if (target_freq > policy->max) |
84 | target_freq = policy->cpuinfo.max_freq; | 84 | target_freq = policy->max; |
85 | 85 | ||
86 | freqs.old = omap_getspeed(0); | 86 | freqs.old = omap_getspeed(0); |
87 | freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; | 87 | freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; |
diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c index be4eefda4767..9395898dd49a 100644 --- a/arch/arm/plat-omap/debug-leds.c +++ b/arch/arm/plat-omap/debug-leds.c | |||
@@ -281,24 +281,27 @@ static int /* __init */ fpga_probe(struct platform_device *pdev) | |||
281 | return 0; | 281 | return 0; |
282 | } | 282 | } |
283 | 283 | ||
284 | static int fpga_suspend_late(struct platform_device *pdev, pm_message_t mesg) | 284 | static int fpga_suspend_noirq(struct device *dev) |
285 | { | 285 | { |
286 | __raw_writew(~0, &fpga->leds); | 286 | __raw_writew(~0, &fpga->leds); |
287 | return 0; | 287 | return 0; |
288 | } | 288 | } |
289 | 289 | ||
290 | static int fpga_resume_early(struct platform_device *pdev) | 290 | static int fpga_resume_noirq(struct device *dev) |
291 | { | 291 | { |
292 | __raw_writew(~hw_led_state, &fpga->leds); | 292 | __raw_writew(~hw_led_state, &fpga->leds); |
293 | return 0; | 293 | return 0; |
294 | } | 294 | } |
295 | 295 | ||
296 | static struct dev_pm_ops fpga_dev_pm_ops = { | ||
297 | .suspend_noirq = fpga_suspend_noirq, | ||
298 | .resume_noirq = fpga_resume_noirq, | ||
299 | }; | ||
296 | 300 | ||
297 | static struct platform_driver led_driver = { | 301 | static struct platform_driver led_driver = { |
298 | .driver.name = "omap_dbg_led", | 302 | .driver.name = "omap_dbg_led", |
303 | .driver.pm = &fpga_dev_pm_ops, | ||
299 | .probe = fpga_probe, | 304 | .probe = fpga_probe, |
300 | .suspend_late = fpga_suspend_late, | ||
301 | .resume_early = fpga_resume_early, | ||
302 | }; | 305 | }; |
303 | 306 | ||
304 | static int __init fpga_init(void) | 307 | static int __init fpga_init(void) |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 7677a4a1cef2..e3ac94f09006 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -946,7 +946,9 @@ void omap_start_dma(int lch) | |||
946 | 946 | ||
947 | cur_lch = next_lch; | 947 | cur_lch = next_lch; |
948 | } while (next_lch != -1); | 948 | } while (next_lch != -1); |
949 | } else if (cpu_class_is_omap2()) { | 949 | } else if (cpu_is_omap242x() || |
950 | (cpu_is_omap243x() && omap_type() <= OMAP2430_REV_ES1_0)) { | ||
951 | |||
950 | /* Errata: Need to write lch even if not using chaining */ | 952 | /* Errata: Need to write lch even if not using chaining */ |
951 | dma_write(lch, CLNK_CTRL(lch)); | 953 | dma_write(lch, CLNK_CTRL(lch)); |
952 | } | 954 | } |
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 26b387c12423..50b19a3027bc 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -476,14 +476,12 @@ static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable) | |||
476 | __raw_writel(l, reg); | 476 | __raw_writel(l, reg); |
477 | } | 477 | } |
478 | 478 | ||
479 | static int __omap_get_gpio_datain(int gpio) | 479 | static int _get_gpio_datain(struct gpio_bank *bank, int gpio) |
480 | { | 480 | { |
481 | struct gpio_bank *bank; | ||
482 | void __iomem *reg; | 481 | void __iomem *reg; |
483 | 482 | ||
484 | if (check_gpio(gpio) < 0) | 483 | if (check_gpio(gpio) < 0) |
485 | return -EINVAL; | 484 | return -EINVAL; |
486 | bank = get_gpio_bank(gpio); | ||
487 | reg = bank->base; | 485 | reg = bank->base; |
488 | switch (bank->method) { | 486 | switch (bank->method) { |
489 | #ifdef CONFIG_ARCH_OMAP1 | 487 | #ifdef CONFIG_ARCH_OMAP1 |
@@ -524,6 +522,53 @@ static int __omap_get_gpio_datain(int gpio) | |||
524 | & (1 << get_gpio_index(gpio))) != 0; | 522 | & (1 << get_gpio_index(gpio))) != 0; |
525 | } | 523 | } |
526 | 524 | ||
525 | static int _get_gpio_dataout(struct gpio_bank *bank, int gpio) | ||
526 | { | ||
527 | void __iomem *reg; | ||
528 | |||
529 | if (check_gpio(gpio) < 0) | ||
530 | return -EINVAL; | ||
531 | reg = bank->base; | ||
532 | |||
533 | switch (bank->method) { | ||
534 | #ifdef CONFIG_ARCH_OMAP1 | ||
535 | case METHOD_MPUIO: | ||
536 | reg += OMAP_MPUIO_OUTPUT; | ||
537 | break; | ||
538 | #endif | ||
539 | #ifdef CONFIG_ARCH_OMAP15XX | ||
540 | case METHOD_GPIO_1510: | ||
541 | reg += OMAP1510_GPIO_DATA_OUTPUT; | ||
542 | break; | ||
543 | #endif | ||
544 | #ifdef CONFIG_ARCH_OMAP16XX | ||
545 | case METHOD_GPIO_1610: | ||
546 | reg += OMAP1610_GPIO_DATAOUT; | ||
547 | break; | ||
548 | #endif | ||
549 | #ifdef CONFIG_ARCH_OMAP730 | ||
550 | case METHOD_GPIO_730: | ||
551 | reg += OMAP730_GPIO_DATA_OUTPUT; | ||
552 | break; | ||
553 | #endif | ||
554 | #ifdef CONFIG_ARCH_OMAP850 | ||
555 | case METHOD_GPIO_850: | ||
556 | reg += OMAP850_GPIO_DATA_OUTPUT; | ||
557 | break; | ||
558 | #endif | ||
559 | #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) || \ | ||
560 | defined(CONFIG_ARCH_OMAP4) | ||
561 | case METHOD_GPIO_24XX: | ||
562 | reg += OMAP24XX_GPIO_DATAOUT; | ||
563 | break; | ||
564 | #endif | ||
565 | default: | ||
566 | return -EINVAL; | ||
567 | } | ||
568 | |||
569 | return (__raw_readl(reg) & (1 << get_gpio_index(gpio))) != 0; | ||
570 | } | ||
571 | |||
527 | #define MOD_REG_BIT(reg, bit_mask, set) \ | 572 | #define MOD_REG_BIT(reg, bit_mask, set) \ |
528 | do { \ | 573 | do { \ |
529 | int l = __raw_readl(base + reg); \ | 574 | int l = __raw_readl(base + reg); \ |
@@ -1189,6 +1234,7 @@ static void gpio_mask_irq(unsigned int irq) | |||
1189 | struct gpio_bank *bank = get_irq_chip_data(irq); | 1234 | struct gpio_bank *bank = get_irq_chip_data(irq); |
1190 | 1235 | ||
1191 | _set_gpio_irqenable(bank, gpio, 0); | 1236 | _set_gpio_irqenable(bank, gpio, 0); |
1237 | _set_gpio_triggering(bank, get_gpio_index(gpio), IRQ_TYPE_NONE); | ||
1192 | } | 1238 | } |
1193 | 1239 | ||
1194 | static void gpio_unmask_irq(unsigned int irq) | 1240 | static void gpio_unmask_irq(unsigned int irq) |
@@ -1196,6 +1242,11 @@ static void gpio_unmask_irq(unsigned int irq) | |||
1196 | unsigned int gpio = irq - IH_GPIO_BASE; | 1242 | unsigned int gpio = irq - IH_GPIO_BASE; |
1197 | struct gpio_bank *bank = get_irq_chip_data(irq); | 1243 | struct gpio_bank *bank = get_irq_chip_data(irq); |
1198 | unsigned int irq_mask = 1 << get_gpio_index(gpio); | 1244 | unsigned int irq_mask = 1 << get_gpio_index(gpio); |
1245 | struct irq_desc *desc = irq_to_desc(irq); | ||
1246 | u32 trigger = desc->status & IRQ_TYPE_SENSE_MASK; | ||
1247 | |||
1248 | if (trigger) | ||
1249 | _set_gpio_triggering(bank, get_gpio_index(gpio), trigger); | ||
1199 | 1250 | ||
1200 | /* For level-triggered GPIOs, the clearing must be done after | 1251 | /* For level-triggered GPIOs, the clearing must be done after |
1201 | * the HW source is cleared, thus after the handler has run */ | 1252 | * the HW source is cleared, thus after the handler has run */ |
@@ -1264,8 +1315,9 @@ static struct irq_chip mpuio_irq_chip = { | |||
1264 | 1315 | ||
1265 | #include <linux/platform_device.h> | 1316 | #include <linux/platform_device.h> |
1266 | 1317 | ||
1267 | static int omap_mpuio_suspend_late(struct platform_device *pdev, pm_message_t mesg) | 1318 | static int omap_mpuio_suspend_noirq(struct device *dev) |
1268 | { | 1319 | { |
1320 | struct platform_device *pdev = to_platform_device(dev); | ||
1269 | struct gpio_bank *bank = platform_get_drvdata(pdev); | 1321 | struct gpio_bank *bank = platform_get_drvdata(pdev); |
1270 | void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT; | 1322 | void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT; |
1271 | unsigned long flags; | 1323 | unsigned long flags; |
@@ -1278,8 +1330,9 @@ static int omap_mpuio_suspend_late(struct platform_device *pdev, pm_message_t me | |||
1278 | return 0; | 1330 | return 0; |
1279 | } | 1331 | } |
1280 | 1332 | ||
1281 | static int omap_mpuio_resume_early(struct platform_device *pdev) | 1333 | static int omap_mpuio_resume_noirq(struct device *dev) |
1282 | { | 1334 | { |
1335 | struct platform_device *pdev = to_platform_device(dev); | ||
1283 | struct gpio_bank *bank = platform_get_drvdata(pdev); | 1336 | struct gpio_bank *bank = platform_get_drvdata(pdev); |
1284 | void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT; | 1337 | void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT; |
1285 | unsigned long flags; | 1338 | unsigned long flags; |
@@ -1291,14 +1344,18 @@ static int omap_mpuio_resume_early(struct platform_device *pdev) | |||
1291 | return 0; | 1344 | return 0; |
1292 | } | 1345 | } |
1293 | 1346 | ||
1347 | static struct dev_pm_ops omap_mpuio_dev_pm_ops = { | ||
1348 | .suspend_noirq = omap_mpuio_suspend_noirq, | ||
1349 | .resume_noirq = omap_mpuio_resume_noirq, | ||
1350 | }; | ||
1351 | |||
1294 | /* use platform_driver for this, now that there's no longer any | 1352 | /* use platform_driver for this, now that there's no longer any |
1295 | * point to sys_device (other than not disturbing old code). | 1353 | * point to sys_device (other than not disturbing old code). |
1296 | */ | 1354 | */ |
1297 | static struct platform_driver omap_mpuio_driver = { | 1355 | static struct platform_driver omap_mpuio_driver = { |
1298 | .suspend_late = omap_mpuio_suspend_late, | ||
1299 | .resume_early = omap_mpuio_resume_early, | ||
1300 | .driver = { | 1356 | .driver = { |
1301 | .name = "mpuio", | 1357 | .name = "mpuio", |
1358 | .pm = &omap_mpuio_dev_pm_ops, | ||
1302 | }, | 1359 | }, |
1303 | }; | 1360 | }; |
1304 | 1361 | ||
@@ -1350,9 +1407,49 @@ static int gpio_input(struct gpio_chip *chip, unsigned offset) | |||
1350 | return 0; | 1407 | return 0; |
1351 | } | 1408 | } |
1352 | 1409 | ||
1410 | static int gpio_is_input(struct gpio_bank *bank, int mask) | ||
1411 | { | ||
1412 | void __iomem *reg = bank->base; | ||
1413 | |||
1414 | switch (bank->method) { | ||
1415 | case METHOD_MPUIO: | ||
1416 | reg += OMAP_MPUIO_IO_CNTL; | ||
1417 | break; | ||
1418 | case METHOD_GPIO_1510: | ||
1419 | reg += OMAP1510_GPIO_DIR_CONTROL; | ||
1420 | break; | ||
1421 | case METHOD_GPIO_1610: | ||
1422 | reg += OMAP1610_GPIO_DIRECTION; | ||
1423 | break; | ||
1424 | case METHOD_GPIO_730: | ||
1425 | reg += OMAP730_GPIO_DIR_CONTROL; | ||
1426 | break; | ||
1427 | case METHOD_GPIO_850: | ||
1428 | reg += OMAP850_GPIO_DIR_CONTROL; | ||
1429 | break; | ||
1430 | case METHOD_GPIO_24XX: | ||
1431 | reg += OMAP24XX_GPIO_OE; | ||
1432 | break; | ||
1433 | } | ||
1434 | return __raw_readl(reg) & mask; | ||
1435 | } | ||
1436 | |||
1353 | static int gpio_get(struct gpio_chip *chip, unsigned offset) | 1437 | static int gpio_get(struct gpio_chip *chip, unsigned offset) |
1354 | { | 1438 | { |
1355 | return __omap_get_gpio_datain(chip->base + offset); | 1439 | struct gpio_bank *bank; |
1440 | void __iomem *reg; | ||
1441 | int gpio; | ||
1442 | u32 mask; | ||
1443 | |||
1444 | gpio = chip->base + offset; | ||
1445 | bank = get_gpio_bank(gpio); | ||
1446 | reg = bank->base; | ||
1447 | mask = 1 << get_gpio_index(gpio); | ||
1448 | |||
1449 | if (gpio_is_input(bank, mask)) | ||
1450 | return _get_gpio_datain(bank, gpio); | ||
1451 | else | ||
1452 | return _get_gpio_dataout(bank, gpio); | ||
1356 | } | 1453 | } |
1357 | 1454 | ||
1358 | static int gpio_output(struct gpio_chip *chip, unsigned offset, int value) | 1455 | static int gpio_output(struct gpio_chip *chip, unsigned offset, int value) |
@@ -1886,34 +1983,6 @@ arch_initcall(omap_gpio_sysinit); | |||
1886 | #include <linux/debugfs.h> | 1983 | #include <linux/debugfs.h> |
1887 | #include <linux/seq_file.h> | 1984 | #include <linux/seq_file.h> |
1888 | 1985 | ||
1889 | static int gpio_is_input(struct gpio_bank *bank, int mask) | ||
1890 | { | ||
1891 | void __iomem *reg = bank->base; | ||
1892 | |||
1893 | switch (bank->method) { | ||
1894 | case METHOD_MPUIO: | ||
1895 | reg += OMAP_MPUIO_IO_CNTL; | ||
1896 | break; | ||
1897 | case METHOD_GPIO_1510: | ||
1898 | reg += OMAP1510_GPIO_DIR_CONTROL; | ||
1899 | break; | ||
1900 | case METHOD_GPIO_1610: | ||
1901 | reg += OMAP1610_GPIO_DIRECTION; | ||
1902 | break; | ||
1903 | case METHOD_GPIO_730: | ||
1904 | reg += OMAP730_GPIO_DIR_CONTROL; | ||
1905 | break; | ||
1906 | case METHOD_GPIO_850: | ||
1907 | reg += OMAP850_GPIO_DIR_CONTROL; | ||
1908 | break; | ||
1909 | case METHOD_GPIO_24XX: | ||
1910 | reg += OMAP24XX_GPIO_OE; | ||
1911 | break; | ||
1912 | } | ||
1913 | return __raw_readl(reg) & mask; | ||
1914 | } | ||
1915 | |||
1916 | |||
1917 | static int dbg_gpio_show(struct seq_file *s, void *unused) | 1986 | static int dbg_gpio_show(struct seq_file *s, void *unused) |
1918 | { | 1987 | { |
1919 | unsigned i, j, gpio; | 1988 | unsigned i, j, gpio; |
diff --git a/arch/arm/plat-omap/include/mach/clock.h b/arch/arm/plat-omap/include/mach/clock.h index f9f65e1ba3f1..4b8b0d65cbf2 100644 --- a/arch/arm/plat-omap/include/mach/clock.h +++ b/arch/arm/plat-omap/include/mach/clock.h | |||
@@ -20,6 +20,8 @@ struct clockdomain; | |||
20 | struct clkops { | 20 | struct clkops { |
21 | int (*enable)(struct clk *); | 21 | int (*enable)(struct clk *); |
22 | void (*disable)(struct clk *); | 22 | void (*disable)(struct clk *); |
23 | void (*find_idlest)(struct clk *, void __iomem **, u8 *); | ||
24 | void (*find_companion)(struct clk *, void __iomem **, u8 *); | ||
23 | }; | 25 | }; |
24 | 26 | ||
25 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ | 27 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ |
diff --git a/arch/arm/plat-omap/include/mach/cpu.h b/arch/arm/plat-omap/include/mach/cpu.h index 285eaa3a8275..11e73d9e8928 100644 --- a/arch/arm/plat-omap/include/mach/cpu.h +++ b/arch/arm/plat-omap/include/mach/cpu.h | |||
@@ -378,9 +378,6 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
378 | #define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx() || \ | 378 | #define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx() || \ |
379 | cpu_is_omap44xx()) | 379 | cpu_is_omap44xx()) |
380 | 380 | ||
381 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ | ||
382 | defined(CONFIG_ARCH_OMAP4) | ||
383 | |||
384 | /* Various silicon revisions for omap2 */ | 381 | /* Various silicon revisions for omap2 */ |
385 | #define OMAP242X_CLASS 0x24200024 | 382 | #define OMAP242X_CLASS 0x24200024 |
386 | #define OMAP2420_REV_ES1_0 0x24200024 | 383 | #define OMAP2420_REV_ES1_0 0x24200024 |
@@ -436,5 +433,3 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
436 | 433 | ||
437 | int omap_chip_is(struct omap_chip_id oci); | 434 | int omap_chip_is(struct omap_chip_id oci); |
438 | void omap2_check_revision(void); | 435 | void omap2_check_revision(void); |
439 | |||
440 | #endif /* defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) */ | ||
diff --git a/arch/arm/plat-omap/include/mach/io.h b/arch/arm/plat-omap/include/mach/io.h index 73f483d56ca6..21fb0efdda86 100644 --- a/arch/arm/plat-omap/include/mach/io.h +++ b/arch/arm/plat-omap/include/mach/io.h | |||
@@ -228,7 +228,8 @@ extern void omap1_map_common_io(void); | |||
228 | extern void omap1_init_common_hw(void); | 228 | extern void omap1_init_common_hw(void); |
229 | 229 | ||
230 | extern void omap2_map_common_io(void); | 230 | extern void omap2_map_common_io(void); |
231 | extern void omap2_init_common_hw(struct omap_sdrc_params *sp); | 231 | extern void omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, |
232 | struct omap_sdrc_params *sdrc_cs1); | ||
232 | 233 | ||
233 | #define __arch_ioremap(p,s,t) omap_ioremap(p,s,t) | 234 | #define __arch_ioremap(p,s,t) omap_ioremap(p,s,t) |
234 | #define __arch_iounmap(v) omap_iounmap(v) | 235 | #define __arch_iounmap(v) omap_iounmap(v) |
diff --git a/arch/arm/plat-omap/include/mach/mux.h b/arch/arm/plat-omap/include/mach/mux.h index 85a621705766..80281c458baf 100644 --- a/arch/arm/plat-omap/include/mach/mux.h +++ b/arch/arm/plat-omap/include/mach/mux.h | |||
@@ -853,6 +853,10 @@ enum omap34xx_index { | |||
853 | AE5_34XX_GPIO143, | 853 | AE5_34XX_GPIO143, |
854 | H19_34XX_GPIO164_OUT, | 854 | H19_34XX_GPIO164_OUT, |
855 | J25_34XX_GPIO170, | 855 | J25_34XX_GPIO170, |
856 | |||
857 | /* OMAP3 SDRC CKE signals to SDR/DDR ram chips */ | ||
858 | H16_34XX_SDRC_CKE0, | ||
859 | H17_34XX_SDRC_CKE1, | ||
856 | }; | 860 | }; |
857 | 861 | ||
858 | struct omap_mux_cfg { | 862 | struct omap_mux_cfg { |
diff --git a/arch/arm/plat-omap/include/mach/prcm.h b/arch/arm/plat-omap/include/mach/prcm.h index 24ac3c715912..cda2a70397b4 100644 --- a/arch/arm/plat-omap/include/mach/prcm.h +++ b/arch/arm/plat-omap/include/mach/prcm.h | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | u32 omap_prcm_get_reset_sources(void); | 26 | u32 omap_prcm_get_reset_sources(void); |
27 | void omap_prcm_arch_reset(char mode); | 27 | void omap_prcm_arch_reset(char mode); |
28 | int omap2_cm_wait_idlest(void __iomem *reg, u32 mask, const char *name); | ||
28 | 29 | ||
29 | #endif | 30 | #endif |
30 | 31 | ||
diff --git a/arch/arm/plat-omap/include/mach/sdrc.h b/arch/arm/plat-omap/include/mach/sdrc.h index adc73522491f..0be18e4ff182 100644 --- a/arch/arm/plat-omap/include/mach/sdrc.h +++ b/arch/arm/plat-omap/include/mach/sdrc.h | |||
@@ -30,6 +30,10 @@ | |||
30 | #define SDRC_ACTIM_CTRL_A_0 0x09c | 30 | #define SDRC_ACTIM_CTRL_A_0 0x09c |
31 | #define SDRC_ACTIM_CTRL_B_0 0x0a0 | 31 | #define SDRC_ACTIM_CTRL_B_0 0x0a0 |
32 | #define SDRC_RFR_CTRL_0 0x0a4 | 32 | #define SDRC_RFR_CTRL_0 0x0a4 |
33 | #define SDRC_MR_1 0x0B4 | ||
34 | #define SDRC_ACTIM_CTRL_A_1 0x0C4 | ||
35 | #define SDRC_ACTIM_CTRL_B_1 0x0C8 | ||
36 | #define SDRC_RFR_CTRL_1 0x0D4 | ||
33 | 37 | ||
34 | /* | 38 | /* |
35 | * These values represent the number of memory clock cycles between | 39 | * These values represent the number of memory clock cycles between |
@@ -102,8 +106,11 @@ struct omap_sdrc_params { | |||
102 | u32 mr; | 106 | u32 mr; |
103 | }; | 107 | }; |
104 | 108 | ||
105 | void __init omap2_sdrc_init(struct omap_sdrc_params *sp); | 109 | void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0, |
106 | struct omap_sdrc_params *omap2_sdrc_get_params(unsigned long r); | 110 | struct omap_sdrc_params *sdrc_cs1); |
111 | int omap2_sdrc_get_params(unsigned long r, | ||
112 | struct omap_sdrc_params **sdrc_cs0, | ||
113 | struct omap_sdrc_params **sdrc_cs1); | ||
107 | 114 | ||
108 | #ifdef CONFIG_ARCH_OMAP2 | 115 | #ifdef CONFIG_ARCH_OMAP2 |
109 | 116 | ||
diff --git a/arch/arm/plat-omap/include/mach/serial.h b/arch/arm/plat-omap/include/mach/serial.h index 13abd02d1527..def0529c75eb 100644 --- a/arch/arm/plat-omap/include/mach/serial.h +++ b/arch/arm/plat-omap/include/mach/serial.h | |||
@@ -59,6 +59,7 @@ extern void omap_uart_check_wakeup(void); | |||
59 | extern void omap_uart_prepare_suspend(void); | 59 | extern void omap_uart_prepare_suspend(void); |
60 | extern void omap_uart_prepare_idle(int num); | 60 | extern void omap_uart_prepare_idle(int num); |
61 | extern void omap_uart_resume_idle(int num); | 61 | extern void omap_uart_resume_idle(int num); |
62 | extern void omap_uart_enable_irqs(int enable); | ||
62 | #endif | 63 | #endif |
63 | 64 | ||
64 | #endif | 65 | #endif |
diff --git a/arch/arm/plat-omap/include/mach/sram.h b/arch/arm/plat-omap/include/mach/sram.h index 4d53cc59d7a3..8974e3fc2691 100644 --- a/arch/arm/plat-omap/include/mach/sram.h +++ b/arch/arm/plat-omap/include/mach/sram.h | |||
@@ -21,11 +21,12 @@ extern void omap2_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, | |||
21 | u32 mem_type); | 21 | u32 mem_type); |
22 | extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass); | 22 | extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass); |
23 | 23 | ||
24 | extern u32 omap3_configure_core_dpll(u32 sdrc_rfr_ctrl, | 24 | extern u32 omap3_configure_core_dpll( |
25 | u32 sdrc_actim_ctrla, | 25 | u32 m2, u32 unlock_dll, u32 f, u32 inc, |
26 | u32 sdrc_actim_ctrlb, u32 m2, | 26 | u32 sdrc_rfr_ctrl_0, u32 sdrc_actim_ctrl_a_0, |
27 | u32 unlock_dll, u32 f, u32 sdrc_mr, | 27 | u32 sdrc_actim_ctrl_b_0, u32 sdrc_mr_0, |
28 | u32 inc); | 28 | u32 sdrc_rfr_ctrl_1, u32 sdrc_actim_ctrl_a_1, |
29 | u32 sdrc_actim_ctrl_b_1, u32 sdrc_mr_1); | ||
29 | 30 | ||
30 | /* Do not use these */ | 31 | /* Do not use these */ |
31 | extern void omap1_sram_reprogram_clock(u32 ckctl, u32 dpllctl); | 32 | extern void omap1_sram_reprogram_clock(u32 ckctl, u32 dpllctl); |
@@ -59,12 +60,12 @@ extern void omap243x_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, | |||
59 | u32 mem_type); | 60 | u32 mem_type); |
60 | extern unsigned long omap243x_sram_reprogram_sdrc_sz; | 61 | extern unsigned long omap243x_sram_reprogram_sdrc_sz; |
61 | 62 | ||
62 | 63 | extern u32 omap3_sram_configure_core_dpll( | |
63 | extern u32 omap3_sram_configure_core_dpll(u32 sdrc_rfr_ctrl, | 64 | u32 m2, u32 unlock_dll, u32 f, u32 inc, |
64 | u32 sdrc_actim_ctrla, | 65 | u32 sdrc_rfr_ctrl_0, u32 sdrc_actim_ctrl_a_0, |
65 | u32 sdrc_actim_ctrlb, u32 m2, | 66 | u32 sdrc_actim_ctrl_b_0, u32 sdrc_mr_0, |
66 | u32 unlock_dll, u32 f, u32 sdrc_mr, | 67 | u32 sdrc_rfr_ctrl_1, u32 sdrc_actim_ctrl_a_1, |
67 | u32 inc); | 68 | u32 sdrc_actim_ctrl_b_1, u32 sdrc_mr_1); |
68 | extern unsigned long omap3_sram_configure_core_dpll_sz; | 69 | extern unsigned long omap3_sram_configure_core_dpll_sz; |
69 | 70 | ||
70 | #endif | 71 | #endif |
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index 4ea73804d21e..5eae7876979c 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -44,9 +44,9 @@ | |||
44 | #define OMAP2_SRAM_VA 0xe3000000 | 44 | #define OMAP2_SRAM_VA 0xe3000000 |
45 | #define OMAP2_SRAM_PUB_VA (OMAP2_SRAM_VA + 0x800) | 45 | #define OMAP2_SRAM_PUB_VA (OMAP2_SRAM_VA + 0x800) |
46 | #define OMAP3_SRAM_PA 0x40200000 | 46 | #define OMAP3_SRAM_PA 0x40200000 |
47 | #define OMAP3_SRAM_VA 0xd7000000 | 47 | #define OMAP3_SRAM_VA 0xe3000000 |
48 | #define OMAP3_SRAM_PUB_PA 0x40208000 | 48 | #define OMAP3_SRAM_PUB_PA 0x40208000 |
49 | #define OMAP3_SRAM_PUB_VA 0xd7008000 | 49 | #define OMAP3_SRAM_PUB_VA (OMAP3_SRAM_VA + 0x8000) |
50 | #define OMAP4_SRAM_PA 0x40200000 /*0x402f0000*/ | 50 | #define OMAP4_SRAM_PA 0x40200000 /*0x402f0000*/ |
51 | #define OMAP4_SRAM_VA 0xd7000000 /*0xd70f0000*/ | 51 | #define OMAP4_SRAM_VA 0xd7000000 /*0xd70f0000*/ |
52 | 52 | ||
@@ -373,20 +373,26 @@ static inline int omap243x_sram_init(void) | |||
373 | 373 | ||
374 | #ifdef CONFIG_ARCH_OMAP3 | 374 | #ifdef CONFIG_ARCH_OMAP3 |
375 | 375 | ||
376 | static u32 (*_omap3_sram_configure_core_dpll)(u32 sdrc_rfr_ctrl, | 376 | static u32 (*_omap3_sram_configure_core_dpll)( |
377 | u32 sdrc_actim_ctrla, | 377 | u32 m2, u32 unlock_dll, u32 f, u32 inc, |
378 | u32 sdrc_actim_ctrlb, | 378 | u32 sdrc_rfr_ctrl_0, u32 sdrc_actim_ctrl_a_0, |
379 | u32 m2, u32 unlock_dll, | 379 | u32 sdrc_actim_ctrl_b_0, u32 sdrc_mr_0, |
380 | u32 f, u32 sdrc_mr, u32 inc); | 380 | u32 sdrc_rfr_ctrl_1, u32 sdrc_actim_ctrl_a_1, |
381 | u32 omap3_configure_core_dpll(u32 sdrc_rfr_ctrl, u32 sdrc_actim_ctrla, | 381 | u32 sdrc_actim_ctrl_b_1, u32 sdrc_mr_1); |
382 | u32 sdrc_actim_ctrlb, u32 m2, u32 unlock_dll, | 382 | |
383 | u32 f, u32 sdrc_mr, u32 inc) | 383 | u32 omap3_configure_core_dpll(u32 m2, u32 unlock_dll, u32 f, u32 inc, |
384 | u32 sdrc_rfr_ctrl_0, u32 sdrc_actim_ctrl_a_0, | ||
385 | u32 sdrc_actim_ctrl_b_0, u32 sdrc_mr_0, | ||
386 | u32 sdrc_rfr_ctrl_1, u32 sdrc_actim_ctrl_a_1, | ||
387 | u32 sdrc_actim_ctrl_b_1, u32 sdrc_mr_1) | ||
384 | { | 388 | { |
385 | BUG_ON(!_omap3_sram_configure_core_dpll); | 389 | BUG_ON(!_omap3_sram_configure_core_dpll); |
386 | return _omap3_sram_configure_core_dpll(sdrc_rfr_ctrl, | 390 | return _omap3_sram_configure_core_dpll( |
387 | sdrc_actim_ctrla, | 391 | m2, unlock_dll, f, inc, |
388 | sdrc_actim_ctrlb, m2, | 392 | sdrc_rfr_ctrl_0, sdrc_actim_ctrl_a_0, |
389 | unlock_dll, f, sdrc_mr, inc); | 393 | sdrc_actim_ctrl_b_0, sdrc_mr_0, |
394 | sdrc_rfr_ctrl_1, sdrc_actim_ctrl_a_1, | ||
395 | sdrc_actim_ctrl_b_1, sdrc_mr_1); | ||
390 | } | 396 | } |
391 | 397 | ||
392 | /* REVISIT: Should this be same as omap34xx_sram_init() after off-idle? */ | 398 | /* REVISIT: Should this be same as omap34xx_sram_init() after off-idle? */ |