Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbarm/stand/bootimx23 Contribution from Petri Laakso:



details:   https://anonhg.NetBSD.org/src/rev/d883aa5652f5
branches:  trunk
changeset: 784735:d883aa5652f5
user:      jkunz <jkunz%NetBSD.org@localhost>
date:      Thu Feb 07 21:56:36 2013 +0000

description:
Contribution from Petri Laakso:
Enable debug UART input
Fixes issue with some OLinuXino boards which were not able to
accept input from the user.

diffstat:

 sys/arch/evbarm/stand/bootimx23/pinctrl_prep.c |  24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diffs (51 lines):

diff -r 33136d9078ed -r d883aa5652f5 sys/arch/evbarm/stand/bootimx23/pinctrl_prep.c
--- a/sys/arch/evbarm/stand/bootimx23/pinctrl_prep.c    Thu Feb 07 20:31:52 2013 +0000
+++ b/sys/arch/evbarm/stand/bootimx23/pinctrl_prep.c    Thu Feb 07 21:56:36 2013 +0000
@@ -1,4 +1,4 @@
-/* $Id: pinctrl_prep.c,v 1.2 2012/12/16 19:08:44 jkunz Exp $ */
+/* $Id: pinctrl_prep.c,v 1.3 2013/02/07 21:56:36 jkunz Exp $ */
 
 /*
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -42,9 +42,10 @@
 static void configure_emi_mux(void);
 static void configure_emi_drive(int);
 static void disable_emi_padkeepers(void);
-static void configure_ssp_mux();
+static void configure_ssp_mux(void);
 static void configure_ssp_drive(int);
 static void configure_ssp_pullups(void);
+static void configure_dbuart_mux(void);
 
 /* EMI pins output drive strengths */
 #define DRIVE_04_MA    0x0     /* 4 mA */
@@ -72,6 +73,9 @@
        configure_ssp_drive(DRIVE_16_MA);
        configure_ssp_pullups();
 
+       /* Debug UART. */
+       configure_dbuart_mux();
+
        return 0;
 }
 
@@ -484,3 +488,19 @@
 
        return;
 }
+
+/*
+ * Configure Debug UART MUX.
+ */
+static
+void configure_dbuart_mux(void)
+{
+       REG_WR(HW_PINCTRL_BASE + HW_PINCTRL_MUXSEL3_CLR,
+           __SHIFTIN(0x3, HW_PINCTRL_MUXSEL3_BANK1_PIN27) |
+           __SHIFTIN(0x3, HW_PINCTRL_MUXSEL3_BANK1_PIN26));
+       REG_WR(HW_PINCTRL_BASE + HW_PINCTRL_MUXSEL3_SET,
+           __SHIFTIN(0x2, HW_PINCTRL_MUXSEL3_BANK1_PIN27) |
+           __SHIFTIN(0x2, HW_PINCTRL_MUXSEL3_BANK1_PIN26));
+
+       return;
+}



Home | Main Index | Thread Index | Old Index