linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Xilinx git tree, LLTemac driver
@ 2008-03-04  9:57 Magnus Hjorth
  2008-03-04 14:21 ` John Linn
  2008-03-04 16:24 ` Stephen Neuendorffer
  0 siblings, 2 replies; 3+ messages in thread
From: Magnus Hjorth @ 2008-03-04  9:57 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: git

Hi,

I'm trying to compile the Linux kernel from the Xilinx git tree
(linux-2.6-xlnx) and am having some trouble with the LLTemac driver, =
having
to do with MAC address settings.=20

There seems to be two routines getting the MAC address in different =
ways.
The xtenet_probe function tries to access an extern bd_t __res, the type
bd_t doesn't exist in the powerpc tree which causes the compilation to =
fail.
Then there is the xtenet_of_probe function which uses =
of_get_mac_address.

What confuses me is that both the regular and the OF driver is =
registered in
the xtenet_init function, I would have expected it to be either/or.=20

Can I expect under the powerpc arch and supplying a .dts file, that the
xtenet_probe function will never be called?=20

Best regards,
Magnus


--

Magnus Hjorth, M.Sc.
Omnisys Instruments AB
Gruvgatan 8
SE-421 30  V=E4stra Fr=F6lunda, SWEDEN
Phone: +46 31 734 34 09
Fax: +46 31 734 34 29
http://www.omnisys.se

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Xilinx git tree, LLTemac driver
  2008-03-04  9:57 Xilinx git tree, LLTemac driver Magnus Hjorth
@ 2008-03-04 14:21 ` John Linn
  2008-03-04 16:24 ` Stephen Neuendorffer
  1 sibling, 0 replies; 3+ messages in thread
From: John Linn @ 2008-03-04 14:21 UTC (permalink / raw)
  To: Magnus Hjorth, linuxppc-embedded; +Cc: git

Hi Magnus,

I just applied the change to the git tree for getting the mac address =
from the board data and it looks like I should have taken into account =
the powerpc arch also as I was building and testing ppc arch.

It looks like #ifndef needs to be added around the use of the __res for =
copying the mac address from the board data so that it doesn't do that =
in the powerpc arch.

#ifndef CONFIG_OF
	memcpy(ndev->dev_addr, ((bd_t *) &__res)->bi_enetaddr, 6);
	memcpy(pdata->mac_addr, ((bd_t *) &__res)->bi_enetaddr, 6);
#endif

The #ifndef may also be needed around the extern for __res.

I'll test these changes.

Thanks,
John

-----Original Message-----
From: Magnus Hjorth [mailto:mh@omnisys.se]=20
Sent: Tuesday, March 04, 2008 2:58 AM
To: linuxppc-embedded@ozlabs.org
Cc: git
Subject: Xilinx git tree, LLTemac driver

Hi,

I'm trying to compile the Linux kernel from the Xilinx git tree
(linux-2.6-xlnx) and am having some trouble with the LLTemac driver, =
having
to do with MAC address settings.=20

There seems to be two routines getting the MAC address in different =
ways.
The xtenet_probe function tries to access an extern bd_t __res, the type
bd_t doesn't exist in the powerpc tree which causes the compilation to =
fail.
Then there is the xtenet_of_probe function which uses =
of_get_mac_address.

What confuses me is that both the regular and the OF driver is =
registered in
the xtenet_init function, I would have expected it to be either/or.=20

Can I expect under the powerpc arch and supplying a .dts file, that the
xtenet_probe function will never be called?=20

Best regards,
Magnus


--

Magnus Hjorth, M.Sc.
Omnisys Instruments AB
Gruvgatan 8
SE-421 30  V=E4stra Fr=F6lunda, SWEDEN
Phone: +46 31 734 34 09
Fax: +46 31 734 34 29
http://www.omnisys.se

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Xilinx git tree, LLTemac driver
  2008-03-04  9:57 Xilinx git tree, LLTemac driver Magnus Hjorth
  2008-03-04 14:21 ` John Linn
@ 2008-03-04 16:24 ` Stephen Neuendorffer
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Neuendorffer @ 2008-03-04 16:24 UTC (permalink / raw)
  To: Magnus Hjorth, linuxppc-embedded; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1769 bytes --]


Magnus,

The change that broke the lltemac driver was very recent, you should be able to check out a slightly earlier version to avoid the problem.

We've been following the migration pattern where drivers advertise platform devices *and* of devices.  In ARCH=ppc, only platform devices will ever get created and bound to the driver.  In ARCH=powerpc, only of devices will get created and bound.

Note that the ARCH=powerpc support is very new (and as evidenced by the bug you found, it hasn't been tested as much)...
If you have successes (or more failures), we'd appreciate hearing about them.

Steve

-----Original Message-----
From: Magnus Hjorth [mailto:mh@omnisys.se]
Sent: Tue 3/4/2008 1:57 AM
To: linuxppc-embedded@ozlabs.org
Cc: git
Subject: Xilinx git tree, LLTemac driver
 
Hi,

I'm trying to compile the Linux kernel from the Xilinx git tree
(linux-2.6-xlnx) and am having some trouble with the LLTemac driver, having
to do with MAC address settings. 

There seems to be two routines getting the MAC address in different ways.
The xtenet_probe function tries to access an extern bd_t __res, the type
bd_t doesn't exist in the powerpc tree which causes the compilation to fail.
Then there is the xtenet_of_probe function which uses of_get_mac_address.

What confuses me is that both the regular and the OF driver is registered in
the xtenet_init function, I would have expected it to be either/or. 

Can I expect under the powerpc arch and supplying a .dts file, that the
xtenet_probe function will never be called? 

Best regards,
Magnus


--

Magnus Hjorth, M.Sc.
Omnisys Instruments AB
Gruvgatan 8
SE-421 30  Västra Frölunda, SWEDEN
Phone: +46 31 734 34 09
Fax: +46 31 734 34 29
http://www.omnisys.se



[-- Attachment #2: Type: text/html, Size: 2433 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-03-04 16:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-04  9:57 Xilinx git tree, LLTemac driver Magnus Hjorth
2008-03-04 14:21 ` John Linn
2008-03-04 16:24 ` Stephen Neuendorffer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).