From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Cédric Le Goater" <clg@kaod.org>,
"Joel Stanley" <joel@jms.id.au>,
"Andrew Jeffery" <andrew@aj.id.au>
Cc: Ryan Chen <ryan_chen@aspeedtech.com>,
linux-aspeed@lists.ozlabs.org, Wolfram Sang <wsa@the-dreams.de>,
OpenBMC Maillist <openbmc@lists.ozlabs.org>,
Brendan Higgins <brendanhiggins@google.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when configuring bus frequency
Date: Wed, 16 Aug 2017 16:59:38 +1000 [thread overview]
Message-ID: <1502866778.4493.84.camel@kernel.crashing.org> (raw)
In-Reply-To: <247768a3-074f-70ad-6132-39d1443ce210@kaod.org>
On Wed, 2017-08-16 at 08:53 +0200, Cédric Le Goater wrote:
> > > divisor = DIV_ROUND_UP(bus->parent_clk_frequency, bus->bus_frequency);
> > > - clk_reg_val = bus->get_clk_reg_val(divisor);
> > > + clk_reg_val = readl(bus->base + ASPEED_I2C_AC_TIMING_REG1);
> > > + clk_reg_val &= (ASPEED_I2CD_TIME_TBUF_MASK |
> > > + ASPEED_I2CD_TIME_THDSTA_MASK |
> > > + ASPEED_I2CD_TIME_TACST_MASK);
> >
> > Instead of keeping the u-boot values (which appear to be hard-coded),
> > should we instead put the known working values in the register?
>
> Yes. I was wondering where the initial setting was from on the AST400.
Well, the AST2500 hard codes them in HW, so it makes some amount of
sense to use whatever aspeed platform.S hard codes in u-boot for the
2400. The values look reasonably sane.
If we ever see a need to change them, we can add DT props etc... but
for now I'd just not bother.
The way it is now, at least, if I have problems, I can tweak the values
with devmem and try again without the driver overwriting them :-)
Cheers,
Ben.
next prev parent reply other threads:[~2017-08-16 7:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-15 7:21 [PATCH] i2c: aspeed: Retain delay/setup/hold values when configuring bus frequency Andrew Jeffery
2017-08-16 6:30 ` Brendan Higgins
2017-08-16 6:49 ` Joel Stanley
2017-08-16 6:53 ` Cédric Le Goater
2017-08-16 6:59 ` Benjamin Herrenschmidt [this message]
2017-08-16 7:15 ` Cédric Le Goater
2017-08-24 0:19 ` Brendan Higgins
2017-08-28 16:07 ` Wolfram Sang
2017-08-29 6:56 ` Andrew Jeffery
2017-08-29 8:45 ` Wolfram Sang
2017-08-29 8:46 ` Andrew Jeffery
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=1502866778.4493.84.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=andrew@aj.id.au \
--cc=brendanhiggins@google.com \
--cc=clg@kaod.org \
--cc=joel@jms.id.au \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=ryan_chen@aspeedtech.com \
--cc=wsa@the-dreams.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