From patchwork Thu Jun 11 19:45:05 2020
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Pratyush Yadav
X-Patchwork-Id: 1307711
X-Patchwork-Delegate: trini@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=quarantine dis=none) header.from=ti.com
Authentication-Results: ozlabs.org;
dkim=pass (1024-bit key;
unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256
header.s=ti-com-17Q1 header.b=en78eVCY;
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 49jZ9d6bXXz9sRK
for ; Fri, 12 Jun 2020 05:46:29 +1000 (AEST)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id 7FFD581CD7;
Thu, 11 Jun 2020 21:45:40 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=quarantine dis=none) header.from=ti.com
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=ti.com header.i=@ti.com header.b="en78eVCY";
dkim-atps=neutral
Received: by phobos.denx.de (Postfix, from userid 109)
id DB4F981C80; Thu, 11 Jun 2020 21:45:25 +0200 (CEST)
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 lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id 2449D81C75
for ; Thu, 11 Jun 2020 21:45:20 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=quarantine dis=none) header.from=ti.com
Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=p.yadav@ti.com
Received: from fllv0035.itg.ti.com ([10.64.41.0])
by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 05BJjJfo076831;
Thu, 11 Jun 2020 14:45:19 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com;
s=ti-com-17Q1; t=1591904719;
bh=ymFfI0h97oqiBsb07sqPJBzgduwSZoem5/obHHBZrSA=;
h=From:To:CC:Subject:Date:In-Reply-To:References;
b=en78eVCYqb58qaMtHcMCw4f3sw7DdI/ncyoceK0g2Pz6Bndj1A85jxVp8z98pR1jY
sMEKG0jj5iRSTGk82sj7kX2DO9TUzyxMDp7LhRf/7zpgUMfgcNwQUnk0VPwfZh3juq
R4a9RlleThUn2FEI4fTLf4TIsAbtez1UY2Di9GEU=
Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21])
by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 05BJjJlh067788;
Thu, 11 Jun 2020 14:45:19 -0500
Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE100.ent.ti.com
(10.64.6.21) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Thu, 11
Jun 2020 14:45:18 -0500
Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE106.ent.ti.com
(10.64.6.27) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via
Frontend Transport; Thu, 11 Jun 2020 14:45:18 -0500
Received: from pratyush-OptiPlex-790.dhcp.ti.com (ileax41-snat.itg.ti.com
[10.172.224.153])
by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 05BJj7Zw091428;
Thu, 11 Jun 2020 14:45:17 -0500
From: Pratyush Yadav
To: Simon Glass ,
CC: Pratyush Yadav , Vignesh Raghavendra ,
Sekhar Nori
Subject: [PATCH v3 5/6] sandbox: Enable memio operations in board_init
Date: Fri, 12 Jun 2020 01:15:05 +0530
Message-ID: <20200611194506.7263-6-p.yadav@ti.com>
X-Mailer: git-send-email 2.25.0
In-Reply-To: <20200611194506.7263-1-p.yadav@ti.com>
References: <20200611194506.7263-1-p.yadav@ti.com>
MIME-Version: 1.0
X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.30rc1
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.2 at phobos.denx.de
X-Virus-Status: Clean
initr_dm_devices() is called somewhere after board_init(). It can be
used by drivers to initialize devices to some default bootup state.
Those devices might use mmio read/write operations to perform the
initialization.
One such example is the mux devices. The mux framework initializes the
muxes to their default state after idle state in
mux_uclass_post_probe(). One type of mux controller is the MMIO mux
controller. Initializing a MMIO mux to idle state can require a mmio
read and write operation.
With memio disabled, the reads return 0 and the writes go off into the
void. This makes it impossible to initialize muxes to their idle state
on boot, and consequentially makes it impossible to test that in
sandbox.
These same initializations work fine on actual hardware (tested on TI
J721E EVM). So, enable memio operations on boot so devices like mux can
perform whatever initialization they need. state_reset_for_test() will
disable it before running tests so tests still need to enable memio
manually.
Signed-off-by: Pratyush Yadav
---
board/sandbox/sandbox.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c
index 1372003018..d7eb207822 100644
--- a/board/sandbox/sandbox.c
+++ b/board/sandbox/sandbox.c
@@ -55,6 +55,8 @@ int board_init(void)
if (IS_ENABLED(CONFIG_LED))
led_default_state();
+ sandbox_set_enable_memio(true);
+
return 0;
}