From 0a3ee87b1d38443aff8f255dfff927b8bcde2cfb Mon Sep 17 00:00:00 2001 From: Heesub Shin Date: Sun, 9 Apr 2017 19:07:11 +0900 Subject: [PATCH] arm: s5j: remove up_gpioinitialize() up_gpioinitialize() was invented while we were working on the BSP for BCM4390x. Its purpose was for initializing GPIO ports and registering device nodes for them during the boot sequence, but it was a bad idea. Available GPIO ports may varies from device to device. This means that exporting which GPIO ports should be decided at board initialization, not OS or chip initialization. Having up_gpioinitialize() at the chip-specific layer is breaking the OS design. This is why up_gpioinitialize() had been left abandoned for a long time and finally become an empty function. It is time to remove it completely. This commit does not make any functional differences. Change-Id: I0217b377050613502933f4b6ba7b8024ff9937f1 Signed-off-by: Heesub Shin --- os/arch/arm/src/common/up_initialize.c | 5 ----- os/arch/arm/src/common/up_internal.h | 7 ------- os/arch/arm/src/s5j/s5j_gpio.c | 20 -------------------- 3 files changed, 32 deletions(-) diff --git a/os/arch/arm/src/common/up_initialize.c b/os/arch/arm/src/common/up_initialize.c index 2ad6070..0832644 100644 --- a/os/arch/arm/src/common/up_initialize.c +++ b/os/arch/arm/src/common/up_initialize.c @@ -268,9 +268,4 @@ void up_initialize(void) up_l2ccinitialize(); board_led_on(LED_IRQSENABLED); - -#ifdef CONFIG_GPIO - /* Initialize GPIO */ - up_gpioinitialize(); -#endif } diff --git a/os/arch/arm/src/common/up_internal.h b/os/arch/arm/src/common/up_internal.h index ac43478..812aad8 100644 --- a/os/arch/arm/src/common/up_internal.h +++ b/os/arch/arm/src/common/up_internal.h @@ -553,13 +553,6 @@ void up_usbuninitialize(void); void up_rnginitialize(void); #endif -/* GPIO ********************************************************************/ -#ifdef CONFIG_GPIO -void up_gpioinitialize(void); -#else -#define up_gpioinitialize() -#endif - /* Debug ********************************************************************/ #ifdef CONFIG_STACK_COLORATION void up_stack_color(FAR void *stackbase, size_t nbytes); diff --git a/os/arch/arm/src/s5j/s5j_gpio.c b/os/arch/arm/src/s5j/s5j_gpio.c index 1f17be1..7512034 100644 --- a/os/arch/arm/src/s5j/s5j_gpio.c +++ b/os/arch/arm/src/s5j/s5j_gpio.c @@ -1753,26 +1753,6 @@ int up_create_gpio(int32_t idx) #endif } - -/**************************************************************************** - * Name: up_gpioinitialize - * - * Description: - * Dummy function. Real function s5j_gpioinitialize, where GPIOs are exposed, - * called from board_init(). - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ****************************************************************************/ -void up_gpioinitialize(void) -{ - -} - /**************************************************************************** * Name: up_destroy_gpio * -- 2.7.4