aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2007-02-12 05:29:04 -0500
committerPaul Mackerras <paulus@samba.org>2007-02-12 23:35:52 -0500
commitab9367e38fa97c2ed7f72fd5fa29d0d70d58df89 (patch)
tree5d6d4fe9545100b867533631572f10e6bd602d78
parent7ac9a13717c10c5ee074a6b23096c8d277fa5712 (diff)
[POWERPC] ppc: Add support for AMCC Taishan 440GX eval board
This patch adds support for the AMCC Taishan PPC440GX evaluation board. This is still an arch/ppc port. I'm aware that the move of 4xx to arch/powerpc is making good progress right now. So this patch is mainly intended to make the Taishan support available for the community right now. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/ppc/configs/taishan_defconfig1077
-rw-r--r--arch/ppc/platforms/4xx/Kconfig10
-rw-r--r--arch/ppc/platforms/4xx/Makefile1
-rw-r--r--arch/ppc/platforms/4xx/taishan.c395
-rw-r--r--arch/ppc/platforms/4xx/taishan.h67
-rw-r--r--arch/ppc/syslib/Makefile1
-rw-r--r--include/asm-ppc/ibm4xx.h4
7 files changed, 1553 insertions, 2 deletions
diff --git a/arch/ppc/configs/taishan_defconfig b/arch/ppc/configs/taishan_defconfig
new file mode 100644
index 000000000000..1ca0204267b1
--- /dev/null
+++ b/arch/ppc/configs/taishan_defconfig
@@ -0,0 +1,1077 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Mon Feb 12 11:11:58 2007
5#
6CONFIG_MMU=y
7CONFIG_GENERIC_HARDIRQS=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_ARCH_HAS_ILOG2_U32=y
10# CONFIG_ARCH_HAS_ILOG2_U64 is not set
11CONFIG_GENERIC_HWEIGHT=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y
13CONFIG_PPC=y
14CONFIG_PPC32=y
15CONFIG_GENERIC_NVRAM=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y
17CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
18CONFIG_ARCH_MAY_HAVE_PC_FDC=y
19CONFIG_GENERIC_BUG=y
20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
21
22#
23# Code maturity level options
24#
25CONFIG_EXPERIMENTAL=y
26CONFIG_BROKEN_ON_SMP=y
27CONFIG_INIT_ENV_ARG_LIMIT=32
28
29#
30# General setup
31#
32CONFIG_LOCALVERSION=""
33CONFIG_LOCALVERSION_AUTO=y
34CONFIG_SWAP=y
35CONFIG_SYSVIPC=y
36# CONFIG_IPC_NS is not set
37# CONFIG_POSIX_MQUEUE is not set
38# CONFIG_BSD_PROCESS_ACCT is not set
39# CONFIG_TASKSTATS is not set
40# CONFIG_UTS_NS is not set
41# CONFIG_AUDIT is not set
42# CONFIG_IKCONFIG is not set
43CONFIG_SYSFS_DEPRECATED=y
44# CONFIG_RELAY is not set
45CONFIG_INITRAMFS_SOURCE=""
46# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
47CONFIG_SYSCTL=y
48CONFIG_EMBEDDED=y
49CONFIG_SYSCTL_SYSCALL=y
50CONFIG_KALLSYMS=y
51# CONFIG_KALLSYMS_ALL is not set
52# CONFIG_KALLSYMS_EXTRA_PASS is not set
53# CONFIG_HOTPLUG is not set
54CONFIG_PRINTK=y
55CONFIG_BUG=y
56CONFIG_ELF_CORE=y
57CONFIG_BASE_FULL=y
58CONFIG_FUTEX=y
59CONFIG_EPOLL=y
60CONFIG_SHMEM=y
61CONFIG_SLAB=y
62CONFIG_VM_EVENT_COUNTERS=y
63CONFIG_RT_MUTEXES=y
64# CONFIG_TINY_SHMEM is not set
65CONFIG_BASE_SMALL=0
66# CONFIG_SLOB is not set
67
68#
69# Loadable module support
70#
71CONFIG_MODULES=y
72CONFIG_MODULE_UNLOAD=y
73# CONFIG_MODULE_FORCE_UNLOAD is not set
74# CONFIG_MODVERSIONS is not set
75# CONFIG_MODULE_SRCVERSION_ALL is not set
76CONFIG_KMOD=y
77
78#
79# Block layer
80#
81CONFIG_BLOCK=y
82# CONFIG_LBD is not set
83# CONFIG_BLK_DEV_IO_TRACE is not set
84# CONFIG_LSF is not set
85
86#
87# IO Schedulers
88#
89CONFIG_IOSCHED_NOOP=y
90CONFIG_IOSCHED_AS=y
91CONFIG_IOSCHED_DEADLINE=y
92CONFIG_IOSCHED_CFQ=y
93CONFIG_DEFAULT_AS=y
94# CONFIG_DEFAULT_DEADLINE is not set
95# CONFIG_DEFAULT_CFQ is not set
96# CONFIG_DEFAULT_NOOP is not set
97CONFIG_DEFAULT_IOSCHED="anticipatory"
98
99#
100# Processor
101#
102# CONFIG_6xx is not set
103# CONFIG_40x is not set
104CONFIG_44x=y
105# CONFIG_8xx is not set
106# CONFIG_E200 is not set
107# CONFIG_E500 is not set
108CONFIG_PPC_DCR_NATIVE=y
109CONFIG_PPC_DCR=y
110CONFIG_BOOKE=y
111CONFIG_PTE_64BIT=y
112CONFIG_PHYS_64BIT=y
113# CONFIG_MATH_EMULATION is not set
114# CONFIG_KEXEC is not set
115# CONFIG_CPU_FREQ is not set
116CONFIG_4xx=y
117CONFIG_WANT_EARLY_SERIAL=y
118
119#
120# IBM 4xx options
121#
122# CONFIG_BAMBOO is not set
123# CONFIG_EBONY is not set
124# CONFIG_LUAN is not set
125# CONFIG_YUCCA is not set
126# CONFIG_OCOTEA is not set
127CONFIG_TAISHAN=y
128CONFIG_440GX=y
129CONFIG_440A=y
130CONFIG_IBM_OCP=y
131CONFIG_IBM_EMAC4=y
132CONFIG_PPC4xx_DMA=y
133CONFIG_PPC4xx_EDMA=y
134CONFIG_PPC_GEN550=y
135CONFIG_NOT_COHERENT_CACHE=y
136
137#
138# Platform options
139#
140# CONFIG_PC_KEYBOARD is not set
141# CONFIG_HIGHMEM is not set
142CONFIG_ARCH_POPULATES_NODE_MAP=y
143# CONFIG_HZ_100 is not set
144CONFIG_HZ_250=y
145# CONFIG_HZ_300 is not set
146# CONFIG_HZ_1000 is not set
147CONFIG_HZ=250
148CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT_VOLUNTARY is not set
150# CONFIG_PREEMPT is not set
151CONFIG_SELECT_MEMORY_MODEL=y
152CONFIG_FLATMEM_MANUAL=y
153# CONFIG_DISCONTIGMEM_MANUAL is not set
154# CONFIG_SPARSEMEM_MANUAL is not set
155CONFIG_FLATMEM=y
156CONFIG_FLAT_NODE_MEM_MAP=y
157# CONFIG_SPARSEMEM_STATIC is not set
158CONFIG_SPLIT_PTLOCK_CPUS=4
159CONFIG_RESOURCES_64BIT=y
160CONFIG_ZONE_DMA_FLAG=1
161CONFIG_BINFMT_ELF=y
162# CONFIG_BINFMT_MISC is not set
163CONFIG_CMDLINE_BOOL=y
164CONFIG_CMDLINE="ip=on console=ttyS0,115200"
165CONFIG_SECCOMP=y
166CONFIG_ISA_DMA_API=y
167
168#
169# Bus options
170#
171CONFIG_ZONE_DMA=y
172# CONFIG_PPC_I8259 is not set
173CONFIG_PPC_INDIRECT_PCI=y
174CONFIG_PCI=y
175CONFIG_PCI_DOMAINS=y
176# CONFIG_PCI_DEBUG is not set
177
178#
179# PCCARD (PCMCIA/CardBus) support
180#
181
182#
183# Advanced setup
184#
185# CONFIG_ADVANCED_OPTIONS is not set
186
187#
188# Default settings for advanced configuration options are used
189#
190CONFIG_HIGHMEM_START=0xfe000000
191CONFIG_LOWMEM_SIZE=0x30000000
192CONFIG_KERNEL_START=0xc0000000
193CONFIG_TASK_SIZE=0x80000000
194CONFIG_CONSISTENT_START=0xff100000
195CONFIG_CONSISTENT_SIZE=0x00200000
196CONFIG_BOOT_LOAD=0x01000000
197
198#
199# Networking
200#
201CONFIG_NET=y
202
203#
204# Networking options
205#
206# CONFIG_NETDEBUG is not set
207CONFIG_PACKET=y
208# CONFIG_PACKET_MMAP is not set
209CONFIG_UNIX=y
210CONFIG_XFRM=y
211# CONFIG_XFRM_USER is not set
212# CONFIG_XFRM_SUB_POLICY is not set
213# CONFIG_XFRM_MIGRATE is not set
214# CONFIG_NET_KEY is not set
215CONFIG_INET=y
216# CONFIG_IP_MULTICAST is not set
217CONFIG_IP_ADVANCED_ROUTER=y
218CONFIG_ASK_IP_FIB_HASH=y
219# CONFIG_IP_FIB_TRIE is not set
220CONFIG_IP_FIB_HASH=y
221# CONFIG_IP_MULTIPLE_TABLES is not set
222# CONFIG_IP_ROUTE_MULTIPATH is not set
223# CONFIG_IP_ROUTE_VERBOSE is not set
224CONFIG_IP_PNP=y
225# CONFIG_IP_PNP_DHCP is not set
226CONFIG_IP_PNP_BOOTP=y
227# CONFIG_IP_PNP_RARP is not set
228# CONFIG_NET_IPIP is not set
229# CONFIG_NET_IPGRE is not set
230# CONFIG_ARPD is not set
231# CONFIG_SYN_COOKIES is not set
232# CONFIG_INET_AH is not set
233# CONFIG_INET_ESP is not set
234# CONFIG_INET_IPCOMP is not set
235# CONFIG_INET_XFRM_TUNNEL is not set
236# CONFIG_INET_TUNNEL is not set
237CONFIG_INET_XFRM_MODE_TRANSPORT=y
238CONFIG_INET_XFRM_MODE_TUNNEL=y
239CONFIG_INET_XFRM_MODE_BEET=y
240CONFIG_INET_DIAG=y
241CONFIG_INET_TCP_DIAG=y
242# CONFIG_TCP_CONG_ADVANCED is not set
243CONFIG_TCP_CONG_CUBIC=y
244CONFIG_DEFAULT_TCP_CONG="cubic"
245# CONFIG_TCP_MD5SIG is not set
246# CONFIG_IPV6 is not set
247# CONFIG_INET6_XFRM_TUNNEL is not set
248# CONFIG_INET6_TUNNEL is not set
249# CONFIG_NETWORK_SECMARK is not set
250# CONFIG_NETFILTER is not set
251
252#
253# DCCP Configuration (EXPERIMENTAL)
254#
255# CONFIG_IP_DCCP is not set
256
257#
258# SCTP Configuration (EXPERIMENTAL)
259#
260# CONFIG_IP_SCTP is not set
261
262#
263# TIPC Configuration (EXPERIMENTAL)
264#
265# CONFIG_TIPC is not set
266# CONFIG_ATM is not set
267CONFIG_BRIDGE=y
268# CONFIG_VLAN_8021Q is not set
269# CONFIG_DECNET is not set
270CONFIG_LLC=y
271# CONFIG_LLC2 is not set
272# CONFIG_IPX is not set
273# CONFIG_ATALK is not set
274# CONFIG_X25 is not set
275# CONFIG_LAPB is not set
276# CONFIG_ECONET is not set
277# CONFIG_WAN_ROUTER is not set
278
279#
280# QoS and/or fair queueing
281#
282# CONFIG_NET_SCHED is not set
283
284#
285# Network testing
286#
287# CONFIG_NET_PKTGEN is not set
288# CONFIG_HAMRADIO is not set
289# CONFIG_IRDA is not set
290# CONFIG_BT is not set
291# CONFIG_IEEE80211 is not set
292
293#
294# Device Drivers
295#
296
297#
298# Generic Driver Options
299#
300# CONFIG_STANDALONE is not set
301CONFIG_PREVENT_FIRMWARE_BUILD=y
302# CONFIG_DEBUG_DRIVER is not set
303# CONFIG_DEBUG_DEVRES is not set
304# CONFIG_SYS_HYPERVISOR is not set
305
306#
307# Connector - unified userspace <-> kernelspace linker
308#
309# CONFIG_CONNECTOR is not set
310
311#
312# Memory Technology Devices (MTD)
313#
314CONFIG_MTD=y
315# CONFIG_MTD_DEBUG is not set
316CONFIG_MTD_CONCAT=y
317CONFIG_MTD_PARTITIONS=y
318# CONFIG_MTD_REDBOOT_PARTS is not set
319CONFIG_MTD_CMDLINE_PARTS=y
320
321#
322# User Modules And Translation Layers
323#
324CONFIG_MTD_CHAR=y
325CONFIG_MTD_BLKDEVS=y
326CONFIG_MTD_BLOCK=y
327# CONFIG_FTL is not set
328# CONFIG_NFTL is not set
329# CONFIG_INFTL is not set
330# CONFIG_RFD_FTL is not set
331# CONFIG_SSFDC is not set
332
333#
334# RAM/ROM/Flash chip drivers
335#
336CONFIG_MTD_CFI=y
337CONFIG_MTD_JEDECPROBE=y
338CONFIG_MTD_GEN_PROBE=y
339CONFIG_MTD_CFI_ADV_OPTIONS=y
340CONFIG_MTD_CFI_NOSWAP=y
341# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
342# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
343# CONFIG_MTD_CFI_GEOMETRY is not set
344CONFIG_MTD_MAP_BANK_WIDTH_1=y
345CONFIG_MTD_MAP_BANK_WIDTH_2=y
346CONFIG_MTD_MAP_BANK_WIDTH_4=y
347# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
348# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
349# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
350CONFIG_MTD_CFI_I1=y
351CONFIG_MTD_CFI_I2=y
352# CONFIG_MTD_CFI_I4 is not set
353# CONFIG_MTD_CFI_I8 is not set
354# CONFIG_MTD_OTP is not set
355# CONFIG_MTD_CFI_INTELEXT is not set
356CONFIG_MTD_CFI_AMDSTD=y
357# CONFIG_MTD_CFI_STAA is not set
358CONFIG_MTD_CFI_UTIL=y
359# CONFIG_MTD_RAM is not set
360# CONFIG_MTD_ROM is not set
361# CONFIG_MTD_ABSENT is not set
362# CONFIG_MTD_OBSOLETE_CHIPS is not set
363
364#
365# Mapping drivers for chip access
366#
367CONFIG_MTD_COMPLEX_MAPPINGS=y
368CONFIG_MTD_PHYSMAP=y
369CONFIG_MTD_PHYSMAP_START=0x8000000
370CONFIG_MTD_PHYSMAP_LEN=0x0
371CONFIG_MTD_PHYSMAP_BANKWIDTH=2
372# CONFIG_MTD_PCI is not set
373# CONFIG_MTD_PLATRAM is not set
374
375#
376# Self-contained MTD device drivers
377#
378# CONFIG_MTD_PMC551 is not set
379# CONFIG_MTD_SLRAM is not set
380# CONFIG_MTD_PHRAM is not set
381# CONFIG_MTD_MTDRAM is not set
382# CONFIG_MTD_BLOCK2MTD is not set
383
384#
385# Disk-On-Chip Device Drivers
386#
387# CONFIG_MTD_DOC2000 is not set
388# CONFIG_MTD_DOC2001 is not set
389# CONFIG_MTD_DOC2001PLUS is not set
390
391#
392# NAND Flash Device Drivers
393#
394# CONFIG_MTD_NAND is not set
395# CONFIG_MTD_NAND_CAFE is not set
396
397#
398# OneNAND Flash Device Drivers
399#
400# CONFIG_MTD_ONENAND is not set
401
402#
403# Parallel port support
404#
405# CONFIG_PARPORT is not set
406
407#
408# Plug and Play support
409#
410
411#
412# Block devices
413#
414# CONFIG_BLK_DEV_FD is not set
415# CONFIG_BLK_CPQ_DA is not set
416# CONFIG_BLK_CPQ_CISS_DA is not set
417# CONFIG_BLK_DEV_DAC960 is not set
418# CONFIG_BLK_DEV_UMEM is not set
419# CONFIG_BLK_DEV_COW_COMMON is not set
420# CONFIG_BLK_DEV_LOOP is not set
421# CONFIG_BLK_DEV_NBD is not set
422# CONFIG_BLK_DEV_SX8 is not set
423CONFIG_BLK_DEV_RAM=y
424CONFIG_BLK_DEV_RAM_COUNT=16
425CONFIG_BLK_DEV_RAM_SIZE=65536
426CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
427CONFIG_BLK_DEV_INITRD=y
428# CONFIG_CDROM_PKTCDVD is not set
429# CONFIG_ATA_OVER_ETH is not set
430
431#
432# Misc devices
433#
434# CONFIG_SGI_IOC4 is not set
435# CONFIG_TIFM_CORE is not set
436
437#
438# ATA/ATAPI/MFM/RLL support
439#
440# CONFIG_IDE is not set
441
442#
443# SCSI device support
444#
445# CONFIG_RAID_ATTRS is not set
446# CONFIG_SCSI is not set
447# CONFIG_SCSI_NETLINK is not set
448
449#
450# Serial ATA (prod) and Parallel ATA (experimental) drivers
451#
452# CONFIG_ATA is not set
453
454#
455# Multi-device support (RAID and LVM)
456#
457# CONFIG_MD is not set
458
459#
460# Fusion MPT device support
461#
462# CONFIG_FUSION is not set
463
464#
465# IEEE 1394 (FireWire) support
466#
467# CONFIG_IEEE1394 is not set
468
469#
470# I2O device support
471#
472# CONFIG_I2O is not set
473
474#
475# Macintosh device drivers
476#
477# CONFIG_MAC_EMUMOUSEBTN is not set
478# CONFIG_WINDFARM is not set
479
480#
481# Network device support
482#
483CONFIG_NETDEVICES=y
484# CONFIG_DUMMY is not set
485# CONFIG_BONDING is not set
486# CONFIG_EQUALIZER is not set
487# CONFIG_TUN is not set
488
489#
490# ARCnet devices
491#
492# CONFIG_ARCNET is not set
493
494#
495# PHY device support
496#
497# CONFIG_PHYLIB is not set
498
499#
500# Ethernet (10 or 100Mbit)
501#
502CONFIG_NET_ETHERNET=y
503CONFIG_MII=y
504# CONFIG_HAPPYMEAL is not set
505# CONFIG_SUNGEM is not set
506# CONFIG_CASSINI is not set
507# CONFIG_NET_VENDOR_3COM is not set
508
509#
510# Tulip family network device support
511#
512# CONFIG_NET_TULIP is not set
513# CONFIG_HP100 is not set
514CONFIG_IBM_EMAC=y
515CONFIG_IBM_EMAC_RXB=128
516CONFIG_IBM_EMAC_TXB=128
517CONFIG_IBM_EMAC_POLL_WEIGHT=32
518CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256
519CONFIG_IBM_EMAC_RX_SKB_HEADROOM=0
520CONFIG_IBM_EMAC_PHY_RX_CLK_FIX=y
521# CONFIG_IBM_EMAC_DEBUG is not set
522CONFIG_IBM_EMAC_ZMII=y
523CONFIG_IBM_EMAC_RGMII=y
524CONFIG_IBM_EMAC_TAH=y
525CONFIG_NET_PCI=y
526# CONFIG_PCNET32 is not set
527# CONFIG_AMD8111_ETH is not set
528# CONFIG_ADAPTEC_STARFIRE is not set
529# CONFIG_B44 is not set
530# CONFIG_FORCEDETH is not set
531# CONFIG_DGRS is not set
532# CONFIG_EEPRO100 is not set
533CONFIG_E100=y
534# CONFIG_FEALNX is not set
535# CONFIG_NATSEMI is not set
536# CONFIG_NE2K_PCI is not set
537# CONFIG_8139CP is not set
538# CONFIG_8139TOO is not set
539# CONFIG_SIS900 is not set
540# CONFIG_EPIC100 is not set
541# CONFIG_SUNDANCE is not set
542# CONFIG_TLAN is not set
543# CONFIG_VIA_RHINE is not set
544# CONFIG_SC92031 is not set
545
546#
547# Ethernet (1000 Mbit)
548#
549# CONFIG_ACENIC is not set
550# CONFIG_DL2K is not set
551# CONFIG_E1000 is not set
552# CONFIG_NS83820 is not set
553# CONFIG_HAMACHI is not set
554# CONFIG_YELLOWFIN is not set
555# CONFIG_R8169 is not set
556# CONFIG_SIS190 is not set
557# CONFIG_SKGE is not set
558# CONFIG_SKY2 is not set
559# CONFIG_SK98LIN is not set
560# CONFIG_VIA_VELOCITY is not set
561# CONFIG_TIGON3 is not set
562# CONFIG_BNX2 is not set
563# CONFIG_QLA3XXX is not set
564# CONFIG_ATL1 is not set
565
566#
567# Ethernet (10000 Mbit)
568#
569# CONFIG_CHELSIO_T1 is not set
570# CONFIG_CHELSIO_T3 is not set
571# CONFIG_IXGB is not set
572# CONFIG_S2IO is not set
573# CONFIG_MYRI10GE is not set
574# CONFIG_NETXEN_NIC is not set
575
576#
577# Token Ring devices
578#
579# CONFIG_TR is not set
580
581#
582# Wireless LAN (non-hamradio)
583#
584# CONFIG_NET_RADIO is not set
585
586#
587# Wan interfaces
588#
589# CONFIG_WAN is not set
590# CONFIG_FDDI is not set
591# CONFIG_HIPPI is not set
592CONFIG_PPP=y
593# CONFIG_PPP_MULTILINK is not set
594# CONFIG_PPP_FILTER is not set
595# CONFIG_PPP_ASYNC is not set
596# CONFIG_PPP_SYNC_TTY is not set
597# CONFIG_PPP_DEFLATE is not set
598# CONFIG_PPP_BSDCOMP is not set
599# CONFIG_PPP_MPPE is not set
600CONFIG_PPPOE=y
601# CONFIG_SLIP is not set
602CONFIG_SLHC=y
603# CONFIG_SHAPER is not set
604# CONFIG_NETCONSOLE is not set
605# CONFIG_NETPOLL is not set
606# CONFIG_NET_POLL_CONTROLLER is not set
607
608#
609# ISDN subsystem
610#
611# CONFIG_ISDN is not set
612
613#
614# Telephony Support
615#
616# CONFIG_PHONE is not set
617
618#
619# Input device support
620#
621# CONFIG_INPUT is not set
622
623#
624# Hardware I/O ports
625#
626CONFIG_SERIO=y
627# CONFIG_SERIO_I8042 is not set
628# CONFIG_SERIO_SERPORT is not set
629# CONFIG_SERIO_PCIPS2 is not set
630# CONFIG_SERIO_LIBPS2 is not set
631# CONFIG_SERIO_RAW is not set
632# CONFIG_GAMEPORT is not set
633
634#
635# Character devices
636#
637# CONFIG_VT is not set
638# CONFIG_SERIAL_NONSTANDARD is not set
639
640#
641# Serial drivers
642#
643CONFIG_SERIAL_8250=y
644CONFIG_SERIAL_8250_CONSOLE=y
645CONFIG_SERIAL_8250_PCI=y
646CONFIG_SERIAL_8250_NR_UARTS=4
647CONFIG_SERIAL_8250_RUNTIME_UARTS=4
648CONFIG_SERIAL_8250_EXTENDED=y
649# CONFIG_SERIAL_8250_MANY_PORTS is not set
650CONFIG_SERIAL_8250_SHARE_IRQ=y
651# CONFIG_SERIAL_8250_DETECT_IRQ is not set
652# CONFIG_SERIAL_8250_RSA is not set
653
654#
655# Non-8250 serial port support
656#
657# CONFIG_SERIAL_UARTLITE is not set
658CONFIG_SERIAL_CORE=y
659CONFIG_SERIAL_CORE_CONSOLE=y
660# CONFIG_SERIAL_JSM is not set
661CONFIG_UNIX98_PTYS=y
662CONFIG_LEGACY_PTYS=y
663CONFIG_LEGACY_PTY_COUNT=256
664
665#
666# IPMI
667#
668# CONFIG_IPMI_HANDLER is not set
669
670#
671# Watchdog Cards
672#
673# CONFIG_WATCHDOG is not set
674CONFIG_HW_RANDOM=m
675# CONFIG_NVRAM is not set
676# CONFIG_GEN_RTC is not set
677# CONFIG_DTLK is not set
678# CONFIG_R3964 is not set
679# CONFIG_APPLICOM is not set
680# CONFIG_AGP is not set
681# CONFIG_DRM is not set
682# CONFIG_RAW_DRIVER is not set
683
684#
685# TPM devices
686#
687# CONFIG_TCG_TPM is not set
688
689#
690# I2C support
691#
692CONFIG_I2C=y
693CONFIG_I2C_CHARDEV=y
694
695#
696# I2C Algorithms
697#
698# CONFIG_I2C_ALGOBIT is not set
699# CONFIG_I2C_ALGOPCF is not set
700# CONFIG_I2C_ALGOPCA is not set
701
702#
703# I2C Hardware Bus support
704#
705# CONFIG_I2C_ALI1535 is not set
706# CONFIG_I2C_ALI1563 is not set
707# CONFIG_I2C_ALI15X3 is not set
708# CONFIG_I2C_AMD756 is not set
709# CONFIG_I2C_AMD8111 is not set
710# CONFIG_I2C_I801 is not set
711# CONFIG_I2C_I810 is not set
712# CONFIG_I2C_PIIX4 is not set
713CONFIG_I2C_IBM_IIC=y
714# CONFIG_I2C_MPC is not set
715# CONFIG_I2C_NFORCE2 is not set
716# CONFIG_I2C_OCORES is not set
717# CONFIG_I2C_PARPORT_LIGHT is not set
718# CONFIG_I2C_PROSAVAGE is not set
719# CONFIG_I2C_SAVAGE4 is not set
720# CONFIG_I2C_SIS5595 is not set
721# CONFIG_I2C_SIS630 is not set
722# CONFIG_I2C_SIS96X is not set
723# CONFIG_I2C_STUB is not set
724# CONFIG_I2C_VIA is not set
725# CONFIG_I2C_VIAPRO is not set
726# CONFIG_I2C_VOODOO3 is not set
727# CONFIG_I2C_PCA_ISA is not set
728
729#
730# Miscellaneous I2C Chip support
731#
732# CONFIG_SENSORS_DS1337 is not set
733# CONFIG_SENSORS_DS1374 is not set
734CONFIG_SENSORS_EEPROM=y
735# CONFIG_SENSORS_PCF8574 is not set
736# CONFIG_SENSORS_PCA9539 is not set
737# CONFIG_SENSORS_PCF8591 is not set
738# CONFIG_SENSORS_M41T00 is not set
739# CONFIG_SENSORS_MAX6875 is not set
740# CONFIG_I2C_DEBUG_CORE is not set
741# CONFIG_I2C_DEBUG_ALGO is not set
742# CONFIG_I2C_DEBUG_BUS is not set
743# CONFIG_I2C_DEBUG_CHIP is not set
744
745#
746# SPI support
747#
748# CONFIG_SPI is not set
749# CONFIG_SPI_MASTER is not set
750
751#
752# Dallas's 1-wire bus
753#
754# CONFIG_W1 is not set
755
756#
757# Hardware Monitoring support
758#
759CONFIG_HWMON=y
760# CONFIG_HWMON_VID is not set
761# CONFIG_SENSORS_ABITUGURU is not set
762# CONFIG_SENSORS_ADM1021 is not set
763# CONFIG_SENSORS_ADM1025 is not set
764# CONFIG_SENSORS_ADM1026 is not set
765# CONFIG_SENSORS_ADM1031 is not set
766# CONFIG_SENSORS_ADM9240 is not set
767# CONFIG_SENSORS_ASB100 is not set
768# CONFIG_SENSORS_ATXP1 is not set
769# CONFIG_SENSORS_DS1621 is not set
770# CONFIG_SENSORS_F71805F is not set
771# CONFIG_SENSORS_FSCHER is not set
772# CONFIG_SENSORS_FSCPOS is not set
773# CONFIG_SENSORS_GL518SM is not set
774# CONFIG_SENSORS_GL520SM is not set
775# CONFIG_SENSORS_IT87 is not set
776# CONFIG_SENSORS_LM63 is not set
777# CONFIG_SENSORS_LM75 is not set
778# CONFIG_SENSORS_LM77 is not set
779# CONFIG_SENSORS_LM78 is not set
780# CONFIG_SENSORS_LM80 is not set
781# CONFIG_SENSORS_LM83 is not set
782# CONFIG_SENSORS_LM85 is not set
783# CONFIG_SENSORS_LM87 is not set
784# CONFIG_SENSORS_LM90 is not set
785# CONFIG_SENSORS_LM92 is not set
786# CONFIG_SENSORS_MAX1619 is not set
787# CONFIG_SENSORS_PC87360 is not set
788# CONFIG_SENSORS_PC87427 is not set
789# CONFIG_SENSORS_SIS5595 is not set
790# CONFIG_SENSORS_SMSC47M1 is not set
791# CONFIG_SENSORS_SMSC47M192 is not set
792# CONFIG_SENSORS_SMSC47B397 is not set
793# CONFIG_SENSORS_VIA686A is not set
794# CONFIG_SENSORS_VT1211 is not set
795# CONFIG_SENSORS_VT8231 is not set
796# CONFIG_SENSORS_W83781D is not set
797# CONFIG_SENSORS_W83791D is not set
798# CONFIG_SENSORS_W83792D is not set
799# CONFIG_SENSORS_W83793 is not set
800# CONFIG_SENSORS_W83L785TS is not set
801# CONFIG_SENSORS_W83627HF is not set
802# CONFIG_SENSORS_W83627EHF is not set
803# CONFIG_HWMON_DEBUG_CHIP is not set
804
805#
806# Multimedia devices
807#
808# CONFIG_VIDEO_DEV is not set
809
810#
811# Digital Video Broadcasting Devices
812#
813# CONFIG_DVB is not set
814
815#
816# Graphics support
817#
818CONFIG_FIRMWARE_EDID=y
819# CONFIG_FB is not set
820# CONFIG_FB_IBM_GXT4500 is not set
821# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
822
823#
824# Sound
825#
826# CONFIG_SOUND is not set
827
828#
829# USB support
830#
831CONFIG_USB_ARCH_HAS_HCD=y
832CONFIG_USB_ARCH_HAS_OHCI=y
833CONFIG_USB_ARCH_HAS_EHCI=y
834# CONFIG_USB is not set
835
836#
837# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
838#
839
840#
841# USB Gadget Support
842#
843# CONFIG_USB_GADGET is not set
844
845#
846# MMC/SD Card support
847#
848# CONFIG_MMC is not set
849
850#
851# LED devices
852#
853# CONFIG_NEW_LEDS is not set
854
855#
856# LED drivers
857#
858
859#
860# LED Triggers
861#
862
863#
864# InfiniBand support
865#
866# CONFIG_INFINIBAND is not set
867
868#
869# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
870#
871
872#
873# Real Time Clock
874#
875# CONFIG_RTC_CLASS is not set
876
877#
878# DMA Engine support
879#
880# CONFIG_DMA_ENGINE is not set
881
882#
883# DMA Clients
884#
885
886#
887# DMA Devices
888#
889
890#
891# Auxiliary Display support
892#
893
894#
895# Virtualization
896#
897
898#
899# File systems
900#
901CONFIG_EXT2_FS=y
902CONFIG_EXT2_FS_XATTR=y
903CONFIG_EXT2_FS_POSIX_ACL=y
904CONFIG_EXT2_FS_SECURITY=y
905CONFIG_EXT2_FS_XIP=y
906CONFIG_FS_XIP=y
907CONFIG_EXT3_FS=y
908CONFIG_EXT3_FS_XATTR=y
909CONFIG_EXT3_FS_POSIX_ACL=y
910CONFIG_EXT3_FS_SECURITY=y
911# CONFIG_EXT4DEV_FS is not set
912CONFIG_JBD=y
913CONFIG_JBD_DEBUG=y
914CONFIG_FS_MBCACHE=y
915# CONFIG_REISERFS_FS is not set
916# CONFIG_JFS_FS is not set
917CONFIG_FS_POSIX_ACL=y
918# CONFIG_XFS_FS is not set
919# CONFIG_GFS2_FS is not set
920# CONFIG_OCFS2_FS is not set
921# CONFIG_MINIX_FS is not set
922# CONFIG_ROMFS_FS is not set
923CONFIG_INOTIFY=y
924CONFIG_INOTIFY_USER=y
925# CONFIG_QUOTA is not set
926CONFIG_DNOTIFY=y
927# CONFIG_AUTOFS_FS is not set
928# CONFIG_AUTOFS4_FS is not set
929# CONFIG_FUSE_FS is not set
930
931#
932# CD-ROM/DVD Filesystems
933#
934# CONFIG_ISO9660_FS is not set
935# CONFIG_UDF_FS is not set
936
937#
938# DOS/FAT/NT Filesystems
939#
940# CONFIG_MSDOS_FS is not set
941# CONFIG_VFAT_FS is not set
942# CONFIG_NTFS_FS is not set
943
944#
945# Pseudo filesystems
946#
947CONFIG_PROC_FS=y
948CONFIG_PROC_KCORE=y
949CONFIG_PROC_SYSCTL=y
950CONFIG_SYSFS=y
951CONFIG_TMPFS=y
952# CONFIG_TMPFS_POSIX_ACL is not set
953# CONFIG_HUGETLB_PAGE is not set
954CONFIG_RAMFS=y
955# CONFIG_CONFIGFS_FS is not set
956
957#
958# Miscellaneous filesystems
959#
960# CONFIG_ADFS_FS is not set
961# CONFIG_AFFS_FS is not set
962# CONFIG_HFS_FS is not set
963# CONFIG_HFSPLUS_FS is not set
964# CONFIG_BEFS_FS is not set
965# CONFIG_BFS_FS is not set
966# CONFIG_EFS_FS is not set
967CONFIG_JFFS2_FS=y
968CONFIG_JFFS2_FS_DEBUG=0
969CONFIG_JFFS2_FS_WRITEBUFFER=y
970CONFIG_JFFS2_SUMMARY=y
971# CONFIG_JFFS2_FS_XATTR is not set
972# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
973CONFIG_JFFS2_ZLIB=y
974CONFIG_JFFS2_RTIME=y
975# CONFIG_JFFS2_RUBIN is not set
976# CONFIG_CRAMFS is not set
977# CONFIG_VXFS_FS is not set
978# CONFIG_HPFS_FS is not set
979# CONFIG_QNX4FS_FS is not set
980# CONFIG_SYSV_FS is not set
981# CONFIG_UFS_FS is not set
982
983#
984# Network File Systems
985#
986CONFIG_NFS_FS=y
987# CONFIG_NFS_V3 is not set
988# CONFIG_NFS_V4 is not set
989# CONFIG_NFS_DIRECTIO is not set
990# CONFIG_NFSD is not set
991CONFIG_ROOT_NFS=y
992CONFIG_LOCKD=y
993CONFIG_NFS_COMMON=y
994CONFIG_SUNRPC=y
995# CONFIG_RPCSEC_GSS_KRB5 is not set
996# CONFIG_RPCSEC_GSS_SPKM3 is not set
997# CONFIG_SMB_FS is not set
998# CONFIG_CIFS is not set
999# CONFIG_NCP_FS is not set
1000# CONFIG_CODA_FS is not set
1001# CONFIG_AFS_FS is not set
1002# CONFIG_9P_FS is not set
1003
1004#
1005# Partition Types
1006#
1007# CONFIG_PARTITION_ADVANCED is not set
1008CONFIG_MSDOS_PARTITION=y
1009
1010#
1011# Native Language Support
1012#
1013# CONFIG_NLS is not set
1014
1015#
1016# Distributed Lock Manager
1017#
1018# CONFIG_DLM is not set
1019
1020#
1021# Library routines
1022#
1023CONFIG_BITREVERSE=y
1024# CONFIG_CRC_CCITT is not set
1025# CONFIG_CRC16 is not set
1026CONFIG_CRC32=y
1027# CONFIG_LIBCRC32C is not set
1028CONFIG_ZLIB_INFLATE=y
1029CONFIG_ZLIB_DEFLATE=y
1030CONFIG_PLIST=y
1031CONFIG_HAS_IOMEM=y
1032CONFIG_HAS_IOPORT=y
1033# CONFIG_PROFILING is not set
1034
1035#
1036# Kernel hacking
1037#
1038# CONFIG_PRINTK_TIME is not set
1039CONFIG_ENABLE_MUST_CHECK=y
1040# CONFIG_MAGIC_SYSRQ is not set
1041# CONFIG_UNUSED_SYMBOLS is not set
1042CONFIG_DEBUG_FS=y
1043# CONFIG_HEADERS_CHECK is not set
1044CONFIG_DEBUG_KERNEL=y
1045CONFIG_LOG_BUF_SHIFT=14
1046CONFIG_DETECT_SOFTLOCKUP=y
1047# CONFIG_SCHEDSTATS is not set
1048# CONFIG_DEBUG_SLAB is not set
1049# CONFIG_DEBUG_RT_MUTEXES is not set
1050# CONFIG_RT_MUTEX_TESTER is not set
1051# CONFIG_DEBUG_SPINLOCK is not set
1052CONFIG_DEBUG_MUTEXES=y
1053# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1054# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1055# CONFIG_DEBUG_KOBJECT is not set
1056# CONFIG_DEBUG_BUGVERBOSE is not set
1057CONFIG_DEBUG_INFO=y
1058# CONFIG_DEBUG_VM is not set
1059# CONFIG_DEBUG_LIST is not set
1060CONFIG_FORCED_INLINING=y
1061# CONFIG_RCU_TORTURE_TEST is not set
1062# CONFIG_KGDB is not set
1063# CONFIG_XMON is not set
1064CONFIG_BDI_SWITCH=y
1065# CONFIG_SERIAL_TEXT_DEBUG is not set
1066CONFIG_PPC_OCP=y
1067
1068#
1069# Security options
1070#
1071# CONFIG_KEYS is not set
1072# CONFIG_SECURITY is not set
1073
1074#
1075# Cryptographic options
1076#
1077# CONFIG_CRYPTO is not set
diff --git a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig
index 6980de420e92..705ae56016f0 100644
--- a/arch/ppc/platforms/4xx/Kconfig
+++ b/arch/ppc/platforms/4xx/Kconfig
@@ -98,6 +98,12 @@ config OCOTEA
98 help 98 help
99 This option enables support for the IBM PPC440GX evaluation board. 99 This option enables support for the IBM PPC440GX evaluation board.
100 100
101config TAISHAN
102 bool "Taishan"
103 select WANT_EARLY_SERIAL
104 help
105 This option enables support for the AMCC PPC440GX evaluation board.
106
101endchoice 107endchoice
102 108
103config EP405PC 109config EP405PC
@@ -126,7 +132,7 @@ config 440GP
126 132
127config 440GX 133config 440GX
128 bool 134 bool
129 depends on OCOTEA 135 depends on OCOTEA || TAISHAN
130 default y 136 default y
131 137
132config 440SP 138config 440SP
@@ -173,7 +179,7 @@ config BOOKE
173 179
174config IBM_OCP 180config IBM_OCP
175 bool 181 bool
176 depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT 182 depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || TAISHAN || WALNUT
177 default y 183 default y
178 184
179config IBM_EMAC4 185config IBM_EMAC4
diff --git a/arch/ppc/platforms/4xx/Makefile b/arch/ppc/platforms/4xx/Makefile
index a04a0d0a0f5c..fa6610bccaf9 100644
--- a/arch/ppc/platforms/4xx/Makefile
+++ b/arch/ppc/platforms/4xx/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_OCOTEA) += ocotea.o
12obj-$(CONFIG_REDWOOD_5) += redwood5.o 12obj-$(CONFIG_REDWOOD_5) += redwood5.o
13obj-$(CONFIG_REDWOOD_6) += redwood6.o 13obj-$(CONFIG_REDWOOD_6) += redwood6.o
14obj-$(CONFIG_SYCAMORE) += sycamore.o 14obj-$(CONFIG_SYCAMORE) += sycamore.o
15obj-$(CONFIG_TAISHAN) += taishan.o
15obj-$(CONFIG_WALNUT) += walnut.o 16obj-$(CONFIG_WALNUT) += walnut.o
16obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o 17obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o
17obj-$(CONFIG_XILINX_ML403) += xilinx_ml403.o 18obj-$(CONFIG_XILINX_ML403) += xilinx_ml403.o
diff --git a/arch/ppc/platforms/4xx/taishan.c b/arch/ppc/platforms/4xx/taishan.c
new file mode 100644
index 000000000000..bb0253eef45a
--- /dev/null
+++ b/arch/ppc/platforms/4xx/taishan.c
@@ -0,0 +1,395 @@
1/*
2 * arch/ppc/platforms/4xx/taishan.c
3 *
4 * AMCC Taishan board specific routines
5 *
6 * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 */
13
14#include <linux/stddef.h>
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/errno.h>
18#include <linux/reboot.h>
19#include <linux/pci.h>
20#include <linux/kdev_t.h>
21#include <linux/types.h>
22#include <linux/major.h>
23#include <linux/blkdev.h>
24#include <linux/console.h>
25#include <linux/delay.h>
26#include <linux/ide.h>
27#include <linux/initrd.h>
28#include <linux/seq_file.h>
29#include <linux/root_dev.h>
30#include <linux/tty.h>
31#include <linux/serial.h>
32#include <linux/serial_core.h>
33#include <linux/platform_device.h>
34#include <linux/mtd/partitions.h>
35#include <linux/mtd/nand.h>
36#include <linux/mtd/ndfc.h>
37#include <linux/mtd/physmap.h>
38
39#include <asm/machdep.h>
40#include <asm/ocp.h>
41#include <asm/bootinfo.h>
42#include <asm/ppcboot.h>
43
44#include <syslib/gen550.h>
45#include <syslib/ibm440gx_common.h>
46
47extern bd_t __res;
48
49static struct ibm44x_clocks clocks __initdata;
50
51/*
52 * NOR FLASH configuration (using mtd physmap driver)
53 */
54
55/* start will be added dynamically, end is always fixed */
56static struct resource taishan_nor_resource = {
57 .start = TAISHAN_FLASH_ADDR,
58 .end = 0x1ffffffffULL,
59 .flags = IORESOURCE_MEM,
60};
61
62#define RW_PART0_OF 0
63#define RW_PART0_SZ 0x180000
64#define RW_PART1_SZ 0x200000
65/* Partition 2 will be autosized dynamically... */
66#define RW_PART3_SZ 0x80000
67#define RW_PART4_SZ 0x40000
68
69static struct mtd_partition taishan_nor_parts[] = {
70 {
71 .name = "kernel",
72 .offset = 0,
73 .size = RW_PART0_SZ
74 },
75 {
76 .name = "root",
77 .offset = MTDPART_OFS_APPEND,
78 .size = RW_PART1_SZ,
79 },
80 {
81 .name = "user",
82 .offset = MTDPART_OFS_APPEND,
83/* .size = RW_PART2_SZ */ /* will be adjusted dynamically */
84 },
85 {
86 .name = "env",
87 .offset = MTDPART_OFS_APPEND,
88 .size = RW_PART3_SZ,
89 },
90 {
91 .name = "u-boot",
92 .offset = MTDPART_OFS_APPEND,
93 .size = RW_PART4_SZ,
94 }
95};
96
97static struct physmap_flash_data taishan_nor_data = {
98 .width = 4,
99 .parts = taishan_nor_parts,
100 .nr_parts = ARRAY_SIZE(taishan_nor_parts),
101};
102
103static struct platform_device taishan_nor_device = {
104 .name = "physmap-flash",
105 .id = 0,
106 .dev = {
107 .platform_data = &taishan_nor_data,
108 },
109 .num_resources = 1,
110 .resource = &taishan_nor_resource,
111};
112
113static int taishan_setup_flash(void)
114{
115 /*
116 * Adjust partition 2 to flash size
117 */
118 taishan_nor_parts[2].size = __res.bi_flashsize -
119 RW_PART0_SZ - RW_PART1_SZ - RW_PART3_SZ - RW_PART4_SZ;
120
121 platform_device_register(&taishan_nor_device);
122
123 return 0;
124}
125arch_initcall(taishan_setup_flash);
126
127static void __init
128taishan_calibrate_decr(void)
129{
130 unsigned int freq;
131
132 if (mfspr(SPRN_CCR1) & CCR1_TCS)
133 freq = TAISHAN_TMR_CLK;
134 else
135 freq = clocks.cpu;
136
137 ibm44x_calibrate_decr(freq);
138}
139
140static int
141taishan_show_cpuinfo(struct seq_file *m)
142{
143 seq_printf(m, "vendor\t\t: AMCC\n");
144 seq_printf(m, "machine\t\t: PPC440GX EVB (Taishan)\n");
145 ibm440gx_show_cpuinfo(m);
146 return 0;
147}
148
149static inline int
150taishan_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
151{
152 static char pci_irq_table[][4] =
153 /*
154 * PCI IDSEL/INTPIN->INTLINE
155 * A B C D
156 */
157 {
158 { 23, 24, 25, 26 }, /* IDSEL 1 - PCI Slot 0 */
159 { 24, 25, 26, 23 }, /* IDSEL 2 - PCI Slot 1 */
160 };
161
162 const long min_idsel = 1, max_idsel = 2, irqs_per_slot = 4;
163 return PCI_IRQ_TABLE_LOOKUP;
164}
165
166static void __init taishan_set_emacdata(void)
167{
168 struct ocp_def *def;
169 struct ocp_func_emac_data *emacdata;
170 int i;
171
172 /* Set phy_map, phy_mode, and mac_addr for each EMAC */
173 for (i=2; i<4; i++) {
174 def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, i);
175 emacdata = def->additions;
176 if (i < 2) {
177 emacdata->phy_map = 0x00000001; /* Skip 0x00 */
178 emacdata->phy_mode = PHY_MODE_SMII;
179 } else {
180 emacdata->phy_map = 0x00000001; /* Skip 0x00 */
181 emacdata->phy_mode = PHY_MODE_RGMII;
182 }
183 if (i == 0)
184 memcpy(emacdata->mac_addr, "\0\0\0\0\0\0", 6);
185 else if (i == 1)
186 memcpy(emacdata->mac_addr, "\0\0\0\0\0\0", 6);
187 else if (i == 2)
188 memcpy(emacdata->mac_addr, __res.bi_enetaddr, 6);
189 else if (i == 3)
190 memcpy(emacdata->mac_addr, __res.bi_enet1addr, 6);
191 }
192}
193
194#define PCIX_READW(offset) \
195 (readw(pcix_reg_base+offset))
196
197#define PCIX_WRITEW(value, offset) \
198 (writew(value, pcix_reg_base+offset))
199
200#define PCIX_WRITEL(value, offset) \
201 (writel(value, pcix_reg_base+offset))
202
203/*
204 * FIXME: This is only here to "make it work". This will move
205 * to a ibm_pcix.c which will contain a generic IBM PCIX bridge
206 * configuration library. -Matt
207 */
208static void __init
209taishan_setup_pcix(void)
210{
211 void *pcix_reg_base;
212
213 pcix_reg_base = ioremap64(PCIX0_REG_BASE, PCIX_REG_SIZE);
214
215 /* Enable PCIX0 I/O, Mem, and Busmaster cycles */
216 PCIX_WRITEW(PCIX_READW(PCIX0_COMMAND) | PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER, PCIX0_COMMAND);
217
218 /* Disable all windows */
219 PCIX_WRITEL(0, PCIX0_POM0SA);
220 PCIX_WRITEL(0, PCIX0_POM1SA);
221 PCIX_WRITEL(0, PCIX0_POM2SA);
222 PCIX_WRITEL(0, PCIX0_PIM0SA);
223 PCIX_WRITEL(0, PCIX0_PIM0SAH);
224 PCIX_WRITEL(0, PCIX0_PIM1SA);
225 PCIX_WRITEL(0, PCIX0_PIM2SA);
226 PCIX_WRITEL(0, PCIX0_PIM2SAH);
227
228 /* Setup 2GB PLB->PCI outbound mem window (3_8000_0000->0_8000_0000) */
229 PCIX_WRITEL(0x00000003, PCIX0_POM0LAH);
230 PCIX_WRITEL(0x80000000, PCIX0_POM0LAL);
231 PCIX_WRITEL(0x00000000, PCIX0_POM0PCIAH);
232 PCIX_WRITEL(0x80000000, PCIX0_POM0PCIAL);
233 PCIX_WRITEL(0x80000001, PCIX0_POM0SA);
234
235 /* Setup 2GB PCI->PLB inbound memory window at 0, enable MSIs */
236 PCIX_WRITEL(0x00000000, PCIX0_PIM0LAH);
237 PCIX_WRITEL(0x00000000, PCIX0_PIM0LAL);
238 PCIX_WRITEL(0xe0000007, PCIX0_PIM0SA);
239 PCIX_WRITEL(0xffffffff, PCIX0_PIM0SAH);
240
241 iounmap(pcix_reg_base);
242
243 eieio();
244}
245
246static void __init
247taishan_setup_hose(void)
248{
249 struct pci_controller *hose;
250
251 /* Configure windows on the PCI-X host bridge */
252 taishan_setup_pcix();
253
254 hose = pcibios_alloc_controller();
255
256 if (!hose)
257 return;
258
259 hose->first_busno = 0;
260 hose->last_busno = 0xff;
261
262 hose->pci_mem_offset = TAISHAN_PCI_MEM_OFFSET;
263
264 pci_init_resource(&hose->io_resource,
265 TAISHAN_PCI_LOWER_IO,
266 TAISHAN_PCI_UPPER_IO,
267 IORESOURCE_IO,
268 "PCI host bridge");
269
270 pci_init_resource(&hose->mem_resources[0],
271 TAISHAN_PCI_LOWER_MEM,
272 TAISHAN_PCI_UPPER_MEM,
273 IORESOURCE_MEM,
274 "PCI host bridge");
275
276 hose->io_space.start = TAISHAN_PCI_LOWER_IO;
277 hose->io_space.end = TAISHAN_PCI_UPPER_IO;
278 hose->mem_space.start = TAISHAN_PCI_LOWER_MEM;
279 hose->mem_space.end = TAISHAN_PCI_UPPER_MEM;
280 hose->io_base_virt = ioremap64(TAISHAN_PCI_IO_BASE, TAISHAN_PCI_IO_SIZE);
281 isa_io_base = (unsigned long) hose->io_base_virt;
282
283 setup_indirect_pci(hose,
284 TAISHAN_PCI_CFGA_PLB32,
285 TAISHAN_PCI_CFGD_PLB32);
286 hose->set_cfg_type = 1;
287
288 hose->last_busno = pciauto_bus_scan(hose, hose->first_busno);
289
290 ppc_md.pci_swizzle = common_swizzle;
291 ppc_md.pci_map_irq = taishan_map_irq;
292}
293
294
295static void __init
296taishan_early_serial_map(void)
297{
298 struct uart_port port;
299
300 /* Setup ioremapped serial port access */
301 memset(&port, 0, sizeof(port));
302 port.membase = ioremap64(PPC440GX_UART0_ADDR, 8);
303 port.irq = UART0_INT;
304 port.uartclk = clocks.uart0;
305 port.regshift = 0;
306 port.iotype = UPIO_MEM;
307 port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
308 port.line = 0;
309
310 if (early_serial_setup(&port) != 0)
311 printk("Early serial init of port 0 failed\n");
312
313#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
314 /* Configure debug serial access */
315 gen550_init(0, &port);
316
317 /* Purge TLB entry added in head_44x.S for early serial access */
318 _tlbie(UART0_IO_BASE);
319#endif
320
321 port.membase = ioremap64(PPC440GX_UART1_ADDR, 8);
322 port.irq = UART1_INT;
323 port.uartclk = clocks.uart1;
324 port.line = 1;
325
326 if (early_serial_setup(&port) != 0)
327 printk("Early serial init of port 1 failed\n");
328
329#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
330 /* Configure debug serial access */
331 gen550_init(1, &port);
332#endif
333}
334
335static void __init
336taishan_setup_arch(void)
337{
338 taishan_set_emacdata();
339
340 ibm440gx_tah_enable();
341
342 /*
343 * Determine various clocks.
344 * To be completely correct we should get SysClk
345 * from FPGA, because it can be changed by on-board switches
346 * --ebs
347 */
348 ibm440gx_get_clocks(&clocks, 33333333, 6 * 1843200);
349 ocp_sys_info.opb_bus_freq = clocks.opb;
350
351 /* init to some ~sane value until calibrate_delay() runs */
352 loops_per_jiffy = 50000000/HZ;
353
354 /* Setup PCI host bridge */
355 taishan_setup_hose();
356
357#ifdef CONFIG_BLK_DEV_INITRD
358 if (initrd_start)
359 ROOT_DEV = Root_RAM0;
360 else
361#endif
362#ifdef CONFIG_ROOT_NFS
363 ROOT_DEV = Root_NFS;
364#else
365 ROOT_DEV = Root_HDA1;
366#endif
367
368 taishan_early_serial_map();
369
370 /* Identify the system */
371 printk("AMCC PowerPC 440GX Taishan Platform\n");
372}
373
374static void __init taishan_init(void)
375{
376 ibm440gx_l2c_setup(&clocks);
377}
378
379void __init platform_init(unsigned long r3, unsigned long r4,
380 unsigned long r5, unsigned long r6, unsigned long r7)
381{
382 ibm44x_platform_init(r3, r4, r5, r6, r7);
383
384 ppc_md.setup_arch = taishan_setup_arch;
385 ppc_md.show_cpuinfo = taishan_show_cpuinfo;
386 ppc_md.get_irq = NULL; /* Set in ppc4xx_pic_init() */
387
388 ppc_md.calibrate_decr = taishan_calibrate_decr;
389
390#ifdef CONFIG_KGDB
391 ppc_md.early_serial_map = taishan_early_serial_map;
392#endif
393 ppc_md.init = taishan_init;
394}
395
diff --git a/arch/ppc/platforms/4xx/taishan.h b/arch/ppc/platforms/4xx/taishan.h
new file mode 100644
index 000000000000..ea7561a80457
--- /dev/null
+++ b/arch/ppc/platforms/4xx/taishan.h
@@ -0,0 +1,67 @@
1/*
2 * arch/ppc/platforms/4xx/taishan.h
3 *
4 * AMCC Taishan board definitions
5 *
6 * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 */
14
15#ifdef __KERNEL__
16#ifndef __ASM_TAISHAN_H__
17#define __ASM_TAISHAN_H__
18
19#include <platforms/4xx/ibm440gx.h>
20
21/* External timer clock frequency */
22#define TAISHAN_TMR_CLK 25000000
23
24/* Flash */
25#define TAISHAN_FPGA_ADDR 0x0000000141000000ULL
26#define TAISHAN_LCM_ADDR 0x0000000142000000ULL
27#define TAISHAN_FLASH_ADDR 0x00000001fc000000ULL
28#define TAISHAN_FLASH_SIZE 0x4000000
29
30/*
31 * Serial port defines
32 */
33#define RS_TABLE_SIZE 2
34
35/* head_44x.S created UART mapping, used before early_serial_setup.
36 * We cannot use default OpenBIOS UART mappings because they
37 * don't work for configurations with more than 512M RAM. --ebs
38 */
39#define UART0_IO_BASE 0xF0000200
40#define UART1_IO_BASE 0xF0000300
41
42#define BASE_BAUD 11059200/16
43#define STD_UART_OP(num) \
44 { 0, BASE_BAUD, 0, UART##num##_INT, \
45 (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \
46 iomem_base: (void*)UART##num##_IO_BASE, \
47 io_type: SERIAL_IO_MEM},
48
49#define SERIAL_PORT_DFNS \
50 STD_UART_OP(0) \
51 STD_UART_OP(1)
52
53/* PCI support */
54#define TAISHAN_PCI_LOWER_IO 0x00000000
55#define TAISHAN_PCI_UPPER_IO 0x0000ffff
56#define TAISHAN_PCI_LOWER_MEM 0x80000000
57#define TAISHAN_PCI_UPPER_MEM 0xffffefff
58
59#define TAISHAN_PCI_CFGA_PLB32 0x0ec00000
60#define TAISHAN_PCI_CFGD_PLB32 0x0ec00004
61
62#define TAISHAN_PCI_IO_BASE 0x0000000208000000ULL
63#define TAISHAN_PCI_IO_SIZE 0x00010000
64#define TAISHAN_PCI_MEM_OFFSET 0x00000000
65
66#endif /* __ASM_TAISHAN_H__ */
67#endif /* __KERNEL__ */
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile
index d84f04666972..09911118c675 100644
--- a/arch/ppc/syslib/Makefile
+++ b/arch/ppc/syslib/Makefile
@@ -69,6 +69,7 @@ obj-$(CONFIG_SANDPOINT) += pci_auto.o todc_time.o
69obj-$(CONFIG_SBC82xx) += todc_time.o 69obj-$(CONFIG_SBC82xx) += todc_time.o
70obj-$(CONFIG_SPRUCE) += cpc700_pic.o pci_auto.o \ 70obj-$(CONFIG_SPRUCE) += cpc700_pic.o pci_auto.o \
71 todc_time.o 71 todc_time.o
72obj-$(CONFIG_TAISHAN) += pci_auto.o
72obj-$(CONFIG_8260) += m8260_setup.o pq2_devices.o pq2_sys.o \ 73obj-$(CONFIG_8260) += m8260_setup.o pq2_devices.o pq2_sys.o \
73 ppc_sys.o 74 ppc_sys.o
74obj-$(CONFIG_PCI_8260) += m82xx_pci.o pci_auto.o 75obj-$(CONFIG_PCI_8260) += m82xx_pci.o pci_auto.o
diff --git a/include/asm-ppc/ibm4xx.h b/include/asm-ppc/ibm4xx.h
index 7a64ede53bb6..92fd02d7b177 100644
--- a/include/asm-ppc/ibm4xx.h
+++ b/include/asm-ppc/ibm4xx.h
@@ -109,6 +109,10 @@ void ppc4xx_init(unsigned long r3, unsigned long r4, unsigned long r5,
109#include <platforms/4xx/ocotea.h> 109#include <platforms/4xx/ocotea.h>
110#endif 110#endif
111 111
112#if defined(CONFIG_TAISHAN)
113#include <platforms/4xx/taishan.h>
114#endif
115
112#ifndef __ASSEMBLY__ 116#ifndef __ASSEMBLY__
113#ifdef CONFIG_40x 117#ifdef CONFIG_40x
114/* 118/*