summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/tqmx86.c
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias.schiffer@ew.tq-group.com>2021-07-16 12:00:53 +0200
committerLee Jones <lee.jones@linaro.org>2021-08-16 14:50:12 +0200
commit9a8c4bace04a61efbcce4bd44ffa8b86b03ffdfe (patch)
tree6ef7949a886ec0daa04d24cf3a42cef691b40fe5 /drivers/mfd/tqmx86.c
parentmfd: tqmx86: Add support for TQ-Systems DMI IDs (diff)
downloadlinux-9a8c4bace04a61efbcce4bd44ffa8b86b03ffdfe.tar.xz
linux-9a8c4bace04a61efbcce4bd44ffa8b86b03ffdfe.zip
mfd: tqmx86: Assume 24MHz LPC clock for unknown boards
All future TQMx86 modules should use a 24MHz LPC clock. Warn about unknown boards, but assume this is the case. Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/tqmx86.c')
-rw-r--r--drivers/mfd/tqmx86.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mfd/tqmx86.c b/drivers/mfd/tqmx86.c
index 58f35c8b5a45..7ae906ff8e35 100644
--- a/drivers/mfd/tqmx86.c
+++ b/drivers/mfd/tqmx86.c
@@ -147,7 +147,7 @@ static const char *tqmx86_board_id_to_name(u8 board_id)
}
}
-static int tqmx86_board_id_to_clk_rate(u8 board_id)
+static int tqmx86_board_id_to_clk_rate(struct device *dev, u8 board_id)
{
switch (board_id) {
case TQMX86_REG_BOARD_ID_50UC:
@@ -168,7 +168,9 @@ static int tqmx86_board_id_to_clk_rate(u8 board_id)
case TQMX86_REG_BOARD_ID_E38C:
return 33000;
default:
- return 0;
+ dev_warn(dev, "unknown board %d, assuming 24MHz LPC clock\n",
+ board_id);
+ return 24000;
}
}
@@ -229,7 +231,7 @@ static int tqmx86_probe(struct platform_device *pdev)
tqmx_gpio_resources[0].flags = 0;
}
- ocores_platform_data.clock_khz = tqmx86_board_id_to_clk_rate(board_id);
+ ocores_platform_data.clock_khz = tqmx86_board_id_to_clk_rate(dev, board_id);
if (i2c_det == TQMX86_REG_I2C_DETECT_SOFT) {
err = devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE,