Re: JTAG debugger for MPC82xx/MPC83xx

2006-09-19 Thread Greg Weeks
Steven Hein wrote:
> I've been researching the available JTAG debuggers that
> support the MPC82xx/MPC83xx family, and I've found these
> choices so far:
>
> * Abatron BDI-2000
> * Green Hills Probe
> * Freescale's PowerTAP PRO for PowerPC
> * Lauterbach TRACE32-ICD
> * WindRiver ICE
> * Embedded Toolsmiths Guardian-SE (BUT...this is no longer
>   being sold, according to an email response I received
>   from Embedded Toolsmiths)
>
> We will definitely want one with a network connection,
> and will will run the debugger software from a Linux host.
> Ideally, we would also like one that provides a library
> to allow us to write apps to function the debugger.
>
> Can anyone comment on what JTAG debugger they are using,
> and how have your experiences been?   Are there any other
> good options besides the ones mentioned above.
> I'd appreciate any input.
>   
The only one I've used for power pc is the BDI. I've not tried it on the 
83xx yet, but others here have. It worked well with the 82xx. I mostly 
used gdb to talk to it over ethernet.

Greg Weeks
___
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded


Unable to boot a kernel on a MPC8560

2006-05-16 Thread Greg Weeks
CORVELLER Mickael wrote:
> Hello,
>
> first of all, I am a newbie in embedded linux systems.
>
> I'm trying to boot a board based on a MPC8560 (with a e500 core).
>
> I'm using a RS232 console via a debug module connected to the SCC1 port of 
> the 8560.
>
> The boot loader is U-Boot.
>
>   
What version of u-boot do you have? At some point I had a u-boot with 
the value of CCSRBAR set different from what the current kernels use. It 
caused a failure like this.

Greg Weeks





floating point operation of ppc

2005-11-11 Thread Greg Weeks
Eugene Surovegin wrote:

>On Fri, Nov 11, 2005 at 07:51:31AM -0500, Greg Weeks wrote:
>  
>
>>lily wrote:
>>
>>
>>
>>>hi,all:
>>>i build an embedded linux on powerpc 405ep,i need execute floating
>>>point operation,and i enable "math emulate" option in kernel, i run a
>>>while(1)loop ,in the loop there was floating point expression ,after
>>>test ,i found the while (1) exit because of the floating point
>>>computation,that is the floating point can't execute on ppc
>>>stablely.Is there someone meets the same problems ,please give me some
>>>suggestion,thanks!!!
>>>  
>>>
>>The 405ep has some errata on floating point use. 
>>
>>
>
>Are you sure it was 405ep? There is no floating point errata for this 
>chip due to the simple reason, it doesn't support floating point in 
>hardware at all.
>
>You probably confusing it with 440ep.
>
>  
>
You're right. It was the 440ep. The 405ep BSP is using the 4xx 
toolchain. I don't think I've ever tried the math emulator on a 405.


Greg Weeks



floating point operation of ppc

2005-11-11 Thread Greg Weeks
lily wrote:

> hi,all:
> i build an embedded linux on powerpc 405ep,i need execute floating
> point operation,and i enable "math emulate" option in kernel, i run a
> while(1)loop ,in the loop there was floating point expression ,after
> test ,i found the while (1) exit because of the floating point
> computation,that is the floating point can't execute on ppc
> stablely.Is there someone meets the same problems ,please give me some
> suggestion,thanks!!!

The 405ep has some errata on floating point use. I didn't work on the
processor so I don't know exactly what they are, but Timesys has a
toolchain just for the 405ep to work around the problem. The other
workaround we've used is much slower and it involved disabling the
hardware floating point unit in the head.s for the 405ep and turning on
the emulator. Just turning on the emulator is insufficient. The Timesys
toolchain isn't the only one out there specifically for the 405ep.

Greg Weeks



Linux Kernel Issue: MPC8540 Errata (CPU29)

2005-04-28 Thread Greg Weeks
Chiradeep Vittal wrote:

