diff mbox

[2/2] da850: board file modifications for PRU SUART.

Message ID 1291389108-25356-2-git-send-email-subhasish@mistralsolutions.com (mailing list archive)
State Changes Requested
Headers show

Commit Message

Subhasish Ghosh Dec. 3, 2010, 3:11 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index f89b0b7..86a89b1 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -736,6 +736,34 @@  static struct edma_rsv_info *da850_edma_rsv[2] = {
 	&da850_edma_cc1_rsv,
 };
 
+const short da850_evm_pru_suart_pins[] = {
+	DA850_AHCLKX, DA850_ACLKX, DA850_AFSX,
+	DA850_AHCLKR, DA850_ACLKR, DA850_AFSR,
+	DA850_AXR_13, DA850_AXR_9, DA850_AXR_7,
+	DA850_AXR_14, DA850_AXR_10, DA850_AXR_8,
+	-1
+};
+
+static int __init da850_evm_setup_pru_suart(void)
+{
+	int ret;
+
+	if (!machine_is_davinci_da850_evm())
+		return 0;
+
+	ret = davinci_cfg_reg_list(da850_evm_pru_suart_pins);
+	if (ret)
+		pr_warning("%s: da850_evm_pru_suart_pins "
+				"mux setup failed: %d\n", __func__, ret);
+	ret = da8xx_register_pru_suart();
+	if (ret)
+		pr_warning("%s: pru suart registration "
+				"failed: %d\n", __func__, ret);
+	return ret;
+}
+
+device_initcall(da850_evm_setup_pru_suart);
+
 static __init void da850_evm_init(void)
 {
 	int ret;