From 28174982b6a4face3f58bd9e4e5479c30766a5db Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 7 May 2017 16:45:10 +0200 Subject: [PATCH] qmod: Initialize ST12 specific I/O pins only on ST12 --- firmware/libboard/qmod/source/board_qmod.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/firmware/libboard/qmod/source/board_qmod.c b/firmware/libboard/qmod/source/board_qmod.c index 24d5649b..88df9a39 100644 --- a/firmware/libboard/qmod/source/board_qmod.c +++ b/firmware/libboard/qmod/source/board_qmod.c @@ -236,11 +236,15 @@ void board_main_top(void) wwan_led_init(); wwan_perst_init(); - /* set PIN_PRTPWR_OVERRIDE to output-low to avoid the internal - * pull-up on the input to keep SIMTRACE12 alive */ - PIO_Configure(&pin_hubpwr_override, 1); - PIO_Configure(&pin_hub_rst, 1); + /* make sure we can detect whether running in ST12 or ST34 */ PIO_Configure(&pin_1234_detect, 1); + + if (qmod_sam3_is_12()) { + /* set PIN_PRTPWR_OVERRIDE to output-low to avoid the internal + * pull-up on the input to keep SIMTRACE12 alive */ + PIO_Configure(&pin_hubpwr_override, 1); + PIO_Configure(&pin_hub_rst, 1); + } PIO_Configure(&pin_peer_rst, 1); PIO_Configure(&pin_peer_erase, 1); PIO_Configure(&pin_conn_usim1, 1);