Re: [PATCH 10/11] Add MPC8360EMDS board support
From: Sergei Shtylyov <hidden>
Date: 2006-09-27 14:57:55
Hello. Vitaly Bordug wrote:
quoted
quoted
quoted
quoted
+#define BCSR_PHYS_ADDR ((uint)0xf8000000) +#define BCSR_SIZE ((uint)(32 * 1024))
quoted
quoted
quoted
This sort of thing should really be in the device tree.
quoted
quoted
Just a suggestion, but for the similar aim in pq2 I have those stuff
quoted
in memory node :
quoted
quoted
+memory { + device_type = "memory"; + linux,phandle = <300>; + reg = <00000000 4000000 f4500000 00000020>; + }; the second pair is about bcsr and its size.
quoted
quoted
Just in case this may help (and wondering if I'm not violating
quoted
something :) )
quoted
Well, this can make it work. But I would prefer to use a new node because the BCSR is by no means a memory type of device. I have made my change to use node like this:
quoted
bcsr@f8000000 { device_type = "board-control"; reg = <f8000000 8000>; };
I though about that approach, but saw somewhere a reference that we should not summon new node types without utter necessity, and utilized memory because bcsr is memory-mapped stuff.
You might have utilized "memory" even for the Ethernet controllers guided
by such logic. Of course, that was a wrong criterion -- "memory" is for RAM,
otherwise you'd be fooling the kernel device tree scanner which looks for the
"memory" nodes.
I can hardly imagine bcsr as a device (which would require respective spec inclusion btw).
And this is hardly a memory, neverthless.
WBR, Sergei