int bts_model_handle_options(int argc, char **argv) { int num_errors = 0; while (1) { int option_idx = 0, c; static const struct option long_options[] = { /* specific to this hardware */ { "hw-version", 0, 0, 'w' }, { "pcu-direct", 0, 0, 'M' }, { 0, 0, 0, 0 } }; c = getopt_long(argc, argv, "wM", long_options, &option_idx); if (c == -1) break; switch (c) { case 'M': pcu_direct = 1; break; case 'w': print_hwversion(); exit(0); break; default: num_errors++; break; } } return num_errors; }
/* * Routine: misc_init_r * Description: Configure board specific parts */ int misc_init_r(void) { struct tricorder_eeprom eeprom; get_eeprom(&eeprom); print_hwversion(&eeprom); twl4030_power_init(); status_led_set(0, CONFIG_LED_STATUS_ON); status_led_set(1, CONFIG_LED_STATUS_ON); status_led_set(2, CONFIG_LED_STATUS_ON); omap_die_id_display(); return 0; }