>It turns out to be a compiler issue.
>We're using gcc 3.4.3 with optimization level -Os. The following program will 
>generate the illegal instruction with -Os but not with -O2
>   int main (int argc, char** argv)
>   {   
> int seq[] = {0, 1, 2};
> return 0;
>   }
>The reason is that the compiler generates code with the stswi instruction 
>which is not supported by the e500. Here's our compiler configuration:
>Configured with: 
>/home/steve/perforce/sw/opt/crosstool/build/powerpc-8540-linux-gnu/gcc-3.4.3-glibc-2.3.2/gcc-3.4.3/configure
> --target=powerpc-8540-linux-gnu --host=i686-host_pc-linux-gnu 
>--prefix=/home/steve/perforce/sw/opt/cross-compile/powerpc-8540-linux-gnu/gcc-3.4.3-glibc-2.3.2
> --with-cpu=8540 --enable-cxx-flags=-mcpu=8540 
>--with-headers=/home/steve/perforce/sw/opt/cross-compile/powerpc-8540-linux-gnu/gcc-3.4.3-glibc-2.3.2/powerpc-8540-linux-gnu/include
> 
>--with-local-prefix=/home/steve/perforce/sw/opt/cross-compile/powerpc-8540-linux-gnu/gcc-3.4.3-glibc-2.3.2/powerpc-8540-linux-gnu
> --disable-nls --enable-threads=posix --enable-symvers=gnu 
>--enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 
>--enable-long-long
>
>Any recommendations?
>  
>
Here's the patch we use to get GCC to stop generating the invalid 
intructions.

Greg Weeks


--- gcc-orig/gcc/config/rs6000/rs6000.h2003-12-08 20:57:45.0 
-0500
+++ gcc-new/gcc/config/rs6000/rs6000.h2004-09-15 14:23:36.680978222 
-0400
@@ -550,10 +550,10 @@
 #define TARGET_LONG_DOUBLE_128 (rs6000_long_double_type_size == 128)
 #define TARGET_ALTIVEC_ABI rs6000_altivec_abi
 #define TARGET_ALTIVEC_VRSAVE rs6000_altivec_vrsave
+#define TARGET_E500 (rs6000_cpu == PROCESSOR_PPC8540)
 
 #define TARGET_SPE_ABI 0
 #define TARGET_SPE 0
-#define TARGET_E500 0
 #define TARGET_ISEL 0
 #define TARGET_FPRS 1
 




[patch] fix unitilized spinlock in cpm driver when used as console

2005-03-16 Thread Greg Weeks
Kumar Gala wrote:

> This may already be resolved by this patch which is in the latest bk 
> tree.
>
> http://ozlabs.org/ppc32-patches/patch.pl?id=280
>
> - kumar
>
> On Mar 16, 2005, at 10:44 AM, Greg Weeks wrote:
>
>> Fix unitilized spinlock in the cpm scc driver when used as console.
>>
>> Signed-off-by: Greg Weeks 
>>
>>  
>
>
Yes that fixes it.

Greg Weeks



[patch] fix unitilized spinlock in cpm driver when used as console

2005-03-16 Thread Greg Weeks
Fix unitilized spinlock in the cpm scc driver when used as console.

Signed-off-by: Greg Weeks 


-- next part --
A non-text attachment was scrubbed...
Name: cpm.console.spinlock.patch
Type: text/x-patch
Size: 316 bytes
Desc: not available
Url : 
http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20050316/09762402/attachment.bin
 


[patch] fix gianfar unitilized spinlock.

2005-03-16 Thread Greg Weeks
Fix unitilized spinlock in the gianfar tsec etherenet driver.

Signed-off-by: Greg Weeks 

-- next part --
A non-text attachment was scrubbed...
Name: gianfar.spinlock.patch
Type: text/x-patch
Size: 287 bytes
Desc: not available
Url : 
http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20050316/1f03a6aa/attachment.bin
 


[patch] mpc8560ads mtd platform

2005-03-15 Thread Greg Weeks
Add an MTD partitions in the platform code for the mpc8560ads board.

Signed-off-by: Greg Weeks 


-- next part --
A non-text attachment was scrubbed...
Name: mpc8560ads.mtd.paltform.patch
Type: text/x-patch
Size: 4168 bytes
Desc: not available
Url : 
http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20050315/6f458064/attachment.bin
 


[patch] mpc8560ads mtd map

2005-03-15 Thread Greg Weeks
Mark A. Greer wrote:

> Greg Weeks wrote:
>
>>
>> Add an MTD map for the flash on the mpc8560ads board.
>>
>> Signed-off-by: Greg Weeks  
>
>
>
> 
>
> Most of the code in this patch can be eliminated if you set up the 
> table in your platform file and use the proper CONFIG_MTD_xxx options.
>
> Mark
>
Yep, I pulled this off our 2.6.4 kernel tree. I think it should be in 
the platform code, but I've not tried moving it yet. That should get rid 
of the map file and the Kconfig changes to support it.

Greg Weeks



[patch] mpc8560ads mtd map

2005-03-15 Thread Greg Weeks

Add an MTD map for the flash on the mpc8560ads board.

Signed-off-by: Greg Weeks 


--- /dev/null
+++ ppc-mpc8560ads/drivers/mtd/maps/mpc85xxads.c
@@ -0,0 +1,104 @@
+/*
+ * $Id$
+ *
+ * Mapping for Motorola MPC85xxADS flash
+ *
+ * Greg Weeks 
+ *
+ * Copyright 2004 Timesys Corp.
+ *
+ * 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 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static struct mtd_info *flash;
+
+static struct map_info mpc85xxads_map = {
+   .name = "mpc85xxads-flash",
+   .size = MPC85XXADS_FLASH_SIZE,
+   .bankwidth =4,
+};
+
+static struct mtd_partition mpc85xxads_partitions[] = {
+   {
+   .name =   "Linux JFFS2 Filesystem",
+   .offset = 0x0,
+   .size =   0x0080,
+   },
+   {
+   .name =   "Linux Kernel",
+   .offset = 0x0080,
+   .size =   0x0020,
+   },
+   {
+   .name =   "Linux INITRD",
+   .offset = 0x00a0,
+   .size =   0x0058,
+   },
+   {
+   .name   = "Bootloader",
+   .offset = 0x00f8,
+   .size   = 0x0008,
+   }
+};
+
+int __init mpc85xxads_map_init(void)
+{
+   unsigned long mpc85xxads_flash_base = MPC85XXADS_FLASH_BASE;
+
+   mpc85xxads_map.phys = mpc85xxads_flash_base;
+   mpc85xxads_map.virt = (unsigned 
long)ioremap(mpc85xxads_flash_base, mpc85xxads_map.size);
+
+   if (!mpc85xxads_map.virt) {
+   printk("Failed to ioremap flash\n");
+   return -EIO;
+   }
+
+   simple_map_init(&mpc85xxads_map);
+
+   flash = do_map_probe("cfi_probe", &mpc85xxads_map);
+   if (flash) {
+   flash->owner = THIS_MODULE;
+   add_mtd_partitions(flash, mpc85xxads_partitions,
+   ARRAY_SIZE(mpc85xxads_partitions));
+   } else {
+   iounmap((void *)mpc85xxads_map.virt);
+   printk("map probe failed for flash\n");
+   return -ENXIO;
+   }
+
+   return 0;
+}
+
+static void __exit mpc85xxads_map_exit(void)
+{
+   if (flash) {
+   del_mtd_partitions(flash);
+   map_destroy(flash);
+   }
+
+   if (mpc85xxads_map.virt) {
+   iounmap((void *)mpc85xxads_map.virt);
+   mpc85xxads_map.virt = 0;
+   }
+}
+
+module_init(mpc85xxads_map_init);
+module_exit(mpc85xxads_map_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Greg Weeks ");
+MODULE_DESCRIPTION("MTD map and partitions for Motorola MPC85xxADS");



--- ppc-mpc8560ads/arch/ppc/platforms/85xx/mpc85xx_ads_common.h-orig
+++ ppc-mpc8560ads/arch/ppc/platforms/85xx/mpc85xx_ads_common.h



@@ -47,4 +47,7 @@



 #define MPC85XX_PCI1_IO_SIZE   0x0100



+#define MPC85XXADS_FLASH_BASE 0xff00
+#define MPC85XXADS_FLASH_SIZE 0x0100
+
 #endif /* __MACH_MPC85XX_ADS_H__ */



