3 @@ -2686,12 +2686,10 @@
6 MARVELL MV643XX ETHERNET DRIVER
8 -M: dale@farnsworth.org
10 -M: mlachwani@mvista.com
12 +M: buytenh@marvell.com
13 L: netdev@vger.kernel.org
14 -S: Odd Fixes for 2.4; Maintained for 2.6.
17 MATROX FRAMEBUFFER DRIVER
19 --- a/arch/arm/Kconfig
20 +++ b/arch/arm/Kconfig
25 +config HAVE_LATENCYTOP_SUPPORT
30 config LOCKDEP_SUPPORT
34 If you have any questions or comments about the Linux kernel port
35 to this board, send e-mail to <sjhill@cotw.com>.
38 + bool "Marvell Kirkwood"
41 + select GENERIC_CLOCKEVENTS
44 + Support for the following Marvell Kirkwood series SoCs:
45 + 88F6180, 88F6192 and 88F6281.
48 bool "Micrel/Kendin KS8695"
52 <http://www.digi.com/products/microprocessors/index.jsp>
55 + bool "Marvell Loki (88RC8480)"
57 + select GENERIC_CLOCKEVENTS
60 + Support for the Marvell Loki (88RC8480) SoC.
63 + bool "Marvell MV78xx0"
66 + select GENERIC_CLOCKEVENTS
69 + Support for the following Marvell MV78xx0 series SoCs:
73 bool "Freescale MXC/iMX-based"
78 Support for the following Marvell Orion 5x series SoCs:
79 - Orion-1 (5181), Orion-NAS (5182), Orion-2 (5281.)
80 + Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182),
84 bool "Philips Nexperia PNX4008 Mobile"
87 source "arch/arm/mach-ixp23xx/Kconfig"
89 +source "arch/arm/mach-loki/Kconfig"
91 +source "arch/arm/mach-mv78xx0/Kconfig"
93 source "arch/arm/mach-pxa/Kconfig"
95 source "arch/arm/mach-sa1100/Kconfig"
98 source "arch/arm/mach-orion5x/Kconfig"
100 +source "arch/arm/mach-kirkwood/Kconfig"
102 source "arch/arm/plat-s3c24xx/Kconfig"
103 source "arch/arm/plat-s3c/Kconfig"
105 --- a/arch/arm/Makefile
106 +++ b/arch/arm/Makefile
107 @@ -135,11 +135,14 @@
108 machine-$(CONFIG_ARCH_NETX) := netx
109 machine-$(CONFIG_ARCH_NS9XXX) := ns9xxx
110 machine-$(CONFIG_ARCH_DAVINCI) := davinci
111 + machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood
112 machine-$(CONFIG_ARCH_KS8695) := ks8695
113 incdir-$(CONFIG_ARCH_MXC) := mxc
114 machine-$(CONFIG_ARCH_MX3) := mx3
115 machine-$(CONFIG_ARCH_ORION5X) := orion5x
116 machine-$(CONFIG_ARCH_MSM7X00A) := msm
117 + machine-$(CONFIG_ARCH_LOKI) := loki
118 + machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0
120 ifeq ($(CONFIG_ARCH_EBSA110),y)
121 # This is what happens if you forget the IOCS16 line.
122 --- a/arch/arm/boot/compressed/head.S
123 +++ b/arch/arm/boot/compressed/head.S
125 b __armv4_mmu_cache_off
126 b __armv4_mmu_cache_flush
128 - .word 0x56055310 @ Feroceon
130 + .word 0x56050000 @ Feroceon
132 b __armv4_mmu_cache_on
133 b __armv4_mmu_cache_off
134 b __armv5tej_mmu_cache_flush
136 +++ b/arch/arm/configs/kirkwood_defconfig
139 +# Automatically generated make config: don't edit
140 +# Linux kernel version: 2.6.26-rc5
141 +# Sun Jun 22 15:51:25 2008
144 +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
145 +CONFIG_GENERIC_GPIO=y
146 +CONFIG_GENERIC_TIME=y
147 +CONFIG_GENERIC_CLOCKEVENTS=y
149 +# CONFIG_NO_IOPORT is not set
150 +CONFIG_GENERIC_HARDIRQS=y
151 +CONFIG_STACKTRACE_SUPPORT=y
152 +CONFIG_HAVE_LATENCYTOP_SUPPORT=y
153 +CONFIG_LOCKDEP_SUPPORT=y
154 +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
155 +CONFIG_HARDIRQS_SW_RESEND=y
156 +CONFIG_GENERIC_IRQ_PROBE=y
157 +CONFIG_RWSEM_GENERIC_SPINLOCK=y
158 +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
159 +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
160 +CONFIG_GENERIC_HWEIGHT=y
161 +CONFIG_GENERIC_CALIBRATE_DELAY=y
162 +CONFIG_ARCH_SUPPORTS_AOUT=y
164 +CONFIG_VECTORS_BASE=0xffff0000
165 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
170 +CONFIG_EXPERIMENTAL=y
171 +CONFIG_BROKEN_ON_SMP=y
172 +CONFIG_LOCK_KERNEL=y
173 +CONFIG_INIT_ENV_ARG_LIMIT=32
174 +CONFIG_LOCALVERSION=""
175 +CONFIG_LOCALVERSION_AUTO=y
178 +CONFIG_SYSVIPC_SYSCTL=y
179 +# CONFIG_POSIX_MQUEUE is not set
180 +# CONFIG_BSD_PROCESS_ACCT is not set
181 +# CONFIG_TASKSTATS is not set
182 +# CONFIG_AUDIT is not set
183 +# CONFIG_IKCONFIG is not set
184 +CONFIG_LOG_BUF_SHIFT=14
185 +# CONFIG_CGROUPS is not set
186 +# CONFIG_GROUP_SCHED is not set
187 +# CONFIG_SYSFS_DEPRECATED_V2 is not set
188 +# CONFIG_RELAY is not set
189 +# CONFIG_NAMESPACES is not set
190 +# CONFIG_BLK_DEV_INITRD is not set
191 +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
195 +CONFIG_SYSCTL_SYSCALL=y
196 +CONFIG_SYSCTL_SYSCALL_CHECK=y
198 +# CONFIG_KALLSYMS_ALL is not set
199 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
207 +CONFIG_ANON_INODES=y
213 +CONFIG_VM_EVENT_COUNTERS=y
215 +# CONFIG_SLUB is not set
216 +# CONFIG_SLOB is not set
218 +# CONFIG_MARKERS is not set
220 +CONFIG_HAVE_OPROFILE=y
223 +CONFIG_HAVE_KPROBES=y
224 +CONFIG_HAVE_KRETPROBES=y
225 +# CONFIG_HAVE_DMA_ATTRS is not set
226 +CONFIG_PROC_PAGE_MONITOR=y
229 +# CONFIG_TINY_SHMEM is not set
232 +# CONFIG_MODULE_FORCE_LOAD is not set
233 +CONFIG_MODULE_UNLOAD=y
234 +# CONFIG_MODULE_FORCE_UNLOAD is not set
235 +# CONFIG_MODVERSIONS is not set
236 +# CONFIG_MODULE_SRCVERSION_ALL is not set
237 +# CONFIG_KMOD is not set
239 +# CONFIG_LBD is not set
240 +# CONFIG_BLK_DEV_IO_TRACE is not set
241 +# CONFIG_LSF is not set
242 +# CONFIG_BLK_DEV_BSG is not set
247 +CONFIG_IOSCHED_NOOP=y
249 +CONFIG_IOSCHED_DEADLINE=y
250 +CONFIG_IOSCHED_CFQ=y
251 +# CONFIG_DEFAULT_AS is not set
252 +# CONFIG_DEFAULT_DEADLINE is not set
253 +CONFIG_DEFAULT_CFQ=y
254 +# CONFIG_DEFAULT_NOOP is not set
255 +CONFIG_DEFAULT_IOSCHED="cfq"
256 +CONFIG_CLASSIC_RCU=y
261 +# CONFIG_ARCH_AAEC2000 is not set
262 +# CONFIG_ARCH_INTEGRATOR is not set
263 +# CONFIG_ARCH_REALVIEW is not set
264 +# CONFIG_ARCH_VERSATILE is not set
265 +# CONFIG_ARCH_AT91 is not set
266 +# CONFIG_ARCH_CLPS7500 is not set
267 +# CONFIG_ARCH_CLPS711X is not set
268 +# CONFIG_ARCH_CO285 is not set
269 +# CONFIG_ARCH_EBSA110 is not set
270 +# CONFIG_ARCH_EP93XX is not set
271 +# CONFIG_ARCH_FOOTBRIDGE is not set
272 +# CONFIG_ARCH_NETX is not set
273 +# CONFIG_ARCH_H720X is not set
274 +# CONFIG_ARCH_IMX is not set
275 +# CONFIG_ARCH_IOP13XX is not set
276 +# CONFIG_ARCH_IOP32X is not set
277 +# CONFIG_ARCH_IOP33X is not set
278 +# CONFIG_ARCH_IXP23XX is not set
279 +# CONFIG_ARCH_IXP2000 is not set
280 +# CONFIG_ARCH_IXP4XX is not set
281 +# CONFIG_ARCH_L7200 is not set
282 +CONFIG_ARCH_KIRKWOOD=y
283 +# CONFIG_ARCH_KS8695 is not set
284 +# CONFIG_ARCH_NS9XXX is not set
285 +# CONFIG_ARCH_LOKI is not set
286 +# CONFIG_ARCH_MV78XX0 is not set
287 +# CONFIG_ARCH_MXC is not set
288 +# CONFIG_ARCH_ORION5X is not set
289 +# CONFIG_ARCH_PNX4008 is not set
290 +# CONFIG_ARCH_PXA is not set
291 +# CONFIG_ARCH_RPC is not set
292 +# CONFIG_ARCH_SA1100 is not set
293 +# CONFIG_ARCH_S3C2410 is not set
294 +# CONFIG_ARCH_SHARK is not set
295 +# CONFIG_ARCH_LH7A40X is not set
296 +# CONFIG_ARCH_DAVINCI is not set
297 +# CONFIG_ARCH_OMAP is not set
298 +# CONFIG_ARCH_MSM7X00A is not set
301 +# Marvell Kirkwood Implementations
303 +CONFIG_MACH_DB88F6281_BP=y
304 +CONFIG_MACH_RD88F6192_NAS=y
305 +CONFIG_MACH_RD88F6281=y
320 +CONFIG_CPU_FEROCEON=y
321 +# CONFIG_CPU_FEROCEON_OLD_ID is not set
323 +CONFIG_CPU_ABRT_EV5T=y
324 +CONFIG_CPU_PABRT_NOIFAR=y
325 +CONFIG_CPU_CACHE_VIVT=y
326 +CONFIG_CPU_COPY_FEROCEON=y
327 +CONFIG_CPU_TLB_FEROCEON=y
329 +CONFIG_CPU_CP15_MMU=y
332 +# Processor Features
335 +# CONFIG_CPU_ICACHE_DISABLE is not set
336 +# CONFIG_CPU_DCACHE_DISABLE is not set
337 +CONFIG_OUTER_CACHE=y
338 +CONFIG_CACHE_FEROCEON_L2=y
344 +CONFIG_PCI_SYSCALL=y
345 +# CONFIG_ARCH_SUPPORTS_MSI is not set
347 +# CONFIG_PCI_DEBUG is not set
348 +# CONFIG_PCCARD is not set
353 +CONFIG_TICK_ONESHOT=y
355 +CONFIG_HIGH_RES_TIMERS=y
356 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
360 +# CONFIG_OABI_COMPAT is not set
361 +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
362 +CONFIG_SELECT_MEMORY_MODEL=y
363 +CONFIG_FLATMEM_MANUAL=y
364 +# CONFIG_DISCONTIGMEM_MANUAL is not set
365 +# CONFIG_SPARSEMEM_MANUAL is not set
367 +CONFIG_FLAT_NODE_MEM_MAP=y
368 +# CONFIG_SPARSEMEM_STATIC is not set
369 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
370 +CONFIG_PAGEFLAGS_EXTENDED=y
371 +CONFIG_SPLIT_PTLOCK_CPUS=4096
372 +# CONFIG_RESOURCES_64BIT is not set
373 +CONFIG_ZONE_DMA_FLAG=1
375 +CONFIG_VIRT_TO_BUS=y
376 +CONFIG_ALIGNMENT_TRAP=y
381 +CONFIG_ZBOOT_ROM_TEXT=0x0
382 +CONFIG_ZBOOT_ROM_BSS=0x0
384 +# CONFIG_XIP_KERNEL is not set
385 +# CONFIG_KEXEC is not set
388 +# Floating point emulation
392 +# At least one emulation must be selected
394 +# CONFIG_VFP is not set
397 +# Userspace binary formats
400 +# CONFIG_BINFMT_AOUT is not set
401 +# CONFIG_BINFMT_MISC is not set
404 +# Power management options
406 +# CONFIG_PM is not set
407 +CONFIG_ARCH_SUSPEND_POSSIBLE=y
415 +# Networking options
418 +CONFIG_PACKET_MMAP=y
421 +# CONFIG_XFRM_USER is not set
422 +# CONFIG_XFRM_SUB_POLICY is not set
423 +# CONFIG_XFRM_MIGRATE is not set
424 +# CONFIG_XFRM_STATISTICS is not set
425 +# CONFIG_NET_KEY is not set
427 +CONFIG_IP_MULTICAST=y
428 +# CONFIG_IP_ADVANCED_ROUTER is not set
429 +CONFIG_IP_FIB_HASH=y
431 +CONFIG_IP_PNP_DHCP=y
432 +CONFIG_IP_PNP_BOOTP=y
433 +# CONFIG_IP_PNP_RARP is not set
434 +# CONFIG_NET_IPIP is not set
435 +# CONFIG_NET_IPGRE is not set
436 +# CONFIG_IP_MROUTE is not set
437 +# CONFIG_ARPD is not set
438 +# CONFIG_SYN_COOKIES is not set
439 +# CONFIG_INET_AH is not set
440 +# CONFIG_INET_ESP is not set
441 +# CONFIG_INET_IPCOMP is not set
442 +# CONFIG_INET_XFRM_TUNNEL is not set
443 +# CONFIG_INET_TUNNEL is not set
444 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
445 +CONFIG_INET_XFRM_MODE_TUNNEL=y
446 +CONFIG_INET_XFRM_MODE_BEET=y
447 +# CONFIG_INET_LRO is not set
449 +CONFIG_INET_TCP_DIAG=y
450 +# CONFIG_TCP_CONG_ADVANCED is not set
451 +CONFIG_TCP_CONG_CUBIC=y
452 +CONFIG_DEFAULT_TCP_CONG="cubic"
453 +# CONFIG_TCP_MD5SIG is not set
454 +# CONFIG_IPV6 is not set
455 +# CONFIG_NETWORK_SECMARK is not set
456 +# CONFIG_NETFILTER is not set
457 +# CONFIG_IP_DCCP is not set
458 +# CONFIG_IP_SCTP is not set
459 +# CONFIG_TIPC is not set
460 +# CONFIG_ATM is not set
461 +# CONFIG_BRIDGE is not set
462 +# CONFIG_VLAN_8021Q is not set
463 +# CONFIG_DECNET is not set
464 +# CONFIG_LLC2 is not set
465 +# CONFIG_IPX is not set
466 +# CONFIG_ATALK is not set
467 +# CONFIG_X25 is not set
468 +# CONFIG_LAPB is not set
469 +# CONFIG_ECONET is not set
470 +# CONFIG_WAN_ROUTER is not set
471 +# CONFIG_NET_SCHED is not set
477 +# CONFIG_NET_TCPPROBE is not set
478 +# CONFIG_HAMRADIO is not set
479 +# CONFIG_CAN is not set
480 +# CONFIG_IRDA is not set
481 +# CONFIG_BT is not set
482 +# CONFIG_AF_RXRPC is not set
487 +# CONFIG_CFG80211 is not set
488 +CONFIG_WIRELESS_EXT=y
489 +# CONFIG_MAC80211 is not set
490 +# CONFIG_IEEE80211 is not set
491 +# CONFIG_RFKILL is not set
492 +# CONFIG_NET_9P is not set
499 +# Generic Driver Options
501 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
503 +CONFIG_PREVENT_FIRMWARE_BUILD=y
505 +# CONFIG_DEBUG_DRIVER is not set
506 +# CONFIG_DEBUG_DEVRES is not set
507 +# CONFIG_SYS_HYPERVISOR is not set
508 +# CONFIG_CONNECTOR is not set
510 +# CONFIG_MTD_DEBUG is not set
511 +# CONFIG_MTD_CONCAT is not set
512 +CONFIG_MTD_PARTITIONS=y
513 +# CONFIG_MTD_REDBOOT_PARTS is not set
514 +CONFIG_MTD_CMDLINE_PARTS=y
515 +# CONFIG_MTD_AFS_PARTS is not set
516 +# CONFIG_MTD_AR7_PARTS is not set
519 +# User Modules And Translation Layers
522 +CONFIG_MTD_BLKDEVS=y
524 +# CONFIG_FTL is not set
525 +# CONFIG_NFTL is not set
526 +# CONFIG_INFTL is not set
527 +# CONFIG_RFD_FTL is not set
528 +# CONFIG_SSFDC is not set
529 +# CONFIG_MTD_OOPS is not set
532 +# RAM/ROM/Flash chip drivers
535 +CONFIG_MTD_JEDECPROBE=y
536 +CONFIG_MTD_GEN_PROBE=y
537 +CONFIG_MTD_CFI_ADV_OPTIONS=y
538 +CONFIG_MTD_CFI_NOSWAP=y
539 +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
540 +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
541 +CONFIG_MTD_CFI_GEOMETRY=y
542 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
543 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
544 +# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
545 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
546 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
547 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
550 +# CONFIG_MTD_CFI_I4 is not set
551 +# CONFIG_MTD_CFI_I8 is not set
552 +# CONFIG_MTD_OTP is not set
553 +CONFIG_MTD_CFI_INTELEXT=y
554 +# CONFIG_MTD_CFI_AMDSTD is not set
555 +CONFIG_MTD_CFI_STAA=y
556 +CONFIG_MTD_CFI_UTIL=y
557 +# CONFIG_MTD_RAM is not set
558 +# CONFIG_MTD_ROM is not set
559 +# CONFIG_MTD_ABSENT is not set
562 +# Mapping drivers for chip access
564 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
565 +CONFIG_MTD_PHYSMAP=y
566 +CONFIG_MTD_PHYSMAP_START=0x0
567 +CONFIG_MTD_PHYSMAP_LEN=0x0
568 +CONFIG_MTD_PHYSMAP_BANKWIDTH=0
569 +# CONFIG_MTD_ARM_INTEGRATOR is not set
570 +# CONFIG_MTD_IMPA7 is not set
571 +# CONFIG_MTD_INTEL_VR_NOR is not set
572 +# CONFIG_MTD_PLATRAM is not set
575 +# Self-contained MTD device drivers
577 +# CONFIG_MTD_PMC551 is not set
578 +# CONFIG_MTD_DATAFLASH is not set
580 +CONFIG_M25PXX_USE_FAST_READ=y
581 +# CONFIG_MTD_SLRAM is not set
582 +# CONFIG_MTD_PHRAM is not set
583 +# CONFIG_MTD_MTDRAM is not set
584 +# CONFIG_MTD_BLOCK2MTD is not set
587 +# Disk-On-Chip Device Drivers
589 +# CONFIG_MTD_DOC2000 is not set
590 +# CONFIG_MTD_DOC2001 is not set
591 +# CONFIG_MTD_DOC2001PLUS is not set
593 +CONFIG_MTD_NAND_VERIFY_WRITE=y
594 +# CONFIG_MTD_NAND_ECC_SMC is not set
595 +# CONFIG_MTD_NAND_MUSEUM_IDS is not set
596 +CONFIG_MTD_NAND_IDS=y
597 +# CONFIG_MTD_NAND_DISKONCHIP is not set
598 +# CONFIG_MTD_NAND_CAFE is not set
599 +# CONFIG_MTD_NAND_NANDSIM is not set
600 +# CONFIG_MTD_NAND_PLATFORM is not set
601 +# CONFIG_MTD_ALAUDA is not set
602 +CONFIG_MTD_NAND_ORION=y
603 +# CONFIG_MTD_ONENAND is not set
606 +# UBI - Unsorted block images
608 +# CONFIG_MTD_UBI is not set
609 +# CONFIG_PARPORT is not set
611 +# CONFIG_BLK_CPQ_DA is not set
612 +# CONFIG_BLK_CPQ_CISS_DA is not set
613 +# CONFIG_BLK_DEV_DAC960 is not set
614 +# CONFIG_BLK_DEV_UMEM is not set
615 +# CONFIG_BLK_DEV_COW_COMMON is not set
616 +CONFIG_BLK_DEV_LOOP=y
617 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
618 +# CONFIG_BLK_DEV_NBD is not set
619 +# CONFIG_BLK_DEV_SX8 is not set
620 +# CONFIG_BLK_DEV_UB is not set
621 +# CONFIG_BLK_DEV_RAM is not set
622 +# CONFIG_CDROM_PKTCDVD is not set
623 +# CONFIG_ATA_OVER_ETH is not set
624 +# CONFIG_MISC_DEVICES is not set
626 +# CONFIG_IDE is not set
629 +# SCSI device support
631 +# CONFIG_RAID_ATTRS is not set
634 +# CONFIG_SCSI_TGT is not set
635 +# CONFIG_SCSI_NETLINK is not set
636 +# CONFIG_SCSI_PROC_FS is not set
639 +# SCSI support type (disk, tape, CD-ROM)
642 +# CONFIG_CHR_DEV_ST is not set
643 +# CONFIG_CHR_DEV_OSST is not set
645 +# CONFIG_BLK_DEV_SR_VENDOR is not set
647 +# CONFIG_CHR_DEV_SCH is not set
650 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
652 +# CONFIG_SCSI_MULTI_LUN is not set
653 +# CONFIG_SCSI_CONSTANTS is not set
654 +# CONFIG_SCSI_LOGGING is not set
655 +# CONFIG_SCSI_SCAN_ASYNC is not set
656 +CONFIG_SCSI_WAIT_SCAN=m
661 +# CONFIG_SCSI_SPI_ATTRS is not set
662 +# CONFIG_SCSI_FC_ATTRS is not set
663 +# CONFIG_SCSI_ISCSI_ATTRS is not set
664 +# CONFIG_SCSI_SAS_LIBSAS is not set
665 +# CONFIG_SCSI_SRP_ATTRS is not set
666 +CONFIG_SCSI_LOWLEVEL=y
667 +# CONFIG_ISCSI_TCP is not set
668 +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
669 +# CONFIG_SCSI_3W_9XXX is not set
670 +# CONFIG_SCSI_ACARD is not set
671 +# CONFIG_SCSI_AACRAID is not set
672 +# CONFIG_SCSI_AIC7XXX is not set
673 +# CONFIG_SCSI_AIC7XXX_OLD is not set
674 +# CONFIG_SCSI_AIC79XX is not set
675 +# CONFIG_SCSI_AIC94XX is not set
676 +# CONFIG_SCSI_DPT_I2O is not set
677 +# CONFIG_SCSI_ADVANSYS is not set
678 +# CONFIG_SCSI_ARCMSR is not set
679 +# CONFIG_MEGARAID_NEWGEN is not set
680 +# CONFIG_MEGARAID_LEGACY is not set
681 +# CONFIG_MEGARAID_SAS is not set
682 +# CONFIG_SCSI_HPTIOP is not set
683 +# CONFIG_SCSI_DMX3191D is not set
684 +# CONFIG_SCSI_FUTURE_DOMAIN is not set
685 +# CONFIG_SCSI_IPS is not set
686 +# CONFIG_SCSI_INITIO is not set
687 +# CONFIG_SCSI_INIA100 is not set
688 +# CONFIG_SCSI_MVSAS is not set
689 +# CONFIG_SCSI_STEX is not set
690 +# CONFIG_SCSI_SYM53C8XX_2 is not set
691 +# CONFIG_SCSI_IPR is not set
692 +# CONFIG_SCSI_QLOGIC_1280 is not set
693 +# CONFIG_SCSI_QLA_FC is not set
694 +# CONFIG_SCSI_QLA_ISCSI is not set
695 +# CONFIG_SCSI_LPFC is not set
696 +# CONFIG_SCSI_DC395x is not set
697 +# CONFIG_SCSI_DC390T is not set
698 +# CONFIG_SCSI_NSP32 is not set
699 +# CONFIG_SCSI_DEBUG is not set
700 +# CONFIG_SCSI_SRP is not set
702 +# CONFIG_ATA_NONSTANDARD is not set
704 +# CONFIG_SATA_AHCI is not set
705 +# CONFIG_SATA_SIL24 is not set
707 +# CONFIG_SATA_SVW is not set
708 +# CONFIG_ATA_PIIX is not set
710 +# CONFIG_SATA_NV is not set
711 +# CONFIG_PDC_ADMA is not set
712 +# CONFIG_SATA_QSTOR is not set
713 +# CONFIG_SATA_PROMISE is not set
714 +# CONFIG_SATA_SX4 is not set
715 +# CONFIG_SATA_SIL is not set
716 +# CONFIG_SATA_SIS is not set
717 +# CONFIG_SATA_ULI is not set
718 +# CONFIG_SATA_VIA is not set
719 +# CONFIG_SATA_VITESSE is not set
720 +# CONFIG_SATA_INIC162X is not set
721 +# CONFIG_PATA_ALI is not set
722 +# CONFIG_PATA_AMD is not set
723 +# CONFIG_PATA_ARTOP is not set
724 +# CONFIG_PATA_ATIIXP is not set
725 +# CONFIG_PATA_CMD640_PCI is not set
726 +# CONFIG_PATA_CMD64X is not set
727 +# CONFIG_PATA_CS5520 is not set
728 +# CONFIG_PATA_CS5530 is not set
729 +# CONFIG_PATA_CYPRESS is not set
730 +# CONFIG_PATA_EFAR is not set
731 +# CONFIG_ATA_GENERIC is not set
732 +# CONFIG_PATA_HPT366 is not set
733 +# CONFIG_PATA_HPT37X is not set
734 +# CONFIG_PATA_HPT3X2N is not set
735 +# CONFIG_PATA_HPT3X3 is not set
736 +# CONFIG_PATA_IT821X is not set
737 +# CONFIG_PATA_IT8213 is not set
738 +# CONFIG_PATA_JMICRON is not set
739 +# CONFIG_PATA_TRIFLEX is not set
740 +# CONFIG_PATA_MARVELL is not set
741 +# CONFIG_PATA_MPIIX is not set
742 +# CONFIG_PATA_OLDPIIX is not set
743 +# CONFIG_PATA_NETCELL is not set
744 +# CONFIG_PATA_NINJA32 is not set
745 +# CONFIG_PATA_NS87410 is not set
746 +# CONFIG_PATA_NS87415 is not set
747 +# CONFIG_PATA_OPTI is not set
748 +# CONFIG_PATA_OPTIDMA is not set
749 +# CONFIG_PATA_PDC_OLD is not set
750 +# CONFIG_PATA_RADISYS is not set
751 +# CONFIG_PATA_RZ1000 is not set
752 +# CONFIG_PATA_SC1200 is not set
753 +# CONFIG_PATA_SERVERWORKS is not set
754 +# CONFIG_PATA_PDC2027X is not set
755 +# CONFIG_PATA_SIL680 is not set
756 +# CONFIG_PATA_SIS is not set
757 +# CONFIG_PATA_VIA is not set
758 +# CONFIG_PATA_WINBOND is not set
759 +# CONFIG_PATA_PLATFORM is not set
760 +# CONFIG_PATA_SCH is not set
761 +# CONFIG_MD is not set
762 +# CONFIG_FUSION is not set
765 +# IEEE 1394 (FireWire) support
767 +# CONFIG_FIREWIRE is not set
768 +# CONFIG_IEEE1394 is not set
769 +# CONFIG_I2O is not set
771 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
772 +# CONFIG_DUMMY is not set
773 +# CONFIG_BONDING is not set
774 +# CONFIG_MACVLAN is not set
775 +# CONFIG_EQUALIZER is not set
776 +# CONFIG_TUN is not set
777 +# CONFIG_VETH is not set
778 +# CONFIG_ARCNET is not set
779 +# CONFIG_PHYLIB is not set
780 +CONFIG_NET_ETHERNET=y
782 +# CONFIG_AX88796 is not set
783 +# CONFIG_HAPPYMEAL is not set
784 +# CONFIG_SUNGEM is not set
785 +# CONFIG_CASSINI is not set
786 +# CONFIG_NET_VENDOR_3COM is not set
787 +# CONFIG_SMC91X is not set
788 +# CONFIG_DM9000 is not set
789 +# CONFIG_ENC28J60 is not set
790 +# CONFIG_NET_TULIP is not set
791 +# CONFIG_HP100 is not set
792 +# CONFIG_IBM_NEW_EMAC_ZMII is not set
793 +# CONFIG_IBM_NEW_EMAC_RGMII is not set
794 +# CONFIG_IBM_NEW_EMAC_TAH is not set
795 +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
797 +# CONFIG_PCNET32 is not set
798 +# CONFIG_AMD8111_ETH is not set
799 +# CONFIG_ADAPTEC_STARFIRE is not set
800 +# CONFIG_B44 is not set
801 +# CONFIG_FORCEDETH is not set
802 +# CONFIG_EEPRO100 is not set
803 +# CONFIG_E100 is not set
804 +# CONFIG_FEALNX is not set
805 +# CONFIG_NATSEMI is not set
806 +# CONFIG_NE2K_PCI is not set
807 +# CONFIG_8139CP is not set
808 +# CONFIG_8139TOO is not set
809 +# CONFIG_R6040 is not set
810 +# CONFIG_SIS900 is not set
811 +# CONFIG_EPIC100 is not set
812 +# CONFIG_SUNDANCE is not set
813 +# CONFIG_TLAN is not set
814 +# CONFIG_VIA_RHINE is not set
815 +# CONFIG_SC92031 is not set
816 +CONFIG_NETDEV_1000=y
817 +# CONFIG_ACENIC is not set
818 +# CONFIG_DL2K is not set
821 +# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
822 +# CONFIG_E1000E is not set
823 +# CONFIG_E1000E_ENABLED is not set
824 +# CONFIG_IP1000 is not set
825 +# CONFIG_IGB is not set
826 +# CONFIG_NS83820 is not set
827 +# CONFIG_HAMACHI is not set
828 +# CONFIG_YELLOWFIN is not set
829 +# CONFIG_R8169 is not set
830 +# CONFIG_SIS190 is not set
831 +# CONFIG_SKGE is not set
832 +# CONFIG_SKY2 is not set
833 +# CONFIG_VIA_VELOCITY is not set
834 +# CONFIG_TIGON3 is not set
835 +# CONFIG_BNX2 is not set
836 +CONFIG_MV643XX_ETH=y
837 +# CONFIG_QLA3XXX is not set
838 +# CONFIG_ATL1 is not set
839 +# CONFIG_NETDEV_10000 is not set
840 +# CONFIG_TR is not set
845 +# CONFIG_WLAN_PRE80211 is not set
846 +# CONFIG_WLAN_80211 is not set
847 +# CONFIG_IWLWIFI_LEDS is not set
850 +# USB Network Adapters
852 +# CONFIG_USB_CATC is not set
853 +# CONFIG_USB_KAWETH is not set
854 +# CONFIG_USB_PEGASUS is not set
855 +# CONFIG_USB_RTL8150 is not set
856 +# CONFIG_USB_USBNET is not set
857 +# CONFIG_WAN is not set
858 +# CONFIG_FDDI is not set
859 +# CONFIG_HIPPI is not set
860 +# CONFIG_PPP is not set
861 +# CONFIG_SLIP is not set
862 +# CONFIG_NET_FC is not set
863 +# CONFIG_NETCONSOLE is not set
864 +# CONFIG_NETPOLL is not set
865 +# CONFIG_NET_POLL_CONTROLLER is not set
866 +# CONFIG_ISDN is not set
869 +# Input device support
872 +# CONFIG_INPUT_FF_MEMLESS is not set
873 +# CONFIG_INPUT_POLLDEV is not set
876 +# Userland interfaces
878 +CONFIG_INPUT_MOUSEDEV=y
879 +CONFIG_INPUT_MOUSEDEV_PSAUX=y
880 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
881 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
882 +# CONFIG_INPUT_JOYDEV is not set
883 +# CONFIG_INPUT_EVDEV is not set
884 +# CONFIG_INPUT_EVBUG is not set
887 +# Input Device Drivers
889 +# CONFIG_INPUT_KEYBOARD is not set
890 +# CONFIG_INPUT_MOUSE is not set
891 +# CONFIG_INPUT_JOYSTICK is not set
892 +# CONFIG_INPUT_TABLET is not set
893 +# CONFIG_INPUT_TOUCHSCREEN is not set
894 +# CONFIG_INPUT_MISC is not set
897 +# Hardware I/O ports
899 +# CONFIG_SERIO is not set
900 +# CONFIG_GAMEPORT is not set
905 +# CONFIG_VT is not set
906 +# CONFIG_DEVKMEM is not set
907 +# CONFIG_SERIAL_NONSTANDARD is not set
908 +# CONFIG_NOZOMI is not set
913 +CONFIG_SERIAL_8250=y
914 +CONFIG_SERIAL_8250_CONSOLE=y
915 +# CONFIG_SERIAL_8250_PCI is not set
916 +CONFIG_SERIAL_8250_NR_UARTS=4
917 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2
918 +# CONFIG_SERIAL_8250_EXTENDED is not set
921 +# Non-8250 serial port support
923 +CONFIG_SERIAL_CORE=y
924 +CONFIG_SERIAL_CORE_CONSOLE=y
925 +# CONFIG_SERIAL_JSM is not set
926 +CONFIG_UNIX98_PTYS=y
927 +CONFIG_LEGACY_PTYS=y
928 +CONFIG_LEGACY_PTY_COUNT=16
929 +# CONFIG_IPMI_HANDLER is not set
930 +# CONFIG_HW_RANDOM is not set
931 +# CONFIG_NVRAM is not set
932 +# CONFIG_R3964 is not set
933 +# CONFIG_APPLICOM is not set
934 +# CONFIG_RAW_DRIVER is not set
935 +# CONFIG_TCG_TPM is not set
938 +CONFIG_I2C_BOARDINFO=y
939 +CONFIG_I2C_CHARDEV=y
942 +# I2C Hardware Bus support
944 +# CONFIG_I2C_ALI1535 is not set
945 +# CONFIG_I2C_ALI1563 is not set
946 +# CONFIG_I2C_ALI15X3 is not set
947 +# CONFIG_I2C_AMD756 is not set
948 +# CONFIG_I2C_AMD8111 is not set
949 +# CONFIG_I2C_GPIO is not set
950 +# CONFIG_I2C_I801 is not set
951 +# CONFIG_I2C_I810 is not set
952 +# CONFIG_I2C_PIIX4 is not set
953 +# CONFIG_I2C_NFORCE2 is not set
954 +# CONFIG_I2C_OCORES is not set
955 +# CONFIG_I2C_PARPORT_LIGHT is not set
956 +# CONFIG_I2C_PROSAVAGE is not set
957 +# CONFIG_I2C_SAVAGE4 is not set
958 +# CONFIG_I2C_SIMTEC is not set
959 +# CONFIG_I2C_SIS5595 is not set
960 +# CONFIG_I2C_SIS630 is not set
961 +# CONFIG_I2C_SIS96X is not set
962 +# CONFIG_I2C_TAOS_EVM is not set
963 +# CONFIG_I2C_STUB is not set
964 +# CONFIG_I2C_TINY_USB is not set
965 +# CONFIG_I2C_VIA is not set
966 +# CONFIG_I2C_VIAPRO is not set
967 +# CONFIG_I2C_VOODOO3 is not set
968 +# CONFIG_I2C_PCA_PLATFORM is not set
969 +CONFIG_I2C_MV64XXX=y
972 +# Miscellaneous I2C Chip support
974 +# CONFIG_DS1682 is not set
975 +# CONFIG_SENSORS_EEPROM is not set
976 +# CONFIG_SENSORS_PCF8574 is not set
977 +# CONFIG_PCF8575 is not set
978 +# CONFIG_SENSORS_PCF8591 is not set
979 +# CONFIG_SENSORS_MAX6875 is not set
980 +# CONFIG_SENSORS_TSL2550 is not set
981 +# CONFIG_I2C_DEBUG_CORE is not set
982 +# CONFIG_I2C_DEBUG_ALGO is not set
983 +# CONFIG_I2C_DEBUG_BUS is not set
984 +# CONFIG_I2C_DEBUG_CHIP is not set
986 +# CONFIG_SPI_DEBUG is not set
990 +# SPI Master Controller Drivers
992 +# CONFIG_SPI_BITBANG is not set
996 +# SPI Protocol Masters
998 +# CONFIG_SPI_AT25 is not set
999 +# CONFIG_SPI_SPIDEV is not set
1000 +# CONFIG_SPI_TLE62X0 is not set
1001 +# CONFIG_W1 is not set
1002 +# CONFIG_POWER_SUPPLY is not set
1003 +# CONFIG_HWMON is not set
1004 +# CONFIG_WATCHDOG is not set
1007 +# Sonics Silicon Backplane
1009 +CONFIG_SSB_POSSIBLE=y
1010 +# CONFIG_SSB is not set
1013 +# Multifunction device drivers
1015 +# CONFIG_MFD_SM501 is not set
1016 +# CONFIG_MFD_ASIC3 is not set
1017 +# CONFIG_HTC_PASIC3 is not set
1020 +# Multimedia devices
1024 +# Multimedia core support
1026 +# CONFIG_VIDEO_DEV is not set
1027 +# CONFIG_DVB_CORE is not set
1028 +# CONFIG_VIDEO_MEDIA is not set
1031 +# Multimedia drivers
1033 +# CONFIG_DAB is not set
1038 +# CONFIG_DRM is not set
1039 +# CONFIG_VGASTATE is not set
1040 +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
1041 +# CONFIG_FB is not set
1042 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1045 +# Display device support
1047 +# CONFIG_DISPLAY_SUPPORT is not set
1052 +# CONFIG_SOUND is not set
1053 +CONFIG_HID_SUPPORT=y
1055 +# CONFIG_HID_DEBUG is not set
1056 +# CONFIG_HIDRAW is not set
1059 +# USB Input Devices
1062 +# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1063 +# CONFIG_HID_FF is not set
1064 +# CONFIG_USB_HIDDEV is not set
1065 +CONFIG_USB_SUPPORT=y
1066 +CONFIG_USB_ARCH_HAS_HCD=y
1067 +CONFIG_USB_ARCH_HAS_OHCI=y
1068 +CONFIG_USB_ARCH_HAS_EHCI=y
1070 +# CONFIG_USB_DEBUG is not set
1071 +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
1074 +# Miscellaneous USB options
1076 +CONFIG_USB_DEVICEFS=y
1077 +CONFIG_USB_DEVICE_CLASS=y
1078 +# CONFIG_USB_DYNAMIC_MINORS is not set
1079 +# CONFIG_USB_OTG is not set
1080 +# CONFIG_USB_OTG_WHITELIST is not set
1081 +# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1084 +# USB Host Controller Drivers
1086 +# CONFIG_USB_C67X00_HCD is not set
1087 +CONFIG_USB_EHCI_HCD=y
1088 +CONFIG_USB_EHCI_ROOT_HUB_TT=y
1089 +CONFIG_USB_EHCI_TT_NEWSCHED=y
1090 +# CONFIG_USB_ISP116X_HCD is not set
1091 +# CONFIG_USB_ISP1760_HCD is not set
1092 +# CONFIG_USB_OHCI_HCD is not set
1093 +# CONFIG_USB_UHCI_HCD is not set
1094 +# CONFIG_USB_SL811_HCD is not set
1095 +# CONFIG_USB_R8A66597_HCD is not set
1098 +# USB Device Class drivers
1100 +# CONFIG_USB_ACM is not set
1101 +CONFIG_USB_PRINTER=y
1102 +# CONFIG_USB_WDM is not set
1105 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1109 +# may also be needed; see USB_STORAGE Help for more information
1111 +CONFIG_USB_STORAGE=y
1112 +# CONFIG_USB_STORAGE_DEBUG is not set
1113 +CONFIG_USB_STORAGE_DATAFAB=y
1114 +CONFIG_USB_STORAGE_FREECOM=y
1115 +# CONFIG_USB_STORAGE_ISD200 is not set
1116 +CONFIG_USB_STORAGE_DPCM=y
1117 +# CONFIG_USB_STORAGE_USBAT is not set
1118 +CONFIG_USB_STORAGE_SDDR09=y
1119 +CONFIG_USB_STORAGE_SDDR55=y
1120 +CONFIG_USB_STORAGE_JUMPSHOT=y
1121 +# CONFIG_USB_STORAGE_ALAUDA is not set
1122 +# CONFIG_USB_STORAGE_ONETOUCH is not set
1123 +# CONFIG_USB_STORAGE_KARMA is not set
1124 +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1125 +# CONFIG_USB_LIBUSUAL is not set
1128 +# USB Imaging devices
1130 +# CONFIG_USB_MDC800 is not set
1131 +# CONFIG_USB_MICROTEK is not set
1132 +# CONFIG_USB_MON is not set
1137 +# CONFIG_USB_SERIAL is not set
1140 +# USB Miscellaneous drivers
1142 +# CONFIG_USB_EMI62 is not set
1143 +# CONFIG_USB_EMI26 is not set
1144 +# CONFIG_USB_ADUTUX is not set
1145 +# CONFIG_USB_AUERSWALD is not set
1146 +# CONFIG_USB_RIO500 is not set
1147 +# CONFIG_USB_LEGOTOWER is not set
1148 +# CONFIG_USB_LCD is not set
1149 +# CONFIG_USB_BERRY_CHARGE is not set
1150 +# CONFIG_USB_LED is not set
1151 +# CONFIG_USB_CYPRESS_CY7C63 is not set
1152 +# CONFIG_USB_CYTHERM is not set
1153 +# CONFIG_USB_PHIDGET is not set
1154 +# CONFIG_USB_IDMOUSE is not set
1155 +# CONFIG_USB_FTDI_ELAN is not set
1156 +# CONFIG_USB_APPLEDISPLAY is not set
1157 +# CONFIG_USB_SISUSBVGA is not set
1158 +# CONFIG_USB_LD is not set
1159 +# CONFIG_USB_TRANCEVIBRATOR is not set
1160 +# CONFIG_USB_IOWARRIOR is not set
1161 +# CONFIG_USB_TEST is not set
1162 +# CONFIG_USB_ISIGHTFW is not set
1163 +# CONFIG_USB_GADGET is not set
1164 +# CONFIG_MMC is not set
1166 +# CONFIG_LEDS_CLASS is not set
1175 +# CONFIG_LEDS_TRIGGERS is not set
1178 +# CONFIG_RTC_DEBUG is not set
1183 +CONFIG_RTC_INTF_SYSFS=y
1184 +CONFIG_RTC_INTF_PROC=y
1185 +CONFIG_RTC_INTF_DEV=y
1186 +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1187 +# CONFIG_RTC_DRV_TEST is not set
1192 +# CONFIG_RTC_DRV_DS1307 is not set
1193 +# CONFIG_RTC_DRV_DS1374 is not set
1194 +# CONFIG_RTC_DRV_DS1672 is not set
1195 +# CONFIG_RTC_DRV_MAX6900 is not set
1196 +CONFIG_RTC_DRV_MV=y
1197 +# CONFIG_RTC_DRV_RS5C372 is not set
1198 +# CONFIG_RTC_DRV_ISL1208 is not set
1199 +# CONFIG_RTC_DRV_X1205 is not set
1200 +# CONFIG_RTC_DRV_PCF8563 is not set
1201 +# CONFIG_RTC_DRV_PCF8583 is not set
1202 +# CONFIG_RTC_DRV_M41T80 is not set
1203 +# CONFIG_RTC_DRV_S35390A is not set
1208 +# CONFIG_RTC_DRV_MAX6902 is not set
1209 +# CONFIG_RTC_DRV_R9701 is not set
1210 +# CONFIG_RTC_DRV_RS5C348 is not set
1213 +# Platform RTC drivers
1215 +# CONFIG_RTC_DRV_CMOS is not set
1216 +# CONFIG_RTC_DRV_DS1511 is not set
1217 +# CONFIG_RTC_DRV_DS1553 is not set
1218 +# CONFIG_RTC_DRV_DS1742 is not set
1219 +# CONFIG_RTC_DRV_STK17TA8 is not set
1220 +# CONFIG_RTC_DRV_M48T86 is not set
1221 +# CONFIG_RTC_DRV_M48T59 is not set
1222 +# CONFIG_RTC_DRV_V3020 is not set
1225 +# on-CPU RTC drivers
1227 +CONFIG_DMADEVICES=y
1233 +CONFIG_DMA_ENGINE=y
1238 +# CONFIG_NET_DMA is not set
1239 +# CONFIG_UIO is not set
1245 +# CONFIG_EXT2_FS_XATTR is not set
1246 +# CONFIG_EXT2_FS_XIP is not set
1248 +# CONFIG_EXT3_FS_XATTR is not set
1249 +# CONFIG_EXT4DEV_FS is not set
1251 +# CONFIG_REISERFS_FS is not set
1252 +# CONFIG_JFS_FS is not set
1253 +# CONFIG_FS_POSIX_ACL is not set
1255 +# CONFIG_XFS_QUOTA is not set
1256 +# CONFIG_XFS_POSIX_ACL is not set
1257 +# CONFIG_XFS_RT is not set
1258 +# CONFIG_XFS_DEBUG is not set
1259 +# CONFIG_OCFS2_FS is not set
1262 +CONFIG_INOTIFY_USER=y
1263 +# CONFIG_QUOTA is not set
1264 +# CONFIG_AUTOFS_FS is not set
1265 +# CONFIG_AUTOFS4_FS is not set
1266 +# CONFIG_FUSE_FS is not set
1269 +# CD-ROM/DVD Filesystems
1271 +CONFIG_ISO9660_FS=y
1273 +# CONFIG_ZISOFS is not set
1278 +# DOS/FAT/NT Filesystems
1283 +CONFIG_FAT_DEFAULT_CODEPAGE=437
1284 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1285 +# CONFIG_NTFS_FS is not set
1288 +# Pseudo filesystems
1291 +CONFIG_PROC_SYSCTL=y
1294 +# CONFIG_TMPFS_POSIX_ACL is not set
1295 +# CONFIG_HUGETLB_PAGE is not set
1296 +# CONFIG_CONFIGFS_FS is not set
1299 +# Miscellaneous filesystems
1301 +# CONFIG_ADFS_FS is not set
1302 +# CONFIG_AFFS_FS is not set
1303 +# CONFIG_HFS_FS is not set
1304 +# CONFIG_HFSPLUS_FS is not set
1305 +# CONFIG_BEFS_FS is not set
1306 +# CONFIG_BFS_FS is not set
1307 +# CONFIG_EFS_FS is not set
1309 +CONFIG_JFFS2_FS_DEBUG=0
1310 +CONFIG_JFFS2_FS_WRITEBUFFER=y
1311 +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1312 +# CONFIG_JFFS2_SUMMARY is not set
1313 +# CONFIG_JFFS2_FS_XATTR is not set
1314 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1315 +CONFIG_JFFS2_ZLIB=y
1316 +# CONFIG_JFFS2_LZO is not set
1317 +CONFIG_JFFS2_RTIME=y
1318 +# CONFIG_JFFS2_RUBIN is not set
1320 +# CONFIG_VXFS_FS is not set
1321 +# CONFIG_MINIX_FS is not set
1322 +# CONFIG_HPFS_FS is not set
1323 +# CONFIG_QNX4FS_FS is not set
1324 +# CONFIG_ROMFS_FS is not set
1325 +# CONFIG_SYSV_FS is not set
1326 +# CONFIG_UFS_FS is not set
1327 +CONFIG_NETWORK_FILESYSTEMS=y
1330 +# CONFIG_NFS_V3_ACL is not set
1331 +# CONFIG_NFS_V4 is not set
1332 +# CONFIG_NFSD is not set
1336 +CONFIG_NFS_COMMON=y
1338 +# CONFIG_SUNRPC_BIND34 is not set
1339 +# CONFIG_RPCSEC_GSS_KRB5 is not set
1340 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
1341 +# CONFIG_SMB_FS is not set
1342 +# CONFIG_CIFS is not set
1343 +# CONFIG_NCP_FS is not set
1344 +# CONFIG_CODA_FS is not set
1345 +# CONFIG_AFS_FS is not set
1350 +CONFIG_PARTITION_ADVANCED=y
1351 +# CONFIG_ACORN_PARTITION is not set
1352 +# CONFIG_OSF_PARTITION is not set
1353 +# CONFIG_AMIGA_PARTITION is not set
1354 +# CONFIG_ATARI_PARTITION is not set
1355 +# CONFIG_MAC_PARTITION is not set
1356 +CONFIG_MSDOS_PARTITION=y
1357 +# CONFIG_BSD_DISKLABEL is not set
1358 +# CONFIG_MINIX_SUBPARTITION is not set
1359 +# CONFIG_SOLARIS_X86_PARTITION is not set
1360 +# CONFIG_UNIXWARE_DISKLABEL is not set
1361 +# CONFIG_LDM_PARTITION is not set
1362 +# CONFIG_SGI_PARTITION is not set
1363 +# CONFIG_ULTRIX_PARTITION is not set
1364 +# CONFIG_SUN_PARTITION is not set
1365 +# CONFIG_KARMA_PARTITION is not set
1366 +# CONFIG_EFI_PARTITION is not set
1367 +# CONFIG_SYSV68_PARTITION is not set
1369 +CONFIG_NLS_DEFAULT="iso8859-1"
1370 +CONFIG_NLS_CODEPAGE_437=y
1371 +# CONFIG_NLS_CODEPAGE_737 is not set
1372 +# CONFIG_NLS_CODEPAGE_775 is not set
1373 +CONFIG_NLS_CODEPAGE_850=y
1374 +# CONFIG_NLS_CODEPAGE_852 is not set
1375 +# CONFIG_NLS_CODEPAGE_855 is not set
1376 +# CONFIG_NLS_CODEPAGE_857 is not set
1377 +# CONFIG_NLS_CODEPAGE_860 is not set
1378 +# CONFIG_NLS_CODEPAGE_861 is not set
1379 +# CONFIG_NLS_CODEPAGE_862 is not set
1380 +# CONFIG_NLS_CODEPAGE_863 is not set
1381 +# CONFIG_NLS_CODEPAGE_864 is not set
1382 +# CONFIG_NLS_CODEPAGE_865 is not set
1383 +# CONFIG_NLS_CODEPAGE_866 is not set
1384 +# CONFIG_NLS_CODEPAGE_869 is not set
1385 +# CONFIG_NLS_CODEPAGE_936 is not set
1386 +# CONFIG_NLS_CODEPAGE_950 is not set
1387 +# CONFIG_NLS_CODEPAGE_932 is not set
1388 +# CONFIG_NLS_CODEPAGE_949 is not set
1389 +# CONFIG_NLS_CODEPAGE_874 is not set
1390 +# CONFIG_NLS_ISO8859_8 is not set
1391 +# CONFIG_NLS_CODEPAGE_1250 is not set
1392 +# CONFIG_NLS_CODEPAGE_1251 is not set
1393 +# CONFIG_NLS_ASCII is not set
1394 +CONFIG_NLS_ISO8859_1=y
1395 +CONFIG_NLS_ISO8859_2=y
1396 +# CONFIG_NLS_ISO8859_3 is not set
1397 +# CONFIG_NLS_ISO8859_4 is not set
1398 +# CONFIG_NLS_ISO8859_5 is not set
1399 +# CONFIG_NLS_ISO8859_6 is not set
1400 +# CONFIG_NLS_ISO8859_7 is not set
1401 +# CONFIG_NLS_ISO8859_9 is not set
1402 +# CONFIG_NLS_ISO8859_13 is not set
1403 +# CONFIG_NLS_ISO8859_14 is not set
1404 +# CONFIG_NLS_ISO8859_15 is not set
1405 +# CONFIG_NLS_KOI8_R is not set
1406 +# CONFIG_NLS_KOI8_U is not set
1408 +# CONFIG_DLM is not set
1413 +# CONFIG_PRINTK_TIME is not set
1414 +CONFIG_ENABLE_WARN_DEPRECATED=y
1415 +CONFIG_ENABLE_MUST_CHECK=y
1416 +CONFIG_FRAME_WARN=1024
1417 +CONFIG_MAGIC_SYSRQ=y
1418 +# CONFIG_UNUSED_SYMBOLS is not set
1419 +# CONFIG_DEBUG_FS is not set
1420 +# CONFIG_HEADERS_CHECK is not set
1421 +CONFIG_DEBUG_KERNEL=y
1422 +# CONFIG_DEBUG_SHIRQ is not set
1423 +CONFIG_DETECT_SOFTLOCKUP=y
1424 +# CONFIG_SCHED_DEBUG is not set
1425 +# CONFIG_SCHEDSTATS is not set
1426 +# CONFIG_TIMER_STATS is not set
1427 +# CONFIG_DEBUG_OBJECTS is not set
1428 +# CONFIG_DEBUG_SLAB is not set
1429 +# CONFIG_DEBUG_PREEMPT is not set
1430 +# CONFIG_DEBUG_RT_MUTEXES is not set
1431 +# CONFIG_RT_MUTEX_TESTER is not set
1432 +# CONFIG_DEBUG_SPINLOCK is not set
1433 +# CONFIG_DEBUG_MUTEXES is not set
1434 +# CONFIG_DEBUG_LOCK_ALLOC is not set
1435 +# CONFIG_PROVE_LOCKING is not set
1436 +# CONFIG_LOCK_STAT is not set
1437 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1438 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1439 +# CONFIG_DEBUG_KOBJECT is not set
1440 +# CONFIG_DEBUG_BUGVERBOSE is not set
1441 +CONFIG_DEBUG_INFO=y
1442 +# CONFIG_DEBUG_VM is not set
1443 +# CONFIG_DEBUG_WRITECOUNT is not set
1444 +# CONFIG_DEBUG_LIST is not set
1445 +# CONFIG_DEBUG_SG is not set
1446 +CONFIG_FRAME_POINTER=y
1447 +# CONFIG_BOOT_PRINTK_DELAY is not set
1448 +# CONFIG_RCU_TORTURE_TEST is not set
1449 +# CONFIG_KPROBES_SANITY_TEST is not set
1450 +# CONFIG_BACKTRACE_SELF_TEST is not set
1451 +# CONFIG_LKDTM is not set
1452 +# CONFIG_FAULT_INJECTION is not set
1453 +# CONFIG_LATENCYTOP is not set
1454 +# CONFIG_SAMPLES is not set
1455 +CONFIG_DEBUG_USER=y
1456 +CONFIG_DEBUG_ERRORS=y
1457 +# CONFIG_DEBUG_STACK_USAGE is not set
1459 +# CONFIG_DEBUG_ICEDCC is not set
1464 +# CONFIG_KEYS is not set
1465 +# CONFIG_SECURITY is not set
1466 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1467 +CONFIG_ASYNC_CORE=y
1471 +# Crypto core or helper
1473 +CONFIG_CRYPTO_ALGAPI=m
1474 +CONFIG_CRYPTO_BLKCIPHER=m
1475 +CONFIG_CRYPTO_MANAGER=m
1476 +# CONFIG_CRYPTO_GF128MUL is not set
1477 +# CONFIG_CRYPTO_NULL is not set
1478 +# CONFIG_CRYPTO_CRYPTD is not set
1479 +# CONFIG_CRYPTO_AUTHENC is not set
1480 +# CONFIG_CRYPTO_TEST is not set
1483 +# Authenticated Encryption with Associated Data
1485 +# CONFIG_CRYPTO_CCM is not set
1486 +# CONFIG_CRYPTO_GCM is not set
1487 +# CONFIG_CRYPTO_SEQIV is not set
1492 +CONFIG_CRYPTO_CBC=m
1493 +# CONFIG_CRYPTO_CTR is not set
1494 +# CONFIG_CRYPTO_CTS is not set
1495 +CONFIG_CRYPTO_ECB=m
1496 +# CONFIG_CRYPTO_LRW is not set
1497 +CONFIG_CRYPTO_PCBC=m
1498 +# CONFIG_CRYPTO_XTS is not set
1503 +# CONFIG_CRYPTO_HMAC is not set
1504 +# CONFIG_CRYPTO_XCBC is not set
1509 +# CONFIG_CRYPTO_CRC32C is not set
1510 +# CONFIG_CRYPTO_MD4 is not set
1511 +# CONFIG_CRYPTO_MD5 is not set
1512 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
1513 +# CONFIG_CRYPTO_SHA1 is not set
1514 +# CONFIG_CRYPTO_SHA256 is not set
1515 +# CONFIG_CRYPTO_SHA512 is not set
1516 +# CONFIG_CRYPTO_TGR192 is not set
1517 +# CONFIG_CRYPTO_WP512 is not set
1522 +# CONFIG_CRYPTO_AES is not set
1523 +# CONFIG_CRYPTO_ANUBIS is not set
1524 +# CONFIG_CRYPTO_ARC4 is not set
1525 +# CONFIG_CRYPTO_BLOWFISH is not set
1526 +# CONFIG_CRYPTO_CAMELLIA is not set
1527 +# CONFIG_CRYPTO_CAST5 is not set
1528 +# CONFIG_CRYPTO_CAST6 is not set
1529 +# CONFIG_CRYPTO_DES is not set
1530 +# CONFIG_CRYPTO_FCRYPT is not set
1531 +# CONFIG_CRYPTO_KHAZAD is not set
1532 +# CONFIG_CRYPTO_SALSA20 is not set
1533 +# CONFIG_CRYPTO_SEED is not set
1534 +# CONFIG_CRYPTO_SERPENT is not set
1535 +# CONFIG_CRYPTO_TEA is not set
1536 +# CONFIG_CRYPTO_TWOFISH is not set
1541 +# CONFIG_CRYPTO_DEFLATE is not set
1542 +# CONFIG_CRYPTO_LZO is not set
1544 +# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1549 +CONFIG_BITREVERSE=y
1550 +# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1551 +# CONFIG_GENERIC_FIND_NEXT_BIT is not set
1556 +# CONFIG_CRC7 is not set
1558 +CONFIG_ZLIB_INFLATE=y
1559 +CONFIG_ZLIB_DEFLATE=y
1562 +CONFIG_HAS_IOPORT=y
1565 +++ b/arch/arm/configs/loki_defconfig
1568 +# Automatically generated make config: don't edit
1569 +# Linux kernel version: 2.6.26-rc5
1570 +# Fri Jun 13 03:07:49 2008
1573 +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
1574 +# CONFIG_GENERIC_GPIO is not set
1575 +CONFIG_GENERIC_TIME=y
1576 +CONFIG_GENERIC_CLOCKEVENTS=y
1578 +# CONFIG_NO_IOPORT is not set
1579 +CONFIG_GENERIC_HARDIRQS=y
1580 +CONFIG_STACKTRACE_SUPPORT=y
1581 +CONFIG_HAVE_LATENCYTOP_SUPPORT=y
1582 +CONFIG_LOCKDEP_SUPPORT=y
1583 +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1584 +CONFIG_HARDIRQS_SW_RESEND=y
1585 +CONFIG_GENERIC_IRQ_PROBE=y
1586 +CONFIG_RWSEM_GENERIC_SPINLOCK=y
1587 +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
1588 +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
1589 +CONFIG_GENERIC_HWEIGHT=y
1590 +CONFIG_GENERIC_CALIBRATE_DELAY=y
1591 +CONFIG_ARCH_SUPPORTS_AOUT=y
1593 +CONFIG_VECTORS_BASE=0xffff0000
1594 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
1599 +CONFIG_EXPERIMENTAL=y
1600 +CONFIG_BROKEN_ON_SMP=y
1601 +CONFIG_LOCK_KERNEL=y
1602 +CONFIG_INIT_ENV_ARG_LIMIT=32
1603 +CONFIG_LOCALVERSION=""
1604 +CONFIG_LOCALVERSION_AUTO=y
1607 +CONFIG_SYSVIPC_SYSCTL=y
1608 +# CONFIG_POSIX_MQUEUE is not set
1609 +# CONFIG_BSD_PROCESS_ACCT is not set
1610 +# CONFIG_TASKSTATS is not set
1611 +# CONFIG_AUDIT is not set
1612 +# CONFIG_IKCONFIG is not set
1613 +CONFIG_LOG_BUF_SHIFT=14
1614 +# CONFIG_CGROUPS is not set
1615 +# CONFIG_GROUP_SCHED is not set
1616 +# CONFIG_SYSFS_DEPRECATED_V2 is not set
1617 +# CONFIG_RELAY is not set
1618 +# CONFIG_NAMESPACES is not set
1619 +# CONFIG_BLK_DEV_INITRD is not set
1620 +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
1624 +CONFIG_SYSCTL_SYSCALL=y
1625 +CONFIG_SYSCTL_SYSCALL_CHECK=y
1627 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
1632 +CONFIG_COMPAT_BRK=y
1635 +CONFIG_ANON_INODES=y
1641 +CONFIG_VM_EVENT_COUNTERS=y
1643 +# CONFIG_SLUB is not set
1644 +# CONFIG_SLOB is not set
1645 +# CONFIG_PROFILING is not set
1646 +# CONFIG_MARKERS is not set
1647 +CONFIG_HAVE_OPROFILE=y
1648 +# CONFIG_KPROBES is not set
1649 +CONFIG_HAVE_KPROBES=y
1650 +CONFIG_HAVE_KRETPROBES=y
1651 +# CONFIG_HAVE_DMA_ATTRS is not set
1652 +CONFIG_PROC_PAGE_MONITOR=y
1654 +CONFIG_RT_MUTEXES=y
1655 +# CONFIG_TINY_SHMEM is not set
1656 +CONFIG_BASE_SMALL=0
1658 +# CONFIG_MODULE_FORCE_LOAD is not set
1659 +CONFIG_MODULE_UNLOAD=y
1660 +# CONFIG_MODULE_FORCE_UNLOAD is not set
1661 +# CONFIG_MODVERSIONS is not set
1662 +# CONFIG_MODULE_SRCVERSION_ALL is not set
1663 +# CONFIG_KMOD is not set
1665 +# CONFIG_LBD is not set
1666 +# CONFIG_BLK_DEV_IO_TRACE is not set
1667 +# CONFIG_LSF is not set
1668 +# CONFIG_BLK_DEV_BSG is not set
1673 +CONFIG_IOSCHED_NOOP=y
1674 +CONFIG_IOSCHED_AS=y
1675 +CONFIG_IOSCHED_DEADLINE=y
1676 +CONFIG_IOSCHED_CFQ=y
1677 +# CONFIG_DEFAULT_AS is not set
1678 +# CONFIG_DEFAULT_DEADLINE is not set
1679 +CONFIG_DEFAULT_CFQ=y
1680 +# CONFIG_DEFAULT_NOOP is not set
1681 +CONFIG_DEFAULT_IOSCHED="cfq"
1682 +CONFIG_CLASSIC_RCU=y
1687 +# CONFIG_ARCH_AAEC2000 is not set
1688 +# CONFIG_ARCH_INTEGRATOR is not set
1689 +# CONFIG_ARCH_REALVIEW is not set
1690 +# CONFIG_ARCH_VERSATILE is not set
1691 +# CONFIG_ARCH_AT91 is not set
1692 +# CONFIG_ARCH_CLPS7500 is not set
1693 +# CONFIG_ARCH_CLPS711X is not set
1694 +# CONFIG_ARCH_CO285 is not set
1695 +# CONFIG_ARCH_EBSA110 is not set
1696 +# CONFIG_ARCH_EP93XX is not set
1697 +# CONFIG_ARCH_FOOTBRIDGE is not set
1698 +# CONFIG_ARCH_NETX is not set
1699 +# CONFIG_ARCH_H720X is not set
1700 +# CONFIG_ARCH_IMX is not set
1701 +# CONFIG_ARCH_IOP13XX is not set
1702 +# CONFIG_ARCH_IOP32X is not set
1703 +# CONFIG_ARCH_IOP33X is not set
1704 +# CONFIG_ARCH_IXP23XX is not set
1705 +# CONFIG_ARCH_IXP2000 is not set
1706 +# CONFIG_ARCH_IXP4XX is not set
1707 +# CONFIG_ARCH_L7200 is not set
1708 +# CONFIG_ARCH_KIRKWOOD is not set
1709 +# CONFIG_ARCH_KS8695 is not set
1710 +# CONFIG_ARCH_NS9XXX is not set
1712 +# CONFIG_ARCH_MV78XX0 is not set
1713 +# CONFIG_ARCH_MXC is not set
1714 +# CONFIG_ARCH_ORION5X is not set
1715 +# CONFIG_ARCH_PNX4008 is not set
1716 +# CONFIG_ARCH_PXA is not set
1717 +# CONFIG_ARCH_RPC is not set
1718 +# CONFIG_ARCH_SA1100 is not set
1719 +# CONFIG_ARCH_S3C2410 is not set
1720 +# CONFIG_ARCH_SHARK is not set
1721 +# CONFIG_ARCH_LH7A40X is not set
1722 +# CONFIG_ARCH_DAVINCI is not set
1723 +# CONFIG_ARCH_OMAP is not set
1724 +# CONFIG_ARCH_MSM7X00A is not set
1727 +# Marvell Loki (88RC8480) Implementations
1729 +CONFIG_MACH_LB88RC8480=y
1738 +CONFIG_PLAT_ORION=y
1744 +CONFIG_CPU_FEROCEON=y
1745 +# CONFIG_CPU_FEROCEON_OLD_ID is not set
1747 +CONFIG_CPU_ABRT_EV5T=y
1748 +CONFIG_CPU_PABRT_NOIFAR=y
1749 +CONFIG_CPU_CACHE_VIVT=y
1750 +CONFIG_CPU_COPY_FEROCEON=y
1751 +CONFIG_CPU_TLB_FEROCEON=y
1753 +CONFIG_CPU_CP15_MMU=y
1756 +# Processor Features
1759 +# CONFIG_CPU_ICACHE_DISABLE is not set
1760 +# CONFIG_CPU_DCACHE_DISABLE is not set
1761 +# CONFIG_OUTER_CACHE is not set
1766 +# CONFIG_PCI_SYSCALL is not set
1767 +# CONFIG_ARCH_SUPPORTS_MSI is not set
1768 +# CONFIG_PCCARD is not set
1773 +CONFIG_TICK_ONESHOT=y
1775 +CONFIG_HIGH_RES_TIMERS=y
1776 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
1780 +CONFIG_OABI_COMPAT=y
1781 +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
1782 +CONFIG_SELECT_MEMORY_MODEL=y
1783 +CONFIG_FLATMEM_MANUAL=y
1784 +# CONFIG_DISCONTIGMEM_MANUAL is not set
1785 +# CONFIG_SPARSEMEM_MANUAL is not set
1787 +CONFIG_FLAT_NODE_MEM_MAP=y
1788 +# CONFIG_SPARSEMEM_STATIC is not set
1789 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
1790 +CONFIG_PAGEFLAGS_EXTENDED=y
1791 +CONFIG_SPLIT_PTLOCK_CPUS=4096
1792 +# CONFIG_RESOURCES_64BIT is not set
1793 +CONFIG_ZONE_DMA_FLAG=1
1795 +CONFIG_VIRT_TO_BUS=y
1796 +CONFIG_ALIGNMENT_TRAP=y
1801 +CONFIG_ZBOOT_ROM_TEXT=0x0
1802 +CONFIG_ZBOOT_ROM_BSS=0x0
1804 +# CONFIG_XIP_KERNEL is not set
1805 +# CONFIG_KEXEC is not set
1808 +# Floating point emulation
1812 +# At least one emulation must be selected
1814 +# CONFIG_FPE_NWFPE is not set
1815 +# CONFIG_FPE_FASTFPE is not set
1816 +# CONFIG_VFP is not set
1819 +# Userspace binary formats
1821 +CONFIG_BINFMT_ELF=y
1822 +# CONFIG_BINFMT_AOUT is not set
1823 +# CONFIG_BINFMT_MISC is not set
1826 +# Power management options
1828 +# CONFIG_PM is not set
1829 +CONFIG_ARCH_SUSPEND_POSSIBLE=y
1837 +# Networking options
1840 +CONFIG_PACKET_MMAP=y
1843 +# CONFIG_XFRM_USER is not set
1844 +# CONFIG_XFRM_SUB_POLICY is not set
1845 +# CONFIG_XFRM_MIGRATE is not set
1846 +# CONFIG_XFRM_STATISTICS is not set
1847 +# CONFIG_NET_KEY is not set
1849 +CONFIG_IP_MULTICAST=y
1850 +# CONFIG_IP_ADVANCED_ROUTER is not set
1851 +CONFIG_IP_FIB_HASH=y
1853 +CONFIG_IP_PNP_DHCP=y
1854 +CONFIG_IP_PNP_BOOTP=y
1855 +# CONFIG_IP_PNP_RARP is not set
1856 +# CONFIG_NET_IPIP is not set
1857 +# CONFIG_NET_IPGRE is not set
1858 +# CONFIG_IP_MROUTE is not set
1859 +# CONFIG_ARPD is not set
1860 +# CONFIG_SYN_COOKIES is not set
1861 +# CONFIG_INET_AH is not set
1862 +# CONFIG_INET_ESP is not set
1863 +# CONFIG_INET_IPCOMP is not set
1864 +# CONFIG_INET_XFRM_TUNNEL is not set
1865 +# CONFIG_INET_TUNNEL is not set
1866 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
1867 +CONFIG_INET_XFRM_MODE_TUNNEL=y
1868 +CONFIG_INET_XFRM_MODE_BEET=y
1869 +# CONFIG_INET_LRO is not set
1871 +CONFIG_INET_TCP_DIAG=y
1872 +# CONFIG_TCP_CONG_ADVANCED is not set
1873 +CONFIG_TCP_CONG_CUBIC=y
1874 +CONFIG_DEFAULT_TCP_CONG="cubic"
1875 +# CONFIG_TCP_MD5SIG is not set
1876 +# CONFIG_IPV6 is not set
1877 +# CONFIG_NETWORK_SECMARK is not set
1878 +# CONFIG_NETFILTER is not set
1879 +# CONFIG_IP_DCCP is not set
1880 +# CONFIG_IP_SCTP is not set
1881 +# CONFIG_TIPC is not set
1882 +# CONFIG_ATM is not set
1883 +# CONFIG_BRIDGE is not set
1884 +# CONFIG_VLAN_8021Q is not set
1885 +# CONFIG_DECNET is not set
1886 +# CONFIG_LLC2 is not set
1887 +# CONFIG_IPX is not set
1888 +# CONFIG_ATALK is not set
1889 +# CONFIG_X25 is not set
1890 +# CONFIG_LAPB is not set
1891 +# CONFIG_ECONET is not set
1892 +# CONFIG_WAN_ROUTER is not set
1893 +# CONFIG_NET_SCHED is not set
1898 +CONFIG_NET_PKTGEN=m
1899 +# CONFIG_HAMRADIO is not set
1900 +# CONFIG_CAN is not set
1901 +# CONFIG_IRDA is not set
1902 +# CONFIG_BT is not set
1903 +# CONFIG_AF_RXRPC is not set
1908 +# CONFIG_CFG80211 is not set
1909 +CONFIG_WIRELESS_EXT=y
1910 +# CONFIG_MAC80211 is not set
1911 +# CONFIG_IEEE80211 is not set
1912 +# CONFIG_RFKILL is not set
1913 +# CONFIG_NET_9P is not set
1920 +# Generic Driver Options
1922 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
1923 +CONFIG_STANDALONE=y
1924 +CONFIG_PREVENT_FIRMWARE_BUILD=y
1926 +# CONFIG_SYS_HYPERVISOR is not set
1927 +# CONFIG_CONNECTOR is not set
1929 +# CONFIG_MTD_DEBUG is not set
1930 +# CONFIG_MTD_CONCAT is not set
1931 +CONFIG_MTD_PARTITIONS=y
1932 +# CONFIG_MTD_REDBOOT_PARTS is not set
1933 +CONFIG_MTD_CMDLINE_PARTS=y
1934 +# CONFIG_MTD_AFS_PARTS is not set
1935 +# CONFIG_MTD_AR7_PARTS is not set
1938 +# User Modules And Translation Layers
1941 +CONFIG_MTD_BLKDEVS=y
1945 +# CONFIG_NFTL_RW is not set
1946 +# CONFIG_INFTL is not set
1947 +# CONFIG_RFD_FTL is not set
1948 +# CONFIG_SSFDC is not set
1949 +# CONFIG_MTD_OOPS is not set
1952 +# RAM/ROM/Flash chip drivers
1955 +CONFIG_MTD_JEDECPROBE=y
1956 +CONFIG_MTD_GEN_PROBE=y
1957 +CONFIG_MTD_CFI_ADV_OPTIONS=y
1958 +CONFIG_MTD_CFI_NOSWAP=y
1959 +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
1960 +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
1961 +CONFIG_MTD_CFI_GEOMETRY=y
1962 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
1963 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
1964 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
1965 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
1966 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
1967 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
1968 +CONFIG_MTD_CFI_I1=y
1969 +CONFIG_MTD_CFI_I2=y
1970 +CONFIG_MTD_CFI_I4=y
1971 +# CONFIG_MTD_CFI_I8 is not set
1972 +# CONFIG_MTD_OTP is not set
1973 +CONFIG_MTD_CFI_INTELEXT=y
1974 +CONFIG_MTD_CFI_AMDSTD=y
1975 +CONFIG_MTD_CFI_STAA=y
1976 +CONFIG_MTD_CFI_UTIL=y
1977 +# CONFIG_MTD_RAM is not set
1978 +# CONFIG_MTD_ROM is not set
1979 +# CONFIG_MTD_ABSENT is not set
1982 +# Mapping drivers for chip access
1984 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
1985 +CONFIG_MTD_PHYSMAP=y
1986 +CONFIG_MTD_PHYSMAP_START=0x0
1987 +CONFIG_MTD_PHYSMAP_LEN=0x0
1988 +CONFIG_MTD_PHYSMAP_BANKWIDTH=0
1989 +# CONFIG_MTD_ARM_INTEGRATOR is not set
1990 +# CONFIG_MTD_IMPA7 is not set
1991 +# CONFIG_MTD_PLATRAM is not set
1994 +# Self-contained MTD device drivers
1996 +# CONFIG_MTD_DATAFLASH is not set
1997 +CONFIG_MTD_M25P80=y
1998 +CONFIG_M25PXX_USE_FAST_READ=y
1999 +# CONFIG_MTD_SLRAM is not set
2000 +# CONFIG_MTD_PHRAM is not set
2001 +# CONFIG_MTD_MTDRAM is not set
2002 +# CONFIG_MTD_BLOCK2MTD is not set
2005 +# Disk-On-Chip Device Drivers
2007 +# CONFIG_MTD_DOC2000 is not set
2008 +# CONFIG_MTD_DOC2001 is not set
2009 +# CONFIG_MTD_DOC2001PLUS is not set
2011 +CONFIG_MTD_NAND_VERIFY_WRITE=y
2012 +# CONFIG_MTD_NAND_ECC_SMC is not set
2013 +# CONFIG_MTD_NAND_MUSEUM_IDS is not set
2014 +CONFIG_MTD_NAND_IDS=y
2015 +# CONFIG_MTD_NAND_DISKONCHIP is not set
2016 +# CONFIG_MTD_NAND_NANDSIM is not set
2017 +# CONFIG_MTD_NAND_PLATFORM is not set
2018 +# CONFIG_MTD_ALAUDA is not set
2019 +CONFIG_MTD_NAND_ORION=y
2020 +# CONFIG_MTD_ONENAND is not set
2023 +# UBI - Unsorted block images
2025 +# CONFIG_MTD_UBI is not set
2026 +# CONFIG_PARPORT is not set
2028 +# CONFIG_BLK_DEV_COW_COMMON is not set
2029 +CONFIG_BLK_DEV_LOOP=y
2030 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
2031 +# CONFIG_BLK_DEV_NBD is not set
2032 +# CONFIG_BLK_DEV_UB is not set
2033 +# CONFIG_BLK_DEV_RAM is not set
2034 +# CONFIG_CDROM_PKTCDVD is not set
2035 +# CONFIG_ATA_OVER_ETH is not set
2036 +# CONFIG_MISC_DEVICES is not set
2038 +# CONFIG_IDE is not set
2041 +# SCSI device support
2043 +# CONFIG_RAID_ATTRS is not set
2046 +# CONFIG_SCSI_TGT is not set
2047 +# CONFIG_SCSI_NETLINK is not set
2048 +# CONFIG_SCSI_PROC_FS is not set
2051 +# SCSI support type (disk, tape, CD-ROM)
2053 +CONFIG_BLK_DEV_SD=y
2054 +# CONFIG_CHR_DEV_ST is not set
2055 +# CONFIG_CHR_DEV_OSST is not set
2056 +CONFIG_BLK_DEV_SR=m
2057 +# CONFIG_BLK_DEV_SR_VENDOR is not set
2058 +CONFIG_CHR_DEV_SG=m
2059 +# CONFIG_CHR_DEV_SCH is not set
2062 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
2064 +# CONFIG_SCSI_MULTI_LUN is not set
2065 +# CONFIG_SCSI_CONSTANTS is not set
2066 +# CONFIG_SCSI_LOGGING is not set
2067 +# CONFIG_SCSI_SCAN_ASYNC is not set
2068 +CONFIG_SCSI_WAIT_SCAN=m
2073 +# CONFIG_SCSI_SPI_ATTRS is not set
2074 +# CONFIG_SCSI_FC_ATTRS is not set
2075 +# CONFIG_SCSI_ISCSI_ATTRS is not set
2076 +# CONFIG_SCSI_SAS_LIBSAS is not set
2077 +# CONFIG_SCSI_SRP_ATTRS is not set
2078 +CONFIG_SCSI_LOWLEVEL=y
2079 +# CONFIG_ISCSI_TCP is not set
2080 +# CONFIG_SCSI_DEBUG is not set
2082 +# CONFIG_ATA_NONSTANDARD is not set
2086 +# CONFIG_PATA_PLATFORM is not set
2087 +# CONFIG_MD is not set
2088 +CONFIG_NETDEVICES=y
2089 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
2090 +# CONFIG_DUMMY is not set
2091 +# CONFIG_BONDING is not set
2092 +# CONFIG_MACVLAN is not set
2093 +# CONFIG_EQUALIZER is not set
2094 +# CONFIG_TUN is not set
2095 +# CONFIG_VETH is not set
2096 +# CONFIG_PHYLIB is not set
2097 +CONFIG_NET_ETHERNET=y
2099 +# CONFIG_AX88796 is not set
2100 +# CONFIG_SMC91X is not set
2101 +# CONFIG_DM9000 is not set
2102 +# CONFIG_ENC28J60 is not set
2103 +# CONFIG_IBM_NEW_EMAC_ZMII is not set
2104 +# CONFIG_IBM_NEW_EMAC_RGMII is not set
2105 +# CONFIG_IBM_NEW_EMAC_TAH is not set
2106 +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
2107 +# CONFIG_B44 is not set
2108 +CONFIG_NETDEV_1000=y
2109 +# CONFIG_E1000E_ENABLED is not set
2110 +CONFIG_MV643XX_ETH=y
2111 +# CONFIG_NETDEV_10000 is not set
2116 +# CONFIG_WLAN_PRE80211 is not set
2117 +# CONFIG_WLAN_80211 is not set
2118 +# CONFIG_IWLWIFI_LEDS is not set
2121 +# USB Network Adapters
2123 +# CONFIG_USB_CATC is not set
2124 +# CONFIG_USB_KAWETH is not set
2125 +# CONFIG_USB_PEGASUS is not set
2126 +# CONFIG_USB_RTL8150 is not set
2127 +# CONFIG_USB_USBNET is not set
2128 +# CONFIG_WAN is not set
2129 +# CONFIG_PPP is not set
2130 +# CONFIG_SLIP is not set
2131 +# CONFIG_NETCONSOLE is not set
2132 +# CONFIG_NETPOLL is not set
2133 +# CONFIG_NET_POLL_CONTROLLER is not set
2134 +# CONFIG_ISDN is not set
2137 +# Input device support
2140 +# CONFIG_INPUT_FF_MEMLESS is not set
2141 +# CONFIG_INPUT_POLLDEV is not set
2144 +# Userland interfaces
2146 +CONFIG_INPUT_MOUSEDEV=y
2147 +CONFIG_INPUT_MOUSEDEV_PSAUX=y
2148 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
2149 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
2150 +# CONFIG_INPUT_JOYDEV is not set
2151 +# CONFIG_INPUT_EVDEV is not set
2152 +# CONFIG_INPUT_EVBUG is not set
2155 +# Input Device Drivers
2157 +# CONFIG_INPUT_KEYBOARD is not set
2158 +# CONFIG_INPUT_MOUSE is not set
2159 +# CONFIG_INPUT_JOYSTICK is not set
2160 +# CONFIG_INPUT_TABLET is not set
2161 +# CONFIG_INPUT_TOUCHSCREEN is not set
2162 +# CONFIG_INPUT_MISC is not set
2165 +# Hardware I/O ports
2167 +# CONFIG_SERIO is not set
2168 +# CONFIG_GAMEPORT is not set
2171 +# Character devices
2174 +CONFIG_VT_CONSOLE=y
2175 +CONFIG_HW_CONSOLE=y
2176 +# CONFIG_VT_HW_CONSOLE_BINDING is not set
2178 +# CONFIG_SERIAL_NONSTANDARD is not set
2183 +CONFIG_SERIAL_8250=y
2184 +CONFIG_SERIAL_8250_CONSOLE=y
2185 +CONFIG_SERIAL_8250_NR_UARTS=4
2186 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2
2187 +# CONFIG_SERIAL_8250_EXTENDED is not set
2190 +# Non-8250 serial port support
2192 +CONFIG_SERIAL_CORE=y
2193 +CONFIG_SERIAL_CORE_CONSOLE=y
2194 +CONFIG_UNIX98_PTYS=y
2195 +CONFIG_LEGACY_PTYS=y
2196 +CONFIG_LEGACY_PTY_COUNT=16
2197 +# CONFIG_IPMI_HANDLER is not set
2199 +# CONFIG_NVRAM is not set
2200 +# CONFIG_R3964 is not set
2201 +# CONFIG_RAW_DRIVER is not set
2202 +# CONFIG_TCG_TPM is not set
2204 +CONFIG_I2C_BOARDINFO=y
2205 +CONFIG_I2C_CHARDEV=y
2208 +# I2C Hardware Bus support
2210 +# CONFIG_I2C_OCORES is not set
2211 +# CONFIG_I2C_PARPORT_LIGHT is not set
2212 +# CONFIG_I2C_SIMTEC is not set
2213 +# CONFIG_I2C_TAOS_EVM is not set
2214 +# CONFIG_I2C_STUB is not set
2215 +# CONFIG_I2C_TINY_USB is not set
2216 +# CONFIG_I2C_PCA_PLATFORM is not set
2217 +CONFIG_I2C_MV64XXX=y
2220 +# Miscellaneous I2C Chip support
2222 +# CONFIG_DS1682 is not set
2223 +# CONFIG_SENSORS_EEPROM is not set
2224 +# CONFIG_SENSORS_PCF8574 is not set
2225 +# CONFIG_PCF8575 is not set
2226 +# CONFIG_SENSORS_PCF8591 is not set
2227 +# CONFIG_SENSORS_MAX6875 is not set
2228 +# CONFIG_SENSORS_TSL2550 is not set
2229 +# CONFIG_I2C_DEBUG_CORE is not set
2230 +# CONFIG_I2C_DEBUG_ALGO is not set
2231 +# CONFIG_I2C_DEBUG_BUS is not set
2232 +# CONFIG_I2C_DEBUG_CHIP is not set
2234 +CONFIG_SPI_MASTER=y
2237 +# SPI Master Controller Drivers
2239 +# CONFIG_SPI_BITBANG is not set
2242 +# SPI Protocol Masters
2244 +# CONFIG_SPI_AT25 is not set
2245 +# CONFIG_SPI_SPIDEV is not set
2246 +# CONFIG_SPI_TLE62X0 is not set
2247 +# CONFIG_W1 is not set
2248 +# CONFIG_POWER_SUPPLY is not set
2249 +# CONFIG_HWMON is not set
2250 +# CONFIG_WATCHDOG is not set
2253 +# Sonics Silicon Backplane
2255 +CONFIG_SSB_POSSIBLE=y
2256 +# CONFIG_SSB is not set
2259 +# Multifunction device drivers
2261 +# CONFIG_MFD_SM501 is not set
2262 +# CONFIG_MFD_ASIC3 is not set
2263 +# CONFIG_HTC_PASIC3 is not set
2266 +# Multimedia devices
2270 +# Multimedia core support
2272 +# CONFIG_VIDEO_DEV is not set
2273 +# CONFIG_DVB_CORE is not set
2274 +# CONFIG_VIDEO_MEDIA is not set
2277 +# Multimedia drivers
2279 +# CONFIG_DAB is not set
2284 +# CONFIG_VGASTATE is not set
2285 +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
2286 +# CONFIG_FB is not set
2287 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
2290 +# Display device support
2292 +# CONFIG_DISPLAY_SUPPORT is not set
2295 +# Console display driver support
2297 +# CONFIG_VGA_CONSOLE is not set
2298 +CONFIG_DUMMY_CONSOLE=y
2303 +# CONFIG_SOUND is not set
2304 +CONFIG_HID_SUPPORT=y
2306 +# CONFIG_HID_DEBUG is not set
2307 +# CONFIG_HIDRAW is not set
2310 +# USB Input Devices
2313 +# CONFIG_USB_HIDINPUT_POWERBOOK is not set
2314 +# CONFIG_HID_FF is not set
2315 +# CONFIG_USB_HIDDEV is not set
2316 +CONFIG_USB_SUPPORT=y
2317 +CONFIG_USB_ARCH_HAS_HCD=y
2318 +# CONFIG_USB_ARCH_HAS_OHCI is not set
2319 +# CONFIG_USB_ARCH_HAS_EHCI is not set
2321 +# CONFIG_USB_DEBUG is not set
2322 +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
2325 +# Miscellaneous USB options
2327 +CONFIG_USB_DEVICEFS=y
2328 +CONFIG_USB_DEVICE_CLASS=y
2329 +# CONFIG_USB_DYNAMIC_MINORS is not set
2330 +# CONFIG_USB_OTG is not set
2331 +# CONFIG_USB_OTG_WHITELIST is not set
2332 +# CONFIG_USB_OTG_BLACKLIST_HUB is not set
2335 +# USB Host Controller Drivers
2337 +# CONFIG_USB_C67X00_HCD is not set
2338 +# CONFIG_USB_ISP116X_HCD is not set
2339 +# CONFIG_USB_ISP1760_HCD is not set
2340 +# CONFIG_USB_SL811_HCD is not set
2341 +# CONFIG_USB_R8A66597_HCD is not set
2344 +# USB Device Class drivers
2346 +# CONFIG_USB_ACM is not set
2347 +CONFIG_USB_PRINTER=y
2348 +# CONFIG_USB_WDM is not set
2351 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
2355 +# may also be needed; see USB_STORAGE Help for more information
2357 +CONFIG_USB_STORAGE=y
2358 +# CONFIG_USB_STORAGE_DEBUG is not set
2359 +CONFIG_USB_STORAGE_DATAFAB=y
2360 +CONFIG_USB_STORAGE_FREECOM=y
2361 +# CONFIG_USB_STORAGE_ISD200 is not set
2362 +CONFIG_USB_STORAGE_DPCM=y
2363 +# CONFIG_USB_STORAGE_USBAT is not set
2364 +CONFIG_USB_STORAGE_SDDR09=y
2365 +CONFIG_USB_STORAGE_SDDR55=y
2366 +CONFIG_USB_STORAGE_JUMPSHOT=y
2367 +# CONFIG_USB_STORAGE_ALAUDA is not set
2368 +# CONFIG_USB_STORAGE_ONETOUCH is not set
2369 +# CONFIG_USB_STORAGE_KARMA is not set
2370 +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
2371 +# CONFIG_USB_LIBUSUAL is not set
2374 +# USB Imaging devices
2376 +# CONFIG_USB_MDC800 is not set
2377 +# CONFIG_USB_MICROTEK is not set
2378 +# CONFIG_USB_MON is not set
2383 +# CONFIG_USB_SERIAL is not set
2386 +# USB Miscellaneous drivers
2388 +# CONFIG_USB_EMI62 is not set
2389 +# CONFIG_USB_EMI26 is not set
2390 +# CONFIG_USB_ADUTUX is not set
2391 +# CONFIG_USB_AUERSWALD is not set
2392 +# CONFIG_USB_RIO500 is not set
2393 +# CONFIG_USB_LEGOTOWER is not set
2394 +# CONFIG_USB_LCD is not set
2395 +# CONFIG_USB_BERRY_CHARGE is not set
2396 +# CONFIG_USB_LED is not set
2397 +# CONFIG_USB_CYPRESS_CY7C63 is not set
2398 +# CONFIG_USB_CYTHERM is not set
2399 +# CONFIG_USB_PHIDGET is not set
2400 +# CONFIG_USB_IDMOUSE is not set
2401 +# CONFIG_USB_FTDI_ELAN is not set
2402 +# CONFIG_USB_APPLEDISPLAY is not set
2403 +# CONFIG_USB_LD is not set
2404 +# CONFIG_USB_TRANCEVIBRATOR is not set
2405 +# CONFIG_USB_IOWARRIOR is not set
2406 +# CONFIG_USB_TEST is not set
2407 +# CONFIG_USB_ISIGHTFW is not set
2408 +# CONFIG_USB_GADGET is not set
2409 +# CONFIG_MMC is not set
2411 +# CONFIG_LEDS_CLASS is not set
2420 +# CONFIG_LEDS_TRIGGERS is not set
2422 +# CONFIG_RTC_CLASS is not set
2423 +# CONFIG_UIO is not set
2429 +# CONFIG_EXT2_FS_XATTR is not set
2430 +# CONFIG_EXT2_FS_XIP is not set
2432 +# CONFIG_EXT3_FS_XATTR is not set
2433 +# CONFIG_EXT4DEV_FS is not set
2435 +# CONFIG_REISERFS_FS is not set
2436 +# CONFIG_JFS_FS is not set
2437 +# CONFIG_FS_POSIX_ACL is not set
2439 +# CONFIG_XFS_QUOTA is not set
2440 +# CONFIG_XFS_POSIX_ACL is not set
2441 +# CONFIG_XFS_RT is not set
2442 +# CONFIG_XFS_DEBUG is not set
2443 +# CONFIG_OCFS2_FS is not set
2446 +CONFIG_INOTIFY_USER=y
2447 +# CONFIG_QUOTA is not set
2448 +# CONFIG_AUTOFS_FS is not set
2449 +# CONFIG_AUTOFS4_FS is not set
2450 +# CONFIG_FUSE_FS is not set
2453 +# CD-ROM/DVD Filesystems
2455 +CONFIG_ISO9660_FS=y
2456 +# CONFIG_JOLIET is not set
2457 +# CONFIG_ZISOFS is not set
2462 +# DOS/FAT/NT Filesystems
2467 +CONFIG_FAT_DEFAULT_CODEPAGE=437
2468 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
2469 +# CONFIG_NTFS_FS is not set
2472 +# Pseudo filesystems
2475 +CONFIG_PROC_SYSCTL=y
2478 +# CONFIG_TMPFS_POSIX_ACL is not set
2479 +# CONFIG_HUGETLB_PAGE is not set
2480 +# CONFIG_CONFIGFS_FS is not set
2483 +# Miscellaneous filesystems
2485 +# CONFIG_ADFS_FS is not set
2486 +# CONFIG_AFFS_FS is not set
2487 +# CONFIG_HFS_FS is not set
2488 +# CONFIG_HFSPLUS_FS is not set
2489 +# CONFIG_BEFS_FS is not set
2490 +# CONFIG_BFS_FS is not set
2491 +# CONFIG_EFS_FS is not set
2493 +CONFIG_JFFS2_FS_DEBUG=0
2494 +CONFIG_JFFS2_FS_WRITEBUFFER=y
2495 +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
2496 +# CONFIG_JFFS2_SUMMARY is not set
2497 +# CONFIG_JFFS2_FS_XATTR is not set
2498 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
2499 +CONFIG_JFFS2_ZLIB=y
2500 +# CONFIG_JFFS2_LZO is not set
2501 +CONFIG_JFFS2_RTIME=y
2502 +# CONFIG_JFFS2_RUBIN is not set
2504 +# CONFIG_VXFS_FS is not set
2505 +# CONFIG_MINIX_FS is not set
2506 +# CONFIG_HPFS_FS is not set
2507 +# CONFIG_QNX4FS_FS is not set
2508 +# CONFIG_ROMFS_FS is not set
2509 +# CONFIG_SYSV_FS is not set
2510 +# CONFIG_UFS_FS is not set
2511 +CONFIG_NETWORK_FILESYSTEMS=y
2514 +# CONFIG_NFS_V3_ACL is not set
2515 +# CONFIG_NFS_V4 is not set
2516 +# CONFIG_NFSD is not set
2520 +CONFIG_NFS_COMMON=y
2522 +# CONFIG_SUNRPC_BIND34 is not set
2523 +# CONFIG_RPCSEC_GSS_KRB5 is not set
2524 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
2525 +# CONFIG_SMB_FS is not set
2526 +# CONFIG_CIFS is not set
2527 +# CONFIG_NCP_FS is not set
2528 +# CONFIG_CODA_FS is not set
2529 +# CONFIG_AFS_FS is not set
2534 +CONFIG_PARTITION_ADVANCED=y
2535 +# CONFIG_ACORN_PARTITION is not set
2536 +# CONFIG_OSF_PARTITION is not set
2537 +# CONFIG_AMIGA_PARTITION is not set
2538 +# CONFIG_ATARI_PARTITION is not set
2539 +# CONFIG_MAC_PARTITION is not set
2540 +CONFIG_MSDOS_PARTITION=y
2541 +CONFIG_BSD_DISKLABEL=y
2542 +CONFIG_MINIX_SUBPARTITION=y
2543 +CONFIG_SOLARIS_X86_PARTITION=y
2544 +CONFIG_UNIXWARE_DISKLABEL=y
2545 +CONFIG_LDM_PARTITION=y
2547 +# CONFIG_SGI_PARTITION is not set
2548 +# CONFIG_ULTRIX_PARTITION is not set
2549 +CONFIG_SUN_PARTITION=y
2550 +# CONFIG_KARMA_PARTITION is not set
2551 +# CONFIG_EFI_PARTITION is not set
2552 +# CONFIG_SYSV68_PARTITION is not set
2554 +CONFIG_NLS_DEFAULT="iso8859-1"
2555 +CONFIG_NLS_CODEPAGE_437=y
2556 +# CONFIG_NLS_CODEPAGE_737 is not set
2557 +# CONFIG_NLS_CODEPAGE_775 is not set
2558 +CONFIG_NLS_CODEPAGE_850=y
2559 +# CONFIG_NLS_CODEPAGE_852 is not set
2560 +# CONFIG_NLS_CODEPAGE_855 is not set
2561 +# CONFIG_NLS_CODEPAGE_857 is not set
2562 +# CONFIG_NLS_CODEPAGE_860 is not set
2563 +# CONFIG_NLS_CODEPAGE_861 is not set
2564 +# CONFIG_NLS_CODEPAGE_862 is not set
2565 +# CONFIG_NLS_CODEPAGE_863 is not set
2566 +# CONFIG_NLS_CODEPAGE_864 is not set
2567 +# CONFIG_NLS_CODEPAGE_865 is not set
2568 +# CONFIG_NLS_CODEPAGE_866 is not set
2569 +# CONFIG_NLS_CODEPAGE_869 is not set
2570 +# CONFIG_NLS_CODEPAGE_936 is not set
2571 +# CONFIG_NLS_CODEPAGE_950 is not set
2572 +# CONFIG_NLS_CODEPAGE_932 is not set
2573 +# CONFIG_NLS_CODEPAGE_949 is not set
2574 +# CONFIG_NLS_CODEPAGE_874 is not set
2575 +# CONFIG_NLS_ISO8859_8 is not set
2576 +# CONFIG_NLS_CODEPAGE_1250 is not set
2577 +# CONFIG_NLS_CODEPAGE_1251 is not set
2578 +# CONFIG_NLS_ASCII is not set
2579 +CONFIG_NLS_ISO8859_1=y
2580 +CONFIG_NLS_ISO8859_2=y
2581 +# CONFIG_NLS_ISO8859_3 is not set
2582 +# CONFIG_NLS_ISO8859_4 is not set
2583 +# CONFIG_NLS_ISO8859_5 is not set
2584 +# CONFIG_NLS_ISO8859_6 is not set
2585 +# CONFIG_NLS_ISO8859_7 is not set
2586 +# CONFIG_NLS_ISO8859_9 is not set
2587 +# CONFIG_NLS_ISO8859_13 is not set
2588 +# CONFIG_NLS_ISO8859_14 is not set
2589 +# CONFIG_NLS_ISO8859_15 is not set
2590 +# CONFIG_NLS_KOI8_R is not set
2591 +# CONFIG_NLS_KOI8_U is not set
2592 +# CONFIG_NLS_UTF8 is not set
2593 +# CONFIG_DLM is not set
2598 +# CONFIG_PRINTK_TIME is not set
2599 +CONFIG_ENABLE_WARN_DEPRECATED=y
2600 +CONFIG_ENABLE_MUST_CHECK=y
2601 +CONFIG_FRAME_WARN=1024
2602 +CONFIG_MAGIC_SYSRQ=y
2603 +# CONFIG_UNUSED_SYMBOLS is not set
2604 +# CONFIG_DEBUG_FS is not set
2605 +# CONFIG_HEADERS_CHECK is not set
2606 +# CONFIG_DEBUG_KERNEL is not set
2607 +# CONFIG_DEBUG_BUGVERBOSE is not set
2608 +CONFIG_FRAME_POINTER=y
2609 +# CONFIG_LATENCYTOP is not set
2610 +# CONFIG_SAMPLES is not set
2611 +CONFIG_DEBUG_USER=y
2616 +# CONFIG_KEYS is not set
2617 +# CONFIG_SECURITY is not set
2618 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
2622 +# Crypto core or helper
2624 +CONFIG_CRYPTO_ALGAPI=m
2625 +CONFIG_CRYPTO_BLKCIPHER=m
2626 +CONFIG_CRYPTO_MANAGER=m
2627 +# CONFIG_CRYPTO_GF128MUL is not set
2628 +# CONFIG_CRYPTO_NULL is not set
2629 +# CONFIG_CRYPTO_CRYPTD is not set
2630 +# CONFIG_CRYPTO_AUTHENC is not set
2631 +# CONFIG_CRYPTO_TEST is not set
2634 +# Authenticated Encryption with Associated Data
2636 +# CONFIG_CRYPTO_CCM is not set
2637 +# CONFIG_CRYPTO_GCM is not set
2638 +# CONFIG_CRYPTO_SEQIV is not set
2643 +CONFIG_CRYPTO_CBC=m
2644 +# CONFIG_CRYPTO_CTR is not set
2645 +# CONFIG_CRYPTO_CTS is not set
2646 +CONFIG_CRYPTO_ECB=m
2647 +# CONFIG_CRYPTO_LRW is not set
2648 +CONFIG_CRYPTO_PCBC=m
2649 +# CONFIG_CRYPTO_XTS is not set
2654 +# CONFIG_CRYPTO_HMAC is not set
2655 +# CONFIG_CRYPTO_XCBC is not set
2660 +# CONFIG_CRYPTO_CRC32C is not set
2661 +# CONFIG_CRYPTO_MD4 is not set
2662 +# CONFIG_CRYPTO_MD5 is not set
2663 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
2664 +# CONFIG_CRYPTO_SHA1 is not set
2665 +# CONFIG_CRYPTO_SHA256 is not set
2666 +# CONFIG_CRYPTO_SHA512 is not set
2667 +# CONFIG_CRYPTO_TGR192 is not set
2668 +# CONFIG_CRYPTO_WP512 is not set
2673 +# CONFIG_CRYPTO_AES is not set
2674 +# CONFIG_CRYPTO_ANUBIS is not set
2675 +# CONFIG_CRYPTO_ARC4 is not set
2676 +# CONFIG_CRYPTO_BLOWFISH is not set
2677 +# CONFIG_CRYPTO_CAMELLIA is not set
2678 +# CONFIG_CRYPTO_CAST5 is not set
2679 +# CONFIG_CRYPTO_CAST6 is not set
2680 +# CONFIG_CRYPTO_DES is not set
2681 +# CONFIG_CRYPTO_FCRYPT is not set
2682 +# CONFIG_CRYPTO_KHAZAD is not set
2683 +# CONFIG_CRYPTO_SALSA20 is not set
2684 +# CONFIG_CRYPTO_SEED is not set
2685 +# CONFIG_CRYPTO_SERPENT is not set
2686 +# CONFIG_CRYPTO_TEA is not set
2687 +# CONFIG_CRYPTO_TWOFISH is not set
2692 +# CONFIG_CRYPTO_DEFLATE is not set
2693 +# CONFIG_CRYPTO_LZO is not set
2699 +CONFIG_BITREVERSE=y
2700 +# CONFIG_GENERIC_FIND_FIRST_BIT is not set
2701 +# CONFIG_GENERIC_FIND_NEXT_BIT is not set
2706 +# CONFIG_CRC7 is not set
2708 +CONFIG_ZLIB_INFLATE=y
2709 +CONFIG_ZLIB_DEFLATE=y
2712 +CONFIG_HAS_IOPORT=y
2715 +++ b/arch/arm/configs/mv78xx0_defconfig
2718 +# Automatically generated make config: don't edit
2719 +# Linux kernel version: 2.6.26-rc5
2720 +# Fri Jun 13 02:57:32 2008
2723 +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
2724 +# CONFIG_GENERIC_GPIO is not set
2725 +CONFIG_GENERIC_TIME=y
2726 +CONFIG_GENERIC_CLOCKEVENTS=y
2728 +# CONFIG_NO_IOPORT is not set
2729 +CONFIG_GENERIC_HARDIRQS=y
2730 +CONFIG_STACKTRACE_SUPPORT=y
2731 +CONFIG_HAVE_LATENCYTOP_SUPPORT=y
2732 +CONFIG_LOCKDEP_SUPPORT=y
2733 +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
2734 +CONFIG_HARDIRQS_SW_RESEND=y
2735 +CONFIG_GENERIC_IRQ_PROBE=y
2736 +CONFIG_RWSEM_GENERIC_SPINLOCK=y
2737 +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
2738 +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
2739 +CONFIG_GENERIC_HWEIGHT=y
2740 +CONFIG_GENERIC_CALIBRATE_DELAY=y
2741 +CONFIG_ARCH_SUPPORTS_AOUT=y
2743 +CONFIG_VECTORS_BASE=0xffff0000
2744 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
2749 +CONFIG_EXPERIMENTAL=y
2750 +CONFIG_BROKEN_ON_SMP=y
2751 +CONFIG_LOCK_KERNEL=y
2752 +CONFIG_INIT_ENV_ARG_LIMIT=32
2753 +CONFIG_LOCALVERSION=""
2754 +CONFIG_LOCALVERSION_AUTO=y
2757 +CONFIG_SYSVIPC_SYSCTL=y
2758 +# CONFIG_POSIX_MQUEUE is not set
2759 +# CONFIG_BSD_PROCESS_ACCT is not set
2760 +# CONFIG_TASKSTATS is not set
2761 +# CONFIG_AUDIT is not set
2762 +# CONFIG_IKCONFIG is not set
2763 +CONFIG_LOG_BUF_SHIFT=14
2764 +# CONFIG_CGROUPS is not set
2765 +# CONFIG_GROUP_SCHED is not set
2766 +CONFIG_SYSFS_DEPRECATED=y
2767 +CONFIG_SYSFS_DEPRECATED_V2=y
2768 +# CONFIG_RELAY is not set
2769 +# CONFIG_NAMESPACES is not set
2770 +# CONFIG_BLK_DEV_INITRD is not set
2771 +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
2775 +CONFIG_SYSCTL_SYSCALL=y
2776 +CONFIG_SYSCTL_SYSCALL_CHECK=y
2778 +CONFIG_KALLSYMS_ALL=y
2779 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
2784 +CONFIG_COMPAT_BRK=y
2787 +CONFIG_ANON_INODES=y
2793 +CONFIG_VM_EVENT_COUNTERS=y
2794 +# CONFIG_SLUB_DEBUG is not set
2795 +# CONFIG_SLAB is not set
2797 +# CONFIG_SLOB is not set
2799 +# CONFIG_MARKERS is not set
2801 +CONFIG_HAVE_OPROFILE=y
2803 +CONFIG_KRETPROBES=y
2804 +CONFIG_HAVE_KPROBES=y
2805 +CONFIG_HAVE_KRETPROBES=y
2806 +# CONFIG_HAVE_DMA_ATTRS is not set
2807 +CONFIG_PROC_PAGE_MONITOR=y
2808 +CONFIG_RT_MUTEXES=y
2809 +# CONFIG_TINY_SHMEM is not set
2810 +CONFIG_BASE_SMALL=0
2812 +# CONFIG_MODULE_FORCE_LOAD is not set
2813 +CONFIG_MODULE_UNLOAD=y
2814 +# CONFIG_MODULE_FORCE_UNLOAD is not set
2815 +# CONFIG_MODVERSIONS is not set
2816 +# CONFIG_MODULE_SRCVERSION_ALL is not set
2817 +# CONFIG_KMOD is not set
2819 +# CONFIG_LBD is not set
2820 +# CONFIG_BLK_DEV_IO_TRACE is not set
2821 +# CONFIG_LSF is not set
2822 +# CONFIG_BLK_DEV_BSG is not set
2827 +CONFIG_IOSCHED_NOOP=y
2828 +CONFIG_IOSCHED_AS=y
2829 +CONFIG_IOSCHED_DEADLINE=y
2830 +CONFIG_IOSCHED_CFQ=y
2831 +# CONFIG_DEFAULT_AS is not set
2832 +# CONFIG_DEFAULT_DEADLINE is not set
2833 +CONFIG_DEFAULT_CFQ=y
2834 +# CONFIG_DEFAULT_NOOP is not set
2835 +CONFIG_DEFAULT_IOSCHED="cfq"
2836 +CONFIG_CLASSIC_RCU=y
2841 +# CONFIG_ARCH_AAEC2000 is not set
2842 +# CONFIG_ARCH_INTEGRATOR is not set
2843 +# CONFIG_ARCH_REALVIEW is not set
2844 +# CONFIG_ARCH_VERSATILE is not set
2845 +# CONFIG_ARCH_AT91 is not set
2846 +# CONFIG_ARCH_CLPS7500 is not set
2847 +# CONFIG_ARCH_CLPS711X is not set
2848 +# CONFIG_ARCH_CO285 is not set
2849 +# CONFIG_ARCH_EBSA110 is not set
2850 +# CONFIG_ARCH_EP93XX is not set
2851 +# CONFIG_ARCH_FOOTBRIDGE is not set
2852 +# CONFIG_ARCH_NETX is not set
2853 +# CONFIG_ARCH_H720X is not set
2854 +# CONFIG_ARCH_IMX is not set
2855 +# CONFIG_ARCH_IOP13XX is not set
2856 +# CONFIG_ARCH_IOP32X is not set
2857 +# CONFIG_ARCH_IOP33X is not set
2858 +# CONFIG_ARCH_IXP23XX is not set
2859 +# CONFIG_ARCH_IXP2000 is not set
2860 +# CONFIG_ARCH_IXP4XX is not set
2861 +# CONFIG_ARCH_L7200 is not set
2862 +# CONFIG_ARCH_KIRKWOOD is not set
2863 +# CONFIG_ARCH_KS8695 is not set
2864 +# CONFIG_ARCH_NS9XXX is not set
2865 +# CONFIG_ARCH_LOKI is not set
2866 +CONFIG_ARCH_MV78XX0=y
2867 +# CONFIG_ARCH_MXC is not set
2868 +# CONFIG_ARCH_ORION5X is not set
2869 +# CONFIG_ARCH_PNX4008 is not set
2870 +# CONFIG_ARCH_PXA is not set
2871 +# CONFIG_ARCH_RPC is not set
2872 +# CONFIG_ARCH_SA1100 is not set
2873 +# CONFIG_ARCH_S3C2410 is not set
2874 +# CONFIG_ARCH_SHARK is not set
2875 +# CONFIG_ARCH_LH7A40X is not set
2876 +# CONFIG_ARCH_DAVINCI is not set
2877 +# CONFIG_ARCH_OMAP is not set
2878 +# CONFIG_ARCH_MSM7X00A is not set
2881 +# Marvell MV78xx0 Implementations
2883 +CONFIG_MACH_DB78X00_BP=y
2892 +CONFIG_PLAT_ORION=y
2898 +CONFIG_CPU_FEROCEON=y
2899 +CONFIG_CPU_FEROCEON_OLD_ID=y
2901 +CONFIG_CPU_ABRT_EV5T=y
2902 +CONFIG_CPU_PABRT_NOIFAR=y
2903 +CONFIG_CPU_CACHE_VIVT=y
2904 +CONFIG_CPU_COPY_FEROCEON=y
2905 +CONFIG_CPU_TLB_FEROCEON=y
2907 +CONFIG_CPU_CP15_MMU=y
2910 +# Processor Features
2913 +# CONFIG_CPU_ICACHE_DISABLE is not set
2914 +# CONFIG_CPU_DCACHE_DISABLE is not set
2915 +CONFIG_OUTER_CACHE=y
2916 +CONFIG_CACHE_FEROCEON_L2=y
2922 +CONFIG_PCI_SYSCALL=y
2923 +# CONFIG_ARCH_SUPPORTS_MSI is not set
2924 +CONFIG_PCI_LEGACY=y
2925 +# CONFIG_PCI_DEBUG is not set
2926 +# CONFIG_PCCARD is not set
2931 +CONFIG_TICK_ONESHOT=y
2933 +CONFIG_HIGH_RES_TIMERS=y
2934 +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
2938 +CONFIG_OABI_COMPAT=y
2939 +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
2940 +CONFIG_SELECT_MEMORY_MODEL=y
2941 +CONFIG_FLATMEM_MANUAL=y
2942 +# CONFIG_DISCONTIGMEM_MANUAL is not set
2943 +# CONFIG_SPARSEMEM_MANUAL is not set
2945 +CONFIG_FLAT_NODE_MEM_MAP=y
2946 +# CONFIG_SPARSEMEM_STATIC is not set
2947 +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
2948 +CONFIG_PAGEFLAGS_EXTENDED=y
2949 +CONFIG_SPLIT_PTLOCK_CPUS=4096
2950 +# CONFIG_RESOURCES_64BIT is not set
2951 +CONFIG_ZONE_DMA_FLAG=1
2953 +CONFIG_VIRT_TO_BUS=y
2954 +CONFIG_ALIGNMENT_TRAP=y
2959 +CONFIG_ZBOOT_ROM_TEXT=0x0
2960 +CONFIG_ZBOOT_ROM_BSS=0x0
2962 +# CONFIG_XIP_KERNEL is not set
2963 +# CONFIG_KEXEC is not set
2966 +# Floating point emulation
2970 +# At least one emulation must be selected
2973 +# CONFIG_FPE_NWFPE_XP is not set
2974 +# CONFIG_FPE_FASTFPE is not set
2978 +# Userspace binary formats
2980 +CONFIG_BINFMT_ELF=y
2981 +# CONFIG_BINFMT_AOUT is not set
2982 +# CONFIG_BINFMT_MISC is not set
2985 +# Power management options
2987 +# CONFIG_PM is not set
2988 +CONFIG_ARCH_SUSPEND_POSSIBLE=y
2996 +# Networking options
2999 +CONFIG_PACKET_MMAP=y
3002 +# CONFIG_XFRM_USER is not set
3003 +# CONFIG_XFRM_SUB_POLICY is not set
3004 +# CONFIG_XFRM_MIGRATE is not set
3005 +# CONFIG_XFRM_STATISTICS is not set
3006 +# CONFIG_NET_KEY is not set
3008 +CONFIG_IP_MULTICAST=y
3009 +# CONFIG_IP_ADVANCED_ROUTER is not set
3010 +CONFIG_IP_FIB_HASH=y
3012 +CONFIG_IP_PNP_DHCP=y
3013 +CONFIG_IP_PNP_BOOTP=y
3014 +# CONFIG_IP_PNP_RARP is not set
3015 +# CONFIG_NET_IPIP is not set
3016 +# CONFIG_NET_IPGRE is not set
3017 +# CONFIG_IP_MROUTE is not set
3018 +# CONFIG_ARPD is not set
3019 +# CONFIG_SYN_COOKIES is not set
3020 +# CONFIG_INET_AH is not set
3021 +# CONFIG_INET_ESP is not set
3022 +# CONFIG_INET_IPCOMP is not set
3023 +# CONFIG_INET_XFRM_TUNNEL is not set
3024 +# CONFIG_INET_TUNNEL is not set
3025 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
3026 +CONFIG_INET_XFRM_MODE_TUNNEL=y
3027 +CONFIG_INET_XFRM_MODE_BEET=y
3028 +# CONFIG_INET_LRO is not set
3030 +CONFIG_INET_TCP_DIAG=y
3031 +# CONFIG_TCP_CONG_ADVANCED is not set
3032 +CONFIG_TCP_CONG_CUBIC=y
3033 +CONFIG_DEFAULT_TCP_CONG="cubic"
3034 +# CONFIG_TCP_MD5SIG is not set
3035 +# CONFIG_IPV6 is not set
3036 +# CONFIG_NETWORK_SECMARK is not set
3037 +# CONFIG_NETFILTER is not set
3038 +# CONFIG_IP_DCCP is not set
3039 +# CONFIG_IP_SCTP is not set
3040 +# CONFIG_TIPC is not set
3041 +# CONFIG_ATM is not set
3042 +# CONFIG_BRIDGE is not set
3043 +# CONFIG_VLAN_8021Q is not set
3044 +# CONFIG_DECNET is not set
3045 +# CONFIG_LLC2 is not set
3046 +# CONFIG_IPX is not set
3047 +# CONFIG_ATALK is not set
3048 +# CONFIG_X25 is not set
3049 +# CONFIG_LAPB is not set
3050 +# CONFIG_ECONET is not set
3051 +# CONFIG_WAN_ROUTER is not set
3052 +# CONFIG_NET_SCHED is not set
3057 +CONFIG_NET_PKTGEN=m
3058 +# CONFIG_NET_TCPPROBE is not set
3059 +# CONFIG_HAMRADIO is not set
3060 +# CONFIG_CAN is not set
3061 +# CONFIG_IRDA is not set
3062 +# CONFIG_BT is not set
3063 +# CONFIG_AF_RXRPC is not set
3068 +# CONFIG_CFG80211 is not set
3069 +CONFIG_WIRELESS_EXT=y
3070 +# CONFIG_MAC80211 is not set
3071 +# CONFIG_IEEE80211 is not set
3072 +# CONFIG_RFKILL is not set
3073 +# CONFIG_NET_9P is not set
3080 +# Generic Driver Options
3082 +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
3083 +CONFIG_STANDALONE=y
3084 +CONFIG_PREVENT_FIRMWARE_BUILD=y
3086 +# CONFIG_DEBUG_DRIVER is not set
3087 +# CONFIG_DEBUG_DEVRES is not set
3088 +# CONFIG_SYS_HYPERVISOR is not set
3089 +# CONFIG_CONNECTOR is not set
3091 +# CONFIG_MTD_DEBUG is not set
3092 +# CONFIG_MTD_CONCAT is not set
3093 +CONFIG_MTD_PARTITIONS=y
3094 +# CONFIG_MTD_REDBOOT_PARTS is not set
3095 +CONFIG_MTD_CMDLINE_PARTS=y
3096 +# CONFIG_MTD_AFS_PARTS is not set
3097 +# CONFIG_MTD_AR7_PARTS is not set
3100 +# User Modules And Translation Layers
3103 +CONFIG_MTD_BLKDEVS=y
3105 +# CONFIG_FTL is not set
3106 +# CONFIG_NFTL is not set
3107 +# CONFIG_INFTL is not set
3108 +# CONFIG_RFD_FTL is not set
3109 +# CONFIG_SSFDC is not set
3110 +# CONFIG_MTD_OOPS is not set
3113 +# RAM/ROM/Flash chip drivers
3116 +CONFIG_MTD_JEDECPROBE=y
3117 +CONFIG_MTD_GEN_PROBE=y
3118 +CONFIG_MTD_CFI_ADV_OPTIONS=y
3119 +CONFIG_MTD_CFI_NOSWAP=y
3120 +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
3121 +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
3122 +CONFIG_MTD_CFI_GEOMETRY=y
3123 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
3124 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
3125 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
3126 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
3127 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
3128 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
3129 +CONFIG_MTD_CFI_I1=y
3130 +CONFIG_MTD_CFI_I2=y
3131 +# CONFIG_MTD_CFI_I4 is not set
3132 +# CONFIG_MTD_CFI_I8 is not set
3133 +# CONFIG_MTD_OTP is not set
3134 +CONFIG_MTD_CFI_INTELEXT=y
3135 +CONFIG_MTD_CFI_AMDSTD=y
3136 +# CONFIG_MTD_CFI_STAA is not set
3137 +CONFIG_MTD_CFI_UTIL=y
3138 +# CONFIG_MTD_RAM is not set
3139 +# CONFIG_MTD_ROM is not set
3140 +# CONFIG_MTD_ABSENT is not set
3143 +# Mapping drivers for chip access
3145 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
3146 +CONFIG_MTD_PHYSMAP=y
3147 +CONFIG_MTD_PHYSMAP_START=0x0
3148 +CONFIG_MTD_PHYSMAP_LEN=0x0
3149 +CONFIG_MTD_PHYSMAP_BANKWIDTH=0
3150 +# CONFIG_MTD_ARM_INTEGRATOR is not set
3151 +# CONFIG_MTD_IMPA7 is not set
3152 +# CONFIG_MTD_INTEL_VR_NOR is not set
3153 +# CONFIG_MTD_PLATRAM is not set
3156 +# Self-contained MTD device drivers
3158 +# CONFIG_MTD_PMC551 is not set
3159 +# CONFIG_MTD_SLRAM is not set
3160 +# CONFIG_MTD_PHRAM is not set
3161 +# CONFIG_MTD_MTDRAM is not set
3162 +# CONFIG_MTD_BLOCK2MTD is not set
3165 +# Disk-On-Chip Device Drivers
3167 +# CONFIG_MTD_DOC2000 is not set
3168 +# CONFIG_MTD_DOC2001 is not set
3169 +# CONFIG_MTD_DOC2001PLUS is not set
3171 +CONFIG_MTD_NAND_VERIFY_WRITE=y
3172 +# CONFIG_MTD_NAND_ECC_SMC is not set
3173 +# CONFIG_MTD_NAND_MUSEUM_IDS is not set
3174 +CONFIG_MTD_NAND_IDS=y
3175 +# CONFIG_MTD_NAND_DISKONCHIP is not set
3176 +# CONFIG_MTD_NAND_CAFE is not set
3177 +# CONFIG_MTD_NAND_NANDSIM is not set
3178 +# CONFIG_MTD_NAND_PLATFORM is not set
3179 +# CONFIG_MTD_ALAUDA is not set
3180 +CONFIG_MTD_NAND_ORION=y
3181 +# CONFIG_MTD_ONENAND is not set
3184 +# UBI - Unsorted block images
3186 +# CONFIG_MTD_UBI is not set
3187 +# CONFIG_PARPORT is not set
3189 +# CONFIG_BLK_CPQ_DA is not set
3190 +# CONFIG_BLK_CPQ_CISS_DA is not set
3191 +# CONFIG_BLK_DEV_DAC960 is not set
3192 +# CONFIG_BLK_DEV_UMEM is not set
3193 +# CONFIG_BLK_DEV_COW_COMMON is not set
3194 +CONFIG_BLK_DEV_LOOP=y
3195 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
3196 +# CONFIG_BLK_DEV_NBD is not set
3197 +# CONFIG_BLK_DEV_SX8 is not set
3198 +# CONFIG_BLK_DEV_UB is not set
3199 +# CONFIG_BLK_DEV_RAM is not set
3200 +# CONFIG_CDROM_PKTCDVD is not set
3201 +# CONFIG_ATA_OVER_ETH is not set
3202 +CONFIG_MISC_DEVICES=y
3203 +# CONFIG_PHANTOM is not set
3204 +# CONFIG_EEPROM_93CX6 is not set
3205 +# CONFIG_SGI_IOC4 is not set
3206 +# CONFIG_TIFM_CORE is not set
3207 +# CONFIG_ENCLOSURE_SERVICES is not set
3209 +# CONFIG_IDE is not set
3212 +# SCSI device support
3214 +# CONFIG_RAID_ATTRS is not set
3217 +# CONFIG_SCSI_TGT is not set
3218 +# CONFIG_SCSI_NETLINK is not set
3219 +# CONFIG_SCSI_PROC_FS is not set
3222 +# SCSI support type (disk, tape, CD-ROM)
3224 +CONFIG_BLK_DEV_SD=y
3225 +# CONFIG_CHR_DEV_ST is not set
3226 +# CONFIG_CHR_DEV_OSST is not set
3227 +CONFIG_BLK_DEV_SR=m
3228 +# CONFIG_BLK_DEV_SR_VENDOR is not set
3229 +CONFIG_CHR_DEV_SG=m
3230 +# CONFIG_CHR_DEV_SCH is not set
3233 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
3235 +# CONFIG_SCSI_MULTI_LUN is not set
3236 +# CONFIG_SCSI_CONSTANTS is not set
3237 +# CONFIG_SCSI_LOGGING is not set
3238 +# CONFIG_SCSI_SCAN_ASYNC is not set
3239 +CONFIG_SCSI_WAIT_SCAN=m
3244 +# CONFIG_SCSI_SPI_ATTRS is not set
3245 +# CONFIG_SCSI_FC_ATTRS is not set
3246 +# CONFIG_SCSI_ISCSI_ATTRS is not set
3247 +# CONFIG_SCSI_SAS_LIBSAS is not set
3248 +# CONFIG_SCSI_SRP_ATTRS is not set
3249 +CONFIG_SCSI_LOWLEVEL=y
3250 +# CONFIG_ISCSI_TCP is not set
3251 +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
3252 +# CONFIG_SCSI_3W_9XXX is not set
3253 +# CONFIG_SCSI_ACARD is not set
3254 +# CONFIG_SCSI_AACRAID is not set
3255 +# CONFIG_SCSI_AIC7XXX is not set
3256 +# CONFIG_SCSI_AIC7XXX_OLD is not set
3257 +# CONFIG_SCSI_AIC79XX is not set
3258 +# CONFIG_SCSI_AIC94XX is not set
3259 +# CONFIG_SCSI_DPT_I2O is not set
3260 +# CONFIG_SCSI_ADVANSYS is not set
3261 +# CONFIG_SCSI_ARCMSR is not set
3262 +# CONFIG_MEGARAID_NEWGEN is not set
3263 +# CONFIG_MEGARAID_LEGACY is not set
3264 +# CONFIG_MEGARAID_SAS is not set
3265 +# CONFIG_SCSI_HPTIOP is not set
3266 +# CONFIG_SCSI_DMX3191D is not set
3267 +# CONFIG_SCSI_FUTURE_DOMAIN is not set
3268 +# CONFIG_SCSI_IPS is not set
3269 +# CONFIG_SCSI_INITIO is not set
3270 +# CONFIG_SCSI_INIA100 is not set
3271 +# CONFIG_SCSI_MVSAS is not set
3272 +# CONFIG_SCSI_STEX is not set
3273 +# CONFIG_SCSI_SYM53C8XX_2 is not set
3274 +# CONFIG_SCSI_IPR is not set
3275 +# CONFIG_SCSI_QLOGIC_1280 is not set
3276 +# CONFIG_SCSI_QLA_FC is not set
3277 +# CONFIG_SCSI_QLA_ISCSI is not set
3278 +# CONFIG_SCSI_LPFC is not set
3279 +# CONFIG_SCSI_DC395x is not set
3280 +# CONFIG_SCSI_DC390T is not set
3281 +# CONFIG_SCSI_NSP32 is not set
3282 +# CONFIG_SCSI_DEBUG is not set
3283 +# CONFIG_SCSI_SRP is not set
3285 +# CONFIG_ATA_NONSTANDARD is not set
3287 +# CONFIG_SATA_AHCI is not set
3288 +# CONFIG_SATA_SIL24 is not set
3290 +# CONFIG_SATA_SVW is not set
3291 +# CONFIG_ATA_PIIX is not set
3293 +# CONFIG_SATA_NV is not set
3294 +# CONFIG_PDC_ADMA is not set
3295 +# CONFIG_SATA_QSTOR is not set
3296 +# CONFIG_SATA_PROMISE is not set
3297 +# CONFIG_SATA_SX4 is not set
3298 +# CONFIG_SATA_SIL is not set
3299 +# CONFIG_SATA_SIS is not set
3300 +# CONFIG_SATA_ULI is not set
3301 +# CONFIG_SATA_VIA is not set
3302 +# CONFIG_SATA_VITESSE is not set
3303 +# CONFIG_SATA_INIC162X is not set
3304 +# CONFIG_PATA_ALI is not set
3305 +# CONFIG_PATA_AMD is not set
3306 +# CONFIG_PATA_ARTOP is not set
3307 +# CONFIG_PATA_ATIIXP is not set
3308 +# CONFIG_PATA_CMD640_PCI is not set
3309 +# CONFIG_PATA_CMD64X is not set
3310 +# CONFIG_PATA_CS5520 is not set
3311 +# CONFIG_PATA_CS5530 is not set
3312 +# CONFIG_PATA_CYPRESS is not set
3313 +# CONFIG_PATA_EFAR is not set
3314 +# CONFIG_ATA_GENERIC is not set
3315 +# CONFIG_PATA_HPT366 is not set
3316 +# CONFIG_PATA_HPT37X is not set
3317 +# CONFIG_PATA_HPT3X2N is not set
3318 +# CONFIG_PATA_HPT3X3 is not set
3319 +# CONFIG_PATA_IT821X is not set
3320 +# CONFIG_PATA_IT8213 is not set
3321 +# CONFIG_PATA_JMICRON is not set
3322 +# CONFIG_PATA_TRIFLEX is not set
3323 +# CONFIG_PATA_MARVELL is not set
3324 +# CONFIG_PATA_MPIIX is not set
3325 +# CONFIG_PATA_OLDPIIX is not set
3326 +# CONFIG_PATA_NETCELL is not set
3327 +# CONFIG_PATA_NINJA32 is not set
3328 +# CONFIG_PATA_NS87410 is not set
3329 +# CONFIG_PATA_NS87415 is not set
3330 +# CONFIG_PATA_OPTI is not set
3331 +# CONFIG_PATA_OPTIDMA is not set
3332 +# CONFIG_PATA_PDC_OLD is not set
3333 +# CONFIG_PATA_RADISYS is not set
3334 +# CONFIG_PATA_RZ1000 is not set
3335 +# CONFIG_PATA_SC1200 is not set
3336 +# CONFIG_PATA_SERVERWORKS is not set
3337 +# CONFIG_PATA_PDC2027X is not set
3338 +# CONFIG_PATA_SIL680 is not set
3339 +# CONFIG_PATA_SIS is not set
3340 +# CONFIG_PATA_VIA is not set
3341 +# CONFIG_PATA_WINBOND is not set
3342 +# CONFIG_PATA_PLATFORM is not set
3343 +# CONFIG_PATA_SCH is not set
3344 +# CONFIG_MD is not set
3345 +# CONFIG_FUSION is not set
3348 +# IEEE 1394 (FireWire) support
3350 +# CONFIG_FIREWIRE is not set
3351 +# CONFIG_IEEE1394 is not set
3352 +# CONFIG_I2O is not set
3353 +CONFIG_NETDEVICES=y
3354 +# CONFIG_NETDEVICES_MULTIQUEUE is not set
3355 +# CONFIG_DUMMY is not set
3356 +# CONFIG_BONDING is not set
3357 +# CONFIG_MACVLAN is not set
3358 +# CONFIG_EQUALIZER is not set
3359 +# CONFIG_TUN is not set
3360 +# CONFIG_VETH is not set
3361 +# CONFIG_ARCNET is not set
3362 +# CONFIG_PHYLIB is not set
3363 +CONFIG_NET_ETHERNET=y
3365 +# CONFIG_AX88796 is not set
3366 +# CONFIG_HAPPYMEAL is not set
3367 +# CONFIG_SUNGEM is not set
3368 +# CONFIG_CASSINI is not set
3369 +# CONFIG_NET_VENDOR_3COM is not set
3370 +# CONFIG_SMC91X is not set
3371 +# CONFIG_DM9000 is not set
3372 +# CONFIG_NET_TULIP is not set
3373 +# CONFIG_HP100 is not set
3374 +# CONFIG_IBM_NEW_EMAC_ZMII is not set
3375 +# CONFIG_IBM_NEW_EMAC_RGMII is not set
3376 +# CONFIG_IBM_NEW_EMAC_TAH is not set
3377 +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
3379 +# CONFIG_PCNET32 is not set
3380 +# CONFIG_AMD8111_ETH is not set
3381 +# CONFIG_ADAPTEC_STARFIRE is not set
3382 +# CONFIG_B44 is not set
3383 +# CONFIG_FORCEDETH is not set
3384 +# CONFIG_EEPRO100 is not set
3385 +# CONFIG_E100 is not set
3386 +# CONFIG_FEALNX is not set
3387 +# CONFIG_NATSEMI is not set
3388 +# CONFIG_NE2K_PCI is not set
3389 +# CONFIG_8139CP is not set
3390 +# CONFIG_8139TOO is not set
3391 +# CONFIG_R6040 is not set
3392 +# CONFIG_SIS900 is not set
3393 +# CONFIG_EPIC100 is not set
3394 +# CONFIG_SUNDANCE is not set
3395 +# CONFIG_TLAN is not set
3396 +# CONFIG_VIA_RHINE is not set
3397 +# CONFIG_SC92031 is not set
3398 +CONFIG_NETDEV_1000=y
3399 +# CONFIG_ACENIC is not set
3400 +# CONFIG_DL2K is not set
3401 +# CONFIG_E1000 is not set
3402 +# CONFIG_E1000E is not set
3403 +# CONFIG_E1000E_ENABLED is not set
3404 +# CONFIG_IP1000 is not set
3405 +# CONFIG_IGB is not set
3406 +# CONFIG_NS83820 is not set
3407 +# CONFIG_HAMACHI is not set
3408 +# CONFIG_YELLOWFIN is not set
3409 +# CONFIG_R8169 is not set
3410 +# CONFIG_SIS190 is not set
3411 +# CONFIG_SKGE is not set
3412 +# CONFIG_SKY2 is not set
3413 +# CONFIG_VIA_VELOCITY is not set
3414 +# CONFIG_TIGON3 is not set
3415 +# CONFIG_BNX2 is not set
3416 +CONFIG_MV643XX_ETH=y
3417 +# CONFIG_QLA3XXX is not set
3418 +# CONFIG_ATL1 is not set
3419 +# CONFIG_NETDEV_10000 is not set
3420 +# CONFIG_TR is not set
3425 +# CONFIG_WLAN_PRE80211 is not set
3426 +# CONFIG_WLAN_80211 is not set
3427 +# CONFIG_IWLWIFI_LEDS is not set
3430 +# USB Network Adapters
3432 +# CONFIG_USB_CATC is not set
3433 +# CONFIG_USB_KAWETH is not set
3434 +# CONFIG_USB_PEGASUS is not set
3435 +# CONFIG_USB_RTL8150 is not set
3436 +# CONFIG_USB_USBNET is not set
3437 +# CONFIG_WAN is not set
3438 +# CONFIG_FDDI is not set
3439 +# CONFIG_HIPPI is not set
3440 +# CONFIG_PPP is not set
3441 +# CONFIG_SLIP is not set
3442 +# CONFIG_NET_FC is not set
3443 +# CONFIG_NETCONSOLE is not set
3444 +# CONFIG_NETPOLL is not set
3445 +# CONFIG_NET_POLL_CONTROLLER is not set
3446 +# CONFIG_ISDN is not set
3449 +# Input device support
3452 +# CONFIG_INPUT_FF_MEMLESS is not set
3453 +# CONFIG_INPUT_POLLDEV is not set
3456 +# Userland interfaces
3458 +# CONFIG_INPUT_MOUSEDEV is not set
3459 +# CONFIG_INPUT_JOYDEV is not set
3460 +CONFIG_INPUT_EVDEV=y
3461 +# CONFIG_INPUT_EVBUG is not set
3464 +# Input Device Drivers
3466 +# CONFIG_INPUT_KEYBOARD is not set
3467 +# CONFIG_INPUT_MOUSE is not set
3468 +# CONFIG_INPUT_JOYSTICK is not set
3469 +# CONFIG_INPUT_TABLET is not set
3470 +# CONFIG_INPUT_TOUCHSCREEN is not set
3471 +# CONFIG_INPUT_MISC is not set
3474 +# Hardware I/O ports
3476 +# CONFIG_SERIO is not set
3477 +# CONFIG_GAMEPORT is not set
3480 +# Character devices
3482 +# CONFIG_VT is not set
3484 +# CONFIG_SERIAL_NONSTANDARD is not set
3485 +# CONFIG_NOZOMI is not set
3490 +CONFIG_SERIAL_8250=y
3491 +CONFIG_SERIAL_8250_CONSOLE=y
3492 +# CONFIG_SERIAL_8250_PCI is not set
3493 +CONFIG_SERIAL_8250_NR_UARTS=4
3494 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2
3495 +# CONFIG_SERIAL_8250_EXTENDED is not set
3498 +# Non-8250 serial port support
3500 +CONFIG_SERIAL_CORE=y
3501 +CONFIG_SERIAL_CORE_CONSOLE=y
3502 +# CONFIG_SERIAL_JSM is not set
3503 +CONFIG_UNIX98_PTYS=y
3504 +CONFIG_LEGACY_PTYS=y
3505 +CONFIG_LEGACY_PTY_COUNT=16
3506 +# CONFIG_IPMI_HANDLER is not set
3507 +# CONFIG_HW_RANDOM is not set
3508 +# CONFIG_NVRAM is not set
3509 +# CONFIG_R3964 is not set
3510 +# CONFIG_APPLICOM is not set
3511 +# CONFIG_RAW_DRIVER is not set
3512 +# CONFIG_TCG_TPM is not set
3515 +CONFIG_I2C_BOARDINFO=y
3516 +CONFIG_I2C_CHARDEV=y
3519 +# I2C Hardware Bus support
3521 +# CONFIG_I2C_ALI1535 is not set
3522 +# CONFIG_I2C_ALI1563 is not set
3523 +# CONFIG_I2C_ALI15X3 is not set
3524 +# CONFIG_I2C_AMD756 is not set
3525 +# CONFIG_I2C_AMD8111 is not set
3526 +# CONFIG_I2C_I801 is not set
3527 +# CONFIG_I2C_I810 is not set
3528 +# CONFIG_I2C_PIIX4 is not set
3529 +# CONFIG_I2C_NFORCE2 is not set
3530 +# CONFIG_I2C_OCORES is not set
3531 +# CONFIG_I2C_PARPORT_LIGHT is not set
3532 +# CONFIG_I2C_PROSAVAGE is not set
3533 +# CONFIG_I2C_SAVAGE4 is not set
3534 +# CONFIG_I2C_SIMTEC is not set
3535 +# CONFIG_I2C_SIS5595 is not set
3536 +# CONFIG_I2C_SIS630 is not set
3537 +# CONFIG_I2C_SIS96X is not set
3538 +# CONFIG_I2C_TAOS_EVM is not set
3539 +# CONFIG_I2C_STUB is not set
3540 +# CONFIG_I2C_TINY_USB is not set
3541 +# CONFIG_I2C_VIA is not set
3542 +# CONFIG_I2C_VIAPRO is not set
3543 +# CONFIG_I2C_VOODOO3 is not set
3544 +# CONFIG_I2C_PCA_PLATFORM is not set
3545 +CONFIG_I2C_MV64XXX=y
3548 +# Miscellaneous I2C Chip support
3550 +# CONFIG_DS1682 is not set
3551 +# CONFIG_SENSORS_EEPROM is not set
3552 +# CONFIG_SENSORS_PCF8574 is not set
3553 +# CONFIG_PCF8575 is not set
3554 +# CONFIG_SENSORS_PCF8591 is not set
3555 +# CONFIG_SENSORS_MAX6875 is not set
3556 +# CONFIG_SENSORS_TSL2550 is not set
3557 +# CONFIG_I2C_DEBUG_CORE is not set
3558 +# CONFIG_I2C_DEBUG_ALGO is not set
3559 +# CONFIG_I2C_DEBUG_BUS is not set
3560 +# CONFIG_I2C_DEBUG_CHIP is not set
3561 +# CONFIG_SPI is not set
3562 +# CONFIG_W1 is not set
3563 +# CONFIG_POWER_SUPPLY is not set
3565 +# CONFIG_HWMON_VID is not set
3566 +# CONFIG_SENSORS_AD7418 is not set
3567 +# CONFIG_SENSORS_ADM1021 is not set
3568 +# CONFIG_SENSORS_ADM1025 is not set
3569 +# CONFIG_SENSORS_ADM1026 is not set
3570 +# CONFIG_SENSORS_ADM1029 is not set
3571 +# CONFIG_SENSORS_ADM1031 is not set
3572 +# CONFIG_SENSORS_ADM9240 is not set
3573 +# CONFIG_SENSORS_ADT7470 is not set
3574 +# CONFIG_SENSORS_ADT7473 is not set
3575 +# CONFIG_SENSORS_ATXP1 is not set
3576 +# CONFIG_SENSORS_DS1621 is not set
3577 +# CONFIG_SENSORS_I5K_AMB is not set
3578 +# CONFIG_SENSORS_F71805F is not set
3579 +# CONFIG_SENSORS_F71882FG is not set
3580 +# CONFIG_SENSORS_F75375S is not set
3581 +# CONFIG_SENSORS_GL518SM is not set
3582 +# CONFIG_SENSORS_GL520SM is not set
3583 +# CONFIG_SENSORS_IT87 is not set
3584 +# CONFIG_SENSORS_LM63 is not set
3585 +# CONFIG_SENSORS_LM75 is not set
3586 +# CONFIG_SENSORS_LM77 is not set
3587 +# CONFIG_SENSORS_LM78 is not set
3588 +# CONFIG_SENSORS_LM80 is not set
3589 +# CONFIG_SENSORS_LM83 is not set
3590 +# CONFIG_SENSORS_LM85 is not set
3591 +# CONFIG_SENSORS_LM87 is not set
3592 +# CONFIG_SENSORS_LM90 is not set
3593 +# CONFIG_SENSORS_LM92 is not set
3594 +# CONFIG_SENSORS_LM93 is not set
3595 +# CONFIG_SENSORS_MAX1619 is not set
3596 +# CONFIG_SENSORS_MAX6650 is not set
3597 +# CONFIG_SENSORS_PC87360 is not set
3598 +# CONFIG_SENSORS_PC87427 is not set
3599 +# CONFIG_SENSORS_SIS5595 is not set
3600 +# CONFIG_SENSORS_DME1737 is not set
3601 +# CONFIG_SENSORS_SMSC47M1 is not set
3602 +# CONFIG_SENSORS_SMSC47M192 is not set
3603 +# CONFIG_SENSORS_SMSC47B397 is not set
3604 +# CONFIG_SENSORS_ADS7828 is not set
3605 +# CONFIG_SENSORS_THMC50 is not set
3606 +# CONFIG_SENSORS_VIA686A is not set
3607 +# CONFIG_SENSORS_VT1211 is not set
3608 +# CONFIG_SENSORS_VT8231 is not set
3609 +# CONFIG_SENSORS_W83781D is not set
3610 +# CONFIG_SENSORS_W83791D is not set
3611 +# CONFIG_SENSORS_W83792D is not set
3612 +# CONFIG_SENSORS_W83793 is not set
3613 +# CONFIG_SENSORS_W83L785TS is not set
3614 +# CONFIG_SENSORS_W83L786NG is not set
3615 +# CONFIG_SENSORS_W83627HF is not set
3616 +# CONFIG_SENSORS_W83627EHF is not set
3617 +# CONFIG_HWMON_DEBUG_CHIP is not set
3618 +# CONFIG_WATCHDOG is not set
3621 +# Sonics Silicon Backplane
3623 +CONFIG_SSB_POSSIBLE=y
3624 +# CONFIG_SSB is not set
3627 +# Multifunction device drivers
3629 +# CONFIG_MFD_SM501 is not set
3630 +# CONFIG_MFD_ASIC3 is not set
3631 +# CONFIG_HTC_PASIC3 is not set
3634 +# Multimedia devices
3638 +# Multimedia core support
3640 +# CONFIG_VIDEO_DEV is not set
3641 +# CONFIG_DVB_CORE is not set
3642 +# CONFIG_VIDEO_MEDIA is not set
3645 +# Multimedia drivers
3647 +# CONFIG_DAB is not set
3652 +# CONFIG_DRM is not set
3653 +# CONFIG_VGASTATE is not set
3654 +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
3655 +# CONFIG_FB is not set
3656 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
3659 +# Display device support
3661 +# CONFIG_DISPLAY_SUPPORT is not set
3666 +# CONFIG_SOUND is not set
3667 +CONFIG_HID_SUPPORT=y
3669 +# CONFIG_HID_DEBUG is not set
3670 +# CONFIG_HIDRAW is not set
3673 +# USB Input Devices
3676 +# CONFIG_USB_HIDINPUT_POWERBOOK is not set
3677 +# CONFIG_HID_FF is not set
3678 +# CONFIG_USB_HIDDEV is not set
3679 +CONFIG_USB_SUPPORT=y
3680 +CONFIG_USB_ARCH_HAS_HCD=y
3681 +CONFIG_USB_ARCH_HAS_OHCI=y
3682 +CONFIG_USB_ARCH_HAS_EHCI=y
3684 +# CONFIG_USB_DEBUG is not set
3685 +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
3688 +# Miscellaneous USB options
3690 +CONFIG_USB_DEVICEFS=y
3691 +CONFIG_USB_DEVICE_CLASS=y
3692 +# CONFIG_USB_DYNAMIC_MINORS is not set
3693 +# CONFIG_USB_OTG is not set
3694 +# CONFIG_USB_OTG_WHITELIST is not set
3695 +# CONFIG_USB_OTG_BLACKLIST_HUB is not set
3698 +# USB Host Controller Drivers
3700 +# CONFIG_USB_C67X00_HCD is not set
3701 +CONFIG_USB_EHCI_HCD=y
3702 +CONFIG_USB_EHCI_ROOT_HUB_TT=y
3703 +CONFIG_USB_EHCI_TT_NEWSCHED=y
3704 +# CONFIG_USB_ISP116X_HCD is not set
3705 +# CONFIG_USB_ISP1760_HCD is not set
3706 +# CONFIG_USB_OHCI_HCD is not set
3707 +# CONFIG_USB_UHCI_HCD is not set
3708 +# CONFIG_USB_SL811_HCD is not set
3709 +# CONFIG_USB_R8A66597_HCD is not set
3712 +# USB Device Class drivers
3714 +# CONFIG_USB_ACM is not set
3715 +CONFIG_USB_PRINTER=y
3716 +# CONFIG_USB_WDM is not set
3719 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
3723 +# may also be needed; see USB_STORAGE Help for more information
3725 +CONFIG_USB_STORAGE=y
3726 +# CONFIG_USB_STORAGE_DEBUG is not set
3727 +CONFIG_USB_STORAGE_DATAFAB=y
3728 +CONFIG_USB_STORAGE_FREECOM=y
3729 +# CONFIG_USB_STORAGE_ISD200 is not set
3730 +CONFIG_USB_STORAGE_DPCM=y
3731 +# CONFIG_USB_STORAGE_USBAT is not set
3732 +CONFIG_USB_STORAGE_SDDR09=y
3733 +CONFIG_USB_STORAGE_SDDR55=y
3734 +CONFIG_USB_STORAGE_JUMPSHOT=y
3735 +# CONFIG_USB_STORAGE_ALAUDA is not set
3736 +# CONFIG_USB_STORAGE_ONETOUCH is not set
3737 +# CONFIG_USB_STORAGE_KARMA is not set
3738 +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
3739 +# CONFIG_USB_LIBUSUAL is not set
3742 +# USB Imaging devices
3744 +# CONFIG_USB_MDC800 is not set
3745 +# CONFIG_USB_MICROTEK is not set
3746 +# CONFIG_USB_MON is not set
3751 +# CONFIG_USB_SERIAL is not set
3754 +# USB Miscellaneous drivers
3756 +# CONFIG_USB_EMI62 is not set
3757 +# CONFIG_USB_EMI26 is not set
3758 +# CONFIG_USB_ADUTUX is not set
3759 +# CONFIG_USB_AUERSWALD is not set
3760 +# CONFIG_USB_RIO500 is not set
3761 +# CONFIG_USB_LEGOTOWER is not set
3762 +# CONFIG_USB_LCD is not set
3763 +# CONFIG_USB_BERRY_CHARGE is not set
3764 +# CONFIG_USB_LED is not set
3765 +# CONFIG_USB_CYPRESS_CY7C63 is not set
3766 +# CONFIG_USB_CYTHERM is not set
3767 +# CONFIG_USB_PHIDGET is not set
3768 +# CONFIG_USB_IDMOUSE is not set
3769 +# CONFIG_USB_FTDI_ELAN is not set
3770 +# CONFIG_USB_APPLEDISPLAY is not set
3771 +# CONFIG_USB_SISUSBVGA is not set
3772 +# CONFIG_USB_LD is not set
3773 +# CONFIG_USB_TRANCEVIBRATOR is not set
3774 +# CONFIG_USB_IOWARRIOR is not set
3775 +# CONFIG_USB_TEST is not set
3776 +# CONFIG_USB_ISIGHTFW is not set
3777 +# CONFIG_USB_GADGET is not set
3778 +# CONFIG_MMC is not set
3780 +CONFIG_LEDS_CLASS=y
3789 +CONFIG_LEDS_TRIGGERS=y
3790 +CONFIG_LEDS_TRIGGER_TIMER=y
3791 +CONFIG_LEDS_TRIGGER_HEARTBEAT=y
3792 +# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
3795 +CONFIG_RTC_HCTOSYS=y
3796 +CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
3797 +# CONFIG_RTC_DEBUG is not set
3802 +CONFIG_RTC_INTF_SYSFS=y
3803 +CONFIG_RTC_INTF_PROC=y
3804 +CONFIG_RTC_INTF_DEV=y
3805 +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
3806 +# CONFIG_RTC_DRV_TEST is not set
3811 +CONFIG_RTC_DRV_DS1307=y
3812 +# CONFIG_RTC_DRV_DS1374 is not set
3813 +# CONFIG_RTC_DRV_DS1672 is not set
3814 +# CONFIG_RTC_DRV_MAX6900 is not set
3815 +CONFIG_RTC_DRV_RS5C372=y
3816 +# CONFIG_RTC_DRV_ISL1208 is not set
3817 +# CONFIG_RTC_DRV_X1205 is not set
3818 +# CONFIG_RTC_DRV_PCF8563 is not set
3819 +# CONFIG_RTC_DRV_PCF8583 is not set
3820 +CONFIG_RTC_DRV_M41T80=y
3821 +# CONFIG_RTC_DRV_M41T80_WDT is not set
3822 +# CONFIG_RTC_DRV_S35390A is not set
3829 +# Platform RTC drivers
3831 +# CONFIG_RTC_DRV_CMOS is not set
3832 +# CONFIG_RTC_DRV_DS1511 is not set
3833 +# CONFIG_RTC_DRV_DS1553 is not set
3834 +# CONFIG_RTC_DRV_DS1742 is not set
3835 +# CONFIG_RTC_DRV_STK17TA8 is not set
3836 +# CONFIG_RTC_DRV_M48T86 is not set
3837 +# CONFIG_RTC_DRV_M48T59 is not set
3838 +# CONFIG_RTC_DRV_V3020 is not set
3841 +# on-CPU RTC drivers
3843 +# CONFIG_UIO is not set
3849 +# CONFIG_EXT2_FS_XATTR is not set
3850 +# CONFIG_EXT2_FS_XIP is not set
3852 +# CONFIG_EXT3_FS_XATTR is not set
3853 +# CONFIG_EXT4DEV_FS is not set
3855 +# CONFIG_REISERFS_FS is not set
3856 +# CONFIG_JFS_FS is not set
3857 +# CONFIG_FS_POSIX_ACL is not set
3858 +# CONFIG_XFS_FS is not set
3859 +# CONFIG_OCFS2_FS is not set
3862 +CONFIG_INOTIFY_USER=y
3863 +# CONFIG_QUOTA is not set
3864 +# CONFIG_AUTOFS_FS is not set
3865 +# CONFIG_AUTOFS4_FS is not set
3866 +# CONFIG_FUSE_FS is not set
3869 +# CD-ROM/DVD Filesystems
3871 +CONFIG_ISO9660_FS=m
3873 +# CONFIG_ZISOFS is not set
3878 +# DOS/FAT/NT Filesystems
3883 +CONFIG_FAT_DEFAULT_CODEPAGE=437
3884 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
3885 +# CONFIG_NTFS_FS is not set
3888 +# Pseudo filesystems
3891 +CONFIG_PROC_SYSCTL=y
3894 +# CONFIG_TMPFS_POSIX_ACL is not set
3895 +# CONFIG_HUGETLB_PAGE is not set
3896 +# CONFIG_CONFIGFS_FS is not set
3899 +# Miscellaneous filesystems
3901 +# CONFIG_ADFS_FS is not set
3902 +# CONFIG_AFFS_FS is not set
3903 +# CONFIG_HFS_FS is not set
3904 +# CONFIG_HFSPLUS_FS is not set
3905 +# CONFIG_BEFS_FS is not set
3906 +# CONFIG_BFS_FS is not set
3907 +# CONFIG_EFS_FS is not set
3909 +CONFIG_JFFS2_FS_DEBUG=0
3910 +CONFIG_JFFS2_FS_WRITEBUFFER=y
3911 +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
3912 +# CONFIG_JFFS2_SUMMARY is not set
3913 +# CONFIG_JFFS2_FS_XATTR is not set
3914 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
3915 +CONFIG_JFFS2_ZLIB=y
3916 +# CONFIG_JFFS2_LZO is not set
3917 +CONFIG_JFFS2_RTIME=y
3918 +# CONFIG_JFFS2_RUBIN is not set
3920 +# CONFIG_VXFS_FS is not set
3921 +# CONFIG_MINIX_FS is not set
3922 +# CONFIG_HPFS_FS is not set
3923 +# CONFIG_QNX4FS_FS is not set
3924 +# CONFIG_ROMFS_FS is not set
3925 +# CONFIG_SYSV_FS is not set
3926 +# CONFIG_UFS_FS is not set
3927 +CONFIG_NETWORK_FILESYSTEMS=y
3930 +# CONFIG_NFS_V3_ACL is not set
3931 +# CONFIG_NFS_V4 is not set
3932 +# CONFIG_NFSD is not set
3936 +CONFIG_NFS_COMMON=y
3938 +# CONFIG_SUNRPC_BIND34 is not set
3939 +# CONFIG_RPCSEC_GSS_KRB5 is not set
3940 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
3941 +# CONFIG_SMB_FS is not set
3942 +# CONFIG_CIFS is not set
3943 +# CONFIG_NCP_FS is not set
3944 +# CONFIG_CODA_FS is not set
3945 +# CONFIG_AFS_FS is not set
3950 +CONFIG_PARTITION_ADVANCED=y
3951 +# CONFIG_ACORN_PARTITION is not set
3952 +# CONFIG_OSF_PARTITION is not set
3953 +# CONFIG_AMIGA_PARTITION is not set
3954 +# CONFIG_ATARI_PARTITION is not set
3955 +# CONFIG_MAC_PARTITION is not set
3956 +CONFIG_MSDOS_PARTITION=y
3957 +CONFIG_BSD_DISKLABEL=y
3958 +# CONFIG_MINIX_SUBPARTITION is not set
3959 +# CONFIG_SOLARIS_X86_PARTITION is not set
3960 +# CONFIG_UNIXWARE_DISKLABEL is not set
3961 +# CONFIG_LDM_PARTITION is not set
3962 +# CONFIG_SGI_PARTITION is not set
3963 +# CONFIG_ULTRIX_PARTITION is not set
3964 +# CONFIG_SUN_PARTITION is not set
3965 +# CONFIG_KARMA_PARTITION is not set
3966 +# CONFIG_EFI_PARTITION is not set
3967 +# CONFIG_SYSV68_PARTITION is not set
3969 +CONFIG_NLS_DEFAULT="iso8859-1"
3970 +CONFIG_NLS_CODEPAGE_437=y
3971 +# CONFIG_NLS_CODEPAGE_737 is not set
3972 +# CONFIG_NLS_CODEPAGE_775 is not set
3973 +CONFIG_NLS_CODEPAGE_850=y
3974 +# CONFIG_NLS_CODEPAGE_852 is not set
3975 +# CONFIG_NLS_CODEPAGE_855 is not set
3976 +# CONFIG_NLS_CODEPAGE_857 is not set
3977 +# CONFIG_NLS_CODEPAGE_860 is not set
3978 +# CONFIG_NLS_CODEPAGE_861 is not set
3979 +# CONFIG_NLS_CODEPAGE_862 is not set
3980 +# CONFIG_NLS_CODEPAGE_863 is not set
3981 +# CONFIG_NLS_CODEPAGE_864 is not set
3982 +# CONFIG_NLS_CODEPAGE_865 is not set
3983 +# CONFIG_NLS_CODEPAGE_866 is not set
3984 +# CONFIG_NLS_CODEPAGE_869 is not set
3985 +# CONFIG_NLS_CODEPAGE_936 is not set
3986 +# CONFIG_NLS_CODEPAGE_950 is not set
3987 +# CONFIG_NLS_CODEPAGE_932 is not set
3988 +# CONFIG_NLS_CODEPAGE_949 is not set
3989 +# CONFIG_NLS_CODEPAGE_874 is not set
3990 +# CONFIG_NLS_ISO8859_8 is not set
3991 +# CONFIG_NLS_CODEPAGE_1250 is not set
3992 +# CONFIG_NLS_CODEPAGE_1251 is not set
3993 +# CONFIG_NLS_ASCII is not set
3994 +CONFIG_NLS_ISO8859_1=y
3995 +CONFIG_NLS_ISO8859_2=y
3996 +# CONFIG_NLS_ISO8859_3 is not set
3997 +# CONFIG_NLS_ISO8859_4 is not set
3998 +# CONFIG_NLS_ISO8859_5 is not set
3999 +# CONFIG_NLS_ISO8859_6 is not set
4000 +# CONFIG_NLS_ISO8859_7 is not set
4001 +# CONFIG_NLS_ISO8859_9 is not set
4002 +# CONFIG_NLS_ISO8859_13 is not set
4003 +# CONFIG_NLS_ISO8859_14 is not set
4004 +# CONFIG_NLS_ISO8859_15 is not set
4005 +# CONFIG_NLS_KOI8_R is not set
4006 +# CONFIG_NLS_KOI8_U is not set
4007 +# CONFIG_NLS_UTF8 is not set
4008 +# CONFIG_DLM is not set
4013 +# CONFIG_PRINTK_TIME is not set
4014 +CONFIG_ENABLE_WARN_DEPRECATED=y
4015 +CONFIG_ENABLE_MUST_CHECK=y
4016 +CONFIG_FRAME_WARN=1024
4017 +CONFIG_MAGIC_SYSRQ=y
4018 +# CONFIG_UNUSED_SYMBOLS is not set
4019 +# CONFIG_DEBUG_FS is not set
4020 +# CONFIG_HEADERS_CHECK is not set
4021 +CONFIG_DEBUG_KERNEL=y
4022 +# CONFIG_DEBUG_SHIRQ is not set
4023 +CONFIG_DETECT_SOFTLOCKUP=y
4024 +CONFIG_SCHED_DEBUG=y
4025 +CONFIG_SCHEDSTATS=y
4026 +# CONFIG_TIMER_STATS is not set
4027 +# CONFIG_DEBUG_OBJECTS is not set
4028 +CONFIG_DEBUG_PREEMPT=y
4029 +# CONFIG_DEBUG_RT_MUTEXES is not set
4030 +# CONFIG_RT_MUTEX_TESTER is not set
4031 +# CONFIG_DEBUG_SPINLOCK is not set
4032 +# CONFIG_DEBUG_MUTEXES is not set
4033 +# CONFIG_DEBUG_LOCK_ALLOC is not set
4034 +# CONFIG_PROVE_LOCKING is not set
4035 +# CONFIG_LOCK_STAT is not set
4036 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
4037 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
4038 +# CONFIG_DEBUG_KOBJECT is not set
4039 +# CONFIG_DEBUG_BUGVERBOSE is not set
4040 +CONFIG_DEBUG_INFO=y
4041 +# CONFIG_DEBUG_VM is not set
4042 +# CONFIG_DEBUG_WRITECOUNT is not set
4043 +# CONFIG_DEBUG_LIST is not set
4044 +# CONFIG_DEBUG_SG is not set
4045 +CONFIG_FRAME_POINTER=y
4046 +# CONFIG_BOOT_PRINTK_DELAY is not set
4047 +# CONFIG_RCU_TORTURE_TEST is not set
4048 +# CONFIG_KPROBES_SANITY_TEST is not set
4049 +# CONFIG_BACKTRACE_SELF_TEST is not set
4050 +# CONFIG_LKDTM is not set
4051 +# CONFIG_FAULT_INJECTION is not set
4052 +# CONFIG_LATENCYTOP is not set
4053 +# CONFIG_SAMPLES is not set
4054 +CONFIG_DEBUG_USER=y
4055 +CONFIG_DEBUG_ERRORS=y
4056 +# CONFIG_DEBUG_STACK_USAGE is not set
4058 +# CONFIG_DEBUG_ICEDCC is not set
4063 +# CONFIG_KEYS is not set
4064 +# CONFIG_SECURITY is not set
4065 +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
4069 +# Crypto core or helper
4071 +CONFIG_CRYPTO_ALGAPI=m
4072 +CONFIG_CRYPTO_BLKCIPHER=m
4073 +CONFIG_CRYPTO_MANAGER=m
4074 +# CONFIG_CRYPTO_GF128MUL is not set
4075 +# CONFIG_CRYPTO_NULL is not set
4076 +# CONFIG_CRYPTO_CRYPTD is not set
4077 +# CONFIG_CRYPTO_AUTHENC is not set
4078 +# CONFIG_CRYPTO_TEST is not set
4081 +# Authenticated Encryption with Associated Data
4083 +# CONFIG_CRYPTO_CCM is not set
4084 +# CONFIG_CRYPTO_GCM is not set
4085 +# CONFIG_CRYPTO_SEQIV is not set
4090 +CONFIG_CRYPTO_CBC=m
4091 +# CONFIG_CRYPTO_CTR is not set
4092 +# CONFIG_CRYPTO_CTS is not set
4093 +CONFIG_CRYPTO_ECB=m
4094 +# CONFIG_CRYPTO_LRW is not set
4095 +CONFIG_CRYPTO_PCBC=m
4096 +# CONFIG_CRYPTO_XTS is not set
4101 +# CONFIG_CRYPTO_HMAC is not set
4102 +# CONFIG_CRYPTO_XCBC is not set
4107 +# CONFIG_CRYPTO_CRC32C is not set
4108 +# CONFIG_CRYPTO_MD4 is not set
4109 +# CONFIG_CRYPTO_MD5 is not set
4110 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
4111 +# CONFIG_CRYPTO_SHA1 is not set
4112 +# CONFIG_CRYPTO_SHA256 is not set
4113 +# CONFIG_CRYPTO_SHA512 is not set
4114 +# CONFIG_CRYPTO_TGR192 is not set
4115 +# CONFIG_CRYPTO_WP512 is not set
4120 +# CONFIG_CRYPTO_AES is not set
4121 +# CONFIG_CRYPTO_ANUBIS is not set
4122 +# CONFIG_CRYPTO_ARC4 is not set
4123 +# CONFIG_CRYPTO_BLOWFISH is not set
4124 +# CONFIG_CRYPTO_CAMELLIA is not set
4125 +# CONFIG_CRYPTO_CAST5 is not set
4126 +# CONFIG_CRYPTO_CAST6 is not set
4127 +# CONFIG_CRYPTO_DES is not set
4128 +# CONFIG_CRYPTO_FCRYPT is not set
4129 +# CONFIG_CRYPTO_KHAZAD is not set
4130 +# CONFIG_CRYPTO_SALSA20 is not set
4131 +# CONFIG_CRYPTO_SEED is not set
4132 +# CONFIG_CRYPTO_SERPENT is not set
4133 +# CONFIG_CRYPTO_TEA is not set
4134 +# CONFIG_CRYPTO_TWOFISH is not set
4139 +# CONFIG_CRYPTO_DEFLATE is not set
4140 +# CONFIG_CRYPTO_LZO is not set
4142 +# CONFIG_CRYPTO_DEV_HIFN_795X is not set
4147 +CONFIG_BITREVERSE=y
4148 +# CONFIG_GENERIC_FIND_FIRST_BIT is not set
4149 +# CONFIG_GENERIC_FIND_NEXT_BIT is not set
4150 +# CONFIG_CRC_CCITT is not set
4151 +# CONFIG_CRC16 is not set
4154 +# CONFIG_CRC7 is not set
4155 +# CONFIG_LIBCRC32C is not set
4156 +CONFIG_ZLIB_INFLATE=y
4157 +CONFIG_ZLIB_DEFLATE=y
4160 +CONFIG_HAS_IOPORT=y
4162 --- a/arch/arm/configs/orion5x_defconfig
4163 +++ b/arch/arm/configs/orion5x_defconfig
4166 # Automatically generated make config: don't edit
4167 -# Linux kernel version: 2.6.24
4168 -# Thu Feb 7 14:10:30 2008
4169 +# Linux kernel version: 2.6.26-rc4
4170 +# Mon Jun 2 23:54:48 2008
4173 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
4175 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
4176 CONFIG_GENERIC_HWEIGHT=y
4177 CONFIG_GENERIC_CALIBRATE_DELAY=y
4178 +CONFIG_ARCH_SUPPORTS_AOUT=y
4180 CONFIG_VECTORS_BASE=0xffff0000
4181 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
4183 # CONFIG_POSIX_MQUEUE is not set
4184 # CONFIG_BSD_PROCESS_ACCT is not set
4185 # CONFIG_TASKSTATS is not set
4186 -# CONFIG_USER_NS is not set
4187 -# CONFIG_PID_NS is not set
4188 # CONFIG_AUDIT is not set
4189 # CONFIG_IKCONFIG is not set
4190 CONFIG_LOG_BUF_SHIFT=14
4191 # CONFIG_CGROUPS is not set
4192 -CONFIG_FAIR_GROUP_SCHED=y
4193 -CONFIG_FAIR_USER_SCHED=y
4194 -# CONFIG_FAIR_CGROUP_SCHED is not set
4195 +# CONFIG_GROUP_SCHED is not set
4196 CONFIG_SYSFS_DEPRECATED=y
4197 +CONFIG_SYSFS_DEPRECATED_V2=y
4198 # CONFIG_RELAY is not set
4199 +# CONFIG_NAMESPACES is not set
4200 # CONFIG_BLK_DEV_INITRD is not set
4201 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
4205 CONFIG_SYSCTL_SYSCALL=y
4206 +CONFIG_SYSCTL_SYSCALL_CHECK=y
4208 +CONFIG_KALLSYMS_ALL=y
4209 # CONFIG_KALLSYMS_EXTRA_PASS is not set
4215 CONFIG_VM_EVENT_COUNTERS=y
4217 -# CONFIG_SLUB is not set
4218 +# CONFIG_SLUB_DEBUG is not set
4219 +# CONFIG_SLAB is not set
4221 # CONFIG_SLOB is not set
4222 -# CONFIG_PROFILING is not set
4224 # CONFIG_MARKERS is not set
4226 CONFIG_HAVE_OPROFILE=y
4227 -# CONFIG_KPROBES is not set
4229 +CONFIG_KRETPROBES=y
4230 CONFIG_HAVE_KPROBES=y
4231 +CONFIG_HAVE_KRETPROBES=y
4232 +# CONFIG_HAVE_DMA_ATTRS is not set
4233 CONFIG_PROC_PAGE_MONITOR=y
4236 # CONFIG_TINY_SHMEM is not set
4239 +# CONFIG_MODULE_FORCE_LOAD is not set
4240 CONFIG_MODULE_UNLOAD=y
4241 # CONFIG_MODULE_FORCE_UNLOAD is not set
4242 # CONFIG_MODVERSIONS is not set
4244 # CONFIG_DEFAULT_NOOP is not set
4245 CONFIG_DEFAULT_IOSCHED="cfq"
4246 CONFIG_CLASSIC_RCU=y
4247 -# CONFIG_PREEMPT_RCU is not set
4252 CONFIG_MACH_KUROBOX_PRO=y
4253 CONFIG_MACH_DNS323=y
4255 +CONFIG_MACH_LINKSTATION_PRO=y
4263 +CONFIG_PLAT_ORION=y
4268 CONFIG_CPU_FEROCEON_OLD_ID=y
4270 CONFIG_CPU_ABRT_EV5T=y
4271 +CONFIG_CPU_PABRT_NOIFAR=y
4272 CONFIG_CPU_CACHE_VIVT=y
4273 -CONFIG_CPU_COPY_V4WB=y
4274 +CONFIG_CPU_COPY_FEROCEON=y
4275 CONFIG_CPU_TLB_V4WBI=y
4277 CONFIG_CPU_CP15_MMU=y
4280 # CONFIG_CPU_ICACHE_DISABLE is not set
4281 # CONFIG_CPU_DCACHE_DISABLE is not set
4282 -# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
4283 # CONFIG_OUTER_CACHE is not set
4287 CONFIG_PCI_SYSCALL=y
4288 # CONFIG_ARCH_SUPPORTS_MSI is not set
4290 +# CONFIG_PCI_DEBUG is not set
4291 # CONFIG_PCCARD is not set
4295 CONFIG_FLAT_NODE_MEM_MAP=y
4296 # CONFIG_SPARSEMEM_STATIC is not set
4297 # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
4298 +CONFIG_PAGEFLAGS_EXTENDED=y
4299 CONFIG_SPLIT_PTLOCK_CPUS=4096
4300 # CONFIG_RESOURCES_64BIT is not set
4301 CONFIG_ZONE_DMA_FLAG=1
4304 # CONFIG_XIP_KERNEL is not set
4305 # CONFIG_KEXEC is not set
4306 -# CONFIG_ATAGS_PROC is not set
4309 # Floating point emulation
4311 CONFIG_DEFAULT_TCP_CONG="cubic"
4312 # CONFIG_TCP_MD5SIG is not set
4313 # CONFIG_IPV6 is not set
4314 -# CONFIG_INET6_XFRM_TUNNEL is not set
4315 -# CONFIG_INET6_TUNNEL is not set
4316 # CONFIG_NETWORK_SECMARK is not set
4317 # CONFIG_NETFILTER is not set
4318 # CONFIG_IP_DCCP is not set
4323 +# CONFIG_NET_TCPPROBE is not set
4324 # CONFIG_HAMRADIO is not set
4325 # CONFIG_CAN is not set
4326 # CONFIG_IRDA is not set
4329 CONFIG_PREVENT_FIRMWARE_BUILD=y
4331 +# CONFIG_DEBUG_DRIVER is not set
4332 +# CONFIG_DEBUG_DEVRES is not set
4333 # CONFIG_SYS_HYPERVISOR is not set
4334 # CONFIG_CONNECTOR is not set
4337 # CONFIG_MTD_REDBOOT_PARTS is not set
4338 CONFIG_MTD_CMDLINE_PARTS=y
4339 # CONFIG_MTD_AFS_PARTS is not set
4340 +# CONFIG_MTD_AR7_PARTS is not set
4343 # User Modules And Translation Layers
4346 CONFIG_MTD_BLKDEVS=y
4350 -# CONFIG_NFTL_RW is not set
4351 +# CONFIG_FTL is not set
4352 +# CONFIG_NFTL is not set
4353 # CONFIG_INFTL is not set
4354 # CONFIG_RFD_FTL is not set
4355 # CONFIG_SSFDC is not set
4356 @@ -405,12 +414,12 @@
4357 # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
4360 -CONFIG_MTD_CFI_I4=y
4361 +# CONFIG_MTD_CFI_I4 is not set
4362 # CONFIG_MTD_CFI_I8 is not set
4363 # CONFIG_MTD_OTP is not set
4364 CONFIG_MTD_CFI_INTELEXT=y
4365 CONFIG_MTD_CFI_AMDSTD=y
4366 -CONFIG_MTD_CFI_STAA=y
4367 +# CONFIG_MTD_CFI_STAA is not set
4368 CONFIG_MTD_CFI_UTIL=y
4369 # CONFIG_MTD_RAM is not set
4370 # CONFIG_MTD_ROM is not set
4372 # CONFIG_EEPROM_93CX6 is not set
4373 # CONFIG_SGI_IOC4 is not set
4374 # CONFIG_TIFM_CORE is not set
4375 +# CONFIG_ENCLOSURE_SERVICES is not set
4377 +# CONFIG_IDE is not set
4380 # SCSI device support
4382 # CONFIG_SCSI_IPS is not set
4383 # CONFIG_SCSI_INITIO is not set
4384 # CONFIG_SCSI_INIA100 is not set
4385 +# CONFIG_SCSI_MVSAS is not set
4386 # CONFIG_SCSI_STEX is not set
4387 # CONFIG_SCSI_SYM53C8XX_2 is not set
4388 # CONFIG_SCSI_IPR is not set
4389 @@ -556,7 +569,10 @@
4390 # CONFIG_SCSI_SRP is not set
4392 # CONFIG_ATA_NONSTANDARD is not set
4394 # CONFIG_SATA_AHCI is not set
4395 +# CONFIG_SATA_SIL24 is not set
4397 # CONFIG_SATA_SVW is not set
4398 # CONFIG_ATA_PIIX is not set
4401 # CONFIG_SATA_PROMISE is not set
4402 # CONFIG_SATA_SX4 is not set
4403 # CONFIG_SATA_SIL is not set
4404 -# CONFIG_SATA_SIL24 is not set
4405 # CONFIG_SATA_SIS is not set
4406 # CONFIG_SATA_ULI is not set
4407 # CONFIG_SATA_VIA is not set
4409 # CONFIG_PATA_VIA is not set
4410 # CONFIG_PATA_WINBOND is not set
4411 # CONFIG_PATA_PLATFORM is not set
4412 +# CONFIG_PATA_SCH is not set
4413 # CONFIG_MD is not set
4414 # CONFIG_FUSION is not set
4417 # CONFIG_B44 is not set
4418 # CONFIG_FORCEDETH is not set
4419 # CONFIG_EEPRO100 is not set
4421 +# CONFIG_E100 is not set
4422 # CONFIG_FEALNX is not set
4423 # CONFIG_NATSEMI is not set
4424 # CONFIG_NE2K_PCI is not set
4426 CONFIG_NETDEV_1000=y
4427 # CONFIG_ACENIC is not set
4428 # CONFIG_DL2K is not set
4430 -CONFIG_E1000_NAPI=y
4431 -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
4432 +# CONFIG_E1000 is not set
4433 # CONFIG_E1000E is not set
4434 # CONFIG_E1000E_ENABLED is not set
4435 # CONFIG_IP1000 is not set
4436 @@ -680,27 +694,15 @@
4437 # CONFIG_YELLOWFIN is not set
4438 # CONFIG_R8169 is not set
4439 # CONFIG_SIS190 is not set
4442 -# CONFIG_SK98LIN is not set
4443 +# CONFIG_SKGE is not set
4444 +# CONFIG_SKY2 is not set
4445 # CONFIG_VIA_VELOCITY is not set
4447 +# CONFIG_TIGON3 is not set
4448 # CONFIG_BNX2 is not set
4449 CONFIG_MV643XX_ETH=y
4450 # CONFIG_QLA3XXX is not set
4451 # CONFIG_ATL1 is not set
4452 -CONFIG_NETDEV_10000=y
4453 -# CONFIG_CHELSIO_T1 is not set
4454 -# CONFIG_CHELSIO_T3 is not set
4455 -# CONFIG_IXGBE is not set
4456 -# CONFIG_IXGB is not set
4457 -# CONFIG_S2IO is not set
4458 -# CONFIG_MYRI10GE is not set
4459 -# CONFIG_NETXEN_NIC is not set
4460 -# CONFIG_NIU is not set
4461 -# CONFIG_MLX4_CORE is not set
4462 -# CONFIG_TEHUTI is not set
4463 -# CONFIG_BNX2X is not set
4464 +# CONFIG_NETDEV_10000 is not set
4465 # CONFIG_TR is not set
4470 # CONFIG_WLAN_PRE80211 is not set
4471 # CONFIG_WLAN_80211 is not set
4472 +# CONFIG_IWLWIFI_LEDS is not set
4475 # USB Network Adapters
4476 @@ -738,12 +741,9 @@
4478 # Userland interfaces
4480 -CONFIG_INPUT_MOUSEDEV=y
4481 -CONFIG_INPUT_MOUSEDEV_PSAUX=y
4482 -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
4483 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
4484 +# CONFIG_INPUT_MOUSEDEV is not set
4485 # CONFIG_INPUT_JOYDEV is not set
4486 -# CONFIG_INPUT_EVDEV is not set
4487 +CONFIG_INPUT_EVDEV=y
4488 # CONFIG_INPUT_EVBUG is not set
4491 @@ -765,10 +765,8 @@
4496 -CONFIG_VT_CONSOLE=y
4497 -CONFIG_HW_CONSOLE=y
4498 -# CONFIG_VT_HW_CONSOLE_BINDING is not set
4499 +# CONFIG_VT is not set
4501 # CONFIG_SERIAL_NONSTANDARD is not set
4502 # CONFIG_NOZOMI is not set
4506 CONFIG_SERIAL_8250=y
4507 CONFIG_SERIAL_8250_CONSOLE=y
4508 -CONFIG_SERIAL_8250_PCI=y
4509 +# CONFIG_SERIAL_8250_PCI is not set
4510 CONFIG_SERIAL_8250_NR_UARTS=4
4511 CONFIG_SERIAL_8250_RUNTIME_UARTS=2
4512 # CONFIG_SERIAL_8250_EXTENDED is not set
4514 CONFIG_LEGACY_PTYS=y
4515 CONFIG_LEGACY_PTY_COUNT=16
4516 # CONFIG_IPMI_HANDLER is not set
4518 +# CONFIG_HW_RANDOM is not set
4519 # CONFIG_NVRAM is not set
4520 # CONFIG_R3964 is not set
4521 # CONFIG_APPLICOM is not set
4522 @@ -804,13 +802,6 @@
4523 CONFIG_I2C_CHARDEV=y
4528 -# CONFIG_I2C_ALGOBIT is not set
4529 -# CONFIG_I2C_ALGOPCF is not set
4530 -# CONFIG_I2C_ALGOPCA is not set
4533 # I2C Hardware Bus support
4535 # CONFIG_I2C_ALI1535 is not set
4537 # CONFIG_I2C_VIA is not set
4538 # CONFIG_I2C_VIAPRO is not set
4539 # CONFIG_I2C_VOODOO3 is not set
4540 +# CONFIG_I2C_PCA_PLATFORM is not set
4541 CONFIG_I2C_MV64XXX=y
4544 @@ -847,19 +839,13 @@
4545 # CONFIG_SENSORS_PCF8574 is not set
4546 # CONFIG_PCF8575 is not set
4547 # CONFIG_SENSORS_PCF8591 is not set
4548 -# CONFIG_TPS65010 is not set
4549 # CONFIG_SENSORS_MAX6875 is not set
4550 # CONFIG_SENSORS_TSL2550 is not set
4551 # CONFIG_I2C_DEBUG_CORE is not set
4552 # CONFIG_I2C_DEBUG_ALGO is not set
4553 # CONFIG_I2C_DEBUG_BUS is not set
4554 # CONFIG_I2C_DEBUG_CHIP is not set
4559 # CONFIG_SPI is not set
4560 -# CONFIG_SPI_MASTER is not set
4561 # CONFIG_W1 is not set
4562 # CONFIG_POWER_SUPPLY is not set
4565 # CONFIG_SENSORS_ADM1031 is not set
4566 # CONFIG_SENSORS_ADM9240 is not set
4567 # CONFIG_SENSORS_ADT7470 is not set
4568 +# CONFIG_SENSORS_ADT7473 is not set
4569 # CONFIG_SENSORS_ATXP1 is not set
4570 # CONFIG_SENSORS_DS1621 is not set
4571 # CONFIG_SENSORS_I5K_AMB is not set
4573 # CONFIG_SENSORS_SMSC47M1 is not set
4574 # CONFIG_SENSORS_SMSC47M192 is not set
4575 # CONFIG_SENSORS_SMSC47B397 is not set
4576 +# CONFIG_SENSORS_ADS7828 is not set
4577 # CONFIG_SENSORS_THMC50 is not set
4578 # CONFIG_SENSORS_VIA686A is not set
4579 # CONFIG_SENSORS_VT1211 is not set
4581 # CONFIG_SENSORS_W83792D is not set
4582 # CONFIG_SENSORS_W83793 is not set
4583 # CONFIG_SENSORS_W83L785TS is not set
4584 +# CONFIG_SENSORS_W83L786NG is not set
4585 # CONFIG_SENSORS_W83627HF is not set
4586 # CONFIG_SENSORS_W83627EHF is not set
4587 # CONFIG_HWMON_DEBUG_CHIP is not set
4588 @@ -925,14 +914,24 @@
4589 # Multifunction device drivers
4591 # CONFIG_MFD_SM501 is not set
4592 +# CONFIG_MFD_ASIC3 is not set
4593 +# CONFIG_HTC_PASIC3 is not set
4596 # Multimedia devices
4600 +# Multimedia core support
4602 # CONFIG_VIDEO_DEV is not set
4603 # CONFIG_DVB_CORE is not set
4605 -# CONFIG_USB_DABUSB is not set
4606 +# CONFIG_VIDEO_MEDIA is not set
4609 +# Multimedia drivers
4611 +# CONFIG_DAB is not set
4615 @@ -949,12 +948,6 @@
4616 # CONFIG_DISPLAY_SUPPORT is not set
4619 -# Console display driver support
4621 -# CONFIG_VGA_CONSOLE is not set
4622 -CONFIG_DUMMY_CONSOLE=y
4627 # CONFIG_SOUND is not set
4628 @@ -985,14 +978,18 @@
4629 CONFIG_USB_DEVICE_CLASS=y
4630 # CONFIG_USB_DYNAMIC_MINORS is not set
4631 # CONFIG_USB_OTG is not set
4632 +# CONFIG_USB_OTG_WHITELIST is not set
4633 +# CONFIG_USB_OTG_BLACKLIST_HUB is not set
4636 # USB Host Controller Drivers
4638 +# CONFIG_USB_C67X00_HCD is not set
4639 CONFIG_USB_EHCI_HCD=y
4640 CONFIG_USB_EHCI_ROOT_HUB_TT=y
4641 CONFIG_USB_EHCI_TT_NEWSCHED=y
4642 # CONFIG_USB_ISP116X_HCD is not set
4643 +# CONFIG_USB_ISP1760_HCD is not set
4644 # CONFIG_USB_OHCI_HCD is not set
4645 # CONFIG_USB_UHCI_HCD is not set
4646 # CONFIG_USB_SL811_HCD is not set
4647 @@ -1003,6 +1000,7 @@
4649 # CONFIG_USB_ACM is not set
4650 CONFIG_USB_PRINTER=y
4651 +# CONFIG_USB_WDM is not set
4654 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
4655 @@ -1022,7 +1020,9 @@
4656 CONFIG_USB_STORAGE_SDDR55=y
4657 CONFIG_USB_STORAGE_JUMPSHOT=y
4658 # CONFIG_USB_STORAGE_ALAUDA is not set
4659 +# CONFIG_USB_STORAGE_ONETOUCH is not set
4660 # CONFIG_USB_STORAGE_KARMA is not set
4661 +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
4662 # CONFIG_USB_LIBUSUAL is not set
4665 @@ -1060,6 +1060,7 @@
4666 # CONFIG_USB_TRANCEVIBRATOR is not set
4667 # CONFIG_USB_IOWARRIOR is not set
4668 # CONFIG_USB_TEST is not set
4669 +# CONFIG_USB_ISIGHTFW is not set
4670 # CONFIG_USB_GADGET is not set
4671 # CONFIG_MMC is not set
4673 @@ -1076,6 +1077,7 @@
4674 CONFIG_LEDS_TRIGGERS=y
4675 CONFIG_LEDS_TRIGGER_TIMER=y
4676 CONFIG_LEDS_TRIGGER_HEARTBEAT=y
4677 +# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
4680 CONFIG_RTC_HCTOSYS=y
4681 @@ -1105,6 +1107,7 @@
4682 # CONFIG_RTC_DRV_PCF8583 is not set
4683 CONFIG_RTC_DRV_M41T80=y
4684 # CONFIG_RTC_DRV_M41T80_WDT is not set
4685 +# CONFIG_RTC_DRV_S35390A is not set
4689 @@ -1125,6 +1128,7 @@
4691 # on-CPU RTC drivers
4693 +# CONFIG_UIO is not set
4697 @@ -1140,14 +1144,11 @@
4698 # CONFIG_JFS_FS is not set
4699 # CONFIG_FS_POSIX_ACL is not set
4700 # CONFIG_XFS_FS is not set
4701 -# CONFIG_GFS2_FS is not set
4702 # CONFIG_OCFS2_FS is not set
4703 -# CONFIG_MINIX_FS is not set
4704 -# CONFIG_ROMFS_FS is not set
4707 CONFIG_INOTIFY_USER=y
4708 # CONFIG_QUOTA is not set
4710 # CONFIG_AUTOFS_FS is not set
4711 # CONFIG_AUTOFS4_FS is not set
4712 # CONFIG_FUSE_FS is not set
4713 @@ -1155,8 +1156,8 @@
4715 # CD-ROM/DVD Filesystems
4717 -CONFIG_ISO9660_FS=y
4718 -# CONFIG_JOLIET is not set
4719 +CONFIG_ISO9660_FS=m
4721 # CONFIG_ZISOFS is not set
4724 @@ -1205,8 +1206,10 @@
4725 # CONFIG_JFFS2_RUBIN is not set
4727 # CONFIG_VXFS_FS is not set
4728 +# CONFIG_MINIX_FS is not set
4729 # CONFIG_HPFS_FS is not set
4730 # CONFIG_QNX4FS_FS is not set
4731 +# CONFIG_ROMFS_FS is not set
4732 # CONFIG_SYSV_FS is not set
4733 # CONFIG_UFS_FS is not set
4734 CONFIG_NETWORK_FILESYSTEMS=y
4735 @@ -1214,7 +1217,6 @@
4737 # CONFIG_NFS_V3_ACL is not set
4738 # CONFIG_NFS_V4 is not set
4739 -# CONFIG_NFS_DIRECTIO is not set
4740 # CONFIG_NFSD is not set
4743 @@ -1241,14 +1243,13 @@
4744 # CONFIG_MAC_PARTITION is not set
4745 CONFIG_MSDOS_PARTITION=y
4746 CONFIG_BSD_DISKLABEL=y
4747 -CONFIG_MINIX_SUBPARTITION=y
4748 -CONFIG_SOLARIS_X86_PARTITION=y
4749 -CONFIG_UNIXWARE_DISKLABEL=y
4750 -CONFIG_LDM_PARTITION=y
4752 +# CONFIG_MINIX_SUBPARTITION is not set
4753 +# CONFIG_SOLARIS_X86_PARTITION is not set
4754 +# CONFIG_UNIXWARE_DISKLABEL is not set
4755 +# CONFIG_LDM_PARTITION is not set
4756 # CONFIG_SGI_PARTITION is not set
4757 # CONFIG_ULTRIX_PARTITION is not set
4758 -CONFIG_SUN_PARTITION=y
4759 +# CONFIG_SUN_PARTITION is not set
4760 # CONFIG_KARMA_PARTITION is not set
4761 # CONFIG_EFI_PARTITION is not set
4762 # CONFIG_SYSV68_PARTITION is not set
4763 @@ -1300,15 +1301,48 @@
4764 # CONFIG_PRINTK_TIME is not set
4765 CONFIG_ENABLE_WARN_DEPRECATED=y
4766 CONFIG_ENABLE_MUST_CHECK=y
4767 -# CONFIG_MAGIC_SYSRQ is not set
4768 +CONFIG_FRAME_WARN=1024
4769 +CONFIG_MAGIC_SYSRQ=y
4770 # CONFIG_UNUSED_SYMBOLS is not set
4771 # CONFIG_DEBUG_FS is not set
4772 # CONFIG_HEADERS_CHECK is not set
4773 -# CONFIG_DEBUG_KERNEL is not set
4774 +CONFIG_DEBUG_KERNEL=y
4775 +# CONFIG_DEBUG_SHIRQ is not set
4776 +CONFIG_DETECT_SOFTLOCKUP=y
4777 +CONFIG_SCHED_DEBUG=y
4778 +CONFIG_SCHEDSTATS=y
4779 +# CONFIG_TIMER_STATS is not set
4780 +# CONFIG_DEBUG_OBJECTS is not set
4781 +CONFIG_DEBUG_PREEMPT=y
4782 +# CONFIG_DEBUG_RT_MUTEXES is not set
4783 +# CONFIG_RT_MUTEX_TESTER is not set
4784 +# CONFIG_DEBUG_SPINLOCK is not set
4785 +# CONFIG_DEBUG_MUTEXES is not set
4786 +# CONFIG_DEBUG_LOCK_ALLOC is not set
4787 +# CONFIG_PROVE_LOCKING is not set
4788 +# CONFIG_LOCK_STAT is not set
4789 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
4790 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
4791 +# CONFIG_DEBUG_KOBJECT is not set
4792 # CONFIG_DEBUG_BUGVERBOSE is not set
4793 +CONFIG_DEBUG_INFO=y
4794 +# CONFIG_DEBUG_VM is not set
4795 +# CONFIG_DEBUG_WRITECOUNT is not set
4796 +# CONFIG_DEBUG_LIST is not set
4797 +# CONFIG_DEBUG_SG is not set
4798 CONFIG_FRAME_POINTER=y
4799 +# CONFIG_BOOT_PRINTK_DELAY is not set
4800 +# CONFIG_RCU_TORTURE_TEST is not set
4801 +# CONFIG_KPROBES_SANITY_TEST is not set
4802 +# CONFIG_BACKTRACE_SELF_TEST is not set
4803 +# CONFIG_LKDTM is not set
4804 +# CONFIG_FAULT_INJECTION is not set
4805 # CONFIG_SAMPLES is not set
4807 +CONFIG_DEBUG_ERRORS=y
4808 +# CONFIG_DEBUG_STACK_USAGE is not set
4810 +# CONFIG_DEBUG_ICEDCC is not set
4814 @@ -1317,50 +1351,79 @@
4815 # CONFIG_SECURITY is not set
4816 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
4820 +# Crypto core or helper
4822 CONFIG_CRYPTO_ALGAPI=m
4823 CONFIG_CRYPTO_BLKCIPHER=m
4824 -# CONFIG_CRYPTO_SEQIV is not set
4825 CONFIG_CRYPTO_MANAGER=m
4826 +# CONFIG_CRYPTO_GF128MUL is not set
4827 +# CONFIG_CRYPTO_NULL is not set
4828 +# CONFIG_CRYPTO_CRYPTD is not set
4829 +# CONFIG_CRYPTO_AUTHENC is not set
4830 +# CONFIG_CRYPTO_TEST is not set
4833 +# Authenticated Encryption with Associated Data
4835 +# CONFIG_CRYPTO_CCM is not set
4836 +# CONFIG_CRYPTO_GCM is not set
4837 +# CONFIG_CRYPTO_SEQIV is not set
4842 +CONFIG_CRYPTO_CBC=m
4843 +# CONFIG_CRYPTO_CTR is not set
4844 +# CONFIG_CRYPTO_CTS is not set
4845 +CONFIG_CRYPTO_ECB=m
4846 +# CONFIG_CRYPTO_LRW is not set
4847 +CONFIG_CRYPTO_PCBC=m
4848 +# CONFIG_CRYPTO_XTS is not set
4853 # CONFIG_CRYPTO_HMAC is not set
4854 # CONFIG_CRYPTO_XCBC is not set
4855 -# CONFIG_CRYPTO_NULL is not set
4860 +# CONFIG_CRYPTO_CRC32C is not set
4861 # CONFIG_CRYPTO_MD4 is not set
4862 # CONFIG_CRYPTO_MD5 is not set
4863 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
4864 # CONFIG_CRYPTO_SHA1 is not set
4865 # CONFIG_CRYPTO_SHA256 is not set
4866 # CONFIG_CRYPTO_SHA512 is not set
4867 -# CONFIG_CRYPTO_WP512 is not set
4868 # CONFIG_CRYPTO_TGR192 is not set
4869 -# CONFIG_CRYPTO_GF128MUL is not set
4870 -CONFIG_CRYPTO_ECB=m
4871 -CONFIG_CRYPTO_CBC=m
4872 -CONFIG_CRYPTO_PCBC=m
4873 -# CONFIG_CRYPTO_LRW is not set
4874 -# CONFIG_CRYPTO_XTS is not set
4875 -# CONFIG_CRYPTO_CTR is not set
4876 -# CONFIG_CRYPTO_GCM is not set
4877 -# CONFIG_CRYPTO_CCM is not set
4878 -# CONFIG_CRYPTO_CRYPTD is not set
4879 -# CONFIG_CRYPTO_DES is not set
4880 -# CONFIG_CRYPTO_FCRYPT is not set
4881 -# CONFIG_CRYPTO_BLOWFISH is not set
4882 -# CONFIG_CRYPTO_TWOFISH is not set
4883 -# CONFIG_CRYPTO_SERPENT is not set
4884 +# CONFIG_CRYPTO_WP512 is not set
4889 # CONFIG_CRYPTO_AES is not set
4890 +# CONFIG_CRYPTO_ANUBIS is not set
4891 +# CONFIG_CRYPTO_ARC4 is not set
4892 +# CONFIG_CRYPTO_BLOWFISH is not set
4893 +# CONFIG_CRYPTO_CAMELLIA is not set
4894 # CONFIG_CRYPTO_CAST5 is not set
4895 # CONFIG_CRYPTO_CAST6 is not set
4896 -# CONFIG_CRYPTO_TEA is not set
4897 -# CONFIG_CRYPTO_ARC4 is not set
4898 +# CONFIG_CRYPTO_DES is not set
4899 +# CONFIG_CRYPTO_FCRYPT is not set
4900 # CONFIG_CRYPTO_KHAZAD is not set
4901 -# CONFIG_CRYPTO_ANUBIS is not set
4902 -# CONFIG_CRYPTO_SEED is not set
4903 # CONFIG_CRYPTO_SALSA20 is not set
4904 +# CONFIG_CRYPTO_SEED is not set
4905 +# CONFIG_CRYPTO_SERPENT is not set
4906 +# CONFIG_CRYPTO_TEA is not set
4907 +# CONFIG_CRYPTO_TWOFISH is not set
4912 # CONFIG_CRYPTO_DEFLATE is not set
4913 -# CONFIG_CRYPTO_MICHAEL_MIC is not set
4914 -# CONFIG_CRYPTO_CRC32C is not set
4915 -# CONFIG_CRYPTO_CAMELLIA is not set
4916 -# CONFIG_CRYPTO_TEST is not set
4917 -# CONFIG_CRYPTO_AUTHENC is not set
4918 # CONFIG_CRYPTO_LZO is not set
4920 # CONFIG_CRYPTO_DEV_HIFN_795X is not set
4921 @@ -1369,12 +1432,14 @@
4927 -# CONFIG_CRC_ITU_T is not set
4928 +# CONFIG_GENERIC_FIND_FIRST_BIT is not set
4929 +# CONFIG_GENERIC_FIND_NEXT_BIT is not set
4930 +# CONFIG_CRC_CCITT is not set
4931 +# CONFIG_CRC16 is not set
4934 # CONFIG_CRC7 is not set
4936 +# CONFIG_LIBCRC32C is not set
4937 CONFIG_ZLIB_INFLATE=y
4938 CONFIG_ZLIB_DEFLATE=y
4940 --- a/arch/arm/kernel/stacktrace.c
4941 +++ b/arch/arm/kernel/stacktrace.c
4943 #ifdef CONFIG_STACKTRACE
4944 struct stack_trace_data {
4945 struct stack_trace *trace;
4946 + unsigned int no_sched_functions;
4952 struct stack_trace_data *data = d;
4953 struct stack_trace *trace = data->trace;
4954 + unsigned long addr = frame->lr;
4956 + if (data->no_sched_functions && in_sched_functions(addr))
4963 - trace->entries[trace->nr_entries++] = frame->lr;
4964 + trace->entries[trace->nr_entries++] = addr;
4966 return trace->nr_entries >= trace->max_entries;
4969 -void save_stack_trace(struct stack_trace *trace)
4970 +void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
4972 struct stack_trace_data data;
4973 unsigned long fp, base;
4976 data.skip = trace->skip;
4977 - base = (unsigned long)task_stack_page(current);
4978 - asm("mov %0, fp" : "=r" (fp));
4979 + base = (unsigned long)task_stack_page(tsk);
4981 + if (tsk != current) {
4984 + * What guarantees do we have here that 'tsk'
4985 + * is not running on another CPU?
4989 + data.no_sched_functions = 1;
4990 + fp = thread_saved_fp(tsk);
4993 + data.no_sched_functions = 0;
4994 + asm("mov %0, fp" : "=r" (fp));
4997 walk_stackframe(fp, base, base + THREAD_SIZE, save_trace, &data);
4998 + if (trace->nr_entries < trace->max_entries)
4999 + trace->entries[trace->nr_entries++] = ULONG_MAX;
5002 +void save_stack_trace(struct stack_trace *trace)
5004 + save_stack_trace_tsk(current, trace);
5007 --- a/arch/arm/lib/copy_template.S
5008 +++ b/arch/arm/lib/copy_template.S
5013 - * This can be used to enable code to cacheline align the source pointer.
5014 - * Experiments on tested architectures (StrongARM and XScale) didn't show
5015 - * this a worthwhile thing to do. That might be different in the future.
5017 -//#define CALGN(code...) code
5018 -#define CALGN(code...)
5021 * Theory of operation
5022 * -------------------
5025 stmfd sp!, {r5 - r8}
5028 - CALGN( ands ip, r1, #31 )
5029 + CALGN( ands ip, r0, #31 )
5030 CALGN( rsb r3, ip, #32 )
5031 CALGN( sbcnes r4, r3, r2 ) @ C is always set here
5037 - CALGN( ands ip, r1, #31 )
5038 + CALGN( ands ip, r0, #31 )
5039 CALGN( rsb ip, ip, #32 )
5040 CALGN( sbcnes r4, ip, r2 ) @ C is always set here
5041 CALGN( subcc r2, r2, ip )
5042 --- a/arch/arm/lib/memmove.S
5043 +++ b/arch/arm/lib/memmove.S
5045 #include <linux/linkage.h>
5046 #include <asm/assembler.h>
5049 - * This can be used to enable code to cacheline align the source pointer.
5050 - * Experiments on tested architectures (StrongARM and XScale) didn't show
5051 - * this a worthwhile thing to do. That might be different in the future.
5053 -//#define CALGN(code...) code
5054 -#define CALGN(code...)
5060 stmfd sp!, {r5 - r8}
5063 - CALGN( ands ip, r1, #31 )
5064 + CALGN( ands ip, r0, #31 )
5065 CALGN( sbcnes r4, ip, r2 ) @ C is always set here
5068 CALGN( subs r2, r2, ip ) @ C is set here
5069 + CALGN( rsb ip, ip, #32 )
5070 CALGN( add pc, r4, ip )
5072 PLD( pld [r1, #-4] )
5077 - CALGN( ands ip, r1, #31 )
5078 - CALGN( rsb ip, ip, #32 )
5079 + CALGN( ands ip, r0, #31 )
5080 CALGN( sbcnes r4, ip, r2 ) @ C is always set here
5081 CALGN( subcc r2, r2, ip )
5083 --- a/arch/arm/lib/memset.S
5084 +++ b/arch/arm/lib/memset.S
5093 * We need an extra register for this loop - save the return address and
5096 stmneia r0!, {r1, r3, ip, lr}
5102 + * This version aligns the destination pointer in order to write
5103 + * whole cache lines at once.
5106 + stmfd sp!, {r4-r7, lr}
5121 + movs ip, ip, lsl #(32 - 4)
5122 + stmcsia r0!, {r4, r5, r6, r7}
5123 + stmmiia r0!, {r4, r5}
5124 + tst ip, #(1 << 30)
5126 + strne r1, [r0], #4
5128 +3: subs r2, r2, #64
5129 + stmgeia r0!, {r1, r3-r7, ip, lr}
5130 + stmgeia r0!, {r1, r3-r7, ip, lr}
5132 + ldmeqfd sp!, {r4-r7, pc}
5135 + stmneia r0!, {r1, r3-r7, ip, lr}
5137 + stmneia r0!, {r4-r7}
5138 + ldmfd sp!, {r4-r7, lr}
5143 stmneia r0!, {r1, r3}
5145 --- a/arch/arm/lib/memzero.S
5146 +++ b/arch/arm/lib/memzero.S
5149 cmp r1, #16 @ 1 we can skip this chunk if we
5150 blt 4f @ 1 have < 16 bytes
5155 * We need an extra register for this loop - save the return address and
5158 stmneia r0!, {r2, r3, ip, lr} @ 4
5159 ldr lr, [sp], #4 @ 1
5164 + * This version aligns the destination pointer in order to write
5165 + * whole cache lines at once.
5168 + stmfd sp!, {r4-r7, lr}
5177 + andgts ip, r0, #31
5182 + movs ip, ip, lsl #(32 - 4)
5183 + stmcsia r0!, {r4, r5, r6, r7}
5184 + stmmiia r0!, {r4, r5}
5185 + movs ip, ip, lsl #2
5186 + strcs r2, [r0], #4
5188 +3: subs r1, r1, #64
5189 + stmgeia r0!, {r2-r7, ip, lr}
5190 + stmgeia r0!, {r2-r7, ip, lr}
5192 + ldmeqfd sp!, {r4-r7, pc}
5195 + stmneia r0!, {r2-r7, ip, lr}
5197 + stmneia r0!, {r4-r7}
5198 + ldmfd sp!, {r4-r7, lr}
5202 4: tst r1, #8 @ 1 8 bytes or more?
5203 stmneia r0!, {r2, r3} @ 2
5204 tst r1, #4 @ 1 4 bytes or more?
5206 +++ b/arch/arm/mach-kirkwood/Kconfig
5210 +menu "Marvell Kirkwood Implementations"
5212 +config MACH_DB88F6281_BP
5213 + bool "Marvell DB-88F6281-BP Development Board"
5215 + Say 'Y' here if you want your kernel to support the
5216 + Marvell DB-88F6281-BP Development Board.
5218 +config MACH_RD88F6192_NAS
5219 + bool "Marvell RD-88F6192-NAS Reference Board"
5221 + Say 'Y' here if you want your kernel to support the
5222 + Marvell RD-88F6192-NAS Reference Board.
5224 +config MACH_RD88F6281
5225 + bool "Marvell RD-88F6281 Reference Board"
5227 + Say 'Y' here if you want your kernel to support the
5228 + Marvell RD-88F6281 Reference Board.
5234 +++ b/arch/arm/mach-kirkwood/Makefile
5236 +obj-y += common.o addr-map.o irq.o pcie.o
5238 +obj-$(CONFIG_MACH_DB88F6281_BP) += db88f6281-bp-setup.o
5239 +obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o
5240 +obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6281-setup.o
5242 +++ b/arch/arm/mach-kirkwood/Makefile.boot
5244 + zreladdr-y := 0x00008000
5245 +params_phys-y := 0x00000100
5246 +initrd_phys-y := 0x00800000
5248 +++ b/arch/arm/mach-kirkwood/addr-map.c
5251 + * arch/arm/mach-kirkwood/addr-map.c
5253 + * Address map functions for Marvell Kirkwood SoCs
5255 + * This file is licensed under the terms of the GNU General Public
5256 + * License version 2. This program is licensed "as is" without any
5257 + * warranty of any kind, whether express or implied.
5260 +#include <linux/kernel.h>
5261 +#include <linux/init.h>
5262 +#include <linux/mbus.h>
5263 +#include <linux/io.h>
5264 +#include <asm/hardware.h>
5265 +#include "common.h"
5268 + * Generic Address Decode Windows bit settings
5270 +#define TARGET_DDR 0
5271 +#define TARGET_DEV_BUS 1
5272 +#define TARGET_PCIE 4
5273 +#define ATTR_DEV_SPI_ROM 0x1e
5274 +#define ATTR_DEV_BOOT 0x1d
5275 +#define ATTR_DEV_NAND 0x2f
5276 +#define ATTR_DEV_CS3 0x37
5277 +#define ATTR_DEV_CS2 0x3b
5278 +#define ATTR_DEV_CS1 0x3d
5279 +#define ATTR_DEV_CS0 0x3e
5280 +#define ATTR_PCIE_IO 0xe0
5281 +#define ATTR_PCIE_MEM 0xe8
5284 + * Helpers to get DDR bank info
5286 +#define DDR_BASE_CS_OFF(n) (0x0000 + ((n) << 3))
5287 +#define DDR_SIZE_CS_OFF(n) (0x0004 + ((n) << 3))
5290 + * CPU Address Decode Windows registers
5292 +#define WIN_OFF(n) (BRIDGE_VIRT_BASE + 0x0000 + ((n) << 4))
5293 +#define WIN_CTRL_OFF 0x0000
5294 +#define WIN_BASE_OFF 0x0004
5295 +#define WIN_REMAP_LO_OFF 0x0008
5296 +#define WIN_REMAP_HI_OFF 0x000c
5299 +struct mbus_dram_target_info kirkwood_mbus_dram_info;
5301 +static int __init cpu_win_can_remap(int win)
5309 +static void __init setup_cpu_win(int win, u32 base, u32 size,
5310 + u8 target, u8 attr, int remap)
5312 + void __iomem *addr = (void __iomem *)WIN_OFF(win);
5315 + base &= 0xffff0000;
5316 + ctrl = ((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) | 1;
5318 + writel(base, addr + WIN_BASE_OFF);
5319 + writel(ctrl, addr + WIN_CTRL_OFF);
5320 + if (cpu_win_can_remap(win)) {
5324 + writel(remap & 0xffff0000, addr + WIN_REMAP_LO_OFF);
5325 + writel(0, addr + WIN_REMAP_HI_OFF);
5329 +void __init kirkwood_setup_cpu_mbus(void)
5331 + void __iomem *addr;
5336 + * First, disable and clear windows.
5338 + for (i = 0; i < 8; i++) {
5339 + addr = (void __iomem *)WIN_OFF(i);
5341 + writel(0, addr + WIN_BASE_OFF);
5342 + writel(0, addr + WIN_CTRL_OFF);
5343 + if (cpu_win_can_remap(i)) {
5344 + writel(0, addr + WIN_REMAP_LO_OFF);
5345 + writel(0, addr + WIN_REMAP_HI_OFF);
5350 + * Setup windows for PCIe IO+MEM space.
5352 + setup_cpu_win(0, KIRKWOOD_PCIE_IO_PHYS_BASE, KIRKWOOD_PCIE_IO_SIZE,
5353 + TARGET_PCIE, ATTR_PCIE_IO, KIRKWOOD_PCIE_IO_BUS_BASE);
5354 + setup_cpu_win(1, KIRKWOOD_PCIE_MEM_PHYS_BASE, KIRKWOOD_PCIE_MEM_SIZE,
5355 + TARGET_PCIE, ATTR_PCIE_MEM, -1);
5358 + * Setup window for NAND controller.
5360 + setup_cpu_win(2, KIRKWOOD_NAND_MEM_PHYS_BASE, KIRKWOOD_NAND_MEM_SIZE,
5361 + TARGET_DEV_BUS, ATTR_DEV_NAND, -1);
5364 + * Setup MBUS dram target info.
5366 + kirkwood_mbus_dram_info.mbus_dram_target_id = TARGET_DDR;
5368 + addr = (void __iomem *)DDR_WINDOW_CPU_BASE;
5370 + for (i = 0, cs = 0; i < 4; i++) {
5371 + u32 base = readl(addr + DDR_BASE_CS_OFF(i));
5372 + u32 size = readl(addr + DDR_SIZE_CS_OFF(i));
5375 + * Chip select enabled?
5378 + struct mbus_dram_window *w;
5380 + w = &kirkwood_mbus_dram_info.cs[cs++];
5382 + w->mbus_attr = 0xf & ~(1 << i);
5383 + w->base = base & 0xffff0000;
5384 + w->size = (size | 0x0000ffff) + 1;
5387 + kirkwood_mbus_dram_info.num_cs = cs;
5390 +++ b/arch/arm/mach-kirkwood/common.c
5393 + * arch/arm/mach-kirkwood/common.c
5395 + * Core functions for Marvell Kirkwood SoCs
5397 + * This file is licensed under the terms of the GNU General Public
5398 + * License version 2. This program is licensed "as is" without any
5399 + * warranty of any kind, whether express or implied.
5402 +#include <linux/kernel.h>
5403 +#include <linux/init.h>
5404 +#include <linux/platform_device.h>
5405 +#include <linux/serial_8250.h>
5406 +#include <linux/mbus.h>
5407 +#include <linux/mv643xx_eth.h>
5408 +#include <linux/ata_platform.h>
5409 +#include <asm/page.h>
5410 +#include <asm/timex.h>
5411 +#include <asm/mach/map.h>
5412 +#include <asm/mach/time.h>
5413 +#include <asm/arch/kirkwood.h>
5414 +#include <asm/plat-orion/cache-feroceon-l2.h>
5415 +#include <asm/plat-orion/ehci-orion.h>
5416 +#include <asm/plat-orion/orion_nand.h>
5417 +#include <asm/plat-orion/time.h>
5418 +#include "common.h"
5420 +/*****************************************************************************
5421 + * I/O Address Mapping
5422 + ****************************************************************************/
5423 +static struct map_desc kirkwood_io_desc[] __initdata = {
5425 + .virtual = KIRKWOOD_PCIE_IO_VIRT_BASE,
5426 + .pfn = __phys_to_pfn(KIRKWOOD_PCIE_IO_PHYS_BASE),
5427 + .length = KIRKWOOD_PCIE_IO_SIZE,
5428 + .type = MT_DEVICE,
5430 + .virtual = KIRKWOOD_REGS_VIRT_BASE,
5431 + .pfn = __phys_to_pfn(KIRKWOOD_REGS_PHYS_BASE),
5432 + .length = KIRKWOOD_REGS_SIZE,
5433 + .type = MT_DEVICE,
5437 +void __init kirkwood_map_io(void)
5439 + iotable_init(kirkwood_io_desc, ARRAY_SIZE(kirkwood_io_desc));
5443 +/*****************************************************************************
5445 + ****************************************************************************/
5446 +static struct orion_ehci_data kirkwood_ehci_data = {
5447 + .dram = &kirkwood_mbus_dram_info,
5450 +static u64 ehci_dmamask = 0xffffffffUL;
5453 +/*****************************************************************************
5455 + ****************************************************************************/
5456 +static struct resource kirkwood_ehci_resources[] = {
5458 + .start = USB_PHYS_BASE,
5459 + .end = USB_PHYS_BASE + 0x0fff,
5460 + .flags = IORESOURCE_MEM,
5462 + .start = IRQ_KIRKWOOD_USB,
5463 + .end = IRQ_KIRKWOOD_USB,
5464 + .flags = IORESOURCE_IRQ,
5468 +static struct platform_device kirkwood_ehci = {
5469 + .name = "orion-ehci",
5472 + .dma_mask = &ehci_dmamask,
5473 + .coherent_dma_mask = 0xffffffff,
5474 + .platform_data = &kirkwood_ehci_data,
5476 + .resource = kirkwood_ehci_resources,
5477 + .num_resources = ARRAY_SIZE(kirkwood_ehci_resources),
5480 +void __init kirkwood_ehci_init(void)
5482 + platform_device_register(&kirkwood_ehci);
5486 +/*****************************************************************************
5488 + ****************************************************************************/
5489 +struct mv643xx_eth_shared_platform_data kirkwood_ge00_shared_data = {
5490 + .t_clk = KIRKWOOD_TCLK,
5491 + .dram = &kirkwood_mbus_dram_info,
5494 +static struct resource kirkwood_ge00_shared_resources[] = {
5496 + .name = "ge00 base",
5497 + .start = GE00_PHYS_BASE + 0x2000,
5498 + .end = GE00_PHYS_BASE + 0x3fff,
5499 + .flags = IORESOURCE_MEM,
5503 +static struct platform_device kirkwood_ge00_shared = {
5504 + .name = MV643XX_ETH_SHARED_NAME,
5507 + .platform_data = &kirkwood_ge00_shared_data,
5509 + .num_resources = 1,
5510 + .resource = kirkwood_ge00_shared_resources,
5513 +static struct resource kirkwood_ge00_resources[] = {
5515 + .name = "ge00 irq",
5516 + .start = IRQ_KIRKWOOD_GE00_SUM,
5517 + .end = IRQ_KIRKWOOD_GE00_SUM,
5518 + .flags = IORESOURCE_IRQ,
5522 +static struct platform_device kirkwood_ge00 = {
5523 + .name = MV643XX_ETH_NAME,
5525 + .num_resources = 1,
5526 + .resource = kirkwood_ge00_resources,
5529 +void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data)
5531 + eth_data->shared = &kirkwood_ge00_shared;
5532 + kirkwood_ge00.dev.platform_data = eth_data;
5534 + platform_device_register(&kirkwood_ge00_shared);
5535 + platform_device_register(&kirkwood_ge00);
5539 +/*****************************************************************************
5541 + ****************************************************************************/
5542 +static struct resource kirkwood_rtc_resource = {
5543 + .start = RTC_PHYS_BASE,
5544 + .end = RTC_PHYS_BASE + SZ_16 - 1,
5545 + .flags = IORESOURCE_MEM,
5548 +void __init kirkwood_rtc_init(void)
5550 + platform_device_register_simple("rtc-mv", -1, &kirkwood_rtc_resource, 1);
5554 +/*****************************************************************************
5556 + ****************************************************************************/
5557 +static struct resource kirkwood_sata_resources[] = {
5559 + .name = "sata base",
5560 + .start = SATA_PHYS_BASE,
5561 + .end = SATA_PHYS_BASE + 0x5000 - 1,
5562 + .flags = IORESOURCE_MEM,
5564 + .name = "sata irq",
5565 + .start = IRQ_KIRKWOOD_SATA,
5566 + .end = IRQ_KIRKWOOD_SATA,
5567 + .flags = IORESOURCE_IRQ,
5571 +static struct platform_device kirkwood_sata = {
5572 + .name = "sata_mv",
5575 + .coherent_dma_mask = 0xffffffff,
5577 + .num_resources = ARRAY_SIZE(kirkwood_sata_resources),
5578 + .resource = kirkwood_sata_resources,
5581 +void __init kirkwood_sata_init(struct mv_sata_platform_data *sata_data)
5583 + sata_data->dram = &kirkwood_mbus_dram_info;
5584 + kirkwood_sata.dev.platform_data = sata_data;
5585 + platform_device_register(&kirkwood_sata);
5589 +/*****************************************************************************
5591 + ****************************************************************************/
5592 +static struct plat_serial8250_port kirkwood_uart0_data[] = {
5594 + .mapbase = UART0_PHYS_BASE,
5595 + .membase = (char *)UART0_VIRT_BASE,
5596 + .irq = IRQ_KIRKWOOD_UART_0,
5597 + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
5598 + .iotype = UPIO_MEM,
5600 + .uartclk = KIRKWOOD_TCLK,
5605 +static struct resource kirkwood_uart0_resources[] = {
5607 + .start = UART0_PHYS_BASE,
5608 + .end = UART0_PHYS_BASE + 0xff,
5609 + .flags = IORESOURCE_MEM,
5611 + .start = IRQ_KIRKWOOD_UART_0,
5612 + .end = IRQ_KIRKWOOD_UART_0,
5613 + .flags = IORESOURCE_IRQ,
5617 +static struct platform_device kirkwood_uart0 = {
5618 + .name = "serial8250",
5621 + .platform_data = kirkwood_uart0_data,
5623 + .resource = kirkwood_uart0_resources,
5624 + .num_resources = ARRAY_SIZE(kirkwood_uart0_resources),
5627 +void __init kirkwood_uart0_init(void)
5629 + platform_device_register(&kirkwood_uart0);
5633 +/*****************************************************************************
5635 + ****************************************************************************/
5636 +static struct plat_serial8250_port kirkwood_uart1_data[] = {
5638 + .mapbase = UART1_PHYS_BASE,
5639 + .membase = (char *)UART1_VIRT_BASE,
5640 + .irq = IRQ_KIRKWOOD_UART_1,
5641 + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
5642 + .iotype = UPIO_MEM,
5644 + .uartclk = KIRKWOOD_TCLK,
5649 +static struct resource kirkwood_uart1_resources[] = {
5651 + .start = UART1_PHYS_BASE,
5652 + .end = UART1_PHYS_BASE + 0xff,
5653 + .flags = IORESOURCE_MEM,
5655 + .start = IRQ_KIRKWOOD_UART_1,
5656 + .end = IRQ_KIRKWOOD_UART_1,
5657 + .flags = IORESOURCE_IRQ,
5661 +static struct platform_device kirkwood_uart1 = {
5662 + .name = "serial8250",
5665 + .platform_data = kirkwood_uart1_data,
5667 + .resource = kirkwood_uart1_resources,
5668 + .num_resources = ARRAY_SIZE(kirkwood_uart1_resources),
5671 +void __init kirkwood_uart1_init(void)
5673 + platform_device_register(&kirkwood_uart1);
5677 +/*****************************************************************************
5679 + ****************************************************************************/
5680 +static void kirkwood_timer_init(void)
5682 + orion_time_init(IRQ_KIRKWOOD_BRIDGE, KIRKWOOD_TCLK);
5685 +struct sys_timer kirkwood_timer = {
5686 + .init = kirkwood_timer_init,
5690 +/*****************************************************************************
5692 + ****************************************************************************/
5693 +static char * __init kirkwood_id(void)
5695 + switch (readl(DEVICE_ID) & 0x3) {
5704 + return "unknown 88F6000 variant";
5707 +void __init kirkwood_init(void)
5709 + printk(KERN_INFO "Kirkwood: %s, TCLK=%d.\n",
5710 + kirkwood_id(), KIRKWOOD_TCLK);
5712 + kirkwood_setup_cpu_mbus();
5714 +#ifdef CONFIG_CACHE_FEROCEON_L2
5715 + feroceon_l2_init(1);
5719 +++ b/arch/arm/mach-kirkwood/common.h
5722 + * arch/arm/mach-kirkwood/common.h
5724 + * Core functions for Marvell Kirkwood SoCs
5726 + * This file is licensed under the terms of the GNU General Public
5727 + * License version 2. This program is licensed "as is" without any
5728 + * warranty of any kind, whether express or implied.
5731 +#ifndef __ARCH_KIRKWOOD_COMMON_H
5732 +#define __ARCH_KIRKWOOD_COMMON_H
5734 +struct mv643xx_eth_platform_data;
5735 +struct mv_sata_platform_data;
5738 + * Basic Kirkwood init functions used early by machine-setup.
5740 +void kirkwood_map_io(void);
5741 +void kirkwood_init(void);
5742 +void kirkwood_init_irq(void);
5744 +extern struct mbus_dram_target_info kirkwood_mbus_dram_info;
5745 +void kirkwood_setup_cpu_mbus(void);
5746 +void kirkwood_setup_pcie_io_win(int window, u32 base, u32 size,
5747 + int maj, int min);
5748 +void kirkwood_setup_pcie_mem_win(int window, u32 base, u32 size,
5749 + int maj, int min);
5751 +void kirkwood_ehci_init(void);
5752 +void kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data);
5753 +void kirkwood_pcie_init(void);
5754 +void kirkwood_rtc_init(void);
5755 +void kirkwood_sata_init(struct mv_sata_platform_data *sata_data);
5756 +void kirkwood_uart0_init(void);
5757 +void kirkwood_uart1_init(void);
5759 +extern struct sys_timer kirkwood_timer;
5764 +++ b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
5767 + * arch/arm/mach-kirkwood/db88f6281-bp-setup.c
5769 + * Marvell DB-88F6281-BP Development Board Setup
5771 + * This file is licensed under the terms of the GNU General Public
5772 + * License version 2. This program is licensed "as is" without any
5773 + * warranty of any kind, whether express or implied.
5776 +#include <linux/kernel.h>
5777 +#include <linux/init.h>
5778 +#include <linux/platform_device.h>
5779 +#include <linux/pci.h>
5780 +#include <linux/irq.h>
5781 +#include <linux/mtd/physmap.h>
5782 +#include <linux/mtd/nand.h>
5783 +#include <linux/timer.h>
5784 +#include <linux/ata_platform.h>
5785 +#include <linux/mv643xx_eth.h>
5786 +#include <asm/mach-types.h>
5787 +#include <asm/mach/arch.h>
5788 +#include <asm/mach/pci.h>
5789 +#include <asm/arch/kirkwood.h>
5790 +#include "common.h"
5792 +static struct mv643xx_eth_platform_data db88f6281_ge00_data = {
5796 +static struct mv_sata_platform_data db88f6281_sata_data = {
5800 +static void __init db88f6281_init(void)
5803 + * Basic setup. Needs to be called early.
5807 + kirkwood_ehci_init();
5808 + kirkwood_ge00_init(&db88f6281_ge00_data);
5809 + kirkwood_rtc_init();
5810 + kirkwood_sata_init(&db88f6281_sata_data);
5811 + kirkwood_uart0_init();
5812 + kirkwood_uart1_init();
5815 +static int __init db88f6281_pci_init(void)
5817 + if (machine_is_db88f6281_bp())
5818 + kirkwood_pcie_init();
5822 +subsys_initcall(db88f6281_pci_init);
5824 +MACHINE_START(DB88F6281_BP, "Marvell DB-88F6281-BP Development Board")
5825 + /* Maintainer: Saeed Bishara <saeed@marvell.com> */
5826 + .phys_io = KIRKWOOD_REGS_PHYS_BASE,
5827 + .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
5828 + .boot_params = 0x00000100,
5829 + .init_machine = db88f6281_init,
5830 + .map_io = kirkwood_map_io,
5831 + .init_irq = kirkwood_init_irq,
5832 + .timer = &kirkwood_timer,
5835 +++ b/arch/arm/mach-kirkwood/irq.c
5838 + * arch/arm/mach-kirkwood/irq.c
5840 + * Kirkwood IRQ handling.
5842 + * This file is licensed under the terms of the GNU General Public
5843 + * License version 2. This program is licensed "as is" without any
5844 + * warranty of any kind, whether express or implied.
5847 +#include <linux/kernel.h>
5848 +#include <linux/init.h>
5849 +#include <linux/irq.h>
5850 +#include <linux/io.h>
5851 +#include <asm/plat-orion/irq.h>
5852 +#include "common.h"
5854 +void __init kirkwood_init_irq(void)
5856 + orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF));
5857 + orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF));
5860 +++ b/arch/arm/mach-kirkwood/pcie.c
5863 + * arch/arm/mach-kirkwood/pcie.c
5865 + * PCIe functions for Marvell Kirkwood SoCs
5867 + * This file is licensed under the terms of the GNU General Public
5868 + * License version 2. This program is licensed "as is" without any
5869 + * warranty of any kind, whether express or implied.
5872 +#include <linux/kernel.h>
5873 +#include <linux/pci.h>
5874 +#include <linux/mbus.h>
5875 +#include <asm/mach/pci.h>
5876 +#include <asm/plat-orion/pcie.h>
5877 +#include "common.h"
5880 +#define PCIE_BASE ((void __iomem *)PCIE_VIRT_BASE)
5882 +static int pcie_valid_config(int bus, int dev)
5885 + * Don't go out when trying to access --
5886 + * 1. nonexisting device on local bus
5887 + * 2. where there's no device connected (no link)
5889 + if (bus == 0 && dev == 0)
5892 + if (!orion_pcie_link_up(PCIE_BASE))
5895 + if (bus == 0 && dev != 1)
5903 + * PCIe config cycles are done by programming the PCIE_CONF_ADDR register
5904 + * and then reading the PCIE_CONF_DATA register. Need to make sure these
5905 + * transactions are atomic.
5907 +static DEFINE_SPINLOCK(kirkwood_pcie_lock);
5909 +static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
5910 + int size, u32 *val)
5912 + unsigned long flags;
5915 + if (pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0) {
5916 + *val = 0xffffffff;
5917 + return PCIBIOS_DEVICE_NOT_FOUND;
5920 + spin_lock_irqsave(&kirkwood_pcie_lock, flags);
5921 + ret = orion_pcie_rd_conf(PCIE_BASE, bus, devfn, where, size, val);
5922 + spin_unlock_irqrestore(&kirkwood_pcie_lock, flags);
5927 +static int pcie_wr_conf(struct pci_bus *bus, u32 devfn,
5928 + int where, int size, u32 val)
5930 + unsigned long flags;
5933 + if (pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0)
5934 + return PCIBIOS_DEVICE_NOT_FOUND;
5936 + spin_lock_irqsave(&kirkwood_pcie_lock, flags);
5937 + ret = orion_pcie_wr_conf(PCIE_BASE, bus, devfn, where, size, val);
5938 + spin_unlock_irqrestore(&kirkwood_pcie_lock, flags);
5943 +static struct pci_ops pcie_ops = {
5944 + .read = pcie_rd_conf,
5945 + .write = pcie_wr_conf,
5949 +static int kirkwood_pcie_setup(int nr, struct pci_sys_data *sys)
5951 + struct resource *res;
5954 + * Generic PCIe unit setup.
5956 + orion_pcie_setup(PCIE_BASE, &kirkwood_mbus_dram_info);
5959 + * Request resources.
5961 + res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL);
5963 + panic("pcie_setup unable to alloc resources");
5968 + res[0].name = "PCIe I/O Space";
5969 + res[0].flags = IORESOURCE_IO;
5970 + res[0].start = KIRKWOOD_PCIE_IO_PHYS_BASE;
5971 + res[0].end = res[0].start + KIRKWOOD_PCIE_IO_SIZE - 1;
5972 + if (request_resource(&ioport_resource, &res[0]))
5973 + panic("Request PCIe IO resource failed\n");
5974 + sys->resource[0] = &res[0];
5979 + res[1].name = "PCIe Memory Space";
5980 + res[1].flags = IORESOURCE_MEM;
5981 + res[1].start = KIRKWOOD_PCIE_MEM_PHYS_BASE;
5982 + res[1].end = res[1].start + KIRKWOOD_PCIE_MEM_SIZE - 1;
5983 + if (request_resource(&iomem_resource, &res[1]))
5984 + panic("Request PCIe Memory resource failed\n");
5985 + sys->resource[1] = &res[1];
5987 + sys->resource[2] = NULL;
5988 + sys->io_offset = 0;
5993 +static void __devinit rc_pci_fixup(struct pci_dev *dev)
5996 + * Prevent enumeration of root complex.
5998 + if (dev->bus->parent == NULL && dev->devfn == 0) {
6001 + for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
6002 + dev->resource[i].start = 0;
6003 + dev->resource[i].end = 0;
6004 + dev->resource[i].flags = 0;
6008 +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup);
6010 +static struct pci_bus __init *
6011 +kirkwood_pcie_scan_bus(int nr, struct pci_sys_data *sys)
6013 + struct pci_bus *bus;
6016 + bus = pci_scan_bus(sys->busnr, &pcie_ops, sys);
6025 +static int __init kirkwood_pcie_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
6027 + return IRQ_KIRKWOOD_PCIE;
6030 +static struct hw_pci kirkwood_pci __initdata = {
6031 + .nr_controllers = 1,
6032 + .swizzle = pci_std_swizzle,
6033 + .setup = kirkwood_pcie_setup,
6034 + .scan = kirkwood_pcie_scan_bus,
6035 + .map_irq = kirkwood_pcie_map_irq,
6038 +void __init kirkwood_pcie_init(void)
6040 + pci_common_init(&kirkwood_pci);
6043 +++ b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
6046 + * arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
6048 + * Marvell RD-88F6192-NAS Reference Board Setup
6050 + * This file is licensed under the terms of the GNU General Public
6051 + * License version 2. This program is licensed "as is" without any
6052 + * warranty of any kind, whether express or implied.
6055 +#include <linux/kernel.h>
6056 +#include <linux/init.h>
6057 +#include <linux/platform_device.h>
6058 +#include <linux/pci.h>
6059 +#include <linux/irq.h>
6060 +#include <linux/mtd/physmap.h>
6061 +#include <linux/mtd/nand.h>
6062 +#include <linux/timer.h>
6063 +#include <linux/ata_platform.h>
6064 +#include <linux/mv643xx_eth.h>
6065 +#include <asm/mach-types.h>
6066 +#include <asm/mach/arch.h>
6067 +#include <asm/mach/pci.h>
6068 +#include <asm/arch/kirkwood.h>
6069 +#include "common.h"
6071 +#define RD88F6192_GPIO_USB_VBUS 10
6073 +static struct mv643xx_eth_platform_data rd88f6192_ge00_data = {
6077 +static struct mv_sata_platform_data rd88f6192_sata_data = {
6081 +static void __init rd88f6192_init(void)
6084 + * Basic setup. Needs to be called early.
6088 + kirkwood_ehci_init();
6089 + kirkwood_ge00_init(&rd88f6192_ge00_data);
6090 + kirkwood_rtc_init();
6091 + kirkwood_sata_init(&rd88f6192_sata_data);
6092 + kirkwood_uart0_init();
6095 +static int __init rd88f6192_pci_init(void)
6097 + if (machine_is_rd88f6192_nas())
6098 + kirkwood_pcie_init();
6102 +subsys_initcall(rd88f6192_pci_init);
6104 +MACHINE_START(RD88F6192_NAS, "Marvell RD-88F6192-NAS Development Board")
6105 + /* Maintainer: Saeed Bishara <saeed@marvell.com> */
6106 + .phys_io = KIRKWOOD_REGS_PHYS_BASE,
6107 + .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
6108 + .boot_params = 0x00000100,
6109 + .init_machine = rd88f6192_init,
6110 + .map_io = kirkwood_map_io,
6111 + .init_irq = kirkwood_init_irq,
6112 + .timer = &kirkwood_timer,
6115 +++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c
6118 + * arch/arm/mach-kirkwood/rd88f6281-setup.c
6120 + * Marvell RD-88F6281 Reference Board Setup
6122 + * This file is licensed under the terms of the GNU General Public
6123 + * License version 2. This program is licensed "as is" without any
6124 + * warranty of any kind, whether express or implied.
6127 +#include <linux/kernel.h>
6128 +#include <linux/init.h>
6129 +#include <linux/platform_device.h>
6130 +#include <linux/pci.h>
6131 +#include <linux/irq.h>
6132 +#include <linux/mtd/physmap.h>
6133 +#include <linux/mtd/nand.h>
6134 +#include <linux/timer.h>
6135 +#include <linux/ata_platform.h>
6136 +#include <linux/mv643xx_eth.h>
6137 +#include <asm/mach-types.h>
6138 +#include <asm/mach/arch.h>
6139 +#include <asm/mach/pci.h>
6140 +#include <asm/arch/kirkwood.h>
6141 +#include <asm/plat-orion/orion_nand.h>
6142 +#include "common.h"
6144 +static struct mtd_partition rd88f6281_nand_parts[] = {
6151 + .offset = MTDPART_OFS_NXTBLK,
6155 + .offset = MTDPART_OFS_NXTBLK,
6156 + .size = MTDPART_SIZ_FULL
6160 +static struct resource rd88f6281_nand_resource = {
6161 + .flags = IORESOURCE_MEM,
6162 + .start = KIRKWOOD_NAND_MEM_PHYS_BASE,
6163 + .end = KIRKWOOD_NAND_MEM_PHYS_BASE +
6164 + KIRKWOOD_NAND_MEM_SIZE - 1,
6167 +static struct orion_nand_data rd88f6281_nand_data = {
6168 + .parts = rd88f6281_nand_parts,
6169 + .nr_parts = ARRAY_SIZE(rd88f6281_nand_parts),
6175 +static struct platform_device rd88f6281_nand_flash = {
6176 + .name = "orion_nand",
6179 + .platform_data = &rd88f6281_nand_data,
6181 + .resource = &rd88f6281_nand_resource,
6182 + .num_resources = 1,
6185 +static struct mv643xx_eth_platform_data rd88f6281_ge00_data = {
6189 +static struct mv_sata_platform_data rd88f6281_sata_data = {
6193 +static void __init rd88f6281_init(void)
6196 + * Basic setup. Needs to be called early.
6200 + kirkwood_ehci_init();
6201 + kirkwood_ge00_init(&rd88f6281_ge00_data);
6202 + kirkwood_rtc_init();
6203 + kirkwood_sata_init(&rd88f6281_sata_data);
6204 + kirkwood_uart0_init();
6205 + kirkwood_uart1_init();
6207 + platform_device_register(&rd88f6281_nand_flash);
6210 +static int __init rd88f6281_pci_init(void)
6212 + if (machine_is_rd88f6281())
6213 + kirkwood_pcie_init();
6217 +subsys_initcall(rd88f6281_pci_init);
6219 +MACHINE_START(RD88F6281, "Marvell RD-88F6281 Reference Board")
6220 + /* Maintainer: Saeed Bishara <saeed@marvell.com> */
6221 + .phys_io = KIRKWOOD_REGS_PHYS_BASE,
6222 + .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
6223 + .boot_params = 0x00000100,
6224 + .init_machine = rd88f6281_init,
6225 + .map_io = kirkwood_map_io,
6226 + .init_irq = kirkwood_init_irq,
6227 + .timer = &kirkwood_timer,
6230 +++ b/arch/arm/mach-loki/Kconfig
6234 +menu "Marvell Loki (88RC8480) Implementations"
6236 +config MACH_LB88RC8480
6237 + bool "Marvell LB88RC8480 Development Board"
6239 + Say 'Y' here if you want your kernel to support the
6240 + Marvell LB88RC8480 Development Board.
6246 +++ b/arch/arm/mach-loki/Makefile
6248 +obj-y += common.o addr-map.o irq.o
6250 +obj-$(CONFIG_MACH_LB88RC8480) += lb88rc8480-setup.o
6252 +++ b/arch/arm/mach-loki/Makefile.boot
6254 + zreladdr-y := 0x00008000
6255 +params_phys-y := 0x00000100
6256 +initrd_phys-y := 0x00800000
6258 +++ b/arch/arm/mach-loki/addr-map.c
6261 + * arch/arm/mach-loki/addr-map.c
6263 + * Address map functions for Marvell Loki (88RC8480) SoCs
6265 + * This file is licensed under the terms of the GNU General Public
6266 + * License version 2. This program is licensed "as is" without any
6267 + * warranty of any kind, whether express or implied.
6270 +#include <linux/kernel.h>
6271 +#include <linux/init.h>
6272 +#include <linux/mbus.h>
6273 +#include <asm/hardware.h>
6274 +#include <asm/io.h>
6275 +#include "common.h"
6278 + * Generic Address Decode Windows bit settings
6280 +#define TARGET_DDR 0
6281 +#define TARGET_DEV_BUS 1
6282 +#define TARGET_PCIE0 3
6283 +#define TARGET_PCIE1 4
6284 +#define ATTR_DEV_BOOT 0x0f
6285 +#define ATTR_DEV_CS2 0x1b
6286 +#define ATTR_DEV_CS1 0x1d
6287 +#define ATTR_DEV_CS0 0x1e
6288 +#define ATTR_PCIE_IO 0x51
6289 +#define ATTR_PCIE_MEM 0x59
6292 + * Helpers to get DDR bank info
6294 +#define DDR_SIZE_CS(n) DDR_REG(0x1500 + ((n) << 3))
6295 +#define DDR_BASE_CS(n) DDR_REG(0x1504 + ((n) << 3))
6298 + * CPU Address Decode Windows registers
6300 +#define CPU_WIN_CTRL(n) BRIDGE_REG(0x000 | ((n) << 4))
6301 +#define CPU_WIN_BASE(n) BRIDGE_REG(0x004 | ((n) << 4))
6302 +#define CPU_WIN_REMAP_LO(n) BRIDGE_REG(0x008 | ((n) << 4))
6303 +#define CPU_WIN_REMAP_HI(n) BRIDGE_REG(0x00c | ((n) << 4))
6306 +struct mbus_dram_target_info loki_mbus_dram_info;
6308 +static void __init setup_cpu_win(int win, u32 base, u32 size,
6309 + u8 target, u8 attr, int remap)
6313 + base &= 0xffff0000;
6314 + ctrl = ((size - 1) & 0xffff0000) | (attr << 8) | (1 << 5) | target;
6316 + writel(base, CPU_WIN_BASE(win));
6317 + writel(ctrl, CPU_WIN_CTRL(win));
6322 + writel(remap & 0xffff0000, CPU_WIN_REMAP_LO(win));
6323 + writel(0, CPU_WIN_REMAP_HI(win));
6327 +void __init loki_setup_cpu_mbus(void)
6333 + * First, disable and clear windows.
6335 + for (i = 0; i < 8; i++) {
6336 + writel(0, CPU_WIN_BASE(i));
6337 + writel(0, CPU_WIN_CTRL(i));
6339 + writel(0, CPU_WIN_REMAP_LO(i));
6340 + writel(0, CPU_WIN_REMAP_HI(i));
6345 + * Setup windows for PCIe IO+MEM space.
6347 + setup_cpu_win(2, LOKI_PCIE0_MEM_PHYS_BASE, LOKI_PCIE0_MEM_SIZE,
6348 + TARGET_PCIE0, ATTR_PCIE_MEM, -1);
6349 + setup_cpu_win(3, LOKI_PCIE1_MEM_PHYS_BASE, LOKI_PCIE1_MEM_SIZE,
6350 + TARGET_PCIE1, ATTR_PCIE_MEM, -1);
6353 + * Setup MBUS dram target info.
6355 + loki_mbus_dram_info.mbus_dram_target_id = TARGET_DDR;
6357 + for (i = 0, cs = 0; i < 4; i++) {
6358 + u32 base = readl(DDR_BASE_CS(i));
6359 + u32 size = readl(DDR_SIZE_CS(i));
6362 + * Chip select enabled?
6365 + struct mbus_dram_window *w;
6367 + w = &loki_mbus_dram_info.cs[cs++];
6369 + w->mbus_attr = 0xf & ~(1 << i);
6370 + w->base = base & 0xffff0000;
6371 + w->size = (size | 0x0000ffff) + 1;
6374 + loki_mbus_dram_info.num_cs = cs;
6377 +void __init loki_setup_dev_boot_win(u32 base, u32 size)
6379 + setup_cpu_win(4, base, size, TARGET_DEV_BUS, ATTR_DEV_BOOT, -1);
6382 +++ b/arch/arm/mach-loki/common.c
6385 + * arch/arm/mach-loki/common.c
6387 + * Core functions for Marvell Loki (88RC8480) SoCs
6389 + * This file is licensed under the terms of the GNU General Public
6390 + * License version 2. This program is licensed "as is" without any
6391 + * warranty of any kind, whether express or implied.
6394 +#include <linux/kernel.h>
6395 +#include <linux/init.h>
6396 +#include <linux/platform_device.h>
6397 +#include <linux/serial_8250.h>
6398 +#include <linux/mbus.h>
6399 +#include <linux/mv643xx_eth.h>
6400 +#include <asm/page.h>
6401 +#include <asm/timex.h>
6402 +#include <asm/mach/map.h>
6403 +#include <asm/mach/time.h>
6404 +#include <asm/arch/loki.h>
6405 +#include <asm/plat-orion/orion_nand.h>
6406 +#include <asm/plat-orion/time.h>
6407 +#include "common.h"
6409 +/*****************************************************************************
6410 + * I/O Address Mapping
6411 + ****************************************************************************/
6412 +static struct map_desc loki_io_desc[] __initdata = {
6414 + .virtual = LOKI_REGS_VIRT_BASE,
6415 + .pfn = __phys_to_pfn(LOKI_REGS_PHYS_BASE),
6416 + .length = LOKI_REGS_SIZE,
6417 + .type = MT_DEVICE,
6421 +void __init loki_map_io(void)
6423 + iotable_init(loki_io_desc, ARRAY_SIZE(loki_io_desc));
6427 +/*****************************************************************************
6429 + ****************************************************************************/
6430 +struct mv643xx_eth_shared_platform_data loki_ge0_shared_data = {
6431 + .t_clk = LOKI_TCLK,
6432 + .dram = &loki_mbus_dram_info,
6435 +static struct resource loki_ge0_shared_resources[] = {
6437 + .name = "ge0 base",
6438 + .start = GE0_PHYS_BASE + 0x2000,
6439 + .end = GE0_PHYS_BASE + 0x3fff,
6440 + .flags = IORESOURCE_MEM,
6444 +static struct platform_device loki_ge0_shared = {
6445 + .name = MV643XX_ETH_SHARED_NAME,
6448 + .platform_data = &loki_ge0_shared_data,
6450 + .num_resources = 1,
6451 + .resource = loki_ge0_shared_resources,
6454 +static struct resource loki_ge0_resources[] = {
6456 + .name = "ge0 irq",
6457 + .start = IRQ_LOKI_GBE_A_INT,
6458 + .end = IRQ_LOKI_GBE_A_INT,
6459 + .flags = IORESOURCE_IRQ,
6463 +static struct platform_device loki_ge0 = {
6464 + .name = MV643XX_ETH_NAME,
6466 + .num_resources = 1,
6467 + .resource = loki_ge0_resources,
6470 +void __init loki_ge0_init(struct mv643xx_eth_platform_data *eth_data)
6472 + eth_data->shared = &loki_ge0_shared;
6473 + loki_ge0.dev.platform_data = eth_data;
6475 + writel(0x00079220, GE0_VIRT_BASE + 0x20b0);
6476 + platform_device_register(&loki_ge0_shared);
6477 + platform_device_register(&loki_ge0);
6481 +/*****************************************************************************
6483 + ****************************************************************************/
6484 +struct mv643xx_eth_shared_platform_data loki_ge1_shared_data = {
6485 + .t_clk = LOKI_TCLK,
6486 + .dram = &loki_mbus_dram_info,
6489 +static struct resource loki_ge1_shared_resources[] = {
6491 + .name = "ge1 base",
6492 + .start = GE1_PHYS_BASE + 0x2000,
6493 + .end = GE1_PHYS_BASE + 0x3fff,
6494 + .flags = IORESOURCE_MEM,
6498 +static struct platform_device loki_ge1_shared = {
6499 + .name = MV643XX_ETH_SHARED_NAME,
6502 + .platform_data = &loki_ge1_shared_data,
6504 + .num_resources = 1,
6505 + .resource = loki_ge1_shared_resources,
6508 +static struct resource loki_ge1_resources[] = {
6510 + .name = "ge1 irq",
6511 + .start = IRQ_LOKI_GBE_B_INT,
6512 + .end = IRQ_LOKI_GBE_B_INT,
6513 + .flags = IORESOURCE_IRQ,
6517 +static struct platform_device loki_ge1 = {
6518 + .name = MV643XX_ETH_NAME,
6520 + .num_resources = 1,
6521 + .resource = loki_ge1_resources,
6524 +void __init loki_ge1_init(struct mv643xx_eth_platform_data *eth_data)
6526 + eth_data->shared = &loki_ge1_shared;
6527 + loki_ge1.dev.platform_data = eth_data;
6529 + writel(0x00079220, GE1_VIRT_BASE + 0x20b0);
6530 + platform_device_register(&loki_ge1_shared);
6531 + platform_device_register(&loki_ge1);
6535 +/*****************************************************************************
6537 + ****************************************************************************/
6538 +static struct resource loki_sas_resources[] = {
6540 + .name = "mvsas0 mem",
6541 + .start = SAS0_PHYS_BASE,
6542 + .end = SAS0_PHYS_BASE + 0x01ff,
6543 + .flags = IORESOURCE_MEM,
6545 + .name = "mvsas0 irq",
6546 + .start = IRQ_LOKI_SAS_A,
6547 + .end = IRQ_LOKI_SAS_A,
6548 + .flags = IORESOURCE_IRQ,
6550 + .name = "mvsas1 mem",
6551 + .start = SAS1_PHYS_BASE,
6552 + .end = SAS1_PHYS_BASE + 0x01ff,
6553 + .flags = IORESOURCE_MEM,
6555 + .name = "mvsas1 irq",
6556 + .start = IRQ_LOKI_SAS_B,
6557 + .end = IRQ_LOKI_SAS_B,
6558 + .flags = IORESOURCE_IRQ,
6562 +static struct platform_device loki_sas = {
6566 + .coherent_dma_mask = 0xffffffff,
6568 + .num_resources = ARRAY_SIZE(loki_sas_resources),
6569 + .resource = loki_sas_resources,
6572 +void __init loki_sas_init(void)
6574 + writel(0x8300f707, DDR_REG(0x1424));
6575 + platform_device_register(&loki_sas);
6579 +/*****************************************************************************
6581 + ****************************************************************************/
6582 +static struct plat_serial8250_port loki_uart0_data[] = {
6584 + .mapbase = UART0_PHYS_BASE,
6585 + .membase = (char *)UART0_VIRT_BASE,
6586 + .irq = IRQ_LOKI_UART0,
6587 + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
6588 + .iotype = UPIO_MEM,
6590 + .uartclk = LOKI_TCLK,
6595 +static struct resource loki_uart0_resources[] = {
6597 + .start = UART0_PHYS_BASE,
6598 + .end = UART0_PHYS_BASE + 0xff,
6599 + .flags = IORESOURCE_MEM,
6601 + .start = IRQ_LOKI_UART0,
6602 + .end = IRQ_LOKI_UART0,
6603 + .flags = IORESOURCE_IRQ,
6607 +static struct platform_device loki_uart0 = {
6608 + .name = "serial8250",
6611 + .platform_data = loki_uart0_data,
6613 + .resource = loki_uart0_resources,
6614 + .num_resources = ARRAY_SIZE(loki_uart0_resources),
6617 +void __init loki_uart0_init(void)
6619 + platform_device_register(&loki_uart0);
6623 +/*****************************************************************************
6625 + ****************************************************************************/
6626 +static struct plat_serial8250_port loki_uart1_data[] = {
6628 + .mapbase = UART1_PHYS_BASE,
6629 + .membase = (char *)UART1_VIRT_BASE,
6630 + .irq = IRQ_LOKI_UART1,
6631 + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
6632 + .iotype = UPIO_MEM,
6634 + .uartclk = LOKI_TCLK,
6639 +static struct resource loki_uart1_resources[] = {
6641 + .start = UART1_PHYS_BASE,
6642 + .end = UART1_PHYS_BASE + 0xff,
6643 + .flags = IORESOURCE_MEM,
6645 + .start = IRQ_LOKI_UART1,
6646 + .end = IRQ_LOKI_UART1,
6647 + .flags = IORESOURCE_IRQ,
6651 +static struct platform_device loki_uart1 = {
6652 + .name = "serial8250",
6655 + .platform_data = loki_uart1_data,
6657 + .resource = loki_uart1_resources,
6658 + .num_resources = ARRAY_SIZE(loki_uart1_resources),
6661 +void __init loki_uart1_init(void)
6663 + platform_device_register(&loki_uart1);
6667 +/*****************************************************************************
6669 + ****************************************************************************/
6670 +static void loki_timer_init(void)
6672 + orion_time_init(IRQ_LOKI_BRIDGE, LOKI_TCLK);
6675 +struct sys_timer loki_timer = {
6676 + .init = loki_timer_init,
6680 +/*****************************************************************************
6682 + ****************************************************************************/
6683 +void __init loki_init(void)
6685 + printk(KERN_INFO "Loki ID: 88RC8480. TCLK=%d.\n", LOKI_TCLK);
6687 + loki_setup_cpu_mbus();
6690 +++ b/arch/arm/mach-loki/common.h
6693 + * arch/arm/mach-loki/common.h
6695 + * Core functions for Marvell Loki (88RC8480) SoCs
6697 + * This file is licensed under the terms of the GNU General Public
6698 + * License version 2. This program is licensed "as is" without any
6699 + * warranty of any kind, whether express or implied.
6702 +#ifndef __ARCH_LOKI_COMMON_H
6703 +#define __ARCH_LOKI_COMMON_H
6705 +struct mv643xx_eth_platform_data;
6708 + * Basic Loki init functions used early by machine-setup.
6710 +void loki_map_io(void);
6711 +void loki_init(void);
6712 +void loki_init_irq(void);
6714 +extern struct mbus_dram_target_info loki_mbus_dram_info;
6715 +void loki_setup_cpu_mbus(void);
6716 +void loki_setup_dev_boot_win(u32 base, u32 size);
6718 +void loki_ge0_init(struct mv643xx_eth_platform_data *eth_data);
6719 +void loki_ge1_init(struct mv643xx_eth_platform_data *eth_data);
6720 +void loki_sas_init(void);
6721 +void loki_uart0_init(void);
6722 +void loki_uart1_init(void);
6724 +extern struct sys_timer loki_timer;
6729 +++ b/arch/arm/mach-loki/irq.c
6732 + * arch/arm/mach-loki/irq.c
6734 + * Marvell Loki (88RC8480) IRQ handling.
6736 + * This file is licensed under the terms of the GNU General Public
6737 + * License version 2. This program is licensed "as is" without any
6738 + * warranty of any kind, whether express or implied.
6741 +#include <linux/kernel.h>
6742 +#include <linux/init.h>
6743 +#include <linux/irq.h>
6744 +#include <asm/io.h>
6745 +#include <asm/plat-orion/irq.h>
6746 +#include "common.h"
6748 +void __init loki_init_irq(void)
6750 + orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_OFF));
6753 +++ b/arch/arm/mach-loki/lb88rc8480-setup.c
6756 + * arch/arm/mach-loki/lb88rc8480-setup.c
6758 + * Marvell LB88RC8480 Development Board Setup
6760 + * This file is licensed under the terms of the GNU General Public
6761 + * License version 2. This program is licensed "as is" without any
6762 + * warranty of any kind, whether express or implied.
6765 +#include <linux/kernel.h>
6766 +#include <linux/init.h>
6767 +#include <linux/platform_device.h>
6768 +#include <linux/irq.h>
6769 +#include <linux/mtd/physmap.h>
6770 +#include <linux/mtd/nand.h>
6771 +#include <linux/timer.h>
6772 +#include <linux/ata_platform.h>
6773 +#include <linux/mv643xx_eth.h>
6774 +#include <asm/mach-types.h>
6775 +#include <asm/mach/arch.h>
6776 +#include <asm/arch/loki.h>
6777 +#include "common.h"
6779 +#define LB88RC8480_FLASH_BOOT_CS_BASE 0xf8000000
6780 +#define LB88RC8480_FLASH_BOOT_CS_SIZE SZ_128M
6782 +#define LB88RC8480_NOR_BOOT_BASE 0xff000000
6783 +#define LB88RC8480_NOR_BOOT_SIZE SZ_16M
6785 +static struct mtd_partition lb88rc8480_boot_flash_parts[] = {
6791 + .name = "root-fs",
6793 + .size = (SZ_8M + SZ_4M + SZ_1M),
6796 + .offset = (SZ_8M + SZ_4M + SZ_2M + SZ_1M),
6801 +static struct physmap_flash_data lb88rc8480_boot_flash_data = {
6802 + .parts = lb88rc8480_boot_flash_parts,
6803 + .nr_parts = ARRAY_SIZE(lb88rc8480_boot_flash_parts),
6804 + .width = 1, /* 8 bit bus width */
6807 +static struct resource lb88rc8480_boot_flash_resource = {
6808 + .flags = IORESOURCE_MEM,
6809 + .start = LB88RC8480_NOR_BOOT_BASE,
6810 + .end = LB88RC8480_NOR_BOOT_BASE + LB88RC8480_NOR_BOOT_SIZE - 1,
6813 +static struct platform_device lb88rc8480_boot_flash = {
6814 + .name = "physmap-flash",
6817 + .platform_data = &lb88rc8480_boot_flash_data,
6819 + .num_resources = 1,
6820 + .resource = &lb88rc8480_boot_flash_resource,
6823 +static struct mv643xx_eth_platform_data lb88rc8480_ge0_data = {
6825 + .mac_addr = { 0x00, 0x50, 0x43, 0x11, 0x22, 0x33 },
6828 +static void __init lb88rc8480_init(void)
6831 + * Basic setup. Needs to be called early.
6835 + loki_ge0_init(&lb88rc8480_ge0_data);
6837 + loki_uart0_init();
6838 + loki_uart1_init();
6840 + loki_setup_dev_boot_win(LB88RC8480_FLASH_BOOT_CS_BASE,
6841 + LB88RC8480_FLASH_BOOT_CS_SIZE);
6842 + platform_device_register(&lb88rc8480_boot_flash);
6845 +MACHINE_START(LB88RC8480, "Marvell LB88RC8480 Development Board")
6846 + /* Maintainer: Ke Wei <kewei@marvell.com> */
6847 + .phys_io = LOKI_REGS_PHYS_BASE,
6848 + .io_pg_offst = ((LOKI_REGS_VIRT_BASE) >> 18) & 0xfffc,
6849 + .boot_params = 0x00000100,
6850 + .init_machine = lb88rc8480_init,
6851 + .map_io = loki_map_io,
6852 + .init_irq = loki_init_irq,
6853 + .timer = &loki_timer,
6856 +++ b/arch/arm/mach-mv78xx0/Kconfig
6860 +menu "Marvell MV78xx0 Implementations"
6862 +config MACH_DB78X00_BP
6863 + bool "Marvell DB-78x00-BP Development Board"
6865 + Say 'Y' here if you want your kernel to support the
6866 + Marvell DB-78x00-BP Development Board.
6872 +++ b/arch/arm/mach-mv78xx0/Makefile
6874 +obj-y += common.o addr-map.o irq.o pcie.o
6875 +obj-$(CONFIG_MACH_DB78X00_BP) += db78x00-bp-setup.o
6877 +++ b/arch/arm/mach-mv78xx0/Makefile.boot
6879 + zreladdr-y := 0x00008000
6880 +params_phys-y := 0x00000100
6881 +initrd_phys-y := 0x00800000
6883 +++ b/arch/arm/mach-mv78xx0/addr-map.c
6886 + * arch/arm/mach-mv78xx0/addr-map.c
6888 + * Address map functions for Marvell MV78xx0 SoCs
6890 + * This file is licensed under the terms of the GNU General Public
6891 + * License version 2. This program is licensed "as is" without any
6892 + * warranty of any kind, whether express or implied.
6895 +#include <linux/kernel.h>
6896 +#include <linux/init.h>
6897 +#include <linux/mbus.h>
6898 +#include <asm/io.h>
6899 +#include "common.h"
6902 + * Generic Address Decode Windows bit settings
6904 +#define TARGET_DDR 0
6905 +#define TARGET_DEV_BUS 1
6906 +#define TARGET_PCIE0 4
6907 +#define TARGET_PCIE1 8
6908 +#define TARGET_PCIE(i) ((i) ? TARGET_PCIE1 : TARGET_PCIE0)
6909 +#define ATTR_DEV_SPI_ROM 0x1f
6910 +#define ATTR_DEV_BOOT 0x2f
6911 +#define ATTR_DEV_CS3 0x37
6912 +#define ATTR_DEV_CS2 0x3b
6913 +#define ATTR_DEV_CS1 0x3d
6914 +#define ATTR_DEV_CS0 0x3e
6915 +#define ATTR_PCIE_IO(l) (0xf0 & ~(0x10 << (l)))
6916 +#define ATTR_PCIE_MEM(l) (0xf8 & ~(0x10 << (l)))
6919 + * Helpers to get DDR bank info
6921 +#define DDR_BASE_CS_OFF(n) (0x0000 + ((n) << 3))
6922 +#define DDR_SIZE_CS_OFF(n) (0x0004 + ((n) << 3))
6925 + * CPU Address Decode Windows registers
6927 +#define WIN0_OFF(n) (BRIDGE_VIRT_BASE + 0x0000 + ((n) << 4))
6928 +#define WIN8_OFF(n) (BRIDGE_VIRT_BASE + 0x0900 + (((n) - 8) << 4))
6929 +#define WIN_CTRL_OFF 0x0000
6930 +#define WIN_BASE_OFF 0x0004
6931 +#define WIN_REMAP_LO_OFF 0x0008
6932 +#define WIN_REMAP_HI_OFF 0x000c
6935 +struct mbus_dram_target_info mv78xx0_mbus_dram_info;
6937 +static void __init __iomem *win_cfg_base(int win)
6940 + * Find the control register base address for this window.
6942 + * BRIDGE_VIRT_BASE points to the right (CPU0's or CPU1's)
6943 + * MBUS bridge depending on which CPU core we're running on,
6944 + * so we don't need to take that into account here.
6947 + return (void __iomem *)((win < 8) ? WIN0_OFF(win) : WIN8_OFF(win));
6950 +static int __init cpu_win_can_remap(int win)
6958 +static void __init setup_cpu_win(int win, u32 base, u32 size,
6959 + u8 target, u8 attr, int remap)
6961 + void __iomem *addr = win_cfg_base(win);
6964 + base &= 0xffff0000;
6965 + ctrl = ((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) | 1;
6967 + writel(base, addr + WIN_BASE_OFF);
6968 + writel(ctrl, addr + WIN_CTRL_OFF);
6969 + if (cpu_win_can_remap(win)) {
6973 + writel(remap & 0xffff0000, addr + WIN_REMAP_LO_OFF);
6974 + writel(0, addr + WIN_REMAP_HI_OFF);
6978 +void __init mv78xx0_setup_cpu_mbus(void)
6980 + void __iomem *addr;
6985 + * First, disable and clear windows.
6987 + for (i = 0; i < 14; i++) {
6988 + addr = win_cfg_base(i);
6990 + writel(0, addr + WIN_BASE_OFF);
6991 + writel(0, addr + WIN_CTRL_OFF);
6992 + if (cpu_win_can_remap(i)) {
6993 + writel(0, addr + WIN_REMAP_LO_OFF);
6994 + writel(0, addr + WIN_REMAP_HI_OFF);
6999 + * Setup MBUS dram target info.
7001 + mv78xx0_mbus_dram_info.mbus_dram_target_id = TARGET_DDR;
7003 + if (mv78xx0_core_index() == 0)
7004 + addr = (void __iomem *)DDR_WINDOW_CPU0_BASE;
7006 + addr = (void __iomem *)DDR_WINDOW_CPU1_BASE;
7008 + for (i = 0, cs = 0; i < 4; i++) {
7009 + u32 base = readl(addr + DDR_BASE_CS_OFF(i));
7010 + u32 size = readl(addr + DDR_SIZE_CS_OFF(i));
7013 + * Chip select enabled?
7016 + struct mbus_dram_window *w;
7018 + w = &mv78xx0_mbus_dram_info.cs[cs++];
7020 + w->mbus_attr = 0xf & ~(1 << i);
7021 + w->base = base & 0xffff0000;
7022 + w->size = (size | 0x0000ffff) + 1;
7025 + mv78xx0_mbus_dram_info.num_cs = cs;
7028 +void __init mv78xx0_setup_pcie_io_win(int window, u32 base, u32 size,
7031 + setup_cpu_win(window, base, size, TARGET_PCIE(maj),
7032 + ATTR_PCIE_IO(min), -1);
7035 +void __init mv78xx0_setup_pcie_mem_win(int window, u32 base, u32 size,
7038 + setup_cpu_win(window, base, size, TARGET_PCIE(maj),
7039 + ATTR_PCIE_MEM(min), -1);
7042 +++ b/arch/arm/mach-mv78xx0/common.c
7045 + * arch/arm/mach-mv78xx0/common.c
7047 + * Core functions for Marvell MV78xx0 SoCs
7049 + * This file is licensed under the terms of the GNU General Public
7050 + * License version 2. This program is licensed "as is" without any
7051 + * warranty of any kind, whether express or implied.
7054 +#include <linux/kernel.h>
7055 +#include <linux/init.h>
7056 +#include <linux/platform_device.h>
7057 +#include <linux/serial_8250.h>
7058 +#include <linux/mbus.h>
7059 +#include <linux/mv643xx_eth.h>
7060 +#include <linux/ata_platform.h>
7061 +#include <asm/mach/map.h>
7062 +#include <asm/mach/time.h>
7063 +#include <asm/arch/mv78xx0.h>
7064 +#include <asm/plat-orion/cache-feroceon-l2.h>
7065 +#include <asm/plat-orion/ehci-orion.h>
7066 +#include <asm/plat-orion/orion_nand.h>
7067 +#include <asm/plat-orion/time.h>
7068 +#include "common.h"
7071 +/*****************************************************************************
7073 + ****************************************************************************/
7074 +int mv78xx0_core_index(void)
7079 + * Read Extra Features register.
7081 + __asm__("mrc p15, 1, %0, c15, c1, 0" : "=r" (extra));
7083 + return !!(extra & 0x00004000);
7086 +static int get_hclk(void)
7091 + * HCLK tick rate is configured by DEV_D[7:5] pins.
7093 + switch ((readl(SAMPLE_AT_RESET_LOW) >> 5) & 7) {
7110 + panic("unknown HCLK PLL setting: %.8x\n",
7111 + readl(SAMPLE_AT_RESET_LOW));
7117 +static void get_pclk_l2clk(int hclk, int core_index, int *pclk, int *l2clk)
7122 + * Core #0 PCLK/L2CLK is configured by bits [13:8], core #1
7123 + * PCLK/L2CLK by bits [19:14].
7125 + if (core_index == 0) {
7126 + cfg = (readl(SAMPLE_AT_RESET_LOW) >> 8) & 0x3f;
7128 + cfg = (readl(SAMPLE_AT_RESET_LOW) >> 14) & 0x3f;
7132 + * Bits [11:8] ([17:14] for core #1) configure the PCLK:HCLK
7133 + * ratio (1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6).
7135 + *pclk = ((u64)hclk * (2 + (cfg & 0xf))) >> 1;
7138 + * Bits [13:12] ([19:18] for core #1) configure the PCLK:L2CLK
7139 + * ratio (1, 2, 3).
7141 + *l2clk = *pclk / (((cfg >> 4) & 3) + 1);
7144 +static int get_tclk(void)
7149 + * TCLK tick rate is configured by DEV_A[2:0] strap pins.
7151 + switch ((readl(SAMPLE_AT_RESET_HIGH) >> 6) & 7) {
7159 + panic("unknown TCLK PLL setting: %.8x\n",
7160 + readl(SAMPLE_AT_RESET_HIGH));
7167 +/*****************************************************************************
7168 + * I/O Address Mapping
7169 + ****************************************************************************/
7170 +static struct map_desc mv78xx0_io_desc[] __initdata = {
7172 + .virtual = MV78XX0_CORE_REGS_VIRT_BASE,
7174 + .length = MV78XX0_CORE_REGS_SIZE,
7175 + .type = MT_DEVICE,
7177 + .virtual = MV78XX0_PCIE_IO_VIRT_BASE(0),
7178 + .pfn = __phys_to_pfn(MV78XX0_PCIE_IO_PHYS_BASE(0)),
7179 + .length = MV78XX0_PCIE_IO_SIZE * 8,
7180 + .type = MT_DEVICE,
7182 + .virtual = MV78XX0_REGS_VIRT_BASE,
7183 + .pfn = __phys_to_pfn(MV78XX0_REGS_PHYS_BASE),
7184 + .length = MV78XX0_REGS_SIZE,
7185 + .type = MT_DEVICE,
7189 +void __init mv78xx0_map_io(void)
7191 + unsigned long phys;
7194 + * Map the right set of per-core registers depending on
7195 + * which core we are running on.
7197 + if (mv78xx0_core_index() == 0) {
7198 + phys = MV78XX0_CORE0_REGS_PHYS_BASE;
7200 + phys = MV78XX0_CORE1_REGS_PHYS_BASE;
7202 + mv78xx0_io_desc[0].pfn = __phys_to_pfn(phys);
7204 + iotable_init(mv78xx0_io_desc, ARRAY_SIZE(mv78xx0_io_desc));
7208 +/*****************************************************************************
7210 + ****************************************************************************/
7211 +static struct orion_ehci_data mv78xx0_ehci_data = {
7212 + .dram = &mv78xx0_mbus_dram_info,
7215 +static u64 ehci_dmamask = 0xffffffffUL;
7218 +/*****************************************************************************
7220 + ****************************************************************************/
7221 +static struct resource mv78xx0_ehci0_resources[] = {
7223 + .start = USB0_PHYS_BASE,
7224 + .end = USB0_PHYS_BASE + 0x0fff,
7225 + .flags = IORESOURCE_MEM,
7227 + .start = IRQ_MV78XX0_USB_0,
7228 + .end = IRQ_MV78XX0_USB_0,
7229 + .flags = IORESOURCE_IRQ,
7233 +static struct platform_device mv78xx0_ehci0 = {
7234 + .name = "orion-ehci",
7237 + .dma_mask = &ehci_dmamask,
7238 + .coherent_dma_mask = 0xffffffff,
7239 + .platform_data = &mv78xx0_ehci_data,
7241 + .resource = mv78xx0_ehci0_resources,
7242 + .num_resources = ARRAY_SIZE(mv78xx0_ehci0_resources),
7245 +void __init mv78xx0_ehci0_init(void)
7247 + platform_device_register(&mv78xx0_ehci0);
7251 +/*****************************************************************************
7253 + ****************************************************************************/
7254 +static struct resource mv78xx0_ehci1_resources[] = {
7256 + .start = USB1_PHYS_BASE,
7257 + .end = USB1_PHYS_BASE + 0x0fff,
7258 + .flags = IORESOURCE_MEM,
7260 + .start = IRQ_MV78XX0_USB_1,
7261 + .end = IRQ_MV78XX0_USB_1,
7262 + .flags = IORESOURCE_IRQ,
7266 +static struct platform_device mv78xx0_ehci1 = {
7267 + .name = "orion-ehci",
7270 + .dma_mask = &ehci_dmamask,
7271 + .coherent_dma_mask = 0xffffffff,
7272 + .platform_data = &mv78xx0_ehci_data,
7274 + .resource = mv78xx0_ehci1_resources,
7275 + .num_resources = ARRAY_SIZE(mv78xx0_ehci1_resources),
7278 +void __init mv78xx0_ehci1_init(void)
7280 + platform_device_register(&mv78xx0_ehci1);
7284 +/*****************************************************************************
7286 + ****************************************************************************/
7287 +static struct resource mv78xx0_ehci2_resources[] = {
7289 + .start = USB2_PHYS_BASE,
7290 + .end = USB2_PHYS_BASE + 0x0fff,
7291 + .flags = IORESOURCE_MEM,
7293 + .start = IRQ_MV78XX0_USB_2,
7294 + .end = IRQ_MV78XX0_USB_2,
7295 + .flags = IORESOURCE_IRQ,
7299 +static struct platform_device mv78xx0_ehci2 = {
7300 + .name = "orion-ehci",
7303 + .dma_mask = &ehci_dmamask,
7304 + .coherent_dma_mask = 0xffffffff,
7305 + .platform_data = &mv78xx0_ehci_data,
7307 + .resource = mv78xx0_ehci2_resources,
7308 + .num_resources = ARRAY_SIZE(mv78xx0_ehci2_resources),
7311 +void __init mv78xx0_ehci2_init(void)
7313 + platform_device_register(&mv78xx0_ehci2);
7317 +/*****************************************************************************
7319 + ****************************************************************************/
7320 +struct mv643xx_eth_shared_platform_data mv78xx0_ge00_shared_data = {
7322 + .dram = &mv78xx0_mbus_dram_info,
7325 +static struct resource mv78xx0_ge00_shared_resources[] = {
7327 + .name = "ge00 base",
7328 + .start = GE00_PHYS_BASE + 0x2000,
7329 + .end = GE00_PHYS_BASE + 0x3fff,
7330 + .flags = IORESOURCE_MEM,
7334 +static struct platform_device mv78xx0_ge00_shared = {
7335 + .name = MV643XX_ETH_SHARED_NAME,
7338 + .platform_data = &mv78xx0_ge00_shared_data,
7340 + .num_resources = 1,
7341 + .resource = mv78xx0_ge00_shared_resources,
7344 +static struct resource mv78xx0_ge00_resources[] = {
7346 + .name = "ge00 irq",
7347 + .start = IRQ_MV78XX0_GE00_SUM,
7348 + .end = IRQ_MV78XX0_GE00_SUM,
7349 + .flags = IORESOURCE_IRQ,
7353 +static struct platform_device mv78xx0_ge00 = {
7354 + .name = MV643XX_ETH_NAME,
7356 + .num_resources = 1,
7357 + .resource = mv78xx0_ge00_resources,
7360 +void __init mv78xx0_ge00_init(struct mv643xx_eth_platform_data *eth_data)
7362 + eth_data->shared = &mv78xx0_ge00_shared;
7363 + mv78xx0_ge00.dev.platform_data = eth_data;
7365 + platform_device_register(&mv78xx0_ge00_shared);
7366 + platform_device_register(&mv78xx0_ge00);
7370 +/*****************************************************************************
7372 + ****************************************************************************/
7373 +struct mv643xx_eth_shared_platform_data mv78xx0_ge01_shared_data = {
7375 + .dram = &mv78xx0_mbus_dram_info,
7378 +static struct resource mv78xx0_ge01_shared_resources[] = {
7380 + .name = "ge01 base",
7381 + .start = GE01_PHYS_BASE + 0x2000,
7382 + .end = GE01_PHYS_BASE + 0x3fff,
7383 + .flags = IORESOURCE_MEM,
7387 +static struct platform_device mv78xx0_ge01_shared = {
7388 + .name = MV643XX_ETH_SHARED_NAME,
7391 + .platform_data = &mv78xx0_ge01_shared_data,
7393 + .num_resources = 1,
7394 + .resource = mv78xx0_ge01_shared_resources,
7397 +static struct resource mv78xx0_ge01_resources[] = {
7399 + .name = "ge01 irq",
7400 + .start = IRQ_MV78XX0_GE01_SUM,
7401 + .end = IRQ_MV78XX0_GE01_SUM,
7402 + .flags = IORESOURCE_IRQ,
7406 +static struct platform_device mv78xx0_ge01 = {
7407 + .name = MV643XX_ETH_NAME,
7409 + .num_resources = 1,
7410 + .resource = mv78xx0_ge01_resources,
7413 +void __init mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data)
7415 + eth_data->shared = &mv78xx0_ge01_shared;
7416 + eth_data->shared_smi = &mv78xx0_ge00_shared;
7417 + mv78xx0_ge01.dev.platform_data = eth_data;
7419 + platform_device_register(&mv78xx0_ge01_shared);
7420 + platform_device_register(&mv78xx0_ge01);
7424 +/*****************************************************************************
7426 + ****************************************************************************/
7427 +struct mv643xx_eth_shared_platform_data mv78xx0_ge10_shared_data = {
7429 + .dram = &mv78xx0_mbus_dram_info,
7432 +static struct resource mv78xx0_ge10_shared_resources[] = {
7434 + .name = "ge10 base",
7435 + .start = GE10_PHYS_BASE + 0x2000,
7436 + .end = GE10_PHYS_BASE + 0x3fff,
7437 + .flags = IORESOURCE_MEM,
7441 +static struct platform_device mv78xx0_ge10_shared = {
7442 + .name = MV643XX_ETH_SHARED_NAME,
7445 + .platform_data = &mv78xx0_ge10_shared_data,
7447 + .num_resources = 1,
7448 + .resource = mv78xx0_ge10_shared_resources,
7451 +static struct resource mv78xx0_ge10_resources[] = {
7453 + .name = "ge10 irq",
7454 + .start = IRQ_MV78XX0_GE10_SUM,
7455 + .end = IRQ_MV78XX0_GE10_SUM,
7456 + .flags = IORESOURCE_IRQ,
7460 +static struct platform_device mv78xx0_ge10 = {
7461 + .name = MV643XX_ETH_NAME,
7463 + .num_resources = 1,
7464 + .resource = mv78xx0_ge10_resources,
7467 +void __init mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data)
7469 + eth_data->shared = &mv78xx0_ge10_shared;
7470 + eth_data->shared_smi = &mv78xx0_ge00_shared;
7471 + mv78xx0_ge10.dev.platform_data = eth_data;
7473 + platform_device_register(&mv78xx0_ge10_shared);
7474 + platform_device_register(&mv78xx0_ge10);
7478 +/*****************************************************************************
7480 + ****************************************************************************/
7481 +struct mv643xx_eth_shared_platform_data mv78xx0_ge11_shared_data = {
7483 + .dram = &mv78xx0_mbus_dram_info,
7486 +static struct resource mv78xx0_ge11_shared_resources[] = {
7488 + .name = "ge11 base",
7489 + .start = GE11_PHYS_BASE + 0x2000,
7490 + .end = GE11_PHYS_BASE + 0x3fff,
7491 + .flags = IORESOURCE_MEM,
7495 +static struct platform_device mv78xx0_ge11_shared = {
7496 + .name = MV643XX_ETH_SHARED_NAME,
7499 + .platform_data = &mv78xx0_ge11_shared_data,
7501 + .num_resources = 1,
7502 + .resource = mv78xx0_ge11_shared_resources,
7505 +static struct resource mv78xx0_ge11_resources[] = {
7507 + .name = "ge11 irq",
7508 + .start = IRQ_MV78XX0_GE11_SUM,
7509 + .end = IRQ_MV78XX0_GE11_SUM,
7510 + .flags = IORESOURCE_IRQ,
7514 +static struct platform_device mv78xx0_ge11 = {
7515 + .name = MV643XX_ETH_NAME,
7517 + .num_resources = 1,
7518 + .resource = mv78xx0_ge11_resources,
7521 +void __init mv78xx0_ge11_init(struct mv643xx_eth_platform_data *eth_data)
7523 + eth_data->shared = &mv78xx0_ge11_shared;
7524 + eth_data->shared_smi = &mv78xx0_ge00_shared;
7525 + mv78xx0_ge11.dev.platform_data = eth_data;
7527 + platform_device_register(&mv78xx0_ge11_shared);
7528 + platform_device_register(&mv78xx0_ge11);
7532 +/*****************************************************************************
7534 + ****************************************************************************/
7535 +static struct resource mv78xx0_sata_resources[] = {
7537 + .name = "sata base",
7538 + .start = SATA_PHYS_BASE,
7539 + .end = SATA_PHYS_BASE + 0x5000 - 1,
7540 + .flags = IORESOURCE_MEM,
7542 + .name = "sata irq",
7543 + .start = IRQ_MV78XX0_SATA,
7544 + .end = IRQ_MV78XX0_SATA,
7545 + .flags = IORESOURCE_IRQ,
7549 +static struct platform_device mv78xx0_sata = {
7550 + .name = "sata_mv",
7553 + .coherent_dma_mask = 0xffffffff,
7555 + .num_resources = ARRAY_SIZE(mv78xx0_sata_resources),
7556 + .resource = mv78xx0_sata_resources,
7559 +void __init mv78xx0_sata_init(struct mv_sata_platform_data *sata_data)
7561 + sata_data->dram = &mv78xx0_mbus_dram_info;
7562 + mv78xx0_sata.dev.platform_data = sata_data;
7563 + platform_device_register(&mv78xx0_sata);
7567 +/*****************************************************************************
7569 + ****************************************************************************/
7570 +static struct plat_serial8250_port mv78xx0_uart0_data[] = {
7572 + .mapbase = UART0_PHYS_BASE,
7573 + .membase = (char *)UART0_VIRT_BASE,
7574 + .irq = IRQ_MV78XX0_UART_0,
7575 + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
7576 + .iotype = UPIO_MEM,
7583 +static struct resource mv78xx0_uart0_resources[] = {
7585 + .start = UART0_PHYS_BASE,
7586 + .end = UART0_PHYS_BASE + 0xff,
7587 + .flags = IORESOURCE_MEM,
7589 + .start = IRQ_MV78XX0_UART_0,
7590 + .end = IRQ_MV78XX0_UART_0,
7591 + .flags = IORESOURCE_IRQ,
7595 +static struct platform_device mv78xx0_uart0 = {
7596 + .name = "serial8250",
7599 + .platform_data = mv78xx0_uart0_data,
7601 + .resource = mv78xx0_uart0_resources,
7602 + .num_resources = ARRAY_SIZE(mv78xx0_uart0_resources),
7605 +void __init mv78xx0_uart0_init(void)
7607 + platform_device_register(&mv78xx0_uart0);
7611 +/*****************************************************************************
7613 + ****************************************************************************/
7614 +static struct plat_serial8250_port mv78xx0_uart1_data[] = {
7616 + .mapbase = UART1_PHYS_BASE,
7617 + .membase = (char *)UART1_VIRT_BASE,
7618 + .irq = IRQ_MV78XX0_UART_1,
7619 + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
7620 + .iotype = UPIO_MEM,
7627 +static struct resource mv78xx0_uart1_resources[] = {
7629 + .start = UART1_PHYS_BASE,
7630 + .end = UART1_PHYS_BASE + 0xff,
7631 + .flags = IORESOURCE_MEM,
7633 + .start = IRQ_MV78XX0_UART_1,
7634 + .end = IRQ_MV78XX0_UART_1,
7635 + .flags = IORESOURCE_IRQ,
7639 +static struct platform_device mv78xx0_uart1 = {
7640 + .name = "serial8250",
7643 + .platform_data = mv78xx0_uart1_data,
7645 + .resource = mv78xx0_uart1_resources,
7646 + .num_resources = ARRAY_SIZE(mv78xx0_uart1_resources),
7649 +void __init mv78xx0_uart1_init(void)
7651 + platform_device_register(&mv78xx0_uart1);
7655 +/*****************************************************************************
7657 + ****************************************************************************/
7658 +static struct plat_serial8250_port mv78xx0_uart2_data[] = {
7660 + .mapbase = UART2_PHYS_BASE,
7661 + .membase = (char *)UART2_VIRT_BASE,
7662 + .irq = IRQ_MV78XX0_UART_2,
7663 + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
7664 + .iotype = UPIO_MEM,
7671 +static struct resource mv78xx0_uart2_resources[] = {
7673 + .start = UART2_PHYS_BASE,
7674 + .end = UART2_PHYS_BASE + 0xff,
7675 + .flags = IORESOURCE_MEM,
7677 + .start = IRQ_MV78XX0_UART_2,
7678 + .end = IRQ_MV78XX0_UART_2,
7679 + .flags = IORESOURCE_IRQ,
7683 +static struct platform_device mv78xx0_uart2 = {
7684 + .name = "serial8250",
7687 + .platform_data = mv78xx0_uart2_data,
7689 + .resource = mv78xx0_uart2_resources,
7690 + .num_resources = ARRAY_SIZE(mv78xx0_uart2_resources),
7693 +void __init mv78xx0_uart2_init(void)
7695 + platform_device_register(&mv78xx0_uart2);
7699 +/*****************************************************************************
7701 + ****************************************************************************/
7702 +static struct plat_serial8250_port mv78xx0_uart3_data[] = {
7704 + .mapbase = UART3_PHYS_BASE,
7705 + .membase = (char *)UART3_VIRT_BASE,
7706 + .irq = IRQ_MV78XX0_UART_3,
7707 + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
7708 + .iotype = UPIO_MEM,
7715 +static struct resource mv78xx0_uart3_resources[] = {
7717 + .start = UART3_PHYS_BASE,
7718 + .end = UART3_PHYS_BASE + 0xff,
7719 + .flags = IORESOURCE_MEM,
7721 + .start = IRQ_MV78XX0_UART_3,
7722 + .end = IRQ_MV78XX0_UART_3,
7723 + .flags = IORESOURCE_IRQ,
7727 +static struct platform_device mv78xx0_uart3 = {
7728 + .name = "serial8250",
7731 + .platform_data = mv78xx0_uart3_data,
7733 + .resource = mv78xx0_uart3_resources,
7734 + .num_resources = ARRAY_SIZE(mv78xx0_uart3_resources),
7737 +void __init mv78xx0_uart3_init(void)
7739 + platform_device_register(&mv78xx0_uart3);
7743 +/*****************************************************************************
7745 + ****************************************************************************/
7746 +static void mv78xx0_timer_init(void)
7748 + orion_time_init(IRQ_MV78XX0_TIMER_1, get_tclk());
7751 +struct sys_timer mv78xx0_timer = {
7752 + .init = mv78xx0_timer_init,
7756 +/*****************************************************************************
7758 + ****************************************************************************/
7759 +static int __init is_l2_writethrough(void)
7761 + return !!(readl(CPU_CONTROL) & L2_WRITETHROUGH);
7764 +void __init mv78xx0_init(void)
7772 + core_index = mv78xx0_core_index();
7773 + hclk = get_hclk();
7774 + get_pclk_l2clk(hclk, core_index, &pclk, &l2clk);
7775 + tclk = get_tclk();
7777 + printk(KERN_INFO "MV78xx0 core #%d, ", core_index);
7778 + printk("PCLK = %dMHz, ", (pclk + 499999) / 1000000);
7779 + printk("L2 = %dMHz, ", (l2clk + 499999) / 1000000);
7780 + printk("HCLK = %dMHz, ", (hclk + 499999) / 1000000);
7781 + printk("TCLK = %dMHz\n", (tclk + 499999) / 1000000);
7783 + mv78xx0_setup_cpu_mbus();
7785 +#ifdef CONFIG_CACHE_FEROCEON_L2
7786 + feroceon_l2_init(is_l2_writethrough());
7789 + mv78xx0_ge00_shared_data.t_clk = tclk;
7790 + mv78xx0_ge01_shared_data.t_clk = tclk;
7791 + mv78xx0_ge10_shared_data.t_clk = tclk;
7792 + mv78xx0_ge11_shared_data.t_clk = tclk;
7793 + mv78xx0_uart0_data[0].uartclk = tclk;
7794 + mv78xx0_uart1_data[0].uartclk = tclk;
7795 + mv78xx0_uart2_data[0].uartclk = tclk;
7796 + mv78xx0_uart3_data[0].uartclk = tclk;
7799 +++ b/arch/arm/mach-mv78xx0/common.h
7802 + * arch/arm/mach-mv78xx0/common.h
7804 + * Core functions for Marvell MV78xx0 SoCs
7806 + * This file is licensed under the terms of the GNU General Public
7807 + * License version 2. This program is licensed "as is" without any
7808 + * warranty of any kind, whether express or implied.
7811 +#ifndef __ARCH_MV78XX0_COMMON_H
7812 +#define __ARCH_MV78XX0_COMMON_H
7814 +struct mv643xx_eth_platform_data;
7815 +struct mv_sata_platform_data;
7818 + * Basic MV78xx0 init functions used early by machine-setup.
7820 +int mv78xx0_core_index(void);
7821 +void mv78xx0_map_io(void);
7822 +void mv78xx0_init(void);
7823 +void mv78xx0_init_irq(void);
7825 +extern struct mbus_dram_target_info mv78xx0_mbus_dram_info;
7826 +void mv78xx0_setup_cpu_mbus(void);
7827 +void mv78xx0_setup_pcie_io_win(int window, u32 base, u32 size,
7828 + int maj, int min);
7829 +void mv78xx0_setup_pcie_mem_win(int window, u32 base, u32 size,
7830 + int maj, int min);
7832 +void mv78xx0_ehci0_init(void);
7833 +void mv78xx0_ehci1_init(void);
7834 +void mv78xx0_ehci2_init(void);
7835 +void mv78xx0_ge00_init(struct mv643xx_eth_platform_data *eth_data);
7836 +void mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data);
7837 +void mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data);
7838 +void mv78xx0_ge11_init(struct mv643xx_eth_platform_data *eth_data);
7839 +void mv78xx0_pcie_init(int init_port0, int init_port1);
7840 +void mv78xx0_sata_init(struct mv_sata_platform_data *sata_data);
7841 +void mv78xx0_uart0_init(void);
7842 +void mv78xx0_uart1_init(void);
7843 +void mv78xx0_uart2_init(void);
7844 +void mv78xx0_uart3_init(void);
7846 +extern struct sys_timer mv78xx0_timer;
7851 +++ b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
7854 + * arch/arm/mach-mv78xx0/db78x00-bp-setup.c
7856 + * Marvell DB-78x00-BP Development Board Setup
7858 + * This file is licensed under the terms of the GNU General Public
7859 + * License version 2. This program is licensed "as is" without any
7860 + * warranty of any kind, whether express or implied.
7863 +#include <linux/kernel.h>
7864 +#include <linux/init.h>
7865 +#include <linux/platform_device.h>
7866 +#include <linux/ata_platform.h>
7867 +#include <linux/mv643xx_eth.h>
7868 +#include <asm/arch/mv78xx0.h>
7869 +#include <asm/mach-types.h>
7870 +#include <asm/mach/arch.h>
7871 +#include "common.h"
7873 +static struct mv643xx_eth_platform_data db78x00_ge00_data = {
7877 +static struct mv643xx_eth_platform_data db78x00_ge01_data = {
7881 +static struct mv643xx_eth_platform_data db78x00_ge10_data = {
7885 +static struct mv643xx_eth_platform_data db78x00_ge11_data = {
7889 +static struct mv_sata_platform_data db78x00_sata_data = {
7893 +static void __init db78x00_init(void)
7896 + * Basic MV78xx0 setup. Needs to be called early.
7901 + * Partition on-chip peripherals between the two CPU cores.
7903 + if (mv78xx0_core_index() == 0) {
7904 + mv78xx0_ehci0_init();
7905 + mv78xx0_ehci1_init();
7906 + mv78xx0_ehci2_init();
7907 + mv78xx0_ge00_init(&db78x00_ge00_data);
7908 + mv78xx0_ge01_init(&db78x00_ge01_data);
7909 + mv78xx0_ge10_init(&db78x00_ge10_data);
7910 + mv78xx0_ge11_init(&db78x00_ge11_data);
7911 + mv78xx0_sata_init(&db78x00_sata_data);
7912 + mv78xx0_uart0_init();
7913 + mv78xx0_uart2_init();
7915 + mv78xx0_uart1_init();
7916 + mv78xx0_uart3_init();
7920 +static int __init db78x00_pci_init(void)
7922 + if (machine_is_db78x00_bp()) {
7924 + * Assign the x16 PCIe slot on the board to CPU core
7925 + * #0, and let CPU core #1 have the four x1 slots.
7927 + if (mv78xx0_core_index() == 0)
7928 + mv78xx0_pcie_init(0, 1);
7930 + mv78xx0_pcie_init(1, 0);
7935 +subsys_initcall(db78x00_pci_init);
7937 +MACHINE_START(DB78X00_BP, "Marvell DB-78x00-BP Development Board")
7938 + /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */
7939 + .phys_io = MV78XX0_REGS_PHYS_BASE,
7940 + .io_pg_offst = ((MV78XX0_REGS_VIRT_BASE) >> 18) & 0xfffc,
7941 + .boot_params = 0x00000100,
7942 + .init_machine = db78x00_init,
7943 + .map_io = mv78xx0_map_io,
7944 + .init_irq = mv78xx0_init_irq,
7945 + .timer = &mv78xx0_timer,
7948 +++ b/arch/arm/mach-mv78xx0/irq.c
7951 + * arch/arm/mach-mv78xx0/irq.c
7953 + * MV78xx0 IRQ handling.
7955 + * This file is licensed under the terms of the GNU General Public
7956 + * License version 2. This program is licensed "as is" without any
7957 + * warranty of any kind, whether express or implied.
7960 +#include <linux/kernel.h>
7961 +#include <linux/init.h>
7962 +#include <linux/pci.h>
7963 +#include <asm/arch/mv78xx0.h>
7964 +#include <asm/plat-orion/irq.h>
7965 +#include "common.h"
7967 +void __init mv78xx0_init_irq(void)
7969 + orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF));
7970 + orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF));
7973 +++ b/arch/arm/mach-mv78xx0/pcie.c
7976 + * arch/arm/mach-mv78xx0/pcie.c
7978 + * PCIe functions for Marvell MV78xx0 SoCs
7980 + * This file is licensed under the terms of the GNU General Public
7981 + * License version 2. This program is licensed "as is" without any
7982 + * warranty of any kind, whether express or implied.
7985 +#include <linux/kernel.h>
7986 +#include <linux/pci.h>
7987 +#include <linux/mbus.h>
7988 +#include <asm/mach/pci.h>
7989 +#include <asm/plat-orion/pcie.h>
7990 +#include "common.h"
7996 + void __iomem *base;
7997 + spinlock_t conf_lock;
7998 + char io_space_name[16];
7999 + char mem_space_name[16];
8000 + struct resource res[2];
8003 +static struct pcie_port pcie_port[8];
8004 +static int num_pcie_ports;
8005 +static struct resource pcie_io_space;
8006 +static struct resource pcie_mem_space;
8009 +static void __init mv78xx0_pcie_preinit(void)
8016 + pcie_io_space.name = "PCIe I/O Space";
8017 + pcie_io_space.start = MV78XX0_PCIE_IO_PHYS_BASE(0);
8018 + pcie_io_space.end =
8019 + MV78XX0_PCIE_IO_PHYS_BASE(0) + MV78XX0_PCIE_IO_SIZE * 8 - 1;
8020 + pcie_io_space.flags = IORESOURCE_IO;
8021 + if (request_resource(&iomem_resource, &pcie_io_space))
8022 + panic("can't allocate PCIe I/O space");
8024 + pcie_mem_space.name = "PCIe MEM Space";
8025 + pcie_mem_space.start = MV78XX0_PCIE_MEM_PHYS_BASE;
8026 + pcie_mem_space.end =
8027 + MV78XX0_PCIE_MEM_PHYS_BASE + MV78XX0_PCIE_MEM_SIZE - 1;
8028 + pcie_mem_space.flags = IORESOURCE_MEM;
8029 + if (request_resource(&iomem_resource, &pcie_mem_space))
8030 + panic("can't allocate PCIe MEM space");
8032 + for (i = 0; i < num_pcie_ports; i++) {
8033 + struct pcie_port *pp = pcie_port + i;
8035 + snprintf(pp->io_space_name, sizeof(pp->io_space_name),
8036 + "PCIe %d.%d I/O", pp->maj, pp->min);
8037 + pp->io_space_name[sizeof(pp->io_space_name) - 1] = 0;
8038 + pp->res[0].name = pp->io_space_name;
8039 + pp->res[0].start = MV78XX0_PCIE_IO_PHYS_BASE(i);
8040 + pp->res[0].end = pp->res[0].start + MV78XX0_PCIE_IO_SIZE - 1;
8041 + pp->res[0].flags = IORESOURCE_IO;
8043 + snprintf(pp->mem_space_name, sizeof(pp->mem_space_name),
8044 + "PCIe %d.%d MEM", pp->maj, pp->min);
8045 + pp->mem_space_name[sizeof(pp->mem_space_name) - 1] = 0;
8046 + pp->res[1].name = pp->mem_space_name;
8047 + pp->res[1].flags = IORESOURCE_MEM;
8050 + switch (num_pcie_ports) {
8056 + size_each = 0x30000000;
8060 + size_each = 0x10000000;
8064 + size_each = 0x08000000;
8068 + size_each = 0x04000000;
8072 + panic("invalid number of PCIe ports");
8075 + start = MV78XX0_PCIE_MEM_PHYS_BASE;
8076 + for (i = 0; i < num_pcie_ports; i++) {
8077 + struct pcie_port *pp = pcie_port + i;
8079 + pp->res[1].start = start;
8080 + pp->res[1].end = start + size_each - 1;
8081 + start += size_each;
8084 + for (i = 0; i < num_pcie_ports; i++) {
8085 + struct pcie_port *pp = pcie_port + i;
8087 + if (request_resource(&pcie_io_space, &pp->res[0]))
8088 + panic("can't allocate PCIe I/O sub-space");
8090 + if (request_resource(&pcie_mem_space, &pp->res[1]))
8091 + panic("can't allocate PCIe MEM sub-space");
8095 + for (i = 0; i < num_pcie_ports; i++) {
8096 + struct pcie_port *pp = pcie_port + i;
8098 + mv78xx0_setup_pcie_io_win(win++, pp->res[0].start,
8099 + pp->res[0].end - pp->res[0].start + 1,
8100 + pp->maj, pp->min);
8102 + mv78xx0_setup_pcie_mem_win(win++, pp->res[1].start,
8103 + pp->res[1].end - pp->res[1].start + 1,
8104 + pp->maj, pp->min);
8108 +static int __init mv78xx0_pcie_setup(int nr, struct pci_sys_data *sys)
8110 + struct pcie_port *pp;
8112 + if (nr >= num_pcie_ports)
8115 + pp = &pcie_port[nr];
8116 + pp->root_bus_nr = sys->busnr;
8119 + * Generic PCIe unit setup.
8121 + orion_pcie_set_local_bus_nr(pp->base, sys->busnr);
8122 + orion_pcie_setup(pp->base, &mv78xx0_mbus_dram_info);
8124 + sys->resource[0] = &pp->res[0];
8125 + sys->resource[1] = &pp->res[1];
8126 + sys->resource[2] = NULL;
8131 +static struct pcie_port *bus_to_port(int bus)
8135 + for (i = num_pcie_ports - 1; i >= 0; i--) {
8136 + int rbus = pcie_port[i].root_bus_nr;
8137 + if (rbus != -1 && rbus <= bus)
8141 + return i >= 0 ? pcie_port + i : NULL;
8144 +static int pcie_valid_config(struct pcie_port *pp, int bus, int dev)
8147 + * Don't go out when trying to access nonexisting devices
8148 + * on the local bus.
8150 + if (bus == pp->root_bus_nr && dev > 1)
8156 +static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
8157 + int size, u32 *val)
8159 + struct pcie_port *pp = bus_to_port(bus->number);
8160 + unsigned long flags;
8163 + if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0) {
8164 + *val = 0xffffffff;
8165 + return PCIBIOS_DEVICE_NOT_FOUND;
8168 + spin_lock_irqsave(&pp->conf_lock, flags);
8169 + ret = orion_pcie_rd_conf(pp->base, bus, devfn, where, size, val);
8170 + spin_unlock_irqrestore(&pp->conf_lock, flags);
8175 +static int pcie_wr_conf(struct pci_bus *bus, u32 devfn,
8176 + int where, int size, u32 val)
8178 + struct pcie_port *pp = bus_to_port(bus->number);
8179 + unsigned long flags;
8182 + if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0)
8183 + return PCIBIOS_DEVICE_NOT_FOUND;
8185 + spin_lock_irqsave(&pp->conf_lock, flags);
8186 + ret = orion_pcie_wr_conf(pp->base, bus, devfn, where, size, val);
8187 + spin_unlock_irqrestore(&pp->conf_lock, flags);
8192 +static struct pci_ops pcie_ops = {
8193 + .read = pcie_rd_conf,
8194 + .write = pcie_wr_conf,
8197 +static void __devinit rc_pci_fixup(struct pci_dev *dev)
8200 + * Prevent enumeration of root complex.
8202 + if (dev->bus->parent == NULL && dev->devfn == 0) {
8205 + for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
8206 + dev->resource[i].start = 0;
8207 + dev->resource[i].end = 0;
8208 + dev->resource[i].flags = 0;
8212 +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup);
8214 +static struct pci_bus __init *
8215 +mv78xx0_pcie_scan_bus(int nr, struct pci_sys_data *sys)
8217 + struct pci_bus *bus;
8219 + if (nr < num_pcie_ports) {
8220 + bus = pci_scan_bus(sys->busnr, &pcie_ops, sys);
8229 +static int __init mv78xx0_pcie_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
8231 + struct pcie_port *pp = bus_to_port(dev->bus->number);
8233 + return IRQ_MV78XX0_PCIE_00 + (pp->maj << 2) + pp->min;
8236 +static struct hw_pci mv78xx0_pci __initdata = {
8237 + .nr_controllers = 8,
8238 + .preinit = mv78xx0_pcie_preinit,
8239 + .swizzle = pci_std_swizzle,
8240 + .setup = mv78xx0_pcie_setup,
8241 + .scan = mv78xx0_pcie_scan_bus,
8242 + .map_irq = mv78xx0_pcie_map_irq,
8245 +static void __init add_pcie_port(int maj, int min, unsigned long base)
8247 + printk(KERN_INFO "MV78xx0 PCIe port %d.%d: ", maj, min);
8249 + if (orion_pcie_link_up((void __iomem *)base)) {
8250 + struct pcie_port *pp = &pcie_port[num_pcie_ports++];
8252 + printk("link up\n");
8256 + pp->root_bus_nr = -1;
8257 + pp->base = (void __iomem *)base;
8258 + spin_lock_init(&pp->conf_lock);
8259 + memset(pp->res, 0, sizeof(pp->res));
8261 + printk("link down, ignoring\n");
8265 +void __init mv78xx0_pcie_init(int init_port0, int init_port1)
8268 + add_pcie_port(0, 0, PCIE00_VIRT_BASE);
8269 + if (!orion_pcie_x4_mode((void __iomem *)PCIE00_VIRT_BASE)) {
8270 + add_pcie_port(0, 1, PCIE01_VIRT_BASE);
8271 + add_pcie_port(0, 2, PCIE02_VIRT_BASE);
8272 + add_pcie_port(0, 3, PCIE03_VIRT_BASE);
8277 + add_pcie_port(1, 0, PCIE10_VIRT_BASE);
8278 + if (!orion_pcie_x4_mode((void __iomem *)PCIE10_VIRT_BASE)) {
8279 + add_pcie_port(1, 1, PCIE11_VIRT_BASE);
8280 + add_pcie_port(1, 2, PCIE12_VIRT_BASE);
8281 + add_pcie_port(1, 3, PCIE13_VIRT_BASE);
8285 + pci_common_init(&mv78xx0_pci);
8287 --- a/arch/arm/mach-orion5x/Kconfig
8288 +++ b/arch/arm/mach-orion5x/Kconfig
8290 Buffalo Linkstation Pro/Live platform. Both v1 and
8291 v2 devices are supported.
8294 + bool "QNAP TS-409"
8296 + Say 'Y' here if you want your kernel to support the
8297 + QNAP TS-409 platform.
8299 +config MACH_WRT350N_V2
8300 + bool "Linksys WRT350N v2"
8302 + Say 'Y' here if you want your kernel to support the
8303 + Linksys WRT350N v2 platform.
8306 + bool "Technologic Systems TS-78xx"
8308 + Say 'Y' here if you want your kernel to support the
8309 + Technologic Systems TS-78xx platform.
8312 + bool "HP Media Vault mv2120"
8314 + Say 'Y' here if you want your kernel to support the
8315 + HP Media Vault mv2120 or mv5100.
8318 + bool "Maxtor Shared Storage II"
8320 + Say 'Y' here if you want your kernel to support the
8321 + Maxtor Shared Storage II platform.
8326 --- a/arch/arm/mach-orion5x/Makefile
8327 +++ b/arch/arm/mach-orion5x/Makefile
8329 -obj-y += common.o addr-map.o pci.o gpio.o irq.o
8330 +obj-y += common.o addr-map.o pci.o gpio.o irq.o mpp.o
8331 obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o
8332 obj-$(CONFIG_MACH_RD88F5182) += rd88f5182-setup.o
8333 obj-$(CONFIG_MACH_KUROBOX_PRO) += kurobox_pro-setup.o
8334 obj-$(CONFIG_MACH_LINKSTATION_PRO) += kurobox_pro-setup.o
8335 obj-$(CONFIG_MACH_DNS323) += dns323-setup.o
8336 -obj-$(CONFIG_MACH_TS209) += ts209-setup.o
8337 +obj-$(CONFIG_MACH_TS209) += ts209-setup.o tsx09-common.o
8338 +obj-$(CONFIG_MACH_TS409) += ts409-setup.o tsx09-common.o
8339 +obj-$(CONFIG_MACH_WRT350N_V2) += wrt350n-v2-setup.o
8340 +obj-$(CONFIG_MACH_TS78XX) += ts78xx-setup.o
8341 +obj-$(CONFIG_MACH_MV2120) += mv2120-setup.o
8342 +obj-$(CONFIG_MACH_MSS2) += mss2-setup.o
8343 --- a/arch/arm/mach-orion5x/addr-map.c
8344 +++ b/arch/arm/mach-orion5x/addr-map.c
8348 struct mbus_dram_target_info orion5x_mbus_dram_info;
8349 +static int __initdata win_alloc_count;
8351 static int __init orion5x_cpu_win_can_remap(int win)
8354 static void __init setup_cpu_win(int win, u32 base, u32 size,
8355 u8 target, u8 attr, int remap)
8357 - orion5x_write(CPU_WIN_BASE(win), base & 0xffff0000);
8358 - orion5x_write(CPU_WIN_CTRL(win),
8359 - ((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) | 1);
8361 + printk(KERN_ERR "setup_cpu_win: trying to allocate "
8362 + "window %d\n", win);
8366 + writel(base & 0xffff0000, CPU_WIN_BASE(win));
8367 + writel(((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) | 1,
8368 + CPU_WIN_CTRL(win));
8370 if (orion5x_cpu_win_can_remap(win)) {
8374 - orion5x_write(CPU_WIN_REMAP_LO(win), remap & 0xffff0000);
8375 - orion5x_write(CPU_WIN_REMAP_HI(win), 0);
8376 + writel(remap & 0xffff0000, CPU_WIN_REMAP_LO(win));
8377 + writel(0, CPU_WIN_REMAP_HI(win));
8381 @@ -109,11 +116,11 @@
8382 * First, disable and clear windows.
8384 for (i = 0; i < 8; i++) {
8385 - orion5x_write(CPU_WIN_BASE(i), 0);
8386 - orion5x_write(CPU_WIN_CTRL(i), 0);
8387 + writel(0, CPU_WIN_BASE(i));
8388 + writel(0, CPU_WIN_CTRL(i));
8389 if (orion5x_cpu_win_can_remap(i)) {
8390 - orion5x_write(CPU_WIN_REMAP_LO(i), 0);
8391 - orion5x_write(CPU_WIN_REMAP_HI(i), 0);
8392 + writel(0, CPU_WIN_REMAP_LO(i));
8393 + writel(0, CPU_WIN_REMAP_HI(i));
8398 TARGET_PCIE, ATTR_PCIE_MEM, -1);
8399 setup_cpu_win(3, ORION5X_PCI_MEM_PHYS_BASE, ORION5X_PCI_MEM_SIZE,
8400 TARGET_PCI, ATTR_PCI_MEM, -1);
8401 + win_alloc_count = 4;
8404 * Setup MBUS dram target info.
8406 w = &orion5x_mbus_dram_info.cs[cs++];
8408 w->mbus_attr = 0xf & ~(1 << i);
8409 - w->base = base & 0xff000000;
8410 - w->size = (size | 0x00ffffff) + 1;
8411 + w->base = base & 0xffff0000;
8412 + w->size = (size | 0x0000ffff) + 1;
8415 orion5x_mbus_dram_info.num_cs = cs;
8416 @@ -156,25 +164,30 @@
8418 void __init orion5x_setup_dev_boot_win(u32 base, u32 size)
8420 - setup_cpu_win(4, base, size, TARGET_DEV_BUS, ATTR_DEV_BOOT, -1);
8421 + setup_cpu_win(win_alloc_count++, base, size,
8422 + TARGET_DEV_BUS, ATTR_DEV_BOOT, -1);
8425 void __init orion5x_setup_dev0_win(u32 base, u32 size)
8427 - setup_cpu_win(5, base, size, TARGET_DEV_BUS, ATTR_DEV_CS0, -1);
8428 + setup_cpu_win(win_alloc_count++, base, size,
8429 + TARGET_DEV_BUS, ATTR_DEV_CS0, -1);
8432 void __init orion5x_setup_dev1_win(u32 base, u32 size)
8434 - setup_cpu_win(6, base, size, TARGET_DEV_BUS, ATTR_DEV_CS1, -1);
8435 + setup_cpu_win(win_alloc_count++, base, size,
8436 + TARGET_DEV_BUS, ATTR_DEV_CS1, -1);
8439 void __init orion5x_setup_dev2_win(u32 base, u32 size)
8441 - setup_cpu_win(7, base, size, TARGET_DEV_BUS, ATTR_DEV_CS2, -1);
8442 + setup_cpu_win(win_alloc_count++, base, size,
8443 + TARGET_DEV_BUS, ATTR_DEV_CS2, -1);
8446 void __init orion5x_setup_pcie_wa_win(u32 base, u32 size)
8448 - setup_cpu_win(7, base, size, TARGET_PCIE, ATTR_PCIE_WA, -1);
8449 + setup_cpu_win(win_alloc_count++, base, size,
8450 + TARGET_PCIE, ATTR_PCIE_WA, -1);
8452 --- a/arch/arm/mach-orion5x/common.c
8453 +++ b/arch/arm/mach-orion5x/common.c
8455 .virtual = ORION5X_REGS_VIRT_BASE,
8456 .pfn = __phys_to_pfn(ORION5X_REGS_PHYS_BASE),
8457 .length = ORION5X_REGS_SIZE,
8461 + .type = MT_DEVICE,
8463 .virtual = ORION5X_PCIE_IO_VIRT_BASE,
8464 .pfn = __phys_to_pfn(ORION5X_PCIE_IO_PHYS_BASE),
8465 .length = ORION5X_PCIE_IO_SIZE,
8469 + .type = MT_DEVICE,
8471 .virtual = ORION5X_PCI_IO_VIRT_BASE,
8472 .pfn = __phys_to_pfn(ORION5X_PCI_IO_PHYS_BASE),
8473 .length = ORION5X_PCI_IO_SIZE,
8477 + .type = MT_DEVICE,
8479 .virtual = ORION5X_PCIE_WA_VIRT_BASE,
8480 .pfn = __phys_to_pfn(ORION5X_PCIE_WA_PHYS_BASE),
8481 .length = ORION5X_PCIE_WA_SIZE,
8483 + .type = MT_DEVICE,
8487 @@ -66,101 +63,32 @@
8488 iotable_init(orion5x_io_desc, ARRAY_SIZE(orion5x_io_desc));
8492 /*****************************************************************************
8495 ****************************************************************************/
8497 -static struct resource orion5x_uart_resources[] = {
8499 - .start = UART0_PHYS_BASE,
8500 - .end = UART0_PHYS_BASE + 0xff,
8501 - .flags = IORESOURCE_MEM,
8504 - .start = IRQ_ORION5X_UART0,
8505 - .end = IRQ_ORION5X_UART0,
8506 - .flags = IORESOURCE_IRQ,
8509 - .start = UART1_PHYS_BASE,
8510 - .end = UART1_PHYS_BASE + 0xff,
8511 - .flags = IORESOURCE_MEM,
8514 - .start = IRQ_ORION5X_UART1,
8515 - .end = IRQ_ORION5X_UART1,
8516 - .flags = IORESOURCE_IRQ,
8520 -static struct plat_serial8250_port orion5x_uart_data[] = {
8522 - .mapbase = UART0_PHYS_BASE,
8523 - .membase = (char *)UART0_VIRT_BASE,
8524 - .irq = IRQ_ORION5X_UART0,
8525 - .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
8526 - .iotype = UPIO_MEM,
8528 - .uartclk = ORION5X_TCLK,
8531 - .mapbase = UART1_PHYS_BASE,
8532 - .membase = (char *)UART1_VIRT_BASE,
8533 - .irq = IRQ_ORION5X_UART1,
8534 - .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
8535 - .iotype = UPIO_MEM,
8537 - .uartclk = ORION5X_TCLK,
8540 +static struct orion_ehci_data orion5x_ehci_data = {
8541 + .dram = &orion5x_mbus_dram_info,
8544 -static struct platform_device orion5x_uart = {
8545 - .name = "serial8250",
8546 - .id = PLAT8250_DEV_PLATFORM,
8548 - .platform_data = orion5x_uart_data,
8550 - .resource = orion5x_uart_resources,
8551 - .num_resources = ARRAY_SIZE(orion5x_uart_resources),
8553 +static u64 ehci_dmamask = 0xffffffffUL;
8555 -/*******************************************************************************
8556 - * USB Controller - 2 interfaces
8557 - ******************************************************************************/
8559 +/*****************************************************************************
8561 + ****************************************************************************/
8562 static struct resource orion5x_ehci0_resources[] = {
8564 .start = ORION5X_USB0_PHYS_BASE,
8565 .end = ORION5X_USB0_PHYS_BASE + SZ_4K - 1,
8566 .flags = IORESOURCE_MEM,
8570 .start = IRQ_ORION5X_USB0_CTRL,
8571 .end = IRQ_ORION5X_USB0_CTRL,
8572 .flags = IORESOURCE_IRQ,
8576 -static struct resource orion5x_ehci1_resources[] = {
8578 - .start = ORION5X_USB1_PHYS_BASE,
8579 - .end = ORION5X_USB1_PHYS_BASE + SZ_4K - 1,
8580 - .flags = IORESOURCE_MEM,
8583 - .start = IRQ_ORION5X_USB1_CTRL,
8584 - .end = IRQ_ORION5X_USB1_CTRL,
8585 - .flags = IORESOURCE_IRQ,
8589 -static struct orion_ehci_data orion5x_ehci_data = {
8590 - .dram = &orion5x_mbus_dram_info,
8593 -static u64 ehci_dmamask = 0xffffffffUL;
8595 static struct platform_device orion5x_ehci0 = {
8596 .name = "orion-ehci",
8598 @@ -173,6 +101,27 @@
8599 .num_resources = ARRAY_SIZE(orion5x_ehci0_resources),
8602 +void __init orion5x_ehci0_init(void)
8604 + platform_device_register(&orion5x_ehci0);
8608 +/*****************************************************************************
8610 + ****************************************************************************/
8611 +static struct resource orion5x_ehci1_resources[] = {
8613 + .start = ORION5X_USB1_PHYS_BASE,
8614 + .end = ORION5X_USB1_PHYS_BASE + SZ_4K - 1,
8615 + .flags = IORESOURCE_MEM,
8617 + .start = IRQ_ORION5X_USB1_CTRL,
8618 + .end = IRQ_ORION5X_USB1_CTRL,
8619 + .flags = IORESOURCE_IRQ,
8623 static struct platform_device orion5x_ehci1 = {
8624 .name = "orion-ehci",
8626 @@ -185,11 +134,15 @@
8627 .num_resources = ARRAY_SIZE(orion5x_ehci1_resources),
8630 +void __init orion5x_ehci1_init(void)
8632 + platform_device_register(&orion5x_ehci1);
8636 /*****************************************************************************
8637 - * Gigabit Ethernet port
8638 - * (The Orion and Discovery (MV643xx) families use the same Ethernet driver)
8640 ****************************************************************************/
8642 struct mv643xx_eth_shared_platform_data orion5x_eth_shared_data = {
8643 .dram = &orion5x_mbus_dram_info,
8644 .t_clk = ORION5X_TCLK,
8646 .start = IRQ_ORION5X_ETH_SUM,
8647 .end = IRQ_ORION5X_ETH_SUM,
8648 .flags = IORESOURCE_IRQ,
8653 static struct platform_device orion5x_eth = {
8654 @@ -238,11 +191,10 @@
8655 platform_device_register(&orion5x_eth);
8659 /*****************************************************************************
8661 - * (The Orion and Discovery (MV643xx) families share the same I2C controller)
8663 ****************************************************************************/
8665 static struct mv64xxx_i2c_pdata orion5x_i2c_pdata = {
8666 .freq_m = 8, /* assumes 166 MHz TCLK */
8668 @@ -251,16 +203,15 @@
8670 static struct resource orion5x_i2c_resources[] = {
8672 - .name = "i2c base",
8673 - .start = I2C_PHYS_BASE,
8674 - .end = I2C_PHYS_BASE + 0x20 -1,
8675 - .flags = IORESOURCE_MEM,
8678 - .name = "i2c irq",
8679 - .start = IRQ_ORION5X_I2C,
8680 - .end = IRQ_ORION5X_I2C,
8681 - .flags = IORESOURCE_IRQ,
8682 + .name = "i2c base",
8683 + .start = I2C_PHYS_BASE,
8684 + .end = I2C_PHYS_BASE + 0x1f,
8685 + .flags = IORESOURCE_MEM,
8687 + .name = "i2c irq",
8688 + .start = IRQ_ORION5X_I2C,
8689 + .end = IRQ_ORION5X_I2C,
8690 + .flags = IORESOURCE_IRQ,
8694 @@ -270,36 +221,41 @@
8695 .num_resources = ARRAY_SIZE(orion5x_i2c_resources),
8696 .resource = orion5x_i2c_resources,
8698 - .platform_data = &orion5x_i2c_pdata,
8699 + .platform_data = &orion5x_i2c_pdata,
8703 +void __init orion5x_i2c_init(void)
8705 + platform_device_register(&orion5x_i2c);
8709 /*****************************************************************************
8712 ****************************************************************************/
8713 static struct resource orion5x_sata_resources[] = {
8715 - .name = "sata base",
8716 - .start = ORION5X_SATA_PHYS_BASE,
8717 - .end = ORION5X_SATA_PHYS_BASE + 0x5000 - 1,
8718 - .flags = IORESOURCE_MEM,
8721 - .name = "sata irq",
8722 - .start = IRQ_ORION5X_SATA,
8723 - .end = IRQ_ORION5X_SATA,
8724 - .flags = IORESOURCE_IRQ,
8726 + .name = "sata base",
8727 + .start = ORION5X_SATA_PHYS_BASE,
8728 + .end = ORION5X_SATA_PHYS_BASE + 0x5000 - 1,
8729 + .flags = IORESOURCE_MEM,
8731 + .name = "sata irq",
8732 + .start = IRQ_ORION5X_SATA,
8733 + .end = IRQ_ORION5X_SATA,
8734 + .flags = IORESOURCE_IRQ,
8738 static struct platform_device orion5x_sata = {
8739 - .name = "sata_mv",
8741 + .name = "sata_mv",
8744 .coherent_dma_mask = 0xffffffff,
8746 - .num_resources = ARRAY_SIZE(orion5x_sata_resources),
8747 - .resource = orion5x_sata_resources,
8748 + .num_resources = ARRAY_SIZE(orion5x_sata_resources),
8749 + .resource = orion5x_sata_resources,
8752 void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data)
8753 @@ -309,23 +265,111 @@
8754 platform_device_register(&orion5x_sata);
8758 /*****************************************************************************
8761 + ****************************************************************************/
8762 +static struct plat_serial8250_port orion5x_uart0_data[] = {
8764 + .mapbase = UART0_PHYS_BASE,
8765 + .membase = (char *)UART0_VIRT_BASE,
8766 + .irq = IRQ_ORION5X_UART0,
8767 + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
8768 + .iotype = UPIO_MEM,
8770 + .uartclk = ORION5X_TCLK,
8775 +static struct resource orion5x_uart0_resources[] = {
8777 + .start = UART0_PHYS_BASE,
8778 + .end = UART0_PHYS_BASE + 0xff,
8779 + .flags = IORESOURCE_MEM,
8781 + .start = IRQ_ORION5X_UART0,
8782 + .end = IRQ_ORION5X_UART0,
8783 + .flags = IORESOURCE_IRQ,
8787 +static struct platform_device orion5x_uart0 = {
8788 + .name = "serial8250",
8789 + .id = PLAT8250_DEV_PLATFORM,
8791 + .platform_data = orion5x_uart0_data,
8793 + .resource = orion5x_uart0_resources,
8794 + .num_resources = ARRAY_SIZE(orion5x_uart0_resources),
8797 +void __init orion5x_uart0_init(void)
8799 + platform_device_register(&orion5x_uart0);
8803 +/*****************************************************************************
8805 ****************************************************************************/
8806 +static struct plat_serial8250_port orion5x_uart1_data[] = {
8808 + .mapbase = UART1_PHYS_BASE,
8809 + .membase = (char *)UART1_VIRT_BASE,
8810 + .irq = IRQ_ORION5X_UART1,
8811 + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
8812 + .iotype = UPIO_MEM,
8814 + .uartclk = ORION5X_TCLK,
8819 +static struct resource orion5x_uart1_resources[] = {
8821 + .start = UART1_PHYS_BASE,
8822 + .end = UART1_PHYS_BASE + 0xff,
8823 + .flags = IORESOURCE_MEM,
8825 + .start = IRQ_ORION5X_UART1,
8826 + .end = IRQ_ORION5X_UART1,
8827 + .flags = IORESOURCE_IRQ,
8831 +static struct platform_device orion5x_uart1 = {
8832 + .name = "serial8250",
8833 + .id = PLAT8250_DEV_PLATFORM1,
8835 + .platform_data = orion5x_uart1_data,
8837 + .resource = orion5x_uart1_resources,
8838 + .num_resources = ARRAY_SIZE(orion5x_uart1_resources),
8841 +void __init orion5x_uart1_init(void)
8843 + platform_device_register(&orion5x_uart1);
8847 +/*****************************************************************************
8849 + ****************************************************************************/
8850 static void orion5x_timer_init(void)
8852 orion_time_init(IRQ_ORION5X_BRIDGE, ORION5X_TCLK);
8855 struct sys_timer orion5x_timer = {
8856 - .init = orion5x_timer_init,
8857 + .init = orion5x_timer_init,
8861 /*****************************************************************************
8863 ****************************************************************************/
8866 * Identify device ID and rev from PCIe configuration header space '0'.
8868 @@ -350,8 +394,10 @@
8869 } else if (*dev == MV88F5181_DEV_ID) {
8870 if (*rev == MV88F5181_REV_B1) {
8871 *dev_name = "MV88F5181-Rev-B1";
8872 + } else if (*rev == MV88F5181L_REV_A1) {
8873 + *dev_name = "MV88F5181L-Rev-A1";
8875 - *dev_name = "MV88F5181-Rev-Unsupported";
8876 + *dev_name = "MV88F5181(L)-Rev-Unsupported";
8879 *dev_name = "Device-Unknown";
8880 @@ -370,15 +416,6 @@
8881 * Setup Orion address map
8883 orion5x_setup_cpu_mbus_bridge();
8886 - * Register devices.
8888 - platform_device_register(&orion5x_uart);
8889 - platform_device_register(&orion5x_ehci0);
8890 - if (dev == MV88F5182_DEV_ID)
8891 - platform_device_register(&orion5x_ehci1);
8892 - platform_device_register(&orion5x_i2c);
8896 --- a/arch/arm/mach-orion5x/common.h
8897 +++ b/arch/arm/mach-orion5x/common.h
8899 #ifndef __ARCH_ORION5X_COMMON_H
8900 #define __ARCH_ORION5X_COMMON_H
8902 +struct mv643xx_eth_platform_data;
8903 +struct mv_sata_platform_data;
8906 * Basic Orion init functions used early by machine-setup.
8909 void orion5x_map_io(void);
8910 void orion5x_init_irq(void);
8911 void orion5x_init(void);
8913 void orion5x_setup_dev2_win(u32 base, u32 size);
8914 void orion5x_setup_pcie_wa_win(u32 base, u32 size);
8916 +void orion5x_ehci0_init(void);
8917 +void orion5x_ehci1_init(void);
8918 +void orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data);
8919 +void orion5x_i2c_init(void);
8920 +void orion5x_sata_init(struct mv_sata_platform_data *sata_data);
8921 +void orion5x_uart0_init(void);
8922 +void orion5x_uart1_init(void);
8925 - * Shared code used internally by other Orion core functions.
8926 - * (/mach-orion/pci.c)
8927 + * PCIe/PCI functions.
8930 -struct pci_sys_data;
8932 +struct pci_sys_data;
8934 void orion5x_pcie_id(u32 *dev, u32 *rev);
8935 int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys);
8937 * Valid GPIO pins according to MPP setup, used by machine-setup.
8938 * (/mach-orion/gpio.c).
8941 -void orion5x_gpio_set_valid_pins(u32 pins);
8942 +void orion5x_gpio_set_valid(unsigned pin, int valid);
8943 void gpio_display(void); /* debug */
8946 - * Pull in Orion Ethernet platform_data, used by machine-setup
8949 -struct mv643xx_eth_platform_data;
8951 -void orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data);
8954 - * Orion Sata platform_data, used by machine-setup
8957 -struct mv_sata_platform_data;
8959 -void orion5x_sata_init(struct mv_sata_platform_data *sata_data);
8961 struct machine_desc;
8964 --- a/arch/arm/mach-orion5x/db88f5281-setup.c
8965 +++ b/arch/arm/mach-orion5x/db88f5281-setup.c
8967 #include <asm/arch/orion5x.h>
8968 #include <asm/plat-orion/orion_nand.h>
8972 /*****************************************************************************
8973 * DB-88F5281 on board devices
8975 .name = "physmap-flash",
8978 - .platform_data = &db88f5281_boot_flash_data,
8979 + .platform_data = &db88f5281_boot_flash_data,
8982 .resource = &db88f5281_boot_flash_resource,
8984 .name = "physmap-flash",
8987 - .platform_data = &db88f5281_nor_flash_data,
8988 + .platform_data = &db88f5281_nor_flash_data,
8991 .resource = &db88f5281_nor_flash_resource,
8992 @@ -125,18 +126,15 @@
9001 .size = (SZ_16M - SZ_2M),
9012 .offset = (SZ_16M + SZ_8M),
9015 ****************************************************************************/
9016 static struct mv643xx_eth_platform_data db88f5281_eth_data = {
9018 - .force_phy_addr = 1,
9021 /*****************************************************************************
9022 @@ -301,11 +298,28 @@
9023 /*****************************************************************************
9025 ****************************************************************************/
9027 -static struct platform_device *db88f5281_devs[] __initdata = {
9028 - &db88f5281_boot_flash,
9029 - &db88f5281_nor_flash,
9030 - &db88f5281_nand_flash,
9031 +static struct orion5x_mpp_mode db88f5281_mpp_modes[] __initdata = {
9032 + { 0, MPP_GPIO }, /* USB Over Current */
9033 + { 1, MPP_GPIO }, /* USB Vbat input */
9034 + { 2, MPP_PCI_ARB }, /* PCI_REQn[2] */
9035 + { 3, MPP_PCI_ARB }, /* PCI_GNTn[2] */
9036 + { 4, MPP_PCI_ARB }, /* PCI_REQn[3] */
9037 + { 5, MPP_PCI_ARB }, /* PCI_GNTn[3] */
9038 + { 6, MPP_GPIO }, /* JP0, CON17.2 */
9039 + { 7, MPP_GPIO }, /* JP1, CON17.1 */
9040 + { 8, MPP_GPIO }, /* JP2, CON11.2 */
9041 + { 9, MPP_GPIO }, /* JP3, CON11.3 */
9042 + { 10, MPP_GPIO }, /* RTC int */
9043 + { 11, MPP_GPIO }, /* Baud Rate Generator */
9044 + { 12, MPP_GPIO }, /* PCI int 1 */
9045 + { 13, MPP_GPIO }, /* PCI int 2 */
9046 + { 14, MPP_NAND }, /* NAND_REn[2] */
9047 + { 15, MPP_NAND }, /* NAND_WEn[2] */
9048 + { 16, MPP_UART }, /* UART1_RX */
9049 + { 17, MPP_UART }, /* UART1_TX */
9050 + { 18, MPP_UART }, /* UART1_CTSn */
9051 + { 19, MPP_UART }, /* UART1_RTSn */
9055 static void __init db88f5281_init(void)
9056 @@ -315,39 +329,31 @@
9060 + orion5x_mpp_conf(db88f5281_mpp_modes);
9061 + writel(0, MPP_DEV_CTRL); /* DEV_D[31:16] */
9064 - * Setup the CPU address decode windows for our on-board devices
9065 + * Configure peripherals.
9067 + orion5x_ehci0_init();
9068 + orion5x_eth_init(&db88f5281_eth_data);
9069 + orion5x_i2c_init();
9070 + orion5x_uart0_init();
9071 + orion5x_uart1_init();
9073 orion5x_setup_dev_boot_win(DB88F5281_NOR_BOOT_BASE,
9074 DB88F5281_NOR_BOOT_SIZE);
9075 + platform_device_register(&db88f5281_boot_flash);
9077 orion5x_setup_dev0_win(DB88F5281_7SEG_BASE, DB88F5281_7SEG_SIZE);
9078 - orion5x_setup_dev1_win(DB88F5281_NOR_BASE, DB88F5281_NOR_SIZE);
9079 - orion5x_setup_dev2_win(DB88F5281_NAND_BASE, DB88F5281_NAND_SIZE);
9082 - * Setup Multiplexing Pins:
9083 - * MPP0: GPIO (USB Over Current) MPP1: GPIO (USB Vbat input)
9084 - * MPP2: PCI_REQn[2] MPP3: PCI_GNTn[2]
9085 - * MPP4: PCI_REQn[3] MPP5: PCI_GNTn[3]
9086 - * MPP6: GPIO (JP0, CON17.2) MPP7: GPIO (JP1, CON17.1)
9087 - * MPP8: GPIO (JP2, CON11.2) MPP9: GPIO (JP3, CON11.3)
9088 - * MPP10: GPIO (RTC int) MPP11: GPIO (Baud Rate Generator)
9089 - * MPP12: GPIO (PCI int 1) MPP13: GPIO (PCI int 2)
9090 - * MPP14: NAND_REn[2] MPP15: NAND_WEn[2]
9091 - * MPP16: UART1_RX MPP17: UART1_TX
9092 - * MPP18: UART1_CTS MPP19: UART1_RTS
9093 - * MPP-DEV: DEV_D[16:31]
9095 - orion5x_write(MPP_0_7_CTRL, 0x00222203);
9096 - orion5x_write(MPP_8_15_CTRL, 0x44000000);
9097 - orion5x_write(MPP_16_19_CTRL, 0);
9098 - orion5x_write(MPP_DEV_CTRL, 0);
9099 + orion5x_setup_dev1_win(DB88F5281_NOR_BASE, DB88F5281_NOR_SIZE);
9100 + platform_device_register(&db88f5281_nor_flash);
9102 - orion5x_gpio_set_valid_pins(0x00003fc3);
9103 + orion5x_setup_dev2_win(DB88F5281_NAND_BASE, DB88F5281_NAND_SIZE);
9104 + platform_device_register(&db88f5281_nand_flash);
9106 - platform_add_devices(db88f5281_devs, ARRAY_SIZE(db88f5281_devs));
9107 i2c_register_board_info(0, &db88f5281_i2c_rtc, 1);
9108 - orion5x_eth_init(&db88f5281_eth_data);
9111 MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board")
9112 --- a/arch/arm/mach-orion5x/dns323-setup.c
9113 +++ b/arch/arm/mach-orion5x/dns323-setup.c
9115 #include <asm/mach/pci.h>
9116 #include <asm/arch/orion5x.h>
9120 #define DNS323_GPIO_LED_RIGHT_AMBER 1
9121 #define DNS323_GPIO_LED_LEFT_AMBER 2
9126 - pr_err("%s: requested mapping for unknown device\n", __func__);
9133 static struct mv643xx_eth_platform_data dns323_eth_data = {
9135 - .force_phy_addr = 1,
9138 /****************************************************************************
9142 .offset = 0x007d0000,
9147 static struct physmap_flash_data dns323_nor_flash_data = {
9149 static struct platform_device dns323_nor_flash = {
9150 .name = "physmap-flash",
9152 - .dev = { .platform_data = &dns323_nor_flash_data, },
9154 + .platform_data = &dns323_nor_flash_data,
9156 .resource = &dns323_nor_flash_resource,
9160 static struct platform_device dns323_gpio_leds = {
9161 .name = "leds-gpio",
9163 - .dev = { .platform_data = &dns323_led_data, },
9165 + .platform_data = &dns323_led_data,
9169 /****************************************************************************
9170 @@ -183,35 +185,53 @@
9171 .gpio = DNS323_GPIO_KEY_RESET,
9172 .desc = "Reset Button",
9178 .gpio = DNS323_GPIO_KEY_POWER,
9179 .desc = "Power Button",
9185 static struct gpio_keys_platform_data dns323_button_data = {
9186 .buttons = dns323_buttons,
9187 - .nbuttons = ARRAY_SIZE(dns323_buttons),
9188 + .nbuttons = ARRAY_SIZE(dns323_buttons),
9191 static struct platform_device dns323_button_device = {
9192 .name = "gpio-keys",
9195 - .dev = { .platform_data = &dns323_button_data, },
9197 + .platform_data = &dns323_button_data,
9201 /****************************************************************************
9205 -static struct platform_device *dns323_plat_devices[] __initdata = {
9206 - &dns323_nor_flash,
9207 - &dns323_gpio_leds,
9208 - &dns323_button_device,
9209 +static struct orion5x_mpp_mode dns323_mpp_modes[] __initdata = {
9210 + { 0, MPP_PCIE_RST_OUTn },
9211 + { 1, MPP_GPIO }, /* right amber LED (sata ch0) */
9212 + { 2, MPP_GPIO }, /* left amber LED (sata ch1) */
9213 + { 3, MPP_UNUSED },
9214 + { 4, MPP_GPIO }, /* power button LED */
9215 + { 5, MPP_GPIO }, /* power button LED */
9216 + { 6, MPP_GPIO }, /* GMT G751-2f overtemp */
9217 + { 7, MPP_GPIO }, /* M41T80 nIRQ/OUT/SQW */
9218 + { 8, MPP_GPIO }, /* triggers power off */
9219 + { 9, MPP_GPIO }, /* power button switch */
9220 + { 10, MPP_GPIO }, /* reset button switch */
9221 + { 11, MPP_UNUSED },
9222 + { 12, MPP_UNUSED },
9223 + { 13, MPP_UNUSED },
9224 + { 14, MPP_UNUSED },
9225 + { 15, MPP_UNUSED },
9226 + { 16, MPP_UNUSED },
9227 + { 17, MPP_UNUSED },
9228 + { 18, MPP_UNUSED },
9229 + { 19, MPP_UNUSED },
9234 @@ -225,17 +245,15 @@
9235 static struct i2c_board_info __initdata dns323_i2c_devices[] = {
9237 I2C_BOARD_INFO("g760a", 0x3e),
9240 /* this entry requires the new-style driver model lm75 driver,
9241 * for the meantime "insmod lm75.ko force_lm75=0,0x48" is needed */
9244 I2C_BOARD_INFO("g751", 0x48),
9249 I2C_BOARD_INFO("m41t80", 0x68),
9254 /* DNS-323 specific power off method */
9255 @@ -250,62 +268,35 @@
9256 /* Setup basic Orion functions. Need to be called early. */
9259 + orion5x_mpp_conf(dns323_mpp_modes);
9260 + writel(0, MPP_DEV_CTRL); /* DEV_D[31:16] */
9263 + * Configure peripherals.
9265 + orion5x_ehci0_init();
9266 + orion5x_eth_init(&dns323_eth_data);
9267 + orion5x_i2c_init();
9268 + orion5x_uart0_init();
9270 /* setup flash mapping
9271 * CS3 holds a 8 MB Spansion S29GL064M90TFIR4
9273 orion5x_setup_dev_boot_win(DNS323_NOR_BOOT_BASE, DNS323_NOR_BOOT_SIZE);
9274 + platform_device_register(&dns323_nor_flash);
9276 - /* DNS-323 has a Marvell 88X7042 SATA controller attached via PCIe
9278 - * Open a special address decode windows for the PCIe WA.
9280 - orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
9281 - ORION5X_PCIE_WA_SIZE);
9283 - /* set MPP to 0 as D-Link's 2.6.12.6 kernel did */
9284 - orion5x_write(MPP_0_7_CTRL, 0);
9285 - orion5x_write(MPP_8_15_CTRL, 0);
9286 - orion5x_write(MPP_16_19_CTRL, 0);
9287 - orion5x_write(MPP_DEV_CTRL, 0);
9289 - /* Define used GPIO pins
9293 - | 0 | | PEX_RST_OUT (not controlled by GPIO)
9294 - | 1 | Out | right amber LED (= sata ch0 LED) (low-active)
9295 - | 2 | Out | left amber LED (= sata ch1 LED) (low-active)
9296 - | 3 | Out | //unknown//
9297 - | 4 | Out | power button LED (low-active, together with pin #5)
9298 - | 5 | Out | power button LED (low-active, together with pin #4)
9299 - | 6 | In | GMT G751-2f overtemp. shutdown signal (low-active)
9300 - | 7 | In | M41T80 nIRQ/OUT/SQW signal
9301 - | 8 | Out | triggers power off (high-active)
9302 - | 9 | In | power button switch (low-active)
9303 - | 10 | In | reset button switch (low-active)
9304 - | 11 | Out | //unknown//
9305 - | 12 | Out | //unknown//
9306 - | 13 | Out | //unknown//
9307 - | 14 | Out | //unknown//
9308 - | 15 | Out | //unknown//
9310 - orion5x_gpio_set_valid_pins(0x07f6);
9312 - /* register dns323 specific power-off method */
9313 - if ((gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0)
9314 - || (gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0))
9315 - pr_err("DNS323: failed to setup power-off GPIO\n");
9317 - pm_power_off = dns323_power_off;
9318 + platform_device_register(&dns323_gpio_leds);
9320 - /* register flash and other platform devices */
9321 - platform_add_devices(dns323_plat_devices,
9322 - ARRAY_SIZE(dns323_plat_devices));
9323 + platform_device_register(&dns323_button_device);
9325 i2c_register_board_info(0, dns323_i2c_devices,
9326 ARRAY_SIZE(dns323_i2c_devices));
9328 - orion5x_eth_init(&dns323_eth_data);
9329 + /* register dns323 specific power-off method */
9330 + if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
9331 + gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
9332 + pr_err("DNS323: failed to setup power-off GPIO\n");
9333 + pm_power_off = dns323_power_off;
9336 /* Warning: D-Link uses a wrong mach-type (=526) in their bootloader */
9337 --- a/arch/arm/mach-orion5x/gpio.c
9338 +++ b/arch/arm/mach-orion5x/gpio.c
9340 static unsigned long gpio_valid[BITS_TO_LONGS(GPIO_MAX)];
9341 static const char *gpio_label[GPIO_MAX]; /* non null for allocated GPIOs */
9343 -void __init orion5x_gpio_set_valid_pins(u32 pins)
9344 +void __init orion5x_gpio_set_valid(unsigned pin, int valid)
9346 - gpio_valid[0] = pins;
9348 + __set_bit(pin, gpio_valid);
9350 + __clear_bit(pin, gpio_valid);
9356 int val, mask = 1 << pin;
9358 - if (orion5x_read(GPIO_IO_CONF) & mask)
9359 - val = orion5x_read(GPIO_DATA_IN) ^ orion5x_read(GPIO_IN_POL);
9360 + if (readl(GPIO_IO_CONF) & mask)
9361 + val = readl(GPIO_DATA_IN) ^ readl(GPIO_IN_POL);
9363 - val = orion5x_read(GPIO_OUT);
9364 + val = readl(GPIO_OUT);
9368 @@ -188,39 +191,39 @@
9369 printk("GPIO, free\n");
9371 printk("GPIO, used by %s, ", gpio_label[i]);
9372 - if (orion5x_read(GPIO_IO_CONF) & (1 << i)) {
9373 + if (readl(GPIO_IO_CONF) & (1 << i)) {
9374 printk("input, active %s, level %s, edge %s\n",
9375 - ((orion5x_read(GPIO_IN_POL) >> i) & 1) ? "low" : "high",
9376 - ((orion5x_read(GPIO_LEVEL_MASK) >> i) & 1) ? "enabled" : "masked",
9377 - ((orion5x_read(GPIO_EDGE_MASK) >> i) & 1) ? "enabled" : "masked");
9378 + ((readl(GPIO_IN_POL) >> i) & 1) ? "low" : "high",
9379 + ((readl(GPIO_LEVEL_MASK) >> i) & 1) ? "enabled" : "masked",
9380 + ((readl(GPIO_EDGE_MASK) >> i) & 1) ? "enabled" : "masked");
9382 - printk("output, val=%d\n", (orion5x_read(GPIO_OUT) >> i) & 1);
9383 + printk("output, val=%d\n", (readl(GPIO_OUT) >> i) & 1);
9388 printk(KERN_DEBUG "MPP_0_7_CTRL (0x%08x) = 0x%08x\n",
9389 - MPP_0_7_CTRL, orion5x_read(MPP_0_7_CTRL));
9390 + MPP_0_7_CTRL, readl(MPP_0_7_CTRL));
9391 printk(KERN_DEBUG "MPP_8_15_CTRL (0x%08x) = 0x%08x\n",
9392 - MPP_8_15_CTRL, orion5x_read(MPP_8_15_CTRL));
9393 + MPP_8_15_CTRL, readl(MPP_8_15_CTRL));
9394 printk(KERN_DEBUG "MPP_16_19_CTRL (0x%08x) = 0x%08x\n",
9395 - MPP_16_19_CTRL, orion5x_read(MPP_16_19_CTRL));
9396 + MPP_16_19_CTRL, readl(MPP_16_19_CTRL));
9397 printk(KERN_DEBUG "MPP_DEV_CTRL (0x%08x) = 0x%08x\n",
9398 - MPP_DEV_CTRL, orion5x_read(MPP_DEV_CTRL));
9399 + MPP_DEV_CTRL, readl(MPP_DEV_CTRL));
9400 printk(KERN_DEBUG "GPIO_OUT (0x%08x) = 0x%08x\n",
9401 - GPIO_OUT, orion5x_read(GPIO_OUT));
9402 + GPIO_OUT, readl(GPIO_OUT));
9403 printk(KERN_DEBUG "GPIO_IO_CONF (0x%08x) = 0x%08x\n",
9404 - GPIO_IO_CONF, orion5x_read(GPIO_IO_CONF));
9405 + GPIO_IO_CONF, readl(GPIO_IO_CONF));
9406 printk(KERN_DEBUG "GPIO_BLINK_EN (0x%08x) = 0x%08x\n",
9407 - GPIO_BLINK_EN, orion5x_read(GPIO_BLINK_EN));
9408 + GPIO_BLINK_EN, readl(GPIO_BLINK_EN));
9409 printk(KERN_DEBUG "GPIO_IN_POL (0x%08x) = 0x%08x\n",
9410 - GPIO_IN_POL, orion5x_read(GPIO_IN_POL));
9411 + GPIO_IN_POL, readl(GPIO_IN_POL));
9412 printk(KERN_DEBUG "GPIO_DATA_IN (0x%08x) = 0x%08x\n",
9413 - GPIO_DATA_IN, orion5x_read(GPIO_DATA_IN));
9414 + GPIO_DATA_IN, readl(GPIO_DATA_IN));
9415 printk(KERN_DEBUG "GPIO_LEVEL_MASK (0x%08x) = 0x%08x\n",
9416 - GPIO_LEVEL_MASK, orion5x_read(GPIO_LEVEL_MASK));
9417 + GPIO_LEVEL_MASK, readl(GPIO_LEVEL_MASK));
9418 printk(KERN_DEBUG "GPIO_EDGE_CAUSE (0x%08x) = 0x%08x\n",
9419 - GPIO_EDGE_CAUSE, orion5x_read(GPIO_EDGE_CAUSE));
9420 + GPIO_EDGE_CAUSE, readl(GPIO_EDGE_CAUSE));
9421 printk(KERN_DEBUG "GPIO_EDGE_MASK (0x%08x) = 0x%08x\n",
9422 - GPIO_EDGE_MASK, orion5x_read(GPIO_EDGE_MASK));
9423 + GPIO_EDGE_MASK, readl(GPIO_EDGE_MASK));
9425 --- a/arch/arm/mach-orion5x/irq.c
9426 +++ b/arch/arm/mach-orion5x/irq.c
9428 int pin = irq_to_gpio(irq);
9429 struct irq_desc *desc;
9431 - if ((orion5x_read(GPIO_IO_CONF) & (1 << pin)) == 0) {
9432 + if ((readl(GPIO_IO_CONF) & (1 << pin)) == 0) {
9433 printk(KERN_ERR "orion5x_gpio_set_irq_type failed "
9434 "(irq %d, pin %d).\n", irq, pin);
9438 * set initial polarity based on current input level
9440 - if ((orion5x_read(GPIO_IN_POL) ^ orion5x_read(GPIO_DATA_IN))
9441 + if ((readl(GPIO_IN_POL) ^ readl(GPIO_DATA_IN))
9443 orion5x_setbits(GPIO_IN_POL, (1 << pin)); /* falling */
9447 BUG_ON(irq < IRQ_ORION5X_GPIO_0_7 || irq > IRQ_ORION5X_GPIO_24_31);
9448 offs = (irq - IRQ_ORION5X_GPIO_0_7) * 8;
9449 - cause = (orion5x_read(GPIO_DATA_IN) & orion5x_read(GPIO_LEVEL_MASK)) |
9450 - (orion5x_read(GPIO_EDGE_CAUSE) & orion5x_read(GPIO_EDGE_MASK));
9451 + cause = (readl(GPIO_DATA_IN) & readl(GPIO_LEVEL_MASK)) |
9452 + (readl(GPIO_EDGE_CAUSE) & readl(GPIO_EDGE_MASK));
9454 for (pin = offs; pin < offs + 8; pin++) {
9455 if (cause & (1 << pin)) {
9457 desc = irq_desc + irq;
9458 if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQT_BOTHEDGE) {
9459 /* Swap polarity (race with GPIO line) */
9460 - u32 polarity = orion5x_read(GPIO_IN_POL);
9461 + u32 polarity = readl(GPIO_IN_POL);
9462 polarity ^= 1 << pin;
9463 - orion5x_write(GPIO_IN_POL, polarity);
9464 + writel(polarity, GPIO_IN_POL);
9466 desc_handle_irq(irq, desc);
9470 * Mask and clear GPIO IRQ interrupts
9472 - orion5x_write(GPIO_LEVEL_MASK, 0x0);
9473 - orion5x_write(GPIO_EDGE_MASK, 0x0);
9474 - orion5x_write(GPIO_EDGE_CAUSE, 0x0);
9475 + writel(0x0, GPIO_LEVEL_MASK);
9476 + writel(0x0, GPIO_EDGE_MASK);
9477 + writel(0x0, GPIO_EDGE_CAUSE);
9480 * Register chained level handlers for GPIO IRQs by default.
9481 --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c
9482 +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c
9484 #include <linux/platform_device.h>
9485 #include <linux/pci.h>
9486 #include <linux/irq.h>
9487 +#include <linux/delay.h>
9488 #include <linux/mtd/physmap.h>
9489 #include <linux/mtd/nand.h>
9490 #include <linux/mv643xx_eth.h>
9491 #include <linux/i2c.h>
9492 +#include <linux/serial_reg.h>
9493 #include <linux/ata_platform.h>
9494 #include <asm/mach-types.h>
9495 #include <asm/gpio.h>
9497 #include <asm/arch/orion5x.h>
9498 #include <asm/plat-orion/orion_nand.h>
9502 /*****************************************************************************
9518 .offset = SZ_4M + SZ_64M,
9519 .size = SZ_256M - (SZ_4M + SZ_64M),
9522 * PCI isn't used on the Kuro
9524 - printk(KERN_ERR "kurobox_pro_pci_map_irq failed, unknown bus\n");
9531 static struct mv643xx_eth_platform_data kurobox_pro_eth_data = {
9533 - .force_phy_addr = 1,
9536 /*****************************************************************************
9537 @@ -175,12 +173,169 @@
9539 ****************************************************************************/
9540 static struct mv_sata_platform_data kurobox_pro_sata_data = {
9545 /*****************************************************************************
9546 + * Kurobox Pro specific power off method via UART1-attached microcontroller
9547 + ****************************************************************************/
9549 +#define UART1_REG(x) (UART1_VIRT_BASE + ((UART_##x) << 2))
9551 +static int kurobox_pro_miconread(unsigned char *buf, int count)
9556 + for (i = 0; i < count; i++) {
9559 + while (!(readl(UART1_REG(LSR)) & UART_LSR_DR)) {
9560 + if (--timeout == 0)
9567 + buf[i] = readl(UART1_REG(RX));
9570 + /* return read bytes */
9574 +static int kurobox_pro_miconwrite(const unsigned char *buf, int count)
9579 + while (!(readl(UART1_REG(LSR)) & UART_LSR_THRE))
9581 + writel(buf[i++], UART1_REG(TX));
9587 +static int kurobox_pro_miconsend(const unsigned char *data, int count)
9590 + unsigned char checksum = 0;
9591 + unsigned char recv_buf[40];
9592 + unsigned char send_buf[40];
9593 + unsigned char correct_ack[3];
9596 + /* Generate checksum */
9597 + for (i = 0; i < count; i++)
9598 + checksum -= data[i];
9602 + kurobox_pro_miconwrite(data, count);
9604 + /* send checksum */
9605 + kurobox_pro_miconwrite(&checksum, 1);
9607 + if (kurobox_pro_miconread(recv_buf, sizeof(recv_buf)) <= 3) {
9608 + printk(KERN_ERR ">%s: receive failed.\n", __func__);
9610 + /* send preamble to clear the receive buffer */
9611 + memset(&send_buf, 0xff, sizeof(send_buf));
9612 + kurobox_pro_miconwrite(send_buf, sizeof(send_buf));
9614 + /* make dummy reads */
9616 + kurobox_pro_miconread(recv_buf, sizeof(recv_buf));
9618 + /* Generate expected ack */
9619 + correct_ack[0] = 0x01;
9620 + correct_ack[1] = data[1];
9621 + correct_ack[2] = 0x00;
9623 + /* checksum Check */
9624 + if ((recv_buf[0] + recv_buf[1] + recv_buf[2] +
9625 + recv_buf[3]) & 0xFF) {
9626 + printk(KERN_ERR ">%s: Checksum Error : "
9627 + "Received data[%02x, %02x, %02x, %02x]"
9628 + "\n", __func__, recv_buf[0],
9629 + recv_buf[1], recv_buf[2], recv_buf[3]);
9631 + /* Check Received Data */
9632 + if (correct_ack[0] == recv_buf[0] &&
9633 + correct_ack[1] == recv_buf[1] &&
9634 + correct_ack[2] == recv_buf[2]) {
9635 + /* Interval for next command */
9642 + /* Received NAK or illegal Data */
9643 + printk(KERN_ERR ">%s: Error : NAK or Illegal Data "
9644 + "Received\n", __func__);
9646 + } while (retry--);
9648 + /* Interval for next command */
9654 +static void kurobox_pro_power_off(void)
9656 + const unsigned char watchdogkill[] = {0x01, 0x35, 0x00};
9657 + const unsigned char shutdownwait[] = {0x00, 0x0c};
9658 + const unsigned char poweroff[] = {0x00, 0x06};
9659 + /* 38400 baud divisor */
9660 + const unsigned divisor = ((ORION5X_TCLK + (8 * 38400)) / (16 * 38400));
9662 + pr_info("%s: triggering power-off...\n", __func__);
9664 + /* hijack uart1 and reset into sane state (38400,8n1,even parity) */
9665 + writel(0x83, UART1_REG(LCR));
9666 + writel(divisor & 0xff, UART1_REG(DLL));
9667 + writel((divisor >> 8) & 0xff, UART1_REG(DLM));
9668 + writel(0x1b, UART1_REG(LCR));
9669 + writel(0x00, UART1_REG(IER));
9670 + writel(0x07, UART1_REG(FCR));
9671 + writel(0x00, UART1_REG(MCR));
9673 + /* Send the commands to shutdown the Kurobox Pro */
9674 + kurobox_pro_miconsend(watchdogkill, sizeof(watchdogkill)) ;
9675 + kurobox_pro_miconsend(shutdownwait, sizeof(shutdownwait)) ;
9676 + kurobox_pro_miconsend(poweroff, sizeof(poweroff));
9679 +/*****************************************************************************
9681 ****************************************************************************/
9682 +static struct orion5x_mpp_mode kurobox_pro_mpp_modes[] __initdata = {
9683 + { 0, MPP_UNUSED },
9684 + { 1, MPP_UNUSED },
9685 + { 2, MPP_GPIO }, /* GPIO Micon */
9686 + { 3, MPP_GPIO }, /* GPIO Rtc */
9687 + { 4, MPP_UNUSED },
9688 + { 5, MPP_UNUSED },
9689 + { 6, MPP_NAND }, /* NAND Flash REn */
9690 + { 7, MPP_NAND }, /* NAND Flash WEn */
9691 + { 8, MPP_UNUSED },
9692 + { 9, MPP_UNUSED },
9693 + { 10, MPP_UNUSED },
9694 + { 11, MPP_UNUSED },
9695 + { 12, MPP_SATA_LED }, /* SATA 0 presence */
9696 + { 13, MPP_SATA_LED }, /* SATA 1 presence */
9697 + { 14, MPP_SATA_LED }, /* SATA 0 active */
9698 + { 15, MPP_SATA_LED }, /* SATA 1 active */
9699 + { 16, MPP_UART }, /* UART1 RXD */
9700 + { 17, MPP_UART }, /* UART1 TXD */
9701 + { 18, MPP_UART }, /* UART1 CTSn */
9702 + { 19, MPP_UART }, /* UART1 RTSn */
9706 static void __init kurobox_pro_init(void)
9708 @@ -189,46 +344,32 @@
9713 - * Setup the CPU address decode windows for our devices
9715 - orion5x_setup_dev_boot_win(KUROBOX_PRO_NOR_BOOT_BASE,
9716 - KUROBOX_PRO_NOR_BOOT_SIZE);
9717 - orion5x_setup_dev0_win(KUROBOX_PRO_NAND_BASE, KUROBOX_PRO_NAND_SIZE);
9718 + orion5x_mpp_conf(kurobox_pro_mpp_modes);
9721 - * Open a special address decode windows for the PCIe WA.
9722 + * Configure peripherals.
9724 - orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
9725 - ORION5X_PCIE_WA_SIZE);
9728 - * Setup Multiplexing Pins --
9729 - * MPP[0-1] Not used
9730 - * MPP[2] GPIO Micon
9732 - * MPP[4-5] Not used
9733 - * MPP[6] Nand Flash REn
9734 - * MPP[7] Nand Flash WEn
9735 - * MPP[8-11] Not used
9736 - * MPP[12] SATA 0 presence Indication
9737 - * MPP[13] SATA 1 presence Indication
9738 - * MPP[14] SATA 0 active Indication
9739 - * MPP[15] SATA 1 active indication
9740 - * MPP[16-19] Not used
9742 - orion5x_write(MPP_0_7_CTRL, 0x44220003);
9743 - orion5x_write(MPP_8_15_CTRL, 0x55550000);
9744 - orion5x_write(MPP_16_19_CTRL, 0x0);
9746 - orion5x_gpio_set_valid_pins(0x0000000c);
9747 + orion5x_ehci0_init();
9748 + orion5x_ehci1_init();
9749 + orion5x_eth_init(&kurobox_pro_eth_data);
9750 + orion5x_i2c_init();
9751 + orion5x_sata_init(&kurobox_pro_sata_data);
9752 + orion5x_uart0_init();
9754 + orion5x_setup_dev_boot_win(KUROBOX_PRO_NOR_BOOT_BASE,
9755 + KUROBOX_PRO_NOR_BOOT_SIZE);
9756 platform_device_register(&kurobox_pro_nor_flash);
9757 - if (machine_is_kurobox_pro())
9759 + if (machine_is_kurobox_pro()) {
9760 + orion5x_setup_dev0_win(KUROBOX_PRO_NAND_BASE,
9761 + KUROBOX_PRO_NAND_SIZE);
9762 platform_device_register(&kurobox_pro_nand_flash);
9765 i2c_register_board_info(0, &kurobox_pro_i2c_rtc, 1);
9766 - orion5x_eth_init(&kurobox_pro_eth_data);
9767 - orion5x_sata_init(&kurobox_pro_sata_data);
9769 + /* register Kurobox Pro specific power-off method */
9770 + pm_power_off = kurobox_pro_power_off;
9773 #ifdef CONFIG_MACH_KUROBOX_PRO
9775 +++ b/arch/arm/mach-orion5x/mpp.c
9778 + * arch/arm/mach-orion5x/mpp.c
9780 + * MPP functions for Marvell Orion 5x SoCs
9782 + * This file is licensed under the terms of the GNU General Public
9783 + * License version 2. This program is licensed "as is" without any
9784 + * warranty of any kind, whether express or implied.
9787 +#include <linux/kernel.h>
9788 +#include <linux/init.h>
9789 +#include <linux/mbus.h>
9790 +#include <asm/hardware.h>
9791 +#include <asm/io.h>
9792 +#include "common.h"
9795 +static int is_5181l(void)
9800 + orion5x_pcie_id(&dev, &rev);
9802 + return !!(dev == MV88F5181_DEV_ID && rev >= MV88F5181L_REV_A0);
9805 +static int is_5182(void)
9810 + orion5x_pcie_id(&dev, &rev);
9812 + return !!(dev == MV88F5182_DEV_ID);
9815 +static int is_5281(void)
9820 + orion5x_pcie_id(&dev, &rev);
9822 + return !!(dev == MV88F5281_DEV_ID);
9825 +static int __init determine_type_encoding(int mpp, enum orion5x_mpp_type type)
9832 + if (mpp >= 1 && mpp <= 15)
9834 + if (mpp >= 16 && mpp <= 19) {
9837 + if (type == MPP_UNUSED)
9842 + case MPP_PCIE_RST_OUTn:
9848 + if (mpp >= 0 && mpp <= 7)
9852 + case MPP_PCI_PMEn:
9858 + if (mpp >= 8 && mpp <= 19)
9863 + if (is_5182() || is_5281()) {
9864 + if (mpp >= 4 && mpp <= 7)
9866 + if (mpp >= 12 && mpp <= 17)
9872 + if (is_5181l() && mpp >= 6 && mpp <= 7)
9876 + case MPP_SATA_LED:
9878 + if (mpp >= 4 && mpp <= 7)
9880 + if (mpp >= 12 && mpp <= 15)
9886 + if (mpp >= 16 && mpp <= 19)
9891 + printk(KERN_INFO "unknown MPP type %d\n", type);
9896 +void __init orion5x_mpp_conf(struct orion5x_mpp_mode *mode)
9898 + u32 mpp_0_7_ctrl = readl(MPP_0_7_CTRL);
9899 + u32 mpp_8_15_ctrl = readl(MPP_8_15_CTRL);
9900 + u32 mpp_16_19_ctrl = readl(MPP_16_19_CTRL);
9902 + while (mode->mpp >= 0) {
9907 + if (mode->mpp >= 0 && mode->mpp <= 7)
9908 + reg = &mpp_0_7_ctrl;
9909 + else if (mode->mpp >= 8 && mode->mpp <= 15)
9910 + reg = &mpp_8_15_ctrl;
9911 + else if (mode->mpp >= 16 && mode->mpp <= 19)
9912 + reg = &mpp_16_19_ctrl;
9914 + printk(KERN_ERR "orion5x_mpp_conf: invalid MPP "
9915 + "(%d)\n", mode->mpp);
9919 + num_type = determine_type_encoding(mode->mpp, mode->type);
9920 + if (num_type < 0) {
9921 + printk(KERN_ERR "orion5x_mpp_conf: invalid MPP "
9922 + "combination (%d, %d)\n", mode->mpp,
9927 + shift = (mode->mpp & 7) << 2;
9928 + *reg &= ~(0xf << shift);
9929 + *reg |= (num_type & 0xf) << shift;
9931 + orion5x_gpio_set_valid(mode->mpp, !!(mode->type == MPP_GPIO));
9936 + writel(mpp_0_7_ctrl, MPP_0_7_CTRL);
9937 + writel(mpp_8_15_ctrl, MPP_8_15_CTRL);
9938 + writel(mpp_16_19_ctrl, MPP_16_19_CTRL);
9941 +++ b/arch/arm/mach-orion5x/mpp.h
9943 +#ifndef __ARCH_ORION5X_MPP_H
9944 +#define __ARCH_ORION5X_MPP_H
9946 +enum orion5x_mpp_type {
9948 + * This MPP is unused.
9953 + * This MPP pin is used as a generic GPIO pin. Valid for
9954 + * MPPs 0-15 and device bus data pins 16-31. On 5182, also
9955 + * valid for MPPs 16-19.
9960 + * This MPP is used as PCIe_RST_OUTn pin. Valid for
9963 + MPP_PCIE_RST_OUTn,
9966 + * This MPP is used as PCI arbiter pin (REQn/GNTn).
9967 + * Valid for MPPs 0-7 only.
9972 + * This MPP is used as PCI_PMEn pin. Valid for MPP 2 only.
9977 + * This MPP is used as GigE half-duplex (COL, CRS) or GMII
9978 + * (RXERR, CRS, TXERR, TXD[7:4], RXD[7:4]) pin. Valid for
9984 + * This MPP is used as NAND REn/WEn pin. Valid for MPPs
9985 + * 4-7 and 12-17 only, and only on the 5181l/5182/5281.
9990 + * This MPP is used as a PCI clock output pin. Valid for
9991 + * MPPs 6-7 only, and only on the 5181l.
9996 + * This MPP is used as a SATA presence/activity LED.
9997 + * Valid for MPPs 4-7 and 12-15 only, and only on the 5182.
10002 + * This MPP is used as UART1 RXD/TXD/CTSn/RTSn pin.
10003 + * Valid for MPPs 16-19 only.
10008 +struct orion5x_mpp_mode {
10010 + enum orion5x_mpp_type type;
10013 +void orion5x_mpp_conf(struct orion5x_mpp_mode *mode);
10018 +++ b/arch/arm/mach-orion5x/mss2-setup.c
10021 + * Maxtor Shared Storage II Board Setup
10023 + * Maintainer: Sylver Bruneau <sylver.bruneau@googlemail.com>
10025 + * This program is free software; you can redistribute it and/or
10026 + * modify it under the terms of the GNU General Public License
10027 + * as published by the Free Software Foundation; either version
10028 + * 2 of the License, or (at your option) any later version.
10031 +#include <linux/kernel.h>
10032 +#include <linux/init.h>
10033 +#include <linux/platform_device.h>
10034 +#include <linux/pci.h>
10035 +#include <linux/irq.h>
10036 +#include <linux/mtd/physmap.h>
10037 +#include <linux/mv643xx_eth.h>
10038 +#include <linux/leds.h>
10039 +#include <linux/gpio_keys.h>
10040 +#include <linux/input.h>
10041 +#include <linux/i2c.h>
10042 +#include <linux/ata_platform.h>
10043 +#include <linux/gpio.h>
10044 +#include <asm/mach-types.h>
10045 +#include <asm/mach/arch.h>
10046 +#include <asm/mach/pci.h>
10047 +#include <asm/arch/orion5x.h>
10048 +#include "common.h"
10051 +#define MSS2_NOR_BOOT_BASE 0xff800000
10052 +#define MSS2_NOR_BOOT_SIZE SZ_256K
10054 +/*****************************************************************************
10055 + * Maxtor Shared Storage II Info
10056 + ****************************************************************************/
10059 + * Maxtor Shared Storage II hardware :
10060 + * - Marvell 88F5182-A2 C500
10061 + * - Marvell 88E1111 Gigabit Ethernet PHY
10062 + * - RTC M41T81 (@0x68) on I2C bus
10063 + * - 256KB NOR flash
10067 +/*****************************************************************************
10068 + * 256KB NOR Flash on BOOT Device
10069 + ****************************************************************************/
10071 +static struct physmap_flash_data mss2_nor_flash_data = {
10075 +static struct resource mss2_nor_flash_resource = {
10076 + .flags = IORESOURCE_MEM,
10077 + .start = MSS2_NOR_BOOT_BASE,
10078 + .end = MSS2_NOR_BOOT_BASE + MSS2_NOR_BOOT_SIZE - 1,
10081 +static struct platform_device mss2_nor_flash = {
10082 + .name = "physmap-flash",
10085 + .platform_data = &mss2_nor_flash_data,
10087 + .resource = &mss2_nor_flash_resource,
10088 + .num_resources = 1,
10091 +/****************************************************************************
10093 + ****************************************************************************/
10094 +static int __init mss2_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
10099 + * Check for devices with hard-wired IRQs.
10101 + irq = orion5x_pci_map_irq(dev, slot, pin);
10108 +static struct hw_pci mss2_pci __initdata = {
10109 + .nr_controllers = 2,
10110 + .swizzle = pci_std_swizzle,
10111 + .setup = orion5x_pci_sys_setup,
10112 + .scan = orion5x_pci_sys_scan_bus,
10113 + .map_irq = mss2_pci_map_irq,
10116 +static int __init mss2_pci_init(void)
10118 + if (machine_is_mss2())
10119 + pci_common_init(&mss2_pci);
10123 +subsys_initcall(mss2_pci_init);
10126 +/*****************************************************************************
10128 + ****************************************************************************/
10130 +static struct mv643xx_eth_platform_data mss2_eth_data = {
10134 +/*****************************************************************************
10136 + ****************************************************************************/
10138 +static struct mv_sata_platform_data mss2_sata_data = {
10142 +/*****************************************************************************
10144 + ****************************************************************************/
10146 +#define MSS2_GPIO_KEY_RESET 12
10147 +#define MSS2_GPIO_KEY_POWER 11
10149 +static struct gpio_keys_button mss2_buttons[] = {
10151 + .code = KEY_POWER,
10152 + .gpio = MSS2_GPIO_KEY_POWER,
10156 + .code = KEY_RESTART,
10157 + .gpio = MSS2_GPIO_KEY_RESET,
10163 +static struct gpio_keys_platform_data mss2_button_data = {
10164 + .buttons = mss2_buttons,
10165 + .nbuttons = ARRAY_SIZE(mss2_buttons),
10168 +static struct platform_device mss2_button_device = {
10169 + .name = "gpio-keys",
10172 + .platform_data = &mss2_button_data,
10176 +/*****************************************************************************
10177 + * RTC m41t81 on I2C bus
10178 + ****************************************************************************/
10180 +#define MSS2_GPIO_RTC_IRQ 3
10182 +static struct i2c_board_info __initdata mss2_i2c_rtc = {
10183 + I2C_BOARD_INFO("m41t81", 0x68),
10186 +/*****************************************************************************
10187 + * MSS2 power off method
10188 + ****************************************************************************/
10190 + * On the Maxtor Shared Storage II, the shutdown process is the following :
10191 + * - Userland modifies U-boot env to tell U-boot to go idle at next boot
10192 + * - The board reboots
10193 + * - U-boot starts and go into an idle mode until the user press "power"
10195 +static void mss2_power_off(void)
10200 + * Enable and issue soft reset
10202 + reg = readl(CPU_RESET_MASK);
10204 + writel(reg, CPU_RESET_MASK);
10206 + reg = readl(CPU_SOFT_RESET);
10208 + writel(reg, CPU_SOFT_RESET);
10211 +/****************************************************************************
10213 + ****************************************************************************/
10214 +static struct orion5x_mpp_mode mss2_mpp_modes[] __initdata = {
10215 + { 0, MPP_GPIO }, /* Power LED */
10216 + { 1, MPP_GPIO }, /* Error LED */
10217 + { 2, MPP_UNUSED },
10218 + { 3, MPP_GPIO }, /* RTC interrupt */
10219 + { 4, MPP_GPIO }, /* HDD ind. (Single/Dual)*/
10220 + { 5, MPP_GPIO }, /* HD0 5V control */
10221 + { 6, MPP_GPIO }, /* HD0 12V control */
10222 + { 7, MPP_GPIO }, /* HD1 5V control */
10223 + { 8, MPP_GPIO }, /* HD1 12V control */
10224 + { 9, MPP_UNUSED },
10225 + { 10, MPP_GPIO }, /* Fan control */
10226 + { 11, MPP_GPIO }, /* Power button */
10227 + { 12, MPP_GPIO }, /* Reset button */
10228 + { 13, MPP_UNUSED },
10229 + { 14, MPP_SATA_LED }, /* SATA 0 active */
10230 + { 15, MPP_SATA_LED }, /* SATA 1 active */
10231 + { 16, MPP_UNUSED },
10232 + { 17, MPP_UNUSED },
10233 + { 18, MPP_UNUSED },
10234 + { 19, MPP_UNUSED },
10238 +static void __init mss2_init(void)
10240 + /* Setup basic Orion functions. Need to be called early. */
10243 + orion5x_mpp_conf(mss2_mpp_modes);
10247 + * MPP[21] PCI clock
10248 + * MPP[22] USB 0 over current
10249 + * MPP[23] USB 1 over current
10253 + * Configure peripherals.
10255 + orion5x_ehci0_init();
10256 + orion5x_ehci1_init();
10257 + orion5x_eth_init(&mss2_eth_data);
10258 + orion5x_i2c_init();
10259 + orion5x_sata_init(&mss2_sata_data);
10260 + orion5x_uart0_init();
10262 + orion5x_setup_dev_boot_win(MSS2_NOR_BOOT_BASE, MSS2_NOR_BOOT_SIZE);
10263 + platform_device_register(&mss2_nor_flash);
10265 + platform_device_register(&mss2_button_device);
10267 + if (gpio_request(MSS2_GPIO_RTC_IRQ, "rtc") == 0) {
10268 + if (gpio_direction_input(MSS2_GPIO_RTC_IRQ) == 0)
10269 + mss2_i2c_rtc.irq = gpio_to_irq(MSS2_GPIO_RTC_IRQ);
10271 + gpio_free(MSS2_GPIO_RTC_IRQ);
10273 + i2c_register_board_info(0, &mss2_i2c_rtc, 1);
10275 + /* register mss2 specific power-off method */
10276 + pm_power_off = mss2_power_off;
10279 +MACHINE_START(MSS2, "Maxtor Shared Storage II")
10280 + /* Maintainer: Sylver Bruneau <sylver.bruneau@googlemail.com> */
10281 + .phys_io = ORION5X_REGS_PHYS_BASE,
10282 + .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
10283 + .boot_params = 0x00000100,
10284 + .init_machine = mss2_init,
10285 + .map_io = orion5x_map_io,
10286 + .init_irq = orion5x_init_irq,
10287 + .timer = &orion5x_timer,
10288 + .fixup = tag_fixup_mem32
10291 +++ b/arch/arm/mach-orion5x/mv2120-setup.c
10294 + * Copyright (C) 2007 Herbert Valerio Riedel <hvr@gnu.org>
10295 + * Copyright (C) 2008 Martin Michlmayr <tbm@cyrius.com>
10297 + * This program is free software; you can redistribute it and/or modify
10298 + * it under the terms of the GNU Lesser General Public License as
10299 + * published by the Free Software Foundation; either version 2 of the
10300 + * License, or (at your option) any later version.
10303 +#include <linux/kernel.h>
10304 +#include <linux/init.h>
10305 +#include <linux/platform_device.h>
10306 +#include <linux/irq.h>
10307 +#include <linux/mtd/physmap.h>
10308 +#include <linux/mv643xx_eth.h>
10309 +#include <linux/leds.h>
10310 +#include <linux/gpio_keys.h>
10311 +#include <linux/input.h>
10312 +#include <linux/i2c.h>
10313 +#include <linux/ata_platform.h>
10314 +#include <asm/mach-types.h>
10315 +#include <asm/gpio.h>
10316 +#include <asm/mach/arch.h>
10317 +#include <asm/arch/orion5x.h>
10318 +#include "common.h"
10321 +#define MV2120_NOR_BOOT_BASE 0xf4000000
10322 +#define MV2120_NOR_BOOT_SIZE SZ_512K
10324 +#define MV2120_GPIO_RTC_IRQ 3
10325 +#define MV2120_GPIO_KEY_RESET 17
10326 +#define MV2120_GPIO_KEY_POWER 18
10327 +#define MV2120_GPIO_POWER_OFF 19
10330 +/*****************************************************************************
10332 + ****************************************************************************/
10333 +static struct mv643xx_eth_platform_data mv2120_eth_data = {
10337 +static struct mv_sata_platform_data mv2120_sata_data = {
10341 +static struct mtd_partition mv2120_partitions[] = {
10343 + .name = "firmware",
10344 + .size = 0x00080000,
10349 +static struct physmap_flash_data mv2120_nor_flash_data = {
10351 + .parts = mv2120_partitions,
10352 + .nr_parts = ARRAY_SIZE(mv2120_partitions)
10355 +static struct resource mv2120_nor_flash_resource = {
10356 + .flags = IORESOURCE_MEM,
10357 + .start = MV2120_NOR_BOOT_BASE,
10358 + .end = MV2120_NOR_BOOT_BASE + MV2120_NOR_BOOT_SIZE - 1,
10361 +static struct platform_device mv2120_nor_flash = {
10362 + .name = "physmap-flash",
10365 + .platform_data = &mv2120_nor_flash_data,
10367 + .resource = &mv2120_nor_flash_resource,
10368 + .num_resources = 1,
10371 +static struct gpio_keys_button mv2120_buttons[] = {
10373 + .code = KEY_RESTART,
10374 + .gpio = MV2120_GPIO_KEY_RESET,
10378 + .code = KEY_POWER,
10379 + .gpio = MV2120_GPIO_KEY_POWER,
10385 +static struct gpio_keys_platform_data mv2120_button_data = {
10386 + .buttons = mv2120_buttons,
10387 + .nbuttons = ARRAY_SIZE(mv2120_buttons),
10390 +static struct platform_device mv2120_button_device = {
10391 + .name = "gpio-keys",
10393 + .num_resources = 0,
10395 + .platform_data = &mv2120_button_data,
10400 +/****************************************************************************
10402 + ****************************************************************************/
10403 +static struct orion5x_mpp_mode mv2120_mpp_modes[] __initdata = {
10404 + { 0, MPP_GPIO }, /* Sys status LED */
10405 + { 1, MPP_GPIO }, /* Sys error LED */
10406 + { 2, MPP_GPIO }, /* OverTemp interrupt */
10407 + { 3, MPP_GPIO }, /* RTC interrupt */
10408 + { 4, MPP_GPIO }, /* V_LED 5V */
10409 + { 5, MPP_GPIO }, /* V_LED 3.3V */
10410 + { 6, MPP_UNUSED },
10411 + { 7, MPP_UNUSED },
10412 + { 8, MPP_GPIO }, /* SATA 0 fail LED */
10413 + { 9, MPP_GPIO }, /* SATA 1 fail LED */
10414 + { 10, MPP_UNUSED },
10415 + { 11, MPP_UNUSED },
10416 + { 12, MPP_SATA_LED }, /* SATA 0 presence */
10417 + { 13, MPP_SATA_LED }, /* SATA 1 presence */
10418 + { 14, MPP_SATA_LED }, /* SATA 0 active */
10419 + { 15, MPP_SATA_LED }, /* SATA 1 active */
10420 + { 16, MPP_UNUSED },
10421 + { 17, MPP_GPIO }, /* Reset button */
10422 + { 18, MPP_GPIO }, /* Power button */
10423 + { 19, MPP_GPIO }, /* Power off */
10427 +static struct i2c_board_info __initdata mv2120_i2c_rtc = {
10428 + I2C_BOARD_INFO("rtc-pcf8563", 0x51),
10432 +static void mv2120_power_off(void)
10434 + pr_info("%s: triggering power-off...\n", __func__);
10435 + gpio_set_value(MV2120_GPIO_POWER_OFF, 0);
10438 +static void __init mv2120_init(void)
10440 + /* Setup basic Orion functions. Need to be called early. */
10443 + orion5x_mpp_conf(mv2120_mpp_modes);
10446 + * Configure peripherals.
10448 + orion5x_ehci0_init();
10449 + orion5x_ehci1_init();
10450 + orion5x_eth_init(&mv2120_eth_data);
10451 + orion5x_i2c_init();
10452 + orion5x_sata_init(&mv2120_sata_data);
10453 + orion5x_uart0_init();
10455 + orion5x_setup_dev_boot_win(MV2120_NOR_BOOT_BASE, MV2120_NOR_BOOT_SIZE);
10456 + platform_device_register(&mv2120_nor_flash);
10458 + platform_device_register(&mv2120_button_device);
10460 + if (gpio_request(MV2120_GPIO_RTC_IRQ, "rtc") == 0) {
10461 + if (gpio_direction_input(MV2120_GPIO_RTC_IRQ) == 0)
10462 + mv2120_i2c_rtc.irq = gpio_to_irq(MV2120_GPIO_RTC_IRQ);
10464 + gpio_free(MV2120_GPIO_RTC_IRQ);
10466 + i2c_register_board_info(0, &mv2120_i2c_rtc, 1);
10468 + /* register mv2120 specific power-off method */
10469 + if (gpio_request(MV2120_GPIO_POWER_OFF, "POWEROFF") != 0 ||
10470 + gpio_direction_output(MV2120_GPIO_POWER_OFF, 1) != 0)
10471 + pr_err("mv2120: failed to setup power-off GPIO\n");
10472 + pm_power_off = mv2120_power_off;
10475 +/* Warning: HP uses a wrong mach-type (=526) in their bootloader */
10476 +MACHINE_START(MV2120, "HP Media Vault mv2120")
10477 + /* Maintainer: Martin Michlmayr <tbm@cyrius.com> */
10478 + .phys_io = ORION5X_REGS_PHYS_BASE,
10479 + .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
10480 + .boot_params = 0x00000100,
10481 + .init_machine = mv2120_init,
10482 + .map_io = orion5x_map_io,
10483 + .init_irq = orion5x_init_irq,
10484 + .timer = &orion5x_timer,
10485 + .fixup = tag_fixup_mem32
10487 --- a/arch/arm/mach-orion5x/pci.c
10488 +++ b/arch/arm/mach-orion5x/pci.c
10489 @@ -152,6 +152,8 @@
10490 if (dev == MV88F5181_DEV_ID || dev == MV88F5182_DEV_ID) {
10491 printk(KERN_NOTICE "Applying Orion-1/Orion-NAS PCIe config "
10492 "read transaction workaround\n");
10493 + orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
10494 + ORION5X_PCIE_WA_SIZE);
10495 pcie_ops.read = pcie_rd_conf_wa;
10498 @@ -240,13 +242,13 @@
10499 * PCI Address Decode Windows registers
10501 #define PCI_BAR_SIZE_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc08) : \
10502 - ((n) == 1) ? ORION5X_PCI_REG(0xd08) : \
10503 - ((n) == 2) ? ORION5X_PCI_REG(0xc0c) : \
10504 - ((n) == 3) ? ORION5X_PCI_REG(0xd0c) : 0)
10505 -#define PCI_BAR_REMAP_DDR_CS(n) (((n) ==0) ? ORION5X_PCI_REG(0xc48) : \
10506 - ((n) == 1) ? ORION5X_PCI_REG(0xd48) : \
10507 - ((n) == 2) ? ORION5X_PCI_REG(0xc4c) : \
10508 - ((n) == 3) ? ORION5X_PCI_REG(0xd4c) : 0)
10509 + ((n) == 1) ? ORION5X_PCI_REG(0xd08) : \
10510 + ((n) == 2) ? ORION5X_PCI_REG(0xc0c) : \
10511 + ((n) == 3) ? ORION5X_PCI_REG(0xd0c) : 0)
10512 +#define PCI_BAR_REMAP_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc48) : \
10513 + ((n) == 1) ? ORION5X_PCI_REG(0xd48) : \
10514 + ((n) == 2) ? ORION5X_PCI_REG(0xc4c) : \
10515 + ((n) == 3) ? ORION5X_PCI_REG(0xd4c) : 0)
10516 #define PCI_BAR_ENABLE ORION5X_PCI_REG(0xc3c)
10517 #define PCI_ADDR_DECODE_CTRL ORION5X_PCI_REG(0xd3c)
10519 @@ -266,7 +268,7 @@
10521 static int orion5x_pci_local_bus_nr(void)
10523 - u32 conf = orion5x_read(PCI_P2P_CONF);
10524 + u32 conf = readl(PCI_P2P_CONF);
10525 return((conf & PCI_P2P_BUS_MASK) >> PCI_P2P_BUS_OFFS);
10528 @@ -276,11 +278,11 @@
10529 unsigned long flags;
10530 spin_lock_irqsave(&orion5x_pci_lock, flags);
10532 - orion5x_write(PCI_CONF_ADDR, PCI_CONF_BUS(bus) |
10533 - PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
10534 - PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN);
10535 + writel(PCI_CONF_BUS(bus) |
10536 + PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
10537 + PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN, PCI_CONF_ADDR);
10539 - *val = orion5x_read(PCI_CONF_DATA);
10540 + *val = readl(PCI_CONF_DATA);
10543 *val = (*val >> (8*(where & 0x3))) & 0xff;
10544 @@ -300,9 +302,9 @@
10546 spin_lock_irqsave(&orion5x_pci_lock, flags);
10548 - orion5x_write(PCI_CONF_ADDR, PCI_CONF_BUS(bus) |
10549 - PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
10550 - PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN);
10551 + writel(PCI_CONF_BUS(bus) |
10552 + PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
10553 + PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN, PCI_CONF_ADDR);
10556 __raw_writel(val, PCI_CONF_DATA);
10557 @@ -353,9 +355,9 @@
10559 static void __init orion5x_pci_set_bus_nr(int nr)
10561 - u32 p2p = orion5x_read(PCI_P2P_CONF);
10562 + u32 p2p = readl(PCI_P2P_CONF);
10564 - if (orion5x_read(PCI_MODE) & PCI_MODE_PCIX) {
10565 + if (readl(PCI_MODE) & PCI_MODE_PCIX) {
10569 @@ -372,7 +374,7 @@
10571 p2p &= ~PCI_P2P_BUS_MASK;
10572 p2p |= (nr << PCI_P2P_BUS_OFFS);
10573 - orion5x_write(PCI_P2P_CONF, p2p);
10574 + writel(p2p, PCI_P2P_CONF);
10578 @@ -399,7 +401,7 @@
10579 * First, disable windows.
10581 win_enable = 0xffffffff;
10582 - orion5x_write(PCI_BAR_ENABLE, win_enable);
10583 + writel(win_enable, PCI_BAR_ENABLE);
10586 * Setup windows for DDR banks.
10587 @@ -425,10 +427,10 @@
10589 reg = PCI_CONF_REG_BAR_HI_CS(cs->cs_index);
10590 orion5x_pci_hw_wr_conf(bus, 0, func, reg, 4, 0);
10591 - orion5x_write(PCI_BAR_SIZE_DDR_CS(cs->cs_index),
10592 - (cs->size - 1) & 0xfffff000);
10593 - orion5x_write(PCI_BAR_REMAP_DDR_CS(cs->cs_index),
10594 - cs->base & 0xfffff000);
10595 + writel((cs->size - 1) & 0xfffff000,
10596 + PCI_BAR_SIZE_DDR_CS(cs->cs_index));
10597 + writel(cs->base & 0xfffff000,
10598 + PCI_BAR_REMAP_DDR_CS(cs->cs_index));
10601 * Enable decode window for this chip select.
10602 @@ -439,7 +441,7 @@
10604 * Re-enable decode windows.
10606 - orion5x_write(PCI_BAR_ENABLE, win_enable);
10607 + writel(win_enable, PCI_BAR_ENABLE);
10610 * Disable automatic update of address remaping when writing to BARs.
10611 --- a/arch/arm/mach-orion5x/rd88f5182-setup.c
10612 +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c
10614 #include <asm/mach/pci.h>
10615 #include <asm/arch/orion5x.h>
10616 #include "common.h"
10619 /*****************************************************************************
10621 @@ -125,6 +126,7 @@
10623 leds_event = rd88f5182_dbgled_event;
10629 @@ -220,7 +222,6 @@
10631 static struct mv643xx_eth_platform_data rd88f5182_eth_data = {
10633 - .force_phy_addr = 1,
10636 /*****************************************************************************
10637 @@ -234,15 +235,34 @@
10639 ****************************************************************************/
10640 static struct mv_sata_platform_data rd88f5182_sata_data = {
10645 /*****************************************************************************
10647 ****************************************************************************/
10649 -static struct platform_device *rd88f5182_devices[] __initdata = {
10650 - &rd88f5182_nor_flash,
10651 +static struct orion5x_mpp_mode rd88f5182_mpp_modes[] __initdata = {
10652 + { 0, MPP_GPIO }, /* Debug Led */
10653 + { 1, MPP_GPIO }, /* Reset Switch */
10654 + { 2, MPP_UNUSED },
10655 + { 3, MPP_GPIO }, /* RTC Int */
10658 + { 6, MPP_GPIO }, /* PCI_intA */
10659 + { 7, MPP_GPIO }, /* PCI_intB */
10660 + { 8, MPP_UNUSED },
10661 + { 9, MPP_UNUSED },
10662 + { 10, MPP_UNUSED },
10663 + { 11, MPP_UNUSED },
10664 + { 12, MPP_SATA_LED }, /* SATA 0 presence */
10665 + { 13, MPP_SATA_LED }, /* SATA 1 presence */
10666 + { 14, MPP_SATA_LED }, /* SATA 0 active */
10667 + { 15, MPP_SATA_LED }, /* SATA 1 active */
10668 + { 16, MPP_UNUSED },
10669 + { 17, MPP_UNUSED },
10670 + { 18, MPP_UNUSED },
10671 + { 19, MPP_UNUSED },
10675 static void __init rd88f5182_init(void)
10676 @@ -252,35 +272,9 @@
10681 - * Setup the CPU address decode windows for our devices
10683 - orion5x_setup_dev_boot_win(RD88F5182_NOR_BOOT_BASE,
10684 - RD88F5182_NOR_BOOT_SIZE);
10685 - orion5x_setup_dev1_win(RD88F5182_NOR_BASE, RD88F5182_NOR_SIZE);
10688 - * Open a special address decode windows for the PCIe WA.
10690 - orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
10691 - ORION5X_PCIE_WA_SIZE);
10692 + orion5x_mpp_conf(rd88f5182_mpp_modes);
10695 - * Setup Multiplexing Pins --
10696 - * MPP[0] Debug Led (GPIO - Out)
10697 - * MPP[1] Debug Led (GPIO - Out)
10699 - * MPP[3] RTC_Int (GPIO - In)
10702 - * MPP[6] PCI_intA (GPIO - In)
10703 - * MPP[7] PCI_intB (GPIO - In)
10705 - * MPP[12] SATA 0 presence Indication
10706 - * MPP[13] SATA 1 presence Indication
10707 - * MPP[14] SATA 0 active Indication
10708 - * MPP[15] SATA 1 active indication
10709 - * MPP[16-19] Not used
10710 * MPP[20] PCI Clock to MV88F5182
10711 * MPP[21] PCI Clock to mini PCI CON11
10712 * MPP[22] USB 0 over current indication
10713 @@ -289,16 +283,23 @@
10714 * MPP[25] USB 0 over current enable
10717 - orion5x_write(MPP_0_7_CTRL, 0x00000003);
10718 - orion5x_write(MPP_8_15_CTRL, 0x55550000);
10719 - orion5x_write(MPP_16_19_CTRL, 0x5555);
10721 + * Configure peripherals.
10723 + orion5x_ehci0_init();
10724 + orion5x_ehci1_init();
10725 + orion5x_eth_init(&rd88f5182_eth_data);
10726 + orion5x_i2c_init();
10727 + orion5x_sata_init(&rd88f5182_sata_data);
10728 + orion5x_uart0_init();
10730 - orion5x_gpio_set_valid_pins(0x000000fb);
10731 + orion5x_setup_dev_boot_win(RD88F5182_NOR_BOOT_BASE,
10732 + RD88F5182_NOR_BOOT_SIZE);
10734 + orion5x_setup_dev1_win(RD88F5182_NOR_BASE, RD88F5182_NOR_SIZE);
10735 + platform_device_register(&rd88f5182_nor_flash);
10737 - platform_add_devices(rd88f5182_devices, ARRAY_SIZE(rd88f5182_devices));
10738 i2c_register_board_info(0, &rd88f5182_i2c_rtc, 1);
10739 - orion5x_eth_init(&rd88f5182_eth_data);
10740 - orion5x_sata_init(&rd88f5182_sata_data);
10743 MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design")
10744 --- a/arch/arm/mach-orion5x/ts209-setup.c
10745 +++ b/arch/arm/mach-orion5x/ts209-setup.c
10747 #include <asm/mach/pci.h>
10748 #include <asm/arch/orion5x.h>
10749 #include "common.h"
10751 +#include "tsx09-common.h"
10753 #define QNAP_TS209_NOR_BOOT_BASE 0xf4000000
10754 #define QNAP_TS209_NOR_BOOT_SIZE SZ_8M
10755 @@ -47,52 +49,54 @@
10756 ***************************************************************************/
10757 static struct mtd_partition qnap_ts209_partitions[] = {
10759 - .name = "U-Boot",
10760 - .size = 0x00080000,
10761 - .offset = 0x00780000,
10762 - .mask_flags = MTD_WRITEABLE,
10763 + .name = "U-Boot",
10764 + .size = 0x00080000,
10765 + .offset = 0x00780000,
10766 + .mask_flags = MTD_WRITEABLE,
10768 - .name = "Kernel",
10769 - .size = 0x00200000,
10771 + .name = "Kernel",
10772 + .size = 0x00200000,
10775 - .name = "RootFS1",
10776 - .size = 0x00400000,
10777 - .offset = 0x00200000,
10778 + .name = "RootFS1",
10779 + .size = 0x00400000,
10780 + .offset = 0x00200000,
10782 - .name = "RootFS2",
10783 - .size = 0x00100000,
10784 - .offset = 0x00600000,
10785 + .name = "RootFS2",
10786 + .size = 0x00100000,
10787 + .offset = 0x00600000,
10789 - .name = "U-Boot Config",
10790 - .size = 0x00020000,
10791 - .offset = 0x00760000,
10792 + .name = "U-Boot Config",
10793 + .size = 0x00020000,
10794 + .offset = 0x00760000,
10796 - .name = "NAS Config",
10797 - .size = 0x00060000,
10798 - .offset = 0x00700000,
10799 - .mask_flags = MTD_WRITEABLE,
10801 + .name = "NAS Config",
10802 + .size = 0x00060000,
10803 + .offset = 0x00700000,
10804 + .mask_flags = MTD_WRITEABLE,
10808 static struct physmap_flash_data qnap_ts209_nor_flash_data = {
10810 - .parts = qnap_ts209_partitions,
10811 - .nr_parts = ARRAY_SIZE(qnap_ts209_partitions)
10813 + .parts = qnap_ts209_partitions,
10814 + .nr_parts = ARRAY_SIZE(qnap_ts209_partitions)
10817 static struct resource qnap_ts209_nor_flash_resource = {
10818 - .flags = IORESOURCE_MEM,
10819 - .start = QNAP_TS209_NOR_BOOT_BASE,
10820 - .end = QNAP_TS209_NOR_BOOT_BASE + QNAP_TS209_NOR_BOOT_SIZE - 1,
10821 + .flags = IORESOURCE_MEM,
10822 + .start = QNAP_TS209_NOR_BOOT_BASE,
10823 + .end = QNAP_TS209_NOR_BOOT_BASE + QNAP_TS209_NOR_BOOT_SIZE - 1,
10826 static struct platform_device qnap_ts209_nor_flash = {
10827 - .name = "physmap-flash",
10829 - .dev = { .platform_data = &qnap_ts209_nor_flash_data, },
10830 - .resource = &qnap_ts209_nor_flash_resource,
10831 - .num_resources = 1,
10832 + .name = "physmap-flash",
10835 + .platform_data = &qnap_ts209_nor_flash_data,
10837 + .resource = &qnap_ts209_nor_flash_resource,
10838 + .num_resources = 1,
10841 /*****************************************************************************
10842 @@ -164,12 +168,12 @@
10845 static struct hw_pci qnap_ts209_pci __initdata = {
10846 - .nr_controllers = 2,
10847 - .preinit = qnap_ts209_pci_preinit,
10848 - .swizzle = pci_std_swizzle,
10849 - .setup = orion5x_pci_sys_setup,
10850 - .scan = orion5x_pci_sys_scan_bus,
10851 - .map_irq = qnap_ts209_pci_map_irq,
10852 + .nr_controllers = 2,
10853 + .preinit = qnap_ts209_pci_preinit,
10854 + .swizzle = pci_std_swizzle,
10855 + .setup = orion5x_pci_sys_setup,
10856 + .scan = orion5x_pci_sys_scan_bus,
10857 + .map_irq = qnap_ts209_pci_map_irq,
10860 static int __init qnap_ts209_pci_init(void)
10861 @@ -183,96 +187,6 @@
10862 subsys_initcall(qnap_ts209_pci_init);
10864 /*****************************************************************************
10866 - ****************************************************************************/
10868 -static struct mv643xx_eth_platform_data qnap_ts209_eth_data = {
10870 - .force_phy_addr = 1,
10873 -static int __init parse_hex_nibble(char n)
10875 - if (n >= '0' && n <= '9')
10878 - if (n >= 'A' && n <= 'F')
10879 - return n - 'A' + 10;
10881 - if (n >= 'a' && n <= 'f')
10882 - return n - 'a' + 10;
10887 -static int __init parse_hex_byte(const char *b)
10892 - hi = parse_hex_nibble(b[0]);
10893 - lo = parse_hex_nibble(b[1]);
10895 - if (hi < 0 || lo < 0)
10898 - return (hi << 4) | lo;
10901 -static int __init check_mac_addr(const char *addr_str)
10903 - u_int8_t addr[6];
10906 - for (i = 0; i < 6; i++) {
10910 - * Enforce "xx:xx:xx:xx:xx:xx\n" format.
10912 - if (addr_str[(i * 3) + 2] != ((i < 5) ? ':' : '\n'))
10915 - byte = parse_hex_byte(addr_str + (i * 3));
10921 - printk(KERN_INFO "ts209: found ethernet mac address ");
10922 - for (i = 0; i < 6; i++)
10923 - printk("%.2x%s", addr[i], (i < 5) ? ":" : ".\n");
10925 - memcpy(qnap_ts209_eth_data.mac_addr, addr, 6);
10931 - * The 'NAS Config' flash partition has an ext2 filesystem which
10932 - * contains a file that has the ethernet MAC address in plain text
10933 - * (format "xx:xx:xx:xx:xx:xx\n".)
10935 -static void __init ts209_find_mac_addr(void)
10937 - unsigned long addr;
10939 - for (addr = 0x00700000; addr < 0x00760000; addr += 1024) {
10943 - nor_page = ioremap(QNAP_TS209_NOR_BOOT_BASE + addr, 1024);
10944 - if (nor_page != NULL) {
10945 - ret = check_mac_addr(nor_page);
10946 - iounmap(nor_page);
10954 -/*****************************************************************************
10955 * RTC S35390A on I2C bus
10956 ****************************************************************************/
10958 @@ -280,7 +194,7 @@
10960 static struct i2c_board_info __initdata qnap_ts209_i2c_rtc = {
10961 I2C_BOARD_INFO("s35390a", 0x30),
10966 /****************************************************************************
10967 @@ -297,70 +211,63 @@
10968 .gpio = QNAP_TS209_GPIO_KEY_MEDIA,
10969 .desc = "USB Copy Button",
10975 .gpio = QNAP_TS209_GPIO_KEY_RESET,
10976 .desc = "Reset Button",
10982 static struct gpio_keys_platform_data qnap_ts209_button_data = {
10983 .buttons = qnap_ts209_buttons,
10984 - .nbuttons = ARRAY_SIZE(qnap_ts209_buttons),
10985 + .nbuttons = ARRAY_SIZE(qnap_ts209_buttons),
10988 static struct platform_device qnap_ts209_button_device = {
10989 .name = "gpio-keys",
10991 .num_resources = 0,
10992 - .dev = { .platform_data = &qnap_ts209_button_data, },
10994 + .platform_data = &qnap_ts209_button_data,
10998 /*****************************************************************************
11000 ****************************************************************************/
11001 static struct mv_sata_platform_data qnap_ts209_sata_data = {
11006 /*****************************************************************************
11009 ****************************************************************************/
11011 -static struct platform_device *qnap_ts209_devices[] __initdata = {
11012 - &qnap_ts209_nor_flash,
11013 - &qnap_ts209_button_device,
11014 +static struct orion5x_mpp_mode ts209_mpp_modes[] __initdata = {
11015 + { 0, MPP_UNUSED },
11016 + { 1, MPP_GPIO }, /* USB copy button */
11017 + { 2, MPP_GPIO }, /* Load defaults button */
11018 + { 3, MPP_GPIO }, /* GPIO RTC */
11019 + { 4, MPP_UNUSED },
11020 + { 5, MPP_UNUSED },
11021 + { 6, MPP_GPIO }, /* PCI Int A */
11022 + { 7, MPP_GPIO }, /* PCI Int B */
11023 + { 8, MPP_UNUSED },
11024 + { 9, MPP_UNUSED },
11025 + { 10, MPP_UNUSED },
11026 + { 11, MPP_UNUSED },
11027 + { 12, MPP_SATA_LED }, /* SATA 0 presence */
11028 + { 13, MPP_SATA_LED }, /* SATA 1 presence */
11029 + { 14, MPP_SATA_LED }, /* SATA 0 active */
11030 + { 15, MPP_SATA_LED }, /* SATA 1 active */
11031 + { 16, MPP_UART }, /* UART1 RXD */
11032 + { 17, MPP_UART }, /* UART1 TXD */
11033 + { 18, MPP_GPIO }, /* SW_RST */
11034 + { 19, MPP_UNUSED },
11039 - * QNAP TS-[12]09 specific power off method via UART1-attached PIC
11042 -#define UART1_REG(x) (UART1_VIRT_BASE + ((UART_##x) << 2))
11044 -static void qnap_ts209_power_off(void)
11046 - /* 19200 baud divisor */
11047 - const unsigned divisor = ((ORION5X_TCLK + (8 * 19200)) / (16 * 19200));
11049 - pr_info("%s: triggering power-off...\n", __func__);
11051 - /* hijack uart1 and reset into sane state (19200,8n1) */
11052 - orion5x_write(UART1_REG(LCR), 0x83);
11053 - orion5x_write(UART1_REG(DLL), divisor & 0xff);
11054 - orion5x_write(UART1_REG(DLM), (divisor >> 8) & 0xff);
11055 - orion5x_write(UART1_REG(LCR), 0x03);
11056 - orion5x_write(UART1_REG(IER), 0x00);
11057 - orion5x_write(UART1_REG(FCR), 0x00);
11058 - orion5x_write(UART1_REG(MCR), 0x00);
11060 - /* send the power-off command 'A' to PIC */
11061 - orion5x_write(UART1_REG(TX), 'A');
11064 static void __init qnap_ts209_init(void)
11067 @@ -368,51 +275,33 @@
11072 - * Setup flash mapping
11074 - orion5x_setup_dev_boot_win(QNAP_TS209_NOR_BOOT_BASE,
11075 - QNAP_TS209_NOR_BOOT_SIZE);
11078 - * Open a special address decode windows for the PCIe WA.
11080 - orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
11081 - ORION5X_PCIE_WA_SIZE);
11082 + orion5x_mpp_conf(ts209_mpp_modes);
11085 - * Setup Multiplexing Pins --
11086 - * MPP[0] Reserved
11087 - * MPP[1] USB copy button (0 active)
11088 - * MPP[2] Load defaults button (0 active)
11089 - * MPP[3] GPIO RTC
11090 - * MPP[4-5] Reserved
11091 - * MPP[6] PCI Int A
11092 - * MPP[7] PCI Int B
11093 - * MPP[8-11] Reserved
11094 - * MPP[12] SATA 0 presence
11095 - * MPP[13] SATA 1 presence
11096 - * MPP[14] SATA 0 active
11097 - * MPP[15] SATA 1 active
11098 - * MPP[16] UART1 RXD
11099 - * MPP[17] UART1 TXD
11100 - * MPP[18] SW_RST (0 active)
11101 - * MPP[19] Reserved
11102 * MPP[20] PCI clock 0
11103 * MPP[21] PCI clock 1
11104 * MPP[22] USB 0 over current
11105 * MPP[23-25] Reserved
11107 - orion5x_write(MPP_0_7_CTRL, 0x3);
11108 - orion5x_write(MPP_8_15_CTRL, 0x55550000);
11109 - orion5x_write(MPP_16_19_CTRL, 0x5500);
11110 - orion5x_gpio_set_valid_pins(0x3cc0fff);
11112 - /* register ts209 specific power-off method */
11113 - pm_power_off = qnap_ts209_power_off;
11115 + * Configure peripherals.
11117 + orion5x_ehci0_init();
11118 + orion5x_ehci1_init();
11119 + qnap_tsx09_find_mac_addr(QNAP_TS209_NOR_BOOT_BASE +
11120 + qnap_ts209_partitions[5].offset,
11121 + qnap_ts209_partitions[5].size);
11122 + orion5x_eth_init(&qnap_tsx09_eth_data);
11123 + orion5x_i2c_init();
11124 + orion5x_sata_init(&qnap_ts209_sata_data);
11125 + orion5x_uart0_init();
11127 + orion5x_setup_dev_boot_win(QNAP_TS209_NOR_BOOT_BASE,
11128 + QNAP_TS209_NOR_BOOT_SIZE);
11129 + platform_device_register(&qnap_ts209_nor_flash);
11131 - platform_add_devices(qnap_ts209_devices,
11132 - ARRAY_SIZE(qnap_ts209_devices));
11133 + platform_device_register(&qnap_ts209_button_device);
11135 /* Get RTC IRQ and register the chip */
11136 if (gpio_request(TS209_RTC_GPIO, "rtc") == 0) {
11137 @@ -425,14 +314,12 @@
11138 pr_warning("qnap_ts209_init: failed to get RTC IRQ\n");
11139 i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1);
11141 - ts209_find_mac_addr();
11142 - orion5x_eth_init(&qnap_ts209_eth_data);
11144 - orion5x_sata_init(&qnap_ts209_sata_data);
11145 + /* register tsx09 specific power-off method */
11146 + pm_power_off = qnap_tsx09_power_off;
11149 MACHINE_START(TS209, "QNAP TS-109/TS-209")
11150 - /* Maintainer: Byron Bradley <byron.bbradley@gmail.com> */
11151 + /* Maintainer: Byron Bradley <byron.bbradley@gmail.com> */
11152 .phys_io = ORION5X_REGS_PHYS_BASE,
11153 .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
11154 .boot_params = 0x00000100,
11156 +++ b/arch/arm/mach-orion5x/ts409-setup.c
11159 + * QNAP TS-409 Board Setup
11161 + * Maintainer: Sylver Bruneau <sylver.bruneau@gmail.com>
11163 + * This program is free software; you can redistribute it and/or
11164 + * modify it under the terms of the GNU General Public License
11165 + * as published by the Free Software Foundation; either version
11166 + * 2 of the License, or (at your option) any later version.
11169 +#include <linux/kernel.h>
11170 +#include <linux/init.h>
11171 +#include <linux/platform_device.h>
11172 +#include <linux/pci.h>
11173 +#include <linux/irq.h>
11174 +#include <linux/mtd/physmap.h>
11175 +#include <linux/mv643xx_eth.h>
11176 +#include <linux/gpio_keys.h>
11177 +#include <linux/input.h>
11178 +#include <linux/i2c.h>
11179 +#include <linux/serial_reg.h>
11180 +#include <asm/mach-types.h>
11181 +#include <asm/gpio.h>
11182 +#include <asm/mach/arch.h>
11183 +#include <asm/mach/pci.h>
11184 +#include <asm/arch/orion5x.h>
11185 +#include "common.h"
11187 +#include "tsx09-common.h"
11189 +/*****************************************************************************
11190 + * QNAP TS-409 Info
11191 + ****************************************************************************/
11194 + * QNAP TS-409 hardware :
11195 + * - Marvell 88F5281-D0
11196 + * - Marvell 88SX7042 SATA controller (PCIe)
11197 + * - Marvell 88E1118 Gigabit Ethernet PHY
11198 + * - RTC S35390A (@0x30) on I2C bus
11199 + * - 8MB NOR flash
11200 + * - 256MB of DDR-2 RAM
11204 + * 8MB NOR flash Device bus boot chip select
11207 +#define QNAP_TS409_NOR_BOOT_BASE 0xff800000
11208 +#define QNAP_TS409_NOR_BOOT_SIZE SZ_8M
11210 +/****************************************************************************
11211 + * 8MiB NOR flash. The struct mtd_partition is not in the same order as the
11212 + * partitions on the device because we want to keep compatability with
11213 + * existing QNAP firmware.
11215 + * Layout as used by QNAP:
11216 + * [2] 0x00000000-0x00200000 : "Kernel"
11217 + * [3] 0x00200000-0x00600000 : "RootFS1"
11218 + * [4] 0x00600000-0x00700000 : "RootFS2"
11219 + * [6] 0x00700000-0x00760000 : "NAS Config" (read-only)
11220 + * [5] 0x00760000-0x00780000 : "U-Boot Config"
11221 + * [1] 0x00780000-0x00800000 : "U-Boot" (read-only)
11222 + ***************************************************************************/
11223 +static struct mtd_partition qnap_ts409_partitions[] = {
11225 + .name = "U-Boot",
11226 + .size = 0x00080000,
11227 + .offset = 0x00780000,
11228 + .mask_flags = MTD_WRITEABLE,
11230 + .name = "Kernel",
11231 + .size = 0x00200000,
11234 + .name = "RootFS1",
11235 + .size = 0x00400000,
11236 + .offset = 0x00200000,
11238 + .name = "RootFS2",
11239 + .size = 0x00100000,
11240 + .offset = 0x00600000,
11242 + .name = "U-Boot Config",
11243 + .size = 0x00020000,
11244 + .offset = 0x00760000,
11246 + .name = "NAS Config",
11247 + .size = 0x00060000,
11248 + .offset = 0x00700000,
11249 + .mask_flags = MTD_WRITEABLE,
11253 +static struct physmap_flash_data qnap_ts409_nor_flash_data = {
11255 + .parts = qnap_ts409_partitions,
11256 + .nr_parts = ARRAY_SIZE(qnap_ts409_partitions)
11259 +static struct resource qnap_ts409_nor_flash_resource = {
11260 + .flags = IORESOURCE_MEM,
11261 + .start = QNAP_TS409_NOR_BOOT_BASE,
11262 + .end = QNAP_TS409_NOR_BOOT_BASE + QNAP_TS409_NOR_BOOT_SIZE - 1,
11265 +static struct platform_device qnap_ts409_nor_flash = {
11266 + .name = "physmap-flash",
11268 + .dev = { .platform_data = &qnap_ts409_nor_flash_data, },
11269 + .num_resources = 1,
11270 + .resource = &qnap_ts409_nor_flash_resource,
11273 +/*****************************************************************************
11275 + ****************************************************************************/
11277 +static int __init qnap_ts409_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
11282 + * Check for devices with hard-wired IRQs.
11284 + irq = orion5x_pci_map_irq(dev, slot, pin);
11289 + * PCI isn't used on the TS-409
11294 +static struct hw_pci qnap_ts409_pci __initdata = {
11295 + .nr_controllers = 2,
11296 + .swizzle = pci_std_swizzle,
11297 + .setup = orion5x_pci_sys_setup,
11298 + .scan = orion5x_pci_sys_scan_bus,
11299 + .map_irq = qnap_ts409_pci_map_irq,
11302 +static int __init qnap_ts409_pci_init(void)
11304 + if (machine_is_ts409())
11305 + pci_common_init(&qnap_ts409_pci);
11310 +subsys_initcall(qnap_ts409_pci_init);
11312 +/*****************************************************************************
11313 + * RTC S35390A on I2C bus
11314 + ****************************************************************************/
11316 +#define TS409_RTC_GPIO 10
11318 +static struct i2c_board_info __initdata qnap_ts409_i2c_rtc = {
11319 + I2C_BOARD_INFO("s35390a", 0x30),
11322 +/****************************************************************************
11323 + * GPIO Attached Keys
11324 + * Power button is attached to the PIC microcontroller
11325 + ****************************************************************************/
11327 +#define QNAP_TS409_GPIO_KEY_MEDIA 15
11329 +static struct gpio_keys_button qnap_ts409_buttons[] = {
11331 + .code = KEY_RESTART,
11332 + .gpio = QNAP_TS409_GPIO_KEY_MEDIA,
11333 + .desc = "USB Copy Button",
11338 +static struct gpio_keys_platform_data qnap_ts409_button_data = {
11339 + .buttons = qnap_ts409_buttons,
11340 + .nbuttons = ARRAY_SIZE(qnap_ts409_buttons),
11343 +static struct platform_device qnap_ts409_button_device = {
11344 + .name = "gpio-keys",
11346 + .num_resources = 0,
11348 + .platform_data = &qnap_ts409_button_data,
11352 +/*****************************************************************************
11354 + ****************************************************************************/
11355 +static struct orion5x_mpp_mode ts409_mpp_modes[] __initdata = {
11356 + { 0, MPP_UNUSED },
11357 + { 1, MPP_UNUSED },
11358 + { 2, MPP_UNUSED },
11359 + { 3, MPP_UNUSED },
11360 + { 4, MPP_GPIO }, /* HDD 1 status */
11361 + { 5, MPP_GPIO }, /* HDD 2 status */
11362 + { 6, MPP_GPIO }, /* HDD 3 status */
11363 + { 7, MPP_GPIO }, /* HDD 4 status */
11364 + { 8, MPP_UNUSED },
11365 + { 9, MPP_UNUSED },
11366 + { 10, MPP_GPIO }, /* RTC int */
11367 + { 11, MPP_UNUSED },
11368 + { 12, MPP_UNUSED },
11369 + { 13, MPP_UNUSED },
11370 + { 14, MPP_GPIO }, /* SW_RST */
11371 + { 15, MPP_GPIO }, /* USB copy button */
11372 + { 16, MPP_UART }, /* UART1 RXD */
11373 + { 17, MPP_UART }, /* UART1 TXD */
11374 + { 18, MPP_UNUSED },
11375 + { 19, MPP_UNUSED },
11379 +static void __init qnap_ts409_init(void)
11382 + * Setup basic Orion functions. Need to be called early.
11386 + orion5x_mpp_conf(ts409_mpp_modes);
11389 + * Configure peripherals.
11391 + orion5x_ehci0_init();
11392 + qnap_tsx09_find_mac_addr(QNAP_TS409_NOR_BOOT_BASE +
11393 + qnap_ts409_partitions[5].offset,
11394 + qnap_ts409_partitions[5].size);
11395 + orion5x_eth_init(&qnap_tsx09_eth_data);
11396 + orion5x_i2c_init();
11397 + orion5x_uart0_init();
11399 + orion5x_setup_dev_boot_win(QNAP_TS409_NOR_BOOT_BASE,
11400 + QNAP_TS409_NOR_BOOT_SIZE);
11401 + platform_device_register(&qnap_ts409_nor_flash);
11403 + platform_device_register(&qnap_ts409_button_device);
11405 + /* Get RTC IRQ and register the chip */
11406 + if (gpio_request(TS409_RTC_GPIO, "rtc") == 0) {
11407 + if (gpio_direction_input(TS409_RTC_GPIO) == 0)
11408 + qnap_ts409_i2c_rtc.irq = gpio_to_irq(TS409_RTC_GPIO);
11410 + gpio_free(TS409_RTC_GPIO);
11412 + if (qnap_ts409_i2c_rtc.irq == 0)
11413 + pr_warning("qnap_ts409_init: failed to get RTC IRQ\n");
11414 + i2c_register_board_info(0, &qnap_ts409_i2c_rtc, 1);
11416 + /* register tsx09 specific power-off method */
11417 + pm_power_off = qnap_tsx09_power_off;
11420 +MACHINE_START(TS409, "QNAP TS-409")
11421 + /* Maintainer: Sylver Bruneau <sylver.bruneau@gmail.com> */
11422 + .phys_io = ORION5X_REGS_PHYS_BASE,
11423 + .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
11424 + .boot_params = 0x00000100,
11425 + .init_machine = qnap_ts409_init,
11426 + .map_io = orion5x_map_io,
11427 + .init_irq = orion5x_init_irq,
11428 + .timer = &orion5x_timer,
11429 + .fixup = tag_fixup_mem32,
11432 +++ b/arch/arm/mach-orion5x/ts78xx-setup.c
11435 + * arch/arm/mach-orion5x/ts78xx-setup.c
11437 + * Maintainer: Alexander Clouter <alex@digriz.org.uk>
11439 + * This file is licensed under the terms of the GNU General Public
11440 + * License version 2. This program is licensed "as is" without any
11441 + * warranty of any kind, whether express or implied.
11444 +#include <linux/kernel.h>
11445 +#include <linux/init.h>
11446 +#include <linux/platform_device.h>
11447 +#include <linux/mtd/physmap.h>
11448 +#include <linux/mv643xx_eth.h>
11449 +#include <linux/ata_platform.h>
11450 +#include <linux/m48t86.h>
11451 +#include <asm/mach-types.h>
11452 +#include <asm/mach/arch.h>
11453 +#include <asm/mach/map.h>
11454 +#include <asm/arch/orion5x.h>
11455 +#include "common.h"
11458 +/*****************************************************************************
11460 + ****************************************************************************/
11463 + * FPGA - lives where the PCI bus would be at ORION5X_PCI_MEM_PHYS_BASE
11465 +#define TS78XX_FPGA_REGS_PHYS_BASE 0xe8000000
11466 +#define TS78XX_FPGA_REGS_VIRT_BASE 0xff900000
11467 +#define TS78XX_FPGA_REGS_SIZE SZ_1M
11469 +#define TS78XX_FPGA_REGS_SYSCON_ID (TS78XX_FPGA_REGS_VIRT_BASE | 0x000)
11470 +#define TS78XX_FPGA_REGS_SYSCON_LCDI (TS78XX_FPGA_REGS_VIRT_BASE | 0x004)
11471 +#define TS78XX_FPGA_REGS_SYSCON_LCDO (TS78XX_FPGA_REGS_VIRT_BASE | 0x008)
11473 +#define TS78XX_FPGA_REGS_RTC_CTRL (TS78XX_FPGA_REGS_VIRT_BASE | 0x808)
11474 +#define TS78XX_FPGA_REGS_RTC_DATA (TS78XX_FPGA_REGS_VIRT_BASE | 0x80c)
11477 + * 512kB NOR flash Device
11479 +#define TS78XX_NOR_BOOT_BASE 0xff800000
11480 +#define TS78XX_NOR_BOOT_SIZE SZ_512K
11482 +/*****************************************************************************
11483 + * I/O Address Mapping
11484 + ****************************************************************************/
11485 +static struct map_desc ts78xx_io_desc[] __initdata = {
11487 + .virtual = TS78XX_FPGA_REGS_VIRT_BASE,
11488 + .pfn = __phys_to_pfn(TS78XX_FPGA_REGS_PHYS_BASE),
11489 + .length = TS78XX_FPGA_REGS_SIZE,
11490 + .type = MT_DEVICE,
11494 +void __init ts78xx_map_io(void)
11496 + orion5x_map_io();
11497 + iotable_init(ts78xx_io_desc, ARRAY_SIZE(ts78xx_io_desc));
11500 +/*****************************************************************************
11501 + * 512kB NOR Boot Flash - the chip is a M25P40
11502 + ****************************************************************************/
11503 +static struct mtd_partition ts78xx_nor_boot_flash_resources[] = {
11505 + .name = "ts-bootrom",
11507 + /* only the first 256kB is used */
11509 + .mask_flags = MTD_WRITEABLE,
11513 +static struct physmap_flash_data ts78xx_nor_boot_flash_data = {
11515 + .parts = ts78xx_nor_boot_flash_resources,
11516 + .nr_parts = ARRAY_SIZE(ts78xx_nor_boot_flash_resources),
11519 +static struct resource ts78xx_nor_boot_flash_resource = {
11520 + .flags = IORESOURCE_MEM,
11521 + .start = TS78XX_NOR_BOOT_BASE,
11522 + .end = TS78XX_NOR_BOOT_BASE + TS78XX_NOR_BOOT_SIZE - 1,
11525 +static struct platform_device ts78xx_nor_boot_flash = {
11526 + .name = "physmap-flash",
11529 + .platform_data = &ts78xx_nor_boot_flash_data,
11531 + .num_resources = 1,
11532 + .resource = &ts78xx_nor_boot_flash_resource,
11535 +/*****************************************************************************
11537 + ****************************************************************************/
11538 +static struct mv643xx_eth_platform_data ts78xx_eth_data = {
11540 + .force_phy_addr = 1,
11543 +/*****************************************************************************
11544 + * RTC M48T86 - nicked^Wborrowed from arch/arm/mach-ep93xx/ts72xx.c
11545 + ****************************************************************************/
11546 +#ifdef CONFIG_RTC_DRV_M48T86
11547 +static unsigned char ts78xx_rtc_readbyte(unsigned long addr)
11549 + writeb(addr, TS78XX_FPGA_REGS_RTC_CTRL);
11550 + return readb(TS78XX_FPGA_REGS_RTC_DATA);
11553 +static void ts78xx_rtc_writebyte(unsigned char value, unsigned long addr)
11555 + writeb(addr, TS78XX_FPGA_REGS_RTC_CTRL);
11556 + writeb(value, TS78XX_FPGA_REGS_RTC_DATA);
11559 +static struct m48t86_ops ts78xx_rtc_ops = {
11560 + .readbyte = ts78xx_rtc_readbyte,
11561 + .writebyte = ts78xx_rtc_writebyte,
11564 +static struct platform_device ts78xx_rtc_device = {
11565 + .name = "rtc-m48t86",
11568 + .platform_data = &ts78xx_rtc_ops,
11570 + .num_resources = 0,
11574 + * TS uses some of the user storage space on the RTC chip so see if it is
11575 + * present; as it's an optional feature at purchase time and not all boards
11576 + * will have it present
11578 + * I've used the method TS use in their rtc7800.c example for the detection
11580 + * TODO: track down a guinea pig without an RTC to see if we can work out a
11581 + * better RTC detection routine
11583 +static int __init ts78xx_rtc_init(void)
11585 + unsigned char tmp_rtc0, tmp_rtc1;
11587 + tmp_rtc0 = ts78xx_rtc_readbyte(126);
11588 + tmp_rtc1 = ts78xx_rtc_readbyte(127);
11590 + ts78xx_rtc_writebyte(0x00, 126);
11591 + ts78xx_rtc_writebyte(0x55, 127);
11592 + if (ts78xx_rtc_readbyte(127) == 0x55) {
11593 + ts78xx_rtc_writebyte(0xaa, 127);
11594 + if (ts78xx_rtc_readbyte(127) == 0xaa
11595 + && ts78xx_rtc_readbyte(126) == 0x00) {
11596 + ts78xx_rtc_writebyte(tmp_rtc0, 126);
11597 + ts78xx_rtc_writebyte(tmp_rtc1, 127);
11598 + platform_device_register(&ts78xx_rtc_device);
11606 +static int __init ts78xx_rtc_init(void)
11612 +/*****************************************************************************
11614 + ****************************************************************************/
11615 +static struct mv_sata_platform_data ts78xx_sata_data = {
11619 +/*****************************************************************************
11620 + * print some information regarding the board
11621 + ****************************************************************************/
11622 +static void __init ts78xx_print_board_id(void)
11624 + unsigned int board_info;
11626 + board_info = readl(TS78XX_FPGA_REGS_SYSCON_ID);
11627 + printk(KERN_INFO "TS-78xx Info: FPGA rev=%.2x, Board Magic=%.6x, ",
11628 + board_info & 0xff,
11629 + (board_info >> 8) & 0xffffff);
11630 + board_info = readl(TS78XX_FPGA_REGS_SYSCON_LCDI);
11631 + printk("JP1=%d, JP2=%d\n",
11632 + (board_info >> 30) & 0x1,
11633 + (board_info >> 31) & 0x1);
11636 +/*****************************************************************************
11638 + ****************************************************************************/
11639 +static struct orion5x_mpp_mode ts78xx_mpp_modes[] __initdata = {
11640 + { 0, MPP_UNUSED },
11641 + { 1, MPP_GPIO }, /* JTAG Clock */
11642 + { 2, MPP_GPIO }, /* JTAG Data In */
11643 + { 3, MPP_GPIO }, /* Lat ECP2 256 FPGA - PB2B */
11644 + { 4, MPP_GPIO }, /* JTAG Data Out */
11645 + { 5, MPP_GPIO }, /* JTAG TMS */
11646 + { 6, MPP_GPIO }, /* Lat ECP2 256 FPGA - PB31A_CLK4+ */
11647 + { 7, MPP_GPIO }, /* Lat ECP2 256 FPGA - PB22B */
11648 + { 8, MPP_UNUSED },
11649 + { 9, MPP_UNUSED },
11650 + { 10, MPP_UNUSED },
11651 + { 11, MPP_UNUSED },
11652 + { 12, MPP_UNUSED },
11653 + { 13, MPP_UNUSED },
11654 + { 14, MPP_UNUSED },
11655 + { 15, MPP_UNUSED },
11656 + { 16, MPP_UART },
11657 + { 17, MPP_UART },
11658 + { 18, MPP_UART },
11659 + { 19, MPP_UART },
11663 +static void __init ts78xx_init(void)
11666 + * Setup basic Orion functions. Need to be called early.
11670 + ts78xx_print_board_id();
11672 + orion5x_mpp_conf(ts78xx_mpp_modes);
11675 + * MPP[20] PCI Clock Out 1
11676 + * MPP[21] PCI Clock Out 0
11684 + * Configure peripherals.
11686 + orion5x_ehci0_init();
11687 + orion5x_ehci1_init();
11688 + orion5x_eth_init(&ts78xx_eth_data);
11689 + orion5x_sata_init(&ts78xx_sata_data);
11690 + orion5x_uart0_init();
11691 + orion5x_uart1_init();
11693 + orion5x_setup_dev_boot_win(TS78XX_NOR_BOOT_BASE,
11694 + TS78XX_NOR_BOOT_SIZE);
11695 + platform_device_register(&ts78xx_nor_boot_flash);
11697 + if (!ts78xx_rtc_init())
11698 + printk(KERN_INFO "TS-78xx RTC not detected or enabled\n");
11701 +MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC")
11702 + /* Maintainer: Alexander Clouter <alex@digriz.org.uk> */
11703 + .phys_io = ORION5X_REGS_PHYS_BASE,
11704 + .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
11705 + .boot_params = 0x00000100,
11706 + .init_machine = ts78xx_init,
11707 + .map_io = ts78xx_map_io,
11708 + .init_irq = orion5x_init_irq,
11709 + .timer = &orion5x_timer,
11712 +++ b/arch/arm/mach-orion5x/tsx09-common.c
11715 + * QNAP TS-x09 Boards common functions
11717 + * Maintainers: Lennert Buytenhek <buytenh@marvell.com>
11718 + * Byron Bradley <byron.bbradley@gmail.com>
11720 + * This program is free software; you can redistribute it and/or
11721 + * modify it under the terms of the GNU General Public License
11722 + * as published by the Free Software Foundation; either version
11723 + * 2 of the License, or (at your option) any later version.
11726 +#include <linux/kernel.h>
11727 +#include <linux/pci.h>
11728 +#include <linux/mv643xx_eth.h>
11729 +#include <linux/serial_reg.h>
11730 +#include "tsx09-common.h"
11732 +/*****************************************************************************
11733 + * QNAP TS-x09 specific power off method via UART1-attached PIC
11734 + ****************************************************************************/
11736 +#define UART1_REG(x) (UART1_VIRT_BASE + ((UART_##x) << 2))
11738 +void qnap_tsx09_power_off(void)
11740 + /* 19200 baud divisor */
11741 + const unsigned divisor = ((ORION5X_TCLK + (8 * 19200)) / (16 * 19200));
11743 + pr_info("%s: triggering power-off...\n", __func__);
11745 + /* hijack uart1 and reset into sane state (19200,8n1) */
11746 + writel(0x83, UART1_REG(LCR));
11747 + writel(divisor & 0xff, UART1_REG(DLL));
11748 + writel((divisor >> 8) & 0xff, UART1_REG(DLM));
11749 + writel(0x03, UART1_REG(LCR));
11750 + writel(0x00, UART1_REG(IER));
11751 + writel(0x00, UART1_REG(FCR));
11752 + writel(0x00, UART1_REG(MCR));
11754 + /* send the power-off command 'A' to PIC */
11755 + writel('A', UART1_REG(TX));
11758 +/*****************************************************************************
11760 + ****************************************************************************/
11762 +struct mv643xx_eth_platform_data qnap_tsx09_eth_data = {
11766 +static int __init qnap_tsx09_parse_hex_nibble(char n)
11768 + if (n >= '0' && n <= '9')
11771 + if (n >= 'A' && n <= 'F')
11772 + return n - 'A' + 10;
11774 + if (n >= 'a' && n <= 'f')
11775 + return n - 'a' + 10;
11780 +static int __init qnap_tsx09_parse_hex_byte(const char *b)
11785 + hi = qnap_tsx09_parse_hex_nibble(b[0]);
11786 + lo = qnap_tsx09_parse_hex_nibble(b[1]);
11788 + if (hi < 0 || lo < 0)
11791 + return (hi << 4) | lo;
11794 +static int __init qnap_tsx09_check_mac_addr(const char *addr_str)
11796 + u_int8_t addr[6];
11799 + for (i = 0; i < 6; i++) {
11803 + * Enforce "xx:xx:xx:xx:xx:xx\n" format.
11805 + if (addr_str[(i * 3) + 2] != ((i < 5) ? ':' : '\n'))
11808 + byte = qnap_tsx09_parse_hex_byte(addr_str + (i * 3));
11814 + printk(KERN_INFO "tsx09: found ethernet mac address ");
11815 + for (i = 0; i < 6; i++)
11816 + printk("%.2x%s", addr[i], (i < 5) ? ":" : ".\n");
11818 + memcpy(qnap_tsx09_eth_data.mac_addr, addr, 6);
11824 + * The 'NAS Config' flash partition has an ext2 filesystem which
11825 + * contains a file that has the ethernet MAC address in plain text
11826 + * (format "xx:xx:xx:xx:xx:xx\n").
11828 +void __init qnap_tsx09_find_mac_addr(u32 mem_base, u32 size)
11830 + unsigned long addr;
11832 + for (addr = mem_base; addr < (mem_base + size); addr += 1024) {
11836 + nor_page = ioremap(addr, 1024);
11837 + if (nor_page != NULL) {
11838 + ret = qnap_tsx09_check_mac_addr(nor_page);
11839 + iounmap(nor_page);
11847 +++ b/arch/arm/mach-orion5x/tsx09-common.h
11849 +#ifndef __ARCH_ORION5X_TSX09_COMMON_H
11850 +#define __ARCH_ORION5X_TSX09_COMMON_H
11853 + * QNAP TS-x09 Boards power-off function
11855 +extern void qnap_tsx09_power_off(void);
11858 + * QNAP TS-x09 Boards function to find Ethernet MAC address in flash memory
11860 +extern void __init qnap_tsx09_find_mac_addr(u32 mem_base, u32 size);
11863 + * QNAP TS-x09 Boards ethernet declaration
11865 +extern struct mv643xx_eth_platform_data qnap_tsx09_eth_data;
11870 +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
11873 + * arch/arm/mach-orion5x/wrt350n-v2-setup.c
11875 + * This file is licensed under the terms of the GNU General Public
11876 + * License version 2. This program is licensed "as is" without any
11877 + * warranty of any kind, whether express or implied.
11880 +#include <linux/kernel.h>
11881 +#include <linux/init.h>
11882 +#include <linux/platform_device.h>
11883 +#include <linux/pci.h>
11884 +#include <linux/irq.h>
11885 +#include <linux/delay.h>
11886 +#include <linux/mtd/physmap.h>
11887 +#include <linux/mv643xx_eth.h>
11888 +#include <asm/mach-types.h>
11889 +#include <asm/gpio.h>
11890 +#include <asm/mach/arch.h>
11891 +#include <asm/mach/pci.h>
11892 +#include <asm/arch/orion5x.h>
11893 +#include "common.h"
11896 +static struct orion5x_mpp_mode wrt350n_v2_mpp_modes[] __initdata = {
11897 + { 0, MPP_GPIO }, /* Power LED green (0=on) */
11898 + { 1, MPP_GPIO }, /* Security LED (0=on) */
11899 + { 2, MPP_GPIO }, /* Internal Button (0=on) */
11900 + { 3, MPP_GPIO }, /* Reset Button (0=on) */
11901 + { 4, MPP_GPIO }, /* PCI int */
11902 + { 5, MPP_GPIO }, /* Power LED orange (0=on) */
11903 + { 6, MPP_GPIO }, /* USB LED (0=on) */
11904 + { 7, MPP_GPIO }, /* Wireless LED (0=on) */
11905 + { 8, MPP_UNUSED }, /* ??? */
11906 + { 9, MPP_GIGE }, /* GE_RXERR */
11907 + { 10, MPP_UNUSED }, /* ??? */
11908 + { 11, MPP_UNUSED }, /* ??? */
11909 + { 12, MPP_GIGE }, /* GE_TXD[4] */
11910 + { 13, MPP_GIGE }, /* GE_TXD[5] */
11911 + { 14, MPP_GIGE }, /* GE_TXD[6] */
11912 + { 15, MPP_GIGE }, /* GE_TXD[7] */
11913 + { 16, MPP_GIGE }, /* GE_RXD[4] */
11914 + { 17, MPP_GIGE }, /* GE_RXD[5] */
11915 + { 18, MPP_GIGE }, /* GE_RXD[6] */
11916 + { 19, MPP_GIGE }, /* GE_RXD[7] */
11921 + * 8M NOR flash Device bus boot chip select
11923 +#define WRT350N_V2_NOR_BOOT_BASE 0xf4000000
11924 +#define WRT350N_V2_NOR_BOOT_SIZE SZ_8M
11926 +static struct mtd_partition wrt350n_v2_nor_flash_partitions[] = {
11928 + .name = "kernel",
11929 + .offset = 0x00000000,
11930 + .size = 0x00760000,
11932 + .name = "rootfs",
11933 + .offset = 0x001a0000,
11934 + .size = 0x005c0000,
11937 + .offset = 0x00760000,
11938 + .size = 0x00040000,
11941 + .offset = 0x007a0000,
11942 + .size = 0x00020000,
11944 + .name = "u-boot",
11945 + .offset = 0x007c0000,
11946 + .size = 0x00040000,
11950 +static struct physmap_flash_data wrt350n_v2_nor_flash_data = {
11952 + .parts = wrt350n_v2_nor_flash_partitions,
11953 + .nr_parts = ARRAY_SIZE(wrt350n_v2_nor_flash_partitions),
11956 +static struct resource wrt350n_v2_nor_flash_resource = {
11957 + .flags = IORESOURCE_MEM,
11958 + .start = WRT350N_V2_NOR_BOOT_BASE,
11959 + .end = WRT350N_V2_NOR_BOOT_BASE + WRT350N_V2_NOR_BOOT_SIZE - 1,
11962 +static struct platform_device wrt350n_v2_nor_flash = {
11963 + .name = "physmap-flash",
11966 + .platform_data = &wrt350n_v2_nor_flash_data,
11968 + .num_resources = 1,
11969 + .resource = &wrt350n_v2_nor_flash_resource,
11972 +static struct mv643xx_eth_platform_data wrt350n_v2_eth_data = {
11976 +static void __init wrt350n_v2_init(void)
11979 + * Setup basic Orion functions. Need to be called early.
11983 + orion5x_mpp_conf(wrt350n_v2_mpp_modes);
11986 + * Configure peripherals.
11988 + orion5x_ehci0_init();
11989 + orion5x_eth_init(&wrt350n_v2_eth_data);
11990 + orion5x_uart0_init();
11992 + orion5x_setup_dev_boot_win(WRT350N_V2_NOR_BOOT_BASE,
11993 + WRT350N_V2_NOR_BOOT_SIZE);
11994 + platform_device_register(&wrt350n_v2_nor_flash);
11997 +static int __init wrt350n_v2_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
12002 + * Check for devices with hard-wired IRQs.
12004 + irq = orion5x_pci_map_irq(dev, slot, pin);
12012 + return gpio_to_irq(4);
12017 +static struct hw_pci wrt350n_v2_pci __initdata = {
12018 + .nr_controllers = 2,
12019 + .swizzle = pci_std_swizzle,
12020 + .setup = orion5x_pci_sys_setup,
12021 + .scan = orion5x_pci_sys_scan_bus,
12022 + .map_irq = wrt350n_v2_pci_map_irq,
12025 +static int __init wrt350n_v2_pci_init(void)
12027 + if (machine_is_wrt350n_v2())
12028 + pci_common_init(&wrt350n_v2_pci);
12032 +subsys_initcall(wrt350n_v2_pci_init);
12034 +MACHINE_START(WRT350N_V2, "Linksys WRT350N v2")
12035 + /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */
12036 + .phys_io = ORION5X_REGS_PHYS_BASE,
12037 + .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
12038 + .boot_params = 0x00000100,
12039 + .init_machine = wrt350n_v2_init,
12040 + .map_io = orion5x_map_io,
12041 + .init_irq = orion5x_init_irq,
12042 + .timer = &orion5x_timer,
12043 + .fixup = tag_fixup_mem32,
12045 --- a/arch/arm/mm/Kconfig
12046 +++ b/arch/arm/mm/Kconfig
12047 @@ -365,7 +365,7 @@
12049 config CPU_FEROCEON
12051 - depends on ARCH_ORION5X
12052 + depends on ARCH_ORION5X || ARCH_LOKI || ARCH_KIRKWOOD || ARCH_MV78XX0
12055 select CPU_ABRT_EV5T
12056 @@ -373,7 +373,7 @@
12057 select CPU_CACHE_VIVT
12058 select CPU_CP15_MMU
12059 select CPU_COPY_FEROCEON if MMU
12060 - select CPU_TLB_V4WBI if MMU
12061 + select CPU_TLB_FEROCEON if MMU
12063 config CPU_FEROCEON_OLD_ID
12064 bool "Accept early Feroceon cores with an ARM926 ID"
12065 @@ -551,6 +551,11 @@
12066 ARM Architecture Version 4 TLB with writeback cache and invalidate
12067 instruction cache entry.
12069 +config CPU_TLB_FEROCEON
12072 + Feroceon TLB (v4wbi with non-outer-cachable page table walks).
12077 @@ -709,6 +714,14 @@
12081 +config CACHE_FEROCEON_L2
12082 + bool "Enable the Feroceon L2 cache controller"
12083 + depends on ARCH_KIRKWOOD || ARCH_MV78XX0
12085 + select OUTER_CACHE
12087 + This option enables the Feroceon L2 cache controller.
12090 bool "Enable the L2x0 outer cache controller"
12091 depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176
12092 --- a/arch/arm/mm/Makefile
12093 +++ b/arch/arm/mm/Makefile
12095 obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o
12096 obj-$(CONFIG_CPU_TLB_V4WB) += tlb-v4wb.o
12097 obj-$(CONFIG_CPU_TLB_V4WBI) += tlb-v4wbi.o
12098 +obj-$(CONFIG_CPU_TLB_FEROCEON) += tlb-v4wbi.o # reuse v4wbi TLB functions
12099 obj-$(CONFIG_CPU_TLB_V6) += tlb-v6.o
12100 obj-$(CONFIG_CPU_TLB_V7) += tlb-v7.o
12103 obj-$(CONFIG_CPU_V6) += proc-v6.o
12104 obj-$(CONFIG_CPU_V7) += proc-v7.o
12106 +obj-$(CONFIG_CACHE_FEROCEON_L2) += cache-feroceon-l2.o
12107 obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
12109 +++ b/arch/arm/mm/cache-feroceon-l2.c
12112 + * arch/arm/mm/cache-feroceon-l2.c - Feroceon L2 cache controller support
12114 + * Copyright (C) 2008 Marvell Semiconductor
12116 + * This file is licensed under the terms of the GNU General Public
12117 + * License version 2. This program is licensed "as is" without any
12118 + * warranty of any kind, whether express or implied.
12121 + * - Unified Layer 2 Cache for Feroceon CPU Cores,
12122 + * Document ID MV-S104858-00, Rev. A, October 23 2007.
12125 +#include <linux/init.h>
12126 +#include <asm/cacheflush.h>
12127 +#include <asm/plat-orion/cache-feroceon-l2.h>
12131 + * Low-level cache maintenance operations.
12133 + * As well as the regular 'clean/invalidate/flush L2 cache line by
12134 + * MVA' instructions, the Feroceon L2 cache controller also features
12135 + * 'clean/invalidate L2 range by MVA' operations.
12137 + * Cache range operations are initiated by writing the start and
12138 + * end addresses to successive cp15 registers, and process every
12139 + * cache line whose first byte address lies in the inclusive range
12142 + * The cache range operations stall the CPU pipeline until completion.
12144 + * The range operations require two successive cp15 writes, in
12145 + * between which we don't want to be preempted.
12147 +static inline void l2_clean_pa(unsigned long addr)
12149 + __asm__("mcr p15, 1, %0, c15, c9, 3" : : "r" (addr));
12152 +static inline void l2_clean_mva_range(unsigned long start, unsigned long end)
12154 + unsigned long flags;
12157 + * Make sure 'start' and 'end' reference the same page, as
12158 + * L2 is PIPT and range operations only do a TLB lookup on
12159 + * the start address.
12161 + BUG_ON((start ^ end) & ~(PAGE_SIZE - 1));
12163 + raw_local_irq_save(flags);
12164 + __asm__("mcr p15, 1, %0, c15, c9, 4" : : "r" (start));
12165 + __asm__("mcr p15, 1, %0, c15, c9, 5" : : "r" (end));
12166 + raw_local_irq_restore(flags);
12169 +static inline void l2_clean_pa_range(unsigned long start, unsigned long end)
12171 + l2_clean_mva_range(__phys_to_virt(start), __phys_to_virt(end));
12174 +static inline void l2_clean_inv_pa(unsigned long addr)
12176 + __asm__("mcr p15, 1, %0, c15, c10, 3" : : "r" (addr));
12179 +static inline void l2_inv_pa(unsigned long addr)
12181 + __asm__("mcr p15, 1, %0, c15, c11, 3" : : "r" (addr));
12184 +static inline void l2_inv_mva_range(unsigned long start, unsigned long end)
12186 + unsigned long flags;
12189 + * Make sure 'start' and 'end' reference the same page, as
12190 + * L2 is PIPT and range operations only do a TLB lookup on
12191 + * the start address.
12193 + BUG_ON((start ^ end) & ~(PAGE_SIZE - 1));
12195 + raw_local_irq_save(flags);
12196 + __asm__("mcr p15, 1, %0, c15, c11, 4" : : "r" (start));
12197 + __asm__("mcr p15, 1, %0, c15, c11, 5" : : "r" (end));
12198 + raw_local_irq_restore(flags);
12201 +static inline void l2_inv_pa_range(unsigned long start, unsigned long end)
12203 + l2_inv_mva_range(__phys_to_virt(start), __phys_to_virt(end));
12208 + * Linux primitives.
12210 + * Note that the end addresses passed to Linux primitives are
12211 + * noninclusive, while the hardware cache range operations use
12212 + * inclusive start and end addresses.
12214 +#define CACHE_LINE_SIZE 32
12215 +#define MAX_RANGE_SIZE 1024
12217 +static int l2_wt_override;
12219 +static unsigned long calc_range_end(unsigned long start, unsigned long end)
12221 + unsigned long range_end;
12223 + BUG_ON(start & (CACHE_LINE_SIZE - 1));
12224 + BUG_ON(end & (CACHE_LINE_SIZE - 1));
12227 + * Try to process all cache lines between 'start' and 'end'.
12232 + * Limit the number of cache lines processed at once,
12233 + * since cache range operations stall the CPU pipeline
12234 + * until completion.
12236 + if (range_end > start + MAX_RANGE_SIZE)
12237 + range_end = start + MAX_RANGE_SIZE;
12240 + * Cache range operations can't straddle a page boundary.
12242 + if (range_end > (start | (PAGE_SIZE - 1)) + 1)
12243 + range_end = (start | (PAGE_SIZE - 1)) + 1;
12245 + return range_end;
12248 +static void feroceon_l2_inv_range(unsigned long start, unsigned long end)
12251 + * Clean and invalidate partial first cache line.
12253 + if (start & (CACHE_LINE_SIZE - 1)) {
12254 + l2_clean_inv_pa(start & ~(CACHE_LINE_SIZE - 1));
12255 + start = (start | (CACHE_LINE_SIZE - 1)) + 1;
12259 + * Clean and invalidate partial last cache line.
12261 + if (end & (CACHE_LINE_SIZE - 1)) {
12262 + l2_clean_inv_pa(end & ~(CACHE_LINE_SIZE - 1));
12263 + end &= ~(CACHE_LINE_SIZE - 1);
12267 + * Invalidate all full cache lines between 'start' and 'end'.
12269 + while (start != end) {
12270 + unsigned long range_end = calc_range_end(start, end);
12271 + l2_inv_pa_range(start, range_end - CACHE_LINE_SIZE);
12272 + start = range_end;
12278 +static void feroceon_l2_clean_range(unsigned long start, unsigned long end)
12281 + * If L2 is forced to WT, the L2 will always be clean and we
12282 + * don't need to do anything here.
12284 + if (!l2_wt_override) {
12285 + start &= ~(CACHE_LINE_SIZE - 1);
12286 + end = (end + CACHE_LINE_SIZE - 1) & ~(CACHE_LINE_SIZE - 1);
12287 + while (start != end) {
12288 + unsigned long range_end = calc_range_end(start, end);
12289 + l2_clean_pa_range(start, range_end - CACHE_LINE_SIZE);
12290 + start = range_end;
12297 +static void feroceon_l2_flush_range(unsigned long start, unsigned long end)
12299 + start &= ~(CACHE_LINE_SIZE - 1);
12300 + end = (end + CACHE_LINE_SIZE - 1) & ~(CACHE_LINE_SIZE - 1);
12301 + while (start != end) {
12302 + unsigned long range_end = calc_range_end(start, end);
12303 + if (!l2_wt_override)
12304 + l2_clean_pa_range(start, range_end - CACHE_LINE_SIZE);
12305 + l2_inv_pa_range(start, range_end - CACHE_LINE_SIZE);
12306 + start = range_end;
12314 + * Routines to disable and re-enable the D-cache and I-cache at run
12315 + * time. These are necessary because the L2 cache can only be enabled
12316 + * or disabled while the L1 Dcache and Icache are both disabled.
12318 +static void __init invalidate_and_disable_dcache(void)
12324 + unsigned long flags;
12326 + raw_local_irq_save(flags);
12327 + flush_cache_all();
12328 + set_cr(cr & ~CR_C);
12329 + raw_local_irq_restore(flags);
12333 +static void __init enable_dcache(void)
12338 + if (!(cr & CR_C))
12339 + set_cr(cr | CR_C);
12342 +static void __init __invalidate_icache(void)
12346 + __asm__ __volatile__("mcr p15, 0, %0, c7, c5, 0\n" : "=r" (dummy));
12349 +static void __init invalidate_and_disable_icache(void)
12355 + set_cr(cr & ~CR_I);
12356 + __invalidate_icache();
12360 +static void __init enable_icache(void)
12365 + if (!(cr & CR_I))
12366 + set_cr(cr | CR_I);
12369 +static inline u32 read_extra_features(void)
12373 + __asm__("mrc p15, 1, %0, c15, c1, 0" : "=r" (u));
12378 +static inline void write_extra_features(u32 u)
12380 + __asm__("mcr p15, 1, %0, c15, c1, 0" : : "r" (u));
12383 +static void __init disable_l2_prefetch(void)
12388 + * Read the CPU Extra Features register and verify that the
12389 + * Disable L2 Prefetch bit is set.
12391 + u = read_extra_features();
12392 + if (!(u & 0x01000000)) {
12393 + printk(KERN_INFO "Feroceon L2: Disabling L2 prefetch.\n");
12394 + write_extra_features(u | 0x01000000);
12398 +static void __init enable_l2(void)
12402 + u = read_extra_features();
12403 + if (!(u & 0x00400000)) {
12404 + printk(KERN_INFO "Feroceon L2: Enabling L2\n");
12406 + invalidate_and_disable_dcache();
12407 + invalidate_and_disable_icache();
12408 + write_extra_features(u | 0x00400000);
12414 +void __init feroceon_l2_init(int __l2_wt_override)
12416 + l2_wt_override = __l2_wt_override;
12418 + disable_l2_prefetch();
12420 + outer_cache.inv_range = feroceon_l2_inv_range;
12421 + outer_cache.clean_range = feroceon_l2_clean_range;
12422 + outer_cache.flush_range = feroceon_l2_flush_range;
12426 + printk(KERN_INFO "Feroceon L2: Cache support initialised%s.\n",
12427 + l2_wt_override ? ", in WT override mode" : "");
12429 --- a/arch/arm/mm/proc-feroceon.S
12430 +++ b/arch/arm/mm/proc-feroceon.S
12431 @@ -44,11 +44,31 @@
12433 #define CACHE_DLINESIZE 32
12437 +__cache_params_loc:
12442 + .word __cache_params_loc
12445 * cpu_feroceon_proc_init()
12447 ENTRY(cpu_feroceon_proc_init)
12448 + mrc p15, 0, r0, c0, c0, 1 @ read cache type register
12449 + ldr r1, __cache_params
12450 + mov r2, #(16 << 5)
12451 + tst r0, #(1 << 16) @ get way
12452 + mov r0, r0, lsr #18 @ get cache size order
12453 + movne r3, #((4 - 1) << 30) @ 4-way
12455 + moveq r3, #0 @ 1-way
12456 + mov r2, r2, lsl r0 @ actual cache size
12457 + movne r2, r2, lsr #2 @ turned into # of sets
12458 + sub r2, r2, #(1 << 5)
12459 + stmia r1, {r2, r3}
12464 mov ip, #PSR_F_BIT | PSR_I_BIT | SVC_MODE
12466 bl feroceon_flush_kern_cache_all
12468 +#if defined(CONFIG_CACHE_FEROCEON_L2) && !defined(CONFIG_L2_CACHE_WRITETHROUGH)
12470 + mcr p15, 1, r0, c15, c9, 0 @ clean L2
12471 + mcr p15, 0, r0, c7, c10, 4 @ drain WB
12474 mrc p15, 0, r0, c1, c0, 0 @ ctrl register
12475 bic r0, r0, #0x1000 @ ...i............
12476 bic r0, r0, #0x000e @ ............wca.
12477 @@ -117,11 +144,19 @@
12479 ENTRY(feroceon_flush_kern_cache_all)
12483 __flush_whole_cache:
12484 -1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate
12486 + ldr r1, __cache_params
12487 + ldmia r1, {r1, r3}
12489 +2: mcr p15, 0, ip, c7, c14, 2 @ clean + invalidate D set/way
12490 + subs ip, ip, #(1 << 30) @ next way
12492 + subs r1, r1, #(1 << 5) @ next set
12497 mcrne p15, 0, ip, c7, c5, 0 @ invalidate I cache
12498 mcrne p15, 0, ip, c7, c10, 4 @ drain WB
12500 @@ -138,7 +173,6 @@
12503 ENTRY(feroceon_flush_user_cache_range)
12505 sub r3, r1, r0 @ calculate total size
12506 cmp r3, #CACHE_DLIMIT
12507 bgt __flush_whole_cache
12508 @@ -152,6 +186,7 @@
12513 mcrne p15, 0, ip, c7, c10, 4 @ drain WB
12516 @@ -209,6 +244,20 @@
12517 mcr p15, 0, r0, c7, c10, 4 @ drain WB
12521 +ENTRY(feroceon_range_flush_kern_dcache_page)
12523 + add r1, r0, #PAGE_SZ - CACHE_DLINESIZE @ top addr is inclusive
12524 + orr r3, r2, #PSR_I_BIT
12525 + msr cpsr_c, r3 @ disable interrupts
12526 + mcr p15, 5, r0, c15, c15, 0 @ D clean/inv range start
12527 + mcr p15, 5, r1, c15, c15, 1 @ D clean/inv range top
12528 + msr cpsr_c, r2 @ restore interrupts
12530 + mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache
12531 + mcr p15, 0, r0, c7, c10, 4 @ drain WB
12535 * dma_inv_range(start, end)
12537 @@ -225,10 +274,10 @@
12539 ENTRY(feroceon_dma_inv_range)
12540 tst r0, #CACHE_DLINESIZE - 1
12541 + bic r0, r0, #CACHE_DLINESIZE - 1
12542 mcrne p15, 0, r0, c7, c10, 1 @ clean D entry
12543 tst r1, #CACHE_DLINESIZE - 1
12544 mcrne p15, 0, r1, c7, c10, 1 @ clean D entry
12545 - bic r0, r0, #CACHE_DLINESIZE - 1
12546 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
12547 add r0, r0, #CACHE_DLINESIZE
12549 @@ -236,6 +285,22 @@
12550 mcr p15, 0, r0, c7, c10, 4 @ drain WB
12554 +ENTRY(feroceon_range_dma_inv_range)
12556 + tst r0, #CACHE_DLINESIZE - 1
12557 + mcrne p15, 0, r0, c7, c10, 1 @ clean D entry
12558 + tst r1, #CACHE_DLINESIZE - 1
12559 + mcrne p15, 0, r1, c7, c10, 1 @ clean D entry
12561 + subne r1, r1, #1 @ top address is inclusive
12562 + orr r3, r2, #PSR_I_BIT
12563 + msr cpsr_c, r3 @ disable interrupts
12564 + mcr p15, 5, r0, c15, c14, 0 @ D inv range start
12565 + mcr p15, 5, r1, c15, c14, 1 @ D inv range top
12566 + msr cpsr_c, r2 @ restore interrupts
12570 * dma_clean_range(start, end)
12572 @@ -256,6 +321,19 @@
12573 mcr p15, 0, r0, c7, c10, 4 @ drain WB
12577 +ENTRY(feroceon_range_dma_clean_range)
12580 + subne r1, r1, #1 @ top address is inclusive
12581 + orr r3, r2, #PSR_I_BIT
12582 + msr cpsr_c, r3 @ disable interrupts
12583 + mcr p15, 5, r0, c15, c13, 0 @ D clean range start
12584 + mcr p15, 5, r1, c15, c13, 1 @ D clean range top
12585 + msr cpsr_c, r2 @ restore interrupts
12586 + mcr p15, 0, r0, c7, c10, 4 @ drain WB
12590 * dma_flush_range(start, end)
12592 @@ -274,6 +352,19 @@
12593 mcr p15, 0, r0, c7, c10, 4 @ drain WB
12597 +ENTRY(feroceon_range_dma_flush_range)
12600 + subne r1, r1, #1 @ top address is inclusive
12601 + orr r3, r2, #PSR_I_BIT
12602 + msr cpsr_c, r3 @ disable interrupts
12603 + mcr p15, 5, r0, c15, c15, 0 @ D clean/inv range start
12604 + mcr p15, 5, r1, c15, c15, 1 @ D clean/inv range top
12605 + msr cpsr_c, r2 @ restore interrupts
12606 + mcr p15, 0, r0, c7, c10, 4 @ drain WB
12609 ENTRY(feroceon_cache_fns)
12610 .long feroceon_flush_kern_cache_all
12611 .long feroceon_flush_user_cache_all
12612 @@ -285,12 +376,33 @@
12613 .long feroceon_dma_clean_range
12614 .long feroceon_dma_flush_range
12616 +ENTRY(feroceon_range_cache_fns)
12617 + .long feroceon_flush_kern_cache_all
12618 + .long feroceon_flush_user_cache_all
12619 + .long feroceon_flush_user_cache_range
12620 + .long feroceon_coherent_kern_range
12621 + .long feroceon_coherent_user_range
12622 + .long feroceon_range_flush_kern_dcache_page
12623 + .long feroceon_range_dma_inv_range
12624 + .long feroceon_range_dma_clean_range
12625 + .long feroceon_range_dma_flush_range
12628 ENTRY(cpu_feroceon_dcache_clean_area)
12629 +#if defined(CONFIG_CACHE_FEROCEON_L2) && !defined(CONFIG_L2_CACHE_WRITETHROUGH)
12633 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
12634 add r0, r0, #CACHE_DLINESIZE
12635 subs r1, r1, #CACHE_DLINESIZE
12637 +#if defined(CONFIG_CACHE_FEROCEON_L2) && !defined(CONFIG_L2_CACHE_WRITETHROUGH)
12638 +1: mcr p15, 1, r2, c15, c9, 1 @ clean L2 entry
12639 + add r2, r2, #CACHE_DLINESIZE
12640 + subs r3, r3, #CACHE_DLINESIZE
12643 mcr p15, 0, r0, c7, c10, 4 @ drain WB
12646 @@ -306,16 +418,25 @@
12648 ENTRY(cpu_feroceon_switch_mm)
12651 -@ && 'Clean & Invalidate whole DCache'
12652 -1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate
12654 - mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache
12655 - mcr p15, 0, ip, c7, c10, 4 @ drain WB
12657 + * Note: we wish to call __flush_whole_cache but we need to preserve
12658 + * lr to do so. The only way without touching main memory is to
12659 + * use r2 which is normally used to test the VM_EXEC flag, and
12660 + * compensate locally for the skipped ops if it is not set.
12662 + mov r2, lr @ abuse r2 to preserve lr
12663 + bl __flush_whole_cache
12664 + @ if r2 contains the VM_EXEC bit then the next 2 ops are done already
12666 + mcreq p15, 0, ip, c7, c5, 0 @ invalidate I cache
12667 + mcreq p15, 0, ip, c7, c10, 4 @ drain WB
12669 mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
12670 mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
12678 * cpu_feroceon_set_pte_ext(ptep, pte, ext)
12679 @@ -345,6 +466,9 @@
12680 str r2, [r0] @ hardware version
12682 mcr p15, 0, r0, c7, c10, 1 @ clean D entry
12683 +#if defined(CONFIG_CACHE_FEROCEON_L2) && !defined(CONFIG_L2_CACHE_WRITETHROUGH)
12684 + mcr p15, 1, r0, c15, c9, 1 @ clean L2 entry
12686 mcr p15, 0, r0, c7, c10, 4 @ drain WB
12689 @@ -414,6 +538,21 @@
12691 .size cpu_feroceon_name, . - cpu_feroceon_name
12693 + .type cpu_88fr531_name, #object
12695 + .asciz "Feroceon 88FR531-vd"
12696 + .size cpu_88fr531_name, . - cpu_88fr531_name
12698 + .type cpu_88fr571_name, #object
12700 + .asciz "Feroceon 88FR571-vd"
12701 + .size cpu_88fr571_name, . - cpu_88fr571_name
12703 + .type cpu_88fr131_name, #object
12705 + .asciz "Feroceon 88FR131"
12706 + .size cpu_88fr131_name, . - cpu_88fr131_name
12710 .section ".proc.info.init", #alloc, #execinstr
12711 @@ -421,15 +560,15 @@
12712 #ifdef CONFIG_CPU_FEROCEON_OLD_ID
12713 .type __feroceon_old_id_proc_info,#object
12714 __feroceon_old_id_proc_info:
12717 - .long PMD_TYPE_SECT | \
12720 + .long PMD_TYPE_SECT | \
12721 PMD_SECT_BUFFERABLE | \
12722 PMD_SECT_CACHEABLE | \
12724 PMD_SECT_AP_WRITE | \
12726 - .long PMD_TYPE_SECT | \
12727 + .long PMD_TYPE_SECT | \
12729 PMD_SECT_AP_WRITE | \
12731 @@ -445,17 +584,17 @@
12732 .size __feroceon_old_id_proc_info, . - __feroceon_old_id_proc_info
12735 - .type __feroceon_proc_info,#object
12736 -__feroceon_proc_info:
12737 + .type __88fr531_proc_info,#object
12738 +__88fr531_proc_info:
12741 - .long PMD_TYPE_SECT | \
12742 + .long PMD_TYPE_SECT | \
12743 PMD_SECT_BUFFERABLE | \
12744 PMD_SECT_CACHEABLE | \
12746 PMD_SECT_AP_WRITE | \
12748 - .long PMD_TYPE_SECT | \
12749 + .long PMD_TYPE_SECT | \
12751 PMD_SECT_AP_WRITE | \
12753 @@ -463,9 +602,59 @@
12754 .long cpu_arch_name
12756 .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
12757 - .long cpu_feroceon_name
12758 + .long cpu_88fr531_name
12759 .long feroceon_processor_functions
12760 .long v4wbi_tlb_fns
12761 .long feroceon_user_fns
12762 .long feroceon_cache_fns
12763 - .size __feroceon_proc_info, . - __feroceon_proc_info
12764 + .size __88fr531_proc_info, . - __88fr531_proc_info
12766 + .type __88fr571_proc_info,#object
12767 +__88fr571_proc_info:
12770 + .long PMD_TYPE_SECT | \
12771 + PMD_SECT_BUFFERABLE | \
12772 + PMD_SECT_CACHEABLE | \
12774 + PMD_SECT_AP_WRITE | \
12776 + .long PMD_TYPE_SECT | \
12778 + PMD_SECT_AP_WRITE | \
12780 + b __feroceon_setup
12781 + .long cpu_arch_name
12782 + .long cpu_elf_name
12783 + .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
12784 + .long cpu_88fr571_name
12785 + .long feroceon_processor_functions
12786 + .long v4wbi_tlb_fns
12787 + .long feroceon_user_fns
12788 + .long feroceon_range_cache_fns
12789 + .size __88fr571_proc_info, . - __88fr571_proc_info
12791 + .type __88fr131_proc_info,#object
12792 +__88fr131_proc_info:
12795 + .long PMD_TYPE_SECT | \
12796 + PMD_SECT_BUFFERABLE | \
12797 + PMD_SECT_CACHEABLE | \
12799 + PMD_SECT_AP_WRITE | \
12801 + .long PMD_TYPE_SECT | \
12803 + PMD_SECT_AP_WRITE | \
12805 + b __feroceon_setup
12806 + .long cpu_arch_name
12807 + .long cpu_elf_name
12808 + .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
12809 + .long cpu_88fr131_name
12810 + .long feroceon_processor_functions
12811 + .long v4wbi_tlb_fns
12812 + .long feroceon_user_fns
12813 + .long feroceon_range_cache_fns
12814 + .size __88fr131_proc_info, . - __88fr131_proc_info
12815 --- a/arch/arm/plat-orion/irq.c
12816 +++ b/arch/arm/plat-orion/irq.c
12819 static struct irq_chip orion_irq_chip = {
12820 .name = "orion_irq",
12821 - .ack = orion_irq_mask,
12822 .mask = orion_irq_mask,
12823 + .mask_ack = orion_irq_mask,
12824 .unmask = orion_irq_unmask,
12828 set_irq_chip(irq, &orion_irq_chip);
12829 set_irq_chip_data(irq, maskaddr);
12830 set_irq_handler(irq, handle_level_irq);
12831 + irq_desc[irq].status |= IRQ_LEVEL;
12832 set_irq_flags(irq, IRQF_VALID);
12835 --- a/arch/arm/plat-orion/pcie.c
12836 +++ b/arch/arm/plat-orion/pcie.c
12838 #define PCIE_CONF_DATA_OFF 0x18fc
12839 #define PCIE_MASK_OFF 0x1910
12840 #define PCIE_CTRL_OFF 0x1a00
12841 +#define PCIE_CTRL_X1_MODE 0x0001
12842 #define PCIE_STAT_OFF 0x1a04
12843 #define PCIE_STAT_DEV_OFFS 20
12844 #define PCIE_STAT_DEV_MASK 0x1f
12846 return !(readl(base + PCIE_STAT_OFF) & PCIE_STAT_LINK_DOWN);
12849 +int __init orion_pcie_x4_mode(void __iomem *base)
12851 + return !(readl(base + PCIE_CTRL_OFF) & PCIE_CTRL_X1_MODE);
12854 int orion_pcie_get_local_bus_nr(void __iomem *base)
12856 u32 stat = readl(base + PCIE_STAT_OFF);
12857 --- a/arch/arm/plat-orion/time.c
12858 +++ b/arch/arm/plat-orion/time.c
12861 * Clear and enable clockevent timer interrupt.
12863 - writel(~BRIDGE_INT_TIMER1, BRIDGE_CAUSE);
12864 + writel(BRIDGE_INT_TIMER1_CLR, BRIDGE_CAUSE);
12866 u = readl(BRIDGE_MASK);
12867 u |= BRIDGE_INT_TIMER1;
12868 @@ -138,7 +138,7 @@
12870 * ACK pending timer interrupt.
12872 - writel(~BRIDGE_INT_TIMER1, BRIDGE_CAUSE);
12873 + writel(BRIDGE_INT_TIMER1_CLR, BRIDGE_CAUSE);
12876 local_irq_restore(flags);
12877 @@ -159,7 +159,7 @@
12879 * ACK timer interrupt and call event handler.
12881 - writel(~BRIDGE_INT_TIMER1, BRIDGE_CAUSE);
12882 + writel(BRIDGE_INT_TIMER1_CLR, BRIDGE_CAUSE);
12883 orion_clkevt.event_handler(&orion_clkevt);
12885 return IRQ_HANDLED;
12886 --- a/drivers/net/mv643xx_eth.c
12887 +++ b/drivers/net/mv643xx_eth.c
12888 @@ -34,406 +34,145 @@
12889 * along with this program; if not, write to the Free Software
12890 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
12893 #include <linux/init.h>
12894 #include <linux/dma-mapping.h>
12895 #include <linux/in.h>
12896 -#include <linux/ip.h>
12897 #include <linux/tcp.h>
12898 #include <linux/udp.h>
12899 #include <linux/etherdevice.h>
12901 -#include <linux/bitops.h>
12902 #include <linux/delay.h>
12903 #include <linux/ethtool.h>
12904 #include <linux/platform_device.h>
12906 #include <linux/module.h>
12907 #include <linux/kernel.h>
12908 #include <linux/spinlock.h>
12909 #include <linux/workqueue.h>
12910 #include <linux/mii.h>
12912 #include <linux/mv643xx_eth.h>
12914 #include <asm/io.h>
12915 #include <asm/types.h>
12916 -#include <asm/pgtable.h>
12917 #include <asm/system.h>
12918 -#include <asm/delay.h>
12919 -#include <asm/dma-mapping.h>
12921 -#define MV643XX_CHECKSUM_OFFLOAD_TX
12922 -#define MV643XX_NAPI
12923 -#define MV643XX_TX_FAST_REFILL
12924 -#undef MV643XX_COAL
12926 -#define MV643XX_TX_COAL 100
12927 -#ifdef MV643XX_COAL
12928 -#define MV643XX_RX_COAL 100
12930 +static char mv643xx_eth_driver_name[] = "mv643xx_eth";
12931 +static char mv643xx_eth_driver_version[] = "1.1";
12933 -#ifdef MV643XX_CHECKSUM_OFFLOAD_TX
12934 +#define MV643XX_ETH_CHECKSUM_OFFLOAD_TX
12935 +#define MV643XX_ETH_NAPI
12936 +#define MV643XX_ETH_TX_FAST_REFILL
12938 +#ifdef MV643XX_ETH_CHECKSUM_OFFLOAD_TX
12939 #define MAX_DESCS_PER_SKB (MAX_SKB_FRAGS + 1)
12941 #define MAX_DESCS_PER_SKB 1
12944 -#define ETH_VLAN_HLEN 4
12945 -#define ETH_FCS_LEN 4
12946 -#define ETH_HW_IP_ALIGN 2 /* hw aligns IP header */
12947 -#define ETH_WRAPPER_LEN (ETH_HW_IP_ALIGN + ETH_HLEN + \
12948 - ETH_VLAN_HLEN + ETH_FCS_LEN)
12949 -#define ETH_RX_SKB_SIZE (dev->mtu + ETH_WRAPPER_LEN + \
12950 - dma_get_cache_alignment())
12953 * Registers shared between all ports.
12955 -#define PHY_ADDR_REG 0x0000
12956 -#define SMI_REG 0x0004
12957 -#define WINDOW_BASE(i) (0x0200 + ((i) << 3))
12958 -#define WINDOW_SIZE(i) (0x0204 + ((i) << 3))
12959 -#define WINDOW_REMAP_HIGH(i) (0x0280 + ((i) << 2))
12960 -#define WINDOW_BAR_ENABLE 0x0290
12961 -#define WINDOW_PROTECT(i) (0x0294 + ((i) << 4))
12962 +#define PHY_ADDR 0x0000
12963 +#define SMI_REG 0x0004
12964 +#define WINDOW_BASE(w) (0x0200 + ((w) << 3))
12965 +#define WINDOW_SIZE(w) (0x0204 + ((w) << 3))
12966 +#define WINDOW_REMAP_HIGH(w) (0x0280 + ((w) << 2))
12967 +#define WINDOW_BAR_ENABLE 0x0290
12968 +#define WINDOW_PROTECT(w) (0x0294 + ((w) << 4))
12971 * Per-port registers.
12973 -#define PORT_CONFIG_REG(p) (0x0400 + ((p) << 10))
12974 -#define PORT_CONFIG_EXTEND_REG(p) (0x0404 + ((p) << 10))
12975 -#define MAC_ADDR_LOW(p) (0x0414 + ((p) << 10))
12976 -#define MAC_ADDR_HIGH(p) (0x0418 + ((p) << 10))
12977 -#define SDMA_CONFIG_REG(p) (0x041c + ((p) << 10))
12978 -#define PORT_SERIAL_CONTROL_REG(p) (0x043c + ((p) << 10))
12979 -#define PORT_STATUS_REG(p) (0x0444 + ((p) << 10))
12980 -#define TRANSMIT_QUEUE_COMMAND_REG(p) (0x0448 + ((p) << 10))
12981 -#define MAXIMUM_TRANSMIT_UNIT(p) (0x0458 + ((p) << 10))
12982 -#define INTERRUPT_CAUSE_REG(p) (0x0460 + ((p) << 10))
12983 -#define INTERRUPT_CAUSE_EXTEND_REG(p) (0x0464 + ((p) << 10))
12984 -#define INTERRUPT_MASK_REG(p) (0x0468 + ((p) << 10))
12985 -#define INTERRUPT_EXTEND_MASK_REG(p) (0x046c + ((p) << 10))
12986 -#define TX_FIFO_URGENT_THRESHOLD_REG(p) (0x0474 + ((p) << 10))
12987 -#define RX_CURRENT_QUEUE_DESC_PTR_0(p) (0x060c + ((p) << 10))
12988 -#define RECEIVE_QUEUE_COMMAND_REG(p) (0x0680 + ((p) << 10))
12989 -#define TX_CURRENT_QUEUE_DESC_PTR_0(p) (0x06c0 + ((p) << 10))
12990 -#define MIB_COUNTERS_BASE(p) (0x1000 + ((p) << 7))
12991 -#define DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(p) (0x1400 + ((p) << 10))
12992 -#define DA_FILTER_OTHER_MULTICAST_TABLE_BASE(p) (0x1500 + ((p) << 10))
12993 -#define DA_FILTER_UNICAST_TABLE_BASE(p) (0x1600 + ((p) << 10))
12995 -/* These macros describe Ethernet Port configuration reg (Px_cR) bits */
12996 -#define UNICAST_NORMAL_MODE (0 << 0)
12997 -#define UNICAST_PROMISCUOUS_MODE (1 << 0)
12998 -#define DEFAULT_RX_QUEUE(queue) ((queue) << 1)
12999 -#define DEFAULT_RX_ARP_QUEUE(queue) ((queue) << 4)
13000 -#define RECEIVE_BC_IF_NOT_IP_OR_ARP (0 << 7)
13001 -#define REJECT_BC_IF_NOT_IP_OR_ARP (1 << 7)
13002 -#define RECEIVE_BC_IF_IP (0 << 8)
13003 -#define REJECT_BC_IF_IP (1 << 8)
13004 -#define RECEIVE_BC_IF_ARP (0 << 9)
13005 -#define REJECT_BC_IF_ARP (1 << 9)
13006 -#define TX_AM_NO_UPDATE_ERROR_SUMMARY (1 << 12)
13007 -#define CAPTURE_TCP_FRAMES_DIS (0 << 14)
13008 -#define CAPTURE_TCP_FRAMES_EN (1 << 14)
13009 -#define CAPTURE_UDP_FRAMES_DIS (0 << 15)
13010 -#define CAPTURE_UDP_FRAMES_EN (1 << 15)
13011 -#define DEFAULT_RX_TCP_QUEUE(queue) ((queue) << 16)
13012 -#define DEFAULT_RX_UDP_QUEUE(queue) ((queue) << 19)
13013 -#define DEFAULT_RX_BPDU_QUEUE(queue) ((queue) << 22)
13015 -#define PORT_CONFIG_DEFAULT_VALUE \
13016 - UNICAST_NORMAL_MODE | \
13017 - DEFAULT_RX_QUEUE(0) | \
13018 - DEFAULT_RX_ARP_QUEUE(0) | \
13019 - RECEIVE_BC_IF_NOT_IP_OR_ARP | \
13020 - RECEIVE_BC_IF_IP | \
13021 - RECEIVE_BC_IF_ARP | \
13022 - CAPTURE_TCP_FRAMES_DIS | \
13023 - CAPTURE_UDP_FRAMES_DIS | \
13024 - DEFAULT_RX_TCP_QUEUE(0) | \
13025 - DEFAULT_RX_UDP_QUEUE(0) | \
13026 - DEFAULT_RX_BPDU_QUEUE(0)
13028 -/* These macros describe Ethernet Port configuration extend reg (Px_cXR) bits*/
13029 -#define CLASSIFY_EN (1 << 0)
13030 -#define SPAN_BPDU_PACKETS_AS_NORMAL (0 << 1)
13031 -#define SPAN_BPDU_PACKETS_TO_RX_QUEUE_7 (1 << 1)
13032 -#define PARTITION_DISABLE (0 << 2)
13033 -#define PARTITION_ENABLE (1 << 2)
13035 -#define PORT_CONFIG_EXTEND_DEFAULT_VALUE \
13036 - SPAN_BPDU_PACKETS_AS_NORMAL | \
13037 - PARTITION_DISABLE
13039 -/* These macros describe Ethernet Port Sdma configuration reg (SDCR) bits */
13040 -#define RIFB (1 << 0)
13041 -#define RX_BURST_SIZE_1_64BIT (0 << 1)
13042 -#define RX_BURST_SIZE_2_64BIT (1 << 1)
13043 +#define PORT_CONFIG(p) (0x0400 + ((p) << 10))
13044 +#define UNICAST_PROMISCUOUS_MODE 0x00000001
13045 +#define PORT_CONFIG_EXT(p) (0x0404 + ((p) << 10))
13046 +#define MAC_ADDR_LOW(p) (0x0414 + ((p) << 10))
13047 +#define MAC_ADDR_HIGH(p) (0x0418 + ((p) << 10))
13048 +#define SDMA_CONFIG(p) (0x041c + ((p) << 10))
13049 +#define PORT_SERIAL_CONTROL(p) (0x043c + ((p) << 10))
13050 +#define PORT_STATUS(p) (0x0444 + ((p) << 10))
13051 +#define TX_FIFO_EMPTY 0x00000400
13052 +#define TXQ_COMMAND(p) (0x0448 + ((p) << 10))
13053 +#define TXQ_FIX_PRIO_CONF(p) (0x044c + ((p) << 10))
13054 +#define TX_BW_RATE(p) (0x0450 + ((p) << 10))
13055 +#define TX_BW_MTU(p) (0x0458 + ((p) << 10))
13056 +#define TX_BW_BURST(p) (0x045c + ((p) << 10))
13057 +#define INT_CAUSE(p) (0x0460 + ((p) << 10))
13058 +#define INT_TX_END 0x07f80000
13059 +#define INT_RX 0x0007fbfc
13060 +#define INT_EXT 0x00000002
13061 +#define INT_CAUSE_EXT(p) (0x0464 + ((p) << 10))
13062 +#define INT_EXT_LINK 0x00100000
13063 +#define INT_EXT_PHY 0x00010000
13064 +#define INT_EXT_TX_ERROR_0 0x00000100
13065 +#define INT_EXT_TX_0 0x00000001
13066 +#define INT_EXT_TX 0x0000ffff
13067 +#define INT_MASK(p) (0x0468 + ((p) << 10))
13068 +#define INT_MASK_EXT(p) (0x046c + ((p) << 10))
13069 +#define TX_FIFO_URGENT_THRESHOLD(p) (0x0474 + ((p) << 10))
13070 +#define TXQ_FIX_PRIO_CONF_MOVED(p) (0x04dc + ((p) << 10))
13071 +#define TX_BW_RATE_MOVED(p) (0x04e0 + ((p) << 10))
13072 +#define TX_BW_MTU_MOVED(p) (0x04e8 + ((p) << 10))
13073 +#define TX_BW_BURST_MOVED(p) (0x04ec + ((p) << 10))
13074 +#define RXQ_CURRENT_DESC_PTR(p, q) (0x060c + ((p) << 10) + ((q) << 4))
13075 +#define RXQ_COMMAND(p) (0x0680 + ((p) << 10))
13076 +#define TXQ_CURRENT_DESC_PTR(p, q) (0x06c0 + ((p) << 10) + ((q) << 2))
13077 +#define TXQ_BW_TOKENS(p, q) (0x0700 + ((p) << 10) + ((q) << 4))
13078 +#define TXQ_BW_CONF(p, q) (0x0704 + ((p) << 10) + ((q) << 4))
13079 +#define TXQ_BW_WRR_CONF(p, q) (0x0708 + ((p) << 10) + ((q) << 4))
13080 +#define MIB_COUNTERS(p) (0x1000 + ((p) << 7))
13081 +#define SPECIAL_MCAST_TABLE(p) (0x1400 + ((p) << 10))
13082 +#define OTHER_MCAST_TABLE(p) (0x1500 + ((p) << 10))
13083 +#define UNICAST_TABLE(p) (0x1600 + ((p) << 10))
13087 + * SDMA configuration register.
13089 #define RX_BURST_SIZE_4_64BIT (2 << 1)
13090 -#define RX_BURST_SIZE_8_64BIT (3 << 1)
13091 -#define RX_BURST_SIZE_16_64BIT (4 << 1)
13092 #define BLM_RX_NO_SWAP (1 << 4)
13093 -#define BLM_RX_BYTE_SWAP (0 << 4)
13094 #define BLM_TX_NO_SWAP (1 << 5)
13095 -#define BLM_TX_BYTE_SWAP (0 << 5)
13096 -#define DESCRIPTORS_BYTE_SWAP (1 << 6)
13097 -#define DESCRIPTORS_NO_SWAP (0 << 6)
13098 -#define IPG_INT_RX(value) (((value) & 0x3fff) << 8)
13099 -#define TX_BURST_SIZE_1_64BIT (0 << 22)
13100 -#define TX_BURST_SIZE_2_64BIT (1 << 22)
13101 #define TX_BURST_SIZE_4_64BIT (2 << 22)
13102 -#define TX_BURST_SIZE_8_64BIT (3 << 22)
13103 -#define TX_BURST_SIZE_16_64BIT (4 << 22)
13105 #if defined(__BIG_ENDIAN)
13106 #define PORT_SDMA_CONFIG_DEFAULT_VALUE \
13107 RX_BURST_SIZE_4_64BIT | \
13108 - IPG_INT_RX(0) | \
13109 TX_BURST_SIZE_4_64BIT
13110 #elif defined(__LITTLE_ENDIAN)
13111 #define PORT_SDMA_CONFIG_DEFAULT_VALUE \
13112 RX_BURST_SIZE_4_64BIT | \
13115 - IPG_INT_RX(0) | \
13116 TX_BURST_SIZE_4_64BIT
13118 #error One of __BIG_ENDIAN or __LITTLE_ENDIAN must be defined
13121 -/* These macros describe Ethernet Port serial control reg (PSCR) bits */
13122 -#define SERIAL_PORT_DISABLE (0 << 0)
13123 -#define SERIAL_PORT_ENABLE (1 << 0)
13124 -#define DO_NOT_FORCE_LINK_PASS (0 << 1)
13125 -#define FORCE_LINK_PASS (1 << 1)
13126 -#define ENABLE_AUTO_NEG_FOR_DUPLX (0 << 2)
13127 -#define DISABLE_AUTO_NEG_FOR_DUPLX (1 << 2)
13128 -#define ENABLE_AUTO_NEG_FOR_FLOW_CTRL (0 << 3)
13129 -#define DISABLE_AUTO_NEG_FOR_FLOW_CTRL (1 << 3)
13130 -#define ADV_NO_FLOW_CTRL (0 << 4)
13131 -#define ADV_SYMMETRIC_FLOW_CTRL (1 << 4)
13132 -#define FORCE_FC_MODE_NO_PAUSE_DIS_TX (0 << 5)
13133 -#define FORCE_FC_MODE_TX_PAUSE_DIS (1 << 5)
13134 -#define FORCE_BP_MODE_NO_JAM (0 << 7)
13135 -#define FORCE_BP_MODE_JAM_TX (1 << 7)
13136 -#define FORCE_BP_MODE_JAM_TX_ON_RX_ERR (2 << 7)
13137 -#define SERIAL_PORT_CONTROL_RESERVED (1 << 9)
13138 -#define FORCE_LINK_FAIL (0 << 10)
13139 -#define DO_NOT_FORCE_LINK_FAIL (1 << 10)
13140 -#define RETRANSMIT_16_ATTEMPTS (0 << 11)
13141 -#define RETRANSMIT_FOREVER (1 << 11)
13142 -#define ENABLE_AUTO_NEG_SPEED_GMII (0 << 13)
13143 -#define DISABLE_AUTO_NEG_SPEED_GMII (1 << 13)
13144 -#define DTE_ADV_0 (0 << 14)
13145 -#define DTE_ADV_1 (1 << 14)
13146 -#define DISABLE_AUTO_NEG_BYPASS (0 << 15)
13147 -#define ENABLE_AUTO_NEG_BYPASS (1 << 15)
13148 -#define AUTO_NEG_NO_CHANGE (0 << 16)
13149 -#define RESTART_AUTO_NEG (1 << 16)
13150 -#define MAX_RX_PACKET_1518BYTE (0 << 17)
13153 + * Port serial control register.
13155 +#define SET_MII_SPEED_TO_100 (1 << 24)
13156 +#define SET_GMII_SPEED_TO_1000 (1 << 23)
13157 +#define SET_FULL_DUPLEX_MODE (1 << 21)
13158 #define MAX_RX_PACKET_1522BYTE (1 << 17)
13159 -#define MAX_RX_PACKET_1552BYTE (2 << 17)
13160 -#define MAX_RX_PACKET_9022BYTE (3 << 17)
13161 -#define MAX_RX_PACKET_9192BYTE (4 << 17)
13162 #define MAX_RX_PACKET_9700BYTE (5 << 17)
13163 #define MAX_RX_PACKET_MASK (7 << 17)
13164 -#define CLR_EXT_LOOPBACK (0 << 20)
13165 -#define SET_EXT_LOOPBACK (1 << 20)
13166 -#define SET_HALF_DUPLEX_MODE (0 << 21)
13167 -#define SET_FULL_DUPLEX_MODE (1 << 21)
13168 -#define DISABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX (0 << 22)
13169 -#define ENABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX (1 << 22)
13170 -#define SET_GMII_SPEED_TO_10_100 (0 << 23)
13171 -#define SET_GMII_SPEED_TO_1000 (1 << 23)
13172 -#define SET_MII_SPEED_TO_10 (0 << 24)
13173 -#define SET_MII_SPEED_TO_100 (1 << 24)
13174 +#define DISABLE_AUTO_NEG_SPEED_GMII (1 << 13)
13175 +#define DO_NOT_FORCE_LINK_FAIL (1 << 10)
13176 +#define SERIAL_PORT_CONTROL_RESERVED (1 << 9)
13177 +#define DISABLE_AUTO_NEG_FOR_FLOW_CTRL (1 << 3)
13178 +#define DISABLE_AUTO_NEG_FOR_DUPLEX (1 << 2)
13179 +#define FORCE_LINK_PASS (1 << 1)
13180 +#define SERIAL_PORT_ENABLE (1 << 0)
13182 +#define DEFAULT_RX_QUEUE_SIZE 400
13183 +#define DEFAULT_TX_QUEUE_SIZE 800
13185 -#define PORT_SERIAL_CONTROL_DEFAULT_VALUE \
13186 - DO_NOT_FORCE_LINK_PASS | \
13187 - ENABLE_AUTO_NEG_FOR_DUPLX | \
13188 - DISABLE_AUTO_NEG_FOR_FLOW_CTRL | \
13189 - ADV_SYMMETRIC_FLOW_CTRL | \
13190 - FORCE_FC_MODE_NO_PAUSE_DIS_TX | \
13191 - FORCE_BP_MODE_NO_JAM | \
13192 - (1 << 9) /* reserved */ | \
13193 - DO_NOT_FORCE_LINK_FAIL | \
13194 - RETRANSMIT_16_ATTEMPTS | \
13195 - ENABLE_AUTO_NEG_SPEED_GMII | \
13197 - DISABLE_AUTO_NEG_BYPASS | \
13198 - AUTO_NEG_NO_CHANGE | \
13199 - MAX_RX_PACKET_9700BYTE | \
13200 - CLR_EXT_LOOPBACK | \
13201 - SET_FULL_DUPLEX_MODE | \
13202 - ENABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX
13204 -/* These macros describe Ethernet Serial Status reg (PSR) bits */
13205 -#define PORT_STATUS_MODE_10_BIT (1 << 0)
13206 -#define PORT_STATUS_LINK_UP (1 << 1)
13207 -#define PORT_STATUS_FULL_DUPLEX (1 << 2)
13208 -#define PORT_STATUS_FLOW_CONTROL (1 << 3)
13209 -#define PORT_STATUS_GMII_1000 (1 << 4)
13210 -#define PORT_STATUS_MII_100 (1 << 5)
13211 -/* PSR bit 6 is undocumented */
13212 -#define PORT_STATUS_TX_IN_PROGRESS (1 << 7)
13213 -#define PORT_STATUS_AUTONEG_BYPASSED (1 << 8)
13214 -#define PORT_STATUS_PARTITION (1 << 9)
13215 -#define PORT_STATUS_TX_FIFO_EMPTY (1 << 10)
13216 -/* PSR bits 11-31 are reserved */
13218 -#define PORT_DEFAULT_TRANSMIT_QUEUE_SIZE 800
13219 -#define PORT_DEFAULT_RECEIVE_QUEUE_SIZE 400
13221 -#define DESC_SIZE 64
13223 -#define ETH_RX_QUEUES_ENABLED (1 << 0) /* use only Q0 for receive */
13224 -#define ETH_TX_QUEUES_ENABLED (1 << 0) /* use only Q0 for transmit */
13226 -#define ETH_INT_CAUSE_RX_DONE (ETH_RX_QUEUES_ENABLED << 2)
13227 -#define ETH_INT_CAUSE_RX_ERROR (ETH_RX_QUEUES_ENABLED << 9)
13228 -#define ETH_INT_CAUSE_RX (ETH_INT_CAUSE_RX_DONE | ETH_INT_CAUSE_RX_ERROR)
13229 -#define ETH_INT_CAUSE_EXT 0x00000002
13230 -#define ETH_INT_UNMASK_ALL (ETH_INT_CAUSE_RX | ETH_INT_CAUSE_EXT)
13232 -#define ETH_INT_CAUSE_TX_DONE (ETH_TX_QUEUES_ENABLED << 0)
13233 -#define ETH_INT_CAUSE_TX_ERROR (ETH_TX_QUEUES_ENABLED << 8)
13234 -#define ETH_INT_CAUSE_TX (ETH_INT_CAUSE_TX_DONE | ETH_INT_CAUSE_TX_ERROR)
13235 -#define ETH_INT_CAUSE_PHY 0x00010000
13236 -#define ETH_INT_CAUSE_STATE 0x00100000
13237 -#define ETH_INT_UNMASK_ALL_EXT (ETH_INT_CAUSE_TX | ETH_INT_CAUSE_PHY | \
13238 - ETH_INT_CAUSE_STATE)
13240 -#define ETH_INT_MASK_ALL 0x00000000
13241 -#define ETH_INT_MASK_ALL_EXT 0x00000000
13243 -#define PHY_WAIT_ITERATIONS 1000 /* 1000 iterations * 10uS = 10mS max */
13244 -#define PHY_WAIT_MICRO_SECONDS 10
13246 -/* Buffer offset from buffer pointer */
13247 -#define RX_BUF_OFFSET 0x2
13249 -/* Gigabit Ethernet Unit Global Registers */
13251 -/* MIB Counters register definitions */
13252 -#define ETH_MIB_GOOD_OCTETS_RECEIVED_LOW 0x0
13253 -#define ETH_MIB_GOOD_OCTETS_RECEIVED_HIGH 0x4
13254 -#define ETH_MIB_BAD_OCTETS_RECEIVED 0x8
13255 -#define ETH_MIB_INTERNAL_MAC_TRANSMIT_ERR 0xc
13256 -#define ETH_MIB_GOOD_FRAMES_RECEIVED 0x10
13257 -#define ETH_MIB_BAD_FRAMES_RECEIVED 0x14
13258 -#define ETH_MIB_BROADCAST_FRAMES_RECEIVED 0x18
13259 -#define ETH_MIB_MULTICAST_FRAMES_RECEIVED 0x1c
13260 -#define ETH_MIB_FRAMES_64_OCTETS 0x20
13261 -#define ETH_MIB_FRAMES_65_TO_127_OCTETS 0x24
13262 -#define ETH_MIB_FRAMES_128_TO_255_OCTETS 0x28
13263 -#define ETH_MIB_FRAMES_256_TO_511_OCTETS 0x2c
13264 -#define ETH_MIB_FRAMES_512_TO_1023_OCTETS 0x30
13265 -#define ETH_MIB_FRAMES_1024_TO_MAX_OCTETS 0x34
13266 -#define ETH_MIB_GOOD_OCTETS_SENT_LOW 0x38
13267 -#define ETH_MIB_GOOD_OCTETS_SENT_HIGH 0x3c
13268 -#define ETH_MIB_GOOD_FRAMES_SENT 0x40
13269 -#define ETH_MIB_EXCESSIVE_COLLISION 0x44
13270 -#define ETH_MIB_MULTICAST_FRAMES_SENT 0x48
13271 -#define ETH_MIB_BROADCAST_FRAMES_SENT 0x4c
13272 -#define ETH_MIB_UNREC_MAC_CONTROL_RECEIVED 0x50
13273 -#define ETH_MIB_FC_SENT 0x54
13274 -#define ETH_MIB_GOOD_FC_RECEIVED 0x58
13275 -#define ETH_MIB_BAD_FC_RECEIVED 0x5c
13276 -#define ETH_MIB_UNDERSIZE_RECEIVED 0x60
13277 -#define ETH_MIB_FRAGMENTS_RECEIVED 0x64
13278 -#define ETH_MIB_OVERSIZE_RECEIVED 0x68
13279 -#define ETH_MIB_JABBER_RECEIVED 0x6c
13280 -#define ETH_MIB_MAC_RECEIVE_ERROR 0x70
13281 -#define ETH_MIB_BAD_CRC_EVENT 0x74
13282 -#define ETH_MIB_COLLISION 0x78
13283 -#define ETH_MIB_LATE_COLLISION 0x7c
13285 -/* Port serial status reg (PSR) */
13286 -#define ETH_INTERFACE_PCM 0x00000001
13287 -#define ETH_LINK_IS_UP 0x00000002
13288 -#define ETH_PORT_AT_FULL_DUPLEX 0x00000004
13289 -#define ETH_RX_FLOW_CTRL_ENABLED 0x00000008
13290 -#define ETH_GMII_SPEED_1000 0x00000010
13291 -#define ETH_MII_SPEED_100 0x00000020
13292 -#define ETH_TX_IN_PROGRESS 0x00000080
13293 -#define ETH_BYPASS_ACTIVE 0x00000100
13294 -#define ETH_PORT_AT_PARTITION_STATE 0x00000200
13295 -#define ETH_PORT_TX_FIFO_EMPTY 0x00000400
13298 -#define ETH_SMI_BUSY 0x10000000 /* 0 - Write, 1 - Read */
13299 -#define ETH_SMI_READ_VALID 0x08000000 /* 0 - Write, 1 - Read */
13300 -#define ETH_SMI_OPCODE_WRITE 0 /* Completion of Read */
13301 -#define ETH_SMI_OPCODE_READ 0x04000000 /* Operation is in progress */
13303 -/* Interrupt Cause Register Bit Definitions */
13305 -/* SDMA command status fields macros */
13307 -/* Tx & Rx descriptors status */
13308 -#define ETH_ERROR_SUMMARY 0x00000001
13310 -/* Tx & Rx descriptors command */
13311 -#define ETH_BUFFER_OWNED_BY_DMA 0x80000000
13313 -/* Tx descriptors status */
13314 -#define ETH_LC_ERROR 0
13315 -#define ETH_UR_ERROR 0x00000002
13316 -#define ETH_RL_ERROR 0x00000004
13317 -#define ETH_LLC_SNAP_FORMAT 0x00000200
13319 -/* Rx descriptors status */
13320 -#define ETH_OVERRUN_ERROR 0x00000002
13321 -#define ETH_MAX_FRAME_LENGTH_ERROR 0x00000004
13322 -#define ETH_RESOURCE_ERROR 0x00000006
13323 -#define ETH_VLAN_TAGGED 0x00080000
13324 -#define ETH_BPDU_FRAME 0x00100000
13325 -#define ETH_UDP_FRAME_OVER_IP_V_4 0x00200000
13326 -#define ETH_OTHER_FRAME_TYPE 0x00400000
13327 -#define ETH_LAYER_2_IS_ETH_V_2 0x00800000
13328 -#define ETH_FRAME_TYPE_IP_V_4 0x01000000
13329 -#define ETH_FRAME_HEADER_OK 0x02000000
13330 -#define ETH_RX_LAST_DESC 0x04000000
13331 -#define ETH_RX_FIRST_DESC 0x08000000
13332 -#define ETH_UNKNOWN_DESTINATION_ADDR 0x10000000
13333 -#define ETH_RX_ENABLE_INTERRUPT 0x20000000
13334 -#define ETH_LAYER_4_CHECKSUM_OK 0x40000000
13336 -/* Rx descriptors byte count */
13337 -#define ETH_FRAME_FRAGMENTED 0x00000004
13339 -/* Tx descriptors command */
13340 -#define ETH_LAYER_4_CHECKSUM_FIRST_DESC 0x00000400
13341 -#define ETH_FRAME_SET_TO_VLAN 0x00008000
13342 -#define ETH_UDP_FRAME 0x00010000
13343 -#define ETH_GEN_TCP_UDP_CHECKSUM 0x00020000
13344 -#define ETH_GEN_IP_V_4_CHECKSUM 0x00040000
13345 -#define ETH_ZERO_PADDING 0x00080000
13346 -#define ETH_TX_LAST_DESC 0x00100000
13347 -#define ETH_TX_FIRST_DESC 0x00200000
13348 -#define ETH_GEN_CRC 0x00400000
13349 -#define ETH_TX_ENABLE_INTERRUPT 0x00800000
13350 -#define ETH_AUTO_MODE 0x40000000
13352 -#define ETH_TX_IHL_SHIFT 11
13356 -typedef enum _eth_func_ret_status {
13357 - ETH_OK, /* Returned as expected. */
13358 - ETH_ERROR, /* Fundamental error. */
13359 - ETH_RETRY, /* Could not process request. Try later.*/
13360 - ETH_END_OF_JOB, /* Ring has nothing to process. */
13361 - ETH_QUEUE_FULL, /* Ring resource error. */
13362 - ETH_QUEUE_LAST_RESOURCE /* Ring resources about to exhaust. */
13363 -} ETH_FUNC_RET_STATUS;
13365 -/* These are for big-endian machines. Little endian needs different
13368 + * RX/TX descriptors.
13370 #if defined(__BIG_ENDIAN)
13371 -struct eth_rx_desc {
13373 u16 byte_cnt; /* Descriptor buffer byte count */
13374 u16 buf_size; /* Buffer size */
13375 u32 cmd_sts; /* Descriptor command status */
13376 @@ -441,7 +180,7 @@
13377 u32 buf_ptr; /* Descriptor buffer pointer */
13380 -struct eth_tx_desc {
13382 u16 byte_cnt; /* buffer byte count */
13383 u16 l4i_chk; /* CPU provided TCP checksum */
13384 u32 cmd_sts; /* Command/status field */
13385 @@ -449,7 +188,7 @@
13386 u32 buf_ptr; /* pointer to buffer for this descriptor*/
13388 #elif defined(__LITTLE_ENDIAN)
13389 -struct eth_rx_desc {
13391 u32 cmd_sts; /* Descriptor command status */
13392 u16 buf_size; /* Buffer size */
13393 u16 byte_cnt; /* Descriptor buffer byte count */
13394 @@ -457,7 +196,7 @@
13395 u32 next_desc_ptr; /* Next descriptor pointer */
13398 -struct eth_tx_desc {
13400 u32 cmd_sts; /* Command/status field */
13401 u16 l4i_chk; /* CPU provided TCP checksum */
13402 u16 byte_cnt; /* buffer byte count */
13403 @@ -468,18 +207,59 @@
13404 #error One of __BIG_ENDIAN or __LITTLE_ENDIAN must be defined
13407 -/* Unified struct for Rx and Tx operations. The user is not required to */
13408 -/* be familier with neither Tx nor Rx descriptors. */
13410 - unsigned short byte_cnt; /* Descriptor buffer byte count */
13411 - unsigned short l4i_chk; /* Tx CPU provided TCP Checksum */
13412 - unsigned int cmd_sts; /* Descriptor command status */
13413 - dma_addr_t buf_ptr; /* Descriptor buffer pointer */
13414 - struct sk_buff *return_info; /* User resource return information */
13415 +/* RX & TX descriptor command */
13416 +#define BUFFER_OWNED_BY_DMA 0x80000000
13418 +/* RX & TX descriptor status */
13419 +#define ERROR_SUMMARY 0x00000001
13421 +/* RX descriptor status */
13422 +#define LAYER_4_CHECKSUM_OK 0x40000000
13423 +#define RX_ENABLE_INTERRUPT 0x20000000
13424 +#define RX_FIRST_DESC 0x08000000
13425 +#define RX_LAST_DESC 0x04000000
13427 +/* TX descriptor command */
13428 +#define TX_ENABLE_INTERRUPT 0x00800000
13429 +#define GEN_CRC 0x00400000
13430 +#define TX_FIRST_DESC 0x00200000
13431 +#define TX_LAST_DESC 0x00100000
13432 +#define ZERO_PADDING 0x00080000
13433 +#define GEN_IP_V4_CHECKSUM 0x00040000
13434 +#define GEN_TCP_UDP_CHECKSUM 0x00020000
13435 +#define UDP_FRAME 0x00010000
13437 +#define TX_IHL_SHIFT 11
13440 +/* global *******************************************************************/
13441 +struct mv643xx_eth_shared_private {
13443 + * Ethernet controller base address.
13445 + void __iomem *base;
13448 + * Protects access to SMI_REG, which is shared between ports.
13450 + spinlock_t phy_lock;
13453 + * Per-port MBUS window access register value.
13458 + * Hardware-specific parameters.
13460 + unsigned int t_clk;
13461 + int extended_rx_coal_limit;
13462 + int tx_bw_control_moved;
13465 -/* Ethernet port specific information */
13466 -struct mv643xx_mib_counters {
13468 +/* per-port *****************************************************************/
13469 +struct mib_counters {
13470 u64 good_octets_received;
13471 u32 bad_octets_received;
13472 u32 internal_mac_transmit_err;
13473 @@ -512,461 +292,282 @@
13474 u32 late_collision;
13477 -struct mv643xx_shared_private {
13478 - void __iomem *eth_base;
13480 - /* used to protect SMI_REG, which is shared across ports */
13481 - spinlock_t phy_lock;
13485 - unsigned int t_clk;
13488 -struct mv643xx_private {
13489 - struct mv643xx_shared_private *shared;
13490 - int port_num; /* User Ethernet port number */
13492 - struct mv643xx_shared_private *shared_smi;
13496 - u32 rx_sram_addr; /* Base address of rx sram area */
13497 - u32 rx_sram_size; /* Size of rx sram area */
13498 - u32 tx_sram_addr; /* Base address of tx sram area */
13499 - u32 tx_sram_size; /* Size of tx sram area */
13500 + int rx_ring_size;
13502 - int rx_resource_err; /* Rx ring resource error flag */
13503 + int rx_desc_count;
13504 + int rx_curr_desc;
13505 + int rx_used_desc;
13507 - /* Tx/Rx rings managment indexes fields. For driver use */
13508 + struct rx_desc *rx_desc_area;
13509 + dma_addr_t rx_desc_dma;
13510 + int rx_desc_area_size;
13511 + struct sk_buff **rx_skb;
13513 - /* Next available and first returning Rx resource */
13514 - int rx_curr_desc_q, rx_used_desc_q;
13515 + struct timer_list rx_oom;
13518 - /* Next available and first returning Tx resource */
13519 - int tx_curr_desc_q, tx_used_desc_q;
13523 -#ifdef MV643XX_TX_FAST_REFILL
13524 - u32 tx_clean_threshold;
13526 + int tx_ring_size;
13528 - struct eth_rx_desc *p_rx_desc_area;
13529 - dma_addr_t rx_desc_dma;
13530 - int rx_desc_area_size;
13531 - struct sk_buff **rx_skb;
13532 + int tx_desc_count;
13533 + int tx_curr_desc;
13534 + int tx_used_desc;
13536 - struct eth_tx_desc *p_tx_desc_area;
13537 + struct tx_desc *tx_desc_area;
13538 dma_addr_t tx_desc_dma;
13539 int tx_desc_area_size;
13540 struct sk_buff **tx_skb;
13543 - struct work_struct tx_timeout_task;
13544 +struct mv643xx_eth_private {
13545 + struct mv643xx_eth_shared_private *shared;
13548 struct net_device *dev;
13549 - struct napi_struct napi;
13550 - struct net_device_stats stats;
13551 - struct mv643xx_mib_counters mib_counters;
13553 + struct mv643xx_eth_shared_private *shared_smi;
13557 - /* Size of Tx Ring per queue */
13558 - int tx_ring_size;
13559 - /* Number of tx descriptors in use */
13560 - int tx_desc_count;
13561 - /* Size of Rx Ring per queue */
13562 - int rx_ring_size;
13563 - /* Number of rx descriptors in use */
13564 - int rx_desc_count;
13566 + struct mib_counters mib_counters;
13567 + struct work_struct tx_timeout_task;
13568 + struct mii_if_info mii;
13571 - * Used in case RX Ring is empty, which can be caused when
13572 - * system does not have resources (skb's)
13575 - struct timer_list timeout;
13579 - struct mii_if_info mii;
13581 + int default_rx_ring_size;
13582 + unsigned long rx_desc_sram_addr;
13583 + int rx_desc_sram_size;
13586 + struct napi_struct napi;
13587 + struct rx_queue rxq[8];
13589 -/* Static function declarations */
13590 -static void eth_port_init(struct mv643xx_private *mp);
13591 -static void eth_port_reset(struct mv643xx_private *mp);
13592 -static void eth_port_start(struct net_device *dev);
13594 -static void ethernet_phy_reset(struct mv643xx_private *mp);
13596 -static void eth_port_write_smi_reg(struct mv643xx_private *mp,
13597 - unsigned int phy_reg, unsigned int value);
13599 -static void eth_port_read_smi_reg(struct mv643xx_private *mp,
13600 - unsigned int phy_reg, unsigned int *value);
13602 -static void eth_clear_mib_counters(struct mv643xx_private *mp);
13604 -static ETH_FUNC_RET_STATUS eth_port_receive(struct mv643xx_private *mp,
13605 - struct pkt_info *p_pkt_info);
13606 -static ETH_FUNC_RET_STATUS eth_rx_return_buff(struct mv643xx_private *mp,
13607 - struct pkt_info *p_pkt_info);
13609 -static void eth_port_uc_addr_get(struct mv643xx_private *mp,
13610 - unsigned char *p_addr);
13611 -static void eth_port_uc_addr_set(struct mv643xx_private *mp,
13612 - unsigned char *p_addr);
13613 -static void eth_port_set_multicast_list(struct net_device *);
13614 -static void mv643xx_eth_port_enable_tx(struct mv643xx_private *mp,
13615 - unsigned int queues);
13616 -static void mv643xx_eth_port_enable_rx(struct mv643xx_private *mp,
13617 - unsigned int queues);
13618 -static unsigned int mv643xx_eth_port_disable_tx(struct mv643xx_private *mp);
13619 -static unsigned int mv643xx_eth_port_disable_rx(struct mv643xx_private *mp);
13620 -static int mv643xx_eth_open(struct net_device *);
13621 -static int mv643xx_eth_stop(struct net_device *);
13622 -static void eth_port_init_mac_tables(struct mv643xx_private *mp);
13623 -#ifdef MV643XX_NAPI
13624 -static int mv643xx_poll(struct napi_struct *napi, int budget);
13628 + int default_tx_ring_size;
13629 + unsigned long tx_desc_sram_addr;
13630 + int tx_desc_sram_size;
13633 + struct tx_queue txq[8];
13634 +#ifdef MV643XX_ETH_TX_FAST_REFILL
13635 + int tx_clean_threshold;
13637 -static int ethernet_phy_get(struct mv643xx_private *mp);
13638 -static void ethernet_phy_set(struct mv643xx_private *mp, int phy_addr);
13639 -static int ethernet_phy_detect(struct mv643xx_private *mp);
13640 -static int mv643xx_mdio_read(struct net_device *dev, int phy_id, int location);
13641 -static void mv643xx_mdio_write(struct net_device *dev, int phy_id, int location, int val);
13642 -static int mv643xx_eth_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
13643 -static const struct ethtool_ops mv643xx_ethtool_ops;
13646 -static char mv643xx_driver_name[] = "mv643xx_eth";
13647 -static char mv643xx_driver_version[] = "1.0";
13649 -static inline u32 rdl(struct mv643xx_private *mp, int offset)
13650 +/* port register accessors **************************************************/
13651 +static inline u32 rdl(struct mv643xx_eth_private *mp, int offset)
13653 - return readl(mp->shared->eth_base + offset);
13654 + return readl(mp->shared->base + offset);
13657 -static inline void wrl(struct mv643xx_private *mp, int offset, u32 data)
13658 +static inline void wrl(struct mv643xx_eth_private *mp, int offset, u32 data)
13660 - writel(data, mp->shared->eth_base + offset);
13661 + writel(data, mp->shared->base + offset);
13665 - * Changes MTU (maximum transfer unit) of the gigabit ethenret port
13667 - * Input : pointer to ethernet interface network device structure
13669 - * Output : 0 upon success, -EINVAL upon failure
13671 -static int mv643xx_eth_change_mtu(struct net_device *dev, int new_mtu)
13673 - if ((new_mtu > 9500) || (new_mtu < 64))
13676 - dev->mtu = new_mtu;
13677 - if (!netif_running(dev))
13681 - * Stop and then re-open the interface. This will allocate RX
13682 - * skbs of the new MTU.
13683 - * There is a possible danger that the open will not succeed,
13684 - * due to memory being full, which might fail the open function.
13686 - mv643xx_eth_stop(dev);
13687 - if (mv643xx_eth_open(dev)) {
13688 - printk(KERN_ERR "%s: Fatal error on opening device\n",
13696 - * mv643xx_eth_rx_refill_descs
13698 - * Fills / refills RX queue on a certain gigabit ethernet port
13700 - * Input : pointer to ethernet interface network device structure
13703 -static void mv643xx_eth_rx_refill_descs(struct net_device *dev)
13704 +/* rxq/txq helper functions *************************************************/
13705 +static struct mv643xx_eth_private *rxq_to_mp(struct rx_queue *rxq)
13707 - struct mv643xx_private *mp = netdev_priv(dev);
13708 - struct pkt_info pkt_info;
13709 - struct sk_buff *skb;
13712 - while (mp->rx_desc_count < mp->rx_ring_size) {
13713 - skb = dev_alloc_skb(ETH_RX_SKB_SIZE + dma_get_cache_alignment());
13716 - mp->rx_desc_count++;
13717 - unaligned = (u32)skb->data & (dma_get_cache_alignment() - 1);
13719 - skb_reserve(skb, dma_get_cache_alignment() - unaligned);
13720 - pkt_info.cmd_sts = ETH_RX_ENABLE_INTERRUPT;
13721 - pkt_info.byte_cnt = ETH_RX_SKB_SIZE;
13722 - pkt_info.buf_ptr = dma_map_single(NULL, skb->data,
13723 - ETH_RX_SKB_SIZE, DMA_FROM_DEVICE);
13724 - pkt_info.return_info = skb;
13725 - if (eth_rx_return_buff(mp, &pkt_info) != ETH_OK) {
13727 - "%s: Error allocating RX Ring\n", dev->name);
13730 - skb_reserve(skb, ETH_HW_IP_ALIGN);
13733 - * If RX ring is empty of SKB, set a timer to try allocating
13734 - * again at a later time.
13736 - if (mp->rx_desc_count == 0) {
13737 - printk(KERN_INFO "%s: Rx ring is empty\n", dev->name);
13738 - mp->timeout.expires = jiffies + (HZ / 10); /* 100 mSec */
13739 - add_timer(&mp->timeout);
13741 + return container_of(rxq, struct mv643xx_eth_private, rxq[rxq->index]);
13745 - * mv643xx_eth_rx_refill_descs_timer_wrapper
13747 - * Timer routine to wake up RX queue filling task. This function is
13748 - * used only in case the RX queue is empty, and all alloc_skb has
13749 - * failed (due to out of memory event).
13751 - * Input : pointer to ethernet interface network device structure
13754 -static inline void mv643xx_eth_rx_refill_descs_timer_wrapper(unsigned long data)
13755 +static struct mv643xx_eth_private *txq_to_mp(struct tx_queue *txq)
13757 - mv643xx_eth_rx_refill_descs((struct net_device *)data);
13758 + return container_of(txq, struct mv643xx_eth_private, txq[txq->index]);
13762 - * mv643xx_eth_update_mac_address
13764 - * Update the MAC address of the port in the address table
13766 - * Input : pointer to ethernet interface network device structure
13769 -static void mv643xx_eth_update_mac_address(struct net_device *dev)
13770 +static void rxq_enable(struct rx_queue *rxq)
13772 - struct mv643xx_private *mp = netdev_priv(dev);
13774 - eth_port_init_mac_tables(mp);
13775 - eth_port_uc_addr_set(mp, dev->dev_addr);
13776 + struct mv643xx_eth_private *mp = rxq_to_mp(rxq);
13777 + wrl(mp, RXQ_COMMAND(mp->port_num), 1 << rxq->index);
13781 - * mv643xx_eth_set_rx_mode
13783 - * Change from promiscuos to regular rx mode
13785 - * Input : pointer to ethernet interface network device structure
13788 -static void mv643xx_eth_set_rx_mode(struct net_device *dev)
13789 +static void rxq_disable(struct rx_queue *rxq)
13791 - struct mv643xx_private *mp = netdev_priv(dev);
13794 - config_reg = rdl(mp, PORT_CONFIG_REG(mp->port_num));
13795 - if (dev->flags & IFF_PROMISC)
13796 - config_reg |= (u32) UNICAST_PROMISCUOUS_MODE;
13798 - config_reg &= ~(u32) UNICAST_PROMISCUOUS_MODE;
13799 - wrl(mp, PORT_CONFIG_REG(mp->port_num), config_reg);
13800 + struct mv643xx_eth_private *mp = rxq_to_mp(rxq);
13801 + u8 mask = 1 << rxq->index;
13803 - eth_port_set_multicast_list(dev);
13804 + wrl(mp, RXQ_COMMAND(mp->port_num), mask << 8);
13805 + while (rdl(mp, RXQ_COMMAND(mp->port_num)) & mask)
13810 - * mv643xx_eth_set_mac_address
13812 - * Change the interface's mac address.
13813 - * No special hardware thing should be done because interface is always
13814 - * put in promiscuous mode.
13816 - * Input : pointer to ethernet interface network device structure and
13817 - * a pointer to the designated entry to be added to the cache.
13818 - * Output : zero upon success, negative upon failure
13820 -static int mv643xx_eth_set_mac_address(struct net_device *dev, void *addr)
13821 +static void txq_enable(struct tx_queue *txq)
13825 - for (i = 0; i < 6; i++)
13826 - /* +2 is for the offset of the HW addr type */
13827 - dev->dev_addr[i] = ((unsigned char *)addr)[i + 2];
13828 - mv643xx_eth_update_mac_address(dev);
13830 + struct mv643xx_eth_private *mp = txq_to_mp(txq);
13831 + wrl(mp, TXQ_COMMAND(mp->port_num), 1 << txq->index);
13835 - * mv643xx_eth_tx_timeout
13837 - * Called upon a timeout on transmitting a packet
13839 - * Input : pointer to ethernet interface network device structure.
13842 -static void mv643xx_eth_tx_timeout(struct net_device *dev)
13843 +static void txq_disable(struct tx_queue *txq)
13845 - struct mv643xx_private *mp = netdev_priv(dev);
13847 - printk(KERN_INFO "%s: TX timeout ", dev->name);
13848 + struct mv643xx_eth_private *mp = txq_to_mp(txq);
13849 + u8 mask = 1 << txq->index;
13851 - /* Do the reset outside of interrupt context */
13852 - schedule_work(&mp->tx_timeout_task);
13853 + wrl(mp, TXQ_COMMAND(mp->port_num), mask << 8);
13854 + while (rdl(mp, TXQ_COMMAND(mp->port_num)) & mask)
13859 - * mv643xx_eth_tx_timeout_task
13861 - * Actual routine to reset the adapter when a timeout on Tx has occurred
13863 -static void mv643xx_eth_tx_timeout_task(struct work_struct *ugly)
13864 +static void __txq_maybe_wake(struct tx_queue *txq)
13866 - struct mv643xx_private *mp = container_of(ugly, struct mv643xx_private,
13867 - tx_timeout_task);
13868 - struct net_device *dev = mp->dev;
13869 + struct mv643xx_eth_private *mp = txq_to_mp(txq);
13871 - if (!netif_running(dev))
13874 + * netif_{stop,wake}_queue() flow control only applies to
13875 + * the primary queue.
13877 + BUG_ON(txq->index != mp->txq_primary);
13879 - netif_stop_queue(dev);
13880 + if (txq->tx_ring_size - txq->tx_desc_count >= MAX_DESCS_PER_SKB)
13881 + netif_wake_queue(mp->dev);
13884 - eth_port_reset(mp);
13885 - eth_port_start(dev);
13887 - if (mp->tx_ring_size - mp->tx_desc_count >= MAX_DESCS_PER_SKB)
13888 - netif_wake_queue(dev);
13890 +/* rx ***********************************************************************/
13891 +static void txq_reclaim(struct tx_queue *txq, int force);
13894 - * mv643xx_eth_free_tx_descs - Free the tx desc data for completed descriptors
13896 - * If force is non-zero, frees uncompleted descriptors as well
13898 -static int mv643xx_eth_free_tx_descs(struct net_device *dev, int force)
13899 +static void rxq_refill(struct rx_queue *rxq)
13901 - struct mv643xx_private *mp = netdev_priv(dev);
13902 - struct eth_tx_desc *desc;
13904 - struct sk_buff *skb;
13905 + struct mv643xx_eth_private *mp = rxq_to_mp(rxq);
13906 unsigned long flags;
13910 - int released = 0;
13912 - while (mp->tx_desc_count > 0) {
13913 - spin_lock_irqsave(&mp->lock, flags);
13915 - /* tx_desc_count might have changed before acquiring the lock */
13916 - if (mp->tx_desc_count <= 0) {
13917 - spin_unlock_irqrestore(&mp->lock, flags);
13921 - tx_index = mp->tx_used_desc_q;
13922 - desc = &mp->p_tx_desc_area[tx_index];
13923 - cmd_sts = desc->cmd_sts;
13925 - if (!force && (cmd_sts & ETH_BUFFER_OWNED_BY_DMA)) {
13926 - spin_unlock_irqrestore(&mp->lock, flags);
13929 + spin_lock_irqsave(&mp->lock, flags);
13931 - mp->tx_used_desc_q = (tx_index + 1) % mp->tx_ring_size;
13932 - mp->tx_desc_count--;
13933 + while (rxq->rx_desc_count < rxq->rx_ring_size) {
13935 + struct sk_buff *skb;
13939 - addr = desc->buf_ptr;
13940 - count = desc->byte_cnt;
13941 - skb = mp->tx_skb[tx_index];
13943 - mp->tx_skb[tx_index] = NULL;
13945 + * Reserve 2+14 bytes for an ethernet header (the
13946 + * hardware automatically prepends 2 bytes of dummy
13947 + * data to each received packet), 4 bytes for a VLAN
13948 + * header, and 4 bytes for the trailing FCS -- 24
13951 + skb_size = mp->dev->mtu + 24;
13953 - if (cmd_sts & ETH_ERROR_SUMMARY) {
13954 - printk("%s: Error in TX\n", dev->name);
13955 - dev->stats.tx_errors++;
13957 + skb = dev_alloc_skb(skb_size + dma_get_cache_alignment() - 1);
13961 - spin_unlock_irqrestore(&mp->lock, flags);
13962 + unaligned = (u32)skb->data & (dma_get_cache_alignment() - 1);
13964 + skb_reserve(skb, dma_get_cache_alignment() - unaligned);
13966 - if (cmd_sts & ETH_TX_FIRST_DESC)
13967 - dma_unmap_single(NULL, addr, count, DMA_TO_DEVICE);
13969 - dma_unmap_page(NULL, addr, count, DMA_TO_DEVICE);
13970 + rxq->rx_desc_count++;
13971 + rx = rxq->rx_used_desc;
13972 + rxq->rx_used_desc = (rx + 1) % rxq->rx_ring_size;
13974 + rxq->rx_desc_area[rx].buf_ptr = dma_map_single(NULL, skb->data,
13975 + skb_size, DMA_FROM_DEVICE);
13976 + rxq->rx_desc_area[rx].buf_size = skb_size;
13977 + rxq->rx_skb[rx] = skb;
13979 + rxq->rx_desc_area[rx].cmd_sts = BUFFER_OWNED_BY_DMA |
13980 + RX_ENABLE_INTERRUPT;
13984 - dev_kfree_skb_irq(skb);
13986 + * The hardware automatically prepends 2 bytes of
13987 + * dummy data to each received packet, so that the
13988 + * IP header ends up 16-byte aligned.
13990 + skb_reserve(skb, 2);
13994 + if (rxq->rx_desc_count != rxq->rx_ring_size) {
13995 + rxq->rx_oom.expires = jiffies + (HZ / 10);
13996 + add_timer(&rxq->rx_oom);
14000 + spin_unlock_irqrestore(&mp->lock, flags);
14003 -static void mv643xx_eth_free_completed_tx_descs(struct net_device *dev)
14004 +static inline void rxq_refill_timer_wrapper(unsigned long data)
14006 - struct mv643xx_private *mp = netdev_priv(dev);
14008 - if (mv643xx_eth_free_tx_descs(dev, 0) &&
14009 - mp->tx_ring_size - mp->tx_desc_count >= MAX_DESCS_PER_SKB)
14010 - netif_wake_queue(dev);
14011 + rxq_refill((struct rx_queue *)data);
14014 -static void mv643xx_eth_free_all_tx_descs(struct net_device *dev)
14015 +static int rxq_process(struct rx_queue *rxq, int budget)
14017 - mv643xx_eth_free_tx_descs(dev, 1);
14019 + struct mv643xx_eth_private *mp = rxq_to_mp(rxq);
14020 + struct net_device_stats *stats = &mp->dev->stats;
14024 - * mv643xx_eth_receive
14026 - * This function is forward packets that are received from the port's
14027 - * queues toward kernel core or FastRoute them to another interface.
14029 - * Input : dev - a pointer to the required interface
14030 - * max - maximum number to receive (0 means unlimted)
14032 - * Output : number of served packets
14034 -static int mv643xx_eth_receive_queue(struct net_device *dev, int budget)
14036 - struct mv643xx_private *mp = netdev_priv(dev);
14037 - struct net_device_stats *stats = &dev->stats;
14038 - unsigned int received_packets = 0;
14039 - struct sk_buff *skb;
14040 - struct pkt_info pkt_info;
14042 - while (budget-- > 0 && eth_port_receive(mp, &pkt_info) == ETH_OK) {
14043 - dma_unmap_single(NULL, pkt_info.buf_ptr, ETH_RX_SKB_SIZE,
14044 - DMA_FROM_DEVICE);
14045 - mp->rx_desc_count--;
14046 - received_packets++;
14048 + while (rx < budget) {
14049 + struct rx_desc *rx_desc;
14050 + unsigned int cmd_sts;
14051 + struct sk_buff *skb;
14052 + unsigned long flags;
14054 + spin_lock_irqsave(&mp->lock, flags);
14056 + rx_desc = &rxq->rx_desc_area[rxq->rx_curr_desc];
14058 + cmd_sts = rx_desc->cmd_sts;
14059 + if (cmd_sts & BUFFER_OWNED_BY_DMA) {
14060 + spin_unlock_irqrestore(&mp->lock, flags);
14065 + skb = rxq->rx_skb[rxq->rx_curr_desc];
14066 + rxq->rx_skb[rxq->rx_curr_desc] = NULL;
14068 + rxq->rx_curr_desc = (rxq->rx_curr_desc + 1) % rxq->rx_ring_size;
14070 + spin_unlock_irqrestore(&mp->lock, flags);
14072 + dma_unmap_single(NULL, rx_desc->buf_ptr + 2,
14073 + mp->dev->mtu + 24, DMA_FROM_DEVICE);
14074 + rxq->rx_desc_count--;
14078 * Update statistics.
14079 - * Note byte count includes 4 byte CRC count
14081 + * Note that the descriptor byte count includes 2 dummy
14082 + * bytes automatically inserted by the hardware at the
14083 + * start of the packet (which we don't count), and a 4
14084 + * byte CRC at the end of the packet (which we do count).
14086 stats->rx_packets++;
14087 - stats->rx_bytes += pkt_info.byte_cnt;
14088 - skb = pkt_info.return_info;
14089 + stats->rx_bytes += rx_desc->byte_cnt - 2;
14092 - * In case received a packet without first / last bits on OR
14093 - * the error summary bit is on, the packets needs to be dropeed.
14094 + * In case we received a packet without first / last bits
14095 + * on, or the error summary bit is set, the packet needs
14098 - if (((pkt_info.cmd_sts
14099 - & (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC)) !=
14100 - (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC))
14101 - || (pkt_info.cmd_sts & ETH_ERROR_SUMMARY)) {
14102 + if (((cmd_sts & (RX_FIRST_DESC | RX_LAST_DESC)) !=
14103 + (RX_FIRST_DESC | RX_LAST_DESC))
14104 + || (cmd_sts & ERROR_SUMMARY)) {
14105 stats->rx_dropped++;
14106 - if ((pkt_info.cmd_sts & (ETH_RX_FIRST_DESC |
14107 - ETH_RX_LAST_DESC)) !=
14108 - (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC)) {
14110 + if ((cmd_sts & (RX_FIRST_DESC | RX_LAST_DESC)) !=
14111 + (RX_FIRST_DESC | RX_LAST_DESC)) {
14112 if (net_ratelimit())
14114 - "%s: Received packet spread "
14115 - "on multiple descriptors\n",
14117 + dev_printk(KERN_ERR, &mp->dev->dev,
14118 + "received packet spanning "
14119 + "multiple descriptors\n");
14121 - if (pkt_info.cmd_sts & ETH_ERROR_SUMMARY)
14123 + if (cmd_sts & ERROR_SUMMARY)
14124 stats->rx_errors++;
14126 dev_kfree_skb_irq(skb);
14127 @@ -975,668 +576,120 @@
14128 * The -4 is for the CRC in the trailer of the
14131 - skb_put(skb, pkt_info.byte_cnt - 4);
14132 + skb_put(skb, rx_desc->byte_cnt - 2 - 4);
14134 - if (pkt_info.cmd_sts & ETH_LAYER_4_CHECKSUM_OK) {
14135 + if (cmd_sts & LAYER_4_CHECKSUM_OK) {
14136 skb->ip_summed = CHECKSUM_UNNECESSARY;
14138 - (pkt_info.cmd_sts & 0x0007fff8) >> 3);
14139 + (cmd_sts & 0x0007fff8) >> 3);
14141 - skb->protocol = eth_type_trans(skb, dev);
14142 -#ifdef MV643XX_NAPI
14143 + skb->protocol = eth_type_trans(skb, mp->dev);
14144 +#ifdef MV643XX_ETH_NAPI
14145 netif_receive_skb(skb);
14150 - dev->last_rx = jiffies;
14152 + mp->dev->last_rx = jiffies;
14154 - mv643xx_eth_rx_refill_descs(dev); /* Fill RX ring with skb's */
14156 - return received_packets;
14162 -/* Set the mv643xx port configuration register for the speed/duplex mode. */
14163 -static void mv643xx_eth_update_pscr(struct net_device *dev,
14164 - struct ethtool_cmd *ecmd)
14165 +#ifdef MV643XX_ETH_NAPI
14166 +static int mv643xx_eth_poll(struct napi_struct *napi, int budget)
14168 - struct mv643xx_private *mp = netdev_priv(dev);
14169 - int port_num = mp->port_num;
14170 - u32 o_pscr, n_pscr;
14171 - unsigned int queues;
14172 + struct mv643xx_eth_private *mp;
14176 - o_pscr = rdl(mp, PORT_SERIAL_CONTROL_REG(port_num));
14178 + mp = container_of(napi, struct mv643xx_eth_private, napi);
14180 - /* clear speed, duplex and rx buffer size fields */
14181 - n_pscr &= ~(SET_MII_SPEED_TO_100 |
14182 - SET_GMII_SPEED_TO_1000 |
14183 - SET_FULL_DUPLEX_MODE |
14184 - MAX_RX_PACKET_MASK);
14186 - if (ecmd->duplex == DUPLEX_FULL)
14187 - n_pscr |= SET_FULL_DUPLEX_MODE;
14189 - if (ecmd->speed == SPEED_1000)
14190 - n_pscr |= SET_GMII_SPEED_TO_1000 |
14191 - MAX_RX_PACKET_9700BYTE;
14193 - if (ecmd->speed == SPEED_100)
14194 - n_pscr |= SET_MII_SPEED_TO_100;
14195 - n_pscr |= MAX_RX_PACKET_1522BYTE;
14198 - if (n_pscr != o_pscr) {
14199 - if ((o_pscr & SERIAL_PORT_ENABLE) == 0)
14200 - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), n_pscr);
14202 - queues = mv643xx_eth_port_disable_tx(mp);
14203 +#ifdef MV643XX_ETH_TX_FAST_REFILL
14204 + if (++mp->tx_clean_threshold > 5) {
14205 + mp->tx_clean_threshold = 0;
14206 + for (i = 0; i < 8; i++)
14207 + if (mp->txq_mask & (1 << i))
14208 + txq_reclaim(mp->txq + i, 0);
14212 - o_pscr &= ~SERIAL_PORT_ENABLE;
14213 - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), o_pscr);
14214 - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), n_pscr);
14215 - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), n_pscr);
14217 - mv643xx_eth_port_enable_tx(mp, queues);
14220 + for (i = 7; rx < budget && i >= 0; i--)
14221 + if (mp->rxq_mask & (1 << i))
14222 + rx += rxq_process(mp->rxq + i, budget - rx);
14224 + if (rx < budget) {
14225 + netif_rx_complete(mp->dev, napi);
14226 + wrl(mp, INT_CAUSE(mp->port_num), 0);
14227 + wrl(mp, INT_CAUSE_EXT(mp->port_num), 0);
14228 + wrl(mp, INT_MASK(mp->port_num), INT_TX_END | INT_RX | INT_EXT);
14236 - * mv643xx_eth_int_handler
14238 - * Main interrupt handler for the gigbit ethernet ports
14240 - * Input : irq - irq number (not used)
14241 - * dev_id - a pointer to the required interface's data structure
14242 - * regs - not used
14246 -static irqreturn_t mv643xx_eth_int_handler(int irq, void *dev_id)
14247 +/* tx ***********************************************************************/
14248 +static inline unsigned int has_tiny_unaligned_frags(struct sk_buff *skb)
14250 - struct net_device *dev = (struct net_device *)dev_id;
14251 - struct mv643xx_private *mp = netdev_priv(dev);
14252 - u32 eth_int_cause, eth_int_cause_ext = 0;
14253 - unsigned int port_num = mp->port_num;
14255 - /* Read interrupt cause registers */
14256 - eth_int_cause = rdl(mp, INTERRUPT_CAUSE_REG(port_num)) &
14257 - ETH_INT_UNMASK_ALL;
14258 - if (eth_int_cause & ETH_INT_CAUSE_EXT) {
14259 - eth_int_cause_ext = rdl(mp,
14260 - INTERRUPT_CAUSE_EXTEND_REG(port_num)) &
14261 - ETH_INT_UNMASK_ALL_EXT;
14262 - wrl(mp, INTERRUPT_CAUSE_EXTEND_REG(port_num),
14263 - ~eth_int_cause_ext);
14266 - /* PHY status changed */
14267 - if (eth_int_cause_ext & (ETH_INT_CAUSE_PHY | ETH_INT_CAUSE_STATE)) {
14268 - struct ethtool_cmd cmd;
14271 - if (mii_link_ok(&mp->mii)) {
14272 - mii_ethtool_gset(&mp->mii, &cmd);
14273 - mv643xx_eth_update_pscr(dev, &cmd);
14274 - mv643xx_eth_port_enable_tx(mp, ETH_TX_QUEUES_ENABLED);
14275 - if (!netif_carrier_ok(dev)) {
14276 - netif_carrier_on(dev);
14277 - if (mp->tx_ring_size - mp->tx_desc_count >=
14278 - MAX_DESCS_PER_SKB)
14279 - netif_wake_queue(dev);
14281 - } else if (netif_carrier_ok(dev)) {
14282 - netif_stop_queue(dev);
14283 - netif_carrier_off(dev);
14285 + for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
14286 + skb_frag_t *fragp = &skb_shinfo(skb)->frags[frag];
14287 + if (fragp->size <= 8 && fragp->page_offset & 7)
14291 -#ifdef MV643XX_NAPI
14292 - if (eth_int_cause & ETH_INT_CAUSE_RX) {
14293 - /* schedule the NAPI poll routine to maintain port */
14294 - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_MASK_ALL);
14298 - /* wait for previous write to complete */
14299 - rdl(mp, INTERRUPT_MASK_REG(port_num));
14300 +static int txq_alloc_desc_index(struct tx_queue *txq)
14302 + int tx_desc_curr;
14304 - netif_rx_schedule(dev, &mp->napi);
14307 - if (eth_int_cause & ETH_INT_CAUSE_RX)
14308 - mv643xx_eth_receive_queue(dev, INT_MAX);
14310 - if (eth_int_cause_ext & ETH_INT_CAUSE_TX)
14311 - mv643xx_eth_free_completed_tx_descs(dev);
14312 + BUG_ON(txq->tx_desc_count >= txq->tx_ring_size);
14315 - * If no real interrupt occured, exit.
14316 - * This can happen when using gigE interrupt coalescing mechanism.
14318 - if ((eth_int_cause == 0x0) && (eth_int_cause_ext == 0x0))
14320 + tx_desc_curr = txq->tx_curr_desc;
14321 + txq->tx_curr_desc = (tx_desc_curr + 1) % txq->tx_ring_size;
14323 - return IRQ_HANDLED;
14326 -#ifdef MV643XX_COAL
14329 - * eth_port_set_rx_coal - Sets coalescing interrupt mechanism on RX path
14332 - * This routine sets the RX coalescing interrupt mechanism parameter.
14333 - * This parameter is a timeout counter, that counts in 64 t_clk
14334 - * chunks ; that when timeout event occurs a maskable interrupt
14336 - * The parameter is calculated using the tClk of the MV-643xx chip
14337 - * , and the required delay of the interrupt in usec.
14340 - * struct mv643xx_private *mp Ethernet port
14341 - * unsigned int delay Delay in usec
14344 - * Interrupt coalescing mechanism value is set in MV-643xx chip.
14347 - * The interrupt coalescing value set in the gigE port.
14350 -static unsigned int eth_port_set_rx_coal(struct mv643xx_private *mp,
14351 - unsigned int delay)
14353 - unsigned int port_num = mp->port_num;
14354 - unsigned int coal = ((mp->shared->t_clk / 1000000) * delay) / 64;
14356 - /* Set RX Coalescing mechanism */
14357 - wrl(mp, SDMA_CONFIG_REG(port_num),
14358 - ((coal & 0x3fff) << 8) |
14359 - (rdl(mp, SDMA_CONFIG_REG(port_num))
14367 - * eth_port_set_tx_coal - Sets coalescing interrupt mechanism on TX path
14370 - * This routine sets the TX coalescing interrupt mechanism parameter.
14371 - * This parameter is a timeout counter, that counts in 64 t_clk
14372 - * chunks ; that when timeout event occurs a maskable interrupt
14374 - * The parameter is calculated using the t_cLK frequency of the
14375 - * MV-643xx chip and the required delay in the interrupt in uSec
14378 - * struct mv643xx_private *mp Ethernet port
14379 - * unsigned int delay Delay in uSeconds
14382 - * Interrupt coalescing mechanism value is set in MV-643xx chip.
14385 - * The interrupt coalescing value set in the gigE port.
14388 -static unsigned int eth_port_set_tx_coal(struct mv643xx_private *mp,
14389 - unsigned int delay)
14391 - unsigned int coal = ((mp->shared->t_clk / 1000000) * delay) / 64;
14393 - /* Set TX Coalescing mechanism */
14394 - wrl(mp, TX_FIFO_URGENT_THRESHOLD_REG(mp->port_num), coal << 4);
14400 - * ether_init_rx_desc_ring - Curve a Rx chain desc list and buffer in memory.
14403 - * This function prepares a Rx chained list of descriptors and packet
14404 - * buffers in a form of a ring. The routine must be called after port
14405 - * initialization routine and before port start routine.
14406 - * The Ethernet SDMA engine uses CPU bus addresses to access the various
14407 - * devices in the system (i.e. DRAM). This function uses the ethernet
14408 - * struct 'virtual to physical' routine (set by the user) to set the ring
14409 - * with physical addresses.
14412 - * struct mv643xx_private *mp Ethernet Port Control srtuct.
14415 - * The routine updates the Ethernet port control struct with information
14416 - * regarding the Rx descriptors and buffers.
14421 -static void ether_init_rx_desc_ring(struct mv643xx_private *mp)
14423 - volatile struct eth_rx_desc *p_rx_desc;
14424 - int rx_desc_num = mp->rx_ring_size;
14427 - /* initialize the next_desc_ptr links in the Rx descriptors ring */
14428 - p_rx_desc = (struct eth_rx_desc *)mp->p_rx_desc_area;
14429 - for (i = 0; i < rx_desc_num; i++) {
14430 - p_rx_desc[i].next_desc_ptr = mp->rx_desc_dma +
14431 - ((i + 1) % rx_desc_num) * sizeof(struct eth_rx_desc);
14434 - /* Save Rx desc pointer to driver struct. */
14435 - mp->rx_curr_desc_q = 0;
14436 - mp->rx_used_desc_q = 0;
14438 - mp->rx_desc_area_size = rx_desc_num * sizeof(struct eth_rx_desc);
14442 - * ether_init_tx_desc_ring - Curve a Tx chain desc list and buffer in memory.
14445 - * This function prepares a Tx chained list of descriptors and packet
14446 - * buffers in a form of a ring. The routine must be called after port
14447 - * initialization routine and before port start routine.
14448 - * The Ethernet SDMA engine uses CPU bus addresses to access the various
14449 - * devices in the system (i.e. DRAM). This function uses the ethernet
14450 - * struct 'virtual to physical' routine (set by the user) to set the ring
14451 - * with physical addresses.
14454 - * struct mv643xx_private *mp Ethernet Port Control srtuct.
14457 - * The routine updates the Ethernet port control struct with information
14458 - * regarding the Tx descriptors and buffers.
14463 -static void ether_init_tx_desc_ring(struct mv643xx_private *mp)
14465 - int tx_desc_num = mp->tx_ring_size;
14466 - struct eth_tx_desc *p_tx_desc;
14469 - /* Initialize the next_desc_ptr links in the Tx descriptors ring */
14470 - p_tx_desc = (struct eth_tx_desc *)mp->p_tx_desc_area;
14471 - for (i = 0; i < tx_desc_num; i++) {
14472 - p_tx_desc[i].next_desc_ptr = mp->tx_desc_dma +
14473 - ((i + 1) % tx_desc_num) * sizeof(struct eth_tx_desc);
14476 - mp->tx_curr_desc_q = 0;
14477 - mp->tx_used_desc_q = 0;
14479 - mp->tx_desc_area_size = tx_desc_num * sizeof(struct eth_tx_desc);
14482 -static int mv643xx_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
14484 - struct mv643xx_private *mp = netdev_priv(dev);
14487 - spin_lock_irq(&mp->lock);
14488 - err = mii_ethtool_sset(&mp->mii, cmd);
14489 - spin_unlock_irq(&mp->lock);
14494 -static int mv643xx_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
14496 - struct mv643xx_private *mp = netdev_priv(dev);
14499 - spin_lock_irq(&mp->lock);
14500 - err = mii_ethtool_gset(&mp->mii, cmd);
14501 - spin_unlock_irq(&mp->lock);
14503 - /* The PHY may support 1000baseT_Half, but the mv643xx does not */
14504 - cmd->supported &= ~SUPPORTED_1000baseT_Half;
14505 - cmd->advertising &= ~ADVERTISED_1000baseT_Half;
14511 - * mv643xx_eth_open
14513 - * This function is called when openning the network device. The function
14514 - * should initialize all the hardware, initialize cyclic Rx/Tx
14515 - * descriptors chain and buffers and allocate an IRQ to the network
14518 - * Input : a pointer to the network device structure
14520 - * Output : zero of success , nonzero if fails.
14523 -static int mv643xx_eth_open(struct net_device *dev)
14525 - struct mv643xx_private *mp = netdev_priv(dev);
14526 - unsigned int port_num = mp->port_num;
14527 - unsigned int size;
14530 - /* Clear any pending ethernet port interrupts */
14531 - wrl(mp, INTERRUPT_CAUSE_REG(port_num), 0);
14532 - wrl(mp, INTERRUPT_CAUSE_EXTEND_REG(port_num), 0);
14533 - /* wait for previous write to complete */
14534 - rdl(mp, INTERRUPT_CAUSE_EXTEND_REG(port_num));
14536 - err = request_irq(dev->irq, mv643xx_eth_int_handler,
14537 - IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev);
14539 - printk(KERN_ERR "%s: Can not assign IRQ\n", dev->name);
14543 - eth_port_init(mp);
14545 - memset(&mp->timeout, 0, sizeof(struct timer_list));
14546 - mp->timeout.function = mv643xx_eth_rx_refill_descs_timer_wrapper;
14547 - mp->timeout.data = (unsigned long)dev;
14549 - /* Allocate RX and TX skb rings */
14550 - mp->rx_skb = kmalloc(sizeof(*mp->rx_skb) * mp->rx_ring_size,
14552 - if (!mp->rx_skb) {
14553 - printk(KERN_ERR "%s: Cannot allocate Rx skb ring\n", dev->name);
14555 - goto out_free_irq;
14557 - mp->tx_skb = kmalloc(sizeof(*mp->tx_skb) * mp->tx_ring_size,
14559 - if (!mp->tx_skb) {
14560 - printk(KERN_ERR "%s: Cannot allocate Tx skb ring\n", dev->name);
14562 - goto out_free_rx_skb;
14565 - /* Allocate TX ring */
14566 - mp->tx_desc_count = 0;
14567 - size = mp->tx_ring_size * sizeof(struct eth_tx_desc);
14568 - mp->tx_desc_area_size = size;
14570 - if (mp->tx_sram_size) {
14571 - mp->p_tx_desc_area = ioremap(mp->tx_sram_addr,
14572 - mp->tx_sram_size);
14573 - mp->tx_desc_dma = mp->tx_sram_addr;
14575 - mp->p_tx_desc_area = dma_alloc_coherent(NULL, size,
14576 - &mp->tx_desc_dma,
14579 - if (!mp->p_tx_desc_area) {
14580 - printk(KERN_ERR "%s: Cannot allocate Tx Ring (size %d bytes)\n",
14581 - dev->name, size);
14583 - goto out_free_tx_skb;
14585 - BUG_ON((u32) mp->p_tx_desc_area & 0xf); /* check 16-byte alignment */
14586 - memset((void *)mp->p_tx_desc_area, 0, mp->tx_desc_area_size);
14588 - ether_init_tx_desc_ring(mp);
14590 - /* Allocate RX ring */
14591 - mp->rx_desc_count = 0;
14592 - size = mp->rx_ring_size * sizeof(struct eth_rx_desc);
14593 - mp->rx_desc_area_size = size;
14595 - if (mp->rx_sram_size) {
14596 - mp->p_rx_desc_area = ioremap(mp->rx_sram_addr,
14597 - mp->rx_sram_size);
14598 - mp->rx_desc_dma = mp->rx_sram_addr;
14600 - mp->p_rx_desc_area = dma_alloc_coherent(NULL, size,
14601 - &mp->rx_desc_dma,
14604 - if (!mp->p_rx_desc_area) {
14605 - printk(KERN_ERR "%s: Cannot allocate Rx ring (size %d bytes)\n",
14606 - dev->name, size);
14607 - printk(KERN_ERR "%s: Freeing previously allocated TX queues...",
14609 - if (mp->rx_sram_size)
14610 - iounmap(mp->p_tx_desc_area);
14612 - dma_free_coherent(NULL, mp->tx_desc_area_size,
14613 - mp->p_tx_desc_area, mp->tx_desc_dma);
14615 - goto out_free_tx_skb;
14617 - memset((void *)mp->p_rx_desc_area, 0, size);
14619 - ether_init_rx_desc_ring(mp);
14621 - mv643xx_eth_rx_refill_descs(dev); /* Fill RX ring with skb's */
14623 -#ifdef MV643XX_NAPI
14624 - napi_enable(&mp->napi);
14627 - eth_port_start(dev);
14629 - /* Interrupt Coalescing */
14631 -#ifdef MV643XX_COAL
14632 - mp->rx_int_coal =
14633 - eth_port_set_rx_coal(mp, MV643XX_RX_COAL);
14636 - mp->tx_int_coal =
14637 - eth_port_set_tx_coal(mp, MV643XX_TX_COAL);
14639 - /* Unmask phy and link status changes interrupts */
14640 - wrl(mp, INTERRUPT_EXTEND_MASK_REG(port_num), ETH_INT_UNMASK_ALL_EXT);
14642 - /* Unmask RX buffer and TX end interrupt */
14643 - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_UNMASK_ALL);
14648 - kfree(mp->tx_skb);
14650 - kfree(mp->rx_skb);
14652 - free_irq(dev->irq, dev);
14657 -static void mv643xx_eth_free_tx_rings(struct net_device *dev)
14659 - struct mv643xx_private *mp = netdev_priv(dev);
14661 - /* Stop Tx Queues */
14662 - mv643xx_eth_port_disable_tx(mp);
14664 - /* Free outstanding skb's on TX ring */
14665 - mv643xx_eth_free_all_tx_descs(dev);
14667 - BUG_ON(mp->tx_used_desc_q != mp->tx_curr_desc_q);
14669 - /* Free TX ring */
14670 - if (mp->tx_sram_size)
14671 - iounmap(mp->p_tx_desc_area);
14673 - dma_free_coherent(NULL, mp->tx_desc_area_size,
14674 - mp->p_tx_desc_area, mp->tx_desc_dma);
14677 -static void mv643xx_eth_free_rx_rings(struct net_device *dev)
14679 - struct mv643xx_private *mp = netdev_priv(dev);
14682 - /* Stop RX Queues */
14683 - mv643xx_eth_port_disable_rx(mp);
14685 - /* Free preallocated skb's on RX rings */
14686 - for (curr = 0; mp->rx_desc_count && curr < mp->rx_ring_size; curr++) {
14687 - if (mp->rx_skb[curr]) {
14688 - dev_kfree_skb(mp->rx_skb[curr]);
14689 - mp->rx_desc_count--;
14693 - if (mp->rx_desc_count)
14695 - "%s: Error in freeing Rx Ring. %d skb's still"
14696 - " stuck in RX Ring - ignoring them\n", dev->name,
14697 - mp->rx_desc_count);
14698 - /* Free RX ring */
14699 - if (mp->rx_sram_size)
14700 - iounmap(mp->p_rx_desc_area);
14702 - dma_free_coherent(NULL, mp->rx_desc_area_size,
14703 - mp->p_rx_desc_area, mp->rx_desc_dma);
14707 - * mv643xx_eth_stop
14709 - * This function is used when closing the network device.
14710 - * It updates the hardware,
14711 - * release all memory that holds buffers and descriptors and release the IRQ.
14712 - * Input : a pointer to the device structure
14713 - * Output : zero if success , nonzero if fails
14716 -static int mv643xx_eth_stop(struct net_device *dev)
14718 - struct mv643xx_private *mp = netdev_priv(dev);
14719 - unsigned int port_num = mp->port_num;
14721 - /* Mask all interrupts on ethernet port */
14722 - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_MASK_ALL);
14723 - /* wait for previous write to complete */
14724 - rdl(mp, INTERRUPT_MASK_REG(port_num));
14726 -#ifdef MV643XX_NAPI
14727 - napi_disable(&mp->napi);
14729 - netif_carrier_off(dev);
14730 - netif_stop_queue(dev);
14732 - eth_port_reset(mp);
14734 - mv643xx_eth_free_tx_rings(dev);
14735 - mv643xx_eth_free_rx_rings(dev);
14737 - free_irq(dev->irq, dev);
14742 -#ifdef MV643XX_NAPI
14746 - * This function is used in case of NAPI
14748 -static int mv643xx_poll(struct napi_struct *napi, int budget)
14750 - struct mv643xx_private *mp = container_of(napi, struct mv643xx_private, napi);
14751 - struct net_device *dev = mp->dev;
14752 - unsigned int port_num = mp->port_num;
14755 -#ifdef MV643XX_TX_FAST_REFILL
14756 - if (++mp->tx_clean_threshold > 5) {
14757 - mv643xx_eth_free_completed_tx_descs(dev);
14758 - mp->tx_clean_threshold = 0;
14763 - if ((rdl(mp, RX_CURRENT_QUEUE_DESC_PTR_0(port_num)))
14764 - != (u32) mp->rx_used_desc_q)
14765 - work_done = mv643xx_eth_receive_queue(dev, budget);
14767 - if (work_done < budget) {
14768 - netif_rx_complete(dev, napi);
14769 - wrl(mp, INTERRUPT_CAUSE_REG(port_num), 0);
14770 - wrl(mp, INTERRUPT_CAUSE_EXTEND_REG(port_num), 0);
14771 - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_UNMASK_ALL);
14774 - return work_done;
14779 - * has_tiny_unaligned_frags - check if skb has any small, unaligned fragments
14781 - * Hardware can't handle unaligned fragments smaller than 9 bytes.
14782 - * This helper function detects that case.
14785 -static inline unsigned int has_tiny_unaligned_frags(struct sk_buff *skb)
14787 - unsigned int frag;
14788 - skb_frag_t *fragp;
14790 - for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
14791 - fragp = &skb_shinfo(skb)->frags[frag];
14792 - if (fragp->size <= 8 && fragp->page_offset & 0x7)
14799 - * eth_alloc_tx_desc_index - return the index of the next available tx desc
14801 -static int eth_alloc_tx_desc_index(struct mv643xx_private *mp)
14803 - int tx_desc_curr;
14805 - BUG_ON(mp->tx_desc_count >= mp->tx_ring_size);
14807 - tx_desc_curr = mp->tx_curr_desc_q;
14808 - mp->tx_curr_desc_q = (tx_desc_curr + 1) % mp->tx_ring_size;
14810 - BUG_ON(mp->tx_curr_desc_q == mp->tx_used_desc_q);
14811 + BUG_ON(txq->tx_curr_desc == txq->tx_used_desc);
14813 return tx_desc_curr;
14817 - * eth_tx_fill_frag_descs - fill tx hw descriptors for an skb's fragments.
14819 - * Ensure the data for each fragment to be transmitted is mapped properly,
14820 - * then fill in descriptors in the tx hw queue.
14822 -static void eth_tx_fill_frag_descs(struct mv643xx_private *mp,
14823 - struct sk_buff *skb)
14824 +static void txq_submit_frag_skb(struct tx_queue *txq, struct sk_buff *skb)
14826 + int nr_frags = skb_shinfo(skb)->nr_frags;
14829 - struct eth_tx_desc *desc;
14831 - for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
14832 - skb_frag_t *this_frag = &skb_shinfo(skb)->frags[frag];
14834 - tx_index = eth_alloc_tx_desc_index(mp);
14835 - desc = &mp->p_tx_desc_area[tx_index];
14836 + for (frag = 0; frag < nr_frags; frag++) {
14837 + skb_frag_t *this_frag;
14839 + struct tx_desc *desc;
14841 + this_frag = &skb_shinfo(skb)->frags[frag];
14842 + tx_index = txq_alloc_desc_index(txq);
14843 + desc = &txq->tx_desc_area[tx_index];
14845 - desc->cmd_sts = ETH_BUFFER_OWNED_BY_DMA;
14846 - /* Last Frag enables interrupt and frees the skb */
14847 - if (frag == (skb_shinfo(skb)->nr_frags - 1)) {
14848 - desc->cmd_sts |= ETH_ZERO_PADDING |
14849 - ETH_TX_LAST_DESC |
14850 - ETH_TX_ENABLE_INTERRUPT;
14851 - mp->tx_skb[tx_index] = skb;
14853 - mp->tx_skb[tx_index] = NULL;
14855 + * The last fragment will generate an interrupt
14856 + * which will free the skb on TX completion.
14858 + if (frag == nr_frags - 1) {
14859 + desc->cmd_sts = BUFFER_OWNED_BY_DMA |
14860 + ZERO_PADDING | TX_LAST_DESC |
14861 + TX_ENABLE_INTERRUPT;
14862 + txq->tx_skb[tx_index] = skb;
14864 + desc->cmd_sts = BUFFER_OWNED_BY_DMA;
14865 + txq->tx_skb[tx_index] = NULL;
14868 - desc = &mp->p_tx_desc_area[tx_index];
14870 desc->byte_cnt = this_frag->size;
14871 desc->buf_ptr = dma_map_page(NULL, this_frag->page,
14872 @@ -1651,37 +704,28 @@
14873 return (__force __be16)sum;
14877 - * eth_tx_submit_descs_for_skb - submit data from an skb to the tx hw
14879 - * Ensure the data for an skb to be transmitted is mapped properly,
14880 - * then fill in descriptors in the tx hw queue and start the hardware.
14882 -static void eth_tx_submit_descs_for_skb(struct mv643xx_private *mp,
14883 - struct sk_buff *skb)
14884 +static void txq_submit_skb(struct tx_queue *txq, struct sk_buff *skb)
14886 + int nr_frags = skb_shinfo(skb)->nr_frags;
14888 - struct eth_tx_desc *desc;
14889 + struct tx_desc *desc;
14892 - int nr_frags = skb_shinfo(skb)->nr_frags;
14894 - cmd_sts = ETH_TX_FIRST_DESC | ETH_GEN_CRC | ETH_BUFFER_OWNED_BY_DMA;
14895 + cmd_sts = TX_FIRST_DESC | GEN_CRC | BUFFER_OWNED_BY_DMA;
14897 - tx_index = eth_alloc_tx_desc_index(mp);
14898 - desc = &mp->p_tx_desc_area[tx_index];
14899 + tx_index = txq_alloc_desc_index(txq);
14900 + desc = &txq->tx_desc_area[tx_index];
14903 - eth_tx_fill_frag_descs(mp, skb);
14904 + txq_submit_frag_skb(txq, skb);
14906 length = skb_headlen(skb);
14907 - mp->tx_skb[tx_index] = NULL;
14908 + txq->tx_skb[tx_index] = NULL;
14910 - cmd_sts |= ETH_ZERO_PADDING |
14911 - ETH_TX_LAST_DESC |
14912 - ETH_TX_ENABLE_INTERRUPT;
14913 + cmd_sts |= ZERO_PADDING | TX_LAST_DESC | TX_ENABLE_INTERRUPT;
14915 - mp->tx_skb[tx_index] = skb;
14916 + txq->tx_skb[tx_index] = skb;
14919 desc->byte_cnt = length;
14920 @@ -1690,13 +734,13 @@
14921 if (skb->ip_summed == CHECKSUM_PARTIAL) {
14922 BUG_ON(skb->protocol != htons(ETH_P_IP));
14924 - cmd_sts |= ETH_GEN_TCP_UDP_CHECKSUM |
14925 - ETH_GEN_IP_V_4_CHECKSUM |
14926 - ip_hdr(skb)->ihl << ETH_TX_IHL_SHIFT;
14927 + cmd_sts |= GEN_TCP_UDP_CHECKSUM |
14928 + GEN_IP_V4_CHECKSUM |
14929 + ip_hdr(skb)->ihl << TX_IHL_SHIFT;
14931 switch (ip_hdr(skb)->protocol) {
14933 - cmd_sts |= ETH_UDP_FRAME;
14934 + cmd_sts |= UDP_FRAME;
14935 desc->l4i_chk = ntohs(sum16_as_be(udp_hdr(skb)->check));
14938 @@ -1707,7 +751,7 @@
14941 /* Errata BTS #50, IHL must be 5 if no HW checksum */
14942 - cmd_sts |= 5 << ETH_TX_IHL_SHIFT;
14943 + cmd_sts |= 5 << TX_IHL_SHIFT;
14947 @@ -1717,1649 +761,1818 @@
14949 /* ensure all descriptors are written before poking hardware */
14951 - mv643xx_eth_port_enable_tx(mp, ETH_TX_QUEUES_ENABLED);
14954 - mp->tx_desc_count += nr_frags + 1;
14955 + txq->tx_desc_count += nr_frags + 1;
14959 - * mv643xx_eth_start_xmit - queue an skb to the hardware for transmission
14962 -static int mv643xx_eth_start_xmit(struct sk_buff *skb, struct net_device *dev)
14963 +static int mv643xx_eth_xmit(struct sk_buff *skb, struct net_device *dev)
14965 - struct mv643xx_private *mp = netdev_priv(dev);
14966 + struct mv643xx_eth_private *mp = netdev_priv(dev);
14967 struct net_device_stats *stats = &dev->stats;
14968 + struct tx_queue *txq;
14969 unsigned long flags;
14971 - BUG_ON(netif_queue_stopped(dev));
14973 if (has_tiny_unaligned_frags(skb) && __skb_linearize(skb)) {
14974 stats->tx_dropped++;
14975 - printk(KERN_DEBUG "%s: failed to linearize tiny "
14976 - "unaligned fragment\n", dev->name);
14977 + dev_printk(KERN_DEBUG, &dev->dev,
14978 + "failed to linearize skb with tiny "
14979 + "unaligned fragment\n");
14980 return NETDEV_TX_BUSY;
14983 spin_lock_irqsave(&mp->lock, flags);
14985 - if (mp->tx_ring_size - mp->tx_desc_count < MAX_DESCS_PER_SKB) {
14986 - printk(KERN_ERR "%s: transmit with queue full\n", dev->name);
14987 - netif_stop_queue(dev);
14988 + txq = mp->txq + mp->txq_primary;
14990 + if (txq->tx_ring_size - txq->tx_desc_count < MAX_DESCS_PER_SKB) {
14991 spin_unlock_irqrestore(&mp->lock, flags);
14992 - return NETDEV_TX_BUSY;
14993 + if (txq->index == mp->txq_primary && net_ratelimit())
14994 + dev_printk(KERN_ERR, &dev->dev,
14995 + "primary tx queue full?!\n");
14997 + return NETDEV_TX_OK;
15000 - eth_tx_submit_descs_for_skb(mp, skb);
15001 + txq_submit_skb(txq, skb);
15002 stats->tx_bytes += skb->len;
15003 stats->tx_packets++;
15004 dev->trans_start = jiffies;
15006 - if (mp->tx_ring_size - mp->tx_desc_count < MAX_DESCS_PER_SKB)
15007 - netif_stop_queue(dev);
15008 + if (txq->index == mp->txq_primary) {
15009 + int entries_left;
15011 + entries_left = txq->tx_ring_size - txq->tx_desc_count;
15012 + if (entries_left < MAX_DESCS_PER_SKB)
15013 + netif_stop_queue(dev);
15016 spin_unlock_irqrestore(&mp->lock, flags);
15018 return NETDEV_TX_OK;
15021 -#ifdef CONFIG_NET_POLL_CONTROLLER
15022 -static void mv643xx_netpoll(struct net_device *netdev)
15024 +/* tx rate control **********************************************************/
15026 + * Set total maximum TX rate (shared by all TX queues for this port)
15027 + * to 'rate' bits per second, with a maximum burst of 'burst' bytes.
15029 +static void tx_set_rate(struct mv643xx_eth_private *mp, int rate, int burst)
15031 - struct mv643xx_private *mp = netdev_priv(netdev);
15032 - int port_num = mp->port_num;
15037 + token_rate = ((rate / 1000) * 64) / (mp->shared->t_clk / 1000);
15038 + if (token_rate > 1023)
15039 + token_rate = 1023;
15041 - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_MASK_ALL);
15042 - /* wait for previous write to complete */
15043 - rdl(mp, INTERRUPT_MASK_REG(port_num));
15044 + mtu = (mp->dev->mtu + 255) >> 8;
15048 - mv643xx_eth_int_handler(netdev->irq, netdev);
15049 + bucket_size = (burst + 255) >> 8;
15050 + if (bucket_size > 65535)
15051 + bucket_size = 65535;
15053 - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_UNMASK_ALL);
15054 + if (mp->shared->tx_bw_control_moved) {
15055 + wrl(mp, TX_BW_RATE_MOVED(mp->port_num), token_rate);
15056 + wrl(mp, TX_BW_MTU_MOVED(mp->port_num), mtu);
15057 + wrl(mp, TX_BW_BURST_MOVED(mp->port_num), bucket_size);
15059 + wrl(mp, TX_BW_RATE(mp->port_num), token_rate);
15060 + wrl(mp, TX_BW_MTU(mp->port_num), mtu);
15061 + wrl(mp, TX_BW_BURST(mp->port_num), bucket_size);
15066 -static void mv643xx_init_ethtool_cmd(struct net_device *dev, int phy_address,
15067 - int speed, int duplex,
15068 - struct ethtool_cmd *cmd)
15069 +static void txq_set_rate(struct tx_queue *txq, int rate, int burst)
15071 - struct mv643xx_private *mp = netdev_priv(dev);
15072 + struct mv643xx_eth_private *mp = txq_to_mp(txq);
15076 - memset(cmd, 0, sizeof(*cmd));
15077 + token_rate = ((rate / 1000) * 64) / (mp->shared->t_clk / 1000);
15078 + if (token_rate > 1023)
15079 + token_rate = 1023;
15081 - cmd->port = PORT_MII;
15082 - cmd->transceiver = XCVR_INTERNAL;
15083 - cmd->phy_address = phy_address;
15084 + bucket_size = (burst + 255) >> 8;
15085 + if (bucket_size > 65535)
15086 + bucket_size = 65535;
15088 - if (speed == 0) {
15089 - cmd->autoneg = AUTONEG_ENABLE;
15090 - /* mii lib checks, but doesn't use speed on AUTONEG_ENABLE */
15091 - cmd->speed = SPEED_100;
15092 - cmd->advertising = ADVERTISED_10baseT_Half |
15093 - ADVERTISED_10baseT_Full |
15094 - ADVERTISED_100baseT_Half |
15095 - ADVERTISED_100baseT_Full;
15096 - if (mp->mii.supports_gmii)
15097 - cmd->advertising |= ADVERTISED_1000baseT_Full;
15099 - cmd->autoneg = AUTONEG_DISABLE;
15100 - cmd->speed = speed;
15101 - cmd->duplex = duplex;
15103 + wrl(mp, TXQ_BW_TOKENS(mp->port_num, txq->index), token_rate << 14);
15104 + wrl(mp, TXQ_BW_CONF(mp->port_num, txq->index),
15105 + (bucket_size << 10) | token_rate);
15109 - * mv643xx_eth_probe
15111 - * First function called after registering the network device.
15112 - * It's purpose is to initialize the device as an ethernet device,
15113 - * fill the ethernet device structure with pointers * to functions,
15114 - * and set the MAC address of the interface
15116 - * Input : struct device *
15117 - * Output : -ENOMEM if failed , 0 if success
15119 -static int mv643xx_eth_probe(struct platform_device *pdev)
15120 +static void txq_set_fixed_prio_mode(struct tx_queue *txq)
15122 - struct mv643xx_eth_platform_data *pd;
15124 - struct mv643xx_private *mp;
15125 - struct net_device *dev;
15127 - struct resource *res;
15129 - struct ethtool_cmd cmd;
15130 - int duplex = DUPLEX_HALF;
15131 - int speed = 0; /* default to auto-negotiation */
15132 - DECLARE_MAC_BUF(mac);
15133 + struct mv643xx_eth_private *mp = txq_to_mp(txq);
15137 - pd = pdev->dev.platform_data;
15138 - if (pd == NULL) {
15139 - printk(KERN_ERR "No mv643xx_eth_platform_data\n");
15143 + * Turn on fixed priority mode.
15145 + if (mp->shared->tx_bw_control_moved)
15146 + off = TXQ_FIX_PRIO_CONF_MOVED(mp->port_num);
15148 + off = TXQ_FIX_PRIO_CONF(mp->port_num);
15150 - if (pd->shared == NULL) {
15151 - printk(KERN_ERR "No mv643xx_eth_platform_data->shared\n");
15154 + val = rdl(mp, off);
15155 + val |= 1 << txq->index;
15156 + wrl(mp, off, val);
15159 - dev = alloc_etherdev(sizeof(struct mv643xx_private));
15162 +static void txq_set_wrr(struct tx_queue *txq, int weight)
15164 + struct mv643xx_eth_private *mp = txq_to_mp(txq);
15168 - platform_set_drvdata(pdev, dev);
15170 + * Turn off fixed priority mode.
15172 + if (mp->shared->tx_bw_control_moved)
15173 + off = TXQ_FIX_PRIO_CONF_MOVED(mp->port_num);
15175 + off = TXQ_FIX_PRIO_CONF(mp->port_num);
15177 - mp = netdev_priv(dev);
15179 -#ifdef MV643XX_NAPI
15180 - netif_napi_add(dev, &mp->napi, mv643xx_poll, 64);
15182 + val = rdl(mp, off);
15183 + val &= ~(1 << txq->index);
15184 + wrl(mp, off, val);
15186 - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
15188 - dev->irq = res->start;
15190 + * Configure WRR weight for this queue.
15192 + off = TXQ_BW_WRR_CONF(mp->port_num, txq->index);
15194 - dev->open = mv643xx_eth_open;
15195 - dev->stop = mv643xx_eth_stop;
15196 - dev->hard_start_xmit = mv643xx_eth_start_xmit;
15197 - dev->set_mac_address = mv643xx_eth_set_mac_address;
15198 - dev->set_multicast_list = mv643xx_eth_set_rx_mode;
15199 + val = rdl(mp, off);
15200 + val = (val & ~0xff) | (weight & 0xff);
15201 + wrl(mp, off, val);
15204 - /* No need to Tx Timeout */
15205 - dev->tx_timeout = mv643xx_eth_tx_timeout;
15207 -#ifdef CONFIG_NET_POLL_CONTROLLER
15208 - dev->poll_controller = mv643xx_netpoll;
15210 +/* mii management interface *************************************************/
15211 +#define SMI_BUSY 0x10000000
15212 +#define SMI_READ_VALID 0x08000000
15213 +#define SMI_OPCODE_READ 0x04000000
15214 +#define SMI_OPCODE_WRITE 0x00000000
15216 - dev->watchdog_timeo = 2 * HZ;
15217 - dev->base_addr = 0;
15218 - dev->change_mtu = mv643xx_eth_change_mtu;
15219 - dev->do_ioctl = mv643xx_eth_do_ioctl;
15220 - SET_ETHTOOL_OPS(dev, &mv643xx_ethtool_ops);
15221 +static void smi_reg_read(struct mv643xx_eth_private *mp, unsigned int addr,
15222 + unsigned int reg, unsigned int *value)
15224 + void __iomem *smi_reg = mp->shared_smi->base + SMI_REG;
15225 + unsigned long flags;
15228 + /* the SMI register is a shared resource */
15229 + spin_lock_irqsave(&mp->shared_smi->phy_lock, flags);
15231 + /* wait for the SMI register to become available */
15232 + for (i = 0; readl(smi_reg) & SMI_BUSY; i++) {
15234 + printk("%s: PHY busy timeout\n", mp->dev->name);
15240 + writel(SMI_OPCODE_READ | (reg << 21) | (addr << 16), smi_reg);
15242 + /* now wait for the data to be valid */
15243 + for (i = 0; !(readl(smi_reg) & SMI_READ_VALID); i++) {
15245 + printk("%s: PHY read timeout\n", mp->dev->name);
15251 + *value = readl(smi_reg) & 0xffff;
15253 + spin_unlock_irqrestore(&mp->shared_smi->phy_lock, flags);
15256 +static void smi_reg_write(struct mv643xx_eth_private *mp,
15257 + unsigned int addr,
15258 + unsigned int reg, unsigned int value)
15260 + void __iomem *smi_reg = mp->shared_smi->base + SMI_REG;
15261 + unsigned long flags;
15264 + /* the SMI register is a shared resource */
15265 + spin_lock_irqsave(&mp->shared_smi->phy_lock, flags);
15267 + /* wait for the SMI register to become available */
15268 + for (i = 0; readl(smi_reg) & SMI_BUSY; i++) {
15270 + printk("%s: PHY busy timeout\n", mp->dev->name);
15276 + writel(SMI_OPCODE_WRITE | (reg << 21) |
15277 + (addr << 16) | (value & 0xffff), smi_reg);
15279 + spin_unlock_irqrestore(&mp->shared_smi->phy_lock, flags);
15283 +/* mib counters *************************************************************/
15284 +static inline u32 mib_read(struct mv643xx_eth_private *mp, int offset)
15286 + return rdl(mp, MIB_COUNTERS(mp->port_num) + offset);
15289 +static void mib_counters_clear(struct mv643xx_eth_private *mp)
15293 + for (i = 0; i < 0x80; i += 4)
15297 +static void mib_counters_update(struct mv643xx_eth_private *mp)
15299 + struct mib_counters *p = &mp->mib_counters;
15301 + p->good_octets_received += mib_read(mp, 0x00);
15302 + p->good_octets_received += (u64)mib_read(mp, 0x04) << 32;
15303 + p->bad_octets_received += mib_read(mp, 0x08);
15304 + p->internal_mac_transmit_err += mib_read(mp, 0x0c);
15305 + p->good_frames_received += mib_read(mp, 0x10);
15306 + p->bad_frames_received += mib_read(mp, 0x14);
15307 + p->broadcast_frames_received += mib_read(mp, 0x18);
15308 + p->multicast_frames_received += mib_read(mp, 0x1c);
15309 + p->frames_64_octets += mib_read(mp, 0x20);
15310 + p->frames_65_to_127_octets += mib_read(mp, 0x24);
15311 + p->frames_128_to_255_octets += mib_read(mp, 0x28);
15312 + p->frames_256_to_511_octets += mib_read(mp, 0x2c);
15313 + p->frames_512_to_1023_octets += mib_read(mp, 0x30);
15314 + p->frames_1024_to_max_octets += mib_read(mp, 0x34);
15315 + p->good_octets_sent += mib_read(mp, 0x38);
15316 + p->good_octets_sent += (u64)mib_read(mp, 0x3c) << 32;
15317 + p->good_frames_sent += mib_read(mp, 0x40);
15318 + p->excessive_collision += mib_read(mp, 0x44);
15319 + p->multicast_frames_sent += mib_read(mp, 0x48);
15320 + p->broadcast_frames_sent += mib_read(mp, 0x4c);
15321 + p->unrec_mac_control_received += mib_read(mp, 0x50);
15322 + p->fc_sent += mib_read(mp, 0x54);
15323 + p->good_fc_received += mib_read(mp, 0x58);
15324 + p->bad_fc_received += mib_read(mp, 0x5c);
15325 + p->undersize_received += mib_read(mp, 0x60);
15326 + p->fragments_received += mib_read(mp, 0x64);
15327 + p->oversize_received += mib_read(mp, 0x68);
15328 + p->jabber_received += mib_read(mp, 0x6c);
15329 + p->mac_receive_error += mib_read(mp, 0x70);
15330 + p->bad_crc_event += mib_read(mp, 0x74);
15331 + p->collision += mib_read(mp, 0x78);
15332 + p->late_collision += mib_read(mp, 0x7c);
15336 +/* ethtool ******************************************************************/
15337 +struct mv643xx_eth_stats {
15338 + char stat_string[ETH_GSTRING_LEN];
15344 +#define SSTAT(m) \
15345 + { #m, FIELD_SIZEOF(struct net_device_stats, m), \
15346 + offsetof(struct net_device, stats.m), -1 }
15348 +#define MIBSTAT(m) \
15349 + { #m, FIELD_SIZEOF(struct mib_counters, m), \
15350 + -1, offsetof(struct mv643xx_eth_private, mib_counters.m) }
15352 +static const struct mv643xx_eth_stats mv643xx_eth_stats[] = {
15353 + SSTAT(rx_packets),
15354 + SSTAT(tx_packets),
15357 + SSTAT(rx_errors),
15358 + SSTAT(tx_errors),
15359 + SSTAT(rx_dropped),
15360 + SSTAT(tx_dropped),
15361 + MIBSTAT(good_octets_received),
15362 + MIBSTAT(bad_octets_received),
15363 + MIBSTAT(internal_mac_transmit_err),
15364 + MIBSTAT(good_frames_received),
15365 + MIBSTAT(bad_frames_received),
15366 + MIBSTAT(broadcast_frames_received),
15367 + MIBSTAT(multicast_frames_received),
15368 + MIBSTAT(frames_64_octets),
15369 + MIBSTAT(frames_65_to_127_octets),
15370 + MIBSTAT(frames_128_to_255_octets),
15371 + MIBSTAT(frames_256_to_511_octets),
15372 + MIBSTAT(frames_512_to_1023_octets),
15373 + MIBSTAT(frames_1024_to_max_octets),
15374 + MIBSTAT(good_octets_sent),
15375 + MIBSTAT(good_frames_sent),
15376 + MIBSTAT(excessive_collision),
15377 + MIBSTAT(multicast_frames_sent),
15378 + MIBSTAT(broadcast_frames_sent),
15379 + MIBSTAT(unrec_mac_control_received),
15380 + MIBSTAT(fc_sent),
15381 + MIBSTAT(good_fc_received),
15382 + MIBSTAT(bad_fc_received),
15383 + MIBSTAT(undersize_received),
15384 + MIBSTAT(fragments_received),
15385 + MIBSTAT(oversize_received),
15386 + MIBSTAT(jabber_received),
15387 + MIBSTAT(mac_receive_error),
15388 + MIBSTAT(bad_crc_event),
15389 + MIBSTAT(collision),
15390 + MIBSTAT(late_collision),
15393 +static int mv643xx_eth_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
15395 + struct mv643xx_eth_private *mp = netdev_priv(dev);
15398 + spin_lock_irq(&mp->lock);
15399 + err = mii_ethtool_gset(&mp->mii, cmd);
15400 + spin_unlock_irq(&mp->lock);
15402 -#ifdef MV643XX_CHECKSUM_OFFLOAD_TX
15403 -#ifdef MAX_SKB_FRAGS
15405 - * Zero copy can only work if we use Discovery II memory. Else, we will
15406 - * have to map the buffers to ISA memory which is only 16 MB
15407 + * The MAC does not support 1000baseT_Half.
15409 - dev->features = NETIF_F_SG | NETIF_F_IP_CSUM;
15412 + cmd->supported &= ~SUPPORTED_1000baseT_Half;
15413 + cmd->advertising &= ~ADVERTISED_1000baseT_Half;
15415 - /* Configure the timeout task */
15416 - INIT_WORK(&mp->tx_timeout_task, mv643xx_eth_tx_timeout_task);
15420 - spin_lock_init(&mp->lock);
15421 +static int mv643xx_eth_get_settings_phyless(struct net_device *dev, struct ethtool_cmd *cmd)
15423 + cmd->supported = SUPPORTED_MII;
15424 + cmd->advertising = ADVERTISED_MII;
15425 + cmd->speed = SPEED_1000;
15426 + cmd->duplex = DUPLEX_FULL;
15427 + cmd->port = PORT_MII;
15428 + cmd->phy_address = 0;
15429 + cmd->transceiver = XCVR_INTERNAL;
15430 + cmd->autoneg = AUTONEG_DISABLE;
15431 + cmd->maxtxpkt = 1;
15432 + cmd->maxrxpkt = 1;
15434 - mp->shared = platform_get_drvdata(pd->shared);
15435 - port_num = mp->port_num = pd->port_number;
15439 - if (mp->shared->win_protect)
15440 - wrl(mp, WINDOW_PROTECT(port_num), mp->shared->win_protect);
15441 +static int mv643xx_eth_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
15443 + struct mv643xx_eth_private *mp = netdev_priv(dev);
15446 - mp->shared_smi = mp->shared;
15447 - if (pd->shared_smi != NULL)
15448 - mp->shared_smi = platform_get_drvdata(pd->shared_smi);
15450 - /* set default config values */
15451 - eth_port_uc_addr_get(mp, dev->dev_addr);
15452 - mp->rx_ring_size = PORT_DEFAULT_RECEIVE_QUEUE_SIZE;
15453 - mp->tx_ring_size = PORT_DEFAULT_TRANSMIT_QUEUE_SIZE;
15455 + * The MAC does not support 1000baseT_Half.
15457 + cmd->advertising &= ~ADVERTISED_1000baseT_Half;
15459 - if (is_valid_ether_addr(pd->mac_addr))
15460 - memcpy(dev->dev_addr, pd->mac_addr, 6);
15461 + spin_lock_irq(&mp->lock);
15462 + err = mii_ethtool_sset(&mp->mii, cmd);
15463 + spin_unlock_irq(&mp->lock);
15465 - if (pd->phy_addr || pd->force_phy_addr)
15466 - ethernet_phy_set(mp, pd->phy_addr);
15470 - if (pd->rx_queue_size)
15471 - mp->rx_ring_size = pd->rx_queue_size;
15472 +static int mv643xx_eth_set_settings_phyless(struct net_device *dev, struct ethtool_cmd *cmd)
15477 - if (pd->tx_queue_size)
15478 - mp->tx_ring_size = pd->tx_queue_size;
15479 +static void mv643xx_eth_get_drvinfo(struct net_device *dev,
15480 + struct ethtool_drvinfo *drvinfo)
15482 + strncpy(drvinfo->driver, mv643xx_eth_driver_name, 32);
15483 + strncpy(drvinfo->version, mv643xx_eth_driver_version, 32);
15484 + strncpy(drvinfo->fw_version, "N/A", 32);
15485 + strncpy(drvinfo->bus_info, "platform", 32);
15486 + drvinfo->n_stats = ARRAY_SIZE(mv643xx_eth_stats);
15489 +static int mv643xx_eth_nway_reset(struct net_device *dev)
15491 + struct mv643xx_eth_private *mp = netdev_priv(dev);
15493 - if (pd->tx_sram_size) {
15494 - mp->tx_sram_size = pd->tx_sram_size;
15495 - mp->tx_sram_addr = pd->tx_sram_addr;
15496 + return mii_nway_restart(&mp->mii);
15499 +static int mv643xx_eth_nway_reset_phyless(struct net_device *dev)
15504 +static u32 mv643xx_eth_get_link(struct net_device *dev)
15506 + struct mv643xx_eth_private *mp = netdev_priv(dev);
15508 + return mii_link_ok(&mp->mii);
15511 +static u32 mv643xx_eth_get_link_phyless(struct net_device *dev)
15516 +static void mv643xx_eth_get_strings(struct net_device *dev,
15517 + uint32_t stringset, uint8_t *data)
15521 + if (stringset == ETH_SS_STATS) {
15522 + for (i = 0; i < ARRAY_SIZE(mv643xx_eth_stats); i++) {
15523 + memcpy(data + i * ETH_GSTRING_LEN,
15524 + mv643xx_eth_stats[i].stat_string,
15525 + ETH_GSTRING_LEN);
15530 +static void mv643xx_eth_get_ethtool_stats(struct net_device *dev,
15531 + struct ethtool_stats *stats,
15534 + struct mv643xx_eth_private *mp = dev->priv;
15537 + mib_counters_update(mp);
15539 + for (i = 0; i < ARRAY_SIZE(mv643xx_eth_stats); i++) {
15540 + const struct mv643xx_eth_stats *stat;
15543 + stat = mv643xx_eth_stats + i;
15545 + if (stat->netdev_off >= 0)
15546 + p = ((void *)mp->dev) + stat->netdev_off;
15548 + p = ((void *)mp) + stat->mp_off;
15550 - if (pd->rx_sram_size) {
15551 - mp->rx_sram_size = pd->rx_sram_size;
15552 - mp->rx_sram_addr = pd->rx_sram_addr;
15553 + data[i] = (stat->sizeof_stat == 8) ?
15554 + *(uint64_t *)p : *(uint32_t *)p;
15558 - duplex = pd->duplex;
15559 - speed = pd->speed;
15560 +static int mv643xx_eth_get_sset_count(struct net_device *dev, int sset)
15562 + if (sset == ETH_SS_STATS)
15563 + return ARRAY_SIZE(mv643xx_eth_stats);
15565 - /* Hook up MII support for ethtool */
15566 - mp->mii.dev = dev;
15567 - mp->mii.mdio_read = mv643xx_mdio_read;
15568 - mp->mii.mdio_write = mv643xx_mdio_write;
15569 - mp->mii.phy_id = ethernet_phy_get(mp);
15570 - mp->mii.phy_id_mask = 0x3f;
15571 - mp->mii.reg_num_mask = 0x1f;
15572 + return -EOPNOTSUPP;
15575 - err = ethernet_phy_detect(mp);
15577 - pr_debug("%s: No PHY detected at addr %d\n",
15578 - dev->name, ethernet_phy_get(mp));
15579 +static const struct ethtool_ops mv643xx_eth_ethtool_ops = {
15580 + .get_settings = mv643xx_eth_get_settings,
15581 + .set_settings = mv643xx_eth_set_settings,
15582 + .get_drvinfo = mv643xx_eth_get_drvinfo,
15583 + .nway_reset = mv643xx_eth_nway_reset,
15584 + .get_link = mv643xx_eth_get_link,
15585 + .set_sg = ethtool_op_set_sg,
15586 + .get_strings = mv643xx_eth_get_strings,
15587 + .get_ethtool_stats = mv643xx_eth_get_ethtool_stats,
15588 + .get_sset_count = mv643xx_eth_get_sset_count,
15591 +static const struct ethtool_ops mv643xx_eth_ethtool_ops_phyless = {
15592 + .get_settings = mv643xx_eth_get_settings_phyless,
15593 + .set_settings = mv643xx_eth_set_settings_phyless,
15594 + .get_drvinfo = mv643xx_eth_get_drvinfo,
15595 + .nway_reset = mv643xx_eth_nway_reset_phyless,
15596 + .get_link = mv643xx_eth_get_link_phyless,
15597 + .set_sg = ethtool_op_set_sg,
15598 + .get_strings = mv643xx_eth_get_strings,
15599 + .get_ethtool_stats = mv643xx_eth_get_ethtool_stats,
15600 + .get_sset_count = mv643xx_eth_get_sset_count,
15604 +/* address handling *********************************************************/
15605 +static void uc_addr_get(struct mv643xx_eth_private *mp, unsigned char *addr)
15607 + unsigned int mac_h;
15608 + unsigned int mac_l;
15610 + mac_h = rdl(mp, MAC_ADDR_HIGH(mp->port_num));
15611 + mac_l = rdl(mp, MAC_ADDR_LOW(mp->port_num));
15613 + addr[0] = (mac_h >> 24) & 0xff;
15614 + addr[1] = (mac_h >> 16) & 0xff;
15615 + addr[2] = (mac_h >> 8) & 0xff;
15616 + addr[3] = mac_h & 0xff;
15617 + addr[4] = (mac_l >> 8) & 0xff;
15618 + addr[5] = mac_l & 0xff;
15621 +static void init_mac_tables(struct mv643xx_eth_private *mp)
15625 + for (i = 0; i < 0x100; i += 4) {
15626 + wrl(mp, SPECIAL_MCAST_TABLE(mp->port_num) + i, 0);
15627 + wrl(mp, OTHER_MCAST_TABLE(mp->port_num) + i, 0);
15630 + for (i = 0; i < 0x10; i += 4)
15631 + wrl(mp, UNICAST_TABLE(mp->port_num) + i, 0);
15634 +static void set_filter_table_entry(struct mv643xx_eth_private *mp,
15635 + int table, unsigned char entry)
15637 + unsigned int table_reg;
15639 + /* Set "accepts frame bit" at specified table entry */
15640 + table_reg = rdl(mp, table + (entry & 0xfc));
15641 + table_reg |= 0x01 << (8 * (entry & 3));
15642 + wrl(mp, table + (entry & 0xfc), table_reg);
15645 +static void uc_addr_set(struct mv643xx_eth_private *mp, unsigned char *addr)
15647 + unsigned int mac_h;
15648 + unsigned int mac_l;
15651 + mac_l = (addr[4] << 8) | addr[5];
15652 + mac_h = (addr[0] << 24) | (addr[1] << 16) | (addr[2] << 8) | addr[3];
15654 + wrl(mp, MAC_ADDR_LOW(mp->port_num), mac_l);
15655 + wrl(mp, MAC_ADDR_HIGH(mp->port_num), mac_h);
15657 + table = UNICAST_TABLE(mp->port_num);
15658 + set_filter_table_entry(mp, table, addr[5] & 0x0f);
15661 +static int mv643xx_eth_set_mac_address(struct net_device *dev, void *addr)
15663 + struct mv643xx_eth_private *mp = netdev_priv(dev);
15665 + /* +2 is for the offset of the HW addr type */
15666 + memcpy(dev->dev_addr, addr + 2, 6);
15668 + init_mac_tables(mp);
15669 + uc_addr_set(mp, dev->dev_addr);
15674 +static int addr_crc(unsigned char *addr)
15679 + for (i = 0; i < 6; i++) {
15682 + crc = (crc ^ addr[i]) << 8;
15683 + for (j = 7; j >= 0; j--) {
15684 + if (crc & (0x100 << j))
15685 + crc ^= 0x107 << j;
15692 +static void mv643xx_eth_set_rx_mode(struct net_device *dev)
15694 + struct mv643xx_eth_private *mp = netdev_priv(dev);
15696 + struct dev_addr_list *addr;
15699 + port_config = rdl(mp, PORT_CONFIG(mp->port_num));
15700 + if (dev->flags & IFF_PROMISC)
15701 + port_config |= UNICAST_PROMISCUOUS_MODE;
15703 + port_config &= ~UNICAST_PROMISCUOUS_MODE;
15704 + wrl(mp, PORT_CONFIG(mp->port_num), port_config);
15706 + if (dev->flags & (IFF_PROMISC | IFF_ALLMULTI)) {
15707 + int port_num = mp->port_num;
15708 + u32 accept = 0x01010101;
15710 + for (i = 0; i < 0x100; i += 4) {
15711 + wrl(mp, SPECIAL_MCAST_TABLE(port_num) + i, accept);
15712 + wrl(mp, OTHER_MCAST_TABLE(port_num) + i, accept);
15717 + for (i = 0; i < 0x100; i += 4) {
15718 + wrl(mp, SPECIAL_MCAST_TABLE(mp->port_num) + i, 0);
15719 + wrl(mp, OTHER_MCAST_TABLE(mp->port_num) + i, 0);
15722 + for (addr = dev->mc_list; addr != NULL; addr = addr->next) {
15723 + u8 *a = addr->da_addr;
15726 + if (addr->da_addrlen != 6)
15729 + if (memcmp(a, "\x01\x00\x5e\x00\x00", 5) == 0) {
15730 + table = SPECIAL_MCAST_TABLE(mp->port_num);
15731 + set_filter_table_entry(mp, table, a[5]);
15733 + int crc = addr_crc(a);
15735 + table = OTHER_MCAST_TABLE(mp->port_num);
15736 + set_filter_table_entry(mp, table, crc);
15742 +/* rx/tx queue initialisation ***********************************************/
15743 +static int rxq_init(struct mv643xx_eth_private *mp, int index)
15745 + struct rx_queue *rxq = mp->rxq + index;
15746 + struct rx_desc *rx_desc;
15750 + rxq->index = index;
15752 + rxq->rx_ring_size = mp->default_rx_ring_size;
15754 + rxq->rx_desc_count = 0;
15755 + rxq->rx_curr_desc = 0;
15756 + rxq->rx_used_desc = 0;
15758 + size = rxq->rx_ring_size * sizeof(struct rx_desc);
15760 + if (index == mp->rxq_primary && size <= mp->rx_desc_sram_size) {
15761 + rxq->rx_desc_area = ioremap(mp->rx_desc_sram_addr,
15762 + mp->rx_desc_sram_size);
15763 + rxq->rx_desc_dma = mp->rx_desc_sram_addr;
15765 + rxq->rx_desc_area = dma_alloc_coherent(NULL, size,
15766 + &rxq->rx_desc_dma,
15770 + if (rxq->rx_desc_area == NULL) {
15771 + dev_printk(KERN_ERR, &mp->dev->dev,
15772 + "can't allocate rx ring (%d bytes)\n", size);
15775 + memset(rxq->rx_desc_area, 0, size);
15777 - ethernet_phy_reset(mp);
15778 - mp->mii.supports_gmii = mii_check_gmii_support(&mp->mii);
15779 - mv643xx_init_ethtool_cmd(dev, mp->mii.phy_id, speed, duplex, &cmd);
15780 - mv643xx_eth_update_pscr(dev, &cmd);
15781 - mv643xx_set_settings(dev, &cmd);
15782 + rxq->rx_desc_area_size = size;
15783 + rxq->rx_skb = kmalloc(rxq->rx_ring_size * sizeof(*rxq->rx_skb),
15785 + if (rxq->rx_skb == NULL) {
15786 + dev_printk(KERN_ERR, &mp->dev->dev,
15787 + "can't allocate rx skb ring\n");
15791 - SET_NETDEV_DEV(dev, &pdev->dev);
15792 - err = register_netdev(dev);
15794 + rx_desc = (struct rx_desc *)rxq->rx_desc_area;
15795 + for (i = 0; i < rxq->rx_ring_size; i++) {
15796 + int nexti = (i + 1) % rxq->rx_ring_size;
15797 + rx_desc[i].next_desc_ptr = rxq->rx_desc_dma +
15798 + nexti * sizeof(struct rx_desc);
15801 + init_timer(&rxq->rx_oom);
15802 + rxq->rx_oom.data = (unsigned long)rxq;
15803 + rxq->rx_oom.function = rxq_refill_timer_wrapper;
15809 + if (index == mp->rxq_primary && size <= mp->rx_desc_sram_size)
15810 + iounmap(rxq->rx_desc_area);
15812 + dma_free_coherent(NULL, size,
15813 + rxq->rx_desc_area,
15814 + rxq->rx_desc_dma);
15820 +static void rxq_deinit(struct rx_queue *rxq)
15822 + struct mv643xx_eth_private *mp = rxq_to_mp(rxq);
15825 + rxq_disable(rxq);
15827 + del_timer_sync(&rxq->rx_oom);
15829 + for (i = 0; i < rxq->rx_ring_size; i++) {
15830 + if (rxq->rx_skb[i]) {
15831 + dev_kfree_skb(rxq->rx_skb[i]);
15832 + rxq->rx_desc_count--;
15836 + if (rxq->rx_desc_count) {
15837 + dev_printk(KERN_ERR, &mp->dev->dev,
15838 + "error freeing rx ring -- %d skbs stuck\n",
15839 + rxq->rx_desc_count);
15842 + if (rxq->index == mp->rxq_primary &&
15843 + rxq->rx_desc_area_size <= mp->rx_desc_sram_size)
15844 + iounmap(rxq->rx_desc_area);
15846 + dma_free_coherent(NULL, rxq->rx_desc_area_size,
15847 + rxq->rx_desc_area, rxq->rx_desc_dma);
15849 + kfree(rxq->rx_skb);
15852 +static int txq_init(struct mv643xx_eth_private *mp, int index)
15854 + struct tx_queue *txq = mp->txq + index;
15855 + struct tx_desc *tx_desc;
15859 + txq->index = index;
15861 + txq->tx_ring_size = mp->default_tx_ring_size;
15863 + txq->tx_desc_count = 0;
15864 + txq->tx_curr_desc = 0;
15865 + txq->tx_used_desc = 0;
15867 + size = txq->tx_ring_size * sizeof(struct tx_desc);
15869 + if (index == mp->txq_primary && size <= mp->tx_desc_sram_size) {
15870 + txq->tx_desc_area = ioremap(mp->tx_desc_sram_addr,
15871 + mp->tx_desc_sram_size);
15872 + txq->tx_desc_dma = mp->tx_desc_sram_addr;
15874 + txq->tx_desc_area = dma_alloc_coherent(NULL, size,
15875 + &txq->tx_desc_dma,
15879 + if (txq->tx_desc_area == NULL) {
15880 + dev_printk(KERN_ERR, &mp->dev->dev,
15881 + "can't allocate tx ring (%d bytes)\n", size);
15884 + memset(txq->tx_desc_area, 0, size);
15886 - p = dev->dev_addr;
15887 - printk(KERN_NOTICE
15888 - "%s: port %d with MAC address %s\n",
15889 - dev->name, port_num, print_mac(mac, p));
15890 + txq->tx_desc_area_size = size;
15891 + txq->tx_skb = kmalloc(txq->tx_ring_size * sizeof(*txq->tx_skb),
15893 + if (txq->tx_skb == NULL) {
15894 + dev_printk(KERN_ERR, &mp->dev->dev,
15895 + "can't allocate tx skb ring\n");
15899 - if (dev->features & NETIF_F_SG)
15900 - printk(KERN_NOTICE "%s: Scatter Gather Enabled\n", dev->name);
15901 + tx_desc = (struct tx_desc *)txq->tx_desc_area;
15902 + for (i = 0; i < txq->tx_ring_size; i++) {
15903 + int nexti = (i + 1) % txq->tx_ring_size;
15904 + tx_desc[i].next_desc_ptr = txq->tx_desc_dma +
15905 + nexti * sizeof(struct tx_desc);
15908 - if (dev->features & NETIF_F_IP_CSUM)
15909 - printk(KERN_NOTICE "%s: TX TCP/IP Checksumming Supported\n",
15915 + if (index == mp->txq_primary && size <= mp->tx_desc_sram_size)
15916 + iounmap(txq->tx_desc_area);
15918 + dma_free_coherent(NULL, size,
15919 + txq->tx_desc_area,
15920 + txq->tx_desc_dma);
15926 +static void txq_reclaim(struct tx_queue *txq, int force)
15928 + struct mv643xx_eth_private *mp = txq_to_mp(txq);
15929 + unsigned long flags;
15931 + spin_lock_irqsave(&mp->lock, flags);
15932 + while (txq->tx_desc_count > 0) {
15934 + struct tx_desc *desc;
15936 + struct sk_buff *skb;
15940 + tx_index = txq->tx_used_desc;
15941 + desc = &txq->tx_desc_area[tx_index];
15942 + cmd_sts = desc->cmd_sts;
15944 + if (!force && (cmd_sts & BUFFER_OWNED_BY_DMA))
15947 + txq->tx_used_desc = (tx_index + 1) % txq->tx_ring_size;
15948 + txq->tx_desc_count--;
15950 + addr = desc->buf_ptr;
15951 + count = desc->byte_cnt;
15952 + skb = txq->tx_skb[tx_index];
15953 + txq->tx_skb[tx_index] = NULL;
15955 + if (cmd_sts & ERROR_SUMMARY) {
15956 + dev_printk(KERN_INFO, &mp->dev->dev, "tx error\n");
15957 + mp->dev->stats.tx_errors++;
15961 + * Drop mp->lock while we free the skb.
15963 + spin_unlock_irqrestore(&mp->lock, flags);
15965 -#ifdef MV643XX_CHECKSUM_OFFLOAD_TX
15966 - printk(KERN_NOTICE "%s: RX TCP/UDP Checksum Offload ON \n", dev->name);
15967 + if (cmd_sts & TX_FIRST_DESC)
15968 + dma_unmap_single(NULL, addr, count, DMA_TO_DEVICE);
15970 + dma_unmap_page(NULL, addr, count, DMA_TO_DEVICE);
15973 + dev_kfree_skb_irq(skb);
15975 + spin_lock_irqsave(&mp->lock, flags);
15977 + spin_unlock_irqrestore(&mp->lock, flags);
15980 +static void txq_deinit(struct tx_queue *txq)
15982 + struct mv643xx_eth_private *mp = txq_to_mp(txq);
15984 + txq_disable(txq);
15985 + txq_reclaim(txq, 1);
15987 + BUG_ON(txq->tx_used_desc != txq->tx_curr_desc);
15989 + if (txq->index == mp->txq_primary &&
15990 + txq->tx_desc_area_size <= mp->tx_desc_sram_size)
15991 + iounmap(txq->tx_desc_area);
15993 + dma_free_coherent(NULL, txq->tx_desc_area_size,
15994 + txq->tx_desc_area, txq->tx_desc_dma);
15996 + kfree(txq->tx_skb);
16000 +/* netdev ops and related ***************************************************/
16001 +static void update_pscr(struct mv643xx_eth_private *mp, int speed, int duplex)
16006 + pscr_o = rdl(mp, PORT_SERIAL_CONTROL(mp->port_num));
16008 + /* clear speed, duplex and rx buffer size fields */
16009 + pscr_n = pscr_o & ~(SET_MII_SPEED_TO_100 |
16010 + SET_GMII_SPEED_TO_1000 |
16011 + SET_FULL_DUPLEX_MODE |
16012 + MAX_RX_PACKET_MASK);
16014 + if (speed == SPEED_1000) {
16015 + pscr_n |= SET_GMII_SPEED_TO_1000 | MAX_RX_PACKET_9700BYTE;
16017 + if (speed == SPEED_100)
16018 + pscr_n |= SET_MII_SPEED_TO_100;
16019 + pscr_n |= MAX_RX_PACKET_1522BYTE;
16022 + if (duplex == DUPLEX_FULL)
16023 + pscr_n |= SET_FULL_DUPLEX_MODE;
16025 + if (pscr_n != pscr_o) {
16026 + if ((pscr_o & SERIAL_PORT_ENABLE) == 0)
16027 + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr_n);
16031 + for (i = 0; i < 8; i++)
16032 + if (mp->txq_mask & (1 << i))
16033 + txq_disable(mp->txq + i);
16035 + pscr_o &= ~SERIAL_PORT_ENABLE;
16036 + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr_o);
16037 + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr_n);
16038 + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr_n);
16040 + for (i = 0; i < 8; i++)
16041 + if (mp->txq_mask & (1 << i))
16042 + txq_enable(mp->txq + i);
16047 +static irqreturn_t mv643xx_eth_irq(int irq, void *dev_id)
16049 + struct net_device *dev = (struct net_device *)dev_id;
16050 + struct mv643xx_eth_private *mp = netdev_priv(dev);
16052 + u32 int_cause_ext;
16055 + int_cause = rdl(mp, INT_CAUSE(mp->port_num)) &
16056 + (INT_TX_END | INT_RX | INT_EXT);
16057 + if (int_cause == 0)
16060 + int_cause_ext = 0;
16061 + if (int_cause & INT_EXT) {
16062 + int_cause_ext = rdl(mp, INT_CAUSE_EXT(mp->port_num))
16063 + & (INT_EXT_LINK | INT_EXT_PHY | INT_EXT_TX);
16064 + wrl(mp, INT_CAUSE_EXT(mp->port_num), ~int_cause_ext);
16067 + if (int_cause_ext & (INT_EXT_PHY | INT_EXT_LINK)) {
16068 + if (mp->phy_addr == -1 || mii_link_ok(&mp->mii)) {
16071 + if (mp->phy_addr != -1) {
16072 + struct ethtool_cmd cmd;
16074 + mii_ethtool_gset(&mp->mii, &cmd);
16075 + update_pscr(mp, cmd.speed, cmd.duplex);
16078 + for (i = 0; i < 8; i++)
16079 + if (mp->txq_mask & (1 << i))
16080 + txq_enable(mp->txq + i);
16082 + if (!netif_carrier_ok(dev)) {
16083 + netif_carrier_on(dev);
16084 + __txq_maybe_wake(mp->txq + mp->txq_primary);
16086 + } else if (netif_carrier_ok(dev)) {
16087 + netif_stop_queue(dev);
16088 + netif_carrier_off(dev);
16093 + * RxBuffer or RxError set for any of the 8 queues?
16095 +#ifdef MV643XX_ETH_NAPI
16096 + if (int_cause & INT_RX) {
16097 + wrl(mp, INT_MASK(mp->port_num), 0x00000000);
16098 + rdl(mp, INT_MASK(mp->port_num));
16100 + netif_rx_schedule(dev, &mp->napi);
16103 + if (int_cause & INT_RX) {
16106 + for (i = 7; i >= 0; i--)
16107 + if (mp->rxq_mask & (1 << i))
16108 + rxq_process(mp->rxq + i, INT_MAX);
16112 -#ifdef MV643XX_COAL
16113 - printk(KERN_NOTICE "%s: TX and RX Interrupt Coalescing ON \n",
16116 + txq_active = rdl(mp, TXQ_COMMAND(mp->port_num));
16119 + * TxBuffer or TxError set for any of the 8 queues?
16121 + if (int_cause_ext & INT_EXT_TX) {
16124 + for (i = 0; i < 8; i++)
16125 + if (mp->txq_mask & (1 << i))
16126 + txq_reclaim(mp->txq + i, 0);
16130 + * Any TxEnd interrupts?
16132 + if (int_cause & INT_TX_END) {
16135 + wrl(mp, INT_CAUSE(mp->port_num), ~(int_cause & INT_TX_END));
16136 + for (i = 0; i < 8; i++) {
16137 + struct tx_queue *txq = mp->txq + i;
16138 + if (txq->tx_desc_count && !((txq_active >> i) & 1))
16144 + * Enough space again in the primary TX queue for a full packet?
16146 + if (int_cause_ext & INT_EXT_TX) {
16147 + struct tx_queue *txq = mp->txq + mp->txq_primary;
16148 + __txq_maybe_wake(txq);
16151 + return IRQ_HANDLED;
16154 +static void phy_reset(struct mv643xx_eth_private *mp)
16156 + unsigned int data;
16158 + smi_reg_read(mp, mp->phy_addr, 0, &data);
16160 + smi_reg_write(mp, mp->phy_addr, 0, data);
16164 + smi_reg_read(mp, mp->phy_addr, 0, &data);
16165 + } while (data & 0x8000);
16168 +static void port_start(struct mv643xx_eth_private *mp)
16174 + * Configure basic link parameters.
16176 + pscr = rdl(mp, PORT_SERIAL_CONTROL(mp->port_num));
16177 + pscr &= ~(SERIAL_PORT_ENABLE | FORCE_LINK_PASS);
16178 + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr);
16179 + pscr |= DISABLE_AUTO_NEG_FOR_FLOW_CTRL |
16180 + DISABLE_AUTO_NEG_SPEED_GMII |
16181 + DISABLE_AUTO_NEG_FOR_DUPLEX |
16182 + DO_NOT_FORCE_LINK_FAIL |
16183 + SERIAL_PORT_CONTROL_RESERVED;
16184 + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr);
16185 + pscr |= SERIAL_PORT_ENABLE;
16186 + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr);
16188 + wrl(mp, SDMA_CONFIG(mp->port_num), PORT_SDMA_CONFIG_DEFAULT_VALUE);
16191 + * Perform PHY reset, if there is a PHY.
16193 + if (mp->phy_addr != -1) {
16194 + struct ethtool_cmd cmd;
16196 + mv643xx_eth_get_settings(mp->dev, &cmd);
16198 + mv643xx_eth_set_settings(mp->dev, &cmd);
16202 + * Configure TX path and queues.
16204 + tx_set_rate(mp, 1000000000, 16777216);
16205 + for (i = 0; i < 8; i++) {
16206 + struct tx_queue *txq = mp->txq + i;
16207 + int off = TXQ_CURRENT_DESC_PTR(mp->port_num, i);
16210 + if ((mp->txq_mask & (1 << i)) == 0)
16213 + addr = (u32)txq->tx_desc_dma;
16214 + addr += txq->tx_curr_desc * sizeof(struct tx_desc);
16215 + wrl(mp, off, addr);
16217 + txq_set_rate(txq, 1000000000, 16777216);
16218 + txq_set_fixed_prio_mode(txq);
16222 + * Add configured unicast address to address filter table.
16224 + uc_addr_set(mp, mp->dev->dev_addr);
16227 + * Receive all unmatched unicast, TCP, UDP, BPDU and broadcast
16228 + * frames to RX queue #0.
16230 + wrl(mp, PORT_CONFIG(mp->port_num), 0x00000000);
16232 -#ifdef MV643XX_NAPI
16233 - printk(KERN_NOTICE "%s: RX NAPI Enabled \n", dev->name);
16236 + * Treat BPDUs as normal multicasts, and disable partition mode.
16238 + wrl(mp, PORT_CONFIG_EXT(mp->port_num), 0x00000000);
16240 - if (mp->tx_sram_size > 0)
16241 - printk(KERN_NOTICE "%s: Using SRAM\n", dev->name);
16243 + * Enable the receive queues.
16245 + for (i = 0; i < 8; i++) {
16246 + struct rx_queue *rxq = mp->rxq + i;
16247 + int off = RXQ_CURRENT_DESC_PTR(mp->port_num, i);
16251 + if ((mp->rxq_mask & (1 << i)) == 0)
16255 - free_netdev(dev);
16256 + addr = (u32)rxq->rx_desc_dma;
16257 + addr += rxq->rx_curr_desc * sizeof(struct rx_desc);
16258 + wrl(mp, off, addr);
16265 -static int mv643xx_eth_remove(struct platform_device *pdev)
16266 +static void set_rx_coal(struct mv643xx_eth_private *mp, unsigned int delay)
16268 - struct net_device *dev = platform_get_drvdata(pdev);
16269 + unsigned int coal = ((mp->shared->t_clk / 1000000) * delay) / 64;
16272 - unregister_netdev(dev);
16273 - flush_scheduled_work();
16274 + val = rdl(mp, SDMA_CONFIG(mp->port_num));
16275 + if (mp->shared->extended_rx_coal_limit) {
16276 + if (coal > 0xffff)
16278 + val &= ~0x023fff80;
16279 + val |= (coal & 0x8000) << 10;
16280 + val |= (coal & 0x7fff) << 7;
16282 + if (coal > 0x3fff)
16284 + val &= ~0x003fff00;
16285 + val |= (coal & 0x3fff) << 8;
16287 + wrl(mp, SDMA_CONFIG(mp->port_num), val);
16290 - free_netdev(dev);
16291 - platform_set_drvdata(pdev, NULL);
16293 +static void set_tx_coal(struct mv643xx_eth_private *mp, unsigned int delay)
16295 + unsigned int coal = ((mp->shared->t_clk / 1000000) * delay) / 64;
16297 + if (coal > 0x3fff)
16299 + wrl(mp, TX_FIFO_URGENT_THRESHOLD(mp->port_num), (coal & 0x3fff) << 4);
16302 -static void mv643xx_eth_conf_mbus_windows(struct mv643xx_shared_private *msp,
16303 - struct mbus_dram_target_info *dram)
16304 +static int mv643xx_eth_open(struct net_device *dev)
16306 - void __iomem *base = msp->eth_base;
16309 + struct mv643xx_eth_private *mp = netdev_priv(dev);
16313 - for (i = 0; i < 6; i++) {
16314 - writel(0, base + WINDOW_BASE(i));
16315 - writel(0, base + WINDOW_SIZE(i));
16317 - writel(0, base + WINDOW_REMAP_HIGH(i));
16318 + wrl(mp, INT_CAUSE(mp->port_num), 0);
16319 + wrl(mp, INT_CAUSE_EXT(mp->port_num), 0);
16320 + rdl(mp, INT_CAUSE_EXT(mp->port_num));
16322 + err = request_irq(dev->irq, mv643xx_eth_irq,
16323 + IRQF_SHARED | IRQF_SAMPLE_RANDOM,
16326 + dev_printk(KERN_ERR, &dev->dev, "can't assign irq\n");
16330 - win_enable = 0x3f;
16333 - for (i = 0; i < dram->num_cs; i++) {
16334 - struct mbus_dram_window *cs = dram->cs + i;
16335 + init_mac_tables(mp);
16337 - writel((cs->base & 0xffff0000) |
16338 - (cs->mbus_attr << 8) |
16339 - dram->mbus_dram_target_id, base + WINDOW_BASE(i));
16340 - writel((cs->size - 1) & 0xffff0000, base + WINDOW_SIZE(i));
16341 + for (i = 0; i < 8; i++) {
16342 + if ((mp->rxq_mask & (1 << i)) == 0)
16345 + err = rxq_init(mp, i);
16348 + if (mp->rxq_mask & (1 << i))
16349 + rxq_deinit(mp->rxq + i);
16353 - win_enable &= ~(1 << i);
16354 - win_protect |= 3 << (2 * i);
16355 + rxq_refill(mp->rxq + i);
16358 - writel(win_enable, base + WINDOW_BAR_ENABLE);
16359 - msp->win_protect = win_protect;
16362 -static int mv643xx_eth_shared_probe(struct platform_device *pdev)
16364 - static int mv643xx_version_printed = 0;
16365 - struct mv643xx_eth_shared_platform_data *pd = pdev->dev.platform_data;
16366 - struct mv643xx_shared_private *msp;
16367 - struct resource *res;
16370 - if (!mv643xx_version_printed++)
16371 - printk(KERN_NOTICE "MV-643xx 10/100/1000 Ethernet Driver\n");
16374 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
16377 + for (i = 0; i < 8; i++) {
16378 + if ((mp->txq_mask & (1 << i)) == 0)
16381 + err = txq_init(mp, i);
16384 + if (mp->txq_mask & (1 << i))
16385 + txq_deinit(mp->txq + i);
16391 - msp = kmalloc(sizeof(*msp), GFP_KERNEL);
16394 - memset(msp, 0, sizeof(*msp));
16395 +#ifdef MV643XX_ETH_NAPI
16396 + napi_enable(&mp->napi);
16399 - msp->eth_base = ioremap(res->start, res->end - res->start + 1);
16400 - if (msp->eth_base == NULL)
16404 - spin_lock_init(&msp->phy_lock);
16405 - msp->t_clk = (pd != NULL && pd->t_clk != 0) ? pd->t_clk : 133000000;
16406 + set_rx_coal(mp, 0);
16407 + set_tx_coal(mp, 0);
16409 - platform_set_drvdata(pdev, msp);
16410 + wrl(mp, INT_MASK_EXT(mp->port_num),
16411 + INT_EXT_LINK | INT_EXT_PHY | INT_EXT_TX);
16414 - * (Re-)program MBUS remapping windows if we are asked to.
16416 - if (pd != NULL && pd->dram != NULL)
16417 - mv643xx_eth_conf_mbus_windows(msp, pd->dram);
16418 + wrl(mp, INT_MASK(mp->port_num), INT_TX_END | INT_RX | INT_EXT);
16425 + for (i = 0; i < 8; i++)
16426 + if (mp->rxq_mask & (1 << i))
16427 + rxq_deinit(mp->rxq + i);
16430 + free_irq(dev->irq, dev);
16435 -static int mv643xx_eth_shared_remove(struct platform_device *pdev)
16436 +static void port_reset(struct mv643xx_eth_private *mp)
16438 - struct mv643xx_shared_private *msp = platform_get_drvdata(pdev);
16439 + unsigned int data;
16442 - iounmap(msp->eth_base);
16444 + for (i = 0; i < 8; i++) {
16445 + if (mp->rxq_mask & (1 << i))
16446 + rxq_disable(mp->rxq + i);
16447 + if (mp->txq_mask & (1 << i))
16448 + txq_disable(mp->txq + i);
16450 + while (!(rdl(mp, PORT_STATUS(mp->port_num)) & TX_FIFO_EMPTY))
16454 + /* Reset the Enable bit in the Configuration Register */
16455 + data = rdl(mp, PORT_SERIAL_CONTROL(mp->port_num));
16456 + data &= ~(SERIAL_PORT_ENABLE |
16457 + DO_NOT_FORCE_LINK_FAIL |
16458 + FORCE_LINK_PASS);
16459 + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), data);
16462 -static void mv643xx_eth_shutdown(struct platform_device *pdev)
16463 +static int mv643xx_eth_stop(struct net_device *dev)
16465 - struct net_device *dev = platform_get_drvdata(pdev);
16466 - struct mv643xx_private *mp = netdev_priv(dev);
16467 - unsigned int port_num = mp->port_num;
16469 - /* Mask all interrupts on ethernet port */
16470 - wrl(mp, INTERRUPT_MASK_REG(port_num), 0);
16471 - rdl(mp, INTERRUPT_MASK_REG(port_num));
16472 + struct mv643xx_eth_private *mp = netdev_priv(dev);
16475 - eth_port_reset(mp);
16477 + wrl(mp, INT_MASK(mp->port_num), 0x00000000);
16478 + rdl(mp, INT_MASK(mp->port_num));
16480 -static struct platform_driver mv643xx_eth_driver = {
16481 - .probe = mv643xx_eth_probe,
16482 - .remove = mv643xx_eth_remove,
16483 - .shutdown = mv643xx_eth_shutdown,
16485 - .name = MV643XX_ETH_NAME,
16486 - .owner = THIS_MODULE,
16489 +#ifdef MV643XX_ETH_NAPI
16490 + napi_disable(&mp->napi);
16492 + netif_carrier_off(dev);
16493 + netif_stop_queue(dev);
16495 -static struct platform_driver mv643xx_eth_shared_driver = {
16496 - .probe = mv643xx_eth_shared_probe,
16497 - .remove = mv643xx_eth_shared_remove,
16499 - .name = MV643XX_ETH_SHARED_NAME,
16500 - .owner = THIS_MODULE,
16503 + free_irq(dev->irq, dev);
16506 - * mv643xx_init_module
16508 - * Registers the network drivers into the Linux kernel
16514 -static int __init mv643xx_init_module(void)
16518 + mib_counters_update(mp);
16520 - rc = platform_driver_register(&mv643xx_eth_shared_driver);
16522 - rc = platform_driver_register(&mv643xx_eth_driver);
16524 - platform_driver_unregister(&mv643xx_eth_shared_driver);
16525 + for (i = 0; i < 8; i++) {
16526 + if (mp->rxq_mask & (1 << i))
16527 + rxq_deinit(mp->rxq + i);
16528 + if (mp->txq_mask & (1 << i))
16529 + txq_deinit(mp->txq + i);
16535 - * mv643xx_cleanup_module
16537 - * Registers the network drivers into the Linux kernel
16543 -static void __exit mv643xx_cleanup_module(void)
16545 - platform_driver_unregister(&mv643xx_eth_driver);
16546 - platform_driver_unregister(&mv643xx_eth_shared_driver);
16550 -module_init(mv643xx_init_module);
16551 -module_exit(mv643xx_cleanup_module);
16553 -MODULE_LICENSE("GPL");
16554 -MODULE_AUTHOR( "Rabeeh Khoury, Assaf Hoffman, Matthew Dharm, Manish Lachwani"
16555 - " and Dale Farnsworth");
16556 -MODULE_DESCRIPTION("Ethernet driver for Marvell MV643XX");
16557 -MODULE_ALIAS("platform:" MV643XX_ETH_NAME);
16558 -MODULE_ALIAS("platform:" MV643XX_ETH_SHARED_NAME);
16561 - * The second part is the low level driver of the gigE ethernet ports.
16565 - * Marvell's Gigabit Ethernet controller low level driver
16568 - * This file introduce low level API to Marvell's Gigabit Ethernet
16569 - * controller. This Gigabit Ethernet Controller driver API controls
16570 - * 1) Operations (i.e. port init, start, reset etc').
16571 - * 2) Data flow (i.e. port send, receive etc').
16572 - * Each Gigabit Ethernet port is controlled via
16573 - * struct mv643xx_private.
16574 - * This struct includes user configuration information as well as
16575 - * driver internal data needed for its operations.
16577 - * Supported Features:
16578 - * - This low level driver is OS independent. Allocating memory for
16579 - * the descriptor rings and buffers are not within the scope of
16581 - * - The user is free from Rx/Tx queue managing.
16582 - * - This low level driver introduce functionality API that enable
16583 - * the to operate Marvell's Gigabit Ethernet Controller in a
16584 - * convenient way.
16585 - * - Simple Gigabit Ethernet port operation API.
16586 - * - Simple Gigabit Ethernet port data flow API.
16587 - * - Data flow and operation API support per queue functionality.
16588 - * - Support cached descriptors for better performance.
16589 - * - Enable access to all four DRAM banks and internal SRAM memory
16591 - * - PHY access and control API.
16592 - * - Port control register configuration API.
16593 - * - Full control over Unicast and Multicast MAC configurations.
16595 - * Operation flow:
16597 - * Initialization phase
16598 - * This phase complete the initialization of the the
16599 - * mv643xx_private struct.
16600 - * User information regarding port configuration has to be set
16601 - * prior to calling the port initialization routine.
16603 - * In this phase any port Tx/Rx activity is halted, MIB counters
16604 - * are cleared, PHY address is set according to user parameter and
16605 - * access to DRAM and internal SRAM memory spaces.
16607 - * Driver ring initialization
16608 - * Allocating memory for the descriptor rings and buffers is not
16609 - * within the scope of this driver. Thus, the user is required to
16610 - * allocate memory for the descriptors ring and buffers. Those
16611 - * memory parameters are used by the Rx and Tx ring initialization
16612 - * routines in order to curve the descriptor linked list in a form
16614 - * Note: Pay special attention to alignment issues when using
16615 - * cached descriptors/buffers. In this phase the driver store
16616 - * information in the mv643xx_private struct regarding each queue
16620 - * This phase prepares the Ethernet port for Rx and Tx activity.
16621 - * It uses the information stored in the mv643xx_private struct to
16622 - * initialize the various port registers.
16625 - * All packet references to/from the driver are done using
16626 - * struct pkt_info.
16627 - * This struct is a unified struct used with Rx and Tx operations.
16628 - * This way the user is not required to be familiar with neither
16629 - * Tx nor Rx descriptors structures.
16630 - * The driver's descriptors rings are management by indexes.
16631 - * Those indexes controls the ring resources and used to indicate
16632 - * a SW resource error:
16634 - * This index points to the current available resource for use. For
16635 - * example in Rx process this index will point to the descriptor
16636 - * that will be passed to the user upon calling the receive
16637 - * routine. In Tx process, this index will point to the descriptor
16638 - * that will be assigned with the user packet info and transmitted.
16640 - * This index points to the descriptor that need to restore its
16641 - * resources. For example in Rx process, using the Rx buffer return
16642 - * API will attach the buffer returned in packet info to the
16643 - * descriptor pointed by 'used'. In Tx process, using the Tx
16644 - * descriptor return will merely return the user packet info with
16645 - * the command status of the transmitted buffer pointed by the
16646 - * 'used' index. Nevertheless, it is essential to use this routine
16647 - * to update the 'used' index.
16649 - * This index supports Tx Scatter-Gather. It points to the first
16650 - * descriptor of a packet assembled of multiple buffers. For
16651 - * example when in middle of Such packet we have a Tx resource
16652 - * error the 'curr' index get the value of 'first' to indicate
16653 - * that the ring returned to its state before trying to transmit
16656 - * Receive operation:
16657 - * The eth_port_receive API set the packet information struct,
16658 - * passed by the caller, with received information from the
16659 - * 'current' SDMA descriptor.
16660 - * It is the user responsibility to return this resource back
16661 - * to the Rx descriptor ring to enable the reuse of this source.
16662 - * Return Rx resource is done using the eth_rx_return_buff API.
16664 - * Prior to calling the initialization routine eth_port_init() the user
16665 - * must set the following fields under mv643xx_private struct:
16666 - * port_num User Ethernet port number.
16667 - * port_config User port configuration value.
16668 - * port_config_extend User port config extend value.
16669 - * port_sdma_config User port SDMA config value.
16670 - * port_serial_control User port serial control value.
16672 - * This driver data flow is done using the struct pkt_info which
16673 - * is a unified struct for Rx and Tx operations:
16675 - * byte_cnt Tx/Rx descriptor buffer byte count.
16676 - * l4i_chk CPU provided TCP Checksum. For Tx operation
16678 - * cmd_sts Tx/Rx descriptor command status.
16679 - * buf_ptr Tx/Rx descriptor buffer pointer.
16680 - * return_info Tx/Rx user resource return information.
16683 -/* Ethernet Port routines */
16684 -static void eth_port_set_filter_table_entry(struct mv643xx_private *mp,
16685 - int table, unsigned char entry);
16688 - * eth_port_init - Initialize the Ethernet port driver
16691 - * This function prepares the ethernet port to start its activity:
16692 - * 1) Completes the ethernet port driver struct initialization toward port
16694 - * 2) Resets the device to a quiescent state in case of warm reboot.
16695 - * 3) Enable SDMA access to all four DRAM banks as well as internal SRAM.
16696 - * 4) Clean MAC tables. The reset status of those tables is unknown.
16697 - * 5) Set PHY address.
16698 - * Note: Call this routine prior to eth_port_start routine and after
16699 - * setting user values in the user fields of Ethernet port control
16703 - * struct mv643xx_private *mp Ethernet port control struct
16706 - * See description.
16711 -static void eth_port_init(struct mv643xx_private *mp)
16712 +static int mv643xx_eth_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
16714 - mp->rx_resource_err = 0;
16715 + struct mv643xx_eth_private *mp = netdev_priv(dev);
16717 - eth_port_reset(mp);
16718 + if (mp->phy_addr != -1)
16719 + return generic_mii_ioctl(&mp->mii, if_mii(ifr), cmd, NULL);
16721 - eth_port_init_mac_tables(mp);
16722 + return -EOPNOTSUPP;
16726 - * eth_port_start - Start the Ethernet port activity.
16729 - * This routine prepares the Ethernet port for Rx and Tx activity:
16730 - * 1. Initialize Tx and Rx Current Descriptor Pointer for each queue that
16731 - * has been initialized a descriptor's ring (using
16732 - * ether_init_tx_desc_ring for Tx and ether_init_rx_desc_ring for Rx)
16733 - * 2. Initialize and enable the Ethernet configuration port by writing to
16734 - * the port's configuration and command registers.
16735 - * 3. Initialize and enable the SDMA by writing to the SDMA's
16736 - * configuration and command registers. After completing these steps,
16737 - * the ethernet port SDMA can starts to perform Rx and Tx activities.
16739 - * Note: Each Rx and Tx queue descriptor's list must be initialized prior
16740 - * to calling this function (use ether_init_tx_desc_ring for Tx queues
16741 - * and ether_init_rx_desc_ring for Rx queues).
16744 - * dev - a pointer to the required interface
16747 - * Ethernet port is ready to receive and transmit.
16752 -static void eth_port_start(struct net_device *dev)
16753 +static int mv643xx_eth_change_mtu(struct net_device *dev, int new_mtu)
16755 - struct mv643xx_private *mp = netdev_priv(dev);
16756 - unsigned int port_num = mp->port_num;
16757 - int tx_curr_desc, rx_curr_desc;
16759 - struct ethtool_cmd ethtool_cmd;
16761 - /* Assignment of Tx CTRP of given queue */
16762 - tx_curr_desc = mp->tx_curr_desc_q;
16763 - wrl(mp, TX_CURRENT_QUEUE_DESC_PTR_0(port_num),
16764 - (u32)((struct eth_tx_desc *)mp->tx_desc_dma + tx_curr_desc));
16765 + struct mv643xx_eth_private *mp = netdev_priv(dev);
16767 - /* Assignment of Rx CRDP of given queue */
16768 - rx_curr_desc = mp->rx_curr_desc_q;
16769 - wrl(mp, RX_CURRENT_QUEUE_DESC_PTR_0(port_num),
16770 - (u32)((struct eth_rx_desc *)mp->rx_desc_dma + rx_curr_desc));
16772 - /* Add the assigned Ethernet address to the port's address table */
16773 - eth_port_uc_addr_set(mp, dev->dev_addr);
16774 + if (new_mtu < 64 || new_mtu > 9500)
16777 - /* Assign port configuration and command. */
16778 - wrl(mp, PORT_CONFIG_REG(port_num),
16779 - PORT_CONFIG_DEFAULT_VALUE);
16780 + dev->mtu = new_mtu;
16781 + tx_set_rate(mp, 1000000000, 16777216);
16783 - wrl(mp, PORT_CONFIG_EXTEND_REG(port_num),
16784 - PORT_CONFIG_EXTEND_DEFAULT_VALUE);
16785 + if (!netif_running(dev))
16788 - pscr = rdl(mp, PORT_SERIAL_CONTROL_REG(port_num));
16790 + * Stop and then re-open the interface. This will allocate RX
16791 + * skbs of the new MTU.
16792 + * There is a possible danger that the open will not succeed,
16793 + * due to memory being full.
16795 + mv643xx_eth_stop(dev);
16796 + if (mv643xx_eth_open(dev)) {
16797 + dev_printk(KERN_ERR, &dev->dev,
16798 + "fatal error on re-opening device after "
16802 - pscr &= ~(SERIAL_PORT_ENABLE | FORCE_LINK_PASS);
16803 - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), pscr);
16807 - pscr |= DISABLE_AUTO_NEG_FOR_FLOW_CTRL |
16808 - DISABLE_AUTO_NEG_SPEED_GMII |
16809 - DISABLE_AUTO_NEG_FOR_DUPLX |
16810 - DO_NOT_FORCE_LINK_FAIL |
16811 - SERIAL_PORT_CONTROL_RESERVED;
16812 +static void tx_timeout_task(struct work_struct *ugly)
16814 + struct mv643xx_eth_private *mp;
16816 - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), pscr);
16817 + mp = container_of(ugly, struct mv643xx_eth_private, tx_timeout_task);
16818 + if (netif_running(mp->dev)) {
16819 + netif_stop_queue(mp->dev);
16821 - pscr |= SERIAL_PORT_ENABLE;
16822 - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), pscr);
16826 - /* Assign port SDMA configuration */
16827 - wrl(mp, SDMA_CONFIG_REG(port_num),
16828 - PORT_SDMA_CONFIG_DEFAULT_VALUE);
16830 - /* Enable port Rx. */
16831 - mv643xx_eth_port_enable_rx(mp, ETH_RX_QUEUES_ENABLED);
16833 - /* Disable port bandwidth limits by clearing MTU register */
16834 - wrl(mp, MAXIMUM_TRANSMIT_UNIT(port_num), 0);
16836 - /* save phy settings across reset */
16837 - mv643xx_get_settings(dev, ðtool_cmd);
16838 - ethernet_phy_reset(mp);
16839 - mv643xx_set_settings(dev, ðtool_cmd);
16840 + __txq_maybe_wake(mp->txq + mp->txq_primary);
16845 - * eth_port_uc_addr_set - Write a MAC address into the port's hw registers
16847 -static void eth_port_uc_addr_set(struct mv643xx_private *mp,
16848 - unsigned char *p_addr)
16849 +static void mv643xx_eth_tx_timeout(struct net_device *dev)
16851 - unsigned int port_num = mp->port_num;
16852 - unsigned int mac_h;
16853 - unsigned int mac_l;
16855 + struct mv643xx_eth_private *mp = netdev_priv(dev);
16857 - mac_l = (p_addr[4] << 8) | (p_addr[5]);
16858 - mac_h = (p_addr[0] << 24) | (p_addr[1] << 16) | (p_addr[2] << 8) |
16859 - (p_addr[3] << 0);
16861 - wrl(mp, MAC_ADDR_LOW(port_num), mac_l);
16862 - wrl(mp, MAC_ADDR_HIGH(port_num), mac_h);
16864 - /* Accept frames with this address */
16865 - table = DA_FILTER_UNICAST_TABLE_BASE(port_num);
16866 - eth_port_set_filter_table_entry(mp, table, p_addr[5] & 0x0f);
16867 + dev_printk(KERN_INFO, &dev->dev, "tx timeout\n");
16869 + schedule_work(&mp->tx_timeout_task);
16873 - * eth_port_uc_addr_get - Read the MAC address from the port's hw registers
16875 -static void eth_port_uc_addr_get(struct mv643xx_private *mp,
16876 - unsigned char *p_addr)
16877 +#ifdef CONFIG_NET_POLL_CONTROLLER
16878 +static void mv643xx_eth_netpoll(struct net_device *dev)
16880 - unsigned int port_num = mp->port_num;
16881 - unsigned int mac_h;
16882 - unsigned int mac_l;
16883 + struct mv643xx_eth_private *mp = netdev_priv(dev);
16885 + wrl(mp, INT_MASK(mp->port_num), 0x00000000);
16886 + rdl(mp, INT_MASK(mp->port_num));
16888 - mac_h = rdl(mp, MAC_ADDR_HIGH(port_num));
16889 - mac_l = rdl(mp, MAC_ADDR_LOW(port_num));
16890 + mv643xx_eth_irq(dev->irq, dev);
16892 - p_addr[0] = (mac_h >> 24) & 0xff;
16893 - p_addr[1] = (mac_h >> 16) & 0xff;
16894 - p_addr[2] = (mac_h >> 8) & 0xff;
16895 - p_addr[3] = mac_h & 0xff;
16896 - p_addr[4] = (mac_l >> 8) & 0xff;
16897 - p_addr[5] = mac_l & 0xff;
16898 + wrl(mp, INT_MASK(mp->port_num), INT_TX_END | INT_RX | INT_CAUSE_EXT);
16903 - * The entries in each table are indexed by a hash of a packet's MAC
16904 - * address. One bit in each entry determines whether the packet is
16905 - * accepted. There are 4 entries (each 8 bits wide) in each register
16906 - * of the table. The bits in each entry are defined as follows:
16907 - * 0 Accept=1, Drop=0
16908 - * 3-1 Queue (ETH_Q0=0)
16909 - * 7-4 Reserved = 0;
16911 -static void eth_port_set_filter_table_entry(struct mv643xx_private *mp,
16912 - int table, unsigned char entry)
16913 +static int mv643xx_eth_mdio_read(struct net_device *dev, int addr, int reg)
16915 - unsigned int table_reg;
16916 - unsigned int tbl_offset;
16917 - unsigned int reg_offset;
16918 + struct mv643xx_eth_private *mp = netdev_priv(dev);
16921 - tbl_offset = (entry / 4) * 4; /* Register offset of DA table entry */
16922 - reg_offset = entry % 4; /* Entry offset within the register */
16923 + smi_reg_read(mp, addr, reg, &val);
16925 - /* Set "accepts frame bit" at specified table entry */
16926 - table_reg = rdl(mp, table + tbl_offset);
16927 - table_reg |= 0x01 << (8 * reg_offset);
16928 - wrl(mp, table + tbl_offset, table_reg);
16933 - * eth_port_mc_addr - Multicast address settings.
16935 - * The MV device supports multicast using two tables:
16936 - * 1) Special Multicast Table for MAC addresses of the form
16937 - * 0x01-00-5E-00-00-XX (where XX is between 0x00 and 0x_FF).
16938 - * The MAC DA[7:0] bits are used as a pointer to the Special Multicast
16939 - * Table entries in the DA-Filter table.
16940 - * 2) Other Multicast Table for multicast of another type. A CRC-8bit
16941 - * is used as an index to the Other Multicast Table entries in the
16942 - * DA-Filter table. This function calculates the CRC-8bit value.
16943 - * In either case, eth_port_set_filter_table_entry() is then called
16944 - * to set to set the actual table entry.
16946 -static void eth_port_mc_addr(struct mv643xx_private *mp, unsigned char *p_addr)
16947 +static void mv643xx_eth_mdio_write(struct net_device *dev, int addr, int reg, int val)
16949 - unsigned int port_num = mp->port_num;
16950 - unsigned int mac_h;
16951 - unsigned int mac_l;
16952 - unsigned char crc_result = 0;
16954 - int mac_array[48];
16957 + struct mv643xx_eth_private *mp = netdev_priv(dev);
16958 + smi_reg_write(mp, addr, reg, val);
16961 - if ((p_addr[0] == 0x01) && (p_addr[1] == 0x00) &&
16962 - (p_addr[2] == 0x5E) && (p_addr[3] == 0x00) && (p_addr[4] == 0x00)) {
16963 - table = DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(port_num);
16964 - eth_port_set_filter_table_entry(mp, table, p_addr[5]);
16968 - /* Calculate CRC-8 out of the given address */
16969 - mac_h = (p_addr[0] << 8) | (p_addr[1]);
16970 - mac_l = (p_addr[2] << 24) | (p_addr[3] << 16) |
16971 - (p_addr[4] << 8) | (p_addr[5] << 0);
16973 - for (i = 0; i < 32; i++)
16974 - mac_array[i] = (mac_l >> i) & 0x1;
16975 - for (i = 32; i < 48; i++)
16976 - mac_array[i] = (mac_h >> (i - 32)) & 0x1;
16978 - crc[0] = mac_array[45] ^ mac_array[43] ^ mac_array[40] ^ mac_array[39] ^
16979 - mac_array[35] ^ mac_array[34] ^ mac_array[31] ^ mac_array[30] ^
16980 - mac_array[28] ^ mac_array[23] ^ mac_array[21] ^ mac_array[19] ^
16981 - mac_array[18] ^ mac_array[16] ^ mac_array[14] ^ mac_array[12] ^
16982 - mac_array[8] ^ mac_array[7] ^ mac_array[6] ^ mac_array[0];
16984 - crc[1] = mac_array[46] ^ mac_array[45] ^ mac_array[44] ^ mac_array[43] ^
16985 - mac_array[41] ^ mac_array[39] ^ mac_array[36] ^ mac_array[34] ^
16986 - mac_array[32] ^ mac_array[30] ^ mac_array[29] ^ mac_array[28] ^
16987 - mac_array[24] ^ mac_array[23] ^ mac_array[22] ^ mac_array[21] ^
16988 - mac_array[20] ^ mac_array[18] ^ mac_array[17] ^ mac_array[16] ^
16989 - mac_array[15] ^ mac_array[14] ^ mac_array[13] ^ mac_array[12] ^
16990 - mac_array[9] ^ mac_array[6] ^ mac_array[1] ^ mac_array[0];
16992 - crc[2] = mac_array[47] ^ mac_array[46] ^ mac_array[44] ^ mac_array[43] ^
16993 - mac_array[42] ^ mac_array[39] ^ mac_array[37] ^ mac_array[34] ^
16994 - mac_array[33] ^ mac_array[29] ^ mac_array[28] ^ mac_array[25] ^
16995 - mac_array[24] ^ mac_array[22] ^ mac_array[17] ^ mac_array[15] ^
16996 - mac_array[13] ^ mac_array[12] ^ mac_array[10] ^ mac_array[8] ^
16997 - mac_array[6] ^ mac_array[2] ^ mac_array[1] ^ mac_array[0];
16999 - crc[3] = mac_array[47] ^ mac_array[45] ^ mac_array[44] ^ mac_array[43] ^
17000 - mac_array[40] ^ mac_array[38] ^ mac_array[35] ^ mac_array[34] ^
17001 - mac_array[30] ^ mac_array[29] ^ mac_array[26] ^ mac_array[25] ^
17002 - mac_array[23] ^ mac_array[18] ^ mac_array[16] ^ mac_array[14] ^
17003 - mac_array[13] ^ mac_array[11] ^ mac_array[9] ^ mac_array[7] ^
17004 - mac_array[3] ^ mac_array[2] ^ mac_array[1];
17006 - crc[4] = mac_array[46] ^ mac_array[45] ^ mac_array[44] ^ mac_array[41] ^
17007 - mac_array[39] ^ mac_array[36] ^ mac_array[35] ^ mac_array[31] ^
17008 - mac_array[30] ^ mac_array[27] ^ mac_array[26] ^ mac_array[24] ^
17009 - mac_array[19] ^ mac_array[17] ^ mac_array[15] ^ mac_array[14] ^
17010 - mac_array[12] ^ mac_array[10] ^ mac_array[8] ^ mac_array[4] ^
17011 - mac_array[3] ^ mac_array[2];
17013 - crc[5] = mac_array[47] ^ mac_array[46] ^ mac_array[45] ^ mac_array[42] ^
17014 - mac_array[40] ^ mac_array[37] ^ mac_array[36] ^ mac_array[32] ^
17015 - mac_array[31] ^ mac_array[28] ^ mac_array[27] ^ mac_array[25] ^
17016 - mac_array[20] ^ mac_array[18] ^ mac_array[16] ^ mac_array[15] ^
17017 - mac_array[13] ^ mac_array[11] ^ mac_array[9] ^ mac_array[5] ^
17018 - mac_array[4] ^ mac_array[3];
17020 - crc[6] = mac_array[47] ^ mac_array[46] ^ mac_array[43] ^ mac_array[41] ^
17021 - mac_array[38] ^ mac_array[37] ^ mac_array[33] ^ mac_array[32] ^
17022 - mac_array[29] ^ mac_array[28] ^ mac_array[26] ^ mac_array[21] ^
17023 - mac_array[19] ^ mac_array[17] ^ mac_array[16] ^ mac_array[14] ^
17024 - mac_array[12] ^ mac_array[10] ^ mac_array[6] ^ mac_array[5] ^
17027 - crc[7] = mac_array[47] ^ mac_array[44] ^ mac_array[42] ^ mac_array[39] ^
17028 - mac_array[38] ^ mac_array[34] ^ mac_array[33] ^ mac_array[30] ^
17029 - mac_array[29] ^ mac_array[27] ^ mac_array[22] ^ mac_array[20] ^
17030 - mac_array[18] ^ mac_array[17] ^ mac_array[15] ^ mac_array[13] ^
17031 - mac_array[11] ^ mac_array[7] ^ mac_array[6] ^ mac_array[5];
17032 +/* platform glue ************************************************************/
17034 +mv643xx_eth_conf_mbus_windows(struct mv643xx_eth_shared_private *msp,
17035 + struct mbus_dram_target_info *dram)
17037 + void __iomem *base = msp->base;
17042 - for (i = 0; i < 8; i++)
17043 - crc_result = crc_result | (crc[i] << i);
17044 + for (i = 0; i < 6; i++) {
17045 + writel(0, base + WINDOW_BASE(i));
17046 + writel(0, base + WINDOW_SIZE(i));
17048 + writel(0, base + WINDOW_REMAP_HIGH(i));
17051 - table = DA_FILTER_OTHER_MULTICAST_TABLE_BASE(port_num);
17052 - eth_port_set_filter_table_entry(mp, table, crc_result);
17054 + win_enable = 0x3f;
17058 - * Set the entire multicast list based on dev->mc_list.
17060 -static void eth_port_set_multicast_list(struct net_device *dev)
17062 + for (i = 0; i < dram->num_cs; i++) {
17063 + struct mbus_dram_window *cs = dram->cs + i;
17065 - struct dev_mc_list *mc_list;
17068 - struct mv643xx_private *mp = netdev_priv(dev);
17069 - unsigned int eth_port_num = mp->port_num;
17071 - /* If the device is in promiscuous mode or in all multicast mode,
17072 - * we will fully populate both multicast tables with accept.
17073 - * This is guaranteed to yield a match on all multicast addresses...
17075 - if ((dev->flags & IFF_PROMISC) || (dev->flags & IFF_ALLMULTI)) {
17076 - for (table_index = 0; table_index <= 0xFC; table_index += 4) {
17077 - /* Set all entries in DA filter special multicast
17078 - * table (Ex_dFSMT)
17079 - * Set for ETH_Q0 for now
17081 - * 0 Accept=1, Drop=0
17082 - * 3-1 Queue ETH_Q0=0
17083 - * 7-4 Reserved = 0;
17085 - wrl(mp, DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101);
17086 + writel((cs->base & 0xffff0000) |
17087 + (cs->mbus_attr << 8) |
17088 + dram->mbus_dram_target_id, base + WINDOW_BASE(i));
17089 + writel((cs->size - 1) & 0xffff0000, base + WINDOW_SIZE(i));
17091 - /* Set all entries in DA filter other multicast
17092 - * table (Ex_dFOMT)
17093 - * Set for ETH_Q0 for now
17095 - * 0 Accept=1, Drop=0
17096 - * 3-1 Queue ETH_Q0=0
17097 - * 7-4 Reserved = 0;
17099 - wrl(mp, DA_FILTER_OTHER_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101);
17102 + win_enable &= ~(1 << i);
17103 + win_protect |= 3 << (2 * i);
17106 - /* We will clear out multicast tables every time we get the list.
17107 - * Then add the entire new list...
17109 - for (table_index = 0; table_index <= 0xFC; table_index += 4) {
17110 - /* Clear DA filter special multicast table (Ex_dFSMT) */
17111 - wrl(mp, DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE
17112 - (eth_port_num) + table_index, 0);
17114 - /* Clear DA filter other multicast table (Ex_dFOMT) */
17115 - wrl(mp, DA_FILTER_OTHER_MULTICAST_TABLE_BASE
17116 - (eth_port_num) + table_index, 0);
17119 - /* Get pointer to net_device multicast list and add each one... */
17120 - for (i = 0, mc_list = dev->mc_list;
17121 - (i < 256) && (mc_list != NULL) && (i < dev->mc_count);
17122 - i++, mc_list = mc_list->next)
17123 - if (mc_list->dmi_addrlen == 6)
17124 - eth_port_mc_addr(mp, mc_list->dmi_addr);
17125 + writel(win_enable, base + WINDOW_BAR_ENABLE);
17126 + msp->win_protect = win_protect;
17130 - * eth_port_init_mac_tables - Clear all entrance in the UC, SMC and OMC tables
17133 - * Go through all the DA filter tables (Unicast, Special Multicast &
17134 - * Other Multicast) and set each entry to 0.
17137 - * struct mv643xx_private *mp Ethernet Port.
17140 - * Multicast and Unicast packets are rejected.
17145 -static void eth_port_init_mac_tables(struct mv643xx_private *mp)
17146 +static void infer_hw_params(struct mv643xx_eth_shared_private *msp)
17148 - unsigned int port_num = mp->port_num;
17151 + * Check whether we have a 14-bit coal limit field in bits
17152 + * [21:8], or a 16-bit coal limit in bits [25,21:7] of the
17153 + * SDMA config register.
17155 + writel(0x02000000, msp->base + SDMA_CONFIG(0));
17156 + if (readl(msp->base + SDMA_CONFIG(0)) & 0x02000000)
17157 + msp->extended_rx_coal_limit = 1;
17159 + msp->extended_rx_coal_limit = 0;
17161 - /* Clear DA filter unicast table (Ex_dFUT) */
17162 - for (table_index = 0; table_index <= 0xC; table_index += 4)
17163 - wrl(mp, DA_FILTER_UNICAST_TABLE_BASE(port_num) +
17166 - for (table_index = 0; table_index <= 0xFC; table_index += 4) {
17167 - /* Clear DA filter special multicast table (Ex_dFSMT) */
17168 - wrl(mp, DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(port_num) +
17170 - /* Clear DA filter other multicast table (Ex_dFOMT) */
17171 - wrl(mp, DA_FILTER_OTHER_MULTICAST_TABLE_BASE(port_num) +
17175 + * Check whether the TX rate control registers are in the
17176 + * old or the new place.
17178 + writel(1, msp->base + TX_BW_MTU_MOVED(0));
17179 + if (readl(msp->base + TX_BW_MTU_MOVED(0)) & 1)
17180 + msp->tx_bw_control_moved = 1;
17182 + msp->tx_bw_control_moved = 0;
17186 - * eth_clear_mib_counters - Clear all MIB counters
17189 - * This function clears all MIB counters of a specific ethernet port.
17190 - * A read from the MIB counter will reset the counter.
17193 - * struct mv643xx_private *mp Ethernet Port.
17196 - * After reading all MIB counters, the counters resets.
17199 - * MIB counter value.
17202 -static void eth_clear_mib_counters(struct mv643xx_private *mp)
17203 +static int mv643xx_eth_shared_probe(struct platform_device *pdev)
17205 - unsigned int port_num = mp->port_num;
17208 - /* Perform dummy reads from MIB counters */
17209 - for (i = ETH_MIB_GOOD_OCTETS_RECEIVED_LOW; i < ETH_MIB_LATE_COLLISION;
17211 - rdl(mp, MIB_COUNTERS_BASE(port_num) + i);
17213 + static int mv643xx_eth_version_printed = 0;
17214 + struct mv643xx_eth_shared_platform_data *pd = pdev->dev.platform_data;
17215 + struct mv643xx_eth_shared_private *msp;
17216 + struct resource *res;
17219 -static inline u32 read_mib(struct mv643xx_private *mp, int offset)
17221 - return rdl(mp, MIB_COUNTERS_BASE(mp->port_num) + offset);
17223 + if (!mv643xx_eth_version_printed++)
17224 + printk(KERN_NOTICE "MV-643xx 10/100/1000 Ethernet Driver\n");
17226 -static void eth_update_mib_counters(struct mv643xx_private *mp)
17228 - struct mv643xx_mib_counters *p = &mp->mib_counters;
17231 + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
17235 - p->good_octets_received +=
17236 - read_mib(mp, ETH_MIB_GOOD_OCTETS_RECEIVED_LOW);
17237 - p->good_octets_received +=
17238 - (u64)read_mib(mp, ETH_MIB_GOOD_OCTETS_RECEIVED_HIGH) << 32;
17240 + msp = kmalloc(sizeof(*msp), GFP_KERNEL);
17243 + memset(msp, 0, sizeof(*msp));
17245 - for (offset = ETH_MIB_BAD_OCTETS_RECEIVED;
17246 - offset <= ETH_MIB_FRAMES_1024_TO_MAX_OCTETS;
17248 - *(u32 *)((char *)p + offset) += read_mib(mp, offset);
17249 + msp->base = ioremap(res->start, res->end - res->start + 1);
17250 + if (msp->base == NULL)
17253 - p->good_octets_sent += read_mib(mp, ETH_MIB_GOOD_OCTETS_SENT_LOW);
17254 - p->good_octets_sent +=
17255 - (u64)read_mib(mp, ETH_MIB_GOOD_OCTETS_SENT_HIGH) << 32;
17256 + spin_lock_init(&msp->phy_lock);
17258 - for (offset = ETH_MIB_GOOD_FRAMES_SENT;
17259 - offset <= ETH_MIB_LATE_COLLISION;
17261 - *(u32 *)((char *)p + offset) += read_mib(mp, offset);
17264 + * (Re-)program MBUS remapping windows if we are asked to.
17266 + if (pd != NULL && pd->dram != NULL)
17267 + mv643xx_eth_conf_mbus_windows(msp, pd->dram);
17270 - * ethernet_phy_detect - Detect whether a phy is present
17273 - * This function tests whether there is a PHY present on
17274 - * the specified port.
17277 - * struct mv643xx_private *mp Ethernet Port.
17284 - * -ENODEV on failure
17287 -static int ethernet_phy_detect(struct mv643xx_private *mp)
17289 - unsigned int phy_reg_data0;
17292 + * Detect hardware parameters.
17294 + msp->t_clk = (pd != NULL && pd->t_clk != 0) ? pd->t_clk : 133000000;
17295 + infer_hw_params(msp);
17297 - eth_port_read_smi_reg(mp, 0, &phy_reg_data0);
17298 - auto_neg = phy_reg_data0 & 0x1000;
17299 - phy_reg_data0 ^= 0x1000; /* invert auto_neg */
17300 - eth_port_write_smi_reg(mp, 0, phy_reg_data0);
17302 - eth_port_read_smi_reg(mp, 0, &phy_reg_data0);
17303 - if ((phy_reg_data0 & 0x1000) == auto_neg)
17304 - return -ENODEV; /* change didn't take */
17305 + platform_set_drvdata(pdev, msp);
17307 - phy_reg_data0 ^= 0x1000;
17308 - eth_port_write_smi_reg(mp, 0, phy_reg_data0);
17318 - * ethernet_phy_get - Get the ethernet port PHY address.
17321 - * This routine returns the given ethernet port PHY address.
17324 - * struct mv643xx_private *mp Ethernet Port.
17333 -static int ethernet_phy_get(struct mv643xx_private *mp)
17334 +static int mv643xx_eth_shared_remove(struct platform_device *pdev)
17336 - unsigned int reg_data;
17337 + struct mv643xx_eth_shared_private *msp = platform_get_drvdata(pdev);
17339 - reg_data = rdl(mp, PHY_ADDR_REG);
17340 + iounmap(msp->base);
17343 - return ((reg_data >> (5 * mp->port_num)) & 0x1f);
17348 - * ethernet_phy_set - Set the ethernet port PHY address.
17351 - * This routine sets the given ethernet port PHY address.
17354 - * struct mv643xx_private *mp Ethernet Port.
17355 - * int phy_addr PHY address.
17364 -static void ethernet_phy_set(struct mv643xx_private *mp, int phy_addr)
17365 +static struct platform_driver mv643xx_eth_shared_driver = {
17366 + .probe = mv643xx_eth_shared_probe,
17367 + .remove = mv643xx_eth_shared_remove,
17369 + .name = MV643XX_ETH_SHARED_NAME,
17370 + .owner = THIS_MODULE,
17374 +static void phy_addr_set(struct mv643xx_eth_private *mp, int phy_addr)
17377 int addr_shift = 5 * mp->port_num;
17380 - reg_data = rdl(mp, PHY_ADDR_REG);
17381 - reg_data &= ~(0x1f << addr_shift);
17382 - reg_data |= (phy_addr & 0x1f) << addr_shift;
17383 - wrl(mp, PHY_ADDR_REG, reg_data);
17384 + data = rdl(mp, PHY_ADDR);
17385 + data &= ~(0x1f << addr_shift);
17386 + data |= (phy_addr & 0x1f) << addr_shift;
17387 + wrl(mp, PHY_ADDR, data);
17391 - * ethernet_phy_reset - Reset Ethernet port PHY.
17394 - * This routine utilizes the SMI interface to reset the ethernet port PHY.
17397 - * struct mv643xx_private *mp Ethernet Port.
17400 - * The PHY is reset.
17406 -static void ethernet_phy_reset(struct mv643xx_private *mp)
17407 +static int phy_addr_get(struct mv643xx_eth_private *mp)
17409 - unsigned int phy_reg_data;
17410 + unsigned int data;
17412 - /* Reset the PHY */
17413 - eth_port_read_smi_reg(mp, 0, &phy_reg_data);
17414 - phy_reg_data |= 0x8000; /* Set bit 15 to reset the PHY */
17415 - eth_port_write_smi_reg(mp, 0, phy_reg_data);
17416 + data = rdl(mp, PHY_ADDR);
17418 - /* wait for PHY to come out of reset */
17421 - eth_port_read_smi_reg(mp, 0, &phy_reg_data);
17422 - } while (phy_reg_data & 0x8000);
17423 + return (data >> (5 * mp->port_num)) & 0x1f;
17426 -static void mv643xx_eth_port_enable_tx(struct mv643xx_private *mp,
17427 - unsigned int queues)
17428 +static void set_params(struct mv643xx_eth_private *mp,
17429 + struct mv643xx_eth_platform_data *pd)
17431 - wrl(mp, TRANSMIT_QUEUE_COMMAND_REG(mp->port_num), queues);
17433 + struct net_device *dev = mp->dev;
17435 -static void mv643xx_eth_port_enable_rx(struct mv643xx_private *mp,
17436 - unsigned int queues)
17438 - wrl(mp, RECEIVE_QUEUE_COMMAND_REG(mp->port_num), queues);
17440 + if (is_valid_ether_addr(pd->mac_addr))
17441 + memcpy(dev->dev_addr, pd->mac_addr, 6);
17443 + uc_addr_get(mp, dev->dev_addr);
17445 -static unsigned int mv643xx_eth_port_disable_tx(struct mv643xx_private *mp)
17447 - unsigned int port_num = mp->port_num;
17449 + if (pd->phy_addr == -1) {
17450 + mp->shared_smi = NULL;
17451 + mp->phy_addr = -1;
17453 + mp->shared_smi = mp->shared;
17454 + if (pd->shared_smi != NULL)
17455 + mp->shared_smi = platform_get_drvdata(pd->shared_smi);
17457 + if (pd->force_phy_addr || pd->phy_addr) {
17458 + mp->phy_addr = pd->phy_addr & 0x3f;
17459 + phy_addr_set(mp, mp->phy_addr);
17461 + mp->phy_addr = phy_addr_get(mp);
17465 - /* Stop Tx port activity. Check port Tx activity. */
17466 - queues = rdl(mp, TRANSMIT_QUEUE_COMMAND_REG(port_num)) & 0xFF;
17468 - /* Issue stop command for active queues only */
17469 - wrl(mp, TRANSMIT_QUEUE_COMMAND_REG(port_num), (queues << 8));
17470 + mp->default_rx_ring_size = DEFAULT_RX_QUEUE_SIZE;
17471 + if (pd->rx_queue_size)
17472 + mp->default_rx_ring_size = pd->rx_queue_size;
17473 + mp->rx_desc_sram_addr = pd->rx_sram_addr;
17474 + mp->rx_desc_sram_size = pd->rx_sram_size;
17476 - /* Wait for all Tx activity to terminate. */
17477 - /* Check port cause register that all Tx queues are stopped */
17478 - while (rdl(mp, TRANSMIT_QUEUE_COMMAND_REG(port_num)) & 0xFF)
17479 - udelay(PHY_WAIT_MICRO_SECONDS);
17480 + if (pd->rx_queue_mask)
17481 + mp->rxq_mask = pd->rx_queue_mask;
17483 + mp->rxq_mask = 0x01;
17484 + mp->rxq_primary = fls(mp->rxq_mask) - 1;
17486 - /* Wait for Tx FIFO to empty */
17487 - while (rdl(mp, PORT_STATUS_REG(port_num)) &
17488 - ETH_PORT_TX_FIFO_EMPTY)
17489 - udelay(PHY_WAIT_MICRO_SECONDS);
17491 + mp->default_tx_ring_size = DEFAULT_TX_QUEUE_SIZE;
17492 + if (pd->tx_queue_size)
17493 + mp->default_tx_ring_size = pd->tx_queue_size;
17494 + mp->tx_desc_sram_addr = pd->tx_sram_addr;
17495 + mp->tx_desc_sram_size = pd->tx_sram_size;
17498 + if (pd->tx_queue_mask)
17499 + mp->txq_mask = pd->tx_queue_mask;
17501 + mp->txq_mask = 0x01;
17502 + mp->txq_primary = fls(mp->txq_mask) - 1;
17505 -static unsigned int mv643xx_eth_port_disable_rx(struct mv643xx_private *mp)
17506 +static int phy_detect(struct mv643xx_eth_private *mp)
17508 - unsigned int port_num = mp->port_num;
17510 + unsigned int data;
17511 + unsigned int data2;
17513 - /* Stop Rx port activity. Check port Rx activity. */
17514 - queues = rdl(mp, RECEIVE_QUEUE_COMMAND_REG(port_num)) & 0xFF;
17516 - /* Issue stop command for active queues only */
17517 - wrl(mp, RECEIVE_QUEUE_COMMAND_REG(port_num), (queues << 8));
17518 + smi_reg_read(mp, mp->phy_addr, 0, &data);
17519 + smi_reg_write(mp, mp->phy_addr, 0, data ^ 0x1000);
17521 - /* Wait for all Rx activity to terminate. */
17522 - /* Check port cause register that all Rx queues are stopped */
17523 - while (rdl(mp, RECEIVE_QUEUE_COMMAND_REG(port_num)) & 0xFF)
17524 - udelay(PHY_WAIT_MICRO_SECONDS);
17526 + smi_reg_read(mp, mp->phy_addr, 0, &data2);
17527 + if (((data ^ data2) & 0x1000) == 0)
17530 + smi_reg_write(mp, mp->phy_addr, 0, data);
17537 - * eth_port_reset - Reset Ethernet port
17540 - * This routine resets the chip by aborting any SDMA engine activity and
17541 - * clearing the MIB counters. The Receiver and the Transmit unit are in
17542 - * idle state after this command is performed and the port is disabled.
17545 - * struct mv643xx_private *mp Ethernet Port.
17548 - * Channel activity is halted.
17554 -static void eth_port_reset(struct mv643xx_private *mp)
17555 +static int phy_init(struct mv643xx_eth_private *mp,
17556 + struct mv643xx_eth_platform_data *pd)
17558 - unsigned int port_num = mp->port_num;
17559 - unsigned int reg_data;
17561 - mv643xx_eth_port_disable_tx(mp);
17562 - mv643xx_eth_port_disable_rx(mp);
17564 - /* Clear all MIB counters */
17565 - eth_clear_mib_counters(mp);
17566 + struct ethtool_cmd cmd;
17569 - /* Reset the Enable bit in the Configuration Register */
17570 - reg_data = rdl(mp, PORT_SERIAL_CONTROL_REG(port_num));
17571 - reg_data &= ~(SERIAL_PORT_ENABLE |
17572 - DO_NOT_FORCE_LINK_FAIL |
17573 - FORCE_LINK_PASS);
17574 - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), reg_data);
17576 + err = phy_detect(mp);
17578 + dev_printk(KERN_INFO, &mp->dev->dev,
17579 + "no PHY detected at addr %d\n", mp->phy_addr);
17584 + mp->mii.phy_id = mp->phy_addr;
17585 + mp->mii.phy_id_mask = 0x3f;
17586 + mp->mii.reg_num_mask = 0x1f;
17587 + mp->mii.dev = mp->dev;
17588 + mp->mii.mdio_read = mv643xx_eth_mdio_read;
17589 + mp->mii.mdio_write = mv643xx_eth_mdio_write;
17592 - * eth_port_read_smi_reg - Read PHY registers
17595 - * This routine utilize the SMI interface to interact with the PHY in
17596 - * order to perform PHY register read.
17599 - * struct mv643xx_private *mp Ethernet Port.
17600 - * unsigned int phy_reg PHY register address offset.
17601 - * unsigned int *value Register value buffer.
17604 - * Write the value of a specified PHY register into given buffer.
17607 - * false if the PHY is busy or read data is not in valid state.
17608 - * true otherwise.
17611 -static void eth_port_read_smi_reg(struct mv643xx_private *mp,
17612 - unsigned int phy_reg, unsigned int *value)
17614 - void __iomem *smi_reg = mp->shared_smi->eth_base + SMI_REG;
17615 - int phy_addr = ethernet_phy_get(mp);
17616 - unsigned long flags;
17618 + mp->mii.supports_gmii = mii_check_gmii_support(&mp->mii);
17620 - /* the SMI register is a shared resource */
17621 - spin_lock_irqsave(&mp->shared_smi->phy_lock, flags);
17622 + memset(&cmd, 0, sizeof(cmd));
17624 - /* wait for the SMI register to become available */
17625 - for (i = 0; readl(smi_reg) & ETH_SMI_BUSY; i++) {
17626 - if (i == PHY_WAIT_ITERATIONS) {
17627 - printk("%s: PHY busy timeout\n", mp->dev->name);
17630 - udelay(PHY_WAIT_MICRO_SECONDS);
17631 + cmd.port = PORT_MII;
17632 + cmd.transceiver = XCVR_INTERNAL;
17633 + cmd.phy_address = mp->phy_addr;
17634 + if (pd->speed == 0) {
17635 + cmd.autoneg = AUTONEG_ENABLE;
17636 + cmd.speed = SPEED_100;
17637 + cmd.advertising = ADVERTISED_10baseT_Half |
17638 + ADVERTISED_10baseT_Full |
17639 + ADVERTISED_100baseT_Half |
17640 + ADVERTISED_100baseT_Full;
17641 + if (mp->mii.supports_gmii)
17642 + cmd.advertising |= ADVERTISED_1000baseT_Full;
17644 + cmd.autoneg = AUTONEG_DISABLE;
17645 + cmd.speed = pd->speed;
17646 + cmd.duplex = pd->duplex;
17649 - writel((phy_addr << 16) | (phy_reg << 21) | ETH_SMI_OPCODE_READ,
17652 - /* now wait for the data to be valid */
17653 - for (i = 0; !(readl(smi_reg) & ETH_SMI_READ_VALID); i++) {
17654 - if (i == PHY_WAIT_ITERATIONS) {
17655 - printk("%s: PHY read timeout\n", mp->dev->name);
17658 - udelay(PHY_WAIT_MICRO_SECONDS);
17660 + update_pscr(mp, cmd.speed, cmd.duplex);
17661 + mv643xx_eth_set_settings(mp->dev, &cmd);
17663 - *value = readl(smi_reg) & 0xffff;
17665 - spin_unlock_irqrestore(&mp->shared_smi->phy_lock, flags);
17670 - * eth_port_write_smi_reg - Write to PHY registers
17673 - * This routine utilize the SMI interface to interact with the PHY in
17674 - * order to perform writes to PHY registers.
17677 - * struct mv643xx_private *mp Ethernet Port.
17678 - * unsigned int phy_reg PHY register address offset.
17679 - * unsigned int value Register value.
17682 - * Write the given value to the specified PHY register.
17685 - * false if the PHY is busy.
17686 - * true otherwise.
17689 -static void eth_port_write_smi_reg(struct mv643xx_private *mp,
17690 - unsigned int phy_reg, unsigned int value)
17691 +static int mv643xx_eth_probe(struct platform_device *pdev)
17693 - void __iomem *smi_reg = mp->shared_smi->eth_base + SMI_REG;
17694 - int phy_addr = ethernet_phy_get(mp);
17695 - unsigned long flags;
17697 + struct mv643xx_eth_platform_data *pd;
17698 + struct mv643xx_eth_private *mp;
17699 + struct net_device *dev;
17700 + struct resource *res;
17701 + DECLARE_MAC_BUF(mac);
17704 - /* the SMI register is a shared resource */
17705 - spin_lock_irqsave(&mp->shared_smi->phy_lock, flags);
17706 + pd = pdev->dev.platform_data;
17707 + if (pd == NULL) {
17708 + dev_printk(KERN_ERR, &pdev->dev,
17709 + "no mv643xx_eth_platform_data\n");
17713 - /* wait for the SMI register to become available */
17714 - for (i = 0; readl(smi_reg) & ETH_SMI_BUSY; i++) {
17715 - if (i == PHY_WAIT_ITERATIONS) {
17716 - printk("%s: PHY busy timeout\n", mp->dev->name);
17719 - udelay(PHY_WAIT_MICRO_SECONDS);
17720 + if (pd->shared == NULL) {
17721 + dev_printk(KERN_ERR, &pdev->dev,
17722 + "no mv643xx_eth_platform_data->shared\n");
17726 - writel((phy_addr << 16) | (phy_reg << 21) |
17727 - ETH_SMI_OPCODE_WRITE | (value & 0xffff), smi_reg);
17729 - spin_unlock_irqrestore(&mp->shared_smi->phy_lock, flags);
17731 + dev = alloc_etherdev(sizeof(struct mv643xx_eth_private));
17736 - * Wrappers for MII support library.
17738 -static int mv643xx_mdio_read(struct net_device *dev, int phy_id, int location)
17740 - struct mv643xx_private *mp = netdev_priv(dev);
17742 + mp = netdev_priv(dev);
17743 + platform_set_drvdata(pdev, mp);
17745 - eth_port_read_smi_reg(mp, location, &val);
17748 + mp->shared = platform_get_drvdata(pd->shared);
17749 + mp->port_num = pd->port_number;
17751 -static void mv643xx_mdio_write(struct net_device *dev, int phy_id, int location, int val)
17753 - struct mv643xx_private *mp = netdev_priv(dev);
17754 - eth_port_write_smi_reg(mp, location, val);
17757 +#ifdef MV643XX_ETH_NAPI
17758 + netif_napi_add(dev, &mp->napi, mv643xx_eth_poll, 64);
17762 - * eth_port_receive - Get received information from Rx ring.
17765 - * This routine returns the received data to the caller. There is no
17766 - * data copying during routine operation. All information is returned
17767 - * using pointer to packet information struct passed from the caller.
17768 - * If the routine exhausts Rx ring resources then the resource error flag
17772 - * struct mv643xx_private *mp Ethernet Port Control srtuct.
17773 - * struct pkt_info *p_pkt_info User packet buffer.
17776 - * Rx ring current and used indexes are updated.
17779 - * ETH_ERROR in case the routine can not access Rx desc ring.
17780 - * ETH_QUEUE_FULL if Rx ring resources are exhausted.
17781 - * ETH_END_OF_JOB if there is no received data.
17782 - * ETH_OK otherwise.
17784 -static ETH_FUNC_RET_STATUS eth_port_receive(struct mv643xx_private *mp,
17785 - struct pkt_info *p_pkt_info)
17787 - int rx_next_curr_desc, rx_curr_desc, rx_used_desc;
17788 - volatile struct eth_rx_desc *p_rx_desc;
17789 - unsigned int command_status;
17790 - unsigned long flags;
17791 + set_params(mp, pd);
17793 - /* Do not process Rx ring in case of Rx ring resource error */
17794 - if (mp->rx_resource_err)
17795 - return ETH_QUEUE_FULL;
17796 + spin_lock_init(&mp->lock);
17798 - spin_lock_irqsave(&mp->lock, flags);
17799 + mib_counters_clear(mp);
17800 + INIT_WORK(&mp->tx_timeout_task, tx_timeout_task);
17802 - /* Get the Rx Desc ring 'curr and 'used' indexes */
17803 - rx_curr_desc = mp->rx_curr_desc_q;
17804 - rx_used_desc = mp->rx_used_desc_q;
17806 - p_rx_desc = &mp->p_rx_desc_area[rx_curr_desc];
17808 - /* The following parameters are used to save readings from memory */
17809 - command_status = p_rx_desc->cmd_sts;
17811 + if (mp->phy_addr != -1) {
17812 + err = phy_init(mp, pd);
17816 - /* Nothing to receive... */
17817 - if (command_status & (ETH_BUFFER_OWNED_BY_DMA)) {
17818 - spin_unlock_irqrestore(&mp->lock, flags);
17819 - return ETH_END_OF_JOB;
17820 + SET_ETHTOOL_OPS(dev, &mv643xx_eth_ethtool_ops);
17822 + SET_ETHTOOL_OPS(dev, &mv643xx_eth_ethtool_ops_phyless);
17825 - p_pkt_info->byte_cnt = (p_rx_desc->byte_cnt) - RX_BUF_OFFSET;
17826 - p_pkt_info->cmd_sts = command_status;
17827 - p_pkt_info->buf_ptr = (p_rx_desc->buf_ptr) + RX_BUF_OFFSET;
17828 - p_pkt_info->return_info = mp->rx_skb[rx_curr_desc];
17829 - p_pkt_info->l4i_chk = p_rx_desc->buf_size;
17832 - * Clean the return info field to indicate that the
17833 - * packet has been moved to the upper layers
17835 - mp->rx_skb[rx_curr_desc] = NULL;
17837 - /* Update current index in data structure */
17838 - rx_next_curr_desc = (rx_curr_desc + 1) % mp->rx_ring_size;
17839 - mp->rx_curr_desc_q = rx_next_curr_desc;
17840 + res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
17842 + dev->irq = res->start;
17844 - /* Rx descriptors exhausted. Set the Rx ring resource error flag */
17845 - if (rx_next_curr_desc == rx_used_desc)
17846 - mp->rx_resource_err = 1;
17847 + dev->hard_start_xmit = mv643xx_eth_xmit;
17848 + dev->open = mv643xx_eth_open;
17849 + dev->stop = mv643xx_eth_stop;
17850 + dev->set_multicast_list = mv643xx_eth_set_rx_mode;
17851 + dev->set_mac_address = mv643xx_eth_set_mac_address;
17852 + dev->do_ioctl = mv643xx_eth_ioctl;
17853 + dev->change_mtu = mv643xx_eth_change_mtu;
17854 + dev->tx_timeout = mv643xx_eth_tx_timeout;
17855 +#ifdef CONFIG_NET_POLL_CONTROLLER
17856 + dev->poll_controller = mv643xx_eth_netpoll;
17858 + dev->watchdog_timeo = 2 * HZ;
17859 + dev->base_addr = 0;
17861 - spin_unlock_irqrestore(&mp->lock, flags);
17862 +#ifdef MV643XX_ETH_CHECKSUM_OFFLOAD_TX
17864 + * Zero copy can only work if we use Discovery II memory. Else, we will
17865 + * have to map the buffers to ISA memory which is only 16 MB
17867 + dev->features = NETIF_F_SG | NETIF_F_IP_CSUM;
17872 + SET_NETDEV_DEV(dev, &pdev->dev);
17875 - * eth_rx_return_buff - Returns a Rx buffer back to the Rx ring.
17878 - * This routine returns a Rx buffer back to the Rx ring. It retrieves the
17879 - * next 'used' descriptor and attached the returned buffer to it.
17880 - * In case the Rx ring was in "resource error" condition, where there are
17881 - * no available Rx resources, the function resets the resource error flag.
17884 - * struct mv643xx_private *mp Ethernet Port Control srtuct.
17885 - * struct pkt_info *p_pkt_info Information on returned buffer.
17888 - * New available Rx resource in Rx descriptor ring.
17891 - * ETH_ERROR in case the routine can not access Rx desc ring.
17892 - * ETH_OK otherwise.
17894 -static ETH_FUNC_RET_STATUS eth_rx_return_buff(struct mv643xx_private *mp,
17895 - struct pkt_info *p_pkt_info)
17897 - int used_rx_desc; /* Where to return Rx resource */
17898 - volatile struct eth_rx_desc *p_used_rx_desc;
17899 - unsigned long flags;
17900 + if (mp->shared->win_protect)
17901 + wrl(mp, WINDOW_PROTECT(mp->port_num), mp->shared->win_protect);
17903 - spin_lock_irqsave(&mp->lock, flags);
17904 + err = register_netdev(dev);
17908 - /* Get 'used' Rx descriptor */
17909 - used_rx_desc = mp->rx_used_desc_q;
17910 - p_used_rx_desc = &mp->p_rx_desc_area[used_rx_desc];
17911 + dev_printk(KERN_NOTICE, &dev->dev, "port %d with MAC address %s\n",
17912 + mp->port_num, print_mac(mac, dev->dev_addr));
17914 - p_used_rx_desc->buf_ptr = p_pkt_info->buf_ptr;
17915 - p_used_rx_desc->buf_size = p_pkt_info->byte_cnt;
17916 - mp->rx_skb[used_rx_desc] = p_pkt_info->return_info;
17917 + if (dev->features & NETIF_F_SG)
17918 + dev_printk(KERN_NOTICE, &dev->dev, "scatter/gather enabled\n");
17920 - /* Flush the write pipe */
17921 + if (dev->features & NETIF_F_IP_CSUM)
17922 + dev_printk(KERN_NOTICE, &dev->dev, "tx checksum offload\n");
17924 - /* Return the descriptor to DMA ownership */
17926 - p_used_rx_desc->cmd_sts =
17927 - ETH_BUFFER_OWNED_BY_DMA | ETH_RX_ENABLE_INTERRUPT;
17929 +#ifdef MV643XX_ETH_NAPI
17930 + dev_printk(KERN_NOTICE, &dev->dev, "napi enabled\n");
17933 - /* Move the used descriptor pointer to the next descriptor */
17934 - mp->rx_used_desc_q = (used_rx_desc + 1) % mp->rx_ring_size;
17935 + if (mp->tx_desc_sram_size > 0)
17936 + dev_printk(KERN_NOTICE, &dev->dev, "configured with sram\n");
17938 - /* Any Rx return cancels the Rx resource error status */
17939 - mp->rx_resource_err = 0;
17942 - spin_unlock_irqrestore(&mp->lock, flags);
17944 + free_netdev(dev);
17950 -/************* Begin ethtool support *************************/
17952 -struct mv643xx_stats {
17953 - char stat_string[ETH_GSTRING_LEN];
17958 -#define MV643XX_STAT(m) FIELD_SIZEOF(struct mv643xx_private, m), \
17959 - offsetof(struct mv643xx_private, m)
17961 -static const struct mv643xx_stats mv643xx_gstrings_stats[] = {
17962 - { "rx_packets", MV643XX_STAT(stats.rx_packets) },
17963 - { "tx_packets", MV643XX_STAT(stats.tx_packets) },
17964 - { "rx_bytes", MV643XX_STAT(stats.rx_bytes) },
17965 - { "tx_bytes", MV643XX_STAT(stats.tx_bytes) },
17966 - { "rx_errors", MV643XX_STAT(stats.rx_errors) },
17967 - { "tx_errors", MV643XX_STAT(stats.tx_errors) },
17968 - { "rx_dropped", MV643XX_STAT(stats.rx_dropped) },
17969 - { "tx_dropped", MV643XX_STAT(stats.tx_dropped) },
17970 - { "good_octets_received", MV643XX_STAT(mib_counters.good_octets_received) },
17971 - { "bad_octets_received", MV643XX_STAT(mib_counters.bad_octets_received) },
17972 - { "internal_mac_transmit_err", MV643XX_STAT(mib_counters.internal_mac_transmit_err) },
17973 - { "good_frames_received", MV643XX_STAT(mib_counters.good_frames_received) },
17974 - { "bad_frames_received", MV643XX_STAT(mib_counters.bad_frames_received) },
17975 - { "broadcast_frames_received", MV643XX_STAT(mib_counters.broadcast_frames_received) },
17976 - { "multicast_frames_received", MV643XX_STAT(mib_counters.multicast_frames_received) },
17977 - { "frames_64_octets", MV643XX_STAT(mib_counters.frames_64_octets) },
17978 - { "frames_65_to_127_octets", MV643XX_STAT(mib_counters.frames_65_to_127_octets) },
17979 - { "frames_128_to_255_octets", MV643XX_STAT(mib_counters.frames_128_to_255_octets) },
17980 - { "frames_256_to_511_octets", MV643XX_STAT(mib_counters.frames_256_to_511_octets) },
17981 - { "frames_512_to_1023_octets", MV643XX_STAT(mib_counters.frames_512_to_1023_octets) },
17982 - { "frames_1024_to_max_octets", MV643XX_STAT(mib_counters.frames_1024_to_max_octets) },
17983 - { "good_octets_sent", MV643XX_STAT(mib_counters.good_octets_sent) },
17984 - { "good_frames_sent", MV643XX_STAT(mib_counters.good_frames_sent) },
17985 - { "excessive_collision", MV643XX_STAT(mib_counters.excessive_collision) },
17986 - { "multicast_frames_sent", MV643XX_STAT(mib_counters.multicast_frames_sent) },
17987 - { "broadcast_frames_sent", MV643XX_STAT(mib_counters.broadcast_frames_sent) },
17988 - { "unrec_mac_control_received", MV643XX_STAT(mib_counters.unrec_mac_control_received) },
17989 - { "fc_sent", MV643XX_STAT(mib_counters.fc_sent) },
17990 - { "good_fc_received", MV643XX_STAT(mib_counters.good_fc_received) },
17991 - { "bad_fc_received", MV643XX_STAT(mib_counters.bad_fc_received) },
17992 - { "undersize_received", MV643XX_STAT(mib_counters.undersize_received) },
17993 - { "fragments_received", MV643XX_STAT(mib_counters.fragments_received) },
17994 - { "oversize_received", MV643XX_STAT(mib_counters.oversize_received) },
17995 - { "jabber_received", MV643XX_STAT(mib_counters.jabber_received) },
17996 - { "mac_receive_error", MV643XX_STAT(mib_counters.mac_receive_error) },
17997 - { "bad_crc_event", MV643XX_STAT(mib_counters.bad_crc_event) },
17998 - { "collision", MV643XX_STAT(mib_counters.collision) },
17999 - { "late_collision", MV643XX_STAT(mib_counters.late_collision) },
18001 +static int mv643xx_eth_remove(struct platform_device *pdev)
18003 + struct mv643xx_eth_private *mp = platform_get_drvdata(pdev);
18005 -#define MV643XX_STATS_LEN ARRAY_SIZE(mv643xx_gstrings_stats)
18006 + unregister_netdev(mp->dev);
18007 + flush_scheduled_work();
18008 + free_netdev(mp->dev);
18010 -static void mv643xx_get_drvinfo(struct net_device *netdev,
18011 - struct ethtool_drvinfo *drvinfo)
18013 - strncpy(drvinfo->driver, mv643xx_driver_name, 32);
18014 - strncpy(drvinfo->version, mv643xx_driver_version, 32);
18015 - strncpy(drvinfo->fw_version, "N/A", 32);
18016 - strncpy(drvinfo->bus_info, "mv643xx", 32);
18017 - drvinfo->n_stats = MV643XX_STATS_LEN;
18019 + platform_set_drvdata(pdev, NULL);
18021 -static int mv643xx_get_sset_count(struct net_device *netdev, int sset)
18024 - case ETH_SS_STATS:
18025 - return MV643XX_STATS_LEN;
18027 - return -EOPNOTSUPP;
18032 -static void mv643xx_get_ethtool_stats(struct net_device *netdev,
18033 - struct ethtool_stats *stats, uint64_t *data)
18034 +static void mv643xx_eth_shutdown(struct platform_device *pdev)
18036 - struct mv643xx_private *mp = netdev->priv;
18038 + struct mv643xx_eth_private *mp = platform_get_drvdata(pdev);
18040 - eth_update_mib_counters(mp);
18041 + /* Mask all interrupts on ethernet port */
18042 + wrl(mp, INT_MASK(mp->port_num), 0);
18043 + rdl(mp, INT_MASK(mp->port_num));
18045 - for (i = 0; i < MV643XX_STATS_LEN; i++) {
18046 - char *p = (char *)mp+mv643xx_gstrings_stats[i].stat_offset;
18047 - data[i] = (mv643xx_gstrings_stats[i].sizeof_stat ==
18048 - sizeof(uint64_t)) ? *(uint64_t *)p : *(uint32_t *)p;
18050 + if (netif_running(mp->dev))
18054 -static void mv643xx_get_strings(struct net_device *netdev, uint32_t stringset,
18059 - switch(stringset) {
18060 - case ETH_SS_STATS:
18061 - for (i=0; i < MV643XX_STATS_LEN; i++) {
18062 - memcpy(data + i * ETH_GSTRING_LEN,
18063 - mv643xx_gstrings_stats[i].stat_string,
18064 - ETH_GSTRING_LEN);
18069 +static struct platform_driver mv643xx_eth_driver = {
18070 + .probe = mv643xx_eth_probe,
18071 + .remove = mv643xx_eth_remove,
18072 + .shutdown = mv643xx_eth_shutdown,
18074 + .name = MV643XX_ETH_NAME,
18075 + .owner = THIS_MODULE,
18079 -static u32 mv643xx_eth_get_link(struct net_device *dev)
18080 +static int __init mv643xx_eth_init_module(void)
18082 - struct mv643xx_private *mp = netdev_priv(dev);
18084 - return mii_link_ok(&mp->mii);
18088 -static int mv643xx_eth_nway_restart(struct net_device *dev)
18090 - struct mv643xx_private *mp = netdev_priv(dev);
18091 + rc = platform_driver_register(&mv643xx_eth_shared_driver);
18093 + rc = platform_driver_register(&mv643xx_eth_driver);
18095 + platform_driver_unregister(&mv643xx_eth_shared_driver);
18098 - return mii_nway_restart(&mp->mii);
18101 +module_init(mv643xx_eth_init_module);
18103 -static int mv643xx_eth_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
18104 +static void __exit mv643xx_eth_cleanup_module(void)
18106 - struct mv643xx_private *mp = netdev_priv(dev);
18108 - return generic_mii_ioctl(&mp->mii, if_mii(ifr), cmd, NULL);
18109 + platform_driver_unregister(&mv643xx_eth_driver);
18110 + platform_driver_unregister(&mv643xx_eth_shared_driver);
18112 +module_exit(mv643xx_eth_cleanup_module);
18114 -static const struct ethtool_ops mv643xx_ethtool_ops = {
18115 - .get_settings = mv643xx_get_settings,
18116 - .set_settings = mv643xx_set_settings,
18117 - .get_drvinfo = mv643xx_get_drvinfo,
18118 - .get_link = mv643xx_eth_get_link,
18119 - .set_sg = ethtool_op_set_sg,
18120 - .get_sset_count = mv643xx_get_sset_count,
18121 - .get_ethtool_stats = mv643xx_get_ethtool_stats,
18122 - .get_strings = mv643xx_get_strings,
18123 - .nway_reset = mv643xx_eth_nway_restart,
18126 -/************* End ethtool support *************************/
18127 +MODULE_AUTHOR("Rabeeh Khoury, Assaf Hoffman, Matthew Dharm, "
18128 + "Manish Lachwani, Dale Farnsworth and Lennert Buytenhek");
18129 +MODULE_DESCRIPTION("Ethernet driver for Marvell MV643XX");
18130 +MODULE_LICENSE("GPL");
18131 +MODULE_ALIAS("platform:" MV643XX_ETH_SHARED_NAME);
18132 +MODULE_ALIAS("platform:" MV643XX_ETH_NAME);
18134 +++ b/include/asm-arm/arch-kirkwood/debug-macro.S
18137 + * include/asm-arm/arch-kirkwood/debug-macro.S
18139 + * This program is free software; you can redistribute it and/or modify
18140 + * it under the terms of the GNU General Public License version 2 as
18141 + * published by the Free Software Foundation.
18144 +#include <asm/arch/kirkwood.h>
18146 + .macro addruart,rx
18147 + mrc p15, 0, \rx, c1, c0
18148 + tst \rx, #1 @ MMU enabled?
18149 + ldreq \rx, =KIRKWOOD_REGS_PHYS_BASE
18150 + ldrne \rx, =KIRKWOOD_REGS_VIRT_BASE
18151 + orr \rx, \rx, #0x00012000
18154 +#define UART_SHIFT 2
18155 +#include <asm/hardware/debug-8250.S>
18157 +++ b/include/asm-arm/arch-kirkwood/dma.h
18161 +++ b/include/asm-arm/arch-kirkwood/entry-macro.S
18164 + * include/asm-arm/arch-kirkwood/entry-macro.S
18166 + * Low-level IRQ helper macros for Marvell Kirkwood platforms
18168 + * This file is licensed under the terms of the GNU General Public
18169 + * License version 2. This program is licensed "as is" without any
18170 + * warranty of any kind, whether express or implied.
18173 +#include <asm/arch/kirkwood.h>
18175 + .macro disable_fiq
18178 + .macro arch_ret_to_user, tmp1, tmp2
18181 + .macro get_irqnr_preamble, base, tmp
18182 + ldr \base, =IRQ_VIRT_BASE
18185 + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
18186 + @ check low interrupts
18187 + ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF]
18188 + ldr \tmp, [\base, #IRQ_MASK_LOW_OFF]
18190 + ands \irqstat, \irqstat, \tmp
18193 + @ if no low interrupts set, check high interrupts
18194 + ldr \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF]
18195 + ldr \tmp, [\base, #IRQ_MASK_HIGH_OFF]
18197 + ands \irqstat, \irqstat, \tmp
18199 + @ find first active interrupt source
18200 +1001: clzne \irqstat, \irqstat
18201 + subne \irqnr, \irqnr, \irqstat
18204 +++ b/include/asm-arm/arch-kirkwood/hardware.h
18207 + * include/asm-arm/arch-kirkwood/hardware.h
18209 + * This program is free software; you can redistribute it and/or modify
18210 + * it under the terms of the GNU General Public License version 2 as
18211 + * published by the Free Software Foundation.
18214 +#ifndef __ASM_ARCH_HARDWARE_H
18215 +#define __ASM_ARCH_HARDWARE_H
18217 +#include "kirkwood.h"
18219 +#define pcibios_assign_all_busses() 1
18221 +#define PCIBIOS_MIN_IO 0x00001000
18222 +#define PCIBIOS_MIN_MEM 0x01000000
18223 +#define PCIMEM_BASE KIRKWOOD_PCIE_MEM_PHYS_BASE /* mem base for VGA */
18228 +++ b/include/asm-arm/arch-kirkwood/io.h
18231 + * include/asm-arm/arch-kirkwood/io.h
18233 + * This file is licensed under the terms of the GNU General Public
18234 + * License version 2. This program is licensed "as is" without any
18235 + * warranty of any kind, whether express or implied.
18238 +#ifndef __ASM_ARCH_IO_H
18239 +#define __ASM_ARCH_IO_H
18241 +#include "kirkwood.h"
18243 +#define IO_SPACE_LIMIT 0xffffffff
18245 +static inline void __iomem *__io(unsigned long addr)
18247 + return (void __iomem *)((addr - KIRKWOOD_PCIE_IO_PHYS_BASE)
18248 + + KIRKWOOD_PCIE_IO_VIRT_BASE);
18251 +#define __io(a) __io(a)
18252 +#define __mem_pci(a) (a)
18257 +++ b/include/asm-arm/arch-kirkwood/irqs.h
18260 + * include/asm-arm/arch-kirkwood/irqs.h
18262 + * IRQ definitions for Marvell Kirkwood SoCs
18264 + * This file is licensed under the terms of the GNU General Public
18265 + * License version 2. This program is licensed "as is" without any
18266 + * warranty of any kind, whether express or implied.
18269 +#ifndef __ASM_ARCH_IRQS_H
18270 +#define __ASM_ARCH_IRQS_H
18272 +#include "kirkwood.h" /* need GPIO_MAX */
18275 + * Low Interrupt Controller
18277 +#define IRQ_KIRKWOOD_HIGH_SUM 0
18278 +#define IRQ_KIRKWOOD_BRIDGE 1
18279 +#define IRQ_KIRKWOOD_HOST2CPU 2
18280 +#define IRQ_KIRKWOOD_CPU2HOST 3
18281 +#define IRQ_KIRKWOOD_XOR_00 5
18282 +#define IRQ_KIRKWOOD_XOR_01 6
18283 +#define IRQ_KIRKWOOD_XOR_10 7
18284 +#define IRQ_KIRKWOOD_XOR_11 8
18285 +#define IRQ_KIRKWOOD_PCIE 9
18286 +#define IRQ_KIRKWOOD_GE00_SUM 11
18287 +#define IRQ_KIRKWOOD_GE01_SUM 15
18288 +#define IRQ_KIRKWOOD_USB 19
18289 +#define IRQ_KIRKWOOD_SATA 21
18290 +#define IRQ_KIRKWOOD_CRYPTO 22
18291 +#define IRQ_KIRKWOOD_SPI 23
18292 +#define IRQ_KIRKWOOD_I2S 24
18293 +#define IRQ_KIRKWOOD_TS_0 26
18294 +#define IRQ_KIRKWOOD_SDIO 28
18295 +#define IRQ_KIRKWOOD_TWSI 29
18296 +#define IRQ_KIRKWOOD_AVB 30
18297 +#define IRQ_KIRKWOOD_TDMI 31
18300 + * High Interrupt Controller
18302 +#define IRQ_KIRKWOOD_UART_0 33
18303 +#define IRQ_KIRKWOOD_UART_1 34
18304 +#define IRQ_KIRKWOOD_GPIO_LOW_0_7 35
18305 +#define IRQ_KIRKWOOD_GPIO_LOW_8_15 36
18306 +#define IRQ_KIRKWOOD_GPIO_LOW_16_23 37
18307 +#define IRQ_KIRKWOOD_GPIO_LOW_24_31 38
18308 +#define IRQ_KIRKWOOD_GPIO_HIGH_0_7 39
18309 +#define IRQ_KIRKWOOD_GPIO_HIGH_8_15 40
18310 +#define IRQ_KIRKWOOD_GPIO_HIGH_16_23 41
18313 + * KIRKWOOD General Purpose Pins
18315 +#define IRQ_KIRKWOOD_GPIO_START 64
18316 +#define NR_GPIO_IRQS GPIO_MAX
18318 +#define NR_IRQS (IRQ_KIRKWOOD_GPIO_START + NR_GPIO_IRQS)
18323 +++ b/include/asm-arm/arch-kirkwood/kirkwood.h
18326 + * include/asm-arm/arch-kirkwood/kirkwood.h
18328 + * Generic definitions for Marvell Kirkwood SoC flavors:
18329 + * 88F6180, 88F6192 and 88F6281.
18331 + * This file is licensed under the terms of the GNU General Public
18332 + * License version 2. This program is licensed "as is" without any
18333 + * warranty of any kind, whether express or implied.
18336 +#ifndef __ASM_ARCH_KIRKWOOD_H
18337 +#define __ASM_ARCH_KIRKWOOD_H
18340 + * Marvell Kirkwood address maps.
18343 + * e0000000 PCIe Memory space
18344 + * f1000000 on-chip peripheral registers
18345 + * f2000000 PCIe I/O space
18346 + * f3000000 NAND controller address window
18349 + * fee00000 f1000000 1M on-chip peripheral registers
18350 + * fef00000 f2000000 1M PCIe I/O space
18353 +#define KIRKWOOD_NAND_MEM_PHYS_BASE 0xf3000000
18354 +#define KIRKWOOD_NAND_MEM_SIZE SZ_64K /* 1K is sufficient, but 64K
18355 + * is the minimal window size
18358 +#define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000
18359 +#define KIRKWOOD_PCIE_IO_VIRT_BASE 0xfef00000
18360 +#define KIRKWOOD_PCIE_IO_BUS_BASE 0x00000000
18361 +#define KIRKWOOD_PCIE_IO_SIZE SZ_1M
18363 +#define KIRKWOOD_REGS_PHYS_BASE 0xf1000000
18364 +#define KIRKWOOD_REGS_VIRT_BASE 0xfee00000
18365 +#define KIRKWOOD_REGS_SIZE SZ_1M
18367 +#define KIRKWOOD_PCIE_MEM_PHYS_BASE 0xe0000000
18368 +#define KIRKWOOD_PCIE_MEM_SIZE SZ_128M
18371 + * MBUS bridge registers.
18373 +#define BRIDGE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x20000)
18374 +#define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104)
18375 +#define CPU_RESET 0x00000002
18376 +//#define L2_WRITETHROUGH 0x00020000
18377 +#define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108)
18378 +#define SOFT_RESET_OUT_EN 0x00000004
18379 +#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c)
18380 +#define SOFT_RESET 0x00000001
18381 +#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
18382 +#define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
18383 +#define BRIDGE_INT_TIMER0 0x0002
18384 +#define BRIDGE_INT_TIMER1 0x0004
18385 +#define BRIDGE_INT_TIMER1_CLR (~0x0004)
18386 +#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
18387 +#define IRQ_CAUSE_LOW_OFF 0x0000
18388 +#define IRQ_MASK_LOW_OFF 0x0004
18389 +#define IRQ_CAUSE_HIGH_OFF 0x0010
18390 +#define IRQ_MASK_HIGH_OFF 0x0014
18391 +#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
18396 +#define DDR_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x00000)
18397 +#define DDR_WINDOW_CPU_BASE (DDR_VIRT_BASE | 0x1500)
18399 +#define DEV_BUS_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x10000)
18400 +#define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x10000)
18401 +#define SAMPLE_AT_RESET (DEV_BUS_VIRT_BASE | 0x0030)
18402 +#define DEVICE_ID (DEV_BUS_VIRT_BASE | 0x0034)
18403 +#define RTC_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0300)
18404 +#define SPI_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0600)
18405 +#define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000)
18406 +#define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000)
18407 +#define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100)
18408 +#define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
18410 +#define PCIE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x40000)
18412 +#define USB_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x50000)
18414 +#define GE00_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x70000)
18415 +#define GE01_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x74000)
18417 +#define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000)
18420 +#define GPIO_MAX 50
18425 +++ b/include/asm-arm/arch-kirkwood/memory.h
18428 + * include/asm-arm/arch-kirkwood/memory.h
18431 +#ifndef __ASM_ARCH_MEMORY_H
18432 +#define __ASM_ARCH_MEMORY_H
18434 +#define PHYS_OFFSET UL(0x00000000)
18436 +#define __virt_to_bus(x) __virt_to_phys(x)
18437 +#define __bus_to_virt(x) __phys_to_virt(x)
18442 +++ b/include/asm-arm/arch-kirkwood/system.h
18445 + * include/asm-arm/arch-kirkwood/system.h
18447 + * This file is licensed under the terms of the GNU General Public
18448 + * License version 2. This program is licensed "as is" without any
18449 + * warranty of any kind, whether express or implied.
18452 +#ifndef __ASM_ARCH_SYSTEM_H
18453 +#define __ASM_ARCH_SYSTEM_H
18455 +#include <asm/arch/hardware.h>
18456 +#include <asm/arch/kirkwood.h>
18458 +static inline void arch_idle(void)
18463 +static inline void arch_reset(char mode)
18466 + * Enable soft reset to assert RSTOUTn.
18468 + writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
18471 + * Assert soft reset.
18473 + writel(SOFT_RESET, SYSTEM_SOFT_RESET);
18482 +++ b/include/asm-arm/arch-kirkwood/timex.h
18485 + * include/asm-arm/arch-kirkwood/timex.h
18487 + * This file is licensed under the terms of the GNU General Public
18488 + * License version 2. This program is licensed "as is" without any
18489 + * warranty of any kind, whether express or implied.
18492 +#define CLOCK_TICK_RATE (100 * HZ)
18494 +#define KIRKWOOD_TCLK 166666667
18496 +++ b/include/asm-arm/arch-kirkwood/uncompress.h
18499 + * include/asm-arm/arch-kirkwood/uncompress.h
18501 + * This file is licensed under the terms of the GNU General Public
18502 + * License version 2. This program is licensed "as is" without any
18503 + * warranty of any kind, whether express or implied.
18506 +#include <linux/serial_reg.h>
18507 +#include <asm/arch/kirkwood.h>
18509 +#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
18511 +static void putc(const char c)
18513 + unsigned char *base = SERIAL_BASE;
18516 + for (i = 0; i < 0x1000; i++) {
18517 + if (base[UART_LSR << 2] & UART_LSR_THRE)
18522 + base[UART_TX << 2] = c;
18525 +static void flush(void)
18527 + unsigned char *base = SERIAL_BASE;
18528 + unsigned char mask;
18531 + mask = UART_LSR_TEMT | UART_LSR_THRE;
18533 + for (i = 0; i < 0x1000; i++) {
18534 + if ((base[UART_LSR << 2] & mask) == mask)
18543 +#define arch_decomp_setup()
18544 +#define arch_decomp_wdog()
18546 +++ b/include/asm-arm/arch-kirkwood/vmalloc.h
18549 + * include/asm-arm/arch-kirkwood/vmalloc.h
18552 +#define VMALLOC_END 0xfe800000
18554 +++ b/include/asm-arm/arch-loki/debug-macro.S
18557 + * include/asm-arm/arch-loki/debug-macro.S
18559 + * This program is free software; you can redistribute it and/or modify
18560 + * it under the terms of the GNU General Public License version 2 as
18561 + * published by the Free Software Foundation.
18564 +#include <asm/arch/loki.h>
18566 + .macro addruart,rx
18567 + mrc p15, 0, \rx, c1, c0
18568 + tst \rx, #1 @ MMU enabled?
18569 + ldreq \rx, =LOKI_REGS_PHYS_BASE
18570 + ldrne \rx, =LOKI_REGS_VIRT_BASE
18571 + orr \rx, \rx, #0x00012000
18574 +#define UART_SHIFT 2
18575 +#include <asm/hardware/debug-8250.S>
18577 +++ b/include/asm-arm/arch-loki/dma.h
18581 +++ b/include/asm-arm/arch-loki/entry-macro.S
18584 + * include/asm-arm/arch-loki/entry-macro.S
18586 + * Low-level IRQ helper macros for Marvell Loki (88RC8480) platforms
18588 + * This file is licensed under the terms of the GNU General Public
18589 + * License version 2. This program is licensed "as is" without any
18590 + * warranty of any kind, whether express or implied.
18593 +#include <asm/arch/loki.h>
18595 + .macro disable_fiq
18598 + .macro arch_ret_to_user, tmp1, tmp2
18601 + .macro get_irqnr_preamble, base, tmp
18602 + ldr \base, =IRQ_VIRT_BASE
18605 + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
18606 + ldr \irqstat, [\base, #IRQ_CAUSE_OFF]
18607 + ldr \tmp, [\base, #IRQ_MASK_OFF]
18609 + ands \irqstat, \irqstat, \tmp
18610 + clzne \irqnr, \irqstat
18611 + rsbne \irqnr, \irqnr, #31
18614 +++ b/include/asm-arm/arch-loki/hardware.h
18617 + * include/asm-arm/arch-loki/hardware.h
18619 + * This program is free software; you can redistribute it and/or modify
18620 + * it under the terms of the GNU General Public License version 2 as
18621 + * published by the Free Software Foundation.
18624 +#ifndef __ASM_ARCH_HARDWARE_H
18625 +#define __ASM_ARCH_HARDWARE_H
18632 +++ b/include/asm-arm/arch-loki/io.h
18635 + * include/asm-arm/arch-loki/io.h
18637 + * This file is licensed under the terms of the GNU General Public
18638 + * License version 2. This program is licensed "as is" without any
18639 + * warranty of any kind, whether express or implied.
18642 +#ifndef __ASM_ARCH_IO_H
18643 +#define __ASM_ARCH_IO_H
18647 +#define IO_SPACE_LIMIT 0xffffffff
18649 +static inline void __iomem *__io(unsigned long addr)
18651 + return (void __iomem *)((addr - LOKI_PCIE0_IO_PHYS_BASE)
18652 + + LOKI_PCIE0_IO_VIRT_BASE);
18655 +#define __io(a) __io(a)
18656 +#define __mem_pci(a) (a)
18661 +++ b/include/asm-arm/arch-loki/irqs.h
18664 + * include/asm-arm/arch-loki/irqs.h
18666 + * IRQ definitions for Marvell Loki (88RC8480) SoCs
18668 + * This file is licensed under the terms of the GNU General Public
18669 + * License version 2. This program is licensed "as is" without any
18670 + * warranty of any kind, whether express or implied.
18673 +#ifndef __ASM_ARCH_IRQS_H
18674 +#define __ASM_ARCH_IRQS_H
18676 +#include "loki.h" /* need GPIO_MAX */
18679 + * Interrupt Controller
18681 +#define IRQ_LOKI_PCIE_A_CPU_DRBL 0
18682 +#define IRQ_LOKI_CPU_PCIE_A_DRBL 1
18683 +#define IRQ_LOKI_PCIE_B_CPU_DRBL 2
18684 +#define IRQ_LOKI_CPU_PCIE_B_DRBL 3
18685 +#define IRQ_LOKI_COM_A_ERR 6
18686 +#define IRQ_LOKI_COM_A_IN 7
18687 +#define IRQ_LOKI_COM_A_OUT 8
18688 +#define IRQ_LOKI_COM_B_ERR 9
18689 +#define IRQ_LOKI_COM_B_IN 10
18690 +#define IRQ_LOKI_COM_B_OUT 11
18691 +#define IRQ_LOKI_DMA_A 12
18692 +#define IRQ_LOKI_DMA_B 13
18693 +#define IRQ_LOKI_SAS_A 14
18694 +#define IRQ_LOKI_SAS_B 15
18695 +#define IRQ_LOKI_DDR 16
18696 +#define IRQ_LOKI_XOR 17
18697 +#define IRQ_LOKI_BRIDGE 18
18698 +#define IRQ_LOKI_PCIE_A_ERR 20
18699 +#define IRQ_LOKI_PCIE_A_INT 21
18700 +#define IRQ_LOKI_PCIE_B_ERR 22
18701 +#define IRQ_LOKI_PCIE_B_INT 23
18702 +#define IRQ_LOKI_GBE_A_INT 24
18703 +#define IRQ_LOKI_GBE_B_INT 25
18704 +#define IRQ_LOKI_DEV_ERR 26
18705 +#define IRQ_LOKI_UART0 27
18706 +#define IRQ_LOKI_UART1 28
18707 +#define IRQ_LOKI_TWSI 29
18708 +#define IRQ_LOKI_GPIO_23_0 30
18709 +#define IRQ_LOKI_GPIO_25_24 31
18712 + * Loki General Purpose Pins
18714 +#define IRQ_LOKI_GPIO_START 32
18715 +#define NR_GPIO_IRQS GPIO_MAX
18717 +#define NR_IRQS (IRQ_LOKI_GPIO_START + NR_GPIO_IRQS)
18722 +++ b/include/asm-arm/arch-loki/loki.h
18725 + * include/asm-arm/arch-loki/loki.h
18727 + * Generic definitions for Marvell Loki (88RC8480) SoC flavors
18729 + * This file is licensed under the terms of the GNU General Public
18730 + * License version 2. This program is licensed "as is" without any
18731 + * warranty of any kind, whether express or implied.
18734 +#ifndef __ASM_ARCH_LOKI_H
18735 +#define __ASM_ARCH_LOKI_H
18738 + * Marvell Loki (88RC8480) address maps.
18741 + * d0000000 on-chip peripheral registers
18742 + * e0000000 PCIe 0 Memory space
18743 + * e8000000 PCIe 1 Memory space
18744 + * f0000000 PCIe 0 I/O space
18745 + * f0100000 PCIe 1 I/O space
18748 + * fed00000 d0000000 1M on-chip peripheral registers
18749 + * fee00000 f0000000 64K PCIe 0 I/O space
18750 + * fef00000 f0100000 64K PCIe 1 I/O space
18753 +#define LOKI_REGS_PHYS_BASE 0xd0000000
18754 +#define LOKI_REGS_VIRT_BASE 0xfed00000
18755 +#define LOKI_REGS_SIZE SZ_1M
18757 +#define LOKI_PCIE0_IO_PHYS_BASE 0xf0000000
18758 +#define LOKI_PCIE0_IO_VIRT_BASE 0xfee00000
18759 +#define LOKI_PCIE0_IO_BUS_BASE 0x00000000
18760 +#define LOKI_PCIE0_IO_SIZE SZ_64K
18762 +#define LOKI_PCIE1_IO_PHYS_BASE 0xf0100000
18763 +#define LOKI_PCIE1_IO_VIRT_BASE 0xfef00000
18764 +#define LOKI_PCIE1_IO_BUS_BASE 0x00000000
18765 +#define LOKI_PCIE1_IO_SIZE SZ_64K
18767 +#define LOKI_PCIE0_MEM_PHYS_BASE 0xe0000000
18768 +#define LOKI_PCIE0_MEM_SIZE SZ_128M
18770 +#define LOKI_PCIE1_MEM_PHYS_BASE 0xe8000000
18771 +#define LOKI_PCIE1_MEM_SIZE SZ_128M
18776 +#define DEV_BUS_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x10000)
18777 +#define DEV_BUS_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x10000)
18778 +#define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000)
18779 +#define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000)
18780 +#define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100)
18781 +#define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
18783 +#define BRIDGE_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x20000)
18784 +#define BRIDGE_REG(x) (BRIDGE_VIRT_BASE | (x))
18785 +#define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108)
18786 +#define SOFT_RESET_OUT_EN 0x00000004
18787 +#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c)
18788 +#define SOFT_RESET 0x00000001
18789 +#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
18790 +#define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
18791 +#define BRIDGE_INT_TIMER0 0x0002
18792 +#define BRIDGE_INT_TIMER1 0x0004
18793 +#define BRIDGE_INT_TIMER1_CLR 0x0004
18794 +#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
18795 +#define IRQ_CAUSE_OFF 0x0000
18796 +#define IRQ_MASK_OFF 0x0004
18797 +#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
18799 +#define PCIE0_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x30000)
18801 +#define PCIE1_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x40000)
18803 +#define SAS0_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x80000)
18805 +#define SAS1_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x90000)
18807 +#define GE0_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0xa0000)
18808 +#define GE0_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xa0000)
18810 +#define GE1_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0xb0000)
18811 +#define GE1_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xb0000)
18813 +#define DDR_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xf0000)
18814 +#define DDR_REG(x) (DDR_VIRT_BASE | (x))
18817 +#define GPIO_MAX 8
18822 +++ b/include/asm-arm/arch-loki/memory.h
18825 + * include/asm-arm/arch-loki/memory.h
18828 +#ifndef __ASM_ARCH_MEMORY_H
18829 +#define __ASM_ARCH_MEMORY_H
18831 +#define PHYS_OFFSET UL(0x00000000)
18833 +#define __virt_to_bus(x) __virt_to_phys(x)
18834 +#define __bus_to_virt(x) __phys_to_virt(x)
18839 +++ b/include/asm-arm/arch-loki/system.h
18842 + * include/asm-arm/arch-loki/system.h
18844 + * This file is licensed under the terms of the GNU General Public
18845 + * License version 2. This program is licensed "as is" without any
18846 + * warranty of any kind, whether express or implied.
18849 +#ifndef __ASM_ARCH_SYSTEM_H
18850 +#define __ASM_ARCH_SYSTEM_H
18852 +#include <asm/arch/hardware.h>
18853 +#include <asm/arch/loki.h>
18855 +static inline void arch_idle(void)
18860 +static inline void arch_reset(char mode)
18863 + * Enable soft reset to assert RSTOUTn.
18865 + writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
18868 + * Assert soft reset.
18870 + writel(SOFT_RESET, SYSTEM_SOFT_RESET);
18879 +++ b/include/asm-arm/arch-loki/timex.h
18882 + * include/asm-arm/arch-loki/timex.h
18884 + * This file is licensed under the terms of the GNU General Public
18885 + * License version 2. This program is licensed "as is" without any
18886 + * warranty of any kind, whether express or implied.
18889 +#define CLOCK_TICK_RATE (100 * HZ)
18891 +#define LOKI_TCLK 180000000
18893 +++ b/include/asm-arm/arch-loki/uncompress.h
18896 + * include/asm-arm/arch-loki/uncompress.h
18898 + * This file is licensed under the terms of the GNU General Public
18899 + * License version 2. This program is licensed "as is" without any
18900 + * warranty of any kind, whether express or implied.
18903 +#include <linux/serial_reg.h>
18904 +#include <asm/arch/loki.h>
18906 +#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
18908 +static void putc(const char c)
18910 + unsigned char *base = SERIAL_BASE;
18913 + for (i = 0; i < 0x1000; i++) {
18914 + if (base[UART_LSR << 2] & UART_LSR_THRE)
18919 + base[UART_TX << 2] = c;
18922 +static void flush(void)
18924 + unsigned char *base = SERIAL_BASE;
18925 + unsigned char mask;
18928 + mask = UART_LSR_TEMT | UART_LSR_THRE;
18930 + for (i = 0; i < 0x1000; i++) {
18931 + if ((base[UART_LSR << 2] & mask) == mask)
18940 +#define arch_decomp_setup()
18941 +#define arch_decomp_wdog()
18943 +++ b/include/asm-arm/arch-loki/vmalloc.h
18946 + * include/asm-arm/arch-loki/vmalloc.h
18949 +#define VMALLOC_END 0xfe800000
18951 +++ b/include/asm-arm/arch-mv78xx0/debug-macro.S
18954 + * include/asm-arm/arch-mv78xx0/debug-macro.S
18956 + * This program is free software; you can redistribute it and/or modify
18957 + * it under the terms of the GNU General Public License version 2 as
18958 + * published by the Free Software Foundation.
18961 +#include <asm/arch/mv78xx0.h>
18963 + .macro addruart,rx
18964 + mrc p15, 0, \rx, c1, c0
18965 + tst \rx, #1 @ MMU enabled?
18966 + ldreq \rx, =MV78XX0_REGS_PHYS_BASE
18967 + ldrne \rx, =MV78XX0_REGS_VIRT_BASE
18968 + orr \rx, \rx, #0x00012000
18971 +#define UART_SHIFT 2
18972 +#include <asm/hardware/debug-8250.S>
18974 +++ b/include/asm-arm/arch-mv78xx0/dma.h
18978 +++ b/include/asm-arm/arch-mv78xx0/entry-macro.S
18981 + * include/asm-arm/arch-mv78xx0/entry-macro.S
18983 + * Low-level IRQ helper macros for Marvell MV78xx0 platforms
18985 + * This file is licensed under the terms of the GNU General Public
18986 + * License version 2. This program is licensed "as is" without any
18987 + * warranty of any kind, whether express or implied.
18990 +#include <asm/arch/mv78xx0.h>
18992 + .macro disable_fiq
18995 + .macro arch_ret_to_user, tmp1, tmp2
18998 + .macro get_irqnr_preamble, base, tmp
18999 + ldr \base, =IRQ_VIRT_BASE
19002 + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
19003 + @ check low interrupts
19004 + ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF]
19005 + ldr \tmp, [\base, #IRQ_MASK_LOW_OFF]
19007 + ands \irqstat, \irqstat, \tmp
19009 + @ if no low interrupts set, check high interrupts
19010 + ldreq \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF]
19011 + ldreq \tmp, [\base, #IRQ_MASK_HIGH_OFF]
19012 + moveq \irqnr, #63
19013 + andeqs \irqstat, \irqstat, \tmp
19015 + @ find first active interrupt source
19016 + clzne \irqstat, \irqstat
19017 + subne \irqnr, \irqnr, \irqstat
19020 +++ b/include/asm-arm/arch-mv78xx0/hardware.h
19023 + * include/asm-arm/arch-mv78xx0/hardware.h
19025 + * This file is licensed under the terms of the GNU General Public
19026 + * License version 2. This program is licensed "as is" without any
19027 + * warranty of any kind, whether express or implied.
19030 +#ifndef __ASM_ARCH_HARDWARE_H
19031 +#define __ASM_ARCH_HARDWARE_H
19033 +#include "mv78xx0.h"
19035 +#define pcibios_assign_all_busses() 1
19037 +#define PCIBIOS_MIN_IO 0x00001000
19038 +#define PCIBIOS_MIN_MEM 0x01000000
19039 +#define PCIMEM_BASE MV78XX0_PCIE_MEM_PHYS_BASE /* mem base for VGA */
19044 +++ b/include/asm-arm/arch-mv78xx0/io.h
19047 + * include/asm-arm/arch-mv78xx0/io.h
19049 + * This file is licensed under the terms of the GNU General Public
19050 + * License version 2. This program is licensed "as is" without any
19051 + * warranty of any kind, whether express or implied.
19054 +#ifndef __ASM_ARCH_IO_H
19055 +#define __ASM_ARCH_IO_H
19057 +#include "mv78xx0.h"
19059 +#define IO_SPACE_LIMIT 0xffffffff
19061 +static inline void __iomem *__io(unsigned long addr)
19063 + return (void __iomem *)((addr - MV78XX0_PCIE_IO_PHYS_BASE(0))
19064 + + MV78XX0_PCIE_IO_VIRT_BASE(0));
19067 +#define __io(a) __io(a)
19068 +#define __mem_pci(a) (a)
19073 +++ b/include/asm-arm/arch-mv78xx0/irqs.h
19076 + * include/asm-arm/arch-mv78xx0/irqs.h
19078 + * IRQ definitions for Marvell MV78xx0 SoCs
19080 + * This file is licensed under the terms of the GNU General Public
19081 + * License version 2. This program is licensed "as is" without any
19082 + * warranty of any kind, whether express or implied.
19085 +#ifndef __ASM_ARCH_IRQS_H
19086 +#define __ASM_ARCH_IRQS_H
19088 +#include "mv78xx0.h" /* need GPIO_MAX */
19091 + * MV78xx0 Low Interrupt Controller
19093 +#define IRQ_MV78XX0_ERR 0
19094 +#define IRQ_MV78XX0_SPI 1
19095 +#define IRQ_MV78XX0_I2C_0 2
19096 +#define IRQ_MV78XX0_I2C_1 3
19097 +#define IRQ_MV78XX0_IDMA_0 4
19098 +#define IRQ_MV78XX0_IDMA_1 5
19099 +#define IRQ_MV78XX0_IDMA_2 6
19100 +#define IRQ_MV78XX0_IDMA_3 7
19101 +#define IRQ_MV78XX0_TIMER_0 8
19102 +#define IRQ_MV78XX0_TIMER_1 9
19103 +#define IRQ_MV78XX0_TIMER_2 10
19104 +#define IRQ_MV78XX0_TIMER_3 11
19105 +#define IRQ_MV78XX0_UART_0 12
19106 +#define IRQ_MV78XX0_UART_1 13
19107 +#define IRQ_MV78XX0_UART_2 14
19108 +#define IRQ_MV78XX0_UART_3 15
19109 +#define IRQ_MV78XX0_USB_0 16
19110 +#define IRQ_MV78XX0_USB_1 17
19111 +#define IRQ_MV78XX0_USB_2 18
19112 +#define IRQ_MV78XX0_CRYPTO 19
19113 +#define IRQ_MV78XX0_SDIO_0 20
19114 +#define IRQ_MV78XX0_SDIO_1 21
19115 +#define IRQ_MV78XX0_XOR_0 22
19116 +#define IRQ_MV78XX0_XOR_1 23
19117 +#define IRQ_MV78XX0_I2S_0 24
19118 +#define IRQ_MV78XX0_I2S_1 25
19119 +#define IRQ_MV78XX0_SATA 26
19120 +#define IRQ_MV78XX0_TDMI 27
19123 + * MV78xx0 High Interrupt Controller
19125 +#define IRQ_MV78XX0_PCIE_00 32
19126 +#define IRQ_MV78XX0_PCIE_01 33
19127 +#define IRQ_MV78XX0_PCIE_02 34
19128 +#define IRQ_MV78XX0_PCIE_03 35
19129 +#define IRQ_MV78XX0_PCIE_10 36
19130 +#define IRQ_MV78XX0_PCIE_11 37
19131 +#define IRQ_MV78XX0_PCIE_12 38
19132 +#define IRQ_MV78XX0_PCIE_13 39
19133 +#define IRQ_MV78XX0_GE00_SUM 40
19134 +#define IRQ_MV78XX0_GE00_RX 41
19135 +#define IRQ_MV78XX0_GE00_TX 42
19136 +#define IRQ_MV78XX0_GE00_MISC 43
19137 +#define IRQ_MV78XX0_GE01_SUM 44
19138 +#define IRQ_MV78XX0_GE01_RX 45
19139 +#define IRQ_MV78XX0_GE01_TX 46
19140 +#define IRQ_MV78XX0_GE01_MISC 47
19141 +#define IRQ_MV78XX0_GE10_SUM 48
19142 +#define IRQ_MV78XX0_GE10_RX 49
19143 +#define IRQ_MV78XX0_GE10_TX 50
19144 +#define IRQ_MV78XX0_GE10_MISC 51
19145 +#define IRQ_MV78XX0_GE11_SUM 52
19146 +#define IRQ_MV78XX0_GE11_RX 53
19147 +#define IRQ_MV78XX0_GE11_TX 54
19148 +#define IRQ_MV78XX0_GE11_MISC 55
19149 +#define IRQ_MV78XX0_GPIO_0_7 56
19150 +#define IRQ_MV78XX0_GPIO_8_15 57
19151 +#define IRQ_MV78XX0_GPIO_16_23 58
19152 +#define IRQ_MV78XX0_GPIO_24_31 59
19153 +#define IRQ_MV78XX0_DB_IN 60
19154 +#define IRQ_MV78XX0_DB_OUT 61
19157 + * MV78XX0 General Purpose Pins
19159 +#define IRQ_MV78XX0_GPIO_START 64
19160 +#define NR_GPIO_IRQS GPIO_MAX
19162 +#define NR_IRQS (IRQ_MV78XX0_GPIO_START + NR_GPIO_IRQS)
19167 +++ b/include/asm-arm/arch-mv78xx0/memory.h
19170 + * include/asm-arm/arch-mv78xx0/memory.h
19173 +#ifndef __ASM_ARCH_MEMORY_H
19174 +#define __ASM_ARCH_MEMORY_H
19176 +#define PHYS_OFFSET UL(0x00000000)
19178 +#define __virt_to_bus(x) __virt_to_phys(x)
19179 +#define __bus_to_virt(x) __phys_to_virt(x)
19184 +++ b/include/asm-arm/arch-mv78xx0/mv78xx0.h
19187 + * include/asm-arm/arch-mv78xx0/mv78xx0.h
19189 + * Generic definitions for Marvell MV78xx0 SoC flavors:
19190 + * MV781x0 and MV782x0.
19192 + * This file is licensed under the terms of the GNU General Public
19193 + * License version 2. This program is licensed "as is" without any
19194 + * warranty of any kind, whether express or implied.
19197 +#ifndef __ASM_ARCH_MV78XX0_H
19198 +#define __ASM_ARCH_MV78XX0_H
19201 + * Marvell MV78xx0 address maps.
19204 + * c0000000 PCIe Memory space
19205 + * f0800000 PCIe #0 I/O space
19206 + * f0900000 PCIe #1 I/O space
19207 + * f0a00000 PCIe #2 I/O space
19208 + * f0b00000 PCIe #3 I/O space
19209 + * f0c00000 PCIe #4 I/O space
19210 + * f0d00000 PCIe #5 I/O space
19211 + * f0e00000 PCIe #6 I/O space
19212 + * f0f00000 PCIe #7 I/O space
19213 + * f1000000 on-chip peripheral registers
19216 + * fe400000 f102x000 16K core-specific peripheral registers
19217 + * fe700000 f0800000 1M PCIe #0 I/O space
19218 + * fe800000 f0900000 1M PCIe #1 I/O space
19219 + * fe900000 f0a00000 1M PCIe #2 I/O space
19220 + * fea00000 f0b00000 1M PCIe #3 I/O space
19221 + * feb00000 f0c00000 1M PCIe #4 I/O space
19222 + * fec00000 f0d00000 1M PCIe #5 I/O space
19223 + * fed00000 f0e00000 1M PCIe #6 I/O space
19224 + * fee00000 f0f00000 1M PCIe #7 I/O space
19225 + * fef00000 f1000000 1M on-chip peripheral registers
19227 +#define MV78XX0_CORE0_REGS_PHYS_BASE 0xf1020000
19228 +#define MV78XX0_CORE1_REGS_PHYS_BASE 0xf1024000
19229 +#define MV78XX0_CORE_REGS_VIRT_BASE 0xfe400000
19230 +#define MV78XX0_CORE_REGS_SIZE SZ_16K
19232 +#define MV78XX0_PCIE_IO_PHYS_BASE(i) (0xf0800000 + ((i) << 20))
19233 +#define MV78XX0_PCIE_IO_VIRT_BASE(i) (0xfe700000 + ((i) << 20))
19234 +#define MV78XX0_PCIE_IO_SIZE SZ_1M
19236 +#define MV78XX0_REGS_PHYS_BASE 0xf1000000
19237 +#define MV78XX0_REGS_VIRT_BASE 0xfef00000
19238 +#define MV78XX0_REGS_SIZE SZ_1M
19240 +#define MV78XX0_PCIE_MEM_PHYS_BASE 0xc0000000
19241 +#define MV78XX0_PCIE_MEM_SIZE 0x30000000
19244 + * Core-specific peripheral registers.
19246 +#define BRIDGE_VIRT_BASE (MV78XX0_CORE_REGS_VIRT_BASE)
19247 +#define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104)
19248 +#define L2_WRITETHROUGH 0x00020000
19249 +#define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108)
19250 +#define SOFT_RESET_OUT_EN 0x00000004
19251 +#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c)
19252 +#define SOFT_RESET 0x00000001
19253 +#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
19254 +#define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
19255 +#define BRIDGE_INT_TIMER0 0x0002
19256 +#define BRIDGE_INT_TIMER1 0x0004
19257 +#define BRIDGE_INT_TIMER1_CLR (~0x0004)
19258 +#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
19259 +#define IRQ_CAUSE_LOW_OFF 0x0004
19260 +#define IRQ_CAUSE_HIGH_OFF 0x0008
19261 +#define IRQ_MASK_LOW_OFF 0x0010
19262 +#define IRQ_MASK_HIGH_OFF 0x0014
19263 +#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
19268 +#define DDR_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x00000)
19269 +#define DDR_WINDOW_CPU0_BASE (DDR_VIRT_BASE | 0x1500)
19270 +#define DDR_WINDOW_CPU1_BASE (DDR_VIRT_BASE | 0x1700)
19272 +#define DEV_BUS_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x10000)
19273 +#define DEV_BUS_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x10000)
19274 +#define SAMPLE_AT_RESET_LOW (DEV_BUS_VIRT_BASE | 0x0030)
19275 +#define SAMPLE_AT_RESET_HIGH (DEV_BUS_VIRT_BASE | 0x0034)
19276 +#define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000)
19277 +#define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000)
19278 +#define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100)
19279 +#define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
19280 +#define UART2_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2200)
19281 +#define UART2_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2200)
19282 +#define UART3_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2300)
19283 +#define UART3_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2300)
19285 +#define GE10_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x30000)
19286 +#define GE11_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x34000)
19288 +#define PCIE00_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x40000)
19289 +#define PCIE01_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x44000)
19290 +#define PCIE02_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x48000)
19291 +#define PCIE03_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x4c000)
19293 +#define USB0_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x50000)
19294 +#define USB1_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x51000)
19295 +#define USB2_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x52000)
19297 +#define GE00_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x70000)
19298 +#define GE01_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x74000)
19300 +#define PCIE10_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x80000)
19301 +#define PCIE11_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x84000)
19302 +#define PCIE12_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x88000)
19303 +#define PCIE13_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x8c000)
19305 +#define SATA_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0xa0000)
19308 +#define GPIO_MAX 32
19313 +++ b/include/asm-arm/arch-mv78xx0/system.h
19316 + * include/asm-arm/arch-mv78xx0/system.h
19318 + * This file is licensed under the terms of the GNU General Public
19319 + * License version 2. This program is licensed "as is" without any
19320 + * warranty of any kind, whether express or implied.
19323 +#ifndef __ASM_ARCH_SYSTEM_H
19324 +#define __ASM_ARCH_SYSTEM_H
19326 +#include <asm/arch/hardware.h>
19327 +#include <asm/arch/mv78xx0.h>
19329 +static inline void arch_idle(void)
19334 +static inline void arch_reset(char mode)
19337 + * Enable soft reset to assert RSTOUTn.
19339 + writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
19342 + * Assert soft reset.
19344 + writel(SOFT_RESET, SYSTEM_SOFT_RESET);
19353 +++ b/include/asm-arm/arch-mv78xx0/timex.h
19356 + * include/asm-arm/arch-mv78xx0/timex.h
19358 + * This file is licensed under the terms of the GNU General Public
19359 + * License version 2. This program is licensed "as is" without any
19360 + * warranty of any kind, whether express or implied.
19363 +#define CLOCK_TICK_RATE (100 * HZ)
19365 +++ b/include/asm-arm/arch-mv78xx0/uncompress.h
19368 + * include/asm-arm/arch-mv78xx0/uncompress.h
19370 + * This file is licensed under the terms of the GNU General Public
19371 + * License version 2. This program is licensed "as is" without any
19372 + * warranty of any kind, whether express or implied.
19375 +#include <linux/serial_reg.h>
19376 +#include <asm/arch/mv78xx0.h>
19378 +#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
19380 +static void putc(const char c)
19382 + unsigned char *base = SERIAL_BASE;
19385 + for (i = 0; i < 0x1000; i++) {
19386 + if (base[UART_LSR << 2] & UART_LSR_THRE)
19391 + base[UART_TX << 2] = c;
19394 +static void flush(void)
19396 + unsigned char *base = SERIAL_BASE;
19397 + unsigned char mask;
19400 + mask = UART_LSR_TEMT | UART_LSR_THRE;
19402 + for (i = 0; i < 0x1000; i++) {
19403 + if ((base[UART_LSR << 2] & mask) == mask)
19412 +#define arch_decomp_setup()
19413 +#define arch_decomp_wdog()
19415 +++ b/include/asm-arm/arch-mv78xx0/vmalloc.h
19418 + * include/asm-arm/arch-mv78xx0/vmalloc.h
19421 +#define VMALLOC_END 0xfe000000
19422 --- a/include/asm-arm/arch-orion5x/io.h
19423 +++ b/include/asm-arm/arch-orion5x/io.h
19425 #include "orion5x.h"
19427 #define IO_SPACE_LIMIT 0xffffffff
19428 -#define IO_SPACE_REMAP ORION5X_PCI_SYS_IO_BASE
19430 static inline void __iomem *
19431 __arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype)
19432 @@ -53,15 +52,12 @@
19433 /*****************************************************************************
19434 * Helpers to access Orion registers
19435 ****************************************************************************/
19436 -#define orion5x_read(r) __raw_readl(r)
19437 -#define orion5x_write(r, val) __raw_writel(val, r)
19440 * These are not preempt-safe. Locks, if needed, must be taken
19441 * care of by the caller.
19443 -#define orion5x_setbits(r, mask) orion5x_write((r), orion5x_read(r) | (mask))
19444 -#define orion5x_clrbits(r, mask) orion5x_write((r), orion5x_read(r) & ~(mask))
19445 +#define orion5x_setbits(r, mask) writel(readl(r) | (mask), (r))
19446 +#define orion5x_clrbits(r, mask) writel(readl(r) & ~(mask), (r))
19450 --- a/include/asm-arm/arch-orion5x/orion5x.h
19451 +++ b/include/asm-arm/arch-orion5x/orion5x.h
19453 * include/asm-arm/arch-orion5x/orion5x.h
19455 * Generic definitions of Orion SoC flavors:
19456 - * Orion-1, Orion-NAS, Orion-VoIP, and Orion-2.
19457 + * Orion-1, Orion-VoIP, Orion-NAS, and Orion-2.
19459 * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
19462 /*******************************************************************************
19463 * Supported Devices & Revisions
19464 ******************************************************************************/
19465 -/* Orion-1 (88F5181) */
19466 +/* Orion-1 (88F5181) and Orion-VoIP (88F5181L) */
19467 #define MV88F5181_DEV_ID 0x5181
19468 #define MV88F5181_REV_B1 3
19469 +#define MV88F5181L_REV_A0 8
19470 +#define MV88F5181L_REV_A1 9
19471 /* Orion-NAS (88F5182) */
19472 #define MV88F5182_DEV_ID 0x5182
19473 #define MV88F5182_REV_A2 2
19474 @@ -152,6 +154,7 @@
19475 #define BRIDGE_MASK ORION5X_BRIDGE_REG(0x114)
19476 #define BRIDGE_INT_TIMER0 0x0002
19477 #define BRIDGE_INT_TIMER1 0x0004
19478 +#define BRIDGE_INT_TIMER1_CLR (~0x0004)
19479 #define MAIN_IRQ_CAUSE ORION5X_BRIDGE_REG(0x200)
19480 #define MAIN_IRQ_MASK ORION5X_BRIDGE_REG(0x204)
19482 --- a/include/asm-arm/arch-orion5x/uncompress.h
19483 +++ b/include/asm-arm/arch-orion5x/uncompress.h
19485 * warranty of any kind, whether express or implied.
19488 +#include <linux/serial_reg.h>
19489 #include <asm/arch/orion5x.h>
19491 -#define MV_UART_THR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x0))
19492 -#define MV_UART_LSR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x14))
19494 -#define LSR_THRE 0x20
19495 +#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
19497 static void putc(const char c)
19500 - while (--j && !(*MV_UART_LSR & LSR_THRE))
19501 + unsigned char *base = SERIAL_BASE;
19504 + for (i = 0; i < 0x1000; i++) {
19505 + if (base[UART_LSR << 2] & UART_LSR_THRE)
19508 - *MV_UART_THR = c;
19511 + base[UART_TX << 2] = c;
19514 static void flush(void)
19516 + unsigned char *base = SERIAL_BASE;
19517 + unsigned char mask;
19520 + mask = UART_LSR_TEMT | UART_LSR_THRE;
19522 + for (i = 0; i < 0x1000; i++) {
19523 + if ((base[UART_LSR << 2] & mask) == mask)
19530 --- a/include/asm-arm/assembler.h
19531 +++ b/include/asm-arm/assembler.h
19536 + * This can be used to enable code to cacheline align the destination
19537 + * pointer when bulk writing to memory. Experiments on StrongARM and
19538 + * XScale didn't show this a worthwhile thing to do when the cache is not
19539 + * set to write-allocate (this would need further testing on XScale when WA
19542 + * On Feroceon there is much to gain however, regardless of cache mode.
19544 +#ifdef CONFIG_CPU_FEROCEON
19545 +#define CALGN(code...) code
19547 +#define CALGN(code...)
19551 * Enable and disable interrupts
19553 #if __LINUX_ARM_ARCH__ >= 6
19554 --- a/include/asm-arm/cacheflush.h
19555 +++ b/include/asm-arm/cacheflush.h
19559 #if defined(CONFIG_CPU_FEROCEON)
19561 -# define MULTI_CACHE 1
19563 -# define _CACHE feroceon
19565 +# define MULTI_CACHE 1
19568 #if defined(CONFIG_CPU_V6)
19570 +++ b/include/asm-arm/plat-orion/cache-feroceon-l2.h
19573 + * include/asm-arm/plat-orion/cache-feroceon-l2.h
19575 + * Copyright (C) 2008 Marvell Semiconductor
19577 + * This file is licensed under the terms of the GNU General Public
19578 + * License version 2. This program is licensed "as is" without any
19579 + * warranty of any kind, whether express or implied.
19582 +extern void __init feroceon_l2_init(int l2_wt_override);
19583 --- a/include/asm-arm/plat-orion/pcie.h
19584 +++ b/include/asm-arm/plat-orion/pcie.h
19586 u32 orion_pcie_dev_id(void __iomem *base);
19587 u32 orion_pcie_rev(void __iomem *base);
19588 int orion_pcie_link_up(void __iomem *base);
19589 +int orion_pcie_x4_mode(void __iomem *base);
19590 int orion_pcie_get_local_bus_nr(void __iomem *base);
19591 void orion_pcie_set_local_bus_nr(void __iomem *base, int nr);
19592 void orion_pcie_setup(void __iomem *base,
19593 --- a/include/asm-arm/tlbflush.h
19594 +++ b/include/asm-arm/tlbflush.h
19596 #define TLB_V6_D_ASID (1 << 17)
19597 #define TLB_V6_I_ASID (1 << 18)
19599 +#define TLB_L2CLEAN_FR (1 << 29) /* Feroceon */
19600 #define TLB_DCLEAN (1 << 30)
19601 #define TLB_WB (1 << 31)
19604 * v4 - ARMv4 without write buffer
19605 * v4wb - ARMv4 with write buffer without I TLB flush entry instruction
19606 * v4wbi - ARMv4 with write buffer with I TLB flush entry instruction
19607 + * fr - Feroceon (v4wbi with non-outer-cacheable page table walks)
19608 * v6wbi - ARMv6 with write buffer with I TLB flush entry instruction
19611 @@ -103,6 +105,23 @@
19612 # define v4wbi_always_flags (-1UL)
19615 +#define fr_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_L2CLEAN_FR | \
19616 + TLB_V4_I_FULL | TLB_V4_D_FULL | \
19617 + TLB_V4_I_PAGE | TLB_V4_D_PAGE)
19619 +#ifdef CONFIG_CPU_TLB_FEROCEON
19620 +# define fr_possible_flags fr_tlb_flags
19621 +# define fr_always_flags fr_tlb_flags
19623 +# define MULTI_TLB 1
19625 +# define _TLB v4wbi
19628 +# define fr_possible_flags 0
19629 +# define fr_always_flags (-1UL)
19632 #define v4wb_tlb_flags (TLB_WB | TLB_DCLEAN | \
19633 TLB_V4_I_FULL | TLB_V4_D_FULL | \
19635 @@ -245,12 +264,14 @@
19636 #define possible_tlb_flags (v3_possible_flags | \
19637 v4_possible_flags | \
19638 v4wbi_possible_flags | \
19639 + fr_possible_flags | \
19640 v4wb_possible_flags | \
19641 v6wbi_possible_flags)
19643 #define always_tlb_flags (v3_always_flags & \
19644 v4_always_flags & \
19645 v4wbi_always_flags & \
19646 + fr_always_flags & \
19647 v4wb_always_flags & \
19648 v6wbi_always_flags)
19650 @@ -417,6 +438,11 @@
19651 if (tlb_flag(TLB_DCLEAN))
19652 asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd"
19653 : : "r" (pmd) : "cc");
19655 + if (tlb_flag(TLB_L2CLEAN_FR))
19656 + asm("mcr p15, 1, %0, c15, c9, 1 @ L2 flush_pmd"
19657 + : : "r" (pmd) : "cc");
19659 if (tlb_flag(TLB_WB))
19662 @@ -428,6 +454,10 @@
19663 if (tlb_flag(TLB_DCLEAN))
19664 asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd"
19665 : : "r" (pmd) : "cc");
19667 + if (tlb_flag(TLB_L2CLEAN_FR))
19668 + asm("mcr p15, 1, %0, c15, c9, 1 @ L2 flush_pmd"
19669 + : : "r" (pmd) : "cc");
19673 --- a/include/linux/mv643xx_eth.h
19674 +++ b/include/linux/mv643xx_eth.h
19675 @@ -17,30 +17,59 @@
19677 struct mv643xx_eth_shared_platform_data {
19678 struct mbus_dram_target_info *dram;
19679 - unsigned int t_clk;
19680 + unsigned int t_clk;
19683 struct mv643xx_eth_platform_data {
19685 + * Pointer back to our parent instance, and our port number.
19687 struct platform_device *shared;
19692 + * Whether a PHY is present, and if yes, at which address.
19694 struct platform_device *shared_smi;
19695 + int force_phy_addr;
19698 - u16 force_phy_addr; /* force override if phy_addr == 0 */
19701 - /* If speed is 0, then speed and duplex are autonegotiated. */
19702 - int speed; /* 0, SPEED_10, SPEED_100, SPEED_1000 */
19703 - int duplex; /* DUPLEX_HALF or DUPLEX_FULL */
19705 - /* non-zero values of the following fields override defaults */
19706 - u32 tx_queue_size;
19707 - u32 rx_queue_size;
19708 - u32 tx_sram_addr;
19709 - u32 tx_sram_size;
19710 - u32 rx_sram_addr;
19711 - u32 rx_sram_size;
19712 - u8 mac_addr[6]; /* mac address if non-zero*/
19714 + * Use this MAC address if it is valid, overriding the
19715 + * address that is already in the hardware.
19720 + * If speed is 0, autonegotiation is enabled.
19721 + * Valid values for speed: 0, SPEED_10, SPEED_100, SPEED_1000.
19722 + * Valid values for duplex: DUPLEX_HALF, DUPLEX_FULL.
19728 + * Which RX/TX queues to use.
19730 + int rx_queue_mask;
19731 + int tx_queue_mask;
19734 + * Override default RX/TX queue sizes if nonzero.
19736 + int rx_queue_size;
19737 + int tx_queue_size;
19740 + * Use on-chip SRAM for RX/TX descriptors if size is nonzero
19741 + * and sufficient to contain all descriptors for the requested
19744 + unsigned long rx_sram_addr;
19745 + int rx_sram_size;
19746 + unsigned long tx_sram_addr;
19747 + int tx_sram_size;
19750 -#endif /* __LINUX_MV643XX_ETH_H */