--- /dev/null
+From 4089fe95bfed295c8ad38251d5fe02b6b0ba684c Mon Sep 17 00:00:00 2001
+From: Nicolas Schichan <nschichan@freebox.fr>
+Date: Thu, 6 Jun 2013 19:00:46 +0200
+Subject: ARM: Kirkwood: handle mv88f6282 cpu in __kirkwood_variant().
+
+From: Nicolas Schichan <nschichan@freebox.fr>
+
+commit 4089fe95bfed295c8ad38251d5fe02b6b0ba684c upstream.
+
+MPP_F6281_MASK would be previously be returned when on mv88f6282,
+which would disallow some valid MPP configurations.
+
+Commit 830f8b91 (arm: plat-orion: fix printing of "MPP config
+unavailable on this hardware") made this problem visible as an invalid
+MPP configuration is now correctly detected and not applied.
+
+Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
+Signed-off-by: Jason Cooper <jason@lakedaemon.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mach-kirkwood/mpp.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/mach-kirkwood/mpp.c
++++ b/arch/arm/mach-kirkwood/mpp.c
+@@ -22,9 +22,10 @@ static unsigned int __init kirkwood_vari
+
+ kirkwood_pcie_id(&dev, &rev);
+
+- if ((dev == MV88F6281_DEV_ID && rev >= MV88F6281_REV_A0) ||
+- (dev == MV88F6282_DEV_ID))
++ if (dev == MV88F6281_DEV_ID && rev >= MV88F6281_REV_A0)
+ return MPP_F6281_MASK;
++ if (dev == MV88F6282_DEV_ID)
++ return MPP_F6282_MASK;
+ if (dev == MV88F6192_DEV_ID && rev >= MV88F6192_REV_A0)
+ return MPP_F6192_MASK;
+ if (dev == MV88F6180_DEV_ID)
--- /dev/null
+From df465abfe06f7dc4f33f4a96d17f096e9e8ac917 Mon Sep 17 00:00:00 2001
+From: Nithin Sujir <nsujir@broadcom.com>
+Date: Wed, 12 Jun 2013 11:08:59 -0700
+Subject: tg3: Wait for boot code to finish after power on
+
+From: Nithin Sujir <nsujir@broadcom.com>
+
+commit df465abfe06f7dc4f33f4a96d17f096e9e8ac917 upstream.
+
+Some systems that don't need wake-on-lan may choose to power down the
+chip on system standby. Upon resume, the power on causes the boot code
+to startup and initialize the hardware. On one new platform, this is
+causing the device to go into a bad state due to a race between the
+driver and boot code, once every several hundred resumes. The same race
+exists on open since we come up from a power on.
+
+This patch adds a wait for boot code signature at the beginning of
+tg3_init_hw() which is common to both cases. If there has not been a
+power-off or the boot code has already completed, the signature will be
+present and poll_fw() returns immediately. Also return immediately if
+the device does not have firmware.
+
+Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
+Signed-off-by: Michael Chan <mchan@broadcom.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/broadcom/tg3.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- a/drivers/net/ethernet/broadcom/tg3.c
++++ b/drivers/net/ethernet/broadcom/tg3.c
+@@ -1799,6 +1799,9 @@ static int tg3_poll_fw(struct tg3 *tp)
+ int i;
+ u32 val;
+
++ if (tg3_flag(tp, NO_FWARE_REPORTED))
++ return 0;
++
+ if (tg3_flag(tp, IS_SSB_CORE)) {
+ /* We don't use firmware. */
+ return 0;
+@@ -10016,6 +10019,13 @@ static int tg3_reset_hw(struct tg3 *tp,
+ */
+ static int tg3_init_hw(struct tg3 *tp, int reset_phy)
+ {
++ /* Chip may have been just powered on. If so, the boot code may still
++ * be running initialization. Wait for it to finish to avoid races in
++ * accessing the hardware.
++ */
++ tg3_enable_register_access(tp);
++ tg3_poll_fw(tp);
++
+ tg3_switch_clocks(tp);
+
+ tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0);