Date: Sat, 16 Apr 2016 18:55:22 -0700 From: Adrian Chadd <adrian.chadd@gmail.com> To: Stanislav Galabov <sgalabov@freebsd.org> Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r298060 - head/sys/dev/flash Message-ID: <CAJ-Vmon3XDjAqcFhGcpgOTa3n2sx6s9Ky9kj7pdKrW0Y=ggG9A@mail.gmail.com> In-Reply-To: <201604151526.u3FFQVGX077303@repo.freebsd.org> References: <201604151526.u3FFQVGX077303@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
HI! You need to wrap that ofw compat_data in #ifdef FDT . I'll do it soon, but if you see this before I've done it, this is your implied commit "ok". -adrian On 15 April 2016 at 08:26, Stanislav Galabov <sgalabov@freebsd.org> wrote: > Author: sgalabov > Date: Fri Apr 15 15:26:31 2016 > New Revision: 298060 > URL: https://svnweb.freebsd.org/changeset/base/298060 > > Log: > 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 > > Modified: > head/sys/dev/flash/mx25l.c > > Modified: head/sys/dev/flash/mx25l.c > ============================================================================== > --- head/sys/dev/flash/mx25l.c Fri Apr 15 15:24:42 2016 (r298059) > +++ head/sys/dev/flash/mx25l.c Fri Apr 15 15:26:31 2016 (r298060) > @@ -432,6 +432,12 @@ mx25l_set_4b_mode(device_t dev, uint8_t > 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"); >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmon3XDjAqcFhGcpgOTa3n2sx6s9Ky9kj7pdKrW0Y=ggG9A>