Commit Graph

106 Commits

Author SHA1 Message Date
Girts Folkmanis
a74d56b9a2 [dev/gpio_i2c] add optional pullups
If GPIO_I2C_PULLUPS == 1, enables pullups when not actively
driving I2C lines low.
2016-09-30 10:36:57 -07:00
klemens
d0b90c2d68 [spelling] spelling-fixes. (not external/) 2016-08-25 17:30:34 -07:00
cstout
0f0b4959ad Stub display_present
R=gkalsi@google.com

Review URL: https://codereview.chromium.org/1951403002 .
2016-05-05 12:54:06 -07:00
Gurjant Kalsi
ce0a3db705 [cdcserial][usb] Add a CDC-Serial USB Class Driver. 2016-04-18 17:03:04 -07:00
Gurjant Kalsi
1fa7f2c977 [usb] Allow client code to specify USB endpoint type. 2016-03-28 21:21:21 -07:00
cstout
c1255f7f47 [display] Refactor to avoid implicit framebuffer allocation.
Preparation to allow other images to be presented to the display.
Separate definitions of display and image formats.
display_get_info no longer provides a framebuffer.
display_get_framebuffer allocates a framebuffer for convenience.

Review URL: https://codereview.chromium.org/1777783003 .
2016-03-10 09:49:22 -08:00
Travis Geiselbrecht
a4ca0a6e00 [vmm] move most users of arch_mmu_query directly to vaddr_to_paddr() 2016-02-14 12:45:53 -08:00
Travis Geiselbrecht
d569c090ea [vim] remove vim expandtab comments on most of the files 2016-02-14 12:32:07 -08:00
Travis Geiselbrecht
2eb32a4369 [style] mass reformat all the non external code to 4 space indents
Ran everything through scripts/codestyle.space, which uses astyle
to generally follow K&R style.

Biggest non whitespace change is pulling brackets down on function
declarations, which I'm pretty ambivalent about, but astyle insists
on taking a stance
2016-02-14 12:24:01 -08:00
Travis Geiselbrecht
e35c51576c [dev][pmic][twl4030] old pmic driver used by the omap3 platform 2016-02-14 11:47:54 -08:00
Travis Geiselbrecht
1da5eba728 [dev][usb] add bulktest class driver
A simple test driver that just acts as a bulk transfer source and sink.
2016-02-08 19:53:03 -08:00
Travis Geiselbrecht
4ab14424bd [cppcheck] clean up a few suggestions from cppcheck 2015-11-24 15:08:38 -08:00
Travis Geiselbrecht
902ca64791 [dev][usb] allow anyone to register for callback events from the usb stack 2015-11-19 15:07:58 -08:00
Travis Geiselbrecht
b83c233f4d [dev][usb] reformat usb device stack to spaces 2015-11-19 14:51:51 -08:00
Travis Geiselbrecht
491e47fbc6 [linker] align special sections on native pointer bounary
This fixes a bug in x86-64 where it was trying to default align
input sections on 16 byte boundaries, which was screwing up the
padding between structures.
2015-11-06 12:00:04 -08:00
Gurjant Kalsi
3ec7c378c8 [virtio] Virtio read/write block return 0 on success instead of number of bytes transferred 2015-11-05 11:00:53 -08:00
Gurjant Kalsi
7e0a4d3f90 [bio] Add a flag that allows devices to declare that they only deal with cache aligned blocks of memory 2015-11-04 17:18:15 -08:00
Travis Geiselbrecht
c2a28f8c39 [dev][virtio] fix warning in virtio-block code 2015-10-28 11:04:39 -07:00
Travis Geiselbrecht
114a350e55 [linker] align all the special sections on 8 byte boundaries, remove x86-64 hack
A bit overkill for 32bit machines, but aligning all the special data structures
on 8 byte boundaries removes any special case for 64bit machines.
2015-10-26 17:01:34 -07:00
Travis Geiselbrecht
0e1ce411ba [make] add ability to set EXTRA_LINKER_SCRIPTS in modules
This allows for individual modules to extend the main linker script,
primarily to add their own sections to interate over.
Remove the main shared_* linker scripts.
2015-10-26 16:47:18 -07:00
Travis Geiselbrecht
3b2d7a268b [make] remove the need for a module to manually add $(LOCAL_DIR)/include to the global include path
Pretty much every module in the system was already doing it, so do it
automatically.
2015-10-19 19:07:16 -07:00
Travis Geiselbrecht
4e0b62745c [dev][virtio-gpu] fail if cannot allocate enough memory for framebuffer
Also print framebuffer location and size.
2015-10-16 16:09:08 -07:00
Travis Geiselbrecht
8834b12f97 [dev][net][pcnet] break pcnet driver out of pc plaform into its own dir 2015-10-11 12:04:44 -07:00
Travis Geiselbrecht
c7ce0b9361 [lib][display] update display_get_info to return success/failure
Update all the users to check for error.
2015-10-08 15:54:40 -07:00
Travis Geiselbrecht
555f16c5c7 [dev][virtio][gpu] add default implementation of virtio-gpu driver
Exports a simple single buffered framebuffer.
2015-10-07 15:44:00 -07:00
Travis Geiselbrecht
c17ed4295b [dev][virtio][block] handle scatter gathered reads/writes 2015-09-21 20:21:16 -07:00
M1cha
8e0afb2b5e [arch][or1k] get working after SMP changes 2015-09-20 18:20:22 -07:00
Travis Geiselbrecht
caec70a21b [dev][arm_gic] fix warning in arm64 by adding arm/arm64 specific iframe code
It's all in service of a LTRACEF, but it's one I use commonly enough to debug
stuff that it's probably worth it. No actual overhead, except what's already
in the first level handlers.
2015-09-20 14:05:31 -07:00
Travis Geiselbrecht
215b5ed07f [64bit] fix a few more 64bit warnings in newer code 2015-09-20 13:11:51 -07:00
Travis Geiselbrecht
cff470ffdd [dev][virtio][net] update to new pktbuf structure 2015-09-16 19:41:11 -07:00
Gurjant Kalsi
a6c8b005db [console] Use STATIC_COMMAND macro for all console command definitions
BUG=

