devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
To: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Cc: devicetree-discuss
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
	Edgar Iglesias <edgari-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
	Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
	Peter Crosthwaite
	<pcrost-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
Subject: Re: microblaze device-tree description - pair intc/buses and timers
Date: Wed, 12 Jun 2013 08:30:21 +0200	[thread overview]
Message-ID: <51B8157D.5000407@monstr.eu> (raw)
In-Reply-To: <20130611222225.9753A3E0D8D@localhost>


[-- Attachment #1.1: Type: text/plain, Size: 5622 bytes --]

On 06/12/2013 12:22 AM, Grant Likely wrote:
> On Tue, 11 Jun 2013 16:08:11 +0200, Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org> wrote:
>> Hi Grant,
>>
>> nice that you have found a time to look at this.
>>
>> On 06/11/2013 03:02 PM, Grant Likely wrote:
>>> On Mon, 27 May 2013 15:23:57 +0200, Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org> wrote:
>>>> Hi guys,
>>>>
>>>> we have got a new configurations with iomodule which can be connected to the microblaze
>>>> cpu and I would like to have proper description for this system
>>>> + more advance configuration below.
>>>>
>>>> Buses:
>>>> Microblaze systems have in standard configuration two buses LMB and AXI(in past PLB).
>>>> We didn't generate LMB even there is placed BRAM (block ram)
>>>> but Linux expects that there is any writeable memory at 0x0.
>>>> Currently because we can use iomodule which is connected to LMB and we need to generate
>>>> this bus. I don't expect that there is any problem to have this configuration.
>>>>
>>>> cpus {
>>>> 	...
>>>> 	cpu@0 {
>>>> 		...
>>>> 	}
>>>> }
>>>> lmb@0 {
>>>> 	...
>>>> 	iomodule@X {
>>>> 		...
>>>> 	}
>>>> }
>>>> axi@X {
>>>> 	...
>>>> 	nodes
>>>> 	...
>>>> }
>>>>
>>>> Block ram:
>>>> When we generate lmb make sense to also add there this small bram memory
>>>> but I expect that is it ok just to added to bus and do not add it to the root.
>>>> Currently we have an option to use "mmio-sram" compatibility string for it.
>>>>
>>>> Interrupt controller:
>>>> Till now Microblaze uses only one interrupt controller on main bus (AXI or PLB)
>>>> and we just find compatible string and we said that this is primary interrupt controller.
>>>>
>>>> Based on DTS in the kernel I see that "interrupt-parent" property
>>>> reflects which interrupt controller is master and which one is in cascade.
>>>
>>> Mostly correct; it is also possible for an interrupt controller to
>>> cascade to two different parent controllers, and in that case there
>>> would need to be an interrupt-map somewhere. That case is rare however.
>>
>> Any dts in the kernel which uses this?
> 
> You can find lots of examples of the interrupt-map property by doing
> git grep. Most of them are PCI interrupt controllers which is similar to
> what you're asking, but not entirely the same. I have seen examples in
> the past, but I cannot remember off the top of my head.

ok.

I forget to mention one more thing related to buses.
As you mentioned bus-handle is fine.
Maybe worth for lmb and axi case to add them to one handler.

bus-handle = <&lmb &axi>

which also show priorities.



>>>> Timer:
>>>> System timer was also detected in this way that the first suitable timer was
>>>> taken and used. Others were just ignored.
>>>>
>>>>
>>>> Extend system configuration
>>>> We have also got an option to add one more CPU and I would like to have
>>>> an option to describe it correctly.
>>>
>>> Are you doing SMP in this case? I assume that you are not because we're
>>> talking about microblaze here. Separate OSes on each CPU?
>>
>> As you know on fpga we can do a lot of things. I am not talking about SMP
>> case here because it should also cover non SMP cases.
>> But yeah, Microblaze can also do SMP.
> 
> Nice! I didn't expect that. I assumed that cache coherency would have
> been too expensive to be worth it on an FPGA soft core.

Not sure about that.


>> btw: is there any problem if there is no interrupt controller in the system at all?
>> I think we can setup system just with one timer which should be possible
>> to describe and run Linux on it.
>> Is this any requirement from Linux point of view?
> 
> It would mean every device driver needs to be polled. As long as the
> polling frequency is high enough for the work load then it should be
> okay. I don't see a problem with there being no interrupt controller,
> unless there needs to be a dummy one just to keep the kernel happy.

Interesting. I have tried to compile the fragment below by dtc
and there is no warning. It also means that there is missing checking
in DTC for interrupt-cells.

What I am worried about is that request_irq in the driver will require
irq chip functions which there are not.
But if this is correct description for this type of system then I am ok with it.

/dts-v1/;
/ {
	#address-cells = <1>;
	#size-cells = <1>;
	compatible = "xlnx,microblaze";
	model = "Xilinx-SP605-AXI-full-14.5";
	cpus {
		#address-cells = <1>;
		#cpus = <0x1>;
		#size-cells = <0>;
		microblaze_0: cpu@0 {
			clock-frequency = <75000000>;
			compatible = "xlnx,microblaze-8.50.a";
			device_type = "cpu";
			interrupt-handle = <>; /* empty or not available */
		} ;
	} ;
	mcb_ddr3: memory@80000000 {
		device_type = "memory";
		reg = < 0x80000000 0x8000000 >;
	} ;
	axi4lite_0: axi@1 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "xlnx,axi-interconnect-1.06.a", "simple-bus";
		ranges ;
		system_timer: system-timer@41c00000 {
			clock-frequency = <75000000>;
			compatible = "xlnx,axi-timer-1.03.a", "xlnx,xps-timer-1.00.a";
			interrupt-parent = <&microblaze_0>;
			interrupts = < 0 >;
			reg = < 0x41c00000 0x10000 >;
		} ;
	} ;
} ;


Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform



[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

  reply	other threads:[~2013-06-12  6:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-27 13:23 microblaze device-tree description - pair intc/buses and timers Michal Simek
     [not found] ` <51A35E6D.5040706-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2013-06-11 13:02   ` Grant Likely
2013-06-11 14:08     ` Michal Simek
     [not found]       ` <51B72F4B.9030700-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2013-06-11 22:22         ` Grant Likely
2013-06-12  6:30           ` Michal Simek [this message]
     [not found]             ` <51B8157D.5000407-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2013-06-12  9:16               ` Grant Likely
     [not found]                 ` <CACxGe6skAtfzcNFX=0upAWqr6td+7wYsPxvo1q6Q9khn4N=Y6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-12 12:19                   ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51B8157D.5000407@monstr.eu \
    --to=monstr-psz03upnqpehxe+lvdladg@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=edgari-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
    --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=pcrost-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).