Commit Graph

645 Commits

Author SHA1 Message Date
Andreas Eversberg 0fd73c5e0f firmware: Increased data size for for ram linker scripts.
This is required, since monitor app requires a litte more than 64k.
2012-02-04 00:04:58 +01:00
Andreas Eversberg 7cc4a4b324 Improvement of neighbour cell power measurement task.
5 measurements are now performed during a 51 multiframe. They are performed
at one of the 5 FCCH.

Additionally a timeslot offset can be given for each measurement. This way
it is possible to measure each timeslot seperately. The given ARFCN must be in
sync with the serving cell.
2012-02-04 00:04:58 +01:00
Harald Welte b7c4b9b6f5 rename 'monitor' to 'rssi'
Sooner or later we might have a much more comprehensive monitor, so it's
good to name the current implementation just RSSI as that's all it does.
2012-02-04 00:04:58 +01:00
Andreas Eversberg 97d731de34 layer1/monitor: Adding spectrum analyzer to monitor app
By pressing '*', the analyzer is turned on or off.
Each beep indicated a new measurement result.
Right and left button can be used to scroll. By holding the button, the input
is repeated.
2012-02-04 00:04:58 +01:00
Andreas Eversberg c338fc3343 Adding "monitor" application to firmware
This app is used to measure receive level of given channels.

