Commit Graph

323 Commits

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