• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂528e483a09db22798aec022fc6ca2f4ab40670d4 (tree)
時間2022-07-14 06:03:37
作者Weijie Gao <weijie.gao@medi...>
CommiterDaniel Schwierzeck

Log Message

net: mediatek: remap iobase address

The iobase address from dts node is actually physical address. It's
identical to the virtual address in ARM platform. This is ok because this
driver was used only by ARM platforms (mt7622/mt7623 ...).

But now this driver will be used by mt7621 which is a MIPS SoC. For MIPS
platform the physical address space is mapped to KSEG0 and KSEG1 and this
makes the virtual address apparently not idential to its physical address.

To solve this issue, this patch replaces dev_read_addr with dev_remap_addr
to get the remapped iobase address.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

Change Summary

差異

--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -1419,7 +1419,7 @@ static int mtk_eth_of_to_plat(struct udevice *dev)
14191419
14201420 priv->soc = dev_get_driver_data(dev);
14211421
1422- pdata->iobase = dev_read_addr(dev);
1422+ pdata->iobase = (phys_addr_t)dev_remap_addr(dev);
14231423
14241424 /* get corresponding ethsys phandle */
14251425 ret = dev_read_phandle_with_args(dev, "mediatek,ethsys", NULL, 0, 0,