[U-Boot] [RFC PATCH 28/50] net: macb: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/macb.c | 14 +- 1 file changed, 9 insertions(+), 5

[U-Boot] [RFC PATCH 25/50] net: inca-ip_sw: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/inca-ip_sw.c | 11 +++ 1 file changed, 7 insertions

[U-Boot] [RFC PATCH 38/50] net: plb2800_eth: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/plb2800_eth.c | 11 +++ 1 file changed, 7 insertions

[U-Boot] [RFC PATCH 39/50] net: rtl8139: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/rtl8139.c | 18 +++--- 1 file changed, 11 insertions

[U-Boot] [RFC PATCH 45/50] net: uli526x: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/uli526x.c | 12 1 file changed, 8 insertions(+), 4

[U-Boot] [RFC PATCH 42/50] net: smc911x: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/smc911x.c | 12 1 file changed, 8 insertions(+), 4

[U-Boot] [RFC PATCH 40/50] net: rtl8169: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/rtl8169.c | 13 + 1 file changed, 9 insertions(+), 4

[U-Boot] [RFC PATCH 47/50] net: xilinx_emaclite: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/xilinx_emaclite.c | 12 1 file changed, 8

[U-Boot] [RFC PATCH 48/50] net: zynq_gem: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/zynq_gem.c | 14 +- 1 file changed, 9 insertions

[U-Boot] [RFC PATCH 43/50] net: tsec: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/tsec.c | 18 +++--- 1 file changed, 11 insertions

[U-Boot] [RFC PATCH 44/50] net: tsi108_eth: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/tsi108_eth.c | 12 1 file changed, 8 insertions

[U-Boot] [RFC PATCH 41/50] net: smc91111: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/smc9.c | 14 +- 1 file changed, 9 insertions

[U-Boot] [RFC PATCH 49/50] net: xilinx_ll_temac: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/xilinx_ll_temac.c | 27 --- 1 file

[U-Boot] [RFC PATCH 26/50] net: ks8695eth: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/ks8695eth.c | 12 1 file changed, 8 insertions

[U-Boot] [RFC PATCH 46/50] net: xilinx_axi_emac: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/xilinx_axi_emac.c | 15 ++- 1 file changed, 10

[U-Boot] [RFC PATCH 50/50] net: sh_eth: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/sh_eth.c | 12 1 file changed, 8 insertions(+), 4

[U-Boot] [RFC PATCH 32/50] net: mpc512x_fec: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/mpc512x_fec.c | 12 1 file changed, 8 insertions

[U-Boot] [RFC PATCH 29/50] net: mcffec: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/mcffec.c | 12 1 file changed, 8 insertions(+), 4

[U-Boot] [RFC PATCH 34/50] net: ne2000: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/ne2000_base.c | 12 1 file changed, 8 insertions

[U-Boot] [RFC PATCH 33/50] net: natsemi: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/natsemi.c | 12 1 file changed, 8 insertions(+), 4

[U-Boot] [RFC PATCH 30/50] net: mpc5xxx_fec: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/mpc5xxx_fec.c | 11 +++ 1 file changed, 7 insertions

[U-Boot] [RFC PATCH 31/50] net: mvgbe: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/mvgbe.c | 14 +- 1 file changed, 9 insertions(+), 5

[U-Boot] [RFC PATCH 36/50] net: ns8382x: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/ns8382x.c | 13 + 1 file changed, 9 insertions(+), 4

[U-Boot] [RFC PATCH 35/50] net: npe: Pull out init of struct eth_ops

2012-11-02 Thread Tomas Hlavacek
Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- drivers/net/npe/npe.c | 12 1 file changed, 8 insertions(+), 4

[U-Boot] [PATCH v10] Add dmmalloc module for DM.

2012-10-28 Thread Tomas Hlavacek
calls - dmmalloc, dmfree, dmrealloc and dmcalloc. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- Changes in v10: - Change GD type to struct early_heap_header *. - Move dmmalloc, dmfree, ... function from .h to dmmalloc.c . - Rework early_malloc_active() to use new GD_FLG_HEAP_INIT

Re: [U-Boot] [PATCH v9] [RFC] Add dmmalloc module for DM.

