浏览代码

MIPS: BCM63xx: Prevent second enet registration on BCM6338

This SoC has only one ethernet MAC, so prevent registration of a second one.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1482/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Florian Fainelli 15 年之前
父节点
当前提交
7f13f65e61
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      arch/mips/bcm63xx/dev-enet.c

+ 3 - 0
arch/mips/bcm63xx/dev-enet.c

@@ -104,6 +104,9 @@ int __init bcm63xx_enet_register(int unit,
 	if (unit > 1)
 	if (unit > 1)
 		return -ENODEV;
 		return -ENODEV;
 
 
+	if (unit == 1 && BCMCPU_IS_6338())
+		return -ENODEV;
+
 	if (!shared_device_registered) {
 	if (!shared_device_registered) {
 		shared_res[0].start = bcm63xx_regset_address(RSET_ENETDMA);
 		shared_res[0].start = bcm63xx_regset_address(RSET_ENETDMA);
 		shared_res[0].end = shared_res[0].start;
 		shared_res[0].end = shared_res[0].start;