mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-09 07:14:48 +08:00
media: atomisp: Remove non working doorbell check from punit_ddr_dvfs_enable()
punit_ddr_dvfs_enable() is only used on CHT devices and there dmesg gets filled with: "DDR DVFS, door bell is not cleared within 3ms" messages, so clearly the doorbell checking is not working. This check was added by: https://github.com/intel/ProductionKernelQuilts/blob/master/uefi/cht-m1stable/patches/cam-0340-atomisp-add-door-bell-for-ddr-dvfs-on-cht.patch Which commit message says: "PUNIT interface added to check Req_ACK of freq status". This suggests that the doorbell mechanism may only be available with certain PUNIT fw versions and it seems that many CHT devices do not have this fw version; that or the doorbell mechanism is not working for other reasons. Revert cam-0340-atomisp-add-door-bell-for-ddr-dvfs-on-cht.patch, replacing the doorbell check with a msleep(20) this fixes dmesg getting filled with error messages. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
d8ba8ba6d5
commit
e6548795bb
@ -638,27 +638,16 @@ done:
|
||||
*/
|
||||
static void punit_ddr_dvfs_enable(bool enable)
|
||||
{
|
||||
int door_bell = 1 << 8;
|
||||
int max_wait = 30;
|
||||
int reg;
|
||||
|
||||
iosf_mbi_read(BT_MBI_UNIT_PMC, MBI_REG_READ, MRFLD_ISPSSDVFS, ®);
|
||||
if (enable) {
|
||||
reg &= ~(MRFLD_BIT0 | MRFLD_BIT1);
|
||||
} else {
|
||||
reg |= (MRFLD_BIT1 | door_bell);
|
||||
reg |= MRFLD_BIT1;
|
||||
reg &= ~(MRFLD_BIT0);
|
||||
}
|
||||
iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_REG_WRITE, MRFLD_ISPSSDVFS, reg);
|
||||
|
||||
/* Check Req_ACK to see freq status, wait until door_bell is cleared */
|
||||
while ((reg & door_bell) && max_wait--) {
|
||||
iosf_mbi_read(BT_MBI_UNIT_PMC, MBI_REG_READ, MRFLD_ISPSSDVFS, ®);
|
||||
usleep_range(100, 500);
|
||||
}
|
||||
|
||||
if (max_wait == -1)
|
||||
pr_info("DDR DVFS, door bell is not cleared within 3ms\n");
|
||||
}
|
||||
|
||||
static int atomisp_mrfld_power(struct atomisp_device *isp, bool enable)
|
||||
@ -671,8 +660,10 @@ static int atomisp_mrfld_power(struct atomisp_device *isp, bool enable)
|
||||
dev_dbg(isp->dev, "IUNIT power-%s.\n", enable ? "on" : "off");
|
||||
|
||||
/* WA for P-Unit, if DVFS enabled, ISP timeout observed */
|
||||
if (IS_CHT && enable)
|
||||
if (IS_CHT && enable) {
|
||||
punit_ddr_dvfs_enable(false);
|
||||
msleep(20);
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME:WA for ECS28A, with this sleep, CTS
|
||||
|
Loading…
Reference in New Issue
Block a user