Hi Max, On 14 July 2016 at 17:34, Max Filippov <[email protected]> wrote: > Hi Simon, > > On Tue, Jul 12, 2016 at 03:56:54PM -0600, Simon Glass wrote: >> 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. > > Ok. > >> Also you might find bouncebuf.c useful, although it allocates memory >> with malloc(). > > The ethoc variant that we use in XTFPGA boards can only access packets > in its dedicated packet memory and we don't have other DMA, so bouncebuf > doesn't look useful for our case.
OK. Regards, Simon _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

