@@ -0,0 +1,187 @@+/*+*BitbangedMDIOsupport.+*+*Author:ScottWood<scottwood@freescale.com>+*Copyright(c)2007FreescaleSemiconductor+*+*BasedonCPM2MDIOcodewhichis:+*+*Copyright(c)2003IntracomS.A.+*byPantelisAntoniou<panto@intracom.gr>+*+*2005(c)MontaVistaSoftware,Inc.+*VitalyBordug<vbordug@ru.mvista.com>+*+*ThisfileislicensedunderthetermsoftheGNUGeneralPublicLicense+*version2.Thisprogramislicensed"as is"withoutanywarrantyofany+*kind,whetherexpressorimplied.+*/++#include<linux/module.h>+#include<linux/mdio-bitbang.h>+#include<linux/slab.h>+#include<linux/types.h>+#include<linux/delay.h>++#define MDIO_READ 1+#define MDIO_WRITE 0++#define MDIO_SETUP_TIME 10+#define MDIO_HOLD_TIME 10++/* Minimum MDC period is 400 ns, plus some margin for error */+#define MDIO_DELAY 250++/* The PHY may take up to 300 ns to produce data, plus some margin+*forerror.+*/+#define MDIO_READ_DELAY 350++/* MDIO must already be configured as output. */+staticvoidmdio_bitbang_send_bit(structmdio_bitbang_ctrl*ctrl,intval)+{+conststructmdio_bitbang_ops*ops=ctrl->ops;++ops->set_mdio_data(ctrl,val);+ndelay(MDIO_DELAY);+ops->set_mdc(ctrl,1);+ndelay(MDIO_DELAY);+ops->set_mdc(ctrl,0);+}++/* MDIO must already be configured as input. */+staticintmdio_bitbang_get_bit(structmdio_bitbang_ctrl*ctrl)+{+conststructmdio_bitbang_ops*ops=ctrl->ops;++ndelay(MDIO_DELAY);+ops->set_mdc(ctrl,1);+ndelay(MDIO_READ_DELAY);+ops->set_mdc(ctrl,0);++returnops->get_mdio_data(ctrl);+}++/* MDIO must already be configured as output. */+staticvoidmdio_bitbang_send_num(structmdio_bitbang_ctrl*ctrl,+u16val,intbits)+{+inti;++for(i=bits-1;i>=0;i--)+mdio_bitbang_send_bit(ctrl,(val>>i)&1);+}++/* MDIO must already be configured as input. */+staticu16mdio_bitbang_get_num(structmdio_bitbang_ctrl*ctrl,intbits)+{+inti;+u16ret=0;++for(i=bits-1;i>=0;i--){+ret<<=1;+ret|=mdio_bitbang_get_bit(ctrl);+}++returnret;+}++/* Utility to send the preamble, address, and+*register(commontoreadandwrite).+*/+staticvoidmdio_bitbang_cmd(structmdio_bitbang_ctrl*ctrl,+intread,u8phy,u8reg)+{+conststructmdio_bitbang_ops*ops=ctrl->ops;+inti;++ops->set_mdio_dir(ctrl,1);++/*+*Senda32bitpreamble('1's)withanextra'1'bitforgood+*measure.TheIEEEspecsaysthisisaPHYoptional+*requirement.TheAMD79C874requiresoneafterpowerupand+*oneafteraMIIcommunicationserror.Thismeansthatweare+*doingmorepreamblesthanweneed,butitissaferandwillbe+*muchmorerobust.+*/++for(i=0;i<32;i++)+mdio_bitbang_send_bit(ctrl,1);++/* send the start bit (01) and the read opcode (10) or write (10) */+mdio_bitbang_send_bit(ctrl,0);+mdio_bitbang_send_bit(ctrl,1);+mdio_bitbang_send_bit(ctrl,read);+mdio_bitbang_send_bit(ctrl,!read);++mdio_bitbang_send_num(ctrl,phy,5);+mdio_bitbang_send_num(ctrl,reg,5);+}+++staticintmdio_bitbang_read(structmii_bus*bus,intphy,intreg)+{+structmdio_bitbang_ctrl*ctrl=bus->priv;+intret,i;++mdio_bitbang_cmd(ctrl,MDIO_READ,phy,reg);+ctrl->ops->set_mdio_dir(ctrl,0);++/* check the turnaround bit: the PHY should be driving it to zero */+if(mdio_bitbang_get_bit(ctrl)!=0){+/* PHY didn't drive TA low -- flush any bits it+*maybetryingtosend.+*/+for(i=0;i<32;i++)+mdio_bitbang_get_bit(ctrl);++return0xffff;+}++ret=mdio_bitbang_get_num(ctrl,16);+mdio_bitbang_get_bit(ctrl);+returnret;+}++staticintmdio_bitbang_write(structmii_bus*bus,intphy,intreg,u16val)+{+structmdio_bitbang_ctrl*ctrl=bus->priv;++mdio_bitbang_cmd(ctrl,MDIO_WRITE,phy,reg);++/* send the turnaround (10) */+mdio_bitbang_send_bit(ctrl,1);+mdio_bitbang_send_bit(ctrl,0);++mdio_bitbang_send_num(ctrl,val,16);++ctrl->ops->set_mdio_dir(ctrl,0);+mdio_bitbang_get_bit(ctrl);+return0;+}++structmii_bus*alloc_mdio_bitbang(structmdio_bitbang_ctrl*ctrl)+{+structmii_bus*bus;++bus=kzalloc(sizeof(structmii_bus),GFP_KERNEL);+if(!bus)+returnNULL;++__module_get(ctrl->ops->owner);++bus->read=mdio_bitbang_read;+bus->write=mdio_bitbang_write;+bus->priv=ctrl;++returnbus;+}++voidfree_mdio_bitbang(structmii_bus*bus)+{+structmdio_bitbang_ctrl*ctrl=bus->priv;++module_put(ctrl->ops->owner);+kfree(bus);+}
@@ -0,0 +1,42 @@+#ifndef __LINUX_MDIO_BITBANG_H+#define __LINUX_MDIO_BITBANG_H++#include<linux/phy.h>+#include<linux/module.h>++structmdio_bitbang_ctrl;++structmdio_bitbang_ops{+structmodule*owner;++/* Set the Management Data Clock high if level is one,+*lowifleveliszero.+*/+void(*set_mdc)(structmdio_bitbang_ctrl*ctrl,intlevel);++/* Configure the Management Data I/O pin as an input if+*"output"iszero,oranoutputif"output"isone.+*/+void(*set_mdio_dir)(structmdio_bitbang_ctrl*ctrl,intoutput);++/* Set the Management Data I/O pin high if value is one,+*lowif"value"iszero.Thismayonlybecalled+*whentheMDIOpinisconfiguredasanoutput.+*/+void(*set_mdio_data)(structmdio_bitbang_ctrl*ctrl,intvalue);++/* Retrieve the state Management Data I/O pin. */+int(*get_mdio_data)(structmdio_bitbang_ctrl*ctrl);+};++structmdio_bitbang_ctrl{+conststructmdio_bitbang_ops*ops;+};++/* The returned bus is not yet registered with the phy layer. */+structmii_bus*alloc_mdio_bitbang(structmdio_bitbang_ctrl*ctrl);++/* The bus must already have been unregistered. */+voidfree_mdio_bitbang(structmii_bus*bus);++#endif
@@ -113,7 +113,6 @@ static int fs_enet_fec_mii_read(struct mii_bus *bus , int phy_id, int location)}returnret;-}staticintfs_enet_fec_mii_write(structmii_bus*bus,intphy_id,intlocation,u16val)
From: Scott Wood <hidden> Date: 2007-08-28 20:14:50
This driver can't handle an interrupt immediately after request_irq
(making it fail with CONFIG_DEBUG_SHIRQ), and has unshared interrupts
on all hardware I'm aware of.
Signed-off-by: Scott Wood <redacted>
---
drivers/net/fs_enet/fs_enet-main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
From: Scott Wood <hidden> Date: 2007-08-28 20:14:52
These macros accomplish nothing other than defeating type checking.
This patch also fixes one instance of the wrong register size being
used that was revealed by enabling type checking.
Signed-off-by: Scott Wood <redacted>
---
drivers/net/fs_enet/mac-fcc.c | 25 ++++++++-----------------
1 files changed, 8 insertions(+), 17 deletions(-)
From: Scott Wood <hidden> Date: 2007-08-28 20:14:54
At least some hardware driven by this driver needs receive buffers
to be aligned on a 16-byte boundary. This usually happens by chance,
but it breaks if slab debugging is enabled.
Signed-off-by: Scott Wood <redacted>
---
drivers/net/fs_enet/fs_enet-main.c | 21 +++++++++++++++++++--
drivers/net/fs_enet/fs_enet.h | 3 ++-
2 files changed, 21 insertions(+), 3 deletions(-)
@@ -69,6 +69,14 @@ static void fs_set_multicast_list(struct net_device *dev)(*fep->ops->set_multicast_list)(dev);}+staticvoidskb_align(structsk_buff*skb,intalign)+{+intoff=((unsignedlong)skb->data)&(align-1);++if(off)+skb_reserve(skb,align-off);+}+/* NAPI receive function */staticintfs_enet_rx_napi(structnet_device*dev,int*budget){
@@ -166,9 +174,13 @@ static int fs_enet_rx_napi(struct net_device *dev, int *budget)skb=skbn;skbn=skbt;}-}else+}else{skbn=dev_alloc_skb(ENET_RX_FRSIZE);+if(skbn)+skb_align(skbn,ENET_RX_ALIGN);+}+if(skbn!=NULL){skb_put(skb,pkt_len);/* Make room */skb->protocol=eth_type_trans(skb,dev);
@@ -300,9 +312,13 @@ static int fs_enet_rx_non_napi(struct net_device *dev)skb=skbn;skbn=skbt;}-}else+}else{skbn=dev_alloc_skb(ENET_RX_FRSIZE);+if(skbn)+skb_align(skbn,ENET_RX_ALIGN);+}+if(skbn!=NULL){skb_put(skb,pkt_len);/* Make room */skb->protocol=eth_type_trans(skb,dev);
@@ -82,7 +82,8 @@ struct phy_info {/* Must be a multiple of 32 (to cover both FEC & FCC) */#define PKT_MAXBLR_SIZE ((PKT_MAXBUF_SIZE + 31) & ~31)/* This is needed so that invalidate_xxx wont invalidate too much */-#define ENET_RX_FRSIZE L1_CACHE_ALIGN(PKT_MAXBUF_SIZE)+#define ENET_RX_ALIGN 16+#define ENET_RX_FRSIZE L1_CACHE_ALIGN(PKT_MAXBUF_SIZE + ENET_RX_ALIGN - 1)structfs_enet_mii_bus{structlist_headlist;
@@ -62,7 +62,7 @@ MODULE_DESCRIPTION("Freescale Ethernet Driver");MODULE_LICENSE("GPL");MODULE_VERSION(DRV_MODULE_VERSION);-intfs_enet_debug=-1;/* -1 == use FS_ENET_DEF_MSG_ENABLE as value */+staticintfs_enet_debug=-1;/* -1 == use FS_ENET_DEF_MSG_ENABLE as value */module_param(fs_enet_debug,int,0);MODULE_PARM_DESC(fs_enet_debug,"Freescale bitmapped debugging message enable value");
@@ -88,7 +88,7 @@ static int fs_enet_rx_napi(struct net_device *dev, int *budget){structfs_enet_private*fep=netdev_priv(dev);conststructfs_platform_info*fpi=fep->fpi;-cbd_t*bdp;+cbd_t__iomem*bdp;structsk_buff*skb,*skbn,*skbt;intreceived=0;u16pkt_len,sc;
@@ -240,7 +240,7 @@ static int fs_enet_rx_non_napi(struct net_device *dev){structfs_enet_private*fep=netdev_priv(dev);conststructfs_platform_info*fpi=fep->fpi;-cbd_t*bdp;+cbd_t__iomem*bdp;structsk_buff*skb,*skbn,*skbt;intreceived=0;u16pkt_len,sc;
@@ -365,7 +365,7 @@ static int fs_enet_rx_non_napi(struct net_device *dev)staticvoidfs_enet_tx(structnet_device*dev){structfs_enet_private*fep=netdev_priv(dev);-cbd_t*bdp;+cbd_t__iomem*bdp;structsk_buff*skb;intdirtyidx,do_wake,do_restart;u16sc;
@@ -1144,7 +1144,7 @@ static int fs_cleanup_instance(struct net_device *ndev)/**************************************************************************************//* handy pointer to the immap */-void*fs_enet_immap=NULL;+void__iomem*fs_enet_immap=NULL;staticintsetup_immap(void){
@@ -80,14 +80,14 @@ struct fs_enet_private {conststructfs_ops*ops;intrx_ring,tx_ring;dma_addr_tring_mem_addr;-void*ring_base;+void__iomem*ring_base;structsk_buff**rx_skbuff;structsk_buff**tx_skbuff;-cbd_t*rx_bd_base;/* Address of Rx and Tx buffers. */-cbd_t*tx_bd_base;-cbd_t*dirty_tx;/* ring entries to be free()ed. */-cbd_t*cur_rx;-cbd_t*cur_tx;+cbd_t__iomem*rx_bd_base;/* Address of Rx and Tx buffers. */+cbd_t__iomem*tx_bd_base;+cbd_t__iomem*dirty_tx;/* ring entries to be free()ed. */+cbd_t__iomem*cur_rx;+cbd_t__iomem*cur_tx;inttx_free;structnet_device_statsstats;structtimer_listphy_timer_list;
@@ -237,7 +237,7 @@ static void set_multicast_one(struct net_device *dev, const u8 *mac)staticvoidset_multicast_finish(structnet_device*dev){structfs_enet_private*fep=netdev_priv(dev);-fec_t*fecp=fep->fec.fecp;+fec_t__iomem*fecp=fep->fec.fecp;/* if all multi or too many multicasts; just enable all */if((dev->flags&IFF_ALLMULTI)!=0||
@@ -70,7 +70,7 @@ static int match_has_phy (struct device *dev, void* data)staticintfs_mii_fec_init(structfec_info*fec,structfs_mii_fec_platform_info*fmpi){structresource*r;-fec_t*fecp;+fec_t__iomem*fecp;char*name="fsl-cpm-fec";/* we need fec in order to be useful */
@@ -124,7 +124,7 @@ static int fs_enet_fec_mii_read(struct mii_bus *bus , int phy_id, int location)staticintfs_enet_fec_mii_write(structmii_bus*bus,intphy_id,intlocation,u16val){structfec_info*fec=bus->priv;-fec_t*fecp=fec->fecp;+fec_t__iomem*fecp=fec->fecp;inti;/* this must never happen */
From: Scott Wood <hidden> Date: 2007-08-28 20:15:01
The existing OF glue code was crufty and broken. Rather than fix it, it
will be removed, and the ethernet driver now talks to the device tree
directly.
The old, non-CONFIG_PPC_CPM_NEW_BINDING code can go away once CPM
platforms are dropped from arch/ppc (which will hopefully be soon), and
existing arch/powerpc boards that I wasn't able to test on for this
patchset get converted (which should be even sooner).
mii-bitbang.c now also uses the generic bitbang code, and is generally
cleaned up,
Signed-off-by: Scott Wood <redacted>
---
drivers/net/fs_enet/Kconfig | 1 +
drivers/net/fs_enet/fs_enet-main.c | 259 ++++++++++++++++++++--
drivers/net/fs_enet/fs_enet.h | 55 +-----
drivers/net/fs_enet/mac-fcc.c | 89 ++++++--
drivers/net/fs_enet/mac-fec.c | 19 ++-
drivers/net/fs_enet/mac-scc.c | 53 +++--
drivers/net/fs_enet/mii-bitbang.c | 440 +++++++++++++++++-------------------
drivers/net/fs_enet/mii-fec.c | 144 ++++++++++++-
include/linux/fs_enet_pd.h | 5 +
9 files changed, 716 insertions(+), 349 deletions(-)
@@ -11,6 +11,7 @@ config FS_ENET_HAS_SCCconfigFS_ENET_HAS_FCCbool"Chip has an FCC usable for ethernet"depends onFS_ENET&&CPM2+selectMDIO_BITBANGdefaultyconfigFS_ENET_HAS_FEC
@@ -24,19 +24,6 @@ struct fec_info {#include<asm/cpm2.h>#endif-/* This is used to operate with pins.-Notethattheactualportsizemay-bedifferent;cpm(s)handleitOK*/-structbb_info{-u8mdio_dat_msk;-u8mdio_dir_msk;-u8*mdio_dir;-u8*mdio_dat;-u8mdc_msk;-u8*mdc_dat;-intdelay;-};-/* hw driver ops */structfs_ops{int(*setup_data)(structnet_device*dev);
@@ -85,47 +72,11 @@ struct phy_info {#define ENET_RX_ALIGN 16#define ENET_RX_FRSIZE L1_CACHE_ALIGN(PKT_MAXBUF_SIZE + ENET_RX_ALIGN - 1)-structfs_enet_mii_bus{-structlist_headlist;-spinlock_tmii_lock;-conststructfs_mii_bus_info*bus_info;-intrefs;-u32usage_map;--int(*mii_read)(structfs_enet_mii_bus*bus,-intphy_id,intlocation);--void(*mii_write)(structfs_enet_mii_bus*bus,-intphy_id,intlocation,intvalue);--union{-struct{-unsignedintmii_speed;-void*fecp;-}fec;--struct{-/* note that the actual port size may */-/* be different; cpm(s) handle it OK */-u8mdio_msk;-u8*mdio_dir;-u8*mdio_dat;-u8mdc_msk;-u8*mdc_dir;-u8*mdc_dat;-}bitbang;--struct{-u16lpa;-}fixed;-};-};-structfs_enet_private{structdevice*dev;/* pointer back to the device (must be initialized first) */spinlock_tlock;/* during all ops except TX pckt processing */spinlock_ttx_lock;/* during fs_start_xmit and fs_tx */-conststructfs_platform_info*fpi;+structfs_platform_info*fpi;conststructfs_ops*ops;intrx_ring,tx_ring;dma_addr_tring_mem_addr;
@@ -74,33 +78,64 @@#define MAX_CR_CMD_LOOPS 10000-staticinlineintfcc_cr_cmd(structfs_enet_private*fep,u32mcn,u32op)+staticinlineintfcc_cr_cmd(structfs_enet_private*fep,u32op){conststructfs_platform_info*fpi=fep->fpi;cpm2_map_t*immap=fs_enet_immap;cpm_cpm2_t*cpmp=&immap->im_cpm;-u32v;inti;-/* Currently I don't know what feature call will look like. But -Iguessthere'dbesomethinglikedo_cpm_cmd()whichwillrequirepage&sblock*/-v=mk_cr_cmd(fpi->cp_page,fpi->cp_block,mcn,op);-W32(cpmp,cp_cpcr,v|CPM_CR_FLG);+W32(cpmp,cp_cpcr,fpi->cp_command|op|CPM_CR_FLG);for(i=0;i<MAX_CR_CMD_LOOPS;i++)if((R32(cpmp,cp_cpcr)&CPM_CR_FLG)==0)-break;--if(i>=MAX_CR_CMD_LOOPS){-printk(KERN_ERR"%s(): Not able to issue CPM command\n",-__FUNCTION__);-return1;-}+return0;-return0;+printk(KERN_ERR"%s(): Not able to issue CPM command\n",+__FUNCTION__);+return1;}staticintdo_pd_setup(structfs_enet_private*fep){+#ifdef CONFIG_PPC_CPM_NEW_BINDING+structof_device*ofdev=to_of_device(fep->dev);+structfs_platform_info*fpi=fep->fpi;+intret=-EINVAL;++fep->interrupt=of_irq_to_resource(ofdev->node,0,NULL);+if(fep->interrupt==NO_IRQ)+gotoout;++fep->fcc.fccp=of_iomap(ofdev->node,0);+if(!fep->fcc.fccp)+gotoout;++fep->fcc.ep=of_iomap(ofdev->node,1);+if(!fep->fcc.ep)+gotoout_fccp;++fep->fcc.fcccp=of_iomap(ofdev->node,2);+if(!fep->fcc.fcccp)+gotoout_ep;++fep->fcc.mem=(void*)cpm_dpalloc(128,8);+fpi->dpram_offset=(u32)cpm2_immr;+if(IS_ERR_VALUE(fpi->dpram_offset)){+ret=fpi->dpram_offset;+gotoout_fcccp;+}++return0;++out_fcccp:+iounmap(fep->fcc.fcccp);+out_ep:+iounmap(fep->fcc.ep);+out_fccp:+iounmap(fep->fcc.fccp);+out:+returnret;+#elsestructplatform_device*pdev=to_platform_device(fep->dev);structresource*r;
@@ -515,23 +557,22 @@ int get_regs(struct net_device *dev, void *p, int *sizep){structfs_enet_private*fep=netdev_priv(dev);-if(*sizep<sizeof(fcc_t)+sizeof(fcc_c_t)+sizeof(fcc_enet_t))+if(*sizep<sizeof(fcc_t)+sizeof(fcc_enet_t)+1)return-EINVAL;memcpy_fromio(p,fep->fcc.fccp,sizeof(fcc_t));p=(char*)p+sizeof(fcc_t);-memcpy_fromio(p,fep->fcc.fcccp,sizeof(fcc_c_t));-p=(char*)p+sizeof(fcc_c_t);-memcpy_fromio(p,fep->fcc.ep,sizeof(fcc_enet_t));+p=(char*)p+sizeof(fcc_enet_t);+memcpy_fromio(p,fep->fcc.fcccp,1);return0;}intget_regs_len(structnet_device*dev){-returnsizeof(fcc_t)+sizeof(fcc_c_t)+sizeof(fcc_enet_t);+returnsizeof(fcc_t)+sizeof(fcc_enet_t)+1;}/* Some transmit errors cause the transmitter to shut
@@ -89,27 +93,38 @@staticinlineintscc_cr_cmd(structfs_enet_private*fep,u32op){-cpm8xx_t*cpmp=&((immap_t*)fs_enet_immap)->im_cpm;-u32v,ch;-inti=0;+conststructfs_platform_info*fpi=fep->fpi;+inti;-ch=fep->scc.idx<<2;-v=mk_cr_cmd(ch,op);-W16(cpmp,cp_cpcr,v|CPM_CR_FLG);+W16(cpmp,cp_cpcr,fpi->cp_command|CPM_CR_FLG|(op<<8));for(i=0;i<MAX_CR_CMD_LOOPS;i++)if((R16(cpmp,cp_cpcr)&CPM_CR_FLG)==0)-break;+return0;-if(i>=MAX_CR_CMD_LOOPS){-printk(KERN_ERR"%s(): Not able to issue CPM command\n",-__FUNCTION__);-return1;-}-return0;+printk(KERN_ERR"%s(): Not able to issue CPM command\n",+__FUNCTION__);+return1;}staticintdo_pd_setup(structfs_enet_private*fep){+#ifdef CONFIG_PPC_CPM_NEW_BINDING+structof_device*ofdev=to_of_device(fep->dev);++fep->interrupt=of_irq_to_resource(ofdev->node,0,NULL);+if(fep->interrupt==NO_IRQ)+return-EINVAL;++fep->scc.sccp=of_iomap(ofdev->node,0);+if(!fep->scc.sccp)+return-EINVAL;++fep->scc.ep=of_iomap(ofdev->node,1);+if(!fep->scc.ep){+iounmap(fep->scc.sccp);+return-EINVAL;+}+#elsestructplatform_device*pdev=to_platform_device(fep->dev);structresource*r;
@@ -129,6 +144,7 @@ static int do_pd_setup(struct fs_enet_private *fep)if(fep->scc.ep==NULL)return-EINVAL;+#endifreturn0;}
@@ -141,12 +157,17 @@ static int do_pd_setup(struct fs_enet_private *fep)staticintsetup_data(structnet_device*dev){structfs_enet_private*fep=netdev_priv(dev);-conststructfs_platform_info*fpi=fep->fpi;++#ifdef CONFIG_PPC_CPM_NEW_BINDING+structfs_platform_info*fpi=fep->fpi;fep->scc.idx=fs_get_scc_index(fpi->fs_no);-if((unsignedint)fep->fcc.idx>4)/* max 4 SCCs */+if((unsignedint)fep->fcc.idx>=4)/* max 4 SCCs */return-EINVAL;+fpi->cp_command=fep->fcc.idx<<6;+#endif+do_pd_setup(fep);fep->scc.hthi=0;
@@ -154,7 +175,7 @@ static int setup_data(struct net_device *dev)fep->ev_napi_rx=SCC_NAPI_RX_EVENT_MSK;fep->ev_rx=SCC_RX_EVENT;-fep->ev_tx=SCC_TX_EVENT;+fep->ev_tx=SCC_TX_EVENT|SCCE_ENET_TXE;fep->ev_err=SCC_ERR_EVENT_MSK;return0;
@@ -14,301 +14,271 @@#include<linux/module.h>-#include<linux/types.h>-#include<linux/kernel.h>-#include<linux/string.h>-#include<linux/ptrace.h>-#include<linux/errno.h>+#include<linux/init.h>#include<linux/ioport.h>#include<linux/slab.h>#include<linux/interrupt.h>-#include<linux/init.h>-#include<linux/delay.h>#include<linux/netdevice.h>#include<linux/etherdevice.h>-#include<linux/skbuff.h>-#include<linux/spinlock.h>#include<linux/mii.h>-#include<linux/ethtool.h>-#include<linux/bitops.h>#include<linux/platform_device.h>+#include<linux/mdio-bitbang.h>-#include<asm/pgtable.h>-#include<asm/irq.h>-#include<asm/uaccess.h>+#ifdef CONFIG_PPC_CPM_NEW_BINDING+#include<linux/of_platform.h>+#endif#include"fs_enet.h"-staticintbitbang_prep_bit(u8**datp,u8*mskp,-structfs_mii_bit*mii_bit)-{-void*dat;-intadv;-u8msk;--dat=(void*)mii_bit->offset;--adv=mii_bit->bit>>3;-dat=(char*)dat+adv;--msk=1<<(7-(mii_bit->bit&7));--*datp=dat;-*mskp=msk;--return0;-}+structbb_info{+structmdio_bitbang_ctrlctrl;+__be32__iomem*dir;+__be32__iomem*dat;+u32mdio_msk;+u32mdc_msk;+intdelay;+};-staticinlinevoidbb_set(u8*p,u8m)+/* FIXME: If any other users of GPIO crop up, then these will have to+*havesomesortofglobalsynchronizationtoavoidraceswithother+*pinsonthesameport.Theidealsolutionwouldprobablybeto+*bindtheportstoaGPIOdriver,andhavethisbeaclientofit.+*/+staticinlinevoidbb_set(u32__iomem*p,u32m){-out_8(p,in_8(p)|m);+out_be32(p,in_be32(p)|m);}-staticinlinevoidbb_clr(u8*p,u8m)+staticinlinevoidbb_clr(u32__iomem*p,u32m){-out_8(p,in_8(p)&~m);+out_be32(p,in_be32(p)&~m);}-staticinlineintbb_read(u8*p,u8m)+staticinlineintbb_read(u32__iomem*p,u32m){-return(in_8(p)&m)!=0;+return(in_be32(p)&m)!=0;}-staticinlinevoidmdio_active(structbb_info*bitbang)+staticinlinevoidmdio_dir(structmdio_bitbang_ctrl*ctrl,intdir){-bb_set(bitbang->mdio_dir,bitbang->mdio_dir_msk);-}+structbb_info*bitbang=container_of(ctrl,structbb_info,ctrl);-staticinlinevoidmdio_tristate(structbb_info*bitbang)-{-bb_clr(bitbang->mdio_dir,bitbang->mdio_dir_msk);+if(dir)+bb_set(bitbang->dir,bitbang->mdio_msk);+else+bb_clr(bitbang->dir,bitbang->mdio_msk);}-staticinlineintmdio_read(structbb_info*bitbang)+staticinlineintmdio_read(structmdio_bitbang_ctrl*ctrl){-returnbb_read(bitbang->mdio_dat,bitbang->mdio_dat_msk);+structbb_info*bitbang=container_of(ctrl,structbb_info,ctrl);+returnbb_read(bitbang->dat,bitbang->mdio_msk);}-staticinlinevoidmdio(structbb_info*bitbang,intwhat)+staticinlinevoidmdio(structmdio_bitbang_ctrl*ctrl,intwhat){+structbb_info*bitbang=container_of(ctrl,structbb_info,ctrl);+if(what)-bb_set(bitbang->mdio_dat,bitbang->mdio_dat_msk);+bb_set(bitbang->dat,bitbang->mdio_msk);else-bb_clr(bitbang->mdio_dat,bitbang->mdio_dat_msk);+bb_clr(bitbang->dat,bitbang->mdio_msk);}-staticinlinevoidmdc(structbb_info*bitbang,intwhat)+staticinlinevoidmdc(structmdio_bitbang_ctrl*ctrl,intwhat){+structbb_info*bitbang=container_of(ctrl,structbb_info,ctrl);+if(what)-bb_set(bitbang->mdc_dat,bitbang->mdc_msk);+bb_set(bitbang->dat,bitbang->mdc_msk);else-bb_clr(bitbang->mdc_dat,bitbang->mdc_msk);+bb_clr(bitbang->dat,bitbang->mdc_msk);}-staticinlinevoidmii_delay(structbb_info*bitbang)+staticstructmdio_bitbang_opsbb_ops={+.owner=THIS_MODULE,+.set_mdc=mdc,+.set_mdio_dir=mdio_dir,+.set_mdio_data=mdio,+.get_mdio_data=mdio_read,+};++#ifdef CONFIG_PPC_CPM_NEW_BINDING+staticint__devinitfs_mii_bitbang_init(structmii_bus*bus,+structdevice_node*np){-udelay(bitbang->delay);+structresourceres;+constu32*data;+intmdio_pin,mdc_pin,len;+structbb_info*bitbang=bus->priv;++intret=of_address_to_resource(np,0,&res);+if(ret)+returnret;++if(res.end-res.start<13)+return-ENODEV;++/* This should really encode the pin number as well, but all+*wegetisanint,andtheoddsofmultiplebitbangmdiobuses+*islowenoughthatit'snotworthgoingtoocrazy.+*/+bus->id=res.start;++data=of_get_property(np,"fsl,mdio-pin",&len);+if(!data||len!=4)+return-ENODEV;+mdio_pin=*data;++data=of_get_property(np,"fsl,mdc-pin",&len);+if(!data||len!=4)+return-ENODEV;+mdc_pin=*data;++bitbang->dir=ioremap(res.start,res.end-res.start+1);+if(!bitbang->dir)+return-ENOMEM;++bitbang->dat=bitbang->dir+4;+bitbang->mdio_msk=1<<(31-mdio_pin);+bitbang->mdc_msk=1<<(31-mdc_pin);+bitbang->delay=1;/* 1 us between operations */++return0;}-/* Utility to send the preamble, address, and register (common to read and write). */-staticvoidbitbang_pre(structbb_info*bitbang,intread,u8addr,u8reg)+staticvoid__devinitadd_phy(structmii_bus*bus,structdevice_node*np){-intj;--/*-*Senda32bitpreamble('1's)withanextra'1'bitforgoodmeasure.-*TheIEEEspecsaysthisisaPHYoptionalrequirement.TheAMD-*79C874requiresoneafterpowerupandoneafteraMIIcommunications-*error.Thismeansthatwearedoingmorepreamblesthanweneed,-*butitissaferandwillbemuchmorerobust.-*/+constu32*data;+intlen,id,irq;-mdio_active(bitbang);-mdio(bitbang,1);-for(j=0;j<32;j++){-mdc(bitbang,0);-mii_delay(bitbang);-mdc(bitbang,1);-mii_delay(bitbang);-}+data=of_get_property(np,"reg",&len);+if(!data||len!=4)+return;-/* send the start bit (01) and the read opcode (10) or write (10) */-mdc(bitbang,0);-mdio(bitbang,0);-mii_delay(bitbang);-mdc(bitbang,1);-mii_delay(bitbang);-mdc(bitbang,0);-mdio(bitbang,1);-mii_delay(bitbang);-mdc(bitbang,1);-mii_delay(bitbang);-mdc(bitbang,0);-mdio(bitbang,read);-mii_delay(bitbang);-mdc(bitbang,1);-mii_delay(bitbang);-mdc(bitbang,0);-mdio(bitbang,!read);-mii_delay(bitbang);-mdc(bitbang,1);-mii_delay(bitbang);--/* send the PHY address */-for(j=0;j<5;j++){-mdc(bitbang,0);-mdio(bitbang,(addr&0x10)!=0);-mii_delay(bitbang);-mdc(bitbang,1);-mii_delay(bitbang);-addr<<=1;-}+id=*data;+bus->phy_mask&=~(1<<id);-/* send the register address */-for(j=0;j<5;j++){-mdc(bitbang,0);-mdio(bitbang,(reg&0x10)!=0);-mii_delay(bitbang);-mdc(bitbang,1);-mii_delay(bitbang);-reg<<=1;-}+irq=of_irq_to_resource(np,0,NULL);+if(irq!=NO_IRQ)+bus->irq[id]=irq;}-staticintfs_enet_mii_bb_read(structmii_bus*bus,intphy_id,intlocation)+staticint__devinitfs_enet_mdio_probe(structof_device*ofdev,+conststructof_device_id*match){-u16rdreg;-intret,j;-u8addr=phy_id&0xff;-u8reg=location&0xff;-structbb_info*bitbang=bus->priv;--bitbang_pre(bitbang,1,addr,reg);--/* tri-state our MDIO I/O pin so we can read */-mdc(bitbang,0);-mdio_tristate(bitbang);-mii_delay(bitbang);-mdc(bitbang,1);-mii_delay(bitbang);--/* check the turnaround bit: the PHY should be driving it to zero */-if(mdio_read(bitbang)!=0){-/* PHY didn't drive TA low */-for(j=0;j<32;j++){-mdc(bitbang,0);-mii_delay(bitbang);-mdc(bitbang,1);-mii_delay(bitbang);-}-ret=-1;+structdevice_node*np=NULL;+structmii_bus*new_bus;+structbb_info*bitbang;+intret=-ENOMEM;+inti;++bitbang=kzalloc(sizeof(structbb_info),GFP_KERNEL);+if(!bitbang)gotoout;-}-mdc(bitbang,0);-mii_delay(bitbang);--/* read 16 bits of register data, MSB first */-rdreg=0;-for(j=0;j<16;j++){-mdc(bitbang,1);-mii_delay(bitbang);-rdreg<<=1;-rdreg|=mdio_read(bitbang);-mdc(bitbang,0);-mii_delay(bitbang);-}+bitbang->ctrl.ops=&bb_ops;-mdc(bitbang,1);-mii_delay(bitbang);-mdc(bitbang,0);-mii_delay(bitbang);-mdc(bitbang,1);-mii_delay(bitbang);+new_bus=alloc_mdio_bitbang(&bitbang->ctrl);+if(!new_bus)+gotoout_free_priv;-ret=rdreg;+new_bus->name="CPM2 Bitbanged MII",++ret=fs_mii_bitbang_init(new_bus,ofdev->node);+if(ret)+gotoout_free_bus;++new_bus->phy_mask=~0;+new_bus->irq=kmalloc(sizeof(int)*PHY_MAX_ADDR,GFP_KERNEL);+if(!new_bus->irq)+gotoout_unmap_regs;++for(i=0;i<PHY_MAX_ADDR;i++)+new_bus->irq[i]=-1;++while((np=of_get_next_child(ofdev->node,np)))+if(!strcmp(np->type,"ethernet-phy"))+add_phy(new_bus,np);++new_bus->dev=&ofdev->dev;+dev_set_drvdata(&ofdev->dev,new_bus);++ret=mdiobus_register(new_bus);+if(ret)+gotoout_free_irqs;++return0;++out_free_irqs:+dev_set_drvdata(&ofdev->dev,NULL);+kfree(new_bus->irq);+out_unmap_regs:+iounmap(bitbang->dir);+out_free_bus:+kfree(new_bus);+out_free_priv:+free_mdio_bitbang(new_bus);out:returnret;}-staticintfs_enet_mii_bb_write(structmii_bus*bus,intphy_id,intlocation,u16val)+staticintfs_enet_mdio_remove(structof_device*ofdev){-intj;-structbb_info*bitbang=bus->priv;--u8addr=phy_id&0xff;-u8reg=location&0xff;-u16value=val&0xffff;--bitbang_pre(bitbang,0,addr,reg);--/* send the turnaround (10) */-mdc(bitbang,0);-mdio(bitbang,1);-mii_delay(bitbang);-mdc(bitbang,1);-mii_delay(bitbang);-mdc(bitbang,0);-mdio(bitbang,0);-mii_delay(bitbang);-mdc(bitbang,1);-mii_delay(bitbang);--/* write 16 bits of register data, MSB first */-for(j=0;j<16;j++){-mdc(bitbang,0);-mdio(bitbang,(value&0x8000)!=0);-mii_delay(bitbang);-mdc(bitbang,1);-mii_delay(bitbang);-value<<=1;-}+structmii_bus*bus=dev_get_drvdata(&ofdev->dev);+structbb_info*bitbang=bus->priv;++mdiobus_unregister(bus);+free_mdio_bitbang(bus);+dev_set_drvdata(&ofdev->dev,NULL);+kfree(bus->irq);+iounmap(bitbang->dir);+kfree(bitbang);+kfree(bus);-/*-*Tri-statetheMDIOline.-*/-mdio_tristate(bitbang);-mdc(bitbang,0);-mii_delay(bitbang);-mdc(bitbang,1);-mii_delay(bitbang);return0;}-staticintfs_enet_mii_bb_reset(structmii_bus*bus)+staticstructof_device_idfs_enet_mdio_bb_match[]={+{+.compatible="fsl,cpm2-mdio-bitbang",+},+{},+};++staticstructof_platform_driverfs_enet_bb_mdio_driver={+.name="fsl-bb-mdio",+.match_table=fs_enet_mdio_bb_match,+.probe=fs_enet_mdio_probe,+.remove=fs_enet_mdio_remove,+};++staticintfs_enet_mdio_bb_init(void)+{+returnof_register_platform_driver(&fs_enet_bb_mdio_driver);+}++staticintfs_enet_mdio_bb_exit(void){-/*nothing here - dunno how to reset it*/+of_unregister_platform_driver(&fs_enet_bb_mdio_driver);return0;}-staticintfs_mii_bitbang_init(structbb_info*bitbang,structfs_mii_bb_platform_info*fmpi)+module_init(fs_enet_mdio_bb_init);+module_init(fs_enet_mdio_bb_exit);+#else+staticint__devinitfs_mii_bitbang_init(structbb_info*bitbang,+structfs_mii_bb_platform_info*fmpi){-intr;-+bitbang->dir=(u32__iomem*)fmpi->mdio_dir.offset;+bitbang->dat=(u32__iomem*)fmpi->mdio_dat.offset;+bitbang->mdio_msk=1U<<(31-fmpi->mdio_dat.bit);+bitbang->mdc_msk=1U<<(31-fmpi->mdc_dat.bit);bitbang->delay=fmpi->delay;-r=bitbang_prep_bit(&bitbang->mdio_dir,-&bitbang->mdio_dir_msk,-&fmpi->mdio_dir);-if(r!=0)-returnr;--r=bitbang_prep_bit(&bitbang->mdio_dat,-&bitbang->mdio_dat_msk,-&fmpi->mdio_dat);-if(r!=0)-returnr;--r=bitbang_prep_bit(&bitbang->mdc_dat,-&bitbang->mdc_msk,-&fmpi->mdc_dat);-if(r!=0)-returnr;-return0;}-staticint__devinitfs_enet_mdio_probe(structdevice*dev){structplatform_device*pdev=to_platform_device(dev);
@@ -320,20 +290,19 @@ static int __devinit fs_enet_mdio_probe(struct device *dev)if(NULL==dev)return-EINVAL;-new_bus=kzalloc(sizeof(structmii_bus),GFP_KERNEL);+bitbang=kzalloc(sizeof(structbb_info),GFP_KERNEL);-if(NULL==new_bus)+if(NULL==bitbang)return-ENOMEM;-bitbang=kzalloc(sizeof(structbb_info),GFP_KERNEL);+bitbang->ctrl.ops=&bb_ops;-if(NULL==bitbang)+new_bus=alloc_mdio_bitbang(&bitbang->ctrl);++if(NULL==new_bus)return-ENOMEM;new_bus->name="BB MII Bus",-new_bus->read=&fs_enet_mii_bb_read,-new_bus->write=&fs_enet_mii_bb_write,-new_bus->reset=&fs_enet_mii_bb_reset,new_bus->id=pdev->id;new_bus->phy_mask=~0x9;
@@ -365,13 +334,12 @@ static int __devinit fs_enet_mdio_probe(struct device *dev)return0;bus_register_fail:+free_mdio_bitbang(new_bus);kfree(bitbang);-kfree(new_bus);returnerr;}-staticintfs_enet_mdio_remove(structdevice*dev){structmii_bus*bus=dev_get_drvdata(dev);
@@ -380,9 +348,7 @@ static int fs_enet_mdio_remove(struct device *dev)dev_set_drvdata(dev,NULL);-iounmap((void*)(&bus->priv));-bus->priv=NULL;-kfree(bus);+free_mdio_bitbang(bus);return0;}
@@ -211,6 +211,15 @@ config PPC_EARLY_DEBUG_44xSelectthistoenableearlydebuggingforIBM44xchipsviatheinbuiltserialport.+configPPC_EARLY_DEBUG_CPM+bool"Early serial debugging for Freescale CPM-based serial ports"+depends onSERIAL_CPM+selectPIN_TLBifPPC_8xx+help+SelectthistoenableearlydebuggingforFreescalechips+usingaCPM-basedserialport.Thisassumesthatthebootwrapper+hasrun,andsetuptheCPMinaparticularway.+endchoiceconfigPPC_EARLY_DEBUG_44x_PHYSLOW
@@ -34,6 +34,7 @@ endif# Temporary hack until we have migrated to asm-powerpcifeq ($(ARCH),powerpc)+obj-$(CONFIG_CPM1)$(CONFIG_CPM2)+=cpm_common.oobj-$(CONFIG_CPM2)+=cpm2_common.ocpm2_pic.oobj-$(CONFIG_8xx)+=mpc8xx_pic.ocommproc.oobj-$(CONFIG_UCODE_PATCH)+=micropatch.o
From: Scott Wood <hidden> Date: 2007-08-28 20:24:06
This introduces a new device binding for the CPM and other devices on
these boards. Some of the changes include:
1. Proper namespace scoping for Freescale compatibles and properties.
2. Use compatible rather than things like device_type and model
to determine which particular variant of a device is present.
3. Give the drivers the relevant CPM command word directly, rather than
requiring it to have a lookup table based on device-id, SCC v. SMC, and
CPM version.
4. Specify the CPCR and the usable DPRAM region in the CPM's reg property.
Boards that do not require the legacy bindings should select
CONFIG_PPC_CPM_NEW_BINDING to enable the of_platform CPM devices. Once
all existing boards are converted and tested, the config option can
become default y to prevent new boards from using the old model. Once
arch/ppc is gone, the config option can be removed altogether.
Signed-off-by: Scott Wood <redacted>
---
Documentation/powerpc/booting-without-of.txt | 169 +++++++++++++++++++++++++-
arch/powerpc/platforms/Kconfig | 11 ++
arch/powerpc/sysdev/fsl_soc.c | 2 +
3 files changed, 181 insertions(+), 1 deletions(-)
@@ -1510,7 +1510,10 @@ platforms are moved over to use the flattened-device-tree model. i) Freescale QUICC Engine module (QE) This represents qe module that is installed on PowerQUICC II Pro.- Hopefully it will merge backward compatibility with CPM/CPM2.++ NOTE: This is an interim binding; it should be updated to fit+ in with the CPM binding later in this document.+ Basically, it is a bus of devices, that could act more or less as a complete entity (UCC, USB etc ). All of them should be siblings on the "root" qe node, using the common properties from there.
@@ -1824,6 +1827,170 @@ platforms are moved over to use the flattened-device-tree model. fsl,has-rstcr; };+ l) Freescale Communications Processor Module++ NOTE: This is an interim binding, and will likely change slightly,+ as more devices are supported. The QE bindings especially are+ incomplete.++ i) Root CPM node++ Properties:+ - compatible : "fsl,cpm1", "fsl,cpm2", or "fsl,qe".+ - reg : The first resource is a 48-byte region beginning with+ CPCR. The second is the available general-purpose+ DPRAM.+ - fsl,brg-frequency : the internal clock source frequency for baud-rate+ generators in Hz.++ Example:+ cpm@119c0 {+ #address-cells = <1>;+ #size-cells = <1>;+ #interrupt-cells = <2>;+ compatible = "fsl,mpc8272-cpm", "fsl,cpm2";+ reg = <119c0 30 0 2000>;+ bus-frequency = <d#25000000>;+ }++ ii) Properties common to mulitple CPM/QE devices++ - fsl,cpm-command : This value is ORed with the opcode and command flag+ to specify the device on which a CPM command operates.++ - fsl,cpm-brg : Indicates which baud rate generator the device+ is associated with. If absent, an unused BRG+ should be dynamically allocated.++ - reg : Unless otherwise specified, the first resource represents the+ scc/fcc/ucc registers, and the second represents the device's+ parameter RAM region (if it has one).++ iii) Serial++ Currently defined compatibles:+ - fsl,cpm1-smc-uart+ - fsl,cpm2-smc-uart+ - fsl,cpm1-scc-uart+ - fsl,cpm2-scc-uart+ - fsl,qe-uart++ Example:++ serial@11a00 {+ device_type = "serial";+ compatible = "fsl,mpc8272-scc-uart",+ "fsl,cpm2-scc-uart";+ reg = <11a00 20 8000 100>;+ interrupts = <28 8>;+ interrupt-parent = <&PIC>;+ fsl,cpm-brg = <1>;+ fsl,cpm-command = <00800000>;+ };++ iii) Network++ Currently defined compatibles:+ - fsl,cpm1-scc-enet+ - fsl,cpm2-scc-enet+ - fsl,cpm1-fec-enet+ - fsl,cpm2-fcc-enet (third resource is GFEMR)+ - fsl,qe-enet++ Example:++ ethernet@11300 {+ device_type = "network";+ compatible = "fsl,mpc8272-fcc-enet",+ "fsl,cpm2-fcc-enet";+ reg = <11300 20 8400 100 11390 1>;+ local-mac-address = [ 00 00 00 00 00 00 ];+ interrupts = <20 8>;+ interrupt-parent = <&PIC>;+ phy-handle = <&PHY0>;+ linux,network-index = <0>;+ fsl,cpm-command = <12000300>;+ };++ iv) MDIO++ Currently defined compatibles:+ fsl,pq1-fec-mdio (reg is same as first resource of FEC device)+ fsl,cpm2-mdio-bitbang (reg is port C registers)++ Properties for fsl,cpm2-mdio-bitbang:+ fsl,mdio-pin : pin of port C controlling mdio data+ fsl,mdc-pin : pin of port C controlling mdio clock++ Example:++ mdio@10d40 {+ device_type = "mdio";+ compatible = "fsl,mpc8272ads-mdio-bitbang",+ "fsl,mpc8272-mdio-bitbang",+ "fsl,cpm2-mdio-bitbang";+ reg = <10d40 14>;+ #address-cells = <1>;+ #size-cells = <0>;+ fsl,mdio-pin = <12>;+ fsl,mdc-pin = <13>;+ };++ v) Baud Rate Generators++ There may be an arbitrary number of reg resources; BRG+ numbers are assigned to these in order.++ Currently defined compatibles:+ fsl,cpm-brg+ fsl,cpm1-brg+ fsl,cpm2-brg++ Example:++ brg@119f0 {+ compatible = "fsl,mpc8272-brg",+ "fsl,cpm2-brg",+ "fsl,cpm-brg";+ reg = <119f0 10 115f0 10>;+ };++ vi) Interrupt Controllers++ Currently defined compatibles:+ - fsl,cpm1-pic+ - only one interrupt cell+ - fsl,pq1-pic+ - fsl,pq2-pic+ - second interrupt cell is level/sense:+ - 2 is falling edge+ - 8 is active low++ Example:++ interrupt-controller@10c00 {+ #interrupt-cells = <2>;+ interrupt-controller;+ reg = <10c00 80>;+ compatible = "mpc8272-pic", "fsl,pq2-pic";+ };++ vii) USB (Universal Serial Bus Controller)++ Properties:+ - compatible : "fsl,cpm1-usb", "fsl,cpm2-usb", "fsl,qe-usb"++ Example:+ usb@11bc0 {+ #address-cells = <1>;+ #size-cells = <0>;+ compatible = "fsl,cpm2-usb";+ reg = <11b60 18 8b00 100>;+ interrupts = <b 8>;+ interrupt-parent = <&PIC>;+ fsl,cpm-command = <2e600000>;+ };+ More devices will be defined as this spec matures. VII - Specifying interrupt information for devices
From: Scott Wood <hidden> Date: 2007-08-28 20:24:14
1. Fix get_immrbase() to use ranges, rather than reg.
It is not always the case that the SoC's first reg property points
to the beginning of the entire SoC block.
2. Update the way get_brgfreq() finds things in the device tree.
It now uses names that are less namespace polluting. The old names
are supported until all boards are converted.
3. "size" is changed from unsigned int to int, to match what
of_get_property() expects.
Signed-off-by: Scott Wood <redacted>
---
arch/powerpc/sysdev/fsl_soc.c | 38 +++++++++++++++++++++++++++-----------
1 files changed, 27 insertions(+), 11 deletions(-)
From: Scott Wood <hidden> Date: 2007-08-28 20:24:26
These I/O accessors will be used in code under drivers/,
which is expected to still work in arch/ppc.
Signed-off-by: Scott Wood <redacted>
---
include/asm-ppc/io.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
From: Scott Wood <hidden> Date: 2007-08-28 20:24:30
The existing OF glue code was crufty and broken. Rather than fix it,
it has been removed, and the serial driver now talks to the device tree
directly.
The non-CONFIG_PPC_CPM_NEW_BINDING code can go away once CPM platforms
are dropped from arch/ppc (which will hopefully be soon), and existing
arch/powerpc boards that I wasn't able to test on for this patchset get
converted (which should be even sooner).
Signed-off-by: Scott Wood <redacted>
---
drivers/serial/cpm_uart/cpm_uart.h | 6 +-
drivers/serial/cpm_uart/cpm_uart_core.c | 241 ++++++++++++++++++++++++++++---
drivers/serial/cpm_uart/cpm_uart_cpm1.c | 16 ++-
drivers/serial/cpm_uart/cpm_uart_cpm1.h | 2 +
drivers/serial/cpm_uart/cpm_uart_cpm2.c | 18 +++-
drivers/serial/cpm_uart/cpm_uart_cpm2.h | 2 +
6 files changed, 260 insertions(+), 25 deletions(-)
@@ -80,14 +80,18 @@ struct uart_cpm_port {intis_portb;/* wait on close if needed */intwait_closing;+/* value to combine with opcode to form cpm command */+u32command;};+#ifndef CONFIG_PPC_CPM_NEW_BINDINGexternintcpm_uart_port_map[UART_NR];+#endifexternintcpm_uart_nr;externstructuart_cpm_portcpm_uart_ports[UART_NR];/* these are located in their respective files */-voidcpm_line_cr_cmd(intline,intcmd);+voidcpm_line_cr_cmd(structuart_cpm_port*port,intcmd);intcpm_uart_init_portdesc(void);intcpm_uart_allocbuf(structuart_cpm_port*pinfo,unsignedintis_con);voidcpm_uart_freebuf(structuart_cpm_port*pinfo);
@@ -57,12 +62,6 @@#include"cpm_uart.h"-/***********************************************************************/--/* Track which ports are configured as uarts */-intcpm_uart_port_map[UART_NR];-/* How many ports did we config as uarts */-intcpm_uart_nr=0;/**************************************************************/
@@ -73,6 +72,11 @@ static void cpm_uart_initbd(struct uart_cpm_port *pinfo);/**************************************************************/+#ifndef CONFIG_PPC_CPM_NEW_BINDING+/* Track which ports are configured as uarts */+intcpm_uart_port_map[UART_NR];+/* How many ports did we config as uarts */+intcpm_uart_nr;/* Place-holder for board-specific stuff */structplatform_device*__attribute__((weak))__init
@@ -119,6 +123,7 @@ static int cpm_uart_id2nr(int id)/* not found or invalid argument */return-1;}+#endif/**Check,iftransmitbuffersareprocessed
@@ -783,7 +783,7 @@ static void cpm_uart_init_scc(struct uart_cpm_port *pinfo)/* Send the CPM an initialize command.*/-cpm_line_cr_cmd(line,CPM_CR_INIT_TRX);+cpm_line_cr_cmd(pinfo,CPM_CR_INIT_TRX);/* Set UART mode, 8 bit, no parity, one stop.*Enablereceiveandtransmit.
From: Scott Wood <hidden> Date: 2007-08-28 20:24:32
This prevents some bootloader/bootwrapper characters from being lost.
Signed-off-by: Scott Wood <redacted>
---
drivers/serial/cpm_uart/cpm_uart_core.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
@@ -278,13 +279,13 @@ static void cpm_uart_int_rx(struct uart_port *port)bdp=pinfo->rx_cur;for(;;){/* get status */-status=bdp->cbd_sc;+status=in_be16(&bdp->cbd_sc);/* If this one is empty, return happy */if(status&BD_SC_EMPTY)break;/* get number of characters, and check spce in flip-buffer */-i=bdp->cbd_datlen;+i=in_be16(&bdp->cbd_datlen);/* If we have not enough room in tty flip buffer, then we try*later,whichwillbethenextrx-interruptoratimeout
@@ -295,7 +296,7 @@ static void cpm_uart_int_rx(struct uart_port *port)}/* get pointer */-cp=cpm2cpu_addr(bdp->cbd_bufaddr,pinfo);+cp=cpm2cpu_addr(in_be32(&bdp->cbd_bufaddr),pinfo);/* loop through the buffer */while(i-->0){
@@ -315,10 +316,11 @@ static void cpm_uart_int_rx(struct uart_port *port)}/* End while (i--) *//* This BD is ready to be used again. Clear status. get next */-bdp->cbd_sc&=~(BD_SC_BR|BD_SC_FR|BD_SC_PR|BD_SC_OV|BD_SC_ID);-bdp->cbd_sc|=BD_SC_EMPTY;+clrbits16(&bdp->cbd_sc,BD_SC_BR|BD_SC_FR|BD_SC_PR|+BD_SC_OV|BD_SC_ID);+setbits16(&bdp->cbd_sc,BD_SC_EMPTY);-if(bdp->cbd_sc&BD_SC_WRAP)+if(in_be16(&bdp->cbd_sc)&BD_SC_WRAP)bdp=pinfo->rx_bd_base;elsebdp++;
@@ -326,7 +328,7 @@ static void cpm_uart_int_rx(struct uart_port *port)}/* End for (;;) *//* Write back buffer pointer */-pinfo->rx_cur=(volatilecbd_t*)bdp;+pinfo->rx_cur=bdp;/* activate BH processing */tty_flip_buffer_push(tty);
@@ -630,8 +632,8 @@ static int cpm_uart_verify_port(struct uart_port *port,*/staticintcpm_uart_tx_pump(structuart_port*port){-volatilecbd_t*bdp;-unsignedchar*p;+cbd_t__iomem*bdp;+u8*p;intcount;structuart_cpm_port*pinfo=(structuart_cpm_port*)port;structcirc_buf*xmit=&port->info->xmit;
@@ -641,13 +643,14 @@ static int cpm_uart_tx_pump(struct uart_port *port)/* Pick next descriptor and fill from buffer */bdp=pinfo->tx_cur;-p=cpm2cpu_addr(bdp->cbd_bufaddr,pinfo);+p=cpm2cpu_addr(in_be32(&bdp->cbd_bufaddr),pinfo);*p++=port->x_char;-bdp->cbd_datlen=1;-bdp->cbd_sc|=BD_SC_READY;++out_be16(&bdp->cbd_datlen,1);+setbits16(&bdp->cbd_sc,BD_SC_READY);/* Get next BD. */-if(bdp->cbd_sc&BD_SC_WRAP)+if(in_be16(&bdp->cbd_sc)&BD_SC_WRAP)bdp=pinfo->tx_bd_base;elsebdp++;
@@ -666,9 +669,10 @@ static int cpm_uart_tx_pump(struct uart_port *port)/* Pick next descriptor and fill from buffer */bdp=pinfo->tx_cur;-while(!(bdp->cbd_sc&BD_SC_READY)&&(xmit->tail!=xmit->head)){+while(!(in_be16(&bdp->cbd_sc)&BD_SC_READY)&&+xmit->tail!=xmit->head){count=0;-p=cpm2cpu_addr(bdp->cbd_bufaddr,pinfo);+p=cpm2cpu_addr(in_be32(&bdp->cbd_bufaddr),pinfo);while(count<pinfo->tx_fifosize){*p++=xmit->buf[xmit->tail];xmit->tail=(xmit->tail+1)&(UART_XMIT_SIZE-1);
@@ -677,11 +681,10 @@ static int cpm_uart_tx_pump(struct uart_port *port)if(xmit->head==xmit->tail)break;}-bdp->cbd_datlen=count;-bdp->cbd_sc|=BD_SC_READY;-eieio();+out_be16(&bdp->cbd_datlen,count);+setbits16(&bdp->cbd_sc,BD_SC_READY);/* Get next BD. */-if(bdp->cbd_sc&BD_SC_WRAP)+if(in_be16(&bdp->cbd_sc)&BD_SC_WRAP)bdp=pinfo->tx_bd_base;elsebdp++;
@@ -717,13 +720,13 @@ static void cpm_uart_initbd(struct uart_cpm_port *pinfo)mem_addr=pinfo->mem_addr;bdp=pinfo->rx_cur=pinfo->rx_bd_base;for(i=0;i<(pinfo->rx_nrfifos-1);i++,bdp++){-bdp->cbd_bufaddr=cpu2cpm_addr(mem_addr,pinfo);-bdp->cbd_sc=BD_SC_EMPTY|BD_SC_INTRPT;+out_be32(&bdp->cbd_bufaddr,cpu2cpm_addr(mem_addr,pinfo));+out_be16(&bdp->cbd_sc,BD_SC_EMPTY|BD_SC_INTRPT);mem_addr+=pinfo->rx_fifosize;}-bdp->cbd_bufaddr=cpu2cpm_addr(mem_addr,pinfo);-bdp->cbd_sc=BD_SC_WRAP|BD_SC_EMPTY|BD_SC_INTRPT;+out_be32(&bdp->cbd_bufaddr,cpu2cpm_addr(mem_addr,pinfo));+out_be16(&bdp->cbd_sc,BD_SC_WRAP|BD_SC_EMPTY|BD_SC_INTRPT);/* Set the physical address of the host memory*buffersinthebufferdescriptors,andthe
@@ -752,8 +755,10 @@ static void cpm_uart_init_scc(struct uart_cpm_port *pinfo)sup=pinfo->sccup;/* Store address */-pinfo->sccup->scc_genscc.scc_rbase=(unsignedchar*)pinfo->rx_bd_base-DPRAM_BASE;-pinfo->sccup->scc_genscc.scc_tbase=(unsignedchar*)pinfo->tx_bd_base-DPRAM_BASE;+out_be16(&pinfo->sccup->scc_genscc.scc_rbase,+(u8__iomem*)pinfo->rx_bd_base-DPRAM_BASE);+out_be16(&pinfo->sccup->scc_genscc.scc_tbase,+(u8__iomem*)pinfo->tx_bd_base-DPRAM_BASE);/* Set up the uart parameters in the*parameterram.
@@ -761,25 +766,25 @@ static void cpm_uart_init_scc(struct uart_cpm_port *pinfo)cpm_set_scc_fcr(sup);-sup->scc_genscc.scc_mrblr=pinfo->rx_fifosize;-sup->scc_maxidl=pinfo->rx_fifosize;-sup->scc_brkcr=1;-sup->scc_parec=0;-sup->scc_frmec=0;-sup->scc_nosec=0;-sup->scc_brkec=0;-sup->scc_uaddr1=0;-sup->scc_uaddr2=0;-sup->scc_toseq=0;-sup->scc_char1=0x8000;-sup->scc_char2=0x8000;-sup->scc_char3=0x8000;-sup->scc_char4=0x8000;-sup->scc_char5=0x8000;-sup->scc_char6=0x8000;-sup->scc_char7=0x8000;-sup->scc_char8=0x8000;-sup->scc_rccm=0xc0ff;+out_be16(&sup->scc_genscc.scc_mrblr,pinfo->rx_fifosize);+out_be16(&sup->scc_maxidl,pinfo->rx_fifosize);+out_be16(&sup->scc_brkcr,1);+out_be16(&sup->scc_parec,0);+out_be16(&sup->scc_frmec,0);+out_be16(&sup->scc_nosec,0);+out_be16(&sup->scc_brkec,0);+out_be16(&sup->scc_uaddr1,0);+out_be16(&sup->scc_uaddr2,0);+out_be16(&sup->scc_toseq,0);+out_be16(&sup->scc_char1,0x8000);+out_be16(&sup->scc_char2,0x8000);+out_be16(&sup->scc_char3,0x8000);+out_be16(&sup->scc_char4,0x8000);+out_be16(&sup->scc_char5,0x8000);+out_be16(&sup->scc_char6,0x8000);+out_be16(&sup->scc_char7,0x8000);+out_be16(&sup->scc_char8,0x8000);+out_be16(&sup->scc_rccm,0xc0ff);/* Send the CPM an initialize command.*/
@@ -788,23 +793,23 @@ static void cpm_uart_init_scc(struct uart_cpm_port *pinfo)/* Set UART mode, 8 bit, no parity, one stop.*Enablereceiveandtransmit.*/-scp->scc_gsmrh=0;-scp->scc_gsmrl=-(SCC_GSMRL_MODE_UART|SCC_GSMRL_TDCR_16|SCC_GSMRL_RDCR_16);+out_be32(&scp->scc_gsmrh,0);+out_be32(&scp->scc_gsmrl,+SCC_GSMRL_MODE_UART|SCC_GSMRL_TDCR_16|SCC_GSMRL_RDCR_16);/* Enable rx interrupts and clear all pending events. */-scp->scc_sccm=0;-scp->scc_scce=0xffff;-scp->scc_dsr=0x7e7e;-scp->scc_psmr=0x3000;+out_be16(&scp->scc_sccm,0);+out_be16(&scp->scc_scce,0xffff);+out_be16(&scp->scc_dsr,0x7e7e);+out_be16(&scp->scc_psmr,0x3000);-scp->scc_gsmrl|=(SCC_GSMRL_ENR|SCC_GSMRL_ENT);+setbits32(&scp->scc_gsmrl,SCC_GSMRL_ENR|SCC_GSMRL_ENT);}staticvoidcpm_uart_init_smc(structuart_cpm_port*pinfo){-volatilesmc_t*sp;-volatilesmc_uart_t*up;+smc_t__iomem*sp;+smc_uart_t__iomem*up;pr_debug("CPM uart[%d]:init_smc\n",pinfo->port.line);
@@ -812,19 +817,21 @@ static void cpm_uart_init_smc(struct uart_cpm_port *pinfo)up=pinfo->smcup;/* Store address */-pinfo->smcup->smc_rbase=(u_char*)pinfo->rx_bd_base-DPRAM_BASE;-pinfo->smcup->smc_tbase=(u_char*)pinfo->tx_bd_base-DPRAM_BASE;+out_be16(&pinfo->smcup->smc_rbase,+(u8__iomem*)pinfo->rx_bd_base-DPRAM_BASE);+out_be16(&pinfo->smcup->smc_tbase,+(u8__iomem*)pinfo->tx_bd_base-DPRAM_BASE);/**IncaseSMC1isbeingrelocated...*/#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH)-up->smc_rbptr=pinfo->smcup->smc_rbase;-up->smc_tbptr=pinfo->smcup->smc_tbase;-up->smc_rstate=0;-up->smc_tstate=0;-up->smc_brkcr=1;/* number of break chars */-up->smc_brkec=0;+out_be16(&up->smc_rbptr,in_be16(&pinfo->smcup->smc_rbase));+out_be16(&up->smc_tbptr,in_be16(&pinfo->smcup->smc_tbase));+out_be32(&up->smc_rstate,0);+out_be32(&up->smc_tstate,0);+out_be16(&up->smc_brkcr,1);/* number of break chars */+out_be16(&up->smc_brkec,0);#endif/* Set up the uart parameters in the
@@ -833,24 +840,24 @@ static void cpm_uart_init_smc(struct uart_cpm_port *pinfo)cpm_set_smc_fcr(up);/* Using idle charater time requires some additional tuning. */-up->smc_mrblr=pinfo->rx_fifosize;-up->smc_maxidl=pinfo->rx_fifosize;-up->smc_brklen=0;-up->smc_brkec=0;-up->smc_brkcr=1;+out_be16(&up->smc_mrblr,pinfo->rx_fifosize);+out_be16(&up->smc_maxidl,pinfo->rx_fifosize);+out_be16(&up->smc_brklen,0);+out_be16(&up->smc_brkec,0);+out_be16(&up->smc_brkcr,1);cpm_line_cr_cmd(pinfo,CPM_CR_INIT_TRX);/* Set UART mode, 8 bit, no parity, one stop.*Enablereceiveandtransmit.*/-sp->smc_smcmr=smcr_mk_clen(9)|SMCMR_SM_UART;+out_be16(&sp->smc_smcmr,smcr_mk_clen(9)|SMCMR_SM_UART);/* Enable only rx interrupts clear all pending events. */-sp->smc_smcm=0;-sp->smc_smce=0xff;+out_8(&sp->smc_smcm,0);+out_8(&sp->smc_smce,0xff);-sp->smc_smcmr|=(SMCMR_REN|SMCMR_TEN);+setbits16(&sp->smc_smcmr,SMCMR_REN|SMCMR_TEN);}/*
@@ -868,11 +875,11 @@ static int cpm_uart_request_port(struct uart_port *port)return0;if(IS_SMC(pinfo)){-pinfo->smcp->smc_smcm&=~(SMCM_RX|SMCM_TX);-pinfo->smcp->smc_smcmr&=~(SMCMR_REN|SMCMR_TEN);+clrbits8(&pinfo->smcp->smc_smcm,SMCM_RX|SMCM_TX);+clrbits16(&pinfo->smcp->smc_smcmr,SMCMR_REN|SMCMR_TEN);}else{-pinfo->sccp->scc_sccm&=~(UART_SCCM_TX|UART_SCCM_RX);-pinfo->sccp->scc_gsmrl&=~(SCC_GSMRL_ENR|SCC_GSMRL_ENT);+clrbits16(&pinfo->sccp->scc_sccm,UART_SCCM_TX|UART_SCCM_RX);+clrbits32(&pinfo->sccp->scc_gsmrl,SCC_GSMRL_ENR|SCC_GSMRL_ENT);}ret=cpm_uart_allocbuf(pinfo,0);
@@ -1169,8 +1177,8 @@ static void cpm_uart_console_write(struct console *co, const char *s,&cpm_uart_ports[cpm_uart_port_map[co->index]];#endifunsignedinti;-volatilecbd_t*bdp,*bdbase;-volatileunsignedchar*cp;+cbd_t__iomem*bdp,*bdbase;+unsignedchar*cp;/* Get the address of the host memory buffer.*/
@@ -1188,37 +1196,36 @@ static void cpm_uart_console_write(struct console *co, const char *s,*Readyindicatesoutputisready,andxmtisdoing*that,notthatitisreadyforustosend.*/-while((bdp->cbd_sc&BD_SC_READY)!=0)+while((in_be16(&bdp->cbd_sc)&BD_SC_READY)!=0);/* Send the character out.*IfthebufferaddressisintheCPMDPRAM,don't*convertit.*/-cp=cpm2cpu_addr(bdp->cbd_bufaddr,pinfo);-+cp=cpm2cpu_addr(in_be32(&bdp->cbd_bufaddr),pinfo);*cp=*s;-bdp->cbd_datlen=1;-bdp->cbd_sc|=BD_SC_READY;+out_be16(&bdp->cbd_datlen,1);+setbits16(&bdp->cbd_sc,BD_SC_READY);-if(bdp->cbd_sc&BD_SC_WRAP)+if(in_be16(&bdp->cbd_sc)&BD_SC_WRAP)bdp=bdbase;elsebdp++;/* if a LF, also do CR... */if(*s==10){-while((bdp->cbd_sc&BD_SC_READY)!=0)+while((in_be16(&bdp->cbd_sc)&BD_SC_READY)!=0);-cp=cpm2cpu_addr(bdp->cbd_bufaddr,pinfo);-+cp=cpm2cpu_addr(in_be32(&bdp->cbd_bufaddr),pinfo);*cp=13;-bdp->cbd_datlen=1;-bdp->cbd_sc|=BD_SC_READY;-if(bdp->cbd_sc&BD_SC_WRAP)+out_be16(&bdp->cbd_datlen,1);+setbits16(&bdp->cbd_sc,BD_SC_READY);++if(in_be16(&bdp->cbd_sc)&BD_SC_WRAP)bdp=bdbase;elsebdp++;
From: Scott Wood <hidden> Date: 2007-08-28 20:24:54
1. Only map 512K of the IMMR, rather than 8M, to avoid conflicting with
the default ioremap region.
2. The wrong register was being loaded into SPRN_MD_RPN.
Signed-off-by: Scott Wood <redacted>
---
arch/powerpc/kernel/head_8xx.S | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
From: Scott Wood <hidden> Date: 2007-08-28 20:24:57
These let board code set up pins and clocks without having to
put magic numbers directly into the registers.
Signed-off-by: Scott Wood <redacted>
---
arch/powerpc/sysdev/commproc.c | 201 ++++++++++++++++++++++++++++++++++++++++
include/asm-powerpc/commproc.h | 41 ++++++++
2 files changed, 242 insertions(+), 0 deletions(-)
From: Scott Wood <hidden> Date: 2007-08-28 20:24:58
1. Keep a global mpc8xx_immr mapping, rather than constantly
creating temporary mappings.
2. Look for new fsl,cpm1 and fsl,cpm1-pic names.
3. Always reset the CPM when not using the udbg console;
this is required in case the firmware initialized a device
that is incompatible with one that the kernel is about to
use.
4. Remove some superfluous casts and header includes.
5. Change a usage of IMAP_ADDR to get_immrbase().
6. Use phys_addr_t, not uint, for dpram_pbase.
7. Various sparse-related fixes, such as __iomem annotations.
8. Remove mpc8xx_show_cpuinfo, which doesn't provide anything
useful beyond the generic cpuinfo handler.
9. Move prototypes for 8xx support functions from board files
to sysdev/commproc.h.
Signed-off-by: Scott Wood <redacted>
---
arch/powerpc/platforms/8xx/m8xx_setup.c | 90 ++++++--------------------
arch/powerpc/platforms/8xx/mpc86xads.h | 3 -
arch/powerpc/platforms/8xx/mpc86xads_setup.c | 10 +---
arch/powerpc/platforms/8xx/mpc885ads.h | 3 -
arch/powerpc/platforms/8xx/mpc885ads_setup.c | 11 +---
arch/powerpc/sysdev/commproc.c | 71 +++++++++++---------
arch/powerpc/sysdev/commproc.h | 12 ++++
arch/powerpc/sysdev/mpc8xx_pic.c | 16 ++--
include/asm-powerpc/commproc.h | 5 +-
include/asm-powerpc/fs_pd.h | 19 +----
10 files changed, 90 insertions(+), 150 deletions(-)
create mode 100644 arch/powerpc/sysdev/commproc.h
@@ -10,57 +10,33 @@*bootupsetupstuff..*/-#include<linux/errno.h>-#include<linux/sched.h>#include<linux/kernel.h>-#include<linux/mm.h>-#include<linux/stddef.h>-#include<linux/unistd.h>-#include<linux/ptrace.h>#include<linux/slab.h>-#include<linux/user.h>-#include<linux/a.out.h>-#include<linux/tty.h>-#include<linux/major.h>#include<linux/interrupt.h>-#include<linux/reboot.h>#include<linux/init.h>-#include<linux/initrd.h>-#include<linux/ioport.h>-#include<linux/bootmem.h>-#include<linux/seq_file.h>-#include<linux/root_dev.h>#include<linux/time.h>#include<linux/rtc.h>-#include<linux/fsl_devices.h>-#include<asm/mmu.h>-#include<asm/reg.h>#include<asm/io.h>-#include<asm/pgtable.h>#include<asm/mpc8xx.h>#include<asm/8xx_immap.h>-#include<asm/machdep.h>-#include<asm/time.h>#include<asm/prom.h>#include<asm/fs_pd.h>#include<mm/mmu_decl.h>-#include"sysdev/mpc8xx_pic.h"+#include<sysdev/mpc8xx_pic.h>+#include<sysdev/commproc.h>#ifdef CONFIG_PCMCIA_M8XXstructmpc8xx_pcmcia_opsm8xx_pcmcia_ops;#endifvoidm8xx_calibrate_decr(void);-#ifdef CONFIG_8xx_WDT-externvoidm8xx_wdt_handler_install(bd_t*bp);-#endifexternintcpm_pic_init(void);externintcpm_get_irq(void);/* A place holder for time base interrupts, if they are ever enabled. */-irqreturn_ttimebase_interrupt(intirq,void*dev)+staticirqreturn_ttimebase_interrupt(intirq,void*dev){printk("timebase_interrupt()\n");
@@ -77,7 +53,7 @@ static struct irqaction tbint_irqaction = {void__init__attribute__((weak))init_internal_rtc(void){-sit8xx_t*sys_tmr=(sit8xx_t*)immr_map(im_sit);+sit8xx_t__iomem*sys_tmr=immr_map(im_sit);/* Disable the RTC one second and alarm interrupts. */clrbits16(&sys_tmr->sit_rtcsc,(RTCSC_SIE|RTCSC_ALE));
@@ -116,13 +92,13 @@ static int __init get_freq(char *name, unsigned long *val)void__initmpc8xx_calibrate_decr(void){structdevice_node*cpu;-cark8xx_t*clk_r1;-car8xx_t*clk_r2;-sitk8xx_t*sys_tmr1;-sit8xx_t*sys_tmr2;+cark8xx_t__iomem*clk_r1;+car8xx_t__iomem*clk_r2;+sitk8xx_t__iomem*sys_tmr1;+sit8xx_t__iomem*sys_tmr2;intirq,virq;-clk_r1=(cark8xx_t*)immr_map(im_clkrstk);+clk_r1=immr_map(im_clkrstk);/* Unlock the SCCR. */out_be32(&clk_r1->cark_sccrk,~KAPWR_KEY);
@@ -130,7 +106,7 @@ void __init mpc8xx_calibrate_decr(void)immr_unmap(clk_r1);/* Force all 8xx processors to use divide by 16 processor clock. */-clk_r2=(car8xx_t*)immr_map(im_clkrst);+clk_r2=immr_map(im_clkrst);setbits32(&clk_r2->car_sccr,0x02000000);immr_unmap(clk_r2);
@@ -184,20 +160,13 @@ void __init mpc8xx_calibrate_decr(void)virq=irq_of_parse_and_map(cpu,0);irq=irq_map[virq].hwirq;-sys_tmr2=(sit8xx_t*)immr_map(im_sit);+sys_tmr2=immr_map(im_sit);out_be16(&sys_tmr2->sit_tbscr,((1<<(7-(irq/2)))<<8)|(TBSCR_TBF|TBSCR_TBE));immr_unmap(sys_tmr2);if(setup_irq(virq,&tbint_irqaction))panic("Could not allocate timer IRQ!");--#ifdef CONFIG_8xx_WDT-/* Install watchdog timer handler early because it might be-*alreadyenabledbythebootloader-*/-m8xx_wdt_handler_install(binfo);-#endif}/* The RTC on the MPC8xx is an internal register.
@@ -228,7 +197,7 @@ int mpc8xx_set_rtc_time(struct rtc_time *tm)voidmpc8xx_get_rtc_time(structrtc_time*tm){unsignedlongdata;-sit8xx_t*sys_tmr=(sit8xx_t*)immr_map(im_sit);+sit8xx_t__iomem*sys_tmr=immr_map(im_sit);/* Get time from the RTC. */data=in_be32(&sys_tmr->sit_rtc);
@@ -47,8 +47,9 @@staticvoidm8xx_cpm_dpinit(void);staticuinthost_buffer;/* One page of host buffer */staticuinthost_end;/* end + 1 */-cpm8xx_t*cpmp;/* Pointer to comm processor space */-cpic8xx_t*cpic_reg;+cpm8xx_t__iomem*cpmp;/* Pointer to comm processor space */+immap_t__iomem*mpc8xx_immr;+staticcpic8xx_t__iomem*cpic_reg;staticstructdevice_node*cpm_pic_node;staticstructirq_host*cpm_pic_host;
@@ -140,16 +141,19 @@ unsigned int cpm_pic_init(void)pr_debug("cpm_pic_init\n");-np=of_find_compatible_node(NULL,"cpm-pic","CPM");+np=of_find_compatible_node(NULL,NULL,"fsl,cpm1-pic");+if(np==NULL)+np=of_find_compatible_node(NULL,"cpm-pic","CPM");if(np==NULL){printk(KERN_ERR"CPM PIC init: can not find cpm-pic node\n");returnsirq;}+ret=of_address_to_resource(np,0,&res);if(ret)gotoend;-cpic_reg=(void*)ioremap(res.start,res.end-res.start+1);+cpic_reg=ioremap(res.start,res.end-res.start+1);if(cpic_reg==NULL)gotoend;
@@ -173,14 +177,16 @@ unsigned int cpm_pic_init(void)sirq=NO_IRQ;gotoend;}-of_node_put(np);/* Install our own error handler. */-np=of_find_node_by_type(NULL,"cpm");+np=of_find_compatible_node(NULL,NULL,"fsl,cpm1");+if(np==NULL)+np=of_find_node_by_type(NULL,"cpm");if(np==NULL){printk(KERN_ERR"CPM PIC init: can not find cpm node\n");gotoend;}+eirq=irq_of_parse_and_map(np,0);if(eirq==NO_IRQ)gotoend;
@@ -197,21 +203,28 @@ end:voidcpm_reset(void){-cpm8xx_t*commproc;-sysconf8xx_t*siu_conf;+sysconf8xx_t__iomem*siu_conf;-commproc=(cpm8xx_t*)ioremap(CPM_MAP_ADDR,CPM_MAP_SIZE);+mpc8xx_immr=ioremap(get_immrbase(),0x4000);+if(!mpc8xx_immr){+printk(KERN_CRIT"Could not map IMMR\n");+return;+}-#ifdef CONFIG_UCODE_PATCH+cpmp=&mpc8xx_immr->im_cpm;++#ifndef CONFIG_PPC_EARLY_DEBUG_CPM/* Perform a reset.*/-out_be16(&commproc->cp_cpcr,CPM_CR_RST|CPM_CR_FLG);+out_be16(&cpmp->cp_cpcr,CPM_CR_RST|CPM_CR_FLG);/* Wait for it.*/-while(in_be16(&commproc->cp_cpcr)&CPM_CR_FLG);+while(in_be16(&cpmp->cp_cpcr)&CPM_CR_FLG);+#endif-cpm_load_patch(commproc);+#ifdef CONFIG_UCODE_PATCH+cpm_load_patch(cpmp);#endif/* Set SDMA Bus Request priority 5.
@@ -220,16 +233,12 @@ void cpm_reset(void)*manualrecommendsit.*Bit25,FAMcanalsobesettouseFECaggressivemode(860T).*/-siu_conf=(sysconf8xx_t*)immr_map(im_siu_conf);+siu_conf=immr_map(im_siu_conf);out_be32(&siu_conf->sc_sdcr,1);immr_unmap(siu_conf);/* Reclaim the DP memory for our use. */m8xx_cpm_dpinit();--/* Tell everyone where the comm processor resides.-*/-cpmp=commproc;}/* We used to do this earlier, but have to postpone as long as possible
@@ -279,20 +288,20 @@ m8xx_cpm_hostalloc(uint size)voidcpm_setbrg(uintbrg,uintrate){-volatileuint*bp;+u32__iomem*bp;/* This is good enough to get SMCs running.....*/-bp=(uint*)&cpmp->cp_brgc1;+bp=&cpmp->cp_brgc1;bp+=brg;/* The BRG has a 12-bit counter. For really slow baud rates (or*reallyfastprocessors),wemayhavetofurtherdivideby16.*/if(((BRG_UART_CLK/rate)-1)<4096)-*bp=(((BRG_UART_CLK/rate)-1)<<1)|CPM_BRG_EN;+out_be32(bp,(((BRG_UART_CLK/rate)-1)<<1)|CPM_BRG_EN);else-*bp=(((BRG_UART_CLK_DIV16/rate)-1)<<1)|-CPM_BRG_EN|CPM_BRG_DIV16;+out_be32(bp,(((BRG_UART_CLK_DIV16/rate)-1)<<1)|+CPM_BRG_EN|CPM_BRG_DIV16);}/*
@@ -307,15 +316,15 @@ static rh_block_t cpm_boot_dpmem_rh_block[16];staticrh_info_tcpm_dpmem_info;#define CPM_DPMEM_ALIGNMENT 8-staticu8*dpram_vbase;-staticuintdpram_pbase;+staticu8__iomem*dpram_vbase;+staticphys_addr_tdpram_pbase;-voidm8xx_cpm_dpinit(void)+staticvoidm8xx_cpm_dpinit(void){spin_lock_init(&cpm_dpmem_lock);-dpram_vbase=immr_map_size(im_cpm.cp_dpmem,CPM_DATAONLY_BASE+CPM_DATAONLY_SIZE);-dpram_pbase=(uint)&((immap_t*)IMAP_ADDR)->im_cpm.cp_dpmem;+dpram_vbase=cpmp->cp_dpmem;+dpram_pbase=get_immrbase()+offsetof(immap_t,im_cpm.cp_dpmem);/* Initialize the info header */rh_init(&cpm_dpmem_info,CPM_DPMEM_ALIGNMENT,
@@ -66,7 +66,7 @@/* Export the base address of the communication processor registers*anddualportram.*/-externcpm8xx_t*cpmp;/* Pointer to comm processor */+externcpm8xx_t__iomem*cpmp;/* Pointer to comm processor */externunsignedlongcpm_dpalloc(uintsize,uintalign);externintcpm_dpfree(unsignedlongoffset);externunsignedlongcpm_dpalloc_fixed(unsignedlongoffset,uintsize,uintalign);
From: Scott Wood <hidden> Date: 2007-08-28 20:24:59
The CPU15 erratum on MPC8xx chips can cause incorrect code execution
under certain circumstances, where there is a conditional or indirect
branch in the last word of a page, with a target in the last cache line
of the next page. This patch implements one of the suggested
workarounds, by forcing a TLB miss whenever execution crosses a page
boundary. This is done by invalidating the pages before and after the
one being loaded into the TLB in the ITLB miss handler.
Signed-off-by: Scott Wood <redacted>
---
arch/powerpc/kernel/head_8xx.S | 6 ++++++
arch/powerpc/platforms/8xx/Kconfig | 16 ++++++++++++++++
2 files changed, 22 insertions(+), 0 deletions(-)
From: Scott Wood <hidden> Date: 2007-08-28 20:25:00
On arch/ppc, Soft_emulate_8xx was used when full math emulation was
turned off to emulate a minimal subset of floating point load/store
instructions, to avoid needing a soft-float toolchain. This function
is called, but not present, on arch/powerpc, causing a build error
if floating point emulation is turned off.
As:
1. soft-float toolchains are now common,
2. partial emulation could mislead someone into thinking they have
a soft-float userspace because things usually work, only to have it
fail when actual FP gets executed under unusual circumstances, and
3. full emulation is still available for those who need to run
non-soft-float userspace,
I'm deleting the call rather than moving Soft_emulate_8xx over to
arch/powerpc.
Signed-off-by: Scott Wood <redacted>
---
arch/powerpc/kernel/traps.c | 16 +++-------------
1 files changed, 3 insertions(+), 13 deletions(-)
From: John Traill <hidden> Date: 2007-08-28 20:25:01
The 8xx can only support a max of 8M during early boot (it seems a lot of
8xx boards only have 8M so the bug was never triggered), but the early
allocator isn't aware of this. The following change makes it able to run
with larger memory.
Signed-off-by: Vitaly Bordug <redacted>
Signed-off-by: Scott Wood <redacted>
---
arch/powerpc/mm/init_32.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
@@ -132,6 +132,9 @@ void __init MMU_init(void)/* 601 can only access 16MB at the moment */if(PVR_VER(mfspr(SPRN_PVR))==1)__initial_memory_limit=0x01000000;+/* 8xx can only access 8MB at the moment */+if(PVR_VER(mfspr(SPRN_PVR))==0x50)+__initial_memory_limit=0x00800000;/* parse args from command line */MMU_setup();
From: Scott Wood <hidden> Date: 2007-08-28 20:26:40
From: John Traill <redacted>
The 8xx can only support a max of 8M during early boot (it seems a lot of
8xx boards only have 8M so the bug was never triggered), but the early
allocator isn't aware of this. The following change makes it able to run
with larger memory.
Signed-off-by: Vitaly Bordug <redacted>
Signed-off-by: Scott Wood <redacted>
---
Sorry, forgot to move the From: line out of the actual From: field
on the previous e-mail.
arch/powerpc/mm/init_32.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
@@ -132,6 +132,9 @@ void __init MMU_init(void)/* 601 can only access 16MB at the moment */if(PVR_VER(mfspr(SPRN_PVR))==1)__initial_memory_limit=0x01000000;+/* 8xx can only access 8MB at the moment */+if(PVR_VER(mfspr(SPRN_PVR))==0x50)+__initial_memory_limit=0x00800000;/* parse args from command line */MMU_setup();
From: Scott Wood <hidden> Date: 2007-08-28 20:26:52
It now uses the new CPM binding and the generic pin/clock functions, and
has assorted fixes and cleanup.
Signed-off-by: Scott Wood <redacted>
---
arch/powerpc/boot/dts/mpc885ads.dts | 192 ++++++-----
arch/powerpc/configs/mpc885_ads_defconfig | 445 +++++++++++---------------
arch/powerpc/platforms/8xx/Kconfig | 1 +
arch/powerpc/platforms/8xx/mpc885ads.h | 38 ---
arch/powerpc/platforms/8xx/mpc885ads_setup.c | 455 +++++++++-----------------
5 files changed, 455 insertions(+), 676 deletions(-)
@@ -1,9 +1,22 @@ # # Automatically generated make config: don't edit-# Linux kernel version: 2.6.22-rc7-# Sun Jul 1 23:57:01 2007+# Linux kernel version: 2.6.23-rc3+# Mon Aug 27 15:23:16 2007 # # CONFIG_PPC64 is not set++#+# Processor support+#+# CONFIG_6xx is not set+# CONFIG_PPC_85xx is not set+CONFIG_PPC_8xx=y+# CONFIG_40x is not set+# CONFIG_44x is not set+# CONFIG_E200 is not set+CONFIG_8xx=y+# CONFIG_PPC_MM_SLICES is not set+CONFIG_NOT_COHERENT_CACHE=y CONFIG_PPC32=y CONFIG_PPC_MERGE=y CONFIG_MMU=y
@@ -14,56 +27,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_FIND_NEXT_BIT=y+# CONFIG_ARCH_NO_VIRT_TO_BUS is not set CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_GENERIC_NVRAM=y CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_PPC_OF=y+CONFIG_OF=y # CONFIG_PPC_UDBG_16550 is not set # CONFIG_GENERIC_TBSYNC is not set CONFIG_AUDIT_ARCH=y+CONFIG_GENERIC_BUG=y # CONFIG_DEFAULT_UIMAGE is not set--#-# Processor support-#-# CONFIG_CLASSIC32 is not set-# CONFIG_PPC_82xx is not set-# CONFIG_PPC_83xx is not set-# CONFIG_PPC_85xx is not set-# CONFIG_PPC_86xx is not set-CONFIG_PPC_8xx=y-# CONFIG_40x is not set-# CONFIG_44x is not set-# CONFIG_E200 is not set-CONFIG_8xx=y # CONFIG_PPC_DCR_NATIVE is not set # CONFIG_PPC_DCR_MMIO is not set-# CONFIG_PPC_MM_SLICES is not set-CONFIG_NOT_COHERENT_CACHE=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" #-# Code maturity level options+# General setup # CONFIG_EXPERIMENTAL=y CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32--#-# General setup-# CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y # CONFIG_SWAP is not set CONFIG_SYSVIPC=y-# CONFIG_IPC_NS is not set CONFIG_SYSVIPC_SYSCTL=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_TASKSTATS is not set-# CONFIG_UTS_NS is not set+# CONFIG_USER_NS is not set # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set CONFIG_LOG_BUF_SHIFT=14
@@ -75,52 +70,46 @@ CONFIG_SYSCTL=y CONFIG_EMBEDDED=y # CONFIG_SYSCTL_SYSCALL is not set CONFIG_KALLSYMS=y+# CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set-# CONFIG_HOTPLUG is not set+CONFIG_HOTPLUG=y CONFIG_PRINTK=y-# CONFIG_BUG is not set-CONFIG_ELF_CORE=y+CONFIG_BUG=y+# CONFIG_ELF_CORE is not set # CONFIG_BASE_FULL is not set-CONFIG_FUTEX=y+# CONFIG_FUTEX is not set CONFIG_ANON_INODES=y-# CONFIG_EPOLL is not set+CONFIG_EPOLL=y CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y # CONFIG_VM_EVENT_COUNTERS is not set-CONFIG_SLAB=y-# CONFIG_SLUB is not set+CONFIG_SLUB_DEBUG=y+# CONFIG_SLAB is not set+CONFIG_SLUB=y # CONFIG_SLOB is not set-CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=1--#-# Loadable module support-# # CONFIG_MODULES is not set--#-# Block layer-# CONFIG_BLOCK=y # CONFIG_LBD is not set # CONFIG_BLK_DEV_IO_TRACE is not set # CONFIG_LSF is not set+# CONFIG_BLK_DEV_BSG is not set # # IO Schedulers # CONFIG_IOSCHED_NOOP=y-CONFIG_IOSCHED_AS=y+# CONFIG_IOSCHED_AS is not set CONFIG_IOSCHED_DEADLINE=y-CONFIG_IOSCHED_CFQ=y-CONFIG_DEFAULT_AS=y-# CONFIG_DEFAULT_DEADLINE is not set+# CONFIG_IOSCHED_CFQ is not set+# CONFIG_DEFAULT_AS is not set+CONFIG_DEFAULT_DEADLINE=y # CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set-CONFIG_DEFAULT_IOSCHED="anticipatory"+CONFIG_DEFAULT_IOSCHED="deadline" # # Platform support
@@ -133,6 +122,7 @@ CONFIG_CPM1=y # CONFIG_MPC8XXFADS is not set # CONFIG_MPC86XADS is not set CONFIG_MPC885ADS=y+# CONFIG_PPC_EP88XC is not set # # Freescale Ethernet driver platform-specific options
@@ -150,6 +140,7 @@ CONFIG_MPC8xx_SECOND_ETH_FEC2=y # CONFIG_8xx_COPYBACK=y # CONFIG_8xx_CPU6 is not set+CONFIG_8xx_CPU15=y CONFIG_NO_UCODE_PATCH=y # CONFIG_USB_SOF_UCODE_PATCH is not set # CONFIG_I2C_SPI_UCODE_PATCH is not set
@@ -166,22 +157,23 @@ CONFIG_NO_UCODE_PATCH=y # CONFIG_GENERIC_IOMAP is not set # CONFIG_CPU_FREQ is not set # CONFIG_CPM2 is not set+CONFIG_PPC_CPM_NEW_BINDING=y # # Kernel options # # CONFIG_HIGHMEM is not set-# CONFIG_HZ_100 is not set+CONFIG_HZ_100=y # CONFIG_HZ_250 is not set # CONFIG_HZ_300 is not set-CONFIG_HZ_1000=y-CONFIG_HZ=1000+# CONFIG_HZ_1000 is not set+CONFIG_HZ=100 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set-CONFIG_MATH_EMULATION=y+# CONFIG_MATH_EMULATION is not set CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_POPULATES_NODE_MAP=y
@@ -195,11 +187,14 @@ CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_RESOURCES_64BIT is not set CONFIG_ZONE_DMA_FLAG=1-# CONFIG_PROC_DEVICETREE is not set+CONFIG_BOUNCE=y+CONFIG_VIRT_TO_BUS=y+CONFIG_PROC_DEVICETREE=y # CONFIG_CMDLINE_BOOL is not set # CONFIG_PM is not set # CONFIG_SECCOMP is not set-# CONFIG_WANT_DEVICE_TREE is not set+CONFIG_WANT_DEVICE_TREE=y+CONFIG_DEVICE_TREE="mpc885ads.dts" CONFIG_ISA_DMA_API=y #
@@ -209,12 +204,14 @@ CONFIG_ZONE_DMA=y CONFIG_FSL_SOC=y # CONFIG_PCI is not set # CONFIG_PCI_DOMAINS is not set+# CONFIG_PCI_SYSCALL is not set # CONFIG_PCI_QSPAN is not set # CONFIG_ARCH_SUPPORTS_MSI is not set # # PCCARD (PCMCIA/CardBus) support #+# CONFIG_PCCARD is not set # # Advanced setup
@@ -243,10 +240,6 @@ CONFIG_NET=y CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y-CONFIG_XFRM=y-# CONFIG_XFRM_USER is not set-# CONFIG_XFRM_SUB_POLICY is not set-# CONFIG_XFRM_MIGRATE is not set # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y
@@ -266,9 +259,9 @@ CONFIG_SYN_COOKIES=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set-CONFIG_INET_XFRM_MODE_TRANSPORT=y-CONFIG_INET_XFRM_MODE_TUNNEL=y-CONFIG_INET_XFRM_MODE_BEET=y+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set+# CONFIG_INET_XFRM_MODE_TUNNEL is not set+# CONFIG_INET_XFRM_MODE_BEET is not set CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set
@@ -317,6 +310,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_MAC80211 is not set # CONFIG_IEEE80211 is not set # CONFIG_RFKILL is not set+# CONFIG_NET_9P is not set # # Device Drivers
@@ -327,40 +321,91 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y+# CONFIG_FW_LOADER is not set+# CONFIG_DEBUG_DRIVER is not set+# CONFIG_DEBUG_DEVRES is not set # CONFIG_SYS_HYPERVISOR is not set--#-# Connector - unified userspace <-> kernelspace linker-# # CONFIG_CONNECTOR is not set-# CONFIG_MTD is not set--#-# Parallel port support-#+CONFIG_MTD=y+# CONFIG_MTD_DEBUG is not set+# CONFIG_MTD_CONCAT is not set+# CONFIG_MTD_PARTITIONS is not set++#+# User Modules And Translation Layers+#+CONFIG_MTD_CHAR=y+CONFIG_MTD_BLKDEVS=y+CONFIG_MTD_BLOCK=y+# CONFIG_FTL is not set+# CONFIG_NFTL is not set+# CONFIG_INFTL is not set+# CONFIG_RFD_FTL is not set+# CONFIG_SSFDC is not set++#+# RAM/ROM/Flash chip drivers+#+# CONFIG_MTD_CFI is not set+CONFIG_MTD_JEDECPROBE=y+CONFIG_MTD_GEN_PROBE=y+CONFIG_MTD_CFI_ADV_OPTIONS=y+CONFIG_MTD_CFI_NOSWAP=y+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set+CONFIG_MTD_CFI_GEOMETRY=y+# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set+# CONFIG_MTD_MAP_BANK_WIDTH_2 is not set+CONFIG_MTD_MAP_BANK_WIDTH_4=y+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set+# CONFIG_MTD_CFI_I1 is not set+# CONFIG_MTD_CFI_I2 is not set+CONFIG_MTD_CFI_I4=y+# CONFIG_MTD_CFI_I8 is not set+# CONFIG_MTD_OTP is not set+# CONFIG_MTD_CFI_INTELEXT is not set+CONFIG_MTD_CFI_AMDSTD=y+# CONFIG_MTD_CFI_STAA is not set+CONFIG_MTD_CFI_UTIL=y+# CONFIG_MTD_RAM is not set+# CONFIG_MTD_ROM is not set+# CONFIG_MTD_ABSENT is not set++#+# Mapping drivers for chip access+#+# CONFIG_MTD_COMPLEX_MAPPINGS is not set+# CONFIG_MTD_PHYSMAP is not set+CONFIG_MTD_PHYSMAP_OF=y+# CONFIG_MTD_PLATRAM is not set++#+# Self-contained MTD device drivers+#+# CONFIG_MTD_SLRAM is not set+# CONFIG_MTD_PHRAM is not set+# CONFIG_MTD_MTDRAM is not set+# CONFIG_MTD_BLOCK2MTD is not set++#+# Disk-On-Chip Device Drivers+#+# CONFIG_MTD_DOC2000 is not set+# CONFIG_MTD_DOC2001 is not set+# CONFIG_MTD_DOC2001PLUS is not set+# CONFIG_MTD_NAND is not set+# CONFIG_MTD_ONENAND is not set++#+# UBI - Unsorted block images+#+# CONFIG_MTD_UBI is not set+CONFIG_OF_DEVICE=y # CONFIG_PARPORT is not set--#-# Plug and Play support-#-# CONFIG_PNPACPI is not set--#-# Block devices-#-# CONFIG_BLK_DEV_FD is not set-# CONFIG_BLK_DEV_COW_COMMON is not set-CONFIG_BLK_DEV_LOOP=y-# CONFIG_BLK_DEV_CRYPTOLOOP is not set-# CONFIG_BLK_DEV_NBD is not set-# CONFIG_BLK_DEV_RAM is not set-# CONFIG_CDROM_PKTCDVD is not set-# CONFIG_ATA_OVER_ETH is not set--#-# Misc devices-#-# CONFIG_BLINK is not set+# CONFIG_BLK_DEV is not set+# CONFIG_MISC_DEVICES is not set # CONFIG_IDE is not set #
@@ -368,21 +413,16 @@ CONFIG_BLK_DEV_LOOP=y # # CONFIG_RAID_ATTRS is not set # CONFIG_SCSI is not set+# CONFIG_SCSI_DMA is not set # CONFIG_SCSI_NETLINK is not set # CONFIG_ATA is not set--#-# Multi-device support (RAID and LVM)-# # CONFIG_MD is not set # CONFIG_MACINTOSH_DRIVERS is not set--#-# Network device support-# CONFIG_NETDEVICES=y+# CONFIG_NETDEVICES_MULTIQUEUE is not set # CONFIG_DUMMY is not set # CONFIG_BONDING is not set+# CONFIG_MACVLAN is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set CONFIG_PHYLIB=y
@@ -398,21 +438,16 @@ CONFIG_DAVICOM_PHY=y # CONFIG_VITESSE_PHY is not set # CONFIG_SMSC_PHY is not set # CONFIG_BROADCOM_PHY is not set-CONFIG_FIXED_PHY=y-CONFIG_FIXED_MII_10_FDX=y-# CONFIG_FIXED_MII_100_FDX is not set--#-# Ethernet (10 or 100Mbit)-#+# CONFIG_ICPLUS_PHY is not set+# CONFIG_FIXED_PHY is not set+# CONFIG_MDIO_BITBANG is not set CONFIG_NET_ETHERNET=y CONFIG_MII=y-# CONFIG_FEC_8XX is not set CONFIG_FS_ENET=y-CONFIG_FS_ENET_HAS_SCC=y+# CONFIG_FS_ENET_HAS_SCC is not set CONFIG_FS_ENET_HAS_FEC=y-CONFIG_NETDEV_1000=y-CONFIG_NETDEV_10000=y+# CONFIG_NETDEV_1000 is not set+# CONFIG_NETDEV_10000 is not set # # Wireless LAN
@@ -426,69 +461,18 @@ CONFIG_NETDEV_10000=y # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set--#-# ISDN subsystem-# # CONFIG_ISDN is not set--#-# Telephony Support-# # CONFIG_PHONE is not set # # Input device support #-CONFIG_INPUT=y-# CONFIG_INPUT_FF_MEMLESS is not set-# CONFIG_INPUT_POLLDEV is not set--#-# Userland interfaces-#-CONFIG_INPUT_MOUSEDEV=y-CONFIG_INPUT_MOUSEDEV_PSAUX=y-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768-# CONFIG_INPUT_JOYDEV is not set-# CONFIG_INPUT_TSDEV is not set-# CONFIG_INPUT_EVDEV is not set-# CONFIG_INPUT_EVBUG is not set--#-# Input Device Drivers-#-CONFIG_INPUT_KEYBOARD=y-CONFIG_KEYBOARD_ATKBD=y-# CONFIG_KEYBOARD_SUNKBD is not set-# CONFIG_KEYBOARD_LKKBD is not set-# CONFIG_KEYBOARD_XTKBD is not set-# CONFIG_KEYBOARD_NEWTON is not set-# CONFIG_KEYBOARD_STOWAWAY is not set-CONFIG_INPUT_MOUSE=y-CONFIG_MOUSE_PS2=y-CONFIG_MOUSE_PS2_ALPS=y-CONFIG_MOUSE_PS2_LOGIPS2PP=y-CONFIG_MOUSE_PS2_SYNAPTICS=y-CONFIG_MOUSE_PS2_LIFEBOOK=y-CONFIG_MOUSE_PS2_TRACKPOINT=y-# CONFIG_MOUSE_PS2_TOUCHKIT is not set-# CONFIG_MOUSE_SERIAL is not set-# CONFIG_MOUSE_VSXXXAA is not set-# CONFIG_INPUT_JOYSTICK is not set-# CONFIG_INPUT_TABLET is not set-# CONFIG_INPUT_TOUCHSCREEN is not set-# CONFIG_INPUT_MISC is not set+# CONFIG_INPUT is not set # # Hardware I/O ports #-CONFIG_SERIO=y-CONFIG_SERIO_I8042=y-CONFIG_SERIO_SERPORT=y-CONFIG_SERIO_LIBPS2=y-# CONFIG_SERIO_RAW is not set+# CONFIG_SERIO is not set # CONFIG_GAMEPORT is not set #
@@ -518,10 +502,6 @@ CONFIG_SERIAL_CPM_SMC1=y CONFIG_SERIAL_CPM_SMC2=y CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set--#-# IPMI-# # CONFIG_IPMI_HANDLER is not set # CONFIG_WATCHDOG is not set CONFIG_HW_RANDOM=y
@@ -530,10 +510,6 @@ CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set # CONFIG_R3964 is not set # CONFIG_RAW_DRIVER is not set--#-# TPM devices-# # CONFIG_TCG_TPM is not set # CONFIG_I2C is not set
@@ -542,21 +518,9 @@ CONFIG_GEN_RTC=y # # CONFIG_SPI is not set # CONFIG_SPI_MASTER is not set--#-# Dallas's 1-wire bus-# # CONFIG_W1 is not set-CONFIG_HWMON=y-# CONFIG_HWMON_VID is not set-# CONFIG_SENSORS_ABITUGURU is not set-# CONFIG_SENSORS_F71805F is not set-# CONFIG_SENSORS_PC87427 is not set-# CONFIG_SENSORS_SMSC47M1 is not set-# CONFIG_SENSORS_SMSC47B397 is not set-# CONFIG_SENSORS_VT1211 is not set-# CONFIG_SENSORS_W83627HF is not set-# CONFIG_HWMON_DEBUG_CHIP is not set+# CONFIG_POWER_SUPPLY is not set+# CONFIG_HWMON is not set # # Multifunction device drivers
@@ -580,6 +544,7 @@ CONFIG_DAB=y # # CONFIG_DISPLAY_SUPPORT is not set # CONFIG_VGASTATE is not set+# CONFIG_VIDEO_OUTPUT_CONTROL is not set # CONFIG_FB is not set # CONFIG_FB_IBM_GXT4500 is not set
@@ -587,54 +552,10 @@ CONFIG_DAB=y # Sound # # CONFIG_SOUND is not set--#-# HID Devices-#-CONFIG_HID=y-# CONFIG_HID_DEBUG is not set--#-# USB support-#-# CONFIG_USB_ARCH_HAS_HCD is not set-# CONFIG_USB_ARCH_HAS_OHCI is not set-# CONFIG_USB_ARCH_HAS_EHCI is not set--#-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'-#--#-# USB Gadget Support-#-# CONFIG_USB_GADGET is not set+# CONFIG_USB_SUPPORT is not set # CONFIG_MMC is not set--#-# LED devices-# # CONFIG_NEW_LEDS is not set--#-# LED drivers-#--#-# LED Triggers-#--#-# InfiniBand support-#--#-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)-#--#-# Real Time Clock-#+# CONFIG_EDAC is not set # CONFIG_RTC_CLASS is not set #
@@ -651,21 +572,16 @@ CONFIG_HID=y # #+# Userspace I/O+#+# CONFIG_UIO is not set++# # File systems #-CONFIG_EXT2_FS=y-CONFIG_EXT2_FS_XATTR=y-# CONFIG_EXT2_FS_POSIX_ACL is not set-# CONFIG_EXT2_FS_SECURITY is not set-# CONFIG_EXT2_FS_XIP is not set-CONFIG_EXT3_FS=y-CONFIG_EXT3_FS_XATTR=y-# CONFIG_EXT3_FS_POSIX_ACL is not set-# CONFIG_EXT3_FS_SECURITY is not set+# CONFIG_EXT2_FS is not set+# CONFIG_EXT3_FS is not set # CONFIG_EXT4DEV_FS is not set-CONFIG_JBD=y-# CONFIG_JBD_DEBUG is not set-CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set # CONFIG_FS_POSIX_ACL is not set
@@ -674,10 +590,9 @@ CONFIG_FS_MBCACHE=y # CONFIG_OCFS2_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set-CONFIG_INOTIFY=y-CONFIG_INOTIFY_USER=y+# CONFIG_INOTIFY is not set # CONFIG_QUOTA is not set-CONFIG_DNOTIFY=y+# CONFIG_DNOTIFY is not set # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set # CONFIG_FUSE_FS is not set
@@ -718,6 +633,7 @@ CONFIG_RAMFS=y # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set+# CONFIG_JFFS2_FS is not set CONFIG_CRAMFS=y # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set
@@ -747,7 +663,6 @@ CONFIG_SUNRPC=y # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set-# CONFIG_9P_FS is not set # # Partition Types
@@ -785,14 +700,13 @@ CONFIG_MSDOS_PARTITION=y # # Library routines #-CONFIG_BITREVERSE=y-CONFIG_CRC_CCITT=y+# CONFIG_CRC_CCITT is not set # CONFIG_CRC16 is not set # CONFIG_CRC_ITU_T is not set-CONFIG_CRC32=y+# CONFIG_CRC32 is not set+# CONFIG_CRC7 is not set # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y-CONFIG_PLIST=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y
@@ -807,12 +721,33 @@ CONFIG_HAS_DMA=y # # CONFIG_PRINTK_TIME is not set CONFIG_ENABLE_MUST_CHECK=y-# CONFIG_MAGIC_SYSRQ is not set+CONFIG_MAGIC_SYSRQ=y # CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_FS is not set # CONFIG_HEADERS_CHECK is not set-# CONFIG_DEBUG_KERNEL is not set-# CONFIG_BOOTX_TEXT is not set+CONFIG_DEBUG_KERNEL=y+# CONFIG_DEBUG_SHIRQ is not set+CONFIG_DETECT_SOFTLOCKUP=y+CONFIG_SCHED_DEBUG=y+# CONFIG_SCHEDSTATS is not set+# CONFIG_TIMER_STATS is not set+# CONFIG_SLUB_DEBUG_ON is not set+# CONFIG_DEBUG_SPINLOCK is not set+# CONFIG_DEBUG_MUTEXES is not set+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set+# CONFIG_DEBUG_KOBJECT is not set+CONFIG_DEBUG_BUGVERBOSE=y+CONFIG_DEBUG_INFO=y+# CONFIG_DEBUG_VM is not set+# CONFIG_DEBUG_LIST is not set+CONFIG_FORCED_INLINING=y+# CONFIG_FAULT_INJECTION is not set+# CONFIG_DEBUG_STACKOVERFLOW is not set+# CONFIG_DEBUG_STACK_USAGE is not set+# CONFIG_DEBUG_PAGEALLOC is not set+# CONFIG_DEBUGGER is not set+# CONFIG_BDI_SWITCH is not set # CONFIG_PPC_EARLY_DEBUG is not set #
@@ -820,8 +755,4 @@ CONFIG_ENABLE_MUST_CHECK=y # # CONFIG_KEYS is not set # CONFIG_SECURITY is not set--#-# Cryptographic options-# # CONFIG_CRYPTO is not set
@@ -96,330 +91,200 @@ static int pcmcia_set_voltage(int slot, int vcc, int vpp)}/* first, turn off all power */-clrbits32(bcsr_io,0x00610000);+clrbits32(&bcsr[1],0x00610000);/* enable new powersettings */-setbits32(bcsr_io,reg);+setbits32(&bcsr[1],reg);-iounmap(bcsr_io);return0;}#endif-void__initmpc885ads_board_setup(void)-{-cpm8xx_t*cp;-unsignedint*bcsr_io;-u8tmpval8;--#ifdef CONFIG_FS_ENET-iop8xx_t*io_port;-#endif+structcpm_pin{+intport,pin,flags;+};-bcsr_io=ioremap(BCSR1,sizeof(unsignedlong));-cp=(cpm8xx_t*)immr_map(im_cpm);+staticstructcpm_pinmpc885ads_pins[]={+/* SMC1 */+{1,24,CPM_PIN_INPUT},/* RX */+{1,25,CPM_PIN_INPUT|CPM_PIN_SECONDARY},/* TX */-if(bcsr_io==NULL){-printk(KERN_CRIT"Could not remap BCSR\n");-return;-}-#ifdef CONFIG_SERIAL_CPM_SMC1-clrbits32(bcsr_io,BCSR1_RS232EN_1);-clrbits32(&cp->cp_simode,0xe0000000>>17);/* brg1 */-tmpval8=in_8(&(cp->cp_smc[0].smc_smcm))|(SMCM_RX|SMCM_TX);-out_8(&(cp->cp_smc[0].smc_smcm),tmpval8);-clrbits16(&cp->cp_smc[0].smc_smcmr,SMCMR_REN|SMCMR_TEN);/* brg1 */-#else-setbits32(bcsr_io,BCSR1_RS232EN_1);-out_be16(&cp->cp_smc[0].smc_smcmr,0);-out_8(&cp->cp_smc[0].smc_smce,0);+/* SMC2 */+#ifndef CONFIG_MPC8xx_SECOND_ETH_FEC2+{4,21,CPM_PIN_INPUT},/* RX */+{4,20,CPM_PIN_INPUT|CPM_PIN_SECONDARY},/* TX */#endif-#ifdef CONFIG_SERIAL_CPM_SMC2-clrbits32(bcsr_io,BCSR1_RS232EN_2);-clrbits32(&cp->cp_simode,0xe0000000>>1);-setbits32(&cp->cp_simode,0x20000000>>1);/* brg2 */-tmpval8=in_8(&(cp->cp_smc[1].smc_smcm))|(SMCM_RX|SMCM_TX);-out_8(&(cp->cp_smc[1].smc_smcm),tmpval8);-clrbits16(&cp->cp_smc[1].smc_smcmr,SMCMR_REN|SMCMR_TEN);--init_smc2_uart_ioports(0);-#else-setbits32(bcsr_io,BCSR1_RS232EN_2);-out_be16(&cp->cp_smc[1].smc_smcmr,0);-out_8(&cp->cp_smc[1].smc_smce,0);-#endif-immr_unmap(cp);-iounmap(bcsr_io);--#ifdef CONFIG_FS_ENET-/* use MDC for MII (common) */-io_port=(iop8xx_t*)immr_map(im_ioport);-setbits16(&io_port->iop_pdpar,0x0080);-clrbits16(&io_port->iop_pddir,0x0080);--bcsr_io=ioremap(BCSR5,sizeof(unsignedlong));-clrbits32(bcsr_io,BCSR5_MII1_EN);-clrbits32(bcsr_io,BCSR5_MII1_RST);-#ifndef CONFIG_FC_ENET_HAS_SCC-clrbits32(bcsr_io,BCSR5_MII2_EN);-clrbits32(bcsr_io,BCSR5_MII2_RST);-+/* SCC3 */+{0,9,CPM_PIN_INPUT},/* RX */+{0,8,CPM_PIN_INPUT},/* TX */+{2,4,CPM_PIN_INPUT|CPM_PIN_SECONDARY|CPM_PIN_GPIO},/* RENA */+{2,5,CPM_PIN_INPUT|CPM_PIN_SECONDARY|CPM_PIN_GPIO},/* CLSN */+{4,27,CPM_PIN_INPUT|CPM_PIN_SECONDARY},/* TENA */+{4,17,CPM_PIN_INPUT},/* CLK5 */+{4,16,CPM_PIN_INPUT},/* CLK6 */++/* MII1 */+{0,0,CPM_PIN_INPUT},+{0,1,CPM_PIN_INPUT},+{0,2,CPM_PIN_INPUT},+{0,3,CPM_PIN_INPUT},+{0,4,CPM_PIN_OUTPUT},+{0,10,CPM_PIN_OUTPUT},+{0,11,CPM_PIN_OUTPUT},+{1,19,CPM_PIN_INPUT},+{1,31,CPM_PIN_INPUT},+{2,12,CPM_PIN_INPUT},+{2,13,CPM_PIN_INPUT},+{4,30,CPM_PIN_OUTPUT},+{4,31,CPM_PIN_OUTPUT},++/* MII2 */+#ifdef CONFIG_MPC8xx_SECOND_ETH_FEC2+{4,14,CPM_PIN_OUTPUT|CPM_PIN_SECONDARY},+{4,15,CPM_PIN_OUTPUT|CPM_PIN_SECONDARY},+{4,16,CPM_PIN_OUTPUT},+{4,17,CPM_PIN_OUTPUT|CPM_PIN_SECONDARY},+{4,18,CPM_PIN_OUTPUT|CPM_PIN_SECONDARY},+{4,19,CPM_PIN_OUTPUT|CPM_PIN_SECONDARY},+{4,20,CPM_PIN_OUTPUT|CPM_PIN_SECONDARY},+{4,21,CPM_PIN_OUTPUT},+{4,22,CPM_PIN_OUTPUT},+{4,23,CPM_PIN_OUTPUT},+{4,24,CPM_PIN_OUTPUT},+{4,25,CPM_PIN_OUTPUT},+{4,26,CPM_PIN_OUTPUT},+{4,27,CPM_PIN_OUTPUT},+{4,28,CPM_PIN_OUTPUT},+{4,29,CPM_PIN_OUTPUT},#endif-iounmap(bcsr_io);-immr_unmap(io_port);+};-#endif--#ifdef CONFIG_PCMCIA_M8XX-/*Set up board specific hook-ups */-m8xx_pcmcia_ops.hw_ctrl=pcmcia_hw_setup;-m8xx_pcmcia_ops.voltage_set=pcmcia_set_voltage;-#endif-}--staticvoidinit_fec1_ioports(structfs_platform_info*ptr)+staticvoid__initinit_ioports(void){-cpm8xx_t*cp=(cpm8xx_t*)immr_map(im_cpm);-iop8xx_t*io_port=(iop8xx_t*)immr_map(im_ioport);--/* configure FEC1 pins */-setbits16(&io_port->iop_papar,0xf830);-setbits16(&io_port->iop_padir,0x0830);-clrbits16(&io_port->iop_padir,0xf000);--setbits32(&cp->cp_pbpar,0x00001001);-clrbits32(&cp->cp_pbdir,0x00001001);+inti;-setbits16(&io_port->iop_pcpar,0x000c);-clrbits16(&io_port->iop_pcdir,0x000c);+for(i=0;i<ARRAY_SIZE(mpc885ads_pins);i++){+structcpm_pin*pin=&mpc885ads_pins[i];+cpm1_set_pin(pin->port,pin->pin,pin->flags);+}-setbits32(&cp->cp_pepar,0x00000003);-setbits32(&cp->cp_pedir,0x00000003);-clrbits32(&cp->cp_peso,0x00000003);-clrbits32(&cp->cp_cptr,0x00000100);+cpm1_clk_setup(CPM_CLK_SMC1,CPM_BRG1,CPM_CLK_RTX);+cpm1_clk_setup(CPM_CLK_SMC2,CPM_BRG2,CPM_CLK_RTX);+cpm1_clk_setup(CPM_CLK_SCC3,CPM_CLK5,CPM_CLK_TX);+cpm1_clk_setup(CPM_CLK_SCC3,CPM_CLK6,CPM_CLK_RX);-immr_unmap(io_port);-immr_unmap(cp);+/* Set FEC1 and FEC2 to MII mode */+clrbits32(&mpc8xx_immr->im_cpm.cp_cptr,0x00000180);}-staticvoidinit_fec2_ioports(structfs_platform_info*ptr)+staticvoid__initmpc885ads_setup_arch(void){-cpm8xx_t*cp=(cpm8xx_t*)immr_map(im_cpm);-iop8xx_t*io_port=(iop8xx_t*)immr_map(im_ioport);--/* configure FEC2 pins */-setbits32(&cp->cp_pepar,0x0003fffc);-setbits32(&cp->cp_pedir,0x0003fffc);-clrbits32(&cp->cp_peso,0x000087fc);-setbits32(&cp->cp_peso,0x00037800);-clrbits32(&cp->cp_cptr,0x00000080);--immr_unmap(io_port);-immr_unmap(cp);-}+structdevice_node*np;-voidinit_fec_ioports(structfs_platform_info*fpi)-{-intfec_no=fs_get_fec_index(fpi->fs_no);+cpm_reset();+init_ioports();-switch(fec_no){-case0:-init_fec1_ioports(fpi);-break;-case1:-init_fec2_ioports(fpi);-break;-default:-printk(KERN_ERR"init_fec_ioports: invalid FEC number\n");+np=of_find_compatible_node(NULL,NULL,"fsl,mpc885ads-bcsr");+if(!np){+printk(KERN_CRIT"Could not find fsl,mpc885ads-bcsr node\n");return;}-}-staticvoidinit_scc3_ioports(structfs_platform_info*fpi)-{-unsigned*bcsr_io;-iop8xx_t*io_port;-cpm8xx_t*cp;+bcsr=of_iomap(np,0);+bcsr5=of_iomap(np,1);+of_node_put(np);-bcsr_io=ioremap(BCSR_ADDR,BCSR_SIZE);-io_port=(iop8xx_t*)immr_map(im_ioport);-cp=(cpm8xx_t*)immr_map(im_cpm);--if(bcsr_io==NULL){+if(!bcsr||!bcsr5){printk(KERN_CRIT"Could not remap BCSR\n");return;}-/* Enable the PHY.-*/-clrbits32(bcsr_io+4,BCSR4_ETH10_RST);-udelay(1000);-setbits32(bcsr_io+4,BCSR4_ETH10_RST);-/* Configure port A pins for Txd and Rxd.-*/-setbits16(&io_port->iop_papar,PA_ENET_RXD|PA_ENET_TXD);-clrbits16(&io_port->iop_padir,PA_ENET_RXD|PA_ENET_TXD);+clrbits32(&bcsr[1],BCSR1_RS232EN_1);+#ifdef CONFIG_MPC8xx_SECOND_ETH_FEC2+setbits32(&bcsr[1],BCSR1_RS232EN_2);+#else+clrbits32(&bcsr[1],BCSR1_RS232EN_2);+#endif-/* Configure port C pins to enable CLSN and RENA.-*/-clrbits16(&io_port->iop_pcpar,PC_ENET_CLSN|PC_ENET_RENA);-clrbits16(&io_port->iop_pcdir,PC_ENET_CLSN|PC_ENET_RENA);-setbits16(&io_port->iop_pcso,PC_ENET_CLSN|PC_ENET_RENA);+clrbits32(bcsr5,BCSR5_MII1_EN);+setbits32(bcsr5,BCSR5_MII1_RST);+udelay(1000);+clrbits32(bcsr5,BCSR5_MII1_RST);-/* Configure port E for TCLK and RCLK.-*/-setbits32(&cp->cp_pepar,PE_ENET_TCLK|PE_ENET_RCLK);-clrbits32(&cp->cp_pepar,PE_ENET_TENA);-clrbits32(&cp->cp_pedir,PE_ENET_TCLK|PE_ENET_RCLK|PE_ENET_TENA);-clrbits32(&cp->cp_peso,PE_ENET_TCLK|PE_ENET_RCLK);-setbits32(&cp->cp_peso,PE_ENET_TENA);--/* Configure Serial Interface clock routing.-*First,clearallSCCbitstozero,thensettheoneswewant.-*/-clrbits32(&cp->cp_sicr,SICR_ENET_MASK);-setbits32(&cp->cp_sicr,SICR_ENET_CLKRT);+#ifdef CONFIG_MPC8xx_SECOND_ETH_FEC2+clrbits32(bcsr5,BCSR5_MII2_EN);+setbits32(bcsr5,BCSR5_MII2_RST);+udelay(1000);+clrbits32(bcsr5,BCSR5_MII2_RST);+#else+setbits32(bcsr5,BCSR5_MII2_EN);+#endif-/* Disable Rx and Tx. SMC1 sshould be stopped if SCC3 eternet are used.-*/-clrbits16(&cp->cp_smc[0].smc_smcmr,SMCMR_REN|SMCMR_TEN);-/* On the MPC885ADS SCC ethernet PHY is initialized in the full duplex mode-*byH/Wsettingafterreset.SCCethernetcontrollersupportonlyhalfduplex.-*Thisdiscrepancyofmodescausesalotofcarrierlosterrors.-*/+#ifdef CONFIG_MPC8xx_SECOND_ETH_SCC3+clrbits32(&bcsr[4],BCSR4_ETH10_RST);+udelay(1000);+setbits32(&bcsr[4],BCSR4_ETH10_RST);-/* In the original SCC enet driver the following code is placed at-theendoftheinitialization*/-setbits32(&cp->cp_pepar,PE_ENET_TENA);-clrbits32(&cp->cp_pedir,PE_ENET_TENA);-setbits32(&cp->cp_peso,PE_ENET_TENA);+setbits32(&bcsr[1],BCSR1_ETHEN);-setbits32(bcsr_io+4,BCSR1_ETHEN);-iounmap(bcsr_io);-immr_unmap(io_port);-immr_unmap(cp);-}+np=of_find_node_by_path("/soc@ff000000/cpm@9c0/serial@a80");+#else+np=of_find_node_by_path("/soc@ff000000/cpm@9c0/ethernet@a40");+#endif-voidinit_scc_ioports(structfs_platform_info*fpi)-{-intscc_no=fs_get_scc_index(fpi->fs_no);+/* The SCC3 enet registers overlap the SMC1 registers, so+*oneofthetwomustberemovedfromthedevicetree.+*/-switch(scc_no){-case2:-init_scc3_ioports(fpi);-break;-default:-printk(KERN_ERR"init_scc_ioports: invalid SCC number\n");-return;+if(np){+of_detach_node(np);+of_node_put(np);}-}--staticvoidinit_smc1_uart_ioports(structfs_uart_platform_info*ptr)-{-unsigned*bcsr_io;-cpm8xx_t*cp;--cp=(cpm8xx_t*)immr_map(im_cpm);-setbits32(&cp->cp_pepar,0x000000c0);-clrbits32(&cp->cp_pedir,0x000000c0);-clrbits32(&cp->cp_peso,0x00000040);-setbits32(&cp->cp_peso,0x00000080);-immr_unmap(cp);--bcsr_io=ioremap(BCSR1,sizeof(unsignedlong));-if(bcsr_io==NULL){-printk(KERN_CRIT"Could not remap BCSR1\n");-return;-}-clrbits32(bcsr_io,BCSR1_RS232EN_1);-iounmap(bcsr_io);+#ifdef CONFIG_PCMCIA_M8XX+/* Set up board specific hook-ups.*/+m8xx_pcmcia_ops.hw_ctrl=pcmcia_hw_setup;+m8xx_pcmcia_ops.voltage_set=pcmcia_set_voltage;+#endif}-staticvoidinit_smc2_uart_ioports(structfs_uart_platform_info*fpi)+staticint__initmpc885ads_probe(void){-unsigned*bcsr_io;-cpm8xx_t*cp;--cp=(cpm8xx_t*)immr_map(im_cpm);-setbits32(&cp->cp_pepar,0x00000c00);-clrbits32(&cp->cp_pedir,0x00000c00);-clrbits32(&cp->cp_peso,0x00000400);-setbits32(&cp->cp_peso,0x00000800);-immr_unmap(cp);--bcsr_io=ioremap(BCSR1,sizeof(unsignedlong));--if(bcsr_io==NULL){-printk(KERN_CRIT"Could not remap BCSR1\n");-return;-}-clrbits32(bcsr_io,BCSR1_RS232EN_2);-iounmap(bcsr_io);+unsignedlongroot=of_get_flat_dt_root();+returnof_flat_dt_is_compatible(root,"fsl,mpc885ads");}-voidinit_smc_ioports(structfs_uart_platform_info*data)-{-intsmc_no=fs_uart_id_fsid2smc(data->fs_no);--switch(smc_no){-case0:-init_smc1_uart_ioports(data);-data->brg=data->clk_rx;-break;-case1:-init_smc2_uart_ioports(data);-data->brg=data->clk_rx;-break;-default:-printk(KERN_ERR"init_scc_ioports: invalid SCC number\n");-return;-}-}+staticstructof_device_id__initdataof_bus_ids[]={+{.name="soc",},+{.name="cpm",},+{.name="chipselect",},+{},+};-intplatform_device_skip(constchar*model,intid)+staticint__initdeclare_of_platform_devices(void){-#ifdef CONFIG_MPC8xx_SECOND_ETH_SCC3-constchar*dev="FEC";-intn=2;-#else-constchar*dev="SCC";-intn=3;-#endif--if(!strcmp(model,dev)&&n==id)-return1;+/* Publish the QE devices */+if(machine_is(mpc885_ads))+of_platform_bus_probe(NULL,of_bus_ids,NULL);return0;}--staticvoid__initmpc885ads_setup_arch(void)-{-cpm_reset();--mpc885ads_board_setup();--ROOT_DEV=Root_NFS;-}--staticint__initmpc885ads_probe(void)-{-char*model=of_get_flat_dt_prop(of_get_flat_dt_root(),-"model",NULL);-if(model==NULL)-return0;-if(strcmp(model,"MPC885ADS"))-return0;--return1;-}--define_machine(mpc885_ads)-{-.name="MPC885 ADS",.probe=mpc885ads_probe,.setup_arch=-mpc885ads_setup_arch,.init_IRQ=-m8xx_pic_init,.get_irq=-mpc8xx_get_irq,.restart=mpc8xx_restart,.calibrate_decr=-mpc8xx_calibrate_decr,.set_rtc_time=-mpc8xx_set_rtc_time,.get_rtc_time=mpc8xx_get_rtc_time,};+device_initcall(declare_of_platform_devices);++define_machine(mpc885_ads){+.name="Freescale MPC885 ADS",+.probe=mpc885ads_probe,+.setup_arch=mpc885ads_setup_arch,+.init_IRQ=m8xx_pic_init,+.get_irq=mpc8xx_get_irq,+.restart=mpc8xx_restart,+.calibrate_decr=mpc8xx_calibrate_decr,+.set_rtc_time=mpc8xx_set_rtc_time,+.get_rtc_time=mpc8xx_get_rtc_time,+.progress=udbg_progress,+};++#ifdef CONFIG_PPC_EARLY_DEBUG_CPM+u32__iomem*cpm_udbg_txdesc=(u32__iomem__force*)0xff002808;+#endif
@@ -0,0 +1,747 @@+#+# Automatically generated make config: don't edit+# Linux kernel version: 2.6.23-rc3+# Mon Aug 27 15:11:14 2007+#+# CONFIG_PPC64 is not set++#+# Processor support+#+# CONFIG_6xx is not set+# CONFIG_PPC_85xx is not set+CONFIG_PPC_8xx=y+# CONFIG_40x is not set+# CONFIG_44x is not set+# CONFIG_E200 is not set+CONFIG_8xx=y+# CONFIG_PPC_MM_SLICES is not set+CONFIG_NOT_COHERENT_CACHE=y+CONFIG_PPC32=y+CONFIG_PPC_MERGE=y+CONFIG_MMU=y+CONFIG_GENERIC_HARDIRQS=y+CONFIG_IRQ_PER_CPU=y+CONFIG_RWSEM_XCHGADD_ALGORITHM=y+CONFIG_ARCH_HAS_ILOG2_U32=y+CONFIG_GENERIC_HWEIGHT=y+CONFIG_GENERIC_CALIBRATE_DELAY=y+CONFIG_GENERIC_FIND_NEXT_BIT=y+# CONFIG_ARCH_NO_VIRT_TO_BUS is not set+CONFIG_PPC=y+CONFIG_EARLY_PRINTK=y+CONFIG_GENERIC_NVRAM=y+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y+CONFIG_ARCH_MAY_HAVE_PC_FDC=y+CONFIG_PPC_OF=y+CONFIG_OF=y+# CONFIG_PPC_UDBG_16550 is not set+# CONFIG_GENERIC_TBSYNC is not set+CONFIG_AUDIT_ARCH=y+CONFIG_GENERIC_BUG=y+# CONFIG_DEFAULT_UIMAGE is not set+# CONFIG_PPC_DCR_NATIVE is not set+# CONFIG_PPC_DCR_MMIO is not set+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"++#+# General setup+#+CONFIG_EXPERIMENTAL=y+CONFIG_BROKEN_ON_SMP=y+CONFIG_INIT_ENV_ARG_LIMIT=32+CONFIG_LOCALVERSION=""+CONFIG_LOCALVERSION_AUTO=y+# CONFIG_SWAP is not set+CONFIG_SYSVIPC=y+CONFIG_SYSVIPC_SYSCTL=y+# CONFIG_POSIX_MQUEUE is not set+# CONFIG_BSD_PROCESS_ACCT is not set+# CONFIG_TASKSTATS is not set+# CONFIG_USER_NS is not set+# CONFIG_AUDIT is not set+# CONFIG_IKCONFIG is not set+CONFIG_LOG_BUF_SHIFT=14+CONFIG_SYSFS_DEPRECATED=y+# CONFIG_RELAY is not set+# CONFIG_BLK_DEV_INITRD is not set+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set+CONFIG_SYSCTL=y+CONFIG_EMBEDDED=y+# CONFIG_SYSCTL_SYSCALL is not set+CONFIG_KALLSYMS=y+# CONFIG_KALLSYMS_ALL is not set+# CONFIG_KALLSYMS_EXTRA_PASS is not set+CONFIG_HOTPLUG=y+CONFIG_PRINTK=y+CONFIG_BUG=y+# CONFIG_ELF_CORE is not set+# CONFIG_BASE_FULL is not set+# CONFIG_FUTEX is not set+CONFIG_ANON_INODES=y+CONFIG_EPOLL=y+CONFIG_SIGNALFD=y+CONFIG_TIMERFD=y+CONFIG_EVENTFD=y+CONFIG_SHMEM=y+# CONFIG_VM_EVENT_COUNTERS is not set+CONFIG_SLUB_DEBUG=y+# CONFIG_SLAB is not set+CONFIG_SLUB=y+# CONFIG_SLOB is not set+# CONFIG_TINY_SHMEM is not set+CONFIG_BASE_SMALL=1+# CONFIG_MODULES is not set+CONFIG_BLOCK=y+# CONFIG_LBD is not set+# CONFIG_BLK_DEV_IO_TRACE is not set+# CONFIG_LSF is not set+# CONFIG_BLK_DEV_BSG is not set++#+# IO Schedulers+#+CONFIG_IOSCHED_NOOP=y+# CONFIG_IOSCHED_AS is not set+CONFIG_IOSCHED_DEADLINE=y+# CONFIG_IOSCHED_CFQ is not set+# CONFIG_DEFAULT_AS is not set+CONFIG_DEFAULT_DEADLINE=y+# CONFIG_DEFAULT_CFQ is not set+# CONFIG_DEFAULT_NOOP is not set+CONFIG_DEFAULT_IOSCHED="deadline"++#+# Platform support+#+# CONFIG_PPC_MPC52xx is not set+# CONFIG_PPC_MPC5200 is not set+# CONFIG_PPC_CELL is not set+# CONFIG_PPC_CELL_NATIVE is not set+CONFIG_CPM1=y+# CONFIG_MPC8XXFADS is not set+# CONFIG_MPC86XADS is not set+# CONFIG_MPC885ADS is not set+CONFIG_PPC_EP88XC=y++#+# MPC8xx CPM Options+#++#+# Generic MPC8xx Options+#+CONFIG_8xx_COPYBACK=y+# CONFIG_8xx_CPU6 is not set+CONFIG_8xx_CPU15=y+CONFIG_NO_UCODE_PATCH=y+# CONFIG_USB_SOF_UCODE_PATCH is not set+# CONFIG_I2C_SPI_UCODE_PATCH is not set+# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set+# CONFIG_PQ2ADS is not set+# CONFIG_MPIC is not set+# CONFIG_MPIC_WEIRD is not set+# CONFIG_PPC_I8259 is not set+# CONFIG_PPC_RTAS is not set+# CONFIG_MMIO_NVRAM is not set+# CONFIG_PPC_MPC106 is not set+# CONFIG_PPC_970_NAP is not set+# CONFIG_PPC_INDIRECT_IO is not set+# CONFIG_GENERIC_IOMAP is not set+# CONFIG_CPU_FREQ is not set+# CONFIG_CPM2 is not set+CONFIG_PPC_CPM_NEW_BINDING=y++#+# Kernel options+#+# CONFIG_HIGHMEM is not set+CONFIG_HZ_100=y+# CONFIG_HZ_250 is not set+# CONFIG_HZ_300 is not set+# CONFIG_HZ_1000 is not set+CONFIG_HZ=100+CONFIG_PREEMPT_NONE=y+# CONFIG_PREEMPT_VOLUNTARY is not set+# CONFIG_PREEMPT is not set+CONFIG_BINFMT_ELF=y+# CONFIG_BINFMT_MISC is not set+# CONFIG_MATH_EMULATION is not set+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y+CONFIG_ARCH_FLATMEM_ENABLE=y+CONFIG_ARCH_POPULATES_NODE_MAP=y+CONFIG_SELECT_MEMORY_MODEL=y+CONFIG_FLATMEM_MANUAL=y+# CONFIG_DISCONTIGMEM_MANUAL is not set+# CONFIG_SPARSEMEM_MANUAL is not set+CONFIG_FLATMEM=y+CONFIG_FLAT_NODE_MEM_MAP=y+# CONFIG_SPARSEMEM_STATIC is not set+CONFIG_SPLIT_PTLOCK_CPUS=4+# CONFIG_RESOURCES_64BIT is not set+CONFIG_ZONE_DMA_FLAG=1+CONFIG_BOUNCE=y+CONFIG_VIRT_TO_BUS=y+CONFIG_PROC_DEVICETREE=y+# CONFIG_CMDLINE_BOOL is not set+# CONFIG_PM is not set+# CONFIG_SECCOMP is not set+CONFIG_WANT_DEVICE_TREE=y+CONFIG_DEVICE_TREE="ep88xc.dts"+CONFIG_ISA_DMA_API=y++#+# Bus options+#+CONFIG_ZONE_DMA=y+CONFIG_FSL_SOC=y+# CONFIG_PCI is not set+# CONFIG_PCI_DOMAINS is not set+# CONFIG_PCI_SYSCALL is not set+# CONFIG_PCI_QSPAN is not set+# CONFIG_ARCH_SUPPORTS_MSI is not set++#+# PCCARD (PCMCIA/CardBus) support+#+# CONFIG_PCCARD is not set++#+# Advanced setup+#+# CONFIG_ADVANCED_OPTIONS is not set++#+# Default settings for advanced configuration options are used+#+CONFIG_HIGHMEM_START=0xfe000000+CONFIG_LOWMEM_SIZE=0x30000000+CONFIG_KERNEL_START=0xc0000000+CONFIG_TASK_SIZE=0x80000000+CONFIG_CONSISTENT_START=0xff100000+CONFIG_CONSISTENT_SIZE=0x00200000+CONFIG_BOOT_LOAD=0x00400000++#+# Networking+#+CONFIG_NET=y++#+# Networking options+#+CONFIG_PACKET=y+# CONFIG_PACKET_MMAP is not set+CONFIG_UNIX=y+# CONFIG_NET_KEY is not set+CONFIG_INET=y+CONFIG_IP_MULTICAST=y+# CONFIG_IP_ADVANCED_ROUTER is not set+CONFIG_IP_FIB_HASH=y+CONFIG_IP_PNP=y+# CONFIG_IP_PNP_DHCP is not set+# CONFIG_IP_PNP_BOOTP is not set+# CONFIG_IP_PNP_RARP is not set+# CONFIG_NET_IPIP is not set+# CONFIG_NET_IPGRE is not set+# CONFIG_IP_MROUTE is not set+# CONFIG_ARPD is not set+CONFIG_SYN_COOKIES=y+# CONFIG_INET_AH is not set+# CONFIG_INET_ESP is not set+# CONFIG_INET_IPCOMP is not set+# CONFIG_INET_XFRM_TUNNEL is not set+# CONFIG_INET_TUNNEL is not set+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set+# CONFIG_INET_XFRM_MODE_TUNNEL is not set+# CONFIG_INET_XFRM_MODE_BEET is not set+CONFIG_INET_DIAG=y+CONFIG_INET_TCP_DIAG=y+# CONFIG_TCP_CONG_ADVANCED is not set+CONFIG_TCP_CONG_CUBIC=y+CONFIG_DEFAULT_TCP_CONG="cubic"+# CONFIG_TCP_MD5SIG is not set+# CONFIG_IPV6 is not set+# CONFIG_INET6_XFRM_TUNNEL is not set+# CONFIG_INET6_TUNNEL is not set+# CONFIG_NETWORK_SECMARK is not set+# CONFIG_NETFILTER is not set+# CONFIG_IP_DCCP is not set+# CONFIG_IP_SCTP is not set+# CONFIG_TIPC is not set+# CONFIG_ATM is not set+# CONFIG_BRIDGE is not set+# CONFIG_VLAN_8021Q is not set+# CONFIG_DECNET is not set+# CONFIG_LLC2 is not set+# CONFIG_IPX is not set+# CONFIG_ATALK is not set+# CONFIG_X25 is not set+# CONFIG_LAPB is not set+# CONFIG_ECONET is not set+# CONFIG_WAN_ROUTER is not set++#+# QoS and/or fair queueing+#+# CONFIG_NET_SCHED is not set++#+# Network testing+#+# CONFIG_NET_PKTGEN is not set+# CONFIG_HAMRADIO is not set+# CONFIG_IRDA is not set+# CONFIG_BT is not set+# CONFIG_AF_RXRPC is not set++#+# Wireless+#+# CONFIG_CFG80211 is not set+# CONFIG_WIRELESS_EXT is not set+# CONFIG_MAC80211 is not set+# CONFIG_IEEE80211 is not set+# CONFIG_RFKILL is not set+# CONFIG_NET_9P is not set++#+# Device Drivers+#++#+# Generic Driver Options+#+CONFIG_STANDALONE=y+CONFIG_PREVENT_FIRMWARE_BUILD=y+# CONFIG_FW_LOADER is not set+# CONFIG_DEBUG_DRIVER is not set+# CONFIG_DEBUG_DEVRES is not set+# CONFIG_SYS_HYPERVISOR is not set+# CONFIG_CONNECTOR is not set+CONFIG_MTD=y+# CONFIG_MTD_DEBUG is not set+# CONFIG_MTD_CONCAT is not set+# CONFIG_MTD_PARTITIONS is not set++#+# User Modules And Translation Layers+#+CONFIG_MTD_CHAR=y+CONFIG_MTD_BLKDEVS=y+CONFIG_MTD_BLOCK=y+# CONFIG_FTL is not set+# CONFIG_NFTL is not set+# CONFIG_INFTL is not set+# CONFIG_RFD_FTL is not set+# CONFIG_SSFDC is not set++#+# RAM/ROM/Flash chip drivers+#+CONFIG_MTD_CFI=y+# CONFIG_MTD_JEDECPROBE is not set+CONFIG_MTD_GEN_PROBE=y+# CONFIG_MTD_CFI_ADV_OPTIONS is not set+CONFIG_MTD_MAP_BANK_WIDTH_1=y+CONFIG_MTD_MAP_BANK_WIDTH_2=y+CONFIG_MTD_MAP_BANK_WIDTH_4=y+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set+CONFIG_MTD_CFI_I1=y+CONFIG_MTD_CFI_I2=y+# CONFIG_MTD_CFI_I4 is not set+# CONFIG_MTD_CFI_I8 is not set+# CONFIG_MTD_CFI_INTELEXT is not set+CONFIG_MTD_CFI_AMDSTD=y+# CONFIG_MTD_CFI_STAA is not set+CONFIG_MTD_CFI_UTIL=y+# CONFIG_MTD_RAM is not set+# CONFIG_MTD_ROM is not set+# CONFIG_MTD_ABSENT is not set++#+# Mapping drivers for chip access+#+# CONFIG_MTD_COMPLEX_MAPPINGS is not set+# CONFIG_MTD_PHYSMAP is not set+CONFIG_MTD_PHYSMAP_OF=y+# CONFIG_MTD_CFI_FLAGADM is not set+# CONFIG_MTD_PLATRAM is not set++#+# Self-contained MTD device drivers+#+# CONFIG_MTD_SLRAM is not set+# CONFIG_MTD_PHRAM is not set+# CONFIG_MTD_MTDRAM is not set+# CONFIG_MTD_BLOCK2MTD is not set++#+# Disk-On-Chip Device Drivers+#+# CONFIG_MTD_DOC2000 is not set+# CONFIG_MTD_DOC2001 is not set+# CONFIG_MTD_DOC2001PLUS is not set+# CONFIG_MTD_NAND is not set+# CONFIG_MTD_ONENAND is not set++#+# UBI - Unsorted block images+#+# CONFIG_MTD_UBI is not set+CONFIG_OF_DEVICE=y+# CONFIG_PARPORT is not set+# CONFIG_BLK_DEV is not set+# CONFIG_MISC_DEVICES is not set+# CONFIG_IDE is not set++#+# SCSI device support+#+# CONFIG_RAID_ATTRS is not set+# CONFIG_SCSI is not set+# CONFIG_SCSI_DMA is not set+# CONFIG_SCSI_NETLINK is not set+# CONFIG_ATA is not set+# CONFIG_MD is not set+# CONFIG_MACINTOSH_DRIVERS is not set+CONFIG_NETDEVICES=y+# CONFIG_NETDEVICES_MULTIQUEUE is not set+# CONFIG_DUMMY is not set+# CONFIG_BONDING is not set+# CONFIG_MACVLAN is not set+# CONFIG_EQUALIZER is not set+# CONFIG_TUN is not set+CONFIG_PHYLIB=y++#+# MII PHY device drivers+#+# CONFIG_MARVELL_PHY is not set+# CONFIG_DAVI COM_PHY is not set+# CONFIG_QSEMI_PHY is not set+CONFIG_LXT_PHY=y+# CONFIG_CICADA_PHY is not set+# CONFIG_VITESSE_PHY is not set+# CONFIG_SMSC_PHY is not set+# CONFIG_BROADCOM_PHY is not set+# CONFIG_ICPLUS_PHY is not set+# CONFIG_FIXED_PHY is not set+# CONFIG_MDIO_BITBANG is not set+CONFIG_NET_ETHERNET=y+CONFIG_MII=y+CONFIG_FS_ENET=y+# CONFIG_FS_ENET_HAS_SCC is not set+CONFIG_FS_ENET_HAS_FEC=y+# CONFIG_NETDEV_1000 is not set+# CONFIG_NETDEV_10000 is not set++#+# Wireless LAN+#+# CONFIG_WLAN_PRE80211 is not set+# CONFIG_WLAN_80211 is not set+# CONFIG_WAN is not set+# CONFIG_PPP is not set+# CONFIG_SLIP is not set+# CONFIG_SHAPER is not set+# CONFIG_NETCONSOLE is not set+# CONFIG_NETPOLL is not set+# CONFIG_NET_POLL_CONTROLLER is not set+# CONFIG_ISDN is not set+# CONFIG_PHONE is not set++#+# Input device support+#+# CONFIG_INPUT is not set++#+# Hardware I/O ports+#+# CONFIG_SERIO is not set+# CONFIG_GAMEPORT is not set++#+# Character devices+#+# CONFIG_VT is not set+# CONFIG_SERIAL_NONSTANDARD is not set++#+# Serial drivers+#+# CONFIG_SERIAL_8250 is not set++#+# Non-8250 serial port support+#+# CONFIG_SERIAL_UARTLITE is not set+CONFIG_SERIAL_CORE=y+CONFIG_SERIAL_CORE_CONSOLE=y+CONFIG_SERIAL_CPM=y+CONFIG_SERIAL_CPM_CONSOLE=y+# CONFIG_SERIAL_CPM_SCC1 is not set+# CONFIG_SERIAL_CPM_SCC2 is not set+# CONFIG_SERIAL_CPM_SCC3 is not set+# CONFIG_SERIAL_CPM_SCC4 is not set+CONFIG_SERIAL_CPM_SMC1=y+CONFIG_SERIAL_CPM_SMC2=y+CONFIG_UNIX98_PTYS=y+# CONFIG_LEGACY_PTYS is not set+# CONFIG_IPMI_HANDLER is not set+# CONFIG_WATCHDOG is not set+CONFIG_HW_RANDOM=y+# CONFIG_NVRAM is not set+CONFIG_GEN_RTC=y+# CONFIG_GEN_RTC_X is not set+# CONFIG_R3964 is not set+# CONFIG_RAW_DRIVER is not set+# CONFIG_TCG_TPM is not set+# CONFIG_I2C is not set++#+# SPI support+#+# CONFIG_SPI is not set+# CONFIG_SPI_MASTER is not set+# CONFIG_W1 is not set+# CONFIG_POWER_SUPPLY is not set+# CONFIG_HWMON is not set++#+# Multifunction device drivers+#+# CONFIG_MFD_SM501 is not set++#+# Multimedia devices+#+# CONFIG_VIDEO_DEV is not set+# CONFIG_DVB_CORE is not set+CONFIG_DAB=y++#+# Graphics support+#+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set++#+# Display device support+#+# CONFIG_DISPLAY_SUPPORT is not set+# CONFIG_VGASTATE is not set+# CONFIG_VIDEO_OUTPUT_CONTROL is not set+# CONFIG_FB is not set+# CONFIG_FB_IBM_GXT4500 is not set++#+# Sound+#+# CONFIG_SOUND is not set+# CONFIG_USB_SUPPORT is not set+# CONFIG_MMC is not set+# CONFIG_NEW_LEDS is not set+# CONFIG_EDAC is not set+# CONFIG_RTC_CLASS is not set++#+# DMA Engine support+#+# CONFIG_DMA_ENGINE is not set++#+# DMA Clients+#++#+# DMA Devices+#++#+# Userspace I/O+#+# CONFIG_UIO is not set++#+# File systems+#+# CONFIG_EXT2_FS is not set+# CONFIG_EXT3_FS is not set+# CONFIG_EXT4DEV_FS is not set+# CONFIG_REISERFS_FS is not set+# CONFIG_JFS_FS is not set+# CONFIG_FS_POSIX_ACL is not set+# CONFIG_XFS_FS is not set+# CONFIG_GFS2_FS is not set+# CONFIG_OCFS2_FS is not set+# CONFIG_MINIX_FS is not set+# CONFIG_ROMFS_FS is not set+# CONFIG_INOTIFY is not set+# CONFIG_QUOTA is not set+# CONFIG_DNOTIFY is not set+# CONFIG_AUTOFS_FS is not set+# CONFIG_AUTOFS4_FS is not set+# CONFIG_FUSE_FS is not set++#+# CD-ROM/DVD Filesystems+#+# CONFIG_ISO9660_FS is not set+# CONFIG_UDF_FS is not set++#+# DOS/FAT/NT Filesystems+#+# CONFIG_MSDOS_FS is not set+# CONFIG_VFAT_FS is not set+# CONFIG_NTFS_FS is not set++#+# Pseudo filesystems+#+CONFIG_PROC_FS=y+# CONFIG_PROC_KCORE is not set+CONFIG_PROC_SYSCTL=y+CONFIG_SYSFS=y+CONFIG_TMPFS=y+# CONFIG_TMPFS_POSIX_ACL is not set+# CONFIG_HUGETLB_PAGE is not set+CONFIG_RAMFS=y+# CONFIG_CONFIGFS_FS is not set++#+# Miscellaneous filesystems+#+# CONFIG_ADFS_FS is not set+# CONFIG_AFFS_FS is not set+# CONFIG_HFS_FS is not set+# CONFIG_HFSPLUS_FS is not set+# CONFIG_BEFS_FS is not set+# CONFIG_BFS_FS is not set+# CONFIG_EFS_FS is not set+# CONFIG_JFFS2_FS is not set+CONFIG_CRAMFS=y+# CONFIG_VXFS_FS is not set+# CONFIG_HPFS_FS is not set+# CONFIG_QNX4FS_FS is not set+# CONFIG_SYSV_FS is not set+# CONFIG_UFS_FS is not set++#+# Network File Systems+#+CONFIG_NFS_FS=y+CONFIG_NFS_V3=y+# CONFIG_NFS_V3_ACL is not set+# CONFIG_NFS_V4 is not set+# CONFIG_NFS_DIRECTIO is not set+# CONFIG_NFSD is not set+CONFIG_ROOT_NFS=y+CONFIG_LOCKD=y+CONFIG_LOCKD_V4=y+CONFIG_NFS_COMMON=y+CONFIG_SUNRPC=y+# CONFIG_SUNRPC_BIND34 is not set+# CONFIG_RPCSEC_GSS_KRB5 is not set+# CONFIG_RPCSEC_GSS_SPKM3 is not set+# CONFIG_SMB_FS is not set+# CONFIG_CIFS is not set+# CONFIG_NCP_FS is not set+# CONFIG_CODA_FS is not set+# CONFIG_AFS_FS is not set++#+# Partition Types+#+CONFIG_PARTITION_ADVANCED=y+# CONFIG_ACORN_PARTITION is not set+# CONFIG_OSF_PARTITION is not set+# CONFIG_AMIGA_PARTITION is not set+# CONFIG_ATARI_PARTITION is not set+# CONFIG_MAC_PARTITION is not set+CONFIG_MSDOS_PARTITION=y+# CONFIG_BSD_DISKLABEL is not set+# CONFIG_MINIX_SUBPARTITION is not set+# CONFIG_SOLARIS_X86_PARTITION is not set+# CONFIG_UNIXWARE_DISKLABEL is not set+# CONFIG_LDM_PARTITION is not set+# CONFIG_SGI_PARTITION is not set+# CONFIG_ULTRIX_PARTITION is not set+# CONFIG_SUN_PARTITION is not set+# CONFIG_KARMA_PARTITION is not set+# CONFIG_EFI_PARTITION is not set+# CONFIG_SYSV68_PARTITION is not set++#+# Native Language Support+#+# CONFIG_NLS is not set++#+# Distributed Lock Manager+#+# CONFIG_DLM is not set+# CONFIG_UCC_SLOW is not set++#+# Library routines+#+# CONFIG_CRC_CCITT is not set+# CONFIG_CRC16 is not set+# CONFIG_CRC_ITU_T is not set+# CONFIG_CRC32 is not set+# CONFIG_CRC7 is not set+# CONFIG_LIBCRC32C is not set+CONFIG_ZLIB_INFLATE=y+CONFIG_HAS_IOMEM=y+CONFIG_HAS_IOPORT=y+CONFIG_HAS_DMA=y++#+# Instrumentation Support+#+# CONFIG_PROFILING is not set++#+# Kernel hacking+#+# CONFIG_PRINTK_TIME is not set+CONFIG_ENABLE_MUST_CHECK=y+CONFIG_MAGIC_SYSRQ=y+# CONFIG_UNUSED_SYMBOLS is not set+# CONFIG_DEBUG_FS is not set+# CONFIG_HEADERS_CHECK is not set+CONFIG_DEBUG_KERNEL=y+# CONFIG_DEBUG_SHIRQ is not set+CONFIG_DETECT_SOFTLOCKUP=y+CONFIG_SCHED_DEBUG=y+# CONFIG_SCHEDSTATS is not set+# CONFIG_TIMER_STATS is not set+# CONFIG_SLUB_DEBUG_ON is not set+# CONFIG_DEBUG_SPINLOCK is not set+# CONFIG_DEBUG_MUTEXES is not set+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set+# CONFIG_DEBUG_KOBJECT is not set+CONFIG_DEBUG_BUGVERBOSE=y+CONFIG_DEBUG_INFO=y+# CONFIG_DEBUG_VM is not set+# CONFIG_DEBUG_LIST is not set+CONFIG_FORCED_INLINING=y+# CONFIG_FAULT_INJECTION is not set+# CONFIG_DEBUG_STACKOVERFLOW is not set+# CONFIG_DEBUG_STACK_USAGE is not set+# CONFIG_DEBUG_PAGEALLOC is not set+# CONFIG_DEBUGGER is not set+# CONFIG_BDI_SWITCH is not set+# CONFIG_PPC_EARLY_DEBUG is not set++#+# Security options+#+# CONFIG_KEYS is not set+# CONFIG_SECURITY is not set+# CONFIG_CRYPTO is not set
@@ -0,0 +1,802 @@+#+# Automatically generated make config: don't edit+# Linux kernel version: 2.6.23-rc3+# Thu Aug 23 13:51:46 2007+#+# CONFIG_PPC64 is not set++#+# Processor support+#+# CONFIG_6xx is not set+# CONFIG_PPC_85xx is not set+CONFIG_PPC_8xx=y+# CONFIG_40x is not set+# CONFIG_44x is not set+# CONFIG_E200 is not set+CONFIG_8xx=y+# CONFIG_PPC_MM_SLICES is not set+CONFIG_NOT_COHERENT_CACHE=y+CONFIG_PPC32=y+CONFIG_PPC_MERGE=y+CONFIG_MMU=y+CONFIG_GENERIC_HARDIRQS=y+CONFIG_IRQ_PER_CPU=y+CONFIG_RWSEM_XCHGADD_ALGORITHM=y+CONFIG_ARCH_HAS_ILOG2_U32=y+CONFIG_GENERIC_HWEIGHT=y+CONFIG_GENERIC_CALIBRATE_DELAY=y+CONFIG_GENERIC_FIND_NEXT_BIT=y+# CONFIG_ARCH_NO_VIRT_TO_BUS is not set+CONFIG_PPC=y+CONFIG_EARLY_PRINTK=y+CONFIG_GENERIC_NVRAM=y+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y+CONFIG_ARCH_MAY_HAVE_PC_FDC=y+CONFIG_PPC_OF=y+CONFIG_OF=y+# CONFIG_PPC_UDBG_16550 is not set+# CONFIG_GENERIC_TBSYNC is not set+CONFIG_AUDIT_ARCH=y+CONFIG_GENERIC_BUG=y+# CONFIG_DEFAULT_UIMAGE is not set+# CONFIG_PPC_DCR_NATIVE is not set+# CONFIG_PPC_DCR_MMIO is not set+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"++#+# General setup+#+CONFIG_EXPERIMENTAL=y+CONFIG_BROKEN_ON_SMP=y+CONFIG_INIT_ENV_ARG_LIMIT=32+CONFIG_LOCALVERSION=""+CONFIG_LOCALVERSION_AUTO=y+# CONFIG_SWAP is not set+CONFIG_SYSVIPC=y+CONFIG_SYSVIPC_SYSCTL=y+# CONFIG_POSIX_MQUEUE is not set+# CONFIG_BSD_PROCESS_ACCT is not set+# CONFIG_TASKSTATS is not set+# CONFIG_USER_NS is not set+# CONFIG_AUDIT is not set+# CONFIG_IKCONFIG is not set+CONFIG_LOG_BUF_SHIFT=14+CONFIG_SYSFS_DEPRECATED=y+# CONFIG_RELAY is not set+# CONFIG_BLK_DEV_INITRD is not set+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set+CONFIG_SYSCTL=y+CONFIG_EMBEDDED=y+# CONFIG_SYSCTL_SYSCALL is not set+CONFIG_KALLSYMS=y+# CONFIG_KALLSYMS_ALL is not set+# CONFIG_KALLSYMS_EXTRA_PASS is not set+CONFIG_HOTPLUG=y+CONFIG_PRINTK=y+CONFIG_BUG=y+# CONFIG_ELF_CORE is not set+# CONFIG_BASE_FULL is not set+# CONFIG_FUTEX is not set+CONFIG_ANON_INODES=y+CONFIG_EPOLL=y+CONFIG_SIGNALFD=y+CONFIG_TIMERFD=y+CONFIG_EVENTFD=y+CONFIG_SHMEM=y+# CONFIG_VM_EVENT_COUNTERS is not set+CONFIG_SLUB_DEBUG=y+# CONFIG_SLAB is not set+CONFIG_SLUB=y+# CONFIG_SLOB is not set+# CONFIG_TINY_SHMEM is not set+CONFIG_BASE_SMALL=1+# CONFIG_MODULES is not set+CONFIG_BLOCK=y+# CONFIG_LBD is not set+# CONFIG_BLK_DEV_IO_TRACE is not set+# CONFIG_LSF is not set+# CONFIG_BLK_DEV_BSG is not set++#+# IO Schedulers+#+CONFIG_IOSCHED_NOOP=y+# CONFIG_IOSCHED_AS is not set+CONFIG_IOSCHED_DEADLINE=y+# CONFIG_IOSCHED_CFQ is not set+# CONFIG_DEFAULT_AS is not set+CONFIG_DEFAULT_DEADLINE=y+# CONFIG_DEFAULT_CFQ is not set+# CONFIG_DEFAULT_NOOP is not set+CONFIG_DEFAULT_IOSCHED="deadline"++#+# Platform support+#+# CONFIG_PPC_MPC52xx is not set+# CONFIG_PPC_MPC5200 is not set+# CONFIG_PPC_CELL is not set+# CONFIG_PPC_CELL_NATIVE is not set+CONFIG_CPM1=y+# CONFIG_MPC8XXFADS is not set+# CONFIG_MPC86XADS is not set+# CONFIG_MPC885ADS is not set+# CONFIG_PPC_EP88XC is not set+CONFIG_PPC_ADDER875=y++#+# MPC8xx CPM Options+#++#+# Generic MPC8xx Options+#+CONFIG_8xx_COPYBACK=y+# CONFIG_8xx_CPU6 is not set+CONFIG_8xx_CPU15=y+CONFIG_NO_UCODE_PATCH=y+# CONFIG_USB_SOF_UCODE_PATCH is not set+# CONFIG_I2C_SPI_UCODE_PATCH is not set+# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set+# CONFIG_PQ2ADS is not set+# CONFIG_MPIC is not set+# CONFIG_MPIC_WEIRD is not set+# CONFIG_PPC_I8259 is not set+# CONFIG_PPC_RTAS is not set+# CONFIG_MMIO_NVRAM is not set+# CONFIG_PPC_MPC106 is not set+# CONFIG_PPC_970_NAP is not set+# CONFIG_PPC_INDIRECT_IO is not set+# CONFIG_GENERIC_IOMAP is not set+# CONFIG_CPU_FREQ is not set+# CONFIG_CPM2 is not set+CONFIG_PPC_CPM_NEW_BINDING=y++#+# Kernel options+#+# CONFIG_HIGHMEM is not set+# CONFIG_HZ_100 is not set+# CONFIG_HZ_250 is not set+# CONFIG_HZ_300 is not set+CONFIG_HZ_1000=y+CONFIG_HZ=1000+CONFIG_PREEMPT_NONE=y+# CONFIG_PREEMPT_VOLUNTARY is not set+# CONFIG_PREEMPT is not set+CONFIG_BINFMT_ELF=y+# CONFIG_BINFMT_MISC is not set+# CONFIG_MATH_EMULATION is not set+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y+CONFIG_ARCH_FLATMEM_ENABLE=y+CONFIG_ARCH_POPULATES_NODE_MAP=y+CONFIG_SELECT_MEMORY_MODEL=y+CONFIG_FLATMEM_MANUAL=y+# CONFIG_DISCONTIGMEM_MANUAL is not set+# CONFIG_SPARSEMEM_MANUAL is not set+CONFIG_FLATMEM=y+CONFIG_FLAT_NODE_MEM_MAP=y+# CONFIG_SPARSEMEM_STATIC is not set+CONFIG_SPLIT_PTLOCK_CPUS=4+# CONFIG_RESOURCES_64BIT is not set+CONFIG_ZONE_DMA_FLAG=1+CONFIG_BOUNCE=y+CONFIG_VIRT_TO_BUS=y+# CONFIG_PROC_DEVICETREE is not set+# CONFIG_CMDLINE_BOOL is not set+# CONFIG_PM is not set+# CONFIG_SECCOMP is not set+CONFIG_WANT_DEVICE_TREE=y+CONFIG_DEVICE_TREE="adder875.dts"+CONFIG_ISA_DMA_API=y++#+# Bus options+#+CONFIG_ZONE_DMA=y+CONFIG_FSL_SOC=y+# CONFIG_PCI is not set+# CONFIG_PCI_DOMAINS is not set+# CONFIG_PCI_SYSCALL is not set+# CONFIG_PCI_QSPAN is not set+# CONFIG_ARCH_SUPPORTS_MSI is not set++#+# PCCARD (PCMCIA/CardBus) support+#+# CONFIG_PCCARD is not set++#+# Advanced setup+#+# CONFIG_ADVANCED_OPTIONS is not set++#+# Default settings for advanced configuration options are used+#+CONFIG_HIGHMEM_START=0xfe000000+CONFIG_LOWMEM_SIZE=0x30000000+CONFIG_KERNEL_START=0xc0000000+CONFIG_TASK_SIZE=0x80000000+CONFIG_CONSISTENT_START=0xff100000+CONFIG_CONSISTENT_SIZE=0x00200000+CONFIG_BOOT_LOAD=0x00400000++#+# Networking+#+CONFIG_NET=y++#+# Networking options+#+CONFIG_PACKET=y+# CONFIG_PACKET_MMAP is not set+CONFIG_UNIX=y+# CONFIG_NET_KEY is not set+CONFIG_INET=y+CONFIG_IP_MULTICAST=y+# CONFIG_IP_ADVANCED_ROUTER is not set+CONFIG_IP_FIB_HASH=y+CONFIG_IP_PNP=y+# CONFIG_IP_PNP_DHCP is not set+# CONFIG_IP_PNP_BOOTP is not set+# CONFIG_IP_PNP_RARP is not set+# CONFIG_NET_IPIP is not set+# CONFIG_NET_IPGRE is not set+# CONFIG_IP_MROUTE is not set+# CONFIG_ARPD is not set+CONFIG_SYN_COOKIES=y+# CONFIG_INET_AH is not set+# CONFIG_INET_ESP is not set+# CONFIG_INET_IPCOMP is not set+# CONFIG_INET_XFRM_TUNNEL is not set+# CONFIG_INET_TUNNEL is not set+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set+# CONFIG_INET_XFRM_MODE_TUNNEL is not set+# CONFIG_INET_XFRM_MODE_BEET is not set+CONFIG_INET_DIAG=y+CONFIG_INET_TCP_DIAG=y+# CONFIG_TCP_CONG_ADVANCED is not set+CONFIG_TCP_CONG_CUBIC=y+CONFIG_DEFAULT_TCP_CONG="cubic"+# CONFIG_TCP_MD5SIG is not set+# CONFIG_IPV6 is not set+# CONFIG_INET6_XFRM_TUNNEL is not set+# CONFIG_INET6_TUNNEL is not set+# CONFIG_NETWORK_SECMARK is not set+# CONFIG_NETFILTER is not set+# CONFIG_IP_DCCP is not set+# CONFIG_IP_SCTP is not set+# CONFIG_TIPC is not set+# CONFIG_ATM is not set+# CONFIG_BRIDGE is not set+# CONFIG_VLAN_8021Q is not set+# CONFIG_DECNET is not set+# CONFIG_LLC2 is not set+# CONFIG_IPX is not set+# CONFIG_ATALK is not set+# CONFIG_X25 is not set+# CONFIG_LAPB is not set+# CONFIG_ECONET is not set+# CONFIG_WAN_ROUTER is not set++#+# QoS and/or fair queueing+#+# CONFIG_NET_SCHED is not set++#+# Network testing+#+# CONFIG_NET_PKTGEN is not set+# CONFIG_HAMRADIO is not set+# CONFIG_IRDA is not set+# CONFIG_BT is not set+# CONFIG_AF_RXRPC is not set++#+# Wireless+#+# CONFIG_CFG80211 is not set+# CONFIG_WIRELESS_EXT is not set+# CONFIG_MAC80211 is not set+# CONFIG_IEEE80211 is not set+# CONFIG_RFKILL is not set+# CONFIG_NET_9P is not set++#+# Device Drivers+#++#+# Generic Driver Options+#+CONFIG_STANDALONE=y+CONFIG_PREVENT_FIRMWARE_BUILD=y+# CONFIG_FW_LOADER is not set+# CONFIG_DEBUG_DRIVER is not set+# CONFIG_DEBUG_DEVRES is not set+# CONFIG_SYS_HYPERVISOR is not set+# CONFIG_CONNECTOR is not set+CONFIG_MTD=y+# CONFIG_MTD_DEBUG is not set+# CONFIG_MTD_CONCAT is not set+# CONFIG_MTD_PARTITIONS is not set++#+# User Modules And Translation Layers+#+CONFIG_MTD_CHAR=y+CONFIG_MTD_BLKDEVS=y+CONFIG_MTD_BLOCK=y+# CONFIG_FTL is not set+# CONFIG_NFTL is not set+# CONFIG_INFTL is not set+# CONFIG_RFD_FTL is not set+# CONFIG_SSFDC is not set++#+# RAM/ROM/Flash chip drivers+#+CONFIG_MTD_CFI=y+# CONFIG_MTD_JEDECPROBE is not set+CONFIG_MTD_GEN_PROBE=y+# CONFIG_MTD_CFI_ADV_OPTIONS is not set+CONFIG_MTD_MAP_BANK_WIDTH_1=y+CONFIG_MTD_MAP_BANK_WIDTH_2=y+CONFIG_MTD_MAP_BANK_WIDTH_4=y+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set+CONFIG_MTD_CFI_I1=y+CONFIG_MTD_CFI_I2=y+# CONFIG_MTD_CFI_I4 is not set+# CONFIG_MTD_CFI_I8 is not set+# CONFIG_MTD_CFI_INTELEXT is not set+CONFIG_MTD_CFI_AMDSTD=y+# CONFIG_MTD_CFI_STAA is not set+CONFIG_MTD_CFI_UTIL=y+# CONFIG_MTD_RAM is not set+# CONFIG_MTD_ROM is not set+# CONFIG_MTD_ABSENT is not set++#+# Mapping drivers for chip access+#+# CONFIG_MTD_COMPLEX_MAPPINGS is not set+# CONFIG_MTD_PHYSMAP is not set+CONFIG_MTD_PHYSMAP_OF=y+# CONFIG_MTD_CFI_FLAGADM is not set+# CONFIG_MTD_PLATRAM is not set++#+# Self-contained MTD device drivers+#+# CONFIG_MTD_SLRAM is not set+# CONFIG_MTD_PHRAM is not set+# CONFIG_MTD_MTDRAM is not set+# CONFIG_MTD_BLOCK2MTD is not set++#+# Disk-On-Chip Device Drivers+#+# CONFIG_MTD_DOC2000 is not set+# CONFIG_MTD_DOC2001 is not set+# CONFIG_MTD_DOC2001PLUS is not set+# CONFIG_MTD_NAND is not set+# CONFIG_MTD_ONENAND is not set++#+# UBI - Unsorted block images+#+# CONFIG_MTD_UBI is not set+CONFIG_OF_DEVICE=y+# CONFIG_PARPORT is not set+# CONFIG_BLK_DEV is not set+# CONFIG_MISC_DEVICES is not set+# CONFIG_IDE is not set++#+# SCSI device support+#+# CONFIG_RAID_ATTRS is not set+# CONFIG_SCSI is not set+# CONFIG_SCSI_DMA is not set+# CONFIG_SCSI_NETLINK is not set+# CONFIG_ATA is not set+# CONFIG_MD is not set+# CONFIG_MACINTOSH_DRIVERS is not set+CONFIG_NETDEVICES=y+# CONFIG_NETDEVICES_MULTIQUEUE is not set+# CONFIG_DUMMY is not set+# CONFIG_BONDING is not set+# CONFIG_MACVLAN is not set+# CONFIG_EQUALIZER is not set+# CONFIG_TUN is not set+CONFIG_PHYLIB=y++#+# MII PHY device drivers+#+# CONFIG_MARVELL_PHY is not set+CONFIG_DAVICOM_PHY=y+# CONFIG_QSEMI_PHY is not set+# CONFIG_LXT_PHY is not set+# CONFIG_CICADA_PHY is not set+# CONFIG_VITESSE_PHY is not set+# CONFIG_SMSC_PHY is not set+# CONFIG_BROADCOM_PHY is not set+# CONFIG_ICPLUS_PHY is not set+# CONFIG_FIXED_PHY is not set+# CONFIG_MDIO_BITBANG is not set+CONFIG_NET_ETHERNET=y+CONFIG_MII=y+CONFIG_FS_ENET=y+# CONFIG_FS_ENET_HAS_SCC is not set+CONFIG_FS_ENET_HAS_FEC=y+# CONFIG_NETDEV_1000 is not set+# CONFIG_NETDEV_10000 is not set++#+# Wireless LAN+#+# CONFIG_WLAN_PRE80211 is not set+# CONFIG_WLAN_80211 is not set+# CONFIG_WAN is not set+# CONFIG_PPP is not set+# CONFIG_SLIP is not set+# CONFIG_SHAPER is not set+# CONFIG_NETCONSOLE is not set+# CONFIG_NETPOLL is not set+# CONFIG_NET_POLL_CONTROLLER is not set+# CONFIG_ISDN is not set+# CONFIG_PHONE is not set++#+# Input device support+#+CONFIG_INPUT=y+# CONFIG_INPUT_FF_MEMLESS is not set+# CONFIG_INPUT_POLLDEV is not set++#+# Userland interfaces+#+CONFIG_INPUT_MOUSEDEV=y+CONFIG_INPUT_MOUSEDEV_PSAUX=y+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768+# CONFIG_INPUT_JOYDEV is not set+# CONFIG_INPUT_TSDEV is not set+# CONFIG_INPUT_EVDEV is not set+# CONFIG_INPUT_EVBUG is not set++#+# Input Device Drivers+#+CONFIG_INPUT_KEYBOARD=y+CONFIG_KEYBOARD_ATKBD=y+# CONFIG_KEYBOARD_SUNKBD is not set+# CONFIG_KEYBOARD_LKKBD is not set+# CONFIG_KEYBOARD_XTKBD is not set+# CONFIG_KEYBOARD_NEWTON is not set+# CONFIG_KEYBOARD_STOWAWAY is not set+CONFIG_INPUT_MOUSE=y+CONFIG_MOUSE_PS2=y+CONFIG_MOUSE_PS2_ALPS=y+CONFIG_MOUSE_PS2_LOGIPS2PP=y+CONFIG_MOUSE_PS2_SYNAPTICS=y+CONFIG_MOUSE_PS2_LIFEBOOK=y+CONFIG_MOUSE_PS2_TRACKPOINT=y+# CONFIG_MOUSE_PS2_TOUCHKIT is not set+# CONFIG_MOUSE_SERIAL is not set+# CONFIG_MOUSE_VSXXXAA is not set+# CONFIG_INPUT_JOYSTICK is not set+# CONFIG_INPUT_TABLET is not set+# CONFIG_INPUT_TOUCHSCREEN is not set+# CONFIG_INPUT_MISC is not set++#+# Hardware I/O ports+#+CONFIG_SERIO=y+CONFIG_SERIO_I8042=y+CONFIG_SERIO_SERPORT=y+CONFIG_SERIO_LIBPS2=y+# CONFIG_SERIO_RAW is not set+# CONFIG_GAMEPORT is not set++#+# Character devices+#+# CONFIG_VT is not set+# CONFIG_SERIAL_NONSTANDARD is not set++#+# Serial drivers+#+# CONFIG_SERIAL_8250 is not set++#+# Non-8250 serial port support+#+# CONFIG_SERIAL_UARTLITE is not set+CONFIG_SERIAL_CORE=y+CONFIG_SERIAL_CORE_CONSOLE=y+CONFIG_SERIAL_CPM=y+CONFIG_SERIAL_CPM_CONSOLE=y+# CONFIG_SERIAL_CPM_SCC1 is not set+# CONFIG_SERIAL_CPM_SCC2 is not set+# CONFIG_SERIAL_CPM_SCC3 is not set+# CONFIG_SERIAL_CPM_SCC4 is not set+CONFIG_SERIAL_CPM_SMC1=y+CONFIG_SERIAL_CPM_SMC2=y+CONFIG_UNIX98_PTYS=y+# CONFIG_LEGACY_PTYS is not set+# CONFIG_IPMI_HANDLER is not set+# CONFIG_WATCHDOG is not set+CONFIG_HW_RANDOM=y+# CONFIG_NVRAM is not set+CONFIG_GEN_RTC=y+# CONFIG_GEN_RTC_X is not set+# CONFIG_R3964 is not set+# CONFIG_RAW_DRIVER is not set+# CONFIG_TCG_TPM is not set+# CONFIG_I2C is not set++#+# SPI support+#+# CONFIG_SPI is not set+# CONFIG_SPI_MASTER is not set+# CONFIG_W1 is not set+# CONFIG_POWER_SUPPLY is not set+# CONFIG_HWMON is not set++#+# Multifunction device drivers+#+# CONFIG_MFD_SM501 is not set++#+# Multimedia devices+#+# CONFIG_VIDEO_DEV is not set+# CONFIG_DVB_CORE is not set+CONFIG_DAB=y++#+# Graphics support+#+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set++#+# Display device support+#+# CONFIG_DISPLAY_SUPPORT is not set+# CONFIG_VGASTATE is not set+CONFIG_VIDEO_OUTPUT_CONTROL=y+# CONFIG_FB is not set+# CONFIG_FB_IBM_GXT4500 is not set++#+# Sound+#+# CONFIG_SOUND is not set+# CONFIG_HID_SUPPORT is not set+# CONFIG_USB_SUPPORT is not set+# CONFIG_MMC is not set+# CONFIG_NEW_LEDS is not set+# CONFIG_EDAC is not set+# CONFIG_RTC_CLASS is not set++#+# DMA Engine support+#+# CONFIG_DMA_ENGINE is not set++#+# DMA Clients+#++#+# DMA Devices+#++#+# Userspace I/O+#+# CONFIG_UIO is not set++#+# File systems+#+# CONFIG_EXT2_FS is not set+# CONFIG_EXT3_FS is not set+# CONFIG_EXT4DEV_FS is not set+# CONFIG_REISERFS_FS is not set+# CONFIG_JFS_FS is not set+# CONFIG_FS_POSIX_ACL is not set+# CONFIG_XFS_FS is not set+# CONFIG_GFS2_FS is not set+# CONFIG_OCFS2_FS is not set+# CONFIG_MINIX_FS is not set+# CONFIG_ROMFS_FS is not set+# CONFIG_INOTIFY is not set+# CONFIG_QUOTA is not set+# CONFIG_DNOTIFY is not set+# CONFIG_AUTOFS_FS is not set+# CONFIG_AUTOFS4_FS is not set+# CONFIG_FUSE_FS is not set++#+# CD-ROM/DVD Filesystems+#+# CONFIG_ISO9660_FS is not set+# CONFIG_UDF_FS is not set++#+# DOS/FAT/NT Filesystems+#+# CONFIG_MSDOS_FS is not set+# CONFIG_VFAT_FS is not set+# CONFIG_NTFS_FS is not set++#+# Pseudo filesystems+#+CONFIG_PROC_FS=y+# CONFIG_PROC_KCORE is not set+CONFIG_PROC_SYSCTL=y+CONFIG_SYSFS=y+CONFIG_TMPFS=y+# CONFIG_TMPFS_POSIX_ACL is not set+# CONFIG_HUGETLB_PAGE is not set+CONFIG_RAMFS=y+# CONFIG_CONFIGFS_FS is not set++#+# Miscellaneous filesystems+#+# CONFIG_ADFS_FS is not set+# CONFIG_AFFS_FS is not set+# CONFIG_HFS_FS is not set+# CONFIG_HFSPLUS_FS is not set+# CONFIG_BEFS_FS is not set+# CONFIG_BFS_FS is not set+# CONFIG_EFS_FS is not set+# CONFIG_JFFS2_FS is not set+CONFIG_CRAMFS=y+# CONFIG_VXFS_FS is not set+# CONFIG_HPFS_FS is not set+# CONFIG_QNX4FS_FS is not set+# CONFIG_SYSV_FS is not set+# CONFIG_UFS_FS is not set++#+# Network File Systems+#+CONFIG_NFS_FS=y+CONFIG_NFS_V3=y+# CONFIG_NFS_V3_ACL is not set+# CONFIG_NFS_V4 is not set+# CONFIG_NFS_DIRECTIO is not set+# CONFIG_NFSD is not set+CONFIG_ROOT_NFS=y+CONFIG_LOCKD=y+CONFIG_LOCKD_V4=y+CONFIG_NFS_COMMON=y+CONFIG_SUNRPC=y+# CONFIG_SUNRPC_BIND34 is not set+# CONFIG_RPCSEC_GSS_KRB5 is not set+# CONFIG_RPCSEC_GSS_SPKM3 is not set+# CONFIG_SMB_FS is not set+# CONFIG_CIFS is not set+# CONFIG_NCP_FS is not set+# CONFIG_CODA_FS is not set+# CONFIG_AFS_FS is not set++#+# Partition Types+#+CONFIG_PARTITION_ADVANCED=y+# CONFIG_ACORN_PARTITION is not set+# CONFIG_OSF_PARTITION is not set+# CONFIG_AMIGA_PARTITION is not set+# CONFIG_ATARI_PARTITION is not set+# CONFIG_MAC_PARTITION is not set+CONFIG_MSDOS_PARTITION=y+# CONFIG_BSD_DISKLABEL is not set+# CONFIG_MINIX_SUBPARTITION is not set+# CONFIG_SOLARIS_X86_PARTITION is not set+# CONFIG_UNIXWARE_DISKLABEL is not set+# CONFIG_LDM_PARTITION is not set+# CONFIG_SGI_PARTITION is not set+# CONFIG_ULTRIX_PARTITION is not set+# CONFIG_SUN_PARTITION is not set+# CONFIG_KARMA_PARTITION is not set+# CONFIG_EFI_PARTITION is not set+# CONFIG_SYSV68_PARTITION is not set++#+# Native Language Support+#+# CONFIG_NLS is not set++#+# Distributed Lock Manager+#+# CONFIG_DLM is not set+# CONFIG_UCC_SLOW is not set++#+# Library routines+#+# CONFIG_CRC_CCITT is not set+# CONFIG_CRC16 is not set+# CONFIG_CRC_ITU_T is not set+# CONFIG_CRC32 is not set+# CONFIG_CRC7 is not set+# CONFIG_LIBCRC32C is not set+CONFIG_ZLIB_INFLATE=y+CONFIG_HAS_IOMEM=y+CONFIG_HAS_IOPORT=y+CONFIG_HAS_DMA=y++#+# Instrumentation Support+#+# CONFIG_PROFILING is not set++#+# Kernel hacking+#+# CONFIG_PRINTK_TIME is not set+CONFIG_ENABLE_MUST_CHECK=y+CONFIG_MAGIC_SYSRQ=y+# CONFIG_UNUSED_SYMBOLS is not set+# CONFIG_DEBUG_FS is not set+# CONFIG_HEADERS_CHECK is not set+CONFIG_DEBUG_KERNEL=y+# CONFIG_DEBUG_SHIRQ is not set+CONFIG_DETECT_SOFTLOCKUP=y+CONFIG_SCHED_DEBUG=y+# CONFIG_SCHEDSTATS is not set+# CONFIG_TIMER_STATS is not set+# CONFIG_SLUB_DEBUG_ON is not set+# CONFIG_DEBUG_SPINLOCK is not set+# CONFIG_DEBUG_MUTEXES is not set+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set+# CONFIG_DEBUG_KOBJECT is not set+CONFIG_DEBUG_BUGVERBOSE=y+CONFIG_DEBUG_INFO=y+# CONFIG_DEBUG_VM is not set+# CONFIG_DEBUG_LIST is not set+CONFIG_FORCED_INLINING=y+# CONFIG_FAULT_INJECTION is not set+# CONFIG_DEBUG_STACKOVERFLOW is not set+# CONFIG_DEBUG_STACK_USAGE is not set+# CONFIG_DEBUG_PAGEALLOC is not set+# CONFIG_DEBUGGER is not set+# CONFIG_BDI_SWITCH is not set+# CONFIG_PPC_EARLY_DEBUG is not set+# CONFIG_PPC_EARLY_DEBUG_LPAR is not set+# CONFIG_PPC_EARLY_DEBUG_G5 is not set+# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set+# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set+# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set+# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set+# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set+# CONFIG_PPC_EARLY_DEBUG_BEAT is not set+# CONFIG_PPC_EARLY_DEBUG_44x is not set+# CONFIG_PPC_EARLY_DEBUG_CPM is not set++#+# Security options+#+# CONFIG_KEYS is not set+# CONFIG_SECURITY is not set+# CONFIG_CRYPTO is not set
@@ -45,13 +47,12 @@#include<sysdev/fsl_soc.h>staticvoidcpm2_dpinit(void);-cpm_cpm2_t*cpmp;/* Pointer to comm processor space */+cpm_cpm2_t__iomem*cpmp;/* Pointer to comm processor space *//* We allocate this here because it is used almost exclusively for*thecommunicationprocessordevices.*/-cpm2_map_t*cpm2_immr;-intctl_cpm2_t*cpm2_intctl;+cpm2_map_t__iomem*cpm2_immr;#define CPM_MAP_SIZE (0x40000) /* 256k - the PQ3 reserve this amountofspaceforCPMasitislarger
@@ -60,8 +61,7 @@ intctl_cpm2_t *cpm2_intctl;voidcpm2_reset(void){-cpm2_immr=(cpm2_map_t*)ioremap(CPM_MAP_ADDR,CPM_MAP_SIZE);-cpm2_intctl=cpm2_map(im_intctl);+cpm2_immr=ioremap(get_immrbase(),CPM_MAP_SIZE);/* Reclaim the DP memory for our use.*/
@@ -91,7 +91,7 @@ cpm2_reset(void)voidcpm_setbrg(uintbrg,uintrate){-volatileuint*bp;+u32__iomem*bp;/* This is good enough to get SMCs running.....*/
@@ -123,10 +124,11 @@ cpm2_fastbrg(uint brg, uint rate, int div16)brg-=4;}bp+=brg;-*bp=((BRG_INT_CLK/rate)<<1)|CPM_BRG_EN;+val=((BRG_INT_CLK/rate)<<1)|CPM_BRG_EN;if(div16)-*bp|=CPM_BRG_DIV16;+val|=CPM_BRG_DIV16;+out_be32(bp,val);cpm2_unmap(bp);}
@@ -135,8 +137,8 @@ int cpm2_clk_setup(enum cpm_clk_target target, int clock, int mode)intret=0;intshift;inti,bits=0;-cpmux_t*im_cpmux;-u32*reg;+cpmux_t__iomem*im_cpmux;+u32__iomem*reg;u32mask=7;u8clk_map[24][3]={{CPM_CLK_FCC1,CPM_BRG5,0},
@@ -228,13 +230,33 @@ static spinlock_t cpm_dpmem_lock;*untilthememorysubsystemgoesup...*/staticrh_block_tcpm_boot_dpmem_rh_block[16];staticrh_info_tcpm_dpmem_info;-staticu8*im_dprambase;+staticu8__iomem*im_dprambase;staticvoidcpm2_dpinit(void){-spin_lock_init(&cpm_dpmem_lock);+structresourcer;++#ifdef CONFIG_PPC_CPM_NEW_BINDING+structdevice_node*np;++np=of_find_compatible_node(NULL,NULL,"fsl,cpm2");+if(!np)+panic("Cannot find CPM2 node");-im_dprambase=ioremap(CPM_MAP_ADDR,CPM_DATAONLY_BASE+CPM_DATAONLY_SIZE);+if(of_address_to_resource(np,1,&r))+panic("Cannot get CPM2 resource 1");++of_node_put(np);+#else+r.start=CPM_MAP_ADDR+CPM_DATAONLY_BASE;+r.end=r.start+CPM_DATAONLY_SIZE-1;+#endif++im_dprambase=ioremap(r.start,r.end-r.start+1);+if(!im_dprambase)+panic("Cannot map DPRAM");++spin_lock_init(&cpm_dpmem_lock);/* initialize the info header */rh_init(&cpm_dpmem_info,1,
@@ -248,7 +270,7 @@ static void cpm2_dpinit(void)*varieswiththeprocessorandthemicrocodepatchesactivated.*Butthefollowingshouldbeatleastsafe.*/-rh_attach_region(&cpm_dpmem_info,CPM_DATAONLY_BASE,CPM_DATAONLY_SIZE);+rh_attach_region(&cpm_dpmem_info,0,r.end-r.start+1);}/* This function returns an index into the DPRAM area.
@@ -107,7 +107,7 @@/* Export the base address of the communication processor registers*anddualportram.*/-externcpm_cpm2_t*cpmp;/* Pointer to comm processor */+externcpm_cpm2_t__iomem*cpmp;/* Pointer to comm processor */externunsignedlongcpm_dpalloc(uintsize,uintalign);externintcpm_dpfree(unsignedlongoffset);
From: Scott Wood <hidden> Date: 2007-08-28 20:26:58
The hardware adds one to the BRG value to get the divider, so it must
be subtracted by software.
Signed-off-by: Scott Wood <redacted>
---
arch/powerpc/sysdev/cpm2_common.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
@@ -140,7 +140,8 @@ int cpm2_clk_setup(enum cpm_clk_target target, int clock, int mode)cpmux_t__iomem*im_cpmux;u32__iomem*reg;u32mask=7;-u8clk_map[24][3]={++u8clk_map[][3]={{CPM_CLK_FCC1,CPM_BRG5,0},{CPM_CLK_FCC1,CPM_BRG6,1},{CPM_CLK_FCC1,CPM_BRG7,2},
@@ -164,8 +165,40 @@ int cpm2_clk_setup(enum cpm_clk_target target, int clock, int mode){CPM_CLK_FCC3,CPM_CLK13,4},{CPM_CLK_FCC3,CPM_CLK14,5},{CPM_CLK_FCC3,CPM_CLK15,6},-{CPM_CLK_FCC3,CPM_CLK16,7}-};+{CPM_CLK_FCC3,CPM_CLK16,7},+{CPM_CLK_SCC1,CPM_BRG1,0},+{CPM_CLK_SCC1,CPM_BRG2,1},+{CPM_CLK_SCC1,CPM_BRG3,2},+{CPM_CLK_SCC1,CPM_BRG4,3},+{CPM_CLK_SCC1,CPM_CLK11,4},+{CPM_CLK_SCC1,CPM_CLK12,5},+{CPM_CLK_SCC1,CPM_CLK3,6},+{CPM_CLK_SCC1,CPM_CLK4,7},+{CPM_CLK_SCC2,CPM_BRG1,0},+{CPM_CLK_SCC2,CPM_BRG2,1},+{CPM_CLK_SCC2,CPM_BRG3,2},+{CPM_CLK_SCC2,CPM_BRG4,3},+{CPM_CLK_SCC2,CPM_CLK11,4},+{CPM_CLK_SCC2,CPM_CLK12,5},+{CPM_CLK_SCC2,CPM_CLK3,6},+{CPM_CLK_SCC2,CPM_CLK4,7},+{CPM_CLK_SCC3,CPM_BRG1,0},+{CPM_CLK_SCC3,CPM_BRG2,1},+{CPM_CLK_SCC3,CPM_BRG3,2},+{CPM_CLK_SCC3,CPM_BRG4,3},+{CPM_CLK_SCC3,CPM_CLK5,4},+{CPM_CLK_SCC3,CPM_CLK6,5},+{CPM_CLK_SCC3,CPM_CLK7,6},+{CPM_CLK_SCC3,CPM_CLK8,7},+{CPM_CLK_SCC4,CPM_BRG1,0},+{CPM_CLK_SCC4,CPM_BRG2,1},+{CPM_CLK_SCC4,CPM_BRG3,2},+{CPM_CLK_SCC4,CPM_BRG4,3},+{CPM_CLK_SCC4,CPM_CLK5,4},+{CPM_CLK_SCC4,CPM_CLK6,5},+{CPM_CLK_SCC4,CPM_CLK7,6},+{CPM_CLK_SCC4,CPM_CLK8,7},+};im_cpmux=cpm2_map(im_cpmux);
@@ -205,23 +238,80 @@ int cpm2_clk_setup(enum cpm_clk_target target, int clock, int mode)if(mode==CPM_CLK_RX)shift+=3;-for(i=0;i<24;i++){+for(i=0;i<ARRAY_SIZE(clk_map);i++){if(clk_map[i][0]==target&&clk_map[i][1]==clock){bits=clk_map[i][2];break;}}-if(i==sizeof(clk_map)/3)+if(i==ARRAY_SIZE(clk_map))ret=-EINVAL;bits<<=shift;mask<<=shift;+out_be32(reg,(in_be32(reg)&~mask)|bits);cpm2_unmap(im_cpmux);returnret;}+intcpm2_smc_clk_setup(enumcpm_clk_targettarget,intclock)+{+intret=0;+intshift;+inti,bits=0;+cpmux_t__iomem*im_cpmux;+u8__iomem*reg;+u8mask=3;++u8clk_map[][3]={+{CPM_CLK_SMC1,CPM_BRG1,0},+{CPM_CLK_SMC1,CPM_BRG7,1},+{CPM_CLK_SMC1,CPM_CLK7,2},+{CPM_CLK_SMC1,CPM_CLK9,3},+{CPM_CLK_SMC2,CPM_BRG2,0},+{CPM_CLK_SMC2,CPM_BRG8,1},+{CPM_CLK_SMC2,CPM_CLK4,2},+{CPM_CLK_SMC2,CPM_CLK15,3},+};++im_cpmux=cpm2_map(im_cpmux);++switch(target){+caseCPM_CLK_SMC1:+reg=&im_cpmux->cmx_smr;+mask=3;+shift=4;+break;+caseCPM_CLK_SMC2:+reg=&im_cpmux->cmx_smr;+mask=3;+shift=0;+break;+default:+printk(KERN_ERR"cpm2_smc_clock_setup: invalid clock target\n");+return-EINVAL;+}++for(i=0;i<ARRAY_SIZE(clk_map);i++){+if(clk_map[i][0]==target&&clk_map[i][1]==clock){+bits=clk_map[i][2];+break;+}+}+if(i==ARRAY_SIZE(clk_map))+ret=-EINVAL;++bits<<=shift;+mask<<=shift;++out_8(reg,(in_8(reg)&~mask)|bits);++cpm2_unmap(im_cpmux);+returnret;+}+/**dpalloc/dpfreebits.*/
From: Scott Wood <hidden> Date: 2007-08-28 20:27:01
This provides a generic way for board code to set up CPM pins, rather
than directly poking magic values into registers.
Signed-off-by: Scott Wood <redacted>
---
arch/powerpc/sysdev/cpm2_common.c | 33 +++++++++++++++++++++++++++++++++
include/asm-powerpc/cpm2.h | 9 +++++++++
2 files changed, 42 insertions(+), 0 deletions(-)
From: Scott Wood <hidden> Date: 2007-08-28 20:27:04
This is just a rename patch; internal references to mpc82xx_ads will be
changed in the next one.
Signed-off-by: Scott Wood <redacted>
---
arch/powerpc/platforms/82xx/Kconfig | 8 ++++----
arch/powerpc/platforms/82xx/Makefile | 2 +-
.../82xx/{mpc82xx_ads.c => mpc8272_ads.c} | 0
3 files changed, 5 insertions(+), 5 deletions(-)
rename arch/powerpc/platforms/82xx/{mpc82xx_ads.c => mpc8272_ads.c} (100%)
@@ -1,4 +1,4 @@## Makefile for the PowerPC 82xx linux kernel.#-obj-$(CONFIG_MPC82xx_ADS)+=mpc82xx_ads.o+obj-$(CONFIG_MPC8272_ADS)+=mpc8272_ads.o
diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c b/arch/powerpc/platforms/82xx/mpc8272_ads.csimilarity index 100%rename from arch/powerpc/platforms/82xx/mpc82xx_ads.crename to arch/powerpc/platforms/82xx/mpc8272_ads.c
--
1.5.0.3
@@ -562,14 +562,14 @@ static void __init mpc82xx_add_bridge(struct device_node *np)/**Setupthearchitecture*/-staticvoid__initmpc82xx_ads_setup_arch(void)+staticvoid__initmpc8272_ads_setup_arch(void){#ifdef CONFIG_PCIstructdevice_node*np;#endifif(ppc_md.progress)-ppc_md.progress("mpc82xx_ads_setup_arch()",0);+ppc_md.progress("mpc8272_ads_setup_arch()",0);cpm2_reset();/* Map I/O region to a 256MB BAT */
@@ -591,13 +591,13 @@ static void __init mpc82xx_ads_setup_arch(void)#endifif(ppc_md.progress)-ppc_md.progress("mpc82xx_ads_setup_arch(), finish",0);+ppc_md.progress("mpc8272_ads_setup_arch(), finish",0);}/**Calledveryearly,device-treeisn'tunflattened*/-staticint__initmpc82xx_ads_probe(void)+staticint__initmpc8272_ads_probe(void){/* We always match for now, eventually we should look at*theflatdevtreetoensurethisistheboardweare
@@ -0,0 +1,928 @@+#+# Automatically generated make config: don't edit+# Linux kernel version: 2.6.23-rc1+# Fri Jul 27 15:10:53 2007+#+# CONFIG_PPC64 is not set++#+# Processor support+#+CONFIG_6xx=y+# CONFIG_PPC_85xx is not set+# CONFIG_PPC_8xx is not set+# CONFIG_40x is not set+# CONFIG_44x is not set+# CONFIG_E200 is not set+CONFIG_PPC_FPU=y+CONFIG_PPC_STD_MMU=y+CONFIG_PPC_STD_MMU_32=y+# CONFIG_PPC_MM_SLICES is not set+# CONFIG_SMP is not set+CONFIG_PPC32=y+CONFIG_PPC_MERGE=y+CONFIG_MMU=y+CONFIG_GENERIC_HARDIRQS=y+CONFIG_IRQ_PER_CPU=y+CONFIG_RWSEM_XCHGADD_ALGORITHM=y+CONFIG_ARCH_HAS_ILOG2_U32=y+CONFIG_GENERIC_HWEIGHT=y+CONFIG_GENERIC_CALIBRATE_DELAY=y+CONFIG_GENERIC_FIND_NEXT_BIT=y+# CONFIG_ARCH_NO_VIRT_TO_BUS is not set+CONFIG_PPC=y+CONFIG_EARLY_PRINTK=y+CONFIG_GENERIC_NVRAM=y+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y+CONFIG_ARCH_MAY_HAVE_PC_FDC=y+CONFIG_PPC_OF=y+CONFIG_OF=y+# CONFIG_PPC_UDBG_16550 is not set+# CONFIG_GENERIC_TBSYNC is not set+CONFIG_AUDIT_ARCH=y+CONFIG_GENERIC_BUG=y+CONFIG_DEFAULT_UIMAGE=y+# CONFIG_PPC_DCR_NATIVE is not set+# CONFIG_PPC_DCR_MMIO is not set+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"++#+# Code maturity level options+#+# CONFIG_EXPERIMENTAL is not set+CONFIG_BROKEN_ON_SMP=y+CONFIG_INIT_ENV_ARG_LIMIT=32++#+# General setup+#+CONFIG_LOCALVERSION=""+CONFIG_LOCALVERSION_AUTO=y+CONFIG_SWAP=y+CONFIG_SYSVIPC=y+CONFIG_SYSVIPC_SYSCTL=y+# CONFIG_BSD_PROCESS_ACCT is not set+# CONFIG_TASKSTATS is not set+# CONFIG_AUDIT is not set+CONFIG_IKCONFIG=y+CONFIG_IKCONFIG_PROC=y+CONFIG_LOG_BUF_SHIFT=14+# CONFIG_SYSFS_DEPRECATED is not set+# CONFIG_RELAY is not set+CONFIG_BLK_DEV_INITRD=y+CONFIG_INITRAMFS_SOURCE=""+CONFIG_SYSCTL=y+CONFIG_EMBEDDED=y+CONFIG_SYSCTL_SYSCALL=y+CONFIG_KALLSYMS=y+CONFIG_KALLSYMS_ALL=y+# CONFIG_KALLSYMS_EXTRA_PASS is not set+CONFIG_HOTPLUG=y+CONFIG_PRINTK=y+CONFIG_BUG=y+CONFIG_ELF_CORE=y+CONFIG_BASE_FULL=y+CONFIG_FUTEX=y+CONFIG_ANON_INODES=y+CONFIG_EPOLL=y+CONFIG_SIGNALFD=y+CONFIG_TIMERFD=y+CONFIG_EVENTFD=y+CONFIG_SHMEM=y+CONFIG_VM_EVENT_COUNTERS=y+CONFIG_SLAB=y+# CONFIG_SLUB is not set+# CONFIG_SLOB is not set+CONFIG_RT_MUTEXES=y+# CONFIG_TINY_SHMEM is not set+CONFIG_BASE_SMALL=0+# CONFIG_MODULES is not set+CONFIG_BLOCK=y+# CONFIG_LBD is not set+# CONFIG_BLK_DEV_IO_TRACE is not set+# CONFIG_LSF is not set++#+# IO Schedulers+#+CONFIG_IOSCHED_NOOP=y+CONFIG_IOSCHED_AS=y+CONFIG_IOSCHED_DEADLINE=y+CONFIG_IOSCHED_CFQ=y+CONFIG_DEFAULT_AS=y+# CONFIG_DEFAULT_DEADLINE is not set+# CONFIG_DEFAULT_CFQ is not set+# CONFIG_DEFAULT_NOOP is not set+CONFIG_DEFAULT_IOSCHED="anticipatory"++#+# Platform support+#+# CONFIG_PPC_MULTIPLATFORM is not set+# CONFIG_EMBEDDED6xx is not set+CONFIG_PPC_82xx=y+# CONFIG_PPC_83xx is not set+# CONFIG_PPC_86xx is not set+# CONFIG_PPC_MPC52xx is not set+# CONFIG_PPC_MPC5200 is not set+# CONFIG_PPC_CELL is not set+# CONFIG_PPC_CELL_NATIVE is not set+# CONFIG_MPC8272_ADS is not set+CONFIG_PQ2FADS=y+CONFIG_PQ2ADS=y+CONFIG_8260=y+# CONFIG_MPIC is not set+# CONFIG_MPIC_WEIRD is not set+# CONFIG_PPC_I8259 is not set+# CONFIG_PPC_RTAS is not set+# CONFIG_MMIO_NVRAM is not set+# CONFIG_PPC_MPC106 is not set+# CONFIG_PPC_970_NAP is not set+# CONFIG_PPC_INDIRECT_IO is not set+# CONFIG_GENERIC_IOMAP is not set+# CONFIG_CPU_FREQ is not set+CONFIG_CPM2=y+CONFIG_PPC_CPM_NEW_BINDING=y++#+# Kernel options+#+# CONFIG_HIGHMEM is not set+# CONFIG_HZ_100 is not set+CONFIG_HZ_250=y+# CONFIG_HZ_300 is not set+# CONFIG_HZ_1000 is not set+CONFIG_HZ=250+CONFIG_PREEMPT_NONE=y+# CONFIG_PREEMPT_VOLUNTARY is not set+# CONFIG_PREEMPT is not set+CONFIG_BINFMT_ELF=y+CONFIG_BINFMT_MISC=y+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y+CONFIG_ARCH_FLATMEM_ENABLE=y+CONFIG_ARCH_POPULATES_NODE_MAP=y+CONFIG_FLATMEM=y+CONFIG_FLAT_NODE_MEM_MAP=y+# CONFIG_SPARSEMEM_STATIC is not set+CONFIG_SPLIT_PTLOCK_CPUS=4+# CONFIG_RESOURCES_64BIT is not set+CONFIG_ZONE_DMA_FLAG=1+CONFIG_BOUNCE=y+CONFIG_VIRT_TO_BUS=y+CONFIG_PROC_DEVICETREE=y+# CONFIG_CMDLINE_BOOL is not set+# CONFIG_PM is not set+CONFIG_SECCOMP=y+CONFIG_WANT_DEVICE_TREE=y+CONFIG_DEVICE_TREE="pq2fads.dts"+CONFIG_ISA_DMA_API=y++#+# Bus options+#+CONFIG_ZONE_DMA=y+CONFIG_FSL_SOC=y+# CONFIG_PCI is not set+# CONFIG_PCI_DOMAINS is not set+# CONFIG_PCI_SYSCALL is not set+# CONFIG_ARCH_SUPPORTS_MSI is not set++#+# PCCARD (PCMCIA/CardBus) support+#+# CONFIG_PCCARD is not set++#+# Advanced setup+#+# CONFIG_ADVANCED_OPTIONS is not set++#+# Default settings for advanced configuration options are used+#+CONFIG_HIGHMEM_START=0xfe000000+CONFIG_LOWMEM_SIZE=0x30000000+CONFIG_KERNEL_START=0xc0000000+CONFIG_TASK_SIZE=0x80000000+CONFIG_BOOT_LOAD=0x00400000++#+# Networking+#+CONFIG_NET=y++#+# Networking options+#+CONFIG_PACKET=y+# CONFIG_PACKET_MMAP is not set+CONFIG_UNIX=y+CONFIG_XFRM=y+# CONFIG_XFRM_USER is not set+# CONFIG_NET_KEY is not set+CONFIG_INET=y+CONFIG_IP_MULTICAST=y+# CONFIG_IP_ADVANCED_ROUTER is not set+CONFIG_IP_FIB_HASH=y+CONFIG_IP_PNP=y+CONFIG_IP_PNP_DHCP=y+CONFIG_IP_PNP_BOOTP=y+# CONFIG_IP_PNP_RARP is not set+# CONFIG_NET_IPIP is not set+# CONFIG_NET_IPGRE is not set+# CONFIG_IP_MROUTE is not set+CONFIG_SYN_COOKIES=y+# CONFIG_INET_AH is not set+# CONFIG_INET_ESP is not set+# CONFIG_INET_IPCOMP is not set+# CONFIG_INET_XFRM_TUNNEL is not set+CONFIG_INET_TUNNEL=y+CONFIG_INET_XFRM_MODE_TRANSPORT=y+CONFIG_INET_XFRM_MODE_TUNNEL=y+CONFIG_INET_XFRM_MODE_BEET=y+CONFIG_INET_DIAG=y+CONFIG_INET_TCP_DIAG=y+# CONFIG_TCP_CONG_ADVANCED is not set+CONFIG_TCP_CONG_CUBIC=y+CONFIG_DEFAULT_TCP_CONG="cubic"+# CONFIG_IP_VS is not set+CONFIG_IPV6=y+# CONFIG_IPV6_PRIVACY is not set+# CONFIG_IPV6_ROUTER_PREF is not set+# CONFIG_INET6_AH is not set+# CONFIG_INET6_ESP is not set+# CONFIG_INET6_IPCOMP is not set+# CONFIG_INET6_XFRM_TUNNEL is not set+# CONFIG_INET6_TUNNEL is not set+CONFIG_INET6_XFRM_MODE_TRANSPORT=y+CONFIG_INET6_XFRM_MODE_TUNNEL=y+CONFIG_INET6_XFRM_MODE_BEET=y+CONFIG_IPV6_SIT=y+# CONFIG_IPV6_TUNNEL is not set+# CONFIG_NETWORK_SECMARK is not set+CONFIG_NETFILTER=y+# CONFIG_NETFILTER_DEBUG is not set++#+# Core Netfilter Configuration+#+# CONFIG_NETFILTER_NETLINK is not set+# CONFIG_NF_CONNTRACK_ENABLED is not set+# CONFIG_NF_CONNTRACK is not set+# CONFIG_NETFILTER_XTABLES is not set++#+# IP: Netfilter Configuration+#+# CONFIG_IP_NF_QUEUE is not set+# CONFIG_IP_NF_IPTABLES is not set+# CONFIG_IP_NF_ARPTABLES is not set+# CONFIG_BRIDGE is not set+# CONFIG_VLAN_8021Q is not set+# CONFIG_DECNET is not set+# CONFIG_LLC2 is not set+# CONFIG_IPX is not set+# CONFIG_ATALK is not set++#+# QoS and/or fair queueing+#+# CONFIG_NET_SCHED is not set++#+# Network testing+#+# CONFIG_NET_PKTGEN is not set+# CONFIG_HAMRADIO is not set+# CONFIG_IRDA is not set+# CONFIG_BT is not set++#+# Wireless+#+# CONFIG_CFG80211 is not set+# CONFIG_WIRELESS_EXT is not set+# CONFIG_IEEE80211 is not set+# CONFIG_RFKILL is not set++#+# Device Drivers+#++#+# Generic Driver Options+#+CONFIG_STANDALONE=y+CONFIG_PREVENT_FIRMWARE_BUILD=y+# CONFIG_FW_LOADER is not set+# CONFIG_DEBUG_DRIVER is not set+# CONFIG_DEBUG_DEVRES is not set+# CONFIG_SYS_HYPERVISOR is not set+# CONFIG_CONNECTOR is not set+CONFIG_MTD=y+# CONFIG_MTD_DEBUG is not set+# CONFIG_MTD_CONCAT is not set+# CONFIG_MTD_PARTITIONS is not set++#+# User Modules And Translation Layers+#+CONFIG_MTD_CHAR=y+CONFIG_MTD_BLKDEVS=y+CONFIG_MTD_BLOCK=y+# CONFIG_FTL is not set+# CONFIG_NFTL is not set+# CONFIG_INFTL is not set+# CONFIG_RFD_FTL is not set+# CONFIG_SSFDC is not set++#+# RAM/ROM/Flash chip drivers+#+# CONFIG_MTD_CFI is not set+CONFIG_MTD_JEDECPROBE=y+CONFIG_MTD_GEN_PROBE=y+CONFIG_MTD_CFI_ADV_OPTIONS=y+CONFIG_MTD_CFI_NOSWAP=y+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set+CONFIG_MTD_CFI_GEOMETRY=y+# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set+# CONFIG_MTD_MAP_BANK_WIDTH_2 is not set+CONFIG_MTD_MAP_BANK_WIDTH_4=y+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set+# CONFIG_MTD_CFI_I1 is not set+# CONFIG_MTD_CFI_I2 is not set+CONFIG_MTD_CFI_I4=y+# CONFIG_MTD_CFI_I8 is not set+# CONFIG_MTD_OTP is not set+CONFIG_MTD_CFI_INTELEXT=y+# CONFIG_MTD_CFI_AMDSTD is not set+# CONFIG_MTD_CFI_STAA is not set+CONFIG_MTD_CFI_UTIL=y+# CONFIG_MTD_RAM is not set+# CONFIG_MTD_ROM is not set+# CONFIG_MTD_ABSENT is not set++#+# Mapping drivers for chip access+#+# CONFIG_MTD_COMPLEX_MAPPINGS is not set+# CONFIG_MTD_PHYSMAP is not set+CONFIG_MTD_PHYSMAP_OF=y+# CONFIG_MTD_SBC8240 is not set+# CONFIG_MTD_PLATRAM is not set++#+# Self-contained MTD device drivers+#+# CONFIG_MTD_SLRAM is not set+# CONFIG_MTD_PHRAM is not set+# CONFIG_MTD_MTDRAM is not set+# CONFIG_MTD_BLOCK2MTD is not set++#+# Disk-On-Chip Device Drivers+#+# CONFIG_MTD_DOC2000 is not set+# CONFIG_MTD_DOC2001 is not set+# CONFIG_MTD_DOC2001PLUS is not set+# CONFIG_MTD_NAND is not set+# CONFIG_MTD_ONENAND is not set++#+# UBI - Unsorted block images+#+# CONFIG_MTD_UBI is not set+CONFIG_OF_DEVICE=y+# CONFIG_PARPORT is not set+CONFIG_BLK_DEV=y+# CONFIG_BLK_DEV_FD is not set+# CONFIG_BLK_DEV_COW_COMMON is not set+CONFIG_BLK_DEV_LOOP=y+# CONFIG_BLK_DEV_CRYPTOLOOP is not set+# CONFIG_BLK_DEV_NBD is not set+# CONFIG_BLK_DEV_RAM is not set+# CONFIG_CDROM_PKTCDVD is not set+# CONFIG_ATA_OVER_ETH is not set+CONFIG_MISC_DEVICES=y+# CONFIG_EEPROM_93CX6 is not set+CONFIG_IDE=y+CONFIG_IDE_MAX_HWIFS=4+CONFIG_BLK_DEV_IDE=y++#+# Please see Documentation/ide.txt for help/info on IDE drives+#+# CONFIG_BLK_DEV_IDE_SATA is not set+CONFIG_BLK_DEV_IDEDISK=y+# CONFIG_IDEDISK_MULTI_MODE is not set+# CONFIG_BLK_DEV_IDECD is not set+# CONFIG_BLK_DEV_IDEFLOPPY is not set+# CONFIG_IDE_TASK_IOCTL is not set+CONFIG_IDE_PROC_FS=y++#+# IDE chipset support/bugfixes+#+# CONFIG_IDE_GENERIC is not set+# CONFIG_IDEPCI_PCIBUS_ORDER is not set+# CONFIG_IDE_ARM is not set+# CONFIG_BLK_DEV_IDEDMA is not set+# CONFIG_BLK_DEV_HD is not set++#+# SCSI device support+#+# CONFIG_RAID_ATTRS is not set+# CONFIG_SCSI is not set+# CONFIG_SCSI_DMA is not set+# CONFIG_SCSI_NETLINK is not set+# CONFIG_ATA is not set+# CONFIG_MD is not set+# CONFIG_MACINTOSH_DRIVERS is not set+CONFIG_NETDEVICES=y+# CONFIG_NETDEVICES_MULTIQUEUE is not set+# CONFIG_DUMMY is not set+# CONFIG_BONDING is not set+# CONFIG_EQUALIZER is not set+CONFIG_TUN=y+CONFIG_PHYLIB=y++#+# MII PHY device drivers+#+# CONFIG_MARVELL_PHY is not set+CONFIG_DAVICOM_PHY=y+# CONFIG_QSEMI_PHY is not set+# CONFIG_LXT_PHY is not set+# CONFIG_CICADA_PHY is not set+# CONFIG_VITESSE_PHY is not set+# CONFIG_SMSC_PHY is not set+# CONFIG_BROADCOM_PHY is not set+# CONFIG_ICPLUS_PHY is not set+# CONFIG_FIXED_PHY is not set+CONFIG_NET_ETHERNET=y+CONFIG_MII=y+CONFIG_FS_ENET=y+# CONFIG_FS_ENET_HAS_SCC is not set+CONFIG_FS_ENET_HAS_FCC=y+CONFIG_NETDEV_1000=y+CONFIG_NETDEV_10000=y++#+# Wireless LAN+#+# CONFIG_WLAN_PRE80211 is not set+# CONFIG_WLAN_80211 is not set+# CONFIG_WAN is not set+CONFIG_PPP=y+# CONFIG_PPP_FILTER is not set+CONFIG_PPP_ASYNC=y+CONFIG_PPP_SYNC_TTY=y+CONFIG_PPP_DEFLATE=y+# CONFIG_PPP_BSDCOMP is not set+# CONFIG_SLIP is not set+CONFIG_SLHC=y+# CONFIG_NETPOLL is not set+# CONFIG_NET_POLL_CONTROLLER is not set+# CONFIG_ISDN is not set+# CONFIG_PHONE is not set++#+# Input device support+#+CONFIG_INPUT=y+# CONFIG_INPUT_FF_MEMLESS is not set+# CONFIG_INPUT_POLLDEV is not set++#+# Userland interfaces+#+CONFIG_INPUT_MOUSEDEV=y+CONFIG_INPUT_MOUSEDEV_PSAUX=y+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768+# CONFIG_INPUT_JOYDEV is not set+# CONFIG_INPUT_TSDEV is not set+CONFIG_INPUT_EVDEV=y+# CONFIG_INPUT_EVBUG is not set++#+# Input Device Drivers+#+CONFIG_INPUT_KEYBOARD=y+CONFIG_KEYBOARD_ATKBD=y+# CONFIG_KEYBOARD_SUNKBD is not set+# CONFIG_KEYBOARD_LKKBD is not set+# CONFIG_KEYBOARD_XTKBD is not set+# CONFIG_KEYBOARD_NEWTON is not set+# CONFIG_KEYBOARD_STOWAWAY is not set+CONFIG_INPUT_MOUSE=y+CONFIG_MOUSE_PS2=y+CONFIG_MOUSE_PS2_ALPS=y+CONFIG_MOUSE_PS2_LOGIPS2PP=y+CONFIG_MOUSE_PS2_SYNAPTICS=y+CONFIG_MOUSE_PS2_LIFEBOOK=y+CONFIG_MOUSE_PS2_TRACKPOINT=y+# CONFIG_MOUSE_PS2_TOUCHKIT is not set+# CONFIG_MOUSE_SERIAL is not set+# CONFIG_MOUSE_VSXXXAA is not set+# CONFIG_INPUT_JOYSTICK is not set+# CONFIG_INPUT_TABLET is not set+# CONFIG_INPUT_TOUCHSCREEN is not set+# CONFIG_INPUT_MISC is not set++#+# Hardware I/O ports+#+CONFIG_SERIO=y+# CONFIG_SERIO_I8042 is not set+CONFIG_SERIO_SERPORT=y+CONFIG_SERIO_LIBPS2=y+# CONFIG_SERIO_RAW is not set+# CONFIG_GAMEPORT is not set++#+# Character devices+#+# CONFIG_VT is not set+# CONFIG_SERIAL_NONSTANDARD is not set++#+# Serial drivers+#+# CONFIG_SERIAL_8250 is not set++#+# Non-8250 serial port support+#+# CONFIG_SERIAL_UARTLITE is not set+CONFIG_SERIAL_CORE=y+CONFIG_SERIAL_CORE_CONSOLE=y+CONFIG_SERIAL_CPM=y+CONFIG_SERIAL_CPM_CONSOLE=y+CONFIG_SERIAL_CPM_SCC1=y+# CONFIG_SERIAL_CPM_SCC2 is not set+# CONFIG_SERIAL_CPM_SCC3 is not set+CONFIG_SERIAL_CPM_SCC4=y+# CONFIG_SERIAL_CPM_SMC1 is not set+# CONFIG_SERIAL_CPM_SMC2 is not set+CONFIG_UNIX98_PTYS=y+CONFIG_LEGACY_PTYS=y+CONFIG_LEGACY_PTY_COUNT=256+# CONFIG_IPMI_HANDLER is not set+# CONFIG_WATCHDOG is not set+CONFIG_HW_RANDOM=y+# CONFIG_NVRAM is not set+# CONFIG_GEN_RTC is not set+# CONFIG_R3964 is not set+# CONFIG_RAW_DRIVER is not set+# CONFIG_I2C is not set++#+# SPI support+#+# CONFIG_SPI is not set+# CONFIG_SPI_MASTER is not set+# CONFIG_W1 is not set+# CONFIG_POWER_SUPPLY is not set+# CONFIG_HWMON is not set++#+# Multifunction device drivers+#+# CONFIG_MFD_SM501 is not set++#+# Multimedia devices+#+# CONFIG_VIDEO_DEV is not set+# CONFIG_DVB_CORE is not set+CONFIG_DAB=y++#+# Graphics support+#+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set++#+# Display device support+#+# CONFIG_DISPLAY_SUPPORT is not set+# CONFIG_VGASTATE is not set+CONFIG_VIDEO_OUTPUT_CONTROL=y+# CONFIG_FB is not set+# CONFIG_FB_IBM_GXT4500 is not set++#+# Sound+#+# CONFIG_SOUND is not set+# CONFIG_HID_SUPPORT is not set+CONFIG_USB_SUPPORT=y+# CONFIG_USB_ARCH_HAS_HCD is not set+# CONFIG_USB_ARCH_HAS_OHCI is not set+# CONFIG_USB_ARCH_HAS_EHCI is not set++#+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'+#++#+# USB Gadget Support+#+CONFIG_USB_GADGET=y+# CONFIG_USB_GADGET_DEBUG_FILES is not set+CONFIG_USB_GADGET_SELECTED=y+# CONFIG_USB_GADGET_AMD5536UDC is not set+# CONFIG_USB_GADGET_FSL_USB2 is not set+# CONFIG_USB_GADGET_NET2280 is not set+# CONFIG_USB_GADGET_PXA2XX is not set+CONFIG_USB_GADGET_M66592=y+CONFIG_USB_M66592=y+# CONFIG_USB_GADGET_GOKU is not set+# CONFIG_USB_GADGET_LH7A40X is not set+# CONFIG_USB_GADGET_OMAP is not set+# CONFIG_USB_GADGET_S3C2410 is not set+# CONFIG_USB_GADGET_AT91 is not set+# CONFIG_USB_GADGET_DUMMY_HCD is not set+CONFIG_USB_GADGET_DUALSPEED=y+# CONFIG_USB_ZERO is not set+CONFIG_USB_ETH=y+# CONFIG_USB_GADGETFS is not set+# CONFIG_USB_FILE_STORAGE is not set+# CONFIG_USB_G_SERIAL is not set+# CONFIG_USB_MIDI_GADGET is not set+# CONFIG_MMC is not set+# CONFIG_NEW_LEDS is not set++#+# Real Time Clock+#+# CONFIG_RTC_CLASS is not set++#+# DMA Engine support+#+# CONFIG_DMA_ENGINE is not set++#+# DMA Clients+#++#+# DMA Devices+#++#+# Userspace I/O+#+# CONFIG_UIO is not set++#+# File systems+#+CONFIG_EXT2_FS=y+# CONFIG_EXT2_FS_XATTR is not set+# CONFIG_EXT2_FS_XIP is not set+CONFIG_EXT3_FS=y+CONFIG_EXT3_FS_XATTR=y+# CONFIG_EXT3_FS_POSIX_ACL is not set+# CONFIG_EXT3_FS_SECURITY is not set+CONFIG_JBD=y+# CONFIG_JBD_DEBUG is not set+CONFIG_FS_MBCACHE=y+# CONFIG_REISERFS_FS is not set+# CONFIG_JFS_FS is not set+CONFIG_FS_POSIX_ACL=y+# CONFIG_XFS_FS is not set+# CONFIG_OCFS2_FS is not set+# CONFIG_MINIX_FS is not set+# CONFIG_ROMFS_FS is not set+CONFIG_INOTIFY=y+CONFIG_INOTIFY_USER=y+# CONFIG_QUOTA is not set+CONFIG_DNOTIFY=y+# CONFIG_AUTOFS_FS is not set+CONFIG_AUTOFS4_FS=y+# CONFIG_FUSE_FS is not set++#+# CD-ROM/DVD Filesystems+#+# CONFIG_ISO9660_FS is not set+# CONFIG_UDF_FS is not set++#+# DOS/FAT/NT Filesystems+#+# CONFIG_MSDOS_FS is not set+# CONFIG_VFAT_FS is not set+# CONFIG_NTFS_FS is not set++#+# Pseudo filesystems+#+CONFIG_PROC_FS=y+CONFIG_PROC_KCORE=y+CONFIG_PROC_SYSCTL=y+CONFIG_SYSFS=y+CONFIG_TMPFS=y+# CONFIG_TMPFS_POSIX_ACL is not set+# CONFIG_HUGETLB_PAGE is not set+CONFIG_RAMFS=y++#+# Miscellaneous filesystems+#+# CONFIG_HFSPLUS_FS is not set+# CONFIG_JFFS2_FS is not set+CONFIG_CRAMFS=y+# CONFIG_VXFS_FS is not set+# CONFIG_HPFS_FS is not set+# CONFIG_QNX4FS_FS is not set+# CONFIG_SYSV_FS is not set+# CONFIG_UFS_FS is not set++#+# Network File Systems+#+CONFIG_NFS_FS=y+CONFIG_NFS_V3=y+CONFIG_NFS_V3_ACL=y+# CONFIG_NFS_DIRECTIO is not set+# CONFIG_NFSD is not set+CONFIG_ROOT_NFS=y+CONFIG_LOCKD=y+CONFIG_LOCKD_V4=y+CONFIG_NFS_ACL_SUPPORT=y+CONFIG_NFS_COMMON=y+CONFIG_SUNRPC=y+# CONFIG_SMB_FS is not set+# CONFIG_CIFS is not set+# CONFIG_NCP_FS is not set+# CONFIG_CODA_FS is not set++#+# Partition Types+#+CONFIG_PARTITION_ADVANCED=y+# CONFIG_ACORN_PARTITION is not set+# CONFIG_OSF_PARTITION is not set+# CONFIG_AMIGA_PARTITION is not set+# CONFIG_ATARI_PARTITION is not set+# CONFIG_MAC_PARTITION is not set+CONFIG_MSDOS_PARTITION=y+# CONFIG_BSD_DISKLABEL is not set+# CONFIG_MINIX_SUBPARTITION is not set+# CONFIG_SOLARIS_X86_PARTITION is not set+# CONFIG_UNIXWARE_DISKLABEL is not set+# CONFIG_LDM_PARTITION is not set+# CONFIG_SGI_PARTITION is not set+# CONFIG_ULTRIX_PARTITION is not set+# CONFIG_SUN_PARTITION is not set+# CONFIG_KARMA_PARTITION is not set+# CONFIG_EFI_PARTITION is not set+# CONFIG_SYSV68_PARTITION is not set++#+# Native Language Support+#+CONFIG_NLS=y+CONFIG_NLS_DEFAULT="iso8859-1"+CONFIG_NLS_CODEPAGE_437=y+# CONFIG_NLS_CODEPAGE_737 is not set+# CONFIG_NLS_CODEPAGE_775 is not set+# CONFIG_NLS_CODEPAGE_850 is not set+# CONFIG_NLS_CODEPAGE_852 is not set+# CONFIG_NLS_CODEPAGE_855 is not set+# CONFIG_NLS_CODEPAGE_857 is not set+# CONFIG_NLS_CODEPAGE_860 is not set+# CONFIG_NLS_CODEPAGE_861 is not set+# CONFIG_NLS_CODEPAGE_862 is not set+# CONFIG_NLS_CODEPAGE_863 is not set+# CONFIG_NLS_CODEPAGE_864 is not set+# CONFIG_NLS_CODEPAGE_865 is not set+# CONFIG_NLS_CODEPAGE_866 is not set+# CONFIG_NLS_CODEPAGE_869 is not set+# CONFIG_NLS_CODEPAGE_936 is not set+# CONFIG_NLS_CODEPAGE_950 is not set+# CONFIG_NLS_CODEPAGE_932 is not set+# CONFIG_NLS_CODEPAGE_949 is not set+# CONFIG_NLS_CODEPAGE_874 is not set+# CONFIG_NLS_ISO8859_8 is not set+# CONFIG_NLS_CODEPAGE_1250 is not set+# CONFIG_NLS_CODEPAGE_1251 is not set+CONFIG_NLS_ASCII=y+CONFIG_NLS_ISO8859_1=y+# CONFIG_NLS_ISO8859_2 is not set+# CONFIG_NLS_ISO8859_3 is not set+# CONFIG_NLS_ISO8859_4 is not set+# CONFIG_NLS_ISO8859_5 is not set+# CONFIG_NLS_ISO8859_6 is not set+# CONFIG_NLS_ISO8859_7 is not set+# CONFIG_NLS_ISO8859_9 is not set+# CONFIG_NLS_ISO8859_13 is not set+# CONFIG_NLS_ISO8859_14 is not set+# CONFIG_NLS_ISO8859_15 is not set+# CONFIG_NLS_KOI8_R is not set+# CONFIG_NLS_KOI8_U is not set+CONFIG_NLS_UTF8=y+# CONFIG_UCC_SLOW is not set++#+# Library routines+#+CONFIG_BITREVERSE=y+CONFIG_CRC_CCITT=y+# CONFIG_CRC16 is not set+# CONFIG_CRC_ITU_T is not set+CONFIG_CRC32=y+# CONFIG_CRC7 is not set+# CONFIG_LIBCRC32C is not set+CONFIG_ZLIB_INFLATE=y+CONFIG_ZLIB_DEFLATE=y+CONFIG_PLIST=y+CONFIG_HAS_IOMEM=y+CONFIG_HAS_IOPORT=y+CONFIG_HAS_DMA=y++#+# Kernel hacking+#+# CONFIG_PRINTK_TIME is not set+CONFIG_ENABLE_MUST_CHECK=y+CONFIG_MAGIC_SYSRQ=y+# CONFIG_UNUSED_SYMBOLS is not set+# CONFIG_DEBUG_FS is not set+# CONFIG_HEADERS_CHECK is not set+CONFIG_DEBUG_KERNEL=y+# CONFIG_DEBUG_SHIRQ is not set+CONFIG_DETECT_SOFTLOCKUP=y+# CONFIG_SCHED_DEBUG is not set+# CONFIG_SCHEDSTATS is not set+# CONFIG_TIMER_STATS is not set+# CONFIG_DEBUG_SLAB is not set+# CONFIG_DEBUG_RT_MUTEXES is not set+# CONFIG_RT_MUTEX_TESTER is not set+# CONFIG_DEBUG_SPINLOCK is not set+# CONFIG_DEBUG_MUTEXES is not set+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set+# CONFIG_DEBUG_KOBJECT is not set+CONFIG_DEBUG_BUGVERBOSE=y+CONFIG_DEBUG_INFO=y+# CONFIG_DEBUG_VM is not set+# CONFIG_DEBUG_LIST is not set+CONFIG_FORCED_INLINING=y+# CONFIG_FAULT_INJECTION is not set+# CONFIG_DEBUG_STACKOVERFLOW is not set+# CONFIG_DEBUG_STACK_USAGE is not set+# CONFIG_DEBUG_PAGEALLOC is not set+# CONFIG_DEBUGGER is not set+# CONFIG_KGDB_CONSOLE is not set+CONFIG_BDI_SWITCH=y+# CONFIG_PPC_EARLY_DEBUG is not set++#+# Security options+#+# CONFIG_KEYS is not set+# CONFIG_SECURITY is not set+CONFIG_CRYPTO=y+CONFIG_CRYPTO_ALGAPI=y+CONFIG_CRYPTO_BLKCIPHER=y+CONFIG_CRYPTO_MANAGER=y+# CONFIG_CRYPTO_HMAC is not set+# CONFIG_CRYPTO_NULL is not set+# CONFIG_CRYPTO_MD4 is not set+CONFIG_CRYPTO_MD5=y+# CONFIG_CRYPTO_SHA1 is not set+# CONFIG_CRYPTO_SHA256 is not set+# CONFIG_CRYPTO_SHA512 is not set+# CONFIG_CRYPTO_WP512 is not set+# CONFIG_CRYPTO_TGR192 is not set+CONFIG_CRYPTO_ECB=y+CONFIG_CRYPTO_CBC=y+CONFIG_CRYPTO_PCBC=y+# CONFIG_CRYPTO_CRYPTD is not set+CONFIG_CRYPTO_DES=y+# CONFIG_CRYPTO_FCRYPT is not set+# CONFIG_CRYPTO_BLOWFISH is not set+# CONFIG_CRYPTO_TWOFISH is not set+# CONFIG_CRYPTO_SERPENT is not set+# CONFIG_CRYPTO_AES is not set+# CONFIG_CRYPTO_CAST5 is not set+# CONFIG_CRYPTO_CAST6 is not set+# CONFIG_CRYPTO_TEA is not set+# CONFIG_CRYPTO_ARC4 is not set+# CONFIG_CRYPTO_KHAZAD is not set+# CONFIG_CRYPTO_ANUBIS is not set+# CONFIG_CRYPTO_DEFLATE is not set+# CONFIG_CRYPTO_MICHAEL_MIC is not set+# CONFIG_CRYPTO_CRC32C is not set+# CONFIG_CRYPTO_CAMELLIA is not set+CONFIG_CRYPTO_HW=y
@@ -0,0 +1,202 @@+/*+*PQ2FADSboardsupport+*+*Copyright2007FreescaleSemiconductor,Inc.+*Author:ScottWood<scottwood@freescale.com>+*+*Looselybasedonmp82xxADSsupportbyVitalyBordug<vbordug@ru.mvista.com>+*Copyright(c)2006MontaVistaSoftware,Inc.+*+*Thisprogramisfreesoftware;youcanredistributeitand/ormodifyit+*underthetermsoftheGNUGeneralPublicLicenseversion2aspublished+*bytheFreeSoftwareFoundation.+*/++#include<linux/init.h>+#include<linux/interrupt.h>+#include<linux/fsl_devices.h>++#include<asm/io.h>+#include<asm/cpm2.h>+#include<asm/udbg.h>+#include<asm/machdep.h>+#include<asm/of_platform.h>+#include<asm/time.h>++#include<sysdev/fsl_soc.h>+#include<sysdev/cpm2_pic.h>++#include"pq2ads.h"+#include"pq2.h"++staticvoid__initpq2fads_pic_init(void)+{+structdevice_node*np=of_find_compatible_node(NULL,NULL,"fsl,pq2-pic");+if(!np){+printk(KERN_ERR"PIC init: can not find cpm-pic node\n");+return;+}++cpm2_pic_init(np);+of_node_put(np);++/* Initialize stuff for the 82xx CPLD IC and install demux */+pq2ads_pci_init_irq();+}++structcpm_pin{+intport,pin,flags;+};++staticstructcpm_pinpq2fads_pins[]={+/* SCC1 */+{3,30,CPM_PIN_OUTPUT|CPM_PIN_SECONDARY},+{3,31,CPM_PIN_INPUT|CPM_PIN_PRIMARY},++/* SCC2 */+{3,27,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{3,28,CPM_PIN_INPUT|CPM_PIN_PRIMARY},++/* FCC2 */+{1,18,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,19,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,20,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,21,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,22,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{1,23,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{1,24,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{1,25,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{1,26,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,27,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,28,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,29,CPM_PIN_OUTPUT|CPM_PIN_SECONDARY},+{1,30,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,31,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{2,18,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{2,19,CPM_PIN_INPUT|CPM_PIN_PRIMARY},++/* FCC3 */+{1,4,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{1,5,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{1,6,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{1,7,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{1,8,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,9,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,10,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,11,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,12,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,13,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,14,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{1,15,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{1,16,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,17,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{2,16,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{2,17,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+};++staticvoid__initinit_ioports(void)+{+inti;++for(i=0;i<ARRAY_SIZE(pq2fads_pins);i++){+structcpm_pin*pin=&pq2fads_pins[i];+cpm2_set_pin(pin->port,pin->pin,pin->flags);+}++cpm2_clk_setup(CPM_CLK_SCC1,CPM_BRG1,CPM_CLK_RX);+cpm2_clk_setup(CPM_CLK_SCC1,CPM_BRG1,CPM_CLK_TX);+cpm2_clk_setup(CPM_CLK_SCC2,CPM_BRG2,CPM_CLK_RX);+cpm2_clk_setup(CPM_CLK_SCC2,CPM_BRG2,CPM_CLK_TX);+cpm2_clk_setup(CPM_CLK_FCC2,CPM_CLK13,CPM_CLK_RX);+cpm2_clk_setup(CPM_CLK_FCC2,CPM_CLK14,CPM_CLK_TX);+cpm2_clk_setup(CPM_CLK_FCC3,CPM_CLK15,CPM_CLK_RX);+cpm2_clk_setup(CPM_CLK_FCC3,CPM_CLK16,CPM_CLK_TX);+}++staticvoid__initpq2fads_setup_arch(void)+{+structdevice_node*np;+__be32__iomem*bcsr;++if(ppc_md.progress)+ppc_md.progress("pq2fads_setup_arch()",0);++cpm2_reset();++np=of_find_compatible_node(NULL,NULL,"fsl,pq2fads-bcsr");+if(!np){+printk(KERN_ERR"No fsl,pq2fads-bcsr in device tree\n");+return;+}++bcsr=of_iomap(np,0);+if(!bcsr){+printk(KERN_ERR"Cannot map BCSR registers\n");+return;+}++of_node_put(np);++/* Enable the serial and ethernet ports */++clrbits32(&bcsr[1],BCSR1_RS232_EN1|BCSR1_RS232_EN2|BCSR1_FETHIEN);+setbits32(&bcsr[1],BCSR1_FETH_RST);++clrbits32(&bcsr[3],BCSR3_FETHIEN2);+setbits32(&bcsr[3],BCSR3_FETH2_RST);++iounmap(bcsr);++init_ioports();++/* Enable external IRQs */+clrbits32(&cpm2_immr->im_siu_conf.siu_82xx.sc_siumcr,0x0c000000);++pq2_init_pci();++if(ppc_md.progress)+ppc_md.progress("pq2fads_setup_arch(), finish",0);+}++/*+*Calledveryearly,device-treeisn'tunflattened+*/+staticint__initpq2fads_probe(void)+{+unsignedlongroot=of_get_flat_dt_root();+returnof_flat_dt_is_compatible(root,"fsl,pq2fads");+}++staticstructof_device_id__initdataof_bus_ids[]={+{.name="soc",},+{.name="cpm",},+{.compatible="fsl,pq2-chipselect",},+{},+};++staticint__initdeclare_of_platform_devices(void)+{+if(!machine_is(pq2fads))+return0;++/* Publish the QE devices */+of_platform_bus_probe(NULL,of_bus_ids,NULL);+return0;+}+device_initcall(declare_of_platform_devices);++define_machine(pq2fads)+{+.name="Freescale PQ2FADS",+.probe=pq2fads_probe,+.setup_arch=pq2fads_setup_arch,+.init_IRQ=pq2fads_pic_init,+.get_irq=cpm2_get_irq,+.calibrate_decr=generic_calibrate_decr,+.restart=pq2_restart,+.progress=udbg_progress,+};++#ifdef CONFIG_PPC_EARLY_DEBUG_CPM+u32__iomem*cpm_udbg_txdesc=(u32__iomem__force*)0xf0000808;+#endif
From: Scott Wood <hidden> Date: 2007-08-28 20:27:14
1. PCI and reset are factored out into pq2.c. I renamed them from m82xx
to pq2 because they won't work on the Integrated Host Processor line of
82xx chips (i.e. 8240, 8245, and such).
2. The PCI PIC, which is nominally board-specific, is used on multiple
boards, and thus is used into pq2ads-pci-pic.c.
3. The new CPM binding is used.
4. General cleanup.
Signed-off-by: Scott Wood <redacted>
---
arch/powerpc/Kconfig | 2 +-
arch/powerpc/boot/dts/mpc8272ads.dts | 321 +++++++------
arch/powerpc/configs/mpc8272_ads_defconfig | 380 ++++++++-------
arch/powerpc/platforms/82xx/Kconfig | 5 +
arch/powerpc/platforms/82xx/Makefile | 2 +
arch/powerpc/platforms/82xx/mpc8272_ads.c | 671 +++++---------------------
arch/powerpc/platforms/82xx/pq2.c | 93 ++++
arch/powerpc/platforms/82xx/pq2.h | 20 +
arch/powerpc/platforms/82xx/pq2ads-pci-pic.c | 202 ++++++++
arch/powerpc/platforms/82xx/pq2ads.h | 2 -
10 files changed, 816 insertions(+), 882 deletions(-)
create mode 100644 arch/powerpc/platforms/82xx/pq2.c
create mode 100644 arch/powerpc/platforms/82xx/pq2.h
create mode 100644 arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
@@ -1,9 +1,24 @@ # # Automatically generated make config: don't edit-# Linux kernel version: 2.6.22-rc7-# Sun Jul 1 23:56:55 2007+# Linux kernel version: 2.6.23-rc1+# Fri Jul 27 14:43:57 2007 # # CONFIG_PPC64 is not set++#+# Processor support+#+CONFIG_6xx=y+# CONFIG_PPC_85xx is not set+# CONFIG_PPC_8xx is not set+# CONFIG_40x is not set+# CONFIG_44x is not set+# CONFIG_E200 is not set+CONFIG_PPC_FPU=y+CONFIG_PPC_STD_MMU=y+CONFIG_PPC_STD_MMU_32=y+# CONFIG_PPC_MM_SLICES is not set+# CONFIG_SMP is not set CONFIG_PPC32=y CONFIG_PPC_MERGE=y CONFIG_MMU=y
@@ -14,38 +29,21 @@ CONFIG_ARCH_HAS_ILOG2_U32=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_FIND_NEXT_BIT=y+# CONFIG_ARCH_NO_VIRT_TO_BUS is not set CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_GENERIC_NVRAM=y CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_PPC_OF=y+CONFIG_OF=y # CONFIG_PPC_UDBG_16550 is not set # CONFIG_GENERIC_TBSYNC is not set CONFIG_AUDIT_ARCH=y CONFIG_GENERIC_BUG=y CONFIG_DEFAULT_UIMAGE=y--#-# Processor support-#-# CONFIG_CLASSIC32 is not set-CONFIG_PPC_82xx=y-# CONFIG_PPC_83xx is not set-# CONFIG_PPC_85xx is not set-# CONFIG_PPC_86xx is not set-# CONFIG_PPC_8xx is not set-# CONFIG_40x is not set-# CONFIG_44x is not set-# CONFIG_E200 is not set-CONFIG_6xx=y-CONFIG_PPC_FPU=y # CONFIG_PPC_DCR_NATIVE is not set # CONFIG_PPC_DCR_MMIO is not set-CONFIG_PPC_STD_MMU=y-CONFIG_PPC_STD_MMU_32=y-# CONFIG_PPC_MM_SLICES is not set-# CONFIG_SMP is not set CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" #
@@ -58,15 +56,13 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 # # General setup #-CONFIG_LOCALVERSION="powerpc8272"+CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y CONFIG_SWAP=y CONFIG_SYSVIPC=y-# CONFIG_IPC_NS is not set CONFIG_SYSVIPC_SYSCTL=y # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_TASKSTATS is not set-# CONFIG_UTS_NS is not set # CONFIG_AUDIT is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y
@@ -79,7 +75,7 @@ CONFIG_EMBEDDED=y CONFIG_SYSCTL_SYSCALL=y CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y-CONFIG_KALLSYMS_EXTRA_PASS=y+# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y
@@ -99,15 +95,7 @@ CONFIG_SLAB=y CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0--#-# Loadable module support-# # CONFIG_MODULES is not set--#-# Block layer-# CONFIG_BLOCK=y # CONFIG_LBD is not set # CONFIG_BLK_DEV_IO_TRACE is not set
@@ -129,14 +117,21 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # # Platform support #+# CONFIG_PPC_MULTIPLATFORM is not set+# CONFIG_EMBEDDED6xx is not set+CONFIG_PPC_82xx=y+# CONFIG_PPC_83xx is not set+# CONFIG_PPC_86xx is not set # CONFIG_PPC_MPC52xx is not set # CONFIG_PPC_MPC5200 is not set # CONFIG_PPC_CELL is not set # CONFIG_PPC_CELL_NATIVE is not set-CONFIG_MPC82xx_ADS=y+CONFIG_MPC8272_ADS=y+# CONFIG_PQ2FADS is not set CONFIG_PQ2ADS=y CONFIG_8260=y CONFIG_8272=y+CONFIG_PQ2_ADS_PCI_PIC=y # CONFIG_MPIC is not set # CONFIG_MPIC_WEIRD is not set # CONFIG_PPC_I8259 is not set
@@ -148,6 +143,7 @@ CONFIG_8272=y # CONFIG_GENERIC_IOMAP is not set # CONFIG_CPU_FREQ is not set CONFIG_CPM2=y+CONFIG_PPC_CPM_NEW_BINDING=y # # Kernel options
@@ -172,21 +168,30 @@ CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_RESOURCES_64BIT is not set CONFIG_ZONE_DMA_FLAG=1+CONFIG_BOUNCE=y+CONFIG_VIRT_TO_BUS=y CONFIG_PROC_DEVICETREE=y # CONFIG_CMDLINE_BOOL is not set # CONFIG_PM is not set CONFIG_SECCOMP=y-# CONFIG_WANT_DEVICE_TREE is not set+CONFIG_WANT_DEVICE_TREE=y+CONFIG_DEVICE_TREE="mpc8272ads.dts" CONFIG_ISA_DMA_API=y # # Bus options # CONFIG_ZONE_DMA=y+CONFIG_PPC_INDIRECT_PCI=y CONFIG_FSL_SOC=y-# CONFIG_PCI is not set-# CONFIG_PCI_DOMAINS is not set-# CONFIG_ARCH_SUPPORTS_MSI is not set+CONFIG_PCI=y+CONFIG_PCI_DOMAINS=y+CONFIG_PCI_SYSCALL=y+CONFIG_PCI_8260=y+# CONFIG_PCIEPORTBUS is not set+CONFIG_ARCH_SUPPORTS_MSI=y+# CONFIG_PCI_MSI is not set+# CONFIG_PCI_DEBUG is not set # # PCCARD (PCMCIA/CardBus) support
@@ -319,85 +324,135 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DEVRES is not set # CONFIG_SYS_HYPERVISOR is not set--#-# Connector - unified userspace <-> kernelspace linker-# # CONFIG_CONNECTOR is not set-# CONFIG_MTD is not set--#-# Parallel port support-#+CONFIG_MTD=y+# CONFIG_MTD_DEBUG is not set+# CONFIG_MTD_CONCAT is not set+# CONFIG_MTD_PARTITIONS is not set++#+# User Modules And Translation Layers+#+CONFIG_MTD_CHAR=y+CONFIG_MTD_BLKDEVS=y+CONFIG_MTD_BLOCK=y+# CONFIG_FTL is not set+# CONFIG_NFTL is not set+# CONFIG_INFTL is not set+# CONFIG_RFD_FTL is not set+# CONFIG_SSFDC is not set++#+# RAM/ROM/Flash chip drivers+#+# CONFIG_MTD_CFI is not set+CONFIG_MTD_JEDECPROBE=y+CONFIG_MTD_GEN_PROBE=y+CONFIG_MTD_CFI_ADV_OPTIONS=y+CONFIG_MTD_CFI_NOSWAP=y+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set+CONFIG_MTD_CFI_GEOMETRY=y+# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set+# CONFIG_MTD_MAP_BANK_WIDTH_2 is not set+CONFIG_MTD_MAP_BANK_WIDTH_4=y+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set+# CONFIG_MTD_CFI_I1 is not set+# CONFIG_MTD_CFI_I2 is not set+CONFIG_MTD_CFI_I4=y+# CONFIG_MTD_CFI_I8 is not set+# CONFIG_MTD_OTP is not set+CONFIG_MTD_CFI_INTELEXT=y+# CONFIG_MTD_CFI_AMDSTD is not set+# CONFIG_MTD_CFI_STAA is not set+CONFIG_MTD_CFI_UTIL=y+# CONFIG_MTD_RAM is not set+# CONFIG_MTD_ROM is not set+# CONFIG_MTD_ABSENT is not set++#+# Mapping drivers for chip access+#+# CONFIG_MTD_COMPLEX_MAPPINGS is not set+# CONFIG_MTD_PHYSMAP is not set+CONFIG_MTD_PHYSMAP_OF=y+# CONFIG_MTD_SBC8240 is not set+# CONFIG_MTD_PLATRAM is not set++#+# Self-contained MTD device drivers+#+# CONFIG_MTD_PMC551 is not set+# CONFIG_MTD_SLRAM is not set+# CONFIG_MTD_PHRAM is not set+# CONFIG_MTD_MTDRAM is not set+# CONFIG_MTD_BLOCK2MTD is not set++#+# Disk-On-Chip Device Drivers+#+# CONFIG_MTD_DOC2000 is not set+# CONFIG_MTD_DOC2001 is not set+# CONFIG_MTD_DOC2001PLUS is not set+# CONFIG_MTD_NAND is not set+# CONFIG_MTD_ONENAND is not set++#+# UBI - Unsorted block images+#+# CONFIG_MTD_UBI is not set+CONFIG_OF_DEVICE=y # CONFIG_PARPORT is not set--#-# Plug and Play support-#-# CONFIG_PNPACPI is not set--#-# Block devices-#+CONFIG_BLK_DEV=y # CONFIG_BLK_DEV_FD is not set+# CONFIG_BLK_CPQ_DA is not set+# CONFIG_BLK_CPQ_CISS_DA is not set+# CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set+# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set--#-# Misc devices-#-# CONFIG_BLINK is not set-CONFIG_IDE=y-CONFIG_IDE_MAX_HWIFS=4-CONFIG_BLK_DEV_IDE=y--#-# Please see Documentation/ide.txt for help/info on IDE drives-#-# CONFIG_BLK_DEV_IDE_SATA is not set-CONFIG_BLK_DEV_IDEDISK=y-# CONFIG_IDEDISK_MULTI_MODE is not set-# CONFIG_BLK_DEV_IDECD is not set-# CONFIG_BLK_DEV_IDEFLOPPY is not set-# CONFIG_IDE_TASK_IOCTL is not set-CONFIG_IDE_PROC_FS=y--#-# IDE chipset support/bugfixes-#-# CONFIG_IDE_GENERIC is not set-# CONFIG_IDEPCI_PCIBUS_ORDER is not set-# CONFIG_IDE_ARM is not set-# CONFIG_BLK_DEV_IDEDMA is not set-# CONFIG_BLK_DEV_HD is not set+# CONFIG_MISC_DEVICES is not set+# CONFIG_IDE is not set # # SCSI device support # # CONFIG_RAID_ATTRS is not set # CONFIG_SCSI is not set+# CONFIG_SCSI_DMA is not set # CONFIG_SCSI_NETLINK is not set # CONFIG_ATA is not set+# CONFIG_MD is not set #-# Multi-device support (RAID and LVM)+# Fusion MPT device support #-# CONFIG_MD is not set-# CONFIG_MACINTOSH_DRIVERS is not set+# CONFIG_FUSION is not set #-# Network device support+# IEEE 1394 (FireWire) support #++#+# An alternative FireWire stack is available with EXPERIMENTAL=y+#+# CONFIG_IEEE1394 is not set+# CONFIG_I2O is not set+# CONFIG_MACINTOSH_DRIVERS is not set CONFIG_NETDEVICES=y+# CONFIG_NETDEVICES_MULTIQUEUE is not set # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set CONFIG_TUN=y+# CONFIG_ARCNET is not set CONFIG_PHYLIB=y #
@@ -411,18 +466,43 @@ CONFIG_DAVICOM_PHY=y # CONFIG_VITESSE_PHY is not set # CONFIG_SMSC_PHY is not set # CONFIG_BROADCOM_PHY is not set+# CONFIG_ICPLUS_PHY is not set # CONFIG_FIXED_PHY is not set--#-# Ethernet (10 or 100Mbit)-# CONFIG_NET_ETHERNET=y CONFIG_MII=y+# CONFIG_HAPPYMEAL is not set+# CONFIG_SUNGEM is not set+# CONFIG_CASSINI is not set+# CONFIG_NET_VENDOR_3COM is not set+# CONFIG_NET_TULIP is not set+# CONFIG_HP100 is not set+# CONFIG_NET_PCI is not set CONFIG_FS_ENET=y # CONFIG_FS_ENET_HAS_SCC is not set CONFIG_FS_ENET_HAS_FCC=y CONFIG_NETDEV_1000=y+# CONFIG_ACENIC is not set+# CONFIG_DL2K is not set+# CONFIG_E1000 is not set+# CONFIG_NS83820 is not set+# CONFIG_HAMACHI is not set+# CONFIG_R8169 is not set+# CONFIG_SIS190 is not set+# CONFIG_SKGE is not set+# CONFIG_SKY2 is not set+# CONFIG_VIA_VELOCITY is not set+# CONFIG_TIGON3 is not set+# CONFIG_BNX2 is not set+# CONFIG_QLA3XXX is not set CONFIG_NETDEV_10000=y+# CONFIG_CHELSIO_T1 is not set+# CONFIG_CHELSIO_T3 is not set+# CONFIG_IXGB is not set+# CONFIG_S2IO is not set+# CONFIG_MYRI10GE is not set+# CONFIG_NETXEN_NIC is not set+# CONFIG_MLX4_CORE is not set+# CONFIG_TR is not set # # Wireless LAN
@@ -430,6 +510,7 @@ CONFIG_NETDEV_10000=y # CONFIG_WLAN_PRE80211 is not set # CONFIG_WLAN_80211 is not set # CONFIG_WAN is not set+# CONFIG_FDDI is not set CONFIG_PPP=y # CONFIG_PPP_FILTER is not set CONFIG_PPP_ASYNC=y
@@ -440,15 +521,7 @@ CONFIG_PPP_DEFLATE=y CONFIG_SLHC=y # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set--#-# ISDN subsystem-# # CONFIG_ISDN is not set--#-# Telephony Support-# # CONFIG_PHONE is not set #
@@ -501,6 +574,7 @@ CONFIG_MOUSE_PS2_TRACKPOINT=y CONFIG_SERIO=y # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y+# CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y # CONFIG_SERIO_RAW is not set # CONFIG_GAMEPORT is not set
@@ -530,24 +604,21 @@ CONFIG_SERIAL_CPM_SCC1=y CONFIG_SERIAL_CPM_SCC4=y # CONFIG_SERIAL_CPM_SMC1 is not set # CONFIG_SERIAL_CPM_SMC2 is not set+# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256--#-# IPMI-# # CONFIG_IPMI_HANDLER is not set # CONFIG_WATCHDOG is not set CONFIG_HW_RANDOM=y # CONFIG_NVRAM is not set # CONFIG_GEN_RTC is not set # CONFIG_R3964 is not set+# CONFIG_APPLICOM is not set+# CONFIG_AGP is not set+# CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set--#-# TPM devices-#+CONFIG_DEVPORT=y # CONFIG_I2C is not set #
@@ -555,11 +626,8 @@ CONFIG_HW_RANDOM=y # # CONFIG_SPI is not set # CONFIG_SPI_MASTER is not set--#-# Dallas's 1-wire bus-# # CONFIG_W1 is not set+# CONFIG_POWER_SUPPLY is not set # CONFIG_HWMON is not set #
@@ -584,6 +652,7 @@ CONFIG_DAB=y # # CONFIG_DISPLAY_SUPPORT is not set # CONFIG_VGASTATE is not set+# CONFIG_VIDEO_OUTPUT_CONTROL is not set # CONFIG_FB is not set # CONFIG_FB_IBM_GXT4500 is not set
@@ -591,64 +660,16 @@ CONFIG_DAB=y # Sound # # CONFIG_SOUND is not set--#-# HID Devices-#-CONFIG_HID=y-# CONFIG_HID_DEBUG is not set--#-# USB support-#-# CONFIG_USB_ARCH_HAS_HCD is not set-# CONFIG_USB_ARCH_HAS_OHCI is not set-# CONFIG_USB_ARCH_HAS_EHCI is not set--#-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'-#--#-# USB Gadget Support-#-CONFIG_USB_GADGET=y-# CONFIG_USB_GADGET_DEBUG_FILES is not set-# CONFIG_USB_GADGET_FSL_USB2 is not set-# CONFIG_USB_GADGET_NET2280 is not set-# CONFIG_USB_GADGET_PXA2XX is not set-# CONFIG_USB_GADGET_GOKU is not set-# CONFIG_USB_GADGET_LH7A40X is not set-# CONFIG_USB_GADGET_OMAP is not set-# CONFIG_USB_GADGET_AT91 is not set-# CONFIG_USB_GADGET_DUMMY_HCD is not set-# CONFIG_USB_GADGET_DUALSPEED is not set+# CONFIG_HID_SUPPORT is not set+# CONFIG_USB_SUPPORT is not set # CONFIG_MMC is not set--#-# LED devices-# # CONFIG_NEW_LEDS is not set--#-# LED drivers-#--#-# LED Triggers-#--#-# InfiniBand support-#--#-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)-#+# CONFIG_INFINIBAND is not set # # Real Time Clock #+# CONFIG_RTC_CLASS is not set # # DMA Engine support
@@ -664,6 +685,11 @@ CONFIG_USB_GADGET=y # #+# Userspace I/O+#+# CONFIG_UIO is not set++# # File systems # CONFIG_EXT2_FS=y
@@ -679,11 +705,7 @@ CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y-CONFIG_XFS_FS=y-# CONFIG_XFS_QUOTA is not set-# CONFIG_XFS_SECURITY is not set-# CONFIG_XFS_POSIX_ACL is not set-# CONFIG_XFS_RT is not set+# CONFIG_XFS_FS is not set # CONFIG_OCFS2_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set
@@ -724,6 +746,7 @@ CONFIG_RAMFS=y # Miscellaneous filesystems # # CONFIG_HFSPLUS_FS is not set+# CONFIG_JFFS2_FS is not set CONFIG_CRAMFS=y # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set
@@ -745,8 +768,7 @@ CONFIG_LOCKD_V4=y CONFIG_NFS_ACL_SUPPORT=y CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y-CONFIG_SMB_FS=y-# CONFIG_SMB_NLS_DEFAULT is not set+# CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set
@@ -826,6 +848,7 @@ CONFIG_CRC_CCITT=y # CONFIG_CRC16 is not set # CONFIG_CRC_ITU_T is not set CONFIG_CRC32=y+# CONFIG_CRC7 is not set # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y
@@ -839,13 +862,14 @@ CONFIG_HAS_DMA=y # # CONFIG_PRINTK_TIME is not set CONFIG_ENABLE_MUST_CHECK=y-# CONFIG_MAGIC_SYSRQ is not set+CONFIG_MAGIC_SYSRQ=y # CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_FS is not set # CONFIG_HEADERS_CHECK is not set CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_SHIRQ is not set CONFIG_DETECT_SOFTLOCKUP=y+CONFIG_SCHED_DEBUG=y # CONFIG_SCHEDSTATS is not set # CONFIG_TIMER_STATS is not set # CONFIG_DEBUG_SLAB is not set
@@ -856,7 +880,7 @@ CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set-# CONFIG_DEBUG_BUGVERBOSE is not set+CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y # CONFIG_DEBUG_VM is not set # CONFIG_DEBUG_LIST is not set
@@ -868,7 +892,6 @@ CONFIG_FORCED_INLINING=y # CONFIG_DEBUGGER is not set # CONFIG_KGDB_CONSOLE is not set CONFIG_BDI_SWITCH=y-# CONFIG_BOOTX_TEXT is not set # CONFIG_PPC_EARLY_DEBUG is not set #
@@ -876,10 +899,6 @@ CONFIG_BDI_SWITCH=y # # CONFIG_KEYS is not set # CONFIG_SECURITY is not set--#-# Cryptographic options-# CONFIG_CRYPTO=y CONFIG_CRYPTO_ALGAPI=y CONFIG_CRYPTO_BLKCIPHER=y
@@ -913,7 +932,4 @@ CONFIG_CRYPTO_DES=y # CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_CRC32C is not set # CONFIG_CRYPTO_CAMELLIA is not set--#-# Hardware crypto devices-#+# CONFIG_CRYPTO_HW is not set
@@ -2,3 +2,5 @@# Makefile for the PowerPC 82xx linux kernel.#obj-$(CONFIG_MPC8272_ADS)+=mpc8272_ads.o+obj-$(CONFIG_CPM2)+=pq2.o+obj-$(CONFIG_PQ2_ADS_PCI_PIC)+=pq2ads-pci-pic.o
@@ -12,623 +13,189 @@*option)anylaterversion.*/-#include<linux/stddef.h>-#include<linux/kernel.h>#include<linux/init.h>-#include<linux/errno.h>-#include<linux/reboot.h>-#include<linux/pci.h>#include<linux/interrupt.h>-#include<linux/kdev_t.h>-#include<linux/major.h>-#include<linux/console.h>-#include<linux/delay.h>-#include<linux/seq_file.h>-#include<linux/root_dev.h>-#include<linux/initrd.h>-#include<linux/module.h>#include<linux/fsl_devices.h>-#include<linux/fs_uart_pd.h>+#include<linux/of_platform.h>+#include<linux/io.h>-#include<asm/system.h>-#include<asm/pgtable.h>-#include<asm/page.h>-#include<asm/atomic.h>-#include<asm/time.h>-#include<asm/io.h>-#include<asm/machdep.h>-#include<asm/pci-bridge.h>-#include<asm/mpc8260.h>-#include<asm/irq.h>-#include<mm/mmu_decl.h>-#include<asm/prom.h>#include<asm/cpm2.h>#include<asm/udbg.h>-#include<asm/i8259.h>-#include<linux/fs_enet_pd.h>+#include<asm/machdep.h>+#include<asm/time.h>++#include<platforms/82xx/pq2.h>#include<sysdev/fsl_soc.h>#include<sysdev/cpm2_pic.h>+#include<sysdev/cpm_common.h>#include"pq2ads.h"--#ifdef CONFIG_PCI-staticuintpci_clk_frq;-staticstruct{-unsignedlong*pci_int_stat_reg;-unsignedlong*pci_int_mask_reg;-}pci_regs;--staticunsignedlongpci_int_base;-staticstructirq_host*pci_pic_host;-staticstructdevice_node*pci_pic_node;-#endif+#include"pq2.h"staticvoid__initmpc8272_ads_pic_init(void){-structdevice_node*np=of_find_compatible_node(NULL,"cpm-pic","CPM2");-structresourcer;-cpm2_map_t*cpm_reg;--if(np==NULL){+structdevice_node*np=of_find_compatible_node(NULL,NULL,+"fsl,pq2-pic");+if(!np){printk(KERN_ERR"PIC init: can not find cpm-pic node\n");return;}-if(of_address_to_resource(np,0,&r)){-printk(KERN_ERR"PIC init: invalid resource\n");-of_node_put(np);-return;-}+cpm2_pic_init(np);of_node_put(np);-/* Initialize the default interrupt mapping priorities,-*incasethebootromchangedsomethingonus.-*/-cpm_reg=(cpm2_map_t*)ioremap(get_immrbase(),sizeof(cpm2_map_t));-cpm_reg->im_intctl.ic_siprr=0x05309770;-iounmap(cpm_reg);-#ifdef CONFIG_PCI/* Initialize stuff for the 82xx CPLD IC and install demux */-m82xx_pci_init_irq();-#endif+pq2ads_pci_init_irq();}-staticvoidinit_fcc1_ioports(structfs_platform_info*fpi)-{-structio_port*io;-u32tempval;-cpm2_map_t*immap=ioremap(get_immrbase(),sizeof(cpm2_map_t));-structdevice_node*np;-structresourcer;-u32*bcsr;--np=of_find_node_by_type(NULL,"memory");-if(!np){-printk(KERN_INFO"No memory node in device tree\n");-return;-}-if(of_address_to_resource(np,1,&r)){-printk(KERN_INFO"No memory reg property [1] in devicetree\n");-return;-}-of_node_put(np);-bcsr=ioremap(r.start+4,sizeof(u32));-io=&immap->im_ioport;--/* Enable the PHY */-clrbits32(bcsr,BCSR1_FETHIEN);-setbits32(bcsr,BCSR1_FETH_RST);--/* FCC1 pins are on port A/C. */-/* Configure port A and C pins for FCC1 Ethernet. */--tempval=in_be32(&io->iop_pdira);-tempval&=~PA1_DIRA0;-tempval|=PA1_DIRA1;-out_be32(&io->iop_pdira,tempval);--tempval=in_be32(&io->iop_psora);-tempval&=~PA1_PSORA0;-tempval|=PA1_PSORA1;-out_be32(&io->iop_psora,tempval);--setbits32(&io->iop_ppara,PA1_DIRA0|PA1_DIRA1);--/* Alter clocks */-tempval=PC_CLK(fpi->clk_tx-8)|PC_CLK(fpi->clk_rx-8);--clrbits32(&io->iop_psorc,tempval);-clrbits32(&io->iop_pdirc,tempval);-setbits32(&io->iop_pparc,tempval);--cpm2_clk_setup(CPM_CLK_FCC1,fpi->clk_rx,CPM_CLK_RX);-cpm2_clk_setup(CPM_CLK_FCC1,fpi->clk_tx,CPM_CLK_TX);+structcpm_pin{+intport,pin,flags;+};-iounmap(bcsr);-iounmap(immap);-}+staticstructcpm_pinmpc8272_ads_pins[]={+/* SCC1 */+{3,30,CPM_PIN_OUTPUT|CPM_PIN_SECONDARY},+{3,31,CPM_PIN_INPUT|CPM_PIN_PRIMARY},++/* SCC4 */+{3,21,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{3,22,CPM_PIN_INPUT|CPM_PIN_PRIMARY},++/* FCC1 */+{0,14,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{0,15,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{0,16,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{0,17,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{0,18,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{0,19,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{0,20,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{0,21,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{0,26,CPM_PIN_INPUT|CPM_PIN_SECONDARY},+{0,27,CPM_PIN_INPUT|CPM_PIN_SECONDARY},+{0,28,CPM_PIN_OUTPUT|CPM_PIN_SECONDARY},+{0,29,CPM_PIN_OUTPUT|CPM_PIN_SECONDARY},+{0,30,CPM_PIN_INPUT|CPM_PIN_SECONDARY},+{0,31,CPM_PIN_INPUT|CPM_PIN_SECONDARY},+{2,21,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{2,22,CPM_PIN_INPUT|CPM_PIN_PRIMARY},++/* FCC2 */+{1,18,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,19,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,20,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,21,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,22,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{1,23,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{1,24,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{1,25,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{1,26,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,27,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,28,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,29,CPM_PIN_OUTPUT|CPM_PIN_SECONDARY},+{1,30,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{1,31,CPM_PIN_OUTPUT|CPM_PIN_PRIMARY},+{2,16,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+{2,17,CPM_PIN_INPUT|CPM_PIN_PRIMARY},+};-staticvoidinit_fcc2_ioports(structfs_platform_info*fpi)+staticvoid__initinit_ioports(void){-cpm2_map_t*immap=ioremap(get_immrbase(),sizeof(cpm2_map_t));-structdevice_node*np;-structresourcer;-u32*bcsr;--structio_port*io;-u32tempval;--np=of_find_node_by_type(NULL,"memory");-if(!np){-printk(KERN_INFO"No memory node in device tree\n");-return;-}-if(of_address_to_resource(np,1,&r)){-printk(KERN_INFO"No memory reg property [1] in devicetree\n");-return;-}-of_node_put(np);-io=&immap->im_ioport;-bcsr=ioremap(r.start+12,sizeof(u32));--/* Enable the PHY */-clrbits32(bcsr,BCSR3_FETHIEN2);-setbits32(bcsr,BCSR3_FETH2_RST);--/* FCC2 are port B/C. */-/* Configure port A and C pins for FCC2 Ethernet. */--tempval=in_be32(&io->iop_pdirb);-tempval&=~PB2_DIRB0;-tempval|=PB2_DIRB1;-out_be32(&io->iop_pdirb,tempval);--tempval=in_be32(&io->iop_psorb);-tempval&=~PB2_PSORB0;-tempval|=PB2_PSORB1;-out_be32(&io->iop_psorb,tempval);--setbits32(&io->iop_pparb,PB2_DIRB0|PB2_DIRB1);--tempval=PC_CLK(fpi->clk_tx-8)|PC_CLK(fpi->clk_rx-8);--/* Alter clocks */-clrbits32(&io->iop_psorc,tempval);-clrbits32(&io->iop_pdirc,tempval);-setbits32(&io->iop_pparc,tempval);--cpm2_clk_setup(CPM_CLK_FCC2,fpi->clk_rx,CPM_CLK_RX);-cpm2_clk_setup(CPM_CLK_FCC2,fpi->clk_tx,CPM_CLK_TX);--iounmap(bcsr);-iounmap(immap);-}+inti;-voidinit_fcc_ioports(structfs_platform_info*fpi)-{-intfcc_no=fs_get_fcc_index(fpi->fs_no);--switch(fcc_no){-case0:-init_fcc1_ioports(fpi);-break;-case1:-init_fcc2_ioports(fpi);-break;-default:-printk(KERN_ERR"init_fcc_ioports: invalid FCC number\n");-return;+for(i=0;i<ARRAY_SIZE(mpc8272_ads_pins);i++){+structcpm_pin*pin=&mpc8272_ads_pins[i];+cpm2_set_pin(pin->port,pin->pin,pin->flags);}-}-staticvoidinit_scc1_uart_ioports(structfs_uart_platform_info*data)-{-cpm2_map_t*immap=ioremap(get_immrbase(),sizeof(cpm2_map_t));--/* SCC1 is only on port D */-setbits32(&immap->im_ioport.iop_ppard,0x00000003);-clrbits32(&immap->im_ioport.iop_psord,0x00000001);-setbits32(&immap->im_ioport.iop_psord,0x00000002);-clrbits32(&immap->im_ioport.iop_pdird,0x00000001);-setbits32(&immap->im_ioport.iop_pdird,0x00000002);--clrbits32(&immap->im_cpmux.cmx_scr,(0x00000007<<(4-data->clk_tx)));-clrbits32(&immap->im_cpmux.cmx_scr,(0x00000038<<(4-data->clk_rx)));-setbits32(&immap->im_cpmux.cmx_scr,-((data->clk_tx-1)<<(4-data->clk_tx)));-setbits32(&immap->im_cpmux.cmx_scr,-((data->clk_rx-1)<<(4-data->clk_rx)));--iounmap(immap);+cpm2_clk_setup(CPM_CLK_SCC1,CPM_BRG1,CPM_CLK_RX);+cpm2_clk_setup(CPM_CLK_SCC1,CPM_BRG1,CPM_CLK_TX);+cpm2_clk_setup(CPM_CLK_SCC4,CPM_BRG4,CPM_CLK_RX);+cpm2_clk_setup(CPM_CLK_SCC4,CPM_BRG4,CPM_CLK_TX);+cpm2_clk_setup(CPM_CLK_FCC1,CPM_CLK11,CPM_CLK_RX);+cpm2_clk_setup(CPM_CLK_FCC1,CPM_CLK10,CPM_CLK_TX);+cpm2_clk_setup(CPM_CLK_FCC2,CPM_CLK15,CPM_CLK_RX);+cpm2_clk_setup(CPM_CLK_FCC2,CPM_CLK16,CPM_CLK_TX);}-staticvoidinit_scc4_uart_ioports(structfs_uart_platform_info*data)+staticvoid__initmpc8272_ads_setup_arch(void){-cpm2_map_t*immap=ioremap(get_immrbase(),sizeof(cpm2_map_t));--setbits32(&immap->im_ioport.iop_ppard,0x00000600);-clrbits32(&immap->im_ioport.iop_psord,0x00000600);-clrbits32(&immap->im_ioport.iop_pdird,0x00000200);-setbits32(&immap->im_ioport.iop_pdird,0x00000400);--clrbits32(&immap->im_cpmux.cmx_scr,(0x00000007<<(4-data->clk_tx)));-clrbits32(&immap->im_cpmux.cmx_scr,(0x00000038<<(4-data->clk_rx)));-setbits32(&immap->im_cpmux.cmx_scr,-((data->clk_tx-1)<<(4-data->clk_tx)));-setbits32(&immap->im_cpmux.cmx_scr,-((data->clk_rx-1)<<(4-data->clk_rx)));--iounmap(immap);-}+structdevice_node*np;+__be32__iomem*bcsr;-voidinit_scc_ioports(structfs_uart_platform_info*data)-{-intscc_no=fs_get_scc_index(data->fs_no);--switch(scc_no){-case0:-init_scc1_uart_ioports(data);-data->brg=data->clk_rx;-break;-case3:-init_scc4_uart_ioports(data);-data->brg=data->clk_rx;-break;-default:-printk(KERN_ERR"init_scc_ioports: invalid SCC number\n");-return;-}-}+if(ppc_md.progress)+ppc_md.progress("mpc8272_ads_setup_arch()",0);-void__initm82xx_board_setup(void)-{-cpm2_map_t*immap=ioremap(get_immrbase(),sizeof(cpm2_map_t));-structdevice_node*np;-structresourcer;-u32*bcsr;+cpm2_reset();-np=of_find_node_by_type(NULL,"memory");+np=of_find_compatible_node(NULL,NULL,"fsl,mpc8272ads-bcsr");if(!np){-printk(KERN_INFO"No memory node in device tree\n");+printk(KERN_ERR"No bcsr in device tree\n");return;}-if(of_address_to_resource(np,1,&r)){-printk(KERN_INFO"No memory reg property [1] in devicetree\n");++bcsr=of_iomap(np,0);+if(!bcsr){+printk(KERN_ERR"Cannot map BCSR registers\n");return;}+of_node_put(np);-bcsr=ioremap(r.start+4,sizeof(u32));-/* Enable the 2nd UART port */-clrbits32(bcsr,BCSR1_RS232_EN2);--#ifdef CONFIG_SERIAL_CPM_SCC1-clrbits32((u32*)&immap->im_scc[0].scc_sccm,-UART_SCCM_TX|UART_SCCM_RX);-clrbits32((u32*)&immap->im_scc[0].scc_gsmrl,-SCC_GSMRL_ENR|SCC_GSMRL_ENT);-#endif-#ifdef CONFIG_SERIAL_CPM_SCC2-clrbits32((u32*)&immap->im_scc[1].scc_sccm,-UART_SCCM_TX|UART_SCCM_RX);-clrbits32((u32*)&immap->im_scc[1].scc_gsmrl,-SCC_GSMRL_ENR|SCC_GSMRL_ENT);-#endif+clrbits32(&bcsr[1],BCSR1_RS232_EN1|BCSR1_RS232_EN2|BCSR1_FETHIEN);+setbits32(&bcsr[1],BCSR1_FETH_RST);-#ifdef CONFIG_SERIAL_CPM_SCC3-clrbits32((u32*)&immap->im_scc[2].scc_sccm,-UART_SCCM_TX|UART_SCCM_RX);-clrbits32((u32*)&immap->im_scc[2].scc_gsmrl,-SCC_GSMRL_ENR|SCC_GSMRL_ENT);-#endif--#ifdef CONFIG_SERIAL_CPM_SCC4-clrbits32((u32*)&immap->im_scc[3].scc_sccm,-UART_SCCM_TX|UART_SCCM_RX);-clrbits32((u32*)&immap->im_scc[3].scc_gsmrl,-SCC_GSMRL_ENR|SCC_GSMRL_ENT);-#endif+clrbits32(&bcsr[3],BCSR3_FETHIEN2);+setbits32(&bcsr[3],BCSR3_FETH2_RST);iounmap(bcsr);-iounmap(immap);-}--#ifdef CONFIG_PCI-staticvoidm82xx_pci_mask_irq(unsignedintirq)-{-intbit=irq-pci_int_base;--*pci_regs.pci_int_mask_reg|=(1<<(31-bit));-return;-}--staticvoidm82xx_pci_unmask_irq(unsignedintirq)-{-intbit=irq-pci_int_base;--*pci_regs.pci_int_mask_reg&=~(1<<(31-bit));-return;-}--staticvoidm82xx_pci_mask_and_ack(unsignedintirq)-{-intbit=irq-pci_int_base;--*pci_regs.pci_int_mask_reg|=(1<<(31-bit));-return;-}-staticvoidm82xx_pci_end_irq(unsignedintirq)-{-intbit=irq-pci_int_base;+init_ioports();+pq2_init_pci();-*pci_regs.pci_int_mask_reg&=~(1<<(31-bit));-return;+if(ppc_md.progress)+ppc_md.progress("mpc8272_ads_setup_arch(), finish",0);}-structhw_interrupt_typem82xx_pci_ic={-.typename="MPC82xx ADS PCI",-.name="MPC82xx ADS PCI",-.enable=m82xx_pci_unmask_irq,-.disable=m82xx_pci_mask_irq,-.ack=m82xx_pci_mask_and_ack,-.end=m82xx_pci_end_irq,-.mask=m82xx_pci_mask_irq,-.mask_ack=m82xx_pci_mask_and_ack,-.unmask=m82xx_pci_unmask_irq,-.eoi=m82xx_pci_end_irq,+staticstructof_device_id__initdataof_bus_ids[]={+{.name="soc",},+{.name="cpm",},+{.compatible="fsl,pq2-chipselect",},+{},};-staticvoid-m82xx_pci_irq_demux(unsignedintirq,structirq_desc*desc)+staticint__initdeclare_of_platform_devices(void){-unsignedlongstat,mask,pend;-intbit;--for(;;){-stat=*pci_regs.pci_int_stat_reg;-mask=*pci_regs.pci_int_mask_reg;-pend=stat&~mask&0xf0000000;-if(!pend)-break;-for(bit=0;pend!=0;++bit,pend<<=1){-if(pend&0x80000000)-__do_IRQ(pci_int_base+bit);-}-}-}--staticintpci_pic_host_match(structirq_host*h,structdevice_node*node)-{-returnnode==pci_pic_node;-}+if(!machine_is(mpc8272_ads))+return0;-staticintpci_pic_host_map(structirq_host*h,unsignedintvirq,-irq_hw_number_thw)-{-get_irq_desc(virq)->status|=IRQ_LEVEL;-set_irq_chip(virq,&m82xx_pci_ic);+/* Publish the QE devices */+of_platform_bus_probe(NULL,of_bus_ids,NULL);return0;}--staticvoidpci_host_unmap(structirq_host*h,unsignedintvirq)-{-/* remove chip and handler */-set_irq_chip(virq,NULL);-}--staticstructirq_host_opspci_pic_host_ops={-.match=pci_pic_host_match,-.map=pci_pic_host_map,-.unmap=pci_host_unmap,-};--voidm82xx_pci_init_irq(void)-{-intirq;-cpm2_map_t*immap;-structdevice_node*np;-structresourcer;-constu32*regs;-unsignedintsize;-constu32*irq_map;-inti;-unsignedintirq_max,irq_min;--if((np=of_find_node_by_type(NULL,"soc"))==NULL){-printk(KERN_INFO"No SOC node in device tree\n");-return;-}-memset(&r,0,sizeof(r));-if(of_address_to_resource(np,0,&r)){-printk(KERN_INFO"No SOC reg property in device tree\n");-return;-}-immap=ioremap(r.start,sizeof(*immap));-of_node_put(np);--/* install the demultiplexer for the PCI cascade interrupt */-np=of_find_node_by_type(NULL,"pci");-if(!np){-printk(KERN_INFO"No pci node on device tree\n");-iounmap(immap);-return;-}-irq_map=of_get_property(np,"interrupt-map",&size);-if((!irq_map)||(size<=7)){-printk(KERN_INFO"No interrupt-map property of pci node\n");-iounmap(immap);-return;-}-size/=sizeof(irq_map[0]);-for(i=0,irq_max=0,irq_min=512;i<size;i+=7,irq_map+=7){-if(irq_map[5]<irq_min)-irq_min=irq_map[5];-if(irq_map[5]>irq_max)-irq_max=irq_map[5];-}-pci_int_base=irq_min;-irq=irq_of_parse_and_map(np,0);-set_irq_chained_handler(irq,m82xx_pci_irq_demux);-of_node_put(np);-np=of_find_node_by_type(NULL,"pci-pic");-if(!np){-printk(KERN_INFO"No pci pic node on device tree\n");-iounmap(immap);-return;-}-pci_pic_node=of_node_get(np);-/* PCI interrupt controller registers: status and mask */-regs=of_get_property(np,"reg",&size);-if((!regs)||(size<=2)){-printk(KERN_INFO"No reg property in pci pic node\n");-iounmap(immap);-return;-}-pci_regs.pci_int_stat_reg=-ioremap(regs[0],sizeof(*pci_regs.pci_int_stat_reg));-pci_regs.pci_int_mask_reg=-ioremap(regs[1],sizeof(*pci_regs.pci_int_mask_reg));-of_node_put(np);-/* configure chip select for PCI interrupt controller */-immap->im_memctl.memc_br3=regs[0]|0x00001801;-immap->im_memctl.memc_or3=0xffff8010;-/* make PCI IRQ level sensitive */-immap->im_intctl.ic_siexr&=~(1<<(14-(irq-SIU_INT_IRQ1)));--/* mask all PCI interrupts */-*pci_regs.pci_int_mask_reg|=0xfff00000;-iounmap(immap);-pci_pic_host=-irq_alloc_host(IRQ_HOST_MAP_LINEAR,irq_max-irq_min+1,-&pci_pic_host_ops,irq_max+1);-return;-}--staticintm82xx_pci_exclude_device(structpci_controller*hose,-u_charbus,u_chardevfn)-{-if(bus==0&&PCI_SLOT(devfn)==0)-returnPCIBIOS_DEVICE_NOT_FOUND;-else-returnPCIBIOS_SUCCESSFUL;-}--staticvoid__initmpc82xx_add_bridge(structdevice_node*np)-{-intlen;-structpci_controller*hose;-structresourcer;-constint*bus_range;-constuint*ptr;--memset(&r,0,sizeof(r));-if(of_address_to_resource(np,0,&r)){-printk(KERN_INFO"No PCI reg property in device tree\n");-return;-}-if(!(ptr=of_get_property(np,"clock-frequency",NULL))){-printk(KERN_INFO"No clock-frequency property in PCI node");-return;-}-pci_clk_frq=*ptr;-of_node_put(np);-bus_range=of_get_property(np,"bus-range",&len);-if(bus_range==NULL||len<2*sizeof(int)){-printk(KERN_WARNING"Can't get bus-range for %s, assume"-" bus 0\n",np->full_name);-}--pci_assign_all_buses=1;--hose=pcibios_alloc_controller(np);--if(!hose)-return;--hose->first_busno=bus_range?bus_range[0]:0;-hose->last_busno=bus_range?bus_range[1]:0xff;--setup_indirect_pci(hose,-r.start+offsetof(pci_cpm2_t,pci_cfg_addr),-r.start+offsetof(pci_cpm2_t,pci_cfg_data),-0);--pci_process_bridge_OF_ranges(hose,np,1);-}-#endif--/*-*Setupthearchitecture-*/-staticvoid__initmpc8272_ads_setup_arch(void)-{-#ifdef CONFIG_PCI-structdevice_node*np;-#endif--if(ppc_md.progress)-ppc_md.progress("mpc8272_ads_setup_arch()",0);-cpm2_reset();--/* Map I/O region to a 256MB BAT */--m82xx_board_setup();--#ifdef CONFIG_PCI-ppc_md.pci_exclude_device=m82xx_pci_exclude_device;-for(np=NULL;(np=of_find_node_by_type(np,"pci"))!=NULL;)-mpc82xx_add_bridge(np);--of_node_put(np);-#endif--#ifdef CONFIG_ROOT_NFS-ROOT_DEV=Root_NFS;-#else-ROOT_DEV=Root_HDA1;-#endif--if(ppc_md.progress)-ppc_md.progress("mpc8272_ads_setup_arch(), finish",0);-}+device_initcall(declare_of_platform_devices);/**Calledveryearly,device-treeisn'tunflattened*/staticint__initmpc8272_ads_probe(void){-/* We always match for now, eventually we should look at-*theflatdevtreetoensurethisistheboardweare-*supposedtorunon-*/-return1;-}--#define RMR_CSRE 0x00000001-staticvoidm82xx_restart(char*cmd)-{-__volatile__unsignedchardummy;--local_irq_disable();-((cpm2_map_t*)cpm2_immr)->im_clkrst.car_rmr|=RMR_CSRE;--/* Clear the ME,EE,IR & DR bits in MSR to cause checkstop */-mtmsr(mfmsr()&~(MSR_ME|MSR_EE|MSR_IR|MSR_DR));-dummy=((cpm2_map_t*)cpm2_immr)->im_clkrst.res[0];-printk("Restart failed\n");-while(1);+unsignedlongroot=of_get_flat_dt_root();+returnof_flat_dt_is_compatible(root,"fsl,mpc8272ads");}define_machine(mpc8272_ads){-.name="MPC8272 ADS",+.name="Freescale MPC8272 ADS",.probe=mpc8272_ads_probe,.setup_arch=mpc8272_ads_setup_arch,.init_IRQ=mpc8272_ads_pic_init,-.show_cpuinfo=mpc8272_ads_show_cpuinfo,.get_irq=cpm2_get_irq,.calibrate_decr=generic_calibrate_decr,-.restart=m82xx_restart,+.restart=pq2_restart,+.progress=udbg_progress,};++#ifdef CONFIG_PPC_EARLY_DEBUG_CPM+u32__iomem*cpm_udbg_txdesc=(u32__iomem__force*)0xf0000808;+#endif
@@ -0,0 +1,93 @@+/*+*CommonPowerQUICCIIcode.+*+*Author:ScottWood<scottwood@freescale.com>+*Copyright(c)2007FreescaleSemiconductor+*+*BasedoncodebyVitalyBordug<vbordug@ru.mvista.com>+*pq2_restartfixbyWadeFarnsworth<wfarnsworth@mvista.com>+*Copyright(c)2006MontaVistaSoftware,Inc.+*+*Thisprogramisfreesoftware;youcanredistributeitand/ormodifyit+*underthetermsoftheGNUGeneralPublicLicenseaspublishedbythe+*FreeSoftwareFoundation;eitherversion2oftheLicense,or(atyour+*option)anylaterversion.+*/++#include<asm/cpm2.h>+#include<asm/io.h>+#include<asm/pci-bridge.h>+#include<asm/system.h>++#include<platforms/82xx/pq2.h>++#define RMR_CSRE 0x00000001++voidpq2_restart(char*cmd)+{+local_irq_disable();+setbits32(&cpm2_immr->im_clkrst.car_rmr,RMR_CSRE);++/* Clear the ME,EE,IR & DR bits in MSR to cause checkstop */+mtmsr(mfmsr()&~(MSR_ME|MSR_EE|MSR_IR|MSR_DR));+in_8(&cpm2_immr->im_clkrst.res[0]);++panic("Restart failed\n");+}++#ifdef CONFIG_PCI+staticintpq2_pci_exclude_device(structpci_controller*hose,+u_charbus,u8devfn)+{+if(bus==0&&PCI_SLOT(devfn)==0)+returnPCIBIOS_DEVICE_NOT_FOUND;+else+returnPCIBIOS_SUCCESSFUL;+}++staticvoid__initpq2_pci_add_bridge(structdevice_node*np)+{+structpci_controller*hose;+structresourcer;+constu32*bus_ph;+void*bus_np;+intsize;++if(of_address_to_resource(np,0,&r)||r.end-r.start<0x10b)+gotoerr;++bus_ph=of_get_property(np,"fsl,bus",&size);+if(!bus_ph||size!=4)+gotoerr;++bus_np=of_find_node_by_phandle(*bus_ph);+if(!bus_np)+gotoerr;++pci_assign_all_buses=1;++hose=pcibios_alloc_controller(bus_np);+if(!hose)+return;++hose->arch_data=bus_np;++setup_indirect_pci(hose,r.start+0x100,r.start+0x104,0);+pci_process_bridge_OF_ranges(hose,bus_np,1);++return;++err:+printk(KERN_ERR"No valid PCI reg property in device tree\n");+}++void__initpq2_init_pci(void)+{+structdevice_node*np=NULL;++ppc_md.pci_exclude_device=pq2_pci_exclude_device;++while((np=of_find_compatible_node(np,NULL,"fsl,pq2-pci")))+pq2_pci_add_bridge(np);+}+#endif
From: David Gibson <hidden> Date: 2007-08-29 05:30:22
Hrm.. in future could you add a separate 0/N for each of your series,
and make sure the In-Reply-To fields are right... as it is, my mailer
has threaded together these 4 or so patch series you posted into one
great wodge.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
From: David Gibson <hidden> Date: 2007-08-29 05:39:41
On Tue, Aug 28, 2007 at 03:16:19PM -0500, Scott Wood wrote:
This introduces a new device binding for the CPM and other devices on
these boards. Some of the changes include:
1. Proper namespace scoping for Freescale compatibles and properties.
2. Use compatible rather than things like device_type and model
to determine which particular variant of a device is present.
3. Give the drivers the relevant CPM command word directly, rather than
requiring it to have a lookup table based on device-id, SCC v. SMC, and
CPM version.
4. Specify the CPCR and the usable DPRAM region in the CPM's reg property.
Boards that do not require the legacy bindings should select
CONFIG_PPC_CPM_NEW_BINDING to enable the of_platform CPM devices. Once
all existing boards are converted and tested, the config option can
become default y to prevent new boards from using the old model. Once
arch/ppc is gone, the config option can be removed altogether.
I think it would be better to change the name and reverse the sense of
this config option, since what it actually does is disable the old
binding, not enable the new one.
[snip]
quoted hunk
@@ -1824,6 +1827,170 @@ platforms are moved over to use the flattened-device-tree model. fsl,has-rstcr; };+ l) Freescale Communications Processor Module++ NOTE: This is an interim binding, and will likely change slightly,+ as more devices are supported. The QE bindings especially are+ incomplete.++ i) Root CPM node++ Properties:+ - compatible : "fsl,cpm1", "fsl,cpm2", or "fsl,qe".+ - reg : The first resource is a 48-byte region beginning with+ CPCR. The second is the available general-purpose+ DPRAM.+ - fsl,brg-frequency : the internal clock source frequency for baud-rate+ generators in Hz.++ Example:+ cpm@119c0 {+ #address-cells = <1>;+ #size-cells = <1>;+ #interrupt-cells = <2>;+ compatible = "fsl,mpc8272-cpm", "fsl,cpm2";+ reg = <119c0 30 0 2000>;+ bus-frequency = <d#25000000>;+ }
Your example has bus-frequency, but lacks fsl,brg-frequency, in
contrast to the description above.
Since you have a separate brg node defined below, maybe
fsl,brg-frequency should just be replaced with a 'clock-frequency'
property in that subnode.
+ ii) Properties common to mulitple CPM/QE devices
+
+ - fsl,cpm-command : This value is ORed with the opcode and command flag
+ to specify the device on which a CPM command operates.
+
+ - fsl,cpm-brg : Indicates which baud rate generator the device
+ is associated with. If absent, an unused BRG
+ should be dynamically allocated.
Maybe a property with the brg node's phandle could be included as
well, to avoid having to hop up to the CPM node, then back down to the
brg-compatible node to find it?
Or maybe even have a separate subnode for each brg, and just have a
phandle to reference it from the other devices, rather than using this
index.
Should this also have a phandle pointer to the mdio node?
+ iv) MDIO
+
+ Currently defined compatibles:
+ fsl,pq1-fec-mdio (reg is same as first resource of FEC device)
+ fsl,cpm2-mdio-bitbang (reg is port C registers)
+
+ Properties for fsl,cpm2-mdio-bitbang:
+ fsl,mdio-pin : pin of port C controlling mdio data
+ fsl,mdc-pin : pin of port C controlling mdio clock
+
+ Example:
+
+ mdio@10d40 {
+ device_type = "mdio";
+ compatible = "fsl,mpc8272ads-mdio-bitbang",
+ "fsl,mpc8272-mdio-bitbang",
+ "fsl,cpm2-mdio-bitbang";
+ reg = <10d40 14>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ fsl,mdio-pin = <12>;
+ fsl,mdc-pin = <13>;
+ };
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
@@ -211,6 +211,15 @@ config PPC_EARLY_DEBUG_44xSelectthistoenableearlydebuggingforIBM44xchipsviatheinbuiltserialport.+configPPC_EARLY_DEBUG_CPM+bool"Early serial debugging for Freescale CPM-based serial ports"+depends onSERIAL_CPM+selectPIN_TLBifPPC_8xx
I see this Kconfig line, but I don't see any code below that would set
up a suitable TLB on 8xx for the CPM...?
[snip]
Urg... this is ugly, because it looks like it can be muti-platform,
but actually isn't. I think a better approach is to set the magic
address as a Kconfig variable, as we do on 44x. This approach can
also be useful for hacking up early debug for new chips during the
process of creating platform code for them.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
From: David Gibson <hidden> Date: 2007-08-29 05:55:12
On Tue, Aug 28, 2007 at 03:19:26PM -0500, Scott Wood wrote:
quoted hunk
This is just a rename patch; internal references to mpc82xx_ads will be
changed in the next one.
Signed-off-by: Scott Wood <redacted>
---
arch/powerpc/platforms/82xx/Kconfig | 8 ++++----
arch/powerpc/platforms/82xx/Makefile | 2 +-
.../82xx/{mpc82xx_ads.c => mpc8272_ads.c} | 0
3 files changed, 5 insertions(+), 5 deletions(-)
rename arch/powerpc/platforms/82xx/{mpc82xx_ads.c => mpc8272_ads.c} (100%)
Not actually relevant to this patch, but we should be getting rid of
all these 'choice' things for board selection and instead allowing
each board to be separately enabled or disabled.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
From: Scott Wood <hidden> Date: 2007-08-29 14:05:49
On Wed, Aug 29, 2007 at 03:39:41PM +1000, David Gibson wrote:
On Tue, Aug 28, 2007 at 03:16:19PM -0500, Scott Wood wrote:
quoted
Boards that do not require the legacy bindings should select
CONFIG_PPC_CPM_NEW_BINDING to enable the of_platform CPM devices. Once
all existing boards are converted and tested, the config option can
become default y to prevent new boards from using the old model. Once
arch/ppc is gone, the config option can be removed altogether.
I think it would be better to change the name and reverse the sense of
this config option, since what it actually does is disable the old
binding, not enable the new one.
But then boards would have to deselect rather than select the option...
can kconfig do that?
Your example has bus-frequency, but lacks fsl,brg-frequency, in
contrast to the description above.
Oops...
Since you have a separate brg node defined below, maybe
fsl,brg-frequency should just be replaced with a 'clock-frequency'
property in that subnode.
Sounds good.
quoted
+ ii) Properties common to mulitple CPM/QE devices
+
+ - fsl,cpm-command : This value is ORed with the opcode and command flag
+ to specify the device on which a CPM command operates.
+
+ - fsl,cpm-brg : Indicates which baud rate generator the device
+ is associated with. If absent, an unused BRG
+ should be dynamically allocated.
Maybe a property with the brg node's phandle could be included as
well, to avoid having to hop up to the CPM node, then back down to the
brg-compatible node to find it?
Enh... it doesn't convey any new information, and in practice, it's done
by common CPM code that doesn't know about the individual device's node
anyway.
Or maybe even have a separate subnode for each brg, and just have a
phandle to reference it from the other devices, rather than using this
index.
@@ -211,6 +211,15 @@ config PPC_EARLY_DEBUG_44xSelectthistoenableearlydebuggingforIBM44xchipsviatheinbuiltserialport.+configPPC_EARLY_DEBUG_CPM+bool"Early serial debugging for Freescale CPM-based serial ports"+depends onSERIAL_CPM+selectPIN_TLBifPPC_8xx
I see this Kconfig line, but I don't see any code below that would set
up a suitable TLB on 8xx for the CPM...?
There's existing code that pins the IMMR when that option is enabled.
It's a bit broken, but there's a patch in the 8xx series that fixes it.
quoted
# Temporary hack until we have migrated to asm-powerpc
ifeq ($(ARCH),powerpc)
+obj-$(CONFIG_CPM1)$(CONFIG_CPM2) += cpm_common.o
Uh.. I don't think this will work properly. If CONFIG_CPM1 and
CONFIG_CPM2 are both enabled, it will set obj-yy rather than obj-y.
The assumption was that CPM1 and CPM2 are never going to both be enabled,
as CPM1 only exists on hardware with a unique MMU.
I could add an obj-y += $(obj-yy) if you like, though.
Since this is all udbg related, it could go (within an ifdef) into
udbg.c rather than creating a new file for it.
Well, I was hoping that more consolidation between cpm1 and cpm2 (and
qe/cpm3, for that matter) would happen in the future, and this would be a
place to put it.
Urg... this is ugly, because it looks like it can be muti-platform,
but actually isn't. I think a better approach is to set the magic
address as a Kconfig variable, as we do on 44x. This approach can
also be useful for hacking up early debug for new chips during the
process of creating platform code for them.
From: Scott Wood <hidden> Date: 2007-08-29 19:58:46
On Wed, Aug 29, 2007 at 09:02:39AM -0500, Scott Wood wrote:
quoted
quoted
# Temporary hack until we have migrated to asm-powerpc
ifeq ($(ARCH),powerpc)
+obj-$(CONFIG_CPM1)$(CONFIG_CPM2) += cpm_common.o
Uh.. I don't think this will work properly. If CONFIG_CPM1 and
CONFIG_CPM2 are both enabled, it will set obj-yy rather than obj-y.
The assumption was that CPM1 and CPM2 are never going to both be enabled,
as CPM1 only exists on hardware with a unique MMU.
I could add an obj-y += $(obj-yy) if you like, though.
On second thought, I'll just add a CONFIG_CPM that CPM1 and CPM2 select;
that'll make things easier for further consolidation.
-Scott
From: Kumar Gala <hidden> Date: 2007-08-29 22:39:01
On Aug 28, 2007, at 3:19 PM, Scott Wood wrote:
1. PCI and reset are factored out into pq2.c. I renamed them from
m82xx
to pq2 because they won't work on the Integrated Host Processor
line of
82xx chips (i.e. 8240, 8245, and such).
2. The PCI PIC, which is nominally board-specific, is used on multiple
boards, and thus is used into pq2ads-pci-pic.c.
3. The new CPM binding is used.
4. General cleanup.
Signed-off-by: Scott Wood <redacted>
---
arch/powerpc/Kconfig | 2 +-
arch/powerpc/boot/dts/mpc8272ads.dts | 321 +++++++------
arch/powerpc/configs/mpc8272_ads_defconfig | 380 ++++++++-------
arch/powerpc/platforms/82xx/Kconfig | 5 +
arch/powerpc/platforms/82xx/Makefile | 2 +
arch/powerpc/platforms/82xx/mpc8272_ads.c | 671 ++++
+---------------------
arch/powerpc/platforms/82xx/pq2.c | 93 ++++
arch/powerpc/platforms/82xx/pq2.h | 20 +
arch/powerpc/platforms/82xx/pq2ads-pci-pic.c | 202 ++++++++
arch/powerpc/platforms/82xx/pq2ads.h | 2 -
10 files changed, 816 insertions(+), 882 deletions(-)
create mode 100644 arch/powerpc/platforms/82xx/pq2.c
create mode 100644 arch/powerpc/platforms/82xx/pq2.h
create mode 100644 arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
NACK.
I don't want pq2 to be the only platform that has the PCI bus
separate from the PCI controller.
- k
From: David Gibson <hidden> Date: 2007-08-30 00:55:59
On Wed, Aug 29, 2007 at 08:58:06AM -0500, Scott Wood wrote:
On Wed, Aug 29, 2007 at 03:39:41PM +1000, David Gibson wrote:
quoted
On Tue, Aug 28, 2007 at 03:16:19PM -0500, Scott Wood wrote:
quoted
Boards that do not require the legacy bindings should select
CONFIG_PPC_CPM_NEW_BINDING to enable the of_platform CPM devices. Once
all existing boards are converted and tested, the config option can
become default y to prevent new boards from using the old model. Once
arch/ppc is gone, the config option can be removed altogether.
I think it would be better to change the name and reverse the sense of
this config option, since what it actually does is disable the old
binding, not enable the new one.
But then boards would have to deselect rather than select the option...
can kconfig do that?
Sorry, as I read later patches in the series, I realised your config
option didn't do what I thought it did when I said that.
Am I correct in thinking that it's basically an arch/ppc versus
arch/powerpc thing. In which case couldn't you use CONFIG_PPC_MERGE
instead?
[snip]
quoted
quoted
+ ii) Properties common to mulitple CPM/QE devices
+
+ - fsl,cpm-command : This value is ORed with the opcode and command flag
+ to specify the device on which a CPM command operates.
+
+ - fsl,cpm-brg : Indicates which baud rate generator the device
+ is associated with. If absent, an unused BRG
+ should be dynamically allocated.
Maybe a property with the brg node's phandle could be included as
well, to avoid having to hop up to the CPM node, then back down to the
brg-compatible node to find it?
Enh... it doesn't convey any new information, and in practice, it's done
by common CPM code that doesn't know about the individual device's node
anyway.
quoted
Or maybe even have a separate subnode for each brg, and just have a
phandle to reference it from the other devices, rather than using this
index.
Seems a little complex relative to the gain.
Hrm, I guess. I just have a dislike for random indices into things.
Should this also have a phandle pointer to the mdio node?
It has a phandle to the phy node... if you mean the mdio bus node, why?
Well, I'm just working of the example of 4xx EMAC. The way it does
mdio, it wants a handle on the mdio bus to perform various operations
there as well on the phy to tell it how to address them. fsl-enet may
do things differently and have no particular need for such a handle.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
@@ -211,6 +211,15 @@ config PPC_EARLY_DEBUG_44xSelectthistoenableearlydebuggingforIBM44xchipsviatheinbuiltserialport.+configPPC_EARLY_DEBUG_CPM+bool"Early serial debugging for Freescale CPM-based serial ports"+depends onSERIAL_CPM+selectPIN_TLBifPPC_8xx
I see this Kconfig line, but I don't see any code below that would set
up a suitable TLB on 8xx for the CPM...?
There's existing code that pins the IMMR when that option is enabled.
It's a bit broken, but there's a patch in the 8xx series that fixes it.
quoted
quoted
# Temporary hack until we have migrated to asm-powerpc
ifeq ($(ARCH),powerpc)
+obj-$(CONFIG_CPM1)$(CONFIG_CPM2) += cpm_common.o
Uh.. I don't think this will work properly. If CONFIG_CPM1 and
CONFIG_CPM2 are both enabled, it will set obj-yy rather than obj-y.
The assumption was that CPM1 and CPM2 are never going to both be enabled,
as CPM1 only exists on hardware with a unique MMU.
Hrm. I guess it's ok in that case, although it's a non-obvious
constraint.
I could add an obj-y += $(obj-yy) if you like, though.
Ouch, no, that would be even uglier.
quoted
Since this is all udbg related, it could go (within an ifdef) into
udbg.c rather than creating a new file for it.
Well, I was hoping that more consolidation between cpm1 and cpm2 (and
qe/cpm3, for that matter) would happen in the future, and this would be a
place to put it.
quoted
Urg... this is ugly, because it looks like it can be muti-platform,
but actually isn't. I think a better approach is to set the magic
address as a Kconfig variable, as we do on 44x. This approach can
also be useful for hacking up early debug for new chips during the
process of creating platform code for them.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
From: David Gibson <hidden> Date: 2007-08-30 00:58:00
On Wed, Aug 29, 2007 at 02:58:37PM -0500, Scott Wood wrote:
On Wed, Aug 29, 2007 at 09:02:39AM -0500, Scott Wood wrote:
quoted
quoted
quoted
# Temporary hack until we have migrated to asm-powerpc
ifeq ($(ARCH),powerpc)
+obj-$(CONFIG_CPM1)$(CONFIG_CPM2) += cpm_common.o
Uh.. I don't think this will work properly. If CONFIG_CPM1 and
CONFIG_CPM2 are both enabled, it will set obj-yy rather than obj-y.
The assumption was that CPM1 and CPM2 are never going to both be enabled,
as CPM1 only exists on hardware with a unique MMU.
I could add an obj-y += $(obj-yy) if you like, though.
On second thought, I'll just add a CONFIG_CPM that CPM1 and CPM2 select;
that'll make things easier for further consolidation.
Ah, yes, that's much nicer.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
From: Scott Wood <hidden> Date: 2007-08-30 05:49:04
On Thu, Aug 30, 2007 at 10:55:59AM +1000, David Gibson wrote:
Am I correct in thinking that it's basically an arch/ppc versus
arch/powerpc thing. In which case couldn't you use CONFIG_PPC_MERGE
instead?
The idea was to allow boards to be converted incrementally, as I don't
have access to test 100% of the boards that use the CPM code.
quoted
It has a phandle to the phy node... if you mean the mdio bus node, why?
Well, I'm just working of the example of 4xx EMAC. The way it does
mdio, it wants a handle on the mdio bus to perform various operations
there as well on the phy to tell it how to address them. fsl-enet may
do things differently and have no particular need for such a handle.
Even if it did need such a handle, couldn't it just look at the phy
node's parent?
-Scott
From: David Gibson <hidden> Date: 2007-08-30 05:58:12
On Thu, Aug 30, 2007 at 12:48:54AM -0500, Scott Wood wrote:
On Thu, Aug 30, 2007 at 10:55:59AM +1000, David Gibson wrote:
quoted
Am I correct in thinking that it's basically an arch/ppc versus
arch/powerpc thing. In which case couldn't you use CONFIG_PPC_MERGE
instead?
The idea was to allow boards to be converted incrementally, as I don't
have access to test 100% of the boards that use the CPM code.
Hrm. Right. This is still problematical, because what happens if you
have both old-binding and new-binding boards configured simultaneously?
quoted
quoted
It has a phandle to the phy node... if you mean the mdio bus node, why?
Well, I'm just working of the example of 4xx EMAC. The way it does
mdio, it wants a handle on the mdio bus to perform various operations
there as well on the phy to tell it how to address them. fsl-enet may
do things differently and have no particular need for such a handle.
Even if it did need such a handle, couldn't it just look at the phy
node's parent?
Well, yes, but it's just a bit more fiddling. For the purposes of
emac, it seemed simpler to supply pass the mdio phandle as well.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
From: Kumar Gala <hidden> Date: 2007-08-30 14:54:01
On Aug 30, 2007, at 12:56 AM, Scott Wood wrote:
On Wed, Aug 29, 2007 at 05:41:17PM -0500, Kumar Gala wrote:
quoted
NACK.
I don't want pq2 to be the only platform that has the PCI bus
separate from the PCI controller.
Could you articulate the reasons why you'd rather have a mishmash
of crap
in the soc node's ranges property?
It don't feel its a mishmash of crap its just how things are
defined. Maybe the SOC node was a mistake, but I think we are past
the point of return on that.
Having one platform's device tree be different just creates confusion
to our customers. While there isn't anything technically wrong with
what your proposing it will cause support issues down the line which
I want to avoid.
- k
From: Scott Wood <hidden> Date: 2007-08-30 15:17:23
On Thu, Aug 30, 2007 at 09:56:16AM -0500, Kumar Gala wrote:
It don't feel its a mishmash of crap its just how things are
defined. Maybe the SOC node was a mistake, but I think we are past
the point of return on that.
The node itself wasn't a mistake -- the IMMR is relocatable, so it should
be under a bus node. The mistake was assuming the PCI ranges went
straight to the CPU space, rather than getting translated through the
parent bus's ranges. We got away with that mistake because of a similar
bug in the 32-bit PCI code.
In the past few months, this issue began to be addressed in a handful of
device trees. In the device trees I prepared, I used separate bus and
control nodes. In the 8544, 8548, and 8641 device trees, extra ranges
were hacked into the soc node. All other PCI-bearing Freescale device
tree files are still broken.
I don't think a few months is an unrecoverable legacy.
Having one platform's device tree be different just creates confusion
to our customers.
The intent isn't for 82xx to be different from everything else -- it's
simply the first one to get fixed in this way. Incremental changes, and
what not.
Note that it would be quite easy to make the code accept either type of
device tree.
While there isn't anything technically wrong with what your proposing
it will cause support issues down the line which I want to avoid.
On Tue, 28 Aug 2007 15:19:22 -0500
Scott Wood wrote:
I would have it in the same patch, that adds clocking stuff to 8xx. And
maybe in the same, segregate source rather then having it in the foo_common.c, to ease fix/update/rework.
Just imho, not pressing for that.
On Tue, 28 Aug 2007 15:17:16 -0500
Scott Wood wrote:
1. Only map 512K of the IMMR, rather than 8M, to avoid conflicting
with the default ioremap region.
2. The wrong register was being loaded into SPRN_MD_RPN.
Signed-off-by: Scott Wood <redacted>
On Tue, 28 Aug 2007 15:17:19 -0500
Scott Wood wrote:
These let board code set up pins and clocks without having to
put magic numbers directly into the registers.
I personally is not fond of such idea, but it would make this more understandable eases transfer to feature_call
or qe pin setting stuff (though the latter should be reworked at some point too imho).
Probably put here define or alike so that we wouldn't have confusion what 1/whatever port number does mean.
Or some comment explaining for PQ newcomer what's going on here. ditto below.
modify it
* under the terms of the GNU General Public License as published
by the @@ -12,7 +13,7 @@
/ {
model = "MPC885ADS";
- compatible = "mpc8xx";
+ compatible = "fsl,mpc885ads";
#address-cells = <1>;
#size-cells = <1>;
b/arch/powerpc/configs/mpc885_ads_defconfig index fc4f9b7..482d99d
100644 --- a/arch/powerpc/configs/mpc885_ads_defconfig
+++ b/arch/powerpc/configs/mpc885_ads_defconfig
@@ -1,9 +1,22 @@ # # Automatically generated make config: don't edit-# Linux kernel version: 2.6.22-rc7-# Sun Jul 1 23:57:01 2007+# Linux kernel version: 2.6.23-rc3+# Mon Aug 27 15:23:16 2007 # # CONFIG_PPC64 is not set++#+# Processor support+#+# CONFIG_6xx is not set+# CONFIG_PPC_85xx is not set+CONFIG_PPC_8xx=y+# CONFIG_40x is not set+# CONFIG_44x is not set+# CONFIG_E200 is not set+CONFIG_8xx=y+# CONFIG_PPC_MM_SLICES is not set+CONFIG_NOT_COHERENT_CACHE=y CONFIG_PPC32=y CONFIG_PPC_MERGE=y CONFIG_MMU=y
@@ -14,56 +27,38 @@ CONFIG_ARCH_HAS_ILOG2_U32=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_FIND_NEXT_BIT=y+# CONFIG_ARCH_NO_VIRT_TO_BUS is not set CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_GENERIC_NVRAM=y CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_PPC_OF=y+CONFIG_OF=y # CONFIG_PPC_UDBG_16550 is not set # CONFIG_GENERIC_TBSYNC is not set CONFIG_AUDIT_ARCH=y+CONFIG_GENERIC_BUG=y # CONFIG_DEFAULT_UIMAGE is not set--#-# Processor support-#-# CONFIG_CLASSIC32 is not set-# CONFIG_PPC_82xx is not set-# CONFIG_PPC_83xx is not set-# CONFIG_PPC_85xx is not set-# CONFIG_PPC_86xx is not set-CONFIG_PPC_8xx=y-# CONFIG_40x is not set-# CONFIG_44x is not set-# CONFIG_E200 is not set-CONFIG_8xx=y # CONFIG_PPC_DCR_NATIVE is not set # CONFIG_PPC_DCR_MMIO is not set-# CONFIG_PPC_MM_SLICES is not set-CONFIG_NOT_COHERENT_CACHE=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" #-# Code maturity level options+# General setup # CONFIG_EXPERIMENTAL=y CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32--#-# General setup-# CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y # CONFIG_SWAP is not set CONFIG_SYSVIPC=y-# CONFIG_IPC_NS is not set CONFIG_SYSVIPC_SYSCTL=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_TASKSTATS is not set-# CONFIG_UTS_NS is not set+# CONFIG_USER_NS is not set # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set CONFIG_LOG_BUF_SHIFT=14
@@ -75,52 +70,46 @@ CONFIG_SYSCTL=y CONFIG_EMBEDDED=y # CONFIG_SYSCTL_SYSCALL is not set CONFIG_KALLSYMS=y+# CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set-# CONFIG_HOTPLUG is not set+CONFIG_HOTPLUG=y CONFIG_PRINTK=y-# CONFIG_BUG is not set-CONFIG_ELF_CORE=y+CONFIG_BUG=y+# CONFIG_ELF_CORE is not set # CONFIG_BASE_FULL is not set-CONFIG_FUTEX=y+# CONFIG_FUTEX is not set CONFIG_ANON_INODES=y-# CONFIG_EPOLL is not set+CONFIG_EPOLL=y CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y # CONFIG_VM_EVENT_COUNTERS is not set-CONFIG_SLAB=y-# CONFIG_SLUB is not set+CONFIG_SLUB_DEBUG=y+# CONFIG_SLAB is not set+CONFIG_SLUB=y # CONFIG_SLOB is not set-CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=1--#-# Loadable module support-# # CONFIG_MODULES is not set--#-# Block layer-# CONFIG_BLOCK=y # CONFIG_LBD is not set # CONFIG_BLK_DEV_IO_TRACE is not set # CONFIG_LSF is not set+# CONFIG_BLK_DEV_BSG is not set # # IO Schedulers # CONFIG_IOSCHED_NOOP=y-CONFIG_IOSCHED_AS=y+# CONFIG_IOSCHED_AS is not set CONFIG_IOSCHED_DEADLINE=y-CONFIG_IOSCHED_CFQ=y-CONFIG_DEFAULT_AS=y-# CONFIG_DEFAULT_DEADLINE is not set+# CONFIG_IOSCHED_CFQ is not set+# CONFIG_DEFAULT_AS is not set+CONFIG_DEFAULT_DEADLINE=y # CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set-CONFIG_DEFAULT_IOSCHED="anticipatory"+CONFIG_DEFAULT_IOSCHED="deadline" # # Platform support
@@ -133,6 +122,7 @@ CONFIG_CPM1=y # CONFIG_MPC8XXFADS is not set # CONFIG_MPC86XADS is not set CONFIG_MPC885ADS=y+# CONFIG_PPC_EP88XC is not set # # Freescale Ethernet driver platform-specific options
@@ -150,6 +140,7 @@ CONFIG_MPC8xx_SECOND_ETH_FEC2=y # CONFIG_8xx_COPYBACK=y # CONFIG_8xx_CPU6 is not set+CONFIG_8xx_CPU15=y CONFIG_NO_UCODE_PATCH=y # CONFIG_USB_SOF_UCODE_PATCH is not set # CONFIG_I2C_SPI_UCODE_PATCH is not set
@@ -166,22 +157,23 @@ CONFIG_NO_UCODE_PATCH=y # CONFIG_GENERIC_IOMAP is not set # CONFIG_CPU_FREQ is not set # CONFIG_CPM2 is not set+CONFIG_PPC_CPM_NEW_BINDING=y # # Kernel options # # CONFIG_HIGHMEM is not set-# CONFIG_HZ_100 is not set+CONFIG_HZ_100=y # CONFIG_HZ_250 is not set # CONFIG_HZ_300 is not set-CONFIG_HZ_1000=y-CONFIG_HZ=1000+# CONFIG_HZ_1000 is not set+CONFIG_HZ=100 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set-CONFIG_MATH_EMULATION=y+# CONFIG_MATH_EMULATION is not set CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_POPULATES_NODE_MAP=y
@@ -195,11 +187,14 @@ CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_RESOURCES_64BIT is not set CONFIG_ZONE_DMA_FLAG=1-# CONFIG_PROC_DEVICETREE is not set+CONFIG_BOUNCE=y+CONFIG_VIRT_TO_BUS=y+CONFIG_PROC_DEVICETREE=y # CONFIG_CMDLINE_BOOL is not set # CONFIG_PM is not set # CONFIG_SECCOMP is not set-# CONFIG_WANT_DEVICE_TREE is not set+CONFIG_WANT_DEVICE_TREE=y+CONFIG_DEVICE_TREE="mpc885ads.dts" CONFIG_ISA_DMA_API=y #
@@ -209,12 +204,14 @@ CONFIG_ZONE_DMA=y CONFIG_FSL_SOC=y # CONFIG_PCI is not set # CONFIG_PCI_DOMAINS is not set+# CONFIG_PCI_SYSCALL is not set # CONFIG_PCI_QSPAN is not set # CONFIG_ARCH_SUPPORTS_MSI is not set # # PCCARD (PCMCIA/CardBus) support #+# CONFIG_PCCARD is not set # # Advanced setup
@@ -243,10 +240,6 @@ CONFIG_NET=y CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y-CONFIG_XFRM=y-# CONFIG_XFRM_USER is not set-# CONFIG_XFRM_SUB_POLICY is not set-# CONFIG_XFRM_MIGRATE is not set # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y
@@ -266,9 +259,9 @@ CONFIG_SYN_COOKIES=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set-CONFIG_INET_XFRM_MODE_TRANSPORT=y-CONFIG_INET_XFRM_MODE_TUNNEL=y-CONFIG_INET_XFRM_MODE_BEET=y+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set+# CONFIG_INET_XFRM_MODE_TUNNEL is not set+# CONFIG_INET_XFRM_MODE_BEET is not set CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set
@@ -317,6 +310,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_MAC80211 is not set # CONFIG_IEEE80211 is not set # CONFIG_RFKILL is not set+# CONFIG_NET_9P is not set # # Device Drivers
@@ -327,40 +321,91 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y+# CONFIG_FW_LOADER is not set+# CONFIG_DEBUG_DRIVER is not set+# CONFIG_DEBUG_DEVRES is not set # CONFIG_SYS_HYPERVISOR is not set--#-# Connector - unified userspace <-> kernelspace linker-# # CONFIG_CONNECTOR is not set-# CONFIG_MTD is not set--#-# Parallel port support-#+CONFIG_MTD=y+# CONFIG_MTD_DEBUG is not set+# CONFIG_MTD_CONCAT is not set+# CONFIG_MTD_PARTITIONS is not set++#+# User Modules And Translation Layers+#+CONFIG_MTD_CHAR=y+CONFIG_MTD_BLKDEVS=y+CONFIG_MTD_BLOCK=y+# CONFIG_FTL is not set+# CONFIG_NFTL is not set+# CONFIG_INFTL is not set+# CONFIG_RFD_FTL is not set+# CONFIG_SSFDC is not set++#+# RAM/ROM/Flash chip drivers+#+# CONFIG_MTD_CFI is not set+CONFIG_MTD_JEDECPROBE=y+CONFIG_MTD_GEN_PROBE=y+CONFIG_MTD_CFI_ADV_OPTIONS=y+CONFIG_MTD_CFI_NOSWAP=y+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set+CONFIG_MTD_CFI_GEOMETRY=y+# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set+# CONFIG_MTD_MAP_BANK_WIDTH_2 is not set+CONFIG_MTD_MAP_BANK_WIDTH_4=y+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set+# CONFIG_MTD_CFI_I1 is not set+# CONFIG_MTD_CFI_I2 is not set+CONFIG_MTD_CFI_I4=y+# CONFIG_MTD_CFI_I8 is not set+# CONFIG_MTD_OTP is not set+# CONFIG_MTD_CFI_INTELEXT is not set+CONFIG_MTD_CFI_AMDSTD=y+# CONFIG_MTD_CFI_STAA is not set+CONFIG_MTD_CFI_UTIL=y+# CONFIG_MTD_RAM is not set+# CONFIG_MTD_ROM is not set+# CONFIG_MTD_ABSENT is not set++#+# Mapping drivers for chip access+#+# CONFIG_MTD_COMPLEX_MAPPINGS is not set+# CONFIG_MTD_PHYSMAP is not set+CONFIG_MTD_PHYSMAP_OF=y+# CONFIG_MTD_PLATRAM is not set++#+# Self-contained MTD device drivers+#+# CONFIG_MTD_SLRAM is not set+# CONFIG_MTD_PHRAM is not set+# CONFIG_MTD_MTDRAM is not set+# CONFIG_MTD_BLOCK2MTD is not set++#+# Disk-On-Chip Device Drivers+#+# CONFIG_MTD_DOC2000 is not set+# CONFIG_MTD_DOC2001 is not set+# CONFIG_MTD_DOC2001PLUS is not set+# CONFIG_MTD_NAND is not set+# CONFIG_MTD_ONENAND is not set++#+# UBI - Unsorted block images+#+# CONFIG_MTD_UBI is not set+CONFIG_OF_DEVICE=y # CONFIG_PARPORT is not set--#-# Plug and Play support-#-# CONFIG_PNPACPI is not set--#-# Block devices-#-# CONFIG_BLK_DEV_FD is not set-# CONFIG_BLK_DEV_COW_COMMON is not set-CONFIG_BLK_DEV_LOOP=y-# CONFIG_BLK_DEV_CRYPTOLOOP is not set-# CONFIG_BLK_DEV_NBD is not set-# CONFIG_BLK_DEV_RAM is not set-# CONFIG_CDROM_PKTCDVD is not set-# CONFIG_ATA_OVER_ETH is not set--#-# Misc devices-#-# CONFIG_BLINK is not set+# CONFIG_BLK_DEV is not set+# CONFIG_MISC_DEVICES is not set # CONFIG_IDE is not set #
@@ -368,21 +413,16 @@ CONFIG_BLK_DEV_LOOP=y # # CONFIG_RAID_ATTRS is not set # CONFIG_SCSI is not set+# CONFIG_SCSI_DMA is not set # CONFIG_SCSI_NETLINK is not set # CONFIG_ATA is not set--#-# Multi-device support (RAID and LVM)-# # CONFIG_MD is not set # CONFIG_MACINTOSH_DRIVERS is not set--#-# Network device support-# CONFIG_NETDEVICES=y+# CONFIG_NETDEVICES_MULTIQUEUE is not set # CONFIG_DUMMY is not set # CONFIG_BONDING is not set+# CONFIG_MACVLAN is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set CONFIG_PHYLIB=y
@@ -398,21 +438,16 @@ CONFIG_DAVICOM_PHY=y # CONFIG_VITESSE_PHY is not set # CONFIG_SMSC_PHY is not set # CONFIG_BROADCOM_PHY is not set-CONFIG_FIXED_PHY=y-CONFIG_FIXED_MII_10_FDX=y-# CONFIG_FIXED_MII_100_FDX is not set--#-# Ethernet (10 or 100Mbit)-#+# CONFIG_ICPLUS_PHY is not set+# CONFIG_FIXED_PHY is not set+# CONFIG_MDIO_BITBANG is not set CONFIG_NET_ETHERNET=y CONFIG_MII=y-# CONFIG_FEC_8XX is not set CONFIG_FS_ENET=y-CONFIG_FS_ENET_HAS_SCC=y+# CONFIG_FS_ENET_HAS_SCC is not set CONFIG_FS_ENET_HAS_FEC=y-CONFIG_NETDEV_1000=y-CONFIG_NETDEV_10000=y+# CONFIG_NETDEV_1000 is not set+# CONFIG_NETDEV_10000 is not set # # Wireless LAN
@@ -426,69 +461,18 @@ CONFIG_NETDEV_10000=y # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set--#-# ISDN subsystem-# # CONFIG_ISDN is not set--#-# Telephony Support-# # CONFIG_PHONE is not set # # Input device support #-CONFIG_INPUT=y-# CONFIG_INPUT_FF_MEMLESS is not set-# CONFIG_INPUT_POLLDEV is not set--#-# Userland interfaces-#-CONFIG_INPUT_MOUSEDEV=y-CONFIG_INPUT_MOUSEDEV_PSAUX=y-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768-# CONFIG_INPUT_JOYDEV is not set-# CONFIG_INPUT_TSDEV is not set-# CONFIG_INPUT_EVDEV is not set-# CONFIG_INPUT_EVBUG is not set--#-# Input Device Drivers-#-CONFIG_INPUT_KEYBOARD=y-CONFIG_KEYBOARD_ATKBD=y-# CONFIG_KEYBOARD_SUNKBD is not set-# CONFIG_KEYBOARD_LKKBD is not set-# CONFIG_KEYBOARD_XTKBD is not set-# CONFIG_KEYBOARD_NEWTON is not set-# CONFIG_KEYBOARD_STOWAWAY is not set-CONFIG_INPUT_MOUSE=y-CONFIG_MOUSE_PS2=y-CONFIG_MOUSE_PS2_ALPS=y-CONFIG_MOUSE_PS2_LOGIPS2PP=y-CONFIG_MOUSE_PS2_SYNAPTICS=y-CONFIG_MOUSE_PS2_LIFEBOOK=y-CONFIG_MOUSE_PS2_TRACKPOINT=y-# CONFIG_MOUSE_PS2_TOUCHKIT is not set-# CONFIG_MOUSE_SERIAL is not set-# CONFIG_MOUSE_VSXXXAA is not set-# CONFIG_INPUT_JOYSTICK is not set-# CONFIG_INPUT_TABLET is not set-# CONFIG_INPUT_TOUCHSCREEN is not set-# CONFIG_INPUT_MISC is not set+# CONFIG_INPUT is not set # # Hardware I/O ports #-CONFIG_SERIO=y-CONFIG_SERIO_I8042=y-CONFIG_SERIO_SERPORT=y-CONFIG_SERIO_LIBPS2=y-# CONFIG_SERIO_RAW is not set+# CONFIG_SERIO is not set # CONFIG_GAMEPORT is not set #
@@ -518,10 +502,6 @@ CONFIG_SERIAL_CPM_SMC1=y CONFIG_SERIAL_CPM_SMC2=y CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set--#-# IPMI-# # CONFIG_IPMI_HANDLER is not set # CONFIG_WATCHDOG is not set CONFIG_HW_RANDOM=y
@@ -530,10 +510,6 @@ CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set # CONFIG_R3964 is not set # CONFIG_RAW_DRIVER is not set--#-# TPM devices-# # CONFIG_TCG_TPM is not set # CONFIG_I2C is not set
@@ -542,21 +518,9 @@ CONFIG_GEN_RTC=y # # CONFIG_SPI is not set # CONFIG_SPI_MASTER is not set--#-# Dallas's 1-wire bus-# # CONFIG_W1 is not set-CONFIG_HWMON=y-# CONFIG_HWMON_VID is not set-# CONFIG_SENSORS_ABITUGURU is not set-# CONFIG_SENSORS_F71805F is not set-# CONFIG_SENSORS_PC87427 is not set-# CONFIG_SENSORS_SMSC47M1 is not set-# CONFIG_SENSORS_SMSC47B397 is not set-# CONFIG_SENSORS_VT1211 is not set-# CONFIG_SENSORS_W83627HF is not set-# CONFIG_HWMON_DEBUG_CHIP is not set+# CONFIG_POWER_SUPPLY is not set+# CONFIG_HWMON is not set # # Multifunction device drivers
@@ -580,6 +544,7 @@ CONFIG_DAB=y # # CONFIG_DISPLAY_SUPPORT is not set # CONFIG_VGASTATE is not set+# CONFIG_VIDEO_OUTPUT_CONTROL is not set # CONFIG_FB is not set # CONFIG_FB_IBM_GXT4500 is not set
@@ -587,54 +552,10 @@ CONFIG_DAB=y # Sound # # CONFIG_SOUND is not set--#-# HID Devices-#-CONFIG_HID=y-# CONFIG_HID_DEBUG is not set--#-# USB support-#-# CONFIG_USB_ARCH_HAS_HCD is not set-# CONFIG_USB_ARCH_HAS_OHCI is not set-# CONFIG_USB_ARCH_HAS_EHCI is not set--#-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'-#--#-# USB Gadget Support-#-# CONFIG_USB_GADGET is not set+# CONFIG_USB_SUPPORT is not set # CONFIG_MMC is not set--#-# LED devices-# # CONFIG_NEW_LEDS is not set--#-# LED drivers-#--#-# LED Triggers-#--#-# InfiniBand support-#--#-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)-#--#-# Real Time Clock-#+# CONFIG_EDAC is not set # CONFIG_RTC_CLASS is not set #
@@ -651,21 +572,16 @@ CONFIG_HID=y # #+# Userspace I/O+#+# CONFIG_UIO is not set++# # File systems #-CONFIG_EXT2_FS=y-CONFIG_EXT2_FS_XATTR=y-# CONFIG_EXT2_FS_POSIX_ACL is not set-# CONFIG_EXT2_FS_SECURITY is not set-# CONFIG_EXT2_FS_XIP is not set-CONFIG_EXT3_FS=y-CONFIG_EXT3_FS_XATTR=y-# CONFIG_EXT3_FS_POSIX_ACL is not set-# CONFIG_EXT3_FS_SECURITY is not set+# CONFIG_EXT2_FS is not set+# CONFIG_EXT3_FS is not set # CONFIG_EXT4DEV_FS is not set-CONFIG_JBD=y-# CONFIG_JBD_DEBUG is not set-CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set # CONFIG_FS_POSIX_ACL is not set
@@ -674,10 +590,9 @@ CONFIG_FS_MBCACHE=y # CONFIG_OCFS2_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set-CONFIG_INOTIFY=y-CONFIG_INOTIFY_USER=y+# CONFIG_INOTIFY is not set # CONFIG_QUOTA is not set-CONFIG_DNOTIFY=y+# CONFIG_DNOTIFY is not set # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set # CONFIG_FUSE_FS is not set
@@ -718,6 +633,7 @@ CONFIG_RAMFS=y # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set+# CONFIG_JFFS2_FS is not set CONFIG_CRAMFS=y # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set
@@ -747,7 +663,6 @@ CONFIG_SUNRPC=y # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set-# CONFIG_9P_FS is not set # # Partition Types
@@ -785,14 +700,13 @@ CONFIG_MSDOS_PARTITION=y # # Library routines #-CONFIG_BITREVERSE=y-CONFIG_CRC_CCITT=y+# CONFIG_CRC_CCITT is not set # CONFIG_CRC16 is not set # CONFIG_CRC_ITU_T is not set-CONFIG_CRC32=y+# CONFIG_CRC32 is not set+# CONFIG_CRC7 is not set # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y-CONFIG_PLIST=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y
@@ -807,12 +721,33 @@ CONFIG_HAS_DMA=y # # CONFIG_PRINTK_TIME is not set CONFIG_ENABLE_MUST_CHECK=y-# CONFIG_MAGIC_SYSRQ is not set+CONFIG_MAGIC_SYSRQ=y # CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_FS is not set # CONFIG_HEADERS_CHECK is not set-# CONFIG_DEBUG_KERNEL is not set-# CONFIG_BOOTX_TEXT is not set+CONFIG_DEBUG_KERNEL=y+# CONFIG_DEBUG_SHIRQ is not set+CONFIG_DETECT_SOFTLOCKUP=y+CONFIG_SCHED_DEBUG=y+# CONFIG_SCHEDSTATS is not set+# CONFIG_TIMER_STATS is not set+# CONFIG_SLUB_DEBUG_ON is not set+# CONFIG_DEBUG_SPINLOCK is not set+# CONFIG_DEBUG_MUTEXES is not set+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set+# CONFIG_DEBUG_KOBJECT is not set+CONFIG_DEBUG_BUGVERBOSE=y+CONFIG_DEBUG_INFO=y+# CONFIG_DEBUG_VM is not set+# CONFIG_DEBUG_LIST is not set+CONFIG_FORCED_INLINING=y+# CONFIG_FAULT_INJECTION is not set+# CONFIG_DEBUG_STACKOVERFLOW is not set+# CONFIG_DEBUG_STACK_USAGE is not set+# CONFIG_DEBUG_PAGEALLOC is not set+# CONFIG_DEBUGGER is not set+# CONFIG_BDI_SWITCH is not set # CONFIG_PPC_EARLY_DEBUG is not set #
@@ -820,8 +755,4 @@ CONFIG_ENABLE_MUST_CHECK=y # # CONFIG_KEYS is not set # CONFIG_SECURITY is not set--#-# Cryptographic options-# # CONFIG_CRYPTO is not set
diff --git a/arch/powerpc/platforms/8xx/Kconfig
b/arch/powerpc/platforms/8xx/Kconfig index b8dd515..4829378 100644
From: Scott Wood <hidden> Date: 2007-08-30 20:13:21
On Thu, Aug 30, 2007 at 02:09:07AM +0400, Vitaly Bordug wrote:
On Tue, 28 Aug 2007 15:19:21 -0500
Scott Wood wrote:
quoted
The hardware adds one to the BRG value to get the divider, so it must
be subtracted by software.
Prolly a note why it used to work, or what exactly this is resulting in
the code. IIRC this was just fw-ported so arch/ppc should have this as
well.
It *didn't* work before -- hence the fix.
The failure mode from being off by just one isn't total nonfunctionality,
but rather a corrupted character now and then, which could explain why it
wasn't fixed before.
As for arch/ppc, I'm just trying to not break it more than it already is.
-Scott
On Thu, 30 Aug 2007 15:13:12 -0500
Scott Wood wrote:
On Thu, Aug 30, 2007 at 02:09:07AM +0400, Vitaly Bordug wrote:
quoted
On Tue, 28 Aug 2007 15:19:21 -0500
Scott Wood wrote:
quoted
The hardware adds one to the BRG value to get the divider, so it
must be subtracted by software.
Prolly a note why it used to work, or what exactly this is
resulting in the code. IIRC this was just fw-ported so arch/ppc
should have this as well.
It *didn't* work before -- hence the fix.
It used to work at least at the time I did initial port, but I am not going to argue.
The failure mode from being off by just one isn't total
nonfunctionality, but rather a corrupted character now and then,
which could explain why it wasn't fixed before.
Can this be added to description please? Someone may be grepping for such a weirdness in some custom code forked off
some kernel.org revision, and will be happy to know it is addressed.
As for arch/ppc, I'm just trying to not break it more than it already
is.
I mean, when powerpc/ was nearly empty, same issue in ppc/ went unnoticed for years...
--
Sincerely, Vitaly
From: David Gibson <hidden> Date: 2007-08-31 02:48:04
On Thu, Aug 30, 2007 at 09:10:46AM -0500, Scott Wood wrote:
On Thu, Aug 30, 2007 at 03:58:12PM +1000, David Gibson wrote:
quoted
On Thu, Aug 30, 2007 at 12:48:54AM -0500, Scott Wood wrote:
quoted
On Thu, Aug 30, 2007 at 10:55:59AM +1000, David Gibson wrote:
quoted
Am I correct in thinking that it's basically an arch/ppc versus
arch/powerpc thing. In which case couldn't you use CONFIG_PPC_MERGE
instead?
The idea was to allow boards to be converted incrementally, as I don't
have access to test 100% of the boards that use the CPM code.
Hrm. Right. This is still problematical, because what happens if you
have both old-binding and new-binding boards configured simultaneously?
Multiplatform will not be supported for old-binding boards.
Hmm, ok. Well, let's try to kill the old binding off as fast as we
can, at least the portions that still infect arch/powerpc.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
Probably put here define or alike so that we wouldn't have confusion what 1/whatever port number does mean.
Or some comment explaining for PQ newcomer what's going on here. ditto below.
I suppose I could add CPM_PORTA, CPM_PORTB, etc. defines.
quoted
+int cpm1_clk_setup(enum cpm_clk_target target, int clock, int mode)
+{
+ int shift;
+ int i, bits = 0;
+ u32 __iomem *reg;
+ u32 mask = 7;
+
gotta at least briefly explain the clue here, too.
I'm not sure what you mean... what exactly are you asking me to explain?
Note that this code is mostly duplicated from the existing CPM2 version.
We're adding helper functions and should be ready that something
somewhere won't work as expected.
Could you elaborate on what you expect to possibly not work, or what we
should do to "be ready"?
quoted
diff --git a/include/asm-powerpc/commproc.h
b/include/asm-powerpc/commproc.h index ccb32cd..a95a434 100644
On Tue, 28 Aug 2007 15:19:24 -0500
Scott Wood wrote:
This provides a generic way for board code to set up CPM pins, rather
than directly poking magic values into registers.
Please provide more info either here or somewhere in Documentation/, or inside the code at least.
We're adding new utility function here, and need to describe in a nutshell now the thing works.
This is completely self-explanatory for limited amount of people, I mean.
On Fri, 31 Aug 2007 15:44:18 -0500
Scott Wood wrote:
quoted
quoted
+ u32 mask = 7;
+
gotta at least briefly explain the clue here, too.
I'm not sure what you mean... what exactly are you asking me to
explain?
Note that this code is mostly duplicated from the existing CPM2
version.
Then it would be good to mention that in short comment block before function.
quoted
We're adding helper functions and should be ready that something
somewhere won't work as expected.
Could you elaborate on what you expect to possibly not work, or what
we should do to "be ready"?
Some new PQ-like board being added to powerpc. I mean, each newly-added non-static function should have some sort of
description unless it(function) is completely self-explanatory.
Just a few words either here as a comment or in patch description, what the function supposed to do
and which way, so that someone not familiar with cpm/cpm2, would quickly understand
what's happening in there.
--
Sincerely, Vitaly
From: Scott Wood <hidden> Date: 2007-09-05 17:37:38
On Wed, Sep 05, 2007 at 11:39:57AM +0400, Vitaly Bordug wrote:
quoted
Note that this code is mostly duplicated from the existing CPM2
version.
Then it would be good to mention that in short comment block before function.
The code would very quickly become unreadable if we kept comments around
for every movement of code. Given the current state of things, it's
pretty much a given that most functions in commproc.c have a
corresponding function in cpm2_common.c, and vice versa.
I'd like to merge some of it at some point.
quoted
quoted
We're adding helper functions and should be ready that something
somewhere won't work as expected.
Could you elaborate on what you expect to possibly not work, or what
we should do to "be ready"?
Some new PQ-like board being added to powerpc. I mean, each newly-added
non-static function should have some sort of description unless
it(function) is completely self-explanatory.
I thought it was completely self-explanatory.
Just a few words either here as a comment or in patch description, what
the function supposed to do and which way, so that someone not familiar
with cpm/cpm2, would quickly understand what's happening in there.
If they're not familiar with CPM, and want to understand how hardware
setup for it works, the user's manual for one of the chips would be a
good place to start... As it is, it's pretty clear without knowledge of
the CPM that it's a helper function that sets and clears bits in certain
registers.
Since we seem to have differing views of the target audience, could you
suggest a specific wording that you're looking for?
-Scott
From: Kumar Gala <hidden> Date: 2007-09-11 05:33:12
On Aug 28, 2007, at 3:16 PM, Scott Wood wrote:
1. Fix get_immrbase() to use ranges, rather than reg.
It is not always the case that the SoC's first reg property points
to the beginning of the entire SoC block.
when is this true?
Upon further testing this breaks some platforms. I don't think
assuming the first range entry is mapping to the SOC register space
is a good idea.
I've dropped this portion of the patch from my tree for the time being.
- k
From: Scott Wood <hidden> Date: 2007-09-11 13:57:33
On Tue, Sep 11, 2007 at 12:35:56AM -0500, Kumar Gala wrote:
On Aug 28, 2007, at 3:16 PM, Scott Wood wrote:
quoted
1. Fix get_immrbase() to use ranges, rather than reg.
It is not always the case that the SoC's first reg property points
to the beginning of the entire SoC block.
when is this true?
The intent was to eliminate the need for the reg property in /soc.
Upon further testing this breaks some platforms. I don't think
assuming the first range entry is mapping to the SOC register space
is a good idea.
Let me guess, 8544ds and 8548cds? Because of the same recent ranges
changes that we were arguing about in another thread? :-P
-Scott
From: Kumar Gala <hidden> Date: 2007-09-11 15:45:43
On Sep 11, 2007, at 8:57 AM, Scott Wood wrote:
On Tue, Sep 11, 2007 at 12:35:56AM -0500, Kumar Gala wrote:
quoted
On Aug 28, 2007, at 3:16 PM, Scott Wood wrote:
quoted
1. Fix get_immrbase() to use ranges, rather than reg.
It is not always the case that the SoC's first reg property points
to the beginning of the entire SoC block.
when is this true?
The intent was to eliminate the need for the reg property in /soc.
quoted
Upon further testing this breaks some platforms. I don't think
assuming the first range entry is mapping to the SOC register space
is a good idea.
Let me guess, 8544ds and 8548cds? Because of the same recent ranges
changes that we were arguing about in another thread? :-P
Yep. However, after some discussion with Segher on this for 83xx/
85xx/86xx I think we want to keep the reg prop and have it cover the
initial soc registers [size on 83xx is 0x100, size on 85xx/86xx would
be 0x1000].
What we need is a saner way to determine immr on 82xx & 8xx.
Segher's rule is that a given "reg" prop shouldn't overlap w/any
other reg. We currently violate that on 8xx. Not as clear on 82xx
if we do that.
I'm thinking on 8xx we should move to grabbing a top level compat
value (mpc8xx) and use the SPRN_IMMR to set immrbase. On mpc82xx-pq2
we could add a immr "device" to search for.
- k
From: Scott Wood <hidden> Date: 2007-09-11 15:52:33
Kumar Gala wrote:
Yep. However, after some discussion with Segher on this for
83xx/85xx/86xx I think we want to keep the reg prop and have it cover
the initial soc registers [size on 83xx is 0x100, size on 85xx/86xx
would be 0x1000].
What we need is a saner way to determine immr on 82xx & 8xx. Segher's
rule is that a given "reg" prop shouldn't overlap w/any other reg. We
currently violate that on 8xx. Not as clear on 82xx if we do that.
I'm thinking on 8xx we should move to grabbing a top level compat value
(mpc8xx) and use the SPRN_IMMR to set immrbase.
Any particular reason to special-case it, when we already need code to
do it the other way for every other fsl soc?
On mpc82xx-pq2 we could
add a immr "device" to search for.
Enh. The soc node *is* the immr "device". I'd rather add a node for
the "initial" registers (they generally don't involve configuring the
immr "bus" itself, but rather the chipselect bus and other miscellaneous
things) if needed, get rid of /soc/reg, and have ranges cover the whole
immr.
And why is 82xx-pq2 special? Wouldn't you need this on 83xx, 85xx, and
86xx as well?
-Scott
From: Kumar Gala <hidden> Date: 2007-09-11 16:19:51
On Sep 11, 2007, at 10:51 AM, Scott Wood wrote:
Kumar Gala wrote:
quoted
Yep. However, after some discussion with Segher on this for 83xx/
85xx/86xx I think we want to keep the reg prop and have it cover
the initial soc registers [size on 83xx is 0x100, size on 85xx/
86xx would be 0x1000].
What we need is a saner way to determine immr on 82xx & 8xx.
Segher's rule is that a given "reg" prop shouldn't overlap w/any
other reg. We currently violate that on 8xx. Not as clear on
82xx if we do that.
I'm thinking on 8xx we should move to grabbing a top level compat
value (mpc8xx) and use the SPRN_IMMR to set immrbase.
Any particular reason to special-case it, when we already need code
to do it the other way for every other fsl soc?
If you suggest a sane way of getting the value let me know. The
mpc8xx doesn't appear to have what I would call 'soc' level registers
like 83xx/85xx/86xx does. How do you propose we determine the immrbase?
quoted
On mpc82xx-pq2 we could add a immr "device" to search for.
Enh. The soc node *is* the immr "device". I'd rather add a node
for the "initial" registers (they generally don't involve
configuring the immr "bus" itself, but rather the chipselect bus
and other miscellaneous things) if needed, get rid of /soc/reg, and
have ranges cover the whole immr.
And why is 82xx-pq2 special? Wouldn't you need this on 83xx, 85xx,
and 86xx as well?
The range will cover the whole immr space on 83xx/85xx/86xx.
82xx-pq2 is special in that its soc regs are in the middle of the
immr address map.
- k
From: Scott Wood <hidden> Date: 2007-09-11 16:25:28
Kumar Gala wrote:
On Sep 11, 2007, at 10:51 AM, Scott Wood wrote:
quoted
Any particular reason to special-case it, when we already need code to
do it the other way for every other fsl soc?
If you suggest a sane way of getting the value let me know. The mpc8xx
doesn't appear to have what I would call 'soc' level registers like
83xx/85xx/86xx does. How do you propose we determine the immrbase?
What exactly do you mean by "soc"-level registers?
I propose we do it by defining the first (and ideally only, but that's
another argument) entry in ranges as the immr, and getting rid of /soc/reg.
quoted
And why is 82xx-pq2 special? Wouldn't you need this on 83xx, 85xx,
and 86xx as well?
The range will cover the whole immr space on 83xx/85xx/86xx.
And why can't it do that on 82xx?
82xx-pq2 is special in that its soc regs are in the middle of the immr
address map.
The /soc node is misnamed; it should really be /immr. Why do we need
these particular registers to be in /soc/reg rather than a subnode?
-Scott
From: Kumar Gala <hidden> Date: 2007-09-11 16:43:00
On Sep 11, 2007, at 11:24 AM, Scott Wood wrote:
Kumar Gala wrote:
quoted
On Sep 11, 2007, at 10:51 AM, Scott Wood wrote:
quoted
Any particular reason to special-case it, when we already need
code to do it the other way for every other fsl soc?
If you suggest a sane way of getting the value let me know. The
mpc8xx doesn't appear to have what I would call 'soc' level
registers like 83xx/85xx/86xx does. How do you propose we
determine the immrbase?
What exactly do you mean by "soc"-level registers?
registers that effect the soc-processor core interaction/bus (things
like LAWs, CCSRBAR, etc).
I propose we do it by defining the first (and ideally only, but
that's another argument) entry in ranges as the immr, and getting
rid of /soc/reg.
I disagree. I don't think we want to start overloading the meaning
of something like 'ranges' in that way.
quoted
quoted
And why is 82xx-pq2 special? Wouldn't you need this on 83xx,
85xx, and 86xx as well?
The range will cover the whole immr space on 83xx/85xx/86xx.
And why can't it do that on 82xx?
we can cover the whole range, thats fine. We just need a different
mechanism to determine immr base.
quoted
82xx-pq2 is special in that its soc regs are in the middle of the
immr address map.
The /soc node is misnamed; it should really be /immr. Why do we
need these particular registers to be in /soc/reg rather than a
subnode?
They could be in a sub node if there is a clear subnode for them to
be in.
- k
From: Scott Wood <hidden> Date: 2007-09-11 17:04:22
Kumar Gala wrote:
On Sep 11, 2007, at 11:24 AM, Scott Wood wrote:
quoted
I propose we do it by defining the first (and ideally only, but
that's another argument) entry in ranges as the immr, and getting
rid of /soc/reg.
I disagree.
I'm shocked. :-)
I don't think we want to start overloading the meaning of something
like 'ranges' in that way.
As opposed to overloading the meaning of 'reg'?
It's no different than how PCI ranges are treated -- we interpret, in a
bus-specific way, that certain ranges mean certain things. In the case
of fsl immr/cssr buses, the first range would mean the immr/cssr space.
quoted
quoted
quoted
And why is 82xx-pq2 special? Wouldn't you need this on 83xx,
85xx, and 86xx as well?
The range will cover the whole immr space on 83xx/85xx/86xx.
And why can't it do that on 82xx?
we can cover the whole range, thats fine. We just need a different
mechanism to determine immr base.
I'm unconvinced.
quoted
quoted
82xx-pq2 is special in that its soc regs are in the middle of the
immr address map.
The /soc node is misnamed; it should really be /immr. Why do we
need these particular registers to be in /soc/reg rather than a
subnode?
They could be in a sub node if there is a clear subnode for them to
be in.
Does anything actually use /soc/reg as anything other than an input to
get_immrbase()? If not, we can defer defining such nodes until there's
actually a need.
It'd probably be more efficient to discuss this in person; can you stop
by my cube sometime when you're around and not in a meeting?
-Scott
From: Kumar Gala <hidden> Date: 2007-09-11 17:52:17
On Sep 11, 2007, at 12:03 PM, Scott Wood wrote:
Kumar Gala wrote:
quoted
On Sep 11, 2007, at 11:24 AM, Scott Wood wrote:
quoted
I propose we do it by defining the first (and ideally only, but
that's another argument) entry in ranges as the immr, and getting
rid of /soc/reg.
I disagree.
I'm shocked. :-)
:)
quoted
I don't think we want to start overloading the meaning of
something like 'ranges' in that way.
As opposed to overloading the meaning of 'reg'?
It's no different than how PCI ranges are treated -- we interpret,
in a bus-specific way, that certain ranges mean certain things. In
the case of fsl immr/cssr buses, the first range would mean the
immr/cssr space.
In PCI its not order dependent. Its just a PCI address. If you want
to propose a SOC address that encodes other information like the PCI
address does feel free to. However, order shouldn't be special. Its
too fragile.
quoted
quoted
quoted
quoted
And why is 82xx-pq2 special? Wouldn't you need this on 83xx,
85xx, and 86xx as well?
The range will cover the whole immr space on 83xx/85xx/86xx.
And why can't it do that on 82xx?
we can cover the whole range, thats fine. We just need a different
mechanism to determine immr base.
I'm unconvinced.
quoted
quoted
quoted
82xx-pq2 is special in that its soc regs are in the middle of the
immr address map.
The /soc node is misnamed; it should really be /immr. Why do we
need these particular registers to be in /soc/reg rather than a
subnode?
They could be in a sub node if there is a clear subnode for them
to be in.
Does anything actually use /soc/reg as anything other than an input to
get_immrbase()? If not, we can defer defining such nodes until
there's
actually a need.
I think that's the only user for it. Let's separate the issues.
It'd probably be more efficient to discuss this in person; can you
stop
by my cube sometime when you're around and not in a meeting?
I suggest you propose a solution to determine IMMR base w/o having
using a specific entry in the range property and w/o introducing a
new property. I believe it can be done via either a new device type/
sub-node or regs in the soc node. However, I don't believe you'll be
able to come up with a solution that works for all the FSL platforms.
- k