LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] mpic: add support for serial mode interrupts
From: Benjamin Herrenschmidt @ 2006-06-20  4:01 UTC (permalink / raw)
  To: Mark A. Greer; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20060619200811.GA15524@mag.az.mvista.com>

On Mon, 2006-06-19 at 13:08 -0700, Mark A. Greer wrote:
> MPC10x-style interrupt controllers have a serial mode that allows
> several interrupts to be clocked in through one INT signal.
> 
> This patch adds the software support for that mode.

You hard code the clock ratio... why not add a separate call to be
called after mpic_init,
something like mpic_set_serial_int(int mpic, int enable, int
clock_ratio) ?

Ben.

> Signed-off-by: Mark A. Greer <mgreer@mvista.com>
> --
> 
>  arch/powerpc/sysdev/mpic.c |    6 ++++++
>  include/asm-powerpc/mpic.h |    2 ++
>  2 files changed, 8 insertions(+)
> --
> 
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 7dcdfcb..1829aed 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -629,6 +629,12 @@ #endif /* CONFIG_SMP */
>  			mb();
>  	}
>  
> +	/* For serial interrupts & set clock ratio */
> +	if (flags & MPIC_SERIAL_MODE)
> +		mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1,
> +			mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1)
> +				| (1<<27) | (0x7<<28));
> +
>  	/* Read feature register, calculate num CPUs and, for non-ISU
>  	 * MPICs, num sources as well. On ISU MPICs, sources are counted
>  	 * as ISUs are added
> diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h
> index 6b9e781..f35ccdc 100644
> --- a/include/asm-powerpc/mpic.h
> +++ b/include/asm-powerpc/mpic.h
> @@ -186,6 +186,8 @@ #define MPIC_BROKEN_U3			0x00000004
>  #define MPIC_BROKEN_IPI			0x00000008
>  /* MPIC wants a reset */
>  #define MPIC_WANTS_RESET		0x00000010
> +/* MPIC serial mode */
> +#define MPIC_SERIAL_MODE		0x00000020
>  
>  /* Allocate the controller structure and setup the linux irq descs
>   * for the range if interrupts passed in. No HW initialization is
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

^ permalink raw reply

* Re: Linux on Virtex4
From: Aidan Williams @ 2006-06-20  5:40 UTC (permalink / raw)
  To: Martin, Tim; +Cc: linuxppc-embedded
In-Reply-To: <821B2170E9E7F04FA38DF7EC21DE48710573FD21@VCAEXCH01.hq.corp.viasat.com>


It's a cute little board isn't it!

In getting this board going we had to work around a silicon bug which 
caused data corruption and forced us to run with caches off.

See "Solution 13":
http://www.xilinx.com/xlnx/xil_ans_display.jsp?iLanguageID=1&iCountryID=1&getPagePath=20658
Check your PVR ..

I found that exercising the memory with a small C program reliably 
caused the board to crash.

My previous post including a patch for this board:
http://ozlabs.org/pipermail/linuxppc-embedded/2006-April/022583.html

.. and we're using the UartLite.

- aidan


Martin, Tim wrote:
> I have been working with a small module made by Memec/Avnet
> (FX12MM1-BASE) that has a Virtex-4 FX12 with some DDR SDRAM, a Gigabit
> Ethernet PHY, some FLASH, etc.  I am using EDK 8.1 and generated the BSP
> for MontaVista 3.1 "preview kit" (which is based on the 2.4.20 kernel).
> This works, but occasionally panics while booting (doesn't panic all the
> time, maybe 1/3 the time).  Examples of "good" boot and 2 "crash" boots
> below.  We are using a root filesystem over NFS, and the panics seem to
> always be after the file system is mounted.  I'm not sure if it is NFS
> related or not.
> 
> I have also been working with the paulus 2.6 kernel tree (and I have
> tried the MVL linux-xilinx-26 tree), but have not been able to get the
> kernel to boot.  The primary problem there is that we are using the
> uartlite instead of the full uart, and the patches I have found for
> uartlite support don't work.  I can get the early serial messages to
> work, but I don't know enough about the console and serial core to get
> everything else working.  I am also getting panics that seem to be
> non-serial related, but I haven't tracked it down yet.
> 
> So two questions:
> 
> 1) Is there anything obvious from the kernel panics below that I should
> be looking for?  Just the answer "linux 2.4.20 is really fricken old,
> upgrade" is probably the right answer.
> 
> 2) Does anyone have working UartLite support on a Virtex-4 FX12 design?
> 
> 
> ------------ Examples of 2.4.20 good:
> 
> id mach(): done
> MMU:enter
> MMU:hw init
> MMU:mapin
> MMU:mapin_ram done
> MMU:setio
> MMU:exit
> Linux version 2.4.20_mvl31-v4fx12 (ahamel@uhflinux) (gcc version 3.3.1
> (MontaVista 3.3.1-3.0.10.6
> setup_arch: enter
> setup_arch: bootmem
> Xilinx Virtex-II Pro port (C) 2002 MontaVista Software, Inc.
> (source@mvista.com)
> arch: exit
> On node 0 totalpages: 16384
> zone(0): 16384 pages.
> zone(1): 0 pages.
> zone(2): 0 pages.
> Kernel command line: root=/dev/nfs
> nfsroot=192.168.1.1:/opt/montavista/previewkit/ppc/405/target4
> Xilinx INTC #0 at 0x41200000 mapped to 0xFDFFF000
> Calibrating delay loop... 197.01 BogoMIPS
> Memory: 63268k available (1092k kernel code, 340k data, 60k init, 0k
> highmem)
> Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
> Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
> Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
> Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
> Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
> POSIX conformance testing by UNIFIX
> 
> Linux NET4.0 for Linux 2.4
> Based upon Swansea University Computer Society NET3.039
> Initializing RT netlink socket
> LSP Revision 42
> ikconfig 0.5 with /proc/ikconfig
> Starting kswapd
> Disabling the Out Of Memory Killer
> devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
> devfs: boot_options: 0x1
> pty: 256 Unix98 ptys configured
> xgpio #0 at 0x40020000 mapped to 0xC5000000
> xgpio #1 at 0x40040000 mapped to 0xC5011000
> xgpio #2 at 0x40060000 mapped to 0xC5022000
> xilinx_spi: got major number 254
> xilinx_spi0 at 0x40800000 mapped to 0xC5033000, irq=29
> RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
> loop: loaded (max 8 devices)
> XTemac: Device instance #0 found
> eth0: XTemac: using fifo direct interrupt driven mode.
> eth0: XTemac: PHY detected at address 4.
> eth0: Xilinx TEMAC #0 at 0x80400000 mapped to 0xC5044000, irq=28
> eth0: XTemac: id 1.0f, block id 5, type 8
> NET4: Linux TCP/IP 1.0 for NET4.0
> IP Protocols: ICMP, UDP, TCP, IGMP
> IP: routing cache hash table of 512 buckets, 4Kbytes
> TCP: Hash tables configured (established 4096 bind 8192)
> eth0: XTemac: Options: 0xb8f0
> eth0: XTemac: We renegotiated the speed to: 1000
> eth0: XTemac: speed set to 1000Mb/s
> Sending DHCP requests ., OK
> IP-Config: Got DHCP answer from 192.168.1.1, my address is 192.168.1.75
> IP-Config: Complete:
>       device=eth0, addr=192.168.1.75, mask=255.255.255.0,
> gw=192.168.1.1,
>      host=192.168.1.75, domain=, nis-domain=(none),
>      bootserver=192.168.1.1, rootserver=192.168.1.1, rootpath=
> NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
> Looking up port of RPC 100003/2 on 192.168.1.1
> Looking up port of RPC 100005/1 on 192.168.1.1
> VFS: Mounted root (nfs filesystem).
> Mounted devfs on /dev
> Freeing unused kernel memory: 60k init
> serial console detected.  Disabling virtual terminals.
> init started:  BusyBox v0.60.2 (2004.04.30-17:49+0000) multi-call binary
> 
> Welcome to MontaVista Linux Preview Kit
> 
> Starting system...
> mounting /proc: done.
> Mounting '/' read-only: done.
> brining up loopback interface: done.
> Mounting /tmp: done.
> Starting syslogd: done.
> Starting klogd: done.
> Starting inetd: done.
> Starting thttpd: done.
> System started.
> 
> MontaVista(R) Linux(R) Professional Edition 3.1, Preview Kit
> 
> 192.168.1.75 login:
> 
> ------ Example 1 of panic
> 
> id mach(): done
> MMU:enter
> MMU:hw init
> MMU:mapin
> MMU:mapin_ram done
> MMU:setio
> MMU:exit
> Linux version 2.4.20_mvl31-v4fx12 (ahamel@uhflinux) (gcc version 3.3.1
> (MontaVista 3.3.1-3.0.10.6
> setup_arch: enter
> setup_arch: bootmem
> Xilinx Virtex-II Pro port (C) 2002 MontaVista Software, Inc.
> (source@mvista.com)
> arch: exit
> On node 0 totalpages: 16384
> zone(0): 16384 pages.
> zone(1): 0 pages.
> zone(2): 0 pages.
> Kernel command line: root=/dev/nfs
> nfsroot=192.168.1.1:/opt/montavista/previewkit/ppc/405/target4
> Xilinx INTC #0 at 0x41200000 mapped to 0xFDFFF000
> Calibrating delay loop... 197.01 BogoMIPS
> Memory: 63268k available (1092k kernel code, 340k data, 60k init, 0k
> highmem)
> Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
> Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
> Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
> Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
> Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
> POSIX conformance testing by UNIFIX
> 
> Linux NET4.0 for Linux 2.4
> Based upon Swansea University Computer Society NET3.039
> Initializing RT netlink socket
> LSP Revision 42
> ikconfig 0.5 with /proc/ikconfig
> Starting kswapd
> Disabling the Out Of Memory Killer
> devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
> devfs: boot_options: 0x1
> pty: 256 Unix98 ptys configured
> xgpio #0 at 0x40020000 mapped to 0xC5000000
> xgpio #1 at 0x40040000 mapped to 0xC5011000
> xgpio #2 at 0x40060000 mapped to 0xC5022000
> xilinx_spi: got major number 254
> xilinx_spi0 at 0x40800000 mapped to 0xC5033000, irq=29
> RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
> loop: loaded (max 8 devices)
> XTemac: Device instance #0 found
> eth0: XTemac: using fifo direct interrupt driven mode.
> eth0: XTemac: PHY detected at address 4.
> eth0: Xilinx TEMAC #0 at 0x80400000 mapped to 0xC5044000, irq=28
> eth0: XTemac: id 1.0f, block id 5, type 8
> NET4: Linux TCP/IP 1.0 for NET4.0
> IP Protocols: ICMP, UDP, TCP, IGMP
> IP: routing cache hash table of 512 buckets, 4Kbytes
> TCP: Hash tables configured (established 4096 bind 8192)
> eth0: XTemac: Options: 0xb8f0
> eth0: XTemac: We renegotiated the speed to: 1000
> eth0: XTemac: speed set to 1000Mb/s
> Sending DHCP requests ., OK
> IP-Config: Got DHCP answer from 192.168.1.1, my address is 192.168.1.75
> IP-Config: Complete:
>       device=eth0, addr=192.168.1.75, mask=255.255.255.0,
> gw=192.168.1.1,
>      host=192.168.1.75, domain=, nis-domain=(none),
>      bootserver=192.168.1.1, rootserver=192.168.1.1, rootpath=
> NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
> Looking up port of RPC 100003/2 on 192.168.1.1
> Looking up port of RPC 100005/1 on 192.168.1.1
> VFS: Mounted root (nfs filesystem).
> Mounted devfs on /dev
> Freeing unused kernel memory: 60k init
> nfs: server 192.168.1.1 not responding, still trying
> Oops: kernel access of bad area, sig: 11
> NIP: C00F05B4 XER: 20000000 LR: C00F0C80 SP: C0131C80 REGS: c0131bd0
> TRAP: 0800    Not tainted
> MSR: 00009030 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
> DEAR: 00000045, ESR: 00000000
> TASK = c0130020[0] 'swapper' Last syscall: 120
> last math 00000000 last altivec 00000000
> GPR00: C00CA728 C0131C80 C0130020 00000001 00001030 00000000 C02C9180
> C023F9F8
> GPR08: C02CA000 C0150000 00000003 00001DC7 84002022 1006E950 03FD0000
> 00000000
> GPR16: 00000001 00000001 FFFFFFFF 007FFF00 00001032 00131EE0 00000000
> C0000000
> GPR24: C0151D24 C02C90D0 C0150000 00000000 C0157F00 C02E8080 C02C90D8
> C02E8080
> Call backtrace:
> C00F0A4C C00CA728 C00EED30 C00C2958 C00200DC C001BD20 C001BB9C
> C001B868 C0005E48 C00047CC C00274E4 C0005D80 C0005D94 C0002434
> C01425CC C000232C
> Kernel panic: Aiee, killing interrupt handler!
> In interrupt handler - not syncing
>  <0>Rebooting in 180 seconds..
> 
> ------- Example 2 of crash
> id mach(): done
> MMU:enter
> MMU:hw init
> MMU:mapin
> MMU:mapin_ram done
> MMU:setio
> MMU:exit
> Linux version 2.4.20_mvl31-v4fx12 (ahamel@uhflinux) (gcc version 3.3.1
> (MontaVista 3.3.1-3.0.10.6
> setup_arch: enter
> setup_arch: bootmem
> Xilinx Virtex-II Pro port (C) 2002 MontaVista Software, Inc.
> (source@mvista.com)
> arch: exit
> On node 0 totalpages: 16384
> zone(0): 16384 pages.
> zone(1): 0 pages.
> zone(2): 0 pages.
> Kernel command line: root=/dev/nfs
> nfsroot=192.168.1.1:/opt/montavista/previewkit/ppc/405/target4
> Xilinx INTC #0 at 0x41200000 mapped to 0xFDFFF000
> Calibrating delay loop... 197.01 BogoMIPS
> Memory: 63268k available (1092k kernel code, 340k data, 60k init, 0k
> highmem)
> Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
> Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
> Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
> Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
> Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
> POSIX conformance testing by UNIFIX
> 
> Linux NET4.0 for Linux 2.4
> Based upon Swansea University Computer Society NET3.039
> Initializing RT netlink socket
> LSP Revision 42
> ikconfig 0.5 with /proc/ikconfig
> Starting kswapd
> Disabling the Out Of Memory Killer
> devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
> devfs: boot_options: 0x1
> pty: 256 Unix98 ptys configured
> xgpio #0 at 0x40020000 mapped to 0xC5000000
> xgpio #1 at 0x40040000 mapped to 0xC5011000
> xgpio #2 at 0x40060000 mapped to 0xC5022000
> xilinx_spi: got major number 254
> xilinx_spi0 at 0x40800000 mapped to 0xC5033000, irq=29
> RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
> loop: loaded (max 8 devices)
> XTemac: Device instance #0 found
> eth0: XTemac: using fifo direct interrupt driven mode.
> eth0: XTemac: PHY detected at address 4.
> eth0: Xilinx TEMAC #0 at 0x80400000 mapped to 0xC5044000, irq=28
> eth0: XTemac: id 1.0f, block id 5, type 8
> NET4: Linux TCP/IP 1.0 for NET4.0
> IP Protocols: ICMP, UDP, TCP, IGMP
> IP: routing cache hash table of 512 buckets, 4Kbytes
> TCP: Hash tables configured (established 4096 bind 8192)
> eth0: XTemac: Options: 0xb8f0
> eth0: XTemac: We renegotiated the speed to: 1000
> eth0: XTemac: speed set to 1000Mb/s
> Sending DHCP requests ., OK
> IP-Config: Got DHCP answer from 192.168.1.1, my address is 192.168.1.75
> IP-Config: Complete:
>       device=eth0, addr=192.168.1.75, mask=255.255.255.0,
> gw=192.168.1.1,
>      host=192.168.1.75, domain=, nis-domain=(none),
>      bootserver=192.168.1.1, rootserver=192.168.1.1, rootpath=
> NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
> Looking up port of RPC 100003/2 on 192.168.1.1
> Looking up port of RPC 100005/1 on 192.168.1.1
> VFS: Mounted root (nfs filesystem).
> Mounted devfs on /dev
> Freeing unused kernel memory: 60k init
> serial console detected.  Disabling virtual terminals.
> init started:  BusyBox v0.60.2 (2004.04.30-17:49+0000) multi-call binary
> 
> Welcome to MontaVista Linux Preview Kit
> 
> Starting system...
> mounting /proc: done.
> Mounting '/' read-only: done.
> brining up loopback interface: done.
> Mounting /tmp: done.
> Starting syslogd: done.
> Starting klogd: done.
> Starting inetd: done.
> Starting thttpd: done.
> System started.
> Oops: Exception in kernel mode, sig: 4
> NIP: C010D660 XER: 00000000 LR: C010D6F0 SP: C3EB7E60 REGS: c3eb7db0
> TRAP: 0700    Not tainted
> MSR: 00009030 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
> TASK = c3eb6000[48] 'insmod' Last syscall: 90
> last math 00000000 last altivec 00000000
> GPR00: 00000001 C3EB7E60 C3EB6000 C3F06CD8 C014F524 C014DAE0 C014DB00
> C014DAF8
> GPR08: C014D000 C3F06C78 0000001C C014D9D8 24022222 00000000 300277F8
> 00000000
> GPR16: 10001AA1 7FFFF118 00000030 C0150000 00000000 FFFFFFF4 00000002
> 00000002
> GPR24: 00100077 00000032 00000000 00000001 C014F524 C014DAF8 C3F06CD8
> C014D9D8
> Call backtrace:
> C002A84C C0029684 C0029BC0 C0009DE0 C000459C 3000646C 30007784
> 3000B810 3000CE68 3000C1F8 30002FE8 3000F7F0 30001FDC 30002434
> 30010904
> kernel BUG at mmap.c:1304!
> Oops: Exception in kernel mode, sig: 4
> NIP: C002AD48 XER: 00000000 LR: C002AD48 SP: C3EB7C60 REGS: c3eb7bb0
> TRAP: 0700    Not tainted
> MSR: 00009030 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
> TASK = c3eb6000[48] 'insmod' Last syscall: 90
> last math 00000000 last altivec 00000000
> GPR00: C002AD48 C3EB7C60 C3EB6000 0000001B 00001030 00000001 00000F14
> C0139D93
> GPR08: 00000000 00000000 00000034 C3EB7B70 C0150000 00000000 300277F8
> 00000000
> GPR16: 10001AA1 7FFFF118 00000030 C0150000 00009032 03EB7DA0 00000000
> C00047D4
> GPR24: C0004BC4 C0150000 C0150000 00000000 00001000 7FFFF000 C014F520
> 00000000
> Call backtrace:
> C002AD48 C0014684 C0019EE8 C000497C C00049EC C00047D4 C002A84C
> C0029684 C0029BC0 C0009DE0 C000459C
> 
> 
> 
> 
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded

^ permalink raw reply

* Exceptions during PCI initialization at u-boot
From: Prabhat_Singh @ 2006-06-20  6:23 UTC (permalink / raw)
  To: linuxppc-embedded

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

Hi all

I am getting two exceptions, that you will find in log, at the
pci_hose_read_config_byte memory is crashing that's I found in
System.map. after second exception its boots properly. I have no clue
whats happening. And why I am not able to read Configuration space of
pci. 

>From where this exception is coming?

Please help me out. What else I can check?

 

 

VPN Router Board

 

 

Vpn Router U-Boot 1.0.0 (Jun 19 2006 - 11:31:37)

 

MPC8260 Reset Status: External Soft, External Hard

 

MPC8260 Clock Configuration

 - Bus-to-Core Mult 4x, VCO Div 2, 60x Bus Freq  25-75 , Core Freq
100-300

 - dfbrg 0, corecnf 0x1a, busdf 3, cpmdf 1, plldf 0, pllmf 3

 - vco_out  400000000, scc_clk  100000000, brg_clk  100000000

 - cpu_clk  400000000, cpm_clk  200000000, bus_clk  100000000

 

CPU:   8272 (HiP7 Rev 14, Mask A.0 1K50M) at 400 MHz

Board: VPN8248

DRAM:  32 MB

total length of code       216456l   34d88value of sdrambase+ramsize
02000000 

Top of RAM usable for U-Boot at: 02000000

Reserving 211k for U-Boot at: 01fcb000

Reserving 128k for malloc() at: 01faae00

Reserving 76 Bytes for Board Info at: 01faadb4

Reserving 80 Bytes for Global Data at: 01faad64

Stack Pointer at: 01faad48

New Stack Pointer is: 01faad48

value of ret 0 

Entering reloacte

Now running in RAM - U-Boot at: 01fcb000

POST memory POST memory PASSED

PASSED

FLASH: satyam : manufacturor ID = 200020satyam: id1=22df22df

satyam: id2=0

satyam: id3=80008

16 MB

PCI Autoconfig: Memory region: [14000000-1bffffff]

PCI Autoconfig: I/O region: [1c000000-1dffffff]

Bus Fault @ 0x01fd2df8, fixup 0x00000000

Machine check in kernel mode.

Caused by (from msr): regs 01faab60 Unknown values in msr

NIP: 01FD2DF8 XER: 00000000 LR: 01FD2DF0 REGS: 01faab60 TRAP: 0200 DAR:
01FE4DB8

MSR: 00083002 EE: 0 PR: 0 FP: 1 ME: 1 IR/DR: 00

 

GPR00: 01FD3A24 01FAAC50 FFFFFFFF 00000000 8000080C 00000002 01FAAC5E
01C5D1FB 

GPR08: 01FD0084 F0010904 00000000 00000000 00000020 FFFFFFFF 01FF8000
020CB000 

GPR16: FFFFFFFF FFFFFFFF FFFFFEFF FFFFFFFF 00000000 00000000 FFFFFFFF
F0010D20 

GPR24: 00000000 00000000 01FFE39C 00000100 01FFE39C 01FAAD64 01FF8400
00000800 

Call backtrace: 

01FD3A24 01FD3BF0 01FE8B84 01FE3E04 01FD3C64 01FCFE30 01FCE48C 

machine check

VPN Router Board

 

 

Vpn Router U-Boot 1.0.0 (Jun 19 2006 - 11:31:37)

 

MPC8260 Reset Status:

 

MPC8260 Clock Configuration

 - Bus-to-Core Mult 4x, VCO Div 2, 60x Bus Freq  25-75 , Core Freq
100-300

 - dfbrg 0, corecnf 0x1a, busdf 3, cpmdf 1, plldf 0, pllmf 3

 - vco_out  400000000, scc_clk  100000000, brg_clk  100000000

 - cpu_clk  400000000, cpm_clk  200000000, bus_clk  100000000

 

CPU:   8272 (HiP7 Rev 14, Mask A.0 1K50M) at 400 MHz

Board: VPN8248

DRAM:  32 MB

total length of code       216456l   34d88value of sdrambase+ramsize
02000000 

Top of RAM usable for U-Boot at: 02000000

Reserving 211k for U-Boot at: 01fcb000

Reserving 128k for malloc() at: 01faae00

Reserving 76 Bytes for Board Info at: 01faadb4

Reserving 80 Bytes for Global Data at: 01faad64

Stack Pointer at: 01faad48

New Stack Pointer is: 01faad48

Entering reloacte

Now running in RAM - U-Boot at: 01fcb000

FLASH: satyam : manufacturor ID = 200020satyam: id1=22df22df

PCI Autoconfig: Memory region: [14000000-1bffffff]

PCI Autoconfig: I/O region: [1c000000-1dffffff]

vendor=168c

PCI Scan: Found Bus 0, Device 15, Function 0

PCI Autoconfig: BAR 0, Mem, size=0x10000, address=0x14000000

PCI Autoconfig: BAR 1, I/O, size=0xffffb000, No room in resource

PCI:     00  0f  168c  0013  0200  00

value of item =1

In:    serial

Out:   serial

Err:   serial

Chip Name  = 175a

Chip Name  = 175c

phy ID(0x02430d80) = 02430d80

Level One/ICPLUS PHY Identied IC175C Revision 0

Phy operating at 100 MBit/s in full-duplex mode

Phy operating at 100 MBit/s in full-duplex mode

U-Boot relocated to 01fcb000

Net:   value of fec FCC2 ETHERNET 

FCC2 ETHERNET

Hit any key to stop autoboot:  5 \b\b\b 4 \b\b\b 3 \b\b\b 0 

satyam=>  

 

Regards'

Prabhat Singh

 

 



DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.

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

^ permalink raw reply

* Re: Linux on Virtex4
From: Peter Korsgaard @ 2006-06-20  6:56 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <821B2170E9E7F04FA38DF7EC21DE48710573FD21@VCAEXCH01.hq.corp.viasat.com>

>>>>> "MT" == Martin, Tim <tim.martin@viasat.com> writes:

Hi,

MT> 2) Does anyone have working UartLite support on a Virtex-4 FX12
MT> design?

I've posted a 2.6 uartlite driver to the serial list some time ago,
and it's currently stalled getting official device minor numbers from
lanana.

http://thread.gmane.org/gmane.linux.serial/1237

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* RE: Exceptions during PCI initialization at u-boot
From: Liu Dave-r63238 @ 2006-06-20  7:58 UTC (permalink / raw)
  To: 'Prabhat_Singh', linuxppc-embedded

Hi Prabhat,

Did you clear the 'PCI No response' in the error mask register
before you do PCI configuration read? If you didn't, machine check
will arise when PCI scan unpopulated PCI slot.

I notice that the MSR[12] is set, but the trap codes haven't
detect that, what is your toolchain?

Regards,
-Dave


-----Original Message-----
Hi all
I am getting two exceptions, that you will find in log, at the pci_hose_read_config_byte memory is crashing that's I found in System.map. after second exception its boots properly. I have no clue whats happening. And why I am not able to read Configuration space of pci. 
>From where this exception is coming?
Please help me out. What else I can check?
 
 
VPN Router Board
 
 
Vpn Router U-Boot 1.0.0 (Jun 19 2006 - 11:31:37)
 
MPC8260 Reset Status: External Soft, External Hard
 
MPC8260 Clock Configuration
 - Bus-to-Core Mult 4x, VCO Div 2, 60x Bus Freq  25-75 , Core Freq 100-300
 - dfbrg 0, corecnf 0x1a, busdf 3, cpmdf 1, plldf 0, pllmf 3
 - vco_out  400000000, scc_clk  100000000, brg_clk  100000000
 - cpu_clk  400000000, cpm_clk  200000000, bus_clk  100000000
 
CPU:   8272 (HiP7 Rev 14, Mask A.0 1K50M) at 400 MHz
Board: VPN8248
DRAM:  32 MB
total length of code       216456l   34d88value of sdrambase+ramsize 02000000 
Top of RAM usable for U-Boot at: 02000000
Reserving 211k for U-Boot at: 01fcb000
Reserving 128k for malloc() at: 01faae00
Reserving 76 Bytes for Board Info at: 01faadb4
Reserving 80 Bytes for Global Data at: 01faad64
Stack Pointer at: 01faad48
New Stack Pointer is: 01faad48
value of ret 0 
Entering reloacte
Now running in RAM - U-Boot at: 01fcb000
POST memory POST memory PASSED
PASSED
FLASH: satyam : manufacturor ID = 200020satyam: id1=22df22df
satyam: id2=0
satyam: id3=80008
16 MB
PCI Autoconfig: Memory region: [14000000-1bffffff]
PCI Autoconfig: I/O region: [1c000000-1dffffff]
Bus Fault @ 0x01fd2df8, fixup 0x00000000
Machine check in kernel mode.
Caused by (from msr): regs 01faab60 Unknown values in msr
NIP: 01FD2DF8 XER: 00000000 LR: 01FD2DF0 REGS: 01faab60 TRAP: 0200 DAR: 01FE4DB8
MSR: 00083002 EE: 0 PR: 0 FP: 1 ME: 1 IR/DR: 00
 
GPR00: 01FD3A24 01FAAC50 FFFFFFFF 00000000 8000080C 00000002 01FAAC5E 01C5D1FB 
GPR08: 01FD0084 F0010904 00000000 00000000 00000020 FFFFFFFF 01FF8000 020CB000 
GPR16: FFFFFFFF FFFFFFFF FFFFFEFF FFFFFFFF 00000000 00000000 FFFFFFFF F0010D20 
GPR24: 00000000 00000000 01FFE39C 00000100 01FFE39C 01FAAD64 01FF8400 00000800 
Call backtrace: 
01FD3A24 01FD3BF0 01FE8B84 01FE3E04 01FD3C64 01FCFE30 01FCE48C 
machine check
VPN Router Board
 
 
Vpn Router U-Boot 1.0.0 (Jun 19 2006 - 11:31:37)
 
MPC8260 Reset Status:
 
MPC8260 Clock Configuration
 - Bus-to-Core Mult 4x, VCO Div 2, 60x Bus Freq  25-75 , Core Freq 100-300
 - dfbrg 0, corecnf 0x1a, busdf 3, cpmdf 1, plldf 0, pllmf 3
 - vco_out  400000000, scc_clk  100000000, brg_clk  100000000
 - cpu_clk  400000000, cpm_clk  200000000, bus_clk  100000000
 
CPU:   8272 (HiP7 Rev 14, Mask A.0 1K50M) at 400 MHz
Board: VPN8248
DRAM:  32 MB
total length of code       216456l   34d88value of sdrambase+ramsize 02000000 
Top of RAM usable for U-Boot at: 02000000
Reserving 211k for U-Boot at: 01fcb000
Reserving 128k for malloc() at: 01faae00
Reserving 76 Bytes for Board Info at: 01faadb4
Reserving 80 Bytes for Global Data at: 01faad64
Stack Pointer at: 01faad48
New Stack Pointer is: 01faad48
Entering reloacte
Now running in RAM - U-Boot at: 01fcb000
FLASH: satyam : manufacturor ID = 200020satyam: id1=22df22df
PCI Autoconfig: Memory region: [14000000-1bffffff]
PCI Autoconfig: I/O region: [1c000000-1dffffff]
vendor=168c
PCI Scan: Found Bus 0, Device 15, Function 0
PCI Autoconfig: BAR 0, Mem, size=0x10000, address=0x14000000
PCI Autoconfig: BAR 1, I/O, size=0xffffb000, No room in resource
PCI:     00  0f  168c  0013  0200  00
value of item =1
In:    serial
Out:   serial
Err:   serial
Chip Name  = 175a
Chip Name  = 175c
phy ID(0x02430d80) = 02430d80
Level One/ICPLUS PHY Identied IC175C Revision 0
Phy operating at 100 MBit/s in full-duplex mode
Phy operating at 100 MBit/s in full-duplex mode
U-Boot relocated to 01fcb000
Net:   value of fec FCC2 ETHERNET 
FCC2 ETHERNET
Hit any key to stop autoboot:  5 \bsatyam=>  
 

^ permalink raw reply

* [PATCH] powerpc: Dont look for class-code in pci children
From: Anton Blanchard @ 2006-06-20  8:00 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: paulus


Looking for class-code in PCI children breaks with direct slots. Lets
just count all children.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Olof Johansson <olof@lixom.net>
---

Index: build/arch/powerpc/platforms/pseries/iommu.c
===================================================================
--- build.orig/arch/powerpc/platforms/pseries/iommu.c	2006-06-10 19:52:32.000000000 +1000
+++ build/arch/powerpc/platforms/pseries/iommu.c	2006-06-10 21:58:20.000000000 +1000
@@ -331,13 +331,9 @@ static void iommu_bus_setup_pSeries(stru
 	if (isa_dn_orig)
 		of_node_put(isa_dn_orig);
 
-	/* Count number of direct PCI children of the PHB.
-	 * All PCI device nodes have class-code property, so it's
-	 * an easy way to find them.
-	 */
+	/* Count number of direct PCI children of the PHB. */
 	for (children = 0, tmp = dn->child; tmp; tmp = tmp->sibling)
