* Re: [PATCH] powerpc: Disable and EOI interrupts in machine_crash_shutdown()
From: Haren Myneni @ 2006-04-05 22:50 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, Paul Mackerras, Milton Miller
In-Reply-To: <20060404114306.8DC0F679EF@ozlabs.org>
[-- Attachment #1: Type: text/plain, Size: 2775 bytes --]
linuxppc-dev-bounces+hbabu=us.ibm.com@ozlabs.org wrote on 04/04/2006
04:43:01 AM:
> We've seen several bugs caused by interrupt weirdness in the kdump
kernel.
> Panicking from an interrupt handler means we fail to EOI the interrupt,
and
> so the second kernel never gets that interrupt ever again. We also see
hangs
> on JS20 where we take interrupts in the second kernel early during boot.
>
> This patch fixes both those problems, and although it adds more code to
the
> crash path I think it is the best solution.
>
Michael,
Noticing the following issues when invoked kdump boot using
soft-reset. But the kdump boot is successful. Not a problem using sysrq-c
or Oops.
rtas_call retuned these error messages
"xics_disable_irq: irq=655360: ibm_set_xive(0xff) returned -3" for IRQ#
182
"xics_disable_irq: irq=589825: ibm_set_xive(0xff) returned -3" for IRQ#
216
cat /proc/interrupts
18: 2997 3401 1317 1442 XICS Edge IPI
134: 0 0 0 0 XICS Edge
ehci_hcd:usb1, ohci_hcd:usb2, ohci_hcd:usb3
167: 2169 0 0 0 XICS Edge ipr
182: 55 0 0 0 XICS Edge
hvc_console
216: 0 0 0 0 XICS Edge RAS_EPOW
BAD: 117
Thanks
Haren
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> ---
>
> arch/powerpc/kernel/crash.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> Index: kdump/arch/powerpc/kernel/crash.c
> ===================================================================
> --- kdump.orig/arch/powerpc/kernel/crash.c
> +++ kdump/arch/powerpc/kernel/crash.c
> @@ -22,6 +22,7 @@
> #include <linux/elf.h>
> #include <linux/elfcore.h>
> #include <linux/init.h>
> +#include <linux/irq.h>
> #include <linux/types.h>
>
> #include <asm/processor.h>
> @@ -174,6 +175,8 @@ static void crash_kexec_prepare_cpus(voi
>
> void default_machine_crash_shutdown(struct pt_regs *regs)
> {
> + unsigned int irq;
> +
> /*
> * This function is only called after the system
> * has paniced or is otherwise in a critical state.
> @@ -186,6 +189,16 @@ void default_machine_crash_shutdown(stru
> */
> local_irq_disable();
>
> + for_each_irq(irq) {
> + struct irq_desc *desc = irq_descp(irq);
> +
> + if (desc->status & IRQ_INPROGRESS)
> + desc->handler->end(irq);
> +
> + if (!(desc->status & IRQ_DISABLED))
> + desc->handler->disable(irq);
> + }
> +
> if (ppc_md.kexec_cpu_down)
> ppc_md.kexec_cpu_down(1, 0);
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
[-- Attachment #2: Type: text/html, Size: 4485 bytes --]
^ permalink raw reply
* Re: [PATCH 00/15] powerpc: move some header files
From: Paul Mackerras @ 2006-04-05 22:28 UTC (permalink / raw)
To: Kumar Gala; +Cc: Stephen Rothwell, linuxppc-dev
In-Reply-To: <C1CE62AD-7989-4DCA-B7B3-8A107ACBD153@kernel.crashing.org>
Kumar Gala writes:
> > I guess that would work, but Paulus is going to not like me as he
> > already
> > put all these patches into the powerpc tree. :-)
>
> That's Paulus own doing for his premature pull :)
For now I have reverted the powerpc.git tree to remove those commits
of Stephen's, so all it has now (compared to v2.6.17-rc1) are a CHRP
booting fix and the "iSeries has only 256 IRQs" patch.
Everyone, if you have done a pull from powerpc.git in the last 24
hours, please do this on your repository:
git reset b86756ae76dc5e7ecff3ca52a5842155e6d457de
That will get us back into sync. Sorry about the to-ing and fro-ing
on this.
Paul.
^ permalink raw reply
* Re: freescale lite 5200 board and kernel 2.6
From: John Rigby @ 2006-04-05 22:14 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <20060405212741.GC61331@server.idefix.loc>
Thanks Matthias now I don't have to say "we discussed this last week,
search the list" everytime this question comes up.
On 4/5/06, Matthias Fechner <idefix@fechner.net> wrote:
> Hello Domenico,
>
> * Domenico Andreoli <cavokz@gmail.com> [05-04-06 23:06]:
> > is there any patchset i can use for kernel 2.6? is it production-ready?
> > why isn't already in vanilla 2.6? has any sense to stay with kernel 2.4=
?
>
> I'm not sure if this helps, but I was successfully in getting a kernel
> 2.6 running with the icecube board. I have written a short docu in my
> wiki (booting with tftp and rootnfs over NFS):
> http://wiki.idefix.fechner.net/index.php/IceCube#Writing_kernel_modules_f=
or_2.6
>
> Maybe this will help.
> Please give me some feedback.
>
> Best regards,
> Matthias
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
^ permalink raw reply
* Re: freescale lite 5200 board and kernel 2.6
From: Matthias Fechner @ 2006-04-05 21:27 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <20060405210654.GA16848@raptus.dandreoli.com>
Hello Domenico,
* Domenico Andreoli <cavokz@gmail.com> [05-04-06 23:06]:
> is there any patchset i can use for kernel 2.6? is it production-ready?
> why isn't already in vanilla 2.6? has any sense to stay with kernel 2.4?
I'm not sure if this helps, but I was successfully in getting a kernel
2.6 running with the icecube board. I have written a short docu in my
wiki (booting with tftp and rootnfs over NFS):
http://wiki.idefix.fechner.net/index.php/IceCube#Writing_kernel_modules_for_2.6
Maybe this will help.
Please give me some feedback.
Best regards,
Matthias
^ permalink raw reply
* freescale lite 5200 board and kernel 2.6
From: Domenico Andreoli @ 2006-04-05 21:06 UTC (permalink / raw)
To: linuxppc-embedded
hi all,
i've got a freescale lite 5200 evaluation board (1 pci slot), i need
it to develop the driver for a industrial labeler machine. i was given
also some old evaluation version of metrowerks PCS and BSP stuff.
guess it.. i want to throw that software away and start from scratch
using kernel 2.6, maybe 2.6.16.
i made a cross-compiler, i built a vanilla 2.6.16 and put it on the
board's flash. i'd like to use rootfs from nfs. everything looks
promising, but vanilla 2.6.16 is not enough.
i've got some patches from patchwork.ozlabs.org (don't ask me which,
i'm not finding them any more.. one is named bcomm-to-split.diff),
re-compiled the kernel and now the board has also a network interface.
but i suspect the nic does not work correctly. sometimes kernel mounts
the rootfs, some (more) times it does not. when it does, i'm also able
to ping it from the network. conversely, i'm not.
i'm pretty confident that kernel network configuration is always right,
it is saved in the u-boot environment. network is a private one, two
hosts only.
i played a couple of days on this but i've to take a decision, time
is against me. start to develop for the old kernel 2.4 in the PCS &
BSP stuff or start with a shiny 2.6 (i've also a brand new rubini's
3rd edition "linux device drivers"!)
is there any patchset i can use for kernel 2.6? is it production-ready?
why isn't already in vanilla 2.6? has any sense to stay with kernel 2.4?
any help or hint is appreciated. thank you.
cheers
domenico
-----[ Domenico Andreoli, aka cavok
--[ http://people.debian.org/~cavok/gpgkey.asc
---[ 3A0F 2F80 F79C 678A 8936 4FEE 0677 9033 A20E BC50
^ permalink raw reply
* ethernet not workingfor u-boot on mpc8280 rattler
From: vikas mak @ 2006-04-05 19:58 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 553 bytes --]
i'm trying to port U-boot on rattler mpc8280 board. u-boot has been ported but its ethernet interface is not running. when i checked mii info command it said error in phy. i tried to reinitialize phy but i'm stuck if anybody could please help
the u boot output on minicom is as shown
> => mii info 0
> Error reading info from the PHY
> => mii read
> Error reading from the PHY addr=00 reg=00
> => ping 10.114.15.21
> Using FCC1 ETHERNET device
> ping failed; host 10.114.15.21 is not alive
please help
thanx and regards
Vikas Makhija
[-- Attachment #2: Type: text/html, Size: 974 bytes --]
^ permalink raw reply
* Re: [PATCH 00/15] powerpc: move some header files
From: Stephen Rothwell @ 2006-04-05 17:07 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, paulus
In-Reply-To: <C1CE62AD-7989-4DCA-B7B3-8A107ACBD153@kernel.crashing.org>
[-- Attachment #1: Type: text/plain, Size: 824 bytes --]
On Wed, 5 Apr 2006 11:15:04 -0500 Kumar Gala <galak@kernel.crashing.org> wrote:
>
> I'm guessing you had to pull some of them in because of the following:
>
> io.h:#include <asm-ppc/io.h>
> mmu_context.h:#include <asm-ppc/mmu_context.h>
> mmu.h:#include <asm-ppc/mmu.h>
> pci-bridge.h:#include <asm-ppc/pci-bridge.h>
> pgalloc.h:#include <asm-ppc/pgalloc.h>
> pgtable.h:#include <asm-ppc/pgtable.h>
>
> I think addressing these will make life easier with the other includes.
I'll have a look at these in the morning, thanks for the hint.
I am thinking of creating an include/asm-powerpc/<xx>_32.h for each of the asm-ppc
files above and then only putting into them what we need for arch/powerpc.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply
* help. a question on "make menuconfig"
From: Ming Liu @ 2006-04-05 16:02 UTC (permalink / raw)
To: linuxppc-embedded
Hi,
I am a novice for embendded linux. My platform is Xilinx Virtex4 (PPC405).
I have downloaded the kernal source of linuxppc_2_4_devel and modified the
Makefile as:
ARCH := ppc
CROSS_COMPILE = powerpc-405-linux-gnu-
But when I execute "make menuconfig", the following error happens,
mingliu@linux:~/linuxppc_2_4_devel> make menuconfig
make: *** arch/ppc: Is a directory. Stop.
mingliu@linux:~/linuxppc_2_4_devel>
Why this error happened? Is there something wrong with the Makefile? I did
nothing except for specifying the ARCH and the CROSS_COMPILE.
Thanks for your help.
BR
Ming
_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn
^ permalink raw reply
* [PATCH] powerpc: Fix machine detection in prom_init.c
From: Michael Ellerman @ 2006-04-05 16:18 UTC (permalink / raw)
To: Paul Mackerras, linuxppc-dev
In e8222502ee6157e2713da9e0792c21f4ad458d50 the detection of machine types
in prom_init broke for some machines. We should be checking /device_type
instead of /model. This should make Power3 and Power4 boot again. Haven't
been able to test this.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/kernel/prom_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: to-merge/arch/powerpc/kernel/prom_init.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/prom_init.c
+++ to-merge/arch/powerpc/kernel/prom_init.c
@@ -1528,7 +1528,7 @@ static int __init prom_find_machine_type
* non-IBM designs !
* - it has /rtas
*/
- len = prom_getprop(_prom->root, "model",
+ len = prom_getprop(_prom->root, "device_type",
compat, sizeof(compat)-1);
if (len <= 0)
return PLATFORM_GENERIC;
^ permalink raw reply
* Re: [PATCH 00/15] powerpc: move some header files
From: Kumar Gala @ 2006-04-05 16:15 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev, paulus
In-Reply-To: <20060406020313.186a74ad.sfr@canb.auug.org.au>
On Apr 5, 2006, at 11:03 AM, Stephen Rothwell wrote:
> On Wed, 5 Apr 2006 09:28:55 -0500 Kumar Gala
> <galak@kernel.crashing.org> wrote:
>>
>> How about we do the following to remove the include hack:
>>
>> don't move the following (determine what needs them to build and
>> fixup, I dont believe any of these need to exist at this point in
>> arch/powerpc for it to build any supported arch/powerpc platform:
>
> I only moved the files that were actually required to build the
> defconfigs
> for the three 32 bit builds in arch/powerpc ...
>
>> b/include/asm-powerpc/amigappc.h | 9 ++----
>> b/include/asm-powerpc/bootinfo.h | 8 ++---
>> b/include/asm-powerpc/mpc8xx.h | 10 +++---
>> b/include/asm-powerpc/ocp.h | 7 ++--
>> b/include/asm-powerpc/ocp_ids.h | 6 ++--
>> b/include/asm-powerpc/open_pic.h | 10 +++---
>
> So maybe I could attempt to remove the dependencies instead of
> moving the
> files. You are right that it is worth it if we can just get rid of
> these
> files.
>
>> Duplicate these headers (then I'll go through and clean them up,
>> removing arch/ppc'ism):
>>
>> b/include/asm-powerpc/mpc83xx.h | 7 ++--
>> b/include/asm-powerpc/mpc85xx.h | 9 ++----
>
> I guess that would work, but Paulus is going to not like me as he
> already
> put all these patches into the powerpc tree. :-)
That's Paulus own doing for his premature pull :)
> Something to keep me entertained for another day.
I'm guessing you had to pull some of them in because of the following:
io.h:#include <asm-ppc/io.h>
mmu_context.h:#include <asm-ppc/mmu_context.h>
mmu.h:#include <asm-ppc/mmu.h>
pci-bridge.h:#include <asm-ppc/pci-bridge.h>
pgalloc.h:#include <asm-ppc/pgalloc.h>
pgtable.h:#include <asm-ppc/pgtable.h>
I think addressing these will make life easier with the other includes.
- kumar
^ permalink raw reply
* Re: [PATCH 00/15] powerpc: move some header files
From: Stephen Rothwell @ 2006-04-05 16:03 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, paulus
In-Reply-To: <C40B1083-7953-4104-8FA3-5B9B4EBE1A77@kernel.crashing.org>
[-- Attachment #1: Type: text/plain, Size: 1456 bytes --]
On Wed, 5 Apr 2006 09:28:55 -0500 Kumar Gala <galak@kernel.crashing.org> wrote:
>
> How about we do the following to remove the include hack:
>
> don't move the following (determine what needs them to build and
> fixup, I dont believe any of these need to exist at this point in
> arch/powerpc for it to build any supported arch/powerpc platform:
I only moved the files that were actually required to build the defconfigs
for the three 32 bit builds in arch/powerpc ...
> b/include/asm-powerpc/amigappc.h | 9 ++----
> b/include/asm-powerpc/bootinfo.h | 8 ++---
> b/include/asm-powerpc/mpc8xx.h | 10 +++---
> b/include/asm-powerpc/ocp.h | 7 ++--
> b/include/asm-powerpc/ocp_ids.h | 6 ++--
> b/include/asm-powerpc/open_pic.h | 10 +++---
So maybe I could attempt to remove the dependencies instead of moving the
files. You are right that it is worth it if we can just get rid of these
files.
> Duplicate these headers (then I'll go through and clean them up,
> removing arch/ppc'ism):
>
> b/include/asm-powerpc/mpc83xx.h | 7 ++--
> b/include/asm-powerpc/mpc85xx.h | 9 ++----
I guess that would work, but Paulus is going to not like me as he already
put all these patches into the powerpc tree. :-)
Something to keep me entertained for another day.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply
* Re: Anybody applied the patch "Add 85xx CDS to arch/powerpc" on the 2.6.16. I failed to apply it:-(
From: Jon Loeliger @ 2006-04-05 14:38 UTC (permalink / raw)
To: fengcheng lu; +Cc: linuxppc-dev, linuxppc-embedded
In-Reply-To: <e9aafa30604050732g6ede1f37h450243613bcbca85@mail.gmail.com>
So, like, the other day "fengcheng lu" mumbled:
>
> I downloaded this patch from
> http://patchwork.ozlabs.org/linuxppc/patch?id=3D4910. But I failed to apply
> it. The following is the output:
> debian:/usr/src/linux-2.6.16# patch -p1 <powerpc.patch
> patching file arch/powerpc/config/mpc85xx_cds_deconfig
> patching file arch/powerpc/platforms/85xx/Kconfig
> Hunk #1 FAILED at 11
> 1 out of 1 hunk FAILED -- saving rejects to file
> arch/powerpc/platforms/85xx/Kconfig.rej
> patching file arch/powerpc/platforms/85xx/Makefile
> Hunk #1 FAILED at 3
> 1 out of 1 hunk FAILED -- saving rejects to file
> arch/powerpc/platforms/85xx/Makefile.rej
> patching file arch/powerpc/platforms/85xx/mpc85xx_cds.c
> patching file arch/powerpc/platforms/85xx/mpc85xx_cds.h
> patching file include/asm-ppc/mpc85xx.h
>
> It looks seem the Makefile and Kconfig don't match yours.
What was the repository against which you applied this patch?
Was it Linus' or Paul's? I suspect it needs to be Paul's
powerpc.git repository.
HTH,
jdl
^ permalink raw reply
* Anybody applied the patch "Add 85xx CDS to arch/powerpc" on the 2.6.16. I failed to apply it:-(
From: fengcheng lu @ 2006-04-05 14:32 UTC (permalink / raw)
To: linuxppc-dev, linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 964 bytes --]
Hello all
I downloaded this patch from
http://patchwork.ozlabs.org/linuxppc/patch?id=4910. But I failed to apply
it. The following is the output:
debian:/usr/src/linux-2.6.16# patch -p1 <powerpc.patch
patching file arch/powerpc/config/mpc85xx_cds_deconfig
patching file arch/powerpc/platforms/85xx/Kconfig
Hunk #1 FAILED at 11
1 out of 1 hunk FAILED -- saving rejects to file
arch/powerpc/platforms/85xx/Kconfig.rej
patching file arch/powerpc/platforms/85xx/Makefile
Hunk #1 FAILED at 3
1 out of 1 hunk FAILED -- saving rejects to file
arch/powerpc/platforms/85xx/Makefile.rej
patching file arch/powerpc/platforms/85xx/mpc85xx_cds.c
patching file arch/powerpc/platforms/85xx/mpc85xx_cds.h
patching file include/asm-ppc/mpc85xx.h
It looks seem the Makefile and Kconfig don't match yours.
Who have the successful patch experience. Thank you to tell me the right
procedure!
BTW: the patch command version is 2.5.4
Best Regards
Lu
[-- Attachment #2: Type: text/html, Size: 1178 bytes --]
^ permalink raw reply
* Re: [PATCH 00/15] powerpc: move some header files
From: Kumar Gala @ 2006-04-05 14:28 UTC (permalink / raw)
To: sfr; +Cc: linuxppc-dev, paulus
In-Reply-To: <11442138494042-git-send-email-sfr@canb.auug.org.au>
On Apr 5, 2006, at 12:10 AM, sfr@canb.auug.org.au wrote:
> This patch set moves sufficient include files from include/asm-ppc
> to include/asm-powerpc to allow us to remove the include hack in the
> arch/powerpc/Makefile.
>
> b/arch/powerpc/Makefile | 21 ++------------
> b/include/asm-powerpc/amigappc.h | 9 ++----
> b/include/asm-powerpc/bootinfo.h | 8 ++---
> b/include/asm-powerpc/highmem.h | 11 +++----
> b/include/asm-powerpc/hydra.h | 8 ++---
> b/include/asm-powerpc/mpc83xx.h | 7 ++--
> b/include/asm-powerpc/mpc85xx.h | 9 ++----
> b/include/asm-powerpc/mpc8xx.h | 10 +++---
> b/include/asm-powerpc/ocp.h | 7 ++--
> b/include/asm-powerpc/ocp_ids.h | 6 ++--
> b/include/asm-powerpc/open_pic.h | 10 +++---
> b/include/asm-powerpc/pnp.h | 8 ++---
> b/include/asm-powerpc/reg_booke.h | 55 ++++++++++++++++++
> +-------------------
> b/include/asm-powerpc/residual.h | 6 ++--
> b/include/asm-powerpc/suspend.h | 17 +++++++++++
> include/asm-ppc/suspend.h | 12 --------
> 16 files changed, 95 insertions(+), 109 deletions(-)
How about we do the following to remove the include hack:
don't move the following (determine what needs them to build and
fixup, I dont believe any of these need to exist at this point in
arch/powerpc for it to build any supported arch/powerpc platform:
b/include/asm-powerpc/amigappc.h | 9 ++----
b/include/asm-powerpc/bootinfo.h | 8 ++---
b/include/asm-powerpc/mpc8xx.h | 10 +++---
b/include/asm-powerpc/ocp.h | 7 ++--
b/include/asm-powerpc/ocp_ids.h | 6 ++--
b/include/asm-powerpc/open_pic.h | 10 +++---
Duplicate these headers (then I'll go through and clean them up,
removing arch/ppc'ism):
b/include/asm-powerpc/mpc83xx.h | 7 ++--
b/include/asm-powerpc/mpc85xx.h | 9 ++----
- kumar
^ permalink raw reply
* Re: [PATCH 14/15] powerpc: move asm/mpc85xx.h
From: Kumar Gala @ 2006-04-05 14:17 UTC (permalink / raw)
To: sfr; +Cc: linuxppc-dev, paulus
In-Reply-To: <11442138813940-git-send-email-sfr@canb.auug.org.au>
Nack. I was avoiding moving this header since it introduces a number
things that should only exist in arch/ppc.
- k
On Apr 5, 2006, at 12:10 AM, sfr@canb.auug.org.au wrote:
> From: Stephen Rothwell <sfr@canb.auug.org.au>
>
> Since the ARCH=powerpc build depends on this file, move it to
> include/asm-powerpc.
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>
> ---
>
> include/asm-powerpc/mpc85xx.h | 195 ++++++++++++++++++++++++++++++
> ++++++++++
> include/asm-ppc/mpc85xx.h | 198
> -----------------------------------------
> 2 files changed, 195 insertions(+), 198 deletions(-)
> create mode 100644 include/asm-powerpc/mpc85xx.h
> delete mode 100644 include/asm-ppc/mpc85xx.h
>
> 4fc7b6e78d24e11e704ef7b5a1ceb659d3a03cc2
> diff --git a/include/asm-powerpc/mpc85xx.h b/include/asm-powerpc/
> mpc85xx.h
> new file mode 100644
> index 0000000..4113165
> --- /dev/null
> +++ b/include/asm-powerpc/mpc85xx.h
> @@ -0,0 +1,195 @@
> +#ifndef _ASM_POWERPC_MPC85XX_H
> +#define _ASM_POWERPC_MPC85XX_H
> +/*
> + * MPC85xx definitions
> + *
> + * Maintainer: Kumar Gala <galak@kernel.crashing.org>
> + *
> + * Copyright 2004 Freescale Semiconductor, Inc
> + *
> + * This program is free software; you can redistribute it and/or
> modify it
> + * under the terms of the GNU General Public License as
> published by the
> + * Free Software Foundation; either version 2 of the License, or
> (at your
> + * option) any later version.
> + */
> +
> +#ifdef __KERNEL__
> +
> +#include <asm/mmu.h>
> +
> +#ifdef CONFIG_85xx
> +
> +#ifdef CONFIG_MPC8540_ADS
> +#include <platforms/85xx/mpc8540_ads.h>
> +#endif
> +#if defined(CONFIG_MPC8555_CDS) || defined(CONFIG_MPC8548_CDS)
> +#include <platforms/85xx/mpc8555_cds.h>
> +#endif
> +#ifdef CONFIG_MPC8560_ADS
> +#include <platforms/85xx/mpc8560_ads.h>
> +#endif
> +#ifdef CONFIG_SBC8560
> +#include <platforms/85xx/sbc8560.h>
> +#endif
> +#ifdef CONFIG_STX_GP3
> +#include <platforms/85xx/stx_gp3.h>
> +#endif
> +#if defined(CONFIG_TQM8540) || defined(CONFIG_TQM8541) || \
> + defined(CONFIG_TQM8555) || defined(CONFIG_TQM8560)
> +#include <platforms/85xx/tqm85xx.h>
> +#endif
> +
> +#define _IO_BASE isa_io_base
> +#define _ISA_MEM_BASE isa_mem_base
> +#ifdef CONFIG_PCI
> +#define PCI_DRAM_OFFSET pci_dram_offset
> +#else
> +#define PCI_DRAM_OFFSET 0
> +#endif
> +
> +/*
> + * The "residual" board information structure the boot loader passes
> + * into the kernel.
> + */
> +extern unsigned char __res[];
> +
> +/* Offset from CCSRBAR */
> +#define MPC85xx_CPM_OFFSET (0x80000)
> +#define MPC85xx_CPM_SIZE (0x40000)
> +#define MPC85xx_DMA_OFFSET (0x21000)
> +#define MPC85xx_DMA_SIZE (0x01000)
> +#define MPC85xx_DMA0_OFFSET (0x21100)
> +#define MPC85xx_DMA0_SIZE (0x00080)
> +#define MPC85xx_DMA1_OFFSET (0x21180)
> +#define MPC85xx_DMA1_SIZE (0x00080)
> +#define MPC85xx_DMA2_OFFSET (0x21200)
> +#define MPC85xx_DMA2_SIZE (0x00080)
> +#define MPC85xx_DMA3_OFFSET (0x21280)
> +#define MPC85xx_DMA3_SIZE (0x00080)
> +#define MPC85xx_ENET1_OFFSET (0x24000)
> +#define MPC85xx_ENET1_SIZE (0x01000)
> +#define MPC85xx_MIIM_OFFSET (0x24520)
> +#define MPC85xx_MIIM_SIZE (0x00018)
> +#define MPC85xx_ENET2_OFFSET (0x25000)
> +#define MPC85xx_ENET2_SIZE (0x01000)
> +#define MPC85xx_ENET3_OFFSET (0x26000)
> +#define MPC85xx_ENET3_SIZE (0x01000)
> +#define MPC85xx_GUTS_OFFSET (0xe0000)
> +#define MPC85xx_GUTS_SIZE (0x01000)
> +#define MPC85xx_IIC1_OFFSET (0x03000)
> +#define MPC85xx_IIC1_SIZE (0x00100)
> +#define MPC85xx_OPENPIC_OFFSET (0x40000)
> +#define MPC85xx_OPENPIC_SIZE (0x40000)
> +#define MPC85xx_PCI1_OFFSET (0x08000)
> +#define MPC85xx_PCI1_SIZE (0x01000)
> +#define MPC85xx_PCI2_OFFSET (0x09000)
> +#define MPC85xx_PCI2_SIZE (0x01000)
> +#define MPC85xx_PERFMON_OFFSET (0xe1000)
> +#define MPC85xx_PERFMON_SIZE (0x01000)
> +#define MPC85xx_SEC2_OFFSET (0x30000)
> +#define MPC85xx_SEC2_SIZE (0x10000)
> +#define MPC85xx_UART0_OFFSET (0x04500)
> +#define MPC85xx_UART0_SIZE (0x00100)
> +#define MPC85xx_UART1_OFFSET (0x04600)
> +#define MPC85xx_UART1_SIZE (0x00100)
> +
> +#define MPC85xx_CCSRBAR_SIZE (1024*1024)
> +
> +/* Let modules/drivers get at CCSRBAR */
> +extern phys_addr_t get_ccsrbar(void);
> +
> +#ifdef MODULE
> +#define CCSRBAR get_ccsrbar()
> +#else
> +#define CCSRBAR BOARD_CCSRBAR
> +#endif
> +
> +enum ppc_sys_devices {
> + MPC85xx_TSEC1,
> + MPC85xx_TSEC2,
> + MPC85xx_FEC,
> + MPC85xx_IIC1,
> + MPC85xx_DMA0,
> + MPC85xx_DMA1,
> + MPC85xx_DMA2,
> + MPC85xx_DMA3,
> + MPC85xx_DUART,
> + MPC85xx_PERFMON,
> + MPC85xx_SEC2,
> + MPC85xx_CPM_SPI,
> + MPC85xx_CPM_I2C,
> + MPC85xx_CPM_USB,
> + MPC85xx_CPM_SCC1,
> + MPC85xx_CPM_SCC2,
> + MPC85xx_CPM_SCC3,
> + MPC85xx_CPM_SCC4,
> + MPC85xx_CPM_FCC1,
> + MPC85xx_CPM_FCC2,
> + MPC85xx_CPM_FCC3,
> + MPC85xx_CPM_MCC1,
> + MPC85xx_CPM_MCC2,
> + MPC85xx_CPM_SMC1,
> + MPC85xx_CPM_SMC2,
> + MPC85xx_eTSEC1,
> + MPC85xx_eTSEC2,
> + MPC85xx_eTSEC3,
> + MPC85xx_eTSEC4,
> + MPC85xx_IIC2,
> + MPC85xx_MDIO,
> + NUM_PPC_SYS_DEVS,
> +};
> +
> +/* Internal interrupts are all Level Sensitive, and Positive
> Polarity */
> +#define MPC85XX_INTERNAL_IRQ_SENSES \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 0 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 1 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 2 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 3 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 4 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 5 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 6 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 7 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 8 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 9 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 10 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 11 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 12 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 13 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 14 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 15 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 16 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 17 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 18 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 19 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 20 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 21 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 22 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 23 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 24 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 25 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 26 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 27 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 28 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 29 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 30 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 31 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 32 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 33 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 34 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 35 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 36 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 37 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 38 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 39 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 40 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 41 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 42 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 43 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 44 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 45 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 46 */ \
> + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE) /* Internal 47 */
> +
> +#endif /* CONFIG_85xx */
> +#endif /* __KERNEL__ */
> +#endif /* _ASM_POWERPC_MPC85XX_H */
> diff --git a/include/asm-ppc/mpc85xx.h b/include/asm-ppc/mpc85xx.h
> deleted file mode 100644
> index f47002a..0000000
> --- a/include/asm-ppc/mpc85xx.h
> +++ /dev/null
> @@ -1,198 +0,0 @@
> -/*
> - * include/asm-ppc/mpc85xx.h
> - *
> - * MPC85xx definitions
> - *
> - * Maintainer: Kumar Gala <galak@kernel.crashing.org>
> - *
> - * Copyright 2004 Freescale Semiconductor, Inc
> - *
> - * This program is free software; you can redistribute it and/or
> modify it
> - * under the terms of the GNU General Public License as
> published by the
> - * Free Software Foundation; either version 2 of the License, or
> (at your
> - * option) any later version.
> - */
> -
> -#ifdef __KERNEL__
> -#ifndef __ASM_MPC85xx_H__
> -#define __ASM_MPC85xx_H__
> -
> -#include <linux/config.h>
> -#include <asm/mmu.h>
> -
> -#ifdef CONFIG_85xx
> -
> -#ifdef CONFIG_MPC8540_ADS
> -#include <platforms/85xx/mpc8540_ads.h>
> -#endif
> -#if defined(CONFIG_MPC8555_CDS) || defined(CONFIG_MPC8548_CDS)
> -#include <platforms/85xx/mpc8555_cds.h>
> -#endif
> -#ifdef CONFIG_MPC8560_ADS
> -#include <platforms/85xx/mpc8560_ads.h>
> -#endif
> -#ifdef CONFIG_SBC8560
> -#include <platforms/85xx/sbc8560.h>
> -#endif
> -#ifdef CONFIG_STX_GP3
> -#include <platforms/85xx/stx_gp3.h>
> -#endif
> -#if defined(CONFIG_TQM8540) || defined(CONFIG_TQM8541) || \
> - defined(CONFIG_TQM8555) || defined(CONFIG_TQM8560)
> -#include <platforms/85xx/tqm85xx.h>
> -#endif
> -
> -#define _IO_BASE isa_io_base
> -#define _ISA_MEM_BASE isa_mem_base
> -#ifdef CONFIG_PCI
> -#define PCI_DRAM_OFFSET pci_dram_offset
> -#else
> -#define PCI_DRAM_OFFSET 0
> -#endif
> -
> -/*
> - * The "residual" board information structure the boot loader passes
> - * into the kernel.
> - */
> -extern unsigned char __res[];
> -
> -/* Offset from CCSRBAR */
> -#define MPC85xx_CPM_OFFSET (0x80000)
> -#define MPC85xx_CPM_SIZE (0x40000)
> -#define MPC85xx_DMA_OFFSET (0x21000)
> -#define MPC85xx_DMA_SIZE (0x01000)
> -#define MPC85xx_DMA0_OFFSET (0x21100)
> -#define MPC85xx_DMA0_SIZE (0x00080)
> -#define MPC85xx_DMA1_OFFSET (0x21180)
> -#define MPC85xx_DMA1_SIZE (0x00080)
> -#define MPC85xx_DMA2_OFFSET (0x21200)
> -#define MPC85xx_DMA2_SIZE (0x00080)
> -#define MPC85xx_DMA3_OFFSET (0x21280)
> -#define MPC85xx_DMA3_SIZE (0x00080)
> -#define MPC85xx_ENET1_OFFSET (0x24000)
> -#define MPC85xx_ENET1_SIZE (0x01000)
> -#define MPC85xx_MIIM_OFFSET (0x24520)
> -#define MPC85xx_MIIM_SIZE (0x00018)
> -#define MPC85xx_ENET2_OFFSET (0x25000)
> -#define MPC85xx_ENET2_SIZE (0x01000)
> -#define MPC85xx_ENET3_OFFSET (0x26000)
> -#define MPC85xx_ENET3_SIZE (0x01000)
> -#define MPC85xx_GUTS_OFFSET (0xe0000)
> -#define MPC85xx_GUTS_SIZE (0x01000)
> -#define MPC85xx_IIC1_OFFSET (0x03000)
> -#define MPC85xx_IIC1_SIZE (0x00100)
> -#define MPC85xx_OPENPIC_OFFSET (0x40000)
> -#define MPC85xx_OPENPIC_SIZE (0x40000)
> -#define MPC85xx_PCI1_OFFSET (0x08000)
> -#define MPC85xx_PCI1_SIZE (0x01000)
> -#define MPC85xx_PCI2_OFFSET (0x09000)
> -#define MPC85xx_PCI2_SIZE (0x01000)
> -#define MPC85xx_PERFMON_OFFSET (0xe1000)
> -#define MPC85xx_PERFMON_SIZE (0x01000)
> -#define MPC85xx_SEC2_OFFSET (0x30000)
> -#define MPC85xx_SEC2_SIZE (0x10000)
> -#define MPC85xx_UART0_OFFSET (0x04500)
> -#define MPC85xx_UART0_SIZE (0x00100)
> -#define MPC85xx_UART1_OFFSET (0x04600)
> -#define MPC85xx_UART1_SIZE (0x00100)
> -
> -#define MPC85xx_CCSRBAR_SIZE (1024*1024)
> -
> -/* Let modules/drivers get at CCSRBAR */
> -extern phys_addr_t get_ccsrbar(void);
> -
> -#ifdef MODULE
> -#define CCSRBAR get_ccsrbar()
> -#else
> -#define CCSRBAR BOARD_CCSRBAR
> -#endif
> -
> -enum ppc_sys_devices {
> - MPC85xx_TSEC1,
> - MPC85xx_TSEC2,
> - MPC85xx_FEC,
> - MPC85xx_IIC1,
> - MPC85xx_DMA0,
> - MPC85xx_DMA1,
> - MPC85xx_DMA2,
> - MPC85xx_DMA3,
> - MPC85xx_DUART,
> - MPC85xx_PERFMON,
> - MPC85xx_SEC2,
> - MPC85xx_CPM_SPI,
> - MPC85xx_CPM_I2C,
> - MPC85xx_CPM_USB,
> - MPC85xx_CPM_SCC1,
> - MPC85xx_CPM_SCC2,
> - MPC85xx_CPM_SCC3,
> - MPC85xx_CPM_SCC4,
> - MPC85xx_CPM_FCC1,
> - MPC85xx_CPM_FCC2,
> - MPC85xx_CPM_FCC3,
> - MPC85xx_CPM_MCC1,
> - MPC85xx_CPM_MCC2,
> - MPC85xx_CPM_SMC1,
> - MPC85xx_CPM_SMC2,
> - MPC85xx_eTSEC1,
> - MPC85xx_eTSEC2,
> - MPC85xx_eTSEC3,
> - MPC85xx_eTSEC4,
> - MPC85xx_IIC2,
> - MPC85xx_MDIO,
> - NUM_PPC_SYS_DEVS,
> -};
> -
> -/* Internal interrupts are all Level Sensitive, and Positive
> Polarity */
> -#define MPC85XX_INTERNAL_IRQ_SENSES \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 0 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 1 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 2 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 3 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 4 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 5 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 6 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 7 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 8 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 9 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 10 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 11 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 12 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 13 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 14 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 15 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 16 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 17 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 18 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 19 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 20 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 21 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 22 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 23 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 24 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 25 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 26 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 27 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 28 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 29 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 30 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 31 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 32 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 33 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 34 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 35 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 36 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 37 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 38 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 39 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 40 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 41 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 42 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 43 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 44 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 45 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 46 */ \
> - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE) /* Internal 47 */
> -
> -#endif /* CONFIG_85xx */
> -#endif /* __ASM_MPC85xx_H__ */
> -#endif /* __KERNEL__ */
> --
> 1.2.4
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply
* Re: [PATCH 10/15] powerpc: move asm/mpc83xx.h
From: Kumar Gala @ 2006-04-05 14:17 UTC (permalink / raw)
To: sfr; +Cc: linuxppc-dev, paulus
In-Reply-To: <11442138673826-git-send-email-sfr@canb.auug.org.au>
Nack. I was avoiding moving this header since it introduces a number
things that should only exist in arch/ppc.
- k
On Apr 5, 2006, at 12:10 AM, sfr@canb.auug.org.au wrote:
> From: Stephen Rothwell <sfr@canb.auug.org.au>
>
> Since the ARCH=powerpc build depends on this file, move it to
> include/asm-powerpc.
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>
> ---
>
> include/asm-powerpc/mpc83xx.h | 115 ++++++++++++++++++++++++++++++
> +++++++++++
> include/asm-ppc/mpc83xx.h | 116
> -----------------------------------------
> 2 files changed, 115 insertions(+), 116 deletions(-)
> create mode 100644 include/asm-powerpc/mpc83xx.h
> delete mode 100644 include/asm-ppc/mpc83xx.h
>
> ce28e1e8654ad07cc23573a31f8cea992d41f9cc
> diff --git a/include/asm-powerpc/mpc83xx.h b/include/asm-powerpc/
> mpc83xx.h
> new file mode 100644
> index 0000000..da4b0fa
> --- /dev/null
> +++ b/include/asm-powerpc/mpc83xx.h
> @@ -0,0 +1,115 @@
> +#ifndef _ASM_POWERPC_MPC83XX_H
> +#define _ASM_POWERPC_MPC83XX_H
> +/*
> + * include/asm-ppc/mpc83xx.h
> + *
> + * MPC83xx definitions
> + *
> + * Maintainer: Kumar Gala <galak@kernel.crashing.org>
> + *
> + * Copyright 2005 Freescale Semiconductor, Inc
> + *
> + * This program is free software; you can redistribute it and/or
> modify it
> + * under the terms of the GNU General Public License as
> published by the
> + * Free Software Foundation; either version 2 of the License, or
> (at your
> + * option) any later version.
> + */
> +
> +#ifdef __KERNEL__
> +
> +#include <asm/mmu.h>
> +
> +#ifdef CONFIG_83xx
> +
> +#ifdef CONFIG_MPC834x_SYS
> +#include <platforms/83xx/mpc834x_sys.h>
> +#endif
> +
> +#define _IO_BASE isa_io_base
> +#define _ISA_MEM_BASE isa_mem_base
> +#ifdef CONFIG_PCI
> +#define PCI_DRAM_OFFSET pci_dram_offset
> +#else
> +#define PCI_DRAM_OFFSET 0
> +#endif
> +
> +/*
> + * The "residual" board information structure the boot loader passes
> + * into the kernel.
> + */
> +extern unsigned char __res[];
> +
> +/* Internal IRQs on MPC83xx OpenPIC */
> +/* Not all of these exist on all MPC83xx implementations */
> +
> +#ifndef MPC83xx_IPIC_IRQ_OFFSET
> +#define MPC83xx_IPIC_IRQ_OFFSET 0
> +#endif
> +
> +#define NR_IPIC_INTS 128
> +
> +#define MPC83xx_IRQ_UART1 ( 9 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_UART2 (10 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_SEC2 (11 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_IIC1 (14 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_IIC2 (15 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_SPI (16 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_EXT1 (17 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_EXT2 (18 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_EXT3 (19 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_EXT4 (20 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_EXT5 (21 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_EXT6 (22 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_EXT7 (23 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_TSEC1_TX (32 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_TSEC1_RX (33 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_TSEC1_ERROR (34 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_TSEC2_TX (35 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_TSEC2_RX (36 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_TSEC2_ERROR (37 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_USB2_DR (38 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_USB2_MPH (39 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_EXT0 (48 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_RTC_SEC (64 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_PIT (65 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_PCI1 (66 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_PCI2 (67 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_RTC_ALR (68 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_MU (69 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_SBA (70 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_DMA (71 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_GTM4 (72 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_GTM8 (73 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_GPIO1 (74 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_GPIO2 (75 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_DDR (76 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_LBC (77 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_GTM2 (78 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_GTM6 (79 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_PMC (80 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_GTM3 (84 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_GTM7 (85 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_GTM1 (90 + MPC83xx_IPIC_IRQ_OFFSET)
> +#define MPC83xx_IRQ_GTM5 (91 + MPC83xx_IPIC_IRQ_OFFSET)
> +
> +#define MPC83xx_CCSRBAR_SIZE (1024*1024)
> +
> +/* Let modules/drivers get at immrbar (physical) */
> +extern phys_addr_t immrbar;
> +
> +enum ppc_sys_devices {
> + MPC83xx_TSEC1,
> + MPC83xx_TSEC2,
> + MPC83xx_IIC1,
> + MPC83xx_IIC2,
> + MPC83xx_DUART,
> + MPC83xx_SEC2,
> + MPC83xx_USB2_DR,
> + MPC83xx_USB2_MPH,
> + MPC83xx_MDIO,
> + NUM_PPC_SYS_DEVS,
> +};
> +
> +#endif /* CONFIG_83xx */
> +#endif /* __KERNEL__ */
> +#endif /* _ASM_POWERPC_MPC83XX_H */
> diff --git a/include/asm-ppc/mpc83xx.h b/include/asm-ppc/mpc83xx.h
> deleted file mode 100644
> index 3c23fc4..0000000
> --- a/include/asm-ppc/mpc83xx.h
> +++ /dev/null
> @@ -1,116 +0,0 @@
> -/*
> - * include/asm-ppc/mpc83xx.h
> - *
> - * MPC83xx definitions
> - *
> - * Maintainer: Kumar Gala <galak@kernel.crashing.org>
> - *
> - * Copyright 2005 Freescale Semiconductor, Inc
> - *
> - * This program is free software; you can redistribute it and/or
> modify it
> - * under the terms of the GNU General Public License as
> published by the
> - * Free Software Foundation; either version 2 of the License, or
> (at your
> - * option) any later version.
> - */
> -
> -#ifdef __KERNEL__
> -#ifndef __ASM_MPC83xx_H__
> -#define __ASM_MPC83xx_H__
> -
> -#include <linux/config.h>
> -#include <asm/mmu.h>
> -
> -#ifdef CONFIG_83xx
> -
> -#ifdef CONFIG_MPC834x_SYS
> -#include <platforms/83xx/mpc834x_sys.h>
> -#endif
> -
> -#define _IO_BASE isa_io_base
> -#define _ISA_MEM_BASE isa_mem_base
> -#ifdef CONFIG_PCI
> -#define PCI_DRAM_OFFSET pci_dram_offset
> -#else
> -#define PCI_DRAM_OFFSET 0
> -#endif
> -
> -/*
> - * The "residual" board information structure the boot loader passes
> - * into the kernel.
> - */
> -extern unsigned char __res[];
> -
> -/* Internal IRQs on MPC83xx OpenPIC */
> -/* Not all of these exist on all MPC83xx implementations */
> -
> -#ifndef MPC83xx_IPIC_IRQ_OFFSET
> -#define MPC83xx_IPIC_IRQ_OFFSET 0
> -#endif
> -
> -#define NR_IPIC_INTS 128
> -
> -#define MPC83xx_IRQ_UART1 ( 9 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_UART2 (10 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_SEC2 (11 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_IIC1 (14 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_IIC2 (15 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_SPI (16 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_EXT1 (17 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_EXT2 (18 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_EXT3 (19 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_EXT4 (20 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_EXT5 (21 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_EXT6 (22 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_EXT7 (23 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_TSEC1_TX (32 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_TSEC1_RX (33 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_TSEC1_ERROR (34 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_TSEC2_TX (35 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_TSEC2_RX (36 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_TSEC2_ERROR (37 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_USB2_DR (38 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_USB2_MPH (39 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_EXT0 (48 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_RTC_SEC (64 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_PIT (65 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_PCI1 (66 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_PCI2 (67 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_RTC_ALR (68 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_MU (69 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_SBA (70 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_DMA (71 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_GTM4 (72 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_GTM8 (73 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_GPIO1 (74 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_GPIO2 (75 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_DDR (76 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_LBC (77 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_GTM2 (78 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_GTM6 (79 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_PMC (80 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_GTM3 (84 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_GTM7 (85 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_GTM1 (90 + MPC83xx_IPIC_IRQ_OFFSET)
> -#define MPC83xx_IRQ_GTM5 (91 + MPC83xx_IPIC_IRQ_OFFSET)
> -
> -#define MPC83xx_CCSRBAR_SIZE (1024*1024)
> -
> -/* Let modules/drivers get at immrbar (physical) */
> -extern phys_addr_t immrbar;
> -
> -enum ppc_sys_devices {
> - MPC83xx_TSEC1,
> - MPC83xx_TSEC2,
> - MPC83xx_IIC1,
> - MPC83xx_IIC2,
> - MPC83xx_DUART,
> - MPC83xx_SEC2,
> - MPC83xx_USB2_DR,
> - MPC83xx_USB2_MPH,
> - MPC83xx_MDIO,
> - NUM_PPC_SYS_DEVS,
> -};
> -
> -#endif /* CONFIG_83xx */
> -#endif /* __ASM_MPC83xx_H__ */
> -#endif /* __KERNEL__ */
> --
> 1.2.4
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply
* Re: [PATCH 12/15] powerpc: move asm/ocp_ids.h
From: Kumar Gala @ 2006-04-05 14:07 UTC (permalink / raw)
To: sfr; +Cc: linuxppc-dev, paulus
In-Reply-To: <1144213870220-git-send-email-sfr@canb.auug.org.au>
Nack. OCP should not exist in arch/powerpc so leave this header where
it is.
- k
On Apr 5, 2006, at 12:10 AM, sfr@canb.auug.org.au wrote:
> From: Stephen Rothwell <sfr@canb.auug.org.au>
>
> Since the ARCH=powerpc build depends on this file, move it to
> include/asm-powerpc.
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>
> ---
>
> include/asm-powerpc/ocp_ids.h | 75 ++++++++++++++++++++++++++++++
> +++++++++++
> include/asm-ppc/ocp_ids.h | 73
> ----------------------------------------
> 2 files changed, 75 insertions(+), 73 deletions(-)
> create mode 100644 include/asm-powerpc/ocp_ids.h
> delete mode 100644 include/asm-ppc/ocp_ids.h
>
> a374f458829d868a3142bff918ef872e0ecff1a8
> diff --git a/include/asm-powerpc/ocp_ids.h b/include/asm-powerpc/
> ocp_ids.h
> new file mode 100644
> index 0000000..78e5906
> --- /dev/null
> +++ b/include/asm-powerpc/ocp_ids.h
> @@ -0,0 +1,75 @@
> +#ifndef _ASM_POWERPC_OCP_IDS_H
> +#define _ASM_POWERPC_OCP_IDS_H
> +/*
> + * OCP device ids based on the ideas from PCI
> + *
> + * The numbers below are almost completely arbitrary, and in fact
> + * strings might work better. -- paulus
> + *
> + * This program is free software; you can redistribute it and/or
> modify it
> + * under the terms of the GNU General Public License as
> published by the
> + * Free Software Foundation; either version 2 of the License, or
> (at your
> + * option) any later version.
> + */
> +
> +/*
> + * Vender device
> + * [xxxx] [xxxx]
> + *
> + * Keep in order, please
> + */
> +
> +/* Vendor IDs 0x0001 - 0xFFFF copied from pci_ids.h */
> +
> +#define OCP_VENDOR_INVALID 0x0000
> +#define OCP_VENDOR_ARM 0x0004
> +#define OCP_VENDOR_FREESCALE 0x1057
> +#define OCP_VENDOR_IBM 0x1014
> +#define OCP_VENDOR_MOTOROLA OCP_VENDOR_FREESCALE
> +#define OCP_VENDOR_XILINX 0x10ee
> +#define OCP_VENDOR_UNKNOWN 0xFFFF
> +
> +/* device identification */
> +
> +/* define type */
> +#define OCP_FUNC_INVALID 0x0000
> +
> +/* system 0x0001 - 0x001F */
> +
> +/* Timers 0x0020 - 0x002F */
> +
> +/* Serial 0x0030 - 0x006F*/
> +#define OCP_FUNC_16550 0x0031
> +#define OCP_FUNC_IIC 0x0032
> +#define OCP_FUNC_USB 0x0033
> +#define OCP_FUNC_PSC_UART 0x0034
> +
> +/* Memory devices 0x0090 - 0x009F */
> +#define OCP_FUNC_MAL 0x0090
> +#define OCP_FUNC_DMA 0x0091
> +
> +/* Display 0x00A0 - 0x00AF */
> +
> +/* Sound 0x00B0 - 0x00BF */
> +
> +/* Mass Storage 0x00C0 - 0xxCF */
> +#define OCP_FUNC_IDE 0x00C0
> +
> +/* Misc 0x00D0 - 0x00DF*/
> +#define OCP_FUNC_GPIO 0x00D0
> +#define OCP_FUNC_ZMII 0x00D1
> +#define OCP_FUNC_PERFMON 0x00D2 /* Performance Monitor */
> +#define OCP_FUNC_RGMII 0x00D3
> +#define OCP_FUNC_TAH 0x00D4
> +#define OCP_FUNC_SEC2 0x00D5 /* Crypto/Security 2.0 */
> +
> +/* Network 0x0200 - 0x02FF */
> +#define OCP_FUNC_EMAC 0x0200
> +#define OCP_FUNC_GFAR 0x0201 /* TSEC & FEC */
> +
> +/* Bridge devices 0xE00 - 0xEFF */
> +#define OCP_FUNC_OPB 0x0E00
> +
> +#define OCP_FUNC_UNKNOWN 0xFFFF
> +
> +#endif /* _ASM_POWERPC_OCP_IDS_H */
> diff --git a/include/asm-ppc/ocp_ids.h b/include/asm-ppc/ocp_ids.h
> deleted file mode 100644
> index 8ae4b31..0000000
> --- a/include/asm-ppc/ocp_ids.h
> +++ /dev/null
> @@ -1,73 +0,0 @@
> -/*
> - * ocp_ids.h
> - *
> - * OCP device ids based on the ideas from PCI
> - *
> - * The numbers below are almost completely arbitrary, and in fact
> - * strings might work better. -- paulus
> - *
> - * This program is free software; you can redistribute it and/or
> modify it
> - * under the terms of the GNU General Public License as
> published by the
> - * Free Software Foundation; either version 2 of the License, or
> (at your
> - * option) any later version.
> - */
> -
> -/*
> - * Vender device
> - * [xxxx] [xxxx]
> - *
> - * Keep in order, please
> - */
> -
> -/* Vendor IDs 0x0001 - 0xFFFF copied from pci_ids.h */
> -
> -#define OCP_VENDOR_INVALID 0x0000
> -#define OCP_VENDOR_ARM 0x0004
> -#define OCP_VENDOR_FREESCALE 0x1057
> -#define OCP_VENDOR_IBM 0x1014
> -#define OCP_VENDOR_MOTOROLA OCP_VENDOR_FREESCALE
> -#define OCP_VENDOR_XILINX 0x10ee
> -#define OCP_VENDOR_UNKNOWN 0xFFFF
> -
> -/* device identification */
> -
> -/* define type */
> -#define OCP_FUNC_INVALID 0x0000
> -
> -/* system 0x0001 - 0x001F */
> -
> -/* Timers 0x0020 - 0x002F */
> -
> -/* Serial 0x0030 - 0x006F*/
> -#define OCP_FUNC_16550 0x0031
> -#define OCP_FUNC_IIC 0x0032
> -#define OCP_FUNC_USB 0x0033
> -#define OCP_FUNC_PSC_UART 0x0034
> -
> -/* Memory devices 0x0090 - 0x009F */
> -#define OCP_FUNC_MAL 0x0090
> -#define OCP_FUNC_DMA 0x0091
> -
> -/* Display 0x00A0 - 0x00AF */
> -
> -/* Sound 0x00B0 - 0x00BF */
> -
> -/* Mass Storage 0x00C0 - 0xxCF */
> -#define OCP_FUNC_IDE 0x00C0
> -
> -/* Misc 0x00D0 - 0x00DF*/
> -#define OCP_FUNC_GPIO 0x00D0
> -#define OCP_FUNC_ZMII 0x00D1
> -#define OCP_FUNC_PERFMON 0x00D2 /* Performance Monitor */
> -#define OCP_FUNC_RGMII 0x00D3
> -#define OCP_FUNC_TAH 0x00D4
> -#define OCP_FUNC_SEC2 0x00D5 /* Crypto/Security 2.0 */
> -
> -/* Network 0x0200 - 0x02FF */
> -#define OCP_FUNC_EMAC 0x0200
> -#define OCP_FUNC_GFAR 0x0201 /* TSEC & FEC */
> -
> -/* Bridge devices 0xE00 - 0xEFF */
> -#define OCP_FUNC_OPB 0x0E00
> -
> -#define OCP_FUNC_UNKNOWN 0xFFFF
> --
> 1.2.4
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply
* Re: [PATCH 11/15] powerpc: move asm/ocp.h
From: Kumar Gala @ 2006-04-05 14:07 UTC (permalink / raw)
To: sfr; +Cc: linuxppc-dev, paulus
In-Reply-To: <1144213868772-git-send-email-sfr@canb.auug.org.au>
Nack. OCP should not exist in arch/powerpc so leave this header where
it is.
- k
On Apr 5, 2006, at 12:10 AM, sfr@canb.auug.org.au wrote:
> From: Stephen Rothwell <sfr@canb.auug.org.au>
>
> Since the ARCH=powerpc build depends on this file, move it to
> include/asm-powerpc.
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>
> ---
>
> include/asm-powerpc/ocp.h | 206 ++++++++++++++++++++++++++++++++++
> +++++++++++
> include/asm-ppc/ocp.h | 207
> ---------------------------------------------
> 2 files changed, 206 insertions(+), 207 deletions(-)
> create mode 100644 include/asm-powerpc/ocp.h
> delete mode 100644 include/asm-ppc/ocp.h
>
> c7b417812dc2ebece32356c0a5e93966de9ba2cd
> diff --git a/include/asm-powerpc/ocp.h b/include/asm-powerpc/ocp.h
> new file mode 100644
> index 0000000..8916c52
> --- /dev/null
> +++ b/include/asm-powerpc/ocp.h
> @@ -0,0 +1,206 @@
> +#ifndef _ASM_POWERPC_OCP_H
> +#define _ASM_POWERPC_OCP_H
> +/*
> + * ocp.h
> + *
> + * (c) Benjamin Herrenschmidt (benh@kernel.crashing.org)
> + * Mipsys - France
> + *
> + * Derived from work (c) Armin Kuster akuster@pacbell.net
> + *
> + * Additional support and port to 2.6 LDM/sysfs by
> + * Matt Porter <mporter@kernel.crashing.org>
> + * Copyright 2003-2004 MontaVista Software, Inc.
> + *
> + * This program is free software; you can redistribute it and/or
> modify it
> + * under the terms of the GNU General Public License as
> published by the
> + * Free Software Foundation; either version 2 of the License, or
> (at your
> + * option) any later version.
> + *
> + * TODO: - Add get/put interface & fixup locking to provide same
> API for
> + * 2.4 and 2.5
> + * - Rework PM callbacks
> + */
> +
> +#ifdef __KERNEL__
> +
> +#include <linux/init.h>
> +#include <linux/list.h>
> +#include <linux/devfs_fs_kernel.h>
> +#include <linux/device.h>
> +
> +#include <asm/mmu.h>
> +#include <asm/ocp_ids.h>
> +#include <asm/rwsem.h>
> +#include <asm/semaphore.h>
> +
> +#ifdef CONFIG_PPC_OCP
> +
> +#define OCP_MAX_IRQS 7
> +#define MAX_EMACS 4
> +#define OCP_IRQ_NA -1 /* used when ocp device does not have an irq */
> +#define OCP_IRQ_MUL -2 /* used for ocp devices with multiply irqs */
> +#define OCP_NULL_TYPE -1 /* used to mark end of list */
> +#define OCP_CPM_NA 0 /* No Clock or Power Management avaliable */
> +#define OCP_PADDR_NA 0 /* No MMIO registers */
> +
> +#define OCP_ANY_ID (~0)
> +#define OCP_ANY_INDEX -1
> +
> +extern struct list_head ocp_devices;
> +extern struct rw_semaphore ocp_devices_sem;
> +
> +struct ocp_device_id {
> + unsigned int vendor, function; /* Vendor and function ID or
> OCP_ANY_ID */
> + unsigned long driver_data; /* Data private to the driver */
> +};
> +
> +
> +/*
> + * Static definition of an OCP device.
> + *
> + * @vendor: Vendor code. It is _STRONGLY_ discouraged to use
> + * the vendor code as a way to match a unique device,
> + * though I kept that possibility open, you should
> + * really define different function codes for different
> + * device types
> + * @function: This is the function code for this device.
> + * @index: This index is used for mapping the Nth function of a
> + * given core. This is typically used for cross-driver
> + * matching, like looking for a given MAL or ZMII from
> + * an EMAC or for getting to the proper set of DCRs.
> + * Indices are no longer magically calculated based on
> + * structure ordering, they have to be actually coded
> + * into the ocp_def to avoid any possible confusion
> + * I _STRONGLY_ (again ? wow !) encourage anybody relying
> + * on index mapping to encode the "target" index in an
> + * associated structure pointed to by "additions", see
> + * how it's done for the EMAC driver.
> + * @paddr: Device physical address (may not mean anything...)
> + * @irq: Interrupt line for this device (TODO: think about
> making
> + * an array with this)
> + * @pm: Currently, contains the bitmask in CPMFR DCR for
> the device
> + * @additions: Optionally points to a function specific structure
> + * providing additional informations for a given device
> + * instance. It's currently used by the EMAC driver
> for MAL
> + * channel & ZMII port mapping among others.
> + * @show: Optionally points to a function specific structure
> + * providing a sysfs show routine for additions fields.
> + */
> +struct ocp_def {
> + unsigned int vendor;
> + unsigned int function;
> + int index;
> + phys_addr_t paddr;
> + int irq;
> + unsigned long pm;
> + void *additions;
> + void (*show)(struct device *);
> +};
> +
> +
> +/* Struct for a given device instance */
> +struct ocp_device {
> + struct list_head link;
> + char name[80]; /* device name */
> + struct ocp_def *def; /* device definition */
> + void *drvdata; /* driver data for this device */
> + struct ocp_driver *driver;
> + u32 current_state; /* Current operating state. In ACPI-speak,
> + this is D0-D3, D0 being fully functional,
> + and D3 being off. */
> + struct device dev;
> +};
> +
> +struct ocp_driver {
> + struct list_head node;
> + char *name;
> + const struct ocp_device_id *id_table; /* NULL if wants all
> devices */
> + int (*probe) (struct ocp_device *dev); /* New device inserted */
> + void (*remove) (struct ocp_device *dev); /* Device removed (NULL
> if not a hot-plug capable driver) */
> + int (*suspend) (struct ocp_device *dev, pm_message_t state); /*
> Device suspended */
> + int (*resume) (struct ocp_device *dev); /*
> Device woken up */
> + struct device_driver driver;
> +};
> +
> +#define to_ocp_dev(n) container_of(n, struct ocp_device, dev)
> +#define to_ocp_drv(n) container_of(n, struct ocp_driver, driver)
> +
> +/* Similar to the helpers above, these manipulate per-ocp_dev
> + * driver-specific data. Currently stored as ocp_dev::ocpdev,
> + * a void pointer, but it is not present on older kernels.
> + */
> +static inline void *
> +ocp_get_drvdata(struct ocp_device *pdev)
> +{
> + return pdev->drvdata;
> +}
> +
> +static inline void
> +ocp_set_drvdata(struct ocp_device *pdev, void *data)
> +{
> + pdev->drvdata = data;
> +}
> +
> +#if defined (CONFIG_PM)
> +/*
> + * This is right for the IBM 405 and 440 but will need to be
> + * generalized if the OCP stuff gets used on other processors.
> + */
> +static inline void
> +ocp_force_power_off(struct ocp_device *odev)
> +{
> + mtdcr(DCRN_CPMFR, mfdcr(DCRN_CPMFR) | odev->def->pm);
> +}
> +
> +static inline void
> +ocp_force_power_on(struct ocp_device *odev)
> +{
> + mtdcr(DCRN_CPMFR, mfdcr(DCRN_CPMFR) & ~odev->def->pm);
> +}
> +#else
> +#define ocp_force_power_off(x) (void)(x)
> +#define ocp_force_power_on(x) (void)(x)
> +#endif
> +
> +/* Register/Unregister an OCP driver */
> +extern int ocp_register_driver(struct ocp_driver *drv);
> +extern void ocp_unregister_driver(struct ocp_driver *drv);
> +
> +/* Build list of devices */
> +extern int ocp_early_init(void) __init;
> +
> +/* Find a device by index */
> +extern struct ocp_device *ocp_find_device(unsigned int vendor,
> unsigned int function, int index);
> +
> +/* Get a def by index */
> +extern struct ocp_def *ocp_get_one_device(unsigned int vendor,
> unsigned int function, int index);
> +
> +/* Add a device by index */
> +extern int ocp_add_one_device(struct ocp_def *def);
> +
> +/* Remove a device by index */
> +extern int ocp_remove_one_device(unsigned int vendor, unsigned int
> function, int index);
> +
> +/* Iterate over devices and execute a routine */
> +extern void ocp_for_each_device(void(*callback)(struct ocp_device
> *, void *arg), void *arg);
> +
> +/* Sysfs support */
> +#define OCP_SYSFS_ADDTL(type, format, name, field) \
> +static ssize_t \
> +show_##name##_##field(struct device *dev, struct device_attribute
> *attr, char *buf) \
> +{ \
> + struct ocp_device *odev = to_ocp_dev(dev); \
> + type *add = odev->def->additions; \
> + \
> + return sprintf(buf, format, add->field); \
> +} \
> +static DEVICE_ATTR(name##_##field, S_IRUGO, show_##name##_##field,
> NULL);
> +
> +#ifdef CONFIG_IBM_OCP
> +#include <asm/ibm_ocp.h>
> +#endif
> +
> +#endif /* CONFIG_PPC_OCP */
> +#endif /* __KERNEL__ */
> +#endif /* _ASM_POWERPC_OCP_H */
> diff --git a/include/asm-ppc/ocp.h b/include/asm-ppc/ocp.h
> deleted file mode 100644
> index 983116f..0000000
> --- a/include/asm-ppc/ocp.h
> +++ /dev/null
> @@ -1,207 +0,0 @@
> -/*
> - * ocp.h
> - *
> - * (c) Benjamin Herrenschmidt (benh@kernel.crashing.org)
> - * Mipsys - France
> - *
> - * Derived from work (c) Armin Kuster akuster@pacbell.net
> - *
> - * Additional support and port to 2.6 LDM/sysfs by
> - * Matt Porter <mporter@kernel.crashing.org>
> - * Copyright 2003-2004 MontaVista Software, Inc.
> - *
> - * This program is free software; you can redistribute it and/or
> modify it
> - * under the terms of the GNU General Public License as
> published by the
> - * Free Software Foundation; either version 2 of the License, or
> (at your
> - * option) any later version.
> - *
> - * TODO: - Add get/put interface & fixup locking to provide same
> API for
> - * 2.4 and 2.5
> - * - Rework PM callbacks
> - */
> -
> -#ifdef __KERNEL__
> -#ifndef __OCP_H__
> -#define __OCP_H__
> -
> -#include <linux/init.h>
> -#include <linux/list.h>
> -#include <linux/config.h>
> -#include <linux/devfs_fs_kernel.h>
> -#include <linux/device.h>
> -
> -#include <asm/mmu.h>
> -#include <asm/ocp_ids.h>
> -#include <asm/rwsem.h>
> -#include <asm/semaphore.h>
> -
> -#ifdef CONFIG_PPC_OCP
> -
> -#define OCP_MAX_IRQS 7
> -#define MAX_EMACS 4
> -#define OCP_IRQ_NA -1 /* used when ocp device does not have an irq */
> -#define OCP_IRQ_MUL -2 /* used for ocp devices with multiply irqs */
> -#define OCP_NULL_TYPE -1 /* used to mark end of list */
> -#define OCP_CPM_NA 0 /* No Clock or Power Management avaliable */
> -#define OCP_PADDR_NA 0 /* No MMIO registers */
> -
> -#define OCP_ANY_ID (~0)
> -#define OCP_ANY_INDEX -1
> -
> -extern struct list_head ocp_devices;
> -extern struct rw_semaphore ocp_devices_sem;
> -
> -struct ocp_device_id {
> - unsigned int vendor, function; /* Vendor and function ID or
> OCP_ANY_ID */
> - unsigned long driver_data; /* Data private to the driver */
> -};
> -
> -
> -/*
> - * Static definition of an OCP device.
> - *
> - * @vendor: Vendor code. It is _STRONGLY_ discouraged to use
> - * the vendor code as a way to match a unique device,
> - * though I kept that possibility open, you should
> - * really define different function codes for different
> - * device types
> - * @function: This is the function code for this device.
> - * @index: This index is used for mapping the Nth function of a
> - * given core. This is typically used for cross-driver
> - * matching, like looking for a given MAL or ZMII from
> - * an EMAC or for getting to the proper set of DCRs.
> - * Indices are no longer magically calculated based on
> - * structure ordering, they have to be actually coded
> - * into the ocp_def to avoid any possible confusion
> - * I _STRONGLY_ (again ? wow !) encourage anybody relying
> - * on index mapping to encode the "target" index in an
> - * associated structure pointed to by "additions", see
> - * how it's done for the EMAC driver.
> - * @paddr: Device physical address (may not mean anything...)
> - * @irq: Interrupt line for this device (TODO: think about
> making
> - * an array with this)
> - * @pm: Currently, contains the bitmask in CPMFR DCR for
> the device
> - * @additions: Optionally points to a function specific structure
> - * providing additional informations for a given device
> - * instance. It's currently used by the EMAC driver
> for MAL
> - * channel & ZMII port mapping among others.
> - * @show: Optionally points to a function specific structure
> - * providing a sysfs show routine for additions fields.
> - */
> -struct ocp_def {
> - unsigned int vendor;
> - unsigned int function;
> - int index;
> - phys_addr_t paddr;
> - int irq;
> - unsigned long pm;
> - void *additions;
> - void (*show)(struct device *);
> -};
> -
> -
> -/* Struct for a given device instance */
> -struct ocp_device {
> - struct list_head link;
> - char name[80]; /* device name */
> - struct ocp_def *def; /* device definition */
> - void *drvdata; /* driver data for this device */
> - struct ocp_driver *driver;
> - u32 current_state; /* Current operating state. In ACPI-speak,
> - this is D0-D3, D0 being fully functional,
> - and D3 being off. */
> - struct device dev;
> -};
> -
> -struct ocp_driver {
> - struct list_head node;
> - char *name;
> - const struct ocp_device_id *id_table; /* NULL if wants all
> devices */
> - int (*probe) (struct ocp_device *dev); /* New device inserted */
> - void (*remove) (struct ocp_device *dev); /* Device removed (NULL
> if not a hot-plug capable driver) */
> - int (*suspend) (struct ocp_device *dev, pm_message_t state); /*
> Device suspended */
> - int (*resume) (struct ocp_device *dev); /*
> Device woken up */
> - struct device_driver driver;
> -};
> -
> -#define to_ocp_dev(n) container_of(n, struct ocp_device, dev)
> -#define to_ocp_drv(n) container_of(n, struct ocp_driver, driver)
> -
> -/* Similar to the helpers above, these manipulate per-ocp_dev
> - * driver-specific data. Currently stored as ocp_dev::ocpdev,
> - * a void pointer, but it is not present on older kernels.
> - */
> -static inline void *
> -ocp_get_drvdata(struct ocp_device *pdev)
> -{
> - return pdev->drvdata;
> -}
> -
> -static inline void
> -ocp_set_drvdata(struct ocp_device *pdev, void *data)
> -{
> - pdev->drvdata = data;
> -}
> -
> -#if defined (CONFIG_PM)
> -/*
> - * This is right for the IBM 405 and 440 but will need to be
> - * generalized if the OCP stuff gets used on other processors.
> - */
> -static inline void
> -ocp_force_power_off(struct ocp_device *odev)
> -{
> - mtdcr(DCRN_CPMFR, mfdcr(DCRN_CPMFR) | odev->def->pm);
> -}
> -
> -static inline void
> -ocp_force_power_on(struct ocp_device *odev)
> -{
> - mtdcr(DCRN_CPMFR, mfdcr(DCRN_CPMFR) & ~odev->def->pm);
> -}
> -#else
> -#define ocp_force_power_off(x) (void)(x)
> -#define ocp_force_power_on(x) (void)(x)
> -#endif
> -
> -/* Register/Unregister an OCP driver */
> -extern int ocp_register_driver(struct ocp_driver *drv);
> -extern void ocp_unregister_driver(struct ocp_driver *drv);
> -
> -/* Build list of devices */
> -extern int ocp_early_init(void) __init;
> -
> -/* Find a device by index */
> -extern struct ocp_device *ocp_find_device(unsigned int vendor,
> unsigned int function, int index);
> -
> -/* Get a def by index */
> -extern struct ocp_def *ocp_get_one_device(unsigned int vendor,
> unsigned int function, int index);
> -
> -/* Add a device by index */
> -extern int ocp_add_one_device(struct ocp_def *def);
> -
> -/* Remove a device by index */
> -extern int ocp_remove_one_device(unsigned int vendor, unsigned int
> function, int index);
> -
> -/* Iterate over devices and execute a routine */
> -extern void ocp_for_each_device(void(*callback)(struct ocp_device
> *, void *arg), void *arg);
> -
> -/* Sysfs support */
> -#define OCP_SYSFS_ADDTL(type, format, name, field) \
> -static ssize_t \
> -show_##name##_##field(struct device *dev, struct device_attribute
> *attr, char *buf) \
> -{ \
> - struct ocp_device *odev = to_ocp_dev(dev); \
> - type *add = odev->def->additions; \
> - \
> - return sprintf(buf, format, add->field); \
> -} \
> -static DEVICE_ATTR(name##_##field, S_IRUGO, show_##name##_##field,
> NULL);
> -
> -#ifdef CONFIG_IBM_OCP
> -#include <asm/ibm_ocp.h>
> -#endif
> -
> -#endif /* CONFIG_PPC_OCP */
> -#endif /* __OCP_H__ */
> -#endif /* __KERNEL__ */
> --
> 1.2.4
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply
* Re: [PATCH 08/15] powerpc: move asm/open_pic.h
From: Kumar Gala @ 2006-04-05 14:07 UTC (permalink / raw)
To: sfr; +Cc: linuxppc-dev, paulus
In-Reply-To: <11442138641124-git-send-email-sfr@canb.auug.org.au>
I'd need to check, but I dont think we should move this since arch/
powerpc is using mpic to handle openpic and I'm guessing it has its
own headers.
- k
On Apr 5, 2006, at 12:10 AM, sfr@canb.auug.org.au wrote:
> From: Stephen Rothwell <sfr@canb.auug.org.au>
>
> Since the ARCH=powerpc build depends on this file, move it to
> include/asm-powerpc.
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>
> ---
>
> include/asm-powerpc/open_pic.h | 99 +++++++++++++++++++++++++++++
> +++++++++++
> include/asm-ppc/open_pic.h | 99
> ----------------------------------------
> 2 files changed, 99 insertions(+), 99 deletions(-)
> create mode 100644 include/asm-powerpc/open_pic.h
> delete mode 100644 include/asm-ppc/open_pic.h
>
> 54316678b9e6aad8349f2df50dadd2597b675804
> diff --git a/include/asm-powerpc/open_pic.h b/include/asm-powerpc/
> open_pic.h
> new file mode 100644
> index 0000000..3f197cf
> --- /dev/null
> +++ b/include/asm-powerpc/open_pic.h
> @@ -0,0 +1,99 @@
> +#ifndef _ASM_POWERPC_OPEN_PIC_H
> +#define _ASM_POWERPC_OPEN_PIC_H
> +
> +/*
> + * include/asm-ppc/open_pic.h -- OpenPIC Interrupt Handling
> + *
> + * Copyright (C) 1997 Geert Uytterhoeven
> + *
> + * This file is subject to the terms and conditions of the GNU
> General Public
> + * License. See the file COPYING in the main directory of this
> archive
> + * for more details.
> + *
> + */
> +
> +#include <linux/irq.h>
> +
> +#define OPENPIC_SIZE 0x40000
> +
> +/*
> + * Non-offset'ed vector numbers
> + */
> +
> +#define OPENPIC_VEC_TIMER 110 /* and up */
> +#define OPENPIC_VEC_IPI 118 /* and up */
> +#define OPENPIC_VEC_SPURIOUS 255
> +
> +/* Priorities */
> +#define OPENPIC_PRIORITY_IPI_BASE 10
> +#define OPENPIC_PRIORITY_DEFAULT 4
> +#define OPENPIC_PRIORITY_NMI 9
> +
> +/* OpenPIC IRQ controller structure */
> +extern struct hw_interrupt_type open_pic;
> +
> +/* OpenPIC IPI controller structure */
> +#ifdef CONFIG_SMP
> +extern struct hw_interrupt_type open_pic_ipi;
> +#endif /* CONFIG_SMP */
> +
> +extern u_int OpenPIC_NumInitSenses;
> +extern u_char *OpenPIC_InitSenses;
> +extern void __iomem * OpenPIC_Addr;
> +extern int epic_serial_mode;
> +
> +/* Exported functions */
> +extern void openpic_set_sources(int first_irq, int num_irqs, void
> __iomem *isr);
> +extern void openpic_init(int linux_irq_offset);
> +extern void openpic_init_nmi_irq(u_int irq);
> +extern void openpic_set_irq_priority(u_int irq, u_int pri);
> +extern void openpic_hookup_cascade(u_int irq, char *name,
> + int (*cascade_fn)(struct pt_regs *));
> +extern u_int openpic_irq(void);
> +extern void openpic_eoi(void);
> +extern void openpic_request_IPIs(void);
> +extern void do_openpic_setup_cpu(void);
> +extern int openpic_get_irq(struct pt_regs *regs);
> +extern void openpic_reset_processor_phys(u_int cpumask);
> +extern void openpic_setup_ISU(int isu_num, unsigned long addr);
> +extern void openpic_cause_IPI(u_int ipi, cpumask_t cpumask);
> +extern void smp_openpic_message_pass(int target, int msg);
> +extern void openpic_set_k2_cascade(int irq);
> +extern void openpic_set_priority(u_int pri);
> +extern u_int openpic_get_priority(void);
> +
> +extern inline int openpic_to_irq(int irq)
> +{
> + /* IRQ 0 usually means 'disabled'.. don't mess with it
> + * exceptions to this (sandpoint maybe?)
> + * shouldn't use openpic_to_irq
> + */
> + if (irq != 0){
> + return irq += NUM_8259_INTERRUPTS;
> + } else {
> + return 0;
> + }
> +}
> +/* Support for second openpic on G5 macs */
> +
> +// FIXME: To be replaced by sane cascaded controller management */
> +
> +#define PMAC_OPENPIC2_OFFSET 128
> +
> +#define OPENPIC2_VEC_TIMER 110 /* and up */
> +#define OPENPIC2_VEC_IPI 118 /* and up */
> +#define OPENPIC2_VEC_SPURIOUS 127
> +
> +
> +extern void* OpenPIC2_Addr;
> +
> +/* Exported functions */
> +extern void openpic2_set_sources(int first_irq, int num_irqs, void
> *isr);
> +extern void openpic2_init(int linux_irq_offset);
> +extern void openpic2_init_nmi_irq(u_int irq);
> +extern u_int openpic2_irq(void);
> +extern void openpic2_eoi(void);
> +extern int openpic2_get_irq(struct pt_regs *regs);
> +extern void openpic2_setup_ISU(int isu_num, unsigned long addr);
> +
> +#endif /* _ASM_POWERPC_OPEN_PIC_H */
> diff --git a/include/asm-ppc/open_pic.h b/include/asm-ppc/open_pic.h
> deleted file mode 100644
> index ec2f466..0000000
> --- a/include/asm-ppc/open_pic.h
> +++ /dev/null
> @@ -1,99 +0,0 @@
> -/*
> - * include/asm-ppc/open_pic.h -- OpenPIC Interrupt Handling
> - *
> - * Copyright (C) 1997 Geert Uytterhoeven
> - *
> - * This file is subject to the terms and conditions of the GNU
> General Public
> - * License. See the file COPYING in the main directory of this
> archive
> - * for more details.
> - *
> - */
> -
> -#ifndef _PPC_KERNEL_OPEN_PIC_H
> -#define _PPC_KERNEL_OPEN_PIC_H
> -
> -#include <linux/config.h>
> -#include <linux/irq.h>
> -
> -#define OPENPIC_SIZE 0x40000
> -
> -/*
> - * Non-offset'ed vector numbers
> - */
> -
> -#define OPENPIC_VEC_TIMER 110 /* and up */
> -#define OPENPIC_VEC_IPI 118 /* and up */
> -#define OPENPIC_VEC_SPURIOUS 255
> -
> -/* Priorities */
> -#define OPENPIC_PRIORITY_IPI_BASE 10
> -#define OPENPIC_PRIORITY_DEFAULT 4
> -#define OPENPIC_PRIORITY_NMI 9
> -
> -/* OpenPIC IRQ controller structure */
> -extern struct hw_interrupt_type open_pic;
> -
> -/* OpenPIC IPI controller structure */
> -#ifdef CONFIG_SMP
> -extern struct hw_interrupt_type open_pic_ipi;
> -#endif /* CONFIG_SMP */
> -
> -extern u_int OpenPIC_NumInitSenses;
> -extern u_char *OpenPIC_InitSenses;
> -extern void __iomem * OpenPIC_Addr;
> -extern int epic_serial_mode;
> -
> -/* Exported functions */
> -extern void openpic_set_sources(int first_irq, int num_irqs, void
> __iomem *isr);
> -extern void openpic_init(int linux_irq_offset);
> -extern void openpic_init_nmi_irq(u_int irq);
> -extern void openpic_set_irq_priority(u_int irq, u_int pri);
> -extern void openpic_hookup_cascade(u_int irq, char *name,
> - int (*cascade_fn)(struct pt_regs *));
> -extern u_int openpic_irq(void);
> -extern void openpic_eoi(void);
> -extern void openpic_request_IPIs(void);
> -extern void do_openpic_setup_cpu(void);
> -extern int openpic_get_irq(struct pt_regs *regs);
> -extern void openpic_reset_processor_phys(u_int cpumask);
> -extern void openpic_setup_ISU(int isu_num, unsigned long addr);
> -extern void openpic_cause_IPI(u_int ipi, cpumask_t cpumask);
> -extern void smp_openpic_message_pass(int target, int msg);
> -extern void openpic_set_k2_cascade(int irq);
> -extern void openpic_set_priority(u_int pri);
> -extern u_int openpic_get_priority(void);
> -
> -extern inline int openpic_to_irq(int irq)
> -{
> - /* IRQ 0 usually means 'disabled'.. don't mess with it
> - * exceptions to this (sandpoint maybe?)
> - * shouldn't use openpic_to_irq
> - */
> - if (irq != 0){
> - return irq += NUM_8259_INTERRUPTS;
> - } else {
> - return 0;
> - }
> -}
> -/* Support for second openpic on G5 macs */
> -
> -// FIXME: To be replaced by sane cascaded controller management */
> -
> -#define PMAC_OPENPIC2_OFFSET 128
> -
> -#define OPENPIC2_VEC_TIMER 110 /* and up */
> -#define OPENPIC2_VEC_IPI 118 /* and up */
> -#define OPENPIC2_VEC_SPURIOUS 127
> -
> -
> -extern void* OpenPIC2_Addr;
> -
> -/* Exported functions */
> -extern void openpic2_set_sources(int first_irq, int num_irqs, void
> *isr);
> -extern void openpic2_init(int linux_irq_offset);
> -extern void openpic2_init_nmi_irq(u_int irq);
> -extern u_int openpic2_irq(void);
> -extern void openpic2_eoi(void);
> -extern int openpic2_get_irq(struct pt_regs *regs);
> -extern void openpic2_setup_ISU(int isu_num, unsigned long addr);
> -#endif /* _PPC_KERNEL_OPEN_PIC_H */
> --
> 1.2.4
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply
* Re: [PATCH 04/15] powerpc: move asm/bootinfo.h
From: Kumar Gala @ 2006-04-05 14:05 UTC (permalink / raw)
To: sfr; +Cc: linuxppc-dev, paulus
In-Reply-To: <11442138551674-git-send-email-sfr@canb.auug.org.au>
Nack, we are using the flat dev tree so old boot methods should stay
in arch/ppc.
- k
On Apr 5, 2006, at 12:10 AM, sfr@canb.auug.org.au wrote:
> From: Stephen Rothwell <sfr@canb.auug.org.au>
>
> Since files in arch/powerpc now depend on asm/bootinfo.h,
> move it to include/asm-powerpc.
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>
> ---
>
> include/asm-powerpc/bootinfo.h | 52 +++++++++++++++++++++++++++++
> +++++++++++
> include/asm-ppc/bootinfo.h | 52
> ----------------------------------------
> 2 files changed, 52 insertions(+), 52 deletions(-)
> create mode 100644 include/asm-powerpc/bootinfo.h
> delete mode 100644 include/asm-ppc/bootinfo.h
>
> 355987a8cf0cf4b644e83b8268a9a34cf4524ee0
> diff --git a/include/asm-powerpc/bootinfo.h b/include/asm-powerpc/
> bootinfo.h
> new file mode 100644
> index 0000000..231c534
> --- /dev/null
> +++ b/include/asm-powerpc/bootinfo.h
> @@ -0,0 +1,52 @@
> +#ifndef _ASM_POWERPC_BOOTINFO_H
> +#define _ASM_POWERPC_BOOTINFO_H
> +
> +/*
> + * Non-machine dependent bootinfo structure. Basic idea
> + * borrowed from the m68k.
> + *
> + * Copyright (C) 1999 Cort Dougan <cort@ppc.kernel.org>
> + */
> +
> +#ifdef __KERNEL__
> +
> +#include <asm/page.h>
> +
> +#if defined(CONFIG_APUS) && !defined(__BOOTER__)
> +#include <asm-m68k/bootinfo.h>
> +#else
> +
> +struct bi_record {
> + unsigned long tag; /* tag ID */
> + unsigned long size; /* size of record (in bytes) */
> + unsigned long data[0]; /* data */
> +};
> +
> +#define BI_FIRST 0x1010 /* first record - marker */
> +#define BI_LAST 0x1011 /* last record - marker */
> +#define BI_CMD_LINE 0x1012
> +#define BI_BOOTLOADER_ID 0x1013
> +#define BI_INITRD 0x1014
> +#define BI_SYSMAP 0x1015
> +#define BI_MACHTYPE 0x1016
> +#define BI_MEMSIZE 0x1017
> +#define BI_BOARD_INFO 0x1018
> +
> +extern struct bi_record *find_bootinfo(void);
> +extern void bootinfo_init(struct bi_record *rec);
> +extern void bootinfo_append(unsigned long tag, unsigned long size,
> void * data);
> +extern void parse_bootinfo(struct bi_record *rec);
> +extern unsigned long boot_mem_size;
> +
> +static inline struct bi_record *
> +bootinfo_addr(unsigned long offset)
> +{
> +
> + return (struct bi_record *)_ALIGN((offset) + (1 << 20) - 1,
> + (1 << 20));
> +}
> +#endif /* CONFIG_APUS */
> +
> +
> +#endif /* __KERNEL__ */
> +#endif /* _ASM_POWERPC_BOOTINFO_H */
> diff --git a/include/asm-ppc/bootinfo.h b/include/asm-ppc/bootinfo.h
> deleted file mode 100644
> index 93d955c..0000000
> --- a/include/asm-ppc/bootinfo.h
> +++ /dev/null
> @@ -1,52 +0,0 @@
> -/*
> - * Non-machine dependent bootinfo structure. Basic idea
> - * borrowed from the m68k.
> - *
> - * Copyright (C) 1999 Cort Dougan <cort@ppc.kernel.org>
> - */
> -
> -#ifdef __KERNEL__
> -#ifndef _PPC_BOOTINFO_H
> -#define _PPC_BOOTINFO_H
> -
> -#include <linux/config.h>
> -#include <asm/page.h>
> -
> -#if defined(CONFIG_APUS) && !defined(__BOOTER__)
> -#include <asm-m68k/bootinfo.h>
> -#else
> -
> -struct bi_record {
> - unsigned long tag; /* tag ID */
> - unsigned long size; /* size of record (in bytes) */
> - unsigned long data[0]; /* data */
> -};
> -
> -#define BI_FIRST 0x1010 /* first record - marker */
> -#define BI_LAST 0x1011 /* last record - marker */
> -#define BI_CMD_LINE 0x1012
> -#define BI_BOOTLOADER_ID 0x1013
> -#define BI_INITRD 0x1014
> -#define BI_SYSMAP 0x1015
> -#define BI_MACHTYPE 0x1016
> -#define BI_MEMSIZE 0x1017
> -#define BI_BOARD_INFO 0x1018
> -
> -extern struct bi_record *find_bootinfo(void);
> -extern void bootinfo_init(struct bi_record *rec);
> -extern void bootinfo_append(unsigned long tag, unsigned long size,
> void * data);
> -extern void parse_bootinfo(struct bi_record *rec);
> -extern unsigned long boot_mem_size;
> -
> -static inline struct bi_record *
> -bootinfo_addr(unsigned long offset)
> -{
> -
> - return (struct bi_record *)_ALIGN((offset) + (1 << 20) - 1,
> - (1 << 20));
> -}
> -#endif /* CONFIG_APUS */
> -
> -
> -#endif /* _PPC_BOOTINFO_H */
> -#endif /* __KERNEL__ */
> --
> 1.2.4
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply
* Re: Dynamically linking to pthread library
From: Dustin Lang @ 2006-04-05 13:20 UTC (permalink / raw)
To: Usha Rani Konudula; +Cc: linuxppc-dev
In-Reply-To: <C9CDA704CB0EEA4DBE2EFC05AE11851C1C6A8A@SGSGS-EXCH01.apac.borl.net>
Hi,
> Do you need to explicitly specify -pthread option to g++ to make the
> target library link with pthread dynamically. Otherwise does it
> statically link to pthread library on ppc64 power5.
You can use "ldd" to tell you which libraries are dynamically linked to an
executable. Read "man ldd" for more details. You can add the "-v"
(verbose) flag to your g++ link command, which will tell you the full
details of what it's linking in.
My guess is that you need to specify "-pthread" explicitly. What happens
if you create a program that calls a pthread function and you don't
specify "-pthread". Does it link? If it does, then the compiler is
getting that pthread definition from _somewhere_. What does "g++ -v" tell
you? What does "ldd" tell you?
By the way, a better way to ask questions on a mailing list is to explain
what you're trying to do, what you've tried to do to achieve it, and why
it didn't work. It usually helps to be explicit about each step. Show
that you've tried to figure it out for yourself.
Cheers,
dstn.
^ permalink raw reply
* MPC5200 + LocalPlus Bus + memcpy
From: Sascha Hauer @ 2006-04-05 11:38 UTC (permalink / raw)
To: Linuxppc-embedded
Hi all,
I try to use jffs2 on a flash device connected to the mpc5200
LocalPlus Bus. This bus does not allow misaligned accesses.
The jffs2 code uses memcpy to copy from a word aligned address to an
odd address. The ppc memcpy implementation first copies three bytes to get
the target address word aligned, but then the source address is on an
odd address. The following word accesses on this unaligned address fail
badly.
I have fixed my problem by modifying the physmap mtd driver, but some
day someone wants to connect SRAM to the LocalPlus Bus and I guess he
will expect memcpy to work.
(BTW the arm implementation of memcpy seems to work around this problem)
Sascha
^ permalink raw reply
* Re: [RFC/PATCH] powerpc: Use rtas query-cpu-stopped-state in smp spinup
From: Michael Ellerman @ 2006-04-05 11:23 UTC (permalink / raw)
To: Nathan Lynch; +Cc: linuxppc-dev, Paul Mackerras, Arnd Bergmann
In-Reply-To: <20060404172550.GE25663@localdomain>
[-- Attachment #1: Type: text/plain, Size: 1859 bytes --]
On Tue, 2006-04-04 at 12:25 -0500, Nathan Lynch wrote:
> Michael Ellerman wrote:
> > Currently we use a cpumask called of_spin_map to keep track of which threads
> > have been spun up. We basically guess that OF has spun up all even numbered
> > threads, and so all the odd numbered threads need to be brought up.
> >
> > That's a bit of a dicey assumption at best, and is totally incorrect for
> > kexec.
> >
> > Luckily we have an rtas call which can tell us whether a cpu is up
> > or not, so let's use it?
>
> 1. query-cpu-stopped-state isn't available on all RTAS systems (I
> believe it's required only on systems that support cpu offline).
That should be ok, I'm pretty sure the way I've written it if
query-cpu-stopped-state isn't there we try and start it the old way
anyway.
> 2. I've tried it before. Hope I'm remembering this correctly, but I
> think my experience was that query-cpu-stopped-state reported
> nonsense for cpus that were started by OF. This was on Power5,
> btw.
That's not what I see, perhaps I have newer firmware?
> 3. This isn't how query-cpu-stopped-state was intended to be used.
> It's meant to be used by the OS to determine when a thread has
> stopped itself using the stop-self method. Which might partially
> explain (2).
Perhaps, PAPR says: "The query-cpu-stopped-state primitive is used to
query a different processor thread to determine its status with respect
to the RTAS stopped state". I guess I assumed that a thread that's not
started would be in the "RTAS stopped state", which seems logical if not
correct.
cheers
--
Michael Ellerman
IBM OzLabs
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply
* SBC 8245 problem with linux kernel PCI bus configuration
From: kevin morizur @ 2006-04-05 10:49 UTC (permalink / raw)
To: linuxppc-embedded
Hi.
I'am using a SBC8245 board,ELDK 4.0 and Linux 2.6.11.
I make a linux kernel for MPC8245 with ELDK version 4.0 and i meet few
problems :
1) I make my kernel configuration and when i activate the PCI bus support i
have errors in compilation: PIRQA,PIRQB,PIRQC,PIRQD,
PCI_INT_MASK_REG,PCI_INT_STAT_REG,PCI_INT_TO_SIU are not defined. When i
compile without PCI bus support, there is no problem. So i don't have PCI
bus activate !
2) When i start the kernel on my target the console displays : Detected
PPCBOOT header
Verifying image CRC...ok
Uncompressing Kernel Image...ok
Starting Linux Kernel.
and it stops. My console is connected via the serial port which is connected
to the MPC8245 via PCI bus. So maybe the linux kernel starts correctly but i
can't see anything ?
So if you could help me to make PCI bus working correctly !
Regards,
Kevin
_________________________________________________________________
Tout savoir sur la sécurité de votre PC !
http://go.msn.fr/10-channel/80-security/spam/default.asp
^ permalink raw reply
* Re: xorg-7.0 freezes on gentoo ppc64 linux with 9800 card
From: Yang Dehua @ 2006-04-05 10:51 UTC (permalink / raw)
To: Brian D. Carlstrom; +Cc: linuxppc-dev
In-Reply-To: <17459.11188.362959.630416@zot.electricrain.com>
RGVhciBCcmlhbiwNClRoYW5rIHlvdS4NCkkganVzdCBmZXRjaGVkIHRoZSBjdnMgb2YgeGY4Ni12
aWRlby1hdGkgZHJpdmVyIGZyb20gZnJlZWRlc2t0b3Aub3JnLCBhbmQgaXQgd29ya2VkIG9uIG15
IDk4MDB4dCBjYXJkLg0KDQpSZWdhcmRzLA0KRGVodWENCg0KLS0tLS0gT3JpZ2luYWwgTWVzc2Fn
ZSAtLS0tLSANCkZyb206ICJCcmlhbiBELiBDYXJsc3Ryb20iIDxiZGNAY2FybHN0cm9tLmNvbT4N
ClRvOiAiWWFuZyBEZWh1YSIgPHlhbmdkaEBjYWJsZXBsdXMuY29tLmNuPg0KQ2M6IDxsaW51eHBw
Yy1kZXZAb3psYWJzLm9yZz4NClNlbnQ6IFdlZG5lc2RheSwgQXByaWwgMDUsIDIwMDYgMTA6MzAg
QU0NClN1YmplY3Q6IHhvcmctNy4wIGZyZWV6ZXMgb24gZ2VudG9vIHBwYzY0IGxpbnV4IHdpdGgg
OTgwMCBjYXJkDQoNCg0KPiBZYW5nIERlaHVhIHdyaXRlczoNCj4gID4gSSBqdXN0IGJvdWdodCBh
IG1hYyA5ODAweHQgY2FyZCB0byByZXBsYWNlIG15IDk2MDBwcm8gb24gbXkgRzUNCj4gID4gcnVu
bmluZyBnZW50b28gcHBjNjQgbGludXgoMjAwNi4wLCA2NC1iaXQgdXNlcmxhbmQpLiBUaGUgc3lz
dGVtDQo+ICA+IHdvcmtlZCBmaW5lIHVudGlsIEkgc3RhcnRlZCB4b3JnLTcuMDogdGhlIHNjcmVl
biBibGFja2VkIGFuZCB0aGUNCj4gID4ga2V5Ym9hcmQgYW5kIG1vdXNlIHdlcmUgbm90IHJlc3Bv
bmRpbmcgYW55IG1vcmUsIHNvIEkgaGFkIHRvIHNodXRkb3duDQo+ICA+IHRoZSBtYWNoaW5lLiBU
aGUgc2FtZSBYIGNvbmZpZyB3b3JrZWQgd2VsbCB3aXRoIDk2MDBwcm8gY2FyZCg2NE0pLg0KPiAN
Cj4gSSByYW4gaW50byB0aGlzIGFuZCBwb3N0ZWQgYSB3b3JrYXJvdW5kIGFib3V0IGl0IGhlcmUg
Zm9yIGZlZG9yYToNCj4gICAgIGh0dHA6Ly9saXN0cy5pbmZyYWRlYWQub3JnL3BpcGVybWFpbC9m
ZWRvcmEtcHBjLzIwMDYtTWFyY2gvMDAwODE2Lmh0bWwNCj4gDQo+IEkgYmFzZWQgdGhpcyB3b3Jr
YXJvdW5kIGJhc2VkIG9uIHRoZSBVYnVudHUgZGlzY3Vzc2lvbiBoZXJlOg0KPiAgICAgaHR0cHM6
Ly9sYXVuY2hwYWQubmV0L2Rpc3Ryb3MvdWJ1bnR1Lytzb3VyY2UveHNlcnZlci14b3JnLWRyaXZl
ci1hdGkvK2J1Zy8zMDQyNg0KPiANCj4gQmFzaWNhbGx5LCBCZW5qYW1pbiBIZXJyZW5zY2htaWR0
IHJlY29tbWVuZHMgImJ1aWxkaW5nIHRoZSBhdGkgZHJpdmVyDQo+IGZyb20gWC5vcmcgYXRpLTEt
MC1icmFuY2ggQ1ZTIGJyYW5jaCIuIFdpdGggdGhhdCwgSSdtIHdvcmtpbmcgaW4gWA0KPiBoYXBw
aWx5LiBJJ2xsIG5vdGUgdGhhdCBhbiBhbHRlcm5hdGl2ZSBiZWZvcmUgdGhhdCB3YXMgdG8gdXNl
IHRoZQ0KPiAiZmJkZXYiIGRyaXZlciBpbnN0ZWFkIG9mIHRoZSAicmFkZW9uIi4NCj4gDQo+IC1i
cmkNCj4gDQo+IA0K
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox