Commit Graph

27 Commits

Author SHA1 Message Date
Travis Geiselbrecht
445f3e4ee7 [platform/target][warnings] fix -Wmissing-declarations warnings in platform/ and target/
Mostly driver code in various platforms. There are still some warnings
in this part of the tree in lesser-used platforms.
2021-10-21 23:18:09 -07:00
Travis Geiselbrecht
4edb93adde [lib][console] rename some console command types to be prefixed with console_
Some of the structures, notably 'cmd', in the lib console stuff are a
little too generically named and have collided with some other code
so prefix the names a bit more cleanly with console_

The change is largely mechanical, and folks with out of tree code can
easily switch by renaming:
cmd -> console_cmd
cmd_args -> console_cmd_args
cmd_block -> console_cmd_block
console_cmd -> console_cmd_func

Apologies if this breaks you but it should be pretty easy to fix.
2020-07-25 15:59:58 -07:00
Travis Geiselbrecht
6cb02526b7 [include][console] split lib/console.h into two
TL;DR most uses of lib/console.h -> lk/console_cmd.h

Move the part that lets a piece of code somewhere in the system to
define a console command from the actual lib/console api to start an
instance of the console. Move in almost every place the user of the
console command definition to the new header, lk/console_cmd.h which is
always in the include path.

Also remove most uses of testing for WITH_LIB_CONSOLE since you can
almost always just safely define it and then let the linker remove it.
2019-07-13 16:56:33 -07:00
Travis Geiselbrecht
cba9e47987 [license] replace the longer full MIT license with a shorter one
Used scripts/replacelic. Everything seems to build fine.
2019-07-05 17:22:23 -07:00
Travis Geiselbrecht
d8fa82cb91 [formatting] run everything through codestyle
Almost nothing changes here except moving braces to the same line as the
function declaration. Everything else is largely whitespace changes and
a few dangling files with tab indents.

See scripts/codestyle
2019-06-19 21:02:24 -07:00
Travis Geiselbrecht
1b7a28efb8 [include][lk] fixup lk/ include path move 2019-06-19 19:46:11 -07:00
klemens
d0b90c2d68 [spelling] spelling-fixes. (not external/) 2016-08-25 17:30:34 -07: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
Gurjant Kalsi
d9a97e7c0d [bio][flash] Added bio ioctl to return memory mapped address without putting the device into linear mode 2015-11-11 15:31:54 -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
38f20ec0a1 [lib][console] add pointer type arg, switch some users to it.
Patch courtesy Erik Corry
2015-10-19 12:49:20 -07:00
Travis Geiselbrecht
39662cace8 [platform][zynq] fix build after bio changes 2015-10-12 01:00:02 -07:00
Travis Geiselbrecht
fab3ea81be [lib][bio] bio devices can report what their erase state is
-tweak the bio test to use it
-tweak a few drivers to set the non default (0x00 is default)
2015-10-11 18:10:17 -07:00
John Grossman
8a7219ddb1 [lib][bio] Add erase geometry to lib/bio
Extend the block i/o system to allow registered devices to advertise
an erase geometry.  Devices which do not need to be explicitly erased
may skip this.  Extent the Zynq spiflash code to publish the erase
geometry as read from the flash device.

Signed-off-by: John Grossman <johngro@google.com>
Change-Id: I42e16fbe9a0fcf8334c317f16dea1c551c203eb2
2015-06-29 17:32:10 -07:00
Travis Geiselbrecht
5b830de81f [zynq-common] squelch a little bit of debug spew when compiling at lower debug levels 2015-05-02 22:48:57 -07:00
Travis Geiselbrecht
80b3d58178 [platform][zynq] remove some extraneous debug commands at lower debug levels
Change-Id: Ib29b125d393090978f6bab32779edb934201a902
2015-04-24 15:53:55 -07:00
Travis Geiselbrecht
68f935e613 [platform][zynq] add support for putting the qspi peripheral in linear mode 2014-12-11 19:25:29 -08:00
Travis Geiselbrecht
1baac2f315 [zynq][spiflash] wait a bit before rereading cr1 register
Change-Id: Ie791fb689f9c2bac9127ae27ac3a83274f67755a
2014-10-15 18:13:24 -07:00
Travis Geiselbrecht
0b9a33463f [zynq][spiflash] write enable before using the cr1 write routine
Change-Id: Id3dbffee2438bfca3208884b4a46cffeb79eccf2
2014-10-15 18:10:04 -07:00
Travis Geiselbrecht
a88d310855 [platform][zynq] detect flash in single spi mode and add command to set qspi mode
Change-Id: I3d0ea403c79f9b7a8c34c9f871e97bd728b46d7f
2014-10-13 19:08:22 -07:00
Travis Geiselbrecht
c833c9974d [platform][zynq] quiet the flash driver 2014-07-23 15:22:12 -07:00
Travis Geiselbrecht
15839a9ae2 [platform][zynq] fix bug in spiflash erase routine
Forgot to bump offset counter.
2014-07-22 19:52:18 -07:00
Travis Geiselbrecht
2213104ed4 [platform][zynq] fix a bug in speed setting on qspi peripheral 2014-07-22 19:52:18 -07:00
Travis Geiselbrecht
0e0a0f1fac [platform][zynq][spiflash] read the random number out of the OTP area and add it to the random pool 2014-07-16 16:33:51 -07:00
Travis Geiselbrecht
a1e7eb5332 [platform][zynq] wire up spiflash driver to the block io layer 2014-07-15 20:09:08 -07:00
Travis Geiselbrecht
bcebb0861a [platform][zynq] refactor qspi into two layers 2014-07-15 20:09:08 -07:00