aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-12 15:05:15 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-12 15:05:15 -0500
commitd027db132b395dabfac208e52a7e510e441bb9d2 (patch)
tree24b055b2385f9848e77e646ce475991d8675c3c4 /arch/arm/mach-davinci
parentd01e4afdbb65e030fd6f1f96c30a558e2eb0f279 (diff)
parent5faf7cbb848da827f6ea1458b5a1c26a44e7510a (diff)
Merge tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC updates from Olof Johansson: "This contains the bulk of new SoC development for this merge window. Two new platforms have been added, the sunxi platforms (Allwinner A1x SoCs) by Maxime Ripard, and a generic Broadcom platform for a new series of ARMv7 platforms from them, where the hope is that we can keep the platform code generic enough to have them all share one mach directory. The new Broadcom platform is contributed by Christian Daudt. Highbank has grown support for Calxeda's next generation of hardware, ECX-2000. clps711x has seen a lot of cleanup from Alexander Shiyan, and he's also taken on maintainership of the platform. Beyond this there has been a bunch of work from a number of people on converting more platforms to IRQ domains, pinctrl conversion, cleanup and general feature enablement across most of the active platforms." Fix up trivial conflicts as per Olof. * tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (174 commits) mfd: vexpress-sysreg: Remove LEDs code irqchip: irq-sunxi: Add terminating entry for sunxi_irq_dt_ids clocksource: sunxi_timer: Add terminating entry for sunxi_timer_dt_ids irq: versatile: delete dangling variable ARM: sunxi: add missing include for mdelay() ARM: EXYNOS: Avoid early use of of_machine_is_compatible() ARM: dts: add node for PL330 MDMA1 controller for exynos4 ARM: EXYNOS: Add support for secondary CPU bring-up on Exynos4412 ARM: EXYNOS: add UART3 to DEBUG_LL ports ARM: S3C24XX: Add clkdev entry for camif-upll clock ARM: SAMSUNG: Add s3c24xx/s3c64xx CAMIF GPIO setup helpers ARM: sunxi: Add missing sun4i.dtsi file pinctrl: samsung: Do not initialise statics to 0 ARM i.MX6: remove gate_mask from pllv3 ARM i.MX6: Fix ethernet PLL clocks ARM i.MX6: rename PLLs according to datasheet ARM i.MX6: Add pwm support ARM i.MX51: Add pwm support ARM i.MX53: Add pwm support ARM: mx5: Replace clk_register_clkdev with clock DT lookup ...
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r--arch/arm/mach-davinci/board-dm355-evm.c2
-rw-r--r--arch/arm/mach-davinci/board-dm355-leopard.c2
-rw-r--r--arch/arm/mach-davinci/board-dm365-evm.c4
-rw-r--r--arch/arm/mach-davinci/board-dm644x-evm.c2
-rw-r--r--arch/arm/mach-davinci/board-neuros-osd2.c2
-rw-r--r--arch/arm/mach-davinci/da850.c17
-rw-r--r--arch/arm/mach-davinci/devices-da8xx.c77
-rw-r--r--arch/arm/mach-davinci/dm355.c6
-rw-r--r--arch/arm/mach-davinci/dm365.c6
-rw-r--r--arch/arm/mach-davinci/dm644x.c6
-rw-r--r--arch/arm/mach-davinci/dm646x.c6
-rw-r--r--arch/arm/mach-davinci/include/mach/common.h2
-rw-r--r--arch/arm/mach-davinci/include/mach/da8xx.h3
-rw-r--r--arch/arm/mach-davinci/include/mach/serial.h1
-rw-r--r--arch/arm/mach-davinci/include/mach/sram.h3
-rw-r--r--arch/arm/mach-davinci/serial.c39
-rw-r--r--arch/arm/mach-davinci/sram.c23
-rw-r--r--arch/arm/mach-davinci/time.c4
18 files changed, 145 insertions, 60 deletions
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
index 88ebea89abdf..cdf8d0746e79 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -324,7 +324,7 @@ static __init void dm355_evm_init(void)
324 if (IS_ERR(aemif)) 324 if (IS_ERR(aemif))
325 WARN("%s: unable to get AEMIF clock\n", __func__); 325 WARN("%s: unable to get AEMIF clock\n", __func__);
326 else 326 else
327 clk_enable(aemif); 327 clk_prepare_enable(aemif);
328 328
329 platform_add_devices(davinci_evm_devices, 329 platform_add_devices(davinci_evm_devices,
330 ARRAY_SIZE(davinci_evm_devices)); 330 ARRAY_SIZE(davinci_evm_devices));
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c
index 2f88103c6459..d41954507fc2 100644
--- a/arch/arm/mach-davinci/board-dm355-leopard.c
+++ b/arch/arm/mach-davinci/board-dm355-leopard.c
@@ -246,7 +246,7 @@ static __init void dm355_leopard_init(void)
246 if (IS_ERR(aemif)) 246 if (IS_ERR(aemif))
247 WARN("%s: unable to get AEMIF clock\n", __func__); 247 WARN("%s: unable to get AEMIF clock\n", __func__);
248 else 248 else
249 clk_enable(aemif); 249 clk_prepare_enable(aemif);
250 250
251 platform_add_devices(davinci_leopard_devices, 251 platform_add_devices(davinci_leopard_devices,
252 ARRAY_SIZE(davinci_leopard_devices)); 252 ARRAY_SIZE(davinci_leopard_devices));
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
index 1b4a8adcfdc9..5d49c75388ca 100644
--- a/arch/arm/mach-davinci/board-dm365-evm.c
+++ b/arch/arm/mach-davinci/board-dm365-evm.c
@@ -478,7 +478,7 @@ static void __init evm_init_cpld(void)
478 aemif_clk = clk_get(NULL, "aemif"); 478 aemif_clk = clk_get(NULL, "aemif");
479 if (IS_ERR(aemif_clk)) 479 if (IS_ERR(aemif_clk))
480 return; 480 return;
481 clk_enable(aemif_clk); 481 clk_prepare_enable(aemif_clk);
482 482
483 if (request_mem_region(DM365_ASYNC_EMIF_DATA_CE1_BASE, SECTION_SIZE, 483 if (request_mem_region(DM365_ASYNC_EMIF_DATA_CE1_BASE, SECTION_SIZE,
484 "cpld") == NULL) 484 "cpld") == NULL)
@@ -489,7 +489,7 @@ static void __init evm_init_cpld(void)
489 SECTION_SIZE); 489 SECTION_SIZE);
490fail: 490fail:
491 pr_err("ERROR: can't map CPLD\n"); 491 pr_err("ERROR: can't map CPLD\n");
492 clk_disable(aemif_clk); 492 clk_disable_unprepare(aemif_clk);
493 return; 493 return;
494 } 494 }
495 495
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index f8a99ee6bffc..f5e018de7fa5 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -777,7 +777,7 @@ static __init void davinci_evm_init(void)
777 struct davinci_soc_info *soc_info = &davinci_soc_info; 777 struct davinci_soc_info *soc_info = &davinci_soc_info;
778 778
779 aemif_clk = clk_get(NULL, "aemif"); 779 aemif_clk = clk_get(NULL, "aemif");
780 clk_enable(aemif_clk); 780 clk_prepare_enable(aemif_clk);
781 781
782 if (HAS_ATA) { 782 if (HAS_ATA) {
783 if (HAS_NAND || HAS_NOR) 783 if (HAS_NAND || HAS_NOR)
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c
index 144bf31d68dd..3e3e3afebf88 100644
--- a/arch/arm/mach-davinci/board-neuros-osd2.c
+++ b/arch/arm/mach-davinci/board-neuros-osd2.c
@@ -188,7 +188,7 @@ static __init void davinci_ntosd2_init(void)
188 struct davinci_soc_info *soc_info = &davinci_soc_info; 188 struct davinci_soc_info *soc_info = &davinci_soc_info;
189 189
190 aemif_clk = clk_get(NULL, "aemif"); 190 aemif_clk = clk_get(NULL, "aemif");
191 clk_enable(aemif_clk); 191 clk_prepare_enable(aemif_clk);
192 192
193 if (HAS_ATA) { 193 if (HAS_ATA) {
194 if (HAS_NAND) 194 if (HAS_NAND)
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index b90c172d5541..68c5fe01857c 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -212,6 +212,12 @@ static struct clk tptc2_clk = {
212 .flags = ALWAYS_ENABLED, 212 .flags = ALWAYS_ENABLED,
213}; 213};
214 214
215static struct clk pruss_clk = {
216 .name = "pruss",
217 .parent = &pll0_sysclk2,
218 .lpsc = DA8XX_LPSC0_PRUSS,
219};
220
215static struct clk uart0_clk = { 221static struct clk uart0_clk = {
216 .name = "uart0", 222 .name = "uart0",
217 .parent = &pll0_sysclk2, 223 .parent = &pll0_sysclk2,
@@ -385,6 +391,7 @@ static struct clk_lookup da850_clks[] = {
385 CLK(NULL, "tptc1", &tptc1_clk), 391 CLK(NULL, "tptc1", &tptc1_clk),
386 CLK(NULL, "tpcc1", &tpcc1_clk), 392 CLK(NULL, "tpcc1", &tpcc1_clk),
387 CLK(NULL, "tptc2", &tptc2_clk), 393 CLK(NULL, "tptc2", &tptc2_clk),
394 CLK("pruss_uio", "pruss", &pruss_clk),
388 CLK(NULL, "uart0", &uart0_clk), 395 CLK(NULL, "uart0", &uart0_clk),
389 CLK(NULL, "uart1", &uart1_clk), 396 CLK(NULL, "uart1", &uart1_clk),
390 CLK(NULL, "uart2", &uart2_clk), 397 CLK(NULL, "uart2", &uart2_clk),
@@ -781,12 +788,6 @@ static struct map_desc da850_io_desc[] = {
781 .length = DA8XX_CP_INTC_SIZE, 788 .length = DA8XX_CP_INTC_SIZE,
782 .type = MT_DEVICE 789 .type = MT_DEVICE
783 }, 790 },
784 {
785 .virtual = SRAM_VIRT,
786 .pfn = __phys_to_pfn(DA8XX_ARM_RAM_BASE),
787 .length = SZ_8K,
788 .type = MT_DEVICE
789 },
790}; 791};
791 792
792static u32 da850_psc_bases[] = { DA8XX_PSC0_BASE, DA8XX_PSC1_BASE }; 793static u32 da850_psc_bases[] = { DA8XX_PSC0_BASE, DA8XX_PSC1_BASE };
@@ -1239,8 +1240,8 @@ static struct davinci_soc_info davinci_soc_info_da850 = {
1239 .gpio_irq = IRQ_DA8XX_GPIO0, 1240 .gpio_irq = IRQ_DA8XX_GPIO0,
1240 .serial_dev = &da8xx_serial_device, 1241 .serial_dev = &da8xx_serial_device,
1241 .emac_pdata = &da8xx_emac_pdata, 1242 .emac_pdata = &da8xx_emac_pdata,
1242 .sram_dma = DA8XX_ARM_RAM_BASE, 1243 .sram_dma = DA8XX_SHARED_RAM_BASE,
1243 .sram_len = SZ_8K, 1244 .sram_len = SZ_128K,
1244}; 1245};
1245 1246
1246void __init da850_init(void) 1247void __init da850_init(void)
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index bd2f72b414bc..46c9a0c09ae5 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -22,6 +22,7 @@
22#include <mach/time.h> 22#include <mach/time.h>
23#include <mach/da8xx.h> 23#include <mach/da8xx.h>
24#include <mach/cpuidle.h> 24#include <mach/cpuidle.h>
25#include <mach/sram.h>
25 26
26#include "clock.h" 27#include "clock.h"
27#include "asp.h" 28#include "asp.h"
@@ -32,6 +33,7 @@
32#define DA8XX_WDOG_BASE 0x01c21000 /* DA8XX_TIMER64P1_BASE */ 33#define DA8XX_WDOG_BASE 0x01c21000 /* DA8XX_TIMER64P1_BASE */
33#define DA8XX_I2C0_BASE 0x01c22000 34#define DA8XX_I2C0_BASE 0x01c22000
34#define DA8XX_RTC_BASE 0x01c23000 35#define DA8XX_RTC_BASE 0x01c23000
36#define DA8XX_PRUSS_MEM_BASE 0x01c30000
35#define DA8XX_MMCSD0_BASE 0x01c40000 37#define DA8XX_MMCSD0_BASE 0x01c40000
36#define DA8XX_SPI0_BASE 0x01c41000 38#define DA8XX_SPI0_BASE 0x01c41000
37#define DA830_SPI1_BASE 0x01e12000 39#define DA830_SPI1_BASE 0x01e12000
@@ -518,6 +520,75 @@ void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata)
518 } 520 }
519} 521}
520 522
523static struct resource da8xx_pruss_resources[] = {
524 {
525 .start = DA8XX_PRUSS_MEM_BASE,
526 .end = DA8XX_PRUSS_MEM_BASE + 0xFFFF,
527 .flags = IORESOURCE_MEM,
528 },
529 {
530 .start = IRQ_DA8XX_EVTOUT0,
531 .end = IRQ_DA8XX_EVTOUT0,
532 .flags = IORESOURCE_IRQ,
533 },
534 {
535 .start = IRQ_DA8XX_EVTOUT1,
536 .end = IRQ_DA8XX_EVTOUT1,
537 .flags = IORESOURCE_IRQ,
538 },
539 {
540 .start = IRQ_DA8XX_EVTOUT2,
541 .end = IRQ_DA8XX_EVTOUT2,
542 .flags = IORESOURCE_IRQ,
543 },
544 {
545 .start = IRQ_DA8XX_EVTOUT3,
546 .end = IRQ_DA8XX_EVTOUT3,
547 .flags = IORESOURCE_IRQ,
548 },
549 {
550 .start = IRQ_DA8XX_EVTOUT4,
551 .end = IRQ_DA8XX_EVTOUT4,
552 .flags = IORESOURCE_IRQ,
553 },
554 {
555 .start = IRQ_DA8XX_EVTOUT5,
556 .end = IRQ_DA8XX_EVTOUT5,
557 .flags = IORESOURCE_IRQ,
558 },
559 {
560 .start = IRQ_DA8XX_EVTOUT6,
561 .end = IRQ_DA8XX_EVTOUT6,
562 .flags = IORESOURCE_IRQ,
563 },
564 {
565 .start = IRQ_DA8XX_EVTOUT7,
566 .end = IRQ_DA8XX_EVTOUT7,
567 .flags = IORESOURCE_IRQ,
568 },
569};
570
571static struct uio_pruss_pdata da8xx_uio_pruss_pdata = {
572 .pintc_base = 0x4000,
573};
574
575static struct platform_device da8xx_uio_pruss_dev = {
576 .name = "pruss_uio",
577 .id = -1,
578 .num_resources = ARRAY_SIZE(da8xx_pruss_resources),
579 .resource = da8xx_pruss_resources,
580 .dev = {
581 .coherent_dma_mask = DMA_BIT_MASK(32),
582 .platform_data = &da8xx_uio_pruss_pdata,
583 }
584};
585
586int __init da8xx_register_uio_pruss(void)
587{
588 da8xx_uio_pruss_pdata.sram_pool = sram_get_gen_pool();
589 return platform_device_register(&da8xx_uio_pruss_dev);
590}
591
521static const struct display_panel disp_panel = { 592static const struct display_panel disp_panel = {
522 QVGA, 593 QVGA,
523 16, 594 16,
@@ -900,7 +971,7 @@ static int da850_sata_init(struct device *dev, void __iomem *addr)
900 if (IS_ERR(da850_sata_clk)) 971 if (IS_ERR(da850_sata_clk))
901 return PTR_ERR(da850_sata_clk); 972 return PTR_ERR(da850_sata_clk);
902 973
903 ret = clk_enable(da850_sata_clk); 974 ret = clk_prepare_enable(da850_sata_clk);
904 if (ret) 975 if (ret)
905 goto err0; 976 goto err0;
906 977
@@ -931,7 +1002,7 @@ static int da850_sata_init(struct device *dev, void __iomem *addr)
931 return 0; 1002 return 0;
932 1003
933err1: 1004err1:
934 clk_disable(da850_sata_clk); 1005 clk_disable_unprepare(da850_sata_clk);
935err0: 1006err0:
936 clk_put(da850_sata_clk); 1007 clk_put(da850_sata_clk);
937 return ret; 1008 return ret;
@@ -939,7 +1010,7 @@ err0:
939 1010
940static void da850_sata_exit(struct device *dev) 1011static void da850_sata_exit(struct device *dev)
941{ 1012{
942 clk_disable(da850_sata_clk); 1013 clk_disable_unprepare(da850_sata_clk);
943 clk_put(da850_sata_clk); 1014 clk_put(da850_sata_clk);
944} 1015}
945 1016
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index a255434908db..b49c3b77d55e 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -758,12 +758,6 @@ static struct map_desc dm355_io_desc[] = {
758 .length = IO_SIZE, 758 .length = IO_SIZE,
759 .type = MT_DEVICE 759 .type = MT_DEVICE
760 }, 760 },
761 {
762 .virtual = SRAM_VIRT,
763 .pfn = __phys_to_pfn(0x00010000),
764 .length = SZ_32K,
765 .type = MT_MEMORY_NONCACHED,
766 },
767}; 761};
768 762
769/* Contents of JTAG ID register used to identify exact cpu type */ 763/* Contents of JTAG ID register used to identify exact cpu type */
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index b680c832e0ba..6c3980540be0 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -985,12 +985,6 @@ static struct map_desc dm365_io_desc[] = {
985 .length = IO_SIZE, 985 .length = IO_SIZE,
986 .type = MT_DEVICE 986 .type = MT_DEVICE
987 }, 987 },
988 {
989 .virtual = SRAM_VIRT,
990 .pfn = __phys_to_pfn(0x00010000),
991 .length = SZ_32K,
992 .type = MT_MEMORY_NONCACHED,
993 },
994}; 988};
995 989
996static struct resource dm365_ks_resources[] = { 990static struct resource dm365_ks_resources[] = {
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index 14e9947bad6e..11c79a3362ef 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -785,12 +785,6 @@ static struct map_desc dm644x_io_desc[] = {
785 .length = IO_SIZE, 785 .length = IO_SIZE,
786 .type = MT_DEVICE 786 .type = MT_DEVICE
787 }, 787 },
788 {
789 .virtual = SRAM_VIRT,
790 .pfn = __phys_to_pfn(0x00008000),
791 .length = SZ_16K,
792 .type = MT_MEMORY_NONCACHED,
793 },
794}; 788};
795 789
796/* Contents of JTAG ID register used to identify exact cpu type */ 790/* Contents of JTAG ID register used to identify exact cpu type */
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index 97c0f8e555bd..ac7b431c4c8e 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -756,12 +756,6 @@ static struct map_desc dm646x_io_desc[] = {
756 .length = IO_SIZE, 756 .length = IO_SIZE,
757 .type = MT_DEVICE 757 .type = MT_DEVICE
758 }, 758 },
759 {
760 .virtual = SRAM_VIRT,
761 .pfn = __phys_to_pfn(0x00010000),
762 .length = SZ_32K,
763 .type = MT_MEMORY_NONCACHED,
764 },
765}; 759};
766 760
767/* Contents of JTAG ID register used to identify exact cpu type */ 761/* Contents of JTAG ID register used to identify exact cpu type */
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h
index bdc4aa8e672a..046c7238a3d6 100644
--- a/arch/arm/mach-davinci/include/mach/common.h
+++ b/arch/arm/mach-davinci/include/mach/common.h
@@ -104,8 +104,6 @@ int davinci_pm_init(void);
104static inline int davinci_pm_init(void) { return 0; } 104static inline int davinci_pm_init(void) { return 0; }
105#endif 105#endif
106 106
107/* standard place to map on-chip SRAMs; they *may* support DMA */
108#define SRAM_VIRT 0xfffe0000
109#define SRAM_SIZE SZ_128K 107#define SRAM_SIZE SZ_128K
110 108
111#endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */ 109#endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
index aaccdc4528fc..700d311c6854 100644
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -26,6 +26,7 @@
26#include <linux/platform_data/mmc-davinci.h> 26#include <linux/platform_data/mmc-davinci.h>
27#include <linux/platform_data/usb-davinci.h> 27#include <linux/platform_data/usb-davinci.h>
28#include <linux/platform_data/spi-davinci.h> 28#include <linux/platform_data/spi-davinci.h>
29#include <linux/platform_data/uio_pruss.h>
29 30
30#include <media/davinci/vpif_types.h> 31#include <media/davinci/vpif_types.h>
31 32
@@ -72,6 +73,7 @@ extern unsigned int da850_max_speed;
72#define DA8XX_AEMIF_CS2_BASE 0x60000000 73#define DA8XX_AEMIF_CS2_BASE 0x60000000
73#define DA8XX_AEMIF_CS3_BASE 0x62000000 74#define DA8XX_AEMIF_CS3_BASE 0x62000000
74#define DA8XX_AEMIF_CTL_BASE 0x68000000 75#define DA8XX_AEMIF_CTL_BASE 0x68000000
76#define DA8XX_SHARED_RAM_BASE 0x80000000
75#define DA8XX_ARM_RAM_BASE 0xffff0000 77#define DA8XX_ARM_RAM_BASE 0xffff0000
76 78
77void __init da830_init(void); 79void __init da830_init(void);
@@ -86,6 +88,7 @@ int da8xx_register_watchdog(void);
86int da8xx_register_usb20(unsigned mA, unsigned potpgt); 88int da8xx_register_usb20(unsigned mA, unsigned potpgt);
87int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata); 89int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata);
88int da8xx_register_emac(void); 90int da8xx_register_emac(void);
91int da8xx_register_uio_pruss(void);
89int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); 92int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata);
90int da8xx_register_mmcsd0(struct davinci_mmc_config *config); 93int da8xx_register_mmcsd0(struct davinci_mmc_config *config);
91int da850_register_mmcsd1(struct davinci_mmc_config *config); 94int da850_register_mmcsd1(struct davinci_mmc_config *config);
diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/arch/arm/mach-davinci/include/mach/serial.h
index 86a01fa6d3fe..62ad300440f5 100644
--- a/arch/arm/mach-davinci/include/mach/serial.h
+++ b/arch/arm/mach-davinci/include/mach/serial.h
@@ -43,6 +43,7 @@ struct davinci_uart_config {
43}; 43};
44 44
45extern int davinci_serial_init(struct davinci_uart_config *); 45extern int davinci_serial_init(struct davinci_uart_config *);
46extern int davinci_serial_setup_clk(unsigned instance, unsigned int *rate);
46#endif 47#endif
47 48
48#endif /* __ASM_ARCH_SERIAL_H */ 49#endif /* __ASM_ARCH_SERIAL_H */
diff --git a/arch/arm/mach-davinci/include/mach/sram.h b/arch/arm/mach-davinci/include/mach/sram.h
index 111f7cc71e07..4e5db56218b8 100644
--- a/arch/arm/mach-davinci/include/mach/sram.h
+++ b/arch/arm/mach-davinci/include/mach/sram.h
@@ -24,4 +24,7 @@
24extern void *sram_alloc(size_t len, dma_addr_t *dma); 24extern void *sram_alloc(size_t len, dma_addr_t *dma);
25extern void sram_free(void *addr, size_t len); 25extern void sram_free(void *addr, size_t len);
26 26
27/* Get the struct gen_pool * for use in platform data */
28extern struct gen_pool *sram_get_gen_pool(void);
29
27#endif /* __MACH_SRAM_H */ 30#endif /* __MACH_SRAM_H */
diff --git a/arch/arm/mach-davinci/serial.c b/arch/arm/mach-davinci/serial.c
index 1875740fe27c..f2625814c3c9 100644
--- a/arch/arm/mach-davinci/serial.c
+++ b/arch/arm/mach-davinci/serial.c
@@ -70,11 +70,33 @@ static void __init davinci_serial_reset(struct plat_serial8250_port *p)
70 UART_DM646X_SCR_TX_WATERMARK); 70 UART_DM646X_SCR_TX_WATERMARK);
71} 71}
72 72
73int __init davinci_serial_init(struct davinci_uart_config *info) 73/* Enable UART clock and obtain its rate */
74int __init davinci_serial_setup_clk(unsigned instance, unsigned int *rate)
74{ 75{
75 int i;
76 char name[16]; 76 char name[16];
77 struct clk *uart_clk; 77 struct clk *clk;
78 struct davinci_soc_info *soc_info = &davinci_soc_info;
79 struct device *dev = &soc_info->serial_dev->dev;
80
81 sprintf(name, "uart%d", instance);
82 clk = clk_get(dev, name);
83 if (IS_ERR(clk)) {
84 pr_err("%s:%d: failed to get UART%d clock\n",
85 __func__, __LINE__, instance);
86 return PTR_ERR(clk);
87 }
88
89 clk_prepare_enable(clk);
90
91 if (rate)
92 *rate = clk_get_rate(clk);
93
94 return 0;
95}
96
97int __init davinci_serial_init(struct davinci_uart_config *info)
98{
99 int i, ret;
78 struct davinci_soc_info *soc_info = &davinci_soc_info; 100 struct davinci_soc_info *soc_info = &davinci_soc_info;
79 struct device *dev = &soc_info->serial_dev->dev; 101 struct device *dev = &soc_info->serial_dev->dev;
80 struct plat_serial8250_port *p = dev->platform_data; 102 struct plat_serial8250_port *p = dev->platform_data;
@@ -87,16 +109,9 @@ int __init davinci_serial_init(struct davinci_uart_config *info)
87 if (!(info->enabled_uarts & (1 << i))) 109 if (!(info->enabled_uarts & (1 << i)))
88 continue; 110 continue;
89 111
90 sprintf(name, "uart%d", i); 112 ret = davinci_serial_setup_clk(i, &p->uartclk);
91 uart_clk = clk_get(dev, name); 113 if (ret)
92 if (IS_ERR(uart_clk)) {
93 printk(KERN_ERR "%s:%d: failed to get UART%d clock\n",
94 __func__, __LINE__, i);
95 continue; 114 continue;
96 }
97
98 clk_enable(uart_clk);
99 p->uartclk = clk_get_rate(uart_clk);
100 115
101 if (!p->membase && p->mapbase) { 116 if (!p->membase && p->mapbase) {
102 p->membase = ioremap(p->mapbase, SZ_4K); 117 p->membase = ioremap(p->mapbase, SZ_4K);
diff --git a/arch/arm/mach-davinci/sram.c b/arch/arm/mach-davinci/sram.c
index db0f7787faf1..c5f7ee5cc80a 100644
--- a/arch/arm/mach-davinci/sram.c
+++ b/arch/arm/mach-davinci/sram.c
@@ -10,6 +10,7 @@
10 */ 10 */
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/io.h>
13#include <linux/genalloc.h> 14#include <linux/genalloc.h>
14 15
15#include <mach/common.h> 16#include <mach/common.h>
@@ -17,6 +18,11 @@
17 18
18static struct gen_pool *sram_pool; 19static struct gen_pool *sram_pool;
19 20
21struct gen_pool *sram_get_gen_pool(void)
22{
23 return sram_pool;
24}
25
20void *sram_alloc(size_t len, dma_addr_t *dma) 26void *sram_alloc(size_t len, dma_addr_t *dma)
21{ 27{
22 unsigned long vaddr; 28 unsigned long vaddr;
@@ -32,7 +38,7 @@ void *sram_alloc(size_t len, dma_addr_t *dma)
32 return NULL; 38 return NULL;
33 39
34 if (dma) 40 if (dma)
35 *dma = dma_base + (vaddr - SRAM_VIRT); 41 *dma = gen_pool_virt_to_phys(sram_pool, vaddr);
36 return (void *)vaddr; 42 return (void *)vaddr;
37 43
38} 44}
@@ -53,8 +59,10 @@ EXPORT_SYMBOL(sram_free);
53 */ 59 */
54static int __init sram_init(void) 60static int __init sram_init(void)
55{ 61{
62 phys_addr_t phys = davinci_soc_info.sram_dma;
56 unsigned len = davinci_soc_info.sram_len; 63 unsigned len = davinci_soc_info.sram_len;
57 int status = 0; 64 int status = 0;
65 void *addr;
58 66
59 if (len) { 67 if (len) {
60 len = min_t(unsigned, len, SRAM_SIZE); 68 len = min_t(unsigned, len, SRAM_SIZE);
@@ -62,8 +70,17 @@ static int __init sram_init(void)
62 if (!sram_pool) 70 if (!sram_pool)
63 status = -ENOMEM; 71 status = -ENOMEM;
64 } 72 }
65 if (sram_pool) 73
66 status = gen_pool_add(sram_pool, SRAM_VIRT, len, -1); 74 if (sram_pool) {
75 addr = ioremap(phys, len);
76 if (!addr)
77 return -ENOMEM;
78 status = gen_pool_add_virt(sram_pool, (unsigned)addr,
79 phys, len, -1);
80 if (status < 0)
81 iounmap(addr);
82 }
83
67 WARN_ON(status < 0); 84 WARN_ON(status < 0);
68 return status; 85 return status;
69} 86}
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
index 75da315b6587..9847938785ca 100644
--- a/arch/arm/mach-davinci/time.c
+++ b/arch/arm/mach-davinci/time.c
@@ -379,7 +379,7 @@ static void __init davinci_timer_init(void)
379 379
380 timer_clk = clk_get(NULL, "timer0"); 380 timer_clk = clk_get(NULL, "timer0");
381 BUG_ON(IS_ERR(timer_clk)); 381 BUG_ON(IS_ERR(timer_clk));
382 clk_enable(timer_clk); 382 clk_prepare_enable(timer_clk);
383 383
384 /* init timer hw */ 384 /* init timer hw */
385 timer_init(); 385 timer_init();
@@ -429,7 +429,7 @@ void davinci_watchdog_reset(struct platform_device *pdev)
429 wd_clk = clk_get(&pdev->dev, NULL); 429 wd_clk = clk_get(&pdev->dev, NULL);
430 if (WARN_ON(IS_ERR(wd_clk))) 430 if (WARN_ON(IS_ERR(wd_clk)))
431 return; 431 return;
432 clk_enable(wd_clk); 432 clk_prepare_enable(wd_clk);
433 433
434 /* disable, internal clock source */ 434 /* disable, internal clock source */
435 __raw_writel(0, base + TCR); 435 __raw_writel(0, base + TCR);