Contribution from Petri Laakso:
Enable debug UART input Fixes issue with some OLinuXino boards which were not able to accept input from the user.
This commit is contained in:
parent
af9a2d00d7
commit
f9de65ba47
|
@ -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 @@ pinctrl_prep(void)
|
|||
configure_ssp_drive(DRIVE_16_MA);
|
||||
configure_ssp_pullups();
|
||||
|
||||
/* Debug UART. */
|
||||
configure_dbuart_mux();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -484,3 +488,19 @@ configure_ssp_pullups(void)
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue