diff options
author | David S. Miller <davem@davemloft.net> | 2015-01-27 19:59:56 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-27 19:59:56 -0500 |
commit | 95f873f2fff96c592c5d863e2a39825bd8bf0500 (patch) | |
tree | 0d2dd664964ba2c701aefea5b4d1e85b481045e1 /drivers/net/usb | |
parent | 8ea65f4a2dfaaf494ef42a16cbf2fea39b07450f (diff) | |
parent | 59343cd7c4809cf7598789e1cd14563780ae4239 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
arch/arm/boot/dts/imx6sx-sdb.dts
net/sched/cls_bpf.c
Two simple sets of overlapping changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/r8152.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 2e2244221cbe..b74a272243ae 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c | |||
@@ -834,9 +834,6 @@ static void ocp_write_word(struct r8152 *tp, u16 type, u16 index, u32 data) | |||
834 | index &= ~3; | 834 | index &= ~3; |
835 | } | 835 | } |
836 | 836 | ||
837 | generic_ocp_read(tp, index, sizeof(tmp), &tmp, type); | ||
838 | |||
839 | data |= __le32_to_cpu(tmp) & ~mask; | ||
840 | tmp = __cpu_to_le32(data); | 837 | tmp = __cpu_to_le32(data); |
841 | 838 | ||
842 | generic_ocp_write(tp, index, byen, sizeof(tmp), &tmp, type); | 839 | generic_ocp_write(tp, index, byen, sizeof(tmp), &tmp, type); |
@@ -875,9 +872,6 @@ static void ocp_write_byte(struct r8152 *tp, u16 type, u16 index, u32 data) | |||
875 | index &= ~3; | 872 | index &= ~3; |
876 | } | 873 | } |
877 | 874 | ||
878 | generic_ocp_read(tp, index, sizeof(tmp), &tmp, type); | ||
879 | |||
880 | data |= __le32_to_cpu(tmp) & ~mask; | ||
881 | tmp = __cpu_to_le32(data); | 875 | tmp = __cpu_to_le32(data); |
882 | 876 | ||
883 | generic_ocp_write(tp, index, byen, sizeof(tmp), &tmp, type); | 877 | generic_ocp_write(tp, index, byen, sizeof(tmp), &tmp, type); |
@@ -927,12 +921,6 @@ static void sram_write(struct r8152 *tp, u16 addr, u16 data) | |||
927 | ocp_reg_write(tp, OCP_SRAM_DATA, data); | 921 | ocp_reg_write(tp, OCP_SRAM_DATA, data); |
928 | } | 922 | } |
929 | 923 | ||
930 | static u16 sram_read(struct r8152 *tp, u16 addr) | ||
931 | { | ||
932 | ocp_reg_write(tp, OCP_SRAM_ADDR, addr); | ||
933 | return ocp_reg_read(tp, OCP_SRAM_DATA); | ||
934 | } | ||
935 | |||
936 | static int read_mii_word(struct net_device *netdev, int phy_id, int reg) | 924 | static int read_mii_word(struct net_device *netdev, int phy_id, int reg) |
937 | { | 925 | { |
938 | struct r8152 *tp = netdev_priv(netdev); | 926 | struct r8152 *tp = netdev_priv(netdev); |
@@ -2573,24 +2561,18 @@ static void r8153_hw_phy_cfg(struct r8152 *tp) | |||
2573 | data = ocp_reg_read(tp, OCP_POWER_CFG); | 2561 | data = ocp_reg_read(tp, OCP_POWER_CFG); |
2574 | data |= EN_10M_PLLOFF; | 2562 | data |= EN_10M_PLLOFF; |
2575 | ocp_reg_write(tp, OCP_POWER_CFG, data); | 2563 | ocp_reg_write(tp, OCP_POWER_CFG, data); |
2576 | data = sram_read(tp, SRAM_IMPEDANCE); | 2564 | sram_write(tp, SRAM_IMPEDANCE, 0x0b13); |
2577 | data &= ~RX_DRIVING_MASK; | ||
2578 | sram_write(tp, SRAM_IMPEDANCE, data); | ||
2579 | 2565 | ||
2580 | ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR); | 2566 | ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR); |
2581 | ocp_data |= PFM_PWM_SWITCH; | 2567 | ocp_data |= PFM_PWM_SWITCH; |
2582 | ocp_write_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR, ocp_data); | 2568 | ocp_write_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR, ocp_data); |
2583 | 2569 | ||
2584 | data = sram_read(tp, SRAM_LPF_CFG); | 2570 | /* Enable LPF corner auto tune */ |
2585 | data |= LPF_AUTO_TUNE; | 2571 | sram_write(tp, SRAM_LPF_CFG, 0xf70f); |
2586 | sram_write(tp, SRAM_LPF_CFG, data); | ||
2587 | 2572 | ||
2588 | data = sram_read(tp, SRAM_10M_AMP1); | 2573 | /* Adjust 10M Amplitude */ |
2589 | data |= GDAC_IB_UPALL; | 2574 | sram_write(tp, SRAM_10M_AMP1, 0x00af); |
2590 | sram_write(tp, SRAM_10M_AMP1, data); | 2575 | sram_write(tp, SRAM_10M_AMP2, 0x0208); |
2591 | data = sram_read(tp, SRAM_10M_AMP2); | ||
2592 | data |= AMP_DN; | ||
2593 | sram_write(tp, SRAM_10M_AMP2, data); | ||
2594 | 2576 | ||
2595 | set_bit(PHY_RESET, &tp->flags); | 2577 | set_bit(PHY_RESET, &tp->flags); |
2596 | } | 2578 | } |