diff options
author | Andy Green <andy@warmcat.com> | 2011-03-03 13:50:30 +0000 |
---|---|---|
committer | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-03-03 14:39:33 -0500 |
commit | 6359036d179623bfa01410cc783548b6774c2b3a (patch) | |
tree | 7897db996a01bc6dd0002776f0a4ab278d7a1771 | |
parent | 014433f2287b7d3b80a1de4aa0cdd33e94b8c80c (diff) |
OMAP3 I2C document why cpu type and not peripheral unit ID used to probe
Describe why we can't simply probe the peripheral unit ID
to make the decision about what register map to use
Cc: patches@linaro.org
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
-rw-r--r-- | drivers/i2c/busses/i2c-omap.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 829a2a1029f..f17e1c52d0e 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -1036,6 +1036,17 @@ omap_i2c_probe(struct platform_device *pdev) else dev->reg_shift = 2; + dev->regs = (u8 *)reg_map; + + /* + * this is a bit tricky, implementation on 4430 has the active + * part of its ID register moved to +4 instead of +0 as + * previously. So, we can't probe just using the ID register + * Complicating matters the older implementation using the + * simpler register set on 3530 also reports its revision as + * 0x40, same as the 4430 newer implementation. + */ + if (cpu_is_omap44xx()) dev->regs = (u8 *) omap4_reg_map; else |