diff options
author | Tony Lindgren <tony@atomide.com> | 2010-03-01 17:19:05 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-03-01 17:19:05 -0500 |
commit | d702d12167a2c05a346f49aac7a311d597762495 (patch) | |
tree | baae42c299cce34d6df24b5d01f8b1d0b481bd9a /arch/arm/mach-davinci/dm365.c | |
parent | 9418c65f9bd861d0f7e39aab9cfb3aa6f2275d11 (diff) | |
parent | ac0f6f927db539e03e1f3f61bcd4ed57d5cde7a9 (diff) |
Merge with mainline to remove plat-omap/Kconfig conflict
Conflicts:
arch/arm/plat-omap/Kconfig
Diffstat (limited to 'arch/arm/mach-davinci/dm365.c')
-rw-r--r-- | arch/arm/mach-davinci/dm365.c | 102 |
1 files changed, 101 insertions, 1 deletions
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index f53735cb922e..ce9da43a628b 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
@@ -1008,6 +1008,97 @@ void __init dm365_init(void) | |||
1008 | davinci_common_init(&davinci_soc_info_dm365); | 1008 | davinci_common_init(&davinci_soc_info_dm365); |
1009 | } | 1009 | } |
1010 | 1010 | ||
1011 | static struct resource dm365_vpss_resources[] = { | ||
1012 | { | ||
1013 | /* VPSS ISP5 Base address */ | ||
1014 | .name = "isp5", | ||
1015 | .start = 0x01c70000, | ||
1016 | .end = 0x01c70000 + 0xff, | ||
1017 | .flags = IORESOURCE_MEM, | ||
1018 | }, | ||
1019 | { | ||
1020 | /* VPSS CLK Base address */ | ||
1021 | .name = "vpss", | ||
1022 | .start = 0x01c70200, | ||
1023 | .end = 0x01c70200 + 0xff, | ||
1024 | .flags = IORESOURCE_MEM, | ||
1025 | }, | ||
1026 | }; | ||
1027 | |||
1028 | static struct platform_device dm365_vpss_device = { | ||
1029 | .name = "vpss", | ||
1030 | .id = -1, | ||
1031 | .dev.platform_data = "dm365_vpss", | ||
1032 | .num_resources = ARRAY_SIZE(dm365_vpss_resources), | ||
1033 | .resource = dm365_vpss_resources, | ||
1034 | }; | ||
1035 | |||
1036 | static struct resource vpfe_resources[] = { | ||
1037 | { | ||
1038 | .start = IRQ_VDINT0, | ||
1039 | .end = IRQ_VDINT0, | ||
1040 | .flags = IORESOURCE_IRQ, | ||
1041 | }, | ||
1042 | { | ||
1043 | .start = IRQ_VDINT1, | ||
1044 | .end = IRQ_VDINT1, | ||
1045 | .flags = IORESOURCE_IRQ, | ||
1046 | }, | ||
1047 | }; | ||
1048 | |||
1049 | static u64 vpfe_capture_dma_mask = DMA_BIT_MASK(32); | ||
1050 | static struct platform_device vpfe_capture_dev = { | ||
1051 | .name = CAPTURE_DRV_NAME, | ||
1052 | .id = -1, | ||
1053 | .num_resources = ARRAY_SIZE(vpfe_resources), | ||
1054 | .resource = vpfe_resources, | ||
1055 | .dev = { | ||
1056 | .dma_mask = &vpfe_capture_dma_mask, | ||
1057 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
1058 | }, | ||
1059 | }; | ||
1060 | |||
1061 | static void dm365_isif_setup_pinmux(void) | ||
1062 | { | ||
1063 | davinci_cfg_reg(DM365_VIN_CAM_WEN); | ||
1064 | davinci_cfg_reg(DM365_VIN_CAM_VD); | ||
1065 | davinci_cfg_reg(DM365_VIN_CAM_HD); | ||
1066 | davinci_cfg_reg(DM365_VIN_YIN4_7_EN); | ||
1067 | davinci_cfg_reg(DM365_VIN_YIN0_3_EN); | ||
1068 | } | ||
1069 | |||
1070 | static struct resource isif_resource[] = { | ||
1071 | /* ISIF Base address */ | ||
1072 | { | ||
1073 | .start = 0x01c71000, | ||
1074 | .end = 0x01c71000 + 0x1ff, | ||
1075 | .flags = IORESOURCE_MEM, | ||
1076 | }, | ||
1077 | /* ISIF Linearization table 0 */ | ||
1078 | { | ||
1079 | .start = 0x1C7C000, | ||
1080 | .end = 0x1C7C000 + 0x2ff, | ||
1081 | .flags = IORESOURCE_MEM, | ||
1082 | }, | ||
1083 | /* ISIF Linearization table 1 */ | ||
1084 | { | ||
1085 | .start = 0x1C7C400, | ||
1086 | .end = 0x1C7C400 + 0x2ff, | ||
1087 | .flags = IORESOURCE_MEM, | ||
1088 | }, | ||
1089 | }; | ||
1090 | static struct platform_device dm365_isif_dev = { | ||
1091 | .name = "isif", | ||
1092 | .id = -1, | ||
1093 | .num_resources = ARRAY_SIZE(isif_resource), | ||
1094 | .resource = isif_resource, | ||
1095 | .dev = { | ||
1096 | .dma_mask = &vpfe_capture_dma_mask, | ||
1097 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
1098 | .platform_data = dm365_isif_setup_pinmux, | ||
1099 | }, | ||
1100 | }; | ||
1101 | |||
1011 | static int __init dm365_init_devices(void) | 1102 | static int __init dm365_init_devices(void) |
1012 | { | 1103 | { |
1013 | if (!cpu_is_davinci_dm365()) | 1104 | if (!cpu_is_davinci_dm365()) |
@@ -1016,7 +1107,16 @@ static int __init dm365_init_devices(void) | |||
1016 | davinci_cfg_reg(DM365_INT_EDMA_CC); | 1107 | davinci_cfg_reg(DM365_INT_EDMA_CC); |
1017 | platform_device_register(&dm365_edma_device); | 1108 | platform_device_register(&dm365_edma_device); |
1018 | platform_device_register(&dm365_emac_device); | 1109 | platform_device_register(&dm365_emac_device); |
1019 | 1110 | /* Add isif clock alias */ | |
1111 | clk_add_alias("master", dm365_isif_dev.name, "vpss_master", NULL); | ||
1112 | platform_device_register(&dm365_vpss_device); | ||
1113 | platform_device_register(&dm365_isif_dev); | ||
1114 | platform_device_register(&vpfe_capture_dev); | ||
1020 | return 0; | 1115 | return 0; |
1021 | } | 1116 | } |
1022 | postcore_initcall(dm365_init_devices); | 1117 | postcore_initcall(dm365_init_devices); |
1118 | |||
1119 | void dm365_set_vpfe_config(struct vpfe_config *cfg) | ||
1120 | { | ||
1121 | vpfe_capture_dev.dev.platform_data = cfg; | ||
1122 | } | ||