* [RFC] genalloc != generic DEVICE memory allocator
From: Andrey Volkov @ 2005-12-21 17:23 UTC (permalink / raw)
To: jes; +Cc: Andrew Morton, linux-kernel, linuxppc-embedded
Hello Jes and all
I try to use your allocator (gen_pool_xxx), idea of which
is a cute nice thing. But current implementation of it is
inappropriate for a _device_ (aka onchip, like framebuffer) memory
allocation, by next reasons:
1) Device memory is expensive resource by access time and/or size cost.
So we couldn't use (usually) this memory for the free blocks lists.
2) Device memory usually have special requirement of access to it
(alignment/special insn). So we couldn't use part of allocated
blocks for some control structures (this problem solved in your
implementation, it's common remark)
3) Obvious (IMHO) workflow of mem. allocator look like:
- at startup time, driver allocate some big
(almost) static mem. chunk(s) for a control/data structures.
- during work of the device, driver allocate many small
mem. blocks with almost identical size.
such behavior lead to degeneration of buddy method and
transform it to the first/best fit method (with long seek
by the free node list).
4) The simple binary buddy method is far away from perfect for a device
due to a big internal fragmentation. Especially for a
network/mfd devices, for which, size of allocated data very
often is not a power of 2.
I start to modify your code to satisfy above demands,
but firstly I wish to know your, or somebody else, opinion.
Especially I will very happy if somebody have and could
provide to all, some device specific memory usage statistics.
--
Regards
Andrey Volkov
^ permalink raw reply
* Re: Power Pc 405EP
From: clark @ 2005-12-21 17:02 UTC (permalink / raw)
To: linuxppc-dev, inuxppc-embedded, Jeff.Fellin
[-- Attachment #1: Type: text/html, Size: 1842 bytes --]
^ permalink raw reply
* Power Pc 405EP
From: Jeff.Fellin @ 2005-12-21 16:25 UTC (permalink / raw)
To: linuxppc-dev, inuxppc-embedded
We currently have a product implemented on a 405GP processor, and are
considering
changing to a 405EP processor, since we need two Ethernet ports on the
board. For
various reasons we are using Linux-2.4-18 for our system base, with
busybox.
If you know of any difficulty with doing a port of Linux, device drivers to
this platform
I would appreciate your reply.
Thank you
Jeff Fellin
RFL Electronics
Jeff.Fellin@rflelect.com
973 334-3100, x 327
^ permalink raw reply
* Re: [RFC] RTC subsystem
From: Simon Richter @ 2005-12-21 16:02 UTC (permalink / raw)
To: Alessandro Zummo; +Cc: linuxppc-dev, lm-sensors, linuxppc-embedded
In-Reply-To: <20051221160712.2d322f42@inspiron>
[-- Attachment #1: Type: text/plain, Size: 800 bytes --]
Hello,
Alessandro Zummo wrote:
> the proposal actually had a fully-working patch attached :)
Ah, didn't see that, as I just skimmed over the web archive page you
linked to, which has no link to the actual patch (or I'm too stupid to
find it).
> In my code, the first rtc that register is bound
> to /proc/driver/rtc and /dev/rtc (if those interfaces
> are compiled in, as they are all selectable).
It would be good to have a way to change which clock is the "primary"
one from userspace later (userspace because this is clearly site policy).
> You have full control of which functions you will provide
> to the upper layer. Obivously if you try to set the
> time on a read-only rtc, you will get an error.
Sure. I was thinking of the question which error that should be.
Simon
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 307 bytes --]
^ permalink raw reply
* Re: [PATCH] powerpc: Call find_legacy_serial_ports() if we enable CONFIG_SERIAL_8250
From: Kumar Gala @ 2005-12-21 15:31 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc64-dev, Kumar Gala, linuxppc-dev
In-Reply-To: <20051221161330.1a23384b.sfr@canb.auug.org.au>
On Dec 20, 2005, at 11:13 PM, Stephen Rothwell wrote:
> On Tue, 20 Dec 2005 20:45:27 -0600 (CST) Kumar Gala
> <galak@gate.crashing.org> wrote:
>>
>> In setup_arch and setup_system call find_legacy_serial_ports() if we
>> build in support for 8250 serial ports instead of basing it on
>> PPC_MULTIPLATFORM.
>>
>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>>
>> ---
>> commit 399e10aa1c6a3ca64e8e8e8cea7289e9908cc62c
>> tree 3e5320b8a97a37c4d010186aabf8a95e5be264b4
>> parent 7b69a37a4e811e72e82896ab38e6ae04542455f5
>> author Kumar Gala <galak@kernel.crashing.org> Tue, 20 Dec 2005
>> 20:48:36 -0600
>> committer Kumar Gala <galak@kernel.crashing.org> Tue, 20 Dec 2005
>> 20:48:36 -0600
>>
>> arch/powerpc/kernel/setup_32.c | 2 +-
>> arch/powerpc/kernel/setup_64.c | 2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> You should probably change the Makefile as well to build
> legacy_serial.c
> in the CONFIG_SERIAL_8250 case.
Good call, was meaning to update the Makefile as well. I'll send an
updated patch with the Makefile change.
- kumar
^ permalink raw reply
* [PATCH][UPDATE] powerpc: Call find_legacy_serial_ports() if we enable CONFIG_SERIAL_8250
From: Kumar Gala @ 2005-12-21 15:27 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, linuxppc64-dev
In setup_arch and setup_system call find_legacy_serial_ports() if we
build in support for 8250 serial ports instead of basing it on PPC_MULTIPLATFORM.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
commit 27b4ecf949b83a0aa79640b2d124d65ffd4db0cd
tree 91c52973d0469e67fd20cd38650c216e3e26755d
parent 785912139d1f9480683e9fb359c81ce903a60fed
author Kumar Gala <galak@kernel.crashing.org> Wed, 21 Dec 2005 09:29:51 -0600
committer Kumar Gala <galak@kernel.crashing.org> Wed, 21 Dec 2005 09:29:51 -0600
arch/powerpc/kernel/Makefile | 3 +--
arch/powerpc/kernel/setup_32.c | 2 +-
arch/powerpc/kernel/setup_64.c | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 5bdc5fa..a852b37 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -56,8 +56,7 @@ obj-$(CONFIG_BOOTX_TEXT) += btext.o
obj-$(CONFIG_6xx) += idle_6xx.o
obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_KPROBES) += kprobes.o
-obj-$(CONFIG_PPC_MULTIPLATFORM) += legacy_serial.o
-obj-$(CONFIG_PPC_MULTIPLATFORM) += udbg_16550.o
+obj-$(CONFIG_SERIAL_8250) += legacy_serial.o udbg_16550.o
module-$(CONFIG_PPC64) += module_64.o
obj-$(CONFIG_MODULES) += $(module-y)
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 79d434f..e5d285a 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -299,7 +299,7 @@ void __init setup_arch(char **cmdline_p)
if (ppc_md.init_early)
ppc_md.init_early();
-#ifdef CONFIG_PPC_MULTIPLATFORM
+#ifdef CONFIG_SERIAL_8250
find_legacy_serial_ports();
#endif
finish_device_tree();
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 419e0b9..98e9f05 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -472,7 +472,7 @@ void __init setup_system(void)
* hash table management for us, thus ioremap works. We do that early
* so that further code can be debugged
*/
-#ifdef CONFIG_PPC_MULTIPLATFORM
+#ifdef CONFIG_SERIAL_8250
find_legacy_serial_ports();
#endif
^ permalink raw reply related
* Re: [RFC] RTC subsystem
From: Alessandro Zummo @ 2005-12-21 15:07 UTC (permalink / raw)
To: Simon Richter
Cc: linuxppc-dev, linuxppc-embedded, lm-sensors, linux-arm-kernel,
nslu2-developers
In-Reply-To: <43A94811.4010704@hogyros.de>
On Wed, 21 Dec 2005 13:18:25 +0100
Simon Richter <Simon.Richter@hogyros.de> wrote:
> > I've posted a proposal for a new RTC subsystem
> > on lkml ( http://lkml.org/lkml/2005/12/20/220 ) .
>
> I agree that there is room for improvement. Do you have a specific
> structure in mind? Specifically,
Hi Simon,
the proposal actually had a fully-working patch attached :)
> - which functions do you believe to be generic,
> - how should multiple RTCs be handled,
In my code, the first rtc that register is bound
to /proc/driver/rtc and /dev/rtc (if those interfaces
are compiled in, as they are all selectable).
The other RTCs are available thru /sys/class/rtc/rtcX
(again, if compiled in).
> - are read-only (radio controlled) RTCs taken care of?
You have full control of which functions you will provide
to the upper layer. Obivously if you try to set the
time on a read-only rtc, you will get an error.
> At present, I don't have time to help the cause, but I can provide
> hosting for a git tree if desired.
Thanks, I'll consider it if the need arises.
--
Best regards,
Alessandro Zummo,
Tower Technologies - Turin, Italy
http://www.towertech.it
^ permalink raw reply
* Re: [PATCH] Don't allow CONFIG_PMAC_BACKLIGHT on pmac64
From: Simon Richter @ 2005-12-21 14:00 UTC (permalink / raw)
To: Andi Kleen; +Cc: linuxppc-dev
In-Reply-To: <20051221121201.GA54164@muc.de>
[-- Attachment #1: Type: text/plain, Size: 229 bytes --]
Hi,
Andi Kleen wrote:
> Don't allow to set CONFIG_MAC_BACKLIGHT on pmac64. It won't compile.
> - depends on ADB_PMU && (BROKEN || !PPC64)
> + depends on ADB_PMU && !PPC64
That's why it's marked BROKEN, perhaps?
Simon
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 307 bytes --]
^ permalink raw reply
* Re: [RFC] RTC subsystem
From: Simon Richter @ 2005-12-21 12:18 UTC (permalink / raw)
To: Alessandro Zummo
Cc: linuxppc-dev, linuxppc-embedded, lm-sensors, linux-arm-kernel,
nslu2-developers
In-Reply-To: <20051220220022.4e9ff931@inspiron>
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
Hi,
Alessandro Zummo wrote:
> I've posted a proposal for a new RTC subsystem
> on lkml ( http://lkml.org/lkml/2005/12/20/220 ) .
I agree that there is room for improvement. Do you have a specific
structure in mind? Specifically,
- which functions do you believe to be generic,
- how should multiple RTCs be handled,
- are read-only (radio controlled) RTCs taken care of?
At present, I don't have time to help the cause, but I can provide
hosting for a git tree if desired.
Simon
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 307 bytes --]
^ permalink raw reply
* [PATCH] Don't allow CONFIG_PMAC_BACKLIGHT on pmac64
From: Andi Kleen @ 2005-12-21 12:12 UTC (permalink / raw)
To: benh, linuxppc-dev
For 2.6.15rc6-git2
Don't allow to set CONFIG_MAC_BACKLIGHT on pmac64. It won't compile.
Signed-off-by: Andi Kleen <ak@muc.de>
diff -u linux-2.6.15rc6git2/drivers/macintosh/Kconfig-o linux-2.6.15rc6git2/drivers/macintosh/Kconfig
--- linux-2.6.15rc6git2/drivers/macintosh/Kconfig-o 2005-12-21 12:27:45.000000000 +0100
+++ linux-2.6.15rc6git2/drivers/macintosh/Kconfig 2005-12-21 13:07:47.000000000 +0100
@@ -103,7 +103,7 @@
# on non-powerbook machines (but only on PMU based ones AFAIK)
config PMAC_BACKLIGHT
bool "Backlight control for LCD screens"
- depends on ADB_PMU && (BROKEN || !PPC64)
+ depends on ADB_PMU && !PPC64
help
Say Y here to build in code to manage the LCD backlight on a
Macintosh PowerBook. With this code, the backlight will be turned
^ permalink raw reply
* Re: [PATCH] powerpc: Call find_legacy_serial_ports() if we enable CONFIG_SERIAL_8250
From: Stephen Rothwell @ 2005-12-21 5:13 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, linuxppc64-dev
In-Reply-To: <Pine.LNX.4.44.0512202045040.1835-100000@gate.crashing.org>
[-- Attachment #1: Type: text/plain, Size: 999 bytes --]
On Tue, 20 Dec 2005 20:45:27 -0600 (CST) Kumar Gala <galak@gate.crashing.org> wrote:
>
> In setup_arch and setup_system call find_legacy_serial_ports() if we
> build in support for 8250 serial ports instead of basing it on PPC_MULTIPLATFORM.
>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>
> ---
> commit 399e10aa1c6a3ca64e8e8e8cea7289e9908cc62c
> tree 3e5320b8a97a37c4d010186aabf8a95e5be264b4
> parent 7b69a37a4e811e72e82896ab38e6ae04542455f5
> author Kumar Gala <galak@kernel.crashing.org> Tue, 20 Dec 2005 20:48:36 -0600
> committer Kumar Gala <galak@kernel.crashing.org> Tue, 20 Dec 2005 20:48:36 -0600
>
> arch/powerpc/kernel/setup_32.c | 2 +-
> arch/powerpc/kernel/setup_64.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
You should probably change the Makefile as well to build legacy_serial.c
in the CONFIG_SERIAL_8250 case.
--
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
* [PATCH] powerpc: Only call prom_init of we have true OpenFirmware
From: Kumar Gala @ 2005-12-21 2:55 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
We should only have prom_init built if we are CONFIG_PPC_OF. CONFIG_PPC_OF
is intended to imply we are booted by a full Open Firmware implementation.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
commit 51929bc009670733f84dc5dc48711fb3f1cb1554
tree 9ee9a1d7c49f3ee0e5984b0834fb2daa89cca394
parent c9b626087d0381681d5ae4132ca2ac2295f78447
author Kumar Gala <galak@kernel.crashing.org> Tue, 20 Dec 2005 20:59:03 -0600
committer Kumar Gala <galak@kernel.crashing.org> Tue, 20 Dec 2005 20:59:03 -0600
arch/powerpc/kernel/head_32.S | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index bf37ef2..7c9fdd5 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -120,10 +120,12 @@ __start:
* because OF may have I/O devices mapped into that area
* (particularly on CHRP).
*/
+#ifdef CONFIG_PPC_OF
cmpwi 0,r5,0
beq 1f
bl prom_init
trap
+#endif
/*
* Check for BootX signature when supporting PowerMac and branch to
^ permalink raw reply related
* [PATCH] powerpc: Call find_legacy_serial_ports() if we enable CONFIG_SERIAL_8250
From: Kumar Gala @ 2005-12-21 2:45 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, linuxppc64-dev
In setup_arch and setup_system call find_legacy_serial_ports() if we
build in support for 8250 serial ports instead of basing it on PPC_MULTIPLATFORM.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
commit 399e10aa1c6a3ca64e8e8e8cea7289e9908cc62c
tree 3e5320b8a97a37c4d010186aabf8a95e5be264b4
parent 7b69a37a4e811e72e82896ab38e6ae04542455f5
author Kumar Gala <galak@kernel.crashing.org> Tue, 20 Dec 2005 20:48:36 -0600
committer Kumar Gala <galak@kernel.crashing.org> Tue, 20 Dec 2005 20:48:36 -0600
arch/powerpc/kernel/setup_32.c | 2 +-
arch/powerpc/kernel/setup_64.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 79d434f..e5d285a 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -299,7 +299,7 @@ void __init setup_arch(char **cmdline_p)
if (ppc_md.init_early)
ppc_md.init_early();
-#ifdef CONFIG_PPC_MULTIPLATFORM
+#ifdef CONFIG_SERIAL_8250
find_legacy_serial_ports();
#endif
finish_device_tree();
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 419e0b9..98e9f05 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -472,7 +472,7 @@ void __init setup_system(void)
* hash table management for us, thus ioremap works. We do that early
* so that further code can be debugged
*/
-#ifdef CONFIG_PPC_MULTIPLATFORM
+#ifdef CONFIG_SERIAL_8250
find_legacy_serial_ports();
#endif
^ permalink raw reply related
* [PATCH] powerpc: added a udbg_progress
From: Kumar Gala @ 2005-12-20 22:37 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, linuxppc64-dev
Added a common udbg_progress for use by ppc_md.progress()
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
commit 7b69a37a4e811e72e82896ab38e6ae04542455f5
tree 923809875e727ab5d0dd0579e45da9201dd86653
parent adb69b3e888de037f4e58cc505443e624d498596
author Kumar Gala <galak@kernel.crashing.org> Tue, 20 Dec 2005 16:40:09 -0600
committer Kumar Gala <galak@kernel.crashing.org> Tue, 20 Dec 2005 16:40:09 -0600
arch/powerpc/kernel/udbg.c | 6 ++++++
arch/powerpc/platforms/powermac/setup.c | 8 +-------
include/asm-powerpc/udbg.h | 1 +
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index 9567d94..558c1ce 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -90,6 +90,12 @@ void udbg_printf(const char *fmt, ...)
va_end(args);
}
+void __init udbg_progress(char *s, unsigned short hex)
+{
+ udbg_puts(s);
+ udbg_puts("\n");
+}
+
/*
* Early boot console based on udbg
*/
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 1daa5a0..e5a5bdb 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -639,12 +639,6 @@ static void __init pmac_init_early(void)
#endif
}
-static void __init pmac_progress(char *s, unsigned short hex)
-{
- udbg_puts(s);
- udbg_puts("\n");
-}
-
/*
* pmac has no legacy IO, anything calling this function has to
* fail or bad things will happen
@@ -763,7 +757,7 @@ struct machdep_calls __initdata pmac_md
.calibrate_decr = pmac_calibrate_decr,
.feature_call = pmac_do_feature_call,
.check_legacy_ioport = pmac_check_legacy_ioport,
- .progress = pmac_progress,
+ .progress = udbg_progress,
#ifdef CONFIG_PPC64
.pci_probe_mode = pmac_pci_probe_mode,
.idle_loop = native_idle,
diff --git a/include/asm-powerpc/udbg.h b/include/asm-powerpc/udbg.h
index 58cdc88..a3390b0 100644
--- a/include/asm-powerpc/udbg.h
+++ b/include/asm-powerpc/udbg.h
@@ -23,6 +23,7 @@ extern int udbg_read(char *buf, int bufl
extern void register_early_udbg_console(void);
extern void udbg_printf(const char *fmt, ...);
+extern void udbg_progress(char *s, unsigned short hex);
extern void udbg_init_uart(void __iomem *comport, unsigned int speed,
unsigned int clock);
^ permalink raw reply related
* [PATCH] powerpc: Add the ability to handle SOC ports in legacy_serial
From: Kumar Gala @ 2005-12-20 22:16 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc64-dev, linuxppc-dev
Add the ability to configure and initialize legacy 8250 serials
ports on an SOC bus. Also, fixed an issue that we would not
configure any serial ports if "linux,stdout-path" was not found.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
commit adb69b3e888de037f4e58cc505443e624d498596
tree 7be9bb626b8d2c773dd88a1d3e17a5f56995075f
parent 8bec94b3bb35c0273fbab5a6aa477ec71a4d1fab
author Kumar Gala <galak@kernel.crashing.org> Tue, 20 Dec 2005 16:20:09 -0600
committer Kumar Gala <galak@kernel.crashing.org> Tue, 20 Dec 2005 16:20:09 -0600
arch/powerpc/kernel/legacy_serial.c | 62 +++++++++++++++++++++++++++++------
1 files changed, 52 insertions(+), 10 deletions(-)
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index d179ec5..59164ba 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -36,7 +36,8 @@ static int legacy_serial_console = -1;
static int __init add_legacy_port(struct device_node *np, int want_index,
int iotype, phys_addr_t base,
- phys_addr_t taddr, unsigned long irq)
+ phys_addr_t taddr, unsigned long irq,
+ unsigned int flags)
{
u32 *clk, *spd, clock = BASE_BAUD * 16;
int index;
@@ -90,7 +91,7 @@ static int __init add_legacy_port(struct
legacy_serial_ports[index].iotype = iotype;
legacy_serial_ports[index].uartclk = clock;
legacy_serial_ports[index].irq = irq;
- legacy_serial_ports[index].flags = ASYNC_BOOT_AUTOCONF;
+ legacy_serial_ports[index].flags = flags;
legacy_serial_infos[index].taddr = taddr;
legacy_serial_infos[index].np = of_node_get(np);
legacy_serial_infos[index].clock = clock;
@@ -107,6 +108,32 @@ static int __init add_legacy_port(struct
return index;
}
+static int __init add_legacy_soc_port(struct device_node *np,
+ struct device_node *soc_dev)
+{
+ phys_addr_t addr;
+ u32 *addrp;
+ unsigned int flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ;
+
+ /* We only support ports that have a clock frequency properly
+ * encoded in the device-tree.
+ */
+ if (get_property(np, "clock-frequency", NULL) == NULL)
+ return -1;
+
+ /* Get the address */
+ addrp = of_get_address(soc_dev, 0, NULL, NULL);
+ if (addrp == NULL)
+ return -1;
+
+ addr = of_translate_address(soc_dev, addrp);
+
+ /* Add port, irq will be dealt with later. We passed a translated
+ * IO port value. It will be fixed up later along with the irq
+ */
+ return add_legacy_port(np, -1, UPIO_MEM, addr, addr, NO_IRQ, flags);
+}
+
static int __init add_legacy_isa_port(struct device_node *np,
struct device_node *isa_bridge)
{
@@ -137,7 +164,7 @@ static int __init add_legacy_isa_port(st
taddr = of_translate_address(np, reg);
/* Add port, irq will be dealt with later */
- return add_legacy_port(np, index, UPIO_PORT, reg[1], taddr, NO_IRQ);
+ return add_legacy_port(np, index, UPIO_PORT, reg[1], taddr, NO_IRQ, UPF_BOOT_AUTOCONF);
}
@@ -204,7 +231,7 @@ static int __init add_legacy_pci_port(st
/* Add port, irq will be dealt with later. We passed a translated
* IO port value. It will be fixed up later along with the irq
*/
- return add_legacy_port(np, index, iotype, base, addr, NO_IRQ);
+ return add_legacy_port(np, index, iotype, base, addr, NO_IRQ, UPF_BOOT_AUTOCONF);
}
/*
@@ -218,7 +245,7 @@ static int __init add_legacy_pci_port(st
*/
void __init find_legacy_serial_ports(void)
{
- struct device_node *np, *stdout;
+ struct device_node *np, *stdout = NULL;
char *path;
int index;
@@ -226,13 +253,23 @@ void __init find_legacy_serial_ports(voi
/* Now find out if one of these is out firmware console */
path = (char *)get_property(of_chosen, "linux,stdout-path", NULL);
- if (path == NULL) {
+ if (path != NULL) {
+ stdout = of_find_node_by_path(path);
+ if (stdout)
+ DBG("stdout is %s\n", stdout->full_name);
+ } else {
DBG(" no linux,stdout-path !\n");
- return;
}
- stdout = of_find_node_by_path(path);
- if (stdout) {
- DBG("stdout is %s\n", stdout->full_name);
+
+ /* First fill our array with SOC ports */
+ for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16550")) != NULL;) {
+ struct device_node *soc = of_get_parent(np);
+ if (soc && !strcmp(soc->type, "soc")) {
+ index = add_legacy_soc_port(np, np);
+ if (index >= 0 && np == stdout)
+ legacy_serial_console = index;
+ }
+ of_node_put(soc);
}
/* First fill our array with ISA ports */
@@ -437,6 +474,11 @@ static int __init check_legacy_serial_co
DBG(" of_chosen is NULL !\n");
return -ENODEV;
}
+
+ if (legacy_serial_console < 0) {
+ DBG(" legacy_serial_console not found !\n");
+ return -ENODEV;
+ }
/* We are getting a weird phandle from OF ... */
/* ... So use the full path instead */
name = (char *)get_property(of_chosen, "linux,stdout-path", NULL);
^ permalink raw reply related
* [PATCH] powerpc: Loosen udbg_probe_uart_speed sanity checking
From: Kumar Gala @ 2005-12-20 22:16 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc64-dev, linuxppc-dev
The checking of the baudrate in udbg_probe_uart_speed was
too tight and would cause reporting back of the default
baud rate in cases where the computed speed was valid.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
commit 8bec94b3bb35c0273fbab5a6aa477ec71a4d1fab
tree c2dde72aa75a3d807a918556e97b21723c10267b
parent a86f866f7b31e01c729ee7498228c547a51d8514
author Kumar Gala <galak@kernel.crashing.org> Tue, 20 Dec 2005 16:17:13 -0600
committer Kumar Gala <galak@kernel.crashing.org> Tue, 20 Dec 2005 16:17:13 -0600
arch/powerpc/kernel/udbg_16550.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index e58c048..7541bf4 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -137,7 +137,7 @@ unsigned int udbg_probe_uart_speed(void
speed = (clock / prescaler) / (divisor * 16);
/* sanity check */
- if (speed < 9600 || speed > 115200)
+ if (speed < 0 || speed > (clock / 16))
speed = 9600;
return speed;
^ permalink raw reply related
* Re: [PATCH 0/9] Some Freescale MPC52xx related updates
From: Sylvain Munaut @ 2005-12-20 21:36 UTC (permalink / raw)
To: Kumar Gala; +Cc: Andrew Morton, Tom Rini, Linux PPC Embedded
In-Reply-To: <Pine.LNX.4.44.0512201452570.26351-100000@gate.crashing.org>
Kumar Gala wrote:
>>Hello Andrew & all,
>>
>>
>>This set of patches contains misc updates that are in my local
>>tree since sometimes now and I think they're good to go upstream.
>>
>>They've been posted separatly on the ppc mailing list at some point
>>and tested by several people. So far I received no negative feedback.
>>Most are trivial compile fix, small improvements, ...
>>
>>
>>Thanks,
>>
>> Sylvain Munaut
>
>
> Sylvain, its been a while.
Yes, indeed ... I'm trying to catch up.
> We have started to a powerpc.git tree that
> Paul is maintaining rather than forwarding patches to Andrew.
>
> So you may want to let Paul know about these 52xx patches for him to queue
> them up in the powerpc.git tree.
I knew it ... I can't seem to get it right the first time each time I
miss something when pushing patches ...
I'll send the patch series to Paul right now.
Sylvain
^ permalink raw reply
* Re: POSIX High Resolution Timers in LinuxPPC 2.4
From: Geoff Levand @ 2005-12-19 22:56 UTC (permalink / raw)
To: David Jander; +Cc: Martin, Tim, linuxppc-embedded
In-Reply-To: <200512191039.58149.david.jander@protonic.nl>
David Jander wrote:
> Hi Tim,
>
> On Friday 16 December 2005 23:34, Martin, Tim wrote:
>
>>Could someone give me a brief history lesson on POSIX high resolution
>>timers (e.g. timer_create() function) implemented in the Linux kernel on
>>the PowerPC 405 architecture? Specifically:
>>
>>Confirm they are in the mainline 2.6 kernel now (e.g. kernel.org)?
>>
>>Were they ever a part of the "mainline" 2.4 linuxppc kernel (e.g
>>ppc.bkbits.net)?
>>
>>If no, were they ever available as a patch? The stuff at
>>sourceforge.net/projects/high-res-timers stops at 2.4.20 and looks like it
>>was only ever working for i386, not ppc.
>
>
> I asked a related question a while back, and got no answer (yet).
> I did find this though, which you might have overlooked:
> http://prdownloads.sourceforge.net/high-res-timers/ppc-hrt-2.6.10.patch?download
>
> I am equally puzzled about whether this has made it into mainstream, is about
> to, or never will. I don't even know if it actually works.
>
You would do better to inquire on the HRT mailing list:
http://lists.sourceforge.net/lists/listinfo/high-res-timers-discourse
HRT support (from http://sourceforge.net/projects/high-res-timers/) was
never accepted to mainline. It works on Ebony (PPC440), but I guess it
is OK on others since it uses the PPC time base. I recommend you get
the latest from CVS, which is against 2.6.12. Older versions have
CVS tags.
-Geoff
^ permalink raw reply
* [RFC] RTC subsystem
From: Alessandro Zummo @ 2005-12-20 21:00 UTC (permalink / raw)
Cc: linuxppc-dev, nslu2-developers, linuxppc-embedded,
linux-arm-kernel, lm-sensors
Hello,
I've posted a proposal for a new RTC subsystem
on lkml ( http://lkml.org/lkml/2005/12/20/220 ) .
I'd appreciate having feedback from anyone that could
be interested in this matter.
Thanks in advance.
--
Best regards,
Alessandro Zummo,
Tower Technologies - Turin, Italy
http://www.towertech.it
^ permalink raw reply
* Re: [PATCH 0/9] Some Freescale MPC52xx related updates
From: Kumar Gala @ 2005-12-20 20:54 UTC (permalink / raw)
To: Sylvain Munaut; +Cc: Andrew Morton, Tom Rini, Linux PPC Embedded
In-Reply-To: <0.20051220_213752_1ebc_tnt@patchsend.246tNt.com>
> Hello Andrew & all,
>
>
> This set of patches contains misc updates that are in my local
> tree since sometimes now and I think they're good to go upstream.
>
> They've been posted separatly on the ppc mailing list at some point
> and tested by several people. So far I received no negative feedback.
> Most are trivial compile fix, small improvements, ...
>
>
> Thanks,
>
> Sylvain Munaut
Sylvain, its been a while. We have started to a powerpc.git tree that
Paul is maintaining rather than forwarding patches to Andrew.
So you may want to let Paul know about these 52xx patches for him to queue
them up in the powerpc.git tree.
- kumar
^ permalink raw reply
* console on POWER4 not working with 2.6.15
From: Olaf Hering @ 2005-12-20 20:45 UTC (permalink / raw)
To: linux-kernel, linuxppc-dev
The connection of ttyS0 to /dev/console doesnt seem to work anymore mit
2.6.15-rc5+6 on a POWER4 p630 in fullsystempartition mode, no HMC
connected. It works with 2.6.14.4.
I tested 2.6.15-rc6 arch/powerpc/configs/ppc64_defconfig.
Our SLES9 /init script in initramfs doesnt print anything with 2.6.15
after 'Freeing unused kernel memory: 360k freed'. But it does print its
banner with 2.6.14.4. Other system with hvc console appear to work,
like JS20 or some POWER5 boxes.
So this regression seems to be local to ttyS0. The bootlog shows that
the firmware stdout device is properly detected at "COM1".
I will try older rc kernels now, but I may lose remote control of the
system.
The system appears to boot a bit into the init scripts, as the (unknown)
TIOCGDEV ioctl indicates. sysrq is not recognized. Forcing the system
into xmon shows all cpus are idle. Triggering a sysrq t via PS/2
keyboard shows this:
boot S 000000000fe3637c 9680 2288 2287 2301 (NOTLB)
Call Trace:
[C00000003FE7F950] [C00000000061D850] nfs_v2_clientops+0x90/0x118 (unreliable)
[C00000003FE7FB20] [C0000000000242C0] .__switch_to+0x140/0x164
[C00000003FE7FBB0] [C00000000049C3C4] .schedule+0x664/0x7ac
[C00000003FE7FC80] [C00000000005C284] .do_wait+0xecc/0x10a0
[C00000003FE7FDC0] [C000000000012468] .compat_sys_waitpid+0x18/0x2c
[C00000003FE7FE30] [C000000000008600] syscall_exit+0x0/0x18
stty S 000000000ff6f520 12512 2301 2288 (NOTLB)
Call Trace:
[C0000001FEF0B480] [C0000000000242C0] .__switch_to+0x140/0x164
[C0000001FEF0B510] [C00000000049C3C4] .schedule+0x664/0x7ac
[C0000001FEF0B5E0] [C00000000049CC14] .schedule_timeout+0x40/0xec
[C0000001FEF0B6B0] [C000000000264D00] .tty_wait_until_sent+0x114/0x198
[C0000001FEF0B7A0] [C000000000264FF4] .set_termios+0x270/0x2b8
[C0000001FEF0B860] [C0000000002657F8] .n_tty_ioctl+0x7bc/0xc88
[C0000001FEF0B940] [C000000000261460] .tty_ioctl+0x11b8/0x1214
[C0000001FEF0BB70] [C0000000000CCC84] .do_ioctl+0xd4/0x108
[C0000001FEF0BC00] [C0000000000CD134] .vfs_ioctl+0x47c/0x4b0
[C0000001FEF0BCB0] [C0000000000CD1BC] .sys_ioctl+0x54/0x94
[C0000001FEF0BD60] [C0000000000EE10C] .compat_sys_ioctl+0x338/0x3bc
[C0000001FEF0BE30] [C000000000008600] syscall_exit+0x0/0x18
....
Elapsed time since release of system processors: 1 mins 37 secs
Config file read, 384 bytes
Welcome to yaboot version 1.3.11.SuSE
Enter "help" to get some basic usage information
boot: sysrq
Please wait, loading kernel...
Elf64 kernel loaded...
Loading ramdisk...
ramdisk loaded at 04400000, size: 1228 Kbytes
OF stdout device is: /pci@400000000110/isa@3/serial@i3f8
command line: root=/dev/sda4 xmon=on debug
memory layout at init:
memory_limit : 0000000000000000 (16 MB aligned)
alloc_bottom : 0000000004533000
alloc_top : 0000000030000000
alloc_top_hi : 0000000200000000
rmo_top : 0000000030000000
ram_top : 0000000200000000
Looking for displays
found display : /pci@400000000112/pci@2,6/pci@1/display@0, opening ... done
opening PHB /pci@400000000110... done
opening PHB /pci@400000000112... done
instantiating rtas at 0x000000002fd0d000 ... done
0000000000000000 : boot cpu 0000000000000000
0000000000000001 : starting cpu hw idx 0000000000000001... done
0000000000000002 : starting cpu hw idx 0000000000000002... done
0000000000000003 : starting cpu hw idx 0000000000000003... done
copying OF device tree ...
Building dt strings...
Building dt structure...
Device tree strings 0x0000000004834000 -> 0x00000000048353ac
Device tree struct 0x0000000004836000 -> 0x0000000004841000
Calling quiesce ...
returning from prom_init
Page orders: linear mapping = 24, others = 12
Found initrd at 0xc000000004400000:0xc000000004533000
trying to initialize btext ...
boot stdout isn't a display !
trying /pci@400000000112/pci@2,6/pci@1/display@0 ...
result: 0
Starting Linux PPC64 #3 SMP Tue Dec 20 13:32:44 CET 2005
-----------------------------------------------------
ppc64_pft_size = 0x0
ppc64_interrupt_controller = 0x2
platform = 0x100
physicalMemorySize = 0x200000000
ppc64_caches.dcache_line_size = 0x80
ppc64_caches.icache_line_size = 0x80
htab_address = 0xc0000001f0000000
htab_hash_mask = 0xfffff
-----------------------------------------------------
[boot]0100 MM Init
[boot]0100 MM Init Done
Linux version 2.6.15-rc6 (olaf@sweetie) (gcc version 3.3.3 (SuSE Linux)) #3 SMP Tue Dec 20 13:32:44 CET 2005
[boot]0012 Setup Arch
EEH: PCI Enhanced I/O Error Handling Enabled
PPC64 nvram contains 81920 bytes
Using default idle loop
Top of RAM: 0x200000000, Total RAM: 0x200000000
Memory hole size: 0MB
[boot]0015 Setup Done
Built 1 zonelists
Kernel command line: root=/dev/sda4 xmon=on debug
[boot]0020 XICS Init
[boot]0021 XICS Done
PID hash table entries: 4096 (order: 12, 131072 bytes)
time_init: decrementer frequency = 181.701671 MHz
time_init: processor frequency = 1453.000000 MHz
Page orders: linear mapping = 24, others = 12
Found initrd at 0xc000000004400000:0xc000000004533000
trying to initialize btext ...
boot stdout isn't a display !
trying /pci@400000000112/pci@2,6/pci@1/display@0 ...
result: 0
Starting Linux PPC64 #3 SMP Tue Dec 20 13:32:44 CET 2005
-----------------------------------------------------
ppc64_pft_size = 0x0
ppc64_interrupt_controller = 0x2
platform = 0x100
physicalMemorySize = 0x200000000
ppc64_caches.dcache_line_size = 0x80
ppc64_caches.icache_line_size = 0x80
htab_address = 0xc0000001f0000000
htab_hash_mask = 0xfffff
-----------------------------------------------------
[boot]0100 MM Init
[boot]0100 MM Init Done
Linux version 2.6.15-rc6 (olaf@sweetie) (gcc version 3.3.3 (SuSE Linux)) #3 SMP Tue Dec 20 13:32:44 CET 2005
[boot]0012 Setup Arch
EEH: PCI Enhanced I/O Error Handling Enabled
PPC64 nvram contains 81920 bytes
Using default idle loop
Top of RAM: 0x200000000, Total RAM: 0x200000000
Memory hole size: 0MB
On node 0 totalpages: 2097152
DMA zone: 2097152 pages, LIFO batch:31
DMA32 zone: 0 pages, LIFO batch:0
Normal zone: 0 pages, LIFO batch:0
HighMem zone: 0 pages, LIFO batch:0
[boot]0015 Setup Done
Built 1 zonelists
Kernel command line: root=/dev/sda4 xmon=on debug
[boot]0020 XICS Init
[boot]0021 XICS Done
PID hash table entries: 4096 (order: 12, 131072 bytes)
time_init: decrementer frequency = 181.701671 MHz
time_init: processor frequency = 1453.000000 MHz
Console: colour dummy device 80x25
Dentry cache hash table entries: 2097152 (order: 12, 16777216 bytes)
Inode-cache hash table entries: 1048576 (order: 11, 8388608 bytes)
Memory: 8087032k/8388608k available (5824k kernel code, 300928k reserved, 2028k data, 499k bss, 360k init)
Calibrating delay loop... 362.49 BogoMIPS (lpj=724992)
Mount-cache hash table entries: 256
Processor 1 found.
Processor 2 found.
Processor 3 found.
Brought up 4 CPUs
checking if image is initramfs... it is
Freeing initrd memory: 1228k freed
NET: Registered protocol family 16
PCI: Probing PCI hardware
Failed to request PCI IO region on PCI domain 0000
Using INTC for W82c105 IDE controller.
IOMMU table initialized, virtual merging enabled
ISA bridge at 0000:00:03.0
mapping IO 3fd30000000 -> d000080000000000, size: 100000
mapping IO 3fd50000000 -> d000080000100000, size: 100000
PCI: Probing PCI hardware done
Registering pmac pic with sysfs...
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
RTAS daemon started
RTAS: event: 99, Type: Internal Device Failure, Severity: 2
Total HugeTLB memory allocated, 0
JFS: nTxBlock = 8192, nTxLock = 65536
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
matroxfb: Matrox G450 detected
PInS data found at offset 31168
PInS memtype = 4
matroxfb: 640x480x8bpp (virtual: 640x26214)
matroxfb: framebuffer at 0x3FDEC000000, mapped to 0xd000080080054000, size 16777216
Console: switching to colour frame buffer device 80x30
fb0: MATROX frame buffer device
matroxfb_crtc2: secondary head of fb0 was registered as fb1
vio_register_driver: driver hvc_console registering
HVSI: registered 0 devices
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250.0: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
serial8250.0: ttyS2 at I/O 0x898 (irq = 10) is a 16550A
Floppy drive(s): fd0 is 2.88M
FDC 0 is a National Semiconductor PC87306
RAMDISK driver initialized: 16 RAM disks of 65536K size 1024 blocksize
loop: loaded (max 8 devices)
Intel(R) PRO/1000 Network Driver - version 6.1.16-k2
Copyright (c) 1999-2005 Intel Corporation.
pcnet32.c:v1.31c 01.Nov.2005 tsbogend@alpha.franken.de
e100: Intel(R) PRO/100 Network Driver, 3.4.14-k4-NAPI
e100: Copyright(c) 1999-2005 Intel Corporation
PCI: Enabling device: (0000:21:01.0), cmd 143
e100: eth0: e100_probe: addr 0x3fd88030000, irq 101, MAC addr 00:02:55:4F:05:C7
PCI: Enabling device: (0001:21:01.0), cmd 143
e100: eth1: e100_probe: addr 0x3fde8030000, irq 133, MAC addr 00:02:55:4F:05:D7
acenic.c: v0.92 08/05/2002 Jes Sorensen, linux-acenic@SunSITE.dk
http://home.cern.ch/~jes/gige/acenic.html
PCI: Enabling device: (0000:01:01.0), cmd 142
0000:01:01.0: Alteon AceNIC Gigabit Ethernet at 0x3fd80000000, irq 99
Tigon II (Rev. 6), Firmware: 12.4.11, MAC: 00:04:ac:7c:84:ad
PCI bus width: 64 bits, speed: 66MHz, latency: 72 clks
0000:01:01.0: Firmware up and running
PCI: Enabling device: (0000:61:01.0), cmd 142
0000:61:01.0: Alteon AceNIC Gigabit Ethernet at 0x3fd90000000, irq 105
Tigon II (Rev. 6), Firmware: 12.4.11, MAC: 00:06:29:6b:17:1d
PCI bus width: 64 bits, speed: 66MHz, latency: 72 clks
0000:61:01.0: Firmware up and running
netconsole: not configured, aborting
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PCI: Enabling device: (0000:41:01.0), cmd 143
sym0: <1010-66> rev 0x1 at pci 0000:41:01.0 irq 103
sym0: No NVRAM, ID 7, Fast-80, LVD, parity checking
sym0: SCSI BUS has been reset.
scsi0 : sym-2.2.1
Vendor: IBM Model: IC35L036UCD210-0 Rev: S5BS
Type: Direct-Access ANSI SCSI revision: 03
target0:0:8: tagged command queuing enabled, command queue depth 16.
target0:0:8: Beginning Domain Validation
target0:0:8: asynchronous.
target0:0:8: wide asynchronous.
target0:0:8: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 31)
target0:0:8: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 31)
target0:0:8: Ending Domain Validation
Vendor: IBM Model: IC35L036UCD210-0 Rev: S5BS
Type: Direct-Access ANSI SCSI revision: 03
target0:0:9: tagged command queuing enabled, command queue depth 16.
target0:0:9: Beginning Domain Validation
target0:0:9: asynchronous.
target0:0:9: wide asynchronous.
target0:0:9: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 31)
target0:0:9: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 31)
target0:0:9: Ending Domain Validation
Vendor: IBM Model: HSBPD4E PU3SCSI Rev: 0011
Type: Enclosure ANSI SCSI revision: 02
target0:0:15: Beginning Domain Validation
0:0:15:0: phase change 6-7 6@400503a8 resid=4.
target0:0:15: asynchronous.
target0:0:15: Ending Domain Validation
PCI: Enabling device: (0000:41:01.1), cmd 143
sym1: <1010-66> rev 0x1 at pci 0000:41:01.1 irq 104
sym1: No NVRAM, ID 7, Fast-80, SE, parity checking
sym1: SCSI BUS has been reset.
scsi1 : sym-2.2.1
target1:0:0: FAST-20 WIDE SCSI 40.0 MB/s ST (50 ns, offset 31)
Vendor: HP Model: IBM-C568303030!D Rev: C209
Type: Sequential-Access ANSI SCSI revision: 02
target1:0:0: Beginning Domain Validation
target1:0:0: FAST-20 SCSI 20.0 MB/s ST (50 ns, offset 31)
target1:0:0: FAST-20 WIDE SCSI 40.0 MB/s ST (50 ns, offset 31)
1:0:0:0: ABORT operation started.
1:0:0:0: ABORT operation timed-out.
1:0:0:0: DEVICE RESET operation started.
1:0:0:0: DEVICE RESET operation complete.
target1:0:0: control msgout: c.
sym1: TARGET 0 has been reset.
1:0:0:0: ABORT operation started.
1:0:0:0: ABORT operation complete.
1:0:0:0: BUS RESET operation started.
1:0:0:0: BUS RESET operation complete.
sym1: SCSI BUS reset detected.
sym1: SCSI BUS has been reset.
target1:0:0: FAST-20 WIDE SCSI 40.0 MB/s ST (50 ns, offset 31)
target1:0:0: Wide Transfers Fail
target1:0:0: FAST-20 SCSI 20.0 MB/s ST (50 ns, offset 31)
target1:0:0: Domain Validation skipping write tests
target1:0:0: Ending Domain Validation
ipr: IBM Power RAID SCSI Device Driver version: 2.1.0 (October 31, 2005)
vio_register_driver: driver ibmvscsi registering
libata version 1.20 loaded.
st: Version 20050830, fixed bufsize 32768, s/g segs 256
st 1:0:0:0: Attached scsi tape st0<4>st0: try direct i/o: yes (alignment 512 B), max page reachable by HBA 2097152
SCSI device sda: 71096640 512-byte hdwr sectors (36401 MB)
SCSI device sda: drive cache: write through
SCSI device sda: 71096640 512-byte hdwr sectors (36401 MB)
SCSI device sda: drive cache: write through
sda: sda2 sda3 sda4
sd 0:0:8:0: Attached scsi disk sda
SCSI device sdb: 71096640 512-byte hdwr sectors (36401 MB)
SCSI device sdb: drive cache: write through
SCSI device sdb: 71096640 512-byte hdwr sectors (36401 MB)
SCSI device sdb: drive cache: write through
sdb: sdb1 sdb2
sd 0:0:9:0: Attached scsi disk sdb
sd 0:0:8:0: Attached scsi generic sg0 type 0
sd 0:0:9:0: Attached scsi generic sg1 type 0
0:0:15:0: Attached scsi generic sg2 type 13
st 1:0:0:0: Attached scsi generic sg3 type 1
ieee1394: Initialized config rom entry `ip1394'
ieee1394: raw1394: /dev/raw1394 device initialized
ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ohci_hcd 0001:01:01.0: OHCI Host Controller
ohci_hcd 0001:01:01.0: new USB bus registered, assigned bus number 1
ohci_hcd 0001:01:01.0: irq 131, io mem 0x3fde0003000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd 0001:01:01.1: OHCI Host Controller
ohci_hcd 0001:01:01.1: new USB bus registered, assigned bus number 2
ohci_hcd 0001:01:01.1: irq 132, io mem 0x3fde0002000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
ohci_hcd 0001:01:01.2: OHCI Host Controller
ohci_hcd 0001:01:01.2: new USB bus registered, assigned bus number 3
ohci_hcd 0001:01:01.2: irq 131, io mem 0x3fde0001000
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 1 port detected
ohci_hcd 0001:01:01.3: OHCI Host Controller
ohci_hcd 0001:01:01.3: new USB bus registered, assigned bus number 4
ohci_hcd 0001:01:01.3: irq 132, io mem 0x3fde0000000
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 1 port detected
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
/home/olaf/kernel/bugs/96313/linux-2.6.15-rc6-olh/drivers/usb/input/hid-core.c: v2.6:USB HID core driver
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
md: linear personality registered as nr 1
md: raid0 personality registered as nr 2
atkbd.c: keyboard reset failed on isa0060/serio1
md: raid1 personality registered as nr 3
md: raid10 personality registered as nr 9
md: raid5 personality registered as nr 4
raid5: measuring checksumming speed
8regs : 3777.000 MB/sec
8regs_prefetch: 3726.000 MB/sec
32regs : 4717.000 MB/sec
32regs_prefetch: 3839.000 MB/sec
raid5: using function: 32regs (4717.000 MB/sec)
md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: bitmap version 4.39
device-mapper: 4.4.0-ioctl (2005-01-12) initialised: dm-devel@redhat.com
oprofile: using ppc64/power4 performance monitoring.
Netfilter messages via NETLINK v0.30.
NET: Registered protocol family 2
IP route cache hash table entries: 524288 (order: 10, 4194304 bytes)
TCP established hash table entries: 1048576 (order: 12, 16777216 bytes)
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 1048576 bind 65536)
TCP reno registered
IPv4 over IPv4 tunneling driver
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
input: AT Raw Set 2 keyboard as /class/input/input0
Freeing unused kernel memory: 360k freed
st0: Block limits 1 - 16777215 bytes.
ReiserFS: sda4: found reiserfs format "3.6" with standard journal
ReiserFS: sda4: using ordered data mode
ReiserFS: sda4: journal params: device sda4, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: sda4: checking transaction log (sda4)
ReiserFS: sda4: Using r5 hash to sort names
ioctl32(showconsole:2292): Unknown cmd fd(0) cmd(40045432){00} arg(ffe05a88) on /dev/console
--
short story of a lazy sysadmin:
alias appserv=wotan
^ permalink raw reply
* [PATCH 9/9] ppc32: Allows compilation of a MPC52xx kernel without PCI
From: Sylvain Munaut @ 2005-12-20 20:44 UTC (permalink / raw)
To: Andrew Morton; +Cc: Tom Rini, Sylvain Munaut, Linux PPC Embedded
In-Reply-To: <0.20051220_213752_1ebc_tnt@patchsend.246tNt.com>
ppc32: Allows compilation of a MPC52xx kernel without PCI
Some custom cards might not need PCI, without this patch,
compilation fails.
Signed-off-by: Roger Blofeld <blofeldus@yahoo.com>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
---
commit 181a39c878aab09ba95bfd9396e8c7d7004f4c4e
tree 42106141a8a50c521a8d169bb6b364d78401e15d
parent ebf0598ce7564d4c1db16d995e609923bbb2eba8
author Sylvain Munaut <tnt@246tNt.com> Sun, 18 Dec 2005 21:27:54 +0100
committer Sylvain Munaut <tnt@246tNt.com> Sun, 18 Dec 2005 21:27:54 +0100
arch/ppc/platforms/lite5200.c | 2 ++
include/asm-ppc/io.h | 2 ++
include/asm-ppc/mpc52xx.h | 11 +++++++++++
3 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/arch/ppc/platforms/lite5200.c b/arch/ppc/platforms/lite5200.c
index d44cc99..7ed52dc 100644
--- a/arch/ppc/platforms/lite5200.c
+++ b/arch/ppc/platforms/lite5200.c
@@ -196,8 +196,10 @@ platform_init(unsigned long r3, unsigned
mpc52xx_set_bat();
/* No ISA bus by default */
+#ifdef CONFIG_PCI
isa_io_base = 0;
isa_mem_base = 0;
+#endif
/* Powersave */
/* This is provided as an example on how to do it. But you
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h
index 84ac6e2..df9cf6e 100644
--- a/include/asm-ppc/io.h
+++ b/include/asm-ppc/io.h
@@ -27,6 +27,8 @@
#if defined(CONFIG_4xx)
#include <asm/ibm4xx.h>
+#elif defined(CONFIG_PPC_MPC52xx)
+#include <asm/mpc52xx.h>
#elif defined(CONFIG_8xx)
#include <asm/mpc8xx.h>
#elif defined(CONFIG_8260)
diff --git a/include/asm-ppc/mpc52xx.h b/include/asm-ppc/mpc52xx.h
index 04d5630..a055e07 100644
--- a/include/asm-ppc/mpc52xx.h
+++ b/include/asm-ppc/mpc52xx.h
@@ -29,6 +29,17 @@ struct pt_regs;
#endif /* __ASSEMBLY__ */
+#ifdef CONFIG_PCI
+#define _IO_BASE isa_io_base
+#define _ISA_MEM_BASE isa_mem_base
+#define PCI_DRAM_OFFSET pci_dram_offset
+#else
+#define _IO_BASE 0
+#define _ISA_MEM_BASE 0
+#define PCI_DRAM_OFFSET 0
+#endif
+
+
/* ======================================================================== */
/* PPC Sys devices definition */
/* ======================================================================== */
^ permalink raw reply related
* [PATCH 8/9] ppc32: Fix MPC52xx PCI init in cas the bootloader didn't do it
From: Sylvain Munaut @ 2005-12-20 20:44 UTC (permalink / raw)
To: Andrew Morton; +Cc: Tom Rini, Sylvain Munaut, Linux PPC Embedded
In-Reply-To: <0.20051220_213752_1ebc_tnt@patchsend.246tNt.com>
ppc32: Fix MPC52xx PCI init in cas the bootloader didn't do it
We were counting on the bootloader to init some stuff, like get
the bus out of reset and enable accesses.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
---
commit ebf0598ce7564d4c1db16d995e609923bbb2eba8
tree 3ba738b8bf64ebe609c5f8301f87b55d25c2d9fd
parent 20734ce8dc6fafd40c421bd275712d7bb6124d20
author Sylvain Munaut <tnt@246tNt.com> Sun, 18 Dec 2005 20:09:13 +0100
committer Sylvain Munaut <tnt@246tNt.com> Sun, 18 Dec 2005 20:09:13 +0100
arch/ppc/syslib/mpc52xx_pci.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/ppc/syslib/mpc52xx_pci.c b/arch/ppc/syslib/mpc52xx_pci.c
index 2c5e6dd..313c96e 100644
--- a/arch/ppc/syslib/mpc52xx_pci.c
+++ b/arch/ppc/syslib/mpc52xx_pci.c
@@ -154,9 +154,12 @@ static struct pci_ops mpc52xx_pci_ops =
static void __init
mpc52xx_pci_setup(struct mpc52xx_pci __iomem *pci_regs)
{
+ u32 tmp;
/* Setup control regs */
- /* Nothing to do afaik */
+ tmp = in_be32(&pci_regs->scr);
+ tmp |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
+ out_be32(&pci_regs->scr, tmp);
/* Setup windows */
out_be32(&pci_regs->iw0btar, MPC52xx_PCI_IWBTAR_TRANSLATION(
@@ -197,13 +200,12 @@ mpc52xx_pci_setup(struct mpc52xx_pci __i
/* Not necessary and can be a bad thing if for example the bootloader
is displaying a splash screen or ... Just left here for
documentation purpose if anyone need it */
-#if 0
- u32 tmp;
tmp = in_be32(&pci_regs->gscr);
+#if 0
out_be32(&pci_regs->gscr, tmp | MPC52xx_PCI_GSCR_PR);
udelay(50);
- out_be32(&pci_regs->gscr, tmp);
#endif
+ out_be32(&pci_regs->gscr, tmp & ~MPC52xx_PCI_GSCR_PR);
}
static void
^ permalink raw reply related
* [PATCH 7/9] ppc32: Fix MPC52xx configuration space access
From: Sylvain Munaut @ 2005-12-20 20:43 UTC (permalink / raw)
To: Andrew Morton; +Cc: Tom Rini, Sylvain Munaut, Linux PPC Embedded
In-Reply-To: <0.20051220_213752_1ebc_tnt@patchsend.246tNt.com>
ppc32: Fix MPC52xx configuration space access
This patch takes care of an errata of the MPC5200 by avoiding 32 bits
access in type 1 configuration accesses. All others accesses are still
32 bits wide. It also adds some mb() since the simple out_be(...) are
not sufficient in this case.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
---
commit 20734ce8dc6fafd40c421bd275712d7bb6124d20
tree e53eeedbe423ecf718313dd2173031d456b4f3e8
parent 7834134483a1ae663b805714fcd741c1caf41171
author Sylvain Munaut <tnt@246tNt.com> Sun, 18 Dec 2005 14:52:51 +0100
committer Sylvain Munaut <tnt@246tNt.com> Sun, 18 Dec 2005 14:52:51 +0100
arch/ppc/syslib/mpc52xx_pci.c | 81 ++++++++++++++++++++++++++++++++++-------
1 files changed, 68 insertions(+), 13 deletions(-)
diff --git a/arch/ppc/syslib/mpc52xx_pci.c b/arch/ppc/syslib/mpc52xx_pci.c
index e6cb3e2..2c5e6dd 100644
--- a/arch/ppc/syslib/mpc52xx_pci.c
+++ b/arch/ppc/syslib/mpc52xx_pci.c
@@ -24,6 +24,12 @@
#include <asm/machdep.h>
+/* This macro is defined to activate the workaround for the bug
+ 435 of the MPC5200 (L25R). With it activated, we don't do any
+ 32 bits configuration access during type-1 cycles */
+#define MPC5200_BUG_435_WORKAROUND
+
+
static int
mpc52xx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
int offset, int len, u32 *val)
@@ -40,17 +46,39 @@ mpc52xx_pci_read_config(struct pci_bus *
((bus->number - hose->bus_offset) << 16) |
(devfn << 8) |
(offset & 0xfc));
+ mb();
- value = in_le32(hose->cfg_data);
+#ifdef MPC5200_BUG_435_WORKAROUND
+ if (bus->number != hose->bus_offset) {
+ switch (len) {
+ case 1:
+ value = in_8(((u8 __iomem *)hose->cfg_data) + (offset & 3));
+ break;
+ case 2:
+ value = in_le16(((u16 __iomem *)hose->cfg_data) + ((offset>>1) & 1));
+ break;
+
+ default:
+ value = in_le16((u16 __iomem *)hose->cfg_data) |
+ (in_le16(((u16 __iomem *)hose->cfg_data) + 1) << 16);
+ break;
+ }
+ }
+ else
+#endif
+ {
+ value = in_le32(hose->cfg_data);
- if (len != 4) {
- value >>= ((offset & 0x3) << 3);
- value &= 0xffffffff >> (32 - (len << 3));
+ if (len != 4) {
+ value >>= ((offset & 0x3) << 3);
+ value &= 0xffffffff >> (32 - (len << 3));
+ }
}
*val = value;
out_be32(hose->cfg_addr, 0);
+ mb();
return PCIBIOS_SUCCESSFUL;
}
@@ -71,21 +99,48 @@ mpc52xx_pci_write_config(struct pci_bus
((bus->number - hose->bus_offset) << 16) |
(devfn << 8) |
(offset & 0xfc));
+ mb();
- if (len != 4) {
- value = in_le32(hose->cfg_data);
+#ifdef MPC5200_BUG_435_WORKAROUND
+ if (bus->number != hose->bus_offset) {
+ switch (len) {
+ case 1:
+ out_8(((u8 __iomem *)hose->cfg_data) +
+ (offset & 3), val);
+ break;
+ case 2:
+ out_le16(((u16 __iomem *)hose->cfg_data) +
+ ((offset>>1) & 1), val);
+ break;
+
+ default:
+ out_le16((u16 __iomem *)hose->cfg_data,
+ (u16)val);
+ out_le16(((u16 __iomem *)hose->cfg_data) + 1,
+ (u16)(val>>16));
+ break;
+ }
+ }
+ else
+#endif
+ {
+ if (len != 4) {
+ value = in_le32(hose->cfg_data);
+
+ offset = (offset & 0x3) << 3;
+ mask = (0xffffffff >> (32 - (len << 3)));
+ mask <<= offset;
- offset = (offset & 0x3) << 3;
- mask = (0xffffffff >> (32 - (len << 3)));
- mask <<= offset;
+ value &= ~mask;
+ val = value | ((val << offset) & mask);
+ }
- value &= ~mask;
- val = value | ((val << offset) & mask);
+ out_le32(hose->cfg_data, val);
}
-
- out_le32(hose->cfg_data, val);
+ mb();
out_be32(hose->cfg_addr, 0);
+ mb();
return PCIBIOS_SUCCESSFUL;
}
^ permalink raw reply related
* [PATCH 6/9] ppc32: Remove __init qualifier from mpc52xx pci resources fixups
From: Sylvain Munaut @ 2005-12-20 20:43 UTC (permalink / raw)
To: Andrew Morton; +Cc: Tom Rini, Sylvain Munaut, Linux PPC Embedded
In-Reply-To: <0.20051220_213752_1ebc_tnt@patchsend.246tNt.com>
ppc32: Remove __init qualifier from mpc52xx pci resources fixups
The mpc52xx_pci_fixup_resources is not only called at init but also
when there is a pci hotplug like when a cardbus card is plugged in.
So that function is needed after init too.
Thanks to Asier Llano Palacios for reporting this.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
---
commit 7834134483a1ae663b805714fcd741c1caf41171
tree 56da4218fa2a0bd1541b7743e79415fc48715ba1
parent 0311bddd40fe347ea69a5659f02e1beb8fe96ea8
author Sylvain Munaut <tnt@246tNt.com> Sun, 18 Dec 2005 11:48:56 +0100
committer Sylvain Munaut <tnt@246tNt.com> Sun, 18 Dec 2005 11:48:56 +0100
arch/ppc/syslib/mpc52xx_pci.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/ppc/syslib/mpc52xx_pci.c b/arch/ppc/syslib/mpc52xx_pci.c
index 4ac1908..e6cb3e2 100644
--- a/arch/ppc/syslib/mpc52xx_pci.c
+++ b/arch/ppc/syslib/mpc52xx_pci.c
@@ -151,7 +151,7 @@ mpc52xx_pci_setup(struct mpc52xx_pci __i
#endif
}
-static void __init
+static void
mpc52xx_pci_fixup_resources(struct pci_dev *dev)
{
int i;
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox