mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 18:06:48 +07:00
media: smiapp: Don't poll for NVM ready on devices that don't need it
Only some devices require polling for NVM ready. Do the polling only on devices that need it. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
d5e550cf9f
commit
23fc92fad8
@ -986,21 +986,27 @@ static int smiapp_read_nvm_page(struct smiapp_sensor *sensor, u32 p, u8 *nvm)
|
||||
if (rval)
|
||||
return rval;
|
||||
|
||||
for (i = 1000; i > 0; i--) {
|
||||
u32 s;
|
||||
if (sensor->limits[SMIAPP_LIMIT_DATA_TRANSFER_IF_CAPABILITY] &
|
||||
SMIAPP_DATA_TRANSFER_IF_CAPABILITY_POLL) {
|
||||
for (i = 1000; i > 0; i--) {
|
||||
u32 s;
|
||||
|
||||
rval = smiapp_read(
|
||||
sensor,
|
||||
SMIAPP_REG_U8_DATA_TRANSFER_IF_1_STATUS, &s);
|
||||
rval = smiapp_read(
|
||||
sensor,
|
||||
SMIAPP_REG_U8_DATA_TRANSFER_IF_1_STATUS,
|
||||
&s);
|
||||
|
||||
if (rval)
|
||||
return rval;
|
||||
if (rval)
|
||||
return rval;
|
||||
|
||||
if (s & SMIAPP_DATA_TRANSFER_IF_1_STATUS_RD_READY)
|
||||
break;
|
||||
if (s & SMIAPP_DATA_TRANSFER_IF_1_STATUS_RD_READY)
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (!i)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
if (!i)
|
||||
return -ETIMEDOUT;
|
||||
|
||||
for (i = 0; i < SMIAPP_NVM_PAGE_SIZE; i++) {
|
||||
u32 v;
|
||||
|
Loading…
Reference in New Issue
Block a user