Commit af5db73cb0ef2402233b447e5d8c043e395d9c5a
1 parent
e1bb6be393
Exists in
master
ARM:OMAP:AM33XX:pruss: Add platform specific changes for AM33XX in UIO PRUSS driver.
Added AM33XX dependency for UIO_PRUSS driver to build in Kconfig. ICSS memory map base and length were added in am33xx.h Other PRU specific resources like ICSS IRQs for AM33XX, uio_pruss driver register were added to devices.c Signed-off-by: Amit Shah <amit.shah@ti.com>
Showing 3 changed files with 80 additions and 3 deletions Side-by-side Diff
arch/arm/mach-omap2/devices.c
... | ... | @@ -22,6 +22,7 @@ |
22 | 22 | #include <linux/etherdevice.h> |
23 | 23 | #include <linux/dma-mapping.h> |
24 | 24 | #include <linux/can/platform/d_can.h> |
25 | +#include <linux/platform_data/uio_pruss.h> | |
25 | 26 | |
26 | 27 | #include <mach/hardware.h> |
27 | 28 | #include <mach/irqs.h> |
... | ... | @@ -999,6 +1000,76 @@ |
999 | 1000 | static inline void am33xx_register_edma(void) {} |
1000 | 1001 | #endif |
1001 | 1002 | |
1003 | +#if defined (CONFIG_SOC_OMAPAM33XX) | |
1004 | +struct uio_pruss_pdata am335x_pruss_uio_pdata = { | |
1005 | + .pintc_base = 0x20000, | |
1006 | +}; | |
1007 | + | |
1008 | +static struct resource am335x_pruss_resources[] = { | |
1009 | + { | |
1010 | + .start = AM33XX_ICSS_BASE, | |
1011 | + .end = AM33XX_ICSS_BASE + AM33XX_ICSS_LEN, | |
1012 | + .flags = IORESOURCE_MEM, | |
1013 | + }, | |
1014 | + { | |
1015 | + .start = AM33XX_IRQ_ICSS0_0, | |
1016 | + .end = AM33XX_IRQ_ICSS0_0, | |
1017 | + .flags = IORESOURCE_IRQ, | |
1018 | + }, | |
1019 | + { | |
1020 | + .start = AM33XX_IRQ_ICSS0_1, | |
1021 | + .end = AM33XX_IRQ_ICSS0_1, | |
1022 | + .flags = IORESOURCE_IRQ, | |
1023 | + }, | |
1024 | + { | |
1025 | + .start = AM33XX_IRQ_ICSS0_2, | |
1026 | + .end = AM33XX_IRQ_ICSS0_2, | |
1027 | + .flags = IORESOURCE_IRQ, | |
1028 | + }, | |
1029 | + { | |
1030 | + .start = AM33XX_IRQ_ICSS0_3, | |
1031 | + .end = AM33XX_IRQ_ICSS0_3, | |
1032 | + .flags = IORESOURCE_IRQ, | |
1033 | + }, | |
1034 | + { | |
1035 | + .start = AM33XX_IRQ_ICSS0_4, | |
1036 | + .end = AM33XX_IRQ_ICSS0_4, | |
1037 | + .flags = IORESOURCE_IRQ, | |
1038 | + }, | |
1039 | + { | |
1040 | + .start = AM33XX_IRQ_ICSS0_5, | |
1041 | + .end = AM33XX_IRQ_ICSS0_5, | |
1042 | + .flags = IORESOURCE_IRQ, | |
1043 | + }, | |
1044 | + { | |
1045 | + .start = AM33XX_IRQ_ICSS0_6, | |
1046 | + .end = AM33XX_IRQ_ICSS0_6, | |
1047 | + .flags = IORESOURCE_IRQ, | |
1048 | + }, | |
1049 | + { | |
1050 | + .start = AM33XX_IRQ_ICSS0_7, | |
1051 | + .end = AM33XX_IRQ_ICSS0_7, | |
1052 | + .flags = IORESOURCE_IRQ, | |
1053 | + }, | |
1054 | +}; | |
1055 | + | |
1056 | +static struct platform_device am335x_pruss_uio_dev = { | |
1057 | + .name = "pruss_uio", | |
1058 | + .id = -1, | |
1059 | + .num_resources = ARRAY_SIZE(am335x_pruss_resources), | |
1060 | + .resource = am335x_pruss_resources, | |
1061 | + .dev = { | |
1062 | + .coherent_dma_mask = 0xffffffff, | |
1063 | + } | |
1064 | +}; | |
1065 | + | |
1066 | +int __init am335x_register_pruss_uio(struct uio_pruss_pdata *config) | |
1067 | +{ | |
1068 | + am335x_pruss_uio_dev.dev.platform_data = config; | |
1069 | + return platform_device_register(&am335x_pruss_uio_dev); | |
1070 | +} | |
1071 | +#endif | |
1072 | + | |
1002 | 1073 | /*-------------------------------------------------------------------------*/ |
1003 | 1074 | |
1004 | 1075 | static int __init omap2_init_devices(void) |
... | ... | @@ -1019,7 +1090,9 @@ |
1019 | 1090 | omap_init_vout(); |
1020 | 1091 | am33xx_register_edma(); |
1021 | 1092 | am33xx_init_pcm(); |
1022 | - | |
1093 | +#if defined (CONFIG_SOC_OMAPAM33XX) | |
1094 | + am335x_register_pruss_uio(&am335x_pruss_uio_pdata); | |
1095 | +#endif | |
1023 | 1096 | return 0; |
1024 | 1097 | } |
1025 | 1098 | arch_initcall(omap2_init_devices); |
arch/arm/plat-omap/include/plat/am33xx.h
drivers/uio/Kconfig
... | ... | @@ -96,9 +96,9 @@ |
96 | 96 | |
97 | 97 | config UIO_PRUSS |
98 | 98 | tristate "Texas Instruments PRUSS driver" |
99 | - depends on ARCH_DAVINCI_DA850 | |
99 | + depends on ARCH_DAVINCI_DA850 || SOC_OMAPAM33XX | |
100 | 100 | help |
101 | - PRUSS driver for OMAPL138/DA850/AM18XX devices | |
101 | + PRUSS driver for OMAPL138/DA850/AM18XX/AM33XX devices | |
102 | 102 | PRUSS driver requires user space components, examples and user space |
103 | 103 | driver is available from below SVN repo - you may use anonymous login |
104 | 104 |