On 01/13/2015 03:23 PM, 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(). > > regmap_update_bits() skips writing to the register if it's read content is the > same as what is going to be written. This causes an issue for us when we > need to clear the DONE bit with the initial condition START:0, DONE:1 as > DONE bit must be written with 1 to clear it. > > So we defer the clearing of DONE bit to later when we set the START bit. > There we are sure that START bit is changed from 0 to 1 so the write of > 1 to already set DONE bit will happen. > > Signed-off-by: Roger Quadros <rogerq@xxxxxx> Applied to linux-can. Thanks, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Attachment:
signature.asc
Description: OpenPGP digital signature