-
-
Save luftreich/aa756f2b968359c3264f to your computer and use it in GitHub Desktop.
led_state_fix_for_uboot_m8_k200_v1.pach
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/board/amlogic/m8_k200_v1/m8_k200_v1.c b/board/amlogic/m8_k200_v1/m8_k200_v1.c | |
index b4f2a73..847b099 100755 | |
--- a/board/amlogic/m8_k200_v1/m8_k200_v1.c | |
+++ b/board/amlogic/m8_k200_v1/m8_k200_v1.c | |
@@ -561,6 +561,21 @@ void wifi_power_init() | |
} | |
#endif | |
+void set_power_led_state(int flag) | |
+{ | |
+ clrbits_le32(P_AO_GPIO_O_EN_N, (1 << 15)); | |
+ if (flag == 1) | |
+ { | |
+ // blue | |
+ setbits_le32(P_AO_GPIO_O_EN_N, (1 << 31)); | |
+ } | |
+ else | |
+ { | |
+ // red | |
+ clrbits_le32(P_AO_GPIO_O_EN_N, (1 << 31)); | |
+ } | |
+} | |
+ | |
int board_init(void) | |
{ | |
#ifdef CONFIG_UART_A_FUNCTION_ADD | |
@@ -588,8 +603,9 @@ int board_init(void) | |
#endif | |
// LED | |
- clrbits_le32(P_AO_GPIO_O_EN_N, (1 << 15)); | |
- clrbits_le32(P_AO_GPIO_O_EN_N, (1 << 31)); | |
+ // clrbits_le32(P_AO_GPIO_O_EN_N, (1 << 15)); | |
+ // clrbits_le32(P_AO_GPIO_O_EN_N, (1 << 31)); | |
+ set_power_led_state(1); // initialize blue led | |
#ifdef CONFIG_AML_I2C | |
board_i2c_init(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment