- Nov 10, 2022
-
-
Tom Rini authored
This converts the following to Kconfig: CONFIG_SYS_I2C_INIT_BOARD Signed-off-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Dec 27, 2021
-
-
Tom Rini authored
This converts the following to Kconfig: CONFIG_SYS_IMMR We do this by consolidating the SYS_IMMR options we have and providing defaults. We also, in the few places where M68K was also sharing code with these platforms, define it within the file to CONFIG_SYS_MBAR to match usage. This should be cleaned up longer term. Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Aug 30, 2021
-
-
Tom Rini authored
- As there are no boards that use different values for speed / slave on different buses, use a single option. - Switch to using the common SYS_I2C_SPEED / SYS_I2C_SLAVE options. - Introduce _HAS_ options for additional buses as only the first one is common to all users. - Convert all remaining symbols to Kconfig. Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Feb 21, 2021
-
-
Use CONFIG_IS_ENABLED() macro, which provides more convenient way to check $(SPL)DM_I2C/$(SPL)DM_I2C_GPIO configs for both SPL and U-Boot proper. CONFIG_IS_ENABLED(DM_I2C) expands to: - 1 if CONFIG_SPL_BUILD is undefined and CONFIG_DM_I2C is set to 'y', - 1 if CONFIG_SPL_BUILD is defined and CONFIG_SPL_DM_I2C is set to 'y', - 0 otherwise. All occurences were replaced automatically using these bash cmds: $ find . -type f -exec sed -i 's/ifndef CONFIG_DM_I2C/if !CONFIG_IS_ENABLED(DM_I2C)/g' {} + $ find . -type f -exec sed -i 's/ifdef CONFIG_DM_I2C/if CONFIG_IS_ENABLED(DM_I2C)/g' {} + $ find . -type f -exec sed -i 's/defined(CONFIG_DM_I2C)/CONFIG_IS_ENABLED(DM_I2C)/g' {} + $ find . -type f -exec sed -i 's/ifndef CONFIG_DM_I2C_GPIO/if !CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} + $ find . -type f -exec sed -i 's/ifdef CONFIG_DM_I2C_GPIO/if CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} + $ find . -type f -exec sed -i 's/defined(CONFIG_DM_I2C_GPIO)/CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} + Reviewed-by:
Heiko Schocher <hs@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Igor Opaniuk <igor.opaniuk@foundries.io> Reviewed-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Priyanka Jain <priyanka.jain@nxp.com>
-
- Feb 02, 2021
-
-
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Dec 13, 2020
-
-
Simon Glass authored
This name is far too long. Rename it to remove the 'data' bits. This makes it consistent with the platdata->plat rename. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This construct is quite long-winded. In earlier days it made some sense since auto-allocation was a strange concept. But with driver model now used pretty universally, we can shorten this to 'auto'. This reduces verbosity and makes it easier to read. Coincidentally it also ensures that every declaration is on one line, thus making dtoc's job easier. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- May 19, 2020
-
-
Move this uncommon header out of the common header. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Move this header out of the common header. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Jan 27, 2020
-
-
Convert the obvious uses of i2c bus speeds to use the enum. Use livetree access for code changes. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
- Dec 02, 2019
-
-
These functions belong in time.h so move them over and add comments. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
- May 07, 2018
-
-
Tom Rini authored
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Apr 11, 2018
-
-
Add an option to get the clock speed from the device tree, hence adding compatibility with DM clock drivers. Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Since bus translations are now fully supported, use a plain "dev_read_addr" to get the device address from the device tree. Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
- Feb 06, 2018
-
-
Make the fsl_i2c driver compatible with a live device tree. Reviewed-by:
Heiko Schocher <hs@denx.de> Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Some functions in the fsl_i2c driver are declared as inline, even though they are quite large, which needlessly increases the size of the resulting binary. This patch removes the inline declarations. Reviewed-by:
Heiko Schocher <hs@denx.de> Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Fix some style violations in the fsl_i2c I2C driver, and use shorter type names for variables in some cases. Reviewed-by:
Heiko Schocher <hs@denx.de> Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
- May 15, 2017
-
-
This option is not used by any boards. Drop it. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Feb 17, 2017
-
-
Tom Rini authored
With gcc-6.x we see: drivers/i2c/fsl_i2c.c:86:3: warning: ‘fsl_i2c_speed_map’ defined but not used [-Wunused-const-variable=] The easy way to fix this is that since we only use fsl_i2c_speed_map at all on __M68K__ move the existing guards around slightly. Reported-by:
Thomas Schaefer <Thomas.Schaefer@kontron.com> Signed-off-by:
Tom Rini <trini@konsulko.com> Acked-by:
Heiko Schocher <hs@denx.de>
-
- Feb 08, 2017
-
-
Simon Glass authored
At present devices use a simple integer offset to record the device tree node associated with the device. In preparation for supporting a live device tree, which uses a node pointer instead, refactor existing code to access this field through an inline function. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Aug 12, 2016
-
-
Some code may want to read reg values from DT, but from nodes that aren't associated with DM devices, so using dev_get_addr_index() isn't appropriate. In this case, fdtdec_get_addr_size_*() are the functions to use. However, "translation" (via the chain of ranges properties in parent nodes) may still be desirable. Add a function parameter to request that, and implement it. Update all call sites to default to the original behaviour. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Squashed in build fix from Stephen: Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Jul 26, 2016
-
-
Mario Six authored
Due to a oversight in testing, the initialization of the recently introduced Freescale I2C DM driver works only for 36 bit mode of e.g. the MPC85XX SoCs (specifically, if the physical addresses are 64 bit wide and the DT addresses 32 bit wide). This patch corrects the initialization so that it will work in a more general setting. Signed-off-by:
Mario Six <mario.six@gdsys.cc> Reviewed-by:
York Sun <york.sun@nxp.com>
-
- May 17, 2016
-
-
Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
- Jan 19, 2016
-
-
Tom Rini authored
In a number of places we had wordings of the GPL (or LGPL in a few cases) license text that were split in such a way that it wasn't caught previously. Convert all of these to the correct SPDX-License-Identifier tag. Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Nov 23, 2014
-
-
U-Boot has never cared about the type when we get max/min of two values, but Linux Kernel does. This commit gets min, max, min3, max3 macros synced with the kernel introducing type checks. Many of references of those macros must be fixed to suppress warnings. We have two options: - Use min, max, min3, max3 only when the arguments have the same type (or add casts to the arguments) - Use min_t/max_t instead with the appropriate type for the first argument Signed-off-by:
Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by:
Pavel Machek <pavel@denx.de> Acked-by:
Lukasz Majewski <l.majewski@samsung.com> Tested-by:
Lukasz Majewski <l.majewski@samsung.com> [trini: Fixup arch/blackfin/lib/string.c] Signed-off-by:
Tom Rini <trini@ti.com>
-
- Nov 10, 2014
-
-
Some slow I2C devices like Power Monitor(ZM7304) at times do not work well with low timeout value, so I2C bus get stuck during read cycle with this device, changing it to 100ms from 10ms works fine A lot of other i2c drivers like mxc and i2c drivers of BOOTROM also use relax timeouts to give sufficient ticks to work well with slower devices Signed-off-by:
Shaveta Leekha <shaveta@freescale.com> Signed-off-by:
Poonam Aggrwal <poonam.aggrwal@freescale.com>
-
- Jul 16, 2014
-
-
Add support for 3rd and 4th I2C. Signed-off-by:
Shengzhou Liu <Shengzhou.Liu@freescale.com>
-
- Apr 29, 2014
-
-
Most of the I2C slaves support accesses in the typical style that is : read/write series of bytes at particular address offset. These transactions look like:" (1) START:Address:Tx:Offset:RESTART:Address[0..4]:Tx/Rx:data[0..n]:STOP" However there are certain devices which support accesses in terms of the transactions as follows: (2) "START:Address:Tx:Txdata[0..n1]:Clock_stretching: RESTART:Address:Rx:data[0..n2]" Here Txdata is typically a command and some associated data, similarly Rxdata could be command status plus some data received as a response to the command sent. Type (1) transactions are currently supportd in the i2c driver using i2c_read and i2c_write APIs. I2C EEPROMs, RTC, etc fall in this category. To handle type (2) along with type (1) transactions, i2c_read() function has been modified. Signed-off-by:
Shaveta Leekha <shaveta@freescale.com> Signed-off-by:
Poonam Aggrwal <poonam.aggrwal@freescale.com>
-
- Aug 20, 2013
-
-
This workaround is for the erratum I2C A004447. Device reference manual provides a scheme that allows the I2C master controller to generate nine SCL pulses, which enable an I2C slave device that held SDA low to release SDA. However, due to this erratum, this scheme no longer works. In addition, when I2C is used as a source of the PBL, the state machine is not able to recover. At the same time, delete the reduplicative definition of SVR_VER and SVR_REV. The SVR_REV is the low 8 bits rather than the low 16 bits of svr. And we use the CONFIG_SYS_FSL_A004447_SVR_REV macro instead of hard-code value 0x10, 0x11 and 0x20. The CONFIG_SYS_FSL_A004447_SVR_REV = 0x00 represents that one version of platform has this I2C errata. So enable this errata by IS_SVR_REV(svr, maj, min) function. Signed-off-by:
Zhao Chenhui <chenhui.zhao@freescale.com> Signed-off-by:
Chunhe Lan <Chunhe.Lan@freescale.com> Cc: Scott Wood <scottwood@freescale.com> Cc: Heiko Schocher <hs@denx.de>
-
When the code detected that the bus is hung (e.g. SDA stuck low), send 9 pulses on SCL to try to fixup the bus. Signed-off-by:
Zhao Chenhui <chenhui.zhao@freescale.com> Signed-off-by:
Chunhe Lan <Chunhe.Lan@freescale.com> Cc: Scott Wood <scottwood@freescale.com> Cc: Heiko Schocher <hs@denx.de>
-
- Jul 23, 2013
-
-
Heiko Schocher authored
- added to fsl_i2c driver new multibus/multiadpater support - adapted all config files, which uses this driver Signed-off-by:
Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Stephen Warren <swarren@wwwdotorg.org>
-
- Jul 16, 2013
-
-
Reinhard Pfau authored
if alen is 0: no longer start a write cycle before reading data. Signed-off-by:
Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by:
Reinhard Pfau <reinhard.pfau@gdsys.cc> Acked-by:
Heiko Schocher <hs@denx.de> Signed-off-by:
Andy Fleming <afleming@freescale.com>
-