Files
OpenCellular/chip/stm32
Vincent Palatin d8cbf0dc40 stm32: add internal flash support for STM32L4 family
Add a flash driver for the STM32L4 family.

For write and erase, the code is very similar to other variants
excepted the 'normal' writes need to be perform 2 aligned
32-bit words at a time.

Option bytes are a sligthly easier business since the hardware deals
with the option bytes page preserving and erasing for us.

For the write-protection, the STM32L4 is slightly different from the
other variants. The write-protection granularity is still a 2-kB block
(2kB here) but instead of having a 'bitmap' of the protected blocks, it
defines 2 write-protection ranges (WRP1AR and WRP1BR).
For the EC code base, we are using WRP1AR to protect the Read-Only
regions and WRP1BR to protect the Rollback and RW regions (if they
exist).

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BRANCH=none
BUG=b:35648258
TEST=On Eve, run 'flashrom -p ec:type=fp -w /tmp/ec.bin'
and 'flashrom -p ec:type=fp --wp-enable --wp-range 0x0 0x20000'

Change-Id: Iaa98c1b4d3b07de2923ac076624bd4601c31a600
Reviewed-on: https://chromium-review.googlesource.com/456711
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
2017-03-24 19:38:04 -07:00
..
2017-02-23 11:36:21 -08:00
2017-01-26 18:43:53 -08:00
2014-10-07 20:58:52 +00:00
2016-04-25 16:49:02 -07:00
2015-06-18 19:07:00 +00:00
2014-10-07 20:58:52 +00:00
2016-08-21 04:11:10 -07:00
2014-10-07 20:58:52 +00:00
2016-04-25 16:49:02 -07:00
2013-07-08 13:53:58 -07:00
2016-04-25 16:49:01 -07:00
2017-02-23 11:36:21 -08:00
2016-11-15 17:41:53 -08:00
2015-08-24 19:08:35 +00:00
2015-08-24 19:08:30 +00:00
2015-08-24 19:08:30 +00:00
2015-08-24 19:08:30 +00:00
2015-08-24 19:08:30 +00:00
2015-08-24 19:08:30 +00:00
2015-08-24 19:08:35 +00:00
2017-03-16 11:25:50 -07:00
2016-09-02 21:17:22 -07:00
2016-09-02 21:17:22 -07:00
2016-09-02 21:17:22 -07:00
2015-06-18 05:07:55 +00:00
2017-03-16 11:25:50 -07:00
2017-03-16 11:25:50 -07:00
2017-03-16 11:25:50 -07:00
2017-03-16 11:25:50 -07:00
2016-03-15 21:49:35 -07:00
2017-03-16 11:25:50 -07:00
2017-03-16 11:25:50 -07:00
2017-03-16 11:25:50 -07:00
2017-03-16 11:25:50 -07:00