From patchwork Thu Jun 21 20:16:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 166378 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 9317CB6FA1 for ; Fri, 22 Jun 2012 06:16:41 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6FD4028085; Thu, 21 Jun 2012 22:16:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XYl4BT7lxZ+I; Thu, 21 Jun 2012 22:16:39 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3A4BF28086; Thu, 21 Jun 2012 22:16:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AFDB528086 for ; Thu, 21 Jun 2012 22:16:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HDr4EoiUxtLc for ; Thu, 21 Jun 2012 22:16:32 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by theia.denx.de (Postfix) with ESMTPS id 7B86728085 for ; Thu, 21 Jun 2012 22:16:30 +0200 (CEST) Received: by dacx6 with SMTP id x6so1323295dac.3 for ; Thu, 21 Jun 2012 13:16:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=vxOOeDB+0dR3o2+1iUaeW/DkIGTRt+vx5q3draqxqlc=; b=T5YUhT48oxqRd32ef8mxKvrB2elyxyPmk+es3q3PKtEm3c3+F3hVnb2ajTAEGVfhRj QzA2bFYzy00N7UsIUaVJb4NLZES/mRiIy2ns/BVea/f35b6YS51B8bF8NX3Nrd0JkFCf oB35ZlHXOnfvujeuU/kpwFrlK3SlgoTfcbG0wkY7wnpp9MtWjSobbJJ1fhDavKI1yq4o CyIouQ+GutblSOrfiVnHYbNb+bOciEM0KDNrRzREQ2/D/XjqBTNmIFg4Gcnlhthm+DBW BD5bXjFBZMdpHn37uEJzRLXWHmWpRlcbT+/UZ9JjX2CVjnajRsLxoIqXm2Zmt/g1DqQ+ xF1A== Received: by 10.68.130.3 with SMTP id oa3mr2163748pbb.62.1340309788792; Thu, 21 Jun 2012 13:16:28 -0700 (PDT) Received: from officeserver-2 ([70.96.116.236]) by mx.google.com with ESMTPS id qp9sm19046600pbc.9.2012.06.21.13.16.26 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Jun 2012 13:16:28 -0700 (PDT) Received: from tkisky by officeserver-2 with local (Exim 4.76) (envelope-from ) id 1Shnnl-0002A7-7z; Thu, 21 Jun 2012 13:16:25 -0700 From: Troy Kisky To: sbabic@denx.de, dirk.behme@googlemail.com Date: Thu, 21 Jun 2012 13:16:21 -0700 Message-Id: <1340309781-8281-1-git-send-email-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQl/YeEgeEtM8s4qSDLD9bM+2fZ8/NJ5MBJqZWlO8pFCwunI/3/5HZd5tZwb4+eZfqFzN9Pf Cc: r49496@freescale.com, u-boot@lists.denx.de, afleming@gmail.com, vz@mleia.com Subject: [U-Boot] [PATCH 1/1] net: phy: micrel: make ksz9021 phy accessible X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Micrel accidentally used the same part number for the KS8721 and KSZ9021. So, both cannot be in the same build of u-boot. Add a config option to handle this. Signed-off-by: Troy Kisky Acked-by: Vladimir Zapolskiy --- drivers/net/phy/micrel.c | 15 +++++++++++++-- include/configs/mx6qsabrelite.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index e3043df..30f3264 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -35,6 +35,12 @@ static struct phy_driver KSZ804_driver = { .shutdown = &genphy_shutdown, }; +#ifndef CONFIG_PHY_MICREL_KSZ9021 +/* + * I can't believe Micrel used the exact same part number + * for the KSZ9021 + * Shame Micrel, Shame!!!!! + */ static struct phy_driver KS8721_driver = { .name = "Micrel KS8721BL", .uid = 0x221610, @@ -44,7 +50,9 @@ static struct phy_driver KS8721_driver = { .startup = &genphy_startup, .shutdown = &genphy_shutdown, }; +#endif +#ifdef CONFIG_PHY_MICREL_KSZ9021 /* ksz9021 PHY Registers */ #define MII_KSZ9021_EXTENDED_CTRL 0x0b #define MII_KSZ9021_EXTENDED_DATAW 0x0c @@ -127,12 +135,15 @@ static struct phy_driver ksz9021_driver = { .startup = &ksz9021_startup, .shutdown = &genphy_shutdown, }; +#endif int phy_micrel_init(void) { phy_register(&KSZ804_driver); - phy_register(&KS8721_driver); +#ifdef CONFIG_PHY_MICREL_KSZ9021 phy_register(&ksz9021_driver); - +#else + phy_register(&KS8721_driver); +#endif return 0; } diff --git a/include/configs/mx6qsabrelite.h b/include/configs/mx6qsabrelite.h index feabc05..8623320 100644 --- a/include/configs/mx6qsabrelite.h +++ b/include/configs/mx6qsabrelite.h @@ -97,6 +97,7 @@ #define CONFIG_FEC_MXC_PHYADDR 6 #define CONFIG_PHYLIB #define CONFIG_PHY_MICREL +#define CONFIG_PHY_MICREL_KSZ9021 /* USB Configs */ #define CONFIG_CMD_USB