By pressing digits, the channel can be selected.
By pressing left or right button, the frequency is increased/decreased.
By pressing the menu button, the maximum received level is shown until
pressing menu button again. (usefull for hopping)
By pressing up or down button, the volume of a tone is changed, that
indicates rx level.
The left soft button is used to toggle PCS/DCS on shared channel numbers.
The right soft button is used to toggle uplink and downlink.
2012-02-04 00:04:58 +01:00
Steve Markgraf 99a4af4260 firmware/apps: remove l1test-application
This application had already been removed a while ago, but
was added again with one of the initial framebuffer commits.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-02-03 23:59:36 +01:00
Steve Markgraf 7ff649a6a7 firmware/apps: print application name on the display
Now we're printing the application name on all apps
that initialize the display (again).

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-02-03 23:59:36 +01:00
Steve Markgraf d37d04dfdc firmware: remove deprecated display drivers and fonts
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-02-03 23:59:36 +01:00
Steve Markgraf 0f95771e62 firmware: remove deprecated function calls of old display API, cosmetic changes
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-02-03 23:59:36 +01:00
Steve Markgraf 533d5e6dc4 firmware/fb: add framebuffer driver for J100i display
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-02-03 23:59:36 +01:00
Steve Markgraf 4284a90a2a firmware/fb: add framebuffer driver for TD014 display (C139/C140)
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-02-03 23:59:36 +01:00
Christian Vogel 12d7ca237f Calypso FB: RGB332 to RGB565 conversion function. 2012-02-03 23:59:35 +01:00
Andreas Eversberg cf5ba98c10 firmware/fb: Fixed color component shift 2012-02-03 23:59:35 +01:00
Andreas Eversberg fc49eccb0c firmware/fb: Adding transparent background color for fonts 2012-02-03 23:59:35 +01:00
Steve Markgraf 4a5e3404f9 [PATCH] fw/fb/ssd1783: fix the RGB332 color palette
We revert the initialization of the palette to the behaviour of the
old non-fb driver.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
Signed-off-by: Andreas Eversberg <jolly@eversberg.eu>
2012-02-03 23:59:35 +01:00
Andreas Eversberg 593d905f0f firmare/framebuffer: Option to center text
This is usefull, because actual width of proportional font text and display
width may not be known to application.
2012-02-03 23:59:35 +01:00
Andreas Eversberg 30dd87115c firmware/framebuffer: Adding fixed with font with 8x8 pixles 2012-02-03 23:59:35 +01:00
Christian Vogel de8bb97ed5 Calypso FB: Makefile, "dummy" driver, Hello World 2012-02-03 23:59:35 +01:00
Christian Vogel df4218c8fd Calypso FB: C155 / SSD1783 Color Support 2012-02-03 23:59:35 +01:00
Christian Vogel 080124619d Calypso FB: C123 / ST7558 Black and White Support 2012-02-03 23:59:35 +01:00
Christian Vogel ec097f532e Calypso FB: Main framebuffer header file. 2012-02-03 23:59:35 +01:00
Christian Vogel 45d88fa052 Calypso FB: 8 Fonts, header file and utility functions.
I only activate two fonts, Helvetica Regular 8pt and bold
14pt because the others bloat the binary too much.
2012-02-03 23:59:35 +01:00
Christian Vogel 41eed0ee31 Removing all traces of the old display drivers. 2012-02-03 23:59:34 +01:00
Harald Welte 0eecdf24f3 timers: comply with timer rename in libosmocore
libosmocore has prefixed the timer functions with omso_* already
in May 2011 (0b21c1c885), and we follow
suit here for API consistency reasons.
2012-01-29 09:41:45 +01:00
Andreas Eversberg 40fc521088 layer1: Fixed power measurement, adding ARFCN wrapping
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-28 13:16:14 +01:00
Andreas Eversberg a6c98a79b2 Hold function for power button to turn off the phone
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-28 13:15:48 +01:00
Sylvain Munaut f04f53d3b7 target/rf: Make the trf6151_set_arfcn use ARFCN_UPLINK flag to select UL/DL
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-28 13:15:18 +01:00
Andreas Eversberg 6ab18bedb1 firmware/layer1: Using queue to process received l23 frames in main loop
Instead of processing the frames out of the interrupt context, they are
queued until serial interrupt returns and main loop is processed.
2012-01-28 13:14:45 +01:00
Andreas Eversberg c4701d4204 Added callback function to forward L1CTL packets to rather than SERCOM
This is experimental, maybe there should be a better way to do that.
2012-01-28 13:13:38 +01:00
Alan Carvalho de Assis 83d9dcc017 i2c: fix maximum address an I2C chip can assign
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-27 14:35:36 +01:00
Steve Markgraf 126653e17c fw/rf/mt6139: Dereference pointer
Found and patched by Alexander Huemer

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-11-21 00:51:02 +01:00
Steve Markgraf 24a7d31d71 fw/i2c: Fix two printd-related typos
Thanks to Stefan Mandl for pointing those out.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-11-15 17:41:40 +01:00
Sylvain Munaut de4f00d931 target/fw/sim: SIM Layer 1 driver
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-13 20:25:19 +01:00
Sylvain Munaut 4789b4a662 fw/calypso: Fix backlight bl_mode_pwl method (typo)
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-09 20:03:57 +01:00
Steve Markgraf 2a64b42111 fw: Add SE J100i-specific board init code and build images for it
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-09-18 02:15:24 +02:00
Steve Markgraf a6ae8a3b7a fw/display: Add and build SSD1963 display driver for the SE J100i
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-09-18 02:12:23 +02:00
Steve Markgraf 1501bc24fa fw/compal/rffe: Add correct RFFE-configuration for Compal E86
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-17 21:41:30 +02:00
Steve Markgraf 2b2209ebb5 fw/layer1/tpu_window: Open and close RFFE tx_window at the right point of time
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-09-16 21:24:05 +02:00
Steve Markgraf d7410b752f fw/comm/msgb: fix length parameter in memset-call
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-31 22:07:18 +02:00
Steve Markgraf ff82113350 fw/layer1/fbsb: fix newline in a printf()-call
Found by clang:
warning: unknown escape sequence '\m'

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-08-31 21:55:01 +02:00
Steve Markgraf 3087fd5030 fw/display/font: add proper 8x8 font for the st7558 display driver
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-31 04:01:49 +02:00
Steve Markgraf 6379629a3a fw/display/font: remove old 8x8 font used by the st7558 display driver
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-31 04:00:58 +02:00
Steve Markgraf 4f0825a352 fw/abb/twl3025: handle interrupt on powerbutton press
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-30 21:34:36 +02:00
Sylvain Munaut 178992a232 fw/calypso/dsp: Fix wrong hardcoded boot code constant
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-08-03 11:39:49 +02:00
Sylvain Munaut e042cbb297 fw/prim_tch: Add support for sending frame from l23 (TRAFFIC_REQ/CONF)
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-07-28 21:30:50 +02:00
Sylvain Munaut 5e10b74d0b fw/prim_tch: Add support for sending traffic frames to l23 (TRAFFIC_IND)
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-07-28 21:30:50 +02:00
Sylvain Munaut e809248b66 fw/layer1/l23_api: Add processing of the new audio_mode
This currently just stores it into the l1 sync state struct

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-07-28 21:30:50 +02:00
Sylvain Munaut 643aad2ef4 fw/l1: Add a queue for traffic frame to send to network (TRAFFIC_REQ)
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-28 21:30:50 +02:00
Sylvain Munaut c7d20dfc41 l1ctl: Add definition for TRAFFIC_{REQ,CONF,IND}
Also adapt packet creation length in L1

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-07-28 21:30:50 +02:00
Sylvain Munaut 2908849908 fw/apps: Remove manual gain control with keyboard
- 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 12:05:07 +02:00
Andreas Eversberg 74e7535ea2 [layer1] Adding neighbour cell measurement code to layer1.
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 09:41:19 +02:00
Andreas Eversberg 065b6e35a3 [rf] Adding rffe_set_gain() and rffe_get_gain() to get/set computed gain
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-17 09:27:35 +02:00
Harald Welte d5c9c73622 tpu_window: Fix int16_t overflow in tpu_window calculation
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-16 18:01:48 +02:00
Harald Welte c9297d28e0 calypso/uart.c: Fix array bounds checking
Found by Smatch:
calypso/uart.c +433 uart_baudrate(7) error: buffer overflow 'divider' 7 <= 7
2011-07-16 17:48:20 +02:00
Harald Welte 5339425de9 calypso/irq: Fix array bounds checking
Found by Smatch:
calypso/irq.c +200 irq_register_handler(5) error: buffer overflow 'irq_handlers' 32 <= 32
2011-07-16 17:46:54 +02:00
Andreas Eversberg bd3629e4e6 fw/l1a: Add a message to safely count the length of a txqueue
(that is by locking)

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-06-25 22:46:24 +02:00
Sylvain Munaut 402634a0cf fw/sercomm: Additional locking needed in drv_pull
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-25 22:42:38 +02:00
Sylvain Munaut 301eb4753a fw/sercomm: Fix up the locking using an 'abstraction' layer
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-25 22:38:20 +02:00
Sylvain Munaut 5907bfd39a fw/comm/msgb: Protect allocation routine with proper locking
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-25 22:29:09 +02:00
Sylvain Munaut fc16cbb578 fw/comm/msgb: Really panic (i.e. lockup) if we run out of msgb
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-25 22:29:06 +02:00
Sylvain Munaut 6eba3fe6a5 fw/comm: Remove useless include from msgb.c
Left over from the backlight debug code

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-06-25 22:28:57 +02:00
Wolfram Sang 5bbea93772 board: mtk: increase RAM sizes in linker script
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-30 21:51:58 +02:00
Wolfram Sang fc0a28f524 mtk: uart: remove forgotten calypso-include
Dunno how that survived...

Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
2011-05-30 21:51:58 +02:00
Sylvain Munaut 16ec2358a0 fw/rffe/compal: Add support for 850 band
The HW switch supports it.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-05-29 19:51:54 +02:00
Sylvain Munaut 706c3b0db7 fw/trf6151: Use a #define to enable/disable out-of-spec warnings
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-29 19:51:54 +02:00
Sylvain Munaut 4684c75a66 fw/trf6151: Better PLL settings routines
* 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-29 19:51:54 +02:00
Sylvain Munaut a78316c831 fw/rffe: Add function to query RF wiring
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-29 19:51:54 +02:00
Pablo Neira Ayuso 63cca6660f src: use namespace prefix osmo_* for crc16 functions
Summary of changes:

