]> git.baikalelectronics.ru Git - uboot.git/commit
net: mediatek: remap iobase address
authorWeijie Gao <weijie.gao@mediatek.com>
Fri, 20 May 2022 03:23:31 +0000 (11:23 +0800)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Wed, 13 Jul 2022 21:03:37 +0000 (23:03 +0200)
commit1c01dcb92c25311ff1aca5dad907e673647fb6d5
tree5c8d7d03a892a7632417412e845f49693dcea323
parent2b6dab7525f10cf0d05bc05eb4553845eb1dc166
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>
drivers/net/mtk_eth.c