* USB on MPC885 vs. MPC850/823
From: Wolfgang Grandegger @ 2007-09-21 7:00 UTC (permalink / raw)
To: linuxppc-embedded
Hello,
I heard that the MPC885 has an improved USB hardware/firmware compared
to the one on the rather old MPC823 or MPC850. Is it similar to the USB
on the MPC8272? It would be nice, if somebody could shed some light on
the usability and the support of USB in Linux for the MPC885 (or similar
MPC8xx chips).
Thanks.
Wolfgang.
^ permalink raw reply
* Triggered BUG_ON in prom.c/of_get_flat_dt_root()
From: Gerhard Pircher @ 2007-09-21 7:26 UTC (permalink / raw)
To: linuxppc-dev
Hi,
I was able to boot the first cuImage build from a 2.6.23-rc7 kernel source
on my AmigaOne. Unfortunately the kernel triggers a BUG_ON statement in
of_get_flat_dt_root(), which is called in the probe function of my
platform code.
I wasn't able to capture the kernel log, but it looks similar to this:
Invalid tag 0 scanning flattened device tree !
Invalid tag 0 scanning flattened device tree !
Invalid tag 0 scanning flattened device tree !
Invalid tag 0 scanning flattened device tree !
Bug in prom.c at line 162.
This is the cuboot-amigaone.c file:
#include "ops.h"
#include "stdio.h"
#include "cuboot.h"
#include "ppcboot.h"
static bd_t bd;
extern char _dtb_start[], _dtb_end[];
static void platform_fixups(void)
{
dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4,
bd.bi_busfreq);
}
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7)
{
CUBOOT_INIT();
ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
serial_console_init();
platform_ops.fixups = platform_fixups;
}
The device tree compiles fine, so I wonder what could trigger this
problem. Any ideas?
Thanks!
regards,
Gerhard
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
^ permalink raw reply
* Re: [patch 3/3] mpc8349emitx.dts: Add ds1339 RTC
From: Peter Korsgaard @ 2007-09-21 7:35 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, Timur Tabi
In-Reply-To: <20070920133528.GC14820@ld0162-tx32.am.freescale.net>
>>>>> "Scott" == Scott Wood <scottwood@freescale.com> writes:
Hi,
Scott> #size-cells is zero on i2c, so it should just be reg = <68>.
Scott> You'll probably need to add #address-cells and #size-cells to the
Scott> controller node, as well.
Ahh - Thanks. This should be better.
---
[PATCH] mpc8349emitx.dts: Add ds1339 RTC
Add ds1339 I2C RTC chip as child of 2nd I2C controller.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
arch/powerpc/boot/dts/mpc8349emitx.dts | 9 +++++++++
1 file changed, 9 insertions(+)
Index: linux/arch/powerpc/boot/dts/mpc8349emitx.dts
===================================================================
--- linux.orig/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ linux/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -62,12 +62,21 @@
};
i2c@3100 {
+ #address-cells = <1>;
+ #size-cells = <0>;
device_type = "i2c";
compatible = "fsl-i2c";
reg = <3100 100>;
interrupts = <f 8>;
interrupt-parent = < &ipic >;
dfsrr;
+
+ rtc@68 {
+ device_type = "rtc";
+ compatible = "dallas,ds1339";
+ reg = <68>;
+ };
+
};
spi@7000 {
--
Bye, Peter Korsgaard
^ permalink raw reply
* [PATCH] [POWERPC] Prepare to remove of_platform_driver name
From: Stephen Rothwell @ 2007-09-21 8:08 UTC (permalink / raw)
To: paulus; +Cc: ppc-dev
The name field of of_platform_driver is just copied into the
included device_driver. By not overriding an already initialised
device_driver name, we can convert the drivers over time to stop using
the of_platform_driver name.
Also we were not copying the owner field from of_platform_driver, so do
the same with it.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/of_platform.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index f70e787..eca8ccc 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -19,11 +19,11 @@
#include <linux/mod_devicetable.h>
#include <linux/slab.h>
#include <linux/pci.h>
+#include <linux/of_device.h>
+#include <linux/of_platform.h>
#include <asm/errno.h>
#include <asm/dcr.h>
-#include <asm/of_device.h>
-#include <asm/of_platform.h>
#include <asm/topology.h>
#include <asm/pci-bridge.h>
#include <asm/ppc-pci.h>
@@ -70,7 +70,10 @@ postcore_initcall(of_bus_driver_init);
int of_register_platform_driver(struct of_platform_driver *drv)
{
/* initialize common driver fields */
- drv->driver.name = drv->name;
+ if (!drv->driver.name)
+ drv->driver.name = drv->name;
+ if (!drv->driver.owner)
+ drv->driver.owner = drv->owner;
drv->driver.bus = &of_platform_bus_type;
/* register with core */
@@ -385,9 +388,11 @@ static struct of_device_id of_pci_phb_ids[] = {
};
static struct of_platform_driver of_pci_phb_driver = {
- .name = "of-pci",
- .match_table = of_pci_phb_ids,
- .probe = of_pci_phb_probe,
+ .match_table = of_pci_phb_ids,
+ .probe = of_pci_phb_probe,
+ .driver = {
+ .name = "of-pci",
+ },
};
static __init int of_pci_phb_init(void)
--
1.5.3.2
^ permalink raw reply related
* Re: [PATCH 09/11] [POWERPC] iSeries: move detection of virtual tapes
From: Christoph Hellwig @ 2007-09-21 8:29 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: ppc-dev, paulus
In-Reply-To: <20070921143841.37ad2a2f.sfr@canb.auug.org.au>
> +#if defined(CONFIG_VIOTAPE) || defined(CONFIG_VIOTAPE_MODULE)
> +/* Handle interrupt events for tape */
> +static void __init handle_tape_event(struct HvLpEvent *event)
> +{
> + struct vio_waitevent *we;
> + struct viotapelpevent *tevent = (struct viotapelpevent *)event;
I think we should generate these device tree entires unconditionally.
They're just a conversion of what the iseries firmware/hypervisor
provides and not dependent on a specific driver.
(dito for the other patches with the same scheme)
^ permalink raw reply
* ioremap with cache on 44x
From: Matthias Fuchs @ 2007-09-21 8:46 UTC (permalink / raw)
To: linuxppc-embedded
Hi,
I want to ioremap some memory on a PCI board with caching from a 440EPx
CPU. Typically ioremap() ends in __ioremap() with the flags set to _PAGE_NO_CACHE.
But even without this flag, the remapped range does not use the cache.
Using a BDI2000 debugger I always see the corresponding TLBs with
caching inhibited.
How can I access PCI memory with caching?
Matthias
^ permalink raw reply
* Re: [PATCH 09/11] [POWERPC] iSeries: move detection of virtual tapes
From: Stephen Rothwell @ 2007-09-21 10:56 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: ppc-dev, paulus
In-Reply-To: <20070921082952.GA5607@lst.de>
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
On Fri, 21 Sep 2007 10:29:52 +0200 Christoph Hellwig <hch@lst.de> wrote:
>
> I think we should generate these device tree entires unconditionally.
> They're just a conversion of what the iseries firmware/hypervisor
> provides and not dependent on a specific driver.
>
> (dito for the other patches with the same scheme)
You are right, of course. I will redo the relevant patches.
--
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
* Re: Kernel 2.6 and INITRAMFS in one file booting problem on ml403
From: Mirek23 @ 2007-09-21 13:08 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <12796771.post@talk.nabble.com>
I have sorted out partially my problem. The thing was that in the command
line which was passed from
u-boot to the kernel I have put root=/dev/ram what refers to the old
approach for the ramfs. In my case I use a new approach which does not need
the ram disk? (I guess and I have reduced it to 4 MB) and in the command
line I put somthing like: rdinit=/sbin/init.
When I have changed that all started somehow to work but unfortunately it
does not always work.
My observation is that I am able to boot linux kernel which contains
initramfs let say once per 2-3 tries.
I do not understand this behavior. I have tried many various things but I
came to the point that some times linux kernel boots properly or it does not
boot at all.
Below I enclose the output from the console:
U-Boot 1.2.0 (Sep 21 2007 - 14:26:11)
### No HW ID - assuming Avnet Virtex-4
DRAM: 32 MB
Top of RAM usable for U-Boot at: 02000000
Reserving 152k for U-Boot at: 01fd9000
Reserving 256k for malloc() at: 01f99000
Reserving 120 Bytes for Board Info at: 01f98f88
Reserving 48 Bytes for Global Data at: 01f98f58
Stack Pointer at: 01f98f38
New Stack Pointer is: 01f98f38
Now running in RAM - U-Boot at: 01fd9000
FLASH: flash detect cfi
## Booting image at 01300000 ...
Image Name: Linux-2.6.23-rc2
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 6983268 Bytes = 6.7 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
## Current stack ends at 0x01F986B8 => set upper limit to 0x00800000
## cmdline at 0x007FFF00 ... 0x007FFF7D
bd address = 0x01F98F88
memstart = 0x00000000
memsize = 0x02000000
flashstart = 0xFF000000
flashsize = 0x00800000
flashoffset = 0x00000000
sramstart = 0x00000000
sramsize = 0x00000000
bootflags = 0x00000031
procfreq = 100 MHz
plb_busfreq = 100 MHz
ethaddr = 00:50:C2:46:D8:01
IP addr = 129.129.144.82
baudrate = 9600 bps
No initrd
## Transferring control to Linux (at address 00000000) ...
After that it hangs.
I have tried to see what is in the memory location under __log_buf
but it was not more than: kernel panic .. not syncing .. signal 4 ...
Does somody has a clue what could be wrong?
Best Regards
Mirek
--
View this message in context: http://www.nabble.com/Kernel-2.6-and-INITRAMFS-in-one-file-booting-problem-on-ml403-tf4487411.html#a12820276
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
^ permalink raw reply
* [PATCH 0/3] PowerPC: Add cpu_setup functionality to 44x platform
From: Valentine Barshak @ 2007-09-21 14:41 UTC (permalink / raw)
To: linuxppc-dev
This patchset adds cpu_setup functionality to PowerPC 44x,
moves FPU init to cpu_setup callback and adds 440EPx/440GRx
incorrect write to DDR SDRAM errata workaround.
^ permalink raw reply
* [PATCH 1/3] PowerPC: Introduce cpu_setup functionality to 44x platform
From: Valentine Barshak @ 2007-09-21 14:44 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20070921144149.GA4150@ru.mvista.com>
This adds cpu_setup functionality for ppc44x platform.
Low level cpu-spefic initialization routines should be
placed in cpu_setup_44x.S and a callback should be
added to cputable. The cpu_setup is invoked
by identify_cpu() function at early init.
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
---
arch/powerpc/kernel/Makefile | 1 +
arch/powerpc/kernel/cpu_setup_44x.S | 19 +++++++++++++++++++
arch/powerpc/kernel/cputable.c | 13 +++++++------
3 files changed, 27 insertions(+), 6 deletions(-)
diff -ruN linux-2.6.orig/arch/powerpc/kernel/cpu_setup_44x.S linux-2.6/arch/powerpc/kernel/cpu_setup_44x.S
--- linux-2.6.orig/arch/powerpc/kernel/cpu_setup_44x.S 1970-01-01 03:00:00.000000000 +0300
+++ linux-2.6/arch/powerpc/kernel/cpu_setup_44x.S 2007-09-21 17:04:20.000000000 +0400
@@ -0,0 +1,19 @@
+/*
+ * This file contains low level CPU setup functions.
+ * Valentine Barshak <vbarshak@ru.mvista.com>
+ * MontaVista Software, Inc (c) 2007
+ *
+ * Based on cpu_setup_6xx code by
+ * Benjamin Herrenschmidt <benh@kernel.crashing.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#include <asm/processor.h>
+#include <asm/cputable.h>
+#include <asm/ppc_asm.h>
+
diff -ruN linux-2.6.orig/arch/powerpc/kernel/cputable.c linux-2.6/arch/powerpc/kernel/cputable.c
--- linux-2.6.orig/arch/powerpc/kernel/cputable.c 2007-09-21 14:56:40.000000000 +0400
+++ linux-2.6/arch/powerpc/kernel/cputable.c 2007-09-21 17:04:50.000000000 +0400
@@ -1319,17 +1319,18 @@
for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
if ((pvr & s->pvr_mask) == s->pvr_value) {
*cur = cpu_specs + i;
-#ifdef CONFIG_PPC64
- /* ppc64 expects identify_cpu to also call setup_cpu
- * for that processor. I will consolidate that at a
- * later time, for now, just use our friend #ifdef.
+#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
+ /* ppc64 and booke expect identify_cpu to also call
+ * setup_cpu for that processor. I will consolidate
+ * that at a later time, for now, just use #ifdef.
* we also don't need to PTRRELOC the function pointer
- * on ppc64 as we are running at 0 in real mode.
+ * on ppc64 and booke as we are running at 0 in real
+ * mode on ppc64 and reloc_offset is always 0 on booke.
*/
if (s->cpu_setup) {
s->cpu_setup(offset, s);
}
-#endif /* CONFIG_PPC64 */
+#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
return s;
}
BUG();
diff -ruN linux-2.6.orig/arch/powerpc/kernel/Makefile linux-2.6/arch/powerpc/kernel/Makefile
--- linux-2.6.orig/arch/powerpc/kernel/Makefile 2007-09-21 14:56:40.000000000 +0400
+++ linux-2.6/arch/powerpc/kernel/Makefile 2007-09-21 17:04:20.000000000 +0400
@@ -56,6 +56,7 @@
udbg.o misc.o io.o
obj-$(CONFIG_PPC32) += entry_32.o setup_32.o misc_32.o
obj-$(CONFIG_PPC64) += misc_64.o dma_64.o iommu.o
+obj-$(CONFIG_44x) += cpu_setup_44x.o
obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o
obj-$(CONFIG_MODULES) += ppc_ksyms.o
obj-$(CONFIG_BOOTX_TEXT) += btext.o
^ permalink raw reply
* [PATCH 2/3] PowerPC: Move 440EP(x) FPU setup from head_44x to cpu_setup_4xx
From: Valentine Barshak @ 2007-09-21 14:46 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20070921144149.GA4150@ru.mvista.com>
The PowerPC 440EP(x) FPU init is currently done in head_44x
under ifdefs. Since we should support more then one board
in the same kernel, we move FPU initialization code from head_44x
to cpu_setup_44x and add cpu_setup callbacks for 440EP(x).
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
---
arch/powerpc/kernel/cpu_setup_44x.S | 14 ++++++++++++++
arch/powerpc/kernel/cputable.c | 6 ++++++
arch/powerpc/kernel/head_44x.S | 10 ----------
3 files changed, 20 insertions(+), 10 deletions(-)
diff -ruN linux-2.6.orig/arch/powerpc/kernel/cpu_setup_44x.S linux-2.6/arch/powerpc/kernel/cpu_setup_44x.S
--- linux-2.6.orig/arch/powerpc/kernel/cpu_setup_44x.S 2007-09-21 16:18:35.000000000 +0400
+++ linux-2.6/arch/powerpc/kernel/cpu_setup_44x.S 2007-09-21 16:17:03.000000000 +0400
@@ -17,3 +17,17 @@
#include <asm/cputable.h>
#include <asm/ppc_asm.h>
+_GLOBAL(__setup_cpu_440ep)
+ b __init_fpu_44x
+_GLOBAL(__setup_cpu_440epx)
+ b __init_fpu_44x
+
+/* enable APU between CPU and FPU */
+_GLOBAL(__init_fpu_44x)
+ mfspr r3,SPRN_CCR0
+ /* Clear DAPUIB flag in CCR0 */
+ rlwinm r3,r3,0,12,10
+ mtspr SPRN_CCR0,r3
+ isync
+ blr
+
diff -ruN linux-2.6.orig/arch/powerpc/kernel/cputable.c linux-2.6/arch/powerpc/kernel/cputable.c
--- linux-2.6.orig/arch/powerpc/kernel/cputable.c 2007-09-21 16:18:22.000000000 +0400
+++ linux-2.6/arch/powerpc/kernel/cputable.c 2007-09-21 16:17:05.000000000 +0400
@@ -31,6 +31,8 @@
* and ppc64
*/
#ifdef CONFIG_PPC32
+extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
+extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
@@ -1111,6 +1113,7 @@
.cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
.icache_bsize = 32,
.dcache_bsize = 32,
+ .cpu_setup = __setup_cpu_440ep,
.platform = "ppc440",
},
{
@@ -1121,6 +1124,7 @@
.cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
.icache_bsize = 32,
.dcache_bsize = 32,
+ .cpu_setup = __setup_cpu_440ep,
.platform = "ppc440",
},
{ /* 440EPX */
@@ -1131,6 +1135,8 @@
.cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
.icache_bsize = 32,
.dcache_bsize = 32,
+ .cpu_setup = __setup_cpu_440epx,
+ .platform = "ppc440",
},
{ /* 440GRX */
.pvr_mask = 0xf0000ffb,
diff -ruN linux-2.6.orig/arch/powerpc/kernel/head_44x.S linux-2.6/arch/powerpc/kernel/head_44x.S
--- linux-2.6.orig/arch/powerpc/kernel/head_44x.S 2007-09-21 16:19:04.000000000 +0400
+++ linux-2.6/arch/powerpc/kernel/head_44x.S 2007-09-21 16:00:17.000000000 +0400
@@ -217,16 +217,6 @@
lis r4,interrupt_base@h /* IVPR only uses the high 16-bits */
mtspr SPRN_IVPR,r4
-#if defined(CONFIG_440EP) || defined(CONFIG_440EPX)
- /* Clear DAPUIB flag in CCR0 (enable APU between CPU and FPU) */
- mfspr r2,SPRN_CCR0
- lis r3,0xffef
- ori r3,r3,0xffff
- and r2,r2,r3
- mtspr SPRN_CCR0,r2
- isync
-#endif
-
/*
* This is where the main kernel code starts.
*/
^ permalink raw reply
* [PATCH 3/3] PowerPC: 440EPx/GRx incorrect write to DDR SDRAM errata workaround
From: Valentine Barshak @ 2007-09-21 14:50 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20070921144149.GA4150@ru.mvista.com>
Add a workaround for PowerPC 440EPx/GRx incorrect write to
DDR SDRAM errata. Data can be written to wrong address
in SDRAM when write pipelining enabled on plb0. We disable
it in the cpu_setup for these processors at early init.
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
---
arch/powerpc/kernel/cpu_setup_44x.S | 25 ++++++++++++++++++++++++-
arch/powerpc/kernel/cputable.c | 3 +++
2 files changed, 27 insertions(+), 1 deletion(-)
diff -ruN linux-2.6.orig/arch/powerpc/kernel/cpu_setup_44x.S linux-2.6/arch/powerpc/kernel/cpu_setup_44x.S
--- linux-2.6.orig/arch/powerpc/kernel/cpu_setup_44x.S 2007-09-21 15:31:14.000000000 +0400
+++ linux-2.6/arch/powerpc/kernel/cpu_setup_44x.S 2007-09-21 16:07:12.000000000 +0400
@@ -20,7 +20,14 @@
_GLOBAL(__setup_cpu_440ep)
b __init_fpu_44x
_GLOBAL(__setup_cpu_440epx)
- b __init_fpu_44x
+ mflr r4
+ bl __init_fpu_44x
+ bl __plb_disable_wrp
+ mtlr r4
+ blr
+_GLOBAL(__setup_cpu_440grx)
+ b __plb_disable_wrp
+
/* enable APU between CPU and FPU */
_GLOBAL(__init_fpu_44x)
@@ -31,3 +38,19 @@
isync
blr
+/*
+ * Workaround for the incorrect write to DDR SDRAM errata.
+ * The write address can be corrupted during writes to
+ * DDR SDRAM when write pipelining is enabled on PLB0.
+ * Disable write pipelining here.
+ */
+#define DCRN_PLB4A0_ACR 0x81
+
+_GLOBAL(__plb_disable_wrp)
+ mfdcr r3,DCRN_PLB4A0_ACR
+ /* clear WRP bit in PLB4A0_ACR */
+ rlwinm r3,r3,0,8,6
+ mtdcr DCRN_PLB4A0_ACR,r3
+ isync
+ blr
+
diff -ruN linux-2.6.orig/arch/powerpc/kernel/cputable.c linux-2.6/arch/powerpc/kernel/cputable.c
--- linux-2.6.orig/arch/powerpc/kernel/cputable.c 2007-09-21 15:55:23.000000000 +0400
+++ linux-2.6/arch/powerpc/kernel/cputable.c 2007-09-21 16:08:23.000000000 +0400
@@ -33,6 +33,7 @@
#ifdef CONFIG_PPC32
extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
+extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
@@ -1146,6 +1147,8 @@
.cpu_user_features = COMMON_USER_BOOKE,
.icache_bsize = 32,
.dcache_bsize = 32,
+ .cpu_setup = __setup_cpu_440grx,
+ .platform = "ppc440",
},
{ /* 440GP Rev. B */
.pvr_mask = 0xf0000fff,
^ permalink raw reply
* AMCC yosemite 440ep PCI slot doesn't work.
From: Andrew Liu @ 2007-09-21 10:53 UTC (permalink / raw)
To: linuxppc-dev
Hello All,
when insert a RealTek RTL8139 network card into PCI slot,
After system boot up,
root@localhost:/root> ifconfig eth2 192.168.17.12
irq 25: nobody cared (try booting with the "irqpoll" option)
Call Trace:
[cf135af0] [c0008820] show_stack+0x48/0x190 (unreliable)
[cf135b20] [c003c414] __report_bad_irq+0x34/0xac
[cf135b40] [c003c714] note_interrupt+0x288/0x2c8
[cf135b70] [c003b818] __do_IRQ+0x104/0x110
[cf135b90] [c0006900] do_IRQ+0xbc/0xc0
[cf135ba0] [c00020c0] ret_from_except+0x0/0x18
[cf135c60] [00000019] 0x19
[cf135c90] [c000668c] do_softirq+0x54/0x58
[cf135ca0] [c001df40] irq_exit+0x48/0x58
[cf135cb0] [c00068b4] do_IRQ+0x70/0xc0
[cf135cc0] [c00020c0] ret_from_except+0x0/0x18
[cf135d80] [c003c2b4] setup_irq+0x1ac/0x200
[cf135da0] [c003c3cc] request_irq+0xc4/0xd8
[cf135dd0] [c0122328] rtl8139_open+0x38/0x210
[cf135df0] [c0187500] dev_open+0x7c/0xcc
[cf135e10] [c0187420] dev_change_flags+0x16c/0x1d0
[cf135e30] [c01cbff0] devinet_ioctl+0x604/0x720
[cf135ea0] [c01cc1f8] inet_ioctl+0x98/0xbc
[cf135eb0] [c0179328] sock_ioctl+0x60/0x260
[cf135ed0] [c006c360] do_ioctl+0x38/0x84
[cf135ee0] [c006c438] vfs_ioctl+0x8c/0x40c
[cf135f10] [c006c7f8] sys_ioctl+0x40/0x74
[cf135f40] [c0001a84] ret_from_syscall+0x0/0x3c
handlers:
[<c0122bd4>] (rtl8139_interrupt+0x0/0x52c)
Disabling IRQ #25
root@localhost:/root>
Message from syslogd@localhost at Thu Jan 1 00:02:13 1970 ...
localhost kernel: Disabling IRQ #25
root@localhost:/root>
The system boot up information as follows:
root@localhost:/root> dmesg
Linux version 2.6.23-rc6-gea60adb5 (sliu@localhost.localdomain) (gcc
version 4.0.0 (DENX ELDK 4.1 4.0.0)) #3 Fri Sep 21 18:37:59 CST 2007
AMCC PowerPC 440EP Yosemite Platform
Entering add_active_range(0, 0, 65536) 0 entries of 256 used
Zone PFN ranges:
DMA 0 -> 65536
Normal 65536 -> 65536
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0 -> 65536
On node 0 totalpages: 65536
DMA zone: 512 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 65024 pages, LIFO batch:15
Normal zone: 0 pages used for memmap
Movable zone: 0 pages used for memmap
Built 1 zonelists in Zone order. Total pages: 65024
Kernel command line: root=/dev/nfs rw
nfsroot=128.224.149.6:/tftpboot/sliu/rootfs
ip=128.224.149.11::128.224.149.1:255.255.255.0:yosemite:eth0:off
console=ttyS0,9600
PID hash table entries: 1024 (order: 10, 4096 bytes)
console [ttyS0] enabled
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 256896k available (2052k kernel code, 716k data, 152k init, 0k
highmem)
Calibrating delay loop... 798.72 BogoMIPS (lpj=1597440)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
PCI: Probing PCI hardware
PCI: Scanning bus 0000:00
PCI: Found 0000:00:0c.0 [10ec/8139] 000200 00
PCI: Calling quirk c000444c for 0000:00:0c.0
PCI: Fixups for bus 0000:00
PCI: Bus scan for 0000:00 returning with max=00
PCI: fixup irq: (0000:00:0c.0) got 25
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
PCI: Calling quirk c00fbab4 for 0000:00:0c.0
PCI: Calling quirk c02ae3b8 for 0000:00:0c.0
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250: ttyS0 at MMIO 0x0 (irq = 0) is a 16550A
serial8250: ttyS1 at MMIO 0x0 (irq = 1) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
PPC 4xx OCP EMAC driver, version 3.54
mal0: initialized, 4 TX channels, 2 RX channels
zmii0: bridge in RMII mode
eth0: emac0, MAC 00:10:ec:00:87:42
eth0: found Generic MII PHY (0x01)
eth1: emac1, MAC 00:00:00:00:00:00
eth1: found Generic MII PHY (0x03)
8139too Fast Ethernet driver 0.9.28
eth2: RealTek RTL8139 at 0xd1012f00, 00:0e:2e:7e:f5:e6, IRQ 25
eth2: Identified 8139 chip type 'RTL-8100B/8139D'
pegasus: v0.6.14 (2006/09/27), Pegasus/Pegasus II USB Ethernet driver
usbcore: registered new interface driver pegasus
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
usbmon: debugfs is not available
ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
ppc-soc-ohci ppc-soc-ohci.0: USB Host Controller
ppc-soc-ohci ppc-soc-ohci.0: new USB bus registered, assigned bus number 1
ppc-soc-ohci ppc-soc-ohci.0: irq 40, io mem 0xef601000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
ether gadget: using random self ethernet address
ether gadget: using random host ethernet address
usb0: Ethernet Gadget, version: May Day 2005
usb0: using musbhsfc_udc, OUT ep2 IN ep1 STATUS ep3
usb0: MAC 66:91:74:ab:fb:61
usb0: HOST MAC 1a:b5:87:5d:8f:00
usb0: RNDIS ready
musbhsfc_udc: registered gadget driver 'ether'
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
usb 1-1: new full speed USB device using ppc-soc-ohci and address 2
usb 1-1: configuration #1 chosen from 1 choice
eth0: link is up, 100 FDX, pause enabled
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
IP-Config: Complete:
device=eth0, addr=128.224.149.11, mask=255.255.255.0,
gw=128.224.149.1,
host=yosemite, domain=, nis-domain=(none),
bootserver=255.255.255.255, rootserver=128.224.149.6, rootpath=
Looking up port of RPC 100003/2 on 128.224.149.6
Looking up port of RPC 100005/1 on 128.224.149.6
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 152k init
scsi 0:0:0:0: Direct-Access Kingston DataTraveler 2.0 6.16 PQ: 0
ANSI: 0 CCS
sd 0:0:0:0: [sda] 244735 512-byte hardware sectors (125 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 45 00 00 08
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] 244735 512-byte hardware sectors (125 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 45 00 00 08
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 0:0:0:0: [sda] Attached SCSI removable disk
sd 0:0:0:0: Attached scsi generic sg0 type 0
usb-storage: device scan complete
irq 25: nobody cared (try booting with the "irqpoll" option)
Call Trace:
[cf135af0] [c0008820] show_stack+0x48/0x190 (unreliable)
[cf135b20] [c003c414] __report_bad_irq+0x34/0xac
[cf135b40] [c003c714] note_interrupt+0x288/0x2c8
[cf135b70] [c003b818] __do_IRQ+0x104/0x110
[cf135b90] [c0006900] do_IRQ+0xbc/0xc0
[cf135ba0] [c00020c0] ret_from_except+0x0/0x18
[cf135c60] [00000019] 0x19
[cf135c90] [c000668c] do_softirq+0x54/0x58
[cf135ca0] [c001df40] irq_exit+0x48/0x58
[cf135cb0] [c00068b4] do_IRQ+0x70/0xc0
[cf135cc0] [c00020c0] ret_from_except+0x0/0x18
[cf135d80] [c003c2b4] setup_irq+0x1ac/0x200
[cf135da0] [c003c3cc] request_irq+0xc4/0xd8
[cf135dd0] [c0122328] rtl8139_open+0x38/0x210
[cf135df0] [c0187500] dev_open+0x7c/0xcc
[cf135e10] [c0187420] dev_change_flags+0x16c/0x1d0
[cf135e30] [c01cbff0] devinet_ioctl+0x604/0x720
[cf135ea0] [c01cc1f8] inet_ioctl+0x98/0xbc
[cf135eb0] [c0179328] sock_ioctl+0x60/0x260
[cf135ed0] [c006c360] do_ioctl+0x38/0x84
[cf135ee0] [c006c438] vfs_ioctl+0x8c/0x40c
[cf135f10] [c006c7f8] sys_ioctl+0x40/0x74
[cf135f40] [c0001a84] ret_from_syscall+0x0/0x3c
handlers:
[<c0122bd4>] (rtl8139_interrupt+0x0/0x52c)
Disabling IRQ #25
eth2: link up, 100Mbps, full-duplex, lpa 0x45E1
Who can give some advice?
Thanks.
BRs,
Andrew.
^ permalink raw reply
* Re: AMCC yosemite 440ep PCI slot doesn't work.
From: Valentine Barshak @ 2007-09-21 15:14 UTC (permalink / raw)
To: Andrew Liu; +Cc: linuxppc-dev
In-Reply-To: <46F3A2C4.7000202@windriver.com>
Andrew Liu wrote:
> Hello All,
>
> when insert a RealTek RTL8139 network card into PCI slot,
> After system boot up,
>
> root@localhost:/root> ifconfig eth2 192.168.17.12
> irq 25: nobody cared (try booting with the "irqpoll" option)
> Call Trace:
> [cf135af0] [c0008820] show_stack+0x48/0x190 (unreliable)
> [cf135b20] [c003c414] __report_bad_irq+0x34/0xac
> [cf135b40] [c003c714] note_interrupt+0x288/0x2c8
> [cf135b70] [c003b818] __do_IRQ+0x104/0x110
> [cf135b90] [c0006900] do_IRQ+0xbc/0xc0
> [cf135ba0] [c00020c0] ret_from_except+0x0/0x18
> [cf135c60] [00000019] 0x19
> [cf135c90] [c000668c] do_softirq+0x54/0x58
> [cf135ca0] [c001df40] irq_exit+0x48/0x58
> [cf135cb0] [c00068b4] do_IRQ+0x70/0xc0
> [cf135cc0] [c00020c0] ret_from_except+0x0/0x18
> [cf135d80] [c003c2b4] setup_irq+0x1ac/0x200
> [cf135da0] [c003c3cc] request_irq+0xc4/0xd8
> [cf135dd0] [c0122328] rtl8139_open+0x38/0x210
> [cf135df0] [c0187500] dev_open+0x7c/0xcc
> [cf135e10] [c0187420] dev_change_flags+0x16c/0x1d0
> [cf135e30] [c01cbff0] devinet_ioctl+0x604/0x720
> [cf135ea0] [c01cc1f8] inet_ioctl+0x98/0xbc
> [cf135eb0] [c0179328] sock_ioctl+0x60/0x260
> [cf135ed0] [c006c360] do_ioctl+0x38/0x84
> [cf135ee0] [c006c438] vfs_ioctl+0x8c/0x40c
> [cf135f10] [c006c7f8] sys_ioctl+0x40/0x74
> [cf135f40] [c0001a84] ret_from_syscall+0x0/0x3c
> handlers:
> [<c0122bd4>] (rtl8139_interrupt+0x0/0x52c)
> Disabling IRQ #25
> root@localhost:/root>
> Message from syslogd@localhost at Thu Jan 1 00:02:13 1970 ...
> localhost kernel: Disabling IRQ #25
>
> root@localhost:/root>
>
>
> The system boot up information as follows:
> root@localhost:/root> dmesg
> Linux version 2.6.23-rc6-gea60adb5 (sliu@localhost.localdomain) (gcc
> version 4.0.0 (DENX ELDK 4.1 4.0.0)) #3 Fri Sep 21 18:37:59 CST 2007
> AMCC PowerPC 440EP Yosemite Platform
> Entering add_active_range(0, 0, 65536) 0 entries of 256 used
> Zone PFN ranges:
> DMA 0 -> 65536
> Normal 65536 -> 65536
> Movable zone start PFN for each node
> early_node_map[1] active PFN ranges
> 0: 0 -> 65536
> On node 0 totalpages: 65536
> DMA zone: 512 pages used for memmap
> DMA zone: 0 pages reserved
> DMA zone: 65024 pages, LIFO batch:15
> Normal zone: 0 pages used for memmap
> Movable zone: 0 pages used for memmap
> Built 1 zonelists in Zone order. Total pages: 65024
> Kernel command line: root=/dev/nfs rw
> nfsroot=128.224.149.6:/tftpboot/sliu/rootfs
> ip=128.224.149.11::128.224.149.1:255.255.255.0:yosemite:eth0:off
> console=ttyS0,9600
> PID hash table entries: 1024 (order: 10, 4096 bytes)
> console [ttyS0] enabled
> Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
> Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
> Memory: 256896k available (2052k kernel code, 716k data, 152k init, 0k
> highmem)
> Calibrating delay loop... 798.72 BogoMIPS (lpj=1597440)
> Mount-cache hash table entries: 512
> NET: Registered protocol family 16
> PCI: Probing PCI hardware
> PCI: Scanning bus 0000:00
> PCI: Found 0000:00:0c.0 [10ec/8139] 000200 00
> PCI: Calling quirk c000444c for 0000:00:0c.0
> PCI: Fixups for bus 0000:00
> PCI: Bus scan for 0000:00 returning with max=00
> PCI: fixup irq: (0000:00:0c.0) got 25
> SCSI subsystem initialized
> usbcore: registered new interface driver usbfs
> usbcore: registered new interface driver hub
> usbcore: registered new device driver usb
> NET: Registered protocol family 2
> IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
> TCP established hash table entries: 8192 (order: 4, 65536 bytes)
> TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
> TCP: Hash tables configured (established 8192 bind 8192)
> TCP reno registered
> io scheduler noop registered
> io scheduler anticipatory registered (default)
> io scheduler deadline registered
> io scheduler cfq registered
> PCI: Calling quirk c00fbab4 for 0000:00:0c.0
> PCI: Calling quirk c02ae3b8 for 0000:00:0c.0
> Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
> serial8250: ttyS0 at MMIO 0x0 (irq = 0) is a 16550A
> serial8250: ttyS1 at MMIO 0x0 (irq = 1) is a 16550A
> RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
> PPC 4xx OCP EMAC driver, version 3.54
> mal0: initialized, 4 TX channels, 2 RX channels
> zmii0: bridge in RMII mode
> eth0: emac0, MAC 00:10:ec:00:87:42
> eth0: found Generic MII PHY (0x01)
> eth1: emac1, MAC 00:00:00:00:00:00
> eth1: found Generic MII PHY (0x03)
> 8139too Fast Ethernet driver 0.9.28
> eth2: RealTek RTL8139 at 0xd1012f00, 00:0e:2e:7e:f5:e6, IRQ 25
> eth2: Identified 8139 chip type 'RTL-8100B/8139D'
> pegasus: v0.6.14 (2006/09/27), Pegasus/Pegasus II USB Ethernet driver
> usbcore: registered new interface driver pegasus
> Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
> ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
> usbmon: debugfs is not available
> ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
> ppc-soc-ohci ppc-soc-ohci.0: USB Host Controller
> ppc-soc-ohci ppc-soc-ohci.0: new USB bus registered, assigned bus number 1
> ppc-soc-ohci ppc-soc-ohci.0: irq 40, io mem 0xef601000
> usb usb1: configuration #1 chosen from 1 choice
> hub 1-0:1.0: USB hub found
> hub 1-0:1.0: 2 ports detected
> Initializing USB Mass Storage driver...
> usbcore: registered new interface driver usb-storage
> USB Mass Storage support registered.
> ether gadget: using random self ethernet address
> ether gadget: using random host ethernet address
> usb0: Ethernet Gadget, version: May Day 2005
> usb0: using musbhsfc_udc, OUT ep2 IN ep1 STATUS ep3
> usb0: MAC 66:91:74:ab:fb:61
> usb0: HOST MAC 1a:b5:87:5d:8f:00
> usb0: RNDIS ready
> musbhsfc_udc: registered gadget driver 'ether'
> TCP cubic registered
> NET: Registered protocol family 1
> NET: Registered protocol family 17
> usb 1-1: new full speed USB device using ppc-soc-ohci and address 2
> usb 1-1: configuration #1 chosen from 1 choice
> eth0: link is up, 100 FDX, pause enabled
> scsi0 : SCSI emulation for USB Mass Storage devices
> usb-storage: device found at 2
> usb-storage: waiting for device to settle before scanning
> IP-Config: Complete:
> device=eth0, addr=128.224.149.11, mask=255.255.255.0,
> gw=128.224.149.1,
> host=yosemite, domain=, nis-domain=(none),
> bootserver=255.255.255.255, rootserver=128.224.149.6, rootpath=
> Looking up port of RPC 100003/2 on 128.224.149.6
> Looking up port of RPC 100005/1 on 128.224.149.6
> VFS: Mounted root (nfs filesystem).
> Freeing unused kernel memory: 152k init
> scsi 0:0:0:0: Direct-Access Kingston DataTraveler 2.0 6.16 PQ: 0
> ANSI: 0 CCS
> sd 0:0:0:0: [sda] 244735 512-byte hardware sectors (125 MB)
> sd 0:0:0:0: [sda] Write Protect is off
> sd 0:0:0:0: [sda] Mode Sense: 45 00 00 08
> sd 0:0:0:0: [sda] Assuming drive cache: write through
> sd 0:0:0:0: [sda] 244735 512-byte hardware sectors (125 MB)
> sd 0:0:0:0: [sda] Write Protect is off
> sd 0:0:0:0: [sda] Mode Sense: 45 00 00 08
> sd 0:0:0:0: [sda] Assuming drive cache: write through
> sda: sda1
> sd 0:0:0:0: [sda] Attached SCSI removable disk
> sd 0:0:0:0: Attached scsi generic sg0 type 0
> usb-storage: device scan complete
> irq 25: nobody cared (try booting with the "irqpoll" option)
> Call Trace:
> [cf135af0] [c0008820] show_stack+0x48/0x190 (unreliable)
> [cf135b20] [c003c414] __report_bad_irq+0x34/0xac
> [cf135b40] [c003c714] note_interrupt+0x288/0x2c8
> [cf135b70] [c003b818] __do_IRQ+0x104/0x110
> [cf135b90] [c0006900] do_IRQ+0xbc/0xc0
> [cf135ba0] [c00020c0] ret_from_except+0x0/0x18
> [cf135c60] [00000019] 0x19
> [cf135c90] [c000668c] do_softirq+0x54/0x58
> [cf135ca0] [c001df40] irq_exit+0x48/0x58
> [cf135cb0] [c00068b4] do_IRQ+0x70/0xc0
> [cf135cc0] [c00020c0] ret_from_except+0x0/0x18
> [cf135d80] [c003c2b4] setup_irq+0x1ac/0x200
> [cf135da0] [c003c3cc] request_irq+0xc4/0xd8
> [cf135dd0] [c0122328] rtl8139_open+0x38/0x210
> [cf135df0] [c0187500] dev_open+0x7c/0xcc
> [cf135e10] [c0187420] dev_change_flags+0x16c/0x1d0
> [cf135e30] [c01cbff0] devinet_ioctl+0x604/0x720
> [cf135ea0] [c01cc1f8] inet_ioctl+0x98/0xbc
> [cf135eb0] [c0179328] sock_ioctl+0x60/0x260
> [cf135ed0] [c006c360] do_ioctl+0x38/0x84
> [cf135ee0] [c006c438] vfs_ioctl+0x8c/0x40c
> [cf135f10] [c006c7f8] sys_ioctl+0x40/0x74
> [cf135f40] [c0001a84] ret_from_syscall+0x0/0x3c
> handlers:
> [<c0122bd4>] (rtl8139_interrupt+0x0/0x52c)
> Disabling IRQ #25
> eth2: link up, 100Mbps, full-duplex, lpa 0x45E1
>
>
> Who can give some advice?
>
> Thanks.
> BRs,
> Andrew.
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
Looks like wrong external interrupt settings (trigger/level) for PCI
interrupt.
^ permalink raw reply
* DTC Patch for Cygwin
From: Matt Tyrlik @ 2007-09-21 15:26 UTC (permalink / raw)
To: linuxppc-dev; +Cc: dwg
[-- Attachment #1: Type: text/plain, Size: 2353 bytes --]
Changes required to compile DTC under Cygwin
===================================================================
--- dtc-org.orig/tests/supernode_atdepth_offset.c
+++ dtc-org/tests/supernode_atdepth_offset.c
@@ -63,8 +63,11 @@ int path_prefix(const char *path, int de
return 1;
p = path;
- for (i = 0; i < depth; i++)
- p = strchrnul(p+1, '/');
+ for (i = 0; i < depth; i++) {
+ p = strchr(p+1, '/');
+ if (!p)
+ p = path + strlen(path);
+ }
return p - path;
}
Index: dtc-org/tests/testutils.c
===================================================================
--- dtc-org.orig/tests/testutils.c
+++ dtc-org/tests/testutils.c
@@ -52,10 +52,9 @@ static void sigint_handler(int signum, s
void test_init(int argc, char *argv[])
{
int err;
- struct sigaction sa_int = {
- .sa_sigaction = sigint_handler,
- };
+ struct sigaction sa_int;
+ sa_int.sa_sigaction = sigint_handler,
test_name = argv[0];
err = sigaction(SIGINT, &sa_int, NULL);
Index: dtc-org/tests/trees.S
===================================================================
--- dtc-org.orig/tests/trees.S
+++ dtc-org/tests/trees.S
@@ -17,10 +17,16 @@
.byte ((val) >> 8) & 0xff ; \
.byte (val) & 0xff
+#ifdef __CYGWIN__
+#define TREE_SYMBOL(tree) __##tree
+#else
+#define TREE_SYMBOL(tree) _##tree
+#endif
+
#define TREE_HDR(tree) \
.balign 4 ; \
- .globl _##tree ; \
-_##tree: \
+ .globl TREE_SYMBOL(tree); \
+TREE_SYMBOL(tree): \
tree: \
FDTLONG(FDT_MAGIC) ; \
FDTLONG(tree##_end - tree) ; \
Index: dtc-org/tests/tests.h
===================================================================
--- dtc-org.orig/tests/tests.h
+++ dtc-org/tests/tests.h
@@ -130,4 +130,15 @@ const void *check_getprop(void *fdt, int
void *load_blob_arg(int argc, char *argv[]);
void save_blob(const char *filename, void *blob);
+#ifndef GLIBC
+#define strndupa(my_str, my_len) \
+ ({ \
+ char *new_str=alloca((my_len) + 1); \
+ strncpy(new_str, my_str, my_len); \
+ new_str[my_len]='\0'; \
+ new_str; \
+ })
+
+#endif
+
#endif /* _TESTS_H */
Matt Tyrlik
[-- Attachment #2: Type: text/html, Size: 4295 bytes --]
^ permalink raw reply
* Re: USB on MPC885 vs. MPC850/823
From: Scott Wood @ 2007-09-21 17:22 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: linuxppc-embedded
In-Reply-To: <46F36C01.1040401@grandegger.com>
On Fri, Sep 21, 2007 at 09:00:17AM +0200, Wolfgang Grandegger wrote:
> I heard that the MPC885 has an improved USB hardware/firmware compared
> to the one on the rather old MPC823 or MPC850. Is it similar to the USB
> on the MPC8272? It would be nice, if somebody could shed some light on
> the usability and the support of USB in Linux for the MPC885 (or similar
> MPC8xx chips).
I don't think there's any support in Linux for CPM USB.
-Scott
^ permalink raw reply
* Re: [PATCH 08/10] bootwrapper: Add a firmware-independent "raw" target.
From: Grant Likely @ 2007-09-21 17:31 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20070905192116.GH32113@ld0162-tx32.am.freescale.net>
On 9/5/07, Scott Wood <scottwood@freescale.com> wrote:
> This target produces a flat binary rather than an ELF file,
> fixes the entry point at the beginning of the image, and takes
> a complete device tree with no fixups needed.
>
> The device tree must have labels on /#address-cells, the timebase
> frequency, and the memory size.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> index 02f0fe0..2a6a4c6 100644
> --- a/arch/powerpc/boot/Makefile
> +++ b/arch/powerpc/boot/Makefile
> @@ -48,7 +48,8 @@ src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \
> cpm-serial.c stdlib.c planetcore.c
> src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \
> cuboot-ebony.c treeboot-ebony.c prpmc2800.c \
> - ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c cuboot-pq2.c
> + ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c \
> + cuboot-8xx.c cuboot-pq2.c fixed-head.S raw-platform.c
> src-boot := $(src-wlib) $(src-plat) empty.c
>
> src-boot := $(addprefix $(obj)/, $(src-boot))
> @@ -146,6 +147,7 @@ image-$(CONFIG_PPC_83xx) += cuImage.83xx
> image-$(CONFIG_PPC_85xx) += cuImage.85xx
> image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony
> image-$(CONFIG_BAMBOO) += treeImage.bamboo
> +image-$(CONFIG_BUILD_RAW_IMAGE) += zImage.raw
> endif
>
> # For 32-bit powermacs, build the COFF and miboot images
Are these makefile changes complete? When I attempt to compile with
this patch I get the following error:
grant@trillian:~/hacking/linux-2.6$ ppc4xx make
CHK include/linux/version.h
CHK include/linux/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/linux/compile.h
make[1]: *** No rule to make target `arch/powerpc/boot/zImage.raw',
needed by `arch/powerpc/boot/zImage'. Stop.
make: *** [zImage] Error 2
grant@trillian:~/hacking/linux-2.6$
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Re: [PATCH 08/10] bootwrapper: Add a firmware-independent "raw" target.
From: Scott Wood @ 2007-09-21 17:33 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
In-Reply-To: <fa686aa40709211031t687310fdk9ca703ea8cf759e7@mail.gmail.com>
On Fri, Sep 21, 2007 at 11:31:11AM -0600, Grant Likely wrote:
> Are these makefile changes complete? When I attempt to compile with
> this patch I get the following error:
>
> grant@trillian:~/hacking/linux-2.6$ ppc4xx make
> CHK include/linux/version.h
> CHK include/linux/utsrelease.h
> CALL scripts/checksyscalls.sh
> CHK include/linux/compile.h
> make[1]: *** No rule to make target `arch/powerpc/boot/zImage.raw',
> needed by `arch/powerpc/boot/zImage'. Stop.
> make: *** [zImage] Error 2
> grant@trillian:~/hacking/linux-2.6$
Odd... It should match the zImage.% target.
-Scott
^ permalink raw reply
* Re: 44x bug: funny TLB writes?
From: Hollis Blanchard @ 2007-09-21 17:37 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev
In-Reply-To: <20070921054218.GA13470@localhost.localdomain>
On Fri, 2007-09-21 at 15:42 +1000, David Gibson wrote:
> On Thu, Sep 20, 2007 at 10:34:12PM -0500, Hollis Blanchard wrote:
> > I seem to have come across a strange bug while doing KVM development. It
> > seems that the final tlbwe in finish_tlb (head_44x.S) is actually
> > leaking RPN bits into the "attribute" word.
> >
> > When I set a breakpoint there and press enter on the serial console, I
> > see r12=ef600703, which is the physical address of the UART on this chip
> > (440EP), plus the correct permission bits at the bottom.
> >
> > Am I crazy? I'm not really looking to step through that assembly right
> > now... Clearly (current) hardware is just ignoring these errant writes,
> > but it should be fixed.
>
> A quick glance at the code suggests this is indeed wrong. Hurrah.
> Another reason to rewrite the 44x tlb miss handling.
Actually it's slightly worse than I thought. Not only are we setting "0"
bits in the TLB word, I'm also seeing mappings like this:
pid word0 word1 word2
00000001 7fe4f210 00209000 00200349
That means WIMG=0011, which seems inappropriate for userspace mappings.
(Oh and we're also writing to the only reserved bit in word2.)
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply
* Re: DTC Patch for Cygwin
From: Scott Wood @ 2007-09-21 18:46 UTC (permalink / raw)
To: Matt Tyrlik; +Cc: linuxppc-dev, dwg
In-Reply-To: <OF485FF693.8CDC7B13-ON8525735D.00541A51-8525735D.0054C8B8@us.ibm.com>
On Fri, Sep 21, 2007 at 11:26:04AM -0400, Matt Tyrlik wrote:
>
> Changes required to compile DTC under Cygwin
>
> ===================================================================
> --- dtc-org.orig/tests/supernode_atdepth_offset.c
> +++ dtc-org/tests/supernode_atdepth_offset.c
> @@ -63,8 +63,11 @@ int path_prefix(const char *path, int de
> return 1;
>
> p = path;
> - for (i = 0; i < depth; i++)
> - p = strchrnul(p+1, '/');
> + for (i = 0; i < depth; i++) {
> + p = strchr(p+1, '/');
> + if (!p)
> + p = path + strlen(path);
> + }
>
> return p - path;
> }
Maybe we should define strchrnul under #ifndef GLIBC, similar to
strndupa?
> Index: dtc-org/tests/testutils.c
> ===================================================================
> --- dtc-org.orig/tests/testutils.c
> +++ dtc-org/tests/testutils.c
> @@ -52,10 +52,9 @@ static void sigint_handler(int signum, s
> void test_init(int argc, char *argv[])
> {
> int err;
> - struct sigaction sa_int = {
> - .sa_sigaction = sigint_handler,
> - };
> + struct sigaction sa_int;
>
> + sa_int.sa_sigaction = sigint_handler,
> test_name = argv[0];
What version of GCC does cygwin use? That doesn't seem like something
that should break due to OS differences.
-Scott
^ permalink raw reply
* Re: DTC Patch for Cygwin
From: Matt Tyrlik @ 2007-09-21 19:42 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, dwg
In-Reply-To: <20070921184639.GA23906@ld0162-tx32.am.freescale.net>
[-- Attachment #1: Type: text/plain, Size: 1733 bytes --]
>Scott Wood <scottwood@freescale.com> wrote on 09/21/2007 02:46:39 PM:
> On Fri, Sep 21, 2007 at 11:26:04AM -0400, Matt Tyrlik wrote:
> >
> > Changes required to compile DTC under Cygwin
> >
> > ===================================================================
> > --- dtc-org.orig/tests/supernode_atdepth_offset.c
> > +++ dtc-org/tests/supernode_atdepth_offset.c
> > @@ -63,8 +63,11 @@ int path_prefix(const char *path, int de
> > return 1;
> >
> > p = path;
> > - for (i = 0; i < depth; i++)
> > - p = strchrnul(p+1, '/');
> > + for (i = 0; i < depth; i++) {
> > + p = strchr(p+1, '/');
> > + if (!p)
> > + p = path + strlen(path);
> > + }
> >
> > return p - path;
> > }
>
> Maybe we should define strchrnul under #ifndef GLIBC, similar to
> strndupa?
Since this is used only in one place David Gibson suggested that the
change should be done in code.
>
> > Index: dtc-org/tests/testutils.c
> > ===================================================================
> > --- dtc-org.orig/tests/testutils.c
> > +++ dtc-org/tests/testutils.c
> > @@ -52,10 +52,9 @@ static void sigint_handler(int signum, s
> > void test_init(int argc, char *argv[])
> > {
> > int err;
> > - struct sigaction sa_int = {
> > - .sa_sigaction = sigint_handler,
> > - };
> > + struct sigaction sa_int;
> >
> > + sa_int.sa_sigaction = sigint_handler,
> > test_name = argv[0];
>
> What version of GCC does cygwin use? That doesn't seem like something
> that should break due to OS differences.
>
> -Scott
Currently 3.4.4. The compiler can't handle unnamed union in an
initializer.
Matt
[-- Attachment #2: Type: text/html, Size: 2720 bytes --]
^ permalink raw reply
* Re: [PATCH v2 2/4] Implement generic time of day clocksource for powerpc machines.
From: Tony Breeds @ 2007-09-21 21:35 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linuxppc-dev, Thomas Gleixner, Paul Mackerras, Realtime Kernel
In-Reply-To: <20070921145212.7e8a7b89.sfr@canb.auug.org.au>
On Fri, Sep 21, 2007 at 02:52:12PM +1000, Stephen Rothwell wrote:
> Small comments.
Thanks.
> I think this is redundant as if __USE_RTC() is true, you register
> clocksource_rtc below.
Yup you're right.
> The #ifdef is redundant since if CONFIG_ISERIES is not set,
> firmware_has_feature(FW_FEATURE_ISERIES) is constant 0.
Ahh okay. I got too fancy for my own good.
patch comming.
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: [PATCH v3 2/4] Implement generic time of day clocksource for powerpc machines.
From: Tony Breeds @ 2007-09-21 21:35 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linuxppc-dev, Thomas Gleixner, Paul Mackerras, Realtime Kernel
In-Reply-To: <20070921145212.7e8a7b89.sfr@canb.auug.org.au>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
Updated to create a clocksource driver specific to the 601
Updated to address feedback from sfr
Only compile tested.
arch/powerpc/Kconfig | 6
arch/powerpc/kernel/time.c | 255 ++++++++++++-------------------------
2 files changed, 91 insertions(+), 170 deletions(-)
Index: working/arch/powerpc/Kconfig
===================================================================
--- working.orig/arch/powerpc/Kconfig
+++ working/arch/powerpc/Kconfig
@@ -24,6 +24,12 @@ config MMU
config GENERIC_CMOS_UPDATE
def_bool y
+config GENERIC_TIME
+ def_bool y
+
+config GENERIC_TIME_VSYSCALL
+ def_bool y
+
config GENERIC_HARDIRQS
bool
default y
Index: working/arch/powerpc/kernel/time.c
===================================================================
--- working.orig/arch/powerpc/kernel/time.c
+++ working/arch/powerpc/kernel/time.c
@@ -73,9 +73,38 @@
#include <asm/iseries/hv_call_xm.h>
#endif
+/* powerpc clocksource/clockevent code */
+
+#include <linux/clocksource.h>
+
+static cycle_t rtc_read(void);
+static struct clocksource clocksource_rtc = {
+ .name = "rtc",
+ .rating = 400,
+ .flags = CLOCK_SOURCE_IS_CONTINUOUS,
+ .mask = CLOCKSOURCE_MASK(64),
+ .shift = 22,
+ .mult = 0, /* To be filled in */
+ .read = rtc_read,
+};
+
+static cycle_t timebase_read(void);
+static struct clocksource clocksource_timebase = {
+ .name = "timebase",
+ .rating = 400,
+ .flags = CLOCK_SOURCE_IS_CONTINUOUS,
+ .mask = CLOCKSOURCE_MASK(64),
+ .shift = 22,
+ .mult = 0, /* To be filled in */
+ .read = timebase_read,
+};
+
#ifdef CONFIG_PPC_ISERIES
static unsigned long __initdata iSeries_recal_titan;
static signed long __initdata iSeries_recal_tb;
+
+/* Forward declaration is only needed for iSereis compiles */
+void __init clocksource_init(void);
#endif
#define XSEC_PER_SEC (1024*1024)
@@ -343,65 +372,6 @@ void udelay(unsigned long usecs)
}
EXPORT_SYMBOL(udelay);
-/*
- * This version of gettimeofday has microsecond resolution.
- */
-static inline void __do_gettimeofday(struct timeval *tv)
-{
- unsigned long sec, usec;
- u64 tb_ticks, xsec;
- struct gettimeofday_vars *temp_varp;
- u64 temp_tb_to_xs, temp_stamp_xsec;
-
- /*
- * These calculations are faster (gets rid of divides)
- * if done in units of 1/2^20 rather than microseconds.
- * The conversion to microseconds at the end is done
- * without a divide (and in fact, without a multiply)
- */
- temp_varp = do_gtod.varp;
-
- /* Sampling the time base must be done after loading
- * do_gtod.varp in order to avoid racing with update_gtod.
- */
- data_barrier(temp_varp);
- tb_ticks = get_tb() - temp_varp->tb_orig_stamp;
- temp_tb_to_xs = temp_varp->tb_to_xs;
- temp_stamp_xsec = temp_varp->stamp_xsec;
- xsec = temp_stamp_xsec + mulhdu(tb_ticks, temp_tb_to_xs);
- sec = xsec / XSEC_PER_SEC;
- usec = (unsigned long)xsec & (XSEC_PER_SEC - 1);
- usec = SCALE_XSEC(usec, 1000000);
-
- tv->tv_sec = sec;
- tv->tv_usec = usec;
-}
-
-void do_gettimeofday(struct timeval *tv)
-{
- if (__USE_RTC()) {
- /* do this the old way */
- unsigned long flags, seq;
- unsigned int sec, nsec, usec;
-
- do {
- seq = read_seqbegin_irqsave(&xtime_lock, flags);
- sec = xtime.tv_sec;
- nsec = xtime.tv_nsec + tb_ticks_since(tb_last_jiffy);
- } while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
- usec = nsec / 1000;
- while (usec >= 1000000) {
- usec -= 1000000;
- ++sec;
- }
- tv->tv_sec = sec;
- tv->tv_usec = usec;
- return;
- }
- __do_gettimeofday(tv);
-}
-
-EXPORT_SYMBOL(do_gettimeofday);
/*
* There are two copies of tb_to_xs and stamp_xsec so that no
@@ -447,56 +417,6 @@ static inline void update_gtod(u64 new_t
++(vdso_data->tb_update_count);
}
-/*
- * When the timebase - tb_orig_stamp gets too big, we do a manipulation
- * between tb_orig_stamp and stamp_xsec. The goal here is to keep the
- * difference tb - tb_orig_stamp small enough to always fit inside a
- * 32 bits number. This is a requirement of our fast 32 bits userland
- * implementation in the vdso. If we "miss" a call to this function
- * (interrupt latency, CPU locked in a spinlock, ...) and we end up
- * with a too big difference, then the vdso will fallback to calling
- * the syscall
- */
-static __inline__ void timer_recalc_offset(u64 cur_tb)
-{
- unsigned long offset;
- u64 new_stamp_xsec;
- u64 tlen, t2x;
- u64 tb, xsec_old, xsec_new;
- struct gettimeofday_vars *varp;
-
- if (__USE_RTC())
- return;
- tlen = current_tick_length();
- offset = cur_tb - do_gtod.varp->tb_orig_stamp;
- if (tlen == last_tick_len && offset < 0x80000000u)
- return;
- if (tlen != last_tick_len) {
- t2x = mulhdu(tlen << TICKLEN_SHIFT, ticklen_to_xs);
- last_tick_len = tlen;
- } else
- t2x = do_gtod.varp->tb_to_xs;
- new_stamp_xsec = (u64) xtime.tv_nsec * XSEC_PER_SEC;
- do_div(new_stamp_xsec, 1000000000);
- new_stamp_xsec += (u64) xtime.tv_sec * XSEC_PER_SEC;
-
- ++vdso_data->tb_update_count;
- smp_mb();
-
- /*
- * Make sure time doesn't go backwards for userspace gettimeofday.
- */
- tb = get_tb();
- varp = do_gtod.varp;
- xsec_old = mulhdu(tb - varp->tb_orig_stamp, varp->tb_to_xs)
- + varp->stamp_xsec;
- xsec_new = mulhdu(tb - cur_tb, t2x) + new_stamp_xsec;
- if (xsec_new < xsec_old)
- new_stamp_xsec += xsec_old - xsec_new;
-
- update_gtod(cur_tb, new_stamp_xsec, t2x);
-}
-
#ifdef CONFIG_SMP
unsigned long profile_pc(struct pt_regs *regs)
{
@@ -568,6 +488,8 @@ static int __init iSeries_tb_recal(void)
iSeries_recal_titan = titan;
iSeries_recal_tb = tb;
+ /* Called here as now we know accurate values for the timebase */
+ clocksource_init();
return 0;
}
late_initcall(iSeries_tb_recal);
@@ -650,7 +572,6 @@ void timer_interrupt(struct pt_regs * re
if (per_cpu(last_jiffy, cpu) >= tb_next_jiffy) {
tb_last_jiffy = tb_next_jiffy;
do_timer(1);
- timer_recalc_offset(tb_last_jiffy);
}
write_sequnlock(&xtime_lock);
}
@@ -722,66 +643,6 @@ unsigned long long sched_clock(void)
return mulhdu(get_tb() - boot_tb, tb_to_ns_scale) << tb_to_ns_shift;
}
-int do_settimeofday(struct timespec *tv)
-{
- time_t wtm_sec, new_sec = tv->tv_sec;
- long wtm_nsec, new_nsec = tv->tv_nsec;
- unsigned long flags;
- u64 new_xsec;
- unsigned long tb_delta;
-
- if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
- return -EINVAL;
-
- write_seqlock_irqsave(&xtime_lock, flags);
-
- /*
- * Updating the RTC is not the job of this code. If the time is
- * stepped under NTP, the RTC will be updated after STA_UNSYNC
- * is cleared. Tools like clock/hwclock either copy the RTC
- * to the system time, in which case there is no point in writing
- * to the RTC again, or write to the RTC but then they don't call
- * settimeofday to perform this operation.
- */
-
- /* Make userspace gettimeofday spin until we're done. */
- ++vdso_data->tb_update_count;
- smp_mb();
-
- /*
- * Subtract off the number of nanoseconds since the
- * beginning of the last tick.
- */
- tb_delta = tb_ticks_since(tb_last_jiffy);
- tb_delta = mulhdu(tb_delta, do_gtod.varp->tb_to_xs); /* in xsec */
- new_nsec -= SCALE_XSEC(tb_delta, 1000000000);
-
- wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - new_sec);
- wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - new_nsec);
-
- set_normalized_timespec(&xtime, new_sec, new_nsec);
- set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
-
- ntp_clear();
-
- new_xsec = xtime.tv_nsec;
- if (new_xsec != 0) {
- new_xsec *= XSEC_PER_SEC;
- do_div(new_xsec, NSEC_PER_SEC);
- }
- new_xsec += (u64)xtime.tv_sec * XSEC_PER_SEC;
- update_gtod(tb_last_jiffy, new_xsec, do_gtod.varp->tb_to_xs);
-
- vdso_data->tz_minuteswest = sys_tz.tz_minuteswest;
- vdso_data->tz_dsttime = sys_tz.tz_dsttime;
-
- write_sequnlock_irqrestore(&xtime_lock, flags);
- clock_was_set();
- return 0;
-}
-
-EXPORT_SYMBOL(do_settimeofday);
-
static int __init get_freq(char *name, int cells, unsigned long *val)
{
struct device_node *cpu;
@@ -873,6 +734,69 @@ unsigned long read_persistent_clock(void
tm.tm_hour, tm.tm_min, tm.tm_sec);
}
+/* clocksource code */
+static cycle_t rtc_read(void)
+{
+ return (cycle_t)get_rtc();
+}
+
+static cycle_t timebase_read(void)
+{
+ return (cycle_t)get_tb();
+}
+
+void update_vsyscall(struct timespec *wall_time, struct clocksource *clock)
+{
+ u64 t2x, stamp_xsec;
+
+ if (clock != &clocksource_timebase)
+ return;
+
+ /* Make userspace gettimeofday spin until we're done. */
+ ++vdso_data->tb_update_count;
+ smp_mb();
+
+ /* XXX this assumes clock->shift == 22 */
+ /* 4611686018 ~= 2^(20+64-22) / 1e9 */
+ t2x = (u64) clock->mult * 4611686018ULL;
+ stamp_xsec = (u64) xtime.tv_nsec * XSEC_PER_SEC;
+ do_div(stamp_xsec, 1000000000);
+ stamp_xsec += (u64) xtime.tv_sec * XSEC_PER_SEC;
+ update_gtod(clock->cycle_last, stamp_xsec, t2x);
+}
+
+void update_vsyscall_tz(void)
+{
+ /* Make userspace gettimeofday spin until we're done. */
+ ++vdso_data->tb_update_count;
+ smp_mb();
+ vdso_data->tz_minuteswest = sys_tz.tz_minuteswest;
+ vdso_data->tz_dsttime = sys_tz.tz_dsttime;
+ smp_mb();
+ ++vdso_data->tb_update_count;
+}
+
+void __init clocksource_init(void)
+{
+ struct clocksource *clock;
+
+ if (__USE_RTC())
+ clock = &clocksource_rtc;
+ else
+ clock = &clocksource_timebase;
+
+ clock->mult = clocksource_hz2mult(tb_ticks_per_sec, clock->shift);
+
+ if (clocksource_register(clock)) {
+ printk(KERN_ERR "clocksource: %s is already registered\n",
+ clock->name);
+ return;
+ }
+
+ printk(KERN_INFO "clocksource: %s mult[%x] shift[%d] registered\n",
+ clock->name, clock->mult, clock->shift);
+}
+
/* This function is only called on the boot processor */
void __init time_init(void)
{
@@ -982,6 +906,10 @@ void __init time_init(void)
write_sequnlock_irqrestore(&xtime_lock, flags);
+ /* Register the clocksource, if we're not running on iSeries */
+ if (!firmware_has_feature(FW_FEATURE_ISERIES))
+ clocksource_init();
+
/* Not exact, but the timer interrupt takes care of this */
set_dec(tb_ticks_per_jiffy);
}
^ permalink raw reply
* [PATCH v2] pcmcia: Convert io_req_t to use kio_addr_t
From: Olof Johansson @ 2007-09-21 22:15 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-dev, linux-pcmcia, linux-kernel, hch
In-Reply-To: <20070914034854.1658a9cf.akpm@linux-foundation.org>
Convert the io_req_t members to kio_addr_t, to allow use on machines with
more than 16 bits worth of IO ports (i.e. secondary busses on ppc64, etc).
I've also gone through the drivers, changed the few occurrances of
ioaddr_t to kio_addr_t where relevant, and changed format strings for
printk() and friends.
There are still places where a kio_addr_t is casted to an int, but at
the moment that's not causing problems. It should be cleaned up at some
point in the future though.
Signed-off-by: Olof Johansson <olof@lixom.net>
---
On Fri, Sep 14, 2007 at 03:48:54AM -0700, Andrew Morton wrote:
> On Wed, 5 Sep 2007 09:27:43 -0500 Olof Johansson <olof@lixom.net> wrote:
>
> > Convert the io_req_t members to kio_addr_t, to allow use on machines with
> > more than 16 bits worth of IO port address space (ppc64 in this case,
> > but it applies to others as well).
>
> drivers/usb/host/sl811_cs.c: In function 'sl811_cs_config':
> drivers/usb/host/sl811_cs.c:263: warning: format '%04x' expects type 'unsigned int', but argument 2 has type 'kio_addr_t'
> drivers/usb/host/sl811_cs.c:263: warning: format '%04x' expects type 'unsigned int', but argument 3 has type 'long unsigned int'
>
> That's not just a cosmetic thing - the printk can print junk and if there's
> a %s in the control string after the %x's, printk() will crash.
>
> I don't know how many instances of this are in the tree, but they'll all
> need to be found and fixed.
I think I caught them all by now.
Thanks,
-Olof
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index 4177f6d..b4f6036 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -308,7 +308,7 @@ static unsigned int calc_baudv(unsigned char fidi)
return (wcrcf / wbrcf);
}
-static unsigned short io_read_num_rec_bytes(ioaddr_t iobase, unsigned short *s)
+static unsigned short io_read_num_rec_bytes(kio_addr_t iobase, unsigned short *s)
{
unsigned short tmp;
@@ -426,7 +426,7 @@ static struct card_fixup card_fixups[] = {
static void set_cardparameter(struct cm4000_dev *dev)
{
int i;
- ioaddr_t iobase = dev->p_dev->io.BasePort1;
+ kio_addr_t iobase = dev->p_dev->io.BasePort1;
u_int8_t stopbits = 0x02; /* ISO default */
DEBUGP(3, dev, "-> set_cardparameter\n");
@@ -459,7 +459,7 @@ static int set_protocol(struct cm4000_dev *dev, struct ptsreq *ptsreq)
unsigned short num_bytes_read;
unsigned char pts_reply[4];
ssize_t rc;
- ioaddr_t iobase = dev->p_dev->io.BasePort1;
+ kio_addr_t iobase = dev->p_dev->io.BasePort1;
rc = 0;
@@ -610,7 +610,7 @@ exit_setprotocol:
return rc;
}
-static int io_detect_cm4000(ioaddr_t iobase, struct cm4000_dev *dev)
+static int io_detect_cm4000(kio_addr_t iobase, struct cm4000_dev *dev)
{
/* note: statemachine is assumed to be reset */
@@ -671,7 +671,7 @@ static void terminate_monitor(struct cm4000_dev *dev)
static void monitor_card(unsigned long p)
{
struct cm4000_dev *dev = (struct cm4000_dev *) p;
- ioaddr_t iobase = dev->p_dev->io.BasePort1;
+ kio_addr_t iobase = dev->p_dev->io.BasePort1;
unsigned short s;
struct ptsreq ptsreq;
int i, atrc;
@@ -933,7 +933,7 @@ static ssize_t cmm_read(struct file *filp, __user char *buf, size_t count,
loff_t *ppos)
{
struct cm4000_dev *dev = filp->private_data;
- ioaddr_t iobase = dev->p_dev->io.BasePort1;
+ kio_addr_t iobase = dev->p_dev->io.BasePort1;
ssize_t rc;
int i, j, k;
@@ -1054,7 +1054,7 @@ static ssize_t cmm_write(struct file *filp, const char __user *buf,
size_t count, loff_t *ppos)
{
struct cm4000_dev *dev = (struct cm4000_dev *) filp->private_data;
- ioaddr_t iobase = dev->p_dev->io.BasePort1;
+ kio_addr_t iobase = dev->p_dev->io.BasePort1;
unsigned short s;
unsigned char tmp;
unsigned char infolen;
@@ -1408,7 +1408,7 @@ static int cmm_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
unsigned long arg)
{
struct cm4000_dev *dev = filp->private_data;
- ioaddr_t iobase = dev->p_dev->io.BasePort1;
+ kio_addr_t iobase = dev->p_dev->io.BasePort1;
struct pcmcia_device *link;
int size;
int rc;
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c
index b24a3e7..3ecfc33 100644
--- a/drivers/char/pcmcia/cm4040_cs.c
+++ b/drivers/char/pcmcia/cm4040_cs.c
@@ -586,7 +586,7 @@ static int reader_config(struct pcmcia_device *link, int devno)
dev->node.minor = devno;
dev->node.next = &dev->node;
- DEBUGP(2, dev, "device " DEVICE_NAME "%d at 0x%.4x-0x%.4x\n", devno,
+ DEBUGP(2, dev, "device " DEVICE_NAME "%d at 0x%.4lx-0x%.4lx\n", devno,
link->io.BasePort1, link->io.BasePort1+link->io.NumPorts1);
DEBUGP(2, dev, "<- reader_config (succ)\n");
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index 2b88931..7be068f 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -665,7 +665,7 @@ static int mgslpc_config(struct pcmcia_device *link)
if (link->conf.Attributes & CONF_ENABLE_IRQ)
printk(", irq %d", link->irq.AssignedIRQ);
if (link->io.NumPorts1)
- printk(", io 0x%04x-0x%04x", link->io.BasePort1,
+ printk(", io 0x%04lx-0x%04lx", link->io.BasePort1,
link->io.BasePort1+link->io.NumPorts1-1);
printk("\n");
return 0;
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c
index a5b941c..820853a 100644
--- a/drivers/isdn/hardware/avm/avm_cs.c
+++ b/drivers/isdn/hardware/avm/avm_cs.c
@@ -211,7 +211,7 @@ static int avmcs_config(struct pcmcia_device *link)
link->io.BasePort1 = cf->io.win[0].base;
link->io.NumPorts1 = cf->io.win[0].len;
link->io.NumPorts2 = 0;
- printk(KERN_INFO "avm_cs: testing i/o %#x-%#x\n",
+ printk(KERN_INFO "avm_cs: testing i/o %#lx-%#lx\n",
link->io.BasePort1,
link->io.BasePort1+link->io.NumPorts1-1);
i = pcmcia_request_io(link, &link->io);
@@ -288,7 +288,7 @@ found_port:
case AVM_CARDTYPE_B1: addcard = b1pcmcia_addcard_b1; break;
}
if ((i = (*addcard)(link->io.BasePort1, link->irq.AssignedIRQ)) < 0) {
- printk(KERN_ERR "avm_cs: failed to add AVM-%s-Controller at i/o %#x, irq %d\n",
+ printk(KERN_ERR "avm_cs: failed to add AVM-%s-Controller at i/o %#lx, irq %d\n",
dev->node.dev_name, link->io.BasePort1, link->irq.AssignedIRQ);
avmcs_release(link);
return -ENODEV;
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index fc6cc2c..6a75ba6 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -233,7 +233,7 @@ static int avma1cs_config(struct pcmcia_device *link)
link->io.BasePort1 = cf->io.win[0].base;
link->io.NumPorts1 = cf->io.win[0].len;
link->io.NumPorts2 = 0;
- printk(KERN_INFO "avma1_cs: testing i/o %#x-%#x\n",
+ printk(KERN_INFO "avma1_cs: testing i/o %#lx-%#lx\n",
link->io.BasePort1,
link->io.BasePort1+link->io.NumPorts1 - 1);
i = pcmcia_request_io(link, &link->io);
@@ -285,7 +285,7 @@ found_port:
return -ENODEV;
}
- printk(KERN_NOTICE "avma1_cs: checking at i/o %#x, irq %d\n",
+ printk(KERN_NOTICE "avma1_cs: checking at i/o %#lx, irq %d\n",
link->io.BasePort1, link->irq.AssignedIRQ);
icard.para[0] = link->irq.AssignedIRQ;
@@ -295,7 +295,7 @@ found_port:
i = hisax_init_pcmcia(link, &busy, &icard);
if (i < 0) {
- printk(KERN_ERR "avma1_cs: failed to initialize AVM A1 PCMCIA %d at i/o %#x\n", i, link->io.BasePort1);
+ printk(KERN_ERR "avma1_cs: failed to initialize AVM A1 PCMCIA %d at i/o %#lx\n", i, link->io.BasePort1);
avma1cs_release(link);
return -ENODEV;
}
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c
index db7e644..6d2b338 100644
--- a/drivers/isdn/hisax/elsa_cs.c
+++ b/drivers/isdn/hisax/elsa_cs.c
@@ -296,10 +296,10 @@ static int elsa_cs_config(struct pcmcia_device *link)
if (link->conf.Attributes & CONF_ENABLE_IRQ)
printk(", irq %d", link->irq.AssignedIRQ);
if (link->io.NumPorts1)
- printk(", io 0x%04x-0x%04x", link->io.BasePort1,
+ printk(", io 0x%04lx-0x%04lx", link->io.BasePort1,
link->io.BasePort1+link->io.NumPorts1-1);
if (link->io.NumPorts2)
- printk(" & 0x%04x-0x%04x", link->io.BasePort2,
+ printk(" & 0x%04lx-0x%04lx", link->io.BasePort2,
link->io.BasePort2+link->io.NumPorts2-1);
printk("\n");
@@ -310,7 +310,7 @@ static int elsa_cs_config(struct pcmcia_device *link)
i = hisax_init_pcmcia(link, &(((local_info_t*)link->priv)->busy), &icard);
if (i < 0) {
- printk(KERN_ERR "elsa_cs: failed to initialize Elsa PCMCIA %d at i/o %#x\n",
+ printk(KERN_ERR "elsa_cs: failed to initialize Elsa PCMCIA %d at i/o %#lx\n",
i, link->io.BasePort1);
elsa_cs_release(link);
} else
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c
index 439cb53..fdead4c 100644
--- a/drivers/isdn/hisax/sedlbauer_cs.c
+++ b/drivers/isdn/hisax/sedlbauer_cs.c
@@ -381,10 +381,10 @@ static int sedlbauer_config(struct pcmcia_device *link)
if (link->conf.Attributes & CONF_ENABLE_IRQ)
printk(", irq %d", link->irq.AssignedIRQ);
if (link->io.NumPorts1)
- printk(", io 0x%04x-0x%04x", link->io.BasePort1,
+ printk(", io 0x%04lx-0x%04lx", link->io.BasePort1,
link->io.BasePort1+link->io.NumPorts1-1);
if (link->io.NumPorts2)
- printk(" & 0x%04x-0x%04x", link->io.BasePort2,
+ printk(" & 0x%04lx-0x%04lx", link->io.BasePort2,
link->io.BasePort2+link->io.NumPorts2-1);
if (link->win)
printk(", mem 0x%06lx-0x%06lx", req.Base,
@@ -398,7 +398,7 @@ static int sedlbauer_config(struct pcmcia_device *link)
last_ret = hisax_init_pcmcia(link, &(((local_info_t*)link->priv)->stop), &icard);
if (last_ret < 0) {
- printk(KERN_ERR "sedlbauer_cs: failed to initialize SEDLBAUER PCMCIA %d at i/o %#x\n",
+ printk(KERN_ERR "sedlbauer_cs: failed to initialize SEDLBAUER PCMCIA %d at i/o %#lx\n",
last_ret, link->io.BasePort1);
sedlbauer_release(link);
return -ENODEV;
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c
index ab4bd45..e492bd2 100644
--- a/drivers/isdn/hisax/teles_cs.c
+++ b/drivers/isdn/hisax/teles_cs.c
@@ -286,10 +286,10 @@ static int teles_cs_config(struct pcmcia_device *link)
if (link->conf.Attributes & CONF_ENABLE_IRQ)
printk(", irq %d", link->irq.AssignedIRQ);
if (link->io.NumPorts1)
- printk(", io 0x%04x-0x%04x", link->io.BasePort1,
+ printk(", io 0x%04lx-0x%04lx", link->io.BasePort1,
link->io.BasePort1+link->io.NumPorts1-1);
if (link->io.NumPorts2)
- printk(" & 0x%04x-0x%04x", link->io.BasePort2,
+ printk(" & 0x%04lx-0x%04lx", link->io.BasePort2,
link->io.BasePort2+link->io.NumPorts2-1);
printk("\n");
@@ -300,7 +300,7 @@ static int teles_cs_config(struct pcmcia_device *link)
i = hisax_init_pcmcia(link, &(((local_info_t*)link->priv)->busy), &icard);
if (i < 0) {
- printk(KERN_ERR "teles_cs: failed to initialize Teles PCMCIA %d at i/o %#x\n",
+ printk(KERN_ERR "teles_cs: failed to initialize Teles PCMCIA %d at i/o %#lx\n",
i, link->io.BasePort1);
teles_cs_release(link);
return -ENODEV;
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c
index ea9414c..f5351c0 100644
--- a/drivers/net/pcmcia/com20020_cs.c
+++ b/drivers/net/pcmcia/com20020_cs.c
@@ -259,7 +259,7 @@ static int com20020_config(struct pcmcia_device *link)
DEBUG(0, "com20020_config(0x%p)\n", link);
- DEBUG(1,"arcnet: baseport1 is %Xh\n", link->io.BasePort1);
+ DEBUG(1,"arcnet: baseport1 is %lXh\n", link->io.BasePort1);
i = !CS_SUCCESS;
if (!link->io.BasePort1)
{
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index f123553..2a3544f 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -356,10 +356,10 @@ static int airo_config(struct pcmcia_device *link)
if (link->conf.Attributes & CONF_ENABLE_IRQ)
printk(", irq %d", link->irq.AssignedIRQ);
if (link->io.NumPorts1)
- printk(", io 0x%04x-0x%04x", link->io.BasePort1,
+ printk(", io 0x%04lx-0x%04lx", link->io.BasePort1,
link->io.BasePort1+link->io.NumPorts1-1);
if (link->io.NumPorts2)
- printk(" & 0x%04x-0x%04x", link->io.BasePort2,
+ printk(" & 0x%04lx-0x%04lx", link->io.BasePort2,
link->io.BasePort2+link->io.NumPorts2-1);
if (link->win)
printk(", mem 0x%06lx-0x%06lx", req.Base,
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index 30e723f..93c6b0b 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -721,10 +721,10 @@ static int prism2_config(struct pcmcia_device *link)
if (link->conf.Attributes & CONF_ENABLE_IRQ)
printk(", irq %d", link->irq.AssignedIRQ);
if (link->io.NumPorts1)
- printk(", io 0x%04x-0x%04x", link->io.BasePort1,
+ printk(", io 0x%04lx-0x%04lx", link->io.BasePort1,
link->io.BasePort1+link->io.NumPorts1-1);
if (link->io.NumPorts2)
- printk(" & 0x%04x-0x%04x", link->io.BasePort2,
+ printk(" & 0x%04lx-0x%04lx", link->io.BasePort2,
link->io.BasePort2+link->io.NumPorts2-1);
printk("\n");
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c
index d1e5022..80bd2f6 100644
--- a/drivers/net/wireless/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco_cs.c
@@ -332,7 +332,7 @@ orinoco_cs_config(struct pcmcia_device *link)
/* Finally, report what we've done */
printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s, irq %d, io "
- "0x%04x-0x%04x\n", dev->name, dev->dev.parent->bus_id,
+ "0x%04lx-0x%04lx\n", dev->name, dev->dev.parent->bus_id,
link->irq.AssignedIRQ, link->io.BasePort1,
link->io.BasePort1 + link->io.NumPorts1 - 1);
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c
index af70460..b87185e 100644
--- a/drivers/net/wireless/spectrum_cs.c
+++ b/drivers/net/wireless/spectrum_cs.c
@@ -806,7 +806,7 @@ spectrum_cs_config(struct pcmcia_device *link)
/* Finally, report what we've done */
printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s, irq %d, io "
- "0x%04x-0x%04x\n", dev->name, dev->dev.parent->bus_id,
+ "0x%04lx-0x%04lx\n", dev->name, dev->dev.parent->bus_id,
link->irq.AssignedIRQ, link->io.BasePort1,
link->io.BasePort1 + link->io.NumPorts1 - 1);
diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c
index 802a81d..17a4cfb 100644
--- a/drivers/parport/parport_cs.c
+++ b/drivers/parport/parport_cs.c
@@ -203,7 +203,7 @@ static int parport_config(struct pcmcia_device *link)
&link->dev);
if (p == NULL) {
printk(KERN_NOTICE "parport_cs: parport_pc_probe_port() at "
- "0x%3x, irq %u failed\n", link->io.BasePort1,
+ "0x%3lx, irq %u failed\n", link->io.BasePort1,
link->irq.AssignedIRQ);
goto failed;
}
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index 0ce39de..585c14b 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -65,8 +65,8 @@ extern int ds_pc_debug;
* Special stuff for managing IO windows, because they are scarce
*/
-static int alloc_io_space(struct pcmcia_socket *s, u_int attr, ioaddr_t *base,
- ioaddr_t num, u_int lines)
+static int alloc_io_space(struct pcmcia_socket *s, u_int attr, kio_addr_t *base,
+ kio_addr_t num, u_int lines)
{
int i;
kio_addr_t try, align;
@@ -74,14 +74,14 @@ static int alloc_io_space(struct pcmcia_socket *s, u_int attr, ioaddr_t *base,
align = (*base) ? (lines ? 1<<lines : 0) : 1;
if (align && (align < num)) {
if (*base) {
- ds_dbg(s, 0, "odd IO request: num %#x align %#lx\n",
+ ds_dbg(s, 0, "odd IO request: num %#lx align %#lx\n",
num, align);
align = 0;
} else
while (align && (align < num)) align <<= 1;
}
if (*base & ~(align-1)) {
- ds_dbg(s, 0, "odd IO request: base %#x align %#lx\n",
+ ds_dbg(s, 0, "odd IO request: base %#lx align %#lx\n",
*base, align);
align = 0;
}
@@ -132,8 +132,8 @@ static int alloc_io_space(struct pcmcia_socket *s, u_int attr, ioaddr_t *base,
} /* alloc_io_space */
-static void release_io_space(struct pcmcia_socket *s, ioaddr_t base,
- ioaddr_t num)
+static void release_io_space(struct pcmcia_socket *s, kio_addr_t base,
+ kio_addr_t num)
{
int i;
diff --git a/drivers/scsi/pcmcia/fdomain_stub.c b/drivers/scsi/pcmcia/fdomain_stub.c
index 4b82b20..42611e6 100644
--- a/drivers/scsi/pcmcia/fdomain_stub.c
+++ b/drivers/scsi/pcmcia/fdomain_stub.c
@@ -160,7 +160,7 @@ static int fdomain_config(struct pcmcia_device *link)
release_region(link->io.BasePort1, link->io.NumPorts1);
/* Set configuration options for the fdomain driver */
- sprintf(str, "%d,%d", link->io.BasePort1, link->irq.AssignedIRQ);
+ sprintf(str, "%ld,%d", link->io.BasePort1, link->irq.AssignedIRQ);
fdomain_setup(str);
host = __fdomain_16x0_detect(&fdomain_driver_template);
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index 445cfbb..7e9a897 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -1896,11 +1896,11 @@ static int nsp_cs_config(struct pcmcia_device *link)
printk(", irq %d", link->irq.AssignedIRQ);
}
if (link->io.NumPorts1) {
- printk(", io 0x%04x-0x%04x", link->io.BasePort1,
+ printk(", io 0x%04lx-0x%04lx", link->io.BasePort1,
link->io.BasePort1+link->io.NumPorts1-1);
}
if (link->io.NumPorts2)
- printk(" & 0x%04x-0x%04x", link->io.BasePort2,
+ printk(" & 0x%04lx-0x%04lx", link->io.BasePort2,
link->io.BasePort2+link->io.NumPorts2-1);
if (link->win)
printk(", mem 0x%06lx-0x%06lx", req.Base,
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c
index 5da63f5..062fba6 100644
--- a/drivers/usb/host/sl811_cs.c
+++ b/drivers/usb/host/sl811_cs.c
@@ -259,7 +259,7 @@ next_entry:
if (link->conf.Vpp)
printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10);
printk(", irq %d", link->irq.AssignedIRQ);
- printk(", io 0x%04x-0x%04x", link->io.BasePort1,
+ printk(", io 0x%04lx-0x%04lx", link->io.BasePort1,
link->io.BasePort1+link->io.NumPorts1-1);
printk("\n");
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h
index d5838c3..657d653 100644
--- a/include/pcmcia/cs.h
+++ b/include/pcmcia/cs.h
@@ -147,11 +147,11 @@ typedef struct config_req_t {
/* For RequestIO and ReleaseIO */
typedef struct io_req_t {
- ioaddr_t BasePort1;
- ioaddr_t NumPorts1;
+ kio_addr_t BasePort1;
+ kio_addr_t NumPorts1;
u_int Attributes1;
- ioaddr_t BasePort2;
- ioaddr_t NumPorts2;
+ kio_addr_t BasePort2;
+ kio_addr_t NumPorts2;
u_int Attributes2;
u_int IOAddrLines;
} io_req_t;
^ permalink raw reply related
* Re: [PATCH v2] pcmcia: Convert io_req_t to use kio_addr_t
From: Alan Cox @ 2007-09-21 22:39 UTC (permalink / raw)
To: Olof Johansson
Cc: linuxppc-dev, Andrew Morton, linux-pcmcia, linux-kernel, hch
In-Reply-To: <20070921221516.GA7926@lixom.net>
On Fri, 21 Sep 2007 17:15:16 -0500
Olof Johansson <olof@lixom.net> wrote:
> Convert the io_req_t members to kio_addr_t, to allow use on machines with
> more than 16 bits worth of IO ports (i.e. secondary busses on ppc64, etc).
What about the formatting and field widths ?
ulong would probably be a lot saner than kio_addr_t and yet more type
obfuscation.
Otherwise looks sensible to me
^ 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