s/crc16_table/osmo_crc16_table/g
s/crc16/osmo_crc16/g
s/crc16_byte/osmo_crc16_byte/g
2011-05-15 17:33:28 +02:00
Pablo Neira Ayuso d3ba2f6037 src: use namespace prefix osmo_timer*
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-15 14:39:30 +02:00
Wolfram Sang a5611f9555 target/boards: add infrastructure for loaders for Mediatek platforms
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-05 09:52:47 +02:00
Wolfram Sang 07589649b1 uart.h: move header out of calypso-directory
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-05 09:52:47 +02:00
Wolfram Sang 832b8b275b cfi_flash: delete unused defines
Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
2011-05-05 09:52:46 +02:00
Wolfram Sang 6b36f7856f lib: move delay.c from calypso to lib
Nothing calypso-related in there and needed for Mediatek, too.

Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
2011-05-05 09:52:46 +02:00
Wolfram Sang a2566d0514 comm: msgb: don't set backlight on error
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>
2011-05-05 09:52:46 +02:00
Wolfram Sang b17fe4d0a1 target/firmware: make build less verbose like the rest of the tree
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>
2011-04-28 10:58:12 +02:00
Pablo Neira Ayuso ade79a0083 src: use new libosmogsm and include/osmocom/[gsm|core] path to headers
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>
2011-04-26 02:55:30 +02:00
Sylvain Munaut d9639bb010 fw/calypso: Add a new driver for the buzzer control
Written-by: Jose Luis Pereira <onaips@gmail.com>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-04-24 19:38:22 +02:00
Andreas Eversberg 937023be6e fw/layer1: Adding TAO loop to correct TPU window offset
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-03-20 14:59:16 +01:00
Steve Markgraf 331641d568 target/fw/dsp: add delay as workaround for dsp_dump
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>
2011-03-19 02:56:25 +01:00
Steve Markgraf df566b6e4a target/fw: correct IO_CNTL_REG name and small cosmetic fixes
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-02-06 17:33:59 +01:00
Steve Markgraf 78345a75d3 firmware: Add support for the Pirelli DP-L10 triband GSM/Wifi phone
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-01-24 16:59:04 +01:00
Steve Markgraf 524de77ac4 fw/app/layer1: unset the inverted attribute of the display after layer1_init()
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>
2011-01-24 16:55:11 +01:00
Steve Markgraf e83f3a9308 fw/board/gta0x: move rffe configuration to board/gta0x
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-01-24 16:54:52 +01:00
Steve Markgraf 8f618a5c49 fw/makefile: enable generation of Compal E86 images (Motorola C139/C140)
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>
2011-01-24 16:54:33 +01:00
Steve Markgraf 0b4155ca19 fw/board/gta0x: remove unused define in RFFE configuration
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-01-24 16:53:47 +01:00
Steve Markgraf f1ac298ff7 fw/board/gta0x: implement TX support for gta0x devices
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-01-24 16:50:21 +01:00
Steve Markgraf cb8b198375 target/fw: set the TRF6151 tsp IDs from the rffe initialization
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-01-24 16:48:56 +01:00
Steve Markgraf b5abcb6970 target/loader: disable bootrom mapping
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>
2011-01-12 19:09:16 +01:00
Sylvain Munaut 9627afc8bb fw/calypso/dsp: Add comment about meaning of bit 11 of ndb->d_tch_mode
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-01-12 15:39:25 +01:00
Steve Markgraf cd918a20aa target/simtest: remove delay functions
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-01-11 20:03:35 +01:00
Thomas Waldmann be9ea273b3 fixed typos in comments
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-01-11 19:53:56 +01:00
Andreas Oberritter 0e130bf467 Fix flash chip detection by using a volatile pointer
* 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>
2011-01-07 23:58:30 +01:00
Steve Markgraf 34bbb12b7a display/st7558: remove delays, since the bug in the i2c driver is fixed
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-01-02 16:54:54 +01:00
Christian Vogel 65b078fa20 Testing for the idle i2c bus was done backwards, we have
to wait for the bit to become 0, not 1.
2011-01-02 16:43:25 +01:00
Steve Markgraf 897b41a90c display/td014: add short delay after initializing uwire
This should fix the initialization of the C139/C140 display

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-01-02 01:36:04 +01:00
Sylvain Munaut 45890fe657 fw/layer1: Resync TCH primitive on mode changes
This is needed for audio to work properly in VEA mode

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-27 16:07:30 +01:00
Holger Hans Peter Freyther b09aaa1e6d stdint.h: Next attempt at making this work with various compilers
Newer GCC with GNU LIBC do not like our minimalistic version of
stdint.h and will have conflicts. Older GCC with older C Libs do
not have a stdint.h yet and the #include_next trick is failing. To
make matters worse NEWLIB does not export its version via the
pre-processor.

