Hi,

On 8 July 2016 at 09:42, Max Filippov <[email protected]> wrote:
> From: Chris Zankel <[email protected]>
>
> The 'ethoc' device could also be configured to have a private memory
> region instead of having access to the main memory. In that case,
> the packets must be copied into (transmit) or out of (receive) that
> memory.
>
> This behavior is configured by defining CONFIG_SYS_ETHOC_BUFFER_ADDR.
> Make sure to have enough memory for the configured buffers
> (one for transmit, and 'PKTBUFSRX' for receive)
>
> Signed-off-by: Chris Zankel <[email protected]>
> Signed-off-by: Max Filippov <[email protected]>
> ---
>  drivers/net/ethoc.c | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>
> diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
> index edb3c80..ee7c01e 100644
> --- a/drivers/net/ethoc.c
> +++ b/drivers/net/ethoc.c
> @@ -248,6 +248,9 @@ static int ethoc_init_ring(struct eth_device *dev)
>  {
>         struct ethoc *priv = (struct ethoc *)dev->priv;
>         struct ethoc_bd bd;
> +#ifdef CONFIG_SYS_ETHOC_BUFFER_ADDR
> +       unsigned long addr = CONFIG_SYS_ETHOC_BUFFER_ADDR;

These should be in Kconfig. Also you might find bouncebuf.c useful,
although it allocates memory with malloc().

Regards,
Simon
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to