diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-21 12:57:55 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-21 12:57:55 -0400 |
| commit | efea90a454c6bf95d489878ea366d5dff03f3fb7 (patch) | |
| tree | 9eba629ea4325d67bca7e42d3fc46c346477c106 | |
| parent | 2fb59d623ad85dfdb8ce03a660051743f7361896 (diff) | |
| parent | d4b1d27368314ac79ae28082a0eb17b4c526bd14 (diff) | |
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
Blackfin arch: update boards files
Blackfin arch: dma add some API and cleanup bf54x DMA definition
Blackfin arch: cleanup and promote the general purpose timers api to a core blackfin component
Blackfin arch: add a cheesy install target
Blackfin arch: add functions for converting between sclks and usecs
Blackfin arch: add assembly function for doing 64bit unsigned division
Blackfin arch: -mno-fdpic works
Blackfin arch: use "char bfin_board_name[]" rather than "char *bfin_board_name" per discussion on lkml as the former uses less storage
Blackfin arch: Fixing Bug: balance calls to get_task_mm with corresponding mmput calls
Blackfin serial driver Kconfig: depend on DMA not being enabled rather than a specific DMA size
Blackfin arch: Fix bug: missing CHIPID register field definition of BF54x
Blackfin arch: Fix up /proc/cpuinfo so it is like everyone else
Blackfin arch: Optimization - no need to make additional math here
Blackfin arch: force irq_flags into the .data section
Blackfin arch BF548 defconfig: enable watchdog by default
Blackfin arch: add new processor ADSP-BF52x arch/mach support
61 files changed, 5669 insertions, 317 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index ad28dc76fc97..7888551ed939 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
| @@ -71,7 +71,7 @@ config GENERIC_CALIBRATE_DELAY | |||
| 71 | 71 | ||
| 72 | config IRQCHIP_DEMUX_GPIO | 72 | config IRQCHIP_DEMUX_GPIO |
| 73 | bool | 73 | bool |
| 74 | depends on (BF53x || BF561 || BF54x) | 74 | depends on (BF52x || BF53x || BF561 || BF54x) |
| 75 | default y | 75 | default y |
| 76 | 76 | ||
| 77 | source "init/Kconfig" | 77 | source "init/Kconfig" |
| @@ -85,6 +85,21 @@ choice | |||
| 85 | prompt "CPU" | 85 | prompt "CPU" |
| 86 | default BF533 | 86 | default BF533 |
| 87 | 87 | ||
| 88 | config BF522 | ||
| 89 | bool "BF522" | ||
| 90 | help | ||
| 91 | BF522 Processor Support. | ||
| 92 | |||
| 93 | config BF525 | ||
| 94 | bool "BF525" | ||
| 95 | help | ||
| 96 | BF525 Processor Support. | ||
| 97 | |||
| 98 | config BF527 | ||
| 99 | bool "BF527" | ||
| 100 | help | ||
| 101 | BF527 Processor Support. | ||
| 102 | |||
| 88 | config BF531 | 103 | config BF531 |
| 89 | bool "BF531" | 104 | bool "BF531" |
| 90 | help | 105 | help |
| @@ -144,13 +159,18 @@ endchoice | |||
| 144 | 159 | ||
| 145 | choice | 160 | choice |
| 146 | prompt "Silicon Rev" | 161 | prompt "Silicon Rev" |
| 162 | default BF_REV_0_1 if BF527 | ||
| 147 | default BF_REV_0_2 if BF537 | 163 | default BF_REV_0_2 if BF537 |
| 148 | default BF_REV_0_3 if BF533 | 164 | default BF_REV_0_3 if BF533 |
| 149 | default BF_REV_0_0 if BF549 | 165 | default BF_REV_0_0 if BF549 |
| 150 | 166 | ||
| 151 | config BF_REV_0_0 | 167 | config BF_REV_0_0 |
| 152 | bool "0.0" | 168 | bool "0.0" |
| 153 | depends on (BF549) | 169 | depends on (BF549 || BF527) |
| 170 | |||
| 171 | config BF_REV_0_1 | ||
| 172 | bool "0.2" | ||
| 173 | depends on (BF549 || BF527) | ||
| 154 | 174 | ||
| 155 | config BF_REV_0_2 | 175 | config BF_REV_0_2 |
| 156 | bool "0.2" | 176 | bool "0.2" |
| @@ -176,6 +196,11 @@ config BF_REV_NONE | |||
| 176 | 196 | ||
| 177 | endchoice | 197 | endchoice |
| 178 | 198 | ||
| 199 | config BF52x | ||
| 200 | bool | ||
| 201 | depends on (BF522 || BF525 || BF527) | ||
| 202 | default y | ||
| 203 | |||
| 179 | config BF53x | 204 | config BF53x |
| 180 | bool | 205 | bool |
| 181 | depends on (BF531 || BF532 || BF533 || BF534 || BF536 || BF537) | 206 | depends on (BF531 || BF532 || BF533 || BF534 || BF536 || BF537) |
| @@ -204,6 +229,12 @@ choice | |||
| 204 | configuration to ensure that all the other settings are | 229 | configuration to ensure that all the other settings are |
| 205 | correct. | 230 | correct. |
| 206 | 231 | ||
| 232 | config BFIN527_EZKIT | ||
| 233 | bool "BF527-EZKIT" | ||
| 234 | depends on (BF522 || BF525 || BF527) | ||
| 235 | help | ||
| 236 | BF533-EZKIT-LITE board Support. | ||
| 237 | |||
| 207 | config BFIN533_EZKIT | 238 | config BFIN533_EZKIT |
| 208 | bool "BF533-EZKIT" | 239 | bool "BF533-EZKIT" |
| 209 | depends on (BF533 || BF532 || BF531) | 240 | depends on (BF533 || BF532 || BF531) |
| @@ -299,11 +330,17 @@ config MEM_MT48LC8M32B2B5_7 | |||
| 299 | depends on (BFIN561_BLUETECHNIX_CM) | 330 | depends on (BFIN561_BLUETECHNIX_CM) |
| 300 | default y | 331 | default y |
| 301 | 332 | ||
| 333 | config MEM_MT48LC32M16A2TG_75 | ||
| 334 | bool | ||
| 335 | depends on (BFIN527_EZKIT) | ||
| 336 | default y | ||
| 337 | |||
| 302 | config BFIN_SHARED_FLASH_ENET | 338 | config BFIN_SHARED_FLASH_ENET |
| 303 | bool | 339 | bool |
| 304 | depends on (BFIN533_STAMP) | 340 | depends on (BFIN533_STAMP) |
| 305 | default y | 341 | default y |
| 306 | 342 | ||
| 343 | source "arch/blackfin/mach-bf527/Kconfig" | ||
| 307 | source "arch/blackfin/mach-bf533/Kconfig" | 344 | source "arch/blackfin/mach-bf533/Kconfig" |
| 308 | source "arch/blackfin/mach-bf561/Kconfig" | 345 | source "arch/blackfin/mach-bf561/Kconfig" |
| 309 | source "arch/blackfin/mach-bf537/Kconfig" | 346 | source "arch/blackfin/mach-bf537/Kconfig" |
| @@ -329,7 +366,7 @@ config CLKIN_HZ | |||
| 329 | int "Crystal Frequency in Hz" | 366 | int "Crystal Frequency in Hz" |
| 330 | default "11059200" if BFIN533_STAMP | 367 | default "11059200" if BFIN533_STAMP |
| 331 | default "27000000" if BFIN533_EZKIT | 368 | default "27000000" if BFIN533_EZKIT |
| 332 | default "25000000" if BFIN537_STAMP | 369 | default "25000000" if (BFIN537_STAMP || BFIN527_EZKIT) |
| 333 | default "30000000" if BFIN561_EZKIT | 370 | default "30000000" if BFIN561_EZKIT |
| 334 | default "24576000" if PNAV10 | 371 | default "24576000" if PNAV10 |
| 335 | help | 372 | help |
| @@ -362,7 +399,7 @@ config VCO_MULT | |||
| 362 | range 1 64 | 399 | range 1 64 |
| 363 | default "22" if BFIN533_EZKIT | 400 | default "22" if BFIN533_EZKIT |
| 364 | default "45" if BFIN533_STAMP | 401 | default "45" if BFIN533_STAMP |
| 365 | default "20" if BFIN537_STAMP | 402 | default "20" if (BFIN537_STAMP || BFIN527_EZKIT) |
| 366 | default "22" if BFIN533_BLUETECHNIX_CM | 403 | default "22" if BFIN533_BLUETECHNIX_CM |
| 367 | default "20" if BFIN537_BLUETECHNIX_CM | 404 | default "20" if BFIN537_BLUETECHNIX_CM |
| 368 | default "20" if BFIN561_BLUETECHNIX_CM | 405 | default "20" if BFIN561_BLUETECHNIX_CM |
| @@ -398,7 +435,7 @@ config SCLK_DIV | |||
| 398 | range 1 15 | 435 | range 1 15 |
| 399 | default 5 if BFIN533_EZKIT | 436 | default 5 if BFIN533_EZKIT |
| 400 | default 5 if BFIN533_STAMP | 437 | default 5 if BFIN533_STAMP |
| 401 | default 4 if BFIN537_STAMP | 438 | default 4 if (BFIN537_STAMP || BFIN527_EZKIT) |
| 402 | default 5 if BFIN533_BLUETECHNIX_CM | 439 | default 5 if BFIN533_BLUETECHNIX_CM |
| 403 | default 4 if BFIN537_BLUETECHNIX_CM | 440 | default 4 if BFIN537_BLUETECHNIX_CM |
| 404 | default 4 if BFIN561_BLUETECHNIX_CM | 441 | default 4 if BFIN561_BLUETECHNIX_CM |
| @@ -450,6 +487,7 @@ comment "Memory Setup" | |||
| 450 | config MEM_SIZE | 487 | config MEM_SIZE |
| 451 | int "SDRAM Memory Size in MBytes" | 488 | int "SDRAM Memory Size in MBytes" |
| 452 | default 32 if BFIN533_EZKIT | 489 | default 32 if BFIN533_EZKIT |
| 490 | default 64 if BFIN527_EZKIT | ||
| 453 | default 64 if BFIN537_STAMP | 491 | default 64 if BFIN537_STAMP |
| 454 | default 64 if BFIN561_EZKIT | 492 | default 64 if BFIN561_EZKIT |
| 455 | default 128 if BFIN533_STAMP | 493 | default 128 if BFIN533_STAMP |
| @@ -459,6 +497,7 @@ config MEM_ADD_WIDTH | |||
| 459 | int "SDRAM Memory Address Width" | 497 | int "SDRAM Memory Address Width" |
| 460 | default 9 if BFIN533_EZKIT | 498 | default 9 if BFIN533_EZKIT |
| 461 | default 9 if BFIN561_EZKIT | 499 | default 9 if BFIN561_EZKIT |
| 500 | default 10 if BFIN527_EZKIT | ||
| 462 | default 10 if BFIN537_STAMP | 501 | default 10 if BFIN537_STAMP |
| 463 | default 11 if BFIN533_STAMP | 502 | default 11 if BFIN533_STAMP |
| 464 | default 10 if PNAV10 | 503 | default 10 if PNAV10 |
| @@ -749,9 +788,19 @@ config LARGE_ALLOCS | |||
| 749 | a lot of RAM, and you need to able to allocate very large | 788 | a lot of RAM, and you need to able to allocate very large |
| 750 | contiguous chunks. If unsure, say N. | 789 | contiguous chunks. If unsure, say N. |
| 751 | 790 | ||
| 791 | config BFIN_GPTIMERS | ||
| 792 | tristate "Enable Blackfin General Purpose Timers API" | ||
| 793 | default n | ||
| 794 | help | ||
| 795 | Enable support for the General Purpose Timers API. If you | ||
| 796 | are unsure, say N. | ||
| 797 | |||
| 798 | To compile this driver as a module, choose M here: the module | ||
| 799 | will be called gptimers.ko. | ||
| 800 | |||
| 752 | config BFIN_DMA_5XX | 801 | config BFIN_DMA_5XX |
| 753 | bool "Enable DMA Support" | 802 | bool "Enable DMA Support" |
| 754 | depends on (BF533 || BF532 || BF531 || BF537 || BF536 || BF534 || BF561 || BF54x) | 803 | depends on (BF52x || BF53x || BF561 || BF54x) |
| 755 | default y | 804 | default y |
| 756 | help | 805 | help |
| 757 | DMA driver for BF5xx. | 806 | DMA driver for BF5xx. |
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile index 368933760d28..3c87291bcdab 100644 --- a/arch/blackfin/Makefile +++ b/arch/blackfin/Makefile | |||
| @@ -12,12 +12,17 @@ LDFLAGS_vmlinux := -X | |||
| 12 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S | 12 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S |
| 13 | GZFLAGS := -9 | 13 | GZFLAGS := -9 |
| 14 | 14 | ||
| 15 | CFLAGS += $(call cc-option,-mno-fdpic) | ||
| 16 | AFLAGS += $(call cc-option,-mno-fdpic) | ||
| 15 | CFLAGS_MODULE += -mlong-calls | 17 | CFLAGS_MODULE += -mlong-calls |
| 16 | KALLSYMS += --symbol-prefix=_ | 18 | KALLSYMS += --symbol-prefix=_ |
| 17 | 19 | ||
| 18 | KBUILD_DEFCONFIG := BF537-STAMP_defconfig | 20 | KBUILD_DEFCONFIG := BF537-STAMP_defconfig |
| 19 | 21 | ||
| 20 | # setup the machine name and the machine dependent settings | 22 | # setup the machine name and the machine dependent settings |
| 23 | machine-$(CONFIG_BF522) := bf527 | ||
| 24 | machine-$(CONFIG_BF525) := bf527 | ||
| 25 | machine-$(CONFIG_BF527) := bf527 | ||
| 21 | machine-$(CONFIG_BF531) := bf533 | 26 | machine-$(CONFIG_BF531) := bf533 |
| 22 | machine-$(CONFIG_BF532) := bf533 | 27 | machine-$(CONFIG_BF532) := bf533 |
| 23 | machine-$(CONFIG_BF533) := bf533 | 28 | machine-$(CONFIG_BF533) := bf533 |
| @@ -32,6 +37,9 @@ machine-$(CONFIG_BF561) := bf561 | |||
| 32 | MACHINE := $(machine-y) | 37 | MACHINE := $(machine-y) |
| 33 | export MACHINE | 38 | export MACHINE |
| 34 | 39 | ||
| 40 | cpu-$(CONFIG_BF522) := bf522 | ||
| 41 | cpu-$(CONFIG_BF525) := bf525 | ||
| 42 | cpu-$(CONFIG_BF527) := bf527 | ||
| 35 | cpu-$(CONFIG_BF531) := bf531 | 43 | cpu-$(CONFIG_BF531) := bf531 |
| 36 | cpu-$(CONFIG_BF532) := bf532 | 44 | cpu-$(CONFIG_BF532) := bf532 |
| 37 | cpu-$(CONFIG_BF533) := bf533 | 45 | cpu-$(CONFIG_BF533) := bf533 |
| @@ -97,12 +105,23 @@ archclean: | |||
| 97 | $(Q)$(MAKE) $(clean)=$(boot) | 105 | $(Q)$(MAKE) $(clean)=$(boot) |
| 98 | 106 | ||
| 99 | 107 | ||
| 100 | all: vmImage | ||
| 101 | boot := arch/$(ARCH)/boot | 108 | boot := arch/$(ARCH)/boot |
| 102 | BOOT_TARGETS = vmImage | 109 | BOOT_TARGETS = vmImage |
| 103 | .PHONY: $(BOOT_TARGETS) | 110 | PHONY += $(BOOT_TARGETS) install |
| 111 | KBUILD_IMAGE := $(boot)/vmImage | ||
| 112 | |||
| 113 | all: vmImage | ||
| 114 | |||
| 104 | $(BOOT_TARGETS): vmlinux | 115 | $(BOOT_TARGETS): vmlinux |
| 105 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | 116 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
| 117 | |||
| 118 | install: | ||
| 119 | $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install | ||
| 120 | |||
| 106 | define archhelp | 121 | define archhelp |
| 107 | echo '* vmImage - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)' | 122 | echo '* vmImage - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)' |
| 123 | echo ' install - Install kernel using' | ||
| 124 | echo ' (your) ~/bin/$(CROSS_COMPILE)installkernel or' | ||
| 125 | echo ' (distribution) PATH: $(CROSS_COMPILE)installkernel or' | ||
| 126 | echo ' install to $$(INSTALL_PATH)' | ||
| 108 | endef | 127 | endef |
diff --git a/arch/blackfin/boot/Makefile b/arch/blackfin/boot/Makefile index 8cd33560e817..522f3c124060 100644 --- a/arch/blackfin/boot/Makefile +++ b/arch/blackfin/boot/Makefile | |||
| @@ -26,3 +26,6 @@ $(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE | |||
| 26 | $(obj)/vmImage: $(obj)/vmlinux.gz | 26 | $(obj)/vmImage: $(obj)/vmlinux.gz |
| 27 | $(call if_changed,uimage) | 27 | $(call if_changed,uimage) |
| 28 | @echo 'Kernel: $@ is ready' | 28 | @echo 'Kernel: $@ is ready' |
| 29 | |||
| 30 | install: | ||
| 31 | sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)" | ||
diff --git a/arch/blackfin/boot/install.sh b/arch/blackfin/boot/install.sh new file mode 100644 index 000000000000..9560a6b29100 --- /dev/null +++ b/arch/blackfin/boot/install.sh | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # arch/blackfin/boot/install.sh | ||
| 4 | # | ||
| 5 | # This file is subject to the terms and conditions of the GNU General Public | ||
| 6 | # License. See the file "COPYING" in the main directory of this archive | ||
| 7 | # for more details. | ||
| 8 | # | ||
| 9 | # Copyright (C) 1995 by Linus Torvalds | ||
| 10 | # | ||
| 11 | # Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin | ||
| 12 | # Adapted from code in arch/i386/boot/install.sh by Mike Frysinger | ||
| 13 | # | ||
| 14 | # "make install" script for Blackfin architecture | ||
| 15 | # | ||
| 16 | # Arguments: | ||
| 17 | # $1 - kernel version | ||
| 18 | # $2 - kernel image file | ||
| 19 | # $3 - kernel map file | ||
| 20 | # $4 - default install path (blank if root directory) | ||
| 21 | # | ||
| 22 | |||
| 23 | verify () { | ||
| 24 | if [ ! -f "$1" ]; then | ||
| 25 | echo "" 1>&2 | ||
| 26 | echo " *** Missing file: $1" 1>&2 | ||
| 27 | echo ' *** You need to run "make" before "make install".' 1>&2 | ||
| 28 | echo "" 1>&2 | ||
| 29 | exit 1 | ||
| 30 | fi | ||
| 31 | } | ||
| 32 | |||
| 33 | # Make sure the files actually exist | ||
| 34 | verify "$2" | ||
| 35 | verify "$3" | ||
| 36 | |||
| 37 | # User may have a custom install script | ||
| 38 | |||
| 39 | if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi | ||
| 40 | if which ${CROSS_COMPILE}installkernel >/dev/null 2>&1; then | ||
| 41 | exec ${CROSS_COMPILE}installkernel "$@" | ||
| 42 | fi | ||
| 43 | |||
| 44 | # Default install - same as make zlilo | ||
| 45 | |||
| 46 | back_it_up() { | ||
| 47 | local file=$1 | ||
| 48 | [ -f ${file} ] || return 0 | ||
| 49 | local stamp=$(stat -c %Y ${file} 2>/dev/null) | ||
| 50 | mv ${file} ${file}.${stamp:-old} | ||
| 51 | } | ||
| 52 | |||
| 53 | back_it_up $4/uImage | ||
| 54 | back_it_up $4/System.map | ||
| 55 | |||
| 56 | cat $2 > $4/uImage | ||
| 57 | cp $3 $4/System.map | ||
diff --git a/arch/blackfin/configs/BF527-EZKIT_defconfig b/arch/blackfin/configs/BF527-EZKIT_defconfig new file mode 100644 index 000000000000..df974e785ee2 --- /dev/null +++ b/arch/blackfin/configs/BF527-EZKIT_defconfig | |||
| @@ -0,0 +1,1241 @@ | |||
| 1 | # | ||
| 2 | # Automatically generated make config: don't edit | ||
| 3 | # Linux kernel version: 2.6.22.9 | ||
| 4 | # | ||
| 5 | # CONFIG_MMU is not set | ||
| 6 | # CONFIG_FPU is not set | ||
| 7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
| 8 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | ||
| 9 | CONFIG_BLACKFIN=y | ||
| 10 | CONFIG_ZONE_DMA=y | ||
| 11 | CONFIG_BFIN=y | ||
| 12 | CONFIG_SEMAPHORE_SLEEPERS=y | ||
| 13 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
| 14 | CONFIG_GENERIC_HWEIGHT=y | ||
| 15 | CONFIG_GENERIC_HARDIRQS=y | ||
| 16 | CONFIG_GENERIC_IRQ_PROBE=y | ||
| 17 | # CONFIG_GENERIC_TIME is not set | ||
| 18 | CONFIG_GENERIC_GPIO=y | ||
| 19 | CONFIG_FORCE_MAX_ZONEORDER=14 | ||
| 20 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| 21 | CONFIG_IRQCHIP_DEMUX_GPIO=y | ||
| 22 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
| 23 | |||
| 24 | # | ||
| 25 | # Code maturity level options | ||
| 26 | # | ||
| 27 | CONFIG_EXPERIMENTAL=y | ||
| 28 | CONFIG_BROKEN_ON_SMP=y | ||
| 29 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
| 30 | |||
| 31 | # | ||
| 32 | # General setup | ||
| 33 | # | ||
| 34 | CONFIG_LOCALVERSION="" | ||
| 35 | CONFIG_LOCALVERSION_AUTO=y | ||
| 36 | CONFIG_SYSVIPC=y | ||
| 37 | # CONFIG_IPC_NS is not set | ||
| 38 | CONFIG_SYSVIPC_SYSCTL=y | ||
| 39 | # CONFIG_POSIX_MQUEUE is not set | ||
| 40 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
| 41 | # CONFIG_TASKSTATS is not set | ||
| 42 | # CONFIG_UTS_NS is not set | ||
| 43 | # CONFIG_AUDIT is not set | ||
| 44 | CONFIG_IKCONFIG=y | ||
| 45 | CONFIG_IKCONFIG_PROC=y | ||
| 46 | CONFIG_LOG_BUF_SHIFT=14 | ||
| 47 | CONFIG_SYSFS_DEPRECATED=y | ||
| 48 | # CONFIG_RELAY is not set | ||
| 49 | CONFIG_BLK_DEV_INITRD=y | ||
| 50 | CONFIG_INITRAMFS_SOURCE="" | ||
| 51 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
| 52 | CONFIG_SYSCTL=y | ||
| 53 | CONFIG_EMBEDDED=y | ||
| 54 | CONFIG_UID16=y | ||
| 55 | CONFIG_SYSCTL_SYSCALL=y | ||
| 56 | CONFIG_KALLSYMS=y | ||
| 57 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
| 58 | CONFIG_HOTPLUG=y | ||
| 59 | CONFIG_PRINTK=y | ||
| 60 | CONFIG_BUG=y | ||
| 61 | CONFIG_ELF_CORE=y | ||
| 62 | CONFIG_BASE_FULL=y | ||
| 63 | CONFIG_FUTEX=y | ||
| 64 | CONFIG_ANON_INODES=y | ||
| 65 | CONFIG_EPOLL=y | ||
| 66 | CONFIG_SIGNALFD=y | ||
| 67 | CONFIG_EVENTFD=y | ||
| 68 | CONFIG_VM_EVENT_COUNTERS=y | ||
| 69 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 | ||
| 70 | # CONFIG_NP2 is not set | ||
| 71 | CONFIG_SLAB=y | ||
| 72 | # CONFIG_SLUB is not set | ||
| 73 | # CONFIG_SLOB is not set | ||
| 74 | CONFIG_RT_MUTEXES=y | ||
| 75 | CONFIG_TINY_SHMEM=y | ||
| 76 | CONFIG_BASE_SMALL=0 | ||
| 77 | |||
| 78 | # | ||
| 79 | # Loadable module support | ||
| 80 | # | ||
| 81 | CONFIG_MODULES=y | ||
| 82 | CONFIG_MODULE_UNLOAD=y | ||
| 83 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
| 84 | # CONFIG_MODVERSIONS is not set | ||
| 85 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
| 86 | CONFIG_KMOD=y | ||
| 87 | |||
| 88 | # | ||
| 89 | # Block layer | ||
| 90 | # | ||
| 91 | CONFIG_BLOCK=y | ||
| 92 | # CONFIG_LBD is not set | ||
| 93 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
| 94 | # CONFIG_LSF is not set | ||
| 95 | |||
| 96 | # | ||
| 97 | # IO Schedulers | ||
| 98 | # | ||
| 99 | CONFIG_IOSCHED_NOOP=y | ||
| 100 | CONFIG_IOSCHED_AS=y | ||
| 101 | # CONFIG_IOSCHED_DEADLINE is not set | ||
| 102 | CONFIG_IOSCHED_CFQ=y | ||
| 103 | CONFIG_DEFAULT_AS=y | ||
| 104 | # CONFIG_DEFAULT_DEADLINE is not set | ||
| 105 | # CONFIG_DEFAULT_CFQ is not set | ||
| 106 | # CONFIG_DEFAULT_NOOP is not set | ||
| 107 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
| 108 | # CONFIG_PREEMPT_NONE is not set | ||
| 109 | CONFIG_PREEMPT_VOLUNTARY=y | ||
| 110 | # CONFIG_PREEMPT is not set | ||
| 111 | |||
| 112 | # | ||
| 113 | # Blackfin Processor Options | ||
| 114 | # | ||
| 115 | |||
| 116 | # | ||
| 117 | # Processor and Board Settings | ||
| 118 | # | ||
| 119 | # CONFIG_BF522 is not set | ||
| 120 | # CONFIG_BF525 is not set | ||
| 121 | CONFIG_BF527=y | ||
| 122 | # CONFIG_BF531 is not set | ||
| 123 | # CONFIG_BF532 is not set | ||
| 124 | # CONFIG_BF533 is not set | ||
| 125 | # CONFIG_BF534 is not set | ||
| 126 | # CONFIG_BF536 is not set | ||
| 127 | # CONFIG_BF537 is not set | ||
| 128 | # CONFIG_BF542 is not set | ||
| 129 | # CONFIG_BF544 is not set | ||
| 130 | # CONFIG_BF548 is not set | ||
| 131 | # CONFIG_BF549 is not set | ||
| 132 | # CONFIG_BF561 is not set | ||
| 133 | CONFIG_BF_REV_0_0=y | ||
| 134 | # CONFIG_BF_REV_0_1 is not set | ||
| 135 | # CONFIG_BF_REV_0_2 is not set | ||
| 136 | # CONFIG_BF_REV_0_3 is not set | ||
| 137 | # CONFIG_BF_REV_0_4 is not set | ||
| 138 | # CONFIG_BF_REV_0_5 is not set | ||
| 139 | # CONFIG_BF_REV_ANY is not set | ||
| 140 | # CONFIG_BF_REV_NONE is not set | ||
| 141 | CONFIG_BF52x=y | ||
| 142 | CONFIG_BFIN_SINGLE_CORE=y | ||
| 143 | CONFIG_BFIN527_EZKIT=y | ||
| 144 | # CONFIG_BFIN533_EZKIT is not set | ||
| 145 | # CONFIG_BFIN533_STAMP is not set | ||
| 146 | # CONFIG_BFIN537_STAMP is not set | ||
| 147 | # CONFIG_BFIN533_BLUETECHNIX_CM is not set | ||
| 148 | # CONFIG_BFIN537_BLUETECHNIX_CM is not set | ||
| 149 | # CONFIG_BFIN548_EZKIT is not set | ||
| 150 | # CONFIG_BFIN561_BLUETECHNIX_CM is not set | ||
| 151 | # CONFIG_BFIN561_EZKIT is not set | ||
| 152 | # CONFIG_BFIN561_TEPLA is not set | ||
| 153 | # CONFIG_PNAV10 is not set | ||
| 154 | # CONFIG_GENERIC_BOARD is not set | ||
| 155 | CONFIG_MEM_MT48LC32M16A2TG_75=y | ||
| 156 | |||
| 157 | # | ||
| 158 | # BF527 Specific Configuration | ||
| 159 | # | ||
| 160 | |||
| 161 | # | ||
| 162 | # Alternative Multiplexing Scheme | ||
| 163 | # | ||
| 164 | # CONFIG_BF527_SPORT0_PORTF is not set | ||
| 165 | CONFIG_BF527_SPORT0_PORTG=y | ||
| 166 | CONFIG_BF527_SPORT0_TSCLK_PG10=y | ||
| 167 | # CONFIG_BF527_SPORT0_TSCLK_PG14 is not set | ||
| 168 | # CONFIG_BF527_UART1_PORTF is not set | ||
| 169 | CONFIG_BF527_UART1_PORTG=y | ||
| 170 | # CONFIG_BF527_NAND_D_PORTF is not set | ||
| 171 | CONFIG_BF527_NAND_D_PORTH=y | ||
| 172 | |||
| 173 | # | ||
| 174 | # Interrupt Priority Assignment | ||
| 175 | # | ||
| 176 | |||
| 177 | # | ||
| 178 | # Priority | ||
| 179 | # | ||
| 180 | CONFIG_IRQ_PLL_WAKEUP=7 | ||
| 181 | CONFIG_IRQ_DMA0_ERROR=7 | ||
| 182 | CONFIG_IRQ_DMAR0_BLK=7 | ||
| 183 | CONFIG_IRQ_DMAR1_BLK=7 | ||
| 184 | CONFIG_IRQ_DMAR0_OVR=7 | ||
| 185 | CONFIG_IRQ_DMAR1_OVR=7 | ||
| 186 | CONFIG_IRQ_PPI_ERROR=7 | ||
| 187 | CONFIG_IRQ_MAC_ERROR=7 | ||
| 188 | CONFIG_IRQ_SPORT0_ERROR=7 | ||
| 189 | CONFIG_IRQ_SPORT1_ERROR=7 | ||
| 190 | CONFIG_IRQ_UART0_ERROR=7 | ||
| 191 | CONFIG_IRQ_UART1_ERROR=7 | ||
| 192 | CONFIG_IRQ_RTC=8 | ||
| 193 | CONFIG_IRQ_PPI=8 | ||
| 194 | CONFIG_IRQ_SPORT0_RX=9 | ||
| 195 | CONFIG_IRQ_SPORT0_TX=9 | ||
| 196 | CONFIG_IRQ_SPORT1_RX=9 | ||
| 197 | CONFIG_IRQ_SPORT1_TX=9 | ||
| 198 | CONFIG_IRQ_TWI=10 | ||
| 199 | CONFIG_IRQ_SPI=10 | ||
| 200 | CONFIG_IRQ_UART0_RX=10 | ||
| 201 | CONFIG_IRQ_UART0_TX=10 | ||
| 202 | CONFIG_IRQ_UART1_RX=10 | ||
| 203 | CONFIG_IRQ_UART1_TX=10 | ||
| 204 | CONFIG_IRQ_OPTSEC=11 | ||
| 205 | CONFIG_IRQ_CNT=11 | ||
| 206 | CONFIG_IRQ_MAC_RX=11 | ||
| 207 | CONFIG_IRQ_PORTH_INTA=11 | ||
| 208 | CONFIG_IRQ_MAC_TX=11 | ||
| 209 | CONFIG_IRQ_PORTH_INTB=11 | ||
| 210 | CONFIG_IRQ_TMR0=12 | ||
| 211 | CONFIG_IRQ_TMR1=12 | ||
| 212 | CONFIG_IRQ_TMR2=12 | ||
| 213 | CONFIG_IRQ_TMR3=12 | ||
| 214 | CONFIG_IRQ_TMR4=12 | ||
| 215 | CONFIG_IRQ_TMR5=12 | ||
| 216 | CONFIG_IRQ_TMR6=12 | ||
| 217 | CONFIG_IRQ_TMR7=12 | ||
| 218 | CONFIG_IRQ_PORTG_INTA=12 | ||
| 219 | CONFIG_IRQ_PORTG_INTB=12 | ||
| 220 | CONFIG_IRQ_MEM_DMA0=13 | ||
| 221 | CONFIG_IRQ_MEM_DMA1=13 | ||
| 222 | CONFIG_IRQ_WATCH=13 | ||
| 223 | CONFIG_IRQ_PORTF_INTA=13 | ||
| 224 | CONFIG_IRQ_PORTF_INTB=13 | ||
| 225 | CONFIG_IRQ_SPI_ERROR=7 | ||
| 226 | CONFIG_IRQ_NFC_ERROR=7 | ||
| 227 | CONFIG_IRQ_HDMA_ERROR=7 | ||
| 228 | CONFIG_IRQ_HDMA=7 | ||
| 229 | CONFIG_IRQ_USB_EINT=10 | ||
| 230 | CONFIG_IRQ_USB_INT0=11 | ||
| 231 | CONFIG_IRQ_USB_INT1=11 | ||
| 232 | CONFIG_IRQ_USB_INT2=11 | ||
| 233 | CONFIG_IRQ_USB_DMA=11 | ||
| 234 | |||
| 235 | # | ||
| 236 | # Board customizations | ||
| 237 | # | ||
| 238 | # CONFIG_CMDLINE_BOOL is not set | ||
| 239 | |||
| 240 | # | ||
| 241 | # Clock/PLL Setup | ||
| 242 | # | ||
| 243 | CONFIG_CLKIN_HZ=25000000 | ||
| 244 | # CONFIG_BFIN_KERNEL_CLOCK is not set | ||
| 245 | CONFIG_MAX_VCO_HZ=600000000 | ||
| 246 | CONFIG_MIN_VCO_HZ=50000000 | ||
| 247 | CONFIG_MAX_SCLK_HZ=133000000 | ||
| 248 | CONFIG_MIN_SCLK_HZ=27000000 | ||
| 249 | |||
| 250 | # | ||
| 251 | # Kernel Timer/Scheduler | ||
| 252 | # | ||
| 253 | # CONFIG_HZ_100 is not set | ||
| 254 | CONFIG_HZ_250=y | ||
| 255 | # CONFIG_HZ_300 is not set | ||
| 256 | # CONFIG_HZ_1000 is not set | ||
| 257 | CONFIG_HZ=250 | ||
| 258 | |||
| 259 | # | ||
| 260 | # Memory Setup | ||
| 261 | # | ||
| 262 | CONFIG_MEM_SIZE=64 | ||
| 263 | CONFIG_MEM_ADD_WIDTH=10 | ||
| 264 | CONFIG_BOOT_LOAD=0x1000 | ||
| 265 | CONFIG_BFIN_SCRATCH_REG_RETN=y | ||
| 266 | # CONFIG_BFIN_SCRATCH_REG_RETE is not set | ||
| 267 | # CONFIG_BFIN_SCRATCH_REG_CYCLES is not set | ||
| 268 | |||
| 269 | # | ||
| 270 | # Blackfin Kernel Optimizations | ||
| 271 | # | ||
| 272 | |||
| 273 | # | ||
| 274 | # Memory Optimizations | ||
| 275 | # | ||
| 276 | CONFIG_I_ENTRY_L1=y | ||
| 277 | CONFIG_EXCPT_IRQ_SYSC_L1=y | ||
| 278 | CONFIG_DO_IRQ_L1=y | ||
| 279 | CONFIG_CORE_TIMER_IRQ_L1=y | ||
| 280 | CONFIG_IDLE_L1=y | ||
| 281 | # CONFIG_SCHEDULE_L1 is not set | ||
| 282 | CONFIG_ARITHMETIC_OPS_L1=y | ||
| 283 | CONFIG_ACCESS_OK_L1=y | ||
| 284 | # CONFIG_MEMSET_L1 is not set | ||
| 285 | # CONFIG_MEMCPY_L1 is not set | ||
| 286 | # CONFIG_SYS_BFIN_SPINLOCK_L1 is not set | ||
| 287 | # CONFIG_IP_CHECKSUM_L1 is not set | ||
| 288 | CONFIG_CACHELINE_ALIGNED_L1=y | ||
| 289 | # CONFIG_SYSCALL_TAB_L1 is not set | ||
| 290 | # CONFIG_CPLB_SWITCH_TAB_L1 is not set | ||
| 291 | CONFIG_RAMKERNEL=y | ||
| 292 | # CONFIG_ROMKERNEL is not set | ||
| 293 | CONFIG_SELECT_MEMORY_MODEL=y | ||
| 294 | CONFIG_FLATMEM_MANUAL=y | ||
| 295 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
| 296 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
| 297 | CONFIG_FLATMEM=y | ||
| 298 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
| 299 | # CONFIG_SPARSEMEM_STATIC is not set | ||
| 300 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
| 301 | # CONFIG_RESOURCES_64BIT is not set | ||
| 302 | CONFIG_ZONE_DMA_FLAG=1 | ||
| 303 | CONFIG_LARGE_ALLOCS=y | ||
| 304 | CONFIG_BFIN_DMA_5XX=y | ||
| 305 | # CONFIG_DMA_UNCACHED_2M is not set | ||
| 306 | CONFIG_DMA_UNCACHED_1M=y | ||
| 307 | # CONFIG_DMA_UNCACHED_NONE is not set | ||
| 308 | |||
| 309 | # | ||
| 310 | # Cache Support | ||
| 311 | # | ||
| 312 | CONFIG_BFIN_ICACHE=y | ||
| 313 | CONFIG_BFIN_DCACHE=y | ||
| 314 | # CONFIG_BFIN_DCACHE_BANKA is not set | ||
| 315 | # CONFIG_BFIN_ICACHE_LOCK is not set | ||
| 316 | # CONFIG_BFIN_WB is not set | ||
| 317 | CONFIG_BFIN_WT=y | ||
| 318 | CONFIG_L1_MAX_PIECE=16 | ||
| 319 | |||
| 320 | # | ||
| 321 | # Asynchonous Memory Configuration | ||
| 322 | # | ||
| 323 | |||
| 324 | # | ||
| 325 | # EBIU_AMBCTL Global Control | ||
| 326 | # | ||
| 327 | CONFIG_C_AMCKEN=y | ||
| 328 | CONFIG_C_CDPRIO=y | ||
| 329 | # CONFIG_C_AMBEN is not set | ||
| 330 | # CONFIG_C_AMBEN_B0 is not set | ||
| 331 | # CONFIG_C_AMBEN_B0_B1 is not set | ||
| 332 | # CONFIG_C_AMBEN_B0_B1_B2 is not set | ||
| 333 | CONFIG_C_AMBEN_ALL=y | ||
| 334 | |||
| 335 | # | ||
| 336 | # EBIU_AMBCTL Control | ||
| 337 | # | ||
| 338 | CONFIG_BANK_0=0x7BB0 | ||
| 339 | CONFIG_BANK_1=0x5554 | ||
| 340 | CONFIG_BANK_2=0x7BB0 | ||
| 341 | CONFIG_BANK_3=0xFFC0 | ||
| 342 | |||
| 343 | # | ||
| 344 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | ||
| 345 | # | ||
| 346 | # CONFIG_PCI is not set | ||
| 347 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
| 348 | |||
| 349 | # | ||
| 350 | # PCCARD (PCMCIA/CardBus) support | ||
| 351 | # | ||
| 352 | # CONFIG_PCCARD is not set | ||
| 353 | |||
| 354 | # | ||
| 355 | # Executable file formats | ||
| 356 | # | ||
| 357 | CONFIG_BINFMT_ELF_FDPIC=y | ||
| 358 | CONFIG_BINFMT_FLAT=y | ||
| 359 | CONFIG_BINFMT_ZFLAT=y | ||
| 360 | # CONFIG_BINFMT_SHARED_FLAT is not set | ||
| 361 | # CONFIG_BINFMT_MISC is not set | ||
| 362 | |||
| 363 | # | ||
| 364 | # Power management options | ||
| 365 | # | ||
| 366 | # CONFIG_PM is not set | ||
| 367 | |||
| 368 | # | ||
| 369 | # Networking | ||
| 370 | # | ||
| 371 | CONFIG_NET=y | ||
| 372 | |||
| 373 | # | ||
| 374 | # Networking options | ||
| 375 | # | ||
| 376 | CONFIG_PACKET=y | ||
| 377 | # CONFIG_PACKET_MMAP is not set | ||
| 378 | CONFIG_UNIX=y | ||
| 379 | CONFIG_XFRM=y | ||
| 380 | # CONFIG_XFRM_USER is not set | ||
| 381 | # CONFIG_XFRM_SUB_POLICY is not set | ||
| 382 | # CONFIG_XFRM_MIGRATE is not set | ||
| 383 | # CONFIG_NET_KEY is not set | ||
| 384 | CONFIG_INET=y | ||
| 385 | # CONFIG_IP_MULTICAST is not set | ||
| 386 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
| 387 | CONFIG_IP_FIB_HASH=y | ||
| 388 | CONFIG_IP_PNP=y | ||
| 389 | # CONFIG_IP_PNP_DHCP is not set | ||
| 390 | # CONFIG_IP_PNP_BOOTP is not set | ||
| 391 | # CONFIG_IP_PNP_RARP is not set | ||
| 392 | # CONFIG_NET_IPIP is not set | ||
| 393 | # CONFIG_NET_IPGRE is not set | ||
| 394 | # CONFIG_ARPD is not set | ||
| 395 | CONFIG_SYN_COOKIES=y | ||
| 396 | # CONFIG_INET_AH is not set | ||
| 397 | # CONFIG_INET_ESP is not set | ||
| 398 | # CONFIG_INET_IPCOMP is not set | ||
| 399 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
| 400 | # CONFIG_INET_TUNNEL is not set | ||
| 401 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
| 402 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
| 403 | CONFIG_INET_XFRM_MODE_BEET=y | ||
| 404 | CONFIG_INET_DIAG=y | ||
| 405 | CONFIG_INET_TCP_DIAG=y | ||
| 406 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
| 407 | CONFIG_TCP_CONG_CUBIC=y | ||
| 408 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
| 409 | # CONFIG_TCP_MD5SIG is not set | ||
| 410 | # CONFIG_IPV6 is not set | ||
| 411 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
| 412 | # CONFIG_INET6_TUNNEL is not set | ||
| 413 | # CONFIG_NETLABEL is not set | ||
| 414 | # CONFIG_NETWORK_SECMARK is not set | ||
| 415 | # CONFIG_NETFILTER is not set | ||
| 416 | # CONFIG_IP_DCCP is not set | ||
| 417 | # CONFIG_IP_SCTP is not set | ||
| 418 | # CONFIG_TIPC is not set | ||
| 419 | # CONFIG_ATM is not set | ||
| 420 | # CONFIG_BRIDGE is not set | ||
| 421 | # CONFIG_VLAN_8021Q is not set | ||
| 422 | # CONFIG_DECNET is not set | ||
| 423 | # CONFIG_LLC2 is not set | ||
| 424 | # CONFIG_IPX is not set | ||
| 425 | # CONFIG_ATALK is not set | ||
| 426 | # CONFIG_X25 is not set | ||
| 427 | # CONFIG_LAPB is not set | ||
| 428 | # CONFIG_ECONET is not set | ||
| 429 | # CONFIG_WAN_ROUTER is not set | ||
| 430 | |||
| 431 | # | ||
| 432 | # QoS and/or fair queueing | ||
| 433 | # | ||
| 434 | # CONFIG_NET_SCHED is not set | ||
| 435 | |||
| 436 | # | ||
| 437 | # Network testing | ||
| 438 | # | ||
| 439 | # CONFIG_NET_PKTGEN is not set | ||
| 440 | # CONFIG_HAMRADIO is not set | ||
| 441 | # CONFIG_IRDA is not set | ||
| 442 | # CONFIG_BT is not set | ||
| 443 | # CONFIG_AF_RXRPC is not set | ||
| 444 | |||
| 445 | # | ||
| 446 | # Wireless | ||
| 447 | # | ||
| 448 | # CONFIG_CFG80211 is not set | ||
| 449 | # CONFIG_WIRELESS_EXT is not set | ||
| 450 | # CONFIG_MAC80211 is not set | ||
| 451 | # CONFIG_IEEE80211 is not set | ||
| 452 | # CONFIG_RFKILL is not set | ||
| 453 | |||
| 454 | # | ||
| 455 | # Device Drivers | ||
| 456 | # | ||
| 457 | |||
| 458 | # | ||
| 459 | # Generic Driver Options | ||
| 460 | # | ||
| 461 | CONFIG_STANDALONE=y | ||
| 462 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
| 463 | # CONFIG_FW_LOADER is not set | ||
| 464 | # CONFIG_SYS_HYPERVISOR is not set | ||
| 465 | |||
| 466 | # | ||
| 467 | # Connector - unified userspace <-> kernelspace linker | ||
| 468 | # | ||
| 469 | # CONFIG_CONNECTOR is not set | ||
| 470 | CONFIG_MTD=y | ||
| 471 | # CONFIG_MTD_DEBUG is not set | ||
| 472 | # CONFIG_MTD_CONCAT is not set | ||
| 473 | CONFIG_MTD_PARTITIONS=y | ||
| 474 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
| 475 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
| 476 | |||
| 477 | # | ||
| 478 | # User Modules And Translation Layers | ||
| 479 | # | ||
| 480 | CONFIG_MTD_CHAR=m | ||
| 481 | CONFIG_MTD_BLKDEVS=y | ||
| 482 | CONFIG_MTD_BLOCK=y | ||
| 483 | # CONFIG_FTL is not set | ||
| 484 | # CONFIG_NFTL is not set | ||
| 485 | # CONFIG_INFTL is not set | ||
| 486 | # CONFIG_RFD_FTL is not set | ||
| 487 | # CONFIG_SSFDC is not set | ||
| 488 | |||
| 489 | # | ||
| 490 | # RAM/ROM/Flash chip drivers | ||
| 491 | # | ||
| 492 | # CONFIG_MTD_CFI is not set | ||
| 493 | CONFIG_MTD_JEDECPROBE=m | ||
| 494 | CONFIG_MTD_GEN_PROBE=m | ||
| 495 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
| 496 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
| 497 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
| 498 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
| 499 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
| 500 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
| 501 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
| 502 | CONFIG_MTD_CFI_I1=y | ||
| 503 | CONFIG_MTD_CFI_I2=y | ||
| 504 | # CONFIG_MTD_CFI_I4 is not set | ||
| 505 | # CONFIG_MTD_CFI_I8 is not set | ||
| 506 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
| 507 | # CONFIG_MTD_CFI_AMDSTD is not set | ||
| 508 | # CONFIG_MTD_CFI_STAA is not set | ||
| 509 | CONFIG_MTD_MW320D=m | ||
| 510 | CONFIG_MTD_RAM=y | ||
| 511 | CONFIG_MTD_ROM=m | ||
| 512 | # CONFIG_MTD_ABSENT is not set | ||
| 513 | |||
| 514 | # | ||
| 515 | # Mapping drivers for chip access | ||
| 516 | # | ||
| 517 | CONFIG_MTD_COMPLEX_MAPPINGS=y | ||
| 518 | # CONFIG_MTD_PHYSMAP is not set | ||
| 519 | CONFIG_MTD_BF5xx=m | ||
| 520 | CONFIG_BFIN_FLASH_SIZE=0x400000 | ||
| 521 | CONFIG_EBIU_FLASH_BASE=0x20000000 | ||
| 522 | # CONFIG_MTD_UCLINUX is not set | ||
| 523 | # CONFIG_MTD_PLATRAM is not set | ||
| 524 | |||
| 525 | # | ||
| 526 | # Self-contained MTD device drivers | ||
| 527 | # | ||
| 528 | # CONFIG_MTD_DATAFLASH is not set | ||
| 529 | # CONFIG_MTD_M25P80 is not set | ||
| 530 | # CONFIG_MTD_SLRAM is not set | ||
| 531 | # CONFIG_MTD_PHRAM is not set | ||
| 532 | # CONFIG_MTD_MTDRAM is not set | ||
| 533 | # CONFIG_MTD_BLOCK2MTD is not set | ||
| 534 | |||
| 535 | # | ||
| 536 | # Disk-On-Chip Device Drivers | ||
| 537 | # | ||
| 538 | # CONFIG_MTD_DOC2000 is not set | ||
| 539 | # CONFIG_MTD_DOC2001 is not set | ||
| 540 | # CONFIG_MTD_DOC2001PLUS is not set | ||
| 541 | CONFIG_MTD_NAND=m | ||
| 542 | # CONFIG_MTD_NAND_VERIFY_WRITE is not set | ||
| 543 | # CONFIG_MTD_NAND_ECC_SMC is not set | ||
| 544 | # CONFIG_MTD_NAND_MUSEUM_IDS is not set | ||
| 545 | CONFIG_MTD_NAND_BFIN=m | ||
| 546 | CONFIG_BFIN_NAND_BASE=0x20212000 | ||
| 547 | CONFIG_BFIN_NAND_CLE=2 | ||
| 548 | CONFIG_BFIN_NAND_ALE=1 | ||
| 549 | CONFIG_BFIN_NAND_READY=3 | ||
| 550 | CONFIG_MTD_NAND_IDS=m | ||
| 551 | # CONFIG_MTD_NAND_DISKONCHIP is not set | ||
| 552 | # CONFIG_MTD_NAND_NANDSIM is not set | ||
| 553 | # CONFIG_MTD_NAND_PLATFORM is not set | ||
| 554 | # CONFIG_MTD_ONENAND is not set | ||
| 555 | |||
| 556 | # | ||
| 557 | # UBI - Unsorted block images | ||
| 558 | # | ||
| 559 | # CONFIG_MTD_UBI is not set | ||
| 560 | |||
| 561 | # | ||
| 562 | # Parallel port support | ||
| 563 | # | ||
| 564 | # CONFIG_PARPORT is not set | ||
| 565 | |||
| 566 | # | ||
| 567 | # Plug and Play support | ||
| 568 | # | ||
| 569 | # CONFIG_PNPACPI is not set | ||
| 570 | |||
| 571 | # | ||
| 572 | # Block devices | ||
| 573 | # | ||
| 574 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
| 575 | # CONFIG_BLK_DEV_LOOP is not set | ||
| 576 | # CONFIG_BLK_DEV_NBD is not set | ||
| 577 | CONFIG_BLK_DEV_RAM=y | ||
| 578 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
| 579 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
| 580 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
| 581 | # CONFIG_CDROM_PKTCDVD is not set | ||
| 582 | # CONFIG_ATA_OVER_ETH is not set | ||
| 583 | |||
| 584 | # | ||
| 585 | # Misc devices | ||
| 586 | # | ||
| 587 | # CONFIG_IDE is not set | ||
| 588 | |||
| 589 | # | ||
| 590 | # SCSI device support | ||
| 591 | # | ||
| 592 | # CONFIG_RAID_ATTRS is not set | ||
| 593 | # CONFIG_SCSI is not set | ||
| 594 | # CONFIG_SCSI_NETLINK is not set | ||
| 595 | # CONFIG_ATA is not set | ||
| 596 | |||
| 597 | # | ||
| 598 | # Multi-device support (RAID and LVM) | ||
| 599 | # | ||
| 600 | # CONFIG_MD is not set | ||
| 601 | |||
| 602 | # | ||
| 603 | # Network device support | ||
| 604 | # | ||
| 605 | CONFIG_NETDEVICES=y | ||
| 606 | # CONFIG_DUMMY is not set | ||
| 607 | # CONFIG_BONDING is not set | ||
| 608 | # CONFIG_EQUALIZER is not set | ||
| 609 | # CONFIG_TUN is not set | ||
| 610 | CONFIG_PHYLIB=y | ||
| 611 | |||
| 612 | # | ||
| 613 | # MII PHY device drivers | ||
| 614 | # | ||
| 615 | # CONFIG_MARVELL_PHY is not set | ||
| 616 | # CONFIG_DAVICOM_PHY is not set | ||
| 617 | # CONFIG_QSEMI_PHY is not set | ||
| 618 | # CONFIG_LXT_PHY is not set | ||
| 619 | # CONFIG_CICADA_PHY is not set | ||
| 620 | # CONFIG_VITESSE_PHY is not set | ||
| 621 | # CONFIG_SMSC_PHY is not set | ||
| 622 | # CONFIG_BROADCOM_PHY is not set | ||
| 623 | # CONFIG_FIXED_PHY is not set | ||
| 624 | |||
| 625 | # | ||
| 626 | # Ethernet (10 or 100Mbit) | ||
| 627 | # | ||
| 628 | CONFIG_NET_ETHERNET=y | ||
| 629 | CONFIG_MII=y | ||
| 630 | # CONFIG_SMC91X is not set | ||
| 631 | CONFIG_BFIN_MAC=y | ||
| 632 | CONFIG_BFIN_MAC_USE_L1=y | ||
| 633 | CONFIG_BFIN_TX_DESC_NUM=10 | ||
| 634 | CONFIG_BFIN_RX_DESC_NUM=20 | ||
| 635 | CONFIG_BFIN_MAC_RMII=y | ||
| 636 | # CONFIG_SMSC911X is not set | ||
| 637 | # CONFIG_DM9000 is not set | ||
| 638 | CONFIG_NETDEV_1000=y | ||
| 639 | CONFIG_NETDEV_10000=y | ||
| 640 | |||
| 641 | # | ||
| 642 | # Wireless LAN | ||
| 643 | # | ||
| 644 | # CONFIG_WLAN_PRE80211 is not set | ||
| 645 | # CONFIG_WLAN_80211 is not set | ||
| 646 | # CONFIG_WAN is not set | ||
| 647 | # CONFIG_PPP is not set | ||
| 648 | # CONFIG_SLIP is not set | ||
| 649 | # CONFIG_SHAPER is not set | ||
| 650 | # CONFIG_NETCONSOLE is not set | ||
| 651 | # CONFIG_NETPOLL is not set | ||
| 652 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
| 653 | |||
| 654 | # | ||
| 655 | # ISDN subsystem | ||
| 656 | # | ||
| 657 | # CONFIG_ISDN is not set | ||
| 658 | |||
| 659 | # | ||
| 660 | # Telephony Support | ||
| 661 | # | ||
| 662 | # CONFIG_PHONE is not set | ||
| 663 | |||
| 664 | # | ||
| 665 | # Input device support | ||
| 666 | # | ||
| 667 | CONFIG_INPUT=y | ||
| 668 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
| 669 | # CONFIG_INPUT_POLLDEV is not set | ||
| 670 | |||
| 671 | # | ||
| 672 | # Userland interfaces | ||
| 673 | # | ||
| 674 | # CONFIG_INPUT_MOUSEDEV is not set | ||
| 675 | # CONFIG_INPUT_JOYDEV is not set | ||
| 676 | # CONFIG_INPUT_TSDEV is not set | ||
| 677 | # CONFIG_INPUT_EVDEV is not set | ||
| 678 | # CONFIG_INPUT_EVBUG is not set | ||
| 679 | |||
| 680 | # | ||
| 681 | # Input Device Drivers | ||
| 682 | # | ||
| 683 | # CONFIG_INPUT_KEYBOARD is not set | ||
| 684 | # CONFIG_INPUT_MOUSE is not set | ||
| 685 | # CONFIG_INPUT_JOYSTICK is not set | ||
| 686 | # CONFIG_INPUT_TABLET is not set | ||
| 687 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
| 688 | CONFIG_INPUT_MISC=y | ||
| 689 | # CONFIG_INPUT_ATI_REMOTE is not set | ||
| 690 | # CONFIG_INPUT_ATI_REMOTE2 is not set | ||
| 691 | # CONFIG_INPUT_KEYSPAN_REMOTE is not set | ||
| 692 | # CONFIG_INPUT_POWERMATE is not set | ||
| 693 | # CONFIG_INPUT_YEALINK is not set | ||
| 694 | # CONFIG_INPUT_UINPUT is not set | ||
| 695 | # CONFIG_BF53X_PFBUTTONS is not set | ||
| 696 | # CONFIG_TWI_KEYPAD is not set | ||
| 697 | |||
| 698 | # | ||
| 699 | # Hardware I/O ports | ||
| 700 | # | ||
| 701 | # CONFIG_SERIO is not set | ||
| 702 | # CONFIG_GAMEPORT is not set | ||
| 703 | |||
| 704 | # | ||
| 705 | # Character devices | ||
| 706 | # | ||
| 707 | # CONFIG_AD9960 is not set | ||
| 708 | # CONFIG_SPI_ADC_BF533 is not set | ||
| 709 | # CONFIG_BF5xx_PFLAGS is not set | ||
| 710 | # CONFIG_BF5xx_PPIFCD is not set | ||
| 711 | # CONFIG_BF5xx_TIMERS is not set | ||
| 712 | # CONFIG_BF5xx_PPI is not set | ||
| 713 | # CONFIG_BFIN_SPORT is not set | ||
| 714 | # CONFIG_BFIN_TIMER_LATENCY is not set | ||
| 715 | # CONFIG_TWI_LCD is not set | ||
| 716 | # CONFIG_AD5304 is not set | ||
| 717 | # CONFIG_BF5xx_TEA5764 is not set | ||
| 718 | # CONFIG_BF5xx_FBDMA is not set | ||
| 719 | # CONFIG_VT is not set | ||
| 720 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
| 721 | |||
| 722 | # | ||
| 723 | # Serial drivers | ||
| 724 | # | ||
| 725 | # CONFIG_SERIAL_8250 is not set | ||
| 726 | |||
| 727 | # | ||
| 728 | # Non-8250 serial port support | ||
| 729 | # | ||
| 730 | CONFIG_SERIAL_BFIN=y | ||
| 731 | CONFIG_SERIAL_BFIN_CONSOLE=y | ||
| 732 | # CONFIG_SERIAL_BFIN_DMA is not set | ||
| 733 | CONFIG_SERIAL_BFIN_PIO=y | ||
| 734 | # CONFIG_SERIAL_BFIN_UART0 is not set | ||
| 735 | CONFIG_SERIAL_BFIN_UART1=y | ||
| 736 | # CONFIG_BFIN_UART1_CTSRTS is not set | ||
| 737 | CONFIG_SERIAL_CORE=y | ||
| 738 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
| 739 | # CONFIG_SERIAL_BFIN_SPORT is not set | ||
| 740 | CONFIG_UNIX98_PTYS=y | ||
| 741 | # CONFIG_LEGACY_PTYS is not set | ||
| 742 | |||
| 743 | # | ||
| 744 | # CAN, the car bus and industrial fieldbus | ||
| 745 | # | ||
| 746 | # CONFIG_CAN4LINUX is not set | ||
| 747 | |||
| 748 | # | ||
| 749 | # IPMI | ||
| 750 | # | ||
| 751 | # CONFIG_IPMI_HANDLER is not set | ||
| 752 | CONFIG_WATCHDOG=y | ||
| 753 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
| 754 | |||
| 755 | # | ||
| 756 | # Watchdog Device Drivers | ||
| 757 | # | ||
| 758 | # CONFIG_SOFT_WATCHDOG is not set | ||
| 759 | CONFIG_BFIN_WDT=y | ||
| 760 | CONFIG_HW_RANDOM=y | ||
| 761 | # CONFIG_GEN_RTC is not set | ||
| 762 | # CONFIG_R3964 is not set | ||
| 763 | # CONFIG_RAW_DRIVER is not set | ||
| 764 | |||
| 765 | # | ||
| 766 | # TPM devices | ||
| 767 | # | ||
| 768 | # CONFIG_TCG_TPM is not set | ||
| 769 | CONFIG_I2C=y | ||
| 770 | CONFIG_I2C_BOARDINFO=y | ||
| 771 | CONFIG_I2C_CHARDEV=m | ||
| 772 | |||
| 773 | # | ||
| 774 | # I2C Algorithms | ||
| 775 | # | ||
| 776 | # CONFIG_I2C_ALGOBIT is not set | ||
| 777 | # CONFIG_I2C_ALGOPCF is not set | ||
| 778 | # CONFIG_I2C_ALGOPCA is not set | ||
| 779 | |||
| 780 | # | ||
| 781 | # I2C Hardware Bus support | ||
| 782 | # | ||
| 783 | # CONFIG_I2C_BLACKFIN_GPIO is not set | ||
| 784 | CONFIG_I2C_BLACKFIN_TWI=m | ||
| 785 | CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=50 | ||
| 786 | # CONFIG_I2C_GPIO is not set | ||
| 787 | # CONFIG_I2C_OCORES is not set | ||
| 788 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
| 789 | # CONFIG_I2C_SIMTEC is not set | ||
| 790 | # CONFIG_I2C_STUB is not set | ||
| 791 | |||
| 792 | # | ||
| 793 | # Miscellaneous I2C Chip support | ||
| 794 | # | ||
| 795 | # CONFIG_SENSORS_DS1337 is not set | ||
| 796 | # CONFIG_SENSORS_DS1374 is not set | ||
| 797 | # CONFIG_SENSORS_AD5252 is not set | ||
| 798 | # CONFIG_SENSORS_EEPROM is not set | ||
| 799 | # CONFIG_SENSORS_PCF8574 is not set | ||
| 800 | # CONFIG_SENSORS_PCF8575 is not set | ||
| 801 | # CONFIG_SENSORS_PCA9543 is not set | ||
| 802 | # CONFIG_SENSORS_PCA9539 is not set | ||
| 803 | # CONFIG_SENSORS_PCF8591 is not set | ||
| 804 | # CONFIG_SENSORS_MAX6875 is not set | ||
| 805 | # CONFIG_I2C_DEBUG_CORE is not set | ||
| 806 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
| 807 | # CONFIG_I2C_DEBUG_BUS is not set | ||
| 808 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
| 809 | |||
| 810 | # | ||
| 811 | # SPI support | ||
| 812 | # | ||
| 813 | CONFIG_SPI=y | ||
| 814 | CONFIG_SPI_MASTER=y | ||
| 815 | |||
| 816 | # | ||
| 817 | # SPI Master Controller Drivers | ||
| 818 | # | ||
| 819 | CONFIG_SPI_BFIN=y | ||
| 820 | # CONFIG_SPI_BITBANG is not set | ||
| 821 | |||
| 822 | # | ||
| 823 | # SPI Protocol Masters | ||
| 824 | # | ||
| 825 | # CONFIG_SPI_AT25 is not set | ||
| 826 | # CONFIG_SPI_SPIDEV is not set | ||
| 827 | |||
| 828 | # | ||
| 829 | # Dallas's 1-wire bus | ||
| 830 | # | ||
| 831 | # CONFIG_W1 is not set | ||
| 832 | CONFIG_HWMON=y | ||
| 833 | # CONFIG_HWMON_VID is not set | ||
| 834 | # CONFIG_SENSORS_ABITUGURU is not set | ||
| 835 | # CONFIG_SENSORS_AD7418 is not set | ||
| 836 | # CONFIG_SENSORS_ADM1021 is not set | ||
| 837 | # CONFIG_SENSORS_ADM1025 is not set | ||
| 838 | # CONFIG_SENSORS_ADM1026 is not set | ||
| 839 | # CONFIG_SENSORS_ADM1029 is not set | ||
| 840 | # CONFIG_SENSORS_ADM1031 is not set | ||
| 841 | # CONFIG_SENSORS_ADM9240 is not set | ||
| 842 | # CONFIG_SENSORS_ASB100 is not set | ||
| 843 | # CONFIG_SENSORS_ATXP1 is not set | ||
| 844 | # CONFIG_SENSORS_DS1621 is not set | ||
| 845 | # CONFIG_SENSORS_F71805F is not set | ||
| 846 | # CONFIG_SENSORS_FSCHER is not set | ||
| 847 | # CONFIG_SENSORS_FSCPOS is not set | ||
| 848 | # CONFIG_SENSORS_GL518SM is not set | ||
| 849 | # CONFIG_SENSORS_GL520SM is not set | ||
| 850 | # CONFIG_SENSORS_IT87 is not set | ||
| 851 | # CONFIG_SENSORS_LM63 is not set | ||
| 852 | # CONFIG_SENSORS_LM70 is not set | ||
| 853 | # CONFIG_SENSORS_LM75 is not set | ||
| 854 | # CONFIG_SENSORS_LM77 is not set | ||
| 855 | # CONFIG_SENSORS_LM78 is not set | ||
| 856 | # CONFIG_SENSORS_LM80 is not set | ||
| 857 | # CONFIG_SENSORS_LM83 is not set | ||
| 858 | # CONFIG_SENSORS_LM85 is not set | ||
| 859 | # CONFIG_SENSORS_LM87 is not set | ||
| 860 | # CONFIG_SENSORS_LM90 is not set | ||
| 861 | # CONFIG_SENSORS_LM92 is not set | ||
| 862 | # CONFIG_SENSORS_MAX1619 is not set | ||
| 863 | # CONFIG_SENSORS_MAX6650 is not set | ||
| 864 | # CONFIG_SENSORS_PC87360 is not set | ||
| 865 | # CONFIG_SENSORS_PC87427 is not set | ||
| 866 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
| 867 | # CONFIG_SENSORS_SMSC47M192 is not set | ||
| 868 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
| 869 | # CONFIG_SENSORS_VT1211 is not set | ||
| 870 | # CONFIG_SENSORS_W83781D is not set | ||
| 871 | # CONFIG_SENSORS_W83791D is not set | ||
| 872 | # CONFIG_SENSORS_W83792D is not set | ||
| 873 | # CONFIG_SENSORS_W83793 is not set | ||
| 874 | # CONFIG_SENSORS_W83L785TS is not set | ||
| 875 | # CONFIG_SENSORS_W83627HF is not set | ||
| 876 | # CONFIG_SENSORS_W83627EHF is not set | ||
| 877 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
| 878 | |||
| 879 | # | ||
| 880 | # Multifunction device drivers | ||
| 881 | # | ||
| 882 | # CONFIG_MFD_SM501 is not set | ||
| 883 | |||
| 884 | # | ||
| 885 | # Multimedia devices | ||
| 886 | # | ||
| 887 | # CONFIG_VIDEO_DEV is not set | ||
| 888 | # CONFIG_DVB_CORE is not set | ||
| 889 | # CONFIG_DAB is not set | ||
| 890 | |||
| 891 | # | ||
| 892 | # Graphics support | ||
| 893 | # | ||
| 894 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
| 895 | |||
| 896 | # | ||
| 897 | # Display device support | ||
| 898 | # | ||
| 899 | # CONFIG_DISPLAY_SUPPORT is not set | ||
| 900 | # CONFIG_VGASTATE is not set | ||
| 901 | # CONFIG_FB is not set | ||
| 902 | |||
| 903 | # | ||
| 904 | # Sound | ||
| 905 | # | ||
| 906 | # CONFIG_SOUND is not set | ||
| 907 | |||
| 908 | # | ||
| 909 | # HID Devices | ||
| 910 | # | ||
| 911 | CONFIG_HID=y | ||
| 912 | # CONFIG_HID_DEBUG is not set | ||
| 913 | |||
| 914 | # | ||
| 915 | # USB support | ||
| 916 | # | ||
| 917 | CONFIG_USB_ARCH_HAS_HCD=y | ||
| 918 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
| 919 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
| 920 | # CONFIG_USB is not set | ||
| 921 | |||
| 922 | # | ||
| 923 | # Enable Host or Gadget support to see Inventra options | ||
| 924 | # | ||
| 925 | |||
| 926 | # | ||
| 927 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
| 928 | # | ||
| 929 | |||
| 930 | # | ||
| 931 | # USB Gadget Support | ||
| 932 | # | ||
| 933 | # CONFIG_USB_GADGET is not set | ||
| 934 | # CONFIG_MMC is not set | ||
| 935 | |||
| 936 | # | ||
| 937 | # LED devices | ||
| 938 | # | ||
| 939 | # CONFIG_NEW_LEDS is not set | ||
| 940 | |||
| 941 | # | ||
| 942 | # LED drivers | ||
| 943 | # | ||
| 944 | |||
| 945 | # | ||
| 946 | # LED Triggers | ||
| 947 | # | ||
| 948 | |||
| 949 | # | ||
| 950 | # InfiniBand support | ||
| 951 | # | ||
| 952 | |||
| 953 | # | ||
| 954 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
| 955 | # | ||
| 956 | |||
| 957 | # | ||
| 958 | # Real Time Clock | ||
| 959 | # | ||
| 960 | CONFIG_RTC_LIB=y | ||
| 961 | CONFIG_RTC_CLASS=y | ||
| 962 | CONFIG_RTC_HCTOSYS=y | ||
| 963 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
| 964 | # CONFIG_RTC_DEBUG is not set | ||
| 965 | |||
| 966 | # | ||
| 967 | # RTC interfaces | ||
| 968 | # | ||
| 969 | CONFIG_RTC_INTF_SYSFS=y | ||
| 970 | CONFIG_RTC_INTF_PROC=y | ||
| 971 | CONFIG_RTC_INTF_DEV=y | ||
| 972 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
| 973 | # CONFIG_RTC_DRV_TEST is not set | ||
| 974 | |||
| 975 | # | ||
| 976 | # I2C RTC drivers | ||
| 977 | # | ||
| 978 | # CONFIG_RTC_DRV_DS1307 is not set | ||
| 979 | # CONFIG_RTC_DRV_DS1672 is not set | ||
| 980 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
| 981 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
| 982 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
| 983 | # CONFIG_RTC_DRV_X1205 is not set | ||
| 984 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
| 985 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
| 986 | |||
| 987 | # | ||
| 988 | # SPI RTC drivers | ||
| 989 | # | ||
| 990 | # CONFIG_RTC_DRV_RS5C348 is not set | ||
| 991 | # CONFIG_RTC_DRV_MAX6902 is not set | ||
| 992 | |||
| 993 | # | ||
| 994 | # Platform RTC drivers | ||
| 995 | # | ||
| 996 | # CONFIG_RTC_DRV_DS1553 is not set | ||
| 997 | # CONFIG_RTC_DRV_DS1742 is not set | ||
| 998 | # CONFIG_RTC_DRV_M48T86 is not set | ||
| 999 | # CONFIG_RTC_DRV_V3020 is not set | ||
| 1000 | |||
| 1001 | # | ||
| 1002 | # on-CPU RTC drivers | ||
| 1003 | # | ||
| 1004 | CONFIG_RTC_DRV_BFIN=y | ||
| 1005 | |||
| 1006 | # | ||
| 1007 | # DMA Engine support | ||
| 1008 | # | ||
| 1009 | # CONFIG_DMA_ENGINE is not set | ||
| 1010 | |||
| 1011 | # | ||
| 1012 | # DMA Clients | ||
| 1013 | # | ||
| 1014 | |||
| 1015 | # | ||
| 1016 | # DMA Devices | ||
| 1017 | # | ||
| 1018 | |||
| 1019 | # | ||
| 1020 | # PBX support | ||
| 1021 | # | ||
| 1022 | # CONFIG_PBX is not set | ||
| 1023 | |||
| 1024 | # | ||
| 1025 | # File systems | ||
| 1026 | # | ||
| 1027 | # CONFIG_EXT2_FS is not set | ||
| 1028 | # CONFIG_EXT3_FS is not set | ||
| 1029 | # CONFIG_EXT4DEV_FS is not set | ||
| 1030 | # CONFIG_REISERFS_FS is not set | ||
| 1031 | # CONFIG_JFS_FS is not set | ||
| 1032 | # CONFIG_FS_POSIX_ACL is not set | ||
| 1033 | # CONFIG_XFS_FS is not set | ||
| 1034 | # CONFIG_GFS2_FS is not set | ||
| 1035 | # CONFIG_OCFS2_FS is not set | ||
| 1036 | # CONFIG_MINIX_FS is not set | ||
| 1037 | # CONFIG_ROMFS_FS is not set | ||
| 1038 | CONFIG_INOTIFY=y | ||
| 1039 | CONFIG_INOTIFY_USER=y | ||
| 1040 | # CONFIG_QUOTA is not set | ||
| 1041 | # CONFIG_DNOTIFY is not set | ||
| 1042 | # CONFIG_AUTOFS_FS is not set | ||
| 1043 | # CONFIG_AUTOFS4_FS is not set | ||
| 1044 | # CONFIG_FUSE_FS is not set | ||
| 1045 | |||
| 1046 | # | ||
| 1047 | # CD-ROM/DVD Filesystems | ||
| 1048 | # | ||
| 1049 | # CONFIG_ISO9660_FS is not set | ||
| 1050 | # CONFIG_UDF_FS is not set | ||
| 1051 | |||
| 1052 | # | ||
| 1053 | # DOS/FAT/NT Filesystems | ||
| 1054 | # | ||
| 1055 | # CONFIG_MSDOS_FS is not set | ||
| 1056 | # CONFIG_VFAT_FS is not set | ||
| 1057 | # CONFIG_NTFS_FS is not set | ||
| 1058 | |||
| 1059 | # | ||
| 1060 | # Pseudo filesystems | ||
| 1061 | # | ||
| 1062 | CONFIG_PROC_FS=y | ||
| 1063 | CONFIG_PROC_SYSCTL=y | ||
| 1064 | CONFIG_SYSFS=y | ||
| 1065 | # CONFIG_TMPFS is not set | ||
| 1066 | # CONFIG_HUGETLB_PAGE is not set | ||
| 1067 | CONFIG_RAMFS=y | ||
| 1068 | # CONFIG_CONFIGFS_FS is not set | ||
| 1069 | |||
| 1070 | # | ||
| 1071 | # Miscellaneous filesystems | ||
| 1072 | # | ||
| 1073 | # CONFIG_ADFS_FS is not set | ||
| 1074 | # CONFIG_AFFS_FS is not set | ||
| 1075 | # CONFIG_HFS_FS is not set | ||
| 1076 | # CONFIG_HFSPLUS_FS is not set | ||
| 1077 | # CONFIG_BEFS_FS is not set | ||
| 1078 | # CONFIG_BFS_FS is not set | ||
| 1079 | # CONFIG_EFS_FS is not set | ||
| 1080 | CONFIG_YAFFS_FS=m | ||
| 1081 | CONFIG_YAFFS_YAFFS1=y | ||
| 1082 | # CONFIG_YAFFS_DOES_ECC is not set | ||
| 1083 | CONFIG_YAFFS_YAFFS2=y | ||
| 1084 | CONFIG_YAFFS_AUTO_YAFFS2=y | ||
| 1085 | # CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set | ||
| 1086 | CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10 | ||
| 1087 | # CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set | ||
| 1088 | # CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set | ||
| 1089 | CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y | ||
| 1090 | CONFIG_JFFS2_FS=m | ||
| 1091 | CONFIG_JFFS2_FS_DEBUG=0 | ||
| 1092 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
| 1093 | # CONFIG_JFFS2_SUMMARY is not set | ||
| 1094 | # CONFIG_JFFS2_FS_XATTR is not set | ||
| 1095 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
| 1096 | CONFIG_JFFS2_ZLIB=y | ||
| 1097 | CONFIG_JFFS2_RTIME=y | ||
| 1098 | # CONFIG_JFFS2_RUBIN is not set | ||
| 1099 | # CONFIG_CRAMFS is not set | ||
| 1100 | # CONFIG_VXFS_FS is not set | ||
| 1101 | # CONFIG_HPFS_FS is not set | ||
| 1102 | # CONFIG_QNX4FS_FS is not set | ||
| 1103 | # CONFIG_SYSV_FS is not set | ||
| 1104 | # CONFIG_UFS_FS is not set | ||
| 1105 | |||
| 1106 | # | ||
| 1107 | # Network File Systems | ||
| 1108 | # | ||
| 1109 | CONFIG_NFS_FS=m | ||
| 1110 | CONFIG_NFS_V3=y | ||
| 1111 | # CONFIG_NFS_V3_ACL is not set | ||
| 1112 | # CONFIG_NFS_V4 is not set | ||
| 1113 | # CONFIG_NFS_DIRECTIO is not set | ||
| 1114 | # CONFIG_NFSD is not set | ||
| 1115 | CONFIG_LOCKD=m | ||
| 1116 | CONFIG_LOCKD_V4=y | ||
| 1117 | CONFIG_NFS_COMMON=y | ||
| 1118 | CONFIG_SUNRPC=m | ||
| 1119 | # CONFIG_SUNRPC_BIND34 is not set | ||
| 1120 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
| 1121 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
| 1122 | CONFIG_SMB_FS=m | ||
| 1123 | # CONFIG_SMB_NLS_DEFAULT is not set | ||
| 1124 | # CONFIG_CIFS is not set | ||
| 1125 | # CONFIG_NCP_FS is not set | ||
| 1126 | # CONFIG_CODA_FS is not set | ||
| 1127 | # CONFIG_AFS_FS is not set | ||
| 1128 | # CONFIG_9P_FS is not set | ||
| 1129 | |||
| 1130 | # | ||
| 1131 | # Partition Types | ||
| 1132 | # | ||
| 1133 | # CONFIG_PARTITION_ADVANCED is not set | ||
| 1134 | CONFIG_MSDOS_PARTITION=y | ||
| 1135 | |||
| 1136 | # | ||
| 1137 | # Native Language Support | ||
| 1138 | # | ||
| 1139 | CONFIG_NLS=m | ||
| 1140 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
| 1141 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
| 1142 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
| 1143 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
| 1144 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
| 1145 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
| 1146 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
| 1147 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
| 1148 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
| 1149 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
| 1150 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
| 1151 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
| 1152 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
| 1153 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
| 1154 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
| 1155 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
| 1156 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
| 1157 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
| 1158 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
| 1159 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
| 1160 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
| 1161 | # CONFIG_NLS_ISO8859_8 is not set | ||
| 1162 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
| 1163 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
| 1164 | # CONFIG_NLS_ASCII is not set | ||
| 1165 | # CONFIG_NLS_ISO8859_1 is not set | ||
| 1166 | # CONFIG_NLS_ISO8859_2 is not set | ||
| 1167 | # CONFIG_NLS_ISO8859_3 is not set | ||
| 1168 | # CONFIG_NLS_ISO8859_4 is not set | ||
| 1169 | # CONFIG_NLS_ISO8859_5 is not set | ||
| 1170 | # CONFIG_NLS_ISO8859_6 is not set | ||
| 1171 | # CONFIG_NLS_ISO8859_7 is not set | ||
| 1172 | # CONFIG_NLS_ISO8859_9 is not set | ||
| 1173 | # CONFIG_NLS_ISO8859_13 is not set | ||
| 1174 | # CONFIG_NLS_ISO8859_14 is not set | ||
| 1175 | # CONFIG_NLS_ISO8859_15 is not set | ||
| 1176 | # CONFIG_NLS_KOI8_R is not set | ||
| 1177 | # CONFIG_NLS_KOI8_U is not set | ||
| 1178 | # CONFIG_NLS_UTF8 is not set | ||
| 1179 | |||
| 1180 | # | ||
| 1181 | # Distributed Lock Manager | ||
| 1182 | # | ||
| 1183 | # CONFIG_DLM is not set | ||
| 1184 | |||
| 1185 | # | ||
| 1186 | # Profiling support | ||
| 1187 | # | ||
| 1188 | # CONFIG_PROFILING is not set | ||
| 1189 | |||
| 1190 | # | ||
| 1191 | # Kernel hacking | ||
| 1192 | # | ||
| 1193 | # CONFIG_PRINTK_TIME is not set | ||
| 1194 | CONFIG_ENABLE_MUST_CHECK=y | ||
| 1195 | CONFIG_MAGIC_SYSRQ=y | ||
| 1196 | # CONFIG_UNUSED_SYMBOLS is not set | ||
| 1197 | CONFIG_DEBUG_FS=y | ||
| 1198 | # CONFIG_HEADERS_CHECK is not set | ||
| 1199 | # CONFIG_DEBUG_KERNEL is not set | ||
| 1200 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
| 1201 | CONFIG_DEBUG_MMRS=y | ||
| 1202 | CONFIG_DEBUG_HUNT_FOR_ZERO=y | ||
| 1203 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y | ||
| 1204 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y | ||
| 1205 | # CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE is not set | ||
| 1206 | # CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_TWO is not set | ||
| 1207 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0 | ||
| 1208 | # CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set | ||
| 1209 | # CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set | ||
| 1210 | CONFIG_EARLY_PRINTK=y | ||
| 1211 | CONFIG_CPLB_INFO=y | ||
| 1212 | CONFIG_ACCESS_CHECK=y | ||
| 1213 | |||
| 1214 | # | ||
| 1215 | # Security options | ||
| 1216 | # | ||
| 1217 | # CONFIG_KEYS is not set | ||
| 1218 | CONFIG_SECURITY=y | ||
| 1219 | # CONFIG_SECURITY_NETWORK is not set | ||
| 1220 | CONFIG_SECURITY_CAPABILITIES=y | ||
| 1221 | |||
| 1222 | # | ||
| 1223 | # Cryptographic options | ||
| 1224 | # | ||
| 1225 | # CONFIG_CRYPTO is not set | ||
| 1226 | |||
| 1227 | # | ||
| 1228 | # Library routines | ||
| 1229 | # | ||
| 1230 | CONFIG_BITREVERSE=y | ||
| 1231 | # CONFIG_CRC_CCITT is not set | ||
| 1232 | # CONFIG_CRC16 is not set | ||
| 1233 | # CONFIG_CRC_ITU_T is not set | ||
| 1234 | CONFIG_CRC32=y | ||
| 1235 | # CONFIG_LIBCRC32C is not set | ||
| 1236 | CONFIG_ZLIB_INFLATE=y | ||
| 1237 | CONFIG_ZLIB_DEFLATE=m | ||
| 1238 | CONFIG_PLIST=y | ||
| 1239 | CONFIG_HAS_IOMEM=y | ||
| 1240 | CONFIG_HAS_IOPORT=y | ||
| 1241 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/blackfin/configs/BF548-EZKIT_defconfig b/arch/blackfin/configs/BF548-EZKIT_defconfig index e80f3d59c283..d8569888a1c8 100644 --- a/arch/blackfin/configs/BF548-EZKIT_defconfig +++ b/arch/blackfin/configs/BF548-EZKIT_defconfig | |||
| @@ -809,7 +809,14 @@ CONFIG_UNIX98_PTYS=y | |||
| 809 | # IPMI | 809 | # IPMI |
| 810 | # | 810 | # |
| 811 | # CONFIG_IPMI_HANDLER is not set | 811 | # CONFIG_IPMI_HANDLER is not set |
| 812 | # CONFIG_WATCHDOG is not set | 812 | CONFIG_WATCHDOG=y |
| 813 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
| 814 | |||
| 815 | # | ||
| 816 | # Watchdog Device Drivers | ||
| 817 | # | ||
| 818 | # CONFIG_SOFT_WATCHDOG is not set | ||
| 819 | CONFIG_BFIN_WDT=y | ||
| 813 | CONFIG_HW_RANDOM=y | 820 | CONFIG_HW_RANDOM=y |
| 814 | # CONFIG_GEN_RTC is not set | 821 | # CONFIG_GEN_RTC is not set |
| 815 | # CONFIG_R3964 is not set | 822 | # CONFIG_R3964 is not set |
diff --git a/arch/blackfin/kernel/Makefile b/arch/blackfin/kernel/Makefile index 8aeb6066b19b..8a4cfb293b27 100644 --- a/arch/blackfin/kernel/Makefile +++ b/arch/blackfin/kernel/Makefile | |||
| @@ -9,6 +9,7 @@ obj-y := \ | |||
| 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 reboot.o bfin_gpio.o | 10 | fixed_code.o cplbinit.o cacheinit.o reboot.o bfin_gpio.o |
| 11 | 11 | ||
| 12 | obj-$(CONFIG_BFIN_GPTIMERS) += gptimers.o | ||
| 12 | obj-$(CONFIG_MODULES) += module.o | 13 | obj-$(CONFIG_MODULES) += module.o |
| 13 | obj-$(CONFIG_BFIN_DMA_5XX) += bfin_dma_5xx.o | 14 | obj-$(CONFIG_BFIN_DMA_5XX) += bfin_dma_5xx.o |
| 14 | obj-$(CONFIG_DUAL_CORE_TEST_MODULE) += dualcore_test.o | 15 | obj-$(CONFIG_DUAL_CORE_TEST_MODULE) += dualcore_test.o |
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c index e19164fb4cd1..503eef4c7fec 100644 --- a/arch/blackfin/kernel/bfin_dma_5xx.c +++ b/arch/blackfin/kernel/bfin_dma_5xx.c | |||
| @@ -420,6 +420,32 @@ unsigned short get_dma_curr_ycount(unsigned int channel) | |||
| 420 | } | 420 | } |
| 421 | EXPORT_SYMBOL(get_dma_curr_ycount); | 421 | EXPORT_SYMBOL(get_dma_curr_ycount); |
| 422 | 422 | ||
| 423 | unsigned long get_dma_next_desc_ptr(unsigned int channel) | ||
| 424 | { | ||
| 425 | BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE | ||
| 426 | && channel < MAX_BLACKFIN_DMA_CHANNEL)); | ||
| 427 | |||
| 428 | return dma_ch[channel].regs->next_desc_ptr; | ||
| 429 | } | ||
| 430 | EXPORT_SYMBOL(get_dma_next_desc_ptr); | ||
| 431 | |||
| 432 | unsigned long get_dma_curr_desc_ptr(unsigned int channel) | ||
| 433 | { | ||
| 434 | BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE | ||
| 435 | && channel < MAX_BLACKFIN_DMA_CHANNEL)); | ||
| 436 | |||
| 437 | return dma_ch[channel].regs->curr_desc_ptr; | ||
| 438 | } | ||
| 439 | |||
| 440 | unsigned long get_dma_curr_addr(unsigned int channel) | ||
| 441 | { | ||
| 442 | BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE | ||
| 443 | && channel < MAX_BLACKFIN_DMA_CHANNEL)); | ||
| 444 | |||
| 445 | return dma_ch[channel].regs->curr_addr_ptr; | ||
| 446 | } | ||
| 447 | EXPORT_SYMBOL(get_dma_curr_addr); | ||
| 448 | |||
| 423 | static void *__dma_memcpy(void *dest, const void *src, size_t size) | 449 | static void *__dma_memcpy(void *dest, const void *src, size_t size) |
| 424 | { | 450 | { |
| 425 | int direction; /* 1 - address decrease, 0 - address increase */ | 451 | int direction; /* 1 - address decrease, 0 - address increase */ |
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index 3fe0cd49e8db..ce85d4bf34ca 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c | |||
| @@ -124,7 +124,7 @@ static struct gpio_port_t *gpio_bankb[gpio_bank(MAX_BLACKFIN_GPIOS)] = { | |||
| 124 | }; | 124 | }; |
| 125 | #endif | 125 | #endif |
| 126 | 126 | ||
| 127 | #ifdef BF537_FAMILY | 127 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) |
| 128 | static struct gpio_port_t *gpio_bankb[gpio_bank(MAX_BLACKFIN_GPIOS)] = { | 128 | static struct gpio_port_t *gpio_bankb[gpio_bank(MAX_BLACKFIN_GPIOS)] = { |
| 129 | (struct gpio_port_t *) PORTFIO, | 129 | (struct gpio_port_t *) PORTFIO, |
| 130 | (struct gpio_port_t *) PORTGIO, | 130 | (struct gpio_port_t *) PORTGIO, |
| @@ -139,6 +139,21 @@ static unsigned short *port_fer[gpio_bank(MAX_BLACKFIN_GPIOS)] = { | |||
| 139 | 139 | ||
| 140 | #endif | 140 | #endif |
| 141 | 141 | ||
| 142 | #ifdef BF527_FAMILY | ||
| 143 | static unsigned short *port_mux[gpio_bank(MAX_BLACKFIN_GPIOS)] = { | ||
| 144 | (unsigned short *) PORTF_MUX, | ||
| 145 | (unsigned short *) PORTG_MUX, | ||
| 146 | (unsigned short *) PORTH_MUX, | ||
| 147 | }; | ||
| 148 | |||
| 149 | static const | ||
| 150 | u8 pmux_offset[][16] = | ||
| 151 | {{ 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 4, 6, 8, 8, 10, 10 }, /* PORTF */ | ||
| 152 | { 0, 0, 0, 0, 0, 2, 2, 4, 4, 6, 8, 10, 10, 10, 12, 12 }, /* PORTG */ | ||
| 153 | { 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 4, 4, 4, 4, 4, 4 }, /* PORTH */ | ||
| 154 | }; | ||
| 155 | #endif | ||
| 156 | |||
| 142 | #ifdef BF561_FAMILY | 157 | #ifdef BF561_FAMILY |
| 143 | static struct gpio_port_t *gpio_bankb[gpio_bank(MAX_BLACKFIN_GPIOS)] = { | 158 | static struct gpio_port_t *gpio_bankb[gpio_bank(MAX_BLACKFIN_GPIOS)] = { |
| 144 | (struct gpio_port_t *) FIO0_FLAG_D, | 159 | (struct gpio_port_t *) FIO0_FLAG_D, |
| @@ -186,6 +201,10 @@ static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG_INTB | |||
| 186 | static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG_INTB, IRQ_PORTG_INTB, IRQ_MAC_TX}; | 201 | static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG_INTB, IRQ_PORTG_INTB, IRQ_MAC_TX}; |
| 187 | #endif | 202 | #endif |
| 188 | 203 | ||
| 204 | #ifdef BF527_FAMILY | ||
| 205 | static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PORTF_INTB, IRQ_PORTG_INTB, IRQ_PORTH_INTB}; | ||
| 206 | #endif | ||
| 207 | |||
| 189 | #ifdef BF561_FAMILY | 208 | #ifdef BF561_FAMILY |
| 190 | static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG0_INTB, IRQ_PROG1_INTB, IRQ_PROG2_INTB}; | 209 | static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG0_INTB, IRQ_PROG1_INTB, IRQ_PROG2_INTB}; |
| 191 | #endif | 210 | #endif |
| @@ -238,7 +257,7 @@ static int cmp_label(unsigned short ident, const char *label) | |||
| 238 | return -EINVAL; | 257 | return -EINVAL; |
| 239 | } | 258 | } |
| 240 | 259 | ||
| 241 | #ifdef BF537_FAMILY | 260 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) |
| 242 | static void port_setup(unsigned short gpio, unsigned short usage) | 261 | static void port_setup(unsigned short gpio, unsigned short usage) |
| 243 | { | 262 | { |
| 244 | if (!check_gpio(gpio)) { | 263 | if (!check_gpio(gpio)) { |
| @@ -354,6 +373,18 @@ inline u16 get_portmux(unsigned short portno) | |||
| 354 | 373 | ||
| 355 | return (pmux >> (2 * gpio_sub_n(portno)) & 0x3); | 374 | return (pmux >> (2 * gpio_sub_n(portno)) & 0x3); |
| 356 | } | 375 | } |
| 376 | #elif defined(BF527_FAMILY) | ||
| 377 | inline void portmux_setup(unsigned short portno, unsigned short function) | ||
| 378 | { | ||
| 379 | u16 pmux, ident = P_IDENT(portno); | ||
| 380 | u8 offset = pmux_offset[gpio_bank(ident)][gpio_sub_n(ident)]; | ||
| 381 | |||
| 382 | pmux = *port_mux[gpio_bank(ident)]; | ||
| 383 | pmux &= ~(3 << offset); | ||
| 384 | pmux |= (function & 3) << offset; | ||
| 385 | *port_mux[gpio_bank(ident)] = pmux; | ||
| 386 | SSYNC(); | ||
| 387 | } | ||
| 357 | #else | 388 | #else |
| 358 | # define portmux_setup(...) do { } while (0) | 389 | # define portmux_setup(...) do { } while (0) |
| 359 | #endif | 390 | #endif |
diff --git a/arch/blackfin/kernel/gptimers.c b/arch/blackfin/kernel/gptimers.c new file mode 100644 index 000000000000..cb7ba9bfc79c --- /dev/null +++ b/arch/blackfin/kernel/gptimers.c | |||
| @@ -0,0 +1,250 @@ | |||
| 1 | /* | ||
| 2 | * bfin_gptimers.c - derived from bf53x_timers.c | ||
| 3 | * Driver for General Purpose Timer functions on the Blackfin processor | ||
| 4 | * | ||
| 5 | * Copyright (C) 2005 John DeHority | ||
| 6 | * Copyright (C) 2006 Hella Aglaia GmbH (awe@aglaia-gmbh.de) | ||
| 7 | * | ||
| 8 | * Licensed under the GPLv2. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #include <linux/kernel.h> | ||
| 12 | #include <linux/module.h> | ||
| 13 | |||
| 14 | #include <asm/io.h> | ||
| 15 | #include <asm/blackfin.h> | ||
| 16 | #include <asm/gptimers.h> | ||
| 17 | |||
| 18 | #ifdef DEBUG | ||
| 19 | # define tassert(expr) | ||
| 20 | #else | ||
| 21 | # define tassert(expr) \ | ||
| 22 | if (!(expr)) \ | ||
| 23 | printk(KERN_DEBUG "%s:%s:%i: Assertion failed: " #expr "\n", \ | ||
| 24 | __FILE__, __func__, __LINE__); | ||
| 25 | #endif | ||
| 26 | |||
| 27 | #define BFIN_TIMER_NUM_GROUP (BFIN_TIMER_OCTET(MAX_BLACKFIN_GPTIMERS - 1) + 1) | ||
| 28 | |||
| 29 | typedef struct { | ||
| 30 | uint16_t config; | ||
| 31 | uint16_t __pad; | ||
| 32 | uint32_t counter; | ||
| 33 | uint32_t period; | ||
| 34 | uint32_t width; | ||
| 35 | } GPTIMER_timer_regs; | ||
| 36 | |||
| 37 | typedef struct { | ||
| 38 | uint16_t enable; | ||
| 39 | uint16_t __pad0; | ||
| 40 | uint16_t disable; | ||
| 41 | uint16_t __pad1; | ||
| 42 | uint32_t status; | ||
| 43 | } GPTIMER_group_regs; | ||
| 44 | |||
| 45 | static volatile GPTIMER_timer_regs *const timer_regs[MAX_BLACKFIN_GPTIMERS] = | ||
| 46 | { | ||
| 47 | (GPTIMER_timer_regs *)TIMER0_CONFIG, | ||
| 48 | (GPTIMER_timer_regs *)TIMER1_CONFIG, | ||
| 49 | (GPTIMER_timer_regs *)TIMER2_CONFIG, | ||
| 50 | #if (MAX_BLACKFIN_GPTIMERS > 3) | ||
| 51 | (GPTIMER_timer_regs *)TIMER3_CONFIG, | ||
| 52 | (GPTIMER_timer_regs *)TIMER4_CONFIG, | ||
| 53 | (GPTIMER_timer_regs *)TIMER5_CONFIG, | ||
| 54 | (GPTIMER_timer_regs *)TIMER6_CONFIG, | ||
| 55 | (GPTIMER_timer_regs *)TIMER7_CONFIG, | ||
| 56 | #endif | ||
| 57 | #if (MAX_BLACKFIN_GPTIMERS > 8) | ||
| 58 | (GPTIMER_timer_regs *)TIMER8_CONFIG, | ||
| 59 | (GPTIMER_timer_regs *)TIMER9_CONFIG, | ||
| 60 | (GPTIMER_timer_regs *)TIMER10_CONFIG, | ||
| 61 | (GPTIMER_timer_regs *)TIMER11_CONFIG, | ||
| 62 | #endif | ||
| 63 | }; | ||
| 64 | |||
| 65 | static volatile GPTIMER_group_regs *const group_regs[BFIN_TIMER_NUM_GROUP] = | ||
| 66 | { | ||
| 67 | (GPTIMER_group_regs *)TIMER0_GROUP_REG, | ||
| 68 | #if (MAX_BLACKFIN_GPTIMERS > 8) | ||
| 69 | (GPTIMER_group_regs *)TIMER8_GROUP_REG, | ||
| 70 | #endif | ||
| 71 | }; | ||
| 72 | |||
| 73 | static uint32_t const dis_mask[MAX_BLACKFIN_GPTIMERS] = | ||
| 74 | { | ||
| 75 | TIMER_STATUS_TRUN0, | ||
| 76 | TIMER_STATUS_TRUN1, | ||
| 77 | TIMER_STATUS_TRUN2, | ||
| 78 | #if (MAX_BLACKFIN_GPTIMERS > 3) | ||
| 79 | TIMER_STATUS_TRUN3, | ||
| 80 | TIMER_STATUS_TRUN4, | ||
| 81 | TIMER_STATUS_TRUN5, | ||
| 82 | TIMER_STATUS_TRUN6, | ||
| 83 | TIMER_STATUS_TRUN7, | ||
| 84 | #endif | ||
| 85 | #if (MAX_BLACKFIN_GPTIMERS > 8) | ||
| 86 | TIMER_STATUS_TRUN8, | ||
| 87 | TIMER_STATUS_TRUN9, | ||
| 88 | TIMER_STATUS_TRUN10, | ||
| 89 | TIMER_STATUS_TRUN11, | ||
| 90 | #endif | ||
| 91 | }; | ||
| 92 | |||
| 93 | static uint32_t const irq_mask[MAX_BLACKFIN_GPTIMERS] = | ||
| 94 | { | ||
| 95 | TIMER_STATUS_TIMIL0, | ||
| 96 | TIMER_STATUS_TIMIL1, | ||
| 97 | TIMER_STATUS_TIMIL2, | ||
| 98 | #if (MAX_BLACKFIN_GPTIMERS > 3) | ||
| 99 | TIMER_STATUS_TIMIL3, | ||
| 100 | TIMER_STATUS_TIMIL4, | ||
| 101 | TIMER_STATUS_TIMIL5, | ||
| 102 | TIMER_STATUS_TIMIL6, | ||
| 103 | TIMER_STATUS_TIMIL7, | ||
| 104 | #endif | ||
| 105 | #if (MAX_BLACKFIN_GPTIMERS > 8) | ||
| 106 | TIMER_STATUS_TIMIL8, | ||
| 107 | TIMER_STATUS_TIMIL9, | ||
| 108 | TIMER_STATUS_TIMIL10, | ||
| 109 | TIMER_STATUS_TIMIL11, | ||
| 110 | #endif | ||
| 111 | }; | ||
| 112 | |||
| 113 | void set_gptimer_pwidth(int timer_id, uint32_t value) | ||
| 114 | { | ||
| 115 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | ||
| 116 | timer_regs[timer_id]->width = value; | ||
| 117 | SSYNC(); | ||
| 118 | } | ||
| 119 | EXPORT_SYMBOL(set_gptimer_pwidth); | ||
| 120 | |||
| 121 | uint32_t get_gptimer_pwidth(int timer_id) | ||
| 122 | { | ||
| 123 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | ||
| 124 | return timer_regs[timer_id]->width; | ||
| 125 | } | ||
| 126 | EXPORT_SYMBOL(get_gptimer_pwidth); | ||
| 127 | |||
| 128 | void set_gptimer_period(int timer_id, uint32_t period) | ||
| 129 | { | ||
| 130 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | ||
| 131 | timer_regs[timer_id]->period = period; | ||
| 132 | SSYNC(); | ||
| 133 | } | ||
| 134 | EXPORT_SYMBOL(set_gptimer_period); | ||
| 135 | |||
| 136 | uint32_t get_gptimer_period(int timer_id) | ||
| 137 | { | ||
| 138 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | ||
| 139 | return timer_regs[timer_id]->period; | ||
| 140 | } | ||
| 141 | EXPORT_SYMBOL(get_gptimer_period); | ||
| 142 | |||
| 143 | uint32_t get_gptimer_count(int timer_id) | ||
| 144 | { | ||
| 145 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | ||
| 146 | return timer_regs[timer_id]->counter; | ||
| 147 | } | ||
| 148 | EXPORT_SYMBOL(get_gptimer_count); | ||
| 149 | |||
| 150 | uint32_t get_gptimer_status(int group) | ||
| 151 | { | ||
| 152 | tassert(group < BFIN_TIMER_NUM_GROUP); | ||
| 153 | return group_regs[group]->status; | ||
| 154 | } | ||
| 155 | EXPORT_SYMBOL(get_gptimer_status); | ||
| 156 | |||
| 157 | void set_gptimer_status(int group, uint32_t value) | ||
| 158 | { | ||
| 159 | tassert(group < BFIN_TIMER_NUM_GROUP); | ||
| 160 | group_regs[group]->status = value; | ||
| 161 | SSYNC(); | ||
| 162 | } | ||
| 163 | EXPORT_SYMBOL(set_gptimer_status); | ||
| 164 | |||
| 165 | uint16_t get_gptimer_intr(int timer_id) | ||
| 166 | { | ||
| 167 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | ||
| 168 | return (group_regs[BFIN_TIMER_OCTET(timer_id)]->status & irq_mask[timer_id]) ? 1 : 0; | ||
| 169 | } | ||
| 170 | EXPORT_SYMBOL(get_gptimer_intr); | ||
| 171 | |||
| 172 | void clear_gptimer_intr(int timer_id) | ||
| 173 | { | ||
| 174 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | ||
| 175 | group_regs[BFIN_TIMER_OCTET(timer_id)]->status = irq_mask[timer_id]; | ||
| 176 | } | ||
| 177 | EXPORT_SYMBOL(clear_gptimer_intr); | ||
| 178 | |||
| 179 | void set_gptimer_config(int timer_id, uint16_t config) | ||
| 180 | { | ||
| 181 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | ||
| 182 | timer_regs[timer_id]->config = config; | ||
| 183 | SSYNC(); | ||
| 184 | } | ||
| 185 | EXPORT_SYMBOL(set_gptimer_config); | ||
| 186 | |||
| 187 | uint16_t get_gptimer_config(int timer_id) | ||
| 188 | { | ||
| 189 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | ||
| 190 | return timer_regs[timer_id]->config; | ||
| 191 | } | ||
| 192 | EXPORT_SYMBOL(get_gptimer_config); | ||
| 193 | |||
| 194 | void enable_gptimers(uint16_t mask) | ||
| 195 | { | ||
| 196 | int i; | ||
| 197 | tassert((mask & ~BLACKFIN_GPTIMER_IDMASK) == 0); | ||
| 198 | for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i) { | ||
| 199 | group_regs[i]->enable = mask & 0xFF; | ||
| 200 | mask >>= 8; | ||
| 201 | } | ||
| 202 | SSYNC(); | ||
| 203 | } | ||
| 204 | EXPORT_SYMBOL(enable_gptimers); | ||
| 205 | |||
| 206 | void disable_gptimers(uint16_t mask) | ||
| 207 | { | ||
| 208 | int i; | ||
| 209 | uint16_t m = mask; | ||
| 210 | tassert((mask & ~BLACKFIN_GPTIMER_IDMASK) == 0); | ||
| 211 | for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i) { | ||
| 212 | group_regs[i]->disable = m & 0xFF; | ||
| 213 | m >>= 8; | ||
| 214 | } | ||
| 215 | for (i = 0; i < MAX_BLACKFIN_GPTIMERS; ++i) | ||
| 216 | if (mask & (1 << i)) | ||
| 217 | group_regs[BFIN_TIMER_OCTET(i)]->status |= dis_mask[i]; | ||
| 218 | SSYNC(); | ||
| 219 | } | ||
| 220 | EXPORT_SYMBOL(disable_gptimers); | ||
| 221 | |||
| 222 | void set_gptimer_pulse_hi(int timer_id) | ||
| 223 | { | ||
| 224 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | ||
| 225 | timer_regs[timer_id]->config |= TIMER_PULSE_HI; | ||
| 226 | SSYNC(); | ||
| 227 | } | ||
| 228 | EXPORT_SYMBOL(set_gptimer_pulse_hi); | ||
| 229 | |||
| 230 | void clear_gptimer_pulse_hi(int timer_id) | ||
| 231 | { | ||
| 232 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | ||
| 233 | timer_regs[timer_id]->config &= ~TIMER_PULSE_HI; | ||
| 234 | SSYNC(); | ||
| 235 | } | ||
| 236 | EXPORT_SYMBOL(clear_gptimer_pulse_hi); | ||
| 237 | |||
| 238 | uint16_t get_enabled_gptimers(void) | ||
| 239 | { | ||
| 240 | int i; | ||
| 241 | uint16_t result = 0; | ||
| 242 | for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i) | ||
| 243 | result |= (group_regs[i]->enable << (i << 3)); | ||
| 244 | return result; | ||
| 245 | } | ||
| 246 | EXPORT_SYMBOL(get_enabled_gptimers); | ||
| 247 | |||
| 248 | MODULE_AUTHOR("Axel Weiss (awe@aglaia-gmbh.de)"); | ||
| 249 | MODULE_DESCRIPTION("Blackfin General Purpose Timers API"); | ||
| 250 | MODULE_LICENSE("GPL"); | ||
diff --git a/arch/blackfin/kernel/reboot.c b/arch/blackfin/kernel/reboot.c index 356078ec462b..ae28aac6fec1 100644 --- a/arch/blackfin/kernel/reboot.c +++ b/arch/blackfin/kernel/reboot.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | #include <asm/reboot.h> | 11 | #include <asm/reboot.h> |
| 12 | #include <asm/system.h> | 12 | #include <asm/system.h> |
| 13 | 13 | ||
| 14 | #if defined(BF537_FAMILY) || defined(BF533_FAMILY) | 14 | #if defined(BF537_FAMILY) || defined(BF533_FAMILY) || defined(BF527_FAMILY) |
| 15 | #define SYSCR_VAL 0x0 | 15 | #define SYSCR_VAL 0x0 |
| 16 | #elif defined(BF561_FAMILY) | 16 | #elif defined(BF561_FAMILY) |
| 17 | #define SYSCR_VAL 0x20 | 17 | #define SYSCR_VAL 0x20 |
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 8dcd76e87ed5..0e746449c29b 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
| @@ -459,7 +459,7 @@ static u_long get_vco(void) | |||
| 459 | return vco; | 459 | return vco; |
| 460 | } | 460 | } |
| 461 | 461 | ||
| 462 | /*Get the Core clock*/ | 462 | /* Get the Core clock */ |
| 463 | u_long get_cclk(void) | 463 | u_long get_cclk(void) |
| 464 | { | 464 | { |
| 465 | u_long csel, ssel; | 465 | u_long csel, ssel; |
| @@ -493,12 +493,24 @@ u_long get_sclk(void) | |||
| 493 | } | 493 | } |
| 494 | EXPORT_SYMBOL(get_sclk); | 494 | EXPORT_SYMBOL(get_sclk); |
| 495 | 495 | ||
| 496 | unsigned long sclk_to_usecs(unsigned long sclk) | ||
| 497 | { | ||
| 498 | return (USEC_PER_SEC * (u64)sclk) / get_sclk(); | ||
| 499 | } | ||
| 500 | EXPORT_SYMBOL(sclk_to_usecs); | ||
| 501 | |||
| 502 | unsigned long usecs_to_sclk(unsigned long usecs) | ||
| 503 | { | ||
| 504 | return get_sclk() / (USEC_PER_SEC * (u64)usecs); | ||
| 505 | } | ||
| 506 | EXPORT_SYMBOL(usecs_to_sclk); | ||
| 507 | |||
| 496 | /* | 508 | /* |
| 497 | * Get CPU information for use by the procfs. | 509 | * Get CPU information for use by the procfs. |
| 498 | */ | 510 | */ |
| 499 | static int show_cpuinfo(struct seq_file *m, void *v) | 511 | static int show_cpuinfo(struct seq_file *m, void *v) |
| 500 | { | 512 | { |
| 501 | char *cpu, *mmu, *fpu, *name; | 513 | char *cpu, *mmu, *fpu, *vendor, *cache; |
| 502 | uint32_t revid; | 514 | uint32_t revid; |
| 503 | 515 | ||
| 504 | u_long cclk = 0, sclk = 0; | 516 | u_long cclk = 0, sclk = 0; |
| @@ -508,70 +520,83 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
| 508 | mmu = "none"; | 520 | mmu = "none"; |
| 509 | fpu = "none"; | 521 | fpu = "none"; |
| 510 | revid = bfin_revid(); | 522 | revid = bfin_revid(); |
| 511 | name = bfin_board_name; | ||
| 512 | 523 | ||
| 513 | cclk = get_cclk(); | 524 | cclk = get_cclk(); |
| 514 | sclk = get_sclk(); | 525 | sclk = get_sclk(); |
| 515 | 526 | ||
| 516 | seq_printf(m, "CPU:\t\tADSP-%s Rev. 0.%d\n" | 527 | switch (bfin_read_CHIPID() & CHIPID_MANUFACTURE) { |
| 517 | "MMU:\t\t%s\n" | 528 | case 0xca: |
| 518 | "FPU:\t\t%s\n" | 529 | vendor = "Analog Devices"; |
| 519 | "Core Clock:\t%9lu Hz\n" | 530 | break; |
| 520 | "System Clock:\t%9lu Hz\n" | 531 | default: |
| 521 | "BogoMips:\t%lu.%02lu\n" | 532 | vendor = "unknown"; |
| 522 | "Calibration:\t%lu loops\n", | 533 | break; |
| 523 | cpu, revid, mmu, fpu, | 534 | } |
| 524 | cclk, | ||
| 525 | sclk, | ||
| 526 | (loops_per_jiffy * HZ) / 500000, | ||
| 527 | ((loops_per_jiffy * HZ) / 5000) % 100, | ||
| 528 | (loops_per_jiffy * HZ)); | ||
| 529 | seq_printf(m, "Board Name:\t%s\n", name); | ||
| 530 | seq_printf(m, "Board Memory:\t%ld MB\n", physical_mem_end >> 20); | ||
| 531 | seq_printf(m, "Kernel Memory:\t%ld MB\n", (unsigned long)_ramend >> 20); | ||
| 532 | if (bfin_read_IMEM_CONTROL() & (ENICPLB | IMC)) | ||
| 533 | seq_printf(m, "I-CACHE:\tON\n"); | ||
| 534 | else | ||
| 535 | seq_printf(m, "I-CACHE:\tOFF\n"); | ||
| 536 | if ((bfin_read_DMEM_CONTROL()) & (ENDCPLB | DMC_ENABLE)) | ||
| 537 | seq_printf(m, "D-CACHE:\tON" | ||
| 538 | #if defined CONFIG_BFIN_WB | ||
| 539 | " (write-back)" | ||
| 540 | #elif defined CONFIG_BFIN_WT | ||
| 541 | " (write-through)" | ||
| 542 | #endif | ||
| 543 | "\n"); | ||
| 544 | else | ||
| 545 | seq_printf(m, "D-CACHE:\tOFF\n"); | ||
| 546 | |||
| 547 | 535 | ||
| 536 | seq_printf(m, "processor\t: %d\n" | ||
| 537 | "vendor_id\t: %s\n" | ||
| 538 | "cpu family\t: 0x%x\n" | ||
| 539 | "model name\t: ADSP-%s %lu(MHz CCLK) %lu(MHz SCLK)\n" | ||
| 540 | "stepping\t: %d\n", | ||
| 541 | 0, | ||
| 542 | vendor, | ||
| 543 | (bfin_read_CHIPID() & CHIPID_FAMILY), | ||
| 544 | cpu, cclk/1000000, sclk/1000000, | ||
| 545 | revid); | ||
| 546 | |||
| 547 | seq_printf(m, "cpu MHz\t\t: %lu.%03lu/%lu.%03lu\n", | ||
| 548 | cclk/1000000, cclk%1000000, | ||
| 549 | sclk/1000000, sclk%1000000); | ||
| 550 | seq_printf(m, "bogomips\t: %lu.%02lu\n" | ||
| 551 | "Calibration\t: %lu loops\n", | ||
| 552 | (loops_per_jiffy * HZ) / 500000, | ||
| 553 | ((loops_per_jiffy * HZ) / 5000) % 100, | ||
| 554 | (loops_per_jiffy * HZ)); | ||
| 555 | |||
| 556 | /* Check Cache configutation */ | ||
| 548 | switch (bfin_read_DMEM_CONTROL() & (1 << DMC0_P | 1 << DMC1_P)) { | 557 | switch (bfin_read_DMEM_CONTROL() & (1 << DMC0_P | 1 << DMC1_P)) { |
| 549 | case ACACHE_BSRAM: | 558 | case ACACHE_BSRAM: |
| 550 | seq_printf(m, "DBANK-A:\tCACHE\n" "DBANK-B:\tSRAM\n"); | 559 | cache = "dbank-A/B\t: cache/sram"; |
| 551 | dcache_size = 16; | 560 | dcache_size = 16; |
| 552 | dsup_banks = 1; | 561 | dsup_banks = 1; |
| 553 | break; | 562 | break; |
| 554 | case ACACHE_BCACHE: | 563 | case ACACHE_BCACHE: |
| 555 | seq_printf(m, "DBANK-A:\tCACHE\n" "DBANK-B:\tCACHE\n"); | 564 | cache = "dbank-A/B\t: cache/cache"; |
| 556 | dcache_size = 32; | 565 | dcache_size = 32; |
| 557 | dsup_banks = 2; | 566 | dsup_banks = 2; |
| 558 | break; | 567 | break; |
| 559 | case ASRAM_BSRAM: | 568 | case ASRAM_BSRAM: |
| 560 | seq_printf(m, "DBANK-A:\tSRAM\n" "DBANK-B:\tSRAM\n"); | 569 | cache = "dbank-A/B\t: sram/sram"; |
| 561 | dcache_size = 0; | 570 | dcache_size = 0; |
| 562 | dsup_banks = 0; | 571 | dsup_banks = 0; |
| 563 | break; | 572 | break; |
| 564 | default: | 573 | default: |
| 574 | cache = "unknown"; | ||
| 575 | dcache_size = 0; | ||
| 576 | dsup_banks = 0; | ||
| 565 | break; | 577 | break; |
| 566 | } | 578 | } |
| 567 | 579 | ||
| 580 | /* Is it turned on? */ | ||
| 581 | if (!((bfin_read_DMEM_CONTROL()) & (ENDCPLB | DMC_ENABLE))) | ||
| 582 | dcache_size = 0; | ||
| 568 | 583 | ||
| 569 | seq_printf(m, "I-CACHE Size:\t%dKB\n", BFIN_ICACHESIZE / 1024); | 584 | seq_printf(m, "cache size\t: %d KB(L1 icache) " |
| 570 | seq_printf(m, "D-CACHE Size:\t%dKB\n", dcache_size); | 585 | "%d KB(L1 dcache-%s) %d KB(L2 cache)\n", |
| 571 | seq_printf(m, "I-CACHE Setup:\t%d Sub-banks/%d Ways, %d Lines/Way\n", | 586 | BFIN_ICACHESIZE / 1024, dcache_size, |
| 587 | #if defined CONFIG_BFIN_WB | ||
| 588 | "wb" | ||
| 589 | #elif defined CONFIG_BFIN_WT | ||
| 590 | "wt" | ||
| 591 | #endif | ||
| 592 | , 0); | ||
| 593 | |||
| 594 | seq_printf(m, "%s\n", cache); | ||
| 595 | |||
| 596 | seq_printf(m, "icache setup\t: %d Sub-banks/%d Ways, %d Lines/Way\n", | ||
| 572 | BFIN_ISUBBANKS, BFIN_IWAYS, BFIN_ILINES); | 597 | BFIN_ISUBBANKS, BFIN_IWAYS, BFIN_ILINES); |
| 573 | seq_printf(m, | 598 | seq_printf(m, |
| 574 | "D-CACHE Setup:\t%d Super-banks/%d Sub-banks/%d Ways, %d Lines/Way\n", | 599 | "dcache setup\t: %d Super-banks/%d Sub-banks/%d Ways, %d Lines/Way\n", |
| 575 | dsup_banks, BFIN_DSUBBANKS, BFIN_DWAYS, | 600 | dsup_banks, BFIN_DSUBBANKS, BFIN_DWAYS, |
| 576 | BFIN_DLINES); | 601 | BFIN_DLINES); |
| 577 | #ifdef CONFIG_BFIN_ICACHE_LOCK | 602 | #ifdef CONFIG_BFIN_ICACHE_LOCK |
| @@ -625,6 +650,15 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
| 625 | seq_printf(m, "No Ways are locked\n"); | 650 | seq_printf(m, "No Ways are locked\n"); |
| 626 | } | 651 | } |
| 627 | #endif | 652 | #endif |
| 653 | |||
| 654 | seq_printf(m, "board name\t: %s\n", bfin_board_name); | ||
| 655 | seq_printf(m, "board memory\t: %ld kB (0x%p -> 0x%p)\n", | ||
| 656 | physical_mem_end >> 10, (void *)0, (void *)physical_mem_end); | ||
| 657 | seq_printf(m, "kernel memory\t: %d kB (0x%p -> 0x%p)\n", | ||
| 658 | ((int)memory_end - (int)_stext) >> 10, | ||
| 659 | _stext, | ||
| 660 | (void *)memory_end); | ||
| 661 | |||
| 628 | return 0; | 662 | return 0; |
| 629 | } | 663 | } |
| 630 | 664 | ||
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 8823e9ade584..afd044e78af6 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
| @@ -118,12 +118,14 @@ static int printk_address(unsigned long address) | |||
| 118 | offset = (address - vma->vm_start) + (vma->vm_pgoff << PAGE_SHIFT); | 118 | offset = (address - vma->vm_start) + (vma->vm_pgoff << PAGE_SHIFT); |
| 119 | 119 | ||
| 120 | write_unlock_irq(&tasklist_lock); | 120 | write_unlock_irq(&tasklist_lock); |
| 121 | mmput(mm); | ||
| 121 | return printk("<0x%p> [ %s + 0x%lx ]", | 122 | return printk("<0x%p> [ %s + 0x%lx ]", |
| 122 | (void *)address, name, offset); | 123 | (void *)address, name, offset); |
| 123 | } | 124 | } |
| 124 | 125 | ||
| 125 | vml = vml->next; | 126 | vml = vml->next; |
| 126 | } | 127 | } |
| 128 | mmput(mm); | ||
| 127 | } | 129 | } |
| 128 | write_unlock_irq(&tasklist_lock); | 130 | write_unlock_irq(&tasklist_lock); |
| 129 | 131 | ||
diff --git a/arch/blackfin/lib/Makefile b/arch/blackfin/lib/Makefile index 635288fc5f54..bfdad52c570b 100644 --- a/arch/blackfin/lib/Makefile +++ b/arch/blackfin/lib/Makefile | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | lib-y := \ | 5 | lib-y := \ |
| 6 | ashldi3.o ashrdi3.o lshrdi3.o \ | 6 | ashldi3.o ashrdi3.o lshrdi3.o \ |
| 7 | muldi3.o divsi3.o udivsi3.o modsi3.o umodsi3.o \ | 7 | muldi3.o divsi3.o udivsi3.o udivdi3.o modsi3.o umodsi3.o \ |
| 8 | checksum.o memcpy.o memset.o memcmp.o memchr.o memmove.o \ | 8 | checksum.o memcpy.o memset.o memcmp.o memchr.o memmove.o \ |
| 9 | strcmp.o strcpy.o strncmp.o strncpy.o \ | 9 | strcmp.o strcpy.o strncmp.o strncpy.o \ |
| 10 | umulsi3_highpart.o smulsi3_highpart.o \ | 10 | umulsi3_highpart.o smulsi3_highpart.o \ |
diff --git a/arch/blackfin/lib/udivdi3.S b/arch/blackfin/lib/udivdi3.S new file mode 100644 index 000000000000..ad1ebee675e1 --- /dev/null +++ b/arch/blackfin/lib/udivdi3.S | |||
| @@ -0,0 +1,375 @@ | |||
| 1 | /* | ||
| 2 | * udivdi3.S - unsigned long long division | ||
| 3 | * | ||
| 4 | * Copyright 2003-2007 Analog Devices Inc. | ||
| 5 | * Enter bugs at http://blackfin.uclinux.org/ | ||
| 6 | * | ||
| 7 | * Licensed under the GPLv2 or later. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #include <linux/linkage.h> | ||
| 11 | |||
| 12 | #define CARRY AC0 | ||
| 13 | |||
| 14 | #ifdef CONFIG_ARITHMETIC_OPS_L1 | ||
| 15 | .section .l1.text | ||
| 16 | #else | ||
| 17 | .text | ||
| 18 | #endif | ||
| 19 | |||
| 20 | |||
| 21 | ENTRY(___udivdi3) | ||
| 22 | R3 = [SP + 12]; | ||
| 23 | [--SP] = (R7:4, P5:3); | ||
| 24 | |||
| 25 | /* Attempt to use divide primitive first; these will handle | ||
| 26 | ** most cases, and they're quick - avoids stalls incurred by | ||
| 27 | ** testing for identities. | ||
| 28 | */ | ||
| 29 | |||
| 30 | R4 = R2 | R3; | ||
| 31 | CC = R4 == 0; | ||
| 32 | IF CC JUMP .LDIV_BY_ZERO; | ||
| 33 | |||
| 34 | R4.H = 0x8000; | ||
| 35 | R4 >>>= 16; // R4 now 0xFFFF8000 | ||
| 36 | R5 = R0 | R2; // If either dividend or | ||
| 37 | R4 = R5 & R4; // divisor have bits in | ||
| 38 | CC = R4; // top half or low half's sign | ||
| 39 | IF CC JUMP .LIDENTS; // bit, skip builtins. | ||
| 40 | R4 = R1 | R3; // Also check top halves | ||
| 41 | CC = R4; | ||
| 42 | IF CC JUMP .LIDENTS; | ||
| 43 | |||
| 44 | /* Can use the builtins. */ | ||
| 45 | |||
| 46 | AQ = CC; // Clear AQ (CC==0) | ||
| 47 | DIVQ(R0, R2); | ||
| 48 | DIVQ(R0, R2); | ||
| 49 | DIVQ(R0, R2); | ||
| 50 | DIVQ(R0, R2); | ||
| 51 | DIVQ(R0, R2); | ||
| 52 | DIVQ(R0, R2); | ||
| 53 | DIVQ(R0, R2); | ||
| 54 | DIVQ(R0, R2); | ||
| 55 | DIVQ(R0, R2); | ||
| 56 | DIVQ(R0, R2); | ||
| 57 | DIVQ(R0, R2); | ||
| 58 | DIVQ(R0, R2); | ||
| 59 | DIVQ(R0, R2); | ||
| 60 | DIVQ(R0, R2); | ||
| 61 | DIVQ(R0, R2); | ||
| 62 | DIVQ(R0, R2); | ||
| 63 | DIVQ(R0, R2); | ||
| 64 | R0 = R0.L (Z); | ||
| 65 | R1 = 0; | ||
| 66 | (R7:4, P5:3) = [SP++]; | ||
| 67 | RTS; | ||
| 68 | |||
| 69 | .LIDENTS: | ||
| 70 | /* Test for common identities. Value to be returned is | ||
| 71 | ** placed in R6,R7. | ||
| 72 | */ | ||
| 73 | // Check for 0/y, return 0 | ||
| 74 | R4 = R0 | R1; | ||
| 75 | CC = R4 == 0; | ||
| 76 | IF CC JUMP .LRETURN_R0; | ||
| 77 | |||
| 78 | // Check for x/x, return 1 | ||
| 79 | R6 = R0 - R2; // If x == y, then both R6 and R7 will be zero | ||
| 80 | R7 = R1 - R3; | ||
| 81 | R4 = R6 | R7; // making R4 zero. | ||
| 82 | R6 += 1; // which would now make R6:R7==1. | ||
| 83 | CC = R4 == 0; | ||
| 84 | IF CC JUMP .LRETURN_IDENT; | ||
| 85 | |||
| 86 | // Check for x/1, return x | ||
| 87 | R6 = R0; | ||
| 88 | R7 = R1; | ||
| 89 | CC = R3 == 0; | ||
| 90 | IF !CC JUMP .Lnexttest; | ||
| 91 | CC = R2 == 1; | ||
| 92 | IF CC JUMP .LRETURN_IDENT; | ||
| 93 | |||
| 94 | .Lnexttest: | ||
| 95 | R4.L = ONES R2; // check for div by power of two which | ||
| 96 | R5.L = ONES R3; // can be done using a shift | ||
| 97 | R6 = PACK (R5.L, R4.L); | ||
| 98 | CC = R6 == 1; | ||
| 99 | IF CC JUMP .Lpower_of_two_upper_zero; | ||
| 100 | R6 = PACK (R4.L, R5.L); | ||
| 101 | CC = R6 == 1; | ||
| 102 | IF CC JUMP .Lpower_of_two_lower_zero; | ||
| 103 | |||
| 104 | // Check for x < y, return 0 | ||
| 105 | R6 = 0; | ||
| 106 | R7 = R6; | ||
| 107 | CC = R1 < R3 (IU); | ||
| 108 | IF CC JUMP .LRETURN_IDENT; | ||
| 109 | CC = R1 == R3; | ||
| 110 | IF !CC JUMP .Lno_idents; | ||
| 111 | CC = R0 < R2 (IU); | ||
| 112 | IF CC JUMP .LRETURN_IDENT; | ||
| 113 | |||
| 114 | .Lno_idents: // Idents don't match. Go for the full operation | ||
| 115 | |||
| 116 | |||
| 117 | // If X, or X and Y have high bit set, it'll affect the | ||
| 118 | // results, so shift right one to stop this. Note: we've already | ||
| 119 | // checked that X >= Y, so Y's msb won't be set unless X's | ||
| 120 | // is. | ||
| 121 | |||
| 122 | R4 = 0; | ||
| 123 | CC = R1 < 0; | ||
| 124 | IF !CC JUMP .Lx_msb_clear; | ||
| 125 | CC = !CC; // 1 -> 0; | ||
| 126 | R1 = ROT R1 BY -1; // Shift X >> 1 | ||
| 127 | R0 = ROT R0 BY -1; // lsb -> CC | ||
| 128 | BITSET(R4,31); // to record only x msb was set | ||
| 129 | CC = R3 < 0; | ||
| 130 | IF !CC JUMP .Ly_msb_clear; | ||
| 131 | CC = !CC; | ||
| 132 | R3 = ROT R3 BY -1; // Shift Y >> 1 | ||
| 133 | R2 = ROT R2 BY -1; | ||
| 134 | BITCLR(R4,31); // clear bit to record only x msb was set | ||
| 135 | |||
| 136 | .Ly_msb_clear: | ||
| 137 | .Lx_msb_clear: | ||
| 138 | // Bit 31 in R4 indicates X msb set, but Y msb wasn't, and no bits | ||
| 139 | // were lost, so we should shift result left by one. | ||
| 140 | |||
| 141 | [--SP] = R4; // save for later | ||
| 142 | |||
| 143 | // In the loop that follows, each iteration we add | ||
| 144 | // either Y' or -Y' to the Remainder. We compute the | ||
| 145 | // negated Y', and store, for convenience. Y' goes | ||
| 146 | // into P0:P1, while -Y' goes into P2:P3. | ||
| 147 | |||
| 148 | P0 = R2; | ||
| 149 | P1 = R3; | ||
| 150 | R2 = -R2; | ||
| 151 | CC = CARRY; | ||
| 152 | CC = !CC; | ||
| 153 | R4 = CC; | ||
| 154 | R3 = -R3; | ||
| 155 | R3 = R3 - R4; | ||
| 156 | |||
| 157 | R6 = 0; // remainder = 0 | ||
| 158 | R7 = R6; | ||
| 159 | |||
| 160 | [--SP] = R2; P2 = SP; | ||
| 161 | [--SP] = R3; P3 = SP; | ||
| 162 | [--SP] = R6; P5 = SP; // AQ = 0 | ||
| 163 | [--SP] = P1; | ||
| 164 | |||
| 165 | /* In the loop that follows, we use the following | ||
| 166 | ** register assignments: | ||
| 167 | ** R0,R1 X, workspace | ||
| 168 | ** R2,R3 Y, workspace | ||
| 169 | ** R4,R5 partial Div | ||
| 170 | ** R6,R7 partial remainder | ||
| 171 | ** P5 AQ | ||
| 172 | ** The remainder and div form a 128-bit number, with | ||
| 173 | ** the remainder in the high 64-bits. | ||
| 174 | */ | ||
| 175 | R4 = R0; // Div = X' | ||
| 176 | R5 = R1; | ||
| 177 | R3 = 0; | ||
| 178 | |||
| 179 | P4 = 64; // Iterate once per bit | ||
| 180 | LSETUP(.LULST,.LULEND) LC0 = P4; | ||
| 181 | .LULST: | ||
| 182 | /* Shift Div and remainder up by one. The bit shifted | ||
| 183 | ** out of the top of the quotient is shifted into the bottom | ||
| 184 | ** of the remainder. | ||
| 185 | */ | ||
| 186 | CC = R3; | ||
| 187 | R4 = ROT R4 BY 1; | ||
| 188 | R5 = ROT R5 BY 1 || // low q to high q | ||
| 189 | R2 = [P5]; // load saved AQ | ||
| 190 | R6 = ROT R6 BY 1 || // high q to low r | ||
| 191 | R0 = [P2]; // load -Y' | ||
| 192 | R7 = ROT R7 BY 1 || // low r to high r | ||
| 193 | R1 = [P3]; | ||
| 194 | |||
| 195 | // Assume add -Y' | ||
| 196 | CC = R2 < 0; // But if AQ is set... | ||
| 197 | IF CC R0 = P0; // then add Y' instead | ||
| 198 | IF CC R1 = P1; | ||
| 199 | |||
| 200 | R6 = R6 + R0; // Rem += (Y' or -Y') | ||
| 201 | CC = CARRY; | ||
| 202 | R0 = CC; | ||
| 203 | R7 = R7 + R1; | ||
| 204 | R7 = R7 + R0 (NS) || | ||
| 205 | R1 = [SP]; | ||
| 206 | // Set the next AQ bit | ||
| 207 | R1 = R7 ^ R1; // from Remainder and Y' | ||
| 208 | R1 = R1 >> 31 || // Negate AQ's value, and | ||
| 209 | [P5] = R1; // save next AQ | ||
| 210 | BITTGL(R1, 0); // add neg AQ to the Div | ||
| 211 | .LULEND: R4 = R4 + R1; | ||
| 212 | |||
| 213 | R6 = [SP + 16]; | ||
| 214 | |||
| 215 | R0 = R4; | ||
| 216 | R1 = R5; | ||
| 217 | CC = BITTST(R6,30); // Just set CC=0 | ||
| 218 | R4 = ROT R0 BY 1; // but if we had to shift X, | ||
| 219 | R5 = ROT R1 BY 1; // and didn't shift any bits out, | ||
| 220 | CC = BITTST(R6,31); // then the result will be half as | ||
| 221 | IF CC R0 = R4; // much as required, so shift left | ||
| 222 | IF CC R1 = R5; // one space. | ||
| 223 | |||
| 224 | SP += 20; | ||
| 225 | (R7:4, P5:3) = [SP++]; | ||
| 226 | RTS; | ||
| 227 | |||
| 228 | .Lpower_of_two: | ||
| 229 | /* Y has a single bit set, which means it's a power of two. | ||
| 230 | ** That means we can perform the division just by shifting | ||
| 231 | ** X to the right the appropriate number of bits | ||
| 232 | */ | ||
| 233 | |||
| 234 | /* signbits returns the number of sign bits, minus one. | ||
| 235 | ** 1=>30, 2=>29, ..., 0x40000000=>0. Which means we need | ||
| 236 | ** to shift right n-signbits spaces. It also means 0x80000000 | ||
| 237 | ** is a special case, because that *also* gives a signbits of 0 | ||
| 238 | */ | ||
| 239 | .Lpower_of_two_lower_zero: | ||
| 240 | R7 = 0; | ||
| 241 | R6 = R1 >> 31; | ||
| 242 | CC = R3 < 0; | ||
| 243 | IF CC JUMP .LRETURN_IDENT; | ||
| 244 | |||
| 245 | R2.L = SIGNBITS R3; | ||
| 246 | R2 = R2.L (Z); | ||
| 247 | R2 += -62; | ||
| 248 | (R7:4, P5:3) = [SP++]; | ||
| 249 | JUMP ___lshftli; | ||
| 250 | |||
| 251 | .Lpower_of_two_upper_zero: | ||
| 252 | CC = R2 < 0; | ||
| 253 | IF CC JUMP .Lmaxint_shift; | ||
| 254 | |||
| 255 | R2.L = SIGNBITS R2; | ||
| 256 | R2 = R2.L (Z); | ||
| 257 | R2 += -30; | ||
| 258 | (R7:4, P5:3) = [SP++]; | ||
| 259 | JUMP ___lshftli; | ||
| 260 | |||
| 261 | .Lmaxint_shift: | ||
| 262 | R2 = -31; | ||
| 263 | (R7:4, P5:3) = [SP++]; | ||
| 264 | JUMP ___lshftli; | ||
| 265 | |||
| 266 | .LRETURN_IDENT: | ||
| 267 | R0 = R6; | ||
| 268 | R1 = R7; | ||
| 269 | .LRETURN_R0: | ||
| 270 | (R7:4, P5:3) = [SP++]; | ||
| 271 | RTS; | ||
| 272 | .LDIV_BY_ZERO: | ||
| 273 | R0 = ~R2; | ||
| 274 | R1 = R0; | ||
| 275 | (R7:4, P5:3) = [SP++]; | ||
| 276 | RTS; | ||
| 277 | |||
| 278 | ENDPROC(___udivdi3) | ||
| 279 | |||
| 280 | |||
| 281 | ENTRY(___lshftli) | ||
| 282 | CC = R2 == 0; | ||
| 283 | IF CC JUMP .Lfinished; // nothing to do | ||
| 284 | CC = R2 < 0; | ||
| 285 | IF CC JUMP .Lrshift; | ||
| 286 | R3 = 64; | ||
| 287 | CC = R2 < R3; | ||
| 288 | IF !CC JUMP .Lretzero; | ||
| 289 | |||
| 290 | // We're shifting left, and it's less than 64 bits, so | ||
| 291 | // a valid result will be returned. | ||
| 292 | |||
| 293 | R3 >>= 1; // R3 now 32 | ||
| 294 | CC = R2 < R3; | ||
| 295 | |||
| 296 | IF !CC JUMP .Lzerohalf; | ||
| 297 | |||
| 298 | // We're shifting left, between 1 and 31 bits, which means | ||
| 299 | // some of the low half will be shifted into the high half. | ||
| 300 | // Work out how much. | ||
| 301 | |||
| 302 | R3 = R3 - R2; | ||
| 303 | |||
| 304 | // Save that much data from the bottom half. | ||
| 305 | |||
| 306 | P1 = R7; | ||
| 307 | R7 = R0; | ||
| 308 | R7 >>= R3; | ||
| 309 | |||
| 310 | // Adjust both parts of the parameter. | ||
| 311 | |||
| 312 | R0 <<= R2; | ||
| 313 | R1 <<= R2; | ||
| 314 | |||
| 315 | // And include the bits moved across. | ||
| 316 | |||
| 317 | R1 = R1 | R7; | ||
| 318 | R7 = P1; | ||
| 319 | RTS; | ||
| 320 | |||
| 321 | .Lzerohalf: | ||
| 322 | // We're shifting left, between 32 and 63 bits, so the | ||
| 323 | // bottom half will become zero, and the top half will | ||
| 324 | // lose some bits. How many? | ||
| 325 | |||
| 326 | R2 = R2 - R3; // N - 32 | ||
| 327 | R1 = LSHIFT R0 BY R2.L; | ||
| 328 | R0 = R0 - R0; | ||
| 329 | RTS; | ||
| 330 | |||
| 331 | .Lretzero: | ||
| 332 | R0 = R0 - R0; | ||
| 333 | R1 = R0; | ||
| 334 | .Lfinished: | ||
| 335 | RTS; | ||
| 336 | |||
| 337 | .Lrshift: | ||
| 338 | // We're shifting right, but by how much? | ||
| 339 | R2 = -R2; | ||
| 340 | R3 = 64; | ||
| 341 | CC = R2 < R3; | ||
| 342 | IF !CC JUMP .Lretzero; | ||
| 343 | |||
| 344 | // Shifting right less than 64 bits, so some result bits will | ||
| 345 | // be retained. | ||
| 346 | |||
| 347 | R3 >>= 1; // R3 now 32 | ||
| 348 | CC = R2 < R3; | ||
| 349 | IF !CC JUMP .Lsignhalf; | ||
| 350 | |||
| 351 | // Shifting right between 1 and 31 bits, so need to copy | ||
| 352 | // data across words. | ||
| 353 | |||
| 354 | P1 = R7; | ||
| 355 | R3 = R3 - R2; | ||
| 356 | R7 = R1; | ||
| 357 | R7 <<= R3; | ||
| 358 | R1 >>= R2; | ||
| 359 | R0 >>= R2; | ||
| 360 | R0 = R7 | R0; | ||
| 361 | R7 = P1; | ||
| 362 | RTS; | ||
| 363 | |||
| 364 | .Lsignhalf: | ||
| 365 | // Shifting right between 32 and 63 bits, so the top half | ||
| 366 | // will become all zero-bits, and the bottom half is some | ||
| 367 | // of the top half. But how much? | ||
| 368 | |||
| 369 | R2 = R2 - R3; | ||
| 370 | R0 = R1; | ||
| 371 | R0 >>= R2; | ||
| 372 | R1 = 0; | ||
| 373 | RTS; | ||
| 374 | |||
| 375 | ENDPROC(___lshftli) | ||
diff --git a/arch/blackfin/mach-bf527/Kconfig b/arch/blackfin/mach-bf527/Kconfig new file mode 100644 index 000000000000..50321f723dee --- /dev/null +++ b/arch/blackfin/mach-bf527/Kconfig | |||
| @@ -0,0 +1,251 @@ | |||
| 1 | if (BF52x) | ||
| 2 | |||
| 3 | menu "BF527 Specific Configuration" | ||
| 4 | |||
| 5 | comment "Alternative Multiplexing Scheme" | ||
| 6 | |||
| 7 | choice | ||
| 8 | prompt "SPORT0" | ||
| 9 | default BF527_SPORT0_PORTG | ||
| 10 | help | ||
| 11 | Select PORT used for SPORT0. See Hardware Reference Manual | ||
| 12 | |||
| 13 | config BF527_SPORT0_PORTF | ||
| 14 | bool "PORT F" | ||
| 15 | help | ||
| 16 | PORT F | ||
| 17 | |||
| 18 | config BF527_SPORT0_PORTG | ||
| 19 | bool "PORT G" | ||
| 20 | help | ||
| 21 | PORT G | ||
| 22 | endchoice | ||
| 23 | |||
| 24 | choice | ||
| 25 | prompt "SPORT0 TSCLK Location" | ||
| 26 | depends on BF527_SPORT0_PORTG | ||
| 27 | default BF527_SPORT0_TSCLK_PG10 | ||
| 28 | help | ||
| 29 | Select PIN used for SPORT0_TSCLK. See Hardware Reference Manual | ||
| 30 | |||
| 31 | config BF527_SPORT0_TSCLK_PG10 | ||
| 32 | bool "PORT PG10" | ||
| 33 | help | ||
| 34 | PORT PG10 | ||
| 35 | |||
| 36 | config BF527_SPORT0_TSCLK_PG14 | ||
| 37 | bool "PORT PG14" | ||
| 38 | help | ||
| 39 | PORT PG14 | ||
| 40 | endchoice | ||
| 41 | |||
| 42 | choice | ||
| 43 | prompt "UART1" | ||
| 44 | default BF527_UART1_PORTG | ||
| 45 | help | ||
| 46 | Select PORT used for UART1. See Hardware Reference Manual | ||
| 47 | |||
| 48 | config BF527_UART1_PORTF | ||
| 49 | bool "PORT F" | ||
| 50 | help | ||
| 51 | PORT F | ||
| 52 | |||
| 53 | config BF527_UART1_PORTG | ||
| 54 | bool "PORT G" | ||
| 55 | help | ||
| 56 | PORT G | ||
| 57 | endchoice | ||
| 58 | |||
| 59 | choice | ||
| 60 | prompt "NAND (NFC) Data" | ||
| 61 | default BF527_NAND_D_PORTH | ||
| 62 | help | ||
| 63 | Select PORT used for NAND Data Bus. See Hardware Reference Manual | ||
| 64 | |||
| 65 | config BF527_NAND_D_PORTF | ||
| 66 | bool "PORT F" | ||
| 67 | help | ||
| 68 | PORT F | ||
| 69 | |||
| 70 | config BF527_NAND_D_PORTH | ||
| 71 | bool "PORT H" | ||
| 72 | help | ||
| 73 | PORT H | ||
| 74 | endchoice | ||
| 75 | |||
| 76 | comment "Interrupt Priority Assignment" | ||
| 77 | menu "Priority" | ||
| 78 | |||
| 79 | config IRQ_PLL_WAKEUP | ||
| 80 | int "IRQ_PLL_WAKEUP" | ||
| 81 | default 7 | ||
| 82 | config IRQ_DMA0_ERROR | ||
| 83 | int "IRQ_DMA0_ERROR" | ||
| 84 | default 7 | ||
| 85 | config IRQ_DMAR0_BLK | ||
| 86 | int "IRQ_DMAR0_BLK" | ||
| 87 | default 7 | ||
| 88 | config IRQ_DMAR1_BLK | ||
| 89 | int "IRQ_DMAR1_BLK" | ||
| 90 | default 7 | ||
| 91 | config IRQ_DMAR0_OVR | ||
| 92 | int "IRQ_DMAR0_OVR" | ||
| 93 | default 7 | ||
| 94 | config IRQ_DMAR1_OVR | ||
| 95 | int "IRQ_DMAR1_OVR" | ||
| 96 | default 7 | ||
| 97 | config IRQ_PPI_ERROR | ||
| 98 | int "IRQ_PPI_ERROR" | ||
| 99 | default 7 | ||
| 100 | config IRQ_MAC_ERROR | ||
| 101 | int "IRQ_MAC_ERROR" | ||
| 102 | default 7 | ||
| 103 | config IRQ_SPORT0_ERROR | ||
| 104 | int "IRQ_SPORT0_ERROR" | ||
| 105 | default 7 | ||
| 106 | config IRQ_SPORT1_ERROR | ||
| 107 | int "IRQ_SPORT1_ERROR" | ||
| 108 | default 7 | ||
| 109 | config IRQ_UART0_ERROR | ||
| 110 | int "IRQ_UART0_ERROR" | ||
| 111 | default 7 | ||
| 112 | config IRQ_UART1_ERROR | ||
| 113 | int "IRQ_UART1_ERROR" | ||
| 114 | default 7 | ||
| 115 | config IRQ_RTC | ||
| 116 | int "IRQ_RTC" | ||
| 117 | default 8 | ||
| 118 | config IRQ_PPI | ||
| 119 | int "IRQ_PPI" | ||
| 120 | default 8 | ||
| 121 | config IRQ_SPORT0_RX | ||
| 122 | int "IRQ_SPORT0_RX" | ||
| 123 | default 9 | ||
| 124 | config IRQ_SPORT0_TX | ||
| 125 | int "IRQ_SPORT0_TX" | ||
| 126 | default 9 | ||
| 127 | config IRQ_SPORT1_RX | ||
| 128 | int "IRQ_SPORT1_RX" | ||
| 129 | default 9 | ||
| 130 | config IRQ_SPORT1_TX | ||
| 131 | int "IRQ_SPORT1_TX" | ||
| 132 | default 9 | ||
| 133 | config IRQ_TWI | ||
| 134 | int "IRQ_TWI" | ||
| 135 | default 10 | ||
| 136 | config IRQ_SPI | ||
| 137 | int "IRQ_SPI" | ||
| 138 | default 10 | ||
| 139 | config IRQ_UART0_RX | ||
| 140 | int "IRQ_UART0_RX" | ||
| 141 | default 10 | ||
| 142 | config IRQ_UART0_TX | ||
| 143 | int "IRQ_UART0_TX" | ||
| 144 | default 10 | ||
| 145 | config IRQ_UART1_RX | ||
| 146 | int "IRQ_UART1_RX" | ||
| 147 | default 10 | ||
| 148 | config IRQ_UART1_TX | ||
| 149 | int "IRQ_UART1_TX" | ||
| 150 | default 10 | ||
| 151 | config IRQ_OPTSEC | ||
| 152 | int "IRQ_OPTSEC" | ||
| 153 | default 11 | ||
| 154 | config IRQ_CNT | ||
| 155 | int "IRQ_CNT" | ||
| 156 | default 11 | ||
| 157 | config IRQ_MAC_RX | ||
| 158 | int "IRQ_MAC_RX" | ||
| 159 | default 11 | ||
| 160 | config IRQ_PORTH_INTA | ||
| 161 | int "IRQ_PORTH_INTA" | ||
| 162 | default 11 | ||
| 163 | config IRQ_MAC_TX | ||
| 164 | int "IRQ_MAC_TX/NFC" | ||
| 165 | default 11 | ||
| 166 | config IRQ_PORTH_INTB | ||
| 167 | int "IRQ_PORTH_INTB" | ||
| 168 | default 11 | ||
| 169 | config IRQ_TMR0 | ||
| 170 | int "IRQ_TMR0" | ||
| 171 | default 12 | ||
| 172 | config IRQ_TMR1 | ||
| 173 | int "IRQ_TMR1" | ||
| 174 | default 12 | ||
| 175 | config IRQ_TMR2 | ||
| 176 | int "IRQ_TMR2" | ||
| 177 | default 12 | ||
| 178 | config IRQ_TMR3 | ||
| 179 | int "IRQ_TMR3" | ||
| 180 | default 12 | ||
| 181 | config IRQ_TMR4 | ||
| 182 | int "IRQ_TMR4" | ||
| 183 | default 12 | ||
| 184 | config IRQ_TMR5 | ||
| 185 | int "IRQ_TMR5" | ||
| 186 | default 12 | ||
| 187 | config IRQ_TMR6 | ||
| 188 | int "IRQ_TMR6" | ||
| 189 | default 12 | ||
| 190 | config IRQ_TMR7 | ||
| 191 | int "IRQ_TMR7" | ||
| 192 | default 12 | ||
| 193 | config IRQ_PORTG_INTA | ||
| 194 | int "IRQ_PORTG_INTA" | ||
| 195 | default 12 | ||
| 196 | config IRQ_PORTG_INTB | ||
| 197 | int "IRQ_PORTG_INTB" | ||
| 198 | default 12 | ||
| 199 | config IRQ_MEM_DMA0 | ||
| 200 | int "IRQ_MEM_DMA0" | ||
| 201 | default 13 | ||
| 202 | config IRQ_MEM_DMA1 | ||
| 203 | int "IRQ_MEM_DMA1" | ||
| 204 | default 13 | ||
| 205 | config IRQ_WATCH | ||
| 206 | int "IRQ_WATCH" | ||
| 207 | default 13 | ||
| 208 | config IRQ_PORTF_INTA | ||
| 209 | int "IRQ_PORTF_INTA" | ||
| 210 | default 13 | ||
| 211 | config IRQ_PORTF_INTB | ||
| 212 | int "IRQ_PORTF_INTB" | ||
| 213 | default 13 | ||
| 214 | config IRQ_SPI_ERROR | ||
| 215 | int "IRQ_SPI_ERROR" | ||
| 216 | default 7 | ||
| 217 | config IRQ_NFC_ERROR | ||
| 218 | int "IRQ_NFC_ERROR" | ||
| 219 | default 7 | ||
| 220 | config IRQ_HDMA_ERROR | ||
| 221 | int "IRQ_HDMA_ERROR" | ||
| 222 | default 7 | ||
| 223 | config IRQ_HDMA | ||
| 224 | int "IRQ_HDMA" | ||
| 225 | default 7 | ||
| 226 | config IRQ_USB_EINT | ||
| 227 | int "IRQ_USB_EINT" | ||
| 228 | default 10 | ||
| 229 | config IRQ_USB_INT0 | ||
| 230 | int "IRQ_USB_INT0" | ||
| 231 | default 10 | ||
| 232 | config IRQ_USB_INT1 | ||
| 233 | int "IRQ_USB_INT1" | ||
| 234 | default 10 | ||
| 235 | config IRQ_USB_INT2 | ||
| 236 | int "IRQ_USB_INT2" | ||
| 237 | default 10 | ||
| 238 | config IRQ_USB_DMA | ||
| 239 | int "IRQ_USB_DMA" | ||
| 240 | default 10 | ||
| 241 | |||
| 242 | help | ||
| 243 | Enter the priority numbers between 7-13 ONLY. Others are Reserved. | ||
| 244 | This applies to all the above. It is not recommended to assign the | ||
| 245 | highest priority number 7 to UART or any other device. | ||
| 246 | |||
| 247 | endmenu | ||
| 248 | |||
| 249 | endmenu | ||
| 250 | |||
| 251 | endif | ||
diff --git a/arch/blackfin/mach-bf527/Makefile b/arch/blackfin/mach-bf527/Makefile new file mode 100644 index 000000000000..9f99f5d0bcd1 --- /dev/null +++ b/arch/blackfin/mach-bf527/Makefile | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | # | ||
| 2 | # arch/blackfin/mach-bf527/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | extra-y := head.o | ||
| 6 | |||
| 7 | obj-y := ints-priority.o dma.o | ||
| 8 | |||
| 9 | obj-$(CONFIG_CPU_FREQ) += cpu.o | ||
diff --git a/arch/blackfin/mach-bf527/boards/Makefile b/arch/blackfin/mach-bf527/boards/Makefile new file mode 100644 index 000000000000..912ac8ebc889 --- /dev/null +++ b/arch/blackfin/mach-bf527/boards/Makefile | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | # | ||
| 2 | # arch/blackfin/mach-bf532/boards/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | obj-y += eth_mac.o | ||
| 6 | obj-$(CONFIG_BFIN527_EZKIT) += ezkit.o | ||
| 7 | |||
diff --git a/arch/blackfin/mach-bf527/boards/eth_mac.c b/arch/blackfin/mach-bf527/boards/eth_mac.c new file mode 100644 index 000000000000..a725cc8a9290 --- /dev/null +++ b/arch/blackfin/mach-bf527/boards/eth_mac.c | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | /* | ||
| 2 | * arch/blackfin/mach-bf537/board/eth_mac.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2007 Analog Devices, Inc. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | #include <linux/module.h> | ||
| 21 | #include <asm/blackfin.h> | ||
| 22 | |||
| 23 | #if defined(CONFIG_GENERIC_BOARD) || defined(CONFIG_BFIN537_STAMP) | ||
| 24 | |||
| 25 | /* | ||
| 26 | * Currently the MAC address is saved in Flash by U-Boot | ||
| 27 | */ | ||
| 28 | #define FLASH_MAC 0x203f0000 | ||
| 29 | |||
| 30 | void get_bf537_ether_addr(char *addr) | ||
| 31 | { | ||
| 32 | unsigned int flash_mac = (unsigned int) FLASH_MAC; | ||
| 33 | *(u32 *)(&(addr[0])) = bfin_read32(flash_mac); | ||
| 34 | flash_mac += 4; | ||
| 35 | *(u16 *)(&(addr[4])) = bfin_read16(flash_mac); | ||
| 36 | } | ||
| 37 | |||
| 38 | #else | ||
| 39 | |||
| 40 | /* | ||
| 41 | * Provide MAC address function for other specific board setting | ||
| 42 | */ | ||
| 43 | void get_bf537_ether_addr(char *addr) | ||
| 44 | { | ||
| 45 | printk(KERN_WARNING "%s: No valid Ethernet MAC address found\n", __FILE__); | ||
| 46 | } | ||
| 47 | |||
| 48 | #endif | ||
| 49 | |||
| 50 | EXPORT_SYMBOL(get_bf537_ether_addr); | ||
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c new file mode 100644 index 000000000000..3e884f3a8182 --- /dev/null +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
| @@ -0,0 +1,737 @@ | |||
| 1 | /* | ||
| 2 | * File: arch/blackfin/mach-bf527/boards/ezkit.c | ||
| 3 | * Based on: arch/blackfin/mach-bf537/boards/stamp.c | ||
| 4 | * Author: Aidan Williams <aidan@nicta.com.au> | ||
| 5 | * | ||
| 6 | * Created: | ||
| 7 | * Description: | ||
| 8 | * | ||
| 9 | * Modified: | ||
| 10 | * Copyright 2005 National ICT Australia (NICTA) | ||
| 11 | * Copyright 2004-2007 Analog Devices Inc. | ||
| 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 of the License, or | ||
| 18 | * (at your option) 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; if not, see the file COPYING, or write | ||
| 27 | * to the Free Software Foundation, Inc., | ||
| 28 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 29 | */ | ||
| 30 | |||
| 31 | #include <linux/device.h> | ||
| 32 | #include <linux/platform_device.h> | ||
| 33 | #include <linux/mtd/mtd.h> | ||
| 34 | #include <linux/mtd/partitions.h> | ||
| 35 | #include <linux/spi/spi.h> | ||
| 36 | #include <linux/spi/flash.h> | ||
| 37 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | ||
| 38 | #include <linux/usb_isp1362.h> | ||
| 39 | #endif | ||
| 40 | #include <linux/pata_platform.h> | ||
| 41 | #include <linux/irq.h> | ||
| 42 | #include <linux/interrupt.h> | ||
| 43 | #include <linux/usb_sl811.h> | ||
| 44 | #include <asm/dma.h> | ||
| 45 | #include <asm/bfin5xx_spi.h> | ||
| 46 | #include <asm/reboot.h> | ||
| 47 | #include <linux/spi/ad7877.h> | ||
| 48 | |||
| 49 | /* | ||
| 50 | * Name the Board for the /proc/cpuinfo | ||
| 51 | */ | ||
| 52 | const char bfin_board_name[] = "ADDS-BF527-EZKIT"; | ||
| 53 | |||
| 54 | /* | ||
| 55 | * Driver needs to know address, irq and flag pin. | ||
| 56 | */ | ||
| 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) | ||
| 62 | static 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 | |||
| 76 | static 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 | |||
| 83 | static struct platform_device *bfin_isp1761_devices[] = { | ||
| 84 | &bfin_isp1761_device, | ||
| 85 | }; | ||
| 86 | |||
| 87 | int __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 | |||
| 97 | void __exit bfin_isp1761_exit(void) | ||
| 98 | { | ||
| 99 | platform_device_unregister(&bfin_isp1761_device); | ||
| 100 | } | ||
| 101 | |||
| 102 | arch_initcall(bfin_isp1761_init); | ||
| 103 | #endif | ||
| 104 | |||
| 105 | #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) | ||
| 106 | static struct resource bfin_pcmcia_cf_resources[] = { | ||
| 107 | { | ||
| 108 | .start = 0x20310000, /* IO PORT */ | ||
| 109 | .end = 0x20312000, | ||
| 110 | .flags = IORESOURCE_MEM, | ||
| 111 | }, { | ||
| 112 | .start = 0x20311000, /* Attribute Memory */ | ||
| 113 | .end = 0x20311FFF, | ||
| 114 | .flags = IORESOURCE_MEM, | ||
| 115 | }, { | ||
| 116 | .start = IRQ_PF4, | ||
| 117 | .end = IRQ_PF4, | ||
| 118 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | ||
| 119 | }, { | ||
| 120 | .start = 6, /* Card Detect PF6 */ | ||
| 121 | .end = 6, | ||
| 122 | .flags = IORESOURCE_IRQ, | ||
| 123 | }, | ||
| 124 | }; | ||
| 125 | |||
| 126 | static struct platform_device bfin_pcmcia_cf_device = { | ||
| 127 | .name = "bfin_cf_pcmcia", | ||
| 128 | .id = -1, | ||
| 129 | .num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources), | ||
| 130 | .resource = bfin_pcmcia_cf_resources, | ||
| 131 | }; | ||
| 132 | #endif | ||
| 133 | |||
| 134 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | ||
| 135 | static struct platform_device rtc_device = { | ||
| 136 | .name = "rtc-bfin", | ||
| 137 | .id = -1, | ||
| 138 | }; | ||
| 139 | #endif | ||
| 140 | |||
| 141 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | ||
| 142 | static struct resource smc91x_resources[] = { | ||
| 143 | { | ||
| 144 | .name = "smc91x-regs", | ||
| 145 | .start = 0x20300300, | ||
| 146 | .end = 0x20300300 + 16, | ||
| 147 | .flags = IORESOURCE_MEM, | ||
| 148 | }, { | ||
| 149 | |||
| 150 | .start = IRQ_PF7, | ||
| 151 | .end = IRQ_PF7, | ||
| 152 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
| 153 | }, | ||
| 154 | }; | ||
| 155 | static struct platform_device smc91x_device = { | ||
| 156 | .name = "smc91x", | ||
| 157 | .id = 0, | ||
| 158 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
| 159 | .resource = smc91x_resources, | ||
| 160 | }; | ||
| 161 | #endif | ||
| 162 | |||
| 163 | #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) | ||
| 164 | static 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 | |||
| 177 | static 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 | |||
| 185 | #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) | ||
| 186 | static struct resource sl811_hcd_resources[] = { | ||
| 187 | { | ||
| 188 | .start = 0x20340000, | ||
| 189 | .end = 0x20340000, | ||
| 190 | .flags = IORESOURCE_MEM, | ||
| 191 | }, { | ||
| 192 | .start = 0x20340004, | ||
| 193 | .end = 0x20340004, | ||
| 194 | .flags = IORESOURCE_MEM, | ||
| 195 | }, { | ||
| 196 | .start = CONFIG_USB_SL811_BFIN_IRQ, | ||
| 197 | .end = CONFIG_USB_SL811_BFIN_IRQ, | ||
| 198 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
| 199 | }, | ||
| 200 | }; | ||
| 201 | |||
| 202 | #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS) | ||
| 203 | void sl811_port_power(struct device *dev, int is_on) | ||
| 204 | { | ||
| 205 | gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS"); | ||
| 206 | gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS); | ||
| 207 | |||
| 208 | if (is_on) | ||
| 209 | gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 1); | ||
| 210 | else | ||
| 211 | gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 0); | ||
| 212 | } | ||
| 213 | #endif | ||
| 214 | |||
| 215 | static struct sl811_platform_data sl811_priv = { | ||
| 216 | .potpg = 10, | ||
| 217 | .power = 250, /* == 500mA */ | ||
| 218 | #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS) | ||
| 219 | .port_power = &sl811_port_power, | ||
| 220 | #endif | ||
| 221 | }; | ||
| 222 | |||
| 223 | static struct platform_device sl811_hcd_device = { | ||
| 224 | .name = "sl811-hcd", | ||
| 225 | .id = 0, | ||
| 226 | .dev = { | ||
| 227 | .platform_data = &sl811_priv, | ||
| 228 | }, | ||
| 229 | .num_resources = ARRAY_SIZE(sl811_hcd_resources), | ||
| 230 | .resource = sl811_hcd_resources, | ||
| 231 | }; | ||
| 232 | #endif | ||
| 233 | |||
| 234 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | ||
| 235 | static struct resource isp1362_hcd_resources[] = { | ||
| 236 | { | ||
| 237 | .start = 0x20360000, | ||
| 238 | .end = 0x20360000, | ||
| 239 | .flags = IORESOURCE_MEM, | ||
| 240 | }, { | ||
| 241 | .start = 0x20360004, | ||
| 242 | .end = 0x20360004, | ||
| 243 | .flags = IORESOURCE_MEM, | ||
| 244 | }, { | ||
| 245 | .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, | ||
| 246 | .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, | ||
| 247 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
| 248 | }, | ||
| 249 | }; | ||
| 250 | |||
| 251 | static struct isp1362_platform_data isp1362_priv = { | ||
| 252 | .sel15Kres = 1, | ||
| 253 | .clknotstop = 0, | ||
| 254 | .oc_enable = 0, | ||
| 255 | .int_act_high = 0, | ||
| 256 | .int_edge_triggered = 0, | ||
| 257 | .remote_wakeup_connected = 0, | ||
| 258 | .no_power_switching = 1, | ||
| 259 | .power_switching_mode = 0, | ||
| 260 | }; | ||
| 261 | |||
| 262 | static struct platform_device isp1362_hcd_device = { | ||
| 263 | .name = "isp1362-hcd", | ||
| 264 | .id = 0, | ||
| 265 | .dev = { | ||
| 266 | .platform_data = &isp1362_priv, | ||
| 267 | }, | ||
| 268 | .num_resources = ARRAY_SIZE(isp1362_hcd_resources), | ||
| 269 | .resource = isp1362_hcd_resources, | ||
| 270 | }; | ||
| 271 | #endif | ||
| 272 | |||
| 273 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | ||
| 274 | static struct platform_device bfin_mac_device = { | ||
| 275 | .name = "bfin_mac", | ||
| 276 | }; | ||
| 277 | #endif | ||
| 278 | |||
| 279 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
| 280 | static struct resource net2272_bfin_resources[] = { | ||
| 281 | { | ||
| 282 | .start = 0x20300000, | ||
| 283 | .end = 0x20300000 + 0x100, | ||
| 284 | .flags = IORESOURCE_MEM, | ||
| 285 | }, { | ||
| 286 | .start = IRQ_PF7, | ||
| 287 | .end = IRQ_PF7, | ||
| 288 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
| 289 | }, | ||
| 290 | }; | ||
| 291 | |||
| 292 | static struct platform_device net2272_bfin_device = { | ||
| 293 | .name = "net2272", | ||
| 294 | .id = -1, | ||
| 295 | .num_resources = ARRAY_SIZE(net2272_bfin_resources), | ||
| 296 | .resource = net2272_bfin_resources, | ||
| 297 | }; | ||
| 298 | #endif | ||
| 299 | |||
| 300 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
| 301 | /* all SPI peripherals info goes here */ | ||
| 302 | |||
| 303 | #if defined(CONFIG_MTD_M25P80) \ | ||
| 304 | || defined(CONFIG_MTD_M25P80_MODULE) | ||
| 305 | static struct mtd_partition bfin_spi_flash_partitions[] = { | ||
| 306 | { | ||
| 307 | .name = "bootloader", | ||
| 308 | .size = 0x00020000, | ||
| 309 | .offset = 0, | ||
| 310 | .mask_flags = MTD_CAP_ROM | ||
| 311 | }, { | ||
| 312 | .name = "kernel", | ||
| 313 | .size = 0xe0000, | ||
| 314 | .offset = 0x20000 | ||
| 315 | }, { | ||
| 316 | .name = "file system", | ||
| 317 | .size = 0x700000, | ||
| 318 | .offset = 0x00100000, | ||
| 319 | } | ||
| 320 | }; | ||
| 321 | |||
| 322 | static struct flash_platform_data bfin_spi_flash_data = { | ||
| 323 | .name = "m25p80", | ||
| 324 | .parts = bfin_spi_flash_partitions, | ||
| 325 | .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions), | ||
| 326 | .type = "m25p64", | ||
| 327 | }; | ||
| 328 | |||
| 329 | /* SPI flash chip (m25p64) */ | ||
| 330 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | ||
| 331 | .enable_dma = 0, /* use dma transfer with this chip*/ | ||
| 332 | .bits_per_word = 8, | ||
| 333 | }; | ||
| 334 | #endif | ||
| 335 | |||
| 336 | #if defined(CONFIG_SPI_ADC_BF533) \ | ||
| 337 | || defined(CONFIG_SPI_ADC_BF533_MODULE) | ||
| 338 | /* SPI ADC chip */ | ||
| 339 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
| 340 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
| 341 | .bits_per_word = 16, | ||
| 342 | }; | ||
| 343 | #endif | ||
| 344 | |||
| 345 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ | ||
| 346 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | ||
| 347 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||
| 348 | .enable_dma = 0, | ||
| 349 | .bits_per_word = 16, | ||
| 350 | }; | ||
| 351 | #endif | ||
| 352 | |||
| 353 | #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE) | ||
| 354 | static struct bfin5xx_spi_chip ad9960_spi_chip_info = { | ||
| 355 | .enable_dma = 0, | ||
| 356 | .bits_per_word = 16, | ||
| 357 | }; | ||
| 358 | #endif | ||
| 359 | |||
| 360 | #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||
| 361 | static 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) | ||
| 368 | static 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) | ||
| 377 | static 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) | ||
| 384 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { | ||
| 385 | .enable_dma = 0, | ||
| 386 | .bits_per_word = 16, | ||
| 387 | }; | ||
| 388 | |||
| 389 | static 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 | |||
| 404 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | ||
| 405 | #if defined(CONFIG_MTD_M25P80) \ | ||
| 406 | || defined(CONFIG_MTD_M25P80_MODULE) | ||
| 407 | { | ||
| 408 | /* the modalias must be the same as spi device driver name */ | ||
| 409 | .modalias = "m25p80", /* Name of spi_driver for this device */ | ||
| 410 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ | ||
| 411 | .bus_num = 0, /* Framework bus number */ | ||
| 412 | .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/ | ||
| 413 | .platform_data = &bfin_spi_flash_data, | ||
| 414 | .controller_data = &spi_flash_chip_info, | ||
| 415 | .mode = SPI_MODE_3, | ||
| 416 | }, | ||
| 417 | #endif | ||
| 418 | |||
| 419 | #if defined(CONFIG_SPI_ADC_BF533) \ | ||
| 420 | || defined(CONFIG_SPI_ADC_BF533_MODULE) | ||
| 421 | { | ||
| 422 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
| 423 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | ||
| 424 | .bus_num = 0, /* Framework bus number */ | ||
| 425 | .chip_select = 1, /* Framework chip select. */ | ||
| 426 | .platform_data = NULL, /* No spi_driver specific config */ | ||
| 427 | .controller_data = &spi_adc_chip_info, | ||
| 428 | }, | ||
| 429 | #endif | ||
| 430 | |||
| 431 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ | ||
| 432 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | ||
| 433 | { | ||
| 434 | .modalias = "ad1836-spi", | ||
| 435 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | ||
| 436 | .bus_num = 0, | ||
| 437 | .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, | ||
| 438 | .controller_data = &ad1836_spi_chip_info, | ||
| 439 | }, | ||
| 440 | #endif | ||
| 441 | #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE) | ||
| 442 | { | ||
| 443 | .modalias = "ad9960-spi", | ||
| 444 | .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */ | ||
| 445 | .bus_num = 0, | ||
| 446 | .chip_select = 1, | ||
| 447 | .controller_data = &ad9960_spi_chip_info, | ||
| 448 | }, | ||
| 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 | ||
| 510 | }; | ||
| 511 | |||
| 512 | /* SPI controller data */ | ||
| 513 | static struct bfin5xx_spi_master bfin_spi0_info = { | ||
| 514 | .num_chipselect = 8, | ||
| 515 | .enable_dma = 1, /* master has the ability to do dma transfer */ | ||
| 516 | }; | ||
| 517 | |||
| 518 | /* SPI (0) */ | ||
| 519 | static struct resource bfin_spi0_resource[] = { | ||
| 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 | |||
| 532 | static 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, | ||
| 537 | .dev = { | ||
| 538 | .platform_data = &bfin_spi0_info, /* Passed to driver */ | ||
| 539 | }, | ||
| 540 | }; | ||
| 541 | #endif /* spi master and devices */ | ||
| 542 | |||
| 543 | #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) | ||
| 544 | static struct platform_device bfin_fb_device = { | ||
| 545 | .name = "bf537-lq035", | ||
| 546 | }; | ||
| 547 | #endif | ||
| 548 | |||
| 549 | #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) | ||
| 550 | static struct platform_device bfin_fb_adv7393_device = { | ||
| 551 | .name = "bfin-adv7393", | ||
| 552 | }; | ||
| 553 | #endif | ||
| 554 | |||
| 555 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | ||
| 556 | static struct resource bfin_uart_resources[] = { | ||
| 557 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
| 558 | { | ||
| 559 | .start = 0xFFC00400, | ||
| 560 | .end = 0xFFC004FF, | ||
| 561 | .flags = IORESOURCE_MEM, | ||
| 562 | }, | ||
| 563 | #endif | ||
| 564 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
| 565 | { | ||
| 566 | .start = 0xFFC02000, | ||
| 567 | .end = 0xFFC020FF, | ||
| 568 | .flags = IORESOURCE_MEM, | ||
| 569 | }, | ||
| 570 | #endif | ||
| 571 | }; | ||
| 572 | |||
| 573 | static struct platform_device bfin_uart_device = { | ||
| 574 | .name = "bfin-uart", | ||
| 575 | .id = 1, | ||
| 576 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | ||
| 577 | .resource = bfin_uart_resources, | ||
| 578 | }; | ||
| 579 | #endif | ||
| 580 | |||
| 581 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | ||
| 582 | static struct resource bfin_twi0_resource[] = { | ||
| 583 | [0] = { | ||
| 584 | .start = TWI0_REGBASE, | ||
| 585 | .end = TWI0_REGBASE, | ||
| 586 | .flags = IORESOURCE_MEM, | ||
| 587 | }, | ||
| 588 | [1] = { | ||
| 589 | .start = IRQ_TWI, | ||
| 590 | .end = IRQ_TWI, | ||
| 591 | .flags = IORESOURCE_IRQ, | ||
| 592 | }, | ||
| 593 | }; | ||
| 594 | |||
| 595 | static struct platform_device i2c_bfin_twi_device = { | ||
| 596 | .name = "i2c-bfin-twi", | ||
| 597 | .id = 0, | ||
| 598 | .num_resources = ARRAY_SIZE(bfin_twi0_resource), | ||
| 599 | .resource = bfin_twi0_resource, | ||
| 600 | }; | ||
| 601 | #endif | ||
| 602 | |||
| 603 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | ||
| 604 | static struct platform_device bfin_sport0_uart_device = { | ||
| 605 | .name = "bfin-sport-uart", | ||
| 606 | .id = 0, | ||
| 607 | }; | ||
| 608 | |||
| 609 | static struct platform_device bfin_sport1_uart_device = { | ||
| 610 | .name = "bfin-sport-uart", | ||
| 611 | .id = 1, | ||
| 612 | }; | ||
| 613 | #endif | ||
| 614 | |||
| 615 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | ||
| 616 | #define PATA_INT 55 | ||
| 617 | |||
| 618 | static struct pata_platform_info bfin_pata_platform_data = { | ||
| 619 | .ioport_shift = 1, | ||
| 620 | .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED, | ||
| 621 | }; | ||
| 622 | |||
| 623 | static struct resource bfin_pata_resources[] = { | ||
| 624 | { | ||
| 625 | .start = 0x20314020, | ||
| 626 | .end = 0x2031403F, | ||
| 627 | .flags = IORESOURCE_MEM, | ||
| 628 | }, | ||
| 629 | { | ||
| 630 | .start = 0x2031401C, | ||
| 631 | .end = 0x2031401F, | ||
| 632 | .flags = IORESOURCE_MEM, | ||
| 633 | }, | ||
| 634 | { | ||
| 635 | .start = PATA_INT, | ||
| 636 | .end = PATA_INT, | ||
| 637 | .flags = IORESOURCE_IRQ, | ||
| 638 | }, | ||
| 639 | }; | ||
| 640 | |||
| 641 | static struct platform_device bfin_pata_device = { | ||
| 642 | .name = "pata_platform", | ||
| 643 | .id = -1, | ||
| 644 | .num_resources = ARRAY_SIZE(bfin_pata_resources), | ||
| 645 | .resource = bfin_pata_resources, | ||
| 646 | .dev = { | ||
| 647 | .platform_data = &bfin_pata_platform_data, | ||
| 648 | } | ||
| 649 | }; | ||
| 650 | #endif | ||
| 651 | |||
| 652 | static struct platform_device *stamp_devices[] __initdata = { | ||
| 653 | #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) | ||
| 654 | &bfin_pcmcia_cf_device, | ||
| 655 | #endif | ||
| 656 | |||
| 657 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | ||
| 658 | &rtc_device, | ||
| 659 | #endif | ||
| 660 | |||
| 661 | #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) | ||
| 662 | &sl811_hcd_device, | ||
| 663 | #endif | ||
| 664 | |||
| 665 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | ||
| 666 | &isp1362_hcd_device, | ||
| 667 | #endif | ||
| 668 | |||
| 669 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | ||
| 670 | &smc91x_device, | ||
| 671 | #endif | ||
| 672 | |||
| 673 | #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) | ||
| 674 | &dm9000_device, | ||
| 675 | #endif | ||
| 676 | |||
| 677 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | ||
| 678 | &bfin_mac_device, | ||
| 679 | #endif | ||
| 680 | |||
| 681 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
| 682 | &net2272_bfin_device, | ||
| 683 | #endif | ||
| 684 | |||
| 685 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
| 686 | &bfin_spi0_device, | ||
| 687 | #endif | ||
| 688 | |||
| 689 | #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) | ||
| 690 | &bfin_fb_device, | ||
| 691 | #endif | ||
| 692 | |||
| 693 | #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) | ||
| 694 | &bfin_fb_adv7393_device, | ||
| 695 | #endif | ||
| 696 | |||
| 697 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | ||
| 698 | &bfin_uart_device, | ||
| 699 | #endif | ||
| 700 | |||
| 701 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | ||
| 702 | &i2c_bfin_twi_device, | ||
| 703 | #endif | ||
| 704 | |||
| 705 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | ||
| 706 | &bfin_sport0_uart_device, | ||
| 707 | &bfin_sport1_uart_device, | ||
| 708 | #endif | ||
| 709 | |||
| 710 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | ||
| 711 | &bfin_pata_device, | ||
| 712 | #endif | ||
| 713 | }; | ||
| 714 | |||
| 715 | static int __init stamp_init(void) | ||
| 716 | { | ||
| 717 | printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); | ||
| 718 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | ||
| 719 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
| 720 | spi_register_board_info(bfin_spi_board_info, | ||
| 721 | ARRAY_SIZE(bfin_spi_board_info)); | ||
| 722 | #endif | ||
| 723 | |||
| 724 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | ||
| 725 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; | ||
| 726 | #endif | ||
| 727 | return 0; | ||
| 728 | } | ||
| 729 | |||
| 730 | arch_initcall(stamp_init); | ||
| 731 | |||
| 732 | void native_machine_restart(char *cmd) | ||
| 733 | { | ||
| 734 | /* workaround reboot hang when booting from SPI */ | ||
| 735 | if ((bfin_read_SYSCR() & 0x7) == 0x3) | ||
| 736 | bfin_gpio_reset_spi0_ssel1(); | ||
| 737 | } | ||
diff --git a/arch/blackfin/mach-bf527/cpu.c b/arch/blackfin/mach-bf527/cpu.c new file mode 100644 index 000000000000..1975402b1dbc --- /dev/null +++ b/arch/blackfin/mach-bf527/cpu.c | |||
| @@ -0,0 +1,161 @@ | |||
| 1 | /* | ||
| 2 | * File: arch/blackfin/mach-bf527/cpu.c | ||
| 3 | * Based on: arch/blackfin/mach-bf537/cpu.c | ||
| 4 | * Author: michael.kang@analog.com | ||
| 5 | * | ||
| 6 | * Created: | ||
| 7 | * Description: clock scaling for the bf527 | ||
| 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 <linux/kernel.h> | ||
| 31 | #include <linux/types.h> | ||
| 32 | #include <linux/init.h> | ||
| 33 | #include <linux/cpufreq.h> | ||
| 34 | #include <asm/dpmc.h> | ||
| 35 | #include <linux/fs.h> | ||
| 36 | #include <asm/bfin-global.h> | ||
| 37 | |||
| 38 | /* CONFIG_CLKIN_HZ=11059200 */ | ||
| 39 | #define VCO5 (CONFIG_CLKIN_HZ*45) /*497664000 */ | ||
| 40 | #define VCO4 (CONFIG_CLKIN_HZ*36) /*398131200 */ | ||
| 41 | #define VCO3 (CONFIG_CLKIN_HZ*27) /*298598400 */ | ||
| 42 | #define VCO2 (CONFIG_CLKIN_HZ*18) /*199065600 */ | ||
| 43 | #define VCO1 (CONFIG_CLKIN_HZ*9) /*99532800 */ | ||
| 44 | #define VCO(x) VCO##x | ||
| 45 | |||
| 46 | #define MFREQ(x) {VCO(x), VCO(x)/4}, {VCO(x), VCO(x)/2}, {VCO(x), VCO(x)} | ||
| 47 | /* frequency */ | ||
| 48 | static struct cpufreq_frequency_table bf527_freq_table[] = { | ||
| 49 | MFREQ(1), | ||
| 50 | MFREQ(3), | ||
| 51 | {VCO4, VCO4 / 2}, {VCO4, VCO4}, | ||
| 52 | MFREQ(5), | ||
| 53 | {0, CPUFREQ_TABLE_END}, | ||
| 54 | }; | ||
| 55 | |||
| 56 | /* | ||
| 57 | * dpmc_fops->ioctl() | ||
| 58 | * static int dpmc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) | ||
| 59 | */ | ||
| 60 | static int bf527_getfreq(unsigned int cpu) | ||
| 61 | { | ||
| 62 | unsigned long cclk_mhz; | ||
| 63 | |||
| 64 | /* The driver only support single cpu */ | ||
| 65 | if (cpu == 0) | ||
| 66 | dpmc_fops.ioctl(NULL, NULL, IOCTL_GET_CORECLOCK, &cclk_mhz); | ||
| 67 | else | ||
| 68 | cclk_mhz = -1; | ||
| 69 | |||
| 70 | return cclk_mhz; | ||
| 71 | } | ||
| 72 | |||
| 73 | static int bf527_target(struct cpufreq_policy *policy, | ||
| 74 | unsigned int target_freq, unsigned int relation) | ||
| 75 | { | ||
| 76 | unsigned long cclk_mhz; | ||
| 77 | unsigned long vco_mhz; | ||
| 78 | unsigned long flags; | ||
| 79 | unsigned int index; | ||
| 80 | struct cpufreq_freqs freqs; | ||
| 81 | |||
| 82 | if (cpufreq_frequency_table_target | ||
| 83 | (policy, bf527_freq_table, target_freq, relation, &index)) | ||
| 84 | return -EINVAL; | ||
| 85 | |||
| 86 | cclk_mhz = bf527_freq_table[index].frequency; | ||
| 87 | vco_mhz = bf527_freq_table[index].index; | ||
| 88 | |||
| 89 | dpmc_fops.ioctl(NULL, NULL, IOCTL_CHANGE_FREQUENCY, &vco_mhz); | ||
| 90 | freqs.old = bf527_getfreq(0); | ||
| 91 | freqs.new = cclk_mhz; | ||
| 92 | freqs.cpu = 0; | ||
| 93 | |||
| 94 | pr_debug | ||
| 95 | ("cclk begin change to cclk %d,vco=%d,index=%d,target=%d,oldfreq=%d\n", | ||
| 96 | cclk_mhz, vco_mhz, index, target_freq, freqs.old); | ||
| 97 | |||
| 98 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | ||
| 99 | local_irq_save(flags); | ||
| 100 | dpmc_fops.ioctl(NULL, NULL, IOCTL_SET_CCLK, &cclk_mhz); | ||
| 101 | local_irq_restore(flags); | ||
| 102 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | ||
| 103 | |||
| 104 | vco_mhz = get_vco(); | ||
| 105 | cclk_mhz = get_cclk(); | ||
| 106 | return 0; | ||
| 107 | } | ||
| 108 | |||
| 109 | /* make sure that only the "userspace" governor is run -- anything else wouldn't make sense on | ||
| 110 | * this platform, anyway. | ||
| 111 | */ | ||
| 112 | static int bf527_verify_speed(struct cpufreq_policy *policy) | ||
| 113 | { | ||
| 114 | return cpufreq_frequency_table_verify(policy, &bf527_freq_table); | ||
| 115 | } | ||
| 116 | |||
| 117 | static int __init __bf527_cpu_init(struct cpufreq_policy *policy) | ||
| 118 | { | ||
| 119 | if (policy->cpu != 0) | ||
| 120 | return -EINVAL; | ||
| 121 | |||
| 122 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
| 123 | |||
| 124 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; | ||
| 125 | /*Now ,only support one cpu */ | ||
| 126 | policy->cur = bf527_getfreq(0); | ||
| 127 | cpufreq_frequency_table_get_attr(bf527_freq_table, policy->cpu); | ||
| 128 | return cpufreq_frequency_table_cpuinfo(policy, bf527_freq_table); | ||
| 129 | } | ||
| 130 | |||
| 131 | static struct freq_attr *bf527_freq_attr[] = { | ||
| 132 | &cpufreq_freq_attr_scaling_available_freqs, | ||
| 133 | NULL, | ||
| 134 | }; | ||
| 135 | |||
| 136 | static struct cpufreq_driver bf527_driver = { | ||
| 137 | .verify = bf527_verify_speed, | ||
| 138 | .target = bf527_target, | ||
| 139 | .get = bf527_getfreq, | ||
| 140 | .init = __bf527_cpu_init, | ||
| 141 | .name = "bf527", | ||
| 142 | .owner = THIS_MODULE, | ||
| 143 | .attr = bf527_freq_attr, | ||
| 144 | }; | ||
| 145 | |||
| 146 | static int __init bf527_cpu_init(void) | ||
| 147 | { | ||
| 148 | return cpufreq_register_driver(&bf527_driver); | ||
| 149 | } | ||
| 150 | |||
| 151 | static void __exit bf527_cpu_exit(void) | ||
| 152 | { | ||
| 153 | cpufreq_unregister_driver(&bf527_driver); | ||
| 154 | } | ||
| 155 | |||
| 156 | MODULE_AUTHOR("Mickael Kang"); | ||
| 157 | MODULE_DESCRIPTION("cpufreq driver for bf527 CPU"); | ||
| 158 | MODULE_LICENSE("GPL"); | ||
| 159 | |||
| 160 | module_init(bf527_cpu_init); | ||
| 161 | module_exit(bf527_cpu_exit); | ||
diff --git a/arch/blackfin/mach-bf527/dma.c b/arch/blackfin/mach-bf527/dma.c new file mode 100644 index 000000000000..522de24cc394 --- /dev/null +++ b/arch/blackfin/mach-bf527/dma.c | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | /* | ||
| 2 | * File: arch/blackfin/mach-bf527/dma.c | ||
| 3 | * Based on: | ||
| 4 | * Author: | ||
| 5 | * | ||
| 6 | * Created: | ||
| 7 | * Description: This file contains the simple DMA Implementation for Blackfin | ||
| 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 | #include <asm/blackfin.h> | ||
| 30 | #include <asm/dma.h> | ||
| 31 | |||
| 32 | struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL] = { | ||
| 33 | (struct dma_register *) DMA0_NEXT_DESC_PTR, | ||
| 34 | (struct dma_register *) DMA1_NEXT_DESC_PTR, | ||
| 35 | (struct dma_register *) DMA2_NEXT_DESC_PTR, | ||
| 36 | (struct dma_register *) DMA3_NEXT_DESC_PTR, | ||
| 37 | (struct dma_register *) DMA4_NEXT_DESC_PTR, | ||
| 38 | (struct dma_register *) DMA5_NEXT_DESC_PTR, | ||
| 39 | (struct dma_register *) DMA6_NEXT_DESC_PTR, | ||
| 40 | (struct dma_register *) DMA7_NEXT_DESC_PTR, | ||
| 41 | (struct dma_register *) DMA8_NEXT_DESC_PTR, | ||
| 42 | (struct dma_register *) DMA9_NEXT_DESC_PTR, | ||
| 43 | (struct dma_register *) DMA10_NEXT_DESC_PTR, | ||
| 44 | (struct dma_register *) DMA11_NEXT_DESC_PTR, | ||
| 45 | (struct dma_register *) MDMA_D0_NEXT_DESC_PTR, | ||
| 46 | (struct dma_register *) MDMA_S0_NEXT_DESC_PTR, | ||
| 47 | (struct dma_register *) MDMA_D1_NEXT_DESC_PTR, | ||
| 48 | (struct dma_register *) MDMA_S1_NEXT_DESC_PTR, | ||
| 49 | }; | ||
| 50 | |||
| 51 | int channel2irq(unsigned int channel) | ||
| 52 | { | ||
| 53 | int ret_irq = -1; | ||
| 54 | |||
| 55 | switch (channel) { | ||
| 56 | case CH_PPI: | ||
| 57 | ret_irq = IRQ_PPI; | ||
| 58 | break; | ||
| 59 | |||
| 60 | case CH_EMAC_RX: | ||
| 61 | ret_irq = IRQ_MAC_RX; | ||
| 62 | break; | ||
| 63 | |||
| 64 | case CH_EMAC_TX: | ||
| 65 | ret_irq = IRQ_MAC_TX; | ||
| 66 | break; | ||
| 67 | |||
| 68 | case CH_UART1_RX: | ||
| 69 | ret_irq = IRQ_UART1_RX; | ||
| 70 | break; | ||
| 71 | |||
| 72 | case CH_UART1_TX: | ||
| 73 | ret_irq = IRQ_UART1_TX; | ||
| 74 | break; | ||
| 75 | |||
| 76 | case CH_SPORT0_RX: | ||
| 77 | ret_irq = IRQ_SPORT0_RX; | ||
| 78 | break; | ||
| 79 | |||
| 80 | case CH_SPORT0_TX: | ||
| 81 | ret_irq = IRQ_SPORT0_TX; | ||
| 82 | break; | ||
| 83 | |||
| 84 | case CH_SPORT1_RX: | ||
| 85 | ret_irq = IRQ_SPORT1_RX; | ||
| 86 | break; | ||
| 87 | |||
| 88 | case CH_SPORT1_TX: | ||
| 89 | ret_irq = IRQ_SPORT1_TX; | ||
| 90 | break; | ||
| 91 | |||
| 92 | case CH_SPI: | ||
| 93 | ret_irq = IRQ_SPI; | ||
| 94 | break; | ||
| 95 | |||
| 96 | case CH_UART0_RX: | ||
| 97 | ret_irq = IRQ_UART0_RX; | ||
| 98 | break; | ||
| 99 | |||
| 100 | case CH_UART0_TX: | ||
| 101 | ret_irq = IRQ_UART0_TX; | ||
| 102 | break; | ||
| 103 | |||
| 104 | case CH_MEM_STREAM0_SRC: | ||
| 105 | case CH_MEM_STREAM0_DEST: | ||
| 106 | ret_irq = IRQ_MEM_DMA0; | ||
| 107 | break; | ||
| 108 | |||
| 109 | case CH_MEM_STREAM1_SRC: | ||
| 110 | case CH_MEM_STREAM1_DEST: | ||
| 111 | ret_irq = IRQ_MEM_DMA1; | ||
| 112 | break; | ||
| 113 | } | ||
| 114 | return ret_irq; | ||
| 115 | } | ||
diff --git a/arch/blackfin/mach-bf527/head.S b/arch/blackfin/mach-bf527/head.S new file mode 100644 index 000000000000..cdb00a084965 --- /dev/null +++ b/arch/blackfin/mach-bf527/head.S | |||
| @@ -0,0 +1,456 @@ | |||
| 1 | /* | ||
| 2 | * File: arch/blackfin/mach-bf527/head.S | ||
| 3 | * Based on: arch/blackfin/mach-bf533/head.S | ||
| 4 | * Author: Jeff Dionne <jeff@uclinux.org> COPYRIGHT 1998 D. Jeff Dionne | ||
| 5 | * | ||
| 6 | * Created: 1998 | ||
| 7 | * Description: Startup code for Blackfin BF537 | ||
| 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 <linux/linkage.h> | ||
| 31 | #include <linux/init.h> | ||
| 32 | #include <asm/blackfin.h> | ||
| 33 | #include <asm/trace.h> | ||
| 34 | |||
| 35 | #if CONFIG_BFIN_KERNEL_CLOCK | ||
| 36 | #include <asm/mach-common/clocks.h> | ||
| 37 | #include <asm/mach/mem_init.h> | ||
| 38 | #endif | ||
| 39 | |||
| 40 | .global __rambase | ||
| 41 | .global __ramstart | ||
| 42 | .global __ramend | ||
| 43 | .extern ___bss_stop | ||
| 44 | .extern ___bss_start | ||
| 45 | .extern _bf53x_relocate_l1_mem | ||
| 46 | |||
| 47 | #define INITIAL_STACK 0xFFB01000 | ||
| 48 | |||
| 49 | __INIT | ||
| 50 | |||
| 51 | ENTRY(__start) | ||
| 52 | /* R0: argument of command line string, passed from uboot, save it */ | ||
| 53 | R7 = R0; | ||
| 54 | /* Enable Cycle Counter and Nesting Of Interrupts */ | ||
| 55 | #ifdef CONFIG_BFIN_SCRATCH_REG_CYCLES | ||
| 56 | R0 = SYSCFG_SNEN; | ||
| 57 | #else | ||
| 58 | R0 = SYSCFG_SNEN | SYSCFG_CCEN; | ||
| 59 | #endif | ||
| 60 | SYSCFG = R0; | ||
| 61 | R0 = 0; | ||
| 62 | |||
| 63 | /* Clear Out All the data and pointer Registers */ | ||
| 64 | R1 = R0; | ||
| 65 | R2 = R0; | ||
| 66 | R3 = R0; | ||
| 67 | R4 = R0; | ||
| 68 | R5 = R0; | ||
| 69 | R6 = R0; | ||
| 70 | |||
| 71 | P0 = R0; | ||
| 72 | P1 = R0; | ||
| 73 | P2 = R0; | ||
| 74 | P3 = R0; | ||
| 75 | P4 = R0; | ||
| 76 | P5 = R0; | ||
| 77 | |||
| 78 | LC0 = r0; | ||
| 79 | LC1 = r0; | ||
| 80 | L0 = r0; | ||
| 81 | L1 = r0; | ||
| 82 | L2 = r0; | ||
| 83 | L3 = r0; | ||
| 84 | |||
| 85 | /* Clear Out All the DAG Registers */ | ||
| 86 | B0 = r0; | ||
| 87 | B1 = r0; | ||
| 88 | B2 = r0; | ||
| 89 | B3 = r0; | ||
| 90 | |||
| 91 | I0 = r0; | ||
| 92 | I1 = r0; | ||
| 93 | I2 = r0; | ||
| 94 | I3 = r0; | ||
| 95 | |||
| 96 | M0 = r0; | ||
| 97 | M1 = r0; | ||
| 98 | M2 = r0; | ||
| 99 | M3 = r0; | ||
| 100 | |||
| 101 | trace_buffer_init(p0,r0); | ||
| 102 | P0 = R1; | ||
| 103 | R0 = R1; | ||
| 104 | |||
| 105 | /* Turn off the icache */ | ||
| 106 | p0.l = LO(IMEM_CONTROL); | ||
| 107 | p0.h = HI(IMEM_CONTROL); | ||
| 108 | R1 = [p0]; | ||
| 109 | R0 = ~ENICPLB; | ||
| 110 | R0 = R0 & R1; | ||
| 111 | |||
| 112 | /* Anomaly 05000125 */ | ||
| 113 | #if ANOMALY_05000125 | ||
| 114 | CLI R2; | ||
| 115 | SSYNC; | ||
| 116 | #endif | ||
| 117 | [p0] = R0; | ||
| 118 | SSYNC; | ||
| 119 | #if ANOMALY_05000125 | ||
| 120 | STI R2; | ||
| 121 | #endif | ||
| 122 | |||
| 123 | /* Turn off the dcache */ | ||
| 124 | p0.l = LO(DMEM_CONTROL); | ||
| 125 | p0.h = HI(DMEM_CONTROL); | ||
| 126 | R1 = [p0]; | ||
| 127 | R0 = ~ENDCPLB; | ||
| 128 | R0 = R0 & R1; | ||
| 129 | |||
| 130 | /* Anomaly 05000125 */ | ||
| 131 | #if ANOMALY_05000125 | ||
| 132 | CLI R2; | ||
| 133 | SSYNC; | ||
| 134 | #endif | ||
| 135 | [p0] = R0; | ||
| 136 | SSYNC; | ||
| 137 | #if ANOMALY_05000125 | ||
| 138 | STI R2; | ||
| 139 | #endif | ||
| 140 | |||
| 141 | |||
| 142 | #if defined(CONFIG_BF527) | ||
| 143 | p0.h = hi(EMAC_SYSTAT); | ||
| 144 | p0.l = lo(EMAC_SYSTAT); | ||
| 145 | R0.h = 0xFFFF; /* Clear EMAC Interrupt Status bits */ | ||
| 146 | R0.l = 0xFFFF; | ||
| 147 | [P0] = R0; | ||
| 148 | SSYNC; | ||
| 149 | #endif | ||
| 150 | |||
| 151 | /* Initialise UART - when booting from u-boot, the UART is not disabled | ||
| 152 | * so if we dont initalize here, our serial console gets hosed */ | ||
| 153 | p0.h = hi(UART1_LCR); | ||
| 154 | p0.l = lo(UART1_LCR); | ||
| 155 | r0 = 0x0(Z); | ||
| 156 | w[p0] = r0.L; /* To enable DLL writes */ | ||
| 157 | ssync; | ||
| 158 | |||
| 159 | p0.h = hi(UART1_DLL); | ||
| 160 | p0.l = lo(UART1_DLL); | ||
| 161 | r0 = 0x0(Z); | ||
| 162 | w[p0] = r0.L; | ||
| 163 | ssync; | ||
| 164 | |||
| 165 | p0.h = hi(UART1_DLH); | ||
| 166 | p0.l = lo(UART1_DLH); | ||
| 167 | r0 = 0x00(Z); | ||
| 168 | w[p0] = r0.L; | ||
| 169 | ssync; | ||
| 170 | |||
| 171 | p0.h = hi(UART1_GCTL); | ||
| 172 | p0.l = lo(UART1_GCTL); | ||
| 173 | r0 = 0x0(Z); | ||
| 174 | w[p0] = r0.L; /* To enable UART clock */ | ||
| 175 | ssync; | ||
| 176 | |||
| 177 | /* Initialize stack pointer */ | ||
| 178 | sp.l = lo(INITIAL_STACK); | ||
| 179 | sp.h = hi(INITIAL_STACK); | ||
| 180 | fp = sp; | ||
| 181 | usp = sp; | ||
| 182 | |||
| 183 | #ifdef CONFIG_EARLY_PRINTK | ||
| 184 | SP += -12; | ||
| 185 | call _init_early_exception_vectors; | ||
| 186 | SP += 12; | ||
| 187 | #endif | ||
| 188 | |||
| 189 | /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ | ||
| 190 | call _bf53x_relocate_l1_mem; | ||
| 191 | #if CONFIG_BFIN_KERNEL_CLOCK | ||
| 192 | call _start_dma_code; | ||
| 193 | #endif | ||
| 194 | |||
| 195 | /* Code for initializing Async memory banks */ | ||
| 196 | |||
| 197 | p2.h = hi(EBIU_AMBCTL1); | ||
| 198 | p2.l = lo(EBIU_AMBCTL1); | ||
| 199 | r0.h = hi(AMBCTL1VAL); | ||
| 200 | r0.l = lo(AMBCTL1VAL); | ||
| 201 | [p2] = r0; | ||
| 202 | ssync; | ||
| 203 | |||
| 204 | p2.h = hi(EBIU_AMBCTL0); | ||
| 205 | p2.l = lo(EBIU_AMBCTL0); | ||
| 206 | r0.h = hi(AMBCTL0VAL); | ||
| 207 | r0.l = lo(AMBCTL0VAL); | ||
| 208 | [p2] = r0; | ||
| 209 | ssync; | ||
| 210 | |||
| 211 | p2.h = hi(EBIU_AMGCTL); | ||
| 212 | p2.l = lo(EBIU_AMGCTL); | ||
| 213 | r0 = AMGCTLVAL; | ||
| 214 | w[p2] = r0; | ||
| 215 | ssync; | ||
| 216 | |||
| 217 | /* This section keeps the processor in supervisor mode | ||
| 218 | * during kernel boot. Switches to user mode at end of boot. | ||
| 219 | * See page 3-9 of Hardware Reference manual for documentation. | ||
| 220 | */ | ||
| 221 | |||
| 222 | /* EVT15 = _real_start */ | ||
| 223 | |||
| 224 | p0.l = lo(EVT15); | ||
| 225 | p0.h = hi(EVT15); | ||
| 226 | p1.l = _real_start; | ||
| 227 | p1.h = _real_start; | ||
| 228 | [p0] = p1; | ||
| 229 | csync; | ||
| 230 | |||
| 231 | p0.l = lo(IMASK); | ||
| 232 | p0.h = hi(IMASK); | ||
| 233 | p1.l = IMASK_IVG15; | ||
| 234 | p1.h = 0x0; | ||
| 235 | [p0] = p1; | ||
| 236 | csync; | ||
| 237 | |||
| 238 | raise 15; | ||
| 239 | p0.l = .LWAIT_HERE; | ||
| 240 | p0.h = .LWAIT_HERE; | ||
| 241 | reti = p0; | ||
| 242 | #if ANOMALY_05000281 | ||
| 243 | nop; nop; nop; | ||
| 244 | #endif | ||
| 245 | rti; | ||
| 246 | |||
| 247 | .LWAIT_HERE: | ||
| 248 | jump .LWAIT_HERE; | ||
| 249 | ENDPROC(__start) | ||
| 250 | |||
| 251 | ENTRY(_real_start) | ||
| 252 | [ -- sp ] = reti; | ||
| 253 | p0.l = lo(WDOG_CTL); | ||
| 254 | p0.h = hi(WDOG_CTL); | ||
| 255 | r0 = 0xAD6(z); | ||
| 256 | w[p0] = r0; /* watchdog off for now */ | ||
| 257 | ssync; | ||
| 258 | |||
| 259 | /* Code update for BSS size == 0 | ||
| 260 | * Zero out the bss region. | ||
| 261 | */ | ||
| 262 | |||
| 263 | p1.l = ___bss_start; | ||
| 264 | p1.h = ___bss_start; | ||
| 265 | p2.l = ___bss_stop; | ||
| 266 | p2.h = ___bss_stop; | ||
| 267 | r0 = 0; | ||
| 268 | p2 -= p1; | ||
| 269 | lsetup (.L_clear_bss, .L_clear_bss) lc0 = p2; | ||
| 270 | .L_clear_bss: | ||
| 271 | B[p1++] = r0; | ||
| 272 | |||
| 273 | /* In case there is a NULL pointer reference | ||
| 274 | * Zero out region before stext | ||
| 275 | */ | ||
| 276 | |||
| 277 | p1.l = 0x0; | ||
| 278 | p1.h = 0x0; | ||
| 279 | r0.l = __stext; | ||
| 280 | r0.h = __stext; | ||
| 281 | r0 = r0 >> 1; | ||
| 282 | p2 = r0; | ||
| 283 | r0 = 0; | ||
| 284 | lsetup (.L_clear_zero, .L_clear_zero) lc0 = p2; | ||
| 285 | .L_clear_zero: | ||
| 286 | W[p1++] = r0; | ||
| 287 | |||
| 288 | /* pass the uboot arguments to the global value command line */ | ||
| 289 | R0 = R7; | ||
| 290 | call _cmdline_init; | ||
| 291 | |||
| 292 | p1.l = __rambase; | ||
| 293 | p1.h = __rambase; | ||
| 294 | r0.l = __sdata; | ||
| 295 | r0.h = __sdata; | ||
| 296 | [p1] = r0; | ||
| 297 | |||
| 298 | p1.l = __ramstart; | ||
| 299 | p1.h = __ramstart; | ||
| 300 | p3.l = ___bss_stop; | ||
| 301 | p3.h = ___bss_stop; | ||
| 302 | |||
| 303 | r1 = p3; | ||
| 304 | [p1] = r1; | ||
| 305 | |||
| 306 | /* | ||
| 307 | * load the current thread pointer and stack | ||
| 308 | */ | ||
| 309 | r1.l = _init_thread_union; | ||
| 310 | r1.h = _init_thread_union; | ||
| 311 | |||
| 312 | r2.l = 0x2000; | ||
| 313 | r2.h = 0x0000; | ||
| 314 | r1 = r1 + r2; | ||
| 315 | sp = r1; | ||
| 316 | usp = sp; | ||
| 317 | fp = sp; | ||
| 318 | jump.l _start_kernel; | ||
| 319 | ENDPROC(_real_start) | ||
| 320 | |||
| 321 | __FINIT | ||
| 322 | |||
| 323 | .section .l1.text | ||
| 324 | #if CONFIG_BFIN_KERNEL_CLOCK | ||
| 325 | ENTRY(_start_dma_code) | ||
| 326 | |||
| 327 | /* Enable PHY CLK buffer output */ | ||
| 328 | p0.h = hi(VR_CTL); | ||
| 329 | p0.l = lo(VR_CTL); | ||
| 330 | r0.l = w[p0]; | ||
| 331 | bitset(r0, 14); | ||
| 332 | w[p0] = r0.l; | ||
| 333 | ssync; | ||
| 334 | |||
| 335 | p0.h = hi(SIC_IWR0); | ||
| 336 | p0.l = lo(SIC_IWR0); | ||
| 337 | r0.l = 0x1; | ||
| 338 | r0.h = 0x0; | ||
| 339 | [p0] = r0; | ||
| 340 | SSYNC; | ||
| 341 | |||
| 342 | /* | ||
| 343 | * Set PLL_CTL | ||
| 344 | * - [14:09] = MSEL[5:0] : CLKIN / VCO multiplication factors | ||
| 345 | * - [8] = BYPASS : BYPASS the PLL, run CLKIN into CCLK/SCLK | ||
| 346 | * - [7] = output delay (add 200ps of delay to mem signals) | ||
| 347 | * - [6] = input delay (add 200ps of input delay to mem signals) | ||
| 348 | * - [5] = PDWN : 1=All Clocks off | ||
| 349 | * - [3] = STOPCK : 1=Core Clock off | ||
| 350 | * - [1] = PLL_OFF : 1=Disable Power to PLL | ||
| 351 | * - [0] = DF : 1=Pass CLKIN/2 to PLL / 0=Pass CLKIN to PLL | ||
| 352 | * all other bits set to zero | ||
| 353 | */ | ||
| 354 | |||
| 355 | p0.h = hi(PLL_LOCKCNT); | ||
| 356 | p0.l = lo(PLL_LOCKCNT); | ||
| 357 | r0 = 0x300(Z); | ||
| 358 | w[p0] = r0.l; | ||
| 359 | ssync; | ||
| 360 | |||
| 361 | P2.H = hi(EBIU_SDGCTL); | ||
| 362 | P2.L = lo(EBIU_SDGCTL); | ||
| 363 | R0 = [P2]; | ||
| 364 | BITSET (R0, 24); | ||
| 365 | [P2] = R0; | ||
| 366 | SSYNC; | ||
| 367 | |||
| 368 | r0 = CONFIG_VCO_MULT & 63; /* Load the VCO multiplier */ | ||
| 369 | r0 = r0 << 9; /* Shift it over, */ | ||
| 370 | r1 = CLKIN_HALF; /* Do we need to divide CLKIN by 2?*/ | ||
| 371 | r0 = r1 | r0; | ||
| 372 | r1 = PLL_BYPASS; /* Bypass the PLL? */ | ||
| 373 | r1 = r1 << 8; /* Shift it over */ | ||
| 374 | r0 = r1 | r0; /* add them all together */ | ||
| 375 | |||
| 376 | p0.h = hi(PLL_CTL); | ||
| 377 | p0.l = lo(PLL_CTL); /* Load the address */ | ||
| 378 | cli r2; /* Disable interrupts */ | ||
| 379 | ssync; | ||
| 380 | w[p0] = r0.l; /* Set the value */ | ||
| 381 | idle; /* Wait for the PLL to stablize */ | ||
| 382 | sti r2; /* Enable interrupts */ | ||
| 383 | |||
| 384 | .Lcheck_again: | ||
| 385 | p0.h = hi(PLL_STAT); | ||
| 386 | p0.l = lo(PLL_STAT); | ||
| 387 | R0 = W[P0](Z); | ||
| 388 | CC = BITTST(R0,5); | ||
| 389 | if ! CC jump .Lcheck_again; | ||
| 390 | |||
| 391 | /* Configure SCLK & CCLK Dividers */ | ||
| 392 | r0 = (CONFIG_CCLK_ACT_DIV | CONFIG_SCLK_DIV); | ||
| 393 | p0.h = hi(PLL_DIV); | ||
| 394 | p0.l = lo(PLL_DIV); | ||
| 395 | w[p0] = r0.l; | ||
| 396 | ssync; | ||
| 397 | |||
| 398 | p0.l = lo(EBIU_SDRRC); | ||
| 399 | p0.h = hi(EBIU_SDRRC); | ||
| 400 | r0 = mem_SDRRC; | ||
| 401 | w[p0] = r0.l; | ||
| 402 | ssync; | ||
| 403 | |||
| 404 | p0.l = LO(EBIU_SDBCTL); | ||
| 405 | p0.h = HI(EBIU_SDBCTL); /* SDRAM Memory Bank Control Register */ | ||
| 406 | r0 = mem_SDBCTL; | ||
| 407 | w[p0] = r0.l; | ||
| 408 | ssync; | ||
| 409 | |||
| 410 | P2.H = hi(EBIU_SDGCTL); | ||
| 411 | P2.L = lo(EBIU_SDGCTL); | ||
| 412 | R0 = [P2]; | ||
| 413 | BITCLR (R0, 24); | ||
| 414 | p0.h = hi(EBIU_SDSTAT); | ||
| 415 | p0.l = lo(EBIU_SDSTAT); | ||
| 416 | r2.l = w[p0]; | ||
| 417 | cc = bittst(r2,3); | ||
| 418 | if !cc jump .Lskip; | ||
| 419 | NOP; | ||
| 420 | BITSET (R0, 23); | ||
| 421 | .Lskip: | ||
| 422 | [P2] = R0; | ||
| 423 | SSYNC; | ||
| 424 | |||
| 425 | R0.L = lo(mem_SDGCTL); | ||
| 426 | R0.H = hi(mem_SDGCTL); | ||
| 427 | R1 = [p2]; | ||
| 428 | R1 = R1 | R0; | ||
| 429 | [P2] = R1; | ||
| 430 | SSYNC; | ||
| 431 | |||
| 432 | p0.h = hi(SIC_IWR0); | ||
| 433 | p0.l = lo(SIC_IWR0); | ||
| 434 | r0.l = lo(IWR_ENABLE_ALL); | ||
| 435 | r0.h = hi(IWR_ENABLE_ALL); | ||
| 436 | [p0] = r0; | ||
| 437 | SSYNC; | ||
| 438 | |||
| 439 | RTS; | ||
| 440 | ENDPROC(_start_dma_code) | ||
| 441 | #endif /* CONFIG_BFIN_KERNEL_CLOCK */ | ||
| 442 | |||
| 443 | .data | ||
| 444 | |||
| 445 | /* | ||
| 446 | * Set up the usable of RAM stuff. Size of RAM is determined then | ||
| 447 | * an initial stack set up at the end. | ||
| 448 | */ | ||
| 449 | |||
| 450 | .align 4 | ||
| 451 | __rambase: | ||
| 452 | .long 0 | ||
| 453 | __ramstart: | ||
| 454 | .long 0 | ||
| 455 | __ramend: | ||
| 456 | .long 0 | ||
diff --git a/arch/blackfin/mach-bf527/ints-priority.c b/arch/blackfin/mach-bf527/ints-priority.c new file mode 100644 index 000000000000..1fa389793968 --- /dev/null +++ b/arch/blackfin/mach-bf527/ints-priority.c | |||
| @@ -0,0 +1,100 @@ | |||
| 1 | /* | ||
| 2 | * File: arch/blackfin/mach-bf537/ints-priority.c | ||
| 3 | * Based on: arch/blackfin/mach-bf533/ints-priority.c | ||
| 4 | * Author: Michael Hennerich (michael.hennerich@analog.com) | ||
| 5 | * | ||
| 6 | * Created: | ||
| 7 | * Description: Set up the interrupt priorities | ||
| 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 <linux/module.h> | ||
| 31 | #include <linux/irq.h> | ||
| 32 | #include <asm/blackfin.h> | ||
| 33 | |||
| 34 | void program_IAR(void) | ||
| 35 | { | ||
| 36 | /* Program the IAR0 Register with the configured priority */ | ||
| 37 | bfin_write_SIC_IAR0(((CONFIG_IRQ_PLL_WAKEUP - 7) << IRQ_PLL_WAKEUP_POS) | | ||
| 38 | ((CONFIG_IRQ_DMA0_ERROR - 7) << IRQ_DMA0_ERROR_POS) | | ||
| 39 | ((CONFIG_IRQ_DMAR0_BLK - 7) << IRQ_DMAR0_BLK_POS) | | ||
| 40 | ((CONFIG_IRQ_DMAR1_BLK - 7) << IRQ_DMAR1_BLK_POS) | | ||
| 41 | ((CONFIG_IRQ_DMAR0_OVR - 7) << IRQ_DMAR0_OVR_POS) | | ||
| 42 | ((CONFIG_IRQ_DMAR1_OVR - 7) << IRQ_DMAR1_OVR_POS) | | ||
| 43 | ((CONFIG_IRQ_PPI_ERROR - 7) << IRQ_PPI_ERROR_POS) | | ||
| 44 | ((CONFIG_IRQ_MAC_ERROR - 7) << IRQ_MAC_ERROR_POS)); | ||
| 45 | |||
| 46 | |||
| 47 | bfin_write_SIC_IAR1(((CONFIG_IRQ_SPORT0_ERROR - 7) << IRQ_SPORT0_ERROR_POS) | | ||
| 48 | ((CONFIG_IRQ_SPORT1_ERROR - 7) << IRQ_SPORT1_ERROR_POS) | | ||
| 49 | ((CONFIG_IRQ_UART0_ERROR - 7) << IRQ_UART0_ERROR_POS) | | ||
| 50 | ((CONFIG_IRQ_UART1_ERROR - 7) << IRQ_UART1_ERROR_POS) | | ||
| 51 | ((CONFIG_IRQ_RTC - 7) << IRQ_RTC_POS) | | ||
| 52 | ((CONFIG_IRQ_PPI - 7) << IRQ_PPI_POS)); | ||
| 53 | |||
| 54 | bfin_write_SIC_IAR2(((CONFIG_IRQ_SPORT0_RX - 7) << IRQ_SPORT0_RX_POS) | | ||
| 55 | ((CONFIG_IRQ_SPORT0_TX - 7) << IRQ_SPORT0_TX_POS) | | ||
| 56 | ((CONFIG_IRQ_SPORT1_RX - 7) << IRQ_SPORT1_RX_POS) | | ||
| 57 | ((CONFIG_IRQ_SPORT1_TX - 7) << IRQ_SPORT1_TX_POS) | | ||
| 58 | ((CONFIG_IRQ_TWI - 7) << IRQ_TWI_POS) | | ||
| 59 | ((CONFIG_IRQ_SPI - 7) << IRQ_SPI_POS) | | ||
| 60 | ((CONFIG_IRQ_UART0_RX - 7) << IRQ_UART0_RX_POS) | | ||
| 61 | ((CONFIG_IRQ_UART0_TX - 7) << IRQ_UART0_TX_POS)); | ||
| 62 | |||
| 63 | bfin_write_SIC_IAR3(((CONFIG_IRQ_UART1_RX - 7) << IRQ_UART1_RX_POS) | | ||
| 64 | ((CONFIG_IRQ_UART1_TX - 7) << IRQ_UART1_TX_POS) | | ||
| 65 | ((CONFIG_IRQ_OPTSEC - 7) << IRQ_OPTSEC_POS) | | ||
| 66 | ((CONFIG_IRQ_CNT - 7) << IRQ_CNT_POS) | | ||
| 67 | ((CONFIG_IRQ_MAC_RX - 7) << IRQ_MAC_RX_POS) | | ||
| 68 | ((CONFIG_IRQ_PORTH_INTA - 7) << IRQ_PORTH_INTA_POS) | | ||
| 69 | ((CONFIG_IRQ_MAC_TX - 7) << IRQ_MAC_TX_POS) | | ||
| 70 | ((CONFIG_IRQ_PORTH_INTB - 7) << IRQ_PORTH_INTB_POS)); | ||
| 71 | |||
| 72 | bfin_write_SIC_IAR4(((CONFIG_IRQ_TMR0 - 7) << IRQ_TMR0_POS) | | ||
| 73 | ((CONFIG_IRQ_TMR1 - 7) << IRQ_TMR1_POS) | | ||
| 74 | ((CONFIG_IRQ_TMR2 - 7) << IRQ_TMR2_POS) | | ||
| 75 | ((CONFIG_IRQ_TMR3 - 7) << IRQ_TMR3_POS) | | ||
| 76 | ((CONFIG_IRQ_TMR4 - 7) << IRQ_TMR4_POS) | | ||
| 77 | ((CONFIG_IRQ_TMR5 - 7) << IRQ_TMR5_POS) | | ||
| 78 | ((CONFIG_IRQ_TMR6 - 7) << IRQ_TMR6_POS) | | ||
| 79 | ((CONFIG_IRQ_TMR7 - 7) << IRQ_TMR7_POS)); | ||
| 80 | |||
| 81 | bfin_write_SIC_IAR5(((CONFIG_IRQ_PORTG_INTA - 7) << IRQ_PORTG_INTA_POS) | | ||
| 82 | ((CONFIG_IRQ_PORTG_INTB - 7) << IRQ_PORTG_INTB_POS) | | ||
| 83 | ((CONFIG_IRQ_MEM_DMA0 - 7) << IRQ_MEM_DMA0_POS) | | ||
| 84 | ((CONFIG_IRQ_MEM_DMA1 - 7) << IRQ_MEM_DMA1_POS) | | ||
| 85 | ((CONFIG_IRQ_WATCH - 7) << IRQ_WATCH_POS) | | ||
| 86 | ((CONFIG_IRQ_PORTF_INTA - 7) << IRQ_PORTF_INTA_POS) | | ||
| 87 | ((CONFIG_IRQ_PORTF_INTB - 7) << IRQ_PORTF_INTB_POS) | | ||
| 88 | ((CONFIG_IRQ_SPI_ERROR - 7) << IRQ_SPI_ERROR_POS)); | ||
| 89 | |||
| 90 | bfin_write_SIC_IAR6(((CONFIG_IRQ_NFC_ERROR - 7) << IRQ_NFC_ERROR_POS) | | ||
| 91 | ((CONFIG_IRQ_HDMA_ERROR - 7) << IRQ_HDMA_ERROR_POS) | | ||
| 92 | ((CONFIG_IRQ_HDMA - 7) << IRQ_HDMA_POS) | | ||
| 93 | ((CONFIG_IRQ_USB_EINT - 7) << IRQ_USB_EINT_POS) | | ||
| 94 | ((CONFIG_IRQ_USB_INT0 - 7) << IRQ_USB_INT0_POS) | | ||
| 95 | ((CONFIG_IRQ_USB_INT1 - 7) << IRQ_USB_INT1_POS) | | ||
| 96 | ((CONFIG_IRQ_USB_INT2 - 7) << IRQ_USB_INT2_POS) | | ||
| 97 | ((CONFIG_IRQ_USB_DMA - 7) << IRQ_USB_DMA_POS)); | ||
| 98 | |||
| 99 | SSYNC(); | ||
| 100 | } | ||
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c index a57b52d207cd..1c5a86adfab7 100644 --- a/arch/blackfin/mach-bf533/boards/cm_bf533.c +++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | /* | 42 | /* |
| 43 | * Name the Board for the /proc/cpuinfo | 43 | * Name the Board for the /proc/cpuinfo |
| 44 | */ | 44 | */ |
| 45 | char *bfin_board_name = "Bluetechnix CM BF533"; | 45 | const char bfin_board_name[] = "Bluetechnix CM BF533"; |
| 46 | 46 | ||
| 47 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 47 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
| 48 | /* all SPI peripherals info goes here */ | 48 | /* all SPI peripherals info goes here */ |
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index 5c1e35d3c012..34b63920e272 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c | |||
| @@ -43,7 +43,7 @@ | |||
| 43 | /* | 43 | /* |
| 44 | * Name the Board for the /proc/cpuinfo | 44 | * Name the Board for the /proc/cpuinfo |
| 45 | */ | 45 | */ |
| 46 | char *bfin_board_name = "ADDS-BF533-EZKIT"; | 46 | const char bfin_board_name[] = "ADDS-BF533-EZKIT"; |
| 47 | 47 | ||
| 48 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | 48 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
| 49 | static struct platform_device rtc_device = { | 49 | static struct platform_device rtc_device = { |
diff --git a/arch/blackfin/mach-bf533/boards/generic_board.c b/arch/blackfin/mach-bf533/boards/generic_board.c index 9bc1f0d0ab50..310b7772c458 100644 --- a/arch/blackfin/mach-bf533/boards/generic_board.c +++ b/arch/blackfin/mach-bf533/boards/generic_board.c | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | /* | 35 | /* |
| 36 | * Name the Board for the /proc/cpuinfo | 36 | * Name the Board for the /proc/cpuinfo |
| 37 | */ | 37 | */ |
| 38 | char *bfin_board_name = "UNKNOWN BOARD"; | 38 | const char bfin_board_name[] = "UNKNOWN BOARD"; |
| 39 | 39 | ||
| 40 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | 40 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
| 41 | static struct platform_device rtc_device = { | 41 | static struct platform_device rtc_device = { |
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index 8975e06ea158..f84be4eabfd1 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | /* | 46 | /* |
| 47 | * Name the Board for the /proc/cpuinfo | 47 | * Name the Board for the /proc/cpuinfo |
| 48 | */ | 48 | */ |
| 49 | char *bfin_board_name = "ADDS-BF533-STAMP"; | 49 | const char bfin_board_name[] = "ADDS-BF533-STAMP"; |
| 50 | 50 | ||
| 51 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | 51 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
| 52 | static struct platform_device rtc_device = { | 52 | static struct platform_device rtc_device = { |
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c index 44dea05e1d03..52e2320307de 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c | |||
| @@ -43,7 +43,7 @@ | |||
| 43 | /* | 43 | /* |
| 44 | * Name the Board for the /proc/cpuinfo | 44 | * Name the Board for the /proc/cpuinfo |
| 45 | */ | 45 | */ |
| 46 | char *bfin_board_name = "Bluetechnix CM BF537"; | 46 | const char bfin_board_name[] = "Bluetechnix CM BF537"; |
| 47 | 47 | ||
| 48 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 48 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
| 49 | /* all SPI peripherals info goes here */ | 49 | /* all SPI peripherals info goes here */ |
diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c index 6668c8e4a3fc..255da7a98481 100644 --- a/arch/blackfin/mach-bf537/boards/generic_board.c +++ b/arch/blackfin/mach-bf537/boards/generic_board.c | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | /* | 49 | /* |
| 50 | * Name the Board for the /proc/cpuinfo | 50 | * Name the Board for the /proc/cpuinfo |
| 51 | */ | 51 | */ |
| 52 | char *bfin_board_name = "GENERIC Board"; | 52 | const char bfin_board_name[] = "GENERIC Board"; |
| 53 | 53 | ||
| 54 | /* | 54 | /* |
| 55 | * Driver needs to know address, irq and flag pin. | 55 | * Driver needs to know address, irq and flag pin. |
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c index f83a2544004d..87b808926789 100644 --- a/arch/blackfin/mach-bf537/boards/pnav10.c +++ b/arch/blackfin/mach-bf537/boards/pnav10.c | |||
| @@ -47,7 +47,7 @@ | |||
| 47 | /* | 47 | /* |
| 48 | * Name the Board for the /proc/cpuinfo | 48 | * Name the Board for the /proc/cpuinfo |
| 49 | */ | 49 | */ |
| 50 | char *bfin_board_name = "PNAV-1.0"; | 50 | const char bfin_board_name[] = "PNAV-1.0"; |
| 51 | 51 | ||
| 52 | /* | 52 | /* |
| 53 | * Driver needs to know address, irq and flag pin. | 53 | * Driver needs to know address, irq and flag pin. |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index f42ba3aa86d7..cc41f6c2ef4f 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | /* | 49 | /* |
| 50 | * Name the Board for the /proc/cpuinfo | 50 | * Name the Board for the /proc/cpuinfo |
| 51 | */ | 51 | */ |
| 52 | char *bfin_board_name = "ADDS-BF537-STAMP"; | 52 | const char bfin_board_name[] = "ADDS-BF537-STAMP"; |
| 53 | 53 | ||
| 54 | /* | 54 | /* |
| 55 | * Driver needs to know address, irq and flag pin. | 55 | * Driver needs to know address, irq and flag pin. |
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index 046e6d84bbfc..6b6490e66b30 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | /* | 49 | /* |
| 50 | * Name the Board for the /proc/cpuinfo | 50 | * Name the Board for the /proc/cpuinfo |
| 51 | */ | 51 | */ |
| 52 | char *bfin_board_name = "ADSP-BF548-EZKIT"; | 52 | const char bfin_board_name[] = "ADSP-BF548-EZKIT"; |
| 53 | 53 | ||
| 54 | /* | 54 | /* |
| 55 | * Driver needs to know address, irq and flag pin. | 55 | * Driver needs to know address, irq and flag pin. |
| @@ -560,7 +560,7 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
| 560 | 560 | ||
| 561 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 561 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
| 562 | &bf54x_spi_master0, | 562 | &bf54x_spi_master0, |
| 563 | /* &bf54x_spi_master1,*/ | 563 | &bf54x_spi_master1, |
| 564 | #endif | 564 | #endif |
| 565 | 565 | ||
| 566 | #if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE) | 566 | #if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE) |
diff --git a/arch/blackfin/mach-bf548/dma.c b/arch/blackfin/mach-bf548/dma.c index a8184113be48..957bf1366eff 100644 --- a/arch/blackfin/mach-bf548/dma.c +++ b/arch/blackfin/mach-bf548/dma.c | |||
| @@ -64,6 +64,7 @@ | |||
| 64 | (struct dma_register *) MDMA_D3_NEXT_DESC_PTR, | 64 | (struct dma_register *) MDMA_D3_NEXT_DESC_PTR, |
| 65 | (struct dma_register *) MDMA_S3_NEXT_DESC_PTR, | 65 | (struct dma_register *) MDMA_S3_NEXT_DESC_PTR, |
| 66 | }; | 66 | }; |
| 67 | EXPORT_SYMBOL(base_addr); | ||
| 67 | 68 | ||
| 68 | int channel2irq(unsigned int channel) | 69 | int channel2irq(unsigned int channel) |
| 69 | { | 70 | { |
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c index cd827a1b6ba1..97aeb43fd8b4 100644 --- a/arch/blackfin/mach-bf561/boards/cm_bf561.c +++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | /* | 42 | /* |
| 43 | * Name the Board for the /proc/cpuinfo | 43 | * Name the Board for the /proc/cpuinfo |
| 44 | */ | 44 | */ |
| 45 | char *bfin_board_name = "Bluetechnix CM BF561"; | 45 | const char bfin_board_name[] = "Bluetechnix CM BF561"; |
| 46 | 46 | ||
| 47 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 47 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
| 48 | /* all SPI peripherals info goes here */ | 48 | /* all SPI peripherals info goes here */ |
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index 57e14edca8b1..059d516cec23 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c | |||
| @@ -39,7 +39,7 @@ | |||
| 39 | /* | 39 | /* |
| 40 | * Name the Board for the /proc/cpuinfo | 40 | * Name the Board for the /proc/cpuinfo |
| 41 | */ | 41 | */ |
| 42 | char *bfin_board_name = "ADDS-BF561-EZKIT"; | 42 | const char bfin_board_name[] = "ADDS-BF561-EZKIT"; |
| 43 | 43 | ||
| 44 | #define ISP1761_BASE 0x2C0F0000 | 44 | #define ISP1761_BASE 0x2C0F0000 |
| 45 | #define ISP1761_IRQ IRQ_PF10 | 45 | #define ISP1761_IRQ IRQ_PF10 |
diff --git a/arch/blackfin/mach-bf561/boards/generic_board.c b/arch/blackfin/mach-bf561/boards/generic_board.c index 4dfea5da674c..46816be4b2ba 100644 --- a/arch/blackfin/mach-bf561/boards/generic_board.c +++ b/arch/blackfin/mach-bf561/boards/generic_board.c | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
| 33 | #include <linux/irq.h> | 33 | #include <linux/irq.h> |
| 34 | 34 | ||
| 35 | char *bfin_board_name = "UNKNOWN BOARD"; | 35 | const char bfin_board_name[] = "UNKNOWN BOARD"; |
| 36 | 36 | ||
| 37 | /* | 37 | /* |
| 38 | * Driver needs to know address, irq and flag pin. | 38 | * Driver needs to know address, irq and flag pin. |
diff --git a/arch/blackfin/mach-bf561/boards/tepla.c b/arch/blackfin/mach-bf561/boards/tepla.c index c442eb23db5e..4a17c6da2a59 100644 --- a/arch/blackfin/mach-bf561/boards/tepla.c +++ b/arch/blackfin/mach-bf561/boards/tepla.c | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
| 17 | #include <linux/irq.h> | 17 | #include <linux/irq.h> |
| 18 | 18 | ||
| 19 | char *bfin_board_name = "Tepla-BF561"; | 19 | const char bfin_board_name[] = "Tepla-BF561"; |
| 20 | 20 | ||
| 21 | /* | 21 | /* |
| 22 | * Driver needs to know address, irq and flag pin. | 22 | * Driver needs to know address, irq and flag pin. |
diff --git a/arch/blackfin/mach-common/ints-priority-dc.c b/arch/blackfin/mach-common/ints-priority-dc.c index 2db3546fc874..c2f05fabedc1 100644 --- a/arch/blackfin/mach-common/ints-priority-dc.c +++ b/arch/blackfin/mach-common/ints-priority-dc.c | |||
| @@ -52,7 +52,13 @@ | |||
| 52 | * - | 52 | * - |
| 53 | */ | 53 | */ |
| 54 | 54 | ||
| 55 | unsigned long irq_flags = 0; | 55 | /* Initialize this to an actual value to force it into the .data |
| 56 | * section so that we know it is properly initialized at entry into | ||
| 57 | * the kernel but before bss is initialized to zero (which is where | ||
| 58 | * it would live otherwise). The 0x1f magic represents the IRQs we | ||
| 59 | * cannot actually mask out in hardware. | ||
| 60 | */ | ||
| 61 | unsigned long irq_flags = 0x1f; | ||
| 56 | 62 | ||
| 57 | /* The number of spurious interrupts */ | 63 | /* The number of spurious interrupts */ |
| 58 | atomic_t num_spurious; | 64 | atomic_t num_spurious; |
diff --git a/arch/blackfin/mach-common/ints-priority-sc.c b/arch/blackfin/mach-common/ints-priority-sc.c index d3b7672b2b94..2d2b63567b30 100644 --- a/arch/blackfin/mach-common/ints-priority-sc.c +++ b/arch/blackfin/mach-common/ints-priority-sc.c | |||
| @@ -58,7 +58,13 @@ | |||
| 58 | * - | 58 | * - |
| 59 | */ | 59 | */ |
| 60 | 60 | ||
| 61 | unsigned long irq_flags = 0; | 61 | /* Initialize this to an actual value to force it into the .data |
| 62 | * section so that we know it is properly initialized at entry into | ||
| 63 | * the kernel but before bss is initialized to zero (which is where | ||
| 64 | * it would live otherwise). The 0x1f magic represents the IRQs we | ||
| 65 | * cannot actually mask out in hardware. | ||
| 66 | */ | ||
| 67 | unsigned long irq_flags = 0x1f; | ||
| 62 | 68 | ||
| 63 | /* The number of spurious interrupts */ | 69 | /* The number of spurious interrupts */ |
| 64 | atomic_t num_spurious; | 70 | atomic_t num_spurious; |
| @@ -92,10 +98,15 @@ static void __init search_IAR(void) | |||
| 92 | 98 | ||
| 93 | for (irqn = 0; irqn < NR_PERI_INTS; irqn++) { | 99 | for (irqn = 0; irqn < NR_PERI_INTS; irqn++) { |
| 94 | int iar_shift = (irqn & 7) * 4; | 100 | int iar_shift = (irqn & 7) * 4; |
| 95 | if (ivg == | 101 | if (ivg == |
| 96 | (0xf & | 102 | (0xf & |
| 103 | #ifndef CONFIG_BF52x | ||
| 97 | bfin_read32((unsigned long *)SIC_IAR0 + | 104 | bfin_read32((unsigned long *)SIC_IAR0 + |
| 98 | (irqn >> 3)) >> iar_shift)) { | 105 | (irqn >> 3)) >> iar_shift)) { |
| 106 | #else | ||
| 107 | bfin_read32((unsigned long *)SIC_IAR0 + | ||
| 108 | ((irqn%32) >> 3) + ((irqn / 32) * 16)) >> iar_shift)) { | ||
| 109 | #endif | ||
| 99 | ivg_table[irq_pos].irqno = IVG7 + irqn; | 110 | ivg_table[irq_pos].irqno = IVG7 + irqn; |
| 100 | ivg_table[irq_pos].isrflag = 1 << (irqn % 32); | 111 | ivg_table[irq_pos].isrflag = 1 << (irqn % 32); |
| 101 | ivg7_13[ivg].istop++; | 112 | ivg7_13[ivg].istop++; |
| @@ -140,7 +151,7 @@ static void bfin_core_unmask_irq(unsigned int irq) | |||
| 140 | 151 | ||
| 141 | static void bfin_internal_mask_irq(unsigned int irq) | 152 | static void bfin_internal_mask_irq(unsigned int irq) |
| 142 | { | 153 | { |
| 143 | #ifndef CONFIG_BF54x | 154 | #ifdef CONFIG_BF53x |
| 144 | bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() & | 155 | bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() & |
| 145 | ~(1 << (irq - (IRQ_CORETMR + 1)))); | 156 | ~(1 << (irq - (IRQ_CORETMR + 1)))); |
| 146 | #else | 157 | #else |
| @@ -155,7 +166,7 @@ static void bfin_internal_mask_irq(unsigned int irq) | |||
| 155 | 166 | ||
| 156 | static void bfin_internal_unmask_irq(unsigned int irq) | 167 | static void bfin_internal_unmask_irq(unsigned int irq) |
| 157 | { | 168 | { |
| 158 | #ifndef CONFIG_BF54x | 169 | #ifdef CONFIG_BF53x |
| 159 | bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() | | 170 | bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() | |
| 160 | (1 << (irq - (IRQ_CORETMR + 1)))); | 171 | (1 << (irq - (IRQ_CORETMR + 1)))); |
| 161 | #else | 172 | #else |
| @@ -750,13 +761,15 @@ int __init init_arch_irq(void) | |||
| 750 | int irq; | 761 | int irq; |
| 751 | unsigned long ilat = 0; | 762 | unsigned long ilat = 0; |
| 752 | /* Disable all the peripheral intrs - page 4-29 HW Ref manual */ | 763 | /* Disable all the peripheral intrs - page 4-29 HW Ref manual */ |
| 753 | #ifdef CONFIG_BF54x | 764 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) |
| 754 | bfin_write_SIC_IMASK0(SIC_UNMASK_ALL); | 765 | bfin_write_SIC_IMASK0(SIC_UNMASK_ALL); |
| 755 | bfin_write_SIC_IMASK1(SIC_UNMASK_ALL); | 766 | bfin_write_SIC_IMASK1(SIC_UNMASK_ALL); |
| 756 | bfin_write_SIC_IMASK2(SIC_UNMASK_ALL); | ||
| 757 | bfin_write_SIC_IWR0(IWR_ENABLE_ALL); | 767 | bfin_write_SIC_IWR0(IWR_ENABLE_ALL); |
| 758 | bfin_write_SIC_IWR1(IWR_ENABLE_ALL); | 768 | bfin_write_SIC_IWR1(IWR_ENABLE_ALL); |
| 769 | #ifdef CONFIG_BF54x | ||
| 770 | bfin_write_SIC_IMASK2(SIC_UNMASK_ALL); | ||
| 759 | bfin_write_SIC_IWR2(IWR_ENABLE_ALL); | 771 | bfin_write_SIC_IWR2(IWR_ENABLE_ALL); |
| 772 | #endif | ||
| 760 | #else | 773 | #else |
| 761 | bfin_write_SIC_IMASK(SIC_UNMASK_ALL); | 774 | bfin_write_SIC_IMASK(SIC_UNMASK_ALL); |
| 762 | bfin_write_SIC_IWR(IWR_ENABLE_ALL); | 775 | bfin_write_SIC_IWR(IWR_ENABLE_ALL); |
| @@ -787,7 +800,7 @@ int __init init_arch_irq(void) | |||
| 787 | 800 | ||
| 788 | switch (irq) { | 801 | switch (irq) { |
| 789 | #ifdef CONFIG_IRQCHIP_DEMUX_GPIO | 802 | #ifdef CONFIG_IRQCHIP_DEMUX_GPIO |
| 790 | #ifndef CONFIG_BF54x | 803 | #if defined(CONFIG_BF53x) |
| 791 | case IRQ_PROG_INTA: | 804 | case IRQ_PROG_INTA: |
| 792 | set_irq_chained_handler(irq, | 805 | set_irq_chained_handler(irq, |
| 793 | bfin_demux_gpio_irq); | 806 | bfin_demux_gpio_irq); |
| @@ -798,7 +811,7 @@ int __init init_arch_irq(void) | |||
| 798 | bfin_demux_gpio_irq); | 811 | bfin_demux_gpio_irq); |
| 799 | break; | 812 | break; |
| 800 | #endif | 813 | #endif |
| 801 | #else | 814 | #elif defined(CONFIG_BF54x) |
| 802 | case IRQ_PINT0: | 815 | case IRQ_PINT0: |
| 803 | set_irq_chained_handler(irq, | 816 | set_irq_chained_handler(irq, |
| 804 | bfin_demux_gpio_irq); | 817 | bfin_demux_gpio_irq); |
| @@ -815,7 +828,20 @@ int __init init_arch_irq(void) | |||
| 815 | set_irq_chained_handler(irq, | 828 | set_irq_chained_handler(irq, |
| 816 | bfin_demux_gpio_irq); | 829 | bfin_demux_gpio_irq); |
| 817 | break; | 830 | break; |
| 818 | #endif /*CONFIG_BF54x */ | 831 | #elif defined(CONFIG_BF52x) |
| 832 | case IRQ_PORTF_INTA: | ||
| 833 | set_irq_chained_handler(irq, | ||
| 834 | bfin_demux_gpio_irq); | ||
| 835 | break; | ||
| 836 | case IRQ_PORTG_INTA: | ||
| 837 | set_irq_chained_handler(irq, | ||
| 838 | bfin_demux_gpio_irq); | ||
| 839 | break; | ||
| 840 | case IRQ_PORTH_INTA: | ||
| 841 | set_irq_chained_handler(irq, | ||
| 842 | bfin_demux_gpio_irq); | ||
| 843 | break; | ||
| 844 | #endif | ||
| 819 | #endif | 845 | #endif |
| 820 | default: | 846 | default: |
| 821 | set_irq_handler(irq, handle_simple_irq); | 847 | set_irq_handler(irq, handle_simple_irq); |
| @@ -880,14 +906,15 @@ void do_irq(int vec, struct pt_regs *fp) | |||
| 880 | } else { | 906 | } else { |
| 881 | struct ivgx *ivg = ivg7_13[vec - IVG7].ifirst; | 907 | struct ivgx *ivg = ivg7_13[vec - IVG7].ifirst; |
| 882 | struct ivgx *ivg_stop = ivg7_13[vec - IVG7].istop; | 908 | struct ivgx *ivg_stop = ivg7_13[vec - IVG7].istop; |
| 883 | #ifdef CONFIG_BF54x | 909 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) |
| 884 | unsigned long sic_status[3]; | 910 | unsigned long sic_status[3]; |
| 885 | 911 | ||
| 886 | SSYNC(); | 912 | SSYNC(); |
| 887 | sic_status[0] = bfin_read_SIC_ISR(0) & bfin_read_SIC_IMASK(0); | 913 | sic_status[0] = bfin_read_SIC_ISR0() & bfin_read_SIC_IMASK0(); |
| 888 | sic_status[1] = bfin_read_SIC_ISR(1) & bfin_read_SIC_IMASK(1); | 914 | sic_status[1] = bfin_read_SIC_ISR1() & bfin_read_SIC_IMASK1(); |
| 889 | sic_status[2] = bfin_read_SIC_ISR(2) & bfin_read_SIC_IMASK(2); | 915 | #ifdef CONFIG_BF54x |
| 890 | 916 | sic_status[2] = bfin_read_SIC_ISR2() & bfin_read_SIC_IMASK2(); | |
| 917 | #endif | ||
| 891 | for (;; ivg++) { | 918 | for (;; ivg++) { |
| 892 | if (ivg >= ivg_stop) { | 919 | if (ivg >= ivg_stop) { |
| 893 | atomic_inc(&num_spurious); | 920 | atomic_inc(&num_spurious); |
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 87665d7df6f2..ed438bc7e98d 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig | |||
| @@ -624,7 +624,7 @@ choice | |||
| 624 | 624 | ||
| 625 | config SERIAL_BFIN_DMA | 625 | config SERIAL_BFIN_DMA |
| 626 | bool "DMA mode" | 626 | bool "DMA mode" |
| 627 | depends on DMA_UNCACHED_1M && !KGDB_UART | 627 | depends on !DMA_UNCACHED_NONE && !KGDB_UART |
| 628 | help | 628 | help |
| 629 | This driver works under DMA mode. If this option is selected, the | 629 | This driver works under DMA mode. If this option is selected, the |
| 630 | blackfin simple dma driver is also enabled. | 630 | blackfin simple dma driver is also enabled. |
diff --git a/include/asm-blackfin/bf5xx_timers.h b/include/asm-blackfin/bf5xx_timers.h deleted file mode 100644 index 86c770321b61..000000000000 --- a/include/asm-blackfin/bf5xx_timers.h +++ /dev/null | |||
| @@ -1,209 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * include/asm/bf5xx_timers.h | ||
| 3 | * | ||
| 4 | * This file contains the major Data structures and constants | ||
| 5 | * used for General Purpose Timer Implementation in BF5xx | ||
| 6 | * | ||
| 7 | * Copyright (C) 2005 John DeHority | ||
| 8 | * Copyright (C) 2006 Hella Aglaia GmbH (awe@aglaia-gmbh.de) | ||
| 9 | * | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef _BLACKFIN_TIMERS_H_ | ||
| 13 | #define _BLACKFIN_TIMERS_H_ | ||
| 14 | |||
| 15 | #undef MAX_BLACKFIN_GPTIMERS | ||
| 16 | /* | ||
| 17 | * BF537: 8 timers: | ||
| 18 | */ | ||
| 19 | #if defined(CONFIG_BF537) | ||
| 20 | # define MAX_BLACKFIN_GPTIMERS 8 | ||
| 21 | # define TIMER0_GROUP_REG TIMER_ENABLE | ||
| 22 | #endif | ||
| 23 | /* | ||
| 24 | * BF561: 12 timers: | ||
| 25 | */ | ||
| 26 | #if defined(CONFIG_BF561) | ||
| 27 | # define MAX_BLACKFIN_GPTIMERS 12 | ||
| 28 | # define TIMER0_GROUP_REG TMRS8_ENABLE | ||
| 29 | # define TIMER8_GROUP_REG TMRS4_ENABLE | ||
| 30 | #endif | ||
| 31 | /* | ||
| 32 | * All others: 3 timers: | ||
| 33 | */ | ||
| 34 | #if !defined(MAX_BLACKFIN_GPTIMERS) | ||
| 35 | # define MAX_BLACKFIN_GPTIMERS 3 | ||
| 36 | # define TIMER0_GROUP_REG TIMER_ENABLE | ||
| 37 | #endif | ||
| 38 | |||
| 39 | #define BLACKFIN_GPTIMER_IDMASK ((1UL << MAX_BLACKFIN_GPTIMERS) - 1) | ||
| 40 | #define BFIN_TIMER_OCTET(x) ((x) >> 3) | ||
| 41 | |||
| 42 | /* used in masks for timer_enable() and timer_disable() */ | ||
| 43 | #define TIMER0bit 0x0001 /* 0001b */ | ||
| 44 | #define TIMER1bit 0x0002 /* 0010b */ | ||
| 45 | #define TIMER2bit 0x0004 /* 0100b */ | ||
| 46 | |||
| 47 | #if (MAX_BLACKFIN_GPTIMERS > 3) | ||
| 48 | # define TIMER3bit 0x0008 | ||
| 49 | # define TIMER4bit 0x0010 | ||
| 50 | # define TIMER5bit 0x0020 | ||
| 51 | # define TIMER6bit 0x0040 | ||
| 52 | # define TIMER7bit 0x0080 | ||
| 53 | #endif | ||
| 54 | |||
| 55 | #if (MAX_BLACKFIN_GPTIMERS > 8) | ||
| 56 | # define TIMER8bit 0x0100 | ||
| 57 | # define TIMER9bit 0x0200 | ||
| 58 | # define TIMER10bit 0x0400 | ||
| 59 | # define TIMER11bit 0x0800 | ||
| 60 | #endif | ||
| 61 | |||
| 62 | #define TIMER0_id 0 | ||
| 63 | #define TIMER1_id 1 | ||
| 64 | #define TIMER2_id 2 | ||
| 65 | |||
| 66 | #if (MAX_BLACKFIN_GPTIMERS > 3) | ||
| 67 | # define TIMER3_id 3 | ||
| 68 | # define TIMER4_id 4 | ||
| 69 | # define TIMER5_id 5 | ||
| 70 | # define TIMER6_id 6 | ||
| 71 | # define TIMER7_id 7 | ||
| 72 | #endif | ||
| 73 | |||
| 74 | #if (MAX_BLACKFIN_GPTIMERS > 8) | ||
| 75 | # define TIMER8_id 8 | ||
| 76 | # define TIMER9_id 9 | ||
| 77 | # define TIMER10_id 10 | ||
| 78 | # define TIMER11_id 11 | ||
| 79 | #endif | ||
| 80 | |||
| 81 | /* associated timers for ppi framesync: */ | ||
| 82 | |||
| 83 | #if defined(CONFIG_BF561) | ||
| 84 | # define FS0_1_TIMER_ID TIMER8_id | ||
| 85 | # define FS0_2_TIMER_ID TIMER9_id | ||
| 86 | # define FS1_1_TIMER_ID TIMER10_id | ||
| 87 | # define FS1_2_TIMER_ID TIMER11_id | ||
| 88 | # define FS0_1_TIMER_BIT TIMER8bit | ||
| 89 | # define FS0_2_TIMER_BIT TIMER9bit | ||
| 90 | # define FS1_1_TIMER_BIT TIMER10bit | ||
| 91 | # define FS1_2_TIMER_BIT TIMER11bit | ||
| 92 | # undef FS1_TIMER_ID | ||
| 93 | # undef FS2_TIMER_ID | ||
| 94 | # undef FS1_TIMER_BIT | ||
| 95 | # undef FS2_TIMER_BIT | ||
| 96 | #else | ||
| 97 | # define FS1_TIMER_ID TIMER0_id | ||
| 98 | # define FS2_TIMER_ID TIMER1_id | ||
| 99 | # define FS1_TIMER_BIT TIMER0bit | ||
| 100 | # define FS2_TIMER_BIT TIMER1bit | ||
| 101 | #endif | ||
| 102 | |||
| 103 | /* | ||
| 104 | ** Timer Configuration Register Bits | ||
| 105 | */ | ||
| 106 | #define TIMER_ERR 0xC000 | ||
| 107 | #define TIMER_ERR_OVFL 0x4000 | ||
| 108 | #define TIMER_ERR_PROG_PER 0x8000 | ||
| 109 | #define TIMER_ERR_PROG_PW 0xC000 | ||
| 110 | #define TIMER_EMU_RUN 0x0200 | ||
| 111 | #define TIMER_TOGGLE_HI 0x0100 | ||
| 112 | #define TIMER_CLK_SEL 0x0080 | ||
| 113 | #define TIMER_OUT_DIS 0x0040 | ||
| 114 | #define TIMER_TIN_SEL 0x0020 | ||
| 115 | #define TIMER_IRQ_ENA 0x0010 | ||
| 116 | #define TIMER_PERIOD_CNT 0x0008 | ||
| 117 | #define TIMER_PULSE_HI 0x0004 | ||
| 118 | #define TIMER_MODE 0x0003 | ||
| 119 | #define TIMER_MODE_PWM 0x0001 | ||
| 120 | #define TIMER_MODE_WDTH 0x0002 | ||
| 121 | #define TIMER_MODE_EXT_CLK 0x0003 | ||
| 122 | |||
| 123 | /* | ||
| 124 | ** Timer Status Register Bits | ||
| 125 | */ | ||
| 126 | #define TIMER_STATUS_TIMIL0 0x0001 | ||
| 127 | #define TIMER_STATUS_TIMIL1 0x0002 | ||
| 128 | #define TIMER_STATUS_TIMIL2 0x0004 | ||
| 129 | #if (MAX_BLACKFIN_GPTIMERS > 3) | ||
| 130 | # define TIMER_STATUS_TIMIL3 0x00000008 | ||
| 131 | # define TIMER_STATUS_TIMIL4 0x00010000 | ||
| 132 | # define TIMER_STATUS_TIMIL5 0x00020000 | ||
| 133 | # define TIMER_STATUS_TIMIL6 0x00040000 | ||
| 134 | # define TIMER_STATUS_TIMIL7 0x00080000 | ||
| 135 | # if (MAX_BLACKFIN_GPTIMERS > 8) | ||
| 136 | # define TIMER_STATUS_TIMIL8 0x0001 | ||
| 137 | # define TIMER_STATUS_TIMIL9 0x0002 | ||
| 138 | # define TIMER_STATUS_TIMIL10 0x0004 | ||
| 139 | # define TIMER_STATUS_TIMIL11 0x0008 | ||
| 140 | # endif | ||
| 141 | # define TIMER_STATUS_INTR 0x000F000F | ||
| 142 | #else | ||
| 143 | # define TIMER_STATUS_INTR 0x0007 /* any timer interrupt */ | ||
| 144 | #endif | ||
| 145 | |||
| 146 | #define TIMER_STATUS_TOVF0 0x0010 /* timer 0 overflow error */ | ||
| 147 | #define TIMER_STATUS_TOVF1 0x0020 | ||
| 148 | #define TIMER_STATUS_TOVF2 0x0040 | ||
| 149 | #if (MAX_BLACKFIN_GPTIMERS > 3) | ||
| 150 | # define TIMER_STATUS_TOVF3 0x00000080 | ||
| 151 | # define TIMER_STATUS_TOVF4 0x00100000 | ||
| 152 | # define TIMER_STATUS_TOVF5 0x00200000 | ||
| 153 | # define TIMER_STATUS_TOVF6 0x00400000 | ||
| 154 | # define TIMER_STATUS_TOVF7 0x00800000 | ||
| 155 | # if (MAX_BLACKFIN_GPTIMERS > 8) | ||
| 156 | # define TIMER_STATUS_TOVF8 0x0010 | ||
| 157 | # define TIMER_STATUS_TOVF9 0x0020 | ||
| 158 | # define TIMER_STATUS_TOVF10 0x0040 | ||
| 159 | # define TIMER_STATUS_TOVF11 0x0080 | ||
| 160 | # endif | ||
| 161 | # define TIMER_STATUS_OFLOW 0x00F000F0 | ||
| 162 | #else | ||
| 163 | # define TIMER_STATUS_OFLOW 0x0070 /* any timer overflow */ | ||
| 164 | #endif | ||
| 165 | |||
| 166 | /* | ||
| 167 | ** Timer Slave Enable Status : write 1 to clear | ||
| 168 | */ | ||
| 169 | #define TIMER_STATUS_TRUN0 0x1000 | ||
| 170 | #define TIMER_STATUS_TRUN1 0x2000 | ||
| 171 | #define TIMER_STATUS_TRUN2 0x4000 | ||
| 172 | #if (MAX_BLACKFIN_GPTIMERS > 3) | ||
| 173 | # define TIMER_STATUS_TRUN3 0x00008000 | ||
| 174 | # define TIMER_STATUS_TRUN4 0x10000000 | ||
| 175 | # define TIMER_STATUS_TRUN5 0x20000000 | ||
| 176 | # define TIMER_STATUS_TRUN6 0x40000000 | ||
| 177 | # define TIMER_STATUS_TRUN7 0x80000000 | ||
| 178 | # define TIMER_STATUS_TRUN 0xF000F000 | ||
| 179 | # if (MAX_BLACKFIN_GPTIMERS > 8) | ||
| 180 | # define TIMER_STATUS_TRUN8 0x1000 | ||
| 181 | # define TIMER_STATUS_TRUN9 0x2000 | ||
| 182 | # define TIMER_STATUS_TRUN10 0x4000 | ||
| 183 | # define TIMER_STATUS_TRUN11 0x8000 | ||
| 184 | # endif | ||
| 185 | #else | ||
| 186 | # define TIMER_STATUS_TRUN 0x7000 | ||
| 187 | #endif | ||
| 188 | |||
| 189 | /******************************************************************************* | ||
| 190 | * GP_TIMER API's | ||
| 191 | *******************************************************************************/ | ||
| 192 | |||
| 193 | void set_gptimer_pwidth (int timer_id, int width); | ||
| 194 | int get_gptimer_pwidth (int timer_id); | ||
| 195 | void set_gptimer_period (int timer_id, int period); | ||
| 196 | int get_gptimer_period (int timer_id); | ||
| 197 | int get_gptimer_count (int timer_id); | ||
| 198 | short get_gptimer_intr (int timer_id); | ||
| 199 | void set_gptimer_config (int timer_id, short config); | ||
| 200 | short get_gptimer_config (int timer_id); | ||
| 201 | void set_gptimer_pulse_hi (int timer_id); | ||
| 202 | void clear_gptimer_pulse_hi(int timer_id); | ||
| 203 | void enable_gptimers (short mask); | ||
| 204 | void disable_gptimers (short mask); | ||
| 205 | short get_enabled_timers (void); | ||
| 206 | int get_gptimer_status (int octet); | ||
| 207 | void set_gptimer_status (int octet, int value); | ||
| 208 | |||
| 209 | #endif | ||
diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h index a970781a0f98..14cb8d35924e 100644 --- a/include/asm-blackfin/bfin-global.h +++ b/include/asm-blackfin/bfin-global.h | |||
| @@ -47,6 +47,8 @@ | |||
| 47 | 47 | ||
| 48 | extern unsigned long get_cclk(void); | 48 | extern unsigned long get_cclk(void); |
| 49 | extern unsigned long get_sclk(void); | 49 | extern unsigned long get_sclk(void); |
| 50 | extern unsigned long sclk_to_usecs(unsigned long sclk); | ||
| 51 | extern unsigned long usecs_to_sclk(unsigned long usecs); | ||
| 50 | 52 | ||
| 51 | extern void dump_thread(struct pt_regs *regs, struct user *dump); | 53 | extern void dump_thread(struct pt_regs *regs, struct user *dump); |
| 52 | extern void dump_bfin_regs(struct pt_regs *fp, void *retaddr); | 54 | extern void dump_bfin_regs(struct pt_regs *fp, void *retaddr); |
| @@ -105,7 +107,7 @@ extern void led_disp_num(int); | |||
| 105 | extern void led_toggle_num(int); | 107 | extern void led_toggle_num(int); |
| 106 | extern void init_leds(void); | 108 | extern void init_leds(void); |
| 107 | 109 | ||
| 108 | extern char *bfin_board_name __attribute__ ((weak)); | 110 | extern const char bfin_board_name[]; |
| 109 | extern unsigned long wall_jiffies; | 111 | extern unsigned long wall_jiffies; |
| 110 | extern unsigned long ipdt_table[]; | 112 | extern unsigned long ipdt_table[]; |
| 111 | extern unsigned long dpdt_table[]; | 113 | extern unsigned long dpdt_table[]; |
diff --git a/include/asm-blackfin/dma.h b/include/asm-blackfin/dma.h index b42a531e7a1b..b469505af364 100644 --- a/include/asm-blackfin/dma.h +++ b/include/asm-blackfin/dma.h | |||
| @@ -109,9 +109,7 @@ struct dma_register { | |||
| 109 | 109 | ||
| 110 | unsigned long curr_desc_ptr; /* DMA Current Descriptor Pointer | 110 | unsigned long curr_desc_ptr; /* DMA Current Descriptor Pointer |
| 111 | register */ | 111 | register */ |
| 112 | unsigned short curr_addr_ptr_lo; /* DMA Current Address Pointer | 112 | unsigned long curr_addr_ptr; /* DMA Current Address Pointer |
| 113 | register */ | ||
| 114 | unsigned short curr_addr_ptr_hi; /* DMA Current Address Pointer | ||
| 115 | register */ | 113 | register */ |
| 116 | unsigned short irq_status; /* DMA irq status register */ | 114 | unsigned short irq_status; /* DMA irq status register */ |
| 117 | unsigned short dummy6; | 115 | unsigned short dummy6; |
| @@ -166,6 +164,9 @@ void set_dma_curr_addr(unsigned int channel, unsigned long addr); | |||
| 166 | unsigned short get_dma_curr_irqstat(unsigned int channel); | 164 | unsigned short get_dma_curr_irqstat(unsigned int channel); |
| 167 | unsigned short get_dma_curr_xcount(unsigned int channel); | 165 | unsigned short get_dma_curr_xcount(unsigned int channel); |
| 168 | unsigned short get_dma_curr_ycount(unsigned int channel); | 166 | unsigned short get_dma_curr_ycount(unsigned int channel); |
| 167 | unsigned long get_dma_next_desc_ptr(unsigned int channel); | ||
| 168 | unsigned long get_dma_curr_desc_ptr(unsigned int channel); | ||
| 169 | unsigned long get_dma_curr_addr(unsigned int channel); | ||
| 169 | 170 | ||
| 170 | /* set large DMA mode descriptor */ | 171 | /* set large DMA mode descriptor */ |
| 171 | void set_dma_sg(unsigned int channel, struct dmasg *sg, int nr_sg); | 172 | void set_dma_sg(unsigned int channel, struct dmasg *sg, int nr_sg); |
diff --git a/include/asm-blackfin/gpio.h b/include/asm-blackfin/gpio.h index dd203cd93796..33ce98ef7e0f 100644 --- a/include/asm-blackfin/gpio.h +++ b/include/asm-blackfin/gpio.h | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | 29 | ||
| 30 | /* | 30 | /* |
| 31 | * Number BF537/6/4 BF561 BF533/2/1 | 31 | * Number BF537/6/4 BF561 BF533/2/1 |
| 32 | * BF527/5/2 | ||
| 32 | * | 33 | * |
| 33 | * GPIO_0 PF0 PF0 PF0 | 34 | * GPIO_0 PF0 PF0 PF0 |
| 34 | * GPIO_1 PF1 PF1 PF1 | 35 | * GPIO_1 PF1 PF1 PF1 |
| @@ -164,7 +165,7 @@ | |||
| 164 | 165 | ||
| 165 | #endif | 166 | #endif |
| 166 | 167 | ||
| 167 | #ifdef BF537_FAMILY | 168 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) |
| 168 | #define MAX_BLACKFIN_GPIOS 48 | 169 | #define MAX_BLACKFIN_GPIOS 48 |
| 169 | 170 | ||
| 170 | #define GPIO_PF0 0 | 171 | #define GPIO_PF0 0 |
diff --git a/include/asm-blackfin/gptimers.h b/include/asm-blackfin/gptimers.h new file mode 100644 index 000000000000..c97ab03e43a6 --- /dev/null +++ b/include/asm-blackfin/gptimers.h | |||
| @@ -0,0 +1,210 @@ | |||
| 1 | /* | ||
| 2 | * include/asm/bf5xx_timers.h | ||
| 3 | * | ||
| 4 | * This file contains the major Data structures and constants | ||
| 5 | * used for General Purpose Timer Implementation in BF5xx | ||
| 6 | * | ||
| 7 | * Copyright (C) 2005 John DeHority | ||
| 8 | * Copyright (C) 2006 Hella Aglaia GmbH (awe@aglaia-gmbh.de) | ||
| 9 | * | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef _BLACKFIN_TIMERS_H_ | ||
| 13 | #define _BLACKFIN_TIMERS_H_ | ||
| 14 | |||
| 15 | #include <linux/types.h> | ||
| 16 | #include <asm/blackfin.h> | ||
| 17 | |||
| 18 | /* | ||
| 19 | * BF537/BF527: 8 timers: | ||
| 20 | */ | ||
| 21 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) | ||
| 22 | # define MAX_BLACKFIN_GPTIMERS 8 | ||
| 23 | # define TIMER0_GROUP_REG TIMER_ENABLE | ||
| 24 | #endif | ||
| 25 | /* | ||
| 26 | * BF561: 12 timers: | ||
| 27 | */ | ||
| 28 | #if defined(CONFIG_BF561) | ||
| 29 | # define MAX_BLACKFIN_GPTIMERS 12 | ||
| 30 | # define TIMER0_GROUP_REG TMRS8_ENABLE | ||
| 31 | # define TIMER8_GROUP_REG TMRS4_ENABLE | ||
| 32 | #endif | ||
| 33 | /* | ||
| 34 | * All others: 3 timers: | ||
| 35 | */ | ||
| 36 | #if !defined(MAX_BLACKFIN_GPTIMERS) | ||
| 37 | # define MAX_BLACKFIN_GPTIMERS 3 | ||
| 38 | # define TIMER0_GROUP_REG TIMER_ENABLE | ||
| 39 | #endif | ||
| 40 | |||
| 41 | #define BLACKFIN_GPTIMER_IDMASK ((1UL << MAX_BLACKFIN_GPTIMERS) - 1) | ||
| 42 | #define BFIN_TIMER_OCTET(x) ((x) >> 3) | ||
| 43 | |||
| 44 | /* used in masks for timer_enable() and timer_disable() */ | ||
| 45 | #define TIMER0bit 0x0001 /* 0001b */ | ||
| 46 | #define TIMER1bit 0x0002 /* 0010b */ | ||
| 47 | #define TIMER2bit 0x0004 /* 0100b */ | ||
| 48 | |||
| 49 | #if (MAX_BLACKFIN_GPTIMERS > 3) | ||
| 50 | # define TIMER3bit 0x0008 | ||
| 51 | # define TIMER4bit 0x0010 | ||
| 52 | # define TIMER5bit 0x0020 | ||
| 53 | # define TIMER6bit 0x0040 | ||
| 54 | # define TIMER7bit 0x0080 | ||
| 55 | #endif | ||
| 56 | |||
| 57 | #if (MAX_BLACKFIN_GPTIMERS > 8) | ||
| 58 | # define TIMER8bit 0x0100 | ||
| 59 | # define TIMER9bit 0x0200 | ||
| 60 | # define TIMER10bit 0x0400 | ||
| 61 | # define TIMER11bit 0x0800 | ||
| 62 | #endif | ||
| 63 | |||
| 64 | #define TIMER0_id 0 | ||
| 65 | #define TIMER1_id 1 | ||
| 66 | #define TIMER2_id 2 | ||
| 67 | |||
| 68 | #if (MAX_BLACKFIN_GPTIMERS > 3) | ||
| 69 | # define TIMER3_id 3 | ||
| 70 | # define TIMER4_id 4 | ||
| 71 | # define TIMER5_id 5 | ||
| 72 | # define TIMER6_id 6 | ||
| 73 | # define TIMER7_id 7 | ||
| 74 | #endif | ||
| 75 | |||
| 76 | #if (MAX_BLACKFIN_GPTIMERS > 8) | ||
| 77 | # define TIMER8_id 8 | ||
| 78 | # define TIMER9_id 9 | ||
| 79 | # define TIMER10_id 10 | ||
| 80 | # define TIMER11_id 11 | ||
| 81 | #endif | ||
| 82 | |||
| 83 | /* associated timers for ppi framesync: */ | ||
| 84 | |||
| 85 | #if defined(CONFIG_BF561) | ||
| 86 | # define FS0_1_TIMER_ID TIMER8_id | ||
| 87 | # define FS0_2_TIMER_ID TIMER9_id | ||
| 88 | # define FS1_1_TIMER_ID TIMER10_id | ||
| 89 | # define FS1_2_TIMER_ID TIMER11_id | ||
| 90 | # define FS0_1_TIMER_BIT TIMER8bit | ||
| 91 | # define FS0_2_TIMER_BIT TIMER9bit | ||
| 92 | # define FS1_1_TIMER_BIT TIMER10bit | ||
| 93 | # define FS1_2_TIMER_BIT TIMER11bit | ||
| 94 | # undef FS1_TIMER_ID | ||
| 95 | # undef FS2_TIMER_ID | ||
| 96 | # undef FS1_TIMER_BIT | ||
| 97 | # undef FS2_TIMER_BIT | ||
| 98 | #else | ||
| 99 | # define FS1_TIMER_ID TIMER0_id | ||
| 100 | # define FS2_TIMER_ID TIMER1_id | ||
| 101 | # define FS1_TIMER_BIT TIMER0bit | ||
| 102 | # define FS2_TIMER_BIT TIMER1bit | ||
| 103 | #endif | ||
| 104 | |||
| 105 | /* | ||
| 106 | * Timer Configuration Register Bits | ||
| 107 | */ | ||
| 108 | #define TIMER_ERR 0xC000 | ||
| 109 | #define TIMER_ERR_OVFL 0x4000 | ||
| 110 | #define TIMER_ERR_PROG_PER 0x8000 | ||
| 111 | #define TIMER_ERR_PROG_PW 0xC000 | ||
| 112 | #define TIMER_EMU_RUN 0x0200 | ||
| 113 | #define TIMER_TOGGLE_HI 0x0100 | ||
| 114 | #define TIMER_CLK_SEL 0x0080 | ||
| 115 | #define TIMER_OUT_DIS 0x0040 | ||
| 116 | #define TIMER_TIN_SEL 0x0020 | ||
| 117 | #define TIMER_IRQ_ENA 0x0010 | ||
| 118 | #define TIMER_PERIOD_CNT 0x0008 | ||
| 119 | #define TIMER_PULSE_HI 0x0004 | ||
| 120 | #define TIMER_MODE 0x0003 | ||
| 121 | #define TIMER_MODE_PWM 0x0001 | ||
| 122 | #define TIMER_MODE_WDTH 0x0002 | ||
| 123 | #define TIMER_MODE_EXT_CLK 0x0003 | ||
| 124 | |||
| 125 | /* | ||
| 126 | * Timer Status Register Bits | ||
| 127 | */ | ||
| 128 | #define TIMER_STATUS_TIMIL0 0x0001 | ||
| 129 | #define TIMER_STATUS_TIMIL1 0x0002 | ||
| 130 | #define TIMER_STATUS_TIMIL2 0x0004 | ||
| 131 | #if (MAX_BLACKFIN_GPTIMERS > 3) | ||
| 132 | # define TIMER_STATUS_TIMIL3 0x00000008 | ||
| 133 | # define TIMER_STATUS_TIMIL4 0x00010000 | ||
| 134 | # define TIMER_STATUS_TIMIL5 0x00020000 | ||
| 135 | # define TIMER_STATUS_TIMIL6 0x00040000 | ||
| 136 | # define TIMER_STATUS_TIMIL7 0x00080000 | ||
| 137 | # if (MAX_BLACKFIN_GPTIMERS > 8) | ||
| 138 | # define TIMER_STATUS_TIMIL8 0x0001 | ||
| 139 | # define TIMER_STATUS_TIMIL9 0x0002 | ||
| 140 | # define TIMER_STATUS_TIMIL10 0x0004 | ||
| 141 | # define TIMER_STATUS_TIMIL11 0x0008 | ||
| 142 | # endif | ||
| 143 | # define TIMER_STATUS_INTR 0x000F000F | ||
| 144 | #else | ||
| 145 | # define TIMER_STATUS_INTR 0x0007 /* any timer interrupt */ | ||
| 146 | #endif | ||
| 147 | |||
| 148 | #define TIMER_STATUS_TOVF0 0x0010 /* timer 0 overflow error */ | ||
| 149 | #define TIMER_STATUS_TOVF1 0x0020 | ||
| 150 | #define TIMER_STATUS_TOVF2 0x0040 | ||
| 151 | #if (MAX_BLACKFIN_GPTIMERS > 3) | ||
| 152 | # define TIMER_STATUS_TOVF3 0x00000080 | ||
| 153 | # define TIMER_STATUS_TOVF4 0x00100000 | ||
| 154 | # define TIMER_STATUS_TOVF5 0x00200000 | ||
| 155 | # define TIMER_STATUS_TOVF6 0x00400000 | ||
| 156 | # define TIMER_STATUS_TOVF7 0x00800000 | ||
| 157 | # if (MAX_BLACKFIN_GPTIMERS > 8) | ||
| 158 | # define TIMER_STATUS_TOVF8 0x0010 | ||
| 159 | # define TIMER_STATUS_TOVF9 0x0020 | ||
| 160 | # define TIMER_STATUS_TOVF10 0x0040 | ||
| 161 | # define TIMER_STATUS_TOVF11 0x0080 | ||
| 162 | # endif | ||
| 163 | # define TIMER_STATUS_OFLOW 0x00F000F0 | ||
| 164 | #else | ||
| 165 | # define TIMER_STATUS_OFLOW 0x0070 /* any timer overflow */ | ||
| 166 | #endif | ||
| 167 | |||
| 168 | /* | ||
| 169 | * Timer Slave Enable Status : write 1 to clear | ||
| 170 | */ | ||
| 171 | #define TIMER_STATUS_TRUN0 0x1000 | ||
| 172 | #define TIMER_STATUS_TRUN1 0x2000 | ||
| 173 | #define TIMER_STATUS_TRUN2 0x4000 | ||
| 174 | #if (MAX_BLACKFIN_GPTIMERS > 3) | ||
| 175 | # define TIMER_STATUS_TRUN3 0x00008000 | ||
| 176 | # define TIMER_STATUS_TRUN4 0x10000000 | ||
| 177 | # define TIMER_STATUS_TRUN5 0x20000000 | ||
| 178 | # define TIMER_STATUS_TRUN6 0x40000000 | ||
| 179 | # define TIMER_STATUS_TRUN7 0x80000000 | ||
| 180 | # define TIMER_STATUS_TRUN 0xF000F000 | ||
| 181 | # if (MAX_BLACKFIN_GPTIMERS > 8) | ||
| 182 | # define TIMER_STATUS_TRUN8 0x1000 | ||
| 183 | # define TIMER_STATUS_TRUN9 0x2000 | ||
| 184 | # define TIMER_STATUS_TRUN10 0x4000 | ||
| 185 | # define TIMER_STATUS_TRUN11 0x8000 | ||
| 186 | # endif | ||
| 187 | #else | ||
| 188 | # define TIMER_STATUS_TRUN 0x7000 | ||
| 189 | #endif | ||
| 190 | |||
| 191 | /* The actual gptimer API */ | ||
| 192 | |||
| 193 | void set_gptimer_pwidth (int timer_id, uint32_t width); | ||
| 194 | uint32_t get_gptimer_pwidth (int timer_id); | ||
| 195 | void set_gptimer_period (int timer_id, uint32_t period); | ||
| 196 | uint32_t get_gptimer_period (int timer_id); | ||
| 197 | uint32_t get_gptimer_count (int timer_id); | ||
| 198 | uint16_t get_gptimer_intr (int timer_id); | ||
| 199 | void clear_gptimer_intr (int timer_id); | ||
| 200 | void set_gptimer_config (int timer_id, uint16_t config); | ||
| 201 | uint16_t get_gptimer_config (int timer_id); | ||
| 202 | void set_gptimer_pulse_hi (int timer_id); | ||
| 203 | void clear_gptimer_pulse_hi(int timer_id); | ||
| 204 | void enable_gptimers (uint16_t mask); | ||
| 205 | void disable_gptimers (uint16_t mask); | ||
| 206 | uint16_t get_enabled_gptimers (void); | ||
| 207 | uint32_t get_gptimer_status (int group); | ||
| 208 | void set_gptimer_status (int group, uint32_t value); | ||
| 209 | |||
| 210 | #endif | ||
diff --git a/include/asm-blackfin/mach-bf527/anomaly.h b/include/asm-blackfin/mach-bf527/anomaly.h index 991db986cd4b..a89120445be6 100644 --- a/include/asm-blackfin/mach-bf527/anomaly.h +++ b/include/asm-blackfin/mach-bf527/anomaly.h | |||
| @@ -38,4 +38,12 @@ | |||
| 38 | 38 | ||
| 39 | /* Anomalies that don't exist on this proc */ | 39 | /* Anomalies that don't exist on this proc */ |
| 40 | #define ANOMALY_05000323 (0) | 40 | #define ANOMALY_05000323 (0) |
| 41 | #define ANOMALY_05000244 (0) | ||
| 42 | #define ANOMALY_05000198 (0) | ||
| 43 | #define ANOMALY_05000125 (0) | ||
| 44 | #define ANOMALY_05000158 (0) | ||
| 45 | #define ANOMALY_05000273 (0) | ||
| 46 | #define ANOMALY_05000263 (0) | ||
| 47 | #define ANOMALY_05000311 (0) | ||
| 48 | #define ANOMALY_05000230 (0) | ||
| 41 | #endif | 49 | #endif |
diff --git a/include/asm-blackfin/mach-bf527/bf527.h b/include/asm-blackfin/mach-bf527/bf527.h new file mode 100644 index 000000000000..056eb4b9cd25 --- /dev/null +++ b/include/asm-blackfin/mach-bf527/bf527.h | |||
| @@ -0,0 +1,127 @@ | |||
| 1 | /* | ||
| 2 | * File: include/asm-blackfin/mach-bf527/bf527.h | ||
| 3 | * Based on: include/asm-blackfin/mach-bf537/bf537.h | ||
| 4 | * Author: Michael Hennerich (michael.hennerich@analog.com) | ||
| 5 | * | ||
| 6 | * Created: | ||
| 7 | * Description: SYSTEM MMR REGISTER AND MEMORY MAP FOR ADSP-BF527 | ||
| 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 __MACH_BF527_H__ | ||
| 31 | #define __MACH_BF527_H__ | ||
| 32 | |||
| 33 | #define SUPPORTED_REVID 2 | ||
| 34 | |||
| 35 | #define OFFSET_(x) ((x) & 0x0000FFFF) | ||
| 36 | |||
| 37 | /*some misc defines*/ | ||
| 38 | #define IMASK_IVG15 0x8000 | ||
| 39 | #define IMASK_IVG14 0x4000 | ||
| 40 | #define IMASK_IVG13 0x2000 | ||
| 41 | #define IMASK_IVG12 0x1000 | ||
| 42 | |||
| 43 | #define IMASK_IVG11 0x0800 | ||
| 44 | #define IMASK_IVG10 0x0400 | ||
| 45 | #define IMASK_IVG9 0x0200 | ||
| 46 | #define IMASK_IVG8 0x0100 | ||
| 47 | |||
| 48 | #define IMASK_IVG7 0x0080 | ||
| 49 | #define IMASK_IVGTMR 0x0040 | ||
| 50 | #define IMASK_IVGHW 0x0020 | ||
| 51 | |||
| 52 | /***************************/ | ||
| 53 | |||
| 54 | #define BFIN_DSUBBANKS 4 | ||
| 55 | #define BFIN_DWAYS 2 | ||
| 56 | #define BFIN_DLINES 64 | ||
| 57 | #define BFIN_ISUBBANKS 4 | ||
| 58 | #define BFIN_IWAYS 4 | ||
| 59 | #define BFIN_ILINES 32 | ||
| 60 | |||
| 61 | #define WAY0_L 0x1 | ||
| 62 | #define WAY1_L 0x2 | ||
| 63 | #define WAY01_L 0x3 | ||
| 64 | #define WAY2_L 0x4 | ||
| 65 | #define WAY02_L 0x5 | ||
| 66 | #define WAY12_L 0x6 | ||
| 67 | #define WAY012_L 0x7 | ||
| 68 | |||
| 69 | #define WAY3_L 0x8 | ||
| 70 | #define WAY03_L 0x9 | ||
| 71 | #define WAY13_L 0xA | ||
| 72 | #define WAY013_L 0xB | ||
| 73 | |||
| 74 | #define WAY32_L 0xC | ||
| 75 | #define WAY320_L 0xD | ||
| 76 | #define WAY321_L 0xE | ||
| 77 | #define WAYALL_L 0xF | ||
| 78 | |||
| 79 | #define DMC_ENABLE (2<<2) /*yes, 2, not 1 */ | ||
| 80 | |||
| 81 | /********************************* EBIU Settings ************************************/ | ||
| 82 | #define AMBCTL0VAL ((CONFIG_BANK_1 << 16) | CONFIG_BANK_0) | ||
| 83 | #define AMBCTL1VAL ((CONFIG_BANK_3 << 16) | CONFIG_BANK_2) | ||
| 84 | |||
| 85 | #ifdef CONFIG_C_AMBEN_ALL | ||
| 86 | #define V_AMBEN AMBEN_ALL | ||
| 87 | #endif | ||
| 88 | #ifdef CONFIG_C_AMBEN | ||
| 89 | #define V_AMBEN 0x0 | ||
| 90 | #endif | ||
| 91 | #ifdef CONFIG_C_AMBEN_B0 | ||
| 92 | #define V_AMBEN AMBEN_B0 | ||
| 93 | #endif | ||
| 94 | #ifdef CONFIG_C_AMBEN_B0_B1 | ||
| 95 | #define V_AMBEN AMBEN_B0_B1 | ||
| 96 | #endif | ||
| 97 | #ifdef CONFIG_C_AMBEN_B0_B1_B2 | ||
| 98 | #define V_AMBEN AMBEN_B0_B1_B2 | ||
| 99 | #endif | ||
| 100 | #ifdef CONFIG_C_AMCKEN | ||
| 101 | #define V_AMCKEN AMCKEN | ||
| 102 | #else | ||
| 103 | #define V_AMCKEN 0x0 | ||
| 104 | #endif | ||
| 105 | #ifdef CONFIG_C_CDPRIO | ||
| 106 | #define V_CDPRIO 0x100 | ||
| 107 | #else | ||
| 108 | #define V_CDPRIO 0x0 | ||
| 109 | #endif | ||
| 110 | |||
| 111 | #define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO) | ||
| 112 | |||
| 113 | #ifdef CONFIG_BF527 | ||
| 114 | #define CPU "BF527" | ||
| 115 | #endif | ||
| 116 | #ifdef CONFIG_BF525 | ||
| 117 | #define CPU "BF525" | ||
| 118 | #endif | ||
| 119 | #ifdef CONFIG_BF522 | ||
| 120 | #define CPU "BF522" | ||
| 121 | #endif | ||
| 122 | #ifndef CPU | ||
| 123 | #define CPU "UNKNOWN" | ||
| 124 | #define CPUID 0x0 | ||
| 125 | #endif | ||
| 126 | |||
| 127 | #endif /* __MACH_BF527_H__ */ | ||
diff --git a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h new file mode 100644 index 000000000000..0b867e6a76c4 --- /dev/null +++ b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h | |||
| @@ -0,0 +1,152 @@ | |||
| 1 | #include <linux/serial.h> | ||
| 2 | #include <asm/dma.h> | ||
| 3 | #include <asm/portmux.h> | ||
| 4 | |||
| 5 | #define NR_PORTS 2 | ||
| 6 | |||
| 7 | #define OFFSET_THR 0x00 /* Transmit Holding register */ | ||
| 8 | #define OFFSET_RBR 0x00 /* Receive Buffer register */ | ||
| 9 | #define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */ | ||
| 10 | #define OFFSET_IER 0x04 /* Interrupt Enable Register */ | ||
| 11 | #define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */ | ||
| 12 | #define OFFSET_IIR 0x08 /* Interrupt Identification Register */ | ||
| 13 | #define OFFSET_LCR 0x0C /* Line Control Register */ | ||
| 14 | #define OFFSET_MCR 0x10 /* Modem Control Register */ | ||
| 15 | #define OFFSET_LSR 0x14 /* Line Status Register */ | ||
| 16 | #define OFFSET_MSR 0x18 /* Modem Status Register */ | ||
| 17 | #define OFFSET_SCR 0x1C /* SCR Scratch Register */ | ||
| 18 | #define OFFSET_GCTL 0x24 /* Global Control Register */ | ||
| 19 | |||
| 20 | #define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR)) | ||
| 21 | #define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL)) | ||
| 22 | #define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER)) | ||
| 23 | #define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH)) | ||
| 24 | #define UART_GET_IIR(uart) bfin_read16(((uart)->port.membase + OFFSET_IIR)) | ||
| 25 | #define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR)) | ||
| 26 | #define UART_GET_LSR(uart) bfin_read16(((uart)->port.membase + OFFSET_LSR)) | ||
| 27 | #define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL)) | ||
| 28 | |||
| 29 | #define UART_PUT_CHAR(uart, v) bfin_write16(((uart)->port.membase + OFFSET_THR), v) | ||
| 30 | #define UART_PUT_DLL(uart, v) bfin_write16(((uart)->port.membase + OFFSET_DLL), v) | ||
| 31 | #define UART_PUT_IER(uart, v) bfin_write16(((uart)->port.membase + OFFSET_IER), v) | ||
| 32 | #define UART_PUT_DLH(uart, v) bfin_write16(((uart)->port.membase + OFFSET_DLH), v) | ||
| 33 | #define UART_PUT_LCR(uart, v) bfin_write16(((uart)->port.membase + OFFSET_LCR), v) | ||
| 34 | #define UART_PUT_GCTL(uart, v) bfin_write16(((uart)->port.membase + OFFSET_GCTL), v) | ||
| 35 | |||
| 36 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) | ||
| 37 | # define CONFIG_SERIAL_BFIN_CTSRTS | ||
| 38 | |||
| 39 | # ifndef CONFIG_UART0_CTS_PIN | ||
| 40 | # define CONFIG_UART0_CTS_PIN -1 | ||
| 41 | # endif | ||
| 42 | |||
| 43 | # ifndef CONFIG_UART0_RTS_PIN | ||
| 44 | # define CONFIG_UART0_RTS_PIN -1 | ||
| 45 | # endif | ||
| 46 | |||
| 47 | # ifndef CONFIG_UART1_CTS_PIN | ||
| 48 | # define CONFIG_UART1_CTS_PIN -1 | ||
| 49 | # endif | ||
| 50 | |||
| 51 | # ifndef CONFIG_UART1_RTS_PIN | ||
| 52 | # define CONFIG_UART1_RTS_PIN -1 | ||
| 53 | # endif | ||
| 54 | #endif | ||
| 55 | /* | ||
| 56 | * The pin configuration is different from schematic | ||
| 57 | */ | ||
| 58 | struct bfin_serial_port { | ||
| 59 | struct uart_port port; | ||
| 60 | unsigned int old_status; | ||
| 61 | #ifdef CONFIG_SERIAL_BFIN_DMA | ||
| 62 | int tx_done; | ||
| 63 | int tx_count; | ||
| 64 | struct circ_buf rx_dma_buf; | ||
| 65 | struct timer_list rx_dma_timer; | ||
| 66 | int rx_dma_nrows; | ||
| 67 | unsigned int tx_dma_channel; | ||
| 68 | unsigned int rx_dma_channel; | ||
| 69 | struct work_struct tx_dma_workqueue; | ||
| 70 | #else | ||
| 71 | struct work_struct cts_workqueue; | ||
| 72 | #endif | ||
| 73 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS | ||
| 74 | int cts_pin; | ||
| 75 | int rts_pin; | ||
| 76 | #endif | ||
| 77 | }; | ||
| 78 | |||
| 79 | struct bfin_serial_port bfin_serial_ports[NR_PORTS]; | ||
| 80 | struct bfin_serial_res { | ||
| 81 | unsigned long uart_base_addr; | ||
| 82 | int uart_irq; | ||
| 83 | #ifdef CONFIG_SERIAL_BFIN_DMA | ||
| 84 | unsigned int uart_tx_dma_channel; | ||
| 85 | unsigned int uart_rx_dma_channel; | ||
| 86 | #endif | ||
| 87 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS | ||
| 88 | int uart_cts_pin; | ||
| 89 | int uart_rts_pin; | ||
| 90 | #endif | ||
| 91 | }; | ||
| 92 | |||
| 93 | struct bfin_serial_res bfin_serial_resource[] = { | ||
| 94 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
| 95 | { | ||
| 96 | 0xFFC00400, | ||
| 97 | IRQ_UART0_RX, | ||
| 98 | #ifdef CONFIG_SERIAL_BFIN_DMA | ||
| 99 | CH_UART0_TX, | ||
| 100 | CH_UART0_RX, | ||
| 101 | #endif | ||
| 102 | #ifdef CONFIG_BFIN_UART0_CTSRTS | ||
| 103 | CONFIG_UART0_CTS_PIN, | ||
| 104 | CONFIG_UART0_RTS_PIN, | ||
| 105 | #endif | ||
| 106 | }, | ||
| 107 | #endif | ||
| 108 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
| 109 | { | ||
| 110 | 0xFFC02000, | ||
| 111 | IRQ_UART1_RX, | ||
| 112 | #ifdef CONFIG_SERIAL_BFIN_DMA | ||
| 113 | CH_UART1_TX, | ||
| 114 | CH_UART1_RX, | ||
| 115 | #endif | ||
| 116 | #ifdef CONFIG_BFIN_UART1_CTSRTS | ||
| 117 | CONFIG_UART1_CTS_PIN, | ||
| 118 | CONFIG_UART1_RTS_PIN, | ||
| 119 | #endif | ||
| 120 | }, | ||
| 121 | #endif | ||
| 122 | }; | ||
| 123 | |||
| 124 | int nr_ports = ARRAY_SIZE(bfin_serial_resource); | ||
| 125 | |||
| 126 | #define DRIVER_NAME "bfin-uart" | ||
| 127 | |||
| 128 | static void bfin_serial_hw_init(struct bfin_serial_port *uart) | ||
| 129 | { | ||
| 130 | |||
| 131 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
| 132 | peripheral_request(P_UART0_TX, DRIVER_NAME); | ||
| 133 | peripheral_request(P_UART0_RX, DRIVER_NAME); | ||
| 134 | #endif | ||
| 135 | |||
| 136 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
| 137 | peripheral_request(P_UART1_TX, DRIVER_NAME); | ||
| 138 | peripheral_request(P_UART1_RX, DRIVER_NAME); | ||
| 139 | #endif | ||
| 140 | |||
| 141 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS | ||
| 142 | if (uart->cts_pin >= 0) { | ||
| 143 | gpio_request(uart->cts_pin, DRIVER_NAME); | ||
| 144 | gpio_direction_input(uart->cts_pin); | ||
| 145 | } | ||
| 146 | |||
| 147 | if (uart->rts_pin >= 0) { | ||
| 148 | gpio_request(uart->rts_pin, DRIVER_NAME); | ||
| 149 | gpio_direction_output(uart->rts_pin); | ||
| 150 | } | ||
| 151 | #endif | ||
| 152 | } | ||
diff --git a/include/asm-blackfin/mach-bf527/blackfin.h b/include/asm-blackfin/mach-bf527/blackfin.h new file mode 100644 index 000000000000..1bd07e30781c --- /dev/null +++ b/include/asm-blackfin/mach-bf527/blackfin.h | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | /* | ||
| 2 | * File: include/asm-blackfin/mach-bf527/blackfin.h | ||
| 3 | * Based on: | ||
| 4 | * Author: | ||
| 5 | * | ||
| 6 | * Created: | ||
| 7 | * Description: | ||
| 8 | * | ||
| 9 | * Rev: | ||
| 10 | * | ||
| 11 | * Modified: | ||
| 12 | * | ||
| 13 | * | ||
| 14 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
| 15 | * | ||
| 16 | * This program is free software; you can redistribute it and/or modify | ||
| 17 | * it under the terms of the GNU General Public License as published by | ||
| 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 | */ | ||
| 31 | |||
| 32 | #ifndef _MACH_BLACKFIN_H_ | ||
| 33 | #define _MACH_BLACKFIN_H_ | ||
| 34 | |||
| 35 | #define BF527_FAMILY | ||
| 36 | |||
| 37 | #include "bf527.h" | ||
| 38 | #include "mem_map.h" | ||
| 39 | #include "defBF522.h" | ||
| 40 | #include "anomaly.h" | ||
| 41 | |||
| 42 | #if defined(CONFIG_BF527) | ||
| 43 | #include "defBF527.h" | ||
| 44 | #endif | ||
| 45 | |||
| 46 | #if defined(CONFIG_BF525) | ||
| 47 | #include "defBF525.h" | ||
| 48 | #endif | ||
| 49 | |||
| 50 | #if !defined(__ASSEMBLY__) | ||
| 51 | #include "cdefBF522.h" | ||
| 52 | |||
| 53 | #if defined(CONFIG_BF527) | ||
| 54 | #include "cdefBF527.h" | ||
| 55 | #endif | ||
| 56 | |||
| 57 | #if defined(CONFIG_BF525) | ||
| 58 | #include "cdefBF525.h" | ||
| 59 | #endif | ||
| 60 | #endif | ||
| 61 | |||
| 62 | /* UART_IIR Register */ | ||
| 63 | #define STATUS(x) ((x << 1) & 0x06) | ||
| 64 | #define STATUS_P1 0x02 | ||
| 65 | #define STATUS_P0 0x01 | ||
| 66 | |||
| 67 | /* DPMC*/ | ||
| 68 | #define bfin_read_STOPCK_OFF() bfin_read_STOPCK() | ||
| 69 | #define bfin_write_STOPCK_OFF(val) bfin_write_STOPCK(val) | ||
| 70 | #define STOPCK_OFF STOPCK | ||
| 71 | |||
| 72 | /* PLL_DIV Masks */ | ||
| 73 | #define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */ | ||
| 74 | #define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */ | ||
| 75 | #define CCLK_DIV4 CSEL_DIV4 /* CCLK = VCO / 4 */ | ||
| 76 | #define CCLK_DIV8 CSEL_DIV8 /* CCLK = VCO / 8 */ | ||
| 77 | |||
| 78 | #endif | ||
diff --git a/include/asm-blackfin/mach-bf527/cdefBF52x_base.h b/include/asm-blackfin/mach-bf527/cdefBF52x_base.h index 5f801a0ef797..3f4de5d9d4cb 100644 --- a/include/asm-blackfin/mach-bf527/cdefBF52x_base.h +++ b/include/asm-blackfin/mach-bf527/cdefBF52x_base.h | |||
| @@ -45,8 +45,8 @@ | |||
| 45 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT, val) | 45 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT, val) |
| 46 | #define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT) | 46 | #define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT) |
| 47 | #define bfin_write_PLL_LOCKCNT(val) bfin_write16(PLL_LOCKCNT, val) | 47 | #define bfin_write_PLL_LOCKCNT(val) bfin_write16(PLL_LOCKCNT, val) |
| 48 | #define bfin_read_CHIPID() bfin_read16(CHIPID) | 48 | #define bfin_read_CHIPID() bfin_read32(CHIPID) |
| 49 | #define bfin_write_CHIPID(val) bfin_write16(CHIPID, val) | 49 | #define bfin_write_CHIPID(val) bfin_write32(CHIPID, val) |
| 50 | 50 | ||
| 51 | 51 | ||
| 52 | /* System Interrupt Controller (0xFFC00100 - 0xFFC001FF) */ | 52 | /* System Interrupt Controller (0xFFC00100 - 0xFFC001FF) */ |
| @@ -59,9 +59,8 @@ | |||
| 59 | #define bfin_write_SIC_RVECT(val) bfin_write32(SIC_RVECT, val) | 59 | #define bfin_write_SIC_RVECT(val) bfin_write32(SIC_RVECT, val) |
| 60 | #define bfin_read_SIC_IMASK0() bfin_read32(SIC_IMASK0) | 60 | #define bfin_read_SIC_IMASK0() bfin_read32(SIC_IMASK0) |
| 61 | #define bfin_write_SIC_IMASK0(val) bfin_write32(SIC_IMASK0, val) | 61 | #define bfin_write_SIC_IMASK0(val) bfin_write32(SIC_IMASK0, val) |
| 62 | /* legacy register name (below) provided for backwards code compatibility */ | 62 | #define bfin_read_SIC_IMASK(x) bfin_read32(SIC_IMASK0 + (x << 6)) |
| 63 | #define bfin_read_SIC_IMASK() bfin_read32(SIC_IMASK) | 63 | #define bfin_write_SIC_IMASK(x, val) bfin_write32((SIC_IMASK0 + (x << 6)), val) |
| 64 | #define bfin_write_SIC_IMASK(val) bfin_write32(SIC_IMASK, val) | ||
| 65 | 64 | ||
| 66 | #define bfin_read_SIC_IAR0() bfin_read32(SIC_IAR0) | 65 | #define bfin_read_SIC_IAR0() bfin_read32(SIC_IAR0) |
| 67 | #define bfin_write_SIC_IAR0(val) bfin_write32(SIC_IAR0, val) | 66 | #define bfin_write_SIC_IAR0(val) bfin_write32(SIC_IAR0, val) |
| @@ -74,15 +73,13 @@ | |||
| 74 | 73 | ||
| 75 | #define bfin_read_SIC_ISR0() bfin_read32(SIC_ISR0) | 74 | #define bfin_read_SIC_ISR0() bfin_read32(SIC_ISR0) |
| 76 | #define bfin_write_SIC_ISR0(val) bfin_write32(SIC_ISR0, val) | 75 | #define bfin_write_SIC_ISR0(val) bfin_write32(SIC_ISR0, val) |
| 77 | /* legacy register name (below) provided for backwards code compatibility */ | 76 | #define bfin_read_SIC_ISR(x) bfin_read32(SIC_ISR0 + (x << 6)) |
| 78 | #define bfin_read_SIC_ISR() bfin_read32(SIC_ISR) | 77 | #define bfin_write_SIC_ISR(x, val) bfin_write32((SIC_ISR0 + (x << 6)), val) |
| 79 | #define bfin_write_SIC_ISR(val) bfin_write32(SIC_ISR, val) | ||
| 80 | 78 | ||
| 81 | #define bfin_read_SIC_IWR0() bfin_read32(SIC_IWR0) | 79 | #define bfin_read_SIC_IWR0() bfin_read32(SIC_IWR0) |
| 82 | #define bfin_write_SIC_IWR0(val) bfin_write32(SIC_IWR0, val) | 80 | #define bfin_write_SIC_IWR0(val) bfin_write32(SIC_IWR0, val) |
| 83 | /* legacy register name (below) provided for backwards code compatibility */ | 81 | #define bfin_read_SIC_IWR(x) bfin_read32(SIC_IWR0 + (x << 6)) |
| 84 | #define bfin_read_SIC_IWR() bfin_read32(SIC_IWR) | 82 | #define bfin_write_SIC_IWR(x, val) bfin_write32((SIC_IWR0 + (x << 6)), val) |
| 85 | #define bfin_write_SIC_IWR(val) bfin_write32(SIC_IWR, val) | ||
| 86 | 83 | ||
| 87 | /* SIC Additions to ADSP-BF52x (0xFFC0014C - 0xFFC00162) */ | 84 | /* SIC Additions to ADSP-BF52x (0xFFC0014C - 0xFFC00162) */ |
| 88 | 85 | ||
diff --git a/include/asm-blackfin/mach-bf527/defBF527.h b/include/asm-blackfin/mach-bf527/defBF527.h index 2be3293f9e26..82134f578f32 100644 --- a/include/asm-blackfin/mach-bf527/defBF527.h +++ b/include/asm-blackfin/mach-bf527/defBF527.h | |||
| @@ -32,12 +32,12 @@ | |||
| 32 | #define _DEF_BF527_H | 32 | #define _DEF_BF527_H |
| 33 | 33 | ||
| 34 | /* Include all Core registers and bit definitions */ | 34 | /* Include all Core registers and bit definitions */ |
| 35 | #include <def_LPBlackfin.h> | 35 | #include <asm/mach-common/def_LPBlackfin.h> |
| 36 | 36 | ||
| 37 | /* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF527 */ | 37 | /* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF527 */ |
| 38 | 38 | ||
| 39 | /* Include defBF52x_base.h for the set of #defines that are common to all ADSP-BF52x processors */ | 39 | /* Include defBF52x_base.h for the set of #defines that are common to all ADSP-BF52x processors */ |
| 40 | #include <defBF52x_base.h> | 40 | #include "defBF52x_base.h" |
| 41 | 41 | ||
| 42 | /* The following are the #defines needed by ADSP-BF527 that are not in the common header */ | 42 | /* The following are the #defines needed by ADSP-BF527 that are not in the common header */ |
| 43 | /* 10/100 Ethernet Controller (0xFFC03000 - 0xFFC031FF) */ | 43 | /* 10/100 Ethernet Controller (0xFFC03000 - 0xFFC031FF) */ |
diff --git a/include/asm-blackfin/mach-bf527/defBF52x_base.h b/include/asm-blackfin/mach-bf527/defBF52x_base.h index b1ff67db01f8..d6c24c54699d 100644 --- a/include/asm-blackfin/mach-bf527/defBF52x_base.h +++ b/include/asm-blackfin/mach-bf527/defBF52x_base.h | |||
| @@ -52,13 +52,13 @@ | |||
| 52 | #define SYSCR 0xFFC00104 /* System Configuration Register */ | 52 | #define SYSCR 0xFFC00104 /* System Configuration Register */ |
| 53 | #define SIC_RVECT 0xFFC00108 /* Interrupt Reset Vector Address Register */ | 53 | #define SIC_RVECT 0xFFC00108 /* Interrupt Reset Vector Address Register */ |
| 54 | 54 | ||
| 55 | #define SIC_IMASK 0xFFC0010C /* Interrupt Mask Register */ | 55 | #define SIC_IMASK0 0xFFC0010C /* Interrupt Mask Register */ |
| 56 | #define SIC_IAR0 0xFFC00110 /* Interrupt Assignment Register 0 */ | 56 | #define SIC_IAR0 0xFFC00110 /* Interrupt Assignment Register 0 */ |
| 57 | #define SIC_IAR1 0xFFC00114 /* Interrupt Assignment Register 1 */ | 57 | #define SIC_IAR1 0xFFC00114 /* Interrupt Assignment Register 1 */ |
| 58 | #define SIC_IAR2 0xFFC00118 /* Interrupt Assignment Register 2 */ | 58 | #define SIC_IAR2 0xFFC00118 /* Interrupt Assignment Register 2 */ |
| 59 | #define SIC_IAR3 0xFFC0011C /* Interrupt Assignment Register 3 */ | 59 | #define SIC_IAR3 0xFFC0011C /* Interrupt Assignment Register 3 */ |
| 60 | #define SIC_ISR 0xFFC00120 /* Interrupt Status Register */ | 60 | #define SIC_ISR0 0xFFC00120 /* Interrupt Status Register */ |
| 61 | #define SIC_IWR 0xFFC00124 /* Interrupt Wakeup Register */ | 61 | #define SIC_IWR0 0xFFC00124 /* Interrupt Wakeup Register */ |
| 62 | 62 | ||
| 63 | /* SIC Additions to ADSP-BF52x (0xFFC0014C - 0xFFC00162) */ | 63 | /* SIC Additions to ADSP-BF52x (0xFFC0014C - 0xFFC00162) */ |
| 64 | #define SIC_IMASK1 0xFFC0014C /* Interrupt Mask register of SIC2 */ | 64 | #define SIC_IMASK1 0xFFC0014C /* Interrupt Mask register of SIC2 */ |
| @@ -691,6 +691,8 @@ | |||
| 691 | 691 | ||
| 692 | /* ************* SYSTEM INTERRUPT CONTROLLER MASKS *************************************/ | 692 | /* ************* SYSTEM INTERRUPT CONTROLLER MASKS *************************************/ |
| 693 | /* Peripheral Masks For SIC_ISR, SIC_IWR, SIC_IMASK */ | 693 | /* Peripheral Masks For SIC_ISR, SIC_IWR, SIC_IMASK */ |
| 694 | |||
| 695 | #if 0 | ||
| 694 | #define IRQ_PLL_WAKEUP 0x00000001 /* PLL Wakeup Interrupt */ | 696 | #define IRQ_PLL_WAKEUP 0x00000001 /* PLL Wakeup Interrupt */ |
| 695 | 697 | ||
| 696 | #define IRQ_ERROR1 0x00000002 /* Error Interrupt (DMA, DMARx Block, DMARx Overflow) */ | 698 | #define IRQ_ERROR1 0x00000002 /* Error Interrupt (DMA, DMARx Block, DMARx Overflow) */ |
| @@ -732,6 +734,7 @@ | |||
| 732 | #define IRQ_DMA15 0x40000000 /* DMA Channels 15 (MDMA0 Destination) TX Interrupt */ | 734 | #define IRQ_DMA15 0x40000000 /* DMA Channels 15 (MDMA0 Destination) TX Interrupt */ |
| 733 | #define IRQ_WDOG 0x80000000 /* Software Watchdog Timer Interrupt */ | 735 | #define IRQ_WDOG 0x80000000 /* Software Watchdog Timer Interrupt */ |
| 734 | #define IRQ_PFB_PORTG 0x10000000 /* PF Port G (PF31:16) Interrupt B */ | 736 | #define IRQ_PFB_PORTG 0x10000000 /* PF Port G (PF31:16) Interrupt B */ |
| 737 | #endif | ||
| 735 | 738 | ||
| 736 | /* SIC_IAR0 Macros */ | 739 | /* SIC_IAR0 Macros */ |
| 737 | #define P0_IVG(x) (((x)&0xF)-7) /* Peripheral #0 assigned IVG #x */ | 740 | #define P0_IVG(x) (((x)&0xF)-7) /* Peripheral #0 assigned IVG #x */ |
diff --git a/include/asm-blackfin/mach-bf527/dma.h b/include/asm-blackfin/mach-bf527/dma.h new file mode 100644 index 000000000000..a41627ae9134 --- /dev/null +++ b/include/asm-blackfin/mach-bf527/dma.h | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | /* | ||
| 2 | * file: include/asm-blackfin/mach-bf527/dma.h | ||
| 3 | * based on: include/asm-blackfin/mach-bf537/dma.h | ||
| 4 | * author: Michael Hennerich (michael.hennerich@analog.com) | ||
| 5 | * | ||
| 6 | * created: | ||
| 7 | * description: | ||
| 8 | * system DMA map | ||
| 9 | * rev: | ||
| 10 | * | ||
| 11 | * modified: | ||
| 12 | * | ||
| 13 | * | ||
| 14 | * bugs: enter bugs at http://blackfin.uclinux.org/ | ||
| 15 | * | ||
| 16 | * this program is free software; you can redistribute it and/or modify | ||
| 17 | * it under the terms of the gnu general public license as published by | ||
| 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 | */ | ||
| 31 | |||
| 32 | #ifndef _MACH_DMA_H_ | ||
| 33 | #define _MACH_DMA_H_ | ||
| 34 | |||
| 35 | #define MAX_BLACKFIN_DMA_CHANNEL 16 | ||
| 36 | |||
| 37 | #define CH_PPI 0 /* PPI receive/transmit or NFC */ | ||
| 38 | #define CH_NFC 0 /* PPI receive/transmit or NFC */ | ||
| 39 | #define CH_EMAC_RX 1 /* Ethernet MAC receive or HOSTDP */ | ||
| 40 | #define CH_EMAC_HOSTDP 1 /* Ethernet MAC receive or HOSTDP */ | ||
| 41 | #define CH_EMAC_TX 2 /* Ethernet MAC transmit or NFC */ | ||
| 42 | #define CH_SPORT0_RX 3 /* SPORT0 receive */ | ||
| 43 | #define CH_SPORT0_TX 4 /* SPORT0 transmit */ | ||
| 44 | #define CH_SPORT1_RX 5 /* SPORT1 receive */ | ||
| 45 | #define CH_SPORT1_TX 6 /* SPORT1 transmit */ | ||
| 46 | #define CH_SPI 7 /* SPI transmit/receive */ | ||
| 47 | #define CH_UART0_RX 8 /* UART0 receive */ | ||
| 48 | #define CH_UART0_TX 9 /* UART0 transmit */ | ||
| 49 | #define CH_UART1_RX 10 /* UART1 receive */ | ||
| 50 | #define CH_UART1_TX 11 /* UART1 transmit */ | ||
| 51 | |||
| 52 | #define CH_MEM_STREAM0_DEST 12 /* TX */ | ||
| 53 | #define CH_MEM_STREAM0_SRC 13 /* RX */ | ||
| 54 | #define CH_MEM_STREAM1_DEST 14 /* TX */ | ||
| 55 | #define CH_MEM_STREAM1_SRC 15 /* RX */ | ||
| 56 | |||
| 57 | extern int channel2irq(unsigned int channel); | ||
| 58 | extern struct dma_register *base_addr[]; | ||
| 59 | |||
| 60 | #endif | ||
diff --git a/include/asm-blackfin/mach-bf527/irq.h b/include/asm-blackfin/mach-bf527/irq.h new file mode 100644 index 000000000000..304f5bcfebe4 --- /dev/null +++ b/include/asm-blackfin/mach-bf527/irq.h | |||
| @@ -0,0 +1,263 @@ | |||
| 1 | /* | ||
| 2 | * file: include/asm-blackfin/mach-bf527/irq.h | ||
| 3 | * based on: include/asm-blackfin/mach-bf537/irq.h | ||
| 4 | * author: Michael Hennerich (michael.hennerich@analog.com) | ||
| 5 | * | ||
| 6 | * created: | ||
| 7 | * description: | ||
| 8 | * system mmr register map | ||
| 9 | * rev: | ||
| 10 | * | ||
| 11 | * modified: | ||
| 12 | * | ||
| 13 | * | ||
| 14 | * bugs: enter bugs at http://blackfin.uclinux.org/ | ||
| 15 | * | ||
| 16 | * this program is free software; you can redistribute it and/or modify | ||
| 17 | * it under the terms of the gnu general public license as published by | ||
| 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 | */ | ||
| 31 | |||
| 32 | #ifndef _BF527_IRQ_H_ | ||
| 33 | #define _BF527_IRQ_H_ | ||
| 34 | |||
| 35 | /* | ||
| 36 | * Interrupt source definitions | ||
| 37 | Event Source Core Event Name | ||
| 38 | Core Emulation ** | ||
| 39 | Events (highest priority) EMU 0 | ||
| 40 | Reset RST 1 | ||
| 41 | NMI NMI 2 | ||
| 42 | Exception EVX 3 | ||
| 43 | Reserved -- 4 | ||
| 44 | Hardware Error IVHW 5 | ||
| 45 | Core Timer IVTMR 6 * | ||
| 46 | |||
| 47 | ..... | ||
| 48 | |||
| 49 | Software Interrupt 1 IVG14 31 | ||
| 50 | Software Interrupt 2 -- | ||
| 51 | (lowest priority) IVG15 32 * | ||
| 52 | */ | ||
| 53 | |||
| 54 | #define NR_PERI_INTS (2 * 32) | ||
| 55 | |||
| 56 | /* The ABSTRACT IRQ definitions */ | ||
| 57 | /** the first seven of the following are fixed, the rest you change if you need to **/ | ||
| 58 | #define IRQ_EMU 0 /* Emulation */ | ||
| 59 | #define IRQ_RST 1 /* reset */ | ||
| 60 | #define IRQ_NMI 2 /* Non Maskable */ | ||
| 61 | #define IRQ_EVX 3 /* Exception */ | ||
| 62 | #define IRQ_UNUSED 4 /* - unused interrupt */ | ||
| 63 | #define IRQ_HWERR 5 /* Hardware Error */ | ||
| 64 | #define IRQ_CORETMR 6 /* Core timer */ | ||
| 65 | |||
| 66 | #define BFIN_IRQ(x) ((x) + 7) | ||
| 67 | |||
| 68 | #define IRQ_PLL_WAKEUP BFIN_IRQ(0) /* PLL Wakeup Interrupt */ | ||
| 69 | #define IRQ_DMA0_ERROR BFIN_IRQ(1) /* DMA Error 0 (generic) */ | ||
| 70 | #define IRQ_DMAR0_BLK BFIN_IRQ(2) /* DMAR0 Block Interrupt */ | ||
| 71 | #define IRQ_DMAR1_BLK BFIN_IRQ(3) /* DMAR1 Block Interrupt */ | ||
| 72 | #define IRQ_DMAR0_OVR BFIN_IRQ(4) /* DMAR0 Overflow Error */ | ||
| 73 | #define IRQ_DMAR1_OVR BFIN_IRQ(5) /* DMAR1 Overflow Error */ | ||
| 74 | #define IRQ_PPI_ERROR BFIN_IRQ(6) /* PPI Error */ | ||
| 75 | #define IRQ_MAC_ERROR BFIN_IRQ(7) /* MAC Status */ | ||
| 76 | #define IRQ_SPORT0_ERROR BFIN_IRQ(8) /* SPORT0 Status */ | ||
| 77 | #define IRQ_SPORT1_ERROR BFIN_IRQ(9) /* SPORT1 Status */ | ||
| 78 | #define IRQ_UART0_ERROR BFIN_IRQ(12) /* UART0 Status */ | ||
| 79 | #define IRQ_UART1_ERROR BFIN_IRQ(13) /* UART1 Status */ | ||
| 80 | #define IRQ_RTC BFIN_IRQ(14) /* RTC */ | ||
| 81 | #define IRQ_PPI BFIN_IRQ(15) /* DMA Channel 0 (PPI/NAND) */ | ||
| 82 | #define IRQ_SPORT0_RX BFIN_IRQ(16) /* DMA 3 Channel (SPORT0 RX) */ | ||
| 83 | #define IRQ_SPORT0_TX BFIN_IRQ(17) /* DMA 4 Channel (SPORT0 TX) */ | ||
| 84 | #define IRQ_SPORT1_RX BFIN_IRQ(18) /* DMA 5 Channel (SPORT1 RX) */ | ||
| 85 | #define IRQ_SPORT1_TX BFIN_IRQ(19) /* DMA 6 Channel (SPORT1 TX) */ | ||
| 86 | #define IRQ_TWI BFIN_IRQ(20) /* TWI */ | ||
| 87 | #define IRQ_SPI BFIN_IRQ(21) /* DMA 7 Channel (SPI) */ | ||
| 88 | #define IRQ_UART0_RX BFIN_IRQ(22) /* DMA8 Channel (UART0 RX) */ | ||
| 89 | #define IRQ_UART0_TX BFIN_IRQ(23) /* DMA9 Channel (UART0 TX) */ | ||
| 90 | #define IRQ_UART1_RX BFIN_IRQ(24) /* DMA10 Channel (UART1 RX) */ | ||
| 91 | #define IRQ_UART1_TX BFIN_IRQ(25) /* DMA11 Channel (UART1 TX) */ | ||
| 92 | #define IRQ_OPTSEC BFIN_IRQ(26) /* OTPSEC Interrupt */ | ||
| 93 | #define IRQ_CNT BFIN_IRQ(27) /* GP Counter */ | ||
| 94 | #define IRQ_MAC_RX BFIN_IRQ(28) /* DMA1 Channel (MAC RX/HDMA) */ | ||
| 95 | #define IRQ_PORTH_INTA BFIN_IRQ(29) /* Port H Interrupt A */ | ||
| 96 | #define IRQ_MAC_TX BFIN_IRQ(30) /* DMA2 Channel (MAC TX/NAND) */ | ||
| 97 | #define IRQ_NFC BFIN_IRQ(30) /* DMA2 Channel (MAC TX/NAND) */ | ||
| 98 | #define IRQ_PORTH_INTB BFIN_IRQ(31) /* Port H Interrupt B */ | ||
| 99 | #define IRQ_TMR0 BFIN_IRQ(32) /* Timer 0 */ | ||
| 100 | #define IRQ_TMR1 BFIN_IRQ(33) /* Timer 1 */ | ||
| 101 | #define IRQ_TMR2 BFIN_IRQ(34) /* Timer 2 */ | ||
| 102 | #define IRQ_TMR3 BFIN_IRQ(35) /* Timer 3 */ | ||
| 103 | #define IRQ_TMR4 BFIN_IRQ(36) /* Timer 4 */ | ||
| 104 | #define IRQ_TMR5 BFIN_IRQ(37) /* Timer 5 */ | ||
| 105 | #define IRQ_TMR6 BFIN_IRQ(38) /* Timer 6 */ | ||
| 106 | #define IRQ_TMR7 BFIN_IRQ(39) /* Timer 7 */ | ||
| 107 | #define IRQ_PORTG_INTA BFIN_IRQ(40) /* Port G Interrupt A */ | ||
| 108 | #define IRQ_PORTG_INTB BFIN_IRQ(41) /* Port G Interrupt B */ | ||
| 109 | #define IRQ_MEM_DMA0 BFIN_IRQ(42) /* MDMA Stream 0 */ | ||
| 110 | #define IRQ_MEM_DMA1 BFIN_IRQ(43) /* MDMA Stream 1 */ | ||
| 111 | #define IRQ_WATCH BFIN_IRQ(44) /* Software Watchdog Timer */ | ||
| 112 | #define IRQ_PORTF_INTA BFIN_IRQ(45) /* Port F Interrupt A */ | ||
| 113 | #define IRQ_PORTF_INTB BFIN_IRQ(46) /* Port F Interrupt B */ | ||
| 114 | #define IRQ_SPI_ERROR BFIN_IRQ(47) /* SPI Status */ | ||
| 115 | #define IRQ_NFC_ERROR BFIN_IRQ(48) /* NAND Error */ | ||
| 116 | #define IRQ_HDMA_ERROR BFIN_IRQ(49) /* HDMA Error */ | ||
| 117 | #define IRQ_HDMA BFIN_IRQ(50) /* HDMA (TFI) */ | ||
| 118 | #define IRQ_USB_EINT BFIN_IRQ(51) /* USB_EINT Interrupt */ | ||
| 119 | #define IRQ_USB_INT0 BFIN_IRQ(52) /* USB_INT0 Interrupt */ | ||
| 120 | #define IRQ_USB_INT1 BFIN_IRQ(53) /* USB_INT1 Interrupt */ | ||
| 121 | #define IRQ_USB_INT2 BFIN_IRQ(54) /* USB_INT2 Interrupt */ | ||
| 122 | #define IRQ_USB_DMA BFIN_IRQ(55) /* USB_DMAINT Interrupt */ | ||
| 123 | |||
| 124 | #define SYS_IRQS BFIN_IRQ(63) /* 70 */ | ||
| 125 | |||
| 126 | #define IRQ_PF0 71 | ||
| 127 | #define IRQ_PF1 72 | ||
| 128 | #define IRQ_PF2 73 | ||
| 129 | #define IRQ_PF3 74 | ||
| 130 | #define IRQ_PF4 75 | ||
| 131 | #define IRQ_PF5 76 | ||
| 132 | #define IRQ_PF6 77 | ||
| 133 | #define IRQ_PF7 78 | ||
| 134 | #define IRQ_PF8 79 | ||
| 135 | #define IRQ_PF9 80 | ||
| 136 | #define IRQ_PF10 81 | ||
| 137 | #define IRQ_PF11 82 | ||
| 138 | #define IRQ_PF12 83 | ||
| 139 | #define IRQ_PF13 84 | ||
| 140 | #define IRQ_PF14 85 | ||
| 141 | #define IRQ_PF15 86 | ||
| 142 | |||
| 143 | #define IRQ_PG0 87 | ||
| 144 | #define IRQ_PG1 88 | ||
| 145 | #define IRQ_PG2 89 | ||
| 146 | #define IRQ_PG3 90 | ||
| 147 | #define IRQ_PG4 91 | ||
| 148 | #define IRQ_PG5 92 | ||
| 149 | #define IRQ_PG6 93 | ||
| 150 | #define IRQ_PG7 94 | ||
| 151 | #define IRQ_PG8 95 | ||
| 152 | #define IRQ_PG9 96 | ||
| 153 | #define IRQ_PG10 97 | ||
| 154 | #define IRQ_PG11 98 | ||
| 155 | #define IRQ_PG12 99 | ||
| 156 | #define IRQ_PG13 100 | ||
| 157 | #define IRQ_PG14 101 | ||
| 158 | #define IRQ_PG15 102 | ||
| 159 | |||
| 160 | #define IRQ_PH0 103 | ||
| 161 | #define IRQ_PH1 104 | ||
| 162 | #define IRQ_PH2 105 | ||
| 163 | #define IRQ_PH3 106 | ||
| 164 | #define IRQ_PH4 107 | ||
| 165 | #define IRQ_PH5 108 | ||
| 166 | #define IRQ_PH6 109 | ||
| 167 | #define IRQ_PH7 110 | ||
| 168 | #define IRQ_PH8 111 | ||
| 169 | #define IRQ_PH9 112 | ||
| 170 | #define IRQ_PH10 113 | ||
| 171 | #define IRQ_PH11 114 | ||
| 172 | #define IRQ_PH12 115 | ||
| 173 | #define IRQ_PH13 116 | ||
| 174 | #define IRQ_PH14 117 | ||
| 175 | #define IRQ_PH15 118 | ||
| 176 | |||
| 177 | #define GPIO_IRQ_BASE IRQ_PF0 | ||
| 178 | |||
| 179 | #ifdef CONFIG_IRQCHIP_DEMUX_GPIO | ||
| 180 | #define NR_IRQS (IRQ_PH15+1) | ||
| 181 | #else | ||
| 182 | #define NR_IRQS (SYS_IRQS+1) | ||
| 183 | #endif | ||
| 184 | |||
| 185 | #define IVG7 7 | ||
| 186 | #define IVG8 8 | ||
| 187 | #define IVG9 9 | ||
| 188 | #define IVG10 10 | ||
| 189 | #define IVG11 11 | ||
| 190 | #define IVG12 12 | ||
| 191 | #define IVG13 13 | ||
| 192 | #define IVG14 14 | ||
| 193 | #define IVG15 15 | ||
| 194 | |||
| 195 | /* IAR0 BIT FIELDS */ | ||
| 196 | #define IRQ_PLL_WAKEUP_POS 0 | ||
| 197 | #define IRQ_DMA0_ERROR_POS 4 | ||
| 198 | #define IRQ_DMAR0_BLK_POS 8 | ||
| 199 | #define IRQ_DMAR1_BLK_POS 12 | ||
| 200 | #define IRQ_DMAR0_OVR_POS 16 | ||
| 201 | #define IRQ_DMAR1_OVR_POS 20 | ||
| 202 | #define IRQ_PPI_ERROR_POS 24 | ||
| 203 | #define IRQ_MAC_ERROR_POS 28 | ||
| 204 | |||
| 205 | /* IAR1 BIT FIELDS */ | ||
| 206 | #define IRQ_SPORT0_ERROR_POS 0 | ||
| 207 | #define IRQ_SPORT1_ERROR_POS 4 | ||
| 208 | #define IRQ_UART0_ERROR_POS 16 | ||
| 209 | #define IRQ_UART1_ERROR_POS 20 | ||
| 210 | #define IRQ_RTC_POS 24 | ||
| 211 | #define IRQ_PPI_POS 28 | ||
| 212 | |||
| 213 | /* IAR2 BIT FIELDS */ | ||
| 214 | #define IRQ_SPORT0_RX_POS 0 | ||
| 215 | #define IRQ_SPORT0_TX_POS 4 | ||
| 216 | #define IRQ_SPORT1_RX_POS 8 | ||
| 217 | #define IRQ_SPORT1_TX_POS 12 | ||
| 218 | #define IRQ_TWI_POS 16 | ||
| 219 | #define IRQ_SPI_POS 20 | ||
| 220 | #define IRQ_UART0_RX_POS 24 | ||
| 221 | #define IRQ_UART0_TX_POS 28 | ||
| 222 | |||
| 223 | /* IAR3 BIT FIELDS */ | ||
| 224 | #define IRQ_UART1_RX_POS 0 | ||
| 225 | #define IRQ_UART1_TX_POS 4 | ||
| 226 | #define IRQ_OPTSEC_POS 8 | ||
| 227 | #define IRQ_CNT_POS 12 | ||
| 228 | #define IRQ_MAC_RX_POS 16 | ||
| 229 | #define IRQ_PORTH_INTA_POS 20 | ||
| 230 | #define IRQ_MAC_TX_POS 24 | ||
| 231 | #define IRQ_PORTH_INTB_POS 28 | ||
| 232 | |||
| 233 | /* IAR4 BIT FIELDS */ | ||
| 234 | #define IRQ_TMR0_POS 0 | ||
| 235 | #define IRQ_TMR1_POS 4 | ||
| 236 | #define IRQ_TMR2_POS 8 | ||
| 237 | #define IRQ_TMR3_POS 12 | ||
| 238 | #define IRQ_TMR4_POS 16 | ||
| 239 | #define IRQ_TMR5_POS 20 | ||
| 240 | #define IRQ_TMR6_POS 24 | ||
| 241 | #define IRQ_TMR7_POS 28 | ||
| 242 | |||
| 243 | /* IAR5 BIT FIELDS */ | ||
| 244 | #define IRQ_PORTG_INTA_POS 0 | ||
| 245 | #define IRQ_PORTG_INTB_POS 4 | ||
| 246 | #define IRQ_MEM_DMA0_POS 8 | ||
| 247 | #define IRQ_MEM_DMA1_POS 12 | ||
| 248 | #define IRQ_WATCH_POS 16 | ||
| 249 | #define IRQ_PORTF_INTA_POS 20 | ||
| 250 | #define IRQ_PORTF_INTB_POS 24 | ||
| 251 | #define IRQ_SPI_ERROR_POS 28 | ||
| 252 | |||
| 253 | /* IAR6 BIT FIELDS */ | ||
| 254 | #define IRQ_NFC_ERROR_POS 0 | ||
| 255 | #define IRQ_HDMA_ERROR_POS 4 | ||
| 256 | #define IRQ_HDMA_POS 8 | ||
| 257 | #define IRQ_USB_EINT_POS 12 | ||
| 258 | #define IRQ_USB_INT0_POS 16 | ||
| 259 | #define IRQ_USB_INT1_POS 20 | ||
| 260 | #define IRQ_USB_INT2_POS 24 | ||
| 261 | #define IRQ_USB_DMA_POS 28 | ||
| 262 | |||
| 263 | #endif /* _BF527_IRQ_H_ */ | ||
diff --git a/include/asm-blackfin/mach-bf527/mem_init.h b/include/asm-blackfin/mach-bf527/mem_init.h new file mode 100644 index 000000000000..008ca66719e2 --- /dev/null +++ b/include/asm-blackfin/mach-bf527/mem_init.h | |||
| @@ -0,0 +1,337 @@ | |||
| 1 | /* | ||
| 2 | * File: include/asm-blackfin/mach-bf527/mem_init.h | ||
| 3 | * Based on: | ||
| 4 | * Author: | ||
| 5 | * | ||
| 6 | * Created: | ||
| 7 | * Description: | ||
| 8 | * | ||
| 9 | * Rev: | ||
| 10 | * | ||
| 11 | * Modified: | ||
| 12 | * Copyright 2004-2007 Analog Devices Inc. | ||
| 13 | * | ||
| 14 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
| 15 | * | ||
| 16 | * This program is free software; you can redistribute it and/or modify | ||
| 17 | * it under the terms of the GNU General Public License as published by | ||
| 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 | */ | ||
| 31 | |||
| 32 | #if (CONFIG_MEM_MT48LC16M16A2TG_75 || CONFIG_MEM_MT48LC64M4A2FB_7E || CONFIG_MEM_MT48LC16M8A2TG_75 || CONFIG_MEM_GENERIC_BOARD || CONFIG_MEM_MT48LC32M8A2_75 || CONFIG_MEM_MT48LC32M16A2TG_75) | ||
| 33 | #if (CONFIG_SCLK_HZ > 119402985) | ||
| 34 | #define SDRAM_tRP TRP_2 | ||
| 35 | #define SDRAM_tRP_num 2 | ||
| 36 | #define SDRAM_tRAS TRAS_7 | ||
| 37 | #define SDRAM_tRAS_num 7 | ||
| 38 | #define SDRAM_tRCD TRCD_2 | ||
| 39 | #define SDRAM_tWR TWR_2 | ||
| 40 | #endif | ||
| 41 | #if (CONFIG_SCLK_HZ > 104477612) && (CONFIG_SCLK_HZ <= 119402985) | ||
| 42 | #define SDRAM_tRP TRP_2 | ||
| 43 | #define SDRAM_tRP_num 2 | ||
| 44 | #define SDRAM_tRAS TRAS_6 | ||
| 45 | #define SDRAM_tRAS_num 6 | ||
| 46 | #define SDRAM_tRCD TRCD_2 | ||
| 47 | #define SDRAM_tWR TWR_2 | ||
| 48 | #endif | ||
| 49 | #if (CONFIG_SCLK_HZ > 89552239) && (CONFIG_SCLK_HZ <= 104477612) | ||
| 50 | #define SDRAM_tRP TRP_2 | ||
| 51 | #define SDRAM_tRP_num 2 | ||
| 52 | #define SDRAM_tRAS TRAS_5 | ||
| 53 | #define SDRAM_tRAS_num 5 | ||
| 54 | #define SDRAM_tRCD TRCD_2 | ||
| 55 | #define SDRAM_tWR TWR_2 | ||
| 56 | #endif | ||
| 57 | #if (CONFIG_SCLK_HZ > 74626866) && (CONFIG_SCLK_HZ <= 89552239) | ||
| 58 | #define SDRAM_tRP TRP_2 | ||
| 59 | #define SDRAM_tRP_num 2 | ||
| 60 | #define SDRAM_tRAS TRAS_4 | ||
| 61 | #define SDRAM_tRAS_num 4 | ||
| 62 | #define SDRAM_tRCD TRCD_2 | ||
| 63 | #define SDRAM_tWR TWR_2 | ||
| 64 | #endif | ||
| 65 | #if (CONFIG_SCLK_HZ > 66666667) && (CONFIG_SCLK_HZ <= 74626866) | ||
| 66 | #define SDRAM_tRP TRP_2 | ||
| 67 | #define SDRAM_tRP_num 2 | ||
| 68 | #define SDRAM_tRAS TRAS_3 | ||
| 69 | #define SDRAM_tRAS_num 3 | ||
| 70 | #define SDRAM_tRCD TRCD_2 | ||
| 71 | #define SDRAM_tWR TWR_2 | ||
| 72 | #endif | ||
| 73 | #if (CONFIG_SCLK_HZ > 59701493) && (CONFIG_SCLK_HZ <= 66666667) | ||
| 74 | #define SDRAM_tRP TRP_1 | ||
| 75 | #define SDRAM_tRP_num 1 | ||
| 76 | #define SDRAM_tRAS TRAS_4 | ||
| 77 | #define SDRAM_tRAS_num 3 | ||
| 78 | #define SDRAM_tRCD TRCD_1 | ||
| 79 | #define SDRAM_tWR TWR_2 | ||
| 80 | #endif | ||
| 81 | #if (CONFIG_SCLK_HZ > 44776119) && (CONFIG_SCLK_HZ <= 59701493) | ||
| 82 | #define SDRAM_tRP TRP_1 | ||
| 83 | #define SDRAM_tRP_num 1 | ||
| 84 | #define SDRAM_tRAS TRAS_3 | ||
| 85 | #define SDRAM_tRAS_num 3 | ||
| 86 | #define SDRAM_tRCD TRCD_1 | ||
| 87 | #define SDRAM_tWR TWR_2 | ||
| 88 | #endif | ||
| 89 | #if (CONFIG_SCLK_HZ > 29850746) && (CONFIG_SCLK_HZ <= 44776119) | ||
| 90 | #define SDRAM_tRP TRP_1 | ||
| 91 | #define SDRAM_tRP_num 1 | ||
| 92 | #define SDRAM_tRAS TRAS_2 | ||
| 93 | #define SDRAM_tRAS_num 2 | ||
| 94 | #define SDRAM_tRCD TRCD_1 | ||
| 95 | #define SDRAM_tWR TWR_2 | ||
| 96 | #endif | ||
| 97 | #if (CONFIG_SCLK_HZ <= 29850746) | ||
| 98 | #define SDRAM_tRP TRP_1 | ||
| 99 | #define SDRAM_tRP_num 1 | ||
| 100 | #define SDRAM_tRAS TRAS_1 | ||
| 101 | #define SDRAM_tRAS_num 1 | ||
| 102 | #define SDRAM_tRCD TRCD_1 | ||
| 103 | #define SDRAM_tWR TWR_2 | ||
| 104 | #endif | ||
| 105 | #endif | ||
| 106 | |||
| 107 | #if (CONFIG_MEM_MT48LC16M16A2TG_75) | ||
| 108 | /*SDRAM INFORMATION: */ | ||
| 109 | #define SDRAM_Tref 64 /* Refresh period in milliseconds */ | ||
| 110 | #define SDRAM_NRA 8192 /* Number of row addresses in SDRAM */ | ||
| 111 | #define SDRAM_CL CL_3 | ||
| 112 | #endif | ||
| 113 | |||
| 114 | #if (CONFIG_MEM_MT48LC16M8A2TG_75) | ||
| 115 | /*SDRAM INFORMATION: */ | ||
| 116 | #define SDRAM_Tref 64 /* Refresh period in milliseconds */ | ||
| 117 | #define SDRAM_NRA 4096 /* Number of row addresses in SDRAM */ | ||
| 118 | #define SDRAM_CL CL_3 | ||
| 119 | #endif | ||
| 120 | |||
| 121 | #if (CONFIG_MEM_MT48LC32M8A2_75) | ||
| 122 | /*SDRAM INFORMATION: */ | ||
| 123 | #define SDRAM_Tref 64 /* Refresh period in milliseconds */ | ||
| 124 | #define SDRAM_NRA 8192 /* Number of row addresses in SDRAM */ | ||
| 125 | #define SDRAM_CL CL_3 | ||
| 126 | #endif | ||
| 127 | |||
| 128 | #if (CONFIG_MEM_MT48LC64M4A2FB_7E) | ||
| 129 | /*SDRAM INFORMATION: */ | ||
| 130 | #define SDRAM_Tref 64 /* Refresh period in milliseconds */ | ||
| 131 | #define SDRAM_NRA 8192 /* Number of row addresses in SDRAM */ | ||
| 132 | #define SDRAM_CL CL_3 | ||
| 133 | #endif | ||
| 134 | |||
| 135 | #if (CONFIG_MEM_GENERIC_BOARD) | ||
| 136 | /*SDRAM INFORMATION: Modify this for your board */ | ||
| 137 | #define SDRAM_Tref 64 /* Refresh period in milliseconds */ | ||
| 138 | #define SDRAM_NRA 8192 /* Number of row addresses in SDRAM */ | ||
| 139 | #define SDRAM_CL CL_3 | ||
| 140 | #endif | ||
| 141 | |||
| 142 | #if (CONFIG_MEM_MT48LC32M16A2TG_75) | ||
| 143 | /*SDRAM INFORMATION: */ | ||
| 144 | #define SDRAM_Tref 64 /* Refresh period in milliseconds */ | ||
| 145 | #define SDRAM_NRA 8192 /* Number of row addresses in SDRAM */ | ||
| 146 | #define SDRAM_CL CL_3 | ||
| 147 | #endif | ||
| 148 | |||
| 149 | #if (CONFIG_MEM_SIZE == 128) | ||
| 150 | #define SDRAM_SIZE EBSZ_128 | ||
| 151 | #endif | ||
| 152 | #if (CONFIG_MEM_SIZE == 64) | ||
| 153 | #define SDRAM_SIZE EBSZ_64 | ||
| 154 | #endif | ||
| 155 | #if (CONFIG_MEM_SIZE == 32) | ||
| 156 | #define SDRAM_SIZE EBSZ_32 | ||
| 157 | #endif | ||
| 158 | #if (CONFIG_MEM_SIZE == 16) | ||
| 159 | #define SDRAM_SIZE EBSZ_16 | ||
| 160 | #endif | ||
| 161 | #if (CONFIG_MEM_ADD_WIDTH == 11) | ||
| 162 | #define SDRAM_WIDTH EBCAW_11 | ||
| 163 | #endif | ||
| 164 | #if (CONFIG_MEM_ADD_WIDTH == 10) | ||
| 165 | #define SDRAM_WIDTH EBCAW_10 | ||
| 166 | #endif | ||
| 167 | #if (CONFIG_MEM_ADD_WIDTH == 9) | ||
| 168 | #define SDRAM_WIDTH EBCAW_9 | ||
| 169 | #endif | ||
| 170 | #if (CONFIG_MEM_ADD_WIDTH == 8) | ||
| 171 | #define SDRAM_WIDTH EBCAW_8 | ||
| 172 | #endif | ||
| 173 | |||
| 174 | #define mem_SDBCTL (SDRAM_WIDTH | SDRAM_SIZE | EBE) | ||
| 175 | |||
| 176 | /* Equation from section 17 (p17-46) of BF533 HRM */ | ||
| 177 | #define mem_SDRRC (((CONFIG_SCLK_HZ / 1000) * SDRAM_Tref) / SDRAM_NRA) - (SDRAM_tRAS_num + SDRAM_tRP_num) | ||
| 178 | |||
| 179 | /* Enable SCLK Out */ | ||
| 180 | #define mem_SDGCTL (SCTLE | SDRAM_CL | SDRAM_tRAS | SDRAM_tRP | SDRAM_tRCD | SDRAM_tWR | PSS) | ||
| 181 | |||
| 182 | #if defined CONFIG_CLKIN_HALF | ||
| 183 | #define CLKIN_HALF 1 | ||
| 184 | #else | ||
| 185 | #define CLKIN_HALF 0 | ||
| 186 | #endif | ||
| 187 | |||
| 188 | #if defined CONFIG_PLL_BYPASS | ||
| 189 | #define PLL_BYPASS 1 | ||
| 190 | #else | ||
| 191 | #define PLL_BYPASS 0 | ||
| 192 | #endif | ||
| 193 | |||
| 194 | /***************************************Currently Not Being Used *********************************/ | ||
| 195 | #define flash_EBIU_AMBCTL_WAT ((CONFIG_FLASH_SPEED_BWAT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1 | ||
| 196 | #define flash_EBIU_AMBCTL_RAT ((CONFIG_FLASH_SPEED_BRAT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1 | ||
| 197 | #define flash_EBIU_AMBCTL_HT ((CONFIG_FLASH_SPEED_BHT * 4) / (4000000000 / CONFIG_SCLK_HZ)) | ||
| 198 | #define flash_EBIU_AMBCTL_ST ((CONFIG_FLASH_SPEED_BST * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1 | ||
| 199 | #define flash_EBIU_AMBCTL_TT ((CONFIG_FLASH_SPEED_BTT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1 | ||
| 200 | |||
| 201 | #if (flash_EBIU_AMBCTL_TT > 3) | ||
| 202 | #define flash_EBIU_AMBCTL0_TT B0TT_4 | ||
| 203 | #endif | ||
| 204 | #if (flash_EBIU_AMBCTL_TT == 3) | ||
| 205 | #define flash_EBIU_AMBCTL0_TT B0TT_3 | ||
| 206 | #endif | ||
| 207 | #if (flash_EBIU_AMBCTL_TT == 2) | ||
| 208 | #define flash_EBIU_AMBCTL0_TT B0TT_2 | ||
| 209 | #endif | ||
| 210 | #if (flash_EBIU_AMBCTL_TT < 2) | ||
| 211 | #define flash_EBIU_AMBCTL0_TT B0TT_1 | ||
| 212 | #endif | ||
| 213 | |||
| 214 | #if (flash_EBIU_AMBCTL_ST > 3) | ||
| 215 | #define flash_EBIU_AMBCTL0_ST B0ST_4 | ||
| 216 | #endif | ||
| 217 | #if (flash_EBIU_AMBCTL_ST == 3) | ||
| 218 | #define flash_EBIU_AMBCTL0_ST B0ST_3 | ||
| 219 | #endif | ||
| 220 | #if (flash_EBIU_AMBCTL_ST == 2) | ||
| 221 | #define flash_EBIU_AMBCTL0_ST B0ST_2 | ||
| 222 | #endif | ||
| 223 | #if (flash_EBIU_AMBCTL_ST < 2) | ||
| 224 | #define flash_EBIU_AMBCTL0_ST B0ST_1 | ||
| 225 | #endif | ||
| 226 | |||
| 227 | #if (flash_EBIU_AMBCTL_HT > 2) | ||
| 228 | #define flash_EBIU_AMBCTL0_HT B0HT_3 | ||
| 229 | #endif | ||
| 230 | #if (flash_EBIU_AMBCTL_HT == 2) | ||
| 231 | #define flash_EBIU_AMBCTL0_HT B0HT_2 | ||
| 232 | #endif | ||
| 233 | #if (flash_EBIU_AMBCTL_HT == 1) | ||
| 234 | #define flash_EBIU_AMBCTL0_HT B0HT_1 | ||
| 235 | #endif | ||
| 236 | #if (flash_EBIU_AMBCTL_HT == 0 && CONFIG_FLASH_SPEED_BHT == 0) | ||
| 237 | #define flash_EBIU_AMBCTL0_HT B0HT_0 | ||
| 238 | #endif | ||
| 239 | #if (flash_EBIU_AMBCTL_HT == 0 && CONFIG_FLASH_SPEED_BHT != 0) | ||
| 240 | #define flash_EBIU_AMBCTL0_HT B0HT_1 | ||
| 241 | #endif | ||
| 242 | |||
| 243 | #if (flash_EBIU_AMBCTL_WAT > 14) | ||
| 244 | #define flash_EBIU_AMBCTL0_WAT B0WAT_15 | ||
| 245 | #endif | ||
| 246 | #if (flash_EBIU_AMBCTL_WAT == 14) | ||
| 247 | #define flash_EBIU_AMBCTL0_WAT B0WAT_14 | ||
| 248 | #endif | ||
| 249 | #if (flash_EBIU_AMBCTL_WAT == 13) | ||
| 250 | #define flash_EBIU_AMBCTL0_WAT B0WAT_13 | ||
| 251 | #endif | ||
| 252 | #if (flash_EBIU_AMBCTL_WAT == 12) | ||
| 253 | #define flash_EBIU_AMBCTL0_WAT B0WAT_12 | ||
| 254 | #endif | ||
| 255 | #if (flash_EBIU_AMBCTL_WAT == 11) | ||
| 256 | #define flash_EBIU_AMBCTL0_WAT B0WAT_11 | ||
| 257 | #endif | ||
| 258 | #if (flash_EBIU_AMBCTL_WAT == 10) | ||
| 259 | #define flash_EBIU_AMBCTL0_WAT B0WAT_10 | ||
| 260 | #endif | ||
| 261 | #if (flash_EBIU_AMBCTL_WAT == 9) | ||
| 262 | #define flash_EBIU_AMBCTL0_WAT B0WAT_9 | ||
| 263 | #endif | ||
| 264 | #if (flash_EBIU_AMBCTL_WAT == 8) | ||
| 265 | #define flash_EBIU_AMBCTL0_WAT B0WAT_8 | ||
| 266 | #endif | ||
| 267 | #if (flash_EBIU_AMBCTL_WAT == 7) | ||
| 268 | #define flash_EBIU_AMBCTL0_WAT B0WAT_7 | ||
| 269 | #endif | ||
| 270 | #if (flash_EBIU_AMBCTL_WAT == 6) | ||
| 271 | #define flash_EBIU_AMBCTL0_WAT B0WAT_6 | ||
| 272 | #endif | ||
| 273 | #if (flash_EBIU_AMBCTL_WAT == 5) | ||
| 274 | #define flash_EBIU_AMBCTL0_WAT B0WAT_5 | ||
| 275 | #endif | ||
| 276 | #if (flash_EBIU_AMBCTL_WAT == 4) | ||
| 277 | #define flash_EBIU_AMBCTL0_WAT B0WAT_4 | ||
| 278 | #endif | ||
| 279 | #if (flash_EBIU_AMBCTL_WAT == 3) | ||
| 280 | #define flash_EBIU_AMBCTL0_WAT B0WAT_3 | ||
| 281 | #endif | ||
| 282 | #if (flash_EBIU_AMBCTL_WAT == 2) | ||
| 283 | #define flash_EBIU_AMBCTL0_WAT B0WAT_2 | ||
| 284 | #endif | ||
| 285 | #if (flash_EBIU_AMBCTL_WAT == 1) | ||
| 286 | #define flash_EBIU_AMBCTL0_WAT B0WAT_1 | ||
| 287 | #endif | ||
| 288 | |||
| 289 | #if (flash_EBIU_AMBCTL_RAT > 14) | ||
| 290 | #define flash_EBIU_AMBCTL0_RAT B0RAT_15 | ||
| 291 | #endif | ||
| 292 | #if (flash_EBIU_AMBCTL_RAT == 14) | ||
| 293 | #define flash_EBIU_AMBCTL0_RAT B0RAT_14 | ||
| 294 | #endif | ||
| 295 | #if (flash_EBIU_AMBCTL_RAT == 13) | ||
| 296 | #define flash_EBIU_AMBCTL0_RAT B0RAT_13 | ||
| 297 | #endif | ||
| 298 | #if (flash_EBIU_AMBCTL_RAT == 12) | ||
| 299 | #define flash_EBIU_AMBCTL0_RAT B0RAT_12 | ||
| 300 | #endif | ||
| 301 | #if (flash_EBIU_AMBCTL_RAT == 11) | ||
| 302 | #define flash_EBIU_AMBCTL0_RAT B0RAT_11 | ||
| 303 | #endif | ||
| 304 | #if (flash_EBIU_AMBCTL_RAT == 10) | ||
| 305 | #define flash_EBIU_AMBCTL0_RAT B0RAT_10 | ||
| 306 | #endif | ||
| 307 | #if (flash_EBIU_AMBCTL_RAT == 9) | ||
| 308 | #define flash_EBIU_AMBCTL0_RAT B0RAT_9 | ||
| 309 | #endif | ||
| 310 | #if (flash_EBIU_AMBCTL_RAT == 8) | ||
| 311 | #define flash_EBIU_AMBCTL0_RAT B0RAT_8 | ||
| 312 | #endif | ||
| 313 | #if (flash_EBIU_AMBCTL_RAT == 7) | ||
| 314 | #define flash_EBIU_AMBCTL0_RAT B0RAT_7 | ||
| 315 | #endif | ||
| 316 | #if (flash_EBIU_AMBCTL_RAT == 6) | ||
| 317 | #define flash_EBIU_AMBCTL0_RAT B0RAT_6 | ||
| 318 | #endif | ||
| 319 | #if (flash_EBIU_AMBCTL_RAT == 5) | ||
| 320 | #define flash_EBIU_AMBCTL0_RAT B0RAT_5 | ||
| 321 | #endif | ||
| 322 | #if (flash_EBIU_AMBCTL_RAT == 4) | ||
| 323 | #define flash_EBIU_AMBCTL0_RAT B0RAT_4 | ||
| 324 | #endif | ||
| 325 | #if (flash_EBIU_AMBCTL_RAT == 3) | ||
| 326 | #define flash_EBIU_AMBCTL0_RAT B0RAT_3 | ||
| 327 | #endif | ||
| 328 | #if (flash_EBIU_AMBCTL_RAT == 2) | ||
| 329 | #define flash_EBIU_AMBCTL0_RAT B0RAT_2 | ||
| 330 | #endif | ||
| 331 | #if (flash_EBIU_AMBCTL_RAT == 1) | ||
| 332 | #define flash_EBIU_AMBCTL0_RAT B0RAT_1 | ||
| 333 | #endif | ||
| 334 | |||
| 335 | #define flash_EBIU_AMBCTL0 \ | ||
| 336 | (flash_EBIU_AMBCTL0_WAT | flash_EBIU_AMBCTL0_RAT | flash_EBIU_AMBCTL0_HT | \ | ||
| 337 | flash_EBIU_AMBCTL0_ST | flash_EBIU_AMBCTL0_TT | CONFIG_FLASH_SPEED_RDYEN) | ||
diff --git a/include/asm-blackfin/mach-bf527/mem_map.h b/include/asm-blackfin/mach-bf527/mem_map.h new file mode 100644 index 000000000000..c5aa20102b24 --- /dev/null +++ b/include/asm-blackfin/mach-bf527/mem_map.h | |||
| @@ -0,0 +1,98 @@ | |||
| 1 | /* | ||
| 2 | * file: include/asm-blackfin/mach-bf527/mem_map.h | ||
| 3 | * based on: include/asm-blackfin/mach-bf537/mem_map.h | ||
| 4 | * author: Michael Hennerich (michael.hennerich@analog.com) | ||
| 5 | * | ||
| 6 | * created: | ||
| 7 | * description: | ||
| 8 | * Memory MAP Common header file for blackfin BF527/5/2 of processors. | ||
| 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 | */ | ||
| 30 | |||
| 31 | #ifndef _MEM_MAP_527_H_ | ||
| 32 | #define _MEM_MAP_527_H_ | ||
| 33 | |||
| 34 | #define COREMMR_BASE 0xFFE00000 /* Core MMRs */ | ||
| 35 | #define SYSMMR_BASE 0xFFC00000 /* System MMRs */ | ||
| 36 | |||
| 37 | /* Async Memory Banks */ | ||
| 38 | #define ASYNC_BANK3_BASE 0x20300000 /* Async Bank 3 */ | ||
| 39 | #define ASYNC_BANK3_SIZE 0x00100000 /* 1M */ | ||
| 40 | #define ASYNC_BANK2_BASE 0x20200000 /* Async Bank 2 */ | ||
| 41 | #define ASYNC_BANK2_SIZE 0x00100000 /* 1M */ | ||
| 42 | #define ASYNC_BANK1_BASE 0x20100000 /* Async Bank 1 */ | ||
| 43 | #define ASYNC_BANK1_SIZE 0x00100000 /* 1M */ | ||
| 44 | #define ASYNC_BANK0_BASE 0x20000000 /* Async Bank 0 */ | ||
| 45 | #define ASYNC_BANK0_SIZE 0x00100000 /* 1M */ | ||
| 46 | |||
| 47 | /* Boot ROM Memory */ | ||
| 48 | |||
| 49 | #define BOOT_ROM_START 0xEF000000 | ||
| 50 | |||
| 51 | /* Level 1 Memory */ | ||
| 52 | |||
| 53 | /* Memory Map for ADSP-BF527 ADSP-BF525 ADSP-BF522 processors */ | ||
| 54 | |||
| 55 | #ifdef CONFIG_BFIN_ICACHE | ||
| 56 | #define BFIN_ICACHESIZE (16*1024) | ||
| 57 | #else | ||
| 58 | #define BFIN_ICACHESIZE (0*1024) | ||
| 59 | #endif | ||
| 60 | |||
| 61 | #define L1_CODE_START 0xFFA00000 | ||
| 62 | #define L1_DATA_A_START 0xFF800000 | ||
| 63 | #define L1_DATA_B_START 0xFF900000 | ||
| 64 | |||
| 65 | #define L1_CODE_LENGTH 0xC000 | ||
| 66 | |||
| 67 | #ifdef CONFIG_BFIN_DCACHE | ||
| 68 | |||
| 69 | #ifdef CONFIG_BFIN_DCACHE_BANKA | ||
| 70 | #define DMEM_CNTR (ACACHE_BSRAM | ENDCPLB | PORT_PREF0) | ||
| 71 | #define L1_DATA_A_LENGTH (0x8000 - 0x4000) | ||
| 72 | #define L1_DATA_B_LENGTH 0x8000 | ||
| 73 | #define BFIN_DCACHESIZE (16*1024) | ||
| 74 | #define BFIN_DSUPBANKS 1 | ||
| 75 | #else | ||
| 76 | #define DMEM_CNTR (ACACHE_BCACHE | ENDCPLB | PORT_PREF0) | ||
| 77 | #define L1_DATA_A_LENGTH (0x8000 - 0x4000) | ||
| 78 | #define L1_DATA_B_LENGTH (0x8000 - 0x4000) | ||
| 79 | #define BFIN_DCACHESIZE (32*1024) | ||
| 80 | #define BFIN_DSUPBANKS 2 | ||
| 81 | #endif | ||
| 82 | |||
| 83 | #else | ||
| 84 | #define DMEM_CNTR (ASRAM_BSRAM | ENDCPLB | PORT_PREF0) | ||
| 85 | #define L1_DATA_A_LENGTH 0x8000 | ||
| 86 | #define L1_DATA_B_LENGTH 0x8000 | ||
| 87 | #define BFIN_DCACHESIZE (0*1024) | ||
| 88 | #define BFIN_DSUPBANKS 0 | ||
| 89 | #endif /*CONFIG_BFIN_DCACHE */ | ||
| 90 | |||
| 91 | /* Scratch Pad Memory */ | ||
| 92 | |||
| 93 | #if defined(CONFIG_BF527) || defined(CONFIG_BF536) || defined(CONFIG_BF534) | ||
| 94 | #define L1_SCRATCH_START 0xFFB00000 | ||
| 95 | #define L1_SCRATCH_LENGTH 0x1000 | ||
| 96 | #endif | ||
| 97 | |||
| 98 | #endif /* _MEM_MAP_527_H_ */ | ||
diff --git a/include/asm-blackfin/mach-bf527/portmux.h b/include/asm-blackfin/mach-bf527/portmux.h new file mode 100644 index 000000000000..dcf001adc63c --- /dev/null +++ b/include/asm-blackfin/mach-bf527/portmux.h | |||
| @@ -0,0 +1,205 @@ | |||
| 1 | #ifndef _MACH_PORTMUX_H_ | ||
| 2 | #define _MACH_PORTMUX_H_ | ||
| 3 | |||
| 4 | #define P_PPI0_D0 (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(0)) | ||
| 5 | #define P_PPI0_D1 (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(0)) | ||
| 6 | #define P_PPI0_D2 (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(0)) | ||
| 7 | #define P_PPI0_D3 (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(0)) | ||
| 8 | #define P_PPI0_D4 (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(0)) | ||
| 9 | #define P_PPI0_D5 (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(0)) | ||
| 10 | #define P_PPI0_D6 (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(0)) | ||
| 11 | #define P_PPI0_D7 (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(0)) | ||
| 12 | #define P_PPI0_D8 (P_DEFINED | P_IDENT(GPIO_PF8) | P_FUNCT(0)) | ||
| 13 | #define P_PPI0_D9 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(0)) | ||
| 14 | #define P_PPI0_D10 (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(0)) | ||
| 15 | #define P_PPI0_D11 (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(0)) | ||
| 16 | #define P_PPI0_D12 (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(0)) | ||
| 17 | #define P_PPI0_D13 (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(0)) | ||
| 18 | #define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(0)) | ||
| 19 | #define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(0)) | ||
| 20 | |||
| 21 | #if defined(CONFIG_BF527_SPORT0_PORTF) | ||
| 22 | #define P_SPORT0_DRPRI (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(1)) | ||
| 23 | #define P_SPORT0_RFS (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(1)) | ||
| 24 | #define P_SPORT0_RSCLK (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(1)) | ||
| 25 | #define P_SPORT0_DTPRI (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(1)) | ||
| 26 | #define P_SPORT0_TFS (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(1)) | ||
| 27 | #define P_SPORT0_TSCLK (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(1)) | ||
| 28 | #define P_SPORT0_DTSEC (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(1)) | ||
| 29 | #define P_SPORT0_DRSEC (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(1)) | ||
| 30 | #elif defined(CONFIG_BF527_SPORT0_PORTG) | ||
| 31 | #define P_SPORT0_DTPRI (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(0)) | ||
| 32 | #define P_SPORT0_DRSEC (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(1)) | ||
| 33 | #define P_SPORT0_DTSEC (P_DEFINED | P_IDENT(GPIO_PG4) | P_FUNCT(1)) | ||
| 34 | #define P_SPORT0_DRPRI (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(1)) | ||
| 35 | #define P_SPORT0_RFS (P_DEFINED | P_IDENT(GPIO_PG8) | P_FUNCT(1)) | ||
| 36 | #define P_SPORT0_RSCLK (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(1)) | ||
| 37 | #if defined(CONFIG_BF527_SPORT0_TSCLK_PG10) | ||
| 38 | #define P_SPORT0_TSCLK (P_DEFINED | P_IDENT(GPIO_PG10) | P_FUNCT(1)) | ||
| 39 | #elif defined(CONFIG_BF527_SPORT0_TSCLK_PG14) | ||
| 40 | #define P_SPORT0_TSCLK (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(0)) | ||
| 41 | #endif | ||
| 42 | #define P_SPORT0_TFS (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(0)) | ||
| 43 | #endif | ||
| 44 | |||
| 45 | #define P_SPORT1_DRPRI (P_DEFINED | P_IDENT(GPIO_PF8) | P_FUNCT(1)) | ||
| 46 | #define P_SPORT1_RSCLK (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(1)) | ||
| 47 | #define P_SPORT1_RFS (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(1)) | ||
| 48 | #define P_SPORT1_TFS (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(1)) | ||
| 49 | #define P_SPORT1_DTPRI (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(1)) | ||
| 50 | #define P_SPORT1_TSCLK (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(1)) | ||
| 51 | #define P_SPORT1_DTSEC (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(1)) | ||
| 52 | #define P_SPORT1_DRSEC (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(1)) | ||
| 53 | |||
| 54 | #define P_SPI0_SSEL6 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(2)) | ||
| 55 | #define P_SPI0_SSEL7 (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(2)) | ||
| 56 | |||
| 57 | #define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(2)) | ||
| 58 | #define P_SPI0_SSEL3 (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(2)) | ||
| 59 | |||
| 60 | #if defined(CONFIG_BF527_UART1_PORTF) | ||
| 61 | #define P_UART1_TX (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(2)) | ||
| 62 | #define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(2)) | ||
| 63 | #elif defined(CONFIG_BF527_UART1_PORTG) | ||
| 64 | #define P_UART1_TX (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(1)) | ||
| 65 | #define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(1)) | ||
| 66 | #endif | ||
| 67 | |||
| 68 | #define P_HWAIT (P_DONTCARE) | ||
| 69 | |||
| 70 | #define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(0)) | ||
| 71 | #define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(2)) | ||
| 72 | #define P_SPI0_SCK (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(2)) | ||
| 73 | #define P_SPI0_MISO (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(2)) | ||
| 74 | #define P_SPI0_MOSI (P_DEFINED | P_IDENT(GPIO_PG4) | P_FUNCT(2)) | ||
| 75 | #define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(0)) | ||
| 76 | #define P_PPI0_FS2 (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(0)) | ||
| 77 | #define P_TMR3 (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(0)) | ||
| 78 | #define P_TMR4 (P_DEFINED | P_IDENT(GPIO_PG8) | P_FUNCT(0)) | ||
| 79 | #define P_TMR5 (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(0)) | ||
| 80 | #define P_TMR6 (P_DEFINED | P_IDENT(GPIO_PG10) | P_FUNCT(0)) | ||
| 81 | /* #define P_TMR7 (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(0)) */ | ||
| 82 | #define P_DMAR1 (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(0)) | ||
| 83 | #define P_DMAR0 (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(0)) | ||
| 84 | #define P_TMR2 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(1)) | ||
| 85 | #define P_TMR7 (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(1)) | ||
| 86 | #define P_MDC (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(1)) | ||
| 87 | #define P_RMII0_MDINT (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(1)) | ||
| 88 | #define P_MII0_PHYINT (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(1)) | ||
| 89 | |||
| 90 | #define P_PPI0_FS3 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(2)) | ||
| 91 | #define P_UART0_TX (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(2)) | ||
| 92 | #define P_UART0_RX (P_DEFINED | P_IDENT(GPIO_PG8) | P_FUNCT(2)) | ||
| 93 | |||
| 94 | #define P_HOST_WR (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(2)) | ||
| 95 | #define P_HOST_ACK (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(2)) | ||
| 96 | #define P_HOST_ADDR (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(2)) | ||
| 97 | #define P_HOST_RD (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(2)) | ||
| 98 | #define P_HOST_CE (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(2)) | ||
| 99 | |||
| 100 | #if defined(CONFIG_BF527_NAND_D_PORTF) | ||
| 101 | #define P_NAND_D0 (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(2)) | ||
| 102 | #define P_NAND_D1 (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(2)) | ||
| 103 | #define P_NAND_D2 (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(2)) | ||
| 104 | #define P_NAND_D3 (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(2)) | ||
| 105 | #define P_NAND_D4 (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(2)) | ||
| 106 | #define P_NAND_D5 (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(2)) | ||
| 107 | #define P_NAND_D6 (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(2)) | ||
| 108 | #define P_NAND_D7 (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(2)) | ||
| 109 | #elif defined(CONFIG_BF527_NAND_D_PORTH) | ||
| 110 | #define P_NAND_D0 (P_DEFINED | P_IDENT(GPIO_PH0) | P_FUNCT(0)) | ||
| 111 | #define P_NAND_D1 (P_DEFINED | P_IDENT(GPIO_PH1) | P_FUNCT(0)) | ||
| 112 | #define P_NAND_D2 (P_DEFINED | P_IDENT(GPIO_PH2) | P_FUNCT(0)) | ||
| 113 | #define P_NAND_D3 (P_DEFINED | P_IDENT(GPIO_PH3) | P_FUNCT(0)) | ||
| 114 | #define P_NAND_D4 (P_DEFINED | P_IDENT(GPIO_PH4) | P_FUNCT(0)) | ||
| 115 | #define P_NAND_D5 (P_DEFINED | P_IDENT(GPIO_PH5) | P_FUNCT(0)) | ||
| 116 | #define P_NAND_D6 (P_DEFINED | P_IDENT(GPIO_PH6) | P_FUNCT(0)) | ||
| 117 | #define P_NAND_D7 (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(0)) | ||
| 118 | #endif | ||
| 119 | |||
| 120 | #define P_SPI0_SSEL4 (P_DEFINED | P_IDENT(GPIO_PH8) | P_FUNCT(0)) | ||
| 121 | #define P_SPI0_SSEL5 (P_DEFINED | P_IDENT(GPIO_PH9) | P_FUNCT(0)) | ||
| 122 | #define P_NAND_CE (P_DEFINED | P_IDENT(GPIO_PH10) | P_FUNCT(0)) | ||
| 123 | #define P_NAND_WE (P_DEFINED | P_IDENT(GPIO_PH11) | P_FUNCT(0)) | ||
| 124 | #define P_NAND_RE (P_DEFINED | P_IDENT(GPIO_PH12) | P_FUNCT(0)) | ||
| 125 | #define P_NAND_RB (P_DEFINED | P_IDENT(GPIO_PH13) | P_FUNCT(0)) | ||
| 126 | #define P_NAND_CLE (P_DEFINED | P_IDENT(GPIO_PH14) | P_FUNCT(0)) | ||
| 127 | #define P_NAND_ALE (P_DEFINED | P_IDENT(GPIO_PH15) | P_FUNCT(0)) | ||
| 128 | |||
| 129 | #define P_HOST_D0 (P_DEFINED | P_IDENT(GPIO_PH0) | P_FUNCT(2)) | ||
| 130 | #define P_HOST_D1 (P_DEFINED | P_IDENT(GPIO_PH1) | P_FUNCT(2)) | ||
| 131 | #define P_HOST_D2 (P_DEFINED | P_IDENT(GPIO_PH2) | P_FUNCT(2)) | ||
| 132 | #define P_HOST_D3 (P_DEFINED | P_IDENT(GPIO_PH3) | P_FUNCT(2)) | ||
| 133 | #define P_HOST_D4 (P_DEFINED | P_IDENT(GPIO_PH4) | P_FUNCT(2)) | ||
| 134 | #define P_HOST_D5 (P_DEFINED | P_IDENT(GPIO_PH5) | P_FUNCT(2)) | ||
| 135 | #define P_HOST_D6 (P_DEFINED | P_IDENT(GPIO_PH6) | P_FUNCT(2)) | ||
| 136 | #define P_HOST_D7 (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(2)) | ||
| 137 | #define P_HOST_D8 (P_DEFINED | P_IDENT(GPIO_PH8) | P_FUNCT(2)) | ||
| 138 | #define P_HOST_D9 (P_DEFINED | P_IDENT(GPIO_PH9) | P_FUNCT(2)) | ||
| 139 | #define P_HOST_D10 (P_DEFINED | P_IDENT(GPIO_PH10) | P_FUNCT(2)) | ||
| 140 | #define P_HOST_D11 (P_DEFINED | P_IDENT(GPIO_PH11) | P_FUNCT(2)) | ||
| 141 | #define P_HOST_D12 (P_DEFINED | P_IDENT(GPIO_PH12) | P_FUNCT(2)) | ||
| 142 | #define P_HOST_D13 (P_DEFINED | P_IDENT(GPIO_PH13) | P_FUNCT(2)) | ||
| 143 | #define P_HOST_D14 (P_DEFINED | P_IDENT(GPIO_PH14) | P_FUNCT(2)) | ||
| 144 | #define P_HOST_D15 (P_DEFINED | P_IDENT(GPIO_PH15) | P_FUNCT(2)) | ||
| 145 | |||
| 146 | #define P_MII0_ETxD0 (P_DEFINED | P_IDENT(GPIO_PH5) | P_FUNCT(1)) | ||
| 147 | #define P_MII0_ETxD1 (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(1)) | ||
| 148 | #define P_MII0_ETxD2 (P_DEFINED | P_IDENT(GPIO_PH9) | P_FUNCT(1)) | ||
| 149 | #define P_MII0_ETxD3 (P_DEFINED | P_IDENT(GPIO_PH11) | P_FUNCT(1)) | ||
| 150 | #define P_MII0_ETxEN (P_DEFINED | P_IDENT(GPIO_PH3) | P_FUNCT(1)) | ||
| 151 | #define P_MII0_TxCLK (P_DEFINED | P_IDENT(GPIO_PH4) | P_FUNCT(1)) | ||
| 152 | #define P_MII0_COL (P_DEFINED | P_IDENT(GPIO_PH15) | P_FUNCT(1)) | ||
| 153 | #define P_MII0_ERxD0 (P_DEFINED | P_IDENT(GPIO_PH6) | P_FUNCT(1)) | ||
| 154 | #define P_MII0_ERxD1 (P_DEFINED | P_IDENT(GPIO_PH8) | P_FUNCT(1)) | ||
| 155 | #define P_MII0_ERxD2 (P_DEFINED | P_IDENT(GPIO_PH10) | P_FUNCT(1)) | ||
| 156 | #define P_MII0_ERxD3 (P_DEFINED | P_IDENT(GPIO_PH12) | P_FUNCT(1)) | ||
| 157 | #define P_MII0_ERxDV (P_DEFINED | P_IDENT(GPIO_PH14) | P_FUNCT(1)) | ||
| 158 | #define P_MII0_ERxCLK (P_DEFINED | P_IDENT(GPIO_PH13) | P_FUNCT(1)) | ||
| 159 | #define P_MII0_ERxER (P_DEFINED | P_IDENT(GPIO_PH1) | P_FUNCT(1)) | ||
| 160 | #define P_MII0_CRS (P_DEFINED | P_IDENT(GPIO_PH0) | P_FUNCT(1)) | ||
| 161 | #define P_RMII0_REF_CLK (P_DEFINED | P_IDENT(GPIO_PH4) | P_FUNCT(1)) | ||
| 162 | #define P_RMII0_CRS_DV (P_DEFINED | P_IDENT(GPIO_PH0) | P_FUNCT(1)) | ||
| 163 | #define P_MDIO (P_DEFINED | P_IDENT(GPIO_PH2) | P_FUNCT(1)) | ||
| 164 | |||
| 165 | #define P_TWI0_SCL (P_DONTCARE) | ||
| 166 | #define P_TWI0_SDA (P_DONTCARE) | ||
| 167 | #define P_PPI0_FS1 (P_DONTCARE) | ||
| 168 | #define P_TMR0 (P_DONTCARE) | ||
| 169 | #define P_TMRCLK (P_DONTCARE) | ||
| 170 | #define P_PPI0_CLK (P_DONTCARE) | ||
| 171 | |||
| 172 | #define P_MII0 {\ | ||
| 173 | P_MII0_ETxD0, \ | ||
| 174 | P_MII0_ETxD1, \ | ||
| 175 | P_MII0_ETxD2, \ | ||
| 176 | P_MII0_ETxD3, \ | ||
| 177 | P_MII0_ETxEN, \ | ||
| 178 | P_MII0_TxCLK, \ | ||
| 179 | P_MII0_PHYINT, \ | ||
| 180 | P_MII0_COL, \ | ||
| 181 | P_MII0_ERxD0, \ | ||
| 182 | P_MII0_ERxD1, \ | ||
| 183 | P_MII0_ERxD2, \ | ||
| 184 | P_MII0_ERxD3, \ | ||
| 185 | P_MII0_ERxDV, \ | ||
| 186 | P_MII0_ERxCLK, \ | ||
| 187 | P_MII0_ERxER, \ | ||
| 188 | P_MII0_CRS, \ | ||
| 189 | P_MDC, \ | ||
| 190 | P_MDIO, 0} | ||
| 191 | |||
| 192 | #define P_RMII0 {\ | ||
| 193 | P_MII0_ETxD0, \ | ||
| 194 | P_MII0_ETxD1, \ | ||
| 195 | P_MII0_ETxEN, \ | ||
| 196 | P_MII0_ERxD0, \ | ||
| 197 | P_MII0_ERxD1, \ | ||
| 198 | P_MII0_ERxER, \ | ||
| 199 | P_RMII0_REF_CLK, \ | ||
| 200 | P_RMII0_MDINT, \ | ||
| 201 | P_RMII0_CRS_DV, \ | ||
| 202 | P_MDC, \ | ||
| 203 | P_MDIO, 0} | ||
| 204 | |||
| 205 | #endif /* _MACH_PORTMUX_H_ */ | ||
diff --git a/include/asm-blackfin/mach-bf548/defBF549.h b/include/asm-blackfin/mach-bf548/defBF549.h index 50b3fe55ef0c..4e46d657e50e 100644 --- a/include/asm-blackfin/mach-bf548/defBF549.h +++ b/include/asm-blackfin/mach-bf548/defBF549.h | |||
| @@ -1178,7 +1178,7 @@ | |||
| 1178 | 1178 | ||
| 1179 | /* Bit masks for HOST_STATUS */ | 1179 | /* Bit masks for HOST_STATUS */ |
| 1180 | 1180 | ||
| 1181 | #define READY 0x1 /* DMA Ready */ | 1181 | #define DMA_READY 0x1 /* DMA Ready */ |
| 1182 | #define FIFOFULL 0x2 /* FIFO Full */ | 1182 | #define FIFOFULL 0x2 /* FIFO Full */ |
| 1183 | #define FIFOEMPTY 0x4 /* FIFO Empty */ | 1183 | #define FIFOEMPTY 0x4 /* FIFO Empty */ |
| 1184 | #define DMA_COMPLETE 0x8 /* DMA Complete */ | 1184 | #define DMA_COMPLETE 0x8 /* DMA Complete */ |
diff --git a/include/asm-blackfin/mach-bf548/defBF54x_base.h b/include/asm-blackfin/mach-bf548/defBF54x_base.h index e2632db74baa..1d365c844ffe 100644 --- a/include/asm-blackfin/mach-bf548/defBF54x_base.h +++ b/include/asm-blackfin/mach-bf548/defBF54x_base.h | |||
| @@ -47,6 +47,10 @@ | |||
| 47 | /* Debug/MP/Emulation Registers (0xFFC00014 - 0xFFC00014) */ | 47 | /* Debug/MP/Emulation Registers (0xFFC00014 - 0xFFC00014) */ |
| 48 | 48 | ||
| 49 | #define CHIPID 0xffc00014 | 49 | #define CHIPID 0xffc00014 |
| 50 | /* CHIPID Masks */ | ||
| 51 | #define CHIPID_VERSION 0xF0000000 | ||
| 52 | #define CHIPID_FAMILY 0x0FFFF000 | ||
| 53 | #define CHIPID_MANUFACTURE 0x00000FFE | ||
| 50 | 54 | ||
| 51 | /* System Reset and Interrupt Controller (0xFFC00100 - 0xFFC00104) */ | 55 | /* System Reset and Interrupt Controller (0xFFC00100 - 0xFFC00104) */ |
| 52 | 56 | ||
| @@ -3299,7 +3303,7 @@ | |||
| 3299 | 3303 | ||
| 3300 | #define MFD 0xf000 /* Multi channel Frame Delay */ | 3304 | #define MFD 0xf000 /* Multi channel Frame Delay */ |
| 3301 | #define FSDR 0x80 /* Frame Sync to Data Relationship */ | 3305 | #define FSDR 0x80 /* Frame Sync to Data Relationship */ |
| 3302 | #define MCMEM 0x10 /* Multi channel Frame Mode Enable */ | 3306 | #define MCMEN 0x10 /* Multi channel Frame Mode Enable */ |
| 3303 | #define MCDRXPE 0x8 /* Multi channel DMA Receive Packing */ | 3307 | #define MCDRXPE 0x8 /* Multi channel DMA Receive Packing */ |
| 3304 | #define MCDTXPE 0x4 /* Multi channel DMA Transmit Packing */ | 3308 | #define MCDTXPE 0x4 /* Multi channel DMA Transmit Packing */ |
| 3305 | #define MCCRM 0x3 /* 2X Clock Recovery Mode */ | 3309 | #define MCCRM 0x3 /* 2X Clock Recovery Mode */ |
diff --git a/include/asm-blackfin/mach-bf548/dma.h b/include/asm-blackfin/mach-bf548/dma.h index 14cb10cc24ae..4d97d3aa97cd 100644 --- a/include/asm-blackfin/mach-bf548/dma.h +++ b/include/asm-blackfin/mach-bf548/dma.h | |||
| @@ -70,5 +70,5 @@ | |||
| 70 | #define MAX_BLACKFIN_DMA_CHANNEL 32 | 70 | #define MAX_BLACKFIN_DMA_CHANNEL 32 |
| 71 | 71 | ||
| 72 | extern int channel2irq(unsigned int channel); | 72 | extern int channel2irq(unsigned int channel); |
| 73 | extern struct dma_register *base_addr[]; | 73 | extern struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL]; |
| 74 | #endif | 74 | #endif |
