mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Hubert Feurstein <h.feurstein@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH] macb: add support for board specific get_ethaddr function
Date: Thu, 16 Jun 2011 15:55:56 +0200	[thread overview]
Message-ID: <1308232556-12394-1-git-send-email-h.feurstein@gmail.com> (raw)

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/mach-at91/include/mach/board.h |    2 ++
 drivers/net/macb.c                      |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
index 89c1746..89caebb 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -21,6 +21,7 @@
 #ifndef __ASM_ARCH_BOARD_H
 #define __ASM_ARCH_BOARD_H

+#include <net.h>
 #include <linux/mtd/mtd.h>

 void atmel_nand_load_image(void *dest, int size, int pagesize, int blocksize);
@@ -47,6 +48,7 @@ void at91_add_device_nand(struct atmel_nand_data *data);
 struct at91_ether_platform_data {
 	unsigned int flags;
 	int phy_addr;
+	int (*get_ethaddr)(struct eth_device*, unsigned char *adr);
 };

 void at91_add_device_eth(struct at91_ether_platform_data *data);
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index df3b6af..bc6618b 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -431,7 +431,7 @@ static int macb_probe(struct device_d *dev)
 	edev->send = macb_send;
 	edev->recv = macb_recv;
 	edev->halt = macb_halt;
-	edev->get_ethaddr = macb_get_ethaddr;
+	edev->get_ethaddr = pdata->get_ethaddr ? pdata->get_ethaddr : macb_get_ethaddr;
 	edev->set_ethaddr = macb_set_ethaddr;

 	macb->miidev.read = macb_phy_read;
--
1.7.4.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2011-06-16 13:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16 13:55 Hubert Feurstein [this message]
2011-06-21 12:56 ` Jean-Christophe PLAGNIOL-VILLARD
2011-06-21 21:51   ` Hubert Feurstein
2011-06-22  7:08     ` Jean-Christophe PLAGNIOL-VILLARD

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=1308232556-12394-1-git-send-email-h.feurstein@gmail.com \
    --to=h.feurstein@gmail.com \
    --cc=barebox@lists.infradead.org \
    /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