9
0
Fork 0
Commit Graph

14 Commits

Author SHA1 Message Date
Sascha Hauer 4dda27ce49 block: Collect block devices on list
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-30 10:18:39 +02:00
Sascha Hauer c7848ffee2 block: shortcut writebuffer_flush if writing is disabled
Saves a few bytes of binary space.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-22 11:49:01 +02:00
Sascha Hauer e82e40523f block: implement block_read/block_write functions
Some drivers use blk->ops->read/write. This bypasses the caching block
layer and was never intended like this. The upper API to the block layer
is the cdev layer. This patch adds block_read and block_write functions
and uses them where appropriate.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 09:34:48 +02:00
Sascha Hauer b5c4e238d3 block: rename file operation functions
block_read and block_write collide with a to-be-introduced
global function, so rename the file operation functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 09:23:52 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:57:41 +02:00
Sascha Hauer dd3c898d06 Merge branch 'for-next/dma-cache-align' 2012-07-02 10:59:22 +02:00
Sascha Hauer be573120fe make cdev 64bit capable
Next step to 64bit support: Make cdev size a 64bit type.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:24 +02:00
Sascha Hauer 3e503822c7 use loff_t for file offsets
This is a first step for 64bit file support: Make the file sizes/offsets
64bit.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:24 +02:00
Sascha Hauer 9895357a71 block: use dma_alloc to allocate buffers
Drivers may use dma to transfer blocks, so put them into
dma save memory.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:25 +02:00
Alexander Shiyan 71d559854e block: Fix printf warning
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-31 20:21:19 +02:00
Sascha Hauer ff6bacd6f4 block: do not BUG() on failed block_get
It does not necessarily means a bug when block_get fails here,
this can also be a failure on the underlying device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-30 06:03:01 +02:00
Sascha Hauer 949b03dfb1 block: propagate error code from block_get
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-30 06:01:02 +02:00
Sascha Hauer e3a9e1fd62 block: reimplement caching
The current caching layer only has a single buffer for
writing and reading. The FAT driver often accesses the
fat and then data again, which currently can't be cached.
Reimplement this with a list of cached chunks. The number
of chunks and their sizes are currently hardcoded, but
that could be easily made configurable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-15 08:21:43 +01:00
Sascha Hauer 61f41e3c54 add block support
This adds a simple block layer to barebox. Reading and writing
to block devices can be painfully slow without caching, so
add a simple caching layer here.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-11 15:57:51 +02:00