summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/calypso
Commit message (Collapse)AuthorAgeFilesLines
* fw/calypso/dsp: Fix wrong hardcoded boot code constantSylvain Munaut2011-08-031-1/+1
| | | | | | | | No functional impact tough. Thanks to Job <baseband@hackwerk.org> on the ML for pointing this out Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* calypso/uart.c: Fix array bounds checkingHarald Welte2011-07-161-1/+1
| | | | | Found by Smatch: calypso/uart.c +433 uart_baudrate(7) error: buffer overflow 'divider' 7 <= 7
* calypso/irq: Fix array bounds checkingHarald Welte2011-07-161-1/+1
| | | | | Found by Smatch: calypso/irq.c +200 irq_register_handler(5) error: buffer overflow 'irq_handlers' 32 <= 32
* uart.h: move header out of calypso-directoryWolfram Sang2011-05-051-1/+1
| | | | | | | Everything defined is a pretty generic interface and can be used by mediatek, too. Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
* lib: move delay.c from calypso to libWolfram Sang2011-05-052-17/+1Star
| | | | | | Nothing calypso-related in there and needed for Mediatek, too. Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
* src: use new libosmogsm and include/osmocom/[gsm|core] path to headersPablo Neira Ayuso2011-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes include paths to get osmocom-bb working with the current libosmocore tree. Among all these renames, you can notice several tweaks that I added on purpose, and that require some explanation, they are: * hexdump() in osmocon.c and osmoload.c has been renamed to avoid clashing with hexdump() defined in libosmocore. * gsmmap now depends on libosmogsm. Actually I had to cleanup Makefile.am because I was experiencing weird linking problems, probably due to a bug in the autotools. With the change included in this patch, I got it compiled and linked here correctly. This patch has been tested with the phone Motorola C123 and the following images files: * firmware/board/compal_e88/hello_world.compalram.bin * firmware/board/compal_e88/layer1.compalram.bin Using the osmocon, bcch_scan and mobile tools. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
* fw/calypso: Add a new driver for the buzzer controlSylvain Munaut2011-04-242-1/+87
| | | | | Written-by: Jose Luis Pereira <onaips@gmail.com> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/fw/dsp: add delay as workaround for dsp_dumpSteve Markgraf2011-03-191-0/+3
| | | | | | Without the delay we would fill the sercomm buffer faster than its content can be sent, and the phone would end up in a panic and hang. Signed-off-by: Steve Markgraf <steve@steve-m.de>
* fw/calypso/dsp: Add comment about meaning of bit 11 of ndb->d_tch_modeSylvain Munaut2011-01-121-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fixed typos in commentsThomas Waldmann2011-01-116-12/+12
| | | | Signed-off-by: Steve Markgraf <steve@steve-m.de>
* Testing for the idle i2c bus was done backwards, we haveChristian Vogel2011-01-021-2/+2
| | | | to wait for the bit to become 0, not 1.
* target uart: remove REG_OFFS() macro side-effectAlex Badea2010-11-171-1/+1
| | | | | | | | | Don't assign to the variable given as argument. This prevents clobbering the local 'reg' variables in uart_reg_{read,write}(), which would in turn prevent the latch bits from being restored correctly. Signed-off-by: Alex Badea <vamposdecampos@gmail.com>
* target uart: fix preservation of LCRAlex Badea2010-11-171-4/+4
| | | | | | | | Store old_lcr only when switching to LCR == 0xBF. We don't want to clobber old_lcr when switching back, otherwise we can't restore the previous LCR value. Signed-off-by: Alex Badea <vamposdecampos@gmail.com>
* target/fw/dsp: Implement section loading with bootloaderSylvain Munaut2010-11-071-0/+35
| | | | | | | | | This works for both the default ROM bootloader and for our custom one. This will allow to implement easy patch loading. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/fw/dsp: Create a common function to start running codeSylvain Munaut2010-11-071-8/+10
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/fw/calypso: Fix dsp_load_tch_param to set fn_report for TCH/HSylvain Munaut2010-10-251-3/+22
| | | | | | The previous code was only valid for TCH/F ... Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/fw/dsp: Add utility function to memcpy to/from the APISylvain Munaut2010-10-251-0/+57
| | | | | | | | | | | Copying to/from the DSP API shared memory must be done using 16 bits word only. Using those method, we avoid the hassle of repeating the code when we copy buffer back and forth. API address must be 16 bits aligned but for our purpose, it's good enough. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/dsp: Add dsp audio initializationDieter Spaar2010-09-281-0/+77
| | | | | Written-by: Dieter Spaar <spaar@mirider.augusta.de> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/dsp: Adjust dsp parameters for TCH FR CodecDieter Spaar2010-09-281-1/+1
| | | | | Written-by: Dieter Spaar <spaar@mirider.augusta.de> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/dsp: Add function to load dsp ciphering parametersSylvain Munaut2010-09-171-0/+16
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw: Update dsl_load_tch_params to set the fn_sid, fn_report and fn_a5Sylvain Munaut2010-09-171-12/+31
| | | | | | Mix between Dieter's version in tch branch and how the TSM30 does it. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* firmware: fixed irq-less keypad supportIngo Albrecht2010-07-201-3/+9
|
* firmware: fixed and commented backlight driverIngo Albrecht2010-07-201-1/+3
|
* [calypso] Rework of keypad interrupt handler.Andreas.Eversberg2010-07-181-32/+56
| | | | | | | | | The keys are correctly detected and debounced. There is no delay_ms in the interrupt handler anymore. When a key is pressed, the columns of the keypad are polled and debounced via timer interrupt. If no key is pressed, the timer interrupt is ignored again.
* firmware: sim controller driver by dexterIngo Albrecht2010-07-152-1/+741
|
* cleanup duplicated delay functionsSteve Markgraf2010-07-152-1/+17
| | | Signed-off-by: Steve Markgraf <steve@steve-m.de>
* UART initialisation, serial port errorsChristian Vogel2010-04-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Additional initialisations for the UART to make the data corruption from the PC to the Phone go away. I've seen a lot of systematic character swaps on the serial port, especially in the vincinity of 0-bytes. As the XON/XOFF registers are the only thing in the UART that look like they would consider the actual data sent, I've added this initialisation to uart.c This makes the problem go away completely on my C123. To check for it I've added CRCs to the HDLC protocol and checked for bad frames, and also compared them in a (patched) osmocon that just sends random garbate in a special DLCI. The bad frames I observed always looked like this (number in parenthesis define number of omitted bytes, for brevity): <------ good bytes ----------> <-recvd|sent-> <----- identical again ------> d0 e0 00 00..(107)..f7 ce 17 c4 < 0c 00|00 0c > db 70 ba cb..(67)..d8 6d 3a 1f 31 e1 00 00..(47)..38 ca 2f e5 < 0c 00|00 0c > f8 a3 77 5f..(127)..5b 72 ff 4a <-- good -> <--- bad -----> <---- good again -------------> dc e1 00 00 < 0c 00|00 0c > 87 cb 24 83..(178)..2f 69 b3 51 ae e2 00 00..(167)..bd 18 6f a1 < 0c 00|00 0c > 2f 53 d2 b2..(7)..da c7 1b 63 dc e3 00 00..(131)..8e 2c b0 a8 < 0c 00|00 0c > 40 62 56 5f..(43)..f0 3a 47 f7 Formerly I was observing about 10 packets for every 2000 sent (with 192 bytes of payload each). Now, with the added initialisation, I see (as the time of writing this email) 12000 packets with 192 bytes each sent, with 0 bytes missing, corrupted, flipped).
* fix disabling of the calypso bootrom on targets with nIBOOT tied to low:Steve Markgraf2010-04-101-4/+3Star
| | | | | | | * bit 8 always needs to be 1 when overriding the setting of the nIBOOT pin, so now we set both bits (9 and 8) to 1, and clear bit 9 if we want to enable the romloader * to be sure, this was tested on a target with nIBOOT high (C155) and a Alcatel VLE5 pulled to low, and works fine Signed-off-by: Steve Markgraf <steve@steve-m.de>
* calypsu UART: add additional debug output in UART RX error caseHarald Welte2010-03-211-1/+22
|
* firmware: fixed bootrom disablingIngo Albrecht2010-03-141-2/+1Star
|
* firmware: watchdog-based system resetIngo Albrecht2010-03-141-3/+30
|
* Introduce LCD display_driver infrastructureHarald Welte2010-03-121-3/+3
| | | | | | | * introduce display_driver layer * port st7558 and ssd1783 drivers to display_driver * allow for run-time selection of display driver from board/init.c * replace st7558_puts() calls with display_puts() calls
* uwire: add a chip-select for CS0, needed by the J100i displaySteve Markgraf2010-03-121-0/+7
| | | | Signed-off-by: Steve Markgraf <steve@steve-m.de>
* start to use libosmocore within the firmwareHarald Welte2010-03-071-0/+1
| | | | | | | | | * remove linuxlist.h copy and use osmocore * don't put 'struct gsm_time' into l1ctl packets * include rx_level and snr for each burst in l1ctl * properly build libosmocore.a for target * move gsmtime functions into libosmocore * move ctype.h to standard location
* fix even more compiler warningsHarald Welte2010-03-075-8/+12
|
* fix compiler warningsHarald Welte2010-03-071-7/+7
|
* Added Solomon SSD1783 display driver for Motorola C155Harald Welte2010-03-071-1/+1
| | | | | | | Signed-off-by: Steve Markgraf <steve@steve-m.de> Conflicts: src/target/firmware/Makefile
* Allow use of uart driver without interrupts.Ingo Albrecht2010-03-071-7/+19
|
* Allow use of keypad driver without interrupts.Ingo Albrecht2010-03-071-6/+8
|
* New build system.Ingo Albrecht2010-03-071-16/+3Star
|
* move macros to where they belongHarald Welte2010-03-011-10/+1Star
|
* Prepare DSP functions needed for Uplink (Tx)Harald Welte2010-03-011-1/+84
| | | | | | | | * Tell DSP to properly initialize ABB(TWL3025) registers at first DSP interrupt * Initialize the entire API RAM to zero on dsp_power_on() * Tell DSP to initialize the APCRAM to all-zero to preven accidential Tx * Set number of GUARD bits to 8 * Add function to configure TCH parameters: dsp_load_tch_param()
* calypso: Add experimental driver for uWireSylvain Munaut2010-02-232-1/+130
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* calypso/dsp: Fix printf format string in dumpSylvain Munaut2010-02-231-2/+2
| | | | | | | | | | | | | | In commit 9a18ba40d940c9bf173504b941e10f9638032823 (old git), this was changed to 'fix compiler warnings'. But %ux is not a valid format specifier at all so that produces wrong output ! %lx is the correct format AFAICT because uint32_t is typedef'd from unsigned long in my toolchain (ARM GCC 4.3.3 - newlib 1.17.0). This doesn't produce any warning here. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* Calypso TPU: Introduce TPU debug modeHarald Welte2010-02-232-3/+53
| | | | | | Using #define TPU_DEBUG, we can now send the full TPU RAM contents to the host PC (using a sercomm DLCI) at the time of tpu_enable() which is very helpful for TPU debugging.
* Calypso TPU: initialize TPU RAM to zero at tpu_init() timeHarald Welte2010-02-231-2/+10
|
* Calyspo TPU: make add_mod5000() accept signed valuesHarald Welte2010-02-231-2/+2
| | | | | Sometimes we want to 'add' a negative value but still want the result to be correct!
* Initial import of OsmocomBB into git repositoryHarald Welte2010-02-1820-0/+2715