Re: [PATCH V2] MPC52XX: Don't touch pipelining for MPC5200B

2008-08-27 Thread roger blofeld


 From: Scott Wood [EMAIL PROTECTED]
 To: roger blofeld [EMAIL PROTECTED]
 Cc: Wolfram Sang [EMAIL PROTECTED]; Arnd Bergmann [EMAIL PROTECTED]; 
 linuxppc-embedded@ozlabs.org
 Sent: Monday, August 25, 2008 10:36:48 AM
 Subject: Re: [PATCH V2] MPC52XX: Don't touch pipelining for MPC5200B
 
 roger blofeld wrote:
  Hi
   Since this bug is ATA specific, shouldn't this code be conditioned by 
 CONFIG_IDE ?
 
 And then what happens if IDE is built as a module?
 
 -Scott

Good point. Still it seems unfortunate to slow everything down when only ATA 
requires the fix. I'll just continue to disable this code on my board which has 
no IDE.

Thanks
-rb



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


Re: [PATCH V2] MPC52XX: Don't touch pipelining for MPC5200B

2008-08-22 Thread roger blofeld
- Original Message 

 From: Wolfram Sang [EMAIL PROTECTED]
 To: Arnd Bergmann [EMAIL PROTECTED]
 Cc: linuxppc-embedded@ozlabs.org
 Sent: Monday, August 18, 2008 9:18:31 AM
 Subject: [PATCH V2] MPC52XX: Don't touch pipelining for MPC5200B
 
 
 MPC5200 needs to have pipelining disabled for ATA to work. MPC5200B does not.
 So, for the latter, don't touch the original setting from the bootloader.
 
 Signed-off-by: Wolfram Sang 
 ---
 Hello Arnd,
 
 On Mon, Aug 18, 2008 at 12:49:36PM +0200, Arnd Bergmann wrote:
 
  Please make this a run-time conditional instead of compile-time.
 Like this?
 
 ..
 
 This needs some testing IMHO. Most configs in U-Boot tend to enable 
 pipelining,
 which then used to be disabled by the kernel. So, on the one hand, this change
 would enable what is originally wanted; on the other hand, systems may run
 under a new configuration and need to be checked for regressions. Especially 
 as
 there can be puzzling effects, like for one setup here, FEC only works 
 reliably
 with pipelining enabled.
 
 arch/powerpc/platforms/52xx/mpc52xx_common.c |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
 
 Index: arch/powerpc/platforms/52xx/mpc52xx_common.c
 ===
 --- arch/powerpc/platforms/52xx/mpc52xx_common.c.orig
 +++ arch/powerpc/platforms/52xx/mpc52xx_common.c
 @@ -99,11 +99,14 @@
 out_be32(xlb-master_pri_enable, 0xff);
 out_be32(xlb-master_priority, 0x);
 
 -/* Disable XLB pipelining
 +/*
 + * Disable XLB pipelining
  * (cfr errate 292. We could do this only just before ATA PIO
  *  transaction and re-enable it afterwards ...)
 + * Not needed on MPC5200B.
  */
 -out_be32(xlb-config, in_be32(xlb-config) | MPC52xx_XLB_CFG_PLDIS);
 +if ((mfspr(SPRN_SVR)  MPC5200_SVR_MASK) == MPC5200_SVR)
 +out_be32(xlb-config, in_be32(xlb-config) | 
 MPC52xx_XLB_CFG_PLDIS);
 
 iounmap(xlb);
 }
 
 -- 
   Dipl.-Ing. Wolfram Sang | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry


Hi
 Since this bug is ATA specific, shouldn't this code be conditioned by 
CONFIG_IDE ?

Thanks
-roger


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


Re: Help with MPC5200 + Bestcomm + Local Plus Bus.... same problem [ifm ScanMail: oK]

2007-12-07 Thread roger blofeld
 Original Message 

From: [EMAIL PROTECTED] [EMAIL PROTECTED]

To: linuxppc-embedded@ozlabs.org

Sent: Friday, December 7, 2007 4:58:56 AM

Subject: Help with MPC5200 + Bestcomm + Local Plus Bus same problem [ifm 
ScanMail: oK] 



  

Hello Roger, 

 

i have read your message. I have now the same problem. I use a CPLD on the 
Local Plus Bus. The CPLD generates interrupts for the MPC5200B processor. 
Because of the quick signals, i want to use the Bestcomm unit, to push the Data 
( 3 x 16 bit register) directly into the memory. I use the same Kernel. It 
would be nice, if you could help me, to program a linux driver for that. Or 
maybe you have any examples. So looking forward for you reply. Thanks a lot for 
your time. 

 

