From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: kgene@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com,
"Chanwoo Choi" <cw00.choi@samsung.com>,
myungjoo.ham@samsung.com,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
pankaj.dubey@samsung.com,
"Bartłomiej Żołnierkiewicz" <b.zolnierkie@samsung.com>,
"Marek Szyprowski" <m.szyprowski@samsung.com>
Subject: Re: [PATCH RFC 2/8] soc: samsung: Exynos chipid driver update
Date: Fri, 5 Apr 2019 12:04:18 +0200 [thread overview]
Message-ID: <5d80718b-57ad-33cd-80ff-03c01266a143@samsung.com> (raw)
In-Reply-To: <CAJKOXPcJrctz5E8GX2ke804FBifpfYm5D_=H4MguTg_Cq2CPng@mail.gmail.com>
On 4/5/19 11:22, Krzysztof Kozlowski wrote:
> On Thu, 4 Apr 2019 at 19:22, Sylwester Nawrocki <s.nawrocki@samsung.com> wrote:
>>
>> This patch adds definition of selected CHIP ID register offsets
>> and register bit field definitions for Exynos5422 SoC.
>>
>> exynos_chipid_read() helper function is added to allow reading
>> the CHIP ID block registers.
>>
>> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
>> ---
>> drivers/soc/samsung/exynos-chipid.c | 16 +++++-----
>> drivers/soc/samsung/exynos-chipid.h | 48 +++++++++++++++++++++++++++++
>> 2 files changed, 57 insertions(+), 7 deletions(-)
>> create mode 100644 drivers/soc/samsung/exynos-chipid.h
>>
>> diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c
>> index 5cb018807817..4920f0ef2c55 100644
>> --- a/drivers/soc/samsung/exynos-chipid.c
>> +++ b/drivers/soc/samsung/exynos-chipid.c
>> @@ -16,10 +16,7 @@
>> -#define EXYNOS_SUBREV_MASK (0xF << 4)
>> -#define EXYNOS_MAINREV_MASK (0xF << 0)
>> -#define EXYNOS_REV_MASK (EXYNOS_SUBREV_MASK | EXYNOS_MAINREV_MASK)
>> -#define EXYNOS_MASK 0xFFFFF000
>
> Create hex-addresses in first commit in lower case.
>> +static void __iomem *exynos_chipid_base;
>
> No, this was removed in Pankaj's version v6 -> v7 and I do not want it
> to be file-scope. Having it file-scope is error prone and prevents
> having multiple instances (I do not expect having more than one but
> still code should be rather nicely generic).
I'm going to switch to using regmap so that will not be needed any
more, together with exynos_chipid_read() helper. Then the header
file would be moved to include/linux/soc/samsung.
>> +unsigned int exynos_chipid_read(unsigned int offset)
>> +{
>> + return readl_relaxed(exynos_chipid_base + offset);
>> +}
>> diff --git a/drivers/soc/samsung/exynos-chipid.h b/drivers/soc/samsung/exynos-chipid.h
>> new file mode 100644
>> index 000000000000..826a12c25fa2
>> --- /dev/null
>> +++ b/drivers/soc/samsung/exynos-chipid.h
>> @@ -0,0 +1,48 @@
>> +#define EXYNOS_CHIPID_REG_PRO_ID 0x00
>> + #define EXYNOS_SUBREV_MASK (0xf << 4)
>> + #define EXYNOS_MAINREV_MASK (0xf << 0)
>> + #define EXYNOS_REV_MASK (EXYNOS_SUBREV_MASK | \
>> + EXYNOS_MAINREV_MASK)
>> + #define EXYNOS_MASK 0xfffff000
>> +
>> +#define EXYNOS_CHIPID_REG_PKG_ID 0x04
>
> Can you comment that these are fields from this register?
> The same in second one.
OK, I will add some comment here.
>> + #define EXYNOS5422_IDS_OFFSET 24
>> + #define EXYNOS5422_IDS_MASK 0xff
--
Regards,
Sylwester
next prev parent reply other threads:[~2019-04-05 10:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20190404172220epcas1p3a6a8d843780321c4914a63d589c56b33@epcas1p3.samsung.com>
2019-04-04 17:17 ` [PATCH RFC 0/8] Exynos Adaptive Supply Voltage support Sylwester Nawrocki
[not found] ` <CGME20190404172224epcas2p21b449c0ae8e36f7e800ae67c18db35a2@epcas2p2.samsung.com>
2019-04-04 17:17 ` [PATCH RFC 1/8] soc: samsung: Add exynos chipid driver support Sylwester Nawrocki
2019-04-05 6:53 ` Krzysztof Kozlowski
2019-04-05 8:49 ` Sylwester Nawrocki
[not found] ` <CGME20190404172229epcas2p25a819e37035b26ccf53613e880bdcacf@epcas2p2.samsung.com>
2019-04-04 17:17 ` [PATCH RFC 2/8] soc: samsung: Exynos chipid driver update Sylwester Nawrocki
2019-04-05 9:22 ` Krzysztof Kozlowski
2019-04-05 10:04 ` Sylwester Nawrocki [this message]
[not found] ` <CGME20190404172234epcas1p37667ec0996000aff9297f13639908dfc@epcas1p3.samsung.com>
2019-04-04 17:17 ` [PATCH RFC 3/8] dt-bindings: exynos: Add ASV tables binding documentation Sylwester Nawrocki
2019-04-29 17:23 ` Rob Herring
2019-07-18 14:02 ` Sylwester Nawrocki
[not found] ` <CGME20190404172238epcas2p21ef28f46b728127dcd6e8ee72752a1b8@epcas2p2.samsung.com>
2019-04-04 17:17 ` [PATCH RFC 4/8] soc: samsung: Add Exynos Adaptive Supply Voltage driver Sylwester Nawrocki
2019-04-05 10:24 ` Krzysztof Kozlowski
2019-04-09 17:40 ` Sylwester Nawrocki
2019-04-23 10:50 ` Krzysztof Kozlowski
2019-04-24 8:11 ` Sylwester Nawrocki
2019-04-24 8:20 ` Krzysztof Kozlowski
[not found] ` <CGME20190404172243epcas1p39af2498a51772ee4ab2a31f26e469c5b@epcas1p3.samsung.com>
2019-04-04 17:17 ` [PATCH RFC 5/8] ARM: EXYNOS: enable exynos_chipid for ARCH_EXYNOS Sylwester Nawrocki
[not found] ` <CGME20190404172247epcas2p2d24f19f76db3cee177bd5b9df783eb3b@epcas2p2.samsung.com>
2019-04-04 17:17 ` [PATCH RFC 6/8] ARM64: " Sylwester Nawrocki
[not found] ` <CGME20190404172252epcas2p284b7e2e9e7102f6f95c982d547ed9d64@epcas2p2.samsung.com>
2019-04-04 17:17 ` [PATCH RFC 7/8] ARM: EXYNOS: Enable exynos-asv driver " Sylwester Nawrocki
[not found] ` <CGME20190404172257epcas1p20d789242a2353dc8e9ffd7f435dc5eee@epcas1p2.samsung.com>
2019-04-04 17:17 ` [PATCH RFC 8/8] ARM: dts: exynos: Add ASV tables for exynos5422/5800 Sylwester Nawrocki
2019-04-11 7:39 ` Anand Moon
2019-04-11 8:50 ` Willy Wolff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d80718b-57ad-33cd-80ff-03c01266a143@samsung.com \
--to=s.nawrocki@samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=cw00.choi@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mark.rutland@arm.com \
--cc=myungjoo.ham@samsung.com \
--cc=pankaj.dubey@samsung.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®