2012-10-25 Thread Tomas Hlavacek
Hello Graeme, On Thu, Oct 25, 2012 at 3:40 AM, Graeme Russ graeme.r...@gmail.com wrote: diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index 2b9af93..9045829 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@

[U-Boot] [PATCH v9] [RFC] Add dmmalloc module for DM.

2012-10-24 Thread Tomas Hlavacek
calls - dmmalloc, dmfree, dmrealloc and dmcalloc. Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- Changes in v9: - Rework early_malloc to keep track of allocated block size. - Add early_free and dmfree functions. - Rework dmrealloc. - Add kerneldoc comments to dmmalloc.h

Re: [U-Boot] [PATCH v8] [RFC] early_malloc for DM added.

2012-09-26 Thread Tomas Hlavacek
Hello Graeme, On Wed, Sep 26, 2012 at 1:04 AM, Graeme Russ graeme.r...@gmail.com wrote: Hi Tomas On Tue, Sep 25, 2012 at 7:09 PM, Graeme Russ graeme.r...@gmail.com wrote: We should implement each of malloc(), free(), calloc(), and realloc(). Don't worry about reclaiming and reusing space

Re: [U-Boot] [PATCH v8] [RFC] early_malloc for DM added.

2012-09-25 Thread Tomas Hlavacek
Hello Graeme! On Tue, Sep 25, 2012 at 2:37 AM, Graeme Russ graeme.r...@gmail.com wrote: Hi Marek, [...] The last two are NOPs for early heap as we have no way to track free'd blocks Keep in mind that 'real' realloc() has access to information providing the size of the source block of

Re: [U-Boot] [PATCH v8] [RFC] early_malloc for DM added.

