Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1452097

Re: [PATCH v16 6/6] ARM: socfpga: fpga bridge driver support

Path csiph.com!goblin1!goblin.stu.neva.ru!feeder1.xsusenet.com!feeders.as203319.net!feeder02.as203319.net!aioe.org!bofh.it!news.nic.it!robomod
From Trent Piepho <tpiepho@kymetacorp.com>
Newsgroups linux.kernel
Subject Re: [PATCH v16 6/6] ARM: socfpga: fpga bridge driver support
Date Thu, 28 Jul 2016 22:40:02 +0200
Message-ID <s00g2-2RB-19@gated-at.bofh.it> (permalink)
References <qYXmq-6ou-5@gated-at.bofh.it> <rIkmR-6Xo-3@gated-at.bofh.it> <rIkmR-6Xo-1@gated-at.bofh.it> <rZQJI-4VL-21@gated-at.bofh.it> <s00g2-2RB-21@gated-at.bofh.it>
X-Original-To atull <atull@opensource.altera.com>
X-Greylist delayed 324 seconds by postgrey-1.27 at vger.kernel.org; Thu, 28 Jul 2016 16:32:16 EDT
Thread-Topic [PATCH v16 6/6] ARM: socfpga: fpga bridge driver support
Thread-Index AQHRwr5Pq8+fbGwUtkGsHHTJ+zcoiqAuZV6AgABRyoCAAFXYAA==
Accept-Language en-US
Content-Language en-US
X-Mailer Evolution 3.8.5 (3.8.5-31.el7)
X-Ms-Exchange-Transport-Fromentityheader Hosted
X-Originating-IP [10.10.42.160]
Content-Type text/plain; charset="utf-8"
Content-ID <386CA76A829DEC49930BFD4EF15396EA@kymetacorp.com>
Content-Transfer-Encoding base64
MIME-Version 1.0
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 27
Organization linux.* mail to news gateway
X-Original-Cc Andrea Galbusera <gizero@gmail.com>, Rob Herring <robh+dt@kernel.org>, "pantelis.antoniou@konsulko.com" <pantelis.antoniou@konsulko.com>, "Moritz Fischer" <moritz.fischer@ettus.com>, Josh Cartwright <joshc@ni.com>, "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>, "monstr@monstr.eu" <monstr@monstr.eu>, "michal.simek@xilinx.com" <michal.simek@xilinx.com>, Pawel Moll <pawel.moll@arm.com>, Mark Rutland <mark.rutland@arm.com>, "Ian Campbell" <ijc+devicetree@hellion.org.uk>, Kumar Gala <galak@codeaurora.org>, Jonathan Corbet <corbet@lwn.net>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, "linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>, "delicious.quinoa@gmail.com" <delicious.quinoa@gmail.com>, "dinguyen@opensource.altera.com" <dinguyen@opensource.altera.com>, Matthew Gerlach <mgerlach@altera.com>
X-Original-Date Thu, 28 Jul 2016 20:26:50 +0000
X-Original-Message-ID <1469737696.30803.152.camel@rtred1test09.kymeta.local>
X-Original-References <1454707803-27947-1-git-send-email-atull@opensource.altera.com> <1454707803-27947-7-git-send-email-atull@opensource.altera.com> <1465525089.15779.203.camel@rtred1test09.kymeta.local> <CAC+thW3U_vEre0DovmK7t_oiK5v1evZCBPqpahf+e6aCvmhqLA@mail.gmail.com> <alpine.DEB.2.02.1607281019100.1032@linuxheads99>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1452097

Show key headers only | View raw


On Thu, 2016-07-28 at 10:21 -0500, atull wrote:
> > >
> > > This isn't going work if more than one bridge is used.  Each bridge has
> > > its own priv and thus priv->l3_remap_value.  Each bridge's priv will
> > > have just the bit for it's own remap set.  The 2nd bridge to be enabled
> > > will turn off the 1st bridge when it re-write the l3 register.
> > 
> > I can confirm this is exactly what happens with tag
> > "rel_socfpga-4.1.22-ltsi_16.06.02_pr" of socfpga-4.1.22-ltsi branch
> > from altera-opensource/linux-socfpga which includes more or less the
> > code in this patch. If you have 2 bridges (lw-hps2fpga and hps2fpga)
> > you end up with only one of them being visible. Easily spot by logging
> > l3_remap_value being passed to regmap_write()...
> > 
> 
> Anatolij kindly provided a patch for this issue.  I'll push it
> to my github repo when I can.

I still think a better solution would be to allow the syscon driver
manage shared access.  The purpose of syscon is to manage access to a
shared resource from multiple devices.  And regmap already has the
ability to cache a write-only register and allow thread safe access to
modify bits in said register.  The problem is just the pain of trying to
do anything to syscon DT bindings.  Something like "write-only" in the
syscon binding that sets a couple values in the regmap_config is all
that's necessary.

Might as well not use syscon at all and have the bridge driver map the
l3regs itself, since it doesn't really use syscon for anything.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v16 6/6] ARM: socfpga: fpga bridge driver support Andrea Galbusera <gizero@gmail.com> - 2016-07-28 12:30 +0200
  Re: [PATCH v16 6/6] ARM: socfpga: fpga bridge driver support Trent Piepho <tpiepho@kymetacorp.com> - 2016-07-28 22:40 +0200

csiph-web