From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD9D2C433E0 for ; Mon, 29 Mar 2021 20:10:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AADDA6198F for ; Mon, 29 Mar 2021 20:10:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231655AbhC2UJw (ORCPT ); Mon, 29 Mar 2021 16:09:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230298AbhC2UJf (ORCPT ); Mon, 29 Mar 2021 16:09:35 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A8FFC061574 for ; Mon, 29 Mar 2021 13:09:35 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id h25so10147900pgm.3 for ; Mon, 29 Mar 2021 13:09:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:in-reply-to:references :subject:from:cc:to:date:message-id:user-agent; bh=Iy90H+4nmGRZh69/cuBoLTgrfWmHOCln5PyIFtnQ2/0=; b=SiUmb69ugIMVdsK+/7Ow+hKzUf7ZfrtTKAEvMYfY+cpN5jBYq/n1XrSgBdfqUtoO5t qdKyUtJHA+xh+0JhcQKgDRPlTqOMA3pSw/kGV07xj5PFRivzB2KPT/P9ekgHJ7moXw9q WV5of9beWP7U5FBhs6KVhbEpVJF0bgM2qwR6g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding :in-reply-to:references:subject:from:cc:to:date:message-id :user-agent; bh=Iy90H+4nmGRZh69/cuBoLTgrfWmHOCln5PyIFtnQ2/0=; b=m6zcY37Uk5PTcRANu1ZBON14nl9rGupJmVyxzgbUMYk8gyaDYr/ZIMoSrz+gr3AnnZ 9KAnAjkTcF0gIDR9f63Jnb/ubT+8cuM9SEZKlVl0hKZ8On1SanMLZgCN0iAO2jnp4tWS cJk8RjEIU3JcfFxKJxZWGlv9NYOVXkCaBK8OP0cBfmnJYrZlRRtHcnKlLG/KuPznn7By b+rAajlqDNgClZQnAzIX1+ytS64w62NvW0iKjXLlsRePxzgtLdyvXEyT49ESi1hR6m6r ZPK1HSuyu5GR/NOr2L6iGvmoiFRMi7IXO0E8SOtmTpQ8c3y3Wj5TdyaWIfdMj6ijzfNP Rt8w== X-Gm-Message-State: AOAM532wYXHdAfioYBvDGjIxPEvFH+0sj4qOGnOs1ZJVtH5H2cLyhpr5 SX5bawm6/aX+Rzs0Fi5fd9FUIg== X-Google-Smtp-Source: ABdhPJzcN9RMODHe8byZALIgMDw61p/BLnwTKQQkqfoP+YVO/t/ieO/7kvyL1kmlboOfH95p5IqgpQ== X-Received: by 2002:a63:4e48:: with SMTP id o8mr25316541pgl.420.1617048574853; Mon, 29 Mar 2021 13:09:34 -0700 (PDT) Received: from chromium.org ([2620:15c:202:201:4091:2b37:966b:1fca]) by smtp.gmail.com with ESMTPSA id z2sm18182420pfq.198.2021.03.29.13.09.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Mar 2021 13:09:34 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: Subject: Re: [PATCH V2 3/5] DCC: Added the sysfs entries for DCC(Data Capture and Compare) driver From: Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Sai Prakash Ranjan , Sibi Sankar , Rajendra Nayak , vkoul@kernel.org, Souradeep Chowdhury To: Andy Gross , Bjorn Andersson , Rob Herring , Souradeep Chowdhury Date: Mon, 29 Mar 2021 13:09:33 -0700 Message-ID: <161704857307.3012082.499264834486221320@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Quoting Souradeep Chowdhury (2021-03-25 01:02:34) > The DCC is a DMA engine designed to store register values either in > case of a system crash or in case of software triggers manually done > by the user.Using DCC hardware and the sysfs interface of the driver > the user can exploit various functionalities of DCC.The user can specify > the register addresses,the values of which is stored by DCC in it's > dedicated SRAM.The register addresses can be used either to read from, > write to,first read and store value and then write or to loop.All these > options can be exploited using the sysfs interface given to the user. > Following are the sysfs interfaces exposed in DCC driver which are > documented > 1)trigger > 2)config > 3)config_write > 4)config_reset > 5)enable > 6)rd_mod_wr > 7)loop >=20 > Signed-off-by: Souradeep Chowdhury > --- > Documentation/ABI/testing/sysfs-driver-dcc | 114 +++++++++++++++++++++++= ++++++ Please combine this with the driver patch. > 1 file changed, 114 insertions(+) > create mode 100644 Documentation/ABI/testing/sysfs-driver-dcc Perhaps this should be an ioctl interface instead of a sysfs interface? >=20 > diff --git a/Documentation/ABI/testing/sysfs-driver-dcc b/Documentation/A= BI/testing/sysfs-driver-dcc > new file mode 100644 > index 0000000..05d24f0 > --- /dev/null > +++ b/Documentation/ABI/testing/sysfs-driver-dcc > @@ -0,0 +1,114 @@ > +What: /sys/bus/platform/devices/.../trigger > +Date: March 2021 > +Contact: Souradeep Chowdhury > +Description: > + This is the sysfs interface for manual software > + triggers.The user can simply enter a 1 against > + the sysfs file and enable a manual trigger. > + Example: > + echo 1 > /sys/bus/platform/devices/.../trigger > + > +What: /sys/bus/platform/devices/.../enable > +Date: March 2021 > +Contact: Souradeep Chowdhury > +Description: > + This sysfs interface is used for enabling the > + the dcc hardware.Without this being set to 1, Space after period please. > + the dcc hardware ceases to function. > + Example: > + echo 0 > /sys/bus/platform/devices/.../enable > + (disable interface) > + echo 1 > /sys/bus/platform/devices/.../enable > + (enable interface) > + > +What: /sys/bus/platform/devices/.../config > +Date: March 2021 > +Contact: Souradeep Chowdhury > +Description: > + This is the most commonly used sysfs interface > + file and this basically stores the addresses of > + the registers which needs to be read in case of > + a hardware crash or manual software triggers. > + Example: > + echo 0x80000010 10 > /sys/bus/platform/devices/../config > + This specifies that 10 words starting from address > + 0x80000010 is to be read.In case there are no words to be > + specified we can simply enter the address. > + > +What: /sys/bus/platform/devices/.../config_write > +Date: March 2021 > +Contact: Souradeep Chowdhury > +Description: > + This file allows user to write a value to the register > + address given as argument.The values are entered in the > + form of .The reason for this > + feature of dcc is that for accessing certain registers > + it is necessary to set some bits of soe other register. s/soe/some/? > + That is achievable by giving DCC this privelege. s/privelege/privilege/ > + Example: > + echo 0x80000000 0xFF > /sys/bus/platform/devices/.../conf= ig_write > + > +What: /sys/bus/platform/devices/.../config_reset > +Date: March 2021 > +Contact: Souradeep Chowdhury > +Description: > + This file is used to reset the configuration of > + a dcc driver to the default configuration. > + Example: > + echo 1 > /sys/bus/platform/devices/.../config_reset > + From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD230C433C1 for ; Tue, 30 Mar 2021 00:42:51 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 73E2B61969 for ; Tue, 30 Mar 2021 00:42:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 73E2B61969 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:Date:To:Cc:From:Subject:References: In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dSyzqIOpPrceFJzMNZoQRiLK0Xm8QZHFNvuX9FOQG7I=; b=o2XnX3Kg9pqa86RKjRbw9rqEH WD6GhSAOw42NPDRWHuXNfxh6o6M6tcWzhVxUrRUD1U2NVbxF0KzuPWIW/ECosOTNDkCUjEzu3HK48 RMW+CdAo8PLmhgEhihW5neEWxfws9Ny77+X4PzqaZYBVKJ91/RMmYPC3uJ/088wxvdHVvcCHonACm aeQX1qjXAnE0rciboeKgUO6cA4V+uAGIhk6aHnZ5pR12SomSGnZgwjbu20GU+WodugEmKMGsi+HLn svw6ixtdp3zaYFPOJAYrMjWHvdhLn4mm1E4swRzedHc8dG7fJHwB7gK+kbq0oLkjnqwR1n0DeT75r YIlxKzlRw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lR2QR-002Dis-PZ; Tue, 30 Mar 2021 00:40:08 +0000 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lQyCe-001N7e-GO for linux-arm-kernel@lists.infradead.org; Mon, 29 Mar 2021 20:09:47 +0000 Received: by mail-pg1-x52e.google.com with SMTP id w10so5801557pgh.5 for ; Mon, 29 Mar 2021 13:09:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:in-reply-to:references :subject:from:cc:to:date:message-id:user-agent; bh=Iy90H+4nmGRZh69/cuBoLTgrfWmHOCln5PyIFtnQ2/0=; b=SiUmb69ugIMVdsK+/7Ow+hKzUf7ZfrtTKAEvMYfY+cpN5jBYq/n1XrSgBdfqUtoO5t qdKyUtJHA+xh+0JhcQKgDRPlTqOMA3pSw/kGV07xj5PFRivzB2KPT/P9ekgHJ7moXw9q WV5of9beWP7U5FBhs6KVhbEpVJF0bgM2qwR6g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding :in-reply-to:references:subject:from:cc:to:date:message-id :user-agent; bh=Iy90H+4nmGRZh69/cuBoLTgrfWmHOCln5PyIFtnQ2/0=; b=GlgYUe2I3xC97Q/wHDt9U+/M8w/wlTcFLpwCP97dluwbIhAd5Te9Gc64tSgnOWiIQj /52Lnz6mjuWoK4LD52N0dTEfNGiI0ROWu1LcMh3hxWfycwA5yMJKftwy672gjJxRtZ4X l0iT0o3KxY0t2rWWR9rP5uyg4ARF/mNNADKGPF6dhJXq4rjI8D5tnPLmPtoKYAL/hWwJ V27cicbijJchaTl0WlNtaDb3kntzg5YprzbOwJ+dh6uKQ1Smy3ZHf3CPmiB6NEEOVDq0 imL1OM0ZTtDi3swYH9Oc7Ji3lG0AtuilXjwj138/+slgdGeeq1GBbZiFyiiC28xVP50G PyPw== X-Gm-Message-State: AOAM530JJH5YAQBuKw6f6ouai6NIpnm1tgDVb1H4aNNhz/0NWXjOQlgf 36UiN/DjGXsyZO6UMR0/4WapxYcNvY6B+w== X-Google-Smtp-Source: ABdhPJzcN9RMODHe8byZALIgMDw61p/BLnwTKQQkqfoP+YVO/t/ieO/7kvyL1kmlboOfH95p5IqgpQ== X-Received: by 2002:a63:4e48:: with SMTP id o8mr25316541pgl.420.1617048574853; Mon, 29 Mar 2021 13:09:34 -0700 (PDT) Received: from chromium.org ([2620:15c:202:201:4091:2b37:966b:1fca]) by smtp.gmail.com with ESMTPSA id z2sm18182420pfq.198.2021.03.29.13.09.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Mar 2021 13:09:34 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Subject: Re: [PATCH V2 3/5] DCC: Added the sysfs entries for DCC(Data Capture and Compare) driver From: Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Sai Prakash Ranjan , Sibi Sankar , Rajendra Nayak , vkoul@kernel.org, Souradeep Chowdhury To: Andy Gross , Bjorn Andersson , Rob Herring , Souradeep Chowdhury Date: Mon, 29 Mar 2021 13:09:33 -0700 Message-ID: <161704857307.3012082.499264834486221320@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210329_210940_461042_977D0B48 X-CRM114-Status: GOOD ( 30.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Quoting Souradeep Chowdhury (2021-03-25 01:02:34) > The DCC is a DMA engine designed to store register values either in > case of a system crash or in case of software triggers manually done > by the user.Using DCC hardware and the sysfs interface of the driver > the user can exploit various functionalities of DCC.The user can specify > the register addresses,the values of which is stored by DCC in it's > dedicated SRAM.The register addresses can be used either to read from, > write to,first read and store value and then write or to loop.All these > options can be exploited using the sysfs interface given to the user. > Following are the sysfs interfaces exposed in DCC driver which are > documented > 1)trigger > 2)config > 3)config_write > 4)config_reset > 5)enable > 6)rd_mod_wr > 7)loop > > Signed-off-by: Souradeep Chowdhury > --- > Documentation/ABI/testing/sysfs-driver-dcc | 114 +++++++++++++++++++++++++++++ Please combine this with the driver patch. > 1 file changed, 114 insertions(+) > create mode 100644 Documentation/ABI/testing/sysfs-driver-dcc Perhaps this should be an ioctl interface instead of a sysfs interface? > > diff --git a/Documentation/ABI/testing/sysfs-driver-dcc b/Documentation/ABI/testing/sysfs-driver-dcc > new file mode 100644 > index 0000000..05d24f0 > --- /dev/null > +++ b/Documentation/ABI/testing/sysfs-driver-dcc > @@ -0,0 +1,114 @@ > +What: /sys/bus/platform/devices/.../trigger > +Date: March 2021 > +Contact: Souradeep Chowdhury > +Description: > + This is the sysfs interface for manual software > + triggers.The user can simply enter a 1 against > + the sysfs file and enable a manual trigger. > + Example: > + echo 1 > /sys/bus/platform/devices/.../trigger > + > +What: /sys/bus/platform/devices/.../enable > +Date: March 2021 > +Contact: Souradeep Chowdhury > +Description: > + This sysfs interface is used for enabling the > + the dcc hardware.Without this being set to 1, Space after period please. > + the dcc hardware ceases to function. > + Example: > + echo 0 > /sys/bus/platform/devices/.../enable > + (disable interface) > + echo 1 > /sys/bus/platform/devices/.../enable > + (enable interface) > + > +What: /sys/bus/platform/devices/.../config > +Date: March 2021 > +Contact: Souradeep Chowdhury > +Description: > + This is the most commonly used sysfs interface > + file and this basically stores the addresses of > + the registers which needs to be read in case of > + a hardware crash or manual software triggers. > + Example: > + echo 0x80000010 10 > /sys/bus/platform/devices/../config > + This specifies that 10 words starting from address > + 0x80000010 is to be read.In case there are no words to be > + specified we can simply enter the address. > + > +What: /sys/bus/platform/devices/.../config_write > +Date: March 2021 > +Contact: Souradeep Chowdhury > +Description: > + This file allows user to write a value to the register > + address given as argument.The values are entered in the > + form of .The reason for this > + feature of dcc is that for accessing certain registers > + it is necessary to set some bits of soe other register. s/soe/some/? > + That is achievable by giving DCC this privelege. s/privelege/privilege/ > + Example: > + echo 0x80000000 0xFF > /sys/bus/platform/devices/.../config_write > + > +What: /sys/bus/platform/devices/.../config_reset > +Date: March 2021 > +Contact: Souradeep Chowdhury > +Description: > + This file is used to reset the configuration of > + a dcc driver to the default configuration. > + Example: > + echo 1 > /sys/bus/platform/devices/.../config_reset > + _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel