Teach the flashmap code about the SPI flash.

PR:		kern/206227
Submitted by:	Stanislav Galabov <sgalabov@gmail.com>
This commit is contained in:
Adrian Chadd 2016-01-23 05:26:29 +00:00
parent d62edc5eb5
commit 61789a9a76

View File

@ -190,8 +190,12 @@ g_flashmap_taste(struct g_class *mp, struct g_provider *pp, int flags)
size = sizeof(device_t);
if (g_io_getattr("NAND::device", cp, &size, &dev)) {
size = sizeof(device_t);
if (g_io_getattr("CFI::device", cp, &size, &dev))
break;
if (g_io_getattr("CFI::device", cp, &size, &dev)) {
size = sizeof(device_t);
if (g_io_getattr("SPI::device", cp, &size,
&dev))
break;
}
}
nslices = g_flashmap_load(dev, &head);