[coreboot-gerrit] Change in coreboot[master]: drivers/ics954309: conditionalize clockgen setup
Andrey Korolyov (Code Review)
gerrit at coreboot.org
Mon Aug 14 22:41:22 CEST 2017
Andrey Korolyov has uploaded this change for review. ( https://review.coreboot.org/21005
Change subject: drivers/ics954309: conditionalize clockgen setup
......................................................................
drivers/ics954309: conditionalize clockgen setup
The Z61m board need not to set four upper bits on the clockgen
address due to platform-specific issue effectively preventing
writes to this area.
Change-Id: Ib17a67a31658256040d63cd45b354c1dfced952a
Signed-off-by: Andrey Korolyov <andrey at xdel.ru>
---
M src/drivers/ics/954309/ics954309.c
1 file changed, 9 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/21005/1
diff --git a/src/drivers/ics/954309/ics954309.c b/src/drivers/ics/954309/ics954309.c
index a3d1d81..dc334cd 100644
--- a/src/drivers/ics/954309/ics954309.c
+++ b/src/drivers/ics/954309/ics954309.c
@@ -27,7 +27,12 @@
static void ics954309_init(struct device *dev)
{
struct drivers_ics_954309_config *config;
- u8 initdata[12];
+#ifdef CONFIG_BOARD_LENOVO_Z61M
+ int p = 8;
+#else
+ int p = 12;
+#endif
+ u8 initdata[p];
if (!dev->enabled || dev->path.type != DEVICE_PATH_I2C)
return;
@@ -42,12 +47,13 @@
initdata[5] = config->reg5;
initdata[6] = config->reg6;
initdata[7] = config->reg7;
+#ifndef CONFIG_BOARD_LENOVO_Z61M
initdata[8] = config->reg8;
initdata[9] = config->reg9;
initdata[10] = config->reg10;
initdata[11] = config->reg11;
-
- smbus_block_write(dev, 0, 12, initdata);
+#endif
+ smbus_block_write(dev, 0, p, initdata);
}
static struct device_operations ics954309_operations = {
--
To view, visit https://review.coreboot.org/21005
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib17a67a31658256040d63cd45b354c1dfced952a
Gerrit-Change-Number: 21005
Gerrit-PatchSet: 1
Gerrit-Owner: Andrey Korolyov <andrey at xdel.ru>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170814/575a26ed/attachment-0001.html>
More information about the coreboot-gerrit
mailing list