comparison target-utils/pirexplore/main.c @ 992:a7b0b426f9ca

target-utils: boot ROM UART autodetection revamped The new implementation should work with both the familiar Calypso C035 boot ROM version found in our regular targets as well as the older Calypso F741979B version found on the vintage D-Sample board.
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Wed, 30 Dec 2015 21:28:41 +0000
parents fcbe1332b197
children
comparison
equal deleted inserted replaced
991:5cff3579814c 992:a7b0b426f9ca
1 #include "types.h" 1 #include "types.h"
2 #include "romvars.h"
3
4 extern struct boot_rom_vars rom_vars;
5
6 extern char *uart_name;
7 2
8 main() 3 main()
9 { 4 {
10 uart_select_init(); 5 uart_select_init();
11 printf("Pirelli hardware exploration utility running\n"); 6 printf("Pirelli hardware exploration utility running\n");
12 printf("Loaded via UART %d (%s) at baud rate #%d\n", rom_vars.uart_id, 7 print_boot_rom_info();
13 uart_name, rom_vars.baud_rate_code);
14 printf("TCXO clock input autodetected to be %d MHz\n",
15 rom_vars.clktcxo_13mhz ? 13 : 26);
16 /* 8 /*
17 * Make the same register settings as in the init script used by 9 * Make the same register settings as in the init script used by
18 * fc-loadtool and fc-xram: ../../loadtools/scripts/pirelli.init 10 * fc-loadtool and fc-xram: ../../loadtools/scripts/pirelli.init
19 */ 11 */
20 *(volatile u16 *)0xfffffb00 = 0x00A4; 12 *(volatile u16 *)0xfffffb00 = 0x00A4;