| #
a821c4af |
| 17-May-2017 |
Simon Glass <sjg@chromium.org> |
dm: Rename dev_addr..() functions
These support the flat device tree. We want to use the dev_read_..() prefix for functions that support both flat tree and live tree. So rename the existing function
dm: Rename dev_addr..() functions
These support the flat device tree. We want to use the dev_read_..() prefix for functions that support both flat tree and live tree. So rename the existing functions to avoid confusion.
In the end we will have:
1. dev_read_addr...() - works on devices, supports flat/live tree 2. devfdt_get_addr...() - current functions, flat tree only 3. of_get_address() etc. - new functions, live tree only
All drivers will be written to use 1. That function will in turn call either 2 or 3 depending on whether the flat or live tree is in use.
Note this involves changing some dead code - the imx_lpi2c.c file.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
4f66e09b |
| 09-May-2017 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
Signed-off-by: Stefano Babic <sbabic@denx.de>
|
| #
a6d4cd47 |
| 08-May-2017 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://git.denx.de/u-boot-sunxi
|
| #
a8f01ccf |
| 26-Apr-2017 |
Jernej Skrabec <jernej.skrabec@siol.net> |
sunxi: i2c: Add support for DM I2C
This commit adds support for DM I2C on sunxi platform. It can coexist with old style sunxi I2C driver, because it is still used in SPL and by some SoCs.
Because s
sunxi: i2c: Add support for DM I2C
This commit adds support for DM I2C on sunxi platform. It can coexist with old style sunxi I2C driver, because it is still used in SPL and by some SoCs.
Because sunxi platform doesn't yet support DM clk, reset and pinctrl driver, workaround is needed to enable clocks and set resets and pinctrls. This is done by calling i2c_init_board() in board_init(). This means that CONFIG_I2Cx_ENABLE options needs to be correctly set in order to use needed I2C controller.
Commit is based on the previous patch made by Philipp Tomsich
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
show more ...
|
| #
21342d4a |
| 08-Feb-2017 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
e160f7d4 |
| 17-Jan-2017 |
Simon Glass <sjg@chromium.org> |
dm: core: Replace of_offset with accessor
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,
dm: core: Replace of_offset with accessor
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>
show more ...
|
| #
7ce79599 |
| 30-Oct-2016 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of http://git.denx.de/u-boot-sunxi
|
| #
aec9a0f1 |
| 13-Oct-2016 |
Jagan Teki <jteki@openedev.com> |
sunxi: Rename CONFIG_SUNXI to CONFIG_ARCH_SUNXI
CONFIG_SUNXI -> CONFIG_ARCH_SUNXI and removed CONFIG_SUNIX from config_whitelist.txt
Cc: Simon Glass <sjg@chromium.org> Cc: Ian Campbell <ijc@hellion
sunxi: Rename CONFIG_SUNXI to CONFIG_ARCH_SUNXI
CONFIG_SUNXI -> CONFIG_ARCH_SUNXI and removed CONFIG_SUNIX from config_whitelist.txt
Cc: Simon Glass <sjg@chromium.org> Cc: Ian Campbell <ijc@hellion.org.uk> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jagan Teki <jteki@openedev.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
| #
87de0eb3 |
| 16-Sep-2016 |
Stefan Roese <sr@denx.de> |
i2c: mvtwsi.c: Add support for Marvell Armada 7K/8K
By adding the "marvell,mv78230-i2c" compatible property, we can enable this I2C driver to support these new ARM64 chips as well.
Signed-off-by: S
i2c: mvtwsi.c: Add support for Marvell Armada 7K/8K
By adding the "marvell,mv78230-i2c" compatible property, we can enable this I2C driver to support these new ARM64 chips as well.
Signed-off-by: Stefan Roese <sr@denx.de> Cc: Nadav Haklai <nadavh@marvell.com> Cc: Neta Zur Hershkovits <neta@marvell.com> Cc: Kostya Porotchkin <kostap@marvell.com> Cc: Omri Itach <omrii@marvell.com> Cc: Igal Liberman <igall@marvell.com> Cc: Haim Boot <hayim@marvell.com> Cc: Hanna Hawa <hannah@marvell.com> Cc: Heiko Schocher <hs@denx.de>
show more ...
|
| #
1221ce45 |
| 21-Sep-2016 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
treewide: replace #include <asm/errno.h> with <linux/errno.h>
Now, arch/${ARCH}/include/asm/errno.h and include/linux/errno.h have the same content. (both just wrap <asm-generic/errno.h>)
Replace
treewide: replace #include <asm/errno.h> with <linux/errno.h>
Now, arch/${ARCH}/include/asm/errno.h and include/linux/errno.h have the same content. (both just wrap <asm-generic/errno.h>)
Replace all include directives for <asm/errno.h> with <linux/errno.h>.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> [trini: Fixup include/clk.] Signed-off-by: Tom Rini <trini@konsulko.com>
show more ...
|
| #
da968c7b |
| 26-Aug-2016 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://git.denx.de/u-boot-i2c
|
| #
03d6cd97 |
| 25-Aug-2016 |
Stefan Roese <sr@denx.de> |
i2c: mvtwsi: Fix order of address bytes (high to low)
Patch f8a10ed1 [i2c: mvtwsi: Make address length variable] accidentally inverted the sequence of address bytes sent to the I2C device. This patc
i2c: mvtwsi: Fix order of address bytes (high to low)
Patch f8a10ed1 [i2c: mvtwsi: Make address length variable] accidentally inverted the sequence of address bytes sent to the I2C device. This patch corrects this by sending the highest byte first and the lowest byte last again.
Tested on theadorable Armada-XP board.
Signed-off-by: Stefan Roese <sr@denx.de> Cc: Mario Six <mario.six@gdsys.cc> Cc: Heiko Schocher <hs@denx.de>
show more ...
|
| #
c3c9fd31 |
| 26-Jul-2016 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://git.denx.de/u-boot-i2c
|
| #
6e677caf |
| 21-Jul-2016 |
mario.six@gdsys.cc <mario.six@gdsys.cc> |
i2c: mvtwsi: Add documentation
Add full documentation to all driver functions.
Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de>
|
| #
c68c6243 |
| 21-Jul-2016 |
mario.six@gdsys.cc <mario.six@gdsys.cc> |
i2c: mvtwsi: Make delay times frequency-dependent
Some devices using the MVTWSI driver have the option to run at speeds faster than Standard Mode (100kHZ). On the Armada 38x controllers, this is act
i2c: mvtwsi: Make delay times frequency-dependent
Some devices using the MVTWSI driver have the option to run at speeds faster than Standard Mode (100kHZ). On the Armada 38x controllers, this is actually necessary, since due to erratum FE-8471889, a timing violation concerning repeated starts prevents the controller from working correctly in Standard Mode. One of the workarounds recommended in the erratum is to set the bus to Fast Mode (400kHZ) operation and ensure all connected devices are set to Fast Mode.
In the current version of the driver, however, the delay times are hard-coded to 10ms, corresponding to Standard Mode operation. To take full advantage of the faster modes, we would need to either keep the currently configured I2C speed in a globally accessible variable, or pass it to the necessary functions as a parameter. For DM, the first option is not a problem, and we can simply keep the speed in the private data of the driver. For the legacy interface, however, we would need to introduce a static variable, which would cause problems with boots from NOR flashes; see commit d6b7757 "i2c: mvtwsi: Eliminate twsi_control_flags."
As to not clutter the interface with yet another parameter, we therefore keep the default 10ms delays for the legacy functions.
In DM mode, we make the delay time dependant on the frequency to allow taking full advantage of faster modes of operation (tested with up to 1MHZ frequency on Armada MV88F6820).
Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de>
show more ...
|
| #
24f9c6bb |
| 21-Jul-2016 |
mario.six@gdsys.cc <mario.six@gdsys.cc> |
i2c: mvtwsi: Handle zero-length offsets properly
Zero-length offsets are not properly handled by the driver. When a read operation with a zero-length offset is started, a START condition is asserted
i2c: mvtwsi: Handle zero-length offsets properly
Zero-length offsets are not properly handled by the driver. When a read operation with a zero-length offset is started, a START condition is asserted, and since no offset bytes are transferred, a repeated START is issued immediately after, which confuses the controller.
To fix this, we send the first START only if any address bytes need to be sent, and keep track of the expected start status accordingly.
Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de>
show more ...
|
| #
14a6ff2c |
| 21-Jul-2016 |
mario.six@gdsys.cc <mario.six@gdsys.cc> |
i2c: mvtwsi: Add compatibility to DM
This patch adds the necessary functions and Kconfig entry to make the MVTWSI I2C driver compatible with the driver model.
A possible device tree entry might loo
i2c: mvtwsi: Add compatibility to DM
This patch adds the necessary functions and Kconfig entry to make the MVTWSI I2C driver compatible with the driver model.
A possible device tree entry might look like this:
i2c@11100 { compatible = "marvell,mv64xxx-i2c"; reg = <0x11000 0x20>; clock-frequency = <100000>; u-boot,i2c-slave-addr = <0x0>; };
Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de>
show more ...
|
| #
f8a10ed1 |
| 21-Jul-2016 |
mario.six@gdsys.cc <mario.six@gdsys.cc> |
i2c: mvtwsi: Make address length variable
The length of the address parameter of the __twsi_i2c_read and __twsi_i2c_write functions is fixed to four bytes.
As a final step in the preparation of the
i2c: mvtwsi: Make address length variable
The length of the address parameter of the __twsi_i2c_read and __twsi_i2c_write functions is fixed to four bytes.
As a final step in the preparation of the DM conversion, we make the length of this parameter variable by turning it into an array of bytes, and convert the 32 bit value that's passed to the legacy functions into a four-byte-array on the fly.
Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de>
show more ...
|
| #
3c4db636 |
| 21-Jul-2016 |
mario.six@gdsys.cc <mario.six@gdsys.cc> |
i2c: mvtwsi: Factor out adap parameter
To be able to use the compatibility layer from the DM functions, we factor the adap parameter out of all functions, and pass the actual register base instead.
i2c: mvtwsi: Factor out adap parameter
To be able to use the compatibility layer from the DM functions, we factor the adap parameter out of all functions, and pass the actual register base instead.
Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de>
show more ...
|
| #
61bc02b2 |
| 21-Jul-2016 |
mario.six@gdsys.cc <mario.six@gdsys.cc> |
i2c: mvtwsi: Add compatibility functions
To prepare for the DM conversion, we add a layer of compatibility functions to be used by both the legacy and the DM functions.
Signed-off-by: Mario Six <ma
i2c: mvtwsi: Add compatibility functions
To prepare for the DM conversion, we add a layer of compatibility functions to be used by both the legacy and the DM functions.
Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de>
show more ...
|
| #
e0758281 |
| 21-Jul-2016 |
mario.six@gdsys.cc <mario.six@gdsys.cc> |
i2c: mvtwsi: Use 'uint' instead of 'unsigned int'
Since some additional parameters will be added in the course of this patch series (especially with the addition of DM support), we replace the longe
i2c: mvtwsi: Use 'uint' instead of 'unsigned int'
Since some additional parameters will be added in the course of this patch series (especially with the addition of DM support), we replace the longer "unsigned int" declarations with "uint" declarations to keep the parameter lists more readable.
Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de>
show more ...
|
| #
059fce9f |
| 21-Jul-2016 |
mario.six@gdsys.cc <mario.six@gdsys.cc> |
i2c: mvtwsi: Get rid of status parameter
The twsi_stop function contains a parameter "status," which is used to pass in the current exit status of the function calling twsi_stop, and either return t
i2c: mvtwsi: Get rid of status parameter
The twsi_stop function contains a parameter "status," which is used to pass in the current exit status of the function calling twsi_stop, and either return this status unchanged if it indicates an error, or return twsi_stop's exit status if it does not indicate an error.
While not massively complicated, this adds another purpose to the twsi_stop function, which should have the sole purpose of asserting a STOP condition on the bus (and not manage the exit status of its caller).
Therefore, we move the exit status management into the caller functions by introducing a "stop_status" variable and returning either the status before the twsi_stop call (kept in the "status" variable), or the status from the twsi_stop call, depending on which indicates an error.
Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de>
show more ...
|
| #
670514f5 |
| 21-Jul-2016 |
mario.six@gdsys.cc <mario.six@gdsys.cc> |
i2c: mvtwsi: Eliminate flags parameter
Due to breaking boots from NOR flashes, commit d6b7757 ("i2c: mvtwsi: Eliminate twsi_control_flags") removed the static global twsi_control_flags variable, whi
i2c: mvtwsi: Eliminate flags parameter
Due to breaking boots from NOR flashes, commit d6b7757 ("i2c: mvtwsi: Eliminate twsi_control_flags") removed the static global twsi_control_flags variable, which kept a set of default flags that were always or'd to the control register when writing. It was replaced with a flags parameter, which was passed around between the functions that needed it.
Since the twsi_control_flags variable was used just for the purposes of a) setting the MVTWSI_CONTROL_TWSIEN on every control register write, and b) setting the MVTWSI_CONTROL_ACK from twsi_i2c_read if needed, anyway, the added overhead of another variable being passed around is no longer justified, and we are better off implementing this flag setting logic locally in the functions that actually write to the control register.
Therefore, this patch sets MVTWSI_CONTROL_TWSIEN on every control register write, replaces the twsi_i2c_read's flags parameter with a ack_flag parameter, which tells the function whether to acknowledge the read or not, and removes every other instance of the flags variable. This has the added benefit that now every notion of "global default flags" is gone, and it's much easier to see which control flags are actually set at which point in time.
Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de>
show more ...
|
| #
49c801bf |
| 21-Jul-2016 |
mario.six@gdsys.cc <mario.six@gdsys.cc> |
i2c: mvtwsi: Improve and fix comments
This patch fixes only comments/documentation: Streamline capitalization and improve grammar/punctuation.
Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed
i2c: mvtwsi: Improve and fix comments
This patch fixes only comments/documentation: Streamline capitalization and improve grammar/punctuation.
Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de>
show more ...
|
| #
dfc3958c |
| 21-Jul-2016 |
mario.six@gdsys.cc <mario.six@gdsys.cc> |
i2c: mvtwsi: Streamline code and add documentation
Convert groups of logically connected preprocessor defines into proper enums, one macro into an inline function, and add documentation to/extend ex
i2c: mvtwsi: Streamline code and add documentation
Convert groups of logically connected preprocessor defines into proper enums, one macro into an inline function, and add documentation to/extend existing documentation of these items.
Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de>
show more ...
|