Bill Richardson
1b34f4bae7
Cr50: Add support for flash write & erase
This adds flash support for the SoC.
BUG=chrome-os-partner:44745
BRANCH=none
TEST=manual
Pick an unused section of flash and use the flasherase and
flashwrite commands to test it. The flashwrite command fills a
buffer with bytes, counting up (0x00, 0x01, 0x02, 0x03, ...),
then writes that buffer to the address given.
Note that the "md" command uses the absolute address, while the
flash commands use the offset address within the flash memory.
For example:
Test bank 0:
> md 0x7b000 16
0007B000: 00000000 00000000 00000000 00000000
0007B010: 00000000 00000000 00000000 00000000
0007B020: 00000000 00000000 00000000 00000000
0007B030: 00000000 00000000 00000000 00000000
> flasherase 0x3b000 0x800
Erasing 2048 bytes at 0x3b000...
> md 0x7b000 16
0007B000: ffffffff ffffffff ffffffff ffffffff
0007B010: ffffffff ffffffff ffffffff ffffffff
0007B020: ffffffff ffffffff ffffffff ffffffff
0007B030: ffffffff ffffffff ffffffff ffffffff
>
> flashwrite 0x3b000 0x800
Writing 2048 bytes to 0x3b000...
> md 0x7b000 16
0007B000: 03020100 07060504 0b0a0908 0f0e0d0c
0007B010: 13121110 17161514 1b1a1918 1f1e1d1c
0007B020: 23222120 27262524 2b2a2928 2f2e2d2c
0007B030: 33323130 37363534 3b3a3938 3f3e3d3c
> md .b 0x7b000 16
0007B000: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
Test bank 1:
> md 0xbb000 16
000BB000: ffffffff ffffffff ffffffff ffffffff
000BB010: ffffffff ffffffff ffffffff ffffffff
000BB020: ffffffff ffffffff ffffffff ffffffff
000BB030: ffffffff ffffffff ffffffff ffffffff
> flasherase 0x7b000 0x800
Erasing 2048 bytes at 0x7b000...
> md 0xbb000 16
000BB000: ffffffff ffffffff ffffffff ffffffff
000BB010: ffffffff ffffffff ffffffff ffffffff
000BB020: ffffffff ffffffff ffffffff ffffffff
000BB030: ffffffff ffffffff ffffffff ffffffff
> flashwrite 0x7b000 0x800
Writing 2048 bytes to 0x7b000...
> md 0xbb000 16
000BB000: 03020100 07060504 0b0a0908 0f0e0d0c
000BB010: 13121110 17161514 1b1a1918 1f1e1d1c
000BB020: 23222120 27262524 2b2a2928 2f2e2d2c
000BB030: 33323130 37363534 3b3a3938 3f3e3d3c
> md .b 0xbb000 16
000BB000: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
>
Change-Id: I956e813871949faed8d85ad9e46bdc64dee1a9e9
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/299757
2015-09-18 01:25:55 -07:00
..
2015-08-29 01:34:14 -07:00
2013-12-12 18:21:56 +00:00
2015-07-16 05:15:22 +00:00
2015-01-21 05:05:47 +00:00
2013-12-17 21:27:53 +00:00
2015-04-10 22:08:25 +00:00
2014-12-31 00:01:00 +00:00
2015-06-18 19:07:00 +00:00
2014-07-23 02:29:59 +00:00
2015-06-04 19:33:00 +00:00
2013-04-05 14:28:42 -07:00
2014-02-08 04:15:39 +00:00
2014-02-08 04:15:39 +00:00
2015-06-18 19:07:00 +00:00
2015-08-19 01:50:21 +00:00
2015-06-18 19:07:00 +00:00
2014-04-11 15:37:38 +00:00
2014-12-15 19:53:46 +00:00
2015-01-15 05:13:14 +00:00
2015-07-22 22:30:00 +00:00
2015-04-10 22:08:25 +00:00
2015-02-10 10:47:07 +00:00
2015-07-01 03:49:14 +00:00
2015-06-18 19:07:00 +00:00
2015-09-16 14:49:33 -07:00
2015-09-18 01:25:55 -07:00
2015-07-25 08:47:31 +00:00
2015-06-18 19:07:00 +00:00
2015-06-18 19:07:00 +00:00
2015-06-18 19:07:00 +00:00
2015-07-27 22:19:16 +00:00
2014-02-08 00:14:48 +00:00
2015-09-15 11:02:43 -07:00
2013-10-25 20:12:49 +00:00
2015-06-10 18:24:05 +00:00
2014-11-06 02:28:22 +00:00
2015-09-16 14:49:33 -07:00
2015-08-29 01:34:15 -07:00
2015-05-27 03:58:16 +00:00
2015-05-27 03:58:16 +00:00
2015-08-11 21:21:28 +00:00
2015-05-27 03:58:16 +00:00
2015-07-13 18:43:56 +00:00
2015-07-28 21:31:38 +00:00
2013-06-26 09:08:23 -07:00
2015-06-17 13:10:58 +00:00
2012-11-04 20:27:57 -08:00
2015-06-18 19:07:00 +00:00
2015-04-10 22:08:25 +00:00
2015-07-17 03:18:03 +00:00
2014-02-07 04:13:18 +00:00
2015-01-24 06:42:02 +00:00
2013-10-30 23:10:13 +00:00
2014-02-07 04:13:14 +00:00
2015-04-10 22:08:25 +00:00
2014-04-11 20:02:30 +00:00
2013-03-22 11:24:29 -07:00
2014-10-08 02:50:54 +00:00
2013-08-07 12:43:48 -07:00
2015-07-17 03:17:57 +00:00
2015-08-10 20:42:18 +00:00
2013-04-02 14:12:57 -07:00
2014-10-08 02:50:54 +00:00
2014-10-15 18:22:37 +00:00
2014-11-21 06:23:16 +00:00
2015-09-16 14:49:46 -07:00
2015-06-25 17:21:50 +00:00
2015-09-15 17:56:17 -07:00
2011-12-07 19:10:02 +00:00
2014-10-24 01:37:58 +00:00
2015-07-30 19:58:09 +00:00
2015-03-06 08:48:39 +00:00
2015-09-07 15:16:47 -07:00
2012-10-25 14:12:11 -07:00
2015-03-14 03:22:37 +00:00
2012-11-01 12:45:22 -07:00
2015-06-18 19:07:00 +00:00
2015-04-27 23:29:30 +00:00
2015-06-04 01:15:55 +00:00
2013-04-24 16:32:58 -07:00
2015-07-14 07:35:27 +00:00
2012-10-25 14:12:10 -07:00
2015-06-18 19:07:00 +00:00
2013-10-30 23:10:10 +00:00
2015-06-18 19:07:00 +00:00
2015-07-15 21:57:36 +00:00
2015-06-18 19:07:00 +00:00
2015-06-18 19:07:00 +00:00
2015-06-18 19:07:00 +00:00
2012-08-09 17:40:37 -07:00
2015-06-18 19:07:00 +00:00
2015-02-18 04:53:59 +00:00
2015-09-15 19:17:53 -07:00
2015-03-11 23:18:09 +00:00
2015-07-30 19:57:55 +00:00
2015-06-18 19:07:00 +00:00
2015-04-10 22:08:25 +00:00
2015-09-16 14:49:32 -07:00
2015-06-18 19:07:00 +00:00
2015-08-20 01:37:56 +00:00
2015-06-18 19:07:00 +00:00
2014-02-08 04:21:26 +00:00
2015-09-16 14:49:46 -07:00
2015-01-14 03:15:41 +00:00
2014-08-10 18:39:24 +00:00
2015-08-24 19:08:15 +00:00
2015-08-14 21:04:38 +00:00
2015-04-10 22:08:25 +00:00
2015-06-18 19:07:00 +00:00
2015-06-18 19:07:00 +00:00
2015-09-11 13:51:07 -07:00
2015-09-08 13:49:09 -07:00
2015-06-18 19:07:00 +00:00
2015-08-04 19:22:07 +00:00
2015-08-21 08:10:03 +00:00
2015-08-21 08:10:03 +00:00
2015-09-01 16:10:43 -07:00
2015-06-18 19:07:00 +00:00
2015-01-08 00:38:13 +00:00
2015-07-01 03:49:00 +00:00
2014-08-28 20:12:52 +00:00
2014-06-17 18:34:03 +00:00
2015-01-20 20:56:43 +00:00