]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'heads/soc2' into boards2-base
authorSimon Horman <horms+renesas@verge.net.au>
Tue, 8 Oct 2013 01:01:47 +0000 (10:01 +0900)
committerSimon Horman <horms+renesas@verge.net.au>
Tue, 8 Oct 2013 01:01:47 +0000 (10:01 +0900)
Conflicts:
arch/arm/mach-shmobile/board-lager.c

1  2 
arch/arm/mach-shmobile/board-armadillo800eva.c
arch/arm/mach-shmobile/board-lager.c

index 59951340b5586965aa59cc0d7cf83e4cdfce35b1,4e040e4d1102cd6100a2cf1119f586e58c11226d..32183a39354b2cf0275da0b867cfac12d18a7711
@@@ -28,8 -28,8 +28,9 @@@
  #include <linux/mmc/sh_mmcif.h>
  #include <linux/pinctrl/machine.h>
  #include <linux/platform_data/gpio-rcar.h>
 +#include <linux/platform_data/rcar-du.h>
  #include <linux/platform_device.h>
+ #include <linux/phy.h>
  #include <linux/regulator/fixed.h>
  #include <linux/regulator/machine.h>
  #include <linux/sh_eth.h>
@@@ -219,10 -154,32 +220,34 @@@ static void __init lager_add_standard_d
                                          ether_resources,
                                          ARRAY_SIZE(ether_resources),
                                          &ether_pdata, sizeof(ether_pdata));
 +
 +      lager_add_du_device();
  }
  
+ /*
+  * Ether LEDs on the Lager board are named LINK and ACTIVE which corresponds
+  * to non-default 01 setting of the Micrel KSZ8041 PHY control register 1 bits
+  * 14-15. We have to set them back to 01 from the default 00 value each time
+  * the PHY is reset. It's also important because the PHY's LED0 signal is
+  * connected to SoC's ETH_LINK signal and in the PHY's default mode it will
+  * bounce on and off after each packet, which we apparently want to avoid.
+  */
+ static int lager_ksz8041_fixup(struct phy_device *phydev)
+ {
+       u16 phyctrl1 = phy_read(phydev, 0x1e);
+       phyctrl1 &= ~0xc000;
+       phyctrl1 |= 0x4000;
+       return phy_write(phydev, 0x1e, phyctrl1);
+ }
+ static void __init lager_init(void)
+ {
+       lager_add_standard_devices();
+       phy_register_fixup_for_id("r8a7790-ether-ff:01", lager_ksz8041_fixup);
+ }
  static const char *lager_boards_compat_dt[] __initdata = {
        "renesas,lager",
        NULL,