Review URL: https://codereview.chromium.org/1348403002 .
2015-09-16 15:37:33 -07:00
Travis Geiselbrecht
ba3d7ce316 [dev][virtio] remove arm specific header 2015-09-11 17:41:29 -07:00
Travis Geiselbrecht
3d31579fe0 [dev][virtio][net] dump feature bits on detection 2015-09-10 13:59:56 -07:00
Travis Geiselbrecht
ddb7e7f72f [dev][virtio][net] avoid copy in send path, deal with rx size violations better 2015-09-10 13:43:35 -07:00
Travis Geiselbrecht
193a57d5d5 [dev][virtio][net] add working implementation of a virtio network interface
-Not optimized yet, but should be pretty complete. Tested against qemu.
-Add switches to qemu script to allow running with a tap interface.
-Enable minip by default on vexpress-a9 platform
2015-09-09 15:41:32 -07:00
Travis Geiselbrecht
e0bca35bd3 [dev][virtio] handle multiple rings (up to 4 currently) per device 2015-09-08 17:59:10 -07:00
Travis Geiselbrecht
579b3314e7 [virtio][block] get the virtio block device driver fully working
Wire up to the bio layer properly.
2015-09-08 16:15:01 -07:00
Travis Geiselbrecht
586fe3d831 [include][trace] move LTRACEF_LEVEL out of timer code into generic header
Seems useful enough.
2015-06-02 21:11:51 -07:00
Travis Geiselbrecht
842cb7a7ae [warnings] fix warnings post-smp
Most of the warnings are printf related due to lk_time_t now being defined as an
unsigned int instead of unsigned long.
2015-06-02 21:03:05 -07:00
Travis Geiselbrecht
96ba54f187 [merge] merge back from smp branch 2015-05-28 12:52:41 -07:00
John Grossman
9fd7aede55 [i2c] Add a generic bit-banged i2c implementation.
Change-Id: I3bf9b2022342e4452c525dca940ca46088b27445
Signed-off-by: John Grossman <johngro@google.com>
2015-05-19 16:31:15 -07:00
Arve Hjønnevåg
2c9c5959e7 Merge branch 'master' of https://github.com/travisg/lk into smp
Change-Id: Iecb11d57b6f089234c0826932bdb229588939750
2015-05-18 16:49:37 -07:00
Arve Hjønnevåg
c027dbd0d4 [dev][interrupt][arm_gic] Fix fiq code to get cpu number from arch_curr_cpu_num
Fixes fiq support on multicluster systems.

Change-Id: If19a78b580eec79b7194ea511f0dcd22bc18fd83
2015-05-13 20:21:07 -07:00
Arve Hjønnevåg
47e06a3f34 [dev][interrupt][arm_gic] Call sm_handle_fiq from platform_fiq
If WITH_LIB_SM is set, call sm_handle_fiq instead of sm_handle_irq
from platform_fiq. This is needed to allow sm_handle_irq to wake up
a thread instead of switching back to ns from the interrupt handler.

Change-Id: Idc728343bc31c07a3149d68730bd57ee28be08f8
2015-05-13 18:08:45 -07:00
Arve Hjønnevåg
5177e5ba40 [dev][interrupt][arm_gic] Enable ns interrupts if WITH_LIB_SM is set
Change-Id: I436b81fe12a969f745ab20cf97500aed1e6f77f7
2015-05-13 18:08:45 -07:00
Arve Hjønnevåg
03d68ec2ae [dev][interrupt][arm_gic] Add trace printf for irq numbers returned to ns
Change-Id: I834ea1861e09edc770f081253a34364e3a8eaeba
2015-05-13 18:08:45 -07:00
Travis Geiselbrecht
94cf843de1 [dev][cache][pl310] add routine to pin cache lines in the L2
NOTE: assumes the LOCK_LINE_EN feature is present.
2015-04-21 15:17:08 -07:00
Christopher Anderson
fe156ef67c [gpio] Add dev/gpio module for console gpio control 2015-04-03 14:01:55 -07:00
Travis Geiselbrecht
f0fad1590b [init][smp] have secondary init run in arch code up to threading, and complete in secondary thread
-move the per-cpu initialization of the gic and cortex-a9 timer into an init hook.
  This removes the hard coded call in arm/arch.c
-make sure the timer initialization happens in the pre-threading callback, in case
  a secondary init hook needs the timer.
2015-03-27 14:14:12 -07:00
Travis Geiselbrecht
ccb073b98b [dev][arm_gic] call the appropriate init routine for secondary cpus coming out of resume 2015-03-27 13:33:58 -07:00