* Re: [PATCH] powerpc: Don't use generic machine check parsing everywhere
From: Paul Mackerras @ 2007-09-10 20:58 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev
In-Reply-To: <20070905024159.GB27139@lixom.net>
Olof Johansson writes:
> If a platform provide it's own machine check handler, assume that code
> will handle the reason parsing and reporting the error. The current
> default fall-though only makes sense on a few 32-bit platforms that
> lack individual handlers.
Might be nice to put that code into a function of its own, called
print_6xx_machine_check or something similar.
Paul.
^ permalink raw reply
* Re: [PATCH 02/10] cpm2: Fix off-by-one error in setbrg().
From: Kumar Gala @ 2007-09-10 21:07 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <46E59E9E.30707@freescale.com>
On Sep 10, 2007, at 2:44 PM, Scott Wood wrote:
> Kumar Gala wrote:
>> On Sep 5, 2007, at 2:29 PM, Scott Wood wrote:
>>> The hardware adds one to the BRG value to get the divider, so it
>>> must
>>> be subtracted by software. Without this patch, characters will
>>> occasionally
>>> be corrupted.
>>>
>>> Signed-off-by: Scott Wood <scottwood@freescale.com>
>>> ---
>>> arch/powerpc/sysdev/cpm2_common.c | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>> What was this patch against?
>> I ended up applying it by hand for 2.6.23 since its fixing a
>> bug.. But, I'm wondering if there was a base set of changes this
>> patchset was against?
>
> It was against head-of-your-tree as of the time I sent it.
Odd, my top of tree doesn't use out_be32() for cpm_setbrg().
- k
^ permalink raw reply
* Re: [PATCH 02/10] cpm2: Fix off-by-one error in setbrg().
From: Scott Wood @ 2007-09-10 21:07 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <5275D8E2-1DF2-4E2E-B9AC-7E085E69BF72@kernel.crashing.org>
Kumar Gala wrote:
>
> On Sep 10, 2007, at 2:44 PM, Scott Wood wrote:
>
>> Kumar Gala wrote:
>>> On Sep 5, 2007, at 2:29 PM, Scott Wood wrote:
>>>> The hardware adds one to the BRG value to get the divider, so it must
>>>> be subtracted by software. Without this patch, characters will
>>>> occasionally
>>>> be corrupted.
>>>>
>>>> Signed-off-by: Scott Wood <scottwood@freescale.com>
>>>> ---
>>>> arch/powerpc/sysdev/cpm2_common.c | 2 +-
>>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>> What was this patch against?
>>> I ended up applying it by hand for 2.6.23 since its fixing a bug..
>>> But, I'm wondering if there was a base set of changes this patchset
>>> was against?
>>
>> It was against head-of-your-tree as of the time I sent it.
>
> Odd, my top of tree doesn't use out_be32() for cpm_setbrg().
That was done by patch 01/10. :-)
-Scott
^ permalink raw reply
* Re: [PATCH 08/10] bootwrapper: Add a firmware-independent "raw" target.
From: Segher Boessenkool @ 2007-09-10 21:17 UTC (permalink / raw)
To: Milton Miller; +Cc: ppcdev, David Gibson
In-Reply-To: <d16e868937a1f77cbf080754f5742ad9@bga.com>
>>> +static inline void disable_irq(void)
>>> +{
>>> + int dummy;
>>> + asm volatile("mfmsr %0; rlwinm %0, %0, 0, ~(1<<15); mtmsr %0"
>>> :
>>> + "=r" (dummy) : : "memory");
>>> +}
>
> This will fail (mtmsr illegal instruction) on 64 bit processors that do
> not implement the bridge facility (POWER4, 5, 6, PPC970, ...)
The latest ISA lists mtmsr as non-optional, not part of the bridge
facility. That suggests that all CPUs do in fact implement it.
970 does implement the 64-bit bridge facility, btw (well, "most of it").
Segher
^ permalink raw reply
* Please pull from 'for-2.6.23'
From: Kumar Gala @ 2007-09-10 21:32 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
Please pull from 'for-2.6.23' branch of
master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git for-2.6.23
to receive the following updates:
arch/powerpc/platforms/85xx/mpc8544_ds.c | 2 ++
arch/powerpc/platforms/85xx/mpc85xx_cds.c | 2 +-
arch/powerpc/platforms/85xx/mpc85xx_mds.c | 2 ++
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 2 ++
arch/powerpc/platforms/Kconfig | 1 +
arch/powerpc/sysdev/cpm2_common.c | 2 +-
arch/ppc/kernel/head_8xx.S | 2 --
7 files changed, 9 insertions(+), 4 deletions(-)
Jochen Friedrich (1):
[PPC] 8xx: Fix r3 trashing due to 8MB TLB page instantiation
Kumar Gala (2):
[POWERPC] 8{5,6}xx: Fix build issue with !CONFIG_PCI
[POWERPC] Enable GENERIC_ISA_DMA if FSL_ULI1575
Scott Wood (1):
[POWERPC] cpm2: Fix off-by-one error in setbrg().
commit 8fb427e656e2379f295d18134ef1f2cc924e994c
Author: Kumar Gala <galak@kernel.crashing.org>
Date: Mon Sep 10 14:57:34 2007 -0500
[POWERPC] Enable GENERIC_ISA_DMA if FSL_ULI1575
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
commit 83fcdb4b352f74a8a74737aedeaf622c37140c73
Author: Scott Wood <scottwood@freescale.com>
Date: Wed Sep 5 14:29:10 2007 -0500
[POWERPC] cpm2: Fix off-by-one error in setbrg().
The hardware adds one to the BRG value to get the divider, so it must
be subtracted by software. Without this patch, characters will occasionally
be corrupted.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
commit 36c50f729b77144cae8d43457fefca66a4eeff6a
Author: Jochen Friedrich <jochen@scram.de>
Date: Tue Aug 28 13:20:48 2007 +0200
[PPC] 8xx: Fix r3 trashing due to 8MB TLB page instantiation
Instantiation of 8MB pages on the TLB cache for the kernel static
mapping trashes r3 register on !CONFIG_8xx_CPU6 configurations.
This ensures r3 gets saved and restored.
This has been posted to linuxppc-embedded by Marcelo Tosatti
<marcelo@kvack.org>, but only an incomplete version of the patch
has been applied in c51e078f82096a7d35ac8ec2416272e843a0e1c4.
This patch adds the rest of the fix.
Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
commit 2af8569dc9f29c303bf4aa012d991afcfaeed0c3
Author: Kumar Gala <galak@kernel.crashing.org>
Date: Mon Sep 10 14:30:33 2007 -0500
[POWERPC] 8{5,6}xx: Fix build issue with !CONFIG_PCI
We needed some ifdef CONFIG_PCI protection for pcibios_fixup so we
can build !CONFIG_PCI.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
diff --git a/arch/powerpc/platforms/85xx/mpc8544_ds.c b/arch/powerpc/platforms/85xx/mpc8544_ds.c
index 0f834d8..48983bc 100644
--- a/arch/powerpc/platforms/85xx/mpc8544_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc8544_ds.c
@@ -178,7 +178,9 @@ define_machine(mpc8544_ds) {
.probe = mpc8544_ds_probe,
.setup_arch = mpc8544_ds_setup_arch,
.init_IRQ = mpc8544_ds_pic_init,
+#ifdef CONFIG_PCI
.pcibios_fixup_bus = fsl_pcibios_fixup_bus,
+#endif
.get_irq = mpic_get_irq,
.restart = mpc85xx_restart,
.calibrate_decr = generic_calibrate_decr,
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 6a171e9..2d4cb78 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -351,10 +351,10 @@ define_machine(mpc85xx_cds) {
.get_irq = mpic_get_irq,
#ifdef CONFIG_PCI
.restart = mpc85xx_cds_restart,
+ .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
#else
.restart = mpc85xx_restart,
#endif
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
- .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
};
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index be25ecd..7ca7e67 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -207,5 +207,7 @@ define_machine(mpc85xx_mds) {
.restart = mpc85xx_restart,
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
+#ifdef CONFIG_PCI
.pcibios_fixup_bus = fsl_pcibios_fixup_bus,
+#endif
};
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 56b27ca..47aafa7 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -250,5 +250,7 @@ define_machine(mpc86xx_hpcn) {
.time_init = mpc86xx_time_init,
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
+#ifdef CONFIG_PCI
.pcibios_fixup_bus = fsl_pcibios_fixup_bus,
+#endif
};
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index cfc2497..19d4628 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -285,6 +285,7 @@ config AXON_RAM
config FSL_ULI1575
bool
default n
+ select GENERIC_ISA_DMA
help
Supports for the ULI1575 PCIe south bridge that exists on some
Freescale reference boards. The boards all use the ULI in pretty
diff --git a/arch/powerpc/sysdev/cpm2_common.c b/arch/powerpc/sysdev/cpm2_common.c
index 9244129..c827715 100644
--- a/arch/powerpc/sysdev/cpm2_common.c
+++ b/arch/powerpc/sysdev/cpm2_common.c
@@ -102,7 +102,7 @@ cpm_setbrg(uint brg, uint rate)
brg -= 4;
}
bp += brg;
- *bp = ((BRG_UART_CLK / rate) << 1) | CPM_BRG_EN;
+ out_be32(bp, (((BRG_UART_CLK / rate) - 1) << 1) | CPM_BRG_EN);
cpm2_unmap(bp);
}
diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S
index 944c35c..eb8d26f 100644
--- a/arch/ppc/kernel/head_8xx.S
+++ b/arch/ppc/kernel/head_8xx.S
@@ -495,9 +495,7 @@ LoadLargeDTLB:
lwz r11, 4(r0)
lwz r12, 16(r0)
-#ifdef CONFIG_8xx_CPU6
lwz r3, 8(r0)
-#endif
rfi
/* This is the data TLB error on the MPC8xx. This could be due to
^ permalink raw reply related
* Re: [PATCH] export new __io{re,un}map_at() symbols
From: Paul Mackerras @ 2007-09-10 21:57 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev
In-Reply-To: <20070831035851.GA24414@lixom.net>
Olof Johansson writes:
> Export new __io{re,un}map_at() symbols so modules can use them.
What module wants to use these? How is it going to work out what
effective address to use?
Paul.
^ permalink raw reply
* RE: futex priority based wakeup
From: Benedict, Michael @ 2007-09-10 21:41 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <000e01c7f177$05ab1990$3a0d10ac@Radstone.Local>
Ilya Lipovsky wrote:
> Your code looks correct to me, so if the kernel developers
> did their job
> correctly, the only potentially weak link is glibc.
>=20
Well, either the kernel developers didn't do their job, or I am missing
something. The following also fails, and it should be bypassing glibc:
#define _XOPEN_SOURCE 600
#include <linux/futex.h>
#include <sys/time.h>
#include <asm/atomic.h>
#include <sys/syscall.h>
#include <unistd.h>
#include <sched.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int myfutex =3D 0;
void *important(void *ign)
{
sleep(1);
printf("important waiting for futex\n");
fflush(stdout);
if(syscall(SYS_futex, &myfutex, FUTEX_WAIT, 0, NULL)) {
perror("futex");
exit(1);
} else {
printf("important got futex!\n");
fflush(stdout);
syscall(SYS_futex, &myfutex, FUTEX_WAKE, 1, NULL);
}
return NULL;
}
void *unimportant(void *ign)
{
printf("unimportant waiting for futex\n");
fflush(stdout);
if(syscall(SYS_futex, &myfutex, FUTEX_WAIT, 0, NULL)) {
perror("futex");
exit(1);
} else {
printf("unimportant got futex!\n");
fflush(stdout);
syscall(SYS_futex, &myfutex, FUTEX_WAKE, 1, NULL);
}
return NULL;
}
int main()
{
struct sched_param p;
pthread_attr_t attr;
pthread_t i, u;
p.__sched_priority =3D sched_get_priority_min(SCHED_FIFO);
if(-1 =3D=3D p.__sched_priority) {
perror("sched_get_priority_min");
return 1;
}
pthread_attr_init(&attr);
pthread_attr_setschedpolicy(&attr, SCHED_FIFO);
pthread_attr_setschedparam(&attr, &p);
pthread_create(&u, &attr, unimportant, NULL);
p.__sched_priority =3D sched_get_priority_max(SCHED_FIFO);
pthread_attr_setschedparam(&attr, &p);
pthread_create(&i, &attr, important, NULL);
sleep(5);
printf("futex FUTEX_WAKE\n");
fflush(stdout);
syscall(SYS_futex, &myfutex, FUTEX_WAKE, 1, NULL);
pthread_join(u, NULL);
pthread_join(i, NULL);
return 0;
}
Which produces:
unimportant waiting for futex
important waiting for futex
futex FUTEX_WAKE
unimportant got futex!
important got futex!
Could someone with 2.6.22 please verify? =20
^ permalink raw reply
* Re: [PATCH] export new __io{re,un}map_at() symbols
From: Olof Johansson @ 2007-09-10 22:41 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <18149.48608.754709.782967@cargo.ozlabs.ibm.com>
Hi,
On Tue, Sep 11, 2007 at 07:57:52AM +1000, Paul Mackerras wrote:
> Olof Johansson writes:
>
> > Export new __io{re,un}map_at() symbols so modules can use them.
>
> What module wants to use these? How is it going to work out what
> effective address to use?
electra_cf uses it, that driver is currently in -mm including below
update to use benh's rewritten interfaces:
http://patchwork.ozlabs.org/linuxppc/patch?id=13237
It gets the effective addresses to use out of the device tree.
-Olof
^ permalink raw reply
* [PATCH] add Vitaly as PPC8xx maintainer
From: Marcelo Tosatti @ 2007-09-10 22:46 UTC (permalink / raw)
To: Paul Mackerras, Vitaly Bordug; +Cc: linux-ppc-embedded
Hi Paul,
Vitaly has been doing most of the 8xx maintenance work.
Please apply, thanks.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
diff --git a/MAINTAINERS b/MAINTAINERS
index a723adc..318792b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2219,6 +2219,8 @@ L: linuxppc-embedded@ozlabs.org
S: Maintained
LINUX FOR POWERPC EMBEDDED PPC8XX
+P: Vitaly Bordug
+M: vitb@kernel.crashing.org
P: Marcelo Tosatti
M: marcelo@kvack.org
W: http://www.penguinppc.org/
^ permalink raw reply related
* Re: [PATCH] export new __io{re,un}map_at() symbols
From: Paul Mackerras @ 2007-09-10 23:10 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev
In-Reply-To: <20070910224136.GA28808@lixom.net>
Olof Johansson writes:
> electra_cf uses it, that driver is currently in -mm including below
> update to use benh's rewritten interfaces:
>
> http://patchwork.ozlabs.org/linuxppc/patch?id=13237
>
> It gets the effective addresses to use out of the device tree.
Huh? What does firmware (or the device tree) know about how the
kernel uses effective addresses?
Paul.
^ permalink raw reply
* Re: Which 2.6 kernel for MPC5200
From: Jon Smirl @ 2007-09-10 23:22 UTC (permalink / raw)
To: Grant Likely; +Cc: Babarovic Ivica, linuxppc-embedded
In-Reply-To: <fa686aa40709101120u1310845et866b8fa6df7c5154@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]
On 9/10/07, Grant Likely <grant.likely@secretlab.ca> wrote:
> On 9/10/07, Babarovic Ivica <ivica.babarovic@asist.si> wrote:
> > Hi!
> >
> > What kernel should I get/pull for MPC5200 clone board.
> > I've been away from coding on mpc5200 for quite some time now.
> > I've read some archives from ML.
> > Git repo on Sylvain Munauts url:
> > http://gitbits.246tNt.com/gitbits/linux-2.6-mpc52xx.gitpage
> > isn't working. Nothing on http://*git*.secretlab.ca/cgi-bin/*gitweb*.cgi
> > <http://git.secretlab.ca/cgi-bin/gitweb.cgi> to.
> >
> > I've pulled the sources from kernel.org git server.
> > git clone
> > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> > linux-2.6-mpc52xx
>
> My 52xx git tree became way out of date, so I dropped it from the
> server. Best bet is to use mainline which gives your everything
> except the drivers that use the bestcomm DMA engine (like Ethernet).
>
> Then you need to apply the bestcomm patches. You can get them here:
>
> http://www.246tnt.com/mpc52xx/dev_full/
I just finished rebasing the Efika version of those patches to current mainline.
I'm working on merging support for my Phytec pcm030 into them.
After I get stable the plan is to switch over to Domon's new FEC driver.
>
> Have fun,
> g.
>
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
> grant.likely@secretlab.ca
> (403) 399-0195
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
--
Jon Smirl
jonsmirl@gmail.com
[-- Attachment #2: mpc.tgz --]
[-- Type: application/x-gzip, Size: 45497 bytes --]
^ permalink raw reply
* Re: [PATCH] export new __io{re,un}map_at() symbols
From: Olof Johansson @ 2007-09-10 23:34 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <18149.52956.875510.937857@cargo.ozlabs.ibm.com>
On Tue, Sep 11, 2007 at 09:10:20AM +1000, Paul Mackerras wrote:
> Olof Johansson writes:
>
> > electra_cf uses it, that driver is currently in -mm including below
> > update to use benh's rewritten interfaces:
> >
> > http://patchwork.ozlabs.org/linuxppc/patch?id=13237
> >
> > It gets the effective addresses to use out of the device tree.
>
> Huh? What does firmware (or the device tree) know about how the
> kernel uses effective addresses?
Oh, sorry, of course it doesn't (I was thinking of the physical address
but writing effective).
I get effective address by allocating it with __get_vm_area same way
the pseries pci hotplug does:
area = __get_vm_area(cf->io_size, 0, PHB_IO_BASE, PHB_IO_END);
if (area == NULL)
return -ENOMEM;
cf->io_virt = (void __iomem *)(area->addr);
-Olof
^ permalink raw reply
* Re: [PATCH 1/3] fsl_soc.c cleanup
From: Kumar Gala @ 2007-09-11 5:35 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20070828201618.GA24210@ld0162-tx32.am.freescale.net>
On Aug 28, 2007, at 3:16 PM, Scott Wood wrote:
> 1. Fix get_immrbase() to use ranges, rather than reg.
>
> It is not always the case that the SoC's first reg property points
> to the beginning of the entire SoC block.
when is this true?
Upon further testing this breaks some platforms. I don't think
assuming the first range entry is mapping to the SOC register space
is a good idea.
I've dropped this portion of the patch from my tree for the time being.
- k
^ permalink raw reply
* [PATCH] [POWERPC] 85xx: Add basic Uniprocessor MPC8572 DS port
From: Kumar Gala @ 2007-09-11 6:29 UTC (permalink / raw)
To: linuxppc-dev
Added basic board port for MPC8572 DS reference platform that is
similiar to the MPC8544/33 DS reference platform in uniprocessor mode.
---
Posted here for review. Patch exists in my for-2.6.24 branch. Removed
defconfig to reduce patch review size.
arch/powerpc/boot/dts/mpc8572ds.dts | 378 ++++++++
arch/powerpc/configs/mpc8572_ds_defconfig | 1496 +++++++++++++++++++++++++++++
arch/powerpc/platforms/85xx/mpc85xx_ds.c | 31 +
arch/powerpc/sysdev/fsl_pci.c | 2 +
include/linux/pci_ids.h | 5 +-
5 files changed, 1910 insertions(+), 2 deletions(-)
create mode 100644 arch/powerpc/boot/dts/mpc8572ds.dts
create mode 100644 arch/powerpc/configs/mpc8572_ds_defconfig
diff --git a/arch/powerpc/boot/dts/mpc8572ds.dts b/arch/powerpc/boot/dts/mpc8572ds.dts
new file mode 100644
index 0000000..9d23561
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8572ds.dts
@@ -0,0 +1,378 @@
+/*
+ * MPC8572 DS Device Tree Source
+ *
+ * Copyright 2007 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.
+ */
+
+/ {
+ model = "MPC8572DS";
+ compatible = "MPC8572DS", "MPC85xxDS";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cpus {
+ #cpus = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ PowerPC,8572@0 {
+ device_type = "cpu";
+ reg = <0>;
+ d-cache-line-size = <20>; // 32 bytes
+ i-cache-line-size = <20>; // 32 bytes
+ d-cache-size = <8000>; // L1, 32K
+ i-cache-size = <8000>; // L1, 32K
+ timebase-frequency = <0>;
+ bus-frequency = <0>;
+ clock-frequency = <0>;
+ 32-bit;
+ };
+ };
+
+ memory {
+ device_type = "memory";
+ reg = <00000000 00000000>; // Filled by U-Boot
+ };
+
+ soc8572@ffe00000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ #interrupt-cells = <2>;
+ device_type = "soc";
+ ranges = <00000000 ffe00000 00100000
+ 80000000 80000000 20000000
+ a0000000 a0000000 20000000
+ c0000000 c0000000 20000000
+ ffc00000 ffc00000 00010000
+ ffc10000 ffc10000 00010000
+ ffc20000 ffc20000 00010000>;
+
+ reg = <ffe00000 00001000>; // CCSRBAR 1M
+ bus-frequency = <0>; // Filled out by uboot.
+
+ memory-controller@2000 {
+ compatible = "fsl,8572-memory-controller";
+ reg = <2000 1000>;
+ interrupt-parent = <&mpic>;
+ interrupts = <12 2>;
+ };
+
+ l2-cache-controller@20000 {
+ compatible = "fsl,8572-l2-cache-controller";
+ reg = <20000 1000>;
+ cache-line-size = <20>; // 32 bytes
+ cache-size = <80000>; // L2, 512K
+ interrupt-parent = <&mpic>;
+ interrupts = <10 2>;
+ };
+
+ i2c@3000 {
+ device_type = "i2c";
+ compatible = "fsl-i2c";
+ reg = <3000 100>;
+ interrupts = <2b 2>;
+ interrupt-parent = <&mpic>;
+ dfsrr;
+ };
+
+ mdio@24520 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ device_type = "mdio";
+ compatible = "gianfar";
+ reg = <24520 20>;
+ phy0: ethernet-phy@0 {
+ interrupt-parent = <&mpic>;
+ interrupts = <a 1>;
+ reg = <0>;
+ device_type = "ethernet-phy";
+ };
+ phy1: ethernet-phy@1 {
+ interrupt-parent = <&mpic>;
+ interrupts = <a 1>;
+ reg = <1>;
+ device_type = "ethernet-phy";
+ };
+ phy2: ethernet-phy@2 {
+ interrupt-parent = <&mpic>;
+ interrupts = <a 1>;
+ reg = <2>;
+ device_type = "ethernet-phy";
+ };
+ phy3: ethernet-phy@3 {
+ interrupt-parent = <&mpic>;
+ interrupts = <a 1>;
+ reg = <3>;
+ device_type = "ethernet-phy";
+ };
+ };
+
+ ethernet@24000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ device_type = "network";
+ model = "eTSEC";
+ compatible = "gianfar";
+ reg = <24000 1000>;
+ local-mac-address = [ 00 00 00 00 00 00 ];
+ interrupts = <1d 2 1e 2 22 2>;
+ interrupt-parent = <&mpic>;
+ phy-handle = <&phy0>;
+ phy-connection-type = "rgmii-id";
+ };
+
+ ethernet@25000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ device_type = "network";
+ model = "eTSEC";
+ compatible = "gianfar";
+ reg = <25000 1000>;
+ local-mac-address = [ 00 00 00 00 00 00 ];
+ interrupts = <23 2 24 2 28 2>;
+ interrupt-parent = <&mpic>;
+ phy-handle = <&phy1>;
+ phy-connection-type = "rgmii-id";
+ };
+
+ ethernet@26000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ device_type = "network";
+ model = "eTSEC";
+ compatible = "gianfar";
+ reg = <26000 1000>;
+ local-mac-address = [ 00 00 00 00 00 00 ];
+ interrupts = <1f 2 20 2 21 2>;
+ interrupt-parent = <&mpic>;
+ phy-handle = <&phy2>;
+ phy-connection-type = "rgmii-id";
+ };
+
+ ethernet@27000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ device_type = "network";
+ model = "eTSEC";
+ compatible = "gianfar";
+ reg = <27000 1000>;
+ local-mac-address = [ 00 00 00 00 00 00 ];
+ interrupts = <25 2 26 2 27 2>;
+ interrupt-parent = <&mpic>;
+ phy-handle = <&phy3>;
+ phy-connection-type = "rgmii-id";
+ };
+
+ serial@4500 {
+ device_type = "serial";
+ compatible = "ns16550";
+ reg = <4500 100>;
+ clock-frequency = <0>;
+ interrupts = <2a 2>;
+ interrupt-parent = <&mpic>;
+ };
+
+ serial@4600 {
+ device_type = "serial";
+ compatible = "ns16550";
+ reg = <4600 100>;
+ clock-frequency = <0>;
+ interrupts = <2a 2>;
+ interrupt-parent = <&mpic>;
+ };
+
+ pcie@8000 {
+ compatible = "fsl,mpc8641-pcie";
+ device_type = "pci";
+ #interrupt-cells = <1>;
+ #size-cells = <2>;
+ #address-cells = <3>;
+ reg = <8000 1000>;
+ bus-range = <0 ff>;
+ ranges = <02000000 0 80000000 80000000 0 20000000
+ 01000000 0 00000000 ffc00000 0 00010000>;
+ clock-frequency = <1fca055>;
+ interrupt-parent = <&mpic>;
+ interrupts = <18 2>;
+ interrupt-map-mask = <fb00 0 0 0>;
+ interrupt-map = <
+ /* IDSEL 0x11 - PCI slot 1 */
+ 8800 0 0 1 &mpic 2 1
+ 8800 0 0 2 &mpic 3 1
+ 8800 0 0 3 &mpic 4 1
+ 8800 0 0 4 &mpic 1 1
+
+ /* IDSEL 0x12 - PCI slot 2 */
+ 9000 0 0 1 &mpic 3 1
+ 9000 0 0 2 &mpic 4 1
+ 9000 0 0 3 &mpic 1 1
+ 9000 0 0 4 &mpic 2 1
+
+ // IDSEL 0x1c USB
+ e000 0 0 0 &i8259 c 2
+ e100 0 0 0 &i8259 9 2
+ e200 0 0 0 &i8259 a 2
+ e300 0 0 0 &i8259 b 2
+
+ // IDSEL 0x1d Audio
+ e800 0 0 0 &i8259 6 2
+
+ // IDSEL 0x1e Legacy
+ f000 0 0 0 &i8259 7 2
+ f100 0 0 0 &i8259 7 2
+
+ // IDSEL 0x1f IDE/SATA
+ f800 0 0 0 &i8259 e 2
+ f900 0 0 0 &i8259 5 2
+
+ >;
+ uli1575@0 {
+ reg = <0 0 0 0 0>;
+ #size-cells = <2>;
+ #address-cells = <3>;
+ ranges = <02000000 0 80000000
+ 02000000 0 80000000
+ 0 20000000
+ 01000000 0 00000000
+ 01000000 0 00000000
+ 0 00100000>;
+
+ pci_bridge@0 {
+ reg = <0 0 0 0 0>;
+ #size-cells = <2>;
+ #address-cells = <3>;
+ ranges = <02000000 0 80000000
+ 02000000 0 80000000
+ 0 20000000
+ 01000000 0 00000000
+ 01000000 0 00000000
+ 0 00100000>;
+
+ isa@1e {
+ device_type = "isa";
+ #interrupt-cells = <2>;
+ #size-cells = <1>;
+ #address-cells = <2>;
+ reg = <f000 0 0 0 0>;
+ ranges = <1 0 01000000 0 0
+ 00001000>;
+ interrupt-parent = <&i8259>;
+
+ i8259: interrupt-controller@20 {
+ reg = <1 20 2
+ 1 a0 2
+ 1 4d0 2>;
+ clock-frequency = <0>;
+ interrupt-controller;
+ device_type = "interrupt-controller";
+ #address-cells = <0>;
+ #interrupt-cells = <2>;
+ built-in;
+ compatible = "chrp,iic";
+ interrupts = <9 2>;
+ interrupt-parent =
+ <&mpic>;
+ };
+
+ i8042@60 {
+ #size-cells = <0>;
+ #address-cells = <1>;
+ reg = <1 60 1 1 64 1>;
+ interrupts = <1 3 c 3>;
+ interrupt-parent =
+ <&i8259>;
+
+ keyboard@0 {
+ reg = <0>;
+ compatible = "pnpPNP,303";
+ };
+
+ mouse@1 {
+ reg = <1>;
+ compatible = "pnpPNP,f03";
+ };
+ };
+
+ rtc@70 {
+ compatible = "pnpPNP,b00";
+ reg = <1 70 2>;
+ };
+
+ gpio@400 {
+ reg = <1 400 80>;
+ };
+ };
+ };
+ };
+
+ };
+
+ pcie@9000 {
+ compatible = "fsl,mpc8548-pcie";
+ device_type = "pci";
+ #interrupt-cells = <1>;
+ #size-cells = <2>;
+ #address-cells = <3>;
+ reg = <9000 1000>;
+ bus-range = <0 ff>;
+ ranges = <02000000 0 a0000000 a0000000 0 20000000
+ 01000000 0 00000000 ffc10000 0 00010000>;
+ clock-frequency = <1fca055>;
+ interrupt-parent = <&mpic>;
+ interrupts = <1a 2>;
+ interrupt-map-mask = <f800 0 0 7>;
+ interrupt-map = <
+ /* IDSEL 0x0 */
+ 0000 0 0 1 &mpic 4 1
+ 0000 0 0 2 &mpic 5 1
+ 0000 0 0 3 &mpic 6 1
+ 0000 0 0 4 &mpic 7 1
+ >;
+ };
+
+ pcie@a000 {
+ compatible = "fsl,mpc8548-pcie";
+ device_type = "pci";
+ #interrupt-cells = <1>;
+ #size-cells = <2>;
+ #address-cells = <3>;
+ reg = <a000 1000>;
+ bus-range = <0 ff>;
+ ranges = <02000000 0 c0000000 c0000000 0 20000000
+ 01000000 0 00000000 ffc20000 0 00010000>;
+ clock-frequency = <1fca055>;
+ interrupt-parent = <&mpic>;
+ interrupts = <1b 2>;
+ interrupt-map = <
+ /* IDSEL 0x0 */
+ 0000 0 0 1 &mpic 0 1
+ 0000 0 0 2 &mpic 1 1
+ 0000 0 0 3 &mpic 2 1
+ 0000 0 0 4 &mpic 3 1
+ >;
+ };
+
+ global-utilities@e0000 { //global utilities block
+ compatible = "fsl,mpc8548-guts";
+ reg = <e0000 1000>;
+ fsl,has-rstcr;
+ };
+
+ mpic: pic@40000 {
+ clock-frequency = <0>;
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <2>;
+ reg = <40000 40000>;
+ built-in;
+ compatible = "chrp,open-pic";
+ device_type = "open-pic";
+ big-endian;
+ };
+ };
+};
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
index 3a5c3c4..1e2eba8 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
@@ -181,6 +181,23 @@ static int __init mpc8544_ds_probe(void)
}
}
+/*
+ * Called very early, device-tree isn't unflattened
+ */
+static int __init mpc8572_ds_probe(void)
+{
+ unsigned long root = of_get_flat_dt_root();
+
+ if (of_flat_dt_is_compatible(root, "MPC8572DS")) {
+#ifdef CONFIG_PCI
+ primary_phb_addr = 0x8000;
+#endif
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
define_machine(mpc8544_ds) {
.name = "MPC8544 DS",
.probe = mpc8544_ds_probe,
@@ -194,3 +211,17 @@ define_machine(mpc8544_ds) {
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
};
+
+define_machine(mpc8572_ds) {
+ .name = "MPC8572 DS",
+ .probe = mpc8572_ds_probe,
+ .setup_arch = mpc85xx_ds_setup_arch,
+ .init_IRQ = mpc85xx_ds_pic_init,
+#ifdef CONFIG_PCI
+ .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
+#endif
+ .get_irq = mpic_get_irq,
+ .restart = mpc85xx_restart,
+ .calibrate_decr = generic_calibrate_decr,
+ .progress = udbg_progress,
+};
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 114c90f..34cad96 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -255,5 +255,7 @@ DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8533E, quirk_fsl_pcie_transpare
DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8533, quirk_fsl_pcie_transparent);
DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544E, quirk_fsl_pcie_transparent);
DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544, quirk_fsl_pcie_transparent);
+DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8572E, quirk_fsl_pcie_transparent)
+DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8572, quirk_fsl_pcie_transparent);
DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_transparent);
DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_transparent);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 06d23e1..c98b867 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -374,10 +374,9 @@
#define PCI_DEVICE_ID_ATI_IXP400_SATA 0x4379
#define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a
#define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380
-#define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385
+#define PCI_DEVICE_ID_ATI_SBX00_SMBUS 0x4385
#define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c
#define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390
-#define PCI_DEVICE_ID_ATI_IXP700_SMBUS 0x4395
#define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c
#define PCI_VENDOR_ID_VLSI 0x1004
@@ -2100,6 +2099,8 @@
#define PCI_DEVICE_ID_MPC8533 0x0031
#define PCI_DEVICE_ID_MPC8544E 0x0032
#define PCI_DEVICE_ID_MPC8544 0x0033
+#define PCI_DEVICE_ID_MPC8572E 0x0040
+#define PCI_DEVICE_ID_MPC8572 0x0041
#define PCI_DEVICE_ID_MPC8641 0x7010
#define PCI_DEVICE_ID_MPC8641D 0x7011
--
1.5.2.4
^ permalink raw reply related
* Fix "no_sync_cmos_clock" logic inversion in kernel/time/ntp.c
From: Tony Breeds @ 2007-09-11 7:46 UTC (permalink / raw)
To: Linux Kernel ML, LinuxPPC-dev
Cc: zach, John Stultz, Paul Mackerras, Andrew Morton, Thomas Gleixner
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
Seems to me that this timer will only get started on platforms that say
they don't want it?
kernel/time/ntp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: working/kernel/time/ntp.c
===================================================================
--- working.orig/kernel/time/ntp.c 2007-09-11 17:34:44.000000000 +1000
+++ working/kernel/time/ntp.c 2007-09-11 17:34:55.000000000 +1000
@@ -226,7 +226,7 @@ static void sync_cmos_clock(unsigned lon
static void notify_cmos_timer(void)
{
- if (no_sync_cmos_clock)
+ if (!no_sync_cmos_clock)
mod_timer(&sync_cmos_timer, jiffies + 1);
}
Yours Tony
linux.conf.au http://linux.conf.au/ || http://lca2008.linux.org.au/
Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!
^ permalink raw reply
* [RFC/PATCH] Implement {read,update}_persistent_clock.
From: Tony Breeds @ 2007-09-11 7:49 UTC (permalink / raw)
To: LinuxPPC-dev, Paul Mackerras
With these functions implemented we cooperate better with the generic
timekeeping code. This obsoletes the need for the timer sysdev as a bonus.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
* Compile tested for arch/powerpc/configs/*_defconfig
* Booted on pSeries, iSeries, Cell and PS3
* Really needs booting on powermac and a quad G5 (hint hint)
* Should remove arch/powerpc/sysdev/timer.c at the same time.
arch/powerpc/Kconfig | 3 +
arch/powerpc/kernel/time.c | 58 ++++++++++-------------------------
arch/powerpc/sysdev/Makefile | 5 ---
3 files changed, 20 insertions(+), 46 deletions(-)
Index: working/arch/powerpc/Kconfig
===================================================================
--- working.orig/arch/powerpc/Kconfig
+++ working/arch/powerpc/Kconfig
@@ -21,6 +21,9 @@ config MMU
bool
default y
+config GENERIC_CMOS_UPDATE
+ def_bool y
+
config GENERIC_HARDIRQS
bool
default y
Index: working/arch/powerpc/kernel/time.c
===================================================================
--- working.orig/arch/powerpc/kernel/time.c
+++ working/arch/powerpc/kernel/time.c
@@ -74,16 +74,11 @@
#endif
#include <asm/smp.h>
-/* keep track of when we need to update the rtc */
-time_t last_rtc_update;
#ifdef CONFIG_PPC_ISERIES
static unsigned long __initdata iSeries_recal_titan;
static signed long __initdata iSeries_recal_tb;
#endif
-/* The decrementer counts down by 128 every 128ns on a 601. */
-#define DECREMENTER_COUNT_601 (1000000000 / HZ)
-
#define XSEC_PER_SEC (1024*1024)
#ifdef CONFIG_PPC64
@@ -349,38 +344,7 @@ void udelay(unsigned long usecs)
}
EXPORT_SYMBOL(udelay);
-static __inline__ void timer_check_rtc(void)
-{
- /*
- * update the rtc when needed, this should be performed on the
- * right fraction of a second. Half or full second ?
- * Full second works on mk48t59 clocks, others need testing.
- * Note that this update is basically only used through
- * the adjtimex system calls. Setting the HW clock in
- * any other way is a /dev/rtc and userland business.
- * This is still wrong by -0.5/+1.5 jiffies because of the
- * timer interrupt resolution and possible delay, but here we
- * hit a quantization limit which can only be solved by higher
- * resolution timers and decoupling time management from timer
- * interrupts. This is also wrong on the clocks
- * which require being written at the half second boundary.
- * We should have an rtc call that only sets the minutes and
- * seconds like on Intel to avoid problems with non UTC clocks.
- */
- if (ppc_md.set_rtc_time && ntp_synced() &&
- xtime.tv_sec - last_rtc_update >= 659 &&
- abs((xtime.tv_nsec/1000) - (1000000-1000000/HZ)) < 500000/HZ) {
- struct rtc_time tm;
- to_tm(xtime.tv_sec + 1 + timezone_offset, &tm);
- tm.tm_year -= 1900;
- tm.tm_mon -= 1;
- if (ppc_md.set_rtc_time(&tm) == 0)
- last_rtc_update = xtime.tv_sec + 1;
- else
- /* Try again one minute later */
- last_rtc_update += 60;
- }
-}
+
/*
* This version of gettimeofday has microsecond resolution.
@@ -688,7 +652,6 @@ void timer_interrupt(struct pt_regs * re
tb_last_jiffy = tb_next_jiffy;
do_timer(1);
timer_recalc_offset(tb_last_jiffy);
- timer_check_rtc();
}
write_sequnlock(&xtime_lock);
}
@@ -800,11 +763,6 @@ int do_settimeofday(struct timespec *tv)
set_normalized_timespec(&xtime, new_sec, new_nsec);
set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
- /* In case of a large backwards jump in time with NTP, we want the
- * clock to be updated as soon as the PLL is again in lock.
- */
- last_rtc_update = new_sec - 658;
-
ntp_clear();
new_xsec = xtime.tv_nsec;
@@ -880,12 +838,36 @@ void __init generic_calibrate_decr(void)
#endif
}
-unsigned long get_boot_time(void)
+int update_persistent_clock(struct timespec now)
{
struct rtc_time tm;
- if (ppc_md.get_boot_time)
- return ppc_md.get_boot_time();
+ if (!ppc_md.set_rtc_time)
+ return 0;
+
+ to_tm(now.tv_sec + 1 + timezone_offset, &tm);
+ tm.tm_year -= 1900;
+ tm.tm_mon -= 1;
+
+ return ppc_md.set_rtc_time(&tm);
+}
+
+unsigned long read_persistent_clock(void)
+{
+ struct rtc_time tm;
+ static int first = 1;
+ unsigned long time = 0;
+
+ if (first) {
+ first = 0;
+ if (ppc_md.time_init)
+ timezone_offset = ppc_md.time_init();
+ }
+
+ /* get_boot_time() isn't guaranteed to be safe to call late */
+ if (system_state != SYSTEM_RUNNING && ppc_md.get_boot_time) {
+ return ppc_md.get_boot_time() -timezone_offset;
+ }
if (!ppc_md.get_rtc_time)
return 0;
ppc_md.get_rtc_time(&tm);
@@ -897,14 +879,10 @@ unsigned long get_boot_time(void)
void __init time_init(void)
{
unsigned long flags;
- unsigned long tm = 0;
struct div_result res;
u64 scale, x;
unsigned shift;
- if (ppc_md.time_init != NULL)
- timezone_offset = ppc_md.time_init();
-
if (__USE_RTC()) {
/* 601 processor: dec counts down by 128 every 128ns */
ppc_tb_freq = 1000000000;
@@ -979,19 +957,14 @@ void __init time_init(void)
/* Save the current timebase to pretty up CONFIG_PRINTK_TIME */
boot_tb = get_tb();
- tm = get_boot_time();
-
write_seqlock_irqsave(&xtime_lock, flags);
/* If platform provided a timezone (pmac), we correct the time */
if (timezone_offset) {
sys_tz.tz_minuteswest = -timezone_offset / 60;
sys_tz.tz_dsttime = 0;
- tm -= timezone_offset;
}
- xtime.tv_sec = tm;
- xtime.tv_nsec = 0;
do_gtod.varp = &do_gtod.vars[0];
do_gtod.var_idx = 0;
do_gtod.varp->tb_orig_stamp = tb_last_jiffy;
@@ -1009,9 +982,6 @@ void __init time_init(void)
time_freq = 0;
- last_rtc_update = xtime.tv_sec;
- set_normalized_timespec(&wall_to_monotonic,
- -xtime.tv_sec, -xtime.tv_nsec);
write_sequnlock_irqrestore(&xtime_lock, flags);
/* Not exact, but the timer interrupt takes care of this */
Index: working/arch/powerpc/sysdev/Makefile
===================================================================
--- working.orig/arch/powerpc/sysdev/Makefile
+++ working/arch/powerpc/sysdev/Makefile
@@ -20,11 +20,6 @@ obj-$(CONFIG_MV64X60) += $(mv64x60-y) m
obj-$(CONFIG_RTC_DRV_CMOS) += rtc_cmos_setup.o
obj-$(CONFIG_AXON_RAM) += axonram.o
-# contains only the suspend handler for time
-ifeq ($(CONFIG_RTC_CLASS),)
-obj-$(CONFIG_PM) += timer.o
-endif
-
ifeq ($(CONFIG_PPC_MERGE),y)
obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
obj-$(CONFIG_PPC_I8259) += i8259.o
Yours Tony
linux.conf.au http://linux.conf.au/ || http://lca2008.linux.org.au/
Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!
^ permalink raw reply
* Re: [RFC/PATCH] Implement {read,update}_persistent_clock. v2
From: Tony Breeds @ 2007-09-11 8:17 UTC (permalink / raw)
To: LinuxPPC-dev, Paul Mackerras
In-Reply-To: <20070911074917.GE9814@bakeyournoodle.com>
From: Tony Breeds <tony@bakeyournoodle.com>
Implement {read,update}_persistent_clock.
With these functions implemented we cooperate better with the generic
timekeeping code. This obsoletes the need for the timer sysdev as a bonus.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
Functionally is the same as previous version, Just a few cleanups.
* Compile tested for arch/powerpc/configs/*_defconfig
* Booted on pSeries, iSeries, Cell and PS3
* Really needs booting on powermac and a quad G5 (hint hint)
* Should remove arch/powerpc/sysdev/timer.c
arch/powerpc/Kconfig | 3 +
arch/powerpc/kernel/time.c | 58 ++++++++++-------------------------
arch/powerpc/sysdev/Makefile | 5 ---
3 files changed, 20 insertions(+), 46 deletions(-)
Index: working/arch/powerpc/Kconfig
===================================================================
--- working.orig/arch/powerpc/Kconfig
+++ working/arch/powerpc/Kconfig
@@ -21,6 +21,9 @@ config MMU
bool
default y
+config GENERIC_CMOS_UPDATE
+ def_bool y
+
config GENERIC_HARDIRQS
bool
default y
Index: working/arch/powerpc/kernel/time.c
===================================================================
--- working.orig/arch/powerpc/kernel/time.c
+++ working/arch/powerpc/kernel/time.c
@@ -74,16 +74,11 @@
#endif
#include <asm/smp.h>
-/* keep track of when we need to update the rtc */
-time_t last_rtc_update;
#ifdef CONFIG_PPC_ISERIES
static unsigned long __initdata iSeries_recal_titan;
static signed long __initdata iSeries_recal_tb;
#endif
-/* The decrementer counts down by 128 every 128ns on a 601. */
-#define DECREMENTER_COUNT_601 (1000000000 / HZ)
-
#define XSEC_PER_SEC (1024*1024)
#ifdef CONFIG_PPC64
@@ -349,39 +344,6 @@ void udelay(unsigned long usecs)
}
EXPORT_SYMBOL(udelay);
-static __inline__ void timer_check_rtc(void)
-{
- /*
- * update the rtc when needed, this should be performed on the
- * right fraction of a second. Half or full second ?
- * Full second works on mk48t59 clocks, others need testing.
- * Note that this update is basically only used through
- * the adjtimex system calls. Setting the HW clock in
- * any other way is a /dev/rtc and userland business.
- * This is still wrong by -0.5/+1.5 jiffies because of the
- * timer interrupt resolution and possible delay, but here we
- * hit a quantization limit which can only be solved by higher
- * resolution timers and decoupling time management from timer
- * interrupts. This is also wrong on the clocks
- * which require being written at the half second boundary.
- * We should have an rtc call that only sets the minutes and
- * seconds like on Intel to avoid problems with non UTC clocks.
- */
- if (ppc_md.set_rtc_time && ntp_synced() &&
- xtime.tv_sec - last_rtc_update >= 659 &&
- abs((xtime.tv_nsec/1000) - (1000000-1000000/HZ)) < 500000/HZ) {
- struct rtc_time tm;
- to_tm(xtime.tv_sec + 1 + timezone_offset, &tm);
- tm.tm_year -= 1900;
- tm.tm_mon -= 1;
- if (ppc_md.set_rtc_time(&tm) == 0)
- last_rtc_update = xtime.tv_sec + 1;
- else
- /* Try again one minute later */
- last_rtc_update += 60;
- }
-}
-
/*
* This version of gettimeofday has microsecond resolution.
*/
@@ -688,7 +650,6 @@ void timer_interrupt(struct pt_regs * re
tb_last_jiffy = tb_next_jiffy;
do_timer(1);
timer_recalc_offset(tb_last_jiffy);
- timer_check_rtc();
}
write_sequnlock(&xtime_lock);
}
@@ -800,11 +761,6 @@ int do_settimeofday(struct timespec *tv)
set_normalized_timespec(&xtime, new_sec, new_nsec);
set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
- /* In case of a large backwards jump in time with NTP, we want the
- * clock to be updated as soon as the PLL is again in lock.
- */
- last_rtc_update = new_sec - 658;
-
ntp_clear();
new_xsec = xtime.tv_nsec;
@@ -880,12 +836,35 @@ void __init generic_calibrate_decr(void)
#endif
}
-unsigned long get_boot_time(void)
+int update_persistent_clock(struct timespec now)
+{
+ struct rtc_time tm;
+
+ if (!ppc_md.set_rtc_time)
+ return 0;
+
+ to_tm(now.tv_sec + 1 + timezone_offset, &tm);
+ tm.tm_year -= 1900;
+ tm.tm_mon -= 1;
+
+ return ppc_md.set_rtc_time(&tm);
+}
+
+unsigned long read_persistent_clock(void)
{
struct rtc_time tm;
+ static int first = 1;
+
+ if (first) {
+ first = 0;
+ if (ppc_md.time_init)
+ timezone_offset = ppc_md.time_init();
+ }
- if (ppc_md.get_boot_time)
- return ppc_md.get_boot_time();
+ /* get_boot_time() isn't guaranteed to be safe to call late */
+ /* FIXME: is the a better check available here? */
+ if (system_state != SYSTEM_RUNNING && ppc_md.get_boot_time)
+ return ppc_md.get_boot_time() -timezone_offset;
if (!ppc_md.get_rtc_time)
return 0;
ppc_md.get_rtc_time(&tm);
@@ -897,14 +876,10 @@ unsigned long get_boot_time(void)
void __init time_init(void)
{
unsigned long flags;
- unsigned long tm = 0;
struct div_result res;
u64 scale, x;
unsigned shift;
- if (ppc_md.time_init != NULL)
- timezone_offset = ppc_md.time_init();
-
if (__USE_RTC()) {
/* 601 processor: dec counts down by 128 every 128ns */
ppc_tb_freq = 1000000000;
@@ -979,19 +954,14 @@ void __init time_init(void)
/* Save the current timebase to pretty up CONFIG_PRINTK_TIME */
boot_tb = get_tb();
- tm = get_boot_time();
-
write_seqlock_irqsave(&xtime_lock, flags);
/* If platform provided a timezone (pmac), we correct the time */
if (timezone_offset) {
sys_tz.tz_minuteswest = -timezone_offset / 60;
sys_tz.tz_dsttime = 0;
- tm -= timezone_offset;
}
- xtime.tv_sec = tm;
- xtime.tv_nsec = 0;
do_gtod.varp = &do_gtod.vars[0];
do_gtod.var_idx = 0;
do_gtod.varp->tb_orig_stamp = tb_last_jiffy;
@@ -1009,9 +979,6 @@ void __init time_init(void)
time_freq = 0;
- last_rtc_update = xtime.tv_sec;
- set_normalized_timespec(&wall_to_monotonic,
- -xtime.tv_sec, -xtime.tv_nsec);
write_sequnlock_irqrestore(&xtime_lock, flags);
/* Not exact, but the timer interrupt takes care of this */
Index: working/arch/powerpc/sysdev/Makefile
===================================================================
--- working.orig/arch/powerpc/sysdev/Makefile
+++ working/arch/powerpc/sysdev/Makefile
@@ -20,11 +20,6 @@ obj-$(CONFIG_MV64X60) += $(mv64x60-y) m
obj-$(CONFIG_RTC_DRV_CMOS) += rtc_cmos_setup.o
obj-$(CONFIG_AXON_RAM) += axonram.o
-# contains only the suspend handler for time
-ifeq ($(CONFIG_RTC_CLASS),)
-obj-$(CONFIG_PM) += timer.o
-endif
-
ifeq ($(CONFIG_PPC_MERGE),y)
obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
obj-$(CONFIG_PPC_I8259) += i8259.o
^ permalink raw reply
* Re: Fix "no_sync_cmos_clock" logic inversion in kernel/time/ntp.c
From: Thomas Gleixner @ 2007-09-11 7:57 UTC (permalink / raw)
To: Tony Breeds
Cc: zach, John Stultz, Linux Kernel ML, LinuxPPC-dev, Paul Mackerras,
Andrew Morton
In-Reply-To: <20070911074608.GD9814@bakeyournoodle.com>
On Tue, 2007-09-11 at 17:46 +1000, Tony Breeds wrote:
> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
>
> ---
>
> Seems to me that this timer will only get started on platforms that say
> they don't want it?
Hell, yes. Good catch !
tglx
> kernel/time/ntp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: working/kernel/time/ntp.c
> ===================================================================
> --- working.orig/kernel/time/ntp.c 2007-09-11 17:34:44.000000000 +1000
> +++ working/kernel/time/ntp.c 2007-09-11 17:34:55.000000000 +1000
> @@ -226,7 +226,7 @@ static void sync_cmos_clock(unsigned lon
>
> static void notify_cmos_timer(void)
> {
> - if (no_sync_cmos_clock)
> + if (!no_sync_cmos_clock)
> mod_timer(&sync_cmos_timer, jiffies + 1);
> }
>
>
> Yours Tony
>
> linux.conf.au http://linux.conf.au/ || http://lca2008.linux.org.au/
> Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!
>
^ permalink raw reply
* Re: [RFC/PATCH] Implement {read,update}_persistent_clock.
From: Gabriel Paubert @ 2007-09-11 8:28 UTC (permalink / raw)
To: Tony Breeds; +Cc: LinuxPPC-dev, Paul Mackerras
In-Reply-To: <20070911074917.GE9814@bakeyournoodle.com>
On Tue, Sep 11, 2007 at 05:49:17PM +1000, Tony Breeds wrote:
> With these functions implemented we cooperate better with the generic
> timekeeping code. This obsoletes the need for the timer sysdev as a bonus.
Looks fine, there is still the problem that most PPC RTC
seem to prefer update on the second boundary instead of
the half second used by Wintel clones.
>
> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
>
> ---
>
> * Compile tested for arch/powerpc/configs/*_defconfig
> * Booted on pSeries, iSeries, Cell and PS3
> * Really needs booting on powermac and a quad G5 (hint hint)
> * Should remove arch/powerpc/sysdev/timer.c at the same time.
Realistically this can only be tested with a running ntp
process which locks to a server.
>
> arch/powerpc/Kconfig | 3 +
> arch/powerpc/kernel/time.c | 58 ++++++++++-------------------------
> arch/powerpc/sysdev/Makefile | 5 ---
> 3 files changed, 20 insertions(+), 46 deletions(-)
>
> Index: working/arch/powerpc/Kconfig
> ===================================================================
> --- working.orig/arch/powerpc/Kconfig
> +++ working/arch/powerpc/Kconfig
> @@ -21,6 +21,9 @@ config MMU
> bool
> default y
>
> +config GENERIC_CMOS_UPDATE
> + def_bool y
> +
> config GENERIC_HARDIRQS
> bool
> default y
> Index: working/arch/powerpc/kernel/time.c
> ===================================================================
> --- working.orig/arch/powerpc/kernel/time.c
> +++ working/arch/powerpc/kernel/time.c
> @@ -74,16 +74,11 @@
> #endif
> #include <asm/smp.h>
>
> -/* keep track of when we need to update the rtc */
> -time_t last_rtc_update;
> #ifdef CONFIG_PPC_ISERIES
> static unsigned long __initdata iSeries_recal_titan;
> static signed long __initdata iSeries_recal_tb;
> #endif
>
> -/* The decrementer counts down by 128 every 128ns on a 601. */
> -#define DECREMENTER_COUNT_601 (1000000000 / HZ)
> -
> #define XSEC_PER_SEC (1024*1024)
>
> #ifdef CONFIG_PPC64
> @@ -349,38 +344,7 @@ void udelay(unsigned long usecs)
> }
> EXPORT_SYMBOL(udelay);
>
> -static __inline__ void timer_check_rtc(void)
> -{
> - /*
> - * update the rtc when needed, this should be performed on the
> - * right fraction of a second. Half or full second ?
> - * Full second works on mk48t59 clocks, others need testing.
> - * Note that this update is basically only used through
> - * the adjtimex system calls. Setting the HW clock in
> - * any other way is a /dev/rtc and userland business.
> - * This is still wrong by -0.5/+1.5 jiffies because of the
> - * timer interrupt resolution and possible delay, but here we
> - * hit a quantization limit which can only be solved by higher
> - * resolution timers and decoupling time management from timer
> - * interrupts. This is also wrong on the clocks
> - * which require being written at the half second boundary.
> - * We should have an rtc call that only sets the minutes and
> - * seconds like on Intel to avoid problems with non UTC clocks.
> - */
> - if (ppc_md.set_rtc_time && ntp_synced() &&
> - xtime.tv_sec - last_rtc_update >= 659 &&
> - abs((xtime.tv_nsec/1000) - (1000000-1000000/HZ)) < 500000/HZ) {
> - struct rtc_time tm;
> - to_tm(xtime.tv_sec + 1 + timezone_offset, &tm);
> - tm.tm_year -= 1900;
> - tm.tm_mon -= 1;
> - if (ppc_md.set_rtc_time(&tm) == 0)
> - last_rtc_update = xtime.tv_sec + 1;
> - else
> - /* Try again one minute later */
> - last_rtc_update += 60;
> - }
> -}
> +
>
> /*
> * This version of gettimeofday has microsecond resolution.
> @@ -688,7 +652,6 @@ void timer_interrupt(struct pt_regs * re
> tb_last_jiffy = tb_next_jiffy;
> do_timer(1);
> timer_recalc_offset(tb_last_jiffy);
> - timer_check_rtc();
> }
> write_sequnlock(&xtime_lock);
> }
> @@ -800,11 +763,6 @@ int do_settimeofday(struct timespec *tv)
> set_normalized_timespec(&xtime, new_sec, new_nsec);
> set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
>
> - /* In case of a large backwards jump in time with NTP, we want the
> - * clock to be updated as soon as the PLL is again in lock.
> - */
> - last_rtc_update = new_sec - 658;
> -
> ntp_clear();
>
> new_xsec = xtime.tv_nsec;
> @@ -880,12 +838,36 @@ void __init generic_calibrate_decr(void)
> #endif
> }
>
> -unsigned long get_boot_time(void)
> +int update_persistent_clock(struct timespec now)
> {
> struct rtc_time tm;
>
> - if (ppc_md.get_boot_time)
> - return ppc_md.get_boot_time();
> + if (!ppc_md.set_rtc_time)
> + return 0;
> +
> + to_tm(now.tv_sec + 1 + timezone_offset, &tm);
> + tm.tm_year -= 1900;
> + tm.tm_mon -= 1;
> +
> + return ppc_md.set_rtc_time(&tm);
> +}
> +
> +unsigned long read_persistent_clock(void)
> +{
> + struct rtc_time tm;
> + static int first = 1;
> + unsigned long time = 0;
> +
> + if (first) {
> + first = 0;
> + if (ppc_md.time_init)
> + timezone_offset = ppc_md.time_init();
> + }
> +
> + /* get_boot_time() isn't guaranteed to be safe to call late */
> + if (system_state != SYSTEM_RUNNING && ppc_md.get_boot_time) {
> + return ppc_md.get_boot_time() -timezone_offset;
> + }
> if (!ppc_md.get_rtc_time)
> return 0;
> ppc_md.get_rtc_time(&tm);
> @@ -897,14 +879,10 @@ unsigned long get_boot_time(void)
> void __init time_init(void)
> {
> unsigned long flags;
> - unsigned long tm = 0;
> struct div_result res;
> u64 scale, x;
> unsigned shift;
>
> - if (ppc_md.time_init != NULL)
> - timezone_offset = ppc_md.time_init();
> -
> if (__USE_RTC()) {
> /* 601 processor: dec counts down by 128 every 128ns */
> ppc_tb_freq = 1000000000;
> @@ -979,19 +957,14 @@ void __init time_init(void)
> /* Save the current timebase to pretty up CONFIG_PRINTK_TIME */
> boot_tb = get_tb();
>
> - tm = get_boot_time();
> -
> write_seqlock_irqsave(&xtime_lock, flags);
>
> /* If platform provided a timezone (pmac), we correct the time */
> if (timezone_offset) {
> sys_tz.tz_minuteswest = -timezone_offset / 60;
> sys_tz.tz_dsttime = 0;
> - tm -= timezone_offset;
> }
>
> - xtime.tv_sec = tm;
> - xtime.tv_nsec = 0;
> do_gtod.varp = &do_gtod.vars[0];
> do_gtod.var_idx = 0;
> do_gtod.varp->tb_orig_stamp = tb_last_jiffy;
> @@ -1009,9 +982,6 @@ void __init time_init(void)
>
> time_freq = 0;
>
> - last_rtc_update = xtime.tv_sec;
> - set_normalized_timespec(&wall_to_monotonic,
> - -xtime.tv_sec, -xtime.tv_nsec);
> write_sequnlock_irqrestore(&xtime_lock, flags);
>
> /* Not exact, but the timer interrupt takes care of this */
> Index: working/arch/powerpc/sysdev/Makefile
> ===================================================================
> --- working.orig/arch/powerpc/sysdev/Makefile
> +++ working/arch/powerpc/sysdev/Makefile
> @@ -20,11 +20,6 @@ obj-$(CONFIG_MV64X60) += $(mv64x60-y) m
> obj-$(CONFIG_RTC_DRV_CMOS) += rtc_cmos_setup.o
> obj-$(CONFIG_AXON_RAM) += axonram.o
>
> -# contains only the suspend handler for time
> -ifeq ($(CONFIG_RTC_CLASS),)
> -obj-$(CONFIG_PM) += timer.o
> -endif
> -
> ifeq ($(CONFIG_PPC_MERGE),y)
> obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
> obj-$(CONFIG_PPC_I8259) += i8259.o
>
>
> Yours Tony
>
> linux.conf.au http://linux.conf.au/ || http://lca2008.linux.org.au/
> Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply
* Re: PCI target implementation on AMCC PPC CPUs
From: Matthias Fuchs @ 2007-09-11 9:13 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: Leonid
In-Reply-To: <46E06259.5010305@ovro.caltech.edu>
Hi David,
we build a couple of PCI target designs using AMCC PowerPCs.
You are right that some things could be better. But ..
On Thursday 06 September 2007 22:26, David Hawkins wrote:
> There are several fundamental problems with the AMCC 440EP
> acting as a PCI target/slave;
>
> 2. Look in the data sheet and see if you can figure out
> how the host processor can generate an interrupt to
> the PowerPC core ... oops, you can't. That kind of
> makes it difficult to work with doesn't it.
You CAN! You can generate an interrupt to the PowerPC from the host
CPU bei writing to the PCI command register. You have to read the user manual
carefully. Perhaps it not that obvious.
Matthias
^ permalink raw reply
* Lite5200B and Carmine Board PCI problem
From: Dr. Thomas Fiksel @ 2007-09-11 9:07 UTC (permalink / raw)
To: Linuxppc Mailing list
[-- Attachment #1: Type: text/plain, Size: 5223 bytes --]
Hi Linuxppc-embedded,
I'm trying to run a Fujitsu Carmine Evaluation Board MB86297-EB01 on a
Freescale Lite5200B board.
With a 'standard' Linux kernel 2.4 or 2.6 there are problems while
allocating/maping of the PCI memory space. The Carmine board requires 2
PCI IO space segments of 256 byte each, 1 PCI memory space segment of
256 MByte and 1 PCI memory space segment of 64 MByte.
The U-Boot and kernel log shows :
Scanning PCI devices on bus 0
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________
00.18.00 0x10cf 0x202b Display controller 0x80
00.1a.00 0x1057 0x5809 Bridge device 0x80
...
PCI: Probing PCI hardware
...
PCI:00:18.0 Resource 0 [00000000-000000ff] is unassigned
PCI:00:18.0 Resource 1 [00000000-000000ff] is unassigned
PCI:00:18.0 Resource 2 [00000000-0fffffff] is unassigned
PCI:00:18.0 Resource 3 [00000000-03ffffff] is unassigned
PCI:00:1a.0 Resource 0 [00000000-0003ffff] is unassigned
PCI:00:1a.0 Resource 1 [00000000-3fffffff] is unassigned
PCI: bridge rsrc 50000000..50ffffff (100), parent c015debc, resource
c027f038
PCI: bridge rsrc 40000000..4fffffff (200), parent c015ded8, resource
c027f054
PCI: moved device 00:18.0 resource 0 (101) to 50000000
got res[50000000:500000ff] for resource 0 of PCI device 10cf:202b
PCI: moved device 00:18.0 resource 1 (101) to 50000400
got res[50000400:500004ff] for resource 1 of PCI device 10cf:202b
PCI: moved device 00:18.0 resource 2 (1208) to 40000000
got res[40000000:4fffffff] for resource 2 of PCI device 10cf:202b
PCI: Failed to allocate resource 3(50000000-4fffffff) for 00:18.0
Because the PCI bridge shows only 256 MByte available memory area it is
clear that the PCI memory space segment of 64 MByte (resource 3) is not
allocated/mapped.
I tried to change the constants MPC5xxx_PCI_MEM_START and
MPC5xxx_PCI_MEM_END constants (and other constants) in the related *.h
file for arch/ppc/kernel/mpc5xxx_pci.c, recompiled the kernel and run it
again.
Now the U-Boot and kernel log shows :
Scanning PCI devices on bus 0
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________
00.18.00 0x10cf 0x202b Display controller 0x80
00.1a.00 0x1057 0x5809 Bridge device 0x80
...
PCI: Probing PCI hardware
...
PCI:00:18.0 Resource 0 [00000000-000000ff] is unassigned
PCI:00:18.0 Resource 1 [00000000-000000ff] is unassigned
PCI:00:18.0 Resource 2 [00000000-0fffffff] is unassigned
PCI:00:18.0 Resource 3 [00000000-03ffffff] is unassigned
PCI:00:1a.0 Resource 0 [00000000-0003ffff] is unassigned
PCI:00:1a.0 Resource 1 [00000000-3fffffff] is unassigned
PCI: bridge rsrc 60000000..60ffffff (100), parent c015debc, resource
c027f038
PCI: bridge rsrc 40000000..5fffffff (200), parent c015ded8, resource
c027f054
PCI: moved device 00:18.0 resource 0 (101) to 60000000
got res[60000000:600000ff] for resource 0 of PCI device 10cf:202b
PCI: moved device 00:18.0 resource 1 (101) to 60000400
got res[60000400:600004ff] for resource 1 of PCI device 10cf:202b
PCI: moved device 00:18.0 resource 2 (1208) to 40000000
got res[40000000:4fffffff] for resource 2 of PCI device 10cf:202b
PCI: moved device 00:18.0 resource 3 (1208) to 50000000
got res[50000000:53ffffff] for resource 3 of PCI device 10cf:202b
The PCI bridge shows now a creater area and both PCI memory space
segments of 256 Mbyte and 64 Mbyte are mapped.
But in case if I have a simple read or write acces to the register of
Carmine (which are located in the 64 Mbyte segment in adress region
above 0x50000000) the kernel gives the oops :
MB86290: fb_init called.
MB86290: initialize called.
Oops: kernel access of bad area, sig: 11
NIP: C00C2630 XER: 00000000 LR: C0004F3C SP: C0549D80 REGS: c0549cd0
TRAP: 0300 Not tainted
MSR: 00001032 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: 00000020, DSISR: 20000000
TASK = c0548000[1] 'swapper' Last syscall: 120
last math 00000000 last altivec 00000000
GPR00: C0004F3C C0549D80 C0548000 00000000 C01B788C C0549E10 C014CA74
F0000C00
GPR08: F0001200 00000000 C0170000 00000020 C0190000 1008D5C4 0FFBA000
00000000
GPR16: 00000000 00000001 FFFFFFFF 007FFF00 00001032 00549E00 00000000
C0003E40
GPR24: C0004FA4 00000000 C0546420 C016EF20 C0549E10 C01B788C 24000000
C0546420
Call backtrace:
00009032 C0004F3C C0005000 C0003E40 C0004840 C00049B8 C00C2C14
C017ED7C C017E008 C017A140 C01725F4 C0172640 C0003970 C0006318
Kernel panic: Aiee, killing interrupt handler!
(Please note, the register access in the MB86290 driver code is still
directed to the new register locations of the Carmine)
Therefore my questions:
It is allowed to increase the PCI bridge memory area by th simple change
of MPC5xxx_PCI_MEM_START and MPC5xxx_PCI_MEM_END (and related constants)?
Or there are technical/hardware restrictions that this area can only be
256 MByte?
If not, must be changed other constants in the kernel configuration the
increase the PCI bridge memory area?
There are known problems to plug the Carmine board in the Lite5200B board?
All jumpers on both boards are in default settings.
TIA
Thomas Fiksel
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 1970 bytes --]
^ permalink raw reply
* SYSFS: need a noncaching read
From: Heiko Schocher @ 2007-09-11 9:43 UTC (permalink / raw)
To: linux-kernel; +Cc: linuxppc-dev, Detlev Zundel
Hello,
I have developed a device driver and use the sysFS to export some
registers to userspace. I opened the sysFS File for one register and did
some reads from this File, but I alwas becoming the same value from the
register, whats not OK, because they are changing. So I found out that
the sysFS caches the reads ... :-(
Is there a way to retrigger the reads (in that way, that the sysFS
rereads the values from the driver), without closing and opening the
sysFS Files? Or must I better use the ioctl () Driver-interface for
exporting these registers?
I am asking this, because I must read every 10 ms 2 registers, so
doing a open/read/close for reading one registers is a little bit too
much overhead.
I made a sysFS seek function, which retriggers the read, and that works
fine, but I have again 2 syscalls, whats also is not optimal.
Or can we make a open () with a (new?)Flag, that informs the sysFS to
always reread the values from the underlying driver?
Or a new flag in the "struct attribute_group" in include/linux/sysfs.h,
which let the sysfs rereading the values?
suggestions are welcome
thanks
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply
* RE: [PATCH 1/5] Add Freescale DMA and DMA channel to Documentation/powerpc/booting-without-of.txt file.
From: Zhang Wei-r63237 @ 2007-09-11 10:01 UTC (permalink / raw)
To: David Gibson, Segher Boessenkool; +Cc: linuxppc-dev, paulus
In-Reply-To: <20070910032529.GA27828@localhost.localdomain>
=20
>=20
> On Fri, Sep 07, 2007 at 04:43:35PM +0200, Segher Boessenkool wrote:
> > > + l) Freescale DMA
> >=20
> > > + - compatible : Should be "fsl,dma".
> >=20
> > Please choose some more specific name. "fsl,mpc8540-dma" would
> > be a reasonable choice perhaps.
>=20
> More precisely, the compatible property should always have an specific
> entry based on the exact chip the DMA engine resides in, as well as a
> more general entry for any fsl dma engine of this type.
>=20
There is only difference in DMA channel and not in DMA node now. Does it
need add the precise compatible property name?
Thanks!
- zw
^ permalink raw reply
* RE: [PATCH 5/5] Add DMA engine driver for Freescale MPC85xx processors.
From: Zhang Wei-r63237 @ 2007-09-11 10:06 UTC (permalink / raw)
To: Randy Dunlap
Cc: shannon.nelson, linux-kernel, linuxppc-dev, paulus,
dan.j.williams
In-Reply-To: <20070907085845.54dc88f8.randy.dunlap@oracle.com>
Hi,=20
> --- /dev/null
> > +++ b/drivers/dma/fsldma.c
> > @@ -0,0 +1,995 @@
>=20
> Thanks for using kernel-doc notation. However, ...
>=20
> > +/**
> > + * fsl_dma_alloc_descriptor - Allocate descriptor from=20
> channel's DMA pool.
>=20
> Function parameters need to be listed & described here.
> See Documentation/kernel-doc-nano-HOWTO.txt or other source files
> for examples.
>=20
> (Applies to all documented function interfaces here.)
All right, I'll add full descriptions here. :P
>=20
> > + *
> > + * Return - The descriptor allocated. NULL for failed.
> > + */
> > +static struct fsl_desc_sw *fsl_dma_alloc_descriptor(
> > + struct fsl_dma_chan *fsl_chan,
> > + gfp_t flags)
> > +{
> ...
> > +}
>=20
> > +/**
> > + * fsl_chan_xfer_ld_queue -- Transfer the link descriptors=20
> in channel
> > + * ld_queue.
>=20
> The function's "short description" (unfortunately) must be on only one
> line. E.g.:
>=20
> * fsl_chan_xfer_ld_queue - Transfer link descriptors in=20
> channel ld_queue.
>=20
How about it's length greater than 80?
> > + */
> > +static void fsl_chan_xfer_ld_queue(struct fsl_dma_chan *fsl_chan)
> > +{
> ...
> > +}
>=20
> > diff --git a/drivers/dma/fsldma.h b/drivers/dma/fsldma.h
> > new file mode 100644
> > index 0000000..05be9ed
> > --- /dev/null
> > +++ b/drivers/dma/fsldma.h
> > @@ -0,0 +1,188 @@
> > +struct fsl_dma_chan_regs {
> > + __mix32 mr; /* 0x00 - Mode Register */
> > + __mix32 sr; /* 0x04 - Status Register */
> > + __mix64 cdar; /* 0x08 - Cureent descriptor=20
> address register */
>=20
> Current
>=20
I'll fix it.
Thanks!
- zw
^ permalink raw reply
* RE: [PATCH 2/5] Add Freescale DMA engine driver maintainer.
From: Zhang Wei-r63237 @ 2007-09-11 10:07 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev, paulus
In-Reply-To: <20070910032737.GB27828@localhost.localdomain>
I'll merge them.
Thanks!=20
- zw
> -----Original Message-----
> From: David Gibson [mailto:david@gibson.dropbear.id.au]=20
> Sent: Monday, September 10, 2007 11:28 AM
> To: Zhang Wei-r63237
> Cc: paulus@samba.org; linuxppc-dev@ozlabs.org
> Subject: Re: [PATCH 2/5] Add Freescale DMA engine driver maintainer.
>=20
> On Fri, Sep 07, 2007 at 06:53:53PM +0800, Zhang Wei wrote:
> > This patch adds Freescale DMA engine driver maintainer.
>=20
> This is meaningless without the actual driver, so it shouldn't be a
> separate patch. Fold it into the patch that actually adds the driver
> support.
>=20
> --=20
> David Gibson | I'll have my music baroque,=20
> and my code
> david AT gibson.dropbear.id.au | minimalist, thank=20
> you. NOT _the_ _other_
> | _way_ _around_!
> http://www.ozlabs.org/~dgibson
>=20
^ 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