net: ethernet: mtk_eth_soc: use generic allocator for SRAM
authorDaniel Golle <daniel@makrotopia.org>
Wed, 2 Jul 2025 13:14:56 +0000 (14:14 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Jul 2025 01:50:45 +0000 (18:50 -0700)
commit04c7aaccdcf60a0aff94acdd182561a6dd4c51c5
tree7a8ceb252a1bbe73b1004784f9338c1fce59d0d1
parentd717d32f517f79da11065fd6334c780a495ef097
net: ethernet: mtk_eth_soc: use generic allocator for SRAM

Use a dedicated "mmio-sram" node and the generic allocator
instead of open-coding SRAM allocation for DMA rings.
Keep support for legacy device trees but notify the user via a
warning to update, and let the ethernet driver create the
gen_pool in this case.

Co-developed-by: Frank Wunderlich <frank-w@public-files.de>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/c2b9242229d06af4e468204bcf42daa1535c3a72.1751461762.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mediatek/Kconfig
drivers/net/ethernet/mediatek/mtk_eth_soc.c
drivers/net/ethernet/mediatek/mtk_eth_soc.h