lkml.org 
[lkml]   [2023]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v6 4/4] i2c: designware: Add doorbell support for Mendocino
>  static int psp_send_i2c_req(enum psp_i2c_req_type i2c_req_type)
> {
> struct psp_i2c_req *req;
> @@ -87,7 +101,7 @@ static int psp_send_i2c_req(enum psp_i2c_req_type i2c_req_type)
> req->type = i2c_req_type;
>
> start = jiffies;
> - ret = read_poll_timeout(psp_send_i2c_req_cezanne, status,
> + ret = read_poll_timeout(_psp_send_i2c_req, status,
> (status != -EBUSY),
> PSP_I2C_REQ_RETRY_DELAY_US,
> PSP_I2C_REQ_RETRY_CNT * PSP_I2C_REQ_RETRY_DELAY_US,
The timeout error handling message after this has "acquire" and
"release" flopped.

> @@ -275,6 +291,13 @@ int i2c_dw_amdpsp_probe_lock_support(struct dw_i2c_dev *dev)
> if (psp_i2c_dev)
> return -EEXIST;
>
> + /* Cezanne uses platform mailbox, Mendocino and later use doorbell */
> + rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
> + if (rdev->device == 0x1630)
> + _psp_send_i2c_req = psp_send_i2c_req_cezanne;
> + else
> + _psp_send_i2c_req = psp_send_i2c_req_mendocino;
Thinking about naming again, perhaps "mendocino" should be dropped
from the function name as the logic applies to all platforms except
cezanne.

\
 
 \ /
  Last update: 2023-03-27 18:38    [W:0.102 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site