07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

11 Apr, 2018

2 commits


06 Feb, 2018

3 commits


15 May, 2017

1 commit


18 Feb, 2017

1 commit

  • With gcc-6.x we see:
    drivers/i2c/fsl_i2c.c:86:3: warning: ‘fsl_i2c_speed_map’ defined but not
    used [-Wunused-const-variable=]

    The easy way to fix this is that since we only use fsl_i2c_speed_map at
    all on __M68K__ move the existing guards around slightly.

    Reported-by: Thomas Schaefer
    Signed-off-by: Tom Rini
    Acked-by: Heiko Schocher

    Tom Rini
     

08 Feb, 2017

1 commit

  • At present devices use a simple integer offset to record the device tree
    node associated with the device. In preparation for supporting a live
    device tree, which uses a node pointer instead, refactor existing code to
    access this field through an inline function.

    Signed-off-by: Simon Glass

    Simon Glass
     

12 Aug, 2016

1 commit

  • Some code may want to read reg values from DT, but from nodes that aren't
    associated with DM devices, so using dev_get_addr_index() isn't
    appropriate. In this case, fdtdec_get_addr_size_*() are the functions to
    use. However, "translation" (via the chain of ranges properties in parent
    nodes) may still be desirable. Add a function parameter to request that,
    and implement it. Update all call sites to default to the original
    behaviour.

    Signed-off-by: Stephen Warren
    Reviewed-by: Simon Glass
    Squashed in build fix from Stephen:
    Signed-off-by: Simon Glass

    Stephen Warren
     

27 Jul, 2016

1 commit

  • Due to a oversight in testing, the initialization of the recently
    introduced Freescale I2C DM driver works only for 36 bit mode of e.g.
    the MPC85XX SoCs (specifically, if the physical addresses are 64 bit
    wide and the DT addresses 32 bit wide).

    This patch corrects the initialization so that it will work in a more
    general setting.

    Signed-off-by: Mario Six
    Reviewed-by: York Sun

    mario.six@gdsys.cc
     

17 May, 2016

9 commits


19 Jan, 2016

1 commit

  • In a number of places we had wordings of the GPL (or LGPL in a few
    cases) license text that were split in such a way that it wasn't caught
    previously. Convert all of these to the correct SPDX-License-Identifier
    tag.

    Signed-off-by: Tom Rini

    Tom Rini
     

23 Nov, 2014

1 commit

  • U-Boot has never cared about the type when we get max/min of two
    values, but Linux Kernel does. This commit gets min, max, min3, max3
    macros synced with the kernel introducing type checks.

    Many of references of those macros must be fixed to suppress warnings.
    We have two options:
    - Use min, max, min3, max3 only when the arguments have the same type
    (or add casts to the arguments)
    - Use min_t/max_t instead with the appropriate type for the first
    argument

    Signed-off-by: Masahiro Yamada
    Acked-by: Pavel Machek
    Acked-by: Lukasz Majewski
    Tested-by: Lukasz Majewski
    [trini: Fixup arch/blackfin/lib/string.c]
    Signed-off-by: Tom Rini

    Masahiro Yamada
     

10 Nov, 2014

1 commit

  • Some slow I2C devices like Power Monitor(ZM7304) at times
    do not work well with low timeout value, so I2C bus get stuck
    during read cycle with this device, changing it to 100ms from
    10ms works fine

    A lot of other i2c drivers like mxc and i2c drivers of BOOTROM
    also use relax timeouts to give sufficient ticks to work well
    with slower devices

    Signed-off-by: Shaveta Leekha
    Signed-off-by: Poonam Aggrwal

    Shaveta Leekha
     

16 Jul, 2014

1 commit


29 Apr, 2014

