public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/8] net/ethoc: support private memory configurations
Date: Fri, 15 Jul 2016 02:34:17 +0300	[thread overview]
Message-ID: <20160714233417.GF31001@octofox.metropolis> (raw)
In-Reply-To: <CAPnjgZ3ruufz-2ZYALCfN9LAPV4SNvR3LMXk4prn-m-Wr=hzqg@mail.gmail.com>

Hi Simon,

On Tue, Jul 12, 2016 at 03:56:54PM -0600, Simon Glass wrote:
> On 8 July 2016 at 09:42, Max Filippov <jcmvbkbc@gmail.com> wrote:
> > From: Chris Zankel <chris@zankel.net>
> >
> > 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 <chris@zankel.net>
> > Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> > ---
> >  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.

-- 
Thanks.
-- Max

  reply	other threads:[~2016-07-14 23:34 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-08 15:41 [U-Boot] [PATCH v2 0/8] U-Boot port to Xtensa architecture Max Filippov
2016-07-08 15:41 ` [U-Boot] [PATCH 1/8] xtensa: add support for the xtensa processor architecture [1/2] Max Filippov
2016-07-12 21:56   ` Simon Glass
2016-07-14 21:55     ` Max Filippov
2016-07-08 15:42 ` [U-Boot] [PATCH 2/8] xtensa: add support for the xtensa processor architecture [2/2] Max Filippov
2016-07-12 21:56   ` Simon Glass
2016-07-14 22:58     ` Max Filippov
2016-07-15  0:20       ` Simon Glass
2016-07-08 15:42 ` [U-Boot] [PATCH 3/8] xtensa: add core information for the dc232b processor Max Filippov
2016-07-12 21:56   ` Simon Glass
2016-07-14 23:15     ` Max Filippov
2016-07-15  0:20       ` Simon Glass
2016-07-08 15:42 ` [U-Boot] [PATCH 4/8] xtensa: add core information for the dc233c processor Max Filippov
2016-07-12 21:56   ` Simon Glass
2016-07-14 23:19     ` Max Filippov
2016-07-08 15:42 ` [U-Boot] [PATCH 5/8] xtensa: add core information for the de212 processor Max Filippov
2016-07-12 21:56   ` Simon Glass
2016-07-14 23:20     ` Max Filippov
2016-07-08 15:42 ` [U-Boot] [PATCH 6/8] net/ethoc: support private memory configurations Max Filippov
2016-07-12 21:56   ` Simon Glass
2016-07-14 23:34     ` Max Filippov [this message]
2016-07-15  0:20       ` Simon Glass
2016-07-08 15:42 ` [U-Boot] [PATCH 7/8] net/ethoc: don't advertise gigabit on the connected PHY Max Filippov
2016-07-12 21:56   ` Simon Glass
2016-07-14 23:41     ` Max Filippov
2016-07-13  6:28   ` Michal Simek
2016-07-14 23:51     ` Max Filippov
2016-07-08 15:42 ` [U-Boot] [PATCH 8/8] xtensa: add support for the 'xtfpga' evaluation board Max Filippov
2016-07-12 21:57   ` Simon Glass
2016-07-15  0:13     ` Max Filippov
2016-07-13  6:35   ` Michal Simek
2016-07-15  0:04     ` Max Filippov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160714233417.GF31001@octofox.metropolis \
    --to=jcmvbkbc@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox