Re: [PATCH 3/3 v6] ARC: hsdk: initial port for HSDK board

From: Eugeniy Paltsev
Date: Thu Jun 29 2017 - 12:39:57 EST


On Wed, 2017-06-28 at 17:50 -0500, Rob Herring wrote:
> > > > +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ#clock-cells = <0>;
> > > > +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂcompatible = "fixed-clock";
> > > > +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂclock-frequency = <1000000000>;
> > > > +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ};
> > > > +
> > > > +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂcore_intc: archs-intc@cpu {
> > >
> > > cpu is not a valid unit-address. How are these interrupt
> > > controllers addressed?
> >
> > We have per-core INTC so each core communicates to its own INTC and
> > there's no way
> > for any core to talk with INTC of another core.
> >
> > But then we have the next level INTC which is IDU (Interrupt
> > Distribution Unit)
> > which dispatches "common" IRQs to different upstream per-core INTC,
> > see below its node.Â
>
> Okay, I'd just do "cpu-interrupt-controller" for the node name then.Â
> There doesn't seem to be an easy way to use just "interrupt-
> controller"Â
> since you have 2 nodes at the same level and no unit-address (i.e. aÂ
> reg property).
>

To be more clarify, what is better way do describe such hardware in
device tree?

-------------ÂÂÂÂ-------------ÂÂ
| cpu core 0|ÂÂÂÂ| cpu core 1|ÂÂ
-------------ÂÂÂÂ-------------ÂÂ
| interrupt |ÂÂÂÂ| interrupt |ÂÂ
| controller|ÂÂÂÂ| controller|ÂÂ
|ÂÂÂÂÂ0ÂÂÂÂÂ|ÂÂÂÂ|ÂÂÂÂÂ1ÂÂÂÂÂ|ÂÂ
-------------ÂÂÂÂ-------------ÂÂ
ÂÂÂÂÂÂ^ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ^
ÂÂÂÂÂÂ|ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|
ÂÂÂÂÂÂÂÂÂÂÂÂÂ-----------
ÂÂÂÂÂÂ|ÂÂÂÂÂÂ|
----------------
|ÂÂÂinterruptÂÂ|
| distribution |
|ÂÂÂÂÂunitÂÂÂÂÂ|
----------------
ÂÂÂÂÂÂ^
ÂÂÂÂÂÂ|
ÂÂÂÂÂÂ|<--other devices interrupt lines

We can't just create a node for each core interrupt controller because
we wouldn't able to specify which one is parent for interrupt
distribution unit:

------------>>>-------------
cpus {
ÂÂÂÂcpu@0 { intc@0 };
ÂÂÂÂcpu@1 { intc@1 };
};

interrupt-distribution-unit {
ÂÂÂÂinterrupt-parent = ????
};
------------>>>-------------

Should we simply create one core interrupt controller node for all cpus
(instead of one per each cpu core), or where is a better option?

--
ÂEugeniy Paltsev