-		if (get_property(tmp, "class-code", NULL))
-			children++;
+		children++;
 
 	DBG("Children: %d\n", children);
 

^ permalink raw reply

* [PATCH] powerpc: Extra sanity check in EEH code
From: Anton Blanchard @ 2006-06-20  8:01 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: paulus


From: Nathan Lynch <ntl@pobox.com>

Don't dereference a device node that isn't there.  A "shouldn't
happen" case, but someone ran into it with a possibly misconfigured
device tree.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: build/arch/powerpc/platforms/pseries/eeh_cache.c
===================================================================
--- build.orig/arch/powerpc/platforms/pseries/eeh_cache.c	2006-06-08 10:57:36.000000000 +1000
+++ build/arch/powerpc/platforms/pseries/eeh_cache.c	2006-06-20 12:01:49.000000000 +1000
@@ -304,6 +304,8 @@ void __init pci_addr_cache_build(void)
 		pci_addr_cache_insert_device(dev);
 
 		dn = pci_device_to_OF_node(dev);
+		if (!dn)
+			continue;
 		pci_dev_get (dev);  /* matching put is in eeh_remove_device() */
 		PCI_DN(dn)->pcidev = dev;
 	}

^ permalink raw reply

* Lite5200 NFS mount issue
From: Björn Östby @ 2006-06-20  8:15 UTC (permalink / raw)
  To: linuxppc-embedded

