u-boot/include/linux
mario.six@gdsys.cc ca388143ce linux/compat.h: Properly implement ndelay fallback
Commit c68c62 ("i2c: mvtwsi: Make delay times frequency-dependent")
extensively used the ndelay function with a calculated parameter
which is dependant on the configured frequency of the I2C bus. If
standard speed is employed, the parameter is usually 10000 (10000ns
period length for 100kHz frequency).

But, since the arm architecture does not implement a proper version of
ndelay, the fallback default from include/linux/compat.h is used,
which defines every ndelay as udelay(1). This causes problems for
slower speeds on arm, since the delay time is now 9us too short for
the desired frequency, which leads to random failures of the I2C
interface.

To remedy this, we implement a proper, parameter-aware ndelay fallback
for architectures that don't implement a real ndelay function.

Reported-By: Jason Brown <Jason.brown@apcon.com>
To: Tom Rini <trini@konsulko.com>
To: Heiko Schocher <hs@denx.de>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
2016-11-28 15:10:34 -05:00
..
byteorder
mtd treewide: replace #include <asm/errno.h> with <linux/errno.h> 2016-09-23 17:55:42 -04:00
unaligned
usb drivers: usb: xhci-fsl: Implement Erratum A-010151 for FSL USB3 controller 2016-09-27 23:30:49 +02:00
apm_bios.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
bch.h Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
bitops.h bitops: Add fls_long and __ffs64 2015-11-05 10:52:34 -05:00
bitrev.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
bug.h bug.h: move BUILD_BUG_* defines to include/linux/bug.h 2016-01-25 10:39:59 -05:00
compat.h linux/compat.h: Properly implement ndelay fallback 2016-11-28 15:10:34 -05:00
compiler-clang.h compiler*.h: sync include/linux/compiler*.h with Linux 3.16 2014-09-16 12:23:57 -04:00
compiler-gcc.h compiler*.h: sync include/linux/compiler*.h with Linux 4.5-rc6 2016-02-29 11:43:24 -05:00
compiler-intel.h compiler*.h: sync include/linux/compiler*.h with Linux 4.5-rc6 2016-02-29 11:43:24 -05:00
compiler.h compiler*.h: sync include/linux/compiler*.h with Linux 4.5-rc6 2016-02-29 11:43:24 -05:00
crc7.h
crc8.h lib/crc8: Add crc start value 2016-04-11 20:48:26 -04:00
crc32.h
ctype.h
drm_dp_helper.h tegra124: video: Add full link training for eDP 2015-05-13 09:24:12 -07:00
edd.h Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
err.h sf: Adopt flash table INFO macro from Linux 2016-11-18 13:04:52 +05:30
errno.h errno.h: sync error macros with linux 4.8-rc7 2016-09-23 22:25:43 -04:00
ethtool.h add support for Xilinx 1000BASE-X phy (GTX) 2013-06-24 19:11:13 -05:00
fb.h Fix spelling of "occurred". 2016-05-02 18:37:09 -04:00
immap_qe.h QE/DeepSleep: add QE deepsleep support for mpc85xx 2015-04-21 10:19:19 -07:00
input.h Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
io.h linux/io.h: add generic ioremap()/iounmap() defines 2016-07-14 18:22:26 -04:00
ioctl.h
ioport.h
kbuild.h clang: workaround for generated constants 2014-09-09 13:51:54 +02:00
kconfig.h linux/kconfig.h: add CPP macros useful for per-image config options 2015-08-18 13:46:00 -04:00
kernel.h Fix SIZE_MAX compiler warning when using stdint.h 2014-11-25 06:33:58 -07:00
linkage.h Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
linux_string.h Make linux kernel string funcs available to tools 2012-12-13 11:46:07 -07:00
list.h list: Add list_last_entry() to find the last entry 2016-10-11 11:55:33 +08:00
list_sort.h lib, list_sort: add list_sort from linux 3.14 2014-08-25 17:02:33 -04:00
log2.h include: Add log2 header from the kernel 2015-11-05 10:51:53 -05:00
lzo.h
math64.h
mbus.h arm: mvebu: Add common mbus functions to use on Marvell SoCs 2014-10-23 09:59:20 -04:00
mc146818rtc.h
mdio.h
mii.h add support for Xilinx 1000BASE-X phy (GTX) 2013-06-24 19:11:13 -05:00
netdevice.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
poison.h
posix_types.h
psci.h armv8: Add psci.h from the Linux kernel 2016-01-19 22:25:37 +00:00
rbtree.h kbuild: force to define __UBOOT__ in all the C sources 2014-09-16 12:23:56 -04:00
rbtree_augmented.h lib, rbtree: resync with Linux-3.14 2014-08-25 17:02:33 -04:00
screen_info.h
serial_reg.h arm: debug: replace license blocks with SPDX 2014-10-26 22:22:09 +01:00
sizes.h sizes.h - consolidate for all architectures 2014-03-04 12:15:01 -05:00
stat.h xtensa: add support for the xtensa processor architecture [1/2] 2016-08-15 18:46:38 -04:00
stddef.h
string.h Remove unneeded remnants of bcopy(). 2016-06-06 13:39:18 -04:00
stringify.h
time.h
types.h types.h: move and redefine resource_size_t 2016-07-14 18:22:24 -04:00