From patchwork Tue Jun 9 17:44:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 187687 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp759374ilo; Tue, 9 Jun 2020 10:49:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0NOGyVQ54RGMIgpnoSL0SJ1asbScyoX70pDTXVfUL1axTrNr2eHfo2Xis9LrgbSMXu9XW X-Received: by 2002:a17:906:f1d5:: with SMTP id gx21mr27429816ejb.416.1591724951226; Tue, 09 Jun 2020 10:49:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591724951; cv=none; d=google.com; s=arc-20160816; b=mnoKP6iHqgLFvn1QMJbQDDA8hsOom3tChqEm9eYh14OyOud+/70ki3l0je1LfpH1yL 4QGe0h7erTGp2YAN7TkJU9uOcuLfgcTzDay1IrSQBdjb6kAOUQ4lsPWQVeMKIbSQADoz Y9OeHoTL0CMG+exACeeb0PQPHQWkoI7iSrBiKI69ILQTIXxOpJ5hC+Nhug4qDBOUTUlX eeCQpeNB2PoVXy7GKZcqA1jjizclISrYQrWcOFOW6Vf9N1YPOC4ByIGKOnlmTc5VFF7K l2nyZjVvDjdLLlPbhRwN/riPGJoWPBpaiA+afIPj9kEqm45Y0cDIsdp3YfWhLGVdkRAK unJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=I5IX6dAhkcrSIwtC5zG8Fjogjt4Ve38olKyyJ6TFvoI=; b=MRSNcLnXkjzxFrTkC6BTcWI9G8VfKp7zIiJS4DxH9tK0ap7Wy8WZsYdNasijA1f1/o ys7sDwuW5MVYLBl3uCisDppnpliapJYe4XJwWzh6uPDNX6rD5870RcVr8d+koHCzag3R JjWXSHRNkyKvgpNDPfdRTwxPU6R7wlXkA0KjTCpXZMhig3Lv+Q99L78smoD+q//JntTc jrnGX9udzal+qwwMV7c1rD8SI5Bj6LhNI00YvJmXB+45RoSFLCtSBS2RX50h1ALCbSbj Mntddq+vMgxplTABP8lywzaGNizUYFgqwwb71msHSp+q8A14FZg7B8F9yPxKx62AJnQ4 gNfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JOUuOu2t; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si10724049eju.485.2020.06.09.10.49.11; Tue, 09 Jun 2020 10:49:11 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JOUuOu2t; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732454AbgFIRtJ (ORCPT + 15 others); Tue, 9 Jun 2020 13:49:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:34492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730382AbgFIRtG (ORCPT ); Tue, 9 Jun 2020 13:49:06 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 7BC2F207F9; Tue, 9 Jun 2020 17:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591724946; bh=TRJanvAGk+cg/amw0p3z0rAv05S5ccaGxjCfm6hEoYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JOUuOu2tYtIhnG9r0o/rNwsQxlAJE8Oxg9kYPVX/qnalwK0+476kwZKNPlqzXeahw 9eGIiM4spYk8gG+gWWqmHXhsMdqcPiYfObN4zbhekohMeyQs31zfqERbb1RuO/Jaod pikJgmcGfXmg4NLxY6WB8bCXezogoCdGi6cslQZ8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Srinivas Kandagatla , Douglas Anderson Subject: [PATCH 4.9 35/42] nvmem: qfprom: remove incorrect write support Date: Tue, 9 Jun 2020 19:44:41 +0200 Message-Id: <20200609174019.362323066@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200609174015.379493548@linuxfoundation.org> References: <20200609174015.379493548@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Srinivas Kandagatla commit 8d9eb0d6d59a5d7028c80a30831143d3e75515a7 upstream. qfprom has different address spaces for read and write. Reads are always done from corrected address space, where as writes are done on raw address space. Writing to corrected address space is invalid and ignored, so it does not make sense to have this support in the driver which only supports corrected address space regions at the moment. Fixes: 4ab11996b489 ("nvmem: qfprom: Add Qualcomm QFPROM support.") Signed-off-by: Srinivas Kandagatla Reviewed-by: Douglas Anderson Cc: stable Link: https://lore.kernel.org/r/20200522113341.7728-1-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman --- drivers/nvmem/qfprom.c | 14 -------------- 1 file changed, 14 deletions(-) --- a/drivers/nvmem/qfprom.c +++ b/drivers/nvmem/qfprom.c @@ -30,19 +30,6 @@ static int qfprom_reg_read(void *context return 0; } -static int qfprom_reg_write(void *context, - unsigned int reg, void *_val, size_t bytes) -{ - void __iomem *base = context; - u32 *val = _val; - int i = 0, words = bytes / 4; - - while (words--) - writel(*val++, base + reg + (i++ * 4)); - - return 0; -} - static int qfprom_remove(struct platform_device *pdev) { struct nvmem_device *nvmem = platform_get_drvdata(pdev); @@ -56,7 +43,6 @@ static struct nvmem_config econfig = { .stride = 4, .word_size = 1, .reg_read = qfprom_reg_read, - .reg_write = qfprom_reg_write, }; static int qfprom_probe(struct platform_device *pdev)