[RFC, PATCH v2 2/3] net: add ar231x-eth support

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Fri May 24 05:14:48 EDT 2013


On 09:09 Fri 24 May     , Sascha Hauer wrote:
> On Wed, May 22, 2013 at 09:49:48AM +0200, Oleksij Rempel wrote:
> > This driver should work with some Atheros WiSoCs:
> > - ar2312, ar2313
> > - ar2315, ar2316 ...
> > 
> > Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
> > ---
> >  drivers/net/Kconfig  |   7 +
> >  drivers/net/Makefile |   1 +
> >  drivers/net/ar231x.c | 429 +++++++++++++++++++++++++++++++++++++++++++++++++++
> >  drivers/net/ar231x.h | 219 ++++++++++++++++++++++++++
> >  4 files changed, 656 insertions(+)
> >  create mode 100644 drivers/net/ar231x.c
> >  create mode 100644 drivers/net/ar231x.h
> > 
> > +
> > +	/* FIXME: priv->{t,r}x_ring are virtual addresses,
> > +	 * use virt-to-phys convertion */
> 
> We use 1:1 mappings, so I think this comment should be removed.
on mips it's not the case
> 
> > +
> > +static void ar231x_allocate_dma_descriptors(struct eth_device *edev)
> > +{
> > +	struct ar231x_eth_priv *priv = edev->priv;
> > +	u16 ar231x_descr_size = sizeof(struct ar231x_descr);
> > +	u16 i;
> > +
> > +	priv->tx_ring = xmalloc(ar231x_descr_size);
> 
> What alignment do you need here? This may or may not be safe.
dma_alloc too



More information about the barebox mailing list