summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/comm
AgeCommit message (Collapse)AuthorFilesLines
2012-02-12firmware: add missing includesSteve Markgraf1-0/+1
This fixes all 'implicit-function-declaration'-warnings. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-02-07firmware/timer: Added HZ as global defintion for jiffies per secondAndreas Eversberg1-5/+3
2012-01-29timers: comply with timer rename in libosmocoreHarald Welte1-11/+11
libosmocore has prefixed the timer functions with omso_* already in May 2011 (0b21c1c8850d7f33f55d9399d14055a7cdda3614), and we follow suit here for API consistency reasons.
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-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-15src: use namespace prefix osmo_timer*Pablo Neira Ayuso1-8/+8
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-05uart.h: move header out of calypso-directoryWolfram Sang2-2/+2
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-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>
2011-04-26src: use new libosmogsm and include/osmocom/[gsm|core] path to headersPablo Neira Ayuso4-5/+5
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-01-11fixed typos in commentsThomas Waldmann1-3/+3
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-10-03sercomm.c: Avoid unused variable compiler warningHolger Hans Peter Freyther1-2/+2
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-07-18[calypso] Rework of keypad interrupt handler.Andreas.Eversberg1-0/+4
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-04-24sercomm: implemented a trivial echo dlci.Ingo Albrecht1-0/+3
2010-03-27sercomm: ESCAPE every NUL (0x00) byte in the data streamHarald Welte1-1/+2
For some reason, at least on the C123, a sequence of multiple NUL bytes seems to get corrupted somewhere in the Rx side on the phone itself (the NUL plus the following character get dropped). We now simply work around this issue by having our sercomm/HDLC layer escape all NUL octets in the stream.
2010-03-27sercomm: Fix ESCAPE'd character at end of bufferHarald Welte1-8/+15
If we're transmitting a to-be-escaped character as the last byte of the buffer, the code generated the sequence ESCAPE FLAG rather than ESCAPE last_byte FLAG. This fixes the bug.
2010-03-27sercomm: avoid overflow of sercomm msgb on PC RX sideHarald Welte1-1/+2
2010-03-08Fix some compiler warnings...Holger Hans Peter Freyther1-0/+1
Some real issues are still left and we need to act on them.
2010-03-07start to use libosmocore within the firmwareHarald Welte4-63/+8
* remove linuxlist.h copy and use osmocore * don't put 'struct gsm_time' into l1ctl packets * include rx_level and snr for each burst in l1ctl * properly build libosmocore.a for target * move gsmtime functions into libosmocore * move ctype.h to standard location
2010-03-07actually link against libosmocore for the targetHarald Welte1-1/+1
2010-03-07New build system.Ingo Albrecht1-24/+3
2010-03-07add 'struct timer_list' timer code similar to linux + OpenBSCHarald Welte2-1/+214
We now support arbitrary timers by means of 'struct timer_list'. Any part of the program can register such a callback by means of schedule_timer() on a millisecond-granularity. However, there is no guarantee on the timer precision. It will not execute before the timer expires - but it might expire quite a bit later than we have asked it for, depending on how busy the cpu is with other work. The timer code is in the 'comm/' directory, as it is intended to be migrated into libosmocore soon. Furthermore, as we currently don't yet have a scheduler or tasks, the main() routine explicitly has to call update_timers() to check for any expired timers and run them.
2010-03-07sercomm: prevent DLCI array overflowHarald Welte1-3/+5
2010-03-07don't include trailing \0 termination in cons_puts()Harald Welte1-1/+1
successive calls to cons_puts() writing to the same msgb resulted in osmcoom printing null-characters while writing strings. We don't really need that...
2010-03-02Inter-Layer intergration workHarald Welte1-1/+1
L1 and L2 now pass UI frames like BCCH and CCCH downlink up into L3, which detects an IMMediate ASSignment command and instructs the L1 to switch to SDCCH/4. From this point on, SDCCH/4 and SACCH4/C messages end up in our L2 LAPDm implementation and are forwarded to L3.
2010-03-01SERCOMM: make sure to disable IRQ/FIQ to avoid race conditionsHarald Welte2-1/+31
2010-02-28ensure we always have 256bytes net data size, excluding 4 bytes headroomHarald Welte1-1/+1
2010-02-23comm/msgb.c: Style cleanup in initializationSylvain Munaut1-12/+6
Don't assign the same var twice & init all from the same source. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-02-21sercomm: busy-wait in case we cannot allocate a msgb right nowHarald Welte1-10/+10
2010-02-21sercomm_cons: Utilize msgb's better, don't always end at \nHarald Welte1-2/+5
In the sercomm_cons layer, ee used to enqueue a msgb for sending every time there is an end-of-line. However, if we send a number of very short lines, we easily run out of msgbs. Now we check how much msgb backlog there is in the transmit queue, and decide to skip the end-of-line flushing if needed. This still doesn't solve all our problems, but its still a useful mechanism.
2010-02-20build of osmocon using libosmocoreHarald Welte1-1/+1
2010-02-18Initial import of OsmocomBB into git repositoryHarald Welte4-0/+530