diff options
author | John Crispin <blogic@openwrt.org> | 2014-11-14 16:52:30 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-11-14 16:52:30 +0000 |
commit | 48fdd908aceb5e526424a036fa611976b97b9302 (patch) | |
tree | 2b9a7ba56ea6ece143d71807d0b3b126bb99f1bd /target/linux/ramips/files/drivers | |
parent | a8ee7c422f3d04f76d4cd2b2ee264d16d0775f53 (diff) | |
download | upstream-48fdd908aceb5e526424a036fa611976b97b9302.tar.gz upstream-48fdd908aceb5e526424a036fa611976b97b9302.tar.bz2 upstream-48fdd908aceb5e526424a036fa611976b97b9302.zip |
ralink: mt7621 has a different base addr for PVID
Signed-off-by: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43243 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/files/drivers')
-rw-r--r-- | target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c index 2f3018d6a4..1a40aff77b 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c @@ -27,6 +27,7 @@ #define MT7620A_CDMA_CSG_CFG 0x400 #define MT7620_DMA_VID (MT7620A_CDMA_CSG_CFG | 0x30) +#define MT7621_DMA_VID 0xa8 #define MT7620A_DMA_2B_OFFSET BIT(31) #define MT7620A_RESET_FE BIT(21) #define MT7621_RESET_FE BIT(6) @@ -76,6 +77,23 @@ static const u32 mt7620_reg_table[FE_REG_COUNT] = { [FE_REG_FE_RST_GL] = MT7621_FE_RST_GL, }; +static const u32 mt7621_reg_table[FE_REG_COUNT] = { + [FE_REG_PDMA_GLO_CFG] = RT5350_PDMA_GLO_CFG, + [FE_REG_PDMA_RST_CFG] = RT5350_PDMA_RST_CFG, + [FE_REG_DLY_INT_CFG] = RT5350_DLY_INT_CFG, + [FE_REG_TX_BASE_PTR0] = RT5350_TX_BASE_PTR0, + [FE_REG_TX_MAX_CNT0] = RT5350_TX_MAX_CNT0, + [FE_REG_TX_CTX_IDX0] = RT5350_TX_CTX_IDX0, + [FE_REG_RX_BASE_PTR0] = RT5350_RX_BASE_PTR0, + [FE_REG_RX_MAX_CNT0] = RT5350_RX_MAX_CNT0, + [FE_REG_RX_CALC_IDX0] = RT5350_RX_CALC_IDX0, + [FE_REG_FE_INT_ENABLE] = RT5350_FE_INT_ENABLE, + [FE_REG_FE_INT_STATUS] = RT5350_FE_INT_STATUS, + [FE_REG_FE_DMA_VID_BASE] = MT7621_DMA_VID, + [FE_REG_FE_COUNTER_BASE] = MT7620_GDM1_TX_GBCNT, + [FE_REG_FE_RST_GL] = MT7621_FE_RST_GL, +}; + static void mt7620_fe_reset(void) { u32 val = rt_sysc_r32(SYSC_REG_RESET_CTRL); @@ -213,7 +231,7 @@ static struct fe_soc_data mt7621_data = { .rx_dma = mt7620_rx_dma, .switch_init = mt7620_gsw_probe, .switch_config = mt7621_gsw_config, - .reg_table = mt7620_reg_table, + .reg_table = mt7621_reg_table, .pdma_glo_cfg = FE_PDMA_SIZE_16DWORDS | MT7620A_DMA_2B_OFFSET, .rx_dly_int = RT5350_RX_DLY_INT, .tx_dly_int = RT5350_TX_DLY_INT, |