Re: [RFC] Provide a generic interface for getting the SOC ID and version


Thomas, Ramesh
 

On 07/19/2016 12:15 PM, Liu, Baohong wrote:
Hi Pedro,

-----Original Message-----
From: Morales Romero, Pedro
Sent: Tuesday, July 19, 2016 2:23 AM
To: Liu, Baohong <baohong.liu(a)intel.com>; Boie, Andrew P
<andrew.p.boie(a)intel.com>; devel(a)lists.zephyrproject.org
Subject: RE: [RFC] Provide a generic interface for getting the SOC ID and
version

Hi all,

The user might know the SOC ID at compile time (although a user might want
to check against the hardware in case of doubt).
In that case we define the QUARK_D2000 and QUARK_SE via #define
symbols.

The SOC revision can change between hardware stepping, so the user might
not know at compile time the version of a given model.
In that case reading the hardware registers is the only way to know the
revision.
Good point. If different stepping can have different revision, seems like the #define
method would need a configuration flag to distinguish the stepping within the SOC
which may not be preferable?
Is there a specific requirement for the revision id? Is SOC ID enough to
meet the requirement?


Cheers,
Pedro


-----Original Message-----
From: Liu, Baohong [mailto:baohong.liu(a)intel.com]
Sent: Monday, July 18, 2016 11:51 PM
To: Boie, Andrew P <andrew.p.boie(a)intel.com>;
devel(a)lists.zephyrproject.org
Subject: [devel] Re: [RFC] Provide a generic interface for getting the SOC ID
and version

Thanks for the feedback.

I summarized the updated RFC with the feedback.

The SoC id and revision information would be using #define which would be
SoC specific value.

/* This defines the SoC id */
#define SOC_ID XXXX

/* This defines SoC revision information. */
#define SOC_REV YYYY

Depending on the SoC, this can include different types of version
Information.

If there is other feedback, please let me know and I can incorporate.

-----Original Message-----
From: Liu, Baohong
Sent: Friday, July 15, 2016 4:40 PM
To: Boie, Andrew P <andrew.p.boie(a)intel.com>;
devel(a)lists.zephyrproject.org
Subject: RE: [RFC] Provide a generic interface for getting the SOC ID
and version

Hi Andrew,

-----Original Message-----
From: Boie, Andrew P
Sent: Friday, July 15, 2016 3:41 PM
To: devel(a)lists.zephyrproject.org; Liu, Baohong
<baohong.liu(a)intel.com>
Subject: Re: [RFC] Provide a generic interface for getting the SOC
ID and version

On Fri, 2016-07-15 at 18:50 +0000, Liu, Baohong wrote:

Actually that's not what this API meant to achieve. Some confusion
in the text; the purpose is to provide a generic API for
retrieving this information. How the information is obtained is
implementation detail and in fact, As much possible should be
build time decided as you pointe it out.
Since we've established we should do this at build time, why not
make this a Kconfig or some other #define instead of adding C code
which will add to the footprint?
Yes, the implementation should be through #define.

As the requirement from the ZEP is to get this information from a HAL
(e.g QMSI), we can require HAL does this using #define. (current QMSI
implements this as C function though so that requires it changed to
fit this requirement).

Andrew

Join devel@lists.zephyrproject.org to automatically receive all group messages.