LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Strange behaviour of adjtimex/settimeofday syscalls
From: Manuel Tobias Schiller @ 2005-09-03 10:03 UTC (permalink / raw)
  To: linuxppc-dev


[-- Attachment #1.1: Type: text/plain, Size: 1447 bytes --]

Hi all,

I'm running Linux 2.4.31 on a G3. I usually synchronize the clocks on my
LAN using ntpd. Inspecting the kernel with the ntptime utility yields an
error exit code from ntp_adjtime() which won't clear for weeks (i.e. the
output line looks like this:

	...
	ntp_adjtime() returns code 5 (ERROR)
	...

The members of the structure representing the kernel time PLL status etc
all look reasonable, and clock synchronisation using ntpd works quite
well - that's why I think there may be something wrong with the kernel
setting this error condition.)

Looking through the kernel source, I found that the ppc version of
do_settimeofday sets an error variable without clearing it anywhere.
Since other architectures don't do that, I applied the patch below to
avoid setting the error state.

I've been running with the modified kernel for almost a month now
without problems, so I think this patch might be interesting for the
general public (I haven't found anything similar with google). I'd like
to know what you think of it. If you think it's ok, it would be nice of
you if someone could make sure the patch makes it into mainstream
kernels. (The likelihood of the patch making it into the mainstream
kernels is just higher if more people have looked over it, so that's why
I'm posting it here, hoping for people that have more knowledge of these
things than I and are willing to test it).

Many thanks for your consideration.

Manuel Schiller

[-- Attachment #1.2: ppc-settimeofday.dif --]
[-- Type: video/x-dv, Size: 1037 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* [PATCH] Re: Strange behaviour of adjtimex/settimeofday syscalls
From: Manuel Tobias Schiller @ 2005-09-03 10:21 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1641 bytes --]

Hi all,

I'm running Linux 2.4.31 on a G3. I usually synchronize the clocks on my
LAN using ntpd. Inspecting the kernel with the ntptime utility yields an
error exit code from ntp_adjtime() which won't clear for weeks (i.e. the
output line looks like this:

	...
	ntp_adjtime() returns code 5 (ERROR)
	...

The members of the structure representing the kernel time PLL status etc
all look reasonable, and clock synchronisation using ntpd works quite
well - that's why I think there may be something wrong with the kernel
setting this error condition.)

Looking through the kernel source, I found that the ppc version of
do_settimeofday sets an error variable without clearing it anywhere.
Since other architectures don't do that, I applied the patch below to
avoid setting the error state.

I've been running with the modified kernel for almost a month now
without problems, so I think this patch might be interesting for the
general public (I haven't found anything similar with google). I'd like
to know what you think of it. If you think it's ok, it would be nice of
you if someone could make sure the patch makes it into mainstream
kernels. (The likelihood of the patch making it into the mainstream
kernels is just higher if more people have looked over it, so that's why
I'm posting it here, hoping for people that have more knowledge of these
things than I and are willing to test it).

Many thanks for your consideration.

Manuel Schiller


P.S. I've just noticed that the web interface doesn't handle the PGP
signatures of my previous submission well, so I'm resending the mail
without it. I'm terribly sorry for the inconvenience.

[-- Attachment #2: ppc-settimeofday.dif --]
[-- Type: video/x-dv, Size: 1037 bytes --]

^ permalink raw reply

* [PATCH] (updated) Move 3 more headers to asm-powerpc
From: Becky Bruce @ 2005-09-04  0:01 UTC (permalink / raw)
  To: linuxppc64-dev, linuxppc-dev

Merged several nearly-identical header files from asm-ppc and asm-ppc64 into
asm-powerpc. Note: This patch supersedes the earlier patch by this name.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Becky Bruce <becky.bruce@freescale.com>

---
commit 7e2f23568d8c7fbd5524f5d8940dea64e8e3d067
tree b5d10b5d6a66ffa37635d5824a48bca9cc23aa85
parent 6b39374a27eb4be7e9d82145ae270ba02ea90dc8
author Becky Bruce <becky.bruce@freescale.com> Sat, 03 Sep 2005 17:29:11 -0500
committer Becky Bruce <becky.bruce@freescale.com> Sat, 03 Sep 2005 17:29:11 -0500

 include/asm-powerpc/mman.h     |   52 +++++++++
 include/asm-powerpc/termbits.h |  191 ++++++++++++++++++++++++++++++++
 include/asm-powerpc/termios.h  |  236 ++++++++++++++++++++++++++++++++++++++++
 include/asm-ppc/mman.h         |   44 -------
 include/asm-ppc/termbits.h     |  185 -------------------------------
 include/asm-ppc/termios.h      |  232 ---------------------------------------
 include/asm-ppc64/mman.h       |   52 ---------
 include/asm-ppc64/termbits.h   |  193 ---------------------------------
 include/asm-ppc64/termios.h    |  235 ----------------------------------------
 9 files changed, 479 insertions(+), 941 deletions(-)

diff --git a/include/asm-powerpc/mman.h b/include/asm-powerpc/mman.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/mman.h
@@ -0,0 +1,52 @@
+#ifndef _POWERPC_MMAN_H
+#define _POWERPC_MMAN_H
+
+/*
+ * 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.
+ */
+
+#define PROT_READ	0x1		/* page can be read */
+#define PROT_WRITE	0x2		/* page can be written */
+#define PROT_EXEC	0x4		/* page can be executed */
+#define PROT_SEM	0x8		/* page may be used for atomic ops */
+#define PROT_NONE	0x0		/* page can not be accessed */
+#define PROT_GROWSDOWN	0x01000000	/* mprotect flag: extend change to start of growsdown vma */
+#define PROT_GROWSUP	0x02000000	/* mprotect flag: extend change to end of growsup vma */
+
+#define MAP_SHARED	0x01		/* Share changes */
+#define MAP_PRIVATE	0x02		/* Changes are private */
+#define MAP_TYPE	0x0f		/* Mask for type of mapping */
+#define MAP_FIXED	0x10		/* Interpret addr exactly */
+#define MAP_ANONYMOUS	0x20		/* don't use a file */
+#define MAP_RENAME      MAP_ANONYMOUS   /* In SunOS terminology */
+#define MAP_NORESERVE   0x40            /* don't reserve swap pages */
+#define MAP_LOCKED	0x80
+
+#define MAP_GROWSDOWN	0x0100		/* stack-like segment */
+#define MAP_DENYWRITE	0x0800		/* ETXTBSY */
+#define MAP_EXECUTABLE	0x1000		/* mark it as an executable */
+
+#define MS_ASYNC	1		/* sync memory asynchronously */
+#define MS_INVALIDATE	2		/* invalidate the caches */
+#define MS_SYNC		4		/* synchronous memory sync */
+
+#define MCL_CURRENT     0x2000          /* lock all currently mapped pages */
+#define MCL_FUTURE      0x4000          /* lock all additions to address space */
+
+#define MAP_POPULATE	0x8000		/* populate (prefault) pagetables */
+#define MAP_NONBLOCK	0x10000		/* do not block on IO */
+
+#define MADV_NORMAL	0x0		/* default page-in behavior */
+#define MADV_RANDOM	0x1		/* page-in minimum required */
+#define MADV_SEQUENTIAL	0x2		/* read-ahead aggressively */
+#define MADV_WILLNEED	0x3		/* pre-fault pages */
+#define MADV_DONTNEED	0x4		/* discard these pages */
+
+/* compatibility flags */
+#define MAP_ANON	MAP_ANONYMOUS
+#define MAP_FILE	0
+
+#endif /* _POWERPC_MMAN_H */
diff --git a/include/asm-powerpc/termbits.h b/include/asm-powerpc/termbits.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/termbits.h
@@ -0,0 +1,191 @@
+#ifndef _POWERPC_TERMBITS_H
+#define _POWERPC_TERMBITS_H
+
+/*
+ * 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.
+ */
+
+typedef unsigned char	cc_t;
+typedef unsigned int	speed_t;
+typedef unsigned int	tcflag_t;
+
+/*
+ * termios type and macro definitions.  Be careful about adding stuff
+ * to this file since it's used in GNU libc and there are strict rules
+ * concerning namespace pollution.
+ */
+
+#define NCCS 19
+struct termios {
+	tcflag_t c_iflag;		/* input mode flags */
+	tcflag_t c_oflag;		/* output mode flags */
+	tcflag_t c_cflag;		/* control mode flags */
+	tcflag_t c_lflag;		/* local mode flags */
+	cc_t c_cc[NCCS];		/* control characters */
+	cc_t c_line;			/* line discipline (== c_cc[19]) */
+	speed_t c_ispeed;		/* input speed */
+	speed_t c_ospeed;		/* output speed */
+};
+
+/* c_cc characters */
+#define VINTR 	         0
+#define VQUIT 	         1
+#define VERASE 	         2
+#define VKILL	         3
+#define VEOF	         4
+#define VMIN	         5
+#define VEOL	         6
+#define VTIME	         7
+#define VEOL2	         8
+#define VSWTC	         9
+#define VWERASE 	10
+#define VREPRINT	11
+#define VSUSP 		12
+#define VSTART		13
+#define VSTOP		14
+#define VLNEXT		15
+#define VDISCARD	16
+
+/* c_iflag bits */
+#define IGNBRK	0000001
+#define BRKINT	0000002
+#define IGNPAR	0000004
+#define PARMRK	0000010
+#define INPCK	0000020
+#define ISTRIP	0000040
+#define INLCR	0000100
+#define IGNCR	0000200
+#define ICRNL	0000400
+#define IXON	0001000
+#define IXOFF	0002000
+#define IXANY	0004000
+#define IUCLC	0010000
+#define IMAXBEL	0020000
+#define	IUTF8	0040000
+
+/* c_oflag bits */
+#define OPOST	0000001
+#define ONLCR	0000002
+#define OLCUC	0000004
+
+#define OCRNL	0000010
+#define ONOCR	0000020
+#define ONLRET	0000040
+
+#define OFILL	00000100
+#define OFDEL	00000200
+#define NLDLY	00001400
+#define   NL0	00000000
+#define   NL1	00000400
+#define   NL2	00001000
+#define   NL3	00001400
+#define TABDLY	00006000
+#define   TAB0	00000000
+#define   TAB1	00002000
+#define   TAB2	00004000
+#define   TAB3	00006000
+#define   XTABS	00006000	/* required by POSIX to == TAB3 */
+#define CRDLY	00030000
+#define   CR0	00000000
+#define   CR1	00010000
+#define   CR2	00020000
+#define   CR3	00030000
+#define FFDLY	00040000
+#define   FF0	00000000
+#define   FF1	00040000
+#define BSDLY	00100000
+#define   BS0	00000000
+#define   BS1	00100000
+#define VTDLY	00200000
+#define   VT0	00000000
+#define   VT1	00200000
+
+/* c_cflag bit meaning */
+#define CBAUD	0000377
+#define  B0	0000000		/* hang up */
+#define  B50	0000001
+#define  B75	0000002
+#define  B110	0000003
+#define  B134	0000004
+#define  B150	0000005
+#define  B200	0000006
+#define  B300	0000007
+#define  B600	0000010
+#define  B1200	0000011
+#define  B1800	0000012
+#define  B2400	0000013
+#define  B4800	0000014
+#define  B9600	0000015
+#define  B19200	0000016
+#define  B38400	0000017
+#define  EXTA   B19200
+#define  EXTB   B38400
+#define  CBAUDEX 0000000
+#define  B57600   00020
+#define  B115200  00021
+#define  B230400  00022
+#define  B460800  00023
+#define  B500000  00024
+#define  B576000  00025
+#define  B921600  00026
+#define B1000000  00027
+#define B1152000  00030
+#define B1500000  00031
+#define B2000000  00032
+#define B2500000  00033
+#define B3000000  00034
+#define B3500000  00035
+#define B4000000  00036
+
+#define CSIZE	00001400
+#define   CS5	00000000
+#define   CS6	00000400
+#define   CS7	00001000
+#define   CS8	00001400
+
+#define CSTOPB	00002000
+#define CREAD	00004000
+#define PARENB	00010000
+#define PARODD	00020000
+#define HUPCL	00040000
+
+#define CLOCAL	00100000
+#define CRTSCTS	  020000000000		/* flow control */
+
+/* c_lflag bits */
+#define ISIG	0x00000080
+#define ICANON	0x00000100
+#define XCASE	0x00004000
+#define ECHO	0x00000008
+#define ECHOE	0x00000002
+#define ECHOK	0x00000004
+#define ECHONL	0x00000010
+#define NOFLSH	0x80000000
+#define TOSTOP	0x00400000
+#define ECHOCTL	0x00000040
+#define ECHOPRT	0x00000020
+#define ECHOKE	0x00000001
+#define FLUSHO	0x00800000
+#define PENDIN	0x20000000
+#define IEXTEN	0x00000400
+
+/* Values for the ACTION argument to `tcflow'.  */
+#define	TCOOFF		0
+#define	TCOON		1
+#define	TCIOFF		2
+#define	TCION		3
+
+/* Values for the QUEUE_SELECTOR argument to `tcflush'.  */
+#define	TCIFLUSH	0
+#define	TCOFLUSH	1
+#define	TCIOFLUSH	2
+
+/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'.  */
+#define	TCSANOW		0
+#define	TCSADRAIN	1
+#define	TCSAFLUSH	2
+
+#endif /* _POWERPC_TERMBITS_H */
diff --git a/include/asm-powerpc/termios.h b/include/asm-powerpc/termios.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/termios.h
@@ -0,0 +1,236 @@
+#ifndef _POWERPC_TERMIOS_H
+#define _POWERPC_TERMIOS_H
+
+/*
+ * Liberally adapted from alpha/termios.h.  In particular, the c_cc[]
+ * fields have been reordered so that termio & termios share the
+ * common subset in the same order (for brain dead programs that don't
+ * know or care about the differences).
+ *
+ * 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/ioctls.h>
+#include <asm/termbits.h>
+
+struct sgttyb {
+	char	sg_ispeed;
+	char	sg_ospeed;
+	char	sg_erase;
+	char	sg_kill;
+	short	sg_flags;
+};
+
+struct tchars {
+	char	t_intrc;
+	char	t_quitc;
+	char	t_startc;
+	char	t_stopc;
+	char	t_eofc;
+	char	t_brkc;
+};
+
+struct ltchars {
+	char	t_suspc;
+	char	t_dsuspc;
+	char	t_rprntc;
+	char	t_flushc;
+	char	t_werasc;
+	char	t_lnextc;
+};
+
+struct winsize {
+	unsigned short ws_row;
+	unsigned short ws_col;
+	unsigned short ws_xpixel;
+	unsigned short ws_ypixel;
+};
+
+#define NCC 10
+struct termio {
+	unsigned short c_iflag;		/* input mode flags */
+	unsigned short c_oflag;		/* output mode flags */
+	unsigned short c_cflag;		/* control mode flags */
+	unsigned short c_lflag;		/* local mode flags */
+	unsigned char c_line;		/* line discipline */
+	unsigned char c_cc[NCC];	/* control characters */
+};
+
+/* c_cc characters */
+#define _VINTR	0
+#define _VQUIT	1
+#define _VERASE	2
+#define _VKILL	3
+#define _VEOF	4
+#define _VMIN	5
+#define _VEOL	6
+#define _VTIME	7
+#define _VEOL2	8
+#define _VSWTC	9
+
+/* line disciplines */
+#define N_TTY		0
+#define N_SLIP		1
+#define N_MOUSE		2
+#define N_PPP		3
+#define N_STRIP		4
+#define N_AX25		5
+#define N_X25		6	/* X.25 async */
+#define N_6PACK		7
+#define N_MASC		8	/* Reserved for Mobitex module <kaz@cafe.net> */
+#define N_R3964		9	/* Reserved for Simatic R3964 module */
+#define N_PROFIBUS_FDL	10	/* Reserved for Profibus <Dave@mvhi.com> */
+#define N_IRDA		11	/* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */
+#define N_SMSBLOCK	12	/* SMS block mode - for talking to GSM data cards about SMS messages */
+#define N_HDLC		13	/* synchronous HDLC */
+#define N_SYNC_PPP	14
+#define N_HCI		15  /* Bluetooth HCI UART */
+
+#ifdef __KERNEL__
+/*                   ^C  ^\ del  ^U  ^D   1   0   0   0   0  ^W  ^R  ^Z  ^Q  ^S  ^V  ^U  */
+#define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" 
+#endif
+
+#define FIOCLEX		_IO('f', 1)
+#define FIONCLEX	_IO('f', 2)
+#define FIOASYNC	_IOW('f', 125, int)
+#define FIONBIO		_IOW('f', 126, int)
+#define FIONREAD	_IOR('f', 127, int)
+#define TIOCINQ		FIONREAD
+
+#define TIOCGETP	_IOR('t', 8, struct sgttyb)
+#define TIOCSETP	_IOW('t', 9, struct sgttyb)
+#define TIOCSETN	_IOW('t', 10, struct sgttyb)	/* TIOCSETP wo flush */
+
+#define TIOCSETC	_IOW('t', 17, struct tchars)
+#define TIOCGETC	_IOR('t', 18, struct tchars)
+#define TCGETS		_IOR('t', 19, struct termios)
+#define TCSETS		_IOW('t', 20, struct termios)
+#define TCSETSW		_IOW('t', 21, struct termios)
+#define TCSETSF		_IOW('t', 22, struct termios)
+
+#define TCGETA		_IOR('t', 23, struct termio)
+#define TCSETA		_IOW('t', 24, struct termio)
+#define TCSETAW		_IOW('t', 25, struct termio)
+#define TCSETAF		_IOW('t', 28, struct termio)
+
+#define TCSBRK		_IO('t', 29)
+#define TCXONC		_IO('t', 30)
+#define TCFLSH		_IO('t', 31)
+
+#define TIOCSWINSZ	_IOW('t', 103, struct winsize)
+#define TIOCGWINSZ	_IOR('t', 104, struct winsize)
+#define	TIOCSTART	_IO('t', 110)		/* start output, like ^Q */
+#define	TIOCSTOP	_IO('t', 111)		/* stop output, like ^S */
+#define TIOCOUTQ        _IOR('t', 115, int)     /* output queue size */
+
+#define TIOCGLTC	_IOR('t', 116, struct ltchars)
+#define TIOCSLTC	_IOW('t', 117, struct ltchars)
+#define TIOCSPGRP	_IOW('t', 118, int)
+#define TIOCGPGRP	_IOR('t', 119, int)
+
+#define TIOCEXCL	0x540C
+#define TIOCNXCL	0x540D
+#define TIOCSCTTY	0x540E
+
+#define TIOCSTI		0x5412
+#define TIOCMGET	0x5415
+#define TIOCMBIS	0x5416
+#define TIOCMBIC	0x5417
+#define TIOCMSET	0x5418
+#define TIOCGSOFTCAR	0x5419
+#define TIOCSSOFTCAR	0x541A
+#define TIOCLINUX	0x541C
+#define TIOCCONS	0x541D
+#define TIOCGSERIAL	0x541E
+#define TIOCSSERIAL	0x541F
+#define TIOCPKT		0x5420
+
+#define TIOCNOTTY	0x5422
+#define TIOCSETD	0x5423
+#define TIOCGETD	0x5424
+#define TCSBRKP		0x5425	/* Needed for POSIX tcsendbreak() */
+
+#define TIOCSERCONFIG	0x5453
+#define TIOCSERGWILD	0x5454
+#define TIOCSERSWILD	0x5455
+#define TIOCGLCKTRMIOS	0x5456
+#define TIOCSLCKTRMIOS	0x5457
+#define TIOCSERGSTRUCT	0x5458 /* For debugging only */
+#define TIOCSERGETLSR   0x5459 /* Get line status register */
+#define TIOCSERGETMULTI 0x545A /* Get multiport config  */
+#define TIOCSERSETMULTI 0x545B /* Set multiport config */
+
+#define TIOCMIWAIT	0x545C	/* wait for a change on serial input line(s) */
+#define TIOCGICOUNT	0x545D	/* read serial port inline interrupt counts */
+
+/* Used for packet mode */
+#define TIOCPKT_DATA		 0
+#define TIOCPKT_FLUSHREAD	 1
+#define TIOCPKT_FLUSHWRITE	 2
+#define TIOCPKT_STOP		 4
+#define TIOCPKT_START		 8
+#define TIOCPKT_NOSTOP		16
+#define TIOCPKT_DOSTOP		32
+
+/* modem lines */
+#define TIOCM_LE	0x001
+#define TIOCM_DTR	0x002
+#define TIOCM_RTS	0x004
+#define TIOCM_ST	0x008
+#define TIOCM_SR	0x010
+#define TIOCM_CTS	0x020
+#define TIOCM_CAR	0x040
+#define TIOCM_RNG	0x080
+#define TIOCM_DSR	0x100
+#define TIOCM_CD	TIOCM_CAR
+#define TIOCM_RI	TIOCM_RNG
+#define TIOCM_OUT1	0x2000
+#define TIOCM_OUT2	0x4000
+#define TIOCM_LOOP	0x8000
+
+/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
+#define TIOCSER_TEMT    0x01	/* Transmitter physically empty */
+
+#ifdef __KERNEL__
+
+/*
+ * Translate a "termio" structure into a "termios". Ugh.
+ */
+#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
+	unsigned short __tmp; \
+	get_user(__tmp,&(termio)->x); \
+	(termios)->x = (0xffff0000 & (termios)->x) | __tmp; \
+}
+
+#define user_termio_to_kernel_termios(termios, termio) \
+({ \
+	SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
+	SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
+	SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
+	SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
+	copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
+})
+
+/*
+ * Translate a "termios" structure into a "termio". Ugh.
+ */
+#define kernel_termios_to_user_termio(termio, termios) \
+({ \
+	put_user((termios)->c_iflag, &(termio)->c_iflag); \
+	put_user((termios)->c_oflag, &(termio)->c_oflag); \
+	put_user((termios)->c_cflag, &(termio)->c_cflag); \
+	put_user((termios)->c_lflag, &(termio)->c_lflag); \
+	put_user((termios)->c_line,  &(termio)->c_line); \
+	copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
+})
+
+#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios))
+#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios))
+
+#endif	/* __KERNEL__ */
+
+#endif	/* _POWERPC_TERMIOS_H */
diff --git a/include/asm-ppc/mman.h b/include/asm-ppc/mman.h
deleted file mode 100644
--- a/include/asm-ppc/mman.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef __PPC_MMAN_H__
-#define __PPC_MMAN_H__
-
-#define PROT_READ	0x1		/* page can be read */
-#define PROT_WRITE	0x2		/* page can be written */
-#define PROT_EXEC	0x4		/* page can be executed */
-#define PROT_SEM	0x8		/* page may be used for atomic ops */
-#define PROT_NONE	0x0		/* page can not be accessed */
-#define PROT_GROWSDOWN	0x01000000	/* mprotect flag: extend change to start of growsdown vma */
-#define PROT_GROWSUP	0x02000000	/* mprotect flag: extend change to end of growsup vma */
-
-#define MAP_SHARED	0x01		/* Share changes */
-#define MAP_PRIVATE	0x02		/* Changes are private */
-#define MAP_TYPE	0x0f		/* Mask for type of mapping */
-#define MAP_FIXED	0x10		/* Interpret addr exactly */
-#define MAP_ANONYMOUS	0x20		/* don't use a file */
-#define MAP_RENAME      MAP_ANONYMOUS   /* In SunOS terminology */
-#define MAP_NORESERVE   0x40            /* don't reserve swap pages */
-#define MAP_LOCKED	0x80
-
-#define MAP_GROWSDOWN	0x0100		/* stack-like segment */
-#define MAP_DENYWRITE	0x0800		/* ETXTBSY */
-#define MAP_EXECUTABLE	0x1000		/* mark it as an executable */
-#define MAP_POPULATE	0x8000		/* populate (prefault) pagetables */
-#define MAP_NONBLOCK	0x10000		/* do not block on IO */
-
-#define MS_ASYNC	1		/* sync memory asynchronously */
-#define MS_INVALIDATE	2		/* invalidate the caches */
-#define MS_SYNC		4		/* synchronous memory sync */
-
-#define MCL_CURRENT     0x2000          /* lock all currently mapped pages */
-#define MCL_FUTURE      0x4000          /* lock all additions to address space */
-
-#define MADV_NORMAL	0x0		/* default page-in behavior */
-#define MADV_RANDOM	0x1		/* page-in minimum required */
-#define MADV_SEQUENTIAL	0x2		/* read-ahead aggressively */
-#define MADV_WILLNEED	0x3		/* pre-fault pages */
-#define MADV_DONTNEED	0x4		/* discard these pages */
-
-/* compatibility flags */
-#define MAP_ANON	MAP_ANONYMOUS
-#define MAP_FILE	0
-
-#endif /* __PPC_MMAN_H__ */
diff --git a/include/asm-ppc/termbits.h b/include/asm-ppc/termbits.h
deleted file mode 100644
--- a/include/asm-ppc/termbits.h
+++ /dev/null
@@ -1,185 +0,0 @@
-#ifndef _PPC_TERMBITS_H
-#define _PPC_TERMBITS_H
-
-typedef unsigned char	cc_t;
-typedef unsigned int	speed_t;
-typedef unsigned int	tcflag_t;
-
-/*
- * termios type and macro definitions.  Be careful about adding stuff
- * to this file since it's used in GNU libc and there are strict rules
- * concerning namespace pollution.
- */
-
-#define NCCS 19
-struct termios {
-	tcflag_t c_iflag;		/* input mode flags */
-	tcflag_t c_oflag;		/* output mode flags */
-	tcflag_t c_cflag;		/* control mode flags */
-	tcflag_t c_lflag;		/* local mode flags */
-	cc_t c_cc[NCCS];		/* control characters */
-	cc_t c_line;			/* line discipline (== c_cc[19]) */
-	speed_t c_ispeed;		/* input speed */
-	speed_t c_ospeed;		/* output speed */
-};
-
-/* c_cc characters */
-#define VINTR 	0
-#define VQUIT 	1
-#define VERASE 	2
-#define VKILL	3
-#define VEOF	4
-#define VMIN	5
-#define VEOL	6
-#define VTIME	7
-#define VEOL2	8
-#define VSWTC	9
-
-#define VWERASE 	10
-#define VREPRINT	11
-#define VSUSP 		12
-#define VSTART		13
-#define VSTOP		14
-#define VLNEXT		15
-#define VDISCARD	16
-
-/* c_iflag bits */
-#define IGNBRK	0000001
-#define BRKINT	0000002
-#define IGNPAR	0000004
-#define PARMRK	0000010
-#define INPCK	0000020
-#define ISTRIP	0000040
-#define INLCR	0000100
-#define IGNCR	0000200
-#define ICRNL	0000400
-#define IXON	0001000
-#define IXOFF	0002000
-#define IXANY		0004000
-#define IUCLC		0010000
-#define IMAXBEL	0020000
-#define IUTF8	0040000
-
-/* c_oflag bits */
-#define OPOST	0000001
-#define ONLCR	0000002
-#define OLCUC	0000004
-
-#define OCRNL	0000010
-#define ONOCR	0000020
-#define ONLRET	0000040
-
-#define OFILL	00000100
-#define OFDEL	00000200
-#define NLDLY	00001400
-#define   NL0	00000000
-#define   NL1	00000400
-#define   NL2	00001000
-#define   NL3	00001400
-#define TABDLY	00006000
-#define   TAB0	00000000
-#define   TAB1	00002000
-#define   TAB2	00004000
-#define   TAB3	00006000
-#define   XTABS	00006000	/* required by POSIX to == TAB3 */
-#define CRDLY	00030000
-#define   CR0	00000000
-#define   CR1	00010000
-#define   CR2	00020000
-#define   CR3	00030000
-#define FFDLY	00040000
-#define   FF0	00000000
-#define   FF1	00040000
-#define BSDLY	00100000
-#define   BS0	00000000
-#define   BS1	00100000
-#define VTDLY	00200000
-#define   VT0	00000000
-#define   VT1	00200000
-
-/* c_cflag bit meaning */
-#define CBAUD	0000377
-#define  B0	0000000		/* hang up */
-#define  B50	0000001
-#define  B75	0000002
-#define  B110	0000003
-#define  B134	0000004
-#define  B150	0000005
-#define  B200	0000006
-#define  B300	0000007
-#define  B600	0000010
-#define  B1200	0000011
-#define  B1800	0000012
-#define  B2400	0000013
-#define  B4800	0000014
-#define  B9600	0000015
-#define  B19200	0000016
-#define  B38400	0000017
-#define EXTA B19200
-#define EXTB B38400
-#define CBAUDEX 0000000
-#define  B57600   00020
-#define  B115200  00021
-#define  B230400  00022
-#define  B460800  00023
-#define  B500000  00024
-#define  B576000  00025
-#define  B921600  00026
-#define B1000000  00027
-#define B1152000  00030
-#define B1500000  00031
-#define B2000000  00032
-#define B2500000  00033
-#define B3000000  00034
-#define B3500000  00035
-#define B4000000  00036
-
-#define CSIZE	00001400
-#define   CS5	00000000
-#define   CS6	00000400
-#define   CS7	00001000
-#define   CS8	00001400
-
-#define CSTOPB	00002000
-#define CREAD	00004000
-#define PARENB	00010000
-#define PARODD	00020000
-#define HUPCL	00040000
-
-#define CLOCAL	00100000
-#define CRTSCTS	  020000000000		/* flow control */
-
-/* c_lflag bits */
-#define ISIG	0x00000080
-#define ICANON	0x00000100
-#define XCASE	0x00004000
-#define ECHO	0x00000008
-#define ECHOE	0x00000002
-#define ECHOK	0x00000004
-#define ECHONL	0x00000010
-#define NOFLSH	0x80000000
-#define TOSTOP	0x00400000
-#define ECHOCTL	0x00000040
-#define ECHOPRT	0x00000020
-#define ECHOKE	0x00000001
-#define FLUSHO	0x00800000
-#define PENDIN	0x20000000
-#define IEXTEN	0x00000400
-
-/* Values for the ACTION argument to `tcflow'.  */
-#define	TCOOFF		0
-#define	TCOON		1
-#define	TCIOFF		2
-#define	TCION		3
-
-/* Values for the QUEUE_SELECTOR argument to `tcflush'.  */
-#define	TCIFLUSH	0
-#define	TCOFLUSH	1
-#define	TCIOFLUSH	2
-
-/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'.  */
-#define	TCSANOW		0
-#define	TCSADRAIN	1
-#define	TCSAFLUSH	2
-
-#endif /* _PPC_TERMBITS_H */
diff --git a/include/asm-ppc/termios.h b/include/asm-ppc/termios.h
deleted file mode 100644
--- a/include/asm-ppc/termios.h
+++ /dev/null
@@ -1,232 +0,0 @@
-#ifndef _PPC_TERMIOS_H
-#define _PPC_TERMIOS_H
-
-/*
- * Liberally adapted from alpha/termios.h.  In particular, the c_cc[]
- * fields have been reordered so that termio & termios share the
- * common subset in the same order (for brain dead programs that don't
- * know or care about the differences).
- */
-
-#include <asm/ioctls.h>
-#include <asm/termbits.h>
-
-struct sgttyb {
-	char	sg_ispeed;
-	char	sg_ospeed;
-	char	sg_erase;
-	char	sg_kill;
-	short	sg_flags;
-};
-
-struct tchars {
-	char	t_intrc;
-	char	t_quitc;
-	char	t_startc;
-	char	t_stopc;
-	char	t_eofc;
-	char	t_brkc;
-};
-
-struct ltchars {
-	char	t_suspc;
-	char	t_dsuspc;
-	char	t_rprntc;
-	char	t_flushc;
-	char	t_werasc;
-	char	t_lnextc;
-};
-
-#define FIOCLEX		_IO('f', 1)
-#define FIONCLEX	_IO('f', 2)
-#define FIOASYNC	_IOW('f', 125, int)
-#define FIONBIO		_IOW('f', 126, int)
-#define FIONREAD	_IOR('f', 127, int)
-#define TIOCINQ		FIONREAD
-#define FIOQSIZE	_IOR('f', 128, loff_t)
-
-#define TIOCGETP	_IOR('t', 8, struct sgttyb)
-#define TIOCSETP	_IOW('t', 9, struct sgttyb)
-#define TIOCSETN	_IOW('t', 10, struct sgttyb)	/* TIOCSETP wo flush */
-
-#define TIOCSETC	_IOW('t', 17, struct tchars)
-#define TIOCGETC	_IOR('t', 18, struct tchars)
-#define TCGETS		_IOR('t', 19, struct termios)
-#define TCSETS		_IOW('t', 20, struct termios)
-#define TCSETSW		_IOW('t', 21, struct termios)
-#define TCSETSF		_IOW('t', 22, struct termios)
-
-#define TCGETA		_IOR('t', 23, struct termio)
-#define TCSETA		_IOW('t', 24, struct termio)
-#define TCSETAW		_IOW('t', 25, struct termio)
-#define TCSETAF		_IOW('t', 28, struct termio)
-
-#define TCSBRK		_IO('t', 29)
-#define TCXONC		_IO('t', 30)
-#define TCFLSH		_IO('t', 31)
-
-#define TIOCSWINSZ	_IOW('t', 103, struct winsize)
-#define TIOCGWINSZ	_IOR('t', 104, struct winsize)
-#define	TIOCSTART	_IO('t', 110)		/* start output, like ^Q */
-#define	TIOCSTOP	_IO('t', 111)		/* stop output, like ^S */
-#define TIOCOUTQ        _IOR('t', 115, int)     /* output queue size */
-
-#define TIOCGLTC	_IOR('t', 116, struct ltchars)
-#define TIOCSLTC	_IOW('t', 117, struct ltchars)
-#define TIOCSPGRP	_IOW('t', 118, int)
-#define TIOCGPGRP	_IOR('t', 119, int)
-
-#define TIOCEXCL	0x540C
-#define TIOCNXCL	0x540D
-#define TIOCSCTTY	0x540E
-
-#define TIOCSTI		0x5412
-#define TIOCMGET	0x5415
-#define TIOCMBIS	0x5416
-#define TIOCMBIC	0x5417
-#define TIOCMSET	0x5418
-#define TIOCGSOFTCAR	0x5419
-#define TIOCSSOFTCAR	0x541A
-#define TIOCLINUX	0x541C
-#define TIOCCONS	0x541D
-#define TIOCGSERIAL	0x541E
-#define TIOCSSERIAL	0x541F
-#define TIOCPKT		0x5420
-
-#define TIOCNOTTY	0x5422
-#define TIOCSETD	0x5423
-#define TIOCGETD	0x5424
-#define TCSBRKP		0x5425	/* Needed for POSIX tcsendbreak() */
-
-#define TIOCSERCONFIG	0x5453
-#define TIOCSERGWILD	0x5454
-#define TIOCSERSWILD	0x5455
-#define TIOCGLCKTRMIOS	0x5456
-#define TIOCSLCKTRMIOS	0x5457
-#define TIOCSERGSTRUCT	0x5458 /* For debugging only */
-#define TIOCSERGETLSR   0x5459 /* Get line status register */
-#define TIOCSERGETMULTI 0x545A /* Get multiport config  */
-#define TIOCSERSETMULTI 0x545B /* Set multiport config */
-
-#define TIOCMIWAIT	0x545C	/* wait for a change on serial input line(s) */
-#define TIOCGICOUNT	0x545D	/* read serial port inline interrupt counts */
-
-/* Used for packet mode */
-#define TIOCPKT_DATA		 0
-#define TIOCPKT_FLUSHREAD	 1
-#define TIOCPKT_FLUSHWRITE	 2
-#define TIOCPKT_STOP		 4
-#define TIOCPKT_START		 8
-#define TIOCPKT_NOSTOP		16
-#define TIOCPKT_DOSTOP		32
-
-struct winsize {
-	unsigned short ws_row;
-	unsigned short ws_col;
-	unsigned short ws_xpixel;
-	unsigned short ws_ypixel;
-};
-
-#define NCC 10
-struct termio {
-	unsigned short c_iflag;		/* input mode flags */
-	unsigned short c_oflag;		/* output mode flags */
-	unsigned short c_cflag;		/* control mode flags */
-	unsigned short c_lflag;		/* local mode flags */
-	unsigned char c_line;		/* line discipline */
-	unsigned char c_cc[NCC];	/* control characters */
-};
-
-/* c_cc characters */
-#define _VINTR	0
-#define _VQUIT	1
-#define _VERASE	2
-#define _VKILL	3
-#define _VEOF	4
-#define _VMIN	5
-#define _VEOL	6
-#define _VTIME	7
-#define _VEOL2	8
-#define _VSWTC	9
-
-#ifdef __KERNEL__
-/*                   ^C  ^\ del  ^U  ^D   1   0   0   0   0  ^W  ^R  ^Z  ^Q  ^S  ^V  ^U  */
-#define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025"
-#endif	/* __KERNEL__ */
-
-/* modem lines */
-#define TIOCM_LE	0x001
-#define TIOCM_DTR	0x002
-#define TIOCM_RTS	0x004
-#define TIOCM_ST	0x008
-#define TIOCM_SR	0x010
-#define TIOCM_CTS	0x020
-#define TIOCM_CAR	0x040
-#define TIOCM_RNG	0x080
-#define TIOCM_DSR	0x100
-#define TIOCM_CD	TIOCM_CAR
-#define TIOCM_RI	TIOCM_RNG
-#define TIOCM_OUT1	0x2000
-#define TIOCM_OUT2	0x4000
-#define TIOCM_LOOP	0x8000
-
-/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-#define TIOCSER_TEMT    0x01	/* Transmitter physically empty */
-
-/* line disciplines */
-#define N_TTY		0
-#define N_SLIP		1
-#define N_MOUSE		2
-#define N_PPP		3
-#define N_STRIP		4
-#define N_AX25		5
-#define N_X25		6	/* X.25 async */
-#define N_6PACK		7
-#define N_MASC		8	/* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964		9	/* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL	10	/* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA		11	/* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK	12	/* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC		13	/* synchronous HDLC */
-#define N_SYNC_PPP	14
-#define N_HCI		15  /* Bluetooth HCI UART */
-
-#ifdef __KERNEL__
-
-/*
- * Translate a "termio" structure into a "termios". Ugh.
- */
-#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
-	unsigned short __tmp; \
-	get_user(__tmp,&(termio)->x); \
-	(termios)->x = (0xffff0000 & (termios)->x) | __tmp; \
-}
-
-#define user_termio_to_kernel_termios(termios, termio) \
-({ \
-	SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
-	SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
-	SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
-	SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
-	copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
-})
-
-/*
- * Translate a "termios" structure into a "termio". Ugh.
- */
-#define kernel_termios_to_user_termio(termio, termios) \
-({ \
-	put_user((termios)->c_iflag, &(termio)->c_iflag); \
-	put_user((termios)->c_oflag, &(termio)->c_oflag); \
-	put_user((termios)->c_cflag, &(termio)->c_cflag); \
-	put_user((termios)->c_lflag, &(termio)->c_lflag); \
-	put_user((termios)->c_line,  &(termio)->c_line); \
-	copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
-})
-
-#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios))
-#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios))
-
-#endif	/* __KERNEL__ */
-
-#endif	/* _PPC_TERMIOS_H */
diff --git a/include/asm-ppc64/mman.h b/include/asm-ppc64/mman.h
deleted file mode 100644
--- a/include/asm-ppc64/mman.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef __PPC64_MMAN_H__
-#define __PPC64_MMAN_H__
-
-/*
- * 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.
- */
-
-#define PROT_READ	0x1		/* page can be read */
-#define PROT_WRITE	0x2		/* page can be written */
-#define PROT_EXEC	0x4		/* page can be executed */
-#define PROT_SEM	0x8		/* page may be used for atomic ops */
-#define PROT_NONE	0x0		/* page can not be accessed */
-#define PROT_GROWSDOWN	0x01000000	/* mprotect flag: extend change to start of growsdown vma */
-#define PROT_GROWSUP	0x02000000	/* mprotect flag: extend change to end of growsup vma */
-
-#define MAP_SHARED	0x01		/* Share changes */
-#define MAP_PRIVATE	0x02		/* Changes are private */
-#define MAP_TYPE	0x0f		/* Mask for type of mapping */
-#define MAP_FIXED	0x10		/* Interpret addr exactly */
-#define MAP_ANONYMOUS	0x20		/* don't use a file */
-#define MAP_RENAME      MAP_ANONYMOUS   /* In SunOS terminology */
-#define MAP_NORESERVE   0x40            /* don't reserve swap pages */
-#define MAP_LOCKED	0x80
-
-#define MAP_GROWSDOWN	0x0100		/* stack-like segment */
-#define MAP_DENYWRITE	0x0800		/* ETXTBSY */
-#define MAP_EXECUTABLE	0x1000		/* mark it as an executable */
-
-#define MS_ASYNC	1		/* sync memory asynchronously */
-#define MS_INVALIDATE	2		/* invalidate the caches */
-#define MS_SYNC		4		/* synchronous memory sync */
-
-#define MCL_CURRENT     0x2000          /* lock all currently mapped pages */
-#define MCL_FUTURE      0x4000          /* lock all additions to address space */
-
-#define MAP_POPULATE	0x8000		/* populate (prefault) pagetables */
-#define MAP_NONBLOCK	0x10000		/* do not block on IO */
-
-#define MADV_NORMAL	0x0		/* default page-in behavior */
-#define MADV_RANDOM	0x1		/* page-in minimum required */
-#define MADV_SEQUENTIAL	0x2		/* read-ahead aggressively */
-#define MADV_WILLNEED	0x3		/* pre-fault pages */
-#define MADV_DONTNEED	0x4		/* discard these pages */
-
-/* compatibility flags */
-#define MAP_ANON	MAP_ANONYMOUS
-#define MAP_FILE	0
-
-#endif /* __PPC64_MMAN_H__ */
diff --git a/include/asm-ppc64/termbits.h b/include/asm-ppc64/termbits.h
deleted file mode 100644
--- a/include/asm-ppc64/termbits.h
+++ /dev/null
@@ -1,193 +0,0 @@
-#ifndef _PPC64_TERMBITS_H
-#define _PPC64_TERMBITS_H
-
-/*
- * 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 <linux/posix_types.h>
-
-typedef unsigned char	cc_t;
-typedef unsigned int	speed_t;
-typedef unsigned int	tcflag_t;
-
-/*
- * termios type and macro definitions.  Be careful about adding stuff
- * to this file since it's used in GNU libc and there are strict rules
- * concerning namespace pollution.
- */
-
-#define NCCS 19
-struct termios {
-	tcflag_t c_iflag;		/* input mode flags */
-	tcflag_t c_oflag;		/* output mode flags */
-	tcflag_t c_cflag;		/* control mode flags */
-	tcflag_t c_lflag;		/* local mode flags */
-	cc_t c_cc[NCCS];		/* control characters */
-	cc_t c_line;			/* line discipline (== c_cc[19]) */
-	speed_t c_ispeed;		/* input speed */
-	speed_t c_ospeed;		/* output speed */
-};
-
-/* c_cc characters */
-#define VINTR 	         0
-#define VQUIT 	         1
-#define VERASE 	         2
-#define VKILL	         3
-#define VEOF	         4
-#define VMIN	         5
-#define VEOL	         6
-#define VTIME	         7
-#define VEOL2	         8
-#define VSWTC	         9
-#define VWERASE 	10
-#define VREPRINT	11
-#define VSUSP 		12
-#define VSTART		13
-#define VSTOP		14
-#define VLNEXT		15
-#define VDISCARD	16
-
-/* c_iflag bits */
-#define IGNBRK	0000001
-#define BRKINT	0000002
-#define IGNPAR	0000004
-#define PARMRK	0000010
-#define INPCK	0000020
-#define ISTRIP	0000040
-#define INLCR	0000100
-#define IGNCR	0000200
-#define ICRNL	0000400
-#define IXON	0001000
-#define IXOFF	0002000
-#define IXANY	0004000
-#define IUCLC	0010000
-#define IMAXBEL	0020000
-#define	IUTF8	0040000
-
-/* c_oflag bits */
-#define OPOST	0000001
-#define ONLCR	0000002
-#define OLCUC	0000004
-
-#define OCRNL	0000010
-#define ONOCR	0000020
-#define ONLRET	0000040
-
-#define OFILL	00000100
-#define OFDEL	00000200
-#define NLDLY	00001400
-#define   NL0	00000000
-#define   NL1	00000400
-#define   NL2	00001000
-#define   NL3	00001400
-#define TABDLY	00006000
-#define   TAB0	00000000
-#define   TAB1	00002000
-#define   TAB2	00004000
-#define   TAB3	00006000
-#define   XTABS	00006000	/* required by POSIX to == TAB3 */
-#define CRDLY	00030000
-#define   CR0	00000000
-#define   CR1	00010000
-#define   CR2	00020000
-#define   CR3	00030000
-#define FFDLY	00040000
-#define   FF0	00000000
-#define   FF1	00040000
-#define BSDLY	00100000
-#define   BS0	00000000
-#define   BS1	00100000
-#define VTDLY	00200000
-#define   VT0	00000000
-#define   VT1	00200000
-
-/* c_cflag bit meaning */
-#define CBAUD	0000377
-#define  B0	0000000		/* hang up */
-#define  B50	0000001
-#define  B75	0000002
-#define  B110	0000003
-#define  B134	0000004
-#define  B150	0000005
-#define  B200	0000006
-#define  B300	0000007
-#define  B600	0000010
-#define  B1200	0000011
-#define  B1800	0000012
-#define  B2400	0000013
-#define  B4800	0000014
-#define  B9600	0000015
-#define  B19200	0000016
-#define  B38400	0000017
-#define  EXTA   B19200
-#define  EXTB   B38400
-#define  CBAUDEX 0000000
-#define  B57600   00020
-#define  B115200  00021
-#define  B230400  00022
-#define  B460800  00023
-#define  B500000  00024
-#define  B576000  00025
-#define  B921600  00026
-#define B1000000  00027
-#define B1152000  00030
-#define B1500000  00031
-#define B2000000  00032
-#define B2500000  00033
-#define B3000000  00034
-#define B3500000  00035
-#define B4000000  00036
-
-#define CSIZE	00001400
-#define   CS5	00000000
-#define   CS6	00000400
-#define   CS7	00001000
-#define   CS8	00001400
-
-#define CSTOPB	00002000
-#define CREAD	00004000
-#define PARENB	00010000
-#define PARODD	00020000
-#define HUPCL	00040000
-
-#define CLOCAL	00100000
-#define CRTSCTS	  020000000000		/* flow control */
-
-/* c_lflag bits */
-#define ISIG	0x00000080
-#define ICANON	0x00000100
-#define XCASE	0x00004000
-#define ECHO	0x00000008
-#define ECHOE	0x00000002
-#define ECHOK	0x00000004
-#define ECHONL	0x00000010
-#define NOFLSH	0x80000000
-#define TOSTOP	0x00400000
-#define ECHOCTL	0x00000040
-#define ECHOPRT	0x00000020
-#define ECHOKE	0x00000001
-#define FLUSHO	0x00800000
-#define PENDIN	0x20000000
-#define IEXTEN	0x00000400
-
-/* Values for the ACTION argument to `tcflow'.  */
-#define	TCOOFF		0
-#define	TCOON		1
-#define	TCIOFF		2
-#define	TCION		3
-
-/* Values for the QUEUE_SELECTOR argument to `tcflush'.  */
-#define	TCIFLUSH	0
-#define	TCOFLUSH	1
-#define	TCIOFLUSH	2
-
-/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'.  */
-#define	TCSANOW		0
-#define	TCSADRAIN	1
-#define	TCSAFLUSH	2
-
-#endif /* _PPC64_TERMBITS_H */
diff --git a/include/asm-ppc64/termios.h b/include/asm-ppc64/termios.h
deleted file mode 100644
--- a/include/asm-ppc64/termios.h
+++ /dev/null
@@ -1,235 +0,0 @@
-#ifndef _PPC64_TERMIOS_H
-#define _PPC64_TERMIOS_H
-
-/*
- * Liberally adapted from alpha/termios.h.  In particular, the c_cc[]
- * fields have been reordered so that termio & termios share the
- * common subset in the same order (for brain dead programs that don't
- * know or care about the differences).
- *
- * 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/ioctls.h>
-#include <asm/termbits.h>
-
-struct sgttyb {
-	char	sg_ispeed;
-	char	sg_ospeed;
-	char	sg_erase;
-	char	sg_kill;
-	short	sg_flags;
-};
-
-struct tchars {
-	char	t_intrc;
-	char	t_quitc;
-	char	t_startc;
-	char	t_stopc;
-	char	t_eofc;
-	char	t_brkc;
-};
-
-struct ltchars {
-	char	t_suspc;
-	char	t_dsuspc;
-	char	t_rprntc;
-	char	t_flushc;
-	char	t_werasc;
-	char	t_lnextc;
-};
-
-struct winsize {
-	unsigned short ws_row;
-	unsigned short ws_col;
-	unsigned short ws_xpixel;
-	unsigned short ws_ypixel;
-};
-
-#define NCC 10
-struct termio {
-	unsigned short c_iflag;		/* input mode flags */
-	unsigned short c_oflag;		/* output mode flags */
-	unsigned short c_cflag;		/* control mode flags */
-	unsigned short c_lflag;		/* local mode flags */
-	unsigned char c_line;		/* line discipline */
-	unsigned char c_cc[NCC];	/* control characters */
-};
-
-/* c_cc characters */
-#define _VINTR	0
-#define _VQUIT	1
-#define _VERASE	2
-#define _VKILL	3
-#define _VEOF	4
-#define _VMIN	5
-#define _VEOL	6
-#define _VTIME	7
-#define _VEOL2	8
-#define _VSWTC	9
-
-/* line disciplines */
-#define N_TTY		0
-#define N_SLIP		1
-#define N_MOUSE		2
-#define N_PPP		3
-#define N_STRIP		4
-#define N_AX25		5
-#define N_X25		6	/* X.25 async */
-#define N_6PACK		7
-#define N_MASC		8	/* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964		9	/* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL	10	/* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA		11	/* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */
-#define N_SMSBLOCK	12	/* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC		13	/* synchronous HDLC */
-#define N_SYNC_PPP	14
-
-#ifdef __KERNEL__
-/*                   ^C  ^\ del  ^U  ^D   1   0   0   0   0  ^W  ^R  ^Z  ^Q  ^S  ^V  ^U  */
-#define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" 
-#endif
-
-#define FIOCLEX		_IO('f', 1)
-#define FIONCLEX	_IO('f', 2)
-#define FIOASYNC	_IOW('f', 125, int)
-#define FIONBIO		_IOW('f', 126, int)
-#define FIONREAD	_IOR('f', 127, int)
-#define TIOCINQ		FIONREAD
-
-#define TIOCGETP	_IOR('t', 8, struct sgttyb)
-#define TIOCSETP	_IOW('t', 9, struct sgttyb)
-#define TIOCSETN	_IOW('t', 10, struct sgttyb)	/* TIOCSETP wo flush */
-
-#define TIOCSETC	_IOW('t', 17, struct tchars)
-#define TIOCGETC	_IOR('t', 18, struct tchars)
-#define TCGETS		_IOR('t', 19, struct termios)
-#define TCSETS		_IOW('t', 20, struct termios)
-#define TCSETSW		_IOW('t', 21, struct termios)
-#define TCSETSF		_IOW('t', 22, struct termios)
-
-#define TCGETA		_IOR('t', 23, struct termio)
-#define TCSETA		_IOW('t', 24, struct termio)
-#define TCSETAW		_IOW('t', 25, struct termio)
-#define TCSETAF		_IOW('t', 28, struct termio)
-
-#define TCSBRK		_IO('t', 29)
-#define TCXONC		_IO('t', 30)
-#define TCFLSH		_IO('t', 31)
-
-#define TIOCSWINSZ	_IOW('t', 103, struct winsize)
-#define TIOCGWINSZ	_IOR('t', 104, struct winsize)
-#define	TIOCSTART	_IO('t', 110)		/* start output, like ^Q */
-#define	TIOCSTOP	_IO('t', 111)		/* stop output, like ^S */
-#define TIOCOUTQ        _IOR('t', 115, int)     /* output queue size */
-
-#define TIOCGLTC	_IOR('t', 116, struct ltchars)
-#define TIOCSLTC	_IOW('t', 117, struct ltchars)
-#define TIOCSPGRP	_IOW('t', 118, int)
-#define TIOCGPGRP	_IOR('t', 119, int)
-
-#define TIOCEXCL	0x540C
-#define TIOCNXCL	0x540D
-#define TIOCSCTTY	0x540E
-
-#define TIOCSTI		0x5412
-#define TIOCMGET	0x5415
-#define TIOCMBIS	0x5416
-#define TIOCMBIC	0x5417
-#define TIOCMSET	0x5418
-#define TIOCGSOFTCAR	0x5419
-#define TIOCSSOFTCAR	0x541A
-#define TIOCLINUX	0x541C
-#define TIOCCONS	0x541D
-#define TIOCGSERIAL	0x541E
-#define TIOCSSERIAL	0x541F
-#define TIOCPKT		0x5420
-
-#define TIOCNOTTY	0x5422
-#define TIOCSETD	0x5423
-#define TIOCGETD	0x5424
-#define TCSBRKP		0x5425	/* Needed for POSIX tcsendbreak() */
-
-#define TIOCSERCONFIG	0x5453
-#define TIOCSERGWILD	0x5454
-#define TIOCSERSWILD	0x5455
-#define TIOCGLCKTRMIOS	0x5456
-#define TIOCSLCKTRMIOS	0x5457
-#define TIOCSERGSTRUCT	0x5458 /* For debugging only */
-#define TIOCSERGETLSR   0x5459 /* Get line status register */
-#define TIOCSERGETMULTI 0x545A /* Get multiport config  */
-#define TIOCSERSETMULTI 0x545B /* Set multiport config */
-
-#define TIOCMIWAIT	0x545C	/* wait for a change on serial input line(s) */
-#define TIOCGICOUNT	0x545D	/* read serial port inline interrupt counts */
-
-/* Used for packet mode */
-#define TIOCPKT_DATA		 0
-#define TIOCPKT_FLUSHREAD	 1
-#define TIOCPKT_FLUSHWRITE	 2
-#define TIOCPKT_STOP		 4
-#define TIOCPKT_START		 8
-#define TIOCPKT_NOSTOP		16
-#define TIOCPKT_DOSTOP		32
-
-/* modem lines */
-#define TIOCM_LE	0x001
-#define TIOCM_DTR	0x002
-#define TIOCM_RTS	0x004
-#define TIOCM_ST	0x008
-#define TIOCM_SR	0x010
-#define TIOCM_CTS	0x020
-#define TIOCM_CAR	0x040
-#define TIOCM_RNG	0x080
-#define TIOCM_DSR	0x100
-#define TIOCM_CD	TIOCM_CAR
-#define TIOCM_RI	TIOCM_RNG
-#define TIOCM_OUT1	0x2000
-#define TIOCM_OUT2	0x4000
-#define TIOCM_LOOP	0x8000
-
-/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-#define TIOCSER_TEMT    0x01	/* Transmitter physically empty */
-
-#ifdef __KERNEL__
-
-/*
- * Translate a "termio" structure into a "termios". Ugh.
- */
-#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
-	unsigned short __tmp; \
-	get_user(__tmp,&(termio)->x); \
-	(termios)->x = (0xffff0000 & (termios)->x) | __tmp; \
-}
-
-#define user_termio_to_kernel_termios(termios, termio) \
-({ \
-	SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
-	SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
-	SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
-	SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
-	copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
-})
-
-/*
- * Translate a "termios" structure into a "termio". Ugh.
- */
-#define kernel_termios_to_user_termio(termio, termios) \
-({ \
-	put_user((termios)->c_iflag, &(termio)->c_iflag); \
-	put_user((termios)->c_oflag, &(termio)->c_oflag); \
-	put_user((termios)->c_cflag, &(termio)->c_cflag); \
-	put_user((termios)->c_lflag, &(termio)->c_lflag); \
-	put_user((termios)->c_line,  &(termio)->c_line); \
-	copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
-})
-
-#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios))
-#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios))
-
-#endif	/* __KERNEL__ */
-
-#endif	/* _PPC64_TERMIOS_H */

^ permalink raw reply

* Re: use of rtc.c on chrp/prep?
From: evilninja @ 2005-09-04  0:41 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <C46831A4-9BDC-4C28-9A30-55C414F4FAC4@freescale.com>

Kumar Gala schrieb:
> Does anyone enable CONFIG_RTC on chrp/prep?  Tom tells me these are  the
> only platforms that it is even valid to do so on.

hm, "grep CONFIG_RTC arch/ppc/configs/*" returns nothing and i don't find
this option in my .config (anymore?). CONFIG_GEN_RTC and CNFIG_GEN_RTC_X
is working fine here [1].

Christian.

[1] http://nerdbynature.de/bits/hal/2.6.13/
-- 
BOFH excuse #1:

clock speed

^ permalink raw reply

* BestComm in MPC5200
From: zhonglei @ 2005-09-04  5:06 UTC (permalink / raw)
  To: Linuxppc-dev

hi:
 I use BestComm API in my driver. I include all the needed .h file in my driver and succeed in compiling the module. But when I insmod and the
program runs to the function TaskLoadImage((sdma_regs*)MPC52xxx_SDMA), the Nfs from host to target board is disconnected!What's the problem?
Thanks
zhonglei

^ permalink raw reply

* Promise Ultra 100 TX2 20268 chip receive "lost interrupt" error under 2.6.13 (ppc8540ads platform)
From: KylongMu @ 2005-09-04 15:50 UTC (permalink / raw)
  To: Linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 714 bytes --]

