Re: [PATCH] can: c_can: use regmap_update_bits() to modify RAMINIT register

2015-01-12 Thread Mark Brown
On Mon, Jan 12, 2015 at 02:37:21PM +0200, Roger Quadros wrote: > On 12/01/15 14:05, Mark Brown wrote: > > The usual thing to do here is an explicit write clearing the latch, > > either immediately after setting it or immediately before setting it. > > If the register is marked as volatile and the

Re: [PATCH] can: c_can: use regmap_update_bits() to modify RAMINIT register

2015-01-12 Thread Roger Quadros
On 12/01/15 14:05, Mark Brown wrote: > On Mon, Jan 12, 2015 at 12:02:21PM +0200, Roger Quadros wrote: >> +Mark with correct id. > > Please fix your mail client to word wrap within paragraphs, it amkes > your mail more legible. Fixed now. Thanks for pointing out. > >>> The problem here is we can

Re: [PATCH] can: c_can: use regmap_update_bits() to modify RAMINIT register

2015-01-12 Thread Mark Brown
On Mon, Jan 12, 2015 at 12:02:21PM +0200, Roger Quadros wrote: > +Mark with correct id. Please fix your mail client to word wrap within paragraphs, it amkes your mail more legible. > > The problem here is we can't use regmap_update_bits() because we need to > > write a 1 to the DONE bit to clear

Re: [PATCH] can: c_can: use regmap_update_bits() to modify RAMINIT register

2015-01-12 Thread Roger Quadros
+Mark with correct id. On 12/01/15 11:57, Roger Quadros wrote: > +Mark, > > On 09/01/15 15:50, Tomi Valkeinen wrote: >> On 07/01/15 16:32, Roger Quadros wrote: >>> use of regmap_read() and regmap_write() in c_can_hw_raminit_syscon() >>> is not safe as the RAMINIT register can be shared between di

Re: [PATCH] can: c_can: use regmap_update_bits() to modify RAMINIT register

2015-01-12 Thread Roger Quadros
+Mark, On 09/01/15 15:50, Tomi Valkeinen wrote: > On 07/01/15 16:32, Roger Quadros wrote: >> use of regmap_read() and regmap_write() in c_can_hw_raminit_syscon() >> is not safe as the RAMINIT register can be shared between different drivers >> at least for TI SoCs. >> >> To make the modification a

Re: [PATCH] can: c_can: use regmap_update_bits() to modify RAMINIT register

2015-01-09 Thread Tomi Valkeinen
On 07/01/15 16:32, Roger Quadros wrote: > use of regmap_read() and regmap_write() in c_can_hw_raminit_syscon() > is not safe as the RAMINIT register can be shared between different drivers > at least for TI SoCs. > > To make the modification atomic we switch to using regmap_update_bits(). > > Sig

[PATCH] can: c_can: use regmap_update_bits() to modify RAMINIT register

2015-01-07 Thread Roger Quadros
use of regmap_read() and regmap_write() in c_can_hw_raminit_syscon() is not safe as the RAMINIT register can be shared between different drivers at least for TI SoCs. To make the modification atomic we switch to using regmap_update_bits(). Signed-off-by: Roger Quadros --- drivers/net/can/c_can/