2012-09-24 Thread Tomas Hlavacek
Hello Marek, On Mon, Sep 24, 2012 at 1:11 AM, Marek Vasut ma...@denx.de wrote: Dear Tomas Hlavacek, [..] + + if (early_malloc_active()) { + addr = early_malloc(size); + for (i=0; isize; i++) + addr[i] = 0; memset() ? Yes, sure. Thanks

Re: [U-Boot] [PATCH v6] [RFC] early_malloc for DM added.

2012-09-23 Thread Tomas Hlavacek
Hello! On Sun, Sep 23, 2012 at 3:06 PM, Graeme Russ graeme.r...@gmail.com wrote: On Sep 23, 2012 8:09 AM, Tomas Hlavacek tmshl...@gmail.com wrote: early_malloc for DM with support for more heaps and lightweight first heap in the same memory as an early stack. Adaptation layer for seamless

[U-Boot] [PATCH v7] [RFC] early_malloc for DM added.

2012-09-23 Thread Tomas Hlavacek
early_malloc for DM with support for more heaps and lightweight first heap in the same memory as an early stack. Adaptation layer for seamless calling of early_malloc or dlmalloc from DM based on init stage added (dmmalloc() and related functions). Signed-off-by: Tomas Hlavacek tmshl

[U-Boot] [PATCH v8] [RFC] early_malloc for DM added.

2012-09-23 Thread Tomas Hlavacek
early_malloc for DM with support for more heaps and lightweight first heap in the same memory as an early stack. Adaptation layer for seamless calling of early_malloc or dlmalloc from DM based on init stage added (dmmalloc() and related functions). Signed-off-by: Tomas Hlavacek tmshl

Re: [U-Boot] [PATCH v8] [RFC] early_malloc for DM added.

2012-09-23 Thread Tomas Hlavacek
Dear Wolfgang Denk, On Sun, Sep 23, 2012 at 6:32 PM, Wolfgang Denk w...@denx.de wrote: Changelog since v7: dmcalloc() implmentation added. Comments added to header. Your change log does not make much sense to me. It appears there has been some dmcalloc() implementation already in v5 (and

Re: [U-Boot] [PATCH v8] [RFC] early_malloc for DM added.

2012-09-23 Thread Tomas Hlavacek
Hi Graeme! On Mon, Sep 24, 2012 at 2:00 AM, Graeme Russ graeme.r...@gmail.com wrote: Hi Tomas, On Mon, Sep 24, 2012 at 2:15 AM, Tomas Hlavacek tmshl...@gmail.com wrote: early_malloc for DM with support for more heaps and lightweight first heap in the same memory as an early stack

Re: [U-Boot] [PATCH v5] [RFC] early_malloc for DM added.

2012-09-22 Thread Tomas Hlavacek
Hello Marek, On Sat, Sep 22, 2012 at 2:28 AM, Marek Vasut ma...@denx.de wrote: Dear Tomas Hlavacek, early_malloc for DM with support for more heaps and lightweight first heap in the same memory as an early stack. Adaptation layer for seamless calling of early_malloc or dlmalloc from DM

[U-Boot] [PATCH v6] [RFC] early_malloc for DM added.

2012-09-22 Thread Tomas Hlavacek
early_malloc for DM with support for more heaps and lightweight first heap in the same memory as an early stack. Adaptation layer for seamless calling of early_malloc or dlmalloc from DM based on init stage added (dmmalloc() and related functions). Signed-off-by: Tomas Hlavacek tmshl

[U-Boot] [PATCH v5] [RFC] early_malloc for DM added.

2012-09-21 Thread Tomas Hlavacek
early_malloc for DM with support for more heaps and lightweight first heap in the same memory as an early stack. Adaptation layer for seamless calling of early_malloc or dlmalloc from DM based on init stage added (dmmalloc() and related functions). Signed-off-by: Tomas Hlavacek tmshl

Re: [U-Boot] [PATCHv4] [RFC] DM: early_malloc for DM added.

2012-09-21 Thread Tomas Hlavacek
Hello all, I have sent a new version. Although I tried to take into account all the opinions and comments I might have missed something. On Wed, Sep 19, 2012 at 1:29 AM, Graeme Russ graeme.r...@gmail.com wrote: I'd say, pull out the modification of global data into separate patch and put it

[U-Boot] [PATCHv4] [RFC] DM: early_malloc for DM added.

2012-09-18 Thread Tomas Hlavacek
early_malloc for DM with support for more heaps and lightweight first heap on stack. Adaptation layer for seamless calling of early_malloc or dlmalloc from DM based on init stage added (dmmalloc() and related functions). Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- arch/arm/include/asm

[U-Boot] [PATCH 1/1] [RFC] DM: early_malloc for DM added.

2012-08-27 Thread Tomas Hlavacek
Modular early_malloc for DM with support for more heaps and lightweight first heap on stack. (RFC. Not intended for merging!) Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- arch/arm/include/asm/global_data.h|1 + arch/arm/lib/board.c |5 ++ arch/avr32

Re: [U-Boot] [PATCH 1/1] [RFC] DM: early_malloc for DM added.

2012-08-27 Thread Tomas Hlavacek
and collect the feedback. Tomas On Mon, Aug 27, 2012 at 2:18 PM, Marek Vasut marek.va...@gmail.com wrote: Dear Tomas Hlavacek, Modular early_malloc for DM with support for more heaps and lightweight first heap on stack. (RFC. Not intended for merging!) Signed-off-by: Tomas Hlavacek tmshl

[U-Boot] [PATCHv2 1/1] [RFC] DM: early_malloc for DM added.

2012-08-27 Thread Tomas Hlavacek
Modular early_malloc for DM with support for more heaps and lightweight first heap on stack. (Not intended for merging!) Signed-off-by: Tomas Hlavacek tmshl...@gmail.com --- arch/arm/include/asm/global_data.h|1 + arch/arm/lib/board.c |5 ++ arch/avr32

Re: [U-Boot] Early malloc() summary

2012-08-19 Thread Tomas Hlavacek
Hello Graeme! On Fri, Aug 17, 2012 at 3:15 AM, Graeme Russ graeme.r...@gmail.com wrote: dm_malloc(bytes, driver *) | +- early_malloc(bytes, reloc_helper *) /* Pre-Relocation */ | | | +-register_helper(reloc_helper *) | | | +-pre_reloc_malloc(size_t bytes) |

Re: [U-Boot] Early malloc() summary

2012-08-15 Thread Tomas Hlavacek
On Tue, Aug 14, 2012 at 3:54 PM, Graeme Russ graeme.r...@gmail.com wrote: dm_malloc you mean? I'm not happy about it, maybe Graeme can pour in some crazy juice in our direction again? I don't like the idea of dm_malloc() either, but it may be the only way to get this past Wolfgang in the

Re: [U-Boot] Early malloc() summary

2012-08-14 Thread Tomas Hlavacek
Hello Marek, On Sun, Aug 12, 2012 at 1:16 AM, Marek Vasut ma...@denx.de wrote: So ... we should aim for firing up the real mallocator as soon as possible and maybe implement discontigmem (sparsemem) into it, so we don't have to bother with relocating pointers maybe? The only problem I see

Re: [U-Boot] early_malloc outline

2012-08-09 Thread Tomas Hlavacek
Hi Graeme, On Thu, Aug 9, 2012 at 1:33 AM, Graeme Russ graeme.r...@gmail.com wrote: OK, this got me to thinking about the 'relocation' function in the driver structure and how we can make the early heap more generic. My thoughts tie into the DM tree structure being discussed in another

Re: [U-Boot] early_malloc outline

2012-08-08 Thread Tomas Hlavacek
Dear Wolfgang, On Tue, Aug 7, 2012 at 11:07 PM, Wolfgang Denk w...@denx.de wrote: But relocation means that you have to add the address difference (aka relocation offset) to _all_ pointers pointing into this area. And there is no way to keep track of _all_ such pointers. Sure there is no way

Re: [U-Boot] early_malloc outline

2012-08-01 Thread Tomas Hlavacek
Hi Graeme, On Wed, Aug 1, 2012 at 4:57 AM, Graeme Russ graeme.r...@gmail.com wrote: More specifically, we must not assume that we have a single, contiguous region of memory capable of holding pre-relocations early stack, pre-relocation global data, pre-console buffer, and early

Re: [U-Boot] early_malloc outline

2012-08-01 Thread Tomas Hlavacek
Dear Wolfgang, On Tue, Jul 31, 2012 at 9:52 PM, Wolfgang Denk w...@denx.de wrote: Can/should we use some existing mechanism? Or would it be considered a viable option to choose different beginning address for early heap, use it (in architecture-specific way) and keep the pointer to the

Re: [U-Boot] early_malloc outline

2012-08-01 Thread Tomas Hlavacek
Dear Wolfgang, On Wed, Aug 1, 2012 at 9:09 PM, Wolfgang Denk w...@denx.de wrote: Hm... I have to admit that I am not really happy about such an explanation. The statement that other guys want something is not exactly an explanation of a concept that I can understand, and without being able

[U-Boot] early_malloc outline

2012-07-31 Thread Tomas Hlavacek
Hello all! In u-boot-dm mailinglist we had a discussion about implementation of early_malloc (not only) for U-Boot Driver Model. The intention is to have a simple malloc() function in the early stage of init before relocation and before RAM is up and running. There was an experimental patch that

Re: [U-Boot] [U-Boot-DM] [PATCH 1/1] early_malloc() introduced to ARM architecture

2012-07-29 Thread Tomas Hlavacek
Hello Marek, On Sat, Jul 28, 2012 at 10:36 PM, Marek Vasut ma...@denx.de wrote: I think we should still mark early patches as RFC. Sure... +#include earlymalloc.h Do we need early_malloc.h at all? malloc.h won't cut it? My intention was to keep the early_malloc in separate instance from

Re: [U-Boot] [U-Boot-DM] early_malloc() vs. enable_caches()

2012-07-29 Thread Tomas Hlavacek
Hi Graeme, On Sun, Jul 29, 2012 at 12:53 PM, Graeme Russ graeme.r...@gmail.com wrote: Not exactly on-topic, but I really hope that everything is wrapped so a simple call to malloc() will work pre-relocation. Of course, everything you malloc pre-relocation will have to be re-malloc'd and

[U-Boot] early_malloc() vs. enable_caches()

2012-07-28 Thread Tomas Hlavacek
Hello! I am working on early_malloc() for U-Boot Driver Model (this malloc is going to serve for internal DM structures during early init and it has it's minimalistic heap in global data). My question is how to correctly switch from early allocator to full-scale malloc and when to enable caches.

Re: [U-Boot] [U-Boot-DM] FDT driver initialization function declaration

2012-07-13 Thread Tomas Hlavacek
On Thu, Jul 12, 2012 at 10:22 AM, Michal Simek mon...@monstr.eu wrote: thats what platform_data is for, if i understand what you mean That's my understanding too. But the point is how it is passed to the driver itself because I didn't see any pointer to it there. I had an impression that

<    1   2