* Re: ppc -> powerpc porting
From: Guennadi Liakhovetski @ 2006-07-10 19:43 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-dev
In-Reply-To: <20060710214158.1d8dcf2c@vitb.ru.mvista.com>
On Mon, 10 Jul 2006, Vitaly Bordug wrote:
> On Mon, 10 Jul 2006 12:14:24 -0500
> "Rune Torgersen" <runet@innovsys.com> wrote:
>
> > To make my life a little easier: Does anybody have a list of stuff to
> > watch out for/need to do when porting a board from ppc to powerpc?
> > The board uses a Freescale 8265 and runs under 2.6.17, using platfrom
> > device support for accessing fs_enet driver.
Look at Documentation/powerpc/booting-without-of.txt - there's a section
on that. I am attempting the same sort of conversion for an embedded
mpc8241 board, so, would be glad to share ideas / experiences, I think, we
won't offend others if we just discuss our problems on this list, maybe
even somebody else will find it useful:-)) The first step I am trying to
perform is to switch to the device-tree boot. Does your board already use
it or does it have OF?
> We have mpc8272 under arch/powerpc as work-in-progress, latest fs_enet being merged now.
>
> I think it'll be a week or 2 before first submit, so it may make sense just to wait a bit :)
Yep, you could wait, but, you see, an example will be great, but, I am
afraid, all ports will be pretty different, so, we'll all have to "invent
the wheel." Is your code available somewhere in some repository to have a
look at?
Thanks
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply
* Re: Linux v2.6.18-rc1
From: Steve Fox @ 2006-07-10 18:30 UTC (permalink / raw)
To: linuxppc-dev; +Cc: linux-kernel
In-Reply-To: <1152549482.2658.29.camel@flooterbu>
On Mon, 10 Jul 2006 11:38:02 -0500, Steve Fox wrote:
> Also, booting with ide=nodma, as Alan suggested to Will, did not help.
I'm not sure if it was due to using the nodma parameter or not, but I did
get a few more details during this boot. No idea if they're useful or not.
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 ide:
Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
AMD8111: IDE controller at PCI slot 0000:00:04.1 AMD8111: chipset revision
3 AMD8111: 0000:00:04.1 (rev 03) UDMA133 controller AMD8111: 100% native
mode on irq 17
ide0: BM-DMA at 0x7c00-0x7c07, BIOS settings: hda:pio, hdb:pio ide1:
BM-DMA at 0x7c08-0x7c0f, BIOS settings: hdc:pio, hdd:pio
hda: TOSHIBA MK4019GAXB, ATA DISK drive ide0 at 0x7400-0x7407,0x6c02 on
irq 17 hda: max request size: 128KiB
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: 78140160 sectors (40007 MB), CHS=65535/16/63 hda: lost interrupt hda:
cache flushes supported
hda:<4>hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda1 hda2 hda3 hda4 <<4>hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda5<4>hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
--
Steve Fox
IBM Linux Technology Center
^ permalink raw reply
* Re: ppc -> powerpc porting
From: Vitaly Bordug @ 2006-07-10 17:41 UTC (permalink / raw)
To: Rune Torgersen; +Cc: linuxppc-dev
In-Reply-To: <DCEAAC0833DD314AB0B58112AD99B93B0189DE5E@ismail.innsys.innovsys.com>
On Mon, 10 Jul 2006 12:14:24 -0500
"Rune Torgersen" <runet@innovsys.com> wrote:
> To make my life a little easier: Does anybody have a list of stuff to
> watch out for/need to do when porting a board from ppc to powerpc?
> The board uses a Freescale 8265 and runs under 2.6.17, using platfrom
> device support for accessing fs_enet driver.
>
We have mpc8272 under arch/powerpc as work-in-progress, latest fs_enet being merged now.
I think it'll be a week or 2 before first submit, so it may make sense just to wait a bit :)
--
Sincerely,
Vitaly
^ permalink raw reply
* ppc -> powerpc porting
From: Rune Torgersen @ 2006-07-10 17:14 UTC (permalink / raw)
To: linuxppc-dev
To make my life a little easier: Does anybody have a list of stuff to
watch out for/need to do when porting a board from ppc to powerpc?
The board uses a Freescale 8265 and runs under 2.6.17, using platfrom
device support for accessing fs_enet driver.
^ permalink raw reply
* Re: Linux v2.6.18-rc1
From: Steve Fox @ 2006-07-10 16:38 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <1152441242.4128.33.camel@localhost.localdomain>
On Sun, 2006-07-09 at 20:34 +1000, Benjamin Herrenschmidt wrote:
> On Fri, 2006-07-07 at 10:41 -0500, Steve Fox wrote:
> > We've got a ppc64 machine that won't boot with this due to an IDE error.
>
> What machine precisely ?
It's called bl5-6 in ABAT and lists itself as a 970 (8842-P1Z).
Also, booting with ide=nodma, as Alan suggested to Will, did not help.
> > [snip]
> > Freeing unused kernel memory: 256k freed
> > running (1:2) /init autobench_args: ABAT:1152213829
> >
> > creating device nodes .hda: lost interrupt
> > hda: lost interrupt
> > hda: lost interrupt
> > hda: lost interrupt
> > hda: lost interrupt
> > hda: lost interrupt
> > hda: lost interrupt
> > hda: lost interrupt
> > hda: lost interrupt
> >
>
--
Steve Fox
IBM Linux Technology Center
^ permalink raw reply
* Re: [PATCH 6/6] Account for memmap and optionally the kernel image as holes
From: Mel Gorman @ 2006-07-10 15:31 UTC (permalink / raw)
To: David Howells
Cc: akpm, davej, tony.luck, linuxppc-dev, ak, bob.picco, linux-kernel,
linux-mm
In-Reply-To: <7220.1152531055@warthog.cambridge.redhat.com>
On (10/07/06 12:30), David Howells didst pronounce:
> Mel Gorman <mel@csn.ul.ie> wrote:
>
> > +unsigned long __initdata dma_reserve;
>
> Should this be static? Or should it be predeclared in a header file
> somewhere?
>
It should be static as it's set by set_dma_reserve(). Thanks.
diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.17-mm6-106-account_kernel_mmap/mm/page_alloc.c linux-2.6.17-mm6-107-fixstatic/mm/page_alloc.c
--- linux-2.6.17-mm6-106-account_kernel_mmap/mm/page_alloc.c 2006-07-10 15:55:09.000000000 +0100
+++ linux-2.6.17-mm6-107-fixstatic/mm/page_alloc.c 2006-07-10 16:03:26.000000000 +0100
@@ -87,7 +87,7 @@ int min_free_kbytes = 1024;
unsigned long __meminitdata nr_kernel_pages;
unsigned long __meminitdata nr_all_pages;
-unsigned long __initdata dma_reserve;
+static unsigned long __initdata dma_reserve;
#ifdef CONFIG_ARCH_POPULATES_NODE_MAP
/*
^ permalink raw reply
* Re: Linux v2.6.18-rc1
From: Alan Cox @ 2006-07-10 14:40 UTC (permalink / raw)
To: will_schmidt; +Cc: Steve Fox, linux-kernel, linuxppc-dev
In-Reply-To: <1152537672.28828.4.camel@farscape.rchland.ibm.com>
Ar Llu, 2006-07-10 am 08:21 -0500, ysgrifennodd Will Schmidt:
> On Sun, 2006-09-07 at 20:34 +1000, Benjamin Herrenschmidt wrote:
> > On Fri, 2006-07-07 at 10:41 -0500, Steve Fox wrote:
> > > We've got a ppc64 machine that won't boot with this due to an IDE error.
> >
> > What machine precisely ?
>
> I see a slightly more verbose version on a JS20 blade.
>
> hda: dma_timer_expiry: dma status == 0x24
> hda: DMA interrupt recovery
> hda: lost interrupt
That in repeat generally means the IRQ logic on the platform has been
broken. If we don't get interrupts we don't work very well.
Also check if booting with "nodma" set on the relevant ide interface
makes a difference. Just to be sure. If it does then submit patches to
fix the bug.
Alan
^ permalink raw reply
* Re: MPC5200 boot giving "request_module: runaway loop modprobe binfmt-4c46" errors
From: gturnock @ 2006-07-10 13:48 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-embedded, gturnock
[-- Attachment #1: Type: text/html, Size: 2176 bytes --]
^ permalink raw reply
* Re: Linux v2.6.18-rc1
From: Will Schmidt @ 2006-07-10 13:21 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Steve Fox, linuxppc-dev, linux-kernel
In-Reply-To: <1152441242.4128.33.camel@localhost.localdomain>
On Sun, 2006-09-07 at 20:34 +1000, Benjamin Herrenschmidt wrote:
> On Fri, 2006-07-07 at 10:41 -0500, Steve Fox wrote:
> > We've got a ppc64 machine that won't boot with this due to an IDE error.
>
> What machine precisely ?
I see a slightly more verbose version on a JS20 blade.
hda: dma_timer_expiry: dma status == 0x24
hda: DMA interrupt recovery
hda: lost interrupt
>
> > [snip]
> > Freeing unused kernel memory: 256k freed
> > running (1:2) /init autobench_args: ABAT:1152213829
> >
> > creating device nodes .hda: lost interrupt
> > hda: lost interrupt
> > hda: lost interrupt
> > hda: lost interrupt
> > hda: lost interrupt
> > hda: lost interrupt
> > hda: lost interrupt
> > hda: lost interrupt
> > hda: lost interrupt
> >
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply
* Re: [PATCH] Make snd-aoa cope with lack of line-output-detect property
From: Johannes Berg @ 2006-07-10 13:11 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <17586.19091.512322.908434@cargo.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 544 bytes --]
On Mon, 2006-07-10 at 22:39 +1000, Paul Mackerras wrote:
> The snd-aoa stuff falls over on my G4 powerbook (1.5GHz Albook) with a
> null pointer dereference in of_find_property. It turns out that this
> was because it couldn't find a device node for the line-output detect
> GPIO. This patch fixes it.
That's interesting. I thought I was running this code. Hmm :>
I should probably drop the get_irq function completely and do that in
line. And yes, that should be NO_IRQ I guess. I'll prepare a patch
later.
Thanks,
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* Re: patches added to powerpc.git tree
From: Johannes Berg @ 2006-07-10 13:00 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <17586.18872.10354.559506@cargo.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 352 bytes --]
On Mon, 2006-07-10 at 22:36 +1000, Paul Mackerras wrote:
> I assumed it would go via the alsa tree...
It couldn't because it depends on stuff that isn't in the alsa tree.
> Do you want it to go via the powerpc tree? I'm on vacation and 1000km
> from home, so the latency would be pretty long. :)
No, went through Andrew now.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* Re: [PATCH 15/20] [powerpc, netdevices] Constify & voidify get_property()
From: Paul Mackerras @ 2006-07-10 12:43 UTC (permalink / raw)
To: Jeremy Kerr; +Cc: linuxppc-dev, cbe-oss-dev
In-Reply-To: <200607101340.22068.jk@ozlabs.org>
Jeremy Kerr writes:
> Hm, that's odd - you mean the patch doesn't apply, or that it introduces
> incorrect whitepace? I can apply this patch (from patchwork or the list
> archives) without problems.
The git-applymbox script says the patch is corrupt, because several of
the context lines that should start with <space><tab> had the space
removed.
Paul.
^ permalink raw reply
* [PATCH] Make snd-aoa cope with lack of line-output-detect property
From: Paul Mackerras @ 2006-07-10 12:39 UTC (permalink / raw)
To: Johannes Berg; +Cc: linuxppc-dev
The snd-aoa stuff falls over on my G4 powerbook (1.5GHz Albook) with a
null pointer dereference in of_find_property. It turns out that this
was because it couldn't find a device node for the line-output detect
GPIO. This patch fixes it.
Signed-off-by: Paul Mackerras <paulus@samba.org>
---
diff --git a/sound/aoa/core/snd-aoa-gpio-feature.c b/sound/aoa/core/snd-aoa-gpio-feature.c
index 7ae0c0b..e35a1c6 100644
--- a/sound/aoa/core/snd-aoa-gpio-feature.c
+++ b/sound/aoa/core/snd-aoa-gpio-feature.c
@@ -112,7 +112,10 @@ static struct device_node *get_gpio(char
static void get_irq(struct device_node * np, int *irqptr)
{
- *irqptr = irq_of_parse_and_map(np, 0);
+ if (np)
+ *irqptr = irq_of_parse_and_map(np, 0);
+ else
+ *irqptr = -1; /* XXX should this be NO_IRQ? */
}
/* 0x4 is outenable, 0x1 is out, thus 4 or 5 */
@@ -322,7 +325,7 @@ static int ftr_set_notify(struct gpio_ru
return -EINVAL;
}
- if (irq == -1)
+ if (irq == -1) /* XXX should this be NO_IRQ? */
return -ENODEV;
mutex_lock(¬if->mutex);
^ permalink raw reply related
* Re: patches added to powerpc.git tree
From: Paul Mackerras @ 2006-07-10 12:36 UTC (permalink / raw)
To: Johannes Berg; +Cc: linuxppc-dev
In-Reply-To: <1152272346.15068.39.camel@localhost>
Johannes Berg writes:
> I notice you haven't picked up Andreas' irq conversion fix, was that
> intentional? Or did I miss it going in elsewhere?
I assumed it would go via the alsa tree...
Do you want it to go via the powerpc tree? I'm on vacation and 1000km
from home, so the latency would be pretty long. :)
Paul.
^ permalink raw reply
* Re: Re: Failed to initialize the ethernet on PPC4 40GP
From: Denny @ 2006-07-10 11:41 UTC (permalink / raw)
To: stefan roese, linuxppc-embedded
In-Reply-To: <200607101242.29359.sr@denx.de>
[-- Attachment #1: Type: text/plain, Size: 647 bytes --]
Sorry, It is the UBoot question, I will address this to the UBoot maillist the next time!
After I add the environment valiable "ipaddr", this message disappeared,but the ethernet still not work (the MII on my custom board work on RMII mode).
u-boot => tftp 0x100000 u-boot.bin
miiphy_register: non unique device name 'ppc_4xx_eth0'
PHY speed read failed, assuming 10bT
PHY duplex read failed, assuming half duplex
ENET Speed is 10 Mbps - HALF duplex connection
TFTP from server 192.168.65.235; our IP address is 192.168.65.239
Filename 'u-boot.bin'.
Load address: 0x100000
Loading: T T T T T T T T T T
Retry count exceeded; starting again
- Denny
[-- Attachment #2: Type: text/html, Size: 1119 bytes --]
^ permalink raw reply
* Re: [PATCH 6/6] Account for memmap and optionally the kernel image as holes
From: David Howells @ 2006-07-10 11:30 UTC (permalink / raw)
To: Mel Gorman
Cc: akpm, davej, tony.luck, linuxppc-dev, ak, bob.picco, linux-kernel,
linux-mm
In-Reply-To: <20060708111243.28664.74956.sendpatchset@skynet.skynet.ie>
Mel Gorman <mel@csn.ul.ie> wrote:
> +unsigned long __initdata dma_reserve;
Should this be static? Or should it be predeclared in a header file
somewhere?
David
^ permalink raw reply
* Re: Failed to initialize the ethernet on PPC4 40GP
From: Stefan Roese @ 2006-07-10 10:42 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <44B220CB.000108.31873@bj163app12.163.com>
Hi Denny,
On Monday 10 July 2006 11:41, Denny wrote:
> Does anyone ecounter this failure,it always tell me "No ethernet
> found", why?
Is this question linux or U-Boot related? If linux then you may have not
enabled the 4xx ethernet support in your kernel configuration. If U-Boot,
then please set the MAC addresses (ethaddr and eth1addr) and reset the board.
And if it really is an U-Boot question, you should address the correct
mailinglist.
Best regards,
Stefan
^ permalink raw reply
* Re: [Alsa-devel] snd-aoa: Add sound-layout-36 alias
From: Takashi Iwai @ 2006-07-10 10:22 UTC (permalink / raw)
To: Johannes Berg; +Cc: alsa-devel, linuxppc-dev list
In-Reply-To: <1152292943.4792.12.camel@localhost>
At Fri, 07 Jul 2006 19:22:23 +0200,
Johannes Berg wrote:
>
> On Fri, 2006-07-07 at 19:18 +0200, Andreas Schwab wrote:
> >
> > +MODULE_ALIAS("sound-layout-36");
>
> Heh. I just sent a patch (in my series) that adds all the ones that were
> still missing :)
Well, I haven't received new patches yet...
Takashi
^ permalink raw reply
* Failed to initialize the ethernet on PPC4 40GP
From: Denny @ 2006-07-10 9:41 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 95 bytes --]
HI,
Does anyone ecounter this failure,it always tell me "No ethernet found", why?
- Denny
[-- Attachment #2: Type: text/html, Size: 547 bytes --]
^ permalink raw reply
* Re: [POWERPC] Make OF interrupt tree parsing more strict
From: Benjamin Herrenschmidt @ 2006-07-10 9:24 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-dev list, Linus Torvalds, Paul Mackerras
In-Reply-To: <1152513753.1576.64.camel@localhost.localdomain>
On Mon, 2006-07-10 at 16:42 +1000, Benjamin Herrenschmidt wrote:
> This patch fixes a bit of boundchecking in the new Open Firmware
> interrupt tree parsing code. It's important that it fails when things
> aren't correct in order to trigger fallback mecanisms that are necessary
> to make some machines work properly.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Oh, and I forgot here:
From: Segher Boessenkool <segher@kernel.crashing.org>
Sorry about that !
> Index: linux-irq-work/arch/powerpc/kernel/prom_parse.c
> ===================================================================
> --- linux-irq-work.orig/arch/powerpc/kernel/prom_parse.c 2006-07-10 12:39:08.000000000 +1000
> +++ linux-irq-work/arch/powerpc/kernel/prom_parse.c 2006-07-10 12:43:51.000000000 +1000
> @@ -881,7 +881,7 @@
> intsize = *tmp;
>
> /* Check index */
> - if (index * intsize >= intlen)
> + if ((index + 1) * intsize > intlen)
> return -EINVAL;
>
> /* Get new specifier and map it */
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply
* pls help me!
From: zhangshaobo @ 2006-07-10 7:32 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1531 bytes --]
Hi, all
I meet a very difficult problem about ppc linux run on MPC5200. my
linux version is 2.4.18.
When i run my application for some time, the linux operation system
will reset to jump to the uboot and restart linux,. When it happen, I can
capture hreset and sreset signal using oscillograph. Additional, when linux
reset , it have two results: one is enter machine check exception and some
debug information is outputted, the other is nothing is to be outputted. The
debug information is following:
Machine check in kernel mode.
Caused by (from SRR1=41030): Transfer error ack signal
Oops: machine check, sig: 7
NIP: C009E934 XER: 00000000 LR: C009E924 SP: C014F1E0 REGS: c014f130 TRAP:
0200 Not tainted
MSR: 00041030 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 11
TASK = c014d480[0] 'swapper' Last syscall: 120
last math c3c30000 last altivec 00000000
GPR00: 00000001 C014F1E0 C014D480 00000083 00009032 00000000 00000000
00000010
GPR08: 00000000 40000000 00000000 00000000 C3E5E9E4 1010D5DC 03FCA000
007FFF6C
GPR16: 00000000 00000001 007FFF00 03FC4660 00001032 0014F350 00000000
C0176314
GPR24: C0176314 00000000 00000000 0000076C C0160000 F0000D8C 00000070
C3E5E960
Call backtrace:
C3E5EA68 C009F030 C001D9A4 C0019430 C00192BC C0018F80 C00057C0
C0003E40 C0005544 C0005558 C0003918 C0164590 000035F0
MPC5xxx_FEC_IEVENT_RFIFO_ERROR
Kernel panic: Aiee, killing interrupt handler!
In interrupt handler - not syncing
Can you help me ? I will waiting for your answer , thanks anyway.
[-- Attachment #2: Type: text/html, Size: 11109 bytes --]
^ permalink raw reply
* Re: linux-2.6.17.4 and Xilinx Virtex
From: Grant Likely @ 2006-07-10 6:52 UTC (permalink / raw)
To: Sass, Ronald; +Cc: rsass, linuxppc-embedded list
In-Reply-To: <1A3FF4C9782A1249BDFC2FF2B5749C98150E1100@EXEVS01.its.uncc.edu>
Let's move this conversation over to the linuxppc-embedded mailing list
On 7/8/06, Sass, Ronald <rsass@uncc.edu> wrote:
>
> Hello Grant,
>
> I noticed that somewhere between 2.6.11 and 2.6.17 you started
> adding support to the Linux kernel for some Virtex-* based boards
> to the Linux kernel. I've got some hacked up kernel mods for the
> ML-310 (and soon) ML-410 boards that I am trying to clean up for
> sharing. I've never directly contributed to the kernel, so all of
> this is new to me. I had a couple of questions about the direction
> you are taking:
I've got some things that I still need to clean up. As it stands
right now, I've done some brain-dead stuff with the ppc_sys
infrastructure which I really should fix.
>
> (1) I noticed that you restructured
> arch/ppc/platforms/4xx/xparameters
> to support multiple boards. That's cool. Do you use XPS/EDK to
> update these files or do you just change the xparameters.h `by
> hand' for each base system?
No; unfortunately EDK does not support generating a BSP for linux 2.6.
I generate a 2.4 bsp into a clean directory and then copy
xparameters_ml300.h into the 2.6 tree.
> (2) I also noticed that the CONFIG_XILINX_VIRTEX_II_PRO (and files
> arch/ppc/platforms/4xx/virtex_ii_pro.[ch]) changed to
> be just
> CONFIG_XILINX_VIRTEX (and
> arch/ppc/platforms/4xx/virtex.[ch]).
> Is this change intended to be more generic to support V2P,
> V-4, and V-5 devices?
Yes
> (3) I also noticed that even though CONFIG_XILINX_VIRTEX was added,
> the option CONFIG_XILINX_VIRTEX_II_PRO is still in the .config
> file. As far as I can tell, the "VIRTEX_II_PRO" option is not
> referenced in the source. Should it be removed?
I don't think so; but others may disagree. The macro is convenient
for determining exactly which virtex part is being compiled for. Plus
it give a clean dependancy hierarchy from board->part->part family. I
left it in as a mirror to the XILINX_VIRTEX_4 macro which is in use.
>
> Thanks for taking the initative here! Do you know, is there anyone
> else trying to formally incorporate Xilinx boards into the stock
> kernel.org source tree?
I hear rumors that MontaVista will be merging their virtex-II/virtex-4
support into mainline real-soon-now.
Cheers,
g.
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* [POWERPC] Add cpufreq support for Xserve G5
From: Benjamin Herrenschmidt @ 2006-07-10 6:44 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev list
The Xserve G5 are capable of frequency switching like other desktop G5s.
This enables it. It also fix a Kconfig issue which prevented from
building the G5 cpufreq support if CONFIG_PMAC_SMU was not set (the
first version of that driver only worked with SMU based macs, but this
isn't the case anymore).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
This is an updated version of the patch currently in the powerpc.git
tree fixing
a stupid typo which broke cpufreq support on SMU based machines.
Index: linux-irq-work/arch/powerpc/Kconfig
===================================================================
--- linux-irq-work.orig/arch/powerpc/Kconfig 2006-07-06 16:43:32.000000000 +1000
+++ linux-irq-work/arch/powerpc/Kconfig 2006-07-06 16:53:36.000000000 +1000
@@ -504,7 +504,7 @@
config CPU_FREQ_PMAC64
bool "Support for some Apple G5s"
- depends on CPU_FREQ && PMAC_SMU && PPC64
+ depends on CPU_FREQ && PPC64
select CPU_FREQ_TABLE
help
This adds support for frequency switching on Apple iMac G5,
Index: linux-irq-work/arch/powerpc/platforms/powermac/cpufreq_64.c
===================================================================
--- linux-irq-work.orig/arch/powerpc/platforms/powermac/cpufreq_64.c 2006-07-06 16:43:32.000000000 +1000
+++ linux-irq-work/arch/powerpc/platforms/powermac/cpufreq_64.c 2006-07-10 13:04:22.000000000 +1000
@@ -10,6 +10,8 @@
* that is iMac G5 and latest single CPU desktop.
*/
+#undef DEBUG
+
#include <linux/module.h>
#include <linux/types.h>
#include <linux/errno.h>
@@ -30,13 +32,7 @@
#include <asm/smu.h>
#include <asm/pmac_pfunc.h>
-#undef DEBUG
-
-#ifdef DEBUG
-#define DBG(fmt...) printk(fmt)
-#else
-#define DBG(fmt...)
-#endif
+#define DBG(fmt...) pr_debug(fmt)
/* see 970FX user manual */
@@ -82,8 +78,6 @@
/* Power mode data is an array of the 32 bits PCR values to use for
* the various frequencies, retrieved from the device-tree
*/
-static u32 *g5_pmode_data;
-static int g5_pmode_max;
static int g5_pmode_cur;
static void (*g5_switch_volt)(int speed_mode);
@@ -93,6 +87,11 @@
static DEFINE_MUTEX(g5_switch_mutex);
+#ifdef CONFIG_PMAC_SMU
+
+static u32 *g5_pmode_data;
+static int g5_pmode_max;
+
static struct smu_sdbp_fvt *g5_fvt_table; /* table of op. points */
static int g5_fvt_count; /* number of op. points */
static int g5_fvt_cur; /* current op. point */
@@ -210,6 +209,16 @@
}
/*
+ * Fake voltage switching for platforms with missing support
+ */
+
+static void g5_dummy_switch_volt(int speed_mode)
+{
+}
+
+#endif /* CONFIG_PMAC_SMU */
+
+/*
* Platform function based voltage switching for PowerMac7,2 & 7,3
*/
@@ -248,6 +257,9 @@
struct pmf_args args;
u32 done = 0;
unsigned long timeout;
+ int rc;
+
+ DBG("g5_pfunc_switch_freq(%d)\n", speed_mode);
/* If frequency is going up, first ramp up the voltage */
if (speed_mode < g5_pmode_cur)
@@ -255,9 +267,12 @@
/* Do it */
if (speed_mode == CPUFREQ_HIGH)
- pmf_call_one(pfunc_cpu_setfreq_high, NULL);
+ rc = pmf_call_one(pfunc_cpu_setfreq_high, NULL);
else
- pmf_call_one(pfunc_cpu_setfreq_low, NULL);
+ rc = pmf_call_one(pfunc_cpu_setfreq_low, NULL);
+
+ if (rc)
+ printk(KERN_WARNING "cpufreq: pfunc switch error %d\n", rc);
/* It's an irq GPIO so we should be able to just block here,
* I'll do that later after I've properly tested the IRQ code for
@@ -296,13 +311,6 @@
return val ? CPUFREQ_HIGH : CPUFREQ_LOW;
}
-/*
- * Fake voltage switching for platforms with missing support
- */
-
-static void g5_dummy_switch_volt(int speed_mode)
-{
-}
/*
* Common interface to the cpufreq core
@@ -375,6 +383,8 @@
};
+#ifdef CONFIG_PMAC_SMU
+
static int __init g5_neo2_cpufreq_init(struct device_node *cpus)
{
struct device_node *cpunode;
@@ -525,6 +535,9 @@
return rc;
}
+#endif /* CONFIG_PMAC_SMU */
+
+
static int __init g5_pm72_cpufreq_init(struct device_node *cpus)
{
struct device_node *cpuid = NULL, *hwclock = NULL, *cpunode = NULL;
@@ -533,6 +546,9 @@
u64 max_freq, min_freq, ih, il;
int has_volt = 1, rc = 0;
+ DBG("cpufreq: Initializing for PowerMac7,2, PowerMac7,3 and"
+ " RackMac3,1...\n");
+
/* Get first CPU node */
for (cpunode = NULL;
(cpunode = of_get_next_child(cpus, cpunode)) != NULL;) {
@@ -636,6 +652,15 @@
*/
ih = *((u32 *)(eeprom + 0x10));
il = *((u32 *)(eeprom + 0x20));
+
+ /* Check for machines with no useful settings */
+ if (il == ih) {
+ printk(KERN_WARNING "cpufreq: No low frequency mode available"
+ " on this model !\n");
+ rc = -ENODEV;
+ goto bail;
+ }
+
min_freq = 0;
if (ih != 0 && il != 0)
min_freq = (max_freq * il) / ih;
@@ -643,7 +668,7 @@
/* Sanity check */
if (min_freq >= max_freq || min_freq < 1000) {
printk(KERN_ERR "cpufreq: Can't calculate low frequency !\n");
- rc = -ENODEV;
+ rc = -ENXIO;
goto bail;
}
g5_cpu_freqs[0].frequency = max_freq;
@@ -690,16 +715,10 @@
return rc;
}
-static int __init g5_rm31_cpufreq_init(struct device_node *cpus)
-{
- /* NYI */
- return 0;
-}
-
static int __init g5_cpufreq_init(void)
{
struct device_node *cpus;
- int rc;
+ int rc = 0;
cpus = of_find_node_by_path("/cpus");
if (cpus == NULL) {
@@ -708,12 +727,13 @@
}
if (machine_is_compatible("PowerMac7,2") ||
- machine_is_compatible("PowerMac7,3"))
+ machine_is_compatible("PowerMac7,3") ||
+ machine_is_compatible("RackMac3,1"))
rc = g5_pm72_cpufreq_init(cpus);
- else if (machine_is_compatible("RackMac3,1"))
- rc = g5_rm31_cpufreq_init(cpus);
+#ifdef CONFIG_PMAC_SMU
else
rc = g5_neo2_cpufreq_init(cpus);
+#endif /* CONFIG_PMAC_SMU */
of_node_put(cpus);
return rc;
^ permalink raw reply
* [POWERPC] Make OF interrupt tree parsing more strict
From: Benjamin Herrenschmidt @ 2006-07-10 6:42 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-dev list, Linus Torvalds, Paul Mackerras
This patch fixes a bit of boundchecking in the new Open Firmware
interrupt tree parsing code. It's important that it fails when things
aren't correct in order to trigger fallback mecanisms that are necessary
to make some machines work properly.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Index: linux-irq-work/arch/powerpc/kernel/prom_parse.c
===================================================================
--- linux-irq-work.orig/arch/powerpc/kernel/prom_parse.c 2006-07-10 12:39:08.000000000 +1000
+++ linux-irq-work/arch/powerpc/kernel/prom_parse.c 2006-07-10 12:43:51.000000000 +1000
@@ -881,7 +881,7 @@
intsize = *tmp;
/* Check index */
- if (index * intsize >= intlen)
+ if ((index + 1) * intsize > intlen)
return -EINVAL;
/* Get new specifier and map it */
^ permalink raw reply
* [POWERPC] Fix SMU driver interrupt mapping
From: Benjamin Herrenschmidt @ 2006-07-10 6:39 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-dev list, Linus Torvalds, Paul Mackerras
The SMU driver tries to map an interrupt from the device-tree before the
interrupt controllers in the machine have been enumerated. This doesn't
work properly and cause machines like the Quad g5 to fail booting later
on when some drivers waits endlessly for an SMU request to complete.
This is the second problem preventing boot on the Quad g5. This fixes it
and also makes the SMU driver a bit more resilient to not having an
interrupt.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Index: linux-irq-work/drivers/macintosh/smu.c
===================================================================
--- linux-irq-work.orig/drivers/macintosh/smu.c 2006-07-10 12:39:08.000000000 +1000
+++ linux-irq-work/drivers/macintosh/smu.c 2006-07-10 12:41:01.000000000 +1000
@@ -75,9 +75,11 @@
struct of_device *of_dev;
int doorbell; /* doorbell gpio */
u32 __iomem *db_buf; /* doorbell buffer */
- int db_irq;
+ struct device_node *db_node;
+ unsigned int db_irq;
int msg;
- int msg_irq;
+ struct device_node *msg_node;
+ unsigned int msg_irq;
struct smu_cmd_buf *cmd_buf; /* command buffer virtual */
u32 cmd_buf_abs; /* command buffer absolute */
struct list_head cmd_list;
@@ -93,6 +95,7 @@
*/
static struct smu_device *smu;
static DEFINE_MUTEX(smu_part_access);
+static int smu_irq_inited;
static void smu_i2c_retry(unsigned long data);
@@ -257,6 +260,10 @@
smu_start_cmd();
spin_unlock_irqrestore(&smu->lock, flags);
+ /* Workaround for early calls when irq isn't available */
+ if (!smu_irq_inited || smu->db_irq == NO_IRQ)
+ smu_spinwait_cmd(cmd);
+
return 0;
}
EXPORT_SYMBOL(smu_queue_cmd);
@@ -478,14 +485,15 @@
smu->cmd_buf_abs = (u32)smu_cmdbuf_abs;
smu->cmd_buf = (struct smu_cmd_buf *)abs_to_virt(smu_cmdbuf_abs);
- np = of_find_node_by_name(NULL, "smu-doorbell");
- if (np == NULL) {
+ smu->db_node = of_find_node_by_name(NULL, "smu-doorbell");
+ if (smu->db_node == NULL) {
printk(KERN_ERR "SMU: Can't find doorbell GPIO !\n");
goto fail;
}
- data = (u32 *)get_property(np, "reg", NULL);
+ data = (u32 *)get_property(smu->db_node, "reg", NULL);
if (data == NULL) {
- of_node_put(np);
+ of_node_put(smu->db_node);
+ smu->db_node = NULL;
printk(KERN_ERR "SMU: Can't find doorbell GPIO address !\n");
goto fail;
}
@@ -497,25 +505,21 @@
smu->doorbell = *data;
if (smu->doorbell < 0x50)
smu->doorbell += 0x50;
- smu->db_irq = irq_of_parse_and_map(np, 0);
-
- of_node_put(np);
/* Now look for the smu-interrupt GPIO */
do {
- np = of_find_node_by_name(NULL, "smu-interrupt");
- if (np == NULL)
+ smu->msg_node = of_find_node_by_name(NULL, "smu-interrupt");
+ if (smu->msg_node == NULL)
break;
- data = (u32 *)get_property(np, "reg", NULL);
+ data = (u32 *)get_property(smu->msg_node, "reg", NULL);
if (data == NULL) {
- of_node_put(np);
+ of_node_put(smu->msg_node);
+ smu->msg_node = NULL;
break;
}
smu->msg = *data;
if (smu->msg < 0x50)
smu->msg += 0x50;
- smu->msg_irq = irq_of_parse_and_map(np, 0);
- of_node_put(np);
} while(0);
/* Doorbell buffer is currently hard-coded, I didn't find a proper
@@ -547,6 +551,19 @@
smu->i2c_timer.function = smu_i2c_retry;
smu->i2c_timer.data = (unsigned long)smu;
+ if (smu->db_node) {
+ smu->db_irq = irq_of_parse_and_map(smu->db_node, 0);
+ if (smu->db_irq == NO_IRQ)
+ printk(KERN_ERR "smu: failed to map irq for node %s\n",
+ smu->db_node->full_name);
+ }
+ if (smu->msg_node) {
+ smu->msg_irq = irq_of_parse_and_map(smu->msg_node, 0);
+ if (smu->msg_irq == NO_IRQ)
+ printk(KERN_ERR "smu: failed to map irq for node %s\n",
+ smu->msg_node->full_name);
+ }
+
/*
* Try to request the interrupts
*/
@@ -571,6 +588,7 @@
}
}
+ smu_irq_inited = 1;
return 0;
}
/* This has to be before arch_initcall as the low i2c stuff relies on the
@@ -742,6 +760,11 @@
if (fail && --cmd->retries > 0) {
DPRINTK("SMU: i2c failure, starting timer...\n");
BUG_ON(cmd != smu->cmd_i2c_cur);
+ if (!smu_irq_inited) {
+ mdelay(5);
+ smu_i2c_retry(0);
+ return;
+ }
mod_timer(&smu->i2c_timer, jiffies + msecs_to_jiffies(5));
return;
}
^ 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