All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier-oss@weidmueller.com>
To: Michal Simek <michal.simek@amd.com>, u-boot@lists.denx.de
Cc: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Subject: Re: [PATCH 03/10] soc: xilinx: zynqmp: Add machine identification support
Date: Mon, 20 Jun 2022 11:16:28 +0200	[thread overview]
Message-ID: <ab6c9980-ce20-1266-0e8e-d714b2c2211a@weidmueller.com> (raw)
In-Reply-To: <f7efc971-bb09-168b-083f-db64c165623e@amd.com>

Am 17.06.2022 um 12:41 schrieb Michal Simek:
> On 6/8/22 18:20, Stefan Herbrechtsmeier wrote:
>> [CAUTION: External Email]
>>
>> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
>>
>> Add machine identification support based on the
>> zynqmp_get_silicon_idcode_name function in board/xilinx/zynqmp/zynqmp.c.
>>
>> Signed-off-by: Stefan Herbrechtsmeier 
>> <stefan.herbrechtsmeier@weidmueller.com>
>> ---
>>
>>   drivers/soc/soc_xilinx_zynqmp.c | 289 +++++++++++++++++++++++++++++++-
>>   1 file changed, 286 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/soc/soc_xilinx_zynqmp.c 
>> b/drivers/soc/soc_xilinx_zynqmp.c
>> index a71115b17c..45592ed534 100644
>> --- a/drivers/soc/soc_xilinx_zynqmp.c
>> +++ b/drivers/soc/soc_xilinx_zynqmp.c

>> @@ -54,8 +318,7 @@ static int soc_xilinx_zynqmp_probe(struct udevice 
>> *dev)
>>
>>          priv->family = zynqmp_family;
>>
>> -       if (IS_ENABLED(CONFIG_SPL_BUILD) || current_el() == 3 ||
>> -           !IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE))
>> +       if (!IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE))
>>                  ret = zynqmp_mmio_read(ZYNQMP_PS_VERSION, 
>> &ret_payload[2]);
>>          else
>>                  ret = xilinx_pm_request(PM_GET_CHIPID, 0, 0, 0, 0,
> 
> I was looking at code and this change is very interesting.
> I think that it can be just
> ret = xilinx_pm_request(PM_GET_CHIPID, 0, 0, 0, 0,...
> because message can be sent via IPI directly.

Without zynqmp_mmio_read this driver depends on the 
CONFIG_ZYNQMP_FIRMWARE driver.

> That means that this should be completely separate patch.

I will add a separate patch.

> 
> 
>> @@ -65,6 +328,26 @@ static int soc_xilinx_zynqmp_probe(struct udevice 
>> *dev)
>>
>>          priv->revision = ret_payload[2] & ZYNQMP_PS_VER_MASK;
>>
>> +       if (IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE)) {
> 
> When above change is there you should be able to remove this checking 
> because
> you should get all payloads back in proper shape.
> 
> 
> 
>> +               /*
>> +                * Firmware returns:
>> +                * payload[0][31:0] = status of the operation
>> +                * payload[1] = IDCODE
>> +                * payload[2][19:0] = Version
>> +                * payload[2][28:20] = EXTENDED_IDCODE
>> +                * payload[2][29] = PL_INIT
>> +                */
>> +               u32 idcode = ret_payload[1];
>> +               u32 idcode2 = ret_payload[2] >>
>> +                                  ZYNQMP_CSU_VERSION_EMPTY_SHIFT;
>> +               dev_dbg(dev, "IDCODE: 0x%0x, IDCODE2: 0x%0x\n", idcode,
>> +                       idcode2);
>> +
>> +               ret = soc_xilinx_zynqmp_detect_machine(dev, idcode, 
>> idcode2);
>> +               if (ret)
>> +                       return ret;
>> +       }
>> +
>>          return 0;
>>   }
>>
>> -- 
>> 2.30.2
>>

Regards
   Stefan

  reply	other threads:[~2022-06-20  9:16 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-08 16:20 [PATCH 00/10] xilinx: zynqmp: Support foreign vendor boards Stefan Herbrechtsmeier
2022-06-08 16:20 ` [PATCH 01/10] firmware: firmware-zynqmp: Check if rx channel dev pointer is valid Stefan Herbrechtsmeier
2022-06-08 16:20 ` [PATCH 02/10] firmware: firmware-zynqmp: Probe driver before use Stefan Herbrechtsmeier
2022-06-16 14:22   ` Michal Simek
2022-06-20  6:40     ` Stefan Herbrechtsmeier
2022-06-20  6:51       ` Michal Simek
2022-06-20  9:33         ` Stefan Herbrechtsmeier
2022-06-08 16:20 ` [PATCH 03/10] soc: xilinx: zynqmp: Add machine identification support Stefan Herbrechtsmeier
2022-06-17 10:41   ` Michal Simek
2022-06-20  9:16     ` Stefan Herbrechtsmeier [this message]
2022-06-08 16:20 ` [PATCH 04/10] xilinx: zynqmp: Use soc machine function to get silicon idcode name Stefan Herbrechtsmeier
2022-06-17 10:41   ` Michal Simek
2022-06-08 16:20 ` [PATCH 05/10] xilinx: cpuinfo: Print soc machine Stefan Herbrechtsmeier
2022-06-08 16:20 ` [PATCH 06/10] xilinx: common: Separate display cpu info function Stefan Herbrechtsmeier
2022-06-08 16:20 ` [PATCH 07/10] xilinx: zynqmp: make spi flash support optional Stefan Herbrechtsmeier
2022-06-08 16:20 ` [PATCH 08/10] tools: zynqmp_psu_init_minimize: Remove low level uart settings Stefan Herbrechtsmeier
2022-06-08 16:20 ` [PATCH 09/10] tools: zynqmp_psu_init_minimize: Add serdes_illcalib forward declaration Stefan Herbrechtsmeier
2022-06-16 15:13   ` Michal Simek
2022-06-20  7:07     ` Stefan Herbrechtsmeier
2022-06-20  7:18       ` Michal Simek
2022-06-20 13:38         ` Stefan Herbrechtsmeier
2022-06-20 13:53           ` Michal Simek
2022-06-08 16:20 ` [PATCH 10/10] xilinx: zynqmp: Support vendor specific board_init Stefan Herbrechtsmeier
2022-06-16 15:12   ` Michal Simek
2022-06-20  6:48     ` Stefan Herbrechtsmeier
2022-06-20  6:53       ` Michal Simek
2022-06-20  9:36         ` Stefan Herbrechtsmeier
2022-06-17 11:06 ` [PATCH 00/10] xilinx: zynqmp: Support foreign vendor boards Michal Simek

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=ab6c9980-ce20-1266-0e8e-d714b2c2211a@weidmueller.com \
    --to=stefan.herbrechtsmeier-oss@weidmueller.com \
    --cc=michal.simek@amd.com \
    --cc=stefan.herbrechtsmeier@weidmueller.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.