We will have to guess once more about the compiler. This code now
assumes that if we have a GCC < 4 that it does not have a stdint.h
and we will not try to include the next stdint.h file.
2010-12-20 21:01:22 +01:00
Harald Welte 9f30c97e4a [mtk] Add initial / unfinished MT6139 driver 2010-12-12 09:47:21 +01:00
Sylvain Munaut e3d7f499e3 fw/layer1: Fix reset of dedicated channel state
Thanks to Alex Badea <vamposdecampos@gmail.com> for pointing
this out.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-28 14:40:08 +01:00
Sylvain Munaut 9c7c75a1c7 fw/layer1: Fix missing include in prim_pm.c
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-24 09:43:11 +01:00
Alex Badea d45476dad9 target uart: remove REG_OFFS() macro side-effect
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>
2010-11-17 23:39:46 +01:00
Alex Badea 4ad8b730a0 target uart: fix preservation of LCR
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>
2010-11-17 23:39:46 +01:00
Sylvain Munaut e801cee46b fw/l1/mframe_sched: Fix the TCH_A entries to include the MF_F_SACCH flag
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-14 17:09:54 +01:00
Sylvain Munaut 87b44798ef fw/layer1: Use dbm2rxlev instead of just '+110' so that overflows are handled
Without this, we would sometime get +143 dBm reported ... which is obviously
false.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-14 17:09:54 +01:00
Harald Welte 7a81d8777a add definitions for sciphone G2 2010-11-09 19:17:48 +01:00
Harald Welte fed69cd4a0 add some header files about MTK GSM related peripherals 2010-11-09 18:19:06 +01:00
Sylvain Munaut 59bc439886 target/fw/dsp: Implement section loading with bootloader
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>
2010-11-07 21:36:32 +01:00
Sylvain Munaut 379608d218 target/fw/dsp: Create a common function to start running code
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-07 21:36:17 +01:00
Sylvain Munaut 00ffd1336e target/fw/l1: Fix TCH/H1 by properly loading the TCH mode during TCH_A task
Altough quite counterintuitive, the TCH_A task does some voice coding
work ... at least during TCH/H subchannel 1 ...

Go figure ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-07 10:34:10 +01:00
Sylvain Munaut 375f41a9dd target/fw/l1: Fix TCH/H by properly scheduling the TCHD task during 'off' slots
Apparently the DSP needs to be run even during the slots without
actual bursts exchange.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-07 10:34:09 +01:00
Andreas.Eversberg 072d7dd4bf target/fw/layer1: Change L1CTL RACH req to properly use all slots
Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-30 17:31:09 +02:00
Steve Markgraf 18dba362c0 target/fw/layer1: correctly initialize afc_retries
Otherwise, when it reached AFC_RETRY_COUNT, no new FB0 tasks
were scheduled, and you needed to restart the phone in order to
successfully sync to a cell

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-10-25 20:59:24 +02:00
Sylvain Munaut 8c9b8f446f target/fw/l23_api: Enable/Disable audio path appropriately
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-25 20:58:32 +02:00
Sylvain Munaut 69c84c45e5 target/fw/l23_api: Properly sync tch in DM EST REQ
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-25 20:58:32 +02:00
Sylvain Munaut f1d942b8f4 target/fw/layer1: Add support for the various TCH multi frame tasks
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-25 20:58:32 +02:00
Sylvain Munaut 76bfbc8193 target/fw/layer1: Add initial version of TCH primitives
The initial bringup is mainly Dieter Spaar's work. I took the
logic and rewrote it, adapting to later scheduler changes and
adding support for several other things (tch_mode, initial HR
support, various cleanup, ...).

Initially-Written-by: Dieter Spaar <spaar@mirider.augusta.de>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-25 20:58:32 +02:00
Sylvain Munaut ba1cef1d23 target/fw/calypso: Fix dsp_load_tch_param to set fn_report for TCH/H
The previous code was only valid for TCH/F ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-25 20:58:31 +02:00
Sylvain Munaut aab5419af0 target/fw/layer1: Store the GSM48 constants in l1s.tch_mode instead of DSP cste
At this point in the code, we don't know if we're TCH/H or TCH/F, so
just store the speech mode and we'll figure out what to tell the DSP
in the task code itself.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-25 20:58:31 +02:00
Sylvain Munaut e35089a6c1 target/fw/layer1: Fix msgb leak when prim_rx is half executed
If the task interrupted because of a reset, an allocated msgb
will be present and we need to free it instead of just loosing
the reference to it.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-25 20:58:31 +02:00
Sylvain Munaut 91d0f4a2eb target/fw/include: Fix missing apc helper declaration
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-25 20:58:31 +02:00
Sylvain Munaut f3d1f64e4e target/fw/layer1: Use common DSP API memcpy instead of repeating code
Also get rid of some early debug print that aren't needed now.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-25 20:58:31 +02:00
Sylvain Munaut e972e1c6b7 target/fw/dsp: Add utility function to memcpy to/from the API
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>
2010-10-25 20:58:31 +02:00
Holger Hans Peter Freyther b504f5c8b8 sercomm.c: Avoid unused variable compiler warning
For the host build the local_irq_save/_restore is a NOOP
and the compiler warns about the unused flags variable. Cast
it to void to avoid compiler warning.
2010-10-03 02:09:35 +08:00
Dieter Spaar 78704ca3fe target/dsp: Add dsp audio initialization
Written-by: Dieter Spaar <spaar@mirider.augusta.de>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-28 08:04:19 +02:00
Dieter Spaar f4bbb30f66 target/dsp: Adjust dsp parameters for TCH FR Codec
Written-by: Dieter Spaar <spaar@mirider.augusta.de>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-28 08:04:19 +02:00
Sylvain Munaut 61fdec01f5 fw/layer1: Process the tch_mode and store it for later use
Currently unused since no TCH support ...
Will be used by future commits.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-28 08:04:19 +02:00
Sylvain Munaut d227b37f12 fw/layer1: Add support for proper meas. report (and use in prim_tx_nb)
Rewritten based on an original patch by Andreas.Eversberg.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-28 08:04:18 +02:00
Andreas.Eversberg 732f102cc2 fw/layer1: Add support for measurement messages from layer2/3
Written-by: Andreas.Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-28 08:04:18 +02:00
Sylvain Munaut 1b6c2593eb fw/layer1: Introduce prim_utils.c for shared helper betwee primitives
Currently only share the idle frame pattern.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-28 08:04:18 +02:00
Sylvain Munaut aef1e05d9a fw/layer1: Introduce prim.h for all primitive related things
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-28 08:04:18 +02:00
Sylvain Munaut f8d372d7e4 fw/layer1: Fix type of p3 in tdma window setup/cleanup sched items
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-28 08:04:18 +02:00
Sylvain Munaut 6c6b073f54 Remove the various checks for high TS as those should now work
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-26 20:05:23 +02:00
Sylvain Munaut 48d3a7ab4c fw/layer1: New TPU window sync method
This is Dieter's sync method adapted to the new TPU stuff.
Not perfect, but should work for TS[0:7] as long as you
leave a free frame between each TS changes ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-26 20:05:23 +02:00
Sylvain Munaut 2400d60d0d fw/layer1: Fix RX TPU window - no TA dependency
Cut & paste errror ... the TA has nothing to do in RX

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-26 20:05:23 +02:00
Sylvain Munaut daa8630468 target/layer1: Implement host-driven Tx power control
It's up to L23 to change the parameters using the appropriate
L1CTL call.

This is a mix between Harald's version and Dieter's version of
the TX control code.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-26 20:05:22 +02:00
Sylvain Munaut 1ca0ce1a5c fw/layer1: Display diff in hwtimer value when lost interrupt is detected
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-26 20:05:22 +02:00
Sylvain Munaut 3cdabae2cf fw/l23_api: Fix cut&paste typo in comment
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 20:52:41 +02:00
Sylvain Munaut df0f386cdb fw/layer1: Properly set/reset ciphering parameters when needed
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 20:52:41 +02:00
Sylvain Munaut 664fa9ae0b fw/dsp: Add function to load dsp ciphering parameters
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 20:52:41 +02:00
Sylvain Munaut 3d5274ed61 fw/layer1: Properly load the tch dsp param (including various fn) in RX
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 20:52:41 +02:00
Sylvain Munaut 890e55e9f7 fw: Update dsl_load_tch_params to set the fn_sid, fn_report and fn_a5
Mix between Dieter's version in tch branch and how the TSM30 does it.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 20:52:41 +02:00
Sylvain Munaut 4f53e169a2 fw: Move channel type/mode definitions in common header
We'll need them later elsewhere than the tx prim

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 20:52:41 +02:00
Sylvain Munaut 54b77bc07e fw & layer23: Remove limitation about the SDCCH subchannel 4..8
This is now supported :)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 20:52:41 +02:00
Sylvain Munaut f0873b81fe fw/layer1: Increase tdma_sched bucket size
We can now have a bunch more stuff scheduled !

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 20:52:40 +02:00
Sylvain Munaut 78fc76cc8f fw/layer1: Add common TPU win setup/cleanup code
Instead of each primitive doing it independently, if there is a TPU
scenario in one of the item, we do a common setup with the base tn
returned by rfch_get_params.

Then each rx / tx window setup is relative to that 'base tn'. For
TX window, you have to explicitely request an offset of 3. (this
would allow for some test code to TX on ts=0 for eg.)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 20:52:40 +02:00
Sylvain Munaut 68c40addf7 fw/layer1: Convert primitives to use common DSP/TPU scenario ending
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 20:52:40 +02:00
Sylvain Munaut e041d5b7d7 fw/layer1: Add some sched items flags to signal DSP & TPU scenarios
If those flags are set in one of the item of the current frame,
we end the tpu & dsp scenario in common code.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 20:52:40 +02:00
Sylvain Munaut 1ba04eb47b fw/layer1: Add a 'flags' field to sched_items and the infra to use it
This is only preparation

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 20:52:40 +02:00
Sylvain Munaut f06d54ed6f fw/layer1: Add a priority field for sched_item
Each item has a priority associated to it. The standard is :
-4    -> Responses processing
-3    -> L1S parameters changes
-2    -> [Reserved for TPU window setup]
-1    -> (anything)
 0..7 -> Commands relative to time slot n
         (relative to current l1s main timeslot)
 8    -> (anything)
 9    -> [Reserved for TPU window cleanup]
10    -> (anthing)

Note that with this modification, an item scheduled for the
current frame from within a call back won't have its priority
respected !

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 20:52:40 +02:00
Sylvain Munaut d7ba30c2a0 layer1: Make rfch_get_params tolerate NULL ptr for unwanted params
If the caller doesn't need some params, just don't give them !

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-14 21:21:43 +02:00
Sylvain Munaut 332b45535a fw/layer1: Use the proper RF params for the burst specific part
We sometime need the RF param of the _burst_ and some time of the
'4-burst' group.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-14 21:21:42 +02:00
Andreas.Eversberg 04ffc9bdc0 [layer1] Fixed memory leak issue after releasing dedicated mode
While releasing dedicated mode, pending SDCCH and SACCH messages need to be
flushed. Without it, it would also cause old pending messages to be sent
during next dedicated mode.
2010-09-14 19:13:36 +00:00
Andreas.Eversberg 59894035c5 [layer1] Fixed double IRQ bug
During IRQ handling, disabling and enabling IRQ may cause the same IRQ to
fire again. This is because the condition for this IRQ may be fullfilled
again, while still handling it. Using local_firq_save() and
local_irq_resore() intead, the IRQ handling will be completed before it is
cleared, and may then fire again.

The problem was detected during process of messages from layer23 to layer1.
In the IRQ context, the TX-functions of l23_api.c are called. There,
messages are queued and events are scheduled. During access to a queue or
a scheduler from any IRQ context or from normal context, interrupts must be
locked to prevent nested calls.

If it is not desired to call l23_api.c inside IRQ context, a message queue
must be used. If a message is written to that queue, it must be locked.
Afterwards a signal must be sent to the main process. The main process
locks the queue and de-queues the message. This is how it is done by all
layer 1 drivers of mISDN.
2010-09-12 13:49:41 +00:00
Andreas.Eversberg 3967b5a1a2 [layer1] Added frequency change control to layer 1 (L1CTL_FREQ_REQ)
The given new frequency set will be used at given frame number.
If the frame number is already reached, the frequency set will be changed
directly.

The functionality has been successfully tested.
2010-09-11 18:10:14 +00:00
Andreas.Eversberg fa686fd4c9 [layer23 / layer1] Added interface for changing crypto mode of DSP
The layer23 will now set crypto mode and key when CIPHERING MODE COMMAND is
received. After crypto mode has been set, CIPHERING MODE COMPLETE is sent.

NOTE: Layer1 implements only the interface, there is no functionality to it
yet.
2010-09-11 12:10:31 +00:00
Ingo Albrecht dcc3a41036 ui: Some experimental code snippets i cobbled together several months ago. 2010-09-01 21:24:34 +02:00
Ingo Albrecht ff7ce383a1 loader: convert to kernel style 2010-08-17 00:24:45 +02:00
Harald Welte df3c7a9c99 Merge remote branch 'origin/sylvain/pending' 2010-07-29 11:10:09 +02:00
Sylvain Munaut c382fbf943 include: Rename l1a_l23_interface.h to l1ctl_proto.h
The interface between l1 and upper layer is called by several
name. IMHO l1ctl is shorted and sounds good so try to unify
using that.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-27 20:51:29 +02:00
Sylvain Munaut a4b1b1bcc1 layer1/l23_api: Fix the L3_MSG_SIZE to include l1ctl header size
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-27 20:51:14 +02:00
Sylvain Munaut b2bc4dcb59 fw/rf: Use printd for the trf6151_set_gain debug message
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-25 10:18:56 +02:00
Steve Markgraf d42f73a1ff [firmware] bring back gta0x images
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-07-23 18:11:25 +02:00
Ingo Albrecht 0dde40f462 flash: corrected coding style 2010-07-22 04:43:11 +02:00
Steve Markgraf 0cfa309dea [display] add driver for the Toppoly TD014, as used in the C139/C140
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-07-20 14:41:21 +02:00
Steve Markgraf b05847960a [apps] add chainloading application
It does nothing more than jumping to the Calypso romloader.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-07-20 14:41:21 +02:00
Ingo Albrecht 58e8f9e5b0 firmware: moved cfi_flash header to flash subdirectory 2010-07-20 14:41:21 +02:00
Ingo Albrecht 5182fff914 firmware: small makefile reorg 2010-07-20 14:41:21 +02:00
Ingo Albrecht 5305fad710 firmware: fixed irq-less keypad support 2010-07-20 14:41:21 +02:00
Ingo Albrecht 05863eef93 firmware: moved dead-brain-flags to primary makefile 2010-07-20 14:41:21 +02:00
Ingo Albrecht bc65d6905d loader: meaner. now supports address ranges for all relevant flash operations. reports better. 2010-07-20 14:41:21 +02:00
Ingo Albrecht ccb9d9e36a firmware: e88 flash linkage 2010-07-20 14:41:21 +02:00
Ingo Albrecht 3f891b75c6 firmware: better flash protection 2010-07-20 14:41:21 +02:00
Ingo Albrecht 23359954b9 firmware: some documentation about memory maps and linkage 2010-07-20 14:41:21 +02:00
Ingo Albrecht 48298d17fe firmware: gave all apps a proper hello message and let them print their git revision 2010-07-20 14:41:21 +02:00
Ingo Albrecht 80858f0ca0 firmware: fixed linker script title 2010-07-20 14:41:20 +02:00
Ingo Albrecht 46a9f98bf9 firmware: new highram linkage 2010-07-20 14:41:20 +02:00
Ingo Albrecht 1ad5036c0e firmware: fixed linkage of ctors and dtors for ram images 2010-07-20 14:41:20 +02:00
Ingo Albrecht f624168172 firmware: fixed linkage of ctors and dtors for flash images 2010-07-20 14:41:20 +02:00
Ingo Albrecht bb886b7f28 firmware: untabify linker scripts. 2010-07-20 14:41:20 +02:00
Ingo Albrecht f866a96f85 firmware: added missing init calls 2010-07-20 14:41:20 +02:00
Ingo Albrecht dd6522d1f4 firmware: fixed ctor linkage 2010-07-20 14:41:20 +02:00
Ingo Albrecht 72dc56e2e2 firmware: board init with a ctor does not seem a good idea to me because i need binaries without board init 2010-07-20 14:41:20 +02:00
Ingo Albrecht 45b509e0a5 firmware: Fixed binary dependencies. 2010-07-20 14:41:20 +02:00
Ingo Albrecht 78e8ed6b29 firmware: fixed map file builds 2010-07-20 14:41:20 +02:00
Ingo Albrecht 84bf508de2 firmware: removed obsolete comment 2010-07-20 14:41:20 +02:00
Ingo Albrecht 25f671a023 firmware: warning fixes 2010-07-20 14:41:20 +02:00
Ingo Albrecht f871b070ff loader: commented startup behaviour 2010-07-20 14:41:20 +02:00
Ingo Albrecht 455359cce7 firmware: removed flash safety hack 2010-07-20 14:41:20 +02:00
Ingo Albrecht 7c33250e5b firmware: compile-time define for flash write support 2010-07-20 14:41:20 +02:00
Ingo Albrecht 25dce33951 firmware: non-asm backlight init 2010-07-20 14:41:20 +02:00
Ingo Albrecht 0eeb05e3ac firmware: proper exception redirect 2010-07-20 14:41:20 +02:00
Ingo Albrecht 8aa4d22f55 firmware: fixed and commented backlight driver 2010-07-20 14:41:20 +02:00
Ingo Albrecht 277dbe825b flash: disable all printing. needed because strings can end up in flash. 2010-07-20 14:41:20 +02:00
Ingo Albrecht 41137ab3e5 firmware: establish a ramtext section for code that must be in ram 2010-07-20 14:41:20 +02:00
Ingo Albrecht 284c89a7f8 firmware: flash programming 2010-07-20 14:41:20 +02:00
Ingo Albrecht 55d8a53a0d flash: verify source buffer alignment when programming. allow flashing first sector. 2010-07-20 14:41:20 +02:00
Ingo Albrecht 8c2f9180fb firmware: consider reserved ram in loader linkage 2010-07-20 14:41:20 +02:00
Ingo Albrecht 02d57bfcf9 firmware: modularized startup code 2010-07-20 14:41:19 +02:00
Ingo Albrecht 3f998d80eb firmware: separated various pieces of interrupt handling apart 2010-07-20 14:41:19 +02:00
Ingo Albrecht 0068f87c1f firmware: linker script and startup code reorg. 2010-07-20 14:41:19 +02:00
Ingo Albrecht 3936c397a7 loader: flash locking commands, various flash rework 2010-07-20 14:41:19 +02:00
Ingo Albrecht d602dcaafb firmware: removed compal header strings temporarily. 2010-07-20 14:41:19 +02:00
Ingo Albrecht 9628050edb firmware: removed old compal_dump. 2010-07-20 14:41:19 +02:00
Ingo Albrecht e9b639ca87 firmware: cleaned up init files. 2010-07-20 14:41:19 +02:00
Ingo Albrecht e258b5db79 firmware: linker script for flashed app on e88. 2010-07-20 14:41:19 +02:00
Ingo Albrecht d25e7b135a flash: fixed up header 2010-07-20 14:41:19 +02:00
Ingo Albrecht f0f2dc81ee loader: incomplete crc support and query timeouts 2010-07-20 14:41:19 +02:00
Ingo Albrecht 154ff9e53a loader: removed cruft 2010-07-20 14:41:19 +02:00
Ingo Albrecht fc91eaf8c6 firmware: fix build with new manifest 2010-07-20 14:41:19 +02:00
Ingo Albrecht 42984320de loader: reply dump mode. additional information in init reply. 2010-07-20 14:41:19 +02:00
Ingo Albrecht 750c49b946 loader: re-enabled firmware entry commands 2010-07-20 14:41:19 +02:00
Ingo Albrecht 311847997f osmoload: Added a jump command. 2010-07-20 14:41:19 +02:00
Ingo Albrecht 5261370562 Loader with memory read/write and various lifecycle operations. 2010-07-20 14:41:19 +02:00
Harald Welte 7b89bb8a84 [firmware] TRF6151: fix VGA gain calculation bug
We've had two sets of TRF6151 GAIN related #defines which were used
in an incorrect manner, resulting in a vga_gain of 60, which is
outside of the allowed gain range.

Thanks to Dieter Spaar for spotting this bug
2010-07-19 14:24:46 +02:00
Andreas.Eversberg 8d2ed53b45 [calypso] Rework of keypad interrupt handler.
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.
2010-07-18 12:56:48 +00:00
Ingo Albrecht 1c8c9b8cfd firmware: sim controller driver by dexter 2010-07-15 21:41:29 +02:00
Sylvain Munaut 7d84bf5e38 layer1: Fix DM_REL_REQ to release all dedicated state
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-15 16:43:54 +02:00
Steve Markgraf e38416a8d0 cleanup duplicated delay functions
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-07-15 13:50:56 +02:00
Harald Welte fa899ddf58 [Layer1] Allow for some jitter in TDMA lost interrupt detection
The need for this has been pointed out by Sylvain...
2010-07-15 10:32:44 +02:00
Andreas.Eversberg c6ff4723ce [layer 1] L1CTL_PARAM_REQ is introduced to change TX power and TA.
Currently only TA (timing advance) is supported. It ranges from -128 to 128.
2010-07-13 14:07:37 +00:00
Andreas.Eversberg 9a422ceb25 [layer 1] Reset option for scheduled frames.
This is usefull to drop a scheduled RACH request after an IMM.ASS is
received.
2010-07-13 14:03:13 +00:00
Andreas.Eversberg 0719e9ac7d [layer1] Added mf_off to shedule next RACH request.
The mf_off value defines the offset of multiframes.
2010-07-13 13:58:41 +00:00
Sylvain Munaut 08aa1e7615 layer1/l23_api: Use the fn51 given in the l1a_rach_req
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-28 23:13:12 +02:00
Sylvain Munaut 2d843b8be1 layer1/l2a_api: Update DM EST REQ limitations
Try to be more precise about what's supported and what's not

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-28 21:40:01 +02:00
Sylvain Munaut 1453c43202 layer1/tpu_window: Add experimental support for TS != 0
This is flawed, but allows testing ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-28 21:40:01 +02:00
Sylvain Munaut 802637bf9b fw/layer1: Add hopping support in rfch utils.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-28 21:40:01 +02:00
Andreas.Eversberg 41cb84c676 [layer1] TX should be disabled by default. 2010-06-27 00:04:04 +00:00
Andreas.Eversberg 4e03d6f822 [layer23] Fixed DM est./release for current supported channel types.
Now layer23 supports selecting TS 0-4 with SDCCH/8 channels.
But some tests showed me that it doesn't work. Please help debugging.

