Commit c6fcc0e5 authored by RA-Jay Hung's avatar RA-Jay Hung Committed by John W. Linville

rt2x00: Correct initial value of US_CYC_CNT register for pcie interface

CLOCK CYCLE: Clock cycle count in 1us
PCI:0x21, PCIE:0x7d, USB:0x1e
Signed-off-by: default avatarRA-Jay Hung <jay_hung@ralinktech.com>
Acked-by: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b550911a
...@@ -372,8 +372,12 @@ ...@@ -372,8 +372,12 @@
/* /*
* US_CYC_CNT * US_CYC_CNT
* BT_MODE_EN: Bluetooth mode enable
* CLOCK CYCLE: Clock cycle count in 1us.
* PCI:0x21, PCIE:0x7d, USB:0x1e
*/ */
#define US_CYC_CNT 0x02a4 #define US_CYC_CNT 0x02a4
#define US_CYC_CNT_BT_MODE_EN FIELD32(0x00000100)
#define US_CYC_CNT_CLOCK_CYCLE FIELD32(0x000000ff) #define US_CYC_CNT_CLOCK_CYCLE FIELD32(0x000000ff)
/* /*
......
...@@ -2207,6 +2207,10 @@ static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev) ...@@ -2207,6 +2207,10 @@ static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
rt2800_register_read(rt2x00dev, US_CYC_CNT, &reg); rt2800_register_read(rt2x00dev, US_CYC_CNT, &reg);
rt2x00_set_field32(&reg, US_CYC_CNT_CLOCK_CYCLE, 30); rt2x00_set_field32(&reg, US_CYC_CNT_CLOCK_CYCLE, 30);
rt2800_register_write(rt2x00dev, US_CYC_CNT, reg); rt2800_register_write(rt2x00dev, US_CYC_CNT, reg);
} else if (rt2x00_is_pcie(rt2x00dev)) {
rt2800_register_read(rt2x00dev, US_CYC_CNT, &reg);
rt2x00_set_field32(&reg, US_CYC_CNT_CLOCK_CYCLE, 125);
rt2800_register_write(rt2x00dev, US_CYC_CNT, reg);
} }
rt2800_register_read(rt2x00dev, HT_FBK_CFG0, &reg); rt2800_register_read(rt2x00dev, HT_FBK_CFG0, &reg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment