public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephan Linz <linz@li-pro.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/5] net: ll_temac: Add LL TEMAC driver to u-boot
Date: Tue, 17 Jan 2012 21:19:56 +0100	[thread overview]
Message-ID: <1326831596.2717.109.camel@keto> (raw)
In-Reply-To: <201201151347.24190.vapier@gentoo.org>

Am Sonntag, den 15.01.2012, 13:47 -0500 schrieb Mike Frysinger: 
> On Sunday 15 January 2012 13:29:26 Stephan Linz wrote:
> > Am Sonntag, den 15.01.2012, 12:28 -0500 schrieb Mike Frysinger:
> > > On Sunday 15 January 2012 10:46:02 Stephan Linz wrote:
> > > > +/* Data buffer for LL TEMAC Rx and Tx direction */
> > > > +static unsigned char rx_buffer[PKTSIZE_ALIGN]
> > > > __attribute((aligned(DMAALIGN)));
> > > > +static unsigned char tx_buffer[PKTSIZE_ALIGN]
> > > > __attribute((aligned(DMAALIGN)));
> > > 
> > > come code already declares PktBuf ... can't you use that ?
> > 
> > Hm, what do you mean exactly here?
> > 
> > These are the two DMA transfer buffers. I have no idea if there are
> > buffers in the upper layer (NET) and how I can use it for DMA transfers.
> > Therfore I create my own rx/tx buffers and copy data. That reduce the
> > performance a little bit, but it's OK. Furthermore I have to use DMA
> > safe buffers here (no cache, 32 byte alignment).
> 
> from doc/README.drivers.eth:
> The recv function should process packets as long as the hardware has them 
> readily available before returning.  i.e. you should drain the hardware fifo. 
> For each packet you receive, you should call the NetReceive() function on it 
> along with the packet length.  The common code sets up packet buffers for you 
> already in the .bss (NetRxPackets), so there should be no need to allocate 
> your own.
> 
> so you already have an array of packet buffers declared for you.  the first one 
> is &NetRxPackets[0], etc...  since you're just DMA-ing to random external 
> memory, i don't think the address matters.

Hello Mike
and all others,

is there already a simple ETH driver that use these kind of buffer
handling? Up to now I've learned from the Freescale TSEC driver,
especially the MDIO bus implementation. It seems this driver implement
this packet buffer, or not?

> 
> the core code atm however doesn't align things at all, so we'll have to fix 
> that before this driver could use it.

Is the TSEC driver DMA alignment safe (especially the DMA buffer data,
not the DMA buffer descriptor)? What do I need to make the internal
array of packet buffer DMA secure (cache, alignment)?


-- 
Best regards,
Stephan Linz
______________________________________________________________________________
MB-Ref: http://www.li-pro.de/xilinx_mb:mbref:start
OpenDCC: http://www.li-pro.net/opendcc.phtml
PC/M: http://www.li-pro.net/pcm.phtml
Sourceforge: http://sourceforge.net/users/slz
Gitorious: https://gitorious.org/~slz

  parent reply	other threads:[~2012-01-17 20:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-15 15:41 [U-Boot] LL TEMAC V8 refactored Stephan Linz
2012-01-15 15:46 ` [U-Boot] [PATCH 1/5] net: ll_temac: Add LL TEMAC driver to u-boot Stephan Linz
2012-01-15 17:28   ` Mike Frysinger
2012-01-15 18:29     ` Stephan Linz
2012-01-15 18:47       ` Mike Frysinger
2012-01-15 19:41         ` Stephan Linz
2012-01-16  8:19           ` Wolfgang Denk
2012-01-17 20:19         ` Stephan Linz [this message]
2012-01-16  8:14       ` Wolfgang Denk
2012-01-16 17:46         ` Stephan Linz
2012-01-15 19:46   ` [U-Boot] [PATCH] net: ll_temac: Remove useless memory erasing Stephan Linz
2012-01-15 23:44     ` Mike Frysinger
2012-01-16 17:22       ` Stephan Linz
2012-01-16  8:06     ` Wolfgang Denk
2012-01-15 15:46 ` [U-Boot] [PATCH 2/5] microblaze: Enable several ethernet driver compilation Stephan Linz
2012-01-15 15:46 ` [U-Boot] [PATCH 3/5] microblaze: Wire up LL_TEMAC driver initialization Stephan Linz
2012-01-15 15:46 ` [U-Boot] [PATCH 4/5] microblaze: Enable phylib and mii support Stephan Linz
2012-01-15 15:46 ` [U-Boot] [PATCH 5/5] microblaze: Add faked LL_TEMAC driver configuration Stephan Linz

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=1326831596.2717.109.camel@keto \
    --to=linz@li-pro.net \
    --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