aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci
diff options
context:
space:
mode:
authorMatt Porter <mporter@ti.com>2012-10-08 09:53:08 -0400
committerSekhar Nori <nsekhar@ti.com>2012-10-27 06:58:36 -0400
commit8e0d72d2c7a6955692ba0a21bbf5ca86e8061777 (patch)
treeefff7dfa7085f951a83b1ce3c7362a78d7d067ca /arch/arm/mach-davinci
parent983c42ba3465d4a80edfd318de24f8ffb2bf71ca (diff)
ARM: davinci: da8xx: add DA850 PRUSS support
Adds PRUSS clock support and registration helper for the uio_pruss device. Signed-off-by: Matt Porter <mporter@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r--arch/arm/mach-davinci/da850.c7
-rw-r--r--arch/arm/mach-davinci/devices-da8xx.c71
-rw-r--r--arch/arm/mach-davinci/include/mach/da8xx.h2
3 files changed, 80 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 41d2cabbcf33..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),
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index d53612f12c52..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,
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
index 97bc7006bfc6..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
@@ -87,6 +88,7 @@ int da8xx_register_watchdog(void);
87int da8xx_register_usb20(unsigned mA, unsigned potpgt); 88int da8xx_register_usb20(unsigned mA, unsigned potpgt);
88int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata); 89int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata);
89int da8xx_register_emac(void); 90int da8xx_register_emac(void);
91int da8xx_register_uio_pruss(void);
90int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); 92int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata);
91int da8xx_register_mmcsd0(struct davinci_mmc_config *config); 93int da8xx_register_mmcsd0(struct davinci_mmc_config *config);
92int da850_register_mmcsd1(struct davinci_mmc_config *config); 94int da850_register_mmcsd1(struct davinci_mmc_config *config);