projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff1b515
)
clk: rs9: Limit check to vendor ID in VID register
author
Marek Vasut
<marek.vasut+renesas@mailbox.org>
Mon, 13 Nov 2023 22:18:52 +0000
(23:18 +0100)
committer
Stephen Boyd
<sboyd@kernel.org>
Sun, 17 Dec 2023 23:24:54 +0000
(15:24 -0800)
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 <biju.das.jz@bp.renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Link:
https://lore.kernel.org/r/20231113221949.111964-2-marek.vasut+renesas@mailbox.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-renesas-pcie.c
patch
|
blob
|
history
diff --git
a/drivers/clk/clk-renesas-pcie.c
b/drivers/clk/clk-renesas-pcie.c
index 380245f635d66cb8b6891f28fed2f45e38eeb5fb..9b985127b3cba6bd60801d9282091de96573e403 100644
(file)
--- a/
drivers/clk/clk-renesas-pcie.c
+++ b/
drivers/clk/clk-renesas-pcie.c
@@
-42,6
+42,7
@@
#define RS9_REG_DID 0x6
#define RS9_REG_BCP 0x7
+#define RS9_REG_VID_MASK GENMASK(3, 0)
#define RS9_REG_VID_IDT 0x01
#define RS9_REG_DID_TYPE_FGV (0x0 << RS9_REG_DID_TYPE_SHIFT)
@@
-333,6
+334,7
@@
static int rs9_probe(struct i2c_client *client)
if (ret < 0)
return ret;
+ vid &= RS9_REG_VID_MASK;
if (vid != RS9_REG_VID_IDT || did != rs9->chip_info->did)
return dev_err_probe(&client->dev, -ENODEV,
"Incorrect VID/DID: %#02x, %#02x. Expected %#02x, %#02x\n",