RE: [PATCH] i2c-designware: Mask interrupts during i2c controller enable

2014-04-10 Thread Du, Wenkai
> -Original Message- > From: Westerberg, Mika > Sent: Thursday, April 10, 2014 2:08 AM > To: Du, Wenkai > Cc: One Thousand Gnomes; linux-...@vger.kernel.org; Wolfram Sang; linux- > ker...@vger.kernel.org > Subject: Re: [PATCH] i2c-designware: Mask interrupts during i2c

Re: [PATCH] i2c-designware: Mask interrupts during i2c controller enable

2014-04-10 Thread Westerberg, Mika
r...@vger.kernel.org > > Subject: Re: [PATCH] i2c-designware: Mask interrupts during i2c controller > > enable > > > Yes, but only after resume. In normal cases the driver re-programs > > DW_IC_INTR_TX_EMPTY to > > the mask (the other 3 flags are already set but t

RE: [PATCH] i2c-designware: Mask interrupts during i2c controller enable

2014-04-09 Thread Du, Wenkai
> -Original Message- > From: Westerberg, Mika > Sent: Tuesday, April 08, 2014 3:30 AM > To: Du, Wenkai > Cc: One Thousand Gnomes; linux-...@vger.kernel.org; Wolfram Sang; linux- > ker...@vger.kernel.org > Subject: Re: [PATCH] i2c-designware: Mask interrupts during i2c

Re: [PATCH] i2c-designware: Mask interrupts during i2c controller enable

2014-04-08 Thread Westerberg, Mika
rnel@vger.kernel.org > > Subject: Re: [PATCH] i2c-designware: Mask interrupts during i2c controller > > enable > > > > > > Do you think we can fix it with adding a dummy read right after write to > > the mask register, like > > the snippet below? >

RE: [PATCH] i2c-designware: Mask interrupts during i2c controller enable

2014-04-07 Thread Du, Wenkai
> -Original Message- > From: Westerberg, Mika > Sent: Monday, April 07, 2014 8:11 AM > To: One Thousand Gnomes > Cc: Du, Wenkai; linux-...@vger.kernel.org; Wolfram Sang; > linux-kernel@vger.kernel.org > Subject: Re: [PATCH] i2c-designware: Mask interrupts during i2c

Re: [PATCH] i2c-designware: Mask interrupts during i2c controller enable

2014-04-07 Thread Westerberg, Mika
On Mon, Apr 07, 2014 at 03:42:52PM +0100, One Thousand Gnomes wrote: > > I had to check BYT specs about that and I couldn't find if it does > > posted-writes. > > Then I would assume it does unless you can find a hardware engineer to > sign a statement in blood to that effect 8) Fair enough. >

Re: [PATCH] i2c-designware: Mask interrupts during i2c controller enable

2014-04-07 Thread One Thousand Gnomes
> I had to check BYT specs about that and I couldn't find if it does > posted-writes. Then I would assume it does unless you can find a hardware engineer to sign a statement in blood to that effect 8) > Actually the following patch should fix the problem as well. Just move the > HW enable to hap

Re: [PATCH] i2c-designware: Mask interrupts during i2c controller enable

2014-04-07 Thread Westerberg, Mika
On Sun, Apr 06, 2014 at 06:58:18PM +0100, One Thousand Gnomes wrote: > On Sat, 5 Apr 2014 09:13:16 +0300 > "Westerberg, Mika" wrote: > > > On Sat, Apr 05, 2014 at 12:54:33AM +0300, Du, Wenkai wrote: > > > >Interrupt masking is done already after each transaction. > > > > > > At end of transfer,

Re: [PATCH] i2c-designware: Mask interrupts during i2c controller enable

2014-04-06 Thread One Thousand Gnomes
On Sat, 5 Apr 2014 09:13:16 +0300 "Westerberg, Mika" wrote: > On Sat, Apr 05, 2014 at 12:54:33AM +0300, Du, Wenkai wrote: > > >Interrupt masking is done already after each transaction. > > > > At end of transfer, the code uses __i2c_dw_enable(dev, false) to disable > > adapter. This function doe

Re: [PATCH] i2c-designware: Mask interrupts during i2c controller enable

2014-04-04 Thread Westerberg, Mika
On Sat, Apr 05, 2014 at 12:54:33AM +0300, Du, Wenkai wrote: > >Interrupt masking is done already after each transaction. > > At end of transfer, the code uses __i2c_dw_enable(dev, false) to disable > adapter. This function doesn't mask interrupts. There is another function > i2c_dw_disable that ma

RE: [PATCH] i2c-designware: Mask interrupts during i2c controller enable

2014-04-04 Thread Du, Wenkai
>Interrupt masking is done already after each transaction. At end of transfer, the code uses __i2c_dw_enable(dev, false) to disable adapter. This function doesn't mask interrupts. There is another function i2c_dw_disable that masks and clears interrupts. This could be used, but that means we ne

Re: [PATCH] i2c-designware: Mask interrupts during i2c controller enable

2014-04-04 Thread Westerberg, Mika
On Fri, Apr 04, 2014 at 09:20:39PM +0300, Du, Wenkai wrote: > In current driver implementation, I2c controller is enabled, then > disabled every time inside i2c_dw_xfer. So I think the interrupt masking > should be done inside i2c_dw_xfer_init, where the controller is enabled. Interrupt masking is

RE: [PATCH] i2c-designware: Mask interrupts during i2c controller enable

2014-04-04 Thread Du, Wenkai
, Mika Sent: Friday, April 04, 2014 11:16 AM To: Du, Wenkai Cc: linux-...@vger.kernel.org; Wolfram Sang; linux-kernel@vger.kernel.org Subject: Re: [PATCH] i2c-designware: Mask interrupts during i2c controller enable On Fri, Apr 04, 2014 at 08:05:23PM +0300, Du, Wenkai wrote: > diff --git a/drivers

Re: [PATCH] i2c-designware: Mask interrupts during i2c controller enable

2014-04-04 Thread Westerberg, Mika
On Fri, Apr 04, 2014 at 08:05:23PM +0300, Du, Wenkai wrote: > diff --git a/drivers/i2c/busses/i2c-designware-core.c > b/drivers/i2c/busses/i2c-designware-core.c > index 14c4b30..71a3fa9 100644 > --- a/drivers/i2c/busses/i2c-designware-core.c > +++ b/drivers/i2c/busses/i2c-designware-core.c > @@ -4