Hi all,
I'm using u-boot 1.1.4 (CVS downloaded 2006-05-04) and ELDK 4.0. I've =
encountered=20
problems when trying to mount a NFS root filesystem when using the Lite =
MPC5200
development board. The system mounts ok when the board is connected to =
office wide=20
network switches but if the board is connected directly through a small =
100/10Mbit switch
to the NFS server, the mount halts as shown in the log below (The =
100/10Mbit switch
do work as other boards can mount their filesystem through these). Does =
anyone
recognize this problem and know a suitable work-around/solution?

=3D>run flash_nfs
 ## Booting image at ff0a0000 ...
   Image Name:   Linux-2.4.25
   Created:      2006-06-16  13:11:56 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    945550 Bytes =3D 923.4 kB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
Memory BAT mapping: BAT2=3D64Mb, BAT3=3D0Mb, residual: 0Mb
Linux version 2.4.25 (tord@toshiba) (gcc version 4.0.0 (DENX ELDK 4.0 =
4.0.0)) #1 fre jun 16 14:46:35 CEST 2006
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=3D/dev/nfs rw =
nfsroot=3D10.3.67.98:/opt/eldk_4_0/ppc_6xx =
ip=3D10.3.67.99:10.3.67.98:10.3.67.1:::eth0:off panic=3D1
Calibrating delay loop... 263.78 BogoMIPS
Memory: 62080k available (1608k kernel code, 484k data, 80k init, 0k =
highmem)
Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardware
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
i2c-core.o: i2c core module version 2.6.1 (20010830)
i2c-proc.o version 2.6.1 (20010830)
pty: 256 Unix98 ptys configured
ttyS0 on PSC1
ttyS1 on PSC2
ttyS2 on PSC3
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
loop: loaded (max 8 devices)
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with =
idebus=3Dxx
Port Config is: 0x11050004
ipb=3D66MHz, set clock period to 15
GPIO config: 11050004
ATA invalid: 00800000
ATA hostcnf: 03000000
ATA pio1   : 100a0a00
ATA pio2   : 02040600
XLB Arb cnf: 0000a366
mpc5xxx_ide: Setting up IDE interface ide0...
ATA DMA task: 5
Probing IDE interface ide0...
SCSI subsystem driver Revision: 1.00
Icecube-0: Found 1 x8 devices at 0x0 in 8-bit bank
Icecube-0: Found 1 x8 devices at 0x800000 in 8-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
Icecube-0: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 2
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Icecube flash bank 0: Using static image partition definition
Creating 5 MTD partitions on "Icecube-0":
0x00000000-0x00800000 : "Spare"
0x00800000-0x00900000 : "kernel"
0x00900000-0x00c00000 : "initrd"
0x00c00000-0x00f00000 : "jffs"
0x00f00000-0x01000000 : "Firmware"
usb.c: registered new driver hub
host/usb-ohci.c: USB OHCI at membase 0xf0001000, IRQ 44
host/usb-ohci.c: usb-0, Built-In ohci
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 1 port detected
bluetooth.c: USB Bluetooth support registered
usb.c: registered new driver bluetty
bluetooth.c: USB Bluetooth tty driver v0.13
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
USB Mass Storage support registered.
i2c-icecube.o: I2C module #2 installed
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 8192)
eth0: Phy @ 0x0, type LXT971 (0x001378e2)
IP-Config: Guessing netmask 255.0.0.0
IP-Config: Complete:
      device=3Deth0, addr=3D10.3.67.99, mask=3D255.0.0.0, =
gw=3D10.3.67.1,
     host=3D10.3.67.99, domain=3D, nis-domain=3D(none),
     bootserver=3D10.3.67.98, rootserver=3D10.3.67.98, rootpath=3D
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Looking up port of RPC 100003/2 on 10.3.67.98
Looking up port of RPC 100005/1 on 10.3.67.98
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 80k init
nfs: server 10.3.67.98 not responding, still trying
nfs: server 10.3.67.98 OK
nfs: server 10.3.67.98 not responding, still trying
nfs: server 10.3.67.98 OK
[time to this about 5 minutes]
INIT: version 2.85 booting
nfs: server 10.3.67.98 not responding, still trying
nfs: server 10.3.67.98 OK
nfs: server 10.3.67.98 not responding, still trying
nfs: server 10.3.67.98 OK

Regards,
Bjorn Ostby

^ permalink raw reply

* [PATCH] powerpc: support ibm,extended-*-frequency properties
From: Anton Blanchard @ 2006-06-20  8:47 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: paulus


Support the ibm,extended-*-frequency properties found in recent POWER5
firmware:

cpus/PowerPC,POWER5@0/clock-frequency
                 59aa5880 (1504336000)
cpus/PowerPC,POWER5@0/ibm,extended-clock-frequency
                 00000000 59aa5880
cpus/PowerPC,POWER5@0/timebase-frequency
                 0b354b10 (188042000)
cpus/PowerPC,POWER5@0/ibm,extended-timebase-frequency
                 00000000 0b354b10

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: build/arch/powerpc/kernel/time.c
===================================================================
--- build.orig/arch/powerpc/kernel/time.c	2006-06-20 11:55:34.000000000 +1000
+++ build/arch/powerpc/kernel/time.c	2006-06-20 18:25:35.000000000 +1000
@@ -857,42 +857,50 @@ int do_settimeofday(struct timespec *tv)
 
 EXPORT_SYMBOL(do_settimeofday);
 
