Vladimir Zapolskiy
10b4640833
spi: sh-msiof: Fix bit field overflow writes to TSCR/RSCR
...
The change fixes a bit field overflow which allows to write to higher
bits while calculating SPI transfer clock and setting BRPS and BRDV
bit fields, the problem is reproduced if 'parent_rate' to 'spi_hz'
ratio is greater than 1024, for instance
p->min_div = 2,
MSO rate = 33333333,
SPI device rate = 10000
results in
k = 5, i.e. BRDV = 0b100 or 1/32 prescaler output,
BRPS = 105,
TSCR value = 0x6804, thus MSSEL and MSIMM bit fields are non-zero.
Fixes: 65d5665bb260 ("spi: sh-msiof: Update calculation of frequency dividing")
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-16 15:52:44 +01:00
..
2018-03-26 15:57:05 +02:00
2018-03-26 15:57:05 +02:00
2017-08-16 11:53:31 +01:00
2018-01-26 17:57:24 +00:00
2017-07-17 12:09:38 +01:00
2018-03-28 10:42:48 +08:00
2015-09-16 20:54:54 +01:00
2017-10-31 11:15:10 +00:00
2018-01-03 11:39:16 +00:00
2017-11-02 11:10:55 +01:00
2017-09-04 15:51:14 +01:00
2017-08-08 11:36:35 +01:00
2016-02-15 20:43:39 +00:00
2018-02-14 16:04:58 +00:00
2018-03-14 09:37:28 -07:00
2016-09-24 20:03:25 +01:00
2017-11-02 11:10:55 +01:00
2015-10-05 14:55:56 +01:00
2016-09-14 18:03:32 +01:00
2015-12-02 19:38:16 +00:00
2017-08-08 10:43:41 +01:00
2016-07-24 21:54:29 +01:00
2016-08-24 12:37:43 +01:00
2016-07-24 21:54:29 +01:00
2017-11-02 11:10:55 +01:00
2016-07-07 11:44:43 +02:00
2015-10-12 17:02:08 +01:00
2017-12-12 10:51:52 +00:00
2016-04-26 11:56:09 +01:00
2018-02-12 12:04:16 +00:00
2017-04-18 19:16:49 +01:00
2016-05-11 18:26:19 +01:00
2018-02-12 12:04:16 +00:00
2018-02-12 12:04:16 +00:00
2017-08-09 17:53:14 +01:00
2017-09-01 11:33:22 +01:00
2015-12-22 17:12:56 -06:00
2018-01-03 12:19:24 +00:00
2016-12-01 18:50:59 +00:00
2015-08-28 18:15:18 +01:00
2016-11-14 11:21:48 +00:00
2017-01-09 19:34:02 +00:00
2017-04-26 15:58:04 +01:00
2018-02-14 16:02:41 +00:00
2016-07-27 19:00:16 +01:00
2018-04-13 12:18:15 +01:00
2016-09-24 20:03:25 +01:00
2018-03-18 17:57:42 -07:00
2017-04-26 15:58:04 +01:00
2015-12-07 20:09:09 +00:00
2017-07-26 13:08:56 +01:00
2016-02-26 11:06:38 +09:00
2017-11-28 20:21:31 +00:00
2016-09-12 20:11:39 +01:00
2016-07-03 14:23:25 +02:00
2017-01-17 18:28:19 +00:00
2015-09-17 12:33:31 +01:00
2017-06-20 13:39:14 +01:00
2017-09-27 10:02:57 -07:00
2015-09-16 19:16:01 +01:00
2017-08-18 12:15:41 +01:00
2015-09-17 12:34:20 +01:00
2015-09-17 12:33:58 +01:00
2018-02-15 15:19:58 +00:00
2016-08-08 11:56:40 +01:00
2017-07-26 13:04:21 +01:00
2017-08-23 17:12:05 +01:00
2017-01-17 18:34:25 +00:00
2018-02-12 12:04:24 +00:00
2017-01-23 18:09:37 +00:00
2018-04-02 15:56:39 +01:00
2018-02-12 12:04:24 +00:00
2017-08-10 15:50:23 +01:00
2015-05-01 17:35:54 +01:00
2017-08-16 11:58:23 +01:00
2018-03-20 09:02:12 +08:00
2015-09-17 12:13:40 +01:00
2018-01-08 15:38:06 +00:00
2017-02-22 10:50:09 -08:00
2018-04-16 15:52:44 +01:00
2017-08-09 17:18:06 +01:00
2018-01-03 11:38:46 +00:00
2017-05-26 13:12:19 +01:00
2017-05-26 13:12:04 +01:00
2018-03-21 09:55:19 +08:00
2017-05-26 12:41:07 +01:00
2017-09-13 09:42:27 -07:00
2017-12-07 11:59:15 +00:00
2017-12-07 17:45:17 +00:00
2017-07-19 17:06:31 +01:00
2018-03-06 14:20:37 +00:00
2017-10-09 10:16:38 +01:00
2017-03-17 21:54:08 +00:00
2017-04-26 15:58:22 +01:00
2015-10-28 10:30:17 +09:00
2017-01-17 18:38:02 +00:00
2016-08-18 19:10:39 +01:00
2015-07-31 18:14:57 +01:00
2017-11-27 16:31:20 +00:00
2017-08-08 11:36:07 +01:00
2015-09-22 09:30:10 -07:00
2016-05-04 14:21:03 +01:00
2018-04-02 15:56:24 +01:00
2017-07-08 10:41:53 -07:00