[PATCH 3/3] Add platform data to the mac device

franck.jullien at gmail.com franck.jullien at gmail.com
Mon Apr 11 17:52:09 EDT 2011


From: Franck JULLIEN <franck.jullien at gmail.com>

The PHY address must be passed to the driver via platform_data.

Signed-off-by: Franck JULLIEN <franck.jullien at gmail.com>
---
 arch/nios2/boards/generic/generic.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/nios2/boards/generic/generic.c b/arch/nios2/boards/generic/generic.c
index 99c855d..7e939ce 100644
--- a/arch/nios2/boards/generic/generic.c
+++ b/arch/nios2/boards/generic/generic.c
@@ -11,11 +11,14 @@ static struct device_d cfi_dev = {
 	.size     = NIOS_SOPC_FLASH_SIZE,
 };
 
+static int phy_address = 1;
+
 static struct device_d mac_dev = {
-	.id       = -1,
-	.name     = "altera_tse",
-	.map_base = NIOS_SOPC_TSE_BASE,
-	.size     = 0x00000400,
+	.id            = -1,
+	.name          = "altera_tse",
+	.map_base      = NIOS_SOPC_TSE_BASE,
+	.size          = 0x00000400,
+	.platform_data = &phy_address,
 };
 
 static struct memory_platform_data ram_pdata = {
-- 
1.7.0.4




More information about the barebox mailing list