Commit Graph

366 Commits

Author SHA1 Message Date
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