Skip to content

Commit 780da7f

Browse files
Marek Vasutbebarino
authored andcommitted
clk: rs9: Limit check to vendor ID in VID register
Extract only vendor ID from VID register, the top 4 bits are revision ID which are not useful for the vendor ID check. Reviewed-by: Biju Das <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent ff1b515 commit 780da7f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/clk/clk-renesas-pcie.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#define RS9_REG_DID 0x6
4343
#define RS9_REG_BCP 0x7
4444

45+
#define RS9_REG_VID_MASK GENMASK(3, 0)
4546
#define RS9_REG_VID_IDT 0x01
4647

4748
#define RS9_REG_DID_TYPE_FGV (0x0 << RS9_REG_DID_TYPE_SHIFT)
@@ -333,6 +334,7 @@ static int rs9_probe(struct i2c_client *client)
333334
if (ret < 0)
334335
return ret;
335336

337+
vid &= RS9_REG_VID_MASK;
336338
if (vid != RS9_REG_VID_IDT || did != rs9->chip_info->did)
337339
return dev_err_probe(&client->dev, -ENODEV,
338340
"Incorrect VID/DID: %#02x, %#02x. Expected %#02x, %#02x\n",

0 commit comments

Comments
 (0)