From: Marek Behun <marek.behun@nic.cz>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH u-boot-marvell v2.1 15/15] i2c: mvtwsi: fix reading status register after interrupt
Date: Thu, 2 May 2019 11:36:10 +0200 [thread overview]
Message-ID: <20190502113610.2ddd9664@nic.cz> (raw)
In-Reply-To: <6a6a2995-60a2-10db-57e9-cf86386606a0@denx.de>
> This still looks a bit strange. Looking at the Linux driver, there
> is no delay after reading the control register. But its using
> interrupts and therefore an implicit delay is added before this
> interrupt service routine is called (instead of the busy loop here
> in the U-Boot driver).
Exactly my opinion as well.
> BTW: Whats the value of "tick" in twsi_wait() in your case?
requested I2C freq is 100000 Hz, actual 97656 Hz (nearest lower
possible). This calculates the tick to 10340 ns with calc_tick, and
u-boot sleeps for 11 ms (DIV_ROUND_UP).
When tick was 10 ms this bug did not occur, because of the different
timing when the control value was read it already was set for a while
by the controller, it seems.
Btw should I sent these first 14 patches with Reviewed-by tags?
Marek
next prev parent reply other threads:[~2019-05-02 9:36 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-30 1:48 [U-Boot] [PATCH u-boot-marvell v2 00/15] Fixes for Turris Omnia Marek Behún
2019-04-30 1:48 ` [U-Boot] [PATCH u-boot-marvell v2 01/15] arm: mvebu: turris_omnia: remove redundant code Marek Behún
2019-04-30 4:08 ` Heiko Schocher
2019-05-02 6:01 ` Stefan Roese
2019-04-30 1:48 ` [U-Boot] [PATCH u-boot-marvell v2 02/15] arm: mvebu: turris_omnia: add XHCI to defconfig Marek Behún
2019-05-02 6:02 ` Stefan Roese
2019-04-30 1:48 ` [U-Boot] [PATCH u-boot-marvell v2 03/15] arm: mvebu: turris_omnia: use AHCI and SATA driver model Marek Behún
2019-05-02 6:02 ` Stefan Roese
2019-04-30 1:48 ` [U-Boot] [PATCH u-boot-marvell v2 04/15] arm: mvebu: turris_omnia: remove legacy macros from board header Marek Behún
2019-05-02 6:02 ` Stefan Roese
2019-04-30 1:48 ` [U-Boot] [PATCH u-boot-marvell v2 05/15] arm: mvebu: turris_omnia: move I2C dependencies to Kconfig Marek Behún
2019-04-30 4:54 ` Heiko Schocher
2019-05-02 6:03 ` Stefan Roese
2019-04-30 1:48 ` [U-Boot] [PATCH u-boot-marvell v2 06/15] arm: mvebu: turris_omnia: add SCSI as boot target Marek Behún
2019-05-02 6:03 ` Stefan Roese
2019-04-30 1:48 ` [U-Boot] [PATCH u-boot-marvell v2 07/15] arm: mvebu: turris_omnia: refactor I2C accessing code Marek Behún
2019-05-02 6:04 ` Stefan Roese
2019-04-30 1:48 ` [U-Boot] [PATCH u-boot-marvell v2 08/15] arm: mvebu: turris_omnia: fix checkpatch warnings Marek Behún
2019-05-02 6:05 ` Stefan Roese
2019-04-30 1:48 ` [U-Boot] [PATCH u-boot-marvell v2 09/15] arm: mvebu: turris_omnia: move ATSHA204A from defconfig to Kconfig Marek Behún
2019-05-02 6:06 ` Stefan Roese
2019-04-30 1:48 ` [U-Boot] [PATCH u-boot-marvell v2 10/15] arm: mvebu: turris_omnia: refactor more code Marek Behún
2019-05-02 6:07 ` Stefan Roese
2019-04-30 1:48 ` [U-Boot] [PATCH u-boot-marvell v2 11/15] arm: mvebu: turris_omnia: print board info as Turris Mox Marek Behún
2019-05-02 6:07 ` Stefan Roese
2019-04-30 1:48 ` [U-Boot] [PATCH u-boot-marvell v2 12/15] arm: mvebu: turris_*: remove watchdog include Marek Behún
2019-05-02 6:07 ` Stefan Roese
2019-04-30 1:48 ` [U-Boot] [PATCH u-boot-marvell v2 13/15] arm: mvebu: turris_omnia: fix regdomain env var setting Marek Behún
2019-05-02 6:08 ` Stefan Roese
2019-04-30 1:48 ` [U-Boot] [PATCH u-boot-marvell v2 14/15] arm: mvebu: turris_omnia: add RESET button handling Marek Behún
2019-05-02 6:10 ` Stefan Roese
2019-05-02 9:39 ` Marek Behun
2019-05-02 9:43 ` Stefan Roese
2019-05-02 11:53 ` Marek Behún
2019-05-02 11:55 ` Stefan Roese
2019-04-30 1:48 ` [U-Boot] [PATCH u-boot-marvell v2 15/15] i2c: mvtwsi: fix reading status register after interrupt Marek Behún
2019-04-30 4:14 ` Heiko Schocher
2019-05-01 21:09 ` [U-Boot] [PATCH u-boot-marvell v2.1 " Marek Behún
2019-05-02 5:24 ` Heiko Schocher
2019-05-02 6:36 ` Stefan Roese
2019-05-02 9:36 ` Marek Behun [this message]
2019-05-02 9:40 ` Stefan Roese
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190502113610.2ddd9664@nic.cz \
--to=marek.behun@nic.cz \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox