aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-12-06 23:30:57 -0500
committerTony Lindgren <tony@atomide.com>2010-12-07 17:39:02 -0500
commit00b4ade1f1968b55bb57a91c1f09a40fc33f72a0 (patch)
tree735c088094c5bf5be0b2ae4b4cbf34069965553c
parent52aa8c539dad56728527de664f368915ff44badf (diff)
OMAP1: I2C: fix device initialization
Commit 4d17aeb1c5b2375769446d13012a98e6d265ec13 ("OMAP: I2C: split device registration and convert OMAP2+ to omap_device") broke I2C on OMAP1. The following messages appear at boot: i2c_omap i2c_omap.1: failure requesting irq 0 i2c_omap: probe of i2c_omap.1 failed with error -22 Investigation revealed that a chunk of code is missing from the original plat-omap/i2c.c file which configured the IRQ and base address for the I2C block on OMAP1. Upon adding this back, the OMAP1 I2C block seems to initialize correctly. Thanks to Cory Maccarrone <darkstar6262@gmail.com> for reporting the bug, and apologies for the breakage. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Tested-by: Cory Maccarrone <darkstar6262@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/plat-omap/i2c.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c
index a5bff9ce7cbe..a6cf4e94f14c 100644
--- a/arch/arm/plat-omap/i2c.c
+++ b/arch/arm/plat-omap/i2c.c
@@ -97,10 +97,15 @@ static inline int omap1_i2c_add_bus(int bus_id)
97{ 97{
98 struct platform_device *pdev; 98 struct platform_device *pdev;
99 struct omap_i2c_bus_platform_data *pdata; 99 struct omap_i2c_bus_platform_data *pdata;
100 struct resource *res;
100 101
101 omap1_i2c_mux_pins(bus_id); 102 omap1_i2c_mux_pins(bus_id);
102 103
103 pdev = &omap_i2c_devices[bus_id - 1]; 104 pdev = &omap_i2c_devices[bus_id - 1];
105 res = pdev->resource;
106 res[0].start = OMAP1_I2C_BASE;
107 res[0].end = res[0].start + OMAP_I2C_SIZE;
108 res[1].start = INT_I2C;
104 pdata = &i2c_pdata[bus_id - 1]; 109 pdata = &i2c_pdata[bus_id - 1];
105 110
106 return platform_device_register(pdev); 111 return platform_device_register(pdev);