diff options
author | René van Dorst <opensource@vdorst.com> | 2019-06-29 15:24:51 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-03 00:05:44 +0300 |
commit | cce581a0c3bed56252996112cda5652d90d9c028 (patch) | |
tree | ff54f0e6d2c17914224e39b2c097b173a3118e6e /drivers/net/ethernet/mediatek | |
parent | 3427beb6375d04e9627c67343872e79341a684ea (diff) | |
download | linux-cce581a0c3bed56252996112cda5652d90d9c028.tar.xz |
net: ethernet: mediatek: Allow non TRGMII mode with MT7621 DDR2 devices
No reason to error out on a MT7621 device with DDR2 memory when non
TRGMII mode is selected.
Only MT7621 DDR2 clock setup is not supported for TRGMII mode.
But non TRGMII mode doesn't need any special clock setup.
Signed-off-by: René van Dorst <opensource@vdorst.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mediatek')
-rw-r--r-- | drivers/net/ethernet/mediatek/mtk_eth_soc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index 066712f2e985..b20b3a5a1ebb 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -139,9 +139,12 @@ static int mt7621_gmac0_rgmii_adjust(struct mtk_eth *eth, { u32 val; - /* Check DDR memory type. Currently DDR2 is not supported. */ + /* Check DDR memory type. + * Currently TRGMII mode with DDR2 memory is not supported. + */ regmap_read(eth->ethsys, ETHSYS_SYSCFG, &val); - if (val & SYSCFG_DRAM_TYPE_DDR2) { + if (interface == PHY_INTERFACE_MODE_TRGMII && + val & SYSCFG_DRAM_TYPE_DDR2) { dev_err(eth->dev, "TRGMII mode with DDR2 memory is not supported!\n"); return -EOPNOTSUPP; |