From patchwork Tue Feb 17 02:09:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 5836171 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 966B8BF440 for ; Tue, 17 Feb 2015 02:09:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B90DE20274 for ; Tue, 17 Feb 2015 02:09:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DBD6220279 for ; Tue, 17 Feb 2015 02:09:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755082AbbBQCJb (ORCPT ); Mon, 16 Feb 2015 21:09:31 -0500 Received: from mail-pd0-f177.google.com ([209.85.192.177]:35073 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755075AbbBQCJ3 (ORCPT ); Mon, 16 Feb 2015 21:09:29 -0500 Received: by pdbfl12 with SMTP id fl12so40227135pdb.2; Mon, 16 Feb 2015 18:09:29 -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:in-reply-to:references; bh=rciiJHq8mzvgtVrs8t1A6i7OfFpsBZwZCeqkLQdLACA=; b=iTlyK08L2386IhDVIR9e5MH7NsytigBbkkXoizqa7VtntsdkORqxI/cjFl6LSP5ic7 Qk24wLw5VaxJZFtDBUyK1H0xZXHsjWJmJYaAMWqaJbkSiijOSCjQgvlhJHSsGDegNtSC LSLLp8U1dFWISeNLNSbj+x4zN6rEHmUYgqHgbjIOrds6kFkOQ0zsuLaBvRPfNINA+cMV UC622DxoubWWkeFAwMEGgR3bBIDRVvoypcBXctl14cuCsfKE0b6sL6D/TIanF4iqjeoQ jt8H4yptNwLghHhull+dEpWRjjX1gstqKrwNfe948AfnDrAisrDvY62nagJ3+BXyM9f7 hTGQ== X-Received: by 10.68.201.225 with SMTP id kd1mr45145960pbc.11.1424138969232; Mon, 16 Feb 2015 18:09:29 -0800 (PST) Received: from fainelli-desktop.broadcom.com (5520-maca-inet1-outside.broadcom.com. [216.31.211.11]) by mx.google.com with ESMTPSA id cq5sm13624562pbc.79.2015.02.16.18.09.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Feb 2015 18:09:28 -0800 (PST) From: Florian Fainelli To: linux-mips@linux-mips.org Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, mpm@selenic.com, herbert@gondor.apana.org.au, wsa@the-dreams.de, cernekee@gmail.com, Florian Fainelli Subject: [PATCH 1/4] hw_random: bcm63xx-rng: drop bcm_{readl,writel} macros Date: Mon, 16 Feb 2015 18:09:13 -0800 Message-Id: <1424138956-11563-2-git-send-email-f.fainelli@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1424138956-11563-1-git-send-email-f.fainelli@gmail.com> References: <1424138956-11563-1-git-send-email-f.fainelli@gmail.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP bcm_{readl,writel} macros expand to __raw_{readl,writel}, use these directly such that we do not rely on the platform to provide these for us. As a result, we no longer use bcm63xx_io.h, so remove that inclusion too. Signed-off-by: Florian Fainelli --- drivers/char/hw_random/bcm63xx-rng.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/char/hw_random/bcm63xx-rng.c b/drivers/char/hw_random/bcm63xx-rng.c index ba6a65ac023b..ed9b28b35a39 100644 --- a/drivers/char/hw_random/bcm63xx-rng.c +++ b/drivers/char/hw_random/bcm63xx-rng.c @@ -13,7 +13,6 @@ #include #include -#include #include struct bcm63xx_rng_priv { @@ -28,9 +27,9 @@ static int bcm63xx_rng_init(struct hwrng *rng) struct bcm63xx_rng_priv *priv = to_rng_priv(rng); u32 val; - val = bcm_readl(priv->regs + RNG_CTRL); + val = __raw_readl(priv->regs + RNG_CTRL); val |= RNG_EN; - bcm_writel(val, priv->regs + RNG_CTRL); + __raw_writel(val, priv->regs + RNG_CTRL); return 0; } @@ -40,23 +39,23 @@ static void bcm63xx_rng_cleanup(struct hwrng *rng) struct bcm63xx_rng_priv *priv = to_rng_priv(rng); u32 val; - val = bcm_readl(priv->regs + RNG_CTRL); + val = __raw_readl(priv->regs + RNG_CTRL); val &= ~RNG_EN; - bcm_writel(val, priv->regs + RNG_CTRL); + __raw_writel(val, priv->regs + RNG_CTRL); } static int bcm63xx_rng_data_present(struct hwrng *rng, int wait) { struct bcm63xx_rng_priv *priv = to_rng_priv(rng); - return bcm_readl(priv->regs + RNG_STAT) & RNG_AVAIL_MASK; + return __raw_readl(priv->regs + RNG_STAT) & RNG_AVAIL_MASK; } static int bcm63xx_rng_data_read(struct hwrng *rng, u32 *data) { struct bcm63xx_rng_priv *priv = to_rng_priv(rng); - *data = bcm_readl(priv->regs + RNG_DATA); + *data = __raw_readl(priv->regs + RNG_DATA); return 4; }