diff options
Diffstat (limited to 'arch/arm/mach-davinci/devices-da8xx.c')
-rw-r--r-- | arch/arm/mach-davinci/devices-da8xx.c | 77 |
1 files changed, 74 insertions, 3 deletions
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 | ||
523 | static 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 | |||
571 | static struct uio_pruss_pdata da8xx_uio_pruss_pdata = { | ||
572 | .pintc_base = 0x4000, | ||
573 | }; | ||
574 | |||
575 | static 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 | |||
586 | int __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 | |||
521 | static const struct display_panel disp_panel = { | 592 | static 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 | ||
933 | err1: | 1004 | err1: |
934 | clk_disable(da850_sata_clk); | 1005 | clk_disable_unprepare(da850_sata_clk); |
935 | err0: | 1006 | err0: |
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 | ||
940 | static void da850_sata_exit(struct device *dev) | 1011 | static 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 | ||