From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Wahren Subject: Re: [PATCH v6 0/9] Add simple NVMEM Framework via regmap. Date: Wed, 24 Jun 2015 19:47:34 +0200 (CEST) Message-ID: <1641569650.41238.1435168054323.JavaMail.open-xchange@oxbsltgw35.schlund.de> References: <1435014459-26138-1-git-send-email-srinivas.kandagatla@linaro.org> <235181230.251177.1435088854197.JavaMail.open-xchange@oxbsltgw00.schlund.de> <558A7C92.2040102@linaro.org> <558AA2E2.1010606@i2se.com> <558AAA8D.8030209@linaro.org> Reply-To: Stefan Wahren Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <558AAA8D.8030209-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Srinivas Kandagatla , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Cc: wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring , Kumar Gala , sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, arnd-r2nGTMty4D4@public.gmane.org, s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, Greg Kroah-Hartman , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org, Maxime Ripard , pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mark Brown List-Id: linux-arm-msm@vger.kernel.org Hi Srinivas, > Srinivas Kandagatla hat am 24. Juni 2015 um > 15:03 geschrieben: > > > > > On 24/06/15 13:30, Stefan Wahren wrote: > >> >If the question is just about hexdump, then hexdump itself can read > >> >file from given offset and size. > > yes, this is my question at first. Let me show the difference between > > the current implementation and my expectations as a user. > > > > $ hexdump /sys/class/nvmem/mxs-ocotp/nvmem > > > > Current implementation: dump the complete register range defined in DT > > > Its dumping the range which is specified in the provider regmap. If the > requirement is to dump only particular range, this has to be made > explicit while creating regmap, which is to specify the base address to > start from "First data register" and max_register to be "Last data > register "- "First data register" i know about max_register, but i can't find the base address in regmap_config. Do you mean struct regmap_access_table *rd_table ? > > > User expectation: dump only the data from OCOTP block > > > > Let me explain it for i.MX28 OCOTP > > > > 0x8002c000 // Start of OCOTP register block (defined in DT) > > > > 0x8002c020 // First data register > > > > 0x8002c290 // Last data register > > > > 0x8002dfff // End of OCOTP register block (defined in DT) > > > > My knowledge about regmap is limited, but how can i achieve that hexdump > > give me only the data registers? From my understanding this should be > > handled in regmap and not in the read function. > > Setup the base and regmap_config correctly in the provider driver before > calling regmap_init_mmio(). > > Let me know if you need more details. Yes, please. Stefan > > --srini > > > > > Are my expectations about the raw access wrong? > > > > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753480AbbFXRsD (ORCPT ); Wed, 24 Jun 2015 13:48:03 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:50396 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752816AbbFXRry (ORCPT ); Wed, 24 Jun 2015 13:47:54 -0400 Date: Wed, 24 Jun 2015 19:47:34 +0200 (CEST) From: Stefan Wahren Reply-To: Stefan Wahren To: Srinivas Kandagatla , linux-arm-kernel@lists.infradead.org Cc: wxt@rock-chips.com, linux-api@vger.kernel.org, Rob Herring , Kumar Gala , sboyd@codeaurora.org, arnd@arndb.de, s.hauer@pengutronix.de, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, mporter@konsulko.com, Maxime Ripard , pantelis.antoniou@konsulko.com, devicetree@vger.kernel.org, Mark Brown Message-ID: <1641569650.41238.1435168054323.JavaMail.open-xchange@oxbsltgw35.schlund.de> In-Reply-To: <558AAA8D.8030209@linaro.org> References: <1435014459-26138-1-git-send-email-srinivas.kandagatla@linaro.org> <235181230.251177.1435088854197.JavaMail.open-xchange@oxbsltgw00.schlund.de> <558A7C92.2040102@linaro.org> <558AA2E2.1010606@i2se.com> <558AAA8D.8030209@linaro.org> Subject: Re: [PATCH v6 0/9] Add simple NVMEM Framework via regmap. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.6.2-Rev18 X-Originating-Client: com.openexchange.ox.gui.dhtml X-Provags-ID: V03:K0:HKkOh/9AwyGxkl/IvXaSPWMX6coGpvLhy9mEF14MwH/K1Wtdc6F 0AuAeZus09aUfIV4dH/x8ARlcS9AyFVA6xK/nPKvCjcOEU7IlPOWoTR8eWM0Qv+80uurobD Gl0gccbGCEQh/4pINasSMKfZkJntd84hPWxXwoqNDTyNJb52tfrkHOPDkS93NxgwfjfEarH XyRagaEgr5QoRKraX/1VA== X-UI-Out-Filterresults: notjunk:1;V01:K0:x7uOHaIOnwY=:bOxs0HEG56Nh2lzOOmMt+y 5c1zXjG+yv7wF86aNjugTn75CO0WAemp7e2hnOY3IWQmfH/kd9SCz6/aaIzx7rtrO2NoAR4Hd YRwwBcacvgxiXogfTLmAEHTDDZ2zu82RqYfNTNcDR2b5xhqak/57cOtpDsPLayOR5gmTypsfe OJXNeVeRVK/LNSvl7usHQNHOmO8fc0xVMzrEtBlxm1otl7qUshxmKVj3hQKWe8kzco9G6Tp/k Ieqpok5MCFO5i5yt/S0XDPbZ7ei03qVibP3i/VyjneyZDwnwQ6kYElnkCOpXkGe5t8ZhIRdHE xaRV4Eq61kn+PibGtm98Btc8dWQXO81n9fzgotgh1UPSWJtV64Fhxfd8AlxR42PqmlR6Zi49W TBSztX0gxTTaVCrRMnddRgctpERD9yTushIFTE7RSwlNjsHX1zychxWehVtwSQUU65Ij99Hyj JPSbw5OStmz3Suk0reLFRssL/BzOZdjG2tfy65BjaHznga1mtCzbNeZRz0SRHPHGiIjtsRq+6 8/CRcM86yRe23F4fjyS5qIXPVJDkhViNSlaVg15aKK+pmoR7KX9BxpHWnuDotlw2gnXyDZy4W zx5q2v6FoDFo8ymi2FysHm39+m1a5MJQEA67WmOrcOb2EpLB0k/ECXGIyERBGY96A27Uarm13 J1qNGv5w8K93LKlOhmkGlifJ7TeYAPu5Q+7N/NTQKQoo0cQ== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Srinivas, > Srinivas Kandagatla hat am 24. Juni 2015 um > 15:03 geschrieben: > > > > > On 24/06/15 13:30, Stefan Wahren wrote: > >> >If the question is just about hexdump, then hexdump itself can read > >> >file from given offset and size. > > yes, this is my question at first. Let me show the difference between > > the current implementation and my expectations as a user. > > > > $ hexdump /sys/class/nvmem/mxs-ocotp/nvmem > > > > Current implementation: dump the complete register range defined in DT > > > Its dumping the range which is specified in the provider regmap. If the > requirement is to dump only particular range, this has to be made > explicit while creating regmap, which is to specify the base address to > start from "First data register" and max_register to be "Last data > register "- "First data register" i know about max_register, but i can't find the base address in regmap_config. Do you mean struct regmap_access_table *rd_table ? > > > User expectation: dump only the data from OCOTP block > > > > Let me explain it for i.MX28 OCOTP > > > > 0x8002c000 // Start of OCOTP register block (defined in DT) > > > > 0x8002c020 // First data register > > > > 0x8002c290 // Last data register > > > > 0x8002dfff // End of OCOTP register block (defined in DT) > > > > My knowledge about regmap is limited, but how can i achieve that hexdump > > give me only the data registers? From my understanding this should be > > handled in regmap and not in the read function. > > Setup the base and regmap_config correctly in the provider driver before > calling regmap_init_mmio(). > > Let me know if you need more details. Yes, please. Stefan > > --srini > > > > > Are my expectations about the raw access wrong? > > > > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 From: stefan.wahren@i2se.com (Stefan Wahren) Date: Wed, 24 Jun 2015 19:47:34 +0200 (CEST) Subject: [PATCH v6 0/9] Add simple NVMEM Framework via regmap. In-Reply-To: <558AAA8D.8030209@linaro.org> References: <1435014459-26138-1-git-send-email-srinivas.kandagatla@linaro.org> <235181230.251177.1435088854197.JavaMail.open-xchange@oxbsltgw00.schlund.de> <558A7C92.2040102@linaro.org> <558AA2E2.1010606@i2se.com> <558AAA8D.8030209@linaro.org> Message-ID: <1641569650.41238.1435168054323.JavaMail.open-xchange@oxbsltgw35.schlund.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Srinivas, > Srinivas Kandagatla hat am 24. Juni 2015 um > 15:03 geschrieben: > > > > > On 24/06/15 13:30, Stefan Wahren wrote: > >> >If the question is just about hexdump, then hexdump itself can read > >> >file from given offset and size. > > yes, this is my question at first. Let me show the difference between > > the current implementation and my expectations as a user. > > > > $ hexdump /sys/class/nvmem/mxs-ocotp/nvmem > > > > Current implementation: dump the complete register range defined in DT > > > Its dumping the range which is specified in the provider regmap. If the > requirement is to dump only particular range, this has to be made > explicit while creating regmap, which is to specify the base address to > start from "First data register" and max_register to be "Last data > register "- "First data register" i know about max_register, but i can't find the base address in regmap_config. Do you mean struct regmap_access_table *rd_table ? > > > User expectation: dump only the data from OCOTP block > > > > Let me explain it for i.MX28 OCOTP > > > > 0x8002c000 // Start of OCOTP register block (defined in DT) > > > > 0x8002c020 // First data register > > > > 0x8002c290 // Last data register > > > > 0x8002dfff // End of OCOTP register block (defined in DT) > > > > My knowledge about regmap is limited, but how can i achieve that hexdump > > give me only the data registers? From my understanding this should be > > handled in regmap and not in the read function. > > Setup the base and regmap_config correctly in the provider driver before > calling regmap_init_mmio(). > > Let me know if you need more details. Yes, please. Stefan > > --srini > > > > > Are my expectations about the raw access wrong? > > > > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel