public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mxs: i2c: Implement algorithm to set up arbitrary i2c speed
Date: Fri, 30 Nov 2012 16:21:46 +0100	[thread overview]
Message-ID: <201211301621.46701.marex@denx.de> (raw)
In-Reply-To: <20121130150754.3313D201015@gemini.denx.de>

Dear Wolfgang Denk,

> Dear Marek Vasut,
> 
> In message <1354280910-17539-1-git-send-email-marex@denx.de> you wrote:
> > This algorithm computes the values of TIMING{0,1,2} registers for the
> > MX28 I2C block. This algorithm was derived by using a scope, but the
> > result seems correct.
> 
> Thanks!  I like that!
> 
> ...
> 
> > +	uint32_t base = ((24000000 / speed) - 38) / 2;
> 
> ...
> 
> > +	return 24000000 / ((((timing0 >> 16) - 3) * 2) + 38);
> 
> But we should get rid of this magic constant.  On other i.MX systems
> that would probably be MXC_HCLK ?

It's APBX clock ... you are so right ... I rolled the patch out too fast.
[...]

Best regards,
Marek Vasut

  reply	other threads:[~2012-11-30 15:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30 13:08 [U-Boot] [PATCH] mxs: i2c: Implement algorithm to set up arbitrary i2c speed Marek Vasut
2012-11-30 15:07 ` Wolfgang Denk
2012-11-30 15:21   ` Marek Vasut [this message]
2012-11-30 15:28 ` [U-Boot] [PATCH v2] " Marek Vasut
2012-12-01  1:35   ` Heiko Schocher
2012-12-01  4:10     ` Marek Vasut
2012-12-01  4:17   ` [U-Boot] [PATCH 1/2] mxs: i2c: Restore speed setting after block reset Marek Vasut
2012-12-01  4:17     ` [U-Boot] [PATCH 2/2 V3] mxs: i2c: Implement algorithm to set up arbitrary i2c speed Marek Vasut

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=201211301621.46701.marex@denx.de \
    --to=marex@denx.de \
    --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