From patchwork Mon Apr 15 14:01:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 236614 X-Patchwork-Delegate: hs@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 1D7862C00EB for ; Tue, 16 Apr 2013 00:01:18 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D905F4A134; Mon, 15 Apr 2013 16:01:15 +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 AsYFCN9WKo+v; Mon, 15 Apr 2013 16:01:15 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C49634A13C; Mon, 15 Apr 2013 16:01:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7027D4A13C for ; Mon, 15 Apr 2013 16:01:11 +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 RcYpRvZ2F+5u for ; Mon, 15 Apr 2013 16:01:08 +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-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by theia.denx.de (Postfix) with ESMTPS id C2B724A134 for ; Mon, 15 Apr 2013 16:01:07 +0200 (CEST) Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3ZqBFZ4sF6z3hk4F for ; Mon, 15 Apr 2013 16:01:06 +0200 (CEST) X-Auth-Info: JQJ7WjWzUQA/waI79qERmWvS6dKc0ZABcFafqfZj/Sw= Received: from localhost (p4FDE7EAB.dip.t-dialin.net [79.222.126.171]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA id 3ZqBFZ3yXmzbbgw for ; Mon, 15 Apr 2013 16:01:06 +0200 (CEST) From: Anatolij Gustschin To: u-boot@lists.denx.de Date: Mon, 15 Apr 2013 16:01:07 +0200 Message-Id: <1366034467-18150-1-git-send-email-agust@denx.de> X-Mailer: git-send-email 1.7.9.5 Subject: [U-Boot] [PATCH] post: fix I2C POST failure for devices in CONFIG_SYS_POST_I2C_IGNORES 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 Devices in CONFIG_SYS_POST_I2C_IGNORES list may be absent and the rule is not to report I2C POST failure for devices in this list. Currently this doesn't work since probing for these devices isn't done and thus they are not marked as successfully probed. Ignore optional devices when checking for devices that didn't respond. Signed-off-by: Anatolij Gustschin --- post/drivers/i2c.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/post/drivers/i2c.c b/post/drivers/i2c.c index 4cbd9f3..c93ae25 100644 --- a/post/drivers/i2c.c +++ b/post/drivers/i2c.c @@ -100,6 +100,8 @@ int i2c_post_test (int flags) for (i = 0; i < sizeof(i2c_addr_list); ++i) { if (i2c_addr_list[i] == 0xff) continue; + if (i2c_ignore_device(i2c_addr_list[i])) + continue; post_log("I2C: addr %02x did not respond\n", i2c_addr_list[i]); ret = -1; }