diff --git a/arch/arm/src/common/up_etherstub.c b/arch/arm/src/common/up_etherstub.c index d5868d43495..66b7e41f53d 100644 --- a/arch/arm/src/common/up_etherstub.c +++ b/arch/arm/src/common/up_etherstub.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/common/up_etherstub.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -66,18 +66,18 @@ * * Description: * This is a stub version os up_netinitialize. Normally, up_netinitialize - * is defined in board/up_network.c for board-specific ethernet - * implementations, or chip/xyx_ethernet.c for chip-specific ethernet - * implementations. The stub version here is used in the cornercase where - * the network is enable yet there is no ethernet driver to be initialized. + * is defined in board/xyz_network.c for board-specific Ethernet + * implementations, or chip/xyx_ethernet.c for chip-specific Ethernet + * implementations. The stub version here is used in the corner case where + * the network is enable yet there is no Ethernet driver to be initialized. * In this case, up_initialize will still try to call up_netinitialize() - * when one does not exist. This cornercase would occur if, for example, + * when one does not exist. This corner case would occur if, for example, * only a USB network interface is being used or perhaps if a SLIP is * being used). * - * In the long run, it might be better to have some kind of CONFIG_NO_ETHERNET - * to suppress the call to up_netinitialize() in up_initialize(). Then - * this stub would not be needed. + * Use of this stub is deprecated. The preferred mechanism is to use + * CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in + * up_initialize(). Then this stub would not be needed. * ****************************************************************************/ diff --git a/arch/arm/src/common/up_initialize.c b/arch/arm/src/common/up_initialize.c index 19b948e5c00..cad12d23077 100644 --- a/arch/arm/src/common/up_initialize.c +++ b/arch/arm/src/common/up_initialize.c @@ -248,9 +248,11 @@ void up_initialize(void) ramlog_sysloginit(); #endif +#ifndef CONFIG_NETDEV_LATEINIT /* Initialize the network */ up_netinitialize(); +#endif /* Initialize USB -- device and/or host */ diff --git a/arch/arm/src/common/up_internal.h b/arch/arm/src/common/up_internal.h index 9fbfe5bd8f6..2f20524b5d5 100644 --- a/arch/arm/src/common/up_internal.h +++ b/arch/arm/src/common/up_internal.h @@ -478,10 +478,14 @@ void up_wdtinit(void); /* Networking ***************************************************************/ -/* Defined in board/up_network.c for board-specific Ethernet implementations, +/* Defined in board/xyz_network.c for board-specific Ethernet implementations, * or chip/xyx_ethernet.c for chip-specific Ethernet implementations, or - * common/up_etherstub.c for a cornercase where the network is enabled yet + * common/up_etherstub.c for a corner case where the network is enabled yet * there is no Ethernet driver to be initialized. + * + * Use of common/up_etherstub.c is deprecated. The preferred mechanism is to + * use CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in + * up_initialize(). Then this stub would not be needed. */ #ifdef CONFIG_NET diff --git a/arch/arm/src/kinetis/Make.defs b/arch/arm/src/kinetis/Make.defs index b52c116e81c..d4bce7b4a78 100644 --- a/arch/arm/src/kinetis/Make.defs +++ b/arch/arm/src/kinetis/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/kinetis/Make.defs # -# Copyright (C) 2011, 2013-2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2011, 2013-2015 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -67,6 +67,10 @@ CMN_UASRCS += up_signal_handler.S endif endif +# Use of common/up_etherstub.c is deprecated. The preferred mechanism is to +# use CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in +# up_initialize(). Then this stub would not be needed. + ifeq ($(CONFIG_NET),y) ifneq ($(CONFIG_KINETIS_ENET),y) CMN_CSRCS += up_etherstub.c diff --git a/arch/arm/src/lpc17xx/Make.defs b/arch/arm/src/lpc17xx/Make.defs index 0b16e7225cb..3157b846bac 100644 --- a/arch/arm/src/lpc17xx/Make.defs +++ b/arch/arm/src/lpc17xx/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/lpc17xx/Make.defs # -# Copyright (C) 2010-2011, 2013-2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2010-2011, 2013-2015 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -82,6 +82,10 @@ CMN_UASRCS += up_signal_handler.S endif endif +# Use of common/up_etherstub.c is deprecated. The preferred mechanism is to +# use CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in +# up_initialize(). Then this stub would not be needed. + ifeq ($(CONFIG_NET),y) ifneq ($(CONFIG_LPC17_ETHERNET),y) CMN_CSRCS += up_etherstub.c diff --git a/arch/avr/src/common/up_initialize.c b/arch/avr/src/common/up_initialize.c index be27240420f..5fb247847c1 100644 --- a/arch/avr/src/common/up_initialize.c +++ b/arch/avr/src/common/up_initialize.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/avr/src/common/up_initialize.c * - * Copyright (C) 2010, 2012-2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2010, 2012-2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -262,9 +262,11 @@ void up_initialize(void) ramlog_sysloginit(); #endif +#ifndef CONFIG_NETDEV_LATEINIT /* Initialize the network */ up_netinitialize(); +#endif /* Initialize USB */ diff --git a/arch/hc/src/common/up_initialize.c b/arch/hc/src/common/up_initialize.c index 67ab733ea30..f22be91528a 100644 --- a/arch/hc/src/common/up_initialize.c +++ b/arch/hc/src/common/up_initialize.c @@ -186,9 +186,11 @@ void up_initialize(void) ramlog_sysloginit(); #endif +#ifndef CONFIG_NETDEV_LATEINIT /* Initialize the network */ up_netinitialize(); +#endif /* Initialize USB */ diff --git a/arch/mips/src/common/up_etherstub.c b/arch/mips/src/common/up_etherstub.c index 3ef989bb90a..7a42d703e70 100644 --- a/arch/mips/src/common/up_etherstub.c +++ b/arch/mips/src/common/up_etherstub.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/mips/src/common/up_etherstub.c * - * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -66,18 +66,18 @@ * * Description: * This is a stub version os up_netinitialize. Normally, up_netinitialize - * is defined in board/up_network.c for board-specific ethernet - * implementations, or chip/xyx_ethernet.c for chip-specific ethernet - * implementations. The stub version here is used in the cornercase where - * the network is enable yet there is no ethernet driver to be initialized. + * is defined in board/xyz_network.c for board-specific Ethernet + * implementations, or chip/xyx_ethernet.c for chip-specific Ethernet + * implementations. The stub version here is used in the corner case where + * the network is enable yet there is no Ethernet driver to be initialized. * In this case, up_initialize will still try to call up_netinitialize() - * when one does not exist. This cornercase would occur if, for example, + * when one does not exist. This corner case would occur if, for example, * only a USB network interface is being used or perhaps if a SLIP is - * being used). In those cases, the initialization path is very different. + * being used). * - * In the long run, it might be better to have some kind of CONFIG_NO_ETHERNET - * to suppress the call to up_netinitialize() in up_initialize(). Then - * this stub would not be needed. + * Use of this stub is deprecated. The preferred mechanism is to use + * CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in + * up_initialize(). Then this stub would not be needed. * ****************************************************************************/ diff --git a/arch/mips/src/common/up_initialize.c b/arch/mips/src/common/up_initialize.c index 0d40fbad2f3..cfe893e7959 100644 --- a/arch/mips/src/common/up_initialize.c +++ b/arch/mips/src/common/up_initialize.c @@ -188,9 +188,11 @@ void up_initialize(void) ramlog_sysloginit(); #endif +#ifndef CONFIG_NETDEV_LATEINIT /* Initialize the network */ up_netinitialize(); +#endif /* Initialize USB -- device and/or host */ diff --git a/arch/mips/src/pic32mx/Make.defs b/arch/mips/src/pic32mx/Make.defs index 793e9ce065b..02025839017 100644 --- a/arch/mips/src/pic32mx/Make.defs +++ b/arch/mips/src/pic32mx/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/mips/src/pic32mx/Make.defs # -# Copyright (C) 2011-2012, 2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2011-2012, 2014-2015 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -51,6 +51,10 @@ CMN_CSRCS += up_usestack.c up_vfork.c # Configuration dependent common files +# Use of common/up_etherstub.c is deprecated. The preferred mechanism is to +# use CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in +# up_initialize(). Then this stub would not be needed. + ifneq ($(CONFIG_PIC32MX_ETHERNET),y) ifeq ($(CONFIG_NET),y) CMN_CSRCS += up_etherstub.c diff --git a/arch/mips/src/pic32mz/Make.defs b/arch/mips/src/pic32mz/Make.defs index acb7f0323e9..b9342179eb4 100644 --- a/arch/mips/src/pic32mz/Make.defs +++ b/arch/mips/src/pic32mz/Make.defs @@ -51,6 +51,10 @@ CMN_CSRCS += up_usestack.c up_vfork.c # Configuration dependent common files +# Use of common/up_etherstub.c is deprecated. The preferred mechanism is to +# use CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in +# up_initialize(). Then this stub would not be needed. + ifneq ($(CONFIG_PIC32MZ_ETHERNET),y) ifeq ($(CONFIG_NET),y) CMN_CSRCS += up_etherstub.c diff --git a/arch/sh/src/common/up_initialize.c b/arch/sh/src/common/up_initialize.c index fc99a1f28ca..e7f0fbd5957 100644 --- a/arch/sh/src/common/up_initialize.c +++ b/arch/sh/src/common/up_initialize.c @@ -176,9 +176,11 @@ void up_initialize(void) ramlog_sysloginit(); #endif - /* Initialize the netwok */ +#ifndef CONFIG_NETDEV_LATEINIT + /* Initialize the network */ up_netinitialize(); +#endif /* Initialize USB */ diff --git a/arch/x86/src/common/up_initialize.c b/arch/x86/src/common/up_initialize.c index 118380887d4..9356dd8cd1d 100644 --- a/arch/x86/src/common/up_initialize.c +++ b/arch/x86/src/common/up_initialize.c @@ -188,9 +188,11 @@ void up_initialize(void) ramlog_sysloginit(); #endif +#ifndef CONFIG_NETDEV_LATEINIT /* Initialize the network */ up_netinitialize(); +#endif /* Initialize USB -- device and/or host */ diff --git a/arch/z16/src/common/up_initialize.c b/arch/z16/src/common/up_initialize.c index 95a5acccbf5..e906731d954 100644 --- a/arch/z16/src/common/up_initialize.c +++ b/arch/z16/src/common/up_initialize.c @@ -192,8 +192,11 @@ void up_initialize(void) ramlog_sysloginit(); #endif +#ifndef CONFIG_NETDEV_LATEINIT /* Initialize the network */ up_netinitialize(); +#endif + board_led_on(LED_IRQSENABLED); } diff --git a/arch/z80/src/common/up_initialize.c b/arch/z80/src/common/up_initialize.c index ef0840a6f8d..a71a256626e 100644 --- a/arch/z80/src/common/up_initialize.c +++ b/arch/z80/src/common/up_initialize.c @@ -175,8 +175,11 @@ void up_initialize(void) ramlog_consoleinit(); #endif - /* Initialize the netwok */ +#ifndef CONFIG_NETDEV_LATEINIT + /* Initialize the network */ up_netinitialize(); +#endif + board_led_on(LED_IRQSENABLED); }