lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZAXWzMFBjo57UUa+@smile.fi.intel.com>
Date:   Mon, 6 Mar 2023 14:04:28 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Mario Limonciello <mario.limonciello@....com>
Cc:     Jan Dąbroś <jsd@...ihalf.com>,
        Grzegorz Bernacki <gjb@...ihalf.com>, Rijo-john.Thomas@....com,
        Thomas.Lendacky@....com, herbert@...dor.apana.org.au,
        Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 9/9] i2c: designware: Add support for AMDI0020 ACPI ID

On Fri, Mar 03, 2023 at 10:50:47AM -0600, Mario Limonciello wrote:
> Cezanne and Skyrim have the same PSP hardware but use a different
> protocol to negotiate I2C arbitration. To disambiguate this going
> forward introduce a new ACPI ID to represent the protocol that utilizes
> a doorbell.

> Signed-off-by: Mario Limonciello <mario.limonciello@....com>
> ---
> v2->v3:
>  * Split from earlier patch to standalone
> ---
>  drivers/i2c/busses/i2c-designware-amdpsp.c  | 5 +++--
>  drivers/i2c/busses/i2c-designware-platdrv.c | 1 +
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-designware-amdpsp.c b/drivers/i2c/busses/i2c-designware-amdpsp.c
> index 2c671973010d..44b8432458b0 100644
> --- a/drivers/i2c/busses/i2c-designware-amdpsp.c
> +++ b/drivers/i2c/busses/i2c-designware-amdpsp.c
> @@ -101,11 +101,12 @@ static int psp_send_i2c_req_amdi0019(enum psp_i2c_req_type i2c_req_type)
>  
>  static int psp_send_i2c_req(enum psp_i2c_req_type i2c_req_type)
>  {
> +	const char *hid = acpi_device_hid(ACPI_COMPANION(psp_i2c_dev));
>  	unsigned long start = jiffies;
>  	int ret;
>  
> -	/* Use doorbell for Skyrim and mailbox for Cezanne */
> -	if (boot_cpu_data.x86 == 25 && boot_cpu_data.x86_model == 80)

Ah, in this form it's getting better than I thought!

Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

> +	/* Use doorbell for AMDI0020 and mailbox for AMDI0019 */
> +	if (!strcmp(hid, "AMDI0019"))
>  		ret = psp_send_i2c_req_amdi0019(i2c_req_type);
>  	else
>  		ret = psp_ring_platform_doorbell(i2c_req_type);
> diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
> index 89ad88c54754..5ca71bda9ac2 100644
> --- a/drivers/i2c/busses/i2c-designware-platdrv.c
> +++ b/drivers/i2c/busses/i2c-designware-platdrv.c
> @@ -51,6 +51,7 @@ static const struct acpi_device_id dw_i2c_acpi_match[] = {
>  	{ "AMD0010", ACCESS_INTR_MASK },
>  	{ "AMDI0010", ACCESS_INTR_MASK },
>  	{ "AMDI0019", ACCESS_INTR_MASK | ARBITRATION_SEMAPHORE },
> +	{ "AMDI0020", ACCESS_INTR_MASK | ARBITRATION_SEMAPHORE },
>  	{ "AMDI0510", 0 },
>  	{ "APMC0D0F", 0 },
>  	{ "HISI02A1", 0 },
> -- 
> 2.34.1
> 

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