--- ppc-mpc8560ads/drivers/mtd/maps/Kconfig-orig
+++ ppc-mpc8560ads/drivers/mtd/maps/Kconfig



@@ -667,5 +667,12 @@
help
  This enables access to the flash chip on the Sharp SL Series 
of PDAs.



+config MTD_MPC85XXADS
+   tristate "Flash device mapped on the MPC85XXADS board"
+   depends on MTD_CFI && MTD_CFI_INTELEXT && MTD_PARTITIONS && 
MPC8560_ADS
+   help
+ This enables access to the Flash on the MPC85xxADS boards.
+ If you have such a board, say 'Y'.
+
 endmenu






--- ppc-mpc8560ads/drivers/mtd/maps/Makefile-orig
+++ ppc-mpc8560ads/drivers/mtd/maps/Makefile
  

mtd maps

2005-03-15 Thread Greg Weeks
Are mtd maps still in drivers/mtd/maps or has that all moved to the 
platform code? I have an mtd map for the mpc8560ads but it's in mtd/maps.

Greg W



mpc8560ads PCI bus

2005-03-14 Thread Greg Weeks
Switch bank SW1 switch #4 was on which stops config accesses from making 
it on the bus. It works fine now.

Greg Weeks

Clemens Koller wrote:

> Hello, Greg,
>
> I am working on an mpc8540_ads-like board and recently, I ran into data
> corruption problems with a Silicon Motion SM501 (Rev AA) PCI graphics 
> card. From my current point of view it seems that Kernel 2.6.11 PCI 
> works well. I am about to check the hardware and signal integrity.
>
> BTW: I am working with a Promise Ultra-TX133 IDE controller (PDC20269)
> which is fine with 66MHz PCICLK.
>
> Greets,
>
> Clemens
>
>
>> Has anyone else tried to get the PCI bus working on the mpc8560ads 
>> board at 2.6.11? The card enumerates, but the I/O resource regions 
>> aren't getting set up.
>>
>> -bash-2.05b# lspci -vv
>> 00:03.0 Unknown mass storage controller: Silicon Image, Inc. 
>> (formerly CMD Technology Inc) PCI0680 Ultra ATA-133 Host Controller 
>> (rev 02)
>>Subsystem: Silicon Image, Inc. (formerly CMD Technology Inc) 
>> PCI0680 Ultra ATA-133 Host Controller
>>Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- 
>> ParErr- Stepping- SERR- FastB2B-
>>Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium 
>> >TAbort- SERR- >Interrupt: pin A routed to IRQ 100
>>Region 0: I/O ports at  [disabled]
>>Region 1: I/O ports at  [disabled]
>>Region 2: I/O ports at  [disabled]
>>Region 3: I/O ports at  [disabled]
>>Region 4: I/O ports at  [disabled]
>>Capabilities: [60] Power Management version 2
>>Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA 
>> PME(D0-,D1-,D2-,D3hot-,D3cold-)
>>Status: D0 PME-Enable- DSel=0 DScale=2 PME-
>>
>> Greg Weeks
>> ___
>> Linuxppc-embedded mailing list
>> Linuxppc-embedded at ozlabs.org
>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>>
>




mpc8560ads PCI bus

2005-03-14 Thread Greg Weeks
Has anyone else tried to get the PCI bus working on the mpc8560ads board 
at 2.6.11? The card enumerates, but the I/O resource regions aren't 
getting set up.

-bash-2.05b# lspci -vv
00:03.0 Unknown mass storage controller: Silicon Image, Inc. (formerly 
CMD Technology Inc) PCI0680 Ultra ATA-133 Host Controller (rev 02)
Subsystem: Silicon Image, Inc. (formerly CMD Technology Inc) 
PCI0680 Ultra ATA-133 Host Controller
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- 
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
SERR-  [disabled]
Region 1: I/O ports at  [disabled]
Region 2: I/O ports at  [disabled]
Region 3: I/O ports at  [disabled]
Region 4: I/O ports at  [disabled]
Capabilities: [60] Power Management version 2
Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA 
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=2 PME-
 
Greg Weeks