]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: bcm2835: clear reserved bits in S-Register
authorSilvan Wicki <linux_wi@tinag.ch>
Tue, 16 Jun 2015 15:40:59 +0000 (17:40 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Wed, 17 Jun 2015 12:35:09 +0000 (14:35 +0200)
commit599d3d6ee29e04457117158df67963483943eef1
tree1e65bfeed5e977e1b6d28c8fe23426256ceccc1d
parent6bae9c27de43273d79319f07f5e6988d06cca807
i2c: bcm2835: clear reserved bits in S-Register

The datasheet mentions on page 31 that the bits 10-31 must be read as
don't care and written as 0.
https://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf

We cannot guarantee that we read bits 10-31 as always 0 (because the
datasheet says read as don't care). We clear the bits with a bitmask to
prevent writing back unknown data at the reserved bits.

Signed-off-by: Silvan Wicki <linux_wi@tinag.ch>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-bcm2835.c