]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: stmmac: loongson1: get ls1b resource only once
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 18 Jun 2025 10:41:14 +0000 (11:41 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Jun 2025 22:26:01 +0000 (15:26 -0700)
commite3527bf4dc338ebf12488fdec3e7a952bf3db5dd
tree1103c4d4d34eb526eb8529ebe20379ebc158d9e5
parentb1cffac4792b007866f57bd77b4486ad738855da
net: stmmac: loongson1: get ls1b resource only once

ls1b_dwmac_syscon_init() was getting the stmmac iomem resource to detect
which GMAC block is being used. Move this to a separate setup() function
that only runs at probe time, so it can sensibly behave with an
unrecognised resource adress. Use this to set a MAC index (id) which is
then used in place of testing the base address.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Keguang Zhang <keguang.zhang@gmail.com>
Tested-by: Keguang Zhang <keguang.zhang@gmail.com> # on LS1B & LS1C
Link: https://patch.msgid.link/E1uRqEE-004c7M-Go@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-loongson1.c