summaryrefslogtreecommitdiffstats
path: root/src/target/firmware
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>
* fw/prim_tch: Add support for sending frame from l23 (TRAFFIC_REQ/CONF)Sylvain Munaut2011-07-281-3/+73
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/prim_tch: Add support for sending traffic frames to l23 (TRAFFIC_IND)Sylvain Munaut2011-07-281-2/+28
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1/l23_api: Add processing of the new audio_modeSylvain Munaut2011-07-284-10/+33
| | | | | | This currently just stores it into the l1 sync state struct Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/l1: Add a queue for traffic frame to send to network (TRAFFIC_REQ)Sylvain Munaut2011-07-282-0/+28
| | | | | | | | Also hard limit to maximum 4 pending frames (should not happen !), the upstream is supposed to do its own flow control. Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* l1ctl: Add definition for TRAFFIC_{REQ,CONF,IND}Sylvain Munaut2011-07-281-1/+1
| | | | | | Also adapt packet creation length in L1 Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/apps: Remove manual gain control with keyboardSylvain Munaut2011-07-172-54/+0Star
| | | | | | | | | | | | - It's broken by the use of compute_gain - Since there is now an AGC loop, manually setting the register as no effect. If someone needs manual gain control for testing, he'll have to re-implement a proper AGC override. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* [layer1] Adding neighbour cell measurement code to layer1.Andreas Eversberg2011-07-176-9/+186
| | | | | | When listening to BCCH, layer1 may measure the power level of neighbour cells. A list of neighbour cell frequencies need to be sent to layer1. After the measurement is done, the results are indicated to layer23.
* [rf] Adding rffe_set_gain() and rffe_get_gain() to get/set computed gainAndreas Eversberg2011-07-1712-56/+104
| | | | | | | | | rffe_compute_gain() is the new name for rffe_set_gain(). I needed to change this, to solve the name collision with the rffe_set_gain() function, which actually sets the absolute gain. rffe_get_gain() will now read the absolute gain which has been computed by rffe_compute_gain() or set by rffe_set_gain().
* tpu_window: Fix int16_t overflow in tpu_window calculationHarald Welte2011-07-161-2/+3
| | | | | | | | | First we add 55500 to an int16_t, then later we subtract it again. The bug only didn't become apparent as we wrap twice, once adding then subtracting. Discovered by Smatch: firmware/layer1/tpu_window.c +127 l1s_rx_win_ctrl(24) warn: value 55000 can't fit into 32767 'stop'
* 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
* fw/l1a: Add a message to safely count the length of a txqueueAndreas Eversberg2011-06-252-0/+18
| | | | | | | (that is by locking) Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/sercomm: Additional locking needed in drv_pullSylvain Munaut2011-06-251-3/+11
| | | | | | | Credits to Andreas Eversberg for finding this bug after countless hours of debug and providing initial patch :) Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/sercomm: Fix up the locking using an 'abstraction' layerSylvain Munaut2011-06-251-17/+29
| | | | | | | Not _that_ abstract but a long is enough to store a ptr if need be :p Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/comm/msgb: Protect allocation routine with proper lockingSylvain Munaut2011-06-251-0/+6
| | | | | | | | Credits to Andreas Eversberg for finding this bug after countless hours of debug :) Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/comm/msgb: Really panic (i.e. lockup) if we run out of msgbSylvain Munaut2011-06-251-11/+12
| | | | | | | | | | Ideally we should only panic in interrupt context. In user context, we could wait ... We could also return NULL and let the calling code deal with it but it's not ready for that yet. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/comm: Remove useless include from msgb.cSylvain Munaut2011-06-251-2/+0Star
| | | | | | Left over from the backlight debug code Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* board: mtk: increase RAM sizes in linker scriptWolfram Sang2011-05-301-2/+2
| | | | | | | | | gcc3 (and some gcc4) produce code which does not fit into the 0x5000-sized RAM sections. Extend them to 0x6000 for now, so it will build correctly again. The created binary (gcc3) has been successfully tested on my G2. Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
* mtk: uart: remove forgotten calypso-includeWolfram Sang2011-05-301-2/+0Star
| | | | | | Dunno how that survived... Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
* fw/rffe/compal: Add support for 850 bandSylvain Munaut2011-05-291-2/+2
| | | | | | The HW switch supports it. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/trf6151: Use a #define to enable/disable out-of-spec warningsSylvain Munaut2011-05-291-0/+10
| | | | | | | | | We also disable them by default because: - It can operate fine out of spec - Some phone will actually do it (like using the DCS port for PCS) - It's verbose for nothing for most people anyway Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/trf6151: Better PLL settings routinesSylvain Munaut2011-05-291-89/+155
| | | | | | | | | * We actually support TX 850/1900 now * We try to find the better settings for a given frequency, no matter if it's in spec or not ... (for e.g. TXin in DCS downlink is better done with PCS config) Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/rffe: Add function to query RF wiringSylvain Munaut2011-05-294-0/+50
| | | | | | | Depending on the chipset and the HW, not all ports are connected and we need to know what we can use when we have the choice ... Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* src: use namespace prefix osmo_* for crc16 functionsPablo Neira Ayuso2011-05-152-6/+6
| | | | | | | | Summary of changes: s/crc16_table/osmo_crc16_table/g s/crc16/osmo_crc16/g s/crc16_byte/osmo_crc16_byte/g
* src: use namespace prefix osmo_timer*Pablo Neira Ayuso2011-05-152-14/+14
| | | | | | | | | | | | | | Summary of changes: s/struct timer_list/struct osmo_timer_list/g s/bsc_add_timer/osmo_timer_add/g s/bsc_schedule_timer/osmo_timer_schedule/g s/bsc_del_timer/osmo_timer_del/g s/bsc_timer_pending/osmo_timer_pending/g s/bsc_nearest_timer/osmo_timers_nearest/g s/bsc_prepare_timers/osmo_timers_prepare/g s/bsc_update_timers/osmo_timers_update/g s/bsc_timer_check/osmo_timers_check/g
* target/boards: add infrastructure for loaders for Mediatek platformsWolfram Sang2011-05-0510-0/+1488
| | | | | | | | | | We are just interested in the loaders here, no other applications needed. Split it from the compal-based phones. Add mt62xx as first user. Based on a patch by steve-m, but cleaned up and seperated from compal/calypso. Signed-off-by: Steve Markgraf <steve@steve-m.de> Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
* uart.h: move header out of calypso-directoryWolfram Sang2011-05-0511-13/+13
| | | | | | | Everything defined is a pretty generic interface and can be used by mediatek, too. Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
* cfi_flash: delete unused definesWolfram Sang2011-05-051-5/+0Star
| | | | Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
* lib: move delay.c from calypso to libWolfram Sang2011-05-053-2/+2
| | | | | | Nothing calypso-related in there and needed for Mediatek, too. Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
* comm: msgb: don't set backlight on errorWolfram Sang2011-05-051-1/+0Star
| | | | | | | Removes the dependency to calypso and makes place for a generic board_panic to be added later. Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
* target/firmware: make build less verbose like the rest of the treeWolfram Sang2011-04-281-6/+17
| | | | | | | As usual V=1 will give the full output. Signed-off-by: Wolfram Sang <wolfram@the-dreams.de> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* src: use new libosmogsm and include/osmocom/[gsm|core] path to headersPablo Neira Ayuso2011-04-2640-55/+54Star
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-243-1/+121
| | | | | Written-by: Jose Luis Pereira <onaips@gmail.com> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: Adding TAO loop to correct TPU window offsetAndreas Eversberg2011-03-208-2/+111
| | | | 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>
* target/fw: correct IO_CNTL_REG name and small cosmetic fixesSteve Markgraf2011-02-065-17/+16Star
| | | Signed-off-by: Steve Markgraf <steve@steve-m.de>
* firmware: Add support for the Pirelli DP-L10 triband GSM/Wifi phoneSteve Markgraf2011-01-244-1/+316
| | | Signed-off-by: Steve Markgraf <steve@steve-m.de>
* fw/app/layer1: unset the inverted attribute of the display after layer1_init()Steve Markgraf2011-01-241-1/+2
| | | | | | | | This attribute is toggled with the RTC interrupt, which is disabled in layer1_init(). If an interrupt between rtc_init() and layer1_init() occured, the display of the E88 phones remained inverted Signed-off-by: Steve Markgraf <steve@steve-m.de>
* fw/board/gta0x: move rffe configuration to board/gta0xSteve Markgraf2011-01-242-4/+2Star
| | | | Signed-off-by: Steve Markgraf <steve@steve-m.de>
* fw/makefile: enable generation of Compal E86 images (Motorola C139/C140)Steve Markgraf2011-01-242-1/+149
| | | | | | | This target now has its own init.c which correctly initializes the display and the keypad backlight Signed-off-by: Steve Markgraf <steve@steve-m.de>
* fw/board/gta0x: remove unused define in RFFE configurationSteve Markgraf2011-01-241-1/+0Star
| | | Signed-off-by: Steve Markgraf <steve@steve-m.de>
* fw/board/gta0x: implement TX support for gta0x devicesSteve Markgraf2011-01-241-2/+16
| | | | Signed-off-by: Steve Markgraf <steve@steve-m.de>
* target/fw: set the TRF6151 tsp IDs from the rffe initializationSteve Markgraf2011-01-246-17/+27
| | | Signed-off-by: Steve Markgraf <steve@steve-m.de>
* target/loader: disable bootrom mappingSteve Markgraf2011-01-121-0/+3
| | | | | | This is for being able to read the whole flash on devices that use the bootrom, and also fixes flash detection on the C139/C140/J100i 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>
* target/simtest: remove delay functionsSteve Markgraf2011-01-111-30/+9Star
| | | Signed-off-by: Steve Markgraf <steve@steve-m.de>
* fixed typos in commentsThomas Waldmann2011-01-1117-34/+34
| | | | Signed-off-by: Steve Markgraf <steve@steve-m.de>
* Fix flash chip detection by using a volatile pointerAndreas Oberritter2011-01-071-1/+1
| | | | | | | | * This might be a workaround for a compiler bug (gcc 4.5.2, binutils 2.21) Signed-off-by: Andreas Oberritter <obi@saftware.de> Signed-off-by: Steve Markgraf <steve@steve-m.de>
* display/st7558: remove delays, since the bug in the i2c driver is fixedSteve Markgraf2011-01-021-4/+2Star
| | | Signed-off-by: Steve Markgraf <steve@steve-m.de>