* Re: Ethernet driver for Linux kernel 2.6 running on ML403
From: Andrew @ 2006-09-19 18:06 UTC (permalink / raw)
To: John Bonesio; +Cc: linuxppc-embedded
In-Reply-To: <2FE3DBF1797A1443AAB3FA0EF6BF4EEC021EA645@XSJ-EXCHVS1.xlnx.xilinx.com>
On Thu, 14 Sep 2006 09:40:53 -0700
"John Bonesio" <john.bonesio@xilinx.com> wrote:
> I am in the group that has control over how this is done. What would
> you propose be done different? Keep in mind that we are trying to
> support a process where someone builds a hardware design and the
> later changes it with new peripherals or perhaps makes minor tweaks.
> We want to make the updating of the Linux kernel to reflect these
> hardware changes easy for people.
>
> Having the ability to make rapid hardware changes, I think, is a bit
> different from what most folks are used to.
I am coming into this a bit late and it has been awhile since I worked
Virtex parts. But it doesn't look like things have changed much.
Since Linux is from a PC base, hardware changes are as rapid as
powering off and plugging a new device in the machine. Rebuilding the
kernel for this is not usually something people consider for this.
So to say Linux people aren't use to rapid hardware changes, seems
pretty backwards to me.
The static configuration of the hardware is the thing that is very
unusual for the software. And having that static hardware setup
compiled into the kernel is a real source of problems.
Typically things get probed, discovered/learned at boot time. Either by
the boot loader, pin strapping, dip switches, user config etc.
I worked on a board with 2 Virtex chips. They had some set of common IP
cores with minor differences between the two. There was no way I wanted
to build 2 sets of kernels and drivers to deal with things.
The first small difference of one chip having 2 serial ports and the
other side only having 1 serial port, rippled the entire IRQ mapping in
both xparameters.h file. There were all kinds of little changes between
the mem mapping and everything else as well.
Depending on how things were used from xparemeters.h I could change the
static numbers to function calls to get values, but most of the time I
easist to hack up the drivers to pick one of two values depending on
the chip.
At first I just used a kernel boot param saved in u-boot flash to tell
the SW which chip it was running on. Then I got our HW people to put
in a single bit in another register for SW to tell which chip was
running. That saved us setup step in production of setting up flash
with different items.
There are trade offs on how much it is worth being determined at run
time compared to compiled into the kernel, but with the current
xparemters.h you are stuck with things compiled in. Getting to a point
where anything can be learned at run time, or just pulled from flash
would be a big step forward. But at that point it should still be easy
to compile things into the kernel if someone has major sw space
constraints.
I also keep hearing about doing partial re-configuration bit streams.
Were the FPGA can change at run time as well. (ie switch from an
CAT5 ethernet IP core over to an 802.11 ethernet depending on if the
user plugs in a cable or an antenna)
How would you even plan to do that with the xparemters.h file and the
drivers as it is now?
^ permalink raw reply
* Re: problems with PLB_TEMAC & xilinx_gige driver under linux 2.4 ...
From: rimas @ 2006-09-19 16:48 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <450F8062.1000606@dlasys.net>
well i'm not sure what the gemac is but the plb_temac and hard_temac
are the blocks you're supposed to use to utilize the tri-mode MAC
built into the virtex 4 parts and the xilinx_gige driver is the one
the EDK tools generate to go with those blocks
in any case i think i've found a way to solve my problem and thought
i would share it with the list (and perhaps someone who understands
the issues involved better than i do could shed some light on the
subject)
its seems that some time between 2.4.20 and 2.4.26 the assembly
language that is used to implement the inb/inw/inl instructions changed
in 2.4.20 it was lwz; eieio; as seen here (from include/asm-ppc/io.h)
extern inline unsigned in_be32(volatile unsigned *addr)
{
unsigned ret;
__asm__ __volatile__("lwz%U1%X1 %0,%1; eieio" : "=r" (ret) :
"m" (*addr));
return ret;
}
and in 2.4.26 the sequence is lwz, twi, isync
i changed it back to lwz; eieio; and my problems have gone away (whew!)
does anyone know why that change was made and why it would be causing
a trap and crashing my ppc ?
thanks
-rimas
On Sep 18, 2006, at 10:30 PM, David H. Lynch Jr. wrote:
> I do nto know much about Xilinx under 2.4 but I am pretty sure
> the gemac and the plb temac are similar but different
> NIC's.
>
> rimas wrote:
>> Greetings,
>>
>> i am having problems using the xilinx_gige driver under linux
>> 2.4.26 running on a Virtex-4 FX12 Mini Module board (from
>> avnet). I am using the plb_temac and hard_temac blocks under ISE/
>> EDK 8.1.02.
>>
>> the machine boots fine and the network interface seems to work
>> okay but it randomly panics sometimes (rather quickly if i'm
>> generating network traffic):
>>
>> Oops: Exception in kernel mode, sig: 4
>> NIP: C00DA340 XER: 20000000 LR: C00D34F8 SP: C3945B20 REGS:
>> c3945a70 TRAP: 0700
>> Not tainted
>> MSR: 00009030 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
>> TASK = c3944000[52] 'telnetd' Last syscall: 4
>> last math 00000000 last altivec 00000000
>> GPR00: 00000004 C3945B20 C3944000 C02E49F4 C02E4800 00000004
>> 00000001 C0456260
>> GPR08: C0177424 00000031 C50D8000 00021F03 0008C8E4 10122AA8
>> 00000000 C01A0000
>> GPR16: 00000000 0000001A 00000000 C3945F18 00001032 03945BA0
>> 00000000 C00038E0
>> GPR24: C0004800 00000020 C04C06E0 C01864E0 C3945BB0 0000001F
>> 00000000 C02E49F4
>> Call backtrace:
>> C0190000 C00D34F8 C0004748 C000483C C00038E0 C00D398C C00F8094
>> C00EE04C C01039B0 C0104D70 C0115570 C01163A8 C010A600 C012A61C
>> C00E52F4 C00E5574 C003AB2C C000369C 100572BC 10005064 10005108
>> 0FD9221C 00000000
>> Kernel panic: Aiee, killing interrupt handler!
>> In interrupt handler - not syncing
>> <0>Rebooting in 180 seconds..
>>
>> it always causes a trap on the same instruction (c00da340) which
>> is inside of
>> XTemac_IntrFifoHandler()
>>
>> c00da330: 81 6a 00 28 lwz r11,40(r10)
>> c00da334: 0c 0b 00 00 twi 0,r11,0
>> c00da338: 4c 00 01 2c isync
>> c00da33c: 81 2a 00 20 lwz r9,32(r10)
>> c00da340: 0c 09 00 00 twi 0,r9,0
>> c00da344: 4c 00 01 2c isync
>>
>> this code corresponds to two consecutive in_be32() calls
>>
>> extern inline unsigned in_be32(volatile unsigned *addr)
>> {
>> unsigned ret;
>>
>> __asm__ __volatile__("lwz%U1%X1 %0,%1;\n"
>> "twi 0,%0,0;\n"
>> "isync" : "=r" (ret) : "m" (*addr));
>> return ret;
>> }
^ permalink raw reply
* Re: [PATCH] fix error in cpm2
From: Vitaly Bordug @ 2006-09-19 14:55 UTC (permalink / raw)
To: Amy Fong; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20060919030625.GA24944@lucciola.windriver.com>
On Mon, 18 Sep 2006 23:06:25 -0400
Amy Fong <amy.fong@windriver.com> wrote:
> The following patch fixes a typo in cpm2.h resulting in a compile error.
>
> Signed-off-by: Amy Fong <amy.fong@windriver.com>
>
> Index: linux-2.6.18-rc6/include/asm-ppc/cpm2.h
> ===================================================================
> --- linux-2.6.18-rc6.orig/include/asm-ppc/cpm2.h
> +++ linux-2.6.18-rc6/include/asm-ppc/cpm2.h
> @@ -1186,7 +1186,7 @@
> #define FCC_MEM_OFFSET(x) (CPM_FCC_SPECIAL_BASE + (x*128))
> #define FCC1_MEM_OFFSET FCC_MEM_OFFSET(0)
> #define FCC2_MEM_OFFSET FCC_MEM_OFFSET(1)
> -#define FCC2_MEM_OFFSET FCC_MEM_OFFSET(2)
> +#define FCC3_MEM_OFFSET FCC_MEM_OFFSET(2)
>
> #endif /* __CPM2__ */
> #endif /* __KERNEL__ */
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
>
Well, I have this hunk in
[PATCH 3/7] POWERPC: Move generic cpm2 stuff to powerpc
already...
Paul, does it make sense to extract and re-send this specific fix?
I think it will be OK for this to appear next major merge...
--
Sincerely,
Vitaly
^ permalink raw reply
* Re: Ethernet driver for Linux kernel 2.6 running on ML403
From: Grant Likely @ 2006-09-19 14:17 UTC (permalink / raw)
To: Peter Korsgaard; +Cc: linuxppc-embedded
In-Reply-To: <87hcz4z47p.fsf@sleipner.barco.com>
On 9/19/06, Peter Korsgaard <jacmet@sunsite.dk> wrote:
> >>>>> "GL" == Grant Likely <grant.likely@secretlab.ca> writes:
> GL> If we reject the Xilinx driver code, then we either have to do
> GL> without Xilinx support in mainline, or we need to write new
> GL> drivers that address the above issues (support multiple IP
> GL> versions, etc). The Xilinx support in mainline right now does not
> GL> use any Xilinx code. (Xilinx PIC and UART).
>
> I think the best option is to simply forget about the Xilinx code,
> see the FPGAs as any other PPC system and write normal device drivers
> for it. Your platform bus stuff and my (to-be-mainlined) uartlite
> driver is a first step in this direction..
Too bad platform bus is sooo last year. :p
Time to hack device trees.
g.
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Re: Ethernet driver for Linux kernel 2.6 running on ML403
From: Grant Likely @ 2006-09-19 14:16 UTC (permalink / raw)
To: John Bonesio; +Cc: linuxppc-embedded
In-Reply-To: <2FE3DBF1797A1443AAB3FA0EF6BF4EEC021EAC01@XSJ-EXCHVS1.xlnx.xilinx.com>
[edited for context]
On 9/15/06, John Bonesio <john.bonesio@xilinx.com> wrote:
> On Thursday, September 14, 2006 5:09 PM, Keith J Outwater wrote:
> > I thinking in terms of something like a 32 bit register (i.e. like a
> > processor's PVR register) that has a hard-coded magic number
> > which a driver can read and decode to determine driver compatibility.
> > That does not sound resource-intensive given the size FPGAs we are
> > talking about. Probably don't even need 32 bits.
>
> I know that on the surface it seems like a simple thing. Some of our
> parts are big, yet some are small. We are always getting pressure to
> make our IP as small as possible.
>
> Though, this may be something we can revisit again, for now this
> information just isn't going to be available.
Then its probably just a matter of whoever configures the kernel needs
to know what version of IP is being used. ie. always have the
fallback of compile time specification of IP version. Could be done
manually, or by putting the info into the dts. We probably need a
tool to generate a dts from the .mhs or xparameters.h file anyway.
Cheers,
g.
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Re: Measure Interrupt Latency on MPC5200B
From: Josu Onandia @ 2006-09-19 12:44 UTC (permalink / raw)
To: Esben Nielsen; +Cc: Linuxppc-embedded
In-Reply-To: <Pine.LNX.4.64.0609191414090.10784@frodo.shire>
Esben Nielsen wrote:
> On Tue, 19 Sep 2006, Josu Onandia wrote:
>
>> Syed Amer Gilani wrote:
>>
>>> We have a MPC5200B(ppc) Board from Phytec, running with a 2.6 Linux
>>> Kernel. For Documentation purposes and testings how patches to the
>>> Kernel affects real time capabilities we want to measure the Interrupt
>>> Latency.
>>> I only found tools for other arches or patches for far to old kernels.
>>> Does somebody know a way for a 2.6 kernel on ppc? I already thought of
>>> generating a signal on an Output of the Board and measure it with a
>>> Oscilloscope but i don't find that method satisfying.
>>>
>>> Thank you in advance,
>>> Syed Amer Gilani
>>> _______________________________________________
>>> Linuxppc-embedded mailing list
>>> Linuxppc-embedded@ozlabs.org
>>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>>>
>>>
>> Hi. I'm sorry for my own latency, but I've been very busy.
>>
>> I'm measuring interrup latency in an MPC5200B, too, but with Linux 2.4.
>>
>> With this processor you can use the TB registers to measure a lapse
>> of time.
>>
>> I use a GPT timer to generate a periodic interrupt. From the interrupt
>> routine I read the TBL and compare it with the expected value.
>>
>> I do this using RTAI, because I need real-time response to interrupts,
>> but I suppose that with little effort you can port it to standard Linux.
>>
>> If you want more details, or my actual source code, email me.
>>
>> Josu Onandia
>>
>>
>
> What are your results under the normal kernel and under RTAI?
> Have anyone tried with -rt kernels? What are the results?
>
> I work for a company using MPC5200 with VxWorks. It could be fun to
> compare numbers...
>
> Esben
This is a Lite5200B running at 462MHz, kernel 2.4.25 and RTAI 24.1.11,
from Denx.
I haven't tried under normal kernel. With RTAI I have 1,5usec from the
actual interrupt until RTAI call my ISR function. This adds the
processor latency plus the RTAI dispatcher overhead. With heavy IO load,
ethernet and disk, the maximum is 8usec.
I'd really like to see your results, to compare with a real RTOS.
Josu
^ permalink raw reply
* Re: [POWERPC] convert string i/o operations to C
From: David Howells @ 2006-09-19 12:42 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: ppc-dev, paulus
In-Reply-To: <20060919222351.d27a1a06.sfr@canb.auug.org.au>
Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> +void _insb(volatile u8 __iomem *port, void *buf, int ns)
> +{
> + asm volatile("sync");
> + if (ns <= 0)
> + return;
What is "ns" meant to do? It seems to degrade the _insb() op to just a sync,
but is that correct?
David
^ permalink raw reply
* [POWERPC] convert string i/o operations to C
From: Stephen Rothwell @ 2006-09-19 12:23 UTC (permalink / raw)
To: paulus; +Cc: ppc-dev
This produces essentially the same code and will make the iSeries i/o
consolidation easier.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/Makefile | 2 -
arch/powerpc/kernel/io.c | 125 +++++++++++++++++++++++++++++++++++++++
arch/powerpc/kernel/misc.S | 95 ------------------------------
arch/powerpc/kernel/ppc_ksyms.c | 7 --
4 files changed, 126 insertions(+), 103 deletions(-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 8b3f4fa..8b133af 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -51,7 +51,7 @@ extra-$(CONFIG_8xx) := head_8xx.o
extra-y += vmlinux.lds
obj-y += time.o prom.o traps.o setup-common.o \
- udbg.o misc.o
+ udbg.o misc.o io.o
obj-$(CONFIG_PPC32) += entry_32.o setup_32.o misc_32.o
obj-$(CONFIG_PPC64) += misc_64.o dma_64.o iommu.o
obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o
diff --git a/arch/powerpc/kernel/io.c b/arch/powerpc/kernel/io.c
new file mode 100644
index 0000000..c83970d
--- /dev/null
+++ b/arch/powerpc/kernel/io.c
@@ -0,0 +1,125 @@
+/*
+ * I/O string operations
+ * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
+ * Copyright (C) 2006 IBM Corporation
+ *
+ * Largely rewritten by Cort Dougan (cort@cs.nmt.edu)
+ * and Paul Mackerras.
+ *
+ * Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com)
+ * PPC64 updates by Dave Engebretsen (engebret@us.ibm.com)
+ *
+ * Rewritten in C by Stephen Rothwell.
+ *
+ * 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/kernel.h>
+#include <linux/types.h>
+#include <linux/module.h>
+
+#include <asm/io.h>
+
+void _insb(volatile u8 __iomem *port, void *buf, int ns)
+{
+ asm volatile("sync");
+ if (ns <= 0)
+ return;
+ asm volatile(
+ "mtctr %2\n"
+ "subi %1,%1,1\n"
+ "0: lbz %2,0(%0)\n"
+ "eieio\n"
+ "stbu %2,1(%1)\n"
+ "bdnz 0b\n"
+ "twi 0,%2,0\n"
+ "isync\n"
+ : : "r" (port), "r" (buf), "r" (ns));
+}
+EXPORT_SYMBOL(_insb);
+
+void _outsb(volatile u8 __iomem *port, const void *buf, int ns)
+{
+ if (ns <= 0)
+ return;
+ asm volatile(
+ "mtctr %2\n"
+ "subi %1,%1,1\n"
+ "sync\n"
+ "0: lbzu %2,1(%1)\n"
+ "stb %2,0(%0)\n"
+ "bdnz 0b\n"
+ "sync\n"
+ : : "r" (port), "r" (buf), "r" (ns));
+}
+EXPORT_SYMBOL(_outsb);
+
+void _insw_ns(volatile u16 __iomem *port, void *buf, int ns)
+{
+ asm volatile("sync");
+ if (ns <= 0)
+ return;
+ asm volatile(
+ "mtctr %2\n"
+ "subi %1,%1,2\n"
+ "0: lhz %2,0(%0)\n"
+ "eieio\n"
+ "sthu %2,2(%1)\n"
+ "bdnz 0b\n"
+ "twi 0,%2,0\n"
+ "isync\n"
+ : : "r" (port), "r" (buf), "r" (ns));
+}
+EXPORT_SYMBOL(_insw_ns);
+
+void _outsw_ns(volatile u16 __iomem *port, const void *buf, int ns)
+{
+ if (ns <= 0)
+ return;
+ asm volatile(
+ "mtctr %2\n"
+ "subi %1,%1,2\n"
+ "sync\n"
+ "0: lhzu %2,2(%1)\n"
+ "sth %2,0(%0)\n"
+ "bdnz 0b\n"
+ "sync\n"
+ : : "r" (port), "r" (buf), "r" (ns));
+}
+EXPORT_SYMBOL(_outsw_ns);
+
+void _insl_ns(volatile u32 __iomem *port, void *buf, int nl)
+{
+ asm volatile("sync");
+ if (nl <= 0)
+ return;
+ asm volatile(
+ "mtctr %2\n"
+ "subi %1,%1,4\n"
+ "0: lwz %2,0(%0)\n"
+ "eieio\n"
+ "stwu %2,4(%1)\n"
+ "bdnz 0b\n"
+ "twi 0,%2,0\n"
+ "isync\n"
+ : : "r" (port), "r" (buf), "r" (nl));
+}
+EXPORT_SYMBOL(_insl_ns);
+
+void _outsl_ns(volatile u32 __iomem *port, const void *buf, int nl)
+{
+ if (nl <= 0)
+ return;
+ asm volatile(
+ "mtctr %2\n"
+ "subi %1,%1,4\n"
+ "sync\n"
+ "0: lwzu %2,4(%1)\n"
+ "stw %2,0(%0)\n"
+ "bdnz 0b\n"
+ "sync\n"
+ : : "r" (port), "r" (buf), "r" (nl));
+}
+EXPORT_SYMBOL(_outsl_ns);
diff --git a/arch/powerpc/kernel/misc.S b/arch/powerpc/kernel/misc.S
index 6feb391..330c9dc 100644
--- a/arch/powerpc/kernel/misc.S
+++ b/arch/powerpc/kernel/misc.S
@@ -43,98 +43,3 @@ _GLOBAL(add_reloc_offset)
add r3,r3,r5
mtlr r0
blr
-
-/*
- * I/O string operations
- *
- * insb(port, buf, len)
- * outsb(port, buf, len)
- * insw(port, buf, len)
- * outsw(port, buf, len)
- * insl(port, buf, len)
- * outsl(port, buf, len)
- * insw_ns(port, buf, len)
- * outsw_ns(port, buf, len)
- * insl_ns(port, buf, len)
- * outsl_ns(port, buf, len)
- *
- * The *_ns versions don't do byte-swapping.
- */
-_GLOBAL(_insb)
- sync
- cmpwi 0,r5,0
- mtctr r5
- subi r4,r4,1
- blelr-
-00: lbz r5,0(r3)
- eieio
- stbu r5,1(r4)
- bdnz 00b
- twi 0,r5,0
- isync
- blr
-
-_GLOBAL(_outsb)
- cmpwi 0,r5,0
- mtctr r5
- subi r4,r4,1
- blelr-
- sync
-00: lbzu r5,1(r4)
- stb r5,0(r3)
- bdnz 00b
- sync
- blr
-
-_GLOBAL(_insw_ns)
- sync
- cmpwi 0,r5,0
- mtctr r5
- subi r4,r4,2
- blelr-
-00: lhz r5,0(r3)
- eieio
- sthu r5,2(r4)
- bdnz 00b
- twi 0,r5,0
- isync
- blr
-
-_GLOBAL(_outsw_ns)
- cmpwi 0,r5,0
- mtctr r5
- subi r4,r4,2
- blelr-
- sync
-00: lhzu r5,2(r4)
- sth r5,0(r3)
- bdnz 00b
- sync
- blr
-
-_GLOBAL(_insl_ns)
- sync
- cmpwi 0,r5,0
- mtctr r5
- subi r4,r4,4
- blelr-
-00: lwz r5,0(r3)
- eieio
- stwu r5,4(r4)
- bdnz 00b
- twi 0,r5,0
- isync
- blr
-
-_GLOBAL(_outsl_ns)
- cmpwi 0,r5,0
- mtctr r5
- subi r4,r4,4
- blelr-
- sync
-00: lwzu r5,4(r4)
- stw r5,0(r3)
- bdnz 00b
- sync
- blr
-
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index 75429e5..807193a 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -95,13 +95,6 @@ #ifdef CONFIG_PPC64
EXPORT_SYMBOL(copy_4K_page);
#endif
-EXPORT_SYMBOL(_insb);
-EXPORT_SYMBOL(_outsb);
-EXPORT_SYMBOL(_insw_ns);
-EXPORT_SYMBOL(_outsw_ns);
-EXPORT_SYMBOL(_insl_ns);
-EXPORT_SYMBOL(_outsl_ns);
-
#if defined(CONFIG_PPC32) && (defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE))
EXPORT_SYMBOL(ppc_ide_md);
#endif
--
1.4.2.1
^ permalink raw reply related
* Re: Measure Interrupt Latency on MPC5200B
From: Esben Nielsen @ 2006-09-19 12:16 UTC (permalink / raw)
To: Josu Onandia; +Cc: Linuxppc-embedded
In-Reply-To: <450FDCFD.9040102@fagorautomation.es>
On Tue, 19 Sep 2006, Josu Onandia wrote:
> Syed Amer Gilani wrote:
>
>> We have a MPC5200B(ppc) Board from Phytec, running with a 2.6 Linux
>> Kernel. For Documentation purposes and testings how patches to the
>> Kernel affects real time capabilities we want to measure the Interrupt
>> Latency.
>> I only found tools for other arches or patches for far to old kernels.
>> Does somebody know a way for a 2.6 kernel on ppc? I already thought of
>> generating a signal on an Output of the Board and measure it with a
>> Oscilloscope but i don't find that method satisfying.
>>
>> Thank you in advance,
>> Syed Amer Gilani
>> _______________________________________________
>> Linuxppc-embedded mailing list
>> Linuxppc-embedded@ozlabs.org
>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>>
>>
> Hi. I'm sorry for my own latency, but I've been very busy.
>
> I'm measuring interrup latency in an MPC5200B, too, but with Linux 2.4.
>
> With this processor you can use the TB registers to measure a lapse of time.
>
> I use a GPT timer to generate a periodic interrupt. From the interrupt
> routine I read the TBL and compare it with the expected value.
>
> I do this using RTAI, because I need real-time response to interrupts,
> but I suppose that with little effort you can port it to standard Linux.
>
> If you want more details, or my actual source code, email me.
>
> Josu Onandia
>
>
What are your results under the normal kernel and under RTAI?
Have anyone tried with -rt kernels? What are the results?
I work for a company using MPC5200 with VxWorks. It could be fun to
compare numbers...
Esben
^ permalink raw reply
* Re: Measure Interrupt Latency on MPC5200B
From: Josu Onandia @ 2006-09-19 12:05 UTC (permalink / raw)
To: Syed Amer Gilani; +Cc: Linuxppc-embedded
In-Reply-To: <ac3922a00609140500j79e33fb3lfecbefc151ce3b41@mail.gmail.com>
Syed Amer Gilani wrote:
>We have a MPC5200B(ppc) Board from Phytec, running with a 2.6 Linux
>Kernel. For Documentation purposes and testings how patches to the
>Kernel affects real time capabilities we want to measure the Interrupt
>Latency.
>I only found tools for other arches or patches for far to old kernels.
>Does somebody know a way for a 2.6 kernel on ppc? I already thought of
>generating a signal on an Output of the Board and measure it with a
>Oscilloscope but i don't find that method satisfying.
>
>Thank you in advance,
>Syed Amer Gilani
>_______________________________________________
>Linuxppc-embedded mailing list
>Linuxppc-embedded@ozlabs.org
>https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>
Hi. I'm sorry for my own latency, but I've been very busy.
I'm measuring interrup latency in an MPC5200B, too, but with Linux 2.4.
With this processor you can use the TB registers to measure a lapse of time.
I use a GPT timer to generate a periodic interrupt. From the interrupt
routine I read the TBL and compare it with the expected value.
I do this using RTAI, because I need real-time response to interrupts,
but I suppose that with little effort you can port it to standard Linux.
If you want more details, or my actual source code, email me.
Josu Onandia
^ permalink raw reply
* Re: Ethernet driver for Linux kernel 2.6 running on ML403
From: Peter Korsgaard @ 2006-09-19 10:13 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <2FE3DBF1797A1443AAB3FA0EF6BF4EEC021EA645@XSJ-EXCHVS1.xlnx.xilinx.com>
>>>>> "JB" == John Bonesio <john.bonesio@xilinx.com> writes:
Hi,
JB> << The Xilinx approach of overwriting the source tree just feels
JB> wrong, and no one seems to want to do it that way.>>
JB> I am in the group that has control over how this is done. What
JB> would you propose be done different? Keep in mind that we are
JB> trying to support a process where someone builds a hardware design
JB> and the later changes it with new peripherals or perhaps makes
JB> minor tweaks. We want to make the updating of the Linux kernel to
JB> reflect these hardware changes easy for people.
Don't patch the kernel sources from EDK, but instead get the drivers
integrated in the mainline kernel. Either do config options for the
various IP versions or use runtime detection.
We're doing Linux development for several platforms and using a single
kernel tree for it all is absolute critical to my sanity..
The EDK drivers are nice as examples of how to use the IP cores, but
the defined and documented interface should be the IP, not the EDK
drivers.
--
Bye, Peter Korsgaard
^ permalink raw reply
* booting monta vista 2.6
From: Brian Rutledge @ 2006-09-19 9:42 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 928 bytes --]
Hi
I have an Embedded Planet 852T board with the planet core bootloader and
trying to boot monta vista 2.6.
The code starts up and enters the function load_kernel() however it is
not passed board information in the load_kernel() parameter *bp.
Is there some way to set this via .config or some other means by which
this can be picked up.
Thanks Brian
Legal Disclaimer:
The information contained in this message may be privileged and confidential. It is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete or destroy any copy of this message
[-- Attachment #2: Type: text/html, Size: 2985 bytes --]
^ permalink raw reply
* Re: [Alsa-devel] oops in snd-powermac due to snd-aoa
From: Takashi Iwai @ 2006-09-19 9:31 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev, alsa-devel
In-Reply-To: <20060916095603.GA5447@aepfle.de>
At Sat, 16 Sep 2006 11:56:03 +0200,
Olaf Hering wrote:
>
> On Thu, Sep 07, Takashi Iwai wrote:
>
> > At Thu, 7 Sep 2006 14:42:56 +0200,
> > Olaf Hering wrote:
> > >
> > > I was playing with snd-aoa, maybe the driver would work on a G4/466.
> > > mv /lib/modules/*/kernel/sound/ppc/snd-powermac.ko .
> > > reboot
> > > $insmod /lib/modules/*/kernel/sound/aoa/*/*.ko
> > > alsamixer finds nothing.
> > > mv snd-powermac.ko /lib/modules/*/kernel/sound/ppc/
> > > $insmod snd-powermac.ko -> oops
> > >
> > > Using PowerMac machine description
> > (snip)
> > > ALSA sound/ppc/keywest.c:82: tumbler: cannot attach i2c client
> > > read_audio_gpio addr 67 ret 2 av 4
> > > headphone: 0, lineout: 0
> > > check_audio_gpio addr 70 ret 4 av 4
> > > check_audio_gpio addr 6f ret 7 av 4
> > > Unable to handle kernel paging request for data at address 0x00000002
> >
> > Does the patch below work?
>
> Yes, no oops, but also no sound without reboot. Thats ok.
Thanks, I included the patch to ALSA tree now.
Takashi
^ permalink raw reply
* Re: [Alsa-devel] [PATCH] aoa: add locking to tas codec
From: Takashi Iwai @ 2006-09-19 9:18 UTC (permalink / raw)
To: Johannes Berg; +Cc: linuxppc-dev, alsa-devel
In-Reply-To: <1158221176.2936.21.camel@ux156>
At Thu, 14 Sep 2006 10:06:16 +0200,
Johannes Berg wrote:
>
> Looks like I completely forgot to do this. This patch adds locking to
> the tas codec so two userspace programs can't hit the controls at the
> same time. Tested on my powerbook, but I obviously can't find any
> problems even without it since it doesn't do SMP.
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Thanks, I applied it to ALSA HG tree.
Takashi
^ permalink raw reply
* [PATCH] fix compile error in sbc8560
From: Amy Fong @ 2006-09-19 3:07 UTC (permalink / raw)
To: linuxppc-dev
The following fixes compile errors in sbc8560.
Signed-off-by: Amy Fong <amy.fong@windriver.com>
Index: linux-2.6.18-rc7/arch/ppc/platforms/85xx/sbc8560.h
===================================================================
--- linux-2.6.18-rc7.orig/arch/ppc/platforms/85xx/sbc8560.h
+++ linux-2.6.18-rc7/arch/ppc/platforms/85xx/sbc8560.h
@@ -14,6 +14,7 @@
#define __MACH_SBC8560_H__
#include <platforms/85xx/sbc85xx.h>
+#include <asm/irq.h>
#define CPM_MAP_ADDR (CCSRBAR + MPC85xx_CPM_OFFSET)
Index: linux-2.6.18-rc7/arch/ppc/platforms/85xx/sbc85xx.h
===================================================================
--- linux-2.6.18-rc7.orig/arch/ppc/platforms/85xx/sbc85xx.h
+++ linux-2.6.18-rc7/arch/ppc/platforms/85xx/sbc85xx.h
@@ -49,4 +49,22 @@
#define MPC85XX_PCI1_IO_SIZE 0x01000000
+/* FCC1 Clock Source Configuration. These can be
+ * redefined in the board specific file.
+ * Can only choose from CLK9-12 */
+#define F1_RXCLK 12
+#define F1_TXCLK 11
+
+/* FCC2 Clock Source Configuration. These can be
+ * redefined in the board specific file.
+ * Can only choose from CLK13-16 */
+#define F2_RXCLK 13
+#define F2_TXCLK 14
+
+/* FCC3 Clock Source Configuration. These can be
+ * redefined in the board specific file.
+ * Can only choose from CLK13-16 */
+#define F3_RXCLK 15
+#define F3_TXCLK 16
+
#endif /* __PLATFORMS_85XX_SBC85XX_H__ */
^ permalink raw reply
* Re: Ethernet driver for Linux kernel 2.6 running on ML403
From: Peter Korsgaard @ 2006-09-19 7:48 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <528646bc0609140734j2f7b008fy815f221677c5ac74@mail.gmail.com>
>>>>> "GL" == Grant Likely <grant.likely@secretlab.ca> writes:
Hi,
GL> So what direction do we (as the community) want to go for
GL> supporting Xilinx IP in the Linux kernel?
GL> IIRC, Xilinx intends to get drivers submitted into mainline.
GL> (Based on their cross-platform driver support code). It is
GL> unknown which and how many drivers for different IP versions will
GL> be submitted.
Yes, that's also what I hear from the Xilinx guys - But action speaks
louder than words. It's not like the V2P is new technology anymore.
GL> However, the xilinx driver code is verbose and does not match well
GL> with the rest of the Linux code base.
Yeah, the Xilinx stuff/flow definately doesn't fit the kernel.
GL> If we reject the Xilinx driver code, then we either have to do
GL> without Xilinx support in mainline, or we need to write new
GL> drivers that address the above issues (support multiple IP
GL> versions, etc). The Xilinx support in mainline right now does not
GL> use any Xilinx code. (Xilinx PIC and UART).
I think the best option is to simply forget about the Xilinx code,
see the FPGAs as any other PPC system and write normal device drivers
for it. Your platform bus stuff and my (to-be-mainlined) uartlite
driver is a first step in this direction..
--
Bye, Peter Korsgaard
^ permalink raw reply
* [POWERPC] clean up ide io accessors
From: Stephen Rothwell @ 2006-09-19 7:31 UTC (permalink / raw)
To: paulus; +Cc: ppc-dev
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/misc.S | 12 ------------
arch/powerpc/kernel/ppc_ksyms.c | 7 -------
arch/ppc/kernel/misc.S | 4 ----
arch/ppc/kernel/ppc_ksyms.c | 5 -----
include/asm-powerpc/ide.h | 12 ++++++------
include/asm-powerpc/io.h | 6 ------
6 files changed, 6 insertions(+), 40 deletions(-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --git a/arch/powerpc/kernel/misc.S b/arch/powerpc/kernel/misc.S
index dd5f8e4..6feb391 100644
--- a/arch/powerpc/kernel/misc.S
+++ b/arch/powerpc/kernel/misc.S
@@ -86,9 +86,6 @@ _GLOBAL(_outsb)
sync
blr
-#ifdef CONFIG_PPC32
-_GLOBAL(__ide_mm_insw)
-#endif
_GLOBAL(_insw_ns)
sync
cmpwi 0,r5,0
@@ -103,9 +100,6 @@ _GLOBAL(_insw_ns)
isync
blr
-#ifdef CONFIG_PPC32
-_GLOBAL(__ide_mm_outsw)
-#endif
_GLOBAL(_outsw_ns)
cmpwi 0,r5,0
mtctr r5
@@ -118,9 +112,6 @@ _GLOBAL(_outsw_ns)
sync
blr
-#ifdef CONFIG_PPC32
-_GLOBAL(__ide_mm_insl)
-#endif
_GLOBAL(_insl_ns)
sync
cmpwi 0,r5,0
@@ -135,9 +126,6 @@ _GLOBAL(_insl_ns)
isync
blr
-#ifdef CONFIG_PPC32
-_GLOBAL(__ide_mm_outsl)
-#endif
_GLOBAL(_outsl_ns)
cmpwi 0,r5,0
mtctr r5
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index 314d611..75429e5 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -95,13 +95,6 @@ #ifdef CONFIG_PPC64
EXPORT_SYMBOL(copy_4K_page);
#endif
-#ifndef __powerpc64__
-EXPORT_SYMBOL(__ide_mm_insl);
-EXPORT_SYMBOL(__ide_mm_outsw);
-EXPORT_SYMBOL(__ide_mm_insw);
-EXPORT_SYMBOL(__ide_mm_outsl);
-#endif
-
EXPORT_SYMBOL(_insb);
EXPORT_SYMBOL(_outsb);
EXPORT_SYMBOL(_insw_ns);
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S
index 44700bb..50b4bbd 100644
--- a/arch/ppc/kernel/misc.S
+++ b/arch/ppc/kernel/misc.S
@@ -768,7 +768,6 @@ _GLOBAL(_outsb)
bdnz 00b
blr
-_GLOBAL(__ide_mm_insw)
_GLOBAL(_insw_ns)
cmpwi 0,r5,0
mtctr r5
@@ -790,7 +789,6 @@ _GLOBAL(_insw_ns)
bdnz 00b
blr
-_GLOBAL(__ide_mm_outsw)
_GLOBAL(_outsw_ns)
cmpwi 0,r5,0
mtctr r5
@@ -812,7 +810,6 @@ _GLOBAL(_outsw_ns)
bdnz 00b
blr
-_GLOBAL(__ide_mm_insl)
_GLOBAL(_insl_ns)
cmpwi 0,r5,0
mtctr r5
@@ -834,7 +831,6 @@ _GLOBAL(_insl_ns)
bdnz 00b
blr
-_GLOBAL(__ide_mm_outsl)
_GLOBAL(_outsl_ns)
cmpwi 0,r5,0
mtctr r5
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index 2bd1f73..c8b65ca 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -115,11 +115,6 @@ EXPORT_SYMBOL(outw);
EXPORT_SYMBOL(outl);
EXPORT_SYMBOL(outsl);*/
-EXPORT_SYMBOL(__ide_mm_insl);
-EXPORT_SYMBOL(__ide_mm_outsw);
-EXPORT_SYMBOL(__ide_mm_insw);
-EXPORT_SYMBOL(__ide_mm_outsl);
-
EXPORT_SYMBOL(_insb);
EXPORT_SYMBOL(_outsb);
EXPORT_SYMBOL(_insw_ns);
diff --git a/include/asm-powerpc/ide.h b/include/asm-powerpc/ide.h
index b09b42a..c8390f9 100644
--- a/include/asm-powerpc/ide.h
+++ b/include/asm-powerpc/ide.h
@@ -12,6 +12,7 @@ #ifndef __powerpc64__
#include <linux/sched.h>
#include <asm/mpc8xx.h>
#endif
+#include <asm/io.h>
#ifndef MAX_HWIFS
#ifdef __powerpc64__
@@ -21,15 +22,14 @@ #define MAX_HWIFS 8
#endif
#endif
+#define __ide_mm_insw(p, a, c) _insw_ns((volatile u16 __iomem *)(p), (a), (c))
+#define __ide_mm_insl(p, a, c) _insl_ns((volatile u32 __iomem *)(p), (a), (c))
+#define __ide_mm_outsw(p, a, c) _outsw_ns((volatile u16 __iomem *)(p), (a), (c))
+#define __ide_mm_outsl(p, a, c) _outsl_ns((volatile u32 __iomem *)(p), (a), (c))
+
#ifndef __powerpc64__
#include <linux/hdreg.h>
#include <linux/ioport.h>
-#include <asm/io.h>
-
-extern void __ide_mm_insw(void __iomem *port, void *addr, u32 count);
-extern void __ide_mm_outsw(void __iomem *port, void *addr, u32 count);
-extern void __ide_mm_insl(void __iomem *port, void *addr, u32 count);
-extern void __ide_mm_outsl(void __iomem *port, void *addr, u32 count);
struct ide_machdep_calls {
int (*default_irq)(unsigned long base);
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h
index 0ee4843..51a5987 100644
--- a/include/asm-powerpc/io.h
+++ b/include/asm-powerpc/io.h
@@ -28,12 +28,6 @@ #include <asm/delay.h>
#include <asm-generic/iomap.h>
-#define __ide_mm_insw(p, a, c) _insw_ns((volatile u16 __iomem *)(p), (a), (c))
-#define __ide_mm_insl(p, a, c) _insl_ns((volatile u32 __iomem *)(p), (a), (c))
-#define __ide_mm_outsw(p, a, c) _outsw_ns((volatile u16 __iomem *)(p), (a), (c))
-#define __ide_mm_outsl(p, a, c) _outsl_ns((volatile u32 __iomem *)(p), (a), (c))
-
-
#define SIO_CONFIG_RA 0x398
#define SIO_CONFIG_RD 0x399
--
1.4.2.1
^ permalink raw reply related
* [PATCH] fix error in cpm2
From: Amy Fong @ 2006-09-19 3:06 UTC (permalink / raw)
To: linuxppc-dev
The following patch fixes a typo in cpm2.h resulting in a compile error.
Signed-off-by: Amy Fong <amy.fong@windriver.com>
Index: linux-2.6.18-rc6/include/asm-ppc/cpm2.h
===================================================================
--- linux-2.6.18-rc6.orig/include/asm-ppc/cpm2.h
+++ linux-2.6.18-rc6/include/asm-ppc/cpm2.h
@@ -1186,7 +1186,7 @@
#define FCC_MEM_OFFSET(x) (CPM_FCC_SPECIAL_BASE + (x*128))
#define FCC1_MEM_OFFSET FCC_MEM_OFFSET(0)
#define FCC2_MEM_OFFSET FCC_MEM_OFFSET(1)
-#define FCC2_MEM_OFFSET FCC_MEM_OFFSET(2)
+#define FCC3_MEM_OFFSET FCC_MEM_OFFSET(2)
#endif /* __CPM2__ */
#endif /* __KERNEL__ */
^ permalink raw reply
* [POWERPC] remove unused asm routines
From: Stephen Rothwell @ 2006-09-19 6:57 UTC (permalink / raw)
To: paulus; +Cc: ppc-dev
_insw, _outsw, _insl amd _outsl are all unused, so remove them.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/misc.S | 52 ------------------------
arch/powerpc/kernel/ppc_ksyms.c | 4 --
arch/ppc/kernel/misc.S | 84 ---------------------------------------
arch/ppc/kernel/ppc_ksyms.c | 4 --
include/asm-powerpc/io.h | 4 --
include/asm-ppc/io.h | 4 --
6 files changed, 0 insertions(+), 152 deletions(-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --git a/arch/powerpc/kernel/misc.S b/arch/powerpc/kernel/misc.S
index f770805..dd5f8e4 100644
--- a/arch/powerpc/kernel/misc.S
+++ b/arch/powerpc/kernel/misc.S
@@ -86,58 +86,6 @@ _GLOBAL(_outsb)
sync
blr
-_GLOBAL(_insw)
- sync
- cmpwi 0,r5,0
- mtctr r5
- subi r4,r4,2
- blelr-
-00: lhbrx r5,0,r3
- eieio
- sthu r5,2(r4)
- bdnz 00b
- twi 0,r5,0
- isync
- blr
-
-_GLOBAL(_outsw)
- cmpwi 0,r5,0
- mtctr r5
- subi r4,r4,2
- blelr-
- sync
-00: lhzu r5,2(r4)
- sthbrx r5,0,r3
- bdnz 00b
- sync
- blr
-
-_GLOBAL(_insl)
- sync
- cmpwi 0,r5,0
- mtctr r5
- subi r4,r4,4
- blelr-
-00: lwbrx r5,0,r3
- eieio
- stwu r5,4(r4)
- bdnz 00b
- twi 0,r5,0
- isync
- blr
-
-_GLOBAL(_outsl)
- cmpwi 0,r5,0
- mtctr r5
- subi r4,r4,4
- blelr-
- sync
-00: lwzu r5,4(r4)
- stwbrx r5,0,r3
- bdnz 00b
- sync
- blr
-
#ifdef CONFIG_PPC32
_GLOBAL(__ide_mm_insw)
#endif
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index b2edac8..314d611 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -104,10 +104,6 @@ #endif
EXPORT_SYMBOL(_insb);
EXPORT_SYMBOL(_outsb);
-EXPORT_SYMBOL(_insw);
-EXPORT_SYMBOL(_outsw);
-EXPORT_SYMBOL(_insl);
-EXPORT_SYMBOL(_outsl);
EXPORT_SYMBOL(_insw_ns);
EXPORT_SYMBOL(_outsw_ns);
EXPORT_SYMBOL(_insl_ns);
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S
index 2fa0075..44700bb 100644
--- a/arch/ppc/kernel/misc.S
+++ b/arch/ppc/kernel/misc.S
@@ -768,90 +768,6 @@ _GLOBAL(_outsb)
bdnz 00b
blr
-_GLOBAL(_insw)
- cmpwi 0,r5,0
- mtctr r5
- subi r4,r4,2
- blelr-
-00: lhbrx r5,0,r3
-01: eieio
-02: sthu r5,2(r4)
- ISYNC_8xx
- .section .fixup,"ax"
-03: blr
- .text
- .section __ex_table, "a"
- .align 2
- .long 00b, 03b
- .long 01b, 03b
- .long 02b, 03b
- .text
- bdnz 00b
- blr
-
-_GLOBAL(_outsw)
- cmpwi 0,r5,0
- mtctr r5
- subi r4,r4,2
- blelr-
-00: lhzu r5,2(r4)
-01: eieio
-02: sthbrx r5,0,r3
- ISYNC_8xx
- .section .fixup,"ax"
-03: blr
- .text
- .section __ex_table, "a"
- .align 2
- .long 00b, 03b
- .long 01b, 03b
- .long 02b, 03b
- .text
- bdnz 00b
- blr
-
-_GLOBAL(_insl)
- cmpwi 0,r5,0
- mtctr r5
- subi r4,r4,4
- blelr-
-00: lwbrx r5,0,r3
-01: eieio
-02: stwu r5,4(r4)
- ISYNC_8xx
- .section .fixup,"ax"
-03: blr
- .text
- .section __ex_table, "a"
- .align 2
- .long 00b, 03b
- .long 01b, 03b
- .long 02b, 03b
- .text
- bdnz 00b
- blr
-
-_GLOBAL(_outsl)
- cmpwi 0,r5,0
- mtctr r5
- subi r4,r4,4
- blelr-
-00: lwzu r5,4(r4)
-01: stwbrx r5,0,r3
-02: eieio
- ISYNC_8xx
- .section .fixup,"ax"
-03: blr
- .text
- .section __ex_table, "a"
- .align 2
- .long 00b, 03b
- .long 01b, 03b
- .long 02b, 03b
- .text
- bdnz 00b
- blr
-
_GLOBAL(__ide_mm_insw)
_GLOBAL(_insw_ns)
cmpwi 0,r5,0
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index d173540..2bd1f73 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -122,10 +122,6 @@ EXPORT_SYMBOL(__ide_mm_outsl);
EXPORT_SYMBOL(_insb);
EXPORT_SYMBOL(_outsb);
-EXPORT_SYMBOL(_insw);
-EXPORT_SYMBOL(_outsw);
-EXPORT_SYMBOL(_insl);
-EXPORT_SYMBOL(_outsl);
EXPORT_SYMBOL(_insw_ns);
EXPORT_SYMBOL(_outsw_ns);
EXPORT_SYMBOL(_insl_ns);
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h
index 9aaced5..0ee4843 100644
--- a/include/asm-powerpc/io.h
+++ b/include/asm-powerpc/io.h
@@ -151,10 +151,6 @@ #define readq_relaxed(addr) readq(addr)
extern void _insb(volatile u8 __iomem *port, void *buf, int ns);
extern void _outsb(volatile u8 __iomem *port, const void *buf, int ns);
-extern void _insw(volatile u16 __iomem *port, void *buf, int ns);
-extern void _outsw(volatile u16 __iomem *port, const void *buf, int ns);
-extern void _insl(volatile u32 __iomem *port, void *buf, int nl);
-extern void _outsl(volatile u32 __iomem *port, const void *buf, int nl);
extern void _insw_ns(volatile u16 __iomem *port, void *buf, int ns);
extern void _outsw_ns(volatile u16 __iomem *port, const void *buf, int ns);
extern void _insl_ns(volatile u32 __iomem *port, void *buf, int nl);
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h
index fb0a8fc..9fac420 100644
--- a/include/asm-ppc/io.h
+++ b/include/asm-ppc/io.h
@@ -329,10 +329,6 @@ #define outl_p(val, port) outl((val), (p
extern void _insb(volatile u8 __iomem *port, void *buf, int ns);
extern void _outsb(volatile u8 __iomem *port, const void *buf, int ns);
-extern void _insw(volatile u16 __iomem *port, void *buf, int ns);
-extern void _outsw(volatile u16 __iomem *port, const void *buf, int ns);
-extern void _insl(volatile u32 __iomem *port, void *buf, int nl);
-extern void _outsl(volatile u32 __iomem *port, const void *buf, int nl);
extern void _insw_ns(volatile u16 __iomem *port, void *buf, int ns);
extern void _outsw_ns(volatile u16 __iomem *port, const void *buf, int ns);
extern void _insl_ns(volatile u32 __iomem *port, void *buf, int nl);
--
1.4.2.1
^ permalink raw reply related
* Re: problems with PLB_TEMAC & xilinx_gige driver under linux 2.4 ...
From: David H. Lynch Jr. @ 2006-09-19 5:30 UTC (permalink / raw)
To: rimas; +Cc: linuxppc-embedded
In-Reply-To: <web-1997652@cnmat.berkeley.edu>
I do nto know much about Xilinx under 2.4 but I am pretty sure the
gemac and the plb temac are similar but different
NIC's.
rimas wrote:
> Greetings,
>
> i am having problems using the xilinx_gige driver under linux 2.4.26 running
> on a Virtex-4 FX12 Mini Module board (from avnet). I am using the plb_temac
> and hard_temac blocks under ISE/EDK 8.1.02.
>
> the machine boots fine and the network interface seems to work okay but it
> randomly panics sometimes (rather quickly if i'm generating network traffic):
>
> Oops: Exception in kernel mode, sig: 4
> NIP: C00DA340 XER: 20000000 LR: C00D34F8 SP: C3945B20 REGS: c3945a70 TRAP:
> 0700
> Not tainted
> MSR: 00009030 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
> TASK = c3944000[52] 'telnetd' Last syscall: 4
> last math 00000000 last altivec 00000000
> GPR00: 00000004 C3945B20 C3944000 C02E49F4 C02E4800 00000004 00000001 C0456260
> GPR08: C0177424 00000031 C50D8000 00021F03 0008C8E4 10122AA8 00000000 C01A0000
> GPR16: 00000000 0000001A 00000000 C3945F18 00001032 03945BA0 00000000 C00038E0
> GPR24: C0004800 00000020 C04C06E0 C01864E0 C3945BB0 0000001F 00000000 C02E49F4
> Call backtrace:
> C0190000 C00D34F8 C0004748 C000483C C00038E0 C00D398C C00F8094
> C00EE04C C01039B0 C0104D70 C0115570 C01163A8 C010A600 C012A61C
> C00E52F4 C00E5574 C003AB2C C000369C 100572BC 10005064 10005108
> 0FD9221C 00000000
> Kernel panic: Aiee, killing interrupt handler!
> In interrupt handler - not syncing
> <0>Rebooting in 180 seconds..
>
> it always causes a trap on the same instruction (c00da340) which is inside of
> XTemac_IntrFifoHandler()
>
> c00da330: 81 6a 00 28 lwz r11,40(r10)
> c00da334: 0c 0b 00 00 twi 0,r11,0
> c00da338: 4c 00 01 2c isync
> c00da33c: 81 2a 00 20 lwz r9,32(r10)
> c00da340: 0c 09 00 00 twi 0,r9,0
> c00da344: 4c 00 01 2c isync
>
> this code corresponds to two consecutive in_be32() calls
>
> extern inline unsigned in_be32(volatile unsigned *addr)
> {
> unsigned ret;
>
> __asm__ __volatile__("lwz%U1%X1 %0,%1;\n"
> "twi 0,%0,0;\n"
> "isync" : "=r" (ret) : "m" (*addr));
> return ret;
> }
>
> resulting from this line of code:
>
> CorePending = XTemac_mGetIpifReg(XTE_IPIER_OFFSET) &
> XTemac_mGetIpifReg(XTE_IPISR_OFFSET);
>
> i recently got a new mini module that has the later stepping of the V4FX12
> part (PVR 20011470) so I got rid of the patch i had applied to disable the
> caches (which was required on the earlier stepping of the part to get the
> board to even boot reliably).
>
> I still have the patch applied which sets bits 1 and 3 in the CCR0 register.
>
> does anyone have any clue as to what's going on and what to do about it ?
>
> this problem seems rather non-deterministic and weird, i can't help but think
> its likely related to some silicon errata or something but nothing on this
> page
>
> http://www.xilinx.com/xlnx/xil_ans_display.jsp?iCountryID=1&iLanguageID=1&getPagePath=20658&BV_SessionID=@@@@0135296752.1158623889@@@@&BV_EngineID=cccdaddikmdkkifcefeceihdffhdfkf.0
>
> seems to apply
>
> any advice is very greatly appreciated !
>
> -rimas
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
--
Dave Lynch DLA Systems
Software Development: Embedded Linux
717.627.3770 dhlii@dlasys.net http://www.dlasys.net
fax: 1.253.369.9244 Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.
"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein
^ permalink raw reply
* [POWERPC] remove unused io accessors
From: Stephen Rothwell @ 2006-09-19 4:56 UTC (permalink / raw)
To: paulus; +Cc: ppc-dev
The io accessors insw_ns, outsw_ns, insl_ns and outsl_ns are unused
(except for one unnecessary use in drivers/net/3c509.c that is addressed
in a previous patch) and are only defined in powerpc/ppc, so remove them.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/ppc/syslib/m8260_pci_erratum9.c | 16 ----------------
include/asm-powerpc/io.h | 13 +------------
include/asm-ppc/io.h | 10 ----------
include/asm-ppc/mpc8260_pci9.h | 4 ----
4 files changed, 1 insertions(+), 42 deletions(-)
The 3c509 driver will not build after this patch without the patch I have
posted previously to netdev.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --git a/arch/ppc/syslib/m8260_pci_erratum9.c b/arch/ppc/syslib/m8260_pci_erratum9.c
index 974581e..5475709 100644
--- a/arch/ppc/syslib/m8260_pci_erratum9.c
+++ b/arch/ppc/syslib/m8260_pci_erratum9.c
@@ -339,20 +339,6 @@ void insl(unsigned port, void *buf, int
idma_pci9_read((u8 *)buf, (u8 *)addr, nl*sizeof(u32), sizeof(u32), 0);
}
-void insw_ns(unsigned port, void *buf, int ns)
-{
- u8 *addr = (u8 *)(port + _IO_BASE);
-
- idma_pci9_read((u8 *)buf, (u8 *)addr, ns*sizeof(u16), sizeof(u16), 0);
-}
-
-void insl_ns(unsigned port, void *buf, int nl)
-{
- u8 *addr = (u8 *)(port + _IO_BASE);
-
- idma_pci9_read((u8 *)buf, (u8 *)addr, nl*sizeof(u32), sizeof(u32), 0);
-}
-
void *memcpy_fromio(void *dest, unsigned long src, size_t count)
{
unsigned long pa = iopa((unsigned long) src);
@@ -373,8 +359,6 @@ EXPORT_SYMBOL(inl);
EXPORT_SYMBOL(insb);
EXPORT_SYMBOL(insw);
EXPORT_SYMBOL(insl);
-EXPORT_SYMBOL(insw_ns);
-EXPORT_SYMBOL(insl_ns);
EXPORT_SYMBOL(memcpy_fromio);
#endif /* ifdef CONFIG_8260_PCI9 */
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h
index 212428d..9aaced5 100644
--- a/include/asm-powerpc/io.h
+++ b/include/asm-powerpc/io.h
@@ -76,8 +76,7 @@ #define outl(data,addr) writel(data,((v
#define insb(port, buf, ns) _insb((u8 __iomem *)((port)+pci_io_base), (buf), (ns))
#define insw(port, buf, ns) _insw_ns((u8 __iomem *)((port)+pci_io_base), (buf), (ns))
#define insl(port, buf, nl) _insl_ns((u8 __iomem *)((port)+pci_io_base), (buf), (nl))
-#define insw_ns(port, buf, ns) _insw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns))
-#define insl_ns(port, buf, nl) _insl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl))
+
#else
static inline unsigned char __raw_readb(const volatile void __iomem *addr)
@@ -138,8 +137,6 @@ #define outl(val, port) eeh_outl(val, (
#define insb(port, buf, ns) eeh_insb((port), (buf), (ns))
#define insw(port, buf, ns) eeh_insw_ns((port), (buf), (ns))
#define insl(port, buf, nl) eeh_insl_ns((port), (buf), (nl))
-#define insw_ns(port, buf, ns) eeh_insw_ns((port), (buf), (ns))
-#define insl_ns(port, buf, nl) eeh_insl_ns((port), (buf), (nl))
#endif
@@ -180,14 +177,6 @@ #define outw_p(val, port) (udelay(
#define inl_p(port) inl(port)
#define outl_p(val, port) (udelay(1), outl((val), (port)))
-/*
- * The *_ns versions below don't do byte-swapping.
- * Neither do the standard versions now, these are just here
- * for older code.
- */
-#define outsw_ns(port, buf, ns) _outsw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns))
-#define outsl_ns(port, buf, nl) _outsl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl))
-
#define IO_SPACE_LIMIT ~(0UL)
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h
index 680555b..fb0a8fc 100644
--- a/include/asm-ppc/io.h
+++ b/include/asm-ppc/io.h
@@ -338,16 +338,6 @@ extern void _outsw_ns(volatile u16 __iom
extern void _insl_ns(volatile u32 __iomem *port, void *buf, int nl);
extern void _outsl_ns(volatile u32 __iomem *port, const void *buf, int nl);
-/*
- * The *_ns versions below don't do byte-swapping.
- * Neither do the standard versions now, these are just here
- * for older code.
- */
-#define insw_ns(port, buf, ns) _insw_ns((port)+___IO_BASE, (buf), (ns))
-#define outsw_ns(port, buf, ns) _outsw_ns((port)+___IO_BASE, (buf), (ns))
-#define insl_ns(port, buf, nl) _insl_ns((port)+___IO_BASE, (buf), (nl))
-#define outsl_ns(port, buf, nl) _outsl_ns((port)+___IO_BASE, (buf), (nl))
-
#define IO_SPACE_LIMIT ~0
diff --git a/include/asm-ppc/mpc8260_pci9.h b/include/asm-ppc/mpc8260_pci9.h
index 26b3f6e..9f71768 100644
--- a/include/asm-ppc/mpc8260_pci9.h
+++ b/include/asm-ppc/mpc8260_pci9.h
@@ -30,8 +30,6 @@ #undef insl
#undef inb
#undef inw
#undef inl
-#undef insw_ns
-#undef insl_ns
#undef memcpy_fromio
extern int readb(volatile unsigned char *addr);
@@ -43,8 +41,6 @@ extern void insl(unsigned port, void *bu
extern int inb(unsigned port);
extern int inw(unsigned port);
extern unsigned inl(unsigned port);
-extern void insw_ns(unsigned port, void *buf, int ns);
-extern void insl_ns(unsigned port, void *buf, int nl);
extern void *memcpy_fromio(void *dest, unsigned long src, size_t count);
#endif /* !__CONFIG_8260_PCI9_DEFS */
--
1.4.2.1
^ permalink raw reply related
* Fw: [PATCH] Remove powerpc specific parts of 3c509 driver
From: Stephen Rothwell @ 2006-09-19 4:54 UTC (permalink / raw)
To: ppc-dev
This patch has been sent to netdev and is needed to build 3c509 after my following patch (that removes some io accessor functions).
Begin forwarded message:
Date: Tue, 19 Sep 2006 11:54:49 +1000
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: netdev@vger.kernel.org
Cc: akpm@osdl.org, jgarzik@pobox.com
Subject: [PATCH] Remove powerpc specific parts of 3c509 driver
On powerpc and ppc, insl_ns and insl are identical as are outsl_ns and
outsl, so remove the conditional use of insl_ns and outsl_ns.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
drivers/net/3c509.c | 9 ---------
1 files changed, 0 insertions(+), 9 deletions(-)
This is in anticipation of removing the insl_ns and outsl_ns definitions
which are powerpc sepcific patches.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c
index cbdae54..add6381 100644
--- a/drivers/net/3c509.c
+++ b/drivers/net/3c509.c
@@ -879,11 +879,7 @@ #endif
outw(skb->len, ioaddr + TX_FIFO);
outw(0x00, ioaddr + TX_FIFO);
/* ... and the packet rounded to a doubleword. */
-#ifdef __powerpc__
- outsl_ns(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2);
-#else
outsl(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2);
-#endif
dev->trans_start = jiffies;
if (inw(ioaddr + TX_FREE) > 1536)
@@ -1103,13 +1099,8 @@ el3_rx(struct net_device *dev)
skb_reserve(skb, 2); /* Align IP on 16 byte */
/* 'skb->data' points to the start of sk_buff data area. */
-#ifdef __powerpc__
- insl_ns(ioaddr+RX_FIFO, skb_put(skb,pkt_len),
- (pkt_len + 3) >> 2);
-#else
insl(ioaddr + RX_FIFO, skb_put(skb,pkt_len),
(pkt_len + 3) >> 2);
-#endif
outw(RxDiscard, ioaddr + EL3_CMD); /* Pop top Rx packet. */
skb->protocol = eth_type_trans(skb,dev);
--
1.4.2.1
^ permalink raw reply related
* events/0 issue
From: jack zhao @ 2006-09-19 3:48 UTC (permalink / raw)
To: linuxppc-embedded
Hi,
I encounter one problem when using PPC8347 system. I am using
gigafar driver in linux kernel 2.6.13.4 version, but when I make the driver
working, I start the samba function, and copy copy file from Windows PC to
PPC system, when copy action starts, the events/0 occupy 40% CPU usage,
while I using another system it is also linux 2.6.13, when copying file to
system, events only occupy 1%, most of CPU loading are in network. Could
some one tell me where is the optimization for that? Thanks.
Best Wishes
Jack Zhao
USI SH R&D Center 86-021-58966996-1122
^ permalink raw reply
* Re: [PATCH] Start arch/powerpc/boot code reorganization
From: Paul Mackerras @ 2006-09-19 4:29 UTC (permalink / raw)
To: michael; +Cc: linuxppc-dev
In-Reply-To: <1158639740.32015.114.camel@localhost.localdomain>
Michael Ellerman writes:
> Where do I get ops.h?
Oops... here it is.
Paul.
diff --git /dev/null b/arch/powerpc/boot/ops.h
--- /dev/null 2006-09-18 11:33:23.687982711 +1000
+++ b/arch/powerpc/boot/ops.h 2006-09-19 14:09:38.000000000 +1000
@@ -0,0 +1,100 @@
+/*
+ * Global definition of all the bootwrapper operations.
+ *
+ * Author: Mark A. Greer <mgreer@mvista.com>
+ *
+ * 2006 (c) MontaVista Software, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+#ifndef _PPC_BOOT_OPS_H_
+#define _PPC_BOOT_OPS_H_
+
+#include "types.h"
+
+#define COMMAND_LINE_SIZE 512
+#define MAX_PATH_LEN 256
+#define MAX_PROP_LEN 256 /* What should this be? */
+
+/* Platform specific operations */
+struct platform_ops {
+ void (*fixups)(void);
+ void * (*malloc)(u32 size);
+ void (*free)(void *ptr, u32 size);
+ void (*exit)(void);
+};
+extern struct platform_ops platform_ops;
+
+/* Device Tree operations */
+struct dt_ops {
+ void * (*finddevice)(const char *name);
+ int (*getprop)(const void *node, const char *name, void *buf,
+ const int buflen);
+ int (*setprop)(const void *node, const char *name,
+ const void *buf, const int buflen);
+ u64 (*translate_addr)(const char *path, const u32 *in_addr,
+ const u32 addr_len);
+ void (*call_kernel)(void *entry_addr, unsigned long a1,
+ unsigned long a2, void *promptr, void *sp);
+};
+extern struct dt_ops dt_ops;
+
+/* Console operations */
+struct console_ops {
+ int (*open)(void);
+ void (*write)(char *buf, int len);
+ void (*edit_cmdline)(char *buf, int len);
+ void (*close)(void);
+ void *data;
+};
+extern struct console_ops console_ops;
+
+/* Serial console operations */
+struct serial_console_data {
+ int (*open)(void);
+ void (*putc)(unsigned char c);
+ unsigned char (*getc)(void);
+ u8 (*tstc)(void);
+ void (*close)(void);
+};
+
+extern int platform_init(void *promptr);
+extern void simple_alloc_init(void);
+extern void ft_init(void *dt_blob);
+extern int serial_console_init(void);
+
+static inline void *finddevice(const char *name)
+{
+ return (dt_ops.finddevice) ? dt_ops.finddevice(name) : NULL;
+}
+
+static inline int getprop(void *devp, const char *name, void *buf, int buflen)
+{
+ return (dt_ops.getprop) ? dt_ops.getprop(devp, name, buf, buflen) : -1;
+}
+
+static inline int setprop(void *devp, const char *name, void *buf, int buflen)
+{
+ return (dt_ops.setprop) ? dt_ops.setprop(devp, name, buf, buflen) : -1;
+}
+
+static inline void *malloc(u32 size)
+{
+ return (platform_ops.malloc) ? platform_ops.malloc(size) : NULL;
+}
+
+static inline void free(void *ptr, u32 size)
+{
+ if (platform_ops.free)
+ platform_ops.free(ptr, size);
+}
+
+static inline void exit(void)
+{
+ if (platform_ops.exit)
+ platform_ops.exit();
+ for(;;);
+}
+
+#endif /* _PPC_BOOT_OPS_H_ */
^ permalink raw reply
* Re: [PATCH] Start arch/powerpc/boot code reorganization
From: Michael Ellerman @ 2006-09-19 4:22 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <17679.25131.721027.405431@cargo.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1142 bytes --]
On Tue, 2006-09-19 at 13:21 +1000, Paul Mackerras wrote:
> This is a reworked version of Mark's patches 1/6 and 2/6. This boots
> on powermac (newworld) and pseries (power5 partition) at least.
>
> --- /dev/null 2006-09-18 11:33:23.687982711 +1000
> +++ arch/powerpc/boot/of.c 2006-09-18 17:35:59.000000000 +1000
> @@ -0,0 +1,283 @@
> +/*
> + * Copyright (C) Paul Mackerras 1997.
> + *
> + * 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 <stdarg.h>
> +#include <stddef.h>
> +#include "types.h"
> +#include "elf.h"
> +#include "string.h"
> +#include "stdio.h"
> +#include "page.h"
> +#include "ops.h"
Where do I get ops.h?
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox