All of lore.kernel.org
 help / color / mirror / Atom feed
* [wsa:i2c/platform_data 24/27] drivers/i2c/busses/i2c-bfin-twi.c:38:46: error: passing argument 1 of 'read_MASTER_STAT' from incompatible pointer type
@ 2017-05-18  2:50 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2017-05-18  2:50 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: kbuild-all, linux-i2c

[-- Attachment #1: Type: text/plain, Size: 65136 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/platform_data
head:   1c80c28c2b11b07c767d4d2694fbee14e498758d
commit: f49a5f5f913d556f74f9d5f787c195c4c9ac1ce6 [24/27] i2c: bfin_twi: merge the two header files
config: blackfin-BF526-EZBRD_defconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 6.2.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout f49a5f5f913d556f74f9d5f787c195c4c9ac1ce6
        # save the attached .config to linux build tree
        make.cross ARCH=blackfin 

All errors (new ones prefixed by >>):

   arch/blackfin/include/asm/bfin_twi.h:36:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(RCV_DATA16, rcv_data16)
    ^~~~~~~~~~~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h: At top level:
   arch/blackfin/include/asm/bfin_twi.h:63:40: warning: 'struct bfin_twi_iface' declared inside parameter list will not be visible outside of this definition or declaration
    static inline u16 read_FIFO_CTL(struct bfin_twi_iface *iface)
                                           ^~~~~~~~~~~~~~
   In file included from arch/blackfin/mach-bf527/include/mach/blackfin.h:13:0,
                    from arch/blackfin/include/asm/irqflags.h:11,
                    from include/linux/irqflags.h:15,
                    from arch/blackfin/include/asm/bitops.h:33,
                    from include/linux/bitops.h:36,
                    from include/linux/kernel.h:10,
                    from include/linux/list.h:8,
                    from include/linux/module.h:9,
                    from drivers/i2c/busses/i2c-bfin-twi.c:11:
   arch/blackfin/include/asm/bfin_twi.h: In function 'read_FIFO_CTL':
   arch/blackfin/include/asm/bfin_twi.h:65:27: error: dereferencing pointer to incomplete type 'struct bfin_twi_iface'
     return bfin_read16(&iface->regs_base->fifo_ctl);
                              ^
   arch/blackfin/include/asm/def_LPBlackfin.h:34:10: note: in definition of macro '_bfin_readX'
      : "a" (addr) \
             ^~~~
   arch/blackfin/include/asm/bfin_twi.h:65:9: note: in expansion of macro 'bfin_read16'
     return bfin_read16(&iface->regs_base->fifo_ctl);
            ^~~~~~~~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h: At top level:
   arch/blackfin/include/asm/bfin_twi.h:68:42: warning: 'struct bfin_twi_iface' declared inside parameter list will not be visible outside of this definition or declaration
    static inline void write_FIFO_CTL(struct bfin_twi_iface *iface, u16 v)
                                             ^~~~~~~~~~~~~~
   In file included from arch/blackfin/mach-bf527/include/mach/blackfin.h:13:0,
                    from arch/blackfin/include/asm/irqflags.h:11,
                    from include/linux/irqflags.h:15,
                    from arch/blackfin/include/asm/bitops.h:33,
                    from include/linux/bitops.h:36,
                    from include/linux/kernel.h:10,
                    from include/linux/list.h:8,
                    from include/linux/module.h:9,
                    from drivers/i2c/busses/i2c-bfin-twi.c:11:
   arch/blackfin/include/asm/bfin_twi.h: In function 'write_FIFO_CTL':
   arch/blackfin/include/asm/bfin_twi.h:70:21: error: dereferencing pointer to incomplete type 'struct bfin_twi_iface'
     bfin_write16(&iface->regs_base->fifo_ctl, v);
                        ^
   arch/blackfin/include/asm/def_LPBlackfin.h:42:10: note: in definition of macro '_bfin_writeX'
      : "a" (addr), "d" ((u##size)(val)) \
             ^~~~
   arch/blackfin/include/asm/bfin_twi.h:70:2: note: in expansion of macro 'bfin_write16'
     bfin_write16(&iface->regs_base->fifo_ctl, v);
     ^~~~~~~~~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h: At top level:
   arch/blackfin/include/asm/bfin_twi.h:74:39: warning: 'struct bfin_twi_iface' declared inside parameter list will not be visible outside of this definition or declaration
    static inline u16 read_CONTROL(struct bfin_twi_iface *iface)
                                          ^~~~~~~~~~~~~~
   In file included from arch/blackfin/mach-bf527/include/mach/blackfin.h:13:0,
                    from arch/blackfin/include/asm/irqflags.h:11,
                    from include/linux/irqflags.h:15,
                    from arch/blackfin/include/asm/bitops.h:33,
                    from include/linux/bitops.h:36,
                    from include/linux/kernel.h:10,
                    from include/linux/list.h:8,
                    from include/linux/module.h:9,
                    from drivers/i2c/busses/i2c-bfin-twi.c:11:
   arch/blackfin/include/asm/bfin_twi.h: In function 'read_CONTROL':
   arch/blackfin/include/asm/bfin_twi.h:76:27: error: dereferencing pointer to incomplete type 'struct bfin_twi_iface'
     return bfin_read16(&iface->regs_base->control);
                              ^
   arch/blackfin/include/asm/def_LPBlackfin.h:34:10: note: in definition of macro '_bfin_readX'
      : "a" (addr) \
             ^~~~
   arch/blackfin/include/asm/bfin_twi.h:76:9: note: in expansion of macro 'bfin_read16'
     return bfin_read16(&iface->regs_base->control);
            ^~~~~~~~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h: At top level:
   arch/blackfin/include/asm/bfin_twi.h:79:41: warning: 'struct bfin_twi_iface' declared inside parameter list will not be visible outside of this definition or declaration
    static inline void write_CONTROL(struct bfin_twi_iface *iface, u16 v)
                                            ^~~~~~~~~~~~~~
   In file included from arch/blackfin/mach-bf527/include/mach/blackfin.h:13:0,
                    from arch/blackfin/include/asm/irqflags.h:11,
                    from include/linux/irqflags.h:15,
                    from arch/blackfin/include/asm/bitops.h:33,
                    from include/linux/bitops.h:36,
                    from include/linux/kernel.h:10,
                    from include/linux/list.h:8,
                    from include/linux/module.h:9,
                    from drivers/i2c/busses/i2c-bfin-twi.c:11:
   arch/blackfin/include/asm/bfin_twi.h: In function 'write_CONTROL':
   arch/blackfin/include/asm/bfin_twi.h:82:21: error: dereferencing pointer to incomplete type 'struct bfin_twi_iface'
     bfin_write16(&iface->regs_base->control, v);
                        ^
   arch/blackfin/include/asm/def_LPBlackfin.h:42:10: note: in definition of macro '_bfin_writeX'
      : "a" (addr), "d" ((u##size)(val)) \
             ^~~~
   arch/blackfin/include/asm/bfin_twi.h:82:2: note: in expansion of macro 'bfin_write16'
     bfin_write16(&iface->regs_base->control, v);
     ^~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c: In function 'bfin_twi_handle_interrupt':
>> drivers/i2c/busses/i2c-bfin-twi.c:38:46: error: passing argument 1 of 'read_MASTER_STAT' from incompatible pointer type [-Werror=incompatible-pointer-types]
     unsigned short mast_stat = read_MASTER_STAT(iface);
                                                 ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:27:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_STAT, master_stat)
    ^~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-bfin-twi.c:47:22: error: passing argument 1 of 'read_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
         read_MASTER_CTL(iface) | MDIR);
                         ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-bfin-twi.c:46:22: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
        write_MASTER_CTL(iface,
                         ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:50:22: error: passing argument 1 of 'read_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
         read_MASTER_CTL(iface) | STOP);
                         ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:49:22: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
        write_MASTER_CTL(iface,
                         ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:56:23: error: passing argument 1 of 'read_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
          read_MASTER_CTL(iface) |
                          ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:55:23: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
         write_MASTER_CTL(iface,
                          ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:60:23: error: passing argument 1 of 'read_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
          read_MASTER_CTL(iface) &
                          ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:59:23: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
         write_MASTER_CTL(iface,
                          ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-bfin-twi.c:66:20: error: passing argument 1 of 'read_FIFO_STAT' from incompatible pointer type [-Werror=incompatible-pointer-types]
       (read_FIFO_STAT(iface) & XMTSTAT) != XMT_FULL) {
                       ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:31:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(FIFO_STAT, fifo_stat)
    ^~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-bfin-twi.c:67:20: error: passing argument 1 of 'write_XMT_DATA8' from incompatible pointer type [-Werror=incompatible-pointer-types]
       write_XMT_DATA8(iface, *(iface->transPtr++));
                       ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:32:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(XMT_DATA8, xmt_data8)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:73:20: error: passing argument 1 of 'read_FIFO_STAT' from incompatible pointer type [-Werror=incompatible-pointer-types]
       (read_FIFO_STAT(iface) & RCVSTAT)) {
                       ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:31:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(FIFO_STAT, fifo_stat)
    ^~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-bfin-twi.c:75:40: error: passing argument 1 of 'read_RCV_DATA8' from incompatible pointer type [-Werror=incompatible-pointer-types]
       *(iface->transPtr) = read_RCV_DATA8(iface);
                                           ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:35:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(RCV_DATA8, rcv_data8)
    ^~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-bfin-twi.c:96:21: error: passing argument 1 of 'read_RCV_DATA16' from incompatible pointer type [-Werror=incompatible-pointer-types]
        read_RCV_DATA16(iface);
                        ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:36:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(RCV_DATA16, rcv_data16)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:98:22: error: passing argument 1 of 'read_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
         read_MASTER_CTL(iface) | STOP);
                         ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:97:22: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
        write_MASTER_CTL(iface,
                         ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:103:23: error: passing argument 1 of 'read_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
          read_MASTER_CTL(iface) | MDIR);
                          ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:102:23: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
         write_MASTER_CTL(iface,
                          ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:106:23: error: passing argument 1 of 'read_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
          read_MASTER_CTL(iface) & ~MDIR);
                          ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:105:23: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
         write_MASTER_CTL(iface,
                          ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-bfin-twi.c:111:18: error: passing argument 1 of 'write_INT_MASK' from incompatible pointer type [-Werror=incompatible-pointer-types]
      write_INT_MASK(iface, 0);
                     ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:30:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(INT_MASK, int_mask)
    ^~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-bfin-twi.c:112:21: error: passing argument 1 of 'write_MASTER_STAT' from incompatible pointer type [-Werror=incompatible-pointer-types]
      write_MASTER_STAT(iface, 0x3e);
                        ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:27:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_STAT, master_stat)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:113:20: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
      write_MASTER_CTL(iface, 0);
                       ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:132:24: error: passing argument 1 of 'read_MASTER_STAT' from incompatible pointer type [-Werror=incompatible-pointer-types]
      if (read_MASTER_STAT(iface) & SDASEN) {
                           ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:27:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_STAT, master_stat)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:135:22: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
        write_MASTER_CTL(iface, SCLOVR);
                         ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:137:22: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
        write_MASTER_CTL(iface, 0);
                         ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:139:31: error: passing argument 1 of 'read_MASTER_STAT' from incompatible pointer type [-Werror=incompatible-pointer-types]
       } while ((read_MASTER_STAT(iface) & SDASEN) && cnt--);
                                  ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:27:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_STAT, master_stat)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:141:21: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
       write_MASTER_CTL(iface, SDAOVR | SCLOVR);
                        ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:143:21: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
       write_MASTER_CTL(iface, SDAOVR);
                        ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:145:21: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
       write_MASTER_CTL(iface, 0);
                        ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:161:21: error: passing argument 1 of 'read_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
       (read_MASTER_CTL(iface) & MEN) == 0 &&
                        ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:165:19: error: passing argument 1 of 'write_INT_MASK' from incompatible pointer type [-Werror=incompatible-pointer-types]
       write_INT_MASK(iface, 0);
                      ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:30:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(INT_MASK, int_mask)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:166:21: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
       write_MASTER_CTL(iface, 0);
                        ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:175:22: error: passing argument 1 of 'read_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
         read_MASTER_CTL(iface) | (0xff << 6));
                         ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:174:22: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
        write_MASTER_CTL(iface,
                         ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:181:23: error: passing argument 1 of 'read_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
         (read_MASTER_CTL(iface) &
                          ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:180:22: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
        write_MASTER_CTL(iface,
                         ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:187:21: error: passing argument 1 of 'read_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
        read_MASTER_CTL(iface) & ~RSTART);
                        ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:186:21: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
       write_MASTER_CTL(iface,
                        ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-bfin-twi.c:195:22: error: passing argument 1 of 'write_MASTER_ADDR' from incompatible pointer type [-Werror=incompatible-pointer-types]
       write_MASTER_ADDR(iface,
                         ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:28:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_ADDR, master_addr)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:203:22: error: passing argument 1 of 'write_XMT_DATA8' from incompatible pointer type [-Werror=incompatible-pointer-types]
         write_XMT_DATA8(iface,
                         ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:32:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(XMT_DATA8, xmt_data8)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:211:23: error: passing argument 1 of 'read_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
         (read_MASTER_CTL(iface) &
                          ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:210:22: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
        write_MASTER_CTL(iface,
                         ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:217:23: error: passing argument 1 of 'read_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
         (read_MASTER_CTL(iface) |
                          ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:216:22: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
        write_MASTER_CTL(iface,
                         ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:224:22: error: passing argument 1 of 'read_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
         read_MASTER_CTL(iface) & ~RSTART);
                         ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:223:22: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
        write_MASTER_CTL(iface,
                         ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:227:19: error: passing argument 1 of 'write_INT_MASK' from incompatible pointer type [-Werror=incompatible-pointer-types]
       write_INT_MASK(iface, 0);
                      ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:30:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(INT_MASK, int_mask)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:228:21: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
       write_MASTER_CTL(iface, 0);
                        ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c: In function 'bfin_twi_interrupt_entry':
>> drivers/i2c/busses/i2c-bfin-twi.c:243:34: error: passing argument 1 of 'read_INT_STAT' from incompatible pointer type [-Werror=incompatible-pointer-types]
      twi_int_status = read_INT_STAT(iface);
                                     ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:29:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(INT_STAT, int_stat)
    ^~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-bfin-twi.c:247:18: error: passing argument 1 of 'write_INT_STAT' from incompatible pointer type [-Werror=incompatible-pointer-types]
      write_INT_STAT(iface, twi_int_status);
                     ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:29:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(INT_STAT, int_stat)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c: In function 'bfin_twi_do_master_xfer':
>> drivers/i2c/busses/i2c-bfin-twi.c:264:21: error: passing argument 1 of 'read_CONTROL' from incompatible pointer type [-Werror=incompatible-pointer-types]
     if (!(read_CONTROL(iface) & TWI_ENA))
                        ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:74:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_CONTROL(struct bfin_twi_iface *iface)
                      ^~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:267:23: error: passing argument 1 of 'read_MASTER_STAT' from incompatible pointer type [-Werror=incompatible-pointer-types]
     if (read_MASTER_STAT(iface) & BUSBUSY)
                          ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:27:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_STAT, master_stat)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:288:20: error: passing argument 1 of 'write_MASTER_ADDR' from incompatible pointer type [-Werror=incompatible-pointer-types]
     write_MASTER_ADDR(iface, pmsg->addr);
                       ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:28:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_ADDR, master_addr)
    ^~~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-bfin-twi.c:293:17: error: passing argument 1 of 'write_FIFO_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
     write_FIFO_CTL(iface, 0x3);
                    ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:68:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_FIFO_CTL(struct bfin_twi_iface *iface, u16 v)
                       ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:294:17: error: passing argument 1 of 'write_FIFO_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
     write_FIFO_CTL(iface, 0);
                    ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:68:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_FIFO_CTL(struct bfin_twi_iface *iface, u16 v)
                       ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:302:20: error: passing argument 1 of 'write_XMT_DATA8' from incompatible pointer type [-Werror=incompatible-pointer-types]
       write_XMT_DATA8(iface, *(iface->transPtr++));
                       ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:32:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(XMT_DATA8, xmt_data8)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:308:17: error: passing argument 1 of 'write_INT_STAT' from incompatible pointer type [-Werror=incompatible-pointer-types]
     write_INT_STAT(iface, MERR | MCOMP | XMTSERV | RCVSERV);
                    ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:29:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(INT_STAT, int_stat)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:311:17: error: passing argument 1 of 'write_INT_MASK' from incompatible pointer type [-Werror=incompatible-pointer-types]
     write_INT_MASK(iface, MCOMP | MERR | RCVSERV | XMTSERV);
                    ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:30:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(INT_MASK, int_mask)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:314:20: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
      write_MASTER_CTL(iface, pmsg->len << 6);
                       ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:316:20: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
      write_MASTER_CTL(iface, 0xff << 6);
                       ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:321:42: error: passing argument 1 of 'read_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
     write_MASTER_CTL(iface, read_MASTER_CTL(iface) | MEN |
                                             ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:321:19: error: passing argument 1 of 'write_MASTER_CTL' from incompatible pointer type [-Werror=incompatible-pointer-types]
     write_MASTER_CTL(iface, read_MASTER_CTL(iface) | MEN |
                      ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:19:20: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \
                       ^
   arch/blackfin/include/asm/bfin_twi.h:26:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_CTL, master_ctl)
    ^~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c: In function 'bfin_twi_do_smbus_xfer':
   drivers/i2c/busses/i2c-bfin-twi.c:361:21: error: passing argument 1 of 'read_CONTROL' from incompatible pointer type [-Werror=incompatible-pointer-types]
     if (!(read_CONTROL(iface) & TWI_ENA))
                        ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:74:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_CONTROL(struct bfin_twi_iface *iface)
                      ^~~~~~~~~~~~
   drivers/i2c/busses/i2c-bfin-twi.c:364:23: error: passing argument 1 of 'read_MASTER_STAT' from incompatible pointer type [-Werror=incompatible-pointer-types]
     if (read_MASTER_STAT(iface) & BUSBUSY)
                          ^~~~~
   In file included from drivers/i2c/busses/i2c-bfin-twi.c:27:0:
   arch/blackfin/include/asm/bfin_twi.h:17:19: note: expected 'struct bfin_twi_iface *' but argument is of type 'struct bfin_twi_iface *'
    static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \
                      ^
   arch/blackfin/include/asm/bfin_twi.h:27:1: note: in expansion of macro 'DEFINE_TWI_REG'
    DEFINE_TWI_REG(MASTER_STAT, master_stat)
..

vim +/read_MASTER_STAT +38 drivers/i2c/busses/i2c-bfin-twi.c

d24ecfcc3 Bryan Wu          2007-05-01   21  #include <linux/interrupt.h>
d24ecfcc3 Bryan Wu          2007-05-01   22  #include <linux/platform_device.h>
540ac5553 Michael Hennerich 2011-01-11   23  #include <linux/delay.h>
d24ecfcc3 Bryan Wu          2007-05-01   24  
d24ecfcc3 Bryan Wu          2007-05-01   25  #include <asm/irq.h>
45126da22 Sonic Zhang       2014-01-28   26  #include <asm/portmux.h>
c9d87edbc Sonic Zhang       2012-06-13  @27  #include <asm/bfin_twi.h>
d24ecfcc3 Bryan Wu          2007-05-01   28  
d24ecfcc3 Bryan Wu          2007-05-01   29  /* SMBus mode*/
4dd39bb12 Sonic Zhang       2008-04-22   30  #define TWI_I2C_MODE_STANDARD		1
4dd39bb12 Sonic Zhang       2008-04-22   31  #define TWI_I2C_MODE_STANDARDSUB	2
4dd39bb12 Sonic Zhang       2008-04-22   32  #define TWI_I2C_MODE_COMBINED		3
4dd39bb12 Sonic Zhang       2008-04-22   33  #define TWI_I2C_MODE_REPEAT		4
d24ecfcc3 Bryan Wu          2007-05-01   34  
5481d0753 Sonic Zhang       2010-03-22   35  static void bfin_twi_handle_interrupt(struct bfin_twi_iface *iface,
5481d0753 Sonic Zhang       2010-03-22   36  					unsigned short twi_int_status)
d24ecfcc3 Bryan Wu          2007-05-01   37  {
aa3d02091 Bryan Wu          2008-04-22  @38  	unsigned short mast_stat = read_MASTER_STAT(iface);
d24ecfcc3 Bryan Wu          2007-05-01   39  
d24ecfcc3 Bryan Wu          2007-05-01   40  	if (twi_int_status & XMTSERV) {
8419c8deb Sonic Zhang       2013-05-28   41  		if (iface->writeNum <= 0) {
d24ecfcc3 Bryan Wu          2007-05-01   42  			/* start receive immediately after complete sending in
d24ecfcc3 Bryan Wu          2007-05-01   43  			 * combine mode.
d24ecfcc3 Bryan Wu          2007-05-01   44  			 */
8419c8deb Sonic Zhang       2013-05-28   45  			if (iface->cur_mode == TWI_I2C_MODE_COMBINED)
aa3d02091 Bryan Wu          2008-04-22  @46  				write_MASTER_CTL(iface,
28a377c79 Sonic Zhang       2012-06-13  @47  					read_MASTER_CTL(iface) | MDIR);
4dd39bb12 Sonic Zhang       2008-04-22   48  			else if (iface->manual_stop)
aa3d02091 Bryan Wu          2008-04-22   49  				write_MASTER_CTL(iface,
aa3d02091 Bryan Wu          2008-04-22   50  					read_MASTER_CTL(iface) | STOP);
4dd39bb12 Sonic Zhang       2008-04-22   51  			else if (iface->cur_mode == TWI_I2C_MODE_REPEAT &&
94327d009 Frank Shew        2009-05-19   52  				iface->cur_msg + 1 < iface->msg_num) {
8419c8deb Sonic Zhang       2013-05-28   53  				if (iface->pmsg[iface->cur_msg + 1].flags &
8419c8deb Sonic Zhang       2013-05-28   54  					I2C_M_RD)
94327d009 Frank Shew        2009-05-19   55  					write_MASTER_CTL(iface,
8419c8deb Sonic Zhang       2013-05-28   56  						read_MASTER_CTL(iface) |
8419c8deb Sonic Zhang       2013-05-28   57  						MDIR);
94327d009 Frank Shew        2009-05-19   58  				else
aa3d02091 Bryan Wu          2008-04-22   59  					write_MASTER_CTL(iface,
8419c8deb Sonic Zhang       2013-05-28   60  						read_MASTER_CTL(iface) &
8419c8deb Sonic Zhang       2013-05-28   61  						~MDIR);
8419c8deb Sonic Zhang       2013-05-28   62  			}
8419c8deb Sonic Zhang       2013-05-28   63  		}
8419c8deb Sonic Zhang       2013-05-28   64  		/* Transmit next data */
8419c8deb Sonic Zhang       2013-05-28   65  		while (iface->writeNum > 0 &&
8419c8deb Sonic Zhang       2013-05-28  @66  			(read_FIFO_STAT(iface) & XMTSTAT) != XMT_FULL) {
8419c8deb Sonic Zhang       2013-05-28  @67  			write_XMT_DATA8(iface, *(iface->transPtr++));
8419c8deb Sonic Zhang       2013-05-28   68  			iface->writeNum--;
94327d009 Frank Shew        2009-05-19   69  		}
d24ecfcc3 Bryan Wu          2007-05-01   70  	}
d24ecfcc3 Bryan Wu          2007-05-01   71  	if (twi_int_status & RCVSERV) {
8419c8deb Sonic Zhang       2013-05-28   72  		while (iface->readNum > 0 &&
8419c8deb Sonic Zhang       2013-05-28   73  			(read_FIFO_STAT(iface) & RCVSTAT)) {
d24ecfcc3 Bryan Wu          2007-05-01   74  			/* Receive next data */
aa3d02091 Bryan Wu          2008-04-22  @75  			*(iface->transPtr) = read_RCV_DATA8(iface);
d24ecfcc3 Bryan Wu          2007-05-01   76  			if (iface->cur_mode == TWI_I2C_MODE_COMBINED) {
d24ecfcc3 Bryan Wu          2007-05-01   77  				/* Change combine mode into sub mode after
d24ecfcc3 Bryan Wu          2007-05-01   78  				 * read first data.
d24ecfcc3 Bryan Wu          2007-05-01   79  				 */
d24ecfcc3 Bryan Wu          2007-05-01   80  				iface->cur_mode = TWI_I2C_MODE_STANDARDSUB;
d24ecfcc3 Bryan Wu          2007-05-01   81  				/* Get read number from first byte in block
d24ecfcc3 Bryan Wu          2007-05-01   82  				 * combine mode.
d24ecfcc3 Bryan Wu          2007-05-01   83  				 */
d24ecfcc3 Bryan Wu          2007-05-01   84  				if (iface->readNum == 1 && iface->manual_stop)
d24ecfcc3 Bryan Wu          2007-05-01   85  					iface->readNum = *iface->transPtr + 1;
d24ecfcc3 Bryan Wu          2007-05-01   86  			}
d24ecfcc3 Bryan Wu          2007-05-01   87  			iface->transPtr++;
d24ecfcc3 Bryan Wu          2007-05-01   88  			iface->readNum--;
a20a64d22 Sonic Zhang       2012-06-13   89  		}
a20a64d22 Sonic Zhang       2012-06-13   90  
a20a64d22 Sonic Zhang       2012-06-13   91  		if (iface->readNum == 0) {
a20a64d22 Sonic Zhang       2012-06-13   92  			if (iface->manual_stop) {
925594e03 Michael Hennerich 2012-06-13   93  				/* Temporary workaround to avoid possible bus stall -
925594e03 Michael Hennerich 2012-06-13   94  				 * Flush FIFO before issuing the STOP condition
925594e03 Michael Hennerich 2012-06-13   95  				 */
925594e03 Michael Hennerich 2012-06-13  @96  				read_RCV_DATA16(iface);
aa3d02091 Bryan Wu          2008-04-22   97  				write_MASTER_CTL(iface,
aa3d02091 Bryan Wu          2008-04-22   98  					read_MASTER_CTL(iface) | STOP);
4dd39bb12 Sonic Zhang       2008-04-22   99  			} else if (iface->cur_mode == TWI_I2C_MODE_REPEAT &&
4dd39bb12 Sonic Zhang       2008-04-22  100  					iface->cur_msg + 1 < iface->msg_num) {
94327d009 Frank Shew        2009-05-19  101  				if (iface->pmsg[iface->cur_msg + 1].flags & I2C_M_RD)
94327d009 Frank Shew        2009-05-19  102  					write_MASTER_CTL(iface,
28a377c79 Sonic Zhang       2012-06-13  103  						read_MASTER_CTL(iface) | MDIR);
94327d009 Frank Shew        2009-05-19  104  				else
aa3d02091 Bryan Wu          2008-04-22  105  					write_MASTER_CTL(iface,
28a377c79 Sonic Zhang       2012-06-13  106  						read_MASTER_CTL(iface) & ~MDIR);
d24ecfcc3 Bryan Wu          2007-05-01  107  			}
d24ecfcc3 Bryan Wu          2007-05-01  108  		}
a20a64d22 Sonic Zhang       2012-06-13  109  	}
d24ecfcc3 Bryan Wu          2007-05-01  110  	if (twi_int_status & MERR) {
aa3d02091 Bryan Wu          2008-04-22 @111  		write_INT_MASK(iface, 0);
aa3d02091 Bryan Wu          2008-04-22 @112  		write_MASTER_STAT(iface, 0x3e);
aa3d02091 Bryan Wu          2008-04-22  113  		write_MASTER_CTL(iface, 0);
4dd39bb12 Sonic Zhang       2008-04-22  114  		iface->result = -EIO;
5cfafc18f Michael Hennerich 2010-03-22  115  
5cfafc18f Michael Hennerich 2010-03-22  116  		if (mast_stat & LOSTARB)
5cfafc18f Michael Hennerich 2010-03-22  117  			dev_dbg(&iface->adap.dev, "Lost Arbitration\n");
5cfafc18f Michael Hennerich 2010-03-22  118  		if (mast_stat & ANAK)
5cfafc18f Michael Hennerich 2010-03-22  119  			dev_dbg(&iface->adap.dev, "Address Not Acknowledged\n");
5cfafc18f Michael Hennerich 2010-03-22  120  		if (mast_stat & DNAK)
5cfafc18f Michael Hennerich 2010-03-22  121  			dev_dbg(&iface->adap.dev, "Data Not Acknowledged\n");
5cfafc18f Michael Hennerich 2010-03-22  122  		if (mast_stat & BUFRDERR)
5cfafc18f Michael Hennerich 2010-03-22  123  			dev_dbg(&iface->adap.dev, "Buffer Read Error\n");
5cfafc18f Michael Hennerich 2010-03-22  124  		if (mast_stat & BUFWRERR)
5cfafc18f Michael Hennerich 2010-03-22  125  			dev_dbg(&iface->adap.dev, "Buffer Write Error\n");
5cfafc18f Michael Hennerich 2010-03-22  126  
540ac5553 Michael Hennerich 2011-01-11  127  		/* Faulty slave devices, may drive SDA low after a transfer
540ac5553 Michael Hennerich 2011-01-11  128  		 * finishes. To release the bus this code generates up to 9
540ac5553 Michael Hennerich 2011-01-11  129  		 * extra clocks until SDA is released.
540ac5553 Michael Hennerich 2011-01-11  130  		 */
540ac5553 Michael Hennerich 2011-01-11  131  
540ac5553 Michael Hennerich 2011-01-11  132  		if (read_MASTER_STAT(iface) & SDASEN) {
540ac5553 Michael Hennerich 2011-01-11  133  			int cnt = 9;
540ac5553 Michael Hennerich 2011-01-11  134  			do {
540ac5553 Michael Hennerich 2011-01-11  135  				write_MASTER_CTL(iface, SCLOVR);
540ac5553 Michael Hennerich 2011-01-11  136  				udelay(6);
540ac5553 Michael Hennerich 2011-01-11  137  				write_MASTER_CTL(iface, 0);
540ac5553 Michael Hennerich 2011-01-11  138  				udelay(6);
540ac5553 Michael Hennerich 2011-01-11  139  			} while ((read_MASTER_STAT(iface) & SDASEN) && cnt--);
540ac5553 Michael Hennerich 2011-01-11  140  
540ac5553 Michael Hennerich 2011-01-11  141  			write_MASTER_CTL(iface, SDAOVR | SCLOVR);
540ac5553 Michael Hennerich 2011-01-11  142  			udelay(6);
540ac5553 Michael Hennerich 2011-01-11  143  			write_MASTER_CTL(iface, SDAOVR);
540ac5553 Michael Hennerich 2011-01-11  144  			udelay(6);
540ac5553 Michael Hennerich 2011-01-11  145  			write_MASTER_CTL(iface, 0);
540ac5553 Michael Hennerich 2011-01-11  146  		}
540ac5553 Michael Hennerich 2011-01-11  147  
dd7319a52 Sonic Zhang       2010-03-22  148  		/* If it is a quick transfer, only address without data,
d24ecfcc3 Bryan Wu          2007-05-01  149  		 * not an err, return 1.
d24ecfcc3 Bryan Wu          2007-05-01  150  		 */
f0ac131a2 Sonic Zhang       2010-03-22  151  		if (iface->cur_mode == TWI_I2C_MODE_STANDARD &&
f0ac131a2 Sonic Zhang       2010-03-22  152  			iface->transPtr == NULL &&
f0ac131a2 Sonic Zhang       2010-03-22  153  			(twi_int_status & MCOMP) && (mast_stat & DNAK))
d24ecfcc3 Bryan Wu          2007-05-01  154  			iface->result = 1;
f0ac131a2 Sonic Zhang       2010-03-22  155  
d24ecfcc3 Bryan Wu          2007-05-01  156  		complete(&iface->complete);
d24ecfcc3 Bryan Wu          2007-05-01  157  		return;
d24ecfcc3 Bryan Wu          2007-05-01  158  	}
d24ecfcc3 Bryan Wu          2007-05-01  159  	if (twi_int_status & MCOMP) {
2ee74eb95 Sonic Zhang       2012-06-13  160  		if (twi_int_status & (XMTSERV | RCVSERV) &&
2ee74eb95 Sonic Zhang       2012-06-13  161  			(read_MASTER_CTL(iface) & MEN) == 0 &&
4a65163e3 Sonic Zhang       2011-06-23  162  			(iface->cur_mode == TWI_I2C_MODE_REPEAT ||
4a65163e3 Sonic Zhang       2011-06-23  163  			iface->cur_mode == TWI_I2C_MODE_COMBINED)) {
4a65163e3 Sonic Zhang       2011-06-23  164  			iface->result = -1;
4a65163e3 Sonic Zhang       2011-06-23  165  			write_INT_MASK(iface, 0);
4a65163e3 Sonic Zhang       2011-06-23  166  			write_MASTER_CTL(iface, 0);
4a65163e3 Sonic Zhang       2011-06-23  167  		} else if (iface->cur_mode == TWI_I2C_MODE_COMBINED) {
d24ecfcc3 Bryan Wu          2007-05-01  168  			if (iface->readNum == 0) {
d24ecfcc3 Bryan Wu          2007-05-01  169  				/* set the read number to 1 and ask for manual
d24ecfcc3 Bryan Wu          2007-05-01  170  				 * stop in block combine mode
d24ecfcc3 Bryan Wu          2007-05-01  171  				 */
d24ecfcc3 Bryan Wu          2007-05-01  172  				iface->readNum = 1;
d24ecfcc3 Bryan Wu          2007-05-01  173  				iface->manual_stop = 1;
aa3d02091 Bryan Wu          2008-04-22  174  				write_MASTER_CTL(iface,
aa3d02091 Bryan Wu          2008-04-22  175  					read_MASTER_CTL(iface) | (0xff << 6));
d24ecfcc3 Bryan Wu          2007-05-01  176  			} else {
d24ecfcc3 Bryan Wu          2007-05-01  177  				/* set the readd number in other
d24ecfcc3 Bryan Wu          2007-05-01  178  				 * combine mode.
d24ecfcc3 Bryan Wu          2007-05-01  179  				 */
aa3d02091 Bryan Wu          2008-04-22  180  				write_MASTER_CTL(iface,
aa3d02091 Bryan Wu          2008-04-22  181  					(read_MASTER_CTL(iface) &
d24ecfcc3 Bryan Wu          2007-05-01  182  					(~(0xff << 6))) |
d24ecfcc3 Bryan Wu          2007-05-01  183  					(iface->readNum << 6));
d24ecfcc3 Bryan Wu          2007-05-01  184  			}
d24ecfcc3 Bryan Wu          2007-05-01  185  			/* remove restart bit and enable master receive */
aa3d02091 Bryan Wu          2008-04-22  186  			write_MASTER_CTL(iface,
aa3d02091 Bryan Wu          2008-04-22  187  				read_MASTER_CTL(iface) & ~RSTART);
4dd39bb12 Sonic Zhang       2008-04-22  188  		} else if (iface->cur_mode == TWI_I2C_MODE_REPEAT &&
4dd39bb12 Sonic Zhang       2008-04-22  189  				iface->cur_msg + 1 < iface->msg_num) {
4dd39bb12 Sonic Zhang       2008-04-22  190  			iface->cur_msg++;
4dd39bb12 Sonic Zhang       2008-04-22  191  			iface->transPtr = iface->pmsg[iface->cur_msg].buf;
4dd39bb12 Sonic Zhang       2008-04-22  192  			iface->writeNum = iface->readNum =
4dd39bb12 Sonic Zhang       2008-04-22  193  				iface->pmsg[iface->cur_msg].len;
4dd39bb12 Sonic Zhang       2008-04-22  194  			/* Set Transmit device address */
aa3d02091 Bryan Wu          2008-04-22 @195  			write_MASTER_ADDR(iface,
4dd39bb12 Sonic Zhang       2008-04-22  196  				iface->pmsg[iface->cur_msg].addr);
4dd39bb12 Sonic Zhang       2008-04-22  197  			if (iface->pmsg[iface->cur_msg].flags & I2C_M_RD)
4dd39bb12 Sonic Zhang       2008-04-22  198  				iface->read_write = I2C_SMBUS_READ;

:::::: The code at line 38 was first introduced by commit
:::::: aa3d02091747727f7ff2e1f2455ad8363a9e6946 i2c-bfin-twi: Add platform_resource interface to support multi-port TWI controllers

:::::: TO: Bryan Wu <cooloney@kernel.org>
:::::: CC: Jean Delvare <khali@hyperion.delvare>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 14958 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-18  2:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-18  2:50 [wsa:i2c/platform_data 24/27] drivers/i2c/busses/i2c-bfin-twi.c:38:46: error: passing argument 1 of 'read_MASTER_STAT' from incompatible pointer type kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.