diff --git a/board/nm/nmhw21/board.c b/board/nm/nmhw21/board.c index 42adfe17f3..c74256f945 100644 --- a/board/nm/nmhw21/board.c +++ b/board/nm/nmhw21/board.c @@ -235,12 +235,12 @@ static void set_indicator_led(int red, int green) #ifndef CONFIG_NRSW_BUILD -static void ui_set_status_led(int red, int green) +static void ui_set_status_led(int red, int green) { ui_set_top_led(red, green); } -static void ui_set_indicator_led(int red, int green) +static void ui_set_indicator_led(int red, int green) { ui_set_bottom_led(red, green); } @@ -490,7 +490,7 @@ static void print_start_reason(uint32_t events) } else { static char buffer[10+11+11+6+6+1]; - + buffer[0] = 0; if (events & SE_POR) strncat(buffer, "PowerOn, ", sizeof(buffer)); @@ -504,7 +504,7 @@ static void print_start_reason(uint32_t events) strncat(buffer, "Tick, ", sizeof(buffer)); /* Trim last comma, no 0 len check required, at least one entry is present */ - buffer[strlen(buffer)-2] = 0; + buffer[strlen(buffer)-2] = 0; printf("%s\n", buffer); } } @@ -521,7 +521,7 @@ static void check_pmic_reset_reason(unsigned int reset_reason_shm_location) /* * Check/write boot marker to GP_ID_0 - * If this marker is not present, we have a power on reset + * If this marker is not present, we have a power on reset */ ret = da9063_get_reg(PMIC_GP_ID_0, &state); if ((ret == 0) && (state != 0xC5)) { @@ -541,7 +541,7 @@ static void check_pmic_reset_reason(unsigned int reset_reason_shm_location) start_event |= SE_WATCHDOG; reset_regs->rr_value = RR_EXTERNAL_WATCHDOG_PATTERN; - reset_regs->rr_value_crc = ether_crc(sizeof(reset_regs->rr_value), + reset_regs->rr_value_crc = ether_crc(sizeof(reset_regs->rr_value), (const uint8_t*)&(reset_regs->rr_value)); } @@ -596,7 +596,7 @@ static void check_pmic_reset_reason(unsigned int reset_reason_shm_location) reset_regs->se_magic = SE_MAGIC; reset_regs->se_events = start_event; reset_regs->se_checksum = 0; - reset_regs->se_checksum = ether_crc(sizeof(reset_regs->se_events), + reset_regs->se_checksum = ether_crc(sizeof(reset_regs->se_events), (const uint8_t*)&(reset_regs->se_events)); da9063_release_i2c_bus(bus); @@ -636,7 +636,7 @@ static void pmic_ignition_gate_on(void) da9063_release_i2c_bus(bus); } -static void powerdown(void) +static void powerdown(void) { int bus; @@ -679,12 +679,12 @@ static void stop_if_ignition_is_off(void) } else { puts("Ignition : Off\n"); - /* + /* * Ignition is off, if this is a power-on start, power down * as this is considered an unwanted system start. */ - /* + /* * There is a chance for a race condition, when ignition is enabled * between the check above and here. In this case we should just reset * not power down. @@ -743,8 +743,8 @@ void am33xx_spl_board_init(void) /* Switch on ignition gate so we can read state later */ pmic_ignition_gate_on(); - /* - * If this is a power-on start, see if ignition is active. + /* + * If this is a power-on start, see if ignition is active. * If not, power down as this is considered an unwanted system start. */ if (sys_start_event & SE_POR) { @@ -1096,14 +1096,14 @@ static void init_timepulse(void) { /* * Configure timepulse as input. - * + * * Note: * Was output on HW21, function SIM_PRES_N, never worked. * Therefore reused as timepulse input on hw26. */ /* - * Action: None, just leave pin at reset default = input + * Action: None, just leave pin at reset default = input */ } @@ -1137,7 +1137,7 @@ int board_init(void) init_leds(); set_status_led(1, 1); /* Orange */ set_indicator_led(0, 0); /* Off */ - + #ifndef CONFIG_NRSW_BUILD ui_set_status_led(1, 1); /* Orange */ ui_set_indicator_led(0, 0); /* Off */ @@ -1357,7 +1357,7 @@ static void blink_led(int pulses) #define RESET_CHECK_PERIOD (100) /* 100 ms */ typedef enum _action_t -{ +{ NONE = 0, WAIT, FACTORY_RESET, @@ -1404,8 +1404,8 @@ static int check_button(int time, bool button) { /* * Hardware button logic - * - * input: + * + * input: * button: current button press state (true = pressed) * logic: * - if button is not pressed initially, return action NONE for all @@ -1414,7 +1414,7 @@ static int check_button(int time, bool button) * of press (state PRESSED). * - while button is pressed, measure time, indicate actions with LED, * - when button is released, check time and decide on factory reset - * or recovery boot. + * or recovery boot. */ typedef enum _state_t { INIT = 0, PRESSED, DONE } state_t; @@ -1473,7 +1473,7 @@ static int check_button(int time, bool button) } break; - case DONE: + case DONE: /* Final state when an action has been chosen */ break; @@ -1488,11 +1488,11 @@ static int check_break_length(int time, bool rx_line) { /* * RS232 RxD Reset input logic - * + * * Treats RxD line as reset input. Line is considered active when * break condition applies (RS232 line > 3.0 V) - * - * input: + * + * input: * rx_line: true if rxd input is '0' (break condition) * logic: * see explanation in check_button() @@ -1588,10 +1588,10 @@ static int check_break_command(int time, int has_input, int c) { /* * Break command logic - * + * * Tries to receive the break button (system magic key) and a command to execute. - * - * input: + * + * input: * has_input: true if a character is available * c: character code (can be 0x00 for break condition, system magic key) * logic: @@ -1627,7 +1627,7 @@ static int check_break_command(int time, int has_input, int c) state = WAIT_COMMAND; } } - + if (wait_time > 0) { wait_time -= RESET_CHECK_PERIOD; } @@ -1688,7 +1688,7 @@ static void check_reset_button(void) /* * Runs state machines of all reset sources to find out if one detects * an action. - * + * * SMs return * - WAIT if they are still trying to get a result. * - NONE if they know there is no action required. @@ -1763,7 +1763,7 @@ static void check_reset_button(void) setenv("bootcmd", "run recovery"); break; - + default: set_indicator_led(0, 0); break;