diff options
author | Marek Vasut <marek.vasut+renesas@mailbox.org> | 2023-11-14 01:18:52 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2023-12-18 02:24:54 +0300 |
commit | 780da7f11a81aab64b90c2c978e2a574c0a59c83 (patch) | |
tree | 46fc9f8525e7e61dd5a33575d6c735d774f0dc22 /drivers/clk/clk-renesas-pcie.c | |
parent | ff1b5154b57c32bc00861d705db30edb05f38ab5 (diff) | |
download | linux-780da7f11a81aab64b90c2c978e2a574c0a59c83.tar.xz |
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 <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>
Diffstat (limited to 'drivers/clk/clk-renesas-pcie.c')
-rw-r--r-- | drivers/clk/clk-renesas-pcie.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/clk-renesas-pcie.c b/drivers/clk/clk-renesas-pcie.c index 380245f635d6..9b985127b3cb 100644 --- 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", |