From patchwork Wed Nov 9 04:48:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Gagniuc X-Patchwork-Id: 692864 X-Patchwork-Delegate: trini@ti.com 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 3tDY5T6s43z9t1b for ; Thu, 10 Nov 2016 04:27:08 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="J0WY1Iof"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1344B4BD3D; Wed, 9 Nov 2016 18:27:05 +0100 (CET) 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 yhv-lXgwwVt7; Wed, 9 Nov 2016 18:27:04 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8F3124BA29; Wed, 9 Nov 2016 18:27:04 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CB2604B811 for ; Wed, 9 Nov 2016 05:48:58 +0100 (CET) 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 4mRieE2KvxHP for ; Wed, 9 Nov 2016 05:48:58 +0100 (CET) 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-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by theia.denx.de (Postfix) with ESMTPS id 439094B6B3 for ; Wed, 9 Nov 2016 05:48:54 +0100 (CET) Received: by mail-pf0-f193.google.com with SMTP id 144so13702118pfv.0 for ; Tue, 08 Nov 2016 20:48:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=emSRy/2vfpsS24RVSw3kw0qzoB+7H0OJv99o41sGbvs=; b=J0WY1IofLXQb9QAhboJNk3KE/u/cHwKJVOxjXJuufLhucUCz9cihxZZWqkHxBh8TO7 01lYQ4aFV2F72JI2zTml7MCQakdn1hPFEVuUUNhdkQeoCIwDE/tVqndXquHcXXb3aiuq PQwfGyAnDJZCilEZWdcWGawrMuH46AXgNArrZdAwQAJ+MIrlKPXKKCJXAjPknV9KVOHc vaRTkAb7jw1WSSM4LfwBe+iCikXGhqawTPadXC+ROsUTSzm7Ua67fqr9EjNHNViwHMP+ VXRXjqNHUJoJTViyh8cL9QW4WtdMpFSUVul3HFPm5H5I7I94Zsnu1RudD7k0wj8t1EIc PwfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=emSRy/2vfpsS24RVSw3kw0qzoB+7H0OJv99o41sGbvs=; b=PucUdeD5MKttZ8mMQiasHkngwlOIY0PWpq0NYpRIn19tAi0TUFsTjWHuXobNVB8+Z2 TG2DzP6mOZ1Sl0ZkD29qvatI4HB0ABIyKmynPaW+D/slzcZIdaL2Rbzm4ugfjMCjrtk0 3s6htYGR2hPIMxaQespkEKrsK/82C0fihVNdrShqoKPAKRk8iqxtgpv69en4V+tdNIk2 l76F9fhtMaFeACH7uSlDVn9Hem4dXebf3DbVCTC7fspi5wTA+waBoTZ1JJ4zcNTkdqNT abCx03O052bFiCMWekLFfRol4efybPPEhxanDXAh77ZWVqHhZcSKZAphqO/OeNH27neA fkNg== X-Gm-Message-State: ABUngvevfpJ4k4dLTPhzBLP04IXpxzVZxtKha2ZIy3QOpTwy1Qk/1YwEwic4r+xL/4Kx3Q== X-Received: by 10.99.52.10 with SMTP id b10mr12085562pga.42.1478666932485; Tue, 08 Nov 2016 20:48:52 -0800 (PST) Received: from nuclearis2_1.lan (c-50-131-153-94.hsd1.ca.comcast.net. [50.131.153.94]) by smtp.gmail.com with ESMTPSA id s64sm51541701pfk.81.2016.11.08.20.48.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Nov 2016 20:48:51 -0800 (PST) From: Alexandru Gagniuc To: u-boot@lists.denx.de Date: Tue, 8 Nov 2016 20:48:44 -0800 Message-Id: <1478666924-21599-1-git-send-email-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.7.4 X-Mailman-Approved-At: Wed, 09 Nov 2016 18:27:02 +0100 Cc: Alexandru Gagniuc Subject: [U-Boot] [PATCH] board: am335x/mux: Do not hang when encountering a bad EEPROM X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" In most cases, the SPL and u-boot.img will be on the same boot media. Since the SPL was loaded by the boot rom, the pinmux will already have been configured for this media. This, the board will still be able to boot successfully, or at least reach the u-boot console, where more recovery options are available. I've encountered this on a beaglebone black with a corrupted EEPROM. Removing this check allowed the board to boot successfully. I've also seen this on EVM-based boards with an unprogrammed EEPROM. On those boards, for some reason there were no UART messages. This made it look as if the SOC was dead. Remove the hang(), as it is not a fatal error. Also reformat the error message to be clearer as to the cause. The original message made it appear as if the wrong binary was being loaded. Signed-off-by: Alexandru Gagniuc Reviewed-by: Tom Rini --- board/ti/am335x/mux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c index 8afa5f9..ad85b3a 100644 --- a/board/ti/am335x/mux.c +++ b/board/ti/am335x/mux.c @@ -397,7 +397,7 @@ void enable_board_pin_mux(void) configure_module_pin_mux(rmii1_pin_mux); configure_module_pin_mux(spi0_pin_mux); } else { - puts("Unknown board, cannot configure pinmux."); - hang(); + /* Unknown board. We might still be able to boot. */ + puts("Bad EEPROM or unknown board, cannot configure pinmux."); } }