From patchwork Mon Nov 30 02:14:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 57398 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1178989lbb; Sun, 29 Nov 2015 18:15:49 -0800 (PST) X-Received: by 10.66.240.97 with SMTP id vz1mr86927115pac.29.1448849749483; Sun, 29 Nov 2015 18:15:49 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sn2si5667606pab.60.2015.11.29.18.15.49; Sun, 29 Nov 2015 18:15:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752774AbbK3CPr (ORCPT + 28 others); Sun, 29 Nov 2015 21:15:47 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:36440 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752295AbbK3CPp (ORCPT ); Sun, 29 Nov 2015 21:15:45 -0500 Received: by pacdm15 with SMTP id dm15so168032289pac.3 for ; Sun, 29 Nov 2015 18:15:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wKVSQRTFhgywOtbKtuatvFC5ILP3KZ+/ZarkIQMw8MU=; b=o2q9q4MtX+yWWV4ElFOl+mhQxQmT0at37o5M733sw0JwiyPdeXt5hUwmgFIlUULzqu SZgI9yi00BN3qxXhge+FQtivi7itzUPcBAbKCIlTcw8W5w1FESbKE3WEoVld2eV0vUDk o4ylUhyFHJiuqMnvOUDISzFDLMTJyNx1bRM4Bxoxh+XgmJ+iD1W0hZRAmEXw0hPfFVV9 sw0kWxqwgJAgK5zNwcnCCTURBFAGFhGMJRlJ4nc+nql6CQNxYCYyEk4i4qOyEvjcEpIc Q4lwzGV1L0o9Wmtw18crfZ7KEfqM/XqkxxnYcczk5tchlUuYt4RCm71Y4jZfypWaxoAJ rnkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wKVSQRTFhgywOtbKtuatvFC5ILP3KZ+/ZarkIQMw8MU=; b=glTiPCvgG7aXM3dhH3Sa+lj1krmCPT8gIwzyinwJOl46Qxx4o4b0OBt68Hx89BN/3g UOLKm+fr/I/pzWdgCNh2Qk5wgVPwX+e57Oinao3yAptU2XZ2ZPaBKeHDrfqfWLSO81rU UsBoyJypth9Ex5kCiGW6V/BwQ6sloZPrBoZLXw4BG0NFwyfXVuwYutd+jbgdBxlB3aaI XebQqltswQwqCkRLe2yJLeqkYhfhJ/mf8EQ77lvxeNu3oBMWPxpOYklT1KnxvTBTWQba DN7/tD590CDFxAQ/Ff+2Tr0hirylPNxplVC6ksuHJb8Gzc11xVLg+3whbjnfJBaH3y6P XIjw== X-Gm-Message-State: ALoCoQn60IlYuISHivDxYvS1erz+AOST2Mphmrty3RyrGYpG6bD3rWrX6WubrwbiBn8BvL1UWWMc X-Received: by 10.98.65.76 with SMTP id o73mr67585771pfa.119.1448849744985; Sun, 29 Nov 2015 18:15:44 -0800 (PST) Received: from t430.cg.shawcable.net ([184.64.168.246]) by smtp.gmail.com with ESMTPSA id n16sm47168818pfa.53.2015.11.29.18.15.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 29 Nov 2015 18:15:44 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org, alexander.shishkin@linux.intel.com Cc: zhang.chunyan@linaro.org, mike.leach@arm.com, tor@ti.com, al.grant@arm.com, pawel.moll@arm.com, fainelli@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Mathieu Poirier Subject: [PATCH V5 01/26] coresight: etm3x: moving etm_readl/writel to header file Date: Sun, 29 Nov 2015 19:14:22 -0700 Message-Id: <1448849687-5724-2-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1448849687-5724-1-git-send-email-mathieu.poirier@linaro.org> References: <1448849687-5724-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Moving functions etm_readl/writel to file "coresight-etm.h" so that the main ETM3x driver can be split in more than one file. Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etm.h | 29 +++++++++++++++++++++++++++ drivers/hwtracing/coresight/coresight-etm3x.c | 29 --------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/drivers/hwtracing/coresight/coresight-etm.h b/drivers/hwtracing/coresight/coresight-etm.h index b4481eb29304..34f7db881fa7 100644 --- a/drivers/hwtracing/coresight/coresight-etm.h +++ b/drivers/hwtracing/coresight/coresight-etm.h @@ -251,4 +251,33 @@ enum etm_addr_type { ETM_ADDR_TYPE_START, ETM_ADDR_TYPE_STOP, }; + +static inline void etm_writel(struct etm_drvdata *drvdata, + u32 val, u32 off) +{ + if (drvdata->use_cp14) { + if (etm_writel_cp14(off, val)) { + dev_err(drvdata->dev, + "invalid CP14 access to ETM reg: %#x", off); + } + } else { + writel_relaxed(val, drvdata->base + off); + } +} + +static inline unsigned int etm_readl(struct etm_drvdata *drvdata, u32 off) +{ + u32 val; + + if (drvdata->use_cp14) { + if (etm_readl_cp14(off, &val)) { + dev_err(drvdata->dev, + "invalid CP14 access to ETM reg: %#x", off); + } + } else { + val = readl_relaxed(drvdata->base + off); + } + + return val; +} #endif diff --git a/drivers/hwtracing/coresight/coresight-etm3x.c b/drivers/hwtracing/coresight/coresight-etm3x.c index d630b7ece735..c1dc095c3fb0 100644 --- a/drivers/hwtracing/coresight/coresight-etm3x.c +++ b/drivers/hwtracing/coresight/coresight-etm3x.c @@ -42,35 +42,6 @@ module_param_named(boot_enable, boot_enable, int, S_IRUGO); static int etm_count; static struct etm_drvdata *etmdrvdata[NR_CPUS]; -static inline void etm_writel(struct etm_drvdata *drvdata, - u32 val, u32 off) -{ - if (drvdata->use_cp14) { - if (etm_writel_cp14(off, val)) { - dev_err(drvdata->dev, - "invalid CP14 access to ETM reg: %#x", off); - } - } else { - writel_relaxed(val, drvdata->base + off); - } -} - -static inline unsigned int etm_readl(struct etm_drvdata *drvdata, u32 off) -{ - u32 val; - - if (drvdata->use_cp14) { - if (etm_readl_cp14(off, &val)) { - dev_err(drvdata->dev, - "invalid CP14 access to ETM reg: %#x", off); - } - } else { - val = readl_relaxed(drvdata->base + off); - } - - return val; -} - /* * Memory mapped writes to clear os lock are not supported on some processors * and OS lock must be unlocked before any memory mapped access on such