FreeCalypso > hg > freecalypso-tools
comparison target-utils/pirexplore/main.c @ 0:e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 11 Jun 2016 00:13:35 +0000 |
parents | |
children | c90b1fff224a |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e7502631a0f9 |
---|---|
1 #include "types.h" | |
2 | |
3 main() | |
4 { | |
5 uart_select_init(); | |
6 printf("Pirelli hardware exploration utility running\n"); | |
7 print_boot_rom_info(); | |
8 /* | |
9 * Make the same register settings as in the init script used by | |
10 * fc-loadtool and fc-xram: ../../loadtools/scripts/pirelli.init | |
11 */ | |
12 *(volatile u16 *)0xfffffb00 = 0x00A4; | |
13 *(volatile u16 *)0xfffffb02 = 0x00A4; | |
14 *(volatile u16 *)0xfffffb06 = 0x00A4; | |
15 *(volatile u16 *)0xfffef006 = 0x0008; | |
16 /* | |
17 * Other register settings replicating what OsmocomBB does | |
18 * in board/pirelli_dpl10/init.c | |
19 */ | |
20 *(volatile u16 *)0xfffef008 = 0x7090; | |
21 *(volatile u16 *)0xfffef00a = 0x021F; | |
22 *(volatile u16 *)0xfffe4804 = 0xFF6D; | |
23 *(volatile u16 *)0xfffe4802 = 0x0000; | |
24 /* nCS4 setup for SPCA552E */ | |
25 *(volatile u16 *)0xfffffb0a = 0x00A7; | |
26 /* initialize PWL registers like OsmocomBB does */ | |
27 *(volatile u8 *)0xfffe8000 = 0x32; | |
28 *(volatile u8 *)0xfffe8001 = 0x01; | |
29 for (;;) { | |
30 putchar('='); | |
31 if (command_entry()) | |
32 command_dispatch(); | |
33 } | |
34 } |