Hi, team:
 
Kernel version: 2.6.13 (stable version)
Platform type : ppc8540ads platform
Problem hardware type: Promise20268 PCI-ATA card
Configuration:
configured ATA support with these  part : Device driver, File
system,Partition table.
Problem description:
     When I boot my board, the kernel can recognize my Promise20268 card,
and my
SegateHD correctly. but prompt with "lost interrupt" message.
    After boot procedure, the /proc/partitions file shows correct partitions
info, but when
I mount my HD , I get "lost interrupt" message again, and the mount failed.
    Pls help me to solved this problem, or a suggestion to change with
another PCI-ATA chip which
had been tested.
 
Cordially,
KylongMu
    
 

[-- Attachment #2: Type: text/html, Size: 2344 bytes --]

^ permalink raw reply

* [PATCH] discard *.exit.text and *.exit.data sections
From: Eugene Surovegin @ 2005-09-05  5:46 UTC (permalink / raw)
  To: linuxppc-dev

Discard *.exit.text sections on runtime. We cannot do this on link 
time because of the way BUG macros are implemented. If "__exit 
function" calls one of those macros, __bug_table section will 
reference this function. This is similar to ".altinstructions" 
situation on i386.

*.exit.data seems to be OK in this respect and is discarded on link 
time.

Signed-off-by: Eugene Surovegin <ebs@ebshome.net>

diff --git a/arch/ppc/kernel/vmlinux.lds.S b/arch/ppc/kernel/vmlinux.lds.S
--- a/arch/ppc/kernel/vmlinux.lds.S
+++ b/arch/ppc/kernel/vmlinux.lds.S
@@ -96,6 +96,9 @@ SECTIONS
 	*(.init.text)
 	_einittext = .;
   }