1 commit

  • Most of the I2C slaves support accesses in the typical style
    that is : read/write series of bytes at particular address offset.
    These transactions look like:"
    (1) START:Address:Tx:Offset:RESTART:Address[0..4]:Tx/Rx:data[0..n]:STOP"

    However there are certain devices which support accesses in
    terms of the transactions as follows:
    (2) "START:Address:Tx:Txdata[0..n1]:Clock_stretching:
    RESTART:Address:Rx:data[0..n2]"
    Here Txdata is typically a command and some associated data,
    similarly Rxdata could be command status plus some data received
    as a response to the command sent.

    Type (1) transactions are currently supportd in the
    i2c driver using i2c_read and i2c_write APIs. I2C EEPROMs,
    RTC, etc fall in this category.

    To handle type (2) along with type (1) transactions,
    i2c_read() function has been modified.

    Signed-off-by: Shaveta Leekha
    Signed-off-by: Poonam Aggrwal

    Shaveta Leekha
     

20 Aug, 2013

2 commits

  • This workaround is for the erratum I2C A004447. Device reference
    manual provides a scheme that allows the I2C master controller
    to generate nine SCL pulses, which enable an I2C slave device
    that held SDA low to release SDA. However, due to this erratum,
    this scheme no longer works. In addition, when I2C is used as
    a source of the PBL, the state machine is not able to recover.

    At the same time, delete the reduplicative definition of SVR_VER
    and SVR_REV. The SVR_REV is the low 8 bits rather than the low 16
    bits of svr. And we use the CONFIG_SYS_FSL_A004447_SVR_REV macro
    instead of hard-code value 0x10, 0x11 and 0x20.

    The CONFIG_SYS_FSL_A004447_SVR_REV = 0x00 represents that one
    version of platform has this I2C errata. So enable this errata
    by IS_SVR_REV(svr, maj, min) function.

    Signed-off-by: Zhao Chenhui
    Signed-off-by: Chunhe Lan
    Cc: Scott Wood
    Cc: Heiko Schocher

    Chunhe Lan
     
  • When the code detected that the bus is hung (e.g. SDA stuck low),
    send 9 pulses on SCL to try to fixup the bus.

    Signed-off-by: Zhao Chenhui
    Signed-off-by: Chunhe Lan
    Cc: Scott Wood
    Cc: Heiko Schocher

    Chunhe Lan
     

23 Jul, 2013

1 commit


17 Jul, 2013

1 commit


04 Feb, 2013

1 commit


26 Oct, 2012

1 commit


09 Nov, 2011

1 commit


04 Nov, 2011

1 commit


19 Apr, 2010

1 commit


28 Sep, 2009

4 commits


06 Sep, 2009

1 commit

  • The value of I2C_TIMEOUT in fsl_i2c.c has several problems. First, it is
    defined as CONFIG_HZ/4, but it is used as a count of microseconds, so it makes
    no sense to derive it from a clock rate. Second, the current value (250) is
    too low for some boards, so it needs to be increased. Third, the timeout
    necessary for multiple-master arbitration is larger than the timeout for basic
    read/write operations, so we shouldn't have a single constant for both timeouts.
    Finally, it would be nice if we could override these values on a per-board
    basis.

    Signed-off-by: Timur Tabi
    Acked-by: Wolfgang Denk
    Tested-by: Peter Tyser
    Acked-by: Peter Tyser

    Timur Tabi
     

21 Jul, 2009

1 commit

  • This patch adds the possibility to call a board specific
    i2c bus reset routine for the fsl_i2c bus driver, and adds
    this option for the keymile kmeter1 board.

    The deblock sequence for this board is implemented and
    tested in the following way:

    CR = 0x20 (release SDA and SCL pin)
    CR = 0xa0 (start read)
    dummy read
    dummy read
    if 2. dummy read == 0x00
    3. dummy read

    CR = 0x80 (SDA and SCL now 1 SR = 0x86)
    CR = 0x00 (Modul reset SR=0x81)
    CR = 0x80 (SDA and SCL = 1, SR = 0x81)

    Signed-off-by: Heiko Schocher

    Heiko Schocher