From 6b77f73583d113330843a5f9d32a1002ea9f9e8f Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Tue, 18 Feb 2020 01:08:08 +0800 Subject: [PATCH] arch: Move iob_initialize into nx_start just after heap initialization it doesn't make sense that iob initialization is in up_initialize but other memory components initialization is called in nx_start Change-Id: Id43aeaa995f340c5943f59a0067a483ff3ac34a2 Signed-off-by: Xiang Xiao --- arch/arm/src/common/up_initialize.c | 7 ------- arch/avr/src/common/up_initialize.c | 7 ------- arch/hc/src/common/up_initialize.c | 7 ------- arch/mips/src/common/up_initialize.c | 7 ------- arch/misoc/src/lm32/lm32_initialize.c | 7 ------- arch/misoc/src/minerva/minerva_initialize.c | 7 ------- arch/or1k/src/common/up_initialize.c | 7 ------- arch/renesas/src/common/up_initialize.c | 7 ------- arch/risc-v/src/common/up_initialize.c | 7 ------- arch/sim/src/sim/up_initialize.c | 7 ------- arch/x86/src/common/up_initialize.c | 7 ------- arch/xtensa/src/common/xtensa_initialize.c | 7 ------- arch/z16/src/common/up_initialize.c | 7 ------- arch/z80/src/common/up_initialize.c | 7 ------- sched/init/nx_start.c | 7 +++++++ 15 files changed, 7 insertions(+), 98 deletions(-) diff --git a/arch/arm/src/common/up_initialize.c b/arch/arm/src/common/up_initialize.c index 7d307be596..5056480c68 100644 --- a/arch/arm/src/common/up_initialize.c +++ b/arch/arm/src/common/up_initialize.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -150,12 +149,6 @@ void up_initialize(void) } #endif -#ifdef CONFIG_MM_IOB - /* Initialize IO buffering */ - - iob_initialize(); -#endif - /* Register devices */ #if defined(CONFIG_DEV_NULL) diff --git a/arch/avr/src/common/up_initialize.c b/arch/avr/src/common/up_initialize.c index 412d5f7c48..04a59584a0 100644 --- a/arch/avr/src/common/up_initialize.c +++ b/arch/avr/src/common/up_initialize.c @@ -43,7 +43,6 @@ #include #include -#include #include #include #include @@ -191,12 +190,6 @@ void up_initialize(void) } #endif -#ifdef CONFIG_MM_IOB - /* Initialize IO buffering */ - - iob_initialize(); -#endif - /* Register devices */ #if defined(CONFIG_DEV_NULL) diff --git a/arch/hc/src/common/up_initialize.c b/arch/hc/src/common/up_initialize.c index 06ed076674..e2f7f923e5 100644 --- a/arch/hc/src/common/up_initialize.c +++ b/arch/hc/src/common/up_initialize.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -113,12 +112,6 @@ void up_initialize(void) } #endif -#ifdef CONFIG_MM_IOB - /* Initialize IO buffering */ - - iob_initialize(); -#endif - /* Register devices */ #if defined(CONFIG_DEV_NULL) diff --git a/arch/mips/src/common/up_initialize.c b/arch/mips/src/common/up_initialize.c index 25c4a17d2e..dc98820fb5 100644 --- a/arch/mips/src/common/up_initialize.c +++ b/arch/mips/src/common/up_initialize.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -115,12 +114,6 @@ void up_initialize(void) } #endif -#ifdef CONFIG_MM_IOB - /* Initialize IO buffering */ - - iob_initialize(); -#endif - /* Register devices */ #if defined(CONFIG_DEV_NULL) diff --git a/arch/misoc/src/lm32/lm32_initialize.c b/arch/misoc/src/lm32/lm32_initialize.c index 9e00ebf9ae..aea7dbae40 100644 --- a/arch/misoc/src/lm32/lm32_initialize.c +++ b/arch/misoc/src/lm32/lm32_initialize.c @@ -44,7 +44,6 @@ #include #include -#include #include #include #include @@ -75,12 +74,6 @@ void up_initialize(void) rpmsg_serialinit(); #endif -#ifdef CONFIG_MM_IOB - /* Initialize IO buffering */ - - iob_initialize(); -#endif - #if 0 /* REVISIT */ /* Initialize the network cores */ diff --git a/arch/misoc/src/minerva/minerva_initialize.c b/arch/misoc/src/minerva/minerva_initialize.c index 1bf78499fe..14d2d89870 100644 --- a/arch/misoc/src/minerva/minerva_initialize.c +++ b/arch/misoc/src/minerva/minerva_initialize.c @@ -44,7 +44,6 @@ #include #include -#include #include #include #include @@ -75,12 +74,6 @@ void up_initialize(void) rpmsg_serialinit(); #endif -#ifdef CONFIG_MM_IOB - /* Initialize IO buffering */ - - iob_initialize(); -#endif - /* Initialize the network cores */ #ifdef CONFIG_MISOC_ETHERNET diff --git a/arch/or1k/src/common/up_initialize.c b/arch/or1k/src/common/up_initialize.c index 00143028fe..def37ab19a 100644 --- a/arch/or1k/src/common/up_initialize.c +++ b/arch/or1k/src/common/up_initialize.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -208,12 +207,6 @@ void up_initialize(void) } #endif -#ifdef CONFIG_MM_IOB - /* Initialize IO buffering */ - - iob_initialize(); -#endif - /* Register devices */ #if defined(CONFIG_DEV_NULL) diff --git a/arch/renesas/src/common/up_initialize.c b/arch/renesas/src/common/up_initialize.c index 803daa71ea..ad0ae69d47 100644 --- a/arch/renesas/src/common/up_initialize.c +++ b/arch/renesas/src/common/up_initialize.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -96,12 +95,6 @@ void up_initialize(void) up_pminitialize(); #endif -#ifdef CONFIG_MM_IOB - /* Initialize IO buffering */ - - iob_initialize(); -#endif - /* Register devices */ #if defined(CONFIG_DEV_NULL) diff --git a/arch/risc-v/src/common/up_initialize.c b/arch/risc-v/src/common/up_initialize.c index 5c25e5b85d..3dc6bd0cb9 100644 --- a/arch/risc-v/src/common/up_initialize.c +++ b/arch/risc-v/src/common/up_initialize.c @@ -43,7 +43,6 @@ #include #include -#include #include #include #include @@ -114,12 +113,6 @@ void up_initialize(void) up_addregion(); -#ifdef CONFIG_MM_IOB - /* Initialize IO buffering */ - - iob_initialize(); -#endif - /* Register devices */ #if defined(CONFIG_DEV_NULL) diff --git a/arch/sim/src/sim/up_initialize.c b/arch/sim/src/sim/up_initialize.c index bbd1122d83..0f52405b29 100644 --- a/arch/sim/src/sim/up_initialize.c +++ b/arch/sim/src/sim/up_initialize.c @@ -43,7 +43,6 @@ #include #include -#include #include #include #include @@ -192,12 +191,6 @@ void up_initialize(void) pm_initialize(); #endif -#ifdef CONFIG_MM_IOB - /* Initialize IO buffering */ - - iob_initialize(); -#endif - /* Register devices */ #if defined(CONFIG_DEV_NULL) diff --git a/arch/x86/src/common/up_initialize.c b/arch/x86/src/common/up_initialize.c index 81fcd7f770..25733734b4 100644 --- a/arch/x86/src/common/up_initialize.c +++ b/arch/x86/src/common/up_initialize.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -115,12 +114,6 @@ void up_initialize(void) } #endif -#ifdef CONFIG_MM_IOB - /* Initialize IO buffering */ - - iob_initialize(); -#endif - /* Register devices */ #if defined(CONFIG_DEV_NULL) diff --git a/arch/xtensa/src/common/xtensa_initialize.c b/arch/xtensa/src/common/xtensa_initialize.c index 8f4183eaec..f276284ff9 100644 --- a/arch/xtensa/src/common/xtensa_initialize.c +++ b/arch/xtensa/src/common/xtensa_initialize.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -123,12 +122,6 @@ void up_initialize(void) } #endif -#ifdef CONFIG_MM_IOB - /* Initialize IO buffering */ - - iob_initialize(); -#endif - /* Register devices */ #if defined(CONFIG_DEV_NULL) diff --git a/arch/z16/src/common/up_initialize.c b/arch/z16/src/common/up_initialize.c index 605693bbfb..dca43d6072 100644 --- a/arch/z16/src/common/up_initialize.c +++ b/arch/z16/src/common/up_initialize.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -115,12 +114,6 @@ void up_initialize(void) up_pminitialize(); #endif -#ifdef CONFIG_MM_IOB - /* Initialize IO buffering */ - - iob_initialize(); -#endif - /* Register devices */ #if defined(CONFIG_DEV_NULL) diff --git a/arch/z80/src/common/up_initialize.c b/arch/z80/src/common/up_initialize.c index 80637d7d0b..dbde2603f5 100644 --- a/arch/z80/src/common/up_initialize.c +++ b/arch/z80/src/common/up_initialize.c @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -114,12 +113,6 @@ void up_initialize(void) z80_mmu_initialize(); #endif -#ifdef CONFIG_MM_IOB - /* Initialize IO buffering */ - - iob_initialize(); -#endif - /* Register devices */ #if defined(CONFIG_DEV_NULL) diff --git a/sched/init/nx_start.c b/sched/init/nx_start.c index 0117fb3e7c..8992cd5d36 100644 --- a/sched/init/nx_start.c +++ b/sched/init/nx_start.c @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -610,6 +611,12 @@ void nx_start(void) } #endif +#ifdef CONFIG_MM_IOB + /* Initialize IO buffering */ + + iob_initialize(); +#endif + /* The memory manager is available */ g_nx_initstate = OSINIT_MEMORY;