Change in simtrace2[master]: firmware: remove usb pullup that dates back to simtrace1

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Mon Nov 1 14:17:55 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/26027 )

Change subject: firmware: remove usb pullup that dates back to simtrace1
......................................................................

firmware: remove usb pullup that dates back to simtrace1

All the parts are DNP and never existed on the simtrace2 with sam3; the
sam3 has internal pullups that are part of the usb peripheral.

Change-Id: I04a703a2eba6ff1dc64692c089213389d0c1066d
---
M firmware/apps/dfu/main.c
M firmware/libboard/octsimtest/include/board.h
M firmware/libboard/sam3p256/include/board.h
M firmware/libboard/simtrace/include/board.h
M firmware/libcommon/source/usb.c
5 files changed, 0 insertions(+), 32 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/firmware/apps/dfu/main.c b/firmware/apps/dfu/main.c
index d5a6fa6..4813881 100644
--- a/firmware/apps/dfu/main.c
+++ b/firmware/apps/dfu/main.c
@@ -342,16 +342,7 @@
 	TRACE_INFO("USB init...\n\r");
 	/* Signal USB reset by disabling the pull-up on USB D+ for at least 10 ms */
 	USBD_Disconnect();
-#ifdef PIN_USB_PULLUP
-	const Pin usb_dp_pullup = PIN_USB_PULLUP;
-	PIO_Configure(&usb_dp_pullup, 1);
-	PIO_Set(&usb_dp_pullup);
-#endif
 	mdelay(50);
-#ifdef PIN_USB_PULLUP
-	PIO_Clear(&usb_dp_pullup);
-#endif
-
 	USBDFU_Initialize(&dfu_descriptors);
 
 	while (USBD_GetState() < USBD_STATE_CONFIGURED) {
diff --git a/firmware/libboard/octsimtest/include/board.h b/firmware/libboard/octsimtest/include/board.h
index 530f27b..697619c 100644
--- a/firmware/libboard/octsimtest/include/board.h
+++ b/firmware/libboard/octsimtest/include/board.h
@@ -87,11 +87,6 @@
 /* SPI flash write protect pin (active low, pulled low) */
 #define PIN_SPI_WP    {PA15, PIOA, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
 
-/** Pin configuration to control USB pull-up on D+
- *  @details the USB pull-up on D+ is enable by default on the board but can be disabled by setting PA16 high
- */
-#define PIN_USB_PULLUP  {PIO_PA16, PIOA, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
-
 /** USB definitions */
 /* OpenMoko SIMtrace 2 USB vendor ID */
 #define BOARD_USB_VENDOR_ID	USB_VENDOR_OPENMOKO
diff --git a/firmware/libboard/sam3p256/include/board.h b/firmware/libboard/sam3p256/include/board.h
index 58e8a24..06cfdce 100644
--- a/firmware/libboard/sam3p256/include/board.h
+++ b/firmware/libboard/sam3p256/include/board.h
@@ -135,11 +135,6 @@
 #define PIN_SPI_WP    {PA15, PIOA, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
 #endif
 
-/** Pin configuration to control USB pull-up on D+
- *  @details the USB pull-up on D+ is enable by default on the board but can be disabled by setting PA16 high
- */
-#define PIN_USB_PULLUP  {PIO_PA16, PIOA, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
-
 /** USB definitions */
 /* OpenMoko SIMtrace 2 USB vendor ID */
 #define BOARD_USB_VENDOR_ID	USB_VENDOR_OPENMOKO
diff --git a/firmware/libboard/simtrace/include/board.h b/firmware/libboard/simtrace/include/board.h
index be18f64..6e4cd98 100644
--- a/firmware/libboard/simtrace/include/board.h
+++ b/firmware/libboard/simtrace/include/board.h
@@ -134,11 +134,6 @@
 /* SPI flash write protect pin (active low, pulled low) */
 #define PIN_SPI_WP    {PA15, PIOA, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
 
-/** Pin configuration to control USB pull-up on D+
- *  @details the USB pull-up on D+ is enable by default on the board but can be disabled by setting PA16 high
- */
-#define PIN_USB_PULLUP  {PIO_PA16, PIOA, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
-
 /** USB definitions */
 /* OpenMoko SIMtrace 2 USB vendor ID */
 #define BOARD_USB_VENDOR_ID	USB_VENDOR_OPENMOKO
diff --git a/firmware/libcommon/source/usb.c b/firmware/libcommon/source/usb.c
index e75646e..0868263 100644
--- a/firmware/libcommon/source/usb.c
+++ b/firmware/libcommon/source/usb.c
@@ -689,16 +689,8 @@
 {
 	unsigned int i;
 	/* Signal USB reset by disabling the pull-up on USB D+ for at least 10 ms */
-#ifdef PIN_USB_PULLUP
-	const Pin usb_dp_pullup = PIN_USB_PULLUP;
-	PIO_Configure(&usb_dp_pullup, 1);
-	PIO_Set(&usb_dp_pullup);
-#endif
 	USBD_HAL_Suspend();
 	mdelay(20);
-#ifdef PIN_USB_PULLUP
-	PIO_Clear(&usb_dp_pullup);
-#endif
 	USBD_HAL_Activate();
 
 	// Get std USB driver

-- 
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/26027
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I04a703a2eba6ff1dc64692c089213389d0c1066d
Gerrit-Change-Number: 26027
Gerrit-PatchSet: 5
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211101/9223499d/attachment.htm>


More information about the gerrit-log mailing list