Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
d43e2297
Commit
d43e2297
authored
May 12, 2004
by
Deepak Saxena
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add IXP4xx support
parent
3b6e11b5
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
3930 additions
and
0 deletions
+3930
-0
arch/arm/configs/ixp4xx_defconfig
arch/arm/configs/ixp4xx_defconfig
+1081
-0
arch/arm/mach-ixp4xx/Kconfig
arch/arm/mach-ixp4xx/Kconfig
+73
-0
arch/arm/mach-ixp4xx/Makefile
arch/arm/mach-ixp4xx/Makefile
+10
-0
arch/arm/mach-ixp4xx/common-pci.c
arch/arm/mach-ixp4xx/common-pci.c
+543
-0
arch/arm/mach-ixp4xx/coyote-pci.c
arch/arm/mach-ixp4xx/coyote-pci.c
+69
-0
arch/arm/mach-ixp4xx/coyote-setup.c
arch/arm/mach-ixp4xx/coyote-setup.c
+97
-0
arch/arm/mach-ixp4xx/ixdp425-pci.c
arch/arm/mach-ixp4xx/ixdp425-pci.c
+84
-0
arch/arm/mach-ixp4xx/ixdp425-setup.c
arch/arm/mach-ixp4xx/ixdp425-setup.c
+153
-0
arch/arm/mach-ixp4xx/prpmc1100-pci.c
arch/arm/mach-ixp4xx/prpmc1100-pci.c
+119
-0
arch/arm/mach-ixp4xx/prpmc1100-setup.c
arch/arm/mach-ixp4xx/prpmc1100-setup.c
+96
-0
include/asm-arm/arch-ixp4xx/coyote.h
include/asm-arm/arch-ixp4xx/coyote.h
+36
-0
include/asm-arm/arch-ixp4xx/dma.h
include/asm-arm/arch-ixp4xx/dma.h
+52
-0
include/asm-arm/arch-ixp4xx/hardware.h
include/asm-arm/arch-ixp4xx/hardware.h
+41
-0
include/asm-arm/arch-ixp4xx/ide.h
include/asm-arm/arch-ixp4xx/ide.h
+37
-0
include/asm-arm/arch-ixp4xx/io.h
include/asm-arm/arch-ixp4xx/io.h
+388
-0
include/asm-arm/arch-ixp4xx/irq.h
include/asm-arm/arch-ixp4xx/irq.h
+13
-0
include/asm-arm/arch-ixp4xx/irqs.h
include/asm-arm/arch-ixp4xx/irqs.h
+78
-0
include/asm-arm/arch-ixp4xx/ixdp425.h
include/asm-arm/arch-ixp4xx/ixdp425.h
+38
-0
include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
+551
-0
include/asm-arm/arch-ixp4xx/memory.h
include/asm-arm/arch-ixp4xx/memory.h
+49
-0
include/asm-arm/arch-ixp4xx/param.h
include/asm-arm/arch-ixp4xx/param.h
+3
-0
include/asm-arm/arch-ixp4xx/platform.h
include/asm-arm/arch-ixp4xx/platform.h
+116
-0
include/asm-arm/arch-ixp4xx/prpmc1100.h
include/asm-arm/arch-ixp4xx/prpmc1100.h
+33
-0
include/asm-arm/arch-ixp4xx/serial.h
include/asm-arm/arch-ixp4xx/serial.h
+27
-0
include/asm-arm/arch-ixp4xx/system.h
include/asm-arm/arch-ixp4xx/system.h
+43
-0
include/asm-arm/arch-ixp4xx/time.h
include/asm-arm/arch-ixp4xx/time.h
+7
-0
include/asm-arm/arch-ixp4xx/timex.h
include/asm-arm/arch-ixp4xx/timex.h
+12
-0
include/asm-arm/arch-ixp4xx/uncompress.h
include/asm-arm/arch-ixp4xx/uncompress.h
+64
-0
include/asm-arm/arch-ixp4xx/vmalloc.h
include/asm-arm/arch-ixp4xx/vmalloc.h
+17
-0
No files found.
arch/arm/configs/ixp4xx_defconfig
0 → 100644
View file @
d43e2297
#
# Automatically generated make config: don't edit
#
CONFIG_ARM=y
CONFIG_MMU=y
CONFIG_UID16=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_CLEAN_COMPILE=y
CONFIG_STANDALONE=y
CONFIG_BROKEN_ON_SMP=y
#
# General setup
#
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
# CONFIG_POSIX_MQUEUE is not set
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set
CONFIG_LOG_BUF_SHIFT=14
# CONFIG_HOTPLUG is not set
# CONFIG_IKCONFIG is not set
CONFIG_EMBEDDED=y
CONFIG_KALLSYMS=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
#
# Loadable module support
#
CONFIG_MODULES=y
# CONFIG_MODULE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
CONFIG_MODVERSIONS=y
CONFIG_KMOD=y
#
# System Type
#
# CONFIG_ARCH_ADIFCC is not set
# CONFIG_ARCH_CLPS7500 is not set
# CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CO285 is not set
# CONFIG_ARCH_PXA is not set
# CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_CAMELOT is not set
# CONFIG_ARCH_FOOTBRIDGE is not set
# CONFIG_ARCH_INTEGRATOR is not set
# CONFIG_ARCH_IOP3XX is not set
CONFIG_ARCH_IXP4XX=y
# CONFIG_ARCH_L7200 is not set
# CONFIG_ARCH_RPC is not set
# CONFIG_ARCH_SA1100 is not set
# CONFIG_ARCH_SHARK is not set
# CONFIG_ARCH_S3C2410 is not set
# CONFIG_ARCH_OMAP is not set
# CONFIG_ARCH_LH7A40X is not set
# CONFIG_ARCH_VERSATILE_PB is not set
#
# CLPS711X/EP721X Implementations
#
#
# Epxa10db
#
#
# Footbridge Implementations
#
#
# IOP3xx Implementation Options
#
# CONFIG_ARCH_IOP310 is not set
# CONFIG_ARCH_IOP321 is not set
#
# IOP3xx Chipset Features
#
CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
#
# Intel IXP4xx Implementation Options
#
#
# IXP4xx Platforms
#
CONFIG_ARCH_IXDP425=y
CONFIG_ARCH_IXCDP1100=y
CONFIG_ARCH_PRPMC1100=y
CONFIG_ARCH_ADI_COYOTE=y
# CONFIG_ARCH_AVILA is not set
CONFIG_ARCH_IXDP4XX=y
#
# IXP4xx Options
#
# CONFIG_IXP4XX_INDIRECT_PCI is not set
#
# Intel PXA250/210 Implementations
#
#
# SA11x0 Implementations
#
#
# TI OMAP Implementations
#
#
# OMAP Core Type
#
#
# OMAP Board Type
#
#
# OMAP Feature Selections
#
#
# S3C2410 Implementations
#
#
# LH7A40X Implementations
#
CONFIG_DMABOUNCE=y
#
# Processor Type
#
CONFIG_CPU_32=y
CONFIG_CPU_XSCALE=y
CONFIG_CPU_32v5=y
CONFIG_CPU_ABRT_EV5T=y
CONFIG_CPU_TLB_V4WBI=y
CONFIG_CPU_MINICACHE=y
#
# Processor Features
#
# CONFIG_ARM_THUMB is not set
CONFIG_CPU_BIG_ENDIAN=y
CONFIG_XSCALE_PMU=y
#
# General setup
#
CONFIG_PCI=y
# CONFIG_ZBOOT_ROM is not set
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_PCI_LEGACY_PROC=y
CONFIG_PCI_NAMES=y
#
# At least one math emulation must be selected
#
CONFIG_FPE_NWFPE=y
# CONFIG_FPE_NWFPE_XP is not set
# CONFIG_FPE_FASTFPE is not set
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_AOUT is not set
# CONFIG_BINFMT_MISC is not set
#
# Generic Driver Options
#
# CONFIG_DEBUG_DRIVER is not set
CONFIG_PM=y
# CONFIG_PREEMPT is not set
CONFIG_APM=y
# CONFIG_ARTHUR is not set
CONFIG_CMDLINE="console=ttyS0,115200 ip=bootp root=/dev/nfs"
CONFIG_ALIGNMENT_TRAP=y
#
# Parallel port support
#
# CONFIG_PARPORT is not set
#
# Memory Technology Devices (MTD)
#
CONFIG_MTD=y
# CONFIG_MTD_DEBUG is not set
CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_CONCAT is not set
CONFIG_MTD_REDBOOT_PARTS=y
# CONFIG_MTD_CMDLINE_PARTS is not set
# CONFIG_MTD_AFS_PARTS is not set
#
# User Modules And Translation Layers
#
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not set
# CONFIG_INFTL 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_CFI_INTELEXT=y
# CONFIG_MTD_CFI_AMDSTD is not set
# CONFIG_MTD_CFI_STAA is not set
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set
# CONFIG_MTD_OBSOLETE_CHIPS is not set
#
# Mapping drivers for chip access
#
CONFIG_MTD_COMPLEX_MAPPINGS=y
# CONFIG_MTD_PHYSMAP is not set
# CONFIG_MTD_ARM_INTEGRATOR is not set
CONFIG_MTD_IXP4XX=y
# CONFIG_MTD_EDB7312 is not set
# CONFIG_MTD_PCI is not set
#
# Self-contained MTD device drivers
#
# CONFIG_MTD_PMC551 is not set
# CONFIG_MTD_SLRAM is not set
# CONFIG_MTD_MTDRAM is not set
# CONFIG_MTD_BLKMTD 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
#
# NAND Flash Device Drivers
#
CONFIG_MTD_NAND=m
# CONFIG_MTD_NAND_VERIFY_WRITE is not set
CONFIG_MTD_NAND_IDS=m
#
# Plug and Play support
#
#
# Block devices
#
# 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_UMEM 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_CARMEL is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_BLK_DEV_INITRD=y
#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set
#
# Networking support
#
CONFIG_NET=y
#
# Networking options
#
CONFIG_PACKET=m
CONFIG_PACKET_MMAP=y
CONFIG_NETLINK_DEV=m
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_FWMARK=y
CONFIG_IP_ROUTE_NAT=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_TOS=y
CONFIG_IP_ROUTE_VERBOSE=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=m
CONFIG_NET_IPGRE=m
CONFIG_NET_IPGRE_BROADCAST=y
CONFIG_IP_MROUTE=y
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
# 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
#
# IP: Virtual Server Configuration
#
CONFIG_IP_VS=m
CONFIG_IP_VS_DEBUG=y
CONFIG_IP_VS_TAB_BITS=12
#
# IPVS transport protocol load balancing support
#
# CONFIG_IP_VS_PROTO_TCP is not set
# CONFIG_IP_VS_PROTO_UDP is not set
# CONFIG_IP_VS_PROTO_ESP is not set
# CONFIG_IP_VS_PROTO_AH is not set
#
# IPVS scheduler
#
CONFIG_IP_VS_RR=m
CONFIG_IP_VS_WRR=m
CONFIG_IP_VS_LC=m
CONFIG_IP_VS_WLC=m
CONFIG_IP_VS_LBLC=m
CONFIG_IP_VS_LBLCR=m
CONFIG_IP_VS_DH=m
CONFIG_IP_VS_SH=m
# CONFIG_IP_VS_SED is not set
# CONFIG_IP_VS_NQ is not set
#
# IPVS application helper
#
# CONFIG_IPV6 is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_BRIDGE_NETFILTER=y
#
# IP: Netfilter Configuration
#
CONFIG_IP_NF_CONNTRACK=m
CONFIG_IP_NF_FTP=m
CONFIG_IP_NF_IRC=m
# CONFIG_IP_NF_TFTP is not set
# CONFIG_IP_NF_AMANDA is not set
CONFIG_IP_NF_QUEUE=m
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_MATCH_LIMIT=m
# CONFIG_IP_NF_MATCH_IPRANGE is not set
CONFIG_IP_NF_MATCH_MAC=m
# CONFIG_IP_NF_MATCH_PKTTYPE is not set
CONFIG_IP_NF_MATCH_MARK=m
CONFIG_IP_NF_MATCH_MULTIPORT=m
CONFIG_IP_NF_MATCH_TOS=m
# CONFIG_IP_NF_MATCH_RECENT is not set
# CONFIG_IP_NF_MATCH_ECN is not set
# CONFIG_IP_NF_MATCH_DSCP is not set
CONFIG_IP_NF_MATCH_AH_ESP=m
CONFIG_IP_NF_MATCH_LENGTH=m
CONFIG_IP_NF_MATCH_TTL=m
CONFIG_IP_NF_MATCH_TCPMSS=m
# CONFIG_IP_NF_MATCH_HELPER is not set
CONFIG_IP_NF_MATCH_STATE=m
# CONFIG_IP_NF_MATCH_CONNTRACK is not set
CONFIG_IP_NF_MATCH_OWNER=m
# CONFIG_IP_NF_MATCH_PHYSDEV is not set
CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_TARGET_REJECT=m
CONFIG_IP_NF_NAT=m
CONFIG_IP_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=m
CONFIG_IP_NF_TARGET_REDIRECT=m
# CONFIG_IP_NF_TARGET_NETMAP is not set
# CONFIG_IP_NF_TARGET_SAME is not set
CONFIG_IP_NF_NAT_LOCAL=y
CONFIG_IP_NF_NAT_SNMP_BASIC=m
CONFIG_IP_NF_NAT_IRC=m
CONFIG_IP_NF_NAT_FTP=m
CONFIG_IP_NF_MANGLE=m
CONFIG_IP_NF_TARGET_TOS=m
# CONFIG_IP_NF_TARGET_ECN is not set
# CONFIG_IP_NF_TARGET_DSCP is not set
CONFIG_IP_NF_TARGET_MARK=m
# CONFIG_IP_NF_TARGET_CLASSIFY is not set
CONFIG_IP_NF_TARGET_LOG=m
CONFIG_IP_NF_TARGET_ULOG=m
CONFIG_IP_NF_TARGET_TCPMSS=m
CONFIG_IP_NF_ARPTABLES=m
CONFIG_IP_NF_ARPFILTER=m
# CONFIG_IP_NF_ARP_MANGLE is not set
CONFIG_IP_NF_COMPAT_IPCHAINS=m
CONFIG_IP_NF_COMPAT_IPFWADM=m
# CONFIG_IP_NF_RAW is not set
#
# Bridge: Netfilter Configuration
#
# CONFIG_BRIDGE_NF_EBTABLES is not set
CONFIG_XFRM=y
# CONFIG_XFRM_USER is not set
#
# SCTP Configuration (EXPERIMENTAL)
#
# CONFIG_IP_SCTP is not set
CONFIG_ATM=y
CONFIG_ATM_CLIP=y
# CONFIG_ATM_CLIP_NO_ICMP is not set
CONFIG_ATM_LANE=m
CONFIG_ATM_MPOA=m
CONFIG_ATM_BR2684=m
# CONFIG_ATM_BR2684_IPFILTER is not set
CONFIG_BRIDGE=m
CONFIG_VLAN_8021Q=m
# CONFIG_DECNET is not set
CONFIG_LLC=m
# CONFIG_LLC2 is not set
CONFIG_IPX=m
# CONFIG_IPX_INTERN is not set
CONFIG_ATALK=m
CONFIG_DEV_APPLETALK=y
CONFIG_IPDDP=m
CONFIG_IPDDP_ENCAP=y
CONFIG_IPDDP_DECAP=y
CONFIG_X25=m
CONFIG_LAPB=m
# CONFIG_NET_DIVERT is not set
CONFIG_ECONET=m
CONFIG_ECONET_AUNUDP=y
CONFIG_ECONET_NATIVE=y
CONFIG_WAN_ROUTER=m
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set
#
# QoS and/or fair queueing
#
CONFIG_NET_SCHED=y
CONFIG_NET_SCH_CBQ=m
CONFIG_NET_SCH_HTB=m
# CONFIG_NET_SCH_HFSC is not set
CONFIG_NET_SCH_CSZ=m
# CONFIG_NET_SCH_ATM is not set
CONFIG_NET_SCH_PRIO=m
CONFIG_NET_SCH_RED=m
CONFIG_NET_SCH_SFQ=m
CONFIG_NET_SCH_TEQL=m
CONFIG_NET_SCH_TBF=m
CONFIG_NET_SCH_GRED=m
CONFIG_NET_SCH_DSMARK=m
# CONFIG_NET_SCH_DELAY is not set
CONFIG_NET_SCH_INGRESS=m
CONFIG_NET_QOS=y
CONFIG_NET_ESTIMATOR=y
CONFIG_NET_CLS=y
CONFIG_NET_CLS_TCINDEX=m
CONFIG_NET_CLS_ROUTE4=m
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=m
CONFIG_NET_CLS_U32=m
CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m
CONFIG_NET_CLS_POLICE=y
#
# Network testing
#
CONFIG_NET_PKTGEN=m
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
CONFIG_NETDEVICES=y
CONFIG_DUMMY=y
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_ETHERTAP is not set
#
# ARCnet devices
#
# CONFIG_ARCNET 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_NET_VENDOR_3COM is not set
#
# Tulip family network device support
#
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_B44 is not set
# CONFIG_FORCEDETH is not set
# CONFIG_DGRS is not set
CONFIG_EEPRO100=y
# CONFIG_EEPRO100_PIO is not set
# CONFIG_E100 is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139CP is not set
# CONFIG_8139TOO is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
#
# Ethernet (1000 Mbit)
#
# 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_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SK98LIN is not set
# CONFIG_TIGON3 is not set
#
# Ethernet (10000 Mbit)
#
# CONFIG_IXGB is not set
# CONFIG_S2IO is not set
#
# Token Ring devices
#
# CONFIG_TR is not set
#
# Wireless LAN (non-hamradio)
#
CONFIG_NET_RADIO=y
#
# Obsolete Wireless cards support (pre-802.11)
#
# CONFIG_STRIP is not set
#
# Wireless 802.11b ISA/PCI cards support
#
# CONFIG_AIRO is not set
CONFIG_HERMES=y
# CONFIG_PLX_HERMES is not set
# CONFIG_TMD_HERMES is not set
CONFIG_PCI_HERMES=y
# CONFIG_ATMEL is not set
#
# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
#
CONFIG_NET_WIRELESS=y
#
# Wan interfaces
#
CONFIG_WAN=y
# CONFIG_DSCC4 is not set
# CONFIG_LANMEDIA is not set
# CONFIG_SYNCLINK_SYNCPPP is not set
CONFIG_HDLC=m
CONFIG_HDLC_RAW=y
# CONFIG_HDLC_RAW_ETH is not set
CONFIG_HDLC_CISCO=y
CONFIG_HDLC_FR=y
CONFIG_HDLC_PPP=y
CONFIG_HDLC_X25=y
# CONFIG_PCI200SYN is not set
# CONFIG_WANXL is not set
# CONFIG_PC300 is not set
# CONFIG_FARSYNC is not set
CONFIG_DLCI=m
CONFIG_DLCI_COUNT=24
CONFIG_DLCI_MAX=8
CONFIG_WAN_ROUTER_DRIVERS=y
# CONFIG_CYCLADES_SYNC is not set
# CONFIG_LAPBETHER is not set
# CONFIG_X25_ASY is not set
#
# ATM drivers
#
CONFIG_ATM_TCP=m
# CONFIG_ATM_LANAI is not set
# CONFIG_ATM_ENI is not set
# CONFIG_ATM_FIRESTREAM is not set
# CONFIG_ATM_ZATM is not set
# CONFIG_ATM_NICSTAR is not set
# CONFIG_ATM_IDT77252 is not set
# CONFIG_ATM_AMBASSADOR is not set
# CONFIG_ATM_HORIZON is not set
# CONFIG_ATM_IA is not set
# CONFIG_ATM_FORE200E_MAYBE is not set
# CONFIG_ATM_HE is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_RCPCI is not set
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set
#
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
#
# Please see Documentation/ide.txt for help/info on IDE drives
#
CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_IDEDISK_MULTI_MODE is not set
# CONFIG_IDEDISK_STROKE is not set
# CONFIG_BLK_DEV_IDECD is not set
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_IDE_TASK_IOCTL is not set
# CONFIG_IDE_TASKFILE_IO is not set
#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=y
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDEPCI_SHARE_IRQ is not set
# CONFIG_BLK_DEV_OFFBOARD is not set
# CONFIG_BLK_DEV_GENERIC is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_SL82C105 is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
# CONFIG_IDEDMA_PCI_AUTO is not set
CONFIG_BLK_DEV_ADMA=y
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
CONFIG_BLK_DEV_CMD64X=y
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT34X is not set
CONFIG_BLK_DEV_HPT366=y
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
CONFIG_BLK_DEV_PDC202XX_NEW=y
# CONFIG_PDC202XX_FORCE is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
# CONFIG_IDEDMA_AUTO is not set
# CONFIG_BLK_DEV_HD is not set
#
# SCSI device support
#
# CONFIG_SCSI is not set
#
# Fusion MPT device support
#
# CONFIG_FUSION is not set
#
# IEEE 1394 (FireWire) support
#
# CONFIG_IEEE1394 is not set
#
# I2O device support
#
# CONFIG_I2O is not set
#
# ISDN subsystem
#
# CONFIG_ISDN is not set
#
# Input device support
#
CONFIG_INPUT=y
#
# 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 I/O drivers
#
# CONFIG_GAMEPORT is not set
CONFIG_SOUND_GAMEPORT=y
# CONFIG_SERIO is not set
# CONFIG_SERIO_I8042 is not set
#
# Input Device Drivers
#
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set
#
# Character devices
#
# CONFIG_VT is not set
# CONFIG_SERIAL_NONSTANDARD is not set
#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=2
# CONFIG_SERIAL_8250_EXTENDED is not set
#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
# CONFIG_QIC02_TAPE is not set
#
# IPMI
#
# CONFIG_IPMI_HANDLER is not set
#
# Watchdog Cards
#
CONFIG_WATCHDOG=y
# CONFIG_WATCHDOG_NOWAYOUT is not set
#
# Watchdog Device Drivers
#
# CONFIG_SOFT_WATCHDOG is not set
CONFIG_IXP4XX_WATCHDOG=y
#
# PCI-based Watchdog Cards
#
# CONFIG_PCIPCWATCHDOG is not set
# CONFIG_WDTPCI is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
# CONFIG_AGP is not set
# CONFIG_DRM is not set
# CONFIG_RAW_DRIVER is not set
#
# I2C support
#
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
#
# I2C Algorithms
#
CONFIG_I2C_ALGOBIT=y
# CONFIG_I2C_ALGOPCF is not set
#
# I2C Hardware Bus support
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_I810 is not set
# CONFIG_I2C_ISA is not set
CONFIG_I2C_IXP4XX=y
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_PIIX4 is not set
# CONFIG_I2C_PROSAVAGE is not set
# CONFIG_I2C_SAVAGE4 is not set
# CONFIG_SCx200_ACB is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
# CONFIG_I2C_VOODOO3 is not set
#
# Hardware Sensors Chip support
#
CONFIG_I2C_SENSOR=y
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_DS1621 is not set
# CONFIG_SENSORS_FSCHER is not set
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM80 is not set
# CONFIG_SENSORS_LM83 is not set
# CONFIG_SENSORS_LM85 is not set
# CONFIG_SENSORS_LM90 is not set
# CONFIG_SENSORS_VIA686A is not set
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_SENSORS_W83627HF is not set
#
# Other I2C Chip support
#
CONFIG_SENSORS_EEPROM=y
# CONFIG_SENSORS_PCF8574 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set
#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set
#
# Digital Video Broadcasting Devices
#
# CONFIG_DVB is not set
#
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
# CONFIG_EXT2_FS_SECURITY is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
# 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_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_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_FAT_FS is not set
# CONFIG_NTFS_FS is not set
#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_SYSFS=y
# CONFIG_DEVFS_FS is not set
# CONFIG_DEVPTS_FS_XATTR is not set
CONFIG_TMPFS=y
# CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y
#
# 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_JFFS_FS is not set
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=0
# CONFIG_JFFS2_FS_NAND is not set
# CONFIG_CRAMFS is not set
# 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_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_EXPORTFS is not set
CONFIG_SUNRPC=y
# CONFIG_RPCSEC_GSS_KRB5 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_INTERMEZZO_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_NEC98_PARTITION is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_EFI_PARTITION is not set
#
# Native Language Support
#
# CONFIG_NLS is not set
#
# Profiling support
#
# CONFIG_PROFILING is not set
#
# Graphics support
#
# CONFIG_FB is not set
#
# Sound
#
# CONFIG_SOUND is not set
#
# Misc devices
#
#
# USB support
#
# CONFIG_USB is not set
#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
#
# Kernel hacking
#
CONFIG_FRAME_POINTER=y
# CONFIG_DEBUG_USER is not set
# CONFIG_DEBUG_INFO is not set
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_SLAB is not set
CONFIG_MAGIC_SYSRQ=y
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_WAITQ is not set
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_LL=y
# CONFIG_DEBUG_ICEDCC is not set
# CONFIG_DEBUG_BDI2000_XSCALE is not set
#
# Security options
#
# CONFIG_SECURITY is not set
#
# Cryptographic options
#
# CONFIG_CRYPTO is not set
#
# Library routines
#
CONFIG_CRC32=y
# CONFIG_LIBCRC32C is not set
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
arch/arm/mach-ixp4xx/Kconfig
0 → 100644
View file @
d43e2297
config ARCH_SUPPORTS_BIG_ENDIAN
bool
depends on ARCH_IXP4XX
default y
menu "Intel IXP4xx Implementation Options"
comment "IXP4xx Platforms"
config ARCH_IXDP425
bool "Support for Intel IXDP425 (Richfield) Development Platform"
depends on ARCH_IXP4XX
help
#
# IXCDP1100 is the exact same HW as IXDP425, but with a different machine
# number from the bootloader due to marketing monkeys, so we just enable it
# by default if IXDP425 is enabled.
#
config ARCH_IXCDP1100
bool
depends on ARCH_IXDP425
default y
config ARCH_PRPMC1100
bool "Support for Motorola PrPMC 1100 Platform"
depends on ARCH_IXP4XX
config ARCH_ADI_COYOTE
bool "Support for ADI Engineering Coyote Gateway Reference Platform"
depends on ARCH_IXP4XX
config ARCH_AVILA
bool "Support for Gateworks Avila Network Platform"
depends on ARCH_IXP4XX
#
# Avila and IXDP share the same source for now. Will change in future
#
config ARCH_IXDP4XX
bool
depends on ARCH_IXDP425 || ARCH_AVILA
default y
comment "IXP4xx Options"
config IXP4XX_INDIRECT_PCI
bool "Use indirect PCI memory access"
depends on ARCH_IXP4XX
help
IXP4xx provides two methods of accessing PCI memory space:
1) A direct mapped window from 0x48000000 to 0x4bffffff (64MB).
To access PCI via this space, we simply ioremap() the BAR
into the kernel and we can use the standard read[bwl]/write[bwl]
macros. This is the preffered method due to speed but it
limits the system to just 64MB of PCI memory. This can be
problamatic if using video cards and other memory-heavy devices.
2) If > 64MB of memory space is required, the IXP4xx can be
configured to use indirect registers to access PCI This allows
for up to 128MB (0x48000000 to 0x4fffffff) of memory on the bus.
The disadvantadge of this is that every PCI access requires
three local register accesses plus a spinlock, but in some
cases the performance hit is acceptable. In addition, you cannot
mmap() PCI devices in this case due to the indirect nature
of the PCI window.
By default, the direct method is used. Choose this option if you
need to use the indirect method instead. If you don't know
what you need, leave this option unselected.
endmenu
arch/arm/mach-ixp4xx/Makefile
0 → 100644
View file @
d43e2297
#
# Makefile for the linux kernel.
#
obj-y
+=
common.o common-pci.o
obj-$(CONFIG_ARCH_IXDP4XX)
+=
ixdp425-pci.o ixdp425-setup.o
obj-$(CONFIG_ARCH_ADI_COYOTE)
+=
coyote-pci.o coyote-setup.o
obj-$(CONFIG_ARCH_PRPMC1100)
+=
prpmc1100-pci.o prpmc1100-setup.o
arch/arm/mach-ixp4xx/common-pci.c
0 → 100644
View file @
d43e2297
/*
* arch/arm/mach-ixp4xx/common-pci.c
*
* IXP4XX PCI routines for all platforms
*
* Maintainer: Deepak Saxena <dsaxena@plexity.net>
*
* Copyright (C) 2002 Intel Corporation.
* Copyright (C) 2003 Greg Ungerer <gerg@snapgear.com>
* Copyright (C) 2003-2004 MontaVista Software, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <asm/dma-mapping.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/sizes.h>
#include <asm/system.h>
#include <asm/mach/pci.h>
#include <asm/hardware.h>
#include <asm/sizes.h>
/*
* IXP4xx PCI read function is dependent on whether we are
* running A0 or B0 (AppleGate) silicon.
*/
int
(
*
ixp4xx_pci_read
)(
u32
addr
,
u32
cmd
,
u32
*
data
);
/*
* Base address for PCI regsiter region
*/
unsigned
long
ixp4xx_pci_reg_base
=
0
;
/*
* PCI cfg an I/O routines are done by programming a
* command/byte enable register, and then read/writing
* the data from a data regsiter. We need to ensure
* these transactions are atomic or we will end up
* with corrupt data on the bus or in a driver.
*/
static
spinlock_t
ixp4xx_pci_lock
=
SPIN_LOCK_UNLOCKED
;
/*
* Read from PCI config space
*/
static
void
crp_read
(
u32
ad_cbe
,
u32
*
data
)
{
unsigned
long
flags
;
spin_lock_irqsave
(
&
ixp4xx_pci_lock
,
flags
);
*
PCI_CRP_AD_CBE
=
ad_cbe
;
*
data
=
*
PCI_CRP_RDATA
;
spin_unlock_irqrestore
(
&
ixp4xx_pci_lock
,
flags
);
}
/*
* Write to PCI config space
*/
static
void
crp_write
(
u32
ad_cbe
,
u32
data
)
{
unsigned
long
flags
;
spin_lock_irqsave
(
&
ixp4xx_pci_lock
,
flags
);
*
PCI_CRP_AD_CBE
=
CRP_AD_CBE_WRITE
|
ad_cbe
;
*
PCI_CRP_WDATA
=
data
;
spin_unlock_irqrestore
(
&
ixp4xx_pci_lock
,
flags
);
}
static
inline
int
check_master_abort
(
void
)
{
/* check Master Abort bit after access */
unsigned
long
isr
=
*
PCI_ISR
;
if
(
isr
&
PCI_ISR_PFE
)
{
/* make sure the Master Abort bit is reset */
*
PCI_ISR
=
PCI_ISR_PFE
;
pr_debug
(
"%s failed
\n
"
,
__FUNCTION__
);
return
1
;
}
return
0
;
}
int
ixp4xx_pci_read_errata
(
u32
addr
,
u32
cmd
,
u32
*
data
)
{
unsigned
long
flags
;
int
retval
=
0
;
int
i
;
spin_lock_irqsave
(
&
ixp4xx_pci_lock
,
flags
);
*
PCI_NP_AD
=
addr
;
/*
* PCI workaround - only works if NP PCI space reads have
* no side effects!!! Read 8 times. last one will be good.
*/
for
(
i
=
0
;
i
<
8
;
i
++
)
{
*
PCI_NP_CBE
=
cmd
;
*
data
=
*
PCI_NP_RDATA
;
*
data
=
*
PCI_NP_RDATA
;
}
if
(
check_master_abort
())
retval
=
1
;
spin_unlock_irqrestore
(
&
ixp4xx_pci_lock
,
flags
);
return
retval
;
}
int
ixp4xx_pci_read_no_errata
(
u32
addr
,
u32
cmd
,
u32
*
data
)
{
unsigned
long
flags
;
int
retval
=
0
;
spin_lock_irqsave
(
&
ixp4xx_pci_lock
,
flags
);
*
PCI_NP_AD
=
addr
;
/* set up and execute the read */
*
PCI_NP_CBE
=
cmd
;
/* the result of the read is now in NP_RDATA */
*
data
=
*
PCI_NP_RDATA
;
if
(
check_master_abort
())
retval
=
1
;
spin_unlock_irqrestore
(
&
ixp4xx_pci_lock
,
flags
);
return
retval
;
}
int
ixp4xx_pci_write
(
u32
addr
,
u32
cmd
,
u32
data
)
{
unsigned
long
flags
;
int
retval
=
0
;
spin_lock_irqsave
(
&
ixp4xx_pci_lock
,
flags
);
*
PCI_NP_AD
=
addr
;
/* set up the write */
*
PCI_NP_CBE
=
cmd
;
/* execute the write by writing to NP_WDATA */
*
PCI_NP_WDATA
=
data
;
if
(
check_master_abort
())
retval
=
1
;
spin_unlock_irqrestore
(
&
ixp4xx_pci_lock
,
flags
);
return
retval
;
}
static
u32
ixp4xx_config_addr
(
u8
bus_num
,
u16
devfn
,
int
where
)
{
u32
addr
;
if
(
!
bus_num
)
{
/* type 0 */
addr
=
BIT
(
32
-
PCI_SLOT
(
devfn
))
|
((
PCI_FUNC
(
devfn
))
<<
8
)
|
(
where
&
~
3
);
}
else
{
/* type 1 */
addr
=
(
bus_num
<<
16
)
|
((
PCI_SLOT
(
devfn
))
<<
11
)
|
((
PCI_FUNC
(
devfn
))
<<
8
)
|
(
where
&
~
3
)
|
1
;
}
return
addr
;
}
/*
* Mask table, bits to mask for quantity of size 1, 2 or 4 bytes.
* 0 and 3 are not valid indexes...
*/
static
u32
bytemask
[]
=
{
/*0*/
0
,
/*1*/
0xff
,
/*2*/
0xffff
,
/*3*/
0
,
/*4*/
0xffffffff
,
};
static
u32
local_byte_lane_enable_bits
(
u32
n
,
int
size
)
{
if
(
size
==
1
)
return
(
0xf
&
~
BIT
(
n
))
<<
CRP_AD_CBE_BESL
;
if
(
size
==
2
)
return
(
0xf
&
~
(
BIT
(
n
)
|
BIT
(
n
+
1
)))
<<
CRP_AD_CBE_BESL
;
if
(
size
==
4
)
return
0
;
return
0xffffffff
;
}
static
int
local_read_config
(
int
where
,
int
size
,
u32
*
value
)
{
u32
n
,
data
;
pr_debug
(
"local_read_config from %d size %d
\n
"
,
where
,
size
);
n
=
where
%
4
;
crp_read
(
where
&
~
3
,
&
data
);
*
value
=
(
data
>>
(
8
*
n
))
&
bytemask
[
size
];
pr_debug
(
"local_read_config read %#x
\n
"
,
*
value
);
return
PCIBIOS_SUCCESSFUL
;
}
static
int
local_write_config
(
int
where
,
int
size
,
u32
value
)
{
u32
n
,
byte_enables
,
data
;
pr_debug
(
"local_write_config %#x to %d size %d
\n
"
,
value
,
where
,
size
);
n
=
where
%
4
;
byte_enables
=
local_byte_lane_enable_bits
(
n
,
size
);
if
(
byte_enables
==
0xffffffff
)
return
PCIBIOS_BAD_REGISTER_NUMBER
;
data
=
value
<<
(
8
*
n
);
crp_write
((
where
&
~
3
)
|
byte_enables
,
data
);
return
PCIBIOS_SUCCESSFUL
;
}
static
u32
byte_lane_enable_bits
(
u32
n
,
int
size
)
{
if
(
size
==
1
)
return
(
0xf
&
~
BIT
(
n
))
<<
4
;
if
(
size
==
2
)
return
(
0xf
&
~
(
BIT
(
n
)
|
BIT
(
n
+
1
)))
<<
4
;
if
(
size
==
4
)
return
0
;
return
0xffffffff
;
}
static
int
read_config
(
u8
bus_num
,
u16
devfn
,
int
where
,
int
size
,
u32
*
value
)
{
u32
n
,
byte_enables
,
addr
,
data
;
pr_debug
(
"read_config from %d size %d dev %d:%d:%d
\n
"
,
where
,
size
,
bus_num
,
PCI_SLOT
(
devfn
),
PCI_FUNC
(
devfn
));
*
value
=
0xffffffff
;
n
=
where
%
4
;
byte_enables
=
byte_lane_enable_bits
(
n
,
size
);
if
(
byte_enables
==
0xffffffff
)
return
PCIBIOS_BAD_REGISTER_NUMBER
;
addr
=
ixp4xx_config_addr
(
bus_num
,
devfn
,
where
);
if
(
ixp4xx_pci_read
(
addr
,
byte_enables
|
NP_CMD_CONFIGREAD
,
&
data
))
return
PCIBIOS_DEVICE_NOT_FOUND
;
*
value
=
(
data
>>
(
8
*
n
))
&
bytemask
[
size
];
pr_debug
(
"read_config_byte read %#x
\n
"
,
*
value
);
return
PCIBIOS_SUCCESSFUL
;
}
static
int
write_config
(
u8
bus_num
,
u16
devfn
,
int
where
,
int
size
,
u32
value
)
{
u32
n
,
byte_enables
,
addr
,
data
;
pr_debug
(
"write_config_byte %#x to %d size %d dev %d:%d:%d
\n
"
,
value
,
where
,
size
,
bus_num
,
PCI_SLOT
(
devfn
),
PCI_FUNC
(
devfn
));
n
=
where
%
4
;
byte_enables
=
byte_lane_enable_bits
(
n
,
size
);
if
(
byte_enables
==
0xffffffff
)
return
PCIBIOS_BAD_REGISTER_NUMBER
;
addr
=
ixp4xx_config_addr
(
bus_num
,
devfn
,
where
);
data
=
value
<<
(
8
*
n
);
if
(
ixp4xx_pci_write
(
addr
,
byte_enables
|
NP_CMD_CONFIGWRITE
,
data
))
return
PCIBIOS_DEVICE_NOT_FOUND
;
return
PCIBIOS_SUCCESSFUL
;
}
/*
* Generalized PCI config access functions.
*/
static
int
ixp4xx_read_config
(
struct
pci_bus
*
bus
,
unsigned
int
devfn
,
int
where
,
int
size
,
u32
*
value
)
{
if
(
bus
->
number
&&
!
PCI_SLOT
(
devfn
))
return
local_read_config
(
where
,
size
,
value
);
return
read_config
(
bus
->
number
,
devfn
,
where
,
size
,
value
);
}
static
int
ixp4xx_write_config
(
struct
pci_bus
*
bus
,
unsigned
int
devfn
,
int
where
,
int
size
,
u32
value
)
{
if
(
bus
->
number
&&
!
PCI_SLOT
(
devfn
))
return
local_write_config
(
where
,
size
,
value
);
return
write_config
(
bus
->
number
,
devfn
,
where
,
size
,
value
);
}
struct
pci_ops
ixp4xx_ops
=
{
.
read
=
ixp4xx_read_config
,
.
write
=
ixp4xx_write_config
,
};
/*
* PCI abort handler
*/
static
int
abort_handler
(
unsigned
long
addr
,
unsigned
int
fsr
,
struct
pt_regs
*
regs
)
{
u32
isr
,
status
;
isr
=
*
PCI_ISR
;
local_read_config
(
PCI_STATUS
,
2
,
&
status
);
pr_debug
(
"PCI: abort_handler addr = %#lx, isr = %#x, "
"status = %#x
\n
"
,
addr
,
isr
,
status
);
/* make sure the Master Abort bit is reset */
*
PCI_ISR
=
PCI_ISR_PFE
;
status
|=
PCI_STATUS_REC_MASTER_ABORT
;
local_write_config
(
PCI_STATUS
,
2
,
status
);
/*
* If it was an imprecise abort, then we need to correct the
* return address to be _after_ the instruction.
*/
if
(
fsr
&
(
1
<<
10
))
regs
->
ARM_pc
+=
4
;
return
0
;
}
/*
* Setup DMA mask to 64MB on PCI devices. Ignore all other devices.
*/
static
int
ixp4xx_pci_platform_notify
(
struct
device
*
dev
)
{
if
(
dev
->
bus
==
&
pci_bus_type
)
{
*
dev
->
dma_mask
=
SZ_64M
-
1
;
dev
->
coherent_dma_mask
=
SZ_64M
-
1
;
dmabounce_register_dev
(
dev
,
2048
,
4096
);
}
return
0
;
}
static
int
ixp4xx_pci_platform_notify_remove
(
struct
device
*
dev
)
{
if
(
dev
->
bus
==
&
pci_bus_type
)
{
dmabounce_unregister_dev
(
dev
);
}
return
0
;
}
int
dma_needs_bounce
(
struct
device
*
dev
,
dma_addr_t
dma_addr
,
size_t
size
)
{
return
(
dev
->
bus
==
&
pci_bus_type
)
&&
((
dma_addr
+
size
)
>=
SZ_64M
);
}
void
__init
ixp4xx_pci_preinit
(
void
)
{
unsigned
long
processor_id
;
asm
(
"mrc p15, 0, %0, cr0, cr0, 0;"
:
"=r"
(
processor_id
)
:
);
/*
* Determine which PCI read method to use
*/
if
(
!
(
processor_id
&
0xf
))
{
printk
(
"PCI: IXP4xx A0 silicon detected - "
"PCI Non-Prefetch Workaround Enabled
\n
"
);
ixp4xx_pci_read
=
ixp4xx_pci_read_errata
;
}
else
ixp4xx_pci_read
=
ixp4xx_pci_read_no_errata
;
/* hook in our fault handler for PCI errors */
hook_fault_code
(
16
+
6
,
abort_handler
,
SIGBUS
,
"imprecise external abort"
);
pr_debug
(
"setup PCI-AHB(inbound) and AHB-PCI(outbound) address mappings
\n
"
);
/*
* We use identity AHB->PCI address translation
* in the 0x48000000 to 0x4bffffff address space
*/
*
PCI_PCIMEMBASE
=
0x48494A4B
;
/*
* We also use identity PCI->AHB address translation
* in 4 16MB BARs that begin at the physical memory start
*/
*
PCI_AHBMEMBASE
=
(
PHYS_OFFSET
&
0xFF000000
)
+
((
PHYS_OFFSET
&
0xFF000000
)
>>
8
)
+
((
PHYS_OFFSET
&
0xFF000000
)
>>
16
)
+
((
PHYS_OFFSET
&
0xFF000000
)
>>
24
)
+
0x00010203
;
if
(
*
PCI_CSR
&
PCI_CSR_HOST
)
{
printk
(
"PCI: IXP4xx is host
\n
"
);
pr_debug
(
"setup BARs in controller
\n
"
);
/*
* We configure the PCI inbound memory windows to be
* 1:1 mapped to SDRAM
*/
local_write_config
(
PCI_BASE_ADDRESS_0
,
4
,
PHYS_OFFSET
+
0x00000000
);
local_write_config
(
PCI_BASE_ADDRESS_1
,
4
,
PHYS_OFFSET
+
0x01000000
);
local_write_config
(
PCI_BASE_ADDRESS_2
,
4
,
PHYS_OFFSET
+
0x02000000
);
local_write_config
(
PCI_BASE_ADDRESS_3
,
4
,
PHYS_OFFSET
+
0x03000000
);
/*
* Enable CSR window at 0xff000000.
*/
local_write_config
(
PCI_BASE_ADDRESS_4
,
4
,
0xff000008
);
/*
* Enable the IO window to be way up high, at 0xfffffc00
*/
local_write_config
(
PCI_BASE_ADDRESS_5
,
4
,
0xfffffc01
);
}
else
{
printk
(
"PCI: IXP4xx is target - No bus scan performed
\n
"
);
}
printk
(
"PCI: IXP4xx Using %s access for memory space
\n
"
,
#ifndef CONFIG_IXP4XX_INDIRECT_PCI
"direct"
#else
"indirect"
#endif
);
pr_debug
(
"clear error bits in ISR
\n
"
);
*
PCI_ISR
=
PCI_ISR_PSE
|
PCI_ISR_PFE
|
PCI_ISR_PPE
|
PCI_ISR_AHBE
;
/*
* Set Initialize Complete in PCI Control Register: allow IXP4XX to
* respond to PCI configuration cycles. Specify that the AHB bus is
* operating in big endian mode. Set up byte lane swapping between
* little-endian PCI and the big-endian AHB bus
*/
#ifdef __ARMEB__
*
PCI_CSR
=
PCI_CSR_IC
|
PCI_CSR_ABE
|
PCI_CSR_PDS
|
PCI_CSR_ADS
;
#else
*
PCI_CSR
=
PCI_CSR_IC
;
#endif
pr_debug
(
"DONE
\n
"
);
}
int
ixp4xx_setup
(
int
nr
,
struct
pci_sys_data
*
sys
)
{
struct
resource
*
res
;
if
(
nr
>=
1
)
return
0
;
res
=
kmalloc
(
sizeof
(
*
res
)
*
2
,
GFP_KERNEL
);
if
(
res
==
NULL
)
{
/*
* If we're out of memory this early, something is wrong,
* so we might as well catch it here.
*/
panic
(
"PCI: unable to allocate resources?
\n
"
);
}
memset
(
res
,
0
,
sizeof
(
*
res
)
*
2
);
local_write_config
(
PCI_COMMAND
,
2
,
PCI_COMMAND_MASTER
|
PCI_COMMAND_MEMORY
);
res
[
0
].
name
=
"PCI I/O Space"
;
res
[
0
].
start
=
0x00001000
;
res
[
0
].
end
=
0xffff0000
;
res
[
0
].
flags
=
IORESOURCE_IO
;
res
[
1
].
name
=
"PCI Memory Space"
;
res
[
1
].
start
=
0x48000000
;
#ifndef CONFIG_IXP4XX_INDIRECT_PCI
res
[
1
].
end
=
0x4bffffff
;
#else
res
[
1
].
end
=
0x4fffffff
;
#endif
res
[
1
].
flags
=
IORESOURCE_MEM
;
request_resource
(
&
ioport_resource
,
&
res
[
0
]);
request_resource
(
&
iomem_resource
,
&
res
[
1
]);
sys
->
resource
[
0
]
=
&
res
[
0
];
sys
->
resource
[
1
]
=
&
res
[
1
];
sys
->
resource
[
2
]
=
NULL
;
platform_notify
=
ixp4xx_pci_platform_notify
;
platform_notify_remove
=
ixp4xx_pci_platform_notify_remove
;
return
1
;
}
struct
pci_bus
*
ixp4xx_scan_bus
(
int
nr
,
struct
pci_sys_data
*
sys
)
{
return
pci_scan_bus
(
sys
->
busnr
,
&
ixp4xx_ops
,
sys
);
}
/*
* We override these so we properly do dmabounce otherwise drivers
* are able to set the dma_mask to 0xffffffff and we can no longer
* trap bounces. :(
*
* We just return true on everyhing except for < 64MB in which case
* we will fail miseralby and die since we can't handle that case.
*/
int
pci_set_dma_mask
(
struct
pci_dev
*
dev
,
u64
mask
)
{
if
(
mask
>=
SZ_64M
-
1
)
return
0
;
return
-
EIO
;
}
int
pci_dac_set_dma_mask
(
struct
pci_dev
*
dev
,
u64
mask
)
{
if
(
mask
>=
SZ_64M
-
1
)
return
0
;
return
-
EIO
;
}
int
pci_set_consistent_dma_mask
(
struct
pci_dev
*
dev
,
u64
mask
)
{
if
(
mask
>=
SZ_64M
-
1
)
return
0
;
return
-
EIO
;
}
EXPORT_SYMBOL
(
pci_set_dma_mask
);
EXPORT_SYMBOL
(
pci_dac_set_dma_mask
);
EXPORT_SYMBOL
(
pci_set_consistent_dma_mask
);
arch/arm/mach-ixp4xx/coyote-pci.c
0 → 100644
View file @
d43e2297
/*
* arch/arch/mach-ixp4xx/coyote-pci.c
*
* PCI setup routines for ADI Engineering Coyote platform
*
* Copyright (C) 2002 Jungo Software Technologies.
* Copyright (C) 2003 MontaVista Softwrae, Inc.
*
* Maintainer: Deepak Saxena <dsaxena@mvista.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <linux/pci.h>
#include <linux/init.h>
#include <asm/mach-types.h>
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/mach/pci.h>
extern
void
ixp4xx_pci_preinit
(
void
);
extern
int
ixp4xx_setup
(
int
nr
,
struct
pci_sys_data
*
sys
);
extern
struct
pci_bus
*
ixp4xx_scan_bus
(
int
nr
,
struct
pci_sys_data
*
sys
);
void
__init
coyote_pci_preinit
(
void
)
{
gpio_line_config
(
COYOTE_PCI_SLOT0_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_config
(
COYOTE_PCI_SLOT1_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_isr_clear
(
COYOTE_PCI_SLOT0_PIN
);
gpio_line_isr_clear
(
COYOTE_PCI_SLOT1_PIN
);
ixp4xx_pci_preinit
();
}
static
int
__init
coyote_map_irq
(
struct
pci_dev
*
dev
,
u8
slot
,
u8
pin
)
{
if
(
slot
==
COYOTE_PCI_SLOT0_DEVID
)
return
IRQ_COYOTE_PCI_SLOT0
;
else
if
(
slot
==
COYOTE_PCI_SLOT1_DEVID
)
return
IRQ_COYOTE_PCI_SLOT1
;
else
return
-
1
;
}
struct
hw_pci
coyote_pci
__initdata
=
{
.
nr_controllers
=
1
,
.
preinit
=
coyote_pci_preinit
,
.
swizzle
=
pci_std_swizzle
,
.
setup
=
ixp4xx_setup
,
.
scan
=
ixp4xx_scan_bus
,
.
map_irq
=
coyote_map_irq
,
};
int
__init
coyote_pci_init
(
void
)
{
if
(
machine_is_adi_coyote
())
pci_common_init
(
&
coyote_pci
);
return
0
;
}
subsys_initcall
(
coyote_pci_init
);
arch/arm/mach-ixp4xx/coyote-setup.c
0 → 100644
View file @
d43e2297
/*
* arch/arm/mach-ixp4xx/coyote-setup.c
*
* ADI Engineering Coyote board-setup
*
* Copyright (C) 2003-2004 MontaVista Software, Inc.
*
* Author: Deepak Saxena <dsaxena@plexity.net>
*/
#include <linux/init.h>
#include <linux/device.h>
#include <linux/serial.h>
#include <linux/tty.h>
#include <linux/serial_core.h>
#include <asm/types.h>
#include <asm/setup.h>
#include <asm/memory.h>
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/flash.h>
#ifdef __ARMEB__
#define REG_OFFSET 3
#else
#define REG_OFFSET 0
#endif
/*
* Only one serial port is connected on the Coyote.
*/
static
struct
uart_port
coyote_serial_port
=
{
.
membase
=
(
char
*
)(
IXP4XX_UART2_BASE_VIRT
+
REG_OFFSET
),
.
mapbase
=
(
IXP4XX_UART2_BASE_PHYS
),
.
irq
=
IRQ_IXP4XX_UART2
,
.
flags
=
UPF_SKIP_TEST
,
.
iotype
=
UPIO_MEM
,
.
regshift
=
2
,
.
uartclk
=
IXP4XX_UART_XTAL
,
.
line
=
0
,
.
type
=
PORT_XSCALE
,
.
fifosize
=
32
};
void
__init
coyote_map_io
(
void
)
{
early_serial_setup
(
&
coyote_serial_port
);
ixp4xx_map_io
();
}
static
struct
flash_platform_data
coyote_flash_data
=
{
.
map_name
=
"cfi_probe"
,
.
width
=
2
,
};
static
struct
resource
coyote_flash_resource
=
{
.
start
=
COYOTE_FLASH_BASE
,
.
end
=
COYOTE_FLASH_BASE
+
COYOTE_FLASH_SIZE
,
.
flags
=
IORESOURCE_MEM
,
};
static
struct
platform_device
coyote_flash_device
=
{
.
name
=
"IXP4XX-Flash"
,
.
id
=
0
,
.
dev
=
{
.
platform_data
=
&
coyote_flash_data
,
},
.
num_resources
=
1
,
.
resource
=
&
coyote_flash_resource
,
};
static
int
__init
coyote_init
(
void
)
{
if
(
!
machine_is_adi_coyote
())
return
-
ENODEV
;
platform_add_device
(
&
coyote_flash_device
);
return
0
;
}
arch_initcall
(
coyote_init
);
MACHINE_START
(
ADI_COYOTE
,
"ADI Engineering IXP4XX Coyote Development Platform"
)
MAINTAINER
(
"MontaVista Software, Inc."
)
BOOT_MEM
(
PHYS_OFFSET
,
IXP4XX_PERIPHERAL_BASE_PHYS
,
IXP4XX_PERIPHERAL_BASE_VIRT
)
MAPIO
(
coyote_map_io
)
INITIRQ
(
ixp4xx_init_irq
)
BOOT_PARAMS
(
0x0100
)
MACHINE_END
arch/arm/mach-ixp4xx/ixdp425-pci.c
0 → 100644
View file @
d43e2297
/*
* arch/arm/mach-ixp4xx/ixdp425-pci.c
*
* IXDP425 board-level PCI initialization
*
* Copyright (C) 2002 Intel Corporation.
* Copyright (C) 2003-2004 MontaVista Software, Inc.
*
* Maintainer: Deepak Saxena <dsaxena@plexity.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <linux/config.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <asm/mach/pci.h>
#include <asm/irq.h>
#include <asm/hardware.h>
#include <asm/mach-types.h>
void
__init
ixdp425_pci_preinit
(
void
)
{
gpio_line_config
(
IXDP425_PCI_INTA_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_config
(
IXDP425_PCI_INTB_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_config
(
IXDP425_PCI_INTC_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_config
(
IXDP425_PCI_INTD_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_isr_clear
(
IXDP425_PCI_INTA_PIN
);
gpio_line_isr_clear
(
IXDP425_PCI_INTB_PIN
);
gpio_line_isr_clear
(
IXDP425_PCI_INTC_PIN
);
gpio_line_isr_clear
(
IXDP425_PCI_INTD_PIN
);
ixp4xx_pci_preinit
();
}
static
int
__init
ixdp425_map_irq
(
struct
pci_dev
*
dev
,
u8
slot
,
u8
pin
)
{
static
int
pci_irq_table
[
IXDP425_PCI_IRQ_LINES
]
=
{
IRQ_IXDP425_PCI_INTA
,
IRQ_IXDP425_PCI_INTB
,
IRQ_IXDP425_PCI_INTC
,
IRQ_IXDP425_PCI_INTD
};
int
irq
=
-
1
;
if
(
slot
>=
1
&&
slot
<=
IXDP425_PCI_MAX_DEV
&&
pin
>=
1
&&
pin
<=
IXDP425_PCI_IRQ_LINES
)
{
irq
=
pci_irq_table
[(
slot
+
pin
-
2
)
%
4
];
}
return
irq
;
}
struct
hw_pci
ixdp425_pci
__initdata
=
{
.
nr_controllers
=
1
,
.
preinit
=
ixdp425_pci_preinit
,
.
swizzle
=
pci_std_swizzle
,
.
setup
=
ixp4xx_setup
,
.
scan
=
ixp4xx_scan_bus
,
.
map_irq
=
ixdp425_map_irq
,
};
int
__init
ixdp425_pci_init
(
void
)
{
if
(
machine_is_ixdp425
()
||
machine_is_ixcdp1100
()
||
machine_is_avila
())
pci_common_init
(
&
ixdp425_pci
);
return
0
;
}
subsys_initcall
(
ixdp425_pci_init
);
arch/arm/mach-ixp4xx/ixdp425-setup.c
0 → 100644
View file @
d43e2297
/*
* arch/arm/mach-ixp4xx/ixdp425-setup.c
*
* IXDP425/IXCDP1100 board-setup
*
* Copyright (C) 2003-2004 MontaVista Software, Inc.
*
* Author: Deepak Saxena <dsaxena@plexity.net>
*/
#include <linux/init.h>
#include <linux/device.h>
#include <linux/serial.h>
#include <linux/tty.h>
#include <linux/serial_core.h>
#include <asm/types.h>
#include <asm/setup.h>
#include <asm/memory.h>
#include <asm/hardware.h>
#include <asm/mach-types.h>
#include <asm/irq.h>
#include <asm/mach/arch.h>
#include <asm/mach/flash.h>
#ifdef __ARMEB__
#define REG_OFFSET 3
#else
#define REG_OFFSET 0
#endif
/*
* IXDP425 uses both chipset serial ports
*/
static
struct
uart_port
ixdp425_serial_ports
[]
=
{
{
.
membase
=
(
char
*
)(
IXP4XX_UART1_BASE_VIRT
+
REG_OFFSET
),
.
mapbase
=
(
IXP4XX_UART1_BASE_PHYS
),
.
irq
=
IRQ_IXP4XX_UART1
,
.
flags
=
UPF_SKIP_TEST
,
.
iotype
=
UPIO_MEM
,
.
regshift
=
2
,
.
uartclk
=
IXP4XX_UART_XTAL
,
.
line
=
0
,
.
type
=
PORT_XSCALE
,
.
fifosize
=
32
}
,
{
.
membase
=
(
char
*
)(
IXP4XX_UART2_BASE_VIRT
+
REG_OFFSET
),
.
mapbase
=
(
IXP4XX_UART2_BASE_PHYS
),
.
irq
=
IRQ_IXP4XX_UART2
,
.
flags
=
UPF_SKIP_TEST
,
.
iotype
=
UPIO_MEM
,
.
regshift
=
2
,
.
uartclk
=
IXP4XX_UART_XTAL
,
.
line
=
1
,
.
type
=
PORT_XSCALE
,
.
fifosize
=
32
}
};
void
__init
ixdp425_map_io
(
void
)
{
early_serial_setup
(
&
ixdp425_serial_ports
[
0
]);
early_serial_setup
(
&
ixdp425_serial_ports
[
1
]);
ixp4xx_map_io
();
}
static
struct
flash_platform_data
ixdp425_flash_data
=
{
.
map_name
=
"cfi_probe"
,
.
width
=
2
,
};
static
struct
resource
ixdp425_flash_resource
=
{
.
start
=
IXDP425_FLASH_BASE
,
.
end
=
IXDP425_FLASH_BASE
+
IXDP425_FLASH_SIZE
,
.
flags
=
IORESOURCE_MEM
,
};
static
struct
platform_device
ixdp425_flash_device
=
{
.
name
=
"IXP4XX-Flash"
,
.
id
=
0
,
.
dev
=
{
.
platform_data
=
&
ixdp425_flash_data
,
},
.
num_resources
=
1
,
.
resource
=
&
ixdp425_flash_resource
,
};
static
struct
ixp4xx_i2c_pins
ixdp425_i2c_gpio_pins
=
{
.
sda_pin
=
IXDP425_SDA_PIN
,
.
scl_pin
=
IXDP425_SCL_PIN
,
};
static
struct
platform_device
ixdp425_i2c_controller
=
{
.
name
=
"IXP4XX-I2C"
,
.
id
=
0
,
.
dev
=
{
.
platform_data
=
&
ixdp425_i2c_gpio_pins
,
},
.
num_resources
=
0
};
static
int
__init
ixdp425_init
(
void
)
{
if
(
!
machine_is_ixdp425
()
&&
!
machine_is_ixcdp1100
()
&&
!
machine_is_avila
())
return
-
ENODEV
;
platform_add_device
(
&
ixdp425_flash_device
);
platform_add_device
(
&
ixdp425_i2c_controller
);
return
0
;
}
arch_initcall
(
ixdp425_init
);
MACHINE_START
(
IXDP425
,
"Intel IXDP425 Development Platform"
)
MAINTAINER
(
"MontaVista Software, Inc."
)
BOOT_MEM
(
PHYS_OFFSET
,
IXP4XX_PERIPHERAL_BASE_PHYS
,
IXP4XX_PERIPHERAL_BASE_VIRT
)
MAPIO
(
ixdp425_map_io
)
INITIRQ
(
ixp4xx_init_irq
)
BOOT_PARAMS
(
0x0100
)
MACHINE_END
MACHINE_START
(
IXCDP1100
,
"Intel IXCDP1100 Development Platform"
)
MAINTAINER
(
"MontaVista Software, Inc."
)
BOOT_MEM
(
PHYS_OFFSET
,
IXP4XX_PERIPHERAL_BASE_PHYS
,
IXP4XX_PERIPHERAL_BASE_VIRT
)
MAPIO
(
ixdp425_map_io
)
INITIRQ
(
ixp4xx_init_irq
)
BOOT_PARAMS
(
0x0100
)
MACHINE_END
/*
* Avila is functionally equivalent to IXDP425 except that it adds
* a CF IDE slot hanging off the expansion bus. When we have a
* driver for IXP4xx CF IDE with driver model support we'll move
* Avila to it's own setup file.
*/
#ifdef CONFIG_ARCH_AVILA
MACHINE_START
(
AVILA
,
"Gateworks Avila Network Platform"
)
MAINTAINER
(
"Deepak Saxena <dsaxena@plexity.net>"
)
BOOT_MEM
(
PHYS_OFFSET
,
IXP4XX_PERIPHERAL_BASE_PHYS
,
IXP4XX_PERIPHERAL_BASE_VIRT
)
MAPIO
(
ixdp425_map_io
)
INITIRQ
(
ixp4xx_init_irq
)
BOOT_PARAMS
(
0x0100
)
MACHINE_END
#endif
arch/arm/mach-ixp4xx/prpmc1100-pci.c
0 → 100644
View file @
d43e2297
/*
* arch/arm/mach-ixp4xx/prpmc1100-pci.c
*
* PrPMC1100 PCI initialization
*
* Copyright (C) 2003-2004 MontaVista Sofwtare, Inc.
* Based on IXDP425 code originally (C) Intel Corporation
*
* Author: Deepak Saxena <dsaxena@plexity.net>
*
* PrPMC1100 PCI init code. GPIO usage is similar to that on
* IXDP425, but the IRQ routing is completely different and
* depends on what carrier you are using. This code is written
* to work on the Motorola PrPMC800 ATX carrier board.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <linux/config.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <asm/mach-types.h>
#include <asm/irq.h>
#include <asm/hardware.h>
#include <asm/mach/pci.h>
void
__init
prpmc1100_pci_preinit
(
void
)
{
gpio_line_config
(
PRPMC1100_PCI_INTA_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_config
(
PRPMC1100_PCI_INTB_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_config
(
PRPMC1100_PCI_INTC_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_config
(
PRPMC1100_PCI_INTD_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_isr_clear
(
PRPMC1100_PCI_INTA_PIN
);
gpio_line_isr_clear
(
PRPMC1100_PCI_INTB_PIN
);
gpio_line_isr_clear
(
PRPMC1100_PCI_INTC_PIN
);
gpio_line_isr_clear
(
PRPMC1100_PCI_INTD_PIN
);
ixp4xx_pci_preinit
();
}
static
int
__init
prpmc1100_map_irq
(
struct
pci_dev
*
dev
,
u8
slot
,
u8
pin
)
{
int
irq
=
-
1
;
static
int
pci_irq_table
[][
4
]
=
{
{
/* IDSEL 16 - PMC A1 */
IRQ_PRPMC1100_PCI_INTD
,
IRQ_PRPMC1100_PCI_INTA
,
IRQ_PRPMC1100_PCI_INTB
,
IRQ_PRPMC1100_PCI_INTC
},
{
/* IDSEL 17 - PRPMC-A-B */
IRQ_PRPMC1100_PCI_INTD
,
IRQ_PRPMC1100_PCI_INTA
,
IRQ_PRPMC1100_PCI_INTB
,
IRQ_PRPMC1100_PCI_INTC
},
{
/* IDSEL 18 - PMC A1-B */
IRQ_PRPMC1100_PCI_INTA
,
IRQ_PRPMC1100_PCI_INTB
,
IRQ_PRPMC1100_PCI_INTC
,
IRQ_PRPMC1100_PCI_INTD
},
{
/* IDSEL 19 - Unused */
0
,
0
,
0
,
0
},
{
/* IDSEL 20 - P2P Bridge */
IRQ_PRPMC1100_PCI_INTA
,
IRQ_PRPMC1100_PCI_INTB
,
IRQ_PRPMC1100_PCI_INTC
,
IRQ_PRPMC1100_PCI_INTD
},
{
/* IDSEL 21 - PMC A2 */
IRQ_PRPMC1100_PCI_INTC
,
IRQ_PRPMC1100_PCI_INTD
,
IRQ_PRPMC1100_PCI_INTA
,
IRQ_PRPMC1100_PCI_INTB
},
{
/* IDSEL 22 - PMC A2-B */
IRQ_PRPMC1100_PCI_INTD
,
IRQ_PRPMC1100_PCI_INTA
,
IRQ_PRPMC1100_PCI_INTB
,
IRQ_PRPMC1100_PCI_INTC
},
};
if
(
slot
>=
PRPMC1100_PCI_MIN_DEVID
&&
slot
<=
PRPMC1100_PCI_MAX_DEVID
&&
pin
>=
1
&&
pin
<=
PRPMC1100_PCI_IRQ_LINES
)
{
irq
=
pci_irq_table
[
slot
-
PRPMC1100_PCI_MIN_DEVID
][
pin
-
1
];
}
return
irq
;
}
struct
hw_pci
prpmc1100_pci
__initdata
=
{
.
nr_controllers
=
1
,
.
preinit
=
prpmc1100_pci_preinit
,
.
swizzle
=
pci_std_swizzle
,
.
setup
=
ixp4xx_setup
,
.
scan
=
ixp4xx_scan_bus
,
.
map_irq
=
prpmc1100_map_irq
,
};
int
__init
prpmc1100_pci_init
(
void
)
{
if
(
machine_is_prpmc1100
())
pci_common_init
(
&
prpmc1100_pci
);
return
0
;
}
subsys_initcall
(
prpmc1100_pci_init
);
arch/arm/mach-ixp4xx/prpmc1100-setup.c
0 → 100644
View file @
d43e2297
/*
* arch/arm/mach-ixp4xx/prpmc1100-setup.c
*
* Motorola PrPMC1100 board setup
*
* Copyright (C) 2003-2004 MontaVista Software, Inc.
*
* Author: Deepak Saxena <dsaxena@plexity.net>
*/
#include <linux/init.h>
#include <linux/device.h>
#include <linux/serial.h>
#include <linux/tty.h>
#include <linux/serial_core.h>
#include <asm/types.h>
#include <asm/setup.h>
#include <asm/memory.h>
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/flash.h>
#ifdef __ARMEB__
#define REG_OFFSET 3
#else
#define REG_OFFSET 0
#endif
/*
* Only one serial port is connected on the PrPMC1100
*/
static
struct
uart_port
prpmc1100_serial_port
=
{
.
membase
=
(
char
*
)(
IXP4XX_UART1_BASE_VIRT
+
REG_OFFSET
),
.
mapbase
=
(
IXP4XX_UART1_BASE_PHYS
),
.
irq
=
IRQ_IXP4XX_UART1
,
.
flags
=
UPF_SKIP_TEST
,
.
iotype
=
UPIO_MEM
,
.
regshift
=
2
,
.
uartclk
=
IXP4XX_UART_XTAL
,
.
line
=
0
,
.
type
=
PORT_XSCALE
,
.
fifosize
=
32
};
void
__init
prpmc1100_map_io
(
void
)
{
early_serial_setup
(
&
prpmc1100_serial_port
);
ixp4xx_map_io
();
}
static
struct
flash_platform_data
prpmc1100_flash_data
=
{
.
map_name
=
"cfi_probe"
,
.
width
=
2
,
};
static
struct
resource
prpmc1100_flash_resource
=
{
.
start
=
PRPMC1100_FLASH_BASE
,
.
end
=
PRPMC1100_FLASH_BASE
+
PRPMC1100_FLASH_SIZE
,
.
flags
=
IORESOURCE_MEM
,
};
static
struct
platform_device
prpmc1100_flash_device
=
{
.
name
=
"IXP4XX-Flash"
,
.
id
=
0
,
.
dev
=
{
.
platform_data
=
&
prpmc1100_flash_data
,
},
.
num_resources
=
1
,
.
resource
=
&
prpmc1100_flash_resource
,
};
static
int
__init
prpmc1100_init
(
void
)
{
if
(
!
machine_is_prpmc1100
())
return
-
ENODEV
;
platform_add_device
(
&
prpmc1100_flash_device
);
return
0
;
}
arch_initcall
(
prpmc1100_init
);
MACHINE_START
(
PRPMC1100
,
"Motorola PrPMC1100"
)
MAINTAINER
(
"MontaVista Software, Inc."
)
BOOT_MEM
(
PHYS_OFFSET
,
IXP4XX_PERIPHERAL_BASE_PHYS
,
IXP4XX_PERIPHERAL_BASE_VIRT
)
MAPIO
(
prpmc1100_map_io
)
INITIRQ
(
ixp4xx_init_irq
)
BOOT_PARAMS
(
0x0100
)
MACHINE_END
include/asm-arm/arch-ixp4xx/coyote.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/coyote.h
*
* ADI Engineering platform specific definitions
*
* Author: Deepak Saxena <dsaxena@plexity.net>
*
* Copyright 2004 (c) MontaVista, Software, Inc.
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#ifndef __ASM_ARCH_HARDWARE_H__
#error "Do not include this directly, instead #include <asm/hardware.h>"
#endif
#define COYOTE_FLASH_BASE IXP4XX_EXP_BUS_CS0_BASE_PHYS
#define COYOTE_FLASH_SIZE IXP4XX_EXP_BUS_CSX_REGION_SIZE * 2
/* PCI controller GPIO to IRQ pin mappings */
#define COYOTE_PCI_SLOT0_PIN 6
#define COYOTE_PCI_SLOT1_PIN 11
#define COYOTE_PCI_SLOT0_DEVID 14
#define COYOTE_PCI_SLOT1_DEVID 15
#define COYOTE_IDE_BASE_PHYS IXP4XX_EXP_BUS_CS3_BASE_PHYS
#define COYOTE_IDE_BASE_VIRT 0xFFFE1000
#define COYOTE_IDE_REGION_SIZE 0x1000
#define COYOTE_IDE_DATA_PORT 0xFFFE10E0
#define COYOTE_IDE_CTRL_PORT 0xFFFE10FC
#define COYOTE_IDE_ERROR_PORT 0xFFFE10E2
include/asm-arm/arch-ixp4xx/dma.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/dma.h
*
* Copyright (C) 2001-2004 MontaVista Software, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#ifndef __ASM_ARCH_DMA_H
#define __ASM_ARCH_DMA_H
#include <linux/config.h>
#include <linux/device.h>
#include <linux/pci.h>
#include <asm/page.h>
#include <asm/sizes.h>
#include <asm/hardware.h>
#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M)
/* No DMA */
#define MAX_DMA_CHANNELS 0
/*
* Only first 64MB of memory can be accessed via PCI.
* We use GFP_DMA to allocate safe buffers to do map/unmap.
* This is really ugly and we need a better way of specifying
* DMA-capable regions of memory.
*/
static
inline
void
__arch_adjust_zones
(
int
node
,
unsigned
long
*
zone_size
,
unsigned
long
*
zhole_size
)
{
unsigned
int
sz
=
SZ_64M
>>
PAGE_SHIFT
;
/*
* Only adjust if > 64M on current system
*/
if
(
node
||
(
zone_size
[
0
]
<=
sz
))
return
;
zone_size
[
1
]
=
zone_size
[
0
]
-
sz
;
zone_size
[
0
]
=
sz
;
zhole_size
[
1
]
=
zhole_size
[
0
];
zhole_size
[
0
]
=
0
;
}
#define arch_adjust_zones(node, size, holes) \
__arch_adjust_zones(node, size, holes)
#endif
/* _ASM_ARCH_DMA_H */
include/asm-arm/arch-ixp4xx/hardware.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/hardware.h
*
* Copyright (C) 2002 Intel Corporation.
* Copyright (C) 2003-2004 MontaVista Software, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
/*
* Hardware definitions for IXP4xx based systems
*/
#ifndef __ASM_ARCH_HARDWARE_H__
#define __ASM_ARCH_HARDWARE_H__
#define PCIBIOS_MIN_IO 0x00001000
#define PCIBIOS_MIN_MEM 0x48000000
/*
* We override the standard dma-mask routines for bouncing.
*/
#define HAVE_ARCH_PCI_SET_DMA_MASK
#define pcibios_assign_all_busses() 1
/* Register locations and bits */
#include "ixp4xx-regs.h"
/* Platform helper functions and definitions */
#include "platform.h"
/* Platform specific details */
#include "ixdp425.h"
#include "coyote.h"
#include "prpmc1100.h"
#endif
/* _ASM_ARCH_HARDWARE_H */
include/asm-arm/arch-ixp4xx/ide.h
0 → 100644
View file @
d43e2297
/*
* linux/include/asm-arm/arch-ixp4xx/ide.h
*
* Copyright (C) 2003-2004 MontaVista Software, Inc.
* Based on original code Copyright (c) 1998 Russell King
*/
/*
* Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses.
*/
static
__inline__
void
ide_init_hwif_ports
(
hw_regs_t
*
hw
,
int
data_port
,
int
ctrl_port
,
int
*
irq
)
{
unsigned
long
reg
=
(
unsigned
long
)
data_port
;
int
i
;
for
(
i
=
IDE_DATA_OFFSET
;
i
<=
IDE_STATUS_OFFSET
;
i
++
)
{
hw
->
io_ports
[
i
]
=
reg
;
reg
+=
1
;
}
hw
->
io_ports
[
IDE_CONTROL_OFFSET
]
=
(
unsigned
long
)
ctrl_port
;
if
(
irq
)
*
irq
=
0
;
}
/*
* This registers the standard ports for this architecture with the IDE
* driver.
*/
static
__inline__
void
ide_init_default_hwifs
(
void
)
{
/* There are no standard ports */
}
include/asm-arm/arch-ixp4xx/io.h
0 → 100644
View file @
d43e2297
/*
* linux/include/asm-arm/arch-ixp4xx/io.h
*
* Author: Deepak Saxena <dsaxena@plexity.net>
*
* Copyright (C) 2002-2004 MontaVista Software, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H
#include <asm/hardware.h>
#define IO_SPACE_LIMIT 0xffff0000
#define BIT(x) ((1)<<(x))
extern
int
(
*
ixp4xx_pci_read
)(
u32
addr
,
u32
cmd
,
u32
*
data
);
extern
int
ixp4xx_pci_write
(
u32
addr
,
u32
cmd
,
u32
data
);
/*
* IXP4xx provides two methods of accessing PCI memory space:
*
* 1) A direct mapped window from 0x48000000 to 0x4bffffff (64MB).
* To access PCI via this space, we simply ioremap() the BAR
* into the kernel and we can use the standard read[bwl]/write[bwl]
* macros. This is the preffered method due to speed but it
* limits the system to just 64MB of PCI memory. This can be
* problamatic if using video cards and other memory-heavy
* targets.
*
* 2) If > 64MB of memory space is required, the IXP4xx can be configured
* to use indirect registers to access PCI (as we do below for I/O
* transactions). This allows for up to 128MB (0x48000000 to 0x4fffffff)
* of memory on the bus. The disadvantadge of this is that every
* PCI access requires three local register accesses plus a spinlock,
* but in some cases the performance hit is acceptable. In addition,
* you cannot mmap() PCI devices in this case.
*
*/
#ifndef CONFIG_IXP4XX_INDIRECT_PCI
#define __mem_pci(a) ((unsigned long)(a))
#else
#include <linux/mm.h>
/*
* In the case of using indirect PCI, we simply return the actual PCI
* address and our read/write implementation use that to drive the
* access registers. If something outside of PCI is ioremap'd, we
* fallback to the default.
*/
static
inline
void
*
__ixp4xx_ioremap
(
unsigned
long
addr
,
size_t
size
,
unsigned
long
flags
,
unsigned
long
align
)
{
extern
void
*
__ioremap
(
unsigned
long
,
size_t
,
unsigned
long
,
unsigned
long
);
if
((
addr
<
0x48000000
)
||
(
addr
>
0x4fffffff
))
return
__ioremap
(
addr
,
size
,
flags
,
align
);
return
(
void
*
)
addr
;
}
static
inline
void
__ixp4xx_iounmap
(
void
*
addr
)
{
extern
void
__iounmap
(
void
*
addr
);
if
((
u32
)
addr
>
VMALLOC_START
)
__iounmap
(
addr
);
}
#define __arch_ioremap(a, s, f, x) __ixp4xx_ioremap(a, s, f, x)
#define __arch_iounmap(a) __ixp4xx_iounmap(a)
#define writeb(p, v) __ixp4xx_writeb(p, v)
#define writew(p, v) __ixp4xx_writew(p, v)
#define writel(p, v) __ixp4xx_writel(p, v)
#define writesb(p, v, l) __ixp4xx_writesb(p, v, l)
#define writesw(p, v, l) __ixp4xx_writesw(p, v, l)
#define writesl(p, v, l) __ixp4xx_writesl(p, v, l)
#define readb(p) __ixp4xx_readb(p)
#define readw(p) __ixp4xx_readw(p)
#define readl(p) __ixp4xx_readl(p)
#define readsb(p, v, l) __ixp4xx_readsb(p, v, l)
#define readsw(p, v, l) __ixp4xx_readsw(p, v, l)
#define readsl(p, v, l) __ixp4xx_readsl(p, v, l)
static
inline
void
__ixp4xx_writeb
(
u8
value
,
u32
addr
)
{
u32
n
,
byte_enables
,
data
;
if
(
addr
>
VMALLOC_START
)
{
__raw_writeb
(
value
,
addr
);
return
;
}
n
=
addr
%
4
;
byte_enables
=
(
0xf
&
~
BIT
(
n
))
<<
IXP4XX_PCI_NP_CBE_BESL
;
data
=
value
<<
(
8
*
n
);
ixp4xx_pci_write
(
addr
,
byte_enables
|
NP_CMD_MEMWRITE
,
data
);
}
static
inline
void
__ixp4xx_writesb
(
u32
bus_addr
,
u8
*
vaddr
,
int
count
)
{
while
(
count
--
)
writeb
(
*
vaddr
++
,
bus_addr
);
}
static
inline
void
__ixp4xx_writew
(
u16
value
,
u32
addr
)
{
u32
n
,
byte_enables
,
data
;
if
(
addr
>
VMALLOC_START
)
{
__raw_writew
(
value
,
addr
);
return
;
}
n
=
addr
%
4
;
byte_enables
=
(
0xf
&
~
(
BIT
(
n
)
|
BIT
(
n
+
1
)))
<<
IXP4XX_PCI_NP_CBE_BESL
;
data
=
value
<<
(
8
*
n
);
ixp4xx_pci_write
(
addr
,
byte_enables
|
NP_CMD_MEMWRITE
,
data
);
}
static
inline
void
__ixp4xx_writesw
(
u32
bus_addr
,
u16
*
vaddr
,
int
count
)
{
while
(
count
--
)
writew
(
*
vaddr
++
,
bus_addr
);
}
static
inline
void
__ixp4xx_writel
(
u32
value
,
u32
addr
)
{
if
(
addr
>
VMALLOC_START
)
{
__raw_writel
(
value
,
addr
);
return
;
}
ixp4xx_pci_write
(
addr
,
NP_CMD_MEMWRITE
,
value
);
}
static
inline
void
__ixp4xx_writesl
(
u32
bus_addr
,
u32
*
vaddr
,
int
count
)
{
while
(
count
--
)
writel
(
*
vaddr
++
,
bus_addr
);
}
static
inline
unsigned
char
__ixp4xx_readb
(
u32
addr
)
{
u32
n
,
byte_enables
,
data
;
if
(
addr
>
VMALLOC_START
)
return
__raw_readb
(
addr
);
n
=
addr
%
4
;
byte_enables
=
(
0xf
&
~
BIT
(
n
))
<<
IXP4XX_PCI_NP_CBE_BESL
;
if
(
ixp4xx_pci_read
(
addr
,
byte_enables
|
NP_CMD_MEMREAD
,
&
data
))
return
0xff
;
return
data
>>
(
8
*
n
);
}
static
inline
void
__ixp4xx_readsb
(
u32
bus_addr
,
u8
*
vaddr
,
u32
count
)
{
while
(
count
--
)
*
vaddr
++
=
readb
(
bus_addr
);
}
static
inline
unsigned
short
__ixp4xx_readw
(
u32
addr
)
{
u32
n
,
byte_enables
,
data
;
if
(
addr
>
VMALLOC_START
)
return
__raw_readw
(
addr
);
n
=
addr
%
4
;
byte_enables
=
(
0xf
&
~
(
BIT
(
n
)
|
BIT
(
n
+
1
)))
<<
IXP4XX_PCI_NP_CBE_BESL
;
if
(
ixp4xx_pci_read
(
addr
,
byte_enables
|
NP_CMD_MEMREAD
,
&
data
))
return
0xffff
;
return
data
>>
(
8
*
n
);
}
static
inline
void
__ixp4xx_readsw
(
u32
bus_addr
,
u16
*
vaddr
,
u32
count
)
{
while
(
count
--
)
*
vaddr
++
=
readw
(
bus_addr
);
}
static
inline
unsigned
long
__ixp4xx_readl
(
u32
addr
)
{
u32
data
;
if
(
addr
>
VMALLOC_START
)
return
__raw_readl
(
addr
);
if
(
ixp4xx_pci_read
(
addr
,
NP_CMD_MEMREAD
,
&
data
))
return
0xffffffff
;
return
data
;
}
static
inline
void
__ixp4xx_readsl
(
u32
bus_addr
,
u32
*
vaddr
,
u32
count
)
{
while
(
count
--
)
*
vaddr
++
=
readl
(
bus_addr
);
}
/*
* We can use the built-in functions b/c they end up calling writeb/readb
*/
#define memset_io(c,v,l) _memset_io((c),(v),(l))
#define memcpy_fromio(a,c,l) _memcpy_fromio((a),(c),(l))
#define memcpy_toio(c,a,l) _memcpy_toio((c),(a),(l))
#define eth_io_copy_and_sum(s,c,l,b) \
eth_copy_and_sum((s),__mem_pci(c),(l),(b))
static
inline
int
check_signature
(
unsigned
long
bus_addr
,
const
unsigned
char
*
signature
,
int
length
)
{
int
retval
=
0
;
do
{
if
(
readb
(
bus_addr
)
!=
*
signature
)
goto
out
;
bus_addr
++
;
signature
++
;
length
--
;
}
while
(
length
);
retval
=
1
;
out:
return
retval
;
}
#endif
/*
* IXP4xx does not have a transparent cpu -> PCI I/O translation
* window. Instead, it has a set of registers that must be tweaked
* with the proper byte lanes, command types, and address for the
* transaction. This means that we need to override the default
* I/O functions.
*/
#define outb(p, v) __ixp4xx_outb(p, v)
#define outw(p, v) __ixp4xx_outw(p, v)
#define outl(p, v) __ixp4xx_outl(p, v)
#define outsb(p, v, l) __ixp4xx_outsb(p, v, l)
#define outsw(p, v, l) __ixp4xx_outsw(p, v, l)
#define outsl(p, v, l) __ixp4xx_outsl(p, v, l)
#define inb(p) __ixp4xx_inb(p)
#define inw(p) __ixp4xx_inw(p)
#define inl(p) __ixp4xx_inl(p)
#define insb(p, v, l) __ixp4xx_insb(p, v, l)
#define insw(p, v, l) __ixp4xx_insw(p, v, l)
#define insl(p, v, l) __ixp4xx_insl(p, v, l)
static
inline
void
__ixp4xx_outb
(
u8
value
,
u32
addr
)
{
u32
n
,
byte_enables
,
data
;
n
=
addr
%
4
;
byte_enables
=
(
0xf
&
~
BIT
(
n
))
<<
IXP4XX_PCI_NP_CBE_BESL
;
data
=
value
<<
(
8
*
n
);
ixp4xx_pci_write
(
addr
,
byte_enables
|
NP_CMD_IOWRITE
,
data
);
}
static
inline
void
__ixp4xx_outsb
(
u32
io_addr
,
u8
*
vaddr
,
u32
count
)
{
while
(
count
--
)
outb
(
*
vaddr
++
,
io_addr
);
}
static
inline
void
__ixp4xx_outw
(
u16
value
,
u32
addr
)
{
u32
n
,
byte_enables
,
data
;
n
=
addr
%
4
;
byte_enables
=
(
0xf
&
~
(
BIT
(
n
)
|
BIT
(
n
+
1
)))
<<
IXP4XX_PCI_NP_CBE_BESL
;
data
=
value
<<
(
8
*
n
);
ixp4xx_pci_write
(
addr
,
byte_enables
|
NP_CMD_IOWRITE
,
data
);
}
static
inline
void
__ixp4xx_outsw
(
u32
io_addr
,
u16
*
vaddr
,
u32
count
)
{
while
(
count
--
)
outw
(
cpu_to_le16
(
*
vaddr
++
),
io_addr
);
}
static
inline
void
__ixp4xx_outl
(
u32
value
,
u32
addr
)
{
ixp4xx_pci_write
(
addr
,
NP_CMD_IOWRITE
,
value
);
}
static
inline
void
__ixp4xx_outsl
(
u32
io_addr
,
u32
*
vaddr
,
u32
count
)
{
while
(
count
--
)
outl
(
*
vaddr
++
,
io_addr
);
}
static
inline
u8
__ixp4xx_inb
(
u32
addr
)
{
u32
n
,
byte_enables
,
data
;
n
=
addr
%
4
;
byte_enables
=
(
0xf
&
~
BIT
(
n
))
<<
IXP4XX_PCI_NP_CBE_BESL
;
if
(
ixp4xx_pci_read
(
addr
,
byte_enables
|
NP_CMD_IOREAD
,
&
data
))
return
0xff
;
return
data
>>
(
8
*
n
);
}
static
inline
void
__ixp4xx_insb
(
u32
io_addr
,
u8
*
vaddr
,
u32
count
)
{
while
(
count
--
)
*
vaddr
++
=
inb
(
io_addr
);
}
static
inline
u16
__ixp4xx_inw
(
u32
addr
)
{
u32
n
,
byte_enables
,
data
;
n
=
addr
%
4
;
byte_enables
=
(
0xf
&
~
(
BIT
(
n
)
|
BIT
(
n
+
1
)))
<<
IXP4XX_PCI_NP_CBE_BESL
;
if
(
ixp4xx_pci_read
(
addr
,
byte_enables
|
NP_CMD_IOREAD
,
&
data
))
return
0xffff
;
return
data
>>
(
8
*
n
);
}
static
inline
void
__ixp4xx_insw
(
u32
io_addr
,
u16
*
vaddr
,
u32
count
)
{
while
(
count
--
)
*
vaddr
++
=
le16_to_cpu
(
inw
(
io_addr
));
}
static
inline
u32
__ixp4xx_inl
(
u32
addr
)
{
u32
data
;
if
(
ixp4xx_pci_read
(
addr
,
NP_CMD_IOREAD
,
&
data
))
return
0xffffffff
;
return
data
;
}
static
inline
void
__ixp4xx_insl
(
u32
io_addr
,
u32
*
vaddr
,
u32
count
)
{
while
(
count
--
)
*
vaddr
++
=
inl
(
io_addr
);
}
#endif // __ASM_ARM_ARCH_IO_H
include/asm-arm/arch-ixp4xx/irq.h
0 → 100644
View file @
d43e2297
/*
* irq.h
*
* Copyright (C) 2002 Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#define fixup_irq(irq) (irq)
include/asm-arm/arch-ixp4xx/irqs.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/irqs.h
*
* IRQ definitions for IXP4XX based systems
*
* Copyright (C) 2002 Intel Corporation.
* Copyright (C) 2003 MontaVista Software, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#ifndef _ARCH_IXP4XX_IRQS_H_
#define _ARCH_IXP4XX_IRQS_H_
#define NR_IRQS 32
#define IRQ_IXP4XX_NPEA 0
#define IRQ_IXP4XX_NPEB 1
#define IRQ_IXP4XX_NPEC 2
#define IRQ_IXP4XX_QM1 3
#define IRQ_IXP4XX_QM2 4
#define IRQ_IXP4XX_TIMER1 5
#define IRQ_IXP4XX_GPIO0 6
#define IRQ_IXP4XX_GPIO1 7
#define IRQ_IXP4XX_PCI_INT 8
#define IRQ_IXP4XX_PCI_DMA1 9
#define IRQ_IXP4XX_PCI_DMA2 10
#define IRQ_IXP4XX_TIMER2 11
#define IRQ_IXP4XX_USB 12
#define IRQ_IXP4XX_UART2 13
#define IRQ_IXP4XX_TIMESTAMP 14
#define IRQ_IXP4XX_UART1 15
#define IRQ_IXP4XX_WDOG 16
#define IRQ_IXP4XX_AHB_PMU 17
#define IRQ_IXP4XX_XSCALE_PMU 18
#define IRQ_IXP4XX_GPIO2 19
#define IRQ_IXP4XX_GPIO3 20
#define IRQ_IXP4XX_GPIO4 21
#define IRQ_IXP4XX_GPIO5 22
#define IRQ_IXP4XX_GPIO6 23
#define IRQ_IXP4XX_GPIO7 24
#define IRQ_IXP4XX_GPIO8 25
#define IRQ_IXP4XX_GPIO9 26
#define IRQ_IXP4XX_GPIO10 27
#define IRQ_IXP4XX_GPIO11 28
#define IRQ_IXP4XX_GPIO12 29
#define IRQ_IXP4XX_SW_INT1 30
#define IRQ_IXP4XX_SW_INT2 31
#define XSCALE_PMU_IRQ (IRQ_IXP4XX_XSCALE_PMU)
/*
* IXDP425 board IRQs
*/
#define IRQ_IXDP425_PCI_INTA IRQ_IXP4XX_GPIO11
#define IRQ_IXDP425_PCI_INTB IRQ_IXP4XX_GPIO10
#define IRQ_IXDP425_PCI_INTC IRQ_IXP4XX_GPIO9
#define IRQ_IXDP425_PCI_INTD IRQ_IXP4XX_GPIO8
/*
* PrPMC1100 Board IRQs
*/
#define IRQ_PRPMC1100_PCI_INTA IRQ_IXP4XX_GPIO11
#define IRQ_PRPMC1100_PCI_INTB IRQ_IXP4XX_GPIO10
#define IRQ_PRPMC1100_PCI_INTC IRQ_IXP4XX_GPIO9
#define IRQ_PRPMC1100_PCI_INTD IRQ_IXP4XX_GPIO8
/*
* ADI Coyote Board IRQs
*/
#define IRQ_COYOTE_PCI_SLOT0 IRQ_IXP4XX_GPIO6
#define IRQ_COYOTE_PCI_SLOT1 IRQ_IXP4XX_GPIO11
#define IRQ_COYOTE_IDE IRQ_IXP4XX_GPIO5
#endif
include/asm-arm/arch-ixp4xx/ixdp425.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/ixdp425.h
*
* IXDP425 platform specific definitions
*
* Author: Deepak Saxena <dsaxena@plexity.net>
*
* Copyright 2004 (c) MontaVista, Software, Inc.
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#ifndef __ASM_ARCH_HARDWARE_H__
#error "Do not include this directly, instead #include <asm/hardware.h>"
#endif
#define IXDP425_FLASH_BASE IXP4XX_EXP_BUS_CS0_BASE_PHYS
#define IXDP425_FLASH_SIZE IXP4XX_EXP_BUS_CSX_REGION_SIZE
#define IXDP425_SDA_PIN 7
#define IXDP425_SCL_PIN 6
/*
* IXDP425 PCI IRQs
*/
#define IXDP425_PCI_MAX_DEV 4
#define IXDP425_PCI_IRQ_LINES 4
/* PCI controller GPIO to IRQ pin mappings */
#define IXDP425_PCI_INTA_PIN 11
#define IXDP425_PCI_INTB_PIN 10
#define IXDP425_PCI_INTC_PIN 9
#define IXDP425_PCI_INTD_PIN 8
include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
*
* Register definitions for IXP4xx chipset. This file contains
* register location and bit definitions only. Platform specific
* definitions and helper function declarations are in platform.h
* and machine-name.h.
*
* Copyright (C) 2002 Intel Corporation.
* Copyright (C) 2003-2004 MontaVista Software, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#ifndef __ASM_ARCH_HARDWARE_H__
#error "Do not include this directly, instead #include <asm/hardware.h>"
#endif
#ifndef _ASM_ARM_IXP4XX_H_
#define _ASM_ARM_IXP4XX_H_
/*
* IXP4xx Linux Memory Map:
*
* Phy Size Virt Description
* =========================================================================
*
* 0x00000000 0x10000000(max) PAGE_OFFSET System RAM
*
* 0x48000000 0x04000000 ioremap'd PCI Memory Space
*
* 0x50000000 0x10000000 ioremap'd EXP BUS
*
* 0x6000000 0x00004000 ioremap'd QMgr
*
* 0xC0000000 0x00001000 0xffbfe000 PCI CFG
*
* 0xC4000000 0x00001000 0xffbfd000 EXP CFG
*
* 0xC8000000 0x0000C000 0xffbf2000 On-Chip Peripherals
*/
/*
* Expansion BUS Configuration registers
*/
#define IXP4XX_EXP_CFG_BASE_PHYS (0xC4000000)
#define IXP4XX_EXP_CFG_BASE_VIRT (0xFFBFD000)
#define IXP4XX_EXP_CFG_REGION_SIZE (0x00001000)
/*
* PCI Config registers
*/
#define IXP4XX_PCI_CFG_BASE_PHYS (0xC0000000)
#define IXP4XX_PCI_CFG_BASE_VIRT (0xFFBFD000)
#define IXP4XX_PCI_CFG_REGION_SIZE (0x00001000)
/*
* Peripheral space
*/
#define IXP4XX_PERIPHERAL_BASE_PHYS (0xC8000000)
#define IXP4XX_PERIPHERAL_BASE_VIRT (0xFFBF2000)
#define IXP4XX_PERIPHERAL_REGION_SIZE (0x0000C000)
#define IXP4XX_EXP_CS0_OFFSET 0x00
#define IXP4XX_EXP_CS1_OFFSET 0x04
#define IXP4XX_EXP_CS2_OFFSET 0x08
#define IXP4XX_EXP_CS3_OFFSET 0x0C
#define IXP4XX_EXP_CS4_OFFSET 0x10
#define IXP4XX_EXP_CS5_OFFSET 0x14
#define IXP4XX_EXP_CS6_OFFSET 0x18
#define IXP4XX_EXP_CS7_OFFSET 0x1C
#define IXP4XX_EXP_CFG0_OFFSET 0x20
#define IXP4XX_EXP_CFG1_OFFSET 0x24
#define IXP4XX_EXP_CFG2_OFFSET 0x28
#define IXP4XX_EXP_CFG3_OFFSET 0x2C
/*
* Expansion Bus Controller registers.
*/
#define IXP4XX_EXP_REG(x) ((volatile u32 *)(IXP4XX_EXP_CFG_BASE_VIRT+(x)))
#define IXP4XX_EXP_CS0 IXP4XX_EXP_REG(IXP4XX_EXP_CS0_OFFSET)
#define IXP4XX_EXP_CS1 IXP4XX_EXP_REG(IXP4XX_EXP_CS1_OFFSET)
#define IXP4XX_EXP_CS2 IXP4XX_EXP_REG(IXP4XX_EXP_CS2_OFFSET)
#define IXP4XX_EXP_CS3 IXP4XX_EXP_REG(IXP4XX_EXP_CS3_OFFSET)
#define IXP4XX_EXP_CS4 IXP4XX_EXP_REG(IXP4XX_EXP_CS4_OFFSET)
#define IXP4XX_EXP_CS5 IXP4XX_EXP_REG(IXP4XX_EXP_CS5_OFFSET)
#define IXP4XX_EXP_CS6 IXP4XX_EXP_REG(IXP4XX_EXP_CS6_OFFSET)
#define IXP4XX_EXP_CS7 IXP4XX_EXP_REG(IXP4XX_EXP_CS7_OFFSET)
#define IXP4XX_EXP_CFG0 IXP4XX_EXP_REG(IXP4XX_EXP_CFG0_OFFSET)
#define IXP4XX_EXP_CFG1 IXP4XX_EXP_REG(IXP4XX_EXP_CFG1_OFFSET)
#define IXP4XX_EXP_CFG2 IXP4XX_EXP_REG(IXP4XX_EXP_CFG2_OFFSET)
#define IXP4XX_EXP_CFG3 IXP4XX_EXP_REG(IXP4XX_EXP_CFG3_OFFSET)
/*
* Peripheral Space Register Region Base Addresses
*/
#define IXP4XX_UART1_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x0000)
#define IXP4XX_UART2_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x1000)
#define IXP4XX_PMU_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x2000)
#define IXP4XX_INTC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x3000)
#define IXP4XX_GPIO_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x4000)
#define IXP4XX_TIMER_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x5000)
#define IXP4XX_USB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x5000)
#define IXP4XX_UART1_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x0000)
#define IXP4XX_UART2_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x1000)
#define IXP4XX_PMU_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x2000)
#define IXP4XX_INTC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x3000)
#define IXP4XX_GPIO_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x4000)
#define IXP4XX_TIMER_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000)
#define IXP4XX_USB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000)
/*
* Constants to make it easy to access Interrupt Controller registers
*/
#define IXP4XX_ICPR_OFFSET 0x00
/* Interrupt Status */
#define IXP4XX_ICMR_OFFSET 0x04
/* Interrupt Enable */
#define IXP4XX_ICLR_OFFSET 0x08
/* Interrupt IRQ/FIQ Select */
#define IXP4XX_ICIP_OFFSET 0x0C
/* IRQ Status */
#define IXP4XX_ICFP_OFFSET 0x10
/* FIQ Status */
#define IXP4XX_ICHR_OFFSET 0x14
/* Interrupt Priority */
#define IXP4XX_ICIH_OFFSET 0x18
/* IRQ Highest Pri Int */
#define IXP4XX_ICFH_OFFSET 0x1C
/* FIQ Highest Pri Int */
/*
* Interrupt Controller Register Definitions.
*/
#define IXP4XX_INTC_REG(x) ((volatile u32 *)(IXP4XX_INTC_BASE_VIRT+(x)))
#define IXP4XX_ICPR IXP4XX_INTC_REG(IXP4XX_ICPR_OFFSET)
#define IXP4XX_ICMR IXP4XX_INTC_REG(IXP4XX_ICMR_OFFSET)
#define IXP4XX_ICLR IXP4XX_INTC_REG(IXP4XX_ICLR_OFFSET)
#define IXP4XX_ICIP IXP4XX_INTC_REG(IXP4XX_ICIP_OFFSET)
#define IXP4XX_ICFP IXP4XX_INTC_REG(IXP4XX_ICFP_OFFSET)
#define IXP4XX_ICHR IXP4XX_INTC_REG(IXP4XX_ICHR_OFFSET)
#define IXP4XX_ICIH IXP4XX_INTC_REG(IXP4XX_ICIH_OFFSET)
#define IXP4XX_ICFH IXP4XX_INTC_REG(IXP4XX_ICFH_OFFSET)
/*
* Constants to make it easy to access GPIO registers
*/
#define IXP4XX_GPIO_GPOUTR_OFFSET 0x00
#define IXP4XX_GPIO_GPOER_OFFSET 0x04
#define IXP4XX_GPIO_GPINR_OFFSET 0x08
#define IXP4XX_GPIO_GPISR_OFFSET 0x0C
#define IXP4XX_GPIO_GPIT1R_OFFSET 0x10
#define IXP4XX_GPIO_GPIT2R_OFFSET 0x14
#define IXP4XX_GPIO_GPCLKR_OFFSET 0x18
#define IXP4XX_GPIO_GPDBSELR_OFFSET 0x1C
/*
* GPIO Register Definitions.
* [Only perform 32bit reads/writes]
*/
#define IXP4XX_GPIO_REG(x) ((volatile u32 *)(IXP4XX_GPIO_BASE_VIRT+(x)))
#define IXP4XX_GPIO_GPOUTR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPOUTR_OFFSET)
#define IXP4XX_GPIO_GPOER IXP4XX_GPIO_REG(IXP4XX_GPIO_GPOER_OFFSET)
#define IXP4XX_GPIO_GPINR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPINR_OFFSET)
#define IXP4XX_GPIO_GPISR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPISR_OFFSET)
#define IXP4XX_GPIO_GPIT1R IXP4XX_GPIO_REG(IXP4XX_GPIO_GPIT1R_OFFSET)
#define IXP4XX_GPIO_GPIT2R IXP4XX_GPIO_REG(IXP4XX_GPIO_GPIT2R_OFFSET)
#define IXP4XX_GPIO_GPCLKR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPCLKR_OFFSET)
#define IXP4XX_GPIO_GPDBSELR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPDBSELR_OFFSET)
/*
* GPIO register bit definitions
*/
/* Interrupt styles
*/
#define IXP4XX_GPIO_STYLE_ACTIVE_HIGH 0x0
#define IXP4XX_GPIO_STYLE_ACTIVE_LOW 0x1
#define IXP4XX_GPIO_STYLE_RISING_EDGE 0x2
#define IXP4XX_GPIO_STYLE_FALLING_EDGE 0x3
#define IXP4XX_GPIO_STYLE_TRANSITIONAL 0x4
/*
* Mask used to clear interrupt styles
*/
#define IXP4XX_GPIO_STYLE_CLEAR 0x7
#define IXP4XX_GPIO_STYLE_SIZE 3
/*
* Constants to make it easy to access Timer Control/Status registers
*/
#define IXP4XX_OSTS_OFFSET 0x00
/* Continious TimeStamp */
#define IXP4XX_OST1_OFFSET 0x04
/* Timer 1 Timestamp */
#define IXP4XX_OSRT1_OFFSET 0x08
/* Timer 1 Reload */
#define IXP4XX_OST2_OFFSET 0x0C
/* Timer 2 Timestamp */
#define IXP4XX_OSRT2_OFFSET 0x10
/* Timer 2 Reload */
#define IXP4XX_OSWT_OFFSET 0x14
/* Watchdog Timer */
#define IXP4XX_OSWE_OFFSET 0x18
/* Watchdog Enable */
#define IXP4XX_OSWK_OFFSET 0x1C
/* Watchdog Key */
#define IXP4XX_OSST_OFFSET 0x20
/* Timer Status */
/*
* Operating System Timer Register Definitions.
*/
#define IXP4XX_TIMER_REG(x) ((volatile u32 *)(IXP4XX_TIMER_BASE_VIRT+(x)))
#define IXP4XX_OSTS IXP4XX_TIMER_REG(IXP4XX_OSTS_OFFSET)
#define IXP4XX_OST1 IXP4XX_TIMER_REG(IXP4XX_OST1_OFFSET)
#define IXP4XX_OSRT1 IXP4XX_TIMER_REG(IXP4XX_OSRT1_OFFSET)
#define IXP4XX_OST2 IXP4XX_TIMER_REG(IXP4XX_OST2_OFFSET)
#define IXP4XX_OSRT2 IXP4XX_TIMER_REG(IXP4XX_OSRT2_OFFSET)
#define IXP4XX_OSWT IXP4XX_TIMER_REG(IXP4XX_OSWT_OFFSET)
#define IXP4XX_OSWE IXP4XX_TIMER_REG(IXP4XX_OSWE_OFFSET)
#define IXP4XX_OSWK IXP4XX_TIMER_REG(IXP4XX_OSWK_OFFSET)
#define IXP4XX_OSST IXP4XX_TIMER_REG(IXP4XX_OSST_OFFSET)
/*
* Timer register values and bit definitions
*/
#define IXP4XX_OST_ENABLE 0x00000001
#define IXP4XX_OST_ONE_SHOT 0x00000002
/* Low order bits of reload value ignored */
#define IXP4XX_OST_RELOAD_MASK 0x00000004
#define IXP4XX_OST_DISABLED 0x00000000
#define IXP4XX_OSST_TIMER_1_PEND 0x00000001
#define IXP4XX_OSST_TIMER_2_PEND 0x00000002
#define IXP4XX_OSST_TIMER_TS_PEND 0x00000004
#define IXP4XX_OSST_TIMER_WDOG_PEND 0x00000008
#define IXP4XX_OSST_TIMER_WARM_RESET 0x00000010
#define IXP4XX_WDT_KEY 0x0000482E
#define IXP4XX_WDT_RESET_ENABLE 0x00000001
#define IXP4XX_WDT_IRQ_ENABLE 0x00000002
#define IXP4XX_WDT_COUNT_ENABLE 0x00000004
/*
* Constants to make it easy to access PCI Control/Status registers
*/
#define PCI_NP_AD_OFFSET 0x00
#define PCI_NP_CBE_OFFSET 0x04
#define PCI_NP_WDATA_OFFSET 0x08
#define PCI_NP_RDATA_OFFSET 0x0c
#define PCI_CRP_AD_CBE_OFFSET 0x10
#define PCI_CRP_WDATA_OFFSET 0x14
#define PCI_CRP_RDATA_OFFSET 0x18
#define PCI_CSR_OFFSET 0x1c
#define PCI_ISR_OFFSET 0x20
#define PCI_INTEN_OFFSET 0x24
#define PCI_DMACTRL_OFFSET 0x28
#define PCI_AHBMEMBASE_OFFSET 0x2c
#define PCI_AHBIOBASE_OFFSET 0x30
#define PCI_PCIMEMBASE_OFFSET 0x34
#define PCI_AHBDOORBELL_OFFSET 0x38
#define PCI_PCIDOORBELL_OFFSET 0x3C
#define PCI_ATPDMA0_AHBADDR_OFFSET 0x40
#define PCI_ATPDMA0_PCIADDR_OFFSET 0x44
#define PCI_ATPDMA0_LENADDR_OFFSET 0x48
#define PCI_ATPDMA1_AHBADDR_OFFSET 0x4C
#define PCI_ATPDMA1_PCIADDR_OFFSET 0x50
#define PCI_ATPDMA1_LENADDR_OFFSET 0x54
/*
* PCI Control/Status Registers
*/
#define IXP4XX_PCI_CSR(x) ((volatile u32 *)(IXP4XX_PCI_CFG_BASE_VIRT+(x)))
#define PCI_NP_AD IXP4XX_PCI_CSR(PCI_NP_AD_OFFSET)
#define PCI_NP_CBE IXP4XX_PCI_CSR(PCI_NP_CBE_OFFSET)
#define PCI_NP_WDATA IXP4XX_PCI_CSR(PCI_NP_WDATA_OFFSET)
#define PCI_NP_RDATA IXP4XX_PCI_CSR(PCI_NP_RDATA_OFFSET)
#define PCI_CRP_AD_CBE IXP4XX_PCI_CSR(PCI_CRP_AD_CBE_OFFSET)
#define PCI_CRP_WDATA IXP4XX_PCI_CSR(PCI_CRP_WDATA_OFFSET)
#define PCI_CRP_RDATA IXP4XX_PCI_CSR(PCI_CRP_RDATA_OFFSET)
#define PCI_CSR IXP4XX_PCI_CSR(PCI_CSR_OFFSET)
#define PCI_ISR IXP4XX_PCI_CSR(PCI_ISR_OFFSET)
#define PCI_INTEN IXP4XX_PCI_CSR(PCI_INTEN_OFFSET)
#define PCI_DMACTRL IXP4XX_PCI_CSR(PCI_DMACTRL_OFFSET)
#define PCI_AHBMEMBASE IXP4XX_PCI_CSR(PCI_AHBMEMBASE_OFFSET)
#define PCI_AHBIOBASE IXP4XX_PCI_CSR(PCI_AHBIOBASE_OFFSET)
#define PCI_PCIMEMBASE IXP4XX_PCI_CSR(PCI_PCIMEMBASE_OFFSET)
#define PCI_AHBDOORBELL IXP4XX_PCI_CSR(PCI_AHBDOORBELL_OFFSET)
#define PCI_PCIDOORBELL IXP4XX_PCI_CSR(PCI_PCIDOORBELL_OFFSET)
#define PCI_ATPDMA0_AHBADDR IXP4XX_PCI_CSR(PCI_ATPDMA0_AHBADDR_OFFSET)
#define PCI_ATPDMA0_PCIADDR IXP4XX_PCI_CSR(PCI_ATPDMA0_PCIADDR_OFFSET)
#define PCI_ATPDMA0_LENADDR IXP4XX_PCI_CSR(PCI_ATPDMA0_LENADDR_OFFSET)
#define PCI_ATPDMA1_AHBADDR IXP4XX_PCI_CSR(PCI_ATPDMA1_AHBADDR_OFFSET)
#define PCI_ATPDMA1_PCIADDR IXP4XX_PCI_CSR(PCI_ATPDMA1_PCIADDR_OFFSET)
#define PCI_ATPDMA1_LENADDR IXP4XX_PCI_CSR(PCI_ATPDMA1_LENADDR_OFFSET)
/*
* PCI register values and bit definitions
*/
/* CSR bit definitions */
#define PCI_CSR_HOST 0x00000001
#define PCI_CSR_ARBEN 0x00000002
#define PCI_CSR_ADS 0x00000004
#define PCI_CSR_PDS 0x00000008
#define PCI_CSR_ABE 0x00000010
#define PCI_CSR_DBT 0x00000020
#define PCI_CSR_ASE 0x00000100
#define PCI_CSR_IC 0x00008000
/* ISR (Interrupt status) Register bit definitions */
#define PCI_ISR_PSE 0x00000001
#define PCI_ISR_PFE 0x00000002
#define PCI_ISR_PPE 0x00000004
#define PCI_ISR_AHBE 0x00000008
#define PCI_ISR_APDC 0x00000010
#define PCI_ISR_PADC 0x00000020
#define PCI_ISR_ADB 0x00000040
#define PCI_ISR_PDB 0x00000080
/* INTEN (Interrupt Enable) Register bit definitions */
#define PCI_INTEN_PSE 0x00000001
#define PCI_INTEN_PFE 0x00000002
#define PCI_INTEN_PPE 0x00000004
#define PCI_INTEN_AHBE 0x00000008
#define PCI_INTEN_APDC 0x00000010
#define PCI_INTEN_PADC 0x00000020
#define PCI_INTEN_ADB 0x00000040
#define PCI_INTEN_PDB 0x00000080
/*
* Shift value for byte enable on NP cmd/byte enable register
*/
#define IXP4XX_PCI_NP_CBE_BESL 4
/*
* PCI commands supported by NP access unit
*/
#define NP_CMD_IOREAD 0x2
#define NP_CMD_IOWRITE 0x3
#define NP_CMD_CONFIGREAD 0xa
#define NP_CMD_CONFIGWRITE 0xb
#define NP_CMD_MEMREAD 0x6
#define NP_CMD_MEMWRITE 0x7
/*
* Constants for CRP access into local config space
*/
#define CRP_AD_CBE_BESL 20
#define CRP_AD_CBE_WRITE 0x00010000
/*
* USB Device Controller
*
* These are used by the USB gadget driver, so they don't follow the
* IXP4XX_ naming convetions.
*
*/
# define IXP4XX_USB_REG(x) (*((volatile u32 *)(x)))
/* UDC Undocumented - Reserved1 */
#define UDC_RES1 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0004)
/* UDC Undocumented - Reserved2 */
#define UDC_RES2 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0008)
/* UDC Undocumented - Reserved3 */
#define UDC_RES3 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x000C)
/* UDC Control Register */
#define UDCCR IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0000)
/* UDC Endpoint 0 Control/Status Register */
#define UDCCS0 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0010)
/* UDC Endpoint 1 (IN) Control/Status Register */
#define UDCCS1 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0014)
/* UDC Endpoint 2 (OUT) Control/Status Register */
#define UDCCS2 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0018)
/* UDC Endpoint 3 (IN) Control/Status Register */
#define UDCCS3 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x001C)
/* UDC Endpoint 4 (OUT) Control/Status Register */
#define UDCCS4 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0020)
/* UDC Endpoint 5 (Interrupt) Control/Status Register */
#define UDCCS5 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0024)
/* UDC Endpoint 6 (IN) Control/Status Register */
#define UDCCS6 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0028)
/* UDC Endpoint 7 (OUT) Control/Status Register */
#define UDCCS7 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x002C)
/* UDC Endpoint 8 (IN) Control/Status Register */
#define UDCCS8 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0030)
/* UDC Endpoint 9 (OUT) Control/Status Register */
#define UDCCS9 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0034)
/* UDC Endpoint 10 (Interrupt) Control/Status Register */
#define UDCCS10 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0038)
/* UDC Endpoint 11 (IN) Control/Status Register */
#define UDCCS11 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x003C)
/* UDC Endpoint 12 (OUT) Control/Status Register */
#define UDCCS12 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0040)
/* UDC Endpoint 13 (IN) Control/Status Register */
#define UDCCS13 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0044)
/* UDC Endpoint 14 (OUT) Control/Status Register */
#define UDCCS14 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0048)
/* UDC Endpoint 15 (Interrupt) Control/Status Register */
#define UDCCS15 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x004C)
/* UDC Frame Number Register High */
#define UFNRH IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0060)
/* UDC Frame Number Register Low */
#define UFNRL IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0064)
/* UDC Byte Count Reg 2 */
#define UBCR2 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0068)
/* UDC Byte Count Reg 4 */
#define UBCR4 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x006c)
/* UDC Byte Count Reg 7 */
#define UBCR7 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0070)
/* UDC Byte Count Reg 9 */
#define UBCR9 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0074)
/* UDC Byte Count Reg 12 */
#define UBCR12 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0078)
/* UDC Byte Count Reg 14 */
#define UBCR14 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x007c)
/* UDC Endpoint 0 Data Register */
#define UDDR0 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0080)
/* UDC Endpoint 1 Data Register */
#define UDDR1 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0100)
/* UDC Endpoint 2 Data Register */
#define UDDR2 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0180)
/* UDC Endpoint 3 Data Register */
#define UDDR3 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0200)
/* UDC Endpoint 4 Data Register */
#define UDDR4 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0400)
/* UDC Endpoint 5 Data Register */
#define UDDR5 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x00A0)
/* UDC Endpoint 6 Data Register */
#define UDDR6 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0600)
/* UDC Endpoint 7 Data Register */
#define UDDR7 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0680)
/* UDC Endpoint 8 Data Register */
#define UDDR8 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0700)
/* UDC Endpoint 9 Data Register */
#define UDDR9 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0900)
/* UDC Endpoint 10 Data Register */
#define UDDR10 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x00C0)
/* UDC Endpoint 11 Data Register */
#define UDDR11 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0B00)
/* UDC Endpoint 12 Data Register */
#define UDDR12 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0B80)
/* UDC Endpoint 13 Data Register */
#define UDDR13 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0C00)
/* UDC Endpoint 14 Data Register */
#define UDDR14 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0E00)
/* UDC Endpoint 15 Data Register */
#define UDDR15 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x00E0)
/* UDC Interrupt Control Register 0 */
#define UICR0 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0050)
/* UDC Interrupt Control Register 1 */
#define UICR1 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0054)
/* UDC Status Interrupt Register 0 */
#define USIR0 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0058)
/* UDC Status Interrupt Register 1 */
#define USIR1 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x005C)
#define UDCCR_UDE (1 << 0)
/* UDC enable */
#define UDCCR_UDA (1 << 1)
/* UDC active */
#define UDCCR_RSM (1 << 2)
/* Device resume */
#define UDCCR_RESIR (1 << 3)
/* Resume interrupt request */
#define UDCCR_SUSIR (1 << 4)
/* Suspend interrupt request */
#define UDCCR_SRM (1 << 5)
/* Suspend/resume interrupt mask */
#define UDCCR_RSTIR (1 << 6)
/* Reset interrupt request */
#define UDCCR_REM (1 << 7)
/* Reset interrupt mask */
#define UDCCS0_OPR (1 << 0)
/* OUT packet ready */
#define UDCCS0_IPR (1 << 1)
/* IN packet ready */
#define UDCCS0_FTF (1 << 2)
/* Flush Tx FIFO */
#define UDCCS0_DRWF (1 << 3)
/* Device remote wakeup feature */
#define UDCCS0_SST (1 << 4)
/* Sent stall */
#define UDCCS0_FST (1 << 5)
/* Force stall */
#define UDCCS0_RNE (1 << 6)
/* Receive FIFO no empty */
#define UDCCS0_SA (1 << 7)
/* Setup active */
#define UDCCS_BI_TFS (1 << 0)
/* Transmit FIFO service */
#define UDCCS_BI_TPC (1 << 1)
/* Transmit packet complete */
#define UDCCS_BI_FTF (1 << 2)
/* Flush Tx FIFO */
#define UDCCS_BI_TUR (1 << 3)
/* Transmit FIFO underrun */
#define UDCCS_BI_SST (1 << 4)
/* Sent stall */
#define UDCCS_BI_FST (1 << 5)
/* Force stall */
#define UDCCS_BI_TSP (1 << 7)
/* Transmit short packet */
#define UDCCS_BO_RFS (1 << 0)
/* Receive FIFO service */
#define UDCCS_BO_RPC (1 << 1)
/* Receive packet complete */
#define UDCCS_BO_DME (1 << 3)
/* DMA enable */
#define UDCCS_BO_SST (1 << 4)
/* Sent stall */
#define UDCCS_BO_FST (1 << 5)
/* Force stall */
#define UDCCS_BO_RNE (1 << 6)
/* Receive FIFO not empty */
#define UDCCS_BO_RSP (1 << 7)
/* Receive short packet */
#define UDCCS_II_TFS (1 << 0)
/* Transmit FIFO service */
#define UDCCS_II_TPC (1 << 1)
/* Transmit packet complete */
#define UDCCS_II_FTF (1 << 2)
/* Flush Tx FIFO */
#define UDCCS_II_TUR (1 << 3)
/* Transmit FIFO underrun */
#define UDCCS_II_TSP (1 << 7)
/* Transmit short packet */
#define UDCCS_IO_RFS (1 << 0)
/* Receive FIFO service */
#define UDCCS_IO_RPC (1 << 1)
/* Receive packet complete */
#define UDCCS_IO_ROF (1 << 3)
/* Receive overflow */
#define UDCCS_IO_DME (1 << 3)
/* DMA enable */
#define UDCCS_IO_RNE (1 << 6)
/* Receive FIFO not empty */
#define UDCCS_IO_RSP (1 << 7)
/* Receive short packet */
#define UDCCS_INT_TFS (1 << 0)
/* Transmit FIFO service */
#define UDCCS_INT_TPC (1 << 1)
/* Transmit packet complete */
#define UDCCS_INT_FTF (1 << 2)
/* Flush Tx FIFO */
#define UDCCS_INT_TUR (1 << 3)
/* Transmit FIFO underrun */
#define UDCCS_INT_SST (1 << 4)
/* Sent stall */
#define UDCCS_INT_FST (1 << 5)
/* Force stall */
#define UDCCS_INT_TSP (1 << 7)
/* Transmit short packet */
#define UICR0_IM0 (1 << 0)
/* Interrupt mask ep 0 */
#define UICR0_IM1 (1 << 1)
/* Interrupt mask ep 1 */
#define UICR0_IM2 (1 << 2)
/* Interrupt mask ep 2 */
#define UICR0_IM3 (1 << 3)
/* Interrupt mask ep 3 */
#define UICR0_IM4 (1 << 4)
/* Interrupt mask ep 4 */
#define UICR0_IM5 (1 << 5)
/* Interrupt mask ep 5 */
#define UICR0_IM6 (1 << 6)
/* Interrupt mask ep 6 */
#define UICR0_IM7 (1 << 7)
/* Interrupt mask ep 7 */
#define UICR1_IM8 (1 << 0)
/* Interrupt mask ep 8 */
#define UICR1_IM9 (1 << 1)
/* Interrupt mask ep 9 */
#define UICR1_IM10 (1 << 2)
/* Interrupt mask ep 10 */
#define UICR1_IM11 (1 << 3)
/* Interrupt mask ep 11 */
#define UICR1_IM12 (1 << 4)
/* Interrupt mask ep 12 */
#define UICR1_IM13 (1 << 5)
/* Interrupt mask ep 13 */
#define UICR1_IM14 (1 << 6)
/* Interrupt mask ep 14 */
#define UICR1_IM15 (1 << 7)
/* Interrupt mask ep 15 */
#define USIR0_IR0 (1 << 0)
/* Interrup request ep 0 */
#define USIR0_IR1 (1 << 1)
/* Interrup request ep 1 */
#define USIR0_IR2 (1 << 2)
/* Interrup request ep 2 */
#define USIR0_IR3 (1 << 3)
/* Interrup request ep 3 */
#define USIR0_IR4 (1 << 4)
/* Interrup request ep 4 */
#define USIR0_IR5 (1 << 5)
/* Interrup request ep 5 */
#define USIR0_IR6 (1 << 6)
/* Interrup request ep 6 */
#define USIR0_IR7 (1 << 7)
/* Interrup request ep 7 */
#define USIR1_IR8 (1 << 0)
/* Interrup request ep 8 */
#define USIR1_IR9 (1 << 1)
/* Interrup request ep 9 */
#define USIR1_IR10 (1 << 2)
/* Interrup request ep 10 */
#define USIR1_IR11 (1 << 3)
/* Interrup request ep 11 */
#define USIR1_IR12 (1 << 4)
/* Interrup request ep 12 */
#define USIR1_IR13 (1 << 5)
/* Interrup request ep 13 */
#define USIR1_IR14 (1 << 6)
/* Interrup request ep 14 */
#define USIR1_IR15 (1 << 7)
/* Interrup request ep 15 */
#define DCMD_LENGTH 0x01fff
/* length mask (max = 8K - 1) */
#endif
include/asm-arm/arch-ixp4xx/memory.h
0 → 100644
View file @
d43e2297
/*
* linux/include/asm-arm/arch-ixp4xx/memory.h
*
* Copyright (c) 2001-2004 MontaVista Software, Inc.
*/
#ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MEMORY_H
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
#define PAGE_OFFSET (0xc0000000UL)
/*
* Physical DRAM offset.
*/
#define PHYS_OFFSET (0x00000000UL)
/*
* physical vs virtual ram conversion
*/
#define __virt_to_phys__is_a_macro
#define __phys_to_virt__is_a_macro
#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
/*
* Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an
* address suitable to be passed to set_dma_addr
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*
* These are dummies for now.
*/
#define __virt_to_bus__is_a_macro
#define __bus_to_virt__is_a_macro
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x)
#endif
include/asm-arm/arch-ixp4xx/param.h
0 → 100644
View file @
d43e2297
/*
* linux/include/asm-arm/arch-ixp4xx/param.h
*/
include/asm-arm/arch-ixp4xx/platform.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/platform.h
*
* Constants and functions that are useful to IXP4xx platform-specific code
* and device drivers.
*
* Copyright (C) 2004 MontaVista Software, Inc.
*/
#ifndef __ASM_ARCH_HARDWARE_H__
#error "Do not include this directly, instead #include <asm/hardware.h>"
#endif
#ifndef __ASSEMBLY__
#include <asm/types.h>
/*
* Expansion bus memory regions
*/
#define IXP4XX_EXP_BUS_BASE_PHYS (0x50000000)
#define IXP4XX_EXP_BUS_CSX_REGION_SIZE (0x01000000)
#define IXP4XX_EXP_BUS_CS0_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x00000000)
#define IXP4XX_EXP_BUS_CS1_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x01000000)
#define IXP4XX_EXP_BUS_CS2_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x02000000)
#define IXP4XX_EXP_BUS_CS3_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x03000000)
#define IXP4XX_EXP_BUS_CS4_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x04000000)
#define IXP4XX_EXP_BUS_CS5_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x05000000)
#define IXP4XX_EXP_BUS_CS6_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x06000000)
#define IXP4XX_EXP_BUS_CS7_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x07000000)
#define IXP4XX_FLASH_WRITABLE (0x2)
#define IXP4XX_FLASH_DEFAULT (0xbcd23c40)
#define IXP4XX_FLASH_WRITE (0xbcd23c42)
/*
* Clock Speed Definitions.
*/
#define IXP4XX_PERIPHERAL_BUS_CLOCK (66)
/* 66Mhzi APB BUS */
#define IXP4XX_UART_XTAL 14745600
/*
* The IXP4xx chips do not have an I2C unit, so GPIO lines are just
* used to
* Used as platform_data to provide GPIO pin information to the ixp42x
* I2C driver.
*/
struct
ixp4xx_i2c_pins
{
unsigned
long
sda_pin
;
unsigned
long
scl_pin
;
};
/*
* Functions used by platform-level setup code
*/
extern
void
ixp4xx_map_io
(
void
);
extern
void
ixp4xx_init_irq
(
void
);
extern
void
ixp4xx_pci_preinit
(
void
);
struct
pci_sys_data
;
extern
int
ixp4xx_setup
(
int
nr
,
struct
pci_sys_data
*
sys
);
extern
struct
pci_bus
*
ixp4xx_scan_bus
(
int
nr
,
struct
pci_sys_data
*
sys
);
/*
* GPIO-functions
*/
/*
* The following converted to the real HW bits the gpio_line_config
*/
/* GPIO pin types */
#define IXP4XX_GPIO_OUT 0x1
#define IXP4XX_GPIO_IN 0x2
#define IXP4XX_GPIO_INTSTYLE_MASK 0x7C
/* Bits [6:2] define interrupt style */
/*
* GPIO interrupt types.
*/
#define IXP4XX_GPIO_ACTIVE_HIGH 0x4
/* Default */
#define IXP4XX_GPIO_ACTIVE_LOW 0x8
#define IXP4XX_GPIO_RISING_EDGE 0x10
#define IXP4XX_GPIO_FALLING_EDGE 0x20
#define IXP4XX_GPIO_TRANSITIONAL 0x40
/* GPIO signal types */
#define IXP4XX_GPIO_LOW 0
#define IXP4XX_GPIO_HIGH 1
/* GPIO Clocks */
#define IXP4XX_GPIO_CLK_0 14
#define IXP4XX_GPIO_CLK_1 15
extern
void
gpio_line_config
(
u8
line
,
u32
style
);
static
inline
void
gpio_line_get
(
u8
line
,
int
*
value
)
{
*
value
=
(
*
IXP4XX_GPIO_GPINR
>>
line
)
&
0x1
;
}
static
inline
void
gpio_line_set
(
u8
line
,
int
value
)
{
if
(
value
==
IXP4XX_GPIO_HIGH
)
*
IXP4XX_GPIO_GPOUTR
|=
(
1
<<
line
);
else
if
(
value
==
IXP4XX_GPIO_LOW
)
*
IXP4XX_GPIO_GPOUTR
&=
~
(
1
<<
line
);
}
static
inline
void
gpio_line_isr_clear
(
u8
line
)
{
*
IXP4XX_GPIO_GPISR
=
(
1
<<
line
);
}
#endif // __ASSEMBLY__
include/asm-arm/arch-ixp4xx/prpmc1100.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/prpmc1100.h
*
* Motorolla PrPMC1100 platform specific definitions
*
* Author: Deepak Saxena <dsaxena@plexity.net>
*
* Copyright 2004 (c) MontaVista, Software, Inc.
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#ifndef __ASM_ARCH_HARDWARE_H__
#error "Do not include this directly, instead #include <asm/hardware.h>"
#endif
#define PRPMC1100_FLASH_BASE IXP4XX_EXP_BUS_CS0_BASE_PHYS
#define PRPMC1100_FLASH_SIZE IXP4XX_EXP_BUS_CSX_REGION_SIZE
#define PRPMC1100_PCI_MIN_DEVID 10
#define PRPMC1100_PCI_MAX_DEVID 16
#define PRPMC1100_PCI_IRQ_LINES 4
/* PCI controller GPIO to IRQ pin mappings */
#define PRPMC1100_PCI_INTA_PIN 11
#define PRPMC1100_PCI_INTB_PIN 10
#define PRPMC1100_PCI_INTC_PIN 9
#define PRPMC1100_PCI_INTD_PIN 8
include/asm-arm/arch-ixp4xx/serial.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/serial.h
*
* Author: Deepak Saxena <dsaxena@plexity.net>
*
* Copyright (C) 2002-2004 MontaVista Software, Inc.
*
*/
#ifndef _ARCH_SERIAL_H_
#define _ARCH_SERIAL_H_
/*
* We don't hardcode our serial port information but instead
* fill it in dynamically based on our platform in arch->map_io.
* This allows for per-board serial ports w/o a bunch of
* #ifdefs in this file.
*/
#define STD_SERIAL_PORT_DEFNS
#define EXTRA_SERIAL_PORT_DEFNS
/*
* IXP4XX uses 15.6MHz clock for uart
*/
#define BASE_BAUD ( IXP4XX_UART_XTAL / 16 )
#endif // _ARCH_SERIAL_H_
include/asm-arm/arch-ixp4xx/system.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4x//system.h
*
* Copyright (C) 2002 Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <asm/hardware.h>
static
inline
void
arch_idle
(
void
)
{
#if 0
if (!hlt_counter)
cpu_do_idle(0);
#endif
}
static
inline
void
arch_reset
(
char
mode
)
{
if
(
1
&&
mode
==
's'
)
{
/* Jump into ROM at address 0 */
cpu_reset
(
0
);
}
else
{
/* Use on-chip reset capability */
/* set the "key" register to enable access to
* "timer" and "enable" registers
*/
*
IXP4XX_OSWK
=
0x482e
;
/* write 0 to the timer register for an immidiate reset */
*
IXP4XX_OSWT
=
0
;
/* disable watchdog interrupt, enable reset, enable count */
*
IXP4XX_OSWE
=
0x3
;
}
}
include/asm-arm/arch-ixp4xx/time.h
0 → 100644
View file @
d43e2297
/*
* linux/include/asm-arm/arch-ixp4xx/time.h
*
* We implement timer code in arch/arm/mach-ixp4xx/time.c
*
*/
include/asm-arm/arch-ixp4xx/timex.h
0 → 100644
View file @
d43e2297
/*
* linux/include/asm-arm/arch-ixp4xx/timex.h
*
*/
#include <asm/hardware.h>
/*
* We use IXP425 General purpose timer for our timer needs, it runs at 66 MHz
*/
#define CLOCK_TICK_RATE (IXP4XX_PERIPHERAL_BUS_CLOCK * 1000000)
include/asm-arm/arch-ixp4xx/uncompress.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/uncompress.h
*
* Copyright (C) 2002 Intel Corporation.
* Copyright (C) 2003-2004 MontaVista Software, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#ifndef _ARCH_UNCOMPRESS_H_
#define _ARCH_UNCOMPRESS_H_
#include <asm/hardware.h>
#include <asm/mach-types.h>
#include <linux/serial_reg.h>
#define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
static
volatile
u32
*
uart_base
;
static
__inline__
void
putc
(
char
c
)
{
/* Check THRE and TEMT bits before we transmit the character.
*/
while
((
uart_base
[
UART_LSR
]
&
TX_DONE
)
!=
TX_DONE
);
*
uart_base
=
c
;
}
/*
* This does not append a newline
*/
static
void
puts
(
const
char
*
s
)
{
while
(
*
s
)
{
putc
(
*
s
);
if
(
*
s
==
'\n'
)
putc
(
'\r'
);
s
++
;
}
}
static
__inline__
void
__arch_decomp_setup
(
unsigned
long
arch_id
)
{
/*
* Coyote only has UART2 connected
*/
if
(
__machine_arch_type
==
MACH_TYPE_ADI_COYOTE
)
uart_base
=
(
volatile
u32
*
)
IXP4XX_UART2_BASE_PHYS
;
else
uart_base
=
(
volatile
u32
*
)
IXP4XX_UART1_BASE_PHYS
;
}
/*
* arch_id is a variable in decompress_kernel()
*/
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
#define arch_decomp_wdog()
#endif
include/asm-arm/arch-ixp4xx/vmalloc.h
0 → 100644
View file @
d43e2297
/*
* linux/include/asm-arm/arch-ixp4xx/vmalloc.h
*/
/*
* Just any arbitrary offset to the start of the vmalloc VM area: the
* current 8MB value just means that there will be a 8MB "hole" after the
* physical memory until the kernel virtual memory starts. That means that
* any out-of-bounds memory accesses will hopefully be caught.
* The vmalloc() routines leaves a hole of 4kB between each vmalloced
* area for the same reason. ;)
*/
#define VMALLOC_OFFSET (8*1024*1024)
#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
#define VMALLOC_VMADDR(x) ((unsigned long)(x))
#define VMALLOC_END (0xFF000000)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment