From patchwork Sat Oct 31 16:32:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1391523 X-Patchwork-Delegate: lokeshvutla@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=P+m4mDwQ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNl9N2hvkz9sSf for ; Sun, 1 Nov 2020 03:33:28 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BED6882483; Sat, 31 Oct 2020 17:33:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="P+m4mDwQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 78FCD824AE; Sat, 31 Oct 2020 17:33:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 750E482369 for ; Sat, 31 Oct 2020 17:33:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4D2252065D; Sat, 31 Oct 2020 16:33:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604161996; bh=51A+76wDOkTTxOSndd29KCqY+P6U5C4TlsN+sTch34Q=; h=From:To:Cc:Subject:Date:From; b=P+m4mDwQNm33B2sY9Hb0qsXSFDd0oNPpQJC9cwouCcxhPxJb3YuZkR8gR9Epfz6rK Jzn9HGmNBvTdueaqPiil3cqiJXn5VPGfomoM/NKnAxyJcbDVH08cEvMI9c/V1zZJf+ EunKJggVU5cLNqYdE5mMdFUX1sR/lFv4ouOOeAVQ= Received: by pali.im (Postfix) id DB46FBF4; Sat, 31 Oct 2020 17:33:13 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: u-boot@lists.denx.de, maemo-leste@lists.dyne.org, Ivaylo Dimitrov , Lokesh Vutla , Tom Rini Cc: Faiz Abbas , Peng Fan , Heiko Schocher , Adam Ford , Anatolij Gustschin , Simon Glass Subject: [PATCH 1/6] Nokia RX-51: Remove old comments from configs/nokia_rx51.h file Date: Sat, 31 Oct 2020 17:32:45 +0100 Message-Id: <20201031163250.14866-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean These comments are relict for old, now removed config options. So remove these obsoleted comments too. Signed-off-by: Pali Rohár --- include/configs/nokia_rx51.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h index 9b89120342..6879f52a0c 100644 --- a/include/configs/nokia_rx51.h +++ b/include/configs/nokia_rx51.h @@ -75,12 +75,6 @@ #define CONFIG_USBD_MANUFACTURER "Nokia" #define CONFIG_USBD_PRODUCT_NAME "N900" -/* commands to include */ - -/* - * TWL4030 - */ - #define GPIO_SLIDE 71 /* @@ -229,10 +223,6 @@ int rx51_kp_getc(struct stdio_dev *sdev); "run attachboot;" \ "echo" -/* - * Miscellaneous configurable options - */ - /* default load address */ #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) From patchwork Sat Oct 31 16:32:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1391524 X-Patchwork-Delegate: lokeshvutla@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=ICk388Ve; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNl9Z4NWfz9sSn for ; Sun, 1 Nov 2020 03:33:38 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A3231824FF; Sat, 31 Oct 2020 17:33:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="ICk388Ve"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 81EC3824F7; Sat, 31 Oct 2020 17:33:27 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id F1C6E824DA for ; Sat, 31 Oct 2020 17:33:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5D7B62065D; Sat, 31 Oct 2020 16:33:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604162002; bh=hajLKOyPn8WdZ7SVkBHituAN+Xjkb1LQkyOokGJsdgs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ICk388VeKnefhONkRsoVzn3u1az1Xtfoja0Ku/yJHZ2+3wrt4eVOHd5/7yxmIZ6po JdJExmDXlJg/rmEOg3FlxvP2bJHCunxHf+1Xsu62KcpngyW+0FtLvDN4gxzK8bN684 3jCBsT4/b3xxq4GrPzG7RU6q72YWVbULfGcnzgGM= Received: by pali.im (Postfix) id 957D3BF4; Sat, 31 Oct 2020 17:33:20 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: u-boot@lists.denx.de, maemo-leste@lists.dyne.org, Ivaylo Dimitrov , Lokesh Vutla , Tom Rini Cc: Faiz Abbas , Peng Fan , Heiko Schocher , Adam Ford , Anatolij Gustschin , Simon Glass Subject: [PATCH 2/6] Nokia RX-51: Fix crashing in U-Boot mmc function omap_hsmmc_stop_clock() Date: Sat, 31 Oct 2020 17:32:46 +0100 Message-Id: <20201031163250.14866-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201031163250.14866-1-pali@kernel.org> References: <20201031163250.14866-1-pali@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean After commit 04a2ea248f58 ("mmc: disable UHS modes if Vcc cannot be switched on and off") U-Boot started crashing on Nokia RX-51 while initializing mmc and caused reboot loop. It looks like that some clocks were not enabled and this patch fixes U-Boot mmc crash. Signed-off-by: Pali Rohár Cc: Ivaylo Dimitrov --- board/nokia/rx51/rx51.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c index 63531e1420..e11c527226 100644 --- a/board/nokia/rx51/rx51.c +++ b/board/nokia/rx51/rx51.c @@ -202,6 +202,8 @@ int board_init(void) { /* in SRAM or SDRAM, finish GPMC */ gpmc_init(); + /* Enable the clks & power */ + per_clocks_enable(); /* boot param addr */ gd->bd->bi_boot_params = OMAP34XX_SDRC_CS0 + 0x100; return 0; From patchwork Sat Oct 31 16:32:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1391525 X-Patchwork-Delegate: lokeshvutla@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=yCLErVjQ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNl9m3Mw5z9sSf for ; Sun, 1 Nov 2020 03:33:48 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6BDFF82504; Sat, 31 Oct 2020 17:33:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="yCLErVjQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 972698250D; Sat, 31 Oct 2020 17:33:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 75EEF824F4 for ; Sat, 31 Oct 2020 17:33:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E9657206A1; Sat, 31 Oct 2020 16:33:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604162007; bh=qoKqBRD5CnZyMwXLihyz+t71RaDyQQEs8goaXLD6O2o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yCLErVjQ5y0gsZg/POvmEu+EtFMdnfJuYsjEGiFdkK42VW5unLgRINY4O6olWzqhy KRvveqDjsNLxxJEE1F2qmELsxsnlfA7eADLBdTBHRuiHyepRXbw/Rl5yERUJIzRFw3 5cKl75RrEi1+2s/AQXJ744fsoJvGDXXspryX8MGw= Received: by pali.im (Postfix) id 4E818BF4; Sat, 31 Oct 2020 17:33:25 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: u-boot@lists.denx.de, maemo-leste@lists.dyne.org, Ivaylo Dimitrov , Lokesh Vutla , Tom Rini Cc: Faiz Abbas , Peng Fan , Heiko Schocher , Adam Ford , Anatolij Gustschin , Simon Glass Subject: [PATCH 3/6] Nokia RX-51: During init disable lp5523 led instead of resetting it Date: Sat, 31 Oct 2020 17:32:47 +0100 Message-Id: <20201031163250.14866-3-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201031163250.14866-1-pali@kernel.org> References: <20201031163250.14866-1-pali@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean After commit d5243359e1af ("OMAP24xx I2C: Add support for set-speed") U-Boot is unstable to reset lp5523 led. That commit added pooling for i2c poll ARDY bit which apparently is never set. It is not known what is happening here. Purpose of resetting lp5523 led in Nokia RX-51 code is just to turn off very bright led which is powered on by NOLO and expects next boot image (kernel or U-Boot) to turn it off. After testing we observed that just disabling lp5523 led is working fine. So as a workaround to this ARDY bit i2c issue we disable lp5523 led instead of resetting it. Signed-off-by: Pali Rohár Cc: Ivaylo Dimitrov --- board/nokia/rx51/rx51.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c index e11c527226..528c592441 100644 --- a/board/nokia/rx51/rx51.c +++ b/board/nokia/rx51/rx51.c @@ -394,9 +394,9 @@ int misc_init_r(void) char buf[12]; u8 state; - /* reset lp5523 led */ + /* disable lp5523 led */ if (i2c_get_chip_for_busnum(1, 0x32, 1, &dev) == 0) - dm_i2c_reg_write(dev, 0x3d, 0xff); + dm_i2c_reg_write(dev, 0x00, 0x00); /* initialize twl4030 power managment */ twl4030_power_init(); From patchwork Sat Oct 31 16:32:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1391526 X-Patchwork-Delegate: lokeshvutla@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=WN1cxScL; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNlB001MLz9sSf for ; Sun, 1 Nov 2020 03:33:59 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BE59D8250D; Sat, 31 Oct 2020 17:33:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="WN1cxScL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EBC528250F; Sat, 31 Oct 2020 17:33:39 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D54F78250B for ; Sat, 31 Oct 2020 17:33:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 492AE2065D; Sat, 31 Oct 2020 16:33:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604162010; bh=9USPiUP0V9ecStf0dYx2AjXKPtkzqfPQ50dkTYmRYjY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WN1cxScLzICj6eDNhZYcefv7I/SeKAkopOfuHd3nzr31fTrAcxuymf1Pdv2FeHD6a eGWqrYUYeIdqAOnQHMowcaL0dBPruEcA2X8ZaqZo8sCoq0Hh0Z0uQAt6lerPoH/zBz 3748UX8dgcriiGQz9dWvO5EdCsQV0+oms7jW7TJI= Received: by pali.im (Postfix) id 9973D1049; Sat, 31 Oct 2020 17:33:28 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: u-boot@lists.denx.de, maemo-leste@lists.dyne.org, Ivaylo Dimitrov , Lokesh Vutla , Tom Rini Cc: Faiz Abbas , Peng Fan , Heiko Schocher , Adam Ford , Anatolij Gustschin , Simon Glass Subject: [PATCH 4/6] Nokia RX-51: Update test script Date: Sat, 31 Oct 2020 17:32:48 +0100 Message-Id: <20201031163250.14866-4-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201031163250.14866-1-pali@kernel.org> References: <20201031163250.14866-1-pali@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Include emmc/nand suffix into bootmenu script names and fix leaking sleep processes when asynchronously waiting for them. 'wait -n' is not provided by /bin/sh, so run script under bash. Signed-off-by: Pali Rohár --- test/nokia_rx51_test.sh | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/test/nokia_rx51_test.sh b/test/nokia_rx51_test.sh index b17542b8c1..23fa935310 100755 --- a/test/nokia_rx51_test.sh +++ b/test/nokia_rx51_test.sh @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/bash -e # SPDX-License-Identifier: GPL-2.0+ # (C) 2020 Pali Rohár @@ -157,7 +157,7 @@ setenv bootmenu_1; setenv bootmenu_delay 1; setenv bootdelay 1; EOF -./mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n bootmenu -d bootmenu_emmc bootmenu_emmc.scr +./mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n bootmenu_emmc -d bootmenu_emmc bootmenu_emmc.scr # Generate bootmenu for OneNAND booting cat > bootmenu_nand << EOF @@ -166,7 +166,7 @@ setenv bootmenu_1; setenv bootmenu_delay 1; setenv bootdelay 1; EOF -./mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n bootmenu -d bootmenu_nand bootmenu_nand.scr +./mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n bootmenu_nand -d bootmenu_nand bootmenu_nand.scr # Generate combined image from u-boot and Maemo fiasco kernel dd if=kernel_2.6.28/boot/zImage-2.6.28-20103103+0m5.fiasco of=zImage-2.6.28-omap1 skip=95 bs=1 @@ -214,10 +214,11 @@ rm -f qemu_ram.log qemu_pid=$! tail -F qemu_ram.log & tail_pid=$! -{ sleep 300 || true; kill -9 $qemu_pid $tail_pid 2>/dev/null || true; } & +sleep 300 & sleep_pid=$! -wait $qemu_pid || true -kill -9 $tail_pid $sleep_pid 2>/dev/null || true +wait -n $sleep_pid $qemu_pid || true +kill -9 $tail_pid $sleep_pid $qemu_pid 2>/dev/null || true +wait || true # Run MTD image in qemu and wait for 300s if kernel from eMMC is correctly booted rm -f qemu_emmc.log @@ -225,10 +226,11 @@ rm -f qemu_emmc.log qemu_pid=$! tail -F qemu_emmc.log & tail_pid=$! -{ sleep 300 || true; kill -9 $qemu_pid $tail_pid 2>/dev/null || true; } & +sleep 300 & sleep_pid=$! -wait $qemu_pid || true -kill -9 $tail_pid $sleep_pid 2>/dev/null || true +wait -n $sleep_pid $qemu_pid || true +kill -9 $tail_pid $sleep_pid $qemu_pid 2>/dev/null || true +wait || true # Run MTD image in qemu and wait for 300s if kernel from OneNAND is correctly booted rm -f qemu_nand.log @@ -236,10 +238,11 @@ rm -f qemu_nand.log qemu_pid=$! tail -F qemu_nand.log & tail_pid=$! -{ sleep 300 || true; kill -9 $qemu_pid $tail_pid 2>/dev/null || true; } & +sleep 300 & sleep_pid=$! -wait $qemu_pid || true -kill -9 $tail_pid $sleep_pid 2>/dev/null || true +wait -n $sleep_pid $qemu_pid || true +kill -9 $tail_pid $sleep_pid $qemu_pid 2>/dev/null || true +wait || true echo echo "=============================" From patchwork Sat Oct 31 16:32:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1391527 X-Patchwork-Delegate: lokeshvutla@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=d8Ymu0+h; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNlBC6Hkxz9sSf for ; Sun, 1 Nov 2020 03:34:11 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 829E382518; Sat, 31 Oct 2020 17:33:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="d8Ymu0+h"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ACA4C82505; Sat, 31 Oct 2020 17:33:38 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2C629824DA for ; Sat, 31 Oct 2020 17:33:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A8608206B6; Sat, 31 Oct 2020 16:33:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604162012; bh=Gr6QaGJqDzqXTpuDhnVmBajCdnzyCR/RZjK8kspSd1g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d8Ymu0+heBGz7lcNvsOLlWuMWmx+oZKnFtkF0iNrGHE+CLwjf05cREyfZjwbqngHE fqumrXM2TQGxgNONGBHk2gEvS8qVEoC8k0ulXqJUymYE4CnXBlM/EqyFnE/S8SbqzE CJ8kIw3ncf7loipub2OOemDn1yyUr3K0R14MM7XA= Received: by pali.im (Postfix) id 07317BF4; Sat, 31 Oct 2020 17:33:31 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: u-boot@lists.denx.de, maemo-leste@lists.dyne.org, Ivaylo Dimitrov , Lokesh Vutla , Tom Rini Cc: Faiz Abbas , Peng Fan , Heiko Schocher , Adam Ford , Anatolij Gustschin , Simon Glass Subject: [PATCH 5/6] Nokia RX-51: Make onenand working Date: Sat, 31 Oct 2020 17:32:49 +0100 Message-Id: <20201031163250.14866-5-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201031163250.14866-1-pali@kernel.org> References: <20201031163250.14866-1-pali@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean From: Ivaylo Dimitrov set_gpmc_cs0() sets wrong timings and size for Nokia N900 onenand flash. Fix that by setting the correct timings and size from the board code Signed-off-by: Ivaylo Dimitrov Tested-by: Pali Rohár --- board/nokia/rx51/rx51.c | 15 +++++++++++++++ board/nokia/rx51/rx51.h | 7 +++++++ 2 files changed, 22 insertions(+) diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c index 528c592441..3d62b5d9ad 100644 --- a/board/nokia/rx51/rx51.c +++ b/board/nokia/rx51/rx51.c @@ -200,8 +200,23 @@ static void reuse_atags(void) */ int board_init(void) { +#if defined(CONFIG_CMD_ONENAND) + const u32 gpmc_regs_onenandrx51[GPMC_MAX_REG] = { + ONENAND_GPMC_CONFIG1_RX51, + ONENAND_GPMC_CONFIG2_RX51, + ONENAND_GPMC_CONFIG3_RX51, + ONENAND_GPMC_CONFIG4_RX51, + ONENAND_GPMC_CONFIG5_RX51, + ONENAND_GPMC_CONFIG6_RX51, + 0 + }; +#endif /* in SRAM or SDRAM, finish GPMC */ gpmc_init(); +#if defined(CONFIG_CMD_ONENAND) + enable_gpmc_cs_config(gpmc_regs_onenandrx51, &gpmc_cfg->cs[0], + CONFIG_SYS_ONENAND_BASE, GPMC_SIZE_256M); +#endif /* Enable the clks & power */ per_clocks_enable(); /* boot param addr */ diff --git a/board/nokia/rx51/rx51.h b/board/nokia/rx51/rx51.h index fa1b42bf21..4eff823a1b 100644 --- a/board/nokia/rx51/rx51.h +++ b/board/nokia/rx51/rx51.h @@ -367,4 +367,11 @@ struct emu_hal_params_rx51 { MUX_VAL(CP(UART2_RTS), (IDIS | PTD | DIS | M0)) /*UART2_RTS*/\ MUX_VAL(CP(UART2_TX), (IDIS | PTD | DIS | M0)) /*UART2_TX*/ +#define ONENAND_GPMC_CONFIG1_RX51 0xfb001202 +#define ONENAND_GPMC_CONFIG2_RX51 0x00111100 +#define ONENAND_GPMC_CONFIG3_RX51 0x00020200 +#define ONENAND_GPMC_CONFIG4_RX51 0x11001102 +#define ONENAND_GPMC_CONFIG5_RX51 0x03101616 +#define ONENAND_GPMC_CONFIG6_RX51 0x90060000 + #endif From patchwork Sat Oct 31 16:32:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1391528 X-Patchwork-Delegate: lokeshvutla@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=xQl9nMp/; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CNlBQ6GFzz9sSf for ; Sun, 1 Nov 2020 03:34:22 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 32C468252A; Sat, 31 Oct 2020 17:34:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="xQl9nMp/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8C675824F7; Sat, 31 Oct 2020 17:33:40 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 674D9824F7 for ; Sat, 31 Oct 2020 17:33:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BEBF32065D; Sat, 31 Oct 2020 16:33:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604162014; bh=51yEpp8JXMlFINNbi1QK5XqvnG/B/u2UPzbHdeHlLMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xQl9nMp/tYj2TgDVQW/iUS1wAXIX+YgyYIFPLlkM8Ev4mKhOuS35K6wQnpzgwtVEA UrQ5q1+YK3R6WS/YssAYo406jb6MMAzkjA2CGaSiGPHdqqzDaxvlzQ+PQN2eQ1nVs9 Ai/RDgP0RNfNSk9HexolIIyaCf54qzcZaH8QGsHI= Received: by pali.im (Postfix) id DBFA410D0; Sat, 31 Oct 2020 17:33:32 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: u-boot@lists.denx.de, maemo-leste@lists.dyne.org, Ivaylo Dimitrov , Lokesh Vutla , Tom Rini Cc: Faiz Abbas , Peng Fan , Heiko Schocher , Adam Ford , Anatolij Gustschin , Simon Glass Subject: [PATCH 6/6] mtd: OneNAND: Set MTD type Date: Sat, 31 Oct 2020 17:32:50 +0100 Message-Id: <20201031163250.14866-6-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201031163250.14866-1-pali@kernel.org> References: <20201031163250.14866-1-pali@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean onenand_probe() function is missing to set mtd->type. So set same type as which sets onenand Linux kernel driver. After this change 'mtd list' prints correct type instead of 'Unknown'. Signed-off-by: Pali Rohár --- drivers/mtd/onenand/onenand_base.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 36daef01ae..09daa0dd36 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -2657,6 +2657,7 @@ int onenand_probe(struct mtd_info *mtd) else mtd->size = this->chipsize; + mtd->type = ONENAND_IS_MLC(this) ? MTD_MLCNANDFLASH : MTD_NANDFLASH; mtd->flags = MTD_CAP_NANDFLASH; mtd->_erase = onenand_erase; mtd->_read_oob = onenand_read_oob;