best regards Jan Baldauf


--




Jan,

 I never did get my FPGA driver working with the bestcomm unit. I ended up 
doing a half-baked version where I would program the lpc to transfer the data 
into the FIFO and generate an interrupt when it finished. I could then copy the 
data quickly from the FIFO to memory (The FIFO interface is wider and faster 
than my FPGA, so I do reduce processor loading somewhat over directly reading 
the FPGA) That works OK for small data transfers, but is not optimal.



 In the current mainline there is support for a gen_bd bestcomm task which I 
presume is to be used for the purpose you imply. Perhaps somebody has an 
example of using that?





good luck!

-rb









  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
___
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded


Re: Status of MPC5200B FEC driver ?

2007-06-15 Thread roger blofeld
Daniel,
 Maybe using Sylvain's patches from 2007-05-13 
http://ozlabs.org/pipermail/linuxppc-dev/2007-May/035953.html will help?

 Does anyone know if those patches are ready for Paul Mackerras' for-2.6.23 
branch? http://ozlabs.org/pipermail/linuxppc-dev/2007-June/037903.html

-roger

 Original Message 
From: Daniel Schnell [EMAIL PROTECTED]
To: Daniel Schnell [EMAIL PROTECTED]; linuxppc-embedded@ozlabs.org
Sent: Thursday, June 14, 2007 12:13:24 PM
Subject: RE: Status of MPC5200B FEC driver ?

Hmm,

If I initiate first a ping from within U-Boot and then boot Linux via IDE, the 
FEC works.

Seems that some initialization is missing inside the Linux MPC5200 FEC driver ?


Best regards,

Daniel.







  

Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel 
and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 

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


Re: Current kernel with all patches for MPC5200

2007-04-28 Thread roger blofeld
Matthias,
 I would suggest http://git.secretlab.ca/cgi-bin/gitweb.cgi or 
http://gitbits.246tnt.com/gitweb/gitweb.cgi?p=linux-2.6-mpc52xx.git;a=summary 
or www.denx.de as starting points.

 Does anyone know if patches from these repositories are destined to be in the 
mainline kernel any time soon? Last I heard 2.6.22 was the target to get things 
like Bestcomm support in Linus' kernel.

-roger


- Original Message 
From: Matthias Fechner [EMAIL PROTECTED]
To: linuxppc-embedded@ozlabs.org
Sent: Saturday, April 28, 2007 11:44:22 AM
Subject: Current kernel with all patches for MPC5200

Hi,

is there a repository available with all the patches postet the last
days/weeks on this mailinglist included?

If yes how could I access that repository?

Best regards,
Matthias

-- 

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning. --
Rich Cook
___
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded


Help with MPC5200 + Bestcomm + Local Plus Bus

2006-05-31 Thread roger blofeld
Hi
 I have a custom board which is essentially an icecube with an FPGA on
the local bus. I have a driver which pulls data from the FPGA in
response to interrupts using memcpy_fromio(). I would like to reduce
the CPU usage.

Has anyone used bestcomm to move data from LPB to memory? Is there an
example anywhere? From the app note AN2604 it looks like writing a
bestcomm task is difficult at best. Perhaps it is possible to re-use
the ethernet rx task for this purpose?

I'm using mainline 2.6.16.18 with Sylvain's patches for
ethernet/bestcomm/ide. (BTW, will that code make it into the mainline
any time soon?)

Thanks in advance for any advice
-roger


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



[PATCH] Allow Lite5200 w/o PCI

2005-06-21 Thread roger blofeld
Hi,
 I tried to compile for the icecube w/o PCI to match a custom board,
but get many errors:

