From patchwork Mon Sep 12 04:05:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 114270 X-Patchwork-Delegate: sbabic@denx.de 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 1DE2FB7270 for ; Mon, 12 Sep 2011 14:06:39 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8E2B6282AC; Mon, 12 Sep 2011 06:06:34 +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 WFKHgsJ65uZr; Mon, 12 Sep 2011 06:06:34 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9D14C28268; Mon, 12 Sep 2011 06:06:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8416228235 for ; Mon, 12 Sep 2011 06:06:07 +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 Xe3b518Jo-Z3 for ; Mon, 12 Sep 2011 06:06:07 +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-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by theia.denx.de (Postfix) with ESMTPS id 4628E28238 for ; Mon, 12 Sep 2011 06:05:54 +0200 (CEST) Received: by mail-fx0-f44.google.com with SMTP id 18so571231fxd.3 for ; Sun, 11 Sep 2011 21:05:54 -0700 (PDT) Received: by 10.223.34.18 with SMTP id j18mr1250664fad.123.1315800354042; Sun, 11 Sep 2011 21:05:54 -0700 (PDT) Received: from mashiro.kolej.mff.cuni.cz (vasut.kolej.mff.cuni.cz [78.128.198.52]) by mx.google.com with ESMTPS id o16sm6251438fag.21.2011.09.11.21.05.52 (version=SSLv3 cipher=OTHER); Sun, 11 Sep 2011 21:05:53 -0700 (PDT) From: Marek Vasut To: u-boot@lists.denx.de Date: Mon, 12 Sep 2011 06:05:33 +0200 Message-Id: <1315800339-19823-6-git-send-email-marek.vasut@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1315800339-19823-1-git-send-email-marek.vasut@gmail.com> References: <1315800339-19823-1-git-send-email-marek.vasut@gmail.com> Cc: Ben Warren Subject: [U-Boot] [PATCH 05/11] FEC: Allow selection of MII mode via CONFIG_FEC_XCV_TYPE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 The default is MII100, which was hardcoded previously in the driver. Signed-off-by: Marek Vasut Cc: Ben Warren Cc: Stefano Babic Cc: Wolfgang Denk Cc: Detlev Zundel --- drivers/net/fec_mxc.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 32854fb..61b80b2 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -38,6 +38,10 @@ DECLARE_GLOBAL_DATA_PTR; #error "CONFIG_MII has to be defined!" #endif +#ifndef CONFIG_FEC_XCV_TYPE +#define CONFIG_FEC_XCV_TYPE MII100 +#endif + #undef DEBUG struct nbuf { @@ -711,7 +715,7 @@ static int fec_probe(bd_t *bd) fec->eth = (struct ethernet_regs *)IMX_FEC_BASE; fec->bd = bd; - fec->xcv_type = MII100; + fec->xcv_type = CONFIG_FEC_XCV_TYPE; /* Reset chip. */ writel(readl(&fec->eth->ecntrl) | FEC_ECNTRL_RESET, &fec->eth->ecntrl);