linux-mips
[Top] [All Lists]

[PATCH] BCM63XX: prevent second enet registration on BCM6338

To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH] BCM63XX: prevent second enet registration on BCM6338
From: Florian Fainelli <florian@openwrt.org>
Date: Wed, 21 Jul 2010 22:59:26 +0200
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:date:subject :mime-version:x-uid:x-length:to:reply-to:content-type :content-transfer-encoding:message-id; bh=qJw9UtZ8CAin8tgs/82Ntm5gRcNT2BitevDkhOVe6sI=; b=HrfGtNUgULVfHj0MWpN3BNOi7tSUvtzb+FlqyN1nYnKo75JmhF8NKEVMBge0hi4Jdl f/b+NabCyf78qAGr/tzMVt40kA033ItgEiUgTAYzm7rPNuHUWpRMW+DKc+MWwYG1wrqE rozMUdAtmu2sd13K8pmDRpDM/JYW7sSEDOecg=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:date:subject:mime-version:x-uid:x-length:to:reply-to :content-type:content-transfer-encoding:message-id; b=Lw3nSDBeEnnMvStDf5na/xWCBoLadJJdJdpvb2D/yvTF1nuemPNQBF6CyTGrAx/BCb WrR3OvabfhAutGR7D/5CRV8DqDk57bRyzXinNLOt9auG+UzHLSm8VYnqZilQgQthrKxR sjpNvqVKUTPIBixIYflHJZxnANv9gXOhkhwZc=
Original-recipient: rfc822;linux-mips@linux-mips.org
Reply-to: Florian Fainelli <florian@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
This SoC has only one Ethernet MAC, so prevent registration of a second one.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/arch/mips/bcm63xx/dev-enet.c b/arch/mips/bcm63xx/dev-enet.c
index 9f544ba..39c2336 100644
--- a/arch/mips/bcm63xx/dev-enet.c
+++ b/arch/mips/bcm63xx/dev-enet.c
@@ -104,6 +104,9 @@ int __init bcm63xx_enet_register(int unit,
        if (unit > 1)
                return -ENODEV;
 
+       if (unit == 1 && BCMCPU_IS_6338())
+               return -ENODEV;
+
        if (!shared_device_registered) {
                shared_res[0].start = bcm63xx_regset_address(RSET_ENETDMA);
                shared_res[0].end = shared_res[0].start;



<Prev in Thread] Current Thread [Next in Thread>