summaryrefslogtreecommitdiffstats
path: root/src/target/firmware
AgeCommit message (Collapse)AuthorFilesLines
2012-01-28layer1: Fixed power measurement, adding ARFCN wrappingAndreas Eversberg2-3/+4
Power measurement returned the first measurement result twice, now it is returned only once. Wrapping of ARFCN allows to measure the E-band en block. After measuring the ARFCN 1023, the ARFCN wraps to 0. Special flags like ARFCN_UPLINK or ARFCN_PCS are preserved while wrapping.
2012-01-28Hold function for power button to turn off the phoneAndreas Eversberg2-11/+17
In order to allow applications to use the power button, the keypad handler will wait half a second if the key is pressed and hold, until the power is turned off. This way the application does not need to handle it. The power off function will then wait until the button is released, so the phone will not start again while the button is still pressed.
2012-01-28target/rf: Make the trf6151_set_arfcn use ARFCN_UPLINK flag to select UL/DLSylvain Munaut5-9/+15
This way we can independentely control what frequency we want and wheter we want to TX or RX. This allow TX on DL band and RX on UL band. This also means all call to tx_window setup now need to properly set the ARFCN_UPLINK flag ! Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-01-28firmware/layer1: Using queue to process received l23 frames in main loopAndreas Eversberg3-1/+26
Instead of processing the frames out of the interrupt context, they are queued until serial interrupt returns and main loop is processed.
2012-01-28Added callback function to forward L1CTL packets to rather than SERCOMAndreas Eversberg2-2/+11
This is experimental, maybe there should be a better way to do that.
2011-11-27i2c: fix maximum address an I2C chip can assignAlan Carvalho de Assis1-1/+1
I2C bus support up to 128 devices (mask 0x7F), but current calypso driver is masked it to 64 (0x3F). I discover it because Motorola W220 has an I/O expander PCA9537 at address 0x49 which could be reached. Signed-off-by: Alan Carvalho de Assis <acassis@gmail.com> Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-11-21fw/rf/mt6139: Dereference pointerSteve Markgraf1-2/+2
Found and patched by Alexander Huemer Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-11-15fw/i2c: Fix two printd-related typosSteve Markgraf1-2/+2
Thanks to Stefan Mandl for pointing those out. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-11-13target/fw/sim: SIM Layer 1 driverSylvain Munaut6-382/+472
Originally written by dexter and then Andreas did a lot of cleanup work to bring it into shape for inclusion in master Written-by: Philipp Maier <zero-kelvin@gmx.de> Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-09fw/calypso: Fix backlight bl_mode_pwl method (typo)Sylvain Munaut1-1/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-09-18fw: Add SE J100i-specific board init code and build images for itSteve Markgraf2-1/+146
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-09-18fw/display: Add and build SSD1963 display driver for the SE J100iSteve Markgraf3-1/+212
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-09-17fw/compal/rffe: Add correct RFFE-configuration for Compal E86Steve Markgraf2-2/+108
The Compal E86 (C139/C140) has a different RFFE-configuration than the other Compal phones. The Motorola C139 schematics on this part look exactly the same, but in fact the board is missing a transistor (U16), and it uses TSPACT2 adittionally. This fixes the long-known problem with the C139/C140 phones of the rx-level being over -20dBm worse as compared to the E88/E89 phones, as well as the band selection on the antenna switch in TX-mode (which was completely wrong, but sort of worked anyway). Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-09-16fw/layer1/tpu_window: Open and close RFFE tx_window at the right point of timeSteve Markgraf1-3/+10
So far, the PA-enable signal has been enabled way to early and also has been disabled much too late. We're now setting the RFFE to TX-mode after opening the ABB window, and setting the RFFE to RX-mode again after TX. This yields to an almost perfectly timed TX-window, just like with the stock firmware of the phone. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-08-31fw/comm/msgb: fix length parameter in memset-callSteve Markgraf1-2/+2
Found by clang: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to remove the addressof? Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-08-31fw/layer1/fbsb: fix newline in a printf()-callSteve Markgraf1-1/+1
Found by clang: warning: unknown escape sequence '\m' Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-08-31fw/display/font: add proper 8x8 font for the st7558 display driverSteve Markgraf1-0/+261
It was obtained by rotating font_r8x8_horiz.c. Also refer to the last git commit for more details. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-08-31fw/display/font: remove old 8x8 font used by the st7558 display driverSteve Markgraf1-0/+0
This file was handled as a binary(!) file by git (thus the git rm). Also, it missed the uppermost line of pixels in each character. It will be replaced with a correct font in the next commit. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-08-30fw/abb/twl3025: handle interrupt on powerbutton pressSteve Markgraf1-0/+7
Since the powerbutton on the Pirelli DP-L10 doesn't seem to be connected to the keypad scan matrix at all, we're using Iota's PWON interrupt to determine if the powerbutton has been pressed, and power off the phone after it has been released again. This also affects the Compal phones, since the interrupt happens quite some time before the keypad driver notices the keypress. The code in the keypad driver that has been used so far to power off the phone will remain as a backup when running without interrupts at all (e.g. the loader application). Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-08-03fw/calypso/dsp: Fix wrong hardcoded boot code constantSylvain Munaut1-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>
2011-07-28fw/prim_tch: Add support for sending frame from l23 (TRAFFIC_REQ/CONF)Sylvain Munaut1-3/+73
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-07-28fw/prim_tch: Add support for sending traffic frames to l23 (TRAFFIC_IND)Sylvain Munaut1-2/+28
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-07-28fw/layer1/l23_api: Add processing of the new audio_modeSylvain Munaut4-10/+33
This currently just stores it into the l1 sync state struct Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-07-28fw/l1: Add a queue for traffic frame to send to network (TRAFFIC_REQ)Sylvain Munaut2-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>
2011-07-28l1ctl: Add definition for TRAFFIC_{REQ,CONF,IND}Sylvain Munaut1-1/+1
Also adapt packet creation length in L1 Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-07-17fw/apps: Remove manual gain control with keyboardSylvain Munaut2-54/+0
- 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>
2011-07-17[layer1] Adding neighbour cell measurement code to layer1.Andreas Eversberg6-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.
2011-07-17[rf] Adding rffe_set_gain() and rffe_get_gain() to get/set computed gainAndreas Eversberg12-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().
2011-07-16tpu_window: Fix int16_t overflow in tpu_window calculationHarald Welte1-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'
2011-07-16calypso/uart.c: Fix array bounds checkingHarald Welte1-1/+1
Found by Smatch: calypso/uart.c +433 uart_baudrate(7) error: buffer overflow 'divider' 7 <= 7
2011-07-16calypso/irq: Fix array bounds checkingHarald Welte1-1/+1
Found by Smatch: calypso/irq.c +200 irq_register_handler(5) error: buffer overflow 'irq_handlers' 32 <= 32
2011-06-25fw/l1a: Add a message to safely count the length of a txqueueAndreas Eversberg2-0/+18
(that is by locking) Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-06-25fw/sercomm: Additional locking needed in drv_pullSylvain Munaut1-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>
2011-06-25fw/sercomm: Fix up the locking using an 'abstraction' layerSylvain Munaut1-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>
2011-06-25fw/comm/msgb: Protect allocation routine with proper lockingSylvain Munaut1-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>
2011-06-25fw/comm/msgb: Really panic (i.e. lockup) if we run out of msgbSylvain Munaut1-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>
2011-06-25fw/comm: Remove useless include from msgb.cSylvain Munaut1-2/+0
Left over from the backlight debug code Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-05-30board: mtk: increase RAM sizes in linker scriptWolfram Sang1-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>
2011-05-30mtk: uart: remove forgotten calypso-includeWolfram Sang1-2/+0
Dunno how that survived... Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
2011-05-29fw/rffe/compal: Add support for 850 bandSylvain Munaut1-2/+2
The HW switch supports it. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-05-29fw/trf6151: Use a #define to enable/disable out-of-spec warningsSylvain Munaut1-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>
2011-05-29fw/trf6151: Better PLL settings routinesSylvain Munaut1-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>
2011-05-29fw/rffe: Add function to query RF wiringSylvain Munaut4-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>
2011-05-15src: use namespace prefix osmo_* for crc16 functionsPablo Neira Ayuso2-6/+6
Summary of changes: s/crc16_table/osmo_crc16_table/g s/crc16/osmo_crc16/g s/crc16_byte/osmo_crc16_byte/g
2011-05-15src: use namespace prefix osmo_timer*Pablo Neira Ayuso2-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
2011-05-05target/boards: add infrastructure for loaders for Mediatek platformsWolfram Sang10-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>
2011-05-05uart.h: move header out of calypso-directoryWolfram Sang11-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>
2011-05-05cfi_flash: delete unused definesWolfram Sang1-5/+0
Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
2011-05-05lib: move delay.c from calypso to libWolfram Sang3-2/+2
Nothing calypso-related in there and needed for Mediatek, too. Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
2011-05-05comm: msgb: don't set backlight on errorWolfram Sang1-1/+0
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>