aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* Merge branch 'for-linus/i2c-3.2' of git://git.fluff.org/bjdooks/linuxLinus Torvalds2011-11-01
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-linus/i2c-3.2' of git://git.fluff.org/bjdooks/linux: (47 commits) i2c-s3c2410: Add device tree support i2c-s3c2410: Keep a copy of platform data and use it i2c-nomadik: cosmetic coding style corrections i2c-au1550: dev_pm_ops conversion i2c-au1550: increase timeout waiting for master done i2c-au1550: remove unused ack_timeout i2c-au1550: remove usage of volatile keyword i2c-tegra: __iomem annotation fix i2c-eg20t: Add initialize processing in case i2c-error occurs i2c-eg20t: Fix flag setting issue i2c-eg20t: add stop sequence in case wait-event timeout occurs i2c-eg20t: Separate error processing i2c-eg20t: Fix 10bit access issue i2c-eg20t: Modify returned value s32 to long i2c-eg20t: Fix bus-idle waiting issue i2c-designware: Fix PCI core warning on suspend/resume i2c-designware: Add runtime power management support i2c-designware: Add support for Designware core behind PCI devices. i2c-designware: Push all register reads/writes into the core code. i2c-designware: Support multiple cores using same ISR ...
| *---. Merge branches 'for-32/i2c/nomadik', 'for-32/i2c/s3c2410-dt' and ↵Ben Dooks2011-10-31
| |\ \ \ | | | | | | | | | | | | | | | 'for-32/i2c/tegra-iomem' into for-linus/i2c-3.2
| | | | * i2c-tegra: __iomem annotation fixOlof Johansson2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/i2c/busses/i2c-tegra.c:585:7: warning: incorrect type in assignment (different address spaces) drivers/i2c/busses/i2c-tegra.c:585:7: expected void *base drivers/i2c/busses/i2c-tegra.c:585:7: got void [noderef] <asn:2>* drivers/i2c/busses/i2c-tegra.c:619:16: warning: incorrect type in assignment (different address spaces) drivers/i2c/busses/i2c-tegra.c:619:16: expected void [noderef] <asn:2>*base drivers/i2c/busses/i2c-tegra.c:619:16: got void *base drivers/i2c/busses/i2c-tegra.c:689:10: warning: incorrect type in argument 1 (different address spaces) drivers/i2c/busses/i2c-tegra.c:689:10: expected void volatile [noderef] <asn:2>*addr drivers/i2c/busses/i2c-tegra.c:689:10: got void *base Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by; Stephen Warren <swarren@nvidia.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | * | i2c-s3c2410: Add device tree supportThomas Abraham2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add device tree probe support for Samsung's s3c2410 i2c driver. Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | * | i2c-s3c2410: Keep a copy of platform data and use itThomas Abraham2011-10-29
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The platform data is copied into driver's private data and the copy is used for all access to the platform data. This simpifies the addition of device tree support for the i2c-s3c2410 driver. Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | * / i2c-nomadik: cosmetic coding style correctionsJonas Aaberg2011-10-29
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | This fixes a number of whitespace and punctuation problems around the Nomadik I2C driver. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| * | Merge branch 'for-32/i2c/irqflags' into for-linus/i2c-3.2Ben Dooks2011-10-31
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/i2c/busses/i2c-designware-core.c Fixed up merge conflic
| | * | i2c: irq: Remove IRQF_DISABLEDYong Zhang2011-10-29
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit [c58543c8: genirq: Run irq handlers with interrupts disabled], We run all interrupt handlers with interrupts disabled and we even check and yell when an interrupt handler returns with interrupts enabled (see commit [b738a50a: genirq: Warn when handler enables interrupts]). So now this flag is a NOOP and can be removed. Signed-off-by: Yong Zhang <yong.zhang0@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | |
| | \
| | \
| | \
| | \
| | \
| *-----. \ Merge branches 'for-32/i2c/omap-v4', 'for-32/i2c/imx-dt', ↵Ben Dooks2011-10-31
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | 'for-32/i2c/eg20t-v4', 'for-32/i2c/designware-v5' and 'for-32/i2c/au1550' into for-linus/i2c-3.2
| | | | | * | i2c-au1550: dev_pm_ops conversionManuel Lauss2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use newer dev_pm_ops for PM Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | | | * | i2c-au1550: increase timeout waiting for master doneManuel Lauss2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Double the timeout in the loop which busy-waits for the "master-done" bit to be set. This bit indicates whether an i2c transaction has completed; on the DB1300 and DB1550 boards this timeout is slightly too short and causes transactions to the WM8731 codec to be falsely flagged as failed. The timeout itself is necessary since transactions to non-existant slaves never set this bit in the first place (and cause i2cdetect to hang). With this change the WM8731 codec on the DB1300/DB1550 boards is correctly detected and initialized. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | | | * | i2c-au1550: remove unused ack_timeoutManuel Lauss2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ack_timeout context member is unused, get rid of it. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | | | * | i2c-au1550: remove usage of volatile keywordManuel Lauss2011-10-29
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the usage of "volatile"s with register accessor functions. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | | * | i2c-designware: Fix PCI core warning on suspend/resumeOctavian Purdila2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PCI core warns if the legacy PM and new PM functions are present. Update the driver to only use the new power management framework. This patch fixes the following warning seen during suspend/resume: <7>[ 24.193850] i2c-designware-pci 0000:08:13.0: suspend <4>[ 24.193866] ------------[ cut here ]------------ <4>[ 24.193892] WARNING: at drivers/pci/pci-driver.c:605 pci_has_legacy_pm_support+0x48/0x4d() <4>[ 24.193925] Hardware name: OakTrail <4>[ 24.193936] Modules linked in: <4>[ 24.193958] Pid: 2834, comm: kworker/u:22 Tainted: G W 2.6.36greenridge-01402-gc8047e6 #171 <4>[ 24.193974] Call Trace: <4>[ 24.193999] [<c1033a93>] warn_slowpath_common+0x66/0xc2 <4>[ 24.194025] [<c1164143>] ? pci_has_legacy_pm_support+0x48/0x4d <4>[ 24.194052] [<c1033afe>] warn_slowpath_null+0xf/0x13 <4>[ 24.194079] [<c1164143>] pci_has_legacy_pm_support+0x48/0x4d <4>[ 24.194106] [<c11643ff>] pci_pm_suspend+0x22/0x154 <4>[ 24.194131] [<c11643dd>] ? pci_pm_suspend+0x0/0x154 <4>[ 24.194156] [<c11e8a7a>] pm_op+0x3e/0x95 <4>[ 24.194182] [<c11e931d>] __device_suspend+0x12e/0x194 <4>[ 24.194208] [<c11e974d>] ? dpm_drv_timeout+0x0/0x47 <4>[ 24.194237] [<c11e9729>] async_suspend+0x16/0x3a <4>[ 24.194265] [<c104de8e>] async_run_entry_fn+0x97/0x135 <4>[ 24.194291] [<c1043c34>] process_one_work+0x1c9/0x2db Signed-off-by: Octavian Purdila <octavian.purdila@intel.com> Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | | * | i2c-designware: Add runtime power management supportDirk Brandewie2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add runtime power management to the PCI driver. Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | | * | i2c-designware: Add support for Designware core behind PCI devices.Dirk Brandewie2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | | * | i2c-designware: Push all register reads/writes into the core code.Dirk Brandewie2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move all register manipulation code into the core, also move register offset definitions to i2c-designware-core.c since the bus specific portions of the driver no longer need/use them. Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | | * | i2c-designware: Support multiple cores using same ISRDirk Brandewie2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add check to make sure that the core is enabled and has outstanding interrupts. The activity bit is masked due to the fact that it will stay active even after the controller has been disabled until the contoller internal state machines have settled. Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | | * | i2c-designware: move controller config to bus specific portion of driverDirk Brandewie2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With multiple I2C adapters possible in the system each running at (possibly) different speeds we need to move the controller configuration bit field to the adapter. Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | | * | i2c-designware: move i2c functionality bit field to be adapter specificDirk Brandewie2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The functionality of the adapter depends on the configuration of the IP block at silicon compile time and is adapter specific. Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | | * | i2c-designware: Move retriveving the clock speed out of core code.Dirk Brandewie2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The clock frequecy supplied to the IP core is specific to a single instance of the driver. This patch makes it possible to have multiple Designware I2C cores in the system possibly running at different core frequencies. Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | | * | i2c-designware: split of i2c-designware.c into core and bus specific partsDirk Brandewie2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch splits i2c-designware.c into three pieces: i2c-designware-core.c, contains the code that interacts directly with the core. i2c-designware-platdrv.c, contains the code specific to the platform driver using the core. i2c-designware-core.h contains the definitions and declareations shared by i2c-designware-core.c and i2c-designware-platdrv.c. This patch is the first in a set to allow multiple instances of the designware I2C core in the system. Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | | * | i2c-designware: Move checking of IP core version to i2c_dw_init()Dirk Brandewie2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move checking IP core version to i2c_dw_init() in preparation for splitting i2c-designware.c into core and bus specific portions. Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | | * | i2c-designware: Allow mixed endianness accessesJean-Hugues Deschenes2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows CPUs of a given endianness to access a dw controller of a different endianness. Endianncess difference is detected at run time through the dw component type register. Signed-off-by: Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com> Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | | * | i2c-designware: Check component type registerJean-Hugues Deschenes2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Designware component type register is checked before attaching to the device. Signed-off-by: Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com> Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | | * | i2c-designware: Use local version of readl & writelJean-Hugues Deschenes2011-10-29
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use local versions of readl & writel, so per-access manipulations may be performed Signed-off-by: Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com> Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | * | i2c-eg20t: Add initialize processing in case i2c-error occursTomoya MORINAGA2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case disconnecting physical connection, need to initialize i2c device for retry access. This patch adds initialize process in case bus-idle fails and Lost arbitration. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | * | i2c-eg20t: Fix flag setting issueTomoya MORINAGA2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, in case occurring abnormal event, internal flag variable(=pch_event_flag) is not reset. This patch fixes the issue. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | * | i2c-eg20t: add stop sequence in case wait-event timeout occursTomoya MORINAGA2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add stop sequence in case wait-event timeout in write processing. (read processing already had it) Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | * | i2c-eg20t: Separate error processingTomoya MORINAGA2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error processing for NACK or wait-event must be precessed separately. So divide wait-event error processing into NACK-receiving and timeout. Add arbitration lost processing. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | * | i2c-eg20t: Fix 10bit access issueTomoya MORINAGA2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported-by: Jeffrey (Sheng-Hui) Chu <jeffchu@broadcom.com> Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | * | i2c-eg20t: Modify returned value s32 to longTomoya MORINAGA2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Type of wait_event_timeout is long not s32. This patch replaces s32 with long. Additionally, delete negative processing(ret < 0). Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | | * | i2c-eg20t: Fix bus-idle waiting issueTomoya MORINAGA2011-10-29
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when checking whether bus is idle or not, if timeout occurs, this function always returns success(zero). This patch fixes the issue. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | * | i2c-imx: add device tree probe supportShawn Guo2011-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It adds device tree probe support for i2c-imx driver. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Darius Augulis <augulis.darius@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| | * | i2c-imx: remove init/exit hooks from platform dataShawn Guo2011-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The init/exit hooks in platform data are being used nowhere, so can be removed. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: Darius Augulis <augulis.darius@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| * | | I2C: OMAP: remove unused function pointers from pdataKevin Hilman2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that this driver is using runtime PM, there is no longer a need for the idle/enable/shutdown function pointers in pdata. Signed-off-by: Kevin Hilman <khilman@ti.com>
| * | | I2C: OMAP: remove dev->idle, use usage counting provided by runtime PMKevin Hilman2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current usage of runtime PM is not quite correct. The actual idle/unidle of the I2C hardware should not happen until the runtime PM callbacks are called. Therefore, change omap_i2c_[un]idle() functions to only be called from the runtime PM callbacks (when usage count transitions to/from zero.) Also, the runtime PM core does usage counting and replaces functionality currently managed by the dev->idle flag. Remove usage of dev->idle in favor of using runtime PM, and checking status using pm_runtime_suspended(). Signed-off-by: Kevin Hilman <khilman@ti.com>
| * | | I2C: OMAP: remove unneccesary use of pdevKevin Hilman2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A pointer to the struct device associated with the i2c device is already kept in the struct omap_i2c_dev, so use omap_i2c_device to find the pointer to struct device. Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
| * | | OMAP4: I2C: Enable the wakeup in I2C_WEShubhrajyoti D2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently for OMAP4 the I2C_WE is not programmed. This patch enables the programming for OMAP4. This patch fixes a bad conflict resolution. This effectively restores the following commit Commit 120bdaa47[i2c-omap: Program I2C_WE on OMAP4 to enable i2c wakeup] which got changed by Commit a3a7acbc[I2C: OMAP2+: address confused probed version naming] Reviewed-by: Felipe Balbi <balbi@ti.com> Reported-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
| * | | I2C: OMAP1/OMAP2+: prepend I2C IP version to probed version shown in dev_infoAndy Green2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The IP version is prepended to the existing printed probed version as an "epoch" version. 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>
| * | | I2C: OMAP2+: Convert omap I2C driver to use feature implementation flags ↵Andy Green2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from platform data This patch eliminates all cpu_...() tests from the OMAP I2C driver. Instead, it uses the functionality flags in the platform data to make the decisions about product variations the driver needs to handle. 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>
| * | | I2C: OMAP1: set i2c unit feature implementation flags in platform dataAndy Green2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | I2C: OMAP2+: Pass flags up to omap i2c platform_data as wellAndy Green2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is how the driver can find the flags for its implementation functionality in its platform_data 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>
| * | | I2C: OMAP1/OMAP2+: add flags field to omap i2c platform dataAndy Green2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OMAP I2C driver can access the configuration flags through its platform data. 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>
| * | | I2C: OMAP2+: address confused probed version namingAndy Green2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver reflects the confusion that probed I2C revision from the hardware of 0x40 means it is on an OMAP4430. However, you will probe the same 0x40 ID on an OMAP3530. So this patch changes the name to reflect that. It also clarifies that the original name OMAP_I2C_REV_2 is referring to some ancient OMAP1 revision number, not to be confused with the IP revisions this patch series introduces. Similarly the term "rev" is used in the ancient OMAP1 ISR, the term is changed to use omap1 instead. 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>
| * | | I2C: OMAP2+: Solve array bounds overflow error on i2c idleAndy Green2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This solves the main problem the patch series is about. Prior to this patch on OMAP3530 the driver wrongly interprets the I2C peripheral unit's own reported revision as meaning it is running on an IP V2 device and must use the extended registers. In fact OMAP3530 is IP V1 with the smaller register set, the reason for the confusion is that the hardware does in fact report having the same IP revision index as is found on an OMAP4430, which really is IP V2 and has the extended registers. This corrects the test for which registers to use so that it decides using hwmod knowledge found in the platform_data. 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>
| * | | I2C: OMAP2+: use platform_data ip revision to select register mapAndy Green2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the register map names to reflect the IP revision they are representing, and use the platform_data IP revision index to select between them at init time. Eliminates 1 of 17 cpu_...() calls in the driver. 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>
| * | | I2C: OMAP2+: Pass hwmod rev knowledge via platform_data when i2c bus addedAndy Green2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark each OMAP I2C bus with the hwmod's knowledge of which I2C IP version is in the chip we're running on. 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>
| * | | I2C: OMAP1: set IP revision in platform dataAndy Green2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All OMAP1 are using "IP revision 1" in terms of register layout. We set this information in omap1_i2c_add_bus() so we don't have to use cpu_is_xxx() any more in the omap i2c driver. 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>
| * | | I2C: OMAP: add rev to omap i2c platform dataAndy Green2011-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to pass the I2C IP revision from the hwmod class up into the OMAP I2C driver, which does not have direct access to it. This adds a member to the platform data the OMAP I2C driver does use already to hold the I2C IP revision. 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>