LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [help]about amcc440
From: x he @ 2007-10-23  9:22 UTC (permalink / raw)
  To: linuxppc-embedded

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

hi,everyone!
i've got a amcc440ep,and i buy a pci video-card, but it doesn't work.i want
to know which card is well supported by amcc440,does anyone knows? thank you
!

[-- Attachment #2: Type: text/html, Size: 183 bytes --]

^ permalink raw reply

* Re: Difference between ioremap() and phy_to_virt() Kernel function
From: Arnd Bergmann @ 2007-10-23  9:11 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: Misbah khan
In-Reply-To: <13357088.post@talk.nabble.com>

On Tuesday 23 October 2007, Misbah khan wrote:
> But i wish to know that could i use phy_to_virt() function in place io
> ioremap() ?????

Sorry to disappoint you there, but you can't.

> And could you give me an example where we could use phy_to_virt().

Not really, I can't think of any correct use of phys_to_virt on powerpc.

	Arnd <><

^ permalink raw reply

* Re: Problems with allyesconfig kernel build
From: Segher Boessenkool @ 2007-10-23  9:09 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: ppc-dev, Andrew Morton, amodra
In-Reply-To: <20071023140231.12698d1c.sfr@canb.auug.org.au>

> This was first noted with the -mm tree, but has now migrated into 
> Linus'
> tree.  An allyesconfig build dies in the link stage like this:
>
> /usr/bin/ld: arch/powerpc/kernel/head_64.o(.text+0x80c8): sibling call 
> optimization to `.text.init.refok' does not allow automatic multiple 
> TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or 
> make `.text.init.refok' extern
> /usr/bin/ld: arch/powerpc/kernel/head_64.o(.text+0x8160): sibling call 
> optimization to `.text.init.refok' does not allow automatic multiple 
> TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or 
> make `.text.init.refok' extern
> /usr/bin/ld: arch/powerpc/kernel/head_64.o(.text+0x81c4): sibling call 
> optimization to `.text.init.refok' does not allow automatic multiple 
> TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or 
> make `.text.init.refok' extern
> /usr/bin/ld: final link failed: Bad value

I just tried, and it works fine for me.

> Intuiting the obvious, I changed all the _INIT_STATIC and _INIT_GLOBAL
> uses in head_64.S back to _STATIC and _GLOBAL (which just moves the 
> code
> from .text.init.refok to .text).  Now the linker segfaults instead.  
> :-)

Tried that, too, and no segfault, everything happy.

> $ ld --version
> GNU ld (GNU Binutils for Debian) 2.18

I'm using CVS HEAD of binutils.  Could you try that, with the same
GCC version you are currently using?  Just to narrow things down...


Segher

^ permalink raw reply

* Re: Audio codec device tree entries
From: Segher Boessenkool @ 2007-10-23  8:06 UTC (permalink / raw)
  To: Grant Likely; +Cc: PowerPC dev list
In-Reply-To: <fa686aa40710222057y58202c8ev4610e045e5e389df@mail.gmail.com>

> Isn't this the ac97 bus node?  Can't the ac97 codecs simply be
> children of this bus?

They should be, yes.

>> pseudo-sound@0 { // use to trigger loading platform specific fabric 
>> driver
>>       device_type = "pseudo-sound"
>> };
>
> I don't think this is a good idea.  The device tree is for describing
> your hardware; so the layout should reflect that.  Make the platform
> code do the right thing with the real nodes.

There _can_ be good reasons for using a "pseudo-device" node,
but I don't see any such reasons here.  The main reason for
doing a "pseudo" is if there is some hardware you need to
describe, but it doesn't fit anywhere in the device tree; one
example is certain weird interrupt routings.