-void __init generic_calibrate_decr(void)
+static int __init get_freq(char *name, int cells, unsigned long *val)
 {
 	struct device_node *cpu;
 	unsigned int *fp;
-	int node_found;
+	int found = 0;
 
-	/*
-	 * The cpu node should have a timebase-frequency property
-	 * to tell us the rate at which the decrementer counts.
-	 */
+	/* The cpu node should have timebase and clock frequency properties */
 	cpu = of_find_node_by_type(NULL, "cpu");
 
-	ppc_tb_freq = DEFAULT_TB_FREQ;		/* hardcoded default */
-	node_found = 0;
 	if (cpu) {
-		fp = (unsigned int *)get_property(cpu, "timebase-frequency",
-						  NULL);
+		fp = (unsigned int *)get_property(cpu, name, NULL);
 		if (fp) {
-			node_found = 1;
-			ppc_tb_freq = *fp;
+			found = 1;
+			*val = 0;
+			while (cells--)
+				*val = (*val << 32) | *fp++;
 		}
+
+		of_node_put(cpu);
 	}
-	if (!node_found)
+
+	return found;
+}
+
+void __init generic_calibrate_decr(void)
+{
+	ppc_tb_freq = DEFAULT_TB_FREQ;		/* hardcoded default */
+
+	if (!get_freq("ibm,extended-timebase-frequency", 2, &ppc_tb_freq) &&
+	    !get_freq("timebase-frequency", 1, &ppc_tb_freq)) {
+
 		printk(KERN_ERR "WARNING: Estimating decrementer frequency "
 				"(not found)\n");
+	}
 
-	ppc_proc_freq = DEFAULT_PROC_FREQ;
-	node_found = 0;
-	if (cpu) {
-		fp = (unsigned int *)get_property(cpu, "clock-frequency",
-						  NULL);
-		if (fp) {
-			node_found = 1;
-			ppc_proc_freq = *fp;
-		}
+	ppc_proc_freq = DEFAULT_PROC_FREQ;	/* hardcoded default */
+
+	if (!get_freq("ibm,extended-clock-frequency", 2, &ppc_proc_freq) &&
+	    !get_freq("clock-frequency", 1, &ppc_proc_freq)) {
+
+		printk(KERN_ERR "WARNING: Estimating processor frequency "
+				"(not found)\n");
 	}
+
 #ifdef CONFIG_BOOKE
 	/* Set the time base to zero */
 	mtspr(SPRN_TBWL, 0);
@@ -904,11 +912,6 @@ void __init generic_calibrate_decr(void)
 	/* Enable decrementer interrupt */
 	mtspr(SPRN_TCR, TCR_DIE);
 #endif
-	if (!node_found)
-		printk(KERN_ERR "WARNING: Estimating processor frequency "
-				"(not found)\n");
-
-	of_node_put(cpu);
 }
 
 unsigned long get_boot_time(void)

^ permalink raw reply

* Gb Ethernet on xilinx gemac IP
From: Xavier Grave @ 2006-06-20  6:45 UTC (permalink / raw)
  To: linuxppc-embedded, ppc dev

Hi,

I'm currently running linux with 10/100 MBits xilinx ethernet driver. I
have a memec 2VP20 evaluation board.
We have bought a PCOM2 module in order to have a Gb PHY. I have
implemented an hardware to handle it but whatever linux version I take
(2.4 from denx web site, 2.6.17 from kernel.org), I can't configure a Gb
ethernet driver. And the 10/100 driver don't configure my Gb PHY...

I have compiled my linux kernel based on the ml300 configuration default
config.

Does anyone has an idea ?

Thanks, xavier

^ permalink raw reply

* Re: Gb Ethernet on xilinx gemac IP
From: Filippo Capurso - DAVE srl @ 2006-06-20  9:04 UTC (permalink / raw)
  To: grave; +Cc: linuxppc-embedded
In-Reply-To: <1150785936.17197.9.camel@ipnnarval>

Hi Xavier,

I'm trying to get running linux 2.6.17 on my ML403 board (Virtex-4) but 
I'm having some trouble with the MMU initialization...
This my message to the ML:

http://ozlabs.org/pipermail/linuxppc-embedded/2006-June/023321.html

Did you have similar problems? Have you any idea that could help me?
Thank you so much.

About your question:

Xavier Grave ha scritto:
> Hi,
> 
> I'm currently running linux with 10/100 MBits xilinx ethernet driver. I
> have a memec 2VP20 evaluation board.
> We have bought a PCOM2 module in order to have a Gb PHY. I have
> implemented an hardware to handle it but whatever linux version I take
> (2.4 from denx web site, 2.6.17 from kernel.org), I can't configure a Gb
> ethernet driver. And the 10/100 driver don't configure my Gb PHY...
> 
> I have compiled my linux kernel based on the ml300 configuration default
> config.
> 
> Does anyone has an idea ?
This is a patch for ML403 board, it adds the linux 2.6 driver for TEMAC.

http://ozlabs.org/pipermail/linuxppc-embedded/2006-March/022365.html

Hope this helps.

> 
> Thanks, xavier
> 
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> 
> 

Regards,

Filippo Capurso

-- 

DAVE Srl - Electronics System House
via Forniz 2/1
33080 Porcia (PN) - Italy
Telephone: +39.0434.921215
Telefax: +39.0434.1994030
Freefax: +39.02.700520062
web: www.dave-tech.it
e-mail: filippo.capurso@dave-tech.it
how to reach us: http://mail.map24.com/dave

^ permalink raw reply

* Re: could linux support to configure the PLB-PCI bridge of PPC440 into adapter mode
From: 陈 云 @ 2006-06-20  9:10 UTC (permalink / raw)
  To: matthias.fuchs; +Cc: linuxppc-embedded
In-Reply-To: <4496B0AA.60909@esd-electronics.com>

hi Matthias:
   thank for your reply.
   according to information you provide, i should set the proper parameter 
of register of PPC440GX in U-BOOT(I use u-boot as bootloader),such as 
PAE,PHCE,PISE of SDR0_XCR and BAR etc.  during the time of linux kernel 
booting, I turn off CONFIG_PCI , let linux kernel don't initialize the PCI 
bus as host bridge and set PLB address in kernel.  then after the linux 
system operated, the ppc440gx could act as adapter mode. does my 
understanding correct? 
   i really appreciate your help.

 chen 


>From: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
>To: hilichen2000@msn.com
>CC: linuxppc-embedded@ozlabs.org
>Subject: Re: could linux support to configure the PLB-PCI bridge of PPC440 
into	adapter mode
>Date: Mon, 19 Jun 2006 16:11:54 +0200
>
>Hi chen,
>
>it's not easy to setup the PCI-to-PLB mapping in a generic way so 
>that is gets into the kernel. Also it might be too late when the 
>adapter OS configures the bridge. The bridge must be setup quickly 
>after reset so that the host OS can assign resources to the card. 
>The bootloader of your board might be a good place to setup of the 
>adapter stuff. At least number and sizes of the needed address 
>spaces should be setup early.
>The PLB address can be setup or modified later (e.g. from the target 
>OS).
>
>>hi,now I want to use PPC440GX as PCI adapter card bridge. according 
>>to user manual, the PLB-PCI bridge should be configured to Adapter 
>>mode. after check some code of PCI of linux, i find the linux only 
>>support configuring the PLB-PCI bridge into HOST mode. Is my 
>>understanding correct ? if the normal version of linux don't 
>>support the adapter mode, could i found the patch?
>Probably not.
>
>Matthias
>
>
>
>

_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  

^ permalink raw reply

* Re: Gb Ethernet on xilinx gemac IP
From: Xavier Grave @ 2006-06-20  7:38 UTC (permalink / raw)
  To: filippo.capurso; +Cc: linuxppc-embedded
In-Reply-To: <4497BA1E.5090603@dave-tech.it>

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

I have a 2.6.17 kernel compiling and booting but still have little pb
with initrd attachement...
here is my .config file : you should modify it a little ml300 -> ml400
and modify your xparameters_ml400.h according to the hardware you
difined in xps or ise... You should also modify the kernel argument line
according to what you need root nfs or whatever you use...

xavier
Le mardi 20 juin 2006 à 11:04 +0200, Filippo Capurso - DAVE srl a
écrit :
> Hi Xavier,
> 
> I'm trying to get running linux 2.6.17 on my ML403 board (Virtex-4) but 
> I'm having some trouble with the MMU initialization...
> This my message to the ML:
> 
> http://ozlabs.org/pipermail/linuxppc-embedded/2006-June/023321.html
> 
> Did you have similar problems? Have you any idea that could help me?
> Thank you so much.
> 
> About your question:
> 
> Xavier Grave ha scritto:
> > Hi,
> > 
> > I'm currently running linux with 10/100 MBits xilinx ethernet driver. I
> > have a memec 2VP20 evaluation board.
> > We have bought a PCOM2 module in order to have a Gb PHY. I have
> > implemented an hardware to handle it but whatever linux version I take
> > (2.4 from denx web site, 2.6.17 from kernel.org), I can't configure a Gb
> > ethernet driver. And the 10/100 driver don't configure my Gb PHY...
> > 
> > I have compiled my linux kernel based on the ml300 configuration default
> > config.
> > 
> > Does anyone has an idea ?
> This is a patch for ML403 board, it adds the linux 2.6 driver for TEMAC.
> 
> http://ozlabs.org/pipermail/linuxppc-embedded/2006-March/022365.html
> 
> Hope this helps.
> 
> > 
> > Thanks, xavier
> > 
> > _______________________________________________
> > Linuxppc-embedded mailing list
> > Linuxppc-embedded@ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> > 
> > 
> 
> Regards,
> 
> Filippo Capurso
> 

[-- Attachment #2: config_mem --]
[-- Type: text/plain, Size: 13755 bytes --]

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.17
# Mon Jun 19 17:41:53 2006
#
CONFIG_MMU=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_PPC=y
CONFIG_PPC32=y
CONFIG_GENERIC_NVRAM=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32

#
# General setup
#
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
# CONFIG_POSIX_MQUEUE is not set
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set
# CONFIG_IKCONFIG is not set
# CONFIG_RELAY is not set
CONFIG_INITRAMFS_SOURCE=""
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SHMEM=y
CONFIG_SLAB=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
# CONFIG_SLOB is not set

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_KMOD=y

#
# Block layer
#
# CONFIG_LBD is not set
# CONFIG_BLK_DEV_IO_TRACE is not set
# CONFIG_LSF is not set

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_DEFAULT_AS=y
# CONFIG_DEFAULT_DEADLINE is not set
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="anticipatory"

#
# Processor
#
# CONFIG_6xx is not set
CONFIG_40x=y
# CONFIG_44x is not set
# CONFIG_8xx is not set
# CONFIG_E200 is not set
# CONFIG_E500 is not set
# CONFIG_MATH_EMULATION is not set
# CONFIG_KEXEC is not set
# CONFIG_CPU_FREQ is not set
CONFIG_4xx=y
# CONFIG_WANT_EARLY_SERIAL is not set

#
# IBM 4xx options
#
# CONFIG_BUBINGA is not set
# CONFIG_CPCI405 is not set
# CONFIG_EP405 is not set
# CONFIG_REDWOOD_5 is not set
# CONFIG_REDWOOD_6 is not set
# CONFIG_SYCAMORE is not set
# CONFIG_WALNUT is not set
CONFIG_XILINX_ML300=y
# CONFIG_XILINX_ML403 is not set
CONFIG_IBM405_ERR77=y
CONFIG_IBM405_ERR51=y
CONFIG_XILINX_VIRTEX_II_PRO=y
CONFIG_XILINX_VIRTEX=y
CONFIG_EMBEDDEDBOOT=y
# CONFIG_PPC4xx_DMA is not set
CONFIG_PPC_GEN550=y
CONFIG_UART0_TTYS0=y
# CONFIG_UART0_TTYS1 is not set
CONFIG_NOT_COHERENT_CACHE=y

#
# Platform options
#
# CONFIG_PC_KEYBOARD is not set
# CONFIG_HIGHMEM is not set
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_SPARSEMEM_STATIC is not set
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="console=ttyS0,9600 root=/dev/ram0 initrd"
# CONFIG_PM is not set
# CONFIG_SOFTWARE_SUSPEND is not set
CONFIG_SECCOMP=y
CONFIG_ISA_DMA_API=y

#
# Bus options
#
# CONFIG_PPC_I8259 is not set
# CONFIG_PCI is not set
# CONFIG_PCI_DOMAINS is not set

#
# PCCARD (PCMCIA/CardBus) support
#
# CONFIG_PCCARD is not set

#
# Advanced setup
#
# CONFIG_ADVANCED_OPTIONS is not set

#
# Default settings for advanced configuration options are used
#
CONFIG_HIGHMEM_START=0xfe000000
CONFIG_LOWMEM_SIZE=0x30000000
CONFIG_KERNEL_START=0xc0000000
CONFIG_TASK_SIZE=0x80000000
CONFIG_CONSISTENT_START=0xff100000
CONFIG_CONSISTENT_SIZE=0x00200000
CONFIG_BOOT_LOAD=0x00400000

#
# Networking
#
CONFIG_NET=y

#
# Networking options
#
# CONFIG_NETDEBUG is not set
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
# CONFIG_IP_PNP_BOOTP is not set
# CONFIG_IP_PNP_RARP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
# CONFIG_INET_TUNNEL is not set
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_BIC=y
# CONFIG_IPV6 is not set
# CONFIG_INET6_XFRM_TUNNEL is not set
# CONFIG_INET6_TUNNEL is not set
# CONFIG_NETFILTER is not set

#
# DCCP Configuration (EXPERIMENTAL)
#
# CONFIG_IP_DCCP is not set

#
# SCTP Configuration (EXPERIMENTAL)
#
# CONFIG_IP_SCTP is not set

#
# TIPC Configuration (EXPERIMENTAL)
#
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set

#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
# CONFIG_IEEE80211 is not set

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FW_LOADER is not set
# CONFIG_DEBUG_DRIVER is not set

#
# Connector - unified userspace <-> kernelspace linker
#
# CONFIG_CONNECTOR is not set

#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set

#
# Parallel port support
#
# CONFIG_PARPORT is not set

#
# Plug and Play support
#

#
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_COW_COMMON is not set
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_NBD is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=65536
CONFIG_BLK_DEV_INITRD=y
# CONFIG_CDROM_PKTCDVD is not set
# CONFIG_ATA_OVER_ETH is not set

#
# ATA/ATAPI/MFM/RLL support
#
# CONFIG_IDE is not set

#
# SCSI device support
#
# CONFIG_RAID_ATTRS is not set
# CONFIG_SCSI is not set

#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set

#
# Fusion MPT device support
#
# CONFIG_FUSION is not set

#
# IEEE 1394 (FireWire) support
#

#
# I2O device support
#

#
# Macintosh device drivers
#
# CONFIG_WINDFARM is not set

#
# Network device support
#
CONFIG_NETDEVICES=y
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
CONFIG_TUN=y

#
# PHY device support
#
# CONFIG_PHYLIB is not set

#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
# CONFIG_IBM_EMAC is not set

#
# Ethernet (1000 Mbit)
#

#
# Ethernet (10000 Mbit)
#

#
# Token Ring devices
#

#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set

#
# Wan interfaces
#
# CONFIG_WAN is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set

#
# ISDN subsystem
#
# CONFIG_ISDN is not set

#
# Telephony Support
#
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_TSDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set

#
# Hardware I/O ports
#
# CONFIG_SERIO is not set
# CONFIG_GAMEPORT is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_SERIAL_NONSTANDARD is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_UNIX98_PTYS=y
# CONFIG_LEGACY_PTYS is not set

#
# IPMI
#
# CONFIG_IPMI_HANDLER is not set

#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_NVRAM is not set
# CONFIG_GEN_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set

#
# Ftape, the floppy tape device driver
#
# CONFIG_AGP is not set
# CONFIG_RAW_DRIVER is not set

#
# TPM devices
#
# CONFIG_TCG_TPM is not set
# CONFIG_TELCLOCK is not set

#
# I2C support
#
# CONFIG_I2C is not set

#
# SPI support
#
# CONFIG_SPI is not set
# CONFIG_SPI_MASTER is not set

#
# Dallas's 1-wire bus
#
# CONFIG_W1 is not set

#
# Hardware Monitoring support
#
# CONFIG_HWMON is not set
# CONFIG_HWMON_VID is not set

#
# Misc devices
#

#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set
CONFIG_VIDEO_V4L2=y

#
# Digital Video Broadcasting Devices
#
# CONFIG_DVB is not set

#
# Graphics support
#
# CONFIG_FB is not set

#
# Console display driver support
#
CONFIG_DUMMY_CONSOLE=y

#
# Sound
#
# CONFIG_SOUND is not set

#
# USB support
#
# CONFIG_USB_ARCH_HAS_HCD is not set
# CONFIG_USB_ARCH_HAS_OHCI is not set
# CONFIG_USB_ARCH_HAS_EHCI is not set

#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
#

#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set

#
# MMC/SD Card support
#
# CONFIG_MMC is not set

#
# LED devices
#
# CONFIG_NEW_LEDS is not set

#
# LED drivers
#

#
# LED Triggers
#

#
# InfiniBand support
#

#
# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
#

#
# Real Time Clock
#
# CONFIG_RTC_CLASS is not set

#
# File systems
#
CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
# CONFIG_EXT2_FS_XIP is not set
# CONFIG_EXT3_FS is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_FS_POSIX_ACL is not set
# CONFIG_XFS_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_INOTIFY=y
# CONFIG_QUOTA is not set
CONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_FUSE_FS is not set

#
# CD-ROM/DVD Filesystems
#
# CONFIG_ISO9660_FS is not set
# CONFIG_UDF_FS is not set

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
# CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y
# CONFIG_CONFIGFS_FS is not set

#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set

#
# Network File Systems
#
# CONFIG_NFS_FS is not set
# CONFIG_NFSD is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
# CONFIG_9P_FS is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y

#
# Native Language Support
#
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
CONFIG_NLS_UTF8=y

#
# IBM 40x options
#

#
# Library routines
#
# CONFIG_CRC_CCITT is not set
# CONFIG_CRC16 is not set
CONFIG_CRC32=y
# CONFIG_LIBCRC32C is not set
# CONFIG_PROFILING is not set

#
# Kernel hacking
#
CONFIG_PRINTK_TIME=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_KERNEL=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_DETECT_SOFTLOCKUP=y
# CONFIG_SCHEDSTATS is not set
# CONFIG_DEBUG_SLAB is not set
CONFIG_DEBUG_MUTEXES=y
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_FS is not set
# CONFIG_DEBUG_VM is not set
CONFIG_FORCED_INLINING=y
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_KGDB is not set
CONFIG_XMON=y
# CONFIG_BDI_SWITCH is not set
# CONFIG_SERIAL_TEXT_DEBUG is not set

#
# Security options
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set

#
# Cryptographic options
#
# CONFIG_CRYPTO is not set

#
# Hardware crypto devices
#

^ permalink raw reply

* Re: [PATCH] powerpc: support ibm,extended-*-frequency properties
From: Segher Boessenkool @ 2006-06-20  9:50 UTC (permalink / raw)
  To: Anton Blanchard; +Cc: linuxppc-dev, paulus
In-Reply-To: <20060620084726.GC30974@krispykreme>

Hi Anton,

> Support the ibm,extended-*-frequency properties found in recent POWER5
> firmware:
>
> cpus/PowerPC,POWER5@0/clock-frequency
>                  59aa5880 (1504336000)
> cpus/PowerPC,POWER5@0/ibm,extended-clock-frequency
>                  00000000 59aa5880
> cpus/PowerPC,POWER5@0/timebase-frequency
>                  0b354b10 (188042000)
> cpus/PowerPC,POWER5@0/ibm,extended-timebase-frequency
>                  00000000 0b354b10

Could you also allow the regular "timebase-frequency" property
to consist of two cells, with the same semantics?  That's what
some other systems do.  Hey, it'd simplify this code, if anything :-)

In fact, some kernel code already does this if I'm not mistaken
(the Cell port, perhaps?)


Segher

^ permalink raw reply

* RE: Exceptions during PCI initialization at u-boot
From: Prabhat_Singh @ 2006-06-20  9:58 UTC (permalink / raw)
  To: Liu Dave-r63238, linuxppc-embedded

Hi Dave
Thanks for you comments.

I tried clearing 'PCI No response' as follows :
				Unsigned int* EMR=3D( Unsigned
int*)0xf0010888;
				Unsigned int* ESR=3D( Unsigned
int*)0xf0010884;
		Before pci_hose_read_config_byte function I cleared the
the 'PCI No response' bit.
				*EMR &=3D0xFFFFFFF7;
				*ESR |=3D0x00000008;
Now it's getting reset and machine check exception coming all the time
continuously and board is not booting up.

I am clueless please advice what to do?

Regards
Prabhat





=20
-----Original Message-----
From: Liu Dave-r63238 [mailto:DaveLiu@freescale.com]=20
Sent: Tuesday, June 20, 2006 1:29 PM
To: Prabhat_Singh; linuxppc-embedded@ozlabs.org
Subject: RE: Exceptions during PCI initialization at u-boot

Hi Prabhat,

Did you clear the 'PCI No response' in the error mask register
before you do PCI configuration read? If you didn't, machine check
will arise when PCI scan unpopulated PCI slot.

I notice that the MSR[12] is set, but the trap codes haven't
detect that, what is your toolchain?

Regards,
-Dave


-----Original Message-----
Hi all
I am getting two exceptions, that you will find in log, at the
pci_hose_read_config_byte memory is crashing that's I found in
System.map. after second exception its boots properly. I have no clue
whats happening. And why I am not able to read Configuration space of
pci.=20
>From where this exception is coming?
Please help me out. What else I can check?
=20
=20
VPN Router Board
=20
=20
Vpn Router U-Boot 1.0.0 (Jun 19 2006 - 11:31:37)
=20
MPC8260 Reset Status: External Soft, External Hard
=20
MPC8260 Clock Configuration
 - Bus-to-Core Mult 4x, VCO Div 2, 60x Bus Freq  25-75 , Core Freq
100-300
 - dfbrg 0, corecnf 0x1a, busdf 3, cpmdf 1, plldf 0, pllmf 3
 - vco_out  400000000, scc_clk  100000000, brg_clk  100000000
 - cpu_clk  400000000, cpm_clk  200000000, bus_clk  100000000
=20
CPU:   8272 (HiP7 Rev 14, Mask A.0 1K50M) at 400 MHz
Board: VPN8248
DRAM:  32 MB
total length of code       216456l   34d88value of sdrambase+ramsize
02000000=20
Top of RAM usable for U-Boot at: 02000000
Reserving 211k for U-Boot at: 01fcb000
Reserving 128k for malloc() at: 01faae00
Reserving 76 Bytes for Board Info at: 01faadb4
Reserving 80 Bytes for Global Data at: 01faad64
Stack Pointer at: 01faad48
New Stack Pointer is: 01faad48
value of ret 0=20
Entering reloacte
Now running in RAM - U-Boot at: 01fcb000
POST memory POST memory PASSED
PASSED
FLASH: satyam : manufacturor ID =3D 200020satyam: id1=3D22df22df
satyam: id2=3D0
satyam: id3=3D80008
16 MB
PCI Autoconfig: Memory region: [14000000-1bffffff]
PCI Autoconfig: I/O region: [1c000000-1dffffff]
Bus Fault @ 0x01fd2df8, fixup 0x00000000
Machine check in kernel mode.
Caused by (from msr): regs 01faab60 Unknown values in msr
NIP: 01FD2DF8 XER: 00000000 LR: 01FD2DF0 REGS: 01faab60 TRAP: 0200 DAR:
01FE4DB8
MSR: 00083002 EE: 0 PR: 0 FP: 1 ME: 1 IR/DR: 00
=20
GPR00: 01FD3A24 01FAAC50 FFFFFFFF 00000000 8000080C 00000002 01FAAC5E
01C5D1FB=20
GPR08: 01FD0084 F0010904 00000000 00000000 00000020 FFFFFFFF 01FF8000
020CB000=20
GPR16: FFFFFFFF FFFFFFFF FFFFFEFF FFFFFFFF 00000000 00000000 FFFFFFFF
F0010D20=20
GPR24: 00000000 00000000 01FFE39C 00000100 01FFE39C 01FAAD64 01FF8400
00000800=20
Call backtrace:=20
01FD3A24 01FD3BF0 01FE8B84 01FE3E04 01FD3C64 01FCFE30 01FCE48C=20
machine check
VPN Router Board
=20
=20
Vpn Router U-Boot 1.0.0 (Jun 19 2006 - 11:31:37)
=20
MPC8260 Reset Status:
=20
MPC8260 Clock Configuration
 - Bus-to-Core Mult 4x, VCO Div 2, 60x Bus Freq  25-75 , Core Freq
100-300
 - dfbrg 0, corecnf 0x1a, busdf 3, cpmdf 1, plldf 0, pllmf 3
 - vco_out  400000000, scc_clk  100000000, brg_clk  100000000
 - cpu_clk  400000000, cpm_clk  200000000, bus_clk  100000000
=20
CPU:   8272 (HiP7 Rev 14, Mask A.0 1K50M) at 400 MHz
Board: VPN8248
DRAM:  32 MB
total length of code       216456l   34d88value of sdrambase+ramsize
02000000=20
Top of RAM usable for U-Boot at: 02000000
Reserving 211k for U-Boot at: 01fcb000
Reserving 128k for malloc() at: 01faae00
Reserving 76 Bytes for Board Info at: 01faadb4
Reserving 80 Bytes for Global Data at: 01faad64
Stack Pointer at: 01faad48
New Stack Pointer is: 01faad48
Entering reloacte
Now running in RAM - U-Boot at: 01fcb000
FLASH: satyam : manufacturor ID =3D 200020satyam: id1=3D22df22df
PCI Autoconfig: Memory region: [14000000-1bffffff]
PCI Autoconfig: I/O region: [1c000000-1dffffff]
vendor=3D168c
PCI Scan: Found Bus 0, Device 15, Function 0
PCI Autoconfig: BAR 0, Mem, size=3D0x10000, address=3D0x14000000
PCI Autoconfig: BAR 1, I/O, size=3D0xffffb000, No room in resource
PCI:     00  0f  168c  0013  0200  00
value of item =3D1
In:    serial
Out:   serial
Err:   serial
Chip Name  =3D 175a
Chip Name  =3D 175c
phy ID(0x02430d80) =3D 02430d80
Level One/ICPLUS PHY Identied IC175C Revision 0
Phy operating at 100 MBit/s in full-duplex mode
Phy operating at 100 MBit/s in full-duplex mode
U-Boot relocated to 01fcb000
Net:   value of fec FCC2 ETHERNET=20
FCC2 ETHERNET
Hit any key to stop autoboot:  5 =08satyam=3D> =20
=20



DISCLAIMER:
This email (including any attachments) is intended for the sole use of =
the intended recipient/s and may contain material that is CONFIDENTIAL =
AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or =
copying or distribution or forwarding of any or all of the contents in =
this message is STRICTLY PROHIBITED. If you are not the intended =
recipient, please contact the sender by email and delete all copies; =
your cooperation in this regard is appreciated.

^ permalink raw reply

* RE: Exceptions during PCI initialization at u-boot
From: Liu Dave-r63238 @ 2006-06-20 10:10 UTC (permalink / raw)
  To: 'Prabhat_Singh', linuxppc-embedded

Hi Prabhat,

Be careful the register endian, these registers are little endian.
I suggest you do clearing the bit before pci_hose_scan.

I suspect the traps code have one bug inside of u-boot-1.0.0.

-Dave
 

> -----Original Message-----
> From: Prabhat_Singh [mailto:Prabhat_Singh@Satyam.com] 
> Sent: Tuesday, June 20, 2006 5:58 PM
> To: Liu Dave-r63238; linuxppc-embedded@ozlabs.org
> Subject: RE: Exceptions during PCI initialization at u-boot
> 
> 
> Hi Dave
> Thanks for you comments.
> 
> I tried clearing 'PCI No response' as follows :
> 				Unsigned int* EMR=( Unsigned
> int*)0xf0010888;
> 				Unsigned int* ESR=( Unsigned
> int*)0xf0010884;
> 		Before pci_hose_read_config_byte function I cleared the
> the 'PCI No response' bit.
> 				*EMR &=0xFFFFFFF7;
> 				*ESR |=0x00000008;
> Now it's getting reset and machine check exception coming all the time
> continuously and board is not booting up.
> 
> I am clueless please advice what to do?
> 
> Regards
> Prabhat
> 
> 
> 
> 
> 
>  
> -----Original Message-----
> From: Liu Dave-r63238 [mailto:DaveLiu@freescale.com] 
> Sent: Tuesday, June 20, 2006 1:29 PM
> To: Prabhat_Singh; linuxppc-embedded@ozlabs.org
> Subject: RE: Exceptions during PCI initialization at u-boot
> 
> Hi Prabhat,
> 
> Did you clear the 'PCI No response' in the error mask register
> before you do PCI configuration read? If you didn't, machine check
> will arise when PCI scan unpopulated PCI slot.
> 
> I notice that the MSR[12] is set, but the trap codes haven't
> detect that, what is your toolchain?
> 
> Regards,
> -Dave
> 
> 
> -----Original Message-----
> Hi all
> I am getting two exceptions, that you will find in log, at the
> pci_hose_read_config_byte memory is crashing that's I found in
> System.map. after second exception its boots properly. I have no clue
> whats happening. And why I am not able to read Configuration space of
> pci. 
> From where this exception is coming?
> Please help me out. What else I can check?
>  
>  
> VPN Router Board
>  
>  
> Vpn Router U-Boot 1.0.0 (Jun 19 2006 - 11:31:37)
>  
> MPC8260 Reset Status: External Soft, External Hard
>  
> MPC8260 Clock Configuration
>  - Bus-to-Core Mult 4x, VCO Div 2, 60x Bus Freq  25-75 , Core Freq
> 100-300
>  - dfbrg 0, corecnf 0x1a, busdf 3, cpmdf 1, plldf 0, pllmf 3
>  - vco_out  400000000, scc_clk  100000000, brg_clk  100000000
>  - cpu_clk  400000000, cpm_clk  200000000, bus_clk  100000000
>  
> CPU:   8272 (HiP7 Rev 14, Mask A.0 1K50M) at 400 MHz
> Board: VPN8248
> DRAM:  32 MB
> total length of code       216456l   34d88value of sdrambase+ramsize
> 02000000 
> Top of RAM usable for U-Boot at: 02000000
> Reserving 211k for U-Boot at: 01fcb000
> Reserving 128k for malloc() at: 01faae00
> Reserving 76 Bytes for Board Info at: 01faadb4
> Reserving 80 Bytes for Global Data at: 01faad64
> Stack Pointer at: 01faad48
> New Stack Pointer is: 01faad48
> value of ret 0 
> Entering reloacte
> Now running in RAM - U-Boot at: 01fcb000
> POST memory POST memory PASSED
> PASSED
> FLASH: satyam : manufacturor ID = 200020satyam: id1=22df22df
> satyam: id2=0
> satyam: id3=80008
> 16 MB
> PCI Autoconfig: Memory region: [14000000-1bffffff]
> PCI Autoconfig: I/O region: [1c000000-1dffffff]
> Bus Fault @ 0x01fd2df8, fixup 0x00000000
> Machine check in kernel mode.
> Caused by (from msr): regs 01faab60 Unknown values in msr
> NIP: 01FD2DF8 XER: 00000000 LR: 01FD2DF0 REGS: 01faab60 TRAP: 
> 0200 DAR:
> 01FE4DB8
> MSR: 00083002 EE: 0 PR: 0 FP: 1 ME: 1 IR/DR: 00
>  
> GPR00: 01FD3A24 01FAAC50 FFFFFFFF 00000000 8000080C 00000002 01FAAC5E
> 01C5D1FB 
> GPR08: 01FD0084 F0010904 00000000 00000000 00000020 FFFFFFFF 01FF8000
> 020CB000 
> GPR16: FFFFFFFF FFFFFFFF FFFFFEFF FFFFFFFF 00000000 00000000 FFFFFFFF
> F0010D20 
> GPR24: 00000000 00000000 01FFE39C 00000100 01FFE39C 01FAAD64 01FF8400
> 00000800 
> Call backtrace: 
> 01FD3A24 01FD3BF0 01FE8B84 01FE3E04 01FD3C64 01FCFE30 01FCE48C 
> machine check
> VPN Router Board
>  
>  
> Vpn Router U-Boot 1.0.0 (Jun 19 2006 - 11:31:37)
>  
> MPC8260 Reset Status:
>  
> MPC8260 Clock Configuration
>  - Bus-to-Core Mult 4x, VCO Div 2, 60x Bus Freq  25-75 , Core Freq
> 100-300
>  - dfbrg 0, corecnf 0x1a, busdf 3, cpmdf 1, plldf 0, pllmf 3
>  - vco_out  400000000, scc_clk  100000000, brg_clk  100000000
>  - cpu_clk  400000000, cpm_clk  200000000, bus_clk  100000000
>  
> CPU:   8272 (HiP7 Rev 14, Mask A.0 1K50M) at 400 MHz
> Board: VPN8248
> DRAM:  32 MB
> total length of code       216456l   34d88value of sdrambase+ramsize
> 02000000 
> Top of RAM usable for U-Boot at: 02000000
> Reserving 211k for U-Boot at: 01fcb000
> Reserving 128k for malloc() at: 01faae00
> Reserving 76 Bytes for Board Info at: 01faadb4
> Reserving 80 Bytes for Global Data at: 01faad64
> Stack Pointer at: 01faad48
> New Stack Pointer is: 01faad48
> Entering reloacte
> Now running in RAM - U-Boot at: 01fcb000
> FLASH: satyam : manufacturor ID = 200020satyam: id1=22df22df
> PCI Autoconfig: Memory region: [14000000-1bffffff]
> PCI Autoconfig: I/O region: [1c000000-1dffffff]
> vendor=168c
> PCI Scan: Found Bus 0, Device 15, Function 0
> PCI Autoconfig: BAR 0, Mem, size=0x10000, address=0x14000000
> PCI Autoconfig: BAR 1, I/O, size=0xffffb000, No room in resource
> PCI:     00  0f  168c  0013  0200  00
> value of item =1
> In:    serial
> Out:   serial
> Err:   serial
> Chip Name  = 175a
> Chip Name  = 175c
> phy ID(0x02430d80) = 02430d80
> Level One/ICPLUS PHY Identied IC175C Revision 0
> Phy operating at 100 MBit/s in full-duplex mode
> Phy operating at 100 MBit/s in full-duplex mode
> U-Boot relocated to 01fcb000
> Net:   value of fec FCC2 ETHERNET 
> FCC2 ETHERNET
> Hit any key to stop autoboot:  5 \bsatyam=>  
>  
> 
> 
> 
> DISCLAIMER:
> This email (including any attachments) is intended for the 
> sole use of the intended recipient/s and may contain material 
> that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any 
> review or reliance by others or copying or distribution or 
> forwarding of any or all of the contents in this message is 
> STRICTLY PROHIBITED. If you are not the intended recipient, 
> please contact the sender by email and delete all copies; 
> your cooperation in this regard is appreciated.
> 

^ permalink raw reply

* RE: Exceptions during PCI initialization at u-boot
From: Prabhat_Singh @ 2006-06-20 12:18 UTC (permalink / raw)
  To: Liu Dave-r63238, linuxppc-embedded

Hi Dave,
Thanks for prompt response, it's really helped.=20

By reading ESR (error status register) I found that machine check
exception is coming because of "PCI parity error received on a write"
bit 7 of ESR is getting set.

Can you tell me reason and the possible solution for this one.

Regards
Prabhat

-----Original Message-----
From: Liu Dave-r63238 [mailto:DaveLiu@freescale.com]=20
Sent: Tuesday, June 20, 2006 3:40 PM
To: Prabhat_Singh; linuxppc-embedded@ozlabs.org
Subject: RE: Exceptions during PCI initialization at u-boot

Hi Prabhat,

Be careful the register endian, these registers are little endian.
I suggest you do clearing the bit before pci_hose_scan.

I suspect the traps code have one bug inside of u-boot-1.0.0.

-Dave
=20

> -----Original Message-----
> From: Prabhat_Singh [mailto:Prabhat_Singh@Satyam.com]=20
> Sent: Tuesday, June 20, 2006 5:58 PM
> To: Liu Dave-r63238; linuxppc-embedded@ozlabs.org
> Subject: RE: Exceptions during PCI initialization at u-boot
>=20
>=20
> Hi Dave
> Thanks for you comments.
>=20
> I tried clearing 'PCI No response' as follows :
> 				Unsigned int* EMR=3D( Unsigned
> int*)0xf0010888;
> 				Unsigned int* ESR=3D( Unsigned
> int*)0xf0010884;
> 		Before pci_hose_read_config_byte function I cleared the
> the 'PCI No response' bit.
> 				*EMR &=3D0xFFFFFFF7;
> 				*ESR |=3D0x00000008;
> Now it's getting reset and machine check exception coming all the time
> continuously and board is not booting up.
>=20
> I am clueless please advice what to do?
>=20
> Regards
> Prabhat
>=20
>=20
>=20
>=20
>=20
> =20
> -----Original Message-----
> From: Liu Dave-r63238 [mailto:DaveLiu@freescale.com]=20
> Sent: Tuesday, June 20, 2006 1:29 PM
> To: Prabhat_Singh; linuxppc-embedded@ozlabs.org
> Subject: RE: Exceptions during PCI initialization at u-boot
>=20
> Hi Prabhat,
>=20
> Did you clear the 'PCI No response' in the error mask register
> before you do PCI configuration read? If you didn't, machine check
> will arise when PCI scan unpopulated PCI slot.
>=20
> I notice that the MSR[12] is set, but the trap codes haven't
> detect that, what is your toolchain?
>=20
> Regards,
> -Dave
>=20
>=20
> -----Original Message-----
> Hi all
> I am getting two exceptions, that you will find in log, at the
> pci_hose_read_config_byte memory is crashing that's I found in
> System.map. after second exception its boots properly. I have no clue
> whats happening. And why I am not able to read Configuration space of
> pci.=20
> From where this exception is coming?
> Please help me out. What else I can check?
> =20
> =20
> VPN Router Board
> =20
> =20
> Vpn Router U-Boot 1.0.0 (Jun 19 2006 - 11:31:37)
> =20
> MPC8260 Reset Status: External Soft, External Hard
> =20
> MPC8260 Clock Configuration
>  - Bus-to-Core Mult 4x, VCO Div 2, 60x Bus Freq  25-75 , Core Freq
> 100-300
>  - dfbrg 0, corecnf 0x1a, busdf 3, cpmdf 1, plldf 0, pllmf 3
>  - vco_out  400000000, scc_clk  100000000, brg_clk  100000000
>  - cpu_clk  400000000, cpm_clk  200000000, bus_clk  100000000
> =20
> CPU:   8272 (HiP7 Rev 14, Mask A.0 1K50M) at 400 MHz
> Board: VPN8248
> DRAM:  32 MB
> total length of code       216456l   34d88value of sdrambase+ramsize
> 02000000=20
> Top of RAM usable for U-Boot at: 02000000
> Reserving 211k for U-Boot at: 01fcb000
> Reserving 128k for malloc() at: 01faae00
> Reserving 76 Bytes for Board Info at: 01faadb4
> Reserving 80 Bytes for Global Data at: 01faad64
> Stack Pointer at: 01faad48
> New Stack Pointer is: 01faad48
> value of ret 0=20
> Entering reloacte
> Now running in RAM - U-Boot at: 01fcb000
> POST memory POST memory PASSED
> PASSED
> FLASH: satyam : manufacturor ID =3D 200020satyam: id1=3D22df22df
> satyam: id2=3D0
> satyam: id3=3D80008
> 16 MB
> PCI Autoconfig: Memory region: [14000000-1bffffff]
> PCI Autoconfig: I/O region: [1c000000-1dffffff]
> Bus Fault @ 0x01fd2df8, fixup 0x00000000
> Machine check in kernel mode.
> Caused by (from msr): regs 01faab60 Unknown values in msr
> NIP: 01FD2DF8 XER: 00000000 LR: 01FD2DF0 REGS: 01faab60 TRAP:=20
> 0200 DAR:
> 01FE4DB8
> MSR: 00083002 EE: 0 PR: 0 FP: 1 ME: 1 IR/DR: 00
> =20
> GPR00: 01FD3A24 01FAAC50 FFFFFFFF 00000000 8000080C 00000002 01FAAC5E
> 01C5D1FB=20
> GPR08: 01FD0084 F0010904 00000000 00000000 00000020 FFFFFFFF 01FF8000
> 020CB000=20
> GPR16: FFFFFFFF FFFFFFFF FFFFFEFF FFFFFFFF 00000000 00000000 FFFFFFFF
> F0010D20=20
> GPR24: 00000000 00000000 01FFE39C 00000100 01FFE39C 01FAAD64 01FF8400
> 00000800=20
> Call backtrace:=20
> 01FD3A24 01FD3BF0 01FE8B84 01FE3E04 01FD3C64 01FCFE30 01FCE48C=20
> machine check
> VPN Router Board
> =20
> =20
> Vpn Router U-Boot 1.0.0 (Jun 19 2006 - 11:31:37)
> =20
> MPC8260 Reset Status:
> =20
> MPC8260 Clock Configuration
>  - Bus-to-Core Mult 4x, VCO Div 2, 60x Bus Freq  25-75 , Core Freq
> 100-300
>  - dfbrg 0, corecnf 0x1a, busdf 3, cpmdf 1, plldf 0, pllmf 3
>  - vco_out  400000000, scc_clk  100000000, brg_clk  100000000
>  - cpu_clk  400000000, cpm_clk  200000000, bus_clk  100000000
> =20
> CPU:   8272 (HiP7 Rev 14, Mask A.0 1K50M) at 400 MHz
> Board: VPN8248
> DRAM:  32 MB
> total length of code       216456l   34d88value of sdrambase+ramsize
> 02000000=20
> Top of RAM usable for U-Boot at: 02000000
> Reserving 211k for U-Boot at: 01fcb000
> Reserving 128k for malloc() at: 01faae00
> Reserving 76 Bytes for Board Info at: 01faadb4
> Reserving 80 Bytes for Global Data at: 01faad64
> Stack Pointer at: 01faad48
> New Stack Pointer is: 01faad48
> Entering reloacte
> Now running in RAM - U-Boot at: 01fcb000
> FLASH: satyam : manufacturor ID =3D 200020satyam: id1=3D22df22df
> PCI Autoconfig: Memory region: [14000000-1bffffff]
> PCI Autoconfig: I/O region: [1c000000-1dffffff]
> vendor=3D168c
> PCI Scan: Found Bus 0, Device 15, Function 0
> PCI Autoconfig: BAR 0, Mem, size=3D0x10000, address=3D0x14000000
> PCI Autoconfig: BAR 1, I/O, size=3D0xffffb000, No room in resource
> PCI:     00  0f  168c  0013  0200  00
> value of item =3D1
> In:    serial
> Out:   serial
> Err:   serial
> Chip Name  =3D 175a
> Chip Name  =3D 175c
> phy ID(0x02430d80) =3D 02430d80
> Level One/ICPLUS PHY Identied IC175C Revision 0
> Phy operating at 100 MBit/s in full-duplex mode
> Phy operating at 100 MBit/s in full-duplex mode
> U-Boot relocated to 01fcb000
> Net:   value of fec FCC2 ETHERNET=20
> FCC2 ETHERNET
> Hit any key to stop autoboot:  5 =08satyam=3D> =20
> =20
>=20
>=20
>=20
> DISCLAIMER:
> This email (including any attachments) is intended for the=20
> sole use of the intended recipient/s and may contain material=20
> that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any=20
> review or reliance by others or copying or distribution or=20
> forwarding of any or all of the contents in this message is=20
> STRICTLY PROHIBITED. If you are not the intended recipient,=20
> please contact the sender by email and delete all copies;=20
> your cooperation in this regard is appreciated.
>=20



DISCLAIMER:
This email (including any attachments) is intended for the sole use of =
the intended recipient/s and may contain material that is CONFIDENTIAL =
AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or =
copying or distribution or forwarding of any or all of the contents in =
this message is STRICTLY PROHIBITED. If you are not the intended =
recipient, please contact the sender by email and delete all copies; =
your cooperation in this regard is appreciated.

^ permalink raw reply

* Re: Lite5200 NFS mount issue
From: Kimmo Surakka @ 2006-06-20 12:03 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: Bjorn.Ostby

Bjorn.Ostby@combitech.se wrote:

> Hi all,
> I'm using u-boot 1.1.4 (CVS downloaded 2006-05-04) and ELDK 4.0. I've 
encountered 
> problems when trying to mount a NFS root filesystem when using the Lite 
MPC5200
> development board. The system mounts ok when the board is connected to 
office wide 
> network switches but if the board is connected directly through a small 
100/10Mbit switch
> to the NFS server, the mount halts as shown in the log below (The 100/10Mbit 
switch
> do work as other boards can mount their filesystem through these). Does 
anyone
> recognize this problem and know a suitable work-around/solution?

Try adding the ",tcp" to the kernel's "nfsroot=..." parameter, i.e. use 
commandline "root=/dev/nfs rw nfsroot=10.3.67.98:/opt/eldk_4_0/ppc_6xx,tcp 
ip=10.3.67.99:10.3.67.98:10.3.67.1:::eth0:off panic=1".

I recall having similar problems when connecting through an 100/10Mbit switch 
and in our case, the ",tcp" switch did the trick.

Cheers,

Kimmo Surakka

This message has been scanned by F-Secure Anti-Virus

###  OXFORD INSTRUMENTS   http://www.oxford-instruments.com/  ###

Unless stated above to be non-confidential, this E-mail and any
attachments are private and confidential and are for the addressee
only and may not be used, copied or disclosed save to the addressee.
If you have received this E-mail in error please notify us upon receipt
and delete it from your records. Internet communications are not secure
and Oxford Instruments is not responsible for their abuse by third
parties nor for any alteration or corruption in transmission.

^ permalink raw reply

* Re: Lite5200 NFS mount issue
From: Hans Thielemans @ 2006-06-20 12:52 UTC (permalink / raw)
  To: Björn Östby; +Cc: linuxppc-embedded
In-Reply-To: <BF8F9BE6CD17EB4B8C887AB03E6A9B0303F03C@CORPAPPL020.corp.saab.se>

Hi there,

I remember similar problems. It all had to do with full or half duplex 
ethernet.

Regards

Hans

On Tue, 20 Jun 2006, Björn Östby wrote:

> Hi all,
> I'm using u-boot 1.1.4 (CVS downloaded 2006-05-04) and ELDK 4.0. I've encountered 
> problems when trying to mount a NFS root filesystem when using the Lite MPC5200
> development board. The system mounts ok when the board is connected to office wide 
> network switches but if the board is connected directly through a small 100/10Mbit switch
> to the NFS server, the mount halts as shown in the log below (The 100/10Mbit switch
> do work as other boards can mount their filesystem through these). Does anyone
> recognize this problem and know a suitable work-around/solution?
> 
> =>run flash_nfs
>  ## Booting image at ff0a0000 ...
>    Image Name:   Linux-2.4.25
>    Created:      2006-06-16  13:11:56 UTC
>    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>    Data Size:    945550 Bytes = 923.4 kB
>    Load Address: 00000000
>    Entry Point:  00000000
>    Verifying Checksum ... OK
>    Uncompressing Kernel Image ... OK
> Memory BAT mapping: BAT2=64Mb, BAT3=0Mb, residual: 0Mb
> Linux version 2.4.25 (tord@toshiba) (gcc version 4.0.0 (DENX ELDK 4.0 4.0.0)) #1 fre jun 16 14:46:35 CEST 2006
> On node 0 totalpages: 16384
> zone(0): 16384 pages.
> zone(1): 0 pages.
> zone(2): 0 pages.
> Kernel command line: root=/dev/nfs rw nfsroot=10.3.67.98:/opt/eldk_4_0/ppc_6xx ip=10.3.67.99:10.3.67.98:10.3.67.1:::eth0:off panic=1
> Calibrating delay loop... 263.78 BogoMIPS
> Memory: 62080k available (1608k kernel code, 484k data, 80k init, 0k highmem)
> Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
> Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
> Mount cache hash table entries: 512 (order: 0, 4096 bytes)
> Buffer cache hash table entries: 4096 (order: 2, 16384 bytes)
> Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
> POSIX conformance testing by UNIFIX
> PCI: Probing PCI hardware
> Linux NET4.0 for Linux 2.4
> Based upon Swansea University Computer Society NET3.039
> Initializing RT netlink socket
> Starting kswapd
> Journalled Block Device driver loaded
> JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
> i2c-core.o: i2c core module version 2.6.1 (20010830)
> i2c-proc.o version 2.6.1 (20010830)
> pty: 256 Unix98 ptys configured
> ttyS0 on PSC1
> ttyS1 on PSC2
> ttyS2 on PSC3
> RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
> loop: loaded (max 8 devices)
> Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
> ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
> Port Config is: 0x11050004
> ipb=66MHz, set clock period to 15
> GPIO config: 11050004
> ATA invalid: 00800000
> ATA hostcnf: 03000000
> ATA pio1   : 100a0a00
> ATA pio2   : 02040600
> XLB Arb cnf: 0000a366
> mpc5xxx_ide: Setting up IDE interface ide0...
> ATA DMA task: 5
> Probing IDE interface ide0...
> SCSI subsystem driver Revision: 1.00
> Icecube-0: Found 1 x8 devices at 0x0 in 8-bit bank
> Icecube-0: Found 1 x8 devices at 0x800000 in 8-bit bank
>  Amd/Fujitsu Extended Query Table at 0x0040
> Icecube-0: CFI does not contain boot bank location. Assuming top.
> number of CFI chips: 2
> cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
> Icecube flash bank 0: Using static image partition definition
> Creating 5 MTD partitions on "Icecube-0":
> 0x00000000-0x00800000 : "Spare"
> 0x00800000-0x00900000 : "kernel"
> 0x00900000-0x00c00000 : "initrd"
> 0x00c00000-0x00f00000 : "jffs"
> 0x00f00000-0x01000000 : "Firmware"
> usb.c: registered new driver hub
> host/usb-ohci.c: USB OHCI at membase 0xf0001000, IRQ 44
> host/usb-ohci.c: usb-0, Built-In ohci
> usb.c: new USB bus registered, assigned bus number 1
> hub.c: USB hub found
> hub.c: 1 port detected
> bluetooth.c: USB Bluetooth support registered
> usb.c: registered new driver bluetty
> bluetooth.c: USB Bluetooth tty driver v0.13
> Initializing USB Mass Storage driver...
> usb.c: registered new driver usb-storage
> USB Mass Storage support registered.
> i2c-icecube.o: I2C module #2 installed
> NET4: Linux TCP/IP 1.0 for NET4.0
> IP Protocols: ICMP, UDP, TCP, IGMP
> IP: routing cache hash table of 512 buckets, 4Kbytes
> TCP: Hash tables configured (established 4096 bind 8192)
> eth0: Phy @ 0x0, type LXT971 (0x001378e2)
> IP-Config: Guessing netmask 255.0.0.0
> IP-Config: Complete:
>       device=eth0, addr=10.3.67.99, mask=255.0.0.0, gw=10.3.67.1,
>      host=10.3.67.99, domain=, nis-domain=(none),
>      bootserver=10.3.67.98, rootserver=10.3.67.98, rootpath=
> NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
> Looking up port of RPC 100003/2 on 10.3.67.98
> Looking up port of RPC 100005/1 on 10.3.67.98
> VFS: Mounted root (nfs filesystem).
> Freeing unused kernel memory: 80k init
> nfs: server 10.3.67.98 not responding, still trying
> nfs: server 10.3.67.98 OK
> nfs: server 10.3.67.98 not responding, still trying
> nfs: server 10.3.67.98 OK
> [time to this about 5 minutes]
> INIT: version 2.85 booting
> nfs: server 10.3.67.98 not responding, still trying
> nfs: server 10.3.67.98 OK
> nfs: server 10.3.67.98 not responding, still trying
> nfs: server 10.3.67.98 OK
> 
> Regards,
> Bjorn Ostby
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> 

^ permalink raw reply

* looking for L3CR value of Apple G4 QS 800MHz MP
From: Till Wimmer @ 2006-06-20 13:15 UTC (permalink / raw)
  To: linuxppc-dev

Hello,

does somebody own a Apple G4 Quicksilver with the original dual 800MHz 
processor board in it (2MB backside cache / processor)?
Could you please send me the L3CR value when the L3 cache is enabled?

Any help wold be much appreciated!

bg
Till

-- 
********************************************************
*        "Deutschland vor!" - Die WM Gegenhymne        *
*  http://www.zittrige-haende.com/download/antiwm.mp3  *
********************************************************

^ permalink raw reply

* Re: L3 cache on Apple dual processor (7450 r 2.1) question
From: Till Wimmer @ 2006-06-20 13:27 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev
In-Reply-To: <20060619143607.GB4845@pb15.lixom.net>

Olof Johansson wrote:

>On Mon, Jun 19, 2006 at 04:17:04PM +0200, Till Wimmer wrote:
>
>  
>
>>Now my questions are:
>>Is there anything else to do for getting the L3 cache working?
>>How can i check if the L3 is enabled? E.g. is there a benchmark program
>>which accounts for cache settings?
>>    
>>
>
>lmbench has testcases for memory latency testing.
>  
>
Thank you for the hint, i tested it and the results are deflating:
Most values are the same, but the communication bandwidths are worse 
with the L3 cache enabled? Therefore i think that my L3CR settings are 
wrong.

bg
Till


-- 
********************************************************
*        "Deutschland vor!" - Die WM Gegenhymne        *
*  http://www.zittrige-haende.com/download/antiwm.mp3  *
********************************************************

^ permalink raw reply

* Re: could linux support to configure the PLB-PCI bridge of PPC440 into adapter mode
From: Matthias Fuchs @ 2006-06-20 13:41 UTC (permalink / raw)
  To: hilichen2000; +Cc: linuxppc-embedded
In-Reply-To: <BAY110-F6CB7A492DE83E6E81F18DC3870@phx.gbl>

Hello chen,

that's how we do it on our boards (a couple of 405GP(r) based adapters).
We normally hide the top meg's of RAM so that it is not used by Linux.
We setup the PLB side of the bridge to point to this RAM so that it is
accessable from the PCI side.

Matthias
> hi Matthias:
>   thank for your reply.
>   according to information you provide, i should set the proper 
> parameter of register of PPC440GX in U-BOOT(I use u-boot as 
> bootloader),such as PAE,PHCE,PISE of SDR0_XCR and BAR etc.  during the 
> time of linux kernel booting, I turn off CONFIG_PCI , let linux kernel 
> don't initialize the PCI bus as host bridge and set PLB address in 
> kernel.  then after the linux system operated, the ppc440gx could act as 
> adapter mode. does my understanding correct?   i really appreciate your 
> help.
> 
> chen

^ permalink raw reply

* Re: Unable to handle kernel paging request in show_instructions
From: Anton Blanchard @ 2006-06-20 13:47 UTC (permalink / raw)
  To: David Wilder; +Cc: Linuxppc-dev
In-Reply-To: <4497445F.50700@us.ibm.com>


Hi David,

> The problem occures in show_instructions().  Show_instructions() takes 
> the NIP (D00000000002201) and subtracts some number so it points several 
> instructs before the failing instructions.  In this case the new value 
> is on a previous page and that page is not valid (it is not mapped).  
> When the new NIP is referenced we get a second fault.  
> 
> show_instructions tries to validate addresses by checking if it is the 
> kernel segment (0xc.....) or the first vmalloc segment (0xD.......).  
> But in this case the validation passes even though the address is 
> invalid.   Any ideas how to fix this?  Is there a easy way to validate 
> if a page is valid before accessing it?

Whats interesting is that bad_page_fault should have walked the
exception tables and recovered, considering we have a __get_user call in
show_instructions.

While we should really understand why this failed, I suspect we should
be tighter with our checking. It looks like __kernel_text_address()
does what we want. Untested patch below.

Anton


Use __kernel_text_address when validating instruction addresses in the
Oops code.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -342,13 +342,6 @@ #endif
 
 static int instructions_to_print = 16;
 
-#ifdef CONFIG_PPC64
-#define BAD_PC(pc)	((REGION_ID(pc) != KERNEL_REGION_ID) && \
-		         (REGION_ID(pc) != VMALLOC_REGION_ID))
-#else
-#define BAD_PC(pc)	((pc) < KERNELBASE)
-#endif
-
 static void show_instructions(struct pt_regs *regs)
 {
 	int i;
@@ -367,7 +360,8 @@ static void show_instructions(struct pt_
 		 * bad address because the pc *should* only be a
 		 * kernel address.
 		 */
-		if (BAD_PC(pc) || __get_user(instr, (unsigned int __user *)pc)) {
+		if (!__kernel_text_address(pc) ||
+		     __get_user(instr, (unsigned int __user *)pc)) {
 			printk("XXXXXXXX ");
 		} else {
 			if (regs->nip == pc)

^ permalink raw reply

* [PATCH 3/3] FS_ENET: phydev pointer may be dereferenced without NULL check
From: Vitaly Bordug @ 2006-06-20 14:58 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, linux-kernel, linuxppc-embedded
In-Reply-To: <20060620145825.24807.310.stgit@vitb.ru.mvista.com>


When interface is down, phy is "disconnected" from the bus and phydev is NULL.
But ethtool may try to get/set phy regs even at that time, which results in
NULL pointer dereference and OOPS hereby.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
---

 drivers/net/fs_enet/fs_enet-main.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index 302ecaa..e475e22 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -882,12 +882,16 @@ static void fs_get_regs(struct net_devic
 static int fs_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
 {
 	struct fs_enet_private *fep = netdev_priv(dev);
+	if (!fep->phydev)
+		return -EINVAL;
 	return phy_ethtool_gset(fep->phydev, cmd);
 }
 
 static int fs_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
 {
 	struct fs_enet_private *fep = netdev_priv(dev);
+	if (!fep->phydev)
+		return -EINVAL;
 	phy_ethtool_sset(fep->phydev, cmd);
 	return 0;
 }

^ permalink raw reply related

* [PATCH 1/3] PAL: Support of the fixed PHY
From: Vitaly Bordug @ 2006-06-20 14:58 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, linux-kernel, linuxppc-embedded


This makes it possible for HW PHY-less boards to utilize PAL goodies.
Generic routines to connect to fixed PHY are provided, as well as ability
to specify software callback that fills up link, speed, etc. information
into PHY descriptor (the latter feature not tested so far).

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
---

 drivers/net/phy/Kconfig      |   17 ++
 drivers/net/phy/fixed.c      |  385 ++++++++++++++++++++++++++++++++++++++++++
 drivers/net/phy/phy_device.c |   51 +++---
 include/linux/phy.h          |    1 
 4 files changed, 433 insertions(+), 21 deletions(-)

diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index cda3e53..425be84 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -51,5 +51,22 @@ config SMSC_PHY
 	---help---
 	  Currently supports the LAN83C185 PHY
 
+config FIXED_PHY
+	tristate "Drivers for PHY emulation on fixed speed/link"
+	depends on PHYLIB
+	---help---
+	  Adds the driver to PHY layer to cover the boards that do not have any PHY bound,
+	  but with the ability to manipulate with speed/link in software. The relavant MII
+	  speed/duplex parameters could be effectively handled in user-specified  fuction.
+	  Currently tested with mpc866ads.
+
+config FIXED_MII_10_FDX
+	bool "Emulation for 10M Fdx fixed PHY behavior"
+	depends on FIXED_PHY
+
+config FIXED_MII_100_FDX
+	bool "Emulation for 100M Fdx fixed PHY behavior"
+	depends on FIXED_PHY
+
 endmenu
 
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c
new file mode 100644
index 0000000..0360f65
--- /dev/null
+++ b/drivers/net/phy/fixed.c
@@ -0,0 +1,385 @@
+/*
+ * drivers/net/phy/fixed.c
+ *
+ * Driver for fixed PHYs, when transceiver is able to operate in one fixed mode.
+ *
+ * Author: Vitaly Bordug
+ *
+ * Copyright (c) 2006 MontaVista Software, 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.
+ *
+ */
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include <linux/unistd.h>
+#include <linux/slab.h>
+#include <linux/interrupt.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/skbuff.h>
+#include <linux/spinlock.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/mii.h>
+#include <linux/ethtool.h>
+#include <linux/phy.h>
+
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/uaccess.h>
+
+#define MII_REGS_NUM	7
+
+/*
+    The idea is to emulate normal phy behavior by responding with
+    pre-defined values to mii BMCR read, so that read_status hook could
+    take all the needed info.
+*/
+
+struct fixed_phy_status {
+	u8 	link;
+	u16	speed;
+	u8 	duplex;
+};
+
+/*-----------------------------------------------------------------------------
+ *  Private information hoder for mii_bus
+ *-----------------------------------------------------------------------------*/
+struct fixed_info {
+	u16 *regs;
+	u8 regs_num;
+	struct fixed_phy_status phy_status;
+	struct phy_device *phydev; /* pointer to the container */
+	/* link & speed cb */
+	int(*link_update)(struct net_device*, struct fixed_phy_status*);
+
+};
+
+/*
+    This is made global to free all the allocations on _exit call.
+    Looks a bit odd, seems the only way.
+*/
+static struct fixed_info *fixed_ptr;
+
+/*-----------------------------------------------------------------------------
+ *  If something weird is required to be done with link/speed,
+ * network driver is able to assign a function to implement this.
+ * May be useful for PHY's that need to be software-driven.
+ *-----------------------------------------------------------------------------*/
+int fixed_mdio_set_link_update(struct phy_device* phydev,
+		int(*link_update)(struct net_device*, struct fixed_phy_status*))
+{
+	struct fixed_info *fixed;
+
+	if(link_update == NULL)
+		return -EINVAL;
+
+	if(phydev) {
+		if(phydev->bus)	{
+			fixed = phydev->bus->priv;
+			fixed->link_update = link_update;
+			return 0;
+		}
+	}
+	return -EINVAL;
+}
+EXPORT_SYMBOL(fixed_mdio_set_link_update);
+
+/*-----------------------------------------------------------------------------
+ *  This is used for updating internal mii regs from the status
+ *-----------------------------------------------------------------------------*/
+static int fixed_mdio_update_regs(struct fixed_info *fixed)
+{
+	u16 *regs = fixed->regs;
+	u16 bmsr = 0;
+	u16 bmcr = 0;
+
+	if(!regs) {
+		printk(KERN_ERR "%s: regs not set up", __FUNCTION__);
+		return -1;
+	}
+
+	if(fixed->phy_status.link)
+		bmsr |= BMSR_LSTATUS;
+
+	if(fixed->phy_status.duplex) {
+		bmcr |= BMCR_FULLDPLX;
+
+		switch ( fixed->phy_status.speed ) {
+		case 100:
+			bmsr |= BMSR_100FULL;
+			bmcr |= BMCR_SPEED100;
+		break;
+
+		case 10:
+			bmsr |= BMSR_10FULL;
+		break;
+		}
+	} else {
+		switch ( fixed->phy_status.speed ) {
+		case 100:
+			bmsr |= BMSR_100HALF;
+			bmcr |= BMCR_SPEED100;
+		break;
+
+		case 10:
+			bmsr |= BMSR_100HALF;
+		break;
+		}
+	}
+
+	regs[MII_BMCR] =  bmcr;
+	regs[MII_BMSR] =  bmsr | 0x800; /*we are always capable of 10 hdx*/
+
+	return 0;
+}
+
+
+static int fixed_mii_read(struct mii_bus *bus, int phy_id, int location)
+{
+	struct fixed_info *fixed = bus->priv;
+
+	/* if user has registered link update callback, use it */
+	if(fixed->phydev)
+		if(fixed->phydev->attached_dev) {
+			if(fixed->link_update) {
+				fixed->link_update(fixed->phydev->attached_dev,
+						&fixed->phy_status);
+				fixed_mdio_update_regs(fixed);
+			}
+	}
+
+	if ((unsigned int)location >= fixed->regs_num)
+		return -1;
+	return fixed->regs[location];
+}
+
+static int fixed_mii_write(struct mii_bus *bus, int phy_id, int location, u16 val)
+{
+	/* do nothing for now*/
+	return 0;
+}
+
+static int fixed_mii_reset(struct mii_bus *bus)
+{
+	/*nothing here - no way/need to reset it*/
+	return 0;
+}
+
+
+static int fixed_config_aneg(struct phy_device *phydev)
+{
+	/* :TODO:03/13/2006 09:45:37 PM::
+	 The full autoneg funcionality can be emulated,
+	 but no need to have anything here for now
+	 */
+	return 0;
+}
+
+
+
+/*-----------------------------------------------------------------------------
+ * the manual bind will do the magic - with phy_id_mask == 0
+ * match will never return true...
+ *-----------------------------------------------------------------------------*/
+static struct phy_driver fixed_mdio_driver = {
+	.name		= "Fixed PHY",
+	.features	= PHY_BASIC_FEATURES,
+	.config_aneg	= fixed_config_aneg,
+	.read_status	= genphy_read_status,
+	.driver 	= { .owner = THIS_MODULE,},
+};
+
+
+
+/*-----------------------------------------------------------------------------
+ *  This func is used to create all the necessary stuff, bind
+ * the fixed phy driver and register all it on the mdio_bus_type.
+ * speed is either 10 or 100, duplex is boolean.
+ * number is used to create multiple fixed PHYs, so that several devices can
+ * utilize them simultaneously.
+ *-----------------------------------------------------------------------------*/
+static int fixed_mdio_register_device(int number, int speed, int duplex)
+{
+	struct mii_bus *new_bus;
+	struct fixed_info *fixed;
+	struct phy_device *phydev;
+	int err = 0;
+
+	struct device* dev = kzalloc(sizeof(struct device), GFP_KERNEL);
+
+	if (NULL == dev)
+		return -EINVAL;
+
+	new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL);
+
+	if (NULL == new_bus) {
+		kfree(dev);
+		return -ENOMEM;
+	}
+	fixed = fixed_ptr = kzalloc(sizeof(struct fixed_info), GFP_KERNEL);
+
+	if (NULL == fixed) {
+		kfree(dev);
+		kfree(new_bus);
+		return -ENOMEM;
+	}
+
+	fixed->regs = kzalloc(MII_REGS_NUM*sizeof(int), GFP_KERNEL);
+
+	if (NULL == fixed->regs) {
+		kfree(dev);
+		kfree(new_bus);
+		kfree (fixed);
+		return -ENOMEM;
+	}
+
+	fixed->regs_num = MII_REGS_NUM;
+	fixed->phy_status.speed = speed;
+	fixed->phy_status.duplex = duplex;
+	fixed->phy_status.link = 1;
+
+	new_bus->name = "Fixed MII Bus",
+	new_bus->read = &fixed_mii_read,
+	new_bus->write = &fixed_mii_write,
+	new_bus->reset = &fixed_mii_reset,
+
+	/*set up workspace*/
+	fixed_mdio_update_regs(fixed);
+	new_bus->priv = fixed;
+
+	new_bus->dev = dev;
+	dev_set_drvdata(dev, new_bus);
+
+	/* create phy_device and register it on the mdio bus */
+	phydev = phy_device_create(new_bus, 0, 0);
+
+	/*
+	 Put the phydev pointer into the fixed pack so that bus read/write code could be able
+	 to access for instance attached netdev. Well it doesn't have  to do so, only in case
+	 of utilizing user-specified link-update...
+	 */
+	fixed->phydev = phydev;
+
+	if (IS_ERR(phydev)) {
+		err = PTR_ERR(-ENOMEM);
+		goto bus_register_fail;
+	}
+
+	phydev->irq = -1;
+	phydev->dev.bus = &mdio_bus_type;
+
+	if(number)
+		snprintf(phydev->dev.bus_id, BUS_ID_SIZE,
+				"fixed_%d@%d:%d", number, speed, duplex);
+	else
+		snprintf(phydev->dev.bus_id, BUS_ID_SIZE,
+				"fixed@%d:%d", speed, duplex);
+	phydev->bus = new_bus;
+
+	err = device_register(&phydev->dev);
+	if(err) {
+		printk(KERN_ERR "Phy %s failed to register\n",
+				phydev->dev.bus_id);
+		goto bus_register_fail;
+	}
+
+	/*
+	   the mdio bus has phy_id match... In order not to do it
+	   artificially, we are binding the driver here by hand;
+	   it will be the same
+	   for all the fixed phys anyway.
+	 */
+	down_write(&phydev->dev.bus->subsys.rwsem);
+
+	phydev->dev.driver = &fixed_mdio_driver.driver;
+
+	err = phydev->dev.driver->probe(&phydev->dev);
+	if(err < 0) {
+		printk(KERN_ERR "Phy %s: problems with fixed driver\n",
+				phydev->dev.bus_id);
+		up_write(&phydev->dev.bus->subsys.rwsem);
+		goto bus_register_fail;
+	}
+
+	device_bind_driver(&phydev->dev);
+	up_write(&phydev->dev.bus->subsys.rwsem);
+
+	return 0;
+
+bus_register_fail:
+	kfree(dev);
+	kfree (fixed);
+	kfree(new_bus);
+
+	return err;
+}
+
+
+MODULE_DESCRIPTION("Fixed PHY device & driver for PAL");
+MODULE_AUTHOR("Vitaly Bordug");
+MODULE_LICENSE("GPL");
+
+static int __init fixed_init(void)
+{
+	int ret;
+	int duplex = 0;
+
+	/* register on the bus... Not expected to be matched with anything there... */
+	phy_driver_register(&fixed_mdio_driver);
+
+	/* So let the fun begin...
+	   We will create several mdio devices here, and will bound the upper
+	   driver to them.
+
+	   Then the external software can lookup the phy bus by searching
+	   fixed@speed:duplex, e.g. fixed@100:1, to be connected to the
+	   virtual 100M Fdx phy.
+
+	   In case several virtual PHYs required, the bus_id will be in form
+	   fixed_<num>@<speed>:<duplex>, which make it able even to define
+	   driver-specific link control callback, if for instance PHY is completely
+	   SW-driven.
+
+	*/
+
+#ifdef CONFIG_FIXED_MII_DUPLEX
+	duplex = 1;
+#endif
+
+#ifdef CONFIG_FIXED_MII_100_FDX
+	fixed_mdio_register_device(0, 100, 1);
+#endif
+
+#ifdef CONFIX_FIXED_MII_10_FDX
+	fixed_mdio_register_device(0, 10, 1);
+#endif
+	return 0;
+}
+
+static void __exit fixed_exit(void)
+{
+	struct fixed_info *fixed = fixed_ptr;
+
+	phy_driver_unregister(&fixed_mdio_driver);
+	if (fixed) {
+		if (fixed->phydev) {
+			kfree(fixed->phydev->bus);
+			kfree(fixed->phydev);
+		}
+		kfree(fixed->regs);
+		kfree(fixed);
+	}
+}
+
+module_init(fixed_init);
+module_exit(fixed_exit);
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 7da0e3d..dfdafe9 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -46,6 +46,35 @@ static struct phy_driver genphy_driver;
 extern int mdio_bus_init(void);
 extern void mdio_bus_exit(void);
 
+struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id)
+{
+	struct phy_device *dev;
+	/* We allocate the device, and initialize the
+	 * default values */
+	dev = kcalloc(1, sizeof(*dev), GFP_KERNEL);
+
+	if (NULL == dev)
+		return PTR_ERR(-ENOMEM);
+
+	dev->speed = 0;
+	dev->duplex = -1;
+	dev->pause = dev->asym_pause = 0;
+	dev->link = 1;
+
+	dev->autoneg = AUTONEG_ENABLE;
+
+	dev->addr = addr;
+	dev->phy_id = phy_id;
+	dev->bus = bus;
+
+	dev->state = PHY_DOWN;
+
+	spin_lock_init(&dev->lock);
+
+	return dev;
+}
+EXPORT_SYMBOL(phy_device_create);
+
 /* get_phy_device
  *
  * description: Reads the ID registers of the PHY at addr on the
@@ -79,27 +108,7 @@ struct phy_device * get_phy_device(struc
 	if (0xffffffff == phy_id)
 		return NULL;
 
-	/* Otherwise, we allocate the device, and initialize the
-	 * default values */
-	dev = kcalloc(1, sizeof(*dev), GFP_KERNEL);
-
-	if (NULL == dev)
-		return ERR_PTR(-ENOMEM);
-
-	dev->speed = 0;
-	dev->duplex = -1;
-	dev->pause = dev->asym_pause = 0;
-	dev->link = 1;
-
-	dev->autoneg = AUTONEG_ENABLE;
-
-	dev->addr = addr;
-	dev->phy_id = phy_id;
-	dev->bus = bus;
-
-	dev->state = PHY_DOWN;
-
-	spin_lock_init(&dev->lock);
+	dev = phy_device_create(bus, addr, phy_id);
 
 	return dev;
 }
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 331521a..9447a57 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -378,6 +378,7 @@ int phy_mii_ioctl(struct phy_device *phy
 		struct mii_ioctl_data *mii_data, int cmd);
 int phy_start_interrupts(struct phy_device *phydev);
 void phy_print_status(struct phy_device *phydev);
+struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id);
 
 extern struct bus_type mdio_bus_type;
 #endif /* __PHY_H */

^ permalink raw reply related


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