arch/ppc/platforms/built-in.o(.init.text+0x66): In function
`platform_init':
arch/ppc/platforms/lite5200.c:204: undefined reference to `isa_io_base'
arch/ppc/platforms/built-in.o(.init.text+0x76):arch/ppc/platforms/lite5200.c:204:
undefined reference to `isa_io_base'
arch/ppc/platforms/built-in.o(.init.text+0x82):arch/ppc/platforms/lite5200.c:205:
undefined reference to `isa_mem_base'
arch/ppc/platforms/built-in.o(.init.text+0x8a):arch/ppc/platforms/lite5200.c:205:
undefined reference to `isa_mem_base'
arch/ppc/mm/built-in.o(.text+0xe92): In function `ioport_map':
arch/ppc/mm/pgtable.c:266: undefined reference to `isa_io_base'
arch/ppc/mm/built-in.o(.text+0xe96):arch/ppc/mm/pgtable.c:266:
undefined reference to `isa_io_base'
arch/ppc/mm/built-in.o(.text+0x117e): In function `__ioremap':
arch/ppc/mm/pgtable.c:188: undefined reference to `isa_mem_base'
arch/ppc/mm/built-in.o(.text+0x1182):arch/ppc/mm/pgtable.c:188:
undefined reference to `isa_mem_base'
drivers/built-in.o(.text+0x42a): In function `vgacon_set_cursor_size':
include/asm/io.h:294: undefined reference to `isa_io_base'
drivers/built-in.o(.text+0x436):include/asm/io.h:294: undefined
reference to `isa_io_base'
drivers/built-in.o(.text+0x57e): In function `vgacon_set_origin':
include/asm/io.h:312: undefined reference to `isa_io_base'
drivers/built-in.o(.text+0x586):include/asm/io.h:312: undefined
reference to `isa_io_base'
drivers/built-in.o(.text+0x60e): In function `vga_set_palette':
drivers/video/console/vgacon.c:514: undefined reference to
`isa_io_base'
drivers/built-in.o(.text+0x6ba):include/asm/io.h:294: more undefined
references to `isa_io_base' follow
drivers/built-in.o(.text+0x282d2): In function `dma_pool_alloc':
include/asm/io.h:398: undefined reference to `pci_dram_offset'
drivers/built-in.o(.text+0x282d6):include/asm/io.h:398: undefined
reference to `pci_dram_offset'
drivers/built-in.o(.init.text+0x2f2): In function `vgacon_startup':
include/asm/io.h:309: undefined reference to `isa_io_base'
drivers/built-in.o(.init.text+0x302):include/asm/io.h:309: undefined
reference to `isa_io_base'
make: *** [.tmp_vmlinux1] Error 1


This patch fixes it for me, but I don't know if this is the correct
solution.

Signed Off By: Roger Blofeld blofeldus at yahoo.com
-roger


diff --git a/arch/ppc/platforms/lite5200.c
b/arch/ppc/platforms/lite5200.c
--- a/arch/ppc/platforms/lite5200.c
+++ b/arch/ppc/platforms/lite5200.c
@@ -194,9 +200,11 @@ platform_init(unsigned long r3, unsigned
/* BAT setup */
mpc52xx_set_bat();
 
+#ifdef CONFIG_PCI
/* No ISA bus by default */
isa_io_base = 0;
isa_mem_base= 0;
+#endif
 
/* Powersave */
/* This is provided as an example on how to do it. But you
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h
--- a/include/asm-ppc/io.h
+++ b/include/asm-ppc/io.h
@@ -26,6 +26,8 @@
 
 #if defined(CONFIG_4xx)
 #include asm/ibm4xx.h
+#elif defined(CONFIG_PPC_MPC52xx)
+#include asm/mpc52xx.h
 #elif defined(CONFIG_8xx)
 #include asm/mpc8xx.h
 #elif defined(CONFIG_8260)
diff --git a/include/asm-ppc/mpc52xx.h b/include/asm-ppc/mpc52xx.h
--- a/include/asm-ppc/mpc52xx.h
+++ b/include/asm-ppc/mpc52xx.h
@@ -28,6 +28,15 @@
 struct pt_regs;
 #endif /* __ASSEMBLY__ */
 
+#ifdef CONFIG_PCI
+#define _IO_BASEisa_io_base
+#define _ISA_MEM_BASE   isa_mem_base
+#define PCI_DRAM_OFFSET pci_dram_offset
+#else
+#define _IO_BASE0
+#define _ISA_MEM_BASE   0
+#define PCI_DRAM_OFFSET 0
+#endif
 
 /*

*/
 /* PPC Sys devices definition 
 */




__ 
Discover Yahoo! 
Get on-the-go sports scores, stock quotes, news and more. Check it out! 
http://discover.yahoo.com/mobile.html



[PATCH] GCC4 compile fixes for mpc52xx

2005-06-20 Thread roger blofeld
Sylvain,
 A quick patch to fix your tree for gcc4
-rb

drivers/net/fec_mpc52xx/fec.c: In function 'fec_reinit':
drivers/net/fec_mpc52xx/fec.c:525: error: invalid storage class for
function 'fec_update_stat'

drivers/serial/mpc52xx_uart.c:707: error: static declaration of
'mpc52xx_uart_driver' follows non-static declaration
drivers/serial/mpc52xx_uart.c:675: error: previous declaration of
'mpc52xx_uart_driver' was here

Signed off by Roger Blofeld blofeldus at yahoo.com

diff --git a/drivers/net/fec_mpc52xx/fec.c
b/drivers/net/fec_mpc52xx/fec.c
--- a/drivers/net/fec_mpc52xx/fec.c
+++ b/drivers/net/fec_mpc52xx/fec.c
@@ -522,7 +522,7 @@ static void fec_reinit(struct net_device
 {
struct fec_priv *priv = (struct fec_priv *)dev-priv;
struct mpc52xx_fec *fec = priv-fec;
-   static void fec_update_stat(struct net_device *);
+   void fec_update_stat(struct net_device *);
 
netif_stop_queue(dev);
out_be32(fec-imask, 0x0);
diff --git a/drivers/serial/mpc52xx_uart.c
b/drivers/serial/mpc52xx_uart.c
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -672,7 +672,7 @@ mpc52xx_console_setup(struct console *co
 }
 
 
-extern struct uart_driver mpc52xx_uart_driver;
+static struct uart_driver mpc52xx_uart_driver;
 
 static struct console mpc52xx_console = {
.name   = ttyPSC,



no microsoft products were used in the production of this email

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



MPC5200 I2S Driver -- where?

2005-05-02 Thread roger blofeld
Hi,
 A few weeks ago a simple I2S driver was discussed on this list. Is
that driver available for download anywhere? I'd like to try it out
with a simple DAC I have connected to an IceCube board.

Thanks
-roger


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



MPC5200 Cache coherency with BestComm issue

2004-11-29 Thread roger blofeld
Hi Roger

 By experimenting I have found that the BestComm and FEC work without
the cache flush provided CPU_FTR_MAYBE_CAN_NAP is removed from the
cputable (nap disables snooping) and that CPU_FTR_NEED_COHERENT is
added to the cputable (turns on M bit in BAT/PTE so that the XLB
has
a chance of seeing a global transaction).
  

Thanks for the info.

The nap thing was indeed obvious ... The proper way to deactivate it 
would be in lite5200.c
I added the powersave_nap = 1; as an example on how to allow it to
nap. 
I'll probably comment it out by default with a note.

For the CPU_FTR_NEED_COHERENT, are you sure it's required ?
 From my understanding of the G2Core manual, the M bit must be set if 
you want the G2Core
to assert the global signal when it access memory. Here, we don't care

since only the G2Core is snooping on the bus. So that should not be
required ...


Sylvain

Sylvain,
 You are correct. The CPU_FTR_NEED_COHERENT is not required. Perhaps
the solution is to only turn on powersave_nap if CONFIG_PPC_BESTCOMM is
not selected.
-rb





__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 




MPC5200 Cache coherency with BestComm issue

2004-11-27 Thread roger blofeld
Sylvain,
 By experimenting I have found that the BestComm and FEC work without
the cache flush provided CPU_FTR_MAYBE_CAN_NAP is removed from the
cputable (nap disables snooping) and that CPU_FTR_NEED_COHERENT is
added to the cputable (turns on M bit in BAT/PTE so that the XLB has
a chance of seeing a global transaction).

I don't know if that will work for all G2_LE cores, but it seems
required for the 5200.
-rb

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



Lite5200 FEC Driver on linux 2.6 (updated)

2004-11-23 Thread roger blofeld
Sylvain,
 Using your latest tree still shows the packet checksum errors, despite
XLB snooping being enabled. I think that the cache flush is required or
that the skb pages must be marked coherent somehow. I note that the 8xx
fec.c file also has a cache flush, so it isn't that strange.
-rb



__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 




Lite5200 FEC Driver on linux 2.6 broken? (fixed again)

2004-11-19 Thread roger blofeld
What tree are you exactly using ?
In mainstream XLB snooping is not configured so if you have the 
mainstream + added DMA,
the problem may come from this.


Sylvain

I did a bk clone of the linux-2.5 tree (2.6.10-rc2), then a bk pull of
your tree. You're probably right about the snooping. Since the driver
is working at the moment, I'll wait until your tree is updated before
doing more testing.
Thanks
-rb



__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 




Lite5200 FEC Driver on linux 2.6 broken? (fixed again)

2004-11-18 Thread roger blofeld
Adding a call 

flush_dcache_range((u32)skb-data, (u32)skb-data + skb-len);

 just before spin_lock_irq() in fec_hard_start_xmit() removes the
remaining transmission checksum errors for me.
-rb



__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 




Lite5200 FEC Driver on linux 2.6 broken? (again)

2004-11-16 Thread roger blofeld
Retransmissions from the lite5200 work OK now, but the occasional ACK
packet is sent from the lite5200 with a bad checksum causing
retransmissions. Perhaps another patch would fix this problem too?
-roger



__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 




Lite5200 FEC Driver on linux 2.6 broken? (fixed)

2004-11-15 Thread roger blofeld
Bravo! Retransmissions now have the correct checksums. Thanks
-roger


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com