From 1ec72470e353084b7fba49cee6fc3829db3ec37f Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 17 Mar 2014 14:13:09 -0600 Subject: [PATCH] Removed to unnecessary, cloned USB-related logic --- configs/ea3131/src/up_boot.c | 6 ++-- configs/olimex-lpc-h3131/src/lpc31_boot.c | 6 ++-- configs/sam3u-ek/src/sam3u-ek.h | 10 ------ configs/sam3u-ek/src/up_boot.c | 12 ------- configs/sam3u-ek/src/up_usbdev.c | 30 ------------------ configs/sam4e-ek/src/Makefile | 2 +- configs/sam4e-ek/src/sam4e-ek.h | 10 ------ configs/sam4e-ek/src/sam_boot.c | 12 ------- .../sam4e-ek/src/{sam_usbdev.c => sam_udp.c} | 31 +------------------ 9 files changed, 8 insertions(+), 111 deletions(-) rename configs/sam4e-ek/src/{sam_usbdev.c => sam_udp.c} (79%) diff --git a/configs/ea3131/src/up_boot.c b/configs/ea3131/src/up_boot.c index 7d4fe98778..d7e85d9ae1 100644 --- a/configs/ea3131/src/up_boot.c +++ b/configs/ea3131/src/up_boot.c @@ -103,9 +103,9 @@ void lpc31_boardinitialize(void) #endif /* Initialize USB if the 1) the HS host or device controller is in the - * configuration and 2) the weak function sam_usbinitialize() has been brought - * into the build. Presumeably either CONFIG_USBDEV or CONFIG_USBHOST is also - * selected. + * configuration and 2) the weak function lpc31_usbhost_bootinitialize() has + * been brought into the build. Presumably either CONFIG_USBDEV or CONFIG_USBHOST + * is also selected. */ #if defined(CONFIG_SAMA5_UHPHS) || defined(CONFIG_SAMA5_UDPHS) diff --git a/configs/olimex-lpc-h3131/src/lpc31_boot.c b/configs/olimex-lpc-h3131/src/lpc31_boot.c index b3ac6ce7e9..08d57a9adb 100644 --- a/configs/olimex-lpc-h3131/src/lpc31_boot.c +++ b/configs/olimex-lpc-h3131/src/lpc31_boot.c @@ -102,9 +102,9 @@ void lpc31_boardinitialize(void) #endif /* Initialize USB if the 1) the HS host or device controller is in the - * configuration and 2) the weak function sam_usbinitialize() has been brought - * into the build. Presumeably either CONFIG_USBDEV or CONFIG_USBHOST is also - * selected. + * configuration and 2) the weak function lpc31_usbhost_bootinitialize() has + * been brought into the build. Presumably either CONFIG_USBDEV or + * CONFIG_USBHOST is also selected. */ #ifdef HAVE_USBHOST diff --git a/configs/sam3u-ek/src/sam3u-ek.h b/configs/sam3u-ek/src/sam3u-ek.h index 3d81f2fd36..de9c37a13b 100644 --- a/configs/sam3u-ek/src/sam3u-ek.h +++ b/configs/sam3u-ek/src/sam3u-ek.h @@ -221,16 +221,6 @@ void weak_function sam_spiinitialize(void); -/************************************************************************************ - * Name: sam_usbinitialize - * - * Description: - * Called to setup USB-related GPIO pins for the SAM3U-EK board. - * - ************************************************************************************/ - -void weak_function sam_usbinitialize(void); - /************************************************************************************ * Name: sam_hsmciinit * diff --git a/configs/sam3u-ek/src/up_boot.c b/configs/sam3u-ek/src/up_boot.c index b373b5f71c..986a315c4d 100644 --- a/configs/sam3u-ek/src/up_boot.c +++ b/configs/sam3u-ek/src/up_boot.c @@ -81,18 +81,6 @@ void sam_boardinitialize(void) } #endif - /* Initialize USB if 1) USBDEV is selected, 2) the USB controller is not - * disabled, and 3) the weak function sam_usbinitialize() has been brought - * into the build. - */ - -#if defined(CONFIG_USBDEV) && defined(CONFIG_SAM34_USB) - if (sam_usbinitialize) - { - sam_usbinitialize(); - } -#endif - /* Configure on-board LEDs if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS diff --git a/configs/sam3u-ek/src/up_usbdev.c b/configs/sam3u-ek/src/up_usbdev.c index b67ea88eb0..acbb708bc3 100644 --- a/configs/sam3u-ek/src/up_usbdev.c +++ b/configs/sam3u-ek/src/up_usbdev.c @@ -62,35 +62,6 @@ * Public Functions ************************************************************************************/ -/************************************************************************************ - * Name: sam_usbinitialize - * - * Description: - * Called to setup USB-related GPIO pins for the SAM3U-EK board. - * - ************************************************************************************/ - -void sam_usbinitialize(void) -{ -} - -/************************************************************************************ - * Name: sam_usbpullup - * - * Description: - * If USB is supported and the board supports a pullup via GPIO (for USB software - * connect and disconnect), then the board software must provide sam_pullup. - * See include/nuttx/usb/usbdev.h for additional description of this method. - * Alternatively, if no pull-up GPIO the following EXTERN can be redefined to be - * NULL. - * - ************************************************************************************/ - -int sam_usbpullup(FAR struct usbdev_s *dev, bool enable) -{ - return 0; -} - /************************************************************************************ * Name: sam_usbsuspend * @@ -106,4 +77,3 @@ void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume) { ulldbg("resume: %d\n", resume); } - diff --git a/configs/sam4e-ek/src/Makefile b/configs/sam4e-ek/src/Makefile index a3b12a7a69..da41230f54 100644 --- a/configs/sam4e-ek/src/Makefile +++ b/configs/sam4e-ek/src/Makefile @@ -40,7 +40,7 @@ CFLAGS += -I$(TOPDIR)/sched ASRCS = AOBJS = $(ASRCS:.S=$(OBJEXT)) -CSRCS = sam_boot.c sam_leds.c sam_buttons.c sam_usbdev.c +CSRCS = sam_boot.c sam_leds.c sam_buttons.c sam_udp.c ifeq ($(CONFIG_HAVE_CXXINITIALIZE),y) CSRCS += sam_cxxinitialize.c diff --git a/configs/sam4e-ek/src/sam4e-ek.h b/configs/sam4e-ek/src/sam4e-ek.h index cfbda16b4b..b798182e14 100644 --- a/configs/sam4e-ek/src/sam4e-ek.h +++ b/configs/sam4e-ek/src/sam4e-ek.h @@ -393,16 +393,6 @@ void weak_function sam_spiinitialize(void); -/************************************************************************************ - * Name: sam_usbinitialize - * - * Description: - * Called to setup USB-related GPIO pins for the SAM4E-EK board. - * - ************************************************************************************/ - -void weak_function sam_usbinitialize(void); - /************************************************************************************ * Name: sam_hsmci_initialize * diff --git a/configs/sam4e-ek/src/sam_boot.c b/configs/sam4e-ek/src/sam_boot.c index 05279200f5..ac7562f185 100644 --- a/configs/sam4e-ek/src/sam_boot.c +++ b/configs/sam4e-ek/src/sam_boot.c @@ -110,18 +110,6 @@ void sam_boardinitialize(void) } #endif - /* Initialize USB if 1) USBDEV is selected, 2) the USB controller is not - * disabled, and 3) the weak function sam_usbinitialize() has been brought - * into the build. - */ - -#if defined(CONFIG_USBDEV) && defined(CONFIG_SAM34_UDP) - if (sam_usbinitialize) - { - sam_usbinitialize(); - } -#endif - /* Configure on-board LEDs if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS diff --git a/configs/sam4e-ek/src/sam_usbdev.c b/configs/sam4e-ek/src/sam_udp.c similarity index 79% rename from configs/sam4e-ek/src/sam_usbdev.c rename to configs/sam4e-ek/src/sam_udp.c index 4fdd719021..0ed145ddd6 100644 --- a/configs/sam4e-ek/src/sam_usbdev.c +++ b/configs/sam4e-ek/src/sam_udp.c @@ -1,5 +1,5 @@ /************************************************************************************ - * configs/sam4e-ek/src/sam_usbdev.c + * configs/sam4e-ek/src/sam_udp.c * * Copyright (C) 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -62,35 +62,6 @@ * Public Functions ************************************************************************************/ -/************************************************************************************ - * Name: sam_usbinitialize - * - * Description: - * Called to setup USB-related GPIO pins for the SAM4E-EK board. - * - ************************************************************************************/ - -void sam_usbinitialize(void) -{ -} - -/************************************************************************************ - * Name: sam_usbpullup - * - * Description: - * If USB is supported and the board supports a pullup via GPIO (for USB software - * connect and disconnect), then the board software must provide sam_pullup. - * See include/nuttx/usb/usbdev.h for additional description of this method. - * Alternatively, if no pull-up GPIO the following EXTERN can be redefined to be - * NULL. - * - ************************************************************************************/ - -int sam_usbpullup(FAR struct usbdev_s *dev, bool enable) -{ - return 0; -} - /************************************************************************************ * Name: sam_udp_suspend *