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
nexedi
linux
Commits
16fe57cb
Commit
16fe57cb
authored
Apr 02, 2004
by
Randy Vinson
Committed by
Tom Rini
Apr 02, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating mcpn765 for 2.6
parent
af077e54
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
394 additions
and
419 deletions
+394
-419
arch/ppc/configs/mcpn765_defconfig
arch/ppc/configs/mcpn765_defconfig
+179
-142
arch/ppc/platforms/Makefile
arch/ppc/platforms/Makefile
+1
-1
arch/ppc/platforms/mcpn765.c
arch/ppc/platforms/mcpn765.c
+214
-169
arch/ppc/platforms/mcpn765_pci.c
arch/ppc/platforms/mcpn765_pci.c
+0
-107
No files found.
arch/ppc/configs/mcpn765_defconfig
View file @
16fe57cb
...
...
@@ -4,49 +4,65 @@
CONFIG_MMU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_HAVE_DEC_LOCK=y
CONFIG_PPC=y
CONFIG_PPC32=y
CONFIG_GENERIC_NVRAM=y
#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
# CONFIG_EXPERIMENTAL is not set
CONFIG_CLEAN_COMPILE=y
CONFIG_STANDALONE=y
CONFIG_BROKEN_ON_SMP=y
#
# General setup
#
CONFIG_SWAP=y
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
CONFIG_LOG_BUF_SHIFT=14
# CONFIG_EMBEDDED is not set
# 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_CC_OPTIMIZE_FOR_SIZE is not set
#
# Loadable module support
#
# CONFIG_MODULES is not set
CONFIG_MODULES=y
# CONFIG_MODULE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_KMOD is not set
#
# P
latform support
# P
rocessor
#
CONFIG_PPC=y
CONFIG_PPC32=y
CONFIG_6xx=y
# CONFIG_40x is not set
# CONFIG_44x is not set
# CONFIG_POWER3 is not set
# CONFIG_POWER4 is not set
# CONFIG_8xx is not set
CONFIG_ALTIVEC=y
# CONFIG_TAU is not set
# CONFIG_CPU_FREQ is not set
CONFIG_PPC_STD_MMU=y
#
#
IBM 4xx
options
#
Platform
options
#
# CONFIG_8260 is not set
CONFIG_GENERIC_ISA_DMA=y
CONFIG_PPC_STD_MMU=y
# CONFIG_PPC_MULTIPLATFORM is not set
# CONFIG_APUS is not set
# CONFIG_WILLOW
_2
is not set
# CONFIG_WILLOW is not set
# CONFIG_PCORE is not set
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
...
...
@@ -62,33 +78,28 @@ CONFIG_MCPN765=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_EST8260 is not set
# CONFIG_SBS8260 is not set
# CONFIG_RPX6 is not set
# CONFIG_TQM8260 is not set
CONFIG_PPC_GEN550=y
# CONFIG_SMP is not set
# CONFIG_PREEMPT is not set
CONFIG_ALTIVEC=y
# CONFIG_TAU is not set
# CONFIG_CPU_FREQ is not set
#
# General setup
#
CONFIG_HIGHMEM=y
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_KCORE_ELF=y
CONFIG_KERNEL_ELF=y
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
# CONFIG_PCI_LEGACY_PROC is not set
# CONFIG_PCI_NAMES is not set
# CONFIG_HOTPLUG is not set
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="ip=on"
#
#
Parallel port support
#
Bus options
#
# CONFIG_PARPORT is not set
# CONFIG_PPC601_SYNC_FIX is not set
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="ip=on"
CONFIG_GENERIC_ISA_DMA=y
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
# CONFIG_PCI_LEGACY_PROC is not set
# CONFIG_PCI_NAMES is not set
#
# Advanced setup
...
...
@@ -104,20 +115,27 @@ CONFIG_KERNEL_START=0xc0000000
CONFIG_TASK_SIZE=0x80000000
CONFIG_BOOT_LOAD=0x00800000
#
# Device Drivers
#
#
# Generic Driver Options
#
# CONFIG_FW_LOADER is not set
#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set
#
# Parallel port support
#
# CONFIG_PARPORT is not set
#
# Plug and Play support
#
# CONFIG_PNP is not set
#
# Block devices
...
...
@@ -126,36 +144,85 @@ CONFIG_BOOT_LOAD=0x00800000
# 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=4096
CONFIG_BLK_DEV_INITRD=y
# CONFIG_LBD is not set
#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set
#
# ATA/ATAPI/MFM/RLL support
#
# CONFIG_IDE is not set
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_IDEFLOPPY is not set
# CONFIG_IDE_TASK_IOCTL is not set
#
# IDE chipset support/bugfixes
#
# CONFIG_IDE_GENERIC is not set
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_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 is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_BLK_DEV_HPT366 is not set
# 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 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=y
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
#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set
#
# Fusion MPT device support
#
# CONFIG_FUSION is not set
#
# IEEE 1394 (FireWire) support
(EXPERIMENTAL)
# IEEE 1394 (FireWire) support
#
# CONFIG_IEEE1394 is not set
...
...
@@ -164,6 +231,10 @@ CONFIG_BLK_DEV_INITRD=y
#
# CONFIG_I2O is not set
#
# Macintosh device drivers
#
#
# Networking support
#
...
...
@@ -175,7 +246,6 @@ CONFIG_NET=y
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
# CONFIG_NETLINK_DEV is not set
# CONFIG_NETFILTER is not set
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
...
...
@@ -187,32 +257,17 @@ CONFIG_IP_PNP_DHCP=y
# CONFIG_IP_PNP_RARP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_ARPD is not set
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_IPV6 is not set
# CONFIG_XFRM_USER is not set
#
# SCTP Configuration (EXPERIMENTAL)
#
CONFIG_IPV6_SCTP__=y
# CONFIG_IP_SCTP is not set
# CONFIG_ATM is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_LLC is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set
# CONFIG_NETFILTER is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
#
# QoS and/or fair queueing
...
...
@@ -233,7 +288,6 @@ CONFIG_NETDEVICES=y
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_ETHERTAP is not set
#
# Ethernet (10 or 100Mbit)
...
...
@@ -248,26 +302,15 @@ CONFIG_MII=y
#
# Tulip family network device support
#
# CONFIG_NET_TULIP is not set
CONFIG_NET_TULIP=y
CONFIG_TULIP=y
# CONFIG_TULIP_MMIO is not set
# CONFIG_TULIP_NAPI is not set
# CONFIG_DE4X5 is not set
# CONFIG_WINBOND_840 is not set
# CONFIG_DM9102 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_DGRS is not set
# CONFIG_EEPRO100 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
# CONFIG_NET_PCI is not set
#
# Ethernet (1000 Mbit)
...
...
@@ -277,7 +320,6 @@ CONFIG_NET_PCI=y
# 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
...
...
@@ -287,7 +329,6 @@ CONFIG_NET_PCI=y
#
# CONFIG_IXGB is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
...
...
@@ -297,10 +338,9 @@ CONFIG_NET_PCI=y
# CONFIG_NET_RADIO is not set
#
# Token Ring devices
(depends on LLC=y)
# Token Ring devices
#
# CONFIG_RCPCI is not set
# CONFIG_SHAPER is not set
# CONFIG_TR is not set
#
# Wan interfaces
...
...
@@ -317,15 +357,22 @@ CONFIG_NET_PCI=y
#
# CONFIG_IRDA is not set
#
# Bluetooth support
#
# CONFIG_BT is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
#
# ISDN subsystem
#
# CONFIG_ISDN
_BOOL
is not set
# CONFIG_ISDN is not set
#
#
Graphics s
upport
#
Telephony S
upport
#
# CONFIG_
FB
is not set
# CONFIG_
PHONE
is not set
#
# Input device support
...
...
@@ -342,18 +389,16 @@ CONFIG_NET_PCI=y
# CONFIG_GAMEPORT is not set
CONFIG_SOUND_GAMEPORT=y
# CONFIG_SERIO is not set
# CONFIG_SERIO_I8042 is not set
#
# Input Device Drivers
#
#
# Macintosh device drivers
#
#
# Character devices
#
# CONFIG_VT is not set
# CONFIG_SERIAL_NONSTANDARD is not set
#
...
...
@@ -361,6 +406,7 @@ CONFIG_SOUND_GAMEPORT=y
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set
#
...
...
@@ -369,26 +415,8 @@ CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
#
# I2C support
#
# CONFIG_I2C is not set
#
# I2C Hardware Sensors Mainboard support
#
#
# I2C Hardware Sensors Chip support
#
# CONFIG_I2C_SENSOR is not set
#
# Mice
#
# CONFIG_BUSMOUSE is not set
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
# CONFIG_QIC02_TAPE is not set
#
...
...
@@ -414,7 +442,15 @@ CONFIG_GEN_RTC=y
# CONFIG_AGP is not set
# CONFIG_DRM is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_HANGCHECK_TIMER is not set
#
# I2C support
#
# CONFIG_I2C is not set
#
# Misc devices
#
#
# Multimedia devices
...
...
@@ -426,10 +462,31 @@ CONFIG_GEN_RTC=y
#
# CONFIG_DVB is not set
#
# Graphics support
#
# CONFIG_FB is not set
#
# Sound
#
# CONFIG_SOUND is not set
#
# USB support
#
# CONFIG_USB is not set
#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
#
# File systems
#
# CONFIG_EXT2_FS is not set
CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
# CONFIG_EXT3_FS is not set
# CONFIG_JBD is not set
# CONFIG_REISERFS_FS is not set
...
...
@@ -457,21 +514,16 @@ CONFIG_GEN_RTC=y
# Pseudo filesystems
#
CONFIG_PROC_FS=y
# CONFIG_DEVFS_FS is not set
CONFIG_DEVPTS_FS=y
CONFIG_PROC_KCORE=y
# CONFIG_DEVPTS_FS_XATTR is not set
# CONFIG_TMPFS 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_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
...
...
@@ -484,19 +536,15 @@ CONFIG_RAMFS=y
#
CONFIG_NFS_FS=y
# CONFIG_NFS_V3 is not set
# CONFIG_NFS_V4 is not set
# CONFIG_NFSD is not set
CONFIG_ROOT_NFS=y
CONFIG_LOCKD=y
# CONFIG_EXPORTFS is not set
CONFIG_SUNRPC=y
# CONFIG_SUNRPC_GSS 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
...
...
@@ -505,25 +553,14 @@ CONFIG_SUNRPC=y
CONFIG_MSDOS_PARTITION=y
#
# Sound
#
# CONFIG_SOUND is not set
#
# USB support
#
# CONFIG_USB is not set
# CONFIG_USB_GADGET is not set
#
# Bluetooth support
# Native Language Support
#
# CONFIG_
BT
is not set
# CONFIG_
NLS
is not set
#
# Library routines
#
# CONFIG_CRC32 is not set
CONFIG_CRC32=y
#
# Kernel hacking
...
...
arch/ppc/platforms/Makefile
View file @
16fe57cb
...
...
@@ -35,7 +35,7 @@ obj-$(CONFIG_EV64260) += ev64260_setup.o
obj-$(CONFIG_GEMINI)
+=
gemini_pci.o gemini_setup.o gemini_prom.o
obj-$(CONFIG_K2)
+=
k2_setup.o k2_pci.o
obj-$(CONFIG_LOPEC)
+=
lopec_setup.o lopec_pci.o
obj-$(CONFIG_MCPN765)
+=
mcpn765
_setup.o mcpn765_pci
.o
obj-$(CONFIG_MCPN765)
+=
mcpn765.o
obj-$(CONFIG_MENF1)
+=
menf1_setup.o menf1_pci.o
obj-$(CONFIG_MVME5100)
+=
mvme5100_setup.o mvme5100_pci.o
obj-$(CONFIG_PAL4)
+=
pal4_setup.o pal4_pci.o
...
...
arch/ppc/platforms/mcpn765
_setup
.c
→
arch/ppc/platforms/mcpn765.c
View file @
16fe57cb
/*
* arch/ppc/platforms/mcpn765
_setup
.c
* arch/ppc/platforms/mcpn765.c
*
* Board setup routines for the Motorola MCG MCPN765 cPCI Board.
*
* Author: Mark A. Greer
* mgreer@mvista.com
*
* Modified by Randy Vinson (rvinson@mvista.com)
*
* 2001-2002 (c) MontaVista, Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
...
...
@@ -28,18 +30,22 @@
#include <linux/console.h>
#include <linux/delay.h>
#include <linux/irq.h>
#if 0
#include <linux/ide.h>
#endif
#include <linux/seq_file.h>
#include <linux/root_dev.h>
#include <linux/serial.h>
#include <linux/tty.h>
/* for linux/serial_core.h */
#include <linux/serial_core.h>
#include <linux/slab.h>
#include <asm/system.h>
#include <asm/pgtable.h>
#include <asm/page.h>
#include <asm/time.h>
#include <asm/dma.h>
#include <asm/byteorder.h>
#include <asm/io.h>
#include <asm/machdep.h>
#include <asm/prom.h>
...
...
@@ -48,8 +54,10 @@
#include <asm/i8259.h>
#include <asm/todc.h>
#include <asm/pci-bridge.h>
#include <asm/irq.h>
#include <asm/uaccess.h>
#include <asm/bootinfo.h>
#include <asm/
pplus
.h>
#include <asm/
hawk
.h>
#include <asm/kgdb.h>
#include "mcpn765.h"
...
...
@@ -75,69 +83,229 @@ static u_char mcpn765_openpic_initsenses[] __initdata = {
(
IRQ_SENSE_LEVEL
|
IRQ_POLARITY_NEGATIVE
),
/* 31: RTC Alarm */
};
extern
void
mcpn765_set_VIA_IDE_native
(
void
);
extern
u_int
openpic_irq
(
void
);
extern
char
cmd_line
[];
extern
void
gen550_progress
(
char
*
,
unsigned
short
);
extern
void
gen550_init
(
int
,
struct
uart_port
*
);
int
use_of_interrupt_tree
=
0
;
static
void
mcpn765_halt
(
void
);
TODC_ALLOC
();
#if defined(CONFIG_SERIAL_8250) && \
(defined(CONFIG_KGDB) || defined(CONFIG_SERIAL_TEXT_DEBUG))
static
void
__init
mcpn765_early_serial_map
(
void
)
/*
* Motorola MCG MCPN765 interrupt routing.
*/
static
inline
int
mcpn765_map_irq
(
struct
pci_dev
*
dev
,
unsigned
char
idsel
,
unsigned
char
pin
)
{
struct
uart_port
serial_req
;
static
char
pci_irq_table
[][
4
]
=
/*
* PCI IDSEL/INTPIN->INTLINE
* A B C D
*/
{
{
14
,
0
,
0
,
0
},
/* IDSEL 11 - have to manually set */
{
0
,
0
,
0
,
0
},
/* IDSEL 12 - unused */
{
0
,
0
,
0
,
0
},
/* IDSEL 13 - unused */
{
18
,
0
,
0
,
0
},
/* IDSEL 14 - Enet 0 */
{
0
,
0
,
0
,
0
},
/* IDSEL 15 - unused */
{
25
,
26
,
27
,
28
},
/* IDSEL 16 - PMC Slot 1 */
{
28
,
25
,
26
,
27
},
/* IDSEL 17 - PMC Slot 2 */
{
0
,
0
,
0
,
0
},
/* IDSEL 18 - PMC 2B Connector XXXX */
{
29
,
0
,
0
,
0
},
/* IDSEL 19 - Enet 1 */
{
20
,
0
,
0
,
0
},
/* IDSEL 20 - 21554 cPCI bridge */
};
const
long
min_idsel
=
11
,
max_idsel
=
20
,
irqs_per_slot
=
4
;
return
PCI_IRQ_TABLE_LOOKUP
;
}
/* Setup serial port access */
memset
(
&
serial_req
,
0
,
sizeof
(
serial_req
));
serial_req
.
uartclk
=
UART_CLK
;
serial_req
.
irq
=
17
;
serial_req
.
flags
=
STD_COM_FLAGS
;
serial_req
.
iotype
=
SERIAL_IO_MEM
;
serial_req
.
membase
=
(
u_char
*
)
MCPN765_SERIAL_1
;
serial_req
.
regshift
=
4
;
void
__init
mcpn765_set_VIA_IDE_legacy
(
void
)
{
unsigned
short
vend
,
dev
;
early_read_config_word
(
0
,
0
,
PCI_DEVFN
(
0xb
,
1
),
PCI_VENDOR_ID
,
&
vend
);
early_read_config_word
(
0
,
0
,
PCI_DEVFN
(
0xb
,
1
),
PCI_DEVICE_ID
,
&
dev
);
if
((
vend
==
PCI_VENDOR_ID_VIA
)
&&
(
dev
==
PCI_DEVICE_ID_VIA_82C586_1
))
{
unsigned
char
temp
;
/* put back original "standard" port base addresses */
early_write_config_dword
(
0
,
0
,
PCI_DEVFN
(
0xb
,
1
),
PCI_BASE_ADDRESS_0
,
0x1f1
);
early_write_config_dword
(
0
,
0
,
PCI_DEVFN
(
0xb
,
1
),
PCI_BASE_ADDRESS_1
,
0x3f5
);
early_write_config_dword
(
0
,
0
,
PCI_DEVFN
(
0xb
,
1
),
PCI_BASE_ADDRESS_2
,
0x171
);
early_write_config_dword
(
0
,
0
,
PCI_DEVFN
(
0xb
,
1
),
PCI_BASE_ADDRESS_3
,
0x375
);
early_write_config_dword
(
0
,
0
,
PCI_DEVFN
(
0xb
,
1
),
PCI_BASE_ADDRESS_4
,
0xcc01
);
/* put into legacy mode */
early_read_config_byte
(
0
,
0
,
PCI_DEVFN
(
0xb
,
1
),
PCI_CLASS_PROG
,
&
temp
);
temp
&=
~
0x05
;
early_write_config_byte
(
0
,
0
,
PCI_DEVFN
(
0xb
,
1
),
PCI_CLASS_PROG
,
temp
);
}
}
gen550_init
(
0
,
&
serial_req
);
void
mcpn765_set_VIA_IDE_native
(
void
)
{
unsigned
short
vend
,
dev
;
if
(
early_serial_setup
(
&
serial_req
)
!=
0
)
printk
(
KERN_ERR
"Early serial init of port 0 failed
\n
"
);
early_read_config_word
(
0
,
0
,
PCI_DEVFN
(
0xb
,
1
),
PCI_VENDOR_ID
,
&
vend
);
early_read_config_word
(
0
,
0
,
PCI_DEVFN
(
0xb
,
1
),
PCI_DEVICE_ID
,
&
dev
);
/* Assume early_serial_setup() doesn't modify serial_req */
serial_req
.
line
=
1
;
serial_req
.
irq
=
17
;
serial_req
.
membase
=
(
u_char
*
)
MCPN765_SERIAL_2
;
if
((
vend
==
PCI_VENDOR_ID_VIA
)
&&
(
dev
==
PCI_DEVICE_ID_VIA_82C586_1
))
{
gen550_init
(
1
,
&
serial_req
)
;
unsigned
char
temp
;
if
(
early_serial_setup
(
&
serial_req
)
!=
0
)
printk
(
KERN_ERR
"Early serial init of port 1 failed
\n
"
);
/* put into native mode */
early_read_config_byte
(
0
,
0
,
PCI_DEVFN
(
0xb
,
1
),
PCI_CLASS_PROG
,
&
temp
);
temp
|=
0x05
;
early_write_config_byte
(
0
,
0
,
PCI_DEVFN
(
0xb
,
1
),
PCI_CLASS_PROG
,
temp
);
}
}
/*
* Initialize the VIA 82c586b.
*/
static
void
__init
mcpn765_setup_via_82c586b
(
void
)
{
struct
pci_dev
*
dev
;
u_char
c
;
/* Assume early_serial_setup() doesn't modify serial_req */
serial_req
.
line
=
2
;
serial_req
.
irq
=
17
;
serial_req
.
membase
=
(
u_char
*
)
MCPN765_SERIAL_3
;
if
((
dev
=
pci_find_device
(
PCI_VENDOR_ID_VIA
,
PCI_DEVICE_ID_VIA_82C586_0
,
NULL
))
==
NULL
)
{
printk
(
"No VIA ISA bridge found
\n
"
);
mcpn765_halt
();
/* NOTREACHED */
}
gen550_init
(
2
,
&
serial_req
);
/*
* If the firmware left the EISA 4d0/4d1 ports enabled, make sure
* IRQ 14 is set for edge.
*/
pci_read_config_byte
(
dev
,
0x47
,
&
c
);
if
(
early_serial_setup
(
&
serial_req
)
!=
0
)
printk
(
KERN_ERR
"Early serial init of port 2 failed
\n
"
);
if
(
c
&
(
1
<<
5
))
{
c
=
inb
(
0x4d1
);
c
&=
~
(
1
<<
6
);
outb
(
c
,
0x4d1
);
}
/* Assume early_serial_setup() doesn't modify serial_req */
serial_req
.
line
=
3
;
serial_req
.
irq
=
17
;
serial_req
.
membase
=
(
u_char
*
)
MCPN765_SERIAL_4
;
/* Disable PNP IRQ routing since we use the Hawk's MPIC */
pci_write_config_dword
(
dev
,
0x54
,
0
);
pci_write_config_byte
(
dev
,
0x58
,
0
);
gen550_init
(
3
,
&
serial_req
);
if
(
early_serial_setup
(
&
serial_req
)
!=
0
)
printk
(
KERN_ERR
"Early serial init of port 3 failed
\n
"
);
if
((
dev
=
pci_find_device
(
PCI_VENDOR_ID_VIA
,
PCI_DEVICE_ID_VIA_82C586_1
,
NULL
))
==
NULL
)
{
printk
(
"No VIA ISA bridge found
\n
"
);
mcpn765_halt
();
/* NOTREACHED */
}
/*
* PPCBug doesn't set the enable bits for the IDE device.
* Turn them on now.
*/
pci_read_config_byte
(
dev
,
0x40
,
&
c
);
c
|=
0x03
;
pci_write_config_byte
(
dev
,
0x40
,
c
);
return
;
}
#endif
void
__init
mcpn765_pcibios_fixup
(
void
)
{
/* Do MCPN765 board specific initialization. */
mcpn765_setup_via_82c586b
();
}
void
__init
mcpn765_find_bridges
(
void
)
{
struct
pci_controller
*
hose
;
hose
=
pcibios_alloc_controller
();
if
(
!
hose
)
return
;
hose
->
first_busno
=
0
;
hose
->
last_busno
=
0xff
;
hose
->
pci_mem_offset
=
MCPN765_PCI_PHY_MEM_OFFSET
;
pci_init_resource
(
&
hose
->
io_resource
,
MCPN765_PCI_IO_START
,
MCPN765_PCI_IO_END
,
IORESOURCE_IO
,
"PCI host bridge"
);
pci_init_resource
(
&
hose
->
mem_resources
[
0
],
MCPN765_PCI_MEM_START
,
MCPN765_PCI_MEM_END
,
IORESOURCE_MEM
,
"PCI host bridge"
);
hose
->
io_space
.
start
=
MCPN765_PCI_IO_START
;
hose
->
io_space
.
end
=
MCPN765_PCI_IO_END
;
hose
->
mem_space
.
start
=
MCPN765_PCI_MEM_START
;
hose
->
mem_space
.
end
=
MCPN765_PCI_MEM_END
-
HAWK_MPIC_SIZE
;
if
(
hawk_init
(
hose
,
MCPN765_HAWK_PPC_REG_BASE
,
MCPN765_PROC_PCI_MEM_START
,
MCPN765_PROC_PCI_MEM_END
-
HAWK_MPIC_SIZE
,
MCPN765_PROC_PCI_IO_START
,
MCPN765_PROC_PCI_IO_END
,
MCPN765_PCI_MEM_END
-
HAWK_MPIC_SIZE
+
1
)
!=
0
)
{
printk
(
"Could not initialize HAWK bridge
\n
"
);
}
/* VIA IDE BAR decoders are only 16-bits wide. PCI Auto Config
* will reassign the bars outside of 16-bit I/O space, which will
* "break" things. To prevent this, we'll set the IDE chip into
* legacy mode and seed the bars with their legacy addresses (in 16-bit
* I/O space). The Auto Config code will skip the IDE contoller in
* legacy mode, so our bar values will stick.
*/
mcpn765_set_VIA_IDE_legacy
();
hose
->
last_busno
=
pciauto_bus_scan
(
hose
,
hose
->
first_busno
);
/* Now that we've got 16-bit addresses in the bars, we can switch the
* IDE controller back into native mode so we can do "modern" resource
* and interrupt management.
*/
mcpn765_set_VIA_IDE_native
();
ppc_md
.
pcibios_fixup
=
mcpn765_pcibios_fixup
;
ppc_md
.
pcibios_fixup_bus
=
NULL
;
ppc_md
.
pci_swizzle
=
common_swizzle
;
ppc_md
.
pci_map_irq
=
mcpn765_map_irq
;
return
;
}
static
void
__init
mcpn765_setup_arch
(
void
)
{
...
...
@@ -190,39 +358,9 @@ mcpn765_setup_arch(void)
return
;
}
/*
* Initialize the VIA 82c586b.
*/
static
void
__init
mcpn765_setup_via_82c586b
(
void
)
{
struct
pci_dev
*
dev
;
u_char
c
;
if
((
dev
=
pci_find_device
(
PCI_VENDOR_ID_VIA
,
PCI_DEVICE_ID_VIA_82C586_1
,
NULL
))
==
NULL
)
{
printk
(
"No VIA ISA bridge found
\n
"
);
mcpn765_halt
();
/* NOTREACHED */
}
/*
* PPCBug doesn't set the enable bits for the IDE device.
* Turn them on now.
*/
pci_read_config_byte
(
dev
,
0x40
,
&
c
);
c
|=
0x03
;
pci_write_config_byte
(
dev
,
0x40
,
c
);
return
;
}
static
void
__init
mcpn765_init2
(
void
)
{
/* Do MCPN765 board specific initialization. */
mcpn765_setup_via_82c586b
();
request_region
(
0x00
,
0x20
,
"dma1"
);
request_region
(
0x20
,
0x20
,
"pic1"
);
...
...
@@ -271,7 +409,7 @@ mcpn765_irq_canonicalize(u32 irq)
static
unsigned
long
__init
mcpn765_find_end_of_memory
(
void
)
{
return
pplus
_get_mem_size
(
MCPN765_HAWK_SMC_BASE
);
return
hawk
_get_mem_size
(
MCPN765_HAWK_SMC_BASE
);
}
static
void
__init
...
...
@@ -285,6 +423,9 @@ mcpn765_reset_board(void)
{
local_irq_disable
();
/* set VIA IDE controller into native mode */
mcpn765_set_VIA_IDE_native
();
/* Set exception prefix high - to the firmware */
_nmask_and_or_msr
(
0
,
MSR_IP
);
...
...
@@ -328,92 +469,6 @@ mcpn765_show_cpuinfo(struct seq_file *m)
return
0
;
}
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
/*
* IDE support.
*/
static
int
mcpn765_ide_ports_known
=
0
;
static
unsigned
long
mcpn765_ide_regbase
[
MAX_HWIFS
];
static
unsigned
long
mcpn765_ide_ctl_regbase
[
MAX_HWIFS
];
static
unsigned
long
mcpn765_idedma_regbase
;
static
void
mcpn765_ide_probe
(
void
)
{
struct
pci_dev
*
pdev
=
pci_find_device
(
PCI_VENDOR_ID_VIA
,
PCI_DEVICE_ID_VIA_82C586_1
,
NULL
);
if
(
pdev
)
{
mcpn765_ide_regbase
[
0
]
=
pdev
->
resource
[
0
].
start
;
mcpn765_ide_regbase
[
1
]
=
pdev
->
resource
[
2
].
start
;
mcpn765_ide_ctl_regbase
[
0
]
=
pdev
->
resource
[
1
].
start
;
mcpn765_ide_ctl_regbase
[
1
]
=
pdev
->
resource
[
3
].
start
;
mcpn765_idedma_regbase
=
pdev
->
resource
[
4
].
start
;
}
mcpn765_ide_ports_known
=
1
;
return
;
}
static
int
mcpn765_ide_default_irq
(
unsigned
long
base
)
{
if
(
mcpn765_ide_ports_known
==
0
)
mcpn765_ide_probe
();
if
(
base
==
mcpn765_ide_regbase
[
0
])
return
14
;
else
if
(
base
==
mcpn765_ide_regbase
[
1
])
return
14
;
else
return
0
;
}
static
unsigned
long
mcpn765_ide_default_io_base
(
int
index
)
{
if
(
mcpn765_ide_ports_known
==
0
)
mcpn765_ide_probe
();
return
mcpn765_ide_regbase
[
index
];
}
static
void
__init
mcpn765_ide_init_hwif_ports
(
hw_regs_t
*
hw
,
unsigned
long
data_port
,
unsigned
long
ctrl_port
,
int
*
irq
)
{
unsigned
long
reg
=
data_port
;
uint
alt_status_base
;
int
i
;
for
(
i
=
IDE_DATA_OFFSET
;
i
<=
IDE_STATUS_OFFSET
;
i
++
)
{
hw
->
io_ports
[
i
]
=
reg
++
;
}
if
(
data_port
==
mcpn765_ide_regbase
[
0
])
{
alt_status_base
=
mcpn765_ide_ctl_regbase
[
0
]
+
2
;
hw
->
irq
=
14
;
}
else
if
(
data_port
==
mcpn765_ide_regbase
[
1
])
{
alt_status_base
=
mcpn765_ide_ctl_regbase
[
1
]
+
2
;
hw
->
irq
=
14
;
}
else
{
alt_status_base
=
0
;
hw
->
irq
=
0
;
}
if
(
ctrl_port
)
hw
->
io_ports
[
IDE_CONTROL_OFFSET
]
=
ctrl_port
;
else
hw
->
io_ports
[
IDE_CONTROL_OFFSET
]
=
alt_status_base
;
if
(
irq
!=
NULL
)
*
irq
=
hw
->
irq
;
return
;
}
#endif
/*
* Set BAT 3 to map 0xf0000000 to end of physical memory space.
*/
...
...
@@ -467,21 +522,11 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md
.
heartbeat_reset
=
0
;
ppc_md
.
heartbeat_count
=
0
;
#if defined(CONFIG_SERIAL_8250) && \
(defined(CONFIG_KGDB) || defined(CONFIG_SERIAL_TEXT_DEBUG))
mcpn765_early_serial_map
();
#ifdef CONFIG_KGDB
ppc_md
.
kgdb_map_scc
=
gen550_kgdb_map_scc
;
#endif
#ifdef CONFIG_SERIAL_TEXT_DEBUG
ppc_md
.
progress
=
gen550_progress
;
#endif
#endif
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
ppc_ide_md
.
default_irq
=
mcpn765_ide_default_irq
;
ppc_ide_md
.
default_io_base
=
mcpn765_ide_default_io_base
;
ppc_ide_md
.
ide_init_hwif
=
mcpn765_ide_init_hwif_ports
;
#ifdef CONFIG_KGDB
ppc_md
.
kgdb_map_scc
=
gen550_kgdb_map_scc
;
#endif
return
;
...
...
arch/ppc/platforms/mcpn765_pci.c
deleted
100644 → 0
View file @
af077e54
/*
* arch/ppc/platforms/mcpn765_pci.c
*
* PCI setup routines for the Motorola MCG MCPN765 cPCI board.
*
* Author: Mark A. Greer
* mgreer@mvista.com
*
* 2001 (c) MontaVista, Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <asm/byteorder.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/uaccess.h>
#include <asm/machdep.h>
#include <asm/pci-bridge.h>
#include <asm/pplus.h>
#include "mcpn765.h"
/*
* Motorola MCG MCPN765 interrupt routing.
*/
static
inline
int
mcpn765_map_irq
(
struct
pci_dev
*
dev
,
unsigned
char
idsel
,
unsigned
char
pin
)
{
static
char
pci_irq_table
[][
4
]
=
/*
* PCI IDSEL/INTPIN->INTLINE
* A B C D
*/
{
{
14
,
0
,
0
,
0
},
/* IDSEL 11 - have to manually set */
{
0
,
0
,
0
,
0
},
/* IDSEL 12 - unused */
{
0
,
0
,
0
,
0
},
/* IDSEL 13 - unused */
{
18
,
0
,
0
,
0
},
/* IDSEL 14 - Enet 0 */
{
0
,
0
,
0
,
0
},
/* IDSEL 15 - unused */
{
25
,
26
,
27
,
28
},
/* IDSEL 16 - PMC Slot 1 */
{
28
,
25
,
26
,
27
},
/* IDSEL 17 - PMC Slot 2 */
{
0
,
0
,
0
,
0
},
/* IDSEL 18 - PMC 2B Connector XXXX */
{
29
,
0
,
0
,
0
},
/* IDSEL 19 - Enet 1 */
{
20
,
0
,
0
,
0
},
/* IDSEL 20 - 21554 cPCI bridge */
};
const
long
min_idsel
=
11
,
max_idsel
=
20
,
irqs_per_slot
=
4
;
return
PCI_IRQ_TABLE_LOOKUP
;
}
void
__init
mcpn765_find_bridges
(
void
)
{
struct
pci_controller
*
hose
;
hose
=
pcibios_alloc_controller
();
if
(
!
hose
)
return
;
hose
->
first_busno
=
0
;
hose
->
last_busno
=
0xff
;
hose
->
pci_mem_offset
=
MCPN765_PCI_PHY_MEM_OFFSET
;
pci_init_resource
(
&
hose
->
io_resource
,
MCPN765_PCI_IO_START
,
MCPN765_PCI_IO_END
,
IORESOURCE_IO
,
"PCI host bridge"
);
pci_init_resource
(
&
hose
->
mem_resources
[
0
],
MCPN765_PCI_MEM_START
,
MCPN765_PCI_MEM_END
,
IORESOURCE_MEM
,
"PCI host bridge"
);
hose
->
io_space
.
start
=
MCPN765_PCI_IO_START
;
hose
->
io_space
.
end
=
MCPN765_PCI_IO_END
;
hose
->
mem_space
.
start
=
MCPN765_PCI_MEM_START
;
hose
->
mem_space
.
end
=
MCPN765_PCI_MEM_END
-
PPLUS_MPIC_SIZE
;
if
(
pplus_init
(
hose
,
MCPN765_HAWK_PPC_REG_BASE
,
MCPN765_PROC_PCI_MEM_START
,
MCPN765_PROC_PCI_MEM_END
-
PPLUS_MPIC_SIZE
,
MCPN765_PROC_PCI_IO_START
,
MCPN765_PROC_PCI_IO_END
,
MCPN765_PCI_MEM_END
-
PPLUS_MPIC_SIZE
+
1
)
!=
0
)
{
printk
(
"Could not initialize HAWK bridge
\n
"
);
}
hose
->
last_busno
=
pciauto_bus_scan
(
hose
,
hose
->
first_busno
);
ppc_md
.
pcibios_fixup
=
NULL
;
ppc_md
.
pcibios_fixup_bus
=
NULL
;
ppc_md
.
pci_swizzle
=
common_swizzle
;
ppc_md
.
pci_map_irq
=
mcpn765_map_irq
;
return
;
}
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