From: Franck JULLIEN <franck.jullien@gmail.com>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox <barebox@lists.infradead.org>
Subject: Re: [PATCH] [v2] Nios2: Add Altera TSE MAC driver
Date: Sun, 10 Apr 2011 20:21:26 +0200 [thread overview]
Message-ID: <BANLkTi=D=yLy3iZ2ZQuVAwb3Q=UPnk0ZaA@mail.gmail.com> (raw)
In-Reply-To: <20110410105159.GA18343@game.jcrosoft.org>
[-- Attachment #1.1: Type: text/plain, Size: 3188 bytes --]
2011/4/10 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > > index 0000000..2687377
> > > --- /dev/null
> > > +
> > > +static int tse_get_ethaddr(struct eth_device *edev, unsigned char
> *m)
> > > +{
> > > + /* There is no eeprom */
> > so return the content of the register no?
> >
> > Well, the register is reseted to 0 when the MAC starts so there is no
> > Ethernet address
> > to get.
> >
> except this function is supposed to return the mac address of the device at
> any time so after a set of it it will not be true any more
>
If I implement the function I get a "eth@eth0: got MAC address from EEPROM:
00:00:00:00:00:00" at startup.
That why I returned -1 as what I could find int at91_ether.c......
Or, I could find something to return -1 as long as the MAC address hasn't
been set.
> >
> > > + return -1;
> > > +}
> > > +
> > > +static int tse_eth_send(struct eth_device *edev, void *packet,
> int
> > length)
> > > +{
> > > +
> > > + struct altera_tse_priv *priv = edev->priv;
> > > + struct alt_sgdma_registers *tx_sgdma = priv->sgdma_tx;
> > > + struct alt_sgdma_descriptor *tx_desc = (struct
> > alt_sgdma_descriptor *)priv->tx_desc;
> > > +
> > > + struct alt_sgdma_descriptor *tx_desc_cur = (struct
> > alt_sgdma_descriptor *)&tx_desc[0];
> > > +
> > > + flush_dcache_range((uint32_t)packet, (uint32_t)packet +
> length);
> > > + alt_sgdma_construct_descriptor_burst(
> > > + (struct alt_sgdma_descriptor *)&tx_desc[0],
> > > + (struct alt_sgdma_descriptor *)&tx_desc[1],
> > > + (uint32_t *)packet, /* read addr */
> > > + (uint32_t *)0, /* */
> > > + length, /* length or EOP ,will change
> for
> > each tx */
> > > + 0x1, /* gen eop */
> > > + 0x0, /* read fixed */
> > > + 0x1, /* write fixed or sop */
> > > + 0x0, /* read burst */
> > > + 0x0, /* write burst */
> > > + 0x0 /* channel */
> > please use tab for indent I see other in the patch please check
> >
> > I use tab for indent, spaces for alignment. I checked the patch with
> > checkpatch and it
> > didn't find errors.....
> try to use tab when u can even for alignment please
>
OK........
> >
> >
> > > +
> > why this?
> >
> > Because sometimes (often ?), hardware doesn't run first time. So I
> like to
> > have some information on MII bus running correctly....One day I had a
> PHY
> > getting the address 1 and sometimes this f***ing PHY got 31 and this
> > kind of auto scan helped me to immediately find the problem......
> > I could remove those function if it is a problem....
> so it's no the right place as it's phy specific and not ehtern drivers
> specific
>
We could put this in the MII code ? Or should I simply remove it ?
>
> Best Regards,
> J.
>
[-- Attachment #1.2: Type: text/html, Size: 4528 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-04-10 18:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-09 14:08 franck.jullien
2011-04-09 14:08 ` franck.jullien
2011-04-10 4:06 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-10 7:13 ` Franck JULLIEN
2011-04-10 10:51 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-10 18:21 ` Franck JULLIEN [this message]
2011-04-11 2:37 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-11 7:23 ` Franck JULLIEN
2011-04-11 7:47 ` Sascha Hauer
2011-04-11 7:52 ` Franck JULLIEN
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='BANLkTi=D=yLy3iZ2ZQuVAwb3Q=UPnk0ZaA@mail.gmail.com' \
--to=franck.jullien@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=plagnioj@jcrosoft.com \
/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