lkml.org 
[lkml]   [2013]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v10] i2c-designware: make SDA hold time configurable
    Date
    On Wednesday 03 July 2013, Christian Ruppert wrote:
    > On Wed, Jul 03, 2013 at 04:20:03PM +0200, Arnd Bergmann wrote:
    > > On Wednesday 03 July 2013, Christian Ruppert wrote:
    > > > On Wed, Jul 03, 2013 at 01:43:11PM +0200, Arnd Bergmann wrote:
    > > > > On Wednesday 26 June 2013, Wolfram Sang wrote:
    > > > > > On Wed, Jun 26, 2013 at 10:55:06AM +0200, Christian Ruppert wrote:
    > > > > > > This patch makes the SDA hold time configurable through device tree.
    > > > > > >
    > > > > > > Signed-off-by: Christian Ruppert <christian.ruppert@abilis.com>
    > > > > > > Signed-off-by: Pierrick Hascoet <pierrick.hascoet@abilis.com>
    > > > > >
    > > > > > Applied to for-next, thanks for keeping at it and providing lots of
    > > > > > useful information. Much appreciated!
    > > > >
    > > > > Sorry, but I got a regression that I didn't find reported elsewhere
    > > > > so far, even though it breaks a lot of the ARM defconfig builds:
    > > > >
    > > > > drivers/built-in.o: In function `dw_i2c_probe':
    > > > > /git/arm-soc/drivers/i2c/busses/i2c-designware-platdrv.c:125: undefined reference to `__udivdi3'
    > > > >
    > > > > I suspect you want something like the change below.
    > > >
    > > > This looks similar to a patch Vincent Stehle submitted yesterday, see
    > > > https://lkml.org/lkml/2013/7/2/145
    > >
    > > Thanks for the link. Actually his patch looks wrong to me, because
    > >
    > > dev->sda_hold_time = div_u64((u64)ic_clk * ht + 500000, 1000000);
    > >
    > > assigns the division remainder to sda_hold_time, not the quotient.
    >
    > Hrmmm... At least when I tested it this morning on an ARC architecture
    > it worked as intended and returned the quotient. Does that mean we have
    > an issue with this function on ARC? Can anyone who knows these functions
    > better than I comment?

    ARC just uses the generic version of div_u64, which is defined in lib/div64.c.

    I suspect that the division remainder just happens to work well enough for
    you to not cause any run-time error. You could try adding a printk
    in that function to show the values you get on ARC.

    Arnd




    \
     
     \ /
      Last update: 2013-07-03 17:21    [W:4.446 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site