Added DM release function to l1ctl.c and gsm48_rr.c.
2010-06-26 09:35:27 +00:00
Harald Welte 0d0c9e8f5b [layer1] set RF frontend gain during power measurement
also add some debug messages
2010-06-25 23:55:09 +02:00
Harald Welte d919186ca4 [l1ctl] add dedicated mode release request 2010-06-25 18:00:16 +02:00
Harald Welte 149376dd92 [layer1] fix AGC computation (dbm vs. dbm8 mistakes)
Also, separate the rx window function from the AGC LNA value computation
2010-06-25 17:40:10 +02:00
Harald Welte b647b4be79 [layer1] correctly compute dBm input level for RX normal burst 2010-06-25 17:38:46 +02:00
Harald Welte 207c3a6c2c [layer1] remove superfluous rx_window call
The prim_fbsb code internally will set up the right arfcn/window,
so there is no need to repeat it.
2010-06-25 16:54:02 +02:00
Harald Welte 542086b200 [layer1] Activate AGC implementation
The target input level at the ABB ADC / DSP baseband downlink path
is just an estimate and might have to change
2010-06-25 16:39:01 +02:00
Harald Welte 028dcd9e25 [layer1] An actual AGC implementation
We introduce trf6151_compute_gain() to compute the gain setting that
leads to the ideal analog baseband power input level.

This function is called from rffe_set_gain() for both the compal and
the gta0x rf frontend, as there are no other amplifiers inside those
phone designs.

The new AGC function is not used yet from the regular layer1 code.
2010-06-25 13:39:58 +02:00
Harald Welte 52ef5a78ee [layer1] Power Measurement updates
Instead of using the 'normal burst' receive window, use the proper
RXWIN_PW for power measurements. However, in this case, one PW window
corresponds to one PM measurement and in order to do two measurements,
multiple PW windows need to be set-up in the TPU.  Since we don't support
that yet, we simply switch to doing only one power measurement for now.
2010-06-25 10:38:33 +02:00
Harald Welte bc860c43c2 [layer23] use the TSC that is passed from L1 when going in dedicated mode 2010-06-24 18:57:28 +02:00
Sylvain Munaut 39a6b56f88 fw/layer1: Add some RFCH utilities to get channel parameters
This allows to easily get the tsc/timeslot/arfcn we need to
use to the rx/tx of a burst.

Using this also sets properly the TSC and ARFCN now !

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-24 18:57:28 +02:00
Sylvain Munaut f92038e7c0 layer1: Introduce a decicated channel state in l1s
We also make sure to set it properly during a DED EST REQ.
The state is currently unused tough.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-24 18:57:28 +02:00
Sylvain Munaut 16cd41e809 l1a_l23_interface: Update DM EST REQ format
We include all the parameters we're gonna need to support
TS!=0, hopping, TSC, ...

We also assume the upper layer have decoded the low level
bit fields and gives us neat accessible variables and a
sorted ARFCN array for the Mobile Allocation

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-24 18:57:28 +02:00
Harald Welte ef81bf80e1 [firmware] move board_init() to a gcc-type constructor
Instead of calling board_init() from every main() function explicitly,
we simply mark it as a constructor and have it called automagically
2010-06-24 18:03:08 +02:00
Harald Welte 93db95712e [firmware] make sure the .ctor sections are preserved during --gc-sections
--gc-sections throws away any symbol that is not referenced from
either the entry symbol or explicit KEEP statements in the linker script.

We add KEEP() to make sure the constructors are kept.
2010-06-24 17:52:05 +02:00
Harald Welte 8c1f25e627 [firmware] fix code that iterates over constructors
the first element after __CTORS_LIST__ contains the number of constructor
callbacks in the following array, so we have to skip it.
2010-06-24 17:10:46 +02:00
Harald Welte 806da1525b [layer1] use __attribute__ ((constructor)) for completion initializers 2010-06-24 13:30:56 +02:00
Harald Welte 7419d6559f [firmware] Add support for __attribute__ ((constructor))
We modify the linker scripts to include the .ctors and .dtors sections
and add some code to actually call them before we jump to the main()
function.
2010-06-24 11:46:47 +02:00
Sylvain Munaut 15c584ef62 fw/layer1/l23_api: Process each message in a function
Instead of processing directly in the switch, we put
real ..._rx_... functions to make things clearer.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-22 06:37:09 +02:00
Sylvain Munaut 5d253a2828 fw/layer1: Fix compiler warning about mismatched ptr types
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-22 06:37:09 +02:00
Sylvain Munaut 38c6b4b35a fw/layer1: Add support CCCH combined/non-combined
We introduce the concept of CCCH mode. It can be either
 - NONE: receive BCCCH only
 - COMBINED: CCCH on a BCCH/CCCH+SDDCH/4
 - NON_COMBINED: CCCH on a BCCH/CCCH

There is also a new command to change the mode without having
to do the resync.

Currently, we keep the previous default behavior of requesting
a combined CCCH by default

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-22 06:37:09 +02:00
Sylvain Munaut f2190983c8 fw/layer1: When resetting hw, reset both SYNCHRO & OFFSET to l1s.tpu_offset
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-22 06:36:18 +02:00
Harald Welte 9a44046765 [layer1] add missing break statment at end of switch() 2010-06-20 19:43:57 +02:00