* [patch 1/1] [Fwd: [patch 1/3] list_for_each_entry: drivers-macintosh-via-pmu.c]
From: domen @ 2005-06-20 21:52 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev, domen
From: Domen Puncer <domen@coderock.org>
Replace for loops with nice list_for_each* macros.
Signed-off-by: Domen Puncer <domen@coderock.org>
---
via-pmu.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
Index: quilt/drivers/macintosh/via-pmu.c
===================================================================
--- quilt.orig/drivers/macintosh/via-pmu.c
+++ quilt/drivers/macintosh/via-pmu.c
@@ -2062,8 +2062,7 @@ pmu_register_sleep_notifier(struct pmu_s
struct list_head *list;
struct pmu_sleep_notifier *notifier;
- for (list = sleep_notifiers.next; list != &sleep_notifiers;
- list = list->next) {
+ list_for_each(list, &sleep_notifiers) {
notifier = list_entry(list, struct pmu_sleep_notifier, list);
if (n->priority > notifier->priority)
break;
@@ -2090,8 +2089,7 @@ broadcast_sleep(int when, int fallback)
struct list_head *list;
struct pmu_sleep_notifier *notifier;
- for (list = sleep_notifiers.prev; list != &sleep_notifiers;
- list = list->prev) {
+ list_for_each_prev(list, &sleep_notifiers) {
notifier = list_entry(list, struct pmu_sleep_notifier, list);
ret = notifier->notifier_call(notifier, when);
if (ret != PBOOK_SLEEP_OK) {
@@ -2112,14 +2110,10 @@ static int __pmac
broadcast_wake(void)
{
int ret = PBOOK_SLEEP_OK;
- struct list_head *list;
struct pmu_sleep_notifier *notifier;
- for (list = sleep_notifiers.next; list != &sleep_notifiers;
- list = list->next) {
- notifier = list_entry(list, struct pmu_sleep_notifier, list);
+ list_for_each_entry(notifier, &sleep_notifiers, list)
notifier->notifier_call(notifier, PBOOK_WAKE);
- }
return ret;
}
@@ -2731,15 +2725,13 @@ static void __pmac
pmu_pass_intr(unsigned char *data, int len)
{
struct pmu_private *pp;
- struct list_head *list;
int i;
unsigned long flags;
if (len > sizeof(pp->rb_buf[0].data))
len = sizeof(pp->rb_buf[0].data);
spin_lock_irqsave(&all_pvt_lock, flags);
- for (list = &all_pmu_pvt; (list = list->next) != &all_pmu_pvt; ) {
- pp = list_entry(list, struct pmu_private, list);
+ list_for_each_entry(pp, &all_pmu_pvt, list) {
spin_lock(&pp->lock);
i = pp->rb_put + 1;
if (i >= RB_SIZE)
--
^ permalink raw reply
* [patch 1/2] delete arch/ppc/syslib/ppc4xx_pm.c
From: domen @ 2005-06-20 21:50 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev, domen
Remove nowhere referenced file. (egrep "filename\." didn't find anything)
Signed-off-by: Domen Puncer <domen@coderock.org>
---
ppc4xx_pm.c | 47 -----------------------------------------------
1 files changed, 47 deletions(-)
Index: quilt/arch/ppc/syslib/ppc4xx_pm.c
===================================================================
--- quilt.orig/arch/ppc/syslib/ppc4xx_pm.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Author: Armin Kuster <akuster@mvista.com>
- *
- * 2002 (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.
- *
- * This an attempt to get Power Management going for the IBM 4xx processor.
- * This was derived from the ppc4xx._setup.c file
- */
-
-#include <linux/config.h>
-#include <linux/init.h>
-
-#include <asm/ibm4xx.h>
-
-void __init
-ppc4xx_pm_init(void)
-{
-
- unsigned int value = 0;
-
- /* turn off unused hardware to save power */
-#ifdef CONFIG_405GP
- value |= CPM_DCP; /* CodePack */
-#endif
-
-#if !defined(CONFIG_IBM_OCP_GPIO)
- value |= CPM_GPIO0;
-#endif
-
-#if !defined(CONFIG_PPC405_I2C_ADAP)
- value |= CPM_IIC0;
-#ifdef CONFIG_STB03xxx
- value |= CPM_IIC1;
-#endif
-#endif
-
-
-#if !defined(CONFIG_405_DMA)
- value |= CPM_DMA;
-#endif
-
- mtdcr(DCRN_CPMFR, value);
-
-}
--
^ permalink raw reply
* MPC8270 USB Host Linux driver?
From: Maynard Cabiente @ 2005-06-20 21:48 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 615 bytes --]
Hi All,
I know this was ask a long time ago but I just like to know the current status. Does anybody have a USB Host controller Linux driver support for the MPC8270/MPC8280?
I know that Arabella Software did something for the PQ2FADS board but I'm not certain if it is free. I did download this BSP but some of the files are missing. But, as I said, I'm not certain if it can be used anyway without paying for it.
There are some USB driver for the MPC8272 that Metrowerks provided but it is only a USB-to-serial driver and not a Host Controller.
Any help is appreciated.
thanks,
Maynard
[-- Attachment #2: Type: text/html, Size: 1389 bytes --]
^ permalink raw reply
* Re: [PATCH] GCC4 compile fixes for mpc52xx
From: Sylvain Munaut @ 2005-06-21 7:10 UTC (permalink / raw)
To: roger blofeld; +Cc: linuxppc-embedded
In-Reply-To: <20050620193210.42378.qmail@web53505.mail.yahoo.com>
roger blofeld wrote:
> Sylvain,
> A quick patch to fix your tree for gcc4
> -rb
>
> drivers/net/fec_mpc52xx/fec.c: In function 'fec_reinit':
> drivers/net/fec_mpc52xx/fec.c:525: error: invalid storage class for
> function 'fec_update_stat'
>
> drivers/serial/mpc52xx_uart.c:707: error: static declaration of
> 'mpc52xx_uart_driver' follows non-static declaration
> drivers/serial/mpc52xx_uart.c:675: error: previous declaration of
> 'mpc52xx_uart_driver' was here
>
> Signed off by Roger Blofeld <blofeldus@yahoo.com>
>
Hi Roger,
Applied to my tree (with slight modification, I don't even see why
fec_update was declared there so I just removed it.)
The relevant part to the UART driver will be pushed along my next
set of update.
Sylvain
^ permalink raw reply
* booting linux on powerpc 405
From: vinod b @ 2005-06-21 8:13 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 6863 bytes --]
I am sending the output on the minicom window can some
body tell me what is the problem.It <http://problem.It> will be of great
help.
Welcome to minicom 2.00.0
OPTIONS: History Buffer, F-key Macros, Search History Buffer, I18n
Compiled on Jan 25 2003, 00:15:18.
Press CTRL-A Z for help on special keys
405GP 1.13 ROM Monitor (4/7/00)
--------------------- System Info ----------------------
Processor = 405GP, PVR: 40110082
Processor speed = 200 MHz
PLB speed = 100 MHz
OPB speed = 50 MHz
Ext Bus speed = 50 MHz
PCI Bus speed = 33 MHz (Sync)
Amount of SDRAM = 32 MBytes
Internal PCI arbiter enabled
--------------------------------------------------------
--- Device Configuration ---
Power-On Test Devices:
000 Disabled System Memory [RAM]
001 Disabled Ethernet [ENET]
004 Disabled Serial Port 2 [S2]
----------------------------
Boot Sources:
001 Enabled Ethernet [ENET]
local=192.0.1.253 <http://192.0.1.253>
remote=192.0.1.21 <http://192.0.1.21> hwaddr=0004ace30f38
004 Disabled Serial Port 2 [S2]
local=8.1.1.2 <http://8.1.1.2>
remote=255.255.255.255 <http://255.255.255.255> hwaddr=ffffffffffff
005 Disabled Serial Port 1 [S1]
----------------------------
Debugger: Disabled
----------------------------
1 - Enable/disable tests
2 - Enable/disable boot devices
3 - Change IP addresses
4 - Ping test
5 - Toggle ROM monitor debugger
6 - Toggle automatic menu
7 - Display configuration
8 - Save changes to configuration
9 - Set baud rate for s1 boot
A - Enable/disable I cache (Enabled )
B - Enable/disable D cache (Disabled)
0 - Exit menu and continue
->
1 - Enable/disable tests
2 - Enable/disable boot devices
3 - Change IP addresses
4 - Ping test
5 - Toggle ROM monitor debugger
6 - Toggle automatic menu
7 - Display configuration
8 - Save changes to configuration
9 - Set baud rate for s1 boot
A - Enable/disable I cache (Enabled )
B - Enable/disable D cache (Disabled)
0 - Exit menu and continue
->0
ENET Speed is 100 Mbs...
FULL duplex connection
Booting from [ENET] Ethernet ...
Sending bootp request ...
Loading file "/tftpboot/zImage.treeboot" ...
Sending tftp boot request ...
Transfer Complete ...
Loaded successfully ...
Entry point at 0x500000 ...
loaded at: 00500000 0059E1F8
relocated to: 00400000 0049E1F8
board data at: 0049B128 0049B168
relocated to: 00405470 004054B0
zimage at: 004059AC 0049AB26
avail ram: 0049F000 02000000
Linux/PPC load: root=/dev/nfs rw ip=on
Uncompressing Linux...done.
Now booting the kernel
Linux version 2.4.18_mvl30-405ep_eval (root@AUM-SAI) (gcc version
3.2.1 20020930 (MontaVista)) #1 Sun Jun 19 13:50:01 IST 25
IBM Walnut (IBM405GP) Platform
Port by MontaVista Software, Inc. (source@mvista.com)
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/nfs rw ip=on
Calibrating delay loop... 199.47 BogoMIPS
Memory: 30788k available (1024k kernel code, 344k data, 72k init, 0k highmem)
Dentry-cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode-cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardware
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
OCP uart ver 1.2.1 init complete
Starting kswapd
Disabling the Out Of Memory Killer
i2c-core.o: i2c core module version 2.6.2 (20011118)
initialize_kbd: Keyboard reset failed, no ACK
Detected PS/2 Mouse Port.
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ
SERIAL_PCI enabled
ttyS00 at 0xef600300 (irq = 0) is a 16550A
ttyS01 at 0xef600400 (irq = 1) is a 16550A
block: 64 slots per queue, batch=16
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
eth0: Phy @ 0x1, type DP83843 (0x20005c10)
Reset ethernet interfaces
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
opening eth0 on emac 0
eth0: IBM EMAC: link up, 100 Mbps Full Duplex, auto-negotiation complete.
eth0: IBM EMAC: MAC 00:04:ac:e3:0f:38.
eth0: IBM EMAC: open completed
Sending BOOTP and RARP requests . OK
IP-Config: Got BOOTP answer from 192.0.1.21 <http://192.0.1.21>, my
address is 192.0.1.253 <http://192.0.1.253>
IP-Config: Complete:
device=eth0, addr=192.0.1.253 <http://192.0.1.253>,
mask=255.255.255.0 <http://255.255.255.0>, gw=255.255.255.255
<http://255.255.255.255>,
host=192.0.1.253 <http://192.0.1.253>, domain=, nis-domain=(none),
bootserver=192.0.1.21 <http://192.0.1.21>, rootserver=192.0.1.21
<http://192.0.1.21>, rootpath=/home/walnut/target
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Looking up port of RPC 100003/2 on 192.0.1.21 <http://192.0.1.21>
Looking up port of RPC 100005/1 on 192.0.1.21 <http://192.0.1.21>
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 72k init
Warning: unable to open an initial console.
nfs: server 192.0.1.21 <http://192.0.1.21> not responding, still trying
nfs: server 192.0.1.21 <http://192.0.1.21> OK
Oops: kernel access of bad area, sig: 11
NIP: C0004A48 XER: 00000000 LR: C000DC98 SP: C1FEF590 REGS: c1fef4d0
TRAP: 0800 Not tainted
MSR: 00001030 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 11
DEAR: 00000000, ESR: 00000000
TASK = c1fee000[1] 'swapper' Last syscall: 11
last math 00000000 last altivec 00000000
PLB0: bear= 0x10000000 acr= 0x00000000 besr= 0x00000000
PLB0 to OPB: bear= 0x119a3470 besr0= 0x00000000 besr1= 0x00000000
GPR00: C00A081C C1FEF590 C1FEE000 00000000 00000005 0000001F 00000000 C1FCD260
GPR08: 00000002 C1FD3158 C1FCD2D8 C1FD302C 00784263 00000000 00000003 00000000
GPR16: 00000000 FFFE21AD 00000000 C1FCD460 00000002 C1FCD480 00000000 00000000
GPR24: C00E00A4 C1FEF6E8 C3004800 00000000 00000000 C1FD3000 00000000 0000009A
Call backtrace:
C0000000 C00A081C C00B894C C00B1410 C00B5EB0 C00C45D0 C00C32E0
C00C3D8C C00E0404 C00E7724 C00A96FC C00F4518 C00F373C C00F36C4
C00F1794 C00F5AA4 C00F5D5C C00F0EF4 C006B944 C00657DC C0042744
C0042C6C C0042FE8 C0040060 C0055D98 C00409EC C0040C14 C0005644
C00028FC C0002708 C0004E6C
Kernel panic: Aiee, killing interrupt handler!
In interrupt handler - not syncing
<0>Rebooting in 180 seconds..<NULL>
Thanking you all.......
--
vinod
[-- Attachment #2: Type: text/html, Size: 7893 bytes --]
^ permalink raw reply
* Re: booting linux on powerpc 405
From: Eugene Surovegin @ 2005-06-21 9:24 UTC (permalink / raw)
To: vinod b; +Cc: linuxppc-embedded
In-Reply-To: <198df04d050621011328999642@mail.gmail.com>
On Tue, Jun 21, 2005 at 01:43:23PM +0530, vinod b wrote:
> I am sending the output on the minicom window can some
> body tell me what is the problem.It <http://problem.It> will be of great
> help.
[snip]
> Linux version 2.4.18_mvl30-405ep_eval (root@AUM-SAI) (gcc version
> 3.2.1 20020930 (MontaVista)) #1 Sun Jun 19 13:50:01 IST 25
> IBM Walnut (IBM405GP) Platform
So, is it Walnut or 405EP eval?????
> PLB0: bear= 0x10000000 acr= 0x00000000 besr= 0x00000000
> PLB0 to OPB: bear= 0x119a3470 besr0= 0x00000000 besr1= 0x00000000
>
> GPR00: C00A081C C1FEF590 C1FEE000 00000000 00000005 0000001F 00000000 C1FCD260
> GPR08: 00000002 C1FD3158 C1FCD2D8 C1FD302C 00784263 00000000 00000003 00000000
> GPR16: 00000000 FFFE21AD 00000000 C1FCD460 00000002 C1FCD480 00000000 00000000
> GPR24: C00E00A4 C1FEF6E8 C3004800 00000000 00000000 C1FD3000 00000000 0000009A
> Call backtrace:
> C0000000 C00A081C C00B894C C00B1410 C00B5EB0 C00C45D0 C00C32E0
> C00C3D8C C00E0404 C00E7724 C00A96FC C00F4518 C00F373C C00F36C4
> C00F1794 C00F5AA4 C00F5D5C C00F0EF4 C006B944 C00657DC C0042744
> C0042C6C C0042FE8 C0040060 C0055D98 C00409EC C0040C14 C0005644
> C00028FC C0002708 C0004E6C
These numbers are useless for anybody here, please decode this oops
(using ppc_405-ksymoops) if you expect any help.
--
Eugene
^ permalink raw reply
* Re: booting linux on powerpc 405
From: Sam Song @ 2005-06-21 12:42 UTC (permalink / raw)
To: vinod b; +Cc: linuxppc-embedded
In-Reply-To: <198df04d050621011328999642@mail.gmail.com>
vinod b <bvinodsmail@gmail.com>wrote:
[snip]
> Looking up port of RPC 100005/1 on 192.0.1.21
> <http://192.0.1.21>
> VFS: Mounted root (nfs filesystem).
> Freeing unused kernel memory: 72k init
> Warning: unable to open an initial console.
Pls check the dev directory on your NFS mount point.
Is there any console node to work?
Best regards,
Sam
___________________________________________________________
雅虎邮箱超强增值服务-2G超大空间、pop3收信、无限量邮件提醒
http://cn.mail.yahoo.com/mail_alert/promo1.html
^ permalink raw reply
* isp1362 usb driver
From: Jianliang Lu @ 2005-06-21 14:48 UTC (permalink / raw)
To: wd; +Cc: linuxppc-embedded
Dear Wolfhang,
sorry for my persistence, now I try to go to more detail:
I've downloaded the driver from denx, that is part of kernel-
2.4.25, files isp1362-ctl.c, isp1362-ep1.c isp1362-ep2.c, isp1362-
ctl.h, hcd-1161.c and hcd-1161.h. But after it was installed we
have had problems on bulk/control during the initializing.
Following are logs:
---
Jan 1 01:01:29 IMOLA kernel: isp1362-HC Initialization Successful
Jan 1 01:01:29 IMOLA kernel: hub.c: port 1, portstatus 100,
change 0, 12 Mb/s
Jan 1 01:01:29 IMOLA kernel: hub.c: port 2, portstatus 101,
change 1, 12 Mb/s
Jan 1 01:01:29 IMOLA kernel: hub.c: port 2 connection change
Jan 1 01:01:29 IMOLA kernel: hub.c: port 2, portstatus 101,
change 1, 12 Mb/s
Jan 1 01:01:29 IMOLA kernel: hub.c: port 2, portstatus 101,
change 0, 12 Mb/s
Jan 1 01:01:30 IMOLA last message repeated 3 times
Jan 1 01:01:30 IMOLA kernel: hub.c: port 2, portstatus 103,
change 10, 12 Mb/s
Jan 1 01:01:30 IMOLA kernel: hub.c: USB new device connect on
bus2/2, assigned device number 2
Jan 1 01:01:33 IMOLA kernel: usb_control/bulk_msg: timeout
Jan 1 01:01:45 IMOLA last message repeated 4 times
Jan 1 01:01:45 IMOLA kernel: usb.c: couldn't get all of config
descriptors
Jan 1 01:01:45 IMOLA kernel: usb.c: unable to get device 2
configuration (error=-110)
Jan 1 01:01:45 IMOLA kernel: hub.c: port 2, portstatus 103,
change 10, 12 Mb/s
Jan 1 01:01:45 IMOLA kernel: hub.c: USB new device connect on
bus2/2, assigned device number 3
Jan 1 01:01:48 IMOLA kernel: usb_control/bulk_msg: timeout
Jan 1 01:02:00 IMOLA last message repeated 4 times
Jan 1 01:02:00 IMOLA kernel: usb.c: couldn't get all of config
descriptors
Jan 1 01:02:00 IMOLA kernel: usb.c: unable to get device 3
configuration (error=-110)
Jan 1 01:02:00 IMOLA kernel: hub.c: port 1, portstatus 100,
change 0, 12 Mb/s
Jan 1 01:02:00 IMOLA kernel: hub.c: port 2, portstatus 101,
change 0, 12 Mb/s
---
Best regards,
Jianliang Lu
^ permalink raw reply
* [PATCH] Allow Lite5200 w/o PCI
From: roger blofeld @ 2005-06-21 18:56 UTC (permalink / raw)
To: Sylvain Munaut; +Cc: linuxppc embedded
Hi,
I tried to compile for the icecube w/o PCI to match a custom board,
but get many errors:
arch/ppc/platforms/built-in.o(.init.text+0x66): In function
`platform_init':
arch/ppc/platforms/lite5200.c:204: undefined reference to `isa_io_base'
arch/ppc/platforms/built-in.o(.init.text+0x76):arch/ppc/platforms/lite5200.c:204:
undefined reference to `isa_io_base'
arch/ppc/platforms/built-in.o(.init.text+0x82):arch/ppc/platforms/lite5200.c:205:
undefined reference to `isa_mem_base'
arch/ppc/platforms/built-in.o(.init.text+0x8a):arch/ppc/platforms/lite5200.c:205:
undefined reference to `isa_mem_base'
arch/ppc/mm/built-in.o(.text+0xe92): In function `ioport_map':
arch/ppc/mm/pgtable.c:266: undefined reference to `isa_io_base'
arch/ppc/mm/built-in.o(.text+0xe96):arch/ppc/mm/pgtable.c:266:
undefined reference to `isa_io_base'
arch/ppc/mm/built-in.o(.text+0x117e): In function `__ioremap':
arch/ppc/mm/pgtable.c:188: undefined reference to `isa_mem_base'
arch/ppc/mm/built-in.o(.text+0x1182):arch/ppc/mm/pgtable.c:188:
undefined reference to `isa_mem_base'
drivers/built-in.o(.text+0x42a): In function `vgacon_set_cursor_size':
include/asm/io.h:294: undefined reference to `isa_io_base'
drivers/built-in.o(.text+0x436):include/asm/io.h:294: undefined
reference to `isa_io_base'
drivers/built-in.o(.text+0x57e): In function `vgacon_set_origin':
include/asm/io.h:312: undefined reference to `isa_io_base'
drivers/built-in.o(.text+0x586):include/asm/io.h:312: undefined
reference to `isa_io_base'
drivers/built-in.o(.text+0x60e): In function `vga_set_palette':
drivers/video/console/vgacon.c:514: undefined reference to
`isa_io_base'
drivers/built-in.o(.text+0x6ba):include/asm/io.h:294: more undefined
references to `isa_io_base' follow
drivers/built-in.o(.text+0x282d2): In function `dma_pool_alloc':
include/asm/io.h:398: undefined reference to `pci_dram_offset'
drivers/built-in.o(.text+0x282d6):include/asm/io.h:398: undefined
reference to `pci_dram_offset'
drivers/built-in.o(.init.text+0x2f2): In function `vgacon_startup':
include/asm/io.h:309: undefined reference to `isa_io_base'
drivers/built-in.o(.init.text+0x302):include/asm/io.h:309: undefined
reference to `isa_io_base'
make: *** [.tmp_vmlinux1] Error 1
This patch fixes it for me, but I don't know if this is the correct
solution.
Signed Off By: Roger Blofeld <blofeldus@yahoo.com>
-roger
diff --git a/arch/ppc/platforms/lite5200.c
b/arch/ppc/platforms/lite5200.c
--- a/arch/ppc/platforms/lite5200.c
+++ b/arch/ppc/platforms/lite5200.c
@@ -194,9 +200,11 @@ platform_init(unsigned long r3, unsigned
/* BAT setup */
mpc52xx_set_bat();
+#ifdef CONFIG_PCI
/* No ISA bus by default */
isa_io_base = 0;
isa_mem_base = 0;
+#endif
/* Powersave */
/* This is provided as an example on how to do it. But you
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h
--- a/include/asm-ppc/io.h
+++ b/include/asm-ppc/io.h
@@ -26,6 +26,8 @@
#if defined(CONFIG_4xx)
#include <asm/ibm4xx.h>
+#elif defined(CONFIG_PPC_MPC52xx)
+#include <asm/mpc52xx.h>
#elif defined(CONFIG_8xx)
#include <asm/mpc8xx.h>
#elif defined(CONFIG_8260)
diff --git a/include/asm-ppc/mpc52xx.h b/include/asm-ppc/mpc52xx.h
--- a/include/asm-ppc/mpc52xx.h
+++ b/include/asm-ppc/mpc52xx.h
@@ -28,6 +28,15 @@
struct pt_regs;
#endif /* __ASSEMBLY__ */
+#ifdef CONFIG_PCI
+#define _IO_BASE isa_io_base
+#define _ISA_MEM_BASE isa_mem_base
+#define PCI_DRAM_OFFSET pci_dram_offset
+#else
+#define _IO_BASE 0
+#define _ISA_MEM_BASE 0
+#define PCI_DRAM_OFFSET 0
+#endif
/*
========================================================================
*/
/* PPC Sys devices definition
*/
__________________________________
Discover Yahoo!
Get on-the-go sports scores, stock quotes, news and more. Check it out!
http://discover.yahoo.com/mobile.html
^ permalink raw reply
* [PATCH] gcc4 fix for asm/time.h
From: roger blofeld @ 2005-06-21 19:44 UTC (permalink / raw)
To: linuxppc-dev
Hi
GCC4 complains:
include/asm/time.h:61: warning: type qualifiers ignored on function
return type
so I propose this patch.
Signed off by: Roger Blofeld <blofeldus@yahoo.com>
diff --git a/include/asm-ppc/time.h b/include/asm-ppc/time.h
--- a/include/asm-ppc/time.h
+++ b/include/asm-ppc/time.h
@@ -58,7 +58,7 @@ static __inline__ void set_dec(unsigned
/* Accessor functions for the timebase (RTC on 601) registers. */
/* If one day CONFIG_POWER is added just define __USE_RTC as 1 */
#ifdef CONFIG_6xx
-extern __inline__ int const __USE_RTC(void) {
+extern __inline__ int __attribute_const__ __USE_RTC(void) {
return (mfspr(SPRN_PVR)>>16) == 1;
}
#else
__________________________________
Discover Yahoo!
Find restaurants, movies, travel and more fun for the weekend. Check it out!
http://discover.yahoo.com/weekend.html
^ permalink raw reply
* Re: isp1362 usb driver
From: Wolfgang Denk @ 2005-06-21 20:18 UTC (permalink / raw)
To: j.lu; +Cc: linuxppc-embedded
In-Reply-To: <200506211648.AA102695630@tiesse.com>
Hello,
in message <200506211648.AA102695630@tiesse.com> you wrote:
>
> sorry for my persistence, now I try to go to more detail:
I'm afraid I can't help much. The only board with a ISP1362 I have
access to at the moment has just the device interface equipped, so I
cannot run any real tests on the host port.
> Jan 1 01:01:30 IMOLA kernel: hub.c: USB new device connect on
> bus2/2, assigned device number 2
> Jan 1 01:01:33 IMOLA kernel: usb_control/bulk_msg: timeout
> Jan 1 01:01:45 IMOLA last message repeated 4 times
> Jan 1 01:01:45 IMOLA kernel: usb.c: couldn't get all of config
> descriptors
> Jan 1 01:01:45 IMOLA kernel: usb.c: unable to get device 2
> configuration (error=-110)
Which sort of device is it what you connected? Are you sure it is
working under Linux at all? Did you test it on a standard x86 Linux
PC with a 2.4.2x kernel?
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 fanatic is a person who can't change his mind and won't change the
subject. - Winston Churchill
^ permalink raw reply
* Account compromised: billing information moved or changed.
From: PayPal @ 2005-06-21 14:42 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/html, Size: 2388 bytes --]
^ permalink raw reply
* Re: Discuss: Adding OF Flat Dev Tree to ppc32
From: Tom Rini @ 2005-06-21 23:41 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc64-dev, linuxppc-embedded@ozlabs.org
In-Reply-To: <1118199997.6850.106.camel@gaston>
On Wed, Jun 08, 2005 at 01:06:37PM +1000, Benjamin Herrenschmidt wrote:
[snip]
> Regarding code in arch/ppc*, I'm not sure what the right approach would
> be. I'd say first copy things around, and we'll what we end up with.
How about we just do:
obj-y += ../../ppc64/kernel/flat_tree.o
or so like x86_64 does for a handful of things?
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply
* booting linux on powerpc 405
From: vinod b @ 2005-06-22 4:49 UTC (permalink / raw)
To: samlinuxppc, linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 6056 bytes --]
thanks for the response sir.
sir i created nodes on the dev directory using the command mknode.Even after
doing this i have problem.I do not know if there is any problem with nfs
server.But as it is seen in the output on the minicom window sigseg signal
occeurs then kernel panic happens.So how can this problem be solved.
I am sending the new output
Welcome to minicom 2.00.0
OPTIONS: History Buffer, F-key Macros, Search History Buffer, I18n
Compiled on Jan 25 2003, 00:15:18.
Press CTRL-A Z for help on special keys
405GP 1.13 ROM Monitor (4/7/00)
--------------------- System Info ----------------------
Processor = 405GP, PVR: 40110082
Processor speed = 200 MHz
PLB speed = 100 MHz
OPB speed = 50 MHz
Ext Bus speed = 50 MHz
PCI Bus speed = 33 MHz (Sync)
Amount of SDRAM = 32 MBytes
Internal PCI arbiter enabled
--------------------------------------------------------
--- Device Configuration ---
Power-On Test Devices:
000 Disabled System Memory [RAM]
001 Disabled Ethernet [ENET]
004 Disabled Serial Port 2 [S2]
----------------------------
Boot Sources:
001 Enabled Ethernet [ENET]
local=192.0.1.253 <http://192.0.1.253> remote=192.0.1.50
<http://192.0.1.50>hwaddr=0004ace30f38
004 Disabled Serial Port 2 [S2]
local=8.1.1.2 <http://8.1.1.2>
remote=255.255.255.255<http://255.255.255.255>hwaddr=ffffffffffff
005 Disabled Serial Port 1 [S1]
----------------------------
Debugger: Disabled
----------------------------
1 - Enable/disable tests
2 - Enable/disable boot devices
3 - Change IP addresses
4 - Ping test
5 - Toggle ROM monitor debugger
6 - Toggle automatic menu
7 - Display configuration
8 - Save changes to configuration
9 - Set baud rate for s1 boot
A - Enable/disable I cache (Enabled )
B - Enable/disable D cache (Disabled)
0 - Exit menu and continue
->0
ENET Speed is 100 Mbs...
FULL duplex connection
Booting from [ENET] Ethernet ...
Sending bootp request ...
Loading file "/tftpboot/zImage.treeboot" ...
Sending tftp boot request ...
Transfer Complete ...
Loaded successfully ...
Entry point at 0x500000 ...
loaded at: 00500000 0059E1F8
relocated to: 00400000 0049E1F8
board data at: 0049B128 0049B168
relocated to: 00405470 004054B0
zimage at: 004059AC 0049A376
avail ram: 0049F000 02000000
Linux/PPC load: root=/dev/nfs rw ip=on
Uncompressing Linux...done.
Now booting the kernel
Linux version 2.4.18_mvl30-405ep_eval (root@sairam) (gcc version
3.2.1200209305IBM Walnut (IBM405GP) Platform
Port by MontaVista Software, Inc. (source@mvista.com)
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/nfs rw ip=on
Calibrating delay loop... 199.47 BogoMIPS
Memory: 30800k available (1024k kernel code, 332k data, 72k init, 0k
highmem)
Dentry-cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode-cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardware
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
OCP uart ver 1.2.1 init complete
Starting kswapd
Disabling the Out Of Memory Killer
i2c-core.o: i2c core module version 2.6.2 (20011118)
initialize_kbd: Keyboard reset failed, no ACK
Detected PS/2 Mouse Port.
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ
SERIAL_PCI edttyS00 at 0xef600300 (irq = 0) is a 16550A
ttyS01 at 0xef600400 (irq = 1) is a 16550A
block: 64 slots per queue, batch=16
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
eth0: Phy @ 0x1, type DP83843 (0x20005c10)
Reset ethernet interfaces
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
opening eth0 on emac 0
eth0: IBM EMAC: link up, 100 Mbps Full Duplex, auto-negotiation complete.
eth0: IBM EMAC: MAC 00:04:ac:e3:0f:38.
eth0: IBM EMAC: open completed
Sending BOOTP and RARP requests . OK
IP-Config: Got BOOTP answer from 192.0.1.50 <http://192.0.1.50>, my address
is 192.0.1.253 <http://192.0.1.253>
IP-Config: Complete:
device=eth0, addr=192.0.1.253 <http://192.0.1.253>,
mask=255.255.255.0<http://255.255.255.0>,
gw=255.255.255.255 <http://255.255.255.255>,
host=192.0.1.253 <http://192.0.1.253>, domain=, nis-domain=(none),
bootserver=192.0.1.50 <http://192.0.1.50>,
rootserver=192.0.1.50<http://192.0.1.50>,
rootpath=/home/vinod/target
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Looking up port of RPC 100003/2 on 192.0.1.50 <http://192.0.1.50>
Looking up port of RPC 100005/1 on 192.0.1.50 <http://192.0.1.50>
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 72k init
Oops: kernel access of bad area, sig: 11
NIP: C00EB22C XER: 00000000 LR: C00E900C SP: C0121CB0 REGS: c0121bf0 TRAP:
0800dMSR: 00009030 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DEAR: 00000000, ESR: 00000000
TASK = c011fff0[0] 'swapper' Last syscall: 120
last math 00000000 last altivec 00000000
PLB0: bear= 0x10000000 acr= 0x00000000 besr= 0x00000000
PLB0 to OPB: bear= 0x00001024 besr0= 0x00000000 besr1= 0x00000000
GPR00: 00000000 C0121CB0 C011FFF0 C1FD0060 C0121CE8 C0121D08 00000000
C1FD6000
GPR08: C0121D60 00000000 00000000 00000000 44000044 00020000 000C0804
00000000
GPR16: 00020000 FFFE21AD C0121D58 C0121D58 00000153 00000001 C1FD5D00
00000000
GPR24: 00000000 C0121CE8 C0121D08 C0121D08 C0121CE8 C1FB0280 00000000
C1FD6000
Call backtrace:
00000000 C00E900C C00BD16C C00BD280 C00C0124 C00BFC24 C00B115C
C0017684 C0003BE0 C0002B4C C00215D4 C00040A8 C00040D0 C0002418
C01317A8 C0002318
Kernel panic: Aiee, killing interrupt handler!
In interrupt handler - not syncing
--
vinod
S.S.S.I.H.L
[-- Attachment #2: Type: text/html, Size: 13669 bytes --]
^ permalink raw reply
* Re: isp1362 usb driver
From: Jianliang Lu @ 2005-06-22 7:00 UTC (permalink / raw)
To: j.lu, Wolfgang Denk; +Cc: linuxppc-embedded
Hi,
the device is a adsl modem, it works correctly in other linux
systems with kernel 2.4.2x. The problem is that the isp1362 driver
seems that supports only isochronous endpoints. We are
implementing the code to support also control/bulk/interrupt
endpoints.
Regards,
Jianliang Lu
---------- Original Message ----------------------------------
From: Wolfgang Denk <wd@denx.de>
Date: Tue, 21 Jun 2005 22:18:34 +0200
>Hello,
>
>in message <200506211648.AA102695630@tiesse.com> you wrote:
>>
>> sorry for my persistence, now I try to go to more detail:
>
>I'm afraid I can't help much. The only board with a ISP1362 I
have
>access to at the moment has just the device interface equipped,
so I
>cannot run any real tests on the host port.
>
>> Jan 1 01:01:30 IMOLA kernel: hub.c: USB new device connect on
>> bus2/2, assigned device number 2
>> Jan 1 01:01:33 IMOLA kernel: usb_control/bulk_msg: timeout
>> Jan 1 01:01:45 IMOLA last message repeated 4 times
>> Jan 1 01:01:45 IMOLA kernel: usb.c: couldn't get all of config
>> descriptors
>> Jan 1 01:01:45 IMOLA kernel: usb.c: unable to get device 2
>> configuration (error=-110)
>
>Which sort of device is it what you connected? Are you sure
it is
>working under Linux at all? Did you test it on a standard x86
Linux
>PC with a 2.4.2x kernel?
>
>
>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 fanatic is a person who can't change his mind and won't change
the
>subject. - Winston
Churchill
>
^ permalink raw reply
* RE: isp1362 usb driver
From: Jordan, Kyle @ 2005-06-22 11:40 UTC (permalink / raw)
To: j.lu; +Cc: linuxppc-embedded
Jianliang Lu,
> the device is a adsl modem, it works correctly in other linux=20
> systems with kernel 2.4.2x. The problem is that the isp1362 driver=20
> seems that supports only isochronous endpoints. We are=20
> implementing the code to support also control/bulk/interrupt=20
> endpoints.
I had similar issues with control/bulk/interrupt endpoints with
the ISP1362 host controller driver from DENX. I went ahead and added
better support for control/bulk/interrupt endpoints. I could send you a
copy of the source if you like. The driver is being used on an MPC880,
with the 2.4.21 kernel. Also, what ADSL modem are using? We are
looking into a solution requiring an ADSL modem and the one you are
using may be a good solution for us also.
- Kyle
^ permalink raw reply
* RE: isp1362 usb driver
From: Jianliang Lu @ 2005-06-22 12:06 UTC (permalink / raw)
To: Jordan, Kyle; +Cc: linuxppc-embedded
Hi Jordan,
yes I would be really, really gratefully if you could send me the
source.
The adsl modem we are using is a eagle chipset modem, based on
eagle-usb project. The modem could be Sagem or aethra on ADI eagle
chipset.
Best regards,
Jianliang Lu
---------- Original Message ----------------------------------
From: "Jordan, Kyle" <kylej@aiinet.com>
Date: Wed, 22 Jun 2005 07:40:44 -0400
>Jianliang Lu,
>
>> the device is a adsl modem, it works correctly in other linux
>> systems with kernel 2.4.2x. The problem is that the isp1362
driver
>> seems that supports only isochronous endpoints. We are
>> implementing the code to support also control/bulk/interrupt
>> endpoints.
>
> I had similar issues with control/bulk/interrupt endpoints
with
>the ISP1362 host controller driver from DENX. I went ahead and
added
>better support for control/bulk/interrupt endpoints. I could
send you a
>copy of the source if you like. The driver is being used on an
MPC880,
>with the 2.4.21 kernel. Also, what ADSL modem are using? We are
>looking into a solution requiring an ADSL modem and the one you
are
>using may be a good solution for us also.
>
>- Kyle
>
>
>
^ permalink raw reply
* Re: booting linux on powerpc 405
From: vbordug @ 2005-06-22 19:49 UTC (permalink / raw)
To: vinod b; +Cc: linuxppc-embedded
In-Reply-To: <198df04d0506212149550448ed@mail.gmail.com>
Hello.I am not an expert regarding this board but the output below looks like it is something wrong with root fs-like you use a rfs built for another arch. Just a pure guess..
On Wed, Jun 22, 2005 at 10:19:37AM +0530, vinod b wrote:
> thanks for the response sir.
>
> sir i created nodes on the dev directory using the command mknode.Even after
> doing this i have problem.I do not know if there is any problem with nfs
> server.But as it is seen in the output on the minicom window sigseg signal
> occeurs then kernel panic happens.So how can this problem be solved.
>
> I am sending the new output
> Welcome to minicom 2.00.0
>
> OPTIONS: History Buffer, F-key Macros, Search History Buffer, I18n
> Compiled on Jan 25 2003, 00:15:18.
>
> Press CTRL-A Z for help on special keys
>
>
>
> 405GP 1.13 ROM Monitor (4/7/00)
>
> --------------------- System Info ----------------------
> Processor = 405GP, PVR: 40110082
> Processor speed = 200 MHz
> PLB speed = 100 MHz
> OPB speed = 50 MHz
> Ext Bus speed = 50 MHz
> PCI Bus speed = 33 MHz (Sync)
> Amount of SDRAM = 32 MBytes
> Internal PCI arbiter enabled
> --------------------------------------------------------
>
> --- Device Configuration ---
> Power-On Test Devices:
> 000 Disabled System Memory [RAM]
> 001 Disabled Ethernet [ENET]
> 004 Disabled Serial Port 2 [S2]
> ----------------------------
> Boot Sources:
> 001 Enabled Ethernet [ENET]
> local=192.0.1.253 <http://192.0.1.253> remote=192.0.1.50
> <http://192.0.1.50>hwaddr=0004ace30f38
> 004 Disabled Serial Port 2 [S2]
> local=8.1.1.2 <http://8.1.1.2>
> remote=255.255.255.255<http://255.255.255.255>hwaddr=ffffffffffff
> 005 Disabled Serial Port 1 [S1]
> ----------------------------
> Debugger: Disabled
> ----------------------------
> 1 - Enable/disable tests
> 2 - Enable/disable boot devices
> 3 - Change IP addresses
> 4 - Ping test
> 5 - Toggle ROM monitor debugger
> 6 - Toggle automatic menu
> 7 - Display configuration
> 8 - Save changes to configuration
> 9 - Set baud rate for s1 boot
> A - Enable/disable I cache (Enabled )
> B - Enable/disable D cache (Disabled)
> 0 - Exit menu and continue
> ->0
> ENET Speed is 100 Mbs...
> FULL duplex connection
> Booting from [ENET] Ethernet ...
> Sending bootp request ...
>
>
> Loading file "/tftpboot/zImage.treeboot" ...
> Sending tftp boot request ...
> Transfer Complete ...
> Loaded successfully ...
> Entry point at 0x500000 ...
>
> loaded at: 00500000 0059E1F8
> relocated to: 00400000 0049E1F8
> board data at: 0049B128 0049B168
> relocated to: 00405470 004054B0
> zimage at: 004059AC 0049A376
> avail ram: 0049F000 02000000
>
> Linux/PPC load: root=/dev/nfs rw ip=on
> Uncompressing Linux...done.
> Now booting the kernel
> Linux version 2.4.18_mvl30-405ep_eval (root@sairam) (gcc version
> 3.2.1200209305IBM Walnut (IBM405GP) Platform
> Port by MontaVista Software, Inc. (source@mvista.com)
> On node 0 totalpages: 8192
> zone(0): 8192 pages.
> zone(1): 0 pages.
> zone(2): 0 pages.
> Kernel command line: root=/dev/nfs rw ip=on
> Calibrating delay loop... 199.47 BogoMIPS
> Memory: 30800k available (1024k kernel code, 332k data, 72k init, 0k
> highmem)
> Dentry-cache hash table entries: 4096 (order: 3, 32768 bytes)
> Inode-cache hash table entries: 2048 (order: 2, 16384 bytes)
> Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
> Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
> Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
> POSIX conformance testing by UNIFIX
> PCI: Probing PCI hardware
> Linux NET4.0 for Linux 2.4
> Based upon Swansea University Computer Society NET3.039
> Initializing RT netlink socket
> OCP uart ver 1.2.1 init complete
> Starting kswapd
> Disabling the Out Of Memory Killer
> i2c-core.o: i2c core module version 2.6.2 (20011118)
> initialize_kbd: Keyboard reset failed, no ACK
> Detected PS/2 Mouse Port.
> Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ
> SERIAL_PCI edttyS00 at 0xef600300 (irq = 0) is a 16550A
> ttyS01 at 0xef600400 (irq = 1) is a 16550A
> block: 64 slots per queue, batch=16
> RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
> loop: loaded (max 8 devices)
> eth0: Phy @ 0x1, type DP83843 (0x20005c10)
> Reset ethernet interfaces
> NET4: Linux TCP/IP 1.0 for NET4.0
> IP Protocols: ICMP, UDP, TCP, IGMP
> IP: routing cache hash table of 512 buckets, 4Kbytes
> TCP: Hash tables configured (established 2048 bind 4096)
> opening eth0 on emac 0
> eth0: IBM EMAC: link up, 100 Mbps Full Duplex, auto-negotiation complete.
> eth0: IBM EMAC: MAC 00:04:ac:e3:0f:38.
> eth0: IBM EMAC: open completed
> Sending BOOTP and RARP requests . OK
> IP-Config: Got BOOTP answer from 192.0.1.50 <http://192.0.1.50>, my address
> is 192.0.1.253 <http://192.0.1.253>
> IP-Config: Complete:
> device=eth0, addr=192.0.1.253 <http://192.0.1.253>,
> mask=255.255.255.0<http://255.255.255.0>,
> gw=255.255.255.255 <http://255.255.255.255>,
> host=192.0.1.253 <http://192.0.1.253>, domain=, nis-domain=(none),
> bootserver=192.0.1.50 <http://192.0.1.50>,
> rootserver=192.0.1.50<http://192.0.1.50>,
> rootpath=/home/vinod/target
> NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
> Looking up port of RPC 100003/2 on 192.0.1.50 <http://192.0.1.50>
> Looking up port of RPC 100005/1 on 192.0.1.50 <http://192.0.1.50>
> VFS: Mounted root (nfs filesystem).
> Freeing unused kernel memory: 72k init
> Oops: kernel access of bad area, sig: 11
> NIP: C00EB22C XER: 00000000 LR: C00E900C SP: C0121CB0 REGS: c0121bf0 TRAP:
> 0800dMSR: 00009030 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
> DEAR: 00000000, ESR: 00000000
> TASK = c011fff0[0] 'swapper' Last syscall: 120
> last math 00000000 last altivec 00000000
> PLB0: bear= 0x10000000 acr= 0x00000000 besr= 0x00000000
> PLB0 to OPB: bear= 0x00001024 besr0= 0x00000000 besr1= 0x00000000
>
> GPR00: 00000000 C0121CB0 C011FFF0 C1FD0060 C0121CE8 C0121D08 00000000
> C1FD6000
> GPR08: C0121D60 00000000 00000000 00000000 44000044 00020000 000C0804
> 00000000
> GPR16: 00020000 FFFE21AD C0121D58 C0121D58 00000153 00000001 C1FD5D00
> 00000000
> GPR24: 00000000 C0121CE8 C0121D08 C0121D08 C0121CE8 C1FB0280 00000000
> C1FD6000
> Call backtrace:
> 00000000 C00E900C C00BD16C C00BD280 C00C0124 C00BFC24 C00B115C
> C0017684 C0003BE0 C0002B4C C00215D4 C00040A8 C00040D0 C0002418
> C01317A8 C0002318
> Kernel panic: Aiee, killing interrupt handler!
> In interrupt handler - not syncing
>
>
>
> --
> vinod
> S.S.S.I.H.L
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply
* Re: isp1362 usb driver
From: Wolfgang Denk @ 2005-06-22 20:00 UTC (permalink / raw)
To: Jordan, Kyle; +Cc: linuxppc-embedded
In-Reply-To: <C0170D0AF1277849A4B4518034F855DD0F918D@aiexchange.ai.aiinet.com>
In message <C0170D0AF1277849A4B4518034F855DD0F918D@aiexchange.ai.aiinet.com> you wrote:
>
> I had similar issues with control/bulk/interrupt endpoints with
> the ISP1362 host controller driver from DENX. I went ahead and added
> better support for control/bulk/interrupt endpoints. I could send you a
> copy of the source if you like. The driver is being used on an MPC880,
Maybe you can send me a copy of your patch so we can include it in
our tree? Thanks.
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
If I ever needed a brain transplant, I'd choose a teenager's because
I'd want a brain that had never been used.
^ permalink raw reply
* [PATCH] ppc32: Fix building MPC8555 CDS
From: Kumar Gala @ 2005-06-22 20:10 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, linuxppc-embedded
In adding support for MPC8548 w/o PCI support, broke building MPC8555 CDS
by trying to remove a loop variable that was used when PCI is enabled.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
---
commit 3136970402c782e9a1fd5c39ddc88d05e7b7b086
tree fc975ccebd712d1898871cdbcde10b6faeba4603
parent 957e37cba892cf088b9326ca2aff0de88fc1e9b0
author Kumar K. Gala <kumar.gala@freescale.com> Wed, 22 Jun 2005 16:48:57 -0500
committer Kumar K. Gala <kumar.gala@freescale.com> Wed, 22 Jun 2005 16:48:57 -0500
arch/ppc/platforms/85xx/mpc85xx_cds_common.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
--- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
+++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
@@ -149,6 +149,7 @@ void __init
mpc85xx_cds_init_IRQ(void)
{
bd_t *binfo = (bd_t *) __res;
+ int i;
/* Determine the Physical Address of the OpenPIC regs */
phys_addr_t OpenPIC_PAddr = binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET;
/
^ permalink raw reply
* [PATCH] ppc32: Check return of ppc_sys_get_pdata before accessing pointer
From: Kumar Gala @ 2005-06-22 20:39 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, linuxppc-embedded
Ensure that the returned pointer from ppc_sys_get_pdata is not
NULL before we start using it. This handles any cases where we
have variants of processors on the same board with different
functionality.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
---
commit b4b0dd5099cb8f08d57bcbf33fd06997ba993618
tree c176601bbe5bf0692fc6a948787319cb2fa74faa
parent 7d09ea22d5823fde9a508f5e04bd8e93712d6f44
author Kumar K. Gala <kumar.gala@freescale.com> Wed, 22 Jun 2005 10:55:33 -0500
committer Kumar K. Gala <kumar.gala@freescale.com> Wed, 22 Jun 2005 10:55:33 -0500
arch/ppc/platforms/83xx/mpc834x_sys.c | 28 ++++++++++++---------
arch/ppc/platforms/85xx/mpc8540_ads.c | 44 +++++++++++++++++++--------------
arch/ppc/platforms/85xx/mpc8560_ads.c | 28 ++++++++++++---------
arch/ppc/platforms/85xx/sbc8560.c | 28 ++++++++++++---------
arch/ppc/platforms/85xx/stx_gp3.c | 26 +++++++++++---------
5 files changed, 88 insertions(+), 66 deletions(-)
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c
--- a/arch/ppc/platforms/83xx/mpc834x_sys.c
+++ b/arch/ppc/platforms/83xx/mpc834x_sys.c
@@ -94,20 +94,24 @@ mpc834x_sys_setup_arch(void)
/* setup the board related information for the enet controllers */
pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC1);
- pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
- pdata->interruptPHY = MPC83xx_IRQ_EXT1;
- pdata->phyid = 0;
- /* fixup phy address */
- pdata->phy_reg_addr += binfo->bi_immr_base;
- memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
+ if (pdata) {
+ pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
+ pdata->interruptPHY = MPC83xx_IRQ_EXT1;
+ pdata->phyid = 0;
+ /* fixup phy address */
+ pdata->phy_reg_addr += binfo->bi_immr_base;
+ memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
+ }
pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC2);
- pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
- pdata->interruptPHY = MPC83xx_IRQ_EXT2;
- pdata->phyid = 1;
- /* fixup phy address */
- pdata->phy_reg_addr += binfo->bi_immr_base;
- memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
+ if (pdata) {
+ pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
+ pdata->interruptPHY = MPC83xx_IRQ_EXT2;
+ pdata->phyid = 1;
+ /* fixup phy address */
+ pdata->phy_reg_addr += binfo->bi_immr_base;
+ memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
+ }
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start)
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/platforms/85xx/mpc8540_ads.c
--- a/arch/ppc/platforms/85xx/mpc8540_ads.c
+++ b/arch/ppc/platforms/85xx/mpc8540_ads.c
@@ -92,28 +92,34 @@ mpc8540ads_setup_arch(void)
/* setup the board related information for the enet controllers */
pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
- pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
- pdata->interruptPHY = MPC85xx_IRQ_EXT5;
- pdata->phyid = 0;
- /* fixup phy address */
- pdata->phy_reg_addr += binfo->bi_immr_base;
- memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
+ if (pdata) {
+ pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
+ pdata->interruptPHY = MPC85xx_IRQ_EXT5;
+ pdata->phyid = 0;
+ /* fixup phy address */
+ pdata->phy_reg_addr += binfo->bi_immr_base;
+ memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
+ }
pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2);
- pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
- pdata->interruptPHY = MPC85xx_IRQ_EXT5;
- pdata->phyid = 1;
- /* fixup phy address */
- pdata->phy_reg_addr += binfo->bi_immr_base;
- memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
+ if (pdata) {
+ pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
+ pdata->interruptPHY = MPC85xx_IRQ_EXT5;
+ pdata->phyid = 1;
+ /* fixup phy address */
+ pdata->phy_reg_addr += binfo->bi_immr_base;
+ memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
+ }
- pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_FEC);
- pdata->board_flags = 0;
- pdata->interruptPHY = MPC85xx_IRQ_EXT5;
- pdata->phyid = 3;
- /* fixup phy address */
- pdata->phy_reg_addr += binfo->bi_immr_base;
- memcpy(pdata->mac_addr, binfo->bi_enet2addr, 6);
+ if (pdata) {
+ pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_FEC);
+ pdata->board_flags = 0;
+ pdata->interruptPHY = MPC85xx_IRQ_EXT5;
+ pdata->phyid = 3;
+ /* fixup phy address */
+ pdata->phy_reg_addr += binfo->bi_immr_base;
+ memcpy(pdata->mac_addr, binfo->bi_enet2addr, 6);
+ }
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start)
diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.c b/arch/ppc/platforms/85xx/mpc8560_ads.c
--- a/arch/ppc/platforms/85xx/mpc8560_ads.c
+++ b/arch/ppc/platforms/85xx/mpc8560_ads.c
@@ -90,20 +90,24 @@ mpc8560ads_setup_arch(void)
/* setup the board related information for the enet controllers */
pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
- pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
- pdata->interruptPHY = MPC85xx_IRQ_EXT5;
- pdata->phyid = 0;
- /* fixup phy address */
- pdata->phy_reg_addr += binfo->bi_immr_base;
- memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
+ if (pdata) {
+ pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
+ pdata->interruptPHY = MPC85xx_IRQ_EXT5;
+ pdata->phyid = 0;
+ /* fixup phy address */
+ pdata->phy_reg_addr += binfo->bi_immr_base;
+ memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
+ }
pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2);
- pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
- pdata->interruptPHY = MPC85xx_IRQ_EXT5;
- pdata->phyid = 1;
- /* fixup phy address */
- pdata->phy_reg_addr += binfo->bi_immr_base;
- memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
+ if (pdata) {
+ pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
+ pdata->interruptPHY = MPC85xx_IRQ_EXT5;
+ pdata->phyid = 1;
+ /* fixup phy address */
+ pdata->phy_reg_addr += binfo->bi_immr_base;
+ memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
+ }
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start)
diff --git a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c
--- a/arch/ppc/platforms/85xx/sbc8560.c
+++ b/arch/ppc/platforms/85xx/sbc8560.c
@@ -129,20 +129,24 @@ sbc8560_setup_arch(void)
/* setup the board related information for the enet controllers */
pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
- pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
- pdata->interruptPHY = MPC85xx_IRQ_EXT6;
- pdata->phyid = 25;
- /* fixup phy address */
- pdata->phy_reg_addr += binfo->bi_immr_base;
- memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
+ if (pdata) {
+ pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
+ pdata->interruptPHY = MPC85xx_IRQ_EXT6;
+ pdata->phyid = 25;
+ /* fixup phy address */
+ pdata->phy_reg_addr += binfo->bi_immr_base;
+ memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
+ }
pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2);
- pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
- pdata->interruptPHY = MPC85xx_IRQ_EXT7;
- pdata->phyid = 26;
- /* fixup phy address */
- pdata->phy_reg_addr += binfo->bi_immr_base;
- memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
+ if (pdata) {
+ pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
+ pdata->interruptPHY = MPC85xx_IRQ_EXT7;
+ pdata->phyid = 26;
+ /* fixup phy address */
+ pdata->phy_reg_addr += binfo->bi_immr_base;
+ memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
+ }
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start)
diff --git a/arch/ppc/platforms/85xx/stx_gp3.c b/arch/ppc/platforms/85xx/stx_gp3.c
--- a/arch/ppc/platforms/85xx/stx_gp3.c
+++ b/arch/ppc/platforms/85xx/stx_gp3.c
@@ -122,19 +122,23 @@ gp3_setup_arch(void)
/* setup the board related information for the enet controllers */
pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
-/* pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; */
- pdata->interruptPHY = MPC85xx_IRQ_EXT5;
- pdata->phyid = 2;
- pdata->phy_reg_addr += binfo->bi_immr_base;
- memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
+ if (pdata) {
+ /* pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; */
+ pdata->interruptPHY = MPC85xx_IRQ_EXT5;
+ pdata->phyid = 2;
+ pdata->phy_reg_addr += binfo->bi_immr_base;
+ memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
+ }
pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2);
-/* pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; */
- pdata->interruptPHY = MPC85xx_IRQ_EXT5;
- pdata->phyid = 4;
- /* fixup phy address */
- pdata->phy_reg_addr += binfo->bi_immr_base;
- memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
+ if (pdata) {
+ /* pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; */
+ pdata->interruptPHY = MPC85xx_IRQ_EXT5;
+ pdata->phyid = 4;
+ /* fixup phy address */
+ pdata->phy_reg_addr += binfo->bi_immr_base;
+ memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
+ }
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start)
^ permalink raw reply
* [PATCH] ppc32: Add support for Freescale e200 (Book-E) core
From: Kumar Gala @ 2005-06-22 20:41 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, linuxppc-embedded
The e200 core is a Book-E core (similar to e500) that has a unified L1
cache and is not cache coherent on the bus. The e200 core also adds a
separate exception level for debug exceptions. Part of this patch helps
to cleanup a few cases that are true for all Freescale Book-E parts, not
just e500.
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
---
commit 575a595c982d029b2921675c6344aa6b2295d058
tree cd6ba641e4d6b038bce0636c2d96f0117b522c8f
parent 2a5a68b840cbab31baab2d9b2e1e6de3b289ae1e
author Kumar K. Gala <kumar.gala@freescale.com> Wed, 22 Jun 2005 11:29:28 -0500
committer Kumar K. Gala <kumar.gala@freescale.com> Wed, 22 Jun 2005 11:29:28 -0500
arch/ppc/Kconfig | 17 ++++++----
arch/ppc/Makefile | 3 +-
arch/ppc/kernel/Makefile | 2 +
arch/ppc/kernel/cputable.c | 25 ++++++++++++++-
arch/ppc/kernel/entry.S | 9 +++++
arch/ppc/kernel/head_booke.h | 64 +++++++++++++++++++++++++++++++++++++-
arch/ppc/kernel/head_fsl_booke.S | 51 ++++++++++++++++++++++++++++++
arch/ppc/kernel/misc.S | 8 +++++
arch/ppc/kernel/perfmon.c | 2 +
arch/ppc/kernel/traps.c | 24 ++++++++++++--
arch/ppc/mm/fsl_booke_mmu.c | 2 +
include/asm-ppc/mmu.h | 2 +
include/asm-ppc/mmu_context.h | 2 +
include/asm-ppc/ppc_asm.h | 2 +
include/asm-ppc/reg.h | 1 +
include/asm-ppc/reg_booke.h | 18 ++++++++++-
16 files changed, 214 insertions(+), 18 deletions(-)
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -88,6 +88,9 @@ config 8xx
depends on BROKEN
bool "8xx"
+config E200
+ bool "e200"
+
config E500
bool "e500"
@@ -98,12 +101,12 @@ config PPC_FPU
config BOOKE
bool
- depends on E500
+ depends on E200 || E500
default y
config FSL_BOOKE
bool
- depends on E500
+ depends on E200 || E500
default y
config PTE_64BIT
@@ -141,16 +144,16 @@ config ALTIVEC
config SPE
bool "SPE Support"
- depends on E500
+ depends on E200 || E500
---help---
This option enables kernel support for the Signal Processing
Extensions (SPE) to the PowerPC processor. The kernel currently
supports saving and restoring SPE registers, and turning on the
'spe enable' bit so user processes can execute SPE instructions.
- This option is only usefully if you have a processor that supports
+ This option is only useful if you have a processor that supports
SPE (e500, otherwise known as 85xx series), but does not have any
- affect on a non-spe cpu (it does, however add code to the kernel).
+ effect on a non-spe cpu (it does, however add code to the kernel).
If in doubt, say Y here.
@@ -200,7 +203,7 @@ config TAU_AVERAGE
config MATH_EMULATION
bool "Math emulation"
- depends on 4xx || 8xx || E500
+ depends on 4xx || 8xx || E200 || E500
---help---
Some PowerPC chips designed for embedded applications do not have
a floating-point unit and therefore do not implement the
@@ -254,7 +257,7 @@ config PPC_STD_MMU
config NOT_COHERENT_CACHE
bool
- depends on 4xx || 8xx
+ depends on 4xx || 8xx || E200
default y
endmenu
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -29,7 +29,7 @@ CPP = $(CC) -E $(CFLAGS)
CHECKFLAGS += -D__powerpc__
-ifndef CONFIG_E500
+ifndef CONFIG_FSL_BOOKE
CFLAGS += -mstring
endif
@@ -38,6 +38,7 @@ cpu-as-$(CONFIG_4xx) += -Wa,-m405
cpu-as-$(CONFIG_6xx) += -Wa,-maltivec
cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec
cpu-as-$(CONFIG_E500) += -Wa,-me500
+cpu-as-$(CONFIG_E200) += -Wa,-me200
AFLAGS += $(cpu-as-y)
CFLAGS += $(cpu-as-y)
diff --git a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile
--- a/arch/ppc/kernel/Makefile
+++ b/arch/ppc/kernel/Makefile
@@ -26,7 +26,9 @@ obj-$(CONFIG_KGDB) += ppc-stub.o
obj-$(CONFIG_SMP) += smp.o smp-tbsync.o
obj-$(CONFIG_TAU) += temp.o
obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o
+ifndef CONFIG_E200
obj-$(CONFIG_FSL_BOOKE) += perfmon_fsl_booke.o
+endif
ifndef CONFIG_MATH_EMULATION
obj-$(CONFIG_8xx) += softemu8xx.o
diff --git a/arch/ppc/kernel/cputable.c b/arch/ppc/kernel/cputable.c
--- a/arch/ppc/kernel/cputable.c
+++ b/arch/ppc/kernel/cputable.c
@@ -903,7 +903,30 @@ struct cpu_spec cpu_specs[] = {
.dcache_bsize = 32,
},
#endif /* CONFIG_44x */
-#ifdef CONFIG_E500
+#ifdef CONFIG_FSL_BOOKE
+ { /* e200z5 */
+ .pvr_mask = 0xfff00000,
+ .pvr_value = 0x81000000,
+ .cpu_name = "e200z5",
+ /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
+ .cpu_features = CPU_FTR_USE_TB,
+ .cpu_user_features = PPC_FEATURE_32 |
+ PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_EFP_SINGLE |
+ PPC_FEATURE_UNIFIED_CACHE,
+ .dcache_bsize = 32,
+ },
+ { /* e200z6 */
+ .pvr_mask = 0xfff00000,
+ .pvr_value = 0x81100000,
+ .cpu_name = "e200z6",
+ /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
+ .cpu_features = CPU_FTR_USE_TB,
+ .cpu_user_features = PPC_FEATURE_32 |
+ PPC_FEATURE_HAS_MMU | PPC_FEATURE_SPE_COMP |
+ PPC_FEATURE_HAS_EFP_SINGLE |
+ PPC_FEATURE_UNIFIED_CACHE,
+ .dcache_bsize = 32,
+ },
{ /* e500 */
.pvr_mask = 0xffff0000,
.pvr_value = 0x80200000,
diff --git a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S
--- a/arch/ppc/kernel/entry.S
+++ b/arch/ppc/kernel/entry.S
@@ -60,6 +60,11 @@ mcheck_transfer_to_handler:
TRANSFER_TO_HANDLER_EXC_LEVEL(MCHECK)
b transfer_to_handler_full
+ .globl debug_transfer_to_handler
+debug_transfer_to_handler:
+ TRANSFER_TO_HANDLER_EXC_LEVEL(DEBUG)
+ b transfer_to_handler_full
+
.globl crit_transfer_to_handler
crit_transfer_to_handler:
TRANSFER_TO_HANDLER_EXC_LEVEL(CRIT)
@@ -835,6 +840,10 @@ ret_from_crit_exc:
RET_FROM_EXC_LEVEL(SPRN_CSRR0, SPRN_CSRR1, RFCI)
#ifdef CONFIG_BOOKE
+ .globl ret_from_debug_exc
+ret_from_debug_exc:
+ RET_FROM_EXC_LEVEL(SPRN_DSRR0, SPRN_DSRR1, RFDI)
+
.globl ret_from_mcheck_exc
ret_from_mcheck_exc:
RET_FROM_EXC_LEVEL(SPRN_MCSRR0, SPRN_MCSRR1, RFMCI)
diff --git a/arch/ppc/kernel/head_booke.h b/arch/ppc/kernel/head_booke.h
--- a/arch/ppc/kernel/head_booke.h
+++ b/arch/ppc/kernel/head_booke.h
@@ -49,6 +49,7 @@
*
* On 40x critical is the only additional level
* On 44x/e500 we have critical and machine check
+ * On e200 we have critical and debug (machine check occurs via critical)
*
* Additionally we reserve a SPRG for each priority level so we can free up a
* GPR to use as the base for indirect access to the exception stacks. This
@@ -60,12 +61,16 @@
/* CRIT_SPRG only used in critical exception handling */
#define CRIT_SPRG SPRN_SPRG2
-/* MCHECK_SPRG only used in critical exception handling */
+/* MCHECK_SPRG only used in machine check exception handling */
#define MCHECK_SPRG SPRN_SPRG6W
#define MCHECK_STACK_TOP (exception_stack_top - 4096)
#define CRIT_STACK_TOP (exception_stack_top)
+/* only on e200 for now */
+#define DEBUG_STACK_TOP (exception_stack_top - 4096)
+#define DEBUG_SPRG SPRN_SPRG6W
+
#ifdef CONFIG_SMP
#define BOOKE_LOAD_EXC_LEVEL_STACK(level) \
mfspr r8,SPRN_PIR; \
@@ -124,6 +129,8 @@
#define CRITICAL_EXCEPTION_PROLOG \
EXC_LEVEL_EXCEPTION_PROLOG(CRIT, SPRN_CSRR0, SPRN_CSRR1)
+#define DEBUG_EXCEPTION_PROLOG \
+ EXC_LEVEL_EXCEPTION_PROLOG(DEBUG, SPRN_DSRR0, SPRN_DSRR1)
#define MCHECK_EXCEPTION_PROLOG \
EXC_LEVEL_EXCEPTION_PROLOG(MCHECK, SPRN_MCSRR0, SPRN_MCSRR1)
@@ -205,6 +212,60 @@ label:
* save (and later restore) the MSR via SPRN_CSRR1, which will still have
* the MSR_DE bit set.
*/
+#ifdef CONFIG_E200
+#define DEBUG_EXCEPTION \
+ START_EXCEPTION(Debug); \
+ DEBUG_EXCEPTION_PROLOG; \
+ \
+ /* \
+ * If there is a single step or branch-taken exception in an \
+ * exception entry sequence, it was probably meant to apply to \
+ * the code where the exception occurred (since exception entry \
+ * doesn't turn off DE automatically). We simulate the effect \
+ * of turning off DE on entry to an exception handler by turning \
+ * off DE in the CSRR1 value and clearing the debug status. \
+ */ \
+ mfspr r10,SPRN_DBSR; /* check single-step/branch taken */ \
+ andis. r10,r10,DBSR_IC@h; \
+ beq+ 2f; \
+ \
+ lis r10,KERNELBASE@h; /* check if exception in vectors */ \
+ ori r10,r10,KERNELBASE@l; \
+ cmplw r12,r10; \
+ blt+ 2f; /* addr below exception vectors */ \
+ \
+ lis r10,Debug@h; \
+ ori r10,r10,Debug@l; \
+ cmplw r12,r10; \
+ bgt+ 2f; /* addr above exception vectors */ \
+ \
+ /* here it looks like we got an inappropriate debug exception. */ \
+1: rlwinm r9,r9,0,~MSR_DE; /* clear DE in the CDRR1 value */ \
+ lis r10,DBSR_IC@h; /* clear the IC event */ \
+ mtspr SPRN_DBSR,r10; \
+ /* restore state and get out */ \
+ lwz r10,_CCR(r11); \
+ lwz r0,GPR0(r11); \
+ lwz r1,GPR1(r11); \
+ mtcrf 0x80,r10; \
+ mtspr SPRN_DSRR0,r12; \
+ mtspr SPRN_DSRR1,r9; \
+ lwz r9,GPR9(r11); \
+ lwz r12,GPR12(r11); \
+ mtspr DEBUG_SPRG,r8; \
+ BOOKE_LOAD_EXC_LEVEL_STACK(DEBUG); /* r8 points to the debug stack */ \
+ lwz r10,GPR10-INT_FRAME_SIZE(r8); \
+ lwz r11,GPR11-INT_FRAME_SIZE(r8); \
+ mfspr r8,DEBUG_SPRG; \
+ \
+ RFDI; \
+ b .; \
+ \
+ /* continue normal handling for a critical exception... */ \
+2: mfspr r4,SPRN_DBSR; \
+ addi r3,r1,STACK_FRAME_OVERHEAD; \
+ EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, debug_transfer_to_handler, ret_from_debug_exc)
+#else
#define DEBUG_EXCEPTION \
START_EXCEPTION(Debug); \
CRITICAL_EXCEPTION_PROLOG; \
@@ -257,6 +318,7 @@ label:
2: mfspr r4,SPRN_DBSR; \
addi r3,r1,STACK_FRAME_OVERHEAD; \
EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, crit_transfer_to_handler, ret_from_crit_exc)
+#endif
#define INSTRUCTION_STORAGE_EXCEPTION \
START_EXCEPTION(InstructionStorage) \
diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S
--- a/arch/ppc/kernel/head_fsl_booke.S
+++ b/arch/ppc/kernel/head_fsl_booke.S
@@ -102,6 +102,7 @@ invstr: mflr r6 /* Make it accessible
or r7,r7,r4
mtspr SPRN_MAS6,r7
tlbsx 0,r6 /* search MSR[IS], SPID=PID0 */
+#ifndef CONFIG_E200
mfspr r7,SPRN_MAS1
andis. r7,r7,MAS1_VALID@h
bne match_TLB
@@ -118,6 +119,7 @@ invstr: mflr r6 /* Make it accessible
or r7,r7,r4
mtspr SPRN_MAS6,r7
tlbsx 0,r6 /* Fall through, we had to match */
+#endif
match_TLB:
mfspr r7,SPRN_MAS0
rlwinm r3,r7,16,20,31 /* Extract MAS0(Entry) */
@@ -196,8 +198,10 @@ skpinv: addi r6,r6,1 /* Increment */
/* 4. Clear out PIDs & Search info */
li r6,0
mtspr SPRN_PID0,r6
+#ifndef CONFIG_E200
mtspr SPRN_PID1,r6
mtspr SPRN_PID2,r6
+#endif
mtspr SPRN_MAS6,r6
/* 5. Invalidate mapping we started in */
@@ -277,7 +281,9 @@ skpinv: addi r6,r6,1 /* Increment */
SET_IVOR(32, SPEUnavailable);
SET_IVOR(33, SPEFloatingPointData);
SET_IVOR(34, SPEFloatingPointRound);
+#ifndef CONFIG_E200
SET_IVOR(35, PerformanceMonitor);
+#endif
/* Establish the interrupt vector base */
lis r4,interrupt_base@h /* IVPR only uses the high 16-bits */
@@ -285,6 +291,9 @@ skpinv: addi r6,r6,1 /* Increment */
/* Setup the defaults for TLB entries */
li r2,(MAS4_TSIZED(BOOKE_PAGESZ_4K))@l
+#ifdef CONFIG_E200
+ oris r2,r2,MAS4_TLBSELD(1)@h
+#endif
mtspr SPRN_MAS4, r2
#if 0
@@ -293,6 +302,12 @@ skpinv: addi r6,r6,1 /* Increment */
oris r2,r2,HID0_DOZE@h
mtspr SPRN_HID0, r2
#endif
+#ifdef CONFIG_E200
+ /* enable dedicated debug exception handling resources (Debug APU) */
+ mfspr r2,SPRN_HID0
+ ori r2,r2,HID0_DAPUEN@l
+ mtspr SPRN_HID0,r2
+#endif
#if !defined(CONFIG_BDI_SWITCH)
/*
@@ -414,7 +429,12 @@ interrupt_base:
CRITICAL_EXCEPTION(0x0100, CriticalInput, UnknownException)
/* Machine Check Interrupt */
+#ifdef CONFIG_E200
+ /* no RFMCI, MCSRRs on E200 */
+ CRITICAL_EXCEPTION(0x0200, MachineCheck, MachineCheckException)
+#else
MCHECK_EXCEPTION(0x0200, MachineCheck, MachineCheckException)
+#endif
/* Data Storage Interrupt */
START_EXCEPTION(DataStorage)
@@ -520,8 +540,13 @@ interrupt_base:
#ifdef CONFIG_PPC_FPU
FP_UNAVAILABLE_EXCEPTION
#else
+#ifdef CONFIG_E200
+ /* E200 treats 'normal' floating point instructions as FP Unavail exception */
+ EXCEPTION(0x0800, FloatingPointUnavailable, ProgramCheckException, EXC_XFER_EE)
+#else
EXCEPTION(0x0800, FloatingPointUnavailable, UnknownException, EXC_XFER_EE)
#endif
+#endif
/* System Call Interrupt */
START_EXCEPTION(SystemCall)
@@ -691,6 +716,7 @@ interrupt_base:
/*
* Local functions
*/
+
/*
* Data TLB exceptions will bail out to this point
* if they can't resolve the lightweight TLB fault.
@@ -761,6 +787,31 @@ END_FTR_SECTION_IFSET(CPU_FTR_BIG_PHYS)
2: rlwimi r11, r12, 0, 20, 31 /* Extract RPN from PTE and merge with perms */
mtspr SPRN_MAS3, r11
#endif
+#ifdef CONFIG_E200
+ /* Round robin TLB1 entries assignment */
+ mfspr r12, SPRN_MAS0
+
+ /* Extract TLB1CFG(NENTRY) */
+ mfspr r11, SPRN_TLB1CFG
+ andi. r11, r11, 0xfff
+
+ /* Extract MAS0(NV) */
+ andi. r13, r12, 0xfff
+ addi r13, r13, 1
+ cmpw 0, r13, r11
+ addi r12, r12, 1
+
+ /* check if we need to wrap */
+ blt 7f
+
+ /* wrap back to first free tlbcam entry */
+ lis r13, tlbcam_index@ha
+ lwz r13, tlbcam_index@l(r13)
+ rlwimi r12, r13, 0, 20, 31
+7:
+ mtspr SPRN_MAS0,r12
+#endif /* CONFIG_E200 */
+
tlbwe
/* Done...restore registers and get out of here. */
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S
--- a/arch/ppc/kernel/misc.S
+++ b/arch/ppc/kernel/misc.S
@@ -593,6 +593,14 @@ _GLOBAL(flush_instruction_cache)
iccci 0,r3
#endif
#elif CONFIG_FSL_BOOKE
+BEGIN_FTR_SECTION
+ mfspr r3,SPRN_L1CSR0
+ ori r3,r3,L1CSR0_CFI|L1CSR0_CLFC
+ /* msync; isync recommended here */
+ mtspr SPRN_L1CSR0,r3
+ isync
+ blr
+END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE)
mfspr r3,SPRN_L1CSR1
ori r3,r3,L1CSR1_ICFI|L1CSR1_ICLFR
mtspr SPRN_L1CSR1,r3
diff --git a/arch/ppc/kernel/perfmon.c b/arch/ppc/kernel/perfmon.c
--- a/arch/ppc/kernel/perfmon.c
+++ b/arch/ppc/kernel/perfmon.c
@@ -36,7 +36,7 @@
/* A lock to regulate grabbing the interrupt */
DEFINE_SPINLOCK(perfmon_lock);
-#ifdef CONFIG_FSL_BOOKE
+#if defined (CONFIG_FSL_BOOKE) && !defined (CONFIG_E200)
static void dummy_perf(struct pt_regs *regs)
{
unsigned int pmgc0 = mfpmr(PMRN_PMGC0);
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c
--- a/arch/ppc/kernel/traps.c
+++ b/arch/ppc/kernel/traps.c
@@ -173,13 +173,13 @@ static inline int check_io_access(struct
/* On 4xx, the reason for the machine check or program exception
is in the ESR. */
#define get_reason(regs) ((regs)->dsisr)
-#ifndef CONFIG_E500
+#ifndef CONFIG_FSL_BOOKE
#define get_mc_reason(regs) ((regs)->dsisr)
#else
#define get_mc_reason(regs) (mfspr(SPRN_MCSR))
#endif
#define REASON_FP ESR_FP
-#define REASON_ILLEGAL ESR_PIL
+#define REASON_ILLEGAL (ESR_PIL | ESR_PUO)
#define REASON_PRIVILEGED ESR_PPR
#define REASON_TRAP ESR_PTR
@@ -302,7 +302,25 @@ void MachineCheckException(struct pt_reg
printk("Bus - Instruction Parity Error\n");
if (reason & MCSR_BUS_RPERR)
printk("Bus - Read Parity Error\n");
-#else /* !CONFIG_4xx && !CONFIG_E500 */
+#elif defined (CONFIG_E200)
+ printk("Machine check in kernel mode.\n");
+ printk("Caused by (from MCSR=%lx): ", reason);
+
+ if (reason & MCSR_MCP)
+ printk("Machine Check Signal\n");
+ if (reason & MCSR_CP_PERR)
+ printk("Cache Push Parity Error\n");
+ if (reason & MCSR_CPERR)
+ printk("Cache Parity Error\n");
+ if (reason & MCSR_EXCP_ERR)
+ printk("ISI, ITLB, or Bus Error on first instruction fetch for an exception handler\n");
+ if (reason & MCSR_BUS_IRERR)
+ printk("Bus - Read Bus Error on instruction fetch\n");
+ if (reason & MCSR_BUS_DRERR)
+ printk("Bus - Read Bus Error on data load\n");
+ if (reason & MCSR_BUS_WRERR)
+ printk("Bus - Write Bus Error on buffered store or cache line push\n");
+#else /* !CONFIG_4xx && !CONFIG_E500 && !CONFIG_E200 */
printk("Machine check in kernel mode.\n");
printk("Caused by (from SRR1=%lx): ", reason);
switch (reason & 0x601F0000) {
diff --git a/arch/ppc/mm/fsl_booke_mmu.c b/arch/ppc/mm/fsl_booke_mmu.c
--- a/arch/ppc/mm/fsl_booke_mmu.c
+++ b/arch/ppc/mm/fsl_booke_mmu.c
@@ -126,7 +126,7 @@ void settlbcam(int index, unsigned long
flags |= _PAGE_COHERENT;
#endif
- TLBCAM[index].MAS0 = MAS0_TLBSEL(1) | MAS0_ESEL(index);
+ TLBCAM[index].MAS0 = MAS0_TLBSEL(1) | MAS0_ESEL(index) | MAS0_NV(index+1);
TLBCAM[index].MAS1 = MAS1_VALID | MAS1_IPROT | MAS1_TSIZE(tsize) | MAS1_TID(pid);
TLBCAM[index].MAS2 = virt & PAGE_MASK;
diff --git a/include/asm-ppc/mmu.h b/include/asm-ppc/mmu.h
--- a/include/asm-ppc/mmu.h
+++ b/include/asm-ppc/mmu.h
@@ -405,7 +405,7 @@ typedef struct _P601_BAT {
#define MAS0_TLBSEL(x) ((x << 28) & 0x30000000)
#define MAS0_ESEL(x) ((x << 16) & 0x0FFF0000)
-#define MAS0_NV 0x00000FFF
+#define MAS0_NV(x) ((x) & 0x00000FFF)
#define MAS1_VALID 0x80000000
#define MAS1_IPROT 0x40000000
diff --git a/include/asm-ppc/mmu_context.h b/include/asm-ppc/mmu_context.h
--- a/include/asm-ppc/mmu_context.h
+++ b/include/asm-ppc/mmu_context.h
@@ -63,7 +63,7 @@ static inline void enter_lazy_tlb(struct
#define LAST_CONTEXT 255
#define FIRST_CONTEXT 1
-#elif defined(CONFIG_E500)
+#elif defined(CONFIG_E200) || defined(CONFIG_E500)
#define NO_CONTEXT 256
#define LAST_CONTEXT 255
#define FIRST_CONTEXT 1
diff --git a/include/asm-ppc/ppc_asm.h b/include/asm-ppc/ppc_asm.h
--- a/include/asm-ppc/ppc_asm.h
+++ b/include/asm-ppc/ppc_asm.h
@@ -174,6 +174,8 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601)
#define CLR_TOP32(r)
#endif /* CONFIG_PPC64BRIDGE */
+#define RFCI .long 0x4c000066 /* rfci instruction */
+#define RFDI .long 0x4c00004e /* rfdi instruction */
#define RFMCI .long 0x4c00004c /* rfmci instruction */
#ifdef CONFIG_IBM405_ERR77
diff --git a/include/asm-ppc/reg.h b/include/asm-ppc/reg.h
--- a/include/asm-ppc/reg.h
+++ b/include/asm-ppc/reg.h
@@ -160,6 +160,7 @@
#define HID0_ICFI (1<<11) /* Instr. Cache Flash Invalidate */
#define HID0_DCI (1<<10) /* Data Cache Invalidate */
#define HID0_SPD (1<<9) /* Speculative disable */
+#define HID0_DAPUEN (1<<8) /* Debug APU enable */
#define HID0_SGE (1<<7) /* Store Gathering Enable */
#define HID0_SIED (1<<7) /* Serial Instr. Execution [Disable] */
#define HID0_DFCA (1<<6) /* Data Cache Flush Assist */
diff --git a/include/asm-ppc/reg_booke.h b/include/asm-ppc/reg_booke.h
--- a/include/asm-ppc/reg_booke.h
+++ b/include/asm-ppc/reg_booke.h
@@ -165,6 +165,8 @@ do { \
#define SPRN_MCSRR1 0x23B /* Machine Check Save and Restore Register 1 */
#define SPRN_MCSR 0x23C /* Machine Check Status Register */
#define SPRN_MCAR 0x23D /* Machine Check Address Register */
+#define SPRN_DSRR0 0x23E /* Debug Save and Restore Register 0 */
+#define SPRN_DSRR1 0x23F /* Debug Save and Restore Register 1 */
#define SPRN_MAS0 0x270 /* MMU Assist Register 0 */
#define SPRN_MAS1 0x271 /* MMU Assist Register 1 */
#define SPRN_MAS2 0x272 /* MMU Assist Register 2 */
@@ -264,6 +266,17 @@ do { \
#define MCSR_BUS_IPERR 0x00000002UL /* Instruction parity Error */
#define MCSR_BUS_RPERR 0x00000001UL /* Read parity Error */
#endif
+#ifdef CONFIG_E200
+#define MCSR_MCP 0x80000000UL /* Machine Check Input Pin */
+#define MCSR_CP_PERR 0x20000000UL /* Cache Push Parity Error */
+#define MCSR_CPERR 0x10000000UL /* Cache Parity Error */
+#define MCSR_EXCP_ERR 0x08000000UL /* ISI, ITLB, or Bus Error on 1st insn
+ fetch for an exception handler */
+#define MCSR_BUS_IRERR 0x00000010UL /* Read Bus Error on instruction fetch*/
+#define MCSR_BUS_DRERR 0x00000008UL /* Read Bus Error on data load */
+#define MCSR_BUS_WRERR 0x00000004UL /* Write Bus Error on buffered
+ store or cache line push */
+#endif
/* Bit definitions for the DBSR. */
/*
@@ -311,6 +324,7 @@ do { \
#define ESR_ST 0x00800000 /* Store Operation */
#define ESR_DLK 0x00200000 /* Data Cache Locking */
#define ESR_ILK 0x00100000 /* Instr. Cache Locking */
+#define ESR_PUO 0x00040000 /* Unimplemented Operation exception */
#define ESR_BO 0x00020000 /* Byte Ordering */
/* Bit definitions related to the DBCR0. */
@@ -387,10 +401,12 @@ do { \
#define ICCR_CACHE 1 /* Cacheable */
/* Bit definitions for L1CSR0. */
+#define L1CSR0_CLFC 0x00000100 /* Cache Lock Bits Flash Clear */
#define L1CSR0_DCFI 0x00000002 /* Data Cache Flash Invalidate */
+#define L1CSR0_CFI 0x00000002 /* Cache Flash Invalidate */
#define L1CSR0_DCE 0x00000001 /* Data Cache Enable */
-/* Bit definitions for L1CSR0. */
+/* Bit definitions for L1CSR1. */
#define L1CSR1_ICLFR 0x00000100 /* Instr Cache Lock Bits Flash Reset */
#define L1CSR1_ICFI 0x00000002 /* Instr Cache Flash Invalidate */
#define L1CSR1_ICE 0x00000001 /* Instr Cache Enable */
^ permalink raw reply
* [PATCH] ppc32: Remove FSL OCP support
From: Kumar Gala @ 2005-06-22 21:07 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, linuxppc-embedded
Support for the OCP device model on Freescale (FSL) PPC's is no
longer used. All FSL PPC's that were using OCP have be converted
to using the platform device model.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
---
commit 0db0912993b08ae4870aa370db5e5e6f83f2c5a3
tree 43ce59fdb048f1cfdc13972d4524d8378e2d73b3
parent 8589d0b1ac6dc3ab9aaee30eb943c2d231e28685
author Kumar K. Gala <kumar.gala@freescale.com> Wed, 22 Jun 2005 17:45:05 -0500
committer Kumar K. Gala <kumar.gala@freescale.com> Wed, 22 Jun 2005 17:45:05 -0500
arch/ppc/Kconfig.debug | 2 +-
include/asm-ppc/fsl_ocp.h | 54 ---------------------------------------------
include/asm-ppc/ocp.h | 4 ---
3 files changed, 1 insertions(+), 59 deletions(-)
diff --git a/arch/ppc/Kconfig.debug b/arch/ppc/Kconfig.debug
--- a/arch/ppc/Kconfig.debug
+++ b/arch/ppc/Kconfig.debug
@@ -66,7 +66,7 @@ config SERIAL_TEXT_DEBUG
config PPC_OCP
bool
- depends on IBM_OCP || FSL_OCP || XILINX_OCP
+ depends on IBM_OCP || XILINX_OCP
default y
endmenu
diff --git a/include/asm-ppc/fsl_ocp.h b/include/asm-ppc/fsl_ocp.h
deleted file mode 100644
--- a/include/asm-ppc/fsl_ocp.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * include/asm-ppc/fsl_ocp.h
- *
- * Definitions for the on-chip peripherals on Freescale PPC processors
- *
- * Maintainer: Kumar Gala (kumar.gala@freescale.com)
- *
- * Copyright 2004 Freescale Semiconductor, Inc
- *
- * 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.
- */
-
-#ifdef __KERNEL__
-#ifndef __ASM_FS_OCP_H__
-#define __ASM_FS_OCP_H__
-
-/* A table of information for supporting the Gianfar Ethernet Controller
- * This helps identify which enet controller we are dealing with,
- * and what type of enet controller it is
- */
-struct ocp_gfar_data {
- uint interruptTransmit;
- uint interruptError;
- uint interruptReceive;
- uint interruptPHY;
- uint flags;
- uint phyid;
- uint phyregidx;
- unsigned char mac_addr[6];
-};
-
-/* Flags in the flags field */
-#define GFAR_HAS_COALESCE 0x20
-#define GFAR_HAS_RMON 0x10
-#define GFAR_HAS_MULTI_INTR 0x08
-#define GFAR_FIRM_SET_MACADDR 0x04
-#define GFAR_HAS_PHY_INTR 0x02 /* if not set use a timer */
-#define GFAR_HAS_GIGABIT 0x01
-
-/* Data structure for I2C support. Just contains a couple flags
- * to distinguish various I2C implementations*/
-struct ocp_fs_i2c_data {
- uint flags;
-};
-
-/* Flags for I2C */
-#define FS_I2C_SEPARATE_DFSRR 0x02
-#define FS_I2C_CLOCK_5200 0x01
-
-#endif /* __ASM_FS_OCP_H__ */
-#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/ocp.h b/include/asm-ppc/ocp.h
--- a/include/asm-ppc/ocp.h
+++ b/include/asm-ppc/ocp.h
@@ -202,10 +202,6 @@ static DEVICE_ATTR(name##_##field, S_IRU
#include <asm/ibm_ocp.h>
#endif
-#ifdef CONFIG_FSL_OCP
-#include <asm/fsl_ocp.h>
-#endif
-
#endif /* CONFIG_PPC_OCP */
#endif /* __OCP_H__ */
#endif /* __KERNEL__ */
^ permalink raw reply
* [PATCH] I2C-MPC: Remove OCP device model support
From: Kumar Gala @ 2005-06-22 21:09 UTC (permalink / raw)
To: Greg KH; +Cc: sensors, linux-kernel, linuxppc-embedded
All consumers of the driver MPC10x, MPC52xx, MPC824x, MPC83xx,
and MPC85xx are all using platform devices. We can get ride of
the dead code to support using this driver with the old OCP based
model
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
---
commit 8589d0b1ac6dc3ab9aaee30eb943c2d231e28685
tree 1b9b8e9193c4118d652e70138bf389f9d771ff03
parent 96590616b248746bfc06dad1cb5b956b006f8926
author Kumar K. Gala <kumar.gala@freescale.com> Wed, 22 Jun 2005 17:35:30 -0500
committer Kumar K. Gala <kumar.gala@freescale.com> Wed, 22 Jun 2005 17:35:30 -0500
drivers/i2c/busses/i2c-mpc.c | 204 ------------------------------------------
1 files changed, 0 insertions(+), 204 deletions(-)
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -20,13 +20,7 @@
#include <linux/init.h>
#include <linux/pci.h>
#include <asm/io.h>
-#ifdef CONFIG_FSL_OCP
-#include <asm/ocp.h>
-#define FSL_I2C_DEV_SEPARATE_DFSRR FS_I2C_SEPARATE_DFSRR
-#define FSL_I2C_DEV_CLOCK_5200 FS_I2C_CLOCK_5200
-#else
#include <linux/fsl_devices.h>
-#endif
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
@@ -293,204 +287,6 @@ static struct i2c_adapter mpc_ops = {
.timeout = 1,
.retries = 1
};
-
-#ifdef CONFIG_FSL_OCP
-static int __devinit mpc_i2c_probe(struct ocp_device *ocp)
-{
- int result = 0;
- struct mpc_i2c *i2c;
-
- if (!(i2c = kmalloc(sizeof(*i2c), GFP_KERNEL))) {
- return -ENOMEM;
- }
- memset(i2c, 0, sizeof(*i2c));
-
- i2c->irq = ocp->def->irq;
- i2c->flags = ((struct ocp_fs_i2c_data *)ocp->def->additions)->flags;
- init_waitqueue_head(&i2c->queue);
-
- if (!request_mem_region(ocp->def->paddr, MPC_I2C_REGION, "i2c-mpc")) {
- printk(KERN_ERR "i2c-mpc - resource unavailable\n");
- return -ENODEV;
- }
-
- i2c->base = ioremap(ocp->def->paddr, MPC_I2C_REGION);
-
- if (!i2c->base) {
- printk(KERN_ERR "i2c-mpc - failed to map controller\n");
- result = -ENOMEM;
- goto fail_map;
- }
-
- if (i2c->irq != OCP_IRQ_NA)
- {
- if ((result = request_irq(ocp->def->irq, mpc_i2c_isr,
- SA_SHIRQ, "i2c-mpc", i2c)) < 0) {
- printk(KERN_ERR
- "i2c-mpc - failed to attach interrupt\n");
- goto fail_irq;
- }
- } else
- i2c->irq = 0;
-
- mpc_i2c_setclock(i2c);
- ocp_set_drvdata(ocp, i2c);
-
- i2c->adap = mpc_ops;
- i2c_set_adapdata(&i2c->adap, i2c);
-
- if ((result = i2c_add_adapter(&i2c->adap)) < 0) {
- printk(KERN_ERR "i2c-mpc - failed to add adapter\n");
- goto fail_add;
- }
-
- return result;
-
- fail_add:
- if (ocp->def->irq != OCP_IRQ_NA)
- free_irq(ocp->def->irq, 0);
- fail_irq:
- iounmap(i2c->base);
- fail_map:
- release_mem_region(ocp->def->paddr, MPC_I2C_REGION);
- kfree(i2c);
- return result;
-}
-static void __devexit mpc_i2c_remove(struct ocp_device *ocp)
-{
- struct mpc_i2c *i2c = ocp_get_drvdata(ocp);
- i2c_del_adapter(&i2c->adap);
- ocp_set_drvdata(ocp, NULL);
-
- if (ocp->def->irq != OCP_IRQ_NA)
- free_irq(i2c->irq, i2c);
- iounmap(i2c->base);
- release_mem_region(ocp->def->paddr, MPC_I2C_REGION);
- kfree(i2c);
-}
-
-static struct ocp_device_id mpc_iic_ids[] __devinitdata = {
- {.vendor = OCP_VENDOR_FREESCALE,.function = OCP_FUNC_IIC},
- {.vendor = OCP_VENDOR_INVALID}
-};
-
-MODULE_DEVICE_TABLE(ocp, mpc_iic_ids);
-
-static struct ocp_driver mpc_iic_driver = {
- .name = "iic",
- .id_table = mpc_iic_ids,
- .probe = mpc_i2c_probe,
- .remove = __devexit_p(mpc_i2c_remove)
-};
-
-static int __init iic_init(void)
-{
- return ocp_register_driver(&mpc_iic_driver);
-}
-
-static void __exit iic_exit(void)
-{
- ocp_unregister_driver(&mpc_iic_driver);
-}
-
-module_init(iic_init);
-module_exit(iic_exit);
-#else
-static int fsl_i2c_probe(struct device *device)
-{
- int result = 0;
- struct mpc_i2c *i2c;
- struct platform_device *pdev = to_platform_device(device);
- struct fsl_i2c_platform_data *pdata;
- struct resource *r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
- pdata = (struct fsl_i2c_platform_data *) pdev->dev.platform_data;
-
- if (!(i2c = kmalloc(sizeof(*i2c), GFP_KERNEL))) {
- return -ENOMEM;
- }
- memset(i2c, 0, sizeof(*i2c));
-
- i2c->irq = platform_get_irq(pdev, 0);
- i2c->flags = pdata->device_flags;
- init_waitqueue_head(&i2c->queue);
-
- i2c->base = ioremap((phys_addr_t)r->start, MPC_I2C_REGION);
-
- if (!i2c->base) {
- printk(KERN_ERR "i2c-mpc - failed to map controller\n");
- result = -ENOMEM;
- goto fail_map;
- }
-
- if (i2c->irq != 0)
- if ((result = request_irq(i2c->irq, mpc_i2c_isr,
- SA_SHIRQ, "i2c-mpc", i2c)) < 0) {
- printk(KERN_ERR
- "i2c-mpc - failed to attach interrupt\n");
- goto fail_irq;
- }
-
- mpc_i2c_setclock(i2c);
- dev_set_drvdata(device, i2c);
-
- i2c->adap = mpc_ops;
- i2c_set_adapdata(&i2c->adap, i2c);
- i2c->adap.dev.parent = &pdev->dev;
- if ((result = i2c_add_adapter(&i2c->adap)) < 0) {
- printk(KERN_ERR "i2c-mpc - failed to add adapter\n");
- goto fail_add;
- }
-
- return result;
-
- fail_add:
- if (i2c->irq != 0)
- free_irq(i2c->irq, NULL);
- fail_irq:
- iounmap(i2c->base);
- fail_map:
- kfree(i2c);
- return result;
-};
-
-static int fsl_i2c_remove(struct device *device)
-{
- struct mpc_i2c *i2c = dev_get_drvdata(device);
-
- i2c_del_adapter(&i2c->adap);
- dev_set_drvdata(device, NULL);
-
- if (i2c->irq != 0)
- free_irq(i2c->irq, i2c);
-
- iounmap(i2c->base);
- kfree(i2c);
- return 0;
-};
-
-/* Structure for a device driver */
-static struct device_driver fsl_i2c_driver = {
- .name = "fsl-i2c",
- .bus = &platform_bus_type,
- .probe = fsl_i2c_probe,
- .remove = fsl_i2c_remove,
-};
-
-static int __init fsl_i2c_init(void)
-{
- return driver_register(&fsl_i2c_driver);
-}
-
-static void __exit fsl_i2c_exit(void)
-{
- driver_unregister(&fsl_i2c_driver);
-}
-
-module_init(fsl_i2c_init);
-module_exit(fsl_i2c_exit);
-
-#endif /* CONFIG_FSL_OCP */
MODULE_AUTHOR("Adrian Cox <adrian@humboldt.co.uk>");
MODULE_DESCRIPTION
^ permalink raw reply
* [PATCH] ppc32: remove some unnecessary includes of bootmem.h
From: Kumar Gala @ 2005-06-22 21:27 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, linuxppc-embedded
Continue the Good Fight: Limit bootmem.h include creep.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
---
commit abb3b231caa4b32fbd41dc5d59e09754854b786f
tree ec2bfdad42d1227f3aabee400a6a6c6e277a756f
parent 0db0912993b08ae4870aa370db5e5e6f83f2c5a3
author Kumar K. Gala <kumar.gala@freescale.com> Wed, 22 Jun 2005 18:05:00 -0500
committer Kumar K. Gala <kumar.gala@freescale.com> Wed, 22 Jun 2005 18:05:00 -0500
arch/ppc/mm/44x_mmu.c | 1 -
arch/ppc/mm/4xx_mmu.c | 1 -
arch/ppc/mm/fsl_booke_mmu.c | 1 -
arch/ppc/platforms/chrp_pci.c | 1 -
arch/ppc/platforms/katana.c | 2 +-
arch/ppc/platforms/pmac_pci.c | 1 -
arch/ppc/syslib/cpm2_common.c | 2 +-
arch/ppc/syslib/indirect_pci.c | 1 -
arch/ppc/syslib/mv64x60.c | 1 -
arch/ppc/syslib/mv64x60_win.c | 1 -
10 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/arch/ppc/mm/44x_mmu.c b/arch/ppc/mm/44x_mmu.c
--- a/arch/ppc/mm/44x_mmu.c
+++ b/arch/ppc/mm/44x_mmu.c
@@ -39,7 +39,6 @@
#include <linux/vmalloc.h>
#include <linux/init.h>
#include <linux/delay.h>
-#include <linux/bootmem.h>
#include <linux/highmem.h>
#include <asm/pgalloc.h>
diff --git a/arch/ppc/mm/4xx_mmu.c b/arch/ppc/mm/4xx_mmu.c
--- a/arch/ppc/mm/4xx_mmu.c
+++ b/arch/ppc/mm/4xx_mmu.c
@@ -36,7 +36,6 @@
#include <linux/vmalloc.h>
#include <linux/init.h>
#include <linux/delay.h>
-#include <linux/bootmem.h>
#include <linux/highmem.h>
#include <asm/pgalloc.h>
diff --git a/arch/ppc/mm/fsl_booke_mmu.c b/arch/ppc/mm/fsl_booke_mmu.c
--- a/arch/ppc/mm/fsl_booke_mmu.c
+++ b/arch/ppc/mm/fsl_booke_mmu.c
@@ -41,7 +41,6 @@
#include <linux/vmalloc.h>
#include <linux/init.h>
#include <linux/delay.h>
-#include <linux/bootmem.h>
#include <linux/highmem.h>
#include <asm/pgalloc.h>
diff --git a/arch/ppc/platforms/chrp_pci.c b/arch/ppc/platforms/chrp_pci.c
--- a/arch/ppc/platforms/chrp_pci.c
+++ b/arch/ppc/platforms/chrp_pci.c
@@ -9,7 +9,6 @@
#include <linux/string.h>
#include <linux/init.h>
#include <linux/ide.h>
-#include <linux/bootmem.h>
#include <asm/io.h>
#include <asm/pgtable.h>
diff --git a/arch/ppc/platforms/katana.c b/arch/ppc/platforms/katana.c
--- a/arch/ppc/platforms/katana.c
+++ b/arch/ppc/platforms/katana.c
@@ -27,12 +27,12 @@
#include <linux/root_dev.h>
#include <linux/delay.h>
#include <linux/seq_file.h>
-#include <linux/bootmem.h>
#include <linux/mtd/physmap.h>
#include <linux/mv643xx.h>
#ifdef CONFIG_BOOTIMG
#include <linux/bootimg.h>
#endif
+#include <asm/io.h>
#include <asm/page.h>
#include <asm/time.h>
#include <asm/smp.h>
diff --git a/arch/ppc/platforms/pmac_pci.c b/arch/ppc/platforms/pmac_pci.c
--- a/arch/ppc/platforms/pmac_pci.c
+++ b/arch/ppc/platforms/pmac_pci.c
@@ -17,7 +17,6 @@
#include <linux/delay.h>
#include <linux/string.h>
#include <linux/init.h>
-#include <linux/bootmem.h>
#include <asm/sections.h>
#include <asm/io.h>
diff --git a/arch/ppc/syslib/cpm2_common.c b/arch/ppc/syslib/cpm2_common.c
--- a/arch/ppc/syslib/cpm2_common.c
+++ b/arch/ppc/syslib/cpm2_common.c
@@ -21,8 +21,8 @@
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
-#include <linux/bootmem.h>
#include <linux/module.h>
+#include <asm/io.h>
#include <asm/irq.h>
#include <asm/mpc8260.h>
#include <asm/page.h>
diff --git a/arch/ppc/syslib/indirect_pci.c b/arch/ppc/syslib/indirect_pci.c
--- a/arch/ppc/syslib/indirect_pci.c
+++ b/arch/ppc/syslib/indirect_pci.c
@@ -14,7 +14,6 @@
#include <linux/delay.h>
#include <linux/string.h>
#include <linux/init.h>
-#include <linux/bootmem.h>
#include <asm/io.h>
#include <asm/prom.h>
diff --git a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c
--- a/arch/ppc/syslib/mv64x60.c
+++ b/arch/ppc/syslib/mv64x60.c
@@ -17,7 +17,6 @@
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/string.h>
-#include <linux/bootmem.h>
#include <linux/spinlock.h>
#include <linux/mv643xx.h>
diff --git a/arch/ppc/syslib/mv64x60_win.c b/arch/ppc/syslib/mv64x60_win.c
--- a/arch/ppc/syslib/mv64x60_win.c
+++ b/arch/ppc/syslib/mv64x60_win.c
@@ -17,7 +17,6 @@
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/string.h>
-#include <linux/bootmem.h>
#include <linux/mv643xx.h>
#include <asm/byteorder.h>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox