FreeCalypso > hg > freecalypso-sw
annotate target-utils/pirexplore/main.c @ 1034:405b5469abc4 default tip
top README: repository change notice
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 12 Jun 2016 19:06:34 +0000 |
parents | a7b0b426f9ca |
children |
rev | line source |
---|---|
67
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 #include "types.h" |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 main() |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 { |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 uart_select_init(); |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 printf("Pirelli hardware exploration utility running\n"); |
992
a7b0b426f9ca
target-utils: boot ROM UART autodetection revamped
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
77
diff
changeset
|
7 print_boot_rom_info(); |
68
a323b4cc69e6
pirexplore: XRAM/flash access init like in the pirelli.init script
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
67
diff
changeset
|
8 /* |
a323b4cc69e6
pirexplore: XRAM/flash access init like in the pirelli.init script
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
67
diff
changeset
|
9 * Make the same register settings as in the init script used by |
a323b4cc69e6
pirexplore: XRAM/flash access init like in the pirelli.init script
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
67
diff
changeset
|
10 * fc-loadtool and fc-xram: ../../loadtools/scripts/pirelli.init |
a323b4cc69e6
pirexplore: XRAM/flash access init like in the pirelli.init script
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
67
diff
changeset
|
11 */ |
a323b4cc69e6
pirexplore: XRAM/flash access init like in the pirelli.init script
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
67
diff
changeset
|
12 *(volatile u16 *)0xfffffb00 = 0x00A4; |
a323b4cc69e6
pirexplore: XRAM/flash access init like in the pirelli.init script
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
67
diff
changeset
|
13 *(volatile u16 *)0xfffffb02 = 0x00A4; |
a323b4cc69e6
pirexplore: XRAM/flash access init like in the pirelli.init script
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
67
diff
changeset
|
14 *(volatile u16 *)0xfffffb06 = 0x00A4; |
a323b4cc69e6
pirexplore: XRAM/flash access init like in the pirelli.init script
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
67
diff
changeset
|
15 *(volatile u16 *)0xfffef006 = 0x0008; |
74
8138a6380ae3
pirexplore: attempt to play with SPCA552E
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
68
diff
changeset
|
16 /* |
8138a6380ae3
pirexplore: attempt to play with SPCA552E
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
68
diff
changeset
|
17 * Other register settings replicating what OsmocomBB does |
8138a6380ae3
pirexplore: attempt to play with SPCA552E
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
68
diff
changeset
|
18 * in board/pirelli_dpl10/init.c |
8138a6380ae3
pirexplore: attempt to play with SPCA552E
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
68
diff
changeset
|
19 */ |
77
fcbe1332b197
pirexplore: LCD init and BL control work now
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
76
diff
changeset
|
20 *(volatile u16 *)0xfffef008 = 0x7090; |
74
8138a6380ae3
pirexplore: attempt to play with SPCA552E
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
68
diff
changeset
|
21 *(volatile u16 *)0xfffef00a = 0x021F; |
8138a6380ae3
pirexplore: attempt to play with SPCA552E
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
68
diff
changeset
|
22 *(volatile u16 *)0xfffe4804 = 0xFF6D; |
8138a6380ae3
pirexplore: attempt to play with SPCA552E
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
68
diff
changeset
|
23 *(volatile u16 *)0xfffe4802 = 0x0000; |
8138a6380ae3
pirexplore: attempt to play with SPCA552E
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
68
diff
changeset
|
24 /* nCS4 setup for SPCA552E */ |
8138a6380ae3
pirexplore: attempt to play with SPCA552E
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
68
diff
changeset
|
25 *(volatile u16 *)0xfffffb0a = 0x00A7; |
77
fcbe1332b197
pirexplore: LCD init and BL control work now
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
76
diff
changeset
|
26 /* initialize PWL registers like OsmocomBB does */ |
fcbe1332b197
pirexplore: LCD init and BL control work now
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
76
diff
changeset
|
27 *(volatile u8 *)0xfffe8000 = 0x32; |
fcbe1332b197
pirexplore: LCD init and BL control work now
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
76
diff
changeset
|
28 *(volatile u8 *)0xfffe8001 = 0x01; |
67
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 for (;;) { |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 putchar('='); |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 if (command_entry()) |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 command_dispatch(); |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 } |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 } |