On 14/03/18 15:47, Mathieu Poirier wrote:
On 13 March 2018 at 22:20, Kim Phillips kim.phillips@arm.com wrote:
On Tue, 13 Mar 2018 23:15:19 +0000 Mike Leach mike.leach@linaro.org wrote:
Hi Mathieu, Kim
Hi Mike,
On 13 March 2018 at 20:20, Kim Phillips kim.phillips@arm.com wrote:
On Tue, 13 Mar 2018 11:03:57 -0600 Mathieu Poirier mathieu.poirier@linaro.org wrote:
On 13 March 2018 at 10:06, Kim Phillips kim.phillips@arm.com wrote:
On Tue, 13 Mar 2018 09:40:14 -0600 Mathieu Poirier mathieu.poirier@linaro.org wrote:
> On 12 March 2018 at 13:02, Kim Phillips kim.phillips@arm.com wrote: >> On Mon, 12 Mar 2018 11:28:33 -0600 >> Mathieu Poirier mathieu.poirier@linaro.org wrote: >> >> Is it possible to keep everything equal (no new compatibles or other >> changes), and have functions like funnel_enable_hw, funnel_disable_hw >> do something like this instead?: >> >> if (!drvdata->base) >> return; > > Not that I'm aware of - a funnel device won't get probed if it doesn't > have a valid 'reg' property to poke at.
All a node needs to contain to get its driver probed is the compatible property. 'reg' is an optional property.
The initialisation code mandate that a valid address be given [1].
[1]. https://elixir.bootlin.com/linux/latest/source/drivers/of/platform.c#L260
I see, thanks. So that's for an AMBA device, and the current funnel driver is an AMBA driver. Makes sense, but the current replicator driver - that supports non-configurable replicators by not including the "arm,primecell" compatible string - is a platform driver. Isn't it similarly possible to make the funnel driver a platform driver and match solely on the existing "arm,coresight-funnel" compatible? Only in the case of configurable funnels would it also manually register with the AMBA subsytem.
There are a pair of separate drivers for the replicators, one platform for non-programmable, one AMBA for dynamic (i.e. programmable).
Right, but they needn't be separate: they both do the same thing: register their link operations' callbacks with coresight_register() after getting probed.
coresight-dynamic-replicator.c is probed as an AMBA bus driver, and coresight-replicator.c is an OF-based driver, but a single driver can match against different bus_types, and match tables, see e.g., drivers/tty/serial/amba-pl011.c.
I hadn't seen an hybrid solution like that before - thanks for pointing it out. That should do the trick and does indeed have the advantage of keeping things in a single file and avoid the proliferation of compatible strings.
+1. FWIW, I am aware of another "case" of static funnel, waiting to make an entry in the drivers.
Suzuki