+  /* .exit.text is discarded at runtime, not link time, 
+     to deal with references from __bug_table */
+  .exit.text : { *(.exit.text) }  
   .init.data : {
     *(.init.data);
     __vtop_table_begin = .;
@@ -190,5 +193,6 @@ SECTIONS
   /* Sections to be discarded. */
   /DISCARD/ : {
     *(.exitcall.exit)
+    *(.exit.data)
   }
 }

^ permalink raw reply

* Re: [RFC: 2.6 patch] remove some unused IDE stuff
From: Greg Ungerer @ 2005-09-05  5:29 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Brian Waite, grundler, linuxppc-dev, matthew, linux-kernel, jeff,
	B.Zolnierkiewicz, linux-ide, gerg, davidm, parisc-linux
In-Reply-To: <20050902001538.GH3657@stusta.de>

Hi Adrian,

Adrian Bunk wrote:
> This patch removes some dead IDE-related #define's and
> "static inline" functions.
> 
> Please double-check it since I've only tested it with grep and didn't 
> try compilation.
> 
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>

I think the include/asm-m68knommu/ide.h should just be removed
altogether. None of the underlying code support for it has been
carried into 2.6, so it is pretty much useless.

Regards
Greg




> ---
> 
>  arch/ppc/platforms/hdpu.c   |   40 -----------------------------------
>  include/asm-m68knommu/ide.h |   41 ------------------------------------
>  include/asm-parisc/ide.h    |    5 ----
>  3 files changed, 86 deletions(-)
> 
> --- linux-2.6.13-mm1-full/arch/ppc/platforms/hdpu.c.old	2005-09-02 02:02:33.000000000 +0200
> +++ linux-2.6.13-mm1-full/arch/ppc/platforms/hdpu.c	2005-09-02 02:04:08.000000000 +0200
> @@ -608,46 +608,6 @@
>  	}
>  }
>  
> -#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
> -static int hdpu_ide_check_region(ide_ioreg_t from, unsigned int extent)
> -{
> -	return check_region(from, extent);
> -}
> -
> -static void
> -hdpu_ide_request_region(ide_ioreg_t from, unsigned int extent, const char *name)
> -{
> -	request_region(from, extent, name);
> -	return;
> -}
> -
> -static void hdpu_ide_release_region(ide_ioreg_t from, unsigned int extent)
> -{
> -	release_region(from, extent);
> -	return;
> -}
> -
> -static void __init
> -hdpu_ide_pci_init_hwif_ports(hw_regs_t * hw, ide_ioreg_t data_port,
> -			     ide_ioreg_t ctrl_port, int *irq)
> -{
> -	struct pci_dev *dev;
> -
> -	pci_for_each_dev(dev) {
> -		if (((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) ||
> -		    ((dev->class >> 8) == PCI_CLASS_STORAGE_RAID)) {
> -			hw->irq = dev->irq;
> -
> -			if (irq != NULL) {
> -				*irq = dev->irq;
> -			}
> -		}
> -	}
> -
> -	return;
> -}
> -#endif
> -
>  void hdpu_heartbeat(void)
>  {
>  	if (mv64x60_read(&bh, MV64x60_GPP_VALUE) & (1 << 5))
> --- linux-2.6.13-mm1-full/include/asm-m68knommu/ide.h.old	2005-09-02 02:04:17.000000000 +0200
> +++ linux-2.6.13-mm1-full/include/asm-m68knommu/ide.h	2005-09-02 02:10:11.000000000 +0200
> @@ -141,47 +141,6 @@
>  
>  #define ide_init_default_irq(base)	ide_default_irq(base)
>  
> -static IDE_INLINE int
> -ide_request_irq(
> -	unsigned int irq,
> -	void (*handler)(int, void *, struct pt_regs *),
> -	unsigned long flags,
> -	const char *device,
> -	void *dev_id)
> -{
> -#ifdef CONFIG_COLDFIRE
> -	mcf_autovector(irq);
> -#endif
> -	return(request_irq(irq, handler, flags, device, dev_id));
> -}
> -
> -
> -static IDE_INLINE void
> -ide_free_irq(unsigned int irq, void *dev_id)
> -{
> -	free_irq(irq, dev_id);
> -}
> -
> -
> -static IDE_INLINE int
> -ide_check_region(ide_ioreg_t from, unsigned int extent)
> -{
> -	return 0;
> -}
> -
> -
> -static IDE_INLINE void
> -ide_request_region(ide_ioreg_t from, unsigned int extent, const char *name)
> -{
> -}
> -
> -
> -static IDE_INLINE void
> -ide_release_region(ide_ioreg_t from, unsigned int extent)
> -{
> -}
> -
> -
>  static IDE_INLINE void
>  ide_fix_driveid(struct hd_driveid *id)
>  {
> --- linux-2.6.13-mm1-full/include/asm-parisc/ide.h.old	2005-09-02 02:05:19.000000000 +0200
> +++ linux-2.6.13-mm1-full/include/asm-parisc/ide.h	2005-09-02 02:08:39.000000000 +0200
> @@ -20,11 +20,6 @@
>  #define IDE_ARCH_OBSOLETE_INIT
>  #define ide_default_io_ctl(base)	((base) + 0x206) /* obsolete */
>  
> -#define ide_request_irq(irq,hand,flg,dev,id)	request_irq((irq),(hand),(flg),(dev),(id))
> -#define ide_free_irq(irq,dev_id)		free_irq((irq), (dev_id))
> -#define ide_check_region(from,extent)		check_region((from), (extent))
> -#define ide_request_region(from,extent,name)	request_region((from), (extent), (name))
> -#define ide_release_region(from,extent)		release_region((from), (extent))
>  /* Generic I/O and MEMIO string operations.  */
>  
>  #define __ide_insw	insw
> 
> 

-- 
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg@snapgear.com
SnapGear -- a CyberGuard Company            PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com

^ permalink raw reply

* mvme6100
From: Kiran A. Kumar @ 2005-09-05 14:09 UTC (permalink / raw)
  To: linuxppc-dev


[-- Attachment #1.1: Type: text/plain, Size: 637 bytes --]

Hi ,

 

As per following dump..i'm clueless help me out..

We r doing mvme6100 linux 2.6.7 bluecat

 

Passing control to the loaded file/image.

loaded at:     00800000start at:      00800000image begin at:  00805930image
end at   :  00990FDB 00DD5800

zimage at:     00805930 00990FDB

initrd at:     00995000 00DD5800

avail ram:     00400000 00800000

 

Linux/PPC load: console=ttyS0,9600 console=tty0 root=/dev/sda2
console=ttyS0,9600 root=/dev/ram rw

Uncompressing Linux...done.

Now booting the kernel...

 

It hangs here..plz help me what could be wrong..

 

Regards,

Kiran kumar A


[-- Attachment #1.2: Type: text/html, Size: 4230 bytes --]

[-- Attachment #2: disclaimer.txt --]
[-- Type: text/plain, Size: 1091 bytes --]

-----------------------------------------------------------------------------------------------------------------------------
Disclaimer
-----------------------------------------------------------------------------------------------------------------------------

"This message(including attachment if any)is confidential and may be privileged.Before opening attachments please check them
for viruses and defects.MindTree Consulting Private Limited (MindTree)will not be responsible for any viruses or defects or
any forwarded attachments emanating either from within MindTree or outside.If you have received this message by mistake please notify the sender by return  e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited.  Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission."

-----------------------------------------------------------------------------------------------------------------------------

^ permalink raw reply

* reboot related questions
From: Jason Chen @ 2005-09-05 14:25 UTC (permalink / raw)
  To: linuxppc-embedded

aGksYWxsLA0KSSBidWlsdCB1cCBhIHN5c3RlbSB3aGljaCBiYXNlZCBvbiBNUEM4MjQ4LDMyTSBO
T1IgZmxhc2gsMTI4TSBTRFJBTS5JIHNldCB0aGUgSFJDVyB0byBib290IGZyb20gMHgwIGFkZHJl
c3MoQ0lQID0gMCAmIEJNUz0xKTthbmQgQlIwID0gMHhmZTAweHh4eCBmb3IgZmxhc2goYmFzZSBh
ZGRyID0gMHhmZTAwMDAwMCxteSB1LWJvb3Qgd2FzIGJ1cm5lZCBmcm9tIDB4ZmUwMDAwMDApO0JS
MiA9IDB4MDAwMDAweHggZm9yIHNkcmFtKGJhc2UgYWRkciA9IDB4MDApLg0KaXQncyBPayx0aGUg
dS1ib290IGFuZCBrZXJuZWwgYWxsIHJ1biBzdWNjZXNzZnVsbHk7IGJ1dCBJIG1ldCBhIHByb2Js
ZW0gLS0gcmVib290IGNtZCBmYWlsZWQuQWZ0ZXIgc29tZSBlZmZvcnQsIEkgZm91bmQgaXQgY2Fu
IHJ1biBzdWNjZXNzZnVsbHkgYnkgbW9kaWZ5IC9saW51eC9hcmNoL3BwYy9rZXJuZWwvaGVhZC5T
IG04MjYwX2dvcm9tIGZ1bmN0aW9uIGJlbG93Og0KDQogICAgLmdsb2JsICBtODI2MF9nb3JvbSAv
KiByNCA9IGFkZHIgaW4gdGhlIHJvbSAqLw0KbTgyNjBfZ29yb206DQoJbWZtc3IJcjANCglybHdp
bm0JcjAscjAsMCwxNywxNQkvKiBjbGVhciBNU1JfRUUgaW4gcjAgKi8NCglzeW5jDQoJbXRtc3IJ
cjANCglzeW5jDQoJbWZzcHIJcjExLCBISUQwDQoJbGlzCXIxMCwgMA0KCW9yaQlyMTAscjEwLEhJ
RDBfSUNFfEhJRDBfRENFDQoJYW5kYwlyMTEsIHIxMSwgcjEwDQoJbXRzcHIJSElEMCwgcjExDQoJ
aXN5bmMNCglsaQlyNSwgTVNSXw0KCWxpcwlyNiwyZkBoDQoJYWRkaXMJcjYscjYsLUtFUk5FTEJB
U0VAaA0KCW9yaQlyNixyNiwyZkBsDQoJbXRzcHIJU1JSMCxyNg0KCW10c3ByCVNSUjEscjUNCglp
c3luYw0KCXN5bmMNCglyZmkNCjI6DQoJbXRscglyNA0KCWJscg0KICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgIA0KSW4gdGhlc2UgY29kZXMsIE1TUl8gZXF1YWwgTVNSX01FfE1TUl9S
SSBvcmlnaW5hbGx5LGFmdGVyIGJlIHNldCB0byBNU1JfTUV8TVNSX1JJfE1TUl9JUCx0aGUgcmVi
b290IGNhbiBydW4gc3VjY2Vzc2Z1bGx5Lg0KTXkgcXVlc3Rpb25zIGNvbWUgb3V0Og0KMSkgWW91
IGtub3csdGhlIGJpdCBNU1JfSVAgcmVwcmVzZW50IHRoYXQgZXhjZXB0aW9ucyBhcmUgdmVjdG9y
ZWQgdG8gdGhlIHBoeXNpY2FsIGFkZHJlc3MgMHhGRkZuX25ubm4oSVAgPSAxKSBvciAweDAwMG5f
bm5ubihJUCA9IDApO2J1dCBpbiBteSBzeXN0ZW0sdGhlIHJlYWwgZXhjZXB0aW9uIHZlY3RvciB3
YXMgc2V0IHRvIDB4ZmUwMF8weDAwLHNvIGhvdyBDUFUgY291bGQgZmluZCB0aGVtIGluIDB4RkZG
bl9ubm5uID8/DQoyKSB3aHkgbTgyNjBfZ29yb20gaGFzIHRvIHVzZWQgYSByZmkgaW5zdHJ1Y3Rp
b24/IHdoeSBub3QganVzdCB0byBzZXQgdGhlIE1TUiB0byBhcHByb3ByaWF0ZSB2YWx1ZSBhbmQg
bW92ZSBQQyB0byByb20/DQozKSB0aGVyZSBhcmUgbm90IGludGVycnVwdHMgaGFwcGVuZWQgaW4g
dS1ib290PyBCZWNhdXNlIGluIG15IHN5c3RlbSxhZnRlciByZXNldCx0aGUgQlIwIHNvb24gYmUg
Y2hhbmdlZCB0byAweGZlMDB4eHh4LGF0IHRoZSBzYW1lIHRpbWUsTVNSW2lwXSA9IDAgKEhSQ1cg
c2hvdyB0aGlzKSx0aGUgdmVjdG9yIHdpbGwgYmUgaW4gdGhlIHNkcmFtKDB4MDAwbl9ubm5uKSB3
aGVyZSBhcmUgbm90IGluaXRpYXRlZCxzbyB3aGlsZSB1LWJvb3QgcnVubmluZyx0aGVyZSBhcmUg
bm90IGludGVycnVwdHMgaGFwcGVuZWQ/IGFtIGkgcmlnaHQ/DQo0KSBhc3N1bWluZyAzKSB3YXMg
cmlnaHQsIHRoZW4gd2h5IHRoZSBtODI2MF9nb3JvbSBmdW5jdGlvbiBhYm92ZSBoYXMgdG8gc2V0
IHRoZSBNU1JfIHRvIE1TUl9NRXxNU1JfUkl8TVNSX0lQPyBCZWNhdXNlIG5vIGludGVycnVwdHMs
d2hlcmUgYXJlIHRoZSB2ZWN0b3JzIHNlZW1zIG5vdCBpbXBvcnRhbnQ/DQoNCkl0J3MgYm9yaW5n
Li4uDQoNCkphc29uDQoNCqGhoaGhoaGhoaGhoaGhDQqhoaGhoaGhoaGhoaGhoaGhDQqhoaGhoaGh
oaGhoaGhoaGhoaGhoQ0K

^ permalink raw reply

* [PATCH] ppc32: fix ocp_device_suspend to use pm_message_t instead of u32
From: Eugene Surovegin @ 2005-09-05 16:37 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linuxppc-embedded

Recent "u32 -> pm_message_t" change triggered hidden bug in 
ocp_device_suspend. Fix it to correctly use pm_message_t instead of 
u32.

Signed-off-by: Eugene Surovegin <ebs@ebshome.net>

diff --git a/arch/ppc/syslib/ocp.c b/arch/ppc/syslib/ocp.c
--- a/arch/ppc/syslib/ocp.c
+++ b/arch/ppc/syslib/ocp.c
@@ -165,7 +165,7 @@ ocp_device_remove(struct device *dev)
 }
 
 static int
-ocp_device_suspend(struct device *dev, u32 state)
+ocp_device_suspend(struct device *dev, pm_message_t state)
 {
 	struct ocp_device *ocp_dev = to_ocp_dev(dev);
 	struct ocp_driver *ocp_drv = to_ocp_drv(dev->driver);

^ permalink raw reply

* [PATCH] ppc32: add missing sysfs node for ocp_func_emac_data.phy_feat_exc
From: Eugene Surovegin @ 2005-09-05 16:46 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linuxppc-embedded

Add sysfs node for ocp_func_emac_data.phy_feat_exc field.

Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
---

 include/asm-ppc/ibm_ocp.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/asm-ppc/ibm_ocp.h b/include/asm-ppc/ibm_ocp.h
--- a/include/asm-ppc/ibm_ocp.h
+++ b/include/asm-ppc/ibm_ocp.h
@@ -84,6 +84,7 @@ OCP_SYSFS_ADDTL(struct ocp_func_emac_dat
 OCP_SYSFS_ADDTL(struct ocp_func_emac_data, "%d\n", emac, tah_idx)	\
 OCP_SYSFS_ADDTL(struct ocp_func_emac_data, "%d\n", emac, phy_mode)	\
 OCP_SYSFS_ADDTL(struct ocp_func_emac_data, "0x%08x\n", emac, phy_map)	\
+OCP_SYSFS_ADDTL(struct ocp_func_emac_data, "0x%08x\n", emac, phy_feat_exc)\
 									\
 void ocp_show_emac_data(struct device *dev)				\
 {									\
@@ -99,6 +100,7 @@ void ocp_show_emac_data(struct device *d
 	device_create_file(dev, &dev_attr_emac_tah_idx);		\
 	device_create_file(dev, &dev_attr_emac_phy_mode);		\
 	device_create_file(dev, &dev_attr_emac_phy_map);		\
+	device_create_file(dev, &dev_attr_emac_phy_feat_exc);		\
 }
 
 /*

^ permalink raw reply

* [PATCH] missed s/u32/pm_message_t/ in arch/ppc/syslib/ocp.c
From: viro @ 2005-09-06  0:44 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linuxppc-dev, linux-kernel

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
----
diff -urN RC13-git5-mga/arch/ppc/syslib/ocp.c RC13-git5-ppc44x-pm/arch/ppc/syslib/ocp.c
--- RC13-git5-mga/arch/ppc/syslib/ocp.c	2005-08-28 23:09:40.000000000 -0400
+++ RC13-git5-ppc44x-pm/arch/ppc/syslib/ocp.c	2005-09-05 16:41:17.000000000 -0400
@@ -165,7 +165,7 @@
 }
 
 static int
-ocp_device_suspend(struct device *dev, u32 state)
+ocp_device_suspend(struct device *dev, pm_message_t state)
 {
 	struct ocp_device *ocp_dev = to_ocp_dev(dev);
 	struct ocp_driver *ocp_drv = to_ocp_drv(dev->driver);

^ permalink raw reply

* Re: [PATCH] missed s/u32/pm_message_t/ in arch/ppc/syslib/ocp.c
From: Eugene Surovegin @ 2005-09-06  2:15 UTC (permalink / raw)
  To: viro; +Cc: linuxppc-dev, Linus Torvalds, linux-kernel
In-Reply-To: <20050906004423.GO5155@ZenIV.linux.org.uk>

On Tue, Sep 06, 2005 at 01:44:23AM +0100, viro@ZenIV.linux.org.uk wrote:
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ----
> diff -urN RC13-git5-mga/arch/ppc/syslib/ocp.c RC13-git5-ppc44x-pm/arch/ppc/syslib/ocp.c
> --- RC13-git5-mga/arch/ppc/syslib/ocp.c	2005-08-28 23:09:40.000000000 -0400
> +++ RC13-git5-ppc44x-pm/arch/ppc/syslib/ocp.c	2005-09-05 16:41:17.000000000 -0400
> @@ -165,7 +165,7 @@
>  }
>  
>  static int
> -ocp_device_suspend(struct device *dev, u32 state)
> +ocp_device_suspend(struct device *dev, pm_message_t state)
>  {
>  	struct ocp_device *ocp_dev = to_ocp_dev(dev);
>  	struct ocp_driver *ocp_drv = to_ocp_drv(dev->driver);
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

Identical fix is already in -mm

^ permalink raw reply

* Re: [PATCH] missed s/u32/pm_message_t/ in arch/ppc/syslib/ocp.c
From: viro @ 2005-09-06  2:27 UTC (permalink / raw)
  To: Linus Torvalds, linuxppc-dev, linux-kernel
In-Reply-To: <20050906021535.GA5512@gate.ebshome.net>

On Mon, Sep 05, 2005 at 07:15:35PM -0700, Eugene Surovegin wrote:
 
> Identical fix is already in -mm

Then it really should go upstream; obvious fixes like that are not
something that needs filtration...

^ permalink raw reply

* Re: [PATCH] missed s/u32/pm_message_t/ in arch/ppc/syslib/ocp.c
From: Eugene Surovegin @ 2005-09-06  2:38 UTC (permalink / raw)
  To: viro; +Cc: linuxppc-dev, Linus Torvalds, linux-kernel
In-Reply-To: <20050906022733.GU5155@ZenIV.linux.org.uk>

On Tue, Sep 06, 2005 at 03:27:33AM +0100, viro@ZenIV.linux.org.uk wrote:
> On Mon, Sep 05, 2005 at 07:15:35PM -0700, Eugene Surovegin wrote:
>  
> > Identical fix is already in -mm
> 
> Then it really should go upstream; obvious fixes like that are not
> something that needs filtration...

Well, it's not up to me, really - I just follow our usual patch 
submit procedure (i.e. send everything to Andrew). However, patch was 
sent today in the morning (PDT), so I think Andrew will forward it to 
Linus soon.

-- 
Eugene

^ permalink raw reply

* reboot
From: Jason Chen @ 2005-09-06  6:55 UTC (permalink / raw)
  To: linuxppc-embedded 

aGksYWxsLA0KVW5saWtlIG5vcm1hbGx5LEkgYnVpbHQgYSBNUEM4MjQ4IHN5c3RlbSB3aG9zZSB1
LWJvb3Qgc2V0IGZsYXNoIGxvY2F0aW5nIGZyb20gMHhmZTAwMDAwMCB0byAweGZlN2ZmZmZmICg4
TSksYW5kIGJ1cm5lZCB0aGUgdS1ib290IG9uIDB4ZmU3MDAwMDAuDQpUaGUgSFJDVyB3YXMgc2V0
IHRvIENJUCA9IDAgd2hpY2ggbWVhbnMgdGhhdCBleGNlcHRpb25zIGFyZSB2ZWN0b3JlZCB0byB0
aGUgcGh5c2ljYWwgYWRkcmVzcyAweEZGRm5fbm5ubi4NClRoZSB1LWJvb3QgYW5kIGtlcm5lbCBy
dW4gc3VjY2Vzc2Z1bGx5LGJ1dCBmYWlsZWQgd2hpbGUgZXhlY3V0ZSB0aGUgY29tbWFuZCByZWJv
b3QuSSBmb3VuZCBrZXJuZWwgcnVuIG04MjYwX2dvcm9tICBiZWxvdyBhdCB0aGUgZW5kIG9mIHJl
Ym9vdCBiZSBjYWxsZWQuSW4gdGhlc2UgY29kZXMsIE1TUl8gZXF1YWwgTVNSX01FfE1TUl9SSSBv
cmlnaW5hbGx5LGFmdGVyIGJlIHNldCB0byBNU1JfTUV8TVNSX1JJfE1TUl9JUCx0aGUgcmVib290
IGNhbiBydW4gc3VjY2Vzc2Z1bGx5Lg0KSSB3YW5uYSBhc2ssaW4gdGhpcyBjYXNlLCBpcyB0aGVy
ZSBhIHJlc2V0IGFjdGlvbj8gaWYgdGhlcmUgaXMsIHdoYXQgY2F1c2UgaXQ/IGlmIHRoZXJlIGlz
J250LCB0aGUgY3B1IHJ1biB0byBmbGFzaCgweGZlNzAwMTAwKSBkaXJlY3RseSx0aGVuIHdoeSBN
U1JbaXBdIGhhcyB0byBiZSBzZXQgdG8gMT8gYmVjYXVzZSBpbiBteSBzeXN0ZW0sIGV4Y2VwdGlv
bnMgYWRkcmVzcyAweGZmZm5fbm5ubiBkaWQgbm90IGV4aXN0IGF0IGFsbC4NCkFuZCBtb3JlLHdo
eSBteSB1LWJvb3QgY291bGQgcnVuIHN1Y2Nlc3NmdWxseSB3aGlsZSBNU1JbaXBdID0gMSBidXQg
cmVhbCBleGNlcHRpb24gdmVjdG9ycyBsb2NhdGUgYXQgMHhmZTAwXzBuMDA/DQoNCiAgICAuZ2xv
YmwgIG04MjYwX2dvcm9tIC8qIHI0ID0gYWRkciBpbiB0aGUgcm9tLGkgc2V0IGl0IHRvIDB4ZmU3
MDAxMDAgKi8NCm04MjYwX2dvcm9tOg0KCW1mbXNyCXIwDQoJcmx3aW5tCXIwLHIwLDAsMTcsMTUJ
LyogY2xlYXIgTVNSX0VFIGluIHIwICovDQoJc3luYw0KCW10bXNyCXIwDQoJc3luYw0KCW1mc3By
CXIxMSwgSElEMA0KCWxpcwlyMTAsIDANCglvcmkJcjEwLHIxMCxISUQwX0lDRXxISUQwX0RDRQ0K
CWFuZGMJcjExLCByMTEsIHIxMA0KCW10c3ByCUhJRDAsIHIxMQ0KCWlzeW5jDQoJbGkJcjUsIE1T
Ul8NCglsaXMJcjYsMmZAaA0KCWFkZGlzCXI2LHI2LC1LRVJORUxCQVNFQGgNCglvcmkJcjYscjYs
MmZAbA0KCW10c3ByCVNSUjAscjYNCgltdHNwcglTUlIxLHI1DQoJaXN5bmMNCglzeW5jDQoJcmZp
DQoyOg0KCW10bHIJcjQNCglibHINCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAN
ClRoYW5rcyB2ZXJ5IG11Y2ghDQpKYXNvbg0KoaGhoaGhoaGhoaGhoaGhoQ0KoaGhoaGhoaGhoaGh
oaGhoaGhoaENCg==

^ permalink raw reply

* oil press
From: mach @ 2005-09-06  7:37 UTC (permalink / raw)
  To: linuxppc-dev

Dear Sir/Madam,
It's our pleasure to send the business letter to your esteemed company. We are a professional trading company in 
China. In the past ten years, our grain and oil machinery were exported   to many countries and areas in the world 
,and have won a good reputation from our customers .
I am very glad to get the e-mail address by Internet. So we specially introduce  our oil press equipment and oil 
refining equipment and hulling equipment and other agricultural machinery to satisfy your needs. We hope to build a 
mutual beneficial business relationship with your esteemed company.
The quotation of our extraction machinery as follows:

1)Model 6YL-68
  Capacity: 0.8-1ton/24h.
  Power: 5.5kw
  Net  Weight: 140kg
  Packing Dimensions: 920*480*760

2) Model 6YL-80
   Capacity: 2-3ton/24h
   Power: 5.5kw
   Net Weight: 330kg
   Packing Dimensions(mm): 1370*570*1080

3) Model 6YL-95    
Capacity: 3-4ton/24h.
    Power: 7.5-11kw
    Net Weight: 620kg
    Packing Dimensions(mm):1940*700*780

4) Model 6YL-100
 Capacity: 4-5Ton/24h.
    Power: 7.5kw
    Net  Weight: 480kg
    Packing Dimensions(mm):1700*600*1130

5) 6YL-120
   Capacity: 6Ton/24h.
   Power: 15kw
   Net Weight: 650kg
   Packing Dimensions (mm): 1970*700*780

6) 6YL-80A Integrated oil press
     Capacity: 2-3Ton/24h
    Power:  5.5 +0.75kw
    Net Weight: 520kg
    Packing Dimensions(mm): 1420*635*1480 & 1135*530*520

7) 6YL-100A Integrated Oil press  
     Capacity: 5Ton/24h.
    Power: 7.5+1.1 kw
    Net Weight: 780kg
    Packing dimensions (mm): 2270*1100*1950 & 1170*660*760

8) LYZX18 Cold Press Expeller
    Capacity: 6-10Ton/24h(taking non-shell rapeseed as an example)
    Residual Oil Content in Cake: 4-13%
    Total Power: 27.2KW
    Net Weight: 3500KG
    Boundary Dimensions(mm): 3176*1850*2600 

9) 202-3 Screw Pre-press Expeller
     Capacity: 45-50Ton/24h(sunflower kernel or rapeseed serving as an example)
    Residual Oil Content in Cake: 13% approx(under normal conditions)
    Electric Motor: Y225-M-6,1000R.P.M.30KW.220/380V,50Hz
    Net Weight: 5500KG.approx
    Boundary Dimensions(mm): 2900*1850*3640

10) ZY283-3 Screw Pre-press Expeller
      Capacity: 140-460Ton/24h(sunflower kernel or rapeseed serving as an example)
     Residual Oil Content in Cake: 15-20%(under the normal conditions)
     Total Power: 55KW  15KW
     Net Weight: 9380KG.approx
     Boundary Dimensions(mm): 3708*1920*3843

11) Generator
 950 Generator
 3900 Generator
 7800 Generator
 
12) Peanut Sheller

Model 6B-180
 Capacity: 7.2 Ton/24h.
 Power: 1.5kw
 Net  Weight: 100kg
 Packing Dimensions: 1280*670*1200

Model 6BH-45
 Capacity: 12 Ton/24h.
 Power: 4kw
 Net  Weight: 380kg
 Packing Dimensions: 1200*990*2090

Model 6BH-65
 Capacity: 24 Ton/24h.
 Power: 7.5kw
 Net  Weight: 700kg
 Packing Dimensions: 2000*1400*3010

13) Rice Mill

14) Flour Mill

15) Combine Harvest

16) Tractor

17) The Complete Plant of Hulling Sesame Equipment
18) The Complete Plant of All Kinds of Oil Corps(Extraction and Refinery), 10MTPD-3000MTPD
19) The Complete Plant of Tomato Paste
If you want to get further information that you are interested in products, please send me 
the concrete request, I will do my best to supply you with the satisfying service with the 
competitive price.

I will appreciate you very much, if I can receive your reply.

Best regards 
 
Alisa Zhao
Anyang General International Trading Co., Ltd. 
Address: Jiefang Rd No.99,Anyang , Henan, China 
Tel:86-372-5953961   Fax:86-372-5951936 
E-mail:mach@e-century.com.cn 
http://www.ayimpex.com 

^ permalink raw reply

* PCI on MPC827x
From: Alex Zeffertt @ 2005-09-06 12:31 UTC (permalink / raw)
  To: linuxppc-embedded

Hi list,

Does the linuxppc kernel support PCI on PowerQUICC II chips?  If so, in which patch/release was it
added?

Thanks in advance,

Alex

^ permalink raw reply

* Re: PCI on MPC827x
From: Vitaly Bordug @ 2005-09-06 12:45 UTC (permalink / raw)
  To: Alex Zeffertt; +Cc: linuxppc-embedded
In-Reply-To: <20050906133122.225a0922.ajz@cambridgebroadband.com>

Alex Zeffertt wrote:
> Hi list,
> 
> Does the linuxppc kernel support PCI on PowerQUICC II chips?  If so, in which patch/release was it
> added?
> 
The PCI bridge for 8272ADS has been added in 2.6.12-rc6. This stuff 
should work on PQ2FADS as well.


-- 
Sincerely,
Vitaly

^ permalink raw reply

* Regarding the PPC board bringup with Linux 2.6 kernel
From: vinay hegde @ 2005-09-06 13:00 UTC (permalink / raw)
  To: linuxppc-embedded

Hi All,
  
I am working on bringing up a PowerPC based board
with Linux 2.6 kernel (Board supoort package).
However, I am facing some problem with respect to
debugging.
 
When I boot the board with the Linux kernel (BSP),
the board hangs after printing the following
information.
  
>>>>>>>>>>>>>>>>>>>>>>>

Network Loading from: /dev/enet0 

Client IP Address      = 192.168.4.38 
Server IP Address      = 192.168.4.101 
Gateway IP Address     = 192.168.4.253 
Subnet IP Address Mask = 255.255.255.0 
Boot File Name         = developer.kdi 
Load Address           = 04000000 
Buffer Size = 2000000 

Network Boot File Load Start - Press <ESC> to
Bypass, <SPC> to Continue 


Bytes Received =&6141952, Bytes Loaded =&6141952 
Bytes/Second   =&511829, Elapsed Time =12 Second(s) 

Boot Device       =/dev/enet0 
Boot File         =developer.kdi 
Load Address      =04000000 
Load Size         =005DB800 
Execution Address =04000020 
Execution Offset  =00000020 

Passing control to the loaded file/image. 
loaded at:     00800000 00DD8800 
zimage at:     008058E0 009933BB 
initrd at:     00998000 00DD8800 
avail ram:     00400000 00800000 

Linux/PPC load: console=ttyS0,9600 console=tty0
root=/dev/sda2  console=ttyS0,9600 root=/dev/ram rw 
Uncompressing Linux...done. 
Now booting the kernel 
 
 
>>>>>>>>>>>>>>>>>>>>>. 

I am going through the source code to figure out the
problem, but unable to find out what is going wrong
here.
 
Does anybody have any idea about the problem? Also,
is it possible to print some debug messages at this
point of booting? {Note that, in the early stage of
booting process the serial is initialized and all
the above mentioned messages (like Uncomressing
Linux, Now booting the kernel etc) are printed. And
immediately after printing the "now booting the
kernel message,the serial is closed. This code is in
uncompress_kernel() function in
arch/ppc/boot/simple/misc.c file).

Can somebody help me with the above problem?

Thank you,
vinay hegde.


	

	
		
__________________________________________________________ 
Yahoo! India Matrimony: Find your partner online. Go to http://yahoo.shaadi.com

^ permalink raw reply

* Re: PCI on MPC827x
From: Alex Zeffertt @ 2005-09-06 13:48 UTC (permalink / raw)
  To: Vitaly Bordug; +Cc: linuxppc-embedded
In-Reply-To: <431D8F5B.9050803@ru.mvista.com>

On Tue, 06 Sep 2005 16:45:15 +0400
Vitaly Bordug <vbordug@ru.mvista.com> wrote:

> Alex Zeffertt wrote:
> > Hi list,
> > 
> > Does the linuxppc kernel support PCI on PowerQUICC II chips?  If so, in which patch/release was
> > it added?
> > 
> The PCI bridge for 8272ADS has been added in 2.6.12-rc6. This stuff 
> should work on PQ2FADS as well.
 
Thanks Vitaly.  Unfortunately we're using linux-2.4.25.

Has anybody backported the PCI bridge to 2.4?  If not, do you think it's a lot of work?

Alex

^ permalink raw reply

* Re: PCI on MPC827x
From: Vitaly Bordug @ 2005-09-06 14:04 UTC (permalink / raw)
  To: Alex Zeffertt; +Cc: linuxppc-embedded
In-Reply-To: <20050906144845.1e603c72.ajz@cambridgebroadband.com>

[-- Attachment #1: Type: text/plain, Size: 963 bytes --]

Alex Zeffertt wrote:
> On Tue, 06 Sep 2005 16:45:15 +0400
> Vitaly Bordug <vbordug@ru.mvista.com> wrote:
> 
> 
>>Alex Zeffertt wrote:
>>
>>>Hi list,
>>>
>>>Does the linuxppc kernel support PCI on PowerQUICC II chips?  If so, in which patch/release was
>>>it added?
>>>
>>
>>The PCI bridge for 8272ADS has been added in 2.6.12-rc6. This stuff 
>>should work on PQ2FADS as well.
> 
>  
> Thanks Vitaly.  Unfortunately we're using linux-2.4.25.
> 
> Has anybody backported the PCI bridge to 2.4?  If not, do you think it's a lot of work?
> 
> Alex
> 
> 
I've done it already. The source was in the latest linux-2.4, at the end 
of the bitkeeper times (I guess rsync copy from source.mvista.com is 
still available - refer to http://penguinppc.org/kernel/ for details).

This is one of the latest versions - AFAIR there were one issue on 
PQ2FADS that's not fixed here. Also, you may search list archives  - the 
patch should be there as well.

-- 
Sincerely,
Vitaly

[-- Attachment #2: pq2-pci.patch --]
[-- Type: text/x-patch, Size: 20111 bytes --]

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/02/18 17:11:57+03:00 vbordug@ru.mvista.com 
#   Fixed compilation warnings for 8260-like boards when CONFIG_PCI=y
# 
# include/asm-ppc/mpc8260.h
#   2005/02/18 17:11:54+03:00 vbordug@ru.mvista.com +2 -0
#   Fixed compilation warnings when CONFIG_PCI=y
# 
# ChangeSet
#   2005/02/18 16:17:49+03:00 vbordug@ru.mvista.com 
#   Added support for PCI bridge on MPC8272 and PQ2FADS boards
# 
# arch/ppc/platforms/pq2ads.h
#   2005/02/18 16:17:47+03:00 vbordug@ru.mvista.com +88 -5
#   Added support for PCI bridge on MPC8272 and PQ2FADS
# 
# arch/ppc/platforms/Makefile
#   2005/02/18 16:17:47+03:00 vbordug@ru.mvista.com +5 -0
#   Added support for PCI bridge on MPC8272 and PQ2FADS
# 
# arch/ppc/kernel/m8260_setup.c
#   2005/02/18 16:17:47+03:00 vbordug@ru.mvista.com +17 -0
#   Added support for PCI bridge on MPC8272 and PQ2FADS
# 
# arch/ppc/kernel/Makefile
#   2005/02/18 16:17:47+03:00 vbordug@ru.mvista.com +8 -0
#   Modules needed for PCI Bridge support on MPC8272 and PQ2FADS
# 
# arch/ppc/platforms/pq2ads_pci.c
#   2005/02/18 16:15:29+03:00 vbordug@ru.mvista.com +361 -0
#   PCI Bridge setup routines for MPC8272ADS and PQ2FADS (initial revision)
# 
# arch/ppc/platforms/pq2ads_pci.c
#   2005/02/18 16:15:29+03:00 vbordug@ru.mvista.com +0 -0
#   BitKeeper file /home/common/work/community/kernel/linuxppc-2.4/arch/ppc/platforms/pq2ads_pci.c
# 
diff -Nru a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile
--- a/arch/ppc/kernel/Makefile	2005-02-18 17:14:12 +03:00
+++ b/arch/ppc/kernel/Makefile	2005-02-18 17:14:12 +03:00
@@ -108,6 +108,14 @@
 obj-$(CONFIG_PCI)		+= indirect_pci.o pci_auto.o
 endif
 
+ifeq ($(CONFIG_ADS8272),y)
+obj-$(CONFIG_PCI)		+= indirect_pci.o pci_auto.o
+endif
+
+ifeq ($(CONFIG_PQ2FADS),y)
+obj-$(CONFIG_PCI)		+= indirect_pci.o pci_auto.o
+endif
+
 include $(TOPDIR)/Rules.make
 
 entry.o: entry.S ppc_defs.h
diff -Nru a/arch/ppc/kernel/m8260_setup.c b/arch/ppc/kernel/m8260_setup.c
--- a/arch/ppc/kernel/m8260_setup.c	2005-02-18 17:14:12 +03:00
+++ b/arch/ppc/kernel/m8260_setup.c	2005-02-18 17:14:12 +03:00
@@ -54,6 +54,7 @@
 unsigned char __res[sizeof(bd_t)];
 
 extern void cpm2_reset(void);
+extern void pq2ads_init_irq(void);
 
 static void __init
 m8260_setup_arch(void)
@@ -61,6 +62,12 @@
 	/* Reset the Communication Processor Module.
 	*/
 	cpm2_reset();
+
+#ifdef CONFIG_PCI
+	/* Lookup PCI host bridges */
+	m8260_find_bridges();
+#endif
+
 }
 
 static void
@@ -184,6 +191,13 @@
 	cpm2_immr->im_intctl.ic_siprr = 0x05309770;
 	cpm2_immr->im_intctl.ic_scprrh = 0x05309770;
 	cpm2_immr->im_intctl.ic_scprrl = 0x05309770;
+#if defined (CONFIG_PCI) && ( defined (CONFIG_ADS8272) || defined (CONFIG_PQ2FADS) )
+	/* Install the handlers for the external interrupt controller on the
+	 * MPC8272ADS and PQ2FADS boards.
+	 */
+	pq2ads_init_irq();
+#endif
+
 
 }
 
@@ -209,6 +223,9 @@
 static void __init
 m8260_map_io(void)
 {
+#if defined (CONFIG_PCI) && ( defined (CONFIG_ADS8272) || defined (CONFIG_PQ2FADS) )
+	io_block_mapping(0x80000000, 0x80000000, 0x10000000, _PAGE_IO);
+#endif
 	io_block_mapping(0xf0000000, 0xf0000000, 0x10000000, _PAGE_IO);
 	io_block_mapping(0xe0000000, 0xe0000000, 0x10000000, _PAGE_IO);
 }
diff -Nru a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile
--- a/arch/ppc/platforms/Makefile	2005-02-18 17:14:12 +03:00
+++ b/arch/ppc/platforms/Makefile	2005-02-18 17:14:12 +03:00
@@ -98,6 +98,11 @@
 obj-$(CONFIG_MPC85xx_CDS)	+= mpc85xx_cds_common.o
 endif
 
+ifeq ($(CONFIG_PCI),y)
+obj-$(CONFIG_ADS8272)		+= pq2ads_pci.o 
+obj-$(CONFIG_PQ2FADS)		+= pq2ads_pci.o 
+endif
+
 ifeq ($(CONFIG_SMP),y)
 obj-$(CONFIG_ALL_PPC)		+= pmac_smp.o chrp_smp.o
 endif
diff -Nru a/arch/ppc/platforms/pq2ads.h b/arch/ppc/platforms/pq2ads.h
--- a/arch/ppc/platforms/pq2ads.h	2005-02-18 17:14:12 +03:00
+++ b/arch/ppc/platforms/pq2ads.h	2005-02-18 17:14:12 +03:00
@@ -14,6 +14,10 @@
 
 #include <asm/ppcboot.h>
 
+#ifdef CONFIG_PCI
+#include <linux/pci_ids.h>
+#endif
+
 /* Memory map is configured by the PROM startup.
  * We just map a few things we need.  The CSR is actually 4 byte-wide
  * registers that can be accessed as 8-, 16-, or 32-bit values.
@@ -40,7 +44,79 @@
 
 #define PHY_INTERRUPT	SIU_INT_IRQ7
 
+/*-----------------------------------------------------------------------
+ * SIUMCR - SIU Module Configuration Register				 4-31
+ */
+#define SIUMCR_BBD	0x80000000	/* Bus Busy Disable		*/
+#define SIUMCR_ESE	0x40000000	/* External Snoop Enable	*/
+#define SIUMCR_PBSE	0x20000000	/* Parity Byte Select Enable	*/
+#define SIUMCR_CDIS	0x10000000	/* Core Disable			*/
+#define SIUMCR_DPPC00	0x00000000	/* Data Parity Pins Configuration*/
+#define SIUMCR_DPPC01	0x04000000	/* - " -			*/
+#define SIUMCR_DPPC10	0x08000000	/* - " -			*/
+#define SIUMCR_DPPC11	0x0c000000	/* - " -			*/
+#define SIUMCR_L2CPC00	0x00000000	/* L2 Cache Pins Configuration	*/
+#define SIUMCR_L2CPC01	0x01000000	/* - " -			*/
+#define SIUMCR_L2CPC10	0x02000000	/* - " -			*/
+#define SIUMCR_L2CPC11	0x03000000	/* - " -			*/
+#define SIUMCR_LBPC00	0x00000000	/* Local Bus Pins Configuration	*/
+#define SIUMCR_LBPC01	0x00400000	/* - " -			*/
+#define SIUMCR_LBPC10	0x00800000	/* - " -			*/
+#define SIUMCR_LBPC11	0x00c00000	/* - " -			*/
+#define SIUMCR_APPC00	0x00000000	/* Address Parity Pins Configuration*/
+#define SIUMCR_APPC01	0x00100000	/* - " -			*/
+#define SIUMCR_APPC10	0x00200000	/* - " -			*/
+#define SIUMCR_APPC11	0x00300000	/* - " -			*/
+#define SIUMCR_CS10PC00	0x00000000	/* CS10 Pin Configuration	*/
+#define SIUMCR_CS10PC01	0x00040000	/* - " -			*/
+#define SIUMCR_CS10PC10	0x00080000	/* - " -			*/
+#define SIUMCR_CS10PC11	0x000c0000	/* - " -			*/
+#define SIUMCR_BCTLC00	0x00000000	/* Buffer Control Configuration	*/
+#define SIUMCR_BCTLC01	0x00010000	/* - " -			*/
+#define SIUMCR_BCTLC10	0x00020000	/* - " -			*/
+#define SIUMCR_BCTLC11	0x00030000	/* - " -			*/
+#define SIUMCR_MMR00	0x00000000	/* Mask Masters Requests	*/
+#define SIUMCR_MMR01	0x00004000	/* - " -			*/
+#define SIUMCR_MMR10	0x00008000	/* - " -			*/
+#define SIUMCR_MMR11	0x0000c000	/* - " -			*/
+#define SIUMCR_LPBSE	0x00002000	/* LocalBus Parity Byte Select Enable*/
+
+
 #ifdef CONFIG_PCI
+/*
+ * Define the vendor/device ID for the MPC82XX.
+ */
+#define	PCI_DEVICE_ID_MPC8265	((0x18C0 << 16) | PCI_VENDOR_ID_MOTOROLA)
+#define	PCI_DEVICE_ID_MPC8272	((0x18C1 << 16) | PCI_VENDOR_ID_MOTOROLA)
+
+
+/* Bit definitions for PCIBR registers */
+
+#define PCIBR_ENABLE        	0x00000001
+
+/* Bit definitions for POMCR registers */
+#define POCMR_ENABLE        	0x80000000
+#define POCMR_PCI_IO        	0x40000000
+#define POCMR_PREFETCH_EN   	0x20000000
+#define POTA_ADDR_SHIFT	    	12
+
+/* Bit definitions for PCI Inbound Comparison Mask registers */
+#define PICMR_ENABLE        	0x80000000
+#define PICMR_NO_SNOOP_EN   	0x40000000
+#define PICMR_PREFETCH_EN   	0x20000000
+#define PITA_ADDR_SHIFT	    	12
+
+/* Bit definitions for PCI_GCR register */
+
+#define PCIGCR_PCI_BUS_EN   	0x1
+
+/* Bus parking decides where the bus control sits when idle */
+/* If modifying memory controllers for PCI park on the core */
+
+#define PPC_ACR_BUS_PARK_CORE 	0x6
+#define PPC_ACR_BUS_PARK_PCI  	0x3
+
+
 /* PCI interrupt controller */
 #define PCI_INT_STAT_REG	0xF8200000
 #define PCI_INT_MASK_REG	0xF8200004
@@ -50,22 +126,23 @@
 #define PIRQD			(NR_SIU_INTS + 3)
 
 /*
- * PCI memory map definitions for MPC8266ADS-PCI.
+ * PCI memory map definitions for MPC82XXADS.
  *
  * processor view
  *	local address		PCI address		target
  *	0x80000000-0x9FFFFFFF	0x80000000-0x9FFFFFFF	PCI mem with prefetch
  *	0xA0000000-0xBFFFFFFF	0xA0000000-0xBFFFFFFF	PCI mem w/o prefetch
- *	0xF4000000-0xF7FFFFFF	0x00000000-0x03FFFFFF	PCI IO
+ *	0xF6000000-0xF7FFFFFF	0x00000000-0x01FFFFFF	PCI IO
  *
  * PCI master view
  *	local address		PCI address		target
- *	0x00000000-0x1FFFFFFF	0x00000000-0x1FFFFFFF	MPC8266 local memory
+ *	0x00000000-0x1FFFFFFF	0x00000000-0x1FFFFFFF	MPC82XXADS local memory
  */
 
 /* window for a PCI master to access MPC8266 memory */
 #define PCI_SLV_MEM_LOCAL	0x00000000	/* Local base */
 #define PCI_SLV_MEM_BUS		0x00000000	/* PCI base */
+#define PCI_SLV_MEM_SIZE	0x10000000	/* 256Mb */
 
 /* window for the processor to access PCI memory with prefetching */
 #define PCI_MSTR_MEM_LOCAL	0x80000000	/* Local base */
@@ -78,9 +155,15 @@
 #define PCI_MSTR_MEMIO_SIZE	0x20000000	/* 512MB */
 
 /* window for the processor to access PCI I/O */
-#define PCI_MSTR_IO_LOCAL	0xF4000000	/* Local base */
+#define PCI_MSTR_IO_LOCAL	0xF6000000	/* Local base */
 #define PCI_MSTR_IO_BUS         0x00000000	/* PCI base   */
-#define PCI_MSTR_IO_SIZE        0x04000000	/* 64MB */
+#define PCI_MSTR_IO_SIZE        0x02000000	/* 32MB */
+
+#if defined CONFIG_ADS8272
+#define PCI_INT_TO_SIU		SIU_INT_IRQ2
+#elif defined CONFIG_PQ2FADS
+#define PCI_INT_TO_SIU		SIU_INT_IRQ6
+#endif
 
 #define _IO_BASE		PCI_MSTR_IO_LOCAL
 #define _ISA_MEM_BASE		PCI_MSTR_MEMIO_LOCAL
diff -Nru a/arch/ppc/platforms/pq2ads_pci.c b/arch/ppc/platforms/pq2ads_pci.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/platforms/pq2ads_pci.c	2005-02-18 17:14:12 +03:00
@@ -0,0 +1,361 @@
+/*
+ * arch/ppc/platforms/pq2fads_pci.c
+ * 
+ * PCI Bridge setup routines for MPC8272 and PQ2FADS boards
+ * 
+ * Based on: PCI setup routines for the Motorola SPS MPC8266ADS-PCI 
+ * reference board by andy_lowe@mvista.com
+ *
+ * Author: Vitaly Bordug <vbordug@ru.mvista.com>
+ *
+ * 2003 (c) MontaVista Software, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
+#include <linux/irq.h>
+
+#include <asm/byteorder.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/uaccess.h>
+#include <asm/machdep.h>
+#include <asm/pci-bridge.h>
+#include <asm/immap_cpm2.h>
+//#include <asm/m8260_pci.h>
+#include <asm/delay.h>
+
+#include "pq2ads.h"
+
+extern void setup_m8260_indirect_pci(struct pci_controller* hose,
+				     u32 cfg_addr,
+				     u32 cfg_data);
+
+/*
+ * interrupt routing
+ */
+
+static inline int
+pq2ads_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
+{
+	static char pci_irq_table[][4] =
+	/*
+	 *	PCI IDSEL/INTPIN->INTLINE
+	 * 	  A      B      C      D
+	 */
+	{
+		{ PIRQA, PIRQB, PIRQC, PIRQD },	/* IDSEL 22 - PCI slot 0 */
+		{ PIRQD, PIRQA, PIRQB, PIRQC },	/* IDSEL 23 - PCI slot 1 */
+		{ PIRQC, PIRQD, PIRQA, PIRQB },	/* IDSEL 24 - PCI slot 2 */
+	};
+
+	const long min_idsel = 22, max_idsel = 24, irqs_per_slot = 4;
+	return PCI_IRQ_TABLE_LOOKUP;
+}
+
+static void
+pq2ads_mask_irq(unsigned int irq)
+{
+	int bit = irq - NR_SIU_INTS;
+
+	*(volatile unsigned long *) PCI_INT_MASK_REG |=  (1 << (31 - bit));
+	return;
+}
+
+static void
+pq2ads_unmask_irq(unsigned int irq)
+{
+	int bit = irq - NR_SIU_INTS;
+
+	*(volatile unsigned long *) PCI_INT_MASK_REG &= ~(1 << (31 - bit));
+	return;
+}
+
+static void
+pq2ads_mask_and_ack(unsigned int irq)
+{
+	int bit = irq - NR_SIU_INTS;
+
+	*(volatile unsigned long *) PCI_INT_MASK_REG |=  (1 << (31 - bit));
+	return;
+}
+
+static void
+pq2ads_end_irq(unsigned int irq)
+{
+	int bit = irq - NR_SIU_INTS;
+
+	*(volatile unsigned long *) PCI_INT_MASK_REG &= ~(1 << (31 - bit));
+	return;
+}
+
+struct hw_interrupt_type pq2ads_ic = {
+	"PQ2ADS PCI IC",
+	NULL,
+	NULL,
+	pq2ads_unmask_irq,
+	pq2ads_mask_irq,
+	pq2ads_mask_and_ack,
+	pq2ads_end_irq,
+	0
+};
+
+static void
+pci_irq_demux(int irq, void *dev_id, struct pt_regs *regs)
+{
+	unsigned long stat, mask, pend;
+	int bit;
+
+	for(;;) {
+		stat = *(volatile unsigned long *) PCI_INT_STAT_REG;
+		mask = *(volatile unsigned long *) PCI_INT_MASK_REG;
+		pend = stat & ~mask & 0xf0000000;
+		if (!pend)
+			break;
+		for (bit = 0; pend != 0; ++bit, pend <<= 1) {
+			if (pend & 0x80000000)
+				ppc_irq_dispatch_handler(regs, NR_SIU_INTS + bit);
+		}
+	}
+
+	return;
+}
+
+void
+pq2ads_init_irq(void)
+{
+	int irq;
+	volatile cpm2_map_t* immap = cpm2_immr;
+#ifdef CONFIG_ADS8272
+	/* configure chip select for PCI interrupt controller */
+	immap->im_memctl.memc_br3 = PCI_INT_STAT_REG | 0x00001801;
+	immap->im_memctl.memc_or3 = 0xffff8010;
+#elif defined CONFIG_PQ2FADS
+	/* configure chip select for PCI interrupt controller */
+	immap->im_memctl.memc_br8 = PCI_INT_STAT_REG | 0x00001801;
+	immap->im_memctl.memc_or8 = 0xffff8010;
+#else
+#error This software is not intended to support this chip!
+#endif
+
+	for (irq = NR_SIU_INTS; irq < NR_SIU_INTS + 4; irq++)
+                irq_desc[irq].handler = &pq2ads_ic;
+
+	/* make PCI IRQ level sensitive */ 
+	immap->im_intctl.ic_siexr &=
+		~(1 << (14 - (PCI_INT_TO_SIU - SIU_INT_IRQ1)));
+	
+	/* mask all PCI interrupts */
+	*(volatile unsigned long *) PCI_INT_MASK_REG |= 0xfff00000;
+
+	/* install the demultiplexer for the PCI cascade interrupt */
+	if (request_irq(PCI_INT_TO_SIU, pci_irq_demux, SA_INTERRUPT, 
+		"PCI IRQ demux", 0))
+	{
+		printk("Installation of PCI IRQ demux handler failed.\n");
+	}
+	return;
+}
+
+static int                     
+pq2ads_exclude_device(u_char bus, u_char devfn)
+{
+	return PCIBIOS_SUCCESSFUL;
+}
+
+static void 
+pq2ads_hw_init(struct pci_controller *hose)
+{
+	__u32 val;
+	volatile cpm2_map_t *immap = cpm2_immr;
+	/* PCI int lowest prio  */
+	/* Each 4 bits is a device bus request      and the MS 4bits
+	   is highest priority */
+	/* Bus                4bit value
+	   ---                ----------
+	   CPM high      	0b0000
+	   CPM middle           0b0001
+	   CPM low       	0b0010
+	   PCI reguest          0b0011
+	   Reserved      	0b0100
+	   Reserved      	0b0101
+	   Internal Core     	0b0110
+	   External Master 1 	0b0111
+	   External Master 2 	0b1000
+	   External Master 3 	0b1001
+	   The rest are reserved 
+	 */
+	immap->im_siu_conf.siu_82xx.sc_ppc_alrh = 0x61207893;
+	/* park bus on core  */
+	immap->im_siu_conf.siu_82xx.sc_ppc_acr = PPC_ACR_BUS_PARK_CORE;
+	/*
+	 * Set up master windows that allow the CPU to access PCI space. These
+	 * windows are set up using the two SIU PCIBR registers.
+	 */
+
+	immap->im_memctl.memc_pcimsk0 = ~(PCI_MSTR_IO_SIZE - 1U);
+	immap->im_memctl.memc_pcibr0  = PCI_MSTR_IO_LOCAL | PCIBR_ENABLE;
+	
+	immap->im_memctl.memc_pcimsk1 = ~(PCI_MSTR_MEM_SIZE + PCI_MSTR_MEMIO_SIZE - 1U);
+	immap->im_memctl.memc_pcibr1  = PCI_MSTR_MEM_LOCAL | PCIBR_ENABLE;
+#ifdef CONFIG_ADS8272
+	immap->im_siu_conf.siu_82xx.sc_siumcr = (immap->im_siu_conf.siu_82xx.sc_siumcr &
+				~SIUMCR_BBD &
+				~SIUMCR_ESE &
+				~SIUMCR_PBSE &
+				~SIUMCR_CDIS &
+				~SIUMCR_DPPC11 &
+				~SIUMCR_L2CPC11 &
+				~SIUMCR_LBPC11 &
+				~SIUMCR_APPC11 &
+				~SIUMCR_CS10PC11 &
+				~SIUMCR_BCTLC11 &
+				~SIUMCR_MMR11)
+			| SIUMCR_DPPC11 | SIUMCR_L2CPC01 | SIUMCR_LBPC00
+			| SIUMCR_APPC10 | SIUMCR_CS10PC00 | SIUMCR_BCTLC00 | SIUMCR_MMR11;
+#elif defined CONFIG_PQ2FADS
+	/*
+	 * Setting required to enable IRQ1-IRQ7 (SIUMCR [DPPC]),
+	 * and local bus for PCI (SIUMCR [LBPC]).
+	 */
+	immap->im_siu_conf.siu_82xx.sc_siumcr = (immap->im_siu_conf.sc_siumcr &
+				~SIUMCR_LBPC11 &
+				~SIUMCR_CS10PC11 &
+				~SIUMCR_LBPC11) |
+				SIUMCR_LBPC01 | SIUMCR_CS10PC01 | SIUMCR_APPC10;
+#endif
+        /* Enable PCI  */
+	immap->im_pci.pci_gcr = cpu_to_le32(PCIGCR_PCI_BUS_EN);
+	{
+	    /* give it some time */
+	    int i;
+	    for(i=0;i<100;i++)
+		udelay(100);
+	}	
+	
+	/* setup ATU registers */
+	immap->im_pci.pci_pocmr0 = cpu_to_le32(POCMR_ENABLE | POCMR_PCI_IO |
+	                  ((~(PCI_MSTR_IO_SIZE - 1U)) >> POTA_ADDR_SHIFT));
+	immap->im_pci.pci_potar0 = cpu_to_le32(PCI_MSTR_IO_BUS >> POTA_ADDR_SHIFT);
+	immap->im_pci.pci_pobar0 = cpu_to_le32(PCI_MSTR_IO_LOCAL >> POTA_ADDR_SHIFT);
+
+	/* Set-up non-prefetchable window */
+	immap->im_pci.pci_pocmr1 = cpu_to_le32(POCMR_ENABLE | ((~(PCI_MSTR_MEMIO_SIZE-1U)) >> POTA_ADDR_SHIFT));
+	immap->im_pci.pci_potar1 = cpu_to_le32(PCI_MSTR_MEMIO_BUS >> POTA_ADDR_SHIFT);
+	immap->im_pci.pci_pobar1 = cpu_to_le32(PCI_MSTR_MEMIO_LOCAL >> POTA_ADDR_SHIFT);
+
+	/* Set-up prefetchable window */
+	immap->im_pci.pci_pocmr2 = cpu_to_le32(POCMR_ENABLE |POCMR_PREFETCH_EN |
+                  (~(PCI_MSTR_MEM_SIZE-1U) >> POTA_ADDR_SHIFT));
+	immap->im_pci.pci_potar2 = cpu_to_le32((PCI_MSTR_MEM_BUS+PCI_MSTR_MEM_SIZE) >> POTA_ADDR_SHIFT);
+	immap->im_pci.pci_pobar2 = cpu_to_le32((PCI_MSTR_MEM_LOCAL+PCI_MSTR_MEM_SIZE) >> POTA_ADDR_SHIFT);
+
+ 	/* Inbound transactions from PCI memory space */
+	immap->im_pci.pci_picmr0 = cpu_to_le32(PICMR_ENABLE | PICMR_PREFETCH_EN |
+				    ((~(PCI_SLV_MEM_SIZE-1U)) >> PITA_ADDR_SHIFT));
+	immap->im_pci.pci_pibar0 = cpu_to_le32(PCI_SLV_MEM_BUS  >> PITA_ADDR_SHIFT);
+	immap->im_pci.pci_pitar0 = cpu_to_le32(PCI_SLV_MEM_LOCAL>> PITA_ADDR_SHIFT);
+
+#if defined CONFIG_ADS8272
+	/* PCI int highest prio  */
+	immap->im_siu_conf.siu_82xx.sc_ppc_alrh = 0x01236745;
+#elif defined CONFIG_PQ2FADS
+	immap->im_siu_conf.siu_82xx.sc_ppc_alrh = 0x03124567;
+#endif
+	/* park bus on PCI  */
+	immap->im_siu_conf.siu_82xx.sc_ppc_acr = PPC_ACR_BUS_PARK_PCI;
+
+	/* Enable bus mastering and inbound memory transactions */
+	early_read_config_dword(hose, hose->first_busno, 0, PCI_COMMAND, &val);
+	val &= 0xffff0000;
+   	val |= PCI_COMMAND_MEMORY|PCI_COMMAND_MASTER;
+	early_write_config_dword(hose, hose->first_busno, 0, PCI_COMMAND, val);	
+
+}  
+  
+
+void __init
+m8260_find_bridges(void)
+{
+	struct pci_controller *hose;
+	int host_bridge;
+	volatile cpm2_map_t *immap = cpm2_immr;
+
+	hose = pcibios_alloc_controller();
+
+	if (!hose)
+		return;
+
+	hose->first_busno = 0;
+	hose->last_busno = 0xff;
+	hose->bus_offset   = 0;
+	hose->set_cfg_type = 1;
+
+	setup_indirect_pci(hose,
+				(ulong)&immap->im_pci.pci_cfg_addr,
+				(ulong)&immap->im_pci.pci_cfg_data);	
+	
+
+	/* Make sure it is a supported bridge */
+	early_read_config_dword(hose,
+			        0,
+			        PCI_DEVFN(0,0),
+			        PCI_VENDOR_ID,
+			        &host_bridge);
+
+	switch (host_bridge) {
+		case PCI_DEVICE_ID_MPC8265:
+			break;
+		case PCI_DEVICE_ID_MPC8272:
+			break;
+
+		default:
+			printk("Attempting to use unrecognized host bridge ID"
+			       " 0x%08x.\n", host_bridge);
+			break;
+	}
+
+	pq2ads_hw_init(hose);
+
+	hose->pci_mem_offset = PCI_MSTR_MEM_LOCAL - PCI_MSTR_MEM_BUS;
+	hose->io_space.start = PCI_MSTR_IO_BUS;
+	hose->io_space.end = PCI_MSTR_IO_BUS + PCI_MSTR_IO_SIZE - 1U;
+	hose->mem_space.start = PCI_MSTR_MEM_BUS;
+	hose->mem_space.end = PCI_MSTR_MEMIO_BUS + PCI_MSTR_MEMIO_SIZE - 1U;
+	hose->io_base_virt = (void *)PCI_MSTR_IO_LOCAL;
+	isa_io_base = PCI_MSTR_IO_LOCAL;
+	
+	pci_init_resource(&hose->io_resource,
+			  PCI_MSTR_IO_BUS,
+			  PCI_MSTR_IO_BUS + PCI_MSTR_IO_SIZE - 1U,
+			  IORESOURCE_IO,
+			  "PCI host bridge");
+
+	pci_init_resource(&hose->mem_resources[0],
+			  PCI_MSTR_MEMIO_BUS,
+			  PCI_MSTR_MEMIO_BUS + PCI_MSTR_MEMIO_SIZE - 1U,
+			  IORESOURCE_MEM,
+			  "PCI host bridge");
+
+	pci_init_resource(&hose->mem_resources[1],
+	                  PCI_MSTR_MEM_BUS,
+	                  PCI_MSTR_MEM_BUS + PCI_MSTR_MEM_SIZE - 1U,
+	                  IORESOURCE_MEM | IORESOURCE_PREFETCH,
+	                  "PCI host bridge");
+
+	pci_dram_offset = PCI_SLV_MEM_LOCAL;
+
+	ppc_md.pci_exclude_device = pq2ads_exclude_device;
+	hose->last_busno = pciauto_bus_scan(hose, hose->first_busno);
+
+	ppc_md.pcibios_fixup = NULL;
+	ppc_md.pcibios_fixup_bus = NULL;
+	ppc_md.pci_swizzle = common_swizzle;
+	ppc_md.pci_map_irq = pq2ads_map_irq;
+
+	return;
+}
diff -Nru a/include/asm-ppc/mpc8260.h b/include/asm-ppc/mpc8260.h
--- a/include/asm-ppc/mpc8260.h	2005-02-18 17:14:12 +03:00
+++ b/include/asm-ppc/mpc8260.h	2005-02-18 17:14:12 +03:00
@@ -24,12 +24,14 @@
 #include <platforms/pq2ads.h>
 #endif
 
+#ifndef CONFIG_PCI
 /* I don't yet have the ISA or PCI stuff done....no 8260 with
  * such thing.....
  */
 #define _IO_BASE        0
 #define _ISA_MEM_BASE   0
 #define PCI_DRAM_OFFSET 0
+#endif
 
 #ifndef __ASSEMBLY__
 /* The "residual" data board information structure the boot loader

^ permalink raw reply

* Re: PCI on MPC827x
From: Jaap-Jan Boor @ 2005-09-06 13:59 UTC (permalink / raw)
  To: Alex Zeffertt; +Cc: linuxppc-embedded
In-Reply-To: <20050906144845.1e603c72.ajz@cambridgebroadband.com>

We use it with 2.4.25. I think you should take a look at Wolfang Denx' 
2.4 kernel

Jaap-Jan

Alex Zeffertt wrote:

>On Tue, 06 Sep 2005 16:45:15 +0400
>Vitaly Bordug <vbordug@ru.mvista.com> wrote:
>
>  
>
>>Alex Zeffertt wrote:
>>    
>>
>>>Hi list,
>>>
>>>Does the linuxppc kernel support PCI on PowerQUICC II chips?  If so, in which patch/release was
>>>it added?
>>>
>>>      
>>>
>>The PCI bridge for 8272ADS has been added in 2.6.12-rc6. This stuff 
>>should work on PQ2FADS as well.
>>    
>>
> 
>Thanks Vitaly.  Unfortunately we're using linux-2.4.25.
>
>Has anybody backported the PCI bridge to 2.4?  If not, do you think it's a lot of work?
>
>Alex
>_______________________________________________
>Linuxppc-embedded mailing list
>Linuxppc-embedded@ozlabs.org
>https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>  
>


-- 
J.G.J. Boor                       Anton Philipsweg 1
Software Engineer                 1223 KZ Hilversum
AimSys bv                         tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor@aimsys.nl

^ permalink raw reply

* Re: Regarding the PPC board bringup with Linux 2.6 kernel
From: Wolfgang Denk @ 2005-09-06 14:54 UTC (permalink / raw)
  To: vinay hegde; +Cc: linuxppc-embedded
In-Reply-To: <20050906130029.74727.qmail@web8405.mail.in.yahoo.com>

In message <20050906130029.74727.qmail@web8405.mail.in.yahoo.com> you wrote:
>   
> Does anybody have any idea about the problem? Also,

Yes.

> is it possible to print some debug messages at this
> point of booting? {Note that, in the early stage of

Use a BDI2000.

> Can somebody help me with the above problem?

Maybe you start reading the FAQ... See
http://www.denx.de/twiki/bin/view/DULG/LinuxHangsAfterUncompressingKernel

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
A wise person makes his  own  decisions,  a  weak  one  obeys  public
opinion.                                           -- Chinese proverb

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox