提交 72c60683 编写于 作者: M Mike McCormack 提交者: David S. Miller

sky2: Use 32bit read to read Y2_VAUX_AVAIL

B0_CTST is a 24bit register according to the vendor driver (sk98lin).
A 16bit read on B0_CTST will always return 0 for Y2_VAUX_AVAIL (1<<16),
 so use a 32bit read when testing Y2_VAUX_AVAIL
Signed-off-by: NMike McCormack <mikem@ring3k.org>
Acked-by: NStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 90bbebb4
...@@ -273,7 +273,7 @@ static void sky2_power_aux(struct sky2_hw *hw) ...@@ -273,7 +273,7 @@ static void sky2_power_aux(struct sky2_hw *hw)
Y2_COR_CLK_LNK2_DIS | Y2_CLK_GAT_LNK2_DIS); Y2_COR_CLK_LNK2_DIS | Y2_CLK_GAT_LNK2_DIS);
/* switch power to VAUX */ /* switch power to VAUX */
if (sky2_read16(hw, B0_CTST) & Y2_VAUX_AVAIL) if (sky2_read32(hw, B0_CTST) & Y2_VAUX_AVAIL)
sky2_write8(hw, B0_POWER_CTRL, sky2_write8(hw, B0_POWER_CTRL,
(PC_VAUX_ENA | PC_VCC_ENA | (PC_VAUX_ENA | PC_VCC_ENA |
PC_VAUX_ON | PC_VCC_OFF)); PC_VAUX_ON | PC_VCC_OFF));
......
...@@ -260,7 +260,7 @@ enum csr_regs { ...@@ -260,7 +260,7 @@ enum csr_regs {
Y2_CFG_AER = 0x1d00, /* PCI Advanced Error Report region */ Y2_CFG_AER = 0x1d00, /* PCI Advanced Error Report region */
}; };
/* B0_CTST 16 bit Control/Status register */ /* B0_CTST 24 bit Control/Status register */
enum { enum {
Y2_VMAIN_AVAIL = 1<<17,/* VMAIN available (YUKON-2 only) */ Y2_VMAIN_AVAIL = 1<<17,/* VMAIN available (YUKON-2 only) */
Y2_VAUX_AVAIL = 1<<16,/* VAUX available (YUKON-2 only) */ Y2_VAUX_AVAIL = 1<<16,/* VAUX available (YUKON-2 only) */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册