<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">


<META content="MSHTML 6.00.2800.1491" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2>MPC83xx cpu has two PCI buses. This patch adds 
support for them.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>After system boot. The code initializes PCI 
inbound/outbound<BR>windows, allocate and register PCI memory/io space. Be 
aware<BR>that this patch depand on the firmware.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Signed-off-by: Tony Li &lt;<A 
href="mailto:tony.li@freescale.com">tony.li@freescale.com</A>&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>---<BR>author Tony Li &lt;<A 
href="mailto:tony.li@freescale.com">tony.li@freescale.com</A>&gt; Tue, 30 Aug 
2005<BR>committer Tony Li &lt;<A 
href="mailto:tony.li@freescale.com">tony.li@freescale.com</A>&gt; Tue, 30 Aug 
2005</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>diff -urN -X dontdiff 
linux-2.6.13-rc6/arch/ppc/Kconfig linux-2.6.13-rc6-pci/arch/ppc/Kconfig<BR>--- 
linux-2.6.13-rc6/arch/ppc/Kconfig&nbsp;2005-08-09 18:00:47.000000000 
+0800<BR>+++ linux-2.6.13-rc6-pci/arch/ppc/Kconfig&nbsp;2005-08-19 
18:17:27.000000000 +0800<BR>@@ -712,6 +712,11 @@<BR>&nbsp;&nbsp;bool "Freescale 
MPC834x SYS"<BR>&nbsp;&nbsp;help<BR>&nbsp;&nbsp;&nbsp; This option enables 
support for the MPC 834x SYS evaluation board.<BR>+&nbsp;&nbsp; Be aware that 
PCI buses can only function when SYS board is plugged on<BR>+&nbsp;&nbsp; PIB 
(Platform IO Board) board from Freescale which provide 3 PCI 
slots.<BR>+&nbsp;&nbsp; Just like PC,the board level initalization is 
bootloader`s responsiblilty.<BR>+&nbsp;&nbsp; The PCI deponds on bootloader 
configurate board corretly. Refer to Freescale<BR>+&nbsp;&nbsp; to get more 
information about this. <BR>&nbsp;<BR>&nbsp;endchoice<BR>&nbsp;<BR>@@ -1191,6 
+1196,10 @@<BR>&nbsp;&nbsp;bool<BR>&nbsp;&nbsp;default PCI<BR>&nbsp;<BR>+config 
MPC834x_PCI2<BR>+&nbsp;bool<BR>+&nbsp;default y if PCI &amp;&amp; 
MPC834x_SYS<BR>+<BR>&nbsp;config PCI_QSPAN<BR>&nbsp;&nbsp;bool "QSpan 
PCI"<BR>&nbsp;&nbsp;depends on !4xx &amp;&amp; !CPM2 &amp;&amp; 8xx<BR>diff -urN 
-X dontdiff linux-2.6.13-rc6/arch/ppc/platforms/83xx/mpc834x_sys.c 
linux-2.6.13-rc6-pci/arch/ppc/platforms/83xx/mpc834x_sys.c<BR>--- 
linux-2.6.13-rc6/arch/ppc/platforms/83xx/mpc834x_sys.c&nbsp;2005-08-09 
18:00:47.000000000 +0800<BR>+++ 
linux-2.6.13-rc6-pci/arch/ppc/platforms/83xx/mpc834x_sys.c&nbsp;2005-08-30 
16:38:52.000000000 +0800<BR>@@ -62,9 +62,28 @@<BR>&nbsp;unsigned char 
__res[sizeof (bd_t)];<BR>&nbsp;<BR>&nbsp;#ifdef CONFIG_PCI<BR>-#error "PCI is 
not supported"<BR>-/* NEED mpc83xx_map_irq &amp; 
mpc83xx_exclude_device<BR>-&nbsp;&nbsp; see platforms/85xx/mpc85xx_ads_common.c 
*/<BR>+int<BR>+mpc83xx_ads_map_irq(struct pci_dev *dev,unsigned char 
idsel,unsigned char pin)<BR>+{<BR>+&nbsp;char 
pci_irq_table[][4]=<BR>+&nbsp;/*<BR>+&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PCI 
IDSEL&amp;INTPIN -&gt; INTLINE<BR>+&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
INTA&nbsp;&nbsp;&nbsp; INTB&nbsp;&nbsp;&nbsp; INTC&nbsp;&nbsp;&nbsp; 
INTD<BR>+&nbsp; */<BR>+&nbsp;{<BR>+&nbsp;&nbsp;{PIRQA, PIRQB,&nbsp; PIRQC,&nbsp; 
PIRQD}, /* idsel 0x11 */<BR>+&nbsp;&nbsp;{PIRQC, PIRQD,&nbsp; PIRQA,&nbsp; 
PIRQB}, /* idsel 0x12 */<BR>+&nbsp;&nbsp;{PIRQD, PIRQA,&nbsp; PIRQB,&nbsp; 
PIRQC}&nbsp; /* idsel 0x13 */<BR>+&nbsp;};<BR>+&nbsp;/* MPC8349 MDS board 
specific */<BR>+&nbsp;const long 
min_idsel=0x11,max_idsel=0x13,irqs_per_slot=4;<BR>+&nbsp;return 
PCI_IRQ_TABLE_LOOKUP;<BR>+}<BR>+int<BR>+mpc83xx_ads_exclude_device(u_char bus, 
u_char devfn)<BR>+{<BR>+&nbsp;return PCIBIOS_SUCCESSFUL;<BR>+}<BR>&nbsp;#endif 
/* CONFIG_PCI */<BR>&nbsp;<BR>&nbsp;/* 
************************************************************************<BR>@@ 
-88,7 +107,7 @@<BR>&nbsp;<BR>&nbsp;#ifdef CONFIG_PCI<BR>&nbsp;&nbsp;/* setup PCI 
host bridges 
*/<BR>-&nbsp;mpc83xx_sys_setup_hose();<BR>+&nbsp;mpc83xx_setup_hose();<BR>&nbsp;#endif<BR>&nbsp;&nbsp;mpc83xx_early_serial_map();<BR>&nbsp;<BR>@@ 
-175,10 +194,10 @@<BR>&nbsp;&nbsp;&nbsp;IRQ_SENSE_LEVEL,&nbsp;/* EXT 1 
*/<BR>&nbsp;&nbsp;&nbsp;IRQ_SENSE_LEVEL,&nbsp;/* EXT 2 
*/<BR>&nbsp;&nbsp;&nbsp;0,&nbsp;&nbsp;&nbsp;/* EXT 3 
*/<BR>-&nbsp;&nbsp;0,&nbsp;&nbsp;&nbsp;/* EXT 4 
*/<BR>-&nbsp;&nbsp;0,&nbsp;&nbsp;&nbsp;/* EXT 5 
*/<BR>-&nbsp;&nbsp;0,&nbsp;&nbsp;&nbsp;/* EXT 6 
*/<BR>-&nbsp;&nbsp;0,&nbsp;&nbsp;&nbsp;/* EXT 7 
*/<BR>+&nbsp;&nbsp;IRQ_SENSE_LEVEL,&nbsp;/* EXT 4 
*/<BR>+&nbsp;&nbsp;IRQ_SENSE_LEVEL,&nbsp;/* EXT 5 
*/<BR>+&nbsp;&nbsp;IRQ_SENSE_LEVEL,&nbsp;/* EXT 6 
*/<BR>+&nbsp;&nbsp;IRQ_SENSE_LEVEL,&nbsp;/* EXT 7 
*/<BR>&nbsp;&nbsp;};<BR>&nbsp;<BR>&nbsp;&nbsp;ipic_init(binfo-&gt;bi_immr_base + 
0x00700, 0, MPC83xx_IPIC_IRQ_OFFSET, senses, 8);<BR>diff -urN -X dontdiff 
linux-2.6.13-rc6/arch/ppc/platforms/83xx/mpc834x_sys.h 
linux-2.6.13-rc6-pci/arch/ppc/platforms/83xx/mpc834x_sys.h<BR>--- 
linux-2.6.13-rc6/arch/ppc/platforms/83xx/mpc834x_sys.h&nbsp;2005-06-18 
03:48:29.000000000 +0800<BR>+++ 
linux-2.6.13-rc6-pci/arch/ppc/platforms/83xx/mpc834x_sys.h&nbsp;2005-08-23 
10:00:08.000000000 +0800<BR>@@ -26,7 +26,7 @@<BR>&nbsp;#define 
VIRT_IMMRBAR&nbsp;&nbsp;((uint)0xfe000000)<BR>&nbsp;<BR>&nbsp;#define 
BCSR_PHYS_ADDR&nbsp;&nbsp;((uint)0xf8000000)<BR>-#define 
BCSR_SIZE&nbsp;&nbsp;((uint)(32 * 1024))<BR>+#define 
BCSR_SIZE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
((uint)(128 * 1024))<BR>&nbsp;<BR>&nbsp;#define 
BCSR_MISC_REG2_OFF&nbsp;0x07<BR>&nbsp;#define 
BCSR_MISC_REG2_PORESET&nbsp;0x01<BR>@@ -35,22 +35,34 @@<BR>&nbsp;#define 
BCSR_MISC_REG3_CNFLOCK&nbsp;0x80<BR>&nbsp;<BR>&nbsp;#ifdef CONFIG_PCI<BR>-/* PCI 
interrupt controller */<BR>-#define 
PIRQA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MPC83xx_IRQ_IRQ4<BR>-#define 
PIRQB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MPC83xx_IRQ_IRQ5<BR>-#define 
PIRQC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MPC83xx_IRQ_IRQ6<BR>-#define 
PIRQD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
MPC83xx_IRQ_IRQ7<BR>-<BR>-#define 
MPC834x_SYS_PCI1_LOWER_IO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
0x00000000<BR>-#define 
MPC834x_SYS_PCI1_UPPER_IO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
0x00ffffff<BR>&nbsp;<BR>-#define 
MPC834x_SYS_PCI1_LOWER_MEM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
0x80000000<BR>-#define 
MPC834x_SYS_PCI1_UPPER_MEM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
0x9fffffff<BR>+#define&nbsp;PCI1_CFG_ADDR_OFFSET&nbsp;(0x8300)<BR>+#define&nbsp;PCI1_CFG_DATA_OFFSET&nbsp;(0x8304)<BR>&nbsp;<BR>-#define 
MPC834x_SYS_PCI1_IO_BASE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
0xe2000000<BR>-#define MPC834x_SYS_PCI1_MEM_OFFSET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
0x00000000<BR>+#define&nbsp;PCI2_CFG_ADDR_OFFSET&nbsp;(0x8380)<BR>+#define&nbsp;PCI2_CFG_DATA_OFFSET&nbsp;(0x8384)<BR>+<BR>+#define&nbsp;PIRQA&nbsp;MPC83xx_IRQ_EXT4<BR>+#define&nbsp;PIRQB&nbsp;MPC83xx_IRQ_EXT5<BR>+#define&nbsp;PIRQC&nbsp;MPC83xx_IRQ_EXT6<BR>+#define&nbsp;PIRQD&nbsp;MPC83xx_IRQ_EXT7<BR>+<BR>+#define&nbsp;MPC83xx_PCI1_LOWER_IO&nbsp;0x00000000<BR>+#define&nbsp;MPC83xx_PCI1_UPPER_IO&nbsp;0x00ffffff<BR>+#define&nbsp;MPC83xx_PCI1_LOWER_MEM&nbsp;0x80000000<BR>+#define&nbsp;MPC83xx_PCI1_UPPER_MEM&nbsp;0x9fffffff<BR>+#define&nbsp;MPC83xx_PCI1_IO_BASE&nbsp;0xe2000000<BR>+#define&nbsp;MPC83xx_PCI1_MEM_OFFSET&nbsp;0x00000000<BR>+#define&nbsp;MPC83xx_PCI1_IO_SIZE&nbsp;0x01000000<BR>+<BR>+#define&nbsp;MPC83xx_PCI2_LOWER_IO&nbsp;0x00000000<BR>+#define&nbsp;MPC83xx_PCI2_UPPER_IO&nbsp;0x00ffffff<BR>+#define&nbsp;MPC83xx_PCI2_LOWER_MEM&nbsp;0xa0000000<BR>+#define&nbsp;MPC83xx_PCI2_UPPER_MEM&nbsp;0xbfffffff<BR>+#define&nbsp;MPC83xx_PCI2_IO_BASE&nbsp;0xe3000000<BR>+#define&nbsp;MPC83xx_PCI2_MEM_OFFSET&nbsp;0x00000000<BR>+#define&nbsp;MPC83xx_PCI2_IO_SIZE&nbsp;0x01000000<BR>&nbsp;<BR>-#define 
MPC834x_SYS_PCI1_IO_SIZE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
0x01000000<BR>&nbsp;#endif /* CONFIG_PCI 
*/<BR>&nbsp;<BR>&nbsp;#endif&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
/* __MACH_MPC83XX_SYS_H__ */<BR>diff -urN -X dontdiff 
linux-2.6.13-rc6/arch/ppc/syslib/ppc834x_pci.h 
linux-2.6.13-rc6-pci/arch/ppc/syslib/ppc834x_pci.h<BR>--- 
linux-2.6.13-rc6/arch/ppc/syslib/ppc834x_pci.h&nbsp;1970-01-01 
08:30:00.000000000 +0830<BR>+++ 
linux-2.6.13-rc6-pci/arch/ppc/syslib/ppc834x_pci.h&nbsp;2005-08-19 
18:30:11.000000000 +0800<BR>@@ -0,0 +1,161 @@<BR>+/* Created by Tony Li &lt;<A 
href="mailto:tony.li@freescale.com">tony.li@freescale.com</A>&gt; 2005.6<BR>+ * 
Copyright (c) 2005 freescale semiconductor<BR>+ *<BR>+ * This program is free 
software; you can redistribute&nbsp; it and/or modify it<BR>+ * under&nbsp; the 
terms of&nbsp; the GNU General&nbsp; Public License as published by the<BR>+ * 
Free Software Foundation;&nbsp; either version 2 of the&nbsp; License, or (at 
your<BR>+ * option) any later version.<BR>+ *<BR>+ * This program is distributed 
in the hope that it will be useful, but<BR>+ * WITHOUT ANY WARRANTY; without 
even the implied warranty of<BR>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE.&nbsp; See the GNU<BR>+ * General Public License for more details.<BR>+ 
*<BR>+ * You should have received a copy of the&nbsp; GNU General Public License 
along<BR>+ * with this program; if not, write&nbsp; to the Free Software 
Foundation, Inc.,<BR>+ * 675 Mass Ave, Cambridge, MA 02139, USA.<BR>+ 
*/<BR>+<BR>+#ifndef&nbsp;__MPC834X_PCI_H__<BR>+#define&nbsp;__MPC834X_PCI_H__<BR>+<BR>+typedef 
struct immr_clk {<BR>+&nbsp;u32 spmr;&nbsp;/* system PLL mode Register&nbsp; 
*/<BR>+&nbsp;u32 occr;&nbsp;/* output clock control Register&nbsp; 
*/<BR>+&nbsp;u32 sccr;&nbsp;/* system clock control Register&nbsp; 
*/<BR>+&nbsp;u8 res0[0xF4];<BR>+} immr_clk_t;<BR>+<BR>+/*<BR>+ * PCI Software 
Configuration Registers<BR>+ */<BR>+typedef struct immr_pciconf {<BR>+&nbsp;u32 
config_address;<BR>+&nbsp;u32 config_data;<BR>+&nbsp;u32 int_ack;<BR>+&nbsp;u8 
res[116];<BR>+} immr_pciconf_t;<BR>+<BR>+/*<BR>+ * Sequencer<BR>+ */<BR>+typedef 
struct immr_ios {<BR>+&nbsp;u32 potar0;<BR>+&nbsp;u8 res0[4];<BR>+&nbsp;u32 
pobar0;<BR>+&nbsp;u8 res1[4];<BR>+&nbsp;u32 pocmr0;<BR>+&nbsp;u8 
res2[4];<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u32 
potar1;<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u8 
res3[4];<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u32 
pobar1;<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u8 
res4[4];<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u32 
pocmr1;<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u8 
res5[4];<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u32 
potar2;<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u8 
res6[4];<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u32 
pobar2;<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u8 
res7[4];<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u32 
pocmr2;<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u8 
res8[4];<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u32 
potar3;<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u8 
res9[4];<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u32 
pobar3;<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u8 
res10[4];<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u32 
pocmr3;<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u8 
res11[4];<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u32 
potar4;<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u8 
res12[4];<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u32 
pobar4;<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u8 
res13[4];<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u32 
pocmr4;<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u8 
res14[4];<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u32 
potar5;<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u8 
res15[4];<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u32 
pobar5;<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u8 
res16[4];<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u32 
pocmr5;<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u8 res17[4];<BR>+&nbsp;u8 
res18[0x60];<BR>+&nbsp;u32 pmcr;<BR>+&nbsp;u8 res19[4];<BR>+&nbsp;u32 
dtcr;<BR>+&nbsp;u8 res20[4];<BR>+} immr_ios_t;<BR>+#define 
POTAR_TA_MASK&nbsp;0x000fffff<BR>+#define 
POBAR_BA_MASK&nbsp;0x000fffff<BR>+#define POCMR_EN&nbsp;0x80000000<BR>+#define 
POCMR_IO&nbsp;0x40000000&nbsp;/* 0--memory space 1--I/O space */<BR>+#define 
POCMR_SE&nbsp;0x20000000&nbsp;/* streaming enable */<BR>+#define 
POCMR_DST&nbsp;0x10000000&nbsp;/* 0--PCI1 1--PCI2 */<BR>+#define 
POCMR_CM_MASK&nbsp;0x000fffff<BR>+<BR>+/*<BR>+ * PCI Controller Control and 
Status Registers<BR>+ */<BR>+typedef struct immr_pcictrl {<BR>+&nbsp;u32 
esr;<BR>+&nbsp;u32 ecdr;<BR>+&nbsp;u32 eer;<BR>+&nbsp;u32 eatcr;<BR>+&nbsp;u32 
eacr;<BR>+&nbsp;u32 eeacr;<BR>+&nbsp;u32 edlcr;<BR>+&nbsp;u32 
edhcr;<BR>+&nbsp;u32 gcr;<BR>+&nbsp;u32 ecr;<BR>+&nbsp;u32 gsr;<BR>+&nbsp;u8 
res0[12];<BR>+&nbsp;u32 pitar2;<BR>+&nbsp;u8 res1[4];<BR>+&nbsp;u32 
pibar2;<BR>+&nbsp;u32 piebar2;<BR>+&nbsp;u32 piwar2;<BR>+&nbsp;u8 
res2[4];<BR>+&nbsp;u32 pitar1;<BR>+&nbsp;u8 res3[4];<BR>+&nbsp;u32 
pibar1;<BR>+&nbsp;u32 piebar1;<BR>+&nbsp;u32 piwar1;<BR>+&nbsp;u8 
res4[4];<BR>+&nbsp;u32 pitar0;<BR>+&nbsp;u8 res5[4];<BR>+&nbsp;u32 
pibar0;<BR>+&nbsp;u8 res6[4];<BR>+&nbsp;u32 piwar0;<BR>+&nbsp;u8 
res7[132];<BR>+} 
immr_pcictrl_t;<BR>+#define&nbsp;PITAR_TA_MASK&nbsp;0x000fffff<BR>+#define&nbsp;PIBAR_MASK&nbsp;0xffffffff<BR>+#define&nbsp;PIEBAR_EBA_MASK&nbsp;0x000fffff<BR>+#define&nbsp;PIWAR_EN&nbsp;0x80000000<BR>+#define&nbsp;PIWAR_PF&nbsp;0x20000000<BR>+#define&nbsp;PIWAR_RTT_MASK&nbsp;0x000f0000<BR>+#define&nbsp;PIWAR_RTT_NO_SNOOP&nbsp;0x00040000<BR>+#define&nbsp;PIWAR_RTT_SNOOP&nbsp;0x00050000<BR>+#define&nbsp;PIWAR_WTT_MASK&nbsp;0x0000f000<BR>+#define&nbsp;PIWAR_WTT_NO_SNOOP&nbsp;0x00004000<BR>+#define&nbsp;PIWAR_WTT_SNOOP&nbsp;0x00005000<BR>+#define&nbsp;PIWAR_IWS_MASK&nbsp;0x0000003F<BR>+#define&nbsp;PIWAR_IWS_4K&nbsp;0x0000000B<BR>+#define&nbsp;PIWAR_IWS_8K&nbsp;0x0000000C<BR>+#define&nbsp;PIWAR_IWS_16K&nbsp;0x0000000D<BR>+#define&nbsp;PIWAR_IWS_32K&nbsp;0x0000000E<BR>+#define&nbsp;PIWAR_IWS_64K&nbsp;0x0000000F<BR>+#define&nbsp;PIWAR_IWS_128K&nbsp;0x00000010<BR>+#define&nbsp;PIWAR_IWS_256K&nbsp;0x00000011<BR>+#define&nbsp;PIWAR_IWS_512K&nbsp;0x00000012<BR>+#define&nbsp;PIWAR_IWS_1M&nbsp;0x00000013<BR>+#define&nbsp;PIWAR_IWS_2M&nbsp;0x00000014<BR>+#define&nbsp;PIWAR_IWS_4M&nbsp;0x00000015<BR>+#define&nbsp;PIWAR_IWS_8M&nbsp;0x00000016<BR>+#define&nbsp;PIWAR_IWS_16M&nbsp;0x00000017<BR>+#define&nbsp;PIWAR_IWS_32M&nbsp;0x00000018<BR>+#define&nbsp;PIWAR_IWS_64M&nbsp;0x00000019<BR>+#define&nbsp;PIWAR_IWS_128M&nbsp;0x0000001A<BR>+#define&nbsp;PIWAR_IWS_256M&nbsp;0x0000001B<BR>+#define&nbsp;PIWAR_IWS_512M&nbsp;0x0000001C<BR>+#define&nbsp;PIWAR_IWS_1G&nbsp;0x0000001D<BR>+#define&nbsp;PIWAR_IWS_2G&nbsp;0x0000001E<BR>+<BR>+#endif 
/*__MPC834X_PCI_H__*/<BR>diff -urN -X dontdiff 
linux-2.6.13-rc6/arch/ppc/syslib/ppc83xx_setup.c 
linux-2.6.13-rc6-pci/arch/ppc/syslib/ppc83xx_setup.c<BR>--- 
linux-2.6.13-rc6/arch/ppc/syslib/ppc83xx_setup.c&nbsp;2005-08-09 
18:00:47.000000000 +0800<BR>+++ 
linux-2.6.13-rc6-pci/arch/ppc/syslib/ppc83xx_setup.c&nbsp;2005-08-23 
10:18:04.000000000 +0800<BR>@@ -11,6 +11,20 @@<BR>&nbsp; * under&nbsp; the terms 
of&nbsp; the GNU General&nbsp; Public License as published by the<BR>&nbsp; * 
Free Software Foundation;&nbsp; either version 2 of the&nbsp; License, or (at 
your<BR>&nbsp; * option) any later version.<BR>+ *<BR>+ * This program is 
distributed in the hope that it will be useful, but<BR>+ * WITHOUT ANY WARRANTY; 
without even the implied warranty of<BR>+ * MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE.&nbsp; See the GNU<BR>+ * General Public License for more 
details.<BR>+ *<BR>+ * You should have received a copy of the&nbsp; GNU General 
Public License along<BR>+ * with this program; if not, write&nbsp; to the Free 
Software Foundation, Inc.,<BR>+ * 675 Mass Ave, Cambridge, MA 02139, USA.<BR>+ 
*<BR>+ * July 2005, Tony Li&lt;<A 
href="mailto:tony.li@freescale.com">tony.li@freescale.com</A>&gt;<BR>+ 
*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Added PCI support<BR>+ * PCI can be enabled only 
if MPC834x SYS board combined with PIB(Platform<BR>+ * IO Board) board in which 
three physical PCI slots locate.<BR>&nbsp; */<BR>&nbsp;<BR>&nbsp;#include 
&lt;linux/config.h&gt;<BR>@@ -19,7 +33,7 @@<BR>&nbsp;#include 
&lt;linux/init.h&gt;<BR>&nbsp;#include &lt;linux/pci.h&gt;<BR>&nbsp;#include 
&lt;linux/serial.h&gt;<BR>-#include &lt;linux/tty.h&gt;&nbsp;/* for 
linux/serial_core.h */<BR>+#include &lt;linux/tty.h&gt;&nbsp;&nbsp;/* for 
linux/serial_core.h */<BR>&nbsp;#include 
&lt;linux/serial_core.h&gt;<BR>&nbsp;#include 
&lt;linux/serial_8250.h&gt;<BR>&nbsp;<BR>@@ -31,27 +45,29 @@<BR>&nbsp;#include 
&lt;asm/delay.h&gt;<BR>&nbsp;<BR>&nbsp;#include 
&lt;syslib/ppc83xx_setup.h&gt;<BR>+#if defined(CONFIG_PCI)<BR>+#include 
&lt;asm/delay.h&gt;<BR>+#include 
&lt;syslib/ppc834x_pci.h&gt;<BR>+#endif<BR>&nbsp;<BR>&nbsp;phys_addr_t 
immrbar;<BR>&nbsp;<BR>&nbsp;/* Return the amount of memory */<BR>-unsigned long 
__init<BR>-mpc83xx_find_end_of_memory(void)<BR>+unsigned long __init 
mpc83xx_find_end_of_memory(void)<BR>&nbsp;{<BR>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
bd_t *binfo;<BR>+&nbsp;bd_t 
*binfo;<BR>&nbsp;<BR>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; binfo = (bd_t 
*) __res;<BR>+&nbsp;binfo = (bd_t *) 
__res;<BR>&nbsp;<BR>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 
binfo-&gt;bi_memsize;<BR>+&nbsp;return 
binfo-&gt;bi_memsize;<BR>&nbsp;}<BR>&nbsp;<BR>-long 
__init<BR>-mpc83xx_time_init(void)<BR>+long __init 
mpc83xx_time_init(void)<BR>&nbsp;{<BR>&nbsp;#define SPCR_OFFS&nbsp;&nbsp; 
0x00000110<BR>&nbsp;#define SPCR_TBEN&nbsp;&nbsp; 
0x00400000<BR>&nbsp;<BR>-&nbsp;bd_t *binfo = (bd_t *)__res;<BR>+&nbsp;bd_t 
*binfo = (bd_t *) __res;<BR>&nbsp;&nbsp;u32 *spcr = 
ioremap(binfo-&gt;bi_immr_base + SPCR_OFFS, 4);<BR>&nbsp;<BR>&nbsp;&nbsp;*spcr 
|= SPCR_TBEN;<BR>@@ -62,11 +78,10 @@<BR>&nbsp;}<BR>&nbsp;<BR>&nbsp;/* The 
decrementer counts at the system (internal) clock freq divided by 4 */<BR>-void 
__init<BR>-mpc83xx_calibrate_decr(void)<BR>+void __init 
mpc83xx_calibrate_decr(void)<BR>&nbsp;{<BR>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
bd_t *binfo = (bd_t *) __res;<BR>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
unsigned int freq, divisor;<BR>+&nbsp;bd_t *binfo = (bd_t *) 
__res;<BR>+&nbsp;unsigned int freq, divisor;<BR>&nbsp;<BR>&nbsp;&nbsp;freq = 
binfo-&gt;bi_busfreq;<BR>&nbsp;&nbsp;divisor = 4;<BR>@@ -75,15 +90,14 
@@<BR>&nbsp;}<BR>&nbsp;<BR>&nbsp;#ifdef CONFIG_SERIAL_8250<BR>-void 
__init<BR>-mpc83xx_early_serial_map(void)<BR>+void __init 
mpc83xx_early_serial_map(void)<BR>&nbsp;{<BR>&nbsp;#if 
defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)<BR>&nbsp;&nbsp;struct 
uart_port serial_req;<BR>&nbsp;#endif<BR>&nbsp;&nbsp;struct plat_serial8250_port 
*pdata;<BR>&nbsp;&nbsp;bd_t *binfo = (bd_t *) __res;<BR>-&nbsp;pdata = (struct 
plat_serial8250_port *) ppc_sys_get_pdata(MPC83xx_DUART);<BR>+&nbsp;pdata = 
(struct plat_serial8250_port 
*)ppc_sys_get_pdata(MPC83xx_DUART);<BR>&nbsp;<BR>&nbsp;&nbsp;/* Setup serial 
port access */<BR>&nbsp;&nbsp;pdata[0].uartclk = binfo-&gt;bi_busfreq;<BR>@@ 
-91,7 +105,7 @@<BR>&nbsp;&nbsp;pdata[0].membase = ioremap(pdata[0].mapbase, 
0x100);<BR>&nbsp;<BR>&nbsp;#if defined(CONFIG_SERIAL_TEXT_DEBUG) || 
defined(CONFIG_KGDB)<BR>-&nbsp;memset(&amp;serial_req, 0, sizeof 
(serial_req));<BR>+&nbsp;memset(&amp;serial_req, 0, 
sizeof(serial_req));<BR>&nbsp;&nbsp;serial_req.iotype = 
SERIAL_IO_MEM;<BR>&nbsp;&nbsp;serial_req.mapbase = 
pdata[0].mapbase;<BR>&nbsp;&nbsp;serial_req.membase = pdata[0].membase;<BR>@@ 
-114,8 +128,7 
@@<BR>&nbsp;}<BR>&nbsp;#endif<BR>&nbsp;<BR>-void<BR>-mpc83xx_restart(char 
*cmd)<BR>+void mpc83xx_restart(char *cmd)<BR>&nbsp;{<BR>&nbsp;&nbsp;volatile 
unsigned char __iomem *reg;<BR>&nbsp;&nbsp;unsigned char tmp;<BR>@@ -129,7 
+142,7 @@<BR>&nbsp;&nbsp; * Otherwise the reset asserts but doesn't 
clear.<BR>&nbsp;&nbsp; */<BR>&nbsp;&nbsp;tmp = in_8(reg + 
BCSR_MISC_REG3_OFF);<BR>-&nbsp;tmp |= BCSR_MISC_REG3_CNFLOCK; /* low true, high 
false */<BR>+&nbsp;tmp |= BCSR_MISC_REG3_CNFLOCK;&nbsp;/* low true, high false 
*/<BR>&nbsp;&nbsp;out_8(reg + BCSR_MISC_REG3_OFF, 
tmp);<BR>&nbsp;<BR>&nbsp;&nbsp;/*<BR>@@ -145,21 +158,252 @@<BR>&nbsp;&nbsp;tmp 
|= BCSR_MISC_REG2_PORESET;<BR>&nbsp;&nbsp;out_8(reg + BCSR_MISC_REG2_OFF, 
tmp);<BR>&nbsp;<BR>-&nbsp;for(;;);<BR>+&nbsp;for (;;) 
;<BR>&nbsp;}<BR>&nbsp;<BR>-void<BR>-mpc83xx_power_off(void)<BR>+void 
mpc83xx_power_off(void)<BR>&nbsp;{<BR>&nbsp;&nbsp;local_irq_disable();<BR>-&nbsp;for(;;);<BR>+&nbsp;for 
(;;) ;<BR>&nbsp;}<BR>&nbsp;<BR>-void<BR>-mpc83xx_halt(void)<BR>+void 
mpc83xx_halt(void)<BR>&nbsp;{<BR>&nbsp;&nbsp;local_irq_disable();<BR>-&nbsp;for(;;);<BR>+&nbsp;for 
(;;) ;<BR>+}<BR>+<BR>+#if defined(CONFIG_PCI)<BR>+void __init 
mpc83xx_setup_pci1(struct pci_controller *hose)<BR>+{<BR>+&nbsp;unsigned short 
reg16;<BR>+&nbsp;volatile immr_pcictrl_t *pci_ctrl;<BR>+&nbsp;volatile 
immr_ios_t *ios;<BR>+&nbsp;bd_t *binfo = (bd_t *) __res;<BR>+<BR>+&nbsp;pci_ctrl 
= ioremap(binfo-&gt;bi_immr_base + 0x8500,<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
sizeof(immr_pcictrl_t));<BR>+&nbsp;ios = ioremap(binfo-&gt;bi_immr_base + 
0x8400, sizeof(immr_ios_t));<BR>+<BR>+&nbsp;/*<BR>+&nbsp; * Configure PCI 
Outbound Translation Windows<BR>+&nbsp; */<BR>+&nbsp;ios-&gt;potar0 = 
(MPC83xx_PCI1_LOWER_MEM &gt;&gt; 12) &amp; 
POTAR_TA_MASK;<BR>+&nbsp;ios-&gt;pobar0 = (MPC83xx_PCI1_LOWER_MEM &gt;&gt; 12) 
&amp; POBAR_BA_MASK;<BR>+&nbsp;ios-&gt;pocmr0 = POCMR_EN 
|<BR>+&nbsp;&nbsp;&nbsp;&nbsp; (((~0UL 
-<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (MPC83xx_PCI1_UPPER_MEM 
-<BR>+&nbsp;&nbsp;MPC83xx_PCI1_LOWER_MEM)) &gt;&gt; 12) &amp; 
POCMR_CM_MASK);<BR>+<BR>+&nbsp;/* mapped to PCI1 IO space 0x0 to local 
0xe2000000&nbsp; */<BR>+&nbsp;ios-&gt;potar1 = (MPC83xx_PCI1_LOWER_IO &gt;&gt; 
12) &amp; POTAR_TA_MASK;<BR>+&nbsp;ios-&gt;pobar1 = (MPC83xx_PCI1_IO_BASE 
&gt;&gt; 12) &amp; POBAR_BA_MASK;<BR>+&nbsp;ios-&gt;pocmr1 = POCMR_EN | POCMR_IO 
|<BR>+&nbsp;&nbsp;&nbsp;&nbsp; (((~0UL 
-<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (MPC83xx_PCI1_UPPER_IO 
-<BR>+&nbsp;&nbsp;MPC83xx_PCI1_LOWER_IO)) &gt;&gt; 12) &amp; 
POCMR_CM_MASK);<BR>+<BR>+&nbsp;/*<BR>+&nbsp; * Configure PCI Inbound Translation 
Windows<BR>+&nbsp; */<BR>+&nbsp;pci_ctrl-&gt;pitar1 = 
0x0;<BR>+&nbsp;pci_ctrl-&gt;pibar1 = 0x0;<BR>+&nbsp;pci_ctrl-&gt;piebar1 = 
0x0;<BR>+&nbsp;pci_ctrl-&gt;piwar1 =<BR>+&nbsp;&nbsp;&nbsp;&nbsp; PIWAR_EN | 
PIWAR_PF | PIWAR_RTT_SNOOP | PIWAR_WTT_SNOOP |<BR>+&nbsp;&nbsp;&nbsp;&nbsp; 
PIWAR_IWS_2G;<BR>+<BR>+&nbsp;/*<BR>+&nbsp; * Release PCI RST signal<BR>+&nbsp; 
*/<BR>+&nbsp;pci_ctrl-&gt;gcr = 
0;<BR>+&nbsp;udelay(2000);<BR>+&nbsp;pci_ctrl-&gt;gcr = 
1;<BR>+&nbsp;udelay(2000);<BR>+<BR>+&nbsp;reg16 = 
0xff;<BR>+&nbsp;early_read_config_word(hose, hose-&gt;first_busno, 0, 
PCI_COMMAND, &amp;reg16);<BR>+&nbsp;reg16 |= PCI_COMMAND_SERR | 
PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;<BR>+&nbsp;early_write_config_word(hose, 
hose-&gt;first_busno, 0, PCI_COMMAND, reg16);<BR>+<BR>+&nbsp;/*<BR>+&nbsp; * 
Clear non-reserved bits in status register.<BR>+&nbsp; 
*/<BR>+&nbsp;early_write_config_word(hose, hose-&gt;first_busno, 0, PCI_STATUS, 
0xffff);<BR>+&nbsp;early_write_config_byte(hose, hose-&gt;first_busno, 0, 
PCI_LATENCY_TIMER,<BR>+&nbsp;&nbsp;&nbsp;&nbsp;0x80);<BR>&nbsp;}<BR>&nbsp;<BR>-/* 
PCI SUPPORT DOES NOT EXIT, MODEL after ppc85xx_setup.c */<BR>+void __init 
mpc834x_ads_setup_pci2(struct pci_controller *hose)<BR>+{<BR>+&nbsp;unsigned 
short reg16;<BR>+&nbsp;volatile immr_pcictrl_t *pci_ctrl;<BR>+&nbsp;volatile 
immr_ios_t *ios;<BR>+&nbsp;bd_t *binfo = (bd_t *) __res;<BR>+<BR>+&nbsp;pci_ctrl 
= ioremap(binfo-&gt;bi_immr_base + 0x8600,<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
sizeof(immr_pcictrl_t));<BR>+&nbsp;ios = ioremap(binfo-&gt;bi_immr_base + 
0x8400, sizeof(immr_ios_t));<BR>+<BR>+&nbsp;/*<BR>+&nbsp; * Configure PCI 
Outbound Translation Windows<BR>+&nbsp; */<BR>+&nbsp;ios-&gt;potar3 = 
(MPC83xx_PCI2_LOWER_MEM &gt;&gt; 12) &amp; 
POTAR_TA_MASK;<BR>+&nbsp;ios-&gt;pobar3 = (MPC83xx_PCI2_LOWER_MEM &gt;&gt; 12) 
&amp; POBAR_BA_MASK;<BR>+&nbsp;ios-&gt;pocmr3 = POCMR_EN | POCMR_DST 
|<BR>+&nbsp;&nbsp;&nbsp;&nbsp; (((~0UL 
-<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (MPC83xx_PCI2_UPPER_MEM 
-<BR>+&nbsp;&nbsp;MPC83xx_PCI2_LOWER_MEM)) &gt;&gt; 12) &amp; 
POCMR_CM_MASK);<BR>+<BR>+&nbsp;/* mapped to PCI2 IO space 0x0 to local 
0xe3000000&nbsp; */<BR>+&nbsp;ios-&gt;potar4 = (MPC83xx_PCI2_LOWER_IO &gt;&gt; 
12) &amp; POTAR_TA_MASK;<BR>+&nbsp;ios-&gt;pobar4 = (MPC83xx_PCI2_IO_BASE 
&gt;&gt; 12) &amp; POBAR_BA_MASK;<BR>+&nbsp;ios-&gt;pocmr4 = POCMR_EN | 
POCMR_DST | POCMR_IO |<BR>+&nbsp;&nbsp;&nbsp;&nbsp; (((~0UL 
-<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (MPC83xx_PCI2_UPPER_IO 
-<BR>+&nbsp;&nbsp;MPC83xx_PCI2_LOWER_IO)) &gt;&gt; 12) &amp; 
POCMR_CM_MASK);<BR>+<BR>+&nbsp;/*<BR>+&nbsp; * Configure PCI Inbound Translation 
Windows<BR>+&nbsp; */<BR>+&nbsp;pci_ctrl-&gt;pitar1 = 
0x0;<BR>+&nbsp;pci_ctrl-&gt;pibar1 = 0x0;<BR>+&nbsp;pci_ctrl-&gt;piebar1 = 
0x0;<BR>+&nbsp;pci_ctrl-&gt;piwar1 =<BR>+&nbsp;&nbsp;&nbsp;&nbsp; PIWAR_EN | 
PIWAR_PF | PIWAR_RTT_SNOOP | PIWAR_WTT_SNOOP |<BR>+&nbsp;&nbsp;&nbsp;&nbsp; 
PIWAR_IWS_2G;<BR>+<BR>+&nbsp;/*<BR>+&nbsp; * Release PCI RST signal<BR>+&nbsp; 
*/<BR>+&nbsp;pci_ctrl-&gt;gcr = 
0;<BR>+&nbsp;udelay(2000);<BR>+&nbsp;pci_ctrl-&gt;gcr = 
1;<BR>+&nbsp;udelay(2000);<BR>+<BR>+&nbsp;reg16 = 
0xff;<BR>+&nbsp;early_read_config_word(hose, hose-&gt;first_busno, 0, 
PCI_COMMAND, &amp;reg16);<BR>+&nbsp;reg16 |= PCI_COMMAND_SERR | 
PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;<BR>+&nbsp;early_write_config_word(hose, 
hose-&gt;first_busno, 0, PCI_COMMAND, reg16);<BR>+<BR>+&nbsp;/*<BR>+&nbsp; * 
Clear non-reserved bits in status register.<BR>+&nbsp; 
*/<BR>+&nbsp;early_write_config_word(hose, hose-&gt;first_busno, 0, PCI_STATUS, 
0xffff);<BR>+&nbsp;early_write_config_byte(hose, hose-&gt;first_busno, 0, 
PCI_LATENCY_TIMER,<BR>+&nbsp;&nbsp;&nbsp;&nbsp;0x80);<BR>+}<BR>+<BR>+extern int 
mpc83xx_ads_map_irq(struct pci_dev *dev, unsigned char 
idsel,<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned char 
pin);<BR>+extern int mpc83xx_ads_exclude_device(u_char bus, u_char 
devfn);<BR>+<BR>+/*<BR>+ * PCI buses can be enabled only if SYS board combinates 
with PIB(Platform IO Board) board<BR>+ * which provide 3 PCI slots. There is 2 
PCI buses and 3 PCI slots,so people must configure<BR>+ * the routes between 
them before enable PCI bus. This routes are under the control of PCA9555PW <BR>+ 
* device which can be accessed via I2C bus 2 and are configured by firmware. 
Refer to Freescale to<BR>+ * get more information about firmware 
configuration.<BR>+ */<BR>+void __init 
mpc83xx_setup_hose(void)<BR>+{<BR>+&nbsp;unsigned long val32;<BR>+&nbsp;volatile 
immr_clk_t *clk;<BR>+&nbsp;volatile struct pci_controller *hose1;<BR>+#ifdef 
CONFIG_MPC834x_PCI2<BR>+&nbsp;volatile struct pci_controller 
*hose2;<BR>+#endif<BR>+&nbsp;volatile bd_t *binfo = (bd_t *) 
__res;<BR>+<BR>+&nbsp;clk = ioremap(binfo-&gt;bi_immr_base + 0xA00, 
sizeof(immr_clk_t));<BR>+<BR>+&nbsp;/*<BR>+&nbsp; * Configure PCI controller and 
PCI_CLK_OUTPUT both in 66M mode<BR>+&nbsp; */<BR>+&nbsp;val32 = 
clk-&gt;occr;<BR>+&nbsp;udelay(2000);<BR>+&nbsp;clk-&gt;occr = 
0xff000000;<BR>+&nbsp;udelay(2000);<BR>+<BR>+&nbsp;hose1 = 
pcibios_alloc_controller();<BR>+&nbsp;if 
(!hose1)<BR>+&nbsp;&nbsp;return;<BR>+<BR>+&nbsp;ppc_md.pci_swizzle = 
common_swizzle;<BR>+&nbsp;ppc_md.pci_map_irq = 
mpc83xx_ads_map_irq;<BR>+<BR>+&nbsp;hose1-&gt;bus_offset = 
0;<BR>+&nbsp;hose1-&gt;first_busno = 0;<BR>+&nbsp;hose1-&gt;last_busno = 
0xff;<BR>+<BR>+&nbsp;setup_indirect_pci(hose1, binfo-&gt;bi_immr_base + 
PCI1_CFG_ADDR_OFFSET,<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; binfo-&gt;bi_immr_base 
+ PCI1_CFG_DATA_OFFSET);<BR>+&nbsp;hose1-&gt;set_cfg_type = 
1;<BR>+<BR>+&nbsp;mpc83xx_setup_pci1(hose1);<BR>+<BR>+&nbsp;hose1-&gt;pci_mem_offset 
= MPC83xx_PCI1_MEM_OFFSET;<BR>+&nbsp;hose1-&gt;mem_space.start = 
MPC83xx_PCI1_LOWER_MEM;<BR>+&nbsp;hose1-&gt;mem_space.end = 
MPC83xx_PCI1_UPPER_MEM;<BR>+<BR>+&nbsp;hose1-&gt;io_base_phys = 
MPC83xx_PCI1_IO_BASE;<BR>+&nbsp;hose1-&gt;io_space.start = 
MPC83xx_PCI1_LOWER_IO;<BR>+&nbsp;hose1-&gt;io_space.end = 
MPC83xx_PCI1_UPPER_IO;<BR>+#ifdef CONFIG_MPC834x_PCI2<BR>+&nbsp;isa_io_base = 
(unsigned 
long)ioremap(MPC83xx_PCI1_IO_BASE,<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
MPC83xx_PCI1_IO_SIZE 
+<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
MPC83xx_PCI2_IO_SIZE);<BR>+#else<BR>+&nbsp;isa_io_base = (unsigned 
long)ioremap(MPC83xx_PCI1_IO_BASE,<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
MPC83xx_PCI1_IO_SIZE);<BR>+#endif&nbsp;&nbsp;&nbsp;&nbsp;/* CONFIG_MPC834x_PCI2 
*/<BR>+&nbsp;hose1-&gt;io_base_virt = (void *)isa_io_base;<BR>+&nbsp;/* setup 
resources 
*/<BR>+&nbsp;pci_init_resource(&amp;hose1-&gt;io_resource,<BR>+&nbsp;&nbsp;&nbsp;&nbsp; 
MPC83xx_PCI1_LOWER_IO,<BR>+&nbsp;&nbsp;&nbsp;&nbsp; 
MPC83xx_PCI1_UPPER_IO,<BR>+&nbsp;&nbsp;&nbsp;&nbsp; IORESOURCE_IO, "PCI host 
bridge 
1");<BR>+&nbsp;pci_init_resource(&amp;hose1-&gt;mem_resources[0],<BR>+&nbsp;&nbsp;&nbsp;&nbsp; 
MPC83xx_PCI1_LOWER_MEM,<BR>+&nbsp;&nbsp;&nbsp;&nbsp; 
MPC83xx_PCI1_UPPER_MEM,<BR>+&nbsp;&nbsp;&nbsp;&nbsp; IORESOURCE_MEM, "PCI host 
bridge 1");<BR>+<BR>+&nbsp;ppc_md.pci_exclude_device = 
mpc83xx_ads_exclude_device;<BR>+&nbsp;hose1-&gt;last_busno = 
pciauto_bus_scan(hose1, hose1-&gt;first_busno);<BR>+<BR>+#ifdef 
CONFIG_MPC834x_PCI2<BR>+&nbsp;hose2 = pcibios_alloc_controller();<BR>+&nbsp;if 
(!hose2)<BR>+&nbsp;&nbsp;return;<BR>+<BR>+&nbsp;hose2-&gt;bus_offset = 
hose1-&gt;last_busno + 1;<BR>+&nbsp;hose2-&gt;first_busno = hose1-&gt;last_busno 
+ 1;<BR>+&nbsp;hose2-&gt;last_busno = 0xff;<BR>+&nbsp;setup_indirect_pci(hose2, 
binfo-&gt;bi_immr_base + 
PCI2_CFG_ADDR_OFFSET,<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; binfo-&gt;bi_immr_base 
+ PCI2_CFG_DATA_OFFSET);<BR>+&nbsp;hose2-&gt;set_cfg_type = 
1;<BR>+<BR>+&nbsp;mpc834x_ads_setup_pci2(hose2);<BR>+<BR>+&nbsp;hose2-&gt;pci_mem_offset 
= MPC83xx_PCI2_MEM_OFFSET;<BR>+&nbsp;hose2-&gt;mem_space.start = 
MPC83xx_PCI2_LOWER_MEM;<BR>+&nbsp;hose2-&gt;mem_space.end = 
MPC83xx_PCI2_UPPER_MEM;<BR>+<BR>+&nbsp;hose2-&gt;io_base_phys = 
MPC83xx_PCI2_IO_BASE;<BR>+&nbsp;hose2-&gt;io_space.start = 
MPC83xx_PCI2_LOWER_IO;<BR>+&nbsp;hose2-&gt;io_space.end = 
MPC83xx_PCI2_UPPER_IO;<BR>+&nbsp;hose2-&gt;io_base_virt = (void *)(isa_io_base + 
MPC83xx_PCI1_IO_SIZE);<BR>+&nbsp;/* setup resources 
*/<BR>+&nbsp;pci_init_resource(&amp;hose2-&gt;io_resource,<BR>+&nbsp;&nbsp;&nbsp;&nbsp; 
MPC83xx_PCI2_LOWER_IO,<BR>+&nbsp;&nbsp;&nbsp;&nbsp; 
MPC83xx_PCI2_UPPER_IO,<BR>+&nbsp;&nbsp;&nbsp;&nbsp; IORESOURCE_IO, "PCI host 
bridge 
2");<BR>+&nbsp;pci_init_resource(&amp;hose2-&gt;mem_resources[0],<BR>+&nbsp;&nbsp;&nbsp;&nbsp; 
MPC83xx_PCI2_LOWER_MEM,<BR>+&nbsp;&nbsp;&nbsp;&nbsp; 
MPC83xx_PCI2_UPPER_MEM,<BR>+&nbsp;&nbsp;&nbsp;&nbsp; IORESOURCE_MEM, "PCI host 
bridge 2");<BR>+<BR>+&nbsp;hose2-&gt;last_busno = pciauto_bus_scan(hose2, 
hose2-&gt;first_busno);<BR>+#endif&nbsp;&nbsp;&nbsp;&nbsp;/* CONFIG_MPC834x_PCI2 
*/<BR>+}<BR>+#endif&nbsp;&nbsp;&nbsp;&nbsp;/*CONFIG_PCI */<BR>diff -urN -X 
dontdiff linux-2.6.13-rc6/arch/ppc/syslib/ppc83xx_setup.h 
linux-2.6.13-rc6-pci/arch/ppc/syslib/ppc83xx_setup.h<BR>--- 
linux-2.6.13-rc6/arch/ppc/syslib/ppc83xx_setup.h&nbsp;2005-06-18 
03:48:29.000000000 +0800<BR>+++ 
linux-2.6.13-rc6-pci/arch/ppc/syslib/ppc83xx_setup.h&nbsp;2005-08-23 
10:25:43.000000000 +0800<BR>@@ -12,6 +12,14 @@<BR>&nbsp; * Free Software 
Foundation;&nbsp; either version 2 of the&nbsp; License, or (at your<BR>&nbsp; * 
option) any later version.<BR>&nbsp; *<BR>+ * This program is distributed in the 
hope that it will be useful, but<BR>+ * WITHOUT ANY WARRANTY; without even the 
implied warranty of<BR>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE.&nbsp; See the GNU<BR>+ * General Public License for more details.<BR>+ 
*<BR>+ * You should have received a copy of the&nbsp; GNU General Public License 
along<BR>+ * with this program; if not, write&nbsp; to the Free Software 
Foundation, Inc.,<BR>+ * 675 Mass Ave, Cambridge, MA 02139, USA.<BR>&nbsp; 
*/<BR>&nbsp;<BR>&nbsp;#ifndef __PPC_SYSLIB_PPC83XX_SETUP_H<BR>@@ -20,6 +28,7 
@@<BR>&nbsp;#include &lt;linux/config.h&gt;<BR>&nbsp;#include 
&lt;linux/init.h&gt;<BR>&nbsp;#include &lt;asm/ppcboot.h&gt;<BR>+#include 
&lt;asm/mpc83xx.h&gt;<BR>&nbsp;<BR>&nbsp;extern unsigned long 
mpc83xx_find_end_of_memory(void) __init;<BR>&nbsp;extern long 
mpc83xx_time_init(void) __init;<BR>@@ -30,15 +39,6 @@<BR>&nbsp;extern void 
mpc83xx_halt(void);<BR>&nbsp;extern void mpc83xx_setup_hose(void) 
__init;<BR>&nbsp;<BR>-/* PCI config */<BR>-#if 0<BR>-#define 
PCI1_CFG_ADDR_OFFSET&nbsp;(FIXME)<BR>-#define 
PCI1_CFG_DATA_OFFSET&nbsp;(FIXME)<BR>-<BR>-#define 
PCI2_CFG_ADDR_OFFSET&nbsp;(FIXME)<BR>-#define 
PCI2_CFG_DATA_OFFSET&nbsp;(FIXME)<BR>-#endif<BR>-<BR>&nbsp;/* Serial Config 
*/<BR>&nbsp;#ifdef CONFIG_SERIAL_MANY_PORTS<BR>&nbsp;#define RS_TABLE_SIZE&nbsp; 
64<BR>@@ -50,4 +50,4 @@<BR>&nbsp;#define BASE_BAUD 
115200<BR>&nbsp;#endif<BR>&nbsp;<BR>-#endif /* __PPC_SYSLIB_PPC83XX_SETUP_H 
*/<BR>+#endif&nbsp;&nbsp;&nbsp;&nbsp;/* __PPC_SYSLIB_PPC83XX_SETUP_H 
*/<BR></FONT></DIV></BODY></HTML>