linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Albrecht Dreß" <albrecht.dress@arcor.de>
To: Linux PPC Development <linuxppc-dev@ozlabs.org>
Subject: How to use Localbus on 5200B w/ 2.6.29.1
Date: Mon, 27 Apr 2009 19:18:31 +0200	[thread overview]
Message-ID: <1240852719.3495.0@antares> (raw)

[-- Attachment #1: Type: text/plain, Size: 2844 bytes --]

Hi all,

I have a question about the definition of the localbus on the Freescale  
5200B (I'm testing with the Lite5200B board) with Kernel 2.6.29.1 which  
I could not figure out with the docs and the list archives...

When I use 'compatible = "fsl,mpc5200b-lpb";' in the dts file, the  
localbus and any nodes below it don't show up in /sys/devices.

When I use the following (top-level, not under the soc node) in the dts  
file

<snip>
localbus {
	compatible = "fsl,lpb";
	#address-cells = <2>;
	#size-cells = <1>;
	reg = <0xf0000300 0x32>;
	ranges = < 0 0 0xfc000000 0x02000000
		   3 0 0xf0020000 0x00010000 >;
	flash@0,0 {
		compatible = "cfi-flash";
		reg = <0 0x0 0x2000000>;	// 32 MB
		bank-width = <1>;		// width in bytes of  
the flash bank
		device-width = <1>;		// one devices on each  
bank
		#size-cells = <1>;
		#address-cells = <1>;
	};

	mydev@3,0 {
		compatible = "mydev";
		reg = <0 0x0 0x100>;		// 256 Bytes, 32 used
		interrupts = <1 3 2>;		// todo - level?
		interrupt-parent = <&mpc5200_pic>;
	};
};
</snip>

I see in /sys/devices

<snip>
# ls -al /sys/devices/
drwxr-xr-x    7 0        0               0 Jan  1 00:00 .
drwxr-xr-x   11 0        0               0 Jan  1 00:00 ..
drwxr-xr-x   31 0        0               0 Jan  1 00:00 f0000000.soc5200
drwxr-xr-x    4 0        0               0 Jan  1 00:00  
f0000300.localbus
drwxr-xr-x    2 0        0               0 Jan  1 00:00 platform
drwxr-xr-x    5 0        0               0 Jan  1 00:00 system
drwxr-xr-x    8 0        0               0 Jan  1 00:00 virtual
</snip>

Does this mean that the documentation (and some existing dts files) are  
inaccurate?  What is the proper way to specify the localbus (or, in  
particular, it's child nodes) on the 5200B?

In /sys/devices/f0000300.localbus, I see

<snip>
# ls -al /sys/devices/f0000300.localbus/
drwxr-xr-x    4 0        0               0 Jan  1 00:00 .
drwxr-xr-x    7 0        0               0 Jan  1 00:00 ..
-r--r--r--    1 0        0            4096 Jan  1 00:00 devspec
drwxr-xr-x    2 0        0               0 Jan  1 00:00 fc000000.flash
drwxr-xr-x    2 0        0               0 Jan  1 00:00 fc000000.mydev
-r--r--r--    1 0        0            4096 Jan  1 00:00 modalias
-r--r--r--    1 0        0            4096 Jan  1 00:00 name
lrwxrwxrwx    1 0        0               0 Jan  1 00:00 subsystem ->  
../../bus/of_platform
-rw-r--r--    1 0        0            4096 Jan  1 00:00 uevent
</snip>

which is also confusing, as both devices appear to have the same  
address?  Any idea what goes wrong here?

The flash device itself (mydev isn't present yet...) also doesn't work  
although mtd is enabled, but that's probably a different problem.

Any help would be really welcome!

Thanks in advance,
Albrecht.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2009-04-27 17:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-27 17:18 Albrecht Dreß [this message]
2009-04-27 17:36 ` How to use Localbus on 5200B w/ 2.6.29.1 Grant Likely
2009-04-28 17:55   ` Albrecht Dreß
2009-04-28 18:10     ` Grant Likely

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=1240852719.3495.0@antares \
    --to=albrecht.dress@arcor.de \
    --cc=linuxppc-dev@ozlabs.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).