summaryrefslogtreecommitdiff
path: root/common/hwconfig.c
diff options
context:
space:
mode:
authormario.six@gdsys.cc <mario.six@gdsys.cc>2016-07-21 11:57:04 +0200
committerHeiko Schocher <hs@denx.de>2016-07-26 10:19:29 +0200
commit670514f52479cd1e0ae7952f45fef5779719aef2 (patch)
treef96ba286d02ba9328094269455a0fca5586ae8b4 /common/hwconfig.c
parent49c801bf352933b6285873d3d3ca6b315c60710f (diff)
downloadu-boot-imx-670514f52479cd1e0ae7952f45fef5779719aef2.zip
u-boot-imx-670514f52479cd1e0ae7952f45fef5779719aef2.tar.gz
u-boot-imx-670514f52479cd1e0ae7952f45fef5779719aef2.tar.bz2
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>
Diffstat (limited to 'common/hwconfig.c')
0 files changed, 0 insertions, 0 deletions