From owner-svn-src-all@freebsd.org Sun Apr 17 01:55:24 2016 Return-Path: Delivered-To: svn-src-all@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 0658BB0ACBE; Sun, 17 Apr 2016 01:55:24 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C730A1453; Sun, 17 Apr 2016 01:55:23 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x230.google.com with SMTP id o126so167413300iod.0; Sat, 16 Apr 2016 18:55:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=LJR97OZO2BFL7cGWjZDgpp6mHRFgB+YYhYJT2gSqyTo=; b=L5TS8xliMPH7czkPrWSGg0Hnc5UjILyFcaU9rHE3Sh4rNBPgK+WZrFH15b9Go+bk1r xlRFQtSH4FfL4LaoTD2Mlq3cmGJ1/SkXAxR2yXoIKXp82f2gszPYVKtx/ljM19PQ3UFq 1pIl+i9EZ+TSWu1MIPtSQKal74A/qlhR1M8w8IOX+D5MUvbijiH0LADzwqwfY4wIbyjB o7N8x/FWUYBjQgAS+SY9yh4k4suVxCX+FT69HPXOCJISNxgPquuTkRIaCSlk+73sRUz9 gVpdr742h4dBodbSq4lHw+xfeSw5hAO31K93DONj8e/GgfwA98t0ZDBQeAafsQ1/3ybA hmVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=LJR97OZO2BFL7cGWjZDgpp6mHRFgB+YYhYJT2gSqyTo=; b=Wf7lry0oiKPdm9tIFz8r/J2VS8HQo8LMhDwINI4p1OmLKTrUguw2hK83+a4QAassXZ K3ti189+pDHCZPD9CV1l1YGF/1XGfntCWk6ATUTRROWMT0mGhJDv88AC6DTD9xIUKbrQ w+EbAJOvh5h7534UHGtj2IRh2lWGwbZkdGXdD8wFneQbBnazEpZgIU035fuD1jNCqgSp xmvNxJMhlbL7T3wEtvnPFH2ZzUwyV8UTld5f2kL40izRGtnkX6zBbsx+0Ul0emvRbaxy pJwUbZzN8Tm93QPtk6nnHf4B2I6j6xk696a6wQfsY6eyl0uxY9oZt/nu8UrgoXdOsI7q 6Ehw== X-Gm-Message-State: AOPr4FXeql+Lc+CRF7gxUoYNVtjfl1flDRQ2qC761xUTw+rZO3MXJN8J9NG7l/wlG4+DwlGLNc/0ahgpd4KdcA== MIME-Version: 1.0 X-Received: by 10.107.134.166 with SMTP id q38mr28732986ioi.165.1460858122751; Sat, 16 Apr 2016 18:55:22 -0700 (PDT) Received: by 10.36.14.19 with HTTP; Sat, 16 Apr 2016 18:55:22 -0700 (PDT) In-Reply-To: <201604151526.u3FFQVGX077303@repo.freebsd.org> References: <201604151526.u3FFQVGX077303@repo.freebsd.org> Date: Sat, 16 Apr 2016 18:55:22 -0700 Message-ID: Subject: Re: svn commit: r298060 - head/sys/dev/flash From: Adrian Chadd To: Stanislav Galabov Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Apr 2016 01:55:24 -0000 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 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"); >