Re: [PATCH] am33xx: cpsw: default to ethernet hwaddr from efuse if not defined in dt

2013-01-18 Thread Peter Korsgaard
 Michal == Michal Bachraty michal.bachr...@gmail.com writes:

Hi,

 Michal I'm ok with your changes. Have you tried to set MAC from
 Michal u-boot? I haven't seen any code for that purpose in cpsw. I
 Michal tried put MAC with kernel command parameter (in u-boot), but
 Michal nothing happen.

I didn't actually try, but mainline U-Boot has support for updating the
mac-address properties if you:

 - build U-Boot with dt support (CONFIG_OF_LIBFDT)
 - use a seperate .dtb file
 - add aliases called ethernet{0,1} to the 2 cpsw slaves in the dts
   (this should arguable be done in am33xx.dtsi) - E.G.:

 aliases {
   ..
   ethernet0 = cpsw_emac0;
   ethernet1 = cpsw_emac1;
 };

Then U-boot will set the mac-address properties to the content of the
ethaddr / eth1addr environment variables. See fdt_fixup_ethernet() for
details.

-- 
Bye, Peter Korsgaard
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] am33xx: cpsw: default to ethernet hwaddr from efuse if not defined in dt

2013-01-17 Thread Michal Bachraty

Hi Peter,

I made changes to cpsw driver two weeks ago, which add support for reading 
MAC address from CPU and also I posted it to review. 
You can find patch here : https://patchwork.kernel.org/patch/1966481/ 
I will create updated patch next week, depended on reactions. Can you try 
that patch? I'll be glad to hear your 
opinion.

Michal




--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] am33xx: cpsw: default to ethernet hwaddr from efuse if not defined in dt

2013-01-17 Thread Peter Korsgaard
 Michal == Michal Bachraty michal.bachr...@gmail.com writes:

Hi Michael,

 Michal I made changes to cpsw driver two weeks ago, which add support
 Michal for reading MAC address from CPU and also I posted it to
 Michal review.  You can find patch here :
 Michal https://patchwork.kernel.org/patch/1966481/ I will create
 Michal updated patch next week, depended on reactions. Can you try
 Michal that patch? I'll be glad to hear your opinion.

Thanks, I missed that patch. Functionality wise the patches do the same,
but I must say I find my patch cleaner, as it doesn't involve any new dt
bindings or access to the am33xx specific control module registers from
the cpsw driver.

The way I've handled it is similar to how it is done on atleast one
other arm subarchicture, see
arch/arm/mach-mxs/mach-mxs.c::update_fec_mac_prop()

-- 
Bye, Peter Korsgaard
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] am33xx: cpsw: default to ethernet hwaddr from efuse if not defined in dt

2013-01-17 Thread Tony Lindgren
* Peter Korsgaard jac...@sunsite.dk [130117 08:46]:
  Michal == Michal Bachraty michal.bachr...@gmail.com writes:
 
 Hi Michael,
 
  Michal I made changes to cpsw driver two weeks ago, which add support
  Michal for reading MAC address from CPU and also I posted it to
  Michal review.  You can find patch here :
  Michal https://patchwork.kernel.org/patch/1966481/ I will create
  Michal updated patch next week, depended on reactions. Can you try
  Michal that patch? I'll be glad to hear your opinion.
 
 Thanks, I missed that patch. Functionality wise the patches do the same,
 but I must say I find my patch cleaner, as it doesn't involve any new dt
 bindings or access to the am33xx specific control module registers from
 the cpsw driver.
 
 The way I've handled it is similar to how it is done on atleast one
 other arm subarchicture, see
 arch/arm/mach-mxs/mach-mxs.c::update_fec_mac_prop()

Cool this seems like the cleanest way to deal with it so far. Can
you please resend with also linux-net and DT list Cc:d too?

Also the arch_initcall should be omap_arch_initcall in linux next
for consistency if we ever have SoC specific sections for those.

Regards,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] am33xx: cpsw: default to ethernet hwaddr from efuse if not defined in dt

2013-01-17 Thread Peter Korsgaard
 Tony == Tony Lindgren t...@atomide.com writes:

Hi,

  The way I've handled it is similar to how it is done on atleast one
  other arm subarchicture, see
  arch/arm/mach-mxs/mach-mxs.c::update_fec_mac_prop()

 Tony Cool this seems like the cleanest way to deal with it so far. Can
 Tony you please resend with also linux-net and DT list Cc:d too?

 Tony Also the arch_initcall should be omap_arch_initcall in linux next
 Tony for consistency if we ever have SoC specific sections for those.

Sure, resent with the initcall change and netdev/devicetree-discuss added.

-- 
Bye, Peter Korsgaard
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html