> I think this is what you want:
>
> ac97@2000 {           // PSC1
>       compatible = "fsl,mpc5200b-psc-ac97","fsl,mpc5200-psc-ac97";
>

>       // The following codec stuff could be a little off; It has been
> a while since I've looked
>       // at ac97 codec interfacing, but if I remember correctly you
> can have multiple
>       // codecs on an ac97 bus; an audio codec and a modem codec.  The 
> following
>       // reflects that understanding...

You can have more than two, and then there is the weird stuff where
"hd" codecs have more than one address.  But this all can be neatly
described with "reg", so no problem.

>       ac97-codec@0 {

"sound@0", says the generic naming doc.

>       ac97-codec@1 {
>             // This could be the modem codec

So "modem@1".

> i2s@2000 {           // PSC1

>       codec-handle = <&codec0 &codec2>;

I would really do it the other way around: have the codec node point
to the I2S bus.

>       codec0: i2s-codec@0 {

>       codec1: i2s-codec@1 {

>       codec2: i2s-codec@2 {

0, 1, 2 aren't valid I2C addresses.  But this was only an example ;-)

> So, this scheme describes the hardware, but it does not describe 2 of
> your questions:
>
> 1. How does the device tree describe the myriad of possible circuits
> that an audio codec can get dropped into, and
> 2. How do the drivers get probed
>
> For question #1, I think the answer is simple... it doesn't try.  :-)
>
> As was described in the previous thread, trying to describe the
> circuit is very complex and figuring out what software would do with
> such a description is even worse.  Instead, I propose the following:
> - as much as possible, make the board firmware and the platform setup
> code configure the GPIOs, port_config, and other 'fixed' configuration

Certainly agreed.

> - make the driver code look at either the board model/compatible
> properties or add a board-unique value to the codec's compatible list.

Make the _platform_ code look at the board version properties, and have
_it_ instantiate the correct fabric driver, with the correct 
configuration
for it.  Some of that configuration could be probed from the device tree
("codec gpio pin 0 is used as a level-low headphone detect switch") but
I wouldn't go over the top with it, there are just way way too many
different ways all of this is put together.

>  Either way the driver can apply board specific tweaks to its
> behavious.  (I think the better solution is to add a value to the
> front of the codec's compatible list because the same circuit can be
> used on a different board and it can then claim compatibility with the
> older board for just that part of the circuit).

The "fabric" stuff isn't really a codec property, but a board-global
property.  So that's how this should be described in the device tree
as well: board-global.

> As for question #2, I think you make the i2s driver probe on the i2s
> bus node and the ac97 driver probe on the ac97 bus node.  In both
> cases, the driver can find the link to the codec; determine what kind
> of system it is running on, and instantiate the appropriate ASoC
> fabric driver.

In the i2s case, if the i2s driver has to know about the codecs at all,
it should get references to the codecs passed in by the platform driver.

Same goes for the fabric driver.

Or, that's the only sane way of doing things I can imagine, anyway :-)


Segher

^ permalink raw reply

* DMA problem - mpc8xx
From: raul.moreno @ 2007-10-23  7:42 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <f8f856500709130705t2109e559v19f0ffac318a4756@mail.gmail.com>

Hi everybody,

I am having problems with the serial cpm driver in a mpc866. But I've f=
ound
out that my problem comes from the DMA and not really from the driver. =
 The
Rx and Tx buffers use the DMA and then the sytem hangs. However, if I s=
et
these buffers to internal ram memory (DPRAM), it works. The DMA address=
 is
configured with a kernel parameter in advance setup:
CONFIG_CONSISTENT_START (and the size in CONFIG_CONSISTENT_SIZE), but I=

don't know what they are exactly and I could not find a right documenta=
tion
about it.
I saw a pair of mailing list where some guys set the
CONFIG_CONSISTENT_START to 0xff100000, but my driver continues failing =
(and
an error about dma-mapping appears in the boot).

Did anyone have a similar problem?
Could anyone help me?

Thanks in advance,

Ra=FAl Moreno=

^ permalink raw reply

* Re: [PATCH 2/2] Use of_get_pci_dev_node() in axon_msi.c
From: Benjamin Herrenschmidt @ 2007-10-23  7:40 UTC (permalink / raw)
  To: michael
  Cc: Stephen Rothwell, linuxppc-dev, Paul Mackerras, sparclinux,
	David S. Miller
In-Reply-To: <1193125016.20274.4.camel@concordia>


> So Ben suggested what we really want is two routines,
> of_get_pci_dev_node() and of_peek_pci_dev_node() - the former returning
> a refcounted copy and the latter allowing you to "peek" at the
> device_node as long as you own the pci_dev.
> 
> I'm not sure it's worth the churn really, so we should probably just
> document that pci_device_to_OF_node() is contrary, and any users that
> need a reference can take one explicitly.

Yeah, I pretty much made the same decision a couple of years ago which
is why it's still the way it is now :-)

Cheers,
Ben.

^ permalink raw reply

* Re: [PATCH 2/2] Use of_get_pci_dev_node() in axon_msi.c
From: Michael Ellerman @ 2007-10-23  7:36 UTC (permalink / raw)
  To: Linas Vepstas
  Cc: Stephen Rothwell, linuxppc-dev, Paul Mackerras, sparclinux,
	David S. Miller
In-Reply-To: <20071018190939.GE29903@austin.ibm.com>

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


On Thu, 2007-10-18 at 14:09 -0500, Linas Vepstas wrote:
> On Thu, Oct 18, 2007 at 11:27:23AM +1000, Michael Ellerman wrote:
> > 
> > It does what pci_device_to_OF_node() does, but in the right way. 
> > 
> > The plan is to remove pci_device_to_OF_node() once all the callers have
> > been converted to properly handle the refcounting. 
> 
> Oh. Yes. well, of course, then. Excellent reason. I didn't get 
> that from the patch commit comments. So, FWIW:
> 
> Ack'ed-by: Linas Vepstas <linas@austin.ibm.com>

Thanks for the ACK. But on further consideration I'm going to NACK my
own patch :)

The reasoning being that a lot of the code that uses
pci_device_to_OF_node() only uses the device_node while it also holds a
reference to the pci_dev - so there's no possibility of the device_node
going away.

So Ben suggested what we really want is two routines,
of_get_pci_dev_node() and of_peek_pci_dev_node() - the former returning
a refcounted copy and the latter allowing you to "peek" at the
device_node as long as you own the pci_dev.

I'm not sure it's worth the churn really, so we should probably just
document that pci_device_to_OF_node() is contrary, and any users that
need a reference can take one explicitly.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: [microblaze-uclinux] Re: [microblaze-uclinux] RE: [PATCH v3] Device tree bindings for Xilinx devices
From: Michal Simek @ 2007-10-23  7:34 UTC (permalink / raw)
  To: David Gibson; +Cc: microblaze-uclinux, Wolfgang Reissnegger, linuxppc-dev
In-Reply-To: <20071023043443.GM31839@localhost.localdomain>

Hi David,
I remove some labels from my generator. I created fake system with some peripherals. 
There are 3 buses and 3 bridges. 
Can you check it and tell me what is wrong?

Thanks,
Michal Simek

/ {
	model = "mONStR";
	chosen {
		bootargs = "root=/dev/xsysace/disc0/part2";
	} ;
	cpus {
		#size-cells = <0>;
		#cpus = < 0 >;
		#address-cells = <1>;
		microblaze_0,5.00.c@0 {
			device_type = "cpu";
			reg = <0>;
			clock-frequency = <5f5e1000>;
			timebase-frequency = <1FCA055>;
			i-cache-line-size = <2000>;
			i-cache-size = <10>;
			d-cache-line-size = <2000>;
			d-cache-size = <10>;
			xilinx,pvr = <0>;
			xilinx,debug-enabled = <1>;
			xilinx,fsl-links = <0>;
		} ;
	} ;

	ethernet@10060000 {
		compatible = "opb_ethernet_1.04.a","opb_ethernet";
		interrupts = < 3 0 >;
		reg = < 10060000 10000 >;
		device_type = "network";
		xilinx,cam-exist = <0>;
		xilinx,dev-blk-id = <1>;
		xilinx,dev-mir-enable = <1>;
		xilinx,dma-present = <1>;
		xilinx,include-dev-pencoder = <1>;
		xilinx,ipif-rdfifo-depth = <8000>;
		xilinx,ipif-wrfifo-depth = <8000>;
		xilinx,mii-exist = <1>;
	} ;
	memory@20000000 {
		memreg:reg = < 20000000 10000000 >;
		device_type = "memory";
	} ;
	serial@10030000 {
		compatible = "opb_uart16550_1.00.d","opb_uart16550";
		reg = < 10030000 10000 >;
		device_type = "serial";
	} ;
	opb_timer@10020000 {
		compatible = "opb_timer_1.00.b","opb_timer";
		interrupts = < 0 0 >;
		reg = < 10020000 10000 >;
		xilinx,count-width = <20>;
		xilinx,one-timer-only = <0>;
	} ;
	opb_opb_lite@30000000 {
		ranges = < 0 30000000 10000000 >;
		opb_gpio@30020000 {
			compatible = "opb_gpio_3.01.b","opb_gpio";
			reg = < 30020000 10000 >;
			xilinx,gpio-width = <4>;
			xilinx,is-dual = <0>;
		} ;
		i2c@30030000 {
			compatible = "opb_iic_1.02.a","opb_iic";
			reg = < 30030000 10000 >;
			device_type = "i2c";
		} ;

		opb_gpio@30010000 {
			compatible = "opb_gpio_3.01.b","opb_gpio";
			reg = < 30010000 10000 >;
			xilinx,gpio-width = <20>;
			xilinx,is-dual = <0>;
		} ;
		ethernet@30040000 {
			compatible = "opb_ethernetlite_1.01.b","opb_ethernetlite";
			reg = < 30040000 10000 >;
			device_type = "network";
			xilinx,duplex = <1>;
			xilinx,rx-ping-pong = <0>;
			xilinx,tx-ping-pong = <0>;
		} ;
		opb_sysace@30050000 {
			compatible = "opb_sysace_1.00.c","opb_sysace";
			reg = < 30050000 10000 >;
			xilinx,mem-width = <10>;
		} ;
		opb_ps2_dual_ref@30060000 {
			compatible = "opb_ps2_dual_ref_1.00.a","opb_ps2_dual_ref";
			interrupts = < 2 0 >;
			interrupts = < 1 0 >;
			reg = < 30060000 10000 >;
		} ;
	};
	opb_intc@10010000 {
		compatible = "opb_intc_1.00.c","opb_intc";
		reg = < 10010000 10000 >;
	} ;
	opb_mdm@10050000 {
		compatible = "opb_mdm_2.00.a","opb_mdm";
		reg = < 10050000 10000 >;
		xilinx,mb-dbg-ports = <1>;
		xilinx,uart-width = <8>;
		xilinx,use-uart = <1>;
	} ;
	serial@10040000 {
		compatible = "opb_uartlite_1.00.b","opb_uartlite";
		interrupts = < 4 0 >;
		reg = < 10040000 10000 >;
		device_type = "serial";
		xilinx,baudrate = <2580>;
		xilinx,data-bits = <8>;
		xilinx,clk-freq = <5f5e100>;
		xilinx,odd-parity = <0>;
		xilinx,use-parity = <0>;
	} ;
	opb2plb_bridge@80000000 {
		ranges = < 0 80000000 80000000 >;
		serial@a0020000 {
			compatible = "plb_uart16550_1.00.c","plb_uart16550";
			reg = < a0020000 10000 >;
			device_type = "serial";
		} ;
		plb_gpio@a0010000 {
			compatible = "plb_gpio_1.00.b","plb_gpio";
			reg = < a0010000 10000 >;
			xilinx,gpio-width = <20>;
			xilinx,is-dual = <0>;
		} ;
		ethernet@a0000000 {
			compatible = "plb_ethernet_1.01.a","plb_ethernet";
			reg = < a0000000 10000 >;
			device_type = "network";
		} ;
		plb2opb_bridge@10000000 {
			ranges = < 0 10000000 10000000 >;
			ranges = < 1 20000000 10000000 >;
		};
		cpus {
			#size-cells = <0>;
			#cpus = < 1 >;
			#address-cells = <1>;
			ppc405_0,405@1 {
				device_type = "cpu";
				reg = <0>;
				clock-frequency = <5f5e1000>;
				timebase-frequency = <1FCA055>;
			} ;
		} ;
	};
} ;

^ permalink raw reply

* Re: powerpc: Fix fallout from sg_page() changes
From: Jens Axboe @ 2007-10-23  7:13 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev, mingo, torvalds, linux-kernel
In-Reply-To: <20071023040948.GA19699@lixom.net>

On Mon, Oct 22 2007, Olof Johansson wrote:
> Fix fallout from 18dabf473e15850c0dbc8ff13ac1e2806d542c15:
> 
> In file included from include/linux/dma-mapping.h:52,
>                  from drivers/base/dma-mapping.c:10:
> include/asm/dma-mapping.h: In function 'dma_map_sg':
> include/asm/dma-mapping.h:288: error: 'struct scatterlist' has no member named 'page'
> include/asm/dma-mapping.h:288: error: 'struct scatterlist' has no member named 'page'
> include/asm/dma-mapping.h:288: error: 'struct scatterlist' has no member named 'page'
> include/asm/dma-mapping.h:289: error: 'struct scatterlist' has no member named 'page'
> include/asm/dma-mapping.h:290: error: 'struct scatterlist' has no member named 'page'
> include/asm/dma-mapping.h: In function 'dma_sync_sg_for_cpu':
> include/asm/dma-mapping.h:331: error: 'struct scatterlist' has no member named 'page'
> 
> drivers/scsi/ps3rom.c: In function 'fetch_to_dev_buffer':
> drivers/scsi/ps3rom.c:150: error: 'struct scatterlist' has no member named 'page'

Applied.

-- 
Jens Axboe

^ permalink raw reply

* Re: IB/ehca: Fix sg_page() fallout
From: Jens Axboe @ 2007-10-23  7:12 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev, Joachim Fenkes, torvalds, linux-kernel
In-Reply-To: <20071023055439.GA22426@lixom.net>

On Tue, Oct 23 2007, Olof Johansson wrote:
> 
> More fallout from sg_page changes:
> 
> drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf_user1':
> drivers/infiniband/hw/ehca/ehca_mrmw.c:1779: error: 'struct scatterlist' has no member named 'page'
> drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_check_kpages_per_ate':
> drivers/infiniband/hw/ehca/ehca_mrmw.c:1835: error: 'struct scatterlist' has no member named 'page'
> drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf_user2':
> drivers/infiniband/hw/ehca/ehca_mrmw.c:1870: error: 'struct scatterlist' has no member named 'page'
> 
> 
> Signed-off-by: Olof Johansson <olof@lixom.net>
> 
> 
> ---
> 
> On Tue, Oct 23, 2007 at 07:05:12AM +0200, Jens Axboe wrote:
> > On Mon, Oct 22 2007, Olof Johansson wrote:
> > > More fallout from sg_page changes, found with powerpc allyesconfig:
> > > 
> > > drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf_user1':
> > > drivers/infiniband/hw/ehca/ehca_mrmw.c:1779: error: 'struct scatterlist' has no member named 'page'
> > > drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_check_kpages_per_ate':
> > > drivers/infiniband/hw/ehca/ehca_mrmw.c:1835: error: 'struct scatterlist' has no member named 'page'
> > > drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf_user2':
> > > drivers/infiniband/hw/ehca/ehca_mrmw.c:1870: error: 'struct scatterlist' has no member named 'page'
> > 
> > Thanks a lot Olof, applied both fixups!
> 
> I messed up the second fix. :( please replace with this.

No problem, applied.

-- 
Jens Axboe

^ permalink raw reply

* Re: [PATCH] Bugfix to commit 4f9a58d75bfe82ab2b8ba5b8506dfb190a267834
From: Olaf Hering @ 2007-10-23  6:37 UTC (permalink / raw)
  To: Grant Likely; +Cc: Paul Mackerras, Linus Torvalds, linux-kernel, linuxppc-dev
In-Reply-To: <20071022223737.21679.23812.stgit@trillian.cg.shawcable.net>

On Mon, Oct 22, Grant Likely wrote:

> Olaf, do I have the correct solution here?

Sure.

^ permalink raw reply

* Re: IB/ehca: Fix sg_page() fallout
From: Olof Johansson @ 2007-10-23  5:54 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linuxppc-dev, Joachim Fenkes, torvalds, linux-kernel
In-Reply-To: <20071023050512.GK16425@kernel.dk>


More fallout from sg_page changes:

drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf_user1':
drivers/infiniband/hw/ehca/ehca_mrmw.c:1779: error: 'struct scatterlist' has no member named 'page'
drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_check_kpages_per_ate':
drivers/infiniband/hw/ehca/ehca_mrmw.c:1835: error: 'struct scatterlist' has no member named 'page'
drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf_user2':
drivers/infiniband/hw/ehca/ehca_mrmw.c:1870: error: 'struct scatterlist' has no member named 'page'


Signed-off-by: Olof Johansson <olof@lixom.net>


---

On Tue, Oct 23, 2007 at 07:05:12AM +0200, Jens Axboe wrote:
> On Mon, Oct 22 2007, Olof Johansson wrote:
> > More fallout from sg_page changes, found with powerpc allyesconfig:
> > 
> > drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf_user1':
> > drivers/infiniband/hw/ehca/ehca_mrmw.c:1779: error: 'struct scatterlist' has no member named 'page'
> > drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_check_kpages_per_ate':
> > drivers/infiniband/hw/ehca/ehca_mrmw.c:1835: error: 'struct scatterlist' has no member named 'page'
> > drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf_user2':
> > drivers/infiniband/hw/ehca/ehca_mrmw.c:1870: error: 'struct scatterlist' has no member named 'page'
> 
> Thanks a lot Olof, applied both fixups!

I messed up the second fix. :( please replace with this.


-Olof


diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c
index da88738..ead7230 100644
--- a/drivers/infiniband/hw/ehca/ehca_mrmw.c
+++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c
@@ -1776,7 +1776,7 @@ static int ehca_set_pagebuf_user1(struct ehca_mr_pginfo *pginfo,
 	list_for_each_entry_continue(
 		chunk, (&(pginfo->u.usr.region->chunk_list)), list) {
 		for (i = pginfo->u.usr.next_nmap; i < chunk->nmap; ) {
-			pgaddr = page_to_pfn(chunk->page_list[i].page)
+			pgaddr = page_to_pfn(sg_page(&chunk->page_list[i]))
 				<< PAGE_SHIFT ;
 			*kpage = phys_to_abs(pgaddr +
 					     (pginfo->next_hwpage *
@@ -1832,7 +1832,7 @@ static int ehca_check_kpages_per_ate(struct scatterlist *page_list,
 {
 	int t;
 	for (t = start_idx; t <= end_idx; t++) {
-		u64 pgaddr = page_to_pfn(page_list[t].page) << PAGE_SHIFT;
+		u64 pgaddr = page_to_pfn(sg_page(&page_list[t])) << PAGE_SHIFT;
 		ehca_gen_dbg("chunk_page=%lx value=%016lx", pgaddr,
 			     *(u64 *)abs_to_virt(phys_to_abs(pgaddr)));
 		if (pgaddr - PAGE_SIZE != *prev_pgaddr) {
@@ -1867,7 +1867,7 @@ static int ehca_set_pagebuf_user2(struct ehca_mr_pginfo *pginfo,
 		chunk, (&(pginfo->u.usr.region->chunk_list)), list) {
 		for (i = pginfo->u.usr.next_nmap; i < chunk->nmap; ) {
 			if (nr_kpages == kpages_per_hwpage) {
-				pgaddr = ( page_to_pfn(chunk->page_list[i].page)
+				pgaddr = ( page_to_pfn(sg_page(&chunk->page_list[i]))
 					   << PAGE_SHIFT );
 				*kpage = phys_to_abs(pgaddr);
 				if ( !(*kpage) ) {

^ permalink raw reply related

* Re: IB/ehca: Fix sg_page() fallout
From: Jens Axboe @ 2007-10-23  5:05 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev, Joachim Fenkes, torvalds, linux-kernel
In-Reply-To: <20071023043148.GA20904@lixom.net>

On Mon, Oct 22 2007, Olof Johansson wrote:
> More fallout from sg_page changes, found with powerpc allyesconfig:
> 
> drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf_user1':
> drivers/infiniband/hw/ehca/ehca_mrmw.c:1779: error: 'struct scatterlist' has no member named 'page'
> drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_check_kpages_per_ate':
> drivers/infiniband/hw/ehca/ehca_mrmw.c:1835: error: 'struct scatterlist' has no member named 'page'
> drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf_user2':
> drivers/infiniband/hw/ehca/ehca_mrmw.c:1870: error: 'struct scatterlist' has no member named 'page'

Thanks a lot Olof, applied both fixups!

-- 
Jens Axboe

^ permalink raw reply

* Re: Problems with allyesconfig kernel build
From: Stephen Rothwell @ 2007-10-23  4:47 UTC (permalink / raw)
  To: Andrew Morton; +Cc: ppc-dev, amodra
In-Reply-To: <20071022211836.45a87a12.akpm@linux-foundation.org>

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

On Mon, 22 Oct 2007 21:18:36 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Tue, 23 Oct 2007 14:02:31 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > This was first noted with the -mm tree, but has now migrated into Linus'
> > tree.
> 
> Yeah, sorry, I didn't know what to do about that.  I'm not even sure which
> patch caused it.

Not your fault.

> What did we do which caused all this to start happening?

We just grew too big, probably :-(

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

^ permalink raw reply

* Re: [microblaze-uclinux] Re: [microblaze-uclinux] RE: [PATCH v3] Device tree bindings for Xilinx devices
From: David Gibson @ 2007-10-23  4:34 UTC (permalink / raw)
  To: Michal Simek
  Cc: linuxppc-dev, microblaze-uclinux, Wolfgang Reissnegger,
	Arnd Bergmann, Leonid
In-Reply-To: <1837.2996-6584-798350907-1193112476@seznam.cz>

On Tue, Oct 23, 2007 at 06:07:56AM +0200, Michal Simek wrote:
> >> In my opinion will be better generate only parameters which 
> >> you want not all.
> >> That smells with unusable parameters.
> >
> >In the long term, this may be true.  In the short term:
> >1) dtb size is not the key problem
> Yes of course
> >2) making sure that everything works is a key problem.
> >3) The code that generates the dts should be as simple as possible,
> >so that we can easily document what it does.
> Yes but you must document every parameter which your generate do. The better way is 
> document only parameters which you want use.
> 
> >In the long term, I'm all for optimizing the device tree that gets
> >built,
> >assuming that it appears to be a problem in real systems.
> We can optimize now. I made new version of my generator  u-boot_v3_00_a (monstr.eu)
> where you can simply add parameter which you want to use. 
> 
> If you want use any parameter add it. 
> For microblaze cpu - line 1184. 
> And for others peripherals lines 926-980. (The last parameter of function call).
> 
> Which parameters do you want for PPC405, Grant?
> 
> Regards,
> Michal Simek
> 
> This is example of generator.
> 
> / {
> 	model = "mONStR";

> 	chosen {
> 		linux,platform = <600>;

linux,platform is long obsolete.  Kill it.

> 		bootargs = "root=/dev/xsysace/disc0/part2";
> 	} ;
> 	cpus {
> 		#size-cells = <0>;
> 		#cpus = < 0 >;
> 		#address-cells = <1>;
> 		microblaze_0,5.00.c {

Still missing an @0 here.  

> 			32-bit;
> 			linux,boot-cpu;

32-bit and linux,boot-cpu are both obsolete (the first was never
specified anywhere) and should be removed.

> 			device_type = "cpu";
> 			reg = <0>;
> 			clock-frequency = <5f5e1000>;
> 			timebase-frequency = <1FCA055>;
> 			i-cache-line-size = <2000>;
> 			i-cache-size = <10>;
> 			d-cache-line-size = <2000>;
> 			d-cache-size = <10>;
> 			xilinx,pvr = <0>;
> 			xilinx,debug-enabled = <1>;
> 			xilinx,fsl-links = <0>;
> 		} ;
> 	} ;
> 
> 	opb_mdm@41400000 {
> 		compatible = "opb_mdm_2.00.a\0opb_mdm";

Please use the new "opb_mdm_2.00.a", "opb_mdm" syntax.

> 		name = "debug_module";

Don't create properties called 'name'.  In real OF the 'name' property
is a synonym for the node name without the @address part.  Although
it's possible to encode a name property in a flattened tree with a
different value, it's a bad idea since it will clash with the OF
notion of this property.  In Linux this will cause a collision when
the tree is unflattened.

We should probably fix dtc to reject this, in fact.

> 		reg = < 41400000 10000 >;
> 		device_type = "opb_mdm";

Get rid of all your device_type values, they're all bogus.  The only
devices which should have device_type at all are the ethernets and
maybe the uarts, and in these cases the values should be "network" and
"serial" respectively.

> 		xilinx,mb-dbg-ports = <1>;
> 		xilinx,uart-width = <8>;
> 		xilinx,use-uart = <1>;
> 	} ;
> 	opb_uartlite@40600000 {
> 		compatible = "opb_uartlite_1.00.b\0opb_uartlite";
> 		name = "RS232_Uart_1";
> 		interrupts = < 4 0 >;
> 		reg = < 40600000 10000 >;
> 		device_type = "opb_uartlite";
> 		xilinx,baudrate = <2580>;
> 		xilinx,data-bits = <8>;
> 		xilinx,clk-freq = <5f5e100>;
> 		xilinx,odd-parity = <0>;
> 		xilinx,use-parity = <0>;
> 	} ;
> 	opb_ethernet@40c00000 {

The generic names convention means this should be called
"ethernet@40c00000"


> 		compatible = "opb_ethernet_1.04.a\0opb_ethernet";
> 		name = "Ethernet_MAC";
> 		interrupts = < 3 0 >;
> 		reg = < 40c00000 10000 >;
> 		device_type = "opb_ethernet";
> 		xilinx,cam-exist = <0>;
> 		xilinx,dev-blk-id = <1>;
> 		xilinx,dev-mir-enable = <1>;
> 		xilinx,dma-present = <1>;
> 		xilinx,include-dev-pencoder = <1>;
> 		xilinx,ipif-rdfifo-depth = <8000>;
> 		xilinx,ipif-wrfifo-depth = <8000>;
> 		xilinx,mii-exist = <1>;
> 	} ;
> 	opb_sysace@41820000 {
> 		compatible = "opb_sysace_1.00.c\0opb_sysace";
> 		name = "SysACE_CompactFlash";
> 		reg = < 41820000 10000 >;
> 		device_type = "opb_sysace";
> 		xilinx,mem-width = <10>;
> 	} ;
> 	opb_gpio@40000000 {
> 		compatible = "opb_gpio_3.01.b\0opb_gpio";
> 		name = "LEDs_4Bit";
> 		reg = < 40000000 10000 >;
> 		device_type = "opb_gpio";
> 		xilinx,gpio-width = <4>;
> 		xilinx,is-dual = <0>;
> 	} ;
> 	memory@30000000 {
> 		edk_name = "DDR_256MB_32MX64_rank1_row13_col10_cl2_5";
> 		compatible = "opb_ddr";

The memory node shouldn't generally need a compatible property.  Note
that the RAM itself probably needs to be separate from the RAM
controller node, if such a thing exists.

> 		memreg:reg = < 30000000 10000000 >;
> 		device_type = "memory";
> 	} ;
> 	opb_ps2_dual_ref@7a400000 {
> 		compatible = "opb_ps2_dual_ref_1.00.a\0opb_ps2_dual_ref";
> 		name = "PS2_Ports";
> 		interrupts = < 2 0 >;
> 		interrupts = < 1 0 >;
> 		reg = < 7a400000 10000 >;
> 		device_type = "opb_ps2_dual_ref";
> 	} ;
> 	opb_timer@41c00000 {
> 		compatible = "opb_timer_1.00.b\0opb_timer";
> 		name = "opb_timer_1";
> 		interrupts = < 0 0 >;
> 		reg = < 41c00000 10000 >;
> 		device_type = "opb_timer";
> 		xilinx,count-width = <20>;
> 		xilinx,one-timer-only = <0>;
> 	} ;
> 	opb_intc@41200000 {
> 		compatible = "opb_intc_1.00.c\0opb_intc";
> 		name = "opb_intc_0";
> 		reg = < 41200000 10000 >;
> 		device_type = "opb_intc";
> 	} ;
> 	opb_uart16550@40400000 {

Should be named "serial@..."

> 		compatible = "opb_uart16550_1.00.d\0opb_uart16550";
> 		name = "opb_uart16550_0";
> 		reg = < 40400000 10000 >;
> 		device_type = "opb_uart16550";
> 	} ;
> 	opb_sysace@41800000 {
> 		compatible = "opb_sysace_1.00.c\0opb_sysace";
> 		name = "opb_sysace_0";
> 		reg = < 41800000 10000 >;
> 		device_type = "opb_sysace";
> 		xilinx,mem-width = <10>;
> 	} ;
> } ;

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* [PATCH 4/4] Uartlite: speed up console output
From: Grant Likely @ 2007-10-23  4:27 UTC (permalink / raw)
  To: paulus, linuxppc-dev; +Cc: David Gibson
In-Reply-To: <20071023042353.30309.93118.stgit@trillian.cg.shawcable.net>

From: Grant Likely <grant.likely@secretlab.ca>

Change the wait_tx routine to call cpu_relax() instead of udelay() to
reduce console output latency and test for the TXFULL bit instead of
TXEMPTY.  That way the FIFO doesn't need to by 100% flushed before
writing the next character.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 drivers/serial/uartlite.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index dfef83f..a85f2d3 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -329,12 +329,14 @@ static struct uart_ops ulite_ops = {
 static void ulite_console_wait_tx(struct uart_port *port)
 {
 	int i;
+	u8 val;
 
-	/* wait up to 10ms for the character(s) to be sent */
-	for (i = 0; i < 10000; i++) {
-		if (readb(port->membase + ULITE_STATUS) & ULITE_STATUS_TXEMPTY)
+	/* Spin waiting for TX fifo to have space available */
+	for (i = 0; i < 100000; i++) {
+		val = readb(port->membase + ULITE_STATUS);
+		if ((val & ULITE_STATUS_TXFULL) == 0)
 			break;
-		udelay(1);
+		cpu_relax();
 	}
 }
 

^ permalink raw reply related

* [PATCH 0/4] Misc patches for the 2.6.24 merge window
From: Grant Likely @ 2007-10-23  4:27 UTC (permalink / raw)
  To: paulus, linuxppc-dev; +Cc: David Gibson

Paulus,

Here is the last set of patches that I'd like to get in before Linus
slams the merge window shut.  They're pretty minor changes.  The wrapper
patches make it easier to debug and catch errors and David has already
okayed them.  There's a speedup on the uartlite driver, and then a chunk
of documentation for the Xilinx device tree bindings.

Josh, can you please ack or nack the documentation change?

Peter, any issues with the uartlite change?

Cheers,
g.

--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply

* [PATCH 2/4] bootwrapper: Bail from script if any command fails
From: Grant Likely @ 2007-10-23  4:27 UTC (permalink / raw)
  To: paulus, linuxppc-dev; +Cc: David Gibson
In-Reply-To: <20071023042353.30309.93118.stgit@trillian.cg.shawcable.net>

From: Grant Likely <grant.likely@secretlab.ca>

Add the 'set -e' command to the wrapper script so that if any command
fails then the script will automatically exit

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
---

 arch/powerpc/boot/wrapper |   27 ++++++++++-----------------
 1 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 347639c..5ae48f4 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -21,6 +21,9 @@
 #		(default ./arch/powerpc/boot)
 # -W dir	specify working directory for temporary files (default .)
 
+# Stop execution if any command fails
+set -e
+
 # Allow for verbose output
 if [ "$V" = 1 ]; then
     set -x
@@ -116,7 +119,7 @@ if [ -n "$dts" ]; then
     if [ -z "$dtb" ]; then
 	dtb="$platform.dtb"
     fi
-    dtc -O dtb -o "$dtb" -b 0 -V 16 "$dts" || exit 1
+    dtc -O dtb -o "$dtb" -b 0 -V 16 "$dts"
 fi
 
 if [ -z "$kernel" ]; then
@@ -287,23 +290,13 @@ ps3)
 
     rm -f "$object/otheros.bld"
 
-    msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
-        skip=$overlay_dest seek=$system_reset_kernel      \
-        count=$overlay_size bs=1 2>&1)
-
-    if [ $? -ne "0" ]; then
-       echo $msg
-       exit 1
-    fi
+    dd if="$ofile.bin" of="$ofile.bin" conv=notrunc   \
+        skip=$overlay_dest seek=$system_reset_kernel  \
+        count=$overlay_size bs=1
 
-    msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
-        skip=$system_reset_overlay seek=$overlay_dest     \
-        count=$overlay_size bs=1 2>&1)
-
-    if [ $? -ne "0" ]; then
-       echo $msg
-       exit 2
-    fi
+    dd if="$ofile.bin" of="$ofile.bin" conv=notrunc   \
+        skip=$system_reset_overlay seek=$overlay_dest \
+        count=$overlay_size bs=1
 
     gzip --force -9 --stdout "$ofile.bin" > "$object/otheros.bld"
     ;;

^ permalink raw reply related

* [PATCH 3/4] Device tree bindings for Xilinx devices
From: Grant Likely @ 2007-10-23  4:27 UTC (permalink / raw)
  To: paulus, linuxppc-dev; +Cc: David Gibson
In-Reply-To: <20071023042353.30309.93118.stgit@trillian.cg.shawcable.net>

From: Grant Likely <grant.likely@secretlab.ca>

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
---

 Documentation/powerpc/booting-without-of.txt |  261 ++++++++++++++++++++++++++
 1 files changed, 261 insertions(+), 0 deletions(-)

diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index a96e853..59df69d 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -52,6 +52,7 @@ Table of Contents
       i) Freescale QUICC Engine module (QE)
       j) CFI or JEDEC memory-mapped NOR flash
       k) Global Utilities Block
+      l) Xilinx IP cores
 
   VII - Specifying interrupt information for devices
     1) interrupts property
@@ -2242,6 +2243,266 @@ platforms are moved over to use the flattened-device-tree model.
 			   available.
 			   For Axon: 0x0000012a
 
+   l) Xilinx IP cores
+
+   The Xilinx EDK toolchain ships with a set of IP cores (devices) for use
+   in Xilinx Spartan and Virtex FPGAs.  The devices cover the whole range
+   of standard device types (network, serial, etc.) and miscellanious
+   devices (gpio, LCD, spi, etc).  Also, since these devices are
+   implemented within the fpga fabric every instance of the device can be
+   synthesised with different options that change the behaviour.
+
+   Each IP-core has a set of parameters which the FPGA designer can use to
+   control how the core is synthesized.  Historically, the EDK tool would
+   extract the device parameters relevant to device drivers and copy them
+   into an 'xparameters.h' in the form of #define symbols.  This tells the
+   device drivers how the IP cores are configured, but it requres the kernel
+   to be recompiled every time the FPGA bitstream is resynthesized.
+
+   The new approach is to export the parameters into the device tree and
+   generate a new device tree each time the FPGA bitstream changes.  The
+   parameters which used to be exported as #defines will now become
+   properties of the device node.  In general, device nodes for IP-cores
+   will take the following form:
+
+	(name)@(base-address) {
+		compatible = "xlnx,(ip-core-name)-(HW_VER)"
+			     [, (list of compatible devices), ...];
+		reg = <(baseaddr) (size)>;
+		interrupt-parent = <&interrupt-controller-phandle>;
+		interrupts = < ... >;
+		xlnx,(parameter1) = "(string-value)";
+		xlnx,(parameter2) = <(int-value)>;
+	};
+
+	(ip-core-name):	the name of the ip block (given after the BEGIN
+			directive in system.mhs).  Should be in lowercase
+			and all underscores '_' converted to dashes '-'.
+	(name):		is derived from the "PARAMETER INSTANCE" value.
+	(parameter#):	C_* parameters from system.mhs.  The C_ prefix is
+			dropped from the parameter name, the name is converted
+			to lowercase and all underscore '_' characters are
+			converted to dashes '-'.
+	(baseaddr):	the C_BASEADDR parameter.
+	(HW_VER):	from the HW_VER parameter.
+	(size):		equals C_HIGHADDR - C_BASEADDR + 1
+
+   Typically, the compatible list will include the exact IP core version
+   followed by an older IP core version which implements the same
+   interface or any other device with the same interface.
+
+   'reg', 'interrupt-parent' and 'interrupts' are all optional properties.
+
+   For example, the following block from system.mhs:
+
+	BEGIN opb_uartlite
+		PARAMETER INSTANCE = opb_uartlite_0
+		PARAMETER HW_VER = 1.00.b
+		PARAMETER C_BAUDRATE = 115200
+		PARAMETER C_DATA_BITS = 8
+		PARAMETER C_ODD_PARITY = 0
+		PARAMETER C_USE_PARITY = 0
+		PARAMETER C_CLK_FREQ = 50000000
+		PARAMETER C_BASEADDR = 0xEC100000
+		PARAMETER C_HIGHADDR = 0xEC10FFFF
+		BUS_INTERFACE SOPB = opb_7
+		PORT OPB_Clk = CLK_50MHz
+		PORT Interrupt = opb_uartlite_0_Interrupt
+		PORT RX = opb_uartlite_0_RX
+		PORT TX = opb_uartlite_0_TX
+		PORT OPB_Rst = sys_bus_reset_0
+	END
+
+   becomes the following device tree node:
+
+	opb-uartlite-0@ec100000 {
+		device_type = "serial";
+		compatible = "xlnx,opb-uartlite-1.00.b";
+		reg = <ec100000 10000>;
+		interrupt-parent = <&opb-intc>;
+		interrupts = <1 0>; // got this from the opb_intc parameters
+		current-speed = <d#115200>;	// standard serial device prop
+		clock-frequency = <d#50000000>;	// standard serial device prop
+		xlnx,data-bits = <8>;
+		xlnx,odd-parity = <0>;
+		xlnx,use-parity = <0>;
+	};
+
+   Some IP cores actually implement 2 or more logical devices.  In this case,
+   the device should still describe the whole IP core with a single node
+   and add a child node for each logical device.  The ranges property can
+   be used to translate from parent IP-core to the registers of each device.
+   (Note: this makes the assumption that both logical devices have the same
+   bus binding.  If this is not true, then separate nodes should be used for
+   each logical device).  The 'cell-index' property can be used to enumerate
+   logical devices within an IP core.  For example, the following is the
+   system.mhs entry for the dual ps2 controller found on the ml403 reference
+   design.
+
+	BEGIN opb_ps2_dual_ref
+		PARAMETER INSTANCE = opb_ps2_dual_ref_0
+		PARAMETER HW_VER = 1.00.a
+		PARAMETER C_BASEADDR = 0xA9000000
+		PARAMETER C_HIGHADDR = 0xA9001FFF
+		BUS_INTERFACE SOPB = opb_v20_0
+		PORT Sys_Intr1 = ps2_1_intr
+		PORT Sys_Intr2 = ps2_2_intr
+		PORT Clkin1 = ps2_clk_rx_1
+		PORT Clkin2 = ps2_clk_rx_2
+		PORT Clkpd1 = ps2_clk_tx_1
+		PORT Clkpd2 = ps2_clk_tx_2
+		PORT Rx1 = ps2_d_rx_1
+		PORT Rx2 = ps2_d_rx_2
+		PORT Txpd1 = ps2_d_tx_1
+		PORT Txpd2 = ps2_d_tx_2
+	END
+
+   It would result in the following device tree nodes:
+
+	opb_ps2_dual_ref_0@a9000000 {
+		ranges = <0 a9000000 2000>;
+		// If this device had extra parameters, then they would
+		// go here.
+		ps2@0 {
+			compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
+			reg = <0 40>;
+			interrupt-parent = <&opb-intc>;
+			interrupts = <3 0>;
+			cell-index = <0>;
+		};
+		ps2@1000 {
+			compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
+			reg = <1000 40>;
+			interrupt-parent = <&opb-intc>;
+			interrupts = <3 0>;
+			cell-index = <0>;
+		};
+	};
+
+   Also, the system.mhs file defines bus attachments from the processor
+   to the devices.  The device tree structure should reflect the bus
+   attachments.  Again an example; this system.mhs fragment:
+
+	BEGIN ppc405_virtex4
+		PARAMETER INSTANCE = ppc405_0
+		PARAMETER HW_VER = 1.01.a
+		BUS_INTERFACE DPLB = plb_v34_0
+		BUS_INTERFACE IPLB = plb_v34_0
+	END
+
+	BEGIN opb_intc
+		PARAMETER INSTANCE = opb_intc_0
+		PARAMETER HW_VER = 1.00.c
+		PARAMETER C_BASEADDR = 0xD1000FC0
+		PARAMETER C_HIGHADDR = 0xD1000FDF
+		BUS_INTERFACE SOPB = opb_v20_0
+	END
+
+	BEGIN opb_uart16550
+		PARAMETER INSTANCE = opb_uart16550_0
+		PARAMETER HW_VER = 1.00.d
+		PARAMETER C_BASEADDR = 0xa0000000
+		PARAMETER C_HIGHADDR = 0xa0001FFF
+		BUS_INTERFACE SOPB = opb_v20_0
+	END
+
+	BEGIN plb_v34
+		PARAMETER INSTANCE = plb_v34_0
+		PARAMETER HW_VER = 1.02.a
+	END
+
+	BEGIN plb_bram_if_cntlr
+		PARAMETER INSTANCE = plb_bram_if_cntlr_0
+		PARAMETER HW_VER = 1.00.b
+		PARAMETER C_BASEADDR = 0xFFFF0000
+		PARAMETER C_HIGHADDR = 0xFFFFFFFF
+		BUS_INTERFACE SPLB = plb_v34_0
+	END
+
+	BEGIN plb2opb_bridge
+		PARAMETER INSTANCE = plb2opb_bridge_0
+		PARAMETER HW_VER = 1.01.a
+		PARAMETER C_RNG0_BASEADDR = 0x20000000
+		PARAMETER C_RNG0_HIGHADDR = 0x3FFFFFFF
+		PARAMETER C_RNG1_BASEADDR = 0x60000000
+		PARAMETER C_RNG1_HIGHADDR = 0x7FFFFFFF
+		PARAMETER C_RNG2_BASEADDR = 0x80000000
+		PARAMETER C_RNG2_HIGHADDR = 0xBFFFFFFF
+		PARAMETER C_RNG3_BASEADDR = 0xC0000000
+		PARAMETER C_RNG3_HIGHADDR = 0xDFFFFFFF
+		BUS_INTERFACE SPLB = plb_v34_0
+		BUS_INTERFACE MOPB = opb_v20_0
+	END
+
+   Gives this device tree (some properties removed for clarity):
+
+	plb-v34-0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		device_type = "ibm,plb";
+		ranges; // 1:1 translation
+
+		plb-bram-if-cntrl-0@ffff0000 {
+			reg = <ffff0000 10000>;
+		}
+
+		opb-v20-0 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <20000000 20000000 20000000
+				  60000000 60000000 20000000
+				  80000000 80000000 40000000
+				  c0000000 c0000000 20000000>;
+
+			opb-uart16550-0@a0000000 {
+				reg = <a00000000 2000>;
+			};
+
+			opb-intc-0@d1000fc0 {
+				reg = <d1000fc0 20>;
+			};
+		};
+	};
+
+   That covers the general approach to binding xilinx IP cores into the
+   device tree.  The following are bindings for specific devices:
+
+      i) Xilinx ML300 Framebuffer
+
+      Simple framebuffer device from the ML300 reference design (also on the
+      ML403 reference design as well as others).
+
+      Optional properties:
+       - resolution = <xres yres> : pixel resolution of framebuffer.  Some
+                                    implementations use a different resolution.
+                                    Default is <d#640 d#480>
+       - virt-resolution = <xvirt yvirt> : Size of framebuffer in memory.
+                                           Default is <d#1024 d#480>.
+       - rotate-display (empty) : rotate display 180 degrees.
+
+      ii) Xilinx SystemACE
+
+      The Xilinx SystemACE device is used to program FPGAs from an FPGA
+      bitstream stored on a CF card.  It can also be used as a generic CF
+      interface device.
+
+      Optional properties:
+       - 8-bit (empty) : Set this property for SystemACE in 8 bit mode
+
+      iii) Xilinx EMAC and Xilinx TEMAC
+
+      Xilinx Ethernet devices.  In addition to general xilinx properties
+      listed above, nodes for these devices should include a phy-handle
+      property, and may include other common network device properties
+      like local-mac-address.
+      
+      iv) Xilinx Uartlite
+
+      Xilinx uartlite devices are simple fixed speed serial ports.
+
+      Requred properties:
+       - current-speed : Baud rate of uartlite
+
    More devices will be defined as this spec matures.
 
 VII - Specifying interrupt information for devices

^ permalink raw reply related

* [PATCH 1/4] bootwrapper: Allow wrapper script to execute verbosely
From: Grant Likely @ 2007-10-23  4:27 UTC (permalink / raw)
  To: paulus, linuxppc-dev; +Cc: David Gibson
In-Reply-To: <20071023042353.30309.93118.stgit@trillian.cg.shawcable.net>

From: Grant Likely <grant.likely@secretlab.ca>

Allow wrapper script to print verbose progress when the V is set in the
environment.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
---

 arch/powerpc/boot/wrapper |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 39b27e5..347639c 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -21,6 +21,11 @@
 #		(default ./arch/powerpc/boot)
 # -W dir	specify working directory for temporary files (default .)
 
+# Allow for verbose output
+if [ "$V" = 1 ]; then
+    set -x
+fi
+
 # defaults
 kernel=
 ofile=zImage

^ permalink raw reply related

* IB/ehca: Fix sg_page() fallout
From: Olof Johansson @ 2007-10-23  4:31 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linuxppc-dev, Joachim Fenkes, torvalds, linux-kernel
In-Reply-To: <20071023040948.GA19699@lixom.net>

More fallout from sg_page changes, found with powerpc allyesconfig:

drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf_user1':
drivers/infiniband/hw/ehca/ehca_mrmw.c:1779: error: 'struct scatterlist' has no member named 'page'
drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_check_kpages_per_ate':
drivers/infiniband/hw/ehca/ehca_mrmw.c:1835: error: 'struct scatterlist' has no member named 'page'
drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf_user2':
drivers/infiniband/hw/ehca/ehca_mrmw.c:1870: error: 'struct scatterlist' has no member named 'page'


Signed-off-by: Olof Johansson <olof@lixom.net>

diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c
index da88738..a3037f3 100644
--- a/drivers/infiniband/hw/ehca/ehca_mrmw.c
+++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c
@@ -1776,7 +1776,7 @@ static int ehca_set_pagebuf_user1(struct ehca_mr_pginfo *pginfo,
 	list_for_each_entry_continue(
 		chunk, (&(pginfo->u.usr.region->chunk_list)), list) {
 		for (i = pginfo->u.usr.next_nmap; i < chunk->nmap; ) {
-			pgaddr = page_to_pfn(chunk->page_list[i].page)
+			pgaddr = page_to_pfn(sg_page(chunk->page_list[i]))
 				<< PAGE_SHIFT ;
 			*kpage = phys_to_abs(pgaddr +
 					     (pginfo->next_hwpage *
@@ -1832,7 +1832,7 @@ static int ehca_check_kpages_per_ate(struct scatterlist *page_list,
 {
 	int t;
 	for (t = start_idx; t <= end_idx; t++) {
-		u64 pgaddr = page_to_pfn(page_list[t].page) << PAGE_SHIFT;
+		u64 pgaddr = page_to_pfn(sg_page(page_list[t])) << PAGE_SHIFT;
 		ehca_gen_dbg("chunk_page=%lx value=%016lx", pgaddr,
 			     *(u64 *)abs_to_virt(phys_to_abs(pgaddr)));
 		if (pgaddr - PAGE_SIZE != *prev_pgaddr) {
@@ -1867,7 +1867,7 @@ static int ehca_set_pagebuf_user2(struct ehca_mr_pginfo *pginfo,
 		chunk, (&(pginfo->u.usr.region->chunk_list)), list) {
 		for (i = pginfo->u.usr.next_nmap; i < chunk->nmap; ) {
 			if (nr_kpages == kpages_per_hwpage) {
-				pgaddr = ( page_to_pfn(chunk->page_list[i].page)
+				pgaddr = ( page_to_pfn(sg_page(chunk->page_list[i]))
 					   << PAGE_SHIFT );
 				*kpage = phys_to_abs(pgaddr);
 				if ( !(*kpage) ) {

^ permalink raw reply related

* [PATCH] Read back MSI message in rtas_setup_msi_irqs() so restore works
From: Michael Ellerman @ 2007-10-23  4:23 UTC (permalink / raw)
  To: Paul Mackerras
  Cc: netdev, mcarlson, linuxppc-dev, mchan, linux-pci, David S. Miller

There are plans afoot to use pci_restore_msi_state() to restore MSI
state after a device reset. In order for this to work for the RTAS MSI
backend, we need to read back the MSI message from config space after
it has been setup by firmware.

This should be sufficient for restoring the MSI state after a device
reset, however we will need to revisit this for suspend to disk if that
is ever implemented on pseries.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---

Linas, can you test this on your setup with your EEH stuff? I haven't got
any MSI supporting hardware/firmware combination.


 arch/powerpc/platforms/pseries/msi.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
index 2793a1b..f15222b 100644
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -171,6 +171,7 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
 	struct pci_dn *pdn;
 	int hwirq, virq, i, rc;
 	struct msi_desc *entry;
+	struct msi_msg msg;
 
 	pdn = get_pdn(pdev);
 	if (!pdn)
@@ -213,6 +214,11 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
 
 		dev_dbg(&pdev->dev, "rtas_msi: allocated virq %d\n", virq);
 		set_irq_msi(virq, entry);
+
+		/* Read config space back so we can restore after reset */
+		read_msi_msg(virq, &msg);
+		entry->msg = msg;
+
 		unmask_msi_irq(virq);
 	}
 
-- 
1.5.1.3.g7a33b

^ permalink raw reply related

* Please pull powerpc.git merge branch
From: Paul Mackerras @ 2007-10-23  4:21 UTC (permalink / raw)
  To: torvalds; +Cc: linuxppc-dev

Linus,

Please do

git pull \
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git merge

to get a commit that adds Vitaly Bordug as a maintainer for the
powerpc embedded 8xx processors.  This is something that Marcelo asked
me to push ages ago, but it kept falling through the cracks.

Thanks,
Paul.

 MAINTAINERS |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Marcelo Tosatti (1):
      [POWERPC] Add Vitaly Bordug as PPC8xx maintainer

^ permalink raw reply

* Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function
From: Michael Ellerman @ 2007-10-23  4:20 UTC (permalink / raw)
  To: Linas Vepstas
  Cc: netdev, mcarlson, linuxppc-dev list, mchan, linux-pci,
	David Miller
In-Reply-To: <20071022181336.GC4280@austin.ibm.com>

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


On Mon, 2007-10-22 at 13:13 -0500, Linas Vepstas wrote:
> On Mon, Oct 22, 2007 at 11:49:24AM +1000, Michael Ellerman wrote:
> > 
> > On pseries there's a chance it will work for PCI error recovery, but if
> > so it's just lucky that firmware has left everything configured the same
> > way. 
> 
> ? The papr is quite clear that i is up to the OS to restore the msi
> state after an eeh error.

Perhaps. I see R1-7.3.10.5.1-10, which says we should restore the config
space after a reset operation, but after an isolate/unisolate we must
recall RTAS. I thought EEH was doing the isolate/unisolate, but if it's
just a reset then just blatting the config space back should work.

> > Yes I think so. That way we can properly reconfigure via the firmware
> > interface. The other option would be to design some new arch hook to do
> > resume, but just doing a disable/enable seems simpler to me.
> 
> Err, If you read the code for suspend/resume, it never actually calls
> disable/enable (and thus doesn't go to the firmware); it calls 
> restore_msi_state() function!

I know. That was a proposed solution, to explicitly call disable/enable
instead of restore_msi_state().

> If suspend/resume needs to call firmware to restore the state, then,
> at the moment, suspend/resume is broken.  As I mentioned earlier,
> I presumed that no powerpc laptops currently use msi-enabled devices,
> as otherwise, this would have been flushed out.

On _pseries_ suspend/resume with MSI is broken. The other powerpc
platforms that implement MSI should be fine, although I don't think
anyone's tested them, because they're not laptops and so suspend/resume
is not that interesting.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: Problems with allyesconfig kernel build
From: Andrew Morton @ 2007-10-23  4:18 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: ppc-dev, amodra
In-Reply-To: <20071023140231.12698d1c.sfr@canb.auug.org.au>

On Tue, 23 Oct 2007 14:02:31 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> This was first noted with the -mm tree, but has now migrated into Linus'
> tree.

Yeah, sorry, I didn't know what to do about that.  I'm not even sure which
patch caused it.

>  An allyesconfig build dies in the link stage like this:
> 
> /usr/bin/ld: arch/powerpc/kernel/head_64.o(.text+0x80c8): sibling call optimization to `.text.init.refok' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `.text.init.refok' extern
> /usr/bin/ld: arch/powerpc/kernel/head_64.o(.text+0x8160): sibling call optimization to `.text.init.refok' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `.text.init.refok' extern
> /usr/bin/ld: arch/powerpc/kernel/head_64.o(.text+0x81c4): sibling call optimization to `.text.init.refok' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `.text.init.refok' extern
> /usr/bin/ld: final link failed: Bad value
> 
> We already compile with -mminimal-toc and adding
> -fno-optimize-sibling-call did not help.
> 
> Intuiting the obvious, I changed all the _INIT_STATIC and _INIT_GLOBAL
> uses in head_64.S back to _STATIC and _GLOBAL (which just moves the code
> from .text.init.refok to .text).  Now the linker segfaults instead.  :-)
> 
> /bin/sh: line 1:  5260 Segmentation fault      ld -m elf64ppc -Bstatic --emit-relocs --build-id -o .tmp_vmlinux1 -T arch/powerpc/kernel/vmlinux.lds arch/powerpc/kernel/head_64.o arch/powerpc/kernel/entry_64.o arch/powerpc/kernel/fpu.o init/built-in.o --start-group usr/built-in.o arch/powerpc/kernel/built-in.o arch/powerpc/mm/built-in.o arch/powerpc/lib/built-in.o arch/powerpc/sysdev/built-in.o arch/powerpc/platforms/built-in.o arch/powerpc/xmon/built-in.o kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a lib/built-in.o drivers/built-in.o sound/built-in.o arch/powerpc/oprofile/built-in.o net/built-in.o --end-group
> make[1]: *** [.tmp_vmlinux1] Error 139
> 
> $ ld --version
> GNU ld (GNU Binutils for Debian) 2.18
> 
> I take this as an improvement :-)
> 
> We link .text.init.refok immediately after .text, but with
> allyesconfig, .text ends up very large.
> 
> The --emit-relocs is a product of something else I am working on.  So I
> took that out and now get a whole lot more messages like:
> 
> /usr/bin/ld: net/built-in.o(.fixup+0x4): sibling call optimization to `.text' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `.text' extern
> /usr/bin/ld: net/built-in.o(.fixup+0xc): sibling call optimization to `.text' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `.text' extern
> 
> Anyone have any ideas?

I still don't know ;)

What did we do which caused all this to start happening?

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox