mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 09:11:07 -04:00
Make mx25l compatible with jedec,spi-nor as well
A lot of dts files define the SPI flashes supported by mx25l as compatible with 'jedec,spi-nor', so we add this to the mx25l compat_data. Approved by: adrian (mentor) Sponsored by: Smartcom - Bulgaria AD Differential Revision: https://reviews.freebsd.org/D5962
This commit is contained in:
parent
c1300b5e37
commit
1173c20679
1 changed files with 7 additions and 1 deletions
|
|
@ -432,6 +432,12 @@ mx25l_set_4b_mode(device_t dev, uint8_t command)
|
|||
return (err);
|
||||
}
|
||||
|
||||
static struct ofw_compat_data compat_data[] = {
|
||||
{ "st,m25p", 1 },
|
||||
{ "jedec,spi-nor", 1 },
|
||||
{ NULL, 0 },
|
||||
};
|
||||
|
||||
static int
|
||||
mx25l_probe(device_t dev)
|
||||
{
|
||||
|
|
@ -439,7 +445,7 @@ mx25l_probe(device_t dev)
|
|||
#ifdef FDT
|
||||
if (!ofw_bus_status_okay(dev))
|
||||
return (ENXIO);
|
||||
if (!ofw_bus_is_compatible(dev, "st,m25p"))
|
||||
if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0)
|
||||
return (ENXIO);
|
||||
#endif
|
||||
device_set_desc(dev, "M25Pxx Flash Family");
|
||||
|
|
|
|||
Loading…
Reference in a new issue