* Re: [PATCH] irq: move some interrupt arch_* functions into struct irq_chip.
From: Michael Ellerman @ 2010-03-10 22:07 UTC (permalink / raw)
To: ijc
Cc: Jeremy Fitzhardinge, Ian Campbell, x86, linux-kernel,
linuxppc-dev, Ingo Molnar, Paul Mackerras, Eric W. Biederman,
H. Peter Anvin, Thomas Gleixner, Yinghai Lu
In-Reply-To: <1268218559-26784-2-git-send-email-ijc@hellion.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]
On Wed, 2010-03-10 at 10:55 +0000, ijc@hellion.org.uk wrote:
> From: Ian Campbell <ian.campbell@citrix.com>
>
> Move arch_init_copy_chip_data and arch_free_chip_data into function
> pointers in struct irq_chip since they operate on irq_desc->chip_data.
>
> arch_init_chip_data cannot be moved into struct irq_chip at this time
> because irq_desc->chip is not known at the time the irq_desc is
> setup. For now rename arch_init_chip_data to arch_init_irq_desc (for
> PowerPC, the only other user, whose usage better matches the new name)
> and on x86 convert arch_init_chip_data to ioapic_init_chip_data and
> call this whenever the IO APIC code allocates a new IRQ.
Ack on the name change, it should be called arch_init_irq_desc(), the
existing name clearly comes from the fact that sparse IRQ was
implemented first on x86, and on x86 that routine init's the chip data
for a new irq_desc.
But semantically arch_init_irq_desc() is the right name, I was just too
lazy to change it when I enabled sparse IRQ for powerpc.
Can't comment on the rest of the patch.
cheers
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* Re: 5200B: BUG in 2.6.34-rc1-dirty while loading at24 driver
From: Wolfram Sang @ 2010-03-11 0:32 UTC (permalink / raw)
To: Albrecht Dreß; +Cc: Linux PPC Development
In-Reply-To: <1268245563.2375.0@antares>
[-- Attachment #1: Type: text/plain, Size: 462 bytes --]
Hi Albrecht,
> not sure if this is the right place to ask: When I boot a custom 5200B (more
Check MAINTAINERS for AT24 ;)
> or less Lite-based) board with Linus' git tree (2.6.34-rc1-dirty), I always
> get the following bug:
Will send a patch in some minutes...
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* Need help with using the BDI2K to debug exception handlers
From: Bruce_Leonard @ 2010-03-11 1:27 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 3275 bytes --]
Hi all,
Okay, I'm putting on my asbestos underwear and hoping I don't sound too
stupid. Here's my sitch: we're seeing an illegal instruction exception,
but the tracks our diagnostic code we put into the kernel
program_check_exception() function claims the instruction is perfectly
good. So I want to use the BDI to set a BP in the program exception and
poke around at a HW level rather than a SW level that has gone through an
unknown number of context switches.
Now I know that using the BDI in exceptions is hard to do for lots of
reasons, first and foremost among them being the fact that the BDI uses
SRR0/1 for it's own purposes. I've been down this path before and know
there's problems. But what I'm seeing is even stranger than usual.
I've replaced the program exception code in arch/powerpc/kernel/head_32.S
with the following:
. = 0x700
ProgramCheck:
mtspr SPRN_SPRG1,r9
mtspr SPRN_SPRG2,r10
mtspr SPRN_SPRG7,r3
mfspr r9,SPRN_SRR0
mfspr r10,SPRN_SRR1
andis. r3,r10,0x0008 /* is it an illegal instruction?
*/
beq 1f /* no so continue */
2: xor r3,r3,r3 /* dummy instruction */
b 2b /* loop forever */
1: mfspr r10,SPRN_SPRG2
mfspr r9,SPRN_SPRG1
EXCEPTION_PROLOG;
addi r3,r1,STACK_FRAME_OVERHEAD;
EXC_XFER_STD(0x700, program_check_exception);
(Before everyone flames me, yes I know there's a bug, I didn't restore r3
before continuing to the program_check_exception; it's immaterial to the
problem at hand because I don't really care if I ever successfully get
into program_check_exception.) The purpose of all this is to save SRR0/1
into GPRs so the BDI doesn't whack them, check to see if the exception is
being call because of an illegal instruction, continue on if not, and
provide a place to hang a breakpoint if it is an illegal instruction. So
I load up this code, connect to the BDI, set a HW BP on the branch
instruction following the line labeled '2', tell it to go and sit back to
wait.
Eventually our problem occurs and the BDI says "TARGET: stopped" or some
such, indicating it's hit the breakpoint. This is where things get
strange and I need help. At this point the BDI output from the telnet
session says the debug entry cause is <unknown 0> and the current PC is
0x6fc, one instruction before the program exception. When I dump the
registers r9 and r10 contain nothing the even remotely resemble SRR0/1.
The link register contains a valid _physical_ address (though I would
expect it to contain a virtual address from the last 'bl' instruction) but
when I dump the memory pointed to by LR it contains all zeros, not PPC
machine code. It looks like my code isn't even running even though it
seems I've hit the breakpoint. It's almost as if the BDI recognizes I'm
entering an exception that I've set a BP in and halts just before
executing the exception code. I'm not sure I believe it, but that's how
it appears.
Has anyone seen this or have any suggestion on how I can get the BDI to
quit 'helping' me and just stop where I tell it to in an exception
handler?
Thanks
Bruce
[-- Attachment #2: Type: text/html, Size: 5229 bytes --]
^ permalink raw reply
* PowerPC 85xx board are caused die by Commit: 864b9e6fd76489aab422bac62162f57c52e06ed8(powerpc: Use lwarx/ldarx hint in bit locks)
From: Andrew Liu @ 2010-03-11 3:20 UTC (permalink / raw)
To: Anton Blanchard; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1060 bytes --]
Hi Guys:
I have done several experiments on fsl_8548cds and fsl_p2020rdb, pinpointed
the commit: 864b9e6fd76489aab422bac62162f57c52e06ed8(powerpc: Use
lwarx/ldarx hint in bit locks) cause the bootup stalledd.
"
Filename 'fsl_8548cds/uImage'.
Load address: 0x1000000
Loading: #################################################################
#######################################
done
Bytes transferred = 1526546 (174b12 hex)
Speed: 100, full duplex
Using eTSEC0 device
Filename 'sliu/fsl_8548cds/mpc8548cds.dtb'.
Load address: 0xc00000
Loading: #
done
Bytes transferred = 9993 (2709 hex)
## Booting image at 01000000 ...
Image Name: Linux-2.6.34-rc1-00005-g522dba7
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 1526482 Bytes = 1.5 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Booting using the fdt at 0xc00000
Loading Device Tree to 007fb000, end 007fd708 ... OK
"
I guess all 85xx or booke board has this issue.
Thanks
Andrew
[-- Attachment #2: Type: text/html, Size: 1196 bytes --]
^ permalink raw reply
* Re: PowerPC 85xx board are caused die by Commit: 864b9e6fd76489aab422bac62162f57c52e06ed8(powerpc: Use lwarx/ldarx hint in bit locks)
From: Kumar Gala @ 2010-03-11 5:20 UTC (permalink / raw)
To: Andrew Liu; +Cc: linuxppc-dev, Anton Blanchard
In-Reply-To: <54d399751003101920j598de9fdkd7c8617c8e4fa191@mail.gmail.com>
On Mar 10, 2010, at 9:20 PM, Andrew Liu wrote:
> Hi Guys:
> I have done several experiments on fsl_8548cds and fsl_p2020rdb, =
pinpointed the commit: 864b9e6fd76489aab422bac62162f57c52e06ed8(powerpc: =
Use lwarx/ldarx hint in bit locks) cause the bootup stalledd.
>=20
> "
> Filename 'fsl_8548cds/uImage'.
> Load address: 0x1000000
> Loading: =
#################################################################
> #######################################
> done
> Bytes transferred =3D 1526546 (174b12 hex)
> Speed: 100, full duplex
> Using eTSEC0 device
> Filename 'sliu/fsl_8548cds/mpc8548cds.dtb'.
> Load address: 0xc00000
> Loading: #
> done
> Bytes transferred =3D 9993 (2709 hex)
> ## Booting image at 01000000 ...
> Image Name: Linux-2.6.34-rc1-00005-g522dba7
> Image Type: PowerPC Linux Kernel Image (gzip compressed)
> Data Size: 1526482 Bytes =3D 1.5 MB
> Load Address: 00000000
> Entry Point: 00000000
> Verifying Checksum ... OK
> Uncompressing Kernel Image ... OK
> Booting using the fdt at 0xc00000
> Loading Device Tree to 007fb000, end 007fd708 ... OK
> "
> =20
> I guess all 85xx or booke board has this issue.
that's very odd since __PPC_EH should be ignored on PPC32 and thus 85xx.
- k=
^ permalink raw reply
* [PATCH] powerpc/85xx: Make sure lwarx hint isn't set on ppc32
From: Kumar Gala @ 2010-03-11 5:39 UTC (permalink / raw)
To: linuxppc-dev
e500v1/v2 based chips will treat any reserved field being set in an
opcode as illegal. Thus always setting the hint in the opcode is
a bad idea.
Anton should be kept away from the powerpc opcode map.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/include/asm/ppc-opcode.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h
index aea7147..d553bbe 100644
--- a/arch/powerpc/include/asm/ppc-opcode.h
+++ b/arch/powerpc/include/asm/ppc-opcode.h
@@ -25,7 +25,7 @@
#define PPC_INST_LDARX 0x7c0000a8
#define PPC_INST_LSWI 0x7c0004aa
#define PPC_INST_LSWX 0x7c00042a
-#define PPC_INST_LWARX 0x7c000029
+#define PPC_INST_LWARX 0x7c000028
#define PPC_INST_LWSYNC 0x7c2004ac
#define PPC_INST_LXVD2X 0x7c000698
#define PPC_INST_MCRXR 0x7c000400
@@ -62,8 +62,8 @@
#define __PPC_T_TLB(t) (((t) & 0x3) << 21)
#define __PPC_WC(w) (((w) & 0x3) << 21)
/*
- * Only use the larx hint bit on 64bit CPUs. Once we verify it doesn't have
- * any side effects on all 32bit processors, we can do this all the time.
+ * Only use the larx hint bit on 64bit CPUs. e500v1/v2 based CPUs will treat a
+ * larx with EH set as an illegal instruction.
*/
#ifdef CONFIG_PPC64
#define __PPC_EH(eh) (((eh) & 0x1) << 0)
--
1.6.0.6
^ permalink raw reply related
* Re: PowerPC 85xx board are caused die by Commit: 864b9e6fd76489aab422bac62162f57c52e06ed8(powerpc: Use lwarx/ldarx hint in bit locks)
From: Kumar Gala @ 2010-03-11 5:39 UTC (permalink / raw)
To: Kumar Gala; +Cc: Andrew Liu, Anton Blanchard, linuxppc-dev
In-Reply-To: <BCD4C354-E29A-4514-BB04-CFE92BFBC28A@kernel.crashing.org>
On Mar 10, 2010, at 11:20 PM, Kumar Gala wrote:
>=20
> On Mar 10, 2010, at 9:20 PM, Andrew Liu wrote:
>=20
>> Hi Guys:
>> I have done several experiments on fsl_8548cds and fsl_p2020rdb, =
pinpointed the commit: 864b9e6fd76489aab422bac62162f57c52e06ed8(powerpc: =
Use lwarx/ldarx hint in bit locks) cause the bootup stalledd.
>>=20
>> "
>> Filename 'fsl_8548cds/uImage'.
>> Load address: 0x1000000
>> Loading: =
#################################################################
>> #######################################
>> done
>> Bytes transferred =3D 1526546 (174b12 hex)
>> Speed: 100, full duplex
>> Using eTSEC0 device
>> Filename 'sliu/fsl_8548cds/mpc8548cds.dtb'.
>> Load address: 0xc00000
>> Loading: #
>> done
>> Bytes transferred =3D 9993 (2709 hex)
>> ## Booting image at 01000000 ...
>> Image Name: Linux-2.6.34-rc1-00005-g522dba7
>> Image Type: PowerPC Linux Kernel Image (gzip compressed)
>> Data Size: 1526482 Bytes =3D 1.5 MB
>> Load Address: 00000000
>> Entry Point: 00000000
>> Verifying Checksum ... OK
>> Uncompressing Kernel Image ... OK
>> Booting using the fdt at 0xc00000
>> Loading Device Tree to 007fb000, end 007fd708 ... OK
>> "
>>=20
>> I guess all 85xx or booke board has this issue.
>=20
> that's very odd since __PPC_EH should be ignored on PPC32 and thus =
85xx.
Found the issue and posted a fix.
- k=
^ permalink raw reply
* Re: Freescale MPC5554 device tree (was: cross-compiling Linux for PowerPC e200 core?)
From: Németh Márton @ 2010-03-11 6:11 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
In-Reply-To: <fa686aa41003082335t5a5d642fi13c81e4b84f7b697@mail.gmail.com>
Grant Likely wrote:
> 2010/3/9 Németh Márton <nm127@freemail.hu>:
>> Hi,
>> Grant Likely wrote:
>>> 2010/3/8 Németh Márton <nm127@freemail.hu>:
[snip]
>>>> As far as I could find out I'll need to create a device tree as documented in
>>>> the linux/Documentation/powerpc/booting-without-of.txt file.
>>> Yes, you'll need to create a device tree file for the board. Again,
>>> start from an existing 5200 .dts file. You won't need very much in it
>>> to get started. I'd be happy to help you get the structure right.
>> I tried to create a first draft of the deveice tree for MPC5554. It is
>> compilable with dtc. I based this .dts file on Figure 1-1 on page 1-3 and
>> Table 1-2 on page 1-21 of http://www.freescale.com/files/32bit/doc/ref_manual/MPC5553_MPC5554_RM.pdf .
>>
>> I'm not sure about the following points:
>> 1. Where should be the on-chip FLASH described? This memory is read-only from
>> view of software and can be used to store read-only data or execute code directly
>> from there.
>
> Hang it off the xbar node. Name it flash@<address>, and use
> 'compatible = "fsl,mpc5554-flash";'
>
>> 2. Should the co-processor (eTPU in this case) also listed in section "cpus"
>> or not? This co-processor is not able to run code like the e200z6.
>
> No, this is a device. Hang it off the peripheral bridge a node.
>
>> 3. There are three on-chip buses on MPC5554:
>> - Crossbar Switch (XBAR)
>> - Peripheral Bridge A (PBRIDGE_A)
>> - Peripheral Bridge B (PBRIDGE_B)
>> I used PBRIDGE_A and PRIDGE_B to create two /soc<SOCname> entries. Is this possible?
>
> the soc5200 naming was poorly chosen when the 5200 device tree was
> written. Use something like this:
>
> xbar@<control-regs-base-address> {
> compatible = "fsl,mpc5554-xbar";
> #address-cells = <1>;
> #size-cells = <1>;
> ranges = <[put the translation ranges in here]>;
> reg = <address and size of xbar control registers>;
>
> bridge@<bridgea-base-address> {
> compatible = "fsl,mpc5554-pbridge-a";
> #address-cells = <1>;
> #size-cells = <1>;
> ranges = <[put the translation ranges in here]>;
> reg = <address and size of bridge control registers>;
> [... child device nodes ...]
> };
> bridge@<bridgea-base-address> {
> compatible = "fsl,mpc5554-pbridge-b";
> #address-cells = <1>;
> #size-cells = <1>;
> ranges = <[put the translation ranges in here]>;
> reg = <address and size of bridge control registers>;
> [... child device nodes ...]
> };
> };
>
> The idea is to use generic names for the node names, and identify
> exactly what the device is by using the "compatible" property. Also,
> the aim is to build up a tree describing the interconnection of device
> from the perspective of the OS on the CPU. ie. the full physical
> address space is represented by the root node of the tree, and
> everything else hangs off that.
>
>> 4. There are modules which have multiple instances at different base addresses. These
>> are DSPI, SCI and FlexCAN. I used the same name for them but with different addresses.
>> Is this correct?
>
> yes.
[snip]
Here is the next draft version of the Freescale MPC5554 device tree.
I'm not quite sure whether the memory@40000000 should go under xbar or stay
directly under the root node.
The second problem I faced with was that XBAR covers the whole address range.
However, if I specify "ranges = <0 0x00000000 0x100000000>;" then I get an
error message because of the too big length value:
| DTC: dts->dts on file "/usr/src/linux/arch/powerpc/boot/dts/mpc5554.dts"
| /usr/src/linux/arch/powerpc/boot/dts/mpc5554.dts:51 literal out of range
| FATAL ERROR: Syntax error parsing input tree
I tried to solve this problem by assuming that leaving out the "ranges = ..."
means the whole range. Is this correct?
Regards,
Márton Németh
---
From: Márton Németh <nm127@freemail.hu>
Add device tree for Freescale MPC5554.
Signed-off-by: Márton Németh <nm127@freemail.hu>
---
diff -uprN linux-2.6.33.orig/arch/powerpc/boot/dts/mpc5554.dts linux/arch/powerpc/boot/dts/mpc5554.dts
--- linux-2.6.33.orig/arch/powerpc/boot/dts/mpc5554.dts 1970-01-01 01:00:00.000000000 +0100
+++ linux/arch/powerpc/boot/dts/mpc5554.dts 2010-03-11 07:01:29.000000000 +0100
@@ -0,0 +1,188 @@
+/*
+ * Freescale MPC5554 Device Tree Source
+ *
+ * Based on MPC5553/5554 Microcontroller Reference Manual, Rev. 4.0, 04/2007
+ * http://www.freescale.com/files/32bit/doc/ref_manual/MPC5553_MPC5554_RM.pdf
+ *
+ * Copyright 2010 Márton Németh
+ * Márton Németh <nm127@freemail.hu>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+/dts-v1/;
+
+/ {
+ model = "MPC5554";
+ compatible = "fsl,MPC5554EVB"; // Freescale MPC5554 Evaluation Board
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ PowerPC,5554@0 {
+ device_type = "cpu";
+ reg = <0>;
+ d-cache-line-size = <32>;
+ i-cache-line-size = <32>;
+ d-cache-size = <0x8000>; // L1, 32KiB
+ i-cache-size = <0x8000>; // L1, 32KiB
+ timebase-frequency = <0>; // from bootloader
+ bus-frequency = <0>; // from bootloader
+ clock-frequency = <0>; // from bootloader
+ };
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0x40000000 0x10000>; // 32KiB internal SRAM
+ };
+
+ xbar@1ff04000 { // System Bus Crossbar Switch (XBAR)
+ compatible = "fsl,mpc5554-xbar";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ // The full memory range is covered by XBAR
+// ranges = <0 0x00000000 0x100000000>;
+ reg = <0xfff04000 0x4000>;
+
+ flash@00000000 { // read-only FLASH
+ compatible = "fsl,mpc5554-flash";
+ reg = <0x00000000 0x200000>; // 2MiB internal FLASH
+ };
+
+ bridge@c0000000 {
+ compatible = "fsl,mpc5554-pbridge-a";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0xc0000000 0x20000000>;
+ reg = <0xc3f00000 0x4000>;
+
+ fmpll@3f80000 { // Frequency Modulated PLL
+ compatible = "fsl,mpc5554-fmpll";
+ reg = <0x03f80000 0x4000>;
+ };
+
+ flashconfig@3f88000 { // Flash Configuration
+ compatible = "fsl,mpc5554-flashconfig";
+ reg = <0x03f88000 0x4000>;
+ };
+
+ siu@3f89000 { // System Integration Unit
+ compatible = "fsl,mpc5554-siu";
+ reg = <0x03f90000 0x4000>;
+ };
+
+ emios@3fa0000 { // Modular Timer System
+ compatible = "fsl,mpc5554-emios";
+ reg = <0x03fa0000 0x4000>;
+ };
+
+ etpu@3fc0000 { // Enhanced Time Processing Unit
+ compatible = "fsl,mpc5554-etpu";
+ reg = <0x03fc0000 0x4000>;
+ };
+
+ etpudata@3fc8000 { // eTPU Shared Data Memory (Parameter RAM)
+ compatible = "fsl,mpc5554-etpudata";
+ reg = <0x03fc8000 0x4000>;
+ };
+
+ etpudata@3fcc000 { // eTPU Shared Data Memory (Parameter RAM) mirror
+ compatible = "fsl,mpc5554-etpudata";
+ reg = <0x03fcc000 0x4000>;
+ };
+
+ etpucode@3fd0000 { // eTPU Shared Code RAM
+ compatible = "fsl,mpc5554-etpucode";
+ reg = <0x03fd0000 0x4000>;
+ };
+ };
+
+ bridge@e0000000 {
+ compatible = "fsl,mpc5554-pbridge-b";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0xe0000000 0x20000000>;
+ reg = <0xfff00000 0x4000>;
+
+ ecsm@1ff40000 { // Error Correction Status Module (ECSM)
+ compatible = "fsl,mpc5554-ecsm";
+ reg = <0x1ff40000 0x4000>;
+ };
+
+ edma@1ff44000 { // Enhanced DMA Controller (eDMA)
+ compatible = "fsl,mpc5554-edma";
+ reg = <0x1ff44000 0x4000>;
+ };
+
+ intc@1ff48000 { // Interrupt Controller (INTC)
+ compatible = "fsl,mpc5554-intc";
+ reg = <0x1ff48000 0x4000>;
+ };
+
+ eqadc@1ff80000 { // Enhanced Queued Analog-to-Digital Converter (eQADC)
+ compatible = "fsl,mpc5554-eqacd";
+ reg = <0x1ff80000 0x4000>;
+ };
+
+ dspi@1ff90000 { // Deserial Serial Peripheral Interface (DSPI_A)
+ compatible = "fsl,mpc5554-dspi";
+ reg = <0x1ff90000 0x4000>;
+ };
+
+ dspi@1ff94000 { // Deserial Serial Peripheral Interface (DSPI_B)
+ compatible = "fsl,mpc5554-dspi";
+ reg = <0x1ff94000 0x4000>;
+ };
+
+ dspi@1ff98000 { // Deserial Serial Peripheral Interface (DSPI_C)
+ compatible = "fsl,mpc5554-dspi";
+ reg = <0x1ff98000 0x4000>;
+ };
+
+ dspi@1ff9c000 { // Deserial Serial Peripheral Interface (DSPI_D)
+ compatible = "fsl,mpc5554-dspi";
+ reg = <0x1ff9c000 0x4000>;
+ };
+
+ sci@1ffb0000 { // Serial Communications Interface (SCI_A)
+ compatible = "fsl,mpc5554-sci";
+ reg = <0x1ffb0000 0x4000>;
+ };
+
+ sci@1ffb4000 { // Serial Communications Interface (SCI_A)
+ compatible = "fsl,mpc5554-sci";
+ reg = <0x1ffb4000 0x4000>;
+ };
+
+ can@1ffc0000 { // Controller Area Network (FlexCAN_A)
+ compatible = "fsl,mpc5554-flexcan";
+ reg = <0x1ffc0000 0x4000>;
+ };
+
+ can@1ffc4000 { // Controller Area Network (FlexCAN_B)
+ compatible = "fsl,mpc5554-flexcan";
+ reg = <0x1ffc4000 0x4000>;
+ };
+
+ can@1ffc8000 { // Controller Area Network (FlexCAN_C)
+ compatible = "fsl,mpc5554-flexcan";
+ reg = <0x1ffc8000 0x4000>;
+ };
+
+ bam@1fffc000 { // Boot Assist Module (BAM)
+ compatible = "fsl,mpc5554-bam";
+ reg = <0x1fffc000 0x4000>;
+ };
+
+ };
+
+ };
+
+};
^ permalink raw reply
* Re: Freescale MPC5554 device tree (was: cross-compiling Linux for PowerPC e200 core?)
From: David Gibson @ 2010-03-11 6:23 UTC (permalink / raw)
To: Németh Márton; +Cc: linuxppc-dev
In-Reply-To: <4B9889AC.4080309@freemail.hu>
On Thu, Mar 11, 2010 at 07:11:56AM +0100, Németh Márton wrote:
[snip]
> +/dts-v1/;
> +
> +/ {
> + model = "MPC5554";
> + compatible = "fsl,MPC5554EVB"; // Freescale MPC5554 Evaluation Board
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + cpus {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + PowerPC,5554@0 {
Modern best practice is to have the cpu nodes named just "cpu@XXX",
and put the PowerPC,NNNN into the compatible property.
> + device_type = "cpu";
> + reg = <0>;
> + d-cache-line-size = <32>;
> + i-cache-line-size = <32>;
> + d-cache-size = <0x8000>; // L1, 32KiB
> + i-cache-size = <0x8000>; // L1, 32KiB
> + timebase-frequency = <0>; // from bootloader
> + bus-frequency = <0>; // from bootloader
> + clock-frequency = <0>; // from bootloader
> + };
> + };
> +
> + memory@40000000 {
> + device_type = "memory";
> + reg = <0x40000000 0x10000>; // 32KiB internal SRAM
> + };
> +
> + xbar@1ff04000 { // System Bus Crossbar Switch (XBAR)
> + compatible = "fsl,mpc5554-xbar";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + // The full memory range is covered by XBAR
> +// ranges = <0 0x00000000 0x100000000>;
If you want all addresses to be translated by the bus you need an
empty ranges property, not *no* ranges property. No ranges property
indicates that addresses cannot be directly translated across the
bridge, which is not, I think, what you intend.
> + reg = <0xfff04000 0x4000>;
The unit address '@1ff04000' does not match your reg property 0xfff04000.
> +
> + flash@00000000 { // read-only FLASH
Unit addresses are not 0 padded, so this should be just 'flash@0'.
> + compatible = "fsl,mpc5554-flash";
> + reg = <0x00000000 0x200000>; // 2MiB internal FLASH
> + };
> +
> + bridge@c0000000 {
> + compatible = "fsl,mpc5554-pbridge-a";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges = <0 0xc0000000 0x20000000>;
> + reg = <0xc3f00000 0x4000>;
The unit address is based on 'reg' (if present) not ranges, so it
should be bridge@c3f00000. Likewise for the other bridge below.
--
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
* Re: Problem with PCI bus rescan on 460EX
From: Felix Radensky @ 2010-03-11 7:45 UTC (permalink / raw)
To: Alex Chiang; +Cc: linux-pci, linuxppc-dev@ozlabs.org
In-Reply-To: <20100310225100.GB27324@ldl.fc.hp.com>
[-- Attachment #1: Type: text/html, Size: 1419 bytes --]
[-- Attachment #2: failure.txt --]
[-- Type: text/plain, Size: 16395 bytes --]
Linux version 2.6.33 (felix@felix-laptop.lan) (gcc version 4.2.2) #5 Thu Mar 11 09:35:52 IST 2010
Found legacy serial port 0 for /plb/opb/serial@ef600300
mem=4ef600300, taddr=4ef600300, irq=0, clk=7407407, speed=0
Found legacy serial port 1 for /plb/opb/serial@ef600400
mem=4ef600400, taddr=4ef600400, irq=0, clk=7407407, speed=0
Found legacy serial port 2 for /plb/opb/serial@ef600500
mem=4ef600500, taddr=4ef600500, irq=0, clk=7407407, speed=0
Found legacy serial port 3 for /plb/opb/serial@ef600600
mem=4ef600600, taddr=4ef600600, irq=0, clk=7407407, speed=0
Top of RAM: 0x30000000, Total RAM: 0x30000000
Memory hole size: 0MB
Zone PFN ranges:
DMA 0x00000000 -> 0x00030000
Normal 0x00030000 -> 0x00030000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00030000
On node 0 totalpages: 196608
free_area_init_node: node 0, pgdat c035e76c, node_mem_map c0388000
DMA zone: 1536 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 195072 pages, LIFO batch:31
MMU: Allocated 1088 bytes of context maps for 255 contexts
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 195072
Kernel command line: root=/dev/nfs rw nfsroot=10.0.0.10:/opt/eldk/ppc_4xxFP ip=10.0.0.30:10.0.0.10:10.0.0.138:255.0.0.0:smbe460:eth0:off panic=1 console=ttyS0,115200
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 775552k/786432k available (3364k kernel code, 10604k reserved, 116k data, 128k bss, 144k init)
Kernel virtual memory layout:
* 0xfffdf000..0xfffff000 : fixmap
* 0xfde00000..0xfe000000 : consistent mem
* 0xfde00000..0xfde00000 : early ioremap
* 0xf1000000..0xfde00000 : vmalloc & ioremap
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:512 nr_irqs:512
UIC0 (32 IRQ sources) at DCR 0xc0
UIC1 (32 IRQ sources) at DCR 0xd0
alloc irq_desc for 30 on node 0
alloc kstat_irqs on node 0
irq: irq 30 on host /interrupt-controller0 mapped to virtual irq 30
UIC2 (32 IRQ sources) at DCR 0xe0
alloc irq_desc for 16 on node 0
alloc kstat_irqs on node 0
irq: irq 10 on host /interrupt-controller0 mapped to virtual irq 16
UIC3 (32 IRQ sources) at DCR 0xf0
alloc irq_desc for 17 on node 0
alloc kstat_irqs on node 0
irq: irq 16 on host /interrupt-controller0 mapped to virtual irq 17
time_init: decrementer frequency = 1000.000012 MHz
time_init: processor frequency = 1000.000012 MHz
clocksource: timebase mult[400000] shift[22] registered
clockevent: decrementer mult[80000019] shift[31] cpu[0]
Mount-cache hash table entries: 512
NET: Registered protocol family 16
alloc irq_desc for 18 on node 0
alloc kstat_irqs on node 0
irq: irq 11 on host /interrupt-controller1 mapped to virtual irq 18
256k L2-cache enabled
PCI host bridge /plb/pci@c0ec00000 (primary) ranges:
MEM 0x0000000d80000000..0x0000000dffffffff -> 0x0000000080000000
MEM 0x0000000c0ee00000..0x0000000c0eefffff -> 0x0000000000000000
IO 0x0000000c08000000..0x0000000c0800ffff -> 0x0000000000000000
Removing ISA hole at 0x0000000c0ee00000
4xx PCI DMA offset set to 0x00000000
/plb/pci@c0ec00000: Legacy ISA memory support enabled
PCI: Probing PCI hardware
pci_bus 0000:00: scanning bus
pci 0000:00:02.0: found [3388:0020] class 000604 header type 01
pci 0000:00:02.0: calling pcibios_fixup_resources+0x0/0xf4
pci 0000:00:02.0: calling fixup_ppc4xx_pci_bridge+0x0/0x154
pci 0000:00:02.0: calling quirk_resource_alignment+0x0/0x200
pci 0000:00:02.0: supports D1 D2
pci 0000:00:02.0: PME# supported from D0 D1 D2 D3hot
pci 0000:00:02.0: PME# disabled
pci_bus 0000:00: fixups for bus
pci 0000:00:02.0: scanning behind bridge, config 000000, pass 0
pci 0000:00:02.0: bus configuration invalid, reconfiguring
pci 0000:00:02.0: scanning behind bridge, config 000000, pass 1
pci_bus 0000:01: scanning bus
pci_bus 0000:01: fixups for bus
pci 0000:00:02.0: PCI bridge to [bus 01-ff]
pci 0000:00:02.0: bridge window [io 0x0000-0x0fff]
pci 0000:00:02.0: bridge window [mem 0x00000000-0x000fffff]
pci 0000:00:02.0: bridge window [mem 0x00000000-0x000fffff 64bit pref]
pci_bus 0000:01: bus scan returning with max=01
pci_bus 0000:00: bus scan returning with max=01
pci 0000:00:02.0: disabling bridge window [io 0x0000-0x0fff] to [bus 01-01] (unused)
pci 0000:00:02.0: disabling bridge window [mem 0xd00000000-0xd000fffff pref] to [bus 01-01] (unused)
pci 0000:00:02.0: disabling bridge window [mem 0xd00000000-0xd000fffff] to [bus 01-01] (unused)
pci 0000:00:02.0: PCI bridge to [bus 01-01]
pci 0000:00:02.0: bridge window [io disabled]
pci 0000:00:02.0: bridge window [mem disabled]
pci 0000:00:02.0: bridge window [mem pref disabled]
pci 0000:00:02.0: enabling bus mastering
pci_bus 0000:00: resource 0 [io 0x0000-0xffff]
pci_bus 0000:00: resource 1 [mem 0xd80000000-0xdffffffff]
pci_bus 0000:01: resource 0 [??? 0-4095 flags 0x0]
pci_bus 0000:01: resource 1 [??? 55834574848-55835623423 flags 0x0]
pci_bus 0000:01: resource 2 [??? 55834574848-55835623423 flags 0x0]
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource timebase
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
UDP hash table entries: 512 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
pci 0000:00:02.0: calling quirk_cardbus_legacy+0x0/0x54
pci 0000:00:02.0: calling quirk_usb_early_handoff+0x0/0x6cc
PCI: CLS 0 bytes, default 32
alloc irq_desc for 19 on node 0
alloc kstat_irqs on node 0
irq: irq 1 on host /interrupt-controller1 mapped to virtual irq 19
alloc irq_desc for 20 on node 0
alloc kstat_irqs on node 0
irq: irq 1 on host /interrupt-controller0 mapped to virtual irq 20
alloc irq_desc for 29 on node 0
alloc kstat_irqs on node 0
irq: irq 29 on host /interrupt-controller1 mapped to virtual irq 29
alloc irq_desc for 21 on node 0
alloc kstat_irqs on node 0
irq: irq 30 on host /interrupt-controller1 mapped to virtual irq 21
JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
msgmni has been set to 1515
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a 16550A
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a 16550A
serial8250.0: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550A
serial8250.0: ttyS3 at MMIO 0x4ef600600 (irq = 21) is a 16550A
4ef600300.serial: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a 16550
4ef600400.serial: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a 16550
4ef600500.serial: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550
4ef600600.serial: ttyS3 at MMIO 0x4ef600600 (irq = 21) is a 16550
brd: module loaded
4e4000000.nor_flash2: Found 1 x16 devices at 0x0 in 16-bit bank
4e4000000.nor_flash2: Found 1 x16 devices at 0x2000000 in 16-bit bank
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
erase region 0: offset=0x0,size=0x8000,blocks=4
erase region 1: offset=0x20000,size=0x20000,blocks=255
erase region 2: offset=0x2000000,size=0x8000,blocks=4
erase region 3: offset=0x2020000,size=0x20000,blocks=255
RedBoot partition parsing not available
Creating 1 MTD partitions on "4e4000000.nor_flash2":
0x000000000000-0x000004000000 : "data"
4cc000000.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank
4cc000000.nor_flash: Found 1 x16 devices at 0x2000000 in 16-bit bank
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
erase region 0: offset=0x0,size=0x8000,blocks=4
erase region 1: offset=0x20000,size=0x20000,blocks=255
erase region 2: offset=0x2000000,size=0x8000,blocks=4
erase region 3: offset=0x2020000,size=0x20000,blocks=255
RedBoot partition parsing not available
Creating 7 MTD partitions on "4cc000000.nor_flash":
0x000000000000-0x0000001e0000 : "kernel"
0x0000001e0000-0x000000200000 : "dtb"
0x000000200000-0x000001600000 : "ramdisk"
0x000001600000-0x000001a00000 : "jffs2"
0x000001a00000-0x000003f60000 : "user"
0x000003f60000-0x000003fa0000 : "u-boot env"
0x000003fa0000-0x000004000000 : "u-boot"
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 806 at 0x0000064c0000
Bad eraseblock 807 at 0x0000064e0000
Bad eraseblock 2209 at 0x000011420000
Bad eraseblock 3294 at 0x000019bc0000
Bad eraseblock 4010 at 0x00001f540000
Bad eraseblock 4748 at 0x000025180000
Bad eraseblock 5082 at 0x000027b40000
Bad eraseblock 5083 at 0x000027b60000
Bad eraseblock 5716 at 0x00002ca80000
Bad eraseblock 5772 at 0x00002d180000
Bad eraseblock 6362 at 0x000031b40000
Bad eraseblock 6680 at 0x000034300000
Bad eraseblock 6740 at 0x000034a80000
Bad eraseblock 6796 at 0x000035180000
Creating 2 MTD partitions on "4e0000000.ndfc.nand":
0x000000000000-0x000000100000 : "u-boot"
0x000000000000-0x000003f00000 : "user"
PPC 4xx OCP EMAC driver, version 3.54
alloc irq_desc for 22 on node 0
alloc kstat_irqs on node 0
irq: irq 6 on host /interrupt-controller2 mapped to virtual irq 22
alloc irq_desc for 23 on node 0
alloc kstat_irqs on node 0
irq: irq 7 on host /interrupt-controller2 mapped to virtual irq 23
alloc irq_desc for 24 on node 0
alloc kstat_irqs on node 0
irq: irq 3 on host /interrupt-controller2 mapped to virtual irq 24
alloc irq_desc for 25 on node 0
alloc kstat_irqs on node 0
irq: irq 4 on host /interrupt-controller2 mapped to virtual irq 25
alloc irq_desc for 26 on node 0
alloc kstat_irqs on node 0
irq: irq 5 on host /interrupt-controller2 mapped to virtual irq 26
MAL v2 /plb/mcmal, 2 TX channels, 16 RX channels
ZMII /plb/opb/emac-zmii@ef600d00 initialized
RGMII /plb/opb/emac-rgmii@ef601500 initialized with MDIO support
TAH /plb/opb/emac-tah@ef601350 initialized
TAH /plb/opb/emac-tah@ef601450 initialized
alloc irq_desc for 27 on node 0
alloc kstat_irqs on node 0
irq: irq 16 on host /interrupt-controller2 mapped to virtual irq 27
alloc irq_desc for 28 on node 0
alloc kstat_irqs on node 0
irq: irq 20 on host /interrupt-controller2 mapped to virtual irq 28
/plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode
eth0: EMAC-0 /plb/opb/ethernet@ef600e00, MAC 00:99:88:77:66:55
eth0: found Generic MII PHY (0x00)
alloc irq_desc for 31 on node 0
alloc kstat_irqs on node 0
irq: irq 17 on host /interrupt-controller2 mapped to virtual irq 31
alloc irq_desc for 32 on node 0
alloc kstat_irqs on node 0
irq: irq 21 on host /interrupt-controller2 mapped to virtual irq 32
/plb/opb/emac-rgmii@ef601500: input 1 in RGMII mode
eth1: EMAC-1 /plb/opb/ethernet@ef600f00, MAC 00:99:88:77:66:56
eth1: found Generic MII PHY (0x10)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
alloc irq_desc for 33 on node 0
alloc kstat_irqs on node 0
irq: irq 29 on host /interrupt-controller2 mapped to virtual irq 33
ppc-of-ehci 4bffd0400.ehci: OF EHCI
ppc-of-ehci 4bffd0400.ehci: new USB bus registered, assigned bus number 1
ppc-of-ehci 4bffd0400.ehci: irq 33, io mem 0x4bffd0400
ppc-of-ehci 4bffd0400.ehci: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: OF EHCI
usb usb1: Manufacturer: Linux 2.6.33 ehci_hcd
usb usb1: SerialNumber: PPC-OF USB
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver libusual
i2c /dev entries driver
alloc irq_desc for 34 on node 0
alloc kstat_irqs on node 0
irq: irq 2 on host /interrupt-controller0 mapped to virtual irq 34
at24 0-0051: 65536 byte 24c512 EEPROM (writable)
at24 0-0053: 256 byte spd EEPROM (read-only)
ibm-iic 4ef600700.i2c: using standard (100 kHz) mode
alloc irq_desc for 35 on node 0
alloc kstat_irqs on node 0
irq: irq 3 on host /interrupt-controller0 mapped to virtual irq 35
ibm-iic 4ef600800.i2c: using standard (100 kHz) mode
rtc-ds1307 5-0068: rtc core: registered ds1338 as rtc0
rtc-ds1307 5-0068: 56 bytes nvram
pca954x 1-0070: registered 8 virtual busses for I2C switch pca9548
pca954x 2-0071: registered 8 virtual busses for I2C switch pca9548
pca954x 3-0072: registered 8 virtual busses for I2C switch pca9548
TCP cubic registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
rtc-ds1307 5-0068: setting system clock to 2000-02-28 11:43:27 UTC (951738207)
eth0: link is down
IP-Config: Complete:
device=eth0, addr=10.0.0.30, mask=255.0.0.0, gw=10.0.0.138,
host=smbe460, domain=, nis-domain=(none),
bootserver=10.0.0.10, rootserver=10.0.0.10, rootpath=
Looking up port of RPC 100003/2 on 10.0.0.10
eth0: link is up, 100 FDX, pause enabled
Looking up port of RPC 100005/1 on 10.0.0.10
VFS: Mounted root (nfs filesystem) on device 0:13.
Freeing unused kernel memory: 144k init
pci_bus 0000:00: scanning bus
pci 0000:00:02.0: scanning behind bridge, config 010100, pass 0
pci_bus 0000:01: scanning bus
pci 0000:01:00.0: found [1575:0002] class 00ff00 header type 00
pci 0000:01:00.0: reg 10: [mem 0x00000000-0x000fffff]
pci 0000:01:00.0: reg 14: [mem 0x00000000-0x03ffffff]
pci 0000:01:00.0: reg 18: [mem 0x00000000-0x03ffffff]
pci 0000:01:00.0: reg 1c: [mem 0x00000000-0x00003fff]
pci 0000:01:00.0: calling pcibios_fixup_resources+0x0/0xf4
pci 0000:01:00.0: calling fixup_ppc4xx_pci_bridge+0x0/0x154
pci 0000:01:00.0: calling quirk_resource_alignment+0x0/0x200
pci_bus 0000:01: bus scan returning with max=01
pci 0000:00:02.0: scanning behind bridge, config 010100, pass 1
pci_bus 0000:00: bus scan returning with max=01
pci 0000:00:02.0: disabling bridge window [io 0x0000-0x0fff] to [bus 01-01] (unused)
pci 0000:00:02.0: disabling bridge window [mem 0xd00000000-0xd000fffff pref] to [bus 01-01] (unused)
pci 0000:00:02.0: BAR 8: assigned [mem 0xd80000000-0xd89ffffff]
pci 0000:01:00.0: BAR 1: assigned [mem 0xd80000000-0xd83ffffff]
pci 0000:01:00.0: BAR 1: set to [mem 0xd80000000-0xd83ffffff] (PCI address [0x80000000-0x83ffffff]
pci 0000:01:00.0: BAR 2: assigned [mem 0xd84000000-0xd87ffffff]
pci 0000:01:00.0: BAR 2: set to [mem 0xd84000000-0xd87ffffff] (PCI address [0x84000000-0x87ffffff]
pci 0000:01:00.0: BAR 0: assigned [mem 0xd88000000-0xd880fffff]
pci 0000:01:00.0: BAR 0: set to [mem 0xd88000000-0xd880fffff] (PCI address [0x88000000-0x880fffff]
pci 0000:01:00.0: BAR 3: assigned [mem 0xd88100000-0xd88103fff]
pci 0000:01:00.0: BAR 3: set to [mem 0xd88100000-0xd88103fff] (PCI address [0x88100000-0x88103fff]
# cat /proc/iomem
4bffd0400-4bffd048f : ehci_hcd
4cc000000-4cfffffff : 4cc000000.nor_flash
4e4000000-4e7ffffff : 4e4000000.nor_flash2
4ef600300-4ef600307 : serial
4ef600400-4ef600407 : serial
4ef600500-4ef600507 : serial
4ef600600-4ef600607 : serial
d80000000-dffffffff : /plb/pci@c0ec00000
d80000000-d89ffffff : PCI Bus 0000:01
d80000000-d83ffffff : 0000:01:00.0
d84000000-d87ffffff : 0000:01:00.0
d88000000-d880fffff : 0000:01:00.0
d88100000-d88103fff : 0000:01:00.0
# cat /proc/ioports
00000000-0000ffff : /plb/pci@c0ec00000
00000000-00000fff : Legacy IO
[-- Attachment #3: success.txt --]
[-- Type: text/plain, Size: 15405 bytes --]
Linux version 2.6.33 (felix@felix-laptop.lan) (gcc version 4.2.2) #5 Thu Mar 11 09:35:52 IST 2010
Found legacy serial port 0 for /plb/opb/serial@ef600300
mem=4ef600300, taddr=4ef600300, irq=0, clk=7407407, speed=0
Found legacy serial port 1 for /plb/opb/serial@ef600400
mem=4ef600400, taddr=4ef600400, irq=0, clk=7407407, speed=0
Found legacy serial port 2 for /plb/opb/serial@ef600500
mem=4ef600500, taddr=4ef600500, irq=0, clk=7407407, speed=0
Found legacy serial port 3 for /plb/opb/serial@ef600600
mem=4ef600600, taddr=4ef600600, irq=0, clk=7407407, speed=0
Top of RAM: 0x30000000, Total RAM: 0x30000000
Memory hole size: 0MB
Zone PFN ranges:
DMA 0x00000000 -> 0x00030000
Normal 0x00030000 -> 0x00030000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00030000
On node 0 totalpages: 196608
free_area_init_node: node 0, pgdat c035e76c, node_mem_map c0388000
DMA zone: 1536 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 195072 pages, LIFO batch:31
MMU: Allocated 1088 bytes of context maps for 255 contexts
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 195072
Kernel command line: root=/dev/nfs rw nfsroot=10.0.0.10:/opt/eldk/ppc_4xxFP ip=10.0.0.30:10.0.0.10:10.0.0.138:255.0.0.0:smbe460:eth0:off panic=1 console=ttyS0,115200
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 775552k/786432k available (3364k kernel code, 10604k reserved, 116k data, 128k bss, 144k init)
Kernel virtual memory layout:
* 0xfffdf000..0xfffff000 : fixmap
* 0xfde00000..0xfe000000 : consistent mem
* 0xfde00000..0xfde00000 : early ioremap
* 0xf1000000..0xfde00000 : vmalloc & ioremap
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:512 nr_irqs:512
UIC0 (32 IRQ sources) at DCR 0xc0
UIC1 (32 IRQ sources) at DCR 0xd0
alloc irq_desc for 30 on node 0
alloc kstat_irqs on node 0
irq: irq 30 on host /interrupt-controller0 mapped to virtual irq 30
UIC2 (32 IRQ sources) at DCR 0xe0
alloc irq_desc for 16 on node 0
alloc kstat_irqs on node 0
irq: irq 10 on host /interrupt-controller0 mapped to virtual irq 16
UIC3 (32 IRQ sources) at DCR 0xf0
alloc irq_desc for 17 on node 0
alloc kstat_irqs on node 0
irq: irq 16 on host /interrupt-controller0 mapped to virtual irq 17
time_init: decrementer frequency = 1000.000012 MHz
time_init: processor frequency = 1000.000012 MHz
clocksource: timebase mult[400000] shift[22] registered
clockevent: decrementer mult[80000019] shift[31] cpu[0]
Mount-cache hash table entries: 512
NET: Registered protocol family 16
alloc irq_desc for 18 on node 0
alloc kstat_irqs on node 0
irq: irq 11 on host /interrupt-controller1 mapped to virtual irq 18
256k L2-cache enabled
PCI host bridge /plb/pci@c0ec00000 (primary) ranges:
MEM 0x0000000d80000000..0x0000000dffffffff -> 0x0000000080000000
MEM 0x0000000c0ee00000..0x0000000c0eefffff -> 0x0000000000000000
IO 0x0000000c08000000..0x0000000c0800ffff -> 0x0000000000000000
Removing ISA hole at 0x0000000c0ee00000
4xx PCI DMA offset set to 0x00000000
/plb/pci@c0ec00000: Legacy ISA memory support enabled
PCI: Probing PCI hardware
pci_bus 0000:00: scanning bus
pci 0000:00:02.0: found [3388:0020] class 000604 header type 01
pci 0000:00:02.0: calling pcibios_fixup_resources+0x0/0xf4
pci 0000:00:02.0: calling fixup_ppc4xx_pci_bridge+0x0/0x154
pci 0000:00:02.0: calling quirk_resource_alignment+0x0/0x200
pci 0000:00:02.0: supports D1 D2
pci 0000:00:02.0: PME# supported from D0 D1 D2 D3hot
pci 0000:00:02.0: PME# disabled
pci_bus 0000:00: fixups for bus
pci 0000:00:02.0: scanning behind bridge, config 010100, pass 0
pci_bus 0000:01: scanning bus
pci 0000:01:00.0: found [1575:0002] class 00ff00 header type 00
pci 0000:01:00.0: reg 10: [mem 0x88000000-0x880fffff]
pci 0000:01:00.0: reg 14: [mem 0x80000000-0x83ffffff]
pci 0000:01:00.0: reg 18: [mem 0x84000000-0x87ffffff]
pci 0000:01:00.0: reg 1c: [mem 0x88100000-0x88103fff]
pci 0000:01:00.0: calling pcibios_fixup_resources+0x0/0xf4
pci 0000:01:00.0: calling fixup_ppc4xx_pci_bridge+0x0/0x154
pci 0000:01:00.0: calling quirk_resource_alignment+0x0/0x200
pci_bus 0000:01: fixups for bus
pci 0000:00:02.0: PCI bridge to [bus 01-01]
pci_bus 0000:01: bus scan returning with max=01
pci 0000:00:02.0: scanning behind bridge, config 010100, pass 1
pci_bus 0000:00: bus scan returning with max=01
pci 0000:00:02.0: BAR 8: assigned [mem 0xd80000000-0xd89ffffff]
pci 0000:01:00.0: BAR 1: assigned [mem 0xd80000000-0xd83ffffff]
pci 0000:01:00.0: BAR 1: set to [mem 0xd80000000-0xd83ffffff] (PCI address [0x80000000-0x83ffffff]
pci 0000:01:00.0: BAR 2: assigned [mem 0xd84000000-0xd87ffffff]
pci 0000:01:00.0: BAR 2: set to [mem 0xd84000000-0xd87ffffff] (PCI address [0x84000000-0x87ffffff]
pci 0000:01:00.0: BAR 0: assigned [mem 0xd88000000-0xd880fffff]
pci 0000:01:00.0: BAR 0: set to [mem 0xd88000000-0xd880fffff] (PCI address [0x88000000-0x880fffff]
pci 0000:01:00.0: BAR 3: assigned [mem 0xd88100000-0xd88103fff]
pci 0000:01:00.0: BAR 3: set to [mem 0xd88100000-0xd88103fff] (PCI address [0x88100000-0x88103fff]
pci 0000:00:02.0: PCI bridge to [bus 01-01]
pci 0000:00:02.0: bridge window [io disabled]
pci 0000:00:02.0: bridge window [mem 0xd80000000-0xd89ffffff]
pci 0000:00:02.0: bridge window [mem pref disabled]
pci 0000:00:02.0: enabling device (0084 -> 0086)
pci_bus 0000:00: resource 0 [io 0x0000-0xffff]
pci_bus 0000:00: resource 1 [mem 0xd80000000-0xdffffffff]
pci_bus 0000:01: resource 1 [mem 0xd80000000-0xd89ffffff]
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource timebase
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
UDP hash table entries: 512 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
pci 0000:00:02.0: calling quirk_cardbus_legacy+0x0/0x54
pci 0000:00:02.0: calling quirk_usb_early_handoff+0x0/0x6cc
pci 0000:01:00.0: calling quirk_cardbus_legacy+0x0/0x54
pci 0000:01:00.0: calling quirk_usb_early_handoff+0x0/0x6cc
PCI: CLS 0 bytes, default 32
alloc irq_desc for 19 on node 0
alloc kstat_irqs on node 0
irq: irq 1 on host /interrupt-controller1 mapped to virtual irq 19
alloc irq_desc for 20 on node 0
alloc kstat_irqs on node 0
irq: irq 1 on host /interrupt-controller0 mapped to virtual irq 20
alloc irq_desc for 29 on node 0
alloc kstat_irqs on node 0
irq: irq 29 on host /interrupt-controller1 mapped to virtual irq 29
alloc irq_desc for 21 on node 0
alloc kstat_irqs on node 0
irq: irq 30 on host /interrupt-controller1 mapped to virtual irq 21
JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
msgmni has been set to 1515
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a 16550A
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a 16550A
serial8250.0: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550A
serial8250.0: ttyS3 at MMIO 0x4ef600600 (irq = 21) is a 16550A
4ef600300.serial: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a 16550
4ef600400.serial: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a 16550
4ef600500.serial: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550
4ef600600.serial: ttyS3 at MMIO 0x4ef600600 (irq = 21) is a 16550
brd: module loaded
4e4000000.nor_flash2: Found 1 x16 devices at 0x0 in 16-bit bank
4e4000000.nor_flash2: Found 1 x16 devices at 0x2000000 in 16-bit bank
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
erase region 0: offset=0x0,size=0x8000,blocks=4
erase region 1: offset=0x20000,size=0x20000,blocks=255
erase region 2: offset=0x2000000,size=0x8000,blocks=4
erase region 3: offset=0x2020000,size=0x20000,blocks=255
RedBoot partition parsing not available
Creating 1 MTD partitions on "4e4000000.nor_flash2":
0x000000000000-0x000004000000 : "data"
4cc000000.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank
4cc000000.nor_flash: Found 1 x16 devices at 0x2000000 in 16-bit bank
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
erase region 0: offset=0x0,size=0x8000,blocks=4
erase region 1: offset=0x20000,size=0x20000,blocks=255
erase region 2: offset=0x2000000,size=0x8000,blocks=4
erase region 3: offset=0x2020000,size=0x20000,blocks=255
RedBoot partition parsing not available
Creating 7 MTD partitions on "4cc000000.nor_flash":
0x000000000000-0x0000001e0000 : "kernel"
0x0000001e0000-0x000000200000 : "dtb"
0x000000200000-0x000001600000 : "ramdisk"
0x000001600000-0x000001a00000 : "jffs2"
0x000001a00000-0x000003f60000 : "user"
0x000003f60000-0x000003fa0000 : "u-boot env"
0x000003fa0000-0x000004000000 : "u-boot"
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 806 at 0x0000064c0000
Bad eraseblock 807 at 0x0000064e0000
Bad eraseblock 2209 at 0x000011420000
Bad eraseblock 3294 at 0x000019bc0000
Bad eraseblock 4010 at 0x00001f540000
Bad eraseblock 4748 at 0x000025180000
Bad eraseblock 5082 at 0x000027b40000
Bad eraseblock 5083 at 0x000027b60000
Bad eraseblock 5716 at 0x00002ca80000
Bad eraseblock 5772 at 0x00002d180000
Bad eraseblock 6362 at 0x000031b40000
Bad eraseblock 6680 at 0x000034300000
Bad eraseblock 6740 at 0x000034a80000
Bad eraseblock 6796 at 0x000035180000
Creating 2 MTD partitions on "4e0000000.ndfc.nand":
0x000000000000-0x000000100000 : "u-boot"
0x000000000000-0x000003f00000 : "user"
PPC 4xx OCP EMAC driver, version 3.54
alloc irq_desc for 22 on node 0
alloc kstat_irqs on node 0
irq: irq 6 on host /interrupt-controller2 mapped to virtual irq 22
alloc irq_desc for 23 on node 0
alloc kstat_irqs on node 0
irq: irq 7 on host /interrupt-controller2 mapped to virtual irq 23
alloc irq_desc for 24 on node 0
alloc kstat_irqs on node 0
irq: irq 3 on host /interrupt-controller2 mapped to virtual irq 24
alloc irq_desc for 25 on node 0
alloc kstat_irqs on node 0
irq: irq 4 on host /interrupt-controller2 mapped to virtual irq 25
alloc irq_desc for 26 on node 0
alloc kstat_irqs on node 0
irq: irq 5 on host /interrupt-controller2 mapped to virtual irq 26
MAL v2 /plb/mcmal, 2 TX channels, 16 RX channels
ZMII /plb/opb/emac-zmii@ef600d00 initialized
RGMII /plb/opb/emac-rgmii@ef601500 initialized with MDIO support
TAH /plb/opb/emac-tah@ef601350 initialized
TAH /plb/opb/emac-tah@ef601450 initialized
alloc irq_desc for 27 on node 0
alloc kstat_irqs on node 0
irq: irq 16 on host /interrupt-controller2 mapped to virtual irq 27
alloc irq_desc for 28 on node 0
alloc kstat_irqs on node 0
irq: irq 20 on host /interrupt-controller2 mapped to virtual irq 28
/plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode
eth0: EMAC-0 /plb/opb/ethernet@ef600e00, MAC 00:99:88:77:66:55
eth0: found Generic MII PHY (0x00)
alloc irq_desc for 31 on node 0
alloc kstat_irqs on node 0
irq: irq 17 on host /interrupt-controller2 mapped to virtual irq 31
alloc irq_desc for 32 on node 0
alloc kstat_irqs on node 0
irq: irq 21 on host /interrupt-controller2 mapped to virtual irq 32
/plb/opb/emac-rgmii@ef601500: input 1 in RGMII mode
eth1: EMAC-1 /plb/opb/ethernet@ef600f00, MAC 00:99:88:77:66:56
eth1: found Generic MII PHY (0x10)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
alloc irq_desc for 33 on node 0
alloc kstat_irqs on node 0
irq: irq 29 on host /interrupt-controller2 mapped to virtual irq 33
ppc-of-ehci 4bffd0400.ehci: OF EHCI
ppc-of-ehci 4bffd0400.ehci: new USB bus registered, assigned bus number 1
ppc-of-ehci 4bffd0400.ehci: irq 33, io mem 0x4bffd0400
ppc-of-ehci 4bffd0400.ehci: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: OF EHCI
usb usb1: Manufacturer: Linux 2.6.33 ehci_hcd
usb usb1: SerialNumber: PPC-OF USB
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver libusual
i2c /dev entries driver
alloc irq_desc for 34 on node 0
alloc kstat_irqs on node 0
irq: irq 2 on host /interrupt-controller0 mapped to virtual irq 34
at24 0-0051: 65536 byte 24c512 EEPROM (writable)
at24 0-0053: 256 byte spd EEPROM (read-only)
ibm-iic 4ef600700.i2c: using standard (100 kHz) mode
alloc irq_desc for 35 on node 0
alloc kstat_irqs on node 0
irq: irq 3 on host /interrupt-controller0 mapped to virtual irq 35
ibm-iic 4ef600800.i2c: using standard (100 kHz) mode
rtc-ds1307 5-0068: rtc core: registered ds1338 as rtc0
rtc-ds1307 5-0068: 56 bytes nvram
pca954x 1-0070: registered 8 virtual busses for I2C switch pca9548
pca954x 2-0071: registered 8 virtual busses for I2C switch pca9548
pca954x 3-0072: registered 8 virtual busses for I2C switch pca9548
TCP cubic registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
rtc-ds1307 5-0068: setting system clock to 2000-02-28 11:41:36 UTC (951738096)
eth0: link is down
IP-Config: Complete:
device=eth0, addr=10.0.0.30, mask=255.0.0.0, gw=10.0.0.138,
host=smbe460, domain=, nis-domain=(none),
bootserver=10.0.0.10, rootserver=10.0.0.10, rootpath=
Looking up port of RPC 100003/2 on 10.0.0.10
eth0: link is up, 100 FDX, pause enabled
Looking up port of RPC 100005/1 on 10.0.0.10
VFS: Mounted root (nfs filesystem) on device 0:13.
Freeing unused kernel memory: 144k init
# cat /proc/iomem
4bffd0400-4bffd048f : ehci_hcd
4cc000000-4cfffffff : 4cc000000.nor_flash
4e4000000-4e7ffffff : 4e4000000.nor_flash2
4ef600300-4ef600307 : serial
4ef600400-4ef600407 : serial
4ef600500-4ef600507 : serial
4ef600600-4ef600607 : serial
d80000000-dffffffff : /plb/pci@c0ec00000
d80000000-d89ffffff : PCI Bus 0000:01
d80000000-d83ffffff : 0000:01:00.0
d84000000-d87ffffff : 0000:01:00.0
d88000000-d880fffff : 0000:01:00.0
d88100000-d88103fff : 0000:01:00.0
# cat /proc/ioports
00000000-0000ffff : /plb/pci@c0ec00000
00000000-00000fff : Legacy IO
^ permalink raw reply
* Re: Problem with PCI bus rescan on 460EX
From: Felix Radensky @ 2010-03-11 7:50 UTC (permalink / raw)
To: Alex Chiang; +Cc: linux-pci, linuxppc-dev@ozlabs.org
In-Reply-To: <20100310225100.GB27324@ldl.fc.hp.com>
[-- Attachment #1: Type: text/plain, Size: 873 bytes --]
Hi Alex,
Resending, previous attempt was erroneously send as HTML.
Thanks a lot for replying.
Alex Chiang wrote:
> * Felix Radensky <felix@embedded-sol.com>:
>
>> The problem arises when device is plugged in after boot. After doing
>> echo 1 > /sys/bus/pci/rescan
>> the device is identified, but bridge memory window is not allocated,
>> and reads from device memory regions return 0xffffffff. Below is
>> relevant output:
>>
>
> Do you need firmware support on your platform for hotplug?
>
I don't think so, but I've added powerpc guys to CC to make sure.
> Can you please send full dmesg during successful boot, full dmesg
> log during unsuccessful rescan, and contents of /proc/iomem and
> /proc/ioports during success and failure cases?
>
> Be sure you have PCI_CONFIG_DEBUG turned on.
>
Attached. I really appreciate your help. Thanks a lot.
Felix.
[-- Attachment #2: failure.txt --]
[-- Type: text/plain, Size: 16396 bytes --]
Linux version 2.6.33 (felix@felix-laptop.lan) (gcc version 4.2.2) #5 Thu Mar 11 09:35:52 IST 2010
Found legacy serial port 0 for /plb/opb/serial@ef600300
mem=4ef600300, taddr=4ef600300, irq=0, clk=7407407, speed=0
Found legacy serial port 1 for /plb/opb/serial@ef600400
mem=4ef600400, taddr=4ef600400, irq=0, clk=7407407, speed=0
Found legacy serial port 2 for /plb/opb/serial@ef600500
mem=4ef600500, taddr=4ef600500, irq=0, clk=7407407, speed=0
Found legacy serial port 3 for /plb/opb/serial@ef600600
mem=4ef600600, taddr=4ef600600, irq=0, clk=7407407, speed=0
Top of RAM: 0x30000000, Total RAM: 0x30000000
Memory hole size: 0MB
Zone PFN ranges:
DMA 0x00000000 -> 0x00030000
Normal 0x00030000 -> 0x00030000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00030000
On node 0 totalpages: 196608
free_area_init_node: node 0, pgdat c035e76c, node_mem_map c0388000
DMA zone: 1536 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 195072 pages, LIFO batch:31
MMU: Allocated 1088 bytes of context maps for 255 contexts
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 195072
Kernel command line: root=/dev/nfs rw nfsroot=10.0.0.10:/opt/eldk/ppc_4xxFP ip=10.0.0.30:10.0.0.10:10.0.0.138:255.0.0.0:smbe460:eth0:off panic=1 console=ttyS0,115200
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 775552k/786432k available (3364k kernel code, 10604k reserved, 116k data, 128k bss, 144k init)
Kernel virtual memory layout:
* 0xfffdf000..0xfffff000 : fixmap
* 0xfde00000..0xfe000000 : consistent mem
* 0xfde00000..0xfde00000 : early ioremap
* 0xf1000000..0xfde00000 : vmalloc & ioremap
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:512 nr_irqs:512
UIC0 (32 IRQ sources) at DCR 0xc0
UIC1 (32 IRQ sources) at DCR 0xd0
alloc irq_desc for 30 on node 0
alloc kstat_irqs on node 0
irq: irq 30 on host /interrupt-controller0 mapped to virtual irq 30
UIC2 (32 IRQ sources) at DCR 0xe0
alloc irq_desc for 16 on node 0
alloc kstat_irqs on node 0
irq: irq 10 on host /interrupt-controller0 mapped to virtual irq 16
UIC3 (32 IRQ sources) at DCR 0xf0
alloc irq_desc for 17 on node 0
alloc kstat_irqs on node 0
irq: irq 16 on host /interrupt-controller0 mapped to virtual irq 17
time_init: decrementer frequency = 1000.000012 MHz
time_init: processor frequency = 1000.000012 MHz
clocksource: timebase mult[400000] shift[22] registered
clockevent: decrementer mult[80000019] shift[31] cpu[0]
Mount-cache hash table entries: 512
NET: Registered protocol family 16
alloc irq_desc for 18 on node 0
alloc kstat_irqs on node 0
irq: irq 11 on host /interrupt-controller1 mapped to virtual irq 18
256k L2-cache enabled
PCI host bridge /plb/pci@c0ec00000 (primary) ranges:
MEM 0x0000000d80000000..0x0000000dffffffff -> 0x0000000080000000
MEM 0x0000000c0ee00000..0x0000000c0eefffff -> 0x0000000000000000
IO 0x0000000c08000000..0x0000000c0800ffff -> 0x0000000000000000
Removing ISA hole at 0x0000000c0ee00000
4xx PCI DMA offset set to 0x00000000
/plb/pci@c0ec00000: Legacy ISA memory support enabled
PCI: Probing PCI hardware
pci_bus 0000:00: scanning bus
pci 0000:00:02.0: found [3388:0020] class 000604 header type 01
pci 0000:00:02.0: calling pcibios_fixup_resources+0x0/0xf4
pci 0000:00:02.0: calling fixup_ppc4xx_pci_bridge+0x0/0x154
pci 0000:00:02.0: calling quirk_resource_alignment+0x0/0x200
pci 0000:00:02.0: supports D1 D2
pci 0000:00:02.0: PME# supported from D0 D1 D2 D3hot
pci 0000:00:02.0: PME# disabled
pci_bus 0000:00: fixups for bus
pci 0000:00:02.0: scanning behind bridge, config 000000, pass 0
pci 0000:00:02.0: bus configuration invalid, reconfiguring
pci 0000:00:02.0: scanning behind bridge, config 000000, pass 1
pci_bus 0000:01: scanning bus
pci_bus 0000:01: fixups for bus
pci 0000:00:02.0: PCI bridge to [bus 01-ff]
pci 0000:00:02.0: bridge window [io 0x0000-0x0fff]
pci 0000:00:02.0: bridge window [mem 0x00000000-0x000fffff]
pci 0000:00:02.0: bridge window [mem 0x00000000-0x000fffff 64bit pref]
pci_bus 0000:01: bus scan returning with max=01
pci_bus 0000:00: bus scan returning with max=01
pci 0000:00:02.0: disabling bridge window [io 0x0000-0x0fff] to [bus 01-01] (unused)
pci 0000:00:02.0: disabling bridge window [mem 0xd00000000-0xd000fffff pref] to [bus 01-01] (unused)
pci 0000:00:02.0: disabling bridge window [mem 0xd00000000-0xd000fffff] to [bus 01-01] (unused)
pci 0000:00:02.0: PCI bridge to [bus 01-01]
pci 0000:00:02.0: bridge window [io disabled]
pci 0000:00:02.0: bridge window [mem disabled]
pci 0000:00:02.0: bridge window [mem pref disabled]
pci 0000:00:02.0: enabling bus mastering
pci_bus 0000:00: resource 0 [io 0x0000-0xffff]
pci_bus 0000:00: resource 1 [mem 0xd80000000-0xdffffffff]
pci_bus 0000:01: resource 0 [??? 0-4095 flags 0x0]
pci_bus 0000:01: resource 1 [??? 55834574848-55835623423 flags 0x0]
pci_bus 0000:01: resource 2 [??? 55834574848-55835623423 flags 0x0]
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource timebase
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
UDP hash table entries: 512 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
pci 0000:00:02.0: calling quirk_cardbus_legacy+0x0/0x54
pci 0000:00:02.0: calling quirk_usb_early_handoff+0x0/0x6cc
PCI: CLS 0 bytes, default 32
alloc irq_desc for 19 on node 0
alloc kstat_irqs on node 0
irq: irq 1 on host /interrupt-controller1 mapped to virtual irq 19
alloc irq_desc for 20 on node 0
alloc kstat_irqs on node 0
irq: irq 1 on host /interrupt-controller0 mapped to virtual irq 20
alloc irq_desc for 29 on node 0
alloc kstat_irqs on node 0
irq: irq 29 on host /interrupt-controller1 mapped to virtual irq 29
alloc irq_desc for 21 on node 0
alloc kstat_irqs on node 0
irq: irq 30 on host /interrupt-controller1 mapped to virtual irq 21
JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
msgmni has been set to 1515
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a 16550A
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a 16550A
serial8250.0: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550A
serial8250.0: ttyS3 at MMIO 0x4ef600600 (irq = 21) is a 16550A
4ef600300.serial: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a 16550
4ef600400.serial: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a 16550
4ef600500.serial: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550
4ef600600.serial: ttyS3 at MMIO 0x4ef600600 (irq = 21) is a 16550
brd: module loaded
4e4000000.nor_flash2: Found 1 x16 devices at 0x0 in 16-bit bank
4e4000000.nor_flash2: Found 1 x16 devices at 0x2000000 in 16-bit bank
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
erase region 0: offset=0x0,size=0x8000,blocks=4
erase region 1: offset=0x20000,size=0x20000,blocks=255
erase region 2: offset=0x2000000,size=0x8000,blocks=4
erase region 3: offset=0x2020000,size=0x20000,blocks=255
RedBoot partition parsing not available
Creating 1 MTD partitions on "4e4000000.nor_flash2":
0x000000000000-0x000004000000 : "data"
4cc000000.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank
4cc000000.nor_flash: Found 1 x16 devices at 0x2000000 in 16-bit bank
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
erase region 0: offset=0x0,size=0x8000,blocks=4
erase region 1: offset=0x20000,size=0x20000,blocks=255
erase region 2: offset=0x2000000,size=0x8000,blocks=4
erase region 3: offset=0x2020000,size=0x20000,blocks=255
RedBoot partition parsing not available
Creating 7 MTD partitions on "4cc000000.nor_flash":
0x000000000000-0x0000001e0000 : "kernel"
0x0000001e0000-0x000000200000 : "dtb"
0x000000200000-0x000001600000 : "ramdisk"
0x000001600000-0x000001a00000 : "jffs2"
0x000001a00000-0x000003f60000 : "user"
0x000003f60000-0x000003fa0000 : "u-boot env"
0x000003fa0000-0x000004000000 : "u-boot"
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 806 at 0x0000064c0000
Bad eraseblock 807 at 0x0000064e0000
Bad eraseblock 2209 at 0x000011420000
Bad eraseblock 3294 at 0x000019bc0000
Bad eraseblock 4010 at 0x00001f540000
Bad eraseblock 4748 at 0x000025180000
Bad eraseblock 5082 at 0x000027b40000
Bad eraseblock 5083 at 0x000027b60000
Bad eraseblock 5716 at 0x00002ca80000
Bad eraseblock 5772 at 0x00002d180000
Bad eraseblock 6362 at 0x000031b40000
Bad eraseblock 6680 at 0x000034300000
Bad eraseblock 6740 at 0x000034a80000
Bad eraseblock 6796 at 0x000035180000
Creating 2 MTD partitions on "4e0000000.ndfc.nand":
0x000000000000-0x000000100000 : "u-boot"
0x000000000000-0x000003f00000 : "user"
PPC 4xx OCP EMAC driver, version 3.54
alloc irq_desc for 22 on node 0
alloc kstat_irqs on node 0
irq: irq 6 on host /interrupt-controller2 mapped to virtual irq 22
alloc irq_desc for 23 on node 0
alloc kstat_irqs on node 0
irq: irq 7 on host /interrupt-controller2 mapped to virtual irq 23
alloc irq_desc for 24 on node 0
alloc kstat_irqs on node 0
irq: irq 3 on host /interrupt-controller2 mapped to virtual irq 24
alloc irq_desc for 25 on node 0
alloc kstat_irqs on node 0
irq: irq 4 on host /interrupt-controller2 mapped to virtual irq 25
alloc irq_desc for 26 on node 0
alloc kstat_irqs on node 0
irq: irq 5 on host /interrupt-controller2 mapped to virtual irq 26
MAL v2 /plb/mcmal, 2 TX channels, 16 RX channels
ZMII /plb/opb/emac-zmii@ef600d00 initialized
RGMII /plb/opb/emac-rgmii@ef601500 initialized with MDIO support
TAH /plb/opb/emac-tah@ef601350 initialized
TAH /plb/opb/emac-tah@ef601450 initialized
alloc irq_desc for 27 on node 0
alloc kstat_irqs on node 0
irq: irq 16 on host /interrupt-controller2 mapped to virtual irq 27
alloc irq_desc for 28 on node 0
alloc kstat_irqs on node 0
irq: irq 20 on host /interrupt-controller2 mapped to virtual irq 28
/plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode
eth0: EMAC-0 /plb/opb/ethernet@ef600e00, MAC 00:99:88:77:66:55
eth0: found Generic MII PHY (0x00)
alloc irq_desc for 31 on node 0
alloc kstat_irqs on node 0
irq: irq 17 on host /interrupt-controller2 mapped to virtual irq 31
alloc irq_desc for 32 on node 0
alloc kstat_irqs on node 0
irq: irq 21 on host /interrupt-controller2 mapped to virtual irq 32
/plb/opb/emac-rgmii@ef601500: input 1 in RGMII mode
eth1: EMAC-1 /plb/opb/ethernet@ef600f00, MAC 00:99:88:77:66:56
eth1: found Generic MII PHY (0x10)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
alloc irq_desc for 33 on node 0
alloc kstat_irqs on node 0
irq: irq 29 on host /interrupt-controller2 mapped to virtual irq 33
ppc-of-ehci 4bffd0400.ehci: OF EHCI
ppc-of-ehci 4bffd0400.ehci: new USB bus registered, assigned bus number 1
ppc-of-ehci 4bffd0400.ehci: irq 33, io mem 0x4bffd0400
ppc-of-ehci 4bffd0400.ehci: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: OF EHCI
usb usb1: Manufacturer: Linux 2.6.33 ehci_hcd
usb usb1: SerialNumber: PPC-OF USB
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver libusual
i2c /dev entries driver
alloc irq_desc for 34 on node 0
alloc kstat_irqs on node 0
irq: irq 2 on host /interrupt-controller0 mapped to virtual irq 34
at24 0-0051: 65536 byte 24c512 EEPROM (writable)
at24 0-0053: 256 byte spd EEPROM (read-only)
ibm-iic 4ef600700.i2c: using standard (100 kHz) mode
alloc irq_desc for 35 on node 0
alloc kstat_irqs on node 0
irq: irq 3 on host /interrupt-controller0 mapped to virtual irq 35
ibm-iic 4ef600800.i2c: using standard (100 kHz) mode
rtc-ds1307 5-0068: rtc core: registered ds1338 as rtc0
rtc-ds1307 5-0068: 56 bytes nvram
pca954x 1-0070: registered 8 virtual busses for I2C switch pca9548
pca954x 2-0071: registered 8 virtual busses for I2C switch pca9548
pca954x 3-0072: registered 8 virtual busses for I2C switch pca9548
TCP cubic registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
rtc-ds1307 5-0068: setting system clock to 2000-02-28 11:43:27 UTC (951738207)
eth0: link is down
IP-Config: Complete:
device=eth0, addr=10.0.0.30, mask=255.0.0.0, gw=10.0.0.138,
host=smbe460, domain=, nis-domain=(none),
bootserver=10.0.0.10, rootserver=10.0.0.10, rootpath=
Looking up port of RPC 100003/2 on 10.0.0.10
eth0: link is up, 100 FDX, pause enabled
Looking up port of RPC 100005/1 on 10.0.0.10
VFS: Mounted root (nfs filesystem) on device 0:13.
Freeing unused kernel memory: 144k init
pci_bus 0000:00: scanning bus
pci 0000:00:02.0: scanning behind bridge, config 010100, pass 0
pci_bus 0000:01: scanning bus
pci 0000:01:00.0: found [1575:0002] class 00ff00 header type 00
pci 0000:01:00.0: reg 10: [mem 0x00000000-0x000fffff]
pci 0000:01:00.0: reg 14: [mem 0x00000000-0x03ffffff]
pci 0000:01:00.0: reg 18: [mem 0x00000000-0x03ffffff]
pci 0000:01:00.0: reg 1c: [mem 0x00000000-0x00003fff]
pci 0000:01:00.0: calling pcibios_fixup_resources+0x0/0xf4
pci 0000:01:00.0: calling fixup_ppc4xx_pci_bridge+0x0/0x154
pci 0000:01:00.0: calling quirk_resource_alignment+0x0/0x200
pci_bus 0000:01: bus scan returning with max=01
pci 0000:00:02.0: scanning behind bridge, config 010100, pass 1
pci_bus 0000:00: bus scan returning with max=01
pci 0000:00:02.0: disabling bridge window [io 0x0000-0x0fff] to [bus 01-01] (unused)
pci 0000:00:02.0: disabling bridge window [mem 0xd00000000-0xd000fffff pref] to [bus 01-01] (unused)
pci 0000:00:02.0: BAR 8: assigned [mem 0xd80000000-0xd89ffffff]
pci 0000:01:00.0: BAR 1: assigned [mem 0xd80000000-0xd83ffffff]
pci 0000:01:00.0: BAR 1: set to [mem 0xd80000000-0xd83ffffff] (PCI address [0x80000000-0x83ffffff]
pci 0000:01:00.0: BAR 2: assigned [mem 0xd84000000-0xd87ffffff]
pci 0000:01:00.0: BAR 2: set to [mem 0xd84000000-0xd87ffffff] (PCI address [0x84000000-0x87ffffff]
pci 0000:01:00.0: BAR 0: assigned [mem 0xd88000000-0xd880fffff]
pci 0000:01:00.0: BAR 0: set to [mem 0xd88000000-0xd880fffff] (PCI address [0x88000000-0x880fffff]
pci 0000:01:00.0: BAR 3: assigned [mem 0xd88100000-0xd88103fff]
pci 0000:01:00.0: BAR 3: set to [mem 0xd88100000-0xd88103fff] (PCI address [0x88100000-0x88103fff]
# cat /proc/iomem
4bffd0400-4bffd048f : ehci_hcd
4cc000000-4cfffffff : 4cc000000.nor_flash
4e4000000-4e7ffffff : 4e4000000.nor_flash2
4ef600300-4ef600307 : serial
4ef600400-4ef600407 : serial
4ef600500-4ef600507 : serial
4ef600600-4ef600607 : serial
d80000000-dffffffff : /plb/pci@c0ec00000
d80000000-d89ffffff : PCI Bus 0000:01
d80000000-d83ffffff : 0000:01:00.0
d84000000-d87ffffff : 0000:01:00.0
d88000000-d880fffff : 0000:01:00.0
d88100000-d88103fff : 0000:01:00.0
# cat /proc/ioports
00000000-0000ffff : /plb/pci@c0ec00000
00000000-00000fff : Legacy IO
[-- Attachment #3: success.txt --]
[-- Type: text/plain, Size: 15406 bytes --]
Linux version 2.6.33 (felix@felix-laptop.lan) (gcc version 4.2.2) #5 Thu Mar 11 09:35:52 IST 2010
Found legacy serial port 0 for /plb/opb/serial@ef600300
mem=4ef600300, taddr=4ef600300, irq=0, clk=7407407, speed=0
Found legacy serial port 1 for /plb/opb/serial@ef600400
mem=4ef600400, taddr=4ef600400, irq=0, clk=7407407, speed=0
Found legacy serial port 2 for /plb/opb/serial@ef600500
mem=4ef600500, taddr=4ef600500, irq=0, clk=7407407, speed=0
Found legacy serial port 3 for /plb/opb/serial@ef600600
mem=4ef600600, taddr=4ef600600, irq=0, clk=7407407, speed=0
Top of RAM: 0x30000000, Total RAM: 0x30000000
Memory hole size: 0MB
Zone PFN ranges:
DMA 0x00000000 -> 0x00030000
Normal 0x00030000 -> 0x00030000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00030000
On node 0 totalpages: 196608
free_area_init_node: node 0, pgdat c035e76c, node_mem_map c0388000
DMA zone: 1536 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 195072 pages, LIFO batch:31
MMU: Allocated 1088 bytes of context maps for 255 contexts
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 195072
Kernel command line: root=/dev/nfs rw nfsroot=10.0.0.10:/opt/eldk/ppc_4xxFP ip=10.0.0.30:10.0.0.10:10.0.0.138:255.0.0.0:smbe460:eth0:off panic=1 console=ttyS0,115200
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 775552k/786432k available (3364k kernel code, 10604k reserved, 116k data, 128k bss, 144k init)
Kernel virtual memory layout:
* 0xfffdf000..0xfffff000 : fixmap
* 0xfde00000..0xfe000000 : consistent mem
* 0xfde00000..0xfde00000 : early ioremap
* 0xf1000000..0xfde00000 : vmalloc & ioremap
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:512 nr_irqs:512
UIC0 (32 IRQ sources) at DCR 0xc0
UIC1 (32 IRQ sources) at DCR 0xd0
alloc irq_desc for 30 on node 0
alloc kstat_irqs on node 0
irq: irq 30 on host /interrupt-controller0 mapped to virtual irq 30
UIC2 (32 IRQ sources) at DCR 0xe0
alloc irq_desc for 16 on node 0
alloc kstat_irqs on node 0
irq: irq 10 on host /interrupt-controller0 mapped to virtual irq 16
UIC3 (32 IRQ sources) at DCR 0xf0
alloc irq_desc for 17 on node 0
alloc kstat_irqs on node 0
irq: irq 16 on host /interrupt-controller0 mapped to virtual irq 17
time_init: decrementer frequency = 1000.000012 MHz
time_init: processor frequency = 1000.000012 MHz
clocksource: timebase mult[400000] shift[22] registered
clockevent: decrementer mult[80000019] shift[31] cpu[0]
Mount-cache hash table entries: 512
NET: Registered protocol family 16
alloc irq_desc for 18 on node 0
alloc kstat_irqs on node 0
irq: irq 11 on host /interrupt-controller1 mapped to virtual irq 18
256k L2-cache enabled
PCI host bridge /plb/pci@c0ec00000 (primary) ranges:
MEM 0x0000000d80000000..0x0000000dffffffff -> 0x0000000080000000
MEM 0x0000000c0ee00000..0x0000000c0eefffff -> 0x0000000000000000
IO 0x0000000c08000000..0x0000000c0800ffff -> 0x0000000000000000
Removing ISA hole at 0x0000000c0ee00000
4xx PCI DMA offset set to 0x00000000
/plb/pci@c0ec00000: Legacy ISA memory support enabled
PCI: Probing PCI hardware
pci_bus 0000:00: scanning bus
pci 0000:00:02.0: found [3388:0020] class 000604 header type 01
pci 0000:00:02.0: calling pcibios_fixup_resources+0x0/0xf4
pci 0000:00:02.0: calling fixup_ppc4xx_pci_bridge+0x0/0x154
pci 0000:00:02.0: calling quirk_resource_alignment+0x0/0x200
pci 0000:00:02.0: supports D1 D2
pci 0000:00:02.0: PME# supported from D0 D1 D2 D3hot
pci 0000:00:02.0: PME# disabled
pci_bus 0000:00: fixups for bus
pci 0000:00:02.0: scanning behind bridge, config 010100, pass 0
pci_bus 0000:01: scanning bus
pci 0000:01:00.0: found [1575:0002] class 00ff00 header type 00
pci 0000:01:00.0: reg 10: [mem 0x88000000-0x880fffff]
pci 0000:01:00.0: reg 14: [mem 0x80000000-0x83ffffff]
pci 0000:01:00.0: reg 18: [mem 0x84000000-0x87ffffff]
pci 0000:01:00.0: reg 1c: [mem 0x88100000-0x88103fff]
pci 0000:01:00.0: calling pcibios_fixup_resources+0x0/0xf4
pci 0000:01:00.0: calling fixup_ppc4xx_pci_bridge+0x0/0x154
pci 0000:01:00.0: calling quirk_resource_alignment+0x0/0x200
pci_bus 0000:01: fixups for bus
pci 0000:00:02.0: PCI bridge to [bus 01-01]
pci_bus 0000:01: bus scan returning with max=01
pci 0000:00:02.0: scanning behind bridge, config 010100, pass 1
pci_bus 0000:00: bus scan returning with max=01
pci 0000:00:02.0: BAR 8: assigned [mem 0xd80000000-0xd89ffffff]
pci 0000:01:00.0: BAR 1: assigned [mem 0xd80000000-0xd83ffffff]
pci 0000:01:00.0: BAR 1: set to [mem 0xd80000000-0xd83ffffff] (PCI address [0x80000000-0x83ffffff]
pci 0000:01:00.0: BAR 2: assigned [mem 0xd84000000-0xd87ffffff]
pci 0000:01:00.0: BAR 2: set to [mem 0xd84000000-0xd87ffffff] (PCI address [0x84000000-0x87ffffff]
pci 0000:01:00.0: BAR 0: assigned [mem 0xd88000000-0xd880fffff]
pci 0000:01:00.0: BAR 0: set to [mem 0xd88000000-0xd880fffff] (PCI address [0x88000000-0x880fffff]
pci 0000:01:00.0: BAR 3: assigned [mem 0xd88100000-0xd88103fff]
pci 0000:01:00.0: BAR 3: set to [mem 0xd88100000-0xd88103fff] (PCI address [0x88100000-0x88103fff]
pci 0000:00:02.0: PCI bridge to [bus 01-01]
pci 0000:00:02.0: bridge window [io disabled]
pci 0000:00:02.0: bridge window [mem 0xd80000000-0xd89ffffff]
pci 0000:00:02.0: bridge window [mem pref disabled]
pci 0000:00:02.0: enabling device (0084 -> 0086)
pci_bus 0000:00: resource 0 [io 0x0000-0xffff]
pci_bus 0000:00: resource 1 [mem 0xd80000000-0xdffffffff]
pci_bus 0000:01: resource 1 [mem 0xd80000000-0xd89ffffff]
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource timebase
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
UDP hash table entries: 512 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
pci 0000:00:02.0: calling quirk_cardbus_legacy+0x0/0x54
pci 0000:00:02.0: calling quirk_usb_early_handoff+0x0/0x6cc
pci 0000:01:00.0: calling quirk_cardbus_legacy+0x0/0x54
pci 0000:01:00.0: calling quirk_usb_early_handoff+0x0/0x6cc
PCI: CLS 0 bytes, default 32
alloc irq_desc for 19 on node 0
alloc kstat_irqs on node 0
irq: irq 1 on host /interrupt-controller1 mapped to virtual irq 19
alloc irq_desc for 20 on node 0
alloc kstat_irqs on node 0
irq: irq 1 on host /interrupt-controller0 mapped to virtual irq 20
alloc irq_desc for 29 on node 0
alloc kstat_irqs on node 0
irq: irq 29 on host /interrupt-controller1 mapped to virtual irq 29
alloc irq_desc for 21 on node 0
alloc kstat_irqs on node 0
irq: irq 30 on host /interrupt-controller1 mapped to virtual irq 21
JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
msgmni has been set to 1515
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a 16550A
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a 16550A
serial8250.0: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550A
serial8250.0: ttyS3 at MMIO 0x4ef600600 (irq = 21) is a 16550A
4ef600300.serial: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a 16550
4ef600400.serial: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a 16550
4ef600500.serial: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550
4ef600600.serial: ttyS3 at MMIO 0x4ef600600 (irq = 21) is a 16550
brd: module loaded
4e4000000.nor_flash2: Found 1 x16 devices at 0x0 in 16-bit bank
4e4000000.nor_flash2: Found 1 x16 devices at 0x2000000 in 16-bit bank
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
erase region 0: offset=0x0,size=0x8000,blocks=4
erase region 1: offset=0x20000,size=0x20000,blocks=255
erase region 2: offset=0x2000000,size=0x8000,blocks=4
erase region 3: offset=0x2020000,size=0x20000,blocks=255
RedBoot partition parsing not available
Creating 1 MTD partitions on "4e4000000.nor_flash2":
0x000000000000-0x000004000000 : "data"
4cc000000.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank
4cc000000.nor_flash: Found 1 x16 devices at 0x2000000 in 16-bit bank
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
erase region 0: offset=0x0,size=0x8000,blocks=4
erase region 1: offset=0x20000,size=0x20000,blocks=255
erase region 2: offset=0x2000000,size=0x8000,blocks=4
erase region 3: offset=0x2020000,size=0x20000,blocks=255
RedBoot partition parsing not available
Creating 7 MTD partitions on "4cc000000.nor_flash":
0x000000000000-0x0000001e0000 : "kernel"
0x0000001e0000-0x000000200000 : "dtb"
0x000000200000-0x000001600000 : "ramdisk"
0x000001600000-0x000001a00000 : "jffs2"
0x000001a00000-0x000003f60000 : "user"
0x000003f60000-0x000003fa0000 : "u-boot env"
0x000003fa0000-0x000004000000 : "u-boot"
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 806 at 0x0000064c0000
Bad eraseblock 807 at 0x0000064e0000
Bad eraseblock 2209 at 0x000011420000
Bad eraseblock 3294 at 0x000019bc0000
Bad eraseblock 4010 at 0x00001f540000
Bad eraseblock 4748 at 0x000025180000
Bad eraseblock 5082 at 0x000027b40000
Bad eraseblock 5083 at 0x000027b60000
Bad eraseblock 5716 at 0x00002ca80000
Bad eraseblock 5772 at 0x00002d180000
Bad eraseblock 6362 at 0x000031b40000
Bad eraseblock 6680 at 0x000034300000
Bad eraseblock 6740 at 0x000034a80000
Bad eraseblock 6796 at 0x000035180000
Creating 2 MTD partitions on "4e0000000.ndfc.nand":
0x000000000000-0x000000100000 : "u-boot"
0x000000000000-0x000003f00000 : "user"
PPC 4xx OCP EMAC driver, version 3.54
alloc irq_desc for 22 on node 0
alloc kstat_irqs on node 0
irq: irq 6 on host /interrupt-controller2 mapped to virtual irq 22
alloc irq_desc for 23 on node 0
alloc kstat_irqs on node 0
irq: irq 7 on host /interrupt-controller2 mapped to virtual irq 23
alloc irq_desc for 24 on node 0
alloc kstat_irqs on node 0
irq: irq 3 on host /interrupt-controller2 mapped to virtual irq 24
alloc irq_desc for 25 on node 0
alloc kstat_irqs on node 0
irq: irq 4 on host /interrupt-controller2 mapped to virtual irq 25
alloc irq_desc for 26 on node 0
alloc kstat_irqs on node 0
irq: irq 5 on host /interrupt-controller2 mapped to virtual irq 26
MAL v2 /plb/mcmal, 2 TX channels, 16 RX channels
ZMII /plb/opb/emac-zmii@ef600d00 initialized
RGMII /plb/opb/emac-rgmii@ef601500 initialized with MDIO support
TAH /plb/opb/emac-tah@ef601350 initialized
TAH /plb/opb/emac-tah@ef601450 initialized
alloc irq_desc for 27 on node 0
alloc kstat_irqs on node 0
irq: irq 16 on host /interrupt-controller2 mapped to virtual irq 27
alloc irq_desc for 28 on node 0
alloc kstat_irqs on node 0
irq: irq 20 on host /interrupt-controller2 mapped to virtual irq 28
/plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode
eth0: EMAC-0 /plb/opb/ethernet@ef600e00, MAC 00:99:88:77:66:55
eth0: found Generic MII PHY (0x00)
alloc irq_desc for 31 on node 0
alloc kstat_irqs on node 0
irq: irq 17 on host /interrupt-controller2 mapped to virtual irq 31
alloc irq_desc for 32 on node 0
alloc kstat_irqs on node 0
irq: irq 21 on host /interrupt-controller2 mapped to virtual irq 32
/plb/opb/emac-rgmii@ef601500: input 1 in RGMII mode
eth1: EMAC-1 /plb/opb/ethernet@ef600f00, MAC 00:99:88:77:66:56
eth1: found Generic MII PHY (0x10)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
alloc irq_desc for 33 on node 0
alloc kstat_irqs on node 0
irq: irq 29 on host /interrupt-controller2 mapped to virtual irq 33
ppc-of-ehci 4bffd0400.ehci: OF EHCI
ppc-of-ehci 4bffd0400.ehci: new USB bus registered, assigned bus number 1
ppc-of-ehci 4bffd0400.ehci: irq 33, io mem 0x4bffd0400
ppc-of-ehci 4bffd0400.ehci: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: OF EHCI
usb usb1: Manufacturer: Linux 2.6.33 ehci_hcd
usb usb1: SerialNumber: PPC-OF USB
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver libusual
i2c /dev entries driver
alloc irq_desc for 34 on node 0
alloc kstat_irqs on node 0
irq: irq 2 on host /interrupt-controller0 mapped to virtual irq 34
at24 0-0051: 65536 byte 24c512 EEPROM (writable)
at24 0-0053: 256 byte spd EEPROM (read-only)
ibm-iic 4ef600700.i2c: using standard (100 kHz) mode
alloc irq_desc for 35 on node 0
alloc kstat_irqs on node 0
irq: irq 3 on host /interrupt-controller0 mapped to virtual irq 35
ibm-iic 4ef600800.i2c: using standard (100 kHz) mode
rtc-ds1307 5-0068: rtc core: registered ds1338 as rtc0
rtc-ds1307 5-0068: 56 bytes nvram
pca954x 1-0070: registered 8 virtual busses for I2C switch pca9548
pca954x 2-0071: registered 8 virtual busses for I2C switch pca9548
pca954x 3-0072: registered 8 virtual busses for I2C switch pca9548
TCP cubic registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
rtc-ds1307 5-0068: setting system clock to 2000-02-28 11:41:36 UTC (951738096)
eth0: link is down
IP-Config: Complete:
device=eth0, addr=10.0.0.30, mask=255.0.0.0, gw=10.0.0.138,
host=smbe460, domain=, nis-domain=(none),
bootserver=10.0.0.10, rootserver=10.0.0.10, rootpath=
Looking up port of RPC 100003/2 on 10.0.0.10
eth0: link is up, 100 FDX, pause enabled
Looking up port of RPC 100005/1 on 10.0.0.10
VFS: Mounted root (nfs filesystem) on device 0:13.
Freeing unused kernel memory: 144k init
# cat /proc/iomem
4bffd0400-4bffd048f : ehci_hcd
4cc000000-4cfffffff : 4cc000000.nor_flash
4e4000000-4e7ffffff : 4e4000000.nor_flash2
4ef600300-4ef600307 : serial
4ef600400-4ef600407 : serial
4ef600500-4ef600507 : serial
4ef600600-4ef600607 : serial
d80000000-dffffffff : /plb/pci@c0ec00000
d80000000-d89ffffff : PCI Bus 0000:01
d80000000-d83ffffff : 0000:01:00.0
d84000000-d87ffffff : 0000:01:00.0
d88000000-d880fffff : 0000:01:00.0
d88100000-d88103fff : 0000:01:00.0
# cat /proc/ioports
00000000-0000ffff : /plb/pci@c0ec00000
00000000-00000fff : Legacy IO
^ permalink raw reply
* BUG: mpc52xx_gpt mask/unmask of interrupts
From: Henk Stegeman @ 2010-03-11 8:54 UTC (permalink / raw)
To: linuxppc-dev
In mpc52xx_gpt.c
The functions
static void mpc52xx_gpt_irq_unmask(unsigned int virq)
static void mpc52xx_gpt_irq_mask(unsigned int virq)
Respectively clear and set bit IRQ_EN (INT_EN in MPC5200B user manual)
of the GPT's enable and mode select register.
Refer to Figure 7-45 and table 7-48 on page 229 of
http://www.freescale.com/files/32bit/doc/ref_manual/MPC5200BUM.pdf
I believe this is wrong (and I've seen this go wrong) because this bit
disables the generation of interrupts, and therefore kills detection
of edged interrupts between calls of mpc52xx_gpt_irq_mask and
mpc52xx_gpt_irq_unmask. I also suspect that clearing this bit clears
an already pending interrupt, which could be the cause of spurious
interrupts I am getting on my board.
Freescale has confirmed to me that this INT_EN bit is indeed not a
mask, but an enable for interrupts.
It seems to me that the only way to mask interrupts for this situation
is to set the TMRx bit for the gpt in the ICTL Critical Priority and
Main Interrupt mask register (table 7-9 on page 175). These bits are
now handled by mpc52xx_pic, the driver for the interrupt the gpt irq
is cascaded to from.
I have no complete idea for a fix yet.
Is it possible to somehow make use of the mpc52xx_pic mask funtions?
For this case that would be quite valid as the gpt as interrupt
controller only provides one interrupt, so masking one is the same as
masking 'all' on the parent.
Cheers,
Henk Stegeman
^ permalink raw reply
* Re: PowerPC 85xx board are caused die by Commit: 864b9e6fd76489aab422bac62162f57c52e06ed8(powerpc: Use lwarx/ldarx hint in bit locks)
From: Andrew Liu @ 2010-03-11 8:57 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, Anton Blanchard
In-Reply-To: <99C6B559-9FEC-4B6A-BE5A-213D3E61A2C6@kernel.crashing.org>
[-- Attachment #1: Type: text/plain, Size: 1578 bytes --]
Just validated it, this fix can make fsl_p2020ds work again.
Andrew
On Thu, Mar 11, 2010 at 1:39 PM, Kumar Gala <galak@kernel.crashing.org>wrote:
>
> On Mar 10, 2010, at 11:20 PM, Kumar Gala wrote:
>
> >
> > On Mar 10, 2010, at 9:20 PM, Andrew Liu wrote:
> >
> >> Hi Guys:
> >> I have done several experiments on fsl_8548cds and fsl_p2020rdb,
> pinpointed the commit: 864b9e6fd76489aab422bac62162f57c52e06ed8(powerpc: Use
> lwarx/ldarx hint in bit locks) cause the bootup stalledd.
> >>
> >> "
> >> Filename 'fsl_8548cds/uImage'.
> >> Load address: 0x1000000
> >> Loading:
> #################################################################
> >> #######################################
> >> done
> >> Bytes transferred = 1526546 (174b12 hex)
> >> Speed: 100, full duplex
> >> Using eTSEC0 device
> >> Filename 'sliu/fsl_8548cds/mpc8548cds.dtb'.
> >> Load address: 0xc00000
> >> Loading: #
> >> done
> >> Bytes transferred = 9993 (2709 hex)
> >> ## Booting image at 01000000 ...
> >> Image Name: Linux-2.6.34-rc1-00005-g522dba7
> >> Image Type: PowerPC Linux Kernel Image (gzip compressed)
> >> Data Size: 1526482 Bytes = 1.5 MB
> >> Load Address: 00000000
> >> Entry Point: 00000000
> >> Verifying Checksum ... OK
> >> Uncompressing Kernel Image ... OK
> >> Booting using the fdt at 0xc00000
> >> Loading Device Tree to 007fb000, end 007fd708 ... OK
> >> "
> >>
> >> I guess all 85xx or booke board has this issue.
> >
> > that's very odd since __PPC_EH should be ignored on PPC32 and thus 85xx.
>
> Found the issue and posted a fix.
>
> - k
[-- Attachment #2: Type: text/html, Size: 2273 bytes --]
^ permalink raw reply
* MTD partitions missing
From: garazi juez uriagereka @ 2010-03-11 11:22 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 2245 bytes --]
Hello,
I am Garazi and I am
working in the Electronic Design Group at the University of the
Basque Country.
I'm running the Xilinx git kernel 2.6.31
from git.xilinx.com on a V5 PPC440 CORE( Xilinx ML507). We have a NOR CFI
flash device.
Flash chip has been particionated according to
this table:
START ADDRESS
OFFSET
SIZE
LINUX
0xFE000000
0x00000000
0x00500000 (5M)
JFFS2 Filesystem
0xFE500000
0x00500000
0x01600000 (22M)
UNUSED
0xFFB00000
0x01B00000
0x00114000(4896 K)
LOADER
0xFFFE0000
0x01FE0000
0x00020000(128K)
In order to get this four partitions, my .dts file has been
configured this way:
bootargs =
"console=ttyS0 ip=on root=/dev/ram rw
mtdparts=fe000000.flash:5M(zImage),22M(rootfs),4896k(unused),128k(loader)";
First
of all, linux kernel was booted from Flash, using a ramdisk for the
flash system and a loader , and it worked.
Now, I am trying to
mount JFFS2 file system but I can not. I have tried it in two
different ways:
1. Mounting JFFS2 file system when the
kernel has already booted.
2. Changing my dts file and mounting JFFS2
automatically when kernel boots.
bootargs =
"console=ttyS0 ip=on root=/dev/mtdblock1 rw rootfs=jffs2
mtdparts=fe000000.flash:5M(zImage),22M(rootfs),4896k(unused),128k(loader)";
I
guess that the problem is related to MTD driver, because mtd
partitions are not correctly created. I check partition file and just one of four partition appears
(cat /proc/partitions --> mtdblock0 just
appears).
I have read in the Internet that there are other
people who have had the same problem when they have updated 2.6.28
kernel to 2.6.31 kernel. Although, there is no answer.
I would appreciate any kind of help.
Regards,
Garazi
_________________________________________________________________
Recibe en tu móvil un SMS con tu Hotmail recibido. ¡Date de alta ya!
http://serviciosmoviles.es.msn.com/
[-- Attachment #2: Type: text/html, Size: 11158 bytes --]
^ permalink raw reply
* Linus' kernel tree over ads5121-rev4
From: CTAG / Moisés Domínguez @ 2010-03-11 12:53 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 645 bytes --]
Hi,
I am started with freescale LTIB but I decided to make a clone of Linus'
kernel tree mainly to have the latest and fixed mscan driver.
Linux is uncompressed and starts right, but when DIU driver probe function
is called (exactly when first framebuffer device is registered) linux
restarts. This behaviour repeats indefinitely.
(same behaviour with denx kernel tree).
I am using .dts that comes in the Linuskernel tree. Maybe this .dts board
revision dependent?
I updated u-boot to with the denx one but similar results.
Maybe basic questions. Sorry for that.
Regards, Moises.
[-- Attachment #2: Type: text/html, Size: 3503 bytes --]
^ permalink raw reply
* Re: [PATCH 1/6] arch/powerpc/platforms/pseries: Use kasprintf
From: Nathan Fontenot @ 2010-03-11 15:16 UTC (permalink / raw)
To: Julia Lawall; +Cc: kernel-janitors, Paul Mackerras, linux-kernel, linuxppc-dev
In-Reply-To: <Pine.LNX.4.64.1003102214430.1672@ask.diku.dk>
Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
>
> kasprintf combines kmalloc and sprintf, and takes care of the size
> calculation itself.
>
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression a,flag;
> expression list args;
> statement S;
> @@
>
> a =
> - \(kmalloc\|kzalloc\)(...,flag)
> + kasprintf(flag,args)
> <... when != a
> if (a == NULL || ...) S
> ...>
> - sprintf(a,args);
> // </smpl>
>
Looks good, thanks.
> Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Nathan Fontenot <nfont@austin.ibm.com>
>
> ---
> arch/powerpc/platforms/pseries/dlpar.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff -u -p a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
> --- a/arch/powerpc/platforms/pseries/dlpar.c
> +++ b/arch/powerpc/platforms/pseries/dlpar.c
> @@ -78,13 +78,12 @@ static struct device_node *dlpar_parse_c
> * prepend this to the full_name.
> */
> name = (char *)ccwa + ccwa->name_offset;
> - dn->full_name = kmalloc(strlen(name) + 2, GFP_KERNEL);
> + dn->full_name = kasprintf(GFP_KERNEL, "/%s", name);
> if (!dn->full_name) {
> kfree(dn);
> return NULL;
> }
>
> - sprintf(dn->full_name, "/%s", name);
> return dn;
> }
>
> @@ -409,15 +408,13 @@ static ssize_t dlpar_cpu_probe(const cha
> * directory of the device tree. CPUs actually live in the
> * cpus directory so we need to fixup the full_name.
> */
> - cpu_name = kzalloc(strlen(dn->full_name) + strlen("/cpus") + 1,
> - GFP_KERNEL);
> + cpu_name = kasprintf(GFP_KERNEL, "/cpus%s", dn->full_name);
> if (!cpu_name) {
> dlpar_free_cc_nodes(dn);
> rc = -ENOMEM;
> goto out;
> }
>
> - sprintf(cpu_name, "/cpus%s", dn->full_name);
> kfree(dn->full_name);
> dn->full_name = cpu_name;
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply
* [PATCH 00/37] OF: move device node pointer into struct device.
From: Grant Likely @ 2010-03-11 18:03 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2,
jeremy.kerr, James.Bottomley, broonie, microblaze-uclinux,
linux-kernel, linuxppc-dev, sparclinux, linux-ide, netdev,
linux-i2c, devicetree-discuss, linux-scsi, alsa-devel
Currently on OF enabled platforms, the device node pointer is stored in
both device.archdata.of_node (.prom_node on sparc), and in of_device.node
OF device tree support is being generalized to work on any platform, so
instead of adding the of_node pointer to each platform's archdata
individually, this patch series moves the of_node pointer into struct
device proper and fixes up all users to reference the new location.
The last 3 patches in this series remove the old .archdata.of_node,
.archdata.prom_node and of_device.node instances.
This series has been compile tested on powerpc, sparc and microblaze,
(allmodconfig used on sparc and powerpc) and boot tested on an mpc5200
powerpc. All known (or at least all I could find) in-tree users of the
old names have been removed.
This series should also be fully bisectable. After I collect acks, I
would like to get this whole series into linux-next to see if I've
missed any references, but I can probably hold off merging the last
three patches when the 2.6.35 merge window opens to give out of tree
users a bit more time to adapt. In fact, I'd probably wait a few
extra days after pushing out the bulk of this series before I push the
last 3 patches into my linux-next branch to isolate the drivers that I
missed while fixing.
Cheers,
g.
---
Grant Likely (37):
arch/sparc: Remove .archdata.of_node and use .of_node in struct device
arch/microblaze: Remove .archdata.of_node and use .of_node in struct device
arch/powerpc: Remove .archdata.of_node and use .of_node in struct device
sound/sparc: use .dev.of_node instead of .node in struct of_device
sound/soc: use .dev.of_node instead of .node in struct of_device
sound/aoa: use .dev.of_node instead of .node in struct of_device
drivers/of: use .of_node instead of .archdata.of_node in struct device
drivers/cdrom: use .of_node instead of .archdata.of_node in struct device
drivers/char: use .of_node instead of .archdata.of_node in struct device
drivers/scsi: use .of_node instead of .archdata.of_node in struct device
drivers/of: use .dev.of_node instead of .node in struct of_device
drivers/mtd: use .dev.of_node instead of .node in struct of_device
drivers/infiniband: use .dev.of_node instead of .node in struct of_device
drivers/char: use .dev.of_node instead of .node in struct of_device
drivers/i2c: use .dev.of_node instead of .node in struct of_device
drivers/leds: use .dev.of_node instead of .node in struct of_device
drivers/ata: use .dev.of_node instead of .node in struct of_device
drivers/input: use .dev.of_node instead of .node in struct of_device
drivers/serial: use .dev.of_node instead of .node in struct of_device
drivers/pcmcia: use .dev.of_node instead of .node in struct of_device
drivers/net: use .dev.of_node instead of .node in struct of_device
drivers/sbus: use .dev.of_node instead of .node in struct of_device
drivers/mmc: use .dev.of_node instead of .node in struct of_device
drivers/spi: use .dev.of_node instead of .node in struct of_device
drivers/macintosh: use .dev.of_node instead of .node in struct of_device
drivers/usb: use .dev.of_node instead of .node in struct of_device
drivers/scsi: use .dev.of_node instead of .node in struct of_device
drivers/video: use .dev.of_node instead of .node in struct of_device
drivers/atm: use .dev.of_node instead of .node in struct of_device
drivers/watchdog: use .dev.of_node instead of .node in struct of_device
drivers/serial: use .dev.of_node instead of .node in struct of_device
arch/microblaze: use .dev.of_node instead of .node in struct of_device
arch/powerpc: use .dev.of_node instead of .node in struct of_device
arch/sparc: use .dev.of_node instead of .node in struct of_device
of/sparc: use dev->of_node instead of dev->archdata.prom_node
of: Eliminate dev_archdata_get_node()
i2c/of: Allow device node to be passed via i2c_board_info
arch/microblaze/include/asm/device.h | 14 ------------
arch/microblaze/include/asm/of_device.h | 1 -
arch/microblaze/kernel/of_device.c | 12 ++++------
arch/microblaze/kernel/of_platform.c | 4 ++-
arch/powerpc/include/asm/device.h | 22 +++++++------------
arch/powerpc/include/asm/macio.h | 2 +-
arch/powerpc/include/asm/of_device.h | 1 -
arch/powerpc/kernel/ibmebus.c | 4 ++-
arch/powerpc/kernel/of_device.c | 12 ++++------
arch/powerpc/kernel/of_platform.c | 16 +++++++-------
arch/powerpc/kernel/pci-common.c | 1 -
arch/powerpc/kernel/vio.c | 17 +++++++--------
arch/powerpc/platforms/52xx/mpc52xx_gpio.c | 4 ++-
arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 16 +++++++-------
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 6 +++--
arch/powerpc/platforms/82xx/ep8248e.c | 6 +++--
arch/powerpc/platforms/83xx/suspend.c | 2 +-
arch/powerpc/platforms/cell/axon_msi.c | 2 +-
arch/powerpc/platforms/cell/iommu.c | 5 ++--
arch/powerpc/platforms/pasemi/gpio_mdio.c | 2 +-
arch/powerpc/platforms/pasemi/setup.c | 4 ++-
arch/powerpc/platforms/ps3/system-bus.c | 1 -
arch/powerpc/platforms/pseries/iommu.c | 2 +-
arch/powerpc/sysdev/axonram.c | 6 +++--
arch/powerpc/sysdev/bestcomm/bestcomm.c | 8 +++----
arch/powerpc/sysdev/fsl_msi.c | 14 ++++++------
arch/powerpc/sysdev/fsl_pmc.c | 2 +-
arch/powerpc/sysdev/pmi.c | 2 +-
arch/sparc/include/asm/device.h | 15 -------------
arch/sparc/include/asm/fb.h | 2 +-
arch/sparc/include/asm/floppy_64.h | 4 ++-
arch/sparc/include/asm/of_device.h | 1 -
arch/sparc/include/asm/parport.h | 2 +-
arch/sparc/kernel/auxio_64.c | 2 +-
arch/sparc/kernel/central.c | 4 ++-
arch/sparc/kernel/chmc.c | 10 ++++-----
arch/sparc/kernel/ioport.c | 2 +-
arch/sparc/kernel/of_device_32.c | 18 +++++++---------
arch/sparc/kernel/of_device_64.c | 29 ++++++++++++-------------
arch/sparc/kernel/of_device_common.c | 4 ++-
arch/sparc/kernel/pci.c | 13 ++++-------
arch/sparc/kernel/pci_common.c | 9 ++++----
arch/sparc/kernel/pci_fire.c | 4 ++-
arch/sparc/kernel/pci_msi.c | 18 ++++++++--------
arch/sparc/kernel/pci_psycho.c | 4 ++-
arch/sparc/kernel/pci_sabre.c | 4 ++-
arch/sparc/kernel/pci_schizo.c | 14 ++++++------
arch/sparc/kernel/pci_sun4v.c | 8 +++----
arch/sparc/kernel/power.c | 4 ++-
arch/sparc/kernel/psycho_common.c | 2 +-
arch/sparc/kernel/sbus.c | 16 +++++++-------
arch/sparc/kernel/time_32.c | 2 +-
arch/sparc/kernel/time_64.c | 6 +++--
drivers/ata/pata_macio.c | 2 +-
drivers/ata/pata_of_platform.c | 2 +-
drivers/atm/fore200e.c | 16 ++++++++------
drivers/cdrom/viocd.c | 2 +-
drivers/char/hw_random/n2-drv.c | 2 +-
drivers/char/hw_random/pasemi-rng.c | 2 +-
drivers/char/ipmi/ipmi_si_intf.c | 4 ++-
drivers/char/viotape.c | 2 +-
drivers/gpio/pca953x.c | 2 +-
drivers/i2c/busses/i2c-mpc.c | 17 ++++++++-------
drivers/i2c/i2c-core.c | 3 +++
drivers/ide/pmac.c | 10 ++++-----
drivers/infiniband/hw/ehca/ehca_main.c | 11 +++++----
drivers/input/serio/i8042-sparcio.h | 2 +-
drivers/input/serio/xilinx_ps2.c | 8 +++----
drivers/leds/leds-gpio.c | 2 +-
drivers/macintosh/macio_asic.c | 16 +++++++-------
drivers/macintosh/macio_sysfs.c | 6 +++--
drivers/macintosh/rack-meter.c | 4 ++-
drivers/macintosh/therm_pm72.c | 2 +-
drivers/mmc/host/of_mmc_spi.c | 4 ++-
drivers/mmc/host/sdhci-of-core.c | 2 +-
drivers/mtd/maps/physmap_of.c | 6 +++--
drivers/mtd/maps/sun_uflash.c | 2 +-
drivers/mtd/nand/fsl_elbc_nand.c | 6 +++--
drivers/mtd/nand/pasemi_nand.c | 2 +-
drivers/net/can/sja1000/sja1000_of_platform.c | 4 ++-
drivers/net/ehea/ehea_main.c | 14 ++++++------
drivers/net/greth.c | 3 ++-
drivers/net/ibm_newemac/core.c | 13 ++++++-----
drivers/net/ibm_newemac/debug.c | 9 ++++----
drivers/net/ibm_newemac/debug.h | 4 ++-
drivers/net/ibm_newemac/mal.c | 28 ++++++++++++------------
drivers/net/ibm_newemac/rgmii.c | 12 +++++-----
drivers/net/ibm_newemac/tah.c | 7 +++---
drivers/net/ibm_newemac/zmii.c | 9 ++++----
drivers/net/myri_sbus.c | 2 +-
drivers/net/niu.c | 10 ++++-----
drivers/net/phy/mdio-gpio.c | 6 +++--
drivers/net/sunbmac.c | 6 +++--
drivers/net/sunhme.c | 8 +++----
drivers/net/sunlance.c | 6 +++--
drivers/net/sunqe.c | 6 +++--
drivers/net/xilinx_emaclite.c | 8 +++----
drivers/of/device.c | 20 +++++++++--------
drivers/of/of_i2c.c | 4 ++-
drivers/of/of_mdio.c | 5 ++--
drivers/of/of_spi.c | 1 -
drivers/pcmcia/electra_cf.c | 2 +-
drivers/sbus/char/bbc_envctrl.c | 4 ++-
drivers/sbus/char/bbc_i2c.c | 4 ++-
drivers/sbus/char/display7seg.c | 2 +-
drivers/sbus/char/envctrl.c | 2 +-
drivers/sbus/char/flash.c | 4 ++-
drivers/sbus/char/uctrl.c | 2 +-
drivers/scsi/ibmvscsi/ibmvfc.c | 2 +-
drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +-
drivers/scsi/qlogicpti.c | 10 ++++-----
drivers/scsi/sun_esp.c | 16 +++++++-------
drivers/serial/apbuart.c | 2 +-
drivers/serial/mpc52xx_uart.c | 8 +++----
drivers/serial/nwpserial.c | 2 +-
drivers/serial/of_serial.c | 4 ++-
drivers/serial/pmac_zilog.c | 2 +-
drivers/serial/sunhv.c | 2 +-
drivers/serial/sunsab.c | 6 +++--
drivers/serial/sunsu.c | 6 +++--
drivers/serial/sunzilog.c | 8 +++----
drivers/serial/uartlite.c | 6 +++--
drivers/spi/mpc52xx_psc_spi.c | 11 +++++----
drivers/spi/mpc52xx_spi.c | 14 ++++++------
drivers/spi/spi_mpc8xxx.c | 6 +++--
drivers/usb/host/ehci-ppc-of.c | 2 +-
drivers/usb/host/isp1760-if.c | 2 +-
drivers/usb/host/ohci-ppc-of.c | 2 +-
drivers/video/cg6.c | 2 +-
drivers/video/ffb.c | 2 +-
drivers/watchdog/cpwd.c | 2 +-
include/linux/i2c.h | 4 +++
sound/aoa/fabrics/layout.c | 2 +-
sound/aoa/soundbus/core.c | 8 +++----
sound/aoa/soundbus/i2sbus/control.c | 2 +-
sound/aoa/soundbus/i2sbus/core.c | 4 ++-
sound/aoa/soundbus/sysfs.c | 4 ++-
sound/soc/fsl/mpc8610_hpcd.c | 2 +-
sound/sparc/cs4231.c | 6 +++--
sound/sparc/dbri.c | 2 +-
140 files changed, 422 insertions(+), 458 deletions(-)
--
Signature
^ permalink raw reply
* [PATCH 01/37] i2c/of: Allow device node to be passed via i2c_board_info
From: Grant Likely @ 2010-03-11 18:03 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2,
jeremy.kerr, James.Bottomley, broonie, microblaze-uclinux,
linux-kernel, linuxppc-dev, sparclinux, linux-ide, netdev,
linux-i2c, devicetree-discuss, linux-scsi, alsa-devel
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
The struct device_node *of_node pointer is moving out of dev->archdata
and into the struct device proper. of_i2c.c needs to set the of_node
pointer before the device is registered. Since the i2c subsystem
doesn't allow 2 stage allocation and registration of i2c devices, the
of_node pointer needs to be passed via the i2c_board_info structure
so that it is set prior to registration.
This patch adds of_node to struct i2c_board_info (conditional on
CONFIG_OF), sets of_node in i2c_new_device(), and modifies of_i2c.c
to use the new parameter. The calling of dev_archdata_set_node()
from of_i2c will be removed in a subsequent patch when of_node is
removed from archdata and all users are converted over.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/i2c/i2c-core.c | 3 +++
drivers/of/of_i2c.c | 3 ++-
include/linux/i2c.h | 4 ++++
3 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 3202a86..4099b2b 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -387,6 +387,9 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
client->dev.parent = &client->adapter->dev;
client->dev.bus = &i2c_bus_type;
client->dev.type = &i2c_client_type;
+#ifdef CONFIG_OF
+ client->dev.of_node = info->of_node;
+#endif
dev_set_name(&client->dev, "%d-%04x", i2c_adapter_id(adap),
client->addr);
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index a3a708e..605bc42 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -42,7 +42,8 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
info.addr = be32_to_cpup(addr);
- dev_archdata_set_node(&dev_ad, node);
+ dev_archdata_set_node(&dev_ad, node); /* temporary */
+ info.of_node = node;
info.archdata = &dev_ad;
request_module("%s", info.type);
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 0a5da63..4f37ff1 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -34,6 +34,7 @@
#include <linux/device.h> /* for struct device */
#include <linux/sched.h> /* for completion */
#include <linux/mutex.h>
+#include <linux/of.h> /* for struct device_node */
extern struct bus_type i2c_bus_type;
@@ -251,6 +252,9 @@ struct i2c_board_info {
unsigned short addr;
void *platform_data;
struct dev_archdata *archdata;
+#ifdef CONFIG_OF
+ struct device_node *of_node;
+#endif
int irq;
};
^ permalink raw reply related
* [PATCH 02/37] of: Eliminate dev_archdata_get_node()
From: Grant Likely @ 2010-03-11 18:03 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2,
jeremy.kerr, James.Bottomley, broonie, microblaze-uclinux,
linux-kernel, linuxppc-dev, sparclinux, linux-ide, netdev,
linux-i2c, devicetree-discuss, linux-scsi, alsa-devel
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
The device_node pointer is now stored in struct device->of_node so we
no longer need the dev_archdata_get_node() accessor. Read the of_node
directly instead.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/microblaze/include/asm/device.h | 6 ------
arch/powerpc/include/asm/device.h | 6 ------
arch/sparc/include/asm/device.h | 6 ------
drivers/gpio/pca953x.c | 2 +-
drivers/mmc/host/of_mmc_spi.c | 4 ++--
drivers/of/of_i2c.c | 2 +-
drivers/of/of_mdio.c | 4 ++--
drivers/spi/spi_mpc8xxx.c | 6 +++---
8 files changed, 9 insertions(+), 27 deletions(-)
diff --git a/arch/microblaze/include/asm/device.h b/arch/microblaze/include/asm/device.h
index 78a0384..2370888 100644
--- a/arch/microblaze/include/asm/device.h
+++ b/arch/microblaze/include/asm/device.h
@@ -25,12 +25,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad,
ad->of_node = np;
}
-static inline struct device_node *
-dev_archdata_get_node(const struct dev_archdata *ad)
-{
- return ad->of_node;
-}
-
#endif /* _ASM_MICROBLAZE_DEVICE_H */
diff --git a/arch/powerpc/include/asm/device.h b/arch/powerpc/include/asm/device.h
index 6d94d27..0aa81d3 100644
--- a/arch/powerpc/include/asm/device.h
+++ b/arch/powerpc/include/asm/device.h
@@ -36,12 +36,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad,
ad->of_node = np;
}
-static inline struct device_node *
-dev_archdata_get_node(const struct dev_archdata *ad)
-{
- return ad->of_node;
-}
-
struct pdev_archdata {
};
diff --git a/arch/sparc/include/asm/device.h b/arch/sparc/include/asm/device.h
index f3b85b6..55dadca 100644
--- a/arch/sparc/include/asm/device.h
+++ b/arch/sparc/include/asm/device.h
@@ -26,12 +26,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad,
ad->prom_node = np;
}
-static inline struct device_node *
-dev_archdata_get_node(const struct dev_archdata *ad)
-{
- return ad->prom_node;
-}
-
struct pdev_archdata {
};
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
index ab5daab..abc9b8c 100644
--- a/drivers/gpio/pca953x.c
+++ b/drivers/gpio/pca953x.c
@@ -436,7 +436,7 @@ pca953x_get_alt_pdata(struct i2c_client *client)
struct device_node *node;
const uint16_t *val;
- node = dev_archdata_get_node(&client->dev.archdata);
+ node = client->dev.of_node;
if (node == NULL)
return NULL;
diff --git a/drivers/mmc/host/of_mmc_spi.c b/drivers/mmc/host/of_mmc_spi.c
index 0c7a63c..a1ec5d0 100644
--- a/drivers/mmc/host/of_mmc_spi.c
+++ b/drivers/mmc/host/of_mmc_spi.c
@@ -63,7 +63,7 @@ static int of_mmc_spi_get_ro(struct device *dev)
struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi)
{
struct device *dev = &spi->dev;
- struct device_node *np = dev_archdata_get_node(&dev->archdata);
+ struct device_node *np = dev->of_node;
struct of_mmc_spi *oms;
const u32 *voltage_ranges;
int num_ranges;
@@ -134,7 +134,7 @@ EXPORT_SYMBOL(mmc_spi_get_pdata);
void mmc_spi_put_pdata(struct spi_device *spi)
{
struct device *dev = &spi->dev;
- struct device_node *np = dev_archdata_get_node(&dev->archdata);
+ struct device_node *np = dev->of_node;
struct of_mmc_spi *oms = to_of_mmc_spi(dev);
int i;
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index 605bc42..43f803e 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -69,7 +69,7 @@ EXPORT_SYMBOL(of_register_i2c_devices);
static int of_dev_node_match(struct device *dev, void *data)
{
- return dev_archdata_get_node(&dev->archdata) == data;
+ return dev->of_node == data;
}
/* must call put_device() when done with returned i2c_client device */
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 3bf20bf..64e08d7 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -101,7 +101,7 @@ EXPORT_SYMBOL(of_mdiobus_register);
/* Helper function for of_phy_find_device */
static int of_phy_match(struct device *dev, void *phy_np)
{
- return dev_archdata_get_node(&dev->archdata) == phy_np;
+ return dev->of_node == phy_np;
}
/**
@@ -167,7 +167,7 @@ struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
if (!dev->dev.parent)
return NULL;
- net_np = dev_archdata_get_node(&dev->dev.parent->archdata);
+ net_np = dev->dev.parent->of_node;
if (!net_np)
return NULL;
diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c
index 4f0cc9d..38b9c32 100644
--- a/drivers/spi/spi_mpc8xxx.c
+++ b/drivers/spi/spi_mpc8xxx.c
@@ -796,7 +796,7 @@ static void mpc8xxx_spi_free_dummy_rx(void)
static unsigned long mpc8xxx_spi_cpm_get_pram(struct mpc8xxx_spi *mspi)
{
struct device *dev = mspi->dev;
- struct device_node *np = dev_archdata_get_node(&dev->archdata);
+ struct device_node *np = dev->of_node;
const u32 *iprop;
int size;
unsigned long spi_base_ofs;
@@ -850,7 +850,7 @@ static unsigned long mpc8xxx_spi_cpm_get_pram(struct mpc8xxx_spi *mspi)
static int mpc8xxx_spi_cpm_init(struct mpc8xxx_spi *mspi)
{
struct device *dev = mspi->dev;
- struct device_node *np = dev_archdata_get_node(&dev->archdata);
+ struct device_node *np = dev->of_node;
const u32 *iprop;
int size;
unsigned long pram_ofs;
@@ -1122,7 +1122,7 @@ static void mpc8xxx_spi_cs_control(struct spi_device *spi, bool on)
static int of_mpc8xxx_spi_get_chipselects(struct device *dev)
{
- struct device_node *np = dev_archdata_get_node(&dev->archdata);
+ struct device_node *np = dev->of_node;
struct fsl_spi_platform_data *pdata = dev->platform_data;
struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata);
unsigned int ngpios;
^ permalink raw reply related
* [PATCH 03/37] of/sparc: use dev->of_node instead of dev->archdata.prom_node
From: Grant Likely @ 2010-03-11 18:04 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2,
jeremy.kerr, James.Bottomley, broonie, microblaze-uclinux,
linux-kernel, linuxppc-dev, sparclinux, linux-ide, netdev,
linux-i2c, devicetree-discuss, linux-scsi, alsa-devel
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
The prom_node pointer is being moved out of archdata to dev->of_node.
This patch changes users of prom_node to use the new location.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/sparc/include/asm/fb.h | 2 +-
arch/sparc/kernel/of_device_32.c | 3 ++-
arch/sparc/kernel/of_device_64.c | 3 ++-
arch/sparc/kernel/pci.c | 4 ++--
4 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/arch/sparc/include/asm/fb.h b/arch/sparc/include/asm/fb.h
index b83e447..e834880 100644
--- a/arch/sparc/include/asm/fb.h
+++ b/arch/sparc/include/asm/fb.h
@@ -18,7 +18,7 @@ static inline int fb_is_primary_device(struct fb_info *info)
struct device *dev = info->device;
struct device_node *node;
- node = dev->archdata.prom_node;
+ node = dev->of_node;
if (node &&
node == of_console_device)
return 1;
diff --git a/arch/sparc/kernel/of_device_32.c b/arch/sparc/kernel/of_device_32.c
index da527b3..5a5509c 100644
--- a/arch/sparc/kernel/of_device_32.c
+++ b/arch/sparc/kernel/of_device_32.c
@@ -345,8 +345,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
return NULL;
sd = &op->dev.archdata;
- sd->prom_node = dp;
+ sd->prom_node = dp; /* temporary */
sd->op = op;
+ op->dev.of_node = dp;
op->node = dp;
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c
index b3d4cb5..9d30b07 100644
--- a/arch/sparc/kernel/of_device_64.c
+++ b/arch/sparc/kernel/of_device_64.c
@@ -640,9 +640,10 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
return NULL;
sd = &op->dev.archdata;
- sd->prom_node = dp;
+ sd->prom_node = dp; /* temporary */
sd->op = op;
+ op->dev.of_node = dp;
op->node = dp;
op->clock_freq = of_getintprop_default(dp, "clock-frequency",
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index cf73f43..40861ed 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -654,7 +654,7 @@ show_pciobppath_attr(struct device * dev, struct device_attribute * attr, char *
struct device_node *dp;
pdev = to_pci_dev(dev);
- dp = pdev->dev.archdata.prom_node;
+ dp = pdev->dev.of_node;
return snprintf (buf, PAGE_SIZE, "%s\n", dp->full_name);
}
@@ -1023,7 +1023,7 @@ void arch_teardown_msi_irq(unsigned int virt_irq)
struct device_node *pci_device_to_OF_node(struct pci_dev *pdev)
{
- return pdev->dev.archdata.prom_node;
+ return pdev->dev.of_node;
}
EXPORT_SYMBOL(pci_device_to_OF_node);
^ permalink raw reply related
* [PATCH 04/37] arch/sparc: use .dev.of_node instead of .node in struct of_device
From: Grant Likely @ 2010-03-11 18:04 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2,
jeremy.kerr, James.Bottomley, broonie, microblaze-uclinux,
linux-kernel, linuxppc-dev, sparclinux, linux-ide, netdev,
linux-i2c, devicetree-discuss, linux-scsi, alsa-devel
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
.node is being removed
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/sparc/include/asm/floppy_64.h | 4 ++--
arch/sparc/include/asm/parport.h | 2 +-
arch/sparc/kernel/auxio_64.c | 2 +-
arch/sparc/kernel/central.c | 4 ++--
arch/sparc/kernel/chmc.c | 10 +++++-----
arch/sparc/kernel/ioport.c | 2 +-
arch/sparc/kernel/of_device_32.c | 14 +++++++-------
arch/sparc/kernel/of_device_64.c | 26 +++++++++++++-------------
arch/sparc/kernel/of_device_common.c | 4 ++--
arch/sparc/kernel/pci.c | 8 +++-----
arch/sparc/kernel/pci_common.c | 9 +++++----
arch/sparc/kernel/pci_fire.c | 4 ++--
arch/sparc/kernel/pci_msi.c | 18 +++++++++---------
arch/sparc/kernel/pci_psycho.c | 4 ++--
arch/sparc/kernel/pci_sabre.c | 4 ++--
arch/sparc/kernel/pci_schizo.c | 14 +++++++-------
arch/sparc/kernel/pci_sun4v.c | 8 ++++----
arch/sparc/kernel/power.c | 4 ++--
arch/sparc/kernel/psycho_common.c | 2 +-
arch/sparc/kernel/sbus.c | 16 ++++++++--------
arch/sparc/kernel/time_32.c | 2 +-
arch/sparc/kernel/time_64.c | 6 +++---
22 files changed, 83 insertions(+), 84 deletions(-)
diff --git a/arch/sparc/include/asm/floppy_64.h b/arch/sparc/include/asm/floppy_64.h
index 36439d6..8fac3ab 100644
--- a/arch/sparc/include/asm/floppy_64.h
+++ b/arch/sparc/include/asm/floppy_64.h
@@ -589,7 +589,7 @@ static unsigned long __init sun_floppy_init(void)
if (!op)
return 0;
- state_prop = of_get_property(op->node, "status", NULL);
+ state_prop = of_get_property(op->dev.of_node, "status", NULL);
if (state_prop && !strncmp(state_prop, "disabled", 8))
return 0;
@@ -716,7 +716,7 @@ static unsigned long __init sun_floppy_init(void)
return sun_floppy_types[0];
}
- prop = of_get_property(op->node, "status", NULL);
+ prop = of_get_property(op->dev.of_node, "status", NULL);
if (prop && !strncmp(state, "disabled", 8))
return 0;
diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h
index ff9ead6..1bb6a41 100644
--- a/arch/sparc/include/asm/parport.h
+++ b/arch/sparc/include/asm/parport.h
@@ -113,7 +113,7 @@ static int __devinit ecpp_probe(struct of_device *op, const struct of_device_id
struct parport *p;
int slot, err;
- parent = op->node->parent;
+ parent = op->dev.of_node->parent;
if (!strcmp(parent->name, "dma")) {
p = parport_pc_probe_port(base, base + 0x400,
op->irqs[0], PARPORT_DMA_NOFIFO,
diff --git a/arch/sparc/kernel/auxio_64.c b/arch/sparc/kernel/auxio_64.c
index 9f52db2..bd8421a 100644
--- a/arch/sparc/kernel/auxio_64.c
+++ b/arch/sparc/kernel/auxio_64.c
@@ -104,7 +104,7 @@ MODULE_DEVICE_TABLE(of, auxio_match);
static int __devinit auxio_probe(struct of_device *dev, const struct of_device_id *match)
{
- struct device_node *dp = dev->node;
+ struct device_node *dp = dev->dev.of_node;
unsigned long size;
if (!strcmp(dp->parent->name, "ebus")) {
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c
index 4589ca3..dfc3698 100644
--- a/arch/sparc/kernel/central.c
+++ b/arch/sparc/kernel/central.c
@@ -167,7 +167,7 @@ static int __devinit fhc_probe(struct of_device *op,
goto out;
}
- if (!strcmp(op->node->parent->name, "central"))
+ if (!strcmp(op->dev.of_node->parent->name, "central"))
p->central = true;
p->pregs = of_ioremap(&op->resource[0], 0,
@@ -182,7 +182,7 @@ static int __devinit fhc_probe(struct of_device *op,
reg = upa_readl(p->pregs + FHC_PREGS_BSR);
p->board_num = ((reg >> 16) & 1) | ((reg >> 12) & 0x0e);
} else {
- p->board_num = of_getintprop_default(op->node, "board#", -1);
+ p->board_num = of_getintprop_default(op->dev.of_node, "board#", -1);
if (p->board_num == -1) {
printk(KERN_ERR "fhc: No board# property\n");
goto out_unmap_pregs;
diff --git a/arch/sparc/kernel/chmc.c b/arch/sparc/kernel/chmc.c
index e1a9598..9368796 100644
--- a/arch/sparc/kernel/chmc.c
+++ b/arch/sparc/kernel/chmc.c
@@ -425,7 +425,7 @@ static int __devinit jbusmc_probe(struct of_device *op,
INIT_LIST_HEAD(&p->list);
err = -ENODEV;
- prop = of_get_property(op->node, "portid", &len);
+ prop = of_get_property(op->dev.of_node, "portid", &len);
if (!prop || len != 4) {
printk(KERN_ERR PFX "Cannot find portid.\n");
goto out_free;
@@ -433,7 +433,7 @@ static int __devinit jbusmc_probe(struct of_device *op,
p->portid = *prop;
- prop = of_get_property(op->node, "memory-control-register-1", &len);
+ prop = of_get_property(op->dev.of_node, "memory-control-register-1", &len);
if (!prop || len != 8) {
printk(KERN_ERR PFX "Cannot get memory control register 1.\n");
goto out_free;
@@ -449,7 +449,7 @@ static int __devinit jbusmc_probe(struct of_device *op,
}
err = -ENODEV;
- ml = of_get_property(op->node, "memory-layout", &p->layout_len);
+ ml = of_get_property(op->dev.of_node, "memory-layout", &p->layout_len);
if (!ml) {
printk(KERN_ERR PFX "Cannot get memory layout property.\n");
goto out_iounmap;
@@ -466,7 +466,7 @@ static int __devinit jbusmc_probe(struct of_device *op,
mc_list_add(&p->list);
printk(KERN_INFO PFX "UltraSPARC-IIIi memory controller at %s\n",
- op->node->full_name);
+ op->dev.of_node->full_name);
dev_set_drvdata(&op->dev, p);
@@ -693,7 +693,7 @@ static void chmc_fetch_decode_regs(struct chmc *p)
static int __devinit chmc_probe(struct of_device *op,
const struct of_device_id *match)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
unsigned long ver;
const void *pval;
int len, portid;
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index 3c8c44f..6d93d2a 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -290,7 +290,7 @@ static void *sbus_alloc_coherent(struct device *dev, size_t len,
if (mmu_map_dma_area(dev, dma_addrp, va, res->start, len_total) != 0)
goto err_noiommu;
- res->name = op->node->name;
+ res->name = op->dev.of_node->name;
return (void *)(unsigned long)res->start;
diff --git a/arch/sparc/kernel/of_device_32.c b/arch/sparc/kernel/of_device_32.c
index 5a5509c..909bee0 100644
--- a/arch/sparc/kernel/of_device_32.c
+++ b/arch/sparc/kernel/of_device_32.c
@@ -254,10 +254,10 @@ static void __init build_device_resources(struct of_device *op,
return;
p_op = to_of_device(parent);
- bus = of_match_bus(p_op->node);
- bus->count_cells(op->node, &na, &ns);
+ bus = of_match_bus(p_op->dev.of_node);
+ bus->count_cells(op->dev.of_node, &na, &ns);
- preg = of_get_property(op->node, bus->addr_prop_name, &num_reg);
+ preg = of_get_property(op->dev.of_node, bus->addr_prop_name, &num_reg);
if (!preg || num_reg == 0)
return;
@@ -271,8 +271,8 @@ static void __init build_device_resources(struct of_device *op,
struct resource *r = &op->resource[index];
u32 addr[OF_MAX_ADDR_CELLS];
const u32 *reg = (preg + (index * ((na + ns) * 4)));
- struct device_node *dp = op->node;
- struct device_node *pp = p_op->node;
+ struct device_node *dp = op->dev.of_node;
+ struct device_node *pp = p_op->dev.of_node;
struct of_bus *pbus, *dbus;
u64 size, result = OF_BAD_ADDR;
unsigned long flags;
@@ -321,7 +321,7 @@ static void __init build_device_resources(struct of_device *op,
if (of_resource_verbose)
printk("%s reg[%d] -> %llx\n",
- op->node->full_name, index,
+ op->dev.of_node->full_name, index,
result);
if (result != OF_BAD_ADDR) {
@@ -329,7 +329,7 @@ static void __init build_device_resources(struct of_device *op,
r->end = result + size - 1;
r->flags = flags | ((result >> 32ULL) & 0xffUL);
}
- r->name = op->node->name;
+ r->name = op->dev.of_node->name;
}
}
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c
index 9d30b07..e436381 100644
--- a/arch/sparc/kernel/of_device_64.c
+++ b/arch/sparc/kernel/of_device_64.c
@@ -323,10 +323,10 @@ static void __init build_device_resources(struct of_device *op,
return;
p_op = to_of_device(parent);
- bus = of_match_bus(p_op->node);
- bus->count_cells(op->node, &na, &ns);
+ bus = of_match_bus(p_op->dev.of_node);
+ bus->count_cells(op->dev.of_node, &na, &ns);
- preg = of_get_property(op->node, bus->addr_prop_name, &num_reg);
+ preg = of_get_property(op->dev.of_node, bus->addr_prop_name, &num_reg);
if (!preg || num_reg == 0)
return;
@@ -340,7 +340,7 @@ static void __init build_device_resources(struct of_device *op,
if (num_reg > PROMREG_MAX) {
printk(KERN_WARNING "%s: Too many regs (%d), "
"limiting to %d.\n",
- op->node->full_name, num_reg, PROMREG_MAX);
+ op->dev.of_node->full_name, num_reg, PROMREG_MAX);
num_reg = PROMREG_MAX;
}
@@ -348,8 +348,8 @@ static void __init build_device_resources(struct of_device *op,
struct resource *r = &op->resource[index];
u32 addr[OF_MAX_ADDR_CELLS];
const u32 *reg = (preg + (index * ((na + ns) * 4)));
- struct device_node *dp = op->node;
- struct device_node *pp = p_op->node;
+ struct device_node *dp = op->dev.of_node;
+ struct device_node *pp = p_op->dev.of_node;
struct of_bus *pbus, *dbus;
u64 size, result = OF_BAD_ADDR;
unsigned long flags;
@@ -397,7 +397,7 @@ static void __init build_device_resources(struct of_device *op,
if (of_resource_verbose)
printk("%s reg[%d] -> %llx\n",
- op->node->full_name, index,
+ op->dev.of_node->full_name, index,
result);
if (result != OF_BAD_ADDR) {
@@ -408,7 +408,7 @@ static void __init build_device_resources(struct of_device *op,
r->end = result + size - 1;
r->flags = flags;
}
- r->name = op->node->name;
+ r->name = op->dev.of_node->name;
}
}
@@ -530,7 +530,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
struct device *parent,
unsigned int irq)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct device_node *pp, *ip;
unsigned int orig_irq = irq;
int nid;
@@ -575,7 +575,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
if (of_irq_verbose)
printk("%s: Apply [%s:%x] imap --> [%s:%x]\n",
- op->node->full_name,
+ op->dev.of_node->full_name,
pp->full_name, this_orig_irq,
(iret ? iret->full_name : "NULL"), irq);
@@ -594,7 +594,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
if (of_irq_verbose)
printk("%s: PCI swizzle [%s] "
"%x --> %x\n",
- op->node->full_name,
+ op->dev.of_node->full_name,
pp->full_name, this_orig_irq,
irq);
@@ -611,11 +611,11 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
if (!ip)
return orig_irq;
- irq = ip->irq_trans->irq_build(op->node, irq,
+ irq = ip->irq_trans->irq_build(op->dev.of_node, irq,
ip->irq_trans->data);
if (of_irq_verbose)
printk("%s: Apply IRQ trans [%s] %x --> %x\n",
- op->node->full_name, ip->full_name, orig_irq, irq);
+ op->dev.of_node->full_name, ip->full_name, orig_irq, irq);
out:
nid = of_node_to_nid(dp);
diff --git a/arch/sparc/kernel/of_device_common.c b/arch/sparc/kernel/of_device_common.c
index cb8eb79..21b3923 100644
--- a/arch/sparc/kernel/of_device_common.c
+++ b/arch/sparc/kernel/of_device_common.c
@@ -17,7 +17,7 @@ static int node_match(struct device *dev, void *data)
struct of_device *op = to_of_device(dev);
struct device_node *dp = data;
- return (op->node == dp);
+ return (op->dev.of_node == dp);
}
struct of_device *of_find_device_by_node(struct device_node *dp)
@@ -49,7 +49,7 @@ EXPORT_SYMBOL(irq_of_parse_and_map);
void of_propagate_archdata(struct of_device *bus)
{
struct dev_archdata *bus_sd = &bus->dev.archdata;
- struct device_node *bus_dp = bus->node;
+ struct device_node *bus_dp = bus->dev.of_node;
struct device_node *dp;
for (dp = bus_dp->child; dp; dp = dp->sibling) {
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 40861ed..89c17d0 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -684,7 +684,7 @@ static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus)
struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm,
struct device *parent)
{
- struct device_node *node = pbm->op->node;
+ struct device_node *node = pbm->op->dev.of_node;
struct pci_bus *bus;
printk("PCI: Scanning PBM %s\n", node->full_name);
@@ -1152,15 +1152,13 @@ static int __init of_pci_slot_init(void)
struct device_node *node;
if (pbus->self) {
- struct dev_archdata *sd = pbus->self->sysdata;
-
/* PCI->PCI bridge */
- node = sd->prom_node;
+ node = pbus->self->dev.of_node;
} else {
struct pci_pbm_info *pbm = pbus->sysdata;
/* Host PCI controller */
- node = pbm->op->node;
+ node = pbm->op->dev.of_node;
}
pci_bus_slot_names(node, pbus);
diff --git a/arch/sparc/kernel/pci_common.c b/arch/sparc/kernel/pci_common.c
index b775658..87614be 100644
--- a/arch/sparc/kernel/pci_common.c
+++ b/arch/sparc/kernel/pci_common.c
@@ -314,12 +314,12 @@ struct pci_ops sun4v_pci_ops = {
void pci_get_pbm_props(struct pci_pbm_info *pbm)
{
- const u32 *val = of_get_property(pbm->op->node, "bus-range", NULL);
+ const u32 *val = of_get_property(pbm->op->dev.of_node, "bus-range", NULL);
pbm->pci_first_busno = val[0];
pbm->pci_last_busno = val[1];
- val = of_get_property(pbm->op->node, "ino-bitmap", NULL);
+ val = of_get_property(pbm->op->dev.of_node, "ino-bitmap", NULL);
if (val) {
pbm->ino_bitmap = (((u64)val[1] << 32UL) |
((u64)val[0] << 0UL));
@@ -365,7 +365,8 @@ static void pci_register_legacy_regions(struct resource *io_res,
static void pci_register_iommu_region(struct pci_pbm_info *pbm)
{
- const u32 *vdma = of_get_property(pbm->op->node, "virtual-dma", NULL);
+ const u32 *vdma = of_get_property(pbm->op->dev.of_node, "virtual-dma",
+ NULL);
if (vdma) {
struct resource *rp = kzalloc(sizeof(*rp), GFP_KERNEL);
@@ -389,7 +390,7 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm)
int num_pbm_ranges;
saw_mem = saw_io = 0;
- pbm_ranges = of_get_property(pbm->op->node, "ranges", &i);
+ pbm_ranges = of_get_property(pbm->op->dev.of_node, "ranges", &i);
if (!pbm_ranges) {
prom_printf("PCI: Fatal error, missing PBM ranges property "
" for %s\n",
diff --git a/arch/sparc/kernel/pci_fire.c b/arch/sparc/kernel/pci_fire.c
index d53f45b..ff844ba 100644
--- a/arch/sparc/kernel/pci_fire.c
+++ b/arch/sparc/kernel/pci_fire.c
@@ -413,7 +413,7 @@ static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm,
struct of_device *op, u32 portid)
{
const struct linux_prom64_registers *regs;
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
int err;
pbm->numa_node = -1;
@@ -458,7 +458,7 @@ static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm,
static int __devinit fire_probe(struct of_device *op,
const struct of_device_id *match)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct pci_pbm_info *pbm;
struct iommu *iommu;
u32 portid;
diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c
index e1b0541..4cfe593 100644
--- a/arch/sparc/kernel/pci_msi.c
+++ b/arch/sparc/kernel/pci_msi.c
@@ -323,7 +323,7 @@ void sparc64_pbm_msi_init(struct pci_pbm_info *pbm,
const u32 *val;
int len;
- val = of_get_property(pbm->op->node, "#msi-eqs", &len);
+ val = of_get_property(pbm->op->dev.of_node, "#msi-eqs", &len);
if (!val || len != 4)
goto no_msi;
pbm->msiq_num = *val;
@@ -346,16 +346,16 @@ void sparc64_pbm_msi_init(struct pci_pbm_info *pbm,
u32 msi64_len;
} *arng;
- val = of_get_property(pbm->op->node, "msi-eq-size", &len);
+ val = of_get_property(pbm->op->dev.of_node, "msi-eq-size", &len);
if (!val || len != 4)
goto no_msi;
pbm->msiq_ent_count = *val;
- mqp = of_get_property(pbm->op->node,
+ mqp = of_get_property(pbm->op->dev.of_node,
"msi-eq-to-devino", &len);
if (!mqp)
- mqp = of_get_property(pbm->op->node,
+ mqp = of_get_property(pbm->op->dev.of_node,
"msi-eq-devino", &len);
if (!mqp || len != sizeof(struct msiq_prop))
goto no_msi;
@@ -363,27 +363,27 @@ void sparc64_pbm_msi_init(struct pci_pbm_info *pbm,
pbm->msiq_first = mqp->first_msiq;
pbm->msiq_first_devino = mqp->first_devino;
- val = of_get_property(pbm->op->node, "#msi", &len);
+ val = of_get_property(pbm->op->dev.of_node, "#msi", &len);
if (!val || len != 4)
goto no_msi;
pbm->msi_num = *val;
- mrng = of_get_property(pbm->op->node, "msi-ranges", &len);
+ mrng = of_get_property(pbm->op->dev.of_node, "msi-ranges", &len);
if (!mrng || len != sizeof(struct msi_range_prop))
goto no_msi;
pbm->msi_first = mrng->first_msi;
- val = of_get_property(pbm->op->node, "msi-data-mask", &len);
+ val = of_get_property(pbm->op->dev.of_node, "msi-data-mask", &len);
if (!val || len != 4)
goto no_msi;
pbm->msi_data_mask = *val;
- val = of_get_property(pbm->op->node, "msix-data-width", &len);
+ val = of_get_property(pbm->op->dev.of_node, "msix-data-width", &len);
if (!val || len != 4)
goto no_msi;
pbm->msix_data_width = *val;
- arng = of_get_property(pbm->op->node, "msi-address-ranges",
+ arng = of_get_property(pbm->op->dev.of_node, "msi-address-ranges",
&len);
if (!arng || len != sizeof(struct addr_range_prop))
goto no_msi;
diff --git a/arch/sparc/kernel/pci_psycho.c b/arch/sparc/kernel/pci_psycho.c
index 142b9d6..e675e21 100644
--- a/arch/sparc/kernel/pci_psycho.c
+++ b/arch/sparc/kernel/pci_psycho.c
@@ -285,7 +285,7 @@ static irqreturn_t psycho_ce_intr(int irq, void *dev_id)
#define PSYCHO_ECCCTRL_CE 0x2000000000000000UL /* Enable CE INterrupts */
static void psycho_register_error_handlers(struct pci_pbm_info *pbm)
{
- struct of_device *op = of_find_device_by_node(pbm->op->node);
+ struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node);
unsigned long base = pbm->controller_regs;
u64 tmp;
int err;
@@ -507,7 +507,7 @@ static int __devinit psycho_probe(struct of_device *op,
const struct of_device_id *match)
{
const struct linux_prom64_registers *pr_regs;
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct pci_pbm_info *pbm;
struct iommu *iommu;
int is_pbm_a, err;
diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c
index ba6fbeb..5048498 100644
--- a/arch/sparc/kernel/pci_sabre.c
+++ b/arch/sparc/kernel/pci_sabre.c
@@ -310,7 +310,7 @@ static irqreturn_t sabre_ce_intr(int irq, void *dev_id)
static void sabre_register_error_handlers(struct pci_pbm_info *pbm)
{
- struct device_node *dp = pbm->op->node;
+ struct device_node *dp = pbm->op->dev.of_node;
struct of_device *op;
unsigned long base = pbm->controller_regs;
u64 tmp;
@@ -456,7 +456,7 @@ static int __devinit sabre_probe(struct of_device *op,
const struct of_device_id *match)
{
const struct linux_prom64_registers *pr_regs;
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct pci_pbm_info *pbm;
u32 upa_portid, dma_mask;
struct iommu *iommu;
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c
index 2b5cdde..2f3f921 100644
--- a/arch/sparc/kernel/pci_schizo.c
+++ b/arch/sparc/kernel/pci_schizo.c
@@ -844,7 +844,7 @@ static int pbm_routes_this_ino(struct pci_pbm_info *pbm, u32 ino)
*/
static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm)
{
- struct of_device *op = of_find_device_by_node(pbm->op->node);
+ struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node);
u64 tmp, err_mask, err_no_mask;
int err;
@@ -939,7 +939,7 @@ static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm)
static void schizo_register_error_handlers(struct pci_pbm_info *pbm)
{
- struct of_device *op = of_find_device_by_node(pbm->op->node);
+ struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node);
u64 tmp, err_mask, err_no_mask;
int err;
@@ -1068,7 +1068,7 @@ static void __devinit schizo_scan_bus(struct pci_pbm_info *pbm,
{
pbm_config_busmastering(pbm);
pbm->is_66mhz_capable =
- (of_find_property(pbm->op->node, "66mhz-capable", NULL)
+ (of_find_property(pbm->op->dev.of_node, "66mhz-capable", NULL)
!= NULL);
pbm->pci_bus = pci_scan_one_pbm(pbm, parent);
@@ -1138,7 +1138,7 @@ static int schizo_pbm_iommu_init(struct pci_pbm_info *pbm)
u32 dma_mask;
u64 control;
- vdma = of_get_property(pbm->op->node, "virtual-dma", NULL);
+ vdma = of_get_property(pbm->op->dev.of_node, "virtual-dma", NULL);
if (!vdma)
vdma = vdma_default;
@@ -1268,7 +1268,7 @@ static void schizo_pbm_hw_init(struct pci_pbm_info *pbm)
pbm->chip_version >= 0x2)
tmp |= 0x3UL << SCHIZO_PCICTRL_PTO_SHIFT;
- if (!of_find_property(pbm->op->node, "no-bus-parking", NULL))
+ if (!of_find_property(pbm->op->dev.of_node, "no-bus-parking", NULL))
tmp |= SCHIZO_PCICTRL_PARK;
else
tmp &= ~SCHIZO_PCICTRL_PARK;
@@ -1311,7 +1311,7 @@ static int __devinit schizo_pbm_init(struct pci_pbm_info *pbm,
int chip_type)
{
const struct linux_prom64_registers *regs;
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
const char *chipset_name;
int is_pbm_a, err;
@@ -1415,7 +1415,7 @@ static struct pci_pbm_info * __devinit schizo_find_sibling(u32 portid,
static int __devinit __schizo_init(struct of_device *op, unsigned long chip_type)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct pci_pbm_info *pbm;
struct iommu *iommu;
u32 portid;
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c
index 23c33ff..5c11f56 100644
--- a/arch/sparc/kernel/pci_sun4v.c
+++ b/arch/sparc/kernel/pci_sun4v.c
@@ -540,7 +540,7 @@ static void __devinit pci_sun4v_scan_bus(struct pci_pbm_info *pbm,
struct property *prop;
struct device_node *dp;
- dp = pbm->op->node;
+ dp = pbm->op->dev.of_node;
prop = of_find_property(dp, "66mhz-capable", NULL);
pbm->is_66mhz_capable = (prop != NULL);
pbm->pci_bus = pci_scan_one_pbm(pbm, parent);
@@ -584,7 +584,7 @@ static int __devinit pci_sun4v_iommu_init(struct pci_pbm_info *pbm)
u32 dma_mask, dma_offset;
const u32 *vdma;
- vdma = of_get_property(pbm->op->node, "virtual-dma", NULL);
+ vdma = of_get_property(pbm->op->dev.of_node, "virtual-dma", NULL);
if (!vdma)
vdma = vdma_default;
@@ -881,7 +881,7 @@ static void pci_sun4v_msi_init(struct pci_pbm_info *pbm)
static int __devinit pci_sun4v_pbm_init(struct pci_pbm_info *pbm,
struct of_device *op, u32 devhandle)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
int err;
pbm->numa_node = of_node_to_nid(dp);
@@ -929,7 +929,7 @@ static int __devinit pci_sun4v_probe(struct of_device *op,
u32 devhandle;
int i, err;
- dp = op->node;
+ dp = op->dev.of_node;
if (!hvapi_negotiated++) {
err = sun4v_hvapi_register(HV_GRP_PCI,
diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c
index e2a045c..e3f806a 100644
--- a/arch/sparc/kernel/power.c
+++ b/arch/sparc/kernel/power.c
@@ -41,9 +41,9 @@ static int __devinit power_probe(struct of_device *op, const struct of_device_id
power_reg = of_ioremap(res, 0, 0x4, "power");
printk(KERN_INFO "%s: Control reg at %llx\n",
- op->node->name, res->start);
+ op->dev.of_node->name, res->start);
- if (has_button_interrupt(irq, op->node)) {
+ if (has_button_interrupt(irq, op->dev.of_node)) {
if (request_irq(irq,
power_handler, 0, "power", NULL) < 0)
printk(KERN_ERR "power: Cannot setup IRQ handler.\n");
diff --git a/arch/sparc/kernel/psycho_common.c b/arch/sparc/kernel/psycho_common.c
index 8f14784..3f34ac8 100644
--- a/arch/sparc/kernel/psycho_common.c
+++ b/arch/sparc/kernel/psycho_common.c
@@ -450,7 +450,7 @@ int psycho_iommu_init(struct pci_pbm_info *pbm, int tsbsize,
void psycho_pbm_init_common(struct pci_pbm_info *pbm, struct of_device *op,
const char *chip_name, int chip_type)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
pbm->name = dp->full_name;
pbm->numa_node = -1;
diff --git a/arch/sparc/kernel/sbus.c b/arch/sparc/kernel/sbus.c
index 406e087..cfeaf04 100644
--- a/arch/sparc/kernel/sbus.c
+++ b/arch/sparc/kernel/sbus.c
@@ -63,10 +63,10 @@ void sbus_set_sbus64(struct device *dev, int bursts)
int slot;
u64 val;
- regs = of_get_property(op->node, "reg", NULL);
+ regs = of_get_property(op->dev.of_node, "reg", NULL);
if (!regs) {
printk(KERN_ERR "sbus_set_sbus64: Cannot find regs for %s\n",
- op->node->full_name);
+ op->dev.of_node->full_name);
return;
}
slot = regs->which_io;
@@ -287,7 +287,7 @@ static irqreturn_t sysio_ue_handler(int irq, void *dev_id)
SYSIO_UEAFSR_SPIO | SYSIO_UEAFSR_SDRD | SYSIO_UEAFSR_SDWR);
upa_writeq(error_bits, afsr_reg);
- portid = of_getintprop_default(op->node, "portid", -1);
+ portid = of_getintprop_default(op->dev.of_node, "portid", -1);
/* Log the error. */
printk("SYSIO[%x]: Uncorrectable ECC Error, primary error type[%s]\n",
@@ -361,7 +361,7 @@ static irqreturn_t sysio_ce_handler(int irq, void *dev_id)
SYSIO_CEAFSR_SPIO | SYSIO_CEAFSR_SDRD | SYSIO_CEAFSR_SDWR);
upa_writeq(error_bits, afsr_reg);
- portid = of_getintprop_default(op->node, "portid", -1);
+ portid = of_getintprop_default(op->dev.of_node, "portid", -1);
printk("SYSIO[%x]: Correctable ECC Error, primary error type[%s]\n",
portid,
@@ -439,7 +439,7 @@ static irqreturn_t sysio_sbus_error_handler(int irq, void *dev_id)
SYSIO_SBAFSR_SLE | SYSIO_SBAFSR_STO | SYSIO_SBAFSR_SBERR);
upa_writeq(error_bits, afsr_reg);
- portid = of_getintprop_default(op->node, "portid", -1);
+ portid = of_getintprop_default(op->dev.of_node, "portid", -1);
/* Log the error. */
printk("SYSIO[%x]: SBUS Error, primary error type[%s] read(%d)\n",
@@ -496,7 +496,7 @@ static void __init sysio_register_error_handlers(struct of_device *op)
u64 control;
int portid;
- portid = of_getintprop_default(op->node, "portid", -1);
+ portid = of_getintprop_default(op->dev.of_node, "portid", -1);
irq = sbus_build_irq(op, SYSIO_UE_INO);
if (request_irq(irq, sysio_ue_handler, 0,
@@ -537,7 +537,7 @@ static void __init sysio_register_error_handlers(struct of_device *op)
static void __init sbus_iommu_init(struct of_device *op)
{
const struct linux_prom64_registers *pr;
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct iommu *iommu;
struct strbuf *strbuf;
unsigned long regs, reg_base;
@@ -589,7 +589,7 @@ static void __init sbus_iommu_init(struct of_device *op)
*/
iommu->write_complete_reg = regs + 0x2000UL;
- portid = of_getintprop_default(op->node, "portid", -1);
+ portid = of_getintprop_default(op->dev.of_node, "portid", -1);
printk(KERN_INFO "SYSIO: UPA portID %x, at %016lx\n",
portid, regs);
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c
index 0d4c09b..e0dbed9 100644
--- a/arch/sparc/kernel/time_32.c
+++ b/arch/sparc/kernel/time_32.c
@@ -152,7 +152,7 @@ static struct platform_device m48t59_rtc = {
static int __devinit clock_probe(struct of_device *op, const struct of_device_id *match)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
const char *model = of_get_property(dp, "model", NULL);
if (!model)
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c
index 67e1651..ee3fe41 100644
--- a/arch/sparc/kernel/time_64.c
+++ b/arch/sparc/kernel/time_64.c
@@ -423,7 +423,7 @@ static int __devinit rtc_probe(struct of_device *op, const struct of_device_id *
struct resource *r;
printk(KERN_INFO "%s: RTC regs at 0x%llx\n",
- op->node->full_name, op->resource[0].start);
+ op->dev.of_node->full_name, op->resource[0].start);
/* The CMOS RTC driver only accepts IORESOURCE_IO, so cons
* up a fake resource so that the probe works for all cases.
@@ -479,7 +479,7 @@ static int __devinit bq4802_probe(struct of_device *op, const struct of_device_i
{
printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n",
- op->node->full_name, op->resource[0].start);
+ op->dev.of_node->full_name, op->resource[0].start);
rtc_bq4802_device.resource = &op->resource[0];
return platform_device_register(&rtc_bq4802_device);
@@ -533,7 +533,7 @@ static struct platform_device m48t59_rtc = {
static int __devinit mostek_probe(struct of_device *op, const struct of_device_id *match)
{
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
/* On an Enterprise system there can be multiple mostek clocks.
* We should only match the one that is on the central FHC bus.
^ permalink raw reply related
* [PATCH 05/37] arch/powerpc: use .dev.of_node instead of .node in struct of_device
From: Grant Likely @ 2010-03-11 18:04 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2,
jeremy.kerr, James.Bottomley, broonie, microblaze-uclinux,
linux-kernel, linuxppc-dev, sparclinux, linux-ide, netdev,
linux-i2c, devicetree-discuss, linux-scsi, alsa-devel
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
.node is being removed
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/powerpc/include/asm/macio.h | 2 +-
arch/powerpc/kernel/ibmebus.c | 4 ++--
arch/powerpc/kernel/of_device.c | 8 ++++----
arch/powerpc/kernel/of_platform.c | 16 ++++++++--------
arch/powerpc/platforms/52xx/mpc52xx_gpio.c | 4 ++--
arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 16 ++++++++--------
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 6 +++---
arch/powerpc/platforms/82xx/ep8248e.c | 6 +++---
arch/powerpc/platforms/83xx/suspend.c | 2 +-
arch/powerpc/platforms/cell/axon_msi.c | 2 +-
arch/powerpc/platforms/pasemi/gpio_mdio.c | 2 +-
arch/powerpc/sysdev/axonram.c | 6 +++---
arch/powerpc/sysdev/bestcomm/bestcomm.c | 8 ++++----
arch/powerpc/sysdev/fsl_msi.c | 14 +++++++-------
arch/powerpc/sysdev/fsl_pmc.c | 2 +-
arch/powerpc/sysdev/pmi.c | 2 +-
16 files changed, 50 insertions(+), 50 deletions(-)
diff --git a/arch/powerpc/include/asm/macio.h b/arch/powerpc/include/asm/macio.h
index a062c57..19a661b 100644
--- a/arch/powerpc/include/asm/macio.h
+++ b/arch/powerpc/include/asm/macio.h
@@ -108,7 +108,7 @@ static inline void* macio_get_drvdata(struct macio_dev *dev)
static inline struct device_node *macio_get_of_node(struct macio_dev *mdev)
{
- return mdev->ofdev.node;
+ return mdev->ofdev.dev.of_node;
}
#ifdef CONFIG_PCI
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index a4c8b38..797e9ac 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -139,14 +139,14 @@ static struct dma_map_ops ibmebus_dma_ops = {
static int ibmebus_match_path(struct device *dev, void *data)
{
- struct device_node *dn = to_of_device(dev)->node;
+ struct device_node *dn = to_of_device(dev)->dev.of_node;
return (dn->full_name &&
(strcasecmp((char *)data, dn->full_name) == 0));
}
static int ibmebus_match_node(struct device *dev, void *data)
{
- return to_of_device(dev)->node == data;
+ return to_of_device(dev)->dev.of_node == data;
}
static int ibmebus_create_device(struct device_node *dn)
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index efbc262..55dafc7 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -13,7 +13,7 @@
static void of_device_make_bus_id(struct of_device *dev)
{
static atomic_t bus_no_reg_magic;
- struct device_node *node = dev->node;
+ struct device_node *node = dev->dev.of_node;
const u32 *reg;
u64 addr;
int magic;
@@ -96,17 +96,17 @@ int of_device_uevent(struct device *dev, struct kobj_uevent_env *env)
ofdev = to_of_device(dev);
- if (add_uevent_var(env, "OF_NAME=%s", ofdev->node->name))
+ if (add_uevent_var(env, "OF_NAME=%s", ofdev->dev.of_node->name))
return -ENOMEM;
- if (add_uevent_var(env, "OF_TYPE=%s", ofdev->node->type))
+ if (add_uevent_var(env, "OF_TYPE=%s", ofdev->dev.of_node->type))
return -ENOMEM;
/* Since the compatible field can contain pretty much anything
* it's not really legal to split it out with commas. We split it
* up using a number of environment variables instead. */
- compat = of_get_property(ofdev->node, "compatible", &cplen);
+ compat = of_get_property(ofdev->dev.of_node, "compatible", &cplen);
while (compat && *compat && cplen > 0) {
if (add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat))
return -ENOMEM;
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index 666d08d..5a5f624 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -196,7 +196,7 @@ EXPORT_SYMBOL(of_platform_bus_probe);
static int of_dev_node_match(struct device *dev, void *data)
{
- return to_of_device(dev)->node == data;
+ return to_of_device(dev)->dev.of_node == data;
}
struct of_device *of_find_device_by_node(struct device_node *np)
@@ -214,7 +214,7 @@ EXPORT_SYMBOL(of_find_device_by_node);
static int of_dev_phandle_match(struct device *dev, void *data)
{
phandle *ph = data;
- return to_of_device(dev)->node->phandle == *ph;
+ return to_of_device(dev)->dev.of_node->phandle == *ph;
}
struct of_device *of_find_device_by_phandle(phandle ph)
@@ -247,10 +247,10 @@ static int __devinit of_pci_phb_probe(struct of_device *dev,
if (ppc_md.pci_setup_phb == NULL)
return -ENODEV;
- printk(KERN_INFO "Setting up PCI bus %s\n", dev->node->full_name);
+ pr_info("Setting up PCI bus %s\n", dev->dev.of_node->full_name);
/* Alloc and setup PHB data structure */
- phb = pcibios_alloc_controller(dev->node);
+ phb = pcibios_alloc_controller(dev->dev.of_node);
if (!phb)
return -ENODEV;
@@ -264,19 +264,19 @@ static int __devinit of_pci_phb_probe(struct of_device *dev,
}
/* Process "ranges" property */
- pci_process_bridge_OF_ranges(phb, dev->node, 0);
+ pci_process_bridge_OF_ranges(phb, dev->dev.of_node, 0);
/* Init pci_dn data structures */
pci_devs_phb_init_dynamic(phb);
/* Register devices with EEH */
#ifdef CONFIG_EEH
- if (dev->node->child)
- eeh_add_device_tree_early(dev->node);
+ if (dev->dev.of_node->child)
+ eeh_add_device_tree_early(dev->dev.of_node);
#endif /* CONFIG_EEH */
/* Scan the bus */
- pcibios_scan_phb(phb, dev->node);
+ pcibios_scan_phb(phb, dev->dev.of_node);
if (phb->bus == NULL)
return -ENXIO;
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
index 2b8d8ef..fce30e2 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
@@ -167,7 +167,7 @@ static int __devinit mpc52xx_wkup_gpiochip_probe(struct of_device *ofdev,
ofchip->gc.get = mpc52xx_wkup_gpio_get;
ofchip->gc.set = mpc52xx_wkup_gpio_set;
- ret = of_mm_gpiochip_add(ofdev->node, &chip->mmchip);
+ ret = of_mm_gpiochip_add(ofdev->dev.of_node, &chip->mmchip);
if (ret)
return ret;
@@ -328,7 +328,7 @@ static int __devinit mpc52xx_simple_gpiochip_probe(struct of_device *ofdev,
ofchip->gc.get = mpc52xx_simple_gpio_get;
ofchip->gc.set = mpc52xx_simple_gpio_set;
- ret = of_mm_gpiochip_add(ofdev->node, &chip->mmchip);
+ ret = of_mm_gpiochip_add(ofdev->dev.of_node, &chip->mmchip);
if (ret)
return ret;
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
index 072b948..a34bffa 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
@@ -729,8 +729,8 @@ static int __devinit mpc52xx_gpt_probe(struct of_device *ofdev,
spin_lock_init(&gpt->lock);
gpt->dev = &ofdev->dev;
- gpt->ipb_freq = mpc5xxx_get_bus_frequency(ofdev->node);
- gpt->regs = of_iomap(ofdev->node, 0);
+ gpt->ipb_freq = mpc5xxx_get_bus_frequency(ofdev->dev.of_node);
+ gpt->regs = of_iomap(ofdev->dev.of_node, 0);
if (!gpt->regs) {
kfree(gpt);
return -ENOMEM;
@@ -738,21 +738,21 @@ static int __devinit mpc52xx_gpt_probe(struct of_device *ofdev,
dev_set_drvdata(&ofdev->dev, gpt);
- mpc52xx_gpt_gpio_setup(gpt, ofdev->node);
- mpc52xx_gpt_irq_setup(gpt, ofdev->node);
+ mpc52xx_gpt_gpio_setup(gpt, ofdev->dev.of_node);
+ mpc52xx_gpt_irq_setup(gpt, ofdev->dev.of_node);
mutex_lock(&mpc52xx_gpt_list_mutex);
list_add(&gpt->list, &mpc52xx_gpt_list);
mutex_unlock(&mpc52xx_gpt_list_mutex);
/* check if this device could be a watchdog */
- if (of_get_property(ofdev->node, "fsl,has-wdt", NULL) ||
- of_get_property(ofdev->node, "has-wdt", NULL)) {
+ if (of_get_property(ofdev->dev.of_node, "fsl,has-wdt", NULL) ||
+ of_get_property(ofdev->dev.of_node, "has-wdt", NULL)) {
const u32 *on_boot_wdt;
gpt->wdt_mode = MPC52xx_GPT_CAN_WDT;
- on_boot_wdt = of_get_property(ofdev->node, "fsl,wdt-on-boot",
- NULL);
+ on_boot_wdt = of_get_property(ofdev->dev.of_node,
+ "fsl,wdt-on-boot", NULL);
if (on_boot_wdt) {
dev_info(gpt->dev, "used as watchdog\n");
gpt->wdt_mode |= MPC52xx_GPT_IS_WDT;
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
index 929d017..046d314 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
@@ -445,14 +445,14 @@ mpc52xx_lpbfifo_probe(struct of_device *op, const struct of_device_id *match)
if (lpbfifo.dev != NULL)
return -ENOSPC;
- lpbfifo.irq = irq_of_parse_and_map(op->node, 0);
+ lpbfifo.irq = irq_of_parse_and_map(op->dev.of_node, 0);
if (!lpbfifo.irq)
return -ENODEV;
- if (of_address_to_resource(op->node, 0, &res))
+ if (of_address_to_resource(op->dev.of_node, 0, &res))
return -ENODEV;
lpbfifo.regs_phys = res.start;
- lpbfifo.regs = of_iomap(op->node, 0);
+ lpbfifo.regs = of_iomap(op->dev.of_node, 0);
if (!lpbfifo.regs)
return -ENOMEM;
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c
index f9aee18..3848500 100644
--- a/arch/powerpc/platforms/82xx/ep8248e.c
+++ b/arch/powerpc/platforms/82xx/ep8248e.c
@@ -118,12 +118,12 @@ static int __devinit ep8248e_mdio_probe(struct of_device *ofdev,
struct device_node *node;
int ret;
- node = of_get_parent(ofdev->node);
+ node = of_get_parent(ofdev->dev.of_node);
of_node_put(node);
if (node != ep8248e_bcsr_node)
return -ENODEV;
- ret = of_address_to_resource(ofdev->node, 0, &res);
+ ret = of_address_to_resource(ofdev->dev.of_node, 0, &res);
if (ret)
return ret;
@@ -141,7 +141,7 @@ static int __devinit ep8248e_mdio_probe(struct of_device *ofdev,
bus->parent = &ofdev->dev;
snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start);
- ret = of_mdiobus_register(bus, ofdev->node);
+ ret = of_mdiobus_register(bus, ofdev->dev.of_node);
if (ret)
goto err_free_irq;
diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c
index 4380534..aa0b764 100644
--- a/arch/powerpc/platforms/83xx/suspend.c
+++ b/arch/powerpc/platforms/83xx/suspend.c
@@ -321,7 +321,7 @@ static struct platform_suspend_ops mpc83xx_suspend_ops = {
static int pmc_probe(struct of_device *ofdev,
const struct of_device_id *match)
{
- struct device_node *np = ofdev->node;
+ struct device_node *np = ofdev->dev.of_node;
struct resource res;
struct pmc_type *type = match->data;
int ret = 0;
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c
index 96fe896..e341a70 100644
--- a/arch/powerpc/platforms/cell/axon_msi.c
+++ b/arch/powerpc/platforms/cell/axon_msi.c
@@ -344,7 +344,7 @@ static int axon_msi_shutdown(struct of_device *device)
static int axon_msi_probe(struct of_device *device,
const struct of_device_id *device_id)
{
- struct device_node *dn = device->node;
+ struct device_node *dn = device->dev.of_node;
struct axon_msic *msic;
unsigned int virq;
int dcr_base, dcr_len;
diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c
index 3bf5467..b7027db 100644
--- a/arch/powerpc/platforms/pasemi/gpio_mdio.c
+++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c
@@ -219,7 +219,7 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev,
const struct of_device_id *match)
{
struct device *dev = &ofdev->dev;
- struct device_node *np = ofdev->node;
+ struct device_node *np = ofdev->dev.of_node;
struct mii_bus *new_bus;
struct gpio_priv *priv;
const unsigned int *prop;
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c
index 88f4ae7..88b21fc 100644
--- a/arch/powerpc/sysdev/axonram.c
+++ b/arch/powerpc/sysdev/axonram.c
@@ -185,7 +185,7 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id)
axon_ram_bank_id++;
dev_info(&device->dev, "Found memory controller on %s\n",
- device->node->full_name);
+ device->dev.of_node->full_name);
bank = kzalloc(sizeof(struct axon_ram_bank), GFP_KERNEL);
if (bank == NULL) {
@@ -198,7 +198,7 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id)
bank->device = device;
- if (of_address_to_resource(device->node, 0, &resource) != 0) {
+ if (of_address_to_resource(device->dev.of_node, 0, &resource) != 0) {
dev_err(&device->dev, "Cannot access device tree\n");
rc = -EFAULT;
goto failed;
@@ -253,7 +253,7 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id)
blk_queue_logical_block_size(bank->disk->queue, AXON_RAM_SECTOR_SIZE);
add_disk(bank->disk);
- bank->irq_id = irq_of_parse_and_map(device->node, 0);
+ bank->irq_id = irq_of_parse_and_map(device->dev.of_node, 0);
if (bank->irq_id == NO_IRQ) {
dev_err(&device->dev, "Cannot access ECC interrupt ID\n");
rc = -EFAULT;
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c
index 378ebd9..d32d538 100644
--- a/arch/powerpc/sysdev/bestcomm/bestcomm.c
+++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c
@@ -377,7 +377,7 @@ mpc52xx_bcom_probe(struct of_device *op, const struct of_device_id *match)
printk(KERN_INFO "DMA: MPC52xx BestComm driver\n");
/* Get the bestcomm node */
- of_node_get(op->node);
+ of_node_get(op->dev.of_node);
/* Prepare SRAM */
ofn_sram = of_find_matching_node(NULL, mpc52xx_sram_ids);
@@ -406,10 +406,10 @@ mpc52xx_bcom_probe(struct of_device *op, const struct of_device_id *match)
}
/* Save the node */
- bcom_eng->ofnode = op->node;
+ bcom_eng->ofnode = op->dev.of_node;
/* Get, reserve & map io */
- if (of_address_to_resource(op->node, 0, &res_bcom)) {
+ if (of_address_to_resource(op->dev.of_node, 0, &res_bcom)) {
printk(KERN_ERR DRIVER_NAME ": "
"Can't get resource\n");
rv = -EINVAL;
@@ -453,7 +453,7 @@ error_sramclean:
kfree(bcom_eng);
bcom_sram_cleanup();
error_ofput:
- of_node_put(op->node);
+ of_node_put(op->dev.of_node);
printk(KERN_ERR "DMA: MPC52xx BestComm init failed !\n");
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index e094367..d17841f 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -248,7 +248,7 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev,
goto error_out;
}
- msi->irqhost = irq_alloc_host(dev->node, IRQ_HOST_MAP_LINEAR,
+ msi->irqhost = irq_alloc_host(dev->dev.of_node, IRQ_HOST_MAP_LINEAR,
NR_MSI_IRQS, &fsl_msi_host_ops, 0);
if (msi->irqhost == NULL) {
@@ -258,10 +258,10 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev,
}
/* Get the MSI reg base */
- err = of_address_to_resource(dev->node, 0, &res);
+ err = of_address_to_resource(dev->dev.of_node, 0, &res);
if (err) {
dev_err(&dev->dev, "%s resource error!\n",
- dev->node->full_name);
+ dev->dev.of_node->full_name);
goto error_out;
}
@@ -284,16 +284,16 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev,
goto error_out;
}
- p = of_get_property(dev->node, "interrupts", &count);
+ p = of_get_property(dev->dev.of_node, "interrupts", &count);
if (!p) {
dev_err(&dev->dev, "no interrupts property found on %s\n",
- dev->node->full_name);
+ dev->dev.of_node->full_name);
err = -ENODEV;
goto error_out;
}
if (count % 8 != 0) {
dev_err(&dev->dev, "Malformed interrupts property on %s\n",
- dev->node->full_name);
+ dev->dev.of_node->full_name);
err = -EINVAL;
goto error_out;
}
@@ -302,7 +302,7 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev,
for (i = 0; i < count / 2; i++) {
if (i > NR_MSI_REG)
break;
- virt_msir = irq_of_parse_and_map(dev->node, i);
+ virt_msir = irq_of_parse_and_map(dev->dev.of_node, i);
if (virt_msir != NO_IRQ) {
set_irq_data(virt_msir, (void *)i);
set_irq_chained_handler(virt_msir, fsl_msi_cascade);
diff --git a/arch/powerpc/sysdev/fsl_pmc.c b/arch/powerpc/sysdev/fsl_pmc.c
index a7635a9..2ebe817 100644
--- a/arch/powerpc/sysdev/fsl_pmc.c
+++ b/arch/powerpc/sysdev/fsl_pmc.c
@@ -60,7 +60,7 @@ static struct platform_suspend_ops pmc_suspend_ops = {
static int pmc_probe(struct of_device *ofdev, const struct of_device_id *id)
{
- pmc_regs = of_iomap(ofdev->node, 0);
+ pmc_regs = of_iomap(ofdev->dev.of_node, 0);
if (!pmc_regs)
return -ENOMEM;
diff --git a/arch/powerpc/sysdev/pmi.c b/arch/powerpc/sysdev/pmi.c
index aaa9159..b92cb3a 100644
--- a/arch/powerpc/sysdev/pmi.c
+++ b/arch/powerpc/sysdev/pmi.c
@@ -123,7 +123,7 @@ static void pmi_notify_handlers(struct work_struct *work)
static int pmi_of_probe(struct of_device *dev,
const struct of_device_id *match)
{
- struct device_node *np = dev->node;
+ struct device_node *np = dev->dev.of_node;
int rc;
if (data) {
^ permalink raw reply related
* [PATCH 06/37] arch/microblaze: use .dev.of_node instead of .node in struct of_device
From: Grant Likely @ 2010-03-11 18:04 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2,
jeremy.kerr, James.Bottomley, broonie, microblaze-uclinux,
linux-kernel, linuxppc-dev, sparclinux, linux-ide, netdev,
linux-i2c, devicetree-discuss, linux-scsi, alsa-devel
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
.node is being removed
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/microblaze/kernel/of_device.c | 8 ++++----
arch/microblaze/kernel/of_platform.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/microblaze/kernel/of_device.c b/arch/microblaze/kernel/of_device.c
index 12371bd..ae165fc 100644
--- a/arch/microblaze/kernel/of_device.c
+++ b/arch/microblaze/kernel/of_device.c
@@ -12,7 +12,7 @@
void of_device_make_bus_id(struct of_device *dev)
{
static atomic_t bus_no_reg_magic;
- struct device_node *node = dev->node;
+ struct device_node *node = dev->dev.of_node;
const u32 *reg;
u64 addr;
int magic;
@@ -76,17 +76,17 @@ int of_device_uevent(struct device *dev, struct kobj_uevent_env *env)
ofdev = to_of_device(dev);
- if (add_uevent_var(env, "OF_NAME=%s", ofdev->node->name))
+ if (add_uevent_var(env, "OF_NAME=%s", ofdev->dev.of_node->name))
return -ENOMEM;
- if (add_uevent_var(env, "OF_TYPE=%s", ofdev->node->type))
+ if (add_uevent_var(env, "OF_TYPE=%s", ofdev->dev.of_node->type))
return -ENOMEM;
/* Since the compatible field can contain pretty much anything
* it's not really legal to split it out with commas. We split it
* up using a number of environment variables instead. */
- compat = of_get_property(ofdev->node, "compatible", &cplen);
+ compat = of_get_property(ofdev->dev.of_node, "compatible", &cplen);
while (compat && *compat && cplen > 0) {
if (add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat))
return -ENOMEM;
diff --git a/arch/microblaze/kernel/of_platform.c b/arch/microblaze/kernel/of_platform.c
index 1c6d684..ea7d024 100644
--- a/arch/microblaze/kernel/of_platform.c
+++ b/arch/microblaze/kernel/of_platform.c
@@ -167,7 +167,7 @@ EXPORT_SYMBOL(of_platform_bus_probe);
static int of_dev_node_match(struct device *dev, void *data)
{
- return to_of_device(dev)->node == data;
+ return to_of_device(dev)->dev.of_node == data;
}
struct of_device *of_find_device_by_node(struct device_node *np)
@@ -185,7 +185,7 @@ EXPORT_SYMBOL(of_find_device_by_node);
static int of_dev_phandle_match(struct device *dev, void *data)
{
phandle *ph = data;
- return to_of_device(dev)->node->phandle == *ph;
+ return to_of_device(dev)->dev.of_node->phandle == *ph;
}
struct of_device *of_find_device_by_phandle(phandle ph)
^ permalink raw reply related
* [PATCH 07/37] drivers/serial: use .dev.of_node instead of .node in struct of_device
From: Grant Likely @ 2010-03-11 18:04 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2,
jeremy.kerr, James.Bottomley, broonie, microblaze-uclinux,
linux-kernel, linuxppc-dev, sparclinux, linux-ide, netdev,
linux-i2c, devicetree-discuss, linux-scsi, alsa-devel
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
.node is being removed
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/serial/mpc52xx_uart.c | 8 ++++----
drivers/serial/sunsu.c | 6 +++---
drivers/serial/sunzilog.c | 8 ++++----
drivers/serial/uartlite.c | 6 +++---
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 3119fdd..cb07938 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -1328,14 +1328,14 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match)
/* Check validity & presence */
for (idx = 0; idx < MPC52xx_PSC_MAXNUM; idx++)
- if (mpc52xx_uart_nodes[idx] == op->node)
+ if (mpc52xx_uart_nodes[idx] == op->dev.of_node)
break;
if (idx >= MPC52xx_PSC_MAXNUM)
return -EINVAL;
pr_debug("Found %s assigned to ttyPSC%x\n",
mpc52xx_uart_nodes[idx]->full_name, idx);
- uartclk = psc_ops->getuartclk(op->node);
+ uartclk = psc_ops->getuartclk(op->dev.of_node);
if (uartclk == 0) {
dev_dbg(&op->dev, "Could not find uart clock frequency!\n");
return -EINVAL;
@@ -1355,7 +1355,7 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match)
port->dev = &op->dev;
/* Search for IRQ and mapbase */
- ret = of_address_to_resource(op->node, 0, &res);
+ ret = of_address_to_resource(op->dev.of_node, 0, &res);
if (ret)
return ret;
@@ -1365,7 +1365,7 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match)
return -EINVAL;
}
- psc_ops->get_irq(port, op->node);
+ psc_ops->get_irq(port, op->dev.of_node);
if (port->irq == NO_IRQ) {
dev_dbg(&op->dev, "Could not get irq\n");
return -EINVAL;
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index 170d3d6..2ab82ed 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -1199,7 +1199,7 @@ static int __devinit sunsu_kbd_ms_init(struct uart_sunsu_port *up)
return -ENODEV;
printk("%s: %s port at %llx, irq %u\n",
- to_of_device(up->port.dev)->node->full_name,
+ to_of_device(up->port.dev)->dev.of_node->full_name,
(up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse",
(unsigned long long) up->port.mapbase,
up->port.irq);
@@ -1351,7 +1351,7 @@ static int __init sunsu_console_setup(struct console *co, char *options)
spin_lock_init(&port->lock);
/* Get firmware console settings. */
- sunserial_console_termios(co, to_of_device(port->dev)->node);
+ sunserial_console_termios(co, to_of_device(port->dev)->dev.of_node);
memset(&termios, 0, sizeof(struct ktermios));
termios.c_cflag = co->cflag;
@@ -1408,7 +1408,7 @@ static enum su_type __devinit su_get_type(struct device_node *dp)
static int __devinit su_probe(struct of_device *op, const struct of_device_id *match)
{
static int inst;
- struct device_node *dp = op->node;
+ struct device_node *dp = op->dev.of_node;
struct uart_sunsu_port *up;
struct resource *rp;
enum su_type type;
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c
index 2c7a66a..20f9be8 100644
--- a/drivers/serial/sunzilog.c
+++ b/drivers/serial/sunzilog.c
@@ -1180,7 +1180,7 @@ static int __init sunzilog_console_setup(struct console *con, char *options)
(sunzilog_reg.minor - 64) + con->index, con->index);
/* Get firmware console settings. */
- sunserial_console_termios(con, to_of_device(up->port.dev)->node);
+ sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node);
/* Firmware console speed is limited to 150-->38400 baud so
* this hackish cflag thing is OK.
@@ -1358,7 +1358,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m
int keyboard_mouse = 0;
int err;
- if (of_find_property(op->node, "keyboard", NULL))
+ if (of_find_property(op->dev.of_node, "keyboard", NULL))
keyboard_mouse = 1;
/* uarts must come before keyboards/mice */
@@ -1415,7 +1415,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m
sunzilog_init_hw(&up[1]);
if (!keyboard_mouse) {
- if (sunserial_console_match(SUNZILOG_CONSOLE(), op->node,
+ if (sunserial_console_match(SUNZILOG_CONSOLE(), op->dev.of_node,
&sunzilog_reg, up[0].port.line,
false))
up->flags |= SUNZILOG_FLAG_IS_CONS;
@@ -1425,7 +1425,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m
rp, sizeof(struct zilog_layout));
return err;
}
- if (sunserial_console_match(SUNZILOG_CONSOLE(), op->node,
+ if (sunserial_console_match(SUNZILOG_CONSOLE(), op->dev.of_node,
&sunzilog_reg, up[1].port.line,
false))
up->flags |= SUNZILOG_FLAG_IS_CONS;
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index f0a6c61..8fc2583 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -591,15 +591,15 @@ ulite_of_probe(struct of_device *op, const struct of_device_id *match)
dev_dbg(&op->dev, "%s(%p, %p)\n", __func__, op, match);
- rc = of_address_to_resource(op->node, 0, &res);
+ rc = of_address_to_resource(op->dev.of_node, 0, &res);
if (rc) {
dev_err(&op->dev, "invalid address\n");
return rc;
}
- irq = irq_of_parse_and_map(op->node, 0);
+ irq = irq_of_parse_and_map(op->dev.of_node, 0);
- id = of_get_property(op->node, "port-number", NULL);
+ id = of_get_property(op->dev.of_node, "port-number", NULL);
return ulite_assign(&op->dev, id ? *id : -1, res.start+3, irq);
}
^ permalink raw reply related
* [PATCH 08/37] drivers/watchdog: use .dev.of_node instead of .node in struct of_device
From: Grant Likely @ 2010-03-11 18:04 UTC (permalink / raw)
To: monstr, gregkh, benh, akpm, davem, sfr, jgarzik, ben-linux, dwmw2,
jeremy.kerr, James.Bottomley, broonie, microblaze-uclinux,
linux-kernel, linuxppc-dev, sparclinux, linux-ide, netdev,
linux-i2c, devicetree-discuss, linux-scsi, alsa-devel
In-Reply-To: <20100311174830.4824.19820.stgit@angua>
.node is being removed
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/watchdog/cpwd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c
index 37ea052..89da14f 100644
--- a/drivers/watchdog/cpwd.c
+++ b/drivers/watchdog/cpwd.c
@@ -576,7 +576,7 @@ static int __devinit cpwd_probe(struct of_device *op,
* interrupt_mask register cannot be written, so no timer
* interrupts can be masked within the PLD.
*/
- str_prop = of_get_property(op->node, "model", NULL);
+ str_prop = of_get_property(op->dev.of_node, "model", NULL);
p->broken = (str_prop && !strcmp(str_prop, WD_BADMODEL));
if (!p->enabled)
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox