diff options
author | Zoltan HERPAI <wigyori@uid0.hu> | 2014-03-06 00:09:30 +0000 |
---|---|---|
committer | Zoltan HERPAI <wigyori@uid0.hu> | 2014-03-06 00:09:30 +0000 |
commit | a8ab50ee77d004e4a00cd6280cc1b542e57054b1 (patch) | |
tree | 0a2be71f002d9dd9084a172a72bef22388f0ca0e /target/linux/sunxi/patches-3.13/151-6-stmmac-fixup-6.patch | |
parent | 8911fab5ade7400cdb42c43f884b4a10141c159e (diff) | |
download | upstream-a8ab50ee77d004e4a00cd6280cc1b542e57054b1.tar.gz upstream-a8ab50ee77d004e4a00cd6280cc1b542e57054b1.tar.bz2 upstream-a8ab50ee77d004e4a00cd6280cc1b542e57054b1.zip |
sunxi: driver refresh for 3.13
- update gmac / mmc / usb / ahci drivers to follow mainline dev trees
- add driver for spi
- update clock support
- update a31 support
- move to new DT compats where appropriate
- re-order patchqueue where needed
- verified working a20 smp
- move most DTSes off files/
- update defconfig
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39782 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/sunxi/patches-3.13/151-6-stmmac-fixup-6.patch')
-rw-r--r-- | target/linux/sunxi/patches-3.13/151-6-stmmac-fixup-6.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/target/linux/sunxi/patches-3.13/151-6-stmmac-fixup-6.patch b/target/linux/sunxi/patches-3.13/151-6-stmmac-fixup-6.patch new file mode 100644 index 0000000000..25564c66a8 --- /dev/null +++ b/target/linux/sunxi/patches-3.13/151-6-stmmac-fixup-6.patch @@ -0,0 +1,57 @@ +From 623997fb90eab7a135c2c68a332c8450a488baca Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla <srinivas.kandagatla@st.com> +Date: Thu, 16 Jan 2014 10:52:35 +0000 +Subject: [PATCH] net: stmmac: fix power management suspend-resume case + +The driver PM resume assumes that the IP is still powered up and the +all the register contents are not disturbed when it comes out of low +power suspend case. This assumption is wrong, basically the driver +should not consider any state of registers after it comes out of low +power. However driver can keep the part of the IP powered up if its a +wake up source. But it can not assume the register state of the IP. Also +its possible that SOC glue layer can take the power off the IP if its +not wake-up source to reduce the power consumption. + +This patch re initializes hardware by calling stmmac_hw_setup function in +resume case. + +Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> +Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +index 341c8dc3..742a83f 100644 +--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c ++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +@@ -2887,18 +2887,19 @@ int stmmac_resume(struct net_device *ndev) + * this bit because it can generate problems while resuming + * from another devices (e.g. serial console). + */ +- if (device_may_wakeup(priv->device)) ++ if (device_may_wakeup(priv->device)) { + priv->hw->mac->pmt(priv->ioaddr, 0); +- else ++ } else { + /* enable the clk prevously disabled */ + clk_prepare_enable(priv->stmmac_clk); ++ /* reset the phy so that it's ready */ ++ if (priv->mii) ++ stmmac_mdio_reset(priv->mii); ++ } + + netif_device_attach(ndev); + +- /* Enable the MAC and DMA */ +- stmmac_set_mac(priv->ioaddr, true); +- priv->hw->dma->start_tx(priv->ioaddr); +- priv->hw->dma->start_rx(priv->ioaddr); ++ stmmac_hw_setup(ndev); + + napi_enable(&priv->napi); + +-- +1.8.5.5 + |