From owner-svn-src-head@freebsd.org Fri Apr 15 15:26:32 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81F02AED232; Fri, 15 Apr 2016 15:26:32 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F23D1A3C; Fri, 15 Apr 2016 15:26:32 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3FFQVe3077304; Fri, 15 Apr 2016 15:26:31 GMT (envelope-from sgalabov@FreeBSD.org) Received: (from sgalabov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3FFQVGX077303; Fri, 15 Apr 2016 15:26:31 GMT (envelope-from sgalabov@FreeBSD.org) Message-Id: <201604151526.u3FFQVGX077303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sgalabov set sender to sgalabov@FreeBSD.org using -f From: Stanislav Galabov Date: Fri, 15 Apr 2016 15:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298060 - head/sys/dev/flash X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 15:26:32 -0000 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");