* Re: Please pull powerpc.git merge branch
From: Josh Boyer @ 2007-12-03 0:25 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <18259.15345.627820.551644@cargo.ozlabs.ibm.com>
On Mon, 3 Dec 2007 10:12:49 +1100
Paul Mackerras <paulus@samba.org> wrote:
> Linus,
>
> Please do
>
> git pull \
> git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git merge
>
> There are two commits there; one reverts a patch which was causing
> some machines to fail to come back up when rebooting, and the other
> only touches a couple of defconfigs.
>
> Thanks,
> Paul.
>
> arch/powerpc/kernel/rtas.c | 12 ++++++------
> arch/powerpc/platforms/pseries/setup.c | 3 +--
> arch/ppc/configs/ml300_defconfig | 2 +-
> arch/ppc/configs/ml403_defconfig | 2 +-
> include/asm-powerpc/rtas.h | 3 +--
> 5 files changed, 10 insertions(+), 12 deletions(-)
>
> Grant Likely (1):
> [POWERPC] Remove xmon from ml300 and ml403 defconfig in arch/ppc
Thanks Paul. I had this one queued for you to pull, but you beat me to
it.
josh
^ permalink raw reply
* Re: [PATCH 0/3] OF-platform PATA driver
From: Olof Johansson @ 2007-12-02 23:58 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linuxppc-dev, Anton Vorontsov, Paul Mundt, Jeff Garzik, linux-ide
In-Reply-To: <200712030040.22701.arnd@arndb.de>
On Mon, Dec 03, 2007 at 12:40:21AM +0100, Arnd Bergmann wrote:
> On Sunday 02 December 2007, Olof Johansson wrote:
>
> > Yes, I agree with Sergei: I don't think the pio/ata mode belongs there,
> > "ata-generic" (or "generic-ata") sounds good to me. If firmwares want to
> > specify pata/sata stuff as more specific compatible fields, then they are
> > free to, but the driver shouldn't depend on it as long as "ata-generic"
> > is in the list.
>
> Yes, that makes sense. Let me just make it clear that I no longer think
> we should have the PIO mode or the ATA level in the compatible property.
> The PIO modes should really have their own property, if any, and the ATA
> standard would need to be a property of the attached device, not a property
> of the controller.
Right. And configuring PIO modes is something quite hardware specific,
which defeats the purpose of having a "generic" driver as a catch-all
for "simple" configs in the first place. If the hardware needs (much)
tuning it probably makes more sense to do it as a separate driver.
> I can see a point in listing the ATA devices themselves in the device tree,
> but it's probably not really worth it for the fdt setup, since they
> can easily be probed at runtime.
If the firmware probes them and/or knows about them. It's the kind of
thing that can change quite often. We don't list USB devices under the usb
controllers either, since they're quite volatile and the device tree is
(fairly) static on the DTS-based platforms.
> > I will need to add a compatible field to it myself (our firmware uses
> > "electra-ide") + some minor changes, but I will do that on top of this
> > patch once it goes in since it involves removing the old code from
> > arch/powerpc/platforms/pasemi.
>
> I'd suggest to also have electra-ide hardcoded in the driver alongside
> ata-generic, as a special case for backwards compatibility.
Yep, that's my plan, I'll do that when I move it over.
-Olof
^ permalink raw reply
* Re: [PATCH 0/3] OF-platform PATA driver
From: Arnd Bergmann @ 2007-12-02 23:40 UTC (permalink / raw)
To: Olof Johansson
Cc: linuxppc-dev, Anton Vorontsov, Paul Mundt, Jeff Garzik, linux-ide
In-Reply-To: <20071202154539.GA12415@lixom.net>
On Sunday 02 December 2007, Olof Johansson wrote:
> Yes, I agree with Sergei: I don't think the pio/ata mode belongs there,
> "ata-generic" (or "generic-ata") sounds good to me. If firmwares want to
> specify pata/sata stuff as more specific compatible fields, then they are
> free to, but the driver shouldn't depend on it as long as "ata-generic"
> is in the list.
Yes, that makes sense. Let me just make it clear that I no longer think
we should have the PIO mode or the ATA level in the compatible property.
The PIO modes should really have their own property, if any, and the ATA
standard would need to be a property of the attached device, not a property
of the controller.
I can see a point in listing the ATA devices themselves in the device tree,
but it's probably not really worth it for the fdt setup, since they
can easily be probed at runtime.
> I will need to add a compatible field to it myself (our firmware uses
> "electra-ide") + some minor changes, but I will do that on top of this
> patch once it goes in since it involves removing the old code from
> arch/powerpc/platforms/pasemi.
I'd suggest to also have electra-ide hardcoded in the driver alongside
ata-generic, as a special case for backwards compatibility.
Arnd <><
^ permalink raw reply
* Please pull powerpc.git merge branch
From: Paul Mackerras @ 2007-12-02 23:12 UTC (permalink / raw)
To: torvalds; +Cc: linuxppc-dev
Linus,
Please do
git pull \
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git merge
There are two commits there; one reverts a patch which was causing
some machines to fail to come back up when rebooting, and the other
only touches a couple of defconfigs.
Thanks,
Paul.
arch/powerpc/kernel/rtas.c | 12 ++++++------
arch/powerpc/platforms/pseries/setup.c | 3 +--
arch/ppc/configs/ml300_defconfig | 2 +-
arch/ppc/configs/ml403_defconfig | 2 +-
include/asm-powerpc/rtas.h | 3 +--
5 files changed, 10 insertions(+), 12 deletions(-)
Grant Likely (1):
[POWERPC] Remove xmon from ml300 and ml403 defconfig in arch/ppc
Paul Mackerras (1):
Revert "[POWERPC] Fix RTAS os-term usage on kernel panic"
^ permalink raw reply
* Re: [PATCH 12/24] powerpc: 4xx PLB to PCI Express support
From: Stefan Roese @ 2007-12-02 22:01 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
In-Reply-To: <1196627621.13230.156.camel@pasglop>
On Sunday 02 December 2007, Benjamin Herrenschmidt wrote:
> > So before digging into this deeper, I wanted to check if you don't
> > have a
> > slightly "better" version which passed your tests with the sky2 PCIe
> > card.
>
> Yup, looks I forgot a quilt ref or something. I'll check. I'll also give
> port 1 and 2 a go (after fixing the DT).
>
> I also want to change the config space code to use some fixmap type
> direct mapping/unmapping to remove bus number limitations as soon as
> Kumar has implemented the fixmap stuff, since he seems to be working on
> it now.
Great, thanks.
Best regards,
Stefan
^ permalink raw reply
* Problem compiling sequoia using DENX kernel. Xenomai-patch required?
From: Niklaus Giger @ 2007-12-02 20:41 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1554 bytes --]
Hi
I tried with (tags DENX-v2.6.23.9, DENX-v.2.6.23, master) to build a kernel
for the sequoia board.
I am using ELDK 4.1. I did a
git checkout -b copy-master master
make ARCH=powerpc CROSS_COMPILE=ppc_4xx- CFLAGS=-g sequoia_defconfig
make ARCH=powerpc CROSS_COMPILE=ppc_4xx- CFLAGS=-g zImage
First I stumbled about problem compiling arch/powerpc/platforms/44x/ppc4xx*.c
file with errors like
arch/powerpc/platforms/44x/ppc4xx-pci.c: In function 'ppc4xx_setup_pci':
arch/powerpc/platforms/44x/ppc4xx-pci.c:62: sorry, unimplemented: inlining
failed in call to 'pci_cfg_out': function body not available
arch/powerpc/platforms/44x/ppc4xx-pci.c:98: sorry, unimplemented: called from
here
After applying the at attached patch I got farther till
CC kernel/softirq.o
kernel/softirq.c: In function 'raise_softirq':
kernel/softirq.c:319: sorry, unimplemented: inlining failed in call
to 'raise_softirq_irqoff': function body not available
kernel/softirq.c:342: sorry, unimplemented: called from here
make[2]: *** [kernel/softirq.o] Fehler 1
I thought that denx compiled images for the sequoia using 2.6.23.
Do they only work after having applied the Xenomai patch? Because if I apply
the Xenomai patch, the kernel compiles cleanly. In this case I think it
would be nice to get somewhere a hint (or did I missed it somewhere) that
this is a requirement. I lost quite a few hours as I wanted to first compile
a "normal" kernel and afterwars apply the xenomai patch.
Any clarifikation would be appreciated.
Best regards
--
Niklaus Giger
[-- Attachment #2: powerpc.diff --]
[-- Type: text/x-diff, Size: 1942 bytes --]
diff --git a/arch/powerpc/platforms/44x/ppc4xx-nand.c b/arch/powerpc/platforms/44x/ppc4xx-nand.c
index 2fb553b..0574d2c 100644
--- a/arch/powerpc/platforms/44x/ppc4xx-nand.c
+++ b/arch/powerpc/platforms/44x/ppc4xx-nand.c
@@ -29,8 +29,6 @@
#include <linux/mtd/nand.h>
#include <linux/mtd/ndfc.h>
-#include <mm/mmu_decl.h>
-
#include <asm/system.h>
#include <asm/atomic.h>
#include <asm/prom.h>
diff --git a/arch/powerpc/platforms/44x/ppc4xx-pci.c b/arch/powerpc/platforms/44x/ppc4xx-pci.c
index 4666250..137555f 100644
--- a/arch/powerpc/platforms/44x/ppc4xx-pci.c
+++ b/arch/powerpc/platforms/44x/ppc4xx-pci.c
@@ -26,8 +26,6 @@
#include <linux/module.h>
#include <linux/io.h>
-#include <mm/mmu_decl.h>
-
#include <asm/system.h>
#include <asm/atomic.h>
#include <asm/pci-bridge.h>
@@ -44,6 +42,7 @@
#endif
#ifdef CONFIG_PCI
+extern unsigned long total_memory;
int ppc4xx_exclude_device(struct pci_controller *hose, u_char bus,
u_char devfn)
@@ -53,21 +52,6 @@ int ppc4xx_exclude_device(struct pci_controller *hose, u_char bus,
return PCIBIOS_SUCCESSFUL;
}
-inline void pci_writel(void *pci_reg_base, u32 offset, unsigned int val)
-{
- writel(val, pci_reg_base + offset);
-}
-
-inline void pci_cfg_out(void *cfg, u32 offset, unsigned int value)
-{
- out_le32((void *)((u32) cfg + offset), value);
-}
-
-inline u32 pci_cfg_in(void *cfg, u32 offset)
-{
- return in_le32((void *)((u32) cfg + offset));
-}
-
static void __init ppc4xx_setup_pci(struct pci_controller *hose,
void *pci_reg_base, void *pci_cfg_base)
{
diff --git a/arch/powerpc/platforms/44x/ppc4xx-usb.c b/arch/powerpc/platforms/44x/ppc4xx-usb.c
index 1b07689..87e87e6 100644
--- a/arch/powerpc/platforms/44x/ppc4xx-usb.c
+++ b/arch/powerpc/platforms/44x/ppc4xx-usb.c
@@ -25,8 +25,6 @@
#include <linux/module.h>
#include <linux/io.h>
-#include <mm/mmu_decl.h>
-
#include <asm/system.h>
#include <asm/atomic.h>
#include <asm/prom.h>
^ permalink raw reply related
* Re: [PATCH 12/24] powerpc: 4xx PLB to PCI Express support
From: Benjamin Herrenschmidt @ 2007-12-02 20:33 UTC (permalink / raw)
To: Stefan Roese; +Cc: linuxppc-dev
In-Reply-To: <200712021332.29074.sr@denx.de>
On Sun, 2007-12-02 at 13:32 +0100, Stefan Roese wrote:
> As already mentioned I'm experiencing some problems with this current
> version.
> At least what's available in Josh's 2.6.25-candidates branch. The
> kernel
> crashes in the first ppc4xx_pciex_read_config() call upon (after I
> fixed the
> small problem mentioned further down below):
>
> BUG_ON(hose != port->hose);
>
> So before digging into this deeper, I wanted to check if you don't
> have a
> slightly "better" version which passed your tests with the sky2 PCIe
> card.
Yup, looks I forgot a quilt ref or something. I'll check. I'll also give
port 1 and 2 a go (after fixing the DT).
I also want to change the config space code to use some fixmap type
direct mapping/unmapping to remove bus number limitations as soon as
Kumar has implemented the fixmap stuff, since he seems to be working on
it now.
Ben.
^ permalink raw reply
* Re: [rtc-linux] Re: DS1337 RTC on I2C broken.
From: Olof Johansson @ 2007-12-02 20:25 UTC (permalink / raw)
To: Clemens Koller; +Cc: Alessandro Zummo, rtc-linux, linuxppc-embedded
In-Reply-To: <47501A4F.8050400@anagramm.de>
On Fri, Nov 30, 2007 at 03:12:31PM +0100, Clemens Koller wrote:
> Hello, Alessandro!
>
> Alessandro Zummo schrieb:
> > It's just to see if there's any timing issue like
> module-coming-up-before-bus-and/or-rtc.
> > it should work anyway, but who knows...
>
> Here comes more debugging output:
>
> Please note that I have now _two_ almost identical systems up and running
> with the
> latest kernel. One machine (ecam) with an pcf8563 RTC on I2C and another
> one (fox_1)
> with an DS1337. Both RTCs work, but the kernel doesn't get the time right.
ds1307 requires you to register i2c_board_info for it to probe properly.
Does your platform do so?
-Olof
^ permalink raw reply
* Re: [PATCH v2 2/2] [POWERPC] Use new machine_xxx_initcall hooks in platform code
From: Olof Johansson @ 2007-12-02 19:15 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
In-Reply-To: <20071202061033.21193.64818.stgit@trillian.secretlab.ca>
On Sat, Dec 01, 2007 at 11:10:33PM -0700, Grant Likely wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> This patch makes the platform code use the new machine-specific initcall
> hooks. This has the advantage of not needing to explicitly test
> machine_is() at the top of every initcall function.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
PA Semi parts:
Acked-by: Olof Johansson <olof@lixom.net>
Overall I approve of the approach as well, looks like a good idea.
I tried building all defconfigs, they pass.
-Olof
^ permalink raw reply
* Re: [BUG] 2.6.24-rc3-mm2 kernel bug on nfs & cifs mounted partitions
From: Kamalesh Babulal @ 2007-12-02 15:55 UTC (permalink / raw)
To: Jan Kara; +Cc: samba-technical, linux-kernel, linuxppc-dev, nfs, Andrew Morton
In-Reply-To: <20071129144030.GE16558@duck.suse.cz>
Jan Kara wrote:
> On Thu 29-11-07 17:27:08, Kamalesh Babulal wrote:
>> Andrew Morton wrote:
>>> On Thu, 29 Nov 2007 14:30:14 +0530 Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> wrote:
>>>
>>>> Hi Andrew,
>>>>
>>>> While running file system stress on nfs and cifs mounted partitions, the machine
>>>> drops to xmon
>>>>
>>>> 1:mon> e
>>>> cpu 0x1: Vector: 300 (Data Access) at [c000000080a9f880]
>>>> pc: c0000000001392c8: .inotify_inode_queue_event+0x50/0x158
>>>> lr: c0000000001074d0: .vfs_link+0x204/0x298
>>>> sp: c000000080a9fb00
>>>> msr: 8000000000009032
>>>> dar: 280
>>>> dsisr: 40010000
>>>> current = 0xc0000000c8e6f670
>>>> paca = 0xc000000000512c00
>>>> pid = 2848, comm = fsstress
>>>> 1:mon> t
>>>> [c000000080a9fbd0] c0000000001074d0 .vfs_link+0x204/0x298
>>>> [c000000080a9fc70] c00000000010b6e0 .sys_linkat+0x134/0x1b4
>>>> [c000000080a9fe30] c00000000000872c syscall_exit+0x0/0x40
>>>> --- Exception: c00 (System Call) at 000000000ff1bdfc
>>>> SP (ffeaed10) is in userspace
>>>> 1:mon> r
>>>> R00 = c0000000001074d0 R16 = 0000000000000000
>>>> R01 = c000000080a9fb00 R17 = 0000000000000000
>>>> R02 = c00000000060c380 R18 = 0000000000000000
>>>> R03 = 0000000000000000 R19 = 0000000000000000
>>>> R04 = 0000000000000004 R20 = 0000000000000000
>>>> R05 = 0000000000000000 R21 = 0000000000000000
>>>> R06 = 0000000000000000 R22 = 0000000000000000
>>>> R07 = 0000000000000000 R23 = 0000000000000004
>>>> R08 = 0000000000000000 R24 = 0000000000000280
>>>> R09 = 0000000000000000 R25 = fffffffffffff000
>>>> R10 = 0000000000000001 R26 = c000000082827790
>>>> R11 = c0000000003963e8 R27 = c0000000828275a0
>>>> R12 = d000000000deec78 R28 = 0000000000000000
>>>> R13 = c000000000512c00 R29 = c00000007b18fcf0
>>>> R14 = 0000000000000000 R30 = c0000000005bc088
>>>> R15 = 0000000000000000 R31 = 0000000000000000
>>>> pc = c0000000001392c8 .inotify_inode_queue_event+0x50/0x158
>>>> lr = c0000000001074d0 .vfs_link+0x204/0x298
>>>> msr = 8000000000009032 cr = 24000882
>>>> ctr = c0000000003963e8 xer = 0000000000000000 trap = 300
>>>> dar = 0000000000000280 dsisr = 40010000
>>>>
>>>>
>>>> The gdb output shows
>>>>
>>>> 0xc0000000001076d4 is in vfs_symlink (include/linux/fsnotify.h:108).
>>>> 103 * fsnotify_create - 'name' was linked in
>>>> 104 */
>>>> 105 static inline void fsnotify_create(struct inode *inode, struct dentry *dentry)
>>>> 106 {
>>>> 107 inode_dir_notify(inode, DN_CREATE);
>>>> 108 inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name,
>>>> 109 dentry->d_inode);
>>>> 110 audit_inode_child(dentry->d_name.name, dentry, inode);
>>>> 111 }
>>>> 112
>>>>
>>> If it is reproducible can you please try reverting
>>> inotify-send-in_attrib-events-when-link-count-changes.patch?
>> Hi Andrew,
>>
>> reverting the patch inotify-send-in_attrib-events-when-link-count-changes.patch, the
>> bug is not reproduced.
> OK, it's a problem with CIFS. Its cifs_hardlink() function doesn't call
> d_instantiate() and thus returns a dentry with d_inode set to NULL. I'm not
> sure if such behavior is really correct but anyway, attached is a new
> version of the patch which should handle it gracefully. Kamalesh, can you
> please give it a try? Thanks.
>
> Honza
Hi Jan,
Thanks, the patch fixes the bug.
--
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.
^ permalink raw reply
* Re: [PATCH 0/3] OF-platform PATA driver
From: Olof Johansson @ 2007-12-02 15:45 UTC (permalink / raw)
To: Anton Vorontsov
Cc: linux-ide, Paul Mundt, Jeff Garzik, Arnd Bergmann, linuxppc-dev
In-Reply-To: <20071202114617.GA2923@zarina>
On Sun, Dec 02, 2007 at 02:46:17PM +0300, Anton Vorontsov wrote:
> On Sat, Dec 01, 2007 at 09:57:55PM -0600, Olof Johansson wrote:
> > On Sun, Dec 02, 2007 at 02:58:10AM +0300, Anton Vorontsov wrote:
> > > On Sat, Dec 01, 2007 at 05:54:49PM -0500, Jeff Garzik wrote:
> > > while (1) {
> > > send_patches();
> > >
> > > if (ack_collected(PaulM) && ack_collected(PowerPC_people))
> > > break;
> > >
> > > sleep(wait_for_comments_timeout); <-- currently here.
> >
> > I still haven't seen you address the compatible comments (that
> > pata-platform is suboptimal). Or did I miss some respin of the patches?
>
> I didn't resend these patches yet. You started the thread, but you hid
> away from the discussion (you had been Cc'ed to every mail).
>
> 1. Arnd suggested {p,s}ata-pio-{1,2,3,..} or ata-{1,2,3,..} compatible
> scheme;
> 2. Sergei verbosely explained that that there is no reason to
> complicate compatible property. He suggested ata-generic, or
> ata-simple;
>
> Mainly I was awaiting for your further comments. By now I tend to
> follow Sergei's comments and rename compatible stuff to ata-generic.
> Are you fine with it?
Ah, sorry about that. The discussion got a bit noisy so I tuned it out.
Yes, I agree with Sergei: I don't think the pio/ata mode belongs there,
"ata-generic" (or "generic-ata") sounds good to me. If firmwares want to
specify pata/sata stuff as more specific compatible fields, then they are
free to, but the driver shouldn't depend on it as long as "ata-generic"
is in the list.
ATA/PIO modes could be communicated with separate properties as well,
but I don't see a need for it right now. Tuning PIO modes normally
involves changing bus parameters/cycle times, etc, and that' hardly
generic enough to be handled by this driver in the first place.
I will need to add a compatible field to it myself (our firmware uses
"electra-ide") + some minor changes, but I will do that on top of this
patch once it goes in since it involves removing the old code from
arch/powerpc/platforms/pasemi.
-Olof
^ permalink raw reply
* Re: [PATCH 12/24] powerpc: 4xx PLB to PCI Express support
From: Josh Boyer @ 2007-12-02 14:17 UTC (permalink / raw)
To: Stefan Roese; +Cc: linuxppc-dev
In-Reply-To: <200712021332.29074.sr@denx.de>
On Sun, 2 Dec 2007 13:32:28 +0100
Stefan Roese <sr@denx.de> wrote:
> Hi Ben,
>
> On Friday 30 November 2007, Benjamin Herrenschmidt wrote:
> > This adds to the previous 2 patches the support for the 4xx PCI Express
> > cells as found in the 440SPe revA, revB and 405EX.
> >
> > Unfortunately, due to significant differences between these, and other
> > interesting "features" of those pieces of HW, the code isn't as simple
> > as it is for PCI and PCI-X and some of the functions differ significantly
> > between the 3 implementations. Thus, not only this code can only support
> > those 3 implementations for now and will refuse to operate on any other,
> > but there are added ifdef's to avoid the bloat of building a fairly large
> > amount of code on platforms that don't need it.
> >
> > Also, this code currently only supports fully initializing root complex
> > nodes, not endpoint. Some more code will have to be lifted from the
> > arch/ppc implementation to add the endpoint support, though it's mostly
> > differences in memory mapping, and the question on how to represent
> > endpoint mode PCI in the device-tree is thus open.
> >
> > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > ---
> >
> > 440SPeA is untested, 440SPeB is slightly tested (with a sky2 network card
> > on port 0 only for now) and 405EX is untested.
>
> As already mentioned I'm experiencing some problems with this current version.
> At least what's available in Josh's 2.6.25-candidates branch. The kernel
> crashes in the first ppc4xx_pciex_read_config() call upon (after I fixed the
> small problem mentioned further down below):
>
> BUG_ON(hose != port->hose);
>
> So before digging into this deeper, I wanted to check if you don't have a
> slightly "better" version which passed your tests with the sky2 PCIe card.
These should be the latest versions that Ben sent out. I plan on
applying newer versions to that branch as they come out, which means
the git branch will probably reset often for a bit.
I have some other patches I want to pull into there as well anyway.
josh
^ permalink raw reply
* Re: [PATCH 12/24] powerpc: 4xx PLB to PCI Express support
From: Stefan Roese @ 2007-12-02 12:32 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071130061155.41D71DDF5F@ozlabs.org>
Hi Ben,
On Friday 30 November 2007, Benjamin Herrenschmidt wrote:
> This adds to the previous 2 patches the support for the 4xx PCI Express
> cells as found in the 440SPe revA, revB and 405EX.
>
> Unfortunately, due to significant differences between these, and other
> interesting "features" of those pieces of HW, the code isn't as simple
> as it is for PCI and PCI-X and some of the functions differ significantly
> between the 3 implementations. Thus, not only this code can only support
> those 3 implementations for now and will refuse to operate on any other,
> but there are added ifdef's to avoid the bloat of building a fairly large
> amount of code on platforms that don't need it.
>
> Also, this code currently only supports fully initializing root complex
> nodes, not endpoint. Some more code will have to be lifted from the
> arch/ppc implementation to add the endpoint support, though it's mostly
> differences in memory mapping, and the question on how to represent
> endpoint mode PCI in the device-tree is thus open.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> 440SPeA is untested, 440SPeB is slightly tested (with a sky2 network card
> on port 0 only for now) and 405EX is untested.
As already mentioned I'm experiencing some problems with this current version.
At least what's available in Josh's 2.6.25-candidates branch. The kernel
crashes in the first ppc4xx_pciex_read_config() call upon (after I fixed the
small problem mentioned further down below):
BUG_ON(hose != port->hose);
So before digging into this deeper, I wanted to check if you don't have a
slightly "better" version which passed your tests with the sky2 PCIe card.
One further comment below.
> arch/powerpc/Kconfig | 1
> arch/powerpc/sysdev/Kconfig | 8
> arch/powerpc/sysdev/ppc4xx_pci.c | 927
> ++++++++++++++++++++++++++++++++++++++- arch/powerpc/sysdev/ppc4xx_pci.h |
> 237 +++++++++
> 4 files changed, 1172 insertions(+), 1 deletion(-)
>
> Index: linux-work/arch/powerpc/sysdev/ppc4xx_pci.c
<snip>
> +static void __init ppc4xx_pciex_port_setup_hose(struct ppc4xx_pciex_port
> *port) +{
> + struct resource dma_window;
> + struct pci_controller *hose = NULL;
> + const int *bus_range;
> + int primary, busses;
> + void __iomem *mbase = NULL, *cfg_data = NULL;
> +
> + /* XXX FIXME: Handle endpoint mode properly */
> + if (port->endpoint)
> + return;
> +
> + /* Check if primary bridge */
> + if (of_get_property(port->node, "primary", NULL))
> + primary = 1;
> +
> + /* Get bus range if any */
> + bus_range = of_get_property(port->node, "bus-range", NULL);
> +
> + /* Allocate the host controller data structure */
> + hose = pcibios_alloc_controller(port->node);
> + if (!hose)
> + goto fail;
> +
> + /* We stick the port number in "indirect_type" so the config space
> + * ops can retrieve the port data structure easily
> + */
> + hose->indirect_type = port->index;
> +
> + /* Get bus range */
> + hose->first_busno = bus_range ? bus_range[0] : 0x0;
> + hose->last_busno = bus_range ? bus_range[1] : 0xff;
> +
> + /* Because of how big mapping the config space is (1M per bus), we
> + * limit how many busses we support. In the long run, we could replace
> + * that with something akin to kmap_atomic instead. We set aside 1 bus
> + * for the host itself too.
> + */
> + busses = hose->last_busno - hose->first_busno; /* This is off by 1 */
> + if (busses > MAX_PCIE_BUS_MAPPED) {
> + busses = MAX_PCIE_BUS_MAPPED;
> + hose->last_busno = hose->first_busno + busses;
> + }
> +
> + /* We map the external config space in cfg_data and the host config
> + * space in cfg_addr. External space is 1M per bus, internal space
> + * is 4K
> + */
> + cfg_data = ioremap(port->cfg_space.start +
> + (hose->first_busno + 1) * 0x100000,
> + busses * 0x100000);
> + mbase = ioremap(port->cfg_space.start + 0x10000000, 0x1000);
> + if (cfg_data == NULL || mbase == NULL) {
> + printk(KERN_ERR "%s: Can't map config space !",
> + port->node->full_name);
> + goto fail;
> + }
> +
> + hose->cfg_data = cfg_data;
> + hose->cfg_addr = mbase;
> +
> +#ifdef CONFIG_40x
> + /*
> + * 405EX needs this offset in the PCIe config cycles
> + * need a little more debugging to see if this can be handled
> + * differently. sr, 2007-10
> + */
> + if (of_device_is_compatible(port->node, "ibm,plb-pciex-405ex"))
> + hose->cfg_data -= 0x8000;
> +#endif /* CONFIG_40x */
> +
> + pr_debug("PCIE %s, bus %d..%d\n", port->node->full_name,
> + hose->first_busno, hose->last_busno);
> + pr_debug(" config space mapped at: root @0x%p, other @0x%p\n",
> + hose->cfg_addr, hose->cfg_data);
> +
> + /* Setup config space */
> + hose->ops = &ppc4xx_pciex_pci_ops;
> + port->hose = hose;
> + mbase = (void __iomem *)hose->cfg_addr;
> +
> + /*
> + * Set bus numbers on our root port
> + */
> + out_8(mbase + PCI_PRIMARY_BUS, hose->first_busno);
> + out_8(mbase + PCI_SECONDARY_BUS, hose->first_busno + 1);
> + out_8(mbase + PCI_SUBORDINATE_BUS, hose->last_busno);
> +
> + /*
> + * OMRs are already reset, also disable PIMs
> + */
> + out_le32(mbase + PECFG_PIMEN, 0);
> +
> + /* Parse outbound mapping resources */
> + pci_process_bridge_OF_ranges(hose, port->node, primary);
> +
> + /* Parse inbound mapping resources */
> + if (ppc4xx_parse_dma_ranges(hose, mbase, &dma_window) != 0)
> + goto fail;
> +
> + /* Configure outbound ranges POMs */
> + ppc4xx_configure_pciex_POMs(port, hose, mbase);
> +
> + /* Configure inbound ranges PIMs */
> + ppc4xx_configure_pciex_PIMs(port, hose, mbase, &dma_window);
> +
> + /* The root complex doesn't show up if we don't set some vendor
> + * and device IDs into it. Those are the same bogus one that the
> + * initial code in arch/ppc add. We might want to change that.
> + */
> + out_le16(mbase + 0x200, 0xaaa0 + port->index);
> + out_le16(mbase + 0x202, 0xbed0 + port->index);
> +
> + /* Set Class Code to PCI-PCI bridge and Revision Id to 1 */
> + out_le32(mbase + 0x208, 0x06040001);
> +
> + printk(KERN_INFO "PCIE%d: successfully set as root-complex\n",
> + port->index);
> + return;
> + fail:
> + if (hose)
> + pcibios_free_controller(hose);
> + if (fg_data)
Should be "cfg_data". I suspect you you have a newer version that compiles
clean.
Thanks.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de
=====================================================================
^ permalink raw reply
* Re: [PATCH 24/24] powerpc: Base support for 440SPe "Katmai" eval board
From: Stefan Roese @ 2007-12-02 12:35 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <200712021323.17821.sr@denx.de>
On Sunday 02 December 2007, Stefan Roese wrote:
> > + PCIE0: pciex@d00000000 {
> > + device_type = "pci";
> > + #interrupt-cells = <1>;
> > + #size-cells = <2>;
> > + #address-cells = <3>;
> > + compatible = "ibm,plb-pciex-440speB", "ibm,plb-pciex";
> > + primary;
> > + port = <0>; /* port number */
>
> port = <1>;
Ups, sorry. <0> is correct here of course. "PCIE1" and "PCIE2" need different
numbers though.
> > + reg = <d 00000000 20000000 /* Config space access */
> > + c 10000000 00001000>; /* Registers */
> > + dcr-reg = <100 020>;
> > + sdr-base = <300>;
> > +
> > + /* Outbound ranges, one memory and one IO,
> > + * later cannot be changed
> > + */
> > + ranges = <02000000 0 80000000 0000000e 00000000 0 80000000
> > + 01000000 0 00000000 0000000f 80000000 0 00010000>;
> > +
> > + /* Inbound 2GB range starting at 0 */
> > + dma-ranges = <42000000 0 0 0 0 0 80000000>;
> > +
> > + /* This drives busses 10 to 0x1f */
> > + bus-range = <10 1f>;
> > +
> > + /* Legacy interrupts (note the weird polarity). We are
> > + * de-swizzling here because the numbers are actually for
> > + * port of the root complex virtual P2P bridge. But I want
> > + * to avoid putting a node for it in the tree, so the numbers
> > + * below are basically de-swizzled numbers. The real slot is
> > + * on idsel 1, so the swizzling is new_pin = (pin % 4) + 1
> > + */
> > + interrupt-map-mask = <0000 0 0 7>;
> > + interrupt-map = <
> > + 0000 0 0 2 &UIC3 0 4 /* swizzled int A */
> > + 0000 0 0 3 &UIC3 1 4 /* swizzled int B */
> > + 0000 0 0 4 &UIC3 2 4 /* swizzled int C */
> > + 0000 0 0 1 &UIC3 3 4 /* swizzled int D */>;
> > + };
> > +
> > + PCIE1: pciex@d20000000 {
> > + device_type = "pci";
> > + #interrupt-cells = <1>;
> > + #size-cells = <2>;
> > + #address-cells = <3>;
> > + compatible = "ibm,plb-pciex-440speB", "ibm,plb-pciex";
> > + primary;
> > + port = <0>; /* port number */
>
> port = <2>;
That should be <1> now. And PCIE2 has this problem too.
Best regards,
Stefan
^ permalink raw reply
* Re: [PATCH 24/24] powerpc: Base support for 440SPe "Katmai" eval board
From: Stefan Roese @ 2007-12-02 12:23 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071130061209.497F3DE03A@ozlabs.org>
Hi Ben,
On Friday 30 November 2007, Benjamin Herrenschmidt wrote:
> This adds base support for the Katmai board, including PCI-X and
> PCI-Express (but no RTC, nvram, etc... yet).
Please see comments below.
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> As for Taishan, the bootwrapper code can be simplified. In fact,
> we probably don't need to probe clocks & memsize off the chip and
> just trust what uboot tells us.
>
> arch/powerpc/boot/44x.h | 1
> arch/powerpc/boot/Makefile | 7
> arch/powerpc/boot/cuboot-katmai.c | 35 +++
> arch/powerpc/boot/dts/katmai.dts | 392
> ++++++++++++++++++++++++++++++++++++ arch/powerpc/boot/katmai.c |
> 64 +++++
> arch/powerpc/platforms/44x/Kconfig | 12 +
> arch/powerpc/platforms/44x/Makefile | 3
> arch/powerpc/platforms/44x/katmai.c | 63 +++++
> 8 files changed, 574 insertions(+), 3 deletions(-)
>
> Index: linux-work/arch/powerpc/platforms/44x/Kconfig
> ===================================================================
> --- linux-work.orig/arch/powerpc/platforms/44x/Kconfig 2007-11-30
> 13:51:48.000000000 +1100 +++
> linux-work/arch/powerpc/platforms/44x/Kconfig 2007-11-30 13:51:48.000000000
> +1100 @@ -30,6 +30,14 @@ config TAISHAN
> help
> This option enables support for the IBM PPC440GX "Taishan" evaluation
> board.
>
> +config KATMAI
> + bool "Katmai"
> + depends on 44x
> + default n
> + select 440SPe
> + help
> + This option enables support for the AMCC PPC440SPe evaluation board.
> +
> #config LUAN
> # bool "Luan"
> # depends on 44x
> @@ -74,6 +82,10 @@ config 440GX
> config 440SP
> bool
>
> +config 440SPe
> + select IBM_NEW_EMAC_EMAC4
> + bool
> +
> # 44x errata/workaround config symbols, selected by the CPU models above
> config IBM440EP_ERR42
> bool
> Index: linux-work/arch/powerpc/platforms/44x/Makefile
> ===================================================================
> --- linux-work.orig/arch/powerpc/platforms/44x/Makefile 2007-11-30
> 13:51:48.000000000 +1100 +++
> linux-work/arch/powerpc/platforms/44x/Makefile 2007-11-30
> 13:51:48.000000000 +1100 @@ -1,5 +1,6 @@
> obj-$(CONFIG_44x) := misc_44x.o
> obj-$(CONFIG_EBONY) += ebony.o
> obj-$(CONFIG_TAISHAN) += taishan.o
> -obj-$(CONFIG_BAMBOO) += bamboo.o
> +obj-$(CONFIG_BAMBOO) += bamboo.o
> obj-$(CONFIG_SEQUOIA) += sequoia.o
> +obj-$(CONFIG_KATMAI) += katmai.o
> Index: linux-work/arch/powerpc/boot/dts/katmai.dts
> ===================================================================
> --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> +++ linux-work/arch/powerpc/boot/dts/katmai.dts 2007-11-30
> 14:46:02.000000000 +1100 @@ -0,0 +1,392 @@
> +/*
> + * Device Tree Source for AMCC Bamboo
> + *
> + * Copyright (c) 2006, 2007 IBM Corp.
> + * Benjamin Herrenschmidt <benh@kernel.crashing.org>
> + *
> + * Copyright (c) 2006, 2007 IBM Corp.
> + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
> + *
> + * FIXME: Draft only!
> + *
> + * 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.
> + */
> +
> +/ {
> + #address-cells = <2>;
> + #size-cells = <1>;
> + model = "amcc,katmai";
> + compatible = "amcc,katmai";
> + dcr-parent = <&/cpus/PowerPC,440SPe@0>;
> +
> + cpus {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + PowerPC,440SPe@0 {
> + device_type = "cpu";
> + reg = <0>;
> + clock-frequency = <0>; /* Filled in by zImage */
> + timebase-frequency = <0>; /* Filled in by zImage */
> + i-cache-line-size = <20>;
> + d-cache-line-size = <20>;
> + i-cache-size = <20000>;
> + d-cache-size = <20000>;
> + dcr-controller;
> + dcr-access-method = "native";
> + };
> + };
> +
> + memory {
> + device_type = "memory";
> + reg = <0 0 0>; /* Filled in by zImage */
> + };
> +
> + UIC0: interrupt-controller0 {
> + compatible = "ibm,uic-440spe","ibm,uic";
> + interrupt-controller;
> + cell-index = <0>;
> + dcr-reg = <0c0 009>;
> + #address-cells = <0>;
> + #size-cells = <0>;
> + #interrupt-cells = <2>;
> + };
> +
> + UIC1: interrupt-controller1 {
> + compatible = "ibm,uic-440spe","ibm,uic";
> + interrupt-controller;
> + cell-index = <1>;
> + dcr-reg = <0d0 009>;
> + #address-cells = <0>;
> + #size-cells = <0>;
> + #interrupt-cells = <2>;
> + interrupts = <1e 4 1f 4>; /* cascade */
> + interrupt-parent = <&UIC0>;
> + };
> +
> + UIC2: interrupt-controller2 {
> + compatible = "ibm,uic-440spe","ibm,uic";
> + interrupt-controller;
> + cell-index = <2>;
> + dcr-reg = <0e0 009>;
> + #address-cells = <0>;
> + #size-cells = <0>;
> + #interrupt-cells = <2>;
> + interrupts = <a 4 b 4>; /* cascade */
> + interrupt-parent = <&UIC0>;
> + };
> +
> + UIC3: interrupt-controller3 {
> + compatible = "ibm,uic-440spe","ibm,uic";
> + interrupt-controller;
> + cell-index = <3>;
> + dcr-reg = <0f0 009>;
> + #address-cells = <0>;
> + #size-cells = <0>;
> + #interrupt-cells = <2>;
> + interrupts = <10 4 11 4>; /* cascade */
> + interrupt-parent = <&UIC0>;
> + };
> +
> + SDR0: sdr {
> + compatible = "ibm,sdr-440spe";
> + dcr-reg = <00e 002>;
> + };
> +
> + CPR0: cpr {
> + compatible = "ibm,cpr-440spe";
> + dcr-reg = <00c 002>;
> + };
> +
> + plb {
> + compatible = "ibm,plb-440spe", "ibm,plb-440gp", "ibm,plb4";
> + #address-cells = <2>;
> + #size-cells = <1>;
> + ranges;
> + clock-frequency = <0>; /* Filled in by zImage */
> +
> + SDRAM0: sdram {
> + compatible = "ibm,sdram-440spe", "ibm,sdram-405gp";
> + dcr-reg = <010 2>;
> + };
> +
> + MAL0: mcmal {
> + compatible = "ibm,mcmal-440spe", "ibm,mcmal2";
> + dcr-reg = <180 62>;
> + num-tx-chans = <2>;
> + num-rx-chans = <1>;
> + interrupt-parent = <&MAL0>;
> + interrupts = <0 1 2 3 4>;
> + #interrupt-cells = <1>;
> + #address-cells = <0>;
> + #size-cells = <0>;
> + interrupt-map = </*TXEOB*/ 0 &UIC1 6 4
> + /*RXEOB*/ 1 &UIC1 7 4
> + /*SERR*/ 2 &UIC1 1 4
> + /*TXDE*/ 3 &UIC1 2 4
> + /*RXDE*/ 4 &UIC1 3 4>;
> + };
> +
> + POB0: opb {
> + compatible = "ibm,opb-440spe", "ibm,opb-440gp", "ibm,opb";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges = <00000000 4 e0000000 20000000>;
> + clock-frequency = <0>; /* Filled in by zImage */
> +
> + EBC0: ebc {
> + compatible = "ibm,ebc-440spe", "ibm,ebc-440gp", "ibm,ebc";
> + dcr-reg = <012 2>;
> + #address-cells = <2>;
> + #size-cells = <1>;
> + clock-frequency = <0>; /* Filled in by zImage */
> + ranges;
> + interrupts = <5 1>;
> + interrupt-parent = <&UIC1>;
> + };
> +
> + UART0: serial@10000200 {
> + device_type = "serial";
> + compatible = "ns16550";
> + reg = <10000200 8>;
> + virtual-reg = <a0000200>;
> + clock-frequency = <0>; /* Filled in by zImage */
> + current-speed = <1c200>;
> + interrupt-parent = <&UIC0>;
> + interrupts = <0 4>;
> + };
> +
> + UART1: serial@10000300 {
> + device_type = "serial";
> + compatible = "ns16550";
> + reg = <10000300 8>;
> + virtual-reg = <a0000300>;
> + clock-frequency = <0>;
> + current-speed = <0>;
> + interrupt-parent = <&UIC0>;
> + interrupts = <1 4>;
> + };
> +
> +
> + UART2: serial@10000600 {
> + device_type = "serial";
> + compatible = "ns16550";
> + reg = <10000600 8>;
> + virtual-reg = <a0000600>;
> + clock-frequency = <0>;
> + current-speed = <0>;
> + interrupt-parent = <&UIC1>;
> + interrupts = <5 4>;
> + };
> +
> + IIC0: i2c@10000400 {
> + device_type = "i2c";
> + compatible = "ibm,iic-440spe", "ibm,iic-440gp", "ibm,iic";
> + reg = <10000400 14>;
> + interrupt-parent = <&UIC0>;
> + interrupts = <2 4>;
> + };
> +
> + IIC1: i2c@10000500 {
> + device_type = "i2c";
> + compatible = "ibm,iic-440spe", "ibm,iic-440gp", "ibm,iic";
> + reg = <10000500 14>;
> + interrupt-parent = <&UIC0>;
> + interrupts = <3 4>;
> + };
> +
> + EMAC0: ethernet@10000800 {
> + linux,network-index = <0>;
> + device_type = "network";
> + compatible = "ibm,emac-440spe", "ibm,emac4";
> + interrupt-parent = <&UIC1>;
> + interrupts = <1c 4 1d 4>;
> + reg = <10000800 70>;
> + local-mac-address = [000000000000];
> + mal-device = <&MAL0>;
> + mal-tx-channel = <0>;
> + mal-rx-channel = <0>;
> + cell-index = <0>;
> + max-frame-size = <5dc>;
> + rx-fifo-size = <1000>;
> + tx-fifo-size = <800>;
> + phy-mode = "gmii";
> + phy-map = <00000000>;
> + has-inverted-stacr-oc;
> + has-new-stacr-staopc;
> + };
> + };
> +
> + PCIX0: pci@c0ec00000 {
> + device_type = "pci";
> + #interrupt-cells = <1>;
> + #size-cells = <2>;
> + #address-cells = <3>;
> + compatible = "ibm,plb-pcix-440spe", "ibm,plb-pcix";
> + primary;
> + large-inbound-windows;
> + enable-msi-hole;
> + reg = <c 0ec00000 8 /* Config space access */
> + 0 0 0 /* no IACK cycles */
> + c 0ed00000 4 /* Special cycles */
> + c 0ec80000 100 /* Internal registers */
> + c 0ec80100 fc>; /* Internal messaging registers */
> +
> + /* Outbound ranges, one memory and one IO,
> + * later cannot be changed
> + */
> + ranges = <02000000 0 80000000 0000000d 80000000 0 80000000
> + 01000000 0 00000000 0000000c 08000000 0 00010000>;
> +
> + /* Inbound 2GB range starting at 0 */
> + dma-ranges = <42000000 0 0 0 0 0 80000000>;
> +
> + /* This drives busses 0 to 0xf */
> + bus-range = <0 f>;
> +
> + /*
> + * On Katmai, the following PCI-X interrupts signals
> + * have to be enabled via jumpers (only INTA is
> + * enabled per default):
> + *
> + * INTB: J3: 1-2
> + * INTC: J2: 1-2
> + * INTD: J1: 1-2
> + */
> + interrupt-map-mask = <f800 0 0 7>;
> + interrupt-map = <
> + /* IDSEL 1 */
> + 0800 0 0 1 &UIC1 14 8
> + 0800 0 0 2 &UIC1 13 8
> + 0800 0 0 3 &UIC1 12 8
> + 0800 0 0 4 &UIC1 11 8
> + >;
> + };
> +
> + PCIE0: pciex@d00000000 {
> + device_type = "pci";
> + #interrupt-cells = <1>;
> + #size-cells = <2>;
> + #address-cells = <3>;
> + compatible = "ibm,plb-pciex-440speB", "ibm,plb-pciex";
> + primary;
> + port = <0>; /* port number */
port = <1>;
> + reg = <d 00000000 20000000 /* Config space access */
> + c 10000000 00001000>; /* Registers */
> + dcr-reg = <100 020>;
> + sdr-base = <300>;
> +
> + /* Outbound ranges, one memory and one IO,
> + * later cannot be changed
> + */
> + ranges = <02000000 0 80000000 0000000e 00000000 0 80000000
> + 01000000 0 00000000 0000000f 80000000 0 00010000>;
> +
> + /* Inbound 2GB range starting at 0 */
> + dma-ranges = <42000000 0 0 0 0 0 80000000>;
> +
> + /* This drives busses 10 to 0x1f */
> + bus-range = <10 1f>;
> +
> + /* Legacy interrupts (note the weird polarity). We are
> + * de-swizzling here because the numbers are actually for
> + * port of the root complex virtual P2P bridge. But I want
> + * to avoid putting a node for it in the tree, so the numbers
> + * below are basically de-swizzled numbers. The real slot is
> + * on idsel 1, so the swizzling is new_pin = (pin % 4) + 1
> + */
> + interrupt-map-mask = <0000 0 0 7>;
> + interrupt-map = <
> + 0000 0 0 2 &UIC3 0 4 /* swizzled int A */
> + 0000 0 0 3 &UIC3 1 4 /* swizzled int B */
> + 0000 0 0 4 &UIC3 2 4 /* swizzled int C */
> + 0000 0 0 1 &UIC3 3 4 /* swizzled int D */>;
> + };
> +
> + PCIE1: pciex@d20000000 {
> + device_type = "pci";
> + #interrupt-cells = <1>;
> + #size-cells = <2>;
> + #address-cells = <3>;
> + compatible = "ibm,plb-pciex-440speB", "ibm,plb-pciex";
> + primary;
> + port = <0>; /* port number */
port = <2>;
You might want to add a defconfig file for Katmai too.
BTW: I'm starting to "play" with all this new stuff in
Josh's "2.6.25-candidates" branch and experience some problems with PCIe.
Will post first response soon.
Thanks.
Best regards,
Stefan
^ permalink raw reply
* Re: [PATCH 1/3] [NET] phy/fixed.c: rework to not duplicate PHYlayer functionality
From: Anton Vorontsov @ 2007-12-02 12:13 UTC (permalink / raw)
To: Joakim Tjernlund
Cc: linuxppc-dev, netdev, 'Jeff Garzik', linux-kernel
In-Reply-To: <051e01c834da$1cce82f0$5267a8c0@Jocke>
On Sun, Dec 02, 2007 at 12:54:36PM +0100, Joakim Tjernlund wrote:
> [SNIP]
> > ^^ the correct solution is to implement arch_initcall function
> > which will create fixed PHYs, and then leave only
> > snprintf(fpi->bus_id, 16, PHY_ID_FMT, 0, *data); part in the
> > fs_enet's find_phy().
> >
> > Try add something like this to the fsl_soc.c (compile untested):
> >
> > - - - -
> > static int __init of_add_fixed_phys(void)
> > {
> > struct device_node *np;
> > const u32 *prop;
> > struct fixed_phy_status status = {};
> >
> > while ((np = of_find_node_by_name(NULL, "ethernet"))) {
> > data = of_get_property(np, "fixed-link", NULL);
> > if (!data)
> > continue;
> >
> > status.link = 1;
> > status.duplex = data[1];
> > status.speed = data[2];
>
> What about Pause and Asym_Pause?
Will be addressed in the next respin of these patches. Let's
hope on Monday.
> Dunno why so few, if any, eth drivers
> impl. it, but the PHY lib supports it.
> Even if fixed PHYs doesn't support it directly I think the OF interface
> should have it.
>
> - fixed-link : <a b c d e> where a is emulated phy id - choose any,
> but unique to the all specified fixed-links, b is duplex - 0 half,
> 1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no pause,
> 1 pause, d asym_pause - 0 no asym_pause, 1 asym_pause.
--
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2
^ permalink raw reply
* RE: [PATCH 1/3] [NET] phy/fixed.c: rework to not duplicate PHYlayer functionality
From: Joakim Tjernlund @ 2007-12-02 11:54 UTC (permalink / raw)
To: cbou, 'Jochen Friedrich'
Cc: netdev, linux-kernel, 'Jeff Garzik', linuxppc-dev
In-Reply-To: <20071201213403.GA2350@zarina>
[SNIP]
> ^^ the correct solution is to implement arch_initcall function
> which will create fixed PHYs, and then leave only
> snprintf(fpi->bus_id, 16, PHY_ID_FMT, 0, *data); part in the
> fs_enet's find_phy().
>
> Try add something like this to the fsl_soc.c (compile untested):
>
> - - - -
> static int __init of_add_fixed_phys(void)
> {
> struct device_node *np;
> const u32 *prop;
> struct fixed_phy_status status = {};
>
> while ((np = of_find_node_by_name(NULL, "ethernet"))) {
> data = of_get_property(np, "fixed-link", NULL);
> if (!data)
> continue;
>
> status.link = 1;
> status.duplex = data[1];
> status.speed = data[2];
What about Pause and Asym_Pause? Dunno why so few, if any, eth drivers
impl. it, but the PHY lib supports it.
Even if fixed PHYs doesn't support it directly I think the OF interface
should have it.
- fixed-link : <a b c d e> where a is emulated phy id - choose any,
but unique to the all specified fixed-links, b is duplex - 0 half,
1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no pause,
1 pause, d asym_pause - 0 no asym_pause, 1 asym_pause.
Jocke
>
> ret = fixed_phy_add(PHY_POLL, data[0], &status);
> if (ret)
> return ret;
> }
>
> return 0;
> }
> arch_initcall(of_add_fixed_phys);
> - - - -
>
> And remove fixed_phy_add() from the fs_enet. This should work
> nicely and also should be ideologically correct. ;-)
>
> > How is this supposed to work for modules or for the
> > PPC_CPM_NEW_BINDING mode where the device tree is no longer scanned
> > during fs_soc initialization but during device initialization?
>
> We should mark fixed.c as bool. Fake/virtual/fixed/platform PHYs
> creation is architecture code anyway, can't be =m.
>
> --
> Anton Vorontsov
> email: cbou@mail.ru
> backup email: ya-cbou@yandex.ru
> irc://irc.freenode.net/bd2
^ permalink raw reply
* Re: [PATCH 0/3] OF-platform PATA driver
From: Anton Vorontsov @ 2007-12-02 11:46 UTC (permalink / raw)
To: Olof Johansson
Cc: linux-ide, Paul Mundt, Jeff Garzik, Arnd Bergmann, linuxppc-dev
In-Reply-To: <20071202035755.GA3116@lixom.net>
On Sat, Dec 01, 2007 at 09:57:55PM -0600, Olof Johansson wrote:
> On Sun, Dec 02, 2007 at 02:58:10AM +0300, Anton Vorontsov wrote:
> > On Sat, Dec 01, 2007 at 05:54:49PM -0500, Jeff Garzik wrote:
> > while (1) {
> > send_patches();
> >
> > if (ack_collected(PaulM) && ack_collected(PowerPC_people))
> > break;
> >
> > sleep(wait_for_comments_timeout); <-- currently here.
>
> I still haven't seen you address the compatible comments (that
> pata-platform is suboptimal). Or did I miss some respin of the patches?
I didn't resend these patches yet. You started the thread, but you hid
away from the discussion (you had been Cc'ed to every mail).
1. Arnd suggested {p,s}ata-pio-{1,2,3,..} or ata-{1,2,3,..} compatible
scheme;
2. Sergei verbosely explained that that there is no reason to
complicate compatible property. He suggested ata-generic, or
ata-simple;
Mainly I was awaiting for your further comments. By now I tend to
follow Sergei's comments and rename compatible stuff to ata-generic.
Are you fine with it?
Thanks,
--
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2
^ permalink raw reply
* Re: [PATCH 09/28] blk_end_request: changing ps3disk (take 3)
From: Geert Uytterhoeven @ 2007-12-02 9:34 UTC (permalink / raw)
To: Kiyoshi Ueda
Cc: linux-scsi, Linux/PPC Development, jens.axboe,
Linux Kernel Development, linux-ide, dm-devel, bharrosh, j-nomura
In-Reply-To: <20071130.182810.98558485.k-ueda@ct.jp.nec.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1615 bytes --]
On Fri, 30 Nov 2007, Kiyoshi Ueda wrote:
> This patch converts ps3disk to use blk_end_request().
^^^^^^^^^^^^^^^
Patch subject and description are inconsistent with actual change.
> Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
> ---
> drivers/block/ps3disk.c | 6 +-----
> 1 files changed, 1 insertion(+), 5 deletions(-)
>
> Index: 2.6.24-rc3-mm2/drivers/block/ps3disk.c
> ===================================================================
> --- 2.6.24-rc3-mm2.orig/drivers/block/ps3disk.c
> +++ 2.6.24-rc3-mm2/drivers/block/ps3disk.c
> @@ -280,11 +280,7 @@ static irqreturn_t ps3disk_interrupt(int
> }
>
> spin_lock(&priv->lock);
> - if (!end_that_request_first(req, uptodate, num_sectors)) {
> - add_disk_randomness(req->rq_disk);
> - blkdev_dequeue_request(req);
> - end_that_request_last(req, uptodate);
> - }
> + __blk_end_request(req, uptodate, num_sectors << 9);
^^^^^^^^^^^^^^^^^
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
^ permalink raw reply
* Re: CPM2 USB host driver
From: Mike Rapoport @ 2007-12-02 6:31 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linuxppc-dev
In-Reply-To: <200711301628.33526.laurentp@cse-semaphore.com>
>
>> I tried to forward-port FHCI from Freescale 2.6.11 kernels. Twice.
>> But these efforts always stumbled over more important tasks.
>
> Do you think I start from the FHCI driver provided by Freescale for 2.6.11,
> from the cpm2usb driver or from scratch ?
The cmp2usb is old and crappy, and I had no time at all to update it. So if the
choice was to start from cpm2usb or from scratch, I'd choose to start from scratch.
> Both the cpm2usb and FHCI drivers seem to use the packet-level interface. Is
> there any reason not to use the transaction-level interface ?
> Best regards,
>
--
Sincerely yours,
Mike.
^ permalink raw reply
* Re: Linux 2.4 on ML310 with PowerPC405
From: narendra sisodiya @ 2007-12-02 6:35 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-embedded
In-Reply-To: <fa686aa40712012030r6ca993aek5dd4e58c961ac6fb@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1185 bytes --]
Ok,, I will try with 2.6 now, and then let you know the exact errors in
complication
Thanks and regards
On Dec 2, 2007 10:00 AM, Grant Likely <grant.likely@secretlab.ca> wrote:
> On 12/1/07, narendra sisodiya <narendra.sisodiya@gmail.com> wrote:
> > Hi all,
> > I am trying to port Linux on ML310 virtex 2 pro,,
> > I am unable to compile my properly,,,
> > here i documented my procedure,,,
> > http://placements.techfandu.org/index.php?title=Linux_kernel_on_ML310
> >
> > Please check out ,, where i am doing mistake
>
> I'm sorry, but I don't understand where you are having your problems.
> Specifically, what error are you getting when your kernel fails to
> compile?
>
> As for the kernel version, I do not recommend using linux 2.4 any
> more. You should consider using a 2.6 kernel instead. I've got some
> documentation on the 2.6 kernel for virtex devices here:
>
> http://wiki.secretlab.ca/index.php/Linux_on_Xilinx_Virtex
>
> Cheers,
> g.
>
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
> grant.likely@secretlab.ca
> (403) 399-0195
>
--
Narendra Sisodiya
MTech (Computer Technology), IIT Delhi
+91-9999232792
http://www.techfandu.org/index.html
[-- Attachment #2: Type: text/html, Size: 1931 bytes --]
^ permalink raw reply
* Re: [PATCH v2 2/2] [POWERPC] Use new machine_xxx_initcall hooks in platform code
From: Grant Likely @ 2007-12-02 6:17 UTC (permalink / raw)
To: linuxppc-dev, benh, vitb, galak, olof, jwboyer
In-Reply-To: <20071202061033.21193.64818.stgit@trillian.secretlab.ca>
On 12/1/07, Grant Likely <grant.likely@secretlab.ca> wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> This patch makes the platform code use the new machine-specific initcall
> hooks. This has the advantage of not needing to explicitly test
> machine_is() at the top of every initcall function.
Warning: I have *not* exhaustively tested this; just spot checked in a
few places. I'll be more thorough once I know everyone is okay with
it in principle.
Cheers,
g.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
>
> arch/powerpc/platforms/40x/kilauea.c | 5 +----
> arch/powerpc/platforms/40x/virtex.c | 5 +----
> arch/powerpc/platforms/40x/walnut.c | 5 +----
> arch/powerpc/platforms/44x/bamboo.c | 5 +----
> arch/powerpc/platforms/44x/ebony.c | 5 +----
> arch/powerpc/platforms/44x/sequoia.c | 5 +----
> arch/powerpc/platforms/82xx/mpc8272_ads.c | 5 +----
> arch/powerpc/platforms/82xx/pq2fads.c | 5 +----
> arch/powerpc/platforms/83xx/mpc832x_mds.c | 5 +----
> arch/powerpc/platforms/83xx/mpc832x_rdb.c | 11 ++---------
> arch/powerpc/platforms/83xx/mpc836x_mds.c | 5 +----
> arch/powerpc/platforms/85xx/mpc85xx_ads.c | 5 +----
> arch/powerpc/platforms/85xx/mpc85xx_cds.c | 6 +-----
> arch/powerpc/platforms/85xx/mpc85xx_mds.c | 5 +----
> arch/powerpc/platforms/8xx/ep88xc.c | 5 ++---
> arch/powerpc/platforms/8xx/mpc885ads_setup.c | 5 ++---
> arch/powerpc/platforms/cell/io-workarounds.c | 5 +----
> arch/powerpc/platforms/cell/iommu.c | 5 +----
> arch/powerpc/platforms/cell/pmu.c | 5 +----
> arch/powerpc/platforms/cell/setup.c | 5 +----
> arch/powerpc/platforms/celleb/iommu.c | 6 +-----
> arch/powerpc/platforms/celleb/setup.c | 5 +----
> arch/powerpc/platforms/embedded6xx/ls_uart.c | 5 +----
> arch/powerpc/platforms/pasemi/idle.c | 5 +----
> arch/powerpc/platforms/pasemi/setup.c | 10 ++--------
> arch/powerpc/platforms/powermac/low_i2c.c | 7 ++-----
> arch/powerpc/platforms/powermac/pfunc_base.c | 3 +--
> arch/powerpc/platforms/powermac/pic.c | 3 +--
> arch/powerpc/platforms/powermac/setup.c | 12 ++----------
> 29 files changed, 35 insertions(+), 128 deletions(-)
>
> diff --git a/arch/powerpc/platforms/40x/kilauea.c b/arch/powerpc/platforms/40x/kilauea.c
> index 1bffdbd..0853db7 100644
> --- a/arch/powerpc/platforms/40x/kilauea.c
> +++ b/arch/powerpc/platforms/40x/kilauea.c
> @@ -29,14 +29,11 @@ static struct of_device_id kilauea_of_bus[] = {
>
> static int __init kilauea_device_probe(void)
> {
> - if (!machine_is(kilauea))
> - return 0;
> -
> of_platform_bus_probe(NULL, kilauea_of_bus, NULL);
>
> return 0;
> }
> -device_initcall(kilauea_device_probe);
> +machine_device_initcall(kilauea, kilauea_device_probe);
>
> static int __init kilauea_probe(void)
> {
> diff --git a/arch/powerpc/platforms/40x/virtex.c b/arch/powerpc/platforms/40x/virtex.c
> index 14bbc32..43fcc8e 100644
> --- a/arch/powerpc/platforms/40x/virtex.c
> +++ b/arch/powerpc/platforms/40x/virtex.c
> @@ -17,14 +17,11 @@
>
> static int __init virtex_device_probe(void)
> {
> - if (!machine_is(virtex))
> - return 0;
> -
> of_platform_bus_probe(NULL, NULL, NULL);
>
> return 0;
> }
> -device_initcall(virtex_device_probe);
> +machine_device_initcall(virtex, virtex_device_probe);
>
> static int __init virtex_probe(void)
> {
> diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c
> index ff6db24..91a5247 100644
> --- a/arch/powerpc/platforms/40x/walnut.c
> +++ b/arch/powerpc/platforms/40x/walnut.c
> @@ -34,15 +34,12 @@ static struct of_device_id walnut_of_bus[] = {
>
> static int __init walnut_device_probe(void)
> {
> - if (!machine_is(walnut))
> - return 0;
> -
> /* FIXME: do bus probe here */
> of_platform_bus_probe(NULL, walnut_of_bus, NULL);
>
> return 0;
> }
> -device_initcall(walnut_device_probe);
> +machine_device_initcall(walnut, walnut_device_probe);
>
> static int __init walnut_probe(void)
> {
> diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c
> index be23f11..5253996 100644
> --- a/arch/powerpc/platforms/44x/bamboo.c
> +++ b/arch/powerpc/platforms/44x/bamboo.c
> @@ -32,14 +32,11 @@ static struct of_device_id bamboo_of_bus[] = {
>
> static int __init bamboo_device_probe(void)
> {
> - if (!machine_is(bamboo))
> - return 0;
> -
> of_platform_bus_probe(NULL, bamboo_of_bus, NULL);
>
> return 0;
> }
> -device_initcall(bamboo_device_probe);
> +machine_device_initcall(bamboo, bamboo_device_probe);
>
> static int __init bamboo_probe(void)
> {
> diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c
> index 6cd3476..b783c6e 100644
> --- a/arch/powerpc/platforms/44x/ebony.c
> +++ b/arch/powerpc/platforms/44x/ebony.c
> @@ -36,14 +36,11 @@ static struct of_device_id ebony_of_bus[] = {
>
> static int __init ebony_device_probe(void)
> {
> - if (!machine_is(ebony))
> - return 0;
> -
> of_platform_bus_probe(NULL, ebony_of_bus, NULL);
>
> return 0;
> }
> -device_initcall(ebony_device_probe);
> +machine_device_initcall(ebony, ebony_device_probe);
>
> /*
> * Called very early, MMU is off, device-tree isn't unflattened
> diff --git a/arch/powerpc/platforms/44x/sequoia.c b/arch/powerpc/platforms/44x/sequoia.c
> index 21a9dd1..e5be0c7 100644
> --- a/arch/powerpc/platforms/44x/sequoia.c
> +++ b/arch/powerpc/platforms/44x/sequoia.c
> @@ -32,14 +32,11 @@ static struct of_device_id sequoia_of_bus[] = {
>
> static int __init sequoia_device_probe(void)
> {
> - if (!machine_is(sequoia))
> - return 0;
> -
> of_platform_bus_probe(NULL, sequoia_of_bus, NULL);
>
> return 0;
> }
> -device_initcall(sequoia_device_probe);
> +machine_device_initcall(sequoia, sequoia_device_probe);
>
> static int __init sequoia_probe(void)
> {
> diff --git a/arch/powerpc/platforms/82xx/mpc8272_ads.c b/arch/powerpc/platforms/82xx/mpc8272_ads.c
> index fd83440..3fce6b3 100644
> --- a/arch/powerpc/platforms/82xx/mpc8272_ads.c
> +++ b/arch/powerpc/platforms/82xx/mpc8272_ads.c
> @@ -165,14 +165,11 @@ static struct of_device_id __initdata of_bus_ids[] = {
>
> static int __init declare_of_platform_devices(void)
> {
> - if (!machine_is(mpc8272_ads))
> - return 0;
> -
> /* Publish the QE devices */
> of_platform_bus_probe(NULL, of_bus_ids, NULL);
> return 0;
> }
> -device_initcall(declare_of_platform_devices);
> +machine_device_initcall(mpc8272_ads, declare_of_platform_devices);
>
> /*
> * Called very early, device-tree isn't unflattened
> diff --git a/arch/powerpc/platforms/82xx/pq2fads.c b/arch/powerpc/platforms/82xx/pq2fads.c
> index 4f457a9..c5430b3 100644
> --- a/arch/powerpc/platforms/82xx/pq2fads.c
> +++ b/arch/powerpc/platforms/82xx/pq2fads.c
> @@ -176,14 +176,11 @@ static struct of_device_id __initdata of_bus_ids[] = {
>
> static int __init declare_of_platform_devices(void)
> {
> - if (!machine_is(pq2fads))
> - return 0;
> -
> /* Publish the QE devices */
> of_platform_bus_probe(NULL, of_bus_ids, NULL);
> return 0;
> }
> -device_initcall(declare_of_platform_devices);
> +machine_device_initcall(pq2fads, declare_of_platform_devices);
>
> define_machine(pq2fads)
> {
> diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c
> index 39ee7a1..6b9d72a 100644
> --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
> +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
> @@ -110,15 +110,12 @@ static struct of_device_id mpc832x_ids[] = {
>
> static int __init mpc832x_declare_of_platform_devices(void)
> {
> - if (!machine_is(mpc832x_mds))
> - return 0;
> -
> /* Publish the QE devices */
> of_platform_bus_probe(NULL, mpc832x_ids, NULL);
>
> return 0;
> }
> -device_initcall(mpc832x_declare_of_platform_devices);
> +machine_device_initcall(mpc832x_mds, mpc832x_declare_of_platform_devices);
>
> static void __init mpc832x_sys_init_IRQ(void)
> {
> diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
> index d4bd040..67a282f 100644
> --- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c
> +++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
> @@ -63,9 +63,6 @@ static struct spi_board_info mpc832x_spi_boardinfo = {
>
> static int __init mpc832x_spi_init(void)
> {
> - if (!machine_is(mpc832x_rdb))
> - return 0;
> -
> par_io_config_pin(3, 0, 3, 0, 1, 0); /* SPI1 MOSI, I/O */
> par_io_config_pin(3, 1, 3, 0, 1, 0); /* SPI1 MISO, I/O */
> par_io_config_pin(3, 2, 3, 0, 1, 0); /* SPI1 CLK, I/O */
> @@ -79,8 +76,7 @@ static int __init mpc832x_spi_init(void)
> mpc83xx_spi_activate_cs,
> mpc83xx_spi_deactivate_cs);
> }
> -
> -device_initcall(mpc832x_spi_init);
> +machine_device_initcall(mpc832x_rdb, mpc832x_spi_init);
>
> /* ************************************************************************
> *
> @@ -123,15 +119,12 @@ static struct of_device_id mpc832x_ids[] = {
>
> static int __init mpc832x_declare_of_platform_devices(void)
> {
> - if (!machine_is(mpc832x_rdb))
> - return 0;
> -
> /* Publish the QE devices */
> of_platform_bus_probe(NULL, mpc832x_ids, NULL);
>
> return 0;
> }
> -device_initcall(mpc832x_declare_of_platform_devices);
> +machine_device_initcall(mpc832x_rdb, mpc832x_declare_of_platform_devices);
>
> void __init mpc832x_rdb_init_IRQ(void)
> {
> diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c
> index e40012f..9f37718 100644
> --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c
> +++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
> @@ -141,15 +141,12 @@ static struct of_device_id mpc836x_ids[] = {
>
> static int __init mpc836x_declare_of_platform_devices(void)
> {
> - if (!machine_is(mpc836x_mds))
> - return 0;
> -
> /* Publish the QE devices */
> of_platform_bus_probe(NULL, mpc836x_ids, NULL);
>
> return 0;
> }
> -device_initcall(mpc836x_declare_of_platform_devices);
> +machine_device_initcall(mpc836x_mds, mpc836x_declare_of_platform_devices);
>
> static void __init mpc836x_mds_init_IRQ(void)
> {
> diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
> index bccdc25..a3fa1b0 100644
> --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
> +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
> @@ -233,13 +233,10 @@ static struct of_device_id __initdata of_bus_ids[] = {
>
> static int __init declare_of_platform_devices(void)
> {
> - if (!machine_is(mpc85xx_ads))
> - return 0;
> -
> of_platform_bus_probe(NULL, of_bus_ids, NULL);
> return 0;
> }
> -device_initcall(declare_of_platform_devices);
> +machine_device_initcall(mpc85xx_ads, declare_of_platform_devices);
>
> /*
> * Called very early, device-tree isn't unflattened
> diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
> index 4d063ee..8b1de78 100644
> --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
> +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
> @@ -222,9 +222,6 @@ static int mpc85xx_cds_8259_attach(void)
> struct device_node *cascade_node = NULL;
> int cascade_irq;
>
> - if (!machine_is(mpc85xx_cds))
> - return 0;
> -
> /* Initialize the i8259 controller */
> for_each_node_by_type(np, "interrupt-controller")
> if (of_device_is_compatible(np, "chrp,iic")) {
> @@ -262,8 +259,7 @@ static int mpc85xx_cds_8259_attach(void)
>
> return 0;
> }
> -
> -device_initcall(mpc85xx_cds_8259_attach);
> +machine_device_initcall(mpc85xx_cds, mpc85xx_cds_8259_attach);
>
> #endif /* CONFIG_PPC_I8259 */
>
> diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
> index 61b3eed..5f68c99 100644
> --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
> +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
> @@ -144,15 +144,12 @@ static struct of_device_id mpc85xx_ids[] = {
>
> static int __init mpc85xx_publish_devices(void)
> {
> - if (!machine_is(mpc85xx_mds))
> - return 0;
> -
> /* Publish the QE devices */
> of_platform_bus_probe(NULL,mpc85xx_ids,NULL);
>
> return 0;
> }
> -device_initcall(mpc85xx_publish_devices);
> +machine_device_initcall(mpc85xx_mds, mpc85xx_publish_devices);
>
> static void __init mpc85xx_mds_pic_init(void)
> {
> diff --git a/arch/powerpc/platforms/8xx/ep88xc.c b/arch/powerpc/platforms/8xx/ep88xc.c
> index c518b6c..88afa35 100644
> --- a/arch/powerpc/platforms/8xx/ep88xc.c
> +++ b/arch/powerpc/platforms/8xx/ep88xc.c
> @@ -155,12 +155,11 @@ static struct of_device_id __initdata of_bus_ids[] = {
> static int __init declare_of_platform_devices(void)
> {
> /* Publish the QE devices */
> - if (machine_is(ep88xc))
> - of_platform_bus_probe(NULL, of_bus_ids, NULL);
> + of_platform_bus_probe(NULL, of_bus_ids, NULL);
>
> return 0;
> }
> -device_initcall(declare_of_platform_devices);
> +machine_device_initcall(ep88xc, declare_of_platform_devices);
>
> define_machine(ep88xc) {
> .name = "Embedded Planet EP88xC",
> diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
> index 2cf1b6a..6ef8e9e 100644
> --- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c
> +++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
> @@ -264,12 +264,11 @@ static struct of_device_id __initdata of_bus_ids[] = {
> static int __init declare_of_platform_devices(void)
> {
> /* Publish the QE devices */
> - if (machine_is(mpc885_ads))
> - of_platform_bus_probe(NULL, of_bus_ids, NULL);
> + of_platform_bus_probe(NULL, of_bus_ids, NULL);
>
> return 0;
> }
> -device_initcall(declare_of_platform_devices);
> +machine_device_initcall(mpc885_ads, declare_of_platform_devices);
>
> define_machine(mpc885_ads) {
> .name = "Freescale MPC885 ADS",
> diff --git a/arch/powerpc/platforms/cell/io-workarounds.c b/arch/powerpc/platforms/cell/io-workarounds.c
> index 9d7c2ef..e3ae39c 100644
> --- a/arch/powerpc/platforms/cell/io-workarounds.c
> +++ b/arch/powerpc/platforms/cell/io-workarounds.c
> @@ -309,9 +309,6 @@ static int __init spider_pci_workaround_init(void)
> {
> struct pci_controller *phb;
>
> - if (!machine_is(cell))
> - return 0;
> -
> /* Find spider bridges. We assume they have been all probed
> * in setup_arch(). If that was to change, we would need to
> * update this code to cope with dynamically added busses
> @@ -343,4 +340,4 @@ static int __init spider_pci_workaround_init(void)
>
> return 0;
> }
> -arch_initcall(spider_pci_workaround_init);
> +machine_arch_initcall(cell, spider_pci_workaround_init);
> diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
> index faabc3f..648077f 100644
> --- a/arch/powerpc/platforms/cell/iommu.c
> +++ b/arch/powerpc/platforms/cell/iommu.c
> @@ -699,9 +699,6 @@ static int __init cell_iommu_init(void)
> {
> struct device_node *np;
>
> - if (!machine_is(cell))
> - return -ENODEV;
> -
> /* If IOMMU is disabled or we have little enough RAM to not need
> * to enable it, we setup a direct mapping.
> *
> @@ -744,5 +741,5 @@ static int __init cell_iommu_init(void)
>
> return 0;
> }
> -arch_initcall(cell_iommu_init);
> +machine_arch_initcall(cell, cell_iommu_init);
>
> diff --git a/arch/powerpc/platforms/cell/pmu.c b/arch/powerpc/platforms/cell/pmu.c
> index 1ed3036..cb0cdab 100644
> --- a/arch/powerpc/platforms/cell/pmu.c
> +++ b/arch/powerpc/platforms/cell/pmu.c
> @@ -381,9 +381,6 @@ static int __init cbe_init_pm_irq(void)
> unsigned int irq;
> int rc, node;
>
> - if (!machine_is(cell))
> - return 0;
> -
> for_each_node(node) {
> irq = irq_create_mapping(NULL, IIC_IRQ_IOEX_PMI |
> (node << IIC_IRQ_NODE_SHIFT));
> @@ -404,7 +401,7 @@ static int __init cbe_init_pm_irq(void)
>
> return 0;
> }
> -arch_initcall(cbe_init_pm_irq);
> +machine_arch_initcall(cell, cbe_init_pm_irq);
>
> void cbe_sync_irq(int node)
> {
> diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
> index 98e7ef8..8390d2d 100644
> --- a/arch/powerpc/platforms/cell/setup.c
> +++ b/arch/powerpc/platforms/cell/setup.c
> @@ -85,9 +85,6 @@ static int __init cell_publish_devices(void)
> {
> int node;
>
> - if (!machine_is(cell))
> - return 0;
> -
> /* Publish OF platform devices for southbridge IOs */
> of_platform_bus_probe(NULL, NULL, NULL);
>
> @@ -101,7 +98,7 @@ static int __init cell_publish_devices(void)
> }
> return 0;
> }
> -device_initcall(cell_publish_devices);
> +machine_device_initcall(cell, cell_publish_devices);
>
> static void cell_mpic_cascade(unsigned int irq, struct irq_desc *desc)
> {
> diff --git a/arch/powerpc/platforms/celleb/iommu.c b/arch/powerpc/platforms/celleb/iommu.c
> index 755d869..c9884f4 100644
> --- a/arch/powerpc/platforms/celleb/iommu.c
> +++ b/arch/powerpc/platforms/celleb/iommu.c
> @@ -91,14 +91,10 @@ static struct notifier_block celleb_of_bus_notifier = {
>
> static int __init celleb_init_iommu(void)
> {
> - if (!machine_is(celleb))
> - return -ENODEV;
> -
> celleb_init_direct_mapping();
> set_pci_dma_ops(&dma_direct_ops);
> bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier);
>
> return 0;
> }
> -
> -arch_initcall(celleb_init_iommu);
> +machine_arch_initcall(celleb, celleb_init_iommu);
> diff --git a/arch/powerpc/platforms/celleb/setup.c b/arch/powerpc/platforms/celleb/setup.c
> index ddfb35a..aa18f95 100644
> --- a/arch/powerpc/platforms/celleb/setup.c
> +++ b/arch/powerpc/platforms/celleb/setup.c
> @@ -127,9 +127,6 @@ static struct of_device_id celleb_bus_ids[] __initdata = {
>
> static int __init celleb_publish_devices(void)
> {
> - if (!machine_is(celleb))
> - return 0;
> -
> /* Publish OF platform devices for southbridge IOs */
> of_platform_bus_probe(NULL, celleb_bus_ids, NULL);
>
> @@ -137,7 +134,7 @@ static int __init celleb_publish_devices(void)
>
> return 0;
> }
> -device_initcall(celleb_publish_devices);
> +machine_device_initcall(celleb, celleb_publish_devices);
>
> define_machine(celleb) {
> .name = "Cell Reference Set",
> diff --git a/arch/powerpc/platforms/embedded6xx/ls_uart.c b/arch/powerpc/platforms/embedded6xx/ls_uart.c
> index c99264c..9d891bd 100644
> --- a/arch/powerpc/platforms/embedded6xx/ls_uart.c
> +++ b/arch/powerpc/platforms/embedded6xx/ls_uart.c
> @@ -117,9 +117,6 @@ static int __init ls_uarts_init(void)
> phys_addr_t phys_addr;
> int len;
>
> - if (!machine_is(linkstation))
> - return 0;
> -
> avr = of_find_node_by_path("/soc10x/serial@80004500");
> if (!avr)
> return -EINVAL;
> @@ -142,4 +139,4 @@ static int __init ls_uarts_init(void)
> return 0;
> }
>
> -late_initcall(ls_uarts_init);
> +machine_late_initcall(linkstation, ls_uarts_init);
> diff --git a/arch/powerpc/platforms/pasemi/idle.c b/arch/powerpc/platforms/pasemi/idle.c
> index d8e1fcc..43911d8 100644
> --- a/arch/powerpc/platforms/pasemi/idle.c
> +++ b/arch/powerpc/platforms/pasemi/idle.c
> @@ -74,9 +74,6 @@ static int pasemi_system_reset_exception(struct pt_regs *regs)
>
> static int __init pasemi_idle_init(void)
> {
> - if (!machine_is(pasemi))
> - return -ENODEV;
> -
> #ifndef CONFIG_PPC_PASEMI_CPUFREQ
> printk(KERN_WARNING "No cpufreq driver, powersavings modes disabled\n");
> current_mode = 0;
> @@ -88,7 +85,7 @@ static int __init pasemi_idle_init(void)
>
> return 0;
> }
> -late_initcall(pasemi_idle_init);
> +machine_late_initcall(pasemi, pasemi_idle_init);
>
> static int __init idle_param(char *p)
> {
> diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
> index 3d62060..59c8371 100644
> --- a/arch/powerpc/platforms/pasemi/setup.c
> +++ b/arch/powerpc/platforms/pasemi/setup.c
> @@ -126,9 +126,6 @@ static int __init pas_setup_mce_regs(void)
> struct pci_dev *dev;
> int reg;
>
> - if (!machine_is(pasemi))
> - return -ENODEV;
> -
> /* Remap various SoC status registers for use by the MCE handler */
>
> reg = 0;
> @@ -172,7 +169,7 @@ static int __init pas_setup_mce_regs(void)
>
> return 0;
> }
> -device_initcall(pas_setup_mce_regs);
> +machine_device_initcall(pasemi, pas_setup_mce_regs);
>
> static __init void pas_init_IRQ(void)
> {
> @@ -369,9 +366,6 @@ static struct of_device_id pasemi_bus_ids[] = {
>
> static int __init pasemi_publish_devices(void)
> {
> - if (!machine_is(pasemi))
> - return 0;
> -
> pasemi_pcmcia_init();
>
> /* Publish OF platform devices for SDC and other non-PCI devices */
> @@ -379,7 +373,7 @@ static int __init pasemi_publish_devices(void)
>
> return 0;
> }
> -device_initcall(pasemi_publish_devices);
> +machine_device_initcall(pasemi, pasemi_publish_devices);
>
>
> /*
> diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
> index da2007e..9c9299c 100644
> --- a/arch/powerpc/platforms/powermac/low_i2c.c
> +++ b/arch/powerpc/platforms/powermac/low_i2c.c
> @@ -1462,9 +1462,6 @@ int __init pmac_i2c_init(void)
> return 0;
> i2c_inited = 1;
>
> - if (!machine_is(powermac))
> - return 0;
> -
> /* Probe keywest-i2c busses */
> kw_i2c_probe();
>
> @@ -1483,7 +1480,7 @@ int __init pmac_i2c_init(void)
>
> return 0;
> }
> -arch_initcall(pmac_i2c_init);
> +machine_arch_initcall(powermac, pmac_i2c_init);
>
> /* Since pmac_i2c_init can be called too early for the platform device
> * registration, we need to do it at a later time. In our case, subsys
> @@ -1515,4 +1512,4 @@ static int __init pmac_i2c_create_platform_devices(void)
>
> return 0;
> }
> -subsys_initcall(pmac_i2c_create_platform_devices);
> +machine_subsys_initcall(powermac, pmac_i2c_create_platform_devices);
> diff --git a/arch/powerpc/platforms/powermac/pfunc_base.c b/arch/powerpc/platforms/powermac/pfunc_base.c
> index 45d54b9..db20de5 100644
> --- a/arch/powerpc/platforms/powermac/pfunc_base.c
> +++ b/arch/powerpc/platforms/powermac/pfunc_base.c
> @@ -363,8 +363,7 @@ int __init pmac_pfunc_base_install(void)
>
> return 0;
> }
> -
> -arch_initcall(pmac_pfunc_base_install);
> +machine_arch_initcall(powermac, pmac_pfunc_base_install);
>
> #ifdef CONFIG_PM
>
> diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
> index 999f5e1..cd72164 100644
> --- a/arch/powerpc/platforms/powermac/pic.c
> +++ b/arch/powerpc/platforms/powermac/pic.c
> @@ -690,6 +690,5 @@ static int __init init_pmacpic_sysfs(void)
> sysdev_driver_register(&pmacpic_sysclass, &driver_pmacpic);
> return 0;
> }
> -
> -subsys_initcall(init_pmacpic_sysfs);
> +machine_subsys_initcall(powermac, init_pmacpic_sysfs);
>
> diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
> index 02c5330..0421189 100644
> --- a/arch/powerpc/platforms/powermac/setup.c
> +++ b/arch/powerpc/platforms/powermac/setup.c
> @@ -398,17 +398,13 @@ static int initializing = 1;
>
> static int pmac_late_init(void)
> {
> - if (!machine_is(powermac))
> - return -ENODEV;
> -
> initializing = 0;
> /* this is udbg (which is __init) and we can later use it during
> * cpu hotplug (in smp_core99_kick_cpu) */
> ppc_md.progress = NULL;
> return 0;
> }
> -
> -late_initcall(pmac_late_init);
> +machine_late_initcall(powermac, pmac_late_init);
>
> /*
> * This is __init_refok because we check for "initializing" before
> @@ -535,9 +531,6 @@ static int __init pmac_declare_of_platform_devices(void)
> if (machine_is(chrp))
> return -1;
>
> - if (!machine_is(powermac))
> - return 0;
> -
> np = of_find_node_by_name(NULL, "valkyrie");
> if (np)
> of_platform_device_create(np, "valkyrie", NULL);
> @@ -552,8 +545,7 @@ static int __init pmac_declare_of_platform_devices(void)
>
> return 0;
> }
> -
> -device_initcall(pmac_declare_of_platform_devices);
> +machine_device_initcall(powermac, pmac_declare_of_platform_devices);
>
> /*
> * Called very early, MMU is off, device-tree isn't unflattened
>
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* [PATCH v2 2/2] [POWERPC] Use new machine_xxx_initcall hooks in platform code
From: Grant Likely @ 2007-12-02 6:10 UTC (permalink / raw)
To: linuxppc-dev, benh, vitb, galak, olof, jwboyer
In-Reply-To: <20071202061028.21193.39309.stgit@trillian.secretlab.ca>
From: Grant Likely <grant.likely@secretlab.ca>
This patch makes the platform code use the new machine-specific initcall
hooks. This has the advantage of not needing to explicitly test
machine_is() at the top of every initcall function.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/powerpc/platforms/40x/kilauea.c | 5 +----
arch/powerpc/platforms/40x/virtex.c | 5 +----
arch/powerpc/platforms/40x/walnut.c | 5 +----
arch/powerpc/platforms/44x/bamboo.c | 5 +----
arch/powerpc/platforms/44x/ebony.c | 5 +----
arch/powerpc/platforms/44x/sequoia.c | 5 +----
arch/powerpc/platforms/82xx/mpc8272_ads.c | 5 +----
arch/powerpc/platforms/82xx/pq2fads.c | 5 +----
arch/powerpc/platforms/83xx/mpc832x_mds.c | 5 +----
arch/powerpc/platforms/83xx/mpc832x_rdb.c | 11 ++---------
arch/powerpc/platforms/83xx/mpc836x_mds.c | 5 +----
arch/powerpc/platforms/85xx/mpc85xx_ads.c | 5 +----
arch/powerpc/platforms/85xx/mpc85xx_cds.c | 6 +-----
arch/powerpc/platforms/85xx/mpc85xx_mds.c | 5 +----
arch/powerpc/platforms/8xx/ep88xc.c | 5 ++---
arch/powerpc/platforms/8xx/mpc885ads_setup.c | 5 ++---
arch/powerpc/platforms/cell/io-workarounds.c | 5 +----
arch/powerpc/platforms/cell/iommu.c | 5 +----
arch/powerpc/platforms/cell/pmu.c | 5 +----
arch/powerpc/platforms/cell/setup.c | 5 +----
arch/powerpc/platforms/celleb/iommu.c | 6 +-----
arch/powerpc/platforms/celleb/setup.c | 5 +----
arch/powerpc/platforms/embedded6xx/ls_uart.c | 5 +----
arch/powerpc/platforms/pasemi/idle.c | 5 +----
arch/powerpc/platforms/pasemi/setup.c | 10 ++--------
arch/powerpc/platforms/powermac/low_i2c.c | 7 ++-----
arch/powerpc/platforms/powermac/pfunc_base.c | 3 +--
arch/powerpc/platforms/powermac/pic.c | 3 +--
arch/powerpc/platforms/powermac/setup.c | 12 ++----------
29 files changed, 35 insertions(+), 128 deletions(-)
diff --git a/arch/powerpc/platforms/40x/kilauea.c b/arch/powerpc/platforms/40x/kilauea.c
index 1bffdbd..0853db7 100644
--- a/arch/powerpc/platforms/40x/kilauea.c
+++ b/arch/powerpc/platforms/40x/kilauea.c
@@ -29,14 +29,11 @@ static struct of_device_id kilauea_of_bus[] = {
static int __init kilauea_device_probe(void)
{
- if (!machine_is(kilauea))
- return 0;
-
of_platform_bus_probe(NULL, kilauea_of_bus, NULL);
return 0;
}
-device_initcall(kilauea_device_probe);
+machine_device_initcall(kilauea, kilauea_device_probe);
static int __init kilauea_probe(void)
{
diff --git a/arch/powerpc/platforms/40x/virtex.c b/arch/powerpc/platforms/40x/virtex.c
index 14bbc32..43fcc8e 100644
--- a/arch/powerpc/platforms/40x/virtex.c
+++ b/arch/powerpc/platforms/40x/virtex.c
@@ -17,14 +17,11 @@
static int __init virtex_device_probe(void)
{
- if (!machine_is(virtex))
- return 0;
-
of_platform_bus_probe(NULL, NULL, NULL);
return 0;
}
-device_initcall(virtex_device_probe);
+machine_device_initcall(virtex, virtex_device_probe);
static int __init virtex_probe(void)
{
diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c
index ff6db24..91a5247 100644
--- a/arch/powerpc/platforms/40x/walnut.c
+++ b/arch/powerpc/platforms/40x/walnut.c
@@ -34,15 +34,12 @@ static struct of_device_id walnut_of_bus[] = {
static int __init walnut_device_probe(void)
{
- if (!machine_is(walnut))
- return 0;
-
/* FIXME: do bus probe here */
of_platform_bus_probe(NULL, walnut_of_bus, NULL);
return 0;
}
-device_initcall(walnut_device_probe);
+machine_device_initcall(walnut, walnut_device_probe);
static int __init walnut_probe(void)
{
diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c
index be23f11..5253996 100644
--- a/arch/powerpc/platforms/44x/bamboo.c
+++ b/arch/powerpc/platforms/44x/bamboo.c
@@ -32,14 +32,11 @@ static struct of_device_id bamboo_of_bus[] = {
static int __init bamboo_device_probe(void)
{
- if (!machine_is(bamboo))
- return 0;
-
of_platform_bus_probe(NULL, bamboo_of_bus, NULL);
return 0;
}
-device_initcall(bamboo_device_probe);
+machine_device_initcall(bamboo, bamboo_device_probe);
static int __init bamboo_probe(void)
{
diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c
index 6cd3476..b783c6e 100644
--- a/arch/powerpc/platforms/44x/ebony.c
+++ b/arch/powerpc/platforms/44x/ebony.c
@@ -36,14 +36,11 @@ static struct of_device_id ebony_of_bus[] = {
static int __init ebony_device_probe(void)
{
- if (!machine_is(ebony))
- return 0;
-
of_platform_bus_probe(NULL, ebony_of_bus, NULL);
return 0;
}
-device_initcall(ebony_device_probe);
+machine_device_initcall(ebony, ebony_device_probe);
/*
* Called very early, MMU is off, device-tree isn't unflattened
diff --git a/arch/powerpc/platforms/44x/sequoia.c b/arch/powerpc/platforms/44x/sequoia.c
index 21a9dd1..e5be0c7 100644
--- a/arch/powerpc/platforms/44x/sequoia.c
+++ b/arch/powerpc/platforms/44x/sequoia.c
@@ -32,14 +32,11 @@ static struct of_device_id sequoia_of_bus[] = {
static int __init sequoia_device_probe(void)
{
- if (!machine_is(sequoia))
- return 0;
-
of_platform_bus_probe(NULL, sequoia_of_bus, NULL);
return 0;
}
-device_initcall(sequoia_device_probe);
+machine_device_initcall(sequoia, sequoia_device_probe);
static int __init sequoia_probe(void)
{
diff --git a/arch/powerpc/platforms/82xx/mpc8272_ads.c b/arch/powerpc/platforms/82xx/mpc8272_ads.c
index fd83440..3fce6b3 100644
--- a/arch/powerpc/platforms/82xx/mpc8272_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc8272_ads.c
@@ -165,14 +165,11 @@ static struct of_device_id __initdata of_bus_ids[] = {
static int __init declare_of_platform_devices(void)
{
- if (!machine_is(mpc8272_ads))
- return 0;
-
/* Publish the QE devices */
of_platform_bus_probe(NULL, of_bus_ids, NULL);
return 0;
}
-device_initcall(declare_of_platform_devices);
+machine_device_initcall(mpc8272_ads, declare_of_platform_devices);
/*
* Called very early, device-tree isn't unflattened
diff --git a/arch/powerpc/platforms/82xx/pq2fads.c b/arch/powerpc/platforms/82xx/pq2fads.c
index 4f457a9..c5430b3 100644
--- a/arch/powerpc/platforms/82xx/pq2fads.c
+++ b/arch/powerpc/platforms/82xx/pq2fads.c
@@ -176,14 +176,11 @@ static struct of_device_id __initdata of_bus_ids[] = {
static int __init declare_of_platform_devices(void)
{
- if (!machine_is(pq2fads))
- return 0;
-
/* Publish the QE devices */
of_platform_bus_probe(NULL, of_bus_ids, NULL);
return 0;
}
-device_initcall(declare_of_platform_devices);
+machine_device_initcall(pq2fads, declare_of_platform_devices);
define_machine(pq2fads)
{
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c
index 39ee7a1..6b9d72a 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
@@ -110,15 +110,12 @@ static struct of_device_id mpc832x_ids[] = {
static int __init mpc832x_declare_of_platform_devices(void)
{
- if (!machine_is(mpc832x_mds))
- return 0;
-
/* Publish the QE devices */
of_platform_bus_probe(NULL, mpc832x_ids, NULL);
return 0;
}
-device_initcall(mpc832x_declare_of_platform_devices);
+machine_device_initcall(mpc832x_mds, mpc832x_declare_of_platform_devices);
static void __init mpc832x_sys_init_IRQ(void)
{
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
index d4bd040..67a282f 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -63,9 +63,6 @@ static struct spi_board_info mpc832x_spi_boardinfo = {
static int __init mpc832x_spi_init(void)
{
- if (!machine_is(mpc832x_rdb))
- return 0;
-
par_io_config_pin(3, 0, 3, 0, 1, 0); /* SPI1 MOSI, I/O */
par_io_config_pin(3, 1, 3, 0, 1, 0); /* SPI1 MISO, I/O */
par_io_config_pin(3, 2, 3, 0, 1, 0); /* SPI1 CLK, I/O */
@@ -79,8 +76,7 @@ static int __init mpc832x_spi_init(void)
mpc83xx_spi_activate_cs,
mpc83xx_spi_deactivate_cs);
}
-
-device_initcall(mpc832x_spi_init);
+machine_device_initcall(mpc832x_rdb, mpc832x_spi_init);
/* ************************************************************************
*
@@ -123,15 +119,12 @@ static struct of_device_id mpc832x_ids[] = {
static int __init mpc832x_declare_of_platform_devices(void)
{
- if (!machine_is(mpc832x_rdb))
- return 0;
-
/* Publish the QE devices */
of_platform_bus_probe(NULL, mpc832x_ids, NULL);
return 0;
}
-device_initcall(mpc832x_declare_of_platform_devices);
+machine_device_initcall(mpc832x_rdb, mpc832x_declare_of_platform_devices);
void __init mpc832x_rdb_init_IRQ(void)
{
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c
index e40012f..9f37718 100644
--- a/arch/powerpc/platforms/83xx/mpc836x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
@@ -141,15 +141,12 @@ static struct of_device_id mpc836x_ids[] = {
static int __init mpc836x_declare_of_platform_devices(void)
{
- if (!machine_is(mpc836x_mds))
- return 0;
-
/* Publish the QE devices */
of_platform_bus_probe(NULL, mpc836x_ids, NULL);
return 0;
}
-device_initcall(mpc836x_declare_of_platform_devices);
+machine_device_initcall(mpc836x_mds, mpc836x_declare_of_platform_devices);
static void __init mpc836x_mds_init_IRQ(void)
{
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index bccdc25..a3fa1b0 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -233,13 +233,10 @@ static struct of_device_id __initdata of_bus_ids[] = {
static int __init declare_of_platform_devices(void)
{
- if (!machine_is(mpc85xx_ads))
- return 0;
-
of_platform_bus_probe(NULL, of_bus_ids, NULL);
return 0;
}
-device_initcall(declare_of_platform_devices);
+machine_device_initcall(mpc85xx_ads, declare_of_platform_devices);
/*
* Called very early, device-tree isn't unflattened
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 4d063ee..8b1de78 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -222,9 +222,6 @@ static int mpc85xx_cds_8259_attach(void)
struct device_node *cascade_node = NULL;
int cascade_irq;
- if (!machine_is(mpc85xx_cds))
- return 0;
-
/* Initialize the i8259 controller */
for_each_node_by_type(np, "interrupt-controller")
if (of_device_is_compatible(np, "chrp,iic")) {
@@ -262,8 +259,7 @@ static int mpc85xx_cds_8259_attach(void)
return 0;
}
-
-device_initcall(mpc85xx_cds_8259_attach);
+machine_device_initcall(mpc85xx_cds, mpc85xx_cds_8259_attach);
#endif /* CONFIG_PPC_I8259 */
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index 61b3eed..5f68c99 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -144,15 +144,12 @@ static struct of_device_id mpc85xx_ids[] = {
static int __init mpc85xx_publish_devices(void)
{
- if (!machine_is(mpc85xx_mds))
- return 0;
-
/* Publish the QE devices */
of_platform_bus_probe(NULL,mpc85xx_ids,NULL);
return 0;
}
-device_initcall(mpc85xx_publish_devices);
+machine_device_initcall(mpc85xx_mds, mpc85xx_publish_devices);
static void __init mpc85xx_mds_pic_init(void)
{
diff --git a/arch/powerpc/platforms/8xx/ep88xc.c b/arch/powerpc/platforms/8xx/ep88xc.c
index c518b6c..88afa35 100644
--- a/arch/powerpc/platforms/8xx/ep88xc.c
+++ b/arch/powerpc/platforms/8xx/ep88xc.c
@@ -155,12 +155,11 @@ static struct of_device_id __initdata of_bus_ids[] = {
static int __init declare_of_platform_devices(void)
{
/* Publish the QE devices */
- if (machine_is(ep88xc))
- of_platform_bus_probe(NULL, of_bus_ids, NULL);
+ of_platform_bus_probe(NULL, of_bus_ids, NULL);
return 0;
}
-device_initcall(declare_of_platform_devices);
+machine_device_initcall(ep88xc, declare_of_platform_devices);
define_machine(ep88xc) {
.name = "Embedded Planet EP88xC",
diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
index 2cf1b6a..6ef8e9e 100644
--- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c
+++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
@@ -264,12 +264,11 @@ static struct of_device_id __initdata of_bus_ids[] = {
static int __init declare_of_platform_devices(void)
{
/* Publish the QE devices */
- if (machine_is(mpc885_ads))
- of_platform_bus_probe(NULL, of_bus_ids, NULL);
+ of_platform_bus_probe(NULL, of_bus_ids, NULL);
return 0;
}
-device_initcall(declare_of_platform_devices);
+machine_device_initcall(mpc885_ads, declare_of_platform_devices);
define_machine(mpc885_ads) {
.name = "Freescale MPC885 ADS",
diff --git a/arch/powerpc/platforms/cell/io-workarounds.c b/arch/powerpc/platforms/cell/io-workarounds.c
index 9d7c2ef..e3ae39c 100644
--- a/arch/powerpc/platforms/cell/io-workarounds.c
+++ b/arch/powerpc/platforms/cell/io-workarounds.c
@@ -309,9 +309,6 @@ static int __init spider_pci_workaround_init(void)
{
struct pci_controller *phb;
- if (!machine_is(cell))
- return 0;
-
/* Find spider bridges. We assume they have been all probed
* in setup_arch(). If that was to change, we would need to
* update this code to cope with dynamically added busses
@@ -343,4 +340,4 @@ static int __init spider_pci_workaround_init(void)
return 0;
}
-arch_initcall(spider_pci_workaround_init);
+machine_arch_initcall(cell, spider_pci_workaround_init);
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index faabc3f..648077f 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -699,9 +699,6 @@ static int __init cell_iommu_init(void)
{
struct device_node *np;
- if (!machine_is(cell))
- return -ENODEV;
-
/* If IOMMU is disabled or we have little enough RAM to not need
* to enable it, we setup a direct mapping.
*
@@ -744,5 +741,5 @@ static int __init cell_iommu_init(void)
return 0;
}
-arch_initcall(cell_iommu_init);
+machine_arch_initcall(cell, cell_iommu_init);
diff --git a/arch/powerpc/platforms/cell/pmu.c b/arch/powerpc/platforms/cell/pmu.c
index 1ed3036..cb0cdab 100644
--- a/arch/powerpc/platforms/cell/pmu.c
+++ b/arch/powerpc/platforms/cell/pmu.c
@@ -381,9 +381,6 @@ static int __init cbe_init_pm_irq(void)
unsigned int irq;
int rc, node;
- if (!machine_is(cell))
- return 0;
-
for_each_node(node) {
irq = irq_create_mapping(NULL, IIC_IRQ_IOEX_PMI |
(node << IIC_IRQ_NODE_SHIFT));
@@ -404,7 +401,7 @@ static int __init cbe_init_pm_irq(void)
return 0;
}
-arch_initcall(cbe_init_pm_irq);
+machine_arch_initcall(cell, cbe_init_pm_irq);
void cbe_sync_irq(int node)
{
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index 98e7ef8..8390d2d 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -85,9 +85,6 @@ static int __init cell_publish_devices(void)
{
int node;
- if (!machine_is(cell))
- return 0;
-
/* Publish OF platform devices for southbridge IOs */
of_platform_bus_probe(NULL, NULL, NULL);
@@ -101,7 +98,7 @@ static int __init cell_publish_devices(void)
}
return 0;
}
-device_initcall(cell_publish_devices);
+machine_device_initcall(cell, cell_publish_devices);
static void cell_mpic_cascade(unsigned int irq, struct irq_desc *desc)
{
diff --git a/arch/powerpc/platforms/celleb/iommu.c b/arch/powerpc/platforms/celleb/iommu.c
index 755d869..c9884f4 100644
--- a/arch/powerpc/platforms/celleb/iommu.c
+++ b/arch/powerpc/platforms/celleb/iommu.c
@@ -91,14 +91,10 @@ static struct notifier_block celleb_of_bus_notifier = {
static int __init celleb_init_iommu(void)
{
- if (!machine_is(celleb))
- return -ENODEV;
-
celleb_init_direct_mapping();
set_pci_dma_ops(&dma_direct_ops);
bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier);
return 0;
}
-
-arch_initcall(celleb_init_iommu);
+machine_arch_initcall(celleb, celleb_init_iommu);
diff --git a/arch/powerpc/platforms/celleb/setup.c b/arch/powerpc/platforms/celleb/setup.c
index ddfb35a..aa18f95 100644
--- a/arch/powerpc/platforms/celleb/setup.c
+++ b/arch/powerpc/platforms/celleb/setup.c
@@ -127,9 +127,6 @@ static struct of_device_id celleb_bus_ids[] __initdata = {
static int __init celleb_publish_devices(void)
{
- if (!machine_is(celleb))
- return 0;
-
/* Publish OF platform devices for southbridge IOs */
of_platform_bus_probe(NULL, celleb_bus_ids, NULL);
@@ -137,7 +134,7 @@ static int __init celleb_publish_devices(void)
return 0;
}
-device_initcall(celleb_publish_devices);
+machine_device_initcall(celleb, celleb_publish_devices);
define_machine(celleb) {
.name = "Cell Reference Set",
diff --git a/arch/powerpc/platforms/embedded6xx/ls_uart.c b/arch/powerpc/platforms/embedded6xx/ls_uart.c
index c99264c..9d891bd 100644
--- a/arch/powerpc/platforms/embedded6xx/ls_uart.c
+++ b/arch/powerpc/platforms/embedded6xx/ls_uart.c
@@ -117,9 +117,6 @@ static int __init ls_uarts_init(void)
phys_addr_t phys_addr;
int len;
- if (!machine_is(linkstation))
- return 0;
-
avr = of_find_node_by_path("/soc10x/serial@80004500");
if (!avr)
return -EINVAL;
@@ -142,4 +139,4 @@ static int __init ls_uarts_init(void)
return 0;
}
-late_initcall(ls_uarts_init);
+machine_late_initcall(linkstation, ls_uarts_init);
diff --git a/arch/powerpc/platforms/pasemi/idle.c b/arch/powerpc/platforms/pasemi/idle.c
index d8e1fcc..43911d8 100644
--- a/arch/powerpc/platforms/pasemi/idle.c
+++ b/arch/powerpc/platforms/pasemi/idle.c
@@ -74,9 +74,6 @@ static int pasemi_system_reset_exception(struct pt_regs *regs)
static int __init pasemi_idle_init(void)
{
- if (!machine_is(pasemi))
- return -ENODEV;
-
#ifndef CONFIG_PPC_PASEMI_CPUFREQ
printk(KERN_WARNING "No cpufreq driver, powersavings modes disabled\n");
current_mode = 0;
@@ -88,7 +85,7 @@ static int __init pasemi_idle_init(void)
return 0;
}
-late_initcall(pasemi_idle_init);
+machine_late_initcall(pasemi, pasemi_idle_init);
static int __init idle_param(char *p)
{
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index 3d62060..59c8371 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -126,9 +126,6 @@ static int __init pas_setup_mce_regs(void)
struct pci_dev *dev;
int reg;
- if (!machine_is(pasemi))
- return -ENODEV;
-
/* Remap various SoC status registers for use by the MCE handler */
reg = 0;
@@ -172,7 +169,7 @@ static int __init pas_setup_mce_regs(void)
return 0;
}
-device_initcall(pas_setup_mce_regs);
+machine_device_initcall(pasemi, pas_setup_mce_regs);
static __init void pas_init_IRQ(void)
{
@@ -369,9 +366,6 @@ static struct of_device_id pasemi_bus_ids[] = {
static int __init pasemi_publish_devices(void)
{
- if (!machine_is(pasemi))
- return 0;
-
pasemi_pcmcia_init();
/* Publish OF platform devices for SDC and other non-PCI devices */
@@ -379,7 +373,7 @@ static int __init pasemi_publish_devices(void)
return 0;
}
-device_initcall(pasemi_publish_devices);
+machine_device_initcall(pasemi, pasemi_publish_devices);
/*
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
index da2007e..9c9299c 100644
--- a/arch/powerpc/platforms/powermac/low_i2c.c
+++ b/arch/powerpc/platforms/powermac/low_i2c.c
@@ -1462,9 +1462,6 @@ int __init pmac_i2c_init(void)
return 0;
i2c_inited = 1;
- if (!machine_is(powermac))
- return 0;
-
/* Probe keywest-i2c busses */
kw_i2c_probe();
@@ -1483,7 +1480,7 @@ int __init pmac_i2c_init(void)
return 0;
}
-arch_initcall(pmac_i2c_init);
+machine_arch_initcall(powermac, pmac_i2c_init);
/* Since pmac_i2c_init can be called too early for the platform device
* registration, we need to do it at a later time. In our case, subsys
@@ -1515,4 +1512,4 @@ static int __init pmac_i2c_create_platform_devices(void)
return 0;
}
-subsys_initcall(pmac_i2c_create_platform_devices);
+machine_subsys_initcall(powermac, pmac_i2c_create_platform_devices);
diff --git a/arch/powerpc/platforms/powermac/pfunc_base.c b/arch/powerpc/platforms/powermac/pfunc_base.c
index 45d54b9..db20de5 100644
--- a/arch/powerpc/platforms/powermac/pfunc_base.c
+++ b/arch/powerpc/platforms/powermac/pfunc_base.c
@@ -363,8 +363,7 @@ int __init pmac_pfunc_base_install(void)
return 0;
}
-
-arch_initcall(pmac_pfunc_base_install);
+machine_arch_initcall(powermac, pmac_pfunc_base_install);
#ifdef CONFIG_PM
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 999f5e1..cd72164 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -690,6 +690,5 @@ static int __init init_pmacpic_sysfs(void)
sysdev_driver_register(&pmacpic_sysclass, &driver_pmacpic);
return 0;
}
-
-subsys_initcall(init_pmacpic_sysfs);
+machine_subsys_initcall(powermac, init_pmacpic_sysfs);
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 02c5330..0421189 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -398,17 +398,13 @@ static int initializing = 1;
static int pmac_late_init(void)
{
- if (!machine_is(powermac))
- return -ENODEV;
-
initializing = 0;
/* this is udbg (which is __init) and we can later use it during
* cpu hotplug (in smp_core99_kick_cpu) */
ppc_md.progress = NULL;
return 0;
}
-
-late_initcall(pmac_late_init);
+machine_late_initcall(powermac, pmac_late_init);
/*
* This is __init_refok because we check for "initializing" before
@@ -535,9 +531,6 @@ static int __init pmac_declare_of_platform_devices(void)
if (machine_is(chrp))
return -1;
- if (!machine_is(powermac))
- return 0;
-
np = of_find_node_by_name(NULL, "valkyrie");
if (np)
of_platform_device_create(np, "valkyrie", NULL);
@@ -552,8 +545,7 @@ static int __init pmac_declare_of_platform_devices(void)
return 0;
}
-
-device_initcall(pmac_declare_of_platform_devices);
+machine_device_initcall(powermac, pmac_declare_of_platform_devices);
/*
* Called very early, MMU is off, device-tree isn't unflattened
^ permalink raw reply related
* [PATCH v2 1/2] [POWERPC] Add machine initcall macros
From: Grant Likely @ 2007-12-02 6:10 UTC (permalink / raw)
To: linuxppc-dev, benh, vitb, galak, olof, jwboyer
From: Grant Likely <grant.likely@secretlab.ca>
The machine initcall macros allow initcalls to be registered which
test machine_is() before executing the initcall.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
include/asm-powerpc/machdep.h | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/include/asm-powerpc/machdep.h b/include/asm-powerpc/machdep.h
index 6968f43..d5cd982 100644
--- a/include/asm-powerpc/machdep.h
+++ b/include/asm-powerpc/machdep.h
@@ -326,5 +326,28 @@ static inline void log_error(char *buf, unsigned int err_type, int fatal)
ppc_md.log_error(buf, err_type, fatal);
}
+#define __define_machine_initcall(mach,level,fn,id) \
+ static int __init __machine_initcall_##mach##_##fn(void) { \
+ if (machine_is(mach)) return fn(); \
+ return 0; \
+ } \
+ __define_initcall(level,__machine_initcall_##mach##_##fn,id);
+
+#define machine_core_initcall(mach,fn) __define_machine_initcall(mach,"1",fn,1)
+#define machine_core_initcall_sync(mach,fn) __define_machine_initcall(mach,"1s",fn,1s)
+#define machine_postcore_initcall(mach,fn) __define_machine_initcall(mach,"2",fn,2)
+#define machine_postcore_initcall_sync(mach,fn) __define_machine_initcall(mach,"2s",fn,2s)
+#define machine_arch_initcall(mach,fn) __define_machine_initcall(mach,"3",fn,3)
+#define machine_arch_initcall_sync(mach,fn) __define_machine_initcall(mach,"3s",fn,3s)
+#define machine_subsys_initcall(mach,fn) __define_machine_initcall(mach,"4",fn,4)
+#define machine_subsys_initcall_sync(mach,fn) __define_machine_initcall(mach,"4s",fn,4s)
+#define machine_fs_initcall(mach,fn) __define_machine_initcall(mach,"5",fn,5)
+#define machine_fs_initcall_sync(mach,fn) __define_machine_initcall(mach,"5s",fn,5s)
+#define machine_rootfs_initcall(mach,fn) __define_machine_initcall(mach,"rootfs",fn,rootfs)
+#define machine_device_initcall(mach,fn) __define_machine_initcall(mach,"6",fn,6)
+#define machine_device_initcall_sync(mach,fn) __define_machine_initcall(mach,"6s",fn,6s)
+#define machine_late_initcall(mach,fn) __define_machine_initcall(mach,"7",fn,7)
+#define machine_late_initcall_sync(mach,fn) __define_machine_initcall(mach,"7s",fn,7s)
+
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_MACHDEP_H */
^ permalink raw reply related
* [PATCH] Fix buglets in mpc5200 FEC code that are corrupting memory.
From: Grant Likely @ 2007-12-02 6:00 UTC (permalink / raw)
To: linuxppc-dev, netdev, jonsmirl, jgarzik; +Cc: dwmw2, domen.puncer
From: Jon Smirl <jonsmirl@gmail.com>
This is the reason I couldn't get user space started or connect to my
nfs server. Patch is against current linus git.
mpc5200 fec driver is corrupting memory. This patch fixes two bugs
where the wrong skb buffer was being referenced.
Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Acked-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
Jeff, this one hasn't been picked up for 2.6.24 yet and in needs to go in.
Thanks,
g.
drivers/net/fec_mpc52xx.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
index a8a0ee2..ddfcc0b 100644
--- a/drivers/net/fec_mpc52xx.c
+++ b/drivers/net/fec_mpc52xx.c
@@ -422,7 +422,7 @@ static irqreturn_t mpc52xx_fec_rx_interrupt(int irq, void *dev_id)
rskb = bcom_retrieve_buffer(priv->rx_dmatsk, &status,
(struct bcom_bd **)&bd);
- dma_unmap_single(&dev->dev, bd->skb_pa, skb->len, DMA_FROM_DEVICE);
+ dma_unmap_single(&dev->dev, bd->skb_pa, rskb->len, DMA_FROM_DEVICE);
/* Test for errors in received frame */
if (status & BCOM_FEC_RX_BD_ERRORS) {
@@ -467,7 +467,7 @@ static irqreturn_t mpc52xx_fec_rx_interrupt(int irq, void *dev_id)
bcom_prepare_next_buffer(priv->rx_dmatsk);
bd->status = FEC_RX_BUFFER_SIZE;
- bd->skb_pa = dma_map_single(&dev->dev, rskb->data,
+ bd->skb_pa = dma_map_single(&dev->dev, skb->data,
FEC_RX_BUFFER_SIZE, DMA_FROM_DEVICE);
bcom_submit_next_buffer(priv->rx_dmatsk, skb);
^ permalink raw reply related
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