9
0
Fork 0
Commit Graph

11 Commits

Author SHA1 Message Date
Sascha Hauer b36cc0f884 memory: return error in barebox_add_memory_bank
When a memory bank is already registered, return an error code
instead of throwing a bug. This can happen if a board has registered
a memory bank and the same bank is then probed from the devicetree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-08 00:33:21 +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 5f03074ea9 resource: store 'end' instead of 'size' in struct resource
Storing the size instead of the resource end in struct resource was
a mistake. 'size' ranges from 0 to UINT[32|64]_MAX + 1 which obviously
leads to problems. 'end' on the other hand will never exceed
UINT[32|64]_MAX. Also this way we can express a iomem region covering
the whole address space.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-01 08:18:53 +02:00
Marc Kleine-Budde 78312fa0c5 common: memory: fix off-by-one in tlsf_create
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 15:19:29 +02:00
Antony Pavlov b25bb1f072 add tlsf-based malloc implementation
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-23 11:26:42 +01:00
Antony Pavlov f17b9efcf7 fix "no previous prototype for 'sbrk'" warning
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-09 10:43:25 +01:00
Sascha Hauer 7e3a33198a memory: do not try to reserve iomem on sandbox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-07 13:04:25 +01:00
Sascha Hauer ec8dd25428 register sdram as resources
Also, request the sdram regions used by the barebox binary,
bss, malloc space and stack.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-04 22:26:07 +01:00
Sascha Hauer 81fae63497 oftree: add fixup for memory nodes
Thanks to a common memory handling barebox knows the sdram banks
and sizes, so we can add a common fixup functions for the nodes
in the devicetree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-19 10:09:50 +02:00
Sascha Hauer fbd855d7f5 introduce generic memory bank handling
On arm we have the concept of memory banks which can
be registered and iterated over. This is useful for
other architectures aswell, so add some generic infrastructure
for this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-23 16:32:49 +02:00
Sascha Hauer 2a37624950 malloc: put common memory functions to seperate file
These functions are needed independently of the specific
malloc implementation, so move them out.

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