From patchwork Tue Jul 28 02:55:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 11687935 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B57111392 for ; Tue, 28 Jul 2020 02:57:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8CA0A20825 for ; Tue, 28 Jul 2020 02:57:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="v1tILMvE"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ozzO8Eqz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8CA0A20825 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uOZRwcxK7LHyRPDj/bhMqFbleJILZPHlcva0Swr+veQ=; b=v1tILMvEpRSwlfOBHE99CmhD0 krAEtKbY2I6f6c6mtke+YPevvoCwlXsWbiYueu6AtWHZF1OfTh3QjLnBePwVME3uMygM/J81Y6q1Y ftzQeaqWGZOOfBKtMQrGnB/VmwIv4mWzaUizpIMq0744mk0M4U32b+pHzMPAIZGqgMDFi4wXPmM2S oaebA3C+xl3XUb2yyzTHAIeDkzBTcV4LiSvhMgLxzbFt9HeDNShuKDIoeVHPiEsx8qlORJMvgSBlO U+WnGNizcGL2V8kiOj+chfQdOWog4jYupPpueG3ZWyzLoglpSggS0ckFHJetIejPK/hjNJvqX/1FJ kDee8UIFw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0Fmb-0003pm-Qu; Tue, 28 Jul 2020 02:56:01 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0FmU-0003nS-8y for linux-arm-kernel@lists.infradead.org; Tue, 28 Jul 2020 02:55:55 +0000 Received: by mail-pf1-x444.google.com with SMTP id s26so10131793pfm.4 for ; Mon, 27 Jul 2020 19:55:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LSKd0G5Txp3QCoH0wblOaMdjCRcT0SQZyQIDSr/GeGM=; b=ozzO8EqzqybbL7ON31QioltDqBbDlQAkv8dbA2uiGm7Z7h8yLUFqMHddmxSsQuoUIn twUEUjYyNeesMrtzbv/MqY5JKwjrwl3+zT3pPyHxH0lXBPMPG30ZxrqZA00Op3EapAST /H8gkAZhQKHzXg1uZSTC8cbadi/94tGJ3nMzpfXJMOSL59OHoBPU1RMLCUJk+uBQVDEu uBrkJyjBnn7kw3VCf/3qoh9kmEu9EOOc9lIzabEIdBeEO0Tpau2Zd5g3y2QikOgRzGID gqlnX9fKazhPZK28L+dPlLYEvm8wp4irfELCrzBXQhW/E+S2PFAoI0blh0617tUiPcha LhqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=LSKd0G5Txp3QCoH0wblOaMdjCRcT0SQZyQIDSr/GeGM=; b=cQ70GnWK3q3h/LwCSF4SRdOHQNSUbZMeWIROsVK2OBtbxMkfbL8dZXVQLAp2gfvsYN w4doGNM+j8b704CfYgTNEsk+4Vcy/nhjzqNbI9cNV4hT9VS/wwXU18fdIfEiUCWzr5Nq NZcUUEiiXObJR0gSAAwHL1mW1Dn9na3OuXWGaJ03+GuDiYERFeBpYElnXEQJvxoQVvnG +dMf4a9wezGxm0hT3gTv7zOqz5QnhYwwSstGtNAVl8Wuu3X20iDa8hrANdEe/D/g3Tl7 4WNFvqq9mbHxJt5bWVXF42pNWOl5TcQmkmeOIzhawItgi/ExeAux9LYHGvFgMz82S8m1 Zt6Q== X-Gm-Message-State: AOAM533KsnbiuE9ah6ImQGZlTvUTYoowomQKTIKMrufIg6GCERMx87kc CBCtAbLfPtgVI+5E/2/CMsE= X-Google-Smtp-Source: ABdhPJz1jvzbg9lif0geIL/79cRtoqM0ogGNeVTpK8rAn5SyGc6I7ZdN/0EmA0Mqw5hu0GD548OfWw== X-Received: by 2002:a63:7cd:: with SMTP id 196mr22043450pgh.230.1595904952308; Mon, 27 Jul 2020 19:55:52 -0700 (PDT) Received: from localhost.localdomain ([45.124.203.15]) by smtp.gmail.com with ESMTPSA id w9sm15147407pfq.178.2020.07.27.19.55.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 19:55:51 -0700 (PDT) From: Joel Stanley To: linux-fsi@lists.ozlabs.org, Rob Herring Subject: [PATCH 4/5] fsi: aspeed: Add module param for bus divisor Date: Tue, 28 Jul 2020 12:25:26 +0930 Message-Id: <20200728025527.174503-5-joel@jms.id.au> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200728025527.174503-1-joel@jms.id.au> References: <20200728025527.174503-1-joel@jms.id.au> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200727_225554_355732_D1858B2D X-CRM114-Status: GOOD ( 18.70 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:444 listed in] [list.dnswl.org] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [joel.stan[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jeffery , devicetree@vger.kernel.org, Eddie James , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org For testing and hardware debugging a user may wish to override the divisor at runtime. By setting fsi_master_aspeed.bus_div=N, the divisor will be set to N, if 0 < N <= 0x3ff. This is a module parameter and not a device tree option as it will only need to be set when testing or debugging. Reviewed-by: Eddie James Signed-off-by: Joel Stanley --- drivers/fsi/fsi-master-aspeed.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/fsi/fsi-master-aspeed.c b/drivers/fsi/fsi-master-aspeed.c index f503f64ab32b..2531e826ba8b 100644 --- a/drivers/fsi/fsi-master-aspeed.c +++ b/drivers/fsi/fsi-master-aspeed.c @@ -87,6 +87,7 @@ static const u32 fsi_base = 0xa0000000; #define FSI_DIVISOR_DEFAULT 1 #define FSI_DIVISOR_CABLED 2 static u16 aspeed_fsi_divisor = FSI_DIVISOR_DEFAULT; +module_param_named(bus_div,aspeed_fsi_divisor, ushort, 0); #define OPB_POLL_TIMEOUT 10000 @@ -454,9 +455,12 @@ static int tacoma_cabled_fsi_fixup(struct device *dev) if (gpio) { /* * Cable signal integrity means we should run the bus - * slightly slower + * slightly slower. Do not override if a kernel param + * has already overridden. */ - aspeed_fsi_divisor = FSI_DIVISOR_CABLED; + if (aspeed_fsi_divisor == FSI_DIVISOR_DEFAULT) + aspeed_fsi_divisor = FSI_DIVISOR_CABLED; + gpiod_direction_output(mux_gpio, 0); dev_info(dev, "FSI configured for external cable\n"); } else {