[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190509075528.obzchc3midbjpvzs@katana>
Date: Thu, 9 May 2019 09:55:28 +0200
From: Wolfram Sang <wsa@...-dreams.de>
To: Sascha Hauer <s.hauer@...gutronix.de>
Cc: Sumit Batra <sumit.batra@....com>,
Chuanhua Han <chuanhua.han@....com>,
"shawnguo@...nel.org" <shawnguo@...nel.org>,
Leo Li <leoyang.li@....com>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"mark.rutland@....com" <mark.rutland@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"festevam@...il.com" <festevam@...il.com>,
dl-linux-imx <linux-imx@....com>,
"wsa+renesas@...g-engineering.com" <wsa+renesas@...g-engineering.com>,
"u.kleine-koenig@...gutronix.de" <u.kleine-koenig@...gutronix.de>,
"eha@...f.com" <eha@...f.com>,
"linux@...pel-privat.de" <linux@...pel-privat.de>,
"l.stach@...gutronix.de" <l.stach@...gutronix.de>,
"peda@...ntia.se" <peda@...ntia.se>
Subject: Re: [EXT] Re: [PATCH 1/2] i2c: imx: I2C Driver doesn't consider
I2C_IPGCLK_SEL RCW bit when using ls1046a SoC
> > There are 2 places where clock division takes place -
> >
> > 1) There is a clock divider outside of I2C block, which makes the clock reaching
> > I2C module as - Platform Clock/2
> > 2) There is another clock divider which specifically divides the clock to the I2C block,
> > based on RCW bit 424 (if 424th bit is 0 then the baud clock source is Platform Clock/4,
> > if 424th bit is 1 then it remains Platform Clock/2)
>
> So there is a clock divider which based on RCW bit 424 divides the clock
> *to* the i2c module. This suggests the divider is outside of the i2c
> module itself and thus part of the clock module.
>
> We could argue that this divider sits between the clock module and the
> i2c module, but for sure it's not in the i2c module. I really suggest to
> put this SoC specific into the SoC specific clock driver rather than
> littering the i2c driver with it.
I am with Sascha here. The fact that you need to of_ioremap some
registers is a really strong indication that the code should go
somewhere else. I can't tell the best place (clock driver or seperate
GUTS driver or syscon driver), but the I2C bus driver seems not
suitable.
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists