* Re: glibc-2.5 test suite hangs/crashes the machine
From: Steve Munroe @ 2006-11-01 22:56 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: linuxppc-dev, Jeff Bailey, Fabio Massimo Di Nitto, Paul Mackerras,
Ben Collins
In-Reply-To: <1162420552.25682.471.camel@localhost.localdomain>
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote on 11/01/2006
04:35:52 PM:
>
> > The tst-robustpi# test are exercising the new PTHREAD_MUXTEX_ROBUST
api,
> > with PTHREAD_PRIO_INHERIT attribute.
> >
> > The fuxtex word seems to include the waiters TID, I don't know if the
> > kernel cares about this or not.
>
> Ok, well, we have seen a few issues so far with these. 2 are kernel
> issues, but one might not be:
>
> - kernels 2.6.15 .. .17 at least it seems wire the robust futex
> syscalls on powerpc without properly implementing the support, which can
> cause hangs in process exit. Do you have any way to "blacklist" kernels
> in glibc ?
>
>From libc/sysdeps/unix/sysv/linux/kernel-features.h
/* Support for inter-process robust mutexes was added in 2.6.17. */
#if __LINUX_KERNEL_VERSION >= 0x020611
# define __ASSUME_SET_ROBUST_LIST 1
#endif
/* Support for PI futexes was added in 2.6.18. */
#if __LINUX_KERNEL_VERSION >= 0x020612
# define __ASSUME_FUTEX_LOCK_PI 1
#endif
So I need to delay __ASSUME_SET_ROBUST_LIST to 2.6.18 for __powerpc__ ?
What about __ASSUME_FUTEX_LOCK_PI ?
> - kernel 2.6.18 and current git until yesterday (fix got in today) has
> a bug if you manage to pass a wrong futex with a non-aligned atomic
> value, it will possibly oops the kernel. With the fix, it will return an
> error.
>
> Now what seems to be a glibc issue:
>
> - I've had the tst-robustpi# tests (in fact the very first one, I
> haven't tested the others) die on me with a SIGBUS caused by glibc
> trying to do a lwarx/starx. on an odd address.
>
Rayn reminded me of a bug where the new robust code did not account for the
fact that the TID was not at the same place as i386. I think Ryan has a
patch.
Steven J. Munroe
Linux on Power Toolchain Architect
IBM Corporation, Linux Technology Center
^ permalink raw reply
* Re: glibc-2.5 test suite hangs/crashes the machine
From: Benjamin Herrenschmidt @ 2006-11-01 23:22 UTC (permalink / raw)
To: Steve Munroe
Cc: linuxppc-dev, Jeff Bailey, Fabio Massimo Di Nitto, Paul Mackerras,
Ben Collins
In-Reply-To: <OF1858F563.F89FF725-ON86257219.007D5B13-86257219.007E0EB5@us.ibm.com>
> So I need to delay __ASSUME_SET_ROBUST_LIST to 2.6.18 for __powerpc__ ?
The problem is not so much the headers you build with than the runtime
checks... I suppose you shouldn't bother as we are trickling down the
fixes to distros & stable series anyway.
> What about __ASSUME_FUTEX_LOCK_PI ?
I don't know, I'm very unfamiliar with that futex stuff. I need to look
more closely.
> > - kernel 2.6.18 and current git until yesterday (fix got in today) has
> > a bug if you manage to pass a wrong futex with a non-aligned atomic
> > value, it will possibly oops the kernel. With the fix, it will return an
> > error.
> >
> > Now what seems to be a glibc issue:
> >
> > - I've had the tst-robustpi# tests (in fact the very first one, I
> > haven't tested the others) die on me with a SIGBUS caused by glibc
> > trying to do a lwarx/starx. on an odd address.
> >
> Rayn reminded me of a bug where the new robust code did not account for the
> fact that the TID was not at the same place as i386. I think Ryan has a
> patch.
Ah ok. Can you give me the details as soon as you get them ? (In
addition to submitting the fix upstream of course :) ubuntu at least is
starting to build their next distro on top of glibc-2.5 so it would be
nice if they had the fix asap.
Thanks for looking at this !
Cheers,
Ben.
^ permalink raw reply
* Re: [PATCH/RFC] powerpc: Add Efika platform support
From: Benjamin Herrenschmidt @ 2006-11-01 23:25 UTC (permalink / raw)
To: Nicolas DET; +Cc: linuxppc-dev, sl, linuxppc-embedded
In-Reply-To: <1162419546.25682.460.camel@localhost.localdomain>
On Thu, 2006-11-02 at 09:19 +1100, Benjamin Herrenschmidt wrote:
> On Wed, 2006-11-01 at 21:29 +0100, Nicolas DET wrote:
Ooops ... here's the english version :)
> > +
> > +static void __init efika_init_IRQ(void)
> > +{
> > + mpc52xx_init_irq();
> > +}
>
> Ya pas moyen que mpc52xx_init_irq() ait le bon prototype pour que tu le
> colle directement dans ppc_md. ?
It would be better if mpc52xx_init_irq() had the right prototype so it
can be hooked directly from ppc_md.
> > +
> > + ISA_DMA_THRESHOLD = ~0L;
> > + DMA_MODE_READ = 0x44;
> > + DMA_MODE_WRITE = 0x48;
>
> Ca viens de CHRP ca ? Je suis pas sur que ca soit super utile... mais
> bon, ca mange pas de pain.. Au cas ou qqun colle un southbridge ISA sur
> le bus PCI :)
This comes from CHRP ? I'm not sure it's terribly useful, at least for
Efika, though it doesn't hurt. Maybe some day somebody will stick an ISA
southbridge on the 5200 PCI bus :)
> > +void __init efika_pcisetup(void)
> > +{
> > + const int *bus_range;
> > + int len;
> > + struct pci_controller *hose;
> > + struct device_node *root;
> > + struct device_node *pcictrl;
> > +
> > + root = of_find_node_by_path("/");
> > + if (root == NULL) {
> > + printk(KERN_WARNING EFIKA_PLATFORM_NAME
> > + ": Unable to find the root node\n");
> > + return;
> > + }
> > +
> > + for (pcictrl = NULL;;) {
> > + pcictrl = of_get_next_child(root, pcictrl);
> > + if ((pcictrl == NULL) || (strcmp(pcictrl->name, "pci") == 0))
> > + break;
> > + }
> > +
> > + if (pcictrl == NULL) {
> > + printk(KERN_WARNING EFIKA_PLATFORM_NAME
> > + ": Unable to find the PCI bridge node\n");
> > + return;
> > + }
> > +
> > + of_node_put(pcictrl);
> > + of_node_put(root);
>
> Euh... non... tu fait pas of_node_put(pcictrl) avant de t'en servir...
> tu fait ca quand tu as fini. Ca veut dire probablement changer test
> "return" en "goto bail;" ou un truc du genre.
Don't do an of_node_put(pcictrl) before you use that node... Do it when
you are done with it, which probably means changing "return" statements
into something like "goto bail;"
> > + if (bus_range[1] == bus_range[0])
> > + printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI bus %d",
> > + bus_range[0]);
> > + else
> > + printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI buses %d..%d",
> > + bus_range[0], bus_range[1]);
> > + printk(" controlled by %s", pcictrl->full_name);
> > + printk("\n");
>
> You really need the above printk's ?
Ah, that one was good :)
> > + hose = pcibios_alloc_controller();
> > + if (!hose) {
> > + printk(KERN_WARNING EFIKA_PLATFORM_NAME
> > + ": Can't allocate PCI controller structure for %s\n",
> > + pcictrl->full_name);
> > + return;
> > + }
> > +
> > + hose->arch_data = pcictrl;
>
> Et ici, tu garde une reference, donc to fait
Here's you are keeping a reference to the node, thus you should do:
> hose->arch_data = of_node_get(pcictrl);
>
> > + hose->first_busno = bus_range[0];
> > + hose->last_busno = bus_range[1];
> > + hose->ops = &rtas_pci_ops;
> > +
> > + pci_process_bridge_OF_ranges(hose, pcictrl, 0);
> > +}
>
> Le reste est bon.
>
> On y est presque ! :)
The rest is good, we're almost there :)
Ben.
^ permalink raw reply
* Re: [PATCH/RFC] powerpc: Add of_platform support for OHCI/Bigendian HC
From: Benjamin Herrenschmidt @ 2006-11-01 23:27 UTC (permalink / raw)
To: Nicolas DET; +Cc: linuxppc-dev, sl, linuxppc-embedded
In-Reply-To: <1162419799.25682.466.camel@localhost.localdomain>
On Thu, 2006-11-02 at 09:23 +1100, Benjamin Herrenschmidt wrote:
And in english here too....
> On Wed, 2006-11-01 at 21:31 +0100, Nicolas DET wrote:
>
> > +/**+ ohci = hcd_to_ohci(hcd);
> > + ohci->flags |= OHCI_BIG_ENDIAN;
> > + ohci_hcd_init(ohci);
>
> Bon, c'est pas mal. Le seul truc ici, c'est que je prefererais que
> big-endian ne soit pas hard-code comme ca mais depende du device-tree.
> Ce code doit pouvoir etre re-utilise pour des implementations
> little-endian.
Ok, so it looks good. The only thing here is that I would prefer if the
big-endian setting wasn't hard-coded, but set based on the device-tree,
so that this code can be re-used for little-endian implementations.
> > + retval = usb_add_hcd(hcd, irq, IRQF_DISABLED);
> > + if (retval == 0)
> > + return retval;
>
> Pourquoi IRQF_DISABLED ?
Why IRQF_DISABLED ?
> > +module_init(ohci_hcd_ppc_of_init);
> > +module_exit(ohci_hcd_ppc_of_cleanup);
> > --- a/drivers/usb/host/Kconfig 2006-11-01 09:18:56.000000000 +0100
> > +++ b/drivers/usb/host/Kconfig 2006-11-01 21:16:06.000000000 +0100
> > @@ -106,6 +106,14 @@ config USB_OHCI_HCD_PPC_SOC
> > Enables support for the USB controller on the MPC52xx or
> > STB03xxx processor chip. If unsure, say Y.
> >
> > +config USB_OHCI_HCD_PPC_OF
> > + bool "OHCI support for PPC USB controller for OpenFirmware platform"
> > + depends on USB_OHCI_HCD && PPC_OF
> > + default y
> > + select USB_OHCI_BIG_ENDIAN
> > + ---help---
> > + Enables support for the USB controller PowerPC OpenFirmware platform
> > +
>
> Je prefererais que USB_OHCI_BIG_ENDIAN soit une option a choisir.
I'd prefer if USB_OHCI_BIG_ENDIAN was a user selectable option
Ben.
^ permalink raw reply
* RE: plb_temac w/linux 2.6.18.1 driver init error
From: Rick Moleres @ 2006-11-01 23:35 UTC (permalink / raw)
To: robert corley; +Cc: linux linuxppc-embedded
Robert,
The DRE type should not matter. The problem seems to be that the
hardware is built for DMA but for some reason the driver is trying to
initialize the FIFO. It seems that something is out of sync.
Since you're using EDK 8.2i, I wonder if you can go grab SP2, which was
released Oct. 30th. It has Linux 2.6 as part of its BSP generation,
along with a Linux 2.6 plb_temac driver (I don't recall where you got
your version). Here are the paths, or you can just use the BSP
generation process.
sw\ThirdParty\bsp\linux_2_6_v1_00_a\drivers\temac_linux_2_6_v2_00_b\src
sw\ThirdParty\bsp\linux_2_6_v1_00_a\linux\arch\ppc\platforms\4xx
Regarding bandwidth, we saw similar numbers with plb_temac as seen with
GSRD using netperf when plb_temac is built with DMA, DRE, and checksum
offload (you have CSO turned off). I think the max Linux 2.6 TCP
numbers were 530Mbps (TX) and 310Mbps (RX). We saw better with Linux
2.4 (730Mbps/360Mbps) - but we didn't spend time investigating the
difference.
Thanks,
Rick
-----Original Message-----
From: robert corley [mailto:rdcorle@yahoo.com]=20
Sent: Wednesday, November 01, 2006 2:29 PM
To: Rick Moleres
Subject: Re: plb_temac w/linux 2.6.18.1 driver init error
Rick;
Below are the defines generated by the EDK8.2 and are equal to those
used in
my xparameters_ml403.h file for linux. It would appear that they are in
sync.
Note that there are two #defines no longer generated by EDK but still
used in the arch/ppc/platforms/4xx/virtex.c:
#define XPAR_TEMAC_0_TEMAC_DCR_HOST 0
#define XPAR_TEMAC_0_INCLUDE_DRE 1
/******************************************************************/
/* Definitions for driver TEMAC */
#define XPAR_XTEMAC_NUM_INSTANCES 1
/* Definitions for peripheral PLB_TEMAC_0 */
#define XPAR_PLB_TEMAC_0_DEVICE_ID 0
#define XPAR_PLB_TEMAC_0_BASEADDR 0x60000000
#define XPAR_PLB_TEMAC_0_HIGHADDR 0x60003FFF
#define XPAR_PLB_TEMAC_0_RXFIFO_DEPTH 131072
#define XPAR_PLB_TEMAC_0_TXFIFO_DEPTH 131072
#define XPAR_PLB_TEMAC_0_MAC_FIFO_DEPTH 64
#define XPAR_PLB_TEMAC_0_DMA_TYPE 3
#define XPAR_PLB_TEMAC_0_TX_DRE_TYPE 2
#define XPAR_PLB_TEMAC_0_RX_DRE_TYPE 2
#define XPAR_PLB_TEMAC_0_INCLUDE_TX_CSUM 0
#define XPAR_PLB_TEMAC_0_INCLUDE_RX_CSUM 0
/******************************************************************/
Do you think that the type of RX & TX DRE makes a difference? That is,
shall I use
DSP48 blocks or logic (or that just a design consideration rather than a
driver issue)?
You've probably done some measurements on bandwidth throughput. Can you
tell
me how much bw I can get out of the plb_temac with and without DMA mode?
Would it be better to use the device is a similar manner as was done in
the GSRD, or can I=20
expect to get similar bandwidths this way?
-cy
----- Original Message ----
From: Rick Moleres <rick.moleres@xilinx.com>
To: robert corley <rdcorle@yahoo.com>; David Bolcsfoldi
<dbolcsfoldi@gmail.com>
Cc: linux linuxppc-embedded <linuxppc-embedded@ozlabs.org>
Sent: Wednesday, November 1, 2006 3:45:38 PM
Subject: RE: plb_temac w/linux 2.6.18.1 driver init error
Robert,
I haven't seen this before, but perhaps the plb_temac hardware is built
for DMA but xparameters.h is out of sync and thinks it's built with FIFO
mode? This would probably cause a machine check if trying to write a
FIFO register but it doesn't exist. You can crosscheck xparameters.h
with your hardware design to verify.
-Rick
^ permalink raw reply
* plb_temac w/linux 2.6.18.1 driver init error
From: Robert Corley @ 2006-11-01 23:40 UTC (permalink / raw)
To: Rick Moleres; +Cc: linux linuxppc-embedded
Rick;=0A=0AI see now what you were writing about. The IPIF registers for c=
ontrolling FIFO control (both xmit and rcv)=0Aare not accessible when a DMA=
mode is used, as is shown on page 26 of the plb_temac datasheet.=0A=0AExam=
ination of the drivers generated by the EDK show that a check for the prese=
nce of a DMA engine=0Ais done in xtemac.c to avoid incorrectly resetting a =
DMA-based plb_temac; whereas, the drivers for=0Aearlier versions of the plb=
_temac do not have this test.=0A=0ALooks like I will have to incorporate th=
e drivers generated by the EDK8.2 into the linux tree.=0A=0ADo you know whe=
re I might get the file "gmii.h" referenced in adapter.c?=0A=0A-cy=0A=0A
^ permalink raw reply
* DNS lookup of denx.de fails
From: Robin Gilks @ 2006-11-01 23:49 UTC (permalink / raw)
To: Linuxppc-embedded
I've got a weird one here.
Attempts to connect to www.denx.de to check out a couple of wiki pages
gets connection refused but the online dns lookup at zoneedit.com says
that there are no A records for denx.de at all!!
I've got a vague recollection of Wolfgang saying that Monday night some
server stuff was being done (can't remember which list it was posted to)
but its unobtainable as of Thursday :-(
--
Robin Gilks
Senior Design Engineer Phone: (+64)(3) 357 1569
Tait Electronics Fax : (+64)(3) 359 4632
PO Box 1645 Christchurch Email : robin.gilks@tait.co.nz
New Zealand
=======================================================================
This email, including any attachments, is only for the intended
addressee. It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
=======================================================================
^ permalink raw reply
* Re: [PATCH/RFC] powerpc: Add of_platform support for OHCI/Bigendian HC
From: Linas Vepstas @ 2006-11-01 23:49 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, linuxppc-embedded, sl
In-Reply-To: <1162419799.25682.466.camel@localhost.localdomain>
On Thu, Nov 02, 2006 at 09:23:18AM +1100, Benjamin Herrenschmidt wrote:
> On Wed, 2006-11-01 at 21:31 +0100, Nicolas DET wrote:
>
> > +/**+ ohci = hcd_to_ohci(hcd);
^^^
???
Qu'est que c'est?
--linas
^ permalink raw reply
* RE: plb_temac w/linux 2.6.18.1 driver init error
From: Rick Moleres @ 2006-11-01 23:48 UTC (permalink / raw)
To: Robert Corley; +Cc: linux linuxppc-embedded
Robert,
No, I'm not sure where gmii.h is. I see in the adapter.c delivered in
EDK 8.2.02i it includes linux/mii.h, but I don't see an include of
gmii.h. Perhaps you can incorporate this new adapter.c as well. I
believe gmii.h is a Linux 2.4 file (?).
-Rick
-----Original Message-----
From: Robert Corley [mailto:rcorley@aegis-inc.net]=20
Sent: Wednesday, November 01, 2006 4:41 PM
To: Rick Moleres
Cc: linux linuxppc-embedded
Subject: plb_temac w/linux 2.6.18.1 driver init error
Rick;
I see now what you were writing about. The IPIF registers for
controlling FIFO control (both xmit and rcv)
are not accessible when a DMA mode is used, as is shown on page 26 of
the plb_temac datasheet.
Examination of the drivers generated by the EDK show that a check for
the presence of a DMA engine
is done in xtemac.c to avoid incorrectly resetting a DMA-based
plb_temac; whereas, the drivers for
earlier versions of the plb_temac do not have this test.
Looks like I will have to incorporate the drivers generated by the
EDK8.2 into the linux tree.
Do you know where I might get the file "gmii.h" referenced in adapter.c?
-cy
^ permalink raw reply
* Re: [PATCH/RFC] powerpc: Add of_platform support for OHCI/Bigendian HC
From: Benjamin Herrenschmidt @ 2006-11-02 0:07 UTC (permalink / raw)
To: Linas Vepstas; +Cc: linuxppc-dev, linuxppc-embedded, sl
In-Reply-To: <20061101234956.GU6360@austin.ibm.com>
On Wed, 2006-11-01 at 17:49 -0600, Linas Vepstas wrote:
> On Thu, Nov 02, 2006 at 09:23:18AM +1100, Benjamin Herrenschmidt wrote:
> > On Wed, 2006-11-01 at 21:31 +0100, Nicolas DET wrote:
> >
> > > +/**+ ohci = hcd_to_ohci(hcd);
> ^^^
> ???
>
> Qu'est que c'est?
Probably just me not properly cutting the previous lines :)
Ben.
^ permalink raw reply
* Re: DNS lookup of denx.de fails
From: Josh Boyer @ 2006-11-02 0:13 UTC (permalink / raw)
To: Robin Gilks; +Cc: Linuxppc-embedded
In-Reply-To: <45493298.4040006@tait.co.nz>
On Thu, 2006-11-02 at 12:49 +1300, Robin Gilks wrote:
> I've got a weird one here.
>
> Attempts to connect to www.denx.de to check out a couple of wiki pages
> gets connection refused but the online dns lookup at zoneedit.com says
> that there are no A records for denx.de at all!!
>
> I've got a vague recollection of Wolfgang saying that Monday night some
> server stuff was being done (can't remember which list it was posted to)
> but its unobtainable as of Thursday :-(
They suffered a massive server failure. As of this morning, it wasn't
back up yet.
josh
^ permalink raw reply
* 2.6.18 on mpc859t stuck in __delay
From: Robin Gilks @ 2006-11-02 0:25 UTC (permalink / raw)
To: linuxppc-embedded
I'm sure this is a common one but I'm a bit stuck (like the target is
really!!)
I'm real confused about what options to enable for a generic 866 series
target - I'm got CONFIG_MPC86xADS and CONFIG_FADS enabled in the
platform section but I'm not clear as to whether that will cause the
startup code to look for an ADS EPROM chip or look for a bd_t struct of
data from the bootloader.
I've checked the bdinfo at __res and it looks OK (booting from u-boot)
with valid CPU, bus and console speeds but I get the impression that the
decrementer isn't being started.
--
Robin Gilks
Senior Design Engineer Phone: (+64)(3) 357 1569
Tait Electronics Fax : (+64)(3) 359 4632
PO Box 1645 Christchurch Email : robin.gilks@tait.co.nz
New Zealand
=======================================================================
This email, including any attachments, is only for the intended
addressee. It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
=======================================================================
^ permalink raw reply
* iommu_table & it_busno
From: Benjamin Herrenschmidt @ 2006-11-02 3:45 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev list
Hi Olof !
Do we ever use that it_busno field in there ? Can I remove it ?
Cheers,
Ben.
^ permalink raw reply
* Re: plb_temac w/linux 2.6.18.1 driver init error
From: David H. Lynch Jr. @ 2006-11-02 5:52 UTC (permalink / raw)
To: robert corley, linuxppc-embedded
In-Reply-To: <20061101203314.2385.qmail@web56315.mail.re3.yahoo.com>
I am not sure of the problem,
but I think you are using a different variation of the TEMAC than
I am.
My TEMAC is configured with a DMA_TYPE of 1 and a DRE TYPE of 0
I also thought the XPacketFifo code was for DMA TYPE 1 which I
beleive is the FIFO incarnation of the TEMAC.
This driver is supposed to work with your TEMAC - I think.
robert corley wrote:
> Anyone?;
>
> The offending instruction is:
>
> out_be32((volatile unsigned *) InstancePtr->RegBaseAddress+XPF_V200A_RESET_REG_OFFSET, XPF_V200A_RESET_FIFO_MASK);
>
> called vai a #define in "drivers/xilinx_edk/xpacket_fifo_v2_00_a.c"
>
> Would anyone care to speculate if the error is in the out_be32 definition or is this a function of a memory access to an incorrect value?
>
> Here is the latest dump:
>
> [ 2.702189] xtenet_probe: xtemac 0: IO resources obtained. IRQ = 0, MEM = 0x60000000
> [ 2.710095] xtenet_probe: xtemac 0: private data initialized
> [ 2.715872] remap info => start = 0x60000000, end=0x60003fff, total=16384, virtual dest.=0xc5050000
> [ 2.725007] xtenet_probe: TEMAC config lookup succeeded. Details =
> [ 2.731369] Base address = 0x60000000
> [ 2.735471] Unique ID = 0x0000
> [ 2.739230] RCV FIFO depth = 0x131072
> [ 2.743161] XMIT FIFO depth = 0x131072
> [ 2.747091] MAC FIFO depth = 0x64
> [ 2.750677] IPIF/DMA config = 0x03
> [ 2.754260] DCR Host = 0x0
> [ 2.757759] DRE Engine? = 0x1
> [ 2.761260] Initialize : Handlers set up. Configuring FIFO access...
> [ 2.767709] XPacketFifoV200a_Initialize : setting FIFO REG base address to 0xC5052010
> [ 2.775548] XPacketFifoV200a_Initialize : setting FIFO DATA base address to 0xC5052200
> [ 2.783474] XPacketFifoV200a_Initialize : setting IsReady to 286331153
> [ 2.790011] XPacketFifoV200a_Initialize : resetting FIFO by writing 0x000A to 0xC5052010
> [ 2.798103] Data machine check in kernel mode.
> [ 2.802544] Oops: machine check, sig: 7 [#1]
>
> -cy
>
>
>
>
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
--
Dave Lynch DLA Systems
Software Development: Embedded Linux
717.627.3770 dhlii@dlasys.net http://www.dlasys.net
fax: 1.253.369.9244 Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.
"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein
^ permalink raw reply
* Re: 2.6.18 on mpc859t stuck in __delay
From: Kalle Pokki @ 2006-11-02 6:03 UTC (permalink / raw)
To: Robin Gilks; +Cc: linuxppc-embedded
In-Reply-To: <45493B07.7030806@tait.co.nz>
On 11/2/06, Robin Gilks <robin.gilks@tait.co.nz> wrote:
> I'm sure this is a common one but I'm a bit stuck (like the target is
> really!!)
>
> I'm real confused about what options to enable for a generic 866 series
> target - I'm got CONFIG_MPC86xADS and CONFIG_FADS enabled in the
> platform section but I'm not clear as to whether that will cause the
> startup code to look for an ADS EPROM chip or look for a bd_t struct of
> data from the bootloader.
You should probably have just have CONFIG_8xx and
CONFIG_YOUR_OWN_BOARD defined. Don't enable these other boards, since
that just makes the code to access some board specific control
registers you don't have. This surely leads to machine check
exceptions or other erratic behavior. However, it may be useful to
grep all the CONFIG_MPC86xADS and CONFIG_FADS code sections, and check
if you should implement something similar to these code blocks that
applies to your own board.
^ permalink raw reply
* [PATCH] adding ROM chips to device tree
From: Vitaly Wool @ 2006-11-02 11:55 UTC (permalink / raw)
To: linuxppc-embedded
Hello folks,
inlined below is the patch which adds support for flash device descriptions to the OF device tree. It's inspired by and partially borrowed from Sergei's patch which can be found at http://patchwork.ozlabs.org/linuxppc/patch?id=6526 but arranges things in a different way.
It should be used together with the corresponding MTD layer extension the current version of which was recently posted to linux-mtd list for discussion and can be found at http://lists.infradead.org/pipermail/linux-mtd/2006-November/016700.html.
In fact, currently this description can handle only flash devices mapped into memory in a linear way. For NAND flashes we'll need a whole lot different description but let's solve problems as they arise since I'm not aware of any ppc board w/ NAND chip yet :)
Documentation/powerpc/booting-without-of.txt | 37 +++++++++++++++++++++++++++
arch/powerpc/sysdev/Makefile | 1
arch/powerpc/sysdev/flash.c | 27 +++++++++++++++++++
3 files changed, 65 insertions(+)
Signed-off-by: Vitaly Wool <vwool@ru.mvista.com>
Index: powerpc/Documentation/powerpc/booting-without-of.txt
===================================================================
--- powerpc.orig/Documentation/powerpc/booting-without-of.txt
+++ powerpc/Documentation/powerpc/booting-without-of.txt
@@ -6,6 +6,8 @@
IBM Corp.
(c) 2005 Becky Bruce <becky.bruce at freescale.com>,
Freescale Semiconductor, FSL SOC and 32-bit additions
+(c) 2006 MontaVista Software, Inc.
+ Flash chip node definition
May 18, 2005: Rev 0.1 - Initial draft, no chapter III yet.
@@ -1693,6 +1696,41 @@ platforms are moved over to use the flat
};
};
+ viii) Flash chip nodes
+
+ Flash chips (Memory Technology Devices) are often used for solid state
+ file systems on embedded devices.
+
+ Required properties:
+
+ - device_type : has to be "rom"
+ - compatible : Should be the name of the MTD driver. Currently, this is
+ most likely to be "physmap".
+ - reg : Offset and length of the register set for the device.
+
+ Recommended properties :
+
+ - bank-width : Width of the flash data bus in bytes. Must be specified
+ for the NOR flashes.
+ - partitions : Several pairs of 32-bit values where the first value is
+ partition's offset from the start of the MTD device and the second
+ one is partition size in bytes with LSB used to signify a read only
+ partititon (so, the parition size should always be an even number).
+ - partition-names : The list of concatenated zero terminated strings
+ representing the partition names.
+
+ Example:
+
+ flash@ff000000 {
+ device_type = "rom";
+ compatible = "physmap";
+ reg = <ff000000 01000000>;
+ bank-width = <4>;
+ partitions = <00000000 00f80000
+ 00f80000 00080001>;
+ partition-names = "fs\0firmware";
+ };
+
More devices will be defined as this spec matures.
Index: powerpc/arch/powerpc/sysdev/Makefile
===================================================================
--- powerpc.orig/arch/powerpc/sysdev/Makefile
+++ powerpc/arch/powerpc/sysdev/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o
obj-$(CONFIG_FSL_SOC) += fsl_soc.o
obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o
obj-$(CONFIG_QUICC_ENGINE) += qe_lib/
+obj-$(CONFIG_MTD) += flash.o
ifeq ($(CONFIG_PPC_MERGE),y)
obj-$(CONFIG_PPC_I8259) += i8259.o
Index: powerpc/arch/powerpc/sysdev/flash.c
===================================================================
--- /dev/null
+++ powerpc/arch/powerpc/sysdev/flash.c
@@ -0,0 +1,27 @@
+/*
+ * arch/powerpc/sysdev/flash.c
+ *
+ * Flash memory registration
+ *
+ * (C) 2006 MontaVista Software, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+
+#include <asm/of_device.h>
+
+static int __init powerpc_flash_init(void)
+{
+ struct device_node *node = NULL;
+ int num = 0;
+
+ while ((node = of_find_compatible_node(node, "mtd", "physmap"))
+ != NULL) {
+ of_platform_device_create(node, "physmap-flash", NULL);
+ ++num;
+ }
+ return 0;
+}
+
+arch_initcall(powerpc_flash_init);
^ permalink raw reply
* [PATCH] spufs: always map local store non-guarded
From: Arnd Bergmann @ 2006-11-02 12:46 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, linux-kernel, michaele, cbe-oss-dev
When fixing spufs to map the 'mem' file backing store cacheable,
I incorrectly set the physical mapping to use both cache-inhibited
and guarded mapping, which resulted in a serious performance
degradation.
Accessing the real local store memory needs to be cache-inhibited,
in order to maintain data consistency, but since it is actual
RAM, there is no point in a guarded mapping.
Debugged-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
---
This fixes a regression in 2.6.19, please merge.
Index: linux-2.6/arch/powerpc/platforms/cell/spufs/file.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/spufs/file.c
+++ linux-2.6/arch/powerpc/platforms/cell/spufs/file.c
@@ -104,11 +104,11 @@ spufs_mem_mmap_nopage(struct vm_area_str
if (ctx->state == SPU_STATE_SAVED) {
vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
- & ~(_PAGE_NO_CACHE | _PAGE_GUARDED));
+ & ~_PAGE_NO_CACHE);
page = vmalloc_to_page(ctx->csa.lscsa->ls + offset);
} else {
vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
- | _PAGE_NO_CACHE | _PAGE_GUARDED);
+ | _PAGE_NO_CACHE);
page = pfn_to_page((ctx->spu->local_store_phys + offset)
>> PAGE_SHIFT);
}
^ permalink raw reply
* Re: [patch 16/16] powerpc: make nvram_64.o a 64bit-only object
From: s.hauer @ 2006-11-02 12:56 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20061102125555.252338000@localhost.localdomain>
Make nvram_64.o dependent on 64bit, not on MULTIPLATFORM
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Index: arch/powerpc/kernel/Makefile
===================================================================
--- a/arch/powerpc/kernel/Makefile.orig
+++ b/arch/powerpc/kernel/Makefile
@@ -17,7 +17,7 @@ obj-y += vdso32/
obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \
signal_64.o ptrace32.o \
paca.o cpu_setup_ppc970.o \
- firmware.o sysfs.o
+ firmware.o sysfs.o nvram_64.o
obj-$(CONFIG_PPC64) += vdso64/
obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o
obj-$(CONFIG_PPC_970_NAP) += idle_power4.o
@@ -32,7 +32,6 @@ obj-$(CONFIG_LPARCFG) += lparcfg.o
obj-$(CONFIG_IBMVIO) += vio.o
obj-$(CONFIG_IBMEBUS) += ibmebus.o
obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o
-obj64-$(CONFIG_PPC_MULTIPLATFORM) += nvram_64.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
obj-$(CONFIG_6xx) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o
obj-$(CONFIG_TAU) += tau_6xx.o
--
Dipl.-Ing. Sascha Hauer | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9
^ permalink raw reply
* Re: [patch 15/16] powerpc: clean up usage of boot_dev
From: s.hauer @ 2006-11-02 12:56 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20061102125555.252338000@localhost.localdomain>
dev_t boot_dev is declared in arch/powerpc/kernel/setup_32.c
and in arch/powerpc/kernel/setup_64.c but not used in these files.
It is only used in arch/powerpc/platforms/powermac/setup.c, so make
it static in this file
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Index: arch/powerpc/kernel/setup_32.c
===================================================================
--- a/arch/powerpc/kernel/setup_32.c.orig
+++ b/arch/powerpc/kernel/setup_32.c
@@ -63,10 +63,6 @@ unsigned int DMA_MODE_WRITE;
int have_of = 1;
-#ifdef CONFIG_PPC_MULTIPLATFORM
-dev_t boot_dev;
-#endif /* CONFIG_PPC_MULTIPLATFORM */
-
#ifdef CONFIG_VGA_CONSOLE
unsigned long vgacon_remap_base;
#endif
Index: arch/powerpc/kernel/setup_64.c
===================================================================
--- a/arch/powerpc/kernel/setup_64.c.orig
+++ b/arch/powerpc/kernel/setup_64.c
@@ -71,7 +71,6 @@
int have_of = 1;
int boot_cpuid = 0;
-dev_t boot_dev;
u64 ppc64_pft_size;
/* Pick defaults since we might want to patch instructions
Index: arch/powerpc/platforms/powermac/setup.c
===================================================================
--- a/arch/powerpc/platforms/powermac/setup.c.orig
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -361,7 +361,7 @@ char *bootdevice;
void *boot_host;
int boot_target;
int boot_part;
-extern dev_t boot_dev;
+static dev_t boot_dev;
#ifdef CONFIG_SCSI
void __init note_scsi_host(struct device_node *node, void *host)
--
Dipl.-Ing. Sascha Hauer | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9
^ permalink raw reply
* Re: [patch 13/16] powerpc: make prom_init.o dependent on PPC_OF
From: s.hauer @ 2006-11-02 12:56 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20061102125555.252338000@localhost.localdomain>
prom_init.o is used for OF machines, so make compilation dependent
on that and not on PPC_MULTIPLATFORM
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Index: arch/powerpc/kernel/Makefile
===================================================================
--- a/arch/powerpc/kernel/Makefile.orig
+++ b/arch/powerpc/kernel/Makefile
@@ -21,7 +21,7 @@ obj-$(CONFIG_PPC64) += setup_64.o binfm
obj-$(CONFIG_PPC64) += vdso64/
obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o
obj-$(CONFIG_PPC_970_NAP) += idle_power4.o
-obj-$(CONFIG_PPC_OF) += of_device.o prom_parse.o
+obj-$(CONFIG_PPC_OF) += of_device.o prom_parse.o prom_init.o
procfs-$(CONFIG_PPC64) := proc_ppc64.o
obj-$(CONFIG_PROC_FS) += $(procfs-y)
rtaspci-$(CONFIG_PPC64) := rtas_pci.o
@@ -53,7 +53,6 @@ obj-y += time.o prom.o traps.o setup-
udbg.o misc.o io.o
obj-$(CONFIG_PPC32) += entry_32.o setup_32.o misc_32.o
obj-$(CONFIG_PPC64) += misc_64.o dma_64.o iommu.o
-obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o
obj-$(CONFIG_MODULES) += ppc_ksyms.o
obj-$(CONFIG_BOOTX_TEXT) += btext.o
obj-$(CONFIG_SMP) += smp.o
--
Dipl.-Ing. Sascha Hauer | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9
^ permalink raw reply
* Re: [patch 12/16] remove PPC_MULTIPLATFORM in for config MV643XX_ETH
From: s.hauer @ 2006-11-02 12:56 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20061102125555.252338000@localhost.localdomain>
No need to depend on PPC_MULTIPLATFORM for MV643XX_ETH
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Index: drivers/net/Kconfig
===================================================================
--- a/drivers/net/Kconfig.orig
+++ b/drivers/net/Kconfig
@@ -2292,7 +2292,7 @@ config UGETH_HAS_GIGA
config MV643XX_ETH
tristate "MV-643XX Ethernet support"
- depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX || MV64360 || MOMENCO_OCELOT_3 || (PPC_MULTIPLATFORM && PPC32)
+ depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX || MV64360 || MOMENCO_OCELOT_3 || PPC32
select MII
help
This driver supports the gigabit Ethernet on the Marvell MV643XX
--
Dipl.-Ing. Sascha Hauer | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9
^ permalink raw reply
* Re: [patch 03/16] powerpc: remove dead Kconfig entries
From: s.hauer @ 2006-11-02 12:55 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20061102125555.252338000@localhost.localdomain>
Remove dead Kconfig entries in
arch/powerpc/platforms/embedded6xx/Kconfig. These can be easily patched
back in once real support for these engine is there. No need to confuse
people with these entries.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Index: linux-2.6/arch/powerpc/platforms/embedded6xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/embedded6xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -2,78 +2,6 @@ choice
prompt "Machine Type"
depends on EMBEDDED6xx
-config KATANA
- bool "Artesyn-Katana"
- help
- Select KATANA if configuring an Artesyn KATANA 750i or 3750
- cPCI board.
-
-config WILLOW
- bool "Cogent-Willow"
-
-config CPCI690
- bool "Force-CPCI690"
- help
- Select CPCI690 if configuring a Force CPCI690 cPCI board.
-
-config POWERPMC250
- bool "Force-PowerPMC250"
-
-config CHESTNUT
- bool "IBM 750FX Eval board or 750GX Eval board"
- help
- Select CHESTNUT if configuring an IBM 750FX Eval Board or a
- IBM 750GX Eval board.
-
-config SPRUCE
- bool "IBM-Spruce"
- select PPC_INDIRECT_PCI
-
-config HDPU
- bool "Sky-HDPU"
- help
- Select HDPU if configuring a Sky Computers Compute Blade.
-
-config HDPU_FEATURES
- depends HDPU
- tristate "HDPU-Features"
- help
- Select to enable HDPU enhanced features.
-
-config EV64260
- bool "Marvell-EV64260BP"
- help
- Select EV64260 if configuring a Marvell (formerly Galileo)
- EV64260BP Evaluation platform.
-
-config LOPEC
- bool "Motorola-LoPEC"
- select PPC_I8259
-
-config MVME5100
- bool "Motorola-MVME5100"
- select PPC_INDIRECT_PCI
-
-config PPLUS
- bool "Motorola-PowerPlus"
- select PPC_I8259
- select PPC_INDIRECT_PCI
-
-config PRPMC750
- bool "Motorola-PrPMC750"
- select PPC_INDIRECT_PCI
-
-config PRPMC800
- bool "Motorola-PrPMC800"
- select PPC_INDIRECT_PCI
-
-config SANDPOINT
- bool "Motorola-Sandpoint"
- select PPC_I8259
- help
- Select SANDPOINT if configuring for a Motorola Sandpoint X3
- (any flavor).
-
config MPC7448HPC2
bool "Freescale MPC7448HPC2(Taiga)"
select TSI108_BRIDGE
@@ -84,233 +12,4 @@ config MPC7448HPC2
help
Select MPC7448HPC2 if configuring for Freescale MPC7448HPC2 (Taiga)
platform
-
-config RADSTONE_PPC7D
- bool "Radstone Technology PPC7D board"
- select PPC_I8259
-
-config PAL4
- bool "SBS-Palomar4"
-
-config GEMINI
- bool "Synergy-Gemini"
- select PPC_INDIRECT_PCI
- depends on BROKEN
- help
- Select Gemini if configuring for a Synergy Microsystems' Gemini
- series Single Board Computer. More information is available at:
- <http://www.synergymicro.com/PressRel/97_10_15.html>.
-
-config EST8260
- bool "EST8260"
- ---help---
- The EST8260 is a single-board computer manufactured by Wind River
- Systems, Inc. (formerly Embedded Support Tools Corp.) and based on
- the MPC8260. Wind River Systems has a website at
- <http://www.windriver.com/>, but the EST8260 cannot be found on it
- and has probably been discontinued or rebadged.
-
-config SBC82xx
- bool "SBC82xx"
- ---help---
- SBC PowerQUICC II, single-board computer with MPC82xx CPU
- Manufacturer: Wind River Systems, Inc.
- Date of Release: May 2003
- End of Life: -
- URL: <http://www.windriver.com/>
-
-config SBS8260
- bool "SBS8260"
-
-config RPX8260
- bool "RPXSUPER"
-
-config TQM8260
- bool "TQM8260"
- ---help---
- MPC8260 based module, little larger than credit card,
- up to 128 MB global + 64 MB local RAM, 32 MB Flash,
- 32 kB EEPROM, 256 kB L@ Cache, 10baseT + 100baseT Ethernet,
- 2 x serial ports, ...
- Manufacturer: TQ Components, www.tq-group.de
- Date of Release: June 2001
- End of Life: not yet :-)
- URL: <http://www.denx.de/PDF/TQM82xx_SPEC_Rev005.pdf>
-
-config ADS8272
- bool "ADS8272"
-
-config PQ2FADS
- bool "Freescale-PQ2FADS"
- help
- Select PQ2FADS if you wish to configure for a Freescale
- PQ2FADS board (-VR or -ZU).
-
-config LITE5200
- bool "Freescale LITE5200 / (IceCube)"
- select PPC_MPC52xx
- help
- Support for the LITE5200 dev board for the MPC5200 from Freescale.
- This is for the LITE5200 version 2.0 board. Don't know if it changes
- much but it's only been tested on this board version. I think this
- board is also known as IceCube.
-
-config EV64360
- bool "Marvell-EV64360BP"
- help
- Select EV64360 if configuring a Marvell EV64360BP Evaluation
- platform.
endchoice
-
-config PQ2ADS
- bool
- depends on ADS8272
- default y
-
-config TQM8xxL
- bool
- depends on 8xx && (TQM823L || TQM850L || FPS850L || TQM855L || TQM860L)
- default y
-
-config PPC_MPC52xx
- bool
-
-config 8260
- bool "CPM2 Support" if WILLOW
- depends on 6xx
- default y if TQM8260 || RPX8260 || EST8260 || SBS8260 || SBC82xx || PQ2FADS
- help
- The MPC8260 is a typical embedded CPU made by Motorola. Selecting
- this option means that you wish to build a kernel for a machine with
- an 8260 class CPU.
-
-config 8272
- bool
- depends on 6xx
- default y if ADS8272
- select 8260
- help
- The MPC8272 CPM has a different internal dpram setup than other CPM2
- devices
-
-config CPM2
- bool
- depends on 8260 || MPC8560 || MPC8555
- default y
- help
- The CPM2 (Communications Processor Module) is a coprocessor on
- embedded CPUs made by Motorola. Selecting this option means that
- you wish to build a kernel for a machine with a CPM2 coprocessor
- on it (826x, 827x, 8560).
-
-config PPC_GEN550
- bool
- depends on SANDPOINT || SPRUCE || PPLUS || \
- PRPMC750 || PRPMC800 || LOPEC || \
- (EV64260 && !SERIAL_MPSC) || CHESTNUT || RADSTONE_PPC7D || \
- 83xx
- default y
-
-config FORCE
- bool
- depends on 6xx && POWERPMC250
- default y
-
-config GT64260
- bool
- depends on EV64260 || CPCI690
- default y
-
-config MV64360 # Really MV64360 & MV64460
- bool
- depends on CHESTNUT || KATANA || RADSTONE_PPC7D || HDPU || EV64360
- default y
-
-config MV64X60
- bool
- depends on (GT64260 || MV64360)
- select PPC_INDIRECT_PCI
- default y
-
-config TSI108_BRIDGE
- bool
- depends on MPC7448HPC2
- default y
-
-menu "Set bridge options"
- depends on MV64X60
-
-config NOT_COHERENT_CACHE
- bool "Turn off Cache Coherency"
- default n
- help
- Some 64x60 bridges lock up when trying to enforce cache coherency.
- When this option is selected, cache coherency will be turned off.
- Note that this can cause other problems (e.g., stale data being
- speculatively loaded via a cached mapping). Use at your own risk.
-
-config MV64X60_BASE
- hex "Set bridge base used by firmware"
- default "0xf1000000"
- help
- A firmware can leave the base address of the bridge's registers at
- a non-standard location. If so, set this value to reflect the
- address of that non-standard location.
-
-config MV64X60_NEW_BASE
- hex "Set bridge base used by kernel"
- default "0xf1000000"
- help
- If the current base address of the bridge's registers is not where
- you want it, set this value to the address that you want it moved to.
-
-endmenu
-
-config NONMONARCH_SUPPORT
- bool "Enable Non-Monarch Support"
- depends on PRPMC800
-
-config HARRIER
- bool
- depends on PRPMC800
- default y
-
-config EPIC_SERIAL_MODE
- bool
- depends on 6xx && (LOPEC || SANDPOINT)
- default y
-
-config MPC10X_BRIDGE
- bool
- depends on POWERPMC250 || LOPEC || SANDPOINT
- select PPC_INDIRECT_PCI
- default y
-
-config MPC10X_OPENPIC
- bool
- depends on POWERPMC250 || LOPEC || SANDPOINT
- default y
-
-config MPC10X_STORE_GATHERING
- bool "Enable MPC10x store gathering"
- depends on MPC10X_BRIDGE
-
-config SANDPOINT_ENABLE_UART1
- bool "Enable DUART mode on Sandpoint"
- depends on SANDPOINT
- help
- If this option is enabled then the MPC824x processor will run
- in DUART mode instead of UART mode.
-
-config HARRIER_STORE_GATHERING
- bool "Enable Harrier store gathering"
- depends on HARRIER
-
-config MVME5100_IPMC761_PRESENT
- bool "MVME5100 configured with an IPMC761"
- depends on MVME5100
- select PPC_I8259
-
-config SPRUCE_BAUD_33M
- bool "Spruce baud clock support"
- depends on SPRUCE
--
Dipl.-Ing. Sascha Hauer | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9
^ permalink raw reply
* mpc83xx SPI driver never calls its probe function
From: Joakim Tjernlund @ 2006-11-02 13:23 UTC (permalink / raw)
To: linuxppc-dev
I am trying to get the driver/spi/spi_mpc83xx.c driver going and I am stuck.
I have tried to add spi_board_info and a platform_device:
static struct fsl_spi_platform_data bcm_platform_data = {
.initial_spmode = 0,
.bus_num = 1,
.max_chipselect = 1,
/* board specific information */
.activate_cs = bcm_cs_activate,
.deactivate_cs = bcm_cs_deactivate,
.sysclk = 266,
};
static struct spi_board_info spi_board_info[] __initdata = { {
.modalias = "bcm5322",
.platform_data = &bcm_platform_data,
.max_speed_hz = 120000,
.bus_num = 1,
.chip_select = 0,
},
};
struct platform_device bcm_5322 = {
.name = "bcm5322",
.id = 1,
.dev = {
.platform_data = &bcm_platform_data,
},
};
and register that with
platform_device_register(&bcm_5322);
spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info))
I also got a protocol driver that does:
static struct spi_driver bcm_driver = {
.driver = {
.name = "bcm5322",
.owner = THIS_MODULE,
},
.probe = bcm_probe,
.remove = __devexit_p(bcm_remove),
};
and then calls spi_register_driver(&bcm_driver);
and I can't get the into the *probe functions. No matter what
combination I try,
the *probe functions for both the protocol driver and the spi_mpc83xx
driver are
never called.
I need some advice on how to enable my
protocol driver and the spi_mpc83xx driver.
Jocke
^ permalink raw reply
* Re: [patch 07/16] powerpc: move MPC7448HPC2 platform support to platforms/74xx
From: s.hauer @ 2006-11-02 12:56 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20061102125555.252338000@localhost.localdomain>
This patch moves the only platform support in platforms/embedded6xx to
a directory of its own. There seems to be no need for a embedded6xx
directory since they have nothing in common.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Index: arch/powerpc/platforms/74xx/Makefile
===================================================================
--- /dev/null
+++ b/arch/powerpc/platforms/74xx/Makefile
@@ -0,0 +1,4 @@
+#
+# Makefile for the 6xx/7xx/7xxxx linux kernel.
+#
+obj-$(CONFIG_MPC7448HPC2) += mpc7448_hpc2.o
Index: arch/powerpc/platforms/74xx/mpc7448_hpc2.c
===================================================================
--- /dev/null
+++ b/arch/powerpc/platforms/74xx/mpc7448_hpc2.c
@@ -0,0 +1,308 @@
+/*
+ * mpc7448_hpc2.c
+ *
+ * Board setup routines for the Freescale mpc7448hpc2(taiga) platform
+ *
+ * Author: Jacob Pan
+ * jacob.pan@freescale.com
+ * Author: Xianghua Xiao
+ * x.xiao@freescale.com
+ * Maintainer: Roy Zang <tie-fei.zang@freescale.com>
+ * Add Flat Device Tree support fot mpc7448hpc2 board
+ *
+ * Copyright 2004-2006 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.
+ */
+
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/kdev_t.h>
+#include <linux/console.h>
+#include <linux/delay.h>
+#include <linux/irq.h>
+#include <linux/ide.h>
+#include <linux/seq_file.h>
+#include <linux/root_dev.h>
+#include <linux/serial.h>
+#include <linux/tty.h>
+#include <linux/serial_core.h>
+
+#include <asm/system.h>
+#include <asm/time.h>
+#include <asm/machdep.h>
+#include <asm/prom.h>
+#include <asm/udbg.h>
+#include <asm/tsi108.h>
+#include <asm/pci-bridge.h>
+#include <asm/reg.h>
+#include <mm/mmu_decl.h>
+#include "mpc7448_hpc2.h"
+#include <asm/tsi108_irq.h>
+#include <asm/mpic.h>
+
+#undef DEBUG
+#ifdef DEBUG
+#define DBG(fmt...) do { printk(fmt); } while(0)
+#else
+#define DBG(fmt...) do { } while(0)
+#endif
+
+#ifndef CONFIG_PCI
+isa_io_base = MPC7448_HPC2_ISA_IO_BASE;
+isa_mem_base = MPC7448_HPC2_ISA_MEM_BASE;
+pci_dram_offset = MPC7448_HPC2_PCI_MEM_OFFSET;
+#endif
+
+extern int tsi108_setup_pci(struct device_node *dev);
+extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
+extern void tsi108_pci_int_init(void);
+extern void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc);
+
+int mpc7448_hpc2_exclude_device(u_char bus, u_char devfn)
+{
+ if (bus == 0 && PCI_SLOT(devfn) == 0)
+ return PCIBIOS_DEVICE_NOT_FOUND;
+ else
+ return PCIBIOS_SUCCESSFUL;
+}
+
+/*
+ * find pci slot by devfn in interrupt map of OF tree
+ */
+u8 find_slot_by_devfn(unsigned int *interrupt_map, unsigned int devfn)
+{
+ int i;
+ unsigned int tmp;
+ for (i = 0; i < 4; i++){
+ tmp = interrupt_map[i*4*7];
+ if ((tmp >> 11) == (devfn >> 3))
+ return i;
+ }
+ return i;
+}
+
+/*
+ * Scans the interrupt map for pci device
+ */
+void mpc7448_hpc2_fixup_irq(struct pci_dev *dev)
+{
+ struct pci_controller *hose;
+ struct device_node *node;
+ const unsigned int *interrupt;
+ int busnr;
+ int len;
+ u8 slot;
+ u8 pin;
+
+ /* Lookup the hose */
+ busnr = dev->bus->number;
+ hose = pci_bus_to_hose(busnr);
+ if (!hose)
+ printk(KERN_ERR "No pci hose found\n");
+
+ /* Check it has an OF node associated */
+ node = (struct device_node *) hose->arch_data;
+ if (!node)
+ printk(KERN_ERR "No pci node found\n");
+
+ interrupt = get_property(node, "interrupt-map", &len);
+ slot = find_slot_by_devfn(interrupt, dev->devfn);
+ pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
+ if (pin == 0 || pin > 4)
+ pin = 1;
+ pin--;
+ dev->irq = interrupt[slot*4*7 + pin*7 + 5];
+ DBG("TSI_PCI: dev->irq = 0x%x\n", dev->irq);
+}
+/* temporary pci irq map fixup*/
+
+void __init mpc7448_hpc2_pcibios_fixup(void)
+{
+ struct pci_dev *dev = NULL;
+ for_each_pci_dev(dev) {
+ mpc7448_hpc2_fixup_irq(dev);
+ pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
+ }
+}
+
+static void __init mpc7448_hpc2_setup_arch(void)
+{
+ struct device_node *cpu;
+ struct device_node *np;
+ if (ppc_md.progress)
+ ppc_md.progress("mpc7448_hpc2_setup_arch():set_bridge", 0);
+
+ cpu = of_find_node_by_type(NULL, "cpu");
+ if (cpu != 0) {
+ const unsigned int *fp;
+
+ fp = get_property(cpu, "clock-frequency", NULL);
+ if (fp != 0)
+ loops_per_jiffy = *fp / HZ;
+ else
+ loops_per_jiffy = 50000000 / HZ;
+ of_node_put(cpu);
+ }
+ tsi108_csr_vir_base = get_vir_csrbase();
+
+#ifdef CONFIG_ROOT_NFS
+ ROOT_DEV = Root_NFS;
+#else
+ ROOT_DEV = Root_HDA1;
+#endif
+
+#ifdef CONFIG_BLK_DEV_INITRD
+ ROOT_DEV = Root_RAM0;
+#endif
+
+ /* setup PCI host bridge */
+#ifdef CONFIG_PCI
+ for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
+ tsi108_setup_pci(np);
+
+ ppc_md.pci_exclude_device = mpc7448_hpc2_exclude_device;
+ if (ppc_md.progress)
+ ppc_md.progress("tsi108: resources set", 0x100);
+#endif
+
+ printk(KERN_INFO "MPC7448HPC2 (TAIGA) Platform\n");
+ printk(KERN_INFO
+ "Jointly ported by Freescale and Tundra Semiconductor\n");
+ printk(KERN_INFO
+ "Enabling L2 cache then enabling the HID0 prefetch engine.\n");
+}
+
+/*
+ * Interrupt setup and service. Interrrupts on the mpc7448_hpc2 come
+ * from the four external INT pins, PCI interrupts are routed via
+ * PCI interrupt control registers, it generates internal IRQ23
+ *
+ * Interrupt routing on the Taiga Board:
+ * TSI108:PB_INT[0] -> CPU0:INT#
+ * TSI108:PB_INT[1] -> CPU0:MCP#
+ * TSI108:PB_INT[2] -> N/C
+ * TSI108:PB_INT[3] -> N/C
+ */
+static void __init mpc7448_hpc2_init_IRQ(void)
+{
+ struct mpic *mpic;
+ phys_addr_t mpic_paddr = 0;
+ unsigned int cascade_pci_irq;
+ struct device_node *tsi_pci;
+ struct device_node *tsi_pic;
+
+ tsi_pic = of_find_node_by_type(NULL, "open-pic");
+ if (tsi_pic) {
+ unsigned int size;
+ const void *prop = get_property(tsi_pic, "reg", &size);
+ mpic_paddr = of_translate_address(tsi_pic, prop);
+ }
+
+ if (mpic_paddr == 0) {
+ printk("%s: No tsi108 PIC found !\n", __FUNCTION__);
+ return;
+ }
+
+ DBG("%s: tsi108pic phys_addr = 0x%x\n", __FUNCTION__,
+ (u32) mpic_paddr);
+
+ mpic = mpic_alloc(tsi_pic, mpic_paddr,
+ MPIC_PRIMARY | MPIC_BIG_ENDIAN | MPIC_WANTS_RESET |
+ MPIC_SPV_EOI | MPIC_NO_PTHROU_DIS | MPIC_REGSET_TSI108,
+ 0, /* num_sources used */
+ 0, /* num_sources used */
+ "Tsi108_PIC");
+
+ BUG_ON(mpic == NULL); /* XXXX */
+ mpic_init(mpic);
+
+ tsi_pci = of_find_node_by_type(NULL, "pci");
+ if (tsi_pci == 0) {
+ printk("%s: No tsi108 pci node found !\n", __FUNCTION__);
+ return;
+ }
+
+ cascade_pci_irq = irq_of_parse_and_map(tsi_pci, 0);
+ set_irq_data(cascade_pci_irq, mpic);
+ set_irq_chained_handler(cascade_pci_irq, tsi108_irq_cascade);
+
+ tsi108_pci_int_init();
+
+ /* Configure MPIC outputs to CPU0 */
+ tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0);
+ of_node_put(tsi_pic);
+}
+
+void mpc7448_hpc2_show_cpuinfo(struct seq_file *m)
+{
+ seq_printf(m, "vendor\t\t: Freescale Semiconductor\n");
+ seq_printf(m, "machine\t\t: MPC7448hpc2\n");
+}
+
+void mpc7448_hpc2_restart(char *cmd)
+{
+ local_irq_disable();
+
+ /* Set exception prefix high - to the firmware */
+ _nmask_and_or_msr(0, MSR_IP);
+
+ for (;;) ; /* Spin until reset happens */
+}
+
+void mpc7448_hpc2_power_off(void)
+{
+ local_irq_disable();
+ for (;;) ; /* No way to shut power off with software */
+}
+
+void mpc7448_hpc2_halt(void)
+{
+ mpc7448_hpc2_power_off();
+}
+
+/*
+ * Called very early, device-tree isn't unflattened
+ */
+static int __init mpc7448_hpc2_probe(void)
+{
+ unsigned long root = of_get_flat_dt_root();
+
+ if (!of_flat_dt_is_compatible(root, "mpc74xx"))
+ return 0;
+ return 1;
+}
+
+static int mpc7448_machine_check_exception(struct pt_regs *regs)
+{
+ extern void tsi108_clear_pci_cfg_error(void);
+ const struct exception_table_entry *entry;
+
+ /* Are we prepared to handle this fault */
+ if ((entry = search_exception_tables(regs->nip)) != NULL) {
+ tsi108_clear_pci_cfg_error();
+ regs->msr |= MSR_RI;
+ regs->nip = entry->fixup;
+ return 1;
+ }
+ return 0;
+
+}
+
+define_machine(mpc7448_hpc2){
+ .name = "MPC7448 HPC2",
+ .probe = mpc7448_hpc2_probe,
+ .setup_arch = mpc7448_hpc2_setup_arch,
+ .init_IRQ = mpc7448_hpc2_init_IRQ,
+ .show_cpuinfo = mpc7448_hpc2_show_cpuinfo,
+ .get_irq = mpic_get_irq,
+ .pcibios_fixup = mpc7448_hpc2_pcibios_fixup,
+ .restart = mpc7448_hpc2_restart,
+ .calibrate_decr = generic_calibrate_decr,
+ .machine_check_exception= mpc7448_machine_check_exception,
+ .progress = udbg_progress,
+};
Index: arch/powerpc/platforms/74xx/mpc7448_hpc2.h
===================================================================
--- /dev/null
+++ b/arch/powerpc/platforms/74xx/mpc7448_hpc2.h
@@ -0,0 +1,26 @@
+/*
+ * mpc7448_hpc2.h
+ *
+ * Definitions for Freescale MPC7448_HPC2 platform
+ *
+ * Author: Jacob Pan
+ * jacob.pan@freescale.com
+ * Maintainer: Roy Zang <roy.zang@freescale.com>
+ *
+ * 2006 (c) Freescale Semiconductor, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+
+#ifndef __PPC_PLATFORMS_MPC7448_HPC2_H
+#define __PPC_PLATFORMS_MPC7448_HPC2_H
+
+#include <asm/ppcboot.h>
+
+/* Base Addresses for the PCI bus
+ */
+#define MPC7448_HPC2_PCI_MEM_OFFSET (0x00000000)
+#define MPC7448_HPC2_ISA_IO_BASE (0x00000000)
+#define MPC7448_HPC2_ISA_MEM_BASE (0x00000000)
+#endif /* __PPC_PLATFORMS_MPC7448_HPC2_H */
Index: arch/powerpc/platforms/embedded6xx/Kconfig
===================================================================
--- a/arch/powerpc/platforms/embedded6xx/Kconfig
+++ b//dev/null
@@ -1,15 +0,0 @@
-choice
- prompt "Machine Type"
- depends on EMBEDDED6xx
-
-config MPC7448HPC2
- bool "Freescale MPC7448HPC2(Taiga)"
- select TSI108_BRIDGE
- select DEFAULT_UIMAGE
- select PPC_UDBG_16550
- select MPIC
- select MPIC_WEIRD
- help
- Select MPC7448HPC2 if configuring for Freescale MPC7448HPC2 (Taiga)
- platform
-endchoice
Index: arch/powerpc/platforms/embedded6xx/Makefile
===================================================================
--- a/arch/powerpc/platforms/embedded6xx/Makefile
+++ b//dev/null
@@ -1,4 +0,0 @@
-#
-# Makefile for the 6xx/7xx/7xxxx linux kernel.
-#
-obj-$(CONFIG_MPC7448HPC2) += mpc7448_hpc2.o
Index: arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
===================================================================
--- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
+++ b//dev/null
@@ -1,308 +0,0 @@
-/*
- * mpc7448_hpc2.c
- *
- * Board setup routines for the Freescale mpc7448hpc2(taiga) platform
- *
- * Author: Jacob Pan
- * jacob.pan@freescale.com
- * Author: Xianghua Xiao
- * x.xiao@freescale.com
- * Maintainer: Roy Zang <tie-fei.zang@freescale.com>
- * Add Flat Device Tree support fot mpc7448hpc2 board
- *
- * Copyright 2004-2006 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.
- */
-
-#include <linux/stddef.h>
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/console.h>
-#include <linux/delay.h>
-#include <linux/irq.h>
-#include <linux/ide.h>
-#include <linux/seq_file.h>
-#include <linux/root_dev.h>
-#include <linux/serial.h>
-#include <linux/tty.h>
-#include <linux/serial_core.h>
-
-#include <asm/system.h>
-#include <asm/time.h>
-#include <asm/machdep.h>
-#include <asm/prom.h>
-#include <asm/udbg.h>
-#include <asm/tsi108.h>
-#include <asm/pci-bridge.h>
-#include <asm/reg.h>
-#include <mm/mmu_decl.h>
-#include "mpc7448_hpc2.h"
-#include <asm/tsi108_irq.h>
-#include <asm/mpic.h>
-
-#undef DEBUG
-#ifdef DEBUG
-#define DBG(fmt...) do { printk(fmt); } while(0)
-#else
-#define DBG(fmt...) do { } while(0)
-#endif
-
-#ifndef CONFIG_PCI
-isa_io_base = MPC7448_HPC2_ISA_IO_BASE;
-isa_mem_base = MPC7448_HPC2_ISA_MEM_BASE;
-pci_dram_offset = MPC7448_HPC2_PCI_MEM_OFFSET;
-#endif
-
-extern int tsi108_setup_pci(struct device_node *dev);
-extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
-extern void tsi108_pci_int_init(void);
-extern void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc);
-
-int mpc7448_hpc2_exclude_device(u_char bus, u_char devfn)
-{
- if (bus == 0 && PCI_SLOT(devfn) == 0)
- return PCIBIOS_DEVICE_NOT_FOUND;
- else
- return PCIBIOS_SUCCESSFUL;
-}
-
-/*
- * find pci slot by devfn in interrupt map of OF tree
- */
-u8 find_slot_by_devfn(unsigned int *interrupt_map, unsigned int devfn)
-{
- int i;
- unsigned int tmp;
- for (i = 0; i < 4; i++){
- tmp = interrupt_map[i*4*7];
- if ((tmp >> 11) == (devfn >> 3))
- return i;
- }
- return i;
-}
-
-/*
- * Scans the interrupt map for pci device
- */
-void mpc7448_hpc2_fixup_irq(struct pci_dev *dev)
-{
- struct pci_controller *hose;
- struct device_node *node;
- const unsigned int *interrupt;
- int busnr;
- int len;
- u8 slot;
- u8 pin;
-
- /* Lookup the hose */
- busnr = dev->bus->number;
- hose = pci_bus_to_hose(busnr);
- if (!hose)
- printk(KERN_ERR "No pci hose found\n");
-
- /* Check it has an OF node associated */
- node = (struct device_node *) hose->arch_data;
- if (!node)
- printk(KERN_ERR "No pci node found\n");
-
- interrupt = get_property(node, "interrupt-map", &len);
- slot = find_slot_by_devfn(interrupt, dev->devfn);
- pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
- if (pin == 0 || pin > 4)
- pin = 1;
- pin--;
- dev->irq = interrupt[slot*4*7 + pin*7 + 5];
- DBG("TSI_PCI: dev->irq = 0x%x\n", dev->irq);
-}
-/* temporary pci irq map fixup*/
-
-void __init mpc7448_hpc2_pcibios_fixup(void)
-{
- struct pci_dev *dev = NULL;
- for_each_pci_dev(dev) {
- mpc7448_hpc2_fixup_irq(dev);
- pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
- }
-}
-
-static void __init mpc7448_hpc2_setup_arch(void)
-{
- struct device_node *cpu;
- struct device_node *np;
- if (ppc_md.progress)
- ppc_md.progress("mpc7448_hpc2_setup_arch():set_bridge", 0);
-
- cpu = of_find_node_by_type(NULL, "cpu");
- if (cpu != 0) {
- const unsigned int *fp;
-
- fp = get_property(cpu, "clock-frequency", NULL);
- if (fp != 0)
- loops_per_jiffy = *fp / HZ;
- else
- loops_per_jiffy = 50000000 / HZ;
- of_node_put(cpu);
- }
- tsi108_csr_vir_base = get_vir_csrbase();
-
-#ifdef CONFIG_ROOT_NFS
- ROOT_DEV = Root_NFS;
-#else
- ROOT_DEV = Root_HDA1;
-#endif
-
-#ifdef CONFIG_BLK_DEV_INITRD
- ROOT_DEV = Root_RAM0;
-#endif
-
- /* setup PCI host bridge */
-#ifdef CONFIG_PCI
- for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
- tsi108_setup_pci(np);
-
- ppc_md.pci_exclude_device = mpc7448_hpc2_exclude_device;
- if (ppc_md.progress)
- ppc_md.progress("tsi108: resources set", 0x100);
-#endif
-
- printk(KERN_INFO "MPC7448HPC2 (TAIGA) Platform\n");
- printk(KERN_INFO
- "Jointly ported by Freescale and Tundra Semiconductor\n");
- printk(KERN_INFO
- "Enabling L2 cache then enabling the HID0 prefetch engine.\n");
-}
-
-/*
- * Interrupt setup and service. Interrrupts on the mpc7448_hpc2 come
- * from the four external INT pins, PCI interrupts are routed via
- * PCI interrupt control registers, it generates internal IRQ23
- *
- * Interrupt routing on the Taiga Board:
- * TSI108:PB_INT[0] -> CPU0:INT#
- * TSI108:PB_INT[1] -> CPU0:MCP#
- * TSI108:PB_INT[2] -> N/C
- * TSI108:PB_INT[3] -> N/C
- */
-static void __init mpc7448_hpc2_init_IRQ(void)
-{
- struct mpic *mpic;
- phys_addr_t mpic_paddr = 0;
- unsigned int cascade_pci_irq;
- struct device_node *tsi_pci;
- struct device_node *tsi_pic;
-
- tsi_pic = of_find_node_by_type(NULL, "open-pic");
- if (tsi_pic) {
- unsigned int size;
- const void *prop = get_property(tsi_pic, "reg", &size);
- mpic_paddr = of_translate_address(tsi_pic, prop);
- }
-
- if (mpic_paddr == 0) {
- printk("%s: No tsi108 PIC found !\n", __FUNCTION__);
- return;
- }
-
- DBG("%s: tsi108pic phys_addr = 0x%x\n", __FUNCTION__,
- (u32) mpic_paddr);
-
- mpic = mpic_alloc(tsi_pic, mpic_paddr,
- MPIC_PRIMARY | MPIC_BIG_ENDIAN | MPIC_WANTS_RESET |
- MPIC_SPV_EOI | MPIC_NO_PTHROU_DIS | MPIC_REGSET_TSI108,
- 0, /* num_sources used */
- 0, /* num_sources used */
- "Tsi108_PIC");
-
- BUG_ON(mpic == NULL); /* XXXX */
- mpic_init(mpic);
-
- tsi_pci = of_find_node_by_type(NULL, "pci");
- if (tsi_pci == 0) {
- printk("%s: No tsi108 pci node found !\n", __FUNCTION__);
- return;
- }
-
- cascade_pci_irq = irq_of_parse_and_map(tsi_pci, 0);
- set_irq_data(cascade_pci_irq, mpic);
- set_irq_chained_handler(cascade_pci_irq, tsi108_irq_cascade);
-
- tsi108_pci_int_init();
-
- /* Configure MPIC outputs to CPU0 */
- tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0);
- of_node_put(tsi_pic);
-}
-
-void mpc7448_hpc2_show_cpuinfo(struct seq_file *m)
-{
- seq_printf(m, "vendor\t\t: Freescale Semiconductor\n");
- seq_printf(m, "machine\t\t: MPC7448hpc2\n");
-}
-
-void mpc7448_hpc2_restart(char *cmd)
-{
- local_irq_disable();
-
- /* Set exception prefix high - to the firmware */
- _nmask_and_or_msr(0, MSR_IP);
-
- for (;;) ; /* Spin until reset happens */
-}
-
-void mpc7448_hpc2_power_off(void)
-{
- local_irq_disable();
- for (;;) ; /* No way to shut power off with software */
-}
-
-void mpc7448_hpc2_halt(void)
-{
- mpc7448_hpc2_power_off();
-}
-
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init mpc7448_hpc2_probe(void)
-{
- unsigned long root = of_get_flat_dt_root();
-
- if (!of_flat_dt_is_compatible(root, "mpc74xx"))
- return 0;
- return 1;
-}
-
-static int mpc7448_machine_check_exception(struct pt_regs *regs)
-{
- extern void tsi108_clear_pci_cfg_error(void);
- const struct exception_table_entry *entry;
-
- /* Are we prepared to handle this fault */
- if ((entry = search_exception_tables(regs->nip)) != NULL) {
- tsi108_clear_pci_cfg_error();
- regs->msr |= MSR_RI;
- regs->nip = entry->fixup;
- return 1;
- }
- return 0;
-
-}
-
-define_machine(mpc7448_hpc2){
- .name = "MPC7448 HPC2",
- .probe = mpc7448_hpc2_probe,
- .setup_arch = mpc7448_hpc2_setup_arch,
- .init_IRQ = mpc7448_hpc2_init_IRQ,
- .show_cpuinfo = mpc7448_hpc2_show_cpuinfo,
- .get_irq = mpic_get_irq,
- .pcibios_fixup = mpc7448_hpc2_pcibios_fixup,
- .restart = mpc7448_hpc2_restart,
- .calibrate_decr = generic_calibrate_decr,
- .machine_check_exception= mpc7448_machine_check_exception,
- .progress = udbg_progress,
-};
Index: arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h
===================================================================
--- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h
+++ b//dev/null
@@ -1,26 +0,0 @@
-/*
- * mpc7448_hpc2.h
- *
- * Definitions for Freescale MPC7448_HPC2 platform
- *
- * Author: Jacob Pan
- * jacob.pan@freescale.com
- * Maintainer: Roy Zang <roy.zang@freescale.com>
- *
- * 2006 (c) Freescale Semiconductor, Inc. This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
- */
-
-#ifndef __PPC_PLATFORMS_MPC7448_HPC2_H
-#define __PPC_PLATFORMS_MPC7448_HPC2_H
-
-#include <asm/ppcboot.h>
-
-/* Base Addresses for the PCI bus
- */
-#define MPC7448_HPC2_PCI_MEM_OFFSET (0x00000000)
-#define MPC7448_HPC2_ISA_IO_BASE (0x00000000)
-#define MPC7448_HPC2_ISA_MEM_BASE (0x00000000)
-#endif /* __PPC_PLATFORMS_MPC7448_HPC2_H */
Index: arch/powerpc/platforms/Makefile
===================================================================
--- a/arch/powerpc/platforms/Makefile.orig
+++ b/arch/powerpc/platforms/Makefile
@@ -15,4 +15,4 @@ obj-$(CONFIG_PPC_ISERIES) += iseries/
obj-$(CONFIG_PPC_MAPLE) += maple/
obj-$(CONFIG_PPC_PASEMI) += pasemi/
obj-$(CONFIG_PPC_CELL) += cell/
-obj-$(CONFIG_EMBEDDED6xx) += embedded6xx/
+obj-$(CONFIG_74xx) += 74xx/
Index: arch/powerpc/Kconfig
===================================================================
--- a/arch/powerpc/Kconfig.orig
+++ b/arch/powerpc/Kconfig
@@ -602,7 +602,6 @@ config PPC_TODC
endmenu
-source arch/powerpc/platforms/embedded6xx/Kconfig
source arch/powerpc/platforms/4xx/Kconfig
source arch/powerpc/platforms/82xx/Kconfig
source arch/powerpc/platforms/83xx/Kconfig
--
Dipl.-Ing. Sascha Hauer | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9
^ permalink raw reply
* Re: [patch 01/16] remove inclusion of asm/processor.h for powerpc
From: s.hauer @ 2006-11-02 12:55 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20061102125555.252338000@localhost.localdomain>
Remove inclusion of asm/processor.h for powerpc. It was used for
some ppc specific hook in this file, but the hook is gone
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Index: linux-2.6/drivers/ide/pci/via82cxxx.c
===================================================================
--- linux-2.6.orig/drivers/ide/pci/via82cxxx.c
+++ linux-2.6/drivers/ide/pci/via82cxxx.c
@@ -35,10 +35,6 @@
#include <linux/ide.h>
#include <asm/io.h>
-#ifdef CONFIG_PPC_MULTIPLATFORM
-#include <asm/processor.h>
-#endif
-
#include "ide-timing.h"
#define DISPLAY_VIA_TIMINGS
--
Dipl.-Ing. Sascha Hauer | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9
^ 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