annotate target-utils/libcommon/uartsel.c @ 884:353daaa6014d

gsm-fw/gpf/conf/gsmcomp.c: increased max partition in the voice-only config The code we got from TCS211 had the maximum prim pool partition size set to 900 bytes in the voice-only config (no FAX_AND_DATA, no GPRS) and to 1600 bytes in every other config. As it turns out, this "minimized" config breaks when the AT command interface is used with %CPI enabled, as the responsible code in ATI does an ACI_MALLOC of 1012 bytes. TI may have considered this case to be unsupported usage (perhaps they didn't care about the combination of a voice-only PS with AT command control), but we do want this use case to work without crashing. Solution: I made the largest prim pool the same as it is with FAX_AND_DATA: 3 partitions of 1600 bytes.
author Space Falcon <falcon@ivan.Harhan.ORG>
date Sat, 27 Jun 2015 07:31:30 +0000
parents 40f607bb0a2c
children a7b0b426f9ca
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 * uart_select_init() figures out which UART was used to load us
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 * through the boot ROM, and sets things up for us to use the same
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 * UART for our communication.
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 */
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 #include "types.h"
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 #include "romvars.h"
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 #include "ns16550.h"
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 #include "halt.h"
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 extern struct boot_rom_vars rom_vars;
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 struct ns16550_regs *uart_base;
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 char *uart_name;
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 uart_select_init()
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 {
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 switch (rom_vars.uart_id) {
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 case 0:
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 uart_base = (struct ns16550_regs *) 0xFFFF5800;
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 uart_name = "MODEM";
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 break;
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24 case 1:
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 uart_base = (struct ns16550_regs *) 0xFFFF5000;
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26 uart_name = "IrDA";
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27 break;
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28 default:
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29 _exit(HALTCODE_INVALIDUART);
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30 }
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31 }