aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/kernel-parameters.txt3
-rw-r--r--MAINTAINERS26
-rw-r--r--arch/blackfin/Kconfig365
-rw-r--r--arch/blackfin/configs/BF533-EZKIT_defconfig243
-rw-r--r--arch/blackfin/configs/BF533-STAMP_defconfig280
-rw-r--r--arch/blackfin/configs/BF537-STAMP_defconfig296
-rw-r--r--arch/blackfin/configs/BF548-EZKIT_defconfig480
-rw-r--r--arch/blackfin/configs/BF561-EZKIT_defconfig223
-rw-r--r--arch/blackfin/configs/PNAV-10_defconfig296
-rw-r--r--arch/blackfin/kernel/Makefile5
-rw-r--r--arch/blackfin/kernel/bfin_dma_5xx.c81
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c549
-rw-r--r--arch/blackfin/kernel/bfin_ksyms.c1
-rw-r--r--arch/blackfin/kernel/cacheinit.c5
-rw-r--r--arch/blackfin/kernel/cplbinit.c7
-rw-r--r--arch/blackfin/kernel/early_printk.c214
-rw-r--r--arch/blackfin/kernel/irqchip.c12
-rw-r--r--arch/blackfin/kernel/process.c28
-rw-r--r--arch/blackfin/kernel/ptrace.c24
-rw-r--r--arch/blackfin/kernel/reboot.c78
-rw-r--r--arch/blackfin/kernel/setup.c90
-rw-r--r--arch/blackfin/kernel/traps.c110
-rw-r--r--arch/blackfin/kernel/vmlinux.lds.S48
-rw-r--r--arch/blackfin/lib/memcmp.S2
-rw-r--r--arch/blackfin/lib/memcpy.S2
-rw-r--r--arch/blackfin/lib/memmove.S4
-rw-r--r--arch/blackfin/mach-bf533/boards/cm_bf533.c81
-rw-r--r--arch/blackfin/mach-bf533/boards/ezkit.c91
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c119
-rw-r--r--arch/blackfin/mach-bf533/head.S344
-rw-r--r--arch/blackfin/mach-bf537/Kconfig27
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537.c87
-rw-r--r--arch/blackfin/mach-bf537/boards/generic_board.c397
-rw-r--r--arch/blackfin/mach-bf537/boards/pnav10.c53
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c142
-rw-r--r--arch/blackfin/mach-bf537/head.S128
-rw-r--r--arch/blackfin/mach-bf548/Kconfig11
-rw-r--r--arch/blackfin/mach-bf548/Makefile2
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c477
-rw-r--r--arch/blackfin/mach-bf548/gpio.c323
-rw-r--r--arch/blackfin/mach-bf548/head.S156
-rw-r--r--arch/blackfin/mach-bf561/boards/cm_bf561.c84
-rw-r--r--arch/blackfin/mach-bf561/boards/ezkit.c82
-rw-r--r--arch/blackfin/mach-bf561/head.S102
-rw-r--r--arch/blackfin/mach-common/Makefile2
-rw-r--r--arch/blackfin/mach-common/arch_checks.c60
-rw-r--r--arch/blackfin/mach-common/cache.S8
-rw-r--r--arch/blackfin/mach-common/cacheinit.S14
-rw-r--r--arch/blackfin/mach-common/cplbhdlr.S8
-rw-r--r--arch/blackfin/mach-common/cplbmgr.S56
-rw-r--r--arch/blackfin/mach-common/dpmc.S54
-rw-r--r--arch/blackfin/mach-common/entry.S268
-rw-r--r--arch/blackfin/mach-common/interrupt.S56
-rw-r--r--arch/blackfin/mach-common/ints-priority-dc.c13
-rw-r--r--arch/blackfin/mach-common/ints-priority-sc.c17
-rw-r--r--arch/blackfin/mach-common/lock.S24
-rw-r--r--arch/blackfin/mm/init.c2
-rw-r--r--arch/blackfin/oprofile/op_blackfin.h8
-rw-r--r--drivers/serial/bfin_5xx.c222
-rw-r--r--include/asm-blackfin/bfin5xx_spi.h2
-rw-r--r--include/asm-blackfin/blackfin.h112
-rw-r--r--include/asm-blackfin/cacheflush.h14
-rw-r--r--include/asm-blackfin/cplb.h99
-rw-r--r--include/asm-blackfin/dma.h2
-rw-r--r--include/asm-blackfin/early_printk.h28
-rw-r--r--include/asm-blackfin/gpio.h31
-rw-r--r--include/asm-blackfin/io.h24
-rw-r--r--include/asm-blackfin/ioctls.h9
-rw-r--r--include/asm-blackfin/irq_handler.h15
-rw-r--r--include/asm-blackfin/kgdb.h1
-rw-r--r--include/asm-blackfin/mach-bf527/anomaly.h41
-rw-r--r--include/asm-blackfin/mach-bf527/defBF52x_base.h2
-rw-r--r--include/asm-blackfin/mach-bf533/anomaly.h468
-rw-r--r--include/asm-blackfin/mach-bf533/bf533.h157
-rw-r--r--include/asm-blackfin/mach-bf533/blackfin.h2
-rw-r--r--include/asm-blackfin/mach-bf533/cdefBF532.h62
-rw-r--r--include/asm-blackfin/mach-bf533/defBF532.h3
-rw-r--r--include/asm-blackfin/mach-bf533/irq.h2
-rw-r--r--include/asm-blackfin/mach-bf533/mem_map.h56
-rw-r--r--include/asm-blackfin/mach-bf537/anomaly.h249
-rw-r--r--include/asm-blackfin/mach-bf537/bf537.h158
-rw-r--r--include/asm-blackfin/mach-bf537/blackfin.h280
-rw-r--r--include/asm-blackfin/mach-bf537/cdefBF534.h4
-rw-r--r--include/asm-blackfin/mach-bf537/defBF534.h4
-rw-r--r--include/asm-blackfin/mach-bf537/irq.h2
-rw-r--r--include/asm-blackfin/mach-bf537/mem_map.h60
-rw-r--r--include/asm-blackfin/mach-bf537/portmux.h2
-rw-r--r--include/asm-blackfin/mach-bf548/anomaly.h145
-rw-r--r--include/asm-blackfin/mach-bf548/bf548.h154
-rw-r--r--include/asm-blackfin/mach-bf548/bfin_serial_5xx.h39
-rw-r--r--include/asm-blackfin/mach-bf548/blackfin.h2
-rw-r--r--include/asm-blackfin/mach-bf548/cdefBF54x_base.h4
-rw-r--r--include/asm-blackfin/mach-bf548/defBF544.h1
-rw-r--r--include/asm-blackfin/mach-bf548/defBF548.h2
-rw-r--r--include/asm-blackfin/mach-bf548/defBF549.h2
-rw-r--r--include/asm-blackfin/mach-bf548/defBF54x_base.h3
-rw-r--r--include/asm-blackfin/mach-bf548/gpio.h5
-rw-r--r--include/asm-blackfin/mach-bf548/irq.h591
-rw-r--r--include/asm-blackfin/mach-bf548/mem_map.h24
-rw-r--r--include/asm-blackfin/mach-bf561/anomaly.h410
-rw-r--r--include/asm-blackfin/mach-bf561/bf561.h178
-rw-r--r--include/asm-blackfin/mach-bf561/blackfin.h2
-rw-r--r--include/asm-blackfin/mach-bf561/cdefBF561.h9
-rw-r--r--include/asm-blackfin/mach-bf561/defBF561.h1
-rw-r--r--include/asm-blackfin/mach-bf561/irq.h2
-rw-r--r--include/asm-blackfin/mach-bf561/mem_map.h24
-rw-r--r--include/asm-blackfin/mach-bf561/portmux.h2
-rw-r--r--include/asm-blackfin/mach-common/cdef_LPBlackfin.h4
-rw-r--r--include/asm-blackfin/mach-common/clocks.h70
-rw-r--r--include/asm-blackfin/mach-common/def_LPBlackfin.h135
-rw-r--r--include/asm-blackfin/pgtable.h2
-rw-r--r--include/asm-blackfin/reboot.h20
-rw-r--r--include/asm-blackfin/system.h93
-rw-r--r--include/asm-blackfin/termbits.h5
-rw-r--r--include/asm-blackfin/termios.h10
-rw-r--r--include/asm-blackfin/trace.h55
116 files changed, 6069 insertions, 4804 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 4d175c751246..a57c1f216b21 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -35,6 +35,7 @@ parameter is applicable:
35 APIC APIC support is enabled. 35 APIC APIC support is enabled.
36 APM Advanced Power Management support is enabled. 36 APM Advanced Power Management support is enabled.
37 AX25 Appropriate AX.25 support is enabled. 37 AX25 Appropriate AX.25 support is enabled.
38 BLACKFIN Blackfin architecture is enabled.
38 DRM Direct Rendering Management support is enabled. 39 DRM Direct Rendering Management support is enabled.
39 EDD BIOS Enhanced Disk Drive Services (EDD) is enabled 40 EDD BIOS Enhanced Disk Drive Services (EDD) is enabled
40 EFI EFI Partitioning (GPT) is enabled 41 EFI EFI Partitioning (GPT) is enabled
@@ -550,7 +551,7 @@ and is between 256 and 4096 characters. It is defined in the file
550 551
551 dtc3181e= [HW,SCSI] 552 dtc3181e= [HW,SCSI]
552 553
553 earlyprintk= [X86-32,X86-64,SH] 554 earlyprintk= [X86-32,X86-64,SH,BLACKFIN]
554 earlyprintk=vga 555 earlyprintk=vga
555 earlyprintk=serial[,ttySn[,baudrate]] 556 earlyprintk=serial[,ttySn[,baudrate]]
556 557
diff --git a/MAINTAINERS b/MAINTAINERS
index 0df29ce05e5a..22497de381da 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -718,34 +718,8 @@ M: rpurdie@rpsys.net
718S: Maintained 718S: Maintained
719 719
720BLACKFIN ARCHITECTURE 720BLACKFIN ARCHITECTURE
721P: Aubrey Li
722M: aubrey.li@analog.com
723P: Bernd Schmidt
724M: bernd.schmidt@analog.com
725P: Bryan Wu 721P: Bryan Wu
726M: bryan.wu@analog.com 722M: bryan.wu@analog.com
727P: Grace Pan
728M: grace.pan@analog.com
729P: Marc Hoffman
730M: marc.hoffman@analog.com
731P: Michael Hennerich
732M: michael.hennerich@analog.com
733P: Mike Frysinger
734M: michael.frysinger@analog.com
735P: Jerry Zeng
736M: jerry.zeng@analog.com
737P: Jie Zhang
738M: jie.zhang@analog.com
739P: Robin Getz
740M: robin.getz@analog.com
741P: Roy Huang
742M: roy.huang@analog.com
743P: Sonic Zhang
744M: sonic.zhang@analog.com
745P: Vivi Li
746M: vivi.li@analog.com
747P: Yi Li
748M: yi.li@analog.com
749L: uclinux-dist-devel@blackfin.uclinux.org (subscribers-only) 723L: uclinux-dist-devel@blackfin.uclinux.org (subscribers-only)
750W: http://blackfin.uclinux.org 724W: http://blackfin.uclinux.org
751S: Supported 725S: Supported
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 017defaa525b..b24f4535ffe0 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -57,7 +57,7 @@ config GENERIC_TIME
57 bool 57 bool
58 default n 58 default n
59 59
60config GENERIC_CALIBRATE_DELAY 60config GENERIC_GPIO
61 bool 61 bool
62 default y 62 default y
63 63
@@ -323,7 +323,7 @@ config CMDLINE
323 to the kernel, you may specify one here. As a minimum, you should specify 323 to the kernel, you may specify one here. As a minimum, you should specify
324 the memory size and the root device (e.g., mem=8M, root=/dev/nfs). 324 the memory size and the root device (e.g., mem=8M, root=/dev/nfs).
325 325
326comment "Board Setup" 326comment "Clock/PLL Setup"
327 327
328config CLKIN_HZ 328config CLKIN_HZ
329 int "Crystal Frequency in Hz" 329 int "Crystal Frequency in Hz"
@@ -335,6 +335,118 @@ config CLKIN_HZ
335 help 335 help
336 The frequency of CLKIN crystal oscillator on the board in Hz. 336 The frequency of CLKIN crystal oscillator on the board in Hz.
337 337
338config BFIN_KERNEL_CLOCK
339 bool "Re-program Clocks while Kernel boots?"
340 default n
341 help
342 This option decides if kernel clocks are re-programed from the
343 bootloader settings. If the clocks are not set, the SDRAM settings
344 are also not changed, and the Bootloader does 100% of the hardware
345 configuration.
346
347config PLL_BYPASS
348 bool "Bypass PLL"
349 depends on BFIN_KERNEL_CLOCK
350 default n
351
352config CLKIN_HALF
353 bool "Half Clock In"
354 depends on BFIN_KERNEL_CLOCK && (! PLL_BYPASS)
355 default n
356 help
357 If this is set the clock will be divided by 2, before it goes to the PLL.
358
359config VCO_MULT
360 int "VCO Multiplier"
361 depends on BFIN_KERNEL_CLOCK && (! PLL_BYPASS)
362 range 1 64
363 default "22" if BFIN533_EZKIT
364 default "45" if BFIN533_STAMP
365 default "20" if BFIN537_STAMP
366 default "22" if BFIN533_BLUETECHNIX_CM
367 default "20" if BFIN537_BLUETECHNIX_CM
368 default "20" if BFIN561_BLUETECHNIX_CM
369 default "20" if BFIN561_EZKIT
370 help
371 This controls the frequency of the on-chip PLL. This can be between 1 and 64.
372 PLL Frequency = (Crystal Frequency) * (this setting)
373
374choice
375 prompt "Core Clock Divider"
376 depends on BFIN_KERNEL_CLOCK
377 default CCLK_DIV_1
378 help
379 This sets the frequency of the core. It can be 1, 2, 4 or 8
380 Core Frequency = (PLL frequency) / (this setting)
381
382config CCLK_DIV_1
383 bool "1"
384
385config CCLK_DIV_2
386 bool "2"
387
388config CCLK_DIV_4
389 bool "4"
390
391config CCLK_DIV_8
392 bool "8"
393endchoice
394
395config SCLK_DIV
396 int "System Clock Divider"
397 depends on BFIN_KERNEL_CLOCK
398 range 1 15
399 default 5 if BFIN533_EZKIT
400 default 5 if BFIN533_STAMP
401 default 4 if BFIN537_STAMP
402 default 5 if BFIN533_BLUETECHNIX_CM
403 default 4 if BFIN537_BLUETECHNIX_CM
404 default 4 if BFIN561_BLUETECHNIX_CM
405 default 5 if BFIN561_EZKIT
406 help
407 This sets the frequency of the system clock (including SDRAM or DDR).
408 This can be between 1 and 15
409 System Clock = (PLL frequency) / (this setting)
410
411#
412# Max & Min Speeds for various Chips
413#
414config MAX_VCO_HZ
415 int
416 default 600000000 if BF522
417 default 600000000 if BF525
418 default 600000000 if BF527
419 default 400000000 if BF531
420 default 400000000 if BF532
421 default 750000000 if BF533
422 default 500000000 if BF534
423 default 400000000 if BF536
424 default 600000000 if BF537
425 default 533000000 if BF538
426 default 533000000 if BF539
427 default 600000000 if BF542
428 default 533000000 if BF544
429 default 533000000 if BF549
430 default 600000000 if BF561
431
432config MIN_VCO_HZ
433 int
434 default 50000000
435
436config MAX_SCLK_HZ
437 int
438 default 133000000
439
440config MIN_SCLK_HZ
441 int
442 default 27000000
443
444comment "Kernel Timer/Scheduler"
445
446source kernel/Kconfig.hz
447
448comment "Memory Setup"
449
338config MEM_SIZE 450config MEM_SIZE
339 int "SDRAM Memory Size in MBytes" 451 int "SDRAM Memory Size in MBytes"
340 default 32 if BFIN533_EZKIT 452 default 32 if BFIN533_EZKIT
@@ -364,15 +476,16 @@ config ENET_FLASH_PIN
364config BOOT_LOAD 476config BOOT_LOAD
365 hex "Kernel load address for booting" 477 hex "Kernel load address for booting"
366 default "0x1000" 478 default "0x1000"
479 range 0x1000 0x20000000
367 help 480 help
368 This option allows you to set the load address of the kernel. 481 This option allows you to set the load address of the kernel.
369 This can be useful if you are on a board which has a small amount 482 This can be useful if you are on a board which has a small amount
370 of memory or you wish to reserve some memory at the beginning of 483 of memory or you wish to reserve some memory at the beginning of
371 the address space. 484 the address space.
372 485
373 Note that you generally want to keep this value at or above 4k 486 Note that you need to keep this value above 4k (0x1000) as this
374 (0x1000) as this will allow the kernel to capture NULL pointer 487 memory region is used to capture NULL pointer references as well
375 references. 488 as some core kernel functions.
376 489
377comment "LED Status Indicators" 490comment "LED Status Indicators"
378 depends on (BFIN533_STAMP || BFIN533_BLUETECHNIX_CM) 491 depends on (BFIN533_STAMP || BFIN533_BLUETECHNIX_CM)
@@ -408,6 +521,52 @@ config BFIN_IDLE_LED_NUM
408 help 521 help
409 Select the LED (marked on the board) for you to blink. 522 Select the LED (marked on the board) for you to blink.
410 523
524choice
525 prompt "Blackfin Exception Scratch Register"
526 default BFIN_SCRATCH_REG_RETN
527 help
528 Select the resource to reserve for the Exception handler:
529 - RETN: Non-Maskable Interrupt (NMI)
530 - RETE: Exception Return (JTAG/ICE)
531 - CYCLES: Performance counter
532
533 If you are unsure, please select "RETN".
534
535config BFIN_SCRATCH_REG_RETN
536 bool "RETN"
537 help
538 Use the RETN register in the Blackfin exception handler
539 as a stack scratch register. This means you cannot
540 safely use NMI on the Blackfin while running Linux, but
541 you can debug the system with a JTAG ICE and use the
542 CYCLES performance registers.
543
544 If you are unsure, please select "RETN".
545
546config BFIN_SCRATCH_REG_RETE
547 bool "RETE"
548 help
549 Use the RETE register in the Blackfin exception handler
550 as a stack scratch register. This means you cannot
551 safely use a JTAG ICE while debugging a Blackfin board,
552 but you can safely use the CYCLES performance registers
553 and the NMI.
554
555 If you are unsure, please select "RETN".
556
557config BFIN_SCRATCH_REG_CYCLES
558 bool "CYCLES"
559 help
560 Use the CYCLES register in the Blackfin exception handler
561 as a stack scratch register. This means you cannot
562 safely use the CYCLES performance registers on a Blackfin
563 board at anytime, but you can debug the system with a JTAG
564 ICE and use the NMI.
565
566 If you are unsure, please select "RETN".
567
568endchoice
569
411# 570#
412# Sorry - but you need to put the hex address here - 571# Sorry - but you need to put the hex address here -
413# 572#
@@ -448,10 +607,6 @@ endmenu
448 607
449menu "Blackfin Kernel Optimizations" 608menu "Blackfin Kernel Optimizations"
450 609
451comment "Timer Tick"
452
453source kernel/Kconfig.hz
454
455comment "Memory Optimizations" 610comment "Memory Optimizations"
456 611
457config I_ENTRY_L1 612config I_ENTRY_L1
@@ -614,22 +769,22 @@ endchoice
614 769
615 770
616comment "Cache Support" 771comment "Cache Support"
617config BLKFIN_CACHE 772config BFIN_ICACHE
618 bool "Enable ICACHE" 773 bool "Enable ICACHE"
619config BLKFIN_DCACHE 774config BFIN_DCACHE
620 bool "Enable DCACHE" 775 bool "Enable DCACHE"
621config BLKFIN_DCACHE_BANKA 776config BFIN_DCACHE_BANKA
622 bool "Enable only 16k BankA DCACHE - BankB is SRAM" 777 bool "Enable only 16k BankA DCACHE - BankB is SRAM"
623 depends on BLKFIN_DCACHE && !BF531 778 depends on BFIN_DCACHE && !BF531
624 default n 779 default n
625config BLKFIN_CACHE_LOCK 780config BFIN_ICACHE_LOCK
626 bool "Enable Cache Locking" 781 bool "Enable Instruction Cache Locking"
627 782
628choice 783choice
629 prompt "Policy" 784 prompt "Policy"
630 depends on BLKFIN_DCACHE 785 depends on BFIN_DCACHE
631 default BLKFIN_WB 786 default BFIN_WB
632config BLKFIN_WB 787config BFIN_WB
633 bool "Write back" 788 bool "Write back"
634 help 789 help
635 Write Back Policy: 790 Write Back Policy:
@@ -646,7 +801,7 @@ config BLKFIN_WB
646 If you are unsure of the options and you want to be safe, 801 If you are unsure of the options and you want to be safe,
647 then go with Write Through. 802 then go with Write Through.
648 803
649config BLKFIN_WT 804config BFIN_WT
650 bool "Write through" 805 bool "Write through"
651 help 806 help
652 Write Back Policy: 807 Write Back Policy:
@@ -672,66 +827,9 @@ config L1_MAX_PIECE
672 Set the max memory pieces for the L1 SRAM allocation algorithm. 827 Set the max memory pieces for the L1 SRAM allocation algorithm.
673 Min value is 16. Max value is 1024. 828 Min value is 16. Max value is 1024.
674 829
675menu "Clock Settings"
676
677
678config BFIN_KERNEL_CLOCK
679 bool "Re-program Clocks while Kernel boots?"
680 default n
681 help
682 This option decides if kernel clocks are re-programed from the
683 bootloader settings. If the clocks are not set, the SDRAM settings
684 are also not changed, and the Bootloader does 100% of the hardware
685 configuration.
686
687config VCO_MULT
688 int "VCO Multiplier"
689 depends on BFIN_KERNEL_CLOCK
690 default "22" if BFIN533_EZKIT
691 default "45" if BFIN533_STAMP
692 default "20" if BFIN537_STAMP
693 default "22" if BFIN533_BLUETECHNIX_CM
694 default "20" if BFIN537_BLUETECHNIX_CM
695 default "20" if BFIN561_BLUETECHNIX_CM
696 default "20" if BFIN561_EZKIT
697
698config CCLK_DIV
699 int "Core Clock Divider"
700 depends on BFIN_KERNEL_CLOCK
701 default 1 if BFIN533_EZKIT
702 default 1 if BFIN533_STAMP
703 default 1 if BFIN537_STAMP
704 default 1 if BFIN533_BLUETECHNIX_CM
705 default 1 if BFIN537_BLUETECHNIX_CM
706 default 1 if BFIN561_BLUETECHNIX_CM
707 default 1 if BFIN561_EZKIT
708
709config SCLK_DIV
710 int "System Clock Divider"
711 depends on BFIN_KERNEL_CLOCK
712 default 5 if BFIN533_EZKIT
713 default 5 if BFIN533_STAMP
714 default 4 if BFIN537_STAMP
715 default 5 if BFIN533_BLUETECHNIX_CM
716 default 4 if BFIN537_BLUETECHNIX_CM
717 default 4 if BFIN561_BLUETECHNIX_CM
718 default 5 if BFIN561_EZKIT
719
720config CLKIN_HALF
721 bool "Half ClockIn"
722 depends on BFIN_KERNEL_CLOCK
723 default n
724
725config PLL_BYPASS
726 bool "Bypass PLL"
727 depends on BFIN_KERNEL_CLOCK
728 default n
729
730endmenu
731
732comment "Asynchonous Memory Configuration" 830comment "Asynchonous Memory Configuration"
733 831
734menu "EBIU_AMBCTL Global Control" 832menu "EBIU_AMGCTL Global Control"
735config C_AMCKEN 833config C_AMCKEN
736 bool "Enable CLKOUT" 834 bool "Enable CLKOUT"
737 default y 835 default y
@@ -941,24 +1039,6 @@ config DEBUG_ICACHE_CHECK
941 also relocates the irq_panic() function to L1 memory, (which is 1039 also relocates the irq_panic() function to L1 memory, (which is
942 un-cached). 1040 un-cached).
943 1041
944config DEBUG_KERNEL_START
945 bool "Debug Kernel Startup"
946 depends on DEBUG_KERNEL
947 help
948 Say Y here to put in an mini-execption handler before the kernel
949 replaces the bootloader exception handler. This will stop kernels
950 from dieing at startup with no visible error messages.
951
952config DEBUG_SERIAL_EARLY_INIT
953 bool "Initialize serial driver early"
954 default n
955 depends on SERIAL_BFIN
956 help
957 Say Y here if you want to get kernel output early when kernel
958 crashes before the normal console initialization. If this option
959 is enable, console output will always go to the ttyBF0, no matter
960 what kernel boot paramters you set.
961
962config DEBUG_HUNT_FOR_ZERO 1042config DEBUG_HUNT_FOR_ZERO
963 bool "Catch NULL pointer reads/writes" 1043 bool "Catch NULL pointer reads/writes"
964 default y 1044 default y
@@ -973,8 +1053,89 @@ config DEBUG_HUNT_FOR_ZERO
973 Enabling this option will take up an extra entry in CPLB table. 1053 Enabling this option will take up an extra entry in CPLB table.
974 Otherwise, there is no extra overhead. 1054 Otherwise, there is no extra overhead.
975 1055
1056config DEBUG_BFIN_HWTRACE_ON
1057 bool "Turn on Blackfin's Hardware Trace"
1058 default y
1059 help
1060 All Blackfins include a Trace Unit which stores a history of the last
1061 16 changes in program flow taken by the program sequencer. The history
1062 allows the user to recreate the program sequencer’s recent path. This
1063 can be handy when an application dies - we print out the execution
1064 path of how it got to the offending instruction.
1065
1066 By turning this off, you may save a tiny amount of power.
1067
1068choice
1069 prompt "Omit loop Tracing"
1070 default DEBUG_BFIN_HWTRACE_COMPRESSION_OFF
1071 depends on DEBUG_BFIN_HWTRACE_ON
1072 help
1073 The trace buffer can be configured to omit recording of changes in
1074 program flow that match either the last entry or one of the last
1075 two entries. Omitting one of these entries from the record prevents
1076 the trace buffer from overflowing because of any sort of loop (for, do
1077 while, etc) in the program.
1078
1079 Because zero-overhead Hardware loops are not recorded in the trace buffer,
1080 this feature can be used to prevent trace overflow from loops that
1081 are nested four deep.
1082
1083config DEBUG_BFIN_HWTRACE_COMPRESSION_OFF
1084 bool "Trace all Loops"
1085 help
1086 The trace buffer records all changes of flow
1087
1088config DEBUG_BFIN_HWTRACE_COMPRESSION_ONE
1089 bool "Compress single-level loops"
1090 help
1091 The trace buffer does not record single loops - helpful if trace
1092 is spinning on a while or do loop.
1093
1094config DEBUG_BFIN_HWTRACE_COMPRESSION_TWO
1095 bool "Compress two-level loops"
1096 help
1097 The trace buffer does not record loops two levels deep. Helpful if
1098 the trace is spinning in a nested loop
1099
1100endchoice
1101
1102config DEBUG_BFIN_HWTRACE_COMPRESSION
1103 int
1104 depends on DEBUG_BFIN_HWTRACE_ON
1105 default 0 if DEBUG_BFIN_HWTRACE_COMPRESSION_OFF
1106 default 1 if DEBUG_BFIN_HWTRACE_COMPRESSION_ONE
1107 default 2 if DEBUG_BFIN_HWTRACE_COMPRESSION_TWO
1108
1109
1110config DEBUG_BFIN_HWTRACE_EXPAND
1111 bool "Expand Trace Buffer greater than 16 entries"
1112 depends on DEBUG_BFIN_HWTRACE_ON
1113 default n
1114 help
1115 By selecting this option, every time the 16 hardware entries in
1116 the Blackfin's HW Trace buffer are full, the kernel will move them
1117 into a software buffer, for dumping when there is an issue. This
1118 has a great impact on performance, (an interrupt every 16 change of
1119 flows) and should normally be turned off, except in those nasty
1120 debugging sessions
1121
1122config DEBUG_BFIN_HWTRACE_EXPAND_LEN
1123 int "Size of Trace buffer (in power of 2k)"
1124 range 0 4
1125 depends on DEBUG_BFIN_HWTRACE_EXPAND
1126 default 1
1127 help
1128 This sets the size of the software buffer that the trace information
1129 is kept in.
1130 0 for (2^0) 1k, or 256 entries,
1131 1 for (2^1) 2k, or 512 entries,
1132 2 for (2^2) 4k, or 1024 entries,
1133 3 for (2^3) 8k, or 2048 entries,
1134 4 for (2^4) 16k, or 4096 entries
1135
976config DEBUG_BFIN_NO_KERN_HWTRACE 1136config DEBUG_BFIN_NO_KERN_HWTRACE
977 bool "Trace user apps (turn off hwtrace in kernel)" 1137 bool "Trace user apps (turn off hwtrace in kernel)"
1138 depends on DEBUG_BFIN_HWTRACE_ON
978 default n 1139 default n
979 help 1140 help
980 Some pieces of the kernel contain a lot of flow changes which can 1141 Some pieces of the kernel contain a lot of flow changes which can
@@ -985,6 +1146,20 @@ config DEBUG_BFIN_NO_KERN_HWTRACE
985 Say Y here to disable hardware tracing in some known "jumpy" pieces 1146 Say Y here to disable hardware tracing in some known "jumpy" pieces
986 of code so that the trace buffer will extend further back. 1147 of code so that the trace buffer will extend further back.
987 1148
1149config EARLY_PRINTK
1150 bool "Early printk"
1151 default n
1152 help
1153 This option enables special console drivers which allow the kernel
1154 to print messages very early in the bootup process.
1155
1156 This is useful for kernel debugging when your machine crashes very
1157 early before the console code is initialized. After enabling this
1158 feature, you must add "earlyprintk=serial,uart0,57600" to the
1159 command line (bootargs). It is safe to say Y here in all cases, as
1160 all of this lives in the init section and is thrown away after the
1161 kernel boots completely.
1162
988config DUAL_CORE_TEST_MODULE 1163config DUAL_CORE_TEST_MODULE
989 tristate "Dual Core Test Module" 1164 tristate "Dual Core Test Module"
990 depends on (BF561) 1165 depends on (BF561)
diff --git a/arch/blackfin/configs/BF533-EZKIT_defconfig b/arch/blackfin/configs/BF533-EZKIT_defconfig
index 1cf1ab28dc66..57f58d5cd47a 100644
--- a/arch/blackfin/configs/BF533-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF533-EZKIT_defconfig
@@ -1,6 +1,6 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21.5 3# Linux kernel version: 2.6.22.6
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
@@ -15,8 +15,9 @@ CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_HARDIRQS=y 15CONFIG_GENERIC_HARDIRQS=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17# CONFIG_GENERIC_TIME is not set 17# CONFIG_GENERIC_TIME is not set
18CONFIG_GENERIC_CALIBRATE_DELAY=y 18CONFIG_GENERIC_GPIO=y
19CONFIG_FORCE_MAX_ZONEORDER=14 19CONFIG_FORCE_MAX_ZONEORDER=14
20CONFIG_GENERIC_CALIBRATE_DELAY=y
20CONFIG_IRQCHIP_DEMUX_GPIO=y 21CONFIG_IRQCHIP_DEMUX_GPIO=y
21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 22CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
22 23
@@ -40,7 +41,9 @@ CONFIG_SYSVIPC_SYSCTL=y
40# CONFIG_TASKSTATS is not set 41# CONFIG_TASKSTATS is not set
41# CONFIG_UTS_NS is not set 42# CONFIG_UTS_NS is not set
42# CONFIG_AUDIT is not set 43# CONFIG_AUDIT is not set
43# CONFIG_IKCONFIG is not set 44CONFIG_IKCONFIG=y
45CONFIG_IKCONFIG_PROC=y
46CONFIG_LOG_BUF_SHIFT=14
44CONFIG_SYSFS_DEPRECATED=y 47CONFIG_SYSFS_DEPRECATED=y
45# CONFIG_RELAY is not set 48# CONFIG_RELAY is not set
46CONFIG_BLK_DEV_INITRD=y 49CONFIG_BLK_DEV_INITRD=y
@@ -58,15 +61,20 @@ CONFIG_BUG=y
58CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
59CONFIG_BASE_FULL=y 62CONFIG_BASE_FULL=y
60CONFIG_FUTEX=y 63CONFIG_FUTEX=y
64CONFIG_ANON_INODES=y
65CONFIG_EPOLL=y
66CONFIG_SIGNALFD=y
67CONFIG_TIMERFD=y
68CONFIG_EVENTFD=y
69CONFIG_VM_EVENT_COUNTERS=y
61CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 70CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3
62CONFIG_BUDDY=y
63# CONFIG_NP2 is not set 71# CONFIG_NP2 is not set
64CONFIG_SLAB=y 72CONFIG_SLAB=y
65CONFIG_VM_EVENT_COUNTERS=y 73# CONFIG_SLUB is not set
74# CONFIG_SLOB is not set
66CONFIG_RT_MUTEXES=y 75CONFIG_RT_MUTEXES=y
67CONFIG_TINY_SHMEM=y 76CONFIG_TINY_SHMEM=y
68CONFIG_BASE_SMALL=0 77CONFIG_BASE_SMALL=0
69# CONFIG_SLOB is not set
70 78
71# 79#
72# Loadable module support 80# Loadable module support
@@ -184,19 +192,17 @@ CONFIG_WDTIMER=13
184# CONFIG_CMDLINE_BOOL is not set 192# CONFIG_CMDLINE_BOOL is not set
185 193
186# 194#
187# Board Setup 195# Clock/PLL Setup
188# 196#
189CONFIG_CLKIN_HZ=27000000 197CONFIG_CLKIN_HZ=27000000
190CONFIG_MEM_SIZE=32 198# CONFIG_BFIN_KERNEL_CLOCK is not set
191CONFIG_MEM_ADD_WIDTH=9 199CONFIG_MAX_VCO_HZ=750000000
192CONFIG_BOOT_LOAD=0x1000 200CONFIG_MIN_VCO_HZ=50000000
193 201CONFIG_MAX_SCLK_HZ=133000000
194# 202CONFIG_MIN_SCLK_HZ=27000000
195# Blackfin Kernel Optimizations
196#
197 203
198# 204#
199# Timer Tick 205# Kernel Timer/Scheduler
200# 206#
201# CONFIG_HZ_100 is not set 207# CONFIG_HZ_100 is not set
202CONFIG_HZ_250=y 208CONFIG_HZ_250=y
@@ -205,6 +211,20 @@ CONFIG_HZ_250=y
205CONFIG_HZ=250 211CONFIG_HZ=250
206 212
207# 213#
214# Memory Setup
215#
216CONFIG_MEM_SIZE=32
217CONFIG_MEM_ADD_WIDTH=9
218CONFIG_BOOT_LOAD=0x1000
219CONFIG_BFIN_SCRATCH_REG_RETN=y
220# CONFIG_BFIN_SCRATCH_REG_RETE is not set
221# CONFIG_BFIN_SCRATCH_REG_CYCLES is not set
222
223#
224# Blackfin Kernel Optimizations
225#
226
227#
208# Memory Optimizations 228# Memory Optimizations
209# 229#
210CONFIG_I_ENTRY_L1=y 230CONFIG_I_ENTRY_L1=y
@@ -243,20 +263,15 @@ CONFIG_DMA_UNCACHED_1M=y
243# 263#
244# Cache Support 264# Cache Support
245# 265#
246CONFIG_BLKFIN_CACHE=y 266CONFIG_BFIN_ICACHE=y
247CONFIG_BLKFIN_DCACHE=y 267CONFIG_BFIN_DCACHE=y
248# CONFIG_BLKFIN_DCACHE_BANKA is not set 268# CONFIG_BFIN_DCACHE_BANKA is not set
249# CONFIG_BLKFIN_CACHE_LOCK is not set 269# CONFIG_BFIN_ICACHE_LOCK is not set
250# CONFIG_BLKFIN_WB is not set 270# CONFIG_BFIN_WB is not set
251CONFIG_BLKFIN_WT=y 271CONFIG_BFIN_WT=y
252CONFIG_L1_MAX_PIECE=16 272CONFIG_L1_MAX_PIECE=16
253 273
254# 274#
255# Clock Settings
256#
257# CONFIG_BFIN_KERNEL_CLOCK is not set
258
259#
260# Asynchonous Memory Configuration 275# Asynchonous Memory Configuration
261# 276#
262 277
@@ -277,12 +292,13 @@ CONFIG_C_AMBEN_ALL=y
277CONFIG_BANK_0=0x7BB0 292CONFIG_BANK_0=0x7BB0
278CONFIG_BANK_1=0x7BB0 293CONFIG_BANK_1=0x7BB0
279CONFIG_BANK_2=0x7BB0 294CONFIG_BANK_2=0x7BB0
280CONFIG_BANK_3=0x99B3 295CONFIG_BANK_3=0xAAC3
281 296
282# 297#
283# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 298# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
284# 299#
285# CONFIG_PCI is not set 300# CONFIG_PCI is not set
301# CONFIG_ARCH_SUPPORTS_MSI is not set
286 302
287# 303#
288# PCCARD (PCMCIA/CardBus) support 304# PCCARD (PCMCIA/CardBus) support
@@ -290,10 +306,6 @@ CONFIG_BANK_3=0x99B3
290# CONFIG_PCCARD is not set 306# CONFIG_PCCARD is not set
291 307
292# 308#
293# PCI Hotplug Support
294#
295
296#
297# Executable file formats 309# Executable file formats
298# 310#
299CONFIG_BINFMT_ELF_FDPIC=y 311CONFIG_BINFMT_ELF_FDPIC=y
@@ -327,7 +339,6 @@ CONFIG_NET=y
327# 339#
328# Networking options 340# Networking options
329# 341#
330# CONFIG_NETDEBUG is not set
331CONFIG_PACKET=y 342CONFIG_PACKET=y
332# CONFIG_PACKET_MMAP is not set 343# CONFIG_PACKET_MMAP is not set
333CONFIG_UNIX=y 344CONFIG_UNIX=y
@@ -368,20 +379,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
368# CONFIG_NETLABEL is not set 379# CONFIG_NETLABEL is not set
369# CONFIG_NETWORK_SECMARK is not set 380# CONFIG_NETWORK_SECMARK is not set
370# CONFIG_NETFILTER is not set 381# CONFIG_NETFILTER is not set
371
372#
373# DCCP Configuration (EXPERIMENTAL)
374#
375# CONFIG_IP_DCCP is not set 382# CONFIG_IP_DCCP is not set
376
377#
378# SCTP Configuration (EXPERIMENTAL)
379#
380# CONFIG_IP_SCTP is not set 383# CONFIG_IP_SCTP is not set
381
382#
383# TIPC Configuration (EXPERIMENTAL)
384#
385# CONFIG_TIPC is not set 384# CONFIG_TIPC is not set
386# CONFIG_ATM is not set 385# CONFIG_ATM is not set
387# CONFIG_BRIDGE is not set 386# CONFIG_BRIDGE is not set
@@ -448,7 +447,16 @@ CONFIG_IRTTY_SIR=m
448# FIR device drivers 447# FIR device drivers
449# 448#
450# CONFIG_BT is not set 449# CONFIG_BT is not set
450# CONFIG_AF_RXRPC is not set
451
452#
453# Wireless
454#
455# CONFIG_CFG80211 is not set
456# CONFIG_WIRELESS_EXT is not set
457# CONFIG_MAC80211 is not set
451# CONFIG_IEEE80211 is not set 458# CONFIG_IEEE80211 is not set
459# CONFIG_RFKILL is not set
452 460
453# 461#
454# Device Drivers 462# Device Drivers
@@ -466,10 +474,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
466# Connector - unified userspace <-> kernelspace linker 474# Connector - unified userspace <-> kernelspace linker
467# 475#
468# CONFIG_CONNECTOR is not set 476# CONFIG_CONNECTOR is not set
469
470#
471# Memory Technology Devices (MTD)
472#
473CONFIG_MTD=y 477CONFIG_MTD=y
474# CONFIG_MTD_DEBUG is not set 478# CONFIG_MTD_DEBUG is not set
475# CONFIG_MTD_CONCAT is not set 479# CONFIG_MTD_CONCAT is not set
@@ -513,7 +517,6 @@ CONFIG_MTD_MW320D=m
513CONFIG_MTD_RAM=y 517CONFIG_MTD_RAM=y
514CONFIG_MTD_ROM=m 518CONFIG_MTD_ROM=m
515# CONFIG_MTD_ABSENT is not set 519# CONFIG_MTD_ABSENT is not set
516# CONFIG_MTD_OBSOLETE_CHIPS is not set
517 520
518# 521#
519# Mapping drivers for chip access 522# Mapping drivers for chip access
@@ -550,16 +553,13 @@ CONFIG_BFIN_FLASH_BANK_3=0x7BB0
550# CONFIG_MTD_DOC2000 is not set 553# CONFIG_MTD_DOC2000 is not set
551# CONFIG_MTD_DOC2001 is not set 554# CONFIG_MTD_DOC2001 is not set
552# CONFIG_MTD_DOC2001PLUS is not set 555# CONFIG_MTD_DOC2001PLUS is not set
553
554#
555# NAND Flash Device Drivers
556#
557# CONFIG_MTD_NAND is not set 556# CONFIG_MTD_NAND is not set
557# CONFIG_MTD_ONENAND is not set
558 558
559# 559#
560# OneNAND Flash Device Drivers 560# UBI - Unsorted block images
561# 561#
562# CONFIG_MTD_ONENAND is not set 562# CONFIG_MTD_UBI is not set
563 563
564# 564#
565# Parallel port support 565# Parallel port support
@@ -587,10 +587,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
587# 587#
588# Misc devices 588# Misc devices
589# 589#
590
591#
592# ATA/ATAPI/MFM/RLL support
593#
594# CONFIG_IDE is not set 590# CONFIG_IDE is not set
595 591
596# 592#
@@ -599,10 +595,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
599# CONFIG_RAID_ATTRS is not set 595# CONFIG_RAID_ATTRS is not set
600# CONFIG_SCSI is not set 596# CONFIG_SCSI is not set
601# CONFIG_SCSI_NETLINK is not set 597# CONFIG_SCSI_NETLINK is not set
602
603#
604# Serial ATA (prod) and Parallel ATA (experimental) drivers
605#
606# CONFIG_ATA is not set 598# CONFIG_ATA is not set
607 599
608# 600#
@@ -611,19 +603,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
611# CONFIG_MD is not set 603# CONFIG_MD is not set
612 604
613# 605#
614# Fusion MPT device support
615#
616# CONFIG_FUSION is not set
617
618#
619# IEEE 1394 (FireWire) support
620#
621
622#
623# I2O device support
624#
625
626#
627# Network device support 606# Network device support
628# 607#
629CONFIG_NETDEVICES=y 608CONFIG_NETDEVICES=y
@@ -631,10 +610,6 @@ CONFIG_NETDEVICES=y
631# CONFIG_BONDING is not set 610# CONFIG_BONDING is not set
632# CONFIG_EQUALIZER is not set 611# CONFIG_EQUALIZER is not set
633# CONFIG_TUN is not set 612# CONFIG_TUN is not set
634
635#
636# PHY device support
637#
638# CONFIG_PHYLIB is not set 613# CONFIG_PHYLIB is not set
639 614
640# 615#
@@ -644,27 +619,15 @@ CONFIG_NET_ETHERNET=y
644CONFIG_MII=y 619CONFIG_MII=y
645CONFIG_SMC91X=y 620CONFIG_SMC91X=y
646# CONFIG_SMSC911X is not set 621# CONFIG_SMSC911X is not set
622# CONFIG_DM9000 is not set
623CONFIG_NETDEV_1000=y
624CONFIG_NETDEV_10000=y
647 625
648# 626#
649# Ethernet (1000 Mbit) 627# Wireless LAN
650#
651
652#
653# Ethernet (10000 Mbit)
654#
655
656#
657# Token Ring devices
658#
659
660#
661# Wireless LAN (non-hamradio)
662#
663# CONFIG_NET_RADIO is not set
664
665#
666# Wan interfaces
667# 628#
629# CONFIG_WLAN_PRE80211 is not set
630# CONFIG_WLAN_80211 is not set
668# CONFIG_WAN is not set 631# CONFIG_WAN is not set
669# CONFIG_PPP is not set 632# CONFIG_PPP is not set
670# CONFIG_SLIP is not set 633# CONFIG_SLIP is not set
@@ -688,6 +651,7 @@ CONFIG_SMC91X=y
688# 651#
689CONFIG_INPUT=m 652CONFIG_INPUT=m
690# CONFIG_INPUT_FF_MEMLESS is not set 653# CONFIG_INPUT_FF_MEMLESS is not set
654# CONFIG_INPUT_POLLDEV is not set
691 655
692# 656#
693# Userland interfaces 657# Userland interfaces
@@ -704,6 +668,7 @@ CONFIG_INPUT_EVDEV=m
704# CONFIG_INPUT_KEYBOARD is not set 668# CONFIG_INPUT_KEYBOARD is not set
705# CONFIG_INPUT_MOUSE is not set 669# CONFIG_INPUT_MOUSE is not set
706# CONFIG_INPUT_JOYSTICK is not set 670# CONFIG_INPUT_JOYSTICK is not set
671# CONFIG_INPUT_TABLET is not set
707# CONFIG_INPUT_TOUCHSCREEN is not set 672# CONFIG_INPUT_TOUCHSCREEN is not set
708# CONFIG_INPUT_MISC is not set 673# CONFIG_INPUT_MISC is not set
709 674
@@ -718,7 +683,7 @@ CONFIG_INPUT_EVDEV=m
718# 683#
719# CONFIG_AD9960 is not set 684# CONFIG_AD9960 is not set
720# CONFIG_SPI_ADC_BF533 is not set 685# CONFIG_SPI_ADC_BF533 is not set
721# CONFIG_BF5xx_PFLAGS is not set 686# CONFIG_BFIN_PFLAGS is not set
722# CONFIG_BF5xx_PPIFCD is not set 687# CONFIG_BF5xx_PPIFCD is not set
723# CONFIG_BF5xx_TIMERS is not set 688# CONFIG_BF5xx_TIMERS is not set
724# CONFIG_BF5xx_PPI is not set 689# CONFIG_BF5xx_PPI is not set
@@ -758,10 +723,6 @@ CONFIG_UNIX98_PTYS=y
758# IPMI 723# IPMI
759# 724#
760# CONFIG_IPMI_HANDLER is not set 725# CONFIG_IPMI_HANDLER is not set
761
762#
763# Watchdog Cards
764#
765CONFIG_WATCHDOG=y 726CONFIG_WATCHDOG=y
766# CONFIG_WATCHDOG_NOWAYOUT is not set 727# CONFIG_WATCHDOG_NOWAYOUT is not set
767 728
@@ -773,7 +734,6 @@ CONFIG_BFIN_WDT=y
773CONFIG_HW_RANDOM=y 734CONFIG_HW_RANDOM=y
774# CONFIG_GEN_RTC is not set 735# CONFIG_GEN_RTC is not set
775CONFIG_BLACKFIN_DPMC=y 736CONFIG_BLACKFIN_DPMC=y
776# CONFIG_DTLK is not set
777# CONFIG_R3964 is not set 737# CONFIG_R3964 is not set
778# CONFIG_RAW_DRIVER is not set 738# CONFIG_RAW_DRIVER is not set
779 739
@@ -781,10 +741,6 @@ CONFIG_BLACKFIN_DPMC=y
781# TPM devices 741# TPM devices
782# 742#
783# CONFIG_TCG_TPM is not set 743# CONFIG_TCG_TPM is not set
784
785#
786# I2C support
787#
788# CONFIG_I2C is not set 744# CONFIG_I2C is not set
789 745
790# 746#
@@ -803,22 +759,22 @@ CONFIG_SPI_BFIN=y
803# SPI Protocol Masters 759# SPI Protocol Masters
804# 760#
805# CONFIG_SPI_AT25 is not set 761# CONFIG_SPI_AT25 is not set
762# CONFIG_SPI_SPIDEV is not set
806 763
807# 764#
808# Dallas's 1-wire bus 765# Dallas's 1-wire bus
809# 766#
810# CONFIG_W1 is not set 767# CONFIG_W1 is not set
811
812#
813# Hardware Monitoring support
814#
815CONFIG_HWMON=y 768CONFIG_HWMON=y
816# CONFIG_HWMON_VID is not set 769# CONFIG_HWMON_VID is not set
817# CONFIG_SENSORS_ABITUGURU is not set 770# CONFIG_SENSORS_ABITUGURU is not set
818# CONFIG_SENSORS_F71805F is not set 771# CONFIG_SENSORS_F71805F is not set
819# CONFIG_SENSORS_LM70 is not set 772# CONFIG_SENSORS_LM70 is not set
820# CONFIG_SENSORS_PC87427 is not set 773# CONFIG_SENSORS_PC87427 is not set
774# CONFIG_SENSORS_SMSC47M1 is not set
775# CONFIG_SENSORS_SMSC47B397 is not set
821# CONFIG_SENSORS_VT1211 is not set 776# CONFIG_SENSORS_VT1211 is not set
777# CONFIG_SENSORS_W83627HF is not set
822# CONFIG_HWMON_DEBUG_CHIP is not set 778# CONFIG_HWMON_DEBUG_CHIP is not set
823 779
824# 780#
@@ -830,16 +786,19 @@ CONFIG_HWMON=y
830# Multimedia devices 786# Multimedia devices
831# 787#
832# CONFIG_VIDEO_DEV is not set 788# CONFIG_VIDEO_DEV is not set
789# CONFIG_DVB_CORE is not set
790CONFIG_DAB=y
833 791
834# 792#
835# Digital Video Broadcasting Devices 793# Graphics support
836# 794#
837# CONFIG_DVB is not set 795# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
838 796
839# 797#
840# Graphics support 798# Display device support
841# 799#
842# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 800# CONFIG_DISPLAY_SUPPORT is not set
801# CONFIG_VGASTATE is not set
843# CONFIG_FB is not set 802# CONFIG_FB is not set
844 803
845# 804#
@@ -862,18 +821,17 @@ CONFIG_USB_ARCH_HAS_HCD=y
862# CONFIG_USB is not set 821# CONFIG_USB is not set
863 822
864# 823#
865# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 824# Enable Host or Gadget support to see Inventra options
866# 825#
867 826
868# 827#
869# USB Gadget Support 828# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
870# 829#
871# CONFIG_USB_GADGET is not set
872 830
873# 831#
874# MMC/SD Card support 832# USB Gadget Support
875# 833#
876# CONFIG_SPI_MMC is not set 834# CONFIG_USB_GADGET is not set
877# CONFIG_MMC is not set 835# CONFIG_MMC is not set
878 836
879# 837#
@@ -913,17 +871,29 @@ CONFIG_RTC_INTF_SYSFS=y
913CONFIG_RTC_INTF_PROC=y 871CONFIG_RTC_INTF_PROC=y
914CONFIG_RTC_INTF_DEV=y 872CONFIG_RTC_INTF_DEV=y
915# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 873# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
874# CONFIG_RTC_DRV_TEST is not set
875
876#
877# I2C RTC drivers
878#
879
880#
881# SPI RTC drivers
882#
883# CONFIG_RTC_DRV_RS5C348 is not set
884# CONFIG_RTC_DRV_MAX6902 is not set
916 885
917# 886#
918# RTC drivers 887# Platform RTC drivers
919# 888#
920# CONFIG_RTC_DRV_DS1553 is not set 889# CONFIG_RTC_DRV_DS1553 is not set
921# CONFIG_RTC_DRV_DS1742 is not set 890# CONFIG_RTC_DRV_DS1742 is not set
922# CONFIG_RTC_DRV_RS5C348 is not set
923# CONFIG_RTC_DRV_M48T86 is not set 891# CONFIG_RTC_DRV_M48T86 is not set
924# CONFIG_RTC_DRV_TEST is not set
925# CONFIG_RTC_DRV_MAX6902 is not set
926# CONFIG_RTC_DRV_V3020 is not set 892# CONFIG_RTC_DRV_V3020 is not set
893
894#
895# on-CPU RTC drivers
896#
927CONFIG_RTC_DRV_BFIN=y 897CONFIG_RTC_DRV_BFIN=y
928 898
929# 899#
@@ -940,14 +910,6 @@ CONFIG_RTC_DRV_BFIN=y
940# 910#
941 911
942# 912#
943# Auxiliary Display support
944#
945
946#
947# Virtualization
948#
949
950#
951# PBX support 913# PBX support
952# 914#
953# CONFIG_PBX is not set 915# CONFIG_PBX is not set
@@ -1047,6 +1009,7 @@ CONFIG_LOCKD=m
1047CONFIG_LOCKD_V4=y 1009CONFIG_LOCKD_V4=y
1048CONFIG_NFS_COMMON=y 1010CONFIG_NFS_COMMON=y
1049CONFIG_SUNRPC=m 1011CONFIG_SUNRPC=m
1012# CONFIG_SUNRPC_BIND34 is not set
1050# CONFIG_RPCSEC_GSS_KRB5 is not set 1013# CONFIG_RPCSEC_GSS_KRB5 is not set
1051# CONFIG_RPCSEC_GSS_SPKM3 is not set 1014# CONFIG_RPCSEC_GSS_SPKM3 is not set
1052CONFIG_SMB_FS=m 1015CONFIG_SMB_FS=m
@@ -1124,14 +1087,20 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1124CONFIG_ENABLE_MUST_CHECK=y 1087CONFIG_ENABLE_MUST_CHECK=y
1125# CONFIG_MAGIC_SYSRQ is not set 1088# CONFIG_MAGIC_SYSRQ is not set
1126# CONFIG_UNUSED_SYMBOLS is not set 1089# CONFIG_UNUSED_SYMBOLS is not set
1127# CONFIG_DEBUG_FS is not set 1090CONFIG_DEBUG_FS=y
1128# CONFIG_HEADERS_CHECK is not set 1091# CONFIG_HEADERS_CHECK is not set
1129# CONFIG_DEBUG_KERNEL is not set 1092# CONFIG_DEBUG_KERNEL is not set
1130CONFIG_LOG_BUF_SHIFT=14
1131# CONFIG_DEBUG_BUGVERBOSE is not set 1093# CONFIG_DEBUG_BUGVERBOSE is not set
1132# CONFIG_DEBUG_SERIAL_EARLY_INIT is not set 1094CONFIG_DEBUG_MMRS=y
1133CONFIG_DEBUG_HUNT_FOR_ZERO=y 1095CONFIG_DEBUG_HUNT_FOR_ZERO=y
1096CONFIG_DEBUG_BFIN_HWTRACE_ON=y
1097CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
1098# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE is not set
1099# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_TWO is not set
1100CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0
1101# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set
1134# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 1102# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
1103CONFIG_EARLY_PRINTK=y
1135CONFIG_CPLB_INFO=y 1104CONFIG_CPLB_INFO=y
1136CONFIG_ACCESS_CHECK=y 1105CONFIG_ACCESS_CHECK=y
1137 1106
@@ -1154,6 +1123,7 @@ CONFIG_SECURITY_CAPABILITIES=m
1154CONFIG_BITREVERSE=y 1123CONFIG_BITREVERSE=y
1155CONFIG_CRC_CCITT=m 1124CONFIG_CRC_CCITT=m
1156# CONFIG_CRC16 is not set 1125# CONFIG_CRC16 is not set
1126# CONFIG_CRC_ITU_T is not set
1157CONFIG_CRC32=y 1127CONFIG_CRC32=y
1158# CONFIG_LIBCRC32C is not set 1128# CONFIG_LIBCRC32C is not set
1159CONFIG_ZLIB_INFLATE=y 1129CONFIG_ZLIB_INFLATE=y
@@ -1161,3 +1131,4 @@ CONFIG_ZLIB_DEFLATE=m
1161CONFIG_PLIST=y 1131CONFIG_PLIST=y
1162CONFIG_HAS_IOMEM=y 1132CONFIG_HAS_IOMEM=y
1163CONFIG_HAS_IOPORT=y 1133CONFIG_HAS_IOPORT=y
1134CONFIG_HAS_DMA=y
diff --git a/arch/blackfin/configs/BF533-STAMP_defconfig b/arch/blackfin/configs/BF533-STAMP_defconfig
index 64b7f1b3b2af..306302baff06 100644
--- a/arch/blackfin/configs/BF533-STAMP_defconfig
+++ b/arch/blackfin/configs/BF533-STAMP_defconfig
@@ -1,6 +1,6 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21.5 3# Linux kernel version: 2.6.22.6
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
@@ -15,8 +15,9 @@ CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_HARDIRQS=y 15CONFIG_GENERIC_HARDIRQS=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17# CONFIG_GENERIC_TIME is not set 17# CONFIG_GENERIC_TIME is not set
18CONFIG_GENERIC_CALIBRATE_DELAY=y 18CONFIG_GENERIC_GPIO=y
19CONFIG_FORCE_MAX_ZONEORDER=14 19CONFIG_FORCE_MAX_ZONEORDER=14
20CONFIG_GENERIC_CALIBRATE_DELAY=y
20CONFIG_IRQCHIP_DEMUX_GPIO=y 21CONFIG_IRQCHIP_DEMUX_GPIO=y
21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 22CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
22 23
@@ -40,7 +41,9 @@ CONFIG_SYSVIPC_SYSCTL=y
40# CONFIG_TASKSTATS is not set 41# CONFIG_TASKSTATS is not set
41# CONFIG_UTS_NS is not set 42# CONFIG_UTS_NS is not set
42# CONFIG_AUDIT is not set 43# CONFIG_AUDIT is not set
43# CONFIG_IKCONFIG is not set 44CONFIG_IKCONFIG=y
45CONFIG_IKCONFIG_PROC=y
46CONFIG_LOG_BUF_SHIFT=14
44CONFIG_SYSFS_DEPRECATED=y 47CONFIG_SYSFS_DEPRECATED=y
45# CONFIG_RELAY is not set 48# CONFIG_RELAY is not set
46CONFIG_BLK_DEV_INITRD=y 49CONFIG_BLK_DEV_INITRD=y
@@ -58,15 +61,20 @@ CONFIG_BUG=y
58CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
59CONFIG_BASE_FULL=y 62CONFIG_BASE_FULL=y
60CONFIG_FUTEX=y 63CONFIG_FUTEX=y
64CONFIG_ANON_INODES=y
65CONFIG_EPOLL=y
66CONFIG_SIGNALFD=y
67CONFIG_TIMERFD=y
68CONFIG_EVENTFD=y
69CONFIG_VM_EVENT_COUNTERS=y
61CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 70CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3
62CONFIG_BUDDY=y
63# CONFIG_NP2 is not set 71# CONFIG_NP2 is not set
64CONFIG_SLAB=y 72CONFIG_SLAB=y
65CONFIG_VM_EVENT_COUNTERS=y 73# CONFIG_SLUB is not set
74# CONFIG_SLOB is not set
66CONFIG_RT_MUTEXES=y 75CONFIG_RT_MUTEXES=y
67CONFIG_TINY_SHMEM=y 76CONFIG_TINY_SHMEM=y
68CONFIG_BASE_SMALL=0 77CONFIG_BASE_SMALL=0
69# CONFIG_SLOB is not set
70 78
71# 79#
72# Loadable module support 80# Loadable module support
@@ -185,9 +193,27 @@ CONFIG_WDTIMER=13
185# CONFIG_CMDLINE_BOOL is not set 193# CONFIG_CMDLINE_BOOL is not set
186 194
187# 195#
188# Board Setup 196# Clock/PLL Setup
189# 197#
190CONFIG_CLKIN_HZ=11059200 198CONFIG_CLKIN_HZ=11059200
199# CONFIG_BFIN_KERNEL_CLOCK is not set
200CONFIG_MAX_VCO_HZ=750000000
201CONFIG_MIN_VCO_HZ=50000000
202CONFIG_MAX_SCLK_HZ=133000000
203CONFIG_MIN_SCLK_HZ=27000000
204
205#
206# Kernel Timer/Scheduler
207#
208# CONFIG_HZ_100 is not set
209CONFIG_HZ_250=y
210# CONFIG_HZ_300 is not set
211# CONFIG_HZ_1000 is not set
212CONFIG_HZ=250
213
214#
215# Memory Setup
216#
191CONFIG_MEM_SIZE=128 217CONFIG_MEM_SIZE=128
192CONFIG_MEM_ADD_WIDTH=11 218CONFIG_MEM_ADD_WIDTH=11
193CONFIG_ENET_FLASH_PIN=0 219CONFIG_ENET_FLASH_PIN=0
@@ -198,6 +224,9 @@ CONFIG_BOOT_LOAD=0x1000
198# 224#
199# CONFIG_BFIN_ALIVE_LED is not set 225# CONFIG_BFIN_ALIVE_LED is not set
200# CONFIG_BFIN_IDLE_LED is not set 226# CONFIG_BFIN_IDLE_LED is not set
227CONFIG_BFIN_SCRATCH_REG_RETN=y
228# CONFIG_BFIN_SCRATCH_REG_RETE is not set
229# CONFIG_BFIN_SCRATCH_REG_CYCLES is not set
201CONFIG_BFIN_ALIVE_LED_PORT=0xFFC00700 230CONFIG_BFIN_ALIVE_LED_PORT=0xFFC00700
202CONFIG_BFIN_ALIVE_LED_DPORT=0xFFC00730 231CONFIG_BFIN_ALIVE_LED_DPORT=0xFFC00730
203CONFIG_BFIN_IDLE_LED_PORT=0xFFC00700 232CONFIG_BFIN_IDLE_LED_PORT=0xFFC00700
@@ -208,15 +237,6 @@ CONFIG_BFIN_IDLE_LED_DPORT=0xFFC00730
208# 237#
209 238
210# 239#
211# Timer Tick
212#
213# CONFIG_HZ_100 is not set
214CONFIG_HZ_250=y
215# CONFIG_HZ_300 is not set
216# CONFIG_HZ_1000 is not set
217CONFIG_HZ=250
218
219#
220# Memory Optimizations 240# Memory Optimizations
221# 241#
222CONFIG_I_ENTRY_L1=y 242CONFIG_I_ENTRY_L1=y
@@ -255,20 +275,15 @@ CONFIG_DMA_UNCACHED_1M=y
255# 275#
256# Cache Support 276# Cache Support
257# 277#
258CONFIG_BLKFIN_CACHE=y 278CONFIG_BFIN_ICACHE=y
259CONFIG_BLKFIN_DCACHE=y 279CONFIG_BFIN_DCACHE=y
260# CONFIG_BLKFIN_DCACHE_BANKA is not set 280# CONFIG_BFIN_DCACHE_BANKA is not set
261# CONFIG_BLKFIN_CACHE_LOCK is not set 281# CONFIG_BFIN_ICACHE_LOCK is not set
262# CONFIG_BLKFIN_WB is not set 282# CONFIG_BFIN_WB is not set
263CONFIG_BLKFIN_WT=y 283CONFIG_BFIN_WT=y
264CONFIG_L1_MAX_PIECE=16 284CONFIG_L1_MAX_PIECE=16
265 285
266# 286#
267# Clock Settings
268#
269# CONFIG_BFIN_KERNEL_CLOCK is not set
270
271#
272# Asynchonous Memory Configuration 287# Asynchonous Memory Configuration
273# 288#
274 289
@@ -289,12 +304,13 @@ CONFIG_C_AMBEN_ALL=y
289CONFIG_BANK_0=0x7BB0 304CONFIG_BANK_0=0x7BB0
290CONFIG_BANK_1=0x7BB0 305CONFIG_BANK_1=0x7BB0
291CONFIG_BANK_2=0x7BB0 306CONFIG_BANK_2=0x7BB0
292CONFIG_BANK_3=0x99B3 307CONFIG_BANK_3=0xAAC3
293 308
294# 309#
295# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 310# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
296# 311#
297# CONFIG_PCI is not set 312# CONFIG_PCI is not set
313# CONFIG_ARCH_SUPPORTS_MSI is not set
298 314
299# 315#
300# PCCARD (PCMCIA/CardBus) support 316# PCCARD (PCMCIA/CardBus) support
@@ -302,10 +318,6 @@ CONFIG_BANK_3=0x99B3
302# CONFIG_PCCARD is not set 318# CONFIG_PCCARD is not set
303 319
304# 320#
305# PCI Hotplug Support
306#
307
308#
309# Executable file formats 321# Executable file formats
310# 322#
311CONFIG_BINFMT_ELF_FDPIC=y 323CONFIG_BINFMT_ELF_FDPIC=y
@@ -339,7 +351,6 @@ CONFIG_NET=y
339# 351#
340# Networking options 352# Networking options
341# 353#
342# CONFIG_NETDEBUG is not set
343CONFIG_PACKET=y 354CONFIG_PACKET=y
344# CONFIG_PACKET_MMAP is not set 355# CONFIG_PACKET_MMAP is not set
345CONFIG_UNIX=y 356CONFIG_UNIX=y
@@ -380,20 +391,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
380# CONFIG_NETLABEL is not set 391# CONFIG_NETLABEL is not set
381# CONFIG_NETWORK_SECMARK is not set 392# CONFIG_NETWORK_SECMARK is not set
382# CONFIG_NETFILTER is not set 393# CONFIG_NETFILTER is not set
383
384#
385# DCCP Configuration (EXPERIMENTAL)
386#
387# CONFIG_IP_DCCP is not set 394# CONFIG_IP_DCCP is not set
388
389#
390# SCTP Configuration (EXPERIMENTAL)
391#
392# CONFIG_IP_SCTP is not set 395# CONFIG_IP_SCTP is not set
393
394#
395# TIPC Configuration (EXPERIMENTAL)
396#
397# CONFIG_TIPC is not set 396# CONFIG_TIPC is not set
398# CONFIG_ATM is not set 397# CONFIG_ATM is not set
399# CONFIG_BRIDGE is not set 398# CONFIG_BRIDGE is not set
@@ -460,7 +459,16 @@ CONFIG_IRTTY_SIR=m
460# FIR device drivers 459# FIR device drivers
461# 460#
462# CONFIG_BT is not set 461# CONFIG_BT is not set
462# CONFIG_AF_RXRPC is not set
463
464#
465# Wireless
466#
467# CONFIG_CFG80211 is not set
468# CONFIG_WIRELESS_EXT is not set
469# CONFIG_MAC80211 is not set
463# CONFIG_IEEE80211 is not set 470# CONFIG_IEEE80211 is not set
471# CONFIG_RFKILL is not set
464 472
465# 473#
466# Device Drivers 474# Device Drivers
@@ -478,10 +486,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
478# Connector - unified userspace <-> kernelspace linker 486# Connector - unified userspace <-> kernelspace linker
479# 487#
480# CONFIG_CONNECTOR is not set 488# CONFIG_CONNECTOR is not set
481
482#
483# Memory Technology Devices (MTD)
484#
485CONFIG_MTD=y 489CONFIG_MTD=y
486# CONFIG_MTD_DEBUG is not set 490# CONFIG_MTD_DEBUG is not set
487# CONFIG_MTD_CONCAT is not set 491# CONFIG_MTD_CONCAT is not set
@@ -525,7 +529,6 @@ CONFIG_MTD_MW320D=m
525CONFIG_MTD_RAM=y 529CONFIG_MTD_RAM=y
526CONFIG_MTD_ROM=m 530CONFIG_MTD_ROM=m
527# CONFIG_MTD_ABSENT is not set 531# CONFIG_MTD_ABSENT is not set
528# CONFIG_MTD_OBSOLETE_CHIPS is not set
529 532
530# 533#
531# Mapping drivers for chip access 534# Mapping drivers for chip access
@@ -562,16 +565,13 @@ CONFIG_BFIN_FLASH_BANK_3=0x7BB0
562# CONFIG_MTD_DOC2000 is not set 565# CONFIG_MTD_DOC2000 is not set
563# CONFIG_MTD_DOC2001 is not set 566# CONFIG_MTD_DOC2001 is not set
564# CONFIG_MTD_DOC2001PLUS is not set 567# CONFIG_MTD_DOC2001PLUS is not set
565
566#
567# NAND Flash Device Drivers
568#
569# CONFIG_MTD_NAND is not set 568# CONFIG_MTD_NAND is not set
569# CONFIG_MTD_ONENAND is not set
570 570
571# 571#
572# OneNAND Flash Device Drivers 572# UBI - Unsorted block images
573# 573#
574# CONFIG_MTD_ONENAND is not set 574# CONFIG_MTD_UBI is not set
575 575
576# 576#
577# Parallel port support 577# Parallel port support
@@ -599,10 +599,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
599# 599#
600# Misc devices 600# Misc devices
601# 601#
602
603#
604# ATA/ATAPI/MFM/RLL support
605#
606# CONFIG_IDE is not set 602# CONFIG_IDE is not set
607 603
608# 604#
@@ -611,10 +607,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
611# CONFIG_RAID_ATTRS is not set 607# CONFIG_RAID_ATTRS is not set
612# CONFIG_SCSI is not set 608# CONFIG_SCSI is not set
613# CONFIG_SCSI_NETLINK is not set 609# CONFIG_SCSI_NETLINK is not set
614
615#
616# Serial ATA (prod) and Parallel ATA (experimental) drivers
617#
618# CONFIG_ATA is not set 610# CONFIG_ATA is not set
619 611
620# 612#
@@ -623,19 +615,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
623# CONFIG_MD is not set 615# CONFIG_MD is not set
624 616
625# 617#
626# Fusion MPT device support
627#
628# CONFIG_FUSION is not set
629
630#
631# IEEE 1394 (FireWire) support
632#
633
634#
635# I2O device support
636#
637
638#
639# Network device support 618# Network device support
640# 619#
641CONFIG_NETDEVICES=y 620CONFIG_NETDEVICES=y
@@ -643,10 +622,6 @@ CONFIG_NETDEVICES=y
643# CONFIG_BONDING is not set 622# CONFIG_BONDING is not set
644# CONFIG_EQUALIZER is not set 623# CONFIG_EQUALIZER is not set
645# CONFIG_TUN is not set 624# CONFIG_TUN is not set
646
647#
648# PHY device support
649#
650# CONFIG_PHYLIB is not set 625# CONFIG_PHYLIB is not set
651 626
652# 627#
@@ -656,27 +631,15 @@ CONFIG_NET_ETHERNET=y
656CONFIG_MII=y 631CONFIG_MII=y
657CONFIG_SMC91X=y 632CONFIG_SMC91X=y
658# CONFIG_SMSC911X is not set 633# CONFIG_SMSC911X is not set
634# CONFIG_DM9000 is not set
635CONFIG_NETDEV_1000=y
636CONFIG_NETDEV_10000=y
659 637
660# 638#
661# Ethernet (1000 Mbit) 639# Wireless LAN
662#
663
664#
665# Ethernet (10000 Mbit)
666#
667
668#
669# Token Ring devices
670#
671
672#
673# Wireless LAN (non-hamradio)
674#
675# CONFIG_NET_RADIO is not set
676
677#
678# Wan interfaces
679# 640#
641# CONFIG_WLAN_PRE80211 is not set
642# CONFIG_WLAN_80211 is not set
680# CONFIG_WAN is not set 643# CONFIG_WAN is not set
681# CONFIG_PPP is not set 644# CONFIG_PPP is not set
682# CONFIG_SLIP is not set 645# CONFIG_SLIP is not set
@@ -700,6 +663,7 @@ CONFIG_SMC91X=y
700# 663#
701CONFIG_INPUT=y 664CONFIG_INPUT=y
702# CONFIG_INPUT_FF_MEMLESS is not set 665# CONFIG_INPUT_FF_MEMLESS is not set
666# CONFIG_INPUT_POLLDEV is not set
703 667
704# 668#
705# Userland interfaces 669# Userland interfaces
@@ -716,8 +680,14 @@ CONFIG_INPUT_EVDEV=m
716# CONFIG_INPUT_KEYBOARD is not set 680# CONFIG_INPUT_KEYBOARD is not set
717# CONFIG_INPUT_MOUSE is not set 681# CONFIG_INPUT_MOUSE is not set
718# CONFIG_INPUT_JOYSTICK is not set 682# CONFIG_INPUT_JOYSTICK is not set
683# CONFIG_INPUT_TABLET is not set
719# CONFIG_INPUT_TOUCHSCREEN is not set 684# CONFIG_INPUT_TOUCHSCREEN is not set
720CONFIG_INPUT_MISC=y 685CONFIG_INPUT_MISC=y
686# CONFIG_INPUT_ATI_REMOTE is not set
687# CONFIG_INPUT_ATI_REMOTE2 is not set
688# CONFIG_INPUT_KEYSPAN_REMOTE is not set
689# CONFIG_INPUT_POWERMATE is not set
690# CONFIG_INPUT_YEALINK is not set
721# CONFIG_INPUT_UINPUT is not set 691# CONFIG_INPUT_UINPUT is not set
722# CONFIG_BF53X_PFBUTTONS is not set 692# CONFIG_BF53X_PFBUTTONS is not set
723CONFIG_TWI_KEYPAD=m 693CONFIG_TWI_KEYPAD=m
@@ -734,7 +704,7 @@ CONFIG_BFIN_TWIKEYPAD_IRQ_PFX=39
734# 704#
735# CONFIG_AD9960 is not set 705# CONFIG_AD9960 is not set
736# CONFIG_SPI_ADC_BF533 is not set 706# CONFIG_SPI_ADC_BF533 is not set
737# CONFIG_BF5xx_PFLAGS is not set 707# CONFIG_BFIN_PFLAGS is not set
738# CONFIG_BF5xx_PPIFCD is not set 708# CONFIG_BF5xx_PPIFCD is not set
739# CONFIG_BF5xx_TIMERS is not set 709# CONFIG_BF5xx_TIMERS is not set
740# CONFIG_BF5xx_PPI is not set 710# CONFIG_BF5xx_PPI is not set
@@ -777,10 +747,6 @@ CONFIG_UNIX98_PTYS=y
777# IPMI 747# IPMI
778# 748#
779# CONFIG_IPMI_HANDLER is not set 749# CONFIG_IPMI_HANDLER is not set
780
781#
782# Watchdog Cards
783#
784CONFIG_WATCHDOG=y 750CONFIG_WATCHDOG=y
785# CONFIG_WATCHDOG_NOWAYOUT is not set 751# CONFIG_WATCHDOG_NOWAYOUT is not set
786 752
@@ -792,7 +758,6 @@ CONFIG_BFIN_WDT=y
792CONFIG_HW_RANDOM=y 758CONFIG_HW_RANDOM=y
793# CONFIG_GEN_RTC is not set 759# CONFIG_GEN_RTC is not set
794CONFIG_BLACKFIN_DPMC=y 760CONFIG_BLACKFIN_DPMC=y
795# CONFIG_DTLK is not set
796# CONFIG_R3964 is not set 761# CONFIG_R3964 is not set
797# CONFIG_RAW_DRIVER is not set 762# CONFIG_RAW_DRIVER is not set
798 763
@@ -800,11 +765,8 @@ CONFIG_BLACKFIN_DPMC=y
800# TPM devices 765# TPM devices
801# 766#
802# CONFIG_TCG_TPM is not set 767# CONFIG_TCG_TPM is not set
803
804#
805# I2C support
806#
807CONFIG_I2C=m 768CONFIG_I2C=m
769CONFIG_I2C_BOARDINFO=y
808CONFIG_I2C_CHARDEV=m 770CONFIG_I2C_CHARDEV=m
809 771
810# 772#
@@ -818,10 +780,11 @@ CONFIG_I2C_ALGOBIT=m
818# I2C Hardware Bus support 780# I2C Hardware Bus support
819# 781#
820# CONFIG_I2C_BLACKFIN_GPIO is not set 782# CONFIG_I2C_BLACKFIN_GPIO is not set
783# CONFIG_I2C_GPIO is not set
821# CONFIG_I2C_OCORES is not set 784# CONFIG_I2C_OCORES is not set
822# CONFIG_I2C_PARPORT_LIGHT is not set 785# CONFIG_I2C_PARPORT_LIGHT is not set
786# CONFIG_I2C_SIMTEC is not set
823# CONFIG_I2C_STUB is not set 787# CONFIG_I2C_STUB is not set
824# CONFIG_I2C_PCA_ISA is not set
825 788
826# 789#
827# Miscellaneous I2C Chip support 790# Miscellaneous I2C Chip support
@@ -857,18 +820,16 @@ CONFIG_SPI_BFIN=y
857# SPI Protocol Masters 820# SPI Protocol Masters
858# 821#
859# CONFIG_SPI_AT25 is not set 822# CONFIG_SPI_AT25 is not set
823# CONFIG_SPI_SPIDEV is not set
860 824
861# 825#
862# Dallas's 1-wire bus 826# Dallas's 1-wire bus
863# 827#
864# CONFIG_W1 is not set 828# CONFIG_W1 is not set
865
866#
867# Hardware Monitoring support
868#
869CONFIG_HWMON=y 829CONFIG_HWMON=y
870# CONFIG_HWMON_VID is not set 830# CONFIG_HWMON_VID is not set
871# CONFIG_SENSORS_ABITUGURU is not set 831# CONFIG_SENSORS_ABITUGURU is not set
832# CONFIG_SENSORS_AD7418 is not set
872# CONFIG_SENSORS_ADM1021 is not set 833# CONFIG_SENSORS_ADM1021 is not set
873# CONFIG_SENSORS_ADM1025 is not set 834# CONFIG_SENSORS_ADM1025 is not set
874# CONFIG_SENSORS_ADM1026 is not set 835# CONFIG_SENSORS_ADM1026 is not set
@@ -896,6 +857,7 @@ CONFIG_HWMON=y
896# CONFIG_SENSORS_LM90 is not set 857# CONFIG_SENSORS_LM90 is not set
897# CONFIG_SENSORS_LM92 is not set 858# CONFIG_SENSORS_LM92 is not set
898# CONFIG_SENSORS_MAX1619 is not set 859# CONFIG_SENSORS_MAX1619 is not set
860# CONFIG_SENSORS_MAX6650 is not set
899# CONFIG_SENSORS_PC87360 is not set 861# CONFIG_SENSORS_PC87360 is not set
900# CONFIG_SENSORS_PC87427 is not set 862# CONFIG_SENSORS_PC87427 is not set
901# CONFIG_SENSORS_SMSC47M1 is not set 863# CONFIG_SENSORS_SMSC47M1 is not set
@@ -920,22 +882,30 @@ CONFIG_HWMON=y
920# Multimedia devices 882# Multimedia devices
921# 883#
922# CONFIG_VIDEO_DEV is not set 884# CONFIG_VIDEO_DEV is not set
885# CONFIG_DVB_CORE is not set
886CONFIG_DAB=y
923 887
924# 888#
925# Digital Video Broadcasting Devices 889# Graphics support
926# 890#
927# CONFIG_DVB is not set 891# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
928 892
929# 893#
930# Graphics support 894# Display device support
931# 895#
932# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 896# CONFIG_DISPLAY_SUPPORT is not set
897# CONFIG_VGASTATE is not set
933CONFIG_FB=m 898CONFIG_FB=m
934CONFIG_FIRMWARE_EDID=y 899CONFIG_FIRMWARE_EDID=y
935# CONFIG_FB_DDC is not set 900# CONFIG_FB_DDC is not set
936CONFIG_FB_CFB_FILLRECT=m 901CONFIG_FB_CFB_FILLRECT=m
937CONFIG_FB_CFB_COPYAREA=m 902CONFIG_FB_CFB_COPYAREA=m
938CONFIG_FB_CFB_IMAGEBLIT=m 903CONFIG_FB_CFB_IMAGEBLIT=m
904# CONFIG_FB_SYS_FILLRECT is not set
905# CONFIG_FB_SYS_COPYAREA is not set
906# CONFIG_FB_SYS_IMAGEBLIT is not set
907# CONFIG_FB_SYS_FOPS is not set
908CONFIG_FB_DEFERRED_IO=y
939# CONFIG_FB_SVGALIB is not set 909# CONFIG_FB_SVGALIB is not set
940# CONFIG_FB_MACMODES is not set 910# CONFIG_FB_MACMODES is not set
941# CONFIG_FB_BACKLIGHT is not set 911# CONFIG_FB_BACKLIGHT is not set
@@ -957,10 +927,6 @@ CONFIG_ADV7393_1XMEM=y
957# CONFIG_ADV7393_2XMEM is not set 927# CONFIG_ADV7393_2XMEM is not set
958# CONFIG_FB_S1D13XXX is not set 928# CONFIG_FB_S1D13XXX is not set
959# CONFIG_FB_VIRTUAL is not set 929# CONFIG_FB_VIRTUAL is not set
960
961#
962# Logo configuration
963#
964# CONFIG_LOGO is not set 930# CONFIG_LOGO is not set
965 931
966# 932#
@@ -1001,7 +967,6 @@ CONFIG_SND_BLACKFIN_AD1836_TDM=y
1001# CONFIG_SND_BLACKFIN_AD1836_I2S is not set 967# CONFIG_SND_BLACKFIN_AD1836_I2S is not set
1002CONFIG_SND_BLACKFIN_AD1836_MULSUB=y 968CONFIG_SND_BLACKFIN_AD1836_MULSUB=y
1003# CONFIG_SND_BLACKFIN_AD1836_5P1 is not set 969# CONFIG_SND_BLACKFIN_AD1836_5P1 is not set
1004CONFIG_SND_BLACKFIN_AD1981B=m
1005CONFIG_SND_BLACKFIN_SPORT=0 970CONFIG_SND_BLACKFIN_SPORT=0
1006CONFIG_SND_BLACKFIN_SPI_PFBIT=4 971CONFIG_SND_BLACKFIN_SPI_PFBIT=4
1007CONFIG_SND_BFIN_AD73311=m 972CONFIG_SND_BFIN_AD73311=m
@@ -1009,11 +974,16 @@ CONFIG_SND_BFIN_SPORT=0
1009CONFIG_SND_BFIN_AD73311_SE=4 974CONFIG_SND_BFIN_AD73311_SE=4
1010 975
1011# 976#
1012# SoC audio support 977# System on Chip audio support
1013# 978#
1014# CONFIG_SND_SOC is not set 979# CONFIG_SND_SOC is not set
1015 980
1016# 981#
982# SoC Audio for the ADI Blackfin
983#
984# CONFIG_SND_BF5XX_HAVE_COLD_RESET is not set
985
986#
1017# Open Sound System 987# Open Sound System
1018# 988#
1019# CONFIG_SOUND_PRIME is not set 989# CONFIG_SOUND_PRIME is not set
@@ -1033,18 +1003,17 @@ CONFIG_USB_ARCH_HAS_HCD=y
1033# CONFIG_USB is not set 1003# CONFIG_USB is not set
1034 1004
1035# 1005#
1036# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1006# Enable Host or Gadget support to see Inventra options
1037# 1007#
1038 1008
1039# 1009#
1040# USB Gadget Support 1010# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1041# 1011#
1042# CONFIG_USB_GADGET is not set
1043 1012
1044# 1013#
1045# MMC/SD Card support 1014# USB Gadget Support
1046# 1015#
1047# CONFIG_SPI_MMC is not set 1016# CONFIG_USB_GADGET is not set
1048# CONFIG_MMC is not set 1017# CONFIG_MMC is not set
1049 1018
1050# 1019#
@@ -1084,44 +1053,50 @@ CONFIG_RTC_INTF_SYSFS=y
1084CONFIG_RTC_INTF_PROC=y 1053CONFIG_RTC_INTF_PROC=y
1085CONFIG_RTC_INTF_DEV=y 1054CONFIG_RTC_INTF_DEV=y
1086# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 1055# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1056# CONFIG_RTC_DRV_TEST is not set
1087 1057
1088# 1058#
1089# RTC drivers 1059# I2C RTC drivers
1090# 1060#
1091# CONFIG_RTC_DRV_X1205 is not set
1092# CONFIG_RTC_DRV_DS1307 is not set 1061# CONFIG_RTC_DRV_DS1307 is not set
1093# CONFIG_RTC_DRV_DS1553 is not set
1094# CONFIG_RTC_DRV_ISL1208 is not set
1095# CONFIG_RTC_DRV_DS1672 is not set 1062# CONFIG_RTC_DRV_DS1672 is not set
1096# CONFIG_RTC_DRV_DS1742 is not set 1063# CONFIG_RTC_DRV_MAX6900 is not set
1064# CONFIG_RTC_DRV_RS5C372 is not set
1065# CONFIG_RTC_DRV_ISL1208 is not set
1066# CONFIG_RTC_DRV_X1205 is not set
1097# CONFIG_RTC_DRV_PCF8563 is not set 1067# CONFIG_RTC_DRV_PCF8563 is not set
1068# CONFIG_RTC_DRV_PCF8583 is not set
1069
1070#
1071# SPI RTC drivers
1072#
1098# CONFIG_RTC_DRV_RS5C348 is not set 1073# CONFIG_RTC_DRV_RS5C348 is not set
1099# CONFIG_RTC_DRV_RS5C372 is not set
1100# CONFIG_RTC_DRV_M48T86 is not set
1101# CONFIG_RTC_DRV_TEST is not set
1102# CONFIG_RTC_DRV_MAX6902 is not set 1074# CONFIG_RTC_DRV_MAX6902 is not set
1103# CONFIG_RTC_DRV_V3020 is not set
1104CONFIG_RTC_DRV_BFIN=y
1105 1075
1106# 1076#
1107# DMA Engine support 1077# Platform RTC drivers
1108# 1078#
1109# CONFIG_DMA_ENGINE is not set 1079# CONFIG_RTC_DRV_DS1553 is not set
1080# CONFIG_RTC_DRV_DS1742 is not set
1081# CONFIG_RTC_DRV_M48T86 is not set
1082# CONFIG_RTC_DRV_V3020 is not set
1110 1083
1111# 1084#
1112# DMA Clients 1085# on-CPU RTC drivers
1113# 1086#
1087CONFIG_RTC_DRV_BFIN=y
1114 1088
1115# 1089#
1116# DMA Devices 1090# DMA Engine support
1117# 1091#
1092# CONFIG_DMA_ENGINE is not set
1118 1093
1119# 1094#
1120# Auxiliary Display support 1095# DMA Clients
1121# 1096#
1122 1097
1123# 1098#
1124# Virtualization 1099# DMA Devices
1125# 1100#
1126 1101
1127# 1102#
@@ -1224,6 +1199,7 @@ CONFIG_LOCKD=m
1224CONFIG_LOCKD_V4=y 1199CONFIG_LOCKD_V4=y
1225CONFIG_NFS_COMMON=y 1200CONFIG_NFS_COMMON=y
1226CONFIG_SUNRPC=m 1201CONFIG_SUNRPC=m
1202# CONFIG_SUNRPC_BIND34 is not set
1227# CONFIG_RPCSEC_GSS_KRB5 is not set 1203# CONFIG_RPCSEC_GSS_KRB5 is not set
1228# CONFIG_RPCSEC_GSS_SPKM3 is not set 1204# CONFIG_RPCSEC_GSS_SPKM3 is not set
1229CONFIG_SMB_FS=m 1205CONFIG_SMB_FS=m
@@ -1301,14 +1277,20 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1301CONFIG_ENABLE_MUST_CHECK=y 1277CONFIG_ENABLE_MUST_CHECK=y
1302# CONFIG_MAGIC_SYSRQ is not set 1278# CONFIG_MAGIC_SYSRQ is not set
1303# CONFIG_UNUSED_SYMBOLS is not set 1279# CONFIG_UNUSED_SYMBOLS is not set
1304# CONFIG_DEBUG_FS is not set 1280CONFIG_DEBUG_FS=y
1305# CONFIG_HEADERS_CHECK is not set 1281# CONFIG_HEADERS_CHECK is not set
1306# CONFIG_DEBUG_KERNEL is not set 1282# CONFIG_DEBUG_KERNEL is not set
1307CONFIG_LOG_BUF_SHIFT=14
1308# CONFIG_DEBUG_BUGVERBOSE is not set 1283# CONFIG_DEBUG_BUGVERBOSE is not set
1309# CONFIG_DEBUG_SERIAL_EARLY_INIT is not set 1284CONFIG_DEBUG_MMRS=y
1310CONFIG_DEBUG_HUNT_FOR_ZERO=y 1285CONFIG_DEBUG_HUNT_FOR_ZERO=y
1286CONFIG_DEBUG_BFIN_HWTRACE_ON=y
1287CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
1288# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE is not set
1289# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_TWO is not set
1290CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0
1291# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set
1311# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 1292# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
1293CONFIG_EARLY_PRINTK=y
1312CONFIG_CPLB_INFO=y 1294CONFIG_CPLB_INFO=y
1313CONFIG_ACCESS_CHECK=y 1295CONFIG_ACCESS_CHECK=y
1314 1296
@@ -1331,6 +1313,7 @@ CONFIG_SECURITY_CAPABILITIES=m
1331CONFIG_BITREVERSE=y 1313CONFIG_BITREVERSE=y
1332CONFIG_CRC_CCITT=m 1314CONFIG_CRC_CCITT=m
1333# CONFIG_CRC16 is not set 1315# CONFIG_CRC16 is not set
1316# CONFIG_CRC_ITU_T is not set
1334CONFIG_CRC32=y 1317CONFIG_CRC32=y
1335# CONFIG_LIBCRC32C is not set 1318# CONFIG_LIBCRC32C is not set
1336CONFIG_ZLIB_INFLATE=y 1319CONFIG_ZLIB_INFLATE=y
@@ -1338,3 +1321,4 @@ CONFIG_ZLIB_DEFLATE=m
1338CONFIG_PLIST=y 1321CONFIG_PLIST=y
1339CONFIG_HAS_IOMEM=y 1322CONFIG_HAS_IOMEM=y
1340CONFIG_HAS_IOPORT=y 1323CONFIG_HAS_IOPORT=y
1324CONFIG_HAS_DMA=y
diff --git a/arch/blackfin/configs/BF537-STAMP_defconfig b/arch/blackfin/configs/BF537-STAMP_defconfig
index ccf09dc09a18..828b604438eb 100644
--- a/arch/blackfin/configs/BF537-STAMP_defconfig
+++ b/arch/blackfin/configs/BF537-STAMP_defconfig
@@ -1,6 +1,6 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21.5 3# Linux kernel version: 2.6.22.6
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
@@ -15,8 +15,9 @@ CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_HARDIRQS=y 15CONFIG_GENERIC_HARDIRQS=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17# CONFIG_GENERIC_TIME is not set 17# CONFIG_GENERIC_TIME is not set
18CONFIG_GENERIC_CALIBRATE_DELAY=y 18CONFIG_GENERIC_GPIO=y
19CONFIG_FORCE_MAX_ZONEORDER=14 19CONFIG_FORCE_MAX_ZONEORDER=14
20CONFIG_GENERIC_CALIBRATE_DELAY=y
20CONFIG_IRQCHIP_DEMUX_GPIO=y 21CONFIG_IRQCHIP_DEMUX_GPIO=y
21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 22CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
22 23
@@ -40,7 +41,9 @@ CONFIG_SYSVIPC_SYSCTL=y
40# CONFIG_TASKSTATS is not set 41# CONFIG_TASKSTATS is not set
41# CONFIG_UTS_NS is not set 42# CONFIG_UTS_NS is not set
42# CONFIG_AUDIT is not set 43# CONFIG_AUDIT is not set
43# CONFIG_IKCONFIG is not set 44CONFIG_IKCONFIG=y
45CONFIG_IKCONFIG_PROC=y
46CONFIG_LOG_BUF_SHIFT=14
44CONFIG_SYSFS_DEPRECATED=y 47CONFIG_SYSFS_DEPRECATED=y
45# CONFIG_RELAY is not set 48# CONFIG_RELAY is not set
46CONFIG_BLK_DEV_INITRD=y 49CONFIG_BLK_DEV_INITRD=y
@@ -58,15 +61,20 @@ CONFIG_BUG=y
58CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
59CONFIG_BASE_FULL=y 62CONFIG_BASE_FULL=y
60CONFIG_FUTEX=y 63CONFIG_FUTEX=y
64CONFIG_ANON_INODES=y
65CONFIG_EPOLL=y
66CONFIG_SIGNALFD=y
67CONFIG_TIMERFD=y
68CONFIG_EVENTFD=y
69CONFIG_VM_EVENT_COUNTERS=y
61CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 70CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3
62CONFIG_BUDDY=y
63# CONFIG_NP2 is not set 71# CONFIG_NP2 is not set
64CONFIG_SLAB=y 72CONFIG_SLAB=y
65CONFIG_VM_EVENT_COUNTERS=y 73# CONFIG_SLUB is not set
74# CONFIG_SLOB is not set
66CONFIG_RT_MUTEXES=y 75CONFIG_RT_MUTEXES=y
67CONFIG_TINY_SHMEM=y 76CONFIG_TINY_SHMEM=y
68CONFIG_BASE_SMALL=0 77CONFIG_BASE_SMALL=0
69# CONFIG_SLOB is not set
70 78
71# 79#
72# Loadable module support 80# Loadable module support
@@ -148,13 +156,6 @@ CONFIG_IRQ_PLL_WAKEUP=7
148# 156#
149 157
150# 158#
151# PORT F/G Selection
152#
153CONFIG_BF537_PORT_F=y
154# CONFIG_BF537_PORT_G is not set
155# CONFIG_BF537_PORT_H is not set
156
157#
158# Interrupt Priority Assignment 159# Interrupt Priority Assignment
159# 160#
160 161
@@ -199,19 +200,17 @@ CONFIG_IRQ_WATCH=13
199# CONFIG_CMDLINE_BOOL is not set 200# CONFIG_CMDLINE_BOOL is not set
200 201
201# 202#
202# Board Setup 203# Clock/PLL Setup
203# 204#
204CONFIG_CLKIN_HZ=25000000 205CONFIG_CLKIN_HZ=25000000
205CONFIG_MEM_SIZE=64 206# CONFIG_BFIN_KERNEL_CLOCK is not set
206CONFIG_MEM_ADD_WIDTH=10 207CONFIG_MAX_VCO_HZ=600000000
207CONFIG_BOOT_LOAD=0x1000 208CONFIG_MIN_VCO_HZ=50000000
208 209CONFIG_MAX_SCLK_HZ=133000000
209# 210CONFIG_MIN_SCLK_HZ=27000000
210# Blackfin Kernel Optimizations
211#
212 211
213# 212#
214# Timer Tick 213# Kernel Timer/Scheduler
215# 214#
216# CONFIG_HZ_100 is not set 215# CONFIG_HZ_100 is not set
217CONFIG_HZ_250=y 216CONFIG_HZ_250=y
@@ -220,6 +219,20 @@ CONFIG_HZ_250=y
220CONFIG_HZ=250 219CONFIG_HZ=250
221 220
222# 221#
222# Memory Setup
223#
224CONFIG_MEM_SIZE=64
225CONFIG_MEM_ADD_WIDTH=10
226CONFIG_BOOT_LOAD=0x1000
227CONFIG_BFIN_SCRATCH_REG_RETN=y
228# CONFIG_BFIN_SCRATCH_REG_RETE is not set
229# CONFIG_BFIN_SCRATCH_REG_CYCLES is not set
230
231#
232# Blackfin Kernel Optimizations
233#
234
235#
223# Memory Optimizations 236# Memory Optimizations
224# 237#
225CONFIG_I_ENTRY_L1=y 238CONFIG_I_ENTRY_L1=y
@@ -258,20 +271,15 @@ CONFIG_DMA_UNCACHED_1M=y
258# 271#
259# Cache Support 272# Cache Support
260# 273#
261CONFIG_BLKFIN_CACHE=y 274CONFIG_BFIN_ICACHE=y
262CONFIG_BLKFIN_DCACHE=y 275CONFIG_BFIN_DCACHE=y
263# CONFIG_BLKFIN_DCACHE_BANKA is not set 276# CONFIG_BFIN_DCACHE_BANKA is not set
264# CONFIG_BLKFIN_CACHE_LOCK is not set 277# CONFIG_BFIN_ICACHE_LOCK is not set
265# CONFIG_BLKFIN_WB is not set 278# CONFIG_BFIN_WB is not set
266CONFIG_BLKFIN_WT=y 279CONFIG_BFIN_WT=y
267CONFIG_L1_MAX_PIECE=16 280CONFIG_L1_MAX_PIECE=16
268 281
269# 282#
270# Clock Settings
271#
272# CONFIG_BFIN_KERNEL_CLOCK is not set
273
274#
275# Asynchonous Memory Configuration 283# Asynchonous Memory Configuration
276# 284#
277 285
@@ -298,6 +306,7 @@ CONFIG_BANK_3=0x99B3
298# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 306# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
299# 307#
300# CONFIG_PCI is not set 308# CONFIG_PCI is not set
309# CONFIG_ARCH_SUPPORTS_MSI is not set
301 310
302# 311#
303# PCCARD (PCMCIA/CardBus) support 312# PCCARD (PCMCIA/CardBus) support
@@ -305,10 +314,6 @@ CONFIG_BANK_3=0x99B3
305# CONFIG_PCCARD is not set 314# CONFIG_PCCARD is not set
306 315
307# 316#
308# PCI Hotplug Support
309#
310
311#
312# Executable file formats 317# Executable file formats
313# 318#
314CONFIG_BINFMT_ELF_FDPIC=y 319CONFIG_BINFMT_ELF_FDPIC=y
@@ -342,7 +347,6 @@ CONFIG_NET=y
342# 347#
343# Networking options 348# Networking options
344# 349#
345# CONFIG_NETDEBUG is not set
346CONFIG_PACKET=y 350CONFIG_PACKET=y
347# CONFIG_PACKET_MMAP is not set 351# CONFIG_PACKET_MMAP is not set
348CONFIG_UNIX=y 352CONFIG_UNIX=y
@@ -383,20 +387,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
383# CONFIG_NETLABEL is not set 387# CONFIG_NETLABEL is not set
384# CONFIG_NETWORK_SECMARK is not set 388# CONFIG_NETWORK_SECMARK is not set
385# CONFIG_NETFILTER is not set 389# CONFIG_NETFILTER is not set
386
387#
388# DCCP Configuration (EXPERIMENTAL)
389#
390# CONFIG_IP_DCCP is not set 390# CONFIG_IP_DCCP is not set
391
392#
393# SCTP Configuration (EXPERIMENTAL)
394#
395# CONFIG_IP_SCTP is not set 391# CONFIG_IP_SCTP is not set
396
397#
398# TIPC Configuration (EXPERIMENTAL)
399#
400# CONFIG_TIPC is not set 392# CONFIG_TIPC is not set
401# CONFIG_ATM is not set 393# CONFIG_ATM is not set
402# CONFIG_BRIDGE is not set 394# CONFIG_BRIDGE is not set
@@ -463,7 +455,16 @@ CONFIG_IRTTY_SIR=m
463# FIR device drivers 455# FIR device drivers
464# 456#
465# CONFIG_BT is not set 457# CONFIG_BT is not set
458# CONFIG_AF_RXRPC is not set
459
460#
461# Wireless
462#
463# CONFIG_CFG80211 is not set
464# CONFIG_WIRELESS_EXT is not set
465# CONFIG_MAC80211 is not set
466# CONFIG_IEEE80211 is not set 466# CONFIG_IEEE80211 is not set
467# CONFIG_RFKILL is not set
467 468
468# 469#
469# Device Drivers 470# Device Drivers
@@ -481,10 +482,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
481# Connector - unified userspace <-> kernelspace linker 482# Connector - unified userspace <-> kernelspace linker
482# 483#
483# CONFIG_CONNECTOR is not set 484# CONFIG_CONNECTOR is not set
484
485#
486# Memory Technology Devices (MTD)
487#
488CONFIG_MTD=y 485CONFIG_MTD=y
489# CONFIG_MTD_DEBUG is not set 486# CONFIG_MTD_DEBUG is not set
490# CONFIG_MTD_CONCAT is not set 487# CONFIG_MTD_CONCAT is not set
@@ -528,7 +525,6 @@ CONFIG_MTD_MW320D=m
528CONFIG_MTD_RAM=y 525CONFIG_MTD_RAM=y
529CONFIG_MTD_ROM=m 526CONFIG_MTD_ROM=m
530# CONFIG_MTD_ABSENT is not set 527# CONFIG_MTD_ABSENT is not set
531# CONFIG_MTD_OBSOLETE_CHIPS is not set
532 528
533# 529#
534# Mapping drivers for chip access 530# Mapping drivers for chip access
@@ -565,13 +561,10 @@ CONFIG_BFIN_FLASH_BANK_3=0x7BB0
565# CONFIG_MTD_DOC2000 is not set 561# CONFIG_MTD_DOC2000 is not set
566# CONFIG_MTD_DOC2001 is not set 562# CONFIG_MTD_DOC2001 is not set
567# CONFIG_MTD_DOC2001PLUS is not set 563# CONFIG_MTD_DOC2001PLUS is not set
568
569#
570# NAND Flash Device Drivers
571#
572CONFIG_MTD_NAND=m 564CONFIG_MTD_NAND=m
573# CONFIG_MTD_NAND_VERIFY_WRITE is not set 565# CONFIG_MTD_NAND_VERIFY_WRITE is not set
574# CONFIG_MTD_NAND_ECC_SMC is not set 566# CONFIG_MTD_NAND_ECC_SMC is not set
567# CONFIG_MTD_NAND_MUSEUM_IDS is not set
575CONFIG_MTD_NAND_BFIN=m 568CONFIG_MTD_NAND_BFIN=m
576CONFIG_BFIN_NAND_BASE=0x20212000 569CONFIG_BFIN_NAND_BASE=0x20212000
577CONFIG_BFIN_NAND_CLE=2 570CONFIG_BFIN_NAND_CLE=2
@@ -580,11 +573,13 @@ CONFIG_BFIN_NAND_READY=3
580CONFIG_MTD_NAND_IDS=m 573CONFIG_MTD_NAND_IDS=m
581# CONFIG_MTD_NAND_DISKONCHIP is not set 574# CONFIG_MTD_NAND_DISKONCHIP is not set
582# CONFIG_MTD_NAND_NANDSIM is not set 575# CONFIG_MTD_NAND_NANDSIM is not set
576# CONFIG_MTD_NAND_PLATFORM is not set
577# CONFIG_MTD_ONENAND is not set
583 578
584# 579#
585# OneNAND Flash Device Drivers 580# UBI - Unsorted block images
586# 581#
587# CONFIG_MTD_ONENAND is not set 582# CONFIG_MTD_UBI is not set
588 583
589# 584#
590# Parallel port support 585# Parallel port support
@@ -612,10 +607,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
612# 607#
613# Misc devices 608# Misc devices
614# 609#
615
616#
617# ATA/ATAPI/MFM/RLL support
618#
619# CONFIG_IDE is not set 610# CONFIG_IDE is not set
620 611
621# 612#
@@ -624,10 +615,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
624# CONFIG_RAID_ATTRS is not set 615# CONFIG_RAID_ATTRS is not set
625# CONFIG_SCSI is not set 616# CONFIG_SCSI is not set
626# CONFIG_SCSI_NETLINK is not set 617# CONFIG_SCSI_NETLINK is not set
627
628#
629# Serial ATA (prod) and Parallel ATA (experimental) drivers
630#
631# CONFIG_ATA is not set 618# CONFIG_ATA is not set
632 619
633# 620#
@@ -636,19 +623,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
636# CONFIG_MD is not set 623# CONFIG_MD is not set
637 624
638# 625#
639# Fusion MPT device support
640#
641# CONFIG_FUSION is not set
642
643#
644# IEEE 1394 (FireWire) support
645#
646
647#
648# I2O device support
649#
650
651#
652# Network device support 626# Network device support
653# 627#
654CONFIG_NETDEVICES=y 628CONFIG_NETDEVICES=y
@@ -656,11 +630,20 @@ CONFIG_NETDEVICES=y
656# CONFIG_BONDING is not set 630# CONFIG_BONDING is not set
657# CONFIG_EQUALIZER is not set 631# CONFIG_EQUALIZER is not set
658# CONFIG_TUN is not set 632# CONFIG_TUN is not set
633CONFIG_PHYLIB=y
659 634
660# 635#
661# PHY device support 636# MII PHY device drivers
662# 637#
663# CONFIG_PHYLIB is not set 638# CONFIG_MARVELL_PHY is not set
639# CONFIG_DAVICOM_PHY is not set
640# CONFIG_QSEMI_PHY is not set
641# CONFIG_LXT_PHY is not set
642# CONFIG_CICADA_PHY is not set
643# CONFIG_VITESSE_PHY is not set
644CONFIG_SMSC_PHY=y
645# CONFIG_BROADCOM_PHY is not set
646# CONFIG_FIXED_PHY is not set
664 647
665# 648#
666# Ethernet (10 or 100Mbit) 649# Ethernet (10 or 100Mbit)
@@ -674,27 +657,15 @@ CONFIG_BFIN_TX_DESC_NUM=10
674CONFIG_BFIN_RX_DESC_NUM=20 657CONFIG_BFIN_RX_DESC_NUM=20
675# CONFIG_BFIN_MAC_RMII is not set 658# CONFIG_BFIN_MAC_RMII is not set
676# CONFIG_SMSC911X is not set 659# CONFIG_SMSC911X is not set
660# CONFIG_DM9000 is not set
661CONFIG_NETDEV_1000=y
662CONFIG_NETDEV_10000=y
677 663
678# 664#
679# Ethernet (1000 Mbit) 665# Wireless LAN
680#
681
682#
683# Ethernet (10000 Mbit)
684#
685
686#
687# Token Ring devices
688#
689
690#
691# Wireless LAN (non-hamradio)
692#
693# CONFIG_NET_RADIO is not set
694
695#
696# Wan interfaces
697# 666#
667# CONFIG_WLAN_PRE80211 is not set
668# CONFIG_WLAN_80211 is not set
698# CONFIG_WAN is not set 669# CONFIG_WAN is not set
699# CONFIG_PPP is not set 670# CONFIG_PPP is not set
700# CONFIG_SLIP is not set 671# CONFIG_SLIP is not set
@@ -718,6 +689,7 @@ CONFIG_BFIN_RX_DESC_NUM=20
718# 689#
719CONFIG_INPUT=y 690CONFIG_INPUT=y
720# CONFIG_INPUT_FF_MEMLESS is not set 691# CONFIG_INPUT_FF_MEMLESS is not set
692# CONFIG_INPUT_POLLDEV is not set
721 693
722# 694#
723# Userland interfaces 695# Userland interfaces
@@ -734,8 +706,14 @@ CONFIG_INPUT_EVDEV=m
734# CONFIG_INPUT_KEYBOARD is not set 706# CONFIG_INPUT_KEYBOARD is not set
735# CONFIG_INPUT_MOUSE is not set 707# CONFIG_INPUT_MOUSE is not set
736# CONFIG_INPUT_JOYSTICK is not set 708# CONFIG_INPUT_JOYSTICK is not set
709# CONFIG_INPUT_TABLET is not set
737# CONFIG_INPUT_TOUCHSCREEN is not set 710# CONFIG_INPUT_TOUCHSCREEN is not set
738CONFIG_INPUT_MISC=y 711CONFIG_INPUT_MISC=y
712# CONFIG_INPUT_ATI_REMOTE is not set
713# CONFIG_INPUT_ATI_REMOTE2 is not set
714# CONFIG_INPUT_KEYSPAN_REMOTE is not set
715# CONFIG_INPUT_POWERMATE is not set
716# CONFIG_INPUT_YEALINK is not set
739# CONFIG_INPUT_UINPUT is not set 717# CONFIG_INPUT_UINPUT is not set
740# CONFIG_BF53X_PFBUTTONS is not set 718# CONFIG_BF53X_PFBUTTONS is not set
741CONFIG_TWI_KEYPAD=m 719CONFIG_TWI_KEYPAD=m
@@ -752,7 +730,7 @@ CONFIG_BFIN_TWIKEYPAD_IRQ_PFX=72
752# 730#
753# CONFIG_AD9960 is not set 731# CONFIG_AD9960 is not set
754# CONFIG_SPI_ADC_BF533 is not set 732# CONFIG_SPI_ADC_BF533 is not set
755# CONFIG_BF5xx_PFLAGS is not set 733# CONFIG_BFIN_PFLAGS is not set
756# CONFIG_BF5xx_PPIFCD is not set 734# CONFIG_BF5xx_PPIFCD is not set
757# CONFIG_BF5xx_TIMERS is not set 735# CONFIG_BF5xx_TIMERS is not set
758# CONFIG_BF5xx_PPI is not set 736# CONFIG_BF5xx_PPI is not set
@@ -803,10 +781,6 @@ CONFIG_CAN_BLACKFIN=m
803# IPMI 781# IPMI
804# 782#
805# CONFIG_IPMI_HANDLER is not set 783# CONFIG_IPMI_HANDLER is not set
806
807#
808# Watchdog Cards
809#
810CONFIG_WATCHDOG=y 784CONFIG_WATCHDOG=y
811# CONFIG_WATCHDOG_NOWAYOUT is not set 785# CONFIG_WATCHDOG_NOWAYOUT is not set
812 786
@@ -818,7 +792,6 @@ CONFIG_BFIN_WDT=y
818CONFIG_HW_RANDOM=y 792CONFIG_HW_RANDOM=y
819# CONFIG_GEN_RTC is not set 793# CONFIG_GEN_RTC is not set
820CONFIG_BLACKFIN_DPMC=y 794CONFIG_BLACKFIN_DPMC=y
821# CONFIG_DTLK is not set
822# CONFIG_R3964 is not set 795# CONFIG_R3964 is not set
823# CONFIG_RAW_DRIVER is not set 796# CONFIG_RAW_DRIVER is not set
824 797
@@ -826,11 +799,8 @@ CONFIG_BLACKFIN_DPMC=y
826# TPM devices 799# TPM devices
827# 800#
828# CONFIG_TCG_TPM is not set 801# CONFIG_TCG_TPM is not set
829
830#
831# I2C support
832#
833CONFIG_I2C=m 802CONFIG_I2C=m
803CONFIG_I2C_BOARDINFO=y
834CONFIG_I2C_CHARDEV=m 804CONFIG_I2C_CHARDEV=m
835 805
836# 806#
@@ -846,10 +816,11 @@ CONFIG_I2C_CHARDEV=m
846# CONFIG_I2C_BLACKFIN_GPIO is not set 816# CONFIG_I2C_BLACKFIN_GPIO is not set
847CONFIG_I2C_BLACKFIN_TWI=m 817CONFIG_I2C_BLACKFIN_TWI=m
848CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=50 818CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=50
819# CONFIG_I2C_GPIO is not set
849# CONFIG_I2C_OCORES is not set 820# CONFIG_I2C_OCORES is not set
850# CONFIG_I2C_PARPORT_LIGHT is not set 821# CONFIG_I2C_PARPORT_LIGHT is not set
822# CONFIG_I2C_SIMTEC is not set
851# CONFIG_I2C_STUB is not set 823# CONFIG_I2C_STUB is not set
852# CONFIG_I2C_PCA_ISA is not set
853 824
854# 825#
855# Miscellaneous I2C Chip support 826# Miscellaneous I2C Chip support
@@ -885,18 +856,16 @@ CONFIG_SPI_BFIN=y
885# SPI Protocol Masters 856# SPI Protocol Masters
886# 857#
887# CONFIG_SPI_AT25 is not set 858# CONFIG_SPI_AT25 is not set
859# CONFIG_SPI_SPIDEV is not set
888 860
889# 861#
890# Dallas's 1-wire bus 862# Dallas's 1-wire bus
891# 863#
892# CONFIG_W1 is not set 864# CONFIG_W1 is not set
893
894#
895# Hardware Monitoring support
896#
897CONFIG_HWMON=y 865CONFIG_HWMON=y
898# CONFIG_HWMON_VID is not set 866# CONFIG_HWMON_VID is not set
899# CONFIG_SENSORS_ABITUGURU is not set 867# CONFIG_SENSORS_ABITUGURU is not set
868# CONFIG_SENSORS_AD7418 is not set
900# CONFIG_SENSORS_ADM1021 is not set 869# CONFIG_SENSORS_ADM1021 is not set
901# CONFIG_SENSORS_ADM1025 is not set 870# CONFIG_SENSORS_ADM1025 is not set
902# CONFIG_SENSORS_ADM1026 is not set 871# CONFIG_SENSORS_ADM1026 is not set
@@ -924,6 +893,7 @@ CONFIG_HWMON=y
924# CONFIG_SENSORS_LM90 is not set 893# CONFIG_SENSORS_LM90 is not set
925# CONFIG_SENSORS_LM92 is not set 894# CONFIG_SENSORS_LM92 is not set
926# CONFIG_SENSORS_MAX1619 is not set 895# CONFIG_SENSORS_MAX1619 is not set
896# CONFIG_SENSORS_MAX6650 is not set
927# CONFIG_SENSORS_PC87360 is not set 897# CONFIG_SENSORS_PC87360 is not set
928# CONFIG_SENSORS_PC87427 is not set 898# CONFIG_SENSORS_PC87427 is not set
929# CONFIG_SENSORS_SMSC47M1 is not set 899# CONFIG_SENSORS_SMSC47M1 is not set
@@ -948,11 +918,8 @@ CONFIG_HWMON=y
948# Multimedia devices 918# Multimedia devices
949# 919#
950# CONFIG_VIDEO_DEV is not set 920# CONFIG_VIDEO_DEV is not set
951 921# CONFIG_DVB_CORE is not set
952# 922CONFIG_DAB=y
953# Digital Video Broadcasting Devices
954#
955# CONFIG_DVB is not set
956 923
957# 924#
958# Graphics support 925# Graphics support
@@ -960,12 +927,23 @@ CONFIG_HWMON=y
960CONFIG_BACKLIGHT_LCD_SUPPORT=y 927CONFIG_BACKLIGHT_LCD_SUPPORT=y
961CONFIG_BACKLIGHT_CLASS_DEVICE=m 928CONFIG_BACKLIGHT_CLASS_DEVICE=m
962CONFIG_LCD_CLASS_DEVICE=m 929CONFIG_LCD_CLASS_DEVICE=m
930
931#
932# Display device support
933#
934# CONFIG_DISPLAY_SUPPORT is not set
935# CONFIG_VGASTATE is not set
963CONFIG_FB=m 936CONFIG_FB=m
964CONFIG_FIRMWARE_EDID=y 937CONFIG_FIRMWARE_EDID=y
965# CONFIG_FB_DDC is not set 938# CONFIG_FB_DDC is not set
966CONFIG_FB_CFB_FILLRECT=m 939CONFIG_FB_CFB_FILLRECT=m
967CONFIG_FB_CFB_COPYAREA=m 940CONFIG_FB_CFB_COPYAREA=m
968CONFIG_FB_CFB_IMAGEBLIT=m 941CONFIG_FB_CFB_IMAGEBLIT=m
942# CONFIG_FB_SYS_FILLRECT is not set
943# CONFIG_FB_SYS_COPYAREA is not set
944# CONFIG_FB_SYS_IMAGEBLIT is not set
945# CONFIG_FB_SYS_FOPS is not set
946CONFIG_FB_DEFERRED_IO=y
969# CONFIG_FB_SVGALIB is not set 947# CONFIG_FB_SVGALIB is not set
970# CONFIG_FB_MACMODES is not set 948# CONFIG_FB_MACMODES is not set
971# CONFIG_FB_BACKLIGHT is not set 949# CONFIG_FB_BACKLIGHT is not set
@@ -991,10 +969,6 @@ CONFIG_LQ035_SLAVE_ADDR=0x58
991# CONFIG_FB_BFIN_BGR is not set 969# CONFIG_FB_BFIN_BGR is not set
992# CONFIG_FB_S1D13XXX is not set 970# CONFIG_FB_S1D13XXX is not set
993# CONFIG_FB_VIRTUAL is not set 971# CONFIG_FB_VIRTUAL is not set
994
995#
996# Logo configuration
997#
998# CONFIG_LOGO is not set 972# CONFIG_LOGO is not set
999 973
1000# 974#
@@ -1035,7 +1009,6 @@ CONFIG_SND_BLACKFIN_AD1836_TDM=y
1035# CONFIG_SND_BLACKFIN_AD1836_I2S is not set 1009# CONFIG_SND_BLACKFIN_AD1836_I2S is not set
1036CONFIG_SND_BLACKFIN_AD1836_MULSUB=y 1010CONFIG_SND_BLACKFIN_AD1836_MULSUB=y
1037# CONFIG_SND_BLACKFIN_AD1836_5P1 is not set 1011# CONFIG_SND_BLACKFIN_AD1836_5P1 is not set
1038CONFIG_SND_BLACKFIN_AD1981B=m
1039CONFIG_SND_BLACKFIN_SPORT=0 1012CONFIG_SND_BLACKFIN_SPORT=0
1040CONFIG_SND_BLACKFIN_SPI_PFBIT=4 1013CONFIG_SND_BLACKFIN_SPI_PFBIT=4
1041CONFIG_SND_BFIN_AD73311=m 1014CONFIG_SND_BFIN_AD73311=m
@@ -1043,11 +1016,16 @@ CONFIG_SND_BFIN_SPORT=0
1043CONFIG_SND_BFIN_AD73311_SE=4 1016CONFIG_SND_BFIN_AD73311_SE=4
1044 1017
1045# 1018#
1046# SoC audio support 1019# System on Chip audio support
1047# 1020#
1048# CONFIG_SND_SOC is not set 1021# CONFIG_SND_SOC is not set
1049 1022
1050# 1023#
1024# SoC Audio for the ADI Blackfin
1025#
1026# CONFIG_SND_BF5XX_HAVE_COLD_RESET is not set
1027
1028#
1051# Open Sound System 1029# Open Sound System
1052# 1030#
1053# CONFIG_SOUND_PRIME is not set 1031# CONFIG_SOUND_PRIME is not set
@@ -1067,18 +1045,17 @@ CONFIG_USB_ARCH_HAS_HCD=y
1067# CONFIG_USB is not set 1045# CONFIG_USB is not set
1068 1046
1069# 1047#
1070# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1048# Enable Host or Gadget support to see Inventra options
1071# 1049#
1072 1050
1073# 1051#
1074# USB Gadget Support 1052# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1075# 1053#
1076# CONFIG_USB_GADGET is not set
1077 1054
1078# 1055#
1079# MMC/SD Card support 1056# USB Gadget Support
1080# 1057#
1081# CONFIG_SPI_MMC is not set 1058# CONFIG_USB_GADGET is not set
1082# CONFIG_MMC is not set 1059# CONFIG_MMC is not set
1083 1060
1084# 1061#
@@ -1118,44 +1095,50 @@ CONFIG_RTC_INTF_SYSFS=y
1118CONFIG_RTC_INTF_PROC=y 1095CONFIG_RTC_INTF_PROC=y
1119CONFIG_RTC_INTF_DEV=y 1096CONFIG_RTC_INTF_DEV=y
1120# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 1097# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1098# CONFIG_RTC_DRV_TEST is not set
1121 1099
1122# 1100#
1123# RTC drivers 1101# I2C RTC drivers
1124# 1102#
1125# CONFIG_RTC_DRV_X1205 is not set
1126# CONFIG_RTC_DRV_DS1307 is not set 1103# CONFIG_RTC_DRV_DS1307 is not set
1127# CONFIG_RTC_DRV_DS1553 is not set
1128# CONFIG_RTC_DRV_ISL1208 is not set
1129# CONFIG_RTC_DRV_DS1672 is not set 1104# CONFIG_RTC_DRV_DS1672 is not set
1130# CONFIG_RTC_DRV_DS1742 is not set 1105# CONFIG_RTC_DRV_MAX6900 is not set
1106# CONFIG_RTC_DRV_RS5C372 is not set
1107# CONFIG_RTC_DRV_ISL1208 is not set
1108# CONFIG_RTC_DRV_X1205 is not set
1131# CONFIG_RTC_DRV_PCF8563 is not set 1109# CONFIG_RTC_DRV_PCF8563 is not set
1110# CONFIG_RTC_DRV_PCF8583 is not set
1111
1112#
1113# SPI RTC drivers
1114#
1132# CONFIG_RTC_DRV_RS5C348 is not set 1115# CONFIG_RTC_DRV_RS5C348 is not set
1133# CONFIG_RTC_DRV_RS5C372 is not set
1134# CONFIG_RTC_DRV_M48T86 is not set
1135# CONFIG_RTC_DRV_TEST is not set
1136# CONFIG_RTC_DRV_MAX6902 is not set 1116# CONFIG_RTC_DRV_MAX6902 is not set
1137# CONFIG_RTC_DRV_V3020 is not set
1138CONFIG_RTC_DRV_BFIN=y
1139 1117
1140# 1118#
1141# DMA Engine support 1119# Platform RTC drivers
1142# 1120#
1143# CONFIG_DMA_ENGINE is not set 1121# CONFIG_RTC_DRV_DS1553 is not set
1122# CONFIG_RTC_DRV_DS1742 is not set
1123# CONFIG_RTC_DRV_M48T86 is not set
1124# CONFIG_RTC_DRV_V3020 is not set
1144 1125
1145# 1126#
1146# DMA Clients 1127# on-CPU RTC drivers
1147# 1128#
1129CONFIG_RTC_DRV_BFIN=y
1148 1130
1149# 1131#
1150# DMA Devices 1132# DMA Engine support
1151# 1133#
1134# CONFIG_DMA_ENGINE is not set
1152 1135
1153# 1136#
1154# Auxiliary Display support 1137# DMA Clients
1155# 1138#
1156 1139
1157# 1140#
1158# Virtualization 1141# DMA Devices
1159# 1142#
1160 1143
1161# 1144#
@@ -1258,6 +1241,7 @@ CONFIG_LOCKD=m
1258CONFIG_LOCKD_V4=y 1241CONFIG_LOCKD_V4=y
1259CONFIG_NFS_COMMON=y 1242CONFIG_NFS_COMMON=y
1260CONFIG_SUNRPC=m 1243CONFIG_SUNRPC=m
1244# CONFIG_SUNRPC_BIND34 is not set
1261# CONFIG_RPCSEC_GSS_KRB5 is not set 1245# CONFIG_RPCSEC_GSS_KRB5 is not set
1262# CONFIG_RPCSEC_GSS_SPKM3 is not set 1246# CONFIG_RPCSEC_GSS_SPKM3 is not set
1263CONFIG_SMB_FS=m 1247CONFIG_SMB_FS=m
@@ -1335,14 +1319,20 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1335CONFIG_ENABLE_MUST_CHECK=y 1319CONFIG_ENABLE_MUST_CHECK=y
1336# CONFIG_MAGIC_SYSRQ is not set 1320# CONFIG_MAGIC_SYSRQ is not set
1337# CONFIG_UNUSED_SYMBOLS is not set 1321# CONFIG_UNUSED_SYMBOLS is not set
1338# CONFIG_DEBUG_FS is not set 1322CONFIG_DEBUG_FS=y
1339# CONFIG_HEADERS_CHECK is not set 1323# CONFIG_HEADERS_CHECK is not set
1340# CONFIG_DEBUG_KERNEL is not set 1324# CONFIG_DEBUG_KERNEL is not set
1341CONFIG_LOG_BUF_SHIFT=14
1342# CONFIG_DEBUG_BUGVERBOSE is not set 1325# CONFIG_DEBUG_BUGVERBOSE is not set
1343# CONFIG_DEBUG_SERIAL_EARLY_INIT is not set 1326CONFIG_DEBUG_MMRS=y
1344CONFIG_DEBUG_HUNT_FOR_ZERO=y 1327CONFIG_DEBUG_HUNT_FOR_ZERO=y
1328CONFIG_DEBUG_BFIN_HWTRACE_ON=y
1329CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
1330# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE is not set
1331# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_TWO is not set
1332CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0
1333# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set
1345# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 1334# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
1335CONFIG_EARLY_PRINTK=y
1346CONFIG_CPLB_INFO=y 1336CONFIG_CPLB_INFO=y
1347CONFIG_ACCESS_CHECK=y 1337CONFIG_ACCESS_CHECK=y
1348 1338
@@ -1365,6 +1355,7 @@ CONFIG_SECURITY_CAPABILITIES=m
1365CONFIG_BITREVERSE=y 1355CONFIG_BITREVERSE=y
1366CONFIG_CRC_CCITT=m 1356CONFIG_CRC_CCITT=m
1367# CONFIG_CRC16 is not set 1357# CONFIG_CRC16 is not set
1358# CONFIG_CRC_ITU_T is not set
1368CONFIG_CRC32=y 1359CONFIG_CRC32=y
1369# CONFIG_LIBCRC32C is not set 1360# CONFIG_LIBCRC32C is not set
1370CONFIG_ZLIB_INFLATE=y 1361CONFIG_ZLIB_INFLATE=y
@@ -1372,3 +1363,4 @@ CONFIG_ZLIB_DEFLATE=m
1372CONFIG_PLIST=y 1363CONFIG_PLIST=y
1373CONFIG_HAS_IOMEM=y 1364CONFIG_HAS_IOMEM=y
1374CONFIG_HAS_IOPORT=y 1365CONFIG_HAS_IOPORT=y
1366CONFIG_HAS_DMA=y
diff --git a/arch/blackfin/configs/BF548-EZKIT_defconfig b/arch/blackfin/configs/BF548-EZKIT_defconfig
index ac8390fafa9c..e80f3d59c283 100644
--- a/arch/blackfin/configs/BF548-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF548-EZKIT_defconfig
@@ -1,6 +1,6 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21.5 3# Linux kernel version: 2.6.22.6
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
@@ -15,8 +15,9 @@ CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_HARDIRQS=y 15CONFIG_GENERIC_HARDIRQS=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17# CONFIG_GENERIC_TIME is not set 17# CONFIG_GENERIC_TIME is not set
18CONFIG_GENERIC_CALIBRATE_DELAY=y 18CONFIG_GENERIC_GPIO=y
19CONFIG_FORCE_MAX_ZONEORDER=14 19CONFIG_FORCE_MAX_ZONEORDER=14
20CONFIG_GENERIC_CALIBRATE_DELAY=y
20CONFIG_IRQCHIP_DEMUX_GPIO=y 21CONFIG_IRQCHIP_DEMUX_GPIO=y
21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 22CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
22 23
@@ -40,7 +41,9 @@ CONFIG_SYSVIPC_SYSCTL=y
40# CONFIG_TASKSTATS is not set 41# CONFIG_TASKSTATS is not set
41# CONFIG_UTS_NS is not set 42# CONFIG_UTS_NS is not set
42# CONFIG_AUDIT is not set 43# CONFIG_AUDIT is not set
43# CONFIG_IKCONFIG is not set 44CONFIG_IKCONFIG=y
45CONFIG_IKCONFIG_PROC=y
46CONFIG_LOG_BUF_SHIFT=14
44CONFIG_SYSFS_DEPRECATED=y 47CONFIG_SYSFS_DEPRECATED=y
45# CONFIG_RELAY is not set 48# CONFIG_RELAY is not set
46CONFIG_BLK_DEV_INITRD=y 49CONFIG_BLK_DEV_INITRD=y
@@ -51,7 +54,6 @@ CONFIG_EMBEDDED=y
51CONFIG_UID16=y 54CONFIG_UID16=y
52CONFIG_SYSCTL_SYSCALL=y 55CONFIG_SYSCTL_SYSCALL=y
53CONFIG_KALLSYMS=y 56CONFIG_KALLSYMS=y
54# CONFIG_KALLSYMS_ALL is not set
55# CONFIG_KALLSYMS_EXTRA_PASS is not set 57# CONFIG_KALLSYMS_EXTRA_PASS is not set
56CONFIG_HOTPLUG=y 58CONFIG_HOTPLUG=y
57CONFIG_PRINTK=y 59CONFIG_PRINTK=y
@@ -59,14 +61,20 @@ CONFIG_BUG=y
59CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
60CONFIG_BASE_FULL=y 62CONFIG_BASE_FULL=y
61CONFIG_FUTEX=y 63CONFIG_FUTEX=y
64CONFIG_ANON_INODES=y
65CONFIG_EPOLL=y
66CONFIG_SIGNALFD=y
67CONFIG_TIMERFD=y
68CONFIG_EVENTFD=y
69CONFIG_VM_EVENT_COUNTERS=y
62CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 70CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3
63# CONFIG_NP2 is not set 71# CONFIG_NP2 is not set
64CONFIG_SLAB=y 72CONFIG_SLAB=y
65CONFIG_VM_EVENT_COUNTERS=y 73# CONFIG_SLUB is not set
74# CONFIG_SLOB is not set
66CONFIG_RT_MUTEXES=y 75CONFIG_RT_MUTEXES=y
67CONFIG_TINY_SHMEM=y 76CONFIG_TINY_SHMEM=y
68CONFIG_BASE_SMALL=0 77CONFIG_BASE_SMALL=0
69# CONFIG_SLOB is not set
70 78
71# 79#
72# Loadable module support 80# Loadable module support
@@ -165,6 +173,7 @@ CONFIG_IRQ_UART1_TX=10
165# 173#
166# BF548 Specific Configuration 174# BF548 Specific Configuration
167# 175#
176# CONFIG_DEB_DMA_URGENT is not set
168 177
169# 178#
170# Interrupt Priority Assignment 179# Interrupt Priority Assignment
@@ -242,24 +251,35 @@ CONFIG_IRQ_PINT2=11
242CONFIG_IRQ_PINT3=11 251CONFIG_IRQ_PINT3=11
243 252
244# 253#
245# Board customizations 254# Pin Interrupt to Port Assignment
246# 255#
247# CONFIG_CMDLINE_BOOL is not set
248 256
249# 257#
250# Board Setup 258# Assignment
251# 259#
252CONFIG_CLKIN_HZ=25000000 260CONFIG_PINTx_REASSIGN=y
253CONFIG_MEM_SIZE=64 261CONFIG_PINT0_ASSIGN=0x00000101
254CONFIG_MEM_ADD_WIDTH=10 262CONFIG_PINT1_ASSIGN=0x01010000
255CONFIG_BOOT_LOAD=0x1000 263CONFIG_PINT2_ASSIGN=0x07000101
264CONFIG_PINT3_ASSIGN=0x02020303
256 265
257# 266#
258# Blackfin Kernel Optimizations 267# Board customizations
259# 268#
269# CONFIG_CMDLINE_BOOL is not set
260 270
261# 271#
262# Timer Tick 272# Clock/PLL Setup
273#
274CONFIG_CLKIN_HZ=25000000
275# CONFIG_BFIN_KERNEL_CLOCK is not set
276CONFIG_MAX_VCO_HZ=533000000
277CONFIG_MIN_VCO_HZ=50000000
278CONFIG_MAX_SCLK_HZ=133000000
279CONFIG_MIN_SCLK_HZ=27000000
280
281#
282# Kernel Timer/Scheduler
263# 283#
264# CONFIG_HZ_100 is not set 284# CONFIG_HZ_100 is not set
265CONFIG_HZ_250=y 285CONFIG_HZ_250=y
@@ -268,6 +288,20 @@ CONFIG_HZ_250=y
268CONFIG_HZ=250 288CONFIG_HZ=250
269 289
270# 290#
291# Memory Setup
292#
293CONFIG_MEM_SIZE=64
294CONFIG_MEM_ADD_WIDTH=10
295CONFIG_BOOT_LOAD=0x1000
296CONFIG_BFIN_SCRATCH_REG_RETN=y
297# CONFIG_BFIN_SCRATCH_REG_RETE is not set
298# CONFIG_BFIN_SCRATCH_REG_CYCLES is not set
299
300#
301# Blackfin Kernel Optimizations
302#
303
304#
271# Memory Optimizations 305# Memory Optimizations
272# 306#
273CONFIG_I_ENTRY_L1=y 307CONFIG_I_ENTRY_L1=y
@@ -275,12 +309,12 @@ CONFIG_EXCPT_IRQ_SYSC_L1=y
275CONFIG_DO_IRQ_L1=y 309CONFIG_DO_IRQ_L1=y
276CONFIG_CORE_TIMER_IRQ_L1=y 310CONFIG_CORE_TIMER_IRQ_L1=y
277CONFIG_IDLE_L1=y 311CONFIG_IDLE_L1=y
278CONFIG_SCHEDULE_L1=y 312# CONFIG_SCHEDULE_L1 is not set
279CONFIG_ARITHMETIC_OPS_L1=y 313CONFIG_ARITHMETIC_OPS_L1=y
280CONFIG_ACCESS_OK_L1=y 314CONFIG_ACCESS_OK_L1=y
281CONFIG_MEMSET_L1=y 315# CONFIG_MEMSET_L1 is not set
282CONFIG_MEMCPY_L1=y 316# CONFIG_MEMCPY_L1 is not set
283CONFIG_SYS_BFIN_SPINLOCK_L1=y 317# CONFIG_SYS_BFIN_SPINLOCK_L1 is not set
284# CONFIG_IP_CHECKSUM_L1 is not set 318# CONFIG_IP_CHECKSUM_L1 is not set
285CONFIG_CACHELINE_ALIGNED_L1=y 319CONFIG_CACHELINE_ALIGNED_L1=y
286# CONFIG_SYSCALL_TAB_L1 is not set 320# CONFIG_SYSCALL_TAB_L1 is not set
@@ -306,20 +340,15 @@ CONFIG_DMA_UNCACHED_1M=y
306# 340#
307# Cache Support 341# Cache Support
308# 342#
309CONFIG_BLKFIN_CACHE=y 343CONFIG_BFIN_ICACHE=y
310CONFIG_BLKFIN_DCACHE=y 344CONFIG_BFIN_DCACHE=y
311# CONFIG_BLKFIN_DCACHE_BANKA is not set 345# CONFIG_BFIN_DCACHE_BANKA is not set
312# CONFIG_BLKFIN_CACHE_LOCK is not set 346# CONFIG_BFIN_ICACHE_LOCK is not set
313# CONFIG_BLKFIN_WB is not set 347# CONFIG_BFIN_WB is not set
314CONFIG_BLKFIN_WT=y 348CONFIG_BFIN_WT=y
315CONFIG_L1_MAX_PIECE=16 349CONFIG_L1_MAX_PIECE=16
316 350
317# 351#
318# Clock Settings
319#
320# CONFIG_BFIN_KERNEL_CLOCK is not set
321
322#
323# Asynchonous Memory Configuration 352# Asynchonous Memory Configuration
324# 353#
325 354
@@ -327,7 +356,6 @@ CONFIG_L1_MAX_PIECE=16
327# EBIU_AMBCTL Global Control 356# EBIU_AMBCTL Global Control
328# 357#
329CONFIG_C_AMCKEN=y 358CONFIG_C_AMCKEN=y
330CONFIG_C_CDPRIO=y
331# CONFIG_C_AMBEN is not set 359# CONFIG_C_AMBEN is not set
332# CONFIG_C_AMBEN_B0 is not set 360# CONFIG_C_AMBEN_B0 is not set
333# CONFIG_C_AMBEN_B0_B1 is not set 361# CONFIG_C_AMBEN_B0_B1 is not set
@@ -338,7 +366,7 @@ CONFIG_C_AMBEN_ALL=y
338# EBIU_AMBCTL Control 366# EBIU_AMBCTL Control
339# 367#
340CONFIG_BANK_0=0x7BB0 368CONFIG_BANK_0=0x7BB0
341CONFIG_BANK_1=0x7BB0 369CONFIG_BANK_1=0x5554
342CONFIG_BANK_2=0x7BB0 370CONFIG_BANK_2=0x7BB0
343CONFIG_BANK_3=0x99B3 371CONFIG_BANK_3=0x99B3
344 372
@@ -346,6 +374,7 @@ CONFIG_BANK_3=0x99B3
346# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 374# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
347# 375#
348# CONFIG_PCI is not set 376# CONFIG_PCI is not set
377# CONFIG_ARCH_SUPPORTS_MSI is not set
349 378
350# 379#
351# PCCARD (PCMCIA/CardBus) support 380# PCCARD (PCMCIA/CardBus) support
@@ -353,10 +382,6 @@ CONFIG_BANK_3=0x99B3
353# CONFIG_PCCARD is not set 382# CONFIG_PCCARD is not set
354 383
355# 384#
356# PCI Hotplug Support
357#
358
359#
360# Executable file formats 385# Executable file formats
361# 386#
362CONFIG_BINFMT_ELF_FDPIC=y 387CONFIG_BINFMT_ELF_FDPIC=y
@@ -383,7 +408,6 @@ CONFIG_NET=y
383# 408#
384# Networking options 409# Networking options
385# 410#
386# CONFIG_NETDEBUG is not set
387CONFIG_PACKET=y 411CONFIG_PACKET=y
388# CONFIG_PACKET_MMAP is not set 412# CONFIG_PACKET_MMAP is not set
389CONFIG_UNIX=y 413CONFIG_UNIX=y
@@ -424,20 +448,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
424# CONFIG_NETLABEL is not set 448# CONFIG_NETLABEL is not set
425# CONFIG_NETWORK_SECMARK is not set 449# CONFIG_NETWORK_SECMARK is not set
426# CONFIG_NETFILTER is not set 450# CONFIG_NETFILTER is not set
427
428#
429# DCCP Configuration (EXPERIMENTAL)
430#
431# CONFIG_IP_DCCP is not set 451# CONFIG_IP_DCCP is not set
432
433#
434# SCTP Configuration (EXPERIMENTAL)
435#
436# CONFIG_IP_SCTP is not set 452# CONFIG_IP_SCTP is not set
437
438#
439# TIPC Configuration (EXPERIMENTAL)
440#
441# CONFIG_TIPC is not set 453# CONFIG_TIPC is not set
442# CONFIG_ATM is not set 454# CONFIG_ATM is not set
443# CONFIG_BRIDGE is not set 455# CONFIG_BRIDGE is not set
@@ -463,7 +475,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
463# CONFIG_HAMRADIO is not set 475# CONFIG_HAMRADIO is not set
464# CONFIG_IRDA is not set 476# CONFIG_IRDA is not set
465# CONFIG_BT is not set 477# CONFIG_BT is not set
478# CONFIG_AF_RXRPC is not set
479
480#
481# Wireless
482#
483# CONFIG_CFG80211 is not set
484# CONFIG_WIRELESS_EXT is not set
485# CONFIG_MAC80211 is not set
466# CONFIG_IEEE80211 is not set 486# CONFIG_IEEE80211 is not set
487# CONFIG_RFKILL is not set
467 488
468# 489#
469# Device Drivers 490# Device Drivers
@@ -475,29 +496,23 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
475CONFIG_STANDALONE=y 496CONFIG_STANDALONE=y
476CONFIG_PREVENT_FIRMWARE_BUILD=y 497CONFIG_PREVENT_FIRMWARE_BUILD=y
477# CONFIG_FW_LOADER is not set 498# CONFIG_FW_LOADER is not set
478# CONFIG_DEBUG_DRIVER is not set
479# CONFIG_DEBUG_DEVRES is not set
480# CONFIG_SYS_HYPERVISOR is not set 499# CONFIG_SYS_HYPERVISOR is not set
481 500
482# 501#
483# Connector - unified userspace <-> kernelspace linker 502# Connector - unified userspace <-> kernelspace linker
484# 503#
485# CONFIG_CONNECTOR is not set 504# CONFIG_CONNECTOR is not set
486
487#
488# Memory Technology Devices (MTD)
489#
490CONFIG_MTD=y 505CONFIG_MTD=y
491# CONFIG_MTD_DEBUG is not set 506# CONFIG_MTD_DEBUG is not set
492# CONFIG_MTD_CONCAT is not set 507# CONFIG_MTD_CONCAT is not set
493CONFIG_MTD_PARTITIONS=y 508CONFIG_MTD_PARTITIONS=y
494# CONFIG_MTD_REDBOOT_PARTS is not set 509# CONFIG_MTD_REDBOOT_PARTS is not set
495# CONFIG_MTD_CMDLINE_PARTS is not set 510CONFIG_MTD_CMDLINE_PARTS=y
496 511
497# 512#
498# User Modules And Translation Layers 513# User Modules And Translation Layers
499# 514#
500# CONFIG_MTD_CHAR is not set 515CONFIG_MTD_CHAR=y
501CONFIG_MTD_BLKDEVS=y 516CONFIG_MTD_BLKDEVS=y
502CONFIG_MTD_BLOCK=y 517CONFIG_MTD_BLOCK=y
503# CONFIG_FTL is not set 518# CONFIG_FTL is not set
@@ -509,8 +524,10 @@ CONFIG_MTD_BLOCK=y
509# 524#
510# RAM/ROM/Flash chip drivers 525# RAM/ROM/Flash chip drivers
511# 526#
512# CONFIG_MTD_CFI is not set 527CONFIG_MTD_CFI=y
513# CONFIG_MTD_JEDECPROBE is not set 528# CONFIG_MTD_JEDECPROBE is not set
529CONFIG_MTD_GEN_PROBE=y
530# CONFIG_MTD_CFI_ADV_OPTIONS is not set
514CONFIG_MTD_MAP_BANK_WIDTH_1=y 531CONFIG_MTD_MAP_BANK_WIDTH_1=y
515CONFIG_MTD_MAP_BANK_WIDTH_2=y 532CONFIG_MTD_MAP_BANK_WIDTH_2=y
516CONFIG_MTD_MAP_BANK_WIDTH_4=y 533CONFIG_MTD_MAP_BANK_WIDTH_4=y
@@ -521,22 +538,32 @@ CONFIG_MTD_CFI_I1=y
521CONFIG_MTD_CFI_I2=y 538CONFIG_MTD_CFI_I2=y
522# CONFIG_MTD_CFI_I4 is not set 539# CONFIG_MTD_CFI_I4 is not set
523# CONFIG_MTD_CFI_I8 is not set 540# CONFIG_MTD_CFI_I8 is not set
541CONFIG_MTD_CFI_INTELEXT=y
542# CONFIG_MTD_CFI_AMDSTD is not set
543# CONFIG_MTD_CFI_STAA is not set
544# CONFIG_MTD_MW320D is not set
545CONFIG_MTD_CFI_UTIL=y
524CONFIG_MTD_RAM=y 546CONFIG_MTD_RAM=y
525# CONFIG_MTD_ROM is not set 547# CONFIG_MTD_ROM is not set
526# CONFIG_MTD_ABSENT is not set 548# CONFIG_MTD_ABSENT is not set
527# CONFIG_MTD_OBSOLETE_CHIPS is not set
528 549
529# 550#
530# Mapping drivers for chip access 551# Mapping drivers for chip access
531# 552#
532CONFIG_MTD_COMPLEX_MAPPINGS=y 553CONFIG_MTD_COMPLEX_MAPPINGS=y
554CONFIG_MTD_PHYSMAP=y
555CONFIG_MTD_PHYSMAP_START=0x20000000
556CONFIG_MTD_PHYSMAP_LEN=0x400000
557CONFIG_MTD_PHYSMAP_BANKWIDTH=2
533# CONFIG_MTD_BF5xx is not set 558# CONFIG_MTD_BF5xx is not set
534CONFIG_MTD_UCLINUX=y 559# CONFIG_MTD_UCLINUX is not set
535# CONFIG_MTD_PLATRAM is not set 560# CONFIG_MTD_PLATRAM is not set
536 561
537# 562#
538# Self-contained MTD device drivers 563# Self-contained MTD device drivers
539# 564#
565# CONFIG_MTD_DATAFLASH is not set
566# CONFIG_MTD_M25P80 is not set
540# CONFIG_MTD_SLRAM is not set 567# CONFIG_MTD_SLRAM is not set
541# CONFIG_MTD_PHRAM is not set 568# CONFIG_MTD_PHRAM is not set
542# CONFIG_MTD_MTDRAM is not set 569# CONFIG_MTD_MTDRAM is not set
@@ -548,16 +575,23 @@ CONFIG_MTD_UCLINUX=y
548# CONFIG_MTD_DOC2000 is not set 575# CONFIG_MTD_DOC2000 is not set
549# CONFIG_MTD_DOC2001 is not set 576# CONFIG_MTD_DOC2001 is not set
550# CONFIG_MTD_DOC2001PLUS is not set 577# CONFIG_MTD_DOC2001PLUS is not set
578CONFIG_MTD_NAND=y
579# CONFIG_MTD_NAND_VERIFY_WRITE is not set
580# CONFIG_MTD_NAND_ECC_SMC is not set
581# CONFIG_MTD_NAND_MUSEUM_IDS is not set
582# CONFIG_MTD_NAND_BFIN is not set
583CONFIG_MTD_NAND_IDS=y
584CONFIG_MTD_NAND_BF5XX=y
585CONFIG_MTD_NAND_BF5XX_HWECC=y
586# CONFIG_MTD_NAND_DISKONCHIP is not set
587# CONFIG_MTD_NAND_NANDSIM is not set
588# CONFIG_MTD_NAND_PLATFORM is not set
589# CONFIG_MTD_ONENAND is not set
551 590
552# 591#
553# NAND Flash Device Drivers 592# UBI - Unsorted block images
554#
555# CONFIG_MTD_NAND is not set
556
557#
558# OneNAND Flash Device Drivers
559# 593#
560# CONFIG_MTD_ONENAND is not set 594# CONFIG_MTD_UBI is not set
561 595
562# 596#
563# Parallel port support 597# Parallel port support
@@ -585,41 +619,61 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
585# 619#
586# Misc devices 620# Misc devices
587# 621#
588
589#
590# ATA/ATAPI/MFM/RLL support
591#
592# CONFIG_IDE is not set 622# CONFIG_IDE is not set
593 623
594# 624#
595# SCSI device support 625# SCSI device support
596# 626#
597# CONFIG_RAID_ATTRS is not set 627# CONFIG_RAID_ATTRS is not set
598# CONFIG_SCSI is not set 628CONFIG_SCSI=y
629# CONFIG_SCSI_TGT is not set
599# CONFIG_SCSI_NETLINK is not set 630# CONFIG_SCSI_NETLINK is not set
631CONFIG_SCSI_PROC_FS=y
600 632
601# 633#
602# Serial ATA (prod) and Parallel ATA (experimental) drivers 634# SCSI support type (disk, tape, CD-ROM)
603# 635#
604# CONFIG_ATA is not set 636CONFIG_BLK_DEV_SD=y
637# CONFIG_CHR_DEV_ST is not set
638# CONFIG_CHR_DEV_OSST is not set
639CONFIG_BLK_DEV_SR=y
640# CONFIG_BLK_DEV_SR_VENDOR is not set
641# CONFIG_CHR_DEV_SG is not set
642# CONFIG_CHR_DEV_SCH is not set
605 643
606# 644#
607# Multi-device support (RAID and LVM) 645# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
608# 646#
609# CONFIG_MD is not set 647# CONFIG_SCSI_MULTI_LUN is not set
648# CONFIG_SCSI_CONSTANTS is not set
649# CONFIG_SCSI_LOGGING is not set
650# CONFIG_SCSI_SCAN_ASYNC is not set
651CONFIG_SCSI_WAIT_SCAN=m
610 652
611# 653#
612# Fusion MPT device support 654# SCSI Transports
613# 655#
614# CONFIG_FUSION is not set 656# CONFIG_SCSI_SPI_ATTRS is not set
657# CONFIG_SCSI_FC_ATTRS is not set
658# CONFIG_SCSI_ISCSI_ATTRS is not set
659# CONFIG_SCSI_SAS_ATTRS is not set
660# CONFIG_SCSI_SAS_LIBSAS is not set
615 661
616# 662#
617# IEEE 1394 (FireWire) support 663# SCSI low-level drivers
618# 664#
665# CONFIG_ISCSI_TCP is not set
666# CONFIG_SCSI_DEBUG is not set
667CONFIG_ATA=y
668# CONFIG_ATA_NONSTANDARD is not set
669# CONFIG_PATA_PLATFORM is not set
670CONFIG_PATA_BF54X=y
671CONFIG_PATA_BF54X_DMA=y
619 672
620# 673#
621# I2O device support 674# Multi-device support (RAID and LVM)
622# 675#
676# CONFIG_MD is not set
623 677
624# 678#
625# Network device support 679# Network device support
@@ -629,10 +683,6 @@ CONFIG_NETDEVICES=y
629# CONFIG_BONDING is not set 683# CONFIG_BONDING is not set
630# CONFIG_EQUALIZER is not set 684# CONFIG_EQUALIZER is not set
631# CONFIG_TUN is not set 685# CONFIG_TUN is not set
632
633#
634# PHY device support
635#
636# CONFIG_PHYLIB is not set 686# CONFIG_PHYLIB is not set
637 687
638# 688#
@@ -641,28 +691,16 @@ CONFIG_NETDEVICES=y
641CONFIG_NET_ETHERNET=y 691CONFIG_NET_ETHERNET=y
642CONFIG_MII=y 692CONFIG_MII=y
643# CONFIG_SMC91X is not set 693# CONFIG_SMC91X is not set
644# CONFIG_SMSC911X is not set 694CONFIG_SMSC911X=y
645 695# CONFIG_DM9000 is not set
646# 696CONFIG_NETDEV_1000=y
647# Ethernet (1000 Mbit) 697CONFIG_NETDEV_10000=y
648#
649
650#
651# Ethernet (10000 Mbit)
652#
653 698
654# 699#
655# Token Ring devices 700# Wireless LAN
656#
657
658#
659# Wireless LAN (non-hamradio)
660#
661# CONFIG_NET_RADIO is not set
662
663#
664# Wan interfaces
665# 701#
702# CONFIG_WLAN_PRE80211 is not set
703# CONFIG_WLAN_80211 is not set
666# CONFIG_WAN is not set 704# CONFIG_WAN is not set
667# CONFIG_PPP is not set 705# CONFIG_PPP is not set
668# CONFIG_SLIP is not set 706# CONFIG_SLIP is not set
@@ -686,6 +724,7 @@ CONFIG_MII=y
686# 724#
687CONFIG_INPUT=y 725CONFIG_INPUT=y
688# CONFIG_INPUT_FF_MEMLESS is not set 726# CONFIG_INPUT_FF_MEMLESS is not set
727# CONFIG_INPUT_POLLDEV is not set
689 728
690# 729#
691# Userland interfaces 730# Userland interfaces
@@ -702,10 +741,17 @@ CONFIG_INPUT=y
702# CONFIG_INPUT_KEYBOARD is not set 741# CONFIG_INPUT_KEYBOARD is not set
703# CONFIG_INPUT_MOUSE is not set 742# CONFIG_INPUT_MOUSE is not set
704# CONFIG_INPUT_JOYSTICK is not set 743# CONFIG_INPUT_JOYSTICK is not set
744# CONFIG_INPUT_TABLET is not set
705# CONFIG_INPUT_TOUCHSCREEN is not set 745# CONFIG_INPUT_TOUCHSCREEN is not set
706CONFIG_INPUT_MISC=y 746CONFIG_INPUT_MISC=y
747# CONFIG_INPUT_ATI_REMOTE is not set
748# CONFIG_INPUT_ATI_REMOTE2 is not set
749# CONFIG_INPUT_KEYSPAN_REMOTE is not set
750# CONFIG_INPUT_POWERMATE is not set
751# CONFIG_INPUT_YEALINK is not set
707# CONFIG_INPUT_UINPUT is not set 752# CONFIG_INPUT_UINPUT is not set
708# CONFIG_BF53X_PFBUTTONS is not set 753# CONFIG_BF53X_PFBUTTONS is not set
754# CONFIG_TWI_KEYPAD is not set
709 755
710# 756#
711# Hardware I/O ports 757# Hardware I/O ports
@@ -718,12 +764,15 @@ CONFIG_INPUT_MISC=y
718# 764#
719# CONFIG_AD9960 is not set 765# CONFIG_AD9960 is not set
720# CONFIG_SPI_ADC_BF533 is not set 766# CONFIG_SPI_ADC_BF533 is not set
721# CONFIG_BF5xx_PFLAGS is not set 767# CONFIG_BFIN_PFLAGS is not set
722# CONFIG_BF5xx_PPIFCD is not set 768# CONFIG_BF5xx_PPIFCD is not set
723# CONFIG_BF5xx_TIMERS is not set 769# CONFIG_BF5xx_TIMERS is not set
724# CONFIG_BF5xx_PPI is not set 770# CONFIG_BF5xx_PPI is not set
725# CONFIG_BFIN_SPORT is not set 771# CONFIG_BFIN_SPORT is not set
726# CONFIG_BFIN_TIMER_LATENCY is not set 772# CONFIG_BFIN_TIMER_LATENCY is not set
773# CONFIG_TWI_LCD is not set
774# CONFIG_AD5304 is not set
775# CONFIG_BF5xx_TEA5764 is not set
727# CONFIG_BF5xx_FBDMA is not set 776# CONFIG_BF5xx_FBDMA is not set
728# CONFIG_VT is not set 777# CONFIG_VT is not set
729# CONFIG_SERIAL_NONSTANDARD is not set 778# CONFIG_SERIAL_NONSTANDARD is not set
@@ -760,14 +809,9 @@ CONFIG_UNIX98_PTYS=y
760# IPMI 809# IPMI
761# 810#
762# CONFIG_IPMI_HANDLER is not set 811# CONFIG_IPMI_HANDLER is not set
763
764#
765# Watchdog Cards
766#
767# CONFIG_WATCHDOG is not set 812# CONFIG_WATCHDOG is not set
768CONFIG_HW_RANDOM=y 813CONFIG_HW_RANDOM=y
769# CONFIG_GEN_RTC is not set 814# CONFIG_GEN_RTC is not set
770# CONFIG_DTLK is not set
771# CONFIG_R3964 is not set 815# CONFIG_R3964 is not set
772# CONFIG_RAW_DRIVER is not set 816# CONFIG_RAW_DRIVER is not set
773 817
@@ -775,32 +819,114 @@ CONFIG_HW_RANDOM=y
775# TPM devices 819# TPM devices
776# 820#
777# CONFIG_TCG_TPM is not set 821# CONFIG_TCG_TPM is not set
822CONFIG_I2C=y
823CONFIG_I2C_BOARDINFO=y
824CONFIG_I2C_CHARDEV=y
825
826#
827# I2C Algorithms
828#
829# CONFIG_I2C_ALGOBIT is not set
830# CONFIG_I2C_ALGOPCF is not set
831# CONFIG_I2C_ALGOPCA is not set
778 832
779# 833#
780# I2C support 834# I2C Hardware Bus support
781# 835#
782# CONFIG_I2C is not set 836# CONFIG_I2C_BLACKFIN_GPIO is not set
837CONFIG_I2C_BLACKFIN_TWI=y
838CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=50
839# CONFIG_I2C_GPIO is not set
840# CONFIG_I2C_OCORES is not set
841# CONFIG_I2C_PARPORT_LIGHT is not set
842# CONFIG_I2C_SIMTEC is not set
843# CONFIG_I2C_STUB is not set
844
845#
846# Miscellaneous I2C Chip support
847#
848# CONFIG_SENSORS_DS1337 is not set
849# CONFIG_SENSORS_DS1374 is not set
850# CONFIG_SENSORS_AD5252 is not set
851# CONFIG_SENSORS_EEPROM is not set
852# CONFIG_SENSORS_PCF8574 is not set
853# CONFIG_SENSORS_PCF8575 is not set
854# CONFIG_SENSORS_PCA9543 is not set
855# CONFIG_SENSORS_PCA9539 is not set
856# CONFIG_SENSORS_PCF8591 is not set
857# CONFIG_SENSORS_MAX6875 is not set
858# CONFIG_I2C_DEBUG_CORE is not set
859# CONFIG_I2C_DEBUG_ALGO is not set
860# CONFIG_I2C_DEBUG_BUS is not set
861# CONFIG_I2C_DEBUG_CHIP is not set
783 862
784# 863#
785# SPI support 864# SPI support
786# 865#
787# CONFIG_SPI is not set 866CONFIG_SPI=y
788# CONFIG_SPI_MASTER is not set 867CONFIG_SPI_MASTER=y
789 868
790# 869#
791# Dallas's 1-wire bus 870# SPI Master Controller Drivers
792# 871#
793# CONFIG_W1 is not set 872CONFIG_SPI_BFIN=y
873# CONFIG_SPI_BITBANG is not set
874
875#
876# SPI Protocol Masters
877#
878# CONFIG_SPI_AT25 is not set
879# CONFIG_SPI_SPIDEV is not set
794 880
795# 881#
796# Hardware Monitoring support 882# Dallas's 1-wire bus
797# 883#
884# CONFIG_W1 is not set
798CONFIG_HWMON=y 885CONFIG_HWMON=y
799# CONFIG_HWMON_VID is not set 886# CONFIG_HWMON_VID is not set
800# CONFIG_SENSORS_ABITUGURU is not set 887# CONFIG_SENSORS_ABITUGURU is not set
888# CONFIG_SENSORS_AD7418 is not set
889# CONFIG_SENSORS_ADM1021 is not set
890# CONFIG_SENSORS_ADM1025 is not set
891# CONFIG_SENSORS_ADM1026 is not set
892# CONFIG_SENSORS_ADM1029 is not set
893# CONFIG_SENSORS_ADM1031 is not set
894# CONFIG_SENSORS_ADM9240 is not set
895# CONFIG_SENSORS_ASB100 is not set
896# CONFIG_SENSORS_ATXP1 is not set
897# CONFIG_SENSORS_DS1621 is not set
801# CONFIG_SENSORS_F71805F is not set 898# CONFIG_SENSORS_F71805F is not set
899# CONFIG_SENSORS_FSCHER is not set
900# CONFIG_SENSORS_FSCPOS is not set
901# CONFIG_SENSORS_GL518SM is not set
902# CONFIG_SENSORS_GL520SM is not set
903# CONFIG_SENSORS_IT87 is not set
904# CONFIG_SENSORS_LM63 is not set
905# CONFIG_SENSORS_LM70 is not set
906# CONFIG_SENSORS_LM75 is not set
907# CONFIG_SENSORS_LM77 is not set
908# CONFIG_SENSORS_LM78 is not set
909# CONFIG_SENSORS_LM80 is not set
910# CONFIG_SENSORS_LM83 is not set
911# CONFIG_SENSORS_LM85 is not set
912# CONFIG_SENSORS_LM87 is not set
913# CONFIG_SENSORS_LM90 is not set
914# CONFIG_SENSORS_LM92 is not set
915# CONFIG_SENSORS_MAX1619 is not set
916# CONFIG_SENSORS_MAX6650 is not set
917# CONFIG_SENSORS_PC87360 is not set
802# CONFIG_SENSORS_PC87427 is not set 918# CONFIG_SENSORS_PC87427 is not set
919# CONFIG_SENSORS_SMSC47M1 is not set
920# CONFIG_SENSORS_SMSC47M192 is not set
921# CONFIG_SENSORS_SMSC47B397 is not set
803# CONFIG_SENSORS_VT1211 is not set 922# CONFIG_SENSORS_VT1211 is not set
923# CONFIG_SENSORS_W83781D is not set
924# CONFIG_SENSORS_W83791D is not set
925# CONFIG_SENSORS_W83792D is not set
926# CONFIG_SENSORS_W83793 is not set
927# CONFIG_SENSORS_W83L785TS is not set
928# CONFIG_SENSORS_W83627HF is not set
929# CONFIG_SENSORS_W83627EHF is not set
804# CONFIG_HWMON_DEBUG_CHIP is not set 930# CONFIG_HWMON_DEBUG_CHIP is not set
805 931
806# 932#
@@ -812,16 +938,19 @@ CONFIG_HWMON=y
812# Multimedia devices 938# Multimedia devices
813# 939#
814# CONFIG_VIDEO_DEV is not set 940# CONFIG_VIDEO_DEV is not set
941# CONFIG_DVB_CORE is not set
942CONFIG_DAB=y
815 943
816# 944#
817# Digital Video Broadcasting Devices 945# Graphics support
818# 946#
819# CONFIG_DVB is not set 947# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
820 948
821# 949#
822# Graphics support 950# Display device support
823# 951#
824# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 952# CONFIG_DISPLAY_SUPPORT is not set
953# CONFIG_VGASTATE is not set
825# CONFIG_FB is not set 954# CONFIG_FB is not set
826 955
827# 956#
@@ -844,6 +973,10 @@ CONFIG_USB_ARCH_HAS_HCD=y
844# CONFIG_USB is not set 973# CONFIG_USB is not set
845 974
846# 975#
976# Enable Host or Gadget support to see Inventra options
977#
978
979#
847# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 980# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
848# 981#
849 982
@@ -851,11 +984,20 @@ CONFIG_USB_ARCH_HAS_HCD=y
851# USB Gadget Support 984# USB Gadget Support
852# 985#
853# CONFIG_USB_GADGET is not set 986# CONFIG_USB_GADGET is not set
987CONFIG_MMC=m
988# CONFIG_MMC_DEBUG is not set
989# CONFIG_MMC_UNSAFE_RESUME is not set
990
991#
992# MMC/SD Card Drivers
993#
994CONFIG_MMC_BLOCK=m
854 995
855# 996#
856# MMC/SD Card support 997# MMC/SD Host Controller Drivers
857# 998#
858# CONFIG_MMC is not set 999CONFIG_SDH_BFIN=m
1000# CONFIG_SPI_MMC is not set
859 1001
860# 1002#
861# LED devices 1003# LED devices
@@ -894,15 +1036,37 @@ CONFIG_RTC_INTF_SYSFS=y
894CONFIG_RTC_INTF_PROC=y 1036CONFIG_RTC_INTF_PROC=y
895CONFIG_RTC_INTF_DEV=y 1037CONFIG_RTC_INTF_DEV=y
896# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 1038# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1039# CONFIG_RTC_DRV_TEST is not set
897 1040
898# 1041#
899# RTC drivers 1042# I2C RTC drivers
1043#
1044# CONFIG_RTC_DRV_DS1307 is not set
1045# CONFIG_RTC_DRV_DS1672 is not set
1046# CONFIG_RTC_DRV_MAX6900 is not set
1047# CONFIG_RTC_DRV_RS5C372 is not set
1048# CONFIG_RTC_DRV_ISL1208 is not set
1049# CONFIG_RTC_DRV_X1205 is not set
1050# CONFIG_RTC_DRV_PCF8563 is not set
1051# CONFIG_RTC_DRV_PCF8583 is not set
1052
1053#
1054# SPI RTC drivers
1055#
1056# CONFIG_RTC_DRV_RS5C348 is not set
1057# CONFIG_RTC_DRV_MAX6902 is not set
1058
1059#
1060# Platform RTC drivers
900# 1061#
901# CONFIG_RTC_DRV_DS1553 is not set 1062# CONFIG_RTC_DRV_DS1553 is not set
902# CONFIG_RTC_DRV_DS1742 is not set 1063# CONFIG_RTC_DRV_DS1742 is not set
903# CONFIG_RTC_DRV_M48T86 is not set 1064# CONFIG_RTC_DRV_M48T86 is not set
904# CONFIG_RTC_DRV_TEST is not set
905# CONFIG_RTC_DRV_V3020 is not set 1065# CONFIG_RTC_DRV_V3020 is not set
1066
1067#
1068# on-CPU RTC drivers
1069#
906CONFIG_RTC_DRV_BFIN=y 1070CONFIG_RTC_DRV_BFIN=y
907 1071
908# 1072#
@@ -919,14 +1083,6 @@ CONFIG_RTC_DRV_BFIN=y
919# 1083#
920 1084
921# 1085#
922# Auxiliary Display support
923#
924
925#
926# Virtualization
927#
928
929#
930# PBX support 1086# PBX support
931# 1087#
932# CONFIG_PBX is not set 1088# CONFIG_PBX is not set
@@ -991,8 +1147,25 @@ CONFIG_RAMFS=y
991# CONFIG_BEFS_FS is not set 1147# CONFIG_BEFS_FS is not set
992# CONFIG_BFS_FS is not set 1148# CONFIG_BFS_FS is not set
993# CONFIG_EFS_FS is not set 1149# CONFIG_EFS_FS is not set
994# CONFIG_YAFFS_FS is not set 1150CONFIG_YAFFS_FS=m
995# CONFIG_JFFS2_FS is not set 1151CONFIG_YAFFS_YAFFS1=y
1152# CONFIG_YAFFS_DOES_ECC is not set
1153CONFIG_YAFFS_YAFFS2=y
1154CONFIG_YAFFS_AUTO_YAFFS2=y
1155# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
1156CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10
1157# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
1158# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
1159CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
1160CONFIG_JFFS2_FS=m
1161CONFIG_JFFS2_FS_DEBUG=0
1162CONFIG_JFFS2_FS_WRITEBUFFER=y
1163# CONFIG_JFFS2_SUMMARY is not set
1164# CONFIG_JFFS2_FS_XATTR is not set
1165# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1166CONFIG_JFFS2_ZLIB=y
1167CONFIG_JFFS2_RTIME=y
1168# CONFIG_JFFS2_RUBIN is not set
996# CONFIG_CRAMFS is not set 1169# CONFIG_CRAMFS is not set
997# CONFIG_VXFS_FS is not set 1170# CONFIG_VXFS_FS is not set
998# CONFIG_HPFS_FS is not set 1171# CONFIG_HPFS_FS is not set
@@ -1040,36 +1213,20 @@ CONFIG_MSDOS_PARTITION=y
1040CONFIG_ENABLE_MUST_CHECK=y 1213CONFIG_ENABLE_MUST_CHECK=y
1041CONFIG_MAGIC_SYSRQ=y 1214CONFIG_MAGIC_SYSRQ=y
1042# CONFIG_UNUSED_SYMBOLS is not set 1215# CONFIG_UNUSED_SYMBOLS is not set
1043# CONFIG_DEBUG_FS is not set 1216CONFIG_DEBUG_FS=y
1044# CONFIG_HEADERS_CHECK is not set 1217# CONFIG_HEADERS_CHECK is not set
1045CONFIG_DEBUG_KERNEL=y 1218# CONFIG_DEBUG_KERNEL is not set
1046# CONFIG_DEBUG_SHIRQ is not set
1047CONFIG_LOG_BUF_SHIFT=14
1048CONFIG_DETECT_SOFTLOCKUP=y
1049# CONFIG_SCHEDSTATS is not set
1050# CONFIG_TIMER_STATS is not set
1051# CONFIG_DEBUG_SLAB is not set
1052# CONFIG_DEBUG_RT_MUTEXES is not set
1053# CONFIG_RT_MUTEX_TESTER is not set
1054# CONFIG_DEBUG_SPINLOCK is not set
1055# CONFIG_DEBUG_MUTEXES is not set
1056# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1057# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1058# CONFIG_DEBUG_KOBJECT is not set
1059# CONFIG_DEBUG_BUGVERBOSE is not set 1219# CONFIG_DEBUG_BUGVERBOSE is not set
1060CONFIG_DEBUG_INFO=y 1220CONFIG_DEBUG_MMRS=y
1061# CONFIG_DEBUG_VM is not set
1062# CONFIG_DEBUG_LIST is not set
1063CONFIG_FRAME_POINTER=y
1064CONFIG_FORCED_INLINING=y
1065# CONFIG_RCU_TORTURE_TEST is not set
1066# CONFIG_FAULT_INJECTION is not set
1067CONFIG_DEBUG_HWERR=y
1068# CONFIG_DEBUG_ICACHE_CHECK is not set
1069# CONFIG_DEBUG_KERNEL_START is not set
1070# CONFIG_DEBUG_SERIAL_EARLY_INIT is not set
1071CONFIG_DEBUG_HUNT_FOR_ZERO=y 1221CONFIG_DEBUG_HUNT_FOR_ZERO=y
1222CONFIG_DEBUG_BFIN_HWTRACE_ON=y
1223CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
1224# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE is not set
1225# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_TWO is not set
1226CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0
1227# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set
1072# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 1228# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
1229CONFIG_EARLY_PRINTK=y
1073CONFIG_CPLB_INFO=y 1230CONFIG_CPLB_INFO=y
1074CONFIG_ACCESS_CHECK=y 1231CONFIG_ACCESS_CHECK=y
1075 1232
@@ -1092,9 +1249,12 @@ CONFIG_SECURITY_CAPABILITIES=y
1092CONFIG_BITREVERSE=y 1249CONFIG_BITREVERSE=y
1093# CONFIG_CRC_CCITT is not set 1250# CONFIG_CRC_CCITT is not set
1094# CONFIG_CRC16 is not set 1251# CONFIG_CRC16 is not set
1252# CONFIG_CRC_ITU_T is not set
1095CONFIG_CRC32=y 1253CONFIG_CRC32=y
1096# CONFIG_LIBCRC32C is not set 1254# CONFIG_LIBCRC32C is not set
1097CONFIG_ZLIB_INFLATE=y 1255CONFIG_ZLIB_INFLATE=y
1256CONFIG_ZLIB_DEFLATE=m
1098CONFIG_PLIST=y 1257CONFIG_PLIST=y
1099CONFIG_HAS_IOMEM=y 1258CONFIG_HAS_IOMEM=y
1100CONFIG_HAS_IOPORT=y 1259CONFIG_HAS_IOPORT=y
1260CONFIG_HAS_DMA=y
diff --git a/arch/blackfin/configs/BF561-EZKIT_defconfig b/arch/blackfin/configs/BF561-EZKIT_defconfig
index 51c0b6f97798..85e647f87759 100644
--- a/arch/blackfin/configs/BF561-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF561-EZKIT_defconfig
@@ -1,6 +1,6 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21.5 3# Linux kernel version: 2.6.22.6
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
@@ -15,8 +15,9 @@ CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_HARDIRQS=y 15CONFIG_GENERIC_HARDIRQS=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17# CONFIG_GENERIC_TIME is not set 17# CONFIG_GENERIC_TIME is not set
18CONFIG_GENERIC_CALIBRATE_DELAY=y 18CONFIG_GENERIC_GPIO=y
19CONFIG_FORCE_MAX_ZONEORDER=14 19CONFIG_FORCE_MAX_ZONEORDER=14
20CONFIG_GENERIC_CALIBRATE_DELAY=y
20CONFIG_IRQCHIP_DEMUX_GPIO=y 21CONFIG_IRQCHIP_DEMUX_GPIO=y
21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 22CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
22 23
@@ -40,7 +41,9 @@ CONFIG_SYSVIPC_SYSCTL=y
40# CONFIG_TASKSTATS is not set 41# CONFIG_TASKSTATS is not set
41# CONFIG_UTS_NS is not set 42# CONFIG_UTS_NS is not set
42# CONFIG_AUDIT is not set 43# CONFIG_AUDIT is not set
43# CONFIG_IKCONFIG is not set 44CONFIG_IKCONFIG=y
45CONFIG_IKCONFIG_PROC=y
46CONFIG_LOG_BUF_SHIFT=14
44CONFIG_SYSFS_DEPRECATED=y 47CONFIG_SYSFS_DEPRECATED=y
45# CONFIG_RELAY is not set 48# CONFIG_RELAY is not set
46CONFIG_BLK_DEV_INITRD=y 49CONFIG_BLK_DEV_INITRD=y
@@ -58,15 +61,20 @@ CONFIG_BUG=y
58CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
59CONFIG_BASE_FULL=y 62CONFIG_BASE_FULL=y
60CONFIG_FUTEX=y 63CONFIG_FUTEX=y
64CONFIG_ANON_INODES=y
65CONFIG_EPOLL=y
66CONFIG_SIGNALFD=y
67CONFIG_TIMERFD=y
68CONFIG_EVENTFD=y
69CONFIG_VM_EVENT_COUNTERS=y
61CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 70CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3
62CONFIG_BUDDY=y
63# CONFIG_NP2 is not set 71# CONFIG_NP2 is not set
64CONFIG_SLAB=y 72CONFIG_SLAB=y
65CONFIG_VM_EVENT_COUNTERS=y 73# CONFIG_SLUB is not set
74# CONFIG_SLOB is not set
66CONFIG_RT_MUTEXES=y 75CONFIG_RT_MUTEXES=y
67CONFIG_TINY_SHMEM=y 76CONFIG_TINY_SHMEM=y
68CONFIG_BASE_SMALL=0 77CONFIG_BASE_SMALL=0
69# CONFIG_SLOB is not set
70 78
71# 79#
72# Loadable module support 80# Loadable module support
@@ -229,19 +237,17 @@ CONFIG_IRQ_WDTIMER=13
229# CONFIG_CMDLINE_BOOL is not set 237# CONFIG_CMDLINE_BOOL is not set
230 238
231# 239#
232# Board Setup 240# Clock/PLL Setup
233# 241#
234CONFIG_CLKIN_HZ=30000000 242CONFIG_CLKIN_HZ=30000000
235CONFIG_MEM_SIZE=64 243# CONFIG_BFIN_KERNEL_CLOCK is not set
236CONFIG_MEM_ADD_WIDTH=9 244CONFIG_MAX_VCO_HZ=600000000
237CONFIG_BOOT_LOAD=0x1000 245CONFIG_MIN_VCO_HZ=50000000
238 246CONFIG_MAX_SCLK_HZ=133000000
239# 247CONFIG_MIN_SCLK_HZ=27000000
240# Blackfin Kernel Optimizations
241#
242 248
243# 249#
244# Timer Tick 250# Kernel Timer/Scheduler
245# 251#
246# CONFIG_HZ_100 is not set 252# CONFIG_HZ_100 is not set
247CONFIG_HZ_250=y 253CONFIG_HZ_250=y
@@ -250,6 +256,20 @@ CONFIG_HZ_250=y
250CONFIG_HZ=250 256CONFIG_HZ=250
251 257
252# 258#
259# Memory Setup
260#
261CONFIG_MEM_SIZE=64
262CONFIG_MEM_ADD_WIDTH=9
263CONFIG_BOOT_LOAD=0x1000
264CONFIG_BFIN_SCRATCH_REG_RETN=y
265# CONFIG_BFIN_SCRATCH_REG_RETE is not set
266# CONFIG_BFIN_SCRATCH_REG_CYCLES is not set
267
268#
269# Blackfin Kernel Optimizations
270#
271
272#
253# Memory Optimizations 273# Memory Optimizations
254# 274#
255CONFIG_I_ENTRY_L1=y 275CONFIG_I_ENTRY_L1=y
@@ -288,20 +308,15 @@ CONFIG_DMA_UNCACHED_1M=y
288# 308#
289# Cache Support 309# Cache Support
290# 310#
291CONFIG_BLKFIN_CACHE=y 311CONFIG_BFIN_ICACHE=y
292CONFIG_BLKFIN_DCACHE=y 312CONFIG_BFIN_DCACHE=y
293# CONFIG_BLKFIN_DCACHE_BANKA is not set 313# CONFIG_BFIN_DCACHE_BANKA is not set
294# CONFIG_BLKFIN_CACHE_LOCK is not set 314# CONFIG_BFIN_ICACHE_LOCK is not set
295# CONFIG_BLKFIN_WB is not set 315# CONFIG_BFIN_WB is not set
296CONFIG_BLKFIN_WT=y 316CONFIG_BFIN_WT=y
297CONFIG_L1_MAX_PIECE=16 317CONFIG_L1_MAX_PIECE=16
298 318
299# 319#
300# Clock Settings
301#
302# CONFIG_BFIN_KERNEL_CLOCK is not set
303
304#
305# Asynchonous Memory Configuration 320# Asynchonous Memory Configuration
306# 321#
307 322
@@ -326,12 +341,13 @@ CONFIG_C_AMBEN_ALL=y
326CONFIG_BANK_0=0x7BB0 341CONFIG_BANK_0=0x7BB0
327CONFIG_BANK_1=0x7BB0 342CONFIG_BANK_1=0x7BB0
328CONFIG_BANK_2=0x7BB0 343CONFIG_BANK_2=0x7BB0
329CONFIG_BANK_3=0x99B3 344CONFIG_BANK_3=0xAAC3
330 345
331# 346#
332# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 347# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
333# 348#
334# CONFIG_PCI is not set 349# CONFIG_PCI is not set
350# CONFIG_ARCH_SUPPORTS_MSI is not set
335 351
336# 352#
337# PCCARD (PCMCIA/CardBus) support 353# PCCARD (PCMCIA/CardBus) support
@@ -339,10 +355,6 @@ CONFIG_BANK_3=0x99B3
339# CONFIG_PCCARD is not set 355# CONFIG_PCCARD is not set
340 356
341# 357#
342# PCI Hotplug Support
343#
344
345#
346# Executable file formats 358# Executable file formats
347# 359#
348CONFIG_BINFMT_ELF_FDPIC=y 360CONFIG_BINFMT_ELF_FDPIC=y
@@ -364,7 +376,6 @@ CONFIG_NET=y
364# 376#
365# Networking options 377# Networking options
366# 378#
367# CONFIG_NETDEBUG is not set
368CONFIG_PACKET=y 379CONFIG_PACKET=y
369# CONFIG_PACKET_MMAP is not set 380# CONFIG_PACKET_MMAP is not set
370CONFIG_UNIX=y 381CONFIG_UNIX=y
@@ -405,20 +416,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
405# CONFIG_NETLABEL is not set 416# CONFIG_NETLABEL is not set
406# CONFIG_NETWORK_SECMARK is not set 417# CONFIG_NETWORK_SECMARK is not set
407# CONFIG_NETFILTER is not set 418# CONFIG_NETFILTER is not set
408
409#
410# DCCP Configuration (EXPERIMENTAL)
411#
412# CONFIG_IP_DCCP is not set 419# CONFIG_IP_DCCP is not set
413
414#
415# SCTP Configuration (EXPERIMENTAL)
416#
417# CONFIG_IP_SCTP is not set 420# CONFIG_IP_SCTP is not set
418
419#
420# TIPC Configuration (EXPERIMENTAL)
421#
422# CONFIG_TIPC is not set 421# CONFIG_TIPC is not set
423# CONFIG_ATM is not set 422# CONFIG_ATM is not set
424# CONFIG_BRIDGE is not set 423# CONFIG_BRIDGE is not set
@@ -485,7 +484,16 @@ CONFIG_IRTTY_SIR=m
485# FIR device drivers 484# FIR device drivers
486# 485#
487# CONFIG_BT is not set 486# CONFIG_BT is not set
487# CONFIG_AF_RXRPC is not set
488
489#
490# Wireless
491#
492# CONFIG_CFG80211 is not set
493# CONFIG_WIRELESS_EXT is not set
494# CONFIG_MAC80211 is not set
488# CONFIG_IEEE80211 is not set 495# CONFIG_IEEE80211 is not set
496# CONFIG_RFKILL is not set
489 497
490# 498#
491# Device Drivers 499# Device Drivers
@@ -503,10 +511,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
503# Connector - unified userspace <-> kernelspace linker 511# Connector - unified userspace <-> kernelspace linker
504# 512#
505# CONFIG_CONNECTOR is not set 513# CONFIG_CONNECTOR is not set
506
507#
508# Memory Technology Devices (MTD)
509#
510CONFIG_MTD=y 514CONFIG_MTD=y
511# CONFIG_MTD_DEBUG is not set 515# CONFIG_MTD_DEBUG is not set
512# CONFIG_MTD_CONCAT is not set 516# CONFIG_MTD_CONCAT is not set
@@ -550,7 +554,6 @@ CONFIG_MTD_MW320D=m
550CONFIG_MTD_RAM=y 554CONFIG_MTD_RAM=y
551CONFIG_MTD_ROM=m 555CONFIG_MTD_ROM=m
552# CONFIG_MTD_ABSENT is not set 556# CONFIG_MTD_ABSENT is not set
553# CONFIG_MTD_OBSOLETE_CHIPS is not set
554 557
555# 558#
556# Mapping drivers for chip access 559# Mapping drivers for chip access
@@ -588,16 +591,13 @@ CONFIG_BFIN_FLASH_BANK_3=0x7BB0
588# CONFIG_MTD_DOC2000 is not set 591# CONFIG_MTD_DOC2000 is not set
589# CONFIG_MTD_DOC2001 is not set 592# CONFIG_MTD_DOC2001 is not set
590# CONFIG_MTD_DOC2001PLUS is not set 593# CONFIG_MTD_DOC2001PLUS is not set
591
592#
593# NAND Flash Device Drivers
594#
595# CONFIG_MTD_NAND is not set 594# CONFIG_MTD_NAND is not set
595# CONFIG_MTD_ONENAND is not set
596 596
597# 597#
598# OneNAND Flash Device Drivers 598# UBI - Unsorted block images
599# 599#
600# CONFIG_MTD_ONENAND is not set 600# CONFIG_MTD_UBI is not set
601 601
602# 602#
603# Parallel port support 603# Parallel port support
@@ -625,10 +625,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
625# 625#
626# Misc devices 626# Misc devices
627# 627#
628
629#
630# ATA/ATAPI/MFM/RLL support
631#
632# CONFIG_IDE is not set 628# CONFIG_IDE is not set
633 629
634# 630#
@@ -637,10 +633,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
637# CONFIG_RAID_ATTRS is not set 633# CONFIG_RAID_ATTRS is not set
638# CONFIG_SCSI is not set 634# CONFIG_SCSI is not set
639# CONFIG_SCSI_NETLINK is not set 635# CONFIG_SCSI_NETLINK is not set
640
641#
642# Serial ATA (prod) and Parallel ATA (experimental) drivers
643#
644# CONFIG_ATA is not set 636# CONFIG_ATA is not set
645 637
646# 638#
@@ -649,19 +641,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
649# CONFIG_MD is not set 641# CONFIG_MD is not set
650 642
651# 643#
652# Fusion MPT device support
653#
654# CONFIG_FUSION is not set
655
656#
657# IEEE 1394 (FireWire) support
658#
659
660#
661# I2O device support
662#
663
664#
665# Network device support 644# Network device support
666# 645#
667CONFIG_NETDEVICES=y 646CONFIG_NETDEVICES=y
@@ -669,10 +648,6 @@ CONFIG_NETDEVICES=y
669# CONFIG_BONDING is not set 648# CONFIG_BONDING is not set
670# CONFIG_EQUALIZER is not set 649# CONFIG_EQUALIZER is not set
671# CONFIG_TUN is not set 650# CONFIG_TUN is not set
672
673#
674# PHY device support
675#
676# CONFIG_PHYLIB is not set 651# CONFIG_PHYLIB is not set
677 652
678# 653#
@@ -682,27 +657,15 @@ CONFIG_NET_ETHERNET=y
682CONFIG_MII=y 657CONFIG_MII=y
683CONFIG_SMC91X=y 658CONFIG_SMC91X=y
684# CONFIG_SMSC911X is not set 659# CONFIG_SMSC911X is not set
660# CONFIG_DM9000 is not set
661CONFIG_NETDEV_1000=y
662CONFIG_NETDEV_10000=y
685 663
686# 664#
687# Ethernet (1000 Mbit) 665# Wireless LAN
688#
689
690#
691# Ethernet (10000 Mbit)
692#
693
694#
695# Token Ring devices
696#
697
698#
699# Wireless LAN (non-hamradio)
700#
701# CONFIG_NET_RADIO is not set
702
703#
704# Wan interfaces
705# 666#
667# CONFIG_WLAN_PRE80211 is not set
668# CONFIG_WLAN_80211 is not set
706# CONFIG_WAN is not set 669# CONFIG_WAN is not set
707# CONFIG_PPP is not set 670# CONFIG_PPP is not set
708# CONFIG_SLIP is not set 671# CONFIG_SLIP is not set
@@ -726,6 +689,7 @@ CONFIG_SMC91X=y
726# 689#
727CONFIG_INPUT=m 690CONFIG_INPUT=m
728# CONFIG_INPUT_FF_MEMLESS is not set 691# CONFIG_INPUT_FF_MEMLESS is not set
692# CONFIG_INPUT_POLLDEV is not set
729 693
730# 694#
731# Userland interfaces 695# Userland interfaces
@@ -742,6 +706,7 @@ CONFIG_INPUT_EVDEV=m
742# CONFIG_INPUT_KEYBOARD is not set 706# CONFIG_INPUT_KEYBOARD is not set
743# CONFIG_INPUT_MOUSE is not set 707# CONFIG_INPUT_MOUSE is not set
744# CONFIG_INPUT_JOYSTICK is not set 708# CONFIG_INPUT_JOYSTICK is not set
709# CONFIG_INPUT_TABLET is not set
745# CONFIG_INPUT_TOUCHSCREEN is not set 710# CONFIG_INPUT_TOUCHSCREEN is not set
746# CONFIG_INPUT_MISC is not set 711# CONFIG_INPUT_MISC is not set
747 712
@@ -756,7 +721,7 @@ CONFIG_INPUT_EVDEV=m
756# 721#
757# CONFIG_AD9960 is not set 722# CONFIG_AD9960 is not set
758# CONFIG_SPI_ADC_BF533 is not set 723# CONFIG_SPI_ADC_BF533 is not set
759# CONFIG_BF5xx_PFLAGS is not set 724# CONFIG_BFIN_PFLAGS is not set
760# CONFIG_BF5xx_PPIFCD is not set 725# CONFIG_BF5xx_PPIFCD is not set
761# CONFIG_BF5xx_TIMERS is not set 726# CONFIG_BF5xx_TIMERS is not set
762# CONFIG_BF5xx_PPI is not set 727# CONFIG_BF5xx_PPI is not set
@@ -796,10 +761,6 @@ CONFIG_UNIX98_PTYS=y
796# IPMI 761# IPMI
797# 762#
798# CONFIG_IPMI_HANDLER is not set 763# CONFIG_IPMI_HANDLER is not set
799
800#
801# Watchdog Cards
802#
803CONFIG_WATCHDOG=y 764CONFIG_WATCHDOG=y
804# CONFIG_WATCHDOG_NOWAYOUT is not set 765# CONFIG_WATCHDOG_NOWAYOUT is not set
805 766
@@ -810,7 +771,6 @@ CONFIG_WATCHDOG=y
810CONFIG_BFIN_WDT=y 771CONFIG_BFIN_WDT=y
811CONFIG_HW_RANDOM=y 772CONFIG_HW_RANDOM=y
812# CONFIG_GEN_RTC is not set 773# CONFIG_GEN_RTC is not set
813# CONFIG_DTLK is not set
814# CONFIG_R3964 is not set 774# CONFIG_R3964 is not set
815# CONFIG_RAW_DRIVER is not set 775# CONFIG_RAW_DRIVER is not set
816 776
@@ -818,10 +778,6 @@ CONFIG_HW_RANDOM=y
818# TPM devices 778# TPM devices
819# 779#
820# CONFIG_TCG_TPM is not set 780# CONFIG_TCG_TPM is not set
821
822#
823# I2C support
824#
825# CONFIG_I2C is not set 781# CONFIG_I2C is not set
826 782
827# 783#
@@ -840,22 +796,22 @@ CONFIG_SPI_BFIN=y
840# SPI Protocol Masters 796# SPI Protocol Masters
841# 797#
842# CONFIG_SPI_AT25 is not set 798# CONFIG_SPI_AT25 is not set
799# CONFIG_SPI_SPIDEV is not set
843 800
844# 801#
845# Dallas's 1-wire bus 802# Dallas's 1-wire bus
846# 803#
847# CONFIG_W1 is not set 804# CONFIG_W1 is not set
848
849#
850# Hardware Monitoring support
851#
852CONFIG_HWMON=y 805CONFIG_HWMON=y
853# CONFIG_HWMON_VID is not set 806# CONFIG_HWMON_VID is not set
854# CONFIG_SENSORS_ABITUGURU is not set 807# CONFIG_SENSORS_ABITUGURU is not set
855# CONFIG_SENSORS_F71805F is not set 808# CONFIG_SENSORS_F71805F is not set
856# CONFIG_SENSORS_LM70 is not set 809# CONFIG_SENSORS_LM70 is not set
857# CONFIG_SENSORS_PC87427 is not set 810# CONFIG_SENSORS_PC87427 is not set
811# CONFIG_SENSORS_SMSC47M1 is not set
812# CONFIG_SENSORS_SMSC47B397 is not set
858# CONFIG_SENSORS_VT1211 is not set 813# CONFIG_SENSORS_VT1211 is not set
814# CONFIG_SENSORS_W83627HF is not set
859# CONFIG_HWMON_DEBUG_CHIP is not set 815# CONFIG_HWMON_DEBUG_CHIP is not set
860 816
861# 817#
@@ -867,16 +823,19 @@ CONFIG_HWMON=y
867# Multimedia devices 823# Multimedia devices
868# 824#
869# CONFIG_VIDEO_DEV is not set 825# CONFIG_VIDEO_DEV is not set
826# CONFIG_DVB_CORE is not set
827CONFIG_DAB=y
870 828
871# 829#
872# Digital Video Broadcasting Devices 830# Graphics support
873# 831#
874# CONFIG_DVB is not set 832# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
875 833
876# 834#
877# Graphics support 835# Display device support
878# 836#
879# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 837# CONFIG_DISPLAY_SUPPORT is not set
838# CONFIG_VGASTATE is not set
880# CONFIG_FB is not set 839# CONFIG_FB is not set
881 840
882# 841#
@@ -899,18 +858,17 @@ CONFIG_USB_ARCH_HAS_HCD=y
899# CONFIG_USB is not set 858# CONFIG_USB is not set
900 859
901# 860#
902# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 861# Enable Host or Gadget support to see Inventra options
903# 862#
904 863
905# 864#
906# USB Gadget Support 865# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
907# 866#
908# CONFIG_USB_GADGET is not set
909 867
910# 868#
911# MMC/SD Card support 869# USB Gadget Support
912# 870#
913# CONFIG_SPI_MMC is not set 871# CONFIG_USB_GADGET is not set
914# CONFIG_MMC is not set 872# CONFIG_MMC is not set
915 873
916# 874#
@@ -953,14 +911,6 @@ CONFIG_USB_ARCH_HAS_HCD=y
953# 911#
954 912
955# 913#
956# Auxiliary Display support
957#
958
959#
960# Virtualization
961#
962
963#
964# PBX support 914# PBX support
965# 915#
966# CONFIG_PBX is not set 916# CONFIG_PBX is not set
@@ -1060,6 +1010,7 @@ CONFIG_LOCKD=m
1060CONFIG_LOCKD_V4=y 1010CONFIG_LOCKD_V4=y
1061CONFIG_NFS_COMMON=y 1011CONFIG_NFS_COMMON=y
1062CONFIG_SUNRPC=m 1012CONFIG_SUNRPC=m
1013# CONFIG_SUNRPC_BIND34 is not set
1063# CONFIG_RPCSEC_GSS_KRB5 is not set 1014# CONFIG_RPCSEC_GSS_KRB5 is not set
1064# CONFIG_RPCSEC_GSS_SPKM3 is not set 1015# CONFIG_RPCSEC_GSS_SPKM3 is not set
1065CONFIG_SMB_FS=m 1016CONFIG_SMB_FS=m
@@ -1137,14 +1088,20 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1137CONFIG_ENABLE_MUST_CHECK=y 1088CONFIG_ENABLE_MUST_CHECK=y
1138# CONFIG_MAGIC_SYSRQ is not set 1089# CONFIG_MAGIC_SYSRQ is not set
1139# CONFIG_UNUSED_SYMBOLS is not set 1090# CONFIG_UNUSED_SYMBOLS is not set
1140# CONFIG_DEBUG_FS is not set 1091CONFIG_DEBUG_FS=y
1141# CONFIG_HEADERS_CHECK is not set 1092# CONFIG_HEADERS_CHECK is not set
1142# CONFIG_DEBUG_KERNEL is not set 1093# CONFIG_DEBUG_KERNEL is not set
1143CONFIG_LOG_BUF_SHIFT=14
1144# CONFIG_DEBUG_BUGVERBOSE is not set 1094# CONFIG_DEBUG_BUGVERBOSE is not set
1145# CONFIG_DEBUG_SERIAL_EARLY_INIT is not set 1095CONFIG_DEBUG_MMRS=y
1146CONFIG_DEBUG_HUNT_FOR_ZERO=y 1096CONFIG_DEBUG_HUNT_FOR_ZERO=y
1097CONFIG_DEBUG_BFIN_HWTRACE_ON=y
1098CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
1099# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE is not set
1100# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_TWO is not set
1101CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0
1102# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set
1147# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 1103# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
1104CONFIG_EARLY_PRINTK=y
1148# CONFIG_DUAL_CORE_TEST_MODULE is not set 1105# CONFIG_DUAL_CORE_TEST_MODULE is not set
1149CONFIG_CPLB_INFO=y 1106CONFIG_CPLB_INFO=y
1150CONFIG_ACCESS_CHECK=y 1107CONFIG_ACCESS_CHECK=y
@@ -1168,6 +1125,7 @@ CONFIG_SECURITY_CAPABILITIES=m
1168CONFIG_BITREVERSE=y 1125CONFIG_BITREVERSE=y
1169CONFIG_CRC_CCITT=m 1126CONFIG_CRC_CCITT=m
1170# CONFIG_CRC16 is not set 1127# CONFIG_CRC16 is not set
1128# CONFIG_CRC_ITU_T is not set
1171CONFIG_CRC32=y 1129CONFIG_CRC32=y
1172# CONFIG_LIBCRC32C is not set 1130# CONFIG_LIBCRC32C is not set
1173CONFIG_ZLIB_INFLATE=y 1131CONFIG_ZLIB_INFLATE=y
@@ -1175,3 +1133,4 @@ CONFIG_ZLIB_DEFLATE=m
1175CONFIG_PLIST=y 1133CONFIG_PLIST=y
1176CONFIG_HAS_IOMEM=y 1134CONFIG_HAS_IOMEM=y
1177CONFIG_HAS_IOPORT=y 1135CONFIG_HAS_IOPORT=y
1136CONFIG_HAS_DMA=y
diff --git a/arch/blackfin/configs/PNAV-10_defconfig b/arch/blackfin/configs/PNAV-10_defconfig
index 983ed181c896..15e36aaf2186 100644
--- a/arch/blackfin/configs/PNAV-10_defconfig
+++ b/arch/blackfin/configs/PNAV-10_defconfig
@@ -1,6 +1,6 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21.5 3# Linux kernel version: 2.6.22.6
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
@@ -15,8 +15,9 @@ CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_HARDIRQS=y 15CONFIG_GENERIC_HARDIRQS=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17# CONFIG_GENERIC_TIME is not set 17# CONFIG_GENERIC_TIME is not set
18CONFIG_GENERIC_CALIBRATE_DELAY=y 18CONFIG_GENERIC_GPIO=y
19CONFIG_FORCE_MAX_ZONEORDER=14 19CONFIG_FORCE_MAX_ZONEORDER=14
20CONFIG_GENERIC_CALIBRATE_DELAY=y
20CONFIG_IRQCHIP_DEMUX_GPIO=y 21CONFIG_IRQCHIP_DEMUX_GPIO=y
21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 22CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
22 23
@@ -41,6 +42,7 @@ CONFIG_SYSVIPC_SYSCTL=y
41# CONFIG_UTS_NS is not set 42# CONFIG_UTS_NS is not set
42# CONFIG_AUDIT is not set 43# CONFIG_AUDIT is not set
43# CONFIG_IKCONFIG is not set 44# CONFIG_IKCONFIG is not set
45CONFIG_LOG_BUF_SHIFT=14
44CONFIG_SYSFS_DEPRECATED=y 46CONFIG_SYSFS_DEPRECATED=y
45# CONFIG_RELAY is not set 47# CONFIG_RELAY is not set
46# CONFIG_BLK_DEV_INITRD is not set 48# CONFIG_BLK_DEV_INITRD is not set
@@ -57,15 +59,20 @@ CONFIG_BUG=y
57CONFIG_ELF_CORE=y 59CONFIG_ELF_CORE=y
58CONFIG_BASE_FULL=y 60CONFIG_BASE_FULL=y
59CONFIG_FUTEX=y 61CONFIG_FUTEX=y
62CONFIG_ANON_INODES=y
63CONFIG_EPOLL=y
64CONFIG_SIGNALFD=y
65CONFIG_TIMERFD=y
66CONFIG_EVENTFD=y
67CONFIG_VM_EVENT_COUNTERS=y
60CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=9 68CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=9
61CONFIG_BUDDY=y
62# CONFIG_NP2 is not set 69# CONFIG_NP2 is not set
63CONFIG_SLAB=y 70CONFIG_SLAB=y
64CONFIG_VM_EVENT_COUNTERS=y 71# CONFIG_SLUB is not set
72# CONFIG_SLOB is not set
65CONFIG_RT_MUTEXES=y 73CONFIG_RT_MUTEXES=y
66CONFIG_TINY_SHMEM=y 74CONFIG_TINY_SHMEM=y
67CONFIG_BASE_SMALL=0 75CONFIG_BASE_SMALL=0
68# CONFIG_SLOB is not set
69 76
70# 77#
71# Loadable module support 78# Loadable module support
@@ -147,13 +154,6 @@ CONFIG_IRQ_PLL_WAKEUP=7
147# 154#
148 155
149# 156#
150# PORT F/G Selection
151#
152CONFIG_BF537_PORT_F=y
153# CONFIG_BF537_PORT_G is not set
154# CONFIG_BF537_PORT_H is not set
155
156#
157# Interrupt Priority Assignment 157# Interrupt Priority Assignment
158# 158#
159 159
@@ -198,19 +198,17 @@ CONFIG_IRQ_WATCH=13
198# CONFIG_CMDLINE_BOOL is not set 198# CONFIG_CMDLINE_BOOL is not set
199 199
200# 200#
201# Board Setup 201# Clock/PLL Setup
202# 202#
203CONFIG_CLKIN_HZ=24576000 203CONFIG_CLKIN_HZ=24576000
204CONFIG_MEM_SIZE=64 204# CONFIG_BFIN_KERNEL_CLOCK is not set
205CONFIG_MEM_ADD_WIDTH=10 205CONFIG_MAX_VCO_HZ=600000000
206CONFIG_BOOT_LOAD=0x1000 206CONFIG_MIN_VCO_HZ=50000000
207 207CONFIG_MAX_SCLK_HZ=133000000
208# 208CONFIG_MIN_SCLK_HZ=27000000
209# Blackfin Kernel Optimizations
210#
211 209
212# 210#
213# Timer Tick 211# Kernel Timer/Scheduler
214# 212#
215# CONFIG_HZ_100 is not set 213# CONFIG_HZ_100 is not set
216CONFIG_HZ_250=y 214CONFIG_HZ_250=y
@@ -219,6 +217,20 @@ CONFIG_HZ_250=y
219CONFIG_HZ=250 217CONFIG_HZ=250
220 218
221# 219#
220# Memory Setup
221#
222CONFIG_MEM_SIZE=64
223CONFIG_MEM_ADD_WIDTH=10
224CONFIG_BOOT_LOAD=0x1000
225CONFIG_BFIN_SCRATCH_REG_RETN=y
226# CONFIG_BFIN_SCRATCH_REG_RETE is not set
227# CONFIG_BFIN_SCRATCH_REG_CYCLES is not set
228
229#
230# Blackfin Kernel Optimizations
231#
232
233#
222# Memory Optimizations 234# Memory Optimizations
223# 235#
224CONFIG_I_ENTRY_L1=y 236CONFIG_I_ENTRY_L1=y
@@ -257,20 +269,15 @@ CONFIG_DMA_UNCACHED_1M=y
257# 269#
258# Cache Support 270# Cache Support
259# 271#
260CONFIG_BLKFIN_CACHE=y 272CONFIG_BFIN_ICACHE=y
261CONFIG_BLKFIN_DCACHE=y 273CONFIG_BFIN_DCACHE=y
262# CONFIG_BLKFIN_DCACHE_BANKA is not set 274# CONFIG_BFIN_DCACHE_BANKA is not set
263# CONFIG_BLKFIN_CACHE_LOCK is not set 275# CONFIG_BFIN_ICACHE_LOCK is not set
264CONFIG_BLKFIN_WB=y 276CONFIG_BFIN_WB=y
265# CONFIG_BLKFIN_WT is not set 277# CONFIG_BFIN_WT is not set
266CONFIG_L1_MAX_PIECE=16 278CONFIG_L1_MAX_PIECE=16
267 279
268# 280#
269# Clock Settings
270#
271# CONFIG_BFIN_KERNEL_CLOCK is not set
272
273#
274# Asynchonous Memory Configuration 281# Asynchonous Memory Configuration
275# 282#
276 283
@@ -297,6 +304,7 @@ CONFIG_BANK_3=0x99B3
297# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 304# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
298# 305#
299# CONFIG_PCI is not set 306# CONFIG_PCI is not set
307# CONFIG_ARCH_SUPPORTS_MSI is not set
300 308
301# 309#
302# PCCARD (PCMCIA/CardBus) support 310# PCCARD (PCMCIA/CardBus) support
@@ -304,10 +312,6 @@ CONFIG_BANK_3=0x99B3
304# CONFIG_PCCARD is not set 312# CONFIG_PCCARD is not set
305 313
306# 314#
307# PCI Hotplug Support
308#
309
310#
311# Executable file formats 315# Executable file formats
312# 316#
313CONFIG_BINFMT_ELF_FDPIC=y 317CONFIG_BINFMT_ELF_FDPIC=y
@@ -334,7 +338,6 @@ CONFIG_NET=y
334# 338#
335# Networking options 339# Networking options
336# 340#
337# CONFIG_NETDEBUG is not set
338CONFIG_PACKET=y 341CONFIG_PACKET=y
339# CONFIG_PACKET_MMAP is not set 342# CONFIG_PACKET_MMAP is not set
340CONFIG_UNIX=y 343CONFIG_UNIX=y
@@ -375,20 +378,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
375# CONFIG_NETLABEL is not set 378# CONFIG_NETLABEL is not set
376# CONFIG_NETWORK_SECMARK is not set 379# CONFIG_NETWORK_SECMARK is not set
377# CONFIG_NETFILTER is not set 380# CONFIG_NETFILTER is not set
378
379#
380# DCCP Configuration (EXPERIMENTAL)
381#
382# CONFIG_IP_DCCP is not set 381# CONFIG_IP_DCCP is not set
383
384#
385# SCTP Configuration (EXPERIMENTAL)
386#
387# CONFIG_IP_SCTP is not set 382# CONFIG_IP_SCTP is not set
388
389#
390# TIPC Configuration (EXPERIMENTAL)
391#
392# CONFIG_TIPC is not set 383# CONFIG_TIPC is not set
393# CONFIG_ATM is not set 384# CONFIG_ATM is not set
394# CONFIG_BRIDGE is not set 385# CONFIG_BRIDGE is not set
@@ -414,7 +405,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
414# CONFIG_HAMRADIO is not set 405# CONFIG_HAMRADIO is not set
415# CONFIG_IRDA is not set 406# CONFIG_IRDA is not set
416# CONFIG_BT is not set 407# CONFIG_BT is not set
408# CONFIG_AF_RXRPC is not set
409
410#
411# Wireless
412#
413# CONFIG_CFG80211 is not set
414# CONFIG_WIRELESS_EXT is not set
415# CONFIG_MAC80211 is not set
417# CONFIG_IEEE80211 is not set 416# CONFIG_IEEE80211 is not set
417# CONFIG_RFKILL is not set
418 418
419# 419#
420# Device Drivers 420# Device Drivers
@@ -432,10 +432,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
432# Connector - unified userspace <-> kernelspace linker 432# Connector - unified userspace <-> kernelspace linker
433# 433#
434# CONFIG_CONNECTOR is not set 434# CONFIG_CONNECTOR is not set
435
436#
437# Memory Technology Devices (MTD)
438#
439CONFIG_MTD=y 435CONFIG_MTD=y
440# CONFIG_MTD_DEBUG is not set 436# CONFIG_MTD_DEBUG is not set
441# CONFIG_MTD_CONCAT is not set 437# CONFIG_MTD_CONCAT is not set
@@ -473,7 +469,6 @@ CONFIG_MTD_CFI_I2=y
473CONFIG_MTD_RAM=y 469CONFIG_MTD_RAM=y
474# CONFIG_MTD_ROM is not set 470# CONFIG_MTD_ROM is not set
475# CONFIG_MTD_ABSENT is not set 471# CONFIG_MTD_ABSENT is not set
476# CONFIG_MTD_OBSOLETE_CHIPS is not set
477 472
478# 473#
479# Mapping drivers for chip access 474# Mapping drivers for chip access
@@ -499,13 +494,10 @@ CONFIG_MTD_UCLINUX=y
499# CONFIG_MTD_DOC2000 is not set 494# CONFIG_MTD_DOC2000 is not set
500# CONFIG_MTD_DOC2001 is not set 495# CONFIG_MTD_DOC2001 is not set
501# CONFIG_MTD_DOC2001PLUS is not set 496# CONFIG_MTD_DOC2001PLUS is not set
502
503#
504# NAND Flash Device Drivers
505#
506CONFIG_MTD_NAND=y 497CONFIG_MTD_NAND=y
507# CONFIG_MTD_NAND_VERIFY_WRITE is not set 498# CONFIG_MTD_NAND_VERIFY_WRITE is not set
508# CONFIG_MTD_NAND_ECC_SMC is not set 499# CONFIG_MTD_NAND_ECC_SMC is not set
500# CONFIG_MTD_NAND_MUSEUM_IDS is not set
509CONFIG_MTD_NAND_BFIN=y 501CONFIG_MTD_NAND_BFIN=y
510CONFIG_BFIN_NAND_BASE=0x20100000 502CONFIG_BFIN_NAND_BASE=0x20100000
511CONFIG_BFIN_NAND_CLE=2 503CONFIG_BFIN_NAND_CLE=2
@@ -514,11 +506,13 @@ CONFIG_BFIN_NAND_READY=44
514CONFIG_MTD_NAND_IDS=y 506CONFIG_MTD_NAND_IDS=y
515# CONFIG_MTD_NAND_DISKONCHIP is not set 507# CONFIG_MTD_NAND_DISKONCHIP is not set
516# CONFIG_MTD_NAND_NANDSIM is not set 508# CONFIG_MTD_NAND_NANDSIM is not set
509# CONFIG_MTD_NAND_PLATFORM is not set
510# CONFIG_MTD_ONENAND is not set
517 511
518# 512#
519# OneNAND Flash Device Drivers 513# UBI - Unsorted block images
520# 514#
521# CONFIG_MTD_ONENAND is not set 515# CONFIG_MTD_UBI is not set
522 516
523# 517#
524# Parallel port support 518# Parallel port support
@@ -546,10 +540,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
546# 540#
547# Misc devices 541# Misc devices
548# 542#
549
550#
551# ATA/ATAPI/MFM/RLL support
552#
553# CONFIG_IDE is not set 543# CONFIG_IDE is not set
554 544
555# 545#
@@ -558,10 +548,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
558# CONFIG_RAID_ATTRS is not set 548# CONFIG_RAID_ATTRS is not set
559# CONFIG_SCSI is not set 549# CONFIG_SCSI is not set
560# CONFIG_SCSI_NETLINK is not set 550# CONFIG_SCSI_NETLINK is not set
561
562#
563# Serial ATA (prod) and Parallel ATA (experimental) drivers
564#
565# CONFIG_ATA is not set 551# CONFIG_ATA is not set
566 552
567# 553#
@@ -570,19 +556,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
570# CONFIG_MD is not set 556# CONFIG_MD is not set
571 557
572# 558#
573# Fusion MPT device support
574#
575# CONFIG_FUSION is not set
576
577#
578# IEEE 1394 (FireWire) support
579#
580
581#
582# I2O device support
583#
584
585#
586# Network device support 559# Network device support
587# 560#
588CONFIG_NETDEVICES=y 561CONFIG_NETDEVICES=y
@@ -590,11 +563,20 @@ CONFIG_NETDEVICES=y
590# CONFIG_BONDING is not set 563# CONFIG_BONDING is not set
591# CONFIG_EQUALIZER is not set 564# CONFIG_EQUALIZER is not set
592# CONFIG_TUN is not set 565# CONFIG_TUN is not set
566CONFIG_PHYLIB=y
593 567
594# 568#
595# PHY device support 569# MII PHY device drivers
596# 570#
597# CONFIG_PHYLIB is not set 571# CONFIG_MARVELL_PHY is not set
572# CONFIG_DAVICOM_PHY is not set
573# CONFIG_QSEMI_PHY is not set
574# CONFIG_LXT_PHY is not set
575# CONFIG_CICADA_PHY is not set
576# CONFIG_VITESSE_PHY is not set
577# CONFIG_SMSC_PHY is not set
578# CONFIG_BROADCOM_PHY is not set
579# CONFIG_FIXED_PHY is not set
598 580
599# 581#
600# Ethernet (10 or 100Mbit) 582# Ethernet (10 or 100Mbit)
@@ -608,27 +590,15 @@ CONFIG_BFIN_TX_DESC_NUM=100
608CONFIG_BFIN_RX_DESC_NUM=100 590CONFIG_BFIN_RX_DESC_NUM=100
609CONFIG_BFIN_MAC_RMII=y 591CONFIG_BFIN_MAC_RMII=y
610# CONFIG_SMSC911X is not set 592# CONFIG_SMSC911X is not set
593# CONFIG_DM9000 is not set
594CONFIG_NETDEV_1000=y
595CONFIG_NETDEV_10000=y
611 596
612# 597#
613# Ethernet (1000 Mbit) 598# Wireless LAN
614#
615
616#
617# Ethernet (10000 Mbit)
618#
619
620#
621# Token Ring devices
622#
623
624#
625# Wireless LAN (non-hamradio)
626#
627# CONFIG_NET_RADIO is not set
628
629#
630# Wan interfaces
631# 599#
600# CONFIG_WLAN_PRE80211 is not set
601# CONFIG_WLAN_80211 is not set
632# CONFIG_WAN is not set 602# CONFIG_WAN is not set
633# CONFIG_PPP is not set 603# CONFIG_PPP is not set
634# CONFIG_SLIP is not set 604# CONFIG_SLIP is not set
@@ -652,6 +622,7 @@ CONFIG_BFIN_MAC_RMII=y
652# 622#
653CONFIG_INPUT=y 623CONFIG_INPUT=y
654# CONFIG_INPUT_FF_MEMLESS is not set 624# CONFIG_INPUT_FF_MEMLESS is not set
625# CONFIG_INPUT_POLLDEV is not set
655 626
656# 627#
657# Userland interfaces 628# Userland interfaces
@@ -670,6 +641,7 @@ CONFIG_INPUT_EVDEV=y
670# CONFIG_INPUT_KEYBOARD is not set 641# CONFIG_INPUT_KEYBOARD is not set
671# CONFIG_INPUT_MOUSE is not set 642# CONFIG_INPUT_MOUSE is not set
672# CONFIG_INPUT_JOYSTICK is not set 643# CONFIG_INPUT_JOYSTICK is not set
644# CONFIG_INPUT_TABLET is not set
673CONFIG_INPUT_TOUCHSCREEN=y 645CONFIG_INPUT_TOUCHSCREEN=y
674# CONFIG_TOUCHSCREEN_ADS7846 is not set 646# CONFIG_TOUCHSCREEN_ADS7846 is not set
675CONFIG_TOUCHSCREEN_AD7877=y 647CONFIG_TOUCHSCREEN_AD7877=y
@@ -681,7 +653,13 @@ CONFIG_TOUCHSCREEN_AD7877=y
681# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set 653# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
682# CONFIG_TOUCHSCREEN_TOUCHWIN is not set 654# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
683# CONFIG_TOUCHSCREEN_UCB1400 is not set 655# CONFIG_TOUCHSCREEN_UCB1400 is not set
656# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
684CONFIG_INPUT_MISC=y 657CONFIG_INPUT_MISC=y
658# CONFIG_INPUT_ATI_REMOTE is not set
659# CONFIG_INPUT_ATI_REMOTE2 is not set
660# CONFIG_INPUT_KEYSPAN_REMOTE is not set
661# CONFIG_INPUT_POWERMATE is not set
662# CONFIG_INPUT_YEALINK is not set
685CONFIG_INPUT_UINPUT=y 663CONFIG_INPUT_UINPUT=y
686# CONFIG_BF53X_PFBUTTONS is not set 664# CONFIG_BF53X_PFBUTTONS is not set
687# CONFIG_TWI_KEYPAD is not set 665# CONFIG_TWI_KEYPAD is not set
@@ -697,7 +675,7 @@ CONFIG_INPUT_UINPUT=y
697# 675#
698# CONFIG_AD9960 is not set 676# CONFIG_AD9960 is not set
699# CONFIG_SPI_ADC_BF533 is not set 677# CONFIG_SPI_ADC_BF533 is not set
700# CONFIG_BF5xx_PFLAGS is not set 678# CONFIG_BFIN_PFLAGS is not set
701# CONFIG_BF5xx_PPIFCD is not set 679# CONFIG_BF5xx_PPIFCD is not set
702# CONFIG_BF5xx_TIMERS is not set 680# CONFIG_BF5xx_TIMERS is not set
703# CONFIG_BF5xx_PPI is not set 681# CONFIG_BF5xx_PPI is not set
@@ -749,14 +727,9 @@ CONFIG_CAN_BLACKFIN=m
749# IPMI 727# IPMI
750# 728#
751# CONFIG_IPMI_HANDLER is not set 729# CONFIG_IPMI_HANDLER is not set
752
753#
754# Watchdog Cards
755#
756# CONFIG_WATCHDOG is not set 730# CONFIG_WATCHDOG is not set
757CONFIG_HW_RANDOM=y 731CONFIG_HW_RANDOM=y
758# CONFIG_GEN_RTC is not set 732# CONFIG_GEN_RTC is not set
759# CONFIG_DTLK is not set
760# CONFIG_R3964 is not set 733# CONFIG_R3964 is not set
761# CONFIG_RAW_DRIVER is not set 734# CONFIG_RAW_DRIVER is not set
762 735
@@ -764,11 +737,8 @@ CONFIG_HW_RANDOM=y
764# TPM devices 737# TPM devices
765# 738#
766# CONFIG_TCG_TPM is not set 739# CONFIG_TCG_TPM is not set
767
768#
769# I2C support
770#
771CONFIG_I2C=y 740CONFIG_I2C=y
741CONFIG_I2C_BOARDINFO=y
772CONFIG_I2C_CHARDEV=y 742CONFIG_I2C_CHARDEV=y
773 743
774# 744#
@@ -784,10 +754,11 @@ CONFIG_I2C_CHARDEV=y
784# CONFIG_I2C_BLACKFIN_GPIO is not set 754# CONFIG_I2C_BLACKFIN_GPIO is not set
785CONFIG_I2C_BLACKFIN_TWI=y 755CONFIG_I2C_BLACKFIN_TWI=y
786CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=50 756CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=50
757# CONFIG_I2C_GPIO is not set
787# CONFIG_I2C_OCORES is not set 758# CONFIG_I2C_OCORES is not set
788# CONFIG_I2C_PARPORT_LIGHT is not set 759# CONFIG_I2C_PARPORT_LIGHT is not set
760# CONFIG_I2C_SIMTEC is not set
789# CONFIG_I2C_STUB is not set 761# CONFIG_I2C_STUB is not set
790# CONFIG_I2C_PCA_ISA is not set
791 762
792# 763#
793# Miscellaneous I2C Chip support 764# Miscellaneous I2C Chip support
@@ -823,18 +794,16 @@ CONFIG_SPI_BFIN=y
823# SPI Protocol Masters 794# SPI Protocol Masters
824# 795#
825# CONFIG_SPI_AT25 is not set 796# CONFIG_SPI_AT25 is not set
797# CONFIG_SPI_SPIDEV is not set
826 798
827# 799#
828# Dallas's 1-wire bus 800# Dallas's 1-wire bus
829# 801#
830# CONFIG_W1 is not set 802# CONFIG_W1 is not set
831
832#
833# Hardware Monitoring support
834#
835CONFIG_HWMON=y 803CONFIG_HWMON=y
836# CONFIG_HWMON_VID is not set 804# CONFIG_HWMON_VID is not set
837# CONFIG_SENSORS_ABITUGURU is not set 805# CONFIG_SENSORS_ABITUGURU is not set
806# CONFIG_SENSORS_AD7418 is not set
838# CONFIG_SENSORS_ADM1021 is not set 807# CONFIG_SENSORS_ADM1021 is not set
839# CONFIG_SENSORS_ADM1025 is not set 808# CONFIG_SENSORS_ADM1025 is not set
840# CONFIG_SENSORS_ADM1026 is not set 809# CONFIG_SENSORS_ADM1026 is not set
@@ -862,6 +831,7 @@ CONFIG_HWMON=y
862# CONFIG_SENSORS_LM90 is not set 831# CONFIG_SENSORS_LM90 is not set
863# CONFIG_SENSORS_LM92 is not set 832# CONFIG_SENSORS_LM92 is not set
864# CONFIG_SENSORS_MAX1619 is not set 833# CONFIG_SENSORS_MAX1619 is not set
834# CONFIG_SENSORS_MAX6650 is not set
865# CONFIG_SENSORS_PC87360 is not set 835# CONFIG_SENSORS_PC87360 is not set
866# CONFIG_SENSORS_PC87427 is not set 836# CONFIG_SENSORS_PC87427 is not set
867# CONFIG_SENSORS_SMSC47M1 is not set 837# CONFIG_SENSORS_SMSC47M1 is not set
@@ -886,11 +856,8 @@ CONFIG_HWMON=y
886# Multimedia devices 856# Multimedia devices
887# 857#
888# CONFIG_VIDEO_DEV is not set 858# CONFIG_VIDEO_DEV is not set
889 859# CONFIG_DVB_CORE is not set
890# 860CONFIG_DAB=y
891# Digital Video Broadcasting Devices
892#
893# CONFIG_DVB is not set
894 861
895# 862#
896# Graphics support 863# Graphics support
@@ -898,12 +865,23 @@ CONFIG_HWMON=y
898CONFIG_BACKLIGHT_LCD_SUPPORT=y 865CONFIG_BACKLIGHT_LCD_SUPPORT=y
899CONFIG_BACKLIGHT_CLASS_DEVICE=y 866CONFIG_BACKLIGHT_CLASS_DEVICE=y
900CONFIG_LCD_CLASS_DEVICE=y 867CONFIG_LCD_CLASS_DEVICE=y
868
869#
870# Display device support
871#
872# CONFIG_DISPLAY_SUPPORT is not set
873# CONFIG_VGASTATE is not set
901CONFIG_FB=y 874CONFIG_FB=y
902CONFIG_FIRMWARE_EDID=y 875CONFIG_FIRMWARE_EDID=y
903# CONFIG_FB_DDC is not set 876# CONFIG_FB_DDC is not set
904CONFIG_FB_CFB_FILLRECT=y 877CONFIG_FB_CFB_FILLRECT=y
905CONFIG_FB_CFB_COPYAREA=y 878CONFIG_FB_CFB_COPYAREA=y
906CONFIG_FB_CFB_IMAGEBLIT=y 879CONFIG_FB_CFB_IMAGEBLIT=y
880# CONFIG_FB_SYS_FILLRECT is not set
881# CONFIG_FB_SYS_COPYAREA is not set
882# CONFIG_FB_SYS_IMAGEBLIT is not set
883# CONFIG_FB_SYS_FOPS is not set
884CONFIG_FB_DEFERRED_IO=y
907# CONFIG_FB_SVGALIB is not set 885# CONFIG_FB_SVGALIB is not set
908# CONFIG_FB_MACMODES is not set 886# CONFIG_FB_MACMODES is not set
909# CONFIG_FB_BACKLIGHT is not set 887# CONFIG_FB_BACKLIGHT is not set
@@ -921,10 +899,6 @@ CONFIG_FB_BFIN_LANDSCAPE=y
921# CONFIG_FB_BFIN_BGR is not set 899# CONFIG_FB_BFIN_BGR is not set
922# CONFIG_FB_S1D13XXX is not set 900# CONFIG_FB_S1D13XXX is not set
923# CONFIG_FB_VIRTUAL is not set 901# CONFIG_FB_VIRTUAL is not set
924
925#
926# Logo configuration
927#
928# CONFIG_LOGO is not set 902# CONFIG_LOGO is not set
929 903
930# 904#
@@ -936,8 +910,6 @@ CONFIG_SOUND=y
936# Advanced Linux Sound Architecture 910# Advanced Linux Sound Architecture
937# 911#
938CONFIG_SND=m 912CONFIG_SND=m
939CONFIG_SND_TIMER=m
940CONFIG_SND_PCM=m
941# CONFIG_SND_SEQUENCER is not set 913# CONFIG_SND_SEQUENCER is not set
942# CONFIG_SND_MIXER_OSS is not set 914# CONFIG_SND_MIXER_OSS is not set
943# CONFIG_SND_PCM_OSS is not set 915# CONFIG_SND_PCM_OSS is not set
@@ -959,19 +931,23 @@ CONFIG_SND_PCM=m
959# ALSA Blackfin devices 931# ALSA Blackfin devices
960# 932#
961# CONFIG_SND_BLACKFIN_AD1836 is not set 933# CONFIG_SND_BLACKFIN_AD1836 is not set
962CONFIG_SND_BLACKFIN_AD1981B=m
963# CONFIG_SND_BFIN_AD73311 is not set 934# CONFIG_SND_BFIN_AD73311 is not set
964 935
965# 936#
966# SoC audio support 937# System on Chip audio support
967# 938#
968# CONFIG_SND_SOC is not set 939# CONFIG_SND_SOC is not set
969 940
970# 941#
942# SoC Audio for the ADI Blackfin
943#
944# CONFIG_SND_BF5XX_HAVE_COLD_RESET is not set
945
946#
971# Open Sound System 947# Open Sound System
972# 948#
973CONFIG_SOUND_PRIME=y 949CONFIG_SOUND_PRIME=y
974# CONFIG_OBSOLETE_OSS is not set 950# CONFIG_OSS_OBSOLETE is not set
975# CONFIG_SOUND_MSNDCLAS is not set 951# CONFIG_SOUND_MSNDCLAS is not set
976# CONFIG_SOUND_MSNDPIN is not set 952# CONFIG_SOUND_MSNDPIN is not set
977 953
@@ -989,18 +965,17 @@ CONFIG_USB_ARCH_HAS_HCD=y
989# CONFIG_USB is not set 965# CONFIG_USB is not set
990 966
991# 967#
992# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 968# Enable Host or Gadget support to see Inventra options
993# 969#
994 970
995# 971#
996# USB Gadget Support 972# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
997# 973#
998# CONFIG_USB_GADGET is not set
999 974
1000# 975#
1001# MMC/SD Card support 976# USB Gadget Support
1002# 977#
1003# CONFIG_SPI_MMC is not set 978# CONFIG_USB_GADGET is not set
1004# CONFIG_MMC is not set 979# CONFIG_MMC is not set
1005 980
1006# 981#
@@ -1040,44 +1015,50 @@ CONFIG_RTC_INTF_SYSFS=y
1040CONFIG_RTC_INTF_PROC=y 1015CONFIG_RTC_INTF_PROC=y
1041CONFIG_RTC_INTF_DEV=y 1016CONFIG_RTC_INTF_DEV=y
1042# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 1017# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1018# CONFIG_RTC_DRV_TEST is not set
1043 1019
1044# 1020#
1045# RTC drivers 1021# I2C RTC drivers
1046# 1022#
1047# CONFIG_RTC_DRV_X1205 is not set
1048# CONFIG_RTC_DRV_DS1307 is not set 1023# CONFIG_RTC_DRV_DS1307 is not set
1049# CONFIG_RTC_DRV_DS1553 is not set
1050# CONFIG_RTC_DRV_ISL1208 is not set
1051# CONFIG_RTC_DRV_DS1672 is not set 1024# CONFIG_RTC_DRV_DS1672 is not set
1052# CONFIG_RTC_DRV_DS1742 is not set 1025# CONFIG_RTC_DRV_MAX6900 is not set
1026# CONFIG_RTC_DRV_RS5C372 is not set
1027# CONFIG_RTC_DRV_ISL1208 is not set
1028# CONFIG_RTC_DRV_X1205 is not set
1053# CONFIG_RTC_DRV_PCF8563 is not set 1029# CONFIG_RTC_DRV_PCF8563 is not set
1030# CONFIG_RTC_DRV_PCF8583 is not set
1031
1032#
1033# SPI RTC drivers
1034#
1054# CONFIG_RTC_DRV_RS5C348 is not set 1035# CONFIG_RTC_DRV_RS5C348 is not set
1055# CONFIG_RTC_DRV_RS5C372 is not set
1056# CONFIG_RTC_DRV_M48T86 is not set
1057# CONFIG_RTC_DRV_TEST is not set
1058# CONFIG_RTC_DRV_MAX6902 is not set 1036# CONFIG_RTC_DRV_MAX6902 is not set
1059# CONFIG_RTC_DRV_V3020 is not set
1060CONFIG_RTC_DRV_BFIN=y
1061 1037
1062# 1038#
1063# DMA Engine support 1039# Platform RTC drivers
1064# 1040#
1065# CONFIG_DMA_ENGINE is not set 1041# CONFIG_RTC_DRV_DS1553 is not set
1042# CONFIG_RTC_DRV_DS1742 is not set
1043# CONFIG_RTC_DRV_M48T86 is not set
1044# CONFIG_RTC_DRV_V3020 is not set
1066 1045
1067# 1046#
1068# DMA Clients 1047# on-CPU RTC drivers
1069# 1048#
1049CONFIG_RTC_DRV_BFIN=y
1070 1050
1071# 1051#
1072# DMA Devices 1052# DMA Engine support
1073# 1053#
1054# CONFIG_DMA_ENGINE is not set
1074 1055
1075# 1056#
1076# Auxiliary Display support 1057# DMA Clients
1077# 1058#
1078 1059
1079# 1060#
1080# Virtualization 1061# DMA Devices
1081# 1062#
1082 1063
1083# 1064#
@@ -1176,6 +1157,7 @@ CONFIG_LOCKD=m
1176CONFIG_LOCKD_V4=y 1157CONFIG_LOCKD_V4=y
1177CONFIG_NFS_COMMON=y 1158CONFIG_NFS_COMMON=y
1178CONFIG_SUNRPC=m 1159CONFIG_SUNRPC=m
1160# CONFIG_SUNRPC_BIND34 is not set
1179# CONFIG_RPCSEC_GSS_KRB5 is not set 1161# CONFIG_RPCSEC_GSS_KRB5 is not set
1180# CONFIG_RPCSEC_GSS_SPKM3 is not set 1162# CONFIG_RPCSEC_GSS_SPKM3 is not set
1181CONFIG_SMB_FS=m 1163CONFIG_SMB_FS=m
@@ -1256,11 +1238,17 @@ CONFIG_ENABLE_MUST_CHECK=y
1256# CONFIG_DEBUG_FS is not set 1238# CONFIG_DEBUG_FS is not set
1257# CONFIG_HEADERS_CHECK is not set 1239# CONFIG_HEADERS_CHECK is not set
1258# CONFIG_DEBUG_KERNEL is not set 1240# CONFIG_DEBUG_KERNEL is not set
1259CONFIG_LOG_BUF_SHIFT=14
1260# CONFIG_DEBUG_BUGVERBOSE is not set 1241# CONFIG_DEBUG_BUGVERBOSE is not set
1261# CONFIG_DEBUG_SERIAL_EARLY_INIT is not set 1242# CONFIG_DEBUG_MMRS is not set
1262# CONFIG_DEBUG_HUNT_FOR_ZERO is not set 1243# CONFIG_DEBUG_HUNT_FOR_ZERO is not set
1244CONFIG_DEBUG_BFIN_HWTRACE_ON=y
1245CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
1246# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE is not set
1247# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_TWO is not set
1248CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0
1249# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set
1263# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 1250# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
1251# CONFIG_EARLY_PRINTK is not set
1264# CONFIG_CPLB_INFO is not set 1252# CONFIG_CPLB_INFO is not set
1265# CONFIG_ACCESS_CHECK is not set 1253# CONFIG_ACCESS_CHECK is not set
1266 1254
@@ -1283,9 +1271,11 @@ CONFIG_SECURITY_CAPABILITIES=y
1283CONFIG_BITREVERSE=y 1271CONFIG_BITREVERSE=y
1284CONFIG_CRC_CCITT=m 1272CONFIG_CRC_CCITT=m
1285# CONFIG_CRC16 is not set 1273# CONFIG_CRC16 is not set
1274# CONFIG_CRC_ITU_T is not set
1286CONFIG_CRC32=y 1275CONFIG_CRC32=y
1287# CONFIG_LIBCRC32C is not set 1276# CONFIG_LIBCRC32C is not set
1288CONFIG_ZLIB_INFLATE=y 1277CONFIG_ZLIB_INFLATE=y
1289CONFIG_PLIST=y 1278CONFIG_PLIST=y
1290CONFIG_HAS_IOMEM=y 1279CONFIG_HAS_IOMEM=y
1291CONFIG_HAS_IOPORT=y 1280CONFIG_HAS_IOPORT=y
1281CONFIG_HAS_DMA=y
diff --git a/arch/blackfin/kernel/Makefile b/arch/blackfin/kernel/Makefile
index f429ebc3a961..8aeb6066b19b 100644
--- a/arch/blackfin/kernel/Makefile
+++ b/arch/blackfin/kernel/Makefile
@@ -7,11 +7,10 @@ extra-y := init_task.o vmlinux.lds
7obj-y := \ 7obj-y := \
8 entry.o process.o bfin_ksyms.o ptrace.o setup.o signal.o \ 8 entry.o process.o bfin_ksyms.o ptrace.o setup.o signal.o \
9 sys_bfin.o time.o traps.o irqchip.o dma-mapping.o flat.o \ 9 sys_bfin.o time.o traps.o irqchip.o dma-mapping.o flat.o \
10 fixed_code.o cplbinit.o cacheinit.o 10 fixed_code.o cplbinit.o cacheinit.o reboot.o bfin_gpio.o
11 11
12obj-$(CONFIG_BF53x) += bfin_gpio.o
13obj-$(CONFIG_BF561) += bfin_gpio.o
14obj-$(CONFIG_MODULES) += module.o 12obj-$(CONFIG_MODULES) += module.o
15obj-$(CONFIG_BFIN_DMA_5XX) += bfin_dma_5xx.o 13obj-$(CONFIG_BFIN_DMA_5XX) += bfin_dma_5xx.o
16obj-$(CONFIG_DUAL_CORE_TEST_MODULE) += dualcore_test.o 14obj-$(CONFIG_DUAL_CORE_TEST_MODULE) += dualcore_test.o
17obj-$(CONFIG_KGDB) += kgdb.o 15obj-$(CONFIG_KGDB) += kgdb.o
16obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c
index 7cf02f02a1db..e19164fb4cd1 100644
--- a/arch/blackfin/kernel/bfin_dma_5xx.c
+++ b/arch/blackfin/kernel/bfin_dma_5xx.c
@@ -73,6 +73,11 @@ static int __init blackfin_dma_init(void)
73 /* Mark MEMDMA Channel 0 as requested since we're using it internally */ 73 /* Mark MEMDMA Channel 0 as requested since we're using it internally */
74 dma_ch[CH_MEM_STREAM0_DEST].chan_status = DMA_CHANNEL_REQUESTED; 74 dma_ch[CH_MEM_STREAM0_DEST].chan_status = DMA_CHANNEL_REQUESTED;
75 dma_ch[CH_MEM_STREAM0_SRC].chan_status = DMA_CHANNEL_REQUESTED; 75 dma_ch[CH_MEM_STREAM0_SRC].chan_status = DMA_CHANNEL_REQUESTED;
76
77#if defined(CONFIG_DEB_DMA_URGENT)
78 bfin_write_EBIU_DDRQUE(bfin_read_EBIU_DDRQUE()
79 | DEB1_URGENT | DEB2_URGENT | DEB3_URGENT);
80#endif
76 return 0; 81 return 0;
77} 82}
78 83
@@ -265,10 +270,23 @@ void set_dma_next_desc_addr(unsigned int channel, unsigned long addr)
265 270
266 dma_ch[channel].regs->next_desc_ptr = addr; 271 dma_ch[channel].regs->next_desc_ptr = addr;
267 SSYNC(); 272 SSYNC();
268 pr_debug("set_dma_start_addr() : END\n"); 273 pr_debug("set_dma_next_desc_addr() : END\n");
269} 274}
270EXPORT_SYMBOL(set_dma_next_desc_addr); 275EXPORT_SYMBOL(set_dma_next_desc_addr);
271 276
277void set_dma_curr_desc_addr(unsigned int channel, unsigned long addr)
278{
279 pr_debug("set_dma_curr_desc_addr() : BEGIN \n");
280
281 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE
282 && channel < MAX_BLACKFIN_DMA_CHANNEL));
283
284 dma_ch[channel].regs->curr_desc_ptr = addr;
285 SSYNC();
286 pr_debug("set_dma_curr_desc_addr() : END\n");
287}
288EXPORT_SYMBOL(set_dma_curr_desc_addr);
289
272void set_dma_x_count(unsigned int channel, unsigned short x_count) 290void set_dma_x_count(unsigned int channel, unsigned short x_count)
273{ 291{
274 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE 292 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE
@@ -345,6 +363,16 @@ void set_dma_sg(unsigned int channel, struct dmasg *sg, int nr_sg)
345} 363}
346EXPORT_SYMBOL(set_dma_sg); 364EXPORT_SYMBOL(set_dma_sg);
347 365
366void set_dma_curr_addr(unsigned int channel, unsigned long addr)
367{
368 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE
369 && channel < MAX_BLACKFIN_DMA_CHANNEL));
370
371 dma_ch[channel].regs->curr_addr_ptr = addr;
372 SSYNC();
373}
374EXPORT_SYMBOL(set_dma_curr_addr);
375
348/*------------------------------------------------------------------------------ 376/*------------------------------------------------------------------------------
349 * Get the DMA status of a specific DMA channel from the system. 377 * Get the DMA status of a specific DMA channel from the system.
350 *-----------------------------------------------------------------------------*/ 378 *-----------------------------------------------------------------------------*/
@@ -408,6 +436,10 @@ static void *__dma_memcpy(void *dest, const void *src, size_t size)
408 blackfin_dcache_flush_range((unsigned int)src, 436 blackfin_dcache_flush_range((unsigned int)src,
409 (unsigned int)(src + size)); 437 (unsigned int)(src + size));
410 438
439 if ((unsigned long)dest < memory_end)
440 blackfin_dcache_invalidate_range((unsigned int)dest,
441 (unsigned int)(dest + size));
442
411 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 443 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
412 444
413 if ((unsigned long)src < (unsigned long)dest) 445 if ((unsigned long)src < (unsigned long)dest)
@@ -515,6 +547,8 @@ static void *__dma_memcpy(void *dest, const void *src, size_t size)
515 } 547 }
516 } 548 }
517 549
550 SSYNC();
551
518 while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE)) 552 while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE))
519 ; 553 ;
520 554
@@ -524,9 +558,6 @@ static void *__dma_memcpy(void *dest, const void *src, size_t size)
524 bfin_write_MDMA_S0_CONFIG(0); 558 bfin_write_MDMA_S0_CONFIG(0);
525 bfin_write_MDMA_D0_CONFIG(0); 559 bfin_write_MDMA_D0_CONFIG(0);
526 560
527 if ((unsigned long)dest < memory_end)
528 blackfin_dcache_invalidate_range((unsigned int)dest,
529 (unsigned int)(dest + size));
530 local_irq_restore(flags); 561 local_irq_restore(flags);
531 562
532 return dest; 563 return dest;
@@ -555,13 +586,14 @@ void *safe_dma_memcpy(void *dest, const void *src, size_t size)
555} 586}
556EXPORT_SYMBOL(safe_dma_memcpy); 587EXPORT_SYMBOL(safe_dma_memcpy);
557 588
558void dma_outsb(void __iomem *addr, const void *buf, unsigned short len) 589void dma_outsb(unsigned long addr, const void *buf, unsigned short len)
559{ 590{
560 unsigned long flags; 591 unsigned long flags;
561 592
562 local_irq_save(flags); 593 local_irq_save(flags);
563 594
564 blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len); 595 blackfin_dcache_flush_range((unsigned int)buf,
596 (unsigned int)(buf) + len);
565 597
566 bfin_write_MDMA_D0_START_ADDR(addr); 598 bfin_write_MDMA_D0_START_ADDR(addr);
567 bfin_write_MDMA_D0_X_COUNT(len); 599 bfin_write_MDMA_D0_X_COUNT(len);
@@ -576,6 +608,8 @@ void dma_outsb(void __iomem *addr, const void *buf, unsigned short len)
576 bfin_write_MDMA_S0_CONFIG(DMAEN | WDSIZE_8); 608 bfin_write_MDMA_S0_CONFIG(DMAEN | WDSIZE_8);
577 bfin_write_MDMA_D0_CONFIG(WNR | DI_EN | DMAEN | WDSIZE_8); 609 bfin_write_MDMA_D0_CONFIG(WNR | DI_EN | DMAEN | WDSIZE_8);
578 610
611 SSYNC();
612
579 while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE)); 613 while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE));
580 614
581 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 615 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -588,10 +622,13 @@ void dma_outsb(void __iomem *addr, const void *buf, unsigned short len)
588EXPORT_SYMBOL(dma_outsb); 622EXPORT_SYMBOL(dma_outsb);
589 623
590 624
591void dma_insb(const void __iomem *addr, void *buf, unsigned short len) 625void dma_insb(unsigned long addr, void *buf, unsigned short len)
592{ 626{
593 unsigned long flags; 627 unsigned long flags;
594 628
629 blackfin_dcache_invalidate_range((unsigned int)buf,
630 (unsigned int)(buf) + len);
631
595 local_irq_save(flags); 632 local_irq_save(flags);
596 bfin_write_MDMA_D0_START_ADDR(buf); 633 bfin_write_MDMA_D0_START_ADDR(buf);
597 bfin_write_MDMA_D0_X_COUNT(len); 634 bfin_write_MDMA_D0_X_COUNT(len);
@@ -606,7 +643,7 @@ void dma_insb(const void __iomem *addr, void *buf, unsigned short len)
606 bfin_write_MDMA_S0_CONFIG(DMAEN | WDSIZE_8); 643 bfin_write_MDMA_S0_CONFIG(DMAEN | WDSIZE_8);
607 bfin_write_MDMA_D0_CONFIG(WNR | DI_EN | DMAEN | WDSIZE_8); 644 bfin_write_MDMA_D0_CONFIG(WNR | DI_EN | DMAEN | WDSIZE_8);
608 645
609 blackfin_dcache_invalidate_range((unsigned int)buf, (unsigned int)(buf) + len); 646 SSYNC();
610 647
611 while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE)); 648 while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE));
612 649
@@ -619,13 +656,14 @@ void dma_insb(const void __iomem *addr, void *buf, unsigned short len)
619} 656}
620EXPORT_SYMBOL(dma_insb); 657EXPORT_SYMBOL(dma_insb);
621 658
622void dma_outsw(void __iomem *addr, const void *buf, unsigned short len) 659void dma_outsw(unsigned long addr, const void *buf, unsigned short len)
623{ 660{
624 unsigned long flags; 661 unsigned long flags;
625 662
626 local_irq_save(flags); 663 local_irq_save(flags);
627 664
628 blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len); 665 blackfin_dcache_flush_range((unsigned int)buf,
666 (unsigned int)(buf) + len * sizeof(short));
629 667
630 bfin_write_MDMA_D0_START_ADDR(addr); 668 bfin_write_MDMA_D0_START_ADDR(addr);
631 bfin_write_MDMA_D0_X_COUNT(len); 669 bfin_write_MDMA_D0_X_COUNT(len);
@@ -640,6 +678,8 @@ void dma_outsw(void __iomem *addr, const void *buf, unsigned short len)
640 bfin_write_MDMA_S0_CONFIG(DMAEN | WDSIZE_16); 678 bfin_write_MDMA_S0_CONFIG(DMAEN | WDSIZE_16);
641 bfin_write_MDMA_D0_CONFIG(WNR | DI_EN | DMAEN | WDSIZE_16); 679 bfin_write_MDMA_D0_CONFIG(WNR | DI_EN | DMAEN | WDSIZE_16);
642 680
681 SSYNC();
682
643 while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE)); 683 while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE));
644 684
645 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 685 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -651,10 +691,13 @@ void dma_outsw(void __iomem *addr, const void *buf, unsigned short len)
651} 691}
652EXPORT_SYMBOL(dma_outsw); 692EXPORT_SYMBOL(dma_outsw);
653 693
654void dma_insw(const void __iomem *addr, void *buf, unsigned short len) 694void dma_insw(unsigned long addr, void *buf, unsigned short len)
655{ 695{
656 unsigned long flags; 696 unsigned long flags;
657 697
698 blackfin_dcache_invalidate_range((unsigned int)buf,
699 (unsigned int)(buf) + len * sizeof(short));
700
658 local_irq_save(flags); 701 local_irq_save(flags);
659 702
660 bfin_write_MDMA_D0_START_ADDR(buf); 703 bfin_write_MDMA_D0_START_ADDR(buf);
@@ -670,7 +713,7 @@ void dma_insw(const void __iomem *addr, void *buf, unsigned short len)
670 bfin_write_MDMA_S0_CONFIG(DMAEN | WDSIZE_16); 713 bfin_write_MDMA_S0_CONFIG(DMAEN | WDSIZE_16);
671 bfin_write_MDMA_D0_CONFIG(WNR | DI_EN | DMAEN | WDSIZE_16); 714 bfin_write_MDMA_D0_CONFIG(WNR | DI_EN | DMAEN | WDSIZE_16);
672 715
673 blackfin_dcache_invalidate_range((unsigned int)buf, (unsigned int)(buf) + len); 716 SSYNC();
674 717
675 while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE)); 718 while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE));
676 719
@@ -683,13 +726,14 @@ void dma_insw(const void __iomem *addr, void *buf, unsigned short len)
683} 726}
684EXPORT_SYMBOL(dma_insw); 727EXPORT_SYMBOL(dma_insw);
685 728
686void dma_outsl(void __iomem *addr, const void *buf, unsigned short len) 729void dma_outsl(unsigned long addr, const void *buf, unsigned short len)
687{ 730{
688 unsigned long flags; 731 unsigned long flags;
689 732
690 local_irq_save(flags); 733 local_irq_save(flags);
691 734
692 blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len); 735 blackfin_dcache_flush_range((unsigned int)buf,
736 (unsigned int)(buf) + len * sizeof(long));
693 737
694 bfin_write_MDMA_D0_START_ADDR(addr); 738 bfin_write_MDMA_D0_START_ADDR(addr);
695 bfin_write_MDMA_D0_X_COUNT(len); 739 bfin_write_MDMA_D0_X_COUNT(len);
@@ -704,6 +748,8 @@ void dma_outsl(void __iomem *addr, const void *buf, unsigned short len)
704 bfin_write_MDMA_S0_CONFIG(DMAEN | WDSIZE_32); 748 bfin_write_MDMA_S0_CONFIG(DMAEN | WDSIZE_32);
705 bfin_write_MDMA_D0_CONFIG(WNR | DI_EN | DMAEN | WDSIZE_32); 749 bfin_write_MDMA_D0_CONFIG(WNR | DI_EN | DMAEN | WDSIZE_32);
706 750
751 SSYNC();
752
707 while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE)); 753 while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE));
708 754
709 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 755 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -715,10 +761,13 @@ void dma_outsl(void __iomem *addr, const void *buf, unsigned short len)
715} 761}
716EXPORT_SYMBOL(dma_outsl); 762EXPORT_SYMBOL(dma_outsl);
717 763
718void dma_insl(const void __iomem *addr, void *buf, unsigned short len) 764void dma_insl(unsigned long addr, void *buf, unsigned short len)
719{ 765{
720 unsigned long flags; 766 unsigned long flags;
721 767
768 blackfin_dcache_invalidate_range((unsigned int)buf,
769 (unsigned int)(buf) + len * sizeof(long));
770
722 local_irq_save(flags); 771 local_irq_save(flags);
723 772
724 bfin_write_MDMA_D0_START_ADDR(buf); 773 bfin_write_MDMA_D0_START_ADDR(buf);
@@ -734,7 +783,7 @@ void dma_insl(const void __iomem *addr, void *buf, unsigned short len)
734 bfin_write_MDMA_S0_CONFIG(DMAEN | WDSIZE_32); 783 bfin_write_MDMA_S0_CONFIG(DMAEN | WDSIZE_32);
735 bfin_write_MDMA_D0_CONFIG(WNR | DI_EN | DMAEN | WDSIZE_32); 784 bfin_write_MDMA_D0_CONFIG(WNR | DI_EN | DMAEN | WDSIZE_32);
736 785
737 blackfin_dcache_invalidate_range((unsigned int)buf, (unsigned int)(buf) + len); 786 SSYNC();
738 787
739 while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE)); 788 while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE));
740 789
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index 5d488ef965ce..3fe0cd49e8db 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -7,7 +7,7 @@
7 * Description: GPIO Abstraction Layer 7 * Description: GPIO Abstraction Layer
8 * 8 *
9 * Modified: 9 * Modified:
10 * Copyright 2006 Analog Devices Inc. 10 * Copyright 2007 Analog Devices Inc.
11 * 11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 * 13 *
@@ -28,9 +28,9 @@
28 */ 28 */
29 29
30/* 30/*
31* Number BF537/6/4 BF561 BF533/2/1 31* Number BF537/6/4 BF561 BF533/2/1 BF549/8/4/2
32* 32*
33* GPIO_0 PF0 PF0 PF0 33* GPIO_0 PF0 PF0 PF0 PA0...PJ13
34* GPIO_1 PF1 PF1 PF1 34* GPIO_1 PF1 PF1 PF1
35* GPIO_2 PF2 PF2 PF2 35* GPIO_2 PF2 PF2 PF2
36* GPIO_3 PF3 PF3 PF3 36* GPIO_3 PF3 PF3 PF3
@@ -80,6 +80,7 @@
80* GPIO_47 PH15 PF47 80* GPIO_47 PH15 PF47
81*/ 81*/
82 82
83#include <linux/delay.h>
83#include <linux/module.h> 84#include <linux/module.h>
84#include <linux/err.h> 85#include <linux/err.h>
85#include <asm/blackfin.h> 86#include <asm/blackfin.h>
@@ -87,6 +88,36 @@
87#include <asm/portmux.h> 88#include <asm/portmux.h>
88#include <linux/irq.h> 89#include <linux/irq.h>
89 90
91#if ANOMALY_05000311 || ANOMALY_05000323
92enum {
93 AWA_data = SYSCR,
94 AWA_data_clear = SYSCR,
95 AWA_data_set = SYSCR,
96 AWA_toggle = SYSCR,
97 AWA_maska = UART_SCR,
98 AWA_maska_clear = UART_SCR,
99 AWA_maska_set = UART_SCR,
100 AWA_maska_toggle = UART_SCR,
101 AWA_maskb = UART_GCTL,
102 AWA_maskb_clear = UART_GCTL,
103 AWA_maskb_set = UART_GCTL,
104 AWA_maskb_toggle = UART_GCTL,
105 AWA_dir = SPORT1_STAT,
106 AWA_polar = SPORT1_STAT,
107 AWA_edge = SPORT1_STAT,
108 AWA_both = SPORT1_STAT,
109#if ANOMALY_05000311
110 AWA_inen = TIMER_ENABLE,
111#elif ANOMALY_05000323
112 AWA_inen = DMA1_1_CONFIG,
113#endif
114};
115 /* Anomaly Workaround */
116#define AWA_DUMMY_READ(name) bfin_read16(AWA_ ## name)
117#else
118#define AWA_DUMMY_READ(...) do { } while (0)
119#endif
120
90#ifdef BF533_FAMILY 121#ifdef BF533_FAMILY
91static struct gpio_port_t *gpio_bankb[gpio_bank(MAX_BLACKFIN_GPIOS)] = { 122static struct gpio_port_t *gpio_bankb[gpio_bank(MAX_BLACKFIN_GPIOS)] = {
92 (struct gpio_port_t *) FIO_FLAG_D, 123 (struct gpio_port_t *) FIO_FLAG_D,
@@ -116,11 +147,31 @@ static struct gpio_port_t *gpio_bankb[gpio_bank(MAX_BLACKFIN_GPIOS)] = {
116}; 147};
117#endif 148#endif
118 149
150#ifdef BF548_FAMILY
151static struct gpio_port_t *gpio_array[gpio_bank(MAX_BLACKFIN_GPIOS)] = {
152 (struct gpio_port_t *)PORTA_FER,
153 (struct gpio_port_t *)PORTB_FER,
154 (struct gpio_port_t *)PORTC_FER,
155 (struct gpio_port_t *)PORTD_FER,
156 (struct gpio_port_t *)PORTE_FER,
157 (struct gpio_port_t *)PORTF_FER,
158 (struct gpio_port_t *)PORTG_FER,
159 (struct gpio_port_t *)PORTH_FER,
160 (struct gpio_port_t *)PORTI_FER,
161 (struct gpio_port_t *)PORTJ_FER,
162};
163#endif
164
119static unsigned short reserved_gpio_map[gpio_bank(MAX_BLACKFIN_GPIOS)]; 165static unsigned short reserved_gpio_map[gpio_bank(MAX_BLACKFIN_GPIOS)];
120static unsigned short reserved_peri_map[gpio_bank(MAX_BLACKFIN_GPIOS + 16)]; 166static unsigned short reserved_peri_map[gpio_bank(MAX_BLACKFIN_GPIOS + 16)];
121char *str_ident = NULL;
122 167
123#define RESOURCE_LABEL_SIZE 16 168#define MAX_RESOURCES 256
169#define RESOURCE_LABEL_SIZE 16
170
171struct str_ident {
172 char name[RESOURCE_LABEL_SIZE];
173} *str_ident;
174
124 175
125#ifdef CONFIG_PM 176#ifdef CONFIG_PM
126static unsigned short wakeup_map[gpio_bank(MAX_BLACKFIN_GPIOS)]; 177static unsigned short wakeup_map[gpio_bank(MAX_BLACKFIN_GPIOS)];
@@ -141,21 +192,32 @@ static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG0_INT
141 192
142#endif /* CONFIG_PM */ 193#endif /* CONFIG_PM */
143 194
195#if defined(BF548_FAMILY)
196inline int check_gpio(unsigned short gpio)
197{
198 if (gpio == GPIO_PB15 || gpio == GPIO_PC14 || gpio == GPIO_PC15
199 || gpio == GPIO_PH14 || gpio == GPIO_PH15
200 || gpio == GPIO_PJ14 || gpio == GPIO_PJ15
201 || gpio > MAX_BLACKFIN_GPIOS)
202 return -EINVAL;
203 return 0;
204}
205#else
144inline int check_gpio(unsigned short gpio) 206inline int check_gpio(unsigned short gpio)
145{ 207{
146 if (gpio >= MAX_BLACKFIN_GPIOS) 208 if (gpio >= MAX_BLACKFIN_GPIOS)
147 return -EINVAL; 209 return -EINVAL;
148 return 0; 210 return 0;
149} 211}
212#endif
150 213
151static void set_label(unsigned short ident, const char *label) 214static void set_label(unsigned short ident, const char *label)
152{ 215{
153 216
154 if (label && str_ident) { 217 if (label && str_ident) {
155 strncpy(str_ident + ident * RESOURCE_LABEL_SIZE, label, 218 strncpy(str_ident[ident].name, label,
156 RESOURCE_LABEL_SIZE); 219 RESOURCE_LABEL_SIZE);
157 str_ident[ident * RESOURCE_LABEL_SIZE + 220 str_ident[ident].name[RESOURCE_LABEL_SIZE - 1] = 0;
158 RESOURCE_LABEL_SIZE - 1] = 0;
159 } 221 }
160} 222}
161 223
@@ -164,14 +226,13 @@ static char *get_label(unsigned short ident)
164 if (!str_ident) 226 if (!str_ident)
165 return "UNKNOWN"; 227 return "UNKNOWN";
166 228
167 return (str_ident[ident * RESOURCE_LABEL_SIZE] ? 229 return (*str_ident[ident].name ? str_ident[ident].name : "UNKNOWN");
168 (str_ident + ident * RESOURCE_LABEL_SIZE) : "UNKNOWN");
169} 230}
170 231
171static int cmp_label(unsigned short ident, const char *label) 232static int cmp_label(unsigned short ident, const char *label)
172{ 233{
173 if (label && str_ident) 234 if (label && str_ident)
174 return strncmp(str_ident + ident * RESOURCE_LABEL_SIZE, 235 return strncmp(str_ident[ident].name,
175 label, strlen(label)); 236 label, strlen(label));
176 else 237 else
177 return -EINVAL; 238 return -EINVAL;
@@ -181,50 +242,84 @@ static int cmp_label(unsigned short ident, const char *label)
181static void port_setup(unsigned short gpio, unsigned short usage) 242static void port_setup(unsigned short gpio, unsigned short usage)
182{ 243{
183 if (!check_gpio(gpio)) { 244 if (!check_gpio(gpio)) {
184 if (usage == GPIO_USAGE) { 245 if (usage == GPIO_USAGE)
185 *port_fer[gpio_bank(gpio)] &= ~gpio_bit(gpio); 246 *port_fer[gpio_bank(gpio)] &= ~gpio_bit(gpio);
186 } else 247 else
187 *port_fer[gpio_bank(gpio)] |= gpio_bit(gpio); 248 *port_fer[gpio_bank(gpio)] |= gpio_bit(gpio);
188 SSYNC(); 249 SSYNC();
189 } 250 }
190} 251}
252#elif defined(BF548_FAMILY)
253static void port_setup(unsigned short gpio, unsigned short usage)
254{
255 if (usage == GPIO_USAGE)
256 gpio_array[gpio_bank(gpio)]->port_fer &= ~gpio_bit(gpio);
257 else
258 gpio_array[gpio_bank(gpio)]->port_fer |= gpio_bit(gpio);
259 SSYNC();
260}
191#else 261#else
192# define port_setup(...) do { } while (0) 262# define port_setup(...) do { } while (0)
193#endif 263#endif
194 264
195#ifdef BF537_FAMILY 265#ifdef BF537_FAMILY
196 266static struct {
197#define PMUX_LUT_RES 0 267 unsigned short res;
198#define PMUX_LUT_OFFSET 1 268 unsigned short offset;
199#define PMUX_LUT_ENTRIES 41 269} port_mux_lut[] = {
200#define PMUX_LUT_SIZE 2 270 {.res = P_PPI0_D13, .offset = 11},
201 271 {.res = P_PPI0_D14, .offset = 11},
202static unsigned short port_mux_lut[PMUX_LUT_ENTRIES][PMUX_LUT_SIZE] = { 272 {.res = P_PPI0_D15, .offset = 11},
203 {P_PPI0_D13, 11}, {P_PPI0_D14, 11}, {P_PPI0_D15, 11}, 273 {.res = P_SPORT1_TFS, .offset = 11},
204 {P_SPORT1_TFS, 11}, {P_SPORT1_TSCLK, 11}, {P_SPORT1_DTPRI, 11}, 274 {.res = P_SPORT1_TSCLK, .offset = 11},
205 {P_PPI0_D10, 10}, {P_PPI0_D11, 10}, {P_PPI0_D12, 10}, 275 {.res = P_SPORT1_DTPRI, .offset = 11},
206 {P_SPORT1_RSCLK, 10}, {P_SPORT1_RFS, 10}, {P_SPORT1_DRPRI, 10}, 276 {.res = P_PPI0_D10, .offset = 10},
207 {P_PPI0_D8, 9}, {P_PPI0_D9, 9}, {P_SPORT1_DRSEC, 9}, 277 {.res = P_PPI0_D11, .offset = 10},
208 {P_SPORT1_DTSEC, 9}, {P_TMR2, 8}, {P_PPI0_FS3, 8}, {P_TMR3, 7}, 278 {.res = P_PPI0_D12, .offset = 10},
209 {P_SPI0_SSEL4, 7}, {P_TMR4, 6}, {P_SPI0_SSEL5, 6}, {P_TMR5, 5}, 279 {.res = P_SPORT1_RSCLK, .offset = 10},
210 {P_SPI0_SSEL6, 5}, {P_UART1_RX, 4}, {P_UART1_TX, 4}, {P_TMR6, 4}, 280 {.res = P_SPORT1_RFS, .offset = 10},
211 {P_TMR7, 4}, {P_UART0_RX, 3}, {P_UART0_TX, 3}, {P_DMAR0, 3}, 281 {.res = P_SPORT1_DRPRI, .offset = 10},
212 {P_DMAR1, 3}, {P_SPORT0_DTSEC, 1}, {P_SPORT0_DRSEC, 1}, 282 {.res = P_PPI0_D8, .offset = 9},
213 {P_CAN0_RX, 1}, {P_CAN0_TX, 1}, {P_SPI0_SSEL7, 1}, 283 {.res = P_PPI0_D9, .offset = 9},
214 {P_SPORT0_TFS, 0}, {P_SPORT0_DTPRI, 0}, {P_SPI0_SSEL2, 0}, 284 {.res = P_SPORT1_DRSEC, .offset = 9},
215 {P_SPI0_SSEL3, 0} 285 {.res = P_SPORT1_DTSEC, .offset = 9},
286 {.res = P_TMR2, .offset = 8},
287 {.res = P_PPI0_FS3, .offset = 8},
288 {.res = P_TMR3, .offset = 7},
289 {.res = P_SPI0_SSEL4, .offset = 7},
290 {.res = P_TMR4, .offset = 6},
291 {.res = P_SPI0_SSEL5, .offset = 6},
292 {.res = P_TMR5, .offset = 5},
293 {.res = P_SPI0_SSEL6, .offset = 5},
294 {.res = P_UART1_RX, .offset = 4},
295 {.res = P_UART1_TX, .offset = 4},
296 {.res = P_TMR6, .offset = 4},
297 {.res = P_TMR7, .offset = 4},
298 {.res = P_UART0_RX, .offset = 3},
299 {.res = P_UART0_TX, .offset = 3},
300 {.res = P_DMAR0, .offset = 3},
301 {.res = P_DMAR1, .offset = 3},
302 {.res = P_SPORT0_DTSEC, .offset = 1},
303 {.res = P_SPORT0_DRSEC, .offset = 1},
304 {.res = P_CAN0_RX, .offset = 1},
305 {.res = P_CAN0_TX, .offset = 1},
306 {.res = P_SPI0_SSEL7, .offset = 1},
307 {.res = P_SPORT0_TFS, .offset = 0},
308 {.res = P_SPORT0_DTPRI, .offset = 0},
309 {.res = P_SPI0_SSEL2, .offset = 0},
310 {.res = P_SPI0_SSEL3, .offset = 0},
216}; 311};
217 312
218static void portmux_setup(unsigned short per, unsigned short function) 313static void portmux_setup(unsigned short per, unsigned short function)
219{ 314{
220 u16 y, muxreg, offset; 315 u16 y, offset, muxreg;
221 316
222 for (y = 0; y < PMUX_LUT_ENTRIES; y++) { 317 for (y = 0; y < ARRAY_SIZE(port_mux_lut); y++) {
223 if (port_mux_lut[y][PMUX_LUT_RES] == per) { 318 if (port_mux_lut[y].res == per) {
224 319
225 /* SET PORTMUX REG */ 320 /* SET PORTMUX REG */
226 321
227 offset = port_mux_lut[y][PMUX_LUT_OFFSET]; 322 offset = port_mux_lut[y].offset;
228 muxreg = bfin_read_PORT_MUX(); 323 muxreg = bfin_read_PORT_MUX();
229 324
230 if (offset != 1) { 325 if (offset != 1) {
@@ -238,18 +333,42 @@ static void portmux_setup(unsigned short per, unsigned short function)
238 } 333 }
239 } 334 }
240} 335}
336#elif defined(BF548_FAMILY)
337inline void portmux_setup(unsigned short portno, unsigned short function)
338{
339 u32 pmux;
340
341 pmux = gpio_array[gpio_bank(portno)]->port_mux;
342
343 pmux &= ~(0x3 << (2 * gpio_sub_n(portno)));
344 pmux |= (function & 0x3) << (2 * gpio_sub_n(portno));
241 345
346 gpio_array[gpio_bank(portno)]->port_mux = pmux;
347}
348
349inline u16 get_portmux(unsigned short portno)
350{
351 u32 pmux;
352
353 pmux = gpio_array[gpio_bank(portno)]->port_mux;
354
355 return (pmux >> (2 * gpio_sub_n(portno)) & 0x3);
356}
242#else 357#else
243# define portmux_setup(...) do { } while (0) 358# define portmux_setup(...) do { } while (0)
244#endif 359#endif
245 360
361#ifndef BF548_FAMILY
246static void default_gpio(unsigned short gpio) 362static void default_gpio(unsigned short gpio)
247{ 363{
248 unsigned short bank, bitmask; 364 unsigned short bank, bitmask;
365 unsigned long flags;
249 366
250 bank = gpio_bank(gpio); 367 bank = gpio_bank(gpio);
251 bitmask = gpio_bit(gpio); 368 bitmask = gpio_bit(gpio);
252 369
370 local_irq_save(flags);
371
253 gpio_bankb[bank]->maska_clear = bitmask; 372 gpio_bankb[bank]->maska_clear = bitmask;
254 gpio_bankb[bank]->maskb_clear = bitmask; 373 gpio_bankb[bank]->maskb_clear = bitmask;
255 SSYNC(); 374 SSYNC();
@@ -258,24 +377,32 @@ static void default_gpio(unsigned short gpio)
258 gpio_bankb[bank]->polar &= ~bitmask; 377 gpio_bankb[bank]->polar &= ~bitmask;
259 gpio_bankb[bank]->both &= ~bitmask; 378 gpio_bankb[bank]->both &= ~bitmask;
260 gpio_bankb[bank]->edge &= ~bitmask; 379 gpio_bankb[bank]->edge &= ~bitmask;
380 AWA_DUMMY_READ(edge);
381 local_irq_restore(flags);
382
261} 383}
384#else
385# define default_gpio(...) do { } while (0)
386#endif
262 387
263static int __init bfin_gpio_init(void) 388static int __init bfin_gpio_init(void)
264{ 389{
265 390 str_ident = kcalloc(MAX_RESOURCES,
266 str_ident = kzalloc(RESOURCE_LABEL_SIZE * 256, GFP_KERNEL); 391 sizeof(struct str_ident), GFP_KERNEL);
267 if (!str_ident) 392 if (str_ident == NULL)
268 return -ENOMEM; 393 return -ENOMEM;
269 394
395 memset(str_ident, 0, MAX_RESOURCES * sizeof(struct str_ident));
396
270 printk(KERN_INFO "Blackfin GPIO Controller\n"); 397 printk(KERN_INFO "Blackfin GPIO Controller\n");
271 398
272 return 0; 399 return 0;
273 400
274} 401}
275
276arch_initcall(bfin_gpio_init); 402arch_initcall(bfin_gpio_init);
277 403
278 404
405#ifndef BF548_FAMILY
279/*********************************************************** 406/***********************************************************
280* 407*
281* FUNCTIONS: Blackfin General Purpose Ports Access Functions 408* FUNCTIONS: Blackfin General Purpose Ports Access Functions
@@ -305,6 +432,7 @@ void set_gpio_ ## name(unsigned short gpio, unsigned short arg) \
305 gpio_bankb[gpio_bank(gpio)]->name |= gpio_bit(gpio); \ 432 gpio_bankb[gpio_bank(gpio)]->name |= gpio_bit(gpio); \
306 else \ 433 else \
307 gpio_bankb[gpio_bank(gpio)]->name &= ~gpio_bit(gpio); \ 434 gpio_bankb[gpio_bank(gpio)]->name &= ~gpio_bit(gpio); \
435 AWA_DUMMY_READ(name); \
308 local_irq_restore(flags); \ 436 local_irq_restore(flags); \
309} \ 437} \
310EXPORT_SYMBOL(set_gpio_ ## name); 438EXPORT_SYMBOL(set_gpio_ ## name);
@@ -316,6 +444,22 @@ SET_GPIO(edge)
316SET_GPIO(both) 444SET_GPIO(both)
317 445
318 446
447#if ANOMALY_05000311 || ANOMALY_05000323
448#define SET_GPIO_SC(name) \
449void set_gpio_ ## name(unsigned short gpio, unsigned short arg) \
450{ \
451 unsigned long flags; \
452 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))); \
453 local_irq_save(flags); \
454 if (arg) \
455 gpio_bankb[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \
456 else \
457 gpio_bankb[gpio_bank(gpio)]->name ## _clear = gpio_bit(gpio); \
458 AWA_DUMMY_READ(name); \
459 local_irq_restore(flags); \
460} \
461EXPORT_SYMBOL(set_gpio_ ## name);
462#else
319#define SET_GPIO_SC(name) \ 463#define SET_GPIO_SC(name) \
320void set_gpio_ ## name(unsigned short gpio, unsigned short arg) \ 464void set_gpio_ ## name(unsigned short gpio, unsigned short arg) \
321{ \ 465{ \
@@ -326,37 +470,20 @@ void set_gpio_ ## name(unsigned short gpio, unsigned short arg) \
326 gpio_bankb[gpio_bank(gpio)]->name ## _clear = gpio_bit(gpio); \ 470 gpio_bankb[gpio_bank(gpio)]->name ## _clear = gpio_bit(gpio); \
327} \ 471} \
328EXPORT_SYMBOL(set_gpio_ ## name); 472EXPORT_SYMBOL(set_gpio_ ## name);
473#endif
329 474
330SET_GPIO_SC(maska) 475SET_GPIO_SC(maska)
331SET_GPIO_SC(maskb) 476SET_GPIO_SC(maskb)
332
333#if defined(ANOMALY_05000311)
334void set_gpio_data(unsigned short gpio, unsigned short arg)
335{
336 unsigned long flags;
337 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
338 local_irq_save(flags);
339 if (arg)
340 gpio_bankb[gpio_bank(gpio)]->data_set = gpio_bit(gpio);
341 else
342 gpio_bankb[gpio_bank(gpio)]->data_clear = gpio_bit(gpio);
343 bfin_read_CHIPID();
344 local_irq_restore(flags);
345}
346EXPORT_SYMBOL(set_gpio_data);
347#else
348SET_GPIO_SC(data) 477SET_GPIO_SC(data)
349#endif
350
351 478
352#if defined(ANOMALY_05000311) 479#if ANOMALY_05000311 || ANOMALY_05000323
353void set_gpio_toggle(unsigned short gpio) 480void set_gpio_toggle(unsigned short gpio)
354{ 481{
355 unsigned long flags; 482 unsigned long flags;
356 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))); 483 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
357 local_irq_save(flags); 484 local_irq_save(flags);
358 gpio_bankb[gpio_bank(gpio)]->toggle = gpio_bit(gpio); 485 gpio_bankb[gpio_bank(gpio)]->toggle = gpio_bit(gpio);
359 bfin_read_CHIPID(); 486 AWA_DUMMY_READ(toggle);
360 local_irq_restore(flags); 487 local_irq_restore(flags);
361} 488}
362#else 489#else
@@ -371,13 +498,27 @@ EXPORT_SYMBOL(set_gpio_toggle);
371 498
372/*Set current PORT date (16-bit word)*/ 499/*Set current PORT date (16-bit word)*/
373 500
501#if ANOMALY_05000311 || ANOMALY_05000323
374#define SET_GPIO_P(name) \ 502#define SET_GPIO_P(name) \
375void set_gpiop_ ## name(unsigned short gpio, unsigned short arg) \ 503void set_gpiop_ ## name(unsigned short gpio, unsigned short arg) \
376{ \ 504{ \
505 unsigned long flags; \
506 local_irq_save(flags); \
377 gpio_bankb[gpio_bank(gpio)]->name = arg; \ 507 gpio_bankb[gpio_bank(gpio)]->name = arg; \
508 AWA_DUMMY_READ(name); \
509 local_irq_restore(flags); \
378} \ 510} \
379EXPORT_SYMBOL(set_gpiop_ ## name); 511EXPORT_SYMBOL(set_gpiop_ ## name);
512#else
513#define SET_GPIO_P(name) \
514void set_gpiop_ ## name(unsigned short gpio, unsigned short arg) \
515{ \
516 gpio_bankb[gpio_bank(gpio)]->name = arg; \
517} \
518EXPORT_SYMBOL(set_gpiop_ ## name);
519#endif
380 520
521SET_GPIO_P(data)
381SET_GPIO_P(dir) 522SET_GPIO_P(dir)
382SET_GPIO_P(inen) 523SET_GPIO_P(inen)
383SET_GPIO_P(polar) 524SET_GPIO_P(polar)
@@ -387,31 +528,30 @@ SET_GPIO_P(maska)
387SET_GPIO_P(maskb) 528SET_GPIO_P(maskb)
388 529
389 530
390#if defined(ANOMALY_05000311)
391void set_gpiop_data(unsigned short gpio, unsigned short arg)
392{
393 unsigned long flags;
394 local_irq_save(flags);
395 gpio_bankb[gpio_bank(gpio)]->data = arg;
396 bfin_read_CHIPID();
397 local_irq_restore(flags);
398}
399EXPORT_SYMBOL(set_gpiop_data);
400#else
401SET_GPIO_P(data)
402#endif
403
404
405
406/* Get a specific bit */ 531/* Get a specific bit */
407 532#if ANOMALY_05000311 || ANOMALY_05000323
533#define GET_GPIO(name) \
534unsigned short get_gpio_ ## name(unsigned short gpio) \
535{ \
536 unsigned long flags; \
537 unsigned short ret; \
538 local_irq_save(flags); \
539 ret = 0x01 & (gpio_bankb[gpio_bank(gpio)]->name >> gpio_sub_n(gpio)); \
540 AWA_DUMMY_READ(name); \
541 local_irq_restore(flags); \
542 return ret; \
543} \
544EXPORT_SYMBOL(get_gpio_ ## name);
545#else
408#define GET_GPIO(name) \ 546#define GET_GPIO(name) \
409unsigned short get_gpio_ ## name(unsigned short gpio) \ 547unsigned short get_gpio_ ## name(unsigned short gpio) \
410{ \ 548{ \
411 return (0x01 & (gpio_bankb[gpio_bank(gpio)]->name >> gpio_sub_n(gpio))); \ 549 return (0x01 & (gpio_bankb[gpio_bank(gpio)]->name >> gpio_sub_n(gpio))); \
412} \ 550} \
413EXPORT_SYMBOL(get_gpio_ ## name); 551EXPORT_SYMBOL(get_gpio_ ## name);
552#endif
414 553
554GET_GPIO(data)
415GET_GPIO(dir) 555GET_GPIO(dir)
416GET_GPIO(inen) 556GET_GPIO(inen)
417GET_GPIO(polar) 557GET_GPIO(polar)
@@ -420,33 +560,31 @@ GET_GPIO(both)
420GET_GPIO(maska) 560GET_GPIO(maska)
421GET_GPIO(maskb) 561GET_GPIO(maskb)
422 562
423
424#if defined(ANOMALY_05000311)
425unsigned short get_gpio_data(unsigned short gpio)
426{
427 unsigned long flags;
428 unsigned short ret;
429 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
430 local_irq_save(flags);
431 ret = 0x01 & (gpio_bankb[gpio_bank(gpio)]->data >> gpio_sub_n(gpio));
432 bfin_read_CHIPID();
433 local_irq_restore(flags);
434 return ret;
435}
436EXPORT_SYMBOL(get_gpio_data);
437#else
438GET_GPIO(data)
439#endif
440
441/*Get current PORT date (16-bit word)*/ 563/*Get current PORT date (16-bit word)*/
442 564
565#if ANOMALY_05000311 || ANOMALY_05000323
566#define GET_GPIO_P(name) \
567unsigned short get_gpiop_ ## name(unsigned short gpio) \
568{ \
569 unsigned long flags; \
570 unsigned short ret; \
571 local_irq_save(flags); \
572 ret = (gpio_bankb[gpio_bank(gpio)]->name); \
573 AWA_DUMMY_READ(name); \
574 local_irq_restore(flags); \
575 return ret; \
576} \
577EXPORT_SYMBOL(get_gpiop_ ## name);
578#else
443#define GET_GPIO_P(name) \ 579#define GET_GPIO_P(name) \
444unsigned short get_gpiop_ ## name(unsigned short gpio) \ 580unsigned short get_gpiop_ ## name(unsigned short gpio) \
445{ \ 581{ \
446 return (gpio_bankb[gpio_bank(gpio)]->name);\ 582 return (gpio_bankb[gpio_bank(gpio)]->name);\
447} \ 583} \
448EXPORT_SYMBOL(get_gpiop_ ## name); 584EXPORT_SYMBOL(get_gpiop_ ## name);
585#endif
449 586
587GET_GPIO_P(data)
450GET_GPIO_P(dir) 588GET_GPIO_P(dir)
451GET_GPIO_P(inen) 589GET_GPIO_P(inen)
452GET_GPIO_P(polar) 590GET_GPIO_P(polar)
@@ -455,21 +593,6 @@ GET_GPIO_P(both)
455GET_GPIO_P(maska) 593GET_GPIO_P(maska)
456GET_GPIO_P(maskb) 594GET_GPIO_P(maskb)
457 595
458#if defined(ANOMALY_05000311)
459unsigned short get_gpiop_data(unsigned short gpio)
460{
461 unsigned long flags;
462 unsigned short ret;
463 local_irq_save(flags);
464 ret = gpio_bankb[gpio_bank(gpio)]->data;
465 bfin_read_CHIPID();
466 local_irq_restore(flags);
467 return ret;
468}
469EXPORT_SYMBOL(get_gpiop_data);
470#else
471GET_GPIO_P(data)
472#endif
473 596
474#ifdef CONFIG_PM 597#ifdef CONFIG_PM
475/*********************************************************** 598/***********************************************************
@@ -593,6 +716,8 @@ u32 gpio_pm_setup(void)
593 } 716 }
594 } 717 }
595 718
719 AWA_DUMMY_READ(maskb_set);
720
596 if (sic_iwr) 721 if (sic_iwr)
597 return sic_iwr; 722 return sic_iwr;
598 else 723 else
@@ -624,12 +749,99 @@ void gpio_pm_restore(void)
624 749
625 gpio_bankb[bank]->maskb = gpio_bank_saved[bank].maskb; 750 gpio_bankb[bank]->maskb = gpio_bank_saved[bank].maskb;
626 } 751 }
752 AWA_DUMMY_READ(maskb);
627} 753}
628 754
629#endif 755#endif
756#endif /* BF548_FAMILY */
630 757
758/***********************************************************
759*
760* FUNCTIONS: Blackfin Peripheral Resource Allocation
761* and PortMux Setup
762*
763* INPUTS/OUTPUTS:
764* per Peripheral Identifier
765* label String
766*
767* DESCRIPTION: Blackfin Peripheral Resource Allocation and Setup API
768*
769* CAUTION:
770*************************************************************
771* MODIFICATION HISTORY :
772**************************************************************/
773
774#ifdef BF548_FAMILY
775int peripheral_request(unsigned short per, const char *label)
776{
777 unsigned long flags;
778 unsigned short ident = P_IDENT(per);
779
780 /*
781 * Don't cares are pins with only one dedicated function
782 */
783
784 if (per & P_DONTCARE)
785 return 0;
786
787 if (!(per & P_DEFINED))
788 return -ENODEV;
789
790 if (check_gpio(ident) < 0)
791 return -EINVAL;
792
793 local_irq_save(flags);
794
795 if (unlikely(reserved_gpio_map[gpio_bank(ident)] & gpio_bit(ident))) {
796 printk(KERN_ERR
797 "%s: Peripheral %d is already reserved as GPIO by %s !\n",
798 __FUNCTION__, ident, get_label(ident));
799 dump_stack();
800 local_irq_restore(flags);
801 return -EBUSY;
802 }
803
804 if (unlikely(reserved_peri_map[gpio_bank(ident)] & gpio_bit(ident))) {
805
806 u16 funct = get_portmux(ident);
807
808 /*
809 * Pin functions like AMC address strobes my
810 * be requested and used by several drivers
811 */
812
813 if (!((per & P_MAYSHARE) && (funct == P_FUNCT2MUX(per)))) {
814
815 /*
816 * Allow that the identical pin function can
817 * be requested from the same driver twice
818 */
819
820 if (cmp_label(ident, label) == 0)
821 goto anyway;
631 822
823 printk(KERN_ERR
824 "%s: Peripheral %d function %d is already reserved by %s !\n",
825 __FUNCTION__, ident, P_FUNCT2MUX(per), get_label(ident));
826 dump_stack();
827 local_irq_restore(flags);
828 return -EBUSY;
829 }
830 }
632 831
832anyway:
833 reserved_peri_map[gpio_bank(ident)] |= gpio_bit(ident);
834
835 portmux_setup(ident, P_FUNCT2MUX(per));
836 port_setup(ident, PERIPHERAL_USAGE);
837
838 local_irq_restore(flags);
839 set_label(ident, label);
840
841 return 0;
842}
843EXPORT_SYMBOL(peripheral_request);
844#else
633 845
634int peripheral_request(unsigned short per, const char *label) 846int peripheral_request(unsigned short per, const char *label)
635{ 847{
@@ -680,7 +892,7 @@ int peripheral_request(unsigned short per, const char *label)
680 892
681 printk(KERN_ERR 893 printk(KERN_ERR
682 "%s: Peripheral %d function %d is already" 894 "%s: Peripheral %d function %d is already"
683 "reserved by %s !\n", 895 " reserved by %s !\n",
684 __FUNCTION__, ident, P_FUNCT2MUX(per), 896 __FUNCTION__, ident, P_FUNCT2MUX(per),
685 get_label(ident)); 897 get_label(ident));
686 dump_stack(); 898 dump_stack();
@@ -691,8 +903,6 @@ int peripheral_request(unsigned short per, const char *label)
691 } 903 }
692 904
693anyway: 905anyway:
694
695
696 portmux_setup(per, P_FUNCT2MUX(per)); 906 portmux_setup(per, P_FUNCT2MUX(per));
697 907
698 port_setup(ident, PERIPHERAL_USAGE); 908 port_setup(ident, PERIPHERAL_USAGE);
@@ -704,6 +914,7 @@ anyway:
704 return 0; 914 return 0;
705} 915}
706EXPORT_SYMBOL(peripheral_request); 916EXPORT_SYMBOL(peripheral_request);
917#endif
707 918
708int peripheral_request_list(unsigned short per[], const char *label) 919int peripheral_request_list(unsigned short per[], const char *label)
709{ 920{
@@ -711,9 +922,15 @@ int peripheral_request_list(unsigned short per[], const char *label)
711 int ret; 922 int ret;
712 923
713 for (cnt = 0; per[cnt] != 0; cnt++) { 924 for (cnt = 0; per[cnt] != 0; cnt++) {
925
714 ret = peripheral_request(per[cnt], label); 926 ret = peripheral_request(per[cnt], label);
715 if (ret < 0) 927
716 return ret; 928 if (ret < 0) {
929 for ( ; cnt > 0; cnt--) {
930 peripheral_free(per[cnt - 1]);
931 }
932 return ret;
933 }
717 } 934 }
718 935
719 return 0; 936 return 0;
@@ -748,6 +965,8 @@ void peripheral_free(unsigned short per)
748 965
749 reserved_peri_map[gpio_bank(ident)] &= ~gpio_bit(ident); 966 reserved_peri_map[gpio_bank(ident)] &= ~gpio_bit(ident);
750 967
968 set_label(ident, "free");
969
751 local_irq_restore(flags); 970 local_irq_restore(flags);
752} 971}
753EXPORT_SYMBOL(peripheral_free); 972EXPORT_SYMBOL(peripheral_free);
@@ -768,8 +987,8 @@ EXPORT_SYMBOL(peripheral_free_list);
768* FUNCTIONS: Blackfin GPIO Driver 987* FUNCTIONS: Blackfin GPIO Driver
769* 988*
770* INPUTS/OUTPUTS: 989* INPUTS/OUTPUTS:
771* gpio - GPIO Number between 0 and MAX_BLACKFIN_GPIOS 990* gpio PIO Number between 0 and MAX_BLACKFIN_GPIOS
772* 991* label String
773* 992*
774* DESCRIPTION: Blackfin GPIO Driver API 993* DESCRIPTION: Blackfin GPIO Driver API
775* 994*
@@ -787,17 +1006,39 @@ int gpio_request(unsigned short gpio, const char *label)
787 1006
788 local_irq_save(flags); 1007 local_irq_save(flags);
789 1008
1009 /*
1010 * Allow that the identical GPIO can
1011 * be requested from the same driver twice
1012 * Do nothing and return -
1013 */
1014
1015 if (cmp_label(gpio, label) == 0) {
1016 local_irq_restore(flags);
1017 return 0;
1018 }
1019
790 if (unlikely(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) { 1020 if (unlikely(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
791 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved!\n", gpio); 1021 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n",
1022 gpio, get_label(gpio));
792 dump_stack(); 1023 dump_stack();
793 local_irq_restore(flags); 1024 local_irq_restore(flags);
794 return -EBUSY; 1025 return -EBUSY;
795 } 1026 }
1027 if (unlikely(reserved_peri_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
1028 printk(KERN_ERR
1029 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n",
1030 gpio, get_label(gpio));
1031 dump_stack();
1032 local_irq_restore(flags);
1033 return -EBUSY;
1034 }
1035
796 reserved_gpio_map[gpio_bank(gpio)] |= gpio_bit(gpio); 1036 reserved_gpio_map[gpio_bank(gpio)] |= gpio_bit(gpio);
797 1037
798 local_irq_restore(flags); 1038 local_irq_restore(flags);
799 1039
800 port_setup(gpio, GPIO_USAGE); 1040 port_setup(gpio, GPIO_USAGE);
1041 set_label(gpio, label);
801 1042
802 return 0; 1043 return 0;
803} 1044}
@@ -823,10 +1064,57 @@ void gpio_free(unsigned short gpio)
823 1064
824 reserved_gpio_map[gpio_bank(gpio)] &= ~gpio_bit(gpio); 1065 reserved_gpio_map[gpio_bank(gpio)] &= ~gpio_bit(gpio);
825 1066
1067 set_label(gpio, "free");
1068
826 local_irq_restore(flags); 1069 local_irq_restore(flags);
827} 1070}
828EXPORT_SYMBOL(gpio_free); 1071EXPORT_SYMBOL(gpio_free);
829 1072
1073#ifdef BF548_FAMILY
1074void gpio_direction_input(unsigned short gpio)
1075{
1076 unsigned long flags;
1077
1078 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
1079
1080 local_irq_save(flags);
1081 gpio_array[gpio_bank(gpio)]->port_dir_clear = gpio_bit(gpio);
1082 gpio_array[gpio_bank(gpio)]->port_inen |= gpio_bit(gpio);
1083 local_irq_restore(flags);
1084}
1085EXPORT_SYMBOL(gpio_direction_input);
1086
1087void gpio_direction_output(unsigned short gpio)
1088{
1089 unsigned long flags;
1090
1091 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
1092
1093 local_irq_save(flags);
1094 gpio_array[gpio_bank(gpio)]->port_inen &= ~gpio_bit(gpio);
1095 gpio_array[gpio_bank(gpio)]->port_dir_set = gpio_bit(gpio);
1096 local_irq_restore(flags);
1097}
1098EXPORT_SYMBOL(gpio_direction_output);
1099
1100void gpio_set_value(unsigned short gpio, unsigned short arg)
1101{
1102 if (arg)
1103 gpio_array[gpio_bank(gpio)]->port_set = gpio_bit(gpio);
1104 else
1105 gpio_array[gpio_bank(gpio)]->port_clear = gpio_bit(gpio);
1106
1107}
1108EXPORT_SYMBOL(gpio_set_value);
1109
1110unsigned short gpio_get_value(unsigned short gpio)
1111{
1112 return (1 & (gpio_array[gpio_bank(gpio)]->port_data >> gpio_sub_n(gpio)));
1113}
1114EXPORT_SYMBOL(gpio_get_value);
1115
1116#else
1117
830void gpio_direction_input(unsigned short gpio) 1118void gpio_direction_input(unsigned short gpio)
831{ 1119{
832 unsigned long flags; 1120 unsigned long flags;
@@ -836,6 +1124,7 @@ void gpio_direction_input(unsigned short gpio)
836 local_irq_save(flags); 1124 local_irq_save(flags);
837 gpio_bankb[gpio_bank(gpio)]->dir &= ~gpio_bit(gpio); 1125 gpio_bankb[gpio_bank(gpio)]->dir &= ~gpio_bit(gpio);
838 gpio_bankb[gpio_bank(gpio)]->inen |= gpio_bit(gpio); 1126 gpio_bankb[gpio_bank(gpio)]->inen |= gpio_bit(gpio);
1127 AWA_DUMMY_READ(inen);
839 local_irq_restore(flags); 1128 local_irq_restore(flags);
840} 1129}
841EXPORT_SYMBOL(gpio_direction_input); 1130EXPORT_SYMBOL(gpio_direction_input);
@@ -849,6 +1138,28 @@ void gpio_direction_output(unsigned short gpio)
849 local_irq_save(flags); 1138 local_irq_save(flags);
850 gpio_bankb[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio); 1139 gpio_bankb[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio);
851 gpio_bankb[gpio_bank(gpio)]->dir |= gpio_bit(gpio); 1140 gpio_bankb[gpio_bank(gpio)]->dir |= gpio_bit(gpio);
1141 AWA_DUMMY_READ(dir);
852 local_irq_restore(flags); 1142 local_irq_restore(flags);
853} 1143}
854EXPORT_SYMBOL(gpio_direction_output); 1144EXPORT_SYMBOL(gpio_direction_output);
1145
1146/* If we are booting from SPI and our board lacks a strong enough pull up,
1147 * the core can reset and execute the bootrom faster than the resistor can
1148 * pull the signal logically high. To work around this (common) error in
1149 * board design, we explicitly set the pin back to GPIO mode, force /CS
1150 * high, and wait for the electrons to do their thing.
1151 *
1152 * This function only makes sense to be called from reset code, but it
1153 * lives here as we need to force all the GPIO states w/out going through
1154 * BUG() checks and such.
1155 */
1156void bfin_gpio_reset_spi0_ssel1(void)
1157{
1158 u16 gpio = P_IDENT(P_SPI0_SSEL1);
1159
1160 port_setup(gpio, GPIO_USAGE);
1161 gpio_bankb[gpio_bank(gpio)]->data_set = gpio_bit(gpio);
1162 udelay(1);
1163}
1164
1165#endif /*BF548_FAMILY */
diff --git a/arch/blackfin/kernel/bfin_ksyms.c b/arch/blackfin/kernel/bfin_ksyms.c
index 70455949cfd2..2198afe40f33 100644
--- a/arch/blackfin/kernel/bfin_ksyms.c
+++ b/arch/blackfin/kernel/bfin_ksyms.c
@@ -60,6 +60,7 @@ EXPORT_SYMBOL(csum_partial_copy);
60 * their interface isn't gonna change any time soon now, so 60 * their interface isn't gonna change any time soon now, so
61 * it's OK to leave it out of version control. 61 * it's OK to leave it out of version control.
62 */ 62 */
63EXPORT_SYMBOL(strcpy);
63EXPORT_SYMBOL(memcpy); 64EXPORT_SYMBOL(memcpy);
64EXPORT_SYMBOL(memset); 65EXPORT_SYMBOL(memset);
65EXPORT_SYMBOL(memcmp); 66EXPORT_SYMBOL(memcmp);
diff --git a/arch/blackfin/kernel/cacheinit.c b/arch/blackfin/kernel/cacheinit.c
index 4d41a40e8133..62cbba7364b0 100644
--- a/arch/blackfin/kernel/cacheinit.c
+++ b/arch/blackfin/kernel/cacheinit.c
@@ -21,9 +21,10 @@
21 21
22#include <asm/cacheflush.h> 22#include <asm/cacheflush.h>
23#include <asm/blackfin.h> 23#include <asm/blackfin.h>
24#include <asm/cplb.h>
24#include <asm/cplbinit.h> 25#include <asm/cplbinit.h>
25 26
26#if defined(CONFIG_BLKFIN_CACHE) 27#if defined(CONFIG_BFIN_ICACHE)
27void bfin_icache_init(void) 28void bfin_icache_init(void)
28{ 29{
29 unsigned long *table = icplb_table; 30 unsigned long *table = icplb_table;
@@ -44,7 +45,7 @@ void bfin_icache_init(void)
44} 45}
45#endif 46#endif
46 47
47#if defined(CONFIG_BLKFIN_DCACHE) 48#if defined(CONFIG_BFIN_DCACHE)
48void bfin_dcache_init(void) 49void bfin_dcache_init(void)
49{ 50{
50 unsigned long *table = dcplb_table; 51 unsigned long *table = dcplb_table;
diff --git a/arch/blackfin/kernel/cplbinit.c b/arch/blackfin/kernel/cplbinit.c
index bbdb403fcb55..f2db6a5e2b5b 100644
--- a/arch/blackfin/kernel/cplbinit.c
+++ b/arch/blackfin/kernel/cplbinit.c
@@ -23,6 +23,7 @@
23#include <linux/module.h> 23#include <linux/module.h>
24 24
25#include <asm/blackfin.h> 25#include <asm/blackfin.h>
26#include <asm/cplb.h>
26#include <asm/cplbinit.h> 27#include <asm/cplbinit.h>
27 28
28u_long icplb_table[MAX_CPLBS+1]; 29u_long icplb_table[MAX_CPLBS+1];
@@ -56,7 +57,7 @@ struct s_cplb {
56 struct cplb_tab switch_d; 57 struct cplb_tab switch_d;
57}; 58};
58 59
59#if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE) 60#if defined(CONFIG_BFIN_DCACHE) || defined(CONFIG_BFIN_ICACHE)
60static struct cplb_desc cplb_data[] = { 61static struct cplb_desc cplb_data[] = {
61 { 62 {
62 .start = 0, 63 .start = 0,
@@ -230,8 +231,8 @@ static void __fill_code_cplbtab(struct cplb_tab *t, int i, u32 a_start, u32 a_en
230 cplb_data[i].psize, 231 cplb_data[i].psize,
231 cplb_data[i].i_conf); 232 cplb_data[i].i_conf);
232 } else { 233 } else {
233#if (defined(CONFIG_BLKFIN_CACHE) && defined(ANOMALY_05000263)) 234#if defined(CONFIG_BFIN_ICACHE)
234 if (i == SDRAM_KERN) { 235 if (ANOMALY_05000263 && i == SDRAM_KERN) {
235 fill_cplbtab(t, 236 fill_cplbtab(t,
236 cplb_data[i].start, 237 cplb_data[i].start,
237 cplb_data[i].end, 238 cplb_data[i].end,
diff --git a/arch/blackfin/kernel/early_printk.c b/arch/blackfin/kernel/early_printk.c
new file mode 100644
index 000000000000..6ec518a81113
--- /dev/null
+++ b/arch/blackfin/kernel/early_printk.c
@@ -0,0 +1,214 @@
1/*
2 * File: arch/blackfin/kernel/early_printk.c
3 * Based on: arch/x86_64/kernel/early_printk.c
4 * Author: Robin Getz <rgetz@blackfin.uclinux.org
5 *
6 * Created: 14Aug2007
7 * Description: allow a console to be used for early printk
8 *
9 * Modified:
10 * Copyright 2004-2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 */
24
25#include <linux/kernel.h>
26#include <linux/init.h>
27#include <linux/serial_core.h>
28#include <linux/console.h>
29#include <linux/string.h>
30#include <asm/blackfin.h>
31#include <asm/irq_handler.h>
32#include <asm/early_printk.h>
33
34#ifdef CONFIG_SERIAL_BFIN
35extern struct console *bfin_earlyserial_init(unsigned int port,
36 unsigned int cflag);
37#endif
38
39static struct console *early_console;
40
41/* Default console */
42#define DEFAULT_PORT 0
43#define DEFAULT_CFLAG CS8|B57600
44
45/* Default console for early crashes */
46#define DEFAULT_EARLY_PORT "serial,uart0,57600"
47
48#ifdef CONFIG_SERIAL_CORE
49/* What should get here is "0,57600" */
50static struct console * __init earlyserial_init(char *buf)
51{
52 int baud, bit;
53 char parity;
54 unsigned int serial_port = DEFAULT_PORT;
55 unsigned int cflag = DEFAULT_CFLAG;
56
57 serial_port = simple_strtoul(buf, &buf, 10);
58 buf++;
59
60 cflag = 0;
61 baud = simple_strtoul(buf, &buf, 10);
62 switch (baud) {
63 case 1200:
64 cflag |= B1200;
65 break;
66 case 2400:
67 cflag |= B2400;
68 break;
69 case 4800:
70 cflag |= B4800;
71 break;
72 case 9600:
73 cflag |= B9600;
74 break;
75 case 19200:
76 cflag |= B19200;
77 break;
78 case 38400:
79 cflag |= B38400;
80 break;
81 case 115200:
82 cflag |= B115200;
83 break;
84 default:
85 cflag |= B57600;
86 }
87
88 parity = buf[0];
89 buf++;
90 switch (parity) {
91 case 'e':
92 cflag |= PARENB;
93 break;
94 case 'o':
95 cflag |= PARODD;
96 break;
97 }
98
99 bit = simple_strtoul(buf, &buf, 10);
100 switch (bit) {
101 case 5:
102 cflag |= CS5;
103 break;
104 case 6:
105 cflag |= CS5;
106 break;
107 case 7:
108 cflag |= CS5;
109 break;
110 default:
111 cflag |= CS8;
112 }
113
114#ifdef CONFIG_SERIAL_BFIN
115 return bfin_earlyserial_init(serial_port, cflag);
116#else
117 return NULL;
118#endif
119
120}
121#endif
122
123int __init setup_early_printk(char *buf)
124{
125
126 /* Crashing in here would be really bad, so check both the var
127 and the pointer before we start using it
128 */
129 if (!buf)
130 return 0;
131
132 if (!*buf)
133 return 0;
134
135 if (early_console != NULL)
136 return 0;
137
138#ifdef CONFIG_SERIAL_BFIN
139 /* Check for Blackfin Serial */
140 if (!strncmp(buf, "serial,uart", 11)) {
141 buf += 11;
142 early_console = earlyserial_init(buf);
143 }
144#endif
145#ifdef CONFIG_FB
146 /* TODO: add framebuffer console support */
147#endif
148
149 if (likely(early_console)) {
150 early_console->flags |= CON_BOOT;
151
152 register_console(early_console);
153 printk(KERN_INFO "early printk enabled on %s%d\n",
154 early_console->name,
155 early_console->index);
156 }
157
158 return 0;
159}
160
161/*
162 * Set up a temporary Event Vector Table, so if something bad happens before
163 * the kernel is fully started, it doesn't vector off into somewhere we don't
164 * know
165 */
166
167asmlinkage void __init init_early_exception_vectors(void)
168{
169 SSYNC();
170
171 /* cannot program in software:
172 * evt0 - emulation (jtag)
173 * evt1 - reset
174 */
175 bfin_write_EVT2(early_trap);
176 bfin_write_EVT3(early_trap);
177 bfin_write_EVT5(early_trap);
178 bfin_write_EVT6(early_trap);
179 bfin_write_EVT7(early_trap);
180 bfin_write_EVT8(early_trap);
181 bfin_write_EVT9(early_trap);
182 bfin_write_EVT10(early_trap);
183 bfin_write_EVT11(early_trap);
184 bfin_write_EVT12(early_trap);
185 bfin_write_EVT13(early_trap);
186 bfin_write_EVT14(early_trap);
187 bfin_write_EVT15(early_trap);
188 CSYNC();
189
190 /* Set all the return from interupt, exception, NMI to a known place
191 * so if we do a RETI, RETX or RETN by mistake - we go somewhere known
192 * Note - don't change RETS - we are in a subroutine, or
193 * RETE - since it might screw up if emulator is attached
194 */
195 asm("\tRETI = %0; RETX = %0; RETN = %0;\n"
196 : : "p"(early_trap));
197
198}
199
200asmlinkage void __init early_trap_c(struct pt_regs *fp, void *retaddr)
201{
202 /* This can happen before the uart is initialized, so initialize
203 * the UART now
204 */
205 if (likely(early_console == NULL))
206 setup_early_printk(DEFAULT_EARLY_PORT);
207
208 dump_bfin_regs(fp, retaddr);
209 dump_bfin_trace_buffer();
210
211 panic("Died early");
212}
213
214early_param("earlyprintk", setup_early_printk);
diff --git a/arch/blackfin/kernel/irqchip.c b/arch/blackfin/kernel/irqchip.c
index 1fc001c7abda..73647c158774 100644
--- a/arch/blackfin/kernel/irqchip.c
+++ b/arch/blackfin/kernel/irqchip.c
@@ -34,6 +34,7 @@
34#include <linux/kallsyms.h> 34#include <linux/kallsyms.h>
35#include <linux/interrupt.h> 35#include <linux/interrupt.h>
36#include <linux/irq.h> 36#include <linux/irq.h>
37#include <asm/trace.h>
37 38
38static unsigned long irq_err_count; 39static unsigned long irq_err_count;
39static spinlock_t irq_controller_lock; 40static spinlock_t irq_controller_lock;
@@ -97,9 +98,8 @@ int show_interrupts(struct seq_file *p, void *v)
97 */ 98 */
98 99
99#ifdef CONFIG_DO_IRQ_L1 100#ifdef CONFIG_DO_IRQ_L1
100asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs)__attribute__((l1_text)); 101__attribute__((l1_text))
101#endif 102#endif
102
103asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs) 103asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
104{ 104{
105 struct pt_regs *old_regs; 105 struct pt_regs *old_regs;
@@ -144,4 +144,12 @@ void __init init_IRQ(void)
144 } 144 }
145 145
146 init_arch_irq(); 146 init_arch_irq();
147
148#ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND
149 /* Now that evt_ivhw is set up, turn this on */
150 trace_buff_offset = 0;
151 bfin_write_TBUFCTL(BFIN_TRACE_ON);
152 printk(KERN_INFO "Hardware Trace expanded to %ik\n",
153 1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN);
154#endif
147} 155}
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index 6a7aefe48346..9124467651c4 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -134,31 +134,6 @@ void cpu_idle(void)
134 } 134 }
135} 135}
136 136
137void machine_restart(char *__unused)
138{
139#if defined(CONFIG_BLKFIN_CACHE)
140 bfin_write_IMEM_CONTROL(0x01);
141 SSYNC();
142#endif
143 bfin_reset();
144 /* Dont do anything till the reset occurs */
145 while (1) {
146 SSYNC();
147 }
148}
149
150void machine_halt(void)
151{
152 for (;;)
153 asm volatile ("idle");
154}
155
156void machine_power_off(void)
157{
158 for (;;)
159 asm volatile ("idle");
160}
161
162void show_regs(struct pt_regs *regs) 137void show_regs(struct pt_regs *regs)
163{ 138{
164 printk(KERN_NOTICE "\n"); 139 printk(KERN_NOTICE "\n");
@@ -420,7 +395,8 @@ void finish_atomic_sections (struct pt_regs *regs)
420#if defined(CONFIG_ACCESS_CHECK) 395#if defined(CONFIG_ACCESS_CHECK)
421int _access_ok(unsigned long addr, unsigned long size) 396int _access_ok(unsigned long addr, unsigned long size)
422{ 397{
423 398 if (size == 0)
399 return 1;
424 if (addr > (addr + size)) 400 if (addr > (addr + size))
425 return 0; 401 return 0;
426 if (segment_eq(get_fs(), KERNEL_DS)) 402 if (segment_eq(get_fs(), KERNEL_DS))
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c
index ed800c7456dd..64ce5fea8609 100644
--- a/arch/blackfin/kernel/ptrace.c
+++ b/arch/blackfin/kernel/ptrace.c
@@ -44,6 +44,7 @@
44#include <asm/processor.h> 44#include <asm/processor.h>
45#include <asm/asm-offsets.h> 45#include <asm/asm-offsets.h>
46#include <asm/dma.h> 46#include <asm/dma.h>
47#include <asm/fixed_code.h>
47 48
48#define MAX_SHARED_LIBS 3 49#define MAX_SHARED_LIBS 3
49#define TEXT_OFFSET 0 50#define TEXT_OFFSET 0
@@ -169,6 +170,9 @@ static inline int is_user_addr_valid(struct task_struct *child,
169 && start + len <= (unsigned long)sraml->addr + sraml->length) 170 && start + len <= (unsigned long)sraml->addr + sraml->length)
170 return 0; 171 return 0;
171 172
173 if (start >= FIXED_CODE_START && start + len <= FIXED_CODE_END)
174 return 0;
175
172 return -EIO; 176 return -EIO;
173} 177}
174 178
@@ -215,9 +219,13 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
215 copied = sizeof(tmp); 219 copied = sizeof(tmp);
216 } else 220 } else
217#endif 221#endif
218 copied = 222 if (addr + add >= FIXED_CODE_START
219 access_process_vm(child, addr + add, &tmp, 223 && addr + add + sizeof(tmp) <= FIXED_CODE_END) {
220 sizeof(tmp), 0); 224 memcpy(&tmp, (const void *)(addr + add), sizeof(tmp));
225 copied = sizeof(tmp);
226 } else
227 copied = access_process_vm(child, addr + add, &tmp,
228 sizeof(tmp), 0);
221 pr_debug("ptrace: copied size %d [0x%08lx]\n", copied, tmp); 229 pr_debug("ptrace: copied size %d [0x%08lx]\n", copied, tmp);
222 if (copied != sizeof(tmp)) 230 if (copied != sizeof(tmp))
223 break; 231 break;
@@ -281,9 +289,13 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
281 copied = sizeof(data); 289 copied = sizeof(data);
282 } else 290 } else
283#endif 291#endif
284 copied = 292 if (addr + add >= FIXED_CODE_START
285 access_process_vm(child, addr + add, &data, 293 && addr + add + sizeof(data) <= FIXED_CODE_END) {
286 sizeof(data), 1); 294 memcpy((void *)(addr + add), &data, sizeof(data));
295 copied = sizeof(data);
296 } else
297 copied = access_process_vm(child, addr + add, &data,
298 sizeof(data), 1);
287 pr_debug("ptrace: copied size %d\n", copied); 299 pr_debug("ptrace: copied size %d\n", copied);
288 if (copied != sizeof(data)) 300 if (copied != sizeof(data))
289 break; 301 break;
diff --git a/arch/blackfin/kernel/reboot.c b/arch/blackfin/kernel/reboot.c
new file mode 100644
index 000000000000..356078ec462b
--- /dev/null
+++ b/arch/blackfin/kernel/reboot.c
@@ -0,0 +1,78 @@
1/*
2 * arch/blackfin/kernel/reboot.c - handle shutdown/reboot
3 *
4 * Copyright 2004-2007 Analog Devices Inc.
5 *
6 * Licensed under the GPL-2 or later.
7 */
8
9#include <linux/interrupt.h>
10#include <asm/bfin-global.h>
11#include <asm/reboot.h>
12#include <asm/system.h>
13
14#if defined(BF537_FAMILY) || defined(BF533_FAMILY)
15#define SYSCR_VAL 0x0
16#elif defined(BF561_FAMILY)
17#define SYSCR_VAL 0x20
18#elif defined(BF548_FAMILY)
19#define SYSCR_VAL 0x10
20#endif
21
22/* A system soft reset makes external memory unusable
23 * so force this function into L1.
24 */
25__attribute__((l1_text))
26void bfin_reset(void)
27{
28 /* force BMODE and disable Core B (as needed) */
29 bfin_write_SYSCR(SYSCR_VAL);
30
31 /* we use asm ssync here because it's save and we save some L1 */
32 asm("ssync;");
33
34 while (1) {
35 /* initiate system soft reset with magic 0x7 */
36 bfin_write_SWRST(0x7);
37 asm("ssync;");
38 /* clear system soft reset */
39 bfin_write_SWRST(0);
40 asm("ssync;");
41 /* issue core reset */
42 asm("raise 1");
43 }
44}
45
46__attribute__((weak))
47void native_machine_restart(char *cmd)
48{
49}
50
51void machine_restart(char *cmd)
52{
53 native_machine_restart(cmd);
54 local_irq_disable();
55 bfin_reset();
56}
57
58__attribute__((weak))
59void native_machine_halt(void)
60{
61 idle_with_irq_disabled();
62}
63
64void machine_halt(void)
65{
66 native_machine_halt();
67}
68
69__attribute__((weak))
70void native_machine_power_off(void)
71{
72 idle_with_irq_disabled();
73}
74
75void machine_power_off(void)
76{
77 native_machine_power_off();
78}
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index 88f221b89b33..8dcd76e87ed5 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -39,10 +39,12 @@
39#include <linux/cramfs_fs.h> 39#include <linux/cramfs_fs.h>
40#include <linux/romfs_fs.h> 40#include <linux/romfs_fs.h>
41 41
42#include <asm/cplb.h>
42#include <asm/cacheflush.h> 43#include <asm/cacheflush.h>
43#include <asm/blackfin.h> 44#include <asm/blackfin.h>
44#include <asm/cplbinit.h> 45#include <asm/cplbinit.h>
45#include <asm/fixed_code.h> 46#include <asm/fixed_code.h>
47#include <asm/early_printk.h>
46 48
47u16 _bfin_swrst; 49u16 _bfin_swrst;
48 50
@@ -66,21 +68,21 @@ char __initdata command_line[COMMAND_LINE_SIZE];
66 68
67void __init bf53x_cache_init(void) 69void __init bf53x_cache_init(void)
68{ 70{
69#if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE) 71#if defined(CONFIG_BFIN_DCACHE) || defined(CONFIG_BFIN_ICACHE)
70 generate_cpl_tables(); 72 generate_cpl_tables();
71#endif 73#endif
72 74
73#ifdef CONFIG_BLKFIN_CACHE 75#ifdef CONFIG_BFIN_ICACHE
74 bfin_icache_init(); 76 bfin_icache_init();
75 printk(KERN_INFO "Instruction Cache Enabled\n"); 77 printk(KERN_INFO "Instruction Cache Enabled\n");
76#endif 78#endif
77 79
78#ifdef CONFIG_BLKFIN_DCACHE 80#ifdef CONFIG_BFIN_DCACHE
79 bfin_dcache_init(); 81 bfin_dcache_init();
80 printk(KERN_INFO "Data Cache Enabled" 82 printk(KERN_INFO "Data Cache Enabled"
81# if defined CONFIG_BLKFIN_WB 83# if defined CONFIG_BFIN_WB
82 " (write-back)" 84 " (write-back)"
83# elif defined CONFIG_BLKFIN_WT 85# elif defined CONFIG_BFIN_WT
84 " (write-through)" 86 " (write-through)"
85# endif 87# endif
86 "\n"); 88 "\n");
@@ -156,8 +158,10 @@ static __init void parse_cmdline_early(char *cmdline_p)
156 1; 158 1;
157 } 159 }
158 } 160 }
161 } else if (!memcmp(to, "earlyprintk=", 12)) {
162 to += 12;
163 setup_early_printk(to);
159 } 164 }
160
161 } 165 }
162 c = *(to++); 166 c = *(to++);
163 if (!c) 167 if (!c)
@@ -176,22 +180,36 @@ void __init setup_arch(char **cmdline_p)
176#ifdef CONFIG_DUMMY_CONSOLE 180#ifdef CONFIG_DUMMY_CONSOLE
177 conswitchp = &dummy_con; 181 conswitchp = &dummy_con;
178#endif 182#endif
183
184#if defined(CONFIG_CMDLINE_BOOL)
185 strncpy(&command_line[0], CONFIG_CMDLINE, sizeof(command_line));
186 command_line[sizeof(command_line) - 1] = 0;
187#endif
188
189 /* Keep a copy of command line */
190 *cmdline_p = &command_line[0];
191 memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
192 boot_command_line[COMMAND_LINE_SIZE - 1] = '\0';
193
194 /* setup memory defaults from the user config */
195 physical_mem_end = 0;
196 _ramend = CONFIG_MEM_SIZE * 1024 * 1024;
197
198 parse_cmdline_early(&command_line[0]);
199
179 cclk = get_cclk(); 200 cclk = get_cclk();
180 sclk = get_sclk(); 201 sclk = get_sclk();
181 202
182#if !defined(CONFIG_BFIN_KERNEL_CLOCK) && defined(ANOMALY_05000273) 203#if !defined(CONFIG_BFIN_KERNEL_CLOCK)
183 if (cclk == sclk) 204 if (ANOMALY_05000273 && cclk == sclk)
184 panic("ANOMALY 05000273, SCLK can not be same as CCLK"); 205 panic("ANOMALY 05000273, SCLK can not be same as CCLK");
185#endif 206#endif
186 207
187#if defined(ANOMALY_05000266) 208#ifdef BF561_FAMILY
188 bfin_read_IMDMA_D0_IRQ_STATUS(); 209 if (ANOMALY_05000266) {
189 bfin_read_IMDMA_D1_IRQ_STATUS(); 210 bfin_read_IMDMA_D0_IRQ_STATUS();
190#endif 211 bfin_read_IMDMA_D1_IRQ_STATUS();
191 212 }
192#ifdef DEBUG_SERIAL_EARLY_INIT
193 bfin_console_init(); /* early console registration */
194 /* this give a chance to get printk() working before crash. */
195#endif 213#endif
196 214
197 printk(KERN_INFO "Hardware Trace "); 215 printk(KERN_INFO "Hardware Trace ");
@@ -212,22 +230,6 @@ void __init setup_arch(char **cmdline_p)
212 flash_probe(); 230 flash_probe();
213#endif 231#endif
214 232
215#if defined(CONFIG_CMDLINE_BOOL)
216 strncpy(&command_line[0], CONFIG_CMDLINE, sizeof(command_line));
217 command_line[sizeof(command_line) - 1] = 0;
218#endif
219
220 /* Keep a copy of command line */
221 *cmdline_p = &command_line[0];
222 memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
223 boot_command_line[COMMAND_LINE_SIZE - 1] = '\0';
224
225 /* setup memory defaults from the user config */
226 physical_mem_end = 0;
227 _ramend = CONFIG_MEM_SIZE * 1024 * 1024;
228
229 parse_cmdline_early(&command_line[0]);
230
231 if (physical_mem_end == 0) 233 if (physical_mem_end == 0)
232 physical_mem_end = _ramend; 234 physical_mem_end = _ramend;
233 235
@@ -260,7 +262,7 @@ void __init setup_arch(char **cmdline_p)
260 && ((unsigned long *)mtd_phys)[1] == ROMSB_WORD1) 262 && ((unsigned long *)mtd_phys)[1] == ROMSB_WORD1)
261 mtd_size = 263 mtd_size =
262 PAGE_ALIGN(be32_to_cpu(((unsigned long *)mtd_phys)[2])); 264 PAGE_ALIGN(be32_to_cpu(((unsigned long *)mtd_phys)[2]));
263# if (defined(CONFIG_BLKFIN_CACHE) && defined(ANOMALY_05000263)) 265# if (defined(CONFIG_BFIN_ICACHE) && ANOMALY_05000263)
264 /* Due to a Hardware Anomaly we need to limit the size of usable 266 /* Due to a Hardware Anomaly we need to limit the size of usable
265 * instruction memory to max 60MB, 56 if HUNT_FOR_ZERO is on 267 * instruction memory to max 60MB, 56 if HUNT_FOR_ZERO is on
266 * 05000263 - Hardware loop corrupted when taking an ICPLB exception 268 * 05000263 - Hardware loop corrupted when taking an ICPLB exception
@@ -289,7 +291,7 @@ void __init setup_arch(char **cmdline_p)
289 _ebss = memory_mtd_start; /* define _ebss for compatible */ 291 _ebss = memory_mtd_start; /* define _ebss for compatible */
290#endif /* CONFIG_MTD_UCLINUX */ 292#endif /* CONFIG_MTD_UCLINUX */
291 293
292#if (defined(CONFIG_BLKFIN_CACHE) && defined(ANOMALY_05000263)) 294#if (defined(CONFIG_BFIN_ICACHE) && ANOMALY_05000263)
293 /* Due to a Hardware Anomaly we need to limit the size of usable 295 /* Due to a Hardware Anomaly we need to limit the size of usable
294 * instruction memory to max 60MB, 56 if HUNT_FOR_ZERO is on 296 * instruction memory to max 60MB, 56 if HUNT_FOR_ZERO is on
295 * 05000263 - Hardware loop corrupted when taking an ICPLB exception 297 * 05000263 - Hardware loop corrupted when taking an ICPLB exception
@@ -334,13 +336,11 @@ void __init setup_arch(char **cmdline_p)
334 CPU, bfin_revid()); 336 CPU, bfin_revid());
335 printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n"); 337 printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n");
336 338
337 printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu Mhz System Clock\n", 339 printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n",
338 cclk / 1000000, sclk / 1000000); 340 cclk / 1000000, sclk / 1000000);
339 341
340#if defined(ANOMALY_05000273) 342 if (ANOMALY_05000273 && (cclk >> 1) <= sclk)
341 if ((cclk >> 1) <= sclk)
342 printk("\n\n\nANOMALY_05000273: CCLK must be >= 2*SCLK !!!\n\n\n"); 343 printk("\n\n\nANOMALY_05000273: CCLK must be >= 2*SCLK !!!\n\n\n");
343#endif
344 344
345 printk(KERN_INFO "Board Memory: %ldMB\n", physical_mem_end >> 20); 345 printk(KERN_INFO "Board Memory: %ldMB\n", physical_mem_end >> 20);
346 printk(KERN_INFO "Kernel Managed Memory: %ldMB\n", _ramend >> 20); 346 printk(KERN_INFO "Kernel Managed Memory: %ldMB\n", _ramend >> 20);
@@ -535,9 +535,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
535 seq_printf(m, "I-CACHE:\tOFF\n"); 535 seq_printf(m, "I-CACHE:\tOFF\n");
536 if ((bfin_read_DMEM_CONTROL()) & (ENDCPLB | DMC_ENABLE)) 536 if ((bfin_read_DMEM_CONTROL()) & (ENDCPLB | DMC_ENABLE))
537 seq_printf(m, "D-CACHE:\tON" 537 seq_printf(m, "D-CACHE:\tON"
538#if defined CONFIG_BLKFIN_WB 538#if defined CONFIG_BFIN_WB
539 " (write-back)" 539 " (write-back)"
540#elif defined CONFIG_BLKFIN_WT 540#elif defined CONFIG_BFIN_WT
541 " (write-through)" 541 " (write-through)"
542#endif 542#endif
543 "\n"); 543 "\n");
@@ -566,15 +566,15 @@ static int show_cpuinfo(struct seq_file *m, void *v)
566 } 566 }
567 567
568 568
569 seq_printf(m, "I-CACHE Size:\t%dKB\n", BLKFIN_ICACHESIZE / 1024); 569 seq_printf(m, "I-CACHE Size:\t%dKB\n", BFIN_ICACHESIZE / 1024);
570 seq_printf(m, "D-CACHE Size:\t%dKB\n", dcache_size); 570 seq_printf(m, "D-CACHE Size:\t%dKB\n", dcache_size);
571 seq_printf(m, "I-CACHE Setup:\t%d Sub-banks/%d Ways, %d Lines/Way\n", 571 seq_printf(m, "I-CACHE Setup:\t%d Sub-banks/%d Ways, %d Lines/Way\n",
572 BLKFIN_ISUBBANKS, BLKFIN_IWAYS, BLKFIN_ILINES); 572 BFIN_ISUBBANKS, BFIN_IWAYS, BFIN_ILINES);
573 seq_printf(m, 573 seq_printf(m,
574 "D-CACHE Setup:\t%d Super-banks/%d Sub-banks/%d Ways, %d Lines/Way\n", 574 "D-CACHE Setup:\t%d Super-banks/%d Sub-banks/%d Ways, %d Lines/Way\n",
575 dsup_banks, BLKFIN_DSUBBANKS, BLKFIN_DWAYS, 575 dsup_banks, BFIN_DSUBBANKS, BFIN_DWAYS,
576 BLKFIN_DLINES); 576 BFIN_DLINES);
577#ifdef CONFIG_BLKFIN_CACHE_LOCK 577#ifdef CONFIG_BFIN_ICACHE_LOCK
578 switch (read_iloc()) { 578 switch (read_iloc()) {
579 case WAY0_L: 579 case WAY0_L:
580 seq_printf(m, "Way0 Locked-Down\n"); 580 seq_printf(m, "Way0 Locked-Down\n");
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index 792a8416fe10..8823e9ade584 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -51,10 +51,9 @@ void __init trap_init(void)
51 CSYNC(); 51 CSYNC();
52} 52}
53 53
54asmlinkage void trap_c(struct pt_regs *fp);
55
56int kstack_depth_to_print = 48; 54int kstack_depth_to_print = 48;
57 55
56#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
58static int printk_address(unsigned long address) 57static int printk_address(unsigned long address)
59{ 58{
60 struct vm_list_struct *vml; 59 struct vm_list_struct *vml;
@@ -131,10 +130,22 @@ static int printk_address(unsigned long address)
131 /* we were unable to find this address anywhere */ 130 /* we were unable to find this address anywhere */
132 return printk("[<0x%p>]", (void *)address); 131 return printk("[<0x%p>]", (void *)address);
133} 132}
133#endif
134
135asmlinkage void double_fault_c(struct pt_regs *fp)
136{
137 printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n");
138 dump_bfin_regs(fp, (void *)fp->retx);
139 panic("Double Fault - unrecoverable event\n");
140
141}
134 142
135asmlinkage void trap_c(struct pt_regs *fp) 143asmlinkage void trap_c(struct pt_regs *fp)
136{ 144{
137 int j, sig = 0; 145#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
146 int j;
147#endif
148 int sig = 0;
138 siginfo_t info; 149 siginfo_t info;
139 unsigned long trapnr = fp->seqstat & SEQSTAT_EXCAUSE; 150 unsigned long trapnr = fp->seqstat & SEQSTAT_EXCAUSE;
140 151
@@ -391,10 +402,6 @@ asmlinkage void trap_c(struct pt_regs *fp)
391 break; 402 break;
392 } 403 }
393 404
394 info.si_signo = sig;
395 info.si_errno = 0;
396 info.si_addr = (void *)fp->pc;
397 force_sig_info(sig, &info, current);
398 if (sig != 0 && sig != SIGTRAP) { 405 if (sig != 0 && sig != SIGTRAP) {
399 unsigned long stack; 406 unsigned long stack;
400 dump_bfin_regs(fp, (void *)fp->retx); 407 dump_bfin_regs(fp, (void *)fp->retx);
@@ -403,6 +410,10 @@ asmlinkage void trap_c(struct pt_regs *fp)
403 if (current->mm == NULL) 410 if (current->mm == NULL)
404 panic("Kernel exception"); 411 panic("Kernel exception");
405 } 412 }
413 info.si_signo = sig;
414 info.si_errno = 0;
415 info.si_addr = (void *)fp->pc;
416 force_sig_info(sig, &info, current);
406 417
407 /* if the address that we are about to return to is not valid, set it 418 /* if the address that we are about to return to is not valid, set it
408 * to a valid address, if we have a current application or panic 419 * to a valid address, if we have a current application or panic
@@ -429,24 +440,56 @@ asmlinkage void trap_c(struct pt_regs *fp)
429 440
430/* Typical exception handling routines */ 441/* Typical exception handling routines */
431 442
443#define EXPAND_LEN ((1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN) * 256 - 1)
444
432void dump_bfin_trace_buffer(void) 445void dump_bfin_trace_buffer(void)
433{ 446{
434 int tflags; 447#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
448 int tflags, i = 0;
449#ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND
450 int j, index;
451#endif
452
435 trace_buffer_save(tflags); 453 trace_buffer_save(tflags);
436 454
455 printk(KERN_EMERG "Hardware Trace:\n");
456
437 if (likely(bfin_read_TBUFSTAT() & TBUFCNT)) { 457 if (likely(bfin_read_TBUFSTAT() & TBUFCNT)) {
438 int i; 458 for (; bfin_read_TBUFSTAT() & TBUFCNT; i++) {
439 printk(KERN_EMERG "Hardware Trace:\n"); 459 printk(KERN_EMERG "%4i Target : ", i);
440 for (i = 0; bfin_read_TBUFSTAT() & TBUFCNT; i++) {
441 printk(KERN_EMERG "%2i Target : ", i);
442 printk_address((unsigned long)bfin_read_TBUF()); 460 printk_address((unsigned long)bfin_read_TBUF());
443 printk("\n" KERN_EMERG " Source : "); 461 printk("\n" KERN_EMERG " Source : ");
444 printk_address((unsigned long)bfin_read_TBUF()); 462 printk_address((unsigned long)bfin_read_TBUF());
445 printk("\n"); 463 printk("\n");
446 } 464 }
447 } 465 }
448 466
467#ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND
468 if (trace_buff_offset)
469 index = trace_buff_offset/4 - 1;
470 else
471 index = EXPAND_LEN;
472
473 j = (1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN) * 128;
474 while (j) {
475 printk(KERN_EMERG "%4i Target : ", i);
476 printk_address(software_trace_buff[index]);
477 index -= 1;
478 if (index < 0 )
479 index = EXPAND_LEN;
480 printk("\n" KERN_EMERG " Source : ");
481 printk_address(software_trace_buff[index]);
482 index -= 1;
483 if (index < 0)
484 index = EXPAND_LEN;
485 printk("\n");
486 j--;
487 i++;
488 }
489#endif
490
449 trace_buffer_restore(tflags); 491 trace_buffer_restore(tflags);
492#endif
450} 493}
451EXPORT_SYMBOL(dump_bfin_trace_buffer); 494EXPORT_SYMBOL(dump_bfin_trace_buffer);
452 495
@@ -510,7 +553,9 @@ void show_stack(struct task_struct *task, unsigned long *stack)
510void dump_stack(void) 553void dump_stack(void)
511{ 554{
512 unsigned long stack; 555 unsigned long stack;
556#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
513 int tflags; 557 int tflags;
558#endif
514 trace_buffer_save(tflags); 559 trace_buffer_save(tflags);
515 dump_bfin_trace_buffer(); 560 dump_bfin_trace_buffer();
516 show_stack(current, &stack); 561 show_stack(current, &stack);
@@ -559,8 +604,7 @@ void dump_bfin_regs(struct pt_regs *fp, void *retaddr)
559 unsigned short x = 0; 604 unsigned short x = 0;
560 for (; i < ((unsigned int)retaddr & 0xFFFFFFF0) + 32; i += 2) { 605 for (; i < ((unsigned int)retaddr & 0xFFFFFFF0) + 32; i += 2) {
561 if (!(i & 0xF)) 606 if (!(i & 0xF))
562 printk(KERN_EMERG "\n" KERN_EMERG 607 printk("\n" KERN_EMERG "0x%08x: ", i);
563 "0x%08x: ", i);
564 608
565 if (get_user(x, (unsigned short *)i)) 609 if (get_user(x, (unsigned short *)i))
566 break; 610 break;
@@ -655,6 +699,42 @@ asmlinkage int sys_bfin_spinlock(int *spinlock)
655 return ret; 699 return ret;
656} 700}
657 701
702int bfin_request_exception(unsigned int exception, void (*handler)(void))
703{
704 void (*curr_handler)(void);
705
706 if (exception > 0x3F)
707 return -EINVAL;
708
709 curr_handler = ex_table[exception];
710
711 if (curr_handler != ex_replaceable)
712 return -EBUSY;
713
714 ex_table[exception] = handler;
715
716 return 0;
717}
718EXPORT_SYMBOL(bfin_request_exception);
719
720int bfin_free_exception(unsigned int exception, void (*handler)(void))
721{
722 void (*curr_handler)(void);
723
724 if (exception > 0x3F)
725 return -EINVAL;
726
727 curr_handler = ex_table[exception];
728
729 if (curr_handler != handler)
730 return -EBUSY;
731
732 ex_table[exception] = ex_replaceable;
733
734 return 0;
735}
736EXPORT_SYMBOL(bfin_free_exception);
737
658void panic_cplb_error(int cplb_panic, struct pt_regs *fp) 738void panic_cplb_error(int cplb_panic, struct pt_regs *fp)
659{ 739{
660 switch (cplb_panic) { 740 switch (cplb_panic) {
diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S
index fb53780247bc..eec43674a465 100644
--- a/arch/blackfin/kernel/vmlinux.lds.S
+++ b/arch/blackfin/kernel/vmlinux.lds.S
@@ -49,7 +49,8 @@ SECTIONS
49 TEXT_TEXT 49 TEXT_TEXT
50 SCHED_TEXT 50 SCHED_TEXT
51 LOCK_TEXT 51 LOCK_TEXT
52 *(.text.lock) 52 KPROBES_TEXT
53 *(.text.*)
53 *(.fixup) 54 *(.fixup)
54 55
55 . = ALIGN(16); 56 . = ALIGN(16);
@@ -61,7 +62,7 @@ SECTIONS
61 __etext = .; 62 __etext = .;
62 } 63 }
63 64
64 RODATA 65 RO_DATA(PAGE_SIZE)
65 66
66 .data : 67 .data :
67 { 68 {
@@ -72,50 +73,63 @@ SECTIONS
72 __sdata = .; 73 __sdata = .;
73 . = ALIGN(THREAD_SIZE); 74 . = ALIGN(THREAD_SIZE);
74 *(.data.init_task) 75 *(.data.init_task)
75 DATA_DATA
76 CONSTRUCTORS
77 76
78 . = ALIGN(32); 77 . = ALIGN(32);
79 *(.data.cacheline_aligned) 78 *(.data.cacheline_aligned)
80 79
80 DATA_DATA
81 *(.data.*)
82 CONSTRUCTORS
83
81 . = ALIGN(THREAD_SIZE); 84 . = ALIGN(THREAD_SIZE);
82 __edata = .; 85 __edata = .;
83 } 86 }
84 87
85 ___init_begin = .; 88 ___init_begin = .;
86 .init : 89
90 .init.text :
87 { 91 {
88 . = ALIGN(PAGE_SIZE); 92 . = ALIGN(PAGE_SIZE);
89 __sinittext = .; 93 __sinittext = .;
90 *(.init.text) 94 *(.init.text)
91 __einittext = .; 95 __einittext = .;
96 }
97 .init.data :
98 {
99 . = ALIGN(16);
92 *(.init.data) 100 *(.init.data)
101 }
102 .init.setup :
103 {
93 . = ALIGN(16); 104 . = ALIGN(16);
94 ___setup_start = .; 105 ___setup_start = .;
95 *(.init.setup) 106 *(.init.setup)
96 ___setup_end = .; 107 ___setup_end = .;
97 ___start___param = .; 108 }
98 *(__param) 109 .initcall.init :
99 ___stop___param = .; 110 {
100 ___initcall_start = .; 111 ___initcall_start = .;
101 INITCALLS 112 INITCALLS
102 ___initcall_end = .; 113 ___initcall_end = .;
114 }
115 .con_initcall.init :
116 {
103 ___con_initcall_start = .; 117 ___con_initcall_start = .;
104 *(.con_initcall.init) 118 *(.con_initcall.init)
105 ___con_initcall_end = .; 119 ___con_initcall_end = .;
106 ___security_initcall_start = .; 120 }
107 *(.security_initcall.init) 121 SECURITY_INIT
108 ___security_initcall_end = .; 122 .init.ramfs :
123 {
109 . = ALIGN(4); 124 . = ALIGN(4);
110 ___initramfs_start = .; 125 ___initramfs_start = .;
111 *(.init.ramfs) 126 *(.init.ramfs)
112 ___initramfs_end = .; 127 ___initramfs_end = .;
113 . = ALIGN(4);
114 } 128 }
115 129
116 __l1_lma_start = .; 130 __l1_lma_start = .;
117 131
118 .text_l1 L1_CODE_START : AT(LOADADDR(.init) + SIZEOF(.init)) 132 .text_l1 L1_CODE_START : AT(LOADADDR(.init.ramfs) + SIZEOF(.init.ramfs))
119 { 133 {
120 . = ALIGN(4); 134 . = ALIGN(4);
121 __stext_l1 = .; 135 __stext_l1 = .;
@@ -164,13 +178,19 @@ SECTIONS
164 { 178 {
165 . = ALIGN(4); 179 . = ALIGN(4);
166 ___bss_start = .; 180 ___bss_start = .;
167 *(.bss) 181 *(.bss .bss.*)
168 *(COMMON) 182 *(COMMON)
169 . = ALIGN(4); 183 . = ALIGN(4);
170 ___bss_stop = .; 184 ___bss_stop = .;
171 __end = .; 185 __end = .;
172 } 186 }
173 187
188 STABS_DEBUG
189
190 DWARF_DEBUG
191
192 NOTES
193
174 /DISCARD/ : 194 /DISCARD/ :
175 { 195 {
176 *(.exit.text) 196 *(.exit.text)
diff --git a/arch/blackfin/lib/memcmp.S b/arch/blackfin/lib/memcmp.S
index b88c5d2d1ebe..219fa2877c62 100644
--- a/arch/blackfin/lib/memcmp.S
+++ b/arch/blackfin/lib/memcmp.S
@@ -61,7 +61,7 @@ ENTRY(_memcmp)
61 61
62 LSETUP (.Lquad_loop_s, .Lquad_loop_e) LC0=P1; 62 LSETUP (.Lquad_loop_s, .Lquad_loop_e) LC0=P1;
63.Lquad_loop_s: 63.Lquad_loop_s:
64#ifdef ANOMALY_05000202 64#if ANOMALY_05000202
65 R0 = [P0++]; 65 R0 = [P0++];
66 R1 = [I0++]; 66 R1 = [I0++];
67#else 67#else
diff --git a/arch/blackfin/lib/memcpy.S b/arch/blackfin/lib/memcpy.S
index 14a5585bbd02..2e6336492b4b 100644
--- a/arch/blackfin/lib/memcpy.S
+++ b/arch/blackfin/lib/memcpy.S
@@ -98,7 +98,7 @@ ENTRY(_memcpy)
98 R0 = R1; 98 R0 = R1;
99 I1 = P1; 99 I1 = P1;
100 R3 = [I1++]; 100 R3 = [I1++];
101#ifdef ANOMALY_05000202 101#if ANOMALY_05000202
102.Lword_loops: 102.Lword_loops:
103 [P0++] = R3; 103 [P0++] = R3;
104.Lword_loope: 104.Lword_loope:
diff --git a/arch/blackfin/lib/memmove.S b/arch/blackfin/lib/memmove.S
index 6ee6e206e77c..33f8653145b7 100644
--- a/arch/blackfin/lib/memmove.S
+++ b/arch/blackfin/lib/memmove.S
@@ -70,7 +70,7 @@ ENTRY(_memmove)
70 R1 = [I0++]; 70 R1 = [I0++];
71 71
72 LSETUP (.Lquad_loops, .Lquad_loope) LC0=P1; 72 LSETUP (.Lquad_loops, .Lquad_loope) LC0=P1;
73#ifdef ANOMALY_05000202 73#if ANOMALY_05000202
74.Lquad_loops: 74.Lquad_loops:
75 [P0++] = R1; 75 [P0++] = R1;
76.Lquad_loope: 76.Lquad_loope:
@@ -102,7 +102,7 @@ ENTRY(_memmove)
102 R1 = B[P3--] (Z); 102 R1 = B[P3--] (Z);
103 CC = P2 == 0; 103 CC = P2 == 0;
104 IF CC JUMP .Lno_loop; 104 IF CC JUMP .Lno_loop;
105#ifdef ANOMALY_05000245 105#if ANOMALY_05000245
106 NOP; 106 NOP;
107 NOP; 107 NOP;
108#endif 108#endif
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index 4545f363e641..a57b52d207cd 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -34,7 +34,9 @@
34#include <linux/spi/spi.h> 34#include <linux/spi/spi.h>
35#include <linux/spi/flash.h> 35#include <linux/spi/flash.h>
36#include <linux/usb_isp1362.h> 36#include <linux/usb_isp1362.h>
37#include <linux/pata_platform.h>
37#include <linux/irq.h> 38#include <linux/irq.h>
39#include <asm/dma.h>
38#include <asm/bfin5xx_spi.h> 40#include <asm/bfin5xx_spi.h>
39 41
40/* 42/*
@@ -93,7 +95,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
93 /* the modalias must be the same as spi device driver name */ 95 /* the modalias must be the same as spi device driver name */
94 .modalias = "m25p80", /* Name of spi_driver for this device */ 96 .modalias = "m25p80", /* Name of spi_driver for this device */
95 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 97 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
96 .bus_num = 1, /* Framework bus number */ 98 .bus_num = 0, /* Framework bus number */
97 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/ 99 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
98 .platform_data = &bfin_spi_flash_data, 100 .platform_data = &bfin_spi_flash_data,
99 .controller_data = &spi_flash_chip_info, 101 .controller_data = &spi_flash_chip_info,
@@ -101,7 +103,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
101 }, { 103 }, {
102 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 104 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
103 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 105 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
104 .bus_num = 1, /* Framework bus number */ 106 .bus_num = 0, /* Framework bus number */
105 .chip_select = 2, /* Framework chip select. */ 107 .chip_select = 2, /* Framework chip select. */
106 .platform_data = NULL, /* No spi_driver specific config */ 108 .platform_data = NULL, /* No spi_driver specific config */
107 .controller_data = &spi_adc_chip_info, 109 .controller_data = &spi_adc_chip_info,
@@ -110,24 +112,40 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
110 { 112 {
111 .modalias = "ad1836-spi", 113 .modalias = "ad1836-spi",
112 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 114 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
113 .bus_num = 1, 115 .bus_num = 0,
114 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 116 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
115 .controller_data = &ad1836_spi_chip_info, 117 .controller_data = &ad1836_spi_chip_info,
116 }, 118 },
117#endif 119#endif
118}; 120};
119 121
122/* SPI (0) */
123static struct resource bfin_spi0_resource[] = {
124 [0] = {
125 .start = SPI0_REGBASE,
126 .end = SPI0_REGBASE + 0xFF,
127 .flags = IORESOURCE_MEM,
128 },
129 [1] = {
130 .start = CH_SPI,
131 .end = CH_SPI,
132 .flags = IORESOURCE_IRQ,
133 }
134};
135
120/* SPI controller data */ 136/* SPI controller data */
121static struct bfin5xx_spi_master spi_bfin_master_info = { 137static struct bfin5xx_spi_master bfin_spi0_info = {
122 .num_chipselect = 8, 138 .num_chipselect = 8,
123 .enable_dma = 1, /* master has the ability to do dma transfer */ 139 .enable_dma = 1, /* master has the ability to do dma transfer */
124}; 140};
125 141
126static struct platform_device spi_bfin_master_device = { 142static struct platform_device bfin_spi0_device = {
127 .name = "bfin-spi-master", 143 .name = "bfin-spi",
128 .id = 1, /* Bus number */ 144 .id = 0, /* Bus number */
145 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
146 .resource = bfin_spi0_resource,
129 .dev = { 147 .dev = {
130 .platform_data = &spi_bfin_master_info, /* Passed to driver */ 148 .platform_data = &bfin_spi0_info, /* Passed to driver */
131 }, 149 },
132}; 150};
133#endif /* spi master and devices */ 151#endif /* spi master and devices */
@@ -227,6 +245,43 @@ static struct platform_device isp1362_hcd_device = {
227}; 245};
228#endif 246#endif
229 247
248#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
249#define PATA_INT 38
250
251static struct pata_platform_info bfin_pata_platform_data = {
252 .ioport_shift = 2,
253 .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
254};
255
256static struct resource bfin_pata_resources[] = {
257 {
258 .start = 0x2030C000,
259 .end = 0x2030C01F,
260 .flags = IORESOURCE_MEM,
261 },
262 {
263 .start = 0x2030D018,
264 .end = 0x2030D01B,
265 .flags = IORESOURCE_MEM,
266 },
267 {
268 .start = PATA_INT,
269 .end = PATA_INT,
270 .flags = IORESOURCE_IRQ,
271 },
272};
273
274static struct platform_device bfin_pata_device = {
275 .name = "pata_platform",
276 .id = -1,
277 .num_resources = ARRAY_SIZE(bfin_pata_resources),
278 .resource = bfin_pata_resources,
279 .dev = {
280 .platform_data = &bfin_pata_platform_data,
281 }
282};
283#endif
284
230static struct platform_device *cm_bf533_devices[] __initdata = { 285static struct platform_device *cm_bf533_devices[] __initdata = {
231#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 286#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
232 &bfin_uart_device, 287 &bfin_uart_device,
@@ -250,7 +305,11 @@ static struct platform_device *cm_bf533_devices[] __initdata = {
250#endif 305#endif
251 306
252#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 307#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
253 &spi_bfin_master_device, 308 &bfin_spi0_device,
309#endif
310
311#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
312 &bfin_pata_device,
254#endif 313#endif
255}; 314};
256 315
@@ -261,6 +320,10 @@ static int __init cm_bf533_init(void)
261#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 320#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
262 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 321 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
263#endif 322#endif
323
324#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
325 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
326#endif
264 return 0; 327 return 0;
265} 328}
266 329
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index 0000b8f1239c..5c1e35d3c012 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -35,7 +35,9 @@
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/spi/flash.h> 36#include <linux/spi/flash.h>
37#include <linux/usb_isp1362.h> 37#include <linux/usb_isp1362.h>
38#include <linux/pata_platform.h>
38#include <linux/irq.h> 39#include <linux/irq.h>
40#include <asm/dma.h>
39#include <asm/bfin5xx_spi.h> 41#include <asm/bfin5xx_spi.h>
40 42
41/* 43/*
@@ -50,6 +52,12 @@ static struct platform_device rtc_device = {
50}; 52};
51#endif 53#endif
52 54
55#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
56static struct platform_device bfin_fb_adv7393_device = {
57 .name = "bfin-adv7393",
58};
59#endif
60
53/* 61/*
54 * USB-LAN EzExtender board 62 * USB-LAN EzExtender board
55 * Driver needs to know address, irq and flag pin. 63 * Driver needs to know address, irq and flag pin.
@@ -131,7 +139,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
131 /* the modalias must be the same as spi device driver name */ 139 /* the modalias must be the same as spi device driver name */
132 .modalias = "m25p80", /* Name of spi_driver for this device */ 140 .modalias = "m25p80", /* Name of spi_driver for this device */
133 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 141 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
134 .bus_num = 1, /* Framework bus number */ 142 .bus_num = 0, /* Framework bus number */
135 .chip_select = 2, /* Framework chip select. On STAMP537 it is SPISSEL2*/ 143 .chip_select = 2, /* Framework chip select. On STAMP537 it is SPISSEL2*/
136 .platform_data = &bfin_spi_flash_data, 144 .platform_data = &bfin_spi_flash_data,
137 .controller_data = &spi_flash_chip_info, 145 .controller_data = &spi_flash_chip_info,
@@ -143,7 +151,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
143 { 151 {
144 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 152 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
145 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 153 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
146 .bus_num = 1, /* Framework bus number */ 154 .bus_num = 0, /* Framework bus number */
147 .chip_select = 1, /* Framework chip select. */ 155 .chip_select = 1, /* Framework chip select. */
148 .platform_data = NULL, /* No spi_driver specific config */ 156 .platform_data = NULL, /* No spi_driver specific config */
149 .controller_data = &spi_adc_chip_info, 157 .controller_data = &spi_adc_chip_info,
@@ -154,24 +162,40 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
154 { 162 {
155 .modalias = "ad1836-spi", 163 .modalias = "ad1836-spi",
156 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 164 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
157 .bus_num = 1, 165 .bus_num = 0,
158 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 166 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
159 .controller_data = &ad1836_spi_chip_info, 167 .controller_data = &ad1836_spi_chip_info,
160 }, 168 },
161#endif 169#endif
162}; 170};
163 171
172/* SPI (0) */
173static struct resource bfin_spi0_resource[] = {
174 [0] = {
175 .start = SPI0_REGBASE,
176 .end = SPI0_REGBASE + 0xFF,
177 .flags = IORESOURCE_MEM,
178 },
179 [1] = {
180 .start = CH_SPI,
181 .end = CH_SPI,
182 .flags = IORESOURCE_IRQ,
183 }
184};
185
164/* SPI controller data */ 186/* SPI controller data */
165static struct bfin5xx_spi_master spi_bfin_master_info = { 187static struct bfin5xx_spi_master bfin_spi0_info = {
166 .num_chipselect = 8, 188 .num_chipselect = 8,
167 .enable_dma = 1, /* master has the ability to do dma transfer */ 189 .enable_dma = 1, /* master has the ability to do dma transfer */
168}; 190};
169 191
170static struct platform_device spi_bfin_master_device = { 192static struct platform_device bfin_spi0_device = {
171 .name = "bfin-spi-master", 193 .name = "bfin-spi",
172 .id = 1, /* Bus number */ 194 .id = 0, /* Bus number */
195 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
196 .resource = bfin_spi0_resource,
173 .dev = { 197 .dev = {
174 .platform_data = &spi_bfin_master_info, /* Passed to driver */ 198 .platform_data = &bfin_spi0_info, /* Passed to driver */
175 }, 199 },
176}; 200};
177#endif /* spi master and devices */ 201#endif /* spi master and devices */
@@ -193,13 +217,54 @@ static struct platform_device bfin_uart_device = {
193}; 217};
194#endif 218#endif
195 219
220#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
221#define PATA_INT 55
222
223static struct pata_platform_info bfin_pata_platform_data = {
224 .ioport_shift = 1,
225 .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
226};
227
228static struct resource bfin_pata_resources[] = {
229 {
230 .start = 0x20314020,
231 .end = 0x2031403F,
232 .flags = IORESOURCE_MEM,
233 },
234 {
235 .start = 0x2031401C,
236 .end = 0x2031401F,
237 .flags = IORESOURCE_MEM,
238 },
239 {
240 .start = PATA_INT,
241 .end = PATA_INT,
242 .flags = IORESOURCE_IRQ,
243 },
244};
245
246static struct platform_device bfin_pata_device = {
247 .name = "pata_platform",
248 .id = -1,
249 .num_resources = ARRAY_SIZE(bfin_pata_resources),
250 .resource = bfin_pata_resources,
251 .dev = {
252 .platform_data = &bfin_pata_platform_data,
253 }
254};
255#endif
256
196static struct platform_device *ezkit_devices[] __initdata = { 257static struct platform_device *ezkit_devices[] __initdata = {
197#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 258#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
198 &smc91x_device, 259 &smc91x_device,
199#endif 260#endif
200 261
201#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 262#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
202 &spi_bfin_master_device, 263 &bfin_spi0_device,
264#endif
265
266#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
267 &bfin_fb_adv7393_device,
203#endif 268#endif
204 269
205#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 270#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
@@ -209,6 +274,10 @@ static struct platform_device *ezkit_devices[] __initdata = {
209#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 274#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
210 &bfin_uart_device, 275 &bfin_uart_device,
211#endif 276#endif
277
278#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
279 &bfin_pata_device,
280#endif
212}; 281};
213 282
214static int __init ezkit_init(void) 283static int __init ezkit_init(void)
@@ -218,6 +287,10 @@ static int __init ezkit_init(void)
218#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 287#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
219 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 288 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
220#endif 289#endif
290
291#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
292 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
293#endif
221 return 0; 294 return 0;
222} 295}
223 296
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index a9143c4cbdcd..8975e06ea158 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -37,8 +37,11 @@
37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
38#include <linux/usb_isp1362.h> 38#include <linux/usb_isp1362.h>
39#endif 39#endif
40#include <linux/pata_platform.h>
40#include <linux/irq.h> 41#include <linux/irq.h>
42#include <asm/dma.h>
41#include <asm/bfin5xx_spi.h> 43#include <asm/bfin5xx_spi.h>
44#include <asm/reboot.h>
42 45
43/* 46/*
44 * Name the Board for the /proc/cpuinfo 47 * Name the Board for the /proc/cpuinfo
@@ -77,6 +80,12 @@ static struct platform_device smc91x_device = {
77}; 80};
78#endif 81#endif
79 82
83#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
84static struct platform_device bfin_fb_adv7393_device = {
85 .name = "bfin-adv7393",
86};
87#endif
88
80#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 89#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
81static struct resource net2272_bfin_resources[] = { 90static struct resource net2272_bfin_resources[] = {
82 { 91 {
@@ -177,7 +186,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
177 /* the modalias must be the same as spi device driver name */ 186 /* the modalias must be the same as spi device driver name */
178 .modalias = "m25p80", /* Name of spi_driver for this device */ 187 .modalias = "m25p80", /* Name of spi_driver for this device */
179 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 188 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
180 .bus_num = 1, /* Framework bus number */ 189 .bus_num = 0, /* Framework bus number */
181 .chip_select = 2, /* Framework chip select. On STAMP537 it is SPISSEL2*/ 190 .chip_select = 2, /* Framework chip select. On STAMP537 it is SPISSEL2*/
182 .platform_data = &bfin_spi_flash_data, 191 .platform_data = &bfin_spi_flash_data,
183 .controller_data = &spi_flash_chip_info, 192 .controller_data = &spi_flash_chip_info,
@@ -189,7 +198,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
189 { 198 {
190 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 199 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
191 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 200 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
192 .bus_num = 1, /* Framework bus number */ 201 .bus_num = 0, /* Framework bus number */
193 .chip_select = 1, /* Framework chip select. */ 202 .chip_select = 1, /* Framework chip select. */
194 .platform_data = NULL, /* No spi_driver specific config */ 203 .platform_data = NULL, /* No spi_driver specific config */
195 .controller_data = &spi_adc_chip_info, 204 .controller_data = &spi_adc_chip_info,
@@ -200,7 +209,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
200 { 209 {
201 .modalias = "ad1836-spi", 210 .modalias = "ad1836-spi",
202 .max_speed_hz = 31250000, /* max spi clock (SCK) speed in HZ */ 211 .max_speed_hz = 31250000, /* max spi clock (SCK) speed in HZ */
203 .bus_num = 1, 212 .bus_num = 0,
204 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 213 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
205 .controller_data = &ad1836_spi_chip_info, 214 .controller_data = &ad1836_spi_chip_info,
206 }, 215 },
@@ -210,7 +219,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
210 { 219 {
211 .modalias = "spi_mmc_dummy", 220 .modalias = "spi_mmc_dummy",
212 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 221 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
213 .bus_num = 1, 222 .bus_num = 0,
214 .chip_select = 0, 223 .chip_select = 0,
215 .platform_data = NULL, 224 .platform_data = NULL,
216 .controller_data = &spi_mmc_chip_info, 225 .controller_data = &spi_mmc_chip_info,
@@ -219,7 +228,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
219 { 228 {
220 .modalias = "spi_mmc", 229 .modalias = "spi_mmc",
221 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 230 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
222 .bus_num = 1, 231 .bus_num = 0,
223 .chip_select = CONFIG_SPI_MMC_CS_CHAN, 232 .chip_select = CONFIG_SPI_MMC_CS_CHAN,
224 .platform_data = NULL, 233 .platform_data = NULL,
225 .controller_data = &spi_mmc_chip_info, 234 .controller_data = &spi_mmc_chip_info,
@@ -231,16 +240,16 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
231 { 240 {
232 .modalias = "fxs-spi", 241 .modalias = "fxs-spi",
233 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 242 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
234 .bus_num = 1, 243 .bus_num = 0,
235 .chip_select = 3, 244 .chip_select = 8 - CONFIG_J11_JUMPER,
236 .controller_data = &spi_si3xxx_chip_info, 245 .controller_data = &spi_si3xxx_chip_info,
237 .mode = SPI_MODE_3, 246 .mode = SPI_MODE_3,
238 }, 247 },
239 { 248 {
240 .modalias = "fxo-spi", 249 .modalias = "fxo-spi",
241 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 250 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
242 .bus_num = 1, 251 .bus_num = 0,
243 .chip_select = 2, 252 .chip_select = 8 - CONFIG_J19_JUMPER,
244 .controller_data = &spi_si3xxx_chip_info, 253 .controller_data = &spi_si3xxx_chip_info,
245 .mode = SPI_MODE_3, 254 .mode = SPI_MODE_3,
246 }, 255 },
@@ -250,7 +259,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
250 { 259 {
251 .modalias = "ad5304_spi", 260 .modalias = "ad5304_spi",
252 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ 261 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
253 .bus_num = 1, 262 .bus_num = 0,
254 .chip_select = 2, 263 .chip_select = 2,
255 .platform_data = NULL, 264 .platform_data = NULL,
256 .controller_data = &ad5304_chip_info, 265 .controller_data = &ad5304_chip_info,
@@ -259,17 +268,33 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
259#endif 268#endif
260}; 269};
261 270
271/* SPI (0) */
272static struct resource bfin_spi0_resource[] = {
273 [0] = {
274 .start = SPI0_REGBASE,
275 .end = SPI0_REGBASE + 0xFF,
276 .flags = IORESOURCE_MEM,
277 },
278 [1] = {
279 .start = CH_SPI,
280 .end = CH_SPI,
281 .flags = IORESOURCE_IRQ,
282 }
283};
284
262/* SPI controller data */ 285/* SPI controller data */
263static struct bfin5xx_spi_master spi_bfin_master_info = { 286static struct bfin5xx_spi_master bfin_spi0_info = {
264 .num_chipselect = 8, 287 .num_chipselect = 8,
265 .enable_dma = 1, /* master has the ability to do dma transfer */ 288 .enable_dma = 1, /* master has the ability to do dma transfer */
266}; 289};
267 290
268static struct platform_device spi_bfin_master_device = { 291static struct platform_device bfin_spi0_device = {
269 .name = "bfin-spi-master", 292 .name = "bfin-spi",
270 .id = 1, /* Bus number */ 293 .id = 0, /* Bus number */
294 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
295 .resource = bfin_spi0_resource,
271 .dev = { 296 .dev = {
272 .platform_data = &spi_bfin_master_info, /* Passed to driver */ 297 .platform_data = &bfin_spi0_info, /* Passed to driver */
273 }, 298 },
274}; 299};
275#endif /* spi master and devices */ 300#endif /* spi master and devices */
@@ -309,6 +334,43 @@ static struct platform_device bfin_sport1_uart_device = {
309}; 334};
310#endif 335#endif
311 336
337#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
338#define PATA_INT 55
339
340static struct pata_platform_info bfin_pata_platform_data = {
341 .ioport_shift = 1,
342 .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
343};
344
345static struct resource bfin_pata_resources[] = {
346 {
347 .start = 0x20314020,
348 .end = 0x2031403F,
349 .flags = IORESOURCE_MEM,
350 },
351 {
352 .start = 0x2031401C,
353 .end = 0x2031401F,
354 .flags = IORESOURCE_MEM,
355 },
356 {
357 .start = PATA_INT,
358 .end = PATA_INT,
359 .flags = IORESOURCE_IRQ,
360 },
361};
362
363static struct platform_device bfin_pata_device = {
364 .name = "pata_platform",
365 .id = -1,
366 .num_resources = ARRAY_SIZE(bfin_pata_resources),
367 .resource = bfin_pata_resources,
368 .dev = {
369 .platform_data = &bfin_pata_platform_data,
370 }
371};
372#endif
373
312static struct platform_device *stamp_devices[] __initdata = { 374static struct platform_device *stamp_devices[] __initdata = {
313#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 375#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
314 &rtc_device, 376 &rtc_device,
@@ -318,12 +380,16 @@ static struct platform_device *stamp_devices[] __initdata = {
318 &smc91x_device, 380 &smc91x_device,
319#endif 381#endif
320 382
383#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
384 &bfin_fb_adv7393_device,
385#endif
386
321#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 387#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
322 &net2272_bfin_device, 388 &net2272_bfin_device,
323#endif 389#endif
324 390
325#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 391#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
326 &spi_bfin_master_device, 392 &bfin_spi0_device,
327#endif 393#endif
328 394
329#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 395#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
@@ -334,6 +400,10 @@ static struct platform_device *stamp_devices[] __initdata = {
334 &bfin_sport0_uart_device, 400 &bfin_sport0_uart_device,
335 &bfin_sport1_uart_device, 401 &bfin_sport1_uart_device,
336#endif 402#endif
403
404#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
405 &bfin_pata_device,
406#endif
337}; 407};
338 408
339static int __init stamp_init(void) 409static int __init stamp_init(void)
@@ -355,8 +425,23 @@ static int __init stamp_init(void)
355#endif 425#endif
356 426
357#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 427#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
358 return spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 428 spi_register_board_info(bfin_spi_board_info,
429 ARRAY_SIZE(bfin_spi_board_info));
430#endif
431#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
432 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
359#endif 433#endif
434 return 0;
360} 435}
361 436
362arch_initcall(stamp_init); 437arch_initcall(stamp_init);
438
439void native_machine_restart(char *cmd)
440{
441#if defined(CONFIG_BFIN_SHARED_FLASH_ENET)
442# define BIT_TO_SET (1 << CONFIG_ENET_FLASH_PIN)
443 bfin_write_FIO_INEN(~BIT_TO_SET);
444 bfin_write_FIO_DIR(BIT_TO_SET);
445 bfin_write_FIO_FLAG_C(BIT_TO_SET);
446#endif
447}
diff --git a/arch/blackfin/mach-bf533/head.S b/arch/blackfin/mach-bf533/head.S
index 7dd0e9c3a936..1ded945a6fa0 100644
--- a/arch/blackfin/mach-bf533/head.S
+++ b/arch/blackfin/mach-bf533/head.S
@@ -32,11 +32,9 @@
32#include <asm/blackfin.h> 32#include <asm/blackfin.h>
33#include <asm/trace.h> 33#include <asm/trace.h>
34#if CONFIG_BFIN_KERNEL_CLOCK 34#if CONFIG_BFIN_KERNEL_CLOCK
35#include <asm/mach-common/clocks.h>
35#include <asm/mach/mem_init.h> 36#include <asm/mach/mem_init.h>
36#endif 37#endif
37#if CONFIG_DEBUG_KERNEL_START
38#include <asm/mach-common/def_LPBlackfin.h>
39#endif
40 38
41.global __rambase 39.global __rambase
42.global __ramstart 40.global __ramstart
@@ -52,10 +50,12 @@ __INIT
52ENTRY(__start) 50ENTRY(__start)
53 /* R0: argument of command line string, passed from uboot, save it */ 51 /* R0: argument of command line string, passed from uboot, save it */
54 R7 = R0; 52 R7 = R0;
55 /* Set the SYSCFG register: 53 /* Enable Cycle Counter and Nesting Of Interrupts */
56 * Enable Cycle Counter and Nesting Of Interrupts (3rd Bit) 54#ifdef CONFIG_BFIN_SCRATCH_REG_CYCLES
57 */ 55 R0 = SYSCFG_SNEN;
58 R0 = 0x36; 56#else
57 R0 = SYSCFG_SNEN | SYSCFG_CCEN;
58#endif
59 SYSCFG = R0; 59 SYSCFG = R0;
60 R0 = 0; 60 R0 = 0;
61 61
@@ -97,40 +97,10 @@ ENTRY(__start)
97 M2 = r0; 97 M2 = r0;
98 M3 = r0; 98 M3 = r0;
99 99
100 trace_buffer_start(p0,r0); 100 trace_buffer_init(p0,r0);
101 P0 = R1; 101 P0 = R1;
102 R0 = R1; 102 R0 = R1;
103 103
104#if CONFIG_DEBUG_KERNEL_START
105
106/*
107 * Set up a temporary Event Vector Table, so if something bad happens before
108 * the kernel is fully started, it doesn't vector off into the bootloaders
109 * table
110 */
111 P0.l = lo(EVT2);
112 P0.h = hi(EVT2);
113 P1.l = lo(EVT15);
114 P1.h = hi(EVT15);
115 P2.l = debug_kernel_start_trap;
116 P2.h = debug_kernel_start_trap;
117
118 RTS = P2;
119 RTI = P2;
120 RTX = P2;
121 RTN = P2;
122 RTE = P2;
123
124.Lfill_temp_vector_table:
125 [P0++] = P2; /* Core Event Vector Table */
126 CC = P0 == P1;
127 if !CC JUMP .Lfill_temp_vector_table
128 P0 = r0;
129 P1 = r0;
130 P2 = r0;
131
132#endif
133
134 p0.h = hi(FIO_MASKA_C); 104 p0.h = hi(FIO_MASKA_C);
135 p0.l = lo(FIO_MASKA_C); 105 p0.l = lo(FIO_MASKA_C);
136 r0 = 0xFFFF(Z); 106 r0 = 0xFFFF(Z);
@@ -144,38 +114,38 @@ ENTRY(__start)
144 ssync; 114 ssync;
145 115
146 /* Turn off the icache */ 116 /* Turn off the icache */
147 p0.l = (IMEM_CONTROL & 0xFFFF); 117 p0.l = LO(IMEM_CONTROL);
148 p0.h = (IMEM_CONTROL >> 16); 118 p0.h = HI(IMEM_CONTROL);
149 R1 = [p0]; 119 R1 = [p0];
150 R0 = ~ENICPLB; 120 R0 = ~ENICPLB;
151 R0 = R0 & R1; 121 R0 = R0 & R1;
152 122
153 /* Anomaly 05000125 */ 123 /* Anomaly 05000125 */
154#ifdef ANOMALY_05000125 124#if ANOMALY_05000125
155 CLI R2; 125 CLI R2;
156 SSYNC; 126 SSYNC;
157#endif 127#endif
158 [p0] = R0; 128 [p0] = R0;
159 SSYNC; 129 SSYNC;
160#ifdef ANOMALY_05000125 130#if ANOMALY_05000125
161 STI R2; 131 STI R2;
162#endif 132#endif
163 133
164 /* Turn off the dcache */ 134 /* Turn off the dcache */
165 p0.l = (DMEM_CONTROL & 0xFFFF); 135 p0.l = LO(DMEM_CONTROL);
166 p0.h = (DMEM_CONTROL >> 16); 136 p0.h = HI(DMEM_CONTROL);
167 R1 = [p0]; 137 R1 = [p0];
168 R0 = ~ENDCPLB; 138 R0 = ~ENDCPLB;
169 R0 = R0 & R1; 139 R0 = R0 & R1;
170 140
171 /* Anomaly 05000125 */ 141 /* Anomaly 05000125 */
172#ifdef ANOMALY_05000125 142#if ANOMALY_05000125
173 CLI R2; 143 CLI R2;
174 SSYNC; 144 SSYNC;
175#endif 145#endif
176 [p0] = R0; 146 [p0] = R0;
177 SSYNC; 147 SSYNC;
178#ifdef ANOMALY_05000125 148#if ANOMALY_05000125
179 STI R2; 149 STI R2;
180#endif 150#endif
181 151
@@ -211,6 +181,12 @@ ENTRY(__start)
211 fp = sp; 181 fp = sp;
212 usp = sp; 182 usp = sp;
213 183
184#ifdef CONFIG_EARLY_PRINTK
185 SP += -12;
186 call _init_early_exception_vectors;
187 SP += 12;
188#endif
189
214 /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ 190 /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */
215 call _bf53x_relocate_l1_mem; 191 call _bf53x_relocate_l1_mem;
216#if CONFIG_BFIN_KERNEL_CLOCK 192#if CONFIG_BFIN_KERNEL_CLOCK
@@ -264,7 +240,7 @@ ENTRY(__start)
264 p0.l = .LWAIT_HERE; 240 p0.l = .LWAIT_HERE;
265 p0.h = .LWAIT_HERE; 241 p0.h = .LWAIT_HERE;
266 reti = p0; 242 reti = p0;
267#if defined(ANOMALY_05000281) 243#if ANOMALY_05000281
268 nop; nop; nop; 244 nop; nop; nop;
269#endif 245#endif
270 rti; 246 rti;
@@ -417,8 +393,8 @@ ENTRY(_start_dma_code)
417 w[p0] = r0.l; 393 w[p0] = r0.l;
418 ssync; 394 ssync;
419 395
420 p0.l = (EBIU_SDBCTL & 0xFFFF); 396 p0.l = LO(EBIU_SDBCTL);
421 p0.h = (EBIU_SDBCTL >> 16); /* SDRAM Memory Bank Control Register */ 397 p0.h = HI(EBIU_SDBCTL); /* SDRAM Memory Bank Control Register */
422 r0 = mem_SDBCTL; 398 r0 = mem_SDBCTL;
423 w[p0] = r0.l; 399 w[p0] = r0.l;
424 ssync; 400 ssync;
@@ -456,276 +432,6 @@ ENTRY(_start_dma_code)
456ENDPROC(_start_dma_code) 432ENDPROC(_start_dma_code)
457#endif /* CONFIG_BFIN_KERNEL_CLOCK */ 433#endif /* CONFIG_BFIN_KERNEL_CLOCK */
458 434
459ENTRY(_bfin_reset)
460 /* No more interrupts to be handled*/
461 CLI R6;
462 SSYNC;
463
464#if defined(CONFIG_BFIN_SHARED_FLASH_ENET)
465 p0.h = hi(FIO_INEN);
466 p0.l = lo(FIO_INEN);
467 r0.l = ~(1 << CONFIG_ENET_FLASH_PIN);
468 w[p0] = r0.l;
469
470 p0.h = hi(FIO_DIR);
471 p0.l = lo(FIO_DIR);
472 r0.l = (1 << CONFIG_ENET_FLASH_PIN);
473 w[p0] = r0.l;
474
475 p0.h = hi(FIO_FLAG_C);
476 p0.l = lo(FIO_FLAG_C);
477 r0.l = (1 << CONFIG_ENET_FLASH_PIN);
478 w[p0] = r0.l;
479#endif
480
481 /* Clear the IMASK register */
482 p0.h = hi(IMASK);
483 p0.l = lo(IMASK);
484 r0 = 0x0;
485 [p0] = r0;
486
487 /* Clear the ILAT register */
488 p0.h = hi(ILAT);
489 p0.l = lo(ILAT);
490 r0 = [p0];
491 [p0] = r0;
492 SSYNC;
493
494 /* make sure SYSCR is set to use BMODE */
495 P0.h = hi(SYSCR);
496 P0.l = lo(SYSCR);
497 R0.l = 0x0;
498 W[P0] = R0.l;
499 SSYNC;
500
501 /* issue a system soft reset */
502 P1.h = hi(SWRST);
503 P1.l = lo(SWRST);
504 R1.l = 0x0007;
505 W[P1] = R1;
506 SSYNC;
507
508 /* clear system soft reset */
509 R0.l = 0x0000;
510 W[P0] = R0;
511 SSYNC;
512
513 /* issue core reset */
514 raise 1;
515
516 RTS;
517ENDPROC(_bfin_reset)
518
519#if CONFIG_DEBUG_KERNEL_START
520debug_kernel_start_trap:
521 /* Set up a temp stack in L1 - SDRAM might not be working */
522 P0.L = lo(L1_DATA_A_START + 0x100);
523 P0.H = hi(L1_DATA_A_START + 0x100);
524 SP = P0;
525
526 /* Make sure the Clocks are the way I think they should be */
527 r0 = CONFIG_VCO_MULT & 63; /* Load the VCO multiplier */
528 r0 = r0 << 9; /* Shift it over, */
529 r1 = CLKIN_HALF; /* Do we need to divide CLKIN by 2?*/
530 r0 = r1 | r0;
531 r1 = PLL_BYPASS; /* Bypass the PLL? */
532 r1 = r1 << 8; /* Shift it over */
533 r0 = r1 | r0; /* add them all together */
534
535 p0.h = hi(PLL_CTL);
536 p0.l = lo(PLL_CTL); /* Load the address */
537 cli r2; /* Disable interrupts */
538 ssync;
539 w[p0] = r0.l; /* Set the value */
540 idle; /* Wait for the PLL to stablize */
541 sti r2; /* Enable interrupts */
542
543.Lcheck_again1:
544 p0.h = hi(PLL_STAT);
545 p0.l = lo(PLL_STAT);
546 R0 = W[P0](Z);
547 CC = BITTST(R0,5);
548 if ! CC jump .Lcheck_again1;
549
550 /* Configure SCLK & CCLK Dividers */
551 r0 = (CONFIG_CCLK_ACT_DIV | CONFIG_SCLK_DIV);
552 p0.h = hi(PLL_DIV);
553 p0.l = lo(PLL_DIV);
554 w[p0] = r0.l;
555 ssync;
556
557 /* Make sure UART is enabled - you can never be sure */
558
559/*
560 * Setup for console. Argument comes from the menuconfig
561 */
562
563#ifdef CONFIG_BAUD_9600
564#define CONSOLE_BAUD_RATE 9600
565#elif CONFIG_BAUD_19200
566#define CONSOLE_BAUD_RATE 19200
567#elif CONFIG_BAUD_38400
568#define CONSOLE_BAUD_RATE 38400
569#elif CONFIG_BAUD_57600
570#define CONSOLE_BAUD_RATE 57600
571#elif CONFIG_BAUD_115200
572#define CONSOLE_BAUD_RATE 115200
573#endif
574
575 p0.h = hi(UART_GCTL);
576 p0.l = lo(UART_GCTL);
577 r0 = 0x00(Z);
578 w[p0] = r0.L; /* To Turn off UART clocks */
579 ssync;
580
581 p0.h = hi(UART_LCR);
582 p0.l = lo(UART_LCR);
583 r0 = 0x83(Z);
584 w[p0] = r0.L; /* To enable DLL writes */
585 ssync;
586
587 R1 = (((CONFIG_CLKIN_HZ * CONFIG_VCO_MULT) / CONFIG_SCLK_DIV) / (CONSOLE_BAUD_RATE * 16));
588
589 p0.h = hi(UART_DLL);
590 p0.l = lo(UART_DLL);
591 r0 = 0xFF(Z);
592 r0 = R1 & R0;
593 w[p0] = r0.L;
594 ssync;
595
596 p0.h = hi(UART_DLH);
597 p0.l = lo(UART_DLH);
598 r1 >>= 8 ;
599 w[p0] = r1.L;
600 ssync;
601
602 p0.h = hi(UART_GCTL);
603 p0.l = lo(UART_GCTL);
604 r0 = 0x0(Z);
605 w[p0] = r0.L; /* To enable UART clock */
606 ssync;
607
608 p0.h = hi(UART_LCR);
609 p0.l = lo(UART_LCR);
610 r0 = 0x03(Z);
611 w[p0] = r0.L; /* To Turn on UART */
612 ssync;
613
614 p0.h = hi(UART_GCTL);
615 p0.l = lo(UART_GCTL);
616 r0 = 0x01(Z);
617 w[p0] = r0.L; /* To Turn on UART Clocks */
618 ssync;
619
620 P0.h = hi(UART_THR);
621 P0.l = lo(UART_THR);
622 P1.h = hi(UART_LSR);
623 P1.l = lo(UART_LSR);
624
625 R0.L = 'K';
626 call .Lwait_char;
627 R0.L='e';
628 call .Lwait_char;
629 R0.L='r';
630 call .Lwait_char;
631 R0.L='n'
632 call .Lwait_char;
633 R0.L='e'
634 call .Lwait_char;
635 R0.L='l';
636 call .Lwait_char;
637 R0.L=' ';
638 call .Lwait_char;
639 R0.L='c';
640 call .Lwait_char;
641 R0.L='r';
642 call .Lwait_char;
643 R0.L='a';
644 call .Lwait_char;
645 R0.L='s';
646 call .Lwait_char;
647 R0.L='h';
648 call .Lwait_char;
649 R0.L='\r';
650 call .Lwait_char;
651 R0.L='\n';
652 call .Lwait_char;
653
654 R0.L='S';
655 call .Lwait_char;
656 R0.L='E';
657 call .Lwait_char;
658 R0.L='Q'
659 call .Lwait_char;
660 R0.L='S'
661 call .Lwait_char;
662 R0.L='T';
663 call .Lwait_char;
664 R0.L='A';
665 call .Lwait_char;
666 R0.L='T';
667 call .Lwait_char;
668 R0.L='=';
669 call .Lwait_char;
670 R2 = SEQSTAT;
671 call .Ldump_reg;
672
673 R0.L=' ';
674 call .Lwait_char;
675 R0.L='R';
676 call .Lwait_char;
677 R0.L='E'
678 call .Lwait_char;
679 R0.L='T'
680 call .Lwait_char;
681 R0.L='X';
682 call .Lwait_char;
683 R0.L='=';
684 call .Lwait_char;
685 R2 = RETX;
686 call .Ldump_reg;
687
688 R0.L='\r';
689 call .Lwait_char;
690 R0.L='\n';
691 call .Lwait_char;
692
693.Ldebug_kernel_start_trap_done:
694 JUMP .Ldebug_kernel_start_trap_done;
695.Ldump_reg:
696 R3 = 32;
697 R4 = 0x0F;
698 R5 = ':'; /* one past 9 */
699
700.Ldump_reg2:
701 R0 = R2;
702 R3 += -4;
703 R0 >>>= R3;
704 R0 = R0 & R4;
705 R0 += 0x30;
706 CC = R0 <= R5;
707 if CC JUMP .Ldump_reg1;
708 R0 += 7;
709
710.Ldump_reg1:
711 R1.l = W[P1];
712 CC = BITTST(R1, 5);
713 if !CC JUMP .Ldump_reg1;
714 W[P0] = r0;
715
716 CC = R3 == 0;
717 if !CC JUMP .Ldump_reg2
718 RTS;
719
720.Lwait_char:
721 R1.l = W[P1];
722 CC = BITTST(R1, 5);
723 if !CC JUMP .Lwait_char;
724 W[P0] = r0;
725 RTS;
726
727#endif /* CONFIG_DEBUG_KERNEL_START */
728
729.data 435.data
730 436
731/* 437/*
diff --git a/arch/blackfin/mach-bf537/Kconfig b/arch/blackfin/mach-bf537/Kconfig
index cc9ae38a4dda..e6648db09519 100644
--- a/arch/blackfin/mach-bf537/Kconfig
+++ b/arch/blackfin/mach-bf537/Kconfig
@@ -2,33 +2,6 @@ if (BF537 || BF534 || BF536)
2 2
3menu "BF537 Specific Configuration" 3menu "BF537 Specific Configuration"
4 4
5comment "PORT F/G Selection"
6choice
7 prompt "Select BF537/6/4 default GPIO PFx PORTx"
8 help
9 Quick Hack for BF537/6/4 default GPIO PFx PORTF.
10
11config BF537_PORT_F
12 bool "Select BF537/6/4 default GPIO PFx PORTF"
13 depends on (BF537 || BF536 || BF534)
14 help
15 Quick Hack for BF537/6/4 default GPIO PFx PORTF.
16
17config BF537_PORT_G
18 bool "Select BF537/6/4 default GPIO PFx PORTG"
19 depends on (BF537 || BF536 || BF534)
20 help
21 Quick Hack for BF537/6/4 default GPIO PFx PORTG.
22
23config BF537_PORT_H
24 bool "Select BF537/6/4 default GPIO PFx PORTH"
25 depends on (BF537 || BF536 || BF534)
26 help
27 Quick Hack for BF537/6/4 default GPIO PFx PORTH
28 Use only when Blackfin EMAC support is not required.
29
30endchoice
31
32comment "Interrupt Priority Assignment" 5comment "Interrupt Priority Assignment"
33menu "Priority" 6menu "Priority"
34 7
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c
index a8f947b72754..44dea05e1d03 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c
@@ -35,7 +35,9 @@
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/spi/flash.h> 36#include <linux/spi/flash.h>
37#include <linux/usb_isp1362.h> 37#include <linux/usb_isp1362.h>
38#include <linux/pata_platform.h>
38#include <linux/irq.h> 39#include <linux/irq.h>
40#include <asm/dma.h>
39#include <asm/bfin5xx_spi.h> 41#include <asm/bfin5xx_spi.h>
40 42
41/* 43/*
@@ -113,7 +115,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
113 /* the modalias must be the same as spi device driver name */ 115 /* the modalias must be the same as spi device driver name */
114 .modalias = "m25p80", /* Name of spi_driver for this device */ 116 .modalias = "m25p80", /* Name of spi_driver for this device */
115 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 117 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
116 .bus_num = 1, /* Framework bus number */ 118 .bus_num = 0, /* Framework bus number */
117 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/ 119 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
118 .platform_data = &bfin_spi_flash_data, 120 .platform_data = &bfin_spi_flash_data,
119 .controller_data = &spi_flash_chip_info, 121 .controller_data = &spi_flash_chip_info,
@@ -125,7 +127,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
125 { 127 {
126 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 128 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
127 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 129 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
128 .bus_num = 1, /* Framework bus number */ 130 .bus_num = 0, /* Framework bus number */
129 .chip_select = 1, /* Framework chip select. */ 131 .chip_select = 1, /* Framework chip select. */
130 .platform_data = NULL, /* No spi_driver specific config */ 132 .platform_data = NULL, /* No spi_driver specific config */
131 .controller_data = &spi_adc_chip_info, 133 .controller_data = &spi_adc_chip_info,
@@ -136,7 +138,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
136 { 138 {
137 .modalias = "ad1836-spi", 139 .modalias = "ad1836-spi",
138 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 140 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
139 .bus_num = 1, 141 .bus_num = 0,
140 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 142 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
141 .controller_data = &ad1836_spi_chip_info, 143 .controller_data = &ad1836_spi_chip_info,
142 }, 144 },
@@ -146,7 +148,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
146 { 148 {
147 .modalias = "ad9960-spi", 149 .modalias = "ad9960-spi",
148 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */ 150 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
149 .bus_num = 1, 151 .bus_num = 0,
150 .chip_select = 1, 152 .chip_select = 1,
151 .controller_data = &ad9960_spi_chip_info, 153 .controller_data = &ad9960_spi_chip_info,
152 }, 154 },
@@ -156,7 +158,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
156 { 158 {
157 .modalias = "spi_mmc_dummy", 159 .modalias = "spi_mmc_dummy",
158 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 160 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
159 .bus_num = 1, 161 .bus_num = 0,
160 .chip_select = 7, 162 .chip_select = 7,
161 .platform_data = NULL, 163 .platform_data = NULL,
162 .controller_data = &spi_mmc_chip_info, 164 .controller_data = &spi_mmc_chip_info,
@@ -165,7 +167,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
165 { 167 {
166 .modalias = "spi_mmc", 168 .modalias = "spi_mmc",
167 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 169 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
168 .bus_num = 1, 170 .bus_num = 0,
169 .chip_select = CONFIG_SPI_MMC_CS_CHAN, 171 .chip_select = CONFIG_SPI_MMC_CS_CHAN,
170 .platform_data = NULL, 172 .platform_data = NULL,
171 .controller_data = &spi_mmc_chip_info, 173 .controller_data = &spi_mmc_chip_info,
@@ -174,17 +176,33 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
174#endif 176#endif
175}; 177};
176 178
179/* SPI (0) */
180static struct resource bfin_spi0_resource[] = {
181 [0] = {
182 .start = SPI0_REGBASE,
183 .end = SPI0_REGBASE + 0xFF,
184 .flags = IORESOURCE_MEM,
185 },
186 [1] = {
187 .start = CH_SPI,
188 .end = CH_SPI,
189 .flags = IORESOURCE_IRQ,
190 }
191};
192
177/* SPI controller data */ 193/* SPI controller data */
178static struct bfin5xx_spi_master spi_bfin_master_info = { 194static struct bfin5xx_spi_master bfin_spi0_info = {
179 .num_chipselect = 8, 195 .num_chipselect = 8,
180 .enable_dma = 1, /* master has the ability to do dma transfer */ 196 .enable_dma = 1, /* master has the ability to do dma transfer */
181}; 197};
182 198
183static struct platform_device spi_bfin_master_device = { 199static struct platform_device bfin_spi0_device = {
184 .name = "bfin-spi-master", 200 .name = "bfin-spi",
185 .id = 1, /* Bus number */ 201 .id = 0, /* Bus number */
202 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
203 .resource = bfin_spi0_resource,
186 .dev = { 204 .dev = {
187 .platform_data = &spi_bfin_master_info, /* Passed to driver */ 205 .platform_data = &bfin_spi0_info, /* Passed to driver */
188 }, 206 },
189}; 207};
190#endif /* spi master and devices */ 208#endif /* spi master and devices */
@@ -316,6 +334,43 @@ static struct platform_device bfin_mac_device = {
316}; 334};
317#endif 335#endif
318 336
337#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
338#define PATA_INT 64
339
340static struct pata_platform_info bfin_pata_platform_data = {
341 .ioport_shift = 2,
342 .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
343};
344
345static struct resource bfin_pata_resources[] = {
346 {
347 .start = 0x2030C000,
348 .end = 0x2030C01F,
349 .flags = IORESOURCE_MEM,
350 },
351 {
352 .start = 0x2030D018,
353 .end = 0x2030D01B,
354 .flags = IORESOURCE_MEM,
355 },
356 {
357 .start = PATA_INT,
358 .end = PATA_INT,
359 .flags = IORESOURCE_IRQ,
360 },
361};
362
363static struct platform_device bfin_pata_device = {
364 .name = "pata_platform",
365 .id = -1,
366 .num_resources = ARRAY_SIZE(bfin_pata_resources),
367 .resource = bfin_pata_resources,
368 .dev = {
369 .platform_data = &bfin_pata_platform_data,
370 }
371};
372#endif
373
319static struct platform_device *cm_bf537_devices[] __initdata = { 374static struct platform_device *cm_bf537_devices[] __initdata = {
320#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 375#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
321 &rtc_device, 376 &rtc_device,
@@ -347,7 +402,11 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
347#endif 402#endif
348 403
349#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 404#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
350 &spi_bfin_master_device, 405 &bfin_spi0_device,
406#endif
407
408#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
409 &bfin_pata_device,
351#endif 410#endif
352}; 411};
353 412
@@ -358,6 +417,10 @@ static int __init cm_bf537_init(void)
358#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 417#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
359 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 418 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
360#endif 419#endif
420
421#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
422 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
423#endif
361 return 0; 424 return 0;
362} 425}
363 426
diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c
index 648d984e98d6..5e9d09eb8579 100644
--- a/arch/blackfin/mach-bf537/boards/generic_board.c
+++ b/arch/blackfin/mach-bf537/boards/generic_board.c
@@ -8,7 +8,7 @@
8 * 8 *
9 * Modified: 9 * Modified:
10 * Copyright 2005 National ICT Australia (NICTA) 10 * Copyright 2005 National ICT Australia (NICTA)
11 * Copyright 2004-2006 Analog Devices Inc. 11 * Copyright 2004-2007 Analog Devices Inc.
12 * 12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 * 14 *
@@ -34,20 +34,74 @@
34#include <linux/mtd/partitions.h> 34#include <linux/mtd/partitions.h>
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/spi/flash.h> 36#include <linux/spi/flash.h>
37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
37#include <linux/usb_isp1362.h> 38#include <linux/usb_isp1362.h>
39#endif
40#include <linux/pata_platform.h>
38#include <linux/irq.h> 41#include <linux/irq.h>
42#include <linux/interrupt.h>
39#include <linux/usb_sl811.h> 43#include <linux/usb_sl811.h>
44#include <asm/dma.h>
40#include <asm/bfin5xx_spi.h> 45#include <asm/bfin5xx_spi.h>
46#include <asm/reboot.h>
47#include <linux/spi/ad7877.h>
41 48
42/* 49/*
43 * Name the Board for the /proc/cpuinfo 50 * Name the Board for the /proc/cpuinfo
44 */ 51 */
45char *bfin_board_name = "UNKNOWN BOARD"; 52char *bfin_board_name = "GENERIC Board";
46 53
47/* 54/*
48 * Driver needs to know address, irq and flag pin. 55 * Driver needs to know address, irq and flag pin.
49 */ 56 */
50 57
58#define ISP1761_BASE 0x203C0000
59#define ISP1761_IRQ IRQ_PF7
60
61#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
62static struct resource bfin_isp1761_resources[] = {
63 [0] = {
64 .name = "isp1761-regs",
65 .start = ISP1761_BASE + 0x00000000,
66 .end = ISP1761_BASE + 0x000fffff,
67 .flags = IORESOURCE_MEM,
68 },
69 [1] = {
70 .start = ISP1761_IRQ,
71 .end = ISP1761_IRQ,
72 .flags = IORESOURCE_IRQ,
73 },
74};
75
76static struct platform_device bfin_isp1761_device = {
77 .name = "isp1761",
78 .id = 0,
79 .num_resources = ARRAY_SIZE(bfin_isp1761_resources),
80 .resource = bfin_isp1761_resources,
81};
82
83static struct platform_device *bfin_isp1761_devices[] = {
84 &bfin_isp1761_device,
85};
86
87int __init bfin_isp1761_init(void)
88{
89 unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices);
90
91 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
92 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING);
93
94 return platform_add_devices(bfin_isp1761_devices, num_devices);
95}
96
97void __exit bfin_isp1761_exit(void)
98{
99 platform_device_unregister(&bfin_isp1761_device);
100}
101
102arch_initcall(bfin_isp1761_init);
103#endif
104
51#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 105#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
52static struct resource bfin_pcmcia_cf_resources[] = { 106static struct resource bfin_pcmcia_cf_resources[] = {
53 { 107 {
@@ -59,10 +113,6 @@ static struct resource bfin_pcmcia_cf_resources[] = {
59 .end = 0x20311FFF, 113 .end = 0x20311FFF,
60 .flags = IORESOURCE_MEM, 114 .flags = IORESOURCE_MEM,
61 }, { 115 }, {
62 .start = IRQ_PROG_INTA,
63 .end = IRQ_PROG_INTA,
64 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
65 }, {
66 .start = IRQ_PF4, 116 .start = IRQ_PF4,
67 .end = IRQ_PF4, 117 .end = IRQ_PF4,
68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, 118 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
@@ -96,14 +146,7 @@ static struct resource smc91x_resources[] = {
96 .end = 0x20300300 + 16, 146 .end = 0x20300300 + 16,
97 .flags = IORESOURCE_MEM, 147 .flags = IORESOURCE_MEM,
98 }, { 148 }, {
99 .start = IRQ_PROG_INTB, 149
100 .end = IRQ_PROG_INTB,
101 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
102 }, {
103 /*
104 * denotes the flag pin and is used directly if
105 * CONFIG_IRQCHIP_DEMUX_GPIO is defined.
106 */
107 .start = IRQ_PF7, 150 .start = IRQ_PF7,
108 .end = IRQ_PF7, 151 .end = IRQ_PF7,
109 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 152 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -117,6 +160,28 @@ static struct platform_device smc91x_device = {
117}; 160};
118#endif 161#endif
119 162
163#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
164static struct resource dm9000_resources[] = {
165 [0] = {
166 .start = 0x203FB800,
167 .end = 0x203FB800 + 8,
168 .flags = IORESOURCE_MEM,
169 },
170 [1] = {
171 .start = IRQ_PF9,
172 .end = IRQ_PF9,
173 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
174 },
175};
176
177static struct platform_device dm9000_device = {
178 .name = "dm9000",
179 .id = -1,
180 .num_resources = ARRAY_SIZE(dm9000_resources),
181 .resource = dm9000_resources,
182};
183#endif
184
120#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) 185#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
121static struct resource sl811_hcd_resources[] = { 186static struct resource sl811_hcd_resources[] = {
122 { 187 {
@@ -128,12 +193,8 @@ static struct resource sl811_hcd_resources[] = {
128 .end = 0x20340004, 193 .end = 0x20340004,
129 .flags = IORESOURCE_MEM, 194 .flags = IORESOURCE_MEM,
130 }, { 195 }, {
131 .start = IRQ_PROG_INTA, 196 .start = CONFIG_USB_SL811_BFIN_IRQ,
132 .end = IRQ_PROG_INTA, 197 .end = CONFIG_USB_SL811_BFIN_IRQ,
133 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
134 }, {
135 .start = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO,
136 .end = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO,
137 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 198 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
138 }, 199 },
139}; 200};
@@ -141,21 +202,19 @@ static struct resource sl811_hcd_resources[] = {
141#if defined(CONFIG_USB_SL811_BFIN_USE_VBUS) 202#if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
142void sl811_port_power(struct device *dev, int is_on) 203void sl811_port_power(struct device *dev, int is_on)
143{ 204{
144 unsigned short mask = (1<<CONFIG_USB_SL811_BFIN_GPIO_VBUS); 205 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
145 206 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS);
146 bfin_write_PORT_FER(bfin_read_PORT_FER() & ~mask);
147 bfin_write_FIO_DIR(bfin_read_FIO_DIR() | mask);
148 207
149 if (is_on) 208 if (is_on)
150 bfin_write_FIO_FLAG_S(mask); 209 gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 1);
151 else 210 else
152 bfin_write_FIO_FLAG_C(mask); 211 gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 0);
153} 212}
154#endif 213#endif
155 214
156static struct sl811_platform_data sl811_priv = { 215static struct sl811_platform_data sl811_priv = {
157 .potpg = 10, 216 .potpg = 10,
158 .power = 250, /* == 500mA */ 217 .power = 250, /* == 500mA */
159#if defined(CONFIG_USB_SL811_BFIN_USE_VBUS) 218#if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
160 .port_power = &sl811_port_power, 219 .port_power = &sl811_port_power,
161#endif 220#endif
@@ -170,7 +229,6 @@ static struct platform_device sl811_hcd_device = {
170 .num_resources = ARRAY_SIZE(sl811_hcd_resources), 229 .num_resources = ARRAY_SIZE(sl811_hcd_resources),
171 .resource = sl811_hcd_resources, 230 .resource = sl811_hcd_resources,
172}; 231};
173
174#endif 232#endif
175 233
176#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 234#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
@@ -184,13 +242,9 @@ static struct resource isp1362_hcd_resources[] = {
184 .end = 0x20360004, 242 .end = 0x20360004,
185 .flags = IORESOURCE_MEM, 243 .flags = IORESOURCE_MEM,
186 }, { 244 }, {
187 .start = IRQ_PROG_INTA, 245 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
188 .end = IRQ_PROG_INTA, 246 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
189 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 247 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
190 }, {
191 .start = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO,
192 .end = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO,
193 .flags = IORESOURCE_IRQ,
194 }, 248 },
195}; 249};
196 250
@@ -246,7 +300,8 @@ static struct platform_device net2272_bfin_device = {
246#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 300#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
247/* all SPI peripherals info goes here */ 301/* all SPI peripherals info goes here */
248 302
249#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 303#if defined(CONFIG_MTD_M25P80) \
304 || defined(CONFIG_MTD_M25P80_MODULE)
250static struct mtd_partition bfin_spi_flash_partitions[] = { 305static struct mtd_partition bfin_spi_flash_partitions[] = {
251 { 306 {
252 .name = "bootloader", 307 .name = "bootloader",
@@ -302,70 +357,198 @@ static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
302}; 357};
303#endif 358#endif
304 359
360#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
361static struct bfin5xx_spi_chip spi_mmc_chip_info = {
362 .enable_dma = 1,
363 .bits_per_word = 8,
364};
365#endif
366
367#if defined(CONFIG_PBX)
368static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
369 .ctl_reg = 0x4, /* send zero */
370 .enable_dma = 0,
371 .bits_per_word = 8,
372 .cs_change_per_word = 1,
373};
374#endif
375
376#if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
377static struct bfin5xx_spi_chip ad5304_chip_info = {
378 .enable_dma = 0,
379 .bits_per_word = 16,
380};
381#endif
382
383#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
384static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
385 .enable_dma = 0,
386 .bits_per_word = 16,
387};
388
389static const struct ad7877_platform_data bfin_ad7877_ts_info = {
390 .model = 7877,
391 .vref_delay_usecs = 50, /* internal, no capacitor */
392 .x_plate_ohms = 419,
393 .y_plate_ohms = 486,
394 .pressure_max = 1000,
395 .pressure_min = 0,
396 .stopacq_polarity = 1,
397 .first_conversion_delay = 3,
398 .acquisition_time = 1,
399 .averaging = 1,
400 .pen_down_acc_interval = 1,
401};
402#endif
403
305static struct spi_board_info bfin_spi_board_info[] __initdata = { 404static struct spi_board_info bfin_spi_board_info[] __initdata = {
306#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 405#if defined(CONFIG_MTD_M25P80) \
406 || defined(CONFIG_MTD_M25P80_MODULE)
307 { 407 {
308 /* the modalias must be the same as spi device driver name */ 408 /* the modalias must be the same as spi device driver name */
309 .modalias = "m25p80", /* Name of spi_driver for this device */ 409 .modalias = "m25p80", /* Name of spi_driver for this device */
310 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 410 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
311 .bus_num = 1, /* Framework bus number */ 411 .bus_num = 0, /* Framework bus number */
312 .chip_select = 2, /* Framework chip select. On STAMP537 it is SPISSEL1*/ 412 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
313 .platform_data = &bfin_spi_flash_data, 413 .platform_data = &bfin_spi_flash_data,
314 .controller_data = &spi_flash_chip_info, 414 .controller_data = &spi_flash_chip_info,
315 .mode = SPI_MODE_3, 415 .mode = SPI_MODE_3,
316 }, 416 },
317#endif 417#endif
318 418
319#if defined(CONFIG_SPI_ADC_BF533) || defined(CONFIG_SPI_ADC_BF533_MODULE) 419#if defined(CONFIG_SPI_ADC_BF533) \
420 || defined(CONFIG_SPI_ADC_BF533_MODULE)
320 { 421 {
321 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 422 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
322 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 423 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
323 .bus_num = 1, /* Framework bus number */ 424 .bus_num = 0, /* Framework bus number */
324 .chip_select = 1, /* Framework chip select. */ 425 .chip_select = 1, /* Framework chip select. */
325 .platform_data = NULL, /* No spi_driver specific config */ 426 .platform_data = NULL, /* No spi_driver specific config */
326 .controller_data = &spi_adc_chip_info, 427 .controller_data = &spi_adc_chip_info,
327 }, 428 },
328#endif 429#endif
329 430
330#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 431#if defined(CONFIG_SND_BLACKFIN_AD1836) \
432 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
331 { 433 {
332 .modalias = "ad1836-spi", 434 .modalias = "ad1836-spi",
333 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 435 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
334 .bus_num = 1, 436 .bus_num = 0,
335 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 437 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
336 .controller_data = &ad1836_spi_chip_info, 438 .controller_data = &ad1836_spi_chip_info,
337 }, 439 },
338#endif 440#endif
339
340#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE) 441#if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
341 { 442 {
342 .modalias = "ad9960-spi", 443 .modalias = "ad9960-spi",
343 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */ 444 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
344 .bus_num = 1, 445 .bus_num = 0,
345 .chip_select = 1, 446 .chip_select = 1,
346 .controller_data = &ad9960_spi_chip_info, 447 .controller_data = &ad9960_spi_chip_info,
347 }, 448 },
348#endif 449#endif
450#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
451 {
452 .modalias = "spi_mmc_dummy",
453 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
454 .bus_num = 0,
455 .chip_select = 0,
456 .platform_data = NULL,
457 .controller_data = &spi_mmc_chip_info,
458 .mode = SPI_MODE_3,
459 },
460 {
461 .modalias = "spi_mmc",
462 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
463 .bus_num = 0,
464 .chip_select = CONFIG_SPI_MMC_CS_CHAN,
465 .platform_data = NULL,
466 .controller_data = &spi_mmc_chip_info,
467 .mode = SPI_MODE_3,
468 },
469#endif
470#if defined(CONFIG_PBX)
471 {
472 .modalias = "fxs-spi",
473 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
474 .bus_num = 0,
475 .chip_select = 8 - CONFIG_J11_JUMPER,
476 .controller_data = &spi_si3xxx_chip_info,
477 .mode = SPI_MODE_3,
478 },
479 {
480 .modalias = "fxo-spi",
481 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
482 .bus_num = 0,
483 .chip_select = 8 - CONFIG_J19_JUMPER,
484 .controller_data = &spi_si3xxx_chip_info,
485 .mode = SPI_MODE_3,
486 },
487#endif
488#if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
489 {
490 .modalias = "ad5304_spi",
491 .max_speed_hz = 1250000, /* max spi clock (SCK) speed in HZ */
492 .bus_num = 0,
493 .chip_select = 2,
494 .platform_data = NULL,
495 .controller_data = &ad5304_chip_info,
496 .mode = SPI_MODE_2,
497 },
498#endif
499#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
500 {
501 .modalias = "ad7877",
502 .platform_data = &bfin_ad7877_ts_info,
503 .irq = IRQ_PF6,
504 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
505 .bus_num = 1,
506 .chip_select = 1,
507 .controller_data = &spi_ad7877_chip_info,
508 },
509#endif
349}; 510};
350 511
351/* SPI controller data */ 512/* SPI controller data */
352static struct bfin5xx_spi_master spi_bfin_master_info = { 513static struct bfin5xx_spi_master bfin_spi0_info = {
353 .num_chipselect = 8, 514 .num_chipselect = 8,
354 .enable_dma = 1, /* master has the ability to do dma transfer */ 515 .enable_dma = 1, /* master has the ability to do dma transfer */
355}; 516};
356 517
357static struct platform_device spi_bfin_master_device = { 518/* SPI (0) */
358 .name = "bfin-spi-master", 519static struct resource bfin_spi0_resource[] = {
359 .id = 1, /* Bus number */ 520 [0] = {
521 .start = SPI0_REGBASE,
522 .end = SPI0_REGBASE + 0xFF,
523 .flags = IORESOURCE_MEM,
524 },
525 [1] = {
526 .start = CH_SPI,
527 .end = CH_SPI,
528 .flags = IORESOURCE_IRQ,
529 },
530};
531
532static struct platform_device bfin_spi0_device = {
533 .name = "bfin-spi",
534 .id = 0, /* Bus number */
535 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
536 .resource = bfin_spi0_resource,
360 .dev = { 537 .dev = {
361 .platform_data = &spi_bfin_master_info, /* Passed to driver */ 538 .platform_data = &bfin_spi0_info, /* Passed to driver */
362 }, 539 },
363}; 540};
364#endif /* spi master and devices */ 541#endif /* spi master and devices */
365 542
366#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 543#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
367static struct platform_device bfin_fb_device = { 544static struct platform_device bfin_fb_device = {
368 .name = "bf537-fb", 545 .name = "bf537-lq035",
546};
547#endif
548
549#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
550static struct platform_device bfin_fb_adv7393_device = {
551 .name = "bfin-adv7393",
369}; 552};
370#endif 553#endif
371 554
@@ -390,15 +573,86 @@ static struct platform_device bfin_uart_device = {
390}; 573};
391#endif 574#endif
392 575
393static struct platform_device *stamp_devices[] __initdata = { 576#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
394#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 577static struct resource bfin_twi0_resource[] = {
395 &rtc_device, 578 [0] = {
579 .start = TWI0_REGBASE,
580 .end = TWI0_REGBASE + 0xFF,
581 .flags = IORESOURCE_MEM,
582 },
583 [1] = {
584 .start = IRQ_TWI,
585 .end = IRQ_TWI,
586 .flags = IORESOURCE_IRQ,
587 },
588};
589
590static struct platform_device i2c_bfin_twi_device = {
591 .name = "i2c-bfin-twi",
592 .id = 0,
593 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
594 .resource = bfin_twi0_resource,
595};
596#endif
597
598#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
599static struct platform_device bfin_sport0_uart_device = {
600 .name = "bfin-sport-uart",
601 .id = 0,
602};
603
604static struct platform_device bfin_sport1_uart_device = {
605 .name = "bfin-sport-uart",
606 .id = 1,
607};
608#endif
609
610#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
611#define PATA_INT 55
612
613static struct pata_platform_info bfin_pata_platform_data = {
614 .ioport_shift = 1,
615 .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
616};
617
618static struct resource bfin_pata_resources[] = {
619 {
620 .start = 0x20314020,
621 .end = 0x2031403F,
622 .flags = IORESOURCE_MEM,
623 },
624 {
625 .start = 0x2031401C,
626 .end = 0x2031401F,
627 .flags = IORESOURCE_MEM,
628 },
629 {
630 .start = PATA_INT,
631 .end = PATA_INT,
632 .flags = IORESOURCE_IRQ,
633 },
634};
635
636static struct platform_device bfin_pata_device = {
637 .name = "pata_platform",
638 .id = -1,
639 .num_resources = ARRAY_SIZE(bfin_pata_resources),
640 .resource = bfin_pata_resources,
641 .dev = {
642 .platform_data = &bfin_pata_platform_data,
643 }
644};
396#endif 645#endif
397 646
647static struct platform_device *stamp_devices[] __initdata = {
398#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 648#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
399 &bfin_pcmcia_cf_device, 649 &bfin_pcmcia_cf_device,
400#endif 650#endif
401 651
652#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
653 &rtc_device,
654#endif
655
402#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) 656#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
403 &sl811_hcd_device, 657 &sl811_hcd_device,
404#endif 658#endif
@@ -411,6 +665,10 @@ static struct platform_device *stamp_devices[] __initdata = {
411 &smc91x_device, 665 &smc91x_device,
412#endif 666#endif
413 667
668#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
669 &dm9000_device,
670#endif
671
414#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 672#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
415 &bfin_mac_device, 673 &bfin_mac_device,
416#endif 674#endif
@@ -420,16 +678,33 @@ static struct platform_device *stamp_devices[] __initdata = {
420#endif 678#endif
421 679
422#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 680#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
423 &spi_bfin_master_device, 681 &bfin_spi0_device,
424#endif 682#endif
425 683
426#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 684#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
427 &bfin_fb_device, 685 &bfin_fb_device,
428#endif 686#endif
429 687
688#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
689 &bfin_fb_adv7393_device,
690#endif
691
430#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 692#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
431 &bfin_uart_device, 693 &bfin_uart_device,
432#endif 694#endif
695
696#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
697 &i2c_bfin_twi_device,
698#endif
699
700#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
701 &bfin_sport0_uart_device,
702 &bfin_sport1_uart_device,
703#endif
704
705#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
706 &bfin_pata_device,
707#endif
433}; 708};
434 709
435static int __init stamp_init(void) 710static int __init stamp_init(void)
@@ -437,9 +712,21 @@ static int __init stamp_init(void)
437 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); 712 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
438 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 713 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
439#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 714#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
440 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 715 spi_register_board_info(bfin_spi_board_info,
716 ARRAY_SIZE(bfin_spi_board_info));
717#endif
718
719#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
720 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
441#endif 721#endif
442 return 0; 722 return 0;
443} 723}
444 724
445arch_initcall(stamp_init); 725arch_initcall(stamp_init);
726
727void native_machine_restart(char *cmd)
728{
729 /* workaround reboot hang when booting from SPI */
730 if ((bfin_read_SYSCR() & 0x7) == 0x3)
731 bfin_gpio_reset_spi0_ssel1();
732}
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c
index 8806f1230f2d..20507e92a3a4 100644
--- a/arch/blackfin/mach-bf537/boards/pnav10.c
+++ b/arch/blackfin/mach-bf537/boards/pnav10.c
@@ -38,6 +38,7 @@
38#include <linux/usb_isp1362.h> 38#include <linux/usb_isp1362.h>
39#endif 39#endif
40#include <linux/irq.h> 40#include <linux/irq.h>
41#include <asm/dma.h>
41#include <asm/bfin5xx_spi.h> 42#include <asm/bfin5xx_spi.h>
42#include <linux/usb_sl811.h> 43#include <linux/usb_sl811.h>
43 44
@@ -130,15 +131,13 @@ static struct resource sl811_hcd_resources[] = {
130#if defined(CONFIG_USB_SL811_BFIN_USE_VBUS) 131#if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
131void sl811_port_power(struct device *dev, int is_on) 132void sl811_port_power(struct device *dev, int is_on)
132{ 133{
133 unsigned short mask = (1 << CONFIG_USB_SL811_BFIN_GPIO_VBUS); 134 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
134 135 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS);
135 bfin_write_PORT_FER(bfin_read_PORT_FER() & ~mask);
136 bfin_write_FIO_DIR(bfin_read_FIO_DIR() | mask);
137 136
138 if (is_on) 137 if (is_on)
139 bfin_write_FIO_FLAG_S(mask); 138 gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 1);
140 else 139 else
141 bfin_write_FIO_FLAG_C(mask); 140 gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 0);
142} 141}
143#endif 142#endif
144 143
@@ -323,7 +322,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
323 /* the modalias must be the same as spi device driver name */ 322 /* the modalias must be the same as spi device driver name */
324 .modalias = "m25p80", /* Name of spi_driver for this device */ 323 .modalias = "m25p80", /* Name of spi_driver for this device */
325 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 324 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
326 .bus_num = 1, /* Framework bus number */ 325 .bus_num = 0, /* Framework bus number */
327 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/ 326 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
328 .platform_data = &bfin_spi_flash_data, 327 .platform_data = &bfin_spi_flash_data,
329 .controller_data = &spi_flash_chip_info, 328 .controller_data = &spi_flash_chip_info,
@@ -336,7 +335,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
336 { 335 {
337 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 336 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
338 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 337 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
339 .bus_num = 1, /* Framework bus number */ 338 .bus_num = 0, /* Framework bus number */
340 .chip_select = 1, /* Framework chip select. */ 339 .chip_select = 1, /* Framework chip select. */
341 .platform_data = NULL, /* No spi_driver specific config */ 340 .platform_data = NULL, /* No spi_driver specific config */
342 .controller_data = &spi_adc_chip_info, 341 .controller_data = &spi_adc_chip_info,
@@ -348,7 +347,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
348 { 347 {
349 .modalias = "ad1836-spi", 348 .modalias = "ad1836-spi",
350 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 349 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
351 .bus_num = 1, 350 .bus_num = 0,
352 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 351 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
353 .controller_data = &ad1836_spi_chip_info, 352 .controller_data = &ad1836_spi_chip_info,
354 }, 353 },
@@ -357,7 +356,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
357 { 356 {
358 .modalias = "ad9960-spi", 357 .modalias = "ad9960-spi",
359 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */ 358 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
360 .bus_num = 1, 359 .bus_num = 0,
361 .chip_select = 1, 360 .chip_select = 1,
362 .controller_data = &ad9960_spi_chip_info, 361 .controller_data = &ad9960_spi_chip_info,
363 }, 362 },
@@ -366,7 +365,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
366 { 365 {
367 .modalias = "spi_mmc_dummy", 366 .modalias = "spi_mmc_dummy",
368 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 367 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
369 .bus_num = 1, 368 .bus_num = 0,
370 .chip_select = 7, 369 .chip_select = 7,
371 .platform_data = NULL, 370 .platform_data = NULL,
372 .controller_data = &spi_mmc_chip_info, 371 .controller_data = &spi_mmc_chip_info,
@@ -375,7 +374,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
375 { 374 {
376 .modalias = "spi_mmc", 375 .modalias = "spi_mmc",
377 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 376 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
378 .bus_num = 1, 377 .bus_num = 0,
379 .chip_select = CONFIG_SPI_MMC_CS_CHAN, 378 .chip_select = CONFIG_SPI_MMC_CS_CHAN,
380 .platform_data = NULL, 379 .platform_data = NULL,
381 .controller_data = &spi_mmc_chip_info, 380 .controller_data = &spi_mmc_chip_info,
@@ -396,24 +395,40 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
396 395
397}; 396};
398 397
398/* SPI (0) */
399static struct resource bfin_spi0_resource[] = {
400 [0] = {
401 .start = SPI0_REGBASE,
402 .end = SPI0_REGBASE + 0xFF,
403 .flags = IORESOURCE_MEM,
404 },
405 [1] = {
406 .start = CH_SPI,
407 .end = CH_SPI,
408 .flags = IORESOURCE_IRQ,
409 }
410};
411
399/* SPI controller data */ 412/* SPI controller data */
400static struct bfin5xx_spi_master spi_bfin_master_info = { 413static struct bfin5xx_spi_master bfin_spi0_info = {
401 .num_chipselect = 8, 414 .num_chipselect = 8,
402 .enable_dma = 1, /* master has the ability to do dma transfer */ 415 .enable_dma = 1, /* master has the ability to do dma transfer */
403}; 416};
404 417
405static struct platform_device spi_bfin_master_device = { 418static struct platform_device bfin_spi0_device = {
406 .name = "bfin-spi-master", 419 .name = "bfin-spi",
407 .id = 1, /* Bus number */ 420 .id = 0, /* Bus number */
421 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
422 .resource = bfin_spi0_resource,
408 .dev = { 423 .dev = {
409 .platform_data = &spi_bfin_master_info, /* Passed to driver */ 424 .platform_data = &bfin_spi0_info, /* Passed to driver */
410 }, 425 },
411}; 426};
412#endif /* spi master and devices */ 427#endif /* spi master and devices */
413 428
414#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 429#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
415static struct platform_device bfin_fb_device = { 430static struct platform_device bfin_fb_device = {
416 .name = "bf537-fb", 431 .name = "bf537-lq035",
417}; 432};
418#endif 433#endif
419 434
@@ -469,7 +484,7 @@ static struct platform_device *stamp_devices[] __initdata = {
469#endif 484#endif
470 485
471#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 486#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
472 &spi_bfin_master_device, 487 &bfin_spi0_device,
473#endif 488#endif
474 489
475#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 490#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 9c43d7756510..47d7d4a0e73d 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -37,10 +37,13 @@
37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
38#include <linux/usb_isp1362.h> 38#include <linux/usb_isp1362.h>
39#endif 39#endif
40#include <linux/pata_platform.h>
40#include <linux/irq.h> 41#include <linux/irq.h>
41#include <linux/interrupt.h> 42#include <linux/interrupt.h>
42#include <linux/usb_sl811.h> 43#include <linux/usb_sl811.h>
44#include <asm/dma.h>
43#include <asm/bfin5xx_spi.h> 45#include <asm/bfin5xx_spi.h>
46#include <asm/reboot.h>
44#include <linux/spi/ad7877.h> 47#include <linux/spi/ad7877.h>
45 48
46/* 49/*
@@ -199,15 +202,13 @@ static struct resource sl811_hcd_resources[] = {
199#if defined(CONFIG_USB_SL811_BFIN_USE_VBUS) 202#if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
200void sl811_port_power(struct device *dev, int is_on) 203void sl811_port_power(struct device *dev, int is_on)
201{ 204{
202 unsigned short mask = (1 << CONFIG_USB_SL811_BFIN_GPIO_VBUS); 205 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
203 206 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS);
204 bfin_write_PORT_FER(bfin_read_PORT_FER() & ~mask);
205 bfin_write_FIO_DIR(bfin_read_FIO_DIR() | mask);
206 207
207 if (is_on) 208 if (is_on)
208 bfin_write_FIO_FLAG_S(mask); 209 gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 1);
209 else 210 else
210 bfin_write_FIO_FLAG_C(mask); 211 gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 0);
211} 212}
212#endif 213#endif
213 214
@@ -407,7 +408,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
407 /* the modalias must be the same as spi device driver name */ 408 /* the modalias must be the same as spi device driver name */
408 .modalias = "m25p80", /* Name of spi_driver for this device */ 409 .modalias = "m25p80", /* Name of spi_driver for this device */
409 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 410 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
410 .bus_num = 1, /* Framework bus number */ 411 .bus_num = 0, /* Framework bus number */
411 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/ 412 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
412 .platform_data = &bfin_spi_flash_data, 413 .platform_data = &bfin_spi_flash_data,
413 .controller_data = &spi_flash_chip_info, 414 .controller_data = &spi_flash_chip_info,
@@ -420,7 +421,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
420 { 421 {
421 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 422 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
422 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 423 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
423 .bus_num = 1, /* Framework bus number */ 424 .bus_num = 0, /* Framework bus number */
424 .chip_select = 1, /* Framework chip select. */ 425 .chip_select = 1, /* Framework chip select. */
425 .platform_data = NULL, /* No spi_driver specific config */ 426 .platform_data = NULL, /* No spi_driver specific config */
426 .controller_data = &spi_adc_chip_info, 427 .controller_data = &spi_adc_chip_info,
@@ -432,7 +433,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
432 { 433 {
433 .modalias = "ad1836-spi", 434 .modalias = "ad1836-spi",
434 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 435 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
435 .bus_num = 1, 436 .bus_num = 0,
436 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 437 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
437 .controller_data = &ad1836_spi_chip_info, 438 .controller_data = &ad1836_spi_chip_info,
438 }, 439 },
@@ -441,7 +442,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
441 { 442 {
442 .modalias = "ad9960-spi", 443 .modalias = "ad9960-spi",
443 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */ 444 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
444 .bus_num = 1, 445 .bus_num = 0,
445 .chip_select = 1, 446 .chip_select = 1,
446 .controller_data = &ad9960_spi_chip_info, 447 .controller_data = &ad9960_spi_chip_info,
447 }, 448 },
@@ -450,7 +451,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
450 { 451 {
451 .modalias = "spi_mmc_dummy", 452 .modalias = "spi_mmc_dummy",
452 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 453 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
453 .bus_num = 1, 454 .bus_num = 0,
454 .chip_select = 0, 455 .chip_select = 0,
455 .platform_data = NULL, 456 .platform_data = NULL,
456 .controller_data = &spi_mmc_chip_info, 457 .controller_data = &spi_mmc_chip_info,
@@ -459,7 +460,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
459 { 460 {
460 .modalias = "spi_mmc", 461 .modalias = "spi_mmc",
461 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 462 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
462 .bus_num = 1, 463 .bus_num = 0,
463 .chip_select = CONFIG_SPI_MMC_CS_CHAN, 464 .chip_select = CONFIG_SPI_MMC_CS_CHAN,
464 .platform_data = NULL, 465 .platform_data = NULL,
465 .controller_data = &spi_mmc_chip_info, 466 .controller_data = &spi_mmc_chip_info,
@@ -470,16 +471,16 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
470 { 471 {
471 .modalias = "fxs-spi", 472 .modalias = "fxs-spi",
472 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 473 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
473 .bus_num = 1, 474 .bus_num = 0,
474 .chip_select = 3, 475 .chip_select = 8 - CONFIG_J11_JUMPER,
475 .controller_data = &spi_si3xxx_chip_info, 476 .controller_data = &spi_si3xxx_chip_info,
476 .mode = SPI_MODE_3, 477 .mode = SPI_MODE_3,
477 }, 478 },
478 { 479 {
479 .modalias = "fxo-spi", 480 .modalias = "fxo-spi",
480 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 481 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
481 .bus_num = 1, 482 .bus_num = 0,
482 .chip_select = 2, 483 .chip_select = 8 - CONFIG_J19_JUMPER,
483 .controller_data = &spi_si3xxx_chip_info, 484 .controller_data = &spi_si3xxx_chip_info,
484 .mode = SPI_MODE_3, 485 .mode = SPI_MODE_3,
485 }, 486 },
@@ -488,7 +489,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
488 { 489 {
489 .modalias = "ad5304_spi", 490 .modalias = "ad5304_spi",
490 .max_speed_hz = 1250000, /* max spi clock (SCK) speed in HZ */ 491 .max_speed_hz = 1250000, /* max spi clock (SCK) speed in HZ */
491 .bus_num = 1, 492 .bus_num = 0,
492 .chip_select = 2, 493 .chip_select = 2,
493 .platform_data = NULL, 494 .platform_data = NULL,
494 .controller_data = &ad5304_chip_info, 495 .controller_data = &ad5304_chip_info,
@@ -509,23 +510,45 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
509}; 510};
510 511
511/* SPI controller data */ 512/* SPI controller data */
512static struct bfin5xx_spi_master spi_bfin_master_info = { 513static struct bfin5xx_spi_master bfin_spi0_info = {
513 .num_chipselect = 8, 514 .num_chipselect = 8,
514 .enable_dma = 1, /* master has the ability to do dma transfer */ 515 .enable_dma = 1, /* master has the ability to do dma transfer */
515}; 516};
516 517
517static struct platform_device spi_bfin_master_device = { 518/* SPI (0) */
518 .name = "bfin-spi-master", 519static struct resource bfin_spi0_resource[] = {
519 .id = 1, /* Bus number */ 520 [0] = {
521 .start = SPI0_REGBASE,
522 .end = SPI0_REGBASE + 0xFF,
523 .flags = IORESOURCE_MEM,
524 },
525 [1] = {
526 .start = CH_SPI,
527 .end = CH_SPI,
528 .flags = IORESOURCE_IRQ,
529 },
530};
531
532static struct platform_device bfin_spi0_device = {
533 .name = "bfin-spi",
534 .id = 0, /* Bus number */
535 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
536 .resource = bfin_spi0_resource,
520 .dev = { 537 .dev = {
521 .platform_data = &spi_bfin_master_info, /* Passed to driver */ 538 .platform_data = &bfin_spi0_info, /* Passed to driver */
522 }, 539 },
523}; 540};
524#endif /* spi master and devices */ 541#endif /* spi master and devices */
525 542
526#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 543#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
527static struct platform_device bfin_fb_device = { 544static struct platform_device bfin_fb_device = {
528 .name = "bf537-fb", 545 .name = "bf537-lq035",
546};
547#endif
548
549#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
550static struct platform_device bfin_fb_adv7393_device = {
551 .name = "bfin-adv7393",
529}; 552};
530#endif 553#endif
531 554
@@ -551,9 +574,24 @@ static struct platform_device bfin_uart_device = {
551#endif 574#endif
552 575
553#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 576#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
577static struct resource bfin_twi0_resource[] = {
578 [0] = {
579 .start = TWI0_REGBASE,
580 .end = TWI0_REGBASE,
581 .flags = IORESOURCE_MEM,
582 },
583 [1] = {
584 .start = IRQ_TWI,
585 .end = IRQ_TWI,
586 .flags = IORESOURCE_IRQ,
587 },
588};
589
554static struct platform_device i2c_bfin_twi_device = { 590static struct platform_device i2c_bfin_twi_device = {
555 .name = "i2c-bfin-twi", 591 .name = "i2c-bfin-twi",
556 .id = 0, 592 .id = 0,
593 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
594 .resource = bfin_twi0_resource,
557}; 595};
558#endif 596#endif
559 597
@@ -569,6 +607,43 @@ static struct platform_device bfin_sport1_uart_device = {
569}; 607};
570#endif 608#endif
571 609
610#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
611#define PATA_INT 55
612
613static struct pata_platform_info bfin_pata_platform_data = {
614 .ioport_shift = 1,
615 .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
616};
617
618static struct resource bfin_pata_resources[] = {
619 {
620 .start = 0x20314020,
621 .end = 0x2031403F,
622 .flags = IORESOURCE_MEM,
623 },
624 {
625 .start = 0x2031401C,
626 .end = 0x2031401F,
627 .flags = IORESOURCE_MEM,
628 },
629 {
630 .start = PATA_INT,
631 .end = PATA_INT,
632 .flags = IORESOURCE_IRQ,
633 },
634};
635
636static struct platform_device bfin_pata_device = {
637 .name = "pata_platform",
638 .id = -1,
639 .num_resources = ARRAY_SIZE(bfin_pata_resources),
640 .resource = bfin_pata_resources,
641 .dev = {
642 .platform_data = &bfin_pata_platform_data,
643 }
644};
645#endif
646
572static struct platform_device *stamp_devices[] __initdata = { 647static struct platform_device *stamp_devices[] __initdata = {
573#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 648#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
574 &bfin_pcmcia_cf_device, 649 &bfin_pcmcia_cf_device,
@@ -603,13 +678,17 @@ static struct platform_device *stamp_devices[] __initdata = {
603#endif 678#endif
604 679
605#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 680#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
606 &spi_bfin_master_device, 681 &bfin_spi0_device,
607#endif 682#endif
608 683
609#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 684#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
610 &bfin_fb_device, 685 &bfin_fb_device,
611#endif 686#endif
612 687
688#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
689 &bfin_fb_adv7393_device,
690#endif
691
613#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 692#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
614 &bfin_uart_device, 693 &bfin_uart_device,
615#endif 694#endif
@@ -622,6 +701,10 @@ static struct platform_device *stamp_devices[] __initdata = {
622 &bfin_sport0_uart_device, 701 &bfin_sport0_uart_device,
623 &bfin_sport1_uart_device, 702 &bfin_sport1_uart_device,
624#endif 703#endif
704
705#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
706 &bfin_pata_device,
707#endif
625}; 708};
626 709
627static int __init stamp_init(void) 710static int __init stamp_init(void)
@@ -632,7 +715,18 @@ static int __init stamp_init(void)
632 spi_register_board_info(bfin_spi_board_info, 715 spi_register_board_info(bfin_spi_board_info,
633 ARRAY_SIZE(bfin_spi_board_info)); 716 ARRAY_SIZE(bfin_spi_board_info));
634#endif 717#endif
718
719#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
720 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
721#endif
635 return 0; 722 return 0;
636} 723}
637 724
638arch_initcall(stamp_init); 725arch_initcall(stamp_init);
726
727void native_machine_restart(char *cmd)
728{
729 /* workaround reboot hang when booting from SPI */
730 if ((bfin_read_SYSCR() & 0x7) == 0x3)
731 bfin_gpio_reset_spi0_ssel1();
732}
diff --git a/arch/blackfin/mach-bf537/head.S b/arch/blackfin/mach-bf537/head.S
index 429c8a1019da..3014fe8dd155 100644
--- a/arch/blackfin/mach-bf537/head.S
+++ b/arch/blackfin/mach-bf537/head.S
@@ -33,6 +33,7 @@
33#include <asm/trace.h> 33#include <asm/trace.h>
34 34
35#if CONFIG_BFIN_KERNEL_CLOCK 35#if CONFIG_BFIN_KERNEL_CLOCK
36#include <asm/mach-common/clocks.h>
36#include <asm/mach/mem_init.h> 37#include <asm/mach/mem_init.h>
37#endif 38#endif
38 39
@@ -50,10 +51,12 @@ __INIT
50ENTRY(__start) 51ENTRY(__start)
51 /* R0: argument of command line string, passed from uboot, save it */ 52 /* R0: argument of command line string, passed from uboot, save it */
52 R7 = R0; 53 R7 = R0;
53 /* Set the SYSCFG register: 54 /* Enable Cycle Counter and Nesting Of Interrupts */
54 * Enable Cycle Counter and Nesting Of Interrupts (3rd Bit) 55#ifdef CONFIG_BFIN_SCRATCH_REG_CYCLES
55 */ 56 R0 = SYSCFG_SNEN;
56 R0 = 0x36; 57#else
58 R0 = SYSCFG_SNEN | SYSCFG_CCEN;
59#endif
57 SYSCFG = R0; 60 SYSCFG = R0;
58 R0 = 0; 61 R0 = 0;
59 62
@@ -95,43 +98,43 @@ ENTRY(__start)
95 M2 = r0; 98 M2 = r0;
96 M3 = r0; 99 M3 = r0;
97 100
98 trace_buffer_start(p0,r0); 101 trace_buffer_init(p0,r0);
99 P0 = R1; 102 P0 = R1;
100 R0 = R1; 103 R0 = R1;
101 104
102 /* Turn off the icache */ 105 /* Turn off the icache */
103 p0.l = (IMEM_CONTROL & 0xFFFF); 106 p0.l = LO(IMEM_CONTROL);
104 p0.h = (IMEM_CONTROL >> 16); 107 p0.h = HI(IMEM_CONTROL);
105 R1 = [p0]; 108 R1 = [p0];
106 R0 = ~ENICPLB; 109 R0 = ~ENICPLB;
107 R0 = R0 & R1; 110 R0 = R0 & R1;
108 111
109 /* Anomaly 05000125 */ 112 /* Anomaly 05000125 */
110#ifdef ANOMALY_05000125 113#if ANOMALY_05000125
111 CLI R2; 114 CLI R2;
112 SSYNC; 115 SSYNC;
113#endif 116#endif
114 [p0] = R0; 117 [p0] = R0;
115 SSYNC; 118 SSYNC;
116#ifdef ANOMALY_05000125 119#if ANOMALY_05000125
117 STI R2; 120 STI R2;
118#endif 121#endif
119 122
120 /* Turn off the dcache */ 123 /* Turn off the dcache */
121 p0.l = (DMEM_CONTROL & 0xFFFF); 124 p0.l = LO(DMEM_CONTROL);
122 p0.h = (DMEM_CONTROL >> 16); 125 p0.h = HI(DMEM_CONTROL);
123 R1 = [p0]; 126 R1 = [p0];
124 R0 = ~ENDCPLB; 127 R0 = ~ENDCPLB;
125 R0 = R0 & R1; 128 R0 = R0 & R1;
126 129
127 /* Anomaly 05000125 */ 130 /* Anomaly 05000125 */
128#ifdef ANOMALY_05000125 131#if ANOMALY_05000125
129 CLI R2; 132 CLI R2;
130 SSYNC; 133 SSYNC;
131#endif 134#endif
132 [p0] = R0; 135 [p0] = R0;
133 SSYNC; 136 SSYNC;
134#ifdef ANOMALY_05000125 137#if ANOMALY_05000125
135 STI R2; 138 STI R2;
136#endif 139#endif
137 140
@@ -141,12 +144,12 @@ ENTRY(__start)
141 */ 144 */
142 p0.h = hi(BFIN_PORT_MUX); 145 p0.h = hi(BFIN_PORT_MUX);
143 p0.l = lo(BFIN_PORT_MUX); 146 p0.l = lo(BFIN_PORT_MUX);
144#ifdef ANOMALY_05000212 147#if ANOMALY_05000212
145 R0.L = W[P0]; /* Read */ 148 R0.L = W[P0]; /* Read */
146 SSYNC; 149 SSYNC;
147#endif 150#endif
148 R0 = (PGDE_UART | PFTE_UART)(Z); 151 R0 = (PGDE_UART | PFTE_UART)(Z);
149#ifdef ANOMALY_05000212 152#if ANOMALY_05000212
150 W[P0] = R0.L; /* Write */ 153 W[P0] = R0.L; /* Write */
151 SSYNC; 154 SSYNC;
152#endif 155#endif
@@ -155,12 +158,12 @@ ENTRY(__start)
155 158
156 p0.h = hi(PORTF_FER); 159 p0.h = hi(PORTF_FER);
157 p0.l = lo(PORTF_FER); 160 p0.l = lo(PORTF_FER);
158#ifdef ANOMALY_05000212 161#if ANOMALY_05000212
159 R0.L = W[P0]; /* Read */ 162 R0.L = W[P0]; /* Read */
160 SSYNC; 163 SSYNC;
161#endif 164#endif
162 R0 = 0x000F(Z); 165 R0 = 0x000F(Z);
163#ifdef ANOMALY_05000212 166#if ANOMALY_05000212
164 W[P0] = R0.L; /* Write */ 167 W[P0] = R0.L; /* Write */
165 SSYNC; 168 SSYNC;
166#endif 169#endif
@@ -221,6 +224,12 @@ ENTRY(__start)
221 fp = sp; 224 fp = sp;
222 usp = sp; 225 usp = sp;
223 226
227#ifdef CONFIG_EARLY_PRINTK
228 SP += -12;
229 call _init_early_exception_vectors;
230 SP += 12;
231#endif
232
224 /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ 233 /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */
225 call _bf53x_relocate_l1_mem; 234 call _bf53x_relocate_l1_mem;
226#if CONFIG_BFIN_KERNEL_CLOCK 235#if CONFIG_BFIN_KERNEL_CLOCK
@@ -274,7 +283,7 @@ ENTRY(__start)
274 p0.l = .LWAIT_HERE; 283 p0.l = .LWAIT_HERE;
275 p0.h = .LWAIT_HERE; 284 p0.h = .LWAIT_HERE;
276 reti = p0; 285 reti = p0;
277#if defined(ANOMALY_05000281) 286#if ANOMALY_05000281
278 nop; nop; nop; 287 nop; nop; nop;
279#endif 288#endif
280 rti; 289 rti;
@@ -436,8 +445,8 @@ ENTRY(_start_dma_code)
436 w[p0] = r0.l; 445 w[p0] = r0.l;
437 ssync; 446 ssync;
438 447
439 p0.l = (EBIU_SDBCTL & 0xFFFF); 448 p0.l = LO(EBIU_SDBCTL);
440 p0.h = (EBIU_SDBCTL >> 16); /* SDRAM Memory Bank Control Register */ 449 p0.h = HI(EBIU_SDBCTL); /* SDRAM Memory Bank Control Register */
441 r0 = mem_SDBCTL; 450 r0 = mem_SDBCTL;
442 w[p0] = r0.l; 451 w[p0] = r0.l;
443 ssync; 452 ssync;
@@ -475,85 +484,6 @@ ENTRY(_start_dma_code)
475ENDPROC(_start_dma_code) 484ENDPROC(_start_dma_code)
476#endif /* CONFIG_BFIN_KERNEL_CLOCK */ 485#endif /* CONFIG_BFIN_KERNEL_CLOCK */
477 486
478ENTRY(_bfin_reset)
479 /* No more interrupts to be handled*/
480 CLI R6;
481 SSYNC;
482
483#if defined(CONFIG_MTD_M25P80)
484 /*
485 * The following code fix the SPI flash reboot issue,
486 * /CS signal of the chip which is using PF10 return to GPIO mode
487 */
488 p0.h = hi(PORTF_FER);
489 p0.l = lo(PORTF_FER);
490 r0.l = 0x0000;
491 w[p0] = r0.l;
492 SSYNC;
493
494 /* /CS return to high */
495 p0.h = hi(PORTFIO);
496 p0.l = lo(PORTFIO);
497 r0.l = 0xFFFF;
498 w[p0] = r0.l;
499 SSYNC;
500
501 /* Delay some time, This is necessary */
502 r1.h = 0;
503 r1.l = 0x400;
504 p1 = r1;
505 lsetup (.L_delay_lab1, .L_delay_lab1_end) lc1 = p1;
506.L_delay_lab1:
507 r0.h = 0;
508 r0.l = 0x8000;
509 p0 = r0;
510 lsetup (.L_delay_lab0, .L_delay_lab0_end) lc0 = p0;
511.L_delay_lab0:
512 nop;
513.L_delay_lab0_end:
514 nop;
515.L_delay_lab1_end:
516 nop;
517#endif
518
519 /* Clear the IMASK register */
520 p0.h = hi(IMASK);
521 p0.l = lo(IMASK);
522 r0 = 0x0;
523 [p0] = r0;
524
525 /* Clear the ILAT register */
526 p0.h = hi(ILAT);
527 p0.l = lo(ILAT);
528 r0 = [p0];
529 [p0] = r0;
530 SSYNC;
531
532 /* make sure SYSCR is set to use BMODE */
533 P0.h = hi(SYSCR);
534 P0.l = lo(SYSCR);
535 R0.l = 0x0;
536 W[P0] = R0.l;
537 SSYNC;
538
539 /* issue a system soft reset */
540 P1.h = hi(SWRST);
541 P1.l = lo(SWRST);
542 R1.l = 0x0007;
543 W[P1] = R1;
544 SSYNC;
545
546 /* clear system soft reset */
547 R0.l = 0x0000;
548 W[P0] = R0;
549 SSYNC;
550
551 /* issue core reset */
552 raise 1;
553
554 RTS;
555ENDPROC(_bfin_reset)
556
557.data 487.data
558 488
559/* 489/*
diff --git a/arch/blackfin/mach-bf548/Kconfig b/arch/blackfin/mach-bf548/Kconfig
index e78b03d56c7c..08d8dc83701c 100644
--- a/arch/blackfin/mach-bf548/Kconfig
+++ b/arch/blackfin/mach-bf548/Kconfig
@@ -2,6 +2,13 @@ if (BF54x)
2 2
3menu "BF548 Specific Configuration" 3menu "BF548 Specific Configuration"
4 4
5config DEB_DMA_URGENT
6 bool "DMA has priority over core for ext. accesses"
7 depends on BF54x
8 default n
9 help
10 Treat any DEB1, DEB2 and DEB3 request as Urgent
11
5comment "Interrupt Priority Assignment" 12comment "Interrupt Priority Assignment"
6menu "Priority" 13menu "Priority"
7 14
@@ -282,7 +289,7 @@ menu "Assignment"
282 289
283config PINTx_REASSIGN 290config PINTx_REASSIGN
284 bool "Reprogram PINT Assignment" 291 bool "Reprogram PINT Assignment"
285 default n 292 default y
286 help 293 help
287 The interrupt assignment registers controls the pin-to-interrupt 294 The interrupt assignment registers controls the pin-to-interrupt
288 assignment in a byte-wide manner. Each option allows you to select 295 assignment in a byte-wide manner. Each option allows you to select
@@ -303,7 +310,7 @@ config PINT1_ASSIGN
303config PINT2_ASSIGN 310config PINT2_ASSIGN
304 hex "PINT2_ASSIGN" 311 hex "PINT2_ASSIGN"
305 depends on PINTx_REASSIGN 312 depends on PINTx_REASSIGN
306 default 0x00000101 313 default 0x07000101
307config PINT3_ASSIGN 314config PINT3_ASSIGN
308 hex "PINT3_ASSIGN" 315 hex "PINT3_ASSIGN"
309 depends on PINTx_REASSIGN 316 depends on PINTx_REASSIGN
diff --git a/arch/blackfin/mach-bf548/Makefile b/arch/blackfin/mach-bf548/Makefile
index 060ad78ebf1d..7e7c9c8ac5b2 100644
--- a/arch/blackfin/mach-bf548/Makefile
+++ b/arch/blackfin/mach-bf548/Makefile
@@ -4,6 +4,6 @@
4 4
5extra-y := head.o 5extra-y := head.o
6 6
7obj-y := ints-priority.o dma.o gpio.o 7obj-y := ints-priority.o dma.o
8 8
9obj-$(CONFIG_CPU_FREQ) += cpu.o 9obj-$(CONFIG_CPU_FREQ) += cpu.o
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index 96ad95fab1a8..2c47db494f7d 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -35,9 +35,16 @@
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/spi/flash.h> 36#include <linux/spi/flash.h>
37#include <linux/irq.h> 37#include <linux/irq.h>
38#include <linux/irq.h>
39#include <linux/interrupt.h> 38#include <linux/interrupt.h>
39#include <linux/usb/musb.h>
40#include <asm/bfin5xx_spi.h> 40#include <asm/bfin5xx_spi.h>
41#include <asm/cplb.h>
42#include <asm/dma.h>
43#include <asm/gpio.h>
44#include <asm/nand.h>
45#include <asm/mach/bf54x_keys.h>
46#include <linux/input.h>
47#include <linux/spi/ad7877.h>
41 48
42/* 49/*
43 * Name the Board for the /proc/cpuinfo 50 * Name the Board for the /proc/cpuinfo
@@ -48,6 +55,88 @@ char *bfin_board_name = "ADSP-BF548-EZKIT";
48 * Driver needs to know address, irq and flag pin. 55 * Driver needs to know address, irq and flag pin.
49 */ 56 */
50 57
58#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
59
60#include <asm/mach/bf54x-lq043.h>
61
62static struct bfin_bf54xfb_mach_info bf54x_lq043_data = {
63 .width = 480,
64 .height = 272,
65 .xres = {480, 480, 480},
66 .yres = {272, 272, 272},
67 .bpp = {24, 24, 24},
68 .disp = GPIO_PE3,
69};
70
71static struct resource bf54x_lq043_resources[] = {
72 {
73 .start = IRQ_EPPI0_ERR,
74 .end = IRQ_EPPI0_ERR,
75 .flags = IORESOURCE_IRQ,
76 },
77};
78
79static struct platform_device bf54x_lq043_device = {
80 .name = "bf54x-lq043",
81 .id = -1,
82 .num_resources = ARRAY_SIZE(bf54x_lq043_resources),
83 .resource = bf54x_lq043_resources,
84 .dev = {
85 .platform_data = &bf54x_lq043_data,
86 },
87};
88#endif
89
90#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
91static int bf548_keymap[] = {
92 KEYVAL(0, 0, KEY_ENTER),
93 KEYVAL(0, 1, KEY_HELP),
94 KEYVAL(0, 2, KEY_0),
95 KEYVAL(0, 3, KEY_BACKSPACE),
96 KEYVAL(1, 0, KEY_TAB),
97 KEYVAL(1, 1, KEY_9),
98 KEYVAL(1, 2, KEY_8),
99 KEYVAL(1, 3, KEY_7),
100 KEYVAL(2, 0, KEY_DOWN),
101 KEYVAL(2, 1, KEY_6),
102 KEYVAL(2, 2, KEY_5),
103 KEYVAL(2, 3, KEY_4),
104 KEYVAL(3, 0, KEY_UP),
105 KEYVAL(3, 1, KEY_3),
106 KEYVAL(3, 2, KEY_2),
107 KEYVAL(3, 3, KEY_1),
108};
109
110static struct bfin_kpad_platform_data bf54x_kpad_data = {
111 .rows = 4,
112 .cols = 4,
113 .keymap = bf548_keymap,
114 .keymapsize = ARRAY_SIZE(bf548_keymap),
115 .repeat = 0,
116 .debounce_time = 5000, /* ns (5ms) */
117 .coldrive_time = 1000, /* ns (1ms) */
118 .keyup_test_interval = 50, /* ms (50ms) */
119};
120
121static struct resource bf54x_kpad_resources[] = {
122 {
123 .start = IRQ_KEY,
124 .end = IRQ_KEY,
125 .flags = IORESOURCE_IRQ,
126 },
127};
128
129static struct platform_device bf54x_kpad_device = {
130 .name = "bf54x-keys",
131 .id = -1,
132 .num_resources = ARRAY_SIZE(bf54x_kpad_resources),
133 .resource = bf54x_kpad_resources,
134 .dev = {
135 .platform_data = &bf54x_kpad_data,
136 },
137};
138#endif
139
51#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 140#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
52static struct platform_device rtc_device = { 141static struct platform_device rtc_device = {
53 .name = "rtc-bfin", 142 .name = "rtc-bfin",
@@ -94,6 +183,344 @@ static struct platform_device bfin_uart_device = {
94}; 183};
95#endif 184#endif
96 185
186#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
187static struct resource smsc911x_resources[] = {
188 {
189 .name = "smsc911x-memory",
190 .start = 0x24000000,
191 .end = 0x24000000 + 0xFF,
192 .flags = IORESOURCE_MEM,
193 },
194 {
195 .start = IRQ_PE8,
196 .end = IRQ_PE8,
197 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
198 },
199};
200static struct platform_device smsc911x_device = {
201 .name = "smsc911x",
202 .id = 0,
203 .num_resources = ARRAY_SIZE(smsc911x_resources),
204 .resource = smsc911x_resources,
205};
206#endif
207
208#if defined(CONFIG_USB_BF54x_HCD) || defined(CONFIG_USB_BF54x_HCD_MODULE)
209static struct resource bf54x_hcd_resources[] = {
210 {
211 .start = 0xFFC03C00,
212 .end = 0xFFC040FF,
213 .flags = IORESOURCE_MEM,
214 },
215};
216
217static struct platform_device bf54x_hcd = {
218 .name = "bf54x-hcd",
219 .id = 0,
220 .num_resources = ARRAY_SIZE(bf54x_hcd_resources),
221 .resource = bf54x_hcd_resources,
222};
223#endif
224
225#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
226static struct resource musb_resources[] = {
227 [0] = {
228 .start = 0xFFC03C00,
229 .end = 0xFFC040FF,
230 .flags = IORESOURCE_MEM,
231 },
232 [1] = { /* general IRQ */
233 .start = IRQ_USB_INT0,
234 .end = IRQ_USB_INT0,
235 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
236 },
237 [2] = { /* DMA IRQ */
238 .start = IRQ_USB_DMA,
239 .end = IRQ_USB_DMA,
240 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
241 },
242};
243
244static struct musb_hdrc_platform_data musb_plat = {
245#ifdef CONFIG_USB_MUSB_OTG
246 .mode = MUSB_OTG,
247#elif CONFIG_USB_MUSB_HDRC_HCD
248 .mode = MUSB_HOST,
249#elif CONFIG_USB_GADGET_MUSB_HDRC
250 .mode = MUSB_PERIPHERAL,
251#endif
252 .multipoint = 1,
253};
254
255static u64 musb_dmamask = ~(u32)0;
256
257static struct platform_device musb_device = {
258 .name = "musb_hdrc",
259 .id = 0,
260 .dev = {
261 .dma_mask = &musb_dmamask,
262 .coherent_dma_mask = 0xffffffff,
263 .platform_data = &musb_plat,
264 },
265 .num_resources = ARRAY_SIZE(musb_resources),
266 .resource = musb_resources,
267};
268#endif
269
270#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
271static struct resource bfin_atapi_resources[] = {
272 {
273 .start = 0xFFC03800,
274 .end = 0xFFC0386F,
275 .flags = IORESOURCE_MEM,
276 },
277 {
278 .start = IRQ_ATAPI_ERR,
279 .end = IRQ_ATAPI_ERR,
280 .flags = IORESOURCE_IRQ,
281 },
282};
283
284static struct platform_device bfin_atapi_device = {
285 .name = "pata-bf54x",
286 .id = -1,
287 .num_resources = ARRAY_SIZE(bfin_atapi_resources),
288 .resource = bfin_atapi_resources,
289};
290#endif
291
292#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
293static struct mtd_partition partition_info[] = {
294 {
295 .name = "Linux Kernel",
296 .offset = 0,
297 .size = 4 * SIZE_1M,
298 },
299 {
300 .name = "File System",
301 .offset = 4 * SIZE_1M,
302 .size = (256 - 4) * SIZE_1M,
303 },
304};
305
306static struct bf5xx_nand_platform bf5xx_nand_platform = {
307 .page_size = NFC_PG_SIZE_256,
308 .data_width = NFC_NWIDTH_8,
309 .partitions = partition_info,
310 .nr_partitions = ARRAY_SIZE(partition_info),
311 .rd_dly = 3,
312 .wr_dly = 3,
313};
314
315static struct resource bf5xx_nand_resources[] = {
316 {
317 .start = 0xFFC03B00,
318 .end = 0xFFC03B4F,
319 .flags = IORESOURCE_MEM,
320 },
321 {
322 .start = CH_NFC,
323 .end = CH_NFC,
324 .flags = IORESOURCE_IRQ,
325 },
326};
327
328static struct platform_device bf5xx_nand_device = {
329 .name = "bf5xx-nand",
330 .id = 0,
331 .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
332 .resource = bf5xx_nand_resources,
333 .dev = {
334 .platform_data = &bf5xx_nand_platform,
335 },
336};
337#endif
338
339#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN)
340static struct platform_device bf54x_sdh_device = {
341 .name = "bfin-sdh",
342 .id = 0,
343};
344#endif
345
346#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
347/* all SPI peripherals info goes here */
348#if defined(CONFIG_MTD_M25P80) \
349 || defined(CONFIG_MTD_M25P80_MODULE)
350/* SPI flash chip (m25p16) */
351static struct mtd_partition bfin_spi_flash_partitions[] = {
352 {
353 .name = "bootloader",
354 .size = 0x00040000,
355 .offset = 0,
356 .mask_flags = MTD_CAP_ROM
357 }, {
358 .name = "linux kernel",
359 .size = 0x1c0000,
360 .offset = 0x40000
361 }
362};
363
364static struct flash_platform_data bfin_spi_flash_data = {
365 .name = "m25p80",
366 .parts = bfin_spi_flash_partitions,
367 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
368 .type = "m25p16",
369};
370
371static struct bfin5xx_spi_chip spi_flash_chip_info = {
372 .enable_dma = 0, /* use dma transfer with this chip*/
373 .bits_per_word = 8,
374 .cs_change_per_word = 0,
375};
376#endif
377
378#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
379static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
380 .cs_change_per_word = 1,
381 .enable_dma = 0,
382 .bits_per_word = 16,
383};
384
385static const struct ad7877_platform_data bfin_ad7877_ts_info = {
386 .model = 7877,
387 .vref_delay_usecs = 50, /* internal, no capacitor */
388 .x_plate_ohms = 419,
389 .y_plate_ohms = 486,
390 .pressure_max = 1000,
391 .pressure_min = 0,
392 .stopacq_polarity = 1,
393 .first_conversion_delay = 3,
394 .acquisition_time = 1,
395 .averaging = 1,
396 .pen_down_acc_interval = 1,
397};
398#endif
399
400static struct spi_board_info bf54x_spi_board_info[] __initdata = {
401#if defined(CONFIG_MTD_M25P80) \
402 || defined(CONFIG_MTD_M25P80_MODULE)
403 {
404 /* the modalias must be the same as spi device driver name */
405 .modalias = "m25p80", /* Name of spi_driver for this device */
406 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
407 .bus_num = 0, /* Framework bus number */
408 .chip_select = 1, /* SPI_SSEL1*/
409 .platform_data = &bfin_spi_flash_data,
410 .controller_data = &spi_flash_chip_info,
411 .mode = SPI_MODE_3,
412 },
413#endif
414#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
415{
416 .modalias = "ad7877",
417 .platform_data = &bfin_ad7877_ts_info,
418 .irq = IRQ_PJ11,
419 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
420 .bus_num = 0,
421 .chip_select = 2,
422 .controller_data = &spi_ad7877_chip_info,
423},
424#endif
425};
426
427/* SPI (0) */
428static struct resource bfin_spi0_resource[] = {
429 [0] = {
430 .start = SPI0_REGBASE,
431 .end = SPI0_REGBASE + 0xFF,
432 .flags = IORESOURCE_MEM,
433 },
434 [1] = {
435 .start = CH_SPI0,
436 .end = CH_SPI0,
437 .flags = IORESOURCE_IRQ,
438 }
439};
440
441/* SPI (1) */
442static struct resource bfin_spi1_resource[] = {
443 [0] = {
444 .start = SPI1_REGBASE,
445 .end = SPI1_REGBASE + 0xFF,
446 .flags = IORESOURCE_MEM,
447 },
448 [1] = {
449 .start = CH_SPI1,
450 .end = CH_SPI1,
451 .flags = IORESOURCE_IRQ,
452 }
453};
454
455/* SPI controller data */
456static struct bfin5xx_spi_master bf54x_spi_master_info = {
457 .num_chipselect = 8,
458 .enable_dma = 1, /* master has the ability to do dma transfer */
459};
460
461static struct platform_device bf54x_spi_master0 = {
462 .name = "bfin-spi",
463 .id = 0, /* Bus number */
464 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
465 .resource = bfin_spi0_resource,
466 .dev = {
467 .platform_data = &bf54x_spi_master_info, /* Passed to driver */
468 },
469};
470
471static struct platform_device bf54x_spi_master1 = {
472 .name = "bfin-spi",
473 .id = 1, /* Bus number */
474 .num_resources = ARRAY_SIZE(bfin_spi1_resource),
475 .resource = bfin_spi1_resource,
476 .dev = {
477 .platform_data = &bf54x_spi_master_info, /* Passed to driver */
478 },
479};
480#endif /* spi master and devices */
481
482#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
483static struct resource bfin_twi0_resource[] = {
484 [0] = {
485 .start = TWI0_REGBASE,
486 .end = TWI0_REGBASE + 0xFF,
487 .flags = IORESOURCE_MEM,
488 },
489 [1] = {
490 .start = IRQ_TWI0,
491 .end = IRQ_TWI0,
492 .flags = IORESOURCE_IRQ,
493 },
494};
495
496static struct platform_device i2c_bfin_twi0_device = {
497 .name = "i2c-bfin-twi",
498 .id = 0,
499 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
500 .resource = bfin_twi0_resource,
501};
502
503static struct resource bfin_twi1_resource[] = {
504 [0] = {
505 .start = TWI1_REGBASE,
506 .end = TWI1_REGBASE + 0xFF,
507 .flags = IORESOURCE_MEM,
508 },
509 [1] = {
510 .start = IRQ_TWI1,
511 .end = IRQ_TWI1,
512 .flags = IORESOURCE_IRQ,
513 },
514};
515
516static struct platform_device i2c_bfin_twi1_device = {
517 .name = "i2c-bfin-twi",
518 .id = 1,
519 .num_resources = ARRAY_SIZE(bfin_twi1_resource),
520 .resource = bfin_twi1_resource,
521};
522#endif
523
97static struct platform_device *ezkit_devices[] __initdata = { 524static struct platform_device *ezkit_devices[] __initdata = {
98#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 525#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
99 &rtc_device, 526 &rtc_device,
@@ -102,12 +529,60 @@ static struct platform_device *ezkit_devices[] __initdata = {
102#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 529#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
103 &bfin_uart_device, 530 &bfin_uart_device,
104#endif 531#endif
532
533#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
534 &bf54x_lq043_device,
535#endif
536
537#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
538 &smsc911x_device,
539#endif
540
541#if defined(CONFIG_USB_BF54x_HCD) || defined(CONFIG_USB_BF54x_HCD_MODULE)
542 &bf54x_hcd,
543#endif
544
545#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
546 &musb_device,
547#endif
548
549#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
550 &bfin_atapi_device,
551#endif
552
553#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
554 &bf5xx_nand_device,
555#endif
556
557#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN)
558 &bf54x_sdh_device,
559#endif
560
561#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
562 &bf54x_spi_master0,
563/* &bf54x_spi_master1,*/
564#endif
565
566#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
567 &bf54x_kpad_device,
568#endif
569
570#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
571 &i2c_bfin_twi0_device,
572 &i2c_bfin_twi1_device,
573#endif
105}; 574};
106 575
107static int __init stamp_init(void) 576static int __init stamp_init(void)
108{ 577{
109 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); 578 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
110 platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); 579 platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
580
581#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
582 spi_register_board_info(bf54x_spi_board_info,
583 ARRAY_SIZE(bf54x_spi_board_info));
584#endif
585
111 return 0; 586 return 0;
112} 587}
113 588
diff --git a/arch/blackfin/mach-bf548/gpio.c b/arch/blackfin/mach-bf548/gpio.c
deleted file mode 100644
index 0da5f0003b8c..000000000000
--- a/arch/blackfin/mach-bf548/gpio.c
+++ /dev/null
@@ -1,323 +0,0 @@
1/*
2 * File: arch/blackfin/mach-bf548/gpio.c
3 * Based on:
4 * Author: Michael Hennerich (hennerich@blackfin.uclinux.org)
5 *
6 * Created:
7 * Description: GPIO Abstraction Layer
8 *
9 * Modified:
10 * Copyright 2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#include <linux/module.h>
31#include <linux/err.h>
32#include <asm/blackfin.h>
33#include <asm/gpio.h>
34#include <asm/portmux.h>
35#include <linux/irq.h>
36
37static struct gpio_port_t *gpio_array[gpio_bank(MAX_BLACKFIN_GPIOS)] = {
38 (struct gpio_port_t *)PORTA_FER,
39 (struct gpio_port_t *)PORTB_FER,
40 (struct gpio_port_t *)PORTC_FER,
41 (struct gpio_port_t *)PORTD_FER,
42 (struct gpio_port_t *)PORTE_FER,
43 (struct gpio_port_t *)PORTF_FER,
44 (struct gpio_port_t *)PORTG_FER,
45 (struct gpio_port_t *)PORTH_FER,
46 (struct gpio_port_t *)PORTI_FER,
47 (struct gpio_port_t *)PORTJ_FER,
48};
49
50static unsigned short reserved_gpio_map[gpio_bank(MAX_BLACKFIN_GPIOS)];
51static unsigned short reserved_peri_map[gpio_bank(MAX_BLACKFIN_GPIOS)];
52
53inline int check_gpio(unsigned short gpio)
54{
55 if (gpio == GPIO_PB15 || gpio == GPIO_PC14 || gpio == GPIO_PC15
56 || gpio == GPIO_PH14 || gpio == GPIO_PH15
57 || gpio == GPIO_PJ14 || gpio == GPIO_PJ15
58 || gpio > MAX_BLACKFIN_GPIOS)
59 return -EINVAL;
60 return 0;
61}
62
63inline void portmux_setup(unsigned short portno, unsigned short function)
64{
65 u32 pmux;
66
67 pmux = gpio_array[gpio_bank(portno)]->port_mux;
68
69 pmux &= ~(0x3 << (2 * gpio_sub_n(portno)));
70 pmux |= (function & 0x3) << (2 * gpio_sub_n(portno));
71
72 gpio_array[gpio_bank(portno)]->port_mux = pmux;
73
74}
75
76inline u16 get_portmux(unsigned short portno)
77{
78 u32 pmux;
79
80 pmux = gpio_array[gpio_bank(portno)]->port_mux;
81
82 return (pmux >> (2 * gpio_sub_n(portno)) & 0x3);
83
84}
85
86static void port_setup(unsigned short gpio, unsigned short usage)
87{
88 if (usage == GPIO_USAGE) {
89 if (gpio_array[gpio_bank(gpio)]->port_fer & gpio_bit(gpio))
90 printk(KERN_WARNING
91 "bfin-gpio: Possible Conflict with Peripheral "
92 "usage and GPIO %d detected!\n", gpio);
93 gpio_array[gpio_bank(gpio)]->port_fer &= ~gpio_bit(gpio);
94 } else
95 gpio_array[gpio_bank(gpio)]->port_fer |= gpio_bit(gpio);
96 SSYNC();
97}
98
99static int __init bfin_gpio_init(void)
100{
101 printk(KERN_INFO "Blackfin GPIO Controller\n");
102
103 return 0;
104}
105
106arch_initcall(bfin_gpio_init);
107
108int peripheral_request(unsigned short per, const char *label)
109{
110 unsigned long flags;
111 unsigned short ident = P_IDENT(per);
112
113 if (!(per & P_DEFINED))
114 return -ENODEV;
115
116 if (check_gpio(ident) < 0)
117 return -EINVAL;
118
119 local_irq_save(flags);
120
121 if (unlikely(reserved_gpio_map[gpio_bank(ident)] & gpio_bit(ident))) {
122 printk(KERN_ERR
123 "%s: Peripheral %d is already reserved as GPIO!\n",
124 __FUNCTION__, per);
125 dump_stack();
126 local_irq_restore(flags);
127 return -EBUSY;
128 }
129
130 if (unlikely(reserved_peri_map[gpio_bank(ident)] & gpio_bit(ident))) {
131
132 u16 funct = get_portmux(ident);
133
134 if (!((per & P_MAYSHARE) && (funct == P_FUNCT2MUX(per)))) {
135 printk(KERN_ERR
136 "%s: Peripheral %d is already reserved!\n",
137 __FUNCTION__, per);
138 dump_stack();
139 local_irq_restore(flags);
140 return -EBUSY;
141 }
142 }
143
144 reserved_peri_map[gpio_bank(ident)] |= gpio_bit(ident);
145
146 portmux_setup(ident, P_FUNCT2MUX(per));
147 port_setup(ident, PERIPHERAL_USAGE);
148
149 local_irq_restore(flags);
150
151 return 0;
152}
153EXPORT_SYMBOL(peripheral_request);
154
155int peripheral_request_list(unsigned short per[], const char *label)
156{
157
158 u16 cnt;
159 int ret;
160
161 for (cnt = 0; per[cnt] != 0; cnt++) {
162 ret = peripheral_request(per[cnt], label);
163 if (ret < 0)
164 return ret;
165 }
166
167 return 0;
168}
169EXPORT_SYMBOL(peripheral_request_list);
170
171void peripheral_free(unsigned short per)
172{
173 unsigned long flags;
174 unsigned short ident = P_IDENT(per);
175
176 if (!(per & P_DEFINED))
177 return;
178
179 if (check_gpio(ident) < 0)
180 return;
181
182 local_irq_save(flags);
183
184 if (unlikely(!(reserved_peri_map[gpio_bank(ident)] & gpio_bit(ident)))) {
185 printk(KERN_ERR "bfin-gpio: Peripheral %d wasn't reserved!\n", per);
186 dump_stack();
187 local_irq_restore(flags);
188 return;
189 }
190
191 if (!(per & P_MAYSHARE)) {
192 port_setup(ident, GPIO_USAGE);
193 }
194
195 reserved_peri_map[gpio_bank(ident)] &= ~gpio_bit(ident);
196
197 local_irq_restore(flags);
198}
199EXPORT_SYMBOL(peripheral_free);
200
201void peripheral_free_list(unsigned short per[])
202{
203 u16 cnt;
204
205 for (cnt = 0; per[cnt] != 0; cnt++) {
206 peripheral_free(per[cnt]);
207 }
208
209}
210EXPORT_SYMBOL(peripheral_free_list);
211
212/***********************************************************
213*
214* FUNCTIONS: Blackfin GPIO Driver
215*
216* INPUTS/OUTPUTS:
217* gpio - GPIO Number between 0 and MAX_BLACKFIN_GPIOS
218*
219*
220* DESCRIPTION: Blackfin GPIO Driver API
221*
222* CAUTION:
223*************************************************************
224* MODIFICATION HISTORY :
225**************************************************************/
226
227int gpio_request(unsigned short gpio, const char *label)
228{
229 unsigned long flags;
230
231 if (check_gpio(gpio) < 0)
232 return -EINVAL;
233
234 local_irq_save(flags);
235
236 if (unlikely(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
237 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved!\n", gpio);
238 dump_stack();
239 local_irq_restore(flags);
240 return -EBUSY;
241 }
242
243 if (unlikely(reserved_peri_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
244 printk(KERN_ERR
245 "bfin-gpio: GPIO %d is already reserved as Peripheral!\n", gpio);
246 dump_stack();
247 local_irq_restore(flags);
248 return -EBUSY;
249 }
250
251 reserved_gpio_map[gpio_bank(gpio)] |= gpio_bit(gpio);
252
253 local_irq_restore(flags);
254
255 port_setup(gpio, GPIO_USAGE);
256
257 return 0;
258}
259EXPORT_SYMBOL(gpio_request);
260
261void gpio_free(unsigned short gpio)
262{
263 unsigned long flags;
264
265 if (check_gpio(gpio) < 0)
266 return;
267
268 local_irq_save(flags);
269
270 if (unlikely(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)))) {
271 printk(KERN_ERR "bfin-gpio: GPIO %d wasn't reserved!\n", gpio);
272 dump_stack();
273 local_irq_restore(flags);
274 return;
275 }
276
277 reserved_gpio_map[gpio_bank(gpio)] &= ~gpio_bit(gpio);
278
279 local_irq_restore(flags);
280}
281EXPORT_SYMBOL(gpio_free);
282
283void gpio_direction_input(unsigned short gpio)
284{
285 unsigned long flags;
286
287 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
288
289 local_irq_save(flags);
290 gpio_array[gpio_bank(gpio)]->port_dir_clear = gpio_bit(gpio);
291 gpio_array[gpio_bank(gpio)]->port_inen |= gpio_bit(gpio);
292 local_irq_restore(flags);
293}
294EXPORT_SYMBOL(gpio_direction_input);
295
296void gpio_direction_output(unsigned short gpio)
297{
298 unsigned long flags;
299
300 BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
301
302 local_irq_save(flags);
303 gpio_array[gpio_bank(gpio)]->port_inen &= ~gpio_bit(gpio);
304 gpio_array[gpio_bank(gpio)]->port_dir_set = gpio_bit(gpio);
305 local_irq_restore(flags);
306}
307EXPORT_SYMBOL(gpio_direction_output);
308
309void gpio_set_value(unsigned short gpio, unsigned short arg)
310{
311 if (arg)
312 gpio_array[gpio_bank(gpio)]->port_set = gpio_bit(gpio);
313 else
314 gpio_array[gpio_bank(gpio)]->port_clear = gpio_bit(gpio);
315
316}
317EXPORT_SYMBOL(gpio_set_value);
318
319unsigned short gpio_get_value(unsigned short gpio)
320{
321 return (1 & (gpio_array[gpio_bank(gpio)]->port_data >> gpio_sub_n(gpio)));
322}
323EXPORT_SYMBOL(gpio_get_value);
diff --git a/arch/blackfin/mach-bf548/head.S b/arch/blackfin/mach-bf548/head.S
index 06751ae8b857..3071c243d426 100644
--- a/arch/blackfin/mach-bf548/head.S
+++ b/arch/blackfin/mach-bf548/head.S
@@ -31,6 +31,7 @@
31#include <asm/blackfin.h> 31#include <asm/blackfin.h>
32#include <asm/trace.h> 32#include <asm/trace.h>
33#if CONFIG_BFIN_KERNEL_CLOCK 33#if CONFIG_BFIN_KERNEL_CLOCK
34#include <asm/mach-common/clocks.h>
34#include <asm/mach/mem_init.h> 35#include <asm/mach/mem_init.h>
35#endif 36#endif
36 37
@@ -49,9 +50,13 @@ ENTRY(__start)
49ENTRY(__stext) 50ENTRY(__stext)
50 /* R0: argument of command line string, passed from uboot, save it */ 51 /* R0: argument of command line string, passed from uboot, save it */
51 R7 = R0; 52 R7 = R0;
52 /* Set the SYSCFG register */ 53 /* Enable Cycle Counter and Nesting Of Interrupts */
53 R0 = 0x36; 54#ifdef CONFIG_BFIN_SCRATCH_REG_CYCLES
54 SYSCFG = R0; /*Enable Cycle Counter and Nesting Of Interrupts(3rd Bit)*/ 55 R0 = SYSCFG_SNEN;
56#else
57 R0 = SYSCFG_SNEN | SYSCFG_CCEN;
58#endif
59 SYSCFG = R0;
55 R0 = 0; 60 R0 = 0;
56 61
57 /* Clear Out All the data and pointer Registers*/ 62 /* Clear Out All the data and pointer Registers*/
@@ -92,13 +97,13 @@ ENTRY(__stext)
92 M2 = r0; 97 M2 = r0;
93 M3 = r0; 98 M3 = r0;
94 99
95 trace_buffer_start(p0,r0); 100 trace_buffer_init(p0,r0);
96 P0 = R1; 101 P0 = R1;
97 R0 = R1; 102 R0 = R1;
98 103
99 /* Turn off the icache */ 104 /* Turn off the icache */
100 p0.l = (IMEM_CONTROL & 0xFFFF); 105 p0.l = LO(IMEM_CONTROL);
101 p0.h = (IMEM_CONTROL >> 16); 106 p0.h = HI(IMEM_CONTROL);
102 R1 = [p0]; 107 R1 = [p0];
103 R0 = ~ENICPLB; 108 R0 = ~ENICPLB;
104 R0 = R0 & R1; 109 R0 = R0 & R1;
@@ -106,8 +111,8 @@ ENTRY(__stext)
106 SSYNC; 111 SSYNC;
107 112
108 /* Turn off the dcache */ 113 /* Turn off the dcache */
109 p0.l = (DMEM_CONTROL & 0xFFFF); 114 p0.l = LO(DMEM_CONTROL);
110 p0.h = (DMEM_CONTROL >> 16); 115 p0.h = HI(DMEM_CONTROL);
111 R1 = [p0]; 116 R1 = [p0];
112 R0 = ~ENDCPLB; 117 R0 = ~ENDCPLB;
113 R0 = R0 & R1; 118 R0 = R0 & R1;
@@ -120,6 +125,12 @@ ENTRY(__stext)
120 FP = SP; 125 FP = SP;
121 USP = SP; 126 USP = SP;
122 127
128#ifdef CONFIG_EARLY_PRINTK
129 SP += -12;
130 call _init_early_exception_vectors;
131 SP += 12;
132#endif
133
123 /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ 134 /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */
124 call _bf53x_relocate_l1_mem; 135 call _bf53x_relocate_l1_mem;
125#if CONFIG_BFIN_KERNEL_CLOCK 136#if CONFIG_BFIN_KERNEL_CLOCK
@@ -172,7 +183,7 @@ ENTRY(__stext)
172 p0.l = .LWAIT_HERE; 183 p0.l = .LWAIT_HERE;
173 p0.h = .LWAIT_HERE; 184 p0.h = .LWAIT_HERE;
174 reti = p0; 185 reti = p0;
175#if defined (ANOMALY_05000281) 186#if ANOMALY_05000281
176 nop; 187 nop;
177 nop; 188 nop;
178 nop; 189 nop;
@@ -335,8 +346,8 @@ ENTRY(_start_dma_code)
335 w[p0] = r0.l; 346 w[p0] = r0.l;
336 ssync; 347 ssync;
337 348
338 p0.l = (EBIU_SDBCTL & 0xFFFF); 349 p0.l = LO(EBIU_SDBCTL);
339 p0.h = (EBIU_SDBCTL >> 16); /* SDRAM Memory Bank Control Register */ 350 p0.h = HI(EBIU_SDBCTL); /* SDRAM Memory Bank Control Register */
340 r0 = mem_SDBCTL; 351 r0 = mem_SDBCTL;
341 w[p0] = r0.l; 352 w[p0] = r0.l;
342 ssync; 353 ssync;
@@ -373,129 +384,6 @@ ENTRY(_start_dma_code)
373 RTS; 384 RTS;
374#endif /* CONFIG_BFIN_KERNEL_CLOCK */ 385#endif /* CONFIG_BFIN_KERNEL_CLOCK */
375 386
376ENTRY(_bfin_reset)
377 /* No more interrupts to be handled*/
378 CLI R6;
379 SSYNC;
380
381#if defined(CONFIG_MTD_M25P80)
382/*
383 * The following code fix the SPI flash reboot issue,
384 * /CS signal of the chip which is using PF10 return to GPIO mode
385 */
386 p0.h = hi(PORTF_FER);
387 p0.l = lo(PORTF_FER);
388 r0.l = 0x0000;
389 w[p0] = r0.l;
390 SSYNC;
391
392/* /CS return to high */
393 p0.h = hi(PORTFIO);
394 p0.l = lo(PORTFIO);
395 r0.l = 0xFFFF;
396 w[p0] = r0.l;
397 SSYNC;
398
399/* Delay some time, This is necessary */
400 r1.h = 0;
401 r1.l = 0x400;
402 p1 = r1;
403 lsetup (_delay_lab1,_delay_lab1_end ) lc1 = p1;
404_delay_lab1:
405 r0.h = 0;
406 r0.l = 0x8000;
407 p0 = r0;
408 lsetup (_delay_lab0,_delay_lab0_end ) lc0 = p0;
409_delay_lab0:
410 nop;
411_delay_lab0_end:
412 nop;
413_delay_lab1_end:
414 nop;
415#endif
416
417 /* Clear the bits 13-15 in SWRST if they werent cleared */
418 p0.h = hi(SWRST);
419 p0.l = lo(SWRST);
420 csync;
421 r0.l = w[p0];
422
423 /* Clear the IMASK register */
424 p0.h = hi(IMASK);
425 p0.l = lo(IMASK);
426 r0 = 0x0;
427 [p0] = r0;
428
429 /* Clear the ILAT register */
430 p0.h = hi(ILAT);
431 p0.l = lo(ILAT);
432 r0 = [p0];
433 [p0] = r0;
434 SSYNC;
435
436 /* Disable the WDOG TIMER */
437 p0.h = hi(WDOG_CTL);
438 p0.l = lo(WDOG_CTL);
439 r0.l = 0xAD6;
440 w[p0] = r0.l;
441 SSYNC;
442
443 /* Clear the sticky bit incase it is already set */
444 p0.h = hi(WDOG_CTL);
445 p0.l = lo(WDOG_CTL);
446 r0.l = 0x8AD6;
447 w[p0] = r0.l;
448 SSYNC;
449
450 /* Program the count value */
451 R0.l = 0x100;
452 R0.h = 0x0;
453 P0.h = hi(WDOG_CNT);
454 P0.l = lo(WDOG_CNT);
455 [P0] = R0;
456 SSYNC;
457
458 /* Program WDOG_STAT if necessary */
459 P0.h = hi(WDOG_CTL);
460 P0.l = lo(WDOG_CTL);
461 R0 = W[P0](Z);
462 CC = BITTST(R0,1);
463 if !CC JUMP .LWRITESTAT;
464 CC = BITTST(R0,2);
465 if !CC JUMP .LWRITESTAT;
466 JUMP .LSKIP_WRITE;
467
468.LWRITESTAT:
469 /* When watch dog timer is enabled,
470 * a write to STAT will load the contents of CNT to STAT
471 */
472 R0 = 0x0000(z);
473 P0.h = hi(WDOG_STAT);
474 P0.l = lo(WDOG_STAT)
475 [P0] = R0;
476 SSYNC;
477
478.LSKIP_WRITE:
479 /* Enable the reset event */
480 P0.h = hi(WDOG_CTL);
481 P0.l = lo(WDOG_CTL);
482 R0 = W[P0](Z);
483 BITCLR(R0,1);
484 BITCLR(R0,2);
485 W[P0] = R0.L;
486 SSYNC;
487 NOP;
488
489 /* Enable the wdog counter */
490 R0 = W[P0](Z);
491 BITCLR(R0,4);
492 W[P0] = R0.L;
493 SSYNC;
494
495 IDLE;
496
497 RTS;
498
499.data 387.data
500 388
501/* 389/*
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index 5b2b544529a1..cd827a1b6ba1 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -34,7 +34,9 @@
34#include <linux/spi/spi.h> 34#include <linux/spi/spi.h>
35#include <linux/spi/flash.h> 35#include <linux/spi/flash.h>
36#include <linux/usb_isp1362.h> 36#include <linux/usb_isp1362.h>
37#include <linux/pata_platform.h>
37#include <linux/irq.h> 38#include <linux/irq.h>
39#include <asm/dma.h>
38#include <asm/bfin5xx_spi.h> 40#include <asm/bfin5xx_spi.h>
39 41
40/* 42/*
@@ -112,7 +114,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
112 /* the modalias must be the same as spi device driver name */ 114 /* the modalias must be the same as spi device driver name */
113 .modalias = "m25p80", /* Name of spi_driver for this device */ 115 .modalias = "m25p80", /* Name of spi_driver for this device */
114 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 116 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
115 .bus_num = 1, /* Framework bus number */ 117 .bus_num = 0, /* Framework bus number */
116 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/ 118 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
117 .platform_data = &bfin_spi_flash_data, 119 .platform_data = &bfin_spi_flash_data,
118 .controller_data = &spi_flash_chip_info, 120 .controller_data = &spi_flash_chip_info,
@@ -124,7 +126,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
124 { 126 {
125 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 127 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
126 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 128 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
127 .bus_num = 1, /* Framework bus number */ 129 .bus_num = 0, /* Framework bus number */
128 .chip_select = 1, /* Framework chip select. */ 130 .chip_select = 1, /* Framework chip select. */
129 .platform_data = NULL, /* No spi_driver specific config */ 131 .platform_data = NULL, /* No spi_driver specific config */
130 .controller_data = &spi_adc_chip_info, 132 .controller_data = &spi_adc_chip_info,
@@ -135,7 +137,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
135 { 137 {
136 .modalias = "ad1836-spi", 138 .modalias = "ad1836-spi",
137 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 139 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
138 .bus_num = 1, 140 .bus_num = 0,
139 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 141 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
140 .controller_data = &ad1836_spi_chip_info, 142 .controller_data = &ad1836_spi_chip_info,
141 }, 143 },
@@ -144,7 +146,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
144 { 146 {
145 .modalias = "ad9960-spi", 147 .modalias = "ad9960-spi",
146 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */ 148 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
147 .bus_num = 1, 149 .bus_num = 0,
148 .chip_select = 1, 150 .chip_select = 1,
149 .controller_data = &ad9960_spi_chip_info, 151 .controller_data = &ad9960_spi_chip_info,
150 }, 152 },
@@ -153,7 +155,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
153 { 155 {
154 .modalias = "spi_mmc", 156 .modalias = "spi_mmc",
155 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 157 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
156 .bus_num = 1, 158 .bus_num = 0,
157 .chip_select = CONFIG_SPI_MMC_CS_CHAN, 159 .chip_select = CONFIG_SPI_MMC_CS_CHAN,
158 .platform_data = NULL, 160 .platform_data = NULL,
159 .controller_data = &spi_mmc_chip_info, 161 .controller_data = &spi_mmc_chip_info,
@@ -162,17 +164,33 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
162#endif 164#endif
163}; 165};
164 166
167/* SPI (0) */
168static struct resource bfin_spi0_resource[] = {
169 [0] = {
170 .start = SPI0_REGBASE,
171 .end = SPI0_REGBASE + 0xFF,
172 .flags = IORESOURCE_MEM,
173 },
174 [1] = {
175 .start = CH_SPI,
176 .end = CH_SPI,
177 .flags = IORESOURCE_IRQ,
178 }
179};
180
165/* SPI controller data */ 181/* SPI controller data */
166static struct bfin5xx_spi_master spi_bfin_master_info = { 182static struct bfin5xx_spi_master bfin_spi0_info = {
167 .num_chipselect = 8, 183 .num_chipselect = 8,
168 .enable_dma = 1, /* master has the ability to do dma transfer */ 184 .enable_dma = 1, /* master has the ability to do dma transfer */
169}; 185};
170 186
171static struct platform_device spi_bfin_master_device = { 187static struct platform_device bfin_spi0_device = {
172 .name = "bfin-spi-master", 188 .name = "bfin-spi",
173 .id = 1, /* Bus number */ 189 .id = 0, /* Bus number */
190 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
191 .resource = bfin_spi0_resource,
174 .dev = { 192 .dev = {
175 .platform_data = &spi_bfin_master_info, /* Passed to driver */ 193 .platform_data = &bfin_spi0_info, /* Passed to driver */
176 }, 194 },
177}; 195};
178#endif /* spi master and devices */ 196#endif /* spi master and devices */
@@ -256,6 +274,43 @@ static struct platform_device bfin_uart_device = {
256}; 274};
257#endif 275#endif
258 276
277#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
278#define PATA_INT 119
279
280static struct pata_platform_info bfin_pata_platform_data = {
281 .ioport_shift = 2,
282 .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
283};
284
285static struct resource bfin_pata_resources[] = {
286 {
287 .start = 0x2400C000,
288 .end = 0x2400C001F,
289 .flags = IORESOURCE_MEM,
290 },
291 {
292 .start = 0x2400D018,
293 .end = 0x2400D01B,
294 .flags = IORESOURCE_MEM,
295 },
296 {
297 .start = PATA_INT,
298 .end = PATA_INT,
299 .flags = IORESOURCE_IRQ,
300 },
301};
302
303static struct platform_device bfin_pata_device = {
304 .name = "pata_platform",
305 .id = -1,
306 .num_resources = ARRAY_SIZE(bfin_pata_resources),
307 .resource = bfin_pata_resources,
308 .dev = {
309 .platform_data = &bfin_pata_platform_data,
310 }
311};
312#endif
313
259static struct platform_device *cm_bf561_devices[] __initdata = { 314static struct platform_device *cm_bf561_devices[] __initdata = {
260 315
261#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 316#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
@@ -271,9 +326,12 @@ static struct platform_device *cm_bf561_devices[] __initdata = {
271#endif 326#endif
272 327
273#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 328#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
274 &spi_bfin_master_device, 329 &bfin_spi0_device,
275#endif 330#endif
276 331
332#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
333 &bfin_pata_device,
334#endif
277}; 335};
278 336
279static int __init cm_bf561_init(void) 337static int __init cm_bf561_init(void)
@@ -283,6 +341,10 @@ static int __init cm_bf561_init(void)
283#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 341#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
284 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 342 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
285#endif 343#endif
344
345#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
346 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
347#endif
286 return 0; 348 return 0;
287} 349}
288 350
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 724191da20a2..57e14edca8b1 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -32,6 +32,8 @@
32#include <linux/spi/spi.h> 32#include <linux/spi/spi.h>
33#include <linux/irq.h> 33#include <linux/irq.h>
34#include <linux/interrupt.h> 34#include <linux/interrupt.h>
35#include <linux/pata_platform.h>
36#include <asm/dma.h>
35#include <asm/bfin5xx_spi.h> 37#include <asm/bfin5xx_spi.h>
36 38
37/* 39/*
@@ -140,17 +142,33 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
140#endif 142#endif
141#endif 143#endif
142 144
145/* SPI (0) */
146static struct resource bfin_spi0_resource[] = {
147 [0] = {
148 .start = SPI0_REGBASE,
149 .end = SPI0_REGBASE + 0xFF,
150 .flags = IORESOURCE_MEM,
151 },
152 [1] = {
153 .start = CH_SPI,
154 .end = CH_SPI,
155 .flags = IORESOURCE_IRQ,
156 }
157};
158
143/* SPI controller data */ 159/* SPI controller data */
144static struct bfin5xx_spi_master spi_bfin_master_info = { 160static struct bfin5xx_spi_master bfin_spi0_info = {
145 .num_chipselect = 8, 161 .num_chipselect = 8,
146 .enable_dma = 1, /* master has the ability to do dma transfer */ 162 .enable_dma = 1, /* master has the ability to do dma transfer */
147}; 163};
148 164
149static struct platform_device spi_bfin_master_device = { 165static struct platform_device bfin_spi0_device = {
150 .name = "bfin-spi-master", 166 .name = "bfin-spi",
151 .id = 1, /* Bus number */ 167 .id = 0, /* Bus number */
168 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
169 .resource = bfin_spi0_resource,
152 .dev = { 170 .dev = {
153 .platform_data = &spi_bfin_master_info, /* Passed to driver */ 171 .platform_data = &bfin_spi0_info, /* Passed to driver */
154 }, 172 },
155}; 173};
156 174
@@ -160,23 +178,63 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
160 { 178 {
161 .modalias = "ad1836-spi", 179 .modalias = "ad1836-spi",
162 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 180 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
163 .bus_num = 1, 181 .bus_num = 0,
164 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 182 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
165 .controller_data = &ad1836_spi_chip_info, 183 .controller_data = &ad1836_spi_chip_info,
166 }, 184 },
167#endif 185#endif
168}; 186};
169 187
188#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
189#define PATA_INT 55
190
191static struct pata_platform_info bfin_pata_platform_data = {
192 .ioport_shift = 1,
193 .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
194};
195
196static struct resource bfin_pata_resources[] = {
197 {
198 .start = 0x20314020,
199 .end = 0x2031403F,
200 .flags = IORESOURCE_MEM,
201 },
202 {
203 .start = 0x2031401C,
204 .end = 0x2031401F,
205 .flags = IORESOURCE_MEM,
206 },
207 {
208 .start = PATA_INT,
209 .end = PATA_INT,
210 .flags = IORESOURCE_IRQ,
211 },
212};
213
214static struct platform_device bfin_pata_device = {
215 .name = "pata_platform",
216 .id = -1,
217 .num_resources = ARRAY_SIZE(bfin_pata_resources),
218 .resource = bfin_pata_resources,
219 .dev = {
220 .platform_data = &bfin_pata_platform_data,
221 }
222};
223#endif
224
170static struct platform_device *ezkit_devices[] __initdata = { 225static struct platform_device *ezkit_devices[] __initdata = {
171#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 226#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
172 &smc91x_device, 227 &smc91x_device,
173#endif 228#endif
174#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 229#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
175 &spi_bfin_master_device, 230 &bfin_spi0_device,
176#endif 231#endif
177#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 232#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
178 &bfin_uart_device, 233 &bfin_uart_device,
179#endif 234#endif
235#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
236 &bfin_pata_device,
237#endif
180}; 238};
181 239
182static int __init ezkit_init(void) 240static int __init ezkit_init(void)
@@ -194,7 +252,15 @@ static int __init ezkit_init(void)
194 SSYNC(); 252 SSYNC();
195#endif 253#endif
196 254
197 return spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 255#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
256 spi_register_board_info(bfin_spi_board_info,
257 ARRAY_SIZE(bfin_spi_board_info));
258#endif
259
260#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
261 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
262#endif
263 return 0;
198} 264}
199 265
200arch_initcall(ezkit_init); 266arch_initcall(ezkit_init);
diff --git a/arch/blackfin/mach-bf561/head.S b/arch/blackfin/mach-bf561/head.S
index 38650a628980..96a3d456fb6d 100644
--- a/arch/blackfin/mach-bf561/head.S
+++ b/arch/blackfin/mach-bf561/head.S
@@ -33,6 +33,7 @@
33#include <asm/trace.h> 33#include <asm/trace.h>
34 34
35#if CONFIG_BFIN_KERNEL_CLOCK 35#if CONFIG_BFIN_KERNEL_CLOCK
36#include <asm/mach-common/clocks.h>
36#include <asm/mach/mem_init.h> 37#include <asm/mach/mem_init.h>
37#endif 38#endif
38 39
@@ -50,10 +51,12 @@ __INIT
50ENTRY(__start) 51ENTRY(__start)
51 /* R0: argument of command line string, passed from uboot, save it */ 52 /* R0: argument of command line string, passed from uboot, save it */
52 R7 = R0; 53 R7 = R0;
53 /* Set the SYSCFG register: 54 /* Enable Cycle Counter and Nesting Of Interrupts */
54 * Enable Cycle Counter and Nesting Of Interrupts (3rd Bit) 55#ifdef CONFIG_BFIN_SCRATCH_REG_CYCLES
55 */ 56 R0 = SYSCFG_SNEN;
56 R0 = 0x36; 57#else
58 R0 = SYSCFG_SNEN | SYSCFG_CCEN;
59#endif
57 SYSCFG = R0; 60 SYSCFG = R0;
58 R0 = 0; 61 R0 = 0;
59 62
@@ -95,43 +98,42 @@ ENTRY(__start)
95 M2 = r0; 98 M2 = r0;
96 M3 = r0; 99 M3 = r0;
97 100
98 trace_buffer_start(p0,r0); 101 trace_buffer_init(p0,r0);
99 P0 = R1; 102 P0 = R1;
100 R0 = R1; 103 R0 = R1;
101 104
102 /* Turn off the icache */ 105 /* Turn off the icache */
103 p0.l = (IMEM_CONTROL & 0xFFFF); 106 p0.l = LO(IMEM_CONTROL);
104 p0.h = (IMEM_CONTROL >> 16); 107 p0.h = HI(IMEM_CONTROL);
105 R1 = [p0]; 108 R1 = [p0];
106 R0 = ~ENICPLB; 109 R0 = ~ENICPLB;
107 R0 = R0 & R1; 110 R0 = R0 & R1;
108 111
109 /* Anomaly 05000125 */ 112#if ANOMALY_05000125
110#ifdef ANOMALY_05000125
111 CLI R2; 113 CLI R2;
112 SSYNC; 114 SSYNC;
113#endif 115#endif
114 [p0] = R0; 116 [p0] = R0;
115 SSYNC; 117 SSYNC;
116#ifdef ANOMALY_05000125 118#if ANOMALY_05000125
117 STI R2; 119 STI R2;
118#endif 120#endif
119 121
120 /* Turn off the dcache */ 122 /* Turn off the dcache */
121 p0.l = (DMEM_CONTROL & 0xFFFF); 123 p0.l = LO(DMEM_CONTROL);
122 p0.h = (DMEM_CONTROL >> 16); 124 p0.h = HI(DMEM_CONTROL);
123 R1 = [p0]; 125 R1 = [p0];
124 R0 = ~ENDCPLB; 126 R0 = ~ENDCPLB;
125 R0 = R0 & R1; 127 R0 = R0 & R1;
126 128
127 /* Anomaly 05000125 */ 129 /* Anomaly 05000125 */
128#ifdef ANOMALY_05000125 130#if ANOMALY_05000125
129 CLI R2; 131 CLI R2;
130 SSYNC; 132 SSYNC;
131#endif 133#endif
132 [p0] = R0; 134 [p0] = R0;
133 SSYNC; 135 SSYNC;
134#ifdef ANOMALY_05000125 136#if ANOMALY_05000125
135 STI R2; 137 STI R2;
136#endif 138#endif
137 139
@@ -167,6 +169,12 @@ ENTRY(__start)
167 fp = sp; 169 fp = sp;
168 usp = sp; 170 usp = sp;
169 171
172#ifdef CONFIG_EARLY_PRINTK
173 SP += -12;
174 call _init_early_exception_vectors;
175 SP += 12;
176#endif
177
170 /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ 178 /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */
171 call _bf53x_relocate_l1_mem; 179 call _bf53x_relocate_l1_mem;
172#if CONFIG_BFIN_KERNEL_CLOCK 180#if CONFIG_BFIN_KERNEL_CLOCK
@@ -220,7 +228,7 @@ ENTRY(__start)
220 p0.l = .LWAIT_HERE; 228 p0.l = .LWAIT_HERE;
221 p0.h = .LWAIT_HERE; 229 p0.h = .LWAIT_HERE;
222 reti = p0; 230 reti = p0;
223#if defined(ANOMALY_05000281) 231#if ANOMALY_05000281
224 nop; nop; nop; 232 nop; nop; nop;
225#endif 233#endif
226 rti; 234 rti;
@@ -372,8 +380,8 @@ ENTRY(_start_dma_code)
372 w[p0] = r0.l; 380 w[p0] = r0.l;
373 ssync; 381 ssync;
374 382
375 p0.l = (EBIU_SDBCTL & 0xFFFF); 383 p0.l = LO(EBIU_SDBCTL);
376 p0.h = (EBIU_SDBCTL >> 16); /* SDRAM Memory Bank Control Register */ 384 p0.h = HI(EBIU_SDBCTL); /* SDRAM Memory Bank Control Register */
377 r0 = mem_SDBCTL; 385 r0 = mem_SDBCTL;
378 w[p0] = r0.l; 386 w[p0] = r0.l;
379 ssync; 387 ssync;
@@ -404,66 +412,6 @@ ENTRY(_start_dma_code)
404ENDPROC(_start_dma_code) 412ENDPROC(_start_dma_code)
405#endif /* CONFIG_BFIN_KERNEL_CLOCK */ 413#endif /* CONFIG_BFIN_KERNEL_CLOCK */
406 414
407ENTRY(_bfin_reset)
408 /* No more interrupts to be handled*/
409 CLI R6;
410 SSYNC;
411
412#if defined(CONFIG_BFIN_SHARED_FLASH_ENET)
413 p0.h = hi(FIO_INEN);
414 p0.l = lo(FIO_INEN);
415 r0.l = ~(PF1 | PF0);
416 w[p0] = r0.l;
417
418 p0.h = hi(FIO_DIR);
419 p0.l = lo(FIO_DIR);
420 r0.l = (PF1 | PF0);
421 w[p0] = r0.l;
422
423 p0.h = hi(FIO_FLAG_C);
424 p0.l = lo(FIO_FLAG_C);
425 r0.l = (PF1 | PF0);
426 w[p0] = r0.l;
427#endif
428
429 /* Clear the IMASK register */
430 p0.h = hi(IMASK);
431 p0.l = lo(IMASK);
432 r0 = 0x0;
433 [p0] = r0;
434
435 /* Clear the ILAT register */
436 p0.h = hi(ILAT);
437 p0.l = lo(ILAT);
438 r0 = [p0];
439 [p0] = r0;
440 SSYNC;
441
442 /* make sure SYSCR is set to use BMODE */
443 P0.h = hi(SYSCR);
444 P0.l = lo(SYSCR);
445 R0.l = 0x20; /* on BF561, disable core b */
446 W[P0] = R0.l;
447 SSYNC;
448
449 /* issue a system soft reset */
450 P1.h = hi(SWRST);
451 P1.l = lo(SWRST);
452 R1.l = 0x0007;
453 W[P1] = R1;
454 SSYNC;
455
456 /* clear system soft reset */
457 R0.l = 0x0000;
458 W[P0] = R0;
459 SSYNC;
460
461 /* issue core reset */
462 raise 1;
463
464 RTS;
465ENDPROC(_bfin_reset)
466
467.data 415.data
468 416
469/* 417/*
diff --git a/arch/blackfin/mach-common/Makefile b/arch/blackfin/mach-common/Makefile
index 0279ede70392..4d7733dfd5de 100644
--- a/arch/blackfin/mach-common/Makefile
+++ b/arch/blackfin/mach-common/Makefile
@@ -4,7 +4,7 @@
4 4
5obj-y := \ 5obj-y := \
6 cache.o cacheinit.o cplbhdlr.o cplbmgr.o entry.o \ 6 cache.o cacheinit.o cplbhdlr.o cplbmgr.o entry.o \
7 interrupt.o lock.o irqpanic.o 7 interrupt.o lock.o irqpanic.o arch_checks.o
8 8
9obj-$(CONFIG_CPLB_INFO) += cplbinfo.o 9obj-$(CONFIG_CPLB_INFO) += cplbinfo.o
10obj-$(CONFIG_BFIN_SINGLE_CORE) += ints-priority-sc.o 10obj-$(CONFIG_BFIN_SINGLE_CORE) += ints-priority-sc.o
diff --git a/arch/blackfin/mach-common/arch_checks.c b/arch/blackfin/mach-common/arch_checks.c
new file mode 100644
index 000000000000..2f6ce397780f
--- /dev/null
+++ b/arch/blackfin/mach-common/arch_checks.c
@@ -0,0 +1,60 @@
1/*
2 * File: arch/blackfin/mach-common/arch_checks.c
3 * Based on:
4 * Author: Robin Getz <rgetz@blackfin.uclinux.org>
5 *
6 * Created: 25Jul07
7 * Description: Do some checking to make sure things are OK
8 *
9 * Modified:
10 * Copyright 2004-2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#include <asm/mach/anomaly.h>
31#include <asm/mach-common/clocks.h>
32
33#ifdef CONFIG_BFIN_KERNEL_CLOCK
34
35# if (CONFIG_VCO_HZ > CONFIG_MAX_VCO_HZ)
36# error "VCO selected is more than maximum value. Please change the VCO multipler"
37# endif
38
39# if (CONFIG_SCLK_HZ > CONFIG_MAX_SCLK_HZ)
40# error "Sclk value selected is more than maximum. Please select a proper value for SCLK multiplier"
41# endif
42
43# if (CONFIG_SCLK_HZ < CONFIG_MIN_SCLK_HZ)
44# error "Sclk value selected is less than minimum. Please select a proper value for SCLK multiplier"
45# endif
46
47# if (ANOMALY_05000273) && (CONFIG_SCLK_HZ * 2 > CONFIG_CCLK_HZ)
48# error "ANOMALY 05000273, please make sure CCLK is at least 2x SCLK"
49# endif
50
51# if (CONFIG_SCLK_HZ > CONFIG_CCLK_HZ) && (CONFIG_SCLK_HZ != CONFIG_CLKIN_HZ) && (CONFIG_CCLK_HZ != CONFIG_CLKIN_HZ)
52# error "Please select sclk less than cclk"
53# endif
54
55#endif /* CONFIG_BFIN_KERNEL_CLOCK */
56
57#if (CONFIG_MEM_SIZE % 4)
58#error "SDRAM mem size must be multible of 4MB"
59#endif
60
diff --git a/arch/blackfin/mach-common/cache.S b/arch/blackfin/mach-common/cache.S
index 7063795eb7c0..0521b1588204 100644
--- a/arch/blackfin/mach-common/cache.S
+++ b/arch/blackfin/mach-common/cache.S
@@ -79,8 +79,8 @@ ENTRY(_icache_invalidate)
79ENTRY(_invalidate_entire_icache) 79ENTRY(_invalidate_entire_icache)
80 [--SP] = ( R7:5); 80 [--SP] = ( R7:5);
81 81
82 P0.L = (IMEM_CONTROL & 0xFFFF); 82 P0.L = LO(IMEM_CONTROL);
83 P0.H = (IMEM_CONTROL >> 16); 83 P0.H = HI(IMEM_CONTROL);
84 R7 = [P0]; 84 R7 = [P0];
85 85
86 /* Clear the IMC bit , All valid bits in the instruction 86 /* Clear the IMC bit , All valid bits in the instruction
@@ -197,8 +197,8 @@ ENTRY(_invalidate_entire_dcache)
197ENTRY(_dcache_invalidate) 197ENTRY(_dcache_invalidate)
198 [--SP] = ( R7:6); 198 [--SP] = ( R7:6);
199 199
200 P0.L = (DMEM_CONTROL & 0xFFFF); 200 P0.L = LO(DMEM_CONTROL);
201 P0.H = (DMEM_CONTROL >> 16); 201 P0.H = HI(DMEM_CONTROL);
202 R7 = [P0]; 202 R7 = [P0];
203 203
204 /* Clear the DMC[1:0] bits, All valid bits in the data 204 /* Clear the DMC[1:0] bits, All valid bits in the data
diff --git a/arch/blackfin/mach-common/cacheinit.S b/arch/blackfin/mach-common/cacheinit.S
index 5be6b975ae4a..22fada0c1cb3 100644
--- a/arch/blackfin/mach-common/cacheinit.S
+++ b/arch/blackfin/mach-common/cacheinit.S
@@ -38,13 +38,13 @@
38 38
39.text 39.text
40 40
41#ifdef ANOMALY_05000125 41#if ANOMALY_05000125
42#if defined(CONFIG_BLKFIN_CACHE) 42#if defined(CONFIG_BFIN_ICACHE)
43ENTRY(_bfin_write_IMEM_CONTROL) 43ENTRY(_bfin_write_IMEM_CONTROL)
44 44
45 /* Enable Instruction Cache */ 45 /* Enable Instruction Cache */
46 P0.l = (IMEM_CONTROL & 0xFFFF); 46 P0.l = LO(IMEM_CONTROL);
47 P0.h = (IMEM_CONTROL >> 16); 47 P0.h = HI(IMEM_CONTROL);
48 48
49 /* Anomaly 05000125 */ 49 /* Anomaly 05000125 */
50 CLI R1; 50 CLI R1;
@@ -58,10 +58,10 @@ ENTRY(_bfin_write_IMEM_CONTROL)
58ENDPROC(_bfin_write_IMEM_CONTROL) 58ENDPROC(_bfin_write_IMEM_CONTROL)
59#endif 59#endif
60 60
61#if defined(CONFIG_BLKFIN_DCACHE) 61#if defined(CONFIG_BFIN_DCACHE)
62ENTRY(_bfin_write_DMEM_CONTROL) 62ENTRY(_bfin_write_DMEM_CONTROL)
63 P0.l = (DMEM_CONTROL & 0xFFFF); 63 P0.l = LO(DMEM_CONTROL);
64 P0.h = (DMEM_CONTROL >> 16); 64 P0.h = HI(DMEM_CONTROL);
65 65
66 CLI R1; 66 CLI R1;
67 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */ 67 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */
diff --git a/arch/blackfin/mach-common/cplbhdlr.S b/arch/blackfin/mach-common/cplbhdlr.S
index 2f3c72c23997..2788532de72b 100644
--- a/arch/blackfin/mach-common/cplbhdlr.S
+++ b/arch/blackfin/mach-common/cplbhdlr.S
@@ -69,14 +69,14 @@ ENTRY(__cplb_hdr)
69 69
70.Lis_icplb_miss: 70.Lis_icplb_miss:
71 71
72#if defined(CONFIG_BLKFIN_CACHE) || defined(CONFIG_BLKFIN_DCACHE) 72#if defined(CONFIG_BFIN_ICACHE) || defined(CONFIG_BFIN_DCACHE)
73# if defined(CONFIG_BLKFIN_CACHE) && !defined(CONFIG_BLKFIN_DCACHE) 73# if defined(CONFIG_BFIN_ICACHE) && !defined(CONFIG_BFIN_DCACHE)
74 R1 = CPLB_ENABLE_ICACHE; 74 R1 = CPLB_ENABLE_ICACHE;
75# endif 75# endif
76# if !defined(CONFIG_BLKFIN_CACHE) && defined(CONFIG_BLKFIN_DCACHE) 76# if !defined(CONFIG_BFIN_ICACHE) && defined(CONFIG_BFIN_DCACHE)
77 R1 = CPLB_ENABLE_DCACHE; 77 R1 = CPLB_ENABLE_DCACHE;
78# endif 78# endif
79# if defined(CONFIG_BLKFIN_CACHE) && defined(CONFIG_BLKFIN_DCACHE) 79# if defined(CONFIG_BFIN_ICACHE) && defined(CONFIG_BFIN_DCACHE)
80 R1 = CPLB_ENABLE_DCACHE | CPLB_ENABLE_ICACHE; 80 R1 = CPLB_ENABLE_DCACHE | CPLB_ENABLE_ICACHE;
81# endif 81# endif
82#else 82#else
diff --git a/arch/blackfin/mach-common/cplbmgr.S b/arch/blackfin/mach-common/cplbmgr.S
index e4b47e09cf13..946703ef48ff 100644
--- a/arch/blackfin/mach-common/cplbmgr.S
+++ b/arch/blackfin/mach-common/cplbmgr.S
@@ -75,15 +75,15 @@ ENTRY(_cplb_mgr)
75 * from the configuration table. 75 * from the configuration table.
76 */ 76 */
77 77
78 P4.L = (ICPLB_FAULT_ADDR & 0xFFFF); 78 P4.L = LO(ICPLB_FAULT_ADDR);
79 P4.H = (ICPLB_FAULT_ADDR >> 16); 79 P4.H = HI(ICPLB_FAULT_ADDR);
80 80
81 P1 = 16; 81 P1 = 16;
82 P5.L = _page_size_table; 82 P5.L = _page_size_table;
83 P5.H = _page_size_table; 83 P5.H = _page_size_table;
84 84
85 P0.L = (ICPLB_DATA0 & 0xFFFF); 85 P0.L = LO(ICPLB_DATA0);
86 P0.H = (ICPLB_DATA0 >> 16); 86 P0.H = HI(ICPLB_DATA0);
87 R4 = [P4]; /* Get faulting address*/ 87 R4 = [P4]; /* Get faulting address*/
88 R6 = 64; /* Advance past the fault address, which*/ 88 R6 = 64; /* Advance past the fault address, which*/
89 R6 = R6 + R4; /* we'll use if we find a match*/ 89 R6 = R6 + R4; /* we'll use if we find a match*/
@@ -117,13 +117,13 @@ ENTRY(_cplb_mgr)
117 I0 = R4; /* Fault address we'll search for*/ 117 I0 = R4; /* Fault address we'll search for*/
118 118
119 /* set up pointers */ 119 /* set up pointers */
120 P0.L = (ICPLB_DATA0 & 0xFFFF); 120 P0.L = LO(ICPLB_DATA0);
121 P0.H = (ICPLB_DATA0 >> 16); 121 P0.H = HI(ICPLB_DATA0);
122 122
123 /* The replacement procedure for ICPLBs */ 123 /* The replacement procedure for ICPLBs */
124 124
125 P4.L = (IMEM_CONTROL & 0xFFFF); 125 P4.L = LO(IMEM_CONTROL);
126 P4.H = (IMEM_CONTROL >> 16); 126 P4.H = HI(IMEM_CONTROL);
127 127
128 /* disable cplbs */ 128 /* disable cplbs */
129 R5 = [P4]; /* Control Register*/ 129 R5 = [P4]; /* Control Register*/
@@ -243,8 +243,8 @@ ENTRY(_cplb_mgr)
243 * last entry of the table. 243 * last entry of the table.
244 */ 244 */
245 245
246 P1.L = (ICPLB_DATA15 & 0xFFFF); /* ICPLB_DATA15 */ 246 P1.L = LO(ICPLB_DATA15); /* ICPLB_DATA15 */
247 P1.H = (ICPLB_DATA15 >> 16); 247 P1.H = HI(ICPLB_DATA15);
248 [P1] = R2; 248 [P1] = R2;
249 [P1-0x100] = R4; 249 [P1-0x100] = R4;
250#ifdef CONFIG_CPLB_INFO 250#ifdef CONFIG_CPLB_INFO
@@ -292,10 +292,10 @@ ENTRY(_cplb_mgr)
292 * pending writes associated with the CPLB. 292 * pending writes associated with the CPLB.
293 */ 293 */
294 294
295 P4.L = (DCPLB_STATUS & 0xFFFF); 295 P4.L = LO(DCPLB_STATUS);
296 P4.H = (DCPLB_STATUS >> 16); 296 P4.H = HI(DCPLB_STATUS);
297 P3.L = (DCPLB_DATA0 & 0xFFFF); 297 P3.L = LO(DCPLB_DATA0);
298 P3.H = (DCPLB_DATA0 >> 16); 298 P3.H = HI(DCPLB_DATA0);
299 R5 = [P4]; 299 R5 = [P4];
300 300
301 /* A protection violation can be caused by more than just writes 301 /* A protection violation can be caused by more than just writes
@@ -355,11 +355,11 @@ ENTRY(_cplb_mgr)
355 * config table, that covers the faulting address. 355 * config table, that covers the faulting address.
356 */ 356 */
357 357
358 P1.L = (DCPLB_DATA15 & 0xFFFF); 358 P1.L = LO(DCPLB_DATA15);
359 P1.H = (DCPLB_DATA15 >> 16); 359 P1.H = HI(DCPLB_DATA15);
360 360
361 P4.L = (DCPLB_FAULT_ADDR & 0xFFFF); 361 P4.L = LO(DCPLB_FAULT_ADDR);
362 P4.H = (DCPLB_FAULT_ADDR >> 16); 362 P4.H = HI(DCPLB_FAULT_ADDR);
363 R4 = [P4]; 363 R4 = [P4];
364 I0 = R4; 364 I0 = R4;
365 365
@@ -368,8 +368,8 @@ ENTRY(_cplb_mgr)
368 R6 = R1; /* Save for later*/ 368 R6 = R1; /* Save for later*/
369 369
370 /* Turn off CPLBs while we work.*/ 370 /* Turn off CPLBs while we work.*/
371 P4.L = (DMEM_CONTROL & 0xFFFF); 371 P4.L = LO(DMEM_CONTROL);
372 P4.H = (DMEM_CONTROL >> 16); 372 P4.H = HI(DMEM_CONTROL);
373 R5 = [P4]; 373 R5 = [P4];
374 BITCLR(R5,ENDCPLB_P); 374 BITCLR(R5,ENDCPLB_P);
375 CLI R0; 375 CLI R0;
@@ -384,8 +384,8 @@ ENTRY(_cplb_mgr)
384 * are no good. 384 * are no good.
385 */ 385 */
386 386
387 I1.L = (DCPLB_DATA0 & 0xFFFF); 387 I1.L = LO(DCPLB_DATA0);
388 I1.H = (DCPLB_DATA0 >> 16); 388 I1.H = HI(DCPLB_DATA0);
389 P1 = 2; 389 P1 = 2;
390 P2 = 16; 390 P2 = 16;
391 I2.L = _dcplb_preference; 391 I2.L = _dcplb_preference;
@@ -405,7 +405,7 @@ ENTRY(_cplb_mgr)
405 P3.L = _page_size_table; /* retrieve end address */ 405 P3.L = _page_size_table; /* retrieve end address */
406 P3.H = _page_size_table; /* retrieve end address */ 406 P3.H = _page_size_table; /* retrieve end address */
407 R3 = 0x1002; /* 16th - position, 2 bits -length */ 407 R3 = 0x1002; /* 16th - position, 2 bits -length */
408#ifdef ANOMALY_05000209 408#if ANOMALY_05000209
409 nop; /* Anomaly 05000209 */ 409 nop; /* Anomaly 05000209 */
410#endif 410#endif
411 R7 = EXTRACT(R1,R3.l); 411 R7 = EXTRACT(R1,R3.l);
@@ -475,8 +475,8 @@ ENTRY(_cplb_mgr)
475 * one space closer to the start. 475 * one space closer to the start.
476 */ 476 */
477 477
478 R1.L = (DCPLB_DATA16 & 0xFFFF); /* DCPLB_DATA15 + 4 */ 478 R1.L = LO(DCPLB_DATA16); /* DCPLB_DATA15 + 4 */
479 R1.H = (DCPLB_DATA16 >> 16); 479 R1.H = HI(DCPLB_DATA16);
480 R0 = P0; 480 R0 = P0;
481 481
482 /* If the victim happens to be in DCPLB15, 482 /* If the victim happens to be in DCPLB15,
@@ -549,8 +549,8 @@ ENTRY(_cplb_mgr)
549 * if necessary. 549 * if necessary.
550 */ 550 */
551 551
552 P1.L = (DCPLB_DATA15 & 0xFFFF); 552 P1.L = LO(DCPLB_DATA15);
553 P1.H = (DCPLB_DATA15 >> 16); 553 P1.H = HI(DCPLB_DATA15);
554 554
555 /* If the DCPLB has cache bits set, but caching hasn't 555 /* If the DCPLB has cache bits set, but caching hasn't
556 * been enabled, then we want to mask off the cache-in-L1 556 * been enabled, then we want to mask off the cache-in-L1
@@ -565,7 +565,7 @@ ENTRY(_cplb_mgr)
565 * cost of first-write exceptions to mark the page as dirty. 565 * cost of first-write exceptions to mark the page as dirty.
566 */ 566 */
567 567
568#ifdef CONFIG_BLKFIN_WT 568#ifdef CONFIG_BFIN_WT
569 BITSET(R6, 14); /* Set WT*/ 569 BITSET(R6, 14); /* Set WT*/
570#endif 570#endif
571 571
diff --git a/arch/blackfin/mach-common/dpmc.S b/arch/blackfin/mach-common/dpmc.S
index 97cdcd6a00d4..39fbc2861107 100644
--- a/arch/blackfin/mach-common/dpmc.S
+++ b/arch/blackfin/mach-common/dpmc.S
@@ -39,8 +39,8 @@ ENTRY(_unmask_wdog_wakeup_evt)
39 P0.H = hi(SICA_IWR1); 39 P0.H = hi(SICA_IWR1);
40 P0.L = lo(SICA_IWR1); 40 P0.L = lo(SICA_IWR1);
41#else 41#else
42 P0.h = (SIC_IWR >> 16); 42 P0.h = HI(SIC_IWR);
43 P0.l = (SIC_IWR & 0xFFFF); 43 P0.l = LO(SIC_IWR);
44#endif 44#endif
45 R7 = [P0]; 45 R7 = [P0];
46#if defined(CONFIG_BF561) 46#if defined(CONFIG_BF561)
@@ -60,11 +60,11 @@ ENTRY(_unmask_wdog_wakeup_evt)
60 */ 60 */
61 R7 = 0x0000(z); 61 R7 = 0x0000(z);
62#if defined(CONFIG_BF561) 62#if defined(CONFIG_BF561)
63 P0.h = (WDOGA_STAT >> 16); 63 P0.h = HI(WDOGA_STAT);
64 P0.l = (WDOGA_STAT & 0xFFFF); 64 P0.l = LO(WDOGA_STAT);
65#else 65#else
66 P0.h = (WDOG_STAT >> 16); 66 P0.h = HI(WDOG_STAT);
67 P0.l = (WDOG_STAT & 0xFFFF); 67 P0.l = LO(WDOG_STAT);
68#endif 68#endif
69 [P0] = R7; 69 [P0] = R7;
70 SSYNC; 70 SSYNC;
@@ -73,21 +73,21 @@ ENTRY(_unmask_wdog_wakeup_evt)
73ENTRY(_program_wdog_timer) 73ENTRY(_program_wdog_timer)
74 [--SP] = ( R7:0, P5:0 ); 74 [--SP] = ( R7:0, P5:0 );
75#if defined(CONFIG_BF561) 75#if defined(CONFIG_BF561)
76 P0.h = (WDOGA_CNT >> 16); 76 P0.h = HI(WDOGA_CNT);
77 P0.l = (WDOGA_CNT & 0xFFFF); 77 P0.l = LO(WDOGA_CNT);
78#else 78#else
79 P0.h = (WDOG_CNT >> 16); 79 P0.h = HI(WDOG_CNT);
80 P0.l = (WDOG_CNT & 0xFFFF); 80 P0.l = LO(WDOG_CNT);
81#endif 81#endif
82 [P0] = R0; 82 [P0] = R0;
83 SSYNC; 83 SSYNC;
84 84
85#if defined(CONFIG_BF561) 85#if defined(CONFIG_BF561)
86 P0.h = (WDOGA_CTL >> 16); 86 P0.h = HI(WDOGA_CTL);
87 P0.l = (WDOGA_CTL & 0xFFFF); 87 P0.l = LO(WDOGA_CTL);
88#else 88#else
89 P0.h = (WDOG_CTL >> 16); 89 P0.h = HI(WDOG_CTL);
90 P0.l = (WDOG_CTL & 0xFFFF); 90 P0.l = LO(WDOG_CTL);
91#endif 91#endif
92 R7 = W[P0](Z); 92 R7 = W[P0](Z);
93 CC = BITTST(R7,1); 93 CC = BITTST(R7,1);
@@ -97,11 +97,11 @@ ENTRY(_program_wdog_timer)
97 97
98.LSKIP_WRITE_TO_STAT: 98.LSKIP_WRITE_TO_STAT:
99#if defined(CONFIG_BF561) 99#if defined(CONFIG_BF561)
100 P0.h = (WDOGA_CTL >> 16); 100 P0.h = HI(WDOGA_CTL);
101 P0.l = (WDOGA_CTL & 0xFFFF); 101 P0.l = LO(WDOGA_CTL);
102#else 102#else
103 P0.h = (WDOG_CTL >> 16); 103 P0.h = HI(WDOG_CTL);
104 P0.l = (WDOG_CTL & 0xFFFF); 104 P0.l = LO(WDOG_CTL);
105#endif 105#endif
106 R7 = W[P0](Z); 106 R7 = W[P0](Z);
107 BITCLR(R7,1); /* Enable GP event */ 107 BITCLR(R7,1); /* Enable GP event */
@@ -122,11 +122,11 @@ ENTRY(_clear_wdog_wakeup_evt)
122 [--SP] = ( R7:0, P5:0 ); 122 [--SP] = ( R7:0, P5:0 );
123 123
124#if defined(CONFIG_BF561) 124#if defined(CONFIG_BF561)
125 P0.h = (WDOGA_CTL >> 16); 125 P0.h = HI(WDOGA_CTL);
126 P0.l = (WDOGA_CTL & 0xFFFF); 126 P0.l = LO(WDOGA_CTL);
127#else 127#else
128 P0.h = (WDOG_CTL >> 16); 128 P0.h = HI(WDOG_CTL);
129 P0.l = (WDOG_CTL & 0xFFFF); 129 P0.l = LO(WDOG_CTL);
130#endif 130#endif
131 R7 = 0x0AD6(Z); 131 R7 = 0x0AD6(Z);
132 W[P0] = R7.L; 132 W[P0] = R7.L;
@@ -149,11 +149,11 @@ ENTRY(_clear_wdog_wakeup_evt)
149ENTRY(_disable_wdog_timer) 149ENTRY(_disable_wdog_timer)
150 [--SP] = ( R7:0, P5:0 ); 150 [--SP] = ( R7:0, P5:0 );
151#if defined(CONFIG_BF561) 151#if defined(CONFIG_BF561)
152 P0.h = (WDOGA_CTL >> 16); 152 P0.h = HI(WDOGA_CTL);
153 P0.l = (WDOGA_CTL & 0xFFFF); 153 P0.l = LO(WDOGA_CTL);
154#else 154#else
155 P0.h = (WDOG_CTL >> 16); 155 P0.h = HI(WDOG_CTL);
156 P0.l = (WDOG_CTL & 0xFFFF); 156 P0.l = LO(WDOG_CTL);
157#endif 157#endif
158 R7 = 0xAD6(Z); 158 R7 = 0xAD6(Z);
159 W[P0] = R7.L; 159 W[P0] = R7.L;
@@ -300,7 +300,7 @@ ENTRY(_sleep_deeper)
300 P0.H = hi(PLL_CTL); 300 P0.H = hi(PLL_CTL);
301 P0.L = lo(PLL_CTL); 301 P0.L = lo(PLL_CTL);
302 R5 = W[P0](z); 302 R5 = W[P0](z);
303 R0.L = (MIN_VC/CONFIG_CLKIN_HZ) << 9; 303 R0.L = (CONFIG_MIN_VCO_HZ/CONFIG_CLKIN_HZ) << 9;
304 W[P0] = R0.l; 304 W[P0] = R0.l;
305 305
306 SSYNC; 306 SSYNC;
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index 960458808344..e3ad5802868a 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -29,21 +29,7 @@
29 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 29 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 */ 30 */
31 31
32/* 32/* NOTE: This code handles signal-recognition, which happens every time
33 * 25-Dec-2004 - LG Soft India
34 * 1. Fix in return_from_int, to make sure any pending
35 * system call in ILAT for this process to get
36 * executed, otherwise in case context switch happens,
37 * system call of first process (i.e in ILAT) will be
38 * carried forward to the switched process.
39 * 2. Removed Constant references for the following
40 * a. IPEND
41 * b. EXCAUSE mask
42 * c. PAGE Mask
43 */
44
45/*
46 * NOTE: This code handles signal-recognition, which happens every time
47 * after a timer-interrupt and after each system call. 33 * after a timer-interrupt and after each system call.
48 */ 34 */
49 35
@@ -58,6 +44,23 @@
58 44
59#include <asm/mach-common/context.S> 45#include <asm/mach-common/context.S>
60 46
47#if defined(CONFIG_BFIN_SCRATCH_REG_RETN)
48# define EX_SCRATCH_REG RETN
49#elif defined(CONFIG_BFIN_SCRATCH_REG_RETE)
50# define EX_SCRATCH_REG RETE
51#else
52# define EX_SCRATCH_REG CYCLES
53#endif
54
55#if ANOMALY_05000281
56ENTRY(_safe_speculative_execution)
57 NOP;
58 NOP;
59 NOP;
60 jump _safe_speculative_execution;
61ENDPROC(_safe_speculative_execution)
62#endif
63
61#ifdef CONFIG_EXCPT_IRQ_SYSC_L1 64#ifdef CONFIG_EXCPT_IRQ_SYSC_L1
62.section .l1.text 65.section .l1.text
63#else 66#else
@@ -69,7 +72,7 @@
69 * patch up CPLB misses on the kernel stack. 72 * patch up CPLB misses on the kernel stack.
70 */ 73 */
71ENTRY(_ex_dcplb) 74ENTRY(_ex_dcplb)
72#if defined(ANOMALY_05000261) 75#if ANOMALY_05000261
73 /* 76 /*
74 * Work around an anomaly: if we see a new DCPLB fault, return 77 * Work around an anomaly: if we see a new DCPLB fault, return
75 * without doing anything. Then, if we get the same fault again, 78 * without doing anything. Then, if we get the same fault again,
@@ -93,7 +96,7 @@ ENTRY(_ex_icplb)
93 call __cplb_hdr; 96 call __cplb_hdr;
94 DEBUG_START_HWTRACE(p5, r7) 97 DEBUG_START_HWTRACE(p5, r7)
95 RESTORE_ALL_SYS 98 RESTORE_ALL_SYS
96 SP = RETN; 99 SP = EX_SCRATCH_REG;
97 rtx; 100 rtx;
98ENDPROC(_ex_icplb) 101ENDPROC(_ex_icplb)
99 102
@@ -102,7 +105,7 @@ ENTRY(_ex_syscall)
102 (R7:6,P5:4) = [sp++]; 105 (R7:6,P5:4) = [sp++];
103 ASTAT = [sp++]; 106 ASTAT = [sp++];
104 raise 15; /* invoked by TRAP #0, for sys call */ 107 raise 15; /* invoked by TRAP #0, for sys call */
105 sp = retn; 108 sp = EX_SCRATCH_REG;
106 rtx 109 rtx
107ENDPROC(_ex_syscall) 110ENDPROC(_ex_syscall)
108 111
@@ -135,9 +138,9 @@ ENTRY(_ex_single_step)
135 cc = r6 == r7; 138 cc = r6 == r7;
136 if !cc jump _ex_trap_c; 139 if !cc jump _ex_trap_c;
137 140
138_return_from_exception: 141ENTRY(_return_from_exception)
139 DEBUG_START_HWTRACE(p5, r7) 142 DEBUG_START_HWTRACE(p5, r7)
140#ifdef ANOMALY_05000257 143#if ANOMALY_05000257
141 R7=LC0; 144 R7=LC0;
142 LC0=R7; 145 LC0=R7;
143 R7=LC1; 146 R7=LC1;
@@ -145,7 +148,7 @@ _return_from_exception:
145#endif 148#endif
146 (R7:6,P5:4) = [sp++]; 149 (R7:6,P5:4) = [sp++];
147 ASTAT = [sp++]; 150 ASTAT = [sp++];
148 sp = retn; 151 sp = EX_SCRATCH_REG;
149 rtx; 152 rtx;
150ENDPROC(_ex_soft_bp) 153ENDPROC(_ex_soft_bp)
151 154
@@ -163,7 +166,17 @@ ENTRY(_handle_bad_cplb)
163 [--sp] = ASTAT; 166 [--sp] = ASTAT;
164 [--sp] = (R7:6, P5:4); 167 [--sp] = (R7:6, P5:4);
165 168
169ENTRY(_ex_replaceable)
170 nop;
171
166ENTRY(_ex_trap_c) 172ENTRY(_ex_trap_c)
173 /* Make sure we are not in a double fault */
174 p4.l = lo(IPEND);
175 p4.h = hi(IPEND);
176 r7 = [p4];
177 CC = BITTST (r7, 5);
178 if CC jump _double_fault;
179
167 /* Call C code (trap_c) to handle the exception, which most 180 /* Call C code (trap_c) to handle the exception, which most
168 * likely involves sending a signal to the current process. 181 * likely involves sending a signal to the current process.
169 * To avoid double faults, lower our priority to IRQ5 first. 182 * To avoid double faults, lower our priority to IRQ5 first.
@@ -204,11 +217,57 @@ ENTRY(_ex_trap_c)
204 DEBUG_START_HWTRACE(p5, r7) 217 DEBUG_START_HWTRACE(p5, r7)
205 (R7:6,P5:4) = [sp++]; 218 (R7:6,P5:4) = [sp++];
206 ASTAT = [sp++]; 219 ASTAT = [sp++];
207 SP = RETN; 220 SP = EX_SCRATCH_REG;
208 raise 5; 221 raise 5;
209 rtx; 222 rtx;
210ENDPROC(_ex_trap_c) 223ENDPROC(_ex_trap_c)
211 224
225/* We just realized we got an exception, while we were processing a different
226 * exception. This is a unrecoverable event, so crash
227 */
228ENTRY(_double_fault)
229 /* Turn caches & protection off, to ensure we don't get any more
230 * double exceptions
231 */
232
233 P4.L = LO(IMEM_CONTROL);
234 P4.H = HI(IMEM_CONTROL);
235
236 R5 = [P4]; /* Control Register*/
237 BITCLR(R5,ENICPLB_P);
238 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */
239 .align 8;
240 [P4] = R5;
241 SSYNC;
242
243 P4.L = LO(DMEM_CONTROL);
244 P4.H = HI(DMEM_CONTROL);
245 R5 = [P4];
246 BITCLR(R5,ENDCPLB_P);
247 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */
248 .align 8;
249 [P4] = R5;
250 SSYNC;
251
252 /* Fix up the stack */
253 (R7:6,P5:4) = [sp++];
254 ASTAT = [sp++];
255 SP = EX_SCRATCH_REG;
256
257 /* We should be out of the exception stack, and back down into
258 * kernel or user space stack
259 */
260 SAVE_ALL_SYS
261
262 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
263 SP += -12;
264 call _double_fault_c;
265 SP += 12;
266.L_double_fault_panic:
267 JUMP .L_double_fault_panic
268
269ENDPROC(_double_fault)
270
212ENTRY(_exception_to_level5) 271ENTRY(_exception_to_level5)
213 SAVE_ALL_SYS 272 SAVE_ALL_SYS
214 273
@@ -279,7 +338,7 @@ ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/
279 * covered by a CPLB. Switch to an exception stack; use RETN as a 338 * covered by a CPLB. Switch to an exception stack; use RETN as a
280 * scratch register (for want of a better option). 339 * scratch register (for want of a better option).
281 */ 340 */
282 retn = sp; 341 EX_SCRATCH_REG = sp;
283 sp.l = _exception_stack_top; 342 sp.l = _exception_stack_top;
284 sp.h = _exception_stack_top; 343 sp.h = _exception_stack_top;
285 /* Try to deal with syscalls quickly. */ 344 /* Try to deal with syscalls quickly. */
@@ -290,8 +349,8 @@ ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/
290 r6.l = lo(SEQSTAT_EXCAUSE); 349 r6.l = lo(SEQSTAT_EXCAUSE);
291 r6.h = hi(SEQSTAT_EXCAUSE); 350 r6.h = hi(SEQSTAT_EXCAUSE);
292 r7 = r7 & r6; 351 r7 = r7 & r6;
293 p5.h = _extable; 352 p5.h = _ex_table;
294 p5.l = _extable; 353 p5.l = _ex_table;
295 p4 = r7; 354 p4 = r7;
296 p5 = p5 + (p4 << 2); 355 p5 = p5 + (p4 << 2);
297 p4 = [p5]; 356 p4 = [p5];
@@ -634,9 +693,9 @@ ENTRY(_return_from_int)
634 p1.h = _schedule_and_signal_from_int; 693 p1.h = _schedule_and_signal_from_int;
635 [p0] = p1; 694 [p0] = p1;
636 csync; 695 csync;
637#if defined(ANOMALY_05000281) 696#if ANOMALY_05000281
638 r0.l = lo(CONFIG_BOOT_LOAD); 697 r0.l = _safe_speculative_execution;
639 r0.h = hi(CONFIG_BOOT_LOAD); 698 r0.h = _safe_speculative_execution;
640 reti = r0; 699 reti = r0;
641#endif 700#endif
642 r0 = 0x801f (z); 701 r0 = 0x801f (z);
@@ -648,9 +707,9 @@ ENTRY(_return_from_int)
648ENDPROC(_return_from_int) 707ENDPROC(_return_from_int)
649 708
650ENTRY(_lower_to_irq14) 709ENTRY(_lower_to_irq14)
651#if defined(ANOMALY_05000281) 710#if ANOMALY_05000281
652 r0.l = lo(CONFIG_BOOT_LOAD); 711 r0.l = _safe_speculative_execution;
653 r0.h = hi(CONFIG_BOOT_LOAD); 712 r0.h = _safe_speculative_execution;
654 reti = r0; 713 reti = r0;
655#endif 714#endif
656 r0 = 0x401f; 715 r0 = 0x401f;
@@ -731,6 +790,114 @@ ENTRY(_init_exception_buff)
731 rts; 790 rts;
732ENDPROC(_init_exception_buff) 791ENDPROC(_init_exception_buff)
733 792
793/* We handle this 100% in exception space - to reduce overhead
794 * Only potiential problem is if the software buffer gets swapped out of the
795 * CPLB table - then double fault. - so we don't let this happen in other places
796 */
797#ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND
798ENTRY(_ex_trace_buff_full)
799 [--sp] = P3;
800 [--sp] = P2;
801 [--sp] = LC0;
802 [--sp] = LT0;
803 [--sp] = LB0;
804 P5.L = _trace_buff_offset;
805 P5.H = _trace_buff_offset;
806 P3 = [P5]; /* trace_buff_offset */
807 P5.L = lo(TBUFSTAT);
808 P5.H = hi(TBUFSTAT);
809 R7 = [P5];
810 R7 <<= 1; /* double, since we need to read twice */
811 LC0 = R7;
812 R7 <<= 2; /* need to shift over again,
813 * to get the number of bytes */
814 P5.L = lo(TBUF);
815 P5.H = hi(TBUF);
816 R6 = ((1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN)*1024) - 1;
817
818 P2 = R7;
819 P3 = P3 + P2;
820 R7 = P3;
821 R7 = R7 & R6;
822 P3 = R7;
823 P2.L = _trace_buff_offset;
824 P2.H = _trace_buff_offset;
825 [P2] = P3;
826
827 P2.L = _software_trace_buff;
828 P2.H = _software_trace_buff;
829
830 LSETUP (.Lstart, .Lend) LC0;
831.Lstart:
832 R7 = [P5]; /* read TBUF */
833 P4 = P3 + P2;
834 [P4] = R7;
835 P3 += -4;
836 R7 = P3;
837 R7 = R7 & R6;
838.Lend:
839 P3 = R7;
840
841 LB0 = [sp++];
842 LT0 = [sp++];
843 LC0 = [sp++];
844 P2 = [sp++];
845 P3 = [sp++];
846 jump _return_from_exception;
847ENDPROC(_ex_trace_buff_full)
848
849#if CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN == 4
850.data
851#else
852.section .l1.data.B
853#endif /* CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN */
854ENTRY(_trace_buff_offset)
855 .long 0;
856ALIGN
857ENTRY(_software_trace_buff)
858 .rept ((1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN)*256);
859 .long 0
860 .endr
861#endif /* CONFIG_DEBUG_BFIN_HWTRACE_EXPAND */
862
863#if CONFIG_EARLY_PRINTK
864.section .init.text
865ENTRY(_early_trap)
866 SAVE_ALL_SYS
867 trace_buffer_stop(p0,r0);
868
869 /* Turn caches off, to ensure we don't get double exceptions */
870
871 P4.L = LO(IMEM_CONTROL);
872 P4.H = HI(IMEM_CONTROL);
873
874 R5 = [P4]; /* Control Register*/
875 BITCLR(R5,ENICPLB_P);
876 CLI R1;
877 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */
878 .align 8;
879 [P4] = R5;
880 SSYNC;
881
882 P4.L = LO(DMEM_CONTROL);
883 P4.H = HI(DMEM_CONTROL);
884 R5 = [P4];
885 BITCLR(R5,ENDCPLB_P);
886 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */
887 .align 8;
888 [P4] = R5;
889 SSYNC;
890 STI R1;
891
892 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
893 r1 = RETX;
894
895 SP += -12;
896 call _early_trap_c;
897 SP += 12;
898ENDPROC(_early_trap)
899#endif /* CONFIG_EARLY_PRINTK */
900
734/* 901/*
735 * Put these in the kernel data section - that should always be covered by 902 * Put these in the kernel data section - that should always be covered by
736 * a CPLB. This is needed to ensure we don't get double fault conditions 903 * a CPLB. This is needed to ensure we don't get double fault conditions
@@ -741,30 +908,33 @@ ENDPROC(_init_exception_buff)
741#else 908#else
742.data 909.data
743#endif 910#endif
744ALIGN 911ENTRY(_ex_table)
745_extable:
746 /* entry for each EXCAUSE[5:0] 912 /* entry for each EXCAUSE[5:0]
747 * This table must be in sync with the table in ./kernel/traps.c 913 * This table must be in sync with the table in ./kernel/traps.c
748 * EXCPT instruction can provide 4 bits of EXCAUSE, allowing 16 to be user defined 914 * EXCPT instruction can provide 4 bits of EXCAUSE, allowing 16 to be user defined
749 */ 915 */
750 .long _ex_syscall; /* 0x00 - User Defined - Linux Syscall */ 916 .long _ex_syscall /* 0x00 - User Defined - Linux Syscall */
751 .long _ex_soft_bp /* 0x01 - User Defined - Software breakpoint */ 917 .long _ex_soft_bp /* 0x01 - User Defined - Software breakpoint */
752 .long _ex_trap_c /* 0x02 - User Defined */ 918 .long _ex_replaceable /* 0x02 - User Defined */
753 .long _ex_trap_c /* 0x03 - User Defined - userspace stack overflow */ 919 .long _ex_trap_c /* 0x03 - User Defined - userspace stack overflow */
754 .long _ex_trap_c /* 0x04 - User Defined */ 920 .long _ex_replaceable /* 0x04 - User Defined */
755 .long _ex_trap_c /* 0x05 - User Defined */ 921 .long _ex_replaceable /* 0x05 - User Defined */
756 .long _ex_trap_c /* 0x06 - User Defined */ 922 .long _ex_replaceable /* 0x06 - User Defined */
757 .long _ex_trap_c /* 0x07 - User Defined */ 923 .long _ex_replaceable /* 0x07 - User Defined */
758 .long _ex_trap_c /* 0x08 - User Defined */ 924 .long _ex_replaceable /* 0x08 - User Defined */
759 .long _ex_trap_c /* 0x09 - User Defined */ 925 .long _ex_replaceable /* 0x09 - User Defined */
760 .long _ex_trap_c /* 0x0A - User Defined */ 926 .long _ex_replaceable /* 0x0A - User Defined */
761 .long _ex_trap_c /* 0x0B - User Defined */ 927 .long _ex_replaceable /* 0x0B - User Defined */
762 .long _ex_trap_c /* 0x0C - User Defined */ 928 .long _ex_replaceable /* 0x0C - User Defined */
763 .long _ex_trap_c /* 0x0D - User Defined */ 929 .long _ex_replaceable /* 0x0D - User Defined */
764 .long _ex_trap_c /* 0x0E - User Defined */ 930 .long _ex_replaceable /* 0x0E - User Defined */
765 .long _ex_trap_c /* 0x0F - User Defined */ 931 .long _ex_replaceable /* 0x0F - User Defined */
766 .long _ex_single_step /* 0x10 - HW Single step */ 932 .long _ex_single_step /* 0x10 - HW Single step */
933#ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND
934 .long _ex_trace_buff_full /* 0x11 - Trace Buffer Full */
935#else
767 .long _ex_trap_c /* 0x11 - Trace Buffer Full */ 936 .long _ex_trap_c /* 0x11 - Trace Buffer Full */
937#endif
768 .long _ex_trap_c /* 0x12 - Reserved */ 938 .long _ex_trap_c /* 0x12 - Reserved */
769 .long _ex_trap_c /* 0x13 - Reserved */ 939 .long _ex_trap_c /* 0x13 - Reserved */
770 .long _ex_trap_c /* 0x14 - Reserved */ 940 .long _ex_trap_c /* 0x14 - Reserved */
@@ -812,8 +982,8 @@ _extable:
812 .long _ex_trap_c /* 0x3D - Reserved */ 982 .long _ex_trap_c /* 0x3D - Reserved */
813 .long _ex_trap_c /* 0x3E - Reserved */ 983 .long _ex_trap_c /* 0x3E - Reserved */
814 .long _ex_trap_c /* 0x3F - Reserved */ 984 .long _ex_trap_c /* 0x3F - Reserved */
985END(_ex_table)
815 986
816ALIGN
817ENTRY(_sys_call_table) 987ENTRY(_sys_call_table)
818 .long _sys_restart_syscall /* 0 */ 988 .long _sys_restart_syscall /* 0 */
819 .long _sys_exit 989 .long _sys_exit
@@ -1184,7 +1354,7 @@ _exception_stack:
1184 .endr 1354 .endr
1185_exception_stack_top: 1355_exception_stack_top:
1186 1356
1187#if defined(ANOMALY_05000261) 1357#if ANOMALY_05000261
1188/* Used by the assembly entry point to work around an anomaly. */ 1358/* Used by the assembly entry point to work around an anomaly. */
1189_last_cplb_fault_retx: 1359_last_cplb_fault_retx:
1190 .long 0; 1360 .long 0;
diff --git a/arch/blackfin/mach-common/interrupt.S b/arch/blackfin/mach-common/interrupt.S
index 203e20709163..c6b32fe0f6e9 100644
--- a/arch/blackfin/mach-common/interrupt.S
+++ b/arch/blackfin/mach-common/interrupt.S
@@ -46,30 +46,6 @@
46 46
47.align 4 /* just in case */ 47.align 4 /* just in case */
48 48
49/*
50 * initial interrupt handlers
51 */
52
53#ifndef CONFIG_KGDB
54 /* interrupt routine for emulation - 0 */
55 /* Currently used only if GDB stub is not in - invalid */
56 /* gdb-stub set the evt itself */
57 /* save registers for post-mortem only */
58ENTRY(_evt_emulation)
59 SAVE_ALL_SYS
60#ifdef CONFIG_FRAME_POINTER
61 fp = 0;
62#endif
63 r0 = IRQ_EMU;
64 r1 = sp;
65 SP += -12;
66 call _irq_panic;
67 SP += 12;
68 /* - GDB stub fills this in by itself (if defined) */
69 rte;
70ENDPROC(_evt_emulation)
71#endif
72
73/* Common interrupt entry code. First we do CLI, then push 49/* Common interrupt entry code. First we do CLI, then push
74 * RETI, to keep interrupts disabled, but to allow this state to be changed 50 * RETI, to keep interrupts disabled, but to allow this state to be changed
75 * by local_bh_enable. 51 * by local_bh_enable.
@@ -140,7 +116,7 @@ __common_int_entry:
140 fp = 0; 116 fp = 0;
141#endif 117#endif
142 118
143#if defined (ANOMALY_05000283) || defined (ANOMALY_05000315) 119#if ANOMALY_05000283 || ANOMALY_05000315
144 cc = r7 == r7; 120 cc = r7 == r7;
145 p5.h = 0xffc0; 121 p5.h = 0xffc0;
146 p5.l = 0x0014; 122 p5.l = 0x0014;
@@ -163,7 +139,7 @@ ENTRY(_evt_ivhw)
163#ifdef CONFIG_FRAME_POINTER 139#ifdef CONFIG_FRAME_POINTER
164 fp = 0; 140 fp = 0;
165#endif 141#endif
166#ifdef ANOMALY_05000283 142#if ANOMALY_05000283
167 cc = r7 == r7; 143 cc = r7 == r7;
168 p5.h = 0xffc0; 144 p5.h = 0xffc0;
169 p5.l = 0x0014; 145 p5.l = 0x0014;
@@ -201,27 +177,15 @@ ENTRY(_evt_ivhw)
201 jump .Lcommon_restore_context; 177 jump .Lcommon_restore_context;
202#endif 178#endif
203 179
204/* interrupt routine for evt2 - 2. This is NMI. */ 180/* Interrupt routine for evt2 (NMI).
205ENTRY(_evt_evt2) 181 * We don't actually use this, so just return.
206 SAVE_CONTEXT 182 * For inner circle type details, please see:
207#ifdef CONFIG_FRAME_POINTER 183 * http://docs.blackfin.uclinux.org/doku.php?id=linux:nmi
208 fp = 0; 184 */
209#endif 185ENTRY(_evt_nmi)
210#ifdef ANOMALY_05000283 186.weak _evt_nmi
211 cc = r7 == r7;
212 p5.h = 0xffc0;
213 p5.l = 0x0014;
214 if cc jump 1f;
215 r7.l = W[p5];
2161:
217#endif
218 r0 = IRQ_NMI;
219 r1 = sp;
220 SP += -12;
221 call _asm_do_IRQ;
222 SP += 12;
223 RESTORE_CONTEXT
224 rtn; 187 rtn;
188ENDPROC(_evt_nmi)
225 189
226/* interrupt routine for core timer - 6 */ 190/* interrupt routine for core timer - 6 */
227ENTRY(_evt_timer) 191ENTRY(_evt_timer)
diff --git a/arch/blackfin/mach-common/ints-priority-dc.c b/arch/blackfin/mach-common/ints-priority-dc.c
index 660f881b620a..2db3546fc874 100644
--- a/arch/blackfin/mach-common/ints-priority-dc.c
+++ b/arch/blackfin/mach-common/ints-priority-dc.c
@@ -221,7 +221,7 @@ static unsigned int bf561_gpio_irq_startup(unsigned int irq)
221 221
222 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { 222 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
223 223
224 ret = gpio_request(gpionr, NULL); 224 ret = gpio_request(gpionr, "IRQ");
225 if (ret) 225 if (ret)
226 return ret; 226 return ret;
227 227
@@ -261,7 +261,7 @@ static int bf561_gpio_irq_type(unsigned int irq, unsigned int type)
261 261
262 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { 262 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
263 263
264 ret = gpio_request(gpionr, NULL); 264 ret = gpio_request(gpionr, "IRQ");
265 if (ret) 265 if (ret)
266 return ret; 266 return ret;
267 267
@@ -362,10 +362,11 @@ void __init init_exception_vectors(void)
362{ 362{
363 SSYNC(); 363 SSYNC();
364 364
365#ifndef CONFIG_KGDB 365 /* cannot program in software:
366 bfin_write_EVT0(evt_emulation); 366 * evt0 - emulation (jtag)
367#endif 367 * evt1 - reset
368 bfin_write_EVT2(evt_evt2); 368 */
369 bfin_write_EVT2(evt_nmi);
369 bfin_write_EVT3(trap); 370 bfin_write_EVT3(trap);
370 bfin_write_EVT5(evt_ivhw); 371 bfin_write_EVT5(evt_ivhw);
371 bfin_write_EVT6(evt_timer); 372 bfin_write_EVT6(evt_timer);
diff --git a/arch/blackfin/mach-common/ints-priority-sc.c b/arch/blackfin/mach-common/ints-priority-sc.c
index 4708023fe716..d3b7672b2b94 100644
--- a/arch/blackfin/mach-common/ints-priority-sc.c
+++ b/arch/blackfin/mach-common/ints-priority-sc.c
@@ -343,7 +343,7 @@ static unsigned int bfin_gpio_irq_startup(unsigned int irq)
343 u16 gpionr = irq - IRQ_PF0; 343 u16 gpionr = irq - IRQ_PF0;
344 344
345 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { 345 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
346 ret = gpio_request(gpionr, NULL); 346 ret = gpio_request(gpionr, "IRQ");
347 if (ret) 347 if (ret)
348 return ret; 348 return ret;
349 } 349 }
@@ -377,7 +377,7 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
377 if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING | 377 if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING |
378 IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) { 378 IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) {
379 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { 379 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
380 ret = gpio_request(gpionr, NULL); 380 ret = gpio_request(gpionr, "IRQ");
381 if (ret) 381 if (ret)
382 return ret; 382 return ret;
383 } 383 }
@@ -587,7 +587,7 @@ static unsigned int bfin_gpio_irq_startup(unsigned int irq)
587 } 587 }
588 588
589 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { 589 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
590 ret = gpio_request(gpionr, NULL); 590 ret = gpio_request(gpionr, "IRQ");
591 if (ret) 591 if (ret)
592 return ret; 592 return ret;
593 } 593 }
@@ -627,7 +627,7 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
627 if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING | 627 if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING |
628 IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) { 628 IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) {
629 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { 629 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
630 ret = gpio_request(gpionr, NULL); 630 ret = gpio_request(gpionr, "IRQ");
631 if (ret) 631 if (ret)
632 return ret; 632 return ret;
633 } 633 }
@@ -721,10 +721,11 @@ void __init init_exception_vectors(void)
721{ 721{
722 SSYNC(); 722 SSYNC();
723 723
724#ifndef CONFIG_KGDB 724 /* cannot program in software:
725 bfin_write_EVT0(evt_emulation); 725 * evt0 - emulation (jtag)
726#endif 726 * evt1 - reset
727 bfin_write_EVT2(evt_evt2); 727 */
728 bfin_write_EVT2(evt_nmi);
728 bfin_write_EVT3(trap); 729 bfin_write_EVT3(trap);
729 bfin_write_EVT5(evt_ivhw); 730 bfin_write_EVT5(evt_ivhw);
730 bfin_write_EVT6(evt_timer); 731 bfin_write_EVT6(evt_timer);
diff --git a/arch/blackfin/mach-common/lock.S b/arch/blackfin/mach-common/lock.S
index 386ac8dda076..28b87fe9ce3c 100644
--- a/arch/blackfin/mach-common/lock.S
+++ b/arch/blackfin/mach-common/lock.S
@@ -33,7 +33,7 @@
33 33
34.text 34.text
35 35
36#ifdef CONFIG_BLKFIN_CACHE_LOCK 36#ifdef CONFIG_BFIN_ICACHE_LOCK
37 37
38/* When you come here, it is assumed that 38/* When you come here, it is assumed that
39 * R0 - Which way to be locked 39 * R0 - Which way to be locked
@@ -43,12 +43,12 @@ ENTRY(_cache_grab_lock)
43 43
44 [--SP]=( R7:0,P5:0 ); 44 [--SP]=( R7:0,P5:0 );
45 45
46 P1.H = (IMEM_CONTROL >> 16); 46 P1.H = HI(IMEM_CONTROL);
47 P1.L = (IMEM_CONTROL & 0xFFFF); 47 P1.L = LO(IMEM_CONTROL);
48 P5.H = (ICPLB_ADDR0 >> 16); 48 P5.H = HI(ICPLB_ADDR0);
49 P5.L = (ICPLB_ADDR0 & 0xFFFF); 49 P5.L = LO(ICPLB_ADDR0);
50 P4.H = (ICPLB_DATA0 >> 16); 50 P4.H = HI(ICPLB_DATA0);
51 P4.L = (ICPLB_DATA0 & 0xFFFF); 51 P4.L = LO(ICPLB_DATA0);
52 R7 = R0; 52 R7 = R0;
53 53
54 /* If the code of interest already resides in the cache 54 /* If the code of interest already resides in the cache
@@ -167,8 +167,8 @@ ENTRY(_cache_lock)
167 167
168 [--SP]=( R7:0,P5:0 ); 168 [--SP]=( R7:0,P5:0 );
169 169
170 P1.H = (IMEM_CONTROL >> 16); 170 P1.H = HI(IMEM_CONTROL);
171 P1.L = (IMEM_CONTROL & 0xFFFF); 171 P1.L = LO(IMEM_CONTROL);
172 172
173 /* Disable the Interrupts*/ 173 /* Disable the Interrupts*/
174 CLI R3; 174 CLI R3;
@@ -189,14 +189,14 @@ ENTRY(_cache_lock)
189 RTS; 189 RTS;
190ENDPROC(_cache_lock) 190ENDPROC(_cache_lock)
191 191
192#endif /* BLKFIN_CACHE_LOCK */ 192#endif /* BFIN_ICACHE_LOCK */
193 193
194/* Return the ILOC bits of IMEM_CONTROL 194/* Return the ILOC bits of IMEM_CONTROL
195 */ 195 */
196 196
197ENTRY(_read_iloc) 197ENTRY(_read_iloc)
198 P1.H = (IMEM_CONTROL >> 16); 198 P1.H = HI(IMEM_CONTROL);
199 P1.L = (IMEM_CONTROL & 0xFFFF); 199 P1.L = LO(IMEM_CONTROL);
200 R1 = 0xF; 200 R1 = 0xF;
201 R0 = [P1]; 201 R0 = [P1];
202 R0 = R0 >> 3; 202 R0 = R0 >> 3;
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c
index 68459cc052a1..e97ea8fc8dc4 100644
--- a/arch/blackfin/mm/init.c
+++ b/arch/blackfin/mm/init.c
@@ -53,7 +53,7 @@ static unsigned long empty_bad_page;
53 53
54unsigned long empty_zero_page; 54unsigned long empty_zero_page;
55 55
56void __init show_mem(void) 56void show_mem(void)
57{ 57{
58 unsigned long i; 58 unsigned long i;
59 int free = 0, total = 0, reserved = 0, shared = 0; 59 int free = 0, total = 0, reserved = 0, shared = 0;
diff --git a/arch/blackfin/oprofile/op_blackfin.h b/arch/blackfin/oprofile/op_blackfin.h
index f88f446c814f..05dd08c9d154 100644
--- a/arch/blackfin/oprofile/op_blackfin.h
+++ b/arch/blackfin/oprofile/op_blackfin.h
@@ -68,7 +68,7 @@ static inline unsigned int ctr_read(void)
68 unsigned int tmp; 68 unsigned int tmp;
69 69
70 tmp = bfin_read_PFCTL(); 70 tmp = bfin_read_PFCTL();
71 __builtin_bfin_csync(); 71 CSYNC();
72 72
73 return tmp; 73 return tmp;
74} 74}
@@ -76,21 +76,21 @@ static inline unsigned int ctr_read(void)
76static inline void ctr_write(unsigned int val) 76static inline void ctr_write(unsigned int val)
77{ 77{
78 bfin_write_PFCTL(val); 78 bfin_write_PFCTL(val);
79 __builtin_bfin_csync(); 79 CSYNC();
80} 80}
81 81
82static inline void count_read(unsigned int *count) 82static inline void count_read(unsigned int *count)
83{ 83{
84 count[0] = bfin_read_PFCNTR0(); 84 count[0] = bfin_read_PFCNTR0();
85 count[1] = bfin_read_PFCNTR1(); 85 count[1] = bfin_read_PFCNTR1();
86 __builtin_bfin_csync(); 86 CSYNC();
87} 87}
88 88
89static inline void count_write(unsigned int *count) 89static inline void count_write(unsigned int *count)
90{ 90{
91 bfin_write_PFCNTR0(count[0]); 91 bfin_write_PFCNTR0(count[0]);
92 bfin_write_PFCNTR1(count[1]); 92 bfin_write_PFCNTR1(count[1]);
93 __builtin_bfin_csync(); 93 CSYNC();
94} 94}
95 95
96extern int pm_overflow_handler(int irq, struct pt_regs *regs); 96extern int pm_overflow_handler(int irq, struct pt_regs *regs);
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 66c92bc36f3d..6f475b609864 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -86,10 +86,8 @@ static void bfin_serial_stop_tx(struct uart_port *port)
86{ 86{
87 struct bfin_serial_port *uart = (struct bfin_serial_port *)port; 87 struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
88 88
89#ifdef CONFIG_BF54x
90 while (!(UART_GET_LSR(uart) & TEMT)) 89 while (!(UART_GET_LSR(uart) & TEMT))
91 continue; 90 continue;
92#endif
93 91
94#ifdef CONFIG_SERIAL_BFIN_DMA 92#ifdef CONFIG_SERIAL_BFIN_DMA
95 disable_dma(uart->tx_dma_channel); 93 disable_dma(uart->tx_dma_channel);
@@ -128,8 +126,8 @@ static void bfin_serial_start_tx(struct uart_port *port)
128 ier = UART_GET_IER(uart); 126 ier = UART_GET_IER(uart);
129 ier |= ETBEI; 127 ier |= ETBEI;
130 UART_PUT_IER(uart, ier); 128 UART_PUT_IER(uart, ier);
131 bfin_serial_tx_chars(uart);
132#endif 129#endif
130 bfin_serial_tx_chars(uart);
133#endif 131#endif
134} 132}
135 133
@@ -139,18 +137,21 @@ static void bfin_serial_start_tx(struct uart_port *port)
139static void bfin_serial_stop_rx(struct uart_port *port) 137static void bfin_serial_stop_rx(struct uart_port *port)
140{ 138{
141 struct bfin_serial_port *uart = (struct bfin_serial_port *)port; 139 struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
140#ifdef CONFIG_KGDB_UART
141 if (uart->port.line != CONFIG_KGDB_UART_PORT) {
142#endif
142#ifdef CONFIG_BF54x 143#ifdef CONFIG_BF54x
143 UART_CLEAR_IER(uart, ERBFI); 144 UART_CLEAR_IER(uart, ERBFI);
144#else 145#else
145 unsigned short ier; 146 unsigned short ier;
146 147
147 ier = UART_GET_IER(uart); 148 ier = UART_GET_IER(uart);
148#ifdef CONFIG_KGDB_UART
149 if (uart->port.line != CONFIG_KGDB_UART_PORT)
150#endif
151 ier &= ~ERBFI; 149 ier &= ~ERBFI;
152 UART_PUT_IER(uart, ier); 150 UART_PUT_IER(uart, ier);
153#endif 151#endif
152#ifdef CONFIG_KGDB_UART
153 }
154#endif
154} 155}
155 156
156/* 157/*
@@ -173,12 +174,15 @@ void kgdb_put_debug_char(int chr)
173 uart = &bfin_serial_ports[CONFIG_KGDB_UART_PORT]; 174 uart = &bfin_serial_ports[CONFIG_KGDB_UART_PORT];
174 175
175 while (!(UART_GET_LSR(uart) & THRE)) { 176 while (!(UART_GET_LSR(uart) & THRE)) {
176 __builtin_bfin_ssync(); 177 SSYNC();
177 } 178 }
179
180#ifndef CONFIG_BF54x
178 UART_PUT_LCR(uart, UART_GET_LCR(uart)&(~DLAB)); 181 UART_PUT_LCR(uart, UART_GET_LCR(uart)&(~DLAB));
179 __builtin_bfin_ssync(); 182 SSYNC();
183#endif
180 UART_PUT_CHAR(uart, (unsigned char)chr); 184 UART_PUT_CHAR(uart, (unsigned char)chr);
181 __builtin_bfin_ssync(); 185 SSYNC();
182} 186}
183 187
184int kgdb_get_debug_char(void) 188int kgdb_get_debug_char(void)
@@ -192,12 +196,14 @@ int kgdb_get_debug_char(void)
192 uart = &bfin_serial_ports[CONFIG_KGDB_UART_PORT]; 196 uart = &bfin_serial_ports[CONFIG_KGDB_UART_PORT];
193 197
194 while(!(UART_GET_LSR(uart) & DR)) { 198 while(!(UART_GET_LSR(uart) & DR)) {
195 __builtin_bfin_ssync(); 199 SSYNC();
196 } 200 }
201#ifndef CONFIG_BF54x
197 UART_PUT_LCR(uart, UART_GET_LCR(uart)&(~DLAB)); 202 UART_PUT_LCR(uart, UART_GET_LCR(uart)&(~DLAB));
198 __builtin_bfin_ssync(); 203 SSYNC();
204#endif
199 chr = UART_GET_CHAR(uart); 205 chr = UART_GET_CHAR(uart);
200 __builtin_bfin_ssync(); 206 SSYNC();
201 207
202 return chr; 208 return chr;
203} 209}
@@ -225,12 +231,10 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
225{ 231{
226 struct tty_struct *tty = uart->port.info->tty; 232 struct tty_struct *tty = uart->port.info->tty;
227 unsigned int status, ch, flg; 233 unsigned int status, ch, flg;
234 static int in_break = 0;
228#ifdef CONFIG_KGDB_UART 235#ifdef CONFIG_KGDB_UART
229 struct pt_regs *regs = get_irq_regs(); 236 struct pt_regs *regs = get_irq_regs();
230#endif 237#endif
231#ifdef BF533_FAMILY
232 static int in_break = 0;
233#endif
234 238
235 status = UART_GET_LSR(uart); 239 status = UART_GET_LSR(uart);
236 ch = UART_GET_CHAR(uart); 240 ch = UART_GET_CHAR(uart);
@@ -256,29 +260,30 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
256 } 260 }
257 } 261 }
258#endif 262#endif
259 263
260#ifdef BF533_FAMILY 264 if (ANOMALY_05000230) {
261 /* The BF533 family of processors have a nice misbehavior where 265 /* The BF533 family of processors have a nice misbehavior where
262 * they continuously generate characters for a "single" break. 266 * they continuously generate characters for a "single" break.
263 * We have to basically ignore this flood until the "next" valid 267 * We have to basically ignore this flood until the "next" valid
264 * character comes across. All other Blackfin families operate 268 * character comes across. All other Blackfin families operate
265 * properly though. 269 * properly though.
266 */ 270 * Note: While Anomaly 05000230 does not directly address this,
267 if (in_break) { 271 * the changes that went in for it also fixed this issue.
268 if (ch != 0) { 272 */
269 in_break = 0; 273 if (in_break) {
270 ch = UART_GET_CHAR(uart); 274 if (ch != 0) {
271 if (bfin_revid() < 5) 275 in_break = 0;
276 ch = UART_GET_CHAR(uart);
277 if (bfin_revid() < 5)
278 return;
279 } else
272 return; 280 return;
273 } else 281 }
274 return;
275 } 282 }
276#endif
277 283
278 if (status & BI) { 284 if (status & BI) {
279#ifdef BF533_FAMILY 285 if (ANOMALY_05000230)
280 in_break = 1; 286 in_break = 1;
281#endif
282 uart->port.icount.brk++; 287 uart->port.icount.brk++;
283 if (uart_handle_break(&uart->port)) 288 if (uart_handle_break(&uart->port))
284 goto ignore_char; 289 goto ignore_char;
@@ -697,17 +702,19 @@ static int bfin_serial_startup(struct uart_port *port)
697 uart->rx_dma_timer.expires = jiffies + DMA_RX_FLUSH_JIFFIES; 702 uart->rx_dma_timer.expires = jiffies + DMA_RX_FLUSH_JIFFIES;
698 add_timer(&(uart->rx_dma_timer)); 703 add_timer(&(uart->rx_dma_timer));
699#else 704#else
705 if (request_irq(uart->port.irq, bfin_serial_rx_int, IRQF_DISABLED,
706 "BFIN_UART_RX", uart)) {
700# ifdef CONFIG_KGDB_UART 707# ifdef CONFIG_KGDB_UART
701 if (uart->port.line != CONFIG_KGDB_UART_PORT && request_irq 708 if (uart->port.line != CONFIG_KGDB_UART_PORT) {
702# else
703 if (request_irq
704# endif 709# endif
705 (uart->port.irq, bfin_serial_rx_int, IRQF_DISABLED,
706 "BFIN_UART_RX", uart)) {
707 printk(KERN_NOTICE "Unable to attach BlackFin UART RX interrupt\n"); 710 printk(KERN_NOTICE "Unable to attach BlackFin UART RX interrupt\n");
708 return -EBUSY; 711 return -EBUSY;
712# ifdef CONFIG_KGDB_UART
713 }
714# endif
709 } 715 }
710 716
717
711 if (request_irq 718 if (request_irq
712 (uart->port.irq+1, bfin_serial_tx_int, IRQF_DISABLED, 719 (uart->port.irq+1, bfin_serial_tx_int, IRQF_DISABLED,
713 "BFIN_UART_TX", uart)) { 720 "BFIN_UART_TX", uart)) {
@@ -962,30 +969,6 @@ static void __init bfin_serial_init_ports(void)
962} 969}
963 970
964#ifdef CONFIG_SERIAL_BFIN_CONSOLE 971#ifdef CONFIG_SERIAL_BFIN_CONSOLE
965static void bfin_serial_console_putchar(struct uart_port *port, int ch)
966{
967 struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
968 while (!(UART_GET_LSR(uart) & THRE))
969 barrier();
970 UART_PUT_CHAR(uart, ch);
971 SSYNC();
972}
973
974/*
975 * Interrupts are disabled on entering
976 */
977static void
978bfin_serial_console_write(struct console *co, const char *s, unsigned int count)
979{
980 struct bfin_serial_port *uart = &bfin_serial_ports[co->index];
981 int flags = 0;
982
983 spin_lock_irqsave(&uart->port.lock, flags);
984 uart_console_write(&uart->port, s, count, bfin_serial_console_putchar);
985 spin_unlock_irqrestore(&uart->port.lock, flags);
986
987}
988
989/* 972/*
990 * If the port was already initialised (eg, by a boot loader), 973 * If the port was already initialised (eg, by a boot loader),
991 * try to determine the current setup. 974 * try to determine the current setup.
@@ -1038,19 +1021,25 @@ bfin_serial_console_get_options(struct bfin_serial_port *uart, int *baud,
1038 } 1021 }
1039 pr_debug("%s:baud = %d, parity = %c, bits= %d\n", __FUNCTION__, *baud, *parity, *bits); 1022 pr_debug("%s:baud = %d, parity = %c, bits= %d\n", __FUNCTION__, *baud, *parity, *bits);
1040} 1023}
1024#endif
1025
1026#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
1027static struct uart_driver bfin_serial_reg;
1041 1028
1042static int __init 1029static int __init
1043bfin_serial_console_setup(struct console *co, char *options) 1030bfin_serial_console_setup(struct console *co, char *options)
1044{ 1031{
1045 struct bfin_serial_port *uart; 1032 struct bfin_serial_port *uart;
1033# ifdef CONFIG_SERIAL_BFIN_CONSOLE
1046 int baud = 57600; 1034 int baud = 57600;
1047 int bits = 8; 1035 int bits = 8;
1048 int parity = 'n'; 1036 int parity = 'n';
1049#ifdef CONFIG_SERIAL_BFIN_CTSRTS 1037# ifdef CONFIG_SERIAL_BFIN_CTSRTS
1050 int flow = 'r'; 1038 int flow = 'r';
1051#else 1039# else
1052 int flow = 'n'; 1040 int flow = 'n';
1053#endif 1041# endif
1042# endif
1054 1043
1055 /* 1044 /*
1056 * Check whether an invalid uart number has been specified, and 1045 * Check whether an invalid uart number has been specified, and
@@ -1061,15 +1050,45 @@ bfin_serial_console_setup(struct console *co, char *options)
1061 co->index = 0; 1050 co->index = 0;
1062 uart = &bfin_serial_ports[co->index]; 1051 uart = &bfin_serial_ports[co->index];
1063 1052
1053# ifdef CONFIG_SERIAL_BFIN_CONSOLE
1064 if (options) 1054 if (options)
1065 uart_parse_options(options, &baud, &parity, &bits, &flow); 1055 uart_parse_options(options, &baud, &parity, &bits, &flow);
1066 else 1056 else
1067 bfin_serial_console_get_options(uart, &baud, &parity, &bits); 1057 bfin_serial_console_get_options(uart, &baud, &parity, &bits);
1068 1058
1069 return uart_set_options(&uart->port, co, baud, parity, bits, flow); 1059 return uart_set_options(&uart->port, co, baud, parity, bits, flow);
1060# else
1061 return 0;
1062# endif
1063}
1064#endif /* defined (CONFIG_SERIAL_BFIN_CONSOLE) ||
1065 defined (CONFIG_EARLY_PRINTK) */
1066
1067#ifdef CONFIG_SERIAL_BFIN_CONSOLE
1068static void bfin_serial_console_putchar(struct uart_port *port, int ch)
1069{
1070 struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
1071 while (!(UART_GET_LSR(uart) & THRE))
1072 barrier();
1073 UART_PUT_CHAR(uart, ch);
1074 SSYNC();
1075}
1076
1077/*
1078 * Interrupts are disabled on entering
1079 */
1080static void
1081bfin_serial_console_write(struct console *co, const char *s, unsigned int count)
1082{
1083 struct bfin_serial_port *uart = &bfin_serial_ports[co->index];
1084 int flags = 0;
1085
1086 spin_lock_irqsave(&uart->port.lock, flags);
1087 uart_console_write(&uart->port, s, count, bfin_serial_console_putchar);
1088 spin_unlock_irqrestore(&uart->port.lock, flags);
1089
1070} 1090}
1071 1091
1072static struct uart_driver bfin_serial_reg;
1073static struct console bfin_serial_console = { 1092static struct console bfin_serial_console = {
1074 .name = BFIN_SERIAL_NAME, 1093 .name = BFIN_SERIAL_NAME,
1075 .write = bfin_serial_console_write, 1094 .write = bfin_serial_console_write,
@@ -1095,7 +1114,64 @@ console_initcall(bfin_serial_rs_console_init);
1095#define BFIN_SERIAL_CONSOLE &bfin_serial_console 1114#define BFIN_SERIAL_CONSOLE &bfin_serial_console
1096#else 1115#else
1097#define BFIN_SERIAL_CONSOLE NULL 1116#define BFIN_SERIAL_CONSOLE NULL
1098#endif 1117#endif /* CONFIG_SERIAL_BFIN_CONSOLE */
1118
1119
1120#ifdef CONFIG_EARLY_PRINTK
1121static __init void early_serial_putc(struct uart_port *port, int ch)
1122{
1123 unsigned timeout = 0xffff;
1124 struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
1125
1126 while ((!(UART_GET_LSR(uart) & THRE)) && --timeout)
1127 cpu_relax();
1128 UART_PUT_CHAR(uart, ch);
1129}
1130
1131static __init void early_serial_write(struct console *con, const char *s,
1132 unsigned int n)
1133{
1134 struct bfin_serial_port *uart = &bfin_serial_ports[con->index];
1135 unsigned int i;
1136
1137 for (i = 0; i < n; i++, s++) {
1138 if (*s == '\n')
1139 early_serial_putc(&uart->port, '\r');
1140 early_serial_putc(&uart->port, *s);
1141 }
1142}
1143
1144static struct __init console bfin_early_serial_console = {
1145 .name = "early_BFuart",
1146 .write = early_serial_write,
1147 .device = uart_console_device,
1148 .flags = CON_PRINTBUFFER,
1149 .setup = bfin_serial_console_setup,
1150 .index = -1,
1151 .data = &bfin_serial_reg,
1152};
1153
1154struct console __init *bfin_earlyserial_init(unsigned int port,
1155 unsigned int cflag)
1156{
1157 struct bfin_serial_port *uart;
1158 struct ktermios t;
1159
1160 if (port == -1 || port >= nr_ports)
1161 port = 0;
1162 bfin_serial_init_ports();
1163 bfin_early_serial_console.index = port;
1164 uart = &bfin_serial_ports[port];
1165 t.c_cflag = cflag;
1166 t.c_iflag = 0;
1167 t.c_oflag = 0;
1168 t.c_lflag = ICANON;
1169 t.c_line = port;
1170 bfin_serial_set_termios(&uart->port, &t, &t);
1171 return &bfin_early_serial_console;
1172}
1173
1174#endif /* CONFIG_SERIAL_BFIN_CONSOLE */
1099 1175
1100static struct uart_driver bfin_serial_reg = { 1176static struct uart_driver bfin_serial_reg = {
1101 .owner = THIS_MODULE, 1177 .owner = THIS_MODULE,
@@ -1182,7 +1258,7 @@ static int __init bfin_serial_init(void)
1182 int ret; 1258 int ret;
1183#ifdef CONFIG_KGDB_UART 1259#ifdef CONFIG_KGDB_UART
1184 struct bfin_serial_port *uart = &bfin_serial_ports[CONFIG_KGDB_UART_PORT]; 1260 struct bfin_serial_port *uart = &bfin_serial_ports[CONFIG_KGDB_UART_PORT];
1185 struct termios t; 1261 struct ktermios t;
1186#endif 1262#endif
1187 1263
1188 pr_info("Serial: Blackfin serial driver\n"); 1264 pr_info("Serial: Blackfin serial driver\n");
@@ -1199,11 +1275,15 @@ static int __init bfin_serial_init(void)
1199 } 1275 }
1200#ifdef CONFIG_KGDB_UART 1276#ifdef CONFIG_KGDB_UART
1201 if (uart->port.cons->index != CONFIG_KGDB_UART_PORT) { 1277 if (uart->port.cons->index != CONFIG_KGDB_UART_PORT) {
1202 request_irq(uart->port.irq, bfin_serial_int, 1278 request_irq(uart->port.irq, bfin_serial_rx_int,
1203 IRQF_DISABLED, "BFIN_UART_RX", uart); 1279 IRQF_DISABLED, "BFIN_UART_RX", uart);
1204 pr_info("Request irq for kgdb uart port\n"); 1280 pr_info("Request irq for kgdb uart port\n");
1281#ifdef CONFIG_BF54x
1282 UART_SET_IER(uart, ERBFI);
1283#else
1205 UART_PUT_IER(uart, UART_GET_IER(uart) | ERBFI); 1284 UART_PUT_IER(uart, UART_GET_IER(uart) | ERBFI);
1206 __builtin_bfin_ssync(); 1285#endif
1286 SSYNC();
1207 t.c_cflag = CS8|B57600; 1287 t.c_cflag = CS8|B57600;
1208 t.c_iflag = 0; 1288 t.c_iflag = 0;
1209 t.c_oflag = 0; 1289 t.c_oflag = 0;
diff --git a/include/asm-blackfin/bfin5xx_spi.h b/include/asm-blackfin/bfin5xx_spi.h
index 95c1c952e7c1..f617d8765451 100644
--- a/include/asm-blackfin/bfin5xx_spi.h
+++ b/include/asm-blackfin/bfin5xx_spi.h
@@ -21,8 +21,6 @@
21#ifndef _SPI_CHANNEL_H_ 21#ifndef _SPI_CHANNEL_H_
22#define _SPI_CHANNEL_H_ 22#define _SPI_CHANNEL_H_
23 23
24#define SPI0_REGBASE 0xffc00500
25
26#define SPI_READ 0 24#define SPI_READ 0
27#define SPI_WRITE 1 25#define SPI_WRITE 1
28 26
diff --git a/include/asm-blackfin/blackfin.h b/include/asm-blackfin/blackfin.h
index 25b934b7f829..984b74f0a2ec 100644
--- a/include/asm-blackfin/blackfin.h
+++ b/include/asm-blackfin/blackfin.h
@@ -11,78 +11,57 @@
11#define HI(con32) (((con32) >> 16) & 0xFFFF) 11#define HI(con32) (((con32) >> 16) & 0xFFFF)
12#define hi(con32) (((con32) >> 16) & 0xFFFF) 12#define hi(con32) (((con32) >> 16) & 0xFFFF)
13 13
14#include <asm/mach/blackfin.h> 14#include <asm/mach/anomaly.h>
15#include <asm/bfin-global.h>
16 15
17#ifndef __ASSEMBLY__ 16#ifndef __ASSEMBLY__
18 17
19/* SSYNC implementation for C file */ 18/* SSYNC implementation for C file */
20#if defined(ANOMALY_05000312) && defined(ANOMALY_05000244) 19static inline void SSYNC(void)
21static inline void SSYNC (void)
22{
23 int _tmp;
24 __asm__ __volatile__ ("cli %0;\n\t"
25 "nop;nop;\n\t"
26 "ssync;\n\t"
27 "sti %0;\n\t"
28 :"=d"(_tmp):);
29}
30#elif defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
31static inline void SSYNC (void)
32{ 20{
33 int _tmp; 21 int _tmp;
34 __asm__ __volatile__ ("cli %0;\n\t" 22 if (ANOMALY_05000312)
35 "ssync;\n\t" 23 __asm__ __volatile__(
36 "sti %0;\n\t" 24 "cli %0;"
37 :"=d"(_tmp):); 25 "nop;"
26 "nop;"
27 "ssync;"
28 "sti %0;"
29 : "=d" (_tmp)
30 );
31 else if (ANOMALY_05000244)
32 __asm__ __volatile__(
33 "nop;"
34 "nop;"
35 "nop;"
36 "ssync;"
37 );
38 else
39 __asm__ __volatile__("ssync;");
38} 40}
39#elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244)
40static inline void SSYNC (void)
41{
42 __asm__ __volatile__ ("nop; nop; nop;\n\t"
43 "ssync;\n\t"
44 ::);
45}
46#elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
47static inline void SSYNC (void)
48{
49 __asm__ __volatile__ ("ssync;\n\t");
50}
51#endif
52 41
53/* CSYNC implementation for C file */ 42/* CSYNC implementation for C file */
54#if defined(ANOMALY_05000312) && defined(ANOMALY_05000244) 43static inline void CSYNC(void)
55static inline void CSYNC (void)
56{
57 int _tmp;
58 __asm__ __volatile__ ("cli %0;\n\t"
59 "nop;nop;\n\t"
60 "csync;\n\t"
61 "sti %0;\n\t"
62 :"=d"(_tmp):);
63}
64#elif defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
65static inline void CSYNC (void)
66{ 44{
67 int _tmp; 45 int _tmp;
68 __asm__ __volatile__ ("cli %0;\n\t" 46 if (ANOMALY_05000312)
69 "csync;\n\t" 47 __asm__ __volatile__(
70 "sti %0;\n\t" 48 "cli %0;"
71 :"=d"(_tmp):); 49 "nop;"
72} 50 "nop;"
73#elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244) 51 "csync;"
74static inline void CSYNC (void) 52 "sti %0;"
75{ 53 : "=d" (_tmp)
76 __asm__ __volatile__ ("nop; nop; nop;\n\t" 54 );
77 "ssync;\n\t" 55 else if (ANOMALY_05000244)
78 ::); 56 __asm__ __volatile__(
57 "nop;"
58 "nop;"
59 "nop;"
60 "csync;"
61 );
62 else
63 __asm__ __volatile__("csync;");
79} 64}
80#elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
81static inline void CSYNC (void)
82{
83 __asm__ __volatile__ ("csync;\n\t");
84}
85#endif
86 65
87#else /* __ASSEMBLY__ */ 66#else /* __ASSEMBLY__ */
88 67
@@ -91,19 +70,15 @@ static inline void CSYNC (void)
91#define ssync(x) SSYNC(x) 70#define ssync(x) SSYNC(x)
92#define csync(x) CSYNC(x) 71#define csync(x) CSYNC(x)
93 72
94#if defined(ANOMALY_05000312) && defined(ANOMALY_05000244) 73#if ANOMALY_05000312
95#define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch; 74#define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch;
96#define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch; 75#define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch;
97 76
98#elif defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) 77#elif ANOMALY_05000244
99#define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch;
100#define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch;
101
102#elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244)
103#define SSYNC(scratch) nop; nop; nop; SSYNC; 78#define SSYNC(scratch) nop; nop; nop; SSYNC;
104#define CSYNC(scratch) nop; nop; nop; CSYNC; 79#define CSYNC(scratch) nop; nop; nop; CSYNC;
105 80
106#elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244) 81#else
107#define SSYNC(scratch) SSYNC; 82#define SSYNC(scratch) SSYNC;
108#define CSYNC(scratch) CSYNC; 83#define CSYNC(scratch) CSYNC;
109 84
@@ -111,4 +86,7 @@ static inline void CSYNC (void)
111 86
112#endif /* __ASSEMBLY__ */ 87#endif /* __ASSEMBLY__ */
113 88
89#include <asm/mach/blackfin.h>
90#include <asm/bfin-global.h>
91
114#endif /* _BLACKFIN_H_ */ 92#endif /* _BLACKFIN_H_ */
diff --git a/include/asm-blackfin/cacheflush.h b/include/asm-blackfin/cacheflush.h
index e5e000de3c36..d81a77545a04 100644
--- a/include/asm-blackfin/cacheflush.h
+++ b/include/asm-blackfin/cacheflush.h
@@ -48,9 +48,9 @@ extern void blackfin_dflush_page(void *);
48 48
49static inline void flush_icache_range(unsigned start, unsigned end) 49static inline void flush_icache_range(unsigned start, unsigned end)
50{ 50{
51#if defined(CONFIG_BLKFIN_DCACHE) && defined(CONFIG_BLKFIN_CACHE) 51#if defined(CONFIG_BFIN_DCACHE) && defined(CONFIG_BFIN_ICACHE)
52 52
53# if defined(CONFIG_BLKFIN_WT) 53# if defined(CONFIG_BFIN_WT)
54 blackfin_icache_flush_range((start), (end)); 54 blackfin_icache_flush_range((start), (end));
55# else 55# else
56 blackfin_icache_dcache_flush_range((start), (end)); 56 blackfin_icache_dcache_flush_range((start), (end));
@@ -58,10 +58,10 @@ static inline void flush_icache_range(unsigned start, unsigned end)
58 58
59#else 59#else
60 60
61# if defined(CONFIG_BLKFIN_CACHE) 61# if defined(CONFIG_BFIN_ICACHE)
62 blackfin_icache_flush_range((start), (end)); 62 blackfin_icache_flush_range((start), (end));
63# endif 63# endif
64# if defined(CONFIG_BLKFIN_DCACHE) 64# if defined(CONFIG_BFIN_DCACHE)
65 blackfin_dcache_flush_range((start), (end)); 65 blackfin_dcache_flush_range((start), (end));
66# endif 66# endif
67 67
@@ -74,12 +74,12 @@ do { memcpy(dst, src, len); \
74} while (0) 74} while (0)
75#define copy_from_user_page(vma, page, vaddr, dst, src, len) memcpy(dst, src, len) 75#define copy_from_user_page(vma, page, vaddr, dst, src, len) memcpy(dst, src, len)
76 76
77#if defined(CONFIG_BLKFIN_DCACHE) 77#if defined(CONFIG_BFIN_DCACHE)
78# define invalidate_dcache_range(start,end) blackfin_dcache_invalidate_range((start), (end)) 78# define invalidate_dcache_range(start,end) blackfin_dcache_invalidate_range((start), (end))
79#else 79#else
80# define invalidate_dcache_range(start,end) do { } while (0) 80# define invalidate_dcache_range(start,end) do { } while (0)
81#endif 81#endif
82#if defined(CONFIG_BLKFIN_DCACHE) && defined(CONFIG_BLKFIN_WB) 82#if defined(CONFIG_BFIN_DCACHE) && defined(CONFIG_BFIN_WB)
83# define flush_dcache_range(start,end) blackfin_dcache_flush_range((start), (end)) 83# define flush_dcache_range(start,end) blackfin_dcache_flush_range((start), (end))
84# define flush_dcache_page(page) blackfin_dflush_page(page_address(page)) 84# define flush_dcache_page(page) blackfin_dflush_page(page_address(page))
85#else 85#else
@@ -87,4 +87,4 @@ do { memcpy(dst, src, len); \
87# define flush_dcache_page(page) do { } while (0) 87# define flush_dcache_page(page) do { } while (0)
88#endif 88#endif
89 89
90#endif /* _BLACKFIN_CACHEFLUSH_H */ 90#endif /* _BLACKFIN_ICACHEFLUSH_H */
diff --git a/include/asm-blackfin/cplb.h b/include/asm-blackfin/cplb.h
index e0dd56bfa4c7..06828d77a58f 100644
--- a/include/asm-blackfin/cplb.h
+++ b/include/asm-blackfin/cplb.h
@@ -1,17 +1,100 @@
1/************************************************************************ 1/*
2 * File: include/asm-blackfin/cplb.h
3 * Based on: include/asm-blackfin/mach-bf537/bf537.h
4 * Author: Robin Getz <rgetz@blackfin.uclinux.org>
2 * 5 *
3 * cplb.h 6 * Created: 2000
7 * Description: Common CPLB definitions for CPLB init
4 * 8 *
5 * (c) Copyright 2002-2003 Analog Devices, Inc. All rights reserved. 9 * Modified:
10 * Copyright 2004-2007 Analog Devices Inc.
6 * 11 *
7 ************************************************************************/ 12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
8 13 *
9/* Defines necessary for cplb initialisation routines. */ 14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
10 29
11#ifndef _CPLB_H 30#ifndef _CPLB_H
12#define _CPLB_H 31#define _CPLB_H
13 32
14# include <asm/blackfin.h> 33#include <asm/blackfin.h>
34#include <asm/mach/anomaly.h>
35
36#define SDRAM_IGENERIC (CPLB_L1_CHBL | CPLB_USER_RD | CPLB_VALID | CPLB_PORTPRIO)
37#define SDRAM_IKERNEL (SDRAM_IGENERIC | CPLB_LOCK)
38#define L1_IMEMORY ( CPLB_USER_RD | CPLB_VALID | CPLB_LOCK)
39#define SDRAM_INON_CHBL ( CPLB_USER_RD | CPLB_VALID)
40
41/*Use the menuconfig cache policy here - CONFIG_BFIN_WT/CONFIG_BFIN_WB*/
42
43#if ANOMALY_05000158
44#define ANOMALY_05000158_WORKAROUND 0x200
45#else
46#define ANOMALY_05000158_WORKAROUND 0x0
47#endif
48
49#define CPLB_COMMON (CPLB_DIRTY | CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND)
50
51#ifdef CONFIG_BFIN_WB /*Write Back Policy */
52#define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_COMMON)
53#else /*Write Through */
54#define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW | CPLB_COMMON)
55#endif
56
57#define L1_DMEMORY (CPLB_LOCK | CPLB_COMMON)
58#define L2_MEMORY (CPLB_COMMON)
59#define SDRAM_DNON_CHBL (CPLB_COMMON)
60#define SDRAM_EBIU (CPLB_COMMON)
61#define SDRAM_OOPS (CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY)
62
63#define SIZE_1K 0x00000400 /* 1K */
64#define SIZE_4K 0x00001000 /* 4K */
65#define SIZE_1M 0x00100000 /* 1M */
66#define SIZE_4M 0x00400000 /* 4M */
67
68#define MAX_CPLBS (16 * 2)
69
70#define ASYNC_MEMORY_CPLB_COVERAGE ((ASYNC_BANK0_SIZE + ASYNC_BANK1_SIZE + \
71 ASYNC_BANK2_SIZE + ASYNC_BANK3_SIZE) / SIZE_4M)
72
73/*
74* Number of required data CPLB switchtable entries
75* MEMSIZE / 4 (we mostly install 4M page size CPLBs
76* approx 16 for smaller 1MB page size CPLBs for allignment purposes
77* 1 for L1 Data Memory
78* possibly 1 for L2 Data Memory
79* 1 for CONFIG_DEBUG_HUNT_FOR_ZERO
80* 1 for ASYNC Memory
81*/
82
83
84#define MAX_SWITCH_D_CPLBS (((CONFIG_MEM_SIZE / 4) + 16 + 1 + 1 + 1 \
85 + ASYNC_MEMORY_CPLB_COVERAGE) * 2)
86
87/*
88* Number of required instruction CPLB switchtable entries
89* MEMSIZE / 4 (we mostly install 4M page size CPLBs
90* approx 12 for smaller 1MB page size CPLBs for allignment purposes
91* 1 for L1 Instruction Memory
92* possibly 1 for L2 Instruction Memory
93* 1 for CONFIG_DEBUG_HUNT_FOR_ZERO
94*/
95
96#define MAX_SWITCH_I_CPLBS (((CONFIG_MEM_SIZE / 4) + 12 + 1 + 1 + 1) * 2)
97
15 98
16#define CPLB_ENABLE_ICACHE_P 0 99#define CPLB_ENABLE_ICACHE_P 0
17#define CPLB_ENABLE_DCACHE_P 1 100#define CPLB_ENABLE_DCACHE_P 1
@@ -39,8 +122,6 @@
39#define CPLB_DEF_CACHE CPLB_L1_CHBL | CPLB_WT 122#define CPLB_DEF_CACHE CPLB_L1_CHBL | CPLB_WT
40#define CPLB_CACHE_ENABLED CPLB_L1_CHBL | CPLB_DIRTY 123#define CPLB_CACHE_ENABLED CPLB_L1_CHBL | CPLB_DIRTY
41 124
42#define CPLB_ALL_ACCESS CPLB_SUPV_WR | CPLB_USER_RD | CPLB_USER_WR
43
44#define CPLB_I_PAGE_MGMT CPLB_LOCK | CPLB_VALID 125#define CPLB_I_PAGE_MGMT CPLB_LOCK | CPLB_VALID
45#define CPLB_D_PAGE_MGMT CPLB_LOCK | CPLB_ALL_ACCESS | CPLB_VALID 126#define CPLB_D_PAGE_MGMT CPLB_LOCK | CPLB_ALL_ACCESS | CPLB_VALID
46#define CPLB_DNOCACHE CPLB_ALL_ACCESS | CPLB_VALID 127#define CPLB_DNOCACHE CPLB_ALL_ACCESS | CPLB_VALID
diff --git a/include/asm-blackfin/dma.h b/include/asm-blackfin/dma.h
index be0d913e5516..b42a531e7a1b 100644
--- a/include/asm-blackfin/dma.h
+++ b/include/asm-blackfin/dma.h
@@ -152,6 +152,7 @@ struct dma_channel {
152/* functions to set register mode */ 152/* functions to set register mode */
153void set_dma_start_addr(unsigned int channel, unsigned long addr); 153void set_dma_start_addr(unsigned int channel, unsigned long addr);
154void set_dma_next_desc_addr(unsigned int channel, unsigned long addr); 154void set_dma_next_desc_addr(unsigned int channel, unsigned long addr);
155void set_dma_curr_desc_addr(unsigned int channel, unsigned long addr);
155void set_dma_x_count(unsigned int channel, unsigned short x_count); 156void set_dma_x_count(unsigned int channel, unsigned short x_count);
156void set_dma_x_modify(unsigned int channel, short x_modify); 157void set_dma_x_modify(unsigned int channel, short x_modify);
157void set_dma_y_count(unsigned int channel, unsigned short y_count); 158void set_dma_y_count(unsigned int channel, unsigned short y_count);
@@ -159,6 +160,7 @@ void set_dma_y_modify(unsigned int channel, short y_modify);
159void set_dma_config(unsigned int channel, unsigned short config); 160void set_dma_config(unsigned int channel, unsigned short config);
160unsigned short set_bfin_dma_config(char direction, char flow_mode, 161unsigned short set_bfin_dma_config(char direction, char flow_mode,
161 char intr_mode, char dma_mode, char width); 162 char intr_mode, char dma_mode, char width);
163void set_dma_curr_addr(unsigned int channel, unsigned long addr);
162 164
163/* get curr status for polling */ 165/* get curr status for polling */
164unsigned short get_dma_curr_irqstat(unsigned int channel); 166unsigned short get_dma_curr_irqstat(unsigned int channel);
diff --git a/include/asm-blackfin/early_printk.h b/include/asm-blackfin/early_printk.h
new file mode 100644
index 000000000000..110f1c1f845c
--- /dev/null
+++ b/include/asm-blackfin/early_printk.h
@@ -0,0 +1,28 @@
1/*
2 * File: include/asm-blackfin/early_printk.h
3 * Author: Robin Getz <rgetz@blackfin.uclinux.org
4 *
5 * Created: 14Aug2007
6 * Description: function prototpyes for early printk
7 *
8 * Modified:
9 * Copyright 2004-2007 Analog Devices Inc.
10 *
11 * Bugs: Enter bugs at http://blackfin.uclinux.org/
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 */
23
24#ifdef CONFIG_EARLY_PRINTK
25extern int setup_early_printk(char *);
26#else
27#define setup_early_printk(fmt) do { } while (0)
28#endif /* CONFIG_EARLY_PRINTK */
diff --git a/include/asm-blackfin/gpio.h b/include/asm-blackfin/gpio.h
index 7480cfa7e2d6..dd203cd93796 100644
--- a/include/asm-blackfin/gpio.h
+++ b/include/asm-blackfin/gpio.h
@@ -144,6 +144,24 @@
144 144
145#ifdef BF533_FAMILY 145#ifdef BF533_FAMILY
146#define MAX_BLACKFIN_GPIOS 16 146#define MAX_BLACKFIN_GPIOS 16
147
148#define GPIO_PF0 0
149#define GPIO_PF1 1
150#define GPIO_PF2 2
151#define GPIO_PF3 3
152#define GPIO_PF4 4
153#define GPIO_PF5 5
154#define GPIO_PF6 6
155#define GPIO_PF7 7
156#define GPIO_PF8 8
157#define GPIO_PF9 9
158#define GPIO_PF10 10
159#define GPIO_PF11 11
160#define GPIO_PF12 12
161#define GPIO_PF13 13
162#define GPIO_PF14 14
163#define GPIO_PF15 15
164
147#endif 165#endif
148 166
149#ifdef BF537_FAMILY 167#ifdef BF537_FAMILY
@@ -421,6 +439,19 @@ unsigned short gpio_get_value(unsigned short gpio);
421void gpio_direction_input(unsigned short gpio); 439void gpio_direction_input(unsigned short gpio);
422void gpio_direction_output(unsigned short gpio); 440void gpio_direction_output(unsigned short gpio);
423 441
442#include <asm-generic/gpio.h> /* cansleep wrappers */
443#include <asm/irq.h>
444
445static inline int gpio_to_irq(unsigned gpio)
446{
447 return (gpio + GPIO_IRQ_BASE);
448}
449
450static inline int irq_to_gpio(unsigned irq)
451{
452 return (irq - GPIO_IRQ_BASE);
453}
454
424#endif /* __ASSEMBLY__ */ 455#endif /* __ASSEMBLY__ */
425 456
426#endif /* __ARCH_BLACKFIN_GPIO_H__ */ 457#endif /* __ARCH_BLACKFIN_GPIO_H__ */
diff --git a/include/asm-blackfin/io.h b/include/asm-blackfin/io.h
index 142cb333db29..525179bf43d7 100644
--- a/include/asm-blackfin/io.h
+++ b/include/asm-blackfin/io.h
@@ -115,21 +115,21 @@ static inline unsigned int readl(const volatile void __iomem *addr)
115 115
116#ifndef __ASSEMBLY__ 116#ifndef __ASSEMBLY__
117 117
118extern void outsb(void __iomem *port, const void *addr, unsigned short count); 118extern void outsb(unsigned long port, const void *addr, unsigned long count);
119extern void outsw(void __iomem *port, const void *addr, unsigned short count); 119extern void outsw(unsigned long port, const void *addr, unsigned long count);
120extern void outsl(void __iomem *port, const void *addr, unsigned short count); 120extern void outsl(unsigned long port, const void *addr, unsigned long count);
121 121
122extern void insb(const void __iomem *port, void *addr, unsigned short count); 122extern void insb(unsigned long port, void *addr, unsigned long count);
123extern void insw(const void __iomem *port, void *addr, unsigned short count); 123extern void insw(unsigned long port, void *addr, unsigned long count);
124extern void insl(const void __iomem *port, void *addr, unsigned short count); 124extern void insl(unsigned long port, void *addr, unsigned long count);
125 125
126extern void dma_outsb(void __iomem *port, const void *addr, unsigned short count); 126extern void dma_outsb(unsigned long port, const void *addr, unsigned short count);
127extern void dma_outsw(void __iomem *port, const void *addr, unsigned short count); 127extern void dma_outsw(unsigned long port, const void *addr, unsigned short count);
128extern void dma_outsl(void __iomem *port, const void *addr, unsigned short count); 128extern void dma_outsl(unsigned long port, const void *addr, unsigned short count);
129 129
130extern void dma_insb(const void __iomem *port, void *addr, unsigned short count); 130extern void dma_insb(unsigned long port, void *addr, unsigned short count);
131extern void dma_insw(const void __iomem *port, void *addr, unsigned short count); 131extern void dma_insw(unsigned long port, void *addr, unsigned short count);
132extern void dma_insl(const void __iomem *port, void *addr, unsigned short count); 132extern void dma_insl(unsigned long port, void *addr, unsigned short count);
133 133
134/* 134/*
135 * Map some physical address range into the kernel address space. 135 * Map some physical address range into the kernel address space.
diff --git a/include/asm-blackfin/ioctls.h b/include/asm-blackfin/ioctls.h
index 8356204151db..895e3173165d 100644
--- a/include/asm-blackfin/ioctls.h
+++ b/include/asm-blackfin/ioctls.h
@@ -47,8 +47,13 @@
47#define TIOCSBRK 0x5427 /* BSD compatibility */ 47#define TIOCSBRK 0x5427 /* BSD compatibility */
48#define TIOCCBRK 0x5428 /* BSD compatibility */ 48#define TIOCCBRK 0x5428 /* BSD compatibility */
49#define TIOCGSID 0x5429 /* Return the session ID of FD */ 49#define TIOCGSID 0x5429 /* Return the session ID of FD */
50#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ 50#define TCGETS2 _IOR('T', 0x2A, struct termios2)
51#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ 51#define TCSETS2 _IOW('T', 0x2B, struct termios2)
52#define TCSETSW2 _IOW('T', 0x2C, struct termios2)
53#define TCSETSF2 _IOW('T', 0x2D, struct termios2)
54/* Get Pty Number (of pty-mux device) */
55#define TIOCGPTN _IOR('T', 0x30, unsigned int)
56#define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */
52 57
53#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ 58#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
54#define FIOCLEX 0x5451 59#define FIOCLEX 0x5451
diff --git a/include/asm-blackfin/irq_handler.h b/include/asm-blackfin/irq_handler.h
index d830f0a49a1c..139b5208f9d8 100644
--- a/include/asm-blackfin/irq_handler.h
+++ b/include/asm-blackfin/irq_handler.h
@@ -1,13 +1,15 @@
1#ifndef _IRQ_HANDLER_H 1#ifndef _IRQ_HANDLER_H
2#define _IRQ_HANDLER_H 2#define _IRQ_HANDLER_H
3 3
4#include <linux/types.h>
5#include <linux/linkage.h>
6
4/* BASE LEVEL interrupt handler routines */ 7/* BASE LEVEL interrupt handler routines */
5asmlinkage void evt_emulation(void);
6asmlinkage void evt_exception(void); 8asmlinkage void evt_exception(void);
7asmlinkage void trap(void); 9asmlinkage void trap(void);
8asmlinkage void evt_ivhw(void); 10asmlinkage void evt_ivhw(void);
9asmlinkage void evt_timer(void); 11asmlinkage void evt_timer(void);
10asmlinkage void evt_evt2(void); 12asmlinkage void evt_nmi(void);
11asmlinkage void evt_evt7(void); 13asmlinkage void evt_evt7(void);
12asmlinkage void evt_evt8(void); 14asmlinkage void evt_evt8(void);
13asmlinkage void evt_evt9(void); 15asmlinkage void evt_evt9(void);
@@ -18,5 +20,14 @@ asmlinkage void evt_evt13(void);
18asmlinkage void evt_soft_int1(void); 20asmlinkage void evt_soft_int1(void);
19asmlinkage void evt_system_call(void); 21asmlinkage void evt_system_call(void);
20asmlinkage void init_exception_buff(void); 22asmlinkage void init_exception_buff(void);
23asmlinkage void trap_c(struct pt_regs *fp);
24asmlinkage void ex_replaceable(void);
25asmlinkage void early_trap(void);
26
27extern void *ex_table[];
28extern void return_from_exception(void);
29
30extern int bfin_request_exception(unsigned int exception, void (*handler)(void));
31extern int bfin_free_exception(unsigned int exception, void (*handler)(void));
21 32
22#endif 33#endif
diff --git a/include/asm-blackfin/kgdb.h b/include/asm-blackfin/kgdb.h
index 532bd9052004..0f73847fd6bc 100644
--- a/include/asm-blackfin/kgdb.h
+++ b/include/asm-blackfin/kgdb.h
@@ -179,5 +179,6 @@ enum regnames {
179#define STATDA1 0x80 179#define STATDA1 0x80
180 180
181extern void kgdb_print(const char *fmt, ...); 181extern void kgdb_print(const char *fmt, ...);
182extern void init_kgdb_uart(void);
182 183
183#endif 184#endif
diff --git a/include/asm-blackfin/mach-bf527/anomaly.h b/include/asm-blackfin/mach-bf527/anomaly.h
new file mode 100644
index 000000000000..991db986cd4b
--- /dev/null
+++ b/include/asm-blackfin/mach-bf527/anomaly.h
@@ -0,0 +1,41 @@
1/*
2 * File: include/asm-blackfin/mach-bf527/anomaly.h
3 * Bugs: Enter bugs at http://blackfin.uclinux.org/
4 *
5 * Copyright (C) 2004-2007 Analog Devices Inc.
6 * Licensed under the GPL-2 or later.
7 */
8
9/* This file shoule be up to date with:
10 * - Revision A, May 30, 2007; ADSP-BF527 Blackfin Processor Anomaly List
11 */
12
13#ifndef _MACH_ANOMALY_H_
14#define _MACH_ANOMALY_H_
15
16/* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */
17#define ANOMALY_05000074 (1)
18/* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */
19#define ANOMALY_05000119 (1)
20/* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */
21#define ANOMALY_05000122 (1)
22/* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */
23#define ANOMALY_05000245 (1)
24/* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */
25#define ANOMALY_05000265 (1)
26/* Memory-To-Memory DMA Source/Destination Descriptors Must Be in Same Memory Space */
27#define ANOMALY_05000301 (1)
28/* Errors When SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */
29#define ANOMALY_05000312 (1)
30/* Incorrect Access of OTP_STATUS During otp_write() Function */
31#define ANOMALY_05000328 (1)
32/* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */
33#define ANOMALY_05000337 (1)
34/* TWI Does Not Operate Correctly Under Certain Signal Termination Conditions */
35#define ANOMALY_05000342 (1)
36/* Boot ROM Kernel Incorrectly Alters Reset Value of USB Register */
37#define ANOMALY_05000347 (1)
38
39/* Anomalies that don't exist on this proc */
40#define ANOMALY_05000323 (0)
41#endif
diff --git a/include/asm-blackfin/mach-bf527/defBF52x_base.h b/include/asm-blackfin/mach-bf527/defBF52x_base.h
index 0b2fb5036ed0..b1ff67db01f8 100644
--- a/include/asm-blackfin/mach-bf527/defBF52x_base.h
+++ b/include/asm-blackfin/mach-bf527/defBF52x_base.h
@@ -102,6 +102,7 @@
102 102
103 103
104/* SPI Controller (0xFFC00500 - 0xFFC005FF) */ 104/* SPI Controller (0xFFC00500 - 0xFFC005FF) */
105#define SPI0_REGBASE 0xFFC00500
105#define SPI_CTL 0xFFC00500 /* SPI Control Register */ 106#define SPI_CTL 0xFFC00500 /* SPI Control Register */
106#define SPI_FLG 0xFFC00504 /* SPI Flag register */ 107#define SPI_FLG 0xFFC00504 /* SPI Flag register */
107#define SPI_STAT 0xFFC00508 /* SPI Status register */ 108#define SPI_STAT 0xFFC00508 /* SPI Status register */
@@ -480,6 +481,7 @@
480 481
481 482
482/* Two-Wire Interface (0xFFC01400 - 0xFFC014FF) */ 483/* Two-Wire Interface (0xFFC01400 - 0xFFC014FF) */
484#define TWI0_REGBASE 0xFFC01400
483#define TWI_CLKDIV 0xFFC01400 /* Serial Clock Divider Register */ 485#define TWI_CLKDIV 0xFFC01400 /* Serial Clock Divider Register */
484#define TWI_CONTROL 0xFFC01404 /* TWI Control Register */ 486#define TWI_CONTROL 0xFFC01404 /* TWI Control Register */
485#define TWI_SLAVE_CTL 0xFFC01408 /* Slave Mode Control Register */ 487#define TWI_SLAVE_CTL 0xFFC01408 /* Slave Mode Control Register */
diff --git a/include/asm-blackfin/mach-bf533/anomaly.h b/include/asm-blackfin/mach-bf533/anomaly.h
index 7302f290b93d..f36ff5af1b91 100644
--- a/include/asm-blackfin/mach-bf533/anomaly.h
+++ b/include/asm-blackfin/mach-bf533/anomaly.h
@@ -1,247 +1,259 @@
1/* 1/*
2 * File: include/asm-blackfin/mach-bf533/anomaly.h 2 * File: include/asm-blackfin/mach-bf533/anomaly.h
3 * Based on: 3 * Bugs: Enter bugs at http://blackfin.uclinux.org/
4 * Author:
5 * 4 *
6 * Created: 5 * Copyright (C) 2004-2007 Analog Devices Inc.
7 * Description: 6 * Licensed under the GPL-2 or later.
8 *
9 * Rev:
10 *
11 * Modified:
12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; see the file COPYING.
27 * If not, write to the Free Software Foundation,
28 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 */ 7 */
30 8
31/* This file shoule be up to date with: 9/* This file shoule be up to date with:
32 * - Revision U, May 17, 2006; ADSP-BF533 Blackfin Processor Anomaly List 10 * - Revision X, March 23, 2007; ADSP-BF533 Blackfin Processor Anomaly List
33 * - Revision Y, May 17, 2006; ADSP-BF532 Blackfin Processor Anomaly List 11 * - Revision AB, March 23, 2007; ADSP-BF532 Blackfin Processor Anomaly List
34 * - Revision T, May 17, 2006; ADSP-BF531 Blackfin Processor Anomaly List 12 * - Revision W, March 23, 2007; ADSP-BF531 Blackfin Processor Anomaly List
35 */ 13 */
36 14
37#ifndef _MACH_ANOMALY_H_ 15#ifndef _MACH_ANOMALY_H_
38#define _MACH_ANOMALY_H_ 16#define _MACH_ANOMALY_H_
39 17
40/* We do not support 0.1 or 0.2 silicon - sorry */ 18/* We do not support 0.1 or 0.2 silicon - sorry */
41#if (defined(CONFIG_BF_REV_0_1) || defined(CONFIG_BF_REV_0_2)) 19#if __SILICON_REVISION__ < 3
42#error Kernel will not work on BF533 Version 0.1 or 0.2 20# error Kernel will not work on BF533 silicon version 0.0, 0.1, or 0.2
43#endif 21#endif
44 22
45/* Issues that are common to 0.5, 0.4, and 0.3 silicon */ 23#if defined(__ADSPBF531__)
46#if (defined(CONFIG_BF_REV_0_5) || defined(CONFIG_BF_REV_0_4) \ 24# define ANOMALY_BF531 1
47 || defined(CONFIG_BF_REV_0_3)) 25#else
48#define ANOMALY_05000074 /* A multi issue instruction with dsp32shiftimm in 26# define ANOMALY_BF531 0
49 slot1 and store of a P register in slot 2 is not 27#endif
50 supported */ 28#if defined(__ADSPBF532__)
51#define ANOMALY_05000105 /* Watchpoint Status Register (WPSTAT) bits are set on 29# define ANOMALY_BF532 1
52 every corresponding match */ 30#else
53#define ANOMALY_05000119 /* DMA_RUN bit is not valid after a Peripheral Receive 31# define ANOMALY_BF532 0
54 Channel DMA stops */ 32#endif
55#define ANOMALY_05000122 /* Rx.H can not be used to access 16-bit System MMR 33#if defined(__ADSPBF533__)
56 registers. */ 34# define ANOMALY_BF533 1
57#define ANOMALY_05000166 /* PPI Data Lengths Between 8 and 16 do not zero out 35#else
58 upper bits*/ 36# define ANOMALY_BF533 0
59#define ANOMALY_05000167 /* Turning Serial Ports on With External Frame Syncs */ 37#endif
60#define ANOMALY_05000180 /* PPI_DELAY not functional in PPI modes with 0 frame
61 syncs */
62#define ANOMALY_05000208 /* VSTAT status bit in PLL_STAT register is not
63 functional */
64#define ANOMALY_05000219 /* NMI event at boot time results in unpredictable
65 state */
66#define ANOMALY_05000229 /* SPI Slave Boot Mode modifies registers */
67#define ANOMALY_05000272 /* Certain data cache write through modes fail for
68 VDDint <=0.9V */
69#define ANOMALY_05000273 /* Writes to Synchronous SDRAM memory may be lost */
70#define ANOMALY_05000277 /* Writes to a flag data register one SCLK cycle after
71 an edge is detected may clear interrupt */
72#define ANOMALY_05000278 /* Disabling Peripherals with DMA running may cause
73 DMA system instability */
74#define ANOMALY_05000281 /* False Hardware Error Exception when ISR context is
75 not restored */
76#define ANOMALY_05000282 /* Memory DMA corruption with 32-bit data and traffic
77 control */
78#define ANOMALY_05000283 /* A system MMR write is stalled indefinitely when
79 killed in a particular stage*/
80#define ANOMALY_05000311 /* Erroneous flag pin operations under specific
81 sequences */
82#define ANOMALY_05000312 /* Errors when SSYNC, CSYNC, or loads to LT, LB and LC
83 registers are interrupted */
84#define ANOMALY_05000313 /* PPI Is Level-Sensitive on First Transfer */
85#define ANOMALY_05000315 /* Killed System MMR Write Completes Erroneously On
86 * Next System MMR Access */
87#define ANOMALY_05000319 /* Internal Voltage Regulator Values of 1.05V, 1.10V
88 * and 1.15V Not Allowed for LQFP Packages */
89#endif /* Issues that are common to 0.5, 0.4, and 0.3 silicon */
90 38
91/* These issues only occur on 0.3 or 0.4 BF533 */ 39/* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot 2 Not Supported */
92#if (defined(CONFIG_BF_REV_0_4) || defined(CONFIG_BF_REV_0_3)) 40#define ANOMALY_05000074 (1)
93#define ANOMALY_05000099 /* UART Line Status Register (UART_LSR) bits are not 41/* UART Line Status Register (UART_LSR) Bits Are Not Updated at the Same Time */
94 updated at the same time. */ 42#define ANOMALY_05000099 (__SILICON_REVISION__ < 5)
95#define ANOMALY_05000158 /* Boot fails when data cache enabled: Data from a Data 43/* Watchpoint Status Register (WPSTAT) Bits Are Set on Every Corresponding Match */
96 Cache Fill can be corrupted after or during 44#define ANOMALY_05000105 (1)
97 Instruction DMA if certain core stalls exist */ 45/* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */
98#define ANOMALY_05000179 /* PPI_COUNT cannot be programmed to 0 in General 46#define ANOMALY_05000119 (1)
99 Purpose TX or RX modes */ 47/* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */
100#define ANOMALY_05000198 /* Failing SYSTEM MMR accesses when stalled by 48#define ANOMALY_05000122 (1)
101 preceding memory read */ 49/* Instruction DMA Can Cause Data Cache Fills to Fail (Boot Implications) */
102#define ANOMALY_05000200 /* SPORT TFS and DT are incorrectly driven during 50#define ANOMALY_05000158 (__SILICON_REVISION__ < 5)
103 inactive channels in certain conditions */ 51/* PPI Data Lengths Between 8 and 16 Do Not Zero Out Upper Bits */
104#define ANOMALY_05000202 /* Possible infinite stall with specific dual dag 52#define ANOMALY_05000166 (1)
105 situation */ 53/* Turning Serial Ports on with External Frame Syncs */
106#define ANOMALY_05000215 /* UART TX Interrupt masked erroneously */ 54#define ANOMALY_05000167 (1)
107#define ANOMALY_05000225 /* Incorrect pulse-width of UART start-bit */ 55/* PPI_COUNT Cannot Be Programmed to 0 in General Purpose TX or RX Modes */
108#define ANOMALY_05000227 /* Scratchpad memory bank reads may return incorrect 56#define ANOMALY_05000179 (__SILICON_REVISION__ < 5)
109 data*/ 57/* PPI_DELAY Not Functional in PPI Modes with 0 Frame Syncs */
110#define ANOMALY_05000230 /* UART Receiver is less robust against Baudrate 58#define ANOMALY_05000180 (1)
111 Differences in certain Conditions */ 59/* Timer Pin Limitations for PPI TX Modes with External Frame Syncs */
112#define ANOMALY_05000231 /* UART STB bit incorrectly affects receiver setting */ 60#define ANOMALY_05000183 (__SILICON_REVISION__ < 4)
113#define ANOMALY_05000242 /* DF bit in PLL_CTL register does not respond to 61/* False Protection Exceptions */
114 hardware reset */ 62#define ANOMALY_05000189 (__SILICON_REVISION__ < 4)
115#define ANOMALY_05000244 /* With instruction cache enabled, a CSYNC or SSYNC or 63/* False I/O Pin Interrupts on Edge-Sensitive Inputs When Polarity Setting Is Changed */
116 IDLE around a Change of Control causes 64#define ANOMALY_05000193 (__SILICON_REVISION__ < 4)
117 unpredictable results */ 65/* Restarting SPORT in Specific Modes May Cause Data Corruption */
118#define ANOMALY_05000245 /* Spurious Hardware Error from an access in the 66#define ANOMALY_05000194 (__SILICON_REVISION__ < 4)
119 shadow of a conditional branch */ 67/* Failing MMR Accesses When Stalled by Preceding Memory Read */
120#define ANOMALY_05000246 /* Data CPLB's should prevent spurious hardware 68#define ANOMALY_05000198 (__SILICON_REVISION__ < 5)
121 errors */ 69/* Current DMA Address Shows Wrong Value During Carry Fix */
122#define ANOMALY_05000253 /* Maximum external clock speed for Timers */ 70#define ANOMALY_05000199 (__SILICON_REVISION__ < 4)
123#define ANOMALY_05000255 /* Entering Hibernate Mode with RTC Seconds event 71/* SPORT TFS and DT Are Incorrectly Driven During Inactive Channels in Certain Conditions */
124 interrupt not functional */ 72#define ANOMALY_05000200 (__SILICON_REVISION__ < 5)
125#define ANOMALY_05000257 /* An interrupt or exception during short Hardware 73/* Receive Frame Sync Not Ignored During Active Frames in SPORT Multi-Channel Mode */
126 loops may cause the instruction fetch unit to 74#define ANOMALY_05000201 (__SILICON_REVISION__ < 4)
127 malfunction */ 75/* Possible Infinite Stall with Specific Dual-DAG Situation */
128#define ANOMALY_05000258 /* Instruction Cache is corrupted when bit 9 and 12 of 76#define ANOMALY_05000202 (__SILICON_REVISION__ < 5)
129 the ICPLB Data registers differ */ 77/* Specific Sequence That Can Cause DMA Error or DMA Stopping */
130#define ANOMALY_05000260 /* ICPLB_STATUS MMR register may be corrupted */ 78#define ANOMALY_05000203 (__SILICON_REVISION__ < 4)
131#define ANOMALY_05000261 /* DCPLB_FAULT_ADDR MMR register may be corrupted */ 79/* Incorrect data read with write-through cache and allocate cache lines on reads only mode */
132#define ANOMALY_05000262 /* Stores to data cache may be lost */ 80#define ANOMALY_05000204 (__SILICON_REVISION__ < 4 && ANOMALY_BF533)
133#define ANOMALY_05000263 /* Hardware loop corrupted when taking an ICPLB exception */ 81/* Recovery from "Brown-Out" Condition */
134#define ANOMALY_05000264 /* A Sync instruction (CSYNC, SSYNC) or an IDLE 82#define ANOMALY_05000207 (__SILICON_REVISION__ < 4)
135 instruction will cause an infinite stall in the 83/* VSTAT Status Bit in PLL_STAT Register Is Not Functional */
136 second to last instruction in a hardware loop */ 84#define ANOMALY_05000208 (1)
137#define ANOMALY_05000265 /* Sensitivity to noise with slow input edge rates on 85/* Speed Path in Computational Unit Affects Certain Instructions */
138 SPORT external receive and transmit clocks. */ 86#define ANOMALY_05000209 (__SILICON_REVISION__ < 4)
139#define ANOMALY_05000269 /* High I/O activity causes the output voltage of the 87/* UART TX Interrupt Masked Erroneously */
140 internal voltage regulator (VDDint) to increase. */ 88#define ANOMALY_05000215 (__SILICON_REVISION__ < 5)
141#define ANOMALY_05000270 /* High I/O activity causes the output voltage of the 89/* NMI Event at Boot Time Results in Unpredictable State */
142 internal voltage regulator (VDDint) to decrease */ 90#define ANOMALY_05000219 (1)
143#endif /* issues only occur on 0.3 or 0.4 BF533 */ 91/* Incorrect Pulse-Width of UART Start Bit */
92#define ANOMALY_05000225 (__SILICON_REVISION__ < 5)
93/* Scratchpad Memory Bank Reads May Return Incorrect Data */
94#define ANOMALY_05000227 (__SILICON_REVISION__ < 5)
95/* SPI Slave Boot Mode Modifies Registers from Reset Value */
96#define ANOMALY_05000229 (1)
97/* UART Receiver is Less Robust Against Baudrate Differences in Certain Conditions */
98#define ANOMALY_05000230 (__SILICON_REVISION__ < 5)
99/* UART STB Bit Incorrectly Affects Receiver Setting */
100#define ANOMALY_05000231 (__SILICON_REVISION__ < 5)
101/* PPI_FS3 Is Not Driven in 2 or 3 Internal Frame Sync Transmit Modes */
102#define ANOMALY_05000233 (__SILICON_REVISION__ < 4)
103/* Incorrect Revision Number in DSPID Register */
104#define ANOMALY_05000234 (__SILICON_REVISION__ == 4)
105/* DF Bit in PLL_CTL Register Does Not Respond to Hardware Reset */
106#define ANOMALY_05000242 (__SILICON_REVISION__ < 4)
107/* If I-Cache Is On, CSYNC/SSYNC/IDLE Around Change of Control Causes Failures */
108#define ANOMALY_05000244 (__SILICON_REVISION__ < 5)
109/* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */
110#define ANOMALY_05000245 (1)
111/* Data CPLBs Should Prevent Spurious Hardware Errors */
112#define ANOMALY_05000246 (__SILICON_REVISION__ < 5)
113/* Incorrect Bit Shift of Data Word in Multichannel (TDM) Mode in Certain Conditions */
114#define ANOMALY_05000250 (__SILICON_REVISION__ == 4)
115/* Maximum External Clock Speed for Timers */
116#define ANOMALY_05000253 (__SILICON_REVISION__ < 5)
117/* Incorrect Timer Pulse Width in Single-Shot PWM_OUT Mode with External Clock */
118#define ANOMALY_05000254 (__SILICON_REVISION__ > 4)
119/* Entering Hibernate State with RTC Seconds Interrupt Not Functional */
120#define ANOMALY_05000255 (__SILICON_REVISION__ < 5)
121/* Interrupt/Exception During Short Hardware Loop May Cause Bad Instruction Fetches */
122#define ANOMALY_05000257 (__SILICON_REVISION__ < 5)
123/* Instruction Cache Is Corrupted When Bits 9 and 12 of the ICPLB Data Registers Differ */
124#define ANOMALY_05000258 (__SILICON_REVISION__ < 5)
125/* ICPLB_STATUS MMR Register May Be Corrupted */
126#define ANOMALY_05000260 (__SILICON_REVISION__ < 5)
127/* DCPLB_FAULT_ADDR MMR Register May Be Corrupted */
128#define ANOMALY_05000261 (__SILICON_REVISION__ < 5)
129/* Stores To Data Cache May Be Lost */
130#define ANOMALY_05000262 (__SILICON_REVISION__ < 5)
131/* Hardware Loop Corrupted When Taking an ICPLB Exception */
132#define ANOMALY_05000263 (__SILICON_REVISION__ < 5)
133/* CSYNC/SSYNC/IDLE Causes Infinite Stall in Penultimate Instruction in Hardware Loop */
134#define ANOMALY_05000264 (__SILICON_REVISION__ < 5)
135/* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */
136#define ANOMALY_05000265 (__SILICON_REVISION__ < 5)
137/* High I/O Activity Causes Output Voltage of Internal Voltage Regulator (Vddint) to Increase */
138#define ANOMALY_05000269 (__SILICON_REVISION__ < 5)
139/* High I/O Activity Causes Output Voltage of Internal Voltage Regulator (Vddint) to Decrease */
140#define ANOMALY_05000270 (__SILICON_REVISION__ < 5)
141/* Spontaneous Reset of Internal Voltage Regulator */
142#define ANOMALY_05000271 (__SILICON_REVISION__ < 4)
143/* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */
144#define ANOMALY_05000272 (1)
145/* Writes to Synchronous SDRAM Memory May Be Lost */
146#define ANOMALY_05000273 (1)
147/* Timing Requirements Change for External Frame Sync PPI Modes with Non-Zero PPI_DELAY */
148#define ANOMALY_05000276 (1)
149/* Writes to an I/O Data Register One SCLK Cycle after an Edge Is Detected May Clear Interrupt */
150#define ANOMALY_05000277 (1)
151/* Disabling Peripherals with DMA Running May Cause DMA System Instability */
152#define ANOMALY_05000278 (1)
153/* False Hardware Error Exception When ISR Context Is Not Restored */
154#define ANOMALY_05000281 (1)
155/* Memory DMA Corruption with 32-Bit Data and Traffic Control */
156#define ANOMALY_05000282 (1)
157/* System MMR Write Is Stalled Indefinitely When Killed in a Particular Stage */
158#define ANOMALY_05000283 (1)
159/* SPORTs May Receive Bad Data If FIFOs Fill Up */
160#define ANOMALY_05000288 (1)
161/* Memory-To-Memory DMA Source/Destination Descriptors Must Be in Same Memory Space */
162#define ANOMALY_05000301 (1)
163/* SSYNCs After Writes To DMA MMR Registers May Not Be Handled Correctly */
164#define ANOMALY_05000302 (__SILICON_REVISION__ < 5)
165/* New Feature: Additional Hysteresis on SPORT Input Pins (Not Available On Older Silicon) */
166#define ANOMALY_05000305 (__SILICON_REVISION__ < 5)
167/* New Feature: Additional PPI Frame Sync Sampling Options (Not Available On Older Silicon) */
168#define ANOMALY_05000306 (__SILICON_REVISION__ < 5)
169/* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */
170#define ANOMALY_05000310 (1)
171/* Erroneous Flag (GPIO) Pin Operations under Specific Sequences */
172#define ANOMALY_05000311 (1)
173/* Errors When SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */
174#define ANOMALY_05000312 (1)
175/* PPI Is Level-Sensitive on First Transfer */
176#define ANOMALY_05000313 (1)
177/* Killed System MMR Write Completes Erroneously On Next System MMR Access */
178#define ANOMALY_05000315 (1)
179/* Internal Voltage Regulator Values of 1.05V, 1.10V and 1.15V Not Allowed for LQFP Packages */
180#define ANOMALY_05000319 (ANOMALY_BF531 || ANOMALY_BF532)
144 181
145/* These issues are only on 0.4 silicon */ 182/* These anomalies have been "phased" out of analog.com anomaly sheets and are
146#if (defined(CONFIG_BF_REV_0_4)) 183 * here to show running on older silicon just isn't feasible.
147#define ANOMALY_05000234 /* Incorrect Revision Number in DSPID Register */ 184 */
148#define ANOMALY_05000250 /* Incorrect Bit-Shift of Data Word in Multichannel
149 (TDM) */
150#endif /* issues are only on 0.4 silicon */
151 185
152/* These issues are only on 0.3 silicon */ 186/* Watchpoints (Hardware Breakpoints) are not supported */
153#if defined(CONFIG_BF_REV_0_3) 187#define ANOMALY_05000067 (__SILICON_REVISION__ < 3)
154#define ANOMALY_05000183 /* Timer Pin limitations for PPI TX Modes with 188/* Reserved bits in SYSCFG register not set at power on */
155 External Frame Syncs */ 189#define ANOMALY_05000109 (__SILICON_REVISION__ < 3)
156#define ANOMALY_05000189 /* False Protection Exceptions caused by Speculative 190/* Trace Buffers may record discontinuities into emulation mode and/or exception, NMI, reset handlers */
157 Instruction or Data Fetches, or by Fetches at the 191#define ANOMALY_05000116 (__SILICON_REVISION__ < 3)
158 boundary of reserved memory space */ 192/* DTEST_COMMAND initiated memory access may be incorrect if data cache or DMA is active */
159#define ANOMALY_05000193 /* False Flag Pin Interrupts on Edge Sensitive Inputs 193#define ANOMALY_05000123 (__SILICON_REVISION__ < 3)
160 when polarity setting is changed */ 194/* DMA Lock-up at CCLK to SCLK ratios of 4:1, 2:1, or 1:1 */
161#define ANOMALY_05000194 /* Sport Restarting in specific modes may cause data 195#define ANOMALY_05000124 (__SILICON_REVISION__ < 3)
162 corruption */ 196/* Erroneous exception when enabling cache */
163#define ANOMALY_05000199 /* DMA current address shows wrong value during carry 197#define ANOMALY_05000125 (__SILICON_REVISION__ < 3)
164 fix */ 198/* SPI clock polarity and phase bits incorrect during booting */
165#define ANOMALY_05000201 /* Receive frame sync not ignored during active 199#define ANOMALY_05000126 (__SILICON_REVISION__ < 3)
166 frames in sport MCM */ 200/* DMEM_CONTROL is not set on Reset */
167#define ANOMALY_05000203 /* Specific sequence that can cause DMA error or DMA 201#define ANOMALY_05000137 (__SILICON_REVISION__ < 3)
168 stopping */ 202/* SPI boot will not complete if there is a zero fill block in the loader file */
169#if defined(CONFIG_BF533) 203#define ANOMALY_05000138 (__SILICON_REVISION__ < 3)
170#define ANOMALY_05000204 /* Incorrect data read with write-through cache and 204/* Allowing the SPORT RX FIFO to fill will cause an overflow */
171 allocate cache lines on reads only mode */ 205#define ANOMALY_05000140 (__SILICON_REVISION__ < 3)
172#endif /* CONFIG_BF533 */ 206/* An Infinite Stall occurs with a particular sequence of consecutive dual dag events */
173#define ANOMALY_05000207 /* Recovery from "brown-out" condition */ 207#define ANOMALY_05000141 (__SILICON_REVISION__ < 3)
174#define ANOMALY_05000209 /* Speed-Path in computational unit affects certain 208/* Interrupts may be lost when a programmable input flag is configured to be edge sensitive */
175 instructions */ 209#define ANOMALY_05000142 (__SILICON_REVISION__ < 3)
176#define ANOMALY_05000233 /* PPI_FS3 is not driven in 2 or 3 internal Frame 210/* A read from external memory may return a wrong value with data cache enabled */
177 Sync Transmit Mode */ 211#define ANOMALY_05000143 (__SILICON_REVISION__ < 3)
178#define ANOMALY_05000271 /* Spontaneous reset of Internal Voltage Regulator */ 212/* DMA and TESTSET conflict when both are accessing external memory */
179#endif /* only on 0.3 silicon */ 213#define ANOMALY_05000144 (__SILICON_REVISION__ < 3)
214/* In PWM_OUT mode, you must enable the PPI block to generate a waveform from PPI_CLK */
215#define ANOMALY_05000145 (__SILICON_REVISION__ < 3)
216/* MDMA may lose the first few words of a descriptor chain */
217#define ANOMALY_05000146 (__SILICON_REVISION__ < 3)
218/* The source MDMA descriptor may stop with a DMA Error */
219#define ANOMALY_05000147 (__SILICON_REVISION__ < 3)
220/* When booting from a 16-bit asynchronous memory device, the upper 8-bits of each word must be 0x00 */
221#define ANOMALY_05000148 (__SILICON_REVISION__ < 3)
222/* Frame Delay in SPORT Multichannel Mode */
223#define ANOMALY_05000153 (__SILICON_REVISION__ < 3)
224/* SPORT TFS signal is active in Multi-channel mode outside of valid channels */
225#define ANOMALY_05000154 (__SILICON_REVISION__ < 3)
226/* Timer1 can not be used for PWMOUT mode when a certain PPI mode is in use */
227#define ANOMALY_05000155 (__SILICON_REVISION__ < 3)
228/* A killed 32-bit System MMR write will lead to the next system MMR access thinking it should be 32-bit. */
229#define ANOMALY_05000157 (__SILICON_REVISION__ < 3)
230/* SPORT transmit data is not gated by external frame sync in certain conditions */
231#define ANOMALY_05000163 (__SILICON_REVISION__ < 3)
232/* SDRAM auto-refresh and subsequent Power Ups */
233#define ANOMALY_05000168 (__SILICON_REVISION__ < 3)
234/* DATA CPLB page miss can result in lost write-through cache data writes */
235#define ANOMALY_05000169 (__SILICON_REVISION__ < 3)
236/* DMA vs Core accesses to external memory */
237#define ANOMALY_05000173 (__SILICON_REVISION__ < 3)
238/* Cache Fill Buffer Data lost */
239#define ANOMALY_05000174 (__SILICON_REVISION__ < 3)
240/* Overlapping Sequencer and Memory Stalls */
241#define ANOMALY_05000175 (__SILICON_REVISION__ < 3)
242/* Multiplication of (-1) by (-1) followed by an accumulator saturation */
243#define ANOMALY_05000176 (__SILICON_REVISION__ < 3)
244/* Disabling the PPI resets the PPI configuration registers */
245#define ANOMALY_05000181 (__SILICON_REVISION__ < 3)
246/* PPI TX Mode with 2 External Frame Syncs */
247#define ANOMALY_05000185 (__SILICON_REVISION__ < 3)
248/* PPI does not invert the Driving PPICLK edge in Transmit Modes */
249#define ANOMALY_05000191 (__SILICON_REVISION__ < 3)
250/* In PPI Transmit Modes with External Frame Syncs POLC */
251#define ANOMALY_05000192 (__SILICON_REVISION__ < 3)
252/* Internal Voltage Regulator may not start up */
253#define ANOMALY_05000206 (__SILICON_REVISION__ < 3)
180 254
181#if defined(CONFIG_BF_REV_0_2) 255/* Anomalies that don't exist on this proc */
182#define ANOMALY_05000067 /* Watchpoints (Hardware Breakpoints) are not 256#define ANOMALY_05000266 (0)
183 * supported */ 257#define ANOMALY_05000323 (0)
184#define ANOMALY_05000109 /* Reserved bits in SYSCFG register not set at
185 * power on */
186#define ANOMALY_05000116 /* Trace Buffers may record discontinuities into
187 * emulation mode and/or exception, NMI, reset
188 * handlers */
189#define ANOMALY_05000123 /* DTEST_COMMAND initiated memory access may be
190 * incorrect if data cache or DMA is active */
191#define ANOMALY_05000124 /* DMA Lock-up at CCLK to SCLK ratios of 4:1, 2:1,
192 * or 1:1 */
193#define ANOMALY_05000125 /* Erroneous exception when enabling cache */
194#define ANOMALY_05000126 /* SPI clock polarity and phase bits incorrect
195 * during booting */
196#define ANOMALY_05000137 /* DMEM_CONTROL is not set on Reset */
197#define ANOMALY_05000138 /* SPI boot will not complete if there is a zero fill
198 * block in the loader file */
199#define ANOMALY_05000140 /* Allowing the SPORT RX FIFO to fill will cause an
200 * overflow */
201#define ANOMALY_05000141 /* An Infinite Stall occurs with a particular sequence
202 * of consecutive dual dag events */
203#define ANOMALY_05000142 /* Interrupts may be lost when a programmable input
204 * flag is configured to be edge sensitive */
205#define ANOMALY_05000143 /* A read from external memory may return a wrong
206 * value with data cache enabled */
207#define ANOMALY_05000144 /* DMA and TESTSET conflict when both are accessing
208 * external memory */
209#define ANOMALY_05000145 /* In PWM_OUT mode, you must enable the PPI block to
210 * generate a waveform from PPI_CLK */
211#define ANOMALY_05000146 /* MDMA may lose the first few words of a descriptor
212 * chain */
213#define ANOMALY_05000147 /* The source MDMA descriptor may stop with a DMA
214 * Error */
215#define ANOMALY_05000148 /* When booting from a 16-bit asynchronous memory
216 * device, the upper 8-bits of each word must be
217 * 0x00 */
218#define ANOMALY_05000153 /* Frame Delay in SPORT Multichannel Mode */
219#define ANOMALY_05000154 /* SPORT TFS signal is active in Multi-channel mode
220 * outside of valid channels */
221#define ANOMALY_05000155 /* Timer1 can not be used for PWMOUT mode when a
222 * certain PPI mode is in use */
223#define ANOMALY_05000157 /* A killed 32-bit System MMR write will lead to
224 * the next system MMR access thinking it should be
225 * 32-bit. */
226#define ANOMALY_05000163 /* SPORT transmit data is not gated by external frame
227 * sync in certain conditions */
228#define ANOMALY_05000168 /* SDRAM auto-refresh and subsequent Power Ups */
229#define ANOMALY_05000169 /* DATA CPLB page miss can result in lost
230 * write-through cache data writes */
231#define ANOMALY_05000173 /* DMA vs Core accesses to external memory */
232#define ANOMALY_05000174 /* Cache Fill Buffer Data lost */
233#define ANOMALY_05000175 /* Overlapping Sequencer and Memory Stalls */
234#define ANOMALY_05000176 /* Multiplication of (-1) by (-1) followed by an
235 * accumulator saturation */
236#define ANOMALY_05000181 /* Disabling the PPI resets the PPI configuration
237 * registers */
238#define ANOMALY_05000185 /* PPI TX Mode with 2 External Frame Syncs */
239#define ANOMALY_05000191 /* PPI does not invert the Driving PPICLK edge in
240 * Transmit Modes */
241#define ANOMALY_05000192 /* In PPI Transmit Modes with External Frame Syncs
242 * POLC */
243#define ANOMALY_05000206 /* Internal Voltage Regulator may not start up */
244 258
245#endif 259#endif
246
247#endif /* _MACH_ANOMALY_H_ */
diff --git a/include/asm-blackfin/mach-bf533/bf533.h b/include/asm-blackfin/mach-bf533/bf533.h
index 185fc1284858..12a416931991 100644
--- a/include/asm-blackfin/mach-bf533/bf533.h
+++ b/include/asm-blackfin/mach-bf533/bf533.h
@@ -52,12 +52,12 @@
52/***************************/ 52/***************************/
53 53
54 54
55#define BLKFIN_DSUBBANKS 4 55#define BFIN_DSUBBANKS 4
56#define BLKFIN_DWAYS 2 56#define BFIN_DWAYS 2
57#define BLKFIN_DLINES 64 57#define BFIN_DLINES 64
58#define BLKFIN_ISUBBANKS 4 58#define BFIN_ISUBBANKS 4
59#define BLKFIN_IWAYS 4 59#define BFIN_IWAYS 4
60#define BLKFIN_ILINES 32 60#define BFIN_ILINES 32
61 61
62#define WAY0_L 0x1 62#define WAY0_L 0x1
63#define WAY1_L 0x2 63#define WAY1_L 0x2
@@ -141,97 +141,6 @@
141 141
142#define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO) 142#define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO)
143 143
144#define MAX_VC 650000000
145#define MIN_VC 50000000
146
147#ifdef CONFIG_BFIN_KERNEL_CLOCK
148/********************************PLL Settings **************************************/
149#if (CONFIG_VCO_MULT < 0)
150#error "VCO Multiplier is less than 0. Please select a different value"
151#endif
152
153#if (CONFIG_VCO_MULT == 0)
154#error "VCO Multiplier should be greater than 0. Please select a different value"
155#endif
156
157#if (CONFIG_VCO_MULT > 64)
158#error "VCO Multiplier is more than 64. Please select a different value"
159#endif
160
161#ifndef CONFIG_CLKIN_HALF
162#define CONFIG_VCO_HZ (CONFIG_CLKIN_HZ * CONFIG_VCO_MULT)
163#else
164#define CONFIG_VCO_HZ ((CONFIG_CLKIN_HZ * CONFIG_VCO_MULT)/2)
165#endif
166
167#ifndef CONFIG_PLL_BYPASS
168#define CONFIG_CCLK_HZ (CONFIG_VCO_HZ/CONFIG_CCLK_DIV)
169#define CONFIG_SCLK_HZ (CONFIG_VCO_HZ/CONFIG_SCLK_DIV)
170#else
171#define CONFIG_CCLK_HZ CONFIG_CLKIN_HZ
172#define CONFIG_SCLK_HZ CONFIG_CLKIN_HZ
173#endif
174
175#if (CONFIG_SCLK_DIV < 1)
176#error "SCLK DIV cannot be less than 1 or more than 15. Please select a proper value"
177#endif
178
179#if (CONFIG_SCLK_DIV > 15)
180#error "SCLK DIV cannot be less than 1 or more than 15. Please select a proper value"
181#endif
182
183#if (CONFIG_CCLK_DIV != 1)
184#if (CONFIG_CCLK_DIV != 2)
185#if (CONFIG_CCLK_DIV != 4)
186#if (CONFIG_CCLK_DIV != 8)
187#error "CCLK DIV can be 1,2,4 or 8 only. Please select a proper value"
188#endif
189#endif
190#endif
191#endif
192
193#if (CONFIG_VCO_HZ > MAX_VC)
194#error "VCO selected is more than maximum value. Please change the VCO multipler"
195#endif
196
197#if (CONFIG_SCLK_HZ > 133000000)
198#error "Sclk value selected is more than maximum. Please select a proper value for SCLK multiplier"
199#endif
200
201#if (CONFIG_SCLK_HZ < 27000000)
202#error "Sclk value selected is less than minimum. Please select a proper value for SCLK multiplier"
203#endif
204
205#if (CONFIG_SCLK_HZ > CONFIG_CCLK_HZ)
206#if (CONFIG_SCLK_HZ != CONFIG_CLKIN_HZ)
207#if (CONFIG_CCLK_HZ != CONFIG_CLKIN_HZ)
208#error "Please select sclk less than cclk"
209#endif
210#endif
211#endif
212
213#if (CONFIG_CCLK_DIV == 1)
214#define CONFIG_CCLK_ACT_DIV CCLK_DIV1
215#endif
216#if (CONFIG_CCLK_DIV == 2)
217#define CONFIG_CCLK_ACT_DIV CCLK_DIV2
218#endif
219#if (CONFIG_CCLK_DIV == 4)
220#define CONFIG_CCLK_ACT_DIV CCLK_DIV4
221#endif
222#if (CONFIG_CCLK_DIV == 8)
223#define CONFIG_CCLK_ACT_DIV CCLK_DIV8
224#endif
225#ifndef CONFIG_CCLK_ACT_DIV
226#define CONFIG_CCLK_ACT_DIV CONFIG_CCLK_DIV_not_defined_properly
227#endif
228
229#if defined(ANOMALY_05000273) && (CONFIG_CCLK_DIV == 1)
230#error ANOMALY 05000273, please make sure CCLK is at least 2x SCLK
231#endif
232
233#endif /* CONFIG_BFIN_KERNEL_CLOCK */
234
235#ifdef CONFIG_BF533 144#ifdef CONFIG_BF533
236#define CPU "BF533" 145#define CPU "BF533"
237#define CPUID 0x027a5000 146#define CPUID 0x027a5000
@@ -249,58 +158,4 @@
249#define CPUID 0x0 158#define CPUID 0x0
250#endif 159#endif
251 160
252#if (CONFIG_MEM_SIZE % 4)
253#error "SDRAM mem size must be multible of 4MB"
254#endif
255
256#define SDRAM_IGENERIC (CPLB_L1_CHBL | CPLB_USER_RD | CPLB_VALID | CPLB_PORTPRIO)
257#define SDRAM_IKERNEL (SDRAM_IGENERIC | CPLB_LOCK)
258#define L1_IMEMORY ( CPLB_USER_RD | CPLB_VALID | CPLB_LOCK)
259#define SDRAM_INON_CHBL ( CPLB_USER_RD | CPLB_VALID)
260
261/*Use the menuconfig cache policy here - CONFIG_BLKFIN_WT/CONFIG_BLKFIN_WB*/
262
263#define ANOMALY_05000158_WORKAROUND 0x200
264#ifdef CONFIG_BLKFIN_WB /*Write Back Policy */
265#define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_DIRTY \
266 | CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND)
267#else /*Write Through */
268#define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW | CPLB_DIRTY \
269 | CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND)
270#endif
271
272#define L1_DMEMORY (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY)
273#define SDRAM_DNON_CHBL (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_DIRTY)
274#define SDRAM_EBIU (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_DIRTY)
275#define SDRAM_OOPS (CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY)
276
277#define SIZE_1K 0x00000400 /* 1K */
278#define SIZE_4K 0x00001000 /* 4K */
279#define SIZE_1M 0x00100000 /* 1M */
280#define SIZE_4M 0x00400000 /* 4M */
281
282#define MAX_CPLBS (16 * 2)
283
284/*
285* Number of required data CPLB switchtable entries
286* MEMSIZE / 4 (we mostly install 4M page size CPLBs
287* approx 16 for smaller 1MB page size CPLBs for allignment purposes
288* 1 for L1 Data Memory
289* 1 for CONFIG_DEBUG_HUNT_FOR_ZERO
290* 1 for ASYNC Memory
291*/
292
293
294#define MAX_SWITCH_D_CPLBS (((CONFIG_MEM_SIZE / 4) + 16 + 1 + 1 + 1) * 2)
295
296/*
297* Number of required instruction CPLB switchtable entries
298* MEMSIZE / 4 (we mostly install 4M page size CPLBs
299* approx 12 for smaller 1MB page size CPLBs for allignment purposes
300* 1 for L1 Instruction Memory
301* 1 for CONFIG_DEBUG_HUNT_FOR_ZERO
302*/
303
304#define MAX_SWITCH_I_CPLBS (((CONFIG_MEM_SIZE / 4) + 12 + 1 + 1) * 2)
305
306#endif /* __MACH_BF533_H__ */ 161#endif /* __MACH_BF533_H__ */
diff --git a/include/asm-blackfin/mach-bf533/blackfin.h b/include/asm-blackfin/mach-bf533/blackfin.h
index e4384491e972..f3b240abf170 100644
--- a/include/asm-blackfin/mach-bf533/blackfin.h
+++ b/include/asm-blackfin/mach-bf533/blackfin.h
@@ -38,7 +38,7 @@
38#include "defBF532.h" 38#include "defBF532.h"
39#include "anomaly.h" 39#include "anomaly.h"
40 40
41#if !(defined(__ASSEMBLY__) || defined(ASSEMBLY)) 41#if !defined(__ASSEMBLY__)
42#include "cdefBF532.h" 42#include "cdefBF532.h"
43#endif 43#endif
44 44
diff --git a/include/asm-blackfin/mach-bf533/cdefBF532.h b/include/asm-blackfin/mach-bf533/cdefBF532.h
index 74f967b235e2..c803e14b529c 100644
--- a/include/asm-blackfin/mach-bf533/cdefBF532.h
+++ b/include/asm-blackfin/mach-bf533/cdefBF532.h
@@ -30,11 +30,9 @@
30 30
31#ifndef _CDEF_BF532_H 31#ifndef _CDEF_BF532_H
32#define _CDEF_BF532_H 32#define _CDEF_BF532_H
33/* 33
34#if !defined(__ADSPLPBLACKFIN__) 34#include <asm/blackfin.h>
35#warning cdefBF532.h should only be included for 532 compatible chips. 35
36#endif
37*/
38/*include all Core registers and bit definitions*/ 36/*include all Core registers and bit definitions*/
39#include "defBF532.h" 37#include "defBF532.h"
40 38
@@ -65,7 +63,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
65 bfin_write32(SIC_IWR, IWR_ENABLE(0)); 63 bfin_write32(SIC_IWR, IWR_ENABLE(0));
66 64
67 bfin_write16(VR_CTL, val); 65 bfin_write16(VR_CTL, val);
68 __builtin_bfin_ssync(); 66 SSYNC();
69 67
70 local_irq_save(flags); 68 local_irq_save(flags);
71 asm("IDLE;"); 69 asm("IDLE;");
@@ -132,10 +130,6 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
132/* General Purpose IO (0xFFC0 2400-0xFFC0 27FF) */ 130/* General Purpose IO (0xFFC0 2400-0xFFC0 27FF) */
133#define bfin_read_FIO_DIR() bfin_read16(FIO_DIR) 131#define bfin_read_FIO_DIR() bfin_read16(FIO_DIR)
134#define bfin_write_FIO_DIR(val) bfin_write16(FIO_DIR,val) 132#define bfin_write_FIO_DIR(val) bfin_write16(FIO_DIR,val)
135#define bfin_read_FIO_FLAG_C() bfin_read16(FIO_FLAG_C)
136#define bfin_write_FIO_FLAG_C(val) bfin_write16(FIO_FLAG_C,val)
137#define bfin_read_FIO_FLAG_S() bfin_read16(FIO_FLAG_S)
138#define bfin_write_FIO_FLAG_S(val) bfin_write16(FIO_FLAG_S,val)
139#define bfin_read_FIO_MASKA_C() bfin_read16(FIO_MASKA_C) 133#define bfin_read_FIO_MASKA_C() bfin_read16(FIO_MASKA_C)
140#define bfin_write_FIO_MASKA_C(val) bfin_write16(FIO_MASKA_C,val) 134#define bfin_write_FIO_MASKA_C(val) bfin_write16(FIO_MASKA_C,val)
141#define bfin_read_FIO_MASKA_S() bfin_read16(FIO_MASKA_S) 135#define bfin_read_FIO_MASKA_S() bfin_read16(FIO_MASKA_S)
@@ -152,10 +146,6 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
152#define bfin_write_FIO_BOTH(val) bfin_write16(FIO_BOTH,val) 146#define bfin_write_FIO_BOTH(val) bfin_write16(FIO_BOTH,val)
153#define bfin_read_FIO_INEN() bfin_read16(FIO_INEN) 147#define bfin_read_FIO_INEN() bfin_read16(FIO_INEN)
154#define bfin_write_FIO_INEN(val) bfin_write16(FIO_INEN,val) 148#define bfin_write_FIO_INEN(val) bfin_write16(FIO_INEN,val)
155#define bfin_read_FIO_FLAG_D() bfin_read16(FIO_FLAG_D)
156#define bfin_write_FIO_FLAG_D(val) bfin_write16(FIO_FLAG_D,val)
157#define bfin_read_FIO_FLAG_T() bfin_read16(FIO_FLAG_T)
158#define bfin_write_FIO_FLAG_T(val) bfin_write16(FIO_FLAG_T,val)
159#define bfin_read_FIO_MASKA_D() bfin_read16(FIO_MASKA_D) 149#define bfin_read_FIO_MASKA_D() bfin_read16(FIO_MASKA_D)
160#define bfin_write_FIO_MASKA_D(val) bfin_write16(FIO_MASKA_D,val) 150#define bfin_write_FIO_MASKA_D(val) bfin_write16(FIO_MASKA_D,val)
161#define bfin_read_FIO_MASKA_T() bfin_read16(FIO_MASKA_T) 151#define bfin_read_FIO_MASKA_T() bfin_read16(FIO_MASKA_T)
@@ -165,6 +155,50 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
165#define bfin_read_FIO_MASKB_T() bfin_read16(FIO_MASKB_T) 155#define bfin_read_FIO_MASKB_T() bfin_read16(FIO_MASKB_T)
166#define bfin_write_FIO_MASKB_T(val) bfin_write16(FIO_MASKB_T,val) 156#define bfin_write_FIO_MASKB_T(val) bfin_write16(FIO_MASKB_T,val)
167 157
158
159#if ANOMALY_05000311
160#define BFIN_WRITE_FIO_FLAG(name) \
161static __inline__ void bfin_write_FIO_FLAG_ ## name (unsigned short val)\
162{\
163 unsigned long flags;\
164 local_irq_save(flags);\
165 bfin_write16(FIO_FLAG_ ## name,val);\
166 bfin_read_CHIPID();\
167 local_irq_restore(flags);\
168}
169BFIN_WRITE_FIO_FLAG(D)
170BFIN_WRITE_FIO_FLAG(C)
171BFIN_WRITE_FIO_FLAG(S)
172BFIN_WRITE_FIO_FLAG(T)
173
174#define BFIN_READ_FIO_FLAG(name) \
175static __inline__ unsigned short bfin_read_FIO_FLAG_ ## name (void)\
176{\
177 unsigned long flags;\
178 unsigned short ret;\
179 local_irq_save(flags);\
180 ret = bfin_read16(FIO_FLAG_ ## name);\
181 bfin_read_CHIPID();\
182 local_irq_restore(flags);\
183 return ret;\
184}
185BFIN_READ_FIO_FLAG(D)
186BFIN_READ_FIO_FLAG(C)
187BFIN_READ_FIO_FLAG(S)
188BFIN_READ_FIO_FLAG(T)
189
190#else
191#define bfin_write_FIO_FLAG_D(val) bfin_write16(FIO_FLAG_D,val)
192#define bfin_write_FIO_FLAG_C(val) bfin_write16(FIO_FLAG_C,val)
193#define bfin_write_FIO_FLAG_S(val) bfin_write16(FIO_FLAG_S,val)
194#define bfin_write_FIO_FLAG_T(val) bfin_write16(FIO_FLAG_T,val)
195#define bfin_read_FIO_FLAG_T() bfin_read16(FIO_FLAG_T)
196#define bfin_read_FIO_FLAG_C() bfin_read16(FIO_FLAG_C)
197#define bfin_read_FIO_FLAG_S() bfin_read16(FIO_FLAG_S)
198#define bfin_read_FIO_FLAG_D() bfin_read16(FIO_FLAG_D)
199#endif
200
201
168/* DMA Controller */ 202/* DMA Controller */
169#define bfin_read_DMA0_CONFIG() bfin_read16(DMA0_CONFIG) 203#define bfin_read_DMA0_CONFIG() bfin_read16(DMA0_CONFIG)
170#define bfin_write_DMA0_CONFIG(val) bfin_write16(DMA0_CONFIG,val) 204#define bfin_write_DMA0_CONFIG(val) bfin_write16(DMA0_CONFIG,val)
diff --git a/include/asm-blackfin/mach-bf533/defBF532.h b/include/asm-blackfin/mach-bf533/defBF532.h
index 6a3cf93f8b57..37134aaf9954 100644
--- a/include/asm-blackfin/mach-bf533/defBF532.h
+++ b/include/asm-blackfin/mach-bf533/defBF532.h
@@ -104,6 +104,7 @@
104#define UART_GCTL 0xFFC00424 /* Global Control Register */ 104#define UART_GCTL 0xFFC00424 /* Global Control Register */
105 105
106/* SPI Controller (0xFFC00500 - 0xFFC005FF) */ 106/* SPI Controller (0xFFC00500 - 0xFFC005FF) */
107#define SPI0_REGBASE 0xFFC00500
107#define SPI_CTL 0xFFC00500 /* SPI Control Register */ 108#define SPI_CTL 0xFFC00500 /* SPI Control Register */
108#define SPI_FLG 0xFFC00504 /* SPI Flag register */ 109#define SPI_FLG 0xFFC00504 /* SPI Flag register */
109#define SPI_STAT 0xFFC00508 /* SPI Status register */ 110#define SPI_STAT 0xFFC00508 /* SPI Status register */
@@ -928,7 +929,7 @@
928#define GM 0x00000008 /* When RDBR full, get more (=1) data or discard (=0) incoming Data */ 929#define GM 0x00000008 /* When RDBR full, get more (=1) data or discard (=0) incoming Data */
929#define PSSE 0x00000010 /* Enable (=1) Slave-Select input for Master. */ 930#define PSSE 0x00000010 /* Enable (=1) Slave-Select input for Master. */
930#define EMISO 0x00000020 /* Enable (=1) MISO pin as an output. */ 931#define EMISO 0x00000020 /* Enable (=1) MISO pin as an output. */
931#define SPI_LEN 0x00000100 /* Word length (0 => 8 bits, 1 => 16 bits) */ 932#define SIZE 0x00000100 /* Word length (0 => 8 bits, 1 => 16 bits) */
932#define LSBF 0x00000200 /* Data format (0 => MSB sent/received first 1 => LSB sent/received first) */ 933#define LSBF 0x00000200 /* Data format (0 => MSB sent/received first 1 => LSB sent/received first) */
933#define CPHA 0x00000400 /* Clock phase (0 => SPICLK starts toggling in middle of xfer, 1 => SPICLK toggles at the beginning of xfer. */ 934#define CPHA 0x00000400 /* Clock phase (0 => SPICLK starts toggling in middle of xfer, 1 => SPICLK toggles at the beginning of xfer. */
934#define CPOL 0x00000800 /* Clock polarity (0 => active-high, 1 => active-low) */ 935#define CPOL 0x00000800 /* Clock polarity (0 => active-high, 1 => active-low) */
diff --git a/include/asm-blackfin/mach-bf533/irq.h b/include/asm-blackfin/mach-bf533/irq.h
index 9879e68e315c..452fb825d891 100644
--- a/include/asm-blackfin/mach-bf533/irq.h
+++ b/include/asm-blackfin/mach-bf533/irq.h
@@ -128,6 +128,8 @@ Core Emulation **
128#define IRQ_PF14 47 128#define IRQ_PF14 47
129#define IRQ_PF15 48 129#define IRQ_PF15 48
130 130
131#define GPIO_IRQ_BASE IRQ_PF0
132
131#ifdef CONFIG_IRQCHIP_DEMUX_GPIO 133#ifdef CONFIG_IRQCHIP_DEMUX_GPIO
132#define NR_IRQS (IRQ_PF15+1) 134#define NR_IRQS (IRQ_PF15+1)
133#else 135#else
diff --git a/include/asm-blackfin/mach-bf533/mem_map.h b/include/asm-blackfin/mach-bf533/mem_map.h
index e84baa3e939d..94d8c4062eb7 100644
--- a/include/asm-blackfin/mach-bf533/mem_map.h
+++ b/include/asm-blackfin/mach-bf533/mem_map.h
@@ -51,10 +51,10 @@
51 51
52/* Level 1 Memory */ 52/* Level 1 Memory */
53 53
54#ifdef CONFIG_BLKFIN_CACHE 54#ifdef CONFIG_BFIN_ICACHE
55#define BLKFIN_ICACHESIZE (16*1024) 55#define BFIN_ICACHESIZE (16*1024)
56#else 56#else
57#define BLKFIN_ICACHESIZE (0*1024) 57#define BFIN_ICACHESIZE (0*1024)
58#endif 58#endif
59 59
60/* Memory Map for ADSP-BF533 processors */ 60/* Memory Map for ADSP-BF533 processors */
@@ -64,35 +64,35 @@
64#define L1_DATA_A_START 0xFF800000 64#define L1_DATA_A_START 0xFF800000
65#define L1_DATA_B_START 0xFF900000 65#define L1_DATA_B_START 0xFF900000
66 66
67#ifdef CONFIG_BLKFIN_CACHE 67#ifdef CONFIG_BFIN_ICACHE
68#define L1_CODE_LENGTH (0x14000 - 0x4000) 68#define L1_CODE_LENGTH (0x14000 - 0x4000)
69#else 69#else
70#define L1_CODE_LENGTH 0x14000 70#define L1_CODE_LENGTH 0x14000
71#endif 71#endif
72 72
73#ifdef CONFIG_BLKFIN_DCACHE 73#ifdef CONFIG_BFIN_DCACHE
74 74
75#ifdef CONFIG_BLKFIN_DCACHE_BANKA 75#ifdef CONFIG_BFIN_DCACHE_BANKA
76#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0) 76#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0)
77#define L1_DATA_A_LENGTH (0x8000 - 0x4000) 77#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
78#define L1_DATA_B_LENGTH 0x8000 78#define L1_DATA_B_LENGTH 0x8000
79#define BLKFIN_DCACHESIZE (16*1024) 79#define BFIN_DCACHESIZE (16*1024)
80#define BLKFIN_DSUPBANKS 1 80#define BFIN_DSUPBANKS 1
81#else 81#else
82#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0) 82#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0)
83#define L1_DATA_A_LENGTH (0x8000 - 0x4000) 83#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
84#define L1_DATA_B_LENGTH (0x8000 - 0x4000) 84#define L1_DATA_B_LENGTH (0x8000 - 0x4000)
85#define BLKFIN_DCACHESIZE (32*1024) 85#define BFIN_DCACHESIZE (32*1024)
86#define BLKFIN_DSUPBANKS 2 86#define BFIN_DSUPBANKS 2
87#endif 87#endif
88 88
89#else 89#else
90#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0) 90#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0)
91#define L1_DATA_A_LENGTH 0x8000 91#define L1_DATA_A_LENGTH 0x8000
92#define L1_DATA_B_LENGTH 0x8000 92#define L1_DATA_B_LENGTH 0x8000
93#define BLKFIN_DCACHESIZE (0*1024) 93#define BFIN_DCACHESIZE (0*1024)
94#define BLKFIN_DSUPBANKS 0 94#define BFIN_DSUPBANKS 0
95#endif /*CONFIG_BLKFIN_DCACHE*/ 95#endif /*CONFIG_BFIN_DCACHE*/
96#endif 96#endif
97 97
98/* Memory Map for ADSP-BF532 processors */ 98/* Memory Map for ADSP-BF532 processors */
@@ -102,36 +102,36 @@
102#define L1_DATA_A_START 0xFF804000 102#define L1_DATA_A_START 0xFF804000
103#define L1_DATA_B_START 0xFF904000 103#define L1_DATA_B_START 0xFF904000
104 104
105#ifdef CONFIG_BLKFIN_CACHE 105#ifdef CONFIG_BFIN_ICACHE
106#define L1_CODE_LENGTH (0xC000 - 0x4000) 106#define L1_CODE_LENGTH (0xC000 - 0x4000)
107#else 107#else
108#define L1_CODE_LENGTH 0xC000 108#define L1_CODE_LENGTH 0xC000
109#endif 109#endif
110 110
111#ifdef CONFIG_BLKFIN_DCACHE 111#ifdef CONFIG_BFIN_DCACHE
112 112
113#ifdef CONFIG_BLKFIN_DCACHE_BANKA 113#ifdef CONFIG_BFIN_DCACHE_BANKA
114#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0) 114#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0)
115#define L1_DATA_A_LENGTH (0x4000 - 0x4000) 115#define L1_DATA_A_LENGTH (0x4000 - 0x4000)
116#define L1_DATA_B_LENGTH 0x4000 116#define L1_DATA_B_LENGTH 0x4000
117#define BLKFIN_DCACHESIZE (16*1024) 117#define BFIN_DCACHESIZE (16*1024)
118#define BLKFIN_DSUPBANKS 1 118#define BFIN_DSUPBANKS 1
119 119
120#else 120#else
121#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0) 121#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0)
122#define L1_DATA_A_LENGTH (0x4000 - 0x4000) 122#define L1_DATA_A_LENGTH (0x4000 - 0x4000)
123#define L1_DATA_B_LENGTH (0x4000 - 0x4000) 123#define L1_DATA_B_LENGTH (0x4000 - 0x4000)
124#define BLKFIN_DCACHESIZE (32*1024) 124#define BFIN_DCACHESIZE (32*1024)
125#define BLKFIN_DSUPBANKS 2 125#define BFIN_DSUPBANKS 2
126#endif 126#endif
127 127
128#else 128#else
129#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0) 129#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0)
130#define L1_DATA_A_LENGTH 0x4000 130#define L1_DATA_A_LENGTH 0x4000
131#define L1_DATA_B_LENGTH 0x4000 131#define L1_DATA_B_LENGTH 0x4000
132#define BLKFIN_DCACHESIZE (0*1024) 132#define BFIN_DCACHESIZE (0*1024)
133#define BLKFIN_DSUPBANKS 0 133#define BFIN_DSUPBANKS 0
134#endif /*CONFIG_BLKFIN_DCACHE*/ 134#endif /*CONFIG_BFIN_DCACHE*/
135#endif 135#endif
136 136
137/* Memory Map for ADSP-BF531 processors */ 137/* Memory Map for ADSP-BF531 processors */
@@ -144,16 +144,16 @@
144#define L1_DATA_B_LENGTH 0x0000 144#define L1_DATA_B_LENGTH 0x0000
145 145
146 146
147#ifdef CONFIG_BLKFIN_DCACHE 147#ifdef CONFIG_BFIN_DCACHE
148#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0) 148#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0)
149#define L1_DATA_A_LENGTH (0x4000 - 0x4000) 149#define L1_DATA_A_LENGTH (0x4000 - 0x4000)
150#define BLKFIN_DCACHESIZE (16*1024) 150#define BFIN_DCACHESIZE (16*1024)
151#define BLKFIN_DSUPBANKS 1 151#define BFIN_DSUPBANKS 1
152#else 152#else
153#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0) 153#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0)
154#define L1_DATA_A_LENGTH 0x4000 154#define L1_DATA_A_LENGTH 0x4000
155#define BLKFIN_DCACHESIZE (0*1024) 155#define BFIN_DCACHESIZE (0*1024)
156#define BLKFIN_DSUPBANKS 0 156#define BFIN_DSUPBANKS 0
157#endif 157#endif
158 158
159#endif 159#endif
diff --git a/include/asm-blackfin/mach-bf537/anomaly.h b/include/asm-blackfin/mach-bf537/anomaly.h
index 4453e614c3b1..2b66ecf489f7 100644
--- a/include/asm-blackfin/mach-bf537/anomaly.h
+++ b/include/asm-blackfin/mach-bf537/anomaly.h
@@ -1,139 +1,144 @@
1
2/* 1/*
3 * File: include/asm-blackfin/mach-bf537/anomaly.h 2 * File: include/asm-blackfin/mach-bf537/anomaly.h
4 * Based on: 3 * Bugs: Enter bugs at http://blackfin.uclinux.org/
5 * Author:
6 *
7 * Created:
8 * Description:
9 *
10 * Rev:
11 *
12 * Modified:
13 *
14 *
15 * Bugs: Enter bugs at http://blackfin.uclinux.org/
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 2, or (at your option)
20 * any later version.
21 * 4 *
22 * This program is distributed in the hope that it will be useful, 5 * Copyright (C) 2004-2007 Analog Devices Inc.
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of 6 * Licensed under the GPL-2 or later.
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * You should have received a copy of the GNU General Public License
28 * along with this program; see the file COPYING.
29 * If not, write to the Free Software Foundation,
30 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 */ 7 */
32 8
33/* This file shoule be up to date with: 9/* This file shoule be up to date with:
34 * - Revision J, June 1, 2006; ADSP-BF537 Blackfin Processor Anomaly List 10 * - Revision M, March 13, 2007; ADSP-BF537 Blackfin Processor Anomaly List
35 * - Revision I, June 1, 2006; ADSP-BF536 Blackfin Processor Anomaly List 11 * - Revision L, March 13, 2007; ADSP-BF536 Blackfin Processor Anomaly List
36 * - Revision J, June 1, 2006; ADSP-BF534 Blackfin Processor Anomaly List 12 * - Revision M, March 13, 2007; ADSP-BF534 Blackfin Processor Anomaly List
37 */ 13 */
38 14
39#ifndef _MACH_ANOMALY_H_ 15#ifndef _MACH_ANOMALY_H_
40#define _MACH_ANOMALY_H_ 16#define _MACH_ANOMALY_H_
41 17
42/* We do not support 0.1 silicon - sorry */ 18/* We do not support 0.1 silicon - sorry */
43#if (defined(CONFIG_BF_REV_0_1)) 19#if __SILICON_REVISION__ < 2
44#error Kernel will not work on BF537/6/4 Version 0.1 20# error Kernel will not work on BF537 silicon version 0.0 or 0.1
45#endif 21#endif
46 22
47#if (defined(CONFIG_BF_REV_0_3) || defined(CONFIG_BF_REV_0_2)) 23#if defined(__ADSPBF534__)
48#define ANOMALY_05000074 /* A multi issue instruction with dsp32shiftimm in 24# define ANOMALY_BF534 1
49 slot1 and store of a P register in slot 2 is not 25#else
50 supported */ 26# define ANOMALY_BF534 0
51#define ANOMALY_05000119 /* DMA_RUN bit is not valid after a Peripheral Receive
52 Channel DMA stops */
53#define ANOMALY_05000122 /* Rx.H can not be used to access 16-bit System MMR
54 registers. */
55#define ANOMALY_05000166 /* PPI Data Lengths Between 8 and 16 do not zero out
56 upper bits*/
57#define ANOMALY_05000180 /* PPI_DELAY not functional in PPI modes with 0 frame
58 syncs */
59#if (defined(CONFIG_BF537) || defined(CONFIG_BF536))
60#define ANOMALY_05000247 /* CLKIN Buffer Output Enable Reset Behavior Is
61 Changed */
62#endif
63#define ANOMALY_05000265 /* Sensitivity to noise with slow input edge rates on
64 SPORT external receive and transmit clocks. */
65#define ANOMALY_05000272 /* Certain data cache write through modes fail for
66 VDDint <=0.9V */
67#define ANOMALY_05000273 /* Writes to Synchronous SDRAM memory may be lost */
68#define ANOMALY_05000277 /* Writes to a flag data register one SCLK cycle after
69 an edge is detected may clear interrupt */
70#define ANOMALY_05000281 /* False Hardware Error Exception when ISR context is
71 not restored */
72#define ANOMALY_05000282 /* Memory DMA corruption with 32-bit data and traffic
73 control */
74#define ANOMALY_05000283 /* A system MMR write is stalled indefinitely when
75 killed in a particular stage*/
76#define ANOMALY_05000310 /* False hardware errors caused by fetches at the
77 * boundary of reserved memory */
78#define ANOMALY_05000312 /* Errors when SSYNC, CSYNC, or loads to LT, LB and LC
79 registers are interrupted */
80#define ANOMALY_05000313 /* PPI is level sensitive on first transfer */
81#define ANOMALY_05000322 /* EMAC RMII mode at 10-Base-T speed: RX frames not
82 * received properly */
83#endif 27#endif
84 28#if defined(__ADSPBF536__)
85#if defined(CONFIG_BF_REV_0_2) 29# define ANOMALY_BF536 1
86#define ANOMALY_05000244 /* With instruction cache enabled, a CSYNC or SSYNC or 30#else
87 IDLE around a Change of Control causes 31# define ANOMALY_BF536 0
88 unpredictable results */
89#define ANOMALY_05000250 /* Incorrect Bit-Shift of Data Word in Multichannel
90 (TDM) */
91#if (defined(CONFIG_BF537) || defined(CONFIG_BF536))
92#define ANOMALY_05000252 /* EMAC Tx DMA error after an early frame abort */
93#endif 32#endif
94#define ANOMALY_05000253 /* Maximum external clock speed for Timers */ 33#if defined(__ADSPBF537__)
95#define ANOMALY_05000255 /* Entering Hibernate Mode with RTC Seconds event 34# define ANOMALY_BF537 1
96 interrupt not functional */ 35#else
97#if (defined(CONFIG_BF537) || defined(CONFIG_BF536)) 36# define ANOMALY_BF537 0
98#define ANOMALY_05000256 /* EMAC MDIO input latched on wrong MDC edge */
99#endif 37#endif
100#define ANOMALY_05000257 /* An interrupt or exception during short Hardware
101 loops may cause the instruction fetch unit to
102 malfunction */
103#define ANOMALY_05000258 /* Instruction Cache is corrupted when bit 9 and 12 of
104 the ICPLB Data registers differ */
105#define ANOMALY_05000260 /* ICPLB_STATUS MMR register may be corrupted */
106#define ANOMALY_05000261 /* DCPLB_FAULT_ADDR MMR register may be corrupted */
107#define ANOMALY_05000262 /* Stores to data cache may be lost */
108#define ANOMALY_05000263 /* Hardware loop corrupted when taking an ICPLB exception */
109#define ANOMALY_05000264 /* A Sync instruction (CSYNC, SSYNC) or an IDLE
110 instruction will cause an infinite stall in the
111 second to last instruction in a hardware loop */
112#define ANOMALY_05000268 /* Memory DMA error when peripheral DMA is running
113 and non-zero DEB_TRAFFIC_PERIOD value */
114#define ANOMALY_05000270 /* High I/O activity causes the output voltage of the
115 internal voltage regulator (VDDint) to decrease */
116#define ANOMALY_05000277 /* Writes to a flag data register one SCLK cycle after
117 an edge is detected may clear interrupt */
118#define ANOMALY_05000278 /* Disabling Peripherals with DMA running may cause
119 DMA system instability */
120#define ANOMALY_05000280 /* SPI Master boot mode does not work well with
121 Atmel Dataflash devices */
122#define ANOMALY_05000281 /* False Hardware Error Exception when ISR context
123 * is not restored */
124#define ANOMALY_05000282 /* Memory DMA corruption with 32-bit data and traffic
125 * control */
126#define ANOMALY_05000283 /* System MMR Write Is Stalled Indefinitely When
127 * Killed in a Particular Stage */
128#define ANOMALY_05000285 /* New Feature: EMAC TX DMA Word Alignment
129 * (Not Available On Older Silicon) */
130#define ANOMALY_05000288 /* SPORTs may receive bad data if FIFOs fill up */
131#define ANOMALY_05000315 /* Killed System MMR Write Completes Erroneously
132 * On Next System MMR Access */
133#define ANOMALY_05000316 /* EMAC RMII mode: collisions occur in Full Duplex
134 * mode */
135#define ANOMALY_05000321 /* EMAC RMII mode: TX frames in half duplex fail with
136 * status No Carrier */
137#endif /* CONFIG_BF_REV_0_2 */
138 38
139#endif /* _MACH_ANOMALY_H_ */ 39/* Multi-issue instruction with dsp32shiftimm in slot1 and P-reg store in slot 2 not supported */
40#define ANOMALY_05000074 (1)
41/* DMA_RUN bit is not valid after a Peripheral Receive Channel DMA stops */
42#define ANOMALY_05000119 (1)
43/* Rx.H cannot be used to access 16-bit System MMR registers */
44#define ANOMALY_05000122 (1)
45/* Killed 32-bit MMR write leads to next system MMR access thinking it should be 32-bit */
46#define ANOMALY_05000157 (__SILICON_REVISION__ < 2)
47/* PPI_DELAY not functional in PPI modes with 0 frame syncs */
48#define ANOMALY_05000180 (1)
49/* Instruction Cache Is Not Functional */
50#define ANOMALY_05000237 (__SILICON_REVISION__ < 2)
51/* If i-cache is on, CSYNC/SSYNC/IDLE around Change of Control causes failures */
52#define ANOMALY_05000244 (__SILICON_REVISION__ < 3)
53/* Spurious Hardware Error from an access in the shadow of a conditional branch */
54#define ANOMALY_05000245 (1)
55/* CLKIN Buffer Output Enable Reset Behavior Is Changed */
56#define ANOMALY_05000247 (1)
57/* Incorrect Bit-Shift of Data Word in Multichannel (TDM) mode in certain conditions */
58#define ANOMALY_05000250 (__SILICON_REVISION__ < 3)
59/* EMAC Tx DMA error after an early frame abort */
60#define ANOMALY_05000252 (__SILICON_REVISION__ < 3)
61/* Maximum external clock speed for Timers */
62#define ANOMALY_05000253 (__SILICON_REVISION__ < 3)
63/* Incorrect Timer Pulse Width in Single-Shot PWM_OUT mode with external clock */
64#define ANOMALY_05000254 (__SILICON_REVISION__ > 2)
65/* Entering Hibernate Mode with RTC Seconds event interrupt not functional */
66#define ANOMALY_05000255 (__SILICON_REVISION__ < 3)
67/* EMAC MDIO input latched on wrong MDC edge */
68#define ANOMALY_05000256 (__SILICON_REVISION__ < 3)
69/* Interrupt/Exception during short hardware loop may cause bad instruction fetches */
70#define ANOMALY_05000257 (__SILICON_REVISION__ < 3)
71/* Instruction Cache is corrupted when bits 9 and 12 of the ICPLB Data registers differ */
72#define ANOMALY_05000258 (((ANOMALY_BF536 || ANOMALY_BF537) && __SILICON_REVISION__ == 1) || __SILICON_REVISION__ == 2)
73/* ICPLB_STATUS MMR register may be corrupted */
74#define ANOMALY_05000260 (__SILICON_REVISION__ == 2)
75/* DCPLB_FAULT_ADDR MMR register may be corrupted */
76#define ANOMALY_05000261 (__SILICON_REVISION__ < 3)
77/* Stores to data cache may be lost */
78#define ANOMALY_05000262 (__SILICON_REVISION__ < 3)
79/* Hardware loop corrupted when taking an ICPLB exception */
80#define ANOMALY_05000263 (__SILICON_REVISION__ == 2)
81/* CSYNC/SSYNC/IDLE causes infinite stall in second to last instruction in hardware loop */
82#define ANOMALY_05000264 (__SILICON_REVISION__ < 3)
83/* Sensitivity to noise with slow input edge rates on external SPORT TX and RX clocks */
84#define ANOMALY_05000265 (1)
85/* Memory DMA error when peripheral DMA is running with non-zero DEB_TRAFFIC_PERIOD */
86#define ANOMALY_05000268 (__SILICON_REVISION__ < 3)
87/* High I/O activity causes output voltage of internal voltage regulator (VDDint) to decrease */
88#define ANOMALY_05000270 (__SILICON_REVISION__ < 3)
89/* Certain data cache write through modes fail for VDDint <=0.9V */
90#define ANOMALY_05000272 (1)
91/* Writes to Synchronous SDRAM memory may be lost */
92#define ANOMALY_05000273 (__SILICON_REVISION__ < 3)
93/* Writes to an I/O data register one SCLK cycle after an edge is detected may clear interrupt */
94#define ANOMALY_05000277 (__SILICON_REVISION__ < 3)
95/* Disabling Peripherals with DMA running may cause DMA system instability */
96#define ANOMALY_05000278 (((ANOMALY_BF536 || ANOMALY_BF537) && __SILICON_REVISION__ < 3) || (ANOMALY_BF534 && __SILICON_REVISION__ < 2))
97/* SPI Master boot mode does not work well with Atmel Data flash devices */
98#define ANOMALY_05000280 (1)
99/* False Hardware Error Exception when ISR context is not restored */
100#define ANOMALY_05000281 (__SILICON_REVISION__ < 3)
101/* Memory DMA corruption with 32-bit data and traffic control */
102#define ANOMALY_05000282 (__SILICON_REVISION__ < 3)
103/* System MMR Write Is Stalled Indefinitely When Killed in a Particular Stage */
104#define ANOMALY_05000283 (__SILICON_REVISION__ < 3)
105/* New Feature: EMAC TX DMA Word Alignment (Not Available On Older Silicon) */
106#define ANOMALY_05000285 (__SILICON_REVISION__ < 3)
107/* SPORTs may receive bad data if FIFOs fill up */
108#define ANOMALY_05000288 (__SILICON_REVISION__ < 3)
109/* Memory to memory DMA source/destination descriptors must be in same memory space */
110#define ANOMALY_05000301 (1)
111/* SSYNCs After Writes To CAN/DMA MMR Registers Are Not Always Handled Correctly */
112#define ANOMALY_05000304 (__SILICON_REVISION__ < 3)
113/* New Feature: Additional Hysteresis on SPORT Input Pins (Not Available On Older Silicon) */
114#define ANOMALY_05000305 (__SILICON_REVISION__ < 3)
115/* SCKELOW Bit Does Not Maintain State Through Hibernate */
116#define ANOMALY_05000307 (__SILICON_REVISION__ < 3)
117/* Writing UART_THR while UART clock is disabled sends erroneous start bit */
118#define ANOMALY_05000309 (__SILICON_REVISION__ < 3)
119/* False hardware errors caused by fetches at the boundary of reserved memory */
120#define ANOMALY_05000310 (1)
121/* Errors when SSYNC, CSYNC, or loads to LT, LB and LC registers are interrupted */
122#define ANOMALY_05000312 (1)
123/* PPI is level sensitive on first transfer */
124#define ANOMALY_05000313 (1)
125/* Killed System MMR Write Completes Erroneously On Next System MMR Access */
126#define ANOMALY_05000315 (__SILICON_REVISION__ < 3)
127/* EMAC RMII mode: collisions occur in Full Duplex mode */
128#define ANOMALY_05000316 (__SILICON_REVISION__ < 3)
129/* EMAC RMII mode: TX frames in half duplex fail with status No Carrier */
130#define ANOMALY_05000321 (__SILICON_REVISION__ < 3)
131/* EMAC RMII mode at 10-Base-T speed: RX frames not received properly */
132#define ANOMALY_05000322 (1)
133
134/* Anomalies that don't exist on this proc */
135#define ANOMALY_05000125 (0)
136#define ANOMALY_05000158 (0)
137#define ANOMALY_05000183 (0)
138#define ANOMALY_05000198 (0)
139#define ANOMALY_05000230 (0)
140#define ANOMALY_05000266 (0)
141#define ANOMALY_05000311 (0)
142#define ANOMALY_05000323 (0)
143
144#endif
diff --git a/include/asm-blackfin/mach-bf537/bf537.h b/include/asm-blackfin/mach-bf537/bf537.h
index b8924cd7730c..cfe2a221112e 100644
--- a/include/asm-blackfin/mach-bf537/bf537.h
+++ b/include/asm-blackfin/mach-bf537/bf537.h
@@ -62,12 +62,12 @@
62/***************************/ 62/***************************/
63 63
64 64
65#define BLKFIN_DSUBBANKS 4 65#define BFIN_DSUBBANKS 4
66#define BLKFIN_DWAYS 2 66#define BFIN_DWAYS 2
67#define BLKFIN_DLINES 64 67#define BFIN_DLINES 64
68#define BLKFIN_ISUBBANKS 4 68#define BFIN_ISUBBANKS 4
69#define BLKFIN_IWAYS 4 69#define BFIN_IWAYS 4
70#define BLKFIN_ILINES 32 70#define BFIN_ILINES 32
71 71
72#define WAY0_L 0x1 72#define WAY0_L 0x1
73#define WAY1_L 0x2 73#define WAY1_L 0x2
@@ -121,97 +121,6 @@
121 121
122#define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO) 122#define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO)
123 123
124#define MAX_VC 650000000
125#define MIN_VC 50000000
126
127/********************************PLL Settings **************************************/
128#ifdef CONFIG_BFIN_KERNEL_CLOCK
129#if (CONFIG_VCO_MULT < 0)
130#error "VCO Multiplier is less than 0. Please select a different value"
131#endif
132
133#if (CONFIG_VCO_MULT == 0)
134#error "VCO Multiplier should be greater than 0. Please select a different value"
135#endif
136
137#if (CONFIG_VCO_MULT > 64)
138#error "VCO Multiplier is more than 64. Please select a different value"
139#endif
140
141#ifndef CONFIG_CLKIN_HALF
142#define CONFIG_VCO_HZ (CONFIG_CLKIN_HZ * CONFIG_VCO_MULT)
143#else
144#define CONFIG_VCO_HZ ((CONFIG_CLKIN_HZ * CONFIG_VCO_MULT)/2)
145#endif
146
147#ifndef CONFIG_PLL_BYPASS
148#define CONFIG_CCLK_HZ (CONFIG_VCO_HZ/CONFIG_CCLK_DIV)
149#define CONFIG_SCLK_HZ (CONFIG_VCO_HZ/CONFIG_SCLK_DIV)
150#else
151#define CONFIG_CCLK_HZ CONFIG_CLKIN_HZ
152#define CONFIG_SCLK_HZ CONFIG_CLKIN_HZ
153#endif
154
155#if (CONFIG_SCLK_DIV < 1)
156#error "SCLK DIV cannot be less than 1 or more than 15. Please select a proper value"
157#endif
158
159#if (CONFIG_SCLK_DIV > 15)
160#error "SCLK DIV cannot be less than 1 or more than 15. Please select a proper value"
161#endif
162
163#if (CONFIG_CCLK_DIV != 1)
164#if (CONFIG_CCLK_DIV != 2)
165#if (CONFIG_CCLK_DIV != 4)
166#if (CONFIG_CCLK_DIV != 8)
167#error "CCLK DIV can be 1,2,4 or 8 only. Please select a proper value"
168#endif
169#endif
170#endif
171#endif
172
173#if (CONFIG_VCO_HZ > MAX_VC)
174#error "VCO selected is more than maximum value. Please change the VCO multipler"
175#endif
176
177#if (CONFIG_SCLK_HZ > 133000000)
178#error "Sclk value selected is more than maximum. Please select a proper value for SCLK multiplier"
179#endif
180
181#if (CONFIG_SCLK_HZ < 27000000)
182#error "Sclk value selected is less than minimum. Please select a proper value for SCLK multiplier"
183#endif
184
185#if (CONFIG_SCLK_HZ >= CONFIG_CCLK_HZ)
186#if (CONFIG_SCLK_HZ != CONFIG_CLKIN_HZ)
187#if (CONFIG_CCLK_HZ != CONFIG_CLKIN_HZ)
188#error "Please select sclk less than cclk"
189#endif
190#endif
191#endif
192
193#if (CONFIG_CCLK_DIV == 1)
194#define CONFIG_CCLK_ACT_DIV CCLK_DIV1
195#endif
196#if (CONFIG_CCLK_DIV == 2)
197#define CONFIG_CCLK_ACT_DIV CCLK_DIV2
198#endif
199#if (CONFIG_CCLK_DIV == 4)
200#define CONFIG_CCLK_ACT_DIV CCLK_DIV4
201#endif
202#if (CONFIG_CCLK_DIV == 8)
203#define CONFIG_CCLK_ACT_DIV CCLK_DIV8
204#endif
205#ifndef CONFIG_CCLK_ACT_DIV
206#define CONFIG_CCLK_ACT_DIV CONFIG_CCLK_DIV_not_defined_properly
207#endif
208
209#if defined(ANOMALY_05000273) && (CONFIG_CCLK_DIV == 1)
210#error ANOMALY 05000273, please make sure CCLK is at least 2x SCLK
211#endif
212
213#endif /* CONFIG_BFIN_KERNEL_CLOCK */
214
215#ifdef CONFIG_BF537 124#ifdef CONFIG_BF537
216#define CPU "BF537" 125#define CPU "BF537"
217#define CPUID 0x027c8000 126#define CPUID 0x027c8000
@@ -229,59 +138,4 @@
229#define CPUID 0x0 138#define CPUID 0x0
230#endif 139#endif
231 140
232#if (CONFIG_MEM_SIZE % 4)
233#error "SDRAM mem size must be multible of 4MB"
234#endif
235
236#define SDRAM_IGENERIC (CPLB_L1_CHBL | CPLB_USER_RD | CPLB_VALID | CPLB_PORTPRIO)
237#define SDRAM_IKERNEL (SDRAM_IGENERIC | CPLB_LOCK)
238#define L1_IMEMORY ( CPLB_USER_RD | CPLB_VALID | CPLB_LOCK)
239#define SDRAM_INON_CHBL ( CPLB_USER_RD | CPLB_VALID)
240
241/*Use the menuconfig cache policy here - CONFIG_BLKFIN_WT/CONFIG_BLKFIN_WB*/
242
243#define ANOMALY_05000158_WORKAROUND 0x200
244#ifdef CONFIG_BLKFIN_WB /*Write Back Policy */
245#define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_DIRTY \
246 | CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND)
247#else /*Write Through */
248#define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW \
249 | CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_DIRTY )
250#endif
251
252
253#define L1_DMEMORY (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY )
254#define SDRAM_DNON_CHBL (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_DIRTY )
255#define SDRAM_EBIU (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_DIRTY )
256#define SDRAM_OOPS (CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY )
257
258#define SIZE_1K 0x00000400 /* 1K */
259#define SIZE_4K 0x00001000 /* 4K */
260#define SIZE_1M 0x00100000 /* 1M */
261#define SIZE_4M 0x00400000 /* 4M */
262
263#define MAX_CPLBS (16 * 2)
264
265/*
266* Number of required data CPLB switchtable entries
267* MEMSIZE / 4 (we mostly install 4M page size CPLBs
268* approx 16 for smaller 1MB page size CPLBs for allignment purposes
269* 1 for L1 Data Memory
270* 1 for CONFIG_DEBUG_HUNT_FOR_ZERO
271* 1 for ASYNC Memory
272*/
273
274
275#define MAX_SWITCH_D_CPLBS (((CONFIG_MEM_SIZE / 4) + 16 + 1 + 1 + 1) * 2)
276
277/*
278* Number of required instruction CPLB switchtable entries
279* MEMSIZE / 4 (we mostly install 4M page size CPLBs
280* approx 12 for smaller 1MB page size CPLBs for allignment purposes
281* 1 for L1 Instruction Memory
282* 1 for CONFIG_DEBUG_HUNT_FOR_ZERO
283*/
284
285#define MAX_SWITCH_I_CPLBS (((CONFIG_MEM_SIZE / 4) + 12 + 1 + 1) * 2)
286
287#endif /* __MACH_BF537_H__ */ 141#endif /* __MACH_BF537_H__ */
diff --git a/include/asm-blackfin/mach-bf537/blackfin.h b/include/asm-blackfin/mach-bf537/blackfin.h
index bbd97051ec9c..53fcfa3408d0 100644
--- a/include/asm-blackfin/mach-bf537/blackfin.h
+++ b/include/asm-blackfin/mach-bf537/blackfin.h
@@ -43,7 +43,7 @@
43#include "defBF537.h" 43#include "defBF537.h"
44#endif 44#endif
45 45
46#if !(defined(__ASSEMBLY__) || defined(ASSEMBLY)) 46#if !defined(__ASSEMBLY__)
47#include "cdefBF534.h" 47#include "cdefBF534.h"
48 48
49/* UART 0*/ 49/* UART 0*/
@@ -143,284 +143,6 @@
143#define bfin_write_STOPCK_OFF(val) bfin_write_STOPCK(val) 143#define bfin_write_STOPCK_OFF(val) bfin_write_STOPCK(val)
144#define STOPCK_OFF STOPCK 144#define STOPCK_OFF STOPCK
145 145
146/* FIO USE PORT F*/
147#ifdef CONFIG_BF537_PORT_F
148#define bfin_read_PORT_FER() bfin_read_PORTF_FER()
149#define bfin_write_PORT_FER(val) bfin_write_PORTF_FER(val)
150#define bfin_read_FIO_FLAG_D() bfin_read_PORTFIO()
151#define bfin_write_FIO_FLAG_D(val) bfin_write_PORTFIO(val)
152#define bfin_read_FIO_FLAG_C() bfin_read_PORTFIO_CLEAR()
153#define bfin_write_FIO_FLAG_C(val) bfin_write_PORTFIO_CLEAR(val)
154#define bfin_read_FIO_FLAG_S() bfin_read_PORTFIO_SET()
155#define bfin_write_FIO_FLAG_S(val) bfin_write_PORTFIO_SET(val)
156#define bfin_read_FIO_FLAG_T() bfin_read_PORTFIO_TOGGLE()
157#define bfin_write_FIO_FLAG_T(val) bfin_write_PORTFIO_TOGGLE(val)
158#define bfin_read_FIO_MASKA_D() bfin_read_PORTFIO_MASKA()
159#define bfin_write_FIO_MASKA_D(val) bfin_write_PORTFIO_MASKA(val)
160#define bfin_read_FIO_MASKA_C() bfin_read_PORTFIO_MASKA_CLEAR()
161#define bfin_write_FIO_MASKA_C(val) bfin_write_PORTFIO_MASKA_CLEAR(val)
162#define bfin_read_FIO_MASKA_S() bfin_read_PORTFIO_MASKA_SET()
163#define bfin_write_FIO_MASKA_S(val) bfin_write_PORTFIO_MASKA_SET(val)
164#define bfin_read_FIO_MASKA_T() bfin_read_PORTFIO_MASKA_TOGGLE()
165#define bfin_write_FIO_MASKA_T(val) bfin_write_PORTFIO_MASKA_TOGGLE(val)
166#define bfin_read_FIO_MASKB_D() bfin_read_PORTFIO_MASKB()
167#define bfin_write_FIO_MASKB_D(val) bfin_write_PORTFIO_MASKB(val)
168#define bfin_read_FIO_MASKB_C() bfin_read_PORTFIO_MASKB_CLEAR()
169#define bfin_write_FIO_MASKB_C(val) bfin_write_PORTFIO_MASKB_CLEAR(val)
170#define bfin_read_FIO_MASKB_S() bfin_read_PORTFIO_MASKB_SET()
171#define bfin_write_FIO_MASKB_S(val) bfin_write_PORTFIO_MASKB_SET(val)
172#define bfin_read_FIO_MASKB_T() bfin_read_PORTFIO_MASKB_TOGGLE()
173#define bfin_write_FIO_MASKB_T(val) bfin_write_PORTFIO_MASKB_TOGGLE(val)
174#define bfin_read_FIO_DIR() bfin_read_PORTFIO_DIR()
175#define bfin_write_FIO_DIR(val) bfin_write_PORTFIO_DIR(val)
176#define bfin_read_FIO_POLAR() bfin_read_PORTFIO_POLAR()
177#define bfin_write_FIO_POLAR(val) bfin_write_PORTFIO_POLAR(val)
178#define bfin_read_FIO_EDGE() bfin_read_PORTFIO_EDGE()
179#define bfin_write_FIO_EDGE(val) bfin_write_PORTFIO_EDGE(val)
180#define bfin_read_FIO_BOTH() bfin_read_PORTFIO_BOTH()
181#define bfin_write_FIO_BOTH(val) bfin_write_PORTFIO_BOTH(val)
182#define bfin_read_FIO_INEN() bfin_read_PORTFIO_INEN()
183#define bfin_write_FIO_INEN(val) bfin_write_PORTFIO_INEN(val)
184
185#define bfin_read_FIO_FLAG_D() bfin_read_PORTFIO()
186#define bfin_write_FIO_FLAG_D(val) bfin_write_PORTFIO(val)
187#define FIO_FLAG_D PORTFIO
188#define bfin_read_FIO_FLAG_C() bfin_read_PORTFIO_CLEAR()
189#define bfin_write_FIO_FLAG_C(val) bfin_write_PORTFIO_CLEAR(val)
190#define FIO_FLAG_C PORTFIO_CLEAR
191#define bfin_read_FIO_FLAG_S() bfin_read_PORTFIO_SET()
192#define bfin_write_FIO_FLAG_S(val) bfin_write_PORTFIO_SET(val)
193#define FIO_FLAG_S PORTFIO_SET
194#define bfin_read_FIO_FLAG_T() bfin_read_PORTFIO_TOGGLE()
195#define bfin_write_FIO_FLAG_T(val) bfin_write_PORTFIO_TOGGLE(val)
196#define FIO_FLAG_T PORTFIO_TOGGLE
197#define bfin_read_FIO_MASKA_D() bfin_read_PORTFIO_MASKA()
198#define bfin_write_FIO_MASKA_D(val) bfin_write_PORTFIO_MASKA(val)
199#define FIO_MASKA_D PORTFIO_MASKA
200#define bfin_read_FIO_MASKA_C() bfin_read_PORTFIO_MASKA_CLEAR()
201#define bfin_write_FIO_MASKA_C(val) bfin_write_PORTFIO_MASKA_CLEAR(val)
202#define FIO_MASKA_C PORTFIO_MASKA_CLEAR
203#define bfin_read_FIO_MASKA_S() bfin_read_PORTFIO_MASKA_SET()
204#define bfin_write_FIO_MASKA_S(val) bfin_write_PORTFIO_MASKA_SET(val)
205#define FIO_MASKA_S PORTFIO_MASKA_SET
206#define bfin_read_FIO_MASKA_T() bfin_read_PORTFIO_MASKA_TOGGLE()
207#define bfin_write_FIO_MASKA_T(val) bfin_write_PORTFIO_MASKA_TOGGLE(val)
208#define FIO_MASKA_T PORTFIO_MASKA_TOGGLE
209#define bfin_read_FIO_MASKB_D() bfin_read_PORTFIO_MASKB()
210#define bfin_write_FIO_MASKB_D(val) bfin_write_PORTFIO_MASKB(val)
211#define FIO_MASKB_D PORTFIO_MASKB
212#define bfin_read_FIO_MASKB_C() bfin_read_PORTFIO_MASKB_CLEAR()
213#define bfin_write_FIO_MASKB_C(val) bfin_write_PORTFIO_MASKB_CLEAR(val)
214#define FIO_MASKB_C PORTFIO_MASKB_CLEAR
215#define bfin_read_FIO_MASKB_S() bfin_read_PORTFIO_MASKB_SET()
216#define bfin_write_FIO_MASKB_S(val) bfin_write_PORTFIO_MASKB_SET(val)
217#define FIO_MASKB_S PORTFIO_MASKB_SET
218#define bfin_read_FIO_MASKB_T() bfin_read_PORTFIO_MASKB_TOGGLE()
219#define bfin_write_FIO_MASKB_T(val) bfin_write_PORTFIO_MASKB_TOGGLE(val)
220#define FIO_MASKB_T PORTFIO_MASKB_TOGGLE
221#define bfin_read_FIO_DIR() bfin_read_PORTFIO_DIR()
222#define bfin_write_FIO_DIR(val) bfin_write_PORTFIO_DIR(val)
223#define FIO_DIR PORTFIO_DIR
224#define bfin_read_FIO_POLAR() bfin_read_PORTFIO_POLAR()
225#define bfin_write_FIO_POLAR(val) bfin_write_PORTFIO_POLAR(val)
226#define FIO_POLAR PORTFIO_POLAR
227#define bfin_read_FIO_EDGE() bfin_read_PORTFIO_EDGE()
228#define bfin_write_FIO_EDGE(val) bfin_write_PORTFIO_EDGE(val)
229#define FIO_EDGE PORTFIO_EDGE
230#define bfin_read_FIO_BOTH() bfin_read_PORTFIO_BOTH()
231#define bfin_write_FIO_BOTH(val) bfin_write_PORTFIO_BOTH(val)
232#define FIO_BOTH PORTFIO_BOTH
233#define bfin_read_FIO_INEN() bfin_read_PORTFIO_INEN()
234#define bfin_write_FIO_INEN(val) bfin_write_PORTFIO_INEN(val)
235#define FIO_INEN PORTFIO_INEN
236#endif
237
238/* FIO USE PORT G*/
239#ifdef CONFIG_BF537_PORT_G
240#define bfin_read_PORT_FER() bfin_read_PORTG_FER()
241#define bfin_write_PORT_FER(val) bfin_write_PORTG_FER(val)
242#define bfin_read_FIO_FLAG_D() bfin_read_PORTGIO()
243#define bfin_write_FIO_FLAG_D(val) bfin_write_PORTGIO(val)
244#define bfin_read_FIO_FLAG_C() bfin_read_PORTGIO_CLEAR()
245#define bfin_write_FIO_FLAG_C(val) bfin_write_PORTGIO_CLEAR(val)
246#define bfin_read_FIO_FLAG_S() bfin_read_PORTGIO_SET()
247#define bfin_write_FIO_FLAG_S(val) bfin_write_PORTGIO_SET(val)
248#define bfin_read_FIO_FLAG_T() bfin_read_PORTGIO_TOGGLE()
249#define bfin_write_FIO_FLAG_T(val) bfin_write_PORTGIO_TOGGLE(val)
250#define bfin_read_FIO_MASKA_D() bfin_read_PORTGIO_MASKA()
251#define bfin_write_FIO_MASKA_D(val) bfin_write_PORTGIO_MASKA(val)
252#define bfin_read_FIO_MASKA_C() bfin_read_PORTGIO_MASKA_CLEAR()
253#define bfin_write_FIO_MASKA_C(val) bfin_write_PORTGIO_MASKA_CLEAR(val)
254#define bfin_read_FIO_MASKA_S() bfin_read_PORTGIO_MASKA_SET()
255#define bfin_write_FIO_MASKA_S(val) bfin_write_PORTGIO_MASKA_SET(val)
256#define bfin_read_FIO_MASKA_T() bfin_read_PORTGIO_MASKA_TOGGLE()
257#define bfin_write_FIO_MASKA_T(val) bfin_write_PORTGIO_MASKA_TOGGLE(val)
258#define bfin_read_FIO_MASKB_D() bfin_read_PORTGIO_MASKB()
259#define bfin_write_FIO_MASKB_D(val) bfin_write_PORTGIO_MASKB(val)
260#define bfin_read_FIO_MASKB_C() bfin_read_PORTGIO_MASKB_CLEAR()
261#define bfin_write_FIO_MASKB_C(val) bfin_write_PORTGIO_MASKB_CLEAR(val)
262#define bfin_read_FIO_MASKB_S() bfin_read_PORTGIO_MASKB_SET()
263#define bfin_write_FIO_MASKB_S(val) bfin_write_PORTGIO_MASKB_SET(val)
264#define bfin_read_FIO_MASKB_T() bfin_read_PORTGIO_MASKB_TOGGLE()
265#define bfin_write_FIO_MASKB_T(val) bfin_write_PORTGIO_MASKB_TOGGLE(val)
266#define bfin_read_FIO_DIR() bfin_read_PORTGIO_DIR()
267#define bfin_write_FIO_DIR(val) bfin_write_PORTGIO_DIR(val)
268#define bfin_read_FIO_POLAR() bfin_read_PORTGIO_POLAR()
269#define bfin_write_FIO_POLAR(val) bfin_write_PORTGIO_POLAR(val)
270#define bfin_read_FIO_EDGE() bfin_read_PORTGIO_EDGE()
271#define bfin_write_FIO_EDGE(val) bfin_write_PORTGIO_EDGE(val)
272#define bfin_read_FIO_BOTH() bfin_read_PORTGIO_BOTH()
273#define bfin_write_FIO_BOTH(val) bfin_write_PORTGIO_BOTH(val)
274#define bfin_read_FIO_INEN() bfin_read_PORTGIO_INEN()
275#define bfin_write_FIO_INEN(val) bfin_write_PORTGIO_INEN(val)
276
277#define bfin_read_FIO_FLAG_D() bfin_read_PORTGIO()
278#define bfin_write_FIO_FLAG_D(val) bfin_write_PORTGIO(val)
279#define FIO_FLAG_D PORTGIO
280#define bfin_read_FIO_FLAG_C() bfin_read_PORTGIO_CLEAR()
281#define bfin_write_FIO_FLAG_C(val) bfin_write_PORTGIO_CLEAR(val)
282#define FIO_FLAG_C PORTGIO_CLEAR
283#define bfin_read_FIO_FLAG_S() bfin_read_PORTGIO_SET()
284#define bfin_write_FIO_FLAG_S(val) bfin_write_PORTGIO_SET(val)
285#define FIO_FLAG_S PORTGIO_SET
286#define bfin_read_FIO_FLAG_T() bfin_read_PORTGIO_TOGGLE()
287#define bfin_write_FIO_FLAG_T(val) bfin_write_PORTGIO_TOGGLE(val)
288#define FIO_FLAG_T PORTGIO_TOGGLE
289#define bfin_read_FIO_MASKA_D() bfin_read_PORTGIO_MASKA()
290#define bfin_write_FIO_MASKA_D(val) bfin_write_PORTGIO_MASKA(val)
291#define FIO_MASKA_D PORTGIO_MASKA
292#define bfin_read_FIO_MASKA_C() bfin_read_PORTGIO_MASKA_CLEAR()
293#define bfin_write_FIO_MASKA_C(val) bfin_write_PORTGIO_MASKA_CLEAR(val)
294#define FIO_MASKA_C PORTGIO_MASKA_CLEAR
295#define bfin_read_FIO_MASKA_S() bfin_read_PORTGIO_MASKA_SET()
296#define bfin_write_FIO_MASKA_S(val) bfin_write_PORTGIO_MASKA_SET(val)
297#define FIO_MASKA_S PORTGIO_MASKA_SET
298#define bfin_read_FIO_MASKA_T() bfin_read_PORTGIO_MASKA_TOGGLE()
299#define bfin_write_FIO_MASKA_T(val) bfin_write_PORTGIO_MASKA_TOGGLE(val)
300#define FIO_MASKA_T PORTGIO_MASKA_TOGGLE
301#define bfin_read_FIO_MASKB_D() bfin_read_PORTGIO_MASKB()
302#define bfin_write_FIO_MASKB_D(val) bfin_write_PORTGIO_MASKB(val)
303#define FIO_MASKB_D PORTGIO_MASKB
304#define bfin_read_FIO_MASKB_C() bfin_read_PORTGIO_MASKB_CLEAR()
305#define bfin_write_FIO_MASKB_C(val) bfin_write_PORTGIO_MASKB_CLEAR(val)
306#define FIO_MASKB_C PORTGIO_MASKB_CLEAR
307#define bfin_read_FIO_MASKB_S() bfin_read_PORTGIO_MASKB_SET()
308#define bfin_write_FIO_MASKB_S(val) bfin_write_PORTGIO_MASKB_SET(val)
309#define FIO_MASKB_S PORTGIO_MASKB_SET
310#define bfin_read_FIO_MASKB_T() bfin_read_PORTGIO_MASKB_TOGGLE()
311#define bfin_write_FIO_MASKB_T(val) bfin_write_PORTGIO_MASKB_TOGGLE(val)
312#define FIO_MASKB_T PORTGIO_MASKB_TOGGLE
313#define bfin_read_FIO_DIR() bfin_read_PORTGIO_DIR()
314#define bfin_write_FIO_DIR(val) bfin_write_PORTGIO_DIR(val)
315#define FIO_DIR PORTGIO_DIR
316#define bfin_read_FIO_POLAR() bfin_read_PORTGIO_POLAR()
317#define bfin_write_FIO_POLAR(val) bfin_write_PORTGIO_POLAR(val)
318#define FIO_POLAR PORTGIO_POLAR
319#define bfin_read_FIO_EDGE() bfin_read_PORTGIO_EDGE()
320#define bfin_write_FIO_EDGE(val) bfin_write_PORTGIO_EDGE(val)
321#define FIO_EDGE PORTGIO_EDGE
322#define bfin_read_FIO_BOTH() bfin_read_PORTGIO_BOTH()
323#define bfin_write_FIO_BOTH(val) bfin_write_PORTGIO_BOTH(val)
324#define FIO_BOTH PORTGIO_BOTH
325#define bfin_read_FIO_INEN() bfin_read_PORTGIO_INEN()
326#define bfin_write_FIO_INEN(val) bfin_write_PORTGIO_INEN(val)
327#define FIO_INEN PORTGIO_INEN
328
329#endif
330
331/* FIO USE PORT H*/
332#ifdef CONFIG_BF537_PORT_H
333#define bfin_read_PORT_FER() bfin_read_PORTH_FER()
334#define bfin_write_PORT_FER(val) bfin_write_PORTH_FER(val)
335#define bfin_read_FIO_FLAG_D() bfin_read_PORTHIO()
336#define bfin_write_FIO_FLAG_D(val) bfin_write_PORTHIO(val)
337#define bfin_read_FIO_FLAG_C() bfin_read_PORTHIO_CLEAR()
338#define bfin_write_FIO_FLAG_C(val) bfin_write_PORTHIO_CLEAR(val)
339#define bfin_read_FIO_FLAG_S() bfin_read_PORTHIO_SET()
340#define bfin_write_FIO_FLAG_S(val) bfin_write_PORTHIO_SET(val)
341#define bfin_read_FIO_FLAG_T() bfin_read_PORTHIO_TOGGLE()
342#define bfin_write_FIO_FLAG_T(val) bfin_write_PORTHIO_TOGGLE(val)
343#define bfin_read_FIO_MASKA_D() bfin_read_PORTHIO_MASKA()
344#define bfin_write_FIO_MASKA_D(val) bfin_write_PORTHIO_MASKA(val)
345#define bfin_read_FIO_MASKA_C() bfin_read_PORTHIO_MASKA_CLEAR()
346#define bfin_write_FIO_MASKA_C(val) bfin_write_PORTHIO_MASKA_CLEAR(val)
347#define bfin_read_FIO_MASKA_S() bfin_read_PORTHIO_MASKA_SET()
348#define bfin_write_FIO_MASKA_S(val) bfin_write_PORTHIO_MASKA_SET(val)
349#define bfin_read_FIO_MASKA_T() bfin_read_PORTHIO_MASKA_TOGGLE()
350#define bfin_write_FIO_MASKA_T(val) bfin_write_PORTHIO_MASKA_TOGGLE(val)
351#define bfin_read_FIO_MASKB_D() bfin_read_PORTHIO_MASKB()
352#define bfin_write_FIO_MASKB_D(val) bfin_write_PORTHIO_MASKB(val)
353#define bfin_read_FIO_MASKB_C() bfin_read_PORTHIO_MASKB_CLEAR()
354#define bfin_write_FIO_MASKB_C(val) bfin_write_PORTHIO_MASKB_CLEAR(val)
355#define bfin_read_FIO_MASKB_S() bfin_read_PORTHIO_MASKB_SET()
356#define bfin_write_FIO_MASKB_S(val) bfin_write_PORTHIO_MASKB_SET(val)
357#define bfin_read_FIO_MASKB_T() bfin_read_PORTHIO_MASKB_TOGGLE()
358#define bfin_write_FIO_MASKB_T(val) bfin_write_PORTHIO_MASKB_TOGGLE(val)
359#define bfin_read_FIO_DIR() bfin_read_PORTHIO_DIR()
360#define bfin_write_FIO_DIR(val) bfin_write_PORTHIO_DIR(val)
361#define bfin_read_FIO_POLAR() bfin_read_PORTHIO_POLAR()
362#define bfin_write_FIO_POLAR(val) bfin_write_PORTHIO_POLAR(val)
363#define bfin_read_FIO_EDGE() bfin_read_PORTHIO_EDGE()
364#define bfin_write_FIO_EDGE(val) bfin_write_PORTHIO_EDGE(val)
365#define bfin_read_FIO_BOTH() bfin_read_PORTHIO_BOTH()
366#define bfin_write_FIO_BOTH(val) bfin_write_PORTHIO_BOTH(val)
367#define bfin_read_FIO_INEN() bfin_read_PORTHIO_INEN()
368#define bfin_write_FIO_INEN(val) bfin_write_PORTHIO_INEN(val)
369
370#define bfin_read_FIO_FLAG_D() bfin_read_PORTHIO()
371#define bfin_write_FIO_FLAG_D(val) bfin_write_PORTHIO(val)
372#define FIO_FLAG_D PORTHIO
373#define bfin_read_FIO_FLAG_C() bfin_read_PORTHIO_CLEAR()
374#define bfin_write_FIO_FLAG_C(val) bfin_write_PORTHIO_CLEAR(val)
375#define FIO_FLAG_C PORTHIO_CLEAR
376#define bfin_read_FIO_FLAG_S() bfin_read_PORTHIO_SET()
377#define bfin_write_FIO_FLAG_S(val) bfin_write_PORTHIO_SET(val)
378#define FIO_FLAG_S PORTHIO_SET
379#define bfin_read_FIO_FLAG_T() bfin_read_PORTHIO_TOGGLE()
380#define bfin_write_FIO_FLAG_T(val) bfin_write_PORTHIO_TOGGLE(val)
381#define FIO_FLAG_T PORTHIO_TOGGLE
382#define bfin_read_FIO_MASKA_D() bfin_read_PORTHIO_MASKA()
383#define bfin_write_FIO_MASKA_D(val) bfin_write_PORTHIO_MASKA(val)
384#define FIO_MASKA_D PORTHIO_MASKA
385#define bfin_read_FIO_MASKA_C() bfin_read_PORTHIO_MASKA_CLEAR()
386#define bfin_write_FIO_MASKA_C(val) bfin_write_PORTHIO_MASKA_CLEAR(val)
387#define FIO_MASKA_C PORTHIO_MASKA_CLEAR
388#define bfin_read_FIO_MASKA_S() bfin_read_PORTHIO_MASKA_SET()
389#define bfin_write_FIO_MASKA_S(val) bfin_write_PORTHIO_MASKA_SET(val)
390#define FIO_MASKA_S PORTHIO_MASKA_SET
391#define bfin_read_FIO_MASKA_T() bfin_read_PORTHIO_MASKA_TOGGLE()
392#define bfin_write_FIO_MASKA_T(val) bfin_write_PORTHIO_MASKA_TOGGLE(val)
393#define FIO_MASKA_T PORTHIO_MASKA_TOGGLE
394#define bfin_read_FIO_MASKB_D() bfin_read_PORTHIO_MASKB()
395#define bfin_write_FIO_MASKB_D(val) bfin_write_PORTHIO_MASKB(val)
396#define FIO_MASKB_D PORTHIO_MASKB
397#define bfin_read_FIO_MASKB_C() bfin_read_PORTHIO_MASKB_CLEAR()
398#define bfin_write_FIO_MASKB_C(val) bfin_write_PORTHIO_MASKB_CLEAR(val)
399#define FIO_MASKB_C PORTHIO_MASKB_CLEAR
400#define bfin_read_FIO_MASKB_S() bfin_read_PORTHIO_MASKB_SET()
401#define bfin_write_FIO_MASKB_S(val) bfin_write_PORTHIO_MASKB_SET(val)
402#define FIO_MASKB_S PORTHIO_MASKB_SET
403#define bfin_read_FIO_MASKB_T() bfin_read_PORTHIO_MASKB_TOGGLE()
404#define bfin_write_FIO_MASKB_T(val) bfin_write_PORTHIO_MASKB_TOGGLE(val)
405#define FIO_MASKB_T PORTHIO_MASKB_TOGGLE
406#define bfin_read_FIO_DIR() bfin_read_PORTHIO_DIR()
407#define bfin_write_FIO_DIR(val) bfin_write_PORTHIO_DIR(val)
408#define FIO_DIR PORTHIO_DIR
409#define bfin_read_FIO_POLAR() bfin_read_PORTHIO_POLAR()
410#define bfin_write_FIO_POLAR(val) bfin_write_PORTHIO_POLAR(val)
411#define FIO_POLAR PORTHIO_POLAR
412#define bfin_read_FIO_EDGE() bfin_read_PORTHIO_EDGE()
413#define bfin_write_FIO_EDGE(val) bfin_write_PORTHIO_EDGE(val)
414#define FIO_EDGE PORTHIO_EDGE
415#define bfin_read_FIO_BOTH() bfin_read_PORTHIO_BOTH()
416#define bfin_write_FIO_BOTH(val) bfin_write_PORTHIO_BOTH(val)
417#define FIO_BOTH PORTHIO_BOTH
418#define bfin_read_FIO_INEN() bfin_read_PORTHIO_INEN()
419#define bfin_write_FIO_INEN(val) bfin_write_PORTHIO_INEN(val)
420#define FIO_INEN PORTHIO_INEN
421
422#endif
423
424/* PLL_DIV Masks */ 146/* PLL_DIV Masks */
425#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */ 147#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */
426#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */ 148#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */
diff --git a/include/asm-blackfin/mach-bf537/cdefBF534.h b/include/asm-blackfin/mach-bf537/cdefBF534.h
index 84e58fa73dce..78227bc855df 100644
--- a/include/asm-blackfin/mach-bf537/cdefBF534.h
+++ b/include/asm-blackfin/mach-bf537/cdefBF534.h
@@ -32,6 +32,8 @@
32#ifndef _CDEF_BF534_H 32#ifndef _CDEF_BF534_H
33#define _CDEF_BF534_H 33#define _CDEF_BF534_H
34 34
35#include <asm/blackfin.h>
36
35/* Include all Core registers and bit definitions */ 37/* Include all Core registers and bit definitions */
36#include "defBF534.h" 38#include "defBF534.h"
37 39
@@ -57,7 +59,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
57 bfin_write32(SIC_IWR, IWR_ENABLE(0)); 59 bfin_write32(SIC_IWR, IWR_ENABLE(0));
58 60
59 bfin_write16(VR_CTL, val); 61 bfin_write16(VR_CTL, val);
60 __builtin_bfin_ssync(); 62 SSYNC();
61 63
62 local_irq_save(flags); 64 local_irq_save(flags);
63 asm("IDLE;"); 65 asm("IDLE;");
diff --git a/include/asm-blackfin/mach-bf537/defBF534.h b/include/asm-blackfin/mach-bf537/defBF534.h
index 1859f2fee5a7..d0d80d3152ba 100644
--- a/include/asm-blackfin/mach-bf537/defBF534.h
+++ b/include/asm-blackfin/mach-bf537/defBF534.h
@@ -86,6 +86,7 @@
86#define UART0_GCTL 0xFFC00424 /* Global Control Register */ 86#define UART0_GCTL 0xFFC00424 /* Global Control Register */
87 87
88/* SPI Controller (0xFFC00500 - 0xFFC005FF) */ 88/* SPI Controller (0xFFC00500 - 0xFFC005FF) */
89#define SPI0_REGBASE 0xFFC00500
89#define SPI_CTL 0xFFC00500 /* SPI Control Register */ 90#define SPI_CTL 0xFFC00500 /* SPI Control Register */
90#define SPI_FLG 0xFFC00504 /* SPI Flag register */ 91#define SPI_FLG 0xFFC00504 /* SPI Flag register */
91#define SPI_STAT 0xFFC00508 /* SPI Status register */ 92#define SPI_STAT 0xFFC00508 /* SPI Status register */
@@ -456,6 +457,7 @@
456#define PPI_FRAME 0xFFC01010 /* PPI Frame Length Register */ 457#define PPI_FRAME 0xFFC01010 /* PPI Frame Length Register */
457 458
458/* Two-Wire Interface (0xFFC01400 - 0xFFC014FF) */ 459/* Two-Wire Interface (0xFFC01400 - 0xFFC014FF) */
460#define TWI0_REGBASE 0xFFC01400
459#define TWI_CLKDIV 0xFFC01400 /* Serial Clock Divider Register */ 461#define TWI_CLKDIV 0xFFC01400 /* Serial Clock Divider Register */
460#define TWI_CONTROL 0xFFC01404 /* TWI Control Register */ 462#define TWI_CONTROL 0xFFC01404 /* TWI Control Register */
461#define TWI_SLAVE_CTL 0xFFC01408 /* Slave Mode Control Register */ 463#define TWI_SLAVE_CTL 0xFFC01408 /* Slave Mode Control Register */
@@ -1165,7 +1167,7 @@
1165#define GM 0x0008 /* Get More (When RDBR Full, Overwrite/Discard*) */ 1167#define GM 0x0008 /* Get More (When RDBR Full, Overwrite/Discard*) */
1166#define PSSE 0x0010 /* Slave-Select Input Enable */ 1168#define PSSE 0x0010 /* Slave-Select Input Enable */
1167#define EMISO 0x0020 /* Enable MISO As Output */ 1169#define EMISO 0x0020 /* Enable MISO As Output */
1168#define SPI_SIZE 0x0100 /* Size of Words (16/8* Bits) */ 1170#define SIZE 0x0100 /* Size of Words (16/8* Bits) */
1169#define LSBF 0x0200 /* LSB First */ 1171#define LSBF 0x0200 /* LSB First */
1170#define CPHA 0x0400 /* Clock Phase */ 1172#define CPHA 0x0400 /* Clock Phase */
1171#define CPOL 0x0800 /* Clock Polarity */ 1173#define CPOL 0x0800 /* Clock Polarity */
diff --git a/include/asm-blackfin/mach-bf537/irq.h b/include/asm-blackfin/mach-bf537/irq.h
index 8af2a832ef6b..36c44bc1a917 100644
--- a/include/asm-blackfin/mach-bf537/irq.h
+++ b/include/asm-blackfin/mach-bf537/irq.h
@@ -160,6 +160,8 @@ Core Emulation **
160#define IRQ_PH14 96 160#define IRQ_PH14 96
161#define IRQ_PH15 97 161#define IRQ_PH15 97
162 162
163#define GPIO_IRQ_BASE IRQ_PF0
164
163#ifdef CONFIG_IRQCHIP_DEMUX_GPIO 165#ifdef CONFIG_IRQCHIP_DEMUX_GPIO
164#define NR_IRQS (IRQ_PH15+1) 166#define NR_IRQS (IRQ_PH15+1)
165#else 167#else
diff --git a/include/asm-blackfin/mach-bf537/mem_map.h b/include/asm-blackfin/mach-bf537/mem_map.h
index 2a808c1202bf..18759e38eaae 100644
--- a/include/asm-blackfin/mach-bf537/mem_map.h
+++ b/include/asm-blackfin/mach-bf537/mem_map.h
@@ -52,10 +52,10 @@
52 52
53/* Memory Map for ADSP-BF537 processors */ 53/* Memory Map for ADSP-BF537 processors */
54 54
55#ifdef CONFIG_BLKFIN_CACHE 55#ifdef CONFIG_BFIN_ICACHE
56#define BLKFIN_ICACHESIZE (16*1024) 56#define BFIN_ICACHESIZE (16*1024)
57#else 57#else
58#define BLKFIN_ICACHESIZE (0*1024) 58#define BFIN_ICACHESIZE (0*1024)
59#endif 59#endif
60 60
61 61
@@ -66,29 +66,29 @@
66 66
67#define L1_CODE_LENGTH 0xC000 67#define L1_CODE_LENGTH 0xC000
68 68
69#ifdef CONFIG_BLKFIN_DCACHE 69#ifdef CONFIG_BFIN_DCACHE
70 70
71#ifdef CONFIG_BLKFIN_DCACHE_BANKA 71#ifdef CONFIG_BFIN_DCACHE_BANKA
72#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0) 72#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0)
73#define L1_DATA_A_LENGTH (0x8000 - 0x4000) 73#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
74#define L1_DATA_B_LENGTH 0x8000 74#define L1_DATA_B_LENGTH 0x8000
75#define BLKFIN_DCACHESIZE (16*1024) 75#define BFIN_DCACHESIZE (16*1024)
76#define BLKFIN_DSUPBANKS 1 76#define BFIN_DSUPBANKS 1
77#else 77#else
78#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0) 78#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0)
79#define L1_DATA_A_LENGTH (0x8000 - 0x4000) 79#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
80#define L1_DATA_B_LENGTH (0x8000 - 0x4000) 80#define L1_DATA_B_LENGTH (0x8000 - 0x4000)
81#define BLKFIN_DCACHESIZE (32*1024) 81#define BFIN_DCACHESIZE (32*1024)
82#define BLKFIN_DSUPBANKS 2 82#define BFIN_DSUPBANKS 2
83#endif 83#endif
84 84
85#else 85#else
86#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0) 86#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0)
87#define L1_DATA_A_LENGTH 0x8000 87#define L1_DATA_A_LENGTH 0x8000
88#define L1_DATA_B_LENGTH 0x8000 88#define L1_DATA_B_LENGTH 0x8000
89#define BLKFIN_DCACHESIZE (0*1024) 89#define BFIN_DCACHESIZE (0*1024)
90#define BLKFIN_DSUPBANKS 0 90#define BFIN_DSUPBANKS 0
91#endif /*CONFIG_BLKFIN_DCACHE*/ 91#endif /*CONFIG_BFIN_DCACHE*/
92 92
93#endif /*CONFIG_BF537*/ 93#endif /*CONFIG_BF537*/
94 94
@@ -102,30 +102,30 @@
102#define L1_CODE_LENGTH 0xC000 102#define L1_CODE_LENGTH 0xC000
103 103
104 104
105#ifdef CONFIG_BLKFIN_DCACHE 105#ifdef CONFIG_BFIN_DCACHE
106 106
107#ifdef CONFIG_BLKFIN_DCACHE_BANKA 107#ifdef CONFIG_BFIN_DCACHE_BANKA
108#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0) 108#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0)
109#define L1_DATA_A_LENGTH (0x4000 - 0x4000) 109#define L1_DATA_A_LENGTH (0x4000 - 0x4000)
110#define L1_DATA_B_LENGTH 0x4000 110#define L1_DATA_B_LENGTH 0x4000
111#define BLKFIN_DCACHESIZE (16*1024) 111#define BFIN_DCACHESIZE (16*1024)
112#define BLKFIN_DSUPBANKS 1 112#define BFIN_DSUPBANKS 1
113 113
114#else 114#else
115#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0) 115#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0)
116#define L1_DATA_A_LENGTH (0x4000 - 0x4000) 116#define L1_DATA_A_LENGTH (0x4000 - 0x4000)
117#define L1_DATA_B_LENGTH (0x4000 - 0x4000) 117#define L1_DATA_B_LENGTH (0x4000 - 0x4000)
118#define BLKFIN_DCACHESIZE (32*1024) 118#define BFIN_DCACHESIZE (32*1024)
119#define BLKFIN_DSUPBANKS 2 119#define BFIN_DSUPBANKS 2
120#endif 120#endif
121 121
122#else 122#else
123#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0) 123#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0)
124#define L1_DATA_A_LENGTH 0x4000 124#define L1_DATA_A_LENGTH 0x4000
125#define L1_DATA_B_LENGTH 0x4000 125#define L1_DATA_B_LENGTH 0x4000
126#define BLKFIN_DCACHESIZE (0*1024) 126#define BFIN_DCACHESIZE (0*1024)
127#define BLKFIN_DSUPBANKS 0 127#define BFIN_DSUPBANKS 0
128#endif /*CONFIG_BLKFIN_DCACHE*/ 128#endif /*CONFIG_BFIN_DCACHE*/
129 129
130#endif 130#endif
131 131
@@ -138,30 +138,30 @@
138 138
139#define L1_CODE_LENGTH 0xC000 139#define L1_CODE_LENGTH 0xC000
140 140
141#ifdef CONFIG_BLKFIN_DCACHE 141#ifdef CONFIG_BFIN_DCACHE
142 142
143#ifdef CONFIG_BLKFIN_DCACHE_BANKA 143#ifdef CONFIG_BFIN_DCACHE_BANKA
144#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0) 144#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0)
145#define L1_DATA_A_LENGTH (0x8000 - 0x4000) 145#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
146#define L1_DATA_B_LENGTH 0x8000 146#define L1_DATA_B_LENGTH 0x8000
147#define BLKFIN_DCACHESIZE (16*1024) 147#define BFIN_DCACHESIZE (16*1024)
148#define BLKFIN_DSUPBANKS 1 148#define BFIN_DSUPBANKS 1
149 149
150#else 150#else
151#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0) 151#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0)
152#define L1_DATA_A_LENGTH (0x8000 - 0x4000) 152#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
153#define L1_DATA_B_LENGTH (0x8000 - 0x4000) 153#define L1_DATA_B_LENGTH (0x8000 - 0x4000)
154#define BLKFIN_DCACHESIZE (32*1024) 154#define BFIN_DCACHESIZE (32*1024)
155#define BLKFIN_DSUPBANKS 2 155#define BFIN_DSUPBANKS 2
156#endif 156#endif
157 157
158#else 158#else
159#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0) 159#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0)
160#define L1_DATA_A_LENGTH 0x8000 160#define L1_DATA_A_LENGTH 0x8000
161#define L1_DATA_B_LENGTH 0x8000 161#define L1_DATA_B_LENGTH 0x8000
162#define BLKFIN_DCACHESIZE (0*1024) 162#define BFIN_DCACHESIZE (0*1024)
163#define BLKFIN_DSUPBANKS 0 163#define BFIN_DSUPBANKS 0
164#endif /*CONFIG_BLKFIN_DCACHE*/ 164#endif /*CONFIG_BFIN_DCACHE*/
165 165
166#endif 166#endif
167 167
diff --git a/include/asm-blackfin/mach-bf537/portmux.h b/include/asm-blackfin/mach-bf537/portmux.h
index ae6c53b28452..5a3f7d3bf73d 100644
--- a/include/asm-blackfin/mach-bf537/portmux.h
+++ b/include/asm-blackfin/mach-bf537/portmux.h
@@ -99,7 +99,7 @@
99#define P_SPORT0_DRPRI (P_DEFINED | P_IDENT(PORT_PJ8) | P_FUNCT(0)) 99#define P_SPORT0_DRPRI (P_DEFINED | P_IDENT(PORT_PJ8) | P_FUNCT(0))
100#define P_SPORT0_TSCLK (P_DEFINED | P_IDENT(PORT_PJ9) | P_FUNCT(0)) 100#define P_SPORT0_TSCLK (P_DEFINED | P_IDENT(PORT_PJ9) | P_FUNCT(0))
101#define P_SPORT0_TFS (P_DEFINED | P_IDENT(PORT_PJ10) | P_FUNCT(0)) 101#define P_SPORT0_TFS (P_DEFINED | P_IDENT(PORT_PJ10) | P_FUNCT(0))
102#define P_SPORT0_DTPRI (P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(1)) 102#define P_SPORT0_DTPRI (P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(0))
103#define P_CAN0_RX (P_DEFINED | P_IDENT(PORT_PJ4) | P_FUNCT(1)) 103#define P_CAN0_RX (P_DEFINED | P_IDENT(PORT_PJ4) | P_FUNCT(1))
104#define P_CAN0_TX (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(1)) 104#define P_CAN0_TX (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(1))
105#define P_SPI0_SSEL3 (P_DEFINED | P_IDENT(PORT_PJ10) | P_FUNCT(1)) 105#define P_SPI0_SSEL3 (P_DEFINED | P_IDENT(PORT_PJ10) | P_FUNCT(1))
diff --git a/include/asm-blackfin/mach-bf548/anomaly.h b/include/asm-blackfin/mach-bf548/anomaly.h
index aca1d4ba145c..c5b63759cdee 100644
--- a/include/asm-blackfin/mach-bf548/anomaly.h
+++ b/include/asm-blackfin/mach-bf548/anomaly.h
@@ -1,74 +1,85 @@
1
2/* 1/*
3 * File: include/asm-blackfin/mach-bf548/anomaly.h 2 * File: include/asm-blackfin/mach-bf548/anomaly.h
4 * Based on: 3 * Bugs: Enter bugs at http://blackfin.uclinux.org/
5 * Author:
6 *
7 * Created:
8 * Description:
9 *
10 * Rev:
11 *
12 * Modified:
13 *
14 *
15 * Bugs: Enter bugs at http://blackfin.uclinux.org/
16 * 4 *
17 * This program is free software; you can redistribute it and/or modify 5 * Copyright (C) 2004-2007 Analog Devices Inc.
18 * it under the terms of the GNU General Public License as published by 6 * Licensed under the GPL-2 or later.
19 * the Free Software Foundation; either version 2, or (at your option) 7 */
20 * any later version. 8
21 * 9/* This file shoule be up to date with:
22 * This program is distributed in the hope that it will be useful, 10 * - Revision C, July 16, 2007; ADSP-BF549 Silicon Anomaly List
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * You should have received a copy of the GNU General Public License
28 * along with this program; see the file COPYING.
29 * If not, write to the Free Software Foundation,
30 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 */ 11 */
32 12
33#ifndef _MACH_ANOMALY_H_ 13#ifndef _MACH_ANOMALY_H_
34#define _MACH_ANOMALY_H_ 14#define _MACH_ANOMALY_H_
35#define ANOMALY_05000074 /* A multi issue instruction with dsp32shiftimm in
36 slot1 and store of a P register in slot 2 is not
37 supported */
38#define ANOMALY_05000119 /* DMA_RUN bit is not valid after a Peripheral Receive
39 Channel DMA stops */
40#define ANOMALY_05000122 /* Rx.H can not be used to access 16-bit System MMR
41 registers. */
42#define ANOMALY_05000245 /* Spurious Hardware Error from an Access in the
43 Shadow of a Conditional Branch */
44#define ANOMALY_05000255 /* Entering Hibernate Mode with RTC Seconds event
45 interrupt not functional */
46#define ANOMALY_05000265 /* Sensitivity to noise with slow input edge rates on
47 SPORT external receive and transmit clocks. */
48#define ANOMALY_05000272 /* Certain data cache write through modes fail for
49 VDDint <=0.9V */
50#define ANOMALY_05000281 /* False Hardware Error Exception when ISR context is
51 not restored */
52#define ANOMALY_05000310 /* False Hardware Errors Caused by Fetches at the
53 Boundary of Reserved Memory */
54#define ANOMALY_05000312 /* Errors When SSYNC, CSYNC, or Loads to LT, LB and
55 LC Registers Are Interrupted */
56#define ANOMALY_05000324 /* TWI Slave Boot Mode Is Not Functional */
57#define ANOMALY_05000325 /* External FIFO Boot Mode Is Not Functional */
58#define ANOMALY_05000327 /* Data Lost When Core and DMA Accesses Are Made to
59 the USB FIFO Simultaneously */
60#define ANOMALY_05000328 /* Incorrect Access of OTP_STATUS During otp_write()
61 function */
62#define ANOMALY_05000329 /* Synchronous Burst Flash Boot Mode Is Not Functional
63 */
64#define ANOMALY_05000330 /* Host DMA Boot Mode Is Not Functional */
65#define ANOMALY_05000334 /* Inadequate Timing Margins on DDR DQS to DQ and DQM
66 Skew */
67#define ANOMALY_05000335 /* Inadequate Rotary Debounce Logic Duration */
68#define ANOMALY_05000336 /* Phantom Interrupt Occurs After First Configuration
69 of Host DMA Port */
70#define ANOMALY_05000337 /* Disallowed Configuration Prevents Subsequent
71 Allowed Configuration on Host DMA Port */
72#define ANOMALY_05000338 /* Slave-Mode SPI0 MISO Failure With CPHA = 0 */
73 15
74#endif /* _MACH_ANOMALY_H_ */ 16/* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot 2 Not Supported */
17#define ANOMALY_05000074 (1)
18/* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */
19#define ANOMALY_05000119 (1)
20/* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */
21#define ANOMALY_05000122 (1)
22/* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */
23#define ANOMALY_05000245 (1)
24/* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */
25#define ANOMALY_05000265 (1)
26/* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */
27#define ANOMALY_05000272 (1)
28/* False Hardware Error Exception when ISR context is not restored */
29#define ANOMALY_05000281 (1)
30/* SSYNCs After Writes To CAN/DMA MMR Registers Are Not Always Handled Correctly */
31#define ANOMALY_05000304 (1)
32/* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */
33#define ANOMALY_05000310 (1)
34/* Errors When SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */
35#define ANOMALY_05000312 (1)
36/* TWI Slave Boot Mode Is Not Functional */
37#define ANOMALY_05000324 (1)
38/* External FIFO Boot Mode Is Not Functional */
39#define ANOMALY_05000325 (1)
40/* Data Lost When Core and DMA Accesses Are Made to the USB FIFO Simultaneously */
41#define ANOMALY_05000327 (1)
42/* Incorrect Access of OTP_STATUS During otp_write() Function */
43#define ANOMALY_05000328 (1)
44/* Synchronous Burst Flash Boot Mode Is Not Functional */
45#define ANOMALY_05000329 (1)
46/* Host DMA Boot Mode Is Not Functional */
47#define ANOMALY_05000330 (1)
48/* Inadequate Timing Margins on DDR DQS to DQ and DQM Skew */
49#define ANOMALY_05000334 (1)
50/* Inadequate Rotary Debounce Logic Duration */
51#define ANOMALY_05000335 (1)
52/* Phantom Interrupt Occurs After First Configuration of Host DMA Port */
53#define ANOMALY_05000336 (1)
54/* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */
55#define ANOMALY_05000337 (1)
56/* Slave-Mode SPI0 MISO Failure With CPHA = 0 */
57#define ANOMALY_05000338 (1)
58/* If Memory Reads Are Enabled on SDH or HOSTDP, Other DMAC1 Peripherals Cannot Read */
59#define ANOMALY_05000340 (1)
60/* Boot Host Wait (HWAIT) and Boot Host Wait Alternate (HWAITA) Signals Are Swapped */
61#define ANOMALY_05000344 (1)
62/* USB Calibration Value Is Not Intialized */
63#define ANOMALY_05000346 (1)
64/* Boot ROM Kernel Incorrectly Alters Reset Value of USB Register */
65#define ANOMALY_05000347 (1)
66/* Data Lost when Core Reads SDH Data FIFO */
67#define ANOMALY_05000349 (1)
68/* PLL Status Register Is Inaccurate */
69#define ANOMALY_05000351 (1)
70
71/* Anomalies that don't exist on this proc */
72#define ANOMALY_05000125 (0)
73#define ANOMALY_05000158 (0)
74#define ANOMALY_05000183 (0)
75#define ANOMALY_05000198 (0)
76#define ANOMALY_05000230 (0)
77#define ANOMALY_05000244 (0)
78#define ANOMALY_05000261 (0)
79#define ANOMALY_05000263 (0)
80#define ANOMALY_05000266 (0)
81#define ANOMALY_05000273 (0)
82#define ANOMALY_05000311 (0)
83#define ANOMALY_05000323 (0)
84
85#endif
diff --git a/include/asm-blackfin/mach-bf548/bf548.h b/include/asm-blackfin/mach-bf548/bf548.h
index 9498313a2cb7..7e6d349beb08 100644
--- a/include/asm-blackfin/mach-bf548/bf548.h
+++ b/include/asm-blackfin/mach-bf548/bf548.h
@@ -52,12 +52,12 @@
52/***************************/ 52/***************************/
53 53
54 54
55#define BLKFIN_DSUBBANKS 4 55#define BFIN_DSUBBANKS 4
56#define BLKFIN_DWAYS 2 56#define BFIN_DWAYS 2
57#define BLKFIN_DLINES 64 57#define BFIN_DLINES 64
58#define BLKFIN_ISUBBANKS 4 58#define BFIN_ISUBBANKS 4
59#define BLKFIN_IWAYS 4 59#define BFIN_IWAYS 4
60#define BLKFIN_ILINES 32 60#define BFIN_ILINES 32
61 61
62#define WAY0_L 0x1 62#define WAY0_L 0x1
63#define WAY1_L 0x2 63#define WAY1_L 0x2
@@ -106,93 +106,6 @@
106 106
107#define AMGCTLVAL (V_AMBEN | V_AMCKEN) 107#define AMGCTLVAL (V_AMBEN | V_AMCKEN)
108 108
109#define MAX_VC 650000000
110#define MIN_VC 50000000
111
112/********************************PLL Settings **************************************/
113#ifdef CONFIG_BFIN_KERNEL_CLOCK
114#if (CONFIG_VCO_MULT < 0)
115#error "VCO Multiplier is less than 0. Please select a different value"
116#endif
117
118#if (CONFIG_VCO_MULT == 0)
119#error "VCO Multiplier should be greater than 0. Please select a different value"
120#endif
121
122#if (CONFIG_VCO_MULT > 64)
123#error "VCO Multiplier is more than 64. Please select a different value"
124#endif
125
126#ifndef CONFIG_CLKIN_HALF
127#define CONFIG_VCO_HZ (CONFIG_CLKIN_HZ * CONFIG_VCO_MULT)
128#else
129#define CONFIG_VCO_HZ ((CONFIG_CLKIN_HZ * CONFIG_VCO_MULT)/2)
130#endif
131
132#ifndef CONFIG_PLL_BYPASS
133#define CONFIG_CCLK_HZ (CONFIG_VCO_HZ/CONFIG_CCLK_DIV)
134#define CONFIG_SCLK_HZ (CONFIG_VCO_HZ/CONFIG_SCLK_DIV)
135#else
136#define CONFIG_CCLK_HZ CONFIG_CLKIN_HZ
137#define CONFIG_SCLK_HZ CONFIG_CLKIN_HZ
138#endif
139
140#if (CONFIG_SCLK_DIV < 1)
141#error "SCLK DIV cannot be less than 1 or more than 15. Please select a proper value"
142#endif
143
144#if (CONFIG_SCLK_DIV > 15)
145#error "SCLK DIV cannot be less than 1 or more than 15. Please select a proper value"
146#endif
147
148#if (CONFIG_CCLK_DIV != 1)
149#if (CONFIG_CCLK_DIV != 2)
150#if (CONFIG_CCLK_DIV != 4)
151#if (CONFIG_CCLK_DIV != 8)
152#error "CCLK DIV can be 1,2,4 or 8 only. Please select a proper value"
153#endif
154#endif
155#endif
156#endif
157
158#if (CONFIG_VCO_HZ > MAX_VC)
159#error "VCO selected is more than maximum value. Please change the VCO multipler"
160#endif
161
162#if (CONFIG_SCLK_HZ > 133000000)
163#error "Sclk value selected is more than maximum. Please select a proper value for SCLK multiplier"
164#endif
165
166#if (CONFIG_SCLK_HZ < 27000000)
167#error "Sclk value selected is less than minimum. Please select a proper value for SCLK multiplier"
168#endif
169
170#if (CONFIG_SCLK_HZ >= CONFIG_CCLK_HZ)
171#if (CONFIG_SCLK_HZ != CONFIG_CLKIN_HZ)
172#if (CONFIG_CCLK_HZ != CONFIG_CLKIN_HZ)
173#error "Please select sclk less than cclk"
174#endif
175#endif
176#endif
177
178#if (CONFIG_CCLK_DIV == 1)
179#define CONFIG_CCLK_ACT_DIV CCLK_DIV1
180#endif
181#if (CONFIG_CCLK_DIV == 2)
182#define CONFIG_CCLK_ACT_DIV CCLK_DIV2
183#endif
184#if (CONFIG_CCLK_DIV == 4)
185#define CONFIG_CCLK_ACT_DIV CCLK_DIV4
186#endif
187#if (CONFIG_CCLK_DIV == 8)
188#define CONFIG_CCLK_ACT_DIV CCLK_DIV8
189#endif
190#ifndef CONFIG_CCLK_ACT_DIV
191#define CONFIG_CCLK_ACT_DIV CONFIG_CCLK_DIV_not_defined_properly
192#endif
193
194#endif /* CONFIG_BFIN_KERNEL_CLOCK */
195
196#ifdef CONFIG_BF542 109#ifdef CONFIG_BF542
197#define CPU "BF542" 110#define CPU "BF542"
198#define CPUID 0x027c8000 111#define CPUID 0x027c8000
@@ -213,59 +126,4 @@
213#define CPUID 0x0 126#define CPUID 0x0
214#endif 127#endif
215 128
216#if (CONFIG_MEM_SIZE % 4)
217#error "SDRAM mem size must be multible of 4MB"
218#endif
219
220#define SDRAM_IGENERIC (CPLB_L1_CHBL | CPLB_USER_RD | CPLB_VALID | CPLB_PORTPRIO)
221#define SDRAM_IKERNEL (SDRAM_IGENERIC | CPLB_LOCK)
222#define L1_IMEMORY ( CPLB_USER_RD | CPLB_VALID | CPLB_LOCK)
223#define SDRAM_INON_CHBL ( CPLB_USER_RD | CPLB_VALID)
224
225/*Use the menuconfig cache policy here - CONFIG_BLKFIN_WT/CONFIG_BLKFIN_WB*/
226
227#define ANOMALY_05000158_WORKAROUND 0x200
228#ifdef CONFIG_BLKFIN_WB /*Write Back Policy */
229#define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_DIRTY \
230 | CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND)
231#else /*Write Through */
232#define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW \
233 | CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_DIRTY )
234#endif
235
236
237#define L1_DMEMORY (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY )
238#define SDRAM_DNON_CHBL (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_DIRTY )
239#define SDRAM_EBIU (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_DIRTY )
240#define SDRAM_OOPS (CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY )
241
242#define SIZE_1K 0x00000400 /* 1K */
243#define SIZE_4K 0x00001000 /* 4K */
244#define SIZE_1M 0x00100000 /* 1M */
245#define SIZE_4M 0x00400000 /* 4M */
246
247#define MAX_CPLBS (16 * 2)
248
249/*
250* Number of required data CPLB switchtable entries
251* MEMSIZE / 4 (we mostly install 4M page size CPLBs
252* approx 16 for smaller 1MB page size CPLBs for allignment purposes
253* 1 for L1 Data Memory
254* 1 for CONFIG_DEBUG_HUNT_FOR_ZERO
255* 1 for ASYNC Memory
256*/
257
258
259#define MAX_SWITCH_D_CPLBS (((CONFIG_MEM_SIZE / 4) + 16 + 1 + 1 + 1) * 2)
260
261/*
262* Number of required instruction CPLB switchtable entries
263* MEMSIZE / 4 (we mostly install 4M page size CPLBs
264* approx 12 for smaller 1MB page size CPLBs for allignment purposes
265* 1 for L1 Instruction Memory
266* 1 for CONFIG_DEBUG_HUNT_FOR_ZERO
267*/
268
269#define MAX_SWITCH_I_CPLBS (((CONFIG_MEM_SIZE / 4) + 12 + 1 + 1) * 2)
270
271#endif /* __MACH_BF48_H__ */ 129#endif /* __MACH_BF48_H__ */
diff --git a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
index 2f4afc90db11..f21a1620e6bd 100644
--- a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
@@ -1,5 +1,6 @@
1#include <linux/serial.h> 1#include <linux/serial.h>
2#include <asm/dma.h> 2#include <asm/dma.h>
3#include <asm/portmux.h>
3 4
4#define NR_PORTS 4 5#define NR_PORTS 4
5 6
@@ -143,50 +144,48 @@ struct bfin_serial_res bfin_serial_resource[] = {
143 144
144int nr_ports = ARRAY_SIZE(bfin_serial_resource); 145int nr_ports = ARRAY_SIZE(bfin_serial_resource);
145 146
147#define DRIVER_NAME "bfin-uart"
148
146static void bfin_serial_hw_init(struct bfin_serial_port *uart) 149static void bfin_serial_hw_init(struct bfin_serial_port *uart)
147{ 150{
148#ifdef CONFIG_SERIAL_BFIN_UART0 151#ifdef CONFIG_SERIAL_BFIN_UART0
149 /* Enable UART0 RX and TX on pin 7 & 8 of PORT E */ 152 peripheral_request(P_UART0_TX, DRIVER_NAME);
150 bfin_write_PORTE_FER(0x180 | bfin_read_PORTE_FER()); 153 peripheral_request(P_UART0_RX, DRIVER_NAME);
151 bfin_write_PORTE_MUX(0x3C000 | bfin_read_PORTE_MUX());
152#endif 154#endif
153 155
154#ifdef CONFIG_SERIAL_BFIN_UART1 156#ifdef CONFIG_SERIAL_BFIN_UART1
155 /* Enable UART1 RX and TX on pin 0 & 1 of PORT H */ 157 peripheral_request(P_UART1_TX, DRIVER_NAME);
156 bfin_write_PORTH_FER(0x3 | bfin_read_PORTH_FER()); 158 peripheral_request(P_UART1_RX, DRIVER_NAME);
157 bfin_write_PORTH_MUX(~0xF & bfin_read_PORTH_MUX()); 159
158#ifdef CONFIG_BFIN_UART1_CTSRTS 160#ifdef CONFIG_BFIN_UART1_CTSRTS
159 /* Enable UART1 RTS and CTS on pin 9 & 10 of PORT E */ 161 peripheral_request(P_UART1_RTS, DRIVER_NAME);
160 bfin_write_PORTE_FER(0x600 | bfin_read_PORTE_FER()); 162 peripheral_request(P_UART1_CTS DRIVER_NAME);
161 bfin_write_PORTE_MUX(~0x3C0000 & bfin_read_PORTE_MUX());
162#endif 163#endif
163#endif 164#endif
164 165
165#ifdef CONFIG_SERIAL_BFIN_UART2 166#ifdef CONFIG_SERIAL_BFIN_UART2
166 /* Enable UART2 RX and TX on pin 4 & 5 of PORT B */ 167 peripheral_request(P_UART2_TX, DRIVER_NAME);
167 bfin_write_PORTB_FER(0x30 | bfin_read_PORTB_FER()); 168 peripheral_request(P_UART2_RX, DRIVER_NAME);
168 bfin_write_PORTB_MUX(~0xF00 & bfin_read_PORTB_MUX());
169#endif 169#endif
170 170
171#ifdef CONFIG_SERIAL_BFIN_UART3 171#ifdef CONFIG_SERIAL_BFIN_UART3
172 /* Enable UART3 RX and TX on pin 6 & 7 of PORT B */ 172 peripheral_request(P_UART3_TX, DRIVER_NAME);
173 bfin_write_PORTB_FER(0xC0 | bfin_read_PORTB_FER()); 173 peripheral_request(P_UART3_RX, DRIVER_NAME);
174 bfin_write_PORTB_MUX(~0xF000 | bfin_read_PORTB_MUX()); 174
175#ifdef CONFIG_BFIN_UART3_CTSRTS 175#ifdef CONFIG_BFIN_UART3_CTSRTS
176 /* Enable UART3 RTS and CTS on pin 2 & 3 of PORT B */ 176 peripheral_request(P_UART3_RTS, DRIVER_NAME);
177 bfin_write_PORTB_FER(0xC | bfin_read_PORTB_FER()); 177 peripheral_request(P_UART3_CTS DRIVER_NAME);
178 bfin_write_PORTB_MUX(~0xF0 | bfin_read_PORTB_MUX());
179#endif 178#endif
180#endif 179#endif
181 SSYNC(); 180 SSYNC();
182#ifdef CONFIG_SERIAL_BFIN_CTSRTS 181#ifdef CONFIG_SERIAL_BFIN_CTSRTS
183 if (uart->cts_pin >= 0) { 182 if (uart->cts_pin >= 0) {
184 gpio_request(uart->cts_pin, NULL); 183 gpio_request(uart->cts_pin, DRIVER_NAME);
185 gpio_direction_input(uart->cts_pin); 184 gpio_direction_input(uart->cts_pin);
186 } 185 }
187 186
188 if (uart->rts_pin >= 0) { 187 if (uart->rts_pin >= 0) {
189 gpio_request(uart->rts_pin, NULL); 188 gpio_request(uart->rts_pin, DRIVER_NAME);
190 gpio_direction_output(uart->rts_pin); 189 gpio_direction_output(uart->rts_pin);
191 } 190 }
192#endif 191#endif
diff --git a/include/asm-blackfin/mach-bf548/blackfin.h b/include/asm-blackfin/mach-bf548/blackfin.h
index 791218fe7d94..19e84dd4c99c 100644
--- a/include/asm-blackfin/mach-bf548/blackfin.h
+++ b/include/asm-blackfin/mach-bf548/blackfin.h
@@ -54,7 +54,7 @@
54#include "defBF549.h" 54#include "defBF549.h"
55#endif 55#endif
56 56
57#if !(defined(__ASSEMBLY__) || defined(ASSEMBLY)) 57#if !defined(__ASSEMBLY__)
58#ifdef CONFIG_BF542 58#ifdef CONFIG_BF542
59#include "cdefBF542.h" 59#include "cdefBF542.h"
60#endif 60#endif
diff --git a/include/asm-blackfin/mach-bf548/cdefBF54x_base.h b/include/asm-blackfin/mach-bf548/cdefBF54x_base.h
index cdf29e75ea59..aefab3f618c1 100644
--- a/include/asm-blackfin/mach-bf548/cdefBF54x_base.h
+++ b/include/asm-blackfin/mach-bf548/cdefBF54x_base.h
@@ -31,6 +31,8 @@
31#ifndef _CDEF_BF54X_H 31#ifndef _CDEF_BF54X_H
32#define _CDEF_BF54X_H 32#define _CDEF_BF54X_H
33 33
34#include <asm/blackfin.h>
35
34#include "defBF54x_base.h" 36#include "defBF54x_base.h"
35#include <asm/system.h> 37#include <asm/system.h>
36 38
@@ -60,7 +62,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
60 bfin_write32(SIC_IWR2, 0); 62 bfin_write32(SIC_IWR2, 0);
61 63
62 bfin_write16(VR_CTL, val); 64 bfin_write16(VR_CTL, val);
63 __builtin_bfin_ssync(); 65 SSYNC();
64 66
65 local_irq_save(flags); 67 local_irq_save(flags);
66 asm("IDLE;"); 68 asm("IDLE;");
diff --git a/include/asm-blackfin/mach-bf548/defBF544.h b/include/asm-blackfin/mach-bf548/defBF544.h
index dd955dcd39b8..760307e34b9e 100644
--- a/include/asm-blackfin/mach-bf548/defBF544.h
+++ b/include/asm-blackfin/mach-bf548/defBF544.h
@@ -81,6 +81,7 @@
81 81
82/* Two Wire Interface Registers (TWI1) */ 82/* Two Wire Interface Registers (TWI1) */
83 83
84#define TWI1_REGBASE 0xffc02200
84#define TWI1_CLKDIV 0xffc02200 /* Clock Divider Register */ 85#define TWI1_CLKDIV 0xffc02200 /* Clock Divider Register */
85#define TWI1_CONTROL 0xffc02204 /* TWI Control Register */ 86#define TWI1_CONTROL 0xffc02204 /* TWI Control Register */
86#define TWI1_SLAVE_CTRL 0xffc02208 /* TWI Slave Mode Control Register */ 87#define TWI1_SLAVE_CTRL 0xffc02208 /* TWI Slave Mode Control Register */
diff --git a/include/asm-blackfin/mach-bf548/defBF548.h b/include/asm-blackfin/mach-bf548/defBF548.h
index 8d4214e0807c..70af33c963b0 100644
--- a/include/asm-blackfin/mach-bf548/defBF548.h
+++ b/include/asm-blackfin/mach-bf548/defBF548.h
@@ -120,6 +120,7 @@
120 120
121/* Two Wire Interface Registers (TWI1) */ 121/* Two Wire Interface Registers (TWI1) */
122 122
123#define TWI1_REGBASE 0xffc02200
123#define TWI1_CLKDIV 0xffc02200 /* Clock Divider Register */ 124#define TWI1_CLKDIV 0xffc02200 /* Clock Divider Register */
124#define TWI1_CONTROL 0xffc02204 /* TWI Control Register */ 125#define TWI1_CONTROL 0xffc02204 /* TWI Control Register */
125#define TWI1_SLAVE_CTRL 0xffc02208 /* TWI Slave Mode Control Register */ 126#define TWI1_SLAVE_CTRL 0xffc02208 /* TWI Slave Mode Control Register */
@@ -139,6 +140,7 @@
139 140
140/* SPI2 Registers */ 141/* SPI2 Registers */
141 142
143#define SPI2_REGBASE 0xffc02400
142#define SPI2_CTL 0xffc02400 /* SPI2 Control Register */ 144#define SPI2_CTL 0xffc02400 /* SPI2 Control Register */
143#define SPI2_FLG 0xffc02404 /* SPI2 Flag Register */ 145#define SPI2_FLG 0xffc02404 /* SPI2 Flag Register */
144#define SPI2_STAT 0xffc02408 /* SPI2 Status Register */ 146#define SPI2_STAT 0xffc02408 /* SPI2 Status Register */
diff --git a/include/asm-blackfin/mach-bf548/defBF549.h b/include/asm-blackfin/mach-bf548/defBF549.h
index c2f4734da48d..50b3fe55ef0c 100644
--- a/include/asm-blackfin/mach-bf548/defBF549.h
+++ b/include/asm-blackfin/mach-bf548/defBF549.h
@@ -121,6 +121,7 @@
121 121
122/* Two Wire Interface Registers (TWI1) */ 122/* Two Wire Interface Registers (TWI1) */
123 123
124#define TWI1_REGBASE 0xffc02200
124#define TWI1_CLKDIV 0xffc02200 /* Clock Divider Register */ 125#define TWI1_CLKDIV 0xffc02200 /* Clock Divider Register */
125#define TWI1_CONTROL 0xffc02204 /* TWI Control Register */ 126#define TWI1_CONTROL 0xffc02204 /* TWI Control Register */
126#define TWI1_SLAVE_CTRL 0xffc02208 /* TWI Slave Mode Control Register */ 127#define TWI1_SLAVE_CTRL 0xffc02208 /* TWI Slave Mode Control Register */
@@ -140,6 +141,7 @@
140 141
141/* SPI2 Registers */ 142/* SPI2 Registers */
142 143
144#define SPI2_REGBASE 0xffc02400
143#define SPI2_CTL 0xffc02400 /* SPI2 Control Register */ 145#define SPI2_CTL 0xffc02400 /* SPI2 Control Register */
144#define SPI2_FLG 0xffc02404 /* SPI2 Flag Register */ 146#define SPI2_FLG 0xffc02404 /* SPI2 Flag Register */
145#define SPI2_STAT 0xffc02408 /* SPI2 Status Register */ 147#define SPI2_STAT 0xffc02408 /* SPI2 Status Register */
diff --git a/include/asm-blackfin/mach-bf548/defBF54x_base.h b/include/asm-blackfin/mach-bf548/defBF54x_base.h
index 895ddd40a838..e2632db74baa 100644
--- a/include/asm-blackfin/mach-bf548/defBF54x_base.h
+++ b/include/asm-blackfin/mach-bf548/defBF54x_base.h
@@ -109,6 +109,7 @@
109 109
110/* SPI0 Registers */ 110/* SPI0 Registers */
111 111
112#define SPI0_REGBASE 0xffc00500
112#define SPI0_CTL 0xffc00500 /* SPI0 Control Register */ 113#define SPI0_CTL 0xffc00500 /* SPI0 Control Register */
113#define SPI0_FLG 0xffc00504 /* SPI0 Flag Register */ 114#define SPI0_FLG 0xffc00504 /* SPI0 Flag Register */
114#define SPI0_STAT 0xffc00508 /* SPI0 Status Register */ 115#define SPI0_STAT 0xffc00508 /* SPI0 Status Register */
@@ -121,6 +122,7 @@
121 122
122/* Two Wire Interface Registers (TWI0) */ 123/* Two Wire Interface Registers (TWI0) */
123 124
125#define TWI0_REGBASE 0xffc00700
124#define TWI0_CLKDIV 0xffc00700 /* Clock Divider Register */ 126#define TWI0_CLKDIV 0xffc00700 /* Clock Divider Register */
125#define TWI0_CONTROL 0xffc00704 /* TWI Control Register */ 127#define TWI0_CONTROL 0xffc00704 /* TWI Control Register */
126#define TWI0_SLAVE_CTRL 0xffc00708 /* TWI Slave Mode Control Register */ 128#define TWI0_SLAVE_CTRL 0xffc00708 /* TWI Slave Mode Control Register */
@@ -978,6 +980,7 @@
978 980
979/* SPI1 Registers */ 981/* SPI1 Registers */
980 982
983#define SPI1_REGBASE 0xffc02300
981#define SPI1_CTL 0xffc02300 /* SPI1 Control Register */ 984#define SPI1_CTL 0xffc02300 /* SPI1 Control Register */
982#define SPI1_FLG 0xffc02304 /* SPI1 Flag Register */ 985#define SPI1_FLG 0xffc02304 /* SPI1 Flag Register */
983#define SPI1_STAT 0xffc02308 /* SPI1 Status Register */ 986#define SPI1_STAT 0xffc02308 /* SPI1 Status Register */
diff --git a/include/asm-blackfin/mach-bf548/gpio.h b/include/asm-blackfin/mach-bf548/gpio.h
index dbf66bcabe35..cb8b0f15c9a6 100644
--- a/include/asm-blackfin/mach-bf548/gpio.h
+++ b/include/asm-blackfin/mach-bf548/gpio.h
@@ -209,8 +209,3 @@ struct gpio_port_t {
209 unsigned short dummy7; 209 unsigned short dummy7;
210 unsigned int port_mux; 210 unsigned int port_mux;
211}; 211};
212
213int gpio_request(unsigned short gpio, const char *label);
214void peripheral_free(unsigned short per);
215int peripheral_request_list(unsigned short per[], const char *label);
216void peripheral_free_list(unsigned short per[]);
diff --git a/include/asm-blackfin/mach-bf548/irq.h b/include/asm-blackfin/mach-bf548/irq.h
index e548d3cd81e3..3b08cf9bd6f3 100644
--- a/include/asm-blackfin/mach-bf548/irq.h
+++ b/include/asm-blackfin/mach-bf548/irq.h
@@ -55,287 +55,288 @@ Events (highest priority) EMU 0
55 55
56/* The ABSTRACT IRQ definitions */ 56/* The ABSTRACT IRQ definitions */
57/** the first seven of the following are fixed, the rest you change if you need to **/ 57/** the first seven of the following are fixed, the rest you change if you need to **/
58#define IRQ_EMU 0 /* Emulation */ 58#define IRQ_EMU 0 /* Emulation */
59#define IRQ_RST 1 /* reset */ 59#define IRQ_RST 1 /* reset */
60#define IRQ_NMI 2 /* Non Maskable */ 60#define IRQ_NMI 2 /* Non Maskable */
61#define IRQ_EVX 3 /* Exception */ 61#define IRQ_EVX 3 /* Exception */
62#define IRQ_UNUSED 4 /* - unused interrupt*/ 62#define IRQ_UNUSED 4 /* - unused interrupt*/
63#define IRQ_HWERR 5 /* Hardware Error */ 63#define IRQ_HWERR 5 /* Hardware Error */
64#define IRQ_CORETMR 6 /* Core timer */ 64#define IRQ_CORETMR 6 /* Core timer */
65 65
66#define BFIN_IRQ(x) ((x) + 7) 66#define BFIN_IRQ(x) ((x) + 7)
67 67
68#define IRQ_PLL_WAKEUP BFIN_IRQ(0) /* PLL Wakeup Interrupt */ 68#define IRQ_PLL_WAKEUP BFIN_IRQ(0) /* PLL Wakeup Interrupt */
69#define IRQ_DMAC0_ERR BFIN_IRQ(1) /* DMAC0 Status Interrupt */ 69#define IRQ_DMAC0_ERROR BFIN_IRQ(1) /* DMAC0 Status Interrupt */
70#define IRQ_EPPI0_ERR BFIN_IRQ(2) /* EPPI0 Error Interrupt */ 70#define IRQ_EPPI0_ERROR BFIN_IRQ(2) /* EPPI0 Error Interrupt */
71#define IRQ_SPORT0_ERR BFIN_IRQ(3) /* SPORT0 Error Interrupt */ 71#define IRQ_SPORT0_ERROR BFIN_IRQ(3) /* SPORT0 Error Interrupt */
72#define IRQ_SPORT1_ERR BFIN_IRQ(4) /* SPORT1 Error Interrupt */ 72#define IRQ_SPORT1_ERROR BFIN_IRQ(4) /* SPORT1 Error Interrupt */
73#define IRQ_SPI0_ERR BFIN_IRQ(5) /* SPI0 Status(Error) Interrupt */ 73#define IRQ_SPI0_ERROR BFIN_IRQ(5) /* SPI0 Status(Error) Interrupt */
74#define IRQ_UART0_ERR BFIN_IRQ(6) /* UART0 Status(Error) Interrupt */ 74#define IRQ_UART0_ERROR BFIN_IRQ(6) /* UART0 Status(Error) Interrupt */
75#define IRQ_RTC BFIN_IRQ(7) /* RTC Interrupt */ 75#define IRQ_RTC BFIN_IRQ(7) /* RTC Interrupt */
76#define IRQ_EPPI0 BFIN_IRQ(8) /* EPPI0 Interrupt (DMA12) */ 76#define IRQ_EPPI0 BFIN_IRQ(8) /* EPPI0 Interrupt (DMA12) */
77#define IRQ_SPORT0_RX BFIN_IRQ(9) /* SPORT0 RX Interrupt (DMA0) */ 77#define IRQ_SPORT0_RX BFIN_IRQ(9) /* SPORT0 RX Interrupt (DMA0) */
78#define IRQ_SPORT0_TX BFIN_IRQ(10) /* SPORT0 TX Interrupt (DMA1) */ 78#define IRQ_SPORT0_TX BFIN_IRQ(10) /* SPORT0 TX Interrupt (DMA1) */
79#define IRQ_SPORT1_RX BFIN_IRQ(11) /* SPORT1 RX Interrupt (DMA2) */ 79#define IRQ_SPORT1_RX BFIN_IRQ(11) /* SPORT1 RX Interrupt (DMA2) */
80#define IRQ_SPORT1_TX BFIN_IRQ(12) /* SPORT1 TX Interrupt (DMA3) */ 80#define IRQ_SPORT1_TX BFIN_IRQ(12) /* SPORT1 TX Interrupt (DMA3) */
81#define IRQ_SPI0 BFIN_IRQ(13) /* SPI0 Interrupt (DMA4) */ 81#define IRQ_SPI0 BFIN_IRQ(13) /* SPI0 Interrupt (DMA4) */
82#define IRQ_UART0_RX BFIN_IRQ(14) /* UART0 RX Interrupt (DMA6) */ 82#define IRQ_UART0_RX BFIN_IRQ(14) /* UART0 RX Interrupt (DMA6) */
83#define IRQ_UART0_TX BFIN_IRQ(15) /* UART0 TX Interrupt (DMA7) */ 83#define IRQ_UART0_TX BFIN_IRQ(15) /* UART0 TX Interrupt (DMA7) */
84#define IRQ_TIMER8 BFIN_IRQ(16) /* TIMER 8 Interrupt */ 84#define IRQ_TIMER8 BFIN_IRQ(16) /* TIMER 8 Interrupt */
85#define IRQ_TIMER9 BFIN_IRQ(17) /* TIMER 9 Interrupt */ 85#define IRQ_TIMER9 BFIN_IRQ(17) /* TIMER 9 Interrupt */
86#define IRQ_TIMER10 BFIN_IRQ(18) /* TIMER 10 Interrupt */ 86#define IRQ_TIMER10 BFIN_IRQ(18) /* TIMER 10 Interrupt */
87#define IRQ_PINT0 BFIN_IRQ(19) /* PINT0 Interrupt */ 87#define IRQ_PINT0 BFIN_IRQ(19) /* PINT0 Interrupt */
88#define IRQ_PINT1 BFIN_IRQ(20) /* PINT1 Interrupt */ 88#define IRQ_PINT1 BFIN_IRQ(20) /* PINT1 Interrupt */
89#define IRQ_MDMAS0 BFIN_IRQ(21) /* MDMA Stream 0 Interrupt */ 89#define IRQ_MDMAS0 BFIN_IRQ(21) /* MDMA Stream 0 Interrupt */
90#define IRQ_MDMAS1 BFIN_IRQ(22) /* MDMA Stream 1 Interrupt */ 90#define IRQ_MDMAS1 BFIN_IRQ(22) /* MDMA Stream 1 Interrupt */
91#define IRQ_WATCHDOG BFIN_IRQ(23) /* Watchdog Interrupt */ 91#define IRQ_WATCHDOG BFIN_IRQ(23) /* Watchdog Interrupt */
92#define IRQ_DMAC1_ERR BFIN_IRQ(24) /* DMAC1 Status (Error) Interrupt */ 92#define IRQ_DMAC1_ERROR BFIN_IRQ(24) /* DMAC1 Status (Error) Interrupt */
93#define IRQ_SPORT2_ERR BFIN_IRQ(25) /* SPORT2 Error Interrupt */ 93#define IRQ_SPORT2_ERROR BFIN_IRQ(25) /* SPORT2 Error Interrupt */
94#define IRQ_SPORT3_ERR BFIN_IRQ(26) /* SPORT3 Error Interrupt */ 94#define IRQ_SPORT3_ERROR BFIN_IRQ(26) /* SPORT3 Error Interrupt */
95#define IRQ_MXVR_DATA BFIN_IRQ(27) /* MXVR Data Interrupt */ 95#define IRQ_MXVR_DATA BFIN_IRQ(27) /* MXVR Data Interrupt */
96#define IRQ_SPI1_ERR BFIN_IRQ(28) /* SPI1 Status (Error) Interrupt */ 96#define IRQ_SPI1_ERROR BFIN_IRQ(28) /* SPI1 Status (Error) Interrupt */
97#define IRQ_SPI2_ERR BFIN_IRQ(29) /* SPI2 Status (Error) Interrupt */ 97#define IRQ_SPI2_ERROR BFIN_IRQ(29) /* SPI2 Status (Error) Interrupt */
98#define IRQ_UART1_ERR BFIN_IRQ(30) /* UART1 Status (Error) Interrupt */ 98#define IRQ_UART1_ERROR BFIN_IRQ(30) /* UART1 Status (Error) Interrupt */
99#define IRQ_UART2_ERR BFIN_IRQ(31) /* UART2 Status (Error) Interrupt */ 99#define IRQ_UART2_ERROR BFIN_IRQ(31) /* UART2 Status (Error) Interrupt */
100#define IRQ_CAN0_ERR BFIN_IRQ(32) /* CAN0 Status (Error) Interrupt */ 100#define IRQ_CAN0_ERROR BFIN_IRQ(32) /* CAN0 Status (Error) Interrupt */
101#define IRQ_SPORT2_RX BFIN_IRQ(33) /* SPORT2 RX (DMA18) Interrupt */ 101#define IRQ_SPORT2_RX BFIN_IRQ(33) /* SPORT2 RX (DMA18) Interrupt */
102#define IRQ_SPORT2_TX BFIN_IRQ(34) /* SPORT2 TX (DMA19) Interrupt */ 102#define IRQ_SPORT2_TX BFIN_IRQ(34) /* SPORT2 TX (DMA19) Interrupt */
103#define IRQ_SPORT3_RX BFIN_IRQ(35) /* SPORT3 RX (DMA20) Interrupt */ 103#define IRQ_SPORT3_RX BFIN_IRQ(35) /* SPORT3 RX (DMA20) Interrupt */
104#define IRQ_SPORT3_TX BFIN_IRQ(36) /* SPORT3 TX (DMA21) Interrupt */ 104#define IRQ_SPORT3_TX BFIN_IRQ(36) /* SPORT3 TX (DMA21) Interrupt */
105#define IRQ_EPPI1 BFIN_IRQ(37) /* EPP1 (DMA13) Interrupt */ 105#define IRQ_EPPI1 BFIN_IRQ(37) /* EPP1 (DMA13) Interrupt */
106#define IRQ_EPPI2 BFIN_IRQ(38) /* EPP2 (DMA14) Interrupt */ 106#define IRQ_EPPI2 BFIN_IRQ(38) /* EPP2 (DMA14) Interrupt */
107#define IRQ_SPI1 BFIN_IRQ(39) /* SPI1 (DMA5) Interrupt */ 107#define IRQ_SPI1 BFIN_IRQ(39) /* SPI1 (DMA5) Interrupt */
108#define IRQ_SPI2 BFIN_IRQ(40) /* SPI2 (DMA23) Interrupt */ 108#define IRQ_SPI2 BFIN_IRQ(40) /* SPI2 (DMA23) Interrupt */
109#define IRQ_UART1_RX BFIN_IRQ(41) /* UART1 RX (DMA8) Interrupt */ 109#define IRQ_UART1_RX BFIN_IRQ(41) /* UART1 RX (DMA8) Interrupt */
110#define IRQ_UART1_TX BFIN_IRQ(42) /* UART1 TX (DMA9) Interrupt */ 110#define IRQ_UART1_TX BFIN_IRQ(42) /* UART1 TX (DMA9) Interrupt */
111#define IRQ_ATAPI_RX BFIN_IRQ(43) /* ATAPI RX (DMA10) Interrupt */ 111#define IRQ_ATAPI_RX BFIN_IRQ(43) /* ATAPI RX (DMA10) Interrupt */
112#define IRQ_ATAPI_TX BFIN_IRQ(44) /* ATAPI TX (DMA11) Interrupt */ 112#define IRQ_ATAPI_TX BFIN_IRQ(44) /* ATAPI TX (DMA11) Interrupt */
113#define IRQ_TWI0 BFIN_IRQ(45) /* TWI0 Interrupt */ 113#define IRQ_TWI0 BFIN_IRQ(45) /* TWI0 Interrupt */
114#define IRQ_TWI1 BFIN_IRQ(46) /* TWI1 Interrupt */ 114#define IRQ_TWI1 BFIN_IRQ(46) /* TWI1 Interrupt */
115#define IRQ_TWI IRQ_TWI0 /* TWI Interrupt */ 115#define IRQ_CAN0_RX BFIN_IRQ(47) /* CAN0 Receive Interrupt */
116#define IRQ_CAN0_RX BFIN_IRQ(47) /* CAN0 Receive Interrupt */ 116#define IRQ_CAN0_TX BFIN_IRQ(48) /* CAN0 Transmit Interrupt */
117#define IRQ_CAN0_TX BFIN_IRQ(48) /* CAN0 Transmit Interrupt */ 117#define IRQ_MDMAS2 BFIN_IRQ(49) /* MDMA Stream 2 Interrupt */
118#define IRQ_MDMAS2 BFIN_IRQ(49) /* MDMA Stream 2 Interrupt */ 118#define IRQ_MDMAS3 BFIN_IRQ(50) /* MDMA Stream 3 Interrupt */
119#define IRQ_MDMAS3 BFIN_IRQ(50) /* MDMA Stream 3 Interrupt */ 119#define IRQ_MXVR_ERROR BFIN_IRQ(51) /* MXVR Status (Error) Interrupt */
120#define IRQ_MXVR_ERR BFIN_IRQ(51) /* MXVR Status (Error) Interrupt */ 120#define IRQ_MXVR_MSG BFIN_IRQ(52) /* MXVR Message Interrupt */
121#define IRQ_MXVR_MSG BFIN_IRQ(52) /* MXVR Message Interrupt */ 121#define IRQ_MXVR_PKT BFIN_IRQ(53) /* MXVR Packet Interrupt */
122#define IRQ_MXVR_PKT BFIN_IRQ(53) /* MXVR Packet Interrupt */ 122#define IRQ_EPP1_ERROR BFIN_IRQ(54) /* EPPI1 Error Interrupt */
123#define IRQ_EPP1_ERR BFIN_IRQ(54) /* EPPI1 Error Interrupt */ 123#define IRQ_EPP2_ERROR BFIN_IRQ(55) /* EPPI2 Error Interrupt */
124#define IRQ_EPP2_ERR BFIN_IRQ(55) /* EPPI2 Error Interrupt */ 124#define IRQ_UART3_ERROR BFIN_IRQ(56) /* UART3 Status (Error) Interrupt */
125#define IRQ_UART3_ERR BFIN_IRQ(56) /* UART3 Status (Error) Interrupt */ 125#define IRQ_HOST_ERROR BFIN_IRQ(57) /* HOST Status (Error) Interrupt */
126#define IRQ_HOST_ERR BFIN_IRQ(57) /* HOST Status (Error) Interrupt */ 126#define IRQ_PIXC_ERROR BFIN_IRQ(59) /* PIXC Status (Error) Interrupt */
127#define IRQ_PIXC_ERR BFIN_IRQ(59) /* PIXC Status (Error) Interrupt */ 127#define IRQ_NFC_ERROR BFIN_IRQ(60) /* NFC Error Interrupt */
128#define IRQ_NFC_ERR BFIN_IRQ(60) /* NFC Error Interrupt */ 128#define IRQ_ATAPI_ERROR BFIN_IRQ(61) /* ATAPI Error Interrupt */
129#define IRQ_ATAPI_ERR BFIN_IRQ(61) /* ATAPI Error Interrupt */ 129#define IRQ_CAN1_ERROR BFIN_IRQ(62) /* CAN1 Status (Error) Interrupt */
130#define IRQ_CAN1_ERR BFIN_IRQ(62) /* CAN1 Status (Error) Interrupt */ 130#define IRQ_HS_DMA_ERROR BFIN_IRQ(63) /* Handshake DMA Status Interrupt */
131#define IRQ_HS_DMA_ERR BFIN_IRQ(63) /* Handshake DMA Status Interrupt */ 131#define IRQ_PIXC_IN0 BFIN_IRQ(64) /* PIXC IN0 (DMA15) Interrupt */
132#define IRQ_PIXC_IN0 BFIN_IRQ(64) /* PIXC IN0 (DMA15) Interrupt */ 132#define IRQ_PIXC_IN1 BFIN_IRQ(65) /* PIXC IN1 (DMA16) Interrupt */
133#define IRQ_PIXC_IN1 BFIN_IRQ(65) /* PIXC IN1 (DMA16) Interrupt */ 133#define IRQ_PIXC_OUT BFIN_IRQ(66) /* PIXC OUT (DMA17) Interrupt */
134#define IRQ_PIXC_OUT BFIN_IRQ(66) /* PIXC OUT (DMA17) Interrupt */ 134#define IRQ_SDH BFIN_IRQ(67) /* SDH/NFC (DMA22) Interrupt */
135#define IRQ_SDH BFIN_IRQ(67) /* SDH/NFC (DMA22) Interrupt */ 135#define IRQ_CNT BFIN_IRQ(68) /* CNT Interrupt */
136#define IRQ_CNT BFIN_IRQ(68) /* CNT Interrupt */ 136#define IRQ_KEY BFIN_IRQ(69) /* KEY Interrupt */
137#define IRQ_KEY BFIN_IRQ(69) /* KEY Interrupt */ 137#define IRQ_CAN1_RX BFIN_IRQ(70) /* CAN1 RX Interrupt */
138#define IRQ_CAN1_RX BFIN_IRQ(70) /* CAN1 RX Interrupt */ 138#define IRQ_CAN1_TX BFIN_IRQ(71) /* CAN1 TX Interrupt */
139#define IRQ_CAN1_TX BFIN_IRQ(71) /* CAN1 TX Interrupt */ 139#define IRQ_SDH_MASK0 BFIN_IRQ(72) /* SDH Mask 0 Interrupt */
140#define IRQ_SDH_MASK0 BFIN_IRQ(72) /* SDH Mask 0 Interrupt */ 140#define IRQ_SDH_MASK1 BFIN_IRQ(73) /* SDH Mask 1 Interrupt */
141#define IRQ_SDH_MASK1 BFIN_IRQ(73) /* SDH Mask 1 Interrupt */ 141#define IRQ_USB_INT0 BFIN_IRQ(75) /* USB INT0 Interrupt */
142#define IRQ_USB_INT0 BFIN_IRQ(75) /* USB INT0 Interrupt */ 142#define IRQ_USB_INT1 BFIN_IRQ(76) /* USB INT1 Interrupt */
143#define IRQ_USB_INT1 BFIN_IRQ(76) /* USB INT1 Interrupt */ 143#define IRQ_USB_INT2 BFIN_IRQ(77) /* USB INT2 Interrupt */
144#define IRQ_USB_INT2 BFIN_IRQ(77) /* USB INT2 Interrupt */ 144#define IRQ_USB_DMA BFIN_IRQ(78) /* USB DMA Interrupt */
145#define IRQ_USB_DMA BFIN_IRQ(78) /* USB DMA Interrupt */ 145#define IRQ_OPTSEC BFIN_IRQ(79) /* OTPSEC Interrupt */
146#define IRQ_OPTSEC BFIN_IRQ(79) /* OTPSEC Interrupt */ 146#define IRQ_TIMER0 BFIN_IRQ(86) /* Timer 0 Interrupt */
147#define IRQ_TIMER0 BFIN_IRQ(86) /* Timer 0 Interrupt */ 147#define IRQ_TIMER1 BFIN_IRQ(87) /* Timer 1 Interrupt */
148#define IRQ_TIMER1 BFIN_IRQ(87) /* Timer 1 Interrupt */ 148#define IRQ_TIMER2 BFIN_IRQ(88) /* Timer 2 Interrupt */
149#define IRQ_TIMER2 BFIN_IRQ(88) /* Timer 2 Interrupt */ 149#define IRQ_TIMER3 BFIN_IRQ(89) /* Timer 3 Interrupt */
150#define IRQ_TIMER3 BFIN_IRQ(89) /* Timer 3 Interrupt */ 150#define IRQ_TIMER4 BFIN_IRQ(90) /* Timer 4 Interrupt */
151#define IRQ_TIMER4 BFIN_IRQ(90) /* Timer 4 Interrupt */ 151#define IRQ_TIMER5 BFIN_IRQ(91) /* Timer 5 Interrupt */
152#define IRQ_TIMER5 BFIN_IRQ(91) /* Timer 5 Interrupt */ 152#define IRQ_TIMER6 BFIN_IRQ(92) /* Timer 6 Interrupt */
153#define IRQ_TIMER6 BFIN_IRQ(92) /* Timer 6 Interrupt */ 153#define IRQ_TIMER7 BFIN_IRQ(93) /* Timer 7 Interrupt */
154#define IRQ_TIMER7 BFIN_IRQ(93) /* Timer 7 Interrupt */ 154#define IRQ_PINT2 BFIN_IRQ(94) /* PINT2 Interrupt */
155#define IRQ_PINT2 BFIN_IRQ(94) /* PINT2 Interrupt */ 155#define IRQ_PINT3 BFIN_IRQ(95) /* PINT3 Interrupt */
156#define IRQ_PINT3 BFIN_IRQ(95) /* PINT3 Interrupt */ 156
157 157#define SYS_IRQS IRQ_PINT3
158#define SYS_IRQS IRQ_PINT3 158
159 159#define BFIN_PA_IRQ(x) ((x) + SYS_IRQS + 1)
160#define BFIN_PA_IRQ(x) ((x) + SYS_IRQS + 1) 160#define IRQ_PA0 BFIN_PA_IRQ(0)
161#define IRQ_PA0 BFIN_PA_IRQ(0) 161#define IRQ_PA1 BFIN_PA_IRQ(1)
162#define IRQ_PA1 BFIN_PA_IRQ(1) 162#define IRQ_PA2 BFIN_PA_IRQ(2)
163#define IRQ_PA2 BFIN_PA_IRQ(2) 163#define IRQ_PA3 BFIN_PA_IRQ(3)
164#define IRQ_PA3 BFIN_PA_IRQ(3) 164#define IRQ_PA4 BFIN_PA_IRQ(4)
165#define IRQ_PA4 BFIN_PA_IRQ(4) 165#define IRQ_PA5 BFIN_PA_IRQ(5)
166#define IRQ_PA5 BFIN_PA_IRQ(5) 166#define IRQ_PA6 BFIN_PA_IRQ(6)
167#define IRQ_PA6 BFIN_PA_IRQ(6) 167#define IRQ_PA7 BFIN_PA_IRQ(7)
168#define IRQ_PA7 BFIN_PA_IRQ(7) 168#define IRQ_PA8 BFIN_PA_IRQ(8)
169#define IRQ_PA8 BFIN_PA_IRQ(8) 169#define IRQ_PA9 BFIN_PA_IRQ(9)
170#define IRQ_PA9 BFIN_PA_IRQ(9) 170#define IRQ_PA10 BFIN_PA_IRQ(10)
171#define IRQ_PA10 BFIN_PA_IRQ(10) 171#define IRQ_PA11 BFIN_PA_IRQ(11)
172#define IRQ_PA11 BFIN_PA_IRQ(11) 172#define IRQ_PA12 BFIN_PA_IRQ(12)
173#define IRQ_PA12 BFIN_PA_IRQ(12) 173#define IRQ_PA13 BFIN_PA_IRQ(13)
174#define IRQ_PA13 BFIN_PA_IRQ(13) 174#define IRQ_PA14 BFIN_PA_IRQ(14)
175#define IRQ_PA14 BFIN_PA_IRQ(14) 175#define IRQ_PA15 BFIN_PA_IRQ(15)
176#define IRQ_PA15 BFIN_PA_IRQ(15) 176
177 177#define BFIN_PB_IRQ(x) ((x) + IRQ_PA15 + 1)
178#define BFIN_PB_IRQ(x) ((x) + IRQ_PA15 + 1) 178#define IRQ_PB0 BFIN_PB_IRQ(0)
179#define IRQ_PB0 BFIN_PB_IRQ(0) 179#define IRQ_PB1 BFIN_PB_IRQ(1)
180#define IRQ_PB1 BFIN_PB_IRQ(1) 180#define IRQ_PB2 BFIN_PB_IRQ(2)
181#define IRQ_PB2 BFIN_PB_IRQ(2) 181#define IRQ_PB3 BFIN_PB_IRQ(3)
182#define IRQ_PB3 BFIN_PB_IRQ(3) 182#define IRQ_PB4 BFIN_PB_IRQ(4)
183#define IRQ_PB4 BFIN_PB_IRQ(4) 183#define IRQ_PB5 BFIN_PB_IRQ(5)
184#define IRQ_PB5 BFIN_PB_IRQ(5) 184#define IRQ_PB6 BFIN_PB_IRQ(6)
185#define IRQ_PB6 BFIN_PB_IRQ(6) 185#define IRQ_PB7 BFIN_PB_IRQ(7)
186#define IRQ_PB7 BFIN_PB_IRQ(7) 186#define IRQ_PB8 BFIN_PB_IRQ(8)
187#define IRQ_PB8 BFIN_PB_IRQ(8) 187#define IRQ_PB9 BFIN_PB_IRQ(9)
188#define IRQ_PB9 BFIN_PB_IRQ(9) 188#define IRQ_PB10 BFIN_PB_IRQ(10)
189#define IRQ_PB10 BFIN_PB_IRQ(10) 189#define IRQ_PB11 BFIN_PB_IRQ(11)
190#define IRQ_PB11 BFIN_PB_IRQ(11) 190#define IRQ_PB12 BFIN_PB_IRQ(12)
191#define IRQ_PB12 BFIN_PB_IRQ(12) 191#define IRQ_PB13 BFIN_PB_IRQ(13)
192#define IRQ_PB13 BFIN_PB_IRQ(13) 192#define IRQ_PB14 BFIN_PB_IRQ(14)
193#define IRQ_PB14 BFIN_PB_IRQ(14) 193#define IRQ_PB15 BFIN_PB_IRQ(15) /* N/A */
194#define IRQ_PB15 BFIN_PB_IRQ(15) /* N/A */ 194
195 195#define BFIN_PC_IRQ(x) ((x) + IRQ_PB15 + 1)
196#define BFIN_PC_IRQ(x) ((x) + IRQ_PB15 + 1) 196#define IRQ_PC0 BFIN_PC_IRQ(0)
197#define IRQ_PC0 BFIN_PC_IRQ(0) 197#define IRQ_PC1 BFIN_PC_IRQ(1)
198#define IRQ_PC1 BFIN_PC_IRQ(1) 198#define IRQ_PC2 BFIN_PC_IRQ(2)
199#define IRQ_PC2 BFIN_PC_IRQ(2) 199#define IRQ_PC3 BFIN_PC_IRQ(3)
200#define IRQ_PC3 BFIN_PC_IRQ(3) 200#define IRQ_PC4 BFIN_PC_IRQ(4)
201#define IRQ_PC4 BFIN_PC_IRQ(4) 201#define IRQ_PC5 BFIN_PC_IRQ(5)
202#define IRQ_PC5 BFIN_PC_IRQ(5) 202#define IRQ_PC6 BFIN_PC_IRQ(6)
203#define IRQ_PC6 BFIN_PC_IRQ(6) 203#define IRQ_PC7 BFIN_PC_IRQ(7)
204#define IRQ_PC7 BFIN_PC_IRQ(7) 204#define IRQ_PC8 BFIN_PC_IRQ(8)
205#define IRQ_PC8 BFIN_PC_IRQ(8) 205#define IRQ_PC9 BFIN_PC_IRQ(9)
206#define IRQ_PC9 BFIN_PC_IRQ(9) 206#define IRQ_PC10 BFIN_PC_IRQ(10)
207#define IRQ_PC10 BFIN_PC_IRQ(10) 207#define IRQ_PC11 BFIN_PC_IRQ(11)
208#define IRQ_PC11 BFIN_PC_IRQ(11) 208#define IRQ_PC12 BFIN_PC_IRQ(12)
209#define IRQ_PC12 BFIN_PC_IRQ(12) 209#define IRQ_PC13 BFIN_PC_IRQ(13)
210#define IRQ_PC13 BFIN_PC_IRQ(13) 210#define IRQ_PC14 BFIN_PC_IRQ(14) /* N/A */
211#define IRQ_PC14 BFIN_PC_IRQ(14) /* N/A */ 211#define IRQ_PC15 BFIN_PC_IRQ(15) /* N/A */
212#define IRQ_PC15 BFIN_PC_IRQ(15) /* N/A */ 212
213 213#define BFIN_PD_IRQ(x) ((x) + IRQ_PC15 + 1)
214#define BFIN_PD_IRQ(x) ((x) + IRQ_PC15 + 1) 214#define IRQ_PD0 BFIN_PD_IRQ(0)
215#define IRQ_PD0 BFIN_PD_IRQ(0) 215#define IRQ_PD1 BFIN_PD_IRQ(1)
216#define IRQ_PD1 BFIN_PD_IRQ(1) 216#define IRQ_PD2 BFIN_PD_IRQ(2)
217#define IRQ_PD2 BFIN_PD_IRQ(2) 217#define IRQ_PD3 BFIN_PD_IRQ(3)
218#define IRQ_PD3 BFIN_PD_IRQ(3) 218#define IRQ_PD4 BFIN_PD_IRQ(4)
219#define IRQ_PD4 BFIN_PD_IRQ(4) 219#define IRQ_PD5 BFIN_PD_IRQ(5)
220#define IRQ_PD5 BFIN_PD_IRQ(5) 220#define IRQ_PD6 BFIN_PD_IRQ(6)
221#define IRQ_PD6 BFIN_PD_IRQ(6) 221#define IRQ_PD7 BFIN_PD_IRQ(7)
222#define IRQ_PD7 BFIN_PD_IRQ(7) 222#define IRQ_PD8 BFIN_PD_IRQ(8)
223#define IRQ_PD8 BFIN_PD_IRQ(8) 223#define IRQ_PD9 BFIN_PD_IRQ(9)
224#define IRQ_PD9 BFIN_PD_IRQ(9) 224#define IRQ_PD10 BFIN_PD_IRQ(10)
225#define IRQ_PD10 BFIN_PD_IRQ(10) 225#define IRQ_PD11 BFIN_PD_IRQ(11)
226#define IRQ_PD11 BFIN_PD_IRQ(11) 226#define IRQ_PD12 BFIN_PD_IRQ(12)
227#define IRQ_PD12 BFIN_PD_IRQ(12) 227#define IRQ_PD13 BFIN_PD_IRQ(13)
228#define IRQ_PD13 BFIN_PD_IRQ(13) 228#define IRQ_PD14 BFIN_PD_IRQ(14)
229#define IRQ_PD14 BFIN_PD_IRQ(14) 229#define IRQ_PD15 BFIN_PD_IRQ(15)
230#define IRQ_PD15 BFIN_PD_IRQ(15) 230
231 231#define BFIN_PE_IRQ(x) ((x) + IRQ_PD15 + 1)
232#define BFIN_PE_IRQ(x) ((x) + IRQ_PD15 + 1) 232#define IRQ_PE0 BFIN_PE_IRQ(0)
233#define IRQ_PE0 BFIN_PE_IRQ(0) 233#define IRQ_PE1 BFIN_PE_IRQ(1)
234#define IRQ_PE1 BFIN_PE_IRQ(1) 234#define IRQ_PE2 BFIN_PE_IRQ(2)
235#define IRQ_PE2 BFIN_PE_IRQ(2) 235#define IRQ_PE3 BFIN_PE_IRQ(3)
236#define IRQ_PE3 BFIN_PE_IRQ(3) 236#define IRQ_PE4 BFIN_PE_IRQ(4)
237#define IRQ_PE4 BFIN_PE_IRQ(4) 237#define IRQ_PE5 BFIN_PE_IRQ(5)
238#define IRQ_PE5 BFIN_PE_IRQ(5) 238#define IRQ_PE6 BFIN_PE_IRQ(6)
239#define IRQ_PE6 BFIN_PE_IRQ(6) 239#define IRQ_PE7 BFIN_PE_IRQ(7)
240#define IRQ_PE7 BFIN_PE_IRQ(7) 240#define IRQ_PE8 BFIN_PE_IRQ(8)
241#define IRQ_PE8 BFIN_PE_IRQ(8) 241#define IRQ_PE9 BFIN_PE_IRQ(9)
242#define IRQ_PE9 BFIN_PE_IRQ(9) 242#define IRQ_PE10 BFIN_PE_IRQ(10)
243#define IRQ_PE10 BFIN_PE_IRQ(10) 243#define IRQ_PE11 BFIN_PE_IRQ(11)
244#define IRQ_PE11 BFIN_PE_IRQ(11) 244#define IRQ_PE12 BFIN_PE_IRQ(12)
245#define IRQ_PE12 BFIN_PE_IRQ(12) 245#define IRQ_PE13 BFIN_PE_IRQ(13)
246#define IRQ_PE13 BFIN_PE_IRQ(13) 246#define IRQ_PE14 BFIN_PE_IRQ(14)
247#define IRQ_PE14 BFIN_PE_IRQ(14) 247#define IRQ_PE15 BFIN_PE_IRQ(15)
248#define IRQ_PE15 BFIN_PE_IRQ(15) 248
249 249#define BFIN_PF_IRQ(x) ((x) + IRQ_PE15 + 1)
250#define BFIN_PF_IRQ(x) ((x) + IRQ_PE15 + 1) 250#define IRQ_PF0 BFIN_PF_IRQ(0)
251#define IRQ_PF0 BFIN_PF_IRQ(0) 251#define IRQ_PF1 BFIN_PF_IRQ(1)
252#define IRQ_PF1 BFIN_PF_IRQ(1) 252#define IRQ_PF2 BFIN_PF_IRQ(2)
253#define IRQ_PF2 BFIN_PF_IRQ(2) 253#define IRQ_PF3 BFIN_PF_IRQ(3)
254#define IRQ_PF3 BFIN_PF_IRQ(3) 254#define IRQ_PF4 BFIN_PF_IRQ(4)
255#define IRQ_PF4 BFIN_PF_IRQ(4) 255#define IRQ_PF5 BFIN_PF_IRQ(5)
256#define IRQ_PF5 BFIN_PF_IRQ(5) 256#define IRQ_PF6 BFIN_PF_IRQ(6)
257#define IRQ_PF6 BFIN_PF_IRQ(6) 257#define IRQ_PF7 BFIN_PF_IRQ(7)
258#define IRQ_PF7 BFIN_PF_IRQ(7) 258#define IRQ_PF8 BFIN_PF_IRQ(8)
259#define IRQ_PF8 BFIN_PF_IRQ(8) 259#define IRQ_PF9 BFIN_PF_IRQ(9)
260#define IRQ_PF9 BFIN_PF_IRQ(9) 260#define IRQ_PF10 BFIN_PF_IRQ(10)
261#define IRQ_PF10 BFIN_PF_IRQ(10) 261#define IRQ_PF11 BFIN_PF_IRQ(11)
262#define IRQ_PF11 BFIN_PF_IRQ(11) 262#define IRQ_PF12 BFIN_PF_IRQ(12)
263#define IRQ_PF12 BFIN_PF_IRQ(12) 263#define IRQ_PF13 BFIN_PF_IRQ(13)
264#define IRQ_PF13 BFIN_PF_IRQ(13) 264#define IRQ_PF14 BFIN_PF_IRQ(14)
265#define IRQ_PF14 BFIN_PF_IRQ(14) 265#define IRQ_PF15 BFIN_PF_IRQ(15)
266#define IRQ_PF15 BFIN_PF_IRQ(15) 266
267 267#define BFIN_PG_IRQ(x) ((x) + IRQ_PF15 + 1)
268#define BFIN_PG_IRQ(x) ((x) + IRQ_PF15 + 1) 268#define IRQ_PG0 BFIN_PG_IRQ(0)
269#define IRQ_PG0 BFIN_PG_IRQ(0) 269#define IRQ_PG1 BFIN_PG_IRQ(1)
270#define IRQ_PG1 BFIN_PG_IRQ(1) 270#define IRQ_PG2 BFIN_PG_IRQ(2)
271#define IRQ_PG2 BFIN_PG_IRQ(2) 271#define IRQ_PG3 BFIN_PG_IRQ(3)
272#define IRQ_PG3 BFIN_PG_IRQ(3) 272#define IRQ_PG4 BFIN_PG_IRQ(4)
273#define IRQ_PG4 BFIN_PG_IRQ(4) 273#define IRQ_PG5 BFIN_PG_IRQ(5)
274#define IRQ_PG5 BFIN_PG_IRQ(5) 274#define IRQ_PG6 BFIN_PG_IRQ(6)
275#define IRQ_PG6 BFIN_PG_IRQ(6) 275#define IRQ_PG7 BFIN_PG_IRQ(7)
276#define IRQ_PG7 BFIN_PG_IRQ(7) 276#define IRQ_PG8 BFIN_PG_IRQ(8)
277#define IRQ_PG8 BFIN_PG_IRQ(8) 277#define IRQ_PG9 BFIN_PG_IRQ(9)
278#define IRQ_PG9 BFIN_PG_IRQ(9) 278#define IRQ_PG10 BFIN_PG_IRQ(10)
279#define IRQ_PG10 BFIN_PG_IRQ(10) 279#define IRQ_PG11 BFIN_PG_IRQ(11)
280#define IRQ_PG11 BFIN_PG_IRQ(11) 280#define IRQ_PG12 BFIN_PG_IRQ(12)
281#define IRQ_PG12 BFIN_PG_IRQ(12) 281#define IRQ_PG13 BFIN_PG_IRQ(13)
282#define IRQ_PG13 BFIN_PG_IRQ(13) 282#define IRQ_PG14 BFIN_PG_IRQ(14)
283#define IRQ_PG14 BFIN_PG_IRQ(14) 283#define IRQ_PG15 BFIN_PG_IRQ(15)
284#define IRQ_PG15 BFIN_PG_IRQ(15) 284
285 285#define BFIN_PH_IRQ(x) ((x) + IRQ_PG15 + 1)
286#define BFIN_PH_IRQ(x) ((x) + IRQ_PG15 + 1) 286#define IRQ_PH0 BFIN_PH_IRQ(0)
287#define IRQ_PH0 BFIN_PH_IRQ(0) 287#define IRQ_PH1 BFIN_PH_IRQ(1)
288#define IRQ_PH1 BFIN_PH_IRQ(1) 288#define IRQ_PH2 BFIN_PH_IRQ(2)
289#define IRQ_PH2 BFIN_PH_IRQ(2) 289#define IRQ_PH3 BFIN_PH_IRQ(3)
290#define IRQ_PH3 BFIN_PH_IRQ(3) 290#define IRQ_PH4 BFIN_PH_IRQ(4)
291#define IRQ_PH4 BFIN_PH_IRQ(4) 291#define IRQ_PH5 BFIN_PH_IRQ(5)
292#define IRQ_PH5 BFIN_PH_IRQ(5) 292#define IRQ_PH6 BFIN_PH_IRQ(6)
293#define IRQ_PH6 BFIN_PH_IRQ(6) 293#define IRQ_PH7 BFIN_PH_IRQ(7)
294#define IRQ_PH7 BFIN_PH_IRQ(7) 294#define IRQ_PH8 BFIN_PH_IRQ(8)
295#define IRQ_PH8 BFIN_PH_IRQ(8) 295#define IRQ_PH9 BFIN_PH_IRQ(9)
296#define IRQ_PH9 BFIN_PH_IRQ(9) 296#define IRQ_PH10 BFIN_PH_IRQ(10)
297#define IRQ_PH10 BFIN_PH_IRQ(10) 297#define IRQ_PH11 BFIN_PH_IRQ(11)
298#define IRQ_PH11 BFIN_PH_IRQ(11) 298#define IRQ_PH12 BFIN_PH_IRQ(12)
299#define IRQ_PH12 BFIN_PH_IRQ(12) 299#define IRQ_PH13 BFIN_PH_IRQ(13)
300#define IRQ_PH13 BFIN_PH_IRQ(13) 300#define IRQ_PH14 BFIN_PH_IRQ(14) /* N/A */
301#define IRQ_PH14 BFIN_PH_IRQ(14) /* N/A */ 301#define IRQ_PH15 BFIN_PH_IRQ(15) /* N/A */
302#define IRQ_PH15 BFIN_PH_IRQ(15) /* N/A */ 302
303 303#define BFIN_PI_IRQ(x) ((x) + IRQ_PH15 + 1)
304#define BFIN_PI_IRQ(x) ((x) + IRQ_PH15 + 1) 304#define IRQ_PI0 BFIN_PI_IRQ(0)
305#define IRQ_PI0 BFIN_PI_IRQ(0) 305#define IRQ_PI1 BFIN_PI_IRQ(1)
306#define IRQ_PI1 BFIN_PI_IRQ(1) 306#define IRQ_PI2 BFIN_PI_IRQ(2)
307#define IRQ_PI2 BFIN_PI_IRQ(2) 307#define IRQ_PI3 BFIN_PI_IRQ(3)
308#define IRQ_PI3 BFIN_PI_IRQ(3) 308#define IRQ_PI4 BFIN_PI_IRQ(4)
309#define IRQ_PI4 BFIN_PI_IRQ(4) 309#define IRQ_PI5 BFIN_PI_IRQ(5)
310#define IRQ_PI5 BFIN_PI_IRQ(5) 310#define IRQ_PI6 BFIN_PI_IRQ(6)
311#define IRQ_PI6 BFIN_PI_IRQ(6) 311#define IRQ_PI7 BFIN_PI_IRQ(7)
312#define IRQ_PI7 BFIN_PI_IRQ(7) 312#define IRQ_PI8 BFIN_PI_IRQ(8)
313#define IRQ_PI8 BFIN_PI_IRQ(8) 313#define IRQ_PI9 BFIN_PI_IRQ(9)
314#define IRQ_PI9 BFIN_PI_IRQ(9) 314#define IRQ_PI10 BFIN_PI_IRQ(10)
315#define IRQ_PI10 BFIN_PI_IRQ(10) 315#define IRQ_PI11 BFIN_PI_IRQ(11)
316#define IRQ_PI11 BFIN_PI_IRQ(11) 316#define IRQ_PI12 BFIN_PI_IRQ(12)
317#define IRQ_PI12 BFIN_PI_IRQ(12) 317#define IRQ_PI13 BFIN_PI_IRQ(13)
318#define IRQ_PI13 BFIN_PI_IRQ(13) 318#define IRQ_PI14 BFIN_PI_IRQ(14)
319#define IRQ_PI14 BFIN_PI_IRQ(14) 319#define IRQ_PI15 BFIN_PI_IRQ(15)
320#define IRQ_PI15 BFIN_PI_IRQ(15) 320
321 321#define BFIN_PJ_IRQ(x) ((x) + IRQ_PI15 + 1)
322#define BFIN_PJ_IRQ(x) ((x) + IRQ_PI15 + 1) 322#define IRQ_PJ0 BFIN_PJ_IRQ(0)
323#define IRQ_PJ0 BFIN_PJ_IRQ(0) 323#define IRQ_PJ1 BFIN_PJ_IRQ(1)
324#define IRQ_PJ1 BFIN_PJ_IRQ(1) 324#define IRQ_PJ2 BFIN_PJ_IRQ(2)
325#define IRQ_PJ2 BFIN_PJ_IRQ(2) 325#define IRQ_PJ3 BFIN_PJ_IRQ(3)
326#define IRQ_PJ3 BFIN_PJ_IRQ(3) 326#define IRQ_PJ4 BFIN_PJ_IRQ(4)
327#define IRQ_PJ4 BFIN_PJ_IRQ(4) 327#define IRQ_PJ5 BFIN_PJ_IRQ(5)
328#define IRQ_PJ5 BFIN_PJ_IRQ(5) 328#define IRQ_PJ6 BFIN_PJ_IRQ(6)
329#define IRQ_PJ6 BFIN_PJ_IRQ(6) 329#define IRQ_PJ7 BFIN_PJ_IRQ(7)
330#define IRQ_PJ7 BFIN_PJ_IRQ(7) 330#define IRQ_PJ8 BFIN_PJ_IRQ(8)
331#define IRQ_PJ8 BFIN_PJ_IRQ(8) 331#define IRQ_PJ9 BFIN_PJ_IRQ(9)
332#define IRQ_PJ9 BFIN_PJ_IRQ(9) 332#define IRQ_PJ10 BFIN_PJ_IRQ(10)
333#define IRQ_PJ10 BFIN_PJ_IRQ(10) 333#define IRQ_PJ11 BFIN_PJ_IRQ(11)
334#define IRQ_PJ11 BFIN_PJ_IRQ(11) 334#define IRQ_PJ12 BFIN_PJ_IRQ(12)
335#define IRQ_PJ12 BFIN_PJ_IRQ(12) 335#define IRQ_PJ13 BFIN_PJ_IRQ(13)
336#define IRQ_PJ13 BFIN_PJ_IRQ(13) 336#define IRQ_PJ14 BFIN_PJ_IRQ(14) /* N/A */
337#define IRQ_PJ14 BFIN_PJ_IRQ(14) /* N/A */ 337#define IRQ_PJ15 BFIN_PJ_IRQ(15) /* N/A */
338#define IRQ_PJ15 BFIN_PJ_IRQ(15) /* N/A */ 338
339#define GPIO_IRQ_BASE IRQ_PA0
339 340
340#ifdef CONFIG_IRQCHIP_DEMUX_GPIO 341#ifdef CONFIG_IRQCHIP_DEMUX_GPIO
341#define NR_IRQS (IRQ_PJ15+1) 342#define NR_IRQS (IRQ_PJ15+1)
@@ -343,6 +344,34 @@ Events (highest priority) EMU 0
343#define NR_IRQS (SYS_IRQS+1) 344#define NR_IRQS (SYS_IRQS+1)
344#endif 345#endif
345 346
347/* For compatibility reasons with existing code */
348
349#define IRQ_DMAC0_ERR IRQ_DMAC0_ERROR
350#define IRQ_EPPI0_ERR IRQ_EPPI0_ERROR
351#define IRQ_SPORT0_ERR IRQ_SPORT0_ERROR
352#define IRQ_SPORT1_ERR IRQ_SPORT1_ERROR
353#define IRQ_SPI0_ERR IRQ_SPI0_ERROR
354#define IRQ_UART0_ERR IRQ_UART0_ERROR
355#define IRQ_DMAC1_ERR IRQ_DMAC1_ERROR
356#define IRQ_SPORT2_ERR IRQ_SPORT2_ERROR
357#define IRQ_SPORT3_ERR IRQ_SPORT3_ERROR
358#define IRQ_SPI1_ERR IRQ_SPI1_ERROR
359#define IRQ_SPI2_ERR IRQ_SPI2_ERROR
360#define IRQ_UART1_ERR IRQ_UART1_ERROR
361#define IRQ_UART2_ERR IRQ_UART2_ERROR
362#define IRQ_CAN0_ERR IRQ_CAN0_ERROR
363#define IRQ_MXVR_ERR IRQ_MXVR_ERROR
364#define IRQ_EPP1_ERR IRQ_EPP1_ERROR
365#define IRQ_EPP2_ERR IRQ_EPP2_ERROR
366#define IRQ_UART3_ERR IRQ_UART3_ERROR
367#define IRQ_HOST_ERR IRQ_HOST_ERROR
368#define IRQ_PIXC_ERR IRQ_PIXC_ERROR
369#define IRQ_NFC_ERR IRQ_NFC_ERROR
370#define IRQ_ATAPI_ERR IRQ_ATAPI_ERROR
371#define IRQ_CAN1_ERR IRQ_CAN1_ERROR
372#define IRQ_HS_DMA_ERR IRQ_HS_DMA_ERROR
373
374
346#define IVG7 7 375#define IVG7 7
347#define IVG8 8 376#define IVG8 8
348#define IVG9 9 377#define IVG9 9
diff --git a/include/asm-blackfin/mach-bf548/mem_map.h b/include/asm-blackfin/mach-bf548/mem_map.h
index 72d80e8a6e81..ec1597e31831 100644
--- a/include/asm-blackfin/mach-bf548/mem_map.h
+++ b/include/asm-blackfin/mach-bf548/mem_map.h
@@ -51,10 +51,10 @@
51/* Level 1 Memory */ 51/* Level 1 Memory */
52 52
53/* Memory Map for ADSP-BF548 processors */ 53/* Memory Map for ADSP-BF548 processors */
54#ifdef CONFIG_BLKFIN_ICACHE 54#ifdef CONFIG_BFIN_ICACHE
55#define BLKFIN_ICACHESIZE (16*1024) 55#define BFIN_ICACHESIZE (16*1024)
56#else 56#else
57#define BLKFIN_ICACHESIZE (0*1024) 57#define BFIN_ICACHESIZE (0*1024)
58#endif 58#endif
59 59
60#define L1_CODE_START 0xFFA00000 60#define L1_CODE_START 0xFFA00000
@@ -63,29 +63,29 @@
63 63
64#define L1_CODE_LENGTH 0xC000 64#define L1_CODE_LENGTH 0xC000
65 65
66#ifdef CONFIG_BLKFIN_DCACHE 66#ifdef CONFIG_BFIN_DCACHE
67 67
68#ifdef CONFIG_BLKFIN_DCACHE_BANKA 68#ifdef CONFIG_BFIN_DCACHE_BANKA
69#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0) 69#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0)
70#define L1_DATA_A_LENGTH (0x8000 - 0x4000) 70#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
71#define L1_DATA_B_LENGTH 0x8000 71#define L1_DATA_B_LENGTH 0x8000
72#define BLKFIN_DCACHESIZE (16*1024) 72#define BFIN_DCACHESIZE (16*1024)
73#define BLKFIN_DSUPBANKS 1 73#define BFIN_DSUPBANKS 1
74#else 74#else
75#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0) 75#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0)
76#define L1_DATA_A_LENGTH (0x8000 - 0x4000) 76#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
77#define L1_DATA_B_LENGTH (0x8000 - 0x4000) 77#define L1_DATA_B_LENGTH (0x8000 - 0x4000)
78#define BLKFIN_DCACHESIZE (32*1024) 78#define BFIN_DCACHESIZE (32*1024)
79#define BLKFIN_DSUPBANKS 2 79#define BFIN_DSUPBANKS 2
80#endif 80#endif
81 81
82#else 82#else
83#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0) 83#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0)
84#define L1_DATA_A_LENGTH 0x8000 84#define L1_DATA_A_LENGTH 0x8000
85#define L1_DATA_B_LENGTH 0x8000 85#define L1_DATA_B_LENGTH 0x8000
86#define BLKFIN_DCACHESIZE (0*1024) 86#define BFIN_DCACHESIZE (0*1024)
87#define BLKFIN_DSUPBANKS 0 87#define BFIN_DSUPBANKS 0
88#endif /*CONFIG_BLKFIN_DCACHE*/ 88#endif /*CONFIG_BFIN_DCACHE*/
89 89
90/* Scratch Pad Memory */ 90/* Scratch Pad Memory */
91 91
diff --git a/include/asm-blackfin/mach-bf561/anomaly.h b/include/asm-blackfin/mach-bf561/anomaly.h
index f5b32d66517d..bed956456884 100644
--- a/include/asm-blackfin/mach-bf561/anomaly.h
+++ b/include/asm-blackfin/mach-bf561/anomaly.h
@@ -1,184 +1,256 @@
1
2/* 1/*
3 * File: include/asm-blackfin/mach-bf561/anomaly.h 2 * File: include/asm-blackfin/mach-bf561/anomaly.h
4 * Based on: 3 * Bugs: Enter bugs at http://blackfin.uclinux.org/
5 * Author:
6 *
7 * Created:
8 * Description:
9 *
10 * Rev:
11 *
12 * Modified:
13 *
14 * Bugs: Enter bugs at http://blackfin.uclinux.org/
15 * 4 *
16 * This program is free software; you can redistribute it and/or modify 5 * Copyright (C) 2004-2007 Analog Devices Inc.
17 * it under the terms of the GNU General Public License as published by 6 * Licensed under the GPL-2 or later.
18 * the Free Software Foundation; either version 2, or (at your option)
19 * any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program; see the file COPYING.
28 * If not, write to the Free Software Foundation,
29 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 */ 7 */
31 8
32/* This file shoule be up to date with: 9/* This file shoule be up to date with:
33 * - Revision L, 10Aug2006; ADSP-BF561 Silicon Anomaly List 10 * - Revision N, March 28, 2007; ADSP-BF561 Silicon Anomaly List
34 */ 11 */
35 12
36#ifndef _MACH_ANOMALY_H_ 13#ifndef _MACH_ANOMALY_H_
37#define _MACH_ANOMALY_H_ 14#define _MACH_ANOMALY_H_
38 15
39/* We do not support 0.1 or 0.4 silicon - sorry */ 16/* We do not support 0.1, 0.2, or 0.4 silicon - sorry */
40#if (defined(CONFIG_BF_REV_0_1) || defined(CONFIG_BF_REV_0_2) || defined(CONFIG_BF_REV_0_4)) 17#if __SILICON_REVISION__ < 3 || __SILICON_REVISION__ == 4
41#error Kernel will not work on BF561 Version 0.1, 0.2, or 0.4 18# error Kernel will not work on BF561 silicon version 0.0, 0.1, 0.2, or 0.4
42#endif 19#endif
43 20
44/* Issues that are common to 0.5 and 0.3 silicon */ 21/* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot 2 Not Supported */
45#if (defined(CONFIG_BF_REV_0_5) || defined(CONFIG_BF_REV_0_3)) 22#define ANOMALY_05000074 (1)
46#define ANOMALY_05000074 /* A multi issue instruction with dsp32shiftimm in 23/* UART Line Status Register (UART_LSR) Bits Are Not Updated at the Same Time */
47 slot1 and store of a P register in slot 2 is not 24#define ANOMALY_05000099 (__SILICON_REVISION__ < 5)
48 supported */ 25/* Trace Buffers may contain errors in emulation mode and/or exception, NMI, reset handlers */
49#define ANOMALY_05000099 /* UART Line Status Register (UART_LSR) bits are not 26#define ANOMALY_05000116 (__SILICON_REVISION__ < 3)
50 updated at the same time. */ 27/* Testset instructions restricted to 32-bit aligned memory locations */
51#define ANOMALY_05000120 /* Testset instructions restricted to 32-bit aligned 28#define ANOMALY_05000120 (1)
52 memory locations */ 29/* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */
53#define ANOMALY_05000122 /* Rx.H cannot be used to access 16-bit System MMR 30#define ANOMALY_05000122 (1)
54 registers */ 31/* Erroneous exception when enabling cache */
55#define ANOMALY_05000127 /* Signbits instruction not functional under certain 32#define ANOMALY_05000125 (__SILICON_REVISION__ < 3)
56 conditions */ 33/* Signbits instruction not functional under certain conditions */
57#define ANOMALY_05000149 /* IMDMA S1/D1 channel may stall */ 34#define ANOMALY_05000127 (1)
58#define ANOMALY_05000166 /* PPI Data Lengths Between 8 and 16 do not zero out 35/* Two bits in the Watchpoint Status Register (WPSTAT) are swapped */
59 upper bits */ 36#define ANOMALY_05000134 (__SILICON_REVISION__ < 3)
60#define ANOMALY_05000167 /* Turning Serial Ports on With External Frame Syncs */ 37/* Enable wires from the Data Watchpoint Address Control Register (WPDACTL) are swapped */
61#define ANOMALY_05000180 /* PPI_DELAY not functional in PPI modes with 0 frame 38#define ANOMALY_05000135 (__SILICON_REVISION__ < 3)
62 syncs */ 39/* Stall in multi-unit DMA operations */
63#define ANOMALY_05000182 /* IMDMA does not operate to full speed for 600MHz 40#define ANOMALY_05000136 (__SILICON_REVISION__ < 3)
64 and higher devices */ 41/* Allowing the SPORT RX FIFO to fill will cause an overflow */
65#define ANOMALY_05000187 /* IMDMA Corrupted Data after a Halt */ 42#define ANOMALY_05000140 (__SILICON_REVISION__ < 3)
66#define ANOMALY_05000190 /* PPI not functional at core voltage < 1Volt */ 43/* Infinite Stall may occur with a particular sequence of consecutive dual dag events */
67#define ANOMALY_05000208 /* VSTAT status bit in PLL_STAT register is not 44#define ANOMALY_05000141 (__SILICON_REVISION__ < 3)
68 functional */ 45/* Interrupts may be lost when a programmable input flag is configured to be edge sensitive */
69#define ANOMALY_05000245 /* Spurious Hardware Error from an access in the 46#define ANOMALY_05000142 (__SILICON_REVISION__ < 3)
70 shadow of a conditional branch */ 47/* DMA and TESTSET conflict when both are accessing external memory */
71#define ANOMALY_05000257 /* Interrupt/Exception during short hardware loop 48#define ANOMALY_05000144 (__SILICON_REVISION__ < 3)
72 may cause bad instruction fetches */ 49/* In PWM_OUT mode, you must enable the PPI block to generate a waveform from PPI_CLK */
73#define ANOMALY_05000265 /* Sensitivity to noise with slow input edge rates on 50#define ANOMALY_05000145 (__SILICON_REVISION__ < 3)
74 external SPORT TX and RX clocks */ 51/* MDMA may lose the first few words of a descriptor chain */
75#define ANOMALY_05000267 /* IMDMA may corrupt data under certain conditions */ 52#define ANOMALY_05000146 (__SILICON_REVISION__ < 3)
76#define ANOMALY_05000269 /* High I/O activity causes output voltage of internal 53/* Source MDMA descriptor may stop with a DMA Error near beginning of descriptor fetch */
77 voltage regulator (VDDint) to increase */ 54#define ANOMALY_05000147 (__SILICON_REVISION__ < 3)
78#define ANOMALY_05000270 /* High I/O activity causes output voltage of internal 55/* IMDMA S1/D1 channel may stall */
79 voltage regulator (VDDint) to decrease */ 56#define ANOMALY_05000149 (1)
80#define ANOMALY_05000272 /* Certain data cache write through modes fail for 57/* DMA engine may lose data due to incorrect handshaking */
81 VDDint <=0.9V */ 58#define ANOMALY_05000150 (__SILICON_REVISION__ < 3)
82#define ANOMALY_05000274 /* Data cache write back to external synchronous memory 59/* DMA stalls when all three controllers read data from the same source */
83 may be lost */ 60#define ANOMALY_05000151 (__SILICON_REVISION__ < 3)
84#define ANOMALY_05000275 /* PPI Timing and sampling informaton updates */ 61/* Execution stall when executing in L2 and doing external accesses */
85#define ANOMALY_05000312 /* Errors when SSYNC, CSYNC, or loads to LT, LB and LC 62#define ANOMALY_05000152 (__SILICON_REVISION__ < 3)
86 registers are interrupted */ 63/* Frame Delay in SPORT Multichannel Mode */
64#define ANOMALY_05000153 (__SILICON_REVISION__ < 3)
65/* SPORT TFS signal stays active in multichannel mode outside of valid channels */
66#define ANOMALY_05000154 (__SILICON_REVISION__ < 3)
67/* Timers in PWM-Out Mode with PPI GP Receive (Input) Mode with 0 Frame Syncs */
68#define ANOMALY_05000156 (__SILICON_REVISION__ < 4)
69/* Killed 32-bit MMR write leads to next system MMR access thinking it should be 32-bit */
70#define ANOMALY_05000157 (__SILICON_REVISION__ < 3)
71/* DMA Lock-up at CCLK to SCLK ratios of 4:1, 2:1, or 1:1 */
72#define ANOMALY_05000159 (__SILICON_REVISION__ < 3)
73/* A read from external memory may return a wrong value with data cache enabled */
74#define ANOMALY_05000160 (__SILICON_REVISION__ < 3)
75/* Data Cache Fill data can be corrupted after/during Instruction DMA if certain core stalls exist */
76#define ANOMALY_05000161 (__SILICON_REVISION__ < 3)
77/* DMEM_CONTROL<12> is not set on Reset */
78#define ANOMALY_05000162 (__SILICON_REVISION__ < 3)
79/* SPORT transmit data is not gated by external frame sync in certain conditions */
80#define ANOMALY_05000163 (__SILICON_REVISION__ < 3)
81/* PPI Data Lengths Between 8 and 16 Do Not Zero Out Upper Bits */
82#define ANOMALY_05000166 (1)
83/* Turning Serial Ports on with External Frame Syncs */
84#define ANOMALY_05000167 (1)
85/* SDRAM auto-refresh and subsequent Power Ups */
86#define ANOMALY_05000168 (__SILICON_REVISION__ < 5)
87/* DATA CPLB page miss can result in lost write-through cache data writes */
88#define ANOMALY_05000169 (__SILICON_REVISION__ < 5)
89/* Boot-ROM code modifies SICA_IWRx wakeup registers */
90#define ANOMALY_05000171 (__SILICON_REVISION__ < 5)
91/* DSPID register values incorrect */
92#define ANOMALY_05000172 (__SILICON_REVISION__ < 3)
93/* DMA vs Core accesses to external memory */
94#define ANOMALY_05000173 (__SILICON_REVISION__ < 3)
95/* Cache Fill Buffer Data lost */
96#define ANOMALY_05000174 (__SILICON_REVISION__ < 5)
97/* Overlapping Sequencer and Memory Stalls */
98#define ANOMALY_05000175 (__SILICON_REVISION__ < 5)
99/* Multiplication of (-1) by (-1) followed by an accumulator saturation */
100#define ANOMALY_05000176 (__SILICON_REVISION__ < 5)
101/* PPI_COUNT Cannot Be Programmed to 0 in General Purpose TX or RX Modes */
102#define ANOMALY_05000179 (__SILICON_REVISION__ < 5)
103/* PPI_DELAY Not Functional in PPI Modes with 0 Frame Syncs */
104#define ANOMALY_05000180 (1)
105/* Disabling the PPI resets the PPI configuration registers */
106#define ANOMALY_05000181 (__SILICON_REVISION__ < 5)
107/* IMDMA does not operate to full speed for 600MHz and higher devices */
108#define ANOMALY_05000182 (1)
109/* Timer Pin limitations for PPI TX Modes with External Frame Syncs */
110#define ANOMALY_05000184 (__SILICON_REVISION__ < 5)
111/* PPI TX Mode with 2 External Frame Syncs */
112#define ANOMALY_05000185 (__SILICON_REVISION__ < 5)
113/* PPI packing with Data Length greater than 8 bits (not a meaningful mode) */
114#define ANOMALY_05000186 (__SILICON_REVISION__ < 5)
115/* IMDMA Corrupted Data after a Halt */
116#define ANOMALY_05000187 (1)
117/* IMDMA Restrictions on Descriptor and Buffer Placement in Memory */
118#define ANOMALY_05000188 (__SILICON_REVISION__ < 5)
119/* False Protection Exceptions */
120#define ANOMALY_05000189 (__SILICON_REVISION__ < 5)
121/* PPI not functional at core voltage < 1Volt */
122#define ANOMALY_05000190 (1)
123/* PPI does not invert the Driving PPICLK edge in Transmit Modes */
124#define ANOMALY_05000191 (__SILICON_REVISION__ < 3)
125/* False I/O Pin Interrupts on Edge-Sensitive Inputs When Polarity Setting Is Changed */
126#define ANOMALY_05000193 (__SILICON_REVISION__ < 5)
127/* Restarting SPORT in Specific Modes May Cause Data Corruption */
128#define ANOMALY_05000194 (__SILICON_REVISION__ < 5)
129/* Failing MMR Accesses When Stalled by Preceding Memory Read */
130#define ANOMALY_05000198 (__SILICON_REVISION__ < 5)
131/* Current DMA Address Shows Wrong Value During Carry Fix */
132#define ANOMALY_05000199 (__SILICON_REVISION__ < 5)
133/* SPORT TFS and DT Are Incorrectly Driven During Inactive Channels in Certain Conditions */
134#define ANOMALY_05000200 (__SILICON_REVISION__ < 5)
135/* Possible Infinite Stall with Specific Dual-DAG Situation */
136#define ANOMALY_05000202 (__SILICON_REVISION__ < 5)
137/* Incorrect data read with write-through cache and allocate cache lines on reads only mode */
138#define ANOMALY_05000204 (__SILICON_REVISION__ < 5)
139/* Specific sequence that can cause DMA error or DMA stopping */
140#define ANOMALY_05000205 (__SILICON_REVISION__ < 5)
141/* Recovery from "Brown-Out" Condition */
142#define ANOMALY_05000207 (__SILICON_REVISION__ < 5)
143/* VSTAT Status Bit in PLL_STAT Register Is Not Functional */
144#define ANOMALY_05000208 (1)
145/* Speed Path in Computational Unit Affects Certain Instructions */
146#define ANOMALY_05000209 (__SILICON_REVISION__ < 5)
147/* UART TX Interrupt Masked Erroneously */
148#define ANOMALY_05000215 (__SILICON_REVISION__ < 5)
149/* NMI Event at Boot Time Results in Unpredictable State */
150#define ANOMALY_05000219 (__SILICON_REVISION__ < 5)
151/* Data Corruption with Cached External Memory and Non-Cached On-Chip L2 Memory */
152#define ANOMALY_05000220 (__SILICON_REVISION__ < 5)
153/* Incorrect Pulse-Width of UART Start Bit */
154#define ANOMALY_05000225 (__SILICON_REVISION__ < 5)
155/* Scratchpad Memory Bank Reads May Return Incorrect Data */
156#define ANOMALY_05000227 (__SILICON_REVISION__ < 5)
157/* UART Receiver is Less Robust Against Baudrate Differences in Certain Conditions */
158#define ANOMALY_05000230 (__SILICON_REVISION__ < 5)
159/* UART STB Bit Incorrectly Affects Receiver Setting */
160#define ANOMALY_05000231 (__SILICON_REVISION__ < 5)
161/* SPORT data transmit lines are incorrectly driven in multichannel mode */
162#define ANOMALY_05000232 (__SILICON_REVISION__ < 5)
163/* DF Bit in PLL_CTL Register Does Not Respond to Hardware Reset */
164#define ANOMALY_05000242 (__SILICON_REVISION__ < 5)
165/* If I-Cache Is On, CSYNC/SSYNC/IDLE Around Change of Control Causes Failures */
166#define ANOMALY_05000244 (__SILICON_REVISION__ < 5)
167/* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */
168#define ANOMALY_05000245 (__SILICON_REVISION__ < 5)
169/* TESTSET operation forces stall on the other core */
170#define ANOMALY_05000248 (__SILICON_REVISION__ < 5)
171/* Incorrect Bit Shift of Data Word in Multichannel (TDM) Mode in Certain Conditions */
172#define ANOMALY_05000250 (__SILICON_REVISION__ > 2 && __SILICON_REVISION__ < 5)
173/* Exception Not Generated for MMR Accesses in Reserved Region */
174#define ANOMALY_05000251 (__SILICON_REVISION__ < 5)
175/* Maximum External Clock Speed for Timers */
176#define ANOMALY_05000253 (__SILICON_REVISION__ < 5)
177/* Incorrect Timer Pulse Width in Single-Shot PWM_OUT Mode with External Clock */
178#define ANOMALY_05000254 (__SILICON_REVISION__ > 3)
179/* Interrupt/Exception During Short Hardware Loop May Cause Bad Instruction Fetches */
180#define ANOMALY_05000257 (__SILICON_REVISION__ < 5)
181/* Instruction Cache Is Corrupted When Bits 9 and 12 of the ICPLB Data Registers Differ */
182#define ANOMALY_05000258 (__SILICON_REVISION__ < 5)
183/* ICPLB_STATUS MMR Register May Be Corrupted */
184#define ANOMALY_05000260 (__SILICON_REVISION__ < 5)
185/* DCPLB_FAULT_ADDR MMR Register May Be Corrupted */
186#define ANOMALY_05000261 (__SILICON_REVISION__ < 5)
187/* Stores To Data Cache May Be Lost */
188#define ANOMALY_05000262 (__SILICON_REVISION__ < 5)
189/* Hardware Loop Corrupted When Taking an ICPLB Exception */
190#define ANOMALY_05000263 (__SILICON_REVISION__ < 5)
191/* CSYNC/SSYNC/IDLE Causes Infinite Stall in Penultimate Instruction in Hardware Loop */
192#define ANOMALY_05000264 (__SILICON_REVISION__ < 5)
193/* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */
194#define ANOMALY_05000265 (__SILICON_REVISION__ < 5)
195/* IMDMA destination IRQ status must be read prior to using IMDMA */
196#define ANOMALY_05000266 (__SILICON_REVISION__ > 3)
197/* IMDMA may corrupt data under certain conditions */
198#define ANOMALY_05000267 (1)
199/* High I/O Activity Causes Output Voltage of Internal Voltage Regulator (Vddint) to Increase */
200#define ANOMALY_05000269 (1)
201/* High I/O Activity Causes Output Voltage of Internal Voltage Regulator (Vddint) to Decrease */
202#define ANOMALY_05000270 (1)
203/* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */
204#define ANOMALY_05000272 (1)
205/* Data cache write back to external synchronous memory may be lost */
206#define ANOMALY_05000274 (1)
207/* PPI Timing and Sampling Information Updates */
208#define ANOMALY_05000275 (__SILICON_REVISION__ > 2)
209/* Timing Requirements Change for External Frame Sync PPI Modes with Non-Zero PPI_DELAY */
210#define ANOMALY_05000276 (__SILICON_REVISION__ < 5)
211/* Disabling Peripherals with DMA Running May Cause DMA System Instability */
212#define ANOMALY_05000278 (__SILICON_REVISION__ < 5)
213/* False Hardware Error Exception When ISR Context Is Not Restored */
214#define ANOMALY_05000281 (__SILICON_REVISION__ < 5)
215/* System MMR Write Is Stalled Indefinitely When Killed in a Particular Stage */
216#define ANOMALY_05000283 (1)
217/* A read will receive incorrect data under certain conditions */
218#define ANOMALY_05000287 (__SILICON_REVISION__ < 5)
219/* SPORTs May Receive Bad Data If FIFOs Fill Up */
220#define ANOMALY_05000288 (__SILICON_REVISION__ < 5)
221/* Memory-To-Memory DMA Source/Destination Descriptors Must Be in Same Memory Space */
222#define ANOMALY_05000301 (1)
223/* SSYNCs After Writes To DMA MMR Registers May Not Be Handled Correctly */
224#define ANOMALY_05000302 (1)
225/* New Feature: Additional Hysteresis on SPORT Input Pins (Not Available On Older Silicon) */
226#define ANOMALY_05000305 (__SILICON_REVISION__ < 5)
227/* SCKELOW Bit Does Not Maintain State Through Hibernate */
228#define ANOMALY_05000307 (__SILICON_REVISION__ < 5)
229/* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */
230#define ANOMALY_05000310 (1)
231/* Errors When SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */
232#define ANOMALY_05000312 (1)
233/* PPI Is Level-Sensitive on First Transfer */
234#define ANOMALY_05000313 (1)
235/* Killed System MMR Write Completes Erroneously On Next System MMR Access */
236#define ANOMALY_05000315 (1)
237/* PF2 Output Remains Asserted After SPI Master Boot */
238#define ANOMALY_05000320 (__SILICON_REVISION__ > 3)
239/* Erroneous GPIO Flag Pin Operations Under Specific Sequences */
240#define ANOMALY_05000323 (1)
241/* SPORT Secondary Receive Channel Not Functional When Word Length Exceeds 16 Bits */
242#define ANOMALY_05000326 (__SILICON_REVISION__ > 3)
243/* New Feature: 24-Bit SPI Boot Mode Support (Not Available On Older Silicon) */
244#define ANOMALY_05000331 (__SILICON_REVISION__ < 5)
245/* New Feature: Slave SPI Boot Mode Supported (Not Available On Older Silicon) */
246#define ANOMALY_05000332 (__SILICON_REVISION__ < 5)
247/* Flag Data Register Writes One SCLK Cycle After Edge Is Detected May Clear Interrupt Status */
248#define ANOMALY_05000333 (__SILICON_REVISION__ < 5)
87 249
88#endif /* (defined(CONFIG_BF_REV_0_5) || defined(CONFIG_BF_REV_0_3)) */ 250/* Anomalies that don't exist on this proc */
251#define ANOMALY_05000158 (0)
252#define ANOMALY_05000183 (0)
253#define ANOMALY_05000273 (0)
254#define ANOMALY_05000311 (0)
89 255
90#if (defined(CONFIG_BF_REV_0_5))
91#define ANOMALY_05000254 /* Incorrect Timer Pulse Width in Single-Shot PWM_OUT
92 mode with external clock */
93#define ANOMALY_05000266 /* IMDMA destination IRQ status must be read prior to
94 using IMDMA */
95#endif 256#endif
96
97#if (defined(CONFIG_BF_REV_0_3))
98#define ANOMALY_05000156 /* Timers in PWM-Out Mode with PPI GP Receive (Input)
99 Mode with 0 Frame Syncs */
100#define ANOMALY_05000168 /* SDRAM auto-refresh and subsequent Power Ups */
101#define ANOMALY_05000169 /* DATA CPLB page miss can result in lost write-through
102 cache data writes */
103#define ANOMALY_05000171 /* Boot-ROM code modifies SICA_IWRx wakeup registers */
104#define ANOMALY_05000174 /* Cache Fill Buffer Data lost */
105#define ANOMALY_05000175 /* Overlapping Sequencer and Memory Stalls */
106#define ANOMALY_05000176 /* Multiplication of (-1) by (-1) followed by an
107 accumulator saturation */
108#define ANOMALY_05000179 /* PPI_COUNT cannot be programmed to 0 in General
109 Purpose TX or RX modes */
110#define ANOMALY_05000181 /* Disabling the PPI resets the PPI configuration
111 registers */
112#define ANOMALY_05000184 /* Timer Pin limitations for PPI TX Modes with
113 External Frame Syncs */
114#define ANOMALY_05000185 /* PPI TX Mode with 2 External Frame Syncs */
115#define ANOMALY_05000186 /* PPI packing with Data Length greater than 8 bits
116 (not a meaningful mode) */
117#define ANOMALY_05000188 /* IMDMA Restrictions on Descriptor and Buffer
118 Placement in Memory */
119#define ANOMALY_05000189 /* False Protection Exception */
120#define ANOMALY_05000193 /* False Flag Pin Interrupts on Edge Sensitive Inputs
121 when polarity setting is changed */
122#define ANOMALY_05000194 /* Restarting SPORT in specific modes may cause data
123 corruption */
124#define ANOMALY_05000198 /* Failing MMR accesses when stalled by preceding
125 memory read */
126#define ANOMALY_05000199 /* DMA current address shows wrong value during carry
127 fix */
128#define ANOMALY_05000200 /* SPORT TFS and DT are incorrectly driven during
129 inactive channels in certain conditions */
130#define ANOMALY_05000202 /* Possible infinite stall with specific dual-DAG
131 situation */
132#define ANOMALY_05000204 /* Incorrect data read with write-through cache and
133 allocate cache lines on reads only mode */
134#define ANOMALY_05000205 /* Specific sequence that can cause DMA error or DMA
135 stopping */
136#define ANOMALY_05000207 /* Recovery from "brown-out" condition */
137#define ANOMALY_05000209 /* Speed-Path in computational unit affects certain
138 instructions */
139#define ANOMALY_05000215 /* UART TX Interrupt masked erroneously */
140#define ANOMALY_05000219 /* NMI event at boot time results in unpredictable
141 state */
142#define ANOMALY_05000220 /* Data Corruption with Cached External Memory and
143 Non-Cached On-Chip L2 Memory */
144#define ANOMALY_05000225 /* Incorrect pulse-width of UART start-bit */
145#define ANOMALY_05000227 /* Scratchpad memory bank reads may return incorrect
146 data */
147#define ANOMALY_05000230 /* UART Receiver is less robust against Baudrate
148 Differences in certain Conditions */
149#define ANOMALY_05000231 /* UART STB bit incorrectly affects receiver setting */
150#define ANOMALY_05000232 /* SPORT data transmit lines are incorrectly driven in
151 multichannel mode */
152#define ANOMALY_05000242 /* DF bit in PLL_CTL register does not respond to
153 hardware reset */
154#define ANOMALY_05000244 /* If i-cache is on, CSYNC/SSYNC/IDLE around Change of
155 Control causes failures */
156#define ANOMALY_05000248 /* TESTSET operation forces stall on the other core */
157#define ANOMALY_05000250 /* Incorrect Bit-Shift of Data Word in Multichannel
158 (TDM) mode in certain conditions */
159#define ANOMALY_05000251 /* Exception not generated for MMR accesses in
160 reserved region */
161#define ANOMALY_05000253 /* Maximum external clock speed for Timers */
162#define ANOMALY_05000258 /* Instruction Cache is corrupted when bits 9 and 12
163 of the ICPLB Data registers differ */
164#define ANOMALY_05000260 /* ICPLB_STATUS MMR register may be corrupted */
165#define ANOMALY_05000261 /* DCPLB_FAULT_ADDR MMR register may be corrupted */
166#define ANOMALY_05000262 /* Stores to data cache may be lost */
167#define ANOMALY_05000263 /* Hardware loop corrupted when taking an ICPLB
168 exception */
169#define ANOMALY_05000264 /* CSYNC/SSYNC/IDLE causes infinite stall in second
170 to last instruction in hardware loop */
171#define ANOMALY_05000276 /* Timing requirements change for External Frame
172 Sync PPI Modes with non-zero PPI_DELAY */
173#define ANOMALY_05000278 /* Disabling Peripherals with DMA running may cause
174 DMA system instability */
175#define ANOMALY_05000281 /* False Hardware Error Exception when ISR context is
176 not restored */
177#define ANOMALY_05000283 /* An MMR write is stalled indefinitely when killed
178 in a particular stage */
179#define ANOMALY_05000287 /* A read will receive incorrect data under certain
180 conditions */
181#define ANOMALY_05000288 /* SPORTs may receive bad data if FIFOs fill up */
182#endif
183
184#endif /* _MACH_ANOMALY_H_ */
diff --git a/include/asm-blackfin/mach-bf561/bf561.h b/include/asm-blackfin/mach-bf561/bf561.h
index 96a5d3a47e45..17e1d5dcef02 100644
--- a/include/asm-blackfin/mach-bf561/bf561.h
+++ b/include/asm-blackfin/mach-bf561/bf561.h
@@ -73,13 +73,13 @@
73 */ 73 */
74 74
75 75
76#define BLKFIN_ISUBBANKS 4 76#define BFIN_ISUBBANKS 4
77#define BLKFIN_IWAYS 4 77#define BFIN_IWAYS 4
78#define BLKFIN_ILINES 32 78#define BFIN_ILINES 32
79 79
80#define BLKFIN_DSUBBANKS 4 80#define BFIN_DSUBBANKS 4
81#define BLKFIN_DWAYS 2 81#define BFIN_DWAYS 2
82#define BLKFIN_DLINES 64 82#define BFIN_DLINES 64
83 83
84#define WAY0_L 0x1 84#define WAY0_L 0x1
85#define WAY1_L 0x2 85#define WAY1_L 0x2
@@ -230,93 +230,6 @@
230 230
231#define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO | V_B0PEN | V_B1PEN | V_B2PEN | V_B3PEN | 0x0002) 231#define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO | V_B0PEN | V_B1PEN | V_B2PEN | V_B3PEN | 0x0002)
232 232
233#define MAX_VC 600000000
234#define MIN_VC 50000000
235
236/******************************* PLL Settings ********************************/
237#ifdef CONFIG_BFIN_KERNEL_CLOCK
238#if (CONFIG_VCO_MULT < 0)
239#error "VCO Multiplier is less than 0. Please select a different value"
240#endif
241
242#if (CONFIG_VCO_MULT == 0)
243#error "VCO Multiplier should be greater than 0. Please select a different value"
244#endif
245
246#ifndef CONFIG_CLKIN_HALF
247#define CONFIG_VCO_HZ (CONFIG_CLKIN_HZ * CONFIG_VCO_MULT)
248#else
249#define CONFIG_VCO_HZ ((CONFIG_CLKIN_HZ * CONFIG_VCO_MULT)/2)
250#endif
251
252#ifndef CONFIG_PLL_BYPASS
253#define CONFIG_CCLK_HZ (CONFIG_VCO_HZ/CONFIG_CCLK_DIV)
254#define CONFIG_SCLK_HZ (CONFIG_VCO_HZ/CONFIG_SCLK_DIV)
255#else
256#define CONFIG_CCLK_HZ CONFIG_CLKIN_HZ
257#define CONFIG_SCLK_HZ CONFIG_CLKIN_HZ
258#endif
259
260#if (CONFIG_SCLK_DIV < 1)
261#error "SCLK DIV cannot be less than 1 or more than 15. Please select a proper value"
262#endif
263
264#if (CONFIG_SCLK_DIV > 15)
265#error "SCLK DIV cannot be less than 1 or more than 15. Please select a proper value"
266#endif
267
268#if (CONFIG_CCLK_DIV != 1)
269#if (CONFIG_CCLK_DIV != 2)
270#if (CONFIG_CCLK_DIV != 4)
271#if (CONFIG_CCLK_DIV != 8)
272#error "CCLK DIV can be 1,2,4 or 8 only. Please select a proper value"
273#endif
274#endif
275#endif
276#endif
277
278#if (CONFIG_VCO_HZ > MAX_VC)
279#error "VCO selected is more than maximum value. Please change the VCO multipler"
280#endif
281
282#if (CONFIG_SCLK_HZ > 133000000)
283#error "Sclk value selected is more than maximum. Please select a proper value for SCLK multiplier"
284#endif
285
286#if (CONFIG_SCLK_HZ < 27000000)
287#error "Sclk value selected is less than minimum. Please select a proper value for SCLK multiplier"
288#endif
289
290#if (CONFIG_SCLK_HZ >= CONFIG_CCLK_HZ)
291#if (CONFIG_SCLK_HZ != CONFIG_CLKIN_HZ)
292#if (CONFIG_CCLK_HZ != CONFIG_CLKIN_HZ)
293#error "Please select sclk less than cclk"
294#endif
295#endif
296#endif
297
298#if (CONFIG_CCLK_DIV == 1)
299#define CONFIG_CCLK_ACT_DIV CCLK_DIV1
300#endif
301#if (CONFIG_CCLK_DIV == 2)
302#define CONFIG_CCLK_ACT_DIV CCLK_DIV2
303#endif
304#if (CONFIG_CCLK_DIV == 4)
305#define CONFIG_CCLK_ACT_DIV CCLK_DIV4
306#endif
307#if (CONFIG_CCLK_DIV == 8)
308#define CONFIG_CCLK_ACT_DIV CCLK_DIV8
309#endif
310#ifndef CONFIG_CCLK_ACT_DIV
311#define CONFIG_CCLK_ACT_DIV CONFIG_CCLK_DIV_not_defined_properly
312#endif
313
314#if defined(ANOMALY_05000273) && (CONFIG_CCLK_DIV == 1)
315#error ANOMALY 05000273, please make sure CCLK is at least 2x SCLK
316#endif
317
318#endif /* CONFIG_BFIN_KERNEL_CLOCK */
319
320#ifdef CONFIG_BF561 233#ifdef CONFIG_BF561
321#define CPU "BF561" 234#define CPU "BF561"
322#define CPUID 0x027bb000 235#define CPUID 0x027bb000
@@ -326,83 +239,4 @@
326#define CPUID 0x0 239#define CPUID 0x0
327#endif 240#endif
328 241
329#if (CONFIG_MEM_SIZE % 4)
330#error "SDRAM memory size must be a multiple of 4MB!"
331#endif
332#define SDRAM_IGENERIC (CPLB_L1_CHBL | CPLB_USER_RD | CPLB_VALID | CPLB_PORTPRIO)
333#define SDRAM_IKERNEL (SDRAM_IGENERIC | CPLB_LOCK)
334#define L1_IMEMORY ( CPLB_USER_RD | CPLB_VALID | CPLB_LOCK)
335#define SDRAM_INON_CHBL ( CPLB_USER_RD | CPLB_VALID)
336
337/*Use the menuconfig cache policy here - CONFIG_BLKFIN_WT/CONFIG_BLKFIN_WB*/
338
339#define ANOMALY_05000158_WORKAROUND 0x200
340#ifdef CONFIG_BLKFIN_WB /*Write Back Policy */
341#define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_DIRTY \
342 | CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND)
343#else /*Write Through */
344#define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW | CPLB_DIRTY \
345 | CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND)
346#endif
347
348
349#define L1_DMEMORY (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY)
350#define SDRAM_DNON_CHBL (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_DIRTY)
351#define SDRAM_EBIU (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_DIRTY)
352#define SDRAM_OOPS (CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY)
353
354#define L2_MEMORY (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_DIRTY)
355
356#define SIZE_1K 0x00000400 /* 1K */
357#define SIZE_4K 0x00001000 /* 4K */
358#define SIZE_1M 0x00100000 /* 1M */
359#define SIZE_4M 0x00400000 /* 4M */
360
361#define MAX_CPLBS (16 * 2)
362
363/*
364* Number of required data CPLB switchtable entries
365* MEMSIZE / 4 (we mostly install 4M page size CPLBs
366* approx 16 for smaller 1MB page size CPLBs for allignment purposes
367* 1 for L1 Data Memory
368* 1 for L2 Data Memory
369* 1 for CONFIG_DEBUG_HUNT_FOR_ZERO
370* 64 for ASYNC Memory
371*/
372
373
374#define MAX_SWITCH_D_CPLBS (((CONFIG_MEM_SIZE / 4) + 16 + 1 + 1 + 1 + 64) * 2)
375
376/*
377* Number of required instruction CPLB switchtable entries
378* MEMSIZE / 4 (we mostly install 4M page size CPLBs
379* approx 12 for smaller 1MB page size CPLBs for allignment purposes
380* 1 for L1 Instruction Memory
381* 1 for L2 Instruction Memory
382* 1 for CONFIG_DEBUG_HUNT_FOR_ZERO
383*/
384
385#define MAX_SWITCH_I_CPLBS (((CONFIG_MEM_SIZE / 4) + 12 + 1 + 1 + 1) * 2)
386
387#if 0 /* comment by mhfan */
388/* Event Vector Table Address */
389#define EVT_EMULATION_ADDR 0xffe02000
390#define EVT_RESET_ADDR 0xffe02004
391#define EVT_NMI_ADDR 0xffe02008
392#define EVT_EXCEPTION_ADDR 0xffe0200c
393#define EVT_GLOBAL_INT_ENB_ADDR 0xffe02010
394#define EVT_HARDWARE_ERROR_ADDR 0xffe02014
395#define EVT_TIMER_ADDR 0xffe02018
396#define EVT_IVG7_ADDR 0xffe0201c
397#define EVT_IVG8_ADDR 0xffe02020
398#define EVT_IVG9_ADDR 0xffe02024
399#define EVT_IVG10_ADDR 0xffe02028
400#define EVT_IVG11_ADDR 0xffe0202c
401#define EVT_IVG12_ADDR 0xffe02030
402#define EVT_IVG13_ADDR 0xffe02034
403#define EVT_IVG14_ADDR 0xffe02038
404#define EVT_IVG15_ADDR 0xffe0203c
405#define EVT_OVERRIDE_ADDR 0xffe02100
406#endif /* comment by mhfan */
407
408#endif /* __MACH_BF561_H__ */ 242#endif /* __MACH_BF561_H__ */
diff --git a/include/asm-blackfin/mach-bf561/blackfin.h b/include/asm-blackfin/mach-bf561/blackfin.h
index 2537c845e8b0..562aee39895c 100644
--- a/include/asm-blackfin/mach-bf561/blackfin.h
+++ b/include/asm-blackfin/mach-bf561/blackfin.h
@@ -38,7 +38,7 @@
38#include "defBF561.h" 38#include "defBF561.h"
39#include "anomaly.h" 39#include "anomaly.h"
40 40
41#if !(defined(__ASSEMBLY__) || defined(ASSEMBLY)) 41#if !defined(__ASSEMBLY__)
42#include "cdefBF561.h" 42#include "cdefBF561.h"
43#endif 43#endif
44 44
diff --git a/include/asm-blackfin/mach-bf561/cdefBF561.h b/include/asm-blackfin/mach-bf561/cdefBF561.h
index 73d4d65249cd..d667816486c0 100644
--- a/include/asm-blackfin/mach-bf561/cdefBF561.h
+++ b/include/asm-blackfin/mach-bf561/cdefBF561.h
@@ -31,11 +31,8 @@
31#ifndef _CDEF_BF561_H 31#ifndef _CDEF_BF561_H
32#define _CDEF_BF561_H 32#define _CDEF_BF561_H
33 33
34/* 34#include <asm/blackfin.h>
35#if !defined(__ADSPBF561__) 35
36#warning cdefBF561.h should only be included for BF561 chip.
37#endif
38*/
39/* include all Core registers and bit definitions */ 36/* include all Core registers and bit definitions */
40#include "defBF561.h" 37#include "defBF561.h"
41 38
@@ -67,7 +64,7 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
67 bfin_write32(SICA_IWR1, 0); 64 bfin_write32(SICA_IWR1, 0);
68 65
69 bfin_write16(VR_CTL, val); 66 bfin_write16(VR_CTL, val);
70 __builtin_bfin_ssync(); 67 SSYNC();
71 68
72 local_irq_save(flags); 69 local_irq_save(flags);
73 asm("IDLE;"); 70 asm("IDLE;");
diff --git a/include/asm-blackfin/mach-bf561/defBF561.h b/include/asm-blackfin/mach-bf561/defBF561.h
index 0f2dc6e6335b..bf7dc4e00065 100644
--- a/include/asm-blackfin/mach-bf561/defBF561.h
+++ b/include/asm-blackfin/mach-bf561/defBF561.h
@@ -120,6 +120,7 @@
120#define UART_GCTL 0xFFC00424 /* Global Control Register */ 120#define UART_GCTL 0xFFC00424 /* Global Control Register */
121 121
122/* SPI Controller (0xFFC00500 - 0xFFC005FF) */ 122/* SPI Controller (0xFFC00500 - 0xFFC005FF) */
123#define SPI0_REGBASE 0xFFC00500
123#define SPI_CTL 0xFFC00500 /* SPI Control Register */ 124#define SPI_CTL 0xFFC00500 /* SPI Control Register */
124#define SPI_FLG 0xFFC00504 /* SPI Flag register */ 125#define SPI_FLG 0xFFC00504 /* SPI Flag register */
125#define SPI_STAT 0xFFC00508 /* SPI Status register */ 126#define SPI_STAT 0xFFC00508 /* SPI Status register */
diff --git a/include/asm-blackfin/mach-bf561/irq.h b/include/asm-blackfin/mach-bf561/irq.h
index a753ce720d74..12789927db3d 100644
--- a/include/asm-blackfin/mach-bf561/irq.h
+++ b/include/asm-blackfin/mach-bf561/irq.h
@@ -289,6 +289,8 @@
289#define IRQ_PF46 119 289#define IRQ_PF46 119
290#define IRQ_PF47 120 290#define IRQ_PF47 120
291 291
292#define GPIO_IRQ_BASE IRQ_PF0
293
292#ifdef CONFIG_IRQCHIP_DEMUX_GPIO 294#ifdef CONFIG_IRQCHIP_DEMUX_GPIO
293#define NR_IRQS (IRQ_PF47 + 1) 295#define NR_IRQS (IRQ_PF47 + 1)
294#else 296#else
diff --git a/include/asm-blackfin/mach-bf561/mem_map.h b/include/asm-blackfin/mach-bf561/mem_map.h
index ebac9a8d838d..f7ac09cf2c3d 100644
--- a/include/asm-blackfin/mach-bf561/mem_map.h
+++ b/include/asm-blackfin/mach-bf561/mem_map.h
@@ -21,10 +21,10 @@
21 21
22/* Level 1 Memory */ 22/* Level 1 Memory */
23 23
24#ifdef CONFIG_BLKFIN_CACHE 24#ifdef CONFIG_BFIN_ICACHE
25#define BLKFIN_ICACHESIZE (16*1024) 25#define BFIN_ICACHESIZE (16*1024)
26#else 26#else
27#define BLKFIN_ICACHESIZE (0*1024) 27#define BFIN_ICACHESIZE (0*1024)
28#endif 28#endif
29 29
30/* Memory Map for ADSP-BF561 processors */ 30/* Memory Map for ADSP-BF561 processors */
@@ -36,29 +36,29 @@
36 36
37#define L1_CODE_LENGTH 0x4000 37#define L1_CODE_LENGTH 0x4000
38 38
39#ifdef CONFIG_BLKFIN_DCACHE 39#ifdef CONFIG_BFIN_DCACHE
40 40
41#ifdef CONFIG_BLKFIN_DCACHE_BANKA 41#ifdef CONFIG_BFIN_DCACHE_BANKA
42#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0) 42#define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0)
43#define L1_DATA_A_LENGTH (0x8000 - 0x4000) 43#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
44#define L1_DATA_B_LENGTH 0x8000 44#define L1_DATA_B_LENGTH 0x8000
45#define BLKFIN_DCACHESIZE (16*1024) 45#define BFIN_DCACHESIZE (16*1024)
46#define BLKFIN_DSUPBANKS 1 46#define BFIN_DSUPBANKS 1
47#else 47#else
48#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0) 48#define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0)
49#define L1_DATA_A_LENGTH (0x8000 - 0x4000) 49#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
50#define L1_DATA_B_LENGTH (0x8000 - 0x4000) 50#define L1_DATA_B_LENGTH (0x8000 - 0x4000)
51#define BLKFIN_DCACHESIZE (32*1024) 51#define BFIN_DCACHESIZE (32*1024)
52#define BLKFIN_DSUPBANKS 2 52#define BFIN_DSUPBANKS 2
53#endif 53#endif
54 54
55#else 55#else
56#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0) 56#define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0)
57#define L1_DATA_A_LENGTH 0x8000 57#define L1_DATA_A_LENGTH 0x8000
58#define L1_DATA_B_LENGTH 0x8000 58#define L1_DATA_B_LENGTH 0x8000
59#define BLKFIN_DCACHESIZE (0*1024) 59#define BFIN_DCACHESIZE (0*1024)
60#define BLKFIN_DSUPBANKS 0 60#define BFIN_DSUPBANKS 0
61#endif /*CONFIG_BLKFIN_DCACHE*/ 61#endif /*CONFIG_BFIN_DCACHE*/
62#endif 62#endif
63 63
64/* Level 2 Memory */ 64/* Level 2 Memory */
diff --git a/include/asm-blackfin/mach-bf561/portmux.h b/include/asm-blackfin/mach-bf561/portmux.h
index 10d11d5ffe23..132ad31665e3 100644
--- a/include/asm-blackfin/mach-bf561/portmux.h
+++ b/include/asm-blackfin/mach-bf561/portmux.h
@@ -81,7 +81,7 @@
81#define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PF1)) 81#define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PF1))
82#define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PF0)) 82#define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PF0))
83#define P_SPI0_MOSI (P_DONTCARE) 83#define P_SPI0_MOSI (P_DONTCARE)
84#define P_SPI0_MIS0 (P_DONTCARE) 84#define P_SPI0_MISO (P_DONTCARE)
85#define P_SPI0_SCK (P_DONTCARE) 85#define P_SPI0_SCK (P_DONTCARE)
86 86
87#endif /* _MACH_PORTMUX_H_ */ 87#endif /* _MACH_PORTMUX_H_ */
diff --git a/include/asm-blackfin/mach-common/cdef_LPBlackfin.h b/include/asm-blackfin/mach-common/cdef_LPBlackfin.h
index 94ed381e5606..ede210eca4ec 100644
--- a/include/asm-blackfin/mach-common/cdef_LPBlackfin.h
+++ b/include/asm-blackfin/mach-common/cdef_LPBlackfin.h
@@ -39,7 +39,7 @@
39#define bfin_read_SRAM_BASE_ADDRESS() bfin_read32(SRAM_BASE_ADDRESS) 39#define bfin_read_SRAM_BASE_ADDRESS() bfin_read32(SRAM_BASE_ADDRESS)
40#define bfin_write_SRAM_BASE_ADDRESS(val) bfin_write32(SRAM_BASE_ADDRESS,val) 40#define bfin_write_SRAM_BASE_ADDRESS(val) bfin_write32(SRAM_BASE_ADDRESS,val)
41#define bfin_read_DMEM_CONTROL() bfin_read32(DMEM_CONTROL) 41#define bfin_read_DMEM_CONTROL() bfin_read32(DMEM_CONTROL)
42#ifdef ANOMALY_05000125 42#if ANOMALY_05000125
43extern void bfin_write_DMEM_CONTROL(unsigned int val); 43extern void bfin_write_DMEM_CONTROL(unsigned int val);
44#else 44#else
45#define bfin_write_DMEM_CONTROL(val) bfin_write32(DMEM_CONTROL,val) 45#define bfin_write_DMEM_CONTROL(val) bfin_write32(DMEM_CONTROL,val)
@@ -129,7 +129,7 @@ extern void bfin_write_DMEM_CONTROL(unsigned int val);
129#define DTEST_DATA3 0xFFE0040C 129#define DTEST_DATA3 0xFFE0040C
130*/ 130*/
131#define bfin_read_IMEM_CONTROL() bfin_read32(IMEM_CONTROL) 131#define bfin_read_IMEM_CONTROL() bfin_read32(IMEM_CONTROL)
132#ifdef ANOMALY_05000125 132#if ANOMALY_05000125
133extern void bfin_write_IMEM_CONTROL(unsigned int val); 133extern void bfin_write_IMEM_CONTROL(unsigned int val);
134#else 134#else
135#define bfin_write_IMEM_CONTROL(val) bfin_write32(IMEM_CONTROL,val) 135#define bfin_write_IMEM_CONTROL(val) bfin_write32(IMEM_CONTROL,val)
diff --git a/include/asm-blackfin/mach-common/clocks.h b/include/asm-blackfin/mach-common/clocks.h
new file mode 100644
index 000000000000..033bba92d61c
--- /dev/null
+++ b/include/asm-blackfin/mach-common/clocks.h
@@ -0,0 +1,70 @@
1/*
2 * File: include/asm-blackfin/mach-common/clocks.h
3 * Based on: include/asm-blackfin/mach-bf537/bf537.h
4 * Author: Robin Getz <rgetz@blackfin.uclinux.org>
5 *
6 * Created: 25Jul07
7 * Description: Common Clock definitions for various kernel files
8 *
9 * Modified:
10 * Copyright 2004-2007 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#ifndef _BFIN_CLOCKS_H
31#define _BFIN_CLOCKS_H
32
33#ifdef CONFIG_CCLK_DIV_1
34# define CONFIG_CCLK_ACT_DIV CCLK_DIV1
35# define CONFIG_CCLK_DIV 1
36#endif
37
38#ifdef CONFIG_CCLK_DIV_2
39# define CONFIG_CCLK_ACT_DIV CCLK_DIV2
40# define CONFIG_CCLK_DIV 2
41#endif
42
43#ifdef CONFIG_CCLK_DIV_4
44# define CONFIG_CCLK_ACT_DIV CCLK_DIV4
45# define CONFIG_CCLK_DIV 4
46#endif
47
48#ifdef CONFIG_CCLK_DIV_8
49# define CONFIG_CCLK_ACT_DIV CCLK_DIV8
50# define CONFIG_CCLK_DIV 8
51#endif
52
53#ifndef CONFIG_PLL_BYPASS
54# ifndef CONFIG_CLKIN_HALF
55# define CONFIG_VCO_HZ (CONFIG_CLKIN_HZ * CONFIG_VCO_MULT)
56# else
57# define CONFIG_VCO_HZ ((CONFIG_CLKIN_HZ * CONFIG_VCO_MULT)/2)
58# endif
59
60# define CONFIG_CCLK_HZ (CONFIG_VCO_HZ/CONFIG_CCLK_DIV)
61# define CONFIG_SCLK_HZ (CONFIG_VCO_HZ/CONFIG_SCLK_DIV)
62
63#else
64# define CONFIG_VCO_HZ (CONFIG_CLKIN_HZ)
65# define CONFIG_CCLK_HZ (CONFIG_CLKIN_HZ)
66# define CONFIG_SCLK_HZ (CONFIG_CLKIN_HZ)
67# define CONFIG_VCO_MULT 0
68#endif
69
70#endif
diff --git a/include/asm-blackfin/mach-common/def_LPBlackfin.h b/include/asm-blackfin/mach-common/def_LPBlackfin.h
index be1ece8c0c27..c1d8c4a78fcf 100644
--- a/include/asm-blackfin/mach-common/def_LPBlackfin.h
+++ b/include/asm-blackfin/mach-common/def_LPBlackfin.h
@@ -33,81 +33,77 @@
33 33
34#include <asm/mach/anomaly.h> 34#include <asm/mach/anomaly.h>
35 35
36/*#if !defined(__ADSPLPBLACKFIN__)
37#warning def_LPBlackfin.h should only be included for 532 compatible chips.
38#endif
39*/
40
41#define MK_BMSK_(x) (1<<x) 36#define MK_BMSK_(x) (1<<x)
42 37
43#if defined(ANOMALY_05000198) 38#ifndef __ASSEMBLY__
44
45#define bfin_read8(addr) ({ unsigned char __v; \
46 __asm__ __volatile__ ("NOP;\n\t" \
47 "%0 = b[%1] (z);\n\t" \
48 : "=d"(__v) : "a"(addr)); \
49 __v; })
50
51#define bfin_read16(addr) ({ unsigned __v; \
52 __asm__ __volatile__ ("NOP;\n\t"\
53 "%0 = w[%1] (z);\n\t"\
54 : "=d"(__v) : "a"(addr)); (unsigned short)__v; })
55
56#define bfin_read32(addr) ({ unsigned __v; \
57 __asm__ __volatile__ ("NOP;\n\t"\
58 "%0 = [%1];\n\t"\
59 : "=d"(__v) : "a"(addr)); __v; })
60
61#define bfin_write8(addr, val) ({ \
62 __asm__ __volatile__ ("NOP;\n\t" \
63 "b[%0] = %1;\n\t" \
64 : : "a"(addr), "d"(val) : "memory");})
65 39
66#define bfin_write16(addr,val) ({\ 40#include <linux/types.h>
67 __asm__ __volatile__ ("NOP;\n\t"\
68 "w[%0] = %1;\n\t"\
69 : : "a"(addr) , "d"(val) : "memory");})
70
71#define bfin_write32(addr,val) ({\
72 __asm__ __volatile__ ("NOP;\n\t"\
73 "[%0] = %1;\n\t"\
74 : : "a"(addr) , "d"(val) : "memory");})
75 41
42#if ANOMALY_05000198
43# define NOP_PAD_ANOMALY_05000198 "nop;"
76#else 44#else
77 45# define NOP_PAD_ANOMALY_05000198
78#define bfin_read8(addr) ({ unsigned char __v; \
79 __asm__ __volatile__ ( \
80 "%0 = b[%1] (z);\n\t" \
81 :"=d"(__v) : "a"(addr)); \
82 __v; })
83
84#define bfin_read16(addr) ({ unsigned __v; \
85 __asm__ __volatile__ (\
86 "%0 = w[%1] (z);\n\t"\
87 : "=d"(__v) : "a"(addr)); (unsigned short)__v; })
88
89#define bfin_read32(addr) ({ unsigned __v; \
90 __asm__ __volatile__ (\
91 "%0 = [%1];\n\t"\
92 : "=d"(__v) : "a"(addr)); __v; })
93
94#define bfin_write8(addr, val) ({ \
95 __asm__ __volatile__ ( \
96 "b[%0] = %1; \n\t" \
97 ::"a"(addr), "d"(val) : "memory");})
98
99#define bfin_write16(addr,val) ({\
100 __asm__ __volatile__ (\
101 "w[%0] = %1;\n\t"\
102 : : "a"(addr) , "d"(val) : "memory");})
103
104#define bfin_write32(addr,val) ({\
105 __asm__ __volatile__ (\
106 "[%0] = %1;\n\t"\
107 : : "a"(addr) , "d"(val) : "memory");})
108
109#endif 46#endif
110 47
48#define bfin_read8(addr) ({ \
49 uint8_t __v; \
50 __asm__ __volatile__( \
51 NOP_PAD_ANOMALY_05000198 \
52 "%0 = b[%1] (z);" \
53 : "=d" (__v) \
54 : "a" (addr) \
55 ); \
56 __v; })
57
58#define bfin_read16(addr) ({ \
59 uint16_t __v; \
60 __asm__ __volatile__( \
61 NOP_PAD_ANOMALY_05000198 \
62 "%0 = w[%1] (z);" \
63 : "=d" (__v) \
64 : "a" (addr) \
65 ); \
66 __v; })
67
68#define bfin_read32(addr) ({ \
69 uint32_t __v; \
70 __asm__ __volatile__( \
71 NOP_PAD_ANOMALY_05000198 \
72 "%0 = [%1];" \
73 : "=d" (__v) \
74 : "a" (addr) \
75 ); \
76 __v; })
77
78#define bfin_write8(addr, val) \
79 __asm__ __volatile__( \
80 NOP_PAD_ANOMALY_05000198 \
81 "b[%0] = %1;" \
82 : \
83 : "a" (addr), "d" (val) \
84 : "memory" \
85 )
86
87#define bfin_write16(addr, val) \
88 __asm__ __volatile__( \
89 NOP_PAD_ANOMALY_05000198 \
90 "w[%0] = %1;" \
91 : \
92 : "a" (addr), "d" (val) \
93 : "memory" \
94 )
95
96#define bfin_write32(addr, val) \
97 __asm__ __volatile__( \
98 NOP_PAD_ANOMALY_05000198 \
99 "[%0] = %1;" \
100 : \
101 : "a" (addr), "d" (val) \
102 : "memory" \
103 )
104
105#endif /* __ASSEMBLY__ */
106
111/************************************************** 107/**************************************************
112 * System Register Bits 108 * System Register Bits
113 **************************************************/ 109 **************************************************/
@@ -643,6 +639,7 @@
643#define CPLB_USER_RD 0x00000004 /* 0=no read access, 1=read access 639#define CPLB_USER_RD 0x00000004 /* 0=no read access, 1=read access
644 * allowed (user mode) 640 * allowed (user mode)
645 */ 641 */
642
646#define PAGE_SIZE_1KB 0x00000000 /* 1 KB page size */ 643#define PAGE_SIZE_1KB 0x00000000 /* 1 KB page size */
647#define PAGE_SIZE_4KB 0x00010000 /* 4 KB page size */ 644#define PAGE_SIZE_4KB 0x00010000 /* 4 KB page size */
648#define PAGE_SIZE_1MB 0x00020000 /* 1 MB page size */ 645#define PAGE_SIZE_1MB 0x00020000 /* 1 MB page size */
@@ -675,6 +672,8 @@
675 */ 672 */
676#define CPLB_WT 0x00004000 /* 0=write-back, 1=write-through */ 673#define CPLB_WT 0x00004000 /* 0=write-back, 1=write-through */
677 674
675#define CPLB_ALL_ACCESS CPLB_SUPV_WR | CPLB_USER_RD | CPLB_USER_WR
676
678/* TBUFCTL Masks */ 677/* TBUFCTL Masks */
679#define TBUFPWR 0x0001 678#define TBUFPWR 0x0001
680#define TBUFEN 0x0002 679#define TBUFEN 0x0002
diff --git a/include/asm-blackfin/pgtable.h b/include/asm-blackfin/pgtable.h
index 5a8f9e431c40..b11b114689c0 100644
--- a/include/asm-blackfin/pgtable.h
+++ b/include/asm-blackfin/pgtable.h
@@ -4,7 +4,7 @@
4#include <asm-generic/4level-fixup.h> 4#include <asm-generic/4level-fixup.h>
5 5
6#include <asm/page.h> 6#include <asm/page.h>
7#include <asm/cplb.h> 7#include <asm/mach-common/def_LPBlackfin.h>
8 8
9typedef pte_t *pte_addr_t; 9typedef pte_t *pte_addr_t;
10/* 10/*
diff --git a/include/asm-blackfin/reboot.h b/include/asm-blackfin/reboot.h
new file mode 100644
index 000000000000..6d448b5f5985
--- /dev/null
+++ b/include/asm-blackfin/reboot.h
@@ -0,0 +1,20 @@
1/*
2 * include/asm-blackfin/reboot.h - shutdown/reboot header
3 *
4 * Copyright 2004-2007 Analog Devices Inc.
5 *
6 * Licensed under the GPL-2 or later.
7 */
8
9#ifndef __ASM_REBOOT_H__
10#define __ASM_REBOOT_H__
11
12/* optional board specific hooks */
13extern void native_machine_restart(char *cmd);
14extern void native_machine_halt(void);
15extern void native_machine_power_off(void);
16
17/* common reboot workarounds */
18extern void bfin_gpio_reset_spi0_ssel1(void);
19
20#endif
diff --git a/include/asm-blackfin/system.h b/include/asm-blackfin/system.h
index 5e5f1a0566c0..2b3d47d0bbb6 100644
--- a/include/asm-blackfin/system.h
+++ b/include/asm-blackfin/system.h
@@ -36,6 +36,7 @@
36 36
37#include <linux/linkage.h> 37#include <linux/linkage.h>
38#include <linux/compiler.h> 38#include <linux/compiler.h>
39#include <asm/mach/anomaly.h>
39 40
40/* 41/*
41 * Interrupt configuring macros. 42 * Interrupt configuring macros.
@@ -43,53 +44,60 @@
43 44
44extern unsigned long irq_flags; 45extern unsigned long irq_flags;
45 46
46#define local_irq_enable() do { \ 47#define local_irq_enable() \
47 __asm__ __volatile__ ( \ 48 __asm__ __volatile__( \
48 "sti %0;" \ 49 "sti %0;" \
49 ::"d"(irq_flags)); \ 50 : \
50} while (0) 51 : "d" (irq_flags) \
52 )
51 53
52#define local_irq_disable() do { \ 54#define local_irq_disable() \
53 int _tmp_dummy; \ 55 do { \
54 __asm__ __volatile__ ( \ 56 int __tmp_dummy; \
55 "cli %0;" \ 57 __asm__ __volatile__( \
56 :"=d" (_tmp_dummy):); \ 58 "cli %0;" \
57} while (0) 59 : "=d" (__tmp_dummy) \
60 ); \
61 } while (0)
58 62
59#if defined(ANOMALY_05000244) && defined (CONFIG_BLKFIN_CACHE) 63#if ANOMALY_05000244 && defined(CONFIG_BFIN_ICACHE)
60#define idle_with_irq_disabled() do { \ 64# define NOP_PAD_ANOMALY_05000244 "nop; nop;"
61 __asm__ __volatile__ ( \
62 "nop; nop;\n" \
63 ".align 8;\n" \
64 "sti %0; idle;\n" \
65 ::"d" (irq_flags)); \
66} while (0)
67#else 65#else
68#define idle_with_irq_disabled() do { \ 66# define NOP_PAD_ANOMALY_05000244
69 __asm__ __volatile__ ( \
70 ".align 8;\n" \
71 "sti %0; idle;\n" \
72 ::"d" (irq_flags)); \
73} while (0)
74#endif 67#endif
75 68
69#define idle_with_irq_disabled() \
70 __asm__ __volatile__( \
71 NOP_PAD_ANOMALY_05000244 \
72 ".align 8;" \
73 "sti %0;" \
74 "idle;" \
75 : \
76 : "d" (irq_flags) \
77 )
78
76#ifdef CONFIG_DEBUG_HWERR 79#ifdef CONFIG_DEBUG_HWERR
77#define __save_and_cli(x) do { \ 80# define __save_and_cli(x) \
78 __asm__ __volatile__ ( \ 81 __asm__ __volatile__( \
79 "cli %0;\n\tsti %1;" \ 82 "cli %0;" \
80 :"=&d"(x): "d" (0x3F)); \ 83 "sti %1;" \
81} while (0) 84 : "=&d" (x) \
85 : "d" (0x3F) \
86 )
82#else 87#else
83#define __save_and_cli(x) do { \ 88# define __save_and_cli(x) \
84 __asm__ __volatile__ ( \ 89 __asm__ __volatile__( \
85 "cli %0;" \ 90 "cli %0;" \
86 :"=&d"(x):); \ 91 : "=&d" (x) \
87} while (0) 92 )
88#endif 93#endif
89 94
90#define local_save_flags(x) asm volatile ("cli %0;" \ 95#define local_save_flags(x) \
91 "sti %0;" \ 96 __asm__ __volatile__( \
92 :"=d"(x):); 97 "cli %0;" \
98 "sti %0;" \
99 : "=d" (x) \
100 )
93 101
94#ifdef CONFIG_DEBUG_HWERR 102#ifdef CONFIG_DEBUG_HWERR
95#define irqs_enabled_from_flags(x) (((x) & ~0x3f) != 0) 103#define irqs_enabled_from_flags(x) (((x) & ~0x3f) != 0)
@@ -97,10 +105,11 @@ extern unsigned long irq_flags;
97#define irqs_enabled_from_flags(x) ((x) != 0x1f) 105#define irqs_enabled_from_flags(x) ((x) != 0x1f)
98#endif 106#endif
99 107
100#define local_irq_restore(x) do { \ 108#define local_irq_restore(x) \
101 if (irqs_enabled_from_flags(x)) \ 109 do { \
102 local_irq_enable (); \ 110 if (irqs_enabled_from_flags(x)) \
103} while (0) 111 local_irq_enable(); \
112 } while (0)
104 113
105/* For spinlocks etc */ 114/* For spinlocks etc */
106#define local_irq_save(x) __save_and_cli(x) 115#define local_irq_save(x) __save_and_cli(x)
diff --git a/include/asm-blackfin/termbits.h b/include/asm-blackfin/termbits.h
index 4eac38de8ce1..f37feb7cf895 100644
--- a/include/asm-blackfin/termbits.h
+++ b/include/asm-blackfin/termbits.h
@@ -140,6 +140,7 @@ struct ktermios {
140#define HUPCL 0002000 140#define HUPCL 0002000
141#define CLOCAL 0004000 141#define CLOCAL 0004000
142#define CBAUDEX 0010000 142#define CBAUDEX 0010000
143#define BOTHER 0010000
143#define B57600 0010001 144#define B57600 0010001
144#define B115200 0010002 145#define B115200 0010002
145#define B230400 0010003 146#define B230400 0010003
@@ -155,10 +156,12 @@ struct ktermios {
155#define B3000000 0010015 156#define B3000000 0010015
156#define B3500000 0010016 157#define B3500000 0010016
157#define B4000000 0010017 158#define B4000000 0010017
158#define CIBAUD 002003600000 /* input baud rate (not used) */ 159#define CIBAUD 002003600000 /* input baud rate */
159#define CMSPAR 010000000000 /* mark or space (stick) parity */ 160#define CMSPAR 010000000000 /* mark or space (stick) parity */
160#define CRTSCTS 020000000000 /* flow control */ 161#define CRTSCTS 020000000000 /* flow control */
161 162
163#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
164
162/* c_lflag bits */ 165/* c_lflag bits */
163#define ISIG 0000001 166#define ISIG 0000001
164#define ICANON 0000002 167#define ICANON 0000002
diff --git a/include/asm-blackfin/termios.h b/include/asm-blackfin/termios.h
index 5c41478a51c6..e31fe859650b 100644
--- a/include/asm-blackfin/termios.h
+++ b/include/asm-blackfin/termios.h
@@ -98,8 +98,14 @@ struct termio {
98 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ 98 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
99}) 99})
100 100
101#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) 101#define user_termios_to_kernel_termios(k, u) \
102#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) 102 copy_from_user(k, u, sizeof(struct termios2))
103#define kernel_termios_to_user_termios(u, k) \
104 copy_to_user(u, k, sizeof(struct termios2))
105#define user_termios_to_kernel_termios_1(k, u) \
106 copy_from_user(k, u, sizeof(struct termios))
107#define kernel_termios_to_user_termios_1(u, k) \
108 copy_to_user(u, k, sizeof(struct termios))
103 109
104#endif /* __KERNEL__ */ 110#endif /* __KERNEL__ */
105 111
diff --git a/include/asm-blackfin/trace.h b/include/asm-blackfin/trace.h
index 9c2474c9a589..6313aace9d59 100644
--- a/include/asm-blackfin/trace.h
+++ b/include/asm-blackfin/trace.h
@@ -6,23 +6,46 @@
6#ifndef _BLACKFIN_TRACE_ 6#ifndef _BLACKFIN_TRACE_
7#define _BLACKFIN_TRACE_ 7#define _BLACKFIN_TRACE_
8 8
9/* Normally, we use ON, but you can't turn on software expansion until
10 * interrupts subsystem is ready
11 */
12
13#define BFIN_TRACE_INIT ((CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION << 4) | 0x03)
14#ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND
15#define BFIN_TRACE_ON (BFIN_TRACE_INIT | (CONFIG_DEBUG_BFIN_HWTRACE_EXPAND << 2))
16#else
17#define BFIN_TRACE_ON (BFIN_TRACE_INIT)
18#endif
19
9#ifndef __ASSEMBLY__ 20#ifndef __ASSEMBLY__
21extern unsigned long trace_buff_offset;
22extern unsigned long software_trace_buff[];
23
10/* Trace Macros for C files */ 24/* Trace Macros for C files */
11 25
26#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
27
12#define trace_buffer_save(x) \ 28#define trace_buffer_save(x) \
13 do { \ 29 do { \
14 (x) = bfin_read_TBUFCTL(); \ 30 (x) = bfin_read_TBUFCTL(); \
15 bfin_write_TBUFCTL((x) & ~TBUFEN); \ 31 bfin_write_TBUFCTL((x) & ~TBUFEN); \
16 } while (0) 32 } while (0)
17 33
18#define trace_buffer_restore(x) \ 34#define trace_buffer_restore(x) \
19 do { \ 35 do { \
20 bfin_write_TBUFCTL((x)); \ 36 bfin_write_TBUFCTL((x)); \
21 } while (0) 37 } while (0)
38#else /* DEBUG_BFIN_HWTRACE_ON */
39
40#define trace_buffer_save(x)
41#define trace_buffer_restore(x)
42#endif /* CONFIG_DEBUG_BFIN_HWTRACE_ON */
22 43
23#else 44#else
24/* Trace Macros for Assembly files */ 45/* Trace Macros for Assembly files */
25 46
47#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
48
26#define TRACE_BUFFER_START(preg, dreg) trace_buffer_start(preg, dreg) 49#define TRACE_BUFFER_START(preg, dreg) trace_buffer_start(preg, dreg)
27#define TRACE_BUFFER_STOP(preg, dreg) trace_buffer_stop(preg, dreg) 50#define TRACE_BUFFER_STOP(preg, dreg) trace_buffer_stop(preg, dreg)
28 51
@@ -32,12 +55,26 @@
32 dreg = 0x1; \ 55 dreg = 0x1; \
33 [preg] = dreg; 56 [preg] = dreg;
34 57
35#define trace_buffer_start(preg, dreg) \ 58#define trace_buffer_start(preg, dreg) \
36 preg.L = LO(TBUFCTL); \ 59 preg.L = LO(TBUFCTL); \
37 preg.H = HI(TBUFCTL); \ 60 preg.H = HI(TBUFCTL); \
38 dreg = 0x13; \ 61 dreg = BFIN_TRACE_ON; \
62 [preg] = dreg;
63
64#define trace_buffer_init(preg, dreg) \
65 preg.L = LO(TBUFCTL); \
66 preg.H = HI(TBUFCTL); \
67 dreg = BFIN_TRACE_INIT; \
39 [preg] = dreg; 68 [preg] = dreg;
40 69
70#else /* CONFIG_DEBUG_BFIN_HWTRACE_ON */
71
72#define trace_buffer_stop(preg, dreg)
73#define trace_buffer_start(preg, dreg)
74#define trace_buffer_init(preg, dreg)
75
76#endif /* CONFIG_DEBUG_BFIN_HWTRACE_ON */
77
41#ifdef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE 78#ifdef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE
42# define DEBUG_START_HWTRACE(preg, dreg) trace_buffer_start(preg, dreg) 79# define DEBUG_START_HWTRACE(preg, dreg) trace_buffer_start(preg, dreg)
43# define DEBUG_STOP_HWTRACE(preg, dreg) trace_buffer_stop(preg, dreg) 80# define DEBUG_STOP_HWTRACE(preg, dreg) trace_buffer_stop(preg, dreg)