* Re: 2.6.14 USB vs. sleep issues
From: Benjamin Herrenschmidt @ 2005-11-16 21:01 UTC (permalink / raw)
To: Wolfgang Pfeiffer; +Cc: linuxppc-dev list, debian-powerpc@lists.debian.org
In-Reply-To: <20051116180925.GB3080@localhost>
On Wed, 2005-11-16 at 19:09 +0100, Wolfgang Pfeiffer wrote:
> On Thu, Nov 03, 2005 at 05:33:39PM +1100, Benjamin Herrenschmidt wrote:
> > For those who experience crashes on sleep and/or wakeup (typically due
> > to USB) with 2.6.14, I made a test patch that might help. [ ... ]
>
> Ben, I just compiled and installed a 2.6.14.1 from kernel.org with
> none of your patches from this thread applied to it, and I have no
> sleep/wakeup probs with it so far: about 3 instances of sleep/wakeup
> until now, all of them successful.
>
> Maybe I even made it a bit more complicated for the system, as I
> connected a USB HUB, with 4 ports, to the machine: It just seems to
> work ...
Only newer machines with a NEC USB2 chip that shares interrupts appear
to be affected by the problem.
Ben.
^ permalink raw reply
* Re: [PATCH] powerpc: Merge align.c (#2)
From: Paul Mackerras @ 2005-11-16 22:14 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, linuxppc64-dev
In-Reply-To: <1132025664.6094.47.camel@gaston>
Benjamin Herrenschmidt writes:
> Since it's likely that I won't be able to test all scenario, code
> inspection is much welcome.
I think you need this patch on top...
Paul.
diff -urN powerpc/arch/powerpc/kernel/align.c merge-hack/arch/powerpc/kernel/align.c
--- powerpc/arch/powerpc/kernel/align.c 2005-11-17 09:05:04.000000000 +1100
+++ merge-hack/arch/powerpc/kernel/align.c 2005-11-17 09:06:29.000000000 +1100
@@ -198,21 +198,20 @@
/* bits 6:15 --> 22:31 */
dsisr = (instr & 0x03ff0000) >> 16;
- if ( IS_XFORM(instr) ) {
+ if (IS_XFORM(instr)) {
/* bits 29:30 --> 15:16 */
dsisr |= (instr & 0x00000006) << 14;
/* bit 25 --> 17 */
dsisr |= (instr & 0x00000040) << 8;
/* bits 21:24 --> 18:21 */
dsisr |= (instr & 0x00000780) << 3;
- }
- else {
+ } else {
/* bit 5 --> 17 */
dsisr |= (instr & 0x04000000) >> 12;
/* bits 1: 4 --> 18:21 */
dsisr |= (instr & 0x78000000) >> 17;
/* bits 30:31 --> 12:13 */
- if ( IS_DSFORM(instr) )
+ if (IS_DSFORM(instr))
dsisr |= (instr & 0x00000003) << 18;
}
@@ -247,13 +246,22 @@
/*
* Emulate load & store multiple instructions
+ * On 64-bit machines, these instructions only affect/use the
+ * bottom 4 bytes of each register, and the loads clear the
+ * top 4 bytes of the affected register.
*/
+#ifdef CONFIG_PPC64
+#define REG_BYTE(rp, i) *((u8 *)((rp) + ((i) >> 2)) + ((i) & 3) + 4)
+#else
+#define REG_BYTE(rp, i) *((u8 *)(rp) + (i))
+#endif
+
static int emulate_multiple(struct pt_regs *regs, unsigned char __user *addr,
unsigned int reg, unsigned int nb,
unsigned int flags, unsigned int instr)
{
- unsigned char *rptr;
- int nb0, i;
+ unsigned long *rptr;
+ unsigned int nb0, i;
/*
* We do not try to emulate 8 bytes multiple as they aren't really
@@ -291,29 +299,38 @@
if (!access_ok((flags & ST ? VERIFY_WRITE: VERIFY_READ), addr, nb+nb0))
return -EFAULT; /* bad address */
- rptr = (unsigned char *) ®s->gpr[reg];
+ rptr = ®s->gpr[reg];
if (flags & LD) {
+ /*
+ * This zeroes the top 4 bytes of the affected registers
+ * in 64-bit mode, and also zeroes out any remaining
+ * bytes of the last register for lsw*.
+ */
+ memset(rptr, 0, ((nb + 3) / 4) * sizeof(unsigned long));
+ if (nb0 > 0)
+ memset(®s->gpr[0], 0,
+ ((nb0 + 3) / 4) * sizeof(unsigned long));
+
for (i = 0; i < nb; ++i)
- if (__get_user(rptr[i], addr + i))
+ if (__get_user(REG_BYTE(rptr, i), addr + i))
return -EFAULT;
if (nb0 > 0) {
- rptr = (unsigned char *) ®s->gpr[0];
+ rptr = ®s->gpr[0];
addr += nb;
for (i = 0; i < nb0; ++i)
- if (__get_user(rptr[i], addr + i))
+ if (__get_user(REG_BYTE(rptr, i), addr + i))
return -EFAULT;
}
- for (; (i & 3) != 0; ++i)
- rptr[i] = 0;
+
} else {
for (i = 0; i < nb; ++i)
- if (__put_user(rptr[i], addr + i))
+ if (__put_user(REG_BYTE(rptr, i), addr + i))
return -EFAULT;
if (nb0 > 0) {
- rptr = (unsigned char *) ®s->gpr[0];
+ rptr = ®s->gpr[0];
addr += nb;
for (i = 0; i < nb0; ++i)
- if (__put_user(rptr[i], addr + i))
+ if (__put_user(REG_BYTE(rptr, i), addr + i))
return -EFAULT;
}
}
@@ -338,7 +355,7 @@
unsigned char __user *p;
int ret, t;
union {
- long ll;
+ u64 ll;
double dd;
unsigned char v[8];
struct {
^ permalink raw reply
* Re: 2.6.14 USB vs. sleep issues
From: Eddy Petrisor @ 2005-11-16 23:21 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, debian-powerpc@lists.debian.org
In-Reply-To: <1132174868.5646.112.camel@gaston>
Benjamin Herrenschmidt wrote:
> On Wed, 2005-11-16 at 19:09 +0100, Wolfgang Pfeiffer wrote:
>
>>>For those who experience crashes on sleep and/or wakeup (typically due
>>>to USB) with 2.6.14, I made a test patch that might help. [ ... ]
> Only newer machines with a NEC USB2 chip that shares interrupts appear
> to be affected by the problem.
So is there any chance that the sleep issue is fixed until 2.6.15?
--
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein
^ permalink raw reply
* [REQUEST] Tap for right click on PowerBook trackpad
From: Felix Oxley @ 2005-11-17 2:13 UTC (permalink / raw)
To: lkml; +Cc: linuxppc-dev
One big reason that I don't use Linux on my PowerBook (1.25 AlBook) is the difficulty of using the single button trackpad.
Under OS X I use SideTrack which provides the ability to tap for right-click.
I did some investigation a few months ago and could not find a Linux replacement for SideTrack.
Would this be a difficult feature to implement?
Would any one be interested in doing it? :-)
(Please CC me as I am not subscribed)
regards,
Felix
^ permalink raw reply
* U-Boot MPC859TnnA support !
From: zjznliang @ 2005-11-17 3:37 UTC (permalink / raw)
To: linuxppc-embedded
SGkgbGludXhwcGMtZW1iZWRkZWSjoQ0KDQoJICAgICAgICAgIEkgYW0gcG9ydGluZyBVLUJvb3Qg
b24gdGhlIE1QQzg1OVRubkEgY2FyZCxidXQgVS1Cb290IGNhbid0IGZpbmQgdGhlIENQVSBpbiB0
aGUgaW5pdGlhbGl6YXRpb24gLiBJIGNoZWNrIHRoZSBjb2RlICx0aGVyZSBpcyBub3QgdHlwZSBv
ZiBNUEM4NTlUbm5BIHRvIHN1cHBvcnQgLlRoZSBVLUJvb3QgdmVyc2lvbiBpcyAxLjEuMy4NCg0K
CQkJCVRoZXJlIE1QQyBmYW1pbHkgdmVyc2lvbnMgaXMgaGVyZSA6DQoJCQkJaHR0cDovL3d3dy5m
cmVlc2NhbGUuY29tL3dlYmFwcC9zcHMvc2l0ZS9wcm9kX3N1bW1hcnkuanNwP2NvZGU9TVBDODU5
VCZzcmNoPTEgDQoNCgkJCQlNUEM4NjYgRmFtaWx5IFZlcnNpb25zIGFuZCBNYXNrcyANCgkJCQlS
ZXYgCU1hc2sgCVByb2Nlc3MgCVF1YWwgCUlNTVJbMTY6MzFdIAlNaWNyb2NvZGUgUkVWX05VTSAJ
UGFydCBOdW1iZXIgDQoJCQkJMC4zIAkzTDkwSCAJSGlQNlcgCQlNQyAJCTB4MDgwMCAJCQkJMHgw
MDAzIAkJCQkJCQkJICBNUEM4NjZQbm4NCgkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJ
CQkgIAlNUEM4NjZUbm4NCgkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJTVBDODU5
VG5uDQoJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCU1QQzg1OURTTG5uDQoJCQkJ
CQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCU1QQzg1MlRubiANCgkJCQlBLjAgCTBMOTZS
IAlIaVA2VyAJCU1DIAkJMHgwODAxIAkJCQkweDAwMDQgCQkJCQkJCQlNUEM4NjZQbm5BDQoJCQkJ
CQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCU1QQzg2NlRubkENCgkJCQkJCQkJCQkJCQkJ
CQkJCQkJCQkJCQkJCQkJCQkJCQkJTVBDODU5VG5uQQ0KCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJ
CQkJCQkJCQkJCQlNUEM4NTlEU0xubkEgDQoNCgkJCQlUaGUgY29kZSBpbiBVLUJvb3QgaXMgaW4g
dGhlIGNoZWNrX0NQVSgpICAobGluZSA0OCBvZiAiXGNwdVxtcGM4eHhcQ3B1LmMiKQ0KCQkJCVRo
ZSBVLUJvb3Qgc3VwcG9ydHMgdGhlIHR5cGUgb2YgMHgwODAwMDAwMyBidXQgbm90IDB4MDgwMTAw
MDQsIHNvIGFkZCB0aGUgY29kZSBmb3IgMHgwODAxMDAwNCx5b3Ugd2lsbCBmaW5kIHlvdXIgTVBD
eG5uQSBjcHUgLjopDQogCQkJCQ0KICAgICAgICAgICAgIAlQZXJoYXBzIEkgd2lsbCBiZSBhIGhl
bHAuDQqhoaGhemp6bmxpYW5nDQqhoaGhoaGhoXpqem5saWFuZ19wb3BvQDE2My5jb20NCqGhoaGh
oaGhoaGhoTIwMDUtMTEtMTcNCg==
^ permalink raw reply
* Re: [REQUEST] Tap for right click on PowerBook trackpad
From: Dustin Lang @ 2005-11-17 3:32 UTC (permalink / raw)
To: Felix Oxley; +Cc: linuxppc-dev
In-Reply-To: <200511170213.16926.lkml@oxley.org>
Hi,
On my PowerBook, I map F11 to the middle mouse button and F12 to the right
mouse button. I've grown so used to it that I get annoyed when it doesn't
work in OSX :)
You can do the same by:
-be sure to enable CONFIG_MAC_EMUMOUSEBTN in the kernel config
-at startup time (or whenever):
echo "1" > /proc/sys/dev/mac_hid/mouse_button_emulation
echo "87" > /proc/sys/dev/mac_hid/mouse_button2_keycode
echo "88" > /proc/sys/dev/mac_hid/mouse_button3_keycode
Cheers,
dstn.
> One big reason that I don't use Linux on my PowerBook (1.25 AlBook) is
> the difficulty of using the single button trackpad. Under OS X I use
> SideTrack which provides the ability to tap for right-click. I did some
> investigation a few months ago and could not find a Linux replacement
> for SideTrack.
>
> Would this be a difficult feature to implement?
> Would any one be interested in doing it? :-)
>
> (Please CC me as I am not subscribed)
> regards,
> Felix
^ permalink raw reply
* Help ! 2.6.14 kernel can't bring up
From: zjznliang @ 2005-11-17 7:50 UTC (permalink / raw)
To: linuxppc-embedded
SGkgbGludXhwcGMtZW1iZWRkZWSjoQ0KDQoJICAgICAgICAgSSAgaGF2ZSBkb3dubG9hZGVkIHRo
ZSBMaW51eCAyLjYuMTQgZnJvbSB3d3cuZGVueC5kZS5JIGFkZGVkIGFuZCBtb2RpZmllZCB0aGUg
ZmlsZSBhbmQgY29tcGlsZSBpdCBhcyB3aGF0IEkgZGlkIG9uIExpbnV4IDIuNC4yNSB3aGljaCB3
YXMgYWxzbyBkb3dubG9hZGVkIG9uIHd3dy5kZW54LmRlLiBNeSBib2FyZCBpcyBiYXNlIG9uIE1Q
QyA4NTcgLGFuZCBpdCBnb2VzIHdlbGwgaW4gTGludXggMi40LjI1IC4gTXkgYm9vdGxvYWRlciBp
cyBVLUJvb3QgMS4xLjMgd2hpY2ggZ29lcyB3ZWxsIHRvby4gQnV0IHdoZW4gSSBicmluZyB1cCB0
aGUgTGludXggMi42LjE0ICxJIG9ubHkgZ290IHRoZSBpbmZvcm1hdGlvbiBhcyBmb2xsb3cgOg0K
DQojIyBCb290aW5nIGltYWdlIGF0IGZmYzQwMDAwIC4uLg0KICAgSW1hZ2UgTmFtZTogICBMaW51
eC0yLjYuMTQNCiAgIENyZWF0ZWQ6ICAgICAgMjAwNS0xMS0xNyAgIDc6MTE6NDIgVVRDDQogICBJ
bWFnZSBUeXBlOiAgIFBvd2VyUEMgTGludXggS2VybmVsIEltYWdlIChnemlwIGNvbXByZXNzZWQp
DQogICBEYXRhIFNpemU6ICAgIDY3ODE3MCBCeXRlcyA9IDY2Mi4zIGtCDQogICBMb2FkIEFkZHJl
c3M6IDAwMDAwMDAwDQogICBFbnRyeSBQb2ludDogIDAwMDAwMDAwDQogICBWZXJpZnlpbmcgQ2hl
Y2tzdW0gLi4uIE9LDQogICBVbmNvbXByZXNzaW5nIEtlcm5lbCBJbWFnZSAuLi4gT0sNCiMjIExv
YWRpbmcgUkFNRGlzayBJbWFnZSBhdCBmZmQwMDAwMCAuLi4NCiAgIEltYWdlIE5hbWU6DQogICBD
cmVhdGVkOiAgICAgIDIwMDUtMTEtMDkgICA5OjI4OjI3IFVUQw0KICAgSW1hZ2UgVHlwZTogICBQ
b3dlclBDIExpbnV4IFJBTURpc2sgSW1hZ2UgKGd6aXAgY29tcHJlc3NlZCkNCiAgIERhdGEgU2l6
ZTogICAgMTU2NDM2OSBCeXRlcyA9ICAxLjUgTUINCiAgIExvYWQgQWRkcmVzczogMDBjMDAwMDAN
CiAgIEVudHJ5IFBvaW50OiAgMDBjMDAwMDANCiAgIFZlcmlmeWluZyBDaGVja3N1bSAuLi4gT0sN
CiAgIExvYWRpbmcgUmFtZGlzayB0byAwMGUzZTAwMCwgZW5kIDAwZmJiZWQxIC4uLiBPSw0KDQpB
bmQgdGhlcmUgaXMgbm90aGluZyBvdXRwdXQgLEkgdGhvdWdodCB0aGF0IGl0IHdhcyBzZXJpYWwg
cG9ydCBmYXVsdCAuIEkgY2hlY2tlZCBteSBMaW51eCBjb25maWd1cmF0aW9uICxidXQgZm91bmQg
bm90aGluZyAuDQoNCkhvdyB0byBtYWtlIHRoZSBsaW51eCAyLjYuMTQgd2VsbCBvbiBteSBib2Fy
ZCA/Pw0KDQogDQogICBBbnkgaGVscCBvbiB0aGlzIHdvdWxkIGJlIGdyZWF0bHkgYXBwcmVjaWF0
ZWQuIFRoYW5rcyBmb3IgeW91ciBwYXRpZW5jZS4gDQoNCiAJCQkJDQoNCqGhoaF6anpubGlhbmcN
CqGhoaGhoaGhemp6bmxpYW5nX3BvcG9AMTYzLmNvbQ0KoaGhoaGhoaGhoaGhMjAwNS0xMS0xNw0K
^ permalink raw reply
* Booting hangs after "Calibrating delay loop..."
From: Nguyen Thanh Binh @ 2005-11-17 8:19 UTC (permalink / raw)
To: linuxppc-embedded
Hi all,
When booting Monta Vista Linux on Memec board
(Virtex-4 FX12 LC), it hung after printing the
following message:
"Calibrating delay loop..."
By looking at the source code, I found that in the
init/main.c the problem came from the
calibrate_delay()
function: jiffies was not incremented (jiffies was
always equal to 0).
Have anyone get the similar problem or any experience
to fix it?
Thank you.
Binh Nguyen
Nguyễn Thanh Bình
___________________________________________________________
How much free photo storage do you get? Store your holiday
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
^ permalink raw reply
* Re: [PATCH] m8xx_wdt: software watchdog reset/interrupt select
From: Florian Schirmer @ 2005-11-17 9:13 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: obi, carjay, linux-ppc-embedded
In-Reply-To: <20051116083609.GC4441@logos.cnet>
Hi,
okay here is what the current driver does:
During startup it installs a timer irq (PIT) handler and sets the
frequency to half of the watchdog timeout. As soon as this timer irq
triggers we reset the watchdog inside the irq handler.
If a userspace handler takes over the watchdog we deinstall the timer
irq handler and let the userspace daemon handle the watchdog resets.
Please not that we're talking about the timer irq, not the watchdog
interrupt.
I don't see why it should make a difference wether the watchdog
generates a IRQ0/HRESET or a system reset directly since it should never
trigger anyway.
All the patch does is to use a kernel timer instead of the hardware
timer. So i'm little confused.
And yes you should be right about the watchdog irq. It doesn't make
sense to install a watchdog irq handler. It doesn't make any sense to
put the watchdog into irq mode. As far as i know nobody ever tried to
use that mode.
If you're bound to irq mode because the bootloader activates it the
whole code should still work out of the box as long as the irq causes a
system reset. But maybe i'm missing something obvious or the docs are
incorrect/incomplete?
Best,
Florian
> Anyway, the SWRI bit selects interrupt (0) or reset mode (1) for the watchdog.
>
> On reset mode no interrupt is sent to the kernel - the watchdog logic resets
> the system with HRESET.
>
> So, the timer in m8xx_wdt is _required_ for reset mode.
>
> Does that make sense?
>
>> Otherwise i'm fine with the patch. Feel free to add my Signed-off-by line.
>
> Ok, lets sort this out first.
>
> I wonder how interrupt mode is supposed to work, because the manual states
> that in interrupt mode (SWRI == 0) an NMI (IRQ0) is triggered, which jumps
> to 0x100 exception vector (SW reset).
>
> Maybe I'm misunderstanding the interrupt mode?
>
> Folks who wrote the patch claim it works on their 8xx's (as can be found
> on mailing list archives).
^ permalink raw reply
* Re: "Now booting the kernel"
From: David H. Lynch Jr. @ 2005-11-17 9:31 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <437308E6.2070804@ecrin.com>
I am having similar difficulties on a Xilinx Virtex 4.
I have some advantages over Nitesh in that I have a 32bit port at
0x70000000 that I can write values to and see what they are (at least
until the MMU is enabled)
and with some additional complexity use as a sort of UART to write text.
Thus far this is what I get:
Starting MonitorX.elf: V3.3.2.0.
Loading zImage.elf.
loaded at: 00400000 0048C138
board data at: 0048A124 0048A138
relocated to: 004050AC 004050C0
zimage at: 00405865 00489E79
avail ram: 0048D000 08000000
Linux/PPC load: console=ttyS0,9600 console=tty0 root=/dev/sda2
Uncompressing Linux...done.
Now booting the kernel
After that I am in arch/ppc/kernel/head_4xx.S and only get output from
my debug port.
I have used that to determine as follows:
B1B1B1B1 - @head_4xx.S
00058001 - @initial_mmu
C0000000 - output Virtual
Address of KERNELBASE
00000000 - output physical
address of KERNELBASE
00057003 - @setup tlb
entry for debug console
70000000 - physical
address of memory to create tlb for debug console (same as debug port)
00057002 - @turn_on_mmu
00021032 - MSR Machine
status register
C00022A0 - virtual address
of start_here
40000000 - physical
address of start_here ??? shouldn't this be 000022A0 ?
I can trace right up to the rfi that kicks the processor into virtual mode.
The very first thing I have done at start_here is write a unique value
to my debug - I never see that.
That should mean either:
I do not have the correct tlb entry to enable my debug port to
work once the MMU is enabled
or
I am not getting to start_here.
Interestingly I also output identifiers for exceptions - and I am
getting repeated DTLB miss exceptions - all for address FFB13458
I also did memory dumps of what I thought were interesting regions at
the end of load_kernel
The dump of 0x0 looks very much like the start of head_4xx.S - the
signature values I am writing to my debug port (as well as the address
of the debug port itself) all in close proximity
are tty good clues.
the dump of 0x400000 looks like the start of arch/ppc/boot/simple/head.S
which is what I would expect.
the dump of 0x22a0 looks like start_here.
The only thing I see that seems to be wrong is that if I use tophys() to
try to convert start_here to a physical address I don't think I should
get 0x40000000
For reference a snippet of my debug output code is below.
lis r14,0x7000 //
high address of debug port
lis r0,0x5
ori r0,r0,0x7002
stw r0,4(r14)
eieio
// output 0x57002
lis r0,start_here@h //
output start_here (virtual)
ori r0,r0,start_here@l
stw r0,4(r14)
eieio
tophys (r0,r0);
// output start_here physical
stw r0,4(r14)
eieio
Help !?
^ permalink raw reply
* Re: Help ! 2.6.14 kernel can't bring up
From: Clemens Koller @ 2005-11-17 11:02 UTC (permalink / raw)
To: zjznliang; +Cc: linuxppc-embedded
In-Reply-To: <20051117075009.B2C4E6872B@ozlabs.org>
Hello, zjznliang!
zjznliang wrote:
> And there is nothing output ,I thought that it was serial port fault.
> I checked my Linux configuration ,but found nothing .
Check your kernel configuration.
Have you tried to turn on "early printk" support in your kernel config?
Linux might be booting already, but you just don't see it on your console.
Good luck,
--
Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany
http://www.anagramm.de
Phone: +49-89-741518-50
Fax: +49-89-741518-19
^ permalink raw reply
* help
From: prabha.j @ 2005-11-17 6:02 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 2059 bytes --]
Hi all,
I am trying to build kernel image for my custom borad which is similar to
mpc8260ads board. But i am getting the error.
I am using denx enldk and also the kernel source.
The error is
make[1]: Entering directory
`/home/cdot/eldk/ppc_6xx/usr/src/linux-2.4.25/arch/ppc/lib'
make all_targets
make[2]: Entering directory
`/home/cdot/eldk/ppc_6xx/usr/src/linux-2.4.25/arch/ppc/lib'
make[2]: Nothing to be done for `all_targets'.
make[2]: Leaving directory
`/home/cdot/eldk/ppc_6xx/usr/src/linux-2.4.25/arch/ppc/lib'
make[1]: Leaving directory
`/home/cdot/eldk/ppc_6xx/usr/src/linux-2.4.25/arch/ppc/lib'
ppc_6xx-ld -T arch/ppc/vmlinux.lds -Ttext 0xc0000000 -Bstatic
arch/ppc/kernel/head.o arch/ppc/kernel/idle_6xx.o init/main.o
init/version.o init/do_mounts.o \
--start-group \
arch/ppc/kernel/kernel.o arch/ppc/platforms/platform.o
arch/ppc/mm/mm.o arch/ppc/lib/lib.o kernel/kernel.o mm/mm.o fs/fs.o
ipc/ipc.o \
drivers/char/char.o drivers/block/block.o drivers/misc/misc.o
drivers/net/net.o drivers/pci/driver.o drivers/mtd/mtdlink.o
drivers/macintosh/macintosh.o drivers/media/media.o \
net/network.o \
/home/cdot/eldk/ppc_6xx/usr/src/linux-2.4.25/lib/lib.a \
--end-group \
-o vmlinux
arch/ppc/kernel/kernel.o(__ksymtab+0x480): In function `sys_call_table':
arch/ppc/kernel/entry.S: undefined reference to `__res'
make: *** [vmlinux] Error 1
Thanks in advance
Prabha J.
Tata Consultancy Services Limited
Mailto: prabha.j@tcs.com
Website: http://www.tcs.com
Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
[-- Attachment #2: Type: text/html, Size: 3272 bytes --]
^ permalink raw reply
* Re: [REQUEST] Tap for right click on PowerBook trackpad
From: Felix Oxley @ 2005-11-17 12:34 UTC (permalink / raw)
To: Dustin Lang; +Cc: linuxppc-dev
In-Reply-To: <Pine.LNX.4.60.0511161918050.29361@tin.icics.ubc.ca>
On Thursday 17 November 2005 03:32, Dustin Lang wrote:
>
> On my PowerBook, I map F11 to the middle mouse button and F12 to the right
> mouse button. I've grown so used to it that I get annoyed when it doesn't
> work in OSX :)
>
Thanks for your repsonse.
Actually, ububtu which I was experimenting with had this feature enabled by default.
However I find it extremely cumbersome to have to remove my hand form the trackpad in order to press F12.
I believe the Linux trackpad driver can do other specail action such as 'click and drag' or something similar.
Therefore I was/am hoping that implementing tap for right click would be possible.
(please cc me as I am not subscribed)
cheers,
Felix
^ permalink raw reply
* Re: MPC8555 USB host support
From: Yuli Barcohen @ 2005-11-17 12:34 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: Jonathan Masel, 'linuxppc-embedded@ozlabs.org'
In-Reply-To: <437B56E7.5090109@ru.mvista.com>
>>>>> Vitaly Bordug writes:
...
Vitaly> I also have a bunch of patches for gregkh, supporting serial
Vitaly> function, but they need nontrivial cleanup I do not have
Vitaly> time currently for. So I think I grab this one together with
Vitaly> my stuff when I head for it.
Kumar> Also, are you aware of Freescale's driver for this?
Vitaly> I used to try arabella one (came with MW bsp) but that
Vitaly> version does not work with 8272.
If so, it's a very old version. The driver works with any MPC82xx (and
MPC885, BTW). Also, please remember that many Freescale ADS boards have
hardware problems (depending on the board's revision).
Vitaly> If there are something usable, it will be interesting to
Vitaly> look at.
...
--
========================================================================
Yuli Barcohen | Phone +972-9-765-1788 | Software Project Leader
yuli@arabellasw.com | Fax +972-9-765-7494 | Arabella Software, Israel
========================================================================
^ permalink raw reply
* Re: [REQUEST] Tap for right click on PowerBook trackpad
From: Olivier Mehani @ 2005-11-17 12:58 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <200511171234.31085.lkml@oxley.org>
[-- Attachment #1: Type: text/plain, Size: 973 bytes --]
On Thu, 17 Nov 2005 12:34:29 +0000
Felix Oxley <lkml@oxley.org> wrote:
> Actually, ububtu which I was experimenting with had this feature
> enabled by default. However I find it extremely cumbersome to have to
> remove my hand form the trackpad in order to press F12.
If I'm not mistaken, the default mapping are fn+Alt for right click and
fn+Ctrl for middle click, which I find much more convenient than F11
and F12 on my iBook (closer to the trackpad).
> I believe the Linux trackpad driver can do other specail action such
> as 'click and drag' or something similar. Therefore I was/am hoping
> that implementing tap for right click would be possible.
I'm adding my own question as it is almost the same topic:
Is it possible to have the same behavior as with synaptics touchpads
(scrolling) ? I've googled but didn't find any sure answer.
--
Olivier Mehani <shtrom@ssji.net>
PGP fingerprint: 3720 A1F7 1367 9FA3 C654 6DFB 6845 4071 E346 2FD1
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: help
From: Wolfgang Denk @ 2005-11-17 14:04 UTC (permalink / raw)
To: prabha.j; +Cc: linuxppc-embedded
In-Reply-To: <OFF101A064.257D1AD3-ON652570BC.0020DC73-652570BC.002126C8@tcs.com>
In message <OFF101A064.257D1AD3-ON652570BC.0020DC73-652570BC.002126C8@tcs.com> you wrote:
>
> I am trying to build kernel image for my custom borad which is similar to
> mpc8260ads board. But i am getting the error.
"Similar to" means "not exactly the same", so you should not expect
that the code runs unchanged. As a minimum, you must carefully select
a configuration that matches your board.
...
> arch/ppc/kernel/entry.S: undefined reference to `__res'
Fix this!
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
"Nature is very un-American. Nature never hurries."
- William George Jordan
^ permalink raw reply
* Re: 11-16-05 2.6.14 on AMCC Yosemite board(PCI-IDE card boot error)
From: Stefan Roese @ 2005-11-17 15:05 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <20051116121846.1C1BD1FD0@smtp.263.net>
Hi Kylong,
On Wednesday 16 November 2005 13:18, KylongMu wrote:
> Dear Denk,
BTW: It's either Wolfgang or Mr. Denk.
> Thanks for your help; it makes my Yosemite run up! I'm try to add a
> PCI-IDE
>
> Card on it. I test my Promise-PDC20268 card and AEC6280 (ATP865-B chip
> type) card,
>
> Both of them all failed with same error, the boot message included in the
> attachment.
Sorry, but we don't have such a PCI IDE controller available. So we did test
with a Promise SATA controller:
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ata1: SATA max UDMA/133 cmd 0xD1008200 ctl 0xD1008238 bmdma 0x0 irq 25
ata2: SATA max UDMA/133 cmd 0xD1008280 ctl 0xD10082B8 bmdma 0x0 irq 25
ata3: SATA max UDMA/133 cmd 0xD1008300 ctl 0xD1008338 bmdma 0x0 irq 25
ata4: SATA max UDMA/133 cmd 0xD1008380 ctl 0xD10083B8 bmdma 0x0 irq 25
ata1: no device found (phy stat 00000000)
scsi0 : sata_promise
ata2: no device found (phy stat 00000000)
scsi1 : sata_promise
ata3: no device found (phy stat 00000000)
scsi2 : sata_promise
ata4: dev 0 ATA-7, max UDMA/133, 490234752 sectors: LBA48
ata4: dev 0 configured for UDMA/133
scsi3 : sata_promise
Vendor: ATA Model: Maxtor 7Y250M0 Rev: YAR5
Type: Direct-Access ANSI SCSI revision: 05
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
SCSI device sda: drive cache: write back
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
SCSI device sda: drive cache: write back
sda: sda1
sd 3:0:0:0: Attached scsi disk sda
...
bash-3.00# lspci -v
00:0c.0 Class 0180: 105a:3d18 (rev 02)
Subsystem: 105a:3d18
Flags: bus master, 66Mhz, medium devsel, latency 128, IRQ 25
I/O ports at ff80 [size=128]
I/O ports at fe00 [size=256]
Memory at 00000000affff000 (32-bit, non-prefetchable) [size=4K]
Memory at 00000000affc0000 (32-bit, non-prefetchable) [size=128K]
Expansion ROM at 0000000000080000 [disabled] [size=32K]
Capabilities: [60] Power Management version 2
bash-3.00# cat /proc/scsi/scsi
Attached devices:
Host: scsi3 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: Maxtor 7Y250M0 Rev: YAR5
Type: Direct-Access ANSI SCSI revision: 05
bash-3.00# fdisk -l /dev/sda
Disk /dev/sda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 30515 245111706 83 Linux
bash-3.00# mke2fs -m0 -j /dev/sda1
mke2fs 1.38 (30-Jun-2005)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
30654464 inodes, 61277926 blocks
0 blocks (0.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=62914560
1871 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632,
2654208,
4096000, 7962624, 11239424, 20480000, 23887872
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
bash-3.00# mount /dev/sda1 /mnt
mount: unknown filesystem type 'ext3'
bash-3.00# mount -t ext2 /dev/sda1 /mnt
EXT2-fs warning (device sda1): ext2_fill_super: mounting ext3 filesystem as
ext2
bash-3.00# df -h /mnt
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 231G 189M 230G 1% /mnt
bash-3.00# cd /tmp/bonnie
bash-3.00# ./Bonnie -m yosemite -s 256 -d /mnt
Bonnie 1.4: File '/mnt/Bonnie.423', size: 268435456, volumes: 1
Writing with putc()... done: 4492 kB/s 99.5 %CPU
Rewriting... done: 9576 kB/s 12.4 %CPU
Writing intelligently... done: 17375 kB/s 12.9 %CPU
Reading with getc()... done: 4278 kB/s 95.6 %CPU
Reading intelligently... done: 49108 kB/s 41.4 %CPU
Seeker 1...Seeker 2...Seeker 3...start 'em...done...done...done...
---Sequential Output (nosync)--- ---Sequential Input-- --Rnd
Seek-
-Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --04k
(03)-
Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec
%CPU
yosemi 1* 256 4492 99.5 17375 12.9 9576 12.4 4278 95.6 49108 41.4 2395.4
27.3
Everything is working fine with this PCI board. So it can't be a Yosemite
related problem. Sorry, can't help you here.
Best regards,
Stefan
^ permalink raw reply
* RE: Booting hangs after "Calibrating delay loop..."
From: Jaap de Jong @ 2005-11-17 15:04 UTC (permalink / raw)
To: linuxppc-embedded
Hi Binh,
I am working with this fpga too, different board, same linux version,
and not very succesfull until now too...
But my build passes the "Calibrating delay loop..." and prints the
correct value!
Just guessing... perhaps your problem is timer related. Fi no timer
interrupts?
Best regards!
Jaap de Jong
> Hi all,
>=20
> When booting Monta Vista Linux on Memec board
> (Virtex-4 FX12 LC), it hung after printing the
> following message:
>=20
> "Calibrating delay loop..."
>
> By looking at the source code, I found that in the
> init/main.c the problem came from the
> calibrate_delay()
> function: jiffies was not incremented (jiffies was
> always equal to 0).
>
> Have anyone get the similar problem or any experience
> to fix it?
^ permalink raw reply
* [PATCH] Fix zImage boot on old Pegasos firmware
From: David Woodhouse @ 2005-11-17 15:24 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
If a claim fails, the Pegasos firmware pretends it never even made it
into the prom, rather than indicating that it tried and failed.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
diff --git a/arch/powerpc/boot/prom.c b/arch/powerpc/boot/prom.c
index 4bea2f4..e8a6304 100644
--- a/arch/powerpc/boot/prom.c
+++ b/arch/powerpc/boot/prom.c
@@ -116,6 +116,7 @@ finddevice(const char *name)
void *
claim(unsigned long virt, unsigned long size, unsigned long align)
{
+ int ret;
struct prom_args {
char *service;
int nargs;
@@ -132,7 +133,11 @@ claim(unsigned long virt, unsigned long
args.virt = virt;
args.size = size;
args.align = align;
- (*prom)(&args);
+ ret = (*prom)(&args);
+ /* The original Pegasos II firmware claims that the call never made
+ it into the prom, rather than returning failure correctly */
+ if (ret)
+ return (void *)-1;
return args.ret;
}
--
dwmw2
^ permalink raw reply related
* Re: [PATCH 1/1 kernel 2.6.15-rc1] Fix copy-paste bug after _Convert platform drivers to use_ (again)
From: Russell King @ 2005-11-17 16:10 UTC (permalink / raw)
To: Andrey Volkov; +Cc: linux-kernel, ML linuxppc-embedded
In-Reply-To: <437A2EE8.4050404@varma-el.com>
On Tue, Nov 15, 2005 at 09:54:32PM +0300, Andrey Volkov wrote:
> I fear it is not a last patch of such kind :(.
> Please recheck places where you are changed
> pdev<->dev.
Applied. However, what you ask is to review the entire kernel looking
for a one-character error needle in a massive haystack. That's a job
better suited to compilers than eyes.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
^ permalink raw reply
* Re: Platform device model drawback
From: Peter Hanson @ 2005-11-17 17:51 UTC (permalink / raw)
To: Greg KH, linuxppc-embedded
In-Reply-To: <20051117041645.GA19145@kroah.com>
On 11/16/05, Greg KH <greg@kroah.com> wrote:
> On Wed, Nov 16, 2005 at 06:39:49PM -0800, Peter Hanson wrote:
> > IIRC, Arabella claims to deal nicely with dynamic allocation of
> > PowerPC resources to Linux devices =3D>
> > http://www.arabellasw.com/home.php
>
> I don't understand how that pertains to this thread...
Potential conflict: multiple logical devices competing for the same
SoC resource. Converse: similar logical devices supported by
different resources. Both cases have been mentioned in this thread,
with confusion about how to deal with them.
Does Arabella solve it as claimed? I don't know. But dynamic
allocation doesn't sound crazy. Maybe some of the code or design can
even be copied.
> And why did you post it only to me?
Oops. Correcting now.
> thanks,
>
> greg k-h
^ permalink raw reply
* Depmod crash when installing modules
From: Clement Fabien @ 2005-11-17 17:54 UTC (permalink / raw)
To: linuxppc-embedded
Hi=20
As anyone here previously encountered a "segmentation fault" on depmod
when trying to install modules?
I'm building a 2.6.13, with Alex Zeffertt PQ2 Sar driver + atm modules,
and I've got a nice crash (see following)
make[1]: `arch/ppc/kernel/asm-offsets.s' is up to date.
Building modules, stage 2.
MODPOST
CC net/atm/atm.mod.o
CC net/atm/br2684.mod.o
CC net/atm/clip.mod.o
LD [M] net/atm/atm.ko
LD [M] net/atm/clip.ko
LD [M] net/atm/br2684.ko
make modules_install INSTALL_MOD_PATH=3D/home/xxx/Atm/
INSTALL net/atm/atm.ko
INSTALL net/atm/br2684.ko
INSTALL net/atm/clip.ko
if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F
System.map -b /home/xxx/Atm/ -r 2.6.13; fi
/bin/sh: line 1: 8902 Segmentation fault /sbin/depmod -ae -F
System.map -b /home/xxx/Atm/ -r 2.6.13
make: *** [_modinst_post] Error 139
With depmod -V =3D> module-init-tools 3.1-pre5
Fabien.
^ permalink raw reply
* Re: Platform device model drawback
From: Greg KH @ 2005-11-17 17:49 UTC (permalink / raw)
To: Peter Hanson; +Cc: linuxppc-embedded
In-Reply-To: <50e923300511170951o5695e3f2s8b4b7ae4c1f8788a@mail.google.com>
On Thu, Nov 17, 2005 at 09:51:56AM -0800, Peter Hanson wrote:
> On 11/16/05, Greg KH <greg@kroah.com> wrote:
> > On Wed, Nov 16, 2005 at 06:39:49PM -0800, Peter Hanson wrote:
> > > IIRC, Arabella claims to deal nicely with dynamic allocation of
> > > PowerPC resources to Linux devices =>
> > > http://www.arabellasw.com/home.php
> >
> > I don't understand how that pertains to this thread...
>
> Potential conflict: multiple logical devices competing for the same
> SoC resource. Converse: similar logical devices supported by
> different resources. Both cases have been mentioned in this thread,
> with confusion about how to deal with them.
>
> Does Arabella solve it as claimed? I don't know. But dynamic
> allocation doesn't sound crazy. Maybe some of the code or design can
> even be copied.
Do you have a pointer to their code anywhere?
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH] ppc32: 8xx board-specific platform stuff for fs_enet
From: Marcelo Tosatti @ 2005-11-17 13:58 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-embedded list
In-Reply-To: <437B2051.5030408@ru.mvista.com>
Hi Vitaly,
On Wed, Nov 16, 2005 at 03:04:33PM +0300, Vitaly Bordug wrote:
> This adds board-specific files needed to utilize fs_enet Ethernet driver
> for MPC885ADS and MPC866ADS.
>
> Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
>
> +menu "Freescale Ethernet driver platform-specific options"
> + depends on FS_ENET
> +
> + config MPC8xx_SECOND_ETH
> + bool "Second Ethernet channel"
> + depends on (MPC885ADS || MPC86XADS)
> + default y
> + help
> + This enables support for second Ethernet on MPC885ADS and
> MPC86xADS boards.
Some line breakage here?
> choice
> prompt "Machine Type"
> depends on 6xx || POWER3 || POWER4
> diff --git a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile
> index 7c5cdab..cce6487 100644
> --- a/arch/ppc/platforms/Makefile
> +++ b/arch/ppc/platforms/Makefile
> @@ -45,6 +45,8 @@ obj-$(CONFIG_SBC82xx) += sbc82xx.o
> obj-$(CONFIG_SPRUCE) += spruce.o
> obj-$(CONFIG_LITE5200) += lite5200.o
> obj-$(CONFIG_EV64360) += ev64360.o
> +obj-$(CONFIG_MPC86XADS) += mpc866ads_setup.o
> +obj-$(CONFIG_MPC885ADS) += mpc885ads_setup.o
>
> ifeq ($(CONFIG_SMP),y)
> obj-$(CONFIG_PPC_PMAC) += pmac_smp.o
> diff --git a/arch/ppc/platforms/fads.h b/arch/ppc/platforms/fads.h
> index a48fb8d..e1c0b1b 100644
> --- a/arch/ppc/platforms/fads.h
> +++ b/arch/ppc/platforms/fads.h
> @@ -112,7 +112,7 @@
>
> /* CPM Ethernet through SCC1 or SCC2 */
>
> -#ifdef CONFIG_SCC1_ENET /* Probably 860 variant */
> +#if defined(CONFIG_SCC1_ENET) || defined(CONFIG_MPC8xx_SECOND_ETH_SCC1) /*
> Probably 860
> variant */
> /* Bits in parallel I/O port registers that have to be set/cleared
> * to configure the pins for SCC1 use.
> * TCLK - CLK1, RCLK - CLK2.
> diff --git a/arch/ppc/platforms/mpc866ads_setup.c
> b/arch/ppc/platforms/mpc866ads_setup.c
> new file mode 100644
> index 0000000..6ffdb0e
> --- /dev/null
> +++ b/arch/ppc/platforms/mpc866ads_setup.c
> @@ -0,0 +1,290 @@
> +/*arch/ppc/platforms/mpc885ads-setup.c
> + *
> + * Platform setup for the Freescale mpc885ads board
> + *
> + * Vitaly Bordug <vbordug@ru.mvista.com>
> + *
> + * Copyright 2005 MontaVista Software Inc.
> + *
> + * This file is licensed under the terms of the GNU General Public License
> + * version 2. This program is licensed "as is" without any warranty of any
> + * kind, whether express or implied.
> + */
> +
> +#include <linux/config.h>
> +#include <linux/init.h>
> +#include <linux/module.h>
> +#include <linux/param.h>
> +#include <linux/string.h>
> +#include <linux/ioport.h>
> +#include <linux/device.h>
> +
> +#include <linux/fs_enet_pd.h>
> +#include <linux/mii.h>
> +
> +#include <asm/delay.h>
> +#include <asm/io.h>
> +#include <asm/machdep.h>
> +#include <asm/page.h>
> +#include <asm/processor.h>
> +#include <asm/system.h>
> +#include <asm/time.h>
> +#include <asm/ppcboot.h>
> +#include <asm/8xx_immap.h>
> +#include <asm/commproc.h>
> +#include <asm/ppc_sys.h>
> +#include <asm/mpc8xx.h>
> +
> +extern unsigned char __res[];
> +
> +/* access ports */
> +#define setbits32(_addr, _v) out_be32(&(_addr), in_be32(&(_addr)) | (_v))
> +#define clrbits32(_addr, _v) out_be32(&(_addr), in_be32(&(_addr)) & ~(_v))
> +
> +#define setbits16(_addr, _v) out_be16(&(_addr), in_be16(&(_addr)) | (_v))
> +#define clrbits16(_addr, _v) out_be16(&(_addr), in_be16(&(_addr)) & ~(_v))
These definitions should go to generic header files.
> +
> +static struct fs_mii_bus_info fec_mii_bus_info = {
> + .method = fsmii_fec,
> + .id = 0,
> +};
> +
> +static struct fs_mii_bus_info scc_mii_bus_info = {
> + .method = fsmii_fixed,
> + .id = 0,
> + .i.fixed.speed = 10,
> + .i.fixed.duplex = 0,
> +};
> +
> +static struct fs_platform_info mpc8xx_fec_pdata[] = {
> + {
> + .rx_ring = 128,
> + .tx_ring = 16,
> + .rx_copybreak = 240,
> +
> + .use_napi = 1,
> + .napi_weight = 17,
> +
> + .phy_addr = 15,
> + .phy_irq = -1,
> +
> + .use_rmii = 0,
> +
> + .bus_info = &fec_mii_bus_info,
> + }
> +};
> +
> +static struct fs_platform_info mpc8xx_scc_pdata = {
> + .rx_ring = 64,
> + .tx_ring = 8,
> + .rx_copybreak = 240,
> +
> + .use_napi = 1,
> + .napi_weight = 17,
> +
> + .phy_addr = -1,
> + .phy_irq = -1,
> +
> + .bus_info = &scc_mii_bus_info,
> +};
> +
> +static void mpc866_nonplatform_device_init(void)
> +{
> + volatile cpm8xx_t *cp = cpmp;
> + unsigned *bcsr_io;
> +
> + bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
> +
> + if (bcsr_io == NULL) {
> + printk(KERN_CRIT "Could not remap BCSR1\n");
> + return;
> + }
> +#ifdef CONFIG_SERIAL_CPM_SMC1
> + cp->cp_simode &= ~(0xe0000000 >> 17); /* brg1 */
> + out_be32(bcsr_io, in_be32(bcsr_io) & ~(0x80000000 >> 7));
> +#else
> + out_be32(bcsr_io, in_be32(bcsr_io) | (0x80000000 >> 7));
> + cp->cp_pbpar &= ~(0x000000c0);
> + cp->cp_pbdir |= 0x000000c0;
> + cp->cp_smc[0].smc_smcmr = 0;
> + cp->cp_smc[0].smc_smce = 0;
> +#endif
> +
> +#ifdef CONFIG_SERIAL_CPM_SMC2
> + cp->cp_simode &= ~(0xe0000000 >> 1);
> + cp->cp_simode |= (0x20000000 >> 1); /* brg2 */
> + out_be32(bcsr_io, in_be32(bcsr_io) & ~(0x80000000 >> 13));
> +#else
> + out_be32(bcsr_io, in_be32(bcsr_io) | (0x80000000 >> 13));
Should use the clrbit/setbit macro definitions?
> + cp->cp_pbpar &= ~(0x00000c00);
> + cp->cp_pbdir |= 0x00000c00;
> + cp->cp_smc[1].smc_smcmr = 0;
> + cp->cp_smc[1].smc_smce = 0;
> +#endif
> + iounmap(bcsr_io);
> +}
> +
> +static void setup_fec1_ioports(void)
> +{
> + immap_t *immap = (immap_t *) IMAP_ADDR;
> +
> + setbits16(immap->im_ioport.iop_pdpar, 0x1fff);
> + setbits16(immap->im_ioport.iop_pddir, 0x1fff);
> +}
> +
> +static void setup_scc1_ioports(void)
> +{
> + immap_t *immap = (immap_t *) IMAP_ADDR;
> + unsigned *bcsr_io;
> +
> + bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
> +
> + if (bcsr_io == NULL) {
> + printk(KERN_CRIT "Could not remap BCSR1\n");
> + return;
> + }
> +
> + /* Enable the PHY.
> + */
> + out_be32(bcsr_io, in_be32(bcsr_io) & ~BCSR1_ETHEN);
> +
> + /* Configure port A pins for Txd and Rxd.
> + */
> + /* Disable receive and transmit in case EPPC-Bug started it.
> + */
> + setbits16(immap->im_ioport.iop_papar, PA_ENET_RXD | PA_ENET_TXD);
> + clrbits16(immap->im_ioport.iop_padir, PA_ENET_RXD | PA_ENET_TXD);
> + clrbits16(immap->im_ioport.iop_paodr, PA_ENET_TXD);
> +
> + /* Configure port C pins to enable CLSN and RENA.
> + */
> + clrbits16(immap->im_ioport.iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA);
> + clrbits16(immap->im_ioport.iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA);
> + setbits16(immap->im_ioport.iop_pcso, PC_ENET_CLSN | PC_ENET_RENA);
> + /* Configure port A for TCLK and RCLK.
> + */
> + setbits16(immap->im_ioport.iop_papar, PA_ENET_TCLK | PA_ENET_RCLK);
> + clrbits16(immap->im_ioport.iop_padir, PA_ENET_TCLK | PA_ENET_RCLK);
> + clrbits32(immap->im_cpm.cp_pbpar, PB_ENET_TENA);
> + clrbits32(immap->im_cpm.cp_pbdir, PB_ENET_TENA);
> +
> + /* Configure Serial Interface clock routing.
> + * First, clear all SCC bits to zero, then set the ones we want.
> + */
> + clrbits32(immap->im_cpm.cp_sicr, SICR_ENET_MASK);
> + setbits32(immap->im_cpm.cp_sicr, SICR_ENET_CLKRT);
> +
> + /* In the original SCC enet driver the following code is placed at
> the end of the
> initialization */
Strange formatting?
^ permalink raw reply
* Re: [PATCH] ppc32: 8xx board-specific platform stuff for fs_enet
From: Marcelo Tosatti @ 2005-11-17 14:07 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-embedded list
In-Reply-To: <437B2051.5030408@ru.mvista.com>
On Wed, Nov 16, 2005 at 03:04:33PM +0300, Vitaly Bordug wrote:
> This adds board-specific files needed to utilize fs_enet Ethernet driver
> for MPC885ADS and MPC866ADS.
>
> Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
>
Vitaly,
It also sounds to me that mpc885_nonplatform_device_init()
initialization suits board_init() time, instead of post-start_kernel()
do_initcalls(). No?
^ 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