diff mbox

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

Message ID 1293797894-15964-2-git-send-email-subhasish@mistralsolutions.com (mailing list archive)
State Superseded
Headers show

Commit Message

Subhasish Ghosh Dec. 31, 2010, 12:18 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 b01fb2a..bb9f5d5 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1039,6 +1039,33 @@  static __init int da850_evm_init_cpufreq(void)
 static __init int da850_evm_init_cpufreq(void) { return 0; }
 #endif
 
+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;