Skip to content

Commit

Permalink
I2C: OMAP1: set i2c unit feature implementation flags in platform data
Browse files Browse the repository at this point in the history
Most of the OMAP1 implementation flags are set statically, with the
exception that omap7xx has its data bus wired up differently.

Cc: patches@linaro.org
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kevin Hilman <khilman@ti.com>
  • Loading branch information
Andy Green authored and Ben Dooks committed Oct 29, 2011
1 parent 029a1e7 commit 8e286f5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions arch/arm/plat-omap/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,19 @@ static inline int omap1_i2c_add_bus(int bus_id)
/* all OMAP1 have IP version 1 register set */
pdata->rev = OMAP_I2C_IP_VERSION_1;

/* all OMAP1 I2C are implemented like this */
pdata->flags = OMAP_I2C_FLAG_NO_FIFO |
OMAP_I2C_FLAG_SIMPLE_CLOCK |
OMAP_I2C_FLAG_16BIT_DATA_REG |
OMAP_I2C_FLAG_ALWAYS_ARMXOR_CLK;

/* how the cpu bus is wired up differs for 7xx only */

if (cpu_is_omap7xx())
pdata->flags |= OMAP_I2C_FLAG_BUS_SHIFT_1;
else
pdata->flags |= OMAP_I2C_FLAG_BUS_SHIFT_2;

return platform_device_register(pdev);
}

Expand Down

0 comments on commit 8e286f5

Please sign in to comment.