* Re: [RFC] Device tree for new desktop platform in arch/powerpc
From: Gerhard Pircher @ 2007-06-22 13:12 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1182468169.24740.15.camel@localhost.localdomain>
-------- Original-Nachricht --------
Datum: Fri, 22 Jun 2007 09:22:49 +1000
Von: Benjamin Herrenschmidt <benh@kernel.crashing.org>
An: Gerhard Pircher <gerhard_pircher@gmx.net>
CC: linuxppc-dev@ozlabs.org
Betreff: Re: [RFC] Device tree for new desktop platform in arch/powerpc
> Do you have the recommended practice "interrupt mapping" standard ?
Yes, downloaded it right now.
> It also allowed to make it optional to have nodes for the PCI devices in
> slots, you can provide the mapping of all 4 INT# lines in the bridge
> node and linux can use it when probing for devices, so your bootwrapper
> doesn't have to know what's in the slots and doesn't have to create
> device nodes for those.
I would like to have PCI nodes only for the PCI host and PCI2ISA bridge.
The interrupt mapping of the INT# lines can be configured within U-boot,
thus I would avoid to specify it somewhere in the device tree, if it isn't
really necessary.
Gerhard
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
^ permalink raw reply
* Re: [RFC] clocksouce implementation for powerpc
From: Sergei Shtylyov @ 2007-06-22 12:42 UTC (permalink / raw)
To: Tony Breeds
Cc: Andrew Morton, Daniel Walker, john stultz, LKML, LinuxPPC-dev,
Thomas Gleixner, Ingo Molnar
In-Reply-To: <20070622061047.GW9768@bakeyournoodle.com>
Tony Breeds wrote:
> Thanks for taking the time to look over my patch.
>> I guess it's been based on the prior work by John Stultz (and me too :-)?
> At some level I guess so. John did send me a patch a while ago.
>> If you mean the init. part, this has been already done by me -- I've
>>implemented read_persistent_clock() and got rid of xtime setting. What's
>>left is to implemet update_persistent_clock() and get rid of
>>timer_check_rtc()...
> Actually I think that comment is redundant. and should be removed
> sorry.
I guess you haven't looked thru the -rt patch? There's much more than
John's initial patch there now, including the clockevents driver.
>>>+ .mult = 0, /* To be filled in */
>>>+ .read = NULL, /* To be filled in */
>>>+ .settimeofday = NULL, /* To be filled in */
>>
>> I don't quite understand why not just init them right away? The values
>>are fixed anyways.
> Well at least mult needs to be calculated at runtime, and I prefer to
I was talking about the method intializers specifically.
> have the structure near the top of the file at which stage the
> read/settimeofday functions aren't defined.
I don't think it's justified anyway.
> Yours Tony
WBR, Sergei
^ permalink raw reply
* Re: [RFC] Device tree for new desktop platform in arch/powerpc
From: Segher Boessenkool @ 2007-06-22 9:10 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: list, David Gibson
In-Reply-To: <1182500191.24740.49.camel@localhost.localdomain>
>>>> The "#address-cells" property should be completely absent,
>>>> even; for interrupt matching, that means "treat as 0, no
>>>> unit address used in interrupt mapping, just the interrupt
>>>> number", and for the "normal" purpose (defining the format
>>>> of devices on the bus rooted at / represented by this node)
>>>> it means "there is no such bus" -- this is different from
>>>> #address-cells = 0.
>>>
>>> I'd rather have it present and explicitely set to 0,
>>
>> It is not the "right thing" to do, but should be harmless
>> in most situations.
>
> It's pretty much the right thing to do in that case imho... based on
> the
> assumption that a common practice is worth 10 standards :-)
It is of course "defensive programming", in that a device
tree like that also works with badly broken OS code.
So perhaps we should indeed recommend this for Linux flat
device trees.
Which is not to say that the Linux parsing code shouldn't
be fixed (if it is broken at all, who knows).
> (I think I could even quote Linus on that one, let's just say that I
> totally agree with him on those matters, I'd rather have people
> "standardize" around existing common practices that happen to also work
> well with existing code rather than doing differently because that's
> what a 10 yrs old unmaintained piece of pdf says should be done :-)
OTOH, you need a few people doing the "interesting" cases,
so you can find and fix the flaws in your OS code :-)
Segher
^ permalink raw reply
* Re: [RFC] Device tree for new desktop platform in arch/powerpc
From: Benjamin Herrenschmidt @ 2007-06-22 8:16 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: list, David Gibson
In-Reply-To: <be8290e4a9e76608b8ede05deaaf91af@kernel.crashing.org>
On Fri, 2007-06-22 at 09:52 +0200, Segher Boessenkool wrote:
> >> The "#address-cells" property should be completely absent,
> >> even; for interrupt matching, that means "treat as 0, no
> >> unit address used in interrupt mapping, just the interrupt
> >> number", and for the "normal" purpose (defining the format
> >> of devices on the bus rooted at / represented by this node)
> >> it means "there is no such bus" -- this is different from
> >> #address-cells = 0.
> >
> > I'd rather have it present and explicitely set to 0,
>
> It is not the "right thing" to do, but should be harmless
> in most situations.
It's pretty much the right thing to do in that case imho... based on the
assumption that a common practice is worth 10 standards :-)
(I think I could even quote Linus on that one, let's just say that I
totally agree with him on those matters, I'd rather have people
"standardize" around existing common practices that happen to also work
well with existing code rather than doing differently because that's
what a 10 yrs old unmaintained piece of pdf says should be done :-)
Ben.
^ permalink raw reply
* Re: [PATCH v3] Create add_rtc() function to enable the RTC CMOS driver
From: Segher Boessenkool @ 2007-06-22 7:56 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev, paulus
In-Reply-To: <20070622033158.GA21419@localhost.localdomain>
> Hrm. It seems rather specific. Can we do this more generally, by
> creating an of_platform device which binds to rtc nodes, then
> registers an appropriate platform device for each so that the generic
> rtc drivers pick them up. Obviously we'd need some sort of table
> mapping the device node compatible properties to the appropriate
> platform device names.
>> + * RTC_PORT(x) is hardcoded in asm/mc146818rtc.h. Verify that the
>> + * address provided by the device node matches.
>> + */
>> + if (res.start != RTC_PORT(0)) {
>> + of_node_put(np);
>> + return -ENODEV;
>> + }
>
> This looks totally bogus. If we have a device tree we should be using
> the address information from there, not using hardcoded magic. Sounds
> like asm/mc146818rtc.h needs some serious fixing.
Both of your comments would be nice extensions (and the right
way forwards), but Wade's patch is good as-is already.
Segher
^ permalink raw reply
* Re: [RFC] Device tree for new desktop platform in arch/powerpc
From: Segher Boessenkool @ 2007-06-22 7:52 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: list, David Gibson
In-Reply-To: <1182468325.24740.18.camel@localhost.localdomain>
>> The "#address-cells" property should be completely absent,
>> even; for interrupt matching, that means "treat as 0, no
>> unit address used in interrupt mapping, just the interrupt
>> number", and for the "normal" purpose (defining the format
>> of devices on the bus rooted at / represented by this node)
>> it means "there is no such bus" -- this is different from
>> #address-cells = 0.
>
> I'd rather have it present and explicitely set to 0,
It is not the "right thing" to do, but should be harmless
in most situations.
> which happens to be
> what both Apple and IBM OF implementations also do. Have you verified
> if
> the linux parser behaves properly if it's absent ?
No, I haven't. I prefer following the standard instead of simply
making the code work with one or two implementations; I hope
you did the same :-)
If it doesn't work, it's simply a bug in Linux.
Segher
^ permalink raw reply
* Re: Move iSeries_tb_recal from do_settimeofday() into it's own late_initcall.
From: Tony Breeds @ 2007-06-22 6:54 UTC (permalink / raw)
To: Michael Ellerman; +Cc: LinuxPPC-dev, Stephen Rothwell
In-Reply-To: <1182492836.5760.10.camel@concordia.ozlabs.ibm.com>
On Fri, Jun 22, 2007 at 04:13:56PM +1000, Michael Ellerman wrote:
> The safer option would be to have the init call schedule work for 40-60
> seconds after boot, but it's up to you :)
Ummm is "no" a valid answer?
Seriously though the 40-60 second delay is mostly udev starting (which
takes a full 30 of them), as this code predates udev I think this patch
is restoring the timing to somthing closer to the oriinal intent (but
then again I'm not a mind reader, nor a time lord so I could be wrong).
I did a few boot tests, 10 with and 10 without the patch.
The mean delta without the patch is 123.1 and wiht it's 122.9, so I'm
pretty confident that calling the recalibration earlier isn't going to
have a large impact.
> While you're at it, can you de-camelcase the names? Same comment
> elsewhere.
Not in this patch:
$yacks{tony}++;
> Is ENODEV the magic "init-call didn't actually fail" value? You don't
> want anything in the log.
Yes -ENODEV is magic for initcalls, You'll only see anything in your
logs if you boot with initcall_debug=1.
> The comment is only going to be wrong once someone moves something
> around. Better still, why not put this code in setup.c?
Yeah okay that comment is lame. As to moving the code,
iSeries_tb_recal() uses (static) functions from time.c and I though it
was better to place it here than export them.
> Newline here please :)
Sure.
> I don't think we bother with #ifdef around externs, unless you're
> providing a no-op version.
Ooops yup leaving the extern defined is okay :/
Below is an updated version for your viewing pleasure.
From: Tony Breeds <tony@bakeyournoodle.com>
Move iSeries_tb_recal from do_settimeofday() into it's own late_initcall.
Currently iSeries will recalibrate the cputime_factors, from the first
settimeofday() call.
It seems the reason for doing this is to ensure a resaonable time delta after
time_init(). On current kernels (with udev), this call is made 40-60 seconds
into the boot process, by moving it to a late initcall it is called
approximately 5 seconds after time_init() is called. This is sufficient to
recalibrate the timebase.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
CC: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/time.c | 30 +++++++++++++++----------
arch/powerpc/platforms/iseries/setup.c | 7 +----
include/asm-powerpc/time.h | 4 +++
3 files changed, 25 insertions(+), 16 deletions(-)
Index: working/arch/powerpc/kernel/time.c
===================================================================
--- working.orig/arch/powerpc/kernel/time.c
+++ working/arch/powerpc/kernel/time.c
@@ -77,9 +77,8 @@
/* keep track of when we need to update the rtc */
time_t last_rtc_update;
#ifdef CONFIG_PPC_ISERIES
-unsigned long iSeries_recal_titan = 0;
-unsigned long iSeries_recal_tb = 0;
-static unsigned long first_settimeofday = 1;
+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. */
@@ -551,10 +550,15 @@ EXPORT_SYMBOL(profile_pc);
* returned by the service processor for the timebase frequency.
*/
-static void iSeries_tb_recal(void)
+static int __init iSeries_tb_recal(void)
{
struct div_result divres;
unsigned long titan, tb;
+
+ /* Make sure we only run on iSeries */
+ if (!firmware_has_feature(FW_FEATURE_ISERIES))
+ return -ENODEV;
+
tb = get_tb();
titan = HvCallXm_loadTod();
if ( iSeries_recal_titan ) {
@@ -595,8 +599,18 @@ static void iSeries_tb_recal(void)
}
iSeries_recal_titan = titan;
iSeries_recal_tb = tb;
+
+ return 0;
}
-#endif
+late_initcall(iSeries_tb_recal);
+
+/* Called from platform early init */
+void __init iSeries_time_init_early(void)
+{
+ iSeries_recal_tb = get_tb();
+ iSeries_recal_titan = HvCallXm_loadTod();
+}
+#endif /* CONFIG_PPC_ISERIES */
/*
* For iSeries shared processors, we have to let the hypervisor
@@ -760,12 +774,6 @@ int do_settimeofday(struct timespec *tv)
* to the RTC again, or write to the RTC but then they don't call
* settimeofday to perform this operation.
*/
-#ifdef CONFIG_PPC_ISERIES
- if (firmware_has_feature(FW_FEATURE_ISERIES) && first_settimeofday) {
- iSeries_tb_recal();
- first_settimeofday = 0;
- }
-#endif
/* Make userspace gettimeofday spin until we're done. */
++vdso_data->tb_update_count;
Index: working/arch/powerpc/platforms/iseries/setup.c
===================================================================
--- working.orig/arch/powerpc/platforms/iseries/setup.c
+++ working/arch/powerpc/platforms/iseries/setup.c
@@ -79,8 +79,6 @@ extern void iSeries_pci_final_fixup(void
static void iSeries_pci_final_fixup(void) { }
#endif
-extern unsigned long iSeries_recal_tb;
-extern unsigned long iSeries_recal_titan;
struct MemoryBlock {
unsigned long absStart;
@@ -292,8 +290,8 @@ static void __init iSeries_init_early(vo
{
DBG(" -> iSeries_init_early()\n");
- iSeries_recal_tb = get_tb();
- iSeries_recal_titan = HvCallXm_loadTod();
+ /* Snapshot the timebase, for use in later recalibration */
+ iSeries_time_init_early();
/*
* Initialize the DMA/TCE management
Index: working/include/asm-powerpc/time.h
===================================================================
--- working.orig/include/asm-powerpc/time.h
+++ working/include/asm-powerpc/time.h
@@ -240,5 +240,7 @@ extern void snapshot_timebases(void);
#define snapshot_timebases() do { } while (0)
#endif
+extern void iSeries_time_init_early(void);
+
#endif /* __KERNEL__ */
#endif /* __POWERPC_TIME_H */
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] clocksouce implementation for powerpc
From: Tony Breeds @ 2007-06-22 6:28 UTC (permalink / raw)
To: john stultz
Cc: Andrew Morton, Daniel Walker, LKML, LinuxPPC-dev, Thomas Gleixner,
Ingo Molnar
In-Reply-To: <1182373561.6559.39.camel@localhost.localdomain>
On Wed, Jun 20, 2007 at 02:06:01PM -0700, john stultz wrote:
Hi John.
> Hey Tony,
> Thanks for sending this out! I really appreciate this work, as its been
> on my todo forever, and I've just not been able to focus on it.
> Currently it seems a bit minimal of a conversion (ideally there should
> be very little time code left), but It looks like a great start!
Thanks.
> I might be missing a subtlety in the ppc code, but I'm still not sure if
> I see the need for the clocksource settimeofday hook.
>
> update_vsyscall() is intended to provide a hook that allows the generic
> time code to provide all the needed timekeeping state to the arch
> specific vsyscall implementation. It is called any time the base
> timekeeping variables are changed.
Well as I just said the Daniel, I was under the impression I needed a
hook that was only called from settimeofday(). The comments I've
recieved from everyone has given me good cause to re-evaluate.
I think I can make it work without the hook, that started this
discussion. Thomas, I think it's probably best to axe it now. If I
/really/ need it then I'll start the discussion again :) Thanks.
> I think it would be enlightening to flatten this out a bit. Putting both
> the timer_recalc_offset and clocksource_settime code in the same
> function. It might illustrate where some optimizations could be done and
> where it might make more sense to split things up.
>
> Also I'd leave timer_check_rtc() in the timer_interrupt for now (later
> moving it to tglx's generic rtc update).
Yes you're rigth I don't need to move the timer_check_rtc() call.
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] clocksouce implementation for powerpc
From: Tony Breeds @ 2007-06-22 6:23 UTC (permalink / raw)
To: Daniel Walker
Cc: Andrew Morton, john stultz, LKML, LinuxPPC-dev, Thomas Gleixner,
Ingo Molnar
In-Reply-To: <1182351439.18168.79.camel@imap.mvista.com>
On Wed, Jun 20, 2007 at 07:57:19AM -0700, Daniel Walker wrote:
Hi Daniel.
> As I said in our private thread, I do think you should be using
> update_vsyscall() .. update_vsyscall() is just called when the time is
> set, usually that happens in the timer interrupt and sometimes that
> happens in settimeofday() ..
Well I've taken another look at the code and I think I can probably
restructure my code to use update_vsyscall(). I thought I needed a
hook that was called /only/ from settimeofday() (which as you say
doesn't match update_vsyscall()'s usage).
I'll try again and see what problems I hit.
> At least some of your code is duplications over what is already being
> worked on inside the powerpc community.. For instance, I know there is
> already a timebase clocksource,
>
> http://people.redhat.com/~mingo/realtime-preempt/patch-2.6.21.5-rt17
Thanks. The one in -rt doesn't seem to support the VDSO. however I see
that there is duplication of effort there.
> Hmm .. This doesn't look like it's taking into account that the time has
> changed .. Your time has effectively incremented by one jiffie .. The
> vdso_data doesn't appear to be updated ..
Unless I miss your meaning, the vdso is updated in
timer_recalc_offset()/update_gtod() when needed.
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
* [PATCH 5/5] Add dcr_map_reg() helper
From: Michael Ellerman @ 2007-06-22 6:18 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <3cdc6bd05b505600609a79667f3674168e2e855b.1182493056.git.michael@ellerman.id.au>
Add a helper routine to map dcr's based on the "dcr-reg" property of
a device node.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/sysdev/dcr.c | 17 +++++++++++++++++
include/asm-powerpc/dcr.h | 1 +
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/sysdev/dcr.c b/arch/powerpc/sysdev/dcr.c
index f3c5646..da2ac7c 100644
--- a/arch/powerpc/sysdev/dcr.c
+++ b/arch/powerpc/sysdev/dcr.c
@@ -123,6 +123,23 @@ dcr_host_t dcr_map(struct device_node *dev, unsigned int dcr_n,
return ret;
}
+dcr_host_t dcr_map_reg(struct device_node *dev, unsigned int index)
+{
+ dcr_host_t ret = { .token = NULL };
+
+ unsigned int dcr_n, dcr_c;
+
+ dcr_n = dcr_resource_start(dev, index);
+ if (!dcr_n)
+ return ret;
+
+ dcr_c = dcr_resource_len(dev, index);
+ if (!dcr_c)
+ return ret;
+
+ return dcr_map(dev, dcr_n, dcr_c);
+}
+
void dcr_unmap(dcr_host_t host, unsigned int dcr_n, unsigned int dcr_c)
{
dcr_host_t h = host;
diff --git a/include/asm-powerpc/dcr.h b/include/asm-powerpc/dcr.h
index 9338d50..4d42f01 100644
--- a/include/asm-powerpc/dcr.h
+++ b/include/asm-powerpc/dcr.h
@@ -38,6 +38,7 @@ extern unsigned int dcr_resource_start(struct device_node *np,
unsigned int index);
extern unsigned int dcr_resource_len(struct device_node *np,
unsigned int index);
+extern dcr_host_t dcr_map_reg(struct device_node *np, unsigned int index);
#endif /* CONFIG_PPC_MERGE */
#endif /* CONFIG_PPC_DCR */
--
1.5.1.3.g7a33b
^ permalink raw reply related
* [PATCH 4/5] Add dcr_host_t.base in dcr_read()/dcr_write()
From: Michael Ellerman @ 2007-06-22 6:18 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <3cdc6bd05b505600609a79667f3674168e2e855b.1182493056.git.michael@ellerman.id.au>
Now that all users of dcr_read()/dcr_write() add the dcr_host_t.base, we can
save them the trouble and do it in dcr_read()/dcr_write().
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/sysdev/mpic.c | 4 ++--
drivers/net/ibm_emac/ibm_emac_mal.h | 4 ++--
include/asm-powerpc/dcr-mmio.h | 4 ++--
include/asm-powerpc/dcr-native.h | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 6c2e467..8cb8e13 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -156,7 +156,7 @@ static inline u32 _mpic_read(enum mpic_reg_type type,
switch(type) {
#ifdef CONFIG_PPC_DCR
case mpic_access_dcr:
- return dcr_read(rb->dhost, rb->dhost.base + reg);
+ return dcr_read(rb->dhost, reg);
#endif
case mpic_access_mmio_be:
return in_be32(rb->base + (reg >> 2));
@@ -173,7 +173,7 @@ static inline void _mpic_write(enum mpic_reg_type type,
switch(type) {
#ifdef CONFIG_PPC_DCR
case mpic_access_dcr:
- return dcr_write(rb->dhost, rb->dhost.base + reg, value);
+ return dcr_write(rb->dhost, reg, value);
#endif
case mpic_access_mmio_be:
return out_be32(rb->base + (reg >> 2), value);
diff --git a/drivers/net/ibm_emac/ibm_emac_mal.h b/drivers/net/ibm_emac/ibm_emac_mal.h
index 6b1fbeb..10dc978 100644
--- a/drivers/net/ibm_emac/ibm_emac_mal.h
+++ b/drivers/net/ibm_emac/ibm_emac_mal.h
@@ -208,12 +208,12 @@ struct ibm_ocp_mal {
static inline u32 get_mal_dcrn(struct ibm_ocp_mal *mal, int reg)
{
- return dcr_read(mal->dcrhost, mal->dcrhost.base + reg);
+ return dcr_read(mal->dcrhost, reg);
}
static inline void set_mal_dcrn(struct ibm_ocp_mal *mal, int reg, u32 val)
{
- dcr_write(mal->dcrhost, mal->dcrhost.base + reg, val);
+ dcr_write(mal->dcrhost, reg, val);
}
/* Register MAL devices */
diff --git a/include/asm-powerpc/dcr-mmio.h b/include/asm-powerpc/dcr-mmio.h
index 6b82c3b..a7d9eaf 100644
--- a/include/asm-powerpc/dcr-mmio.h
+++ b/include/asm-powerpc/dcr-mmio.h
@@ -37,12 +37,12 @@ extern void dcr_unmap(dcr_host_t host, unsigned int dcr_n, unsigned int dcr_c);
static inline u32 dcr_read(dcr_host_t host, unsigned int dcr_n)
{
- return in_be32(host.token + dcr_n * host.stride);
+ return in_be32(host.token + ((host.base + dcr_n) * host.stride));
}
static inline void dcr_write(dcr_host_t host, unsigned int dcr_n, u32 value)
{
- out_be32(host.token + dcr_n * host.stride, value);
+ out_be32(host.token + ((host.base + dcr_n) * host.stride), value);
}
extern u64 of_translate_dcr_address(struct device_node *dev,
diff --git a/include/asm-powerpc/dcr-native.h b/include/asm-powerpc/dcr-native.h
index f41058c..3bc780f 100644
--- a/include/asm-powerpc/dcr-native.h
+++ b/include/asm-powerpc/dcr-native.h
@@ -30,8 +30,8 @@ typedef struct {
#define dcr_map(dev, dcr_n, dcr_c) ((dcr_host_t){ .base = (dcr_n) })
#define dcr_unmap(host, dcr_n, dcr_c) do {} while (0)
-#define dcr_read(host, dcr_n) mfdcr(dcr_n)
-#define dcr_write(host, dcr_n, value) mtdcr(dcr_n, value)
+#define dcr_read(host, dcr_n) mfdcr(dcr_n + host.base)
+#define dcr_write(host, dcr_n, value) mtdcr(dcr_n + host.base, value)
/* Device Control Registers */
void __mtdcr(int reg, unsigned int val);
--
1.5.1.3.g7a33b
^ permalink raw reply related
* [PATCH 3/5] Use dcr_host_t.base in ibm_emac_mal
From: Michael Ellerman @ 2007-06-22 6:18 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <3cdc6bd05b505600609a79667f3674168e2e855b.1182493056.git.michael@ellerman.id.au>
This requires us to do a sort-of fake dcr_map(), so that base is set
properly. This will be fixed/removed when the device-tree-aware emac driver
is merged.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
drivers/net/ibm_emac/ibm_emac_mal.c | 5 ++++-
drivers/net/ibm_emac/ibm_emac_mal.h | 5 ++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ibm_emac/ibm_emac_mal.c b/drivers/net/ibm_emac/ibm_emac_mal.c
index cabd984..b08da96 100644
--- a/drivers/net/ibm_emac/ibm_emac_mal.c
+++ b/drivers/net/ibm_emac/ibm_emac_mal.c
@@ -421,7 +421,10 @@ static int __init mal_probe(struct ocp_device *ocpdev)
ocpdev->def->index);
return -ENOMEM;
}
- mal->dcrbase = maldata->dcr_base;
+
+ /* XXX This only works for native dcr for now */
+ mal->dcrhost = dcr_map(NULL, maldata->dcr_base, 0);
+
mal->def = ocpdev->def;
INIT_LIST_HEAD(&mal->poll_list);
diff --git a/drivers/net/ibm_emac/ibm_emac_mal.h b/drivers/net/ibm_emac/ibm_emac_mal.h
index 64bc338..6b1fbeb 100644
--- a/drivers/net/ibm_emac/ibm_emac_mal.h
+++ b/drivers/net/ibm_emac/ibm_emac_mal.h
@@ -191,7 +191,6 @@ struct mal_commac {
};
struct ibm_ocp_mal {
- int dcrbase;
dcr_host_t dcrhost;
struct list_head poll_list;
@@ -209,12 +208,12 @@ struct ibm_ocp_mal {
static inline u32 get_mal_dcrn(struct ibm_ocp_mal *mal, int reg)
{
- return dcr_read(mal->dcrhost, mal->dcrbase + reg);
+ return dcr_read(mal->dcrhost, mal->dcrhost.base + reg);
}
static inline void set_mal_dcrn(struct ibm_ocp_mal *mal, int reg, u32 val)
{
- dcr_write(mal->dcrhost, mal->dcrbase + reg, val);
+ dcr_write(mal->dcrhost, mal->dcrhost.base + reg, val);
}
/* Register MAL devices */
--
1.5.1.3.g7a33b
^ permalink raw reply related
* [PATCH 2/5] Update mpic to use dcr_host_t.base
From: Michael Ellerman @ 2007-06-22 6:18 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <3cdc6bd05b505600609a79667f3674168e2e855b.1182493056.git.michael@ellerman.id.au>
Now that dcr_host_t contains the base address, we can use that in the mpic
code, rather than storing it separately.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/sysdev/mpic.c | 28 +++++++++++-----------------
include/asm-powerpc/mpic.h | 6 ------
2 files changed, 11 insertions(+), 23 deletions(-)
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 75aad38..6c2e467 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -156,8 +156,7 @@ static inline u32 _mpic_read(enum mpic_reg_type type,
switch(type) {
#ifdef CONFIG_PPC_DCR
case mpic_access_dcr:
- return dcr_read(rb->dhost,
- rb->dbase + reg + rb->doff);
+ return dcr_read(rb->dhost, rb->dhost.base + reg);
#endif
case mpic_access_mmio_be:
return in_be32(rb->base + (reg >> 2));
@@ -174,8 +173,7 @@ static inline void _mpic_write(enum mpic_reg_type type,
switch(type) {
#ifdef CONFIG_PPC_DCR
case mpic_access_dcr:
- return dcr_write(rb->dhost,
- rb->dbase + reg + rb->doff, value);
+ return dcr_write(rb->dhost, rb->dhost.base + reg, value);
#endif
case mpic_access_mmio_be:
return out_be32(rb->base + (reg >> 2), value);
@@ -269,9 +267,11 @@ static void _mpic_map_mmio(struct mpic *mpic, unsigned long phys_addr,
static void _mpic_map_dcr(struct mpic *mpic, struct mpic_reg_bank *rb,
unsigned int offset, unsigned int size)
{
- rb->dbase = mpic->dcr_base;
- rb->doff = offset;
- rb->dhost = dcr_map(mpic->of_node, rb->dbase + rb->doff, size);
+ const u32 *dbasep;
+
+ dbasep = of_get_property(mpic->of_node, "dcr-reg", NULL);
+
+ rb->dhost = dcr_map(mpic->of_node, *dbasep + offset, size);
BUG_ON(!DCR_MAP_OK(rb->dhost));
}
@@ -1047,20 +1047,14 @@ struct mpic * __init mpic_alloc(struct device_node *node,
BUG_ON(paddr == 0 && node == NULL);
/* If no physical address passed in, check if it's dcr based */
- if (paddr == 0 && of_get_property(node, "dcr-reg", NULL) != NULL)
- mpic->flags |= MPIC_USES_DCR;
-
+ if (paddr == 0 && of_get_property(node, "dcr-reg", NULL) != NULL) {
#ifdef CONFIG_PPC_DCR
- if (mpic->flags & MPIC_USES_DCR) {
- const u32 *dbasep;
- dbasep = of_get_property(node, "dcr-reg", NULL);
- BUG_ON(dbasep == NULL);
- mpic->dcr_base = *dbasep;
+ mpic->flags |= MPIC_USES_DCR;
mpic->reg_type = mpic_access_dcr;
- }
#else
- BUG_ON (mpic->flags & MPIC_USES_DCR);
+ BUG();
#endif /* CONFIG_PPC_DCR */
+ }
/* If the MPIC is not DCR based, and no physical address was passed
* in, try to obtain one
diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h
index 2ffb06a..11b8e51 100644
--- a/include/asm-powerpc/mpic.h
+++ b/include/asm-powerpc/mpic.h
@@ -224,8 +224,6 @@ struct mpic_reg_bank {
u32 __iomem *base;
#ifdef CONFIG_PPC_DCR
dcr_host_t dhost;
- unsigned int dbase;
- unsigned int doff;
#endif /* CONFIG_PPC_DCR */
};
@@ -292,10 +290,6 @@ struct mpic
struct mpic_reg_bank cpuregs[MPIC_MAX_CPUS];
struct mpic_reg_bank isus[MPIC_MAX_ISU];
-#ifdef CONFIG_PPC_DCR
- unsigned int dcr_base;
-#endif
-
#ifdef CONFIG_MPIC_WEIRD
/* Pointer to HW info array */
u32 *hw_set;
--
1.5.1.3.g7a33b
^ permalink raw reply related
* [PATCH 1/5] Store the base address in dcr_host_t
From: Michael Ellerman @ 2007-06-22 6:18 UTC (permalink / raw)
To: linuxppc-dev
In its current form, dcr_map() doesn't remember the base address you passed
it, which means you need to store it somewhere else. Rather than adding the
base to another struct it seems simpler to store it in the dcr_host_t.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/sysdev/dcr.c | 2 +-
include/asm-powerpc/dcr-mmio.h | 6 +++++-
include/asm-powerpc/dcr-native.h | 6 ++++--
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/sysdev/dcr.c b/arch/powerpc/sysdev/dcr.c
index 574b6ef..f3c5646 100644
--- a/arch/powerpc/sysdev/dcr.c
+++ b/arch/powerpc/sysdev/dcr.c
@@ -102,7 +102,7 @@ u64 of_translate_dcr_address(struct device_node *dev,
dcr_host_t dcr_map(struct device_node *dev, unsigned int dcr_n,
unsigned int dcr_c)
{
- dcr_host_t ret = { .token = NULL, .stride = 0 };
+ dcr_host_t ret = { .token = NULL, .stride = 0, .base = dcr_n };
u64 addr;
pr_debug("dcr_map(%s, 0x%x, 0x%x)\n",
diff --git a/include/asm-powerpc/dcr-mmio.h b/include/asm-powerpc/dcr-mmio.h
index 5dbfca8..6b82c3b 100644
--- a/include/asm-powerpc/dcr-mmio.h
+++ b/include/asm-powerpc/dcr-mmio.h
@@ -23,7 +23,11 @@
#include <asm/io.h>
-typedef struct { void __iomem *token; unsigned int stride; } dcr_host_t;
+typedef struct {
+ void __iomem *token;
+ unsigned int stride;
+ unsigned int base;
+} dcr_host_t;
#define DCR_MAP_OK(host) ((host).token != NULL)
diff --git a/include/asm-powerpc/dcr-native.h b/include/asm-powerpc/dcr-native.h
index 05af081..f41058c 100644
--- a/include/asm-powerpc/dcr-native.h
+++ b/include/asm-powerpc/dcr-native.h
@@ -22,11 +22,13 @@
#ifdef __KERNEL__
#ifndef __ASSEMBLY__
-typedef struct {} dcr_host_t;
+typedef struct {
+ unsigned int base;
+} dcr_host_t;
#define DCR_MAP_OK(host) (1)
-#define dcr_map(dev, dcr_n, dcr_c) ((dcr_host_t){})
+#define dcr_map(dev, dcr_n, dcr_c) ((dcr_host_t){ .base = (dcr_n) })
#define dcr_unmap(host, dcr_n, dcr_c) do {} while (0)
#define dcr_read(host, dcr_n) mfdcr(dcr_n)
#define dcr_write(host, dcr_n, value) mtdcr(dcr_n, value)
--
1.5.1.3.g7a33b
^ permalink raw reply related
* Re: Move iSeries_tb_recal from do_settimeofday() into it's own late_initcall.
From: Michael Ellerman @ 2007-06-22 6:13 UTC (permalink / raw)
To: Tony Breeds; +Cc: LinuxPPC-dev, Stephen Rothwell
In-Reply-To: <20070622054324.GV9768@bakeyournoodle.com>
[-- Attachment #1: Type: text/plain, Size: 5463 bytes --]
On Fri, 2007-06-22 at 15:43 +1000, Tony Breeds wrote:
> Move iSeries_tb_recal from do_settimeofday() into it's own late_initcall.
>
> Currently iSeries will recalibrate the cputime_factors, from the first
> settimeofday() call.
>
> It seems the reason for doing this is to ensure a resaonable time delta after
> time_init(). On current kernels (with udev), this call is made 40-60 seconds
> into the boot process, by moving it to a late initcall it is called
> approximately 5 seconds after time_init() is called. This is sufficient to
> recalibrate the timebase.
Gutsy :)
The safer option would be to have the init call schedule work for 40-60
seconds after boot, but it's up to you :)
>
>
>
> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
> CC: Stephen Rothwell <sfr@canb.auug.org.au>
>
> ---
>
> arch/powerpc/kernel/time.c | 30 +++++++++++++++----------
> arch/powerpc/platforms/iseries/setup.c | 7 +----
> include/asm-powerpc/time.h | 4 +++
> 3 files changed, 25 insertions(+), 16 deletions(-)
>
> Index: working/arch/powerpc/kernel/time.c
> ===================================================================
> --- working.orig/arch/powerpc/kernel/time.c 2007-06-22 11:02:24.000000000 +1000
> +++ working/arch/powerpc/kernel/time.c 2007-06-22 11:40:44.000000000 +1000
> @@ -77,9 +77,8 @@
> /* keep track of when we need to update the rtc */
> time_t last_rtc_update;
> #ifdef CONFIG_PPC_ISERIES
> -unsigned long iSeries_recal_titan = 0;
> -unsigned long iSeries_recal_tb = 0;
> -static unsigned long first_settimeofday = 1;
> +static unsigned long __initdata iSeries_recal_titan;
> +static signed long __initdata iSeries_recal_tb;
> #endif
While you're at it, can you de-camelcase the names? Same comment
elsewhere.
> /* The decrementer counts down by 128 every 128ns on a 601. */
> @@ -551,10 +550,15 @@ EXPORT_SYMBOL(profile_pc);
> * returned by the service processor for the timebase frequency.
> */
>
> -static void iSeries_tb_recal(void)
> +static int __init iSeries_tb_recal(void)
> {
> struct div_result divres;
> unsigned long titan, tb;
> +
> + /* Make sure we only run on iSeries */
> + if (!firmware_has_feature(FW_FEATURE_ISERIES))
> + return -ENODEV;
Is ENODEV the magic "init-call didn't actually fail" value? You don't
want anything in the log.
> +
> tb = get_tb();
> titan = HvCallXm_loadTod();
> if ( iSeries_recal_titan ) {
> @@ -595,8 +599,18 @@ static void iSeries_tb_recal(void)
> }
> iSeries_recal_titan = titan;
> iSeries_recal_tb = tb;
> +
> + return 0;
> }
> -#endif
> +late_initcall(iSeries_tb_recal);
> +
> +/* Called from platforms/iseries/setup.c:iSeries_init_early() */
The comment is only going to be wrong once someone moves something
around. Better still, why not put this code in setup.c?
> +void __init iSeries_time_init_early(void)
> +{
> + iSeries_recal_tb = get_tb();
> + iSeries_recal_titan = HvCallXm_loadTod();
> +}
> +#endif /* CONFIG_PPC_ISERIES */
>
> /*
> * For iSeries shared processors, we have to let the hypervisor
> @@ -760,12 +774,6 @@ int do_settimeofday(struct timespec *tv)
> * to the RTC again, or write to the RTC but then they don't call
> * settimeofday to perform this operation.
> */
> -#ifdef CONFIG_PPC_ISERIES
> - if (firmware_has_feature(FW_FEATURE_ISERIES) && first_settimeofday) {
> - iSeries_tb_recal();
> - first_settimeofday = 0;
> - }
> -#endif
>
> /* Make userspace gettimeofday spin until we're done. */
> ++vdso_data->tb_update_count;
> Index: working/arch/powerpc/platforms/iseries/setup.c
> ===================================================================
> --- working.orig/arch/powerpc/platforms/iseries/setup.c 2007-06-22 11:02:42.000000000 +1000
> +++ working/arch/powerpc/platforms/iseries/setup.c 2007-06-22 11:10:04.000000000 +1000
> @@ -79,8 +79,6 @@ extern void iSeries_pci_final_fixup(void
> static void iSeries_pci_final_fixup(void) { }
> #endif
>
> -extern unsigned long iSeries_recal_tb;
> -extern unsigned long iSeries_recal_titan;
>
> struct MemoryBlock {
> unsigned long absStart;
> @@ -292,9 +290,8 @@ static void __init iSeries_init_early(vo
> {
> DBG(" -> iSeries_init_early()\n");
>
> - iSeries_recal_tb = get_tb();
> - iSeries_recal_titan = HvCallXm_loadTod();
> -
> + /* Snapshot the timebase, for use in later recalibration */
> + iSeries_time_init_early();
Newline here please :)
> /*
> * Initialize the DMA/TCE management
> */
> Index: working/include/asm-powerpc/time.h
> ===================================================================
> --- working.orig/include/asm-powerpc/time.h 2007-06-22 11:03:37.000000000 +1000
> +++ working/include/asm-powerpc/time.h 2007-06-22 11:40:59.000000000 +1000
> @@ -240,5 +240,9 @@ extern void snapshot_timebases(void);
> #define snapshot_timebases() do { } while (0)
> #endif
>
> +#ifdef CONFIG_PPC_ISERIES
> +extern void iSeries_time_init_early(void);
> +#endif
I don't think we bother with #ifdef around externs, unless you're
providing a no-op version.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [RFC] clocksouce implementation for powerpc
From: Tony Breeds @ 2007-06-22 6:10 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Andrew Morton, Daniel Walker, john stultz, LKML, LinuxPPC-dev,
Thomas Gleixner, Ingo Molnar
In-Reply-To: <46795B9B.2020401@ru.mvista.com>
On Wed, Jun 20, 2007 at 08:53:47PM +0400, Sergei Shtylyov wrote:
Hi Sergei,
Thanks for taking the time to look over my patch.
> I guess it's been based on the prior work by John Stultz (and me too :-)?
At some level I guess so. John did send me a patch a while ago.
> If you mean the init. part, this has been already done by me -- I've
> implemented read_persistent_clock() and got rid of xtime setting. What's
> left is to implemet update_persistent_clock() and get rid of
> timer_check_rtc()...
Actually I think that comment is redundant. and should be removed
sorry.
> Perhaps we even need to raise the rating to 300 or 400 -- according to
> what <linux/clocksource.h> says?
Sure.
> >+ .flags = CLOCK_SOURCE_IS_CONTINUOUS,
> >+ .mask = CLOCKSOURCE_MASK(64),
> >+ .shift = 22,
>
> PPC64 has issues with the fixed shift value, see:
>
> http://patchwork.ozlabs.org/linuxppc/patch?id=11125
Thanks!
> >+ .mult = 0, /* To be filled in */
> >+ .read = NULL, /* To be filled in */
> >+ .settimeofday = NULL, /* To be filled in */
>
> I don't quite understand why not just init them right away? The values
> are fixed anyways.
Well at least mult needs to be calculated at runtime, and I prefer to
have the structure near the top of the file at which stage the
read/settimeofday functions aren't defined.
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: Move iSeries_tb_recal from do_settimeofday() into it's own late_initcall.
From: Stephen Rothwell @ 2007-06-22 6:03 UTC (permalink / raw)
To: Tony Breeds; +Cc: LinuxPPC-dev
In-Reply-To: <20070622054324.GV9768@bakeyournoodle.com>
[-- Attachment #1: Type: text/plain, Size: 830 bytes --]
On Fri, 22 Jun 2007 15:43:24 +1000 tony@bakeyournoodle.com (Tony Breeds) wrote:
>
> Move iSeries_tb_recal from do_settimeofday() into it's own late_initcall.
>
> Currently iSeries will recalibrate the cputime_factors, from the first
> settimeofday() call.
>
> It seems the reason for doing this is to ensure a resaonable time delta after
> time_init(). On current kernels (with udev), this call is made 40-60 seconds
> into the boot process, by moving it to a late initcall it is called
> approximately 5 seconds after time_init() is called. This is sufficient to
> recalibrate the timebase.
>
> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Move iSeries_tb_recal from do_settimeofday() into it's own late_initcall.
From: Tony Breeds @ 2007-06-22 5:43 UTC (permalink / raw)
To: LinuxPPC-dev, Stephen Rothwell
Move iSeries_tb_recal from do_settimeofday() into it's own late_initcall.
Currently iSeries will recalibrate the cputime_factors, from the first
settimeofday() call.
It seems the reason for doing this is to ensure a resaonable time delta after
time_init(). On current kernels (with udev), this call is made 40-60 seconds
into the boot process, by moving it to a late initcall it is called
approximately 5 seconds after time_init() is called. This is sufficient to
recalibrate the timebase.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
CC: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/time.c | 30 +++++++++++++++----------
arch/powerpc/platforms/iseries/setup.c | 7 +----
include/asm-powerpc/time.h | 4 +++
3 files changed, 25 insertions(+), 16 deletions(-)
Index: working/arch/powerpc/kernel/time.c
===================================================================
--- working.orig/arch/powerpc/kernel/time.c 2007-06-22 11:02:24.000000000 +1000
+++ working/arch/powerpc/kernel/time.c 2007-06-22 11:40:44.000000000 +1000
@@ -77,9 +77,8 @@
/* keep track of when we need to update the rtc */
time_t last_rtc_update;
#ifdef CONFIG_PPC_ISERIES
-unsigned long iSeries_recal_titan = 0;
-unsigned long iSeries_recal_tb = 0;
-static unsigned long first_settimeofday = 1;
+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. */
@@ -551,10 +550,15 @@ EXPORT_SYMBOL(profile_pc);
* returned by the service processor for the timebase frequency.
*/
-static void iSeries_tb_recal(void)
+static int __init iSeries_tb_recal(void)
{
struct div_result divres;
unsigned long titan, tb;
+
+ /* Make sure we only run on iSeries */
+ if (!firmware_has_feature(FW_FEATURE_ISERIES))
+ return -ENODEV;
+
tb = get_tb();
titan = HvCallXm_loadTod();
if ( iSeries_recal_titan ) {
@@ -595,8 +599,18 @@ static void iSeries_tb_recal(void)
}
iSeries_recal_titan = titan;
iSeries_recal_tb = tb;
+
+ return 0;
}
-#endif
+late_initcall(iSeries_tb_recal);
+
+/* Called from platforms/iseries/setup.c:iSeries_init_early() */
+void __init iSeries_time_init_early(void)
+{
+ iSeries_recal_tb = get_tb();
+ iSeries_recal_titan = HvCallXm_loadTod();
+}
+#endif /* CONFIG_PPC_ISERIES */
/*
* For iSeries shared processors, we have to let the hypervisor
@@ -760,12 +774,6 @@ int do_settimeofday(struct timespec *tv)
* to the RTC again, or write to the RTC but then they don't call
* settimeofday to perform this operation.
*/
-#ifdef CONFIG_PPC_ISERIES
- if (firmware_has_feature(FW_FEATURE_ISERIES) && first_settimeofday) {
- iSeries_tb_recal();
- first_settimeofday = 0;
- }
-#endif
/* Make userspace gettimeofday spin until we're done. */
++vdso_data->tb_update_count;
Index: working/arch/powerpc/platforms/iseries/setup.c
===================================================================
--- working.orig/arch/powerpc/platforms/iseries/setup.c 2007-06-22 11:02:42.000000000 +1000
+++ working/arch/powerpc/platforms/iseries/setup.c 2007-06-22 11:10:04.000000000 +1000
@@ -79,8 +79,6 @@ extern void iSeries_pci_final_fixup(void
static void iSeries_pci_final_fixup(void) { }
#endif
-extern unsigned long iSeries_recal_tb;
-extern unsigned long iSeries_recal_titan;
struct MemoryBlock {
unsigned long absStart;
@@ -292,9 +290,8 @@ static void __init iSeries_init_early(vo
{
DBG(" -> iSeries_init_early()\n");
- iSeries_recal_tb = get_tb();
- iSeries_recal_titan = HvCallXm_loadTod();
-
+ /* Snapshot the timebase, for use in later recalibration */
+ iSeries_time_init_early();
/*
* Initialize the DMA/TCE management
*/
Index: working/include/asm-powerpc/time.h
===================================================================
--- working.orig/include/asm-powerpc/time.h 2007-06-22 11:03:37.000000000 +1000
+++ working/include/asm-powerpc/time.h 2007-06-22 11:40:59.000000000 +1000
@@ -240,5 +240,9 @@ extern void snapshot_timebases(void);
#define snapshot_timebases() do { } while (0)
#endif
+#ifdef CONFIG_PPC_ISERIES
+extern void iSeries_time_init_early(void);
+#endif
+
#endif /* __KERNEL__ */
#endif /* __POWERPC_TIME_H */
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
* Split out asm-ppc/mmu.h portions for PowerPC 8xx
From: David Gibson @ 2007-06-22 4:58 UTC (permalink / raw)
To: linuxppc-dev
arch/powerpc still relies on asm-ppc/mmu.h for some 32-bit MMU types.
This patch is another step towards fixing this. It takes the portions
of asm-ppc/mmu.h related to 8xx embedded CPUs which are still relevant
in arch/powerpc and puts them in a new asm-powerpc/mmu-8xx.h,
included when appropriate from asm-powerpc/mmu.h.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
This applies on top of my earlier patch splitting out the Freescale
Book-E portions of mmu.h. I've compiled this (with
mpc866_ads_defconfig) but can someone with access to an 8xx system
give it a whirl?
Index: working-2.6/include/asm-powerpc/mmu.h
===================================================================
--- working-2.6.orig/include/asm-powerpc/mmu.h 2007-06-22 14:38:56.000000000 +1000
+++ working-2.6/include/asm-powerpc/mmu.h 2007-06-22 14:41:53.000000000 +1000
@@ -14,10 +14,9 @@
#elif defined(CONFIG_FSL_BOOKE)
/* Freescale Book-E software loaded TLB */
# include <asm/mmu-fsl-booke.h>
-#else
-/* Other 32-bit. FIXME: split up the other 32-bit MMU types, and
- * revise for arch/powerpc */
-# include <asm-ppc/mmu.h>
+#elif defined (CONFIG_PPC_8xx)
+/* Motorola/Freescale 8xx software loaded TLB */
+# include <asm/mmu-8xx.h>
#endif
#endif /* __KERNEL__ */
Index: working-2.6/include/asm-powerpc/mmu-8xx.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ working-2.6/include/asm-powerpc/mmu-8xx.h 2007-06-22 14:38:56.000000000 +1000
@@ -0,0 +1,147 @@
+#ifndef _ASM_POWERPC_MMU_8XX_H_
+#define _ASM_POWERPC_MMU_8XX_H_
+/*
+ * PPC8xx support
+ */
+
+/* Control/status registers for the MPC8xx.
+ * A write operation to these registers causes serialized access.
+ * During software tablewalk, the registers used perform mask/shift-add
+ * operations when written/read. A TLB entry is created when the Mx_RPN
+ * is written, and the contents of several registers are used to
+ * create the entry.
+ */
+#define SPRN_MI_CTR 784 /* Instruction TLB control register */
+#define MI_GPM 0x80000000 /* Set domain manager mode */
+#define MI_PPM 0x40000000 /* Set subpage protection */
+#define MI_CIDEF 0x20000000 /* Set cache inhibit when MMU dis */
+#define MI_RSV4I 0x08000000 /* Reserve 4 TLB entries */
+#define MI_PPCS 0x02000000 /* Use MI_RPN prob/priv state */
+#define MI_IDXMASK 0x00001f00 /* TLB index to be loaded */
+#define MI_RESETVAL 0x00000000 /* Value of register at reset */
+
+/* These are the Ks and Kp from the PowerPC books. For proper operation,
+ * Ks = 0, Kp = 1.
+ */
+#define SPRN_MI_AP 786
+#define MI_Ks 0x80000000 /* Should not be set */
+#define MI_Kp 0x40000000 /* Should always be set */
+
+/* The effective page number register. When read, contains the information
+ * about the last instruction TLB miss. When MI_RPN is written, bits in
+ * this register are used to create the TLB entry.
+ */
+#define SPRN_MI_EPN 787
+#define MI_EPNMASK 0xfffff000 /* Effective page number for entry */
+#define MI_EVALID 0x00000200 /* Entry is valid */
+#define MI_ASIDMASK 0x0000000f /* ASID match value */
+ /* Reset value is undefined */
+
+/* A "level 1" or "segment" or whatever you want to call it register.
+ * For the instruction TLB, it contains bits that get loaded into the
+ * TLB entry when the MI_RPN is written.
+ */
+#define SPRN_MI_TWC 789
+#define MI_APG 0x000001e0 /* Access protection group (0) */
+#define MI_GUARDED 0x00000010 /* Guarded storage */
+#define MI_PSMASK 0x0000000c /* Mask of page size bits */
+#define MI_PS8MEG 0x0000000c /* 8M page size */
+#define MI_PS512K 0x00000004 /* 512K page size */
+#define MI_PS4K_16K 0x00000000 /* 4K or 16K page size */
+#define MI_SVALID 0x00000001 /* Segment entry is valid */
+ /* Reset value is undefined */
+
+/* Real page number. Defined by the pte. Writing this register
+ * causes a TLB entry to be created for the instruction TLB, using
+ * additional information from the MI_EPN, and MI_TWC registers.
+ */
+#define SPRN_MI_RPN 790
+
+/* Define an RPN value for mapping kernel memory to large virtual
+ * pages for boot initialization. This has real page number of 0,
+ * large page size, shared page, cache enabled, and valid.
+ * Also mark all subpages valid and write access.
+ */
+#define MI_BOOTINIT 0x000001fd
+
+#define SPRN_MD_CTR 792 /* Data TLB control register */
+#define MD_GPM 0x80000000 /* Set domain manager mode */
+#define MD_PPM 0x40000000 /* Set subpage protection */
+#define MD_CIDEF 0x20000000 /* Set cache inhibit when MMU dis */
+#define MD_WTDEF 0x10000000 /* Set writethrough when MMU dis */
+#define MD_RSV4I 0x08000000 /* Reserve 4 TLB entries */
+#define MD_TWAM 0x04000000 /* Use 4K page hardware assist */
+#define MD_PPCS 0x02000000 /* Use MI_RPN prob/priv state */
+#define MD_IDXMASK 0x00001f00 /* TLB index to be loaded */
+#define MD_RESETVAL 0x04000000 /* Value of register at reset */
+
+#define SPRN_M_CASID 793 /* Address space ID (context) to match */
+#define MC_ASIDMASK 0x0000000f /* Bits used for ASID value */
+
+
+/* These are the Ks and Kp from the PowerPC books. For proper operation,
+ * Ks = 0, Kp = 1.
+ */
+#define SPRN_MD_AP 794
+#define MD_Ks 0x80000000 /* Should not be set */
+#define MD_Kp 0x40000000 /* Should always be set */
+
+/* The effective page number register. When read, contains the information
+ * about the last instruction TLB miss. When MD_RPN is written, bits in
+ * this register are used to create the TLB entry.
+ */
+#define SPRN_MD_EPN 795
+#define MD_EPNMASK 0xfffff000 /* Effective page number for entry */
+#define MD_EVALID 0x00000200 /* Entry is valid */
+#define MD_ASIDMASK 0x0000000f /* ASID match value */
+ /* Reset value is undefined */
+
+/* The pointer to the base address of the first level page table.
+ * During a software tablewalk, reading this register provides the address
+ * of the entry associated with MD_EPN.
+ */
+#define SPRN_M_TWB 796
+#define M_L1TB 0xfffff000 /* Level 1 table base address */
+#define M_L1INDX 0x00000ffc /* Level 1 index, when read */
+ /* Reset value is undefined */
+
+/* A "level 1" or "segment" or whatever you want to call it register.
+ * For the data TLB, it contains bits that get loaded into the TLB entry
+ * when the MD_RPN is written. It is also provides the hardware assist
+ * for finding the PTE address during software tablewalk.
+ */
+#define SPRN_MD_TWC 797
+#define MD_L2TB 0xfffff000 /* Level 2 table base address */
+#define MD_L2INDX 0xfffffe00 /* Level 2 index (*pte), when read */
+#define MD_APG 0x000001e0 /* Access protection group (0) */
+#define MD_GUARDED 0x00000010 /* Guarded storage */
+#define MD_PSMASK 0x0000000c /* Mask of page size bits */
+#define MD_PS8MEG 0x0000000c /* 8M page size */
+#define MD_PS512K 0x00000004 /* 512K page size */
+#define MD_PS4K_16K 0x00000000 /* 4K or 16K page size */
+#define MD_WT 0x00000002 /* Use writethrough page attribute */
+#define MD_SVALID 0x00000001 /* Segment entry is valid */
+ /* Reset value is undefined */
+
+
+/* Real page number. Defined by the pte. Writing this register
+ * causes a TLB entry to be created for the data TLB, using
+ * additional information from the MD_EPN, and MD_TWC registers.
+ */
+#define SPRN_MD_RPN 798
+
+/* This is a temporary storage register that could be used to save
+ * a processor working register during a tablewalk.
+ */
+#define SPRN_M_TW 799
+
+#ifndef __ASSEMBLY__
+typedef unsigned long phys_addr_t;
+
+typedef struct {
+ unsigned long id;
+ unsigned long vdso_base;
+} mm_context_t;
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_POWERPC_MMU_8XX_H_ */
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH v3] Create add_rtc() function to enable the RTC CMOS driver
From: David Gibson @ 2007-06-22 3:31 UTC (permalink / raw)
To: Wade Farnsworth; +Cc: linuxppc-dev, paulus
In-Reply-To: <1182358772.5674.383.camel@rhino>
On Wed, Jun 20, 2007 at 09:59:32AM -0700, Wade Farnsworth wrote:
> In order to use the RTC CMOS driver, each architecture must register a
> platform device for the RTC.
>
> This creates a function to register the platform device based on the RTC
> device node and verifies that the RTC port against the hard-coded value
> in asm/mc146818rtc.h.
>
> Signed-off-by: Wade Farnsworth <wfarnsworth@mvista.com>
Hrm. It seems rather specific. Can we do this more generally, by
creating an of_platform device which binds to rtc nodes, then
registers an appropriate platform device for each so that the generic
rtc drivers pick them up. Obviously we'd need some sort of table
mapping the device node compatible properties to the appropriate
platform device names.
> Index: linux-2.6-powerpc-8641/arch/powerpc/sysdev/Makefile
> ===================================================================
> --- linux-2.6-powerpc-8641.orig/arch/powerpc/sysdev/Makefile
> +++ linux-2.6-powerpc-8641/arch/powerpc/sysdev/Makefile
> @@ -18,6 +18,7 @@ obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pc
> obj-$(CONFIG_QUICC_ENGINE) += qe_lib/
> mv64x60-$(CONFIG_PCI) += mv64x60_pci.o
> obj-$(CONFIG_MV64X60) += $(mv64x60-y) mv64x60_pic.o mv64x60_dev.o
> +obj-$(CONFIG_RTC_DRV_CMOS) += rtc_cmos_setup.o
>
> # contains only the suspend handler for time
> obj-$(CONFIG_PM) += timer.o
> Index: linux-2.6-powerpc-8641/arch/powerpc/sysdev/rtc_cmos_setup.c
> ===================================================================
> --- /dev/null
> +++ linux-2.6-powerpc-8641/arch/powerpc/sysdev/rtc_cmos_setup.c
> @@ -0,0 +1,51 @@
> +/*
> + * Setup code for PC-style Real-Time Clock.
> + *
> + * Author: Wade Farnsworth <wfarnsworth@mvista.com>
> + *
> + * 2007 (c) 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 <linux/platform_device.h>
> +#include <linux/err.h>
> +#include <linux/init.h>
> +#include <linux/mc146818rtc.h>
> +
> +#include <asm/prom.h>
> +
> +static int __init add_rtc(void)
> +{
> + struct device_node *np;
> + struct platform_device *pd;
> + struct resource res;
> +
> + np = of_find_compatible_node(NULL, NULL, "pnpPNP,b00");
> + if (!np)
> + return -ENODEV;
> +
> + if (of_address_to_resource(np, 0, &res)) {
> + of_node_put(np);
> + return -ENODEV;
> + }
> +
> + /*
> + * RTC_PORT(x) is hardcoded in asm/mc146818rtc.h. Verify that the
> + * address provided by the device node matches.
> + */
> + if (res.start != RTC_PORT(0)) {
> + of_node_put(np);
> + return -ENODEV;
> + }
This looks totally bogus. If we have a device tree we should be using
the address information from there, not using hardcoded magic. Sounds
like asm/mc146818rtc.h needs some serious fixing.
> +
> + pd = platform_device_register_simple("rtc_cmos", -1,
> + &res, 1);
> + of_node_put(np);
> + if (IS_ERR(pd))
> + return PTR_ERR(pd);
> +
> + return 0;
> +}
> +fs_initcall(add_rtc);
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH] [POWERPC] update g5_defconfig
From: Michael Ellerman @ 2007-06-21 23:42 UTC (permalink / raw)
To: will_schmidt; +Cc: ppc-dev, Paul Mackerras
In-Reply-To: <1182461834.25426.38.camel@farscape.rchland.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 4935 bytes --]
On Thu, 2007-06-21 at 16:37 -0500, Will Schmidt wrote:
> Update the g5_defconfig. This is choosing all defaults via "make
> oldconfig", then going back and enabling CONFIG_MACINTOSH_DRIVERS and
> options underneath that. Specifically this is to allow the windfarm
> driver to be automatically configured when building a defconfig kernel.
>
>
> Signed-off-by Will Schmidt <will_schmidt@vnet.ibm.com>
>
> ---
> g5_defconfig | 354 ++++++++++++++++++++++++++++++-----------------------------
> 1 file changed, 185 insertions(+), 169 deletions(-)
>
> diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
> index 3ccf19d..a47a41d 100644
> --- a/arch/powerpc/configs/g5_defconfig
> +++ b/arch/powerpc/configs/g5_defconfig
> @@ -1,7 +1,7 @@
> #
> # Automatically generated make config: don't edit
> -# Linux kernel version: 2.6.20-rc5
> -# Mon Jan 22 22:15:04 2007
> +# Linux kernel version: 2.6.22-rc5
> +# Thu Jun 21 15:53:16 2007
> #
> CONFIG_PPC64=y
> CONFIG_64BIT=y
> @@ -27,6 +27,7 @@ CONFIG_GENERIC_TBSYNC=y
> CONFIG_AUDIT_ARCH=y
> CONFIG_GENERIC_BUG=y
> # CONFIG_DEFAULT_UIMAGE is not set
> +CONFIG_PPC64_SWSUSP=y
>
> #
> # Processor support
> @@ -39,6 +40,7 @@ CONFIG_PPC_FPU=y
> # CONFIG_PPC_OF_PLATFORM_PCI is not set
> CONFIG_ALTIVEC=y
> CONFIG_PPC_STD_MMU=y
> +CONFIG_PPC_MM_SLICES=y
> CONFIG_VIRT_CPU_ACCOUNTING=y
> CONFIG_SMP=y
> CONFIG_NR_CPUS=4
> @@ -59,6 +61,7 @@ CONFIG_LOCALVERSION_AUTO=y
> CONFIG_SWAP=y
> CONFIG_SYSVIPC=y
> # CONFIG_IPC_NS is not set
> +CONFIG_SYSVIPC_SYSCTL=y
> CONFIG_POSIX_MQUEUE=y
> # CONFIG_BSD_PROCESS_ACCT is not set
> # CONFIG_TASKSTATS is not set
> @@ -66,9 +69,11 @@ CONFIG_POSIX_MQUEUE=y
> # CONFIG_AUDIT is not set
> CONFIG_IKCONFIG=y
> CONFIG_IKCONFIG_PROC=y
> +CONFIG_LOG_BUF_SHIFT=17
> # CONFIG_CPUSETS is not set
> CONFIG_SYSFS_DEPRECATED=y
> # CONFIG_RELAY is not set
> +CONFIG_BLK_DEV_INITRD=y
> CONFIG_INITRAMFS_SOURCE=""
> CONFIG_CC_OPTIMIZE_FOR_SIZE=y
> CONFIG_SYSCTL=y
> @@ -83,14 +88,19 @@ CONFIG_BUG=y
> CONFIG_ELF_CORE=y
> CONFIG_BASE_FULL=y
> CONFIG_FUTEX=y
> +CONFIG_ANON_INODES=y
> CONFIG_EPOLL=y
> +CONFIG_SIGNALFD=y
> +CONFIG_TIMERFD=y
> +CONFIG_EVENTFD=y
> CONFIG_SHMEM=y
> -CONFIG_SLAB=y
> CONFIG_VM_EVENT_COUNTERS=y
> +CONFIG_SLAB=y
> +# CONFIG_SLUB is not set
> +# CONFIG_SLOB is not set
> CONFIG_RT_MUTEXES=y
> # CONFIG_TINY_SHMEM is not set
> CONFIG_BASE_SMALL=0
> -# CONFIG_SLOB is not set
>
> #
> # Loadable module support
> @@ -131,15 +141,21 @@ CONFIG_PPC_MULTIPLATFORM=y
> # CONFIG_PPC_PSERIES is not set
> # CONFIG_PPC_ISERIES is not set
> # CONFIG_PPC_MPC52xx is not set
> +# CONFIG_PPC_MPC5200 is not set
> CONFIG_PPC_PMAC=y
> CONFIG_PPC_PMAC64=y
> # CONFIG_PPC_MAPLE is not set
> # CONFIG_PPC_PASEMI is not set
> +# CONFIG_PPC_CELLEB is not set
> +# CONFIG_PPC_PS3 is not set
> # CONFIG_PPC_CELL is not set
> # CONFIG_PPC_CELL_NATIVE is not set
> # CONFIG_PPC_IBM_CELL_BLADE is not set
> -# CONFIG_PPC_PS3 is not set
> +# CONFIG_PQ2ADS is not set
> CONFIG_PPC_NATIVE=y
> +CONFIG_MPIC=y
> +# CONFIG_MPIC_WEIRD is not set
> +# CONFIG_PPC_I8259 is not set
> CONFIG_U3_DART=y
> # CONFIG_PPC_RTAS is not set
> # CONFIG_MMIO_NVRAM is not set
> @@ -160,9 +176,12 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y
> CONFIG_CPU_FREQ_GOV_USERSPACE=y
> # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
> # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
> +
> +#
> +# CPU Frequency drivers
> +#
> CONFIG_CPU_FREQ_PMAC64=y
> -# CONFIG_WANT_EARLY_SERIAL is not set
> -CONFIG_MPIC=y
> +# CONFIG_CPM2 is not set
>
> #
> # Kernel options
> @@ -199,34 +218,34 @@ CONFIG_FLAT_NODE_MEM_MAP=y
> # CONFIG_SPARSEMEM_STATIC is not set
> CONFIG_SPLIT_PTLOCK_CPUS=4
> CONFIG_RESOURCES_64BIT=y
> +CONFIG_ZONE_DMA_FLAG=1
> +# CONFIG_PPC_HAS_HASH_64K is not set
> # CONFIG_PPC_64K_PAGES is not set
> # CONFIG_SCHED_SMT is not set
> CONFIG_PROC_DEVICETREE=y
> # CONFIG_CMDLINE_BOOL is not set
> # CONFIG_PM is not set
> CONFIG_SECCOMP=y
> +# CONFIG_WANT_DEVICE_TREE is not set
> CONFIG_ISA_DMA_API=y
>
> #
> # Bus options
> #
> +CONFIG_ZONE_DMA=y
> CONFIG_GENERIC_ISA_DMA=y
> -# CONFIG_MPIC_WEIRD is not set
> -# CONFIG_PPC_I8259 is not set
> # CONFIG_PPC_INDIRECT_PCI is not set
> CONFIG_PCI=y
> CONFIG_PCI_DOMAINS=y
> # CONFIG_PCIEPORTBUS is not set
> +CONFIG_ARCH_SUPPORTS_MSI=y
> +# CONFIG_PCI_MSI is not set
I think we should turn MSI on, it works fine on the G5 here, and the
drivers are pretty good at falling back to LSI if it doesn't work for
some reason.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [RFC] Device tree for new desktop platform in arch/powerpc
From: Benjamin Herrenschmidt @ 2007-06-21 23:25 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: list, David Gibson
In-Reply-To: <558860c3d90100cd18df5f9a66cce3f9@kernel.crashing.org>
> The "#address-cells" property should be completely absent,
> even; for interrupt matching, that means "treat as 0, no
> unit address used in interrupt mapping, just the interrupt
> number", and for the "normal" purpose (defining the format
> of devices on the bus rooted at / represented by this node)
> it means "there is no such bus" -- this is different from
> #address-cells = 0.
I'd rather have it present and explicitely set to 0, which happens to be
what both Apple and IBM OF implementations also do. Have you verified if
the linux parser behaves properly if it's absent ?
Ben.
^ permalink raw reply
* Re: [RFC] Device tree for new desktop platform in arch/powerpc
From: Benjamin Herrenschmidt @ 2007-06-21 23:22 UTC (permalink / raw)
To: Gerhard Pircher; +Cc: linuxppc-dev
In-Reply-To: <20070621132059.25900@gmx.net>
> > Haven't looked at your .dts yet but it should be "interrupt-controller",
> > compatible "chrp,iic" or "i8259", with a #interrupt-cells of 2 and
> > interrupts following the standard ISA encoding. You probably also want
> > an interrupt-parent property in the isa bridge node pointing back to the
> > 8259 so it becomes the default for all ISA devices.
> What about PCI devices? Wouldn't it better to define the interrupt-parent property in the PCI bus node?
PCI devices generally have their interrupts specified by an
interrupt-map in the PCI bridge.
Do you have the recommended practice "interrupt mapping" standard ?
It also allowed to make it optional to have nodes for the PCI devices in
slots, you can provide the mapping of all 4 INT# lines in the bridge
node and linux can use it when probing for devices, so your bootwrapper
doesn't have to know what's in the slots and doesn't have to create
device nodes for those.
Ben.
^ permalink raw reply
* Re: [PATCH v2 0/9] Add Generic PCI-E support to 8641HPCN
From: Kumar Gala @ 2007-06-21 22:29 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev@ozlabs.org
In-Reply-To: <1182461025.21421.48.camel@ld0161-tx32>
On Jun 21, 2007, at 4:23 PM, Jon Loeliger wrote:
> On Mon, 2007-06-04 at 17:29, Jon Loeliger wrote:
>> Paul,
>>
>> This 8-part patch set combines the two previous patch
>> sets, 5 from Zheng Wei, and 3 from me, along with one
>> from Wade Farnsworth into one nice-n-happy set, all
>> designed to re-enable PCI-Express on the MPC8641HPCN board.
>>
>> This is version 2 of the patch set and incorporates
>> improvements suggested by list reviewers.
>
>
> Paul,
>
> I hadn't seen any further comment on this series of
> patches for PCI on 8641. Any chance we could get them
> applied to your repo?
I've got a "cleaner" version of the float bus patch that I need to
post and will apply the others to my tree.
- k
^ permalink raw reply
* RE: [patch 30/33] PS3: Bootwrapper support.
From: Levand, Geoffrey @ 2007-06-21 22:24 UTC (permalink / raw)
To: Paul Mackerras; +Cc: ppcdev, Milton Miller
In-Reply-To: <18039.31575.330603.260727@cargo.ozlabs.ibm.com>
-----Original Message-----
From: Paul Mackerras [mailto:paulus@samba.org]
Sent: Mon 6/18/2007 11:44 PM
To: Levand, Geoffrey
Cc: Mark A. Greer; ppcdev; Milton Miller
Subject: Re: [patch 30/33] PS3: Bootwrapper support.
=20
Geoff Levand writes:
> This is from the comment the patch adds to the wrapper script. I =
think
> it gives you what you need:
>=20
> +ps3)
> + # The ps3's loader supports loading gzipped binary images from =
flash
> + # rom to addr zero. The loader enters the image at addr 0x100. A
> + # bootwrapper overlay is use to arrange for the kernel to be =
loaded
> + # to addr zero and to have a suitable bootwrapper entry at 0x100.
> + # To construct the rom image, 0x100 bytes from offset 0x100 in =
the
> + # kernel is copied to the bootwrapper symbol =
__system_reset_kernel.
> + # The 0x100 bytes at the bootwrapper symbol =
__system_reset_overlay is
> + # then copied to offset 0x100. At runtime the bootwrapper =
program
> + # copies the 0x100 bytes at __system_reset_kernel to addr 0x100.
Yes, that is useful, but Mark is right, your patch description is a
bit terse, and something like that in the patch description would be
useful.
I prepared a new patch with this description and was waiting a while to =
get
all the comments. I'll send it out soon.
-Geoff
^ 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