LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: Trouble "Transferring control to Linux (at address 00000000)"
From: Mikhail Zaturenskiy @ 2009-06-29 20:46 UTC (permalink / raw)
  To: Scott Wood; +Cc: Frank Svendsbøe, linuxppc-dev, Gary Thomas
In-Reply-To: <4A49249C.5080101@freescale.com>

> Change "root=" to "console=".
Thank you for clarifying.

I tried this but I get the following in my memory dump:

<6>Using Embedded Planet EP88xC ??achine description?
<5>Linux ver??ion 2.6.30-rc2-01402-gd4e2f68-d??rty
(devone@localhost.localdoma??n) (gcc version 4.2.2) #1 Mon J??n 29
11:35:28 CDT 2009?
<7>Top o?? RAM: 0x4000000' Total RAM: 0x4??00000?
<7>Memory hole size: 0MB???
>4>Zone PFN ranges:?
<4>  DMA    ?? 0x00000000 -> 0x00004000?
<4>  ??ormal   0x00004000 -> 0x0000400???
<4>Movable zone start PFN for ??ach node?
<4>early_node_map[1] a??tive PFN ranges?
<4>    0: 0x000??0000 -> 0x00004000?
<7>On node 0??totalpages: 16384?
<7>free_area_??nit_node: node 0' pgdat c021bf7??' node_mem_map c023f000?
<7>  DM?? zone: 128 pages used for memma???
<7>  DMA zone: 0 pages reserve???
<7>  DMA zone: 16256 pages' LI??O batch:3?
<6>MMU: Allocated 72 ??ytes of context maps for 16 con??exts?
<4>Built 1 zonelists in Zo??e order' mobility grouping on. ??Total pages: 16256?
<5>Kernel co??mand line: console=ttyCPM0'9600??8 loglevel=7?
<6>NR_IRQS:512?
<7>??rq: irq 5 on host /soc@f0000000??interrupt-controller@0 mapped
t?? virtual irq 16?
<7>irq: irq 0 o?? host /soc@f0000000/cpm@9c0/int??rrupt-controller@930
mapped to ??irtual irq 17?
<4>PID hash table??entries: 256 (order: 8' 1024 by??es)?
<4>Decrementer Frequency = ??x7bfa48?
<7>irq: irq 15 on host ??soc@f0000000/interrupt-controll??r@0 mapped
to virtual irq 18?
<7??time_init: decrementer frequenc?? = 8.125000 MHz?
<7>time_init: p??ocessor frequency   = 130.00000?? MHz?
<6>clocksource: timebase m??lt[1ec4ec4f] shift[22] register??d?
<7>clockevent: decrementer mu??t[214] shift[16] cpu[0]?
<7>irq:??irq 4 on host /soc@f0000000/cpm??9c0/interrupt-controller@930
ma??ped to virtual irq 19?
<6>consol?? [ttyCPM0] enabled

Seems like at that point it begins to redirect output to ttyCPM0 but
still nothing showing on the console...

^ permalink raw reply

* Re: Trouble "Transferring control to Linux (at address 00000000)"
From: Scott Wood @ 2009-06-29 20:31 UTC (permalink / raw)
  To: Mikhail Zaturenskiy; +Cc: Frank Svendsbøe, linuxppc-dev, Gary Thomas
In-Reply-To: <97dd5fd20906291324jf085addjaa61ff48dfca3d04@mail.gmail.com>

Mikhail Zaturenskiy wrote:
> Hi Scott,
> 
>> s/root=/console=/
> I'm not quite sure what you mean by this.

Change "root=" to "console=".

-Scott

^ permalink raw reply

* Re: Trouble "Transferring control to Linux (at address 00000000)"
From: Mikhail Zaturenskiy @ 2009-06-29 20:24 UTC (permalink / raw)
  To: Scott Wood; +Cc: Frank Svendsbøe, linuxppc-dev, Gary Thomas
In-Reply-To: <4A490AE4.7000509@freescale.com>

Hi Scott,

> s/root=/console=/
I'm not quite sure what you mean by this.

> Alternatively, you can set /chosen/linux,stdout-path to poin to the serial
> node you want to use for the console.
If you look at the bottom of ep88xc.dts that I attached with my
previous post, I added the following:
chosen {
		linux,stdout-path = "/soc@f0000000/cpm@9c0/serial@a80"; // MZ -
added this 'chosen' section
};

However it did not seem to help, unless I did this wrong... still no
console output.

Thanks,
Mikhail

^ permalink raw reply

* Re: Inline Assembly queries
From: Scott Wood @ 2009-06-29 19:27 UTC (permalink / raw)
  To: kernel mailz; +Cc: gcc-help, linuxppc-dev
In-Reply-To: <abe8a1fd0906290849w1ba6bd33of60a9c2e110c10fd@mail.gmail.com>

On Mon, Jun 29, 2009 at 09:19:57PM +0530, kernel mailz wrote:
> I tried a small example
> 
> int *p = 0x1000;
> int a = *p;
> asm("sync":::"memory");
> a = *p;
> 
> and
> 
> volatile int *p = 0x1000;
> int a = *p;
> asm("sync");
> a = *p
> 
> Got the same assembly.
> Which is right.
> 
> So does it mean, if proper use of volatile is done, there is no need
> of "memory" ?

No.  As I understand it, volatile concerns deletion of the asm statement
(if no outputs are used) and reordering with respect to other asm
statements (not sure whether GCC will actually do this), while the memory
clobber concerns optimization of non-asm loads/stores around the asm
statement.

> static inline unsigned long
> __xchg_u32(volatile void *p, unsigned long val)
> {
>        unsigned long prev;
> 
>        __asm__ __volatile__(
> 
> "1:     lwarx   %0,0,%2 \n"
> 
> "       stwcx.  %3,0,%2 \n\
>        bne-    1b"
> 
>        : "=&r" (prev), "+m" (*(volatile unsigned int *)p)
>        : "r" (p), "r" (val)
> //        :"memory","cc");
> 
>        return prev;
> }
> #define ADDR 0x1000
> int main()
> {
>        __xchg_u32((void*)ADDR, 0x2000);
>        __xchg_u32((void*)ADDR, 0x3000);
> 
>        return 0;
> 
> }
> 
> Got the same asm, when compiled with O1 , with / without "memory" clobber

This isn't a good test case, because there's nothing other than inline
asm going on in that function for GCC to optimize.  Plus, it's generally
not a good idea, when talking about what the compiler is or isn't allowed
to do, to point to a single test case (or even several) and say that it
isn't required because you don't notice a difference.  Even if there were
no code at all with which it made a difference with GCC version X, it
could make a difference with GCC version X+1.

-Scott

^ permalink raw reply

* Re: Device tree for c67x00
From: Peter Korsgaard @ 2009-06-29 19:10 UTC (permalink / raw)
  To: Jorge Sánchez de Nova; +Cc: Linuxppc-dev
In-Reply-To: <621779fd0906290825i6bdc1e99tf6be68e3de56e9a6@mail.gmail.com>

>>>>> "Jorge" =3D=3D Jorge S=C3=A1nchez de Nova <j.s.denova@gmail.com> writ=
es:

 Jorge> Hi,

 Jorge> It doesn't work at all since it doesn't load anything. I have
 Jorge> looked at the driver and there is apparently no openfirmware
 Jorge> support for it, so maybe the dts info won't work without
 Jorge> it. Am I wrong? Does this means that the c67x00 needs OF
 Jorge> support to work in this configuration? How can I make it
 Jorge> otherwise?

Yes, the c67x00 driver doesn't currently have any OF bindings. Either
you can add it, or simply manually create the struct platform_device
in your board file (or scan the DT in your board file and fill in the
correct base address / interrupt number from it).

Remember that arch/powerpc uses virtual interrupt numbers if you're
going to fill in the platform_device by hand.

--=20
Bye, Peter Korsgaard

^ permalink raw reply

* Re: Trouble "Transferring control to Linux (at address 00000000)"
From: Scott Wood @ 2009-06-29 18:41 UTC (permalink / raw)
  To: Mikhail Zaturenskiy; +Cc: Frank Svendsbøe, linuxppc-dev, Gary Thomas
In-Reply-To: <97dd5fd20906291113t5ea98285h2db6379ff1a940c@mail.gmail.com>

Mikhail Zaturenskiy wrote:
> Hi Gary
> 
>> Did you try 'root=ttyCPM0,9600'?
> 
> Gave that a shot just now, doesn't seem to have changed anything other
> than that it now says "VFS: Cannot open root device ttyCMP0,9600" or
> unknown-block(2,0)." But thanks for the suggestion though.
> 
> What exactly was this supposed to do? I thought that the "root=" boot
> argument did not play a role in console output of the boot
> information.

s/root=/console=/

Alternatively, you can set /chosen/linux,stdout-path to poin to the 
serial node you want to use for the console.

-Scott

^ permalink raw reply

* Re: Trouble "Transferring control to Linux (at address 00000000)"
From: Mikhail Zaturenskiy @ 2009-06-29 18:13 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Scott Wood, Frank Svendsbøe, linuxppc-dev
In-Reply-To: <4A4901A8.5010402@mlbassoc.com>

Hi Gary

> Did you try 'root=ttyCPM0,9600'?

Gave that a shot just now, doesn't seem to have changed anything other
than that it now says "VFS: Cannot open root device ttyCMP0,9600" or
unknown-block(2,0)." But thanks for the suggestion though.

What exactly was this supposed to do? I thought that the "root=" boot
argument did not play a role in console output of the boot
information.

^ permalink raw reply

* Re: Trouble "Transferring control to Linux (at address 00000000)"
From: Gary Thomas @ 2009-06-29 18:02 UTC (permalink / raw)
  To: Mikhail Zaturenskiy; +Cc: Scott Wood, Frank Svendsbøe, linuxppc-dev
In-Reply-To: <97dd5fd20906291053u1a07c3afla1c2ea0590d01f1e@mail.gmail.com>

Mikhail Zaturenskiy wrote:
> Hi guys, I've been working off your suggestions and here's my update
> on where I'm at now.
> 
> For reference, attached are my current
> "linux-2.6-denx/arch/powerpc/boot/dts/ep88xc.dts" and
> "u-boot-2009.03/include/configs/EP88x.h".
> 
>> I might be able to help out. Scott's right. According to U-Boots
>> include/configs/EP88x.h,
>> CONFIG_SYS_IMMR is 0xf0000000, but the Linux the ep88xc.dts is
>> referring to an IMMR set
>> to 0xfa200000. Replace every instance of 0xfa20 with 0xf000, and it may work.
> I did notice the IMMR discrepancy and as Frank suggested adjusted the
> 0xfa20xxxx values to 0xf000xxxx in my DTS, though I'm wondering if it
> would be better to have just set my CONFIG_SYS_IMMR to 0xfa200000? Not
> sure if that would break more than it would fix. Anyways, I have not
> noticed any difference in output after changing this in the DTS, but
> I'll leave it this way as it seems more correct.
> 
>>>> Also, make sure u-boot is properly updating the memory size in the device
>>>> tree.  Can you dump the post-fixup device tree in u-boot?
>>> Not sure, but I'll try to find out if that's possible. It'd certainly
>>> answer a lot of questions...
> While I have not yet figured out how to dump the post-fixup tree... I
> can see that U-Boot doesn't seem to be doing proper fixup because
> after manually setting all the DTS fields that U-Boot was supposed to
> fill in (clock frequency, RAM start/end, etc.), the kernel seems to be
> going through a fairly normal boot sequence. Without me manually
> setting those fields, they remain initialized to 0. The only issue is
> that no output goes to the console.
> 
> Here is my current output.
>>From U-Boot:
> 
> U-Boot 2009.03-svn8591 (Jun 29 2009 - 11:25:23)
> 
> CPU:   MPC885ZPnn at 100 MHz [40.0...133.0 MHz]
>        8 kB I-Cache 8 kB D-Cache FEC present
> Board: EP88xC 1.1  CPLD revision 2
> DRAM:  64 MB
> FLASH: 32 MB
> In:    serial
> Out:   serial
> Err:   serial
> Net:   FEC ETHERNET, FEC2 ETHERNET
> Hit any key to stop autoboot:  0
> => tftp ep88x_uimage2
> Using FEC ETHERNET device
> TFTP from server 10.0.54.129; our IP address is 10.0.54.150
> Filename 'ep88x_uimage2'.
> Load address: 0x400000
> Loading: #################################################################
>          ########
> done
> Bytes transferred = 1057419 (10228b hex)
> => tftp 750000 ep88x_dtb2
> Using FEC ETHERNET device
> TFTP from server 10.0.54.129; our IP address is 10.0.54.150
> Filename 'ep88x_dtb2'.
> Load address: 0x750000
> Loading: #
> done
> Bytes transferred = 7725 (1e2d hex)
> => bootm 400000 - 750000
> ## Booting kernel from Legacy Image at 00400000 ...
>    Image Name:   Linux-2.6.30-rc2-01402-gd4e2f68-
>    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>    Data Size:    1057355 Bytes =  1 MB
>    Load Address: 00000000
>    Entry Point:  00000000
>    Verifying Checksum ... OK
> ## Flattened Device Tree blob at 00750000
>    Booting using the fdt blob at 0x750000
>    Uncompressing Kernel Image ... OK
> 
> 
>>From Kernel via postmortem analysis - sorry it's a little messy, my
> debugger ICDPPCZ is not that great at producing memory dumps so I had
> to do some cleanup/conversion to make the results at least somewhat
> legible:
> 
> <6>Using Embedded Planet EP88xC machine description?
> <5>Linux version 2.6.30-rc2-??1402-gd4e2f68-dirty
> (devone@localhost.localdomain) (gcc version 4.2.2) #1 Mon J??n 29
> 11:35:28 CDT 2009?
> <7>Top of RAM: 0x4000000' Total RAM: 0x4000000?
> <7>Memory??hole size: 0MB?
> <4>Zone PFN ranges:?
> <4>  DMA      0x00000000 -> 0x00004000?
> <4>  ??ormal   0x00004000 -> 0x00004000?
> <4>Movable zone start PFN for each node?
> <4>ear??y_node_map[1] active PFN ranges?
> <4>    0: 0x00000000 -> 0x00004000?
> <7>On node 0??totalpages: 16384?
> <7>free_area_init_node: node 0' pgdat c021bf7c' node_mem_map ??023f000?
> <7>  DMA zone: 128 pages used for memmap?
> <7>  DMA zone: 0 pages reserve???
> <7>  DMA zone: 16256 pages' LIFO batch:3?
> <6>MMU: Allocated 72 bytes of context??maps for 16 contexts?
> <4>Built 1 zonelists in Zone order' mobility grouping on. ??Total pages: 16256?
> <5>Kernel command line: console=ttyS0'9600n8 loglevel=7?
> <6>N??_IRQS:512?
> <7>irq: irq 5 on host /soc@f0000000/interrupt-controller@0 mapped to
> ??irtual irq 16?
> <7>irq: irq 0 on host /soc@f0000000/cpm@9c0/interrupt-controller@??30
> mapped to virtual irq 17?
> <4>PID hash table entries: 256 (order: 8' 1024 byte??)?
> <4>Decrementer Frequency = 0x7bfa48?
> <7>irq: irq 15 on host /soc@f0000000/inte??rupt-controller@0 mapped to
> virtual irq 18?
> <7>time_init: decrementer frequency ?? 8.125000 MHz?
> <7>time_init: processor frequency   = 130.000000 MHz?
> <6>clocksour??e: timebase mult[1ec4ec4f] shift[22] registered?
> <7>clockevent: decrementer mult??214] shift[16] cpu[0]?
> <6>Dentry cache hash table entries: 8192 (order: 3' 32768??bytes)?
> <6>Inode-cache hash table entries: 4096 (order: 2' 16384 bytes)?
> <6>Memor??: 62532k/65536k available (2064k kernel code' 2940k
> reserved' 100k data' 99k bs??' 96k init)?
> <6>SLUB: Genslabs=12' HWalign=16' Order=0-3' MinObjects=0' CPUs=1' ??odes=1?
> <6>Calibrating delay loop... 16.12 BogoMIPS (lpj=80640)?
> <4>Mount-cache h??sh table entries: 512?
> <6>net_namespace: 296 bytes?
> <6>NET: Registered protocol f??mily 16?
> <4>bio: create slab <bio-0> at 0?
> <7>Switched to high resolution mode on??CPU 0?
> <6>NET: Registered protocol family 2?
> <6>IP route cache hash table entries?? 1024 (order: 0' 4096 bytes)?
> <6>TCP established hash table entries: 2048 (order?? 2' 16384 bytes)?
> <6>TCP bind hash table entries: 2048 (order: 1' 8192 bytes)?
> <6??TCP: Hash tables configured (established 2048 bind 2048)?
> <6>TCP reno registered??
> <6>NET: Registered protocol family 1?
> <6>msgmni has been set to 122?
> <6>io schedu??er noop registered?
> <6>io scheduler deadline registered (default)?
> <6>Generic RTC??Driver v1.07?
> <7>irq: irq 4 on host /soc@f0000000/cpm@9c0/interrupt-controller@9??0
> mapped to virtual irq 19?
> <6>f0000a80.serial: ttyCPM0 at MMIO 0xc500ea80 (irq ?? 19) is a CPM UART?
> <7>irq: irq 29 on host /soc@f0000000/cpm@9c0/interrupt-contr??ller@930
> mapped to virtual irq 29?
> <6>f0000a20.serial: ttyCPM1 at MMIO 0xc501aa2?? (irq = 29) is a CPM UART?
> <7>irq: irq 3 on host /soc@f0000000/interrupt-control??er@0 mapped to
> virtual irq 20?
> <6>eth0: fs_enet: 00:00:00:00:00:00?
> <7>irq: irq 7??on host /soc@f0000000/interrupt-controller@0 mapped to
> virtual irq 21?
> <6>eth1: ??s_enet: 00:00:00:00:00:00?
> <6>FEC MII Bus: probed?
> <6>fe000000.flash: Found 2 x16??devices at 0x0 in 32-bit bank?
> <4> Amd/Fujitsu Extended Query Table at 0x0040?
> <4??fe000000.flash: CFI does not contain boot bank location. Assuming top.?
> <5>numbe?? of CFI chips: 1?
> <5>cfi_cmdset_0002: Disabling erase-suspend-program due to cod?? brokenness.?
> <6>TCP cubic registered?
> <6>NET: Registered protocol family 17?
> <6>R??C: Registered udp transport module.?
> <6>RPC: Registered tcp transport module.?
> <3??Root-NFS: No NFS server available' giving up.?
> <3>VFS: Unable to mount root fs v??a NFS' trying floppy.?
> <4>VFS: Cannot open root device "<NULL>" or unknown-block??2'0)?
> <4>Please append a correct "root=" boot option; here are the available
> par??itions:?
> <4>1f00           32768 mtdblock0 driver: of-flash?
> <0>Kernel panic - no?? syncing: VFS: Unable to mount root fs on
> unknown-block(2'0)?
> <4>Call Trace:?
> <4>??c381fed0] [c00069e0] show_stack+0x44/0x16c (unreliable)?
> <4>[c381ff10] [c001bc6c?? panic+0x8c/0x168?
> <4>[c381ff60] [c01ecb80] mount_block_root+0x12c/0x244?
> <4>[c38??ffb0] [c01ecdf4] prepare_namespace+0x4c/0x1c4?
> <4>[c381ffd0] [c01ec1b0] kernel_i??it+0xd0/0xfc?
> <4>[c381fff0] [c000da60] kernel_thread+0x4c/0x68?
> <0>Rebooting in 1??0 seconds..?????????????????????????????????
> 
> At this point, my primary goal is to get console output working before
> I do anything else. I've tried different "console=x" boot arguments
> and I've added the "chosen" section to my DTS, but still no output.
> Anyone have suggestions about this? Is something else messed up in my
> DTS?

Did you try 'root=ttyCPM0,9600'?


-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

^ permalink raw reply

* Re: Trouble "Transferring control to Linux (at address 00000000)"
From: Mikhail Zaturenskiy @ 2009-06-29 17:53 UTC (permalink / raw)
  To: Frank Svendsbøe, Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <1ba63b520906271401u5d012b0ex87a48820b616ae48@mail.gmail.com>

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

Hi guys, I've been working off your suggestions and here's my update
on where I'm at now.

For reference, attached are my current
"linux-2.6-denx/arch/powerpc/boot/dts/ep88xc.dts" and
"u-boot-2009.03/include/configs/EP88x.h".

> I might be able to help out. Scott's right. According to U-Boots
> include/configs/EP88x.h,
> CONFIG_SYS_IMMR is 0xf0000000, but the Linux the ep88xc.dts is
> referring to an IMMR set
> to 0xfa200000. Replace every instance of 0xfa20 with 0xf000, and it may work.
I did notice the IMMR discrepancy and as Frank suggested adjusted the
0xfa20xxxx values to 0xf000xxxx in my DTS, though I'm wondering if it
would be better to have just set my CONFIG_SYS_IMMR to 0xfa200000? Not
sure if that would break more than it would fix. Anyways, I have not
noticed any difference in output after changing this in the DTS, but
I'll leave it this way as it seems more correct.

>>> Also, make sure u-boot is properly updating the memory size in the device
>>> tree.  Can you dump the post-fixup device tree in u-boot?
>> Not sure, but I'll try to find out if that's possible. It'd certainly
>> answer a lot of questions...
While I have not yet figured out how to dump the post-fixup tree... I
can see that U-Boot doesn't seem to be doing proper fixup because
after manually setting all the DTS fields that U-Boot was supposed to
fill in (clock frequency, RAM start/end, etc.), the kernel seems to be
going through a fairly normal boot sequence. Without me manually
setting those fields, they remain initialized to 0. The only issue is
that no output goes to the console.

Here is my current output.
>From U-Boot:

U-Boot 2009.03-svn8591 (Jun 29 2009 - 11:25:23)

CPU:   MPC885ZPnn at 100 MHz [40.0...133.0 MHz]
       8 kB I-Cache 8 kB D-Cache FEC present
Board: EP88xC 1.1  CPLD revision 2
DRAM:  64 MB
FLASH: 32 MB
In:    serial
Out:   serial
Err:   serial
Net:   FEC ETHERNET, FEC2 ETHERNET
Hit any key to stop autoboot:  0
=> tftp ep88x_uimage2
Using FEC ETHERNET device
TFTP from server 10.0.54.129; our IP address is 10.0.54.150
Filename 'ep88x_uimage2'.
Load address: 0x400000
Loading: #################################################################
         ########
done
Bytes transferred = 1057419 (10228b hex)
=> tftp 750000 ep88x_dtb2
Using FEC ETHERNET device
TFTP from server 10.0.54.129; our IP address is 10.0.54.150
Filename 'ep88x_dtb2'.
Load address: 0x750000
Loading: #
done
Bytes transferred = 7725 (1e2d hex)
=> bootm 400000 - 750000
## Booting kernel from Legacy Image at 00400000 ...
   Image Name:   Linux-2.6.30-rc2-01402-gd4e2f68-
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    1057355 Bytes =  1 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 00750000
   Booting using the fdt blob at 0x750000
   Uncompressing Kernel Image ... OK


>From Kernel via postmortem analysis - sorry it's a little messy, my
debugger ICDPPCZ is not that great at producing memory dumps so I had
to do some cleanup/conversion to make the results at least somewhat
legible:

<6>Using Embedded Planet EP88xC machine description?
<5>Linux version 2.6.30-rc2-??1402-gd4e2f68-dirty
(devone@localhost.localdomain) (gcc version 4.2.2) #1 Mon J??n 29
11:35:28 CDT 2009?
<7>Top of RAM: 0x4000000' Total RAM: 0x4000000?
<7>Memory??hole size: 0MB?
<4>Zone PFN ranges:?
<4>  DMA      0x00000000 -> 0x00004000?
<4>  ??ormal   0x00004000 -> 0x00004000?
<4>Movable zone start PFN for each node?
<4>ear??y_node_map[1] active PFN ranges?
<4>    0: 0x00000000 -> 0x00004000?
<7>On node 0??totalpages: 16384?
<7>free_area_init_node: node 0' pgdat c021bf7c' node_mem_map ??023f000?
<7>  DMA zone: 128 pages used for memmap?
<7>  DMA zone: 0 pages reserve???
<7>  DMA zone: 16256 pages' LIFO batch:3?
<6>MMU: Allocated 72 bytes of context??maps for 16 contexts?
<4>Built 1 zonelists in Zone order' mobility grouping on. ??Total pages: 16256?
<5>Kernel command line: console=ttyS0'9600n8 loglevel=7?
<6>N??_IRQS:512?
<7>irq: irq 5 on host /soc@f0000000/interrupt-controller@0 mapped to
??irtual irq 16?
<7>irq: irq 0 on host /soc@f0000000/cpm@9c0/interrupt-controller@??30
mapped to virtual irq 17?
<4>PID hash table entries: 256 (order: 8' 1024 byte??)?
<4>Decrementer Frequency = 0x7bfa48?
<7>irq: irq 15 on host /soc@f0000000/inte??rupt-controller@0 mapped to
virtual irq 18?
<7>time_init: decrementer frequency ?? 8.125000 MHz?
<7>time_init: processor frequency   = 130.000000 MHz?
<6>clocksour??e: timebase mult[1ec4ec4f] shift[22] registered?
<7>clockevent: decrementer mult??214] shift[16] cpu[0]?
<6>Dentry cache hash table entries: 8192 (order: 3' 32768??bytes)?
<6>Inode-cache hash table entries: 4096 (order: 2' 16384 bytes)?
<6>Memor??: 62532k/65536k available (2064k kernel code' 2940k
reserved' 100k data' 99k bs??' 96k init)?
<6>SLUB: Genslabs=12' HWalign=16' Order=0-3' MinObjects=0' CPUs=1' ??odes=1?
<6>Calibrating delay loop... 16.12 BogoMIPS (lpj=80640)?
<4>Mount-cache h??sh table entries: 512?
<6>net_namespace: 296 bytes?
<6>NET: Registered protocol f??mily 16?
<4>bio: create slab <bio-0> at 0?
<7>Switched to high resolution mode on??CPU 0?
<6>NET: Registered protocol family 2?
<6>IP route cache hash table entries?? 1024 (order: 0' 4096 bytes)?
<6>TCP established hash table entries: 2048 (order?? 2' 16384 bytes)?
<6>TCP bind hash table entries: 2048 (order: 1' 8192 bytes)?
<6??TCP: Hash tables configured (established 2048 bind 2048)?
<6>TCP reno registered??
<6>NET: Registered protocol family 1?
<6>msgmni has been set to 122?
<6>io schedu??er noop registered?
<6>io scheduler deadline registered (default)?
<6>Generic RTC??Driver v1.07?
<7>irq: irq 4 on host /soc@f0000000/cpm@9c0/interrupt-controller@9??0
mapped to virtual irq 19?
<6>f0000a80.serial: ttyCPM0 at MMIO 0xc500ea80 (irq ?? 19) is a CPM UART?
<7>irq: irq 29 on host /soc@f0000000/cpm@9c0/interrupt-contr??ller@930
mapped to virtual irq 29?
<6>f0000a20.serial: ttyCPM1 at MMIO 0xc501aa2?? (irq = 29) is a CPM UART?
<7>irq: irq 3 on host /soc@f0000000/interrupt-control??er@0 mapped to
virtual irq 20?
<6>eth0: fs_enet: 00:00:00:00:00:00?
<7>irq: irq 7??on host /soc@f0000000/interrupt-controller@0 mapped to
virtual irq 21?
<6>eth1: ??s_enet: 00:00:00:00:00:00?
<6>FEC MII Bus: probed?
<6>fe000000.flash: Found 2 x16??devices at 0x0 in 32-bit bank?
<4> Amd/Fujitsu Extended Query Table at 0x0040?
<4??fe000000.flash: CFI does not contain boot bank location. Assuming top.?
<5>numbe?? of CFI chips: 1?
<5>cfi_cmdset_0002: Disabling erase-suspend-program due to cod?? brokenness.?
<6>TCP cubic registered?
<6>NET: Registered protocol family 17?
<6>R??C: Registered udp transport module.?
<6>RPC: Registered tcp transport module.?
<3??Root-NFS: No NFS server available' giving up.?
<3>VFS: Unable to mount root fs v??a NFS' trying floppy.?
<4>VFS: Cannot open root device "<NULL>" or unknown-block??2'0)?
<4>Please append a correct "root=" boot option; here are the available
par??itions:?
<4>1f00           32768 mtdblock0 driver: of-flash?
<0>Kernel panic - no?? syncing: VFS: Unable to mount root fs on
unknown-block(2'0)?
<4>Call Trace:?
<4>??c381fed0] [c00069e0] show_stack+0x44/0x16c (unreliable)?
<4>[c381ff10] [c001bc6c?? panic+0x8c/0x168?
<4>[c381ff60] [c01ecb80] mount_block_root+0x12c/0x244?
<4>[c38??ffb0] [c01ecdf4] prepare_namespace+0x4c/0x1c4?
<4>[c381ffd0] [c01ec1b0] kernel_i??it+0xd0/0xfc?
<4>[c381fff0] [c000da60] kernel_thread+0x4c/0x68?
<0>Rebooting in 1??0 seconds..?????????????????????????????????

At this point, my primary goal is to get console output working before
I do anything else. I've tried different "console=x" boot arguments
and I've added the "chosen" section to my DTS, but still no output.
Anyone have suggestions about this? Is something else messed up in my
DTS?

Thanks,
Mikhail Zaturenskiy

[-- Attachment #2: ep88xc.dts --]
[-- Type: application/octet-stream, Size: 5101 bytes --]

/*
 * EP88xC Device Tree Source
 *
 * Copyright 2006 MontaVista Software, Inc.
 * Copyright 2007,2008 Freescale Semiconductor, Inc.
 *
 * 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 = "EP88xC";
	compatible = "fsl,ep88xc";
	#address-cells = <1>;
	#size-cells = <1>;

	cpus {
		#address-cells = <1>;
		#size-cells = <0>;

		PowerPC,885@0 {
			device_type = "cpu";
			reg = <0x0>;
			d-cache-line-size = <16>;
			i-cache-line-size = <16>;
			d-cache-size = <8192>;
			i-cache-size = <8192>;
			timebase-frequency = <8000000>; // MZ - was 0
			bus-frequency = <50000000>; // MZ - was 0
			clock-frequency = <130000000>; // MZ - was 0,
			interrupts = <15 2>;	// decrementer interrupt
			interrupt-parent = <&PIC>;
		};
	};

	memory {
		device_type = "memory";
		reg = <0x0 0x04000000>; // MZ - was <0x0 0x0>
	};

	localbus@f0000100 { // MZ - was fa20xxxx
		compatible = "fsl,mpc885-localbus", "fsl,pq1-localbus";
		#address-cells = <2>;
		#size-cells = <1>;
		reg = <0xf0000100 0x40>; // MZ - was fa20xxxx

		ranges = <
			0x0 0x0 0xfc000000 0x4000000
			0x3 0x0 0xfa000000 0x1000000
		>;

		flash@0,2000000 {
			compatible = "cfi-flash";
			reg = <0x0 0x2000000 0x2000000>;
			bank-width = <4>;
			device-width = <2>;
		};

		board-control@3,400000 {
			reg = <0x3 0x400000 0x10>;
			compatible = "fsl,ep88xc-bcsr";
		};
	};

	soc@f0000000 { // MZ - was fa20xxxx
		compatible = "fsl,mpc885", "fsl,pq1-soc";
		#address-cells = <1>;
		#size-cells = <1>;
		device_type = "soc";
		ranges = <0x0 0xf0000000 0x4000>; // MZ - was fa20xxxx
		bus-frequency = <0>;

		// Temporary -- will go away once kernel uses ranges for get_immrbase().
		reg = <0xf0000000 0x4000>; // MZ - was fa20xxxx

		mdio@e00 {
			compatible = "fsl,mpc885-fec-mdio", "fsl,pq1-fec-mdio";
			reg = <0xe00 0x188>;
			#address-cells = <1>;
			#size-cells = <0>;

			PHY0: ethernet-phy@0 {
				reg = <0x0>;
				device_type = "ethernet-phy";
			};

			PHY1: ethernet-phy@1 {
				reg = <0x1>;
				device_type = "ethernet-phy";
			};
		};

		ethernet@e00 {
			device_type = "network";
			compatible = "fsl,mpc885-fec-enet",
			             "fsl,pq1-fec-enet";
			reg = <0xe00 0x188>;
			local-mac-address = [ 00 00 00 00 00 00 ];
			interrupts = <3 1>;
			interrupt-parent = <&PIC>;
			phy-handle = <&PHY0>;
			linux,network-index = <0>;
		};

		ethernet@1e00 {
			device_type = "network";
			compatible = "fsl,mpc885-fec-enet",
			             "fsl,pq1-fec-enet";
			reg = <0x1e00 0x188>;
			local-mac-address = [ 00 00 00 00 00 00 ];
			interrupts = <7 1>;
			interrupt-parent = <&PIC>;
			phy-handle = <&PHY1>;
			linux,network-index = <1>;
		};

		PIC: interrupt-controller@0 {
			interrupt-controller;
			#interrupt-cells = <2>;
			reg = <0x0 0x24>;
			compatible = "fsl,mpc885-pic", "fsl,pq1-pic";
		};

		pcmcia@80 {
			#address-cells = <3>;
			#interrupt-cells = <1>;
			#size-cells = <2>;
			compatible = "fsl,pq-pcmcia";
			device_type = "pcmcia";
			reg = <0x80 0x80>;
			interrupt-parent = <&PIC>;
			interrupts = <13 1>;
		};

		cpm@9c0 {
			#address-cells = <1>;
			#size-cells = <1>;
			compatible = "fsl,mpc885-cpm", "fsl,cpm1";
			command-proc = <0x9c0>;
			interrupts = <0>;	// cpm error interrupt
			interrupt-parent = <&CPM_PIC>;
			reg = <0x9c0 0x40>;
			ranges;

			muram@2000 {
				#address-cells = <1>;
				#size-cells = <1>;
				ranges = <0x0 0x2000 0x2000>;

				data@0 {
					compatible = "fsl,cpm-muram-data";
					reg = <0x0 0x1c00>;
				};
			};

			brg@9f0 {
				compatible = "fsl,mpc885-brg",
				             "fsl,cpm1-brg",
				             "fsl,cpm-brg";
				reg = <0x9f0 0x10>;
			};

			CPM_PIC: interrupt-controller@930 {
				interrupt-controller;
				#interrupt-cells = <1>;
				interrupts = <5 2 0 2>;
				interrupt-parent = <&PIC>;
				reg = <0x930 0x20>;
				compatible = "fsl,mpc885-cpm-pic",
				             "fsl,cpm1-pic";
			};

			// MON-1
			serial@a80 {
				device_type = "serial";
				compatible = "fsl,mpc885-smc-uart",
				             "fsl,cpm1-smc-uart";
				reg = <0xa80 0x10 0x3e80 0x40>;
				interrupts = <4>;
				interrupt-parent = <&CPM_PIC>;
				fsl,cpm-brg = <1>;
				fsl,cpm-command = <0x90>;
				linux,planetcore-label = "SMC1";
			};

			// SER-1
			serial@a20 {
				device_type = "serial";
				compatible = "fsl,mpc885-scc-uart",
				             "fsl,cpm1-scc-uart";
				reg = <0xa20 0x20 0x3d00 0x80>;
				interrupts = <29>;
				interrupt-parent = <&CPM_PIC>;
				fsl,cpm-brg = <2>;
				fsl,cpm-command = <0x40>;
				linux,planetcore-label = "SCC2";
			};

			usb@a00 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "fsl,mpc885-usb",
				             "fsl,cpm1-usb";
				reg = <0xa00 0x18 0x1c00 0x80>;
				interrupt-parent = <&CPM_PIC>;
				interrupts = <30>;
				fsl,cpm-command = <0000>;
			};
		};
	};

	chosen {
		linux,stdout-path = "/soc@f0000000/cpm@9c0/serial@a80"; // MZ - added this 'chosen' section
	};

};

[-- Attachment #3: EP88x.h --]
[-- Type: application/octet-stream, Size: 8237 bytes --]

/*
 * Copyright (C) 2005 Arabella Software Ltd.
 * Yuli Barcohen <yuli@arabellasw.com>
 *
 * Support for Embedded Planet EP88x boards.
 * Tested on EP88xC with MPC885 CPU, 64MB SDRAM and 16MB flash.
 *
 * See file CREDITS for list of people who contributed to this
 * project.
 *
 * 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.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 * MA 02111-1307 USA
 */
#ifndef __CONFIG_H
#define __CONFIG_H

//#define DEBUG // MZ

#define CONFIG_OF_LIBFDT 	// MZ - added to support FDT, suggested by Detlev

#define CONFIG_MPC885

#define CONFIG_EP88X				/* Embedded Planet EP88x board	*/

#define CONFIG_BOARD_EARLY_INIT_F		/* Call board_early_init_f	*/

/* Allow serial number (serial#) and MAC address (ethaddr) to be overwritten */
#define CONFIG_ENV_OVERWRITE

#define	CONFIG_8xx_CONS_SMC1	1		/* Console is on SMC1		*/
#define CONFIG_BAUDRATE		9600

#define	CONFIG_ETHER_ON_FEC1			/* Enable Ethernet on FEC1	*/
#define	CONFIG_ETHER_ON_FEC2			/* Enable Ethernet on FEC2	*/
#if defined(CONFIG_ETHER_ON_FEC1) || defined(CONFIG_ETHER_ON_FEC2)
#define CONFIG_SYS_DISCOVER_PHY
#define CONFIG_MII_INIT		1
#define FEC_ENET
#endif /* CONFIG_FEC_ENET */

#define CONFIG_8xx_OSCLK		10000000 /* 10 MHz oscillator on EXTCLK */
#define CONFIG_8xx_CPUCLK_DEFAULT	100000000
#define CONFIG_SYS_8xx_CPUCLK_MIN	40000000
#define CONFIG_SYS_8xx_CPUCLK_MAX	133000000

/*
 * BOOTP options
 */
#define CONFIG_BOOTP_BOOTFILESIZE
#define CONFIG_BOOTP_BOOTPATH
#define CONFIG_BOOTP_GATEWAY
#define CONFIG_BOOTP_HOSTNAME


/*
 * Command line configuration.
 */
#include <config_cmd_default.h>

#define CONFIG_CMD_DHCP
#define CONFIG_CMD_IMMAP
#define CONFIG_CMD_MII
#define CONFIG_CMD_PING


//#define CONFIG_BOOTDELAY	5		/* Autoboot after 5 seconds	*/
#define CONFIG_BOOTDELAY	15		/* MZ - Autoboot after 15 seconds	*/
//#define CONFIG_BOOTCOMMAND	"bootm fe060000"	/* Autoboot command	*/
#define CONFIG_BOOTCOMMAND	"bootm fc080000"	/* MZ - Autoboot command	*/
//#define CONFIG_BOOTARGS		"root=/dev/mtdblock1 rw mtdparts=phys:2M(ROM)ro,-(root)"
#define CONFIG_BOOTARGS		"console=ttyS0,9600n8 loglevel=7"	// MZ

#define CONFIG_BZIP2		/* Include support for bzip2 compressed images  */
#undef	CONFIG_WATCHDOG		/* Disable platform specific watchdog		*/

/*-----------------------------------------------------------------------
 * Miscellaneous configurable options
 */
#define CONFIG_SYS_PROMPT		"=> "		/* Monitor Command Prompt	*/
#define CONFIG_SYS_HUSH_PARSER
#define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
#define CONFIG_SYS_LONGHELP				/* #undef to save memory	*/
#define CONFIG_SYS_CBSIZE		256		/* Console I/O Buffer Size	*/
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)  /* Print Buffer Size */
#define CONFIG_SYS_MAXARGS		16		/* Max number of command args	*/
#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE	/* Boot Argument Buffer Size	*/

#define CONFIG_SYS_LOAD_ADDR		0x400000	/* Default load address		*/

#define CONFIG_SYS_HZ			1000		/* Decrementer freq: 1 ms ticks	*/

#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }

/*-----------------------------------------------------------------------
 * RAM configuration (note that CONFIG_SYS_SDRAM_BASE must be zero)
 */
#define CONFIG_SYS_SDRAM_BASE		0x00000000
//#define CONFIG_SYS_SDRAM_MAX_SIZE	0x08000000	/* Up to 128 Mbyte		*/
#define CONFIG_SYS_SDRAM_MAX_SIZE	0x04000000	/* MZ - Up to 64 Mbyte		*/

#define CONFIG_SYS_MAMR		0x00805000

/*
 * 4096	Up to 4096 SDRAM rows
 * 1000	factor s -> ms
 * 32	PTP (pre-divider from MPTPR)
 * 4	Number of refresh cycles per period
 * 64	Refresh cycle in ms per number of rows
 */
#define CONFIG_SYS_PTA_PER_CLK		((4096 * 32 * 1000) / (4 * 64))

#define CONFIG_SYS_MEMTEST_START	0x00100000	/* memtest works on		*/
#define CONFIG_SYS_MEMTEST_END		0x00500000	/* 1 ... 5 MB in SDRAM		*/

#define CONFIG_SYS_RESET_ADDRESS	0x09900000

/*-----------------------------------------------------------------------
 * For booting Linux, the board info and command line data
 * have to be in the first 8 MB of memory, since this is
 * the maximum mapped by the Linux kernel during initialization.
 */
#define CONFIG_SYS_BOOTMAPSZ		(8 << 20)	/* Initial Memory map for Linux */

#define CONFIG_SYS_MONITOR_BASE	TEXT_BASE
#define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 256 KB for Monitor   */
#undef CONFIG_BZIP2	// MZ
#ifdef CONFIG_BZIP2
#define CONFIG_SYS_MALLOC_LEN		(4096 << 10)	/* Reserve ~4 MB for malloc()   */
#else
#define CONFIG_SYS_MALLOC_LEN		(128 << 10)	/* Reserve 128 KB for malloc()  */
#endif /* CONFIG_BZIP2 */

/*-----------------------------------------------------------------------
 * Flash organisation
 */
#define CONFIG_SYS_FLASH_BASE		0xFC000000
#define CONFIG_SYS_FLASH_CFI				/* The flash is CFI compatible  */
#define CONFIG_FLASH_CFI_DRIVER			/* Use common CFI driver        */
#define CONFIG_SYS_MAX_FLASH_BANKS	1		/* Max number of flash banks	*/
//#define CONFIG_SYS_MAX_FLASH_SECT	512		/* Max num of sects on one chip */
#define CONFIG_SYS_MAX_FLASH_SECT	128		/* MZ - Max num of sects on one chip */

/* Environment is in flash */
#define CONFIG_ENV_IS_IN_FLASH
//#define CONFIG_ENV_SECT_SIZE	0x20000		/* We use one complete sector	*/
#define CONFIG_ENV_SECT_SIZE	0x40000		/* MZ - We use one complete sector	*/ 
#define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)

#define CONFIG_SYS_OR0_PRELIM		0xFC000160
#define CONFIG_SYS_BR0_PRELIM		(CONFIG_SYS_FLASH_BASE | BR_PS_32 | BR_MS_GPCM | BR_V)

#define	CONFIG_SYS_DIRECT_FLASH_TFTP

/*-----------------------------------------------------------------------
 * BCSR
 */
#define CONFIG_SYS_OR3_PRELIM		0xFF0005B0
#define CONFIG_SYS_BR3_PRELIM		(0xFA000000 |BR_PS_16 | BR_MS_GPCM | BR_V)

#define CONFIG_SYS_BCSR		0xFA400000

/*-----------------------------------------------------------------------
 * Internal Memory Map Register
 */
#define CONFIG_SYS_IMMR		0xF0000000

/*-----------------------------------------------------------------------
 * Definitions for initial stack pointer and data area (in DPRAM)
 */
#define CONFIG_SYS_INIT_RAM_ADDR	CONFIG_SYS_IMMR
#define CONFIG_SYS_INIT_RAM_END	0x2F00		/* End of used area in DPRAM	*/
#define CONFIG_SYS_GBL_DATA_SIZE	128  /* Size in bytes reserved for initial data */
#define CONFIG_SYS_GBL_DATA_OFFSET	(CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
#define CONFIG_SYS_INIT_SP_OFFSET	CONFIG_SYS_GBL_DATA_OFFSET

/*-----------------------------------------------------------------------
 * Configuration registers
 */
#ifdef CONFIG_WATCHDOG
#define CONFIG_SYS_SYPCR		(SYPCR_SWTC | SYPCR_BMT | SYPCR_BME  | \
				 SYPCR_SWF  | SYPCR_SWE | SYPCR_SWRI | \
				 SYPCR_SWP)
#else
#define CONFIG_SYS_SYPCR		(SYPCR_SWTC | SYPCR_BMT | SYPCR_BME  | \
				 SYPCR_SWF  | SYPCR_SWP)
#endif /* CONFIG_WATCHDOG */

#define CONFIG_SYS_SIUMCR		(SIUMCR_MLRC01 | SIUMCR_DBGC11)

/* TBSCR - Time Base Status and Control Register */
#define CONFIG_SYS_TBSCR		(TBSCR_TBF | TBSCR_TBE)

/* PISCR - Periodic Interrupt Status and Control */
#define CONFIG_SYS_PISCR		PISCR_PS

/* SCCR - System Clock and reset Control Register */
#define SCCR_MASK		SCCR_EBDF11
#define CONFIG_SYS_SCCR		SCCR_RTSEL

#define CONFIG_SYS_DER			0

/*-----------------------------------------------------------------------
 * Cache Configuration
 */
#define CONFIG_SYS_CACHELINE_SIZE	16	/* For all MPC8xx chips			*/

/*-----------------------------------------------------------------------
 * Internal Definitions
 *
 * Boot Flags
 */
#define BOOTFLAG_COLD		0x01	/* Normal Power-On: Boot from flash	*/
#define BOOTFLAG_WARM		0x02	/* Software reboot			*/

#endif /* __CONFIG_H */

^ permalink raw reply

* Re: PCI device support in Open Firmware (device tree syntax)
From: Scott Wood @ 2009-06-29 16:51 UTC (permalink / raw)
  To: Johnny Hung; +Cc: kernelnewbies, linuxppc-dev, linux-embedded
In-Reply-To: <cb9ecdfa0906290858x125b8149na037f33258c21426@mail.gmail.com>

On Mon, Jun 29, 2009 at 11:58:22PM +0800, Johnny Hung wrote:
> Hi all,
>     I am working in customized Freescale MPC8313 board. There are two
> PCI devices (Broadcom Switch) in PCI bus.
> Each PCI device has its configuration space. It contains
> vendor/product ID (RO)..., and important information, likes BARs
> (Base Address), INT line and IRQ(RW). These resources (BAR, INT, IRQ)
> is assigned from BIOS in x86 arch.
>     My problem is how to assign PCI device resources in device tree. I
> can't find exist dts file as an example. I have read the
> http://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf
> file. It's described detailed about device tree
> except PCI device. So, anyone give me a hint or sany tuff is appreciated.
>    I think Linux Kernel parses device tree and get the PCI device
> resources information then write into PCI configuration space.
> So PCI device driver do pci_register_driver (get resource) and do
> itself probe for PCI device. Is it right? CMIIAW

With flat device trees, PCI devices are not typically included as they
can be probed instead.  Interrupt mapping is conveyed by the
interrupt-map property in the PCI controller node.

-Scott

^ permalink raw reply

* Re: [PATCH] Add EDAC support for P2020DS
From: Dave Jiang @ 2009-06-29 15:47 UTC (permalink / raw)
  To: Yang Shi; +Cc: linuxppc-dev, bluesmoke-devel
In-Reply-To: <1245893976-32678-1-git-send-email-yang.shi@windriver.com>

Acked-by: Dave Jiang <djiang@mvista.com>

Yang Shi wrote:
> Based on Kumar's new compatible types patch, add P2020 into
> MPC85xx EDAC compatible lists so that EDAC can recognize
> P2020 meomry controller and L2 cache controller and export
> the relevant fields to sysfs.
> 
> EDAC MPC85xx DDR3 support is needed if DDR3 memory stick is
> installed on a P2020DS board so that EDAC core can recognize
> DDR3 memory type.
> 
> Signed-off-by: Yang Shi <yang.shi@windriver.com>
> ---
> (85xx DDR3 EDAC patch is currently in akpm's mm tree)
> 
>  drivers/edac/mpc85xx_edac.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
> index 7c8c2d7..85575fb 100644
> --- a/drivers/edac/mpc85xx_edac.c
> +++ b/drivers/edac/mpc85xx_edac.c
> @@ -646,6 +646,7 @@ static struct of_device_id mpc85xx_l2_err_of_match[] = {
>  	{ .compatible = "fsl,mpc8560-l2-cache-controller", },
>  	{ .compatible = "fsl,mpc8568-l2-cache-controller", },
>  	{ .compatible = "fsl,mpc8572-l2-cache-controller", },
> +	{ .compatible = "fsl,p2020-l2-cache-controller", },
>  	{},
>  };
>  
> @@ -978,6 +979,7 @@ static struct of_device_id mpc85xx_mc_err_of_match[] = {
>  	{ .compatible = "fsl,mpc8560-memory-controller", },
>  	{ .compatible = "fsl,mpc8568-memory-controller", },
>  	{ .compatible = "fsl,mpc8572-memory-controller", },
> +	{ .compatible = "fsl,p2020-memory-controller", },
>  	{},
>  };
>  


-- 

------------------------------------------------------
Dave Jiang
Software Engineer
MontaVista Software, Inc.
http://www.mvista.com
------------------------------------------------------

^ permalink raw reply

* Re: [Bugme-new] [Bug 13304] New: ehci_hcd module causing problems in using usb head phone
From: Geoff Levand @ 2009-06-29 16:07 UTC (permalink / raw)
  To: Alan Stern; +Cc: linuxppc-dev, USB list, abhishekkumar, bugme-daemon
In-Reply-To: <Pine.LNX.4.44L0.0906262132120.2995-100000@netrider.rowland.org>

On 06/26/2009 06:33 PM, Alan Stern wrote:
> On Fri, 26 Jun 2009, Geoff Levand wrote:
> 
>> > Where is the information about the hardware errata you mentioned?
>> 
>> Sorry, I should have mentioned it.  Unfortunately, that info is not
>> in the public as far as I know.  I think only someone with access
>> to those will be able to work on this fix.
> 
> Okay, then I guess there's nothing more I can do regarding Bug #13304.  
> Can you take it over?

Yes, as I mentioned, it is on my to-do list.  I'll bump up the priority
now that there are two users reporting the problem.

-Geoff

^ permalink raw reply

* Re: [PATCH 05/62] arch/powerpc: Remove unnecessary semicolons
From: Geoff Levand @ 2009-06-29 16:01 UTC (permalink / raw)
  To: Joe Perches
  Cc: trivial, Robert Richter, linux-kernel, linuxppc-dev,
	oprofile-list, Andrew Morton, cbe-oss-dev
In-Reply-To: <a55afa18f8b7ba8343072a14d36a2e340e61e816.1246173680.git.joe@perches.com>

On 06/28/2009 09:26 AM, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  arch/powerpc/mm/tlb_hash64.c                 |    2 +-
>  arch/powerpc/oprofile/cell/vma_map.c         |    2 +-
>  arch/powerpc/platforms/powermac/cpufreq_64.c |    2 +-
>  arch/powerpc/platforms/powermac/pic.c        |    2 +-
>  arch/powerpc/platforms/ps3/system-bus.c      |    1 -
>  arch/powerpc/sysdev/fsl_rio.c                |    2 +-
>  arch/powerpc/sysdev/ppc4xx_pci.c             |    4 ++--
>  7 files changed, 7 insertions(+), 8 deletions(-)

For ps3/system-bus.c only.

Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>

^ permalink raw reply

* Re: How to implement kexec on e500 ?
From: kernel mailz @ 2009-06-29 16:01 UTC (permalink / raw)
  To: wilbur.chan; +Cc: linuxppc-dev
In-Reply-To: <e997b7420906290836u72bd6abbw553df5e77f097349@mail.gmail.com>

Did some searching on the archieve

Looks like this is a old patch
[PATCH 03/10] powerpc: Add kexec support for PPC_85xx platforms
Dale Farnsworth
Thu, 22 Nov 2007 07:51:52 -0800

Is this the patch you were referring to kumar

-TZ


On Mon, Jun 29, 2009 at 9:06 PM, wilbur.chan<wilbur512@gmail.com> wrote:
> Excuse me ,
>
> btw,how to search these patches on this maillist?
>
> through Linuxppc-dev Archives one by one?
>
> Cheers,
>
> wilbur
>
> 2009/6/29, Kumar Gala <galak@kernel.crashing.org>:
>>
>> On Jun 29, 2009, at 8:47 AM, wilbur.chan wrote:
>>
>>> kernel 2.6.21.7
>>>
>>> As we know , kexec stores =A0data =A0for new kernel image , =A0in the f=
orm
>>> of =A0 a page list.
>>>
>>> And kexec uses the physical address of the another =A0page for a
>>> "next-page" pointer.
>>>
>>> However, PowerPC e500 =A0does not allow users to turn off the MMU, so w=
e
>>> can not used physical address directly in our code.
>>>
>>>
>>> Someone suggested that changing =A0relocate_kernel.S to add a TLB 1-to-=
1
>>> mapping of DRAM .
>>>
>>> What does "mapping" mean ?
>>>
>>> Any suggestion to implement kexec on e500 ?
>>
>> Wilbur, kexec has been implemented on e500. =A0There are some patches on
>> the list for this and they just need to be respun and reviewed again.
>>
>> - k
>>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>

^ permalink raw reply

* PCI device support in Open Firmware (device tree syntax)
From: Johnny Hung @ 2009-06-29 15:58 UTC (permalink / raw)
  To: linux-embedded, linuxppc-dev, kernelnewbies, scottwood

Hi all,
    I am working in customized Freescale MPC8313 board. There are two
PCI devices (Broadcom Switch) in PCI bus.
Each PCI device has its configuration space. It contains
vendor/product ID (RO)..., and important information, likes BARs
(Base Address), INT line and IRQ(RW). These resources (BAR, INT, IRQ)
is assigned from BIOS in x86 arch.
    My problem is how to assign PCI device resources in device tree. I
can't find exist dts file as an example. I have read the
http://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf
file. It's described detailed about device tree
except PCI device. So, anyone give me a hint or sany tuff is appreciated.
   I think Linux Kernel parses device tree and get the PCI device
resources information then write into PCI configuration space.
So PCI device driver do pci_register_driver (get resource) and do
itself probe for PCI device. Is it right? CMIIAW

BRs, H. Johnny

^ permalink raw reply

* Re: Inline Assembly queries
From: David Howells @ 2009-06-29 15:57 UTC (permalink / raw)
  To: kernel mailz; +Cc: gcc-help, linuxppc-dev
In-Reply-To: <abe8a1fd0906290849w1ba6bd33of60a9c2e110c10fd@mail.gmail.com>

kernel mailz <kernelmailz@googlemail.com> wrote:

> asm("sync");

Isn't gcc free to discard this as it has no dependencies, no indicated side
effects, and isn't required to be kept?  I think this should probably be:

	asm volatile("sync");

David

^ permalink raw reply

* Inline Assembly queries
From: kernel mailz @ 2009-06-29 15:49 UTC (permalink / raw)
  To: gcc-help, linuxppc-dev
In-Reply-To: <abe8a1fd0906272157j4246e9d3hec2e374535a22c89@mail.gmail.com>

I tried a small example

int *p =3D 0x1000;
int a =3D *p;
asm("sync":::"memory");
a =3D *p;

and

volatile int *p =3D 0x1000;
int a =3D *p;
asm("sync");
a =3D *p

Got the same assembly.
Which is right.

So does it mean, if proper use of volatile is done, there is no need
of "memory" ?
But then why  below example of __xchg uses both ?

I am confused!
Anyone has a clue?

-TZ


---------- Forwarded message ----------
From: kernel mailz <kernelmailz@googlemail.com>
Date: Sun, Jun 28, 2009 at 10:27 AM
Subject: Re: Inline Assembly queries
To: Ian Lance Taylor <iant@google.com>
Cc: gcc-help@gcc.gnu.org, linuxppc-dev@ozlabs.org


Thanks Ian,
For the "memory" clobber
I tried with the a function in linux kernel

--
/*
=A0* Atomic exchange
=A0*
=A0* Changes the memory location '*ptr' to be val and returns
=A0* the previous value stored there.
=A0*/
static inline unsigned long
__xchg_u32(volatile void *p, unsigned long val)
{
=A0 =A0 =A0 =A0unsigned long prev;

=A0 =A0 =A0 =A0__asm__ __volatile__(

"1: =A0 =A0 lwarx =A0 %0,0,%2 \n"

" =A0 =A0 =A0 stwcx. =A0%3,0,%2 \n\
=A0 =A0 =A0 =A0bne- =A0 =A01b"

=A0 =A0 =A0 =A0: "=3D&r" (prev), "+m" (*(volatile unsigned int *)p)
=A0 =A0 =A0 =A0: "r" (p), "r" (val)
// =A0 =A0 =A0 =A0:"memory","cc");

=A0 =A0 =A0 =A0return prev;
}
#define ADDR 0x1000
int main()
{
=A0 =A0 =A0 =A0__xchg_u32((void*)ADDR, 0x2000);
=A0 =A0 =A0 =A0__xchg_u32((void*)ADDR, 0x3000);

=A0 =A0 =A0 =A0return 0;

}

Got the same asm, when compiled with O1 , with / without "memory" clobber

100003fc <main>:
100003fc: =A0 =A0 =A0 39 20 10 00 =A0 =A0 li =A0 =A0 =A0r9,4096
10000400: =A0 =A0 =A0 38 00 20 00 =A0 =A0 li =A0 =A0 =A0r0,8192
10000404: =A0 =A0 =A0 7d 60 48 28 =A0 =A0 lwarx =A0 r11,0,r9
10000408: =A0 =A0 =A0 7c 00 49 2d =A0 =A0 stwcx. =A0r0,0,r9
1000040c: =A0 =A0 =A0 40 a2 ff f8 =A0 =A0 bne- =A0 =A010000404 <main+0x8>
10000410: =A0 =A0 =A0 38 00 30 00 =A0 =A0 li =A0 =A0 =A0r0,12288
10000414: =A0 =A0 =A0 7d 60 48 28 =A0 =A0 lwarx =A0 r11,0,r9
10000418: =A0 =A0 =A0 7c 00 49 2d =A0 =A0 stwcx. =A0r0,0,r9
1000041c: =A0 =A0 =A0 40 a2 ff f8 =A0 =A0 bne- =A0 =A010000414 <main+0x18>
10000420: =A0 =A0 =A0 38 60 00 00 =A0 =A0 li =A0 =A0 =A0r3,0
10000424: =A0 =A0 =A0 4e 80 00 20 =A0 =A0 blr

No diff ?
am I choosing the right example ?

-TZ


On Sun, Jun 28, 2009 at 4:50 AM, Ian Lance Taylor<iant@google.com> wrote:
> kernel mailz <kernelmailz@googlemail.com> writes:
>
>> I've been fiddling my luck with gcc 4.3.2 inline assembly on powerpc
>> There are a few queries
>>
>> 1. asm volatile or simply asm produce the same assembly code.
>> Tried with a few examples but didnt find any difference by adding
>> volatile with asm
>>
>> 2. Use of "memory" and clobbered registers.
>>
>> "memory" -
>> a. announce to the compiler that the memory has been modified
>> b. this instruction writes to some memory (other than a listed output)
>> and GCC shouldn=92t cache memory values in registers across this asm.
>>
>> I tried with stw and stwcx instruction, adding "memory" has no effect.
>>
>> Is there any example scenerio where gcc would generate different
>> assembly by adding / removing "memory" ?
>
> Please never send a message to both gcc@gcc.gnu.org and
> gcc-help@gcc.gnu.org. =A0This message is appropriate for
> gcc-help@gcc.gnu.org, not for gcc@gcc.gnu.org. =A0Thanks.
>
> An asm with no outputs is always considered to be volatile. =A0To see the
> affect of volatile, just try something like
> =A0 =A0asm ("# modify %0" : "=3Dr" (i) : /* no inputs */ : /* no clobbers=
 */);
> Try it with and without optimization.
>
> As the documentation says, the effect of adding a "memory" clobber is
> that gcc does not cache values in registers across the asm. =A0So the
> effect will be shown in something like
> =A0int i =3D *p;
> =A0asm volatile ("# read %0" : : "r" (i));
> =A0return *p;
> The memory clobber will only make a different when optimizing.
>
> Ian
>

^ permalink raw reply

* Re: RapidIO - general questions
From: david.hagood @ 2009-06-29 15:44 UTC (permalink / raw)
  To: Jan Neskudla; +Cc: linuxppc-dev, ext Li Yang, linux-kernel, IDT - Kim, Chul
In-Reply-To: <1246285193.10035.245.camel@demux9hc>

Do you know (and if you know, can you comment) if IDT is planning on
offering RIO (and more importantly to me sRIO) chipsets that can be used
on other architectures besides the various PPC chips with embedded sRIO
controllers?

^ permalink raw reply

* Re: Direct MII connection between MPC8313 and VIRTEX FPGA
From: Grant Likely @ 2009-06-29 15:40 UTC (permalink / raw)
  To: Frank Prepelica; +Cc: linuxppc-dev
In-Reply-To: <29DC34A6B43468409F5A371CFE34E849D7EE1A@ex01.ads.ubidyne.de>

On Mon, Jun 29, 2009 at 2:23 AM, Frank
Prepelica<Frank.Prepelica@ubidyne.com> wrote:
> Hi Grant
>
> Thanks for your response!
>
> I have searched for "current-speed" in drivers/net/fec_mpc52xx.c but I cannot find anything. However we are using the gianfar.c Ethernet driver.
> Do you know whether this driver supports fixed MII links without PHY?

What kernel version are you using?

> I've got another question regarding MII connection between and MPC and a Virtex FPGA. Whats about the PHY address which has to be set in the DTB file? Do I have to modify the DTB at all?

Yes, you need to modify the DTB.  You have a back to back MII
connection, not a phy, so you do *not* want to have a PHY node in the
device tree.

g.

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

^ permalink raw reply

* Re: How to implement kexec on e500 ?
From: wilbur.chan @ 2009-06-29 15:36 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <BD32B91E-83B3-4ED5-A5C1-60B8B6EF9B3C@kernel.crashing.org>

Excuse me ,

btw,how to search these patches on this maillist?

through Linuxppc-dev Archives one by one?

Cheers,

wilbur

2009/6/29, Kumar Gala <galak@kernel.crashing.org>:
>
> On Jun 29, 2009, at 8:47 AM, wilbur.chan wrote:
>
>> kernel 2.6.21.7
>>
>> As we know , kexec stores  data  for new kernel image ,  in the form
>> of   a page list.
>>
>> And kexec uses the physical address of the another  page for a
>> "next-page" pointer.
>>
>> However, PowerPC e500  does not allow users to turn off the MMU, so we
>> can not used physical address directly in our code.
>>
>>
>> Someone suggested that changing  relocate_kernel.S to add a TLB 1-to-1
>> mapping of DRAM .
>>
>> What does "mapping" mean ?
>>
>> Any suggestion to implement kexec on e500 ?
>
> Wilbur, kexec has been implemented on e500.  There are some patches on
> the list for this and they just need to be respun and reviewed again.
>
> - k
>

^ permalink raw reply

* Device tree for c67x00
From: Jorge Sánchez de Nova @ 2009-06-29 15:25 UTC (permalink / raw)
  To: Linuxppc-dev

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

Hi,

 I am trying to load the c67x00 driver in my Xilinx ML403 (PowerPC) based
platform. I am running a merged tree between DENX+Adeos/Xenomai and Xilinx
(2.6.29.4). I have the XPS_EPC core interfaced to the Cypress CY7C67300.
Before, in PPC I used to have something like this in my virtex_devices.c

/*
 * Cypress USB C67x00 shortcut macro for single instance
 */
#define XPAR_C67x00_USB(num) { \
 .name = "c67x00", \
 .id = num, \
 .num_resources = 2, \
 .resource = (struct resource[]) { \
         { \
         .start = XPAR_C67X00_USB_PRH##num##_BASEADDR, \
         .end = XPAR_C67X00_USB_PRH##num##_BASEADDR + 0xf, \
         .flags = IORESOURCE_MEM, \
         }, \
         { \
         .start  = XPAR_OPB_INTC_0_SYSTEM_USB_HPI_INT_PIN_INTR, \
         .end    = XPAR_OPB_INTC_0_SYSTEM_USB_HPI_INT_PIN_INTR, \
         .flags  = IORESOURCE_IRQ, \
          }, \
  }, \
 .dev.platform_data = &(struct c67x00_platform_data) { \
 .sie_config = C67X00_SIE1_HOST | C67X00_SIE2_PERIPHERAL_A, \
 .hpi_regstep = 0x02, /* A0 not connected on 16bit bus */ \
 }, \
}

Together with the xparameters.h #defines. And even if I never managed to get
it working, the kernel was loading it. Now I am trying to have the
equivalent information in the device-tree .dts with no luck. Something like
this:

                xps_epc_0: usb@80800000 {
          compatible = "cy,c67300 cy,c67x00";
                  interrupt-parent = <&xps_intc_0>;
          interrupts = < 0 2 >;
                  reg = < 0x80800000 0x10000 >;
            xlnx,family = "virtex4";
                  } ;

(inspired by another mail in this list).

It doesn't work at all since it doesn't load anything. I have looked at the
driver and there is apparently no openfirmware support for it, so maybe the
dts info won't work without it. Am I wrong? Does this means that the c67x00
needs OF support to work in this configuration? How can I make it otherwise?


Thanks,
Jorge

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

^ permalink raw reply

* [PATCH][v2] sata_fsl: Add asynchronous notification support
From: ashish kalra @ 2009-06-29 15:16 UTC (permalink / raw)
  To: linux-ide; +Cc: linuxppc-dev

Enable device hot-plug support on Port multiplier fan-out ports

Signed-off-by: Ashish Kalra <Ashish.Kalra@freescale.com>
---
  drivers/ata/sata_fsl.c |   10 ++++++++--
  1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 94eaa43..5751145 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -34,7 +34,7 @@ enum {

  	SATA_FSL_HOST_FLAGS	= (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
  				ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
-				ATA_FLAG_PMP | ATA_FLAG_NCQ),
+ 				ATA_FLAG_PMP | ATA_FLAG_NCQ | ATA_FLAG_AN),

  	SATA_FSL_MAX_CMDS	= SATA_FSL_QUEUE_DEPTH,
  	SATA_FSL_CMD_HDR_SIZE	= 16,	/* 4 DWORDS */
@@ -132,7 +132,7 @@ enum {
  	INT_ON_SINGL_DEVICE_ERR = (1 << 1),
  	INT_ON_CMD_COMPLETE = 1,

-	INT_ON_ERROR = INT_ON_FATAL_ERR |
+	INT_ON_ERROR = INT_ON_FATAL_ERR | INT_ON_SNOTIFY_UPDATE |
  	    INT_ON_PHYRDY_CHG | INT_ON_SINGL_DEVICE_ERR,

  	/*
@@ -154,6 +154,7 @@ enum {

  	DEFAULT_PORT_IRQ_ENABLE_MASK = IE_ON_FATAL_ERR | IE_ON_PHYRDY_CHG |
  	    IE_ON_SIGNATURE_UPDATE |
+	    IE_ON_SNOTIFY_UPDATE |
  	    IE_ON_SINGL_DEVICE_ERR | IE_ON_CMD_COMPLETE,

  	EXT_INDIRECT_SEG_PRD_FLAG = (1 << 31),
@@ -1003,6 +1004,11 @@ static void sata_fsl_error_intr(struct ata_port *ap)
  		freeze = 1;
  	}

+	/* Handle SDB FIS receive & notify update */
+	if (hstatus & INT_ON_SNOTIFY_UPDATE) {
+		sata_async_notification(ap);
+	}
+
  	/* Handle PHYRDY change notification */
  	if (hstatus & INT_ON_PHYRDY_CHG) {
  		DPRINTK("SATA FSL: PHYRDY change indication\n");
-- 
1.6.0

^ permalink raw reply related

* (no subject)
From: ashish kalra @ 2009-06-29 15:11 UTC (permalink / raw)
  To: linux-ide; +Cc: linuxppc-dev

From: Ashish Kalra <Ashish.Kalra@freescale.com>
Date: Fri, 26 Jun 2009 15:46:02 +0530
Subject: [PATCH][v2] sata_fsl: Add asynchronous notification support

Enable device hot-plug support on Port multiplier fan-out ports

Signed-off-by: Ashish Kalra <Ashish.Kalra@freescale.com>
---
  drivers/ata/sata_fsl.c |   10 ++++++++--
  1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 94eaa43..5751145 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -34,7 +34,7 @@ enum {

  	SATA_FSL_HOST_FLAGS	= (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
  				ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
-				ATA_FLAG_PMP | ATA_FLAG_NCQ),
+ 				ATA_FLAG_PMP | ATA_FLAG_NCQ | ATA_FLAG_AN),

  	SATA_FSL_MAX_CMDS	= SATA_FSL_QUEUE_DEPTH,
  	SATA_FSL_CMD_HDR_SIZE	= 16,	/* 4 DWORDS */
@@ -132,7 +132,7 @@ enum {
  	INT_ON_SINGL_DEVICE_ERR = (1 << 1),
  	INT_ON_CMD_COMPLETE = 1,

-	INT_ON_ERROR = INT_ON_FATAL_ERR |
+	INT_ON_ERROR = INT_ON_FATAL_ERR | INT_ON_SNOTIFY_UPDATE |
  	    INT_ON_PHYRDY_CHG | INT_ON_SINGL_DEVICE_ERR,

  	/*
@@ -154,6 +154,7 @@ enum {

  	DEFAULT_PORT_IRQ_ENABLE_MASK = IE_ON_FATAL_ERR | IE_ON_PHYRDY_CHG |
  	    IE_ON_SIGNATURE_UPDATE |
+	    IE_ON_SNOTIFY_UPDATE |
  	    IE_ON_SINGL_DEVICE_ERR | IE_ON_CMD_COMPLETE,

  	EXT_INDIRECT_SEG_PRD_FLAG = (1 << 31),
@@ -1003,6 +1004,11 @@ static void sata_fsl_error_intr(struct ata_port *ap)
  		freeze = 1;
  	}

+	/* Handle SDB FIS receive & notify update */
+	if (hstatus & INT_ON_SNOTIFY_UPDATE) {
+		sata_async_notification(ap);
+	}
+
  	/* Handle PHYRDY change notification */
  	if (hstatus & INT_ON_PHYRDY_CHG) {
  		DPRINTK("SATA FSL: PHYRDY change indication\n");
-- 
1.6.0

^ permalink raw reply related

* Re: RapidIO - general questions
From: Jan Neskudla @ 2009-06-29 14:19 UTC (permalink / raw)
  To: ext Li Yang; +Cc: linuxppc-dev, linux-kernel, IDT - Kim, Chul
In-Reply-To: <1242802800.9160.143.camel@demuxf9c>

Hi as I already informed you, 
we'd like to contribute to the Linux RapidIO subsystem, with several
features, Here are few general information about the design of
implementation of such features.

naming: 
domain - a several boards connected together via rio, with only one host
host -  a MCU with host bit set, only one per domain
domain master - a host which have also domain_master_bit set ( boot
param), only one in overall system. 

* Domains configuration - traverse the whole rio network by domain
master to find all the hosts, providing a domain IDs to them and finally
programing domain routing tables to the switches. Since we are
cooperating with a IDT as a switch supplier, the IDT will public their
private API for setting such a domain routing tables under GPL. 
- there is an issue how to proceed with a locking of the switches,
during enumeration of domains and later on during enumeration of
endpoint by hosts. All the time, of running system, there  will be two
MCUs trying to configure the same switch in certain situation,
especially during hot-plug of domain. So this is not clear yet.

* Static ID configuration based on port numbers  
  tree sysfs files for providing necessary info : 
      host_id - this is the same like riohdid boot parameter now
      switch_ids - this file is for providing source ids for switches to
be able to report problems via port-write packets 
      endpoint_ids - to provide list of all endpoint in one domain.  
  I read somewhere that passing of structures via sysFS is not
acceptable, but how to pass some more information to the kernel. 
I expect to pass those structures via bin sysFS files, analyze the input
not only cast it, and than use it. Is it this OK ? 

* User triggered enumeration/discovery
This is necessary because of the static IDs. They have to be know before
enumeration can start, and this is most general way of doing this. 
So once the static Ids are provided over sysFS files, then via another
sysFS file a enumeration is triggered. I am talking about enumeration
only because the endpoints that wait for the enumeration are going to
preform discovery as usual, after enumeration. 
This needs some changes. Whole enumeration process have to be put into
the kthread and discovery as well. Then kernel can boots up to user
space and enumeration can be triggered. 
Is there any standard way in the kernel how to postpone and than trigger
a configuration of a bus from the user space ? 

* User space library for configuring switches 
IDT is going to provide user space GPL library that will covers an rio
switch configuration based on rio spec 2.0. 

* Error handling (port-write packets - configuration, handling of them)
This should be as general as possible, and IDT is designing this part.
So a port-write packet (have to be written) driver will receive a
packet, analyze this and perform an action: - two scenarios can happen.
1. The port-write info is part of the rio spec 2.0 and the packet is
processed by kernel directly 
2. The port-write info is vendor specific and it is passed to the user
space, where is processed and proper action is than taken via current
sysFS config files. 

* Hot-plug (hot-insert/hot-remove) of devices
This is case of error handling. 
In case of any error covered by rio spec 2.0 (bad CRC, bad
character, .. ) the ports of the switch that generates this port-write
info are scanned for PORT_OK status or PORT_UNINITIALIZED so we are able
to catch the hot-plug/hot-extract of any device. 
Hotplug should be functional in the time of enumeration, because
enumeration process traverse the system port by port, and if some
endpoint is powered on after enumeration process testes its port but
before the end of the standard enumeration process, this device can be
missed. 

* Aux driver - basic driver, for sending messages over different
mboxes, 
right now we implemented this as a character device. If any one is
interested let me know, I will send this to you. 

On the end we'd like to support already existing scenario of dynamic
assignment of the devID as well as static ID and user space triggered
enumeration. 

The question is if there is a static table of IDs, do we still needs an
discovery process on every endpoint ? Propagating any hot-plug/hot-
extract event to every endpoint to reflect this in local sysfs structure
would be quite hard. 

Any comment to this topics is highly appreciated, as well as forwarding
this to anyone who can be interested. 

                           Jan 


 

On Wed, 2009-05-20 at 09:00 +0200, ext Jan Neskudla wrote:
> n Fri, 2009-05-15 at 15:56 +0800, ext Li Yang wrote:
> > On Fri, May 15, 2009 at 3:33 PM, Jan Neskudla
> <jan.neskudla.ext@nsn.com> wrote:
> > > On Wed, 2009-05-13 at 18:57 +0800, ext Li Yang wrote:
> > >> cc'ed LKML
> > >>
> > >> On Tue, May 12, 2009 at 5:17 PM, Jan Neskudla
> <jan.neskudla.ext@nsn.com> wrote:
> > >> > Hallo
> > >> >
> > >> > we'd likes to use a RapidIO as a general communication bus on
> our new
> > >> > product, and so I have some questions about general design of
> Linux RIO
> > >> > subsystem. I did not find any better mailing list for RapidIO
> > >> > discussion.
> > >> >
> > >> > [1] - we'd like to implement following features
> > >> >    * Hot-plug (hot-insert/hot-remove) of devices
> > >> >    * Error handling (port-write packets - configuration,
> handling of
> > >> > them)
> > >> >    * Static ID configuration based on port numbers
> > >> >    * Aux driver - basic driver, for sending messages over
> different
> > >> > mboxes, handling ranges of doorbells
> > >> >
> > >> >    Is it here anyone who is working on any improvement, or
> anyone who
> > >> > knows the development plans for RapidIO subsystem?
> > >> >
> > >>
> > >> AFAIK, there is no one currently working on these features for
> Linux.
> > >> It will be good if you can add these useful features.
> > > Yes it looks like that, currently we are analyzing current rapidIO
> > > system, and how we can add these features.
> > >
> > >>
> > >> > [2] - I have a following problem with a current implementation
> of
> > >> > loading drivers. The driver probe-function call is based on
> comparison
> > >> > of VendorID (VID) and DeviceID (DID) only. Thus if I have 3
> devices with
> > >> > same DID and VID connected to the same network (bus), the
> driver is
> > >> > loaded 3times, instead only once for the actual device Master
> port.
> > >>
> > >> This should be the correct way as you actually have 3 instances
> of the device.
> > >>
> > >> >
> > >> > Rionet driver solved this by enabling to call initialization
> function
> > >> > just once, and it expect that this is the Master port.
> > >>
> > >> Rionet is kind of special.  It's not working like a simple device
> > >> driver, but more like a customized protocol stack to support
> multiple
> > >> ethernet over rio links.
> > >>
> > >> >
> > >> > Is it this correct behavior  ? It looks to me that RapidIO is
> handled
> > >> > like a local bus (like PCI)
> > >>
> > >> This is correct behavior.  All of them are using Linux
> device/driver
> > >> infrastructure, but rionet is a special device.
> > >
> > > But I do not have a 3 devices on one silicon. I am talking about 3
> > > devices (3 x EP8548 boards + IDT switch) connected over rapidIO
> through
> > > the switch. And in this case I'd like to have only one driver
> siting on
> > > the top of Linux RapidIO subsystem. I don't see the advantage of
> loading
> >
> > You are having one driver, but it probes 3 times for each device
> using
> > the driver.
> >
> > > a driver locally for remote device. Am I missing something  ?
> >
> > If you want to interact with the remote device, you need the driver
> to
> > do the work locally.
> 
> We are going to use a RapidIO as a bigger network of active devices,
> and
> each will have each own driver (sitting on its own), and all the
> settings will be done over maintenance packets.
> 
> May be it will be solved by the fact, that we are going to use a
> staticIDs, so there will be no discovery as it is now. And thus there
> will be only one device visible in the internal structures of the
> subsystem, and thus only one drive will be loaded.
> 
> >
> > >
> > > And one more think, I am getting so much Bus errors OOPSes.
> Whenever
> > > there is a problem with a comunication over Rio I get such a
> kernel OPS.
> > > I had to add some delays into some function to be able to finish
> the
> > > enum+discovery process. Did you have some experience with some
> bigger
> > > rio network running under linux ?
> >
> > It looks like an known issue for switched rio network, but I don't
> > have the correct equipment to reproduce the problem here.  Could you
> > do some basic debugging and share your findings?  Thanks.
> 
> I tried to acquired some info about the problem, I found that the OOPS
> always occur when there is no respond from the device or the respond
> is
> too slow. I always got that error during function call
> rio_get_host_deviceid_lock when it tries to access a remote device or
> switch. This function is the first call of the
> rio_mport_read_config_32
> so is also first try of remote access to any device.
> 
> It is a timing issue, and after placing a printk into the
> rio_get_host_deviceid_lock the OOPSing almost disappeared.
> 
>                                  Jan
> 
> >
> > - Leo
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
> 
> 

^ permalink raw reply

* Re: [PATCH] sata_fsl: Add asynchronous notification support
From: Kumar Gala @ 2009-06-29 14:52 UTC (permalink / raw)
  To: ashish kalra; +Cc: linux-ide, linuxppc-dev
In-Reply-To: <Pine.WNT.4.64.0906291846100.2640@B00888-02.fsl.freescale.net>


On Jun 29, 2009, at 8:22 AM, ashish kalra wrote:

> Signed-off-by: Ashish Kalra <Ashish.Kalra@freescale.com>
> ---
> drivers/ata/sata_fsl.c |   10 ++++++++--
> 1 files changed, 8 insertions(+), 2 deletions(-)

Can you provide more detail in the commit message about why this patch  
is needed or what 'asynchronous notification' gets us.

- k

>
>
> diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
> index 94eaa43..5751145 100644
> --- a/drivers/ata/sata_fsl.c
> +++ b/drivers/ata/sata_fsl.c
> @@ -34,7 +34,7 @@ enum {
>
> 	SATA_FSL_HOST_FLAGS	= (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
> 				ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
> -				ATA_FLAG_PMP | ATA_FLAG_NCQ),
> + 				ATA_FLAG_PMP | ATA_FLAG_NCQ | ATA_FLAG_AN),
>
> 	SATA_FSL_MAX_CMDS	= SATA_FSL_QUEUE_DEPTH,
> 	SATA_FSL_CMD_HDR_SIZE	= 16,	/* 4 DWORDS */
> @@ -132,7 +132,7 @@ enum {
> 	INT_ON_SINGL_DEVICE_ERR = (1 << 1),
> 	INT_ON_CMD_COMPLETE = 1,
>
> -	INT_ON_ERROR = INT_ON_FATAL_ERR |
> +	INT_ON_ERROR = INT_ON_FATAL_ERR | INT_ON_SNOTIFY_UPDATE |
> 	    INT_ON_PHYRDY_CHG | INT_ON_SINGL_DEVICE_ERR,
>
> 	/*
> @@ -154,6 +154,7 @@ enum {
>
> 	DEFAULT_PORT_IRQ_ENABLE_MASK = IE_ON_FATAL_ERR | IE_ON_PHYRDY_CHG |
> 	    IE_ON_SIGNATURE_UPDATE |
> +	    IE_ON_SNOTIFY_UPDATE |
> 	    IE_ON_SINGL_DEVICE_ERR | IE_ON_CMD_COMPLETE,
>
> 	EXT_INDIRECT_SEG_PRD_FLAG = (1 << 31),
> @@ -1003,6 +1004,11 @@ static void sata_fsl_error_intr(struct  
> ata_port *ap)
> 		freeze = 1;
> 	}
>
> +	/* Handle SDB FIS receive & notify update */
> +	if (hstatus & INT_ON_SNOTIFY_UPDATE) {
> +		sata_async_notification(ap);
> +	}
> +
> 	/* Handle PHYRDY change notification */
> 	if (hstatus & INT_ON_PHYRDY_CHG) {
> 		DPRINTK("SATA FSL: PHYRDY change indication\n");
> -